@arobo/react 1.0.1 → 1.1.0
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 +30 -0
- package/dist/components/carousel/carousel.js +176 -0
- package/dist/components/carousel/index.d.ts +2 -0
- package/dist/components/carousel/index.js +1 -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 +109 -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,111 @@
|
|
|
1
|
+
import type { Key, Selection } from "@react-types/shared";
|
|
2
|
+
export interface ListOptions<T> {
|
|
3
|
+
/** Initial items in the list. */
|
|
4
|
+
initialItems?: T[];
|
|
5
|
+
/** The keys for the initially selected items. */
|
|
6
|
+
initialSelectedKeys?: "all" | Iterable<Key>;
|
|
7
|
+
/** The initial text to filter the list by. */
|
|
8
|
+
initialFilterText?: string;
|
|
9
|
+
/** A function that returns a unique key for an item object. */
|
|
10
|
+
getKey?: (item: T) => Key;
|
|
11
|
+
/** A function that returns whether a item matches the current filter text. */
|
|
12
|
+
filter?: (item: T, filterText: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ListData<T> {
|
|
15
|
+
/** The items in the list. */
|
|
16
|
+
items: T[];
|
|
17
|
+
/** The keys of the currently selected items in the list. */
|
|
18
|
+
selectedKeys: Selection;
|
|
19
|
+
/** Sets the selected keys. */
|
|
20
|
+
setSelectedKeys(keys: Selection): void;
|
|
21
|
+
/** Adds the given keys to the current selected keys. */
|
|
22
|
+
addKeysToSelection(keys: Selection): void;
|
|
23
|
+
/** Removes the given keys from the current selected keys. */
|
|
24
|
+
removeKeysFromSelection(keys: Selection): void;
|
|
25
|
+
/** The current filter text. */
|
|
26
|
+
filterText: string;
|
|
27
|
+
/** Sets the filter text. */
|
|
28
|
+
setFilterText(filterText: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Gets an item from the list by key.
|
|
31
|
+
* @param key - The key of the item to retrieve.
|
|
32
|
+
*/
|
|
33
|
+
getItem(key: Key): T | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Inserts items into the list at the given index.
|
|
36
|
+
* @param index - The index to insert into.
|
|
37
|
+
* @param values - The values to insert.
|
|
38
|
+
*/
|
|
39
|
+
insert(index: number, ...values: T[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* Inserts items into the list before the item at the given key.
|
|
42
|
+
* @param key - The key of the item to insert before.
|
|
43
|
+
* @param values - The values to insert.
|
|
44
|
+
*/
|
|
45
|
+
insertBefore(key: Key, ...values: T[]): void;
|
|
46
|
+
/**
|
|
47
|
+
* Inserts items into the list after the item at the given key.
|
|
48
|
+
* @param key - The key of the item to insert after.
|
|
49
|
+
* @param values - The values to insert.
|
|
50
|
+
*/
|
|
51
|
+
insertAfter(key: Key, ...values: T[]): void;
|
|
52
|
+
/**
|
|
53
|
+
* Appends items to the list.
|
|
54
|
+
* @param values - The values to insert.
|
|
55
|
+
*/
|
|
56
|
+
append(...values: T[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* Prepends items to the list.
|
|
59
|
+
* @param value - The value to insert.
|
|
60
|
+
*/
|
|
61
|
+
prepend(...values: T[]): void;
|
|
62
|
+
/**
|
|
63
|
+
* Removes items from the list by their keys.
|
|
64
|
+
* @param keys - The keys of the item to remove.
|
|
65
|
+
*/
|
|
66
|
+
remove(...keys: Key[]): void;
|
|
67
|
+
/**
|
|
68
|
+
* Removes all items from the list that are currently
|
|
69
|
+
* in the set of selected items.
|
|
70
|
+
*/
|
|
71
|
+
removeSelectedItems(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Moves an item within the list.
|
|
74
|
+
* @param key - The key of the item to move.
|
|
75
|
+
* @param toIndex - The index to move the item to.
|
|
76
|
+
*/
|
|
77
|
+
move(key: Key, toIndex: number): void;
|
|
78
|
+
/**
|
|
79
|
+
* Moves one or more items before a given key.
|
|
80
|
+
* @param key - The key of the item to move the items before.
|
|
81
|
+
* @param keys - The keys of the items to move.
|
|
82
|
+
*/
|
|
83
|
+
moveBefore(key: Key, keys: Iterable<Key>): void;
|
|
84
|
+
/**
|
|
85
|
+
* Moves one or more items after a given key.
|
|
86
|
+
* @param key - The key of the item to move the items after.
|
|
87
|
+
* @param keys - The keys of the items to move.
|
|
88
|
+
*/
|
|
89
|
+
moveAfter(key: Key, keys: Iterable<Key>): void;
|
|
90
|
+
/**
|
|
91
|
+
* Updates an item in the list.
|
|
92
|
+
* @param key - The key of the item to update.
|
|
93
|
+
* @param newValue - The new value for the item, or a function that returns the new value based on the previous value.
|
|
94
|
+
*/
|
|
95
|
+
update(key: Key, newValue: T | ((prev: T) => T)): void;
|
|
96
|
+
}
|
|
97
|
+
export interface ListState<T> {
|
|
98
|
+
items: T[];
|
|
99
|
+
selectedKeys: Selection;
|
|
100
|
+
filterText: string;
|
|
101
|
+
}
|
|
102
|
+
interface CreateListOptions<T, C> extends ListOptions<T> {
|
|
103
|
+
cursor?: C;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Manages state for an immutable list data structure, and provides convenience methods to
|
|
107
|
+
* update the data over time.
|
|
108
|
+
*/
|
|
109
|
+
export declare function useListData<T>(options: ListOptions<T>): ListData<T>;
|
|
110
|
+
export declare function createListActions<T, C>(opts: CreateListOptions<T, C>, dispatch: (updater: (state: ListState<T>) => ListState<T>) => void): Omit<ListData<T>, "items" | "selectedKeys" | "getItem" | "filterText">;
|
|
111
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect.js';
|
|
3
|
+
|
|
4
|
+
const IS_SERVER = typeof window === "undefined";
|
|
5
|
+
function useMediaQuery(query, {
|
|
6
|
+
defaultValue = false,
|
|
7
|
+
initializeWithValue = true
|
|
8
|
+
} = {}) {
|
|
9
|
+
const getMatches = query => {
|
|
10
|
+
if (IS_SERVER) {
|
|
11
|
+
return defaultValue;
|
|
12
|
+
}
|
|
13
|
+
return window.matchMedia(query).matches;
|
|
14
|
+
};
|
|
15
|
+
const [matches, setMatches] = useState(() => {
|
|
16
|
+
if (initializeWithValue) {
|
|
17
|
+
return getMatches(query);
|
|
18
|
+
}
|
|
19
|
+
return defaultValue;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Handles the change event of the media query.
|
|
23
|
+
function handleChange() {
|
|
24
|
+
setMatches(getMatches(query));
|
|
25
|
+
}
|
|
26
|
+
useIsomorphicLayoutEffect(() => {
|
|
27
|
+
const matchMedia = window.matchMedia(query);
|
|
28
|
+
|
|
29
|
+
// Triggered at the first client-side load and if query changes
|
|
30
|
+
handleChange();
|
|
31
|
+
|
|
32
|
+
// Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
|
|
33
|
+
if (matchMedia.addListener) {
|
|
34
|
+
matchMedia.addListener(handleChange);
|
|
35
|
+
} else {
|
|
36
|
+
matchMedia.addEventListener("change", handleChange);
|
|
37
|
+
}
|
|
38
|
+
return () => {
|
|
39
|
+
if (matchMedia.removeListener) {
|
|
40
|
+
matchMedia.removeListener(handleChange);
|
|
41
|
+
} else {
|
|
42
|
+
matchMedia.removeEventListener("change", handleChange);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}, [query]);
|
|
46
|
+
return matches;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { useMediaQuery };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface UseOverlayStateProps {
|
|
2
|
+
/**
|
|
3
|
+
* Whether the overlay is currently open (controlled)
|
|
4
|
+
*/
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the overlay is open by default (uncontrolled)
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Handler that is called when the overlay's open state changes
|
|
13
|
+
*/
|
|
14
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface UseOverlayStateReturn {
|
|
17
|
+
/**
|
|
18
|
+
* Whether the overlay is currently open
|
|
19
|
+
*/
|
|
20
|
+
readonly isOpen: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the overlay's open state
|
|
23
|
+
*/
|
|
24
|
+
setOpen(isOpen: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Opens the overlay
|
|
27
|
+
*/
|
|
28
|
+
open(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Closes the overlay
|
|
31
|
+
*/
|
|
32
|
+
close(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Toggles the overlay's open state
|
|
35
|
+
*/
|
|
36
|
+
toggle(): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Hook to manage overlay trigger state (Modal, AlertDialog, Popover, etc.)
|
|
40
|
+
* Provides methods to open, close, and toggle the overlay
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* const state = useOverlayState();
|
|
45
|
+
*
|
|
46
|
+
* <Button onPress={state.open}>Open Dialog</Button>
|
|
47
|
+
* <Modal isOpen={state.isOpen} onOpenChange={state.setOpen}>
|
|
48
|
+
* <Button onPress={state.close}>Close</Button>
|
|
49
|
+
* </Modal>
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare const useOverlayState: (props?: UseOverlayStateProps) => UseOverlayStateReturn;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare enum PaginationControl {
|
|
3
|
+
Prev = "prev",
|
|
4
|
+
Next = "next",
|
|
5
|
+
First = "first",
|
|
6
|
+
Last = "last"
|
|
7
|
+
}
|
|
8
|
+
export declare const FIRST_PAGE = 1;
|
|
9
|
+
export declare const PAGE = "page";
|
|
10
|
+
export declare const ELLIPSIS = "ellipsis";
|
|
11
|
+
export type PaginationControlItem = {
|
|
12
|
+
key: string;
|
|
13
|
+
type: PaginationControl;
|
|
14
|
+
page: number;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
position: "leading" | "trailing";
|
|
17
|
+
show: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type PaginationItemType = typeof PAGE | typeof ELLIPSIS | PaginationControl;
|
|
20
|
+
type UsePaginationParams = {
|
|
21
|
+
defaultPage: number;
|
|
22
|
+
page?: number;
|
|
23
|
+
showControls: boolean;
|
|
24
|
+
showEdges: boolean;
|
|
25
|
+
showFullPages: boolean;
|
|
26
|
+
showPages: boolean;
|
|
27
|
+
total: number;
|
|
28
|
+
};
|
|
29
|
+
type HandleChangeParams = {
|
|
30
|
+
currentPage: number;
|
|
31
|
+
isControlled: boolean;
|
|
32
|
+
onChange?: (page: number, meta: {
|
|
33
|
+
isDisabled?: boolean;
|
|
34
|
+
type: PaginationItemType;
|
|
35
|
+
}) => void;
|
|
36
|
+
setUncontrolledPage: React.Dispatch<React.SetStateAction<number>>;
|
|
37
|
+
};
|
|
38
|
+
export declare const usePaginationChange: ({ currentPage, isControlled, onChange, setUncontrolledPage, }: HandleChangeParams) => (nextPage: number, type: PaginationItemType, disabled?: boolean) => void;
|
|
39
|
+
export declare const usePagination: ({ defaultPage, page, showControls, showEdges, showFullPages, showPages, total, }: UsePaginationParams) => {
|
|
40
|
+
controlItems: PaginationControlItem[];
|
|
41
|
+
currentPage: number;
|
|
42
|
+
isControlled: boolean;
|
|
43
|
+
maxPage: number;
|
|
44
|
+
pageItems: (number | "ellipsis")[];
|
|
45
|
+
setUncontrolledPage: React.Dispatch<React.SetStateAction<number>>;
|
|
46
|
+
totalPages: number;
|
|
47
|
+
};
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
let PaginationControl = /*#__PURE__*/function (PaginationControl) {
|
|
4
|
+
PaginationControl["Prev"] = "prev";
|
|
5
|
+
PaginationControl["Next"] = "next";
|
|
6
|
+
PaginationControl["First"] = "first";
|
|
7
|
+
PaginationControl["Last"] = "last";
|
|
8
|
+
return PaginationControl;
|
|
9
|
+
}({});
|
|
10
|
+
const FIRST_PAGE = 1;
|
|
11
|
+
const PAGE = "page";
|
|
12
|
+
const ELLIPSIS = "ellipsis";
|
|
13
|
+
const MAX_VISIBLE_PAGES = 5;
|
|
14
|
+
const LEADING_EDGE = MAX_VISIBLE_PAGES - 1;
|
|
15
|
+
const TRAILING_EDGE = MAX_VISIBLE_PAGES - 2;
|
|
16
|
+
const clampNumber = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
17
|
+
const clampPage = (value, maxPage) => clampNumber(Math.floor(value), FIRST_PAGE, maxPage);
|
|
18
|
+
const rangeInclusive = (start, end) => Array.from({
|
|
19
|
+
length: end - start + 1
|
|
20
|
+
}, (_, index) => start + index);
|
|
21
|
+
const getPageItems = (totalPages, currentPage, showPages, showFullPages) => {
|
|
22
|
+
if (!showPages) return [];
|
|
23
|
+
if (showFullPages || totalPages <= MAX_VISIBLE_PAGES) {
|
|
24
|
+
return rangeInclusive(FIRST_PAGE, totalPages);
|
|
25
|
+
}
|
|
26
|
+
const lastPage = totalPages;
|
|
27
|
+
if (currentPage <= LEADING_EDGE) {
|
|
28
|
+
return [...rangeInclusive(FIRST_PAGE, MAX_VISIBLE_PAGES), ELLIPSIS, lastPage];
|
|
29
|
+
}
|
|
30
|
+
if (currentPage >= lastPage - TRAILING_EDGE) {
|
|
31
|
+
return [FIRST_PAGE, ELLIPSIS, ...rangeInclusive(lastPage - LEADING_EDGE, lastPage)];
|
|
32
|
+
}
|
|
33
|
+
return [FIRST_PAGE, ELLIPSIS, currentPage - 1, currentPage, currentPage + 1, ELLIPSIS, lastPage];
|
|
34
|
+
};
|
|
35
|
+
const usePaginationChange = ({
|
|
36
|
+
currentPage,
|
|
37
|
+
isControlled,
|
|
38
|
+
onChange,
|
|
39
|
+
setUncontrolledPage
|
|
40
|
+
}) => {
|
|
41
|
+
return (nextPage, type, disabled) => {
|
|
42
|
+
if (type === PAGE && nextPage === currentPage) return;
|
|
43
|
+
if (!isControlled) setUncontrolledPage(nextPage);
|
|
44
|
+
onChange?.(nextPage, {
|
|
45
|
+
isDisabled: disabled,
|
|
46
|
+
type
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
const usePagination = ({
|
|
51
|
+
defaultPage,
|
|
52
|
+
page,
|
|
53
|
+
showControls,
|
|
54
|
+
showEdges,
|
|
55
|
+
showFullPages,
|
|
56
|
+
showPages,
|
|
57
|
+
total
|
|
58
|
+
}) => {
|
|
59
|
+
const isControlled = page !== undefined;
|
|
60
|
+
const totalPages = Math.max(0, Math.floor(total));
|
|
61
|
+
const maxPage = Math.max(totalPages, FIRST_PAGE);
|
|
62
|
+
const [uncontrolledPage, setUncontrolledPage] = React__default.useState(() => clampPage(defaultPage, maxPage));
|
|
63
|
+
const currentPage = isControlled ? clampPage(page ?? FIRST_PAGE, maxPage) : uncontrolledPage;
|
|
64
|
+
const pageItems = getPageItems(totalPages, currentPage, showPages, showFullPages);
|
|
65
|
+
const isStartDisabled = currentPage <= FIRST_PAGE;
|
|
66
|
+
const isEndDisabled = currentPage >= totalPages;
|
|
67
|
+
const prevPage = clampPage(currentPage - 1, maxPage);
|
|
68
|
+
const nextPage = clampPage(currentPage + 1, maxPage);
|
|
69
|
+
const controlItems = [{
|
|
70
|
+
key: "pagination-first",
|
|
71
|
+
type: PaginationControl.First,
|
|
72
|
+
page: FIRST_PAGE,
|
|
73
|
+
disabled: isStartDisabled,
|
|
74
|
+
position: "leading",
|
|
75
|
+
show: showEdges
|
|
76
|
+
}, {
|
|
77
|
+
key: "pagination-prev",
|
|
78
|
+
type: PaginationControl.Prev,
|
|
79
|
+
page: prevPage,
|
|
80
|
+
disabled: isStartDisabled,
|
|
81
|
+
position: "leading",
|
|
82
|
+
show: showControls
|
|
83
|
+
}, {
|
|
84
|
+
key: "pagination-next",
|
|
85
|
+
type: PaginationControl.Next,
|
|
86
|
+
page: nextPage,
|
|
87
|
+
disabled: isEndDisabled,
|
|
88
|
+
position: "trailing",
|
|
89
|
+
show: showControls
|
|
90
|
+
}, {
|
|
91
|
+
key: "pagination-last",
|
|
92
|
+
type: PaginationControl.Last,
|
|
93
|
+
page: totalPages,
|
|
94
|
+
disabled: isEndDisabled,
|
|
95
|
+
position: "trailing",
|
|
96
|
+
show: showEdges
|
|
97
|
+
}];
|
|
98
|
+
React__default.useEffect(() => {
|
|
99
|
+
if (!isControlled) {
|
|
100
|
+
setUncontrolledPage(prev => clampPage(prev, maxPage));
|
|
101
|
+
}
|
|
102
|
+
}, [isControlled, maxPage]);
|
|
103
|
+
return {
|
|
104
|
+
controlItems,
|
|
105
|
+
currentPage,
|
|
106
|
+
isControlled,
|
|
107
|
+
maxPage,
|
|
108
|
+
pageItems,
|
|
109
|
+
setUncontrolledPage,
|
|
110
|
+
totalPages
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export { ELLIPSIS, FIRST_PAGE, PAGE, PaginationControl, usePagination, usePaginationChange };
|
package/dist/index.js
CHANGED
|
@@ -1,62 +1,145 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ContainerRoot } from './components/container/container.js';
|
|
2
|
+
export { containerVariants } from './packages/styles/src/components/container/container.styles.js';
|
|
3
|
+
export { Container } from './components/container/index.js';
|
|
4
|
+
export { fieldsetVariants } from './packages/styles/src/components/fieldset/fieldset.styles.js';
|
|
5
|
+
export { Fieldset } from './components/fieldset/index.js';
|
|
6
|
+
export { FieldGroup, FieldsetActions, FieldsetLegend, FieldsetRoot } from './components/fieldset/fieldset.js';
|
|
7
|
+
export { HeadingRoot } from './components/heading/heading.js';
|
|
8
|
+
export { headingVariants } from './packages/styles/src/components/heading/heading.styles.js';
|
|
9
|
+
export { Heading } from './components/heading/index.js';
|
|
10
|
+
export { CircleDashedIcon, CloseIcon, DangerIcon, ExternalLinkIcon, IconChevronDown, IconChevronRight, IconMinus, IconPlus, IconSearch, InfoIcon, SuccessIcon, WarningIcon } from './components/icons.js';
|
|
11
|
+
export { isRTL, useFilter, useLocale } from 'react-aria-components';
|
|
12
|
+
export { getLocalizationScript } from './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';
|
|
13
|
+
export { buttonVariants } from './packages/styles/src/components/button/button.styles.js';
|
|
2
14
|
export { Button } from './components/button/index.js';
|
|
3
15
|
export { ButtonRoot } from './components/button/button.js';
|
|
4
16
|
export { BUTTON_GROUP_CHILD, ButtonGroupContext, ButtonGroupRoot } from './components/button-group/button-group.js';
|
|
5
|
-
export { buttonGroupVariants } from './styles/src/components/button-group/button-group.styles.js';
|
|
17
|
+
export { buttonGroupVariants } from './packages/styles/src/components/button-group/button-group.styles.js';
|
|
6
18
|
export { ButtonGroup } from './components/button-group/index.js';
|
|
7
19
|
export { CalendarCell, CalendarGrid, CalendarGridHeader, CalendarHeader, CalendarRoot } from './components/calendar/calendar.js';
|
|
8
|
-
export { calendarVariants } from './styles/src/components/calendar/calendar.styles.js';
|
|
20
|
+
export { calendarVariants } from './packages/styles/src/components/calendar/calendar.styles.js';
|
|
9
21
|
export { Calendar } from './components/calendar/index.js';
|
|
10
|
-
export {
|
|
11
|
-
export { checkboxVariants } from './styles/src/components/checkbox/checkbox.styles.js';
|
|
22
|
+
export { checkboxVariants } from './packages/styles/src/components/checkbox/checkbox.styles.js';
|
|
12
23
|
export { Checkbox } from './components/checkbox/index.js';
|
|
13
24
|
export { CheckboxGroup } from './components/checkbox-group/checkbox-group.js';
|
|
14
|
-
export { checkboxGroupVariants } from './styles/src/components/checkbox-group/checkbox-group.styles.js';
|
|
15
|
-
export { closeButtonVariants } from './styles/src/components/close-button/close-button.styles.js';
|
|
25
|
+
export { checkboxGroupVariants } from './packages/styles/src/components/checkbox-group/checkbox-group.styles.js';
|
|
16
26
|
export { CloseButton } from './components/close-button/index.js';
|
|
17
27
|
export { CloseButtonRoot } from './components/close-button/close-button.js';
|
|
18
|
-
export { comboboxVariants } from './styles/src/components/combobox/combobox.styles.js';
|
|
28
|
+
export { comboboxVariants } from './packages/styles/src/components/combobox/combobox.styles.js';
|
|
19
29
|
export { ComboBox } from './components/combobox/index.js';
|
|
20
30
|
export { ComboBoxInputGroup, ComboBoxPopover, ComboBoxRoot, ComboBoxTrigger } from './components/combobox/combobox.js';
|
|
21
|
-
export { dateFieldVariants } from './styles/src/components/date-field/date-field.styles.js';
|
|
31
|
+
export { dateFieldVariants } from './packages/styles/src/components/date-field/date-field.styles.js';
|
|
22
32
|
export { DateField } from './components/date-field/index.js';
|
|
23
33
|
export { DateFieldRoot } from './components/date-field/date-field.js';
|
|
24
|
-
export { dateInputGroupVariants } from './styles/src/components/date-input-group/date-input-group.styles.js';
|
|
34
|
+
export { dateInputGroupVariants } from './packages/styles/src/components/date-input-group/date-input-group.styles.js';
|
|
25
35
|
export { DateInputGroup } from './components/date-input-group/index.js';
|
|
26
36
|
export { DateInputGroupInput, DateInputGroupInputCompound, DateInputGroupPrefix, DateInputGroupRoot, DateInputGroupSegment, DateInputGroupSuffix } from './components/date-input-group/date-input-group.js';
|
|
27
37
|
export { DatePickerRoot } from './components/date-picker/date-picker.js';
|
|
28
|
-
export { datePickerVariants } from './styles/src/components/date-picker/date-picker.styles.js';
|
|
29
38
|
export { DatePicker } from './components/date-picker/index.js';
|
|
30
39
|
export { DateRangePickerRoot } from './components/date-range-picker/date-range-picker.js';
|
|
31
|
-
export { dateRangePickerVariants } from './styles/src/components/date-range-picker/date-range-picker.styles.js';
|
|
40
|
+
export { dateRangePickerVariants } from './packages/styles/src/components/date-range-picker/date-range-picker.styles.js';
|
|
32
41
|
export { DateRangePicker } from './components/date-range-picker/index.js';
|
|
33
|
-
export { descriptionVariants } from './styles/src/components/description/description.styles.js';
|
|
34
42
|
export { Description } from './components/description/index.js';
|
|
35
43
|
export { DescriptionRoot } from './components/description/description.js';
|
|
36
|
-
export { errorMessageVariants } from './styles/src/components/error-message/error-message.styles.js';
|
|
44
|
+
export { errorMessageVariants } from './packages/styles/src/components/error-message/error-message.styles.js';
|
|
37
45
|
export { ErrorMessage } from './components/error-message/index.js';
|
|
38
46
|
export { ErrorMessageRoot } from './components/error-message/error-message.js';
|
|
39
|
-
export { fieldErrorVariants } from './styles/src/components/field-error/field-error.styles.js';
|
|
47
|
+
export { fieldErrorVariants } from './packages/styles/src/components/field-error/field-error.styles.js';
|
|
40
48
|
export { FieldError } from './components/field-error/index.js';
|
|
41
49
|
export { FieldErrorRoot } from './components/field-error/field-error.js';
|
|
42
|
-
export { FieldGroupRoot } from './components/field-group/field-group.js';
|
|
43
|
-
export { fieldGroupVariants } from './styles/src/components/field-group/field-group.styles.js';
|
|
44
|
-
export { FieldGroup } from './components/field-group/index.js';
|
|
45
50
|
export { InputRoot } from './components/input/input.js';
|
|
46
|
-
export { inputVariants } from './styles/src/components/input/input.styles.js';
|
|
51
|
+
export { inputVariants } from './packages/styles/src/components/input/input.styles.js';
|
|
47
52
|
export { Input } from './components/input/index.js';
|
|
48
|
-
export {
|
|
53
|
+
export { Accordion } from './components/accordion/index.js';
|
|
54
|
+
export { AccordionBody, AccordionHeading, AccordionIndicator, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger } from './components/accordion/accordion.js';
|
|
55
|
+
export { inputGroupVariants } from './packages/styles/src/components/input-group/input-group.styles.js';
|
|
56
|
+
export { InputGroup } from './components/input-group/index.js';
|
|
57
|
+
export { InputGroupInput, InputGroupPrefix, InputGroupRoot, InputGroupSuffix, InputGroupTextArea } from './components/input-group/input-group.js';
|
|
58
|
+
export { inputOTPVariants } from './packages/styles/src/components/input-otp/input-otp.styles.js';
|
|
59
|
+
export { InputOTP, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from './components/input-otp/index.js';
|
|
60
|
+
export { InputOTPGroup, InputOTPRoot, InputOTPSeparator, InputOTPSlot } from './components/input-otp/input-otp.js';
|
|
61
|
+
export { numberFieldVariants } from './packages/styles/src/components/number-field/number-field.styles.js';
|
|
62
|
+
export { NumberField } from './components/number-field/index.js';
|
|
63
|
+
export { NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot } from './components/number-field/number-field.js';
|
|
64
|
+
export { SurfaceContext, SurfaceRoot } from './components/surface/surface.js';
|
|
65
|
+
export { surfaceVariants } from './packages/styles/src/components/surface/surface.styles.js';
|
|
66
|
+
export { Surface } from './components/surface/index.js';
|
|
67
|
+
export { Spinner } from './components/spinner/index.js';
|
|
68
|
+
export { SpinnerRoot } from './components/spinner/spinner.js';
|
|
69
|
+
export { Alert } from './components/alert/index.js';
|
|
70
|
+
export { AlertContent, AlertDescription, AlertIndicator, AlertRoot, AlertTitle } from './components/alert/alert.js';
|
|
71
|
+
export { AlertDialog } from './components/alert-dialog/index.js';
|
|
72
|
+
export { AlertDialogBackdrop, AlertDialogBody, AlertDialogCloseTrigger, AlertDialogContainer, AlertDialogDialog, AlertDialogFooter, AlertDialogHeader, AlertDialogHeading, AlertDialogIcon, AlertDialogRoot, AlertDialogTrigger } from './components/alert-dialog/alert-dialog.js';
|
|
73
|
+
export { Chip } from './components/chip/index.js';
|
|
74
|
+
export { ChipRoot } from './components/chip/chip.js';
|
|
75
|
+
export { Breadcrumbs } from './components/breadcrumbs/index.js';
|
|
76
|
+
export { BreadcrumbsItem, BreadcrumbsRoot } from './components/breadcrumbs/breadcrumbs.js';
|
|
77
|
+
export { Dropdown } from './components/dropdown/index.js';
|
|
78
|
+
export { DropdownItem, DropdownItemIndicator, DropdownMenu, DropdownPopover, DropdownRoot, DropdownSection, DropdownSubmenuIndicator, DropdownSubmenuTrigger, DropdownTrigger } from './components/dropdown/dropdown.js';
|
|
79
|
+
export { Empty, EmptyActions, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyRoot, EmptyTitle } from './components/empty/empty.js';
|
|
80
|
+
export { MenuSection } from './components/menu-section/index.js';
|
|
81
|
+
export { MenuSectionRoot } from './components/menu-section/menu-section.js';
|
|
82
|
+
export { MenuItem } from './components/menu-item/index.js';
|
|
83
|
+
export { MenuItemIndicator, MenuItemRoot, MenuItemSubmenuIndicator } from './components/menu-item/menu-item.js';
|
|
84
|
+
export { Menu } from './components/menu/index.js';
|
|
85
|
+
export { MenuRoot } from './components/menu/menu.js';
|
|
86
|
+
export { kbdKeysLabelMap, kbdKeysMap } from './components/kbd/kbd.constants.js';
|
|
87
|
+
export { Kbd } from './components/kbd/index.js';
|
|
88
|
+
export { KbdAbbr, KbdContent, KbdRoot } from './components/kbd/kbd.js';
|
|
89
|
+
export { Header } from './components/header/index.js';
|
|
90
|
+
export { HeaderRoot } from './components/header/header.js';
|
|
91
|
+
export { labelVariants } from './packages/styles/src/components/label/label.styles.js';
|
|
49
92
|
export { Label } from './components/label/index.js';
|
|
50
93
|
export { LabelRoot } from './components/label/label.js';
|
|
51
|
-
export {
|
|
94
|
+
export { PaginationRoot } from './components/pagination/pagination.js';
|
|
95
|
+
export { paginationVariants } from './packages/styles/src/components/pagination/pagination.styles.js';
|
|
96
|
+
export { Pagination } from './components/pagination/index.js';
|
|
97
|
+
export { Avatar } from './components/avatar/index.js';
|
|
98
|
+
export { AvatarFallback, AvatarImage, AvatarRoot } from './components/avatar/avatar.js';
|
|
99
|
+
export { Radio } from './components/radio/index.js';
|
|
100
|
+
export { RadioContent, RadioControl, RadioIndicator, RadioRoot } from './components/radio/radio.js';
|
|
101
|
+
export { RadioGroup } from './components/radio-group/index.js';
|
|
102
|
+
export { RadioGroupRoot } from './components/radio-group/radio-group.js';
|
|
103
|
+
export { Modal } from './components/modal/index.js';
|
|
104
|
+
export { ModalBackdrop, ModalBody, ModalCloseTrigger, ModalContainer, ModalDialog, ModalFooter, ModalHeader, ModalHeading, ModalIcon, ModalRoot, ModalTrigger } from './components/modal/modal.js';
|
|
105
|
+
export { ListBoxItem } from './components/listbox-item/index.js';
|
|
106
|
+
export { ListBoxItemIndicator, ListBoxItemRoot } from './components/listbox-item/listbox-item.js';
|
|
107
|
+
export { ListBoxSection } from './components/listbox-section/index.js';
|
|
108
|
+
export { ListBoxSectionRoot } from './components/listbox-section/listbox-section.js';
|
|
109
|
+
export { ListBox } from './components/listbox/index.js';
|
|
110
|
+
export { ListBoxRoot } from './components/listbox/listbox.js';
|
|
111
|
+
export { Slider } from './components/slider/index.js';
|
|
112
|
+
export { SliderFill, SliderMarks, SliderOutput, SliderRoot, SliderThumb, SliderTrack } from './components/slider/slider.js';
|
|
113
|
+
export { Tabs } from './components/tabs/index.js';
|
|
114
|
+
export { Tab, TabIndicator, TabList, TabListContainer, TabPanel, TabsRoot } from './components/tabs/tabs.js';
|
|
115
|
+
export { TextArea } from './components/textarea/index.js';
|
|
116
|
+
export { TextAreaRoot } from './components/textarea/textarea.js';
|
|
117
|
+
export { ToggleButton } from './components/toggle-button/toggle-button.js';
|
|
118
|
+
export { Select } from './components/select/index.js';
|
|
119
|
+
export { SelectIndicator, SelectPopover, SelectRoot, SelectTrigger, SelectValue } from './components/select/select.js';
|
|
120
|
+
export { Tooltip } from './components/tooltip/index.js';
|
|
121
|
+
export { TooltipArrow, TooltipContent, TooltipRoot, TooltipTrigger } from './components/tooltip/tooltip.js';
|
|
122
|
+
export { EmptyState } from './components/empty-state/index.js';
|
|
123
|
+
export { EmptyStateRoot } from './components/empty-state/empty-state.js';
|
|
124
|
+
export { Tag } from './components/tag/index.js';
|
|
125
|
+
export { TagRemoveButton, TagRoot } from './components/tag/tag.js';
|
|
126
|
+
export { TagGroup } from './components/tag-group/index.js';
|
|
127
|
+
export { TagGroupContext, TagGroupList, TagGroupRoot } from './components/tag-group/tag-group.js';
|
|
128
|
+
export { DEFAULT_GAP, DEFAULT_MAX_VISIBLE_TOAST } from './components/toast/constants.js';
|
|
129
|
+
export { Toast } from './components/toast/index.js';
|
|
130
|
+
export { ToastActionButton, ToastCloseButton, ToastContainer, ToastContent, ToastDescription, ToastIndicator, ToastTitle } from './components/toast/toast.js';
|
|
131
|
+
export { ToastQueue, toast, toastQueue } from './components/toast/toast-queue.js';
|
|
132
|
+
export { Separator } from './components/separator/index.js';
|
|
133
|
+
export { SeparatorRoot } from './components/separator/separator.js';
|
|
134
|
+
export { useScrollShadow } from './components/scroll-shadow/use-scroll-shadow.js';
|
|
135
|
+
export { ScrollShadow } from './components/scroll-shadow/index.js';
|
|
136
|
+
export { ScrollShadowRoot } from './components/scroll-shadow/scroll-shadow.js';
|
|
137
|
+
export { popoverVariants } from './packages/styles/src/components/popover/popover.styles.js';
|
|
52
138
|
export { Popover } from './components/popover/index.js';
|
|
53
139
|
export { PopoverArrow, PopoverContent, PopoverDialog, PopoverHeading, PopoverRoot, PopoverTrigger } from './components/popover/popover.js';
|
|
54
140
|
export { RangeCalendarRoot } from './components/range-calendar/range-calendar.js';
|
|
55
|
-
export { rangeCalendarVariants } from './styles/src/components/range-calendar/range-calendar.styles.js';
|
|
141
|
+
export { rangeCalendarVariants } from './packages/styles/src/components/range-calendar/range-calendar.styles.js';
|
|
56
142
|
export { RangeCalendar } from './components/range-calendar/index.js';
|
|
57
|
-
export { SurfaceContext, SurfaceRoot } from './components/surface/surface.js';
|
|
58
|
-
export { surfaceVariants } from './styles/src/components/surface/surface.styles.js';
|
|
59
|
-
export { Surface } from './components/surface/index.js';
|
|
60
143
|
export { TextFieldContext, TextFieldRoot } from './components/text-field/text-field.js';
|
|
61
|
-
export { textFieldVariants } from './styles/src/components/text-field/text-field.styles.js';
|
|
144
|
+
export { textFieldVariants } from './packages/styles/src/components/text-field/text-field.styles.js';
|
|
62
145
|
export { TextField } from './components/text-field/index.js';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ const $5b160d28a433310d$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
|
|
12
|
+
const $5b160d28a433310d$var$stringsSymbol = Symbol.for('react-aria.i18n.strings');
|
|
13
|
+
let $5b160d28a433310d$var$cachedGlobalStrings = undefined;
|
|
14
|
+
class $5b160d28a433310d$export$c17fa47878dc55b6 {
|
|
15
|
+
/** Returns a localized string for the given key and locale. */ getStringForLocale(key, locale) {
|
|
16
|
+
let strings = this.getStringsForLocale(locale);
|
|
17
|
+
let string = strings[key];
|
|
18
|
+
if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
|
|
19
|
+
return string;
|
|
20
|
+
}
|
|
21
|
+
/** Returns all localized strings for the given locale. */ getStringsForLocale(locale) {
|
|
22
|
+
let strings = this.strings[locale];
|
|
23
|
+
if (!strings) {
|
|
24
|
+
strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale);
|
|
25
|
+
this.strings[locale] = strings;
|
|
26
|
+
}
|
|
27
|
+
return strings;
|
|
28
|
+
}
|
|
29
|
+
static getGlobalDictionaryForPackage(packageName) {
|
|
30
|
+
if (typeof window === 'undefined') return null;
|
|
31
|
+
let locale = window[$5b160d28a433310d$var$localeSymbol];
|
|
32
|
+
if ($5b160d28a433310d$var$cachedGlobalStrings === undefined) {
|
|
33
|
+
let globalStrings = window[$5b160d28a433310d$var$stringsSymbol];
|
|
34
|
+
if (!globalStrings) return null;
|
|
35
|
+
$5b160d28a433310d$var$cachedGlobalStrings = {};
|
|
36
|
+
for(let pkg in globalStrings)$5b160d28a433310d$var$cachedGlobalStrings[pkg] = new $5b160d28a433310d$export$c17fa47878dc55b6({
|
|
37
|
+
[locale]: globalStrings[pkg]
|
|
38
|
+
}, locale);
|
|
39
|
+
}
|
|
40
|
+
let dictionary = $5b160d28a433310d$var$cachedGlobalStrings === null || $5b160d28a433310d$var$cachedGlobalStrings === void 0 ? void 0 : $5b160d28a433310d$var$cachedGlobalStrings[packageName];
|
|
41
|
+
if (!dictionary) throw new Error(`Strings for package "${packageName}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
|
|
42
|
+
return dictionary;
|
|
43
|
+
}
|
|
44
|
+
constructor(messages, defaultLocale = 'en-US'){
|
|
45
|
+
// Clone messages so we don't modify the original object.
|
|
46
|
+
// Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.
|
|
47
|
+
this.strings = Object.fromEntries(Object.entries(messages).filter(([, v])=>v));
|
|
48
|
+
this.defaultLocale = defaultLocale;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = 'en-US') {
|
|
52
|
+
// If there is an exact match, use it.
|
|
53
|
+
if (strings[locale]) return strings[locale];
|
|
54
|
+
// Attempt to find the closest match by language.
|
|
55
|
+
// For example, if the locale is fr-CA (French Canadian), but there is only
|
|
56
|
+
// an fr-FR (France) set of strings, use that.
|
|
57
|
+
// This could be replaced with Intl.LocaleMatcher once it is supported.
|
|
58
|
+
// https://github.com/tc39/proposal-intl-localematcher
|
|
59
|
+
let language = $5b160d28a433310d$var$getLanguage(locale);
|
|
60
|
+
if (strings[language]) return strings[language];
|
|
61
|
+
for(let key in strings){
|
|
62
|
+
if (key.startsWith(language + '-')) return strings[key];
|
|
63
|
+
}
|
|
64
|
+
// Nothing close, use english.
|
|
65
|
+
return strings[defaultLocale];
|
|
66
|
+
}
|
|
67
|
+
function $5b160d28a433310d$var$getLanguage(locale) {
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
if (Intl.Locale) // @ts-ignore
|
|
70
|
+
return new Intl.Locale(locale).language;
|
|
71
|
+
return locale.split('-')[0];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { $5b160d28a433310d$export$c17fa47878dc55b6 as LocalizedStringDictionary };
|