@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,15 @@
|
|
|
1
|
+
import { NumberFieldRoot, NumberFieldDecrementButton, NumberFieldIncrementButton, NumberFieldInput, NumberFieldGroup } from './number-field.js';
|
|
2
|
+
export { numberFieldVariants } from '../../packages/styles/src/components/number-field/number-field.styles.js';
|
|
3
|
+
|
|
4
|
+
/* -------------------------------------------------------------------------------------------------
|
|
5
|
+
* Compound Component
|
|
6
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
7
|
+
const NumberField = Object.assign(NumberFieldRoot, {
|
|
8
|
+
Root: NumberFieldRoot,
|
|
9
|
+
Group: NumberFieldGroup,
|
|
10
|
+
Input: NumberFieldInput,
|
|
11
|
+
IncrementButton: NumberFieldIncrementButton,
|
|
12
|
+
DecrementButton: NumberFieldDecrementButton
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { NumberField, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NumberFieldVariants } from "@arobo/styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { Button as ButtonPrimitive, Group as GroupPrimitive, Input as InputPrimitive, NumberField as NumberFieldPrimitive } from "react-aria-components";
|
|
4
|
+
interface NumberFieldRootProps extends ComponentPropsWithRef<typeof NumberFieldPrimitive>, NumberFieldVariants {
|
|
5
|
+
}
|
|
6
|
+
declare const NumberFieldRoot: ({ children, className, fullWidth, variant, ...props }: NumberFieldRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface NumberFieldGroupProps extends ComponentPropsWithRef<typeof GroupPrimitive> {
|
|
8
|
+
}
|
|
9
|
+
declare const NumberFieldGroup: ({ children, className, ...props }: NumberFieldGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface NumberFieldInputProps extends ComponentPropsWithRef<typeof InputPrimitive> {
|
|
11
|
+
}
|
|
12
|
+
declare const NumberFieldInput: ({ className, ...props }: NumberFieldInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface NumberFieldIncrementButtonProps extends ComponentPropsWithRef<typeof ButtonPrimitive> {
|
|
14
|
+
}
|
|
15
|
+
declare const NumberFieldIncrementButton: ({ children, className, ...props }: NumberFieldIncrementButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
interface NumberFieldDecrementButtonProps extends ComponentPropsWithRef<typeof ButtonPrimitive> {
|
|
17
|
+
}
|
|
18
|
+
declare const NumberFieldDecrementButton: ({ children, className, ...props }: NumberFieldDecrementButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { NumberFieldRoot, NumberFieldGroup, NumberFieldInput, NumberFieldIncrementButton, NumberFieldDecrementButton, };
|
|
20
|
+
export type { NumberFieldRootProps, NumberFieldGroupProps, NumberFieldInputProps, NumberFieldIncrementButtonProps, NumberFieldDecrementButtonProps, };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { NumberField, Button, Input, Group } from 'react-aria-components';
|
|
3
|
+
import { composeTwRenderProps } from '../../utils/compose.js';
|
|
4
|
+
import { IconMinus, IconPlus } from '../icons.js';
|
|
5
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
import { numberFieldVariants } from '../../packages/styles/src/components/number-field/number-field.styles.js';
|
|
7
|
+
|
|
8
|
+
const NumberFieldContext = /*#__PURE__*/createContext({});
|
|
9
|
+
|
|
10
|
+
/* -------------------------------------------------------------------------------------------------
|
|
11
|
+
* NumberField Root
|
|
12
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
13
|
+
|
|
14
|
+
const NumberFieldRoot = ({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
fullWidth,
|
|
18
|
+
variant,
|
|
19
|
+
...props
|
|
20
|
+
}) => {
|
|
21
|
+
const slots = React__default.useMemo(() => numberFieldVariants({
|
|
22
|
+
fullWidth,
|
|
23
|
+
variant
|
|
24
|
+
}), [fullWidth, variant]);
|
|
25
|
+
return /*#__PURE__*/jsx(NumberFieldContext, {
|
|
26
|
+
value: {
|
|
27
|
+
slots
|
|
28
|
+
},
|
|
29
|
+
children: /*#__PURE__*/jsx(NumberField, {
|
|
30
|
+
"data-slot": "number-field",
|
|
31
|
+
...props,
|
|
32
|
+
className: composeTwRenderProps(className, slots?.base()),
|
|
33
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
34
|
+
children: typeof children === "function" ? children(values) : children
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/* -------------------------------------------------------------------------------------------------
|
|
41
|
+
* NumberField Group
|
|
42
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
43
|
+
|
|
44
|
+
const NumberFieldGroup = ({
|
|
45
|
+
children,
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}) => {
|
|
49
|
+
const {
|
|
50
|
+
slots
|
|
51
|
+
} = useContext(NumberFieldContext);
|
|
52
|
+
return /*#__PURE__*/jsx(Group, {
|
|
53
|
+
className: composeTwRenderProps(className, slots?.group()),
|
|
54
|
+
"data-slot": "number-field-group",
|
|
55
|
+
...props,
|
|
56
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
57
|
+
children: typeof children === "function" ? children(values) : children
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/* -------------------------------------------------------------------------------------------------
|
|
63
|
+
* NumberField Input
|
|
64
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
65
|
+
|
|
66
|
+
const NumberFieldInput = ({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}) => {
|
|
70
|
+
const {
|
|
71
|
+
slots
|
|
72
|
+
} = useContext(NumberFieldContext);
|
|
73
|
+
return /*#__PURE__*/jsx(Input, {
|
|
74
|
+
className: composeTwRenderProps(className, slots?.input()),
|
|
75
|
+
"data-slot": "number-field-input",
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/* -------------------------------------------------------------------------------------------------
|
|
81
|
+
* NumberField Increment Button
|
|
82
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
83
|
+
|
|
84
|
+
const NumberFieldIncrementButton = ({
|
|
85
|
+
children,
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}) => {
|
|
89
|
+
const {
|
|
90
|
+
slots
|
|
91
|
+
} = useContext(NumberFieldContext);
|
|
92
|
+
return /*#__PURE__*/jsx(Button, {
|
|
93
|
+
className: composeTwRenderProps(className, slots?.incrementButton()),
|
|
94
|
+
"data-slot": "number-field-increment-button",
|
|
95
|
+
slot: "increment",
|
|
96
|
+
...props,
|
|
97
|
+
children: children && /*#__PURE__*/React__default.isValidElement(children) ? children : /*#__PURE__*/jsx(IconPlus, {
|
|
98
|
+
"data-slot": "number-field-increment-button-icon"
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/* -------------------------------------------------------------------------------------------------
|
|
104
|
+
* NumberField Decrement Button
|
|
105
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
106
|
+
|
|
107
|
+
const NumberFieldDecrementButton = ({
|
|
108
|
+
children,
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}) => {
|
|
112
|
+
const {
|
|
113
|
+
slots
|
|
114
|
+
} = useContext(NumberFieldContext);
|
|
115
|
+
return /*#__PURE__*/jsx(Button, {
|
|
116
|
+
className: composeTwRenderProps(className, slots?.decrementButton()),
|
|
117
|
+
"data-slot": "number-field-decrement-button",
|
|
118
|
+
slot: "decrement",
|
|
119
|
+
...props,
|
|
120
|
+
children: children && /*#__PURE__*/React__default.isValidElement(children) ? children : /*#__PURE__*/jsx(IconMinus, {
|
|
121
|
+
"data-slot": "number-field-decrement-button-icon"
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export { NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { PaginationRoot } from "./pagination";
|
|
3
|
+
export declare const Pagination: {
|
|
4
|
+
({ "aria-label": ariaLabel, className, defaultPage, hideOnSinglePage, hideControlText, isCompact, isDisabled, labels, onChange, page, showControls, showEdges, showFullPages, showPages, size, total, variant, ...props }: import("./pagination").PaginationRootProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Root: {
|
|
8
|
+
({ "aria-label": ariaLabel, className, defaultPage, hideOnSinglePage, hideControlText, isCompact, isDisabled, labels, onChange, page, showControls, showEdges, showFullPages, showPages, size, total, variant, ...props }: import("./pagination").PaginationRootProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type Pagination = {
|
|
13
|
+
Props: ComponentProps<typeof PaginationRoot>;
|
|
14
|
+
RootProps: ComponentProps<typeof PaginationRoot>;
|
|
15
|
+
};
|
|
16
|
+
export { PaginationRoot } from "./pagination";
|
|
17
|
+
export type { PaginationChangeMeta, PaginationItemType, PaginationRootProps, PaginationRootProps as PaginationProps, } from "./pagination";
|
|
18
|
+
export { paginationVariants } from "@arobo/styles";
|
|
19
|
+
export type { PaginationVariants } from "@arobo/styles";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PaginationRoot } from './pagination.js';
|
|
2
|
+
export { paginationVariants } from '../../packages/styles/src/components/pagination/pagination.styles.js';
|
|
3
|
+
|
|
4
|
+
/* -------------------------------------------------------------------------------------------------
|
|
5
|
+
* Compound Component
|
|
6
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
7
|
+
const Pagination = Object.assign(PaginationRoot, {
|
|
8
|
+
Root: PaginationRoot
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { Pagination, PaginationRoot };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PaginationItemType } from "../../hooks/use-pagination";
|
|
2
|
+
import React from "react";
|
|
3
|
+
type PaginationItemProps = {
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
buttonClassName: string;
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
itemClassName: string;
|
|
9
|
+
onPress: () => void;
|
|
10
|
+
selected: boolean;
|
|
11
|
+
type: PaginationItemType;
|
|
12
|
+
};
|
|
13
|
+
declare const PaginationItem: ({ buttonClassName, content, isDisabled, itemClassName, onPress, selected, type, ariaLabel, }: PaginationItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { PaginationItem };
|
|
15
|
+
export type { PaginationItemProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button } from '../button/index.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
const PaginationItem = ({
|
|
5
|
+
buttonClassName,
|
|
6
|
+
content,
|
|
7
|
+
isDisabled,
|
|
8
|
+
itemClassName,
|
|
9
|
+
onPress,
|
|
10
|
+
selected,
|
|
11
|
+
type,
|
|
12
|
+
ariaLabel
|
|
13
|
+
}) => {
|
|
14
|
+
const commonProps = {
|
|
15
|
+
"aria-current": selected ? "page" : undefined,
|
|
16
|
+
"aria-label": ariaLabel,
|
|
17
|
+
"data-active": selected ? "true" : undefined,
|
|
18
|
+
"data-slot": "pagination-button",
|
|
19
|
+
"data-type": type,
|
|
20
|
+
className: buttonClassName
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/jsx("li", {
|
|
23
|
+
className: itemClassName,
|
|
24
|
+
"data-slot": "pagination-item",
|
|
25
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
26
|
+
...commonProps,
|
|
27
|
+
isDisabled: isDisabled,
|
|
28
|
+
onPress: onPress,
|
|
29
|
+
children: content
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { PaginationItem };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PaginationVariants } from "@arobo/styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { PaginationControl, type PaginationItemType } from "../../hooks/use-pagination";
|
|
4
|
+
type PaginationControlLabels = Partial<Record<PaginationControl, string>>;
|
|
5
|
+
type PaginationChangeMeta = {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
type: PaginationItemType;
|
|
8
|
+
};
|
|
9
|
+
interface PaginationRootProps extends Omit<ComponentPropsWithRef<"nav">, "onChange">, PaginationVariants {
|
|
10
|
+
defaultPage?: number;
|
|
11
|
+
hideOnSinglePage?: boolean;
|
|
12
|
+
hideControlText?: boolean;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
labels?: PaginationControlLabels;
|
|
15
|
+
onChange?: (page: number, meta: PaginationChangeMeta) => void;
|
|
16
|
+
page?: number;
|
|
17
|
+
showControls?: boolean;
|
|
18
|
+
showEdges?: boolean;
|
|
19
|
+
showFullPages?: boolean;
|
|
20
|
+
showPages?: boolean;
|
|
21
|
+
total: number;
|
|
22
|
+
}
|
|
23
|
+
declare const PaginationRoot: {
|
|
24
|
+
({ "aria-label": ariaLabel, className, defaultPage, hideOnSinglePage, hideControlText, isCompact, isDisabled, labels, onChange, page, showControls, showEdges, showFullPages, showPages, size, total, variant, ...props }: PaginationRootProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { PaginationRoot };
|
|
28
|
+
export type { PaginationChangeMeta, PaginationItemType, PaginationRootProps };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { composeSlotClassName } from '../../utils/compose.js';
|
|
2
|
+
import { IconChevronRight } from '../icons.js';
|
|
3
|
+
import { PaginationEllipsis } from './pagination-ellipsis.js';
|
|
4
|
+
import { PaginationItem } from './pagination-item.js';
|
|
5
|
+
import { usePagination, FIRST_PAGE, ELLIPSIS, PAGE, usePaginationChange, PaginationControl } from '../../hooks/use-pagination.js';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import { paginationVariants } from '../../packages/styles/src/components/pagination/pagination.styles.js';
|
|
8
|
+
|
|
9
|
+
const DEFAULT_CONTROL_LABELS = {
|
|
10
|
+
[PaginationControl.Prev]: "Previous",
|
|
11
|
+
[PaginationControl.Next]: "Next",
|
|
12
|
+
[PaginationControl.First]: "First",
|
|
13
|
+
[PaginationControl.Last]: "Last"
|
|
14
|
+
};
|
|
15
|
+
const renderControl = (type, labels, hideControlText) => {
|
|
16
|
+
const text = labels[type];
|
|
17
|
+
if (type === PaginationControl.Prev) {
|
|
18
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
19
|
+
children: [/*#__PURE__*/jsx(IconChevronRight, {
|
|
20
|
+
className: "rotate-180"
|
|
21
|
+
}), !hideControlText && text ? /*#__PURE__*/jsx("span", {
|
|
22
|
+
children: text
|
|
23
|
+
}) : null]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (type === PaginationControl.Next) {
|
|
27
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
28
|
+
children: [!hideControlText && text ? /*#__PURE__*/jsx("span", {
|
|
29
|
+
children: text
|
|
30
|
+
}) : null, /*#__PURE__*/jsx(IconChevronRight, {})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (hideControlText) return null;
|
|
34
|
+
return text;
|
|
35
|
+
};
|
|
36
|
+
const PaginationRoot = ({
|
|
37
|
+
"aria-label": ariaLabel,
|
|
38
|
+
className,
|
|
39
|
+
defaultPage = 1,
|
|
40
|
+
hideOnSinglePage = false,
|
|
41
|
+
hideControlText = false,
|
|
42
|
+
isCompact,
|
|
43
|
+
isDisabled = false,
|
|
44
|
+
labels,
|
|
45
|
+
onChange,
|
|
46
|
+
page,
|
|
47
|
+
showControls = true,
|
|
48
|
+
showEdges = false,
|
|
49
|
+
showFullPages = false,
|
|
50
|
+
showPages = true,
|
|
51
|
+
size,
|
|
52
|
+
total,
|
|
53
|
+
variant,
|
|
54
|
+
...props
|
|
55
|
+
}) => {
|
|
56
|
+
const {
|
|
57
|
+
controlItems,
|
|
58
|
+
currentPage,
|
|
59
|
+
isControlled,
|
|
60
|
+
pageItems,
|
|
61
|
+
setUncontrolledPage,
|
|
62
|
+
totalPages
|
|
63
|
+
} = usePagination({
|
|
64
|
+
defaultPage,
|
|
65
|
+
page,
|
|
66
|
+
showControls,
|
|
67
|
+
showEdges,
|
|
68
|
+
showFullPages,
|
|
69
|
+
showPages,
|
|
70
|
+
total
|
|
71
|
+
});
|
|
72
|
+
const slots = paginationVariants({
|
|
73
|
+
isCompact,
|
|
74
|
+
size,
|
|
75
|
+
variant
|
|
76
|
+
});
|
|
77
|
+
const controlLabels = {
|
|
78
|
+
...DEFAULT_CONTROL_LABELS,
|
|
79
|
+
...labels
|
|
80
|
+
};
|
|
81
|
+
const handleChange = usePaginationChange({
|
|
82
|
+
currentPage,
|
|
83
|
+
isControlled,
|
|
84
|
+
onChange,
|
|
85
|
+
setUncontrolledPage
|
|
86
|
+
});
|
|
87
|
+
const renderControlItems = position => controlItems.filter(item => item.position === position && item.show).map(item => {
|
|
88
|
+
const content = renderControl(item.type, controlLabels, hideControlText);
|
|
89
|
+
if (!content) return null;
|
|
90
|
+
const isItemDisabled = isDisabled || item.disabled;
|
|
91
|
+
return /*#__PURE__*/jsx(PaginationItem, {
|
|
92
|
+
ariaLabel: `${item.type === PaginationControl.Prev ? "Previous" : item.type === PaginationControl.Next ? "Next" : item.type === PaginationControl.First ? "First" : "Last"} page`,
|
|
93
|
+
buttonClassName: slots.button(),
|
|
94
|
+
content: content,
|
|
95
|
+
isDisabled: isItemDisabled,
|
|
96
|
+
itemClassName: slots.item(),
|
|
97
|
+
onPress: () => handleChange(item.page, item.type, isItemDisabled),
|
|
98
|
+
selected: false,
|
|
99
|
+
type: item.type
|
|
100
|
+
}, item.key);
|
|
101
|
+
});
|
|
102
|
+
if (hideOnSinglePage && totalPages === FIRST_PAGE) return null;
|
|
103
|
+
return /*#__PURE__*/jsx("nav", {
|
|
104
|
+
"aria-label": ariaLabel ?? "Pagination",
|
|
105
|
+
className: composeSlotClassName(slots.base, className),
|
|
106
|
+
"data-slot": "pagination",
|
|
107
|
+
...props,
|
|
108
|
+
children: /*#__PURE__*/jsxs("ul", {
|
|
109
|
+
className: slots.list(),
|
|
110
|
+
"data-slot": "pagination-list",
|
|
111
|
+
children: [renderControlItems("leading"), pageItems.map((item, index) => item === ELLIPSIS ? /*#__PURE__*/jsx(PaginationEllipsis, {
|
|
112
|
+
className: slots.ellipsis()
|
|
113
|
+
}, `pagination-item-${index}`) : /*#__PURE__*/jsx(PaginationItem, {
|
|
114
|
+
ariaLabel: `Go to page ${item}`,
|
|
115
|
+
buttonClassName: slots.button(),
|
|
116
|
+
content: item,
|
|
117
|
+
isDisabled: isDisabled,
|
|
118
|
+
itemClassName: slots.item(),
|
|
119
|
+
onPress: () => handleChange(item, PAGE, isDisabled),
|
|
120
|
+
selected: item === currentPage,
|
|
121
|
+
type: PAGE
|
|
122
|
+
}, `pagination-item-${index}`)), renderControlItems("trailing")]
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
PaginationRoot.displayName = "Pagination";
|
|
127
|
+
|
|
128
|
+
export { PaginationRoot };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PopoverRoot, PopoverHeading, PopoverContent, PopoverArrow, PopoverDialog, PopoverTrigger } from './popover.js';
|
|
2
|
-
export { popoverVariants } from '../../styles/src/components/popover/popover.styles.js';
|
|
2
|
+
export { popoverVariants } from '../../packages/styles/src/components/popover/popover.styles.js';
|
|
3
3
|
|
|
4
4
|
/* -------------------------------------------------------------------------------------------------
|
|
5
5
|
* Compound Component
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
2
|
import { DialogTrigger, Heading, Popover, OverlayArrow, Dialog, Pressable } from 'react-aria-components';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { composeSlotClassName, composeTwRenderProps } from '../../utils/compose.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { popoverVariants } from '../../styles/src/components/popover/popover.styles.js';
|
|
6
|
+
import { popoverVariants } from '../../packages/styles/src/components/popover/popover.styles.js';
|
|
7
7
|
import { SurfaceContext } from '../surface/surface.js';
|
|
8
8
|
|
|
9
9
|
const PopoverContext = /*#__PURE__*/createContext({});
|
|
@@ -16,7 +16,7 @@ const PopoverRoot = ({
|
|
|
16
16
|
children,
|
|
17
17
|
...props
|
|
18
18
|
}) => {
|
|
19
|
-
const slots =
|
|
19
|
+
const slots = React__default.useMemo(() => popoverVariants(), []);
|
|
20
20
|
return /*#__PURE__*/jsx(PopoverContext, {
|
|
21
21
|
value: {
|
|
22
22
|
slots
|
|
@@ -76,7 +76,7 @@ const PopoverArrow = ({
|
|
|
76
76
|
d: "M0 0 L6 6 L12 0"
|
|
77
77
|
})
|
|
78
78
|
});
|
|
79
|
-
const arrow = /*#__PURE__*/
|
|
79
|
+
const arrow = /*#__PURE__*/React__default.isValidElement(children) ? /*#__PURE__*/React__default.cloneElement(children, {
|
|
80
80
|
"data-slot": "popover-overlay-arrow"
|
|
81
81
|
}) : defaultArrow;
|
|
82
82
|
return /*#__PURE__*/jsx(OverlayArrow, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Collection, ListBoxLoadMoreItem, RouterProvider, I18nProvider } from "react-aria-components";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { isRTL, useLocale, useFilter } from "react-aria-components";
|
|
2
|
+
export { getLocalizationScript } from "react-aria-components/i18n";
|
|
3
|
+
export type { Key, Direction, Orientation, PressEvent, PointerType, KeyboardEvent, HoverEvent, Selection, TimeValue, DateValue, DateRange, ValidationResult, RangeValue, RouterConfig, } from "./types";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { RadioContent, RadioControl, RadioIndicator, RadioRoot } from "./radio";
|
|
3
|
+
export declare const Radio: (({ children, className, ...props }: import("./radio").RadioRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, ...props }: import("./radio").RadioRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Control: ({ children, className, ...props }: import("./radio").RadioControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Indicator: ({ children, className, ...props }: import("./radio").RadioIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Content: ({ children, className, ...props }: import("./radio").RadioContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export type Radio = {
|
|
10
|
+
Props: ComponentProps<typeof RadioRoot>;
|
|
11
|
+
RootProps: ComponentProps<typeof RadioRoot>;
|
|
12
|
+
ControlProps: ComponentProps<typeof RadioControl>;
|
|
13
|
+
IndicatorProps: ComponentProps<typeof RadioIndicator>;
|
|
14
|
+
ContentProps: ComponentProps<typeof RadioContent>;
|
|
15
|
+
};
|
|
16
|
+
export { RadioContent, RadioControl, RadioIndicator, RadioRoot };
|
|
17
|
+
export type { RadioRootProps, RadioRootProps as RadioProps, RadioControlProps, RadioIndicatorProps, RadioContentProps, } from "./radio";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RadioRoot, RadioContent, RadioIndicator, RadioControl } from './radio.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const Radio = Object.assign(RadioRoot, {
|
|
7
|
+
Root: RadioRoot,
|
|
8
|
+
Control: RadioControl,
|
|
9
|
+
Indicator: RadioIndicator,
|
|
10
|
+
Content: RadioContent
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { Radio, RadioContent, RadioControl, RadioIndicator, RadioRoot };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { RadioRenderProps } from "react-aria-components";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Radio as RadioPrimitive } from "react-aria-components";
|
|
5
|
+
interface RadioRootProps extends ComponentPropsWithRef<typeof RadioPrimitive> {
|
|
6
|
+
/** The name of the radio button, used when submitting an HTML form. */
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const RadioRoot: ({ children, className, ...props }: RadioRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface RadioControlProps extends ComponentPropsWithRef<"span"> {
|
|
11
|
+
}
|
|
12
|
+
declare const RadioControl: ({ children, className, ...props }: RadioControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface RadioIndicatorProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
14
|
+
children?: React.ReactNode | ((props: RadioRenderProps) => React.ReactNode);
|
|
15
|
+
}
|
|
16
|
+
declare const RadioIndicator: ({ children, className, ...props }: RadioIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
interface RadioContentProps extends ComponentPropsWithRef<"div"> {
|
|
18
|
+
}
|
|
19
|
+
declare const RadioContent: ({ children, className, ...props }: RadioContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { RadioRoot, RadioControl, RadioIndicator, RadioContent };
|
|
21
|
+
export type { RadioRootProps, RadioControlProps, RadioIndicatorProps, RadioContentProps };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { Radio } from 'react-aria-components';
|
|
3
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { radioVariants } from '../../packages/styles/src/components/radio/radio.styles.js';
|
|
6
|
+
|
|
7
|
+
const RadioContext = /*#__PURE__*/createContext({});
|
|
8
|
+
|
|
9
|
+
/* -------------------------------------------------------------------------------------------------
|
|
10
|
+
* Radio Root
|
|
11
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
12
|
+
|
|
13
|
+
const RadioRoot = ({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const slots = React__default.useMemo(() => radioVariants(), []);
|
|
19
|
+
return /*#__PURE__*/jsx(Radio, {
|
|
20
|
+
"data-slot": "radio",
|
|
21
|
+
...props,
|
|
22
|
+
className: composeTwRenderProps(className, slots.base()),
|
|
23
|
+
children: values => /*#__PURE__*/jsx(RadioContext, {
|
|
24
|
+
value: {
|
|
25
|
+
slots,
|
|
26
|
+
state: values
|
|
27
|
+
},
|
|
28
|
+
children: typeof children === "function" ? children(values) : children
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/* -------------------------------------------------------------------------------------------------
|
|
34
|
+
* Radio Control
|
|
35
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
36
|
+
|
|
37
|
+
const RadioControl = ({
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
...props
|
|
41
|
+
}) => {
|
|
42
|
+
const {
|
|
43
|
+
slots
|
|
44
|
+
} = useContext(RadioContext);
|
|
45
|
+
return /*#__PURE__*/jsx("span", {
|
|
46
|
+
className: composeSlotClassName(slots?.control, className),
|
|
47
|
+
"data-slot": "radio-control",
|
|
48
|
+
...props,
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/* -------------------------------------------------------------------------------------------------
|
|
54
|
+
* Radio Indicator
|
|
55
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
56
|
+
|
|
57
|
+
const RadioIndicator = ({
|
|
58
|
+
children,
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}) => {
|
|
62
|
+
const {
|
|
63
|
+
slots,
|
|
64
|
+
state
|
|
65
|
+
} = useContext(RadioContext);
|
|
66
|
+
const content = typeof children === "function" ? children(state ?? {}) : children;
|
|
67
|
+
return /*#__PURE__*/jsx("span", {
|
|
68
|
+
"aria-hidden": "true",
|
|
69
|
+
className: composeSlotClassName(slots?.indicator, className),
|
|
70
|
+
"data-slot": "radio-indicator",
|
|
71
|
+
...props,
|
|
72
|
+
children: content
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/* -------------------------------------------------------------------------------------------------
|
|
77
|
+
* Radio Content
|
|
78
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
79
|
+
|
|
80
|
+
const RadioContent = ({
|
|
81
|
+
children,
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}) => {
|
|
85
|
+
const {
|
|
86
|
+
slots
|
|
87
|
+
} = useContext(RadioContext);
|
|
88
|
+
return /*#__PURE__*/jsx("div", {
|
|
89
|
+
className: composeSlotClassName(slots?.content, className),
|
|
90
|
+
"data-slot": "radio-content",
|
|
91
|
+
...props,
|
|
92
|
+
children: children
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export { RadioContent, RadioControl, RadioIndicator, RadioRoot };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { RadioGroupRoot } from "./radio-group";
|
|
3
|
+
export declare const RadioGroup: (({ children, className, variant, ...props }: import("./radio-group").RadioGroupRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, variant, ...props }: import("./radio-group").RadioGroupRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export type RadioGroup = {
|
|
7
|
+
Props: ComponentProps<typeof RadioGroupRoot>;
|
|
8
|
+
RootProps: ComponentProps<typeof RadioGroupRoot>;
|
|
9
|
+
};
|
|
10
|
+
export { RadioGroupRoot };
|
|
11
|
+
export type { RadioGroupRootProps, RadioGroupRootProps as RadioGroupProps } from "./radio-group";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RadioGroupRoot } from './radio-group.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const RadioGroup = Object.assign(RadioGroupRoot, {
|
|
7
|
+
Root: RadioGroupRoot
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { RadioGroup, RadioGroupRoot };
|