@nebula-demo/ui 0.1.3
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/CHANGELOG.md +23 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/components/Accordion/Accordion.cjs +1 -0
- package/dist/components/Accordion/Accordion.d.ts +8 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.js +59 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.cjs +1 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +26 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.js +160 -0
- package/dist/components/AlertDialog/index.d.ts +3 -0
- package/dist/components/AlertDialog/index.d.ts.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.cjs +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +17 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.js +45 -0
- package/dist/components/AspectRatio/index.d.ts +3 -0
- package/dist/components/AspectRatio/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.cjs +1 -0
- package/dist/components/Avatar/Avatar.d.ts +18 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.js +48 -0
- package/dist/components/Avatar/Avatar.variants.cjs +1 -0
- package/dist/components/Avatar/Avatar.variants.d.ts +7 -0
- package/dist/components/Avatar/Avatar.variants.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.variants.js +37 -0
- package/dist/components/Avatar/index.d.ts +5 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.cjs +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +19 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +106 -0
- package/dist/components/AvatarGroup/index.d.ts +3 -0
- package/dist/components/AvatarGroup/index.d.ts.map +1 -0
- package/dist/components/AvatarLabelGroup/AvatarLabelGroup.cjs +1 -0
- package/dist/components/AvatarLabelGroup/AvatarLabelGroup.d.ts +19 -0
- package/dist/components/AvatarLabelGroup/AvatarLabelGroup.d.ts.map +1 -0
- package/dist/components/AvatarLabelGroup/AvatarLabelGroup.js +43 -0
- package/dist/components/AvatarLabelGroup/index.d.ts +3 -0
- package/dist/components/AvatarLabelGroup/index.d.ts.map +1 -0
- package/dist/components/Badge/Badge.cjs +1 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Badge/Badge.js +70 -0
- package/dist/components/Badge/Badge.variants.cjs +1 -0
- package/dist/components/Badge/Badge.variants.d.ts +8 -0
- package/dist/components/Badge/Badge.variants.d.ts.map +1 -0
- package/dist/components/Badge/Badge.variants.js +46 -0
- package/dist/components/Badge/index.d.ts +5 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/BadgeCounter/BadgeCounter.cjs +1 -0
- package/dist/components/BadgeCounter/BadgeCounter.d.ts +13 -0
- package/dist/components/BadgeCounter/BadgeCounter.d.ts.map +1 -0
- package/dist/components/BadgeCounter/BadgeCounter.js +43 -0
- package/dist/components/BadgeCounter/BadgeCounter.variants.cjs +1 -0
- package/dist/components/BadgeCounter/BadgeCounter.variants.d.ts +6 -0
- package/dist/components/BadgeCounter/BadgeCounter.variants.d.ts.map +1 -0
- package/dist/components/BadgeCounter/BadgeCounter.variants.js +19 -0
- package/dist/components/BadgeCounter/index.d.ts +5 -0
- package/dist/components/BadgeCounter/index.d.ts.map +1 -0
- package/dist/components/Button/Button.cjs +1 -0
- package/dist/components/Button/Button.d.ts +13 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +23 -0
- package/dist/components/Button/Button.variants.cjs +1 -0
- package/dist/components/Button/Button.variants.d.ts +7 -0
- package/dist/components/Button/Button.variants.d.ts.map +1 -0
- package/dist/components/Button/Button.variants.js +40 -0
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.cjs +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.d.ts +13 -0
- package/dist/components/ButtonIcon/ButtonIcon.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.js +37 -0
- package/dist/components/ButtonIcon/ButtonIcon.variants.cjs +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.variants.d.ts +7 -0
- package/dist/components/ButtonIcon/ButtonIcon.variants.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.variants.js +37 -0
- package/dist/components/ButtonIcon/index.d.ts +5 -0
- package/dist/components/ButtonIcon/index.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.cjs +1 -0
- package/dist/components/Calendar/Calendar.d.ts +28 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.js +365 -0
- package/dist/components/Calendar/index.d.ts +3 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Card/Card.cjs +1 -0
- package/dist/components/Card/Card.d.ts +41 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +103 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.cjs +1 -0
- package/dist/components/Carousel/Carousel.d.ts +35 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.js +217 -0
- package/dist/components/Carousel/index.d.ts +3 -0
- package/dist/components/Carousel/index.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +17 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +68 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +33 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.js +182 -0
- package/dist/components/ContextMenu/index.d.ts +3 -0
- package/dist/components/ContextMenu/index.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +49 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.js +238 -0
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.cjs +1 -0
- package/dist/components/Drawer/Drawer.d.ts +29 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.js +130 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.cjs +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +33 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +184 -0
- package/dist/components/DropdownMenu/index.d.ts +3 -0
- package/dist/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/components/DropdownSelect/DropdownSelect.cjs +1 -0
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +45 -0
- package/dist/components/DropdownSelect/DropdownSelect.d.ts.map +1 -0
- package/dist/components/DropdownSelect/DropdownSelect.js +342 -0
- package/dist/components/DropdownSelect/index.d.ts +3 -0
- package/dist/components/DropdownSelect/index.d.ts.map +1 -0
- package/dist/components/FileStatus/FileStatus.cjs +1 -0
- package/dist/components/FileStatus/FileStatus.d.ts +25 -0
- package/dist/components/FileStatus/FileStatus.d.ts.map +1 -0
- package/dist/components/FileStatus/FileStatus.js +127 -0
- package/dist/components/FileStatus/index.d.ts +3 -0
- package/dist/components/FileStatus/index.d.ts.map +1 -0
- package/dist/components/FileUpload/FileUpload.cjs +1 -0
- package/dist/components/FileUpload/FileUpload.d.ts +38 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -0
- package/dist/components/FileUpload/FileUpload.js +151 -0
- package/dist/components/FileUpload/index.d.ts +3 -0
- package/dist/components/FileUpload/index.d.ts.map +1 -0
- package/dist/components/FilterChip/FilterChip.cjs +1 -0
- package/dist/components/FilterChip/FilterChip.d.ts +43 -0
- package/dist/components/FilterChip/FilterChip.d.ts.map +1 -0
- package/dist/components/FilterChip/FilterChip.js +71 -0
- package/dist/components/FilterChip/FilterChip.variants.cjs +1 -0
- package/dist/components/FilterChip/FilterChip.variants.d.ts +22 -0
- package/dist/components/FilterChip/FilterChip.variants.d.ts.map +1 -0
- package/dist/components/FilterChip/FilterChip.variants.js +103 -0
- package/dist/components/FilterChip/index.d.ts +3 -0
- package/dist/components/FilterChip/index.d.ts.map +1 -0
- package/dist/components/FilterChipGroup/FilterChipGroup.cjs +1 -0
- package/dist/components/FilterChipGroup/FilterChipGroup.d.ts +54 -0
- package/dist/components/FilterChipGroup/FilterChipGroup.d.ts.map +1 -0
- package/dist/components/FilterChipGroup/FilterChipGroup.js +112 -0
- package/dist/components/FilterChipGroup/index.d.ts +3 -0
- package/dist/components/FilterChipGroup/index.d.ts.map +1 -0
- package/dist/components/Icon/Icon.cjs +1 -0
- package/dist/components/Icon/Icon.d.ts +16 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +34 -0
- package/dist/components/Icon/icons.cjs +1 -0
- package/dist/components/Icon/icons.d.ts +5 -0
- package/dist/components/Icon/icons.d.ts.map +1 -0
- package/dist/components/Icon/icons.js +1396 -0
- package/dist/components/Icon/index.d.ts +5 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/InlineNotification/InlineNotification.cjs +1 -0
- package/dist/components/InlineNotification/InlineNotification.d.ts +17 -0
- package/dist/components/InlineNotification/InlineNotification.d.ts.map +1 -0
- package/dist/components/InlineNotification/InlineNotification.js +80 -0
- package/dist/components/InlineNotification/InlineNotification.variants.cjs +1 -0
- package/dist/components/InlineNotification/InlineNotification.variants.d.ts +6 -0
- package/dist/components/InlineNotification/InlineNotification.variants.d.ts.map +1 -0
- package/dist/components/InlineNotification/InlineNotification.variants.js +22 -0
- package/dist/components/InlineNotification/index.d.ts +5 -0
- package/dist/components/InlineNotification/index.d.ts.map +1 -0
- package/dist/components/Input/Input.cjs +1 -0
- package/dist/components/Input/Input.d.ts +44 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/Input.js +104 -0
- package/dist/components/Input/Input.variants.cjs +1 -0
- package/dist/components/Input/Input.variants.d.ts +70 -0
- package/dist/components/Input/Input.variants.d.ts.map +1 -0
- package/dist/components/Input/Input.variants.js +91 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/InputSearch/InputSearch.cjs +1 -0
- package/dist/components/InputSearch/InputSearch.d.ts +62 -0
- package/dist/components/InputSearch/InputSearch.d.ts.map +1 -0
- package/dist/components/InputSearch/InputSearch.js +289 -0
- package/dist/components/InputSearch/index.d.ts +3 -0
- package/dist/components/InputSearch/index.d.ts.map +1 -0
- package/dist/components/Line/Line.cjs +1 -0
- package/dist/components/Line/Line.d.ts +16 -0
- package/dist/components/Line/Line.d.ts.map +1 -0
- package/dist/components/Line/Line.js +29 -0
- package/dist/components/Line/index.d.ts +3 -0
- package/dist/components/Line/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.cjs +1 -0
- package/dist/components/Pagination/Pagination.d.ts +49 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.js +225 -0
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Popover/Popover.cjs +1 -0
- package/dist/components/Popover/Popover.d.ts +11 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Popover/Popover.js +26 -0
- package/dist/components/Popover/index.d.ts +3 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +23 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.js +74 -0
- package/dist/components/ProgressBar/index.d.ts +3 -0
- package/dist/components/ProgressBar/index.d.ts.map +1 -0
- package/dist/components/ProgressCircle/ProgressCircle.cjs +1 -0
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +23 -0
- package/dist/components/ProgressCircle/ProgressCircle.d.ts.map +1 -0
- package/dist/components/ProgressCircle/ProgressCircle.js +155 -0
- package/dist/components/ProgressCircle/index.d.ts +3 -0
- package/dist/components/ProgressCircle/index.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +22 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.js +75 -0
- package/dist/components/RadioGroup/index.d.ts +3 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.cjs +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +8 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.js +10 -0
- package/dist/components/ScrollArea/index.d.ts +3 -0
- package/dist/components/ScrollArea/index.d.ts.map +1 -0
- package/dist/components/Select/Select.cjs +1 -0
- package/dist/components/Select/Select.d.ts +12 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/Select.js +171 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +8 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +22 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.cjs +1 -0
- package/dist/components/Slider/Slider.d.ts +19 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/Slider.js +101 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Switch/Switch.cjs +1 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js +20 -0
- package/dist/components/Switch/Switch.variants.cjs +1 -0
- package/dist/components/Switch/Switch.variants.d.ts +7 -0
- package/dist/components/Switch/Switch.variants.d.ts.map +1 -0
- package/dist/components/Switch/Switch.variants.js +39 -0
- package/dist/components/Switch/index.d.ts +4 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/SwitchGroup/SwitchGroup.cjs +1 -0
- package/dist/components/SwitchGroup/SwitchGroup.d.ts +24 -0
- package/dist/components/SwitchGroup/SwitchGroup.d.ts.map +1 -0
- package/dist/components/SwitchGroup/SwitchGroup.js +36 -0
- package/dist/components/SwitchGroup/SwitchGroup.variants.cjs +1 -0
- package/dist/components/SwitchGroup/SwitchGroup.variants.d.ts +4 -0
- package/dist/components/SwitchGroup/SwitchGroup.variants.d.ts.map +1 -0
- package/dist/components/SwitchGroup/SwitchGroup.variants.js +5 -0
- package/dist/components/SwitchGroup/index.d.ts +3 -0
- package/dist/components/SwitchGroup/index.d.ts.map +1 -0
- package/dist/components/TabNavigation/TabNavigation.cjs +1 -0
- package/dist/components/TabNavigation/TabNavigation.d.ts +31 -0
- package/dist/components/TabNavigation/TabNavigation.d.ts.map +1 -0
- package/dist/components/TabNavigation/TabNavigation.js +107 -0
- package/dist/components/TabNavigation/index.d.ts +4 -0
- package/dist/components/TabNavigation/index.d.ts.map +1 -0
- package/dist/components/Table/Table.cjs +1 -0
- package/dist/components/Table/Table.d.ts +103 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.js +278 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/TablePagination/TablePagination.cjs +1 -0
- package/dist/components/TablePagination/TablePagination.d.ts +26 -0
- package/dist/components/TablePagination/TablePagination.d.ts.map +1 -0
- package/dist/components/TablePagination/TablePagination.js +80 -0
- package/dist/components/TablePagination/index.d.ts +3 -0
- package/dist/components/TablePagination/index.d.ts.map +1 -0
- package/dist/components/Tag/Tag.cjs +1 -0
- package/dist/components/Tag/Tag.d.ts +25 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -0
- package/dist/components/Tag/Tag.js +84 -0
- package/dist/components/Tag/Tag.variants.cjs +1 -0
- package/dist/components/Tag/Tag.variants.d.ts +8 -0
- package/dist/components/Tag/Tag.variants.d.ts.map +1 -0
- package/dist/components/Tag/Tag.variants.js +41 -0
- package/dist/components/Tag/TagGroup.cjs +1 -0
- package/dist/components/Tag/TagGroup.d.ts +8 -0
- package/dist/components/Tag/TagGroup.d.ts.map +1 -0
- package/dist/components/Tag/TagGroup.js +20 -0
- package/dist/components/Tag/TagGroup.variants.cjs +1 -0
- package/dist/components/Tag/TagGroup.variants.d.ts +6 -0
- package/dist/components/Tag/TagGroup.variants.d.ts.map +1 -0
- package/dist/components/Tag/TagGroup.variants.js +16 -0
- package/dist/components/Tag/index.d.ts +9 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.cjs +1 -0
- package/dist/components/Textarea/Textarea.d.ts +54 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.js +162 -0
- package/dist/components/Textarea/Textarea.variants.cjs +1 -0
- package/dist/components/Textarea/Textarea.variants.d.ts +60 -0
- package/dist/components/Textarea/Textarea.variants.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.variants.js +116 -0
- package/dist/components/Textarea/index.d.ts +3 -0
- package/dist/components/Textarea/index.d.ts.map +1 -0
- package/dist/components/Toast/Toast.cjs +1 -0
- package/dist/components/Toast/Toast.d.ts +71 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/Toast.js +242 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.cjs +1 -0
- package/dist/components/Toggle/Toggle.d.ts +18 -0
- package/dist/components/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.js +60 -0
- package/dist/components/Toggle/Toggle.variants.cjs +1 -0
- package/dist/components/Toggle/Toggle.variants.d.ts +13 -0
- package/dist/components/Toggle/Toggle.variants.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.variants.js +76 -0
- package/dist/components/Toggle/index.d.ts +4 -0
- package/dist/components/Toggle/index.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +41 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/_shared/SelectionIndicators.cjs +1 -0
- package/dist/components/_shared/SelectionIndicators.d.ts +33 -0
- package/dist/components/_shared/SelectionIndicators.d.ts.map +1 -0
- package/dist/components/_shared/SelectionIndicators.js +49 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +202 -0
- package/dist/utils/cn.cjs +1 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/focusRing.cjs +1 -0
- package/dist/utils/focusRing.d.ts +20 -0
- package/dist/utils/focusRing.d.ts.map +1 -0
- package/dist/utils/focusRing.js +5 -0
- package/package.json +82 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-dialog";
|
|
4
|
+
import { cn as i } from "../../utils/cn.js";
|
|
5
|
+
const l = c.createContext({
|
|
6
|
+
direction: "bottom",
|
|
7
|
+
shouldScaleBackground: !0
|
|
8
|
+
}), w = () => c.useContext(l), p = ({
|
|
9
|
+
shouldScaleBackground: a = !0,
|
|
10
|
+
direction: t = "bottom",
|
|
11
|
+
container: e,
|
|
12
|
+
children: d,
|
|
13
|
+
...s
|
|
14
|
+
}) => /* @__PURE__ */ r(l.Provider, { value: { direction: t, container: e, shouldScaleBackground: a }, children: /* @__PURE__ */ r(o.Root, { ...s, children: d }) });
|
|
15
|
+
p.displayName = "Drawer";
|
|
16
|
+
const C = o.Trigger, u = o.Portal, R = o.Close, m = c.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
17
|
+
o.Overlay,
|
|
18
|
+
{
|
|
19
|
+
ref: e,
|
|
20
|
+
className: i(
|
|
21
|
+
"cai-fixed cai-inset-0 cai-z-50 cai-bg-scrim",
|
|
22
|
+
"data-[state=open]:cai-animate-in data-[state=open]:cai-fade-in-0",
|
|
23
|
+
"data-[state=closed]:cai-animate-out data-[state=closed]:cai-fade-out-0",
|
|
24
|
+
a
|
|
25
|
+
),
|
|
26
|
+
...t
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
m.displayName = "DrawerOverlay";
|
|
30
|
+
const x = {
|
|
31
|
+
bottom: i(
|
|
32
|
+
"cai-inset-x-0 cai-bottom-0 cai-rounded-t-lg cai-border-t",
|
|
33
|
+
"data-[state=open]:cai-animate-in data-[state=open]:cai-slide-in-from-bottom",
|
|
34
|
+
"data-[state=closed]:cai-animate-out data-[state=closed]:cai-slide-out-to-bottom"
|
|
35
|
+
),
|
|
36
|
+
right: i(
|
|
37
|
+
"cai-inset-y-0 cai-right-0 cai-h-full cai-w-3/4 cai-max-w-sm cai-rounded-l-lg cai-border-l",
|
|
38
|
+
"data-[state=open]:cai-animate-in data-[state=open]:cai-slide-in-from-right",
|
|
39
|
+
"data-[state=closed]:cai-animate-out data-[state=closed]:cai-slide-out-to-right"
|
|
40
|
+
),
|
|
41
|
+
left: i(
|
|
42
|
+
"cai-inset-y-0 cai-left-0 cai-h-full cai-w-3/4 cai-max-w-sm cai-rounded-r-lg cai-border-r",
|
|
43
|
+
"data-[state=open]:cai-animate-in data-[state=open]:cai-slide-in-from-left",
|
|
44
|
+
"data-[state=closed]:cai-animate-out data-[state=closed]:cai-slide-out-to-left"
|
|
45
|
+
)
|
|
46
|
+
}, D = c.forwardRef(({ className: a, children: t, ...e }, d) => {
|
|
47
|
+
const { direction: s, container: f } = w();
|
|
48
|
+
return /* @__PURE__ */ n(u, { container: f, children: [
|
|
49
|
+
/* @__PURE__ */ r(m, {}),
|
|
50
|
+
/* @__PURE__ */ n(
|
|
51
|
+
o.Content,
|
|
52
|
+
{
|
|
53
|
+
ref: d,
|
|
54
|
+
className: i(
|
|
55
|
+
"cai-fixed cai-z-50 cai-flex cai-flex-col cai-gap-y-3xl",
|
|
56
|
+
"cai-border-tertiary cai-bg-primary-invert cai-p-3xl cai-shadow-shallow",
|
|
57
|
+
"cai-font-normal cai-text-secondary",
|
|
58
|
+
x[s],
|
|
59
|
+
a
|
|
60
|
+
),
|
|
61
|
+
...e,
|
|
62
|
+
children: [
|
|
63
|
+
s === "bottom" && /* @__PURE__ */ r(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
className: "-cai-mt-3 cai-mb-1 cai-h-2 cai-w-20 cai-self-center cai-rounded-full cai-bg-tertiary"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
t
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
75
|
+
});
|
|
76
|
+
D.displayName = "DrawerContent";
|
|
77
|
+
const g = c.forwardRef(
|
|
78
|
+
({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref: e,
|
|
82
|
+
className: i("cai-flex cai-flex-col cai-gap-y-lg cai-text-left", a),
|
|
83
|
+
...t
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
g.displayName = "DrawerHeader";
|
|
88
|
+
const y = c.forwardRef(
|
|
89
|
+
({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
ref: e,
|
|
93
|
+
className: i("cai-mt-auto cai-flex cai-flex-col cai-items-center cai-gap-y-md", a),
|
|
94
|
+
...t
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
);
|
|
98
|
+
y.displayName = "DrawerFooter";
|
|
99
|
+
const b = c.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
100
|
+
o.Title,
|
|
101
|
+
{
|
|
102
|
+
ref: e,
|
|
103
|
+
className: i(
|
|
104
|
+
"cai-text-h4 cai-font-semibold cai-tracking-tight cai-text-primary",
|
|
105
|
+
a
|
|
106
|
+
),
|
|
107
|
+
...t
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
b.displayName = "DrawerTitle";
|
|
111
|
+
const h = c.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
112
|
+
o.Description,
|
|
113
|
+
{
|
|
114
|
+
ref: e,
|
|
115
|
+
className: i("cai-text-body2 cai-font-medium cai-text-primary", a),
|
|
116
|
+
...t
|
|
117
|
+
}
|
|
118
|
+
));
|
|
119
|
+
h.displayName = "DrawerDescription";
|
|
120
|
+
export {
|
|
121
|
+
p as Drawer,
|
|
122
|
+
R as DrawerClose,
|
|
123
|
+
D as DrawerContent,
|
|
124
|
+
h as DrawerDescription,
|
|
125
|
+
y as DrawerFooter,
|
|
126
|
+
g as DrawerHeader,
|
|
127
|
+
m as DrawerOverlay,
|
|
128
|
+
b as DrawerTitle,
|
|
129
|
+
C as DrawerTrigger
|
|
130
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,WAAW,GACZ,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),j=require("@radix-ui/react-dropdown-menu"),r=require("../../utils/cn.cjs"),s=require("../Icon/Icon.cjs");function l(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const i in a)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>a[i]})}}return e.default=a,Object.freeze(e)}const c=l(h),t=l(j),N=t.Root,R=t.Trigger,S=t.Sub,u=c.forwardRef(({className:a,...e},i)=>o.jsx(t.Group,{ref:i,className:r.cn("cai-py-lg first:cai-pt-0 last:cai-pb-0",a),...e}));u.displayName="DropdownMenuGroup";const p=c.forwardRef(({className:a,...e},i)=>o.jsx(t.RadioGroup,{ref:i,className:r.cn("cai-py-lg first:cai-pt-0 last:cai-pb-0",a),...e}));p.displayName="DropdownMenuRadioGroup";const m=c.forwardRef(({className:a,inset:e,children:i,...n},d)=>o.jsxs(t.SubTrigger,{ref:d,className:r.cn("cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-p-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none","cai-transition-colors","focus:cai-bg-tertiary","data-[state=open]:cai-bg-secondary",e&&"cai-pl-4xl",a),...n,children:[i,o.jsx("span",{className:"cai-ml-auto cai-text-icon-primary",children:o.jsx(s.Icon,{name:"chevron-right",size:14,"aria-hidden":"true"})})]}));m.displayName="DropdownMenuSubTrigger";const b=c.forwardRef(({className:a,...e},i)=>o.jsx(t.SubContent,{ref:i,className:r.cn("cai-z-50 cai-min-w-[14rem] cai-overflow-hidden cai-rounded-md cai-border cai-border-tertiary cai-bg-primary-invert cai-p-lg cai-shadow-shallow","data-[state=open]:cai-animate-in data-[state=open]:cai-fade-in-0 data-[state=open]:cai-zoom-in-95","data-[state=closed]:cai-animate-out data-[state=closed]:cai-fade-out-0 data-[state=closed]:cai-zoom-out-95","data-[side=bottom]:cai-slide-in-from-top-2 data-[side=left]:cai-slide-in-from-right-2 data-[side=right]:cai-slide-in-from-left-2 data-[side=top]:cai-slide-in-from-bottom-2",a),...e}));b.displayName="DropdownMenuSubContent";const f=c.forwardRef(({className:a,sideOffset:e=4,container:i,...n},d)=>o.jsx(t.Portal,{container:i,children:o.jsx(t.Content,{ref:d,sideOffset:e,className:r.cn("cai-z-50 cai-min-w-[14rem] cai-overflow-hidden cai-rounded-md cai-border cai-border-tertiary cai-bg-primary-invert cai-p-lg cai-shadow-shallow","data-[state=open]:cai-animate-in data-[state=open]:cai-fade-in-0 data-[state=open]:cai-zoom-in-95","data-[state=closed]:cai-animate-out data-[state=closed]:cai-fade-out-0 data-[state=closed]:cai-zoom-out-95","data-[side=bottom]:cai-slide-in-from-top-2 data-[side=left]:cai-slide-in-from-right-2 data-[side=right]:cai-slide-in-from-left-2 data-[side=top]:cai-slide-in-from-bottom-2",a),...n})}));f.displayName="DropdownMenuContent";const w=c.forwardRef(({className:a,inset:e,...i},n)=>o.jsx(t.Item,{ref:n,className:r.cn("cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-p-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none","cai-transition-colors","focus:cai-bg-tertiary","data-[disabled]:cai-pointer-events-none data-[disabled]:cai-opacity-40",e&&"cai-pl-4xl",a),...i}));w.displayName="DropdownMenuItem";const x=c.forwardRef(({className:a,children:e,checked:i,...n},d)=>o.jsxs(t.CheckboxItem,{ref:d,checked:i,className:r.cn("cai-relative cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-py-lg cai-pl-4xl cai-pr-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none","cai-transition-colors","focus:cai-bg-tertiary","data-[disabled]:cai-pointer-events-none data-[disabled]:cai-opacity-40",a),...n,children:[o.jsx("span",{className:"cai-absolute cai-left-md cai-flex cai-h-xl cai-w-xl cai-items-center cai-justify-center cai-text-icon-primary",children:o.jsx(t.ItemIndicator,{children:o.jsx(s.Icon,{name:"check",size:12,strokeWidth:3,"aria-hidden":"true"})})}),e]}));x.displayName="DropdownMenuCheckboxItem";const y=c.forwardRef(({className:a,children:e,...i},n)=>o.jsxs(t.RadioItem,{ref:n,className:r.cn("cai-relative cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-py-lg cai-pl-4xl cai-pr-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none","cai-transition-colors","focus:cai-bg-tertiary","data-[disabled]:cai-pointer-events-none data-[disabled]:cai-opacity-40",a),...i,children:[o.jsx("span",{className:"cai-absolute cai-left-md cai-flex cai-h-xl cai-w-xl cai-items-center cai-justify-center",children:o.jsx(t.ItemIndicator,{children:o.jsx("span",{"aria-hidden":"true",className:"cai-block cai-h-[0.625rem] cai-w-[0.625rem] cai-rounded-full cai-bg-quaternary"})})}),e]}));y.displayName="DropdownMenuRadioItem";const g=c.forwardRef(({className:a,inset:e,...i},n)=>o.jsx(t.Label,{ref:n,className:r.cn("cai-text-eyebrow2 cai-font-semibold cai-uppercase cai-text-primary",e&&"cai-pl-4xl",a),...i}));g.displayName="DropdownMenuLabel";const D=c.forwardRef(({className:a,...e},i)=>o.jsx(t.Separator,{ref:i,className:r.cn("-cai-mx-lg cai-h-px cai-bg-[var(--border-quaternary)]",a),...e}));D.displayName="DropdownMenuSeparator";const M=({className:a,...e})=>o.jsx("span",{className:r.cn("cai-ml-auto cai-text-body2 cai-font-normal cai-tracking-widest cai-text-primary",a),...e});M.displayName="DropdownMenuShortcut";exports.DropdownMenu=N;exports.DropdownMenuCheckboxItem=x;exports.DropdownMenuContent=f;exports.DropdownMenuGroup=u;exports.DropdownMenuItem=w;exports.DropdownMenuLabel=g;exports.DropdownMenuRadioGroup=p;exports.DropdownMenuRadioItem=y;exports.DropdownMenuSeparator=D;exports.DropdownMenuShortcut=M;exports.DropdownMenuSub=S;exports.DropdownMenuSubContent=b;exports.DropdownMenuSubTrigger=m;exports.DropdownMenuTrigger=R;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
6
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export interface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export interface DropdownMenuContentProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {
|
|
14
|
+
container?: HTMLElement;
|
|
15
|
+
}
|
|
16
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export interface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
declare const DropdownMenuShortcut: {
|
|
29
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
33
|
+
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAQtE,QAAA,MAAM,YAAY,mDAA6B,CAAA;AAC/C,QAAA,MAAM,mBAAmB,0HAAgC,CAAA;AACzD,QAAA,MAAM,eAAe,sDAA4B,CAAA;AAMjD,QAAA,MAAM,iBAAiB,wKASrB,CAAA;AAKF,QAAA,MAAM,sBAAsB,6KAS1B,CAAA;AAOF,MAAM,WAAW,2BAA4B,SAAQ,KAAK,CAAC,wBAAwB,CACjF,OAAO,qBAAqB,CAAC,UAAU,CACxC;IACC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,sBAAsB,oGAqB1B,CAAA;AAQF,QAAA,MAAM,sBAAsB,6KAe1B,CAAA;AAQF,MAAM,WAAW,wBAAyB,SAAQ,KAAK,CAAC,wBAAwB,CAC9E,OAAO,qBAAqB,CAAC,OAAO,CACrC;IACC,SAAS,CAAC,EAAE,WAAW,CAAA;CACxB;AAED,QAAA,MAAM,mBAAmB,iGAkBvB,CAAA;AAQF,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAC3E,OAAO,qBAAqB,CAAC,IAAI,CAClC;IACC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,gBAAgB,8FAgBpB,CAAA;AAQF,QAAA,MAAM,wBAAwB,+KAuB5B,CAAA;AAQF,QAAA,MAAM,qBAAqB,4KAyBzB,CAAA;AAQF,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,wBAAwB,CAC5E,OAAO,qBAAqB,CAAC,KAAK,CACnC;IACC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,iBAAiB,+FAarB,CAAA;AAQF,QAAA,MAAM,qBAAqB,4KASzB,CAAA;AAQF,QAAA,MAAM,oBAAoB;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAQ3F,CAAA;AAID,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { cn as r } from "../../utils/cn.js";
|
|
5
|
+
import { Icon as l } from "../Icon/Icon.js";
|
|
6
|
+
const I = o.Root, S = o.Trigger, v = o.Sub, m = n.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ t(
|
|
7
|
+
o.Group,
|
|
8
|
+
{
|
|
9
|
+
ref: i,
|
|
10
|
+
className: r("cai-py-lg first:cai-pt-0 last:cai-pb-0", a),
|
|
11
|
+
...e
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
m.displayName = "DropdownMenuGroup";
|
|
15
|
+
const p = n.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ t(
|
|
16
|
+
o.RadioGroup,
|
|
17
|
+
{
|
|
18
|
+
ref: i,
|
|
19
|
+
className: r("cai-py-lg first:cai-pt-0 last:cai-pb-0", a),
|
|
20
|
+
...e
|
|
21
|
+
}
|
|
22
|
+
));
|
|
23
|
+
p.displayName = "DropdownMenuRadioGroup";
|
|
24
|
+
const u = n.forwardRef(({ className: a, inset: e, children: i, ...c }, d) => /* @__PURE__ */ s(
|
|
25
|
+
o.SubTrigger,
|
|
26
|
+
{
|
|
27
|
+
ref: d,
|
|
28
|
+
className: r(
|
|
29
|
+
"cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-p-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none",
|
|
30
|
+
"cai-transition-colors",
|
|
31
|
+
"focus:cai-bg-tertiary",
|
|
32
|
+
"data-[state=open]:cai-bg-secondary",
|
|
33
|
+
e && "cai-pl-4xl",
|
|
34
|
+
a
|
|
35
|
+
),
|
|
36
|
+
...c,
|
|
37
|
+
children: [
|
|
38
|
+
i,
|
|
39
|
+
/* @__PURE__ */ t("span", { className: "cai-ml-auto cai-text-icon-primary", children: /* @__PURE__ */ t(l, { name: "chevron-right", size: 14, "aria-hidden": "true" }) })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
));
|
|
43
|
+
u.displayName = "DropdownMenuSubTrigger";
|
|
44
|
+
const f = n.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ t(
|
|
45
|
+
o.SubContent,
|
|
46
|
+
{
|
|
47
|
+
ref: i,
|
|
48
|
+
className: r(
|
|
49
|
+
"cai-z-50 cai-min-w-[14rem] cai-overflow-hidden cai-rounded-md cai-border cai-border-tertiary cai-bg-primary-invert cai-p-lg cai-shadow-shallow",
|
|
50
|
+
"data-[state=open]:cai-animate-in data-[state=open]:cai-fade-in-0 data-[state=open]:cai-zoom-in-95",
|
|
51
|
+
"data-[state=closed]:cai-animate-out data-[state=closed]:cai-fade-out-0 data-[state=closed]:cai-zoom-out-95",
|
|
52
|
+
"data-[side=bottom]:cai-slide-in-from-top-2 data-[side=left]:cai-slide-in-from-right-2 data-[side=right]:cai-slide-in-from-left-2 data-[side=top]:cai-slide-in-from-bottom-2",
|
|
53
|
+
a
|
|
54
|
+
),
|
|
55
|
+
...e
|
|
56
|
+
}
|
|
57
|
+
));
|
|
58
|
+
f.displayName = "DropdownMenuSubContent";
|
|
59
|
+
const b = n.forwardRef(({ className: a, sideOffset: e = 4, container: i, ...c }, d) => /* @__PURE__ */ t(o.Portal, { container: i, children: /* @__PURE__ */ t(
|
|
60
|
+
o.Content,
|
|
61
|
+
{
|
|
62
|
+
ref: d,
|
|
63
|
+
sideOffset: e,
|
|
64
|
+
className: r(
|
|
65
|
+
"cai-z-50 cai-min-w-[14rem] cai-overflow-hidden cai-rounded-md cai-border cai-border-tertiary cai-bg-primary-invert cai-p-lg cai-shadow-shallow",
|
|
66
|
+
"data-[state=open]:cai-animate-in data-[state=open]:cai-fade-in-0 data-[state=open]:cai-zoom-in-95",
|
|
67
|
+
"data-[state=closed]:cai-animate-out data-[state=closed]:cai-fade-out-0 data-[state=closed]:cai-zoom-out-95",
|
|
68
|
+
"data-[side=bottom]:cai-slide-in-from-top-2 data-[side=left]:cai-slide-in-from-right-2 data-[side=right]:cai-slide-in-from-left-2 data-[side=top]:cai-slide-in-from-bottom-2",
|
|
69
|
+
a
|
|
70
|
+
),
|
|
71
|
+
...c
|
|
72
|
+
}
|
|
73
|
+
) }));
|
|
74
|
+
b.displayName = "DropdownMenuContent";
|
|
75
|
+
const w = n.forwardRef(({ className: a, inset: e, ...i }, c) => /* @__PURE__ */ t(
|
|
76
|
+
o.Item,
|
|
77
|
+
{
|
|
78
|
+
ref: c,
|
|
79
|
+
className: r(
|
|
80
|
+
"cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-p-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none",
|
|
81
|
+
"cai-transition-colors",
|
|
82
|
+
"focus:cai-bg-tertiary",
|
|
83
|
+
"data-[disabled]:cai-pointer-events-none data-[disabled]:cai-opacity-40",
|
|
84
|
+
e && "cai-pl-4xl",
|
|
85
|
+
a
|
|
86
|
+
),
|
|
87
|
+
...i
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
w.displayName = "DropdownMenuItem";
|
|
91
|
+
const y = n.forwardRef(({ className: a, children: e, checked: i, ...c }, d) => /* @__PURE__ */ s(
|
|
92
|
+
o.CheckboxItem,
|
|
93
|
+
{
|
|
94
|
+
ref: d,
|
|
95
|
+
checked: i,
|
|
96
|
+
className: r(
|
|
97
|
+
"cai-relative cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-py-lg cai-pl-4xl cai-pr-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none",
|
|
98
|
+
"cai-transition-colors",
|
|
99
|
+
"focus:cai-bg-tertiary",
|
|
100
|
+
"data-[disabled]:cai-pointer-events-none data-[disabled]:cai-opacity-40",
|
|
101
|
+
a
|
|
102
|
+
),
|
|
103
|
+
...c,
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ t("span", { className: "cai-absolute cai-left-md cai-flex cai-h-xl cai-w-xl cai-items-center cai-justify-center cai-text-icon-primary", children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(l, { name: "check", size: 12, strokeWidth: 3, "aria-hidden": "true" }) }) }),
|
|
106
|
+
e
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
y.displayName = "DropdownMenuCheckboxItem";
|
|
111
|
+
const x = n.forwardRef(({ className: a, children: e, ...i }, c) => /* @__PURE__ */ s(
|
|
112
|
+
o.RadioItem,
|
|
113
|
+
{
|
|
114
|
+
ref: c,
|
|
115
|
+
className: r(
|
|
116
|
+
"cai-relative cai-flex cai-cursor-default cai-select-none cai-items-center cai-rounded-md cai-border cai-border-transparent cai-py-lg cai-pl-4xl cai-pr-lg cai-text-subbody cai-font-medium cai-text-primary cai-outline-none",
|
|
117
|
+
"cai-transition-colors",
|
|
118
|
+
"focus:cai-bg-tertiary",
|
|
119
|
+
"data-[disabled]:cai-pointer-events-none data-[disabled]:cai-opacity-40",
|
|
120
|
+
a
|
|
121
|
+
),
|
|
122
|
+
...i,
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ t("span", { className: "cai-absolute cai-left-md cai-flex cai-h-xl cai-w-xl cai-items-center cai-justify-center", children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(
|
|
125
|
+
"span",
|
|
126
|
+
{
|
|
127
|
+
"aria-hidden": "true",
|
|
128
|
+
className: "cai-block cai-h-[0.625rem] cai-w-[0.625rem] cai-rounded-full cai-bg-quaternary"
|
|
129
|
+
}
|
|
130
|
+
) }) }),
|
|
131
|
+
e
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
));
|
|
135
|
+
x.displayName = "DropdownMenuRadioItem";
|
|
136
|
+
const g = n.forwardRef(({ className: a, inset: e, ...i }, c) => /* @__PURE__ */ t(
|
|
137
|
+
o.Label,
|
|
138
|
+
{
|
|
139
|
+
ref: c,
|
|
140
|
+
className: r(
|
|
141
|
+
"cai-text-eyebrow2 cai-font-semibold cai-uppercase cai-text-primary",
|
|
142
|
+
e && "cai-pl-4xl",
|
|
143
|
+
a
|
|
144
|
+
),
|
|
145
|
+
...i
|
|
146
|
+
}
|
|
147
|
+
));
|
|
148
|
+
g.displayName = "DropdownMenuLabel";
|
|
149
|
+
const h = n.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ t(
|
|
150
|
+
o.Separator,
|
|
151
|
+
{
|
|
152
|
+
ref: i,
|
|
153
|
+
className: r("-cai-mx-lg cai-h-px cai-bg-[var(--border-quaternary)]", a),
|
|
154
|
+
...e
|
|
155
|
+
}
|
|
156
|
+
));
|
|
157
|
+
h.displayName = "DropdownMenuSeparator";
|
|
158
|
+
const D = ({ className: a, ...e }) => /* @__PURE__ */ t(
|
|
159
|
+
"span",
|
|
160
|
+
{
|
|
161
|
+
className: r(
|
|
162
|
+
"cai-ml-auto cai-text-body2 cai-font-normal cai-tracking-widest cai-text-primary",
|
|
163
|
+
a
|
|
164
|
+
),
|
|
165
|
+
...e
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
D.displayName = "DropdownMenuShortcut";
|
|
169
|
+
export {
|
|
170
|
+
I as DropdownMenu,
|
|
171
|
+
y as DropdownMenuCheckboxItem,
|
|
172
|
+
b as DropdownMenuContent,
|
|
173
|
+
m as DropdownMenuGroup,
|
|
174
|
+
w as DropdownMenuItem,
|
|
175
|
+
g as DropdownMenuLabel,
|
|
176
|
+
p as DropdownMenuRadioGroup,
|
|
177
|
+
x as DropdownMenuRadioItem,
|
|
178
|
+
h as DropdownMenuSeparator,
|
|
179
|
+
D as DropdownMenuShortcut,
|
|
180
|
+
v as DropdownMenuSub,
|
|
181
|
+
f as DropdownMenuSubContent,
|
|
182
|
+
u as DropdownMenuSubTrigger,
|
|
183
|
+
S as DropdownMenuTrigger
|
|
184
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './DropdownMenu';
|
|
2
|
+
export type { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuSubTriggerProps, } from './DropdownMenu';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),J=require("react"),M=require("../_shared/SelectionIndicators.cjs"),Q=require("../../utils/focusRing.cjs"),f=require("../../utils/cn.cjs"),O=require("../Popover/Popover.cjs"),V=require("../Avatar/Avatar.cjs");function X(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const o=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(t,c,o.get?o:{enumerable:!0,get:()=>r[c]})}}return t.default=r,Object.freeze(t)}const n=X(J),Y=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"M6 9l6 6 6-6"})}),Z=()=>a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),a.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),ee={online:"cai-bg-[var(--comp-success-bg)]",busy:"cai-bg-[var(--comp-error-bg)]",offline:"cai-bg-[var(--icon-tertiary)]"};function R(r){return r==null?[]:Array.isArray(r)?r:[r]}const ae=({status:r})=>a.jsx("span",{className:f.cn("cai-h-2 cai-w-2 cai-shrink-0 cai-rounded-full",r?ee[r]:"cai-bg-[var(--icon-tertiary)]"),"aria-hidden":"true"}),te=({id:r,item:t,variant:c,selected:o,active:p,onToggle:m,onHover:h})=>{const y=n.useCallback(()=>{m(t.value)},[t.value,m]);return a.jsxs("div",{id:r,role:"option","aria-selected":o,onClick:y,onMouseEnter:h,className:f.cn("cai-flex cai-cursor-pointer cai-select-none cai-items-center cai-gap-md cai-rounded-md cai-border cai-border-transparent cai-p-lg","cai-text-subbody cai-font-medium cai-text-primary","cai-outline-none cai-transition-colors",c==="avatar"&&o?"cai-bg-secondary":p&&"cai-bg-tertiary"),children:[c==="single"&&a.jsx(M.RadioIndicator,{checked:o}),c==="multi"&&a.jsx(M.CheckboxIndicator,{checked:o}),c==="avatar"&&a.jsx(ae,{status:t.status}),c==="avatar"&&t.avatar?a.jsx("span",{className:"cai-flex cai-shrink-0 cai-items-center",children:t.avatar}):c==="avatar"?a.jsx(V.Avatar,{variant:"initials",size:"sm",initials:t.label.slice(0,2)}):null,c==="avatar"?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"cai-truncate cai-font-semibold cai-text-primary",children:t.label}),t.supportText&&a.jsx("span",{className:"cai-ml-auto cai-text-subbody cai-text-secondary",children:t.supportText})]}):a.jsxs("span",{className:"cai-flex cai-flex-col cai-gap-y-xxs",children:[a.jsx("span",{className:"cai-font-semibold cai-text-primary",children:t.label}),t.supportText&&a.jsx("span",{className:"cai-text-subbody cai-text-secondary",children:t.supportText})]})]})},$=n.forwardRef(({variant:r="single",items:t=[],selectedValue:c,onSelect:o,placeholder:p="Select an option",label:m,labelRight:h,errorText:y,required:A=!1,disabled:T=!1,id:_,className:B},F)=>{const W=n.useId(),b=_??W,q=`${b}-listbox`,E=y?`${b}-message`:void 0,k=n.useCallback(e=>`${b}-opt-${e}`,[b]),u=r==="multi"||r==="avatar",g=!!y,[v,N]=n.useState(!1),[d,x]=n.useState(-1),C=n.useRef(null),z=n.useRef({text:"",timer:null}),j=c!==void 0,[H,P]=n.useState(()=>R(c));n.useEffect(()=>{j&&P(R(c))},[j,c]);const s=j?R(c):H,I=n.useCallback(e=>{j||P(e),o&&o(u?e:e[0])},[j,u,o]),D=n.useCallback(e=>{if(u){const l=s.includes(e)?s.filter(w=>w!==e):[...s,e];I(l)}else{const i=s[0]===e?[]:[e];I(i),N(!1)}},[I,s,u]);n.useEffect(()=>{if(!v)return;const e=t.findIndex(l=>s.includes(l.value));x(e>=0?e:0);const i=setTimeout(()=>C.current?.focus(),0);return()=>clearTimeout(i)},[v,t,s]),n.useEffect(()=>{if(!v||d<0)return;C.current?.querySelector(`#${CSS.escape(k(d))}`)?.scrollIntoView({block:"nearest"})},[d,v,k]);const K=n.useCallback(e=>{if(t.length){if(e.key==="ArrowDown")e.preventDefault(),x(i=>(i+1)%t.length);else if(e.key==="ArrowUp")e.preventDefault(),x(i=>i<=0?t.length-1:i-1);else if(e.key==="Home")e.preventDefault(),x(0);else if(e.key==="End")e.preventDefault(),x(t.length-1);else if(e.key==="Enter"||e.key===" ")e.preventDefault(),d>=0&&D(t[d].value);else if(e.key==="Escape")e.preventDefault(),N(!1);else if(e.key.length===1&&/\S/.test(e.key)){const i=z.current;i.timer&&clearTimeout(i.timer),i.text=(i.text+e.key).toLowerCase();const l=d>=0?d+1:0,w=t.length;for(let S=0;S<w;S+=1){const L=(l+S)%w;if(t[L].label.toLowerCase().startsWith(i.text)){x(L);break}}i.timer=setTimeout(()=>{i.text=""},600)}}},[t,d,D]),U=n.useMemo(()=>{if(u){const l=s.length;return l>0?`${l} Selected`:p}const e=s[0];return e?t.find(l=>l.value===e)?.label??p:p},[s,u,t,p]),G=n.useMemo(()=>u?s.length===0:!s[0],[s,u]);return a.jsxs("div",{className:f.cn("cai-flex cai-w-full cai-flex-col cai-gap-y-xs cai-font-sans",T&&"cai-pointer-events-none cai-opacity-40",B),children:[(m||h)&&a.jsxs("div",{className:"cai-flex cai-items-center cai-justify-between",children:[m?a.jsxs("label",{htmlFor:b,className:"cai-text-[13px] cai-font-medium cai-text-primary",children:[m,A&&a.jsx("span",{className:"cai-ml-0.5 cai-text-icon-error","aria-hidden":"true",children:"*"})]}):a.jsx("span",{}),h&&a.jsx("span",{className:"cai-ml-auto cai-text-eyebrow1 cai-font-medium cai-text-primary",children:h})]}),a.jsxs(O.Popover,{open:v,onOpenChange:N,children:[a.jsx(O.PopoverTrigger,{asChild:!0,children:a.jsxs("button",{ref:F,id:b,type:"button",disabled:T,"aria-required":A||void 0,"aria-invalid":g||void 0,"aria-describedby":E,"aria-controls":q,className:f.cn("cai-group cai-flex cai-w-full cai-items-center cai-justify-between cai-gap-md cai-rounded-md cai-border cai-px-[14px] cai-py-[10px]","cai-text-[12px] cai-font-medium","cai-outline-none cai-transition-colors",Q.FOCUS_RING,g?"cai-border-error cai-bg-error cai-text-primary-alt focus-visible:cai-border-error":["cai-border-septenary cai-bg-primary-invert cai-text-primary","data-[state=closed]:hover:cai-border-nonary data-[state=closed]:hover:cai-bg-secondary","focus-visible:cai-border-brand-primary","data-[state=open]:cai-border-nonary"]),children:[a.jsx("span",{className:f.cn("cai-flex-1 cai-truncate cai-text-left",G&&!g&&"cai-text-primary",g&&"cai-text-primary-alt"),children:U}),a.jsx("span",{className:f.cn("cai-flex cai-shrink-0 cai-items-center cai-transition-transform cai-duration-200","group-data-[state=open]:cai-rotate-180",g?"cai-text-icon-primary-alt":"cai-text-tertiary"),children:a.jsx(Y,{})})]})}),a.jsx(O.PopoverContent,{align:"start",sideOffset:4,className:f.cn("cai-w-[var(--radix-popover-trigger-width)] cai-max-w-none","cai-rounded-md cai-border cai-border-tertiary cai-bg-primary-invert cai-p-lg cai-shadow-shallow"),children:a.jsx("div",{ref:C,id:q,role:"listbox",tabIndex:-1,"aria-multiselectable":u||void 0,"aria-activedescendant":d>=0?k(d):void 0,onKeyDown:K,className:"cai-flex cai-max-h-[280px] cai-flex-col cai-gap-y-xxs cai-overflow-y-auto cai-outline-none",children:t.map((e,i)=>{const l=s.includes(e.value);return a.jsx(te,{id:k(i),item:e,variant:r,selected:l,active:i===d,onToggle:D,onHover:()=>x(i)},e.value)})})})]}),y&&a.jsxs("div",{id:E,role:"alert",className:"cai-mt-xs cai-flex cai-items-center cai-gap-1",children:[a.jsx("span",{className:"cai-flex cai-items-center cai-text-icon-error",children:a.jsx(Z,{})}),a.jsx("span",{className:"cai-font-sans cai-text-xs cai-font-medium cai-pt-[3px] cai-text-error",children:y})]})]})});$.displayName="DropdownSelect";exports.DropdownSelect=$;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AvatarProps } from '../Avatar';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type DropdownSelectVariant = 'single' | 'multi' | 'avatar';
|
|
4
|
+
export type DropdownSelectStatus = 'online' | 'offline' | 'busy';
|
|
5
|
+
export interface DropdownSelectItemProps {
|
|
6
|
+
/** Unique identifier for the option. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** Primary display text. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Secondary text / handle (e.g. description or @handle). */
|
|
11
|
+
supportText?: string;
|
|
12
|
+
/** Per-item avatar element (avatar variant). */
|
|
13
|
+
avatar?: React.ReactElement<AvatarProps>;
|
|
14
|
+
/** Status dot color (avatar variant). */
|
|
15
|
+
status?: DropdownSelectStatus;
|
|
16
|
+
}
|
|
17
|
+
export interface DropdownSelectProps {
|
|
18
|
+
/** Selection mode. */
|
|
19
|
+
variant?: DropdownSelectVariant;
|
|
20
|
+
/** Selectable options. */
|
|
21
|
+
items?: DropdownSelectItemProps[];
|
|
22
|
+
/** Pre-selected value(s). string for single, string[] for multi/avatar. */
|
|
23
|
+
selectedValue?: string | string[];
|
|
24
|
+
/** Change callback. Value shape matches the variant. */
|
|
25
|
+
onSelect?: (value: string | string[] | undefined) => void;
|
|
26
|
+
/** Trigger placeholder text. */
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** Visible label text above the trigger. */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Right-aligned label above the trigger (eyebrow1 style). */
|
|
31
|
+
labelRight?: string;
|
|
32
|
+
/** Error message rendered below the trigger with an alert icon. */
|
|
33
|
+
errorText?: string;
|
|
34
|
+
/** Shows a required indicator on the label. */
|
|
35
|
+
required?: boolean;
|
|
36
|
+
/** Disables interaction. */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Optional id passed to the trigger. */
|
|
39
|
+
id?: string;
|
|
40
|
+
/** Additional class names applied to the outer wrapper. */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
declare const DropdownSelect: React.ForwardRefExoticComponent<DropdownSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
export { DropdownSelect };
|
|
45
|
+
//# sourceMappingURL=DropdownSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownSelect.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownSelect/DropdownSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AA2CpD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;AACjE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;AAEhE,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gDAAgD;IAChD,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;IACxC,yCAAyC;IACzC,MAAM,CAAC,EAAE,oBAAoB,CAAA;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,sBAAsB;IACtB,OAAO,CAAC,EAAE,qBAAqB,CAAA;IAC/B,0BAA0B;IAC1B,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACjC,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACjC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAA;IACzD,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAgID,QAAA,MAAM,cAAc,+FA0SnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
|