@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,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "react-aria-components";
|
|
3
|
+
import type { RadioGroupVariants } from "@arobo/styles";
|
|
4
|
+
interface RadioGroupRootProps extends ComponentPropsWithRef<typeof RadioGroupPrimitive>, RadioGroupVariants {
|
|
5
|
+
}
|
|
6
|
+
declare const RadioGroupRoot: ({ children, className, variant, ...props }: RadioGroupRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { RadioGroupRoot };
|
|
8
|
+
export type { RadioGroupRootProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { RadioGroup } from 'react-aria-components';
|
|
3
|
+
import { composeTwRenderProps } from '../../utils/compose.js';
|
|
4
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import { radioGroupVariants } from '../../packages/styles/src/components/radio-group/radio-group.styles.js';
|
|
6
|
+
|
|
7
|
+
const RadioGroupRoot = ({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
variant,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
const styles = React__default.useMemo(() => radioGroupVariants({
|
|
14
|
+
variant
|
|
15
|
+
}), [variant]);
|
|
16
|
+
return /*#__PURE__*/jsx(RadioGroup, {
|
|
17
|
+
"data-slot": "radio-group",
|
|
18
|
+
...props,
|
|
19
|
+
className: composeTwRenderProps(className, styles),
|
|
20
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
21
|
+
children: typeof children === "function" ? children(values) : children
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { RadioGroupRoot };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RangeCalendarRoot } from './range-calendar.js';
|
|
2
|
-
export { rangeCalendarVariants } from '../../styles/src/components/range-calendar/range-calendar.styles.js';
|
|
2
|
+
export { rangeCalendarVariants } from '../../packages/styles/src/components/range-calendar/range-calendar.styles.js';
|
|
3
3
|
|
|
4
4
|
/* -------------------------------------------------------------------------------------------------
|
|
5
5
|
* Compound Component
|
|
@@ -2,7 +2,7 @@ import { RangeCalendar, CalendarGrid, CalendarGridBody, CalendarCell } from 'rea
|
|
|
2
2
|
import { ErrorMessage } from '../error-message/index.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { CalendarHeader, CalendarGridHeader } from '../calendar/calendar.js';
|
|
5
|
-
import { rangeCalendarVariants } from '../../styles/src/components/range-calendar/range-calendar.styles.js';
|
|
5
|
+
import { rangeCalendarVariants } from '../../packages/styles/src/components/range-calendar/range-calendar.styles.js';
|
|
6
6
|
import { composeTwRenderProps } from '../../utils/compose.js';
|
|
7
7
|
|
|
8
8
|
const RangeCalendarRoot = ({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { ScrollShadowRoot } from "./scroll-shadow";
|
|
3
|
+
export declare const ScrollShadow: {
|
|
4
|
+
({ children, className, hideScrollBar, isEnabled, offset, onVisibilityChange, orientation, ref, size, variant, visibility, ...props }: import("./scroll-shadow").ScrollShadowRootProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Root: {
|
|
8
|
+
({ children, className, hideScrollBar, isEnabled, offset, onVisibilityChange, orientation, ref, size, variant, visibility, ...props }: import("./scroll-shadow").ScrollShadowRootProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type ScrollShadow = {
|
|
13
|
+
Props: ComponentProps<typeof ScrollShadowRoot>;
|
|
14
|
+
RootProps: ComponentProps<typeof ScrollShadowRoot>;
|
|
15
|
+
};
|
|
16
|
+
export { ScrollShadowRoot };
|
|
17
|
+
export type { ScrollShadowRootProps, ScrollShadowRootProps as ScrollShadowProps, ScrollShadowVisibility, } from "./scroll-shadow";
|
|
18
|
+
export { useScrollShadow } from "./use-scroll-shadow";
|
|
19
|
+
export type { UseScrollShadowProps } from "./use-scroll-shadow";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScrollShadowRoot } from './scroll-shadow.js';
|
|
2
|
+
export { useScrollShadow } from './use-scroll-shadow.js';
|
|
3
|
+
|
|
4
|
+
/* -------------------------------------------------------------------------------------------------
|
|
5
|
+
* Component
|
|
6
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
7
|
+
const ScrollShadow = Object.assign(ScrollShadowRoot, {
|
|
8
|
+
Root: ScrollShadowRoot
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { ScrollShadow, ScrollShadowRoot };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ScrollShadowVariants } from "@arobo/styles";
|
|
2
|
+
export type ScrollShadowVisibility = "auto" | "both" | "top" | "bottom" | "left" | "right" | "none";
|
|
3
|
+
export interface ScrollShadowRootProps extends Omit<React.ComponentProps<"div">, "size">, ScrollShadowVariants {
|
|
4
|
+
/**
|
|
5
|
+
* The shadow size in pixels
|
|
6
|
+
* @default 40
|
|
7
|
+
*/
|
|
8
|
+
size?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The scroll offset before showing shadows (in pixels)
|
|
11
|
+
* @default 0
|
|
12
|
+
*/
|
|
13
|
+
offset?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Controlled shadow visibility state
|
|
16
|
+
* @default "auto"
|
|
17
|
+
*/
|
|
18
|
+
visibility?: ScrollShadowVisibility;
|
|
19
|
+
/**
|
|
20
|
+
* Whether scroll shadow detection is enabled
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
isEnabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Callback invoked when shadow visibility changes
|
|
26
|
+
*/
|
|
27
|
+
onVisibilityChange?: (visibility: ScrollShadowVisibility) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const ScrollShadowRoot: {
|
|
30
|
+
({ children, className, hideScrollBar, isEnabled, offset, onVisibilityChange, orientation, ref, size, variant, visibility, ...props }: ScrollShadowRootProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useRef, useMemo } from 'react';
|
|
2
|
+
import { useSafeLayoutEffect } from '../../hooks/use-safe-layout-effect.js';
|
|
3
|
+
import { useScrollShadow } from './use-scroll-shadow.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { scrollShadowVariants } from '../../packages/styles/src/components/scroll-shadow/scroll-shadow.styles.js';
|
|
6
|
+
import { mergeRefs } from '../../utils/merge-refs.js';
|
|
7
|
+
|
|
8
|
+
const ScrollShadowRoot = ({
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
hideScrollBar = false,
|
|
12
|
+
isEnabled = true,
|
|
13
|
+
offset = 0,
|
|
14
|
+
onVisibilityChange,
|
|
15
|
+
orientation = "vertical",
|
|
16
|
+
ref,
|
|
17
|
+
size = 40,
|
|
18
|
+
variant = "fade",
|
|
19
|
+
visibility = "auto",
|
|
20
|
+
...props
|
|
21
|
+
}) => {
|
|
22
|
+
const internalRef = useRef(null);
|
|
23
|
+
useScrollShadow({
|
|
24
|
+
containerRef: internalRef,
|
|
25
|
+
isEnabled,
|
|
26
|
+
offset,
|
|
27
|
+
onVisibilityChange,
|
|
28
|
+
orientation,
|
|
29
|
+
visibility
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Handle controlled visibility mode
|
|
33
|
+
useSafeLayoutEffect(() => {
|
|
34
|
+
const el = internalRef.current;
|
|
35
|
+
if (!el || visibility === "auto") return;
|
|
36
|
+
|
|
37
|
+
// Clear all data attributes
|
|
38
|
+
delete el.dataset["topScroll"];
|
|
39
|
+
delete el.dataset["bottomScroll"];
|
|
40
|
+
delete el.dataset["topBottomScroll"];
|
|
41
|
+
delete el.dataset["leftScroll"];
|
|
42
|
+
delete el.dataset["rightScroll"];
|
|
43
|
+
delete el.dataset["leftRightScroll"];
|
|
44
|
+
|
|
45
|
+
// Set controlled visibility
|
|
46
|
+
if (visibility === "both") {
|
|
47
|
+
el.dataset[orientation === "vertical" ? "topBottomScroll" : "leftRightScroll"] = "true";
|
|
48
|
+
} else if (visibility !== "none") {
|
|
49
|
+
el.dataset[`${visibility}Scroll`] = "true";
|
|
50
|
+
}
|
|
51
|
+
}, [visibility, orientation]);
|
|
52
|
+
const slots = useMemo(() => scrollShadowVariants({
|
|
53
|
+
hideScrollBar,
|
|
54
|
+
orientation,
|
|
55
|
+
variant
|
|
56
|
+
}), [orientation, hideScrollBar, variant]);
|
|
57
|
+
return /*#__PURE__*/jsx("div", {
|
|
58
|
+
ref: mergeRefs(internalRef, ref),
|
|
59
|
+
className: slots.base({
|
|
60
|
+
className
|
|
61
|
+
}),
|
|
62
|
+
"data-orientation": orientation,
|
|
63
|
+
"data-scroll-shadow-size": size,
|
|
64
|
+
style: {
|
|
65
|
+
// @ts-expect-error - CSS variables are not typed
|
|
66
|
+
"--scroll-shadow-size": `${size}px`,
|
|
67
|
+
...props.style
|
|
68
|
+
},
|
|
69
|
+
...props,
|
|
70
|
+
children: children
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
ScrollShadowRoot.displayName = "HeroUI.ScrollShadow";
|
|
74
|
+
|
|
75
|
+
export { ScrollShadowRoot };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ScrollShadowVisibility } from "./scroll-shadow";
|
|
2
|
+
import type { RefObject } from "react";
|
|
3
|
+
export interface UseScrollShadowProps {
|
|
4
|
+
containerRef: RefObject<HTMLElement>;
|
|
5
|
+
orientation: "vertical" | "horizontal";
|
|
6
|
+
offset: number;
|
|
7
|
+
visibility: ScrollShadowVisibility;
|
|
8
|
+
isEnabled: boolean;
|
|
9
|
+
onVisibilityChange?: (visibility: ScrollShadowVisibility) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const useScrollShadow: (props: UseScrollShadowProps) => void;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const useScrollShadow = props => {
|
|
4
|
+
const {
|
|
5
|
+
containerRef,
|
|
6
|
+
isEnabled,
|
|
7
|
+
offset,
|
|
8
|
+
onVisibilityChange,
|
|
9
|
+
orientation,
|
|
10
|
+
visibility
|
|
11
|
+
} = props;
|
|
12
|
+
|
|
13
|
+
// Cache previous state to avoid unnecessary DOM updates
|
|
14
|
+
const prevStateRef = useRef(null);
|
|
15
|
+
|
|
16
|
+
// Track pending RAF to avoid multiple scheduled updates
|
|
17
|
+
const rafIdRef = useRef(null);
|
|
18
|
+
const checkOverflow = useCallback(() => {
|
|
19
|
+
const el = containerRef.current;
|
|
20
|
+
if (!el) return;
|
|
21
|
+
const isVertical = orientation === "vertical";
|
|
22
|
+
const scrollStart = isVertical ? el.scrollTop : el.scrollLeft;
|
|
23
|
+
const scrollSize = isVertical ? el.scrollHeight : el.scrollWidth;
|
|
24
|
+
const clientSize = isVertical ? el.clientHeight : el.clientWidth;
|
|
25
|
+
const hasScrollBefore = scrollStart > offset;
|
|
26
|
+
const hasScrollAfter = scrollStart + clientSize + offset < scrollSize;
|
|
27
|
+
|
|
28
|
+
// Skip DOM updates if state hasn't changed
|
|
29
|
+
const prevState = prevStateRef.current;
|
|
30
|
+
if (prevState && prevState.hasScrollBefore === hasScrollBefore && prevState.hasScrollAfter === hasScrollAfter) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Update state cache
|
|
35
|
+
prevStateRef.current = {
|
|
36
|
+
hasScrollBefore,
|
|
37
|
+
hasScrollAfter
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Cancel previous pending update
|
|
41
|
+
if (rafIdRef.current !== null) {
|
|
42
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Batch DOM updates with RAF for better performance
|
|
46
|
+
rafIdRef.current = requestAnimationFrame(() => {
|
|
47
|
+
rafIdRef.current = null;
|
|
48
|
+
if (isVertical) {
|
|
49
|
+
if (hasScrollBefore && hasScrollAfter) {
|
|
50
|
+
el.dataset["topBottomScroll"] = "true";
|
|
51
|
+
delete el.dataset["topScroll"];
|
|
52
|
+
delete el.dataset["bottomScroll"];
|
|
53
|
+
onVisibilityChange?.("both");
|
|
54
|
+
} else {
|
|
55
|
+
el.dataset["topScroll"] = String(hasScrollBefore);
|
|
56
|
+
el.dataset["bottomScroll"] = String(hasScrollAfter);
|
|
57
|
+
delete el.dataset["topBottomScroll"];
|
|
58
|
+
if (onVisibilityChange) {
|
|
59
|
+
if (hasScrollBefore) {
|
|
60
|
+
onVisibilityChange("top");
|
|
61
|
+
} else if (hasScrollAfter) {
|
|
62
|
+
onVisibilityChange("bottom");
|
|
63
|
+
} else {
|
|
64
|
+
onVisibilityChange("none");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
if (hasScrollBefore && hasScrollAfter) {
|
|
70
|
+
el.dataset["leftRightScroll"] = "true";
|
|
71
|
+
delete el.dataset["leftScroll"];
|
|
72
|
+
delete el.dataset["rightScroll"];
|
|
73
|
+
onVisibilityChange?.("both");
|
|
74
|
+
} else {
|
|
75
|
+
el.dataset["leftScroll"] = String(hasScrollBefore);
|
|
76
|
+
el.dataset["rightScroll"] = String(hasScrollAfter);
|
|
77
|
+
delete el.dataset["leftRightScroll"];
|
|
78
|
+
if (onVisibilityChange) {
|
|
79
|
+
if (hasScrollBefore) {
|
|
80
|
+
onVisibilityChange("left");
|
|
81
|
+
} else if (hasScrollAfter) {
|
|
82
|
+
onVisibilityChange("right");
|
|
83
|
+
} else {
|
|
84
|
+
onVisibilityChange("none");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}, [containerRef, orientation, offset, onVisibilityChange]);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
const el = containerRef.current;
|
|
93
|
+
if (!el || !isEnabled || visibility !== "auto") return;
|
|
94
|
+
|
|
95
|
+
// Initial check
|
|
96
|
+
checkOverflow();
|
|
97
|
+
|
|
98
|
+
// Use passive listener for better scroll performance
|
|
99
|
+
el.addEventListener("scroll", checkOverflow, {
|
|
100
|
+
passive: true
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// Monitor size changes
|
|
104
|
+
const resizeObserver = new ResizeObserver(checkOverflow);
|
|
105
|
+
resizeObserver.observe(el);
|
|
106
|
+
return () => {
|
|
107
|
+
el.removeEventListener("scroll", checkOverflow);
|
|
108
|
+
resizeObserver.disconnect();
|
|
109
|
+
|
|
110
|
+
// Cancel pending RAF and cleanup cache
|
|
111
|
+
if (rafIdRef.current !== null) {
|
|
112
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
113
|
+
rafIdRef.current = null;
|
|
114
|
+
}
|
|
115
|
+
prevStateRef.current = null;
|
|
116
|
+
};
|
|
117
|
+
}, [containerRef, visibility, isEnabled, checkOverflow]);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { useScrollShadow };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { SelectIndicator, SelectPopover, SelectRoot, SelectTrigger, SelectValue } from "./select";
|
|
3
|
+
export declare const Select: (<T extends object = object, M extends "single" | "multiple" = "single">({ children, className, fullWidth, variant, ...props }: import("./select").SelectRootProps<T, M>) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: <T extends object = object, M extends "single" | "multiple" = "single">({ children, className, fullWidth, variant, ...props }: import("./select").SelectRootProps<T, M>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Trigger: ({ children, className, ...props }: import("./select").SelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Value: ({ children, className, ...props }: import("./select").SelectValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Indicator: ({ children, className, ...props }: import("./select").SelectIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Popover: ({ children, className, placement, ...props }: import("./select").SelectPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export type Select<T extends object = object> = {
|
|
11
|
+
Props: ComponentProps<typeof SelectRoot<T>>;
|
|
12
|
+
RootProps: ComponentProps<typeof SelectRoot<T>>;
|
|
13
|
+
TriggerProps: ComponentProps<typeof SelectTrigger>;
|
|
14
|
+
ValueProps: ComponentProps<typeof SelectValue>;
|
|
15
|
+
IndicatorProps: ComponentProps<typeof SelectIndicator>;
|
|
16
|
+
PopoverProps: ComponentProps<typeof SelectPopover>;
|
|
17
|
+
};
|
|
18
|
+
export { SelectIndicator, SelectPopover, SelectRoot, SelectTrigger, SelectValue };
|
|
19
|
+
export type { SelectRootProps, SelectRootProps as SelectProps, SelectTriggerProps, SelectValueProps, SelectIndicatorProps, SelectPopoverProps, } from "./select";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectRoot, SelectPopover, SelectIndicator, SelectValue, SelectTrigger } from './select.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const Select = Object.assign(SelectRoot, {
|
|
7
|
+
Root: SelectRoot,
|
|
8
|
+
Trigger: SelectTrigger,
|
|
9
|
+
Value: SelectValue,
|
|
10
|
+
Indicator: SelectIndicator,
|
|
11
|
+
Popover: SelectPopover
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { Select, SelectIndicator, SelectPopover, SelectRoot, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SelectVariants } from "@arobo/styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Button as ButtonPrimitive, Popover as PopoverPrimitive, Select as SelectPrimitive, SelectValue as SelectValuePrimitive } from "react-aria-components";
|
|
5
|
+
interface SelectRootProps<T extends object, M extends "single" | "multiple" = "single"> extends ComponentPropsWithRef<typeof SelectPrimitive<T, M>>, SelectVariants {
|
|
6
|
+
items?: Iterable<T, M>;
|
|
7
|
+
}
|
|
8
|
+
declare const SelectRoot: <T extends object = object, M extends "single" | "multiple" = "single">({ children, className, fullWidth, variant, ...props }: SelectRootProps<T, M>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface SelectTriggerProps extends ComponentPropsWithRef<typeof ButtonPrimitive> {
|
|
10
|
+
}
|
|
11
|
+
declare const SelectTrigger: ({ children, className, ...props }: SelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface SelectValueProps extends ComponentPropsWithRef<typeof SelectValuePrimitive> {
|
|
13
|
+
}
|
|
14
|
+
declare const SelectValue: ({ children, className, ...props }: SelectValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
interface SelectIndicatorProps extends ComponentPropsWithRef<"svg"> {
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const SelectIndicator: ({ children, className, ...props }: SelectIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface SelectPopoverProps extends Omit<ComponentPropsWithRef<typeof PopoverPrimitive>, "children"> {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare const SelectPopover: ({ children, className, placement, ...props }: SelectPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { SelectRoot, SelectTrigger, SelectValue, SelectIndicator, SelectPopover, };
|
|
24
|
+
export type { SelectRootProps, SelectTriggerProps, SelectValueProps, SelectIndicatorProps, SelectPopoverProps, };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { Select, Popover, SelectStateContext, SelectValue as SelectValue$1, Button } from 'react-aria-components';
|
|
3
|
+
import { dataAttr } from '../../utils/assertion.js';
|
|
4
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
5
|
+
import { IconChevronDown } from '../icons.js';
|
|
6
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import { selectVariants } from '../../packages/styles/src/components/select/select.styles.js';
|
|
8
|
+
import { SurfaceContext } from '../surface/surface.js';
|
|
9
|
+
|
|
10
|
+
const SelectContext = /*#__PURE__*/createContext({});
|
|
11
|
+
|
|
12
|
+
/* -------------------------------------------------------------------------------------------------
|
|
13
|
+
* Select Root
|
|
14
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
15
|
+
|
|
16
|
+
const SelectRoot = ({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
fullWidth,
|
|
20
|
+
variant,
|
|
21
|
+
...props
|
|
22
|
+
}) => {
|
|
23
|
+
const slots = React__default.useMemo(() => selectVariants({
|
|
24
|
+
fullWidth,
|
|
25
|
+
variant
|
|
26
|
+
}), [fullWidth, variant]);
|
|
27
|
+
return /*#__PURE__*/jsx(SelectContext, {
|
|
28
|
+
value: {
|
|
29
|
+
slots
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/jsx(Select, {
|
|
32
|
+
"data-slot": "select",
|
|
33
|
+
...props,
|
|
34
|
+
className: composeTwRenderProps(className, slots?.base()),
|
|
35
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
36
|
+
children: typeof children === "function" ? children(values) : children
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/* -------------------------------------------------------------------------------------------------
|
|
43
|
+
* Select Trigger
|
|
44
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
45
|
+
|
|
46
|
+
const SelectTrigger = ({
|
|
47
|
+
children,
|
|
48
|
+
className,
|
|
49
|
+
...props
|
|
50
|
+
}) => {
|
|
51
|
+
const {
|
|
52
|
+
slots
|
|
53
|
+
} = useContext(SelectContext);
|
|
54
|
+
return /*#__PURE__*/jsx(Button, {
|
|
55
|
+
className: composeTwRenderProps(className, slots?.trigger()),
|
|
56
|
+
"data-slot": "select-trigger",
|
|
57
|
+
...props,
|
|
58
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
59
|
+
children: typeof children === "function" ? children(values) : children
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/* -------------------------------------------------------------------------------------------------
|
|
65
|
+
* Select Value
|
|
66
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
67
|
+
|
|
68
|
+
const SelectValue = ({
|
|
69
|
+
children,
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}) => {
|
|
73
|
+
const {
|
|
74
|
+
slots
|
|
75
|
+
} = useContext(SelectContext);
|
|
76
|
+
return /*#__PURE__*/jsx(SelectValue$1, {
|
|
77
|
+
className: composeTwRenderProps(className, slots?.value()),
|
|
78
|
+
"data-slot": "select-value",
|
|
79
|
+
...props,
|
|
80
|
+
children: children
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/* -------------------------------------------------------------------------------------------------
|
|
85
|
+
* Select Indicator
|
|
86
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
87
|
+
|
|
88
|
+
const SelectIndicator = ({
|
|
89
|
+
children,
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) => {
|
|
93
|
+
const {
|
|
94
|
+
slots
|
|
95
|
+
} = useContext(SelectContext);
|
|
96
|
+
const state = useContext(SelectStateContext);
|
|
97
|
+
if (children && /*#__PURE__*/React__default.isValidElement(children)) {
|
|
98
|
+
return /*#__PURE__*/React__default.cloneElement(children, {
|
|
99
|
+
...props,
|
|
100
|
+
className: composeSlotClassName(slots?.indicator, className),
|
|
101
|
+
"data-slot": "select-indicator",
|
|
102
|
+
"data-open": dataAttr(state?.isOpen)
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return /*#__PURE__*/jsx(IconChevronDown, {
|
|
106
|
+
className: composeSlotClassName(slots?.indicator, className),
|
|
107
|
+
"data-open": dataAttr(state?.isOpen),
|
|
108
|
+
"data-slot": "select-default-indicator",
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/* -------------------------------------------------------------------------------------------------
|
|
114
|
+
* Select Popover
|
|
115
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
116
|
+
|
|
117
|
+
const SelectPopover = ({
|
|
118
|
+
children,
|
|
119
|
+
className,
|
|
120
|
+
placement = "bottom",
|
|
121
|
+
...props
|
|
122
|
+
}) => {
|
|
123
|
+
const {
|
|
124
|
+
slots
|
|
125
|
+
} = useContext(SelectContext);
|
|
126
|
+
return /*#__PURE__*/jsx(SurfaceContext, {
|
|
127
|
+
value: {
|
|
128
|
+
variant: "default"
|
|
129
|
+
},
|
|
130
|
+
children: /*#__PURE__*/jsx(Popover, {
|
|
131
|
+
...props,
|
|
132
|
+
className: composeTwRenderProps(className, slots?.popover()),
|
|
133
|
+
placement: placement,
|
|
134
|
+
children: children
|
|
135
|
+
})
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export { SelectIndicator, SelectPopover, SelectRoot, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { SeparatorRoot } from "./separator";
|
|
3
|
+
export declare const Separator: (({ className, orientation, ...props }: import("./separator").SeparatorRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ className, orientation, ...props }: import("./separator").SeparatorRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export type Separator = {
|
|
7
|
+
Props: ComponentProps<typeof SeparatorRoot>;
|
|
8
|
+
RootProps: ComponentProps<typeof SeparatorRoot>;
|
|
9
|
+
};
|
|
10
|
+
export { SeparatorRoot };
|
|
11
|
+
export type { SeparatorRootProps, SeparatorRootProps as SeparatorProps } from "./separator";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SeparatorRoot } from './separator.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const Separator = Object.assign(SeparatorRoot, {
|
|
7
|
+
Root: SeparatorRoot
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { Separator, SeparatorRoot };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SeparatorVariants } from "@arobo/styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { Separator as SeparatorPrimitive } from "react-aria-components";
|
|
4
|
+
interface SeparatorRootProps extends ComponentPropsWithRef<typeof SeparatorPrimitive>, SeparatorVariants {
|
|
5
|
+
}
|
|
6
|
+
declare const SeparatorRoot: ({ className, orientation, ...props }: SeparatorRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { SeparatorRoot };
|
|
8
|
+
export type { SeparatorRootProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Separator } from 'react-aria-components';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { separatorVariants } from '../../packages/styles/src/components/separator/separator.styles.js';
|
|
4
|
+
|
|
5
|
+
const SeparatorRoot = ({
|
|
6
|
+
className,
|
|
7
|
+
orientation = "horizontal",
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
return /*#__PURE__*/jsx(Separator, {
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
"data-slot": "separator",
|
|
13
|
+
orientation: orientation,
|
|
14
|
+
className: separatorVariants({
|
|
15
|
+
orientation,
|
|
16
|
+
className
|
|
17
|
+
}),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { SeparatorRoot };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { SliderFill, SliderMarks, SliderOutput, SliderRoot, SliderThumb, SliderTrack } from "./slider";
|
|
3
|
+
export declare const Slider: (({ children, className, orientation, ...props }: import("./slider").SliderRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, orientation, ...props }: import("./slider").SliderRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Output: ({ children, className, ...props }: import("./slider").SliderOutputProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Track: ({ children, className, ...props }: import("./slider").SliderTrackProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Fill: ({ className, style, ...props }: import("./slider").SliderFillProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Thumb: ({ children, className, ...props }: import("./slider").SliderThumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Marks: ({ className, ...props }: import("./slider").SliderMarksProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export type Slider = {
|
|
12
|
+
Props: ComponentProps<typeof SliderRoot>;
|
|
13
|
+
RootProps: ComponentProps<typeof SliderRoot>;
|
|
14
|
+
OutputProps: ComponentProps<typeof SliderOutput>;
|
|
15
|
+
TrackProps: ComponentProps<typeof SliderTrack>;
|
|
16
|
+
FillProps: ComponentProps<typeof SliderFill>;
|
|
17
|
+
ThumbProps: ComponentProps<typeof SliderThumb>;
|
|
18
|
+
MarksProps: ComponentProps<typeof SliderMarks>;
|
|
19
|
+
};
|
|
20
|
+
export { SliderRoot, SliderOutput, SliderTrack, SliderFill, SliderThumb, SliderMarks };
|
|
21
|
+
export type { SliderRootProps, SliderRootProps as SliderProps, SliderOutputProps, SliderTrackProps, SliderFillProps, SliderThumbProps, SliderMarksProps, } from "./slider";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SliderRoot, SliderMarks, SliderThumb, SliderFill, SliderTrack, SliderOutput } from './slider.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const Slider = Object.assign(SliderRoot, {
|
|
7
|
+
Root: SliderRoot,
|
|
8
|
+
Output: SliderOutput,
|
|
9
|
+
Track: SliderTrack,
|
|
10
|
+
Fill: SliderFill,
|
|
11
|
+
Thumb: SliderThumb,
|
|
12
|
+
Marks: SliderMarks
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { Slider, SliderFill, SliderMarks, SliderOutput, SliderRoot, SliderThumb, SliderTrack };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { SliderOutput as SliderOutputPrimitive, Slider as SliderPrimitive, SliderThumb as SliderThumbPrimitive, SliderTrack as SliderTrackPrimitive } from "react-aria-components";
|
|
3
|
+
import { type SliderVariants } from "@arobo/styles";
|
|
4
|
+
interface SliderRootProps extends ComponentPropsWithRef<typeof SliderPrimitive>, SliderVariants {
|
|
5
|
+
}
|
|
6
|
+
declare const SliderRoot: ({ children, className, orientation, ...props }: SliderRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface SliderOutputProps extends ComponentPropsWithRef<typeof SliderOutputPrimitive> {
|
|
8
|
+
}
|
|
9
|
+
declare const SliderOutput: ({ children, className, ...props }: SliderOutputProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface SliderTrackProps extends ComponentPropsWithRef<typeof SliderTrackPrimitive> {
|
|
11
|
+
}
|
|
12
|
+
declare const SliderTrack: ({ children, className, ...props }: SliderTrackProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface SliderFillProps extends ComponentPropsWithRef<"div"> {
|
|
14
|
+
}
|
|
15
|
+
declare const SliderFill: ({ className, style, ...props }: SliderFillProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
interface SliderThumbProps extends ComponentPropsWithRef<typeof SliderThumbPrimitive> {
|
|
17
|
+
}
|
|
18
|
+
declare const SliderThumb: ({ children, className, ...props }: SliderThumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface SliderMarksProps extends ComponentPropsWithRef<"div"> {
|
|
20
|
+
}
|
|
21
|
+
declare const SliderMarks: ({ className, ...props }: SliderMarksProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { SliderRoot, SliderOutput, SliderTrack, SliderFill, SliderThumb, SliderMarks };
|
|
23
|
+
export type { SliderRootProps, SliderOutputProps, SliderTrackProps, SliderFillProps, SliderThumbProps, SliderMarksProps, };
|