@arobo/react 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion.d.ts +30 -0
- package/dist/components/accordion/accordion.js +190 -0
- package/dist/components/accordion/index.d.ts +23 -0
- package/dist/components/accordion/index.js +16 -0
- package/dist/components/alert/alert.d.ts +15 -0
- package/dist/components/alert/alert.js +151 -0
- package/dist/components/alert/index.d.ts +19 -0
- package/dist/components/alert/index.js +14 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +65 -0
- package/dist/components/alert-dialog/alert-dialog.js +303 -0
- package/dist/components/alert-dialog/index.d.ts +31 -0
- package/dist/components/alert-dialog/index.js +20 -0
- package/dist/components/avatar/avatar.d.ts +15 -0
- package/dist/components/avatar/avatar.js +92 -0
- package/dist/components/avatar/index.d.ts +15 -0
- package/dist/components/avatar/index.js +12 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +14 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +82 -0
- package/dist/components/breadcrumbs/index.d.ts +13 -0
- package/dist/components/breadcrumbs/index.js +11 -0
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/calendar.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.js +3 -3
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/carousel.d.ts +26 -0
- package/dist/components/carousel/carousel.js +170 -0
- package/dist/components/carousel/index.d.ts +17 -0
- package/dist/components/carousel/index.js +10 -0
- package/dist/components/checkbox/checkbox.d.ts +16 -3
- package/dist/components/checkbox/checkbox.js +149 -35
- package/dist/components/checkbox/index.d.ts +3 -16
- package/dist/components/checkbox/index.js +4 -12
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/chip/chip.d.ts +9 -0
- package/dist/components/chip/chip.js +24 -0
- package/dist/components/chip/index.d.ts +11 -0
- package/dist/components/chip/index.js +10 -0
- package/dist/components/close-button/close-button.d.ts +1 -1
- package/dist/components/close-button/close-button.js +1 -1
- package/dist/components/close-button/index.d.ts +1 -3
- package/dist/components/close-button/index.js +0 -1
- package/dist/components/combobox/combobox.js +3 -3
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/container/container.d.ts +9 -0
- package/dist/components/container/container.js +23 -0
- package/dist/components/container/index.d.ts +13 -0
- package/dist/components/container/index.js +11 -0
- package/dist/components/date-field/date-field.js +3 -3
- package/dist/components/date-field/index.js +1 -1
- package/dist/components/date-input-group/date-input-group.js +3 -3
- package/dist/components/date-input-group/index.js +1 -1
- package/dist/components/date-picker/date-picker.js +4 -4
- package/dist/components/date-picker/index.d.ts +0 -2
- package/dist/components/date-picker/index.js +0 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/date-range-picker.js +4 -4
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/description/description.js +1 -1
- package/dist/components/description/index.d.ts +1 -3
- package/dist/components/description/index.js +0 -1
- package/dist/components/drawer/drawer.d.ts +33 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown/dropdown.d.ts +38 -0
- package/dist/components/dropdown/dropdown.js +155 -0
- package/dist/components/dropdown/index.d.ts +41 -0
- package/dist/components/dropdown/index.js +18 -0
- package/dist/components/empty/empty.d.ts +34 -0
- package/dist/components/empty/empty.js +151 -0
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/empty-state/empty-state.d.ts +7 -0
- package/dist/components/empty-state/empty-state.js +19 -0
- package/dist/components/empty-state/index.d.ts +11 -0
- package/dist/components/empty-state/index.js +10 -0
- package/dist/components/error-message/error-message.js +1 -1
- package/dist/components/error-message/index.js +1 -1
- package/dist/components/field-error/field-error.js +1 -1
- package/dist/components/field-error/index.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +16 -0
- package/dist/components/fieldset/fieldset.js +87 -0
- package/dist/components/fieldset/index.d.ts +19 -0
- package/dist/components/fieldset/index.js +14 -0
- package/dist/components/header/header.d.ts +7 -0
- package/dist/components/header/header.js +20 -0
- package/dist/components/header/index.d.ts +8 -0
- package/dist/components/header/index.js +8 -0
- package/dist/components/heading/heading.d.ts +12 -0
- package/dist/components/heading/heading.js +29 -0
- package/dist/components/heading/index.d.ts +13 -0
- package/dist/components/heading/index.js +11 -0
- package/dist/components/icons.js +169 -1
- package/dist/components/index.d.ts +45 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/input-group/index.d.ts +21 -0
- package/dist/components/input-group/index.js +15 -0
- package/dist/components/input-group/input-group.d.ts +20 -0
- package/dist/components/input-group/input-group.js +128 -0
- package/dist/components/input-otp/index.d.ts +22 -0
- package/dist/components/input-otp/index.js +20 -0
- package/dist/components/input-otp/input-otp.d.ts +26 -0
- package/dist/components/input-otp/input-otp.js +138 -0
- package/dist/components/kbd/index.d.ts +17 -0
- package/dist/components/kbd/index.js +13 -0
- package/dist/components/kbd/kbd.constants.d.ts +3 -0
- package/dist/components/kbd/kbd.constants.js +50 -0
- package/dist/components/kbd/kbd.d.ts +24 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/index.js +1 -1
- package/dist/components/label/label.js +1 -1
- package/dist/components/link/index.d.ts +13 -0
- package/dist/components/link/index.js +11 -0
- package/dist/components/link/link.d.ts +10 -0
- package/dist/components/link/link.js +58 -0
- package/dist/components/listbox/index.d.ts +21 -0
- package/dist/components/listbox/index.js +16 -0
- package/dist/components/listbox/listbox.d.ts +9 -0
- package/dist/components/listbox/listbox.js +22 -0
- package/dist/components/listbox/listbox.type.d.ts +34 -0
- package/dist/components/listbox-item/index.d.ts +13 -0
- package/dist/components/listbox-item/index.js +11 -0
- package/dist/components/listbox-item/listbox-item.d.ts +15 -0
- package/dist/components/listbox-item/listbox-item.js +76 -0
- package/dist/components/listbox-section/index.d.ts +8 -0
- package/dist/components/listbox-section/index.js +8 -0
- package/dist/components/listbox-section/listbox-section.d.ts +8 -0
- package/dist/components/listbox-section/listbox-section.js +21 -0
- package/dist/components/menu/index.d.ts +22 -0
- package/dist/components/menu/index.js +16 -0
- package/dist/components/menu/menu.d.ts +9 -0
- package/dist/components/menu/menu.js +19 -0
- package/dist/components/menu-item/index.d.ts +15 -0
- package/dist/components/menu-item/index.js +12 -0
- package/dist/components/menu-item/menu-item.d.ts +20 -0
- package/dist/components/menu-item/menu-item.js +122 -0
- package/dist/components/menu-section/index.d.ts +8 -0
- package/dist/components/menu-section/index.js +8 -0
- package/dist/components/menu-section/menu-section.d.ts +8 -0
- package/dist/components/menu-section/menu-section.js +21 -0
- package/dist/components/modal/index.d.ts +31 -0
- package/dist/components/modal/index.js +20 -0
- package/dist/components/modal/modal.d.ts +53 -0
- package/dist/components/modal/modal.js +283 -0
- package/dist/components/number-field/index.d.ts +21 -0
- package/dist/components/number-field/index.js +15 -0
- package/dist/components/number-field/number-field.d.ts +20 -0
- package/dist/components/number-field/number-field.js +126 -0
- package/dist/components/pagination/index.d.ts +19 -0
- package/dist/components/pagination/index.js +11 -0
- package/dist/components/pagination/pagination-ellipsis.d.ts +6 -0
- package/dist/components/pagination/pagination-ellipsis.js +11 -0
- package/dist/components/pagination/pagination-item.d.ts +15 -0
- package/dist/components/pagination/pagination-item.js +34 -0
- package/dist/components/pagination/pagination.d.ts +28 -0
- package/dist/components/pagination/pagination.js +128 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/rac/components.d.ts +1 -0
- package/dist/components/rac/index.d.ts +3 -0
- package/dist/components/rac/index.js +2 -0
- package/dist/components/rac/types.d.ts +2 -0
- package/dist/components/radio/index.d.ts +17 -0
- package/dist/components/radio/index.js +13 -0
- package/dist/components/radio/radio.d.ts +21 -0
- package/dist/components/radio/radio.js +96 -0
- package/dist/components/radio-group/index.d.ts +11 -0
- package/dist/components/radio-group/index.js +10 -0
- package/dist/components/radio-group/radio-group.d.ts +8 -0
- package/dist/components/radio-group/radio-group.js +26 -0
- package/dist/components/range-calendar/index.js +1 -1
- package/dist/components/range-calendar/range-calendar.js +1 -1
- package/dist/components/scroll-shadow/index.d.ts +19 -0
- package/dist/components/scroll-shadow/index.js +11 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts +32 -0
- package/dist/components/scroll-shadow/scroll-shadow.js +75 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +11 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.js +120 -0
- package/dist/components/select/index.d.ts +19 -0
- package/dist/components/select/index.js +14 -0
- package/dist/components/select/select.d.ts +24 -0
- package/dist/components/select/select.js +139 -0
- package/dist/components/separator/index.d.ts +11 -0
- package/dist/components/separator/index.js +10 -0
- package/dist/components/separator/separator.d.ts +8 -0
- package/dist/components/separator/separator.js +22 -0
- package/dist/components/slider/index.d.ts +21 -0
- package/dist/components/slider/index.js +15 -0
- package/dist/components/slider/slider.d.ts +23 -0
- package/dist/components/slider/slider.js +176 -0
- package/dist/components/spinner/index.d.ts +11 -0
- package/dist/components/spinner/index.js +10 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +87 -0
- package/dist/components/surface/index.js +1 -1
- package/dist/components/surface/surface.js +1 -1
- package/dist/components/switch/index.d.ts +17 -0
- package/dist/components/switch/index.js +13 -0
- package/dist/components/switch/switch.d.ts +17 -0
- package/dist/components/switch/switch.js +97 -0
- package/dist/components/tabs/index.d.ts +21 -0
- package/dist/components/tabs/index.js +15 -0
- package/dist/components/tabs/tabs.d.ts +34 -0
- package/dist/components/tabs/tabs.js +140 -0
- package/dist/components/tag/index.d.ts +13 -0
- package/dist/components/tag/index.js +11 -0
- package/dist/components/tag/tag.d.ts +14 -0
- package/dist/components/tag/tag.js +84 -0
- package/dist/components/tag-group/index.d.ts +13 -0
- package/dist/components/tag-group/index.js +12 -0
- package/dist/components/tag-group/tag-group.d.ts +19 -0
- package/dist/components/tag-group/tag-group.js +58 -0
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-field/text-field.js +3 -3
- package/dist/components/textarea/index.d.ts +11 -0
- package/dist/components/textarea/index.js +10 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +26 -0
- package/dist/components/toast/constants.d.ts +3 -0
- package/dist/components/toast/constants.js +8 -0
- package/dist/components/toast/index.d.ts +73 -0
- package/dist/components/toast/index.js +21 -0
- package/dist/components/toast/toast-queue.d.ts +67 -0
- package/dist/components/toast/toast-queue.js +129 -0
- package/dist/components/toast/toast.d.ts +67 -0
- package/dist/components/toast/toast.js +295 -0
- package/dist/components/toggle-button/index.d.ts +2 -0
- package/dist/components/toggle-button/index.js +1 -0
- package/dist/components/toggle-button/toggle-button.d.ts +10 -0
- package/dist/components/toggle-button/toggle-button.js +26 -0
- package/dist/components/toggle-button-group/index.d.ts +2 -0
- package/dist/components/toggle-button-group/index.js +1 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +15 -0
- package/dist/components/toggle-button-group/toggle-button-group.js +61 -0
- package/dist/components/tooltip/index.d.ts +17 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/components/tooltip/tooltip.d.ts +20 -0
- package/dist/components/tooltip/tooltip.js +105 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/hooks/use-isomorphic-layout-effect.js +5 -0
- package/dist/hooks/use-list-data.d.ts +111 -0
- package/dist/hooks/use-media-query.d.ts +6 -0
- package/dist/hooks/use-media-query.js +49 -0
- package/dist/hooks/use-overlay-state.d.ts +52 -0
- package/dist/hooks/use-pagination.d.ts +48 -0
- package/dist/hooks/use-pagination.js +114 -0
- package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
- package/dist/hooks/use-safe-layout-effect.js +5 -0
- package/dist/index.js +111 -26
- package/dist/node_modules/.pnpm/@internationalized_string@3.2.7/node_modules/@internationalized/string/dist/LocalizedStringDictionary.js +74 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ar-AE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/bg-BG.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/cs-CZ.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/da-DK.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/de-DE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/el-GR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/en-US.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/es-ES.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/et-EE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/fi-FI.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/fr-FR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/he-IL.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/hr-HR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/hu-HU.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/index.js +80 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/it-IT.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ja-JP.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ko-KR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/lt-LT.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/lv-LV.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/nb-NO.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/nl-NL.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pl-PL.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pt-BR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pt-PT.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ro-RO.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ru-RU.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sk-SK.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sl-SI.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sr-SP.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sv-SE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/tr-TR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/uk-UA.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/zh-CN.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/zh-TW.js +3 -0
- package/dist/packages/styles/src/components/accordion/accordion.styles.js +26 -0
- package/dist/packages/styles/src/components/alert/alert.styles.js +35 -0
- package/dist/packages/styles/src/components/alert-dialog/alert-dialog.styles.js +70 -0
- package/dist/packages/styles/src/components/avatar/avatar.styles.js +51 -0
- package/dist/packages/styles/src/components/breadcrumbs/breadcrumbs.styles.js +12 -0
- package/dist/packages/styles/src/components/chip/chip.styles.js +31 -0
- package/dist/packages/styles/src/components/container/container.styles.js +18 -0
- package/dist/packages/styles/src/components/dropdown/dropdown.styles.js +12 -0
- package/dist/packages/styles/src/components/empty/empty.styles.js +30 -0
- package/dist/packages/styles/src/components/empty-state/empty-state.styles.js +7 -0
- package/dist/packages/styles/src/components/fieldset/fieldset.styles.js +13 -0
- package/dist/packages/styles/src/components/header/header.styles.js +7 -0
- package/dist/packages/styles/src/components/heading/heading.styles.js +19 -0
- package/dist/packages/styles/src/components/input-group/input-group.styles.js +32 -0
- package/dist/packages/styles/src/components/input-otp/input-otp.styles.js +28 -0
- package/dist/packages/styles/src/components/kbd/kbd.styles.js +18 -0
- package/dist/packages/styles/src/components/link/link.styles.js +12 -0
- package/dist/packages/styles/src/components/listbox/listbox.styles.js +16 -0
- package/dist/packages/styles/src/components/listbox-item/listbox-item.styles.js +23 -0
- package/dist/packages/styles/src/components/listbox-section/listbox-section.styles.js +7 -0
- package/dist/packages/styles/src/components/menu/menu.styles.js +7 -0
- package/dist/packages/styles/src/components/menu-item/menu-item.styles.js +24 -0
- package/dist/packages/styles/src/components/menu-section/menu-section.styles.js +7 -0
- package/dist/packages/styles/src/components/modal/modal.styles.js +68 -0
- package/dist/packages/styles/src/components/number-field/number-field.styles.js +34 -0
- package/dist/packages/styles/src/components/pagination/pagination.styles.js +33 -0
- package/dist/packages/styles/src/components/radio/radio.styles.js +12 -0
- package/dist/packages/styles/src/components/radio-group/radio-group.styles.js +16 -0
- package/dist/packages/styles/src/components/scroll-shadow/scroll-shadow.styles.js +35 -0
- package/dist/packages/styles/src/components/select/select.styles.js +34 -0
- package/dist/packages/styles/src/components/separator/separator.styles.js +16 -0
- package/dist/packages/styles/src/components/slider/slider.styles.js +14 -0
- package/dist/packages/styles/src/components/spinner/spinner.styles.js +26 -0
- package/dist/packages/styles/src/components/switch/switch.styles.js +28 -0
- package/dist/packages/styles/src/components/tabs/tabs.styles.js +27 -0
- package/dist/packages/styles/src/components/tag/tag.styles.js +35 -0
- package/dist/packages/styles/src/components/tag-group/tag-group.styles.js +10 -0
- package/dist/packages/styles/src/components/textarea/textarea.styles.js +21 -0
- package/dist/packages/styles/src/components/toast/toast.styles.js +65 -0
- package/dist/packages/styles/src/components/toggle-button/toggle-button.styles.js +36 -0
- package/dist/packages/styles/src/components/toggle-button-group/toggle-button-group.styles.js +36 -0
- package/dist/packages/styles/src/components/tooltip/tooltip.styles.js +10 -0
- package/dist/utils/children.d.ts +9 -0
- package/dist/utils/children.js +17 -0
- package/dist/utils/compose.js +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/merge-props.d.ts +26 -0
- package/dist/utils/merge-props.js +72 -0
- package/dist/utils/merge-refs.d.ts +5 -0
- package/dist/utils/merge-refs.js +48 -0
- package/package.json +13 -7
- package/dist/components/field-group/field-group.d.ts +0 -11
- package/dist/components/field-group/field-group.js +0 -18
- package/dist/components/field-group/index.d.ts +0 -13
- package/dist/components/field-group/index.js +0 -11
- package/dist/styles/src/components/field-group/field-group.styles.js +0 -25
- package/dist/styles/src/utils/state.js +0 -13
- /package/dist/{styles → packages/styles}/src/components/button/button.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/button-group/button-group.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/calendar/calendar.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/card/card.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/checkbox/checkbox.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/checkbox-group/checkbox-group.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/close-button/close-button.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/combobox/combobox.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-field/date-field.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-input-group/date-input-group.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-picker/date-picker.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-range-picker/date-range-picker.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/description/description.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/error-message/error-message.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/field-error/field-error.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/input/input.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/label/label.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/popover/popover.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/range-calendar/range-calendar.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/surface/surface.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/text-field/text-field.styles.js +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { KbdAbbr, KbdContent, KbdRoot } from "./kbd";
|
|
3
|
+
export declare const Kbd: (({ children, className, variant, ...props }: import("./kbd").KbdRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, variant, ...props }: import("./kbd").KbdRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Abbr: ({ className, keyValue, ...props }: import("./kbd").KbdAbbrProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Content: ({ children, className, ...props }: import("./kbd").KbdContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export type Kbd = {
|
|
9
|
+
Props: ComponentProps<typeof KbdRoot>;
|
|
10
|
+
RootProps: ComponentProps<typeof KbdRoot>;
|
|
11
|
+
AbbrProps: ComponentProps<typeof KbdAbbr>;
|
|
12
|
+
ContentProps: ComponentProps<typeof KbdContent>;
|
|
13
|
+
};
|
|
14
|
+
export { KbdRoot, KbdAbbr, KbdContent };
|
|
15
|
+
export type { KbdRootProps, KbdAbbrProps, KbdContentProps, KbdRootProps as KbdProps } from "./kbd";
|
|
16
|
+
export { kbdKeysMap, kbdKeysLabelMap } from "./kbd.constants";
|
|
17
|
+
export type { KbdKey } from "./kbd.constants";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { KbdRoot, KbdContent, KbdAbbr } from './kbd.js';
|
|
2
|
+
export { kbdKeysLabelMap, kbdKeysMap } from './kbd.constants.js';
|
|
3
|
+
|
|
4
|
+
/* -------------------------------------------------------------------------------------------------
|
|
5
|
+
* Compound Component
|
|
6
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
7
|
+
const Kbd = Object.assign(KbdRoot, {
|
|
8
|
+
Root: KbdRoot,
|
|
9
|
+
Abbr: KbdAbbr,
|
|
10
|
+
Content: KbdContent
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { Kbd, KbdAbbr, KbdContent, KbdRoot };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type KbdKey = "command" | "shift" | "ctrl" | "option" | "enter" | "delete" | "escape" | "tab" | "capslock" | "up" | "right" | "down" | "left" | "pageup" | "pagedown" | "home" | "end" | "help" | "space" | "fn" | "win" | "alt";
|
|
2
|
+
export declare const kbdKeysMap: Record<KbdKey, string>;
|
|
3
|
+
export declare const kbdKeysLabelMap: Record<KbdKey, string>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const kbdKeysMap = {
|
|
2
|
+
command: "⌘",
|
|
3
|
+
shift: "⇧",
|
|
4
|
+
ctrl: "⌃",
|
|
5
|
+
option: "⌥",
|
|
6
|
+
enter: "↵",
|
|
7
|
+
delete: "⌫",
|
|
8
|
+
escape: "⎋",
|
|
9
|
+
tab: "⇥",
|
|
10
|
+
capslock: "⇪",
|
|
11
|
+
up: "↑",
|
|
12
|
+
right: "→",
|
|
13
|
+
down: "↓",
|
|
14
|
+
left: "←",
|
|
15
|
+
pageup: "⇞",
|
|
16
|
+
pagedown: "⇟",
|
|
17
|
+
home: "↖",
|
|
18
|
+
end: "↘",
|
|
19
|
+
help: "?",
|
|
20
|
+
space: "␣",
|
|
21
|
+
fn: "Fn",
|
|
22
|
+
win: "⌘",
|
|
23
|
+
alt: "⌥"
|
|
24
|
+
};
|
|
25
|
+
const kbdKeysLabelMap = {
|
|
26
|
+
command: "Command",
|
|
27
|
+
shift: "Shift",
|
|
28
|
+
ctrl: "Control",
|
|
29
|
+
option: "Option",
|
|
30
|
+
enter: "Enter",
|
|
31
|
+
delete: "Delete",
|
|
32
|
+
escape: "Escape",
|
|
33
|
+
tab: "Tab",
|
|
34
|
+
capslock: "Caps Lock",
|
|
35
|
+
up: "Up",
|
|
36
|
+
right: "Right",
|
|
37
|
+
down: "Down",
|
|
38
|
+
left: "Left",
|
|
39
|
+
pageup: "Page Up",
|
|
40
|
+
pagedown: "Page Down",
|
|
41
|
+
home: "Home",
|
|
42
|
+
end: "End",
|
|
43
|
+
help: "Help",
|
|
44
|
+
space: "Space",
|
|
45
|
+
fn: "Fn",
|
|
46
|
+
win: "Win",
|
|
47
|
+
alt: "Alt"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { kbdKeysLabelMap, kbdKeysMap };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { KbdKey } from "./kbd.constants";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import type { KbdVariants } from "@arobo/styles";
|
|
5
|
+
interface KbdRootProps extends ComponentPropsWithRef<"kbd">, KbdVariants {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const KbdRoot: ({ children, className, variant, ...props }: KbdRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface KbdAbbrProps extends ComponentPropsWithRef<"abbr"> {
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The keyboard key to display
|
|
14
|
+
*/
|
|
15
|
+
keyValue: KbdKey;
|
|
16
|
+
}
|
|
17
|
+
declare const KbdAbbr: ({ className, keyValue, ...props }: KbdAbbrProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
interface KbdContentProps extends ComponentPropsWithRef<"span"> {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const KbdContent: ({ children, className, ...props }: KbdContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { KbdRoot, KbdAbbr, KbdContent };
|
|
24
|
+
export type { KbdRootProps, KbdAbbrProps, KbdContentProps };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { composeSlotClassName } from '../../utils/compose.js';
|
|
3
|
+
import { kbdKeysMap, kbdKeysLabelMap } from './kbd.constants.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { kbdVariants } from '../../packages/styles/src/components/kbd/kbd.styles.js';
|
|
6
|
+
|
|
7
|
+
const KbdContext = /*#__PURE__*/createContext({});
|
|
8
|
+
|
|
9
|
+
/* -------------------------------------------------------------------------------------------------
|
|
10
|
+
* Kbd Root
|
|
11
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
12
|
+
|
|
13
|
+
const KbdRoot = ({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
variant,
|
|
17
|
+
...props
|
|
18
|
+
}) => {
|
|
19
|
+
const slots = React__default.useMemo(() => kbdVariants({
|
|
20
|
+
variant
|
|
21
|
+
}), [variant]);
|
|
22
|
+
return /*#__PURE__*/jsx(KbdContext, {
|
|
23
|
+
value: {
|
|
24
|
+
slots
|
|
25
|
+
},
|
|
26
|
+
children: /*#__PURE__*/jsx("kbd", {
|
|
27
|
+
...props,
|
|
28
|
+
className: slots.base({
|
|
29
|
+
className
|
|
30
|
+
}),
|
|
31
|
+
children: children
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/* -------------------------------------------------------------------------------------------------
|
|
37
|
+
* Kbd Abbr
|
|
38
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
39
|
+
|
|
40
|
+
const KbdAbbr = ({
|
|
41
|
+
className,
|
|
42
|
+
keyValue,
|
|
43
|
+
...props
|
|
44
|
+
}) => {
|
|
45
|
+
const {
|
|
46
|
+
slots
|
|
47
|
+
} = useContext(KbdContext);
|
|
48
|
+
return /*#__PURE__*/jsx("abbr", {
|
|
49
|
+
className: composeSlotClassName(slots?.abbr, className),
|
|
50
|
+
title: kbdKeysLabelMap[keyValue],
|
|
51
|
+
...props,
|
|
52
|
+
children: kbdKeysMap[keyValue]
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/* -------------------------------------------------------------------------------------------------
|
|
57
|
+
* Kbd Content
|
|
58
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
59
|
+
|
|
60
|
+
const KbdContent = ({
|
|
61
|
+
children,
|
|
62
|
+
className,
|
|
63
|
+
...props
|
|
64
|
+
}) => {
|
|
65
|
+
const {
|
|
66
|
+
slots
|
|
67
|
+
} = useContext(KbdContext);
|
|
68
|
+
return /*#__PURE__*/jsx("span", {
|
|
69
|
+
className: composeSlotClassName(slots?.content, className),
|
|
70
|
+
...props,
|
|
71
|
+
children: children
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { KbdAbbr, KbdContent, KbdRoot };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LabelRoot } from './label.js';
|
|
2
|
-
export { labelVariants } from '../../styles/src/components/label/label.styles.js';
|
|
2
|
+
export { labelVariants } from '../../packages/styles/src/components/label/label.styles.js';
|
|
3
3
|
|
|
4
4
|
/* -------------------------------------------------------------------------------------------------
|
|
5
5
|
* Compound Component
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Label } from 'react-aria-components';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { labelVariants } from '../../styles/src/components/label/label.styles.js';
|
|
3
|
+
import { labelVariants } from '../../packages/styles/src/components/label/label.styles.js';
|
|
4
4
|
|
|
5
5
|
const LabelRoot = ({
|
|
6
6
|
children,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { LinkIcon, LinkRoot } from "./link";
|
|
3
|
+
export declare const Link: (({ children, className, ...props }: import("./link").LinkRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, ...props }: import("./link").LinkRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Icon: ({ children, className, ...rest }: import("./link").LinkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export type Link = {
|
|
8
|
+
Props: ComponentProps<typeof LinkRoot>;
|
|
9
|
+
RootProps: ComponentProps<typeof LinkRoot>;
|
|
10
|
+
IconProps: ComponentProps<typeof LinkIcon>;
|
|
11
|
+
};
|
|
12
|
+
export { LinkRoot, LinkIcon };
|
|
13
|
+
export type { LinkRootProps, LinkIconProps, LinkRootProps as LinkProps } from "./link";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LinkRoot, LinkIcon } from './link.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const Link = Object.assign(LinkRoot, {
|
|
7
|
+
Root: LinkRoot,
|
|
8
|
+
Icon: LinkIcon
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { Link, LinkIcon, LinkRoot };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { Link as LinkPrimitive } from "react-aria-components";
|
|
3
|
+
import type { LinkVariants } from "@arobo/styles";
|
|
4
|
+
interface LinkRootProps extends ComponentPropsWithRef<typeof LinkPrimitive>, LinkVariants {
|
|
5
|
+
}
|
|
6
|
+
declare const LinkRoot: ({ children, className, ...props }: LinkRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
type LinkIconProps = ComponentPropsWithRef<"span">;
|
|
8
|
+
declare const LinkIcon: ({ children, className, ...rest }: LinkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { LinkRoot, LinkIcon };
|
|
10
|
+
export type { LinkRootProps, LinkIconProps };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { Link } from 'react-aria-components';
|
|
3
|
+
import { dataAttr } from '../../utils/assertion.js';
|
|
4
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
5
|
+
import { ExternalLinkIcon } from '../icons.js';
|
|
6
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import { linkVariants } from '../../packages/styles/src/components/link/link.styles.js';
|
|
8
|
+
|
|
9
|
+
const LinkContext = /*#__PURE__*/createContext({});
|
|
10
|
+
|
|
11
|
+
/* ------------------------------------------------------------------------------------------------
|
|
12
|
+
* Link Root
|
|
13
|
+
* --------------------------------------------------------------------------------------------- */
|
|
14
|
+
|
|
15
|
+
const LinkRoot = ({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
20
|
+
const slots = React__default.useMemo(() => linkVariants(), []);
|
|
21
|
+
return /*#__PURE__*/jsx(LinkContext, {
|
|
22
|
+
value: {
|
|
23
|
+
slots
|
|
24
|
+
},
|
|
25
|
+
children: /*#__PURE__*/jsx(Link, {
|
|
26
|
+
...props,
|
|
27
|
+
className: composeTwRenderProps(className, slots?.base()),
|
|
28
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
29
|
+
children: typeof children === "function" ? children(values) : children
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/* ------------------------------------------------------------------------------------------------
|
|
36
|
+
* Link Icon
|
|
37
|
+
* --------------------------------------------------------------------------------------------- */
|
|
38
|
+
|
|
39
|
+
const LinkIcon = ({
|
|
40
|
+
children,
|
|
41
|
+
className,
|
|
42
|
+
...rest
|
|
43
|
+
}) => {
|
|
44
|
+
const {
|
|
45
|
+
slots
|
|
46
|
+
} = useContext(LinkContext);
|
|
47
|
+
return /*#__PURE__*/jsx("span", {
|
|
48
|
+
className: composeSlotClassName(slots?.icon, className),
|
|
49
|
+
"data-default-icon": dataAttr(!children),
|
|
50
|
+
"data-slot": "link-icon",
|
|
51
|
+
...rest,
|
|
52
|
+
children: children ?? /*#__PURE__*/jsx(ExternalLinkIcon, {
|
|
53
|
+
"data-slot": "link-default-icon"
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { LinkIcon, LinkRoot };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { ListBoxItem } from "../listbox-item";
|
|
3
|
+
import { ListBoxSection } from "../listbox-section";
|
|
4
|
+
import { ListBoxRoot } from "./listbox";
|
|
5
|
+
export declare const ListBox: typeof ListBoxRoot & {
|
|
6
|
+
Root: typeof ListBoxRoot;
|
|
7
|
+
Item: (({ children, className, variant, ...props }: import("..").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
Root: ({ children, className, variant, ...props }: import("..").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Indicator: ({ children, className, ...props }: import("..").ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
ItemIndicator: ({ children, className, ...props }: import("..").ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Section: ({ children, className, ...props }: import("..").ListBoxSectionRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export type ListBox = {
|
|
15
|
+
Props: ComponentProps<typeof ListBoxRoot>;
|
|
16
|
+
RootProps: ComponentProps<typeof ListBoxRoot>;
|
|
17
|
+
ItemProps: ComponentProps<typeof ListBoxItem>;
|
|
18
|
+
SectionProps: ComponentProps<typeof ListBoxSection>;
|
|
19
|
+
};
|
|
20
|
+
export { ListBoxRoot };
|
|
21
|
+
export type { ListBoxRootProps, ListBoxRootProps as ListBoxProps } from "./listbox";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ListBoxItem } from '../listbox-item/index.js';
|
|
2
|
+
import { ListBoxSection } from '../listbox-section/index.js';
|
|
3
|
+
import { ListBoxRoot } from './listbox.js';
|
|
4
|
+
import { ListBoxItemIndicator } from '../listbox-item/listbox-item.js';
|
|
5
|
+
|
|
6
|
+
/* -------------------------------------------------------------------------------------------------
|
|
7
|
+
* Compound Component
|
|
8
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
9
|
+
const ListBox = Object.assign(ListBoxRoot, {
|
|
10
|
+
Root: ListBoxRoot,
|
|
11
|
+
Item: ListBoxItem,
|
|
12
|
+
ItemIndicator: ListBoxItemIndicator,
|
|
13
|
+
Section: ListBoxSection
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { ListBox, ListBoxRoot };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { ListBox as ListBoxPrimitive } from "react-aria-components";
|
|
3
|
+
import type { ListBoxVariants } from "@arobo/styles";
|
|
4
|
+
interface ListBoxRootProps<T extends object> extends ComponentPropsWithRef<typeof ListBoxPrimitive<T>>, ListBoxVariants {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function ListBoxRoot<T extends object>({ className, variant, ...props }: ListBoxRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { ListBoxRoot };
|
|
9
|
+
export type { ListBoxRootProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ListBox } from 'react-aria-components';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { listboxVariants } from '../../packages/styles/src/components/listbox/listbox.styles.js';
|
|
5
|
+
import { composeTwRenderProps } from '../../utils/compose.js';
|
|
6
|
+
|
|
7
|
+
function ListBoxRoot({
|
|
8
|
+
className,
|
|
9
|
+
variant,
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
const styles = React__default.useMemo(() => listboxVariants({
|
|
13
|
+
variant
|
|
14
|
+
}), [variant]);
|
|
15
|
+
return /*#__PURE__*/jsx(ListBox, {
|
|
16
|
+
className: composeTwRenderProps(className, styles),
|
|
17
|
+
"data-slot": "listbox",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { ListBoxRoot };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type Key = string | number;
|
|
2
|
+
export interface SingleSelection {
|
|
3
|
+
/** Whether the collection allows empty selection. */
|
|
4
|
+
disallowEmptySelection?: boolean;
|
|
5
|
+
/** The currently selected key in the collection (controlled). */
|
|
6
|
+
selectedKey?: Key | null;
|
|
7
|
+
/** The initial selected key in the collection (uncontrolled). */
|
|
8
|
+
defaultSelectedKey?: Key;
|
|
9
|
+
/** Handler that is called when the selection changes. */
|
|
10
|
+
onSelectionChange?: (key: Key | null) => void;
|
|
11
|
+
}
|
|
12
|
+
export type SelectionMode = 'none' | 'single' | 'multiple';
|
|
13
|
+
export type SelectionBehavior = 'toggle' | 'replace';
|
|
14
|
+
export type Selection = 'all' | Set<Key>;
|
|
15
|
+
export interface MultipleSelection {
|
|
16
|
+
/** The type of selection that is allowed in the collection. */
|
|
17
|
+
selectionMode?: SelectionMode;
|
|
18
|
+
/** Whether the collection allows empty selection. */
|
|
19
|
+
disallowEmptySelection?: boolean;
|
|
20
|
+
/** The currently selected keys in the collection (controlled). */
|
|
21
|
+
selectedKeys?: 'all' | Iterable<Key>;
|
|
22
|
+
/** The initial selected keys in the collection (uncontrolled). */
|
|
23
|
+
defaultSelectedKeys?: 'all' | Iterable<Key>;
|
|
24
|
+
/** Handler that is called when the selection changes. */
|
|
25
|
+
onSelectionChange?: (keys: Selection) => void;
|
|
26
|
+
/** The currently disabled keys in the collection (controlled). */
|
|
27
|
+
disabledKeys?: Iterable<Key>;
|
|
28
|
+
}
|
|
29
|
+
export interface SpectrumSelectionProps {
|
|
30
|
+
/** How selection should be displayed. */
|
|
31
|
+
selectionStyle?: 'checkbox' | 'highlight';
|
|
32
|
+
}
|
|
33
|
+
export type FocusStrategy = 'first' | 'last';
|
|
34
|
+
export type DisabledBehavior = 'selection' | 'all';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { ListBoxItemIndicator, ListBoxItemRoot } from "./listbox-item";
|
|
3
|
+
export declare const ListBoxItem: (({ children, className, variant, ...props }: import("./listbox-item").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, variant, ...props }: import("./listbox-item").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Indicator: ({ children, className, ...props }: import("./listbox-item").ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export type ListBoxItem = {
|
|
8
|
+
Props: ComponentProps<typeof ListBoxItemRoot>;
|
|
9
|
+
RootProps: ComponentProps<typeof ListBoxItemRoot>;
|
|
10
|
+
IndicatorProps: ComponentProps<typeof ListBoxItemIndicator>;
|
|
11
|
+
};
|
|
12
|
+
export { ListBoxItemRoot, ListBoxItemIndicator };
|
|
13
|
+
export type { ListBoxItemRootProps, ListBoxItemRootProps as ListBoxItemProps, ListBoxItemIndicatorProps, } from "./listbox-item";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ListBoxItemRoot, ListBoxItemIndicator } from './listbox-item.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const ListBoxItem = Object.assign(ListBoxItemRoot, {
|
|
7
|
+
Root: ListBoxItemRoot,
|
|
8
|
+
Indicator: ListBoxItemIndicator
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { ListBoxItem, ListBoxItemIndicator, ListBoxItemRoot };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { ListBoxItemRenderProps } from "react-aria-components";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { ListBoxItem as ListBoxItemPrimitive } from "react-aria-components";
|
|
5
|
+
import { type ListBoxItemVariants } from "@arobo/styles";
|
|
6
|
+
interface ListBoxItemRootProps extends ComponentPropsWithRef<typeof ListBoxItemPrimitive>, ListBoxItemVariants {
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const ListBoxItemRoot: ({ children, className, variant, ...props }: ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface ListBoxItemIndicatorProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
11
|
+
children?: React.ReactNode | ((props: ListBoxItemRenderProps) => React.ReactNode);
|
|
12
|
+
}
|
|
13
|
+
declare const ListBoxItemIndicator: ({ children, className, ...props }: ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { ListBoxItemRoot, ListBoxItemIndicator };
|
|
15
|
+
export type { ListBoxItemRootProps, ListBoxItemIndicatorProps };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { ListBoxItem } from 'react-aria-components';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { listboxItemVariants } from '../../packages/styles/src/components/listbox-item/listbox-item.styles.js';
|
|
5
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
6
|
+
|
|
7
|
+
const ListBoxItemContext = /*#__PURE__*/createContext({});
|
|
8
|
+
|
|
9
|
+
/* -------------------------------------------------------------------------------------------------
|
|
10
|
+
* ListBox Item Root
|
|
11
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
12
|
+
|
|
13
|
+
const ListBoxItemRoot = ({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
variant,
|
|
17
|
+
...props
|
|
18
|
+
}) => {
|
|
19
|
+
const slots = React__default.useMemo(() => listboxItemVariants({
|
|
20
|
+
variant
|
|
21
|
+
}), [variant]);
|
|
22
|
+
return /*#__PURE__*/jsx(ListBoxItem, {
|
|
23
|
+
className: composeTwRenderProps(className, slots.item()),
|
|
24
|
+
"data-slot": "listbox-item",
|
|
25
|
+
...props,
|
|
26
|
+
children: values => /*#__PURE__*/jsx(ListBoxItemContext, {
|
|
27
|
+
value: {
|
|
28
|
+
slots,
|
|
29
|
+
state: values
|
|
30
|
+
},
|
|
31
|
+
children: typeof children === "function" ? children(values) : children
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/* -------------------------------------------------------------------------------------------------
|
|
37
|
+
* ListBox Item Indicator
|
|
38
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
39
|
+
|
|
40
|
+
const ListBoxItemIndicator = ({
|
|
41
|
+
children,
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}) => {
|
|
45
|
+
const {
|
|
46
|
+
slots,
|
|
47
|
+
state
|
|
48
|
+
} = useContext(ListBoxItemContext);
|
|
49
|
+
const isSelected = state?.isSelected;
|
|
50
|
+
const content = typeof children === "function" ? children(state ?? {}) : children ? children : /*#__PURE__*/jsx("svg", {
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
"data-slot": "listbox-item-indicator--checkmark",
|
|
53
|
+
fill: "none",
|
|
54
|
+
role: "presentation",
|
|
55
|
+
stroke: "currentColor",
|
|
56
|
+
strokeDasharray: 22,
|
|
57
|
+
strokeDashoffset: isSelected ? 44 : 66,
|
|
58
|
+
strokeLinecap: "round",
|
|
59
|
+
strokeLinejoin: "round",
|
|
60
|
+
strokeWidth: 2,
|
|
61
|
+
viewBox: "0 0 17 18",
|
|
62
|
+
children: /*#__PURE__*/jsx("polyline", {
|
|
63
|
+
points: "1 9 7 14 15 4"
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
return /*#__PURE__*/jsx("span", {
|
|
67
|
+
"aria-hidden": "true",
|
|
68
|
+
className: composeSlotClassName(slots?.indicator, className),
|
|
69
|
+
"data-slot": "listbox-item-indicator",
|
|
70
|
+
"data-visible": isSelected || undefined,
|
|
71
|
+
...props,
|
|
72
|
+
children: content
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { ListBoxItemIndicator, ListBoxItemRoot };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { ListBoxSectionRoot } from "./listbox-section";
|
|
3
|
+
export declare const ListBoxSection: ({ children, className, ...props }: import("./listbox-section").ListBoxSectionRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type ListBoxSection = {
|
|
5
|
+
Props: ComponentProps<typeof ListBoxSectionRoot>;
|
|
6
|
+
};
|
|
7
|
+
export { ListBoxSectionRoot };
|
|
8
|
+
export type { ListBoxSectionRootProps, ListBoxSectionRootProps as ListBoxSectionProps, } from "./listbox-section";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ListBoxSectionRoot } from './listbox-section.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const ListBoxSection = ListBoxSectionRoot;
|
|
7
|
+
|
|
8
|
+
export { ListBoxSection, ListBoxSectionRoot };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { ListBoxSection as ListBoxSectionPrimitive } from "react-aria-components";
|
|
3
|
+
interface ListBoxSectionRootProps extends ComponentPropsWithRef<typeof ListBoxSectionPrimitive> {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ListBoxSectionRoot: ({ children, className, ...props }: ListBoxSectionRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { ListBoxSectionRoot };
|
|
8
|
+
export type { ListBoxSectionRootProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ListBoxSection } from 'react-aria-components';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { listboxSectionVariants } from '../../packages/styles/src/components/listbox-section/listbox-section.styles.js';
|
|
5
|
+
|
|
6
|
+
const ListBoxSectionRoot = ({
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}) => {
|
|
11
|
+
const styles = React__default.useMemo(() => listboxSectionVariants({
|
|
12
|
+
class: typeof className === "string" ? className : undefined
|
|
13
|
+
}), [className]);
|
|
14
|
+
return /*#__PURE__*/jsx(ListBoxSection, {
|
|
15
|
+
className: styles,
|
|
16
|
+
...props,
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { ListBoxSectionRoot };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MenuItemRoot } from "../menu-item";
|
|
2
|
+
import type { MenuSectionRoot } from "../menu-section";
|
|
3
|
+
import type { ComponentProps } from "react";
|
|
4
|
+
import { MenuRoot } from "./menu";
|
|
5
|
+
export declare const Menu: typeof MenuRoot & {
|
|
6
|
+
Root: typeof MenuRoot;
|
|
7
|
+
Item: (({ children, className, variant, ...props }: import("..").MenuItemRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
Root: ({ children, className, variant, ...props }: import("..").MenuItemRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Indicator: ({ children, className, type, ...props }: import("..").MenuItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
SubmenuIndicator: ({ children, className, ...props }: import("..").MenuItemSubmenuIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
};
|
|
12
|
+
ItemIndicator: ({ children, className, type, ...props }: import("..").MenuItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Section: ({ children, className, ...props }: import("..").MenuSectionRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export type Menu<T extends object = object> = {
|
|
16
|
+
Props: ComponentProps<typeof MenuRoot<T>>;
|
|
17
|
+
RootProps: ComponentProps<typeof MenuRoot<T>>;
|
|
18
|
+
ItemProps: ComponentProps<typeof MenuItemRoot>;
|
|
19
|
+
SectionProps: ComponentProps<typeof MenuSectionRoot>;
|
|
20
|
+
};
|
|
21
|
+
export { MenuRoot };
|
|
22
|
+
export type { MenuRootProps, MenuRootProps as MenuProps } from "./menu";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MenuItem } from '../menu-item/index.js';
|
|
2
|
+
import { MenuSection } from '../menu-section/index.js';
|
|
3
|
+
import { MenuRoot } from './menu.js';
|
|
4
|
+
import { MenuItemIndicator } from '../menu-item/menu-item.js';
|
|
5
|
+
|
|
6
|
+
/* -------------------------------------------------------------------------------------------------
|
|
7
|
+
* Compound Component
|
|
8
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
9
|
+
const Menu = Object.assign(MenuRoot, {
|
|
10
|
+
Root: MenuRoot,
|
|
11
|
+
Item: MenuItem,
|
|
12
|
+
ItemIndicator: MenuItemIndicator,
|
|
13
|
+
Section: MenuSection
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { Menu, MenuRoot };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { Menu as MenuPrimitive } from "react-aria-components";
|
|
3
|
+
import type { MenuVariants } from "@arobo/styles";
|
|
4
|
+
interface MenuRootProps<T extends object> extends ComponentPropsWithRef<typeof MenuPrimitive<T>>, MenuVariants {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function MenuRoot<T extends object>({ className, ...props }: MenuRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { MenuRoot };
|
|
9
|
+
export type { MenuRootProps };
|