@hewnui/ui 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/chart/axes.d.ts +31 -0
- package/dist/chart/axes.js +20 -0
- package/dist/chart/colors.d.ts +1 -0
- package/dist/chart/colors.js +13 -0
- package/dist/chart/frame.d.ts +13 -0
- package/dist/chart/frame.js +17 -0
- package/dist/chart/interaction.d.ts +22 -0
- package/dist/chart/interaction.js +22 -0
- package/dist/chart/path.d.ts +10 -0
- package/dist/chart/path.js +24 -0
- package/dist/chart/scales.d.ts +34 -0
- package/dist/chart/scales.js +66 -0
- package/dist/chart/status.d.ts +3 -0
- package/dist/chart/status.js +15 -0
- package/dist/chart/types.d.ts +34 -0
- package/dist/chart/types.js +6 -0
- package/dist/components/area-chart/area-chart.d.ts +17 -0
- package/dist/components/area-chart/area-chart.js +54 -0
- package/dist/components/area-chart/index.d.ts +1 -0
- package/dist/components/area-chart/index.js +1 -0
- package/dist/components/badge/badge.d.ts +2 -0
- package/dist/components/badge/badge.js +5 -0
- package/dist/components/badge/badge.styles.d.ts +8 -0
- package/dist/components/badge/badge.styles.js +57 -0
- package/dist/components/badge/badge.types.d.ts +11 -0
- package/dist/components/badge/badge.types.js +1 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/bar-chart/bar-chart.d.ts +17 -0
- package/dist/components/bar-chart/bar-chart.js +73 -0
- package/dist/components/bar-chart/index.d.ts +1 -0
- package/dist/components/bar-chart/index.js +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +13 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.d.ts +5 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +10 -0
- package/dist/components/breadcrumbs/breadcrumbs.types.d.ts +16 -0
- package/dist/components/breadcrumbs/breadcrumbs.types.js +1 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.js +1 -0
- package/dist/components/button/button.d.ts +2 -0
- package/dist/components/button/button.js +18 -0
- package/dist/components/button/button.motion.d.ts +23 -0
- package/dist/components/button/button.motion.js +11 -0
- package/dist/components/button/button.styles.d.ts +10 -0
- package/dist/components/button/button.styles.js +24 -0
- package/dist/components/button/button.types.d.ts +11 -0
- package/dist/components/button/button.types.js +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/card/card.d.ts +21 -0
- package/dist/components/card/card.js +19 -0
- package/dist/components/card/card.styles.d.ts +4 -0
- package/dist/components/card/card.styles.js +13 -0
- package/dist/components/card/card.types.d.ts +4 -0
- package/dist/components/card/card.types.js +1 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +17 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +3 -0
- package/dist/components/checkbox/checkbox.styles.js +6 -0
- package/dist/components/checkbox/checkbox.types.d.ts +6 -0
- package/dist/components/checkbox/checkbox.types.js +1 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.js +8 -0
- package/dist/components/checkbox-group/checkbox-group.styles.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.styles.js +5 -0
- package/dist/components/checkbox-group/checkbox-group.types.d.ts +9 -0
- package/dist/components/checkbox-group/checkbox-group.types.js +1 -0
- package/dist/components/checkbox-group/index.d.ts +2 -0
- package/dist/components/checkbox-group/index.js +1 -0
- package/dist/components/color-picker/color-picker.d.ts +2 -0
- package/dist/components/color-picker/color-picker.js +27 -0
- package/dist/components/color-picker/color-picker.oklch.d.ts +2 -0
- package/dist/components/color-picker/color-picker.oklch.js +54 -0
- package/dist/components/color-picker/color-picker.panel.d.ts +2 -0
- package/dist/components/color-picker/color-picker.panel.js +15 -0
- package/dist/components/color-picker/color-picker.styles.d.ts +16 -0
- package/dist/components/color-picker/color-picker.styles.js +28 -0
- package/dist/components/color-picker/color-picker.types.d.ts +36 -0
- package/dist/components/color-picker/color-picker.types.js +1 -0
- package/dist/components/color-picker/index.d.ts +4 -0
- package/dist/components/color-picker/index.js +3 -0
- package/dist/components/combobox/combobox.d.ts +15 -0
- package/dist/components/combobox/combobox.js +11 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/command-palette/command-palette-items.d.ts +4 -0
- package/dist/components/command-palette/command-palette-items.js +14 -0
- package/dist/components/command-palette/command-palette.d.ts +15 -0
- package/dist/components/command-palette/command-palette.hotkey.d.ts +8 -0
- package/dist/components/command-palette/command-palette.hotkey.js +51 -0
- package/dist/components/command-palette/command-palette.js +33 -0
- package/dist/components/command-palette/command-palette.styles.d.ts +13 -0
- package/dist/components/command-palette/command-palette.styles.js +25 -0
- package/dist/components/command-palette/command-palette.types.d.ts +65 -0
- package/dist/components/command-palette/command-palette.types.js +1 -0
- package/dist/components/command-palette/index.d.ts +14 -0
- package/dist/components/command-palette/index.js +13 -0
- package/dist/components/data-table/data-table.d.ts +7 -0
- package/dist/components/data-table/data-table.js +31 -0
- package/dist/components/data-table/index.d.ts +1 -0
- package/dist/components/data-table/index.js +1 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +8 -0
- package/dist/components/date-picker/index.d.ts +1 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-range-picker/date-range-picker.calendar.d.ts +5 -0
- package/dist/components/date-range-picker/date-range-picker.calendar.js +21 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker/date-range-picker.js +9 -0
- package/dist/components/date-range-picker/date-range-picker.presets.d.ts +3 -0
- package/dist/components/date-range-picker/date-range-picker.presets.js +53 -0
- package/dist/components/date-range-picker/date-range-picker.styles.d.ts +11 -0
- package/dist/components/date-range-picker/date-range-picker.styles.js +14 -0
- package/dist/components/date-range-picker/date-range-picker.types.d.ts +28 -0
- package/dist/components/date-range-picker/date-range-picker.types.js +1 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/dialog/dialog.d.ts +18 -0
- package/dist/components/dialog/dialog.js +16 -0
- package/dist/components/dialog/dialog.styles.d.ts +6 -0
- package/dist/components/dialog/dialog.styles.js +9 -0
- package/dist/components/dialog/index.d.ts +7 -0
- package/dist/components/dialog/index.js +7 -0
- package/dist/components/donut-chart/donut-chart.d.ts +17 -0
- package/dist/components/donut-chart/donut-chart.js +65 -0
- package/dist/components/donut-chart/index.d.ts +1 -0
- package/dist/components/donut-chart/index.js +1 -0
- package/dist/components/drawer/drawer.d.ts +13 -0
- package/dist/components/drawer/drawer.js +14 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/empty/empty.d.ts +7 -0
- package/dist/components/empty/empty.js +5 -0
- package/dist/components/empty/index.d.ts +1 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/file-upload/file-upload.d.ts +2 -0
- package/dist/components/file-upload/file-upload.js +44 -0
- package/dist/components/file-upload/file-upload.styles.d.ts +12 -0
- package/dist/components/file-upload/file-upload.styles.js +14 -0
- package/dist/components/file-upload/file-upload.types.d.ts +16 -0
- package/dist/components/file-upload/file-upload.types.js +1 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/form/form.d.ts +2 -0
- package/dist/components/form/form.js +7 -0
- package/dist/components/form/form.styles.d.ts +1 -0
- package/dist/components/form/form.styles.js +4 -0
- package/dist/components/form/form.types.d.ts +6 -0
- package/dist/components/form/form.types.js +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/input-group/index.d.ts +2 -0
- package/dist/components/input-group/index.js +1 -0
- package/dist/components/input-group/input-group.d.ts +14 -0
- package/dist/components/input-group/input-group.js +24 -0
- package/dist/components/input-group/input-group.styles.d.ts +8 -0
- package/dist/components/input-group/input-group.styles.js +9 -0
- package/dist/components/input-group/input-group.types.d.ts +22 -0
- package/dist/components/input-group/input-group.types.js +1 -0
- package/dist/components/input-otp/index.d.ts +2 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/input-otp/input-otp.d.ts +2 -0
- package/dist/components/input-otp/input-otp.js +76 -0
- package/dist/components/input-otp/input-otp.styles.d.ts +8 -0
- package/dist/components/input-otp/input-otp.styles.js +11 -0
- package/dist/components/input-otp/input-otp.types.d.ts +23 -0
- package/dist/components/input-otp/input-otp.types.js +1 -0
- package/dist/components/line-chart/index.d.ts +1 -0
- package/dist/components/line-chart/index.js +1 -0
- package/dist/components/line-chart/line-chart.d.ts +17 -0
- package/dist/components/line-chart/line-chart.js +53 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/link/index.js +1 -0
- package/dist/components/link/link.d.ts +2 -0
- package/dist/components/link/link.js +7 -0
- package/dist/components/link/link.styles.d.ts +5 -0
- package/dist/components/link/link.styles.js +9 -0
- package/dist/components/link/link.types.d.ts +8 -0
- package/dist/components/link/link.types.js +1 -0
- package/dist/components/menu/index.d.ts +8 -0
- package/dist/components/menu/index.js +8 -0
- package/dist/components/menu/menu.d.ts +20 -0
- package/dist/components/menu/menu.js +26 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/number-field/number-field.d.ts +2 -0
- package/dist/components/number-field/number-field.js +14 -0
- package/dist/components/number-field/number-field.styles.d.ts +8 -0
- package/dist/components/number-field/number-field.styles.js +7 -0
- package/dist/components/number-field/number-field.types.d.ts +14 -0
- package/dist/components/number-field/number-field.types.js +1 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/pagination.d.ts +2 -0
- package/dist/components/pagination/pagination.js +49 -0
- package/dist/components/pagination/pagination.styles.d.ts +8 -0
- package/dist/components/pagination/pagination.styles.js +19 -0
- package/dist/components/pagination/pagination.types.d.ts +35 -0
- package/dist/components/pagination/pagination.types.js +1 -0
- package/dist/components/pagination/pagination.utils.d.ts +6 -0
- package/dist/components/pagination/pagination.utils.js +51 -0
- package/dist/components/password-field/index.d.ts +2 -0
- package/dist/components/password-field/index.js +1 -0
- package/dist/components/password-field/password-field.d.ts +2 -0
- package/dist/components/password-field/password-field.js +17 -0
- package/dist/components/password-field/password-field.styles.d.ts +8 -0
- package/dist/components/password-field/password-field.styles.js +7 -0
- package/dist/components/password-field/password-field.types.d.ts +16 -0
- package/dist/components/password-field/password-field.types.js +1 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +10 -0
- package/dist/components/popover/popover.js +16 -0
- package/dist/components/popover/popover.styles.d.ts +3 -0
- package/dist/components/popover/popover.styles.js +7 -0
- package/dist/components/popover/popover.types.d.ts +14 -0
- package/dist/components/popover/popover.types.js +1 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +12 -0
- package/dist/components/progress/progress.js +26 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +3 -0
- package/dist/components/radio-group/radio-group.js +21 -0
- package/dist/components/radio-group/radio-group.styles.d.ts +5 -0
- package/dist/components/radio-group/radio-group.styles.js +14 -0
- package/dist/components/radio-group/radio-group.types.d.ts +14 -0
- package/dist/components/radio-group/radio-group.types.js +1 -0
- package/dist/components/search-field/index.d.ts +2 -0
- package/dist/components/search-field/index.js +1 -0
- package/dist/components/search-field/search-field.d.ts +2 -0
- package/dist/components/search-field/search-field.js +15 -0
- package/dist/components/search-field/search-field.styles.d.ts +8 -0
- package/dist/components/search-field/search-field.styles.js +7 -0
- package/dist/components/search-field/search-field.types.d.ts +15 -0
- package/dist/components/search-field/search-field.types.js +1 -0
- package/dist/components/select/index.d.ts +5 -0
- package/dist/components/select/index.js +5 -0
- package/dist/components/select/select.d.ts +16 -0
- package/dist/components/select/select.js +11 -0
- package/dist/components/select/select.styles.d.ts +5 -0
- package/dist/components/select/select.styles.js +13 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.d.ts +3 -0
- package/dist/components/skeleton/skeleton.js +5 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.d.ts +2 -0
- package/dist/components/slider/slider.js +8 -0
- package/dist/components/slider/slider.styles.d.ts +6 -0
- package/dist/components/slider/slider.styles.js +9 -0
- package/dist/components/slider/slider.types.d.ts +8 -0
- package/dist/components/slider/slider.types.js +1 -0
- package/dist/components/sparkline/index.d.ts +1 -0
- package/dist/components/sparkline/index.js +1 -0
- package/dist/components/sparkline/sparkline.d.ts +11 -0
- package/dist/components/sparkline/sparkline.js +34 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +4 -0
- package/dist/components/spinner/spinner.js +6 -0
- package/dist/components/stepper/index.d.ts +3 -0
- package/dist/components/stepper/index.js +2 -0
- package/dist/components/stepper/stepper-step.d.ts +15 -0
- package/dist/components/stepper/stepper-step.js +46 -0
- package/dist/components/stepper/stepper.d.ts +4 -0
- package/dist/components/stepper/stepper.js +17 -0
- package/dist/components/stepper/stepper.styles.d.ts +10 -0
- package/dist/components/stepper/stepper.styles.js +37 -0
- package/dist/components/stepper/stepper.types.d.ts +50 -0
- package/dist/components/stepper/stepper.types.js +1 -0
- package/dist/components/stepper/use-stepper.d.ts +6 -0
- package/dist/components/stepper/use-stepper.js +40 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/switch/switch.js +7 -0
- package/dist/components/switch/switch.styles.d.ts +3 -0
- package/dist/components/switch/switch.styles.js +6 -0
- package/dist/components/switch/switch.types.d.ts +6 -0
- package/dist/components/switch/switch.types.js +1 -0
- package/dist/components/table/index.d.ts +11 -0
- package/dist/components/table/index.js +11 -0
- package/dist/components/table/table-sort-glyph.d.ts +3 -0
- package/dist/components/table/table-sort-glyph.js +5 -0
- package/dist/components/table/table.d.ts +33 -0
- package/dist/components/table/table.js +31 -0
- package/dist/components/table/table.styles.d.ts +8 -0
- package/dist/components/table/table.styles.js +19 -0
- package/dist/components/tabs/index.d.ts +7 -0
- package/dist/components/tabs/index.js +7 -0
- package/dist/components/tabs/tabs.d.ts +20 -0
- package/dist/components/tabs/tabs.js +29 -0
- package/dist/components/tabs/tabs.styles.d.ts +5 -0
- package/dist/components/tabs/tabs.styles.js +30 -0
- package/dist/components/tag-field/index.d.ts +2 -0
- package/dist/components/tag-field/index.js +1 -0
- package/dist/components/tag-field/tag-field-icons.d.ts +2 -0
- package/dist/components/tag-field/tag-field-icons.js +7 -0
- package/dist/components/tag-field/tag-field-tags.d.ts +7 -0
- package/dist/components/tag-field/tag-field-tags.js +19 -0
- package/dist/components/tag-field/tag-field.d.ts +6 -0
- package/dist/components/tag-field/tag-field.js +46 -0
- package/dist/components/tag-field/tag-field.styles.d.ts +14 -0
- package/dist/components/tag-field/tag-field.styles.js +42 -0
- package/dist/components/tag-field/tag-field.types.d.ts +32 -0
- package/dist/components/tag-field/tag-field.types.js +1 -0
- package/dist/components/text-area/index.d.ts +2 -0
- package/dist/components/text-area/index.js +1 -0
- package/dist/components/text-area/text-area.d.ts +2 -0
- package/dist/components/text-area/text-area.js +9 -0
- package/dist/components/text-area/text-area.styles.d.ts +6 -0
- package/dist/components/text-area/text-area.styles.js +5 -0
- package/dist/components/text-area/text-area.types.d.ts +16 -0
- package/dist/components/text-area/text-area.types.js +1 -0
- package/dist/components/text-field/index.d.ts +2 -0
- package/dist/components/text-field/index.js +1 -0
- package/dist/components/text-field/text-field.d.ts +2 -0
- package/dist/components/text-field/text-field.js +8 -0
- package/dist/components/text-field/text-field.styles.d.ts +1 -0
- package/dist/components/text-field/text-field.styles.js +1 -0
- package/dist/components/text-field/text-field.types.d.ts +15 -0
- package/dist/components/text-field/text-field.types.js +1 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/toast-glyph.d.ts +4 -0
- package/dist/components/toast/toast-glyph.js +23 -0
- package/dist/components/toast/toast-item.d.ts +14 -0
- package/dist/components/toast/toast-item.js +21 -0
- package/dist/components/toast/toast.d.ts +16 -0
- package/dist/components/toast/toast.js +50 -0
- package/dist/components/toast/toast.styles.d.ts +13 -0
- package/dist/components/toast/toast.styles.js +50 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +3 -0
- package/dist/components/tooltip/tooltip.js +10 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
- package/dist/components/tooltip/tooltip.styles.js +6 -0
- package/dist/components/tooltip/tooltip.types.d.ts +18 -0
- package/dist/components/tooltip/tooltip.types.js +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +51 -0
- package/dist/providers/material-provider.d.ts +12 -0
- package/dist/providers/material-provider.js +30 -0
- package/dist/providers/motion-provider.d.ts +20 -0
- package/dist/providers/motion-provider.js +45 -0
- package/dist/providers/radius-provider.d.ts +13 -0
- package/dist/providers/radius-provider.js +73 -0
- package/dist/providers/theme-provider.d.ts +25 -0
- package/dist/providers/theme-provider.js +66 -0
- package/dist/styles/field.d.ts +24 -0
- package/dist/styles/field.js +36 -0
- package/dist/styles/overlays.d.ts +3 -0
- package/dist/styles/overlays.js +4 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/cn.js +3 -0
- package/package.json +276 -3
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
export function stepperListClass(orientation, className) {
|
|
3
|
+
return cn("m-0 flex list-none p-0", orientation === "horizontal"
|
|
4
|
+
? "flex-row flex-wrap items-start gap-0"
|
|
5
|
+
: "flex-col gap-0", className);
|
|
6
|
+
}
|
|
7
|
+
export function stepperItemClass(orientation, className) {
|
|
8
|
+
return cn("relative flex", orientation === "horizontal"
|
|
9
|
+
? "min-w-0 flex-1 flex-col items-center gap-2 px-1"
|
|
10
|
+
: "flex-row items-start gap-3", className);
|
|
11
|
+
}
|
|
12
|
+
export function stepperConnectorClass(orientation, complete) {
|
|
13
|
+
return cn("pointer-events-none absolute bg-[color-mix(in_oklch,var(--kp-foreground)_14%,transparent)]", "transition-[background-color] duration-[var(--kp-motion-duration)]", "ease-[cubic-bezier(0.2,0,0,1)]", complete && "bg-accent", orientation === "horizontal"
|
|
14
|
+
? "start-[calc(50%+1.1rem)] end-[calc(-50%+1.1rem)] top-[1.15rem] h-px"
|
|
15
|
+
: "start-[1.15rem] top-[2.4rem] bottom-[-0.15rem] w-px");
|
|
16
|
+
}
|
|
17
|
+
const indicatorTone = {
|
|
18
|
+
complete: cn("border-accent bg-accent text-accent-foreground", "shadow-[inset_0_1px_0_oklch(1_0_0/28%)]"),
|
|
19
|
+
current: cn("border-accent bg-[color-mix(in_oklch,var(--kp-accent)_16%,transparent)]", "text-accent ring-2 ring-ring ring-offset-2 ring-offset-background"),
|
|
20
|
+
upcoming: "border-[color-mix(in_oklch,var(--kp-foreground)_18%,transparent)] bg-surface text-muted-foreground",
|
|
21
|
+
error: cn("border-danger bg-[color-mix(in_oklch,var(--kp-danger)_14%,transparent)]", "text-danger"),
|
|
22
|
+
optional: "border-dashed border-[color-mix(in_oklch,var(--kp-foreground)_22%,transparent)] bg-surface text-muted-foreground",
|
|
23
|
+
};
|
|
24
|
+
export function stepperIndicatorClass(status) {
|
|
25
|
+
return cn("relative z-10 inline-flex size-10 shrink-0 items-center justify-center", "rounded-full border text-sm font-medium tabular-nums outline-none", "transition-[transform,background-color,border-color,color,box-shadow]", "duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)]", indicatorTone[status]);
|
|
26
|
+
}
|
|
27
|
+
export function stepperButtonClass(clickable) {
|
|
28
|
+
return cn("flex w-full flex-col items-center gap-2 text-center outline-none", "rounded-[var(--kp-radius-md)]", clickable &&
|
|
29
|
+
"cursor-pointer transition-[transform] duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)] active:scale-[0.96] focus-visible:ring-2 focus-visible:ring-ring", !clickable && "cursor-default");
|
|
30
|
+
}
|
|
31
|
+
export function stepperButtonVerticalClass(clickable) {
|
|
32
|
+
return cn("flex min-h-10 w-full flex-row items-start gap-3 text-start outline-none", "rounded-[var(--kp-radius-md)]", clickable &&
|
|
33
|
+
"cursor-pointer transition-[transform] duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)] active:scale-[0.96] focus-visible:ring-2 focus-visible:ring-ring", !clickable && "cursor-default");
|
|
34
|
+
}
|
|
35
|
+
export const stepperTitleClass = "text-sm font-medium tracking-tight text-balance text-foreground";
|
|
36
|
+
export const stepperDescriptionClass = "mt-0.5 text-xs leading-relaxed text-pretty text-muted-foreground";
|
|
37
|
+
export const stepperOptionalClass = "mt-0.5 font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type StepperOrientation = "horizontal" | "vertical";
|
|
3
|
+
export type StepStatus = "complete" | "current" | "upcoming" | "error" | "optional";
|
|
4
|
+
export type StepperProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
orientation?: StepperOrientation;
|
|
8
|
+
/** Accessible name for the stepper navigation. */
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Zero-based index of the current step. When set, child status is derived
|
|
12
|
+
* unless a step provides an explicit `status`.
|
|
13
|
+
*/
|
|
14
|
+
currentIndex?: number;
|
|
15
|
+
/** Called when a clickable completed (or navigable) step is activated. */
|
|
16
|
+
onStepChange?: (index: number) => void;
|
|
17
|
+
/** Allow activating completed steps. Defaults to `true` when `onStepChange` is set. */
|
|
18
|
+
allowGoBack?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type StepperStepProps = {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Explicit status. Overrides derivation from `currentIndex`. */
|
|
24
|
+
status?: StepStatus;
|
|
25
|
+
/** Marks the step as optional in the label metadata. */
|
|
26
|
+
isOptional?: boolean;
|
|
27
|
+
/** Description under the title. */
|
|
28
|
+
description?: ReactNode;
|
|
29
|
+
/** Zero-based index. Auto-assigned from sibling order when omitted. */
|
|
30
|
+
index?: number;
|
|
31
|
+
/** Force clickability regardless of status. */
|
|
32
|
+
isClickable?: boolean;
|
|
33
|
+
onPress?: () => void;
|
|
34
|
+
};
|
|
35
|
+
export type UseStepperOptions = {
|
|
36
|
+
/** Total number of steps. */
|
|
37
|
+
count: number;
|
|
38
|
+
defaultIndex?: number;
|
|
39
|
+
index?: number;
|
|
40
|
+
onIndexChange?: (index: number) => void;
|
|
41
|
+
};
|
|
42
|
+
export type UseStepperResult = {
|
|
43
|
+
currentIndex: number;
|
|
44
|
+
goTo: (index: number) => void;
|
|
45
|
+
next: () => void;
|
|
46
|
+
previous: () => void;
|
|
47
|
+
isFirst: boolean;
|
|
48
|
+
isLast: boolean;
|
|
49
|
+
statusFor: (index: number) => Exclude<StepStatus, "error" | "optional">;
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { UseStepperOptions, UseStepperResult } from "./stepper.types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Small wizard helper for pairing step content with {@link Stepper}.
|
|
4
|
+
* Supports controlled and uncontrolled indices.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useStepper({ count, defaultIndex, index, onIndexChange, }: UseStepperOptions): UseStepperResult;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Small wizard helper for pairing step content with {@link Stepper}.
|
|
5
|
+
* Supports controlled and uncontrolled indices.
|
|
6
|
+
*/
|
|
7
|
+
export function useStepper({ count, defaultIndex = 0, index, onIndexChange, }) {
|
|
8
|
+
const controlled = index !== undefined;
|
|
9
|
+
const [uncontrolled, setUncontrolled] = useState(() => clamp(defaultIndex, count));
|
|
10
|
+
const currentIndex = controlled ? clamp(index, count) : uncontrolled;
|
|
11
|
+
const goTo = useCallback((next) => {
|
|
12
|
+
const clamped = clamp(next, count);
|
|
13
|
+
if (!controlled)
|
|
14
|
+
setUncontrolled(clamped);
|
|
15
|
+
onIndexChange?.(clamped);
|
|
16
|
+
}, [controlled, count, onIndexChange]);
|
|
17
|
+
const next = useCallback(() => goTo(currentIndex + 1), [currentIndex, goTo]);
|
|
18
|
+
const previous = useCallback(() => goTo(currentIndex - 1), [currentIndex, goTo]);
|
|
19
|
+
const statusFor = useCallback((stepIndex) => {
|
|
20
|
+
if (stepIndex < currentIndex)
|
|
21
|
+
return "complete";
|
|
22
|
+
if (stepIndex === currentIndex)
|
|
23
|
+
return "current";
|
|
24
|
+
return "upcoming";
|
|
25
|
+
}, [currentIndex]);
|
|
26
|
+
return {
|
|
27
|
+
currentIndex,
|
|
28
|
+
goTo,
|
|
29
|
+
next,
|
|
30
|
+
previous,
|
|
31
|
+
isFirst: currentIndex <= 0,
|
|
32
|
+
isLast: currentIndex >= count - 1,
|
|
33
|
+
statusFor,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function clamp(value, count) {
|
|
37
|
+
if (count <= 0)
|
|
38
|
+
return 0;
|
|
39
|
+
return Math.max(0, Math.min(count - 1, value));
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch } from "./switch.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Switch as AriaSwitch } from "react-aria-components";
|
|
4
|
+
import { switchClassName, switchThumbClass, switchTrackClass, } from "./switch.styles.js";
|
|
5
|
+
export function Switch({ children, className, ...props }) {
|
|
6
|
+
return (_jsxs(AriaSwitch, { ...props, className: switchClassName(className), children: [_jsx("span", { className: switchTrackClass, "data-kp-control": "switch", children: _jsx("span", { className: switchThumbClass, "data-kp-control": "switch-thumb" }) }), children ? _jsx("span", { children: children }) : null] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
export function switchClassName(className) {
|
|
3
|
+
return cn("group inline-flex min-h-10 items-center gap-3 text-sm text-foreground outline-none", "disabled:cursor-not-allowed disabled:opacity-45", className);
|
|
4
|
+
}
|
|
5
|
+
export const switchTrackClass = cn("relative h-7 w-12 shrink-0 rounded-full border p-0.5", "border-[color-mix(in_oklch,var(--kp-foreground)_20%,transparent)]", "bg-[color-mix(in_oklch,var(--kp-muted)_82%,var(--kp-foreground)_10%)]", "shadow-[inset_0_1px_2px_oklch(0_0_0/14%),inset_0_-1px_0_oklch(1_0_0/18%)]", "transition-[background-color,border-color,box-shadow,transform]", "duration-[var(--kp-motion-duration)] ease-[var(--kp-motion-ease-standard)]", "group-data-[selected]:border-accent group-data-[selected]:bg-accent", "group-data-[selected]:shadow-[inset_0_1px_0_oklch(1_0_0/28%),0_0_0_3px_color-mix(in_oklch,var(--kp-accent)_24%,transparent),0_8px_18px_-10px_color-mix(in_oklch,var(--kp-accent)_55%,transparent)]", "group-data-[focus-visible]:ring-2 group-data-[focus-visible]:ring-ring", "group-data-[focus-visible]:ring-offset-2 group-data-[focus-visible]:ring-offset-background", "group-data-[pressed]:scale-[0.96]", "group-disabled:opacity-100");
|
|
6
|
+
export const switchThumbClass = cn("block size-5 rounded-full", "bg-[color-mix(in_oklch,var(--kp-surface-raised)_92%,white)]", "shadow-[0_1px_2px_oklch(0_0_0/22%),0_4px_10px_oklch(0_0_0/12%),inset_0_1px_0_oklch(1_0_0/85%)]", "transition-[transform,box-shadow] duration-[var(--kp-motion-duration)]", "ease-[var(--kp-motion-ease-standard)]", "translate-x-0 group-data-[selected]:translate-x-5", "group-data-[selected]:shadow-[0_1px_2px_oklch(0_0_0/18%),0_6px_14px_oklch(0_0_0/16%),inset_0_1px_0_oklch(1_0_0/90%)]");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Table, TableBody, TableCell, TableColumn, TableEmpty, TableHeader, TableLoading, TableRow } from "./table.js";
|
|
2
|
+
export declare const TableRoot: typeof Table & {
|
|
3
|
+
Header: typeof TableHeader;
|
|
4
|
+
Column: typeof TableColumn;
|
|
5
|
+
Body: typeof TableBody;
|
|
6
|
+
Row: typeof TableRow;
|
|
7
|
+
Cell: typeof TableCell;
|
|
8
|
+
Empty: typeof TableEmpty;
|
|
9
|
+
Loading: typeof TableLoading;
|
|
10
|
+
};
|
|
11
|
+
export { Table, TableBody, TableCell, TableColumn, TableEmpty, TableHeader, TableLoading, TableRow, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Table, TableBody, TableCell, TableColumn, TableEmpty, TableHeader, TableLoading, TableRow, } from "./table.js";
|
|
2
|
+
export const TableRoot = Object.assign(Table, {
|
|
3
|
+
Header: TableHeader,
|
|
4
|
+
Column: TableColumn,
|
|
5
|
+
Body: TableBody,
|
|
6
|
+
Row: TableRow,
|
|
7
|
+
Cell: TableCell,
|
|
8
|
+
Empty: TableEmpty,
|
|
9
|
+
Loading: TableLoading,
|
|
10
|
+
});
|
|
11
|
+
export { Table, TableBody, TableCell, TableColumn, TableEmpty, TableHeader, TableLoading, TableRow, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
export function SortGlyph({ direction, }) {
|
|
4
|
+
return (_jsx("svg", { "aria-hidden": true, viewBox: "0 0 12 12", fill: "none", className: cn("size-3 shrink-0 transition-[opacity,transform] duration-[var(--kp-motion-duration)]", direction ? "opacity-90" : "opacity-35", direction === "descending" && "rotate-180"), children: _jsx("path", { d: "M6 2.5v7M6 2.5 3.25 5.25M6 2.5l2.75 2.75", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type CellProps, type ColumnProps, type RowProps, type TableBodyProps, type TableHeaderProps, type TableProps } from "react-aria-components";
|
|
3
|
+
export declare function Table({ children, className, ...props }: Omit<TableProps, "className" | "children"> & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function TableHeader<T extends object>({ children, className, ...props }: Omit<TableHeaderProps<T>, "className" | "children"> & {
|
|
8
|
+
children: TableHeaderProps<T>["children"];
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function TableColumn({ children, className, ...props }: Omit<ColumnProps, "className" | "children"> & {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function TableBody<T extends object>({ children, className, ...props }: Omit<TableBodyProps<T>, "className" | "children"> & {
|
|
16
|
+
children: TableBodyProps<T>["children"];
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function TableRow<T extends object>({ children, className, ...props }: Omit<RowProps<T>, "className" | "children"> & {
|
|
20
|
+
children: RowProps<T>["children"];
|
|
21
|
+
className?: string | undefined;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function TableCell({ children, className, ...props }: Omit<CellProps, "className" | "children"> & {
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function TableEmpty({ children, title, }: {
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
title?: ReactNode;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function TableLoading({ children, }: {
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Cell as AriaCell, Column as AriaColumn, Row as AriaRow, Table as AriaTable, TableBody as AriaTableBody, TableHeader as AriaTableHeader, } from "react-aria-components";
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
import { Spinner } from "../spinner/index.js";
|
|
6
|
+
import { SortGlyph } from "./table-sort-glyph.js";
|
|
7
|
+
import { tableCellClass, tableColumnClass, tableEmptyClass, tableHeaderClass, tableLoadingClass, tableRootClass, tableRowClass, tableShellClass, } from "./table.styles.js";
|
|
8
|
+
export function Table({ children, className, ...props }) {
|
|
9
|
+
return (_jsx("div", { "data-kp-surface": true, className: tableShellClass(), children: _jsx(AriaTable, { ...props, className: tableRootClass(className), children: children }) }));
|
|
10
|
+
}
|
|
11
|
+
export function TableHeader({ children, className, ...props }) {
|
|
12
|
+
return (_jsx(AriaTableHeader, { ...props, className: cn(tableHeaderClass, className), children: children }));
|
|
13
|
+
}
|
|
14
|
+
export function TableColumn({ children, className, ...props }) {
|
|
15
|
+
return (_jsx(AriaColumn, { ...props, className: tableColumnClass(className), children: ({ allowsSorting, sortDirection }) => (_jsxs("span", { className: "inline-flex items-center gap-1.5", children: [children, allowsSorting ? _jsx(SortGlyph, { direction: sortDirection }) : null] })) }));
|
|
16
|
+
}
|
|
17
|
+
export function TableBody({ children, className, ...props }) {
|
|
18
|
+
return (_jsx(AriaTableBody, { ...props, ...(className !== undefined ? { className } : {}), children: children }));
|
|
19
|
+
}
|
|
20
|
+
export function TableRow({ children, className, ...props }) {
|
|
21
|
+
return (_jsx(AriaRow, { ...props, className: tableRowClass(className), children: children }));
|
|
22
|
+
}
|
|
23
|
+
export function TableCell({ children, className, ...props }) {
|
|
24
|
+
return (_jsx(AriaCell, { ...props, className: tableCellClass(className), children: children }));
|
|
25
|
+
}
|
|
26
|
+
export function TableEmpty({ children = "No rows to show.", title = "Empty", }) {
|
|
27
|
+
return (_jsxs("div", { className: tableEmptyClass, role: "status", children: [_jsx("p", { className: "text-sm font-medium text-foreground", children: title }), _jsx("p", { className: "max-w-sm text-sm text-muted-foreground text-pretty", children: children })] }));
|
|
28
|
+
}
|
|
29
|
+
export function TableLoading({ children = "Loading rows…", }) {
|
|
30
|
+
return (_jsx("div", { className: tableLoadingClass, role: "status", "aria-live": "polite", children: _jsxs("div", { className: "flex w-full flex-col gap-3 px-4 py-2", children: [_jsxs("div", { className: "flex items-center justify-center gap-2 text-sm text-foreground", children: [_jsx(Spinner, { className: "text-accent" }), _jsx("span", { children: children })] }), _jsxs("div", { className: "space-y-2", "aria-hidden": true, children: [_jsx("div", { className: "h-9 animate-pulse rounded-[var(--kp-radius-md)] bg-[color-mix(in_oklch,var(--kp-muted)_85%,var(--kp-foreground)_8%)]" }), _jsx("div", { className: "h-9 animate-pulse rounded-[var(--kp-radius-md)] bg-[color-mix(in_oklch,var(--kp-muted)_70%,var(--kp-foreground)_6%)]" }), _jsx("div", { className: "h-9 animate-pulse rounded-[var(--kp-radius-md)] bg-[color-mix(in_oklch,var(--kp-muted)_55%,var(--kp-foreground)_5%)]" })] })] }) }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function tableShellClass(className?: string | undefined): string;
|
|
2
|
+
export declare function tableRootClass(className?: string | undefined): string;
|
|
3
|
+
export declare const tableHeaderClass = "bg-[color-mix(in_oklch,var(--kp-muted)_55%,transparent)]";
|
|
4
|
+
export declare function tableColumnClass(className?: string | undefined): string;
|
|
5
|
+
export declare function tableRowClass(className?: string | undefined): string;
|
|
6
|
+
export declare function tableCellClass(className?: string | undefined): string;
|
|
7
|
+
export declare const tableEmptyClass = "flex min-h-36 flex-col items-center justify-center gap-2 px-4 py-10 text-center";
|
|
8
|
+
export declare const tableLoadingClass = "flex min-h-44 w-full items-center justify-center px-2 py-6 text-sm";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
export function tableShellClass(className) {
|
|
3
|
+
return cn("overflow-x-auto rounded-[var(--kp-radius-panel)] border", "border-[color-mix(in_oklch,var(--kp-foreground)_12%,transparent)]", "shadow-[var(--kp-shadow-surface)]", className);
|
|
4
|
+
}
|
|
5
|
+
export function tableRootClass(className) {
|
|
6
|
+
return cn("w-full caption-bottom border-separate border-spacing-0 text-sm", "bg-transparent", className);
|
|
7
|
+
}
|
|
8
|
+
export const tableHeaderClass = "bg-[color-mix(in_oklch,var(--kp-muted)_55%,transparent)]";
|
|
9
|
+
export function tableColumnClass(className) {
|
|
10
|
+
return cn("h-11 px-4 text-left align-middle text-xs font-semibold tracking-wide", "text-muted-foreground outline-none", "transition-[color,background-color] duration-[var(--kp-motion-duration)]", "ease-[var(--kp-motion-ease-standard)]", "data-[hovered]:text-foreground", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-inset data-[focus-visible]:ring-ring", "data-[allows-sorting]:cursor-pointer", className);
|
|
11
|
+
}
|
|
12
|
+
export function tableRowClass(className) {
|
|
13
|
+
return cn("outline-none transition-[background-color,transform]", "duration-[var(--kp-motion-duration)] ease-[var(--kp-motion-ease-standard)]", "data-[hovered]:bg-[color-mix(in_oklch,var(--kp-muted)_45%,transparent)]", "data-[selected]:bg-[color-mix(in_oklch,var(--kp-accent)_12%,transparent)]", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-inset data-[focus-visible]:ring-ring", "data-[disabled]:opacity-45", className);
|
|
14
|
+
}
|
|
15
|
+
export function tableCellClass(className) {
|
|
16
|
+
return cn("border-t border-[color-mix(in_oklch,var(--kp-foreground)_8%,transparent)]", "px-4 py-3 align-middle text-foreground tabular-nums", "[&:first-child]:font-medium [&:first-child]:[font-variant-numeric:normal]", className);
|
|
17
|
+
}
|
|
18
|
+
export const tableEmptyClass = "flex min-h-36 flex-col items-center justify-center gap-2 px-4 py-10 text-center";
|
|
19
|
+
export const tableLoadingClass = "flex min-h-44 w-full items-center justify-center px-2 py-6 text-sm";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type TabsProps as AriaTabsProps } from "react-aria-components";
|
|
3
|
+
import { type TabsVariant } from "./tabs.styles.js";
|
|
4
|
+
export declare function Tabs({ children, variant, ...props }: Omit<AriaTabsProps, "children" | "className"> & {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
variant?: TabsVariant;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TabList({ children, className, variant: listVariant, }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
variant?: TabsVariant;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Tab({ children, id, }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
id: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function TabPanel({ children, id, }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
id: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useId, } from "react";
|
|
4
|
+
import { Tab as AriaTab, TabList as AriaTabList, TabPanel as AriaTabPanel, Tabs as AriaTabs, } from "react-aria-components";
|
|
5
|
+
import { m } from "motion/react";
|
|
6
|
+
import { springs } from "@hewnui/motion";
|
|
7
|
+
import { useMotionMode } from "../../providers/motion-provider.js";
|
|
8
|
+
import { tabClass, tabIndicatorClass, tabPanelClass, tabsListClass, } from "./tabs.styles.js";
|
|
9
|
+
const TabsContext = createContext({
|
|
10
|
+
layoutId: "kp-tab",
|
|
11
|
+
variant: "pills",
|
|
12
|
+
});
|
|
13
|
+
export function Tabs({ children, variant = "pills", ...props }) {
|
|
14
|
+
const layoutId = `kp-tab-${useId()}`;
|
|
15
|
+
return (_jsx(TabsContext.Provider, { value: { layoutId, variant }, children: _jsx(AriaTabs, { ...props, children: children }) }));
|
|
16
|
+
}
|
|
17
|
+
export function TabList({ children, className, variant: listVariant, }) {
|
|
18
|
+
const context = useContext(TabsContext);
|
|
19
|
+
const variant = listVariant ?? context.variant;
|
|
20
|
+
return (_jsx(AriaTabList, { className: tabsListClass(className, variant), "data-kp-control": "tabs", children: children }));
|
|
21
|
+
}
|
|
22
|
+
export function Tab({ children, id, }) {
|
|
23
|
+
const { motionEnabled } = useMotionMode();
|
|
24
|
+
const { layoutId, variant } = useContext(TabsContext);
|
|
25
|
+
return (_jsx(AriaTab, { id: id, className: tabClass(variant), children: ({ isSelected }) => (_jsxs(_Fragment, { children: [isSelected ? (motionEnabled ? (_jsx(m.span, { layoutId: layoutId, className: tabIndicatorClass(variant), transition: springs.snappy, "data-kp-control": "tab-indicator" })) : (_jsx("span", { className: tabIndicatorClass(variant), "data-kp-control": "tab-indicator" }))) : null, _jsx("span", { className: "relative z-10", children: children })] })) }));
|
|
26
|
+
}
|
|
27
|
+
export function TabPanel({ children, id, }) {
|
|
28
|
+
return (_jsx(AriaTabPanel, { id: id, className: tabPanelClass, children: children }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type TabsVariant = "pills" | "line" | "solid" | "glass";
|
|
2
|
+
export declare function tabsListClass(className?: string, variant?: TabsVariant): string;
|
|
3
|
+
export declare function tabClass(variant?: TabsVariant): string;
|
|
4
|
+
export declare function tabIndicatorClass(variant?: TabsVariant): string;
|
|
5
|
+
export declare const tabPanelClass: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
const listVariants = {
|
|
3
|
+
pills: cn("relative inline-flex max-w-full gap-0.5 overflow-x-auto rounded-[var(--kp-radius-md)] p-1", "border border-[color-mix(in_oklch,var(--kp-foreground)_12%,transparent)]", "bg-[color-mix(in_oklch,var(--kp-muted)_72%,transparent)]", "shadow-[inset_0_1px_2px_oklch(0_0_0/8%)]"),
|
|
4
|
+
line: cn("relative inline-flex max-w-full gap-4 overflow-x-auto border-b", "border-[color-mix(in_oklch,var(--kp-foreground)_14%,transparent)] pb-0.5"),
|
|
5
|
+
solid: cn("relative inline-flex max-w-full gap-1 overflow-x-auto rounded-[var(--kp-radius-md)] p-1.5", "bg-surface border border-[color-mix(in_oklch,var(--kp-foreground)_10%,transparent)]", "shadow-[var(--kp-shadow-surface)]"),
|
|
6
|
+
glass: cn("relative inline-flex max-w-full gap-0.5 overflow-x-auto rounded-[var(--kp-radius-md)] p-1", "border border-[color-mix(in_oklch,var(--kp-foreground)_16%,transparent)]", "bg-[color-mix(in_oklch,var(--kp-surface)_45%,transparent)]", "backdrop-blur-md backdrop-saturate-150", "shadow-[inset_0_1px_0_oklch(1_0_0/30%)]"),
|
|
7
|
+
};
|
|
8
|
+
export function tabsListClass(className, variant = "pills") {
|
|
9
|
+
return cn(listVariants[variant], className);
|
|
10
|
+
}
|
|
11
|
+
export function tabClass(variant = "pills") {
|
|
12
|
+
return cn("relative z-10 inline-flex min-h-10 min-w-10 items-center justify-center", variant === "line"
|
|
13
|
+
? "pb-2.5 pt-1.5 px-1 text-sm font-medium text-muted-foreground outline-none transition-colors duration-[var(--kp-motion-duration)] data-[selected]:text-foreground data-[hovered]:text-foreground"
|
|
14
|
+
: variant === "solid"
|
|
15
|
+
? "rounded-[calc(var(--kp-radius-md)-0.25rem)] px-3.5 text-sm font-medium text-muted-foreground outline-none transition-[color,transform] duration-[var(--kp-motion-duration)] data-[selected]:text-accent-foreground data-[hovered]:text-foreground data-[pressed]:scale-[0.96]"
|
|
16
|
+
: "rounded-[calc(var(--kp-radius-md)-0.2rem)] px-3.5 text-sm font-medium text-muted-foreground outline-none transition-[color,transform] duration-[var(--kp-motion-duration)] data-[selected]:text-foreground data-[hovered]:text-foreground data-[pressed]:scale-[0.96]", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring", "data-[focus-visible]:ring-offset-2 data-[focus-visible]:ring-offset-background");
|
|
17
|
+
}
|
|
18
|
+
export function tabIndicatorClass(variant = "pills") {
|
|
19
|
+
if (variant === "line") {
|
|
20
|
+
return cn("absolute bottom-0 left-0 right-0 h-0.5 rounded-full", "bg-accent shadow-[0_0_8px_var(--kp-accent)]");
|
|
21
|
+
}
|
|
22
|
+
if (variant === "solid") {
|
|
23
|
+
return cn("absolute inset-0 -z-0 rounded-[calc(var(--kp-radius-md)-0.25rem)]", "bg-accent shadow-sm");
|
|
24
|
+
}
|
|
25
|
+
if (variant === "glass") {
|
|
26
|
+
return cn("absolute inset-0 -z-0 rounded-[calc(var(--kp-radius-md)-0.2rem)]", "bg-[color-mix(in_oklch,var(--kp-surface-raised)_85%,white)]", "backdrop-blur-sm shadow-[0_1px_2px_oklch(0_0_0/12%),inset_0_1px_0_oklch(1_0_0/60%)]", "ring-1 ring-[color-mix(in_oklch,var(--kp-foreground)_12%,transparent)]");
|
|
27
|
+
}
|
|
28
|
+
return cn("absolute inset-0 -z-0 rounded-[calc(var(--kp-radius-md)-0.2rem)]", "bg-[color-mix(in_oklch,var(--kp-surface-raised)_92%,white)]", "shadow-[0_1px_2px_oklch(0_0_0/10%),0_6px_16px_-10px_oklch(0_0_0/28%),inset_0_1px_0_oklch(1_0_0/70%)]", "ring-1 ring-[color-mix(in_oklch,var(--kp-foreground)_10%,transparent)]");
|
|
29
|
+
}
|
|
30
|
+
export const tabPanelClass = cn("mt-4 text-sm leading-relaxed text-muted-foreground text-pretty outline-none", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultiSelect, MultiSelectItem, TagField, TagFieldItem, } from "./tag-field.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function TagFieldChevronIcon() {
|
|
3
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", className: "size-4", "aria-hidden": true, children: _jsx("path", { d: "M4.5 6.25 8 9.75l3.5-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4
|
+
}
|
|
5
|
+
export function TagFieldRemoveIcon() {
|
|
6
|
+
return (_jsx("svg", { viewBox: "0 0 12 12", className: "size-3.5", "aria-hidden": true, children: _jsx("path", { d: "M3 3l6 6M9 3 3 9", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type SelectedTagsProps = {
|
|
3
|
+
emptyLabel?: ReactNode;
|
|
4
|
+
tagsLabel: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function TagFieldSelectedTags({ emptyLabel, tagsLabel, }: SelectedTagsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button, ComboBoxValue, Tag, TagGroup, TagList, } from "react-aria-components";
|
|
4
|
+
import { tagFieldEmptyClass, tagFieldRemoveClass, tagFieldTagClass, tagFieldTagListClass, } from "./tag-field.styles.js";
|
|
5
|
+
import { TagFieldRemoveIcon } from "./tag-field-icons.js";
|
|
6
|
+
export function TagFieldSelectedTags({ emptyLabel, tagsLabel, }) {
|
|
7
|
+
return (_jsx(ComboBoxValue, { children: ({ state }) => {
|
|
8
|
+
const nodes = state.selectedItems;
|
|
9
|
+
const value = Array.isArray(state.value) ? state.value : [];
|
|
10
|
+
return (_jsx(TagGroup, { "aria-label": tagsLabel, onRemove: (keys) => {
|
|
11
|
+
state.setValue(value.filter((key) => !keys.has(key)));
|
|
12
|
+
}, children: _jsx(TagList, { className: tagFieldTagListClass, items: nodes.map((node) => ({
|
|
13
|
+
id: node.key,
|
|
14
|
+
name: node.textValue,
|
|
15
|
+
})), renderEmptyState: emptyLabel !== undefined
|
|
16
|
+
? () => (_jsx("span", { className: tagFieldEmptyClass, children: emptyLabel }))
|
|
17
|
+
: () => null, children: (item) => (_jsxs(Tag, { id: item.id, textValue: item.name, className: tagFieldTagClass(), children: [_jsx("span", { className: "truncate", children: item.name }), _jsx(Button, { slot: "remove", className: tagFieldRemoveClass(), children: _jsx(TagFieldRemoveIcon, {}) })] })) }) }));
|
|
18
|
+
} }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TagFieldItemProps, TagFieldProps } from "./tag-field.types.js";
|
|
2
|
+
export declare function TagField({ children, className, description, emptyLabel, errorMessage, label, listEmptyLabel, maxSelections, onChange, onInputChange, placeholder, size, tagsLabel, variant, value, defaultValue, ...props }: TagFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function TagFieldItem({ children, id, isDisabled, textValue, }: TagFieldItemProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
/** Alias for MultiSelect naming. */
|
|
5
|
+
export declare const MultiSelect: typeof TagField;
|
|
6
|
+
export declare const MultiSelectItem: typeof TagFieldItem;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { Button, ComboBox as AriaComboBox, FieldError, Input, Label, ListBox, ListBoxItem, Popover, Text, } from "react-aria-components";
|
|
5
|
+
import { fieldDescriptionClass, fieldErrorClass, fieldLabelClass, fieldRootClass, } from "../../styles/field.js";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import { TagFieldChevronIcon } from "./tag-field-icons.js";
|
|
8
|
+
import { fieldSurfaceProps, tagFieldInputClass, tagFieldItemClass, tagFieldListClass, tagFieldListEmptyClass, tagFieldPopoverClass, tagFieldShellClass, tagFieldToggleClass, } from "./tag-field.styles.js";
|
|
9
|
+
import { TagFieldSelectedTags } from "./tag-field-tags.js";
|
|
10
|
+
function asKeyArray(value) {
|
|
11
|
+
if (Array.isArray(value))
|
|
12
|
+
return value;
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
export function TagField({ children, className, description, emptyLabel, errorMessage, label, listEmptyLabel = "No matching options", maxSelections, onChange, onInputChange, placeholder = "Add…", size = "md", tagsLabel = "Selected", variant = "outline", value, defaultValue, ...props }) {
|
|
16
|
+
const controlled = value !== undefined;
|
|
17
|
+
const [uncontrolled, setUncontrolled] = useState(() => asKeyArray(defaultValue));
|
|
18
|
+
const [inputValue, setInputValue] = useState("");
|
|
19
|
+
const selected = controlled ? asKeyArray(value) : uncontrolled;
|
|
20
|
+
const commit = useCallback((next) => {
|
|
21
|
+
const clipped = maxSelections != null ? next.slice(0, maxSelections) : next;
|
|
22
|
+
if (!controlled)
|
|
23
|
+
setUncontrolled(clipped);
|
|
24
|
+
onChange?.(clipped);
|
|
25
|
+
}, [controlled, maxSelections, onChange]);
|
|
26
|
+
const atMax = maxSelections != null && selected.length >= maxSelections;
|
|
27
|
+
function handleInputKeyDown(event) {
|
|
28
|
+
if (event.key !== "Backspace" || inputValue !== "" || selected.length === 0) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
commit(selected.slice(0, -1));
|
|
33
|
+
}
|
|
34
|
+
return (_jsxs(AriaComboBox, { ...props, selectionMode: "multiple", value: selected, onChange: commit, inputValue: inputValue, onInputChange: (next) => {
|
|
35
|
+
setInputValue(next);
|
|
36
|
+
onInputChange?.(next);
|
|
37
|
+
}, allowsEmptyCollection: true, className: cn(fieldRootClass, "max-w-md", className), children: [label ? _jsx(Label, { className: fieldLabelClass, children: label }) : null, _jsxs("div", { ...fieldSurfaceProps(variant), className: tagFieldShellClass(undefined, size, variant), children: [_jsx(TagFieldSelectedTags, { emptyLabel: emptyLabel, tagsLabel: tagsLabel }), _jsx(Input, { placeholder: atMax ? `Maximum ${maxSelections}` : placeholder, className: tagFieldInputClass(size), onKeyDown: handleInputKeyDown }), _jsx(Button, { className: tagFieldToggleClass(), children: _jsx(TagFieldChevronIcon, {}) })] }), _jsx(Popover, { className: tagFieldPopoverClass, "data-kp-surface": true, children: _jsx(ListBox, { className: tagFieldListClass, renderEmptyState: () => (_jsx("div", { className: tagFieldListEmptyClass, children: listEmptyLabel })), children: children }) }), description ? (_jsx(Text, { slot: "description", className: fieldDescriptionClass, children: description })) : null, _jsx(FieldError, { className: fieldErrorClass, children: errorMessage }), _jsx("span", { className: "sr-only", "aria-live": "polite", children: atMax
|
|
38
|
+
? `Maximum of ${maxSelections} selections reached.`
|
|
39
|
+
: `${selected.length} selected.` })] }));
|
|
40
|
+
}
|
|
41
|
+
export function TagFieldItem({ children, id, isDisabled, textValue, }) {
|
|
42
|
+
return (_jsx(ListBoxItem, { id: id, className: tagFieldItemClass, ...(textValue !== undefined ? { textValue } : {}), ...(isDisabled !== undefined ? { isDisabled } : {}), children: children }));
|
|
43
|
+
}
|
|
44
|
+
/** Alias for MultiSelect naming. */
|
|
45
|
+
export const MultiSelect = TagField;
|
|
46
|
+
export const MultiSelectItem = TagFieldItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FieldSize, FieldVariant } from "../../styles/field.js";
|
|
2
|
+
import { fieldSurfaceProps } from "../../styles/field.js";
|
|
3
|
+
export { fieldSurfaceProps };
|
|
4
|
+
export declare function tagFieldShellClass(className?: string, size?: FieldSize, variant?: FieldVariant): string;
|
|
5
|
+
export declare function tagFieldInputClass(size?: FieldSize): string;
|
|
6
|
+
export declare function tagFieldToggleClass(): string;
|
|
7
|
+
export declare function tagFieldTagClass(): string;
|
|
8
|
+
export declare function tagFieldRemoveClass(): string;
|
|
9
|
+
export declare const tagFieldListClass = "outline-none";
|
|
10
|
+
export declare const tagFieldItemClass: string;
|
|
11
|
+
export declare const tagFieldPopoverClass: string;
|
|
12
|
+
export declare const tagFieldTagListClass = "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 outline-none";
|
|
13
|
+
export declare const tagFieldEmptyClass = "px-1 text-xs text-muted-foreground text-pretty";
|
|
14
|
+
export declare const tagFieldListEmptyClass = "px-3 py-2 text-sm text-muted-foreground text-pretty";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { fieldSurfaceProps } from "../../styles/field.js";
|
|
3
|
+
import { menuItemClass, popoverSurfaceClass } from "../../styles/overlays.js";
|
|
4
|
+
export { fieldSurfaceProps };
|
|
5
|
+
const variants = {
|
|
6
|
+
outline: cn("border border-[color-mix(in_oklch,var(--kp-foreground)_16%,transparent)]", "bg-[color-mix(in_oklch,var(--kp-surface)_88%,var(--kp-foreground)_4%)]", "shadow-[var(--kp-shadow-surface),inset_0_1px_0_oklch(1_0_0/35%)]", "focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/30"),
|
|
7
|
+
filled: cn("border border-transparent", "bg-[color-mix(in_oklch,var(--kp-muted)_72%,transparent)]", "shadow-[inset_0_1px_0_oklch(1_0_0/18%)]", "hover:bg-[color-mix(in_oklch,var(--kp-muted)_88%,transparent)]", "focus-within:border-ring focus-within:bg-surface focus-within:ring-2 focus-within:ring-ring/30"),
|
|
8
|
+
flushed: cn("rounded-none border-0 border-b-2 border-solid bg-transparent px-0", "border-b-[color-mix(in_oklch,var(--kp-foreground)_32%,transparent)]", "shadow-none focus-within:border-b-ring focus-within:ring-0", "focus-within:shadow-[0_1px_0_0_color-mix(in_oklch,var(--kp-ring)_55%,transparent)]"),
|
|
9
|
+
glass: cn("border border-[color-mix(in_oklch,var(--kp-foreground)_14%,transparent)]", "bg-[color-mix(in_oklch,var(--kp-surface)_42%,transparent)]", "backdrop-blur-md backdrop-saturate-150", "shadow-[inset_0_1px_0_oklch(1_0_0/42%),inset_0_0_0_1px_oklch(1_0_0/8%),0_8px_24px_-14px_oklch(0_0_0/28%)]", "focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/30"),
|
|
10
|
+
};
|
|
11
|
+
const sizes = {
|
|
12
|
+
sm: "min-h-10 gap-1.5 px-2 py-1.5 text-xs rounded-[var(--kp-radius-sm)]",
|
|
13
|
+
md: "min-h-11 gap-2 px-2.5 py-2 text-sm rounded-[var(--kp-radius-md)]",
|
|
14
|
+
lg: "min-h-12 gap-2 px-3 py-2.5 text-base rounded-[var(--kp-radius-md)]",
|
|
15
|
+
};
|
|
16
|
+
export function tagFieldShellClass(className, size = "md", variant = "outline") {
|
|
17
|
+
return cn("flex w-full flex-wrap items-center text-foreground outline-none", "transition-[border-color,box-shadow,background-color,backdrop-filter]", "duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)]", "invalid:border-danger", variants[variant], variant === "flushed"
|
|
18
|
+
? size === "sm"
|
|
19
|
+
? "min-h-10 gap-1.5 py-1 text-xs"
|
|
20
|
+
: size === "lg"
|
|
21
|
+
? "min-h-12 gap-2 py-2 text-base"
|
|
22
|
+
: "min-h-11 gap-2 py-1.5 text-sm"
|
|
23
|
+
: sizes[size], className);
|
|
24
|
+
}
|
|
25
|
+
export function tagFieldInputClass(size = "md") {
|
|
26
|
+
return cn("min-w-[8ch] flex-1 bg-transparent outline-none placeholder:text-muted-foreground", size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm");
|
|
27
|
+
}
|
|
28
|
+
export function tagFieldToggleClass() {
|
|
29
|
+
return cn("inline-flex min-h-10 min-w-10 shrink-0 items-center justify-center", "rounded-[var(--kp-radius-sm)] text-muted-foreground outline-none", "transition-[transform,color,background-color]", "duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)]", "hover:bg-muted data-[pressed]:scale-[0.96]", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring/40");
|
|
30
|
+
}
|
|
31
|
+
export function tagFieldTagClass() {
|
|
32
|
+
return cn("inline-flex max-w-full items-center gap-0.5", "rounded-[var(--kp-radius-sm)] border pl-2 text-xs font-medium", "border-[color-mix(in_oklch,var(--kp-foreground)_14%,transparent)]", "bg-[color-mix(in_oklch,var(--kp-muted)_70%,transparent)] text-foreground", "outline-none transition-[transform,background-color,border-color]", "duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)]", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring/40", "data-[disabled]:opacity-45");
|
|
33
|
+
}
|
|
34
|
+
export function tagFieldRemoveClass() {
|
|
35
|
+
return cn("inline-flex min-h-10 min-w-10 items-center justify-center", "rounded-[var(--kp-radius-sm)] text-muted-foreground outline-none", "transition-[transform,color,background-color]", "duration-[var(--kp-motion-duration)] ease-[cubic-bezier(0.2,0,0,1)]", "hover:bg-[color-mix(in_oklch,var(--kp-foreground)_8%,transparent)]", "hover:text-foreground data-[pressed]:scale-[0.96]", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring/40");
|
|
36
|
+
}
|
|
37
|
+
export const tagFieldListClass = "outline-none";
|
|
38
|
+
export const tagFieldItemClass = cn(menuItemClass, "data-[selected]:font-medium data-[disabled]:opacity-45");
|
|
39
|
+
export const tagFieldPopoverClass = cn(popoverSurfaceClass, "min-w-[var(--trigger-width)]");
|
|
40
|
+
export const tagFieldTagListClass = "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 outline-none";
|
|
41
|
+
export const tagFieldEmptyClass = "px-1 text-xs text-muted-foreground text-pretty";
|
|
42
|
+
export const tagFieldListEmptyClass = "px-3 py-2 text-sm text-muted-foreground text-pretty";
|