├── .nvmrc
├── .npmrc
├── .husky
├── pre-commit
└── commit-msg
├── .stylelintignore
├── packages
├── components
│ ├── index.ts
│ ├── README.md
│ ├── avatar
│ │ ├── index.ts
│ │ └── ng-package.json
│ ├── kbd
│ │ ├── index.ts
│ │ ├── ng-package.json
│ │ └── src
│ │ │ └── kbd.component.ts
│ ├── switch
│ │ ├── index.ts
│ │ └── ng-package.json
│ ├── code
│ │ ├── index.ts
│ │ └── ng-package.json
│ ├── theme
│ │ ├── index.ts
│ │ ├── ng-package.json
│ │ └── README.md
│ ├── types
│ │ ├── ng-package.json
│ │ └── index.ts
│ ├── .storybook
│ │ ├── manager.ts
│ │ ├── rdxTheme.ts
│ │ ├── tsconfig.json
│ │ └── main.ts
│ ├── tsconfig.doc.json
│ ├── ng-package.json
│ ├── tsconfig.lib.prod.json
│ ├── tsconfig.spec.json
│ ├── tsconfig.lib.json
│ ├── .compodocrc.json
│ ├── package.json
│ └── jest.config.ts
└── primitives
│ ├── form-field
│ └── src
│ │ └── .gitkeep
│ ├── index.ts
│ ├── tabs
│ ├── __tests__
│ │ └── .gitkeep
│ ├── ng-package.json
│ ├── src
│ │ └── utils.ts
│ └── index.ts
│ ├── arrow
│ ├── README.md
│ ├── index.ts
│ ├── ng-package.json
│ └── src
│ │ └── arrow.ts
│ ├── label
│ ├── README.md
│ ├── index.ts
│ └── ng-package.json
│ ├── menu
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── menu-label.directive.ts
│ │ ├── menu-directive.ts
│ │ ├── menu-radio-group.directive.ts
│ │ ├── menu-separator.directive.ts
│ │ ├── menu-group.directive.ts
│ │ ├── menu-content.directive.ts
│ │ └── utils.ts
│ ├── radio
│ ├── README.md
│ ├── ng-package.json
│ ├── index.ts
│ └── src
│ │ ├── radio-tokens.ts
│ │ └── radio-indicator.directive.ts
│ ├── avatar
│ ├── README.md
│ ├── ng-package.json
│ ├── src
│ │ ├── types.ts
│ │ ├── avatar-context.token.ts
│ │ └── avatar-root.directive.ts
│ └── index.ts
│ ├── cropper
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── cropper-crop-area.directive.ts
│ │ ├── cropper-description.directive.ts
│ │ └── cropper-context.token.ts
│ ├── dialog
│ ├── README.md
│ ├── ng-package.json
│ ├── src
│ │ ├── dialog-title.directive.ts
│ │ ├── dialog-description.directive.ts
│ │ ├── dialog-close.directive.ts
│ │ ├── dialog-dismiss.directive.ts
│ │ └── dialog.injectors.ts
│ └── stories
│ │ └── sheet.docs.mdx
│ ├── menubar
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── menubar-radio-group.directive.ts
│ │ ├── menubar-group.directive.ts
│ │ ├── menubar-content.directive.ts
│ │ ├── menubar-separator.directive.ts
│ │ ├── menubar-item-indicator.directive.ts
│ │ ├── menubar-root.directive.ts
│ │ ├── menubar-item-radio.directive.ts
│ │ ├── menubar-item.directive.ts
│ │ ├── menubar-item-checkbox.directive.ts
│ │ └── menubar-trigger.directive.ts
│ ├── portal
│ ├── README.md
│ ├── index.ts
│ └── ng-package.json
│ ├── select
│ ├── README.md
│ ├── ng-package.json
│ ├── src
│ │ ├── select-label.directive.ts
│ │ ├── select-group.directive.ts
│ │ ├── select-icon.directive.ts
│ │ ├── select-separator.directive.ts
│ │ ├── select-item-indicator.directive.ts
│ │ └── select-value.directive.ts
│ └── __tests__
│ │ ├── select.directive.spec.ts
│ │ ├── select-item.directive.spec.ts
│ │ ├── select-content.directive.spec.ts
│ │ └── select-trigger.directive.spec.ts
│ ├── slider
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── slider-thumb.component.ts
│ │ ├── slider-track.component.ts
│ │ └── slider-orientation-context.service.ts
│ ├── stepper
│ ├── README.md
│ ├── src
│ │ ├── types.ts
│ │ ├── stepper-indicator.directive.ts
│ │ ├── stepper-title.directive.ts
│ │ ├── stepper-description.directive.ts
│ │ └── stepper-item-context.token.ts
│ └── ng-package.json
│ ├── switch
│ ├── README.md
│ ├── ng-package.json
│ ├── src
│ │ └── switch-thumb.directive.ts
│ └── index.ts
│ ├── accordion
│ ├── README.md
│ ├── ng-package.json
│ ├── __tests__
│ │ ├── accordion-item.directive.spec.ts
│ │ ├── accordion-root.directive.spec.ts
│ │ ├── accordion-header.directive.spec.ts
│ │ ├── accordion-content.directive.spec.ts
│ │ └── accordion-trigger.directive.spec.ts
│ └── src
│ │ ├── accordion-content-presence.directive.ts
│ │ └── accordion-header.directive.ts
│ ├── aspect-ratio
│ ├── README.md
│ ├── index.ts
│ ├── ng-package.json
│ └── stories
│ │ └── aspect-ratio.docs.mdx
│ ├── calendar
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── calendar-header.directive.ts
│ │ ├── calendar-grid-row.directive.ts
│ │ ├── calendar-head-cell.directive.ts
│ │ ├── calendar-grid-body.directive.ts
│ │ ├── calendar-grid-head.directive.ts
│ │ ├── calendar-heading.directive.ts
│ │ └── calendar-grid.directive.ts
│ ├── checkbox
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── checkbox-indicator.ts
│ │ └── checkbox-indicator-presence.ts
│ ├── collection
│ ├── README.md
│ ├── ng-package.json
│ ├── index.ts
│ └── src
│ │ ├── collection-context.ts
│ │ └── collection-provider.ts
│ ├── date-field
│ ├── README.md
│ ├── ng-package.json
│ └── index.ts
│ ├── editable
│ ├── README.md
│ ├── index.ts
│ ├── ng-package.json
│ ├── src
│ │ ├── editable-submit-trigger.ts
│ │ ├── editable-edit-trigger.ts
│ │ └── editable-cancel-trigger.ts
│ └── stories
│ │ └── editable.stories.ts
│ ├── pagination
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── pagination-ellipsis.directive.ts
│ │ ├── pagination-context.token.ts
│ │ ├── pagination-first.directive.ts
│ │ ├── pagination-list.directive.ts
│ │ ├── pagination-prev.directive.ts
│ │ └── pagination-last.directive.ts
│ ├── time-field
│ ├── README.md
│ ├── ng-package.json
│ └── index.ts
│ ├── alert-dialog
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── alert-dialog-title.directive.ts
│ │ ├── alert-dialog-cancel.directive.ts
│ │ ├── alert-dialog-trigger.directive.ts
│ │ ├── alert-dialog-root.directive.ts
│ │ └── alert-dialog-content.directive.ts
│ ├── collapsible
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── collapsible-content-presence.directive.ts
│ │ └── collapsible-trigger.directive.ts
│ ├── context-menu
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── context-menu-label.directive.ts
│ │ ├── context-menu-separator.directive.ts
│ │ ├── context-menu-item-indicator.directive.ts
│ │ └── context-menu-item-selectable.ts
│ ├── focus-guards
│ ├── README.md
│ ├── index.ts
│ └── ng-package.json
│ ├── focus-scope
│ ├── README.md
│ ├── index.ts
│ ├── ng-package.json
│ └── stories
│ │ └── focus-scope.docs.mdx
│ ├── number-field
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ └── types.ts
│ ├── dropdown-menu
│ ├── README.md
│ ├── ng-package.json
│ └── src
│ │ ├── dropdown-menu-label.directive.ts
│ │ ├── dropdown-menu-separator.directive.ts
│ │ ├── dropdown-menu-item-indicator.directive.ts
│ │ └── dropdown-menu-item-selectable.ts
│ ├── separator
│ ├── index.ts
│ ├── ng-package.json
│ └── README.md
│ ├── dismissable-layer
│ ├── README.md
│ ├── ng-package.json
│ └── index.ts
│ ├── config
│ ├── index.ts
│ └── ng-package.json
│ ├── core
│ ├── ng-package.json
│ └── src
│ │ ├── is-number.ts
│ │ ├── is-nullish.ts
│ │ ├── document.ts
│ │ ├── is-client.ts
│ │ ├── is-inside-form.ts
│ │ ├── date-time
│ │ └── index.ts
│ │ ├── focus-initial.directive.ts
│ │ ├── getActiveElement.ts
│ │ ├── is-equal.ts
│ │ ├── window.ts
│ │ ├── chunk.ts
│ │ ├── accessor
│ │ └── provide-value-accessor.ts
│ │ └── mount.ts
│ ├── popover
│ ├── ng-package.json
│ ├── src
│ │ ├── utils
│ │ │ ├── constants.ts
│ │ │ └── types.ts
│ │ ├── popover-arrow.token.ts
│ │ ├── popover-close.token.ts
│ │ ├── popover-anchor.token.ts
│ │ ├── popover-content-attributes.token.ts
│ │ ├── popover.types.ts
│ │ └── popover-root.inject.ts
│ ├── README.md
│ └── stories
│ │ └── utils
│ │ └── constants.ts
│ ├── popper
│ ├── ng-package.json
│ ├── README.md
│ ├── src
│ │ ├── popper-anchor.ts
│ │ └── popper.ts
│ ├── stories
│ │ └── popper.docs.mdx
│ └── index.ts
│ ├── toggle
│ ├── ng-package.json
│ ├── README.md
│ ├── index.ts
│ └── src
│ │ └── toggle-visually-hidden-input.directive.ts
│ ├── toolbar
│ ├── ng-package.json
│ ├── README.md
│ ├── src
│ │ ├── toolbar-separator.directive.ts
│ │ ├── toolbar-toggle-item.directive.ts
│ │ ├── toolbar-toggle-group.directive.ts
│ │ ├── toolbar-link.directive.ts
│ │ ├── toolbar-root.token.ts
│ │ └── toolbar-root.directive.ts
│ └── stories
│ │ └── toolbar.docs.mdx
│ ├── tooltip
│ ├── ng-package.json
│ ├── src
│ │ ├── utils
│ │ │ ├── constants.ts
│ │ │ └── types.ts
│ │ ├── tooltip-arrow.token.ts
│ │ ├── tooltip-close.token.ts
│ │ ├── tooltip-anchor.token.ts
│ │ ├── tooltip-content-attributes.token.ts
│ │ ├── tooltip.types.ts
│ │ └── tooltip-root.inject.ts
│ ├── README.md
│ └── stories
│ │ └── utils
│ │ └── constants.ts
│ ├── hover-card
│ ├── ng-package.json
│ ├── src
│ │ ├── utils
│ │ │ ├── constants.ts
│ │ │ └── types.ts
│ │ ├── hover-card-arrow.token.ts
│ │ ├── hover-card-close.token.ts
│ │ ├── hover-card-anchor.token.ts
│ │ ├── hover-card-content-attributes.token.ts
│ │ ├── hover-card.types.ts
│ │ └── hover-card-root.inject.ts
│ ├── README.md
│ └── stories
│ │ └── utils
│ │ └── constants.ts
│ ├── presence
│ ├── ng-package.json
│ ├── index.ts
│ └── src
│ │ ├── types.ts
│ │ └── transitions
│ │ └── transition.toast.ts
│ ├── progress
│ ├── ng-package.json
│ ├── README.md
│ └── index.ts
│ ├── roving-focus
│ ├── ng-package.json
│ ├── README.md
│ └── index.ts
│ ├── toggle-group
│ ├── ng-package.json
│ ├── README.md
│ ├── index.ts
│ └── src
│ │ ├── toggle-group-item.token.ts
│ │ └── toggle-group.token.ts
│ ├── tooltip2
│ ├── ng-package.json
│ ├── README.md
│ └── src
│ │ ├── tooltip-portal.ts
│ │ ├── tooltip-content.ts
│ │ ├── tooltip-arrow.ts
│ │ └── tooltip-portal-presence.ts
│ ├── navigation-menu
│ ├── ng-package.json
│ ├── README.md
│ └── src
│ │ └── navigation-menu.types.ts
│ ├── visually-hidden
│ ├── ng-package.json
│ ├── README.md
│ └── index.ts
│ ├── tsconfig.doc.json
│ ├── ng-package.json
│ ├── test-setup.ts
│ ├── tsconfig.lib.prod.json
│ ├── schematics
│ └── collection.json
│ ├── tsconfig.spec.json
│ ├── tsconfig.schematics.json
│ ├── README.md
│ ├── tsconfig.typedoc.json
│ ├── tsconfig.lib.json
│ └── jest.config.ts
├── .vscode
├── mcp.json
├── settings.json
└── extensions.json
├── .postcssrc.json
├── .gitattributes
├── pnpm-workspace.yaml
├── jest.preset.cjs
├── project.json
├── apps
├── radix-docs
│ ├── public
│ │ └── robots.txt
│ ├── src
│ │ ├── components
│ │ │ ├── mdx
│ │ │ │ ├── Description.astro
│ │ │ │ ├── li.astro
│ │ │ │ ├── ol.astro
│ │ │ │ ├── ul.astro
│ │ │ │ ├── p.astro
│ │ │ │ ├── h1.astro
│ │ │ │ ├── h3.astro
│ │ │ │ ├── code.astro
│ │ │ │ ├── h2.astro
│ │ │ │ ├── Tabs.astro
│ │ │ │ ├── FeatureList.astro
│ │ │ │ ├── TabsList.astro
│ │ │ │ ├── a.astro
│ │ │ │ ├── TabsContent.astro
│ │ │ │ └── TabsTrigger.astro
│ │ │ ├── code-editor
│ │ │ │ ├── types.ts
│ │ │ │ └── example-app
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── index-html.ts
│ │ │ │ │ ├── main.ts
│ │ │ │ │ └── styles-css.ts
│ │ │ ├── tabs
│ │ │ │ ├── index.ts
│ │ │ │ ├── TabsList.astro
│ │ │ │ ├── TabsContent.astro
│ │ │ │ ├── TabsTrigger.astro
│ │ │ │ └── Tabs.astro
│ │ │ ├── theme
│ │ │ │ └── theme-head-script.astro
│ │ │ ├── layouts
│ │ │ │ ├── Announcement.astro
│ │ │ │ ├── DemoNoopContainer.astro
│ │ │ │ └── TocHeading.astro
│ │ │ └── demo-component-preview
│ │ │ │ └── ComponentThemesPreview.astro
│ │ ├── entrypoints
│ │ │ └── alpine.ts
│ │ ├── demos
│ │ │ ├── primitives
│ │ │ │ ├── dropdown-menu
│ │ │ │ │ └── attrs.ts
│ │ │ │ ├── aspect-ratio
│ │ │ │ │ └── aspect-ratio-demo.css
│ │ │ │ ├── progress
│ │ │ │ │ ├── attrs.ts
│ │ │ │ │ └── progress-demo.css
│ │ │ │ ├── separator
│ │ │ │ │ └── separator-demo.css
│ │ │ │ ├── collapsible
│ │ │ │ │ └── attrs.ts
│ │ │ │ ├── label
│ │ │ │ │ ├── label-demo.ts
│ │ │ │ │ └── label-demo.css
│ │ │ │ ├── toggle
│ │ │ │ │ ├── toggle-demo.ts
│ │ │ │ │ └── toggle-demo.css
│ │ │ │ ├── slider
│ │ │ │ │ └── slider-demo.ts
│ │ │ │ └── avatar
│ │ │ │ │ └── avatar-demo.css
│ │ │ └── components
│ │ │ │ ├── kbd
│ │ │ │ └── kbd-demo.ts
│ │ │ │ ├── code
│ │ │ │ ├── code-demo.ts
│ │ │ │ └── code-variants-demo.ts
│ │ │ │ ├── switch
│ │ │ │ ├── switch-demo.ts
│ │ │ │ ├── switch-sizes-demo.ts
│ │ │ │ └── switch-radius-demo.ts
│ │ │ │ └── avatar
│ │ │ │ ├── avatar-variant-demo.ts
│ │ │ │ └── avatar-radius-demo.ts
│ │ ├── contributor-names.json
│ │ ├── config
│ │ │ └── site-config.ts
│ │ ├── pages
│ │ │ ├── robots.txt.ts
│ │ │ └── llms.txt.ts
│ │ ├── utils
│ │ │ ├── typedoc.ts
│ │ │ └── index.ts
│ │ ├── env.d.ts
│ │ ├── content
│ │ │ ├── config.ts
│ │ │ ├── themes
│ │ │ │ ├── typography
│ │ │ │ │ └── kbd.mdx
│ │ │ │ ├── utilities
│ │ │ │ │ └── theme.mdx
│ │ │ │ ├── components
│ │ │ │ │ └── switch.mdx
│ │ │ │ └── theme
│ │ │ │ │ └── overview.mdx
│ │ │ └── primitives
│ │ │ │ └── components
│ │ │ │ ├── separator.mdx
│ │ │ │ ├── aspect-ratio.mdx
│ │ │ │ └── select.mdx
│ │ ├── contributors.ts
│ │ └── types
│ │ │ └── index.ts
│ ├── .gitignore
│ ├── README.md
│ ├── tsconfig.json
│ └── plugins
│ │ └── unist.ts
├── radix-storybook
│ └── .storybook
│ │ ├── manager.tsx
│ │ ├── main.css
│ │ ├── plugins
│ │ └── compodoc.ts
│ │ ├── tsconfig.json
│ │ └── themes.ts
└── radix-ssr-testing
│ ├── public
│ └── favicon.ico
│ ├── tsconfig.editor.json
│ ├── src
│ ├── main.ts
│ ├── app
│ │ ├── app.ts
│ │ ├── app.routes.server.ts
│ │ ├── components
│ │ │ ├── label
│ │ │ │ └── page.ts
│ │ │ ├── switch
│ │ │ │ └── page.ts
│ │ │ ├── separator
│ │ │ │ └── page.ts
│ │ │ ├── avatar
│ │ │ │ └── page.ts
│ │ │ └── toggle-group
│ │ │ │ └── page.ts
│ │ ├── app.config.server.ts
│ │ └── app.config.ts
│ ├── main.server.ts
│ ├── test-setup.ts
│ └── index.html
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ ├── .eslintrc.json
│ └── jest.config.ts
├── jest.config.ts
├── .eslintignore
├── tsconfig.eslint.json
├── tools
└── scripts
│ ├── api-doc
│ ├── utility
│ │ ├── index.mjs
│ │ └── get-types.mjs
│ └── constants.mjs
│ ├── tsconfig.json
│ └── docs-copy.mjs
├── .lintstagedrc.cjs
├── SECURITY.md
├── .prettierignore
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── Documentation.md
│ ├── Question.md
│ └── Feature_request.md
├── PULL_REQUEST_TEMPLATE.md
├── workflows
│ ├── pr-commitlint.yml
│ ├── chromatic.yml
│ └── algolia-docsearch-crawler.yml
├── actions
│ └── setup
│ │ └── action.yml
└── DISCUSSION_TEMPLATE
│ └── example-request.yml
└── .editorconfig
/.nvmrc:
--------------------------------------------------------------------------------
1 | 20.19
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | pnpm lint-staged
2 |
--------------------------------------------------------------------------------
/.stylelintignore:
--------------------------------------------------------------------------------
1 | dist
2 | node_modules
3 |
--------------------------------------------------------------------------------
/packages/components/index.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/packages/primitives/form-field/src/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/primitives/index.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/packages/primitives/tabs/__tests__/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | pnpm commitlint --edit $1
2 |
--------------------------------------------------------------------------------
/.vscode/mcp.json:
--------------------------------------------------------------------------------
1 | {
2 | "servers": {}
3 | }
4 |
--------------------------------------------------------------------------------
/packages/components/README.md:
--------------------------------------------------------------------------------
1 | # RadixNG Components
2 |
--------------------------------------------------------------------------------
/packages/primitives/arrow/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/arrow
2 |
--------------------------------------------------------------------------------
/packages/primitives/arrow/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/arrow';
2 |
--------------------------------------------------------------------------------
/packages/primitives/label/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/label
2 |
--------------------------------------------------------------------------------
/packages/primitives/menu/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/menu
2 |
--------------------------------------------------------------------------------
/packages/primitives/radio/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/radio
2 |
--------------------------------------------------------------------------------
/packages/components/avatar/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/avatar';
2 |
--------------------------------------------------------------------------------
/packages/components/kbd/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/kbd.component';
2 |
--------------------------------------------------------------------------------
/packages/components/switch/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/switch';
2 |
--------------------------------------------------------------------------------
/packages/primitives/avatar/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/avatar
2 |
--------------------------------------------------------------------------------
/packages/primitives/cropper/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/cropper
2 |
--------------------------------------------------------------------------------
/packages/primitives/dialog/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/dialog
2 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/menubar
2 |
--------------------------------------------------------------------------------
/packages/primitives/portal/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/portal
2 |
--------------------------------------------------------------------------------
/packages/primitives/portal/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/portal';
2 |
--------------------------------------------------------------------------------
/packages/primitives/select/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/select
2 |
--------------------------------------------------------------------------------
/packages/primitives/slider/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/slider
2 |
--------------------------------------------------------------------------------
/packages/primitives/stepper/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/stepper
2 |
--------------------------------------------------------------------------------
/packages/primitives/switch/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/switch
2 |
--------------------------------------------------------------------------------
/packages/components/code/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/code.component';
2 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/accordion
2 |
--------------------------------------------------------------------------------
/packages/primitives/aspect-ratio/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/avatar
2 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/calendar
2 |
--------------------------------------------------------------------------------
/packages/primitives/checkbox/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/checkbox
2 |
--------------------------------------------------------------------------------
/packages/primitives/collection/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/collection
2 |
--------------------------------------------------------------------------------
/packages/primitives/date-field/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/date-field
2 |
--------------------------------------------------------------------------------
/packages/primitives/editable/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/editable
2 |
--------------------------------------------------------------------------------
/packages/primitives/editable/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/editable-root';
2 |
--------------------------------------------------------------------------------
/packages/primitives/label/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/label.directive';
2 |
--------------------------------------------------------------------------------
/packages/primitives/pagination/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/pagination
2 |
--------------------------------------------------------------------------------
/packages/primitives/time-field/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/time-field
2 |
--------------------------------------------------------------------------------
/packages/primitives/alert-dialog/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/alert-dialog
2 |
--------------------------------------------------------------------------------
/packages/primitives/collapsible/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/collapsible
2 |
--------------------------------------------------------------------------------
/packages/primitives/context-menu/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/context-menu
2 |
--------------------------------------------------------------------------------
/packages/primitives/focus-guards/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/focus-guards
2 |
--------------------------------------------------------------------------------
/packages/primitives/focus-guards/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/focus-guards';
2 |
--------------------------------------------------------------------------------
/packages/primitives/focus-scope/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/focus-scope
2 |
--------------------------------------------------------------------------------
/packages/primitives/focus-scope/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/focus-scope';
2 |
--------------------------------------------------------------------------------
/packages/primitives/number-field/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/number-field
2 |
--------------------------------------------------------------------------------
/packages/primitives/dropdown-menu/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/dropdown-menu
2 |
--------------------------------------------------------------------------------
/packages/primitives/separator/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/separator.directive';
2 |
--------------------------------------------------------------------------------
/packages/primitives/aspect-ratio/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/aspect-ratio.directive';
2 |
--------------------------------------------------------------------------------
/packages/primitives/dismissable-layer/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/dismissable-layer
2 |
--------------------------------------------------------------------------------
/.postcssrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": {
3 | "@tailwindcss/postcss": {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set the default behavior, in case people don't have core.autocrlf set.
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/packages/primitives/stepper/src/types.ts:
--------------------------------------------------------------------------------
1 | export type StepperState = 'completed' | 'active' | 'inactive';
2 |
--------------------------------------------------------------------------------
/packages/primitives/config/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/config';
2 | export * from './src/config.provider';
3 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - "apps/radix-docs/**"
3 | - "packages/**"
4 | - "!**/dist/**"
5 |
--------------------------------------------------------------------------------
/jest.preset.cjs:
--------------------------------------------------------------------------------
1 | const nxPreset = require('@nx/jest/preset').default;
2 |
3 | module.exports = { ...nxPreset };
4 |
--------------------------------------------------------------------------------
/packages/components/avatar/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/components/code/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/components/kbd/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/components/switch/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/components/theme/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/theme.directive';
2 | export * from './src/theme.service';
3 |
--------------------------------------------------------------------------------
/packages/components/theme/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/components/types/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/arrow/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/avatar/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/config/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/core/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/is-number.ts:
--------------------------------------------------------------------------------
1 | export const isNumber = (v: any): v is number => typeof v === 'number';
2 |
--------------------------------------------------------------------------------
/packages/primitives/cropper/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/dialog/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/label/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/menu/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/popover/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/popper/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/portal/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/radio/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/select/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/slider/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/stepper/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/switch/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/tabs/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/toggle/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/toolbar/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "radix-ng",
3 | "$schema": "node_modules/nx/schemas/project-schema.json"
4 | }
5 |
--------------------------------------------------------------------------------
/apps/radix-docs/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Allow: /
3 |
4 | Sitemap: https://radix-ng.com/sitemap-index.xml
5 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/alert-dialog/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/aspect-ratio/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/checkbox/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/collapsible/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/collection/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/context-menu/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/date-field/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/editable/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/focus-guards/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/focus-scope/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/number-field/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/pagination/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/presence/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/progress/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/roving-focus/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/separator/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/time-field/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/toggle-group/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip2/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/radix-storybook/.storybook/manager.tsx:
--------------------------------------------------------------------------------
1 | import { addons } from 'storybook/manager-api';
2 |
3 | addons.setConfig({});
4 |
--------------------------------------------------------------------------------
/packages/primitives/dismissable-layer/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/dropdown-menu/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/navigation-menu/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/visually-hidden/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const RdxCdkEventServiceWindowKey = Symbol('__RdxCdkEventService__');
2 |
--------------------------------------------------------------------------------
/packages/primitives/progress/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/progress
2 |
3 | Secondary entry point of `@radix-ng/primitives`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/src/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const RdxCdkEventServiceWindowKey = Symbol('__RdxCdkEventService__');
2 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radix-ng/primitives/HEAD/apps/radix-ssr-testing/public/favicon.ico
--------------------------------------------------------------------------------
/packages/primitives/hover-card/src/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const RdxCdkEventServiceWindowKey = Symbol('__RdxCdkEventService__');
2 |
--------------------------------------------------------------------------------
/packages/primitives/separator/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/separator
2 |
3 | Secondary entry point of `@radix-ng/primitives`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/toggle/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/toggle
2 |
3 | Secondary entry point of `@radix-ng/primitives/toggle`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/toolbar/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/toolbar
2 |
3 | Secondary entry point of `@radix-ng/primitives/toolbar`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/roving-focus/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/roving-focus
2 |
3 | Secondary entry point of `@radix-ng/primitives`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/number-field/src/types.ts:
--------------------------------------------------------------------------------
1 | export type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
2 |
--------------------------------------------------------------------------------
/packages/primitives/toggle-group/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/toggle-group
2 |
3 | Secondary entry point of `@radix-ng/primitives/toggle-group`.
4 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/Description.astro:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/jest.config.ts:
--------------------------------------------------------------------------------
1 | import { getJestProjectsAsync } from '@nx/jest';
2 |
3 | export default async () => ({
4 | projects: await getJestProjectsAsync()
5 | });
6 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/is-nullish.ts:
--------------------------------------------------------------------------------
1 | export function isNullish(value: any): value is null | undefined {
2 | return value === null || value === undefined;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/document.ts:
--------------------------------------------------------------------------------
1 | import { DOCUMENT, inject } from '@angular/core';
2 |
3 | export function injectDocument(): Document {
4 | return inject(DOCUMENT);
5 | }
6 |
--------------------------------------------------------------------------------
/packages/components/.storybook/manager.ts:
--------------------------------------------------------------------------------
1 | import { addons } from 'storybook/manager-api';
2 | import rdxTheme from './rdxTheme';
3 |
4 | addons.setConfig({
5 | theme: rdxTheme
6 | });
7 |
--------------------------------------------------------------------------------
/packages/primitives/popper/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/popper
2 |
3 | Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/popper`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/popover/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/popover
2 |
3 | Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/popover`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/tooltip
2 |
3 | Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/tooltip`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip2/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/tooltip2
2 |
3 | Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/tooltip2`.
4 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.defaultFormatter": "esbenp.prettier-vscode",
3 | "css.validate": false,
4 | "scss.validate": false,
5 | "stylelint.validate": ["css", "scss"]
6 | }
7 |
--------------------------------------------------------------------------------
/packages/components/tsconfig.doc.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["**/*.ts"],
3 | "exclude": ["**/*.spec.ts", "test-setup.ts", "jest.config.ts", "**/*.test.ts", "**/*.stories.ts", "**/*.stories.js"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/hover-card
2 |
3 | Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/hover-card`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/menu-label.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[RdxMenuLabel]'
5 | })
6 | export class RdxMenuLabelDirective {}
7 |
--------------------------------------------------------------------------------
/packages/primitives/tsconfig.doc.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["**/*.ts"],
3 | "exclude": ["**/*.spec.ts", "test-setup.ts", "jest.config.ts", "**/*.test.ts", "**/*.stories.ts", "**/*.stories.js"]
4 | }
5 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist
2 | node_modules
3 | .angular
4 | .nx
5 | .vercel
6 | tmp
7 |
8 | # eslint ignores root level "dot" files by default
9 | !/.*.cjs
10 |
11 | # ignore index.html
12 | **/index.html
13 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/code-editor/types.ts:
--------------------------------------------------------------------------------
1 | export type Props = {
2 | code?: string;
3 | css?: string;
4 | title?: string;
5 | description?: string;
6 | selector?: string;
7 | };
8 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/entrypoints/alpine.ts:
--------------------------------------------------------------------------------
1 | import focus from '@alpinejs/focus';
2 | import type { Alpine } from 'alpinejs';
3 |
4 | export default (Alpine: Alpine): void => {
5 | Alpine.plugin(focus);
6 | };
7 |
--------------------------------------------------------------------------------
/packages/primitives/collection/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/collection-context';
2 | export * from './src/collection-item';
3 | export * from './src/collection-provider';
4 | export * from './src/use-collection';
5 |
--------------------------------------------------------------------------------
/packages/primitives/visually-hidden/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/visually-hidden
2 |
3 | Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/visually-hidden`.
4 |
--------------------------------------------------------------------------------
/packages/primitives/visually-hidden/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/visually-hidden-input-bubble.directive';
2 | export * from './src/visually-hidden-input.directive';
3 | export * from './src/visually-hidden.directive';
4 |
--------------------------------------------------------------------------------
/tsconfig.eslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.base.json",
3 | "compilerOptions": {
4 | "noEmit": true,
5 | "incremental": true
6 | },
7 | "include": ["**/*.ts", "**/*.html"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/components/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3 | "dest": "../../dist/components",
4 | "lib": {
5 | "entryFile": "index.ts"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/src/calendar-header.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: 'div[rdxCalendarHeader]'
5 | })
6 | export class RdxCalendarHeaderDirective {}
7 |
--------------------------------------------------------------------------------
/packages/primitives/dismissable-layer/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/dismissable-layer';
2 | export * from './src/dismissable-layer-branch';
3 | export * from './src/dismissable-layer.config';
4 | export * from './src/utils';
5 |
--------------------------------------------------------------------------------
/packages/primitives/toggle/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/toggle-visually-hidden-input.directive';
2 | export * from './src/toggle.directive';
3 |
4 | export type { DataState, ToggleProps } from './src/toggle.directive';
5 |
--------------------------------------------------------------------------------
/tools/scripts/api-doc/utility/index.mjs:
--------------------------------------------------------------------------------
1 | export * from './get-emits.mjs';
2 | export * from './get-events.mjs';
3 | export * from './get-methods.mjs';
4 | export * from './get-props.mjs';
5 | export * from './get-types.mjs';
6 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/demos/primitives/dropdown-menu/attrs.ts:
--------------------------------------------------------------------------------
1 | export const attrDataTrigger = [
2 | { name: '[data-state]', value: '"open" | "closed"' },
3 | { name: '[data-disabled]', value: 'Present when disabled' }
4 | ];
5 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/src/calendar-grid-row.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: 'tr[rdxCalendarGridRow]'
5 | })
6 | export class RdxCalendarGridRowDirective {}
7 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/src/calendar-head-cell.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: 'th[rdxCalendarHeadCell]'
5 | })
6 | export class RdxCalendarHeadCellDirective {}
7 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/is-client.ts:
--------------------------------------------------------------------------------
1 | import { Platform } from '@angular/cdk/platform';
2 | import { inject } from '@angular/core';
3 |
4 | export function injectIsClient() {
5 | return inject(Platform).isBrowser;
6 | }
7 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/tsconfig.editor.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": ["src/**/*.ts"],
4 | "compilerOptions": {},
5 | "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
6 | }
7 |
--------------------------------------------------------------------------------
/packages/components/theme/README.md:
--------------------------------------------------------------------------------
1 | ```angular2html
2 |
3 |
4 |
5 | ```
6 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/src/calendar-grid-body.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: 'tbody[rdxCalendarGridBody]'
5 | })
6 | export class RdxCalendarGridBodyDirective {}
7 |
--------------------------------------------------------------------------------
/packages/primitives/dialog/src/dialog-title.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxDialogTitle]',
5 | standalone: true
6 | })
7 | export class RdxDialogTitleDirective {}
8 |
--------------------------------------------------------------------------------
/packages/primitives/radio/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/radio-root.directive';
2 |
3 | export * from './src/radio-indicator.directive';
4 | export * from './src/radio-item-input.directive';
5 | export * from './src/radio-item.directive';
6 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/li.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.lintstagedrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '*.{css,scss,md,mdx,yml,json,js,cjs,mjs,html,ts,astro}': 'prettier --write',
3 | '*.{css,scss}': 'stylelint --max-warnings=0 --fix',
4 | '*.{js,cjs,mjs,ts,html}': 'eslint --max-warnings=0 --fix'
5 | };
6 |
--------------------------------------------------------------------------------
/packages/primitives/dialog/src/dialog-description.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxDialogDescription]',
5 | standalone: true
6 | })
7 | export class RdxDialogDescriptionDirective {}
8 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/ol.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/ul.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
10 |
--------------------------------------------------------------------------------
/packages/primitives/alert-dialog/src/alert-dialog-title.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxAlertDialogTitle]',
5 | standalone: true
6 | })
7 | export class RdxAlertDialogTitleDirective {}
8 |
--------------------------------------------------------------------------------
/packages/primitives/context-menu/src/context-menu-label.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxContextMenuLabel]',
5 | standalone: true
6 | })
7 | export class RdxContextMenuLabelDirective {}
8 |
--------------------------------------------------------------------------------
/packages/primitives/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3 | "dest": "../../dist/primitives",
4 | "lib": {
5 | "entryFile": "index.ts"
6 | },
7 | "allowedNonPeerDependencies": []
8 | }
9 |
--------------------------------------------------------------------------------
/packages/primitives/presence/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/presence';
2 | export * from './src/presence.directive';
3 | export * from './src/transitions/transition.collapse';
4 | export * from './src/transitions/transition.toast';
5 | export * from './src/types';
6 |
--------------------------------------------------------------------------------
/packages/primitives/test-setup.ts:
--------------------------------------------------------------------------------
1 | import '@testing-library/jest-dom';
2 | import { toHaveNoViolations } from 'jest-axe';
3 | import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
4 |
5 | setupZoneTestEnv();
6 | expect.extend(toHaveNoViolations);
7 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/main.ts:
--------------------------------------------------------------------------------
1 | import { bootstrapApplication } from '@angular/platform-browser';
2 | import { App } from './app/app';
3 | import { appConfig } from './app/app.config';
4 |
5 | bootstrapApplication(App, appConfig).catch((err) => console.error(err));
6 |
--------------------------------------------------------------------------------
/packages/components/tsconfig.lib.prod.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.lib.json",
3 | "compilerOptions": {
4 | "declarationMap": false
5 | },
6 | "angularCompilerOptions": {
7 | "compilationMode": "partial"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/primitives/navigation-menu/README.md:
--------------------------------------------------------------------------------
1 | # @radix-ng/primitives/navigation-menu
2 |
3 | A responsive navigation component that automatically collapses navigation items into a menu when space is limited. Follows the WAI-ARIA Menu Button Pattern for accessibility.
4 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/p.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/primitives/select/src/select-label.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxSelectLabel]',
5 | standalone: true,
6 | exportAs: 'rdxSelectLabel'
7 | })
8 | export class RdxSelectLabelDirective {}
9 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | The versions of the project that are currently supported with security updates.
6 |
7 | | Version | Supported |
8 | | ------- | ------------------ |
9 | | < 1.0 | :white_check_mark: |
10 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | .angular
2 | .husky
3 | .nx
4 | .vercel
5 | .astro
6 |
7 | /node_modules
8 | /dist
9 | /coverage
10 | /tmp
11 |
12 | CHANGELOG.md
13 |
14 | apps/radix-docs/src/styles/*.css
15 |
16 | *.d.ts
17 | *.mdx
18 |
19 | pnpm-lock.yaml
20 | pnpm-workspace.yaml
21 |
--------------------------------------------------------------------------------
/packages/components/.storybook/rdxTheme.ts:
--------------------------------------------------------------------------------
1 | import { create } from 'storybook/theming/create';
2 |
3 | export default create({
4 | base: 'light',
5 | brandTitle: 'Radix Angular',
6 | brandUrl: 'https://github.com/radix-ng/primitives',
7 | brandTarget: '_self'
8 | });
9 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/tabs/index.ts:
--------------------------------------------------------------------------------
1 | import Tabs from './Tabs.astro';
2 | import TabsContent from './TabsContent.astro';
3 | import TabsList from './TabsList.astro';
4 | import TabsTrigger from './TabsTrigger.astro';
5 |
6 | export { Tabs, TabsContent, TabsList, TabsTrigger };
7 |
--------------------------------------------------------------------------------
/apps/radix-storybook/.storybook/main.css:
--------------------------------------------------------------------------------
1 | @import './tailwind.css';
2 | @import './fonts.css';
3 |
4 | @import './slider.css';
5 |
6 | @import '../../../packages/primitives/dialog/stories/sheet/sheet.styles.css';
7 | @import '../../../packages/primitives/checkbox/stories/checkbox.css';
8 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/menu-directive.ts:
--------------------------------------------------------------------------------
1 | import { CdkMenu } from '@angular/cdk/menu';
2 | import { Directive } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[RdxMenuRoot],[RdxMenuSub]',
6 | hostDirectives: [CdkMenu]
7 | })
8 | export class RdxMenuDirective {}
9 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Add the following users as reviewers on new pull requests
2 |
3 | * @pimenovoleg @artembelik
4 |
5 | /packages/primitives/hover-card/ @pawel-twardziak
6 | /packages/primitives/popover/ @pawel-twardziak
7 | /packages/primitives/tooltip/ @pawel-twardziak
8 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/code-editor/example-app/index.ts:
--------------------------------------------------------------------------------
1 | export * from './angular-json';
2 | export * from './dependencies';
3 | export * from './fonts-css';
4 | export * from './index-html';
5 | export * from './main';
6 | export * from './styles-css';
7 | export * from './tsconfig';
8 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/h1.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
10 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/h3.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/popover-arrow.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxPopoverArrowDirective } from './popover-arrow.directive';
3 |
4 | export const RdxPopoverArrowToken = new InjectionToken('RdxPopoverArrowToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/popover-close.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxPopoverCloseDirective } from './popover-close.directive';
3 |
4 | export const RdxPopoverCloseToken = new InjectionToken('RdxPopoverCloseToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/popper/src/popper-anchor.ts:
--------------------------------------------------------------------------------
1 | import { Directive, ElementRef, inject } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxPopperAnchor]'
5 | })
6 | export class RdxPopperAnchor {
7 | readonly elementRef = inject>(ElementRef);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/primitives/tabs/src/utils.ts:
--------------------------------------------------------------------------------
1 | export function makeTriggerId(baseId: string, value: string | number) {
2 | return `${baseId}-trigger-${value}`;
3 | }
4 |
5 | export function makeContentId(baseId: string, value: string | number) {
6 | return `${baseId}-content-${value}`;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/src/tooltip-arrow.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxTooltipArrowDirective } from './tooltip-arrow.directive';
3 |
4 | export const RdxTooltipArrowToken = new InjectionToken('RdxTooltipArrowToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/src/tooltip-close.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxTooltipCloseDirective } from './tooltip-close.directive';
3 |
4 | export const RdxTooltipCloseToken = new InjectionToken('RdxTooltipCloseToken');
5 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/code.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/popover-anchor.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxPopoverAnchorDirective } from './popover-anchor.directive';
3 |
4 | export const RdxPopoverAnchorToken = new InjectionToken('RdxPopoverAnchorToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/src/tooltip-anchor.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxTooltipAnchorDirective } from './tooltip-anchor.directive';
3 |
4 | export const RdxTooltipAnchorToken = new InjectionToken('RdxTooltipAnchorToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/toggle-group/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/toggle-group-item.directive';
2 | export * from './src/toggle-group-item.token';
3 | export * from './src/toggle-group-without-focus.directive';
4 | export * from './src/toggle-group.directive';
5 | export * from './src/toggle-group.token';
6 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/src/hover-card-arrow.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxHoverCardArrowDirective } from './hover-card-arrow.directive';
3 |
4 | export const RdxHoverCardArrowToken = new InjectionToken('RdxHoverCardArrowToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/src/hover-card-close.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxHoverCardCloseDirective } from './hover-card-close.directive';
3 |
4 | export const RdxHoverCardCloseToken = new InjectionToken('RdxHoverCardCloseToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/popper/stories/popper.docs.mdx:
--------------------------------------------------------------------------------
1 | import { Primary, Controls, Meta } from '@storybook/addon-docs/blocks';
2 | import * as PopperStories from './popper.stories';
3 |
4 |
5 |
6 | # Popper
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/h2.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/primitives/calendar/src/calendar-grid-head.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: 'thead[rdxCalendarGridHead]',
5 | host: {
6 | '[attr.aria-hidden]': 'true'
7 | }
8 | })
9 | export class RdxCalendarGridHeadDirective {}
10 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/is-inside-form.ts:
--------------------------------------------------------------------------------
1 | import { ElementRef } from '@angular/core';
2 |
3 | export function isInsideForm(el: ElementRef | null): boolean {
4 | if (!el || !el.nativeElement) {
5 | return true;
6 | }
7 | return Boolean(el.nativeElement.closest('form'));
8 | }
9 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/src/hover-card-anchor.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxHoverCardAnchorDirective } from './hover-card-anchor.directive';
3 |
4 | export const RdxHoverCardAnchorToken = new InjectionToken('RdxHoverCardAnchorToken');
5 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/menu-radio-group.directive.ts:
--------------------------------------------------------------------------------
1 | import { CdkMenuGroup } from '@angular/cdk/menu';
2 | import { Directive } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[RdxMenuRadioGroup]',
6 | hostDirectives: [CdkMenuGroup]
7 | })
8 | export class RdxMenuRadioGroupDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/pagination/src/pagination-ellipsis.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxPaginationEllipsis]',
5 | host: {
6 | '[attr.data-type]': '"ellipsis"'
7 | }
8 | })
9 | export class RdxPaginationEllipsisDirective {}
10 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/demos/primitives/aspect-ratio/aspect-ratio-demo.css:
--------------------------------------------------------------------------------
1 | .Container {
2 | width: 300px;
3 | border-radius: 6px;
4 | overflow: hidden;
5 | box-shadow: 0 2px 10px var(--black-a7);
6 | }
7 |
8 | .Image {
9 | object-fit: cover;
10 | width: 100%;
11 | height: 100%;
12 | }
13 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/app/app.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { RouterOutlet } from '@angular/router';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | imports: [RouterOutlet],
7 | template: `
8 |
9 | `
10 | })
11 | export class App {}
12 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-radio-group.directive.ts:
--------------------------------------------------------------------------------
1 | import { CdkMenuGroup } from '@angular/cdk/menu';
2 | import { Directive } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarRadioGroup]',
6 | hostDirectives: [CdkMenuGroup]
7 | })
8 | export class RdxMenubarRadioGroupDirective {}
9 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/contributor-names.json:
--------------------------------------------------------------------------------
1 | [
2 | "pimenovoleg",
3 | "artembelik",
4 | "lskramarov",
5 | "mrfrac",
6 | "zizifn",
7 | "olegdenisov",
8 | "KamilEmeleev",
9 | "vitalyozza",
10 | "pawel-twardziak",
11 | "VictorZubr",
12 | "jpsullivan",
13 | "ayush-seth"
14 | ]
15 |
--------------------------------------------------------------------------------
/packages/primitives/popper/src/popper.ts:
--------------------------------------------------------------------------------
1 | import { contentChild, Directive } from '@angular/core';
2 | import { RdxPopperAnchor } from './popper-anchor';
3 |
4 | @Directive({
5 | selector: '[rdxPopperRoot]'
6 | })
7 | export class RdxPopper {
8 | readonly anchor = contentChild.required(RdxPopperAnchor);
9 | }
10 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-group.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuGroupDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarGroup]',
6 | hostDirectives: [RdxMenuGroupDirective]
7 | })
8 | export class RdxMenubarGroupDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/stories/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const containerAlert =
2 | 'For the sake of option panels to play with the stories, the "onOverlayEscapeKeyDown" & "onOverlayOutsideClick" events are limited to the area inside the rectangle marked with a dashed line - the events work when the area is active (focused)';
3 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/menu-separator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[RdxMenuSeparator]',
5 | host: {
6 | role: 'separator',
7 | '[attr.aria-orientation]': "'horizontal'"
8 | }
9 | })
10 | export class RdxMenuSeparatorDirective {}
11 |
--------------------------------------------------------------------------------
/packages/primitives/popover/stories/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const containerAlert =
2 | 'For the sake of option panels to play with the stories, the "onOverlayEscapeKeyDown" & "onOverlayOutsideClick" events are limited to the area inside the rectangle marked with a dashed line - the events work when the area is active (focused)';
3 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/stories/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const containerAlert =
2 | 'For the sake of option panels to play with the stories, the "onOverlayEscapeKeyDown" & "onOverlayOutsideClick" events are limited to the area inside the rectangle marked with a dashed line - the events work when the area is active (focused)';
3 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/Tabs.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 | import { Tabs as TabsComponent } from '../tabs';
4 |
5 | const { class: className, ...rest } = Astro.props;
6 | ---
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/date-time/index.ts:
--------------------------------------------------------------------------------
1 | export * from './calendar';
2 | export * from './comparators';
3 | export * from './formatter';
4 | export * from './parser';
5 | export * from './placeholders';
6 | export * from './segment';
7 | export * from './types';
8 | export * from './useDateField';
9 | export * from './utils';
10 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-content.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuContentDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarContent]',
6 | hostDirectives: [RdxMenuContentDirective]
7 | })
8 | export class RdxMenuBarContentDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/select/__tests__/select.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxSelectComponent } from '../src/select.component';
2 |
3 | xdescribe('RdxSelectDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxSelectComponent();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/demos/primitives/progress/attrs.ts:
--------------------------------------------------------------------------------
1 | export const attrDataRoot = [
2 | { name: '[data-state]', value: '"complete" | "indeterminate" | "loading"' },
3 | { name: '[data-value]', value: 'The current value' },
4 | { name: '[data-max]', value: 'The max value' }
5 | ];
6 |
7 | export const attrDataIndicator = attrDataRoot;
8 |
--------------------------------------------------------------------------------
/packages/primitives/dialog/stories/sheet.docs.mdx:
--------------------------------------------------------------------------------
1 | import { Canvas, Controls, Meta } from '@storybook/addon-docs/blocks';
2 | import * as SheetStories from './sheet.stories';
3 |
4 |
5 |
6 | # Sheet
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/primitives/select/src/select-group.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxSelectGroup]',
5 | standalone: true,
6 | exportAs: 'rdxSelectGroup',
7 | host: {
8 | '[attr.role]': '"group"'
9 | }
10 | })
11 | export class RdxSelectGroupDirective {}
12 |
--------------------------------------------------------------------------------
/packages/primitives/select/src/select-icon.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxSelectIcon]',
5 | standalone: true,
6 | exportAs: 'rdxSelectIcon',
7 | host: {
8 | '[attr.aria-hidden]': 'true'
9 | }
10 | })
11 | export class RdxSelectIconDirective {}
12 |
--------------------------------------------------------------------------------
/tools/scripts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "module": "commonjs",
6 | "moduleResolution": "node",
7 | "outDir": "../../dist/scripts",
8 | "types": ["node"]
9 | },
10 | "include": ["**/*.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/config/site-config.ts:
--------------------------------------------------------------------------------
1 | export const siteConfig = {
2 | title: 'radix-ng',
3 | url: 'https://radix-ng.com',
4 | description: 'Unstyled, accessible components for building high-quality design systems and web apps in Angular.',
5 | links: {
6 | github: 'https://github.com/radix-ng/primitives'
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/main.server.ts:
--------------------------------------------------------------------------------
1 | import { bootstrapApplication, BootstrapContext } from '@angular/platform-browser';
2 | import { App } from './app/app';
3 | import { config } from './app/app.config.server';
4 |
5 | const bootstrap = (context: BootstrapContext) => bootstrapApplication(App, config, context);
6 |
7 | export default bootstrap;
8 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/test-setup.ts:
--------------------------------------------------------------------------------
1 | // @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
2 | globalThis.ngJest = {
3 | testEnvironmentOptions: {
4 | errorOnUnknownElements: true,
5 | errorOnUnknownProperties: true
6 | }
7 | };
8 | import 'jest-preset-angular/setup-jest';
9 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-separator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuSeparatorDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarSeparator]',
6 | hostDirectives: [RdxMenuSeparatorDirective]
7 | })
8 | export class RdxMenubarSeparatorDirective {}
9 |
--------------------------------------------------------------------------------
/apps/radix-docs/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist/
3 | # generated types
4 | .astro/
5 |
6 | # dependencies
7 | node_modules/
8 |
9 | # logs
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 | pnpm-debug.log*
14 |
15 |
16 | # environment variables
17 | .env
18 | .env.production
19 |
20 | # macOS-specific files
21 | .DS_Store
22 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/app/app.routes.server.ts:
--------------------------------------------------------------------------------
1 | import { RenderMode, ServerRoute } from '@angular/ssr';
2 |
3 | export const serverRoutes: ServerRoute[] = [
4 | {
5 | path: 'list',
6 | renderMode: RenderMode.Prerender
7 | },
8 | {
9 | path: '**',
10 | renderMode: RenderMode.Server
11 | }
12 | ];
13 |
--------------------------------------------------------------------------------
/packages/primitives/dropdown-menu/src/dropdown-menu-label.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuLabelDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[rdxDropdownMenuLabel]',
6 | hostDirectives: [RdxMenuLabelDirective]
7 | })
8 | export class RdxDropdownMenuLabelDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/menu-group.directive.ts:
--------------------------------------------------------------------------------
1 | import { CdkMenuGroup } from '@angular/cdk/menu';
2 | import { Directive } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[RdxMenuGroup]',
6 | hostDirectives: [CdkMenuGroup],
7 | host: {
8 | role: 'group'
9 | }
10 | })
11 | export class RdxMenuGroupDirective {}
12 |
--------------------------------------------------------------------------------
/packages/primitives/select/__tests__/select-item.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxSelectItemDirective } from '../src/select-item.directive';
2 |
3 | xdescribe('RdxSelectItemDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxSelectItemDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/select/src/select-separator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxSelectSeparator]',
5 | standalone: true,
6 | exportAs: 'rdxSelectSeparator',
7 | host: {
8 | '[attr.aria-hidden]': 'true'
9 | }
10 | })
11 | export class RdxSelectSeparatorDirective {}
12 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-item-indicator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuItemIndicatorDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarItemIndicator]',
6 | hostDirectives: [RdxMenuItemIndicatorDirective]
7 | })
8 | export class RdxMenubarItemIndicatorDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/tsconfig.lib.prod.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.lib.json",
3 | "compilerOptions": {
4 | "declarationMap": false,
5 | "paths": {
6 | "@radix-ng/primitives/*": ["./dist/primitives/*"]
7 | }
8 | },
9 | "angularCompilerOptions": {
10 | "compilationMode": "partial"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/primitives/dropdown-menu/src/dropdown-menu-separator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuSeparatorDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[rdxDropdownMenuSeparator]',
6 | hostDirectives: [RdxMenuSeparatorDirective]
7 | })
8 | export class RdxDropdownMenuSeparatorDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/popover-content-attributes.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxPopoverContentAttributesComponent } from './popover-content-attributes.component';
3 |
4 | export const RdxPopoverContentAttributesToken = new InjectionToken(
5 | 'RdxPopoverContentAttributesToken'
6 | );
7 |
--------------------------------------------------------------------------------
/packages/primitives/select/__tests__/select-content.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxSelectContentDirective } from '../src/select-content.directive';
2 |
3 | xdescribe('RdxSelectContentDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxSelectContentDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/select/__tests__/select-trigger.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxSelectTriggerDirective } from '../src/select-trigger.directive';
2 |
3 | xdescribe('RdxSelectTriggerDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxSelectTriggerDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/tooltip/src/tooltip-content-attributes.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxTooltipContentAttributesComponent } from './tooltip-content-attributes.component';
3 |
4 | export const RdxTooltipContentAttributesToken = new InjectionToken(
5 | 'RdxTooltipContentAttributesToken'
6 | );
7 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/FeatureList.astro:
--------------------------------------------------------------------------------
1 | ---
2 | export interface Props {
3 | items: string[];
4 | }
5 |
6 | const { items } = Astro.props;
7 | ---
8 |
9 | Features
10 |
11 | {items.map((item) => - {item}
)}
12 |
13 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/app/components/label/page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { RdxLabelDirective } from '@radix-ng/primitives/label';
3 |
4 | @Component({
5 | selector: 'app-label',
6 | imports: [RdxLabelDirective],
7 | template: `
8 |
9 | `
10 | })
11 | export default class Page {}
12 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/__tests__/accordion-item.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxAccordionItemDirective } from '../src/accordion-item.directive';
2 |
3 | xdescribe('RdxAccordionItemDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxAccordionItemDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/__tests__/accordion-root.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxAccordionRootDirective } from '../src/accordion-root.directive';
2 |
3 | xdescribe('RdxAccordionRootDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxAccordionRootDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/schematics/collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3 | "schematics": {
4 | "ng-add": {
5 | "description": "Add RadixNG to the application.",
6 | "factory": "./ng-add/index#ngAdd",
7 | "aliases": ["install"]
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/TabsList.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 | import { TabsList as TabsComponent } from '../tabs';
4 |
5 | const { class: className, ...rest } = Astro.props;
6 | ---
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/__tests__/accordion-header.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxAccordionHeaderDirective } from '../src/accordion-header.directive';
2 |
3 | xdescribe('RdxAccordionHeaderDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxAccordionHeaderDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "esbenp.prettier-vscode",
4 | "stylelint.vscode-stylelint",
5 | "astro-build.astro-vscode",
6 | "angular.ng-template",
7 | "editorconfig.editorconfig",
8 | "dbaeumer.vscode-eslint",
9 | "firsttris.vscode-jest-runner",
10 | "nrwl.angular-console"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/apps/radix-docs/README.md:
--------------------------------------------------------------------------------
1 | # RadixNG Docs
2 |
3 | ## Run Dev
4 |
5 | Build components and primitives
6 |
7 | 1. Build Radix Primitives
8 |
9 | ```bash
10 | pnpm -w run primitives:build
11 | ```
12 |
13 | 2. Build Radix Components
14 |
15 | ```bash
16 | pnpm -w run components:build
17 | ```
18 |
19 | 3. Start documentation
20 |
21 | ```bash
22 | pnpm -w run radix-docs:dev
23 | ```
24 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/pages/robots.txt.ts:
--------------------------------------------------------------------------------
1 | import type { APIRoute } from 'astro';
2 |
3 | const getRobotsTxt = (sitemapURL: URL) => `
4 | User-agent: *
5 | Allow: /
6 |
7 | Sitemap: ${sitemapURL.href}
8 | `;
9 |
10 | export const GET: APIRoute = ({ site }) => {
11 | const sitemapURL = new URL('sitemap-index.xml', site);
12 | return new Response(getRobotsTxt(sitemapURL));
13 | };
14 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "types": ["node"]
6 | },
7 | "files": ["src/main.ts", "src/main.server.ts", "server.ts"],
8 | "include": ["src/**/*.d.ts"],
9 | "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/__tests__/accordion-content.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxAccordionContentDirective } from '../src/accordion-content.directive';
2 |
3 | xdescribe('RdxAccordionContentDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxAccordionContentDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/__tests__/accordion-trigger.directive.spec.ts:
--------------------------------------------------------------------------------
1 | import { RdxAccordionTriggerDirective } from '../src/accordion-trigger.directive';
2 |
3 | xdescribe('RdxAccordionTriggerDirective', () => {
4 | it('should create an instance', () => {
5 | const directive = new RdxAccordionTriggerDirective();
6 | expect(directive).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/packages/primitives/hover-card/src/hover-card-content-attributes.token.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { RdxHoverCardContentAttributesComponent } from './hover-card-content-attributes.component';
3 |
4 | export const RdxHoverCardContentAttributesToken = new InjectionToken(
5 | 'RdxHoverCardContentAttributesToken'
6 | );
7 |
--------------------------------------------------------------------------------
/packages/primitives/aspect-ratio/stories/aspect-ratio.docs.mdx:
--------------------------------------------------------------------------------
1 | import { Canvas, Meta } from '@storybook/addon-docs/blocks';
2 | import * as AspectRatioStories from './aspect-ratio.stories';
3 |
4 |
5 |
6 | # Aspect Ratio
7 |
8 | #### Displays content within a desired ratio.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/primitives/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "target": "es2016",
7 | "types": ["jest", "node"]
8 | },
9 | "files": ["test-setup.ts"],
10 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | max_line_length = 120
8 | indent_size = 4
9 | end_of_line = lf
10 | insert_final_newline = true
11 | trim_trailing_whitespace = true
12 |
13 | [*.md]
14 | max_line_length = off
15 | trim_trailing_whitespace = false
16 |
17 | [*.yml]
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Documentation.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 'Documentation'
3 | about: 'Suggestions for Radix documentation'
4 | ---
5 |
6 | ## Documentation
7 |
8 | ### Relevant Radix Component(s)
9 |
10 |
11 |
12 | ### Examples from other doc sites
13 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/menu-content.directive.ts:
--------------------------------------------------------------------------------
1 | import { CdkMenu } from '@angular/cdk/menu';
2 | import { Directive } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[RdxMenuContent]',
6 | hostDirectives: [CdkMenu],
7 | host: {
8 | role: 'menu',
9 | '[attr.aria-orientation]': '"vertical"'
10 | }
11 | })
12 | export class RdxMenuContentDirective {}
13 |
--------------------------------------------------------------------------------
/packages/primitives/menu/src/utils.ts:
--------------------------------------------------------------------------------
1 | export type CheckedState = boolean | 'indeterminate';
2 |
3 | export function isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {
4 | return checked === 'indeterminate';
5 | }
6 |
7 | export function getCheckedState(checked: CheckedState) {
8 | return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';
9 | }
10 |
--------------------------------------------------------------------------------
/packages/primitives/toolbar/src/toolbar-separator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
3 |
4 | @Directive({
5 | selector: '[rdxToolbarSeparator]',
6 | hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation', 'decorative'] }]
7 | })
8 | export class RdxToolbarSeparatorDirective {}
9 |
--------------------------------------------------------------------------------
/packages/components/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "target": "es2016",
7 | "types": ["jest", "node"]
8 | },
9 | "files": ["src/test-setup.ts"],
10 | "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/primitives/slider/src/slider-thumb.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { RdxSliderThumbImplDirective } from './slider-thumb-impl.directive';
3 |
4 | @Component({
5 | selector: 'rdx-slider-thumb',
6 | hostDirectives: [RdxSliderThumbImplDirective],
7 | template: `
8 |
9 | `
10 | })
11 | export class RdxSliderThumbComponent {}
12 |
--------------------------------------------------------------------------------
/packages/primitives/stepper/src/stepper-indicator.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { injectStepperItemContext } from './stepper-item-context.token';
3 |
4 | @Directive({
5 | selector: '[rdxStepperIndicator]',
6 | exportAs: 'rdxStepperIndicator'
7 | })
8 | export class RdxStepperIndicatorDirective {
9 | readonly itemContext = injectStepperItemContext();
10 | }
11 |
--------------------------------------------------------------------------------
/packages/primitives/toolbar/src/toolbar-toggle-item.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxToggleGroupItemDirective } from '@radix-ng/primitives/toggle-group';
3 |
4 | @Directive({
5 | selector: '[rdxToolbarToggleItem]',
6 | hostDirectives: [{ directive: RdxToggleGroupItemDirective, inputs: ['value', 'disabled'] }]
7 | })
8 | export class RdxToolbarToggleItemDirective {}
9 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/a.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | const { className, ...props } = Astro.props;
5 | ---
6 |
7 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/tabs/TabsList.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 |
4 | export interface Props {
5 | class?: string;
6 | }
7 | ---
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "target": "es2016",
7 | "types": ["jest", "node"]
8 | },
9 | "files": ["src/test-setup.ts"],
10 | "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/primitives/accordion/src/accordion-content-presence.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxCollapsibleContentPresenceDirective } from '@radix-ng/primitives/collapsible';
3 |
4 | @Directive({
5 | selector: 'ng-template[rdxAccordionContentPresence]',
6 | hostDirectives: [RdxCollapsibleContentPresenceDirective]
7 | })
8 | export class RdxAccordionContentPresenceDirective {}
9 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-root.directive.ts:
--------------------------------------------------------------------------------
1 | import { CdkMenuBar } from '@angular/cdk/menu';
2 | import { Directive } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarRoot]',
6 | hostDirectives: [CdkMenuBar],
7 | host: {
8 | tabindex: '0',
9 | '[attr.data-orientation]': '"horizontal"'
10 | }
11 | })
12 | export class RdxMenuBarRootDirective {}
13 |
--------------------------------------------------------------------------------
/packages/primitives/tsconfig.schematics.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "resolveJsonModule": true,
7 | "module": "CommonJS",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*.test.ts"],
11 | "include": ["./schematics/**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/utils/typedoc.ts:
--------------------------------------------------------------------------------
1 | import apiPrimitives from '../api-doc/primitives.json';
2 |
3 | export const getComponentData = (componentName: string) => {
4 | for (const key in apiPrimitives) {
5 | const components = apiPrimitives[key].components;
6 | if (componentName in components) {
7 | return components[componentName];
8 | }
9 | }
10 | return null;
11 | };
12 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/mdx/TabsContent.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { cn } from '@/utils/utils';
3 | import { TabsContent as TabsComponent } from '../tabs';
4 |
5 | const { class: className, ...rest } = Astro.props;
6 | ---
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/components/theme/theme-head-script.astro:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/packages/primitives/avatar/src/types.ts:
--------------------------------------------------------------------------------
1 | export type RdxImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
2 |
3 | export type HTMLAttributeReferrerPolicy =
4 | | ''
5 | | 'no-referrer'
6 | | 'no-referrer-when-downgrade'
7 | | 'origin'
8 | | 'origin-when-cross-origin'
9 | | 'same-origin'
10 | | 'strict-origin'
11 | | 'strict-origin-when-cross-origin'
12 | | 'unsafe-url';
13 |
--------------------------------------------------------------------------------
/packages/primitives/focus-scope/stories/focus-scope.docs.mdx:
--------------------------------------------------------------------------------
1 | import { Canvas, Meta } from '@storybook/addon-docs/blocks';
2 | import * as Stories from './focus-scope.stories';
3 |
4 |
5 |
6 | # Focus Scope
7 |
8 | #### Manages focus within a component boundary with support for trapping and looping focus navigation.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/components/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": ["src/**/*.spec.ts", "src/test-setup.ts", "jest.config.ts", "src/**/*.test.ts"],
11 | "include": ["src/**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/primitives/stepper/src/stepper-title.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { injectStepperItemContext } from './stepper-item-context.token';
3 |
4 | @Directive({
5 | selector: '[rdxStepperTitle]',
6 | host: {
7 | '[attr.id]': 'itemContext.titleId'
8 | }
9 | })
10 | export class RdxStepperTitleDirective {
11 | readonly itemContext = injectStepperItemContext();
12 | }
13 |
--------------------------------------------------------------------------------
/packages/primitives/toolbar/stories/toolbar.docs.mdx:
--------------------------------------------------------------------------------
1 | import { ArgTypes, Canvas, Markdown, Meta } from '@storybook/addon-docs/blocks';
2 | import * as ToolbarStories from './toolbar.stories';
3 |
4 |
5 |
6 | # Toolbar
7 |
8 | #### A container for grouping a set of controls, such as buttons, Toolbar groups or dropdown menus.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/app/components/switch/page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { RdxSwitchModule } from '@radix-ng/primitives/switch';
3 |
4 | @Component({
5 | selector: 'app-switch',
6 | imports: [RdxSwitchModule],
7 | template: `
8 |
11 | `
12 | })
13 | export default class Page {}
14 |
--------------------------------------------------------------------------------
/packages/primitives/core/src/focus-initial.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive, ElementRef, inject } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[rdxFocusInitial]'
5 | })
6 | export class RdxFocusInitialDirective {
7 | /** @ignore */
8 | private readonly nativeElement = inject(ElementRef).nativeElement;
9 |
10 | /** @ignore */
11 | focus(): void {
12 | this.nativeElement.focus();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/radix-docs/src/demos/primitives/separator/separator-demo.css:
--------------------------------------------------------------------------------
1 | .SeparatorRoot {
2 | background-color: var(--violet-6);
3 | }
4 |
5 | .SeparatorRoot[data-orientation='horizontal'] {
6 | height: 1px;
7 | width: 100%;
8 | }
9 |
10 | .SeparatorRoot[data-orientation='vertical'] {
11 | height: 100%;
12 | width: 1px;
13 | }
14 |
15 | .Text {
16 | color: white;
17 | font-size: 15px;
18 | line-height: 20px;
19 | }
20 |
--------------------------------------------------------------------------------
/packages/primitives/cropper/src/cropper-crop-area.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { injectCropperRootContext } from './cropper-context.token';
3 |
4 | @Directive({
5 | selector: '[rdxCropperCropArea]',
6 | host: {
7 | '[style]': 'rootContext.getCropAreaStyle()'
8 | }
9 | })
10 | export class RdxCropperCropAreaDirective {
11 | readonly rootContext = injectCropperRootContext();
12 | }
13 |
--------------------------------------------------------------------------------
/packages/primitives/cropper/src/cropper-description.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { injectCropperRootContext } from './cropper-context.token';
3 |
4 | @Directive({
5 | selector: '[rdxCropperDescription]',
6 | host: {
7 | '[attr.id]': 'rootContext.descriptionId()'
8 | }
9 | })
10 | export class RdxCropperDescriptionDirective {
11 | readonly rootContext = injectCropperRootContext();
12 | }
13 |
--------------------------------------------------------------------------------
/packages/primitives/toggle-group/src/toggle-group-item.token.ts:
--------------------------------------------------------------------------------
1 | import { inject, InjectionToken } from '@angular/core';
2 | import type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';
3 |
4 | export const RdxToggleGroupItemToken = new InjectionToken('RdxToggleGroupItemToken');
5 |
6 | export function injectToggleGroupItem(): RdxToggleGroupItemDirective {
7 | return inject(RdxToggleGroupItemToken);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/components/.compodocrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/@compodoc/compodoc/src/config/schema.json",
3 | "tsconfig": "tsconfig.doc.json",
4 | "output": "../../dist/components/compodoc",
5 | "exportFormat": "json",
6 | "hideGenerator": true,
7 | "disableCoverage": true,
8 | "disablePrivate": true,
9 | "disableInternal": true,
10 | "disableLifeCycleHooks": true,
11 | "disableDependencies": true
12 | }
13 |
--------------------------------------------------------------------------------
/packages/primitives/stepper/src/stepper-description.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { injectStepperItemContext } from './stepper-item-context.token';
3 |
4 | @Directive({
5 | selector: '[rdxStepperDescription]',
6 | host: {
7 | '[attr.id]': 'itemContext.descriptionId'
8 | }
9 | })
10 | export class RdxStepperDescriptionDirective {
11 | readonly itemContext = injectStepperItemContext();
12 | }
13 |
--------------------------------------------------------------------------------
/tools/scripts/docs-copy.mjs:
--------------------------------------------------------------------------------
1 | import { cpSync, mkdirSync } from 'fs';
2 |
3 | mkdirSync('apps/radix-docs/node_modules/@radix-ng/primitives', { recursive: true });
4 | mkdirSync('apps/radix-docs/node_modules/@radix-ng/components', { recursive: true });
5 |
6 | cpSync('dist/primitives', 'apps/radix-docs/node_modules/@radix-ng/primitives', { recursive: true });
7 | cpSync('dist/components', 'apps/radix-docs/node_modules/@radix-ng/components', { recursive: true });
8 |
--------------------------------------------------------------------------------
/packages/primitives/README.md:
--------------------------------------------------------------------------------
1 | # Primitives
2 |
3 | > Radix-NG is an unofficial Angular port of [Radix UI](https://www.radix-ui.com/),
4 | > thus we share the same principal and vision when building primitives.
5 |
6 | Radix Primitives is a low-level UI component library with a focus on accessibility,
7 | customization and developer experience.
8 |
9 | You can use these components either as the base layer of your design system, or adopt them incrementally.
10 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/popover.types.ts:
--------------------------------------------------------------------------------
1 | export enum RdxPopoverState {
2 | OPEN = 'open',
3 | CLOSED = 'closed'
4 | }
5 |
6 | export enum RdxPopoverAttachDetachEvent {
7 | ATTACH = 'attach',
8 | DETACH = 'detach'
9 | }
10 |
11 | export enum RdxPopoverAnimationStatus {
12 | OPEN_STARTED = 'open_started',
13 | OPEN_ENDED = 'open_ended',
14 | CLOSED_STARTED = 'closed_started',
15 | CLOSED_ENDED = 'closed_ended'
16 | }
17 |
--------------------------------------------------------------------------------
/packages/primitives/tsconfig.typedoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "resolveJsonModule": true,
7 | "module": "CommonJS",
8 | "types": ["node"]
9 | },
10 | "include": ["**/src/**.ts", "**/*.ts"],
11 | "exclude": ["**/*.spec.ts", "**/*.test.ts", "**/stories/**.*", "*.stories.ts", "./schematics/**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 'Question'
3 | about: 'For usage questions or use GitHub Discussions'
4 | ---
5 |
6 | ## Question
7 |
8 | For usage questions, please use Stack Overflow or use [GitHub Discussions](https://github.com/radix-ng/primitives/discussions) instead of posting an issue.
9 | This helps us keep bugs and feature requests prioritized, and it increases the likelihood that more people see your question and can answer it more quickly!
10 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-item-radio.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuItemRadioDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarItemRadio]',
6 | hostDirectives: [
7 | {
8 | directive: RdxMenuItemRadioDirective,
9 | inputs: ['disabled', 'checked']
10 | }
11 | ]
12 | })
13 | export class RdxMenubarItemRadioDirective {}
14 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-item.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuItemDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarItem]',
6 | hostDirectives: [
7 | {
8 | directive: RdxMenuItemDirective,
9 | inputs: ['disabled'],
10 | outputs: ['onSelect']
11 | }
12 | ]
13 | })
14 | export class RdxMenuBarItemDirective {}
15 |
--------------------------------------------------------------------------------
/packages/primitives/toolbar/src/toolbar-toggle-group.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxToggleGroupWithoutFocusDirective } from '@radix-ng/primitives/toggle-group';
3 |
4 | // TODO: set rovingFocus - false
5 | @Directive({
6 | selector: '[rdxToolbarToggleGroup]',
7 | hostDirectives: [{ directive: RdxToggleGroupWithoutFocusDirective, inputs: ['value', 'type', 'disabled'] }]
8 | })
9 | export class RdxToolbarToggleGroupDirective {}
10 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/app/components/separator/page.ts:
--------------------------------------------------------------------------------
1 | import { ChangeDetectionStrategy, Component } from '@angular/core';
2 | import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
3 |
4 | @Component({
5 | selector: 'app-separator',
6 | changeDetection: ChangeDetectionStrategy.OnPush,
7 | imports: [RdxSeparatorRootDirective],
8 | template: `
9 | ***
10 | `
11 | })
12 | export default class Page {}
13 |
--------------------------------------------------------------------------------
/apps/radix-ssr-testing/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | radix-ssr-testing
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/primitives/menubar/src/menubar-item-checkbox.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive } from '@angular/core';
2 | import { RdxMenuItemCheckboxDirective } from '@radix-ng/primitives/menu';
3 |
4 | @Directive({
5 | selector: '[RdxMenuBarCheckboxItem]',
6 | hostDirectives: [
7 | {
8 | directive: RdxMenuItemCheckboxDirective,
9 | inputs: ['checked', 'disabled']
10 | }
11 | ]
12 | })
13 | export class RdxMenubarItemCheckboxDirective {}
14 |
--------------------------------------------------------------------------------
/packages/primitives/popover/src/utils/types.ts:
--------------------------------------------------------------------------------
1 | export type EventType = 'cdkOverlayOutsideClick' | 'cdkOverlayEscapeKeyDown';
2 | export type EventTypeCapitalized = Capitalize;
3 | export type EventTypeAsPrimitiveConfigKey = `prevent${EventTypeCapitalized}`;
4 | export type PrimitiveConfig = {
5 | [value in EventTypeAsPrimitiveConfigKey]?: boolean;
6 | };
7 | export type PrimitiveConfigs = Map