@arobo/react 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion.d.ts +30 -0
- package/dist/components/accordion/accordion.js +190 -0
- package/dist/components/accordion/index.d.ts +23 -0
- package/dist/components/accordion/index.js +16 -0
- package/dist/components/alert/alert.d.ts +15 -0
- package/dist/components/alert/alert.js +151 -0
- package/dist/components/alert/index.d.ts +19 -0
- package/dist/components/alert/index.js +14 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +65 -0
- package/dist/components/alert-dialog/alert-dialog.js +303 -0
- package/dist/components/alert-dialog/index.d.ts +31 -0
- package/dist/components/alert-dialog/index.js +20 -0
- package/dist/components/avatar/avatar.d.ts +15 -0
- package/dist/components/avatar/avatar.js +92 -0
- package/dist/components/avatar/index.d.ts +15 -0
- package/dist/components/avatar/index.js +12 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +14 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +82 -0
- package/dist/components/breadcrumbs/index.d.ts +13 -0
- package/dist/components/breadcrumbs/index.js +11 -0
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/calendar.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.js +3 -3
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/carousel.d.ts +26 -0
- package/dist/components/carousel/carousel.js +170 -0
- package/dist/components/carousel/index.d.ts +17 -0
- package/dist/components/carousel/index.js +10 -0
- package/dist/components/checkbox/checkbox.d.ts +16 -3
- package/dist/components/checkbox/checkbox.js +149 -35
- package/dist/components/checkbox/index.d.ts +3 -16
- package/dist/components/checkbox/index.js +4 -12
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/chip/chip.d.ts +9 -0
- package/dist/components/chip/chip.js +24 -0
- package/dist/components/chip/index.d.ts +11 -0
- package/dist/components/chip/index.js +10 -0
- package/dist/components/close-button/close-button.d.ts +1 -1
- package/dist/components/close-button/close-button.js +1 -1
- package/dist/components/close-button/index.d.ts +1 -3
- package/dist/components/close-button/index.js +0 -1
- package/dist/components/combobox/combobox.js +3 -3
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/container/container.d.ts +9 -0
- package/dist/components/container/container.js +23 -0
- package/dist/components/container/index.d.ts +13 -0
- package/dist/components/container/index.js +11 -0
- package/dist/components/date-field/date-field.js +3 -3
- package/dist/components/date-field/index.js +1 -1
- package/dist/components/date-input-group/date-input-group.js +3 -3
- package/dist/components/date-input-group/index.js +1 -1
- package/dist/components/date-picker/date-picker.js +4 -4
- package/dist/components/date-picker/index.d.ts +0 -2
- package/dist/components/date-picker/index.js +0 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/date-range-picker.js +4 -4
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/description/description.js +1 -1
- package/dist/components/description/index.d.ts +1 -3
- package/dist/components/description/index.js +0 -1
- package/dist/components/drawer/drawer.d.ts +33 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown/dropdown.d.ts +38 -0
- package/dist/components/dropdown/dropdown.js +155 -0
- package/dist/components/dropdown/index.d.ts +41 -0
- package/dist/components/dropdown/index.js +18 -0
- package/dist/components/empty/empty.d.ts +34 -0
- package/dist/components/empty/empty.js +151 -0
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/empty-state/empty-state.d.ts +7 -0
- package/dist/components/empty-state/empty-state.js +19 -0
- package/dist/components/empty-state/index.d.ts +11 -0
- package/dist/components/empty-state/index.js +10 -0
- package/dist/components/error-message/error-message.js +1 -1
- package/dist/components/error-message/index.js +1 -1
- package/dist/components/field-error/field-error.js +1 -1
- package/dist/components/field-error/index.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +16 -0
- package/dist/components/fieldset/fieldset.js +87 -0
- package/dist/components/fieldset/index.d.ts +19 -0
- package/dist/components/fieldset/index.js +14 -0
- package/dist/components/header/header.d.ts +7 -0
- package/dist/components/header/header.js +20 -0
- package/dist/components/header/index.d.ts +8 -0
- package/dist/components/header/index.js +8 -0
- package/dist/components/heading/heading.d.ts +12 -0
- package/dist/components/heading/heading.js +29 -0
- package/dist/components/heading/index.d.ts +13 -0
- package/dist/components/heading/index.js +11 -0
- package/dist/components/icons.js +169 -1
- package/dist/components/index.d.ts +45 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/input-group/index.d.ts +21 -0
- package/dist/components/input-group/index.js +15 -0
- package/dist/components/input-group/input-group.d.ts +20 -0
- package/dist/components/input-group/input-group.js +128 -0
- package/dist/components/input-otp/index.d.ts +22 -0
- package/dist/components/input-otp/index.js +20 -0
- package/dist/components/input-otp/input-otp.d.ts +26 -0
- package/dist/components/input-otp/input-otp.js +138 -0
- package/dist/components/kbd/index.d.ts +17 -0
- package/dist/components/kbd/index.js +13 -0
- package/dist/components/kbd/kbd.constants.d.ts +3 -0
- package/dist/components/kbd/kbd.constants.js +50 -0
- package/dist/components/kbd/kbd.d.ts +24 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/index.js +1 -1
- package/dist/components/label/label.js +1 -1
- package/dist/components/link/index.d.ts +13 -0
- package/dist/components/link/index.js +11 -0
- package/dist/components/link/link.d.ts +10 -0
- package/dist/components/link/link.js +58 -0
- package/dist/components/listbox/index.d.ts +21 -0
- package/dist/components/listbox/index.js +16 -0
- package/dist/components/listbox/listbox.d.ts +9 -0
- package/dist/components/listbox/listbox.js +22 -0
- package/dist/components/listbox/listbox.type.d.ts +34 -0
- package/dist/components/listbox-item/index.d.ts +13 -0
- package/dist/components/listbox-item/index.js +11 -0
- package/dist/components/listbox-item/listbox-item.d.ts +15 -0
- package/dist/components/listbox-item/listbox-item.js +76 -0
- package/dist/components/listbox-section/index.d.ts +8 -0
- package/dist/components/listbox-section/index.js +8 -0
- package/dist/components/listbox-section/listbox-section.d.ts +8 -0
- package/dist/components/listbox-section/listbox-section.js +21 -0
- package/dist/components/menu/index.d.ts +22 -0
- package/dist/components/menu/index.js +16 -0
- package/dist/components/menu/menu.d.ts +9 -0
- package/dist/components/menu/menu.js +19 -0
- package/dist/components/menu-item/index.d.ts +15 -0
- package/dist/components/menu-item/index.js +12 -0
- package/dist/components/menu-item/menu-item.d.ts +20 -0
- package/dist/components/menu-item/menu-item.js +122 -0
- package/dist/components/menu-section/index.d.ts +8 -0
- package/dist/components/menu-section/index.js +8 -0
- package/dist/components/menu-section/menu-section.d.ts +8 -0
- package/dist/components/menu-section/menu-section.js +21 -0
- package/dist/components/modal/index.d.ts +31 -0
- package/dist/components/modal/index.js +20 -0
- package/dist/components/modal/modal.d.ts +53 -0
- package/dist/components/modal/modal.js +283 -0
- package/dist/components/number-field/index.d.ts +21 -0
- package/dist/components/number-field/index.js +15 -0
- package/dist/components/number-field/number-field.d.ts +20 -0
- package/dist/components/number-field/number-field.js +126 -0
- package/dist/components/pagination/index.d.ts +19 -0
- package/dist/components/pagination/index.js +11 -0
- package/dist/components/pagination/pagination-ellipsis.d.ts +6 -0
- package/dist/components/pagination/pagination-ellipsis.js +11 -0
- package/dist/components/pagination/pagination-item.d.ts +15 -0
- package/dist/components/pagination/pagination-item.js +34 -0
- package/dist/components/pagination/pagination.d.ts +28 -0
- package/dist/components/pagination/pagination.js +128 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/rac/components.d.ts +1 -0
- package/dist/components/rac/index.d.ts +3 -0
- package/dist/components/rac/index.js +2 -0
- package/dist/components/rac/types.d.ts +2 -0
- package/dist/components/radio/index.d.ts +17 -0
- package/dist/components/radio/index.js +13 -0
- package/dist/components/radio/radio.d.ts +21 -0
- package/dist/components/radio/radio.js +96 -0
- package/dist/components/radio-group/index.d.ts +11 -0
- package/dist/components/radio-group/index.js +10 -0
- package/dist/components/radio-group/radio-group.d.ts +8 -0
- package/dist/components/radio-group/radio-group.js +26 -0
- package/dist/components/range-calendar/index.js +1 -1
- package/dist/components/range-calendar/range-calendar.js +1 -1
- package/dist/components/scroll-shadow/index.d.ts +19 -0
- package/dist/components/scroll-shadow/index.js +11 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts +32 -0
- package/dist/components/scroll-shadow/scroll-shadow.js +75 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +11 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.js +120 -0
- package/dist/components/select/index.d.ts +19 -0
- package/dist/components/select/index.js +14 -0
- package/dist/components/select/select.d.ts +24 -0
- package/dist/components/select/select.js +139 -0
- package/dist/components/separator/index.d.ts +11 -0
- package/dist/components/separator/index.js +10 -0
- package/dist/components/separator/separator.d.ts +8 -0
- package/dist/components/separator/separator.js +22 -0
- package/dist/components/slider/index.d.ts +21 -0
- package/dist/components/slider/index.js +15 -0
- package/dist/components/slider/slider.d.ts +23 -0
- package/dist/components/slider/slider.js +176 -0
- package/dist/components/spinner/index.d.ts +11 -0
- package/dist/components/spinner/index.js +10 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +87 -0
- package/dist/components/surface/index.js +1 -1
- package/dist/components/surface/surface.js +1 -1
- package/dist/components/switch/index.d.ts +17 -0
- package/dist/components/switch/index.js +13 -0
- package/dist/components/switch/switch.d.ts +17 -0
- package/dist/components/switch/switch.js +97 -0
- package/dist/components/tabs/index.d.ts +21 -0
- package/dist/components/tabs/index.js +15 -0
- package/dist/components/tabs/tabs.d.ts +34 -0
- package/dist/components/tabs/tabs.js +140 -0
- package/dist/components/tag/index.d.ts +13 -0
- package/dist/components/tag/index.js +11 -0
- package/dist/components/tag/tag.d.ts +14 -0
- package/dist/components/tag/tag.js +84 -0
- package/dist/components/tag-group/index.d.ts +13 -0
- package/dist/components/tag-group/index.js +12 -0
- package/dist/components/tag-group/tag-group.d.ts +19 -0
- package/dist/components/tag-group/tag-group.js +58 -0
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-field/text-field.js +3 -3
- package/dist/components/textarea/index.d.ts +11 -0
- package/dist/components/textarea/index.js +10 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +26 -0
- package/dist/components/toast/constants.d.ts +3 -0
- package/dist/components/toast/constants.js +8 -0
- package/dist/components/toast/index.d.ts +73 -0
- package/dist/components/toast/index.js +21 -0
- package/dist/components/toast/toast-queue.d.ts +67 -0
- package/dist/components/toast/toast-queue.js +129 -0
- package/dist/components/toast/toast.d.ts +67 -0
- package/dist/components/toast/toast.js +295 -0
- package/dist/components/toggle-button/index.d.ts +2 -0
- package/dist/components/toggle-button/index.js +1 -0
- package/dist/components/toggle-button/toggle-button.d.ts +10 -0
- package/dist/components/toggle-button/toggle-button.js +26 -0
- package/dist/components/toggle-button-group/index.d.ts +2 -0
- package/dist/components/toggle-button-group/index.js +1 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +15 -0
- package/dist/components/toggle-button-group/toggle-button-group.js +61 -0
- package/dist/components/tooltip/index.d.ts +17 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/components/tooltip/tooltip.d.ts +20 -0
- package/dist/components/tooltip/tooltip.js +105 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/hooks/use-isomorphic-layout-effect.js +5 -0
- package/dist/hooks/use-list-data.d.ts +111 -0
- package/dist/hooks/use-media-query.d.ts +6 -0
- package/dist/hooks/use-media-query.js +49 -0
- package/dist/hooks/use-overlay-state.d.ts +52 -0
- package/dist/hooks/use-pagination.d.ts +48 -0
- package/dist/hooks/use-pagination.js +114 -0
- package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
- package/dist/hooks/use-safe-layout-effect.js +5 -0
- package/dist/index.js +111 -26
- package/dist/node_modules/.pnpm/@internationalized_string@3.2.7/node_modules/@internationalized/string/dist/LocalizedStringDictionary.js +74 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ar-AE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/bg-BG.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/cs-CZ.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/da-DK.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/de-DE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/el-GR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/en-US.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/es-ES.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/et-EE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/fi-FI.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/fr-FR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/he-IL.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/hr-HR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/hu-HU.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/index.js +80 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/it-IT.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ja-JP.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ko-KR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/lt-LT.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/lv-LV.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/nb-NO.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/nl-NL.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pl-PL.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pt-BR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pt-PT.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ro-RO.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ru-RU.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sk-SK.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sl-SI.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sr-SP.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sv-SE.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/tr-TR.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/uk-UA.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/zh-CN.js +3 -0
- package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/zh-TW.js +3 -0
- package/dist/packages/styles/src/components/accordion/accordion.styles.js +26 -0
- package/dist/packages/styles/src/components/alert/alert.styles.js +35 -0
- package/dist/packages/styles/src/components/alert-dialog/alert-dialog.styles.js +70 -0
- package/dist/packages/styles/src/components/avatar/avatar.styles.js +51 -0
- package/dist/packages/styles/src/components/breadcrumbs/breadcrumbs.styles.js +12 -0
- package/dist/packages/styles/src/components/chip/chip.styles.js +31 -0
- package/dist/packages/styles/src/components/container/container.styles.js +18 -0
- package/dist/packages/styles/src/components/dropdown/dropdown.styles.js +12 -0
- package/dist/packages/styles/src/components/empty/empty.styles.js +30 -0
- package/dist/packages/styles/src/components/empty-state/empty-state.styles.js +7 -0
- package/dist/packages/styles/src/components/fieldset/fieldset.styles.js +13 -0
- package/dist/packages/styles/src/components/header/header.styles.js +7 -0
- package/dist/packages/styles/src/components/heading/heading.styles.js +19 -0
- package/dist/packages/styles/src/components/input-group/input-group.styles.js +32 -0
- package/dist/packages/styles/src/components/input-otp/input-otp.styles.js +28 -0
- package/dist/packages/styles/src/components/kbd/kbd.styles.js +18 -0
- package/dist/packages/styles/src/components/link/link.styles.js +12 -0
- package/dist/packages/styles/src/components/listbox/listbox.styles.js +16 -0
- package/dist/packages/styles/src/components/listbox-item/listbox-item.styles.js +23 -0
- package/dist/packages/styles/src/components/listbox-section/listbox-section.styles.js +7 -0
- package/dist/packages/styles/src/components/menu/menu.styles.js +7 -0
- package/dist/packages/styles/src/components/menu-item/menu-item.styles.js +24 -0
- package/dist/packages/styles/src/components/menu-section/menu-section.styles.js +7 -0
- package/dist/packages/styles/src/components/modal/modal.styles.js +68 -0
- package/dist/packages/styles/src/components/number-field/number-field.styles.js +34 -0
- package/dist/packages/styles/src/components/pagination/pagination.styles.js +33 -0
- package/dist/packages/styles/src/components/radio/radio.styles.js +12 -0
- package/dist/packages/styles/src/components/radio-group/radio-group.styles.js +16 -0
- package/dist/packages/styles/src/components/scroll-shadow/scroll-shadow.styles.js +35 -0
- package/dist/packages/styles/src/components/select/select.styles.js +34 -0
- package/dist/packages/styles/src/components/separator/separator.styles.js +16 -0
- package/dist/packages/styles/src/components/slider/slider.styles.js +14 -0
- package/dist/packages/styles/src/components/spinner/spinner.styles.js +26 -0
- package/dist/packages/styles/src/components/switch/switch.styles.js +28 -0
- package/dist/packages/styles/src/components/tabs/tabs.styles.js +27 -0
- package/dist/packages/styles/src/components/tag/tag.styles.js +35 -0
- package/dist/packages/styles/src/components/tag-group/tag-group.styles.js +10 -0
- package/dist/packages/styles/src/components/textarea/textarea.styles.js +21 -0
- package/dist/packages/styles/src/components/toast/toast.styles.js +65 -0
- package/dist/packages/styles/src/components/toggle-button/toggle-button.styles.js +36 -0
- package/dist/packages/styles/src/components/toggle-button-group/toggle-button-group.styles.js +36 -0
- package/dist/packages/styles/src/components/tooltip/tooltip.styles.js +10 -0
- package/dist/utils/children.d.ts +9 -0
- package/dist/utils/children.js +17 -0
- package/dist/utils/compose.js +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/merge-props.d.ts +26 -0
- package/dist/utils/merge-props.js +72 -0
- package/dist/utils/merge-refs.d.ts +5 -0
- package/dist/utils/merge-refs.js +48 -0
- package/package.json +13 -7
- package/dist/components/field-group/field-group.d.ts +0 -11
- package/dist/components/field-group/field-group.js +0 -18
- package/dist/components/field-group/index.d.ts +0 -13
- package/dist/components/field-group/index.js +0 -11
- package/dist/styles/src/components/field-group/field-group.styles.js +0 -25
- package/dist/styles/src/utils/state.js +0 -13
- /package/dist/{styles → packages/styles}/src/components/button/button.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/button-group/button-group.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/calendar/calendar.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/card/card.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/checkbox/checkbox.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/checkbox-group/checkbox-group.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/close-button/close-button.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/combobox/combobox.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-field/date-field.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-input-group/date-input-group.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-picker/date-picker.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/date-range-picker/date-range-picker.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/description/description.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/error-message/error-message.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/field-error/field-error.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/input/input.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/label/label.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/popover/popover.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/range-calendar/range-calendar.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/surface/surface.styles.js +0 -0
- /package/dist/{styles → packages/styles}/src/components/text-field/text-field.styles.js +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ToastContentValue } from "./toast-queue";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { ToastProps as ToastPrimitiveProps } from "react-aria-components";
|
|
4
|
+
import { Text as TextPrimitive, UNSTABLE_ToastContent as ToastContentPrimitive, UNSTABLE_ToastRegion as ToastRegionPrimitive } from "react-aria-components";
|
|
5
|
+
import { Button } from "../button";
|
|
6
|
+
import { CloseButton } from "../close-button";
|
|
7
|
+
import { ToastQueue } from "./toast-queue";
|
|
8
|
+
import { type ToastVariants } from "@arobo/styles";
|
|
9
|
+
interface ToastProps<T extends object = ToastContentValue> extends ToastPrimitiveProps<T>, ToastVariants {
|
|
10
|
+
scaleFactor?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const Toast: {
|
|
13
|
+
<T extends object = ToastContentValue>({ children, className, placement, scaleFactor, toast, variant, ...rest }: ToastProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
interface ToastContentProps extends ComponentPropsWithRef<typeof ToastContentPrimitive> {
|
|
17
|
+
}
|
|
18
|
+
declare const ToastContent: ({ children, className, ...rest }: ToastContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface ToastIndicatorProps extends ComponentPropsWithRef<"div"> {
|
|
20
|
+
variant?: ToastVariants["variant"];
|
|
21
|
+
}
|
|
22
|
+
declare const ToastIndicator: {
|
|
23
|
+
({ children, className, variant, ...rest }: ToastIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
interface ToastTitleProps extends ComponentPropsWithRef<typeof TextPrimitive> {
|
|
27
|
+
}
|
|
28
|
+
declare const ToastTitle: {
|
|
29
|
+
({ children, className, ...rest }: ToastTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
interface ToastDescriptionProps extends ComponentPropsWithRef<typeof TextPrimitive> {
|
|
33
|
+
}
|
|
34
|
+
declare const ToastDescription: {
|
|
35
|
+
({ children, className, ...rest }: ToastDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
interface ToastCloseButtonProps extends ComponentPropsWithRef<typeof CloseButton> {
|
|
39
|
+
}
|
|
40
|
+
declare const ToastCloseButton: {
|
|
41
|
+
({ className, ...rest }: ToastCloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
interface ToastActionButtonProps extends ComponentPropsWithRef<typeof Button> {
|
|
45
|
+
}
|
|
46
|
+
declare const ToastActionButton: {
|
|
47
|
+
({ children, className, ...rest }: ToastActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
displayName: string;
|
|
49
|
+
};
|
|
50
|
+
type ToastRegionPrimitiveProps<T extends object = ToastContentValue> = ComponentPropsWithRef<typeof ToastRegionPrimitive<T>>;
|
|
51
|
+
interface ToastContainerProps<T extends object = ToastContentValue> extends Omit<ToastRegionPrimitiveProps<T>, "queue" | "children"> {
|
|
52
|
+
children?: ToastRegionPrimitiveProps<T>["children"];
|
|
53
|
+
/** The gap between toasts. @default 14 */
|
|
54
|
+
gap?: number;
|
|
55
|
+
/** The maximum number of toasts to display at a time. Only applies when no custom `toast` prop is provided. */
|
|
56
|
+
maxVisibleToasts?: number;
|
|
57
|
+
/** The scale factor for toasts. @default 0.05 */
|
|
58
|
+
scaleFactor?: number;
|
|
59
|
+
placement?: ToastVariants["placement"];
|
|
60
|
+
queue?: ToastQueue<T>;
|
|
61
|
+
}
|
|
62
|
+
declare const ToastContainer: {
|
|
63
|
+
<T extends object = ToastContentValue>({ children, className, gap, maxVisibleToasts, placement, queue: queueProp, scaleFactor, ...rest }: ToastContainerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
displayName: string;
|
|
65
|
+
};
|
|
66
|
+
export { ToastQueue, Toast, ToastActionButton, ToastCloseButton, ToastContent, ToastDescription, ToastIndicator, ToastContainer, ToastTitle, };
|
|
67
|
+
export type { ToastActionButtonProps, ToastCloseButtonProps, ToastContentProps, ToastDescriptionProps, ToastIndicatorProps, ToastProps, ToastContainerProps, ToastTitleProps, };
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { useContext, createContext, useMemo, useCallback } from 'react';
|
|
2
|
+
import { UNSTABLE_ToastStateContext, UNSTABLE_Toast, Text, UNSTABLE_ToastContent, UNSTABLE_ToastRegion } from 'react-aria-components';
|
|
3
|
+
import { dataAttr } from '../../utils/assertion.js';
|
|
4
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
5
|
+
import { Button } from '../button/index.js';
|
|
6
|
+
import { CloseButton } from '../close-button/index.js';
|
|
7
|
+
import { InfoIcon, DangerIcon, WarningIcon, SuccessIcon } from '../icons.js';
|
|
8
|
+
import { DEFAULT_SCALE_FACTOR, DEFAULT_MAX_VISIBLE_TOAST, DEFAULT_GAP } from './constants.js';
|
|
9
|
+
import { toast } from './toast-queue.js';
|
|
10
|
+
export { ToastQueue } from './toast-queue.js';
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
import { toastVariants } from '../../packages/styles/src/components/toast/toast.styles.js';
|
|
13
|
+
import { useMediaQuery } from '../../hooks/use-media-query.js';
|
|
14
|
+
|
|
15
|
+
const ToastContext = /*#__PURE__*/createContext({});
|
|
16
|
+
|
|
17
|
+
/* ------------------------------------------------------------------------------------------------
|
|
18
|
+
* Toast
|
|
19
|
+
* --------------------------------------------------------------------------------------------- */
|
|
20
|
+
|
|
21
|
+
const Toast = ({
|
|
22
|
+
children,
|
|
23
|
+
className,
|
|
24
|
+
placement,
|
|
25
|
+
scaleFactor = DEFAULT_SCALE_FACTOR,
|
|
26
|
+
toast,
|
|
27
|
+
variant,
|
|
28
|
+
...rest
|
|
29
|
+
}) => {
|
|
30
|
+
const {
|
|
31
|
+
placement: contextPlacement,
|
|
32
|
+
scaleFactor: contextScaleFactor,
|
|
33
|
+
slots
|
|
34
|
+
} = useContext(ToastContext);
|
|
35
|
+
const finalPlacement = placement ?? contextPlacement;
|
|
36
|
+
const finalScaleFactor = scaleFactor ?? contextScaleFactor;
|
|
37
|
+
const state = useContext(UNSTABLE_ToastStateContext);
|
|
38
|
+
const visibleToasts = state.visibleToasts;
|
|
39
|
+
const index = visibleToasts.indexOf(toast);
|
|
40
|
+
const isFrontmost = index <= 0;
|
|
41
|
+
const isBottom = finalPlacement?.startsWith("bottom");
|
|
42
|
+
const style = useMemo(() => ({
|
|
43
|
+
viewTransitionName: toast?.key,
|
|
44
|
+
translate: `0 ${94 * index * (isBottom ? 1 : -1)}% 0`,
|
|
45
|
+
scale: 1 - index * finalScaleFactor,
|
|
46
|
+
zIndex: visibleToasts.length - index - 1,
|
|
47
|
+
tabindex: isFrontmost ? 0 : -1,
|
|
48
|
+
...rest.style
|
|
49
|
+
}), [index, toast?.key, rest.style, isBottom, visibleToasts.length, finalScaleFactor, isFrontmost]);
|
|
50
|
+
return /*#__PURE__*/jsx(UNSTABLE_Toast, {
|
|
51
|
+
className: composeTwRenderProps(className, slots?.toast({
|
|
52
|
+
variant
|
|
53
|
+
})),
|
|
54
|
+
"data-frontmost": dataAttr(isFrontmost),
|
|
55
|
+
"data-index": index,
|
|
56
|
+
"data-slot": "toast",
|
|
57
|
+
style: style,
|
|
58
|
+
toast: toast,
|
|
59
|
+
...rest,
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
Toast.displayName = "HeroUI.Toast";
|
|
64
|
+
|
|
65
|
+
/* ------------------------------------------------------------------------------------------------
|
|
66
|
+
* Toast Content
|
|
67
|
+
* --------------------------------------------------------------------------------------------- */
|
|
68
|
+
|
|
69
|
+
const ToastContent = ({
|
|
70
|
+
children,
|
|
71
|
+
className,
|
|
72
|
+
...rest
|
|
73
|
+
}) => {
|
|
74
|
+
const {
|
|
75
|
+
slots
|
|
76
|
+
} = useContext(ToastContext);
|
|
77
|
+
return /*#__PURE__*/jsx(UNSTABLE_ToastContent, {
|
|
78
|
+
className: composeSlotClassName(slots?.content, className),
|
|
79
|
+
"data-slot": "toast-content",
|
|
80
|
+
...rest,
|
|
81
|
+
children: children
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/* ------------------------------------------------------------------------------------------------
|
|
86
|
+
* Toast Indicator
|
|
87
|
+
* --------------------------------------------------------------------------------------------- */
|
|
88
|
+
|
|
89
|
+
const ToastIndicator = ({
|
|
90
|
+
children,
|
|
91
|
+
className,
|
|
92
|
+
variant,
|
|
93
|
+
...rest
|
|
94
|
+
}) => {
|
|
95
|
+
const {
|
|
96
|
+
slots
|
|
97
|
+
} = useContext(ToastContext);
|
|
98
|
+
const getDefaultIcon = useCallback(() => {
|
|
99
|
+
switch (variant) {
|
|
100
|
+
case "accent":
|
|
101
|
+
return /*#__PURE__*/jsx(InfoIcon, {
|
|
102
|
+
"data-slot": "toast-default-icon"
|
|
103
|
+
});
|
|
104
|
+
case "success":
|
|
105
|
+
return /*#__PURE__*/jsx(SuccessIcon, {
|
|
106
|
+
"data-slot": "toast-default-icon"
|
|
107
|
+
});
|
|
108
|
+
case "warning":
|
|
109
|
+
return /*#__PURE__*/jsx(WarningIcon, {
|
|
110
|
+
"data-slot": "toast-default-icon"
|
|
111
|
+
});
|
|
112
|
+
case "danger":
|
|
113
|
+
return /*#__PURE__*/jsx(DangerIcon, {
|
|
114
|
+
"data-slot": "toast-default-icon"
|
|
115
|
+
});
|
|
116
|
+
default:
|
|
117
|
+
return /*#__PURE__*/jsx(InfoIcon, {
|
|
118
|
+
"data-slot": "toast-default-icon"
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}, [variant]);
|
|
122
|
+
return /*#__PURE__*/jsx("div", {
|
|
123
|
+
className: composeSlotClassName(slots?.indicator, className),
|
|
124
|
+
"data-slot": "toast-indicator",
|
|
125
|
+
...rest,
|
|
126
|
+
children: children ?? getDefaultIcon()
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
ToastIndicator.displayName = "HeroUI.ToastIndicator";
|
|
130
|
+
|
|
131
|
+
/* ------------------------------------------------------------------------------------------------
|
|
132
|
+
* Toast Title
|
|
133
|
+
* --------------------------------------------------------------------------------------------- */
|
|
134
|
+
|
|
135
|
+
const ToastTitle = ({
|
|
136
|
+
children,
|
|
137
|
+
className,
|
|
138
|
+
...rest
|
|
139
|
+
}) => {
|
|
140
|
+
const {
|
|
141
|
+
slots
|
|
142
|
+
} = useContext(ToastContext);
|
|
143
|
+
return /*#__PURE__*/jsx(Text, {
|
|
144
|
+
className: composeSlotClassName(slots?.title, className),
|
|
145
|
+
"data-slot": "toast-title",
|
|
146
|
+
slot: "title",
|
|
147
|
+
...rest,
|
|
148
|
+
children: children
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
ToastTitle.displayName = "HeroUI.ToastTitle";
|
|
152
|
+
|
|
153
|
+
/* ------------------------------------------------------------------------------------------------
|
|
154
|
+
* Toast Description
|
|
155
|
+
* --------------------------------------------------------------------------------------------- */
|
|
156
|
+
|
|
157
|
+
const ToastDescription = ({
|
|
158
|
+
children,
|
|
159
|
+
className,
|
|
160
|
+
...rest
|
|
161
|
+
}) => {
|
|
162
|
+
const {
|
|
163
|
+
slots
|
|
164
|
+
} = useContext(ToastContext);
|
|
165
|
+
return /*#__PURE__*/jsx(Text, {
|
|
166
|
+
className: composeSlotClassName(slots?.description, className),
|
|
167
|
+
"data-slot": "toast-description",
|
|
168
|
+
slot: "description",
|
|
169
|
+
...rest,
|
|
170
|
+
children: children
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
ToastDescription.displayName = "HeroUI.ToastDescription";
|
|
174
|
+
|
|
175
|
+
/* ------------------------------------------------------------------------------------------------
|
|
176
|
+
* Toast Close Button
|
|
177
|
+
* --------------------------------------------------------------------------------------------- */
|
|
178
|
+
|
|
179
|
+
const ToastCloseButton = ({
|
|
180
|
+
className,
|
|
181
|
+
...rest
|
|
182
|
+
}) => {
|
|
183
|
+
const {
|
|
184
|
+
slots
|
|
185
|
+
} = useContext(ToastContext);
|
|
186
|
+
return /*#__PURE__*/jsx(CloseButton, {
|
|
187
|
+
className: composeTwRenderProps(className, slots?.close()),
|
|
188
|
+
"data-slot": "toast-close",
|
|
189
|
+
slot: "close",
|
|
190
|
+
...rest
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
ToastCloseButton.displayName = "HeroUI.ToastCloseButton";
|
|
194
|
+
|
|
195
|
+
/* ------------------------------------------------------------------------------------------------
|
|
196
|
+
* Toast Action Button
|
|
197
|
+
* --------------------------------------------------------------------------------------------- */
|
|
198
|
+
|
|
199
|
+
const ToastActionButton = ({
|
|
200
|
+
children,
|
|
201
|
+
className,
|
|
202
|
+
...rest
|
|
203
|
+
}) => {
|
|
204
|
+
const {
|
|
205
|
+
slots
|
|
206
|
+
} = useContext(ToastContext);
|
|
207
|
+
return /*#__PURE__*/jsx(Button, {
|
|
208
|
+
className: composeTwRenderProps(className, slots?.action?.()),
|
|
209
|
+
"data-slot": "toast-action-button",
|
|
210
|
+
...rest,
|
|
211
|
+
children: children
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
ToastActionButton.displayName = "HeroUI.ToastActionButton";
|
|
215
|
+
|
|
216
|
+
/* ------------------------------------------------------------------------------------------------
|
|
217
|
+
* Toast Region
|
|
218
|
+
* --------------------------------------------------------------------------------------------- */
|
|
219
|
+
|
|
220
|
+
const ToastContainer = ({
|
|
221
|
+
children,
|
|
222
|
+
className,
|
|
223
|
+
gap = DEFAULT_GAP,
|
|
224
|
+
maxVisibleToasts = DEFAULT_MAX_VISIBLE_TOAST,
|
|
225
|
+
placement = "bottom",
|
|
226
|
+
queue: queueProp,
|
|
227
|
+
scaleFactor = DEFAULT_SCALE_FACTOR,
|
|
228
|
+
...rest
|
|
229
|
+
}) => {
|
|
230
|
+
const slots = useMemo(() => toastVariants({
|
|
231
|
+
placement
|
|
232
|
+
}), [placement]);
|
|
233
|
+
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
234
|
+
const toastQueue = useMemo(() => {
|
|
235
|
+
if (queueProp) {
|
|
236
|
+
// Custom toast prop provided - use it (it already has its own maxVisibleToasts limit)
|
|
237
|
+
return queueProp;
|
|
238
|
+
}
|
|
239
|
+
return toast.getQueue();
|
|
240
|
+
}, [queueProp, maxVisibleToasts]);
|
|
241
|
+
const getDefaultChildren = useCallback(renderProps => {
|
|
242
|
+
const {
|
|
243
|
+
actionProps,
|
|
244
|
+
description,
|
|
245
|
+
indicator,
|
|
246
|
+
title,
|
|
247
|
+
variant
|
|
248
|
+
} = renderProps.toast.content ?? {};
|
|
249
|
+
return /*#__PURE__*/jsxs(Toast, {
|
|
250
|
+
placement: placement,
|
|
251
|
+
scaleFactor: scaleFactor,
|
|
252
|
+
toast: renderProps.toast,
|
|
253
|
+
variant: variant,
|
|
254
|
+
children: [indicator === null ? null : /*#__PURE__*/jsx(ToastIndicator, {
|
|
255
|
+
variant: variant,
|
|
256
|
+
children: indicator
|
|
257
|
+
}), /*#__PURE__*/jsxs(ToastContent, {
|
|
258
|
+
children: [!!title && /*#__PURE__*/jsx(ToastTitle, {
|
|
259
|
+
children: title
|
|
260
|
+
}), !!description && /*#__PURE__*/jsx(ToastDescription, {
|
|
261
|
+
children: description
|
|
262
|
+
}), isMobile && actionProps?.children ? /*#__PURE__*/jsx(ToastActionButton, {
|
|
263
|
+
...actionProps,
|
|
264
|
+
children: actionProps.children
|
|
265
|
+
}) : null]
|
|
266
|
+
}), !isMobile && actionProps?.children ? /*#__PURE__*/jsx(ToastActionButton, {
|
|
267
|
+
...actionProps,
|
|
268
|
+
children: actionProps.children
|
|
269
|
+
}) : null, /*#__PURE__*/jsx(ToastCloseButton, {})]
|
|
270
|
+
});
|
|
271
|
+
}, [isMobile, placement, scaleFactor]);
|
|
272
|
+
return /*#__PURE__*/jsx(UNSTABLE_ToastRegion, {
|
|
273
|
+
className: composeTwRenderProps(className, slots?.region()),
|
|
274
|
+
"data-slot": "toast-region",
|
|
275
|
+
queue: toastQueue,
|
|
276
|
+
style: {
|
|
277
|
+
// @ts-expect-error - CSS variables
|
|
278
|
+
"--gap": `${gap}px`,
|
|
279
|
+
"--scale-factor": scaleFactor,
|
|
280
|
+
"--placement": placement
|
|
281
|
+
},
|
|
282
|
+
...rest,
|
|
283
|
+
children: renderProps => /*#__PURE__*/jsx(ToastContext, {
|
|
284
|
+
value: {
|
|
285
|
+
slots,
|
|
286
|
+
placement,
|
|
287
|
+
scaleFactor
|
|
288
|
+
},
|
|
289
|
+
children: typeof children === "undefined" ? getDefaultChildren(renderProps) : typeof children === "function" ? children(renderProps) : children
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
ToastContainer.displayName = "HeroUI.ToastContainer";
|
|
294
|
+
|
|
295
|
+
export { Toast, ToastActionButton, ToastCloseButton, ToastContainer, ToastContent, ToastDescription, ToastIndicator, ToastTitle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToggleButton } from './toggle-button.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { ToggleButton as ToggleButtonPrimitive } from "react-aria-components";
|
|
3
|
+
import { type ToggleButtonVariants } from "@arobo/styles";
|
|
4
|
+
type ToggleButtonProps = ComponentPropsWithRef<typeof ToggleButtonPrimitive> & {
|
|
5
|
+
size?: ToggleButtonVariants["size"];
|
|
6
|
+
variant?: ToggleButtonVariants["variant"];
|
|
7
|
+
};
|
|
8
|
+
declare const ToggleButton: ({ children, className, size, variant, ...restProps }: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { ToggleButton };
|
|
10
|
+
export type { ToggleButtonProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { ToggleButton as ToggleButton$1 } from 'react-aria-components';
|
|
3
|
+
import { composeTwRenderProps } from '../../utils/compose.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { toggleButtonVariants } from '../../packages/styles/src/components/toggle-button/toggle-button.styles.js';
|
|
6
|
+
|
|
7
|
+
const ToggleButton = ({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
size = "md",
|
|
11
|
+
variant = "primary",
|
|
12
|
+
...restProps
|
|
13
|
+
}) => {
|
|
14
|
+
const slots = useMemo(() => toggleButtonVariants({
|
|
15
|
+
size,
|
|
16
|
+
variant
|
|
17
|
+
}), [size, variant]);
|
|
18
|
+
return /*#__PURE__*/jsx(ToggleButton$1, {
|
|
19
|
+
className: composeTwRenderProps(className, slots),
|
|
20
|
+
"data-slot": "toggle-button",
|
|
21
|
+
...restProps,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { ToggleButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToggleButton, ToggleButtonGroup } from './toggle-button-group.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ToggleButtonGroupProps as RAC_ToggleButtonGroupProps, type ToggleButtonProps } from "react-aria-components";
|
|
2
|
+
import { type ToggleButtonGroupVariants } from "@arobo/styles";
|
|
3
|
+
type ToggleButtonGroupRootProps = Omit<RAC_ToggleButtonGroupProps, "className"> & {
|
|
4
|
+
size?: ToggleButtonGroupVariants["size"];
|
|
5
|
+
variant?: ToggleButtonGroupVariants["variant"];
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const ToggleButtonGroupRoot: ({ children, className, size, variant, ...restProps }: ToggleButtonGroupRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
type ToggleButtonWithGroupProps = ToggleButtonProps & {
|
|
10
|
+
size?: ToggleButtonGroupVariants["size"];
|
|
11
|
+
variant?: ToggleButtonGroupVariants["variant"];
|
|
12
|
+
};
|
|
13
|
+
declare const ToggleButton: ({ children, className, size: propSize, variant: propVariant, ...restProps }: ToggleButtonWithGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { ToggleButtonGroupRoot as ToggleButtonGroup, ToggleButton };
|
|
15
|
+
export type { ToggleButtonProps, ToggleButtonGroupRootProps, ToggleButtonWithGroupProps };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useContext, createContext, useMemo } from 'react';
|
|
2
|
+
import { ToggleButtonGroup } from 'react-aria-components';
|
|
3
|
+
import { composeTwRenderProps } from '../../utils/compose.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { toggleButtonGroupVariants } from '../../packages/styles/src/components/toggle-button-group/toggle-button-group.styles.js';
|
|
6
|
+
import { ToggleButton as ToggleButton$1 } from '../toggle-button/toggle-button.js';
|
|
7
|
+
|
|
8
|
+
const ToggleButtonGroupContext = /*#__PURE__*/createContext({});
|
|
9
|
+
|
|
10
|
+
/* -------------------------------------------------------------------------------------------------
|
|
11
|
+
* ToggleButtonGroup Root
|
|
12
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
13
|
+
|
|
14
|
+
const ToggleButtonGroupRoot = ({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
size = "md",
|
|
18
|
+
variant = "primary",
|
|
19
|
+
...restProps
|
|
20
|
+
}) => {
|
|
21
|
+
const slots = useMemo(() => toggleButtonGroupVariants({
|
|
22
|
+
size,
|
|
23
|
+
variant
|
|
24
|
+
}), [size, variant]);
|
|
25
|
+
return /*#__PURE__*/jsx(ToggleButtonGroupContext.Provider, {
|
|
26
|
+
value: {
|
|
27
|
+
slots,
|
|
28
|
+
size,
|
|
29
|
+
variant
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/jsx(ToggleButtonGroup, {
|
|
32
|
+
className: composeTwRenderProps(className, slots),
|
|
33
|
+
"data-slot": "toggle-button-group",
|
|
34
|
+
...restProps,
|
|
35
|
+
children: children
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const ToggleButton = ({
|
|
40
|
+
children,
|
|
41
|
+
className,
|
|
42
|
+
size: propSize,
|
|
43
|
+
variant: propVariant,
|
|
44
|
+
...restProps
|
|
45
|
+
}) => {
|
|
46
|
+
const groupContext = useContext(ToggleButtonGroupContext);
|
|
47
|
+
const finalSize = propSize ?? groupContext.size ?? "md";
|
|
48
|
+
const finalVariant = propVariant ?? groupContext.variant ?? "primary";
|
|
49
|
+
const slots = useMemo(() => toggleButtonGroupVariants({
|
|
50
|
+
size: finalSize,
|
|
51
|
+
variant: finalVariant
|
|
52
|
+
}), [finalSize, finalVariant]);
|
|
53
|
+
return /*#__PURE__*/jsx(ToggleButton$1, {
|
|
54
|
+
className: composeTwRenderProps(className, slots),
|
|
55
|
+
"data-slot": "toggle-button",
|
|
56
|
+
...restProps,
|
|
57
|
+
children: children
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { ToggleButton, ToggleButtonGroupRoot as ToggleButtonGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { TooltipArrow, TooltipContent, TooltipRoot, TooltipTrigger } from "./tooltip";
|
|
3
|
+
export declare const Tooltip: (({ children, ...props }: import("react").ComponentPropsWithRef<typeof import("react-aria-components").TooltipTrigger>) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, ...props }: import("react").ComponentPropsWithRef<typeof import("react-aria-components").TooltipTrigger>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Trigger: ({ children, className, ...props }: import("./tooltip").TooltipTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Content: ({ children, className, offset: offsetProp, showArrow, ...props }: import("./tooltip").TooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Arrow: ({ children, className, ...props }: import("./tooltip").TooltipArrowProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export type Tooltip = {
|
|
10
|
+
Props: ComponentProps<typeof TooltipRoot>;
|
|
11
|
+
RootProps: ComponentProps<typeof TooltipRoot>;
|
|
12
|
+
TriggerProps: ComponentProps<typeof TooltipTrigger>;
|
|
13
|
+
ContentProps: ComponentProps<typeof TooltipContent>;
|
|
14
|
+
ArrowProps: ComponentProps<typeof TooltipArrow>;
|
|
15
|
+
};
|
|
16
|
+
export { TooltipRoot, TooltipTrigger, TooltipContent, TooltipArrow };
|
|
17
|
+
export type { TooltipRootProps, TooltipRootProps as TooltipProps, TooltipArrowProps, TooltipContentProps, TooltipTriggerProps, } from "./tooltip";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TooltipRoot, TooltipArrow, TooltipContent, TooltipTrigger } from './tooltip.js';
|
|
2
|
+
|
|
3
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4
|
+
* Compound Component
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
const Tooltip = Object.assign(TooltipRoot, {
|
|
7
|
+
Root: TooltipRoot,
|
|
8
|
+
Trigger: TooltipTrigger,
|
|
9
|
+
Content: TooltipContent,
|
|
10
|
+
Arrow: TooltipArrow
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { Tooltip, TooltipArrow, TooltipContent, TooltipRoot, TooltipTrigger };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { OverlayArrow, Tooltip as TooltipPrimitive, TooltipTrigger as TooltipTriggerPrimitive } from "react-aria-components";
|
|
4
|
+
import { type TooltipVariants } from "@arobo/styles";
|
|
5
|
+
type TooltipRootProps = ComponentPropsWithRef<typeof TooltipTriggerPrimitive>;
|
|
6
|
+
declare const TooltipRoot: ({ children, ...props }: ComponentPropsWithRef<typeof TooltipTriggerPrimitive>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface TooltipContentProps extends Omit<ComponentPropsWithRef<typeof TooltipPrimitive>, "children">, TooltipVariants {
|
|
8
|
+
showArrow?: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const TooltipContent: ({ children, className, offset: offsetProp, showArrow, ...props }: TooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
type TooltipArrowProps = Omit<ComponentPropsWithRef<typeof OverlayArrow>, "children"> & {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
declare const TooltipArrow: ({ children, className, ...props }: TooltipArrowProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
interface TooltipTriggerProps extends ComponentPropsWithRef<"div"> {
|
|
17
|
+
}
|
|
18
|
+
declare const TooltipTrigger: ({ children, className, ...props }: TooltipTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { TooltipRoot, TooltipTrigger, TooltipContent, TooltipArrow };
|
|
20
|
+
export type { TooltipRootProps, TooltipArrowProps, TooltipContentProps, TooltipTriggerProps };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
|
+
import { TooltipTrigger as TooltipTrigger$1, OverlayArrow, Tooltip, Focusable } from 'react-aria-components';
|
|
3
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { tooltipVariants } from '../../packages/styles/src/components/tooltip/tooltip.styles.js';
|
|
6
|
+
|
|
7
|
+
const TooltipContext = /*#__PURE__*/createContext({});
|
|
8
|
+
|
|
9
|
+
/* -------------------------------------------------------------------------------------------------
|
|
10
|
+
* Tooltip Root
|
|
11
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
12
|
+
|
|
13
|
+
const TooltipRoot = ({
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
const slots = React__default.useMemo(() => tooltipVariants(), []);
|
|
18
|
+
return /*#__PURE__*/jsx(TooltipContext, {
|
|
19
|
+
value: {
|
|
20
|
+
slots
|
|
21
|
+
},
|
|
22
|
+
children: /*#__PURE__*/jsx(TooltipTrigger$1, {
|
|
23
|
+
"data-slot": "tooltip-root",
|
|
24
|
+
...props,
|
|
25
|
+
children: children
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/* -------------------------------------------------------------------------------------------------
|
|
31
|
+
* Tooltip Content
|
|
32
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
33
|
+
|
|
34
|
+
const TooltipContent = ({
|
|
35
|
+
children,
|
|
36
|
+
className,
|
|
37
|
+
offset: offsetProp,
|
|
38
|
+
showArrow = false,
|
|
39
|
+
...props
|
|
40
|
+
}) => {
|
|
41
|
+
const {
|
|
42
|
+
slots
|
|
43
|
+
} = useContext(TooltipContext);
|
|
44
|
+
const offset = offsetProp ? offsetProp : showArrow ? 7 : 3;
|
|
45
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
46
|
+
...props,
|
|
47
|
+
className: composeTwRenderProps(className, slots?.base()),
|
|
48
|
+
offset: offset,
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/* -------------------------------------------------------------------------------------------------
|
|
54
|
+
* Tooltip Arrow
|
|
55
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
56
|
+
|
|
57
|
+
const TooltipArrow = ({
|
|
58
|
+
children,
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}) => {
|
|
62
|
+
const defaultArrow = /*#__PURE__*/jsx("svg", {
|
|
63
|
+
"data-slot": "overlay-arrow",
|
|
64
|
+
height: 12,
|
|
65
|
+
viewBox: "0 0 12 12",
|
|
66
|
+
width: 12,
|
|
67
|
+
children: /*#__PURE__*/jsx("path", {
|
|
68
|
+
d: "M0 0 Q6 9 12 0"
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
const arrow = /*#__PURE__*/React__default.isValidElement(children) ? /*#__PURE__*/React__default.cloneElement(children, {
|
|
72
|
+
"data-slot": "overlay-arrow"
|
|
73
|
+
}) : defaultArrow;
|
|
74
|
+
return /*#__PURE__*/jsx(OverlayArrow, {
|
|
75
|
+
"data-slot": "tooltip-arrow",
|
|
76
|
+
...props,
|
|
77
|
+
className: className,
|
|
78
|
+
children: arrow
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/* -------------------------------------------------------------------------------------------------
|
|
83
|
+
* Tooltip Trigger
|
|
84
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
85
|
+
|
|
86
|
+
const TooltipTrigger = ({
|
|
87
|
+
children,
|
|
88
|
+
className,
|
|
89
|
+
...props
|
|
90
|
+
}) => {
|
|
91
|
+
const {
|
|
92
|
+
slots
|
|
93
|
+
} = useContext(TooltipContext);
|
|
94
|
+
return /*#__PURE__*/jsx(Focusable, {
|
|
95
|
+
children: /*#__PURE__*/jsx("div", {
|
|
96
|
+
className: composeSlotClassName(slots?.trigger, className),
|
|
97
|
+
"data-slot": "tooltip-trigger",
|
|
98
|
+
role: "button",
|
|
99
|
+
...props,
|
|
100
|
+
children: children
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export { TooltipArrow, TooltipContent, TooltipRoot, TooltipTrigger };
|