@arolariu/components 0.4.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{changelog.md → CHANGELOG.md} +36 -0
- package/CONTRIBUTING.md +344 -265
- package/DEBUGGING.md +185 -103
- package/EXAMPLES.md +470 -345
- package/{readme.md → README.md} +306 -203
- package/dist/components/ui/accordion.d.ts +157 -5
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +100 -22
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/accordion.module.js +12 -0
- package/dist/components/ui/accordion.module.js.map +1 -0
- package/dist/components/ui/accordion_module.css +72 -0
- package/dist/components/ui/accordion_module.css.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +321 -18
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +145 -52
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert-dialog.module.js +13 -0
- package/dist/components/ui/alert-dialog.module.js.map +1 -0
- package/dist/components/ui/alert-dialog_module.css +89 -0
- package/dist/components/ui/alert-dialog_module.css.map +1 -0
- package/dist/components/ui/alert.d.ts +109 -6
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +12 -21
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert.module.js +11 -0
- package/dist/components/ui/alert.module.js.map +1 -0
- package/dist/components/ui/alert_module.css +59 -0
- package/dist/components/ui/alert_module.css.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +24 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +14 -3
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/aspect-ratio.module.js +7 -0
- package/dist/components/ui/aspect-ratio.module.js.map +1 -0
- package/dist/components/ui/aspect-ratio_module.css +10 -0
- package/dist/components/ui/aspect-ratio_module.css.map +1 -0
- package/dist/components/ui/async-boundary.js +17 -0
- package/dist/components/ui/async-boundary.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +97 -4
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +50 -21
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar.module.js +9 -0
- package/dist/components/ui/avatar.module.js.map +1 -0
- package/dist/components/ui/avatar_module.css +35 -0
- package/dist/components/ui/avatar_module.css.map +1 -0
- package/dist/components/ui/background-beams.d.ts +21 -3
- package/dist/components/ui/background-beams.d.ts.map +1 -1
- package/dist/components/ui/background-beams.js +22 -11
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/background-beams.module.js +8 -0
- package/dist/components/ui/background-beams.module.js.map +1 -0
- package/dist/components/ui/background-beams_module.css +22 -0
- package/dist/components/ui/background-beams_module.css.map +1 -0
- package/dist/components/ui/badge.d.ts +79 -6
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +19 -23
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge.module.js +11 -0
- package/dist/components/ui/badge.module.js.map +1 -0
- package/dist/components/ui/badge_module.css +63 -0
- package/dist/components/ui/badge_module.css.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +158 -13
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +39 -30
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb.module.js +14 -0
- package/dist/components/ui/breadcrumb.module.js.map +1 -0
- package/dist/components/ui/breadcrumb_module.css +90 -0
- package/dist/components/ui/breadcrumb_module.css.map +1 -0
- package/dist/components/ui/bubble-background.d.ts +38 -10
- package/dist/components/ui/bubble-background.d.ts.map +1 -1
- package/dist/components/ui/bubble-background.js +33 -35
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/bubble-background.module.js +20 -0
- package/dist/components/ui/bubble-background.module.js.map +1 -0
- package/dist/components/ui/bubble-background_module.css +99 -0
- package/dist/components/ui/bubble-background_module.css.map +1 -0
- package/dist/components/ui/button-group.d.ts +88 -8
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group.js +35 -32
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button-group.module.js +11 -0
- package/dist/components/ui/button-group.module.js.map +1 -0
- package/dist/components/ui/button-group_module.css +79 -0
- package/dist/components/ui/button-group_module.css.map +1 -0
- package/dist/components/ui/button.d.ts +82 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +69 -34
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button.module.js +17 -0
- package/dist/components/ui/button.module.js.map +1 -0
- package/dist/components/ui/button_module.css +137 -0
- package/dist/components/ui/button_module.css.map +1 -0
- package/dist/components/ui/calendar.d.ts +39 -5
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +72 -61
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/calendar.module.js +35 -0
- package/dist/components/ui/calendar.module.js.map +1 -0
- package/dist/components/ui/calendar_module.css +245 -0
- package/dist/components/ui/calendar_module.css.map +1 -0
- package/dist/components/ui/card-skeleton.js +41 -0
- package/dist/components/ui/card-skeleton.js.map +1 -0
- package/dist/components/ui/card-skeleton.module.js +15 -0
- package/dist/components/ui/card-skeleton.module.js.map +1 -0
- package/dist/components/ui/card-skeleton_module.css +54 -0
- package/dist/components/ui/card-skeleton_module.css.map +1 -0
- package/dist/components/ui/card.d.ts +162 -7
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +13 -13
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card.module.js +13 -0
- package/dist/components/ui/card.module.js.map +1 -0
- package/dist/components/ui/card_module.css +43 -0
- package/dist/components/ui/card_module.css.map +1 -0
- package/dist/components/ui/carousel.d.ts +127 -3
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +63 -36
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/carousel.module.js +17 -0
- package/dist/components/ui/carousel.module.js.map +1 -0
- package/dist/components/ui/carousel_module.css +82 -0
- package/dist/components/ui/carousel_module.css.map +1 -0
- package/dist/components/ui/chart.d.ts +323 -13
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +158 -53
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/chart.module.js +27 -0
- package/dist/components/ui/chart.module.js.map +1 -0
- package/dist/components/ui/chart_module.css +159 -0
- package/dist/components/ui/chart_module.css.map +1 -0
- package/dist/components/ui/checkbox-group.d.ts +31 -0
- package/dist/components/ui/checkbox-group.d.ts.map +1 -0
- package/dist/components/ui/checkbox-group.js +25 -0
- package/dist/components/ui/checkbox-group.js.map +1 -0
- package/dist/components/ui/checkbox-group.module.js +7 -0
- package/dist/components/ui/checkbox-group.module.js.map +1 -0
- package/dist/components/ui/checkbox-group_module.css +11 -0
- package/dist/components/ui/checkbox-group_module.css.map +1 -0
- package/dist/components/ui/checkbox.d.ts +33 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +37 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox.module.js +8 -0
- package/dist/components/ui/checkbox.module.js.map +1 -0
- package/dist/components/ui/checkbox_module.css +45 -0
- package/dist/components/ui/checkbox_module.css.map +1 -0
- package/dist/components/ui/collapsible.d.ts +87 -3
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +46 -32
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/collapsible.module.js +8 -0
- package/dist/components/ui/collapsible.module.js.map +1 -0
- package/dist/components/ui/collapsible_module.css +26 -0
- package/dist/components/ui/collapsible_module.css.map +1 -0
- package/dist/components/ui/command.d.ts +284 -51
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +391 -50
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/command.module.js +20 -0
- package/dist/components/ui/command.module.js.map +1 -0
- package/dist/components/ui/command_module.css +194 -0
- package/dist/components/ui/command_module.css.map +1 -0
- package/dist/components/ui/context-menu.d.ts +414 -21
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +190 -68
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/context-menu.module.js +19 -0
- package/dist/components/ui/context-menu.module.js.map +1 -0
- package/dist/components/ui/context-menu_module.css +114 -0
- package/dist/components/ui/context-menu_module.css.map +1 -0
- package/dist/components/ui/copy-button.d.ts +41 -0
- package/dist/components/ui/copy-button.d.ts.map +1 -0
- package/dist/components/ui/copy-button.js +51 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/copy-button.module.js +8 -0
- package/dist/components/ui/copy-button.module.js.map +1 -0
- package/dist/components/ui/copy-button_module.css +37 -0
- package/dist/components/ui/copy-button_module.css.map +1 -0
- package/dist/components/ui/counting-number.d.ts +28 -2
- package/dist/components/ui/counting-number.d.ts.map +1 -1
- package/dist/components/ui/counting-number.js +31 -27
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/counting-number.module.js +7 -0
- package/dist/components/ui/counting-number.module.js.map +1 -0
- package/dist/components/ui/counting-number_module.css +7 -0
- package/dist/components/ui/counting-number_module.css.map +1 -0
- package/dist/components/ui/dialog.d.ts +287 -17
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +129 -52
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dialog.module.js +13 -0
- package/dist/components/ui/dialog.module.js.map +1 -0
- package/dist/components/ui/dialog_module.css +114 -0
- package/dist/components/ui/dialog_module.css.map +1 -0
- package/dist/components/ui/dot-background.d.ts +25 -35
- package/dist/components/ui/dot-background.d.ts.map +1 -1
- package/dist/components/ui/dot-background.js +31 -22
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/dot-background.module.js +8 -0
- package/dist/components/ui/dot-background.module.js.map +1 -0
- package/dist/components/ui/dot-background_module.css +15 -0
- package/dist/components/ui/dot-background_module.css.map +1 -0
- package/dist/components/ui/drawer.d.ts +287 -18
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +117 -40
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/drawer.module.js +14 -0
- package/dist/components/ui/drawer.module.js.map +1 -0
- package/dist/components/ui/drawer_module.css +86 -0
- package/dist/components/ui/drawer_module.css.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +414 -21
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +189 -68
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu.module.js +19 -0
- package/dist/components/ui/dropdown-menu.module.js.map +1 -0
- package/dist/components/ui/dropdown-menu_module.css +114 -0
- package/dist/components/ui/dropdown-menu_module.css.map +1 -0
- package/dist/components/ui/dropdrawer.d.ts +313 -17
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +423 -159
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/dropdrawer.module.js +43 -0
- package/dist/components/ui/dropdrawer.module.js.map +1 -0
- package/dist/components/ui/dropdrawer_module.css +307 -0
- package/dist/components/ui/dropdrawer_module.css.map +1 -0
- package/dist/components/ui/empty.d.ts +129 -10
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +32 -47
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/empty.module.js +13 -0
- package/dist/components/ui/empty.module.js.map +1 -0
- package/dist/components/ui/empty_module.css +85 -0
- package/dist/components/ui/empty_module.css.map +1 -0
- package/dist/components/ui/error-boundary.js +61 -0
- package/dist/components/ui/error-boundary.js.map +1 -0
- package/dist/components/ui/error-boundary.module.js +10 -0
- package/dist/components/ui/error-boundary.module.js.map +1 -0
- package/dist/components/ui/error-boundary_module.css +41 -0
- package/dist/components/ui/error-boundary_module.css.map +1 -0
- package/dist/components/ui/field.d.ts +225 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +76 -86
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/field.module.js +24 -0
- package/dist/components/ui/field.module.js.map +1 -0
- package/dist/components/ui/field_module.css +185 -0
- package/dist/components/ui/field_module.css.map +1 -0
- package/dist/components/ui/fireworks-background.d.ts +27 -3
- package/dist/components/ui/fireworks-background.d.ts.map +1 -1
- package/dist/components/ui/fireworks-background.js +36 -35
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/fireworks-background.module.js +8 -0
- package/dist/components/ui/fireworks-background.module.js.map +1 -0
- package/dist/components/ui/fireworks-background_module.css +17 -0
- package/dist/components/ui/fireworks-background_module.css.map +1 -0
- package/dist/components/ui/flip-button.d.ts +27 -3
- package/dist/components/ui/flip-button.d.ts.map +1 -1
- package/dist/components/ui/flip-button.js +27 -17
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/flip-button.module.js +11 -0
- package/dist/components/ui/flip-button.module.js.map +1 -0
- package/dist/components/ui/flip-button_module.css +47 -0
- package/dist/components/ui/flip-button_module.css.map +1 -0
- package/dist/components/ui/focus-scope.js +70 -0
- package/dist/components/ui/focus-scope.js.map +1 -0
- package/dist/components/ui/focus-scope.module.js +7 -0
- package/dist/components/ui/focus-scope.module.js.map +1 -0
- package/dist/components/ui/focus-scope_module.css +6 -0
- package/dist/components/ui/focus-scope_module.css.map +1 -0
- package/dist/components/ui/form-skeleton.js +32 -0
- package/dist/components/ui/form-skeleton.js.map +1 -0
- package/dist/components/ui/form-skeleton.module.js +11 -0
- package/dist/components/ui/form-skeleton.module.js.map +1 -0
- package/dist/components/ui/form-skeleton_module.css +30 -0
- package/dist/components/ui/form-skeleton_module.css.map +1 -0
- package/dist/components/ui/form.d.ts +143 -13
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +55 -21
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/form.module.js +10 -0
- package/dist/components/ui/form.module.js.map +1 -0
- package/dist/components/ui/form_module.css +22 -0
- package/dist/components/ui/form_module.css.map +1 -0
- package/dist/components/ui/gradient-background.d.ts +21 -3
- package/dist/components/ui/gradient-background.d.ts.map +1 -1
- package/dist/components/ui/gradient-background.js +8 -4
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-background.module.js +7 -0
- package/dist/components/ui/gradient-background.module.js.map +1 -0
- package/dist/components/ui/gradient-background_module.css +9 -0
- package/dist/components/ui/gradient-background_module.css.map +1 -0
- package/dist/components/ui/gradient-text.d.ts +23 -2
- package/dist/components/ui/gradient-text.d.ts.map +1 -1
- package/dist/components/ui/gradient-text.js +8 -6
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/gradient-text.module.js +9 -0
- package/dist/components/ui/gradient-text.module.js.map +1 -0
- package/dist/components/ui/gradient-text_module.css +24 -0
- package/dist/components/ui/gradient-text_module.css.map +1 -0
- package/dist/components/ui/highlight-text.d.ts +24 -2
- package/dist/components/ui/highlight-text.d.ts.map +1 -1
- package/dist/components/ui/highlight-text.js +7 -10
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/highlight-text.module.js +7 -0
- package/dist/components/ui/highlight-text.module.js.map +1 -0
- package/dist/components/ui/highlight-text_module.css +16 -0
- package/dist/components/ui/highlight-text_module.css.map +1 -0
- package/dist/components/ui/hole-background.d.ts +23 -2
- package/dist/components/ui/hole-background.d.ts.map +1 -1
- package/dist/components/ui/hole-background.js +155 -118
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hole-background.module.js +10 -0
- package/dist/components/ui/hole-background.module.js.map +1 -0
- package/dist/components/ui/hole-background_module.css +85 -0
- package/dist/components/ui/hole-background_module.css.map +1 -0
- package/dist/components/ui/hover-card.d.ts +85 -4
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +52 -10
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/hover-card.module.js +8 -0
- package/dist/components/ui/hover-card.module.js.map +1 -0
- package/dist/components/ui/hover-card_module.css +23 -0
- package/dist/components/ui/hover-card_module.css.map +1 -0
- package/dist/components/ui/input-group.d.ts +132 -13
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +62 -66
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-group.module.js +20 -0
- package/dist/components/ui/input-group.module.js.map +1 -0
- package/dist/components/ui/input-group_module.css +150 -0
- package/dist/components/ui/input-group_module.css.map +1 -0
- package/dist/components/ui/input-otp.d.ts +110 -30
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +24 -15
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input-otp.module.js +17 -0
- package/dist/components/ui/input-otp.module.js.map +1 -0
- package/dist/components/ui/input-otp_module.css +89 -0
- package/dist/components/ui/input-otp_module.css.map +1 -0
- package/dist/components/ui/input.d.ts +31 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +21 -8
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input.module.js +7 -0
- package/dist/components/ui/input.module.js.map +1 -0
- package/dist/components/ui/input_module.css +40 -0
- package/dist/components/ui/input_module.css.map +1 -0
- package/dist/components/ui/item.d.ts +221 -19
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/item.js +66 -90
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/item.module.js +22 -0
- package/dist/components/ui/item.module.js.map +1 -0
- package/dist/components/ui/item_module.css +143 -0
- package/dist/components/ui/item_module.css.map +1 -0
- package/dist/components/ui/kbd.d.ts +43 -2
- package/dist/components/ui/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd.js +12 -12
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/kbd.module.js +8 -0
- package/dist/components/ui/kbd.module.js.map +1 -0
- package/dist/components/ui/kbd_module.css +35 -0
- package/dist/components/ui/kbd_module.css.map +1 -0
- package/dist/components/ui/label.d.ts +30 -3
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +7 -8
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label.module.js +7 -0
- package/dist/components/ui/label.module.js.map +1 -0
- package/dist/components/ui/label_module.css +17 -0
- package/dist/components/ui/label_module.css.map +1 -0
- package/dist/components/ui/list-skeleton.js +35 -0
- package/dist/components/ui/list-skeleton.js.map +1 -0
- package/dist/components/ui/list-skeleton.module.js +12 -0
- package/dist/components/ui/list-skeleton.module.js.map +1 -0
- package/dist/components/ui/list-skeleton_module.css +39 -0
- package/dist/components/ui/list-skeleton_module.css.map +1 -0
- package/dist/components/ui/loading-overlay.js +21 -0
- package/dist/components/ui/loading-overlay.js.map +1 -0
- package/dist/components/ui/loading-overlay.module.js +9 -0
- package/dist/components/ui/loading-overlay.module.js.map +1 -0
- package/dist/components/ui/loading-overlay_module.css +22 -0
- package/dist/components/ui/loading-overlay_module.css.map +1 -0
- package/dist/components/ui/menubar.d.ts +422 -22
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +199 -100
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/menubar.module.js +21 -0
- package/dist/components/ui/menubar.module.js.map +1 -0
- package/dist/components/ui/menubar_module.css +145 -0
- package/dist/components/ui/menubar_module.css.map +1 -0
- package/dist/components/ui/meter.d.ts +101 -0
- package/dist/components/ui/meter.d.ts.map +1 -0
- package/dist/components/ui/meter.js +71 -0
- package/dist/components/ui/meter.js.map +1 -0
- package/dist/components/ui/meter.module.js +10 -0
- package/dist/components/ui/meter.module.js.map +1 -0
- package/dist/components/ui/meter_module.css +31 -0
- package/dist/components/ui/meter_module.css.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +242 -11
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +135 -49
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/navigation-menu.module.js +18 -0
- package/dist/components/ui/navigation-menu.module.js.map +1 -0
- package/dist/components/ui/navigation-menu_module.css +112 -0
- package/dist/components/ui/navigation-menu_module.css.map +1 -0
- package/dist/components/ui/number-field.d.ts +144 -0
- package/dist/components/ui/number-field.d.ts.map +1 -0
- package/dist/components/ui/number-field.js +111 -0
- package/dist/components/ui/number-field.js.map +1 -0
- package/dist/components/ui/number-field.module.js +15 -0
- package/dist/components/ui/number-field.module.js.map +1 -0
- package/dist/components/ui/number-field_module.css +125 -0
- package/dist/components/ui/number-field_module.css.map +1 -0
- package/dist/components/ui/pagination.d.ts +150 -24
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +41 -38
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/pagination.module.js +14 -0
- package/dist/components/ui/pagination.module.js.map +1 -0
- package/dist/components/ui/pagination_module.css +66 -0
- package/dist/components/ui/pagination_module.css.map +1 -0
- package/dist/components/ui/popover.d.ts +133 -5
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +68 -14
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/popover.module.js +9 -0
- package/dist/components/ui/popover.module.js.map +1 -0
- package/dist/components/ui/popover_module.css +28 -0
- package/dist/components/ui/popover_module.css.map +1 -0
- package/dist/components/ui/progress.d.ts +34 -2
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +22 -14
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/progress.module.js +8 -0
- package/dist/components/ui/progress.module.js.map +1 -0
- package/dist/components/ui/progress_module.css +20 -0
- package/dist/components/ui/progress_module.css.map +1 -0
- package/dist/components/ui/radio-group.d.ts +44 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +38 -16
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/radio-group.module.js +10 -0
- package/dist/components/ui/radio-group.module.js.map +1 -0
- package/dist/components/ui/radio-group_module.css +44 -0
- package/dist/components/ui/radio-group_module.css.map +1 -0
- package/dist/components/ui/resizable.d.ts +79 -6
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +23 -13
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/resizable.module.js +10 -0
- package/dist/components/ui/resizable.module.js.map +1 -0
- package/dist/components/ui/resizable_module.css +70 -0
- package/dist/components/ui/resizable_module.css.map +1 -0
- package/dist/components/ui/ripple-button.d.ts +23 -2
- package/dist/components/ui/ripple-button.d.ts.map +1 -1
- package/dist/components/ui/ripple-button.js +26 -11
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/ripple-button.module.js +9 -0
- package/dist/components/ui/ripple-button.module.js.map +1 -0
- package/dist/components/ui/ripple-button_module.css +38 -0
- package/dist/components/ui/ripple-button_module.css.map +1 -0
- package/dist/components/ui/scratcher.d.ts +25 -2
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +85 -87
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scratcher.module.js +8 -0
- package/dist/components/ui/scratcher.module.js.map +1 -0
- package/dist/components/ui/scratcher_module.css +13 -0
- package/dist/components/ui/scratcher_module.css.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +46 -3
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +44 -19
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/scroll-area.module.js +14 -0
- package/dist/components/ui/scroll-area.module.js.map +1 -0
- package/dist/components/ui/scroll-area_module.css +51 -0
- package/dist/components/ui/scroll-area_module.css.map +1 -0
- package/dist/components/ui/select.d.ts +269 -11
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +152 -67
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/select.module.js +20 -0
- package/dist/components/ui/select.module.js.map +1 -0
- package/dist/components/ui/select_module.css +134 -0
- package/dist/components/ui/select_module.css.map +1 -0
- package/dist/components/ui/separator.d.ts +36 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +20 -10
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator.module.js +9 -0
- package/dist/components/ui/separator.module.js.map +1 -0
- package/dist/components/ui/separator_module.css +17 -0
- package/dist/components/ui/separator_module.css.map +1 -0
- package/dist/components/ui/sheet.d.ts +297 -23
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +121 -63
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sheet.module.js +18 -0
- package/dist/components/ui/sheet.module.js.map +1 -0
- package/dist/components/ui/sheet_module.css +136 -0
- package/dist/components/ui/sheet_module.css.map +1 -0
- package/dist/components/ui/sidebar.d.ts +491 -23
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +214 -143
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sidebar.module.js +50 -0
- package/dist/components/ui/sidebar.module.js.map +1 -0
- package/dist/components/ui/sidebar_module.css +569 -0
- package/dist/components/ui/sidebar_module.css.map +1 -0
- package/dist/components/ui/skeleton.d.ts +30 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +7 -7
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/skeleton.module.js +8 -0
- package/dist/components/ui/skeleton.module.js.map +1 -0
- package/dist/components/ui/skeleton_module.css +18 -0
- package/dist/components/ui/skeleton_module.css.map +1 -0
- package/dist/components/ui/slider.d.ts +48 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +44 -17
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/slider.module.js +11 -0
- package/dist/components/ui/slider.module.js.map +1 -0
- package/dist/components/ui/slider_module.css +55 -0
- package/dist/components/ui/slider_module.css.map +1 -0
- package/dist/components/ui/sonner.d.ts +137 -4
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +450 -18
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/sonner.module.js +34 -0
- package/dist/components/ui/sonner.module.js.map +1 -0
- package/dist/components/ui/sonner_module.css +233 -0
- package/dist/components/ui/sonner_module.css.map +1 -0
- package/dist/components/ui/spinner.d.ts +20 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +29 -11
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/spinner.module.js +10 -0
- package/dist/components/ui/spinner.module.js.map +1 -0
- package/dist/components/ui/spinner_module.css +28 -0
- package/dist/components/ui/spinner_module.css.map +1 -0
- package/dist/components/ui/stepper.d.ts +48 -0
- package/dist/components/ui/stepper.d.ts.map +1 -0
- package/dist/components/ui/stepper.js +41 -0
- package/dist/components/ui/stepper.js.map +1 -0
- package/dist/components/ui/stepper.module.js +12 -0
- package/dist/components/ui/stepper.module.js.map +1 -0
- package/dist/components/ui/stepper_module.css +75 -0
- package/dist/components/ui/stepper_module.css.map +1 -0
- package/dist/components/ui/switch.d.ts +29 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +21 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/switch.module.js +8 -0
- package/dist/components/ui/switch.module.js.map +1 -0
- package/dist/components/ui/switch_module.css +45 -0
- package/dist/components/ui/switch_module.css.map +1 -0
- package/dist/components/ui/table-skeleton.js +34 -0
- package/dist/components/ui/table-skeleton.js.map +1 -0
- package/dist/components/ui/table-skeleton.module.js +11 -0
- package/dist/components/ui/table-skeleton.module.js.map +1 -0
- package/dist/components/ui/table-skeleton_module.css +32 -0
- package/dist/components/ui/table-skeleton_module.css.map +1 -0
- package/dist/components/ui/table.d.ts +170 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +17 -17
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/table.module.js +15 -0
- package/dist/components/ui/table.module.js.map +1 -0
- package/dist/components/ui/table_module.css +71 -0
- package/dist/components/ui/table_module.css.map +1 -0
- package/dist/components/ui/tabs.d.ts +114 -5
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +71 -20
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tabs.module.js +10 -0
- package/dist/components/ui/tabs.module.js.map +1 -0
- package/dist/components/ui/tabs_module.css +89 -0
- package/dist/components/ui/tabs_module.css.map +1 -0
- package/dist/components/ui/textarea.d.ts +24 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/textarea.module.js +7 -0
- package/dist/components/ui/textarea.module.js.map +1 -0
- package/dist/components/ui/textarea_module.css +33 -0
- package/dist/components/ui/textarea_module.css.map +1 -0
- package/dist/components/ui/timeline.d.ts +111 -0
- package/dist/components/ui/timeline.d.ts.map +1 -0
- package/dist/components/ui/timeline.js +34 -0
- package/dist/components/ui/timeline.js.map +1 -0
- package/dist/components/ui/timeline.module.js +10 -0
- package/dist/components/ui/timeline.module.js.map +1 -0
- package/dist/components/ui/timeline_module.css +47 -0
- package/dist/components/ui/timeline_module.css.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +81 -10
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +32 -23
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle-group.module.js +7 -0
- package/dist/components/ui/toggle-group.module.js.map +1 -0
- package/dist/components/ui/toggle-group_module.css +8 -0
- package/dist/components/ui/toggle-group_module.css.map +1 -0
- package/dist/components/ui/toggle.d.ts +60 -11
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +29 -29
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/toggle.module.js +12 -0
- package/dist/components/ui/toggle.module.js.map +1 -0
- package/dist/components/ui/toggle_module.css +62 -0
- package/dist/components/ui/toggle_module.css.map +1 -0
- package/dist/components/ui/toolbar.d.ts +127 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +85 -0
- package/dist/components/ui/toolbar.js.map +1 -0
- package/dist/components/ui/toolbar.module.js +12 -0
- package/dist/components/ui/toolbar.module.js.map +1 -0
- package/dist/components/ui/toolbar_module.css +115 -0
- package/dist/components/ui/toolbar_module.css.map +1 -0
- package/dist/components/ui/tooltip.d.ts +119 -5
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +48 -13
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/tooltip.module.js +9 -0
- package/dist/components/ui/tooltip.module.js.map +1 -0
- package/dist/components/ui/tooltip_module.css +35 -0
- package/dist/components/ui/tooltip_module.css.map +1 -0
- package/dist/components/ui/typewriter.d.ts +48 -13
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +46 -49
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/components/ui/typewriter.module.js +16 -0
- package/dist/components/ui/typewriter.module.js.map +1 -0
- package/dist/components/ui/typewriter_module.css +102 -0
- package/dist/components/ui/typewriter_module.css.map +1 -0
- package/dist/components/ui/visually-hidden.d.ts +38 -0
- package/dist/components/ui/visually-hidden.d.ts.map +1 -0
- package/dist/components/ui/visually-hidden.js +13 -0
- package/dist/components/ui/visually-hidden.js.map +1 -0
- package/dist/components/ui/visually-hidden.module.js +7 -0
- package/dist/components/ui/visually-hidden.module.js.map +1 -0
- package/dist/components/ui/visually-hidden_module.css +14 -0
- package/dist/components/ui/visually-hidden_module.css.map +1 -0
- package/dist/hooks/useAnnounce.js +46 -0
- package/dist/hooks/useAnnounce.js.map +1 -0
- package/dist/hooks/useBreakpoint.d.ts +17 -0
- package/dist/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/hooks/useBreakpoint.js +16 -0
- package/dist/hooks/useBreakpoint.js.map +1 -0
- package/dist/hooks/useColorScheme.d.ts +14 -0
- package/dist/hooks/useColorScheme.d.ts.map +1 -0
- package/dist/hooks/useColorScheme.js +9 -0
- package/dist/hooks/useColorScheme.js.map +1 -0
- package/dist/hooks/useFocusManager.js +51 -0
- package/dist/hooks/useFocusManager.js.map +1 -0
- package/dist/hooks/useFocusVisible.d.ts +50 -0
- package/dist/hooks/useFocusVisible.d.ts.map +1 -0
- package/dist/hooks/useFocusVisible.js +35 -0
- package/dist/hooks/useFocusVisible.js.map +1 -0
- package/dist/hooks/useIsMobile.d.ts +5 -11
- package/dist/hooks/useIsMobile.d.ts.map +1 -1
- package/dist/hooks/useIsMobile.js +2 -13
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useMediaQuery.d.ts +14 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.js +20 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/usePrefersContrast.d.ts +19 -0
- package/dist/hooks/usePrefersContrast.d.ts.map +1 -0
- package/dist/hooks/usePrefersContrast.js +8 -0
- package/dist/hooks/usePrefersContrast.js.map +1 -0
- package/dist/hooks/useReducedMotion.d.ts +19 -0
- package/dist/hooks/useReducedMotion.d.ts.map +1 -0
- package/dist/hooks/useReducedMotion.js +2 -0
- package/dist/index.css +104 -5355
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +40 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -70
- package/dist/lib/color-conversion-utilities.d.ts +82 -0
- package/dist/lib/color-conversion-utilities.d.ts.map +1 -0
- package/dist/lib/color-conversion-utilities.js +94 -0
- package/dist/lib/color-conversion-utilities.js.map +1 -0
- package/dist/lib/utilities.d.ts +5 -4
- package/dist/lib/utilities.d.ts.map +1 -1
- package/dist/lib/utilities.js +1 -2
- package/dist/lib/utilities.js.map +1 -1
- package/dist/motion/Collapse.js +19 -0
- package/dist/motion/Collapse.js.map +1 -0
- package/dist/motion/Collapse.module.js +8 -0
- package/dist/motion/Collapse.module.js.map +1 -0
- package/dist/motion/Collapse_module.css +25 -0
- package/dist/motion/Collapse_module.css.map +1 -0
- package/dist/motion/Presence.js +14 -0
- package/dist/motion/Presence.js.map +1 -0
- package/dist/motion/index.js +5 -0
- package/dist/motion/presets.js +117 -0
- package/dist/motion/presets.js.map +1 -0
- package/dist/motion/tokens.js +41 -0
- package/dist/motion/tokens.js.map +1 -0
- package/package.json +159 -65
- package/src/components/ui/accordion.module.css +70 -0
- package/src/components/ui/accordion.tsx +278 -44
- package/src/components/ui/alert-dialog.module.css +87 -0
- package/src/components/ui/alert-dialog.tsx +474 -99
- package/src/components/ui/alert.module.css +57 -0
- package/src/components/ui/alert.tsx +136 -43
- package/src/components/ui/aspect-ratio.module.css +7 -0
- package/src/components/ui/aspect-ratio.tsx +38 -3
- package/src/components/ui/async-boundary.tsx +56 -0
- package/src/components/ui/avatar.module.css +31 -0
- package/src/components/ui/avatar.tsx +146 -36
- package/src/components/ui/background-beams.module.css +20 -0
- package/src/components/ui/background-beams.tsx +173 -134
- package/src/components/ui/badge.module.css +60 -0
- package/src/components/ui/badge.tsx +100 -32
- package/src/components/ui/breadcrumb.module.css +87 -0
- package/src/components/ui/breadcrumb.tsx +256 -74
- package/src/components/ui/bubble-background.module.css +97 -0
- package/src/components/ui/bubble-background.tsx +92 -52
- package/src/components/ui/button-group.module.css +76 -0
- package/src/components/ui/button-group.tsx +135 -46
- package/src/components/ui/button.module.css +138 -0
- package/src/components/ui/button.tsx +159 -41
- package/src/components/ui/calendar.module.css +250 -0
- package/src/components/ui/calendar.tsx +133 -103
- package/src/components/ui/card-skeleton.module.css +50 -0
- package/src/components/ui/card-skeleton.tsx +69 -0
- package/src/components/ui/card.module.css +41 -0
- package/src/components/ui/card.tsx +175 -22
- package/src/components/ui/carousel.module.css +80 -0
- package/src/components/ui/carousel.tsx +184 -43
- package/src/components/ui/chart.module.css +164 -0
- package/src/components/ui/chart.tsx +444 -102
- package/src/components/ui/checkbox-group.module.css +8 -0
- package/src/components/ui/checkbox-group.tsx +54 -0
- package/src/components/ui/checkbox.module.css +43 -0
- package/src/components/ui/checkbox.tsx +73 -19
- package/src/components/ui/collapsible.module.css +24 -0
- package/src/components/ui/collapsible.tsx +139 -3
- package/src/components/ui/command.module.css +193 -0
- package/src/components/ui/command.tsx +877 -113
- package/src/components/ui/context-menu.module.css +113 -0
- package/src/components/ui/context-menu.tsx +616 -157
- package/src/components/ui/copy-button.module.css +34 -0
- package/src/components/ui/copy-button.tsx +116 -0
- package/src/components/ui/counting-number.module.css +4 -0
- package/src/components/ui/counting-number.tsx +69 -31
- package/src/components/ui/dialog.module.css +113 -0
- package/src/components/ui/dialog.tsx +427 -81
- package/src/components/ui/dot-background.module.css +12 -0
- package/src/components/ui/dot-background.tsx +134 -126
- package/src/components/ui/drawer.module.css +85 -0
- package/src/components/ui/drawer.tsx +408 -80
- package/src/components/ui/dropdown-menu.module.css +113 -0
- package/src/components/ui/dropdown-menu.tsx +616 -159
- package/src/components/ui/dropdrawer.module.css +322 -0
- package/src/components/ui/dropdrawer.tsx +850 -398
- package/src/components/ui/empty.module.css +84 -0
- package/src/components/ui/empty.tsx +176 -52
- package/src/components/ui/error-boundary.module.css +36 -0
- package/src/components/ui/error-boundary.tsx +127 -0
- package/src/components/ui/field.module.css +179 -0
- package/src/components/ui/field.tsx +345 -139
- package/src/components/ui/fireworks-background.module.css +13 -0
- package/src/components/ui/fireworks-background.tsx +89 -51
- package/src/components/ui/flip-button.module.css +44 -0
- package/src/components/ui/flip-button.tsx +59 -28
- package/src/components/ui/focus-scope.module.css +3 -0
- package/src/components/ui/focus-scope.tsx +160 -0
- package/src/components/ui/form-skeleton.module.css +28 -0
- package/src/components/ui/form-skeleton.tsx +62 -0
- package/src/components/ui/form.module.css +20 -0
- package/src/components/ui/form.tsx +244 -33
- package/src/components/ui/gradient-background.module.css +6 -0
- package/src/components/ui/gradient-background.tsx +27 -5
- package/src/components/ui/gradient-text.module.css +23 -0
- package/src/components/ui/gradient-text.tsx +36 -9
- package/src/components/ui/highlight-text.module.css +14 -0
- package/src/components/ui/highlight-text.tsx +37 -15
- package/src/components/ui/hole-background.module.css +84 -0
- package/src/components/ui/hole-background.tsx +290 -162
- package/src/components/ui/hover-card.module.css +21 -0
- package/src/components/ui/hover-card.tsx +142 -21
- package/src/components/ui/input-group.module.css +148 -0
- package/src/components/ui/input-group.tsx +222 -98
- package/src/components/ui/input-otp.module.css +92 -0
- package/src/components/ui/input-otp.tsx +159 -33
- package/src/components/ui/input.module.css +37 -0
- package/src/components/ui/input.tsx +56 -14
- package/src/components/ui/item.module.css +143 -0
- package/src/components/ui/item.tsx +331 -104
- package/src/components/ui/kbd.module.css +31 -0
- package/src/components/ui/kbd.tsx +60 -17
- package/src/components/ui/label.module.css +13 -0
- package/src/components/ui/label.tsx +38 -14
- package/src/components/ui/list-skeleton.module.css +35 -0
- package/src/components/ui/list-skeleton.tsx +70 -0
- package/src/components/ui/loading-overlay.module.css +19 -0
- package/src/components/ui/loading-overlay.tsx +72 -0
- package/src/components/ui/menubar.module.css +144 -0
- package/src/components/ui/menubar.tsx +605 -192
- package/src/components/ui/meter.module.css +32 -0
- package/src/components/ui/meter.tsx +170 -0
- package/src/components/ui/navigation-menu.module.css +110 -0
- package/src/components/ui/navigation-menu.tsx +375 -101
- package/src/components/ui/number-field.module.css +126 -0
- package/src/components/ui/number-field.tsx +254 -0
- package/src/components/ui/pagination.module.css +64 -0
- package/src/components/ui/pagination.tsx +250 -72
- package/src/components/ui/popover.module.css +26 -0
- package/src/components/ui/popover.tsx +207 -25
- package/src/components/ui/progress.module.css +15 -0
- package/src/components/ui/progress.tsx +53 -16
- package/src/components/ui/radio-group.module.css +41 -0
- package/src/components/ui/radio-group.tsx +91 -34
- package/src/components/ui/resizable.module.css +67 -0
- package/src/components/ui/resizable.tsx +106 -26
- package/src/components/ui/ripple-button.module.css +35 -0
- package/src/components/ui/ripple-button.tsx +55 -21
- package/src/components/ui/scratcher.module.css +9 -0
- package/src/components/ui/scratcher.tsx +129 -99
- package/src/components/ui/scroll-area.module.css +47 -0
- package/src/components/ui/scroll-area.tsx +96 -34
- package/src/components/ui/select.module.css +131 -0
- package/src/components/ui/select.tsx +435 -124
- package/src/components/ui/separator.module.css +14 -0
- package/src/components/ui/separator.tsx +59 -18
- package/src/components/ui/sheet.module.css +138 -0
- package/src/components/ui/sheet.tsx +424 -95
- package/src/components/ui/sidebar.module.css +594 -0
- package/src/components/ui/sidebar.tsx +899 -425
- package/src/components/ui/skeleton.module.css +14 -0
- package/src/components/ui/skeleton.tsx +39 -9
- package/src/components/ui/slider.module.css +48 -0
- package/src/components/ui/slider.tsx +89 -16
- package/src/components/ui/sonner.module.css +246 -0
- package/src/components/ui/sonner.tsx +769 -25
- package/src/components/ui/spinner.module.css +25 -0
- package/src/components/ui/spinner.tsx +51 -12
- package/src/components/ui/stepper.module.css +72 -0
- package/src/components/ui/stepper.tsx +95 -0
- package/src/components/ui/switch.module.css +42 -0
- package/src/components/ui/switch.tsx +53 -20
- package/src/components/ui/table-skeleton.module.css +29 -0
- package/src/components/ui/table-skeleton.tsx +79 -0
- package/src/components/ui/table.module.css +66 -0
- package/src/components/ui/table.tsx +235 -61
- package/src/components/ui/tabs.module.css +89 -0
- package/src/components/ui/tabs.tsx +192 -45
- package/src/components/ui/textarea.module.css +30 -0
- package/src/components/ui/textarea.tsx +30 -10
- package/src/components/ui/timeline.module.css +43 -0
- package/src/components/ui/timeline.tsx +153 -0
- package/src/components/ui/toggle-group.module.css +5 -0
- package/src/components/ui/toggle-group.tsx +116 -35
- package/src/components/ui/toggle.module.css +57 -0
- package/src/components/ui/toggle.tsx +89 -33
- package/src/components/ui/toolbar.module.css +112 -0
- package/src/components/ui/toolbar.tsx +210 -0
- package/src/components/ui/tooltip.module.css +39 -0
- package/src/components/ui/tooltip.tsx +181 -24
- package/src/components/ui/typewriter.module.css +101 -0
- package/src/components/ui/typewriter.tsx +130 -128
- package/src/components/ui/visually-hidden.module.css +11 -0
- package/src/components/ui/visually-hidden.tsx +50 -0
- package/src/css-modules.d.ts +9 -0
- package/src/hooks/useAnnounce.tsx +73 -0
- package/src/hooks/useBreakpoint.tsx +41 -0
- package/src/hooks/useColorScheme.tsx +23 -0
- package/src/hooks/useFocusManager.tsx +89 -0
- package/src/hooks/useFocusVisible.tsx +88 -0
- package/src/hooks/useIsMobile.tsx +7 -28
- package/src/hooks/useMediaQuery.tsx +34 -0
- package/src/hooks/usePrefersContrast.tsx +24 -0
- package/src/hooks/useReducedMotion.tsx +20 -0
- package/src/index.css +127 -65
- package/src/index.ts +223 -16
- package/src/lib/color-conversion-utilities.ts +165 -0
- package/src/lib/utilities.ts +7 -6
- package/src/motion/Collapse.module.css +22 -0
- package/src/motion/Collapse.tsx +52 -0
- package/src/motion/Presence.tsx +44 -0
- package/src/motion/index.ts +13 -0
- package/src/motion/presets.ts +77 -0
- package/src/motion/tokens.ts +37 -0
|
@@ -1,76 +1,417 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
|
+
import { Separator } from "@base-ui/react/separator";
|
|
4
5
|
import { Search } from "lucide-react";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { Dialog, DialogContent } from "./dialog.js";
|
|
6
|
+
import { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
7
7
|
import { cn } from "../../lib/utilities.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import command_module from "./command.module.js";
|
|
9
|
+
const CommandContext = /*#__PURE__*/ createContext(null);
|
|
10
|
+
const CommandGroupContext = /*#__PURE__*/ createContext(null);
|
|
11
|
+
function assignRef(ref, value) {
|
|
12
|
+
if ("function" == typeof ref) return void ref(value);
|
|
13
|
+
if (ref) ref.current = value;
|
|
14
|
+
}
|
|
15
|
+
function normalizeCommandValue(value) {
|
|
16
|
+
return value.trim().toLowerCase();
|
|
17
|
+
}
|
|
18
|
+
function defaultCommandFilter(value, search, keywords = []) {
|
|
19
|
+
if (0 === search.length) return 1;
|
|
20
|
+
const normalizedSearch = normalizeCommandValue(search);
|
|
21
|
+
const normalizedValue = normalizeCommandValue([
|
|
22
|
+
value,
|
|
23
|
+
...keywords
|
|
24
|
+
].join(" "));
|
|
25
|
+
return normalizedValue.includes(normalizedSearch) ? 1 : 0;
|
|
26
|
+
}
|
|
27
|
+
function useCommandContext(componentName) {
|
|
28
|
+
const context = useContext(CommandContext);
|
|
29
|
+
if (!context) throw new Error(`${componentName} must be used within Command.`);
|
|
30
|
+
return context;
|
|
31
|
+
}
|
|
32
|
+
const Command = /*#__PURE__*/ forwardRef(({ children, className, defaultValue: _defaultValue, disablePointerSelection = false, filter, label, loop = false, onKeyDown, onValueChange: _onValueChange, shouldFilter = true, value: _value, vimBindings: _vimBindings, ...props }, ref)=>{
|
|
33
|
+
const [activeItemId, setActiveItemId] = useState(null);
|
|
34
|
+
const [search, setSearch] = useState("");
|
|
35
|
+
const itemOrderReference = useRef(0);
|
|
36
|
+
const itemsReference = useRef(new Map());
|
|
37
|
+
const [itemsVersion, setItemsVersion] = useState(0);
|
|
38
|
+
const listId = useId();
|
|
39
|
+
const registerItem = useCallback((item)=>{
|
|
40
|
+
const existingItem = itemsReference.current.get(item.id);
|
|
41
|
+
const nextItem = {
|
|
42
|
+
...item,
|
|
43
|
+
order: existingItem?.order ?? itemOrderReference.current++
|
|
44
|
+
};
|
|
45
|
+
const hasChanged = !existingItem || existingItem.disabled !== nextItem.disabled || existingItem.forceMount !== nextItem.forceMount || existingItem.groupId !== nextItem.groupId || existingItem.keywords.join("\u0000") !== nextItem.keywords.join("\u0000") || existingItem.ref !== nextItem.ref || existingItem.textValue !== nextItem.textValue || existingItem.value !== nextItem.value;
|
|
46
|
+
if (!hasChanged) return;
|
|
47
|
+
itemsReference.current.set(item.id, nextItem);
|
|
48
|
+
setItemsVersion((currentVersion)=>currentVersion + 1);
|
|
49
|
+
}, []);
|
|
50
|
+
const unregisterItem = useCallback((itemId)=>{
|
|
51
|
+
if (!itemsReference.current.delete(itemId)) return;
|
|
52
|
+
setItemsVersion((currentVersion)=>currentVersion + 1);
|
|
53
|
+
}, []);
|
|
54
|
+
const items = useMemo(()=>[
|
|
55
|
+
...itemsReference.current.values()
|
|
56
|
+
].sort((firstItem, secondItem)=>firstItem.order - secondItem.order), [
|
|
57
|
+
itemsVersion
|
|
58
|
+
]);
|
|
59
|
+
const isFiltering = shouldFilter && search.trim().length > 0;
|
|
60
|
+
const isItemVisible = useCallback((itemId)=>{
|
|
61
|
+
const item = itemsReference.current.get(itemId);
|
|
62
|
+
if (!item) return false;
|
|
63
|
+
if (item.forceMount || !shouldFilter || 0 === search.trim().length) return true;
|
|
64
|
+
const itemValue = item.value ?? item.textValue;
|
|
65
|
+
const itemFilter = filter ?? defaultCommandFilter;
|
|
66
|
+
return itemFilter(itemValue, search, item.keywords) > 0;
|
|
67
|
+
}, [
|
|
68
|
+
filter,
|
|
69
|
+
search,
|
|
70
|
+
shouldFilter
|
|
71
|
+
]);
|
|
72
|
+
const visibleItems = useMemo(()=>items.filter((item)=>isItemVisible(item.id)), [
|
|
73
|
+
isItemVisible,
|
|
74
|
+
items
|
|
75
|
+
]);
|
|
76
|
+
const selectableItems = useMemo(()=>visibleItems.filter((item)=>!item.disabled), [
|
|
77
|
+
visibleItems
|
|
78
|
+
]);
|
|
79
|
+
useEffect(()=>{
|
|
80
|
+
if (0 === selectableItems.length) return void setActiveItemId(null);
|
|
81
|
+
if (!activeItemId || !selectableItems.some((item)=>item.id === activeItemId)) setActiveItemId(selectableItems[0].id);
|
|
82
|
+
}, [
|
|
83
|
+
activeItemId,
|
|
84
|
+
selectableItems
|
|
85
|
+
]);
|
|
86
|
+
useEffect(()=>{
|
|
87
|
+
if (!activeItemId) return;
|
|
88
|
+
itemsReference.current.get(activeItemId)?.ref.current?.scrollIntoView({
|
|
89
|
+
block: "nearest"
|
|
90
|
+
});
|
|
91
|
+
}, [
|
|
92
|
+
activeItemId
|
|
93
|
+
]);
|
|
94
|
+
const selectSpecificItem = useCallback((itemId)=>{
|
|
95
|
+
setActiveItemId(itemId);
|
|
96
|
+
}, []);
|
|
97
|
+
const selectNextItem = useCallback(()=>{
|
|
98
|
+
if (0 === selectableItems.length) return;
|
|
99
|
+
const currentIndex = selectableItems.findIndex((item)=>item.id === activeItemId);
|
|
100
|
+
if (-1 === currentIndex) return void setActiveItemId(selectableItems[0].id);
|
|
101
|
+
const nextIndex = currentIndex + 1;
|
|
102
|
+
if (nextIndex >= selectableItems.length) return void setActiveItemId(loop ? selectableItems[0].id : selectableItems[currentIndex].id);
|
|
103
|
+
setActiveItemId(selectableItems[nextIndex].id);
|
|
104
|
+
}, [
|
|
105
|
+
activeItemId,
|
|
106
|
+
loop,
|
|
107
|
+
selectableItems
|
|
108
|
+
]);
|
|
109
|
+
const selectPreviousItem = useCallback(()=>{
|
|
110
|
+
if (0 === selectableItems.length) return;
|
|
111
|
+
const currentIndex = selectableItems.findIndex((item)=>item.id === activeItemId);
|
|
112
|
+
if (-1 === currentIndex) return void setActiveItemId(selectableItems[0].id);
|
|
113
|
+
const previousIndex = currentIndex - 1;
|
|
114
|
+
if (previousIndex < 0) return void setActiveItemId(loop ? selectableItems.at(-1)?.id ?? selectableItems[0].id : selectableItems[currentIndex].id);
|
|
115
|
+
setActiveItemId(selectableItems[previousIndex].id);
|
|
116
|
+
}, [
|
|
117
|
+
activeItemId,
|
|
118
|
+
loop,
|
|
119
|
+
selectableItems
|
|
120
|
+
]);
|
|
121
|
+
const triggerActiveItem = useCallback(()=>{
|
|
122
|
+
if (!activeItemId) return;
|
|
123
|
+
itemsReference.current.get(activeItemId)?.ref.current?.click();
|
|
124
|
+
}, [
|
|
125
|
+
activeItemId
|
|
126
|
+
]);
|
|
127
|
+
const hasVisibleItemsInGroup = useCallback((groupId)=>visibleItems.some((item)=>item.groupId === groupId), [
|
|
128
|
+
visibleItems
|
|
129
|
+
]);
|
|
130
|
+
const getVisibleItemCount = useCallback(()=>visibleItems.length, [
|
|
131
|
+
visibleItems.length
|
|
132
|
+
]);
|
|
133
|
+
const contextValue = useMemo(()=>({
|
|
134
|
+
activeItemId,
|
|
135
|
+
disablePointerSelection,
|
|
136
|
+
getVisibleItemCount,
|
|
137
|
+
hasVisibleItemsInGroup,
|
|
138
|
+
isFiltering,
|
|
139
|
+
isItemVisible,
|
|
140
|
+
listId,
|
|
141
|
+
loop,
|
|
142
|
+
registerItem,
|
|
143
|
+
search,
|
|
144
|
+
setSearch,
|
|
145
|
+
selectNextItem,
|
|
146
|
+
selectPreviousItem,
|
|
147
|
+
selectSpecificItem,
|
|
148
|
+
shouldFilter,
|
|
149
|
+
triggerActiveItem,
|
|
150
|
+
unregisterItem
|
|
151
|
+
}), [
|
|
152
|
+
activeItemId,
|
|
153
|
+
disablePointerSelection,
|
|
154
|
+
getVisibleItemCount,
|
|
155
|
+
hasVisibleItemsInGroup,
|
|
156
|
+
isFiltering,
|
|
157
|
+
isItemVisible,
|
|
158
|
+
listId,
|
|
159
|
+
loop,
|
|
160
|
+
registerItem,
|
|
161
|
+
search,
|
|
162
|
+
setSearch,
|
|
163
|
+
selectNextItem,
|
|
164
|
+
selectPreviousItem,
|
|
165
|
+
selectSpecificItem,
|
|
166
|
+
shouldFilter,
|
|
167
|
+
triggerActiveItem,
|
|
168
|
+
unregisterItem
|
|
169
|
+
]);
|
|
170
|
+
return /*#__PURE__*/ jsx(CommandContext.Provider, {
|
|
171
|
+
value: contextValue,
|
|
172
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
173
|
+
ref: ref,
|
|
174
|
+
"aria-label": label,
|
|
175
|
+
className: cn(command_module.command, className),
|
|
176
|
+
onKeyDown: (event)=>{
|
|
177
|
+
onKeyDown?.(event);
|
|
178
|
+
if (event.defaultPrevented) return;
|
|
179
|
+
switch(event.key){
|
|
180
|
+
case "ArrowDown":
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
selectNextItem();
|
|
183
|
+
break;
|
|
184
|
+
case "ArrowUp":
|
|
185
|
+
event.preventDefault();
|
|
186
|
+
selectPreviousItem();
|
|
187
|
+
break;
|
|
188
|
+
case "Home":
|
|
189
|
+
if (0 === selectableItems.length) return;
|
|
190
|
+
event.preventDefault();
|
|
191
|
+
setActiveItemId(selectableItems[0].id);
|
|
192
|
+
break;
|
|
193
|
+
case "End":
|
|
194
|
+
if (0 === selectableItems.length) return;
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
setActiveItemId(selectableItems.at(-1)?.id ?? selectableItems[0].id);
|
|
197
|
+
break;
|
|
198
|
+
case "Enter":
|
|
199
|
+
if (event.nativeEvent.isComposing) return;
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
triggerActiveItem();
|
|
202
|
+
break;
|
|
203
|
+
default:
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
...props,
|
|
208
|
+
children: children
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
Command.displayName = "Command";
|
|
213
|
+
function CommandDialog({ children, open, onOpenChange, title = "Command menu", ...props }) {
|
|
214
|
+
return /*#__PURE__*/ jsx(Dialog.Root, {
|
|
215
|
+
open: open,
|
|
216
|
+
onOpenChange: onOpenChange,
|
|
15
217
|
...props,
|
|
16
|
-
children: /*#__PURE__*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
218
|
+
children: /*#__PURE__*/ jsxs(Dialog.Portal, {
|
|
219
|
+
children: [
|
|
220
|
+
/*#__PURE__*/ jsx(Dialog.Backdrop, {
|
|
221
|
+
className: command_module.backdrop
|
|
222
|
+
}),
|
|
223
|
+
/*#__PURE__*/ jsxs(Dialog.Popup, {
|
|
224
|
+
className: command_module.dialogPopup,
|
|
225
|
+
children: [
|
|
226
|
+
/*#__PURE__*/ jsx(Dialog.Title, {
|
|
227
|
+
className: command_module.srOnly,
|
|
228
|
+
children: title
|
|
229
|
+
}),
|
|
230
|
+
/*#__PURE__*/ jsx(Command, {
|
|
231
|
+
children: children
|
|
232
|
+
})
|
|
233
|
+
]
|
|
234
|
+
})
|
|
235
|
+
]
|
|
22
236
|
})
|
|
23
237
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
238
|
+
}
|
|
239
|
+
CommandDialog.displayName = "CommandDialog";
|
|
240
|
+
const CommandInput = /*#__PURE__*/ forwardRef(({ className, onChange, onValueChange, value, ...props }, ref)=>{
|
|
241
|
+
const { activeItemId, listId, search, selectSpecificItem, setSearch } = useCommandContext("CommandInput");
|
|
242
|
+
const isControlled = void 0 !== value;
|
|
243
|
+
const inputValue = isControlled ? value : search;
|
|
244
|
+
useEffect(()=>{
|
|
245
|
+
if (!isControlled) return;
|
|
246
|
+
setSearch(value ?? "");
|
|
247
|
+
}, [
|
|
248
|
+
isControlled,
|
|
249
|
+
setSearch,
|
|
250
|
+
value
|
|
251
|
+
]);
|
|
252
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
253
|
+
className: command_module.inputWrapper,
|
|
27
254
|
children: [
|
|
28
255
|
/*#__PURE__*/ jsx(Search, {
|
|
29
|
-
className:
|
|
256
|
+
className: command_module.searchIcon
|
|
30
257
|
}),
|
|
31
|
-
/*#__PURE__*/ jsx(
|
|
258
|
+
/*#__PURE__*/ jsx("input", {
|
|
32
259
|
ref: ref,
|
|
33
|
-
|
|
260
|
+
"aria-activedescendant": activeItemId ?? void 0,
|
|
261
|
+
"aria-autocomplete": "list",
|
|
262
|
+
"aria-controls": listId,
|
|
263
|
+
"aria-expanded": "true",
|
|
264
|
+
className: cn(command_module.input, className),
|
|
265
|
+
onChange: (event)=>{
|
|
266
|
+
onChange?.(event);
|
|
267
|
+
const nextSearchValue = event.currentTarget.value;
|
|
268
|
+
setSearch(nextSearchValue);
|
|
269
|
+
onValueChange?.(nextSearchValue);
|
|
270
|
+
selectSpecificItem(null);
|
|
271
|
+
},
|
|
272
|
+
role: "combobox",
|
|
273
|
+
type: "text",
|
|
274
|
+
value: inputValue,
|
|
34
275
|
...props
|
|
35
276
|
})
|
|
36
277
|
]
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
CommandList.displayName = Command.List.displayName;
|
|
45
|
-
const CommandEmpty = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx(Command.Empty, {
|
|
46
|
-
ref: ref,
|
|
47
|
-
className: "py-6 text-center text-sm",
|
|
48
|
-
...props
|
|
49
|
-
}));
|
|
50
|
-
CommandEmpty.displayName = Command.Empty.displayName;
|
|
51
|
-
const CommandGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Command.Group, {
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
CommandInput.displayName = "CommandInput";
|
|
281
|
+
const CommandList = /*#__PURE__*/ forwardRef(({ className, label, ...props }, ref)=>{
|
|
282
|
+
const { listId } = useCommandContext("CommandList");
|
|
283
|
+
return /*#__PURE__*/ jsx("div", {
|
|
284
|
+
"aria-label": label,
|
|
52
285
|
ref: ref,
|
|
53
|
-
className: cn(
|
|
286
|
+
className: cn(command_module.list, className),
|
|
287
|
+
id: listId,
|
|
288
|
+
role: "listbox",
|
|
54
289
|
...props
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
CommandList.displayName = "CommandList";
|
|
293
|
+
const CommandEmpty = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
294
|
+
const { getVisibleItemCount } = useCommandContext("CommandEmpty");
|
|
295
|
+
if (getVisibleItemCount() > 0) return null;
|
|
296
|
+
return /*#__PURE__*/ jsx("div", {
|
|
58
297
|
ref: ref,
|
|
59
|
-
className: cn(
|
|
298
|
+
className: cn(command_module.empty, className),
|
|
299
|
+
role: "status",
|
|
60
300
|
...props
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
CommandEmpty.displayName = "CommandEmpty";
|
|
304
|
+
const CommandGroup = /*#__PURE__*/ forwardRef(({ children, className, forceMount = false, heading, value: _value, ...props }, ref)=>{
|
|
305
|
+
const groupId = useId();
|
|
306
|
+
const { hasVisibleItemsInGroup, isFiltering } = useCommandContext("CommandGroup");
|
|
307
|
+
if (!forceMount && isFiltering && !hasVisibleItemsInGroup(groupId)) return null;
|
|
308
|
+
return /*#__PURE__*/ jsx(CommandGroupContext.Provider, {
|
|
309
|
+
value: groupId,
|
|
310
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
311
|
+
ref: ref,
|
|
312
|
+
className: cn(command_module.group, className),
|
|
313
|
+
"data-command-group": "",
|
|
314
|
+
...props,
|
|
315
|
+
children: [
|
|
316
|
+
heading ? /*#__PURE__*/ jsx("div", {
|
|
317
|
+
className: command_module.groupHeading,
|
|
318
|
+
children: heading
|
|
319
|
+
}) : null,
|
|
320
|
+
children
|
|
321
|
+
]
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
CommandGroup.displayName = "CommandGroup";
|
|
326
|
+
const CommandSeparator = /*#__PURE__*/ forwardRef(({ alwaysRender = false, className, orientation = "horizontal", ...props }, ref)=>{
|
|
327
|
+
const { isFiltering } = useCommandContext("CommandSeparator");
|
|
328
|
+
if (isFiltering && !alwaysRender) return null;
|
|
329
|
+
return /*#__PURE__*/ jsx(Separator, {
|
|
64
330
|
ref: ref,
|
|
65
|
-
className: cn(
|
|
331
|
+
className: cn(command_module.separator, className),
|
|
332
|
+
orientation: orientation,
|
|
66
333
|
...props
|
|
67
|
-
})
|
|
68
|
-
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
CommandSeparator.displayName = "CommandSeparator";
|
|
337
|
+
const CommandItem = /*#__PURE__*/ forwardRef(({ children, className, disabled = false, forceMount = false, keywords = [], onClick, onMouseEnter, onSelect, value, ...props }, ref)=>{
|
|
338
|
+
const { activeItemId, disablePointerSelection, isFiltering, isItemVisible, registerItem, selectSpecificItem, unregisterItem } = useCommandContext("CommandItem");
|
|
339
|
+
const groupId = useContext(CommandGroupContext);
|
|
340
|
+
const generatedId = useId();
|
|
341
|
+
const itemReference = useRef(null);
|
|
342
|
+
const keywordSignature = useMemo(()=>keywords.join("\u0000"), [
|
|
343
|
+
keywords
|
|
344
|
+
]);
|
|
345
|
+
useLayoutEffect(()=>{
|
|
346
|
+
const textValue = value ?? itemReference.current?.textContent?.trim() ?? "";
|
|
347
|
+
registerItem({
|
|
348
|
+
disabled,
|
|
349
|
+
forceMount,
|
|
350
|
+
groupId,
|
|
351
|
+
id: generatedId,
|
|
352
|
+
keywords,
|
|
353
|
+
ref: itemReference,
|
|
354
|
+
textValue,
|
|
355
|
+
value
|
|
356
|
+
});
|
|
357
|
+
}, [
|
|
358
|
+
children,
|
|
359
|
+
disabled,
|
|
360
|
+
forceMount,
|
|
361
|
+
generatedId,
|
|
362
|
+
groupId,
|
|
363
|
+
keywordSignature,
|
|
364
|
+
keywords,
|
|
365
|
+
registerItem,
|
|
366
|
+
value
|
|
367
|
+
]);
|
|
368
|
+
useEffect(()=>()=>{
|
|
369
|
+
unregisterItem(generatedId);
|
|
370
|
+
}, [
|
|
371
|
+
generatedId,
|
|
372
|
+
unregisterItem
|
|
373
|
+
]);
|
|
374
|
+
const isVisible = forceMount || !isFiltering || isItemVisible(generatedId);
|
|
375
|
+
if (!isVisible) return null;
|
|
376
|
+
const isSelected = activeItemId === generatedId;
|
|
377
|
+
return /*#__PURE__*/ jsx("div", {
|
|
378
|
+
...props,
|
|
379
|
+
ref: (node)=>{
|
|
380
|
+
itemReference.current = node;
|
|
381
|
+
assignRef(ref, node);
|
|
382
|
+
},
|
|
383
|
+
"aria-disabled": disabled || void 0,
|
|
384
|
+
"aria-selected": isSelected,
|
|
385
|
+
className: cn(command_module.item, className),
|
|
386
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
387
|
+
"data-selected": isSelected ? "true" : void 0,
|
|
388
|
+
id: generatedId,
|
|
389
|
+
onClick: (event)=>{
|
|
390
|
+
if (disabled) return void event.preventDefault();
|
|
391
|
+
selectSpecificItem(generatedId);
|
|
392
|
+
onSelect?.(value ?? itemReference.current?.textContent?.trim() ?? "");
|
|
393
|
+
onClick?.(event);
|
|
394
|
+
},
|
|
395
|
+
onFocus: ()=>{
|
|
396
|
+
if (disabled) return;
|
|
397
|
+
selectSpecificItem(generatedId);
|
|
398
|
+
},
|
|
399
|
+
onMouseEnter: (event)=>{
|
|
400
|
+
onMouseEnter?.(event);
|
|
401
|
+
if (disabled || disablePointerSelection) return;
|
|
402
|
+
selectSpecificItem(generatedId);
|
|
403
|
+
},
|
|
404
|
+
role: "option",
|
|
405
|
+
tabIndex: disabled ? -1 : 0,
|
|
406
|
+
children: children
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
CommandItem.displayName = "CommandItem";
|
|
69
410
|
const CommandShortcut = ({ className, ...props })=>/*#__PURE__*/ jsx("span", {
|
|
70
|
-
className: cn(
|
|
411
|
+
className: cn(command_module.shortcut, className),
|
|
71
412
|
...props
|
|
72
413
|
});
|
|
73
414
|
CommandShortcut.displayName = "CommandShortcut";
|
|
74
|
-
export {
|
|
415
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
75
416
|
|
|
76
417
|
//# sourceMappingURL=command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/command.js","sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport type {DialogProps} from \"@radix-ui/react-dialog\";\r\nimport {Command as CommandPrimitive} from \"cmdk\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Dialog, DialogContent} from \"@/components/ui/dialog\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Command = React.forwardRef<React.ComponentRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(\r\n ({className, ...props}, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\r\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nCommand.displayName = CommandPrimitive.displayName;\r\n\r\nconst CommandDialog = ({children, ...props}: DialogProps) => {\r\n return (\r\n <Dialog {...props}>\r\n <DialogContent className='overflow-hidden p-0'>\r\n <Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n );\r\n};\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({className, ...props}, ref) => (\r\n <div\r\n className='flex items-center border-b px-3'\r\n // eslint-disable-next-line react/no-unknown-property -- cmdk specific attribute\r\n cmdk-input-wrapper=''>\r\n <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\r\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n));\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName;\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-x-hidden overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName;\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty\r\n ref={ref}\r\n className='py-6 text-center text-sm'\r\n {...props}\r\n />\r\n));\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\r\n \"overflow-hidden p-1 text-neutral-950 dark:text-neutral-50 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName;\r\n\r\nconst CommandShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["Command","React","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":";;;;;;;AAUA,MAAMA,kBAAU,WAAHA,GAAGC,WACd,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACtB,IAACC,SAAgBA;QACf,KAAKD;QACL,WAAWE,GACT,6HACAJ;QAED,GAAGC,KAAK;;AAIfH,gBAAQ,WAAW,GAAGK,QAAAA,WAA4B;AAElD,MAAME,gBAAgB,CAAC,EAACC,QAAQ,EAAE,GAAGL,OAAmB,GAC/C,WAAP,GACE,IAACM,QAAMA;QAAE,GAAGN,KAAK;kBACf,kBAACO,eAAaA;YAAC,WAAU;sBACvB,kBAACV,iBAAOA;gBAAC,WAAU;0BAChBQ;;;;AAOX,MAAMG,eAAe,WAAfA,GAAeV,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,KAAC;QACC,WAAU;QAEV,sBAAmB;;0BACnB,IAACQ,QAAMA;gBAAC,WAAU;;0BAClB,IAACP,QAAAA,KAAsB;gBACrB,KAAKD;gBACL,WAAWE,GACT,uLACAJ;gBAED,GAAGC,KAAK;;;;AAKfQ,aAAa,WAAW,GAAGN,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMQ,cAAc,WAAdA,GAAcZ,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GAAG,mDAAmDJ;QAChE,GAAGC,KAAK;;AAIbU,YAAY,WAAW,GAAGR,QAAAA,IAAAA,CAAAA,WAAiC;AAE3D,MAAMS,eAAe,WAAfA,GAAeb,WAGnB,CAACE,OAAOC,MAAAA,WAAAA,GACR,IAACC,QAAAA,KAAsB;QACrB,KAAKD;QACL,WAAU;QACT,GAAGD,KAAK;;AAIbW,aAAa,WAAW,GAAGT,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMU,eAAe,WAAfA,GAAed,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,KAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,0RACAJ;QAED,GAAGC,KAAK;;AAIbY,aAAa,WAAW,GAAGV,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMW,mBAAmB,WAAnBA,GAAmBf,WAGvB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,SAA0B;QACzB,KAAKD;QACL,WAAWE,GAAG,iDAAiDJ;QAC9D,GAAGC,KAAK;;AAGba,iBAAiB,WAAW,GAAGX,QAAAA,SAAAA,CAAAA,WAAsC;AAErE,MAAMY,cAAc,WAAdA,GAAchB,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GACT,6YACAJ;QAED,GAAGC,KAAK;;AAIbc,YAAY,WAAW,GAAGZ,QAAAA,IAAAA,CAAAA,WAAiC;AAE3D,MAAMa,kBAAkB,CAAC,EAAChB,SAAS,EAAE,GAAGC,OAA6C,GAC5E,WAAP,GACE,IAAC;QACC,WAAWG,GAAG,0EAA0EJ;QACvF,GAAGC,KAAK;;AAIfe,gBAAgB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/command.js","sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\r\nimport {Separator as BaseSeparator} from \"@base-ui/react/separator\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./command.module.css\";\r\n\r\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\r\n\r\ninterface CommandProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Command palette content.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible label announced for the command region.\r\n * @default undefined\r\n */\r\n label?: string;\r\n /**\r\n * Whether items should be filtered automatically as the search value changes.\r\n * @default true\r\n */\r\n shouldFilter?: boolean;\r\n /**\r\n * Custom scoring function used to determine whether an item matches the current search value.\r\n * @default undefined\r\n */\r\n filter?: CommandFilter;\r\n /**\r\n * Deprecated uncontrolled search value placeholder retained for API compatibility.\r\n * @default undefined\r\n */\r\n defaultValue?: string;\r\n /**\r\n * Deprecated controlled search value placeholder retained for API compatibility.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Deprecated change callback retained for API compatibility.\r\n * @default undefined\r\n */\r\n onValueChange?: (value: string) => void;\r\n /**\r\n * Whether keyboard navigation should wrap from the last item to the first.\r\n * @default false\r\n */\r\n loop?: boolean;\r\n /**\r\n * Whether pointer hover should avoid changing the active item.\r\n * @default false\r\n */\r\n disablePointerSelection?: boolean;\r\n /**\r\n * Deprecated Vim keybinding toggle retained for API compatibility.\r\n * @default undefined\r\n */\r\n vimBindings?: boolean;\r\n}\r\n\r\ninterface CommandDialogProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseDialog.Root>, \"children\"> {\r\n /**\r\n * Command palette content rendered inside the dialog popup.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible dialog title announced to assistive technologies.\r\n * @default \"Command menu\"\r\n */\r\n title?: React.ReactNode;\r\n}\r\n\r\ninterface CommandInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"type\" | \"value\"> {\r\n /**\r\n * Controlled search value.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Native input change handler invoked before the command-specific callback.\r\n * @default undefined\r\n */\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n /**\r\n * Callback fired when the command search value changes.\r\n * @default undefined\r\n */\r\n onValueChange?: (search: string) => void;\r\n}\r\n\r\ninterface CommandListProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Command items and groups.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible label for the listbox container.\r\n * @default undefined\r\n */\r\n label?: string;\r\n}\r\n\r\ninterface CommandGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"value\"> {\r\n /**\r\n * Group contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Optional visual heading displayed above the group items.\r\n * @default undefined\r\n */\r\n heading?: React.ReactNode;\r\n /**\r\n * Optional stable value retained for API compatibility.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Whether the group should remain rendered even when it has no visible items.\r\n * @default false\r\n */\r\n forceMount?: boolean;\r\n}\r\n\r\ninterface CommandSeparatorProps extends React.ComponentPropsWithoutRef<typeof BaseSeparator> {\r\n /**\r\n * Whether the separator should remain visible while filtering is active.\r\n * @default false\r\n */\r\n alwaysRender?: boolean;\r\n}\r\n\r\ninterface CommandItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\r\n /**\r\n * Item contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Whether the item is disabled and should be skipped by selection logic.\r\n * @default false\r\n */\r\n disabled?: boolean;\r\n /**\r\n * Callback invoked when the item is selected.\r\n * @default undefined\r\n */\r\n onSelect?: (value: string) => void;\r\n /**\r\n * Optional value used for filtering and selection callbacks.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Additional search keywords included in the filter match set.\r\n * @default []\r\n */\r\n keywords?: string[];\r\n /**\r\n * Whether the item should remain rendered even when filtered out.\r\n * @default false\r\n */\r\n forceMount?: boolean;\r\n}\r\n\r\ninterface CommandRegisteredItem {\r\n disabled: boolean;\r\n forceMount: boolean;\r\n groupId: string | null;\r\n id: string;\r\n keywords: string[];\r\n order: number;\r\n ref: React.RefObject<HTMLDivElement | null>;\r\n textValue: string;\r\n value?: string;\r\n}\r\n\r\ninterface CommandContextValue {\r\n activeItemId: string | null;\r\n disablePointerSelection: boolean;\r\n getVisibleItemCount: () => number;\r\n hasVisibleItemsInGroup: (groupId: string) => boolean;\r\n isFiltering: boolean;\r\n isItemVisible: (itemId: string) => boolean;\r\n listId: string;\r\n loop: boolean;\r\n registerItem: (item: Omit<CommandRegisteredItem, \"order\">) => void;\r\n search: string;\r\n setSearch: (value: string) => void;\r\n selectNextItem: () => void;\r\n selectPreviousItem: () => void;\r\n selectSpecificItem: (itemId: string | null) => void;\r\n shouldFilter: boolean;\r\n triggerActiveItem: () => void;\r\n unregisterItem: (itemId: string) => void;\r\n}\r\n\r\nconst CommandContext = React.createContext<CommandContextValue | null>(null);\r\nconst CommandGroupContext = React.createContext<string | null>(null);\r\n\r\nfunction assignRef<TValue>(ref: React.ForwardedRef<TValue>, value: TValue): void {\r\n if (typeof ref === \"function\") {\r\n ref(value);\r\n return;\r\n }\r\n\r\n if (ref) {\r\n ref.current = value;\r\n }\r\n}\r\n\r\nfunction normalizeCommandValue(value: string): string {\r\n return value.trim().toLowerCase();\r\n}\r\n\r\nfunction defaultCommandFilter(value: string, search: string, keywords: string[] = []): number {\r\n if (search.length === 0) {\r\n return 1;\r\n }\r\n\r\n const normalizedSearch = normalizeCommandValue(search);\r\n const normalizedValue = normalizeCommandValue([value, ...keywords].join(\" \"));\r\n\r\n return normalizedValue.includes(normalizedSearch) ? 1 : 0;\r\n}\r\n\r\nfunction useCommandContext(componentName: string): CommandContextValue {\r\n const context = React.useContext(CommandContext);\r\n\r\n if (!context) {\r\n throw new Error(`${componentName} must be used within Command.`);\r\n }\r\n\r\n return context;\r\n}\r\n\r\n/**\r\n * Provides a lightweight, filterable command surface without depending on cmdk.\r\n *\r\n * @remarks\r\n * This wrapper preserves the existing compound-component API while replacing the\r\n * underlying implementation with a small context-driven registry. It supports\r\n * text filtering, arrow-key navigation, Enter-to-select, and pointer hover\r\n * selection for common command palette use cases.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Command label='Quick actions'>\r\n * <CommandInput placeholder='Search actions...' />\r\n * <CommandList>\r\n * <CommandItem onSelect={() => console.log(\"Open\")}>Open</CommandItem>\r\n * </CommandList>\r\n * </Command>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog Docs}\r\n */\r\nconst Command = React.forwardRef<HTMLDivElement, CommandProps>(\r\n (\r\n {\r\n children,\r\n className,\r\n defaultValue: _defaultValue,\r\n disablePointerSelection = false,\r\n filter,\r\n label,\r\n loop = false,\r\n onKeyDown,\r\n onValueChange: _onValueChange,\r\n shouldFilter = true,\r\n value: _value,\r\n vimBindings: _vimBindings,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const [activeItemId, setActiveItemId] = React.useState<string | null>(null);\r\n const [search, setSearch] = React.useState(\"\");\r\n const itemOrderReference = React.useRef(0);\r\n const itemsReference = React.useRef(new Map<string, CommandRegisteredItem>());\r\n const [itemsVersion, setItemsVersion] = React.useState(0);\r\n const listId = React.useId();\r\n\r\n const registerItem = React.useCallback((item: Omit<CommandRegisteredItem, \"order\">): void => {\r\n const existingItem = itemsReference.current.get(item.id);\r\n const nextItem: CommandRegisteredItem = {\r\n ...item,\r\n order: existingItem?.order ?? itemOrderReference.current++,\r\n };\r\n\r\n const hasChanged =\r\n !existingItem\r\n || existingItem.disabled !== nextItem.disabled\r\n || existingItem.forceMount !== nextItem.forceMount\r\n || existingItem.groupId !== nextItem.groupId\r\n || existingItem.keywords.join(\"\\u0000\") !== nextItem.keywords.join(\"\\u0000\")\r\n || existingItem.ref !== nextItem.ref\r\n || existingItem.textValue !== nextItem.textValue\r\n || existingItem.value !== nextItem.value;\r\n\r\n if (!hasChanged) {\r\n return;\r\n }\r\n\r\n itemsReference.current.set(item.id, nextItem);\r\n setItemsVersion((currentVersion) => currentVersion + 1);\r\n }, []);\r\n\r\n const unregisterItem = React.useCallback((itemId: string): void => {\r\n if (!itemsReference.current.delete(itemId)) {\r\n return;\r\n }\r\n\r\n setItemsVersion((currentVersion) => currentVersion + 1);\r\n }, []);\r\n\r\n const items = React.useMemo(() => {\r\n return [...itemsReference.current.values()].sort((firstItem, secondItem) => firstItem.order - secondItem.order);\r\n }, [itemsVersion]);\r\n\r\n const isFiltering = shouldFilter && search.trim().length > 0;\r\n\r\n const isItemVisible = React.useCallback(\r\n (itemId: string): boolean => {\r\n const item = itemsReference.current.get(itemId);\r\n\r\n if (!item) {\r\n return false;\r\n }\r\n\r\n if (item.forceMount || !shouldFilter || search.trim().length === 0) {\r\n return true;\r\n }\r\n\r\n const itemValue = item.value ?? item.textValue;\r\n const itemFilter = filter ?? defaultCommandFilter;\r\n\r\n return itemFilter(itemValue, search, item.keywords) > 0;\r\n },\r\n [filter, search, shouldFilter],\r\n );\r\n\r\n const visibleItems = React.useMemo(() => items.filter((item) => isItemVisible(item.id)), [isItemVisible, items]);\r\n\r\n const selectableItems = React.useMemo(() => visibleItems.filter((item) => !item.disabled), [visibleItems]);\r\n\r\n React.useEffect(() => {\r\n if (selectableItems.length === 0) {\r\n setActiveItemId(null);\r\n return;\r\n }\r\n\r\n if (!activeItemId || !selectableItems.some((item) => item.id === activeItemId)) {\r\n setActiveItemId(selectableItems[0].id);\r\n }\r\n }, [activeItemId, selectableItems]);\r\n\r\n React.useEffect(() => {\r\n if (!activeItemId) {\r\n return;\r\n }\r\n\r\n itemsReference.current.get(activeItemId)?.ref.current?.scrollIntoView({\r\n block: \"nearest\",\r\n });\r\n }, [activeItemId]);\r\n\r\n const selectSpecificItem = React.useCallback((itemId: string | null): void => {\r\n setActiveItemId(itemId);\r\n }, []);\r\n\r\n const selectNextItem = React.useCallback((): void => {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n const currentIndex = selectableItems.findIndex((item) => item.id === activeItemId);\r\n\r\n if (currentIndex === -1) {\r\n setActiveItemId(selectableItems[0].id);\r\n return;\r\n }\r\n\r\n const nextIndex = currentIndex + 1;\r\n\r\n if (nextIndex >= selectableItems.length) {\r\n setActiveItemId(loop ? selectableItems[0].id : selectableItems[currentIndex].id);\r\n return;\r\n }\r\n\r\n setActiveItemId(selectableItems[nextIndex].id);\r\n }, [activeItemId, loop, selectableItems]);\r\n\r\n const selectPreviousItem = React.useCallback((): void => {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n const currentIndex = selectableItems.findIndex((item) => item.id === activeItemId);\r\n\r\n if (currentIndex === -1) {\r\n setActiveItemId(selectableItems[0].id);\r\n return;\r\n }\r\n\r\n const previousIndex = currentIndex - 1;\r\n\r\n if (previousIndex < 0) {\r\n setActiveItemId(loop ? (selectableItems.at(-1)?.id ?? selectableItems[0].id) : selectableItems[currentIndex].id);\r\n return;\r\n }\r\n\r\n setActiveItemId(selectableItems[previousIndex].id);\r\n }, [activeItemId, loop, selectableItems]);\r\n\r\n const triggerActiveItem = React.useCallback((): void => {\r\n if (!activeItemId) {\r\n return;\r\n }\r\n\r\n itemsReference.current.get(activeItemId)?.ref.current?.click();\r\n }, [activeItemId]);\r\n\r\n const hasVisibleItemsInGroup = React.useCallback(\r\n (groupId: string): boolean => visibleItems.some((item) => item.groupId === groupId),\r\n [visibleItems],\r\n );\r\n\r\n const getVisibleItemCount = React.useCallback((): number => visibleItems.length, [visibleItems.length]);\r\n\r\n const contextValue = React.useMemo<CommandContextValue>(\r\n () => ({\r\n activeItemId,\r\n disablePointerSelection,\r\n getVisibleItemCount,\r\n hasVisibleItemsInGroup,\r\n isFiltering,\r\n isItemVisible,\r\n listId,\r\n loop,\r\n registerItem,\r\n search,\r\n setSearch,\r\n selectNextItem,\r\n selectPreviousItem,\r\n selectSpecificItem,\r\n shouldFilter,\r\n triggerActiveItem,\r\n unregisterItem,\r\n }),\r\n [\r\n activeItemId,\r\n disablePointerSelection,\r\n getVisibleItemCount,\r\n hasVisibleItemsInGroup,\r\n isFiltering,\r\n isItemVisible,\r\n listId,\r\n loop,\r\n registerItem,\r\n search,\r\n setSearch,\r\n selectNextItem,\r\n selectPreviousItem,\r\n selectSpecificItem,\r\n shouldFilter,\r\n triggerActiveItem,\r\n unregisterItem,\r\n ],\r\n );\r\n\r\n return (\r\n <CommandContext.Provider value={contextValue}>\r\n <div\r\n ref={ref}\r\n aria-label={label}\r\n className={cn(styles.command, className)}\r\n onKeyDown={(event) => {\r\n onKeyDown?.(event);\r\n\r\n if (event.defaultPrevented) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\": {\r\n event.preventDefault();\r\n selectNextItem();\r\n break;\r\n }\r\n\r\n case \"ArrowUp\": {\r\n event.preventDefault();\r\n selectPreviousItem();\r\n break;\r\n }\r\n\r\n case \"Home\": {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n setActiveItemId(selectableItems[0].id);\r\n break;\r\n }\r\n\r\n case \"End\": {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n setActiveItemId(selectableItems.at(-1)?.id ?? selectableItems[0].id);\r\n break;\r\n }\r\n\r\n case \"Enter\": {\r\n if (event.nativeEvent.isComposing) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n triggerActiveItem();\r\n break;\r\n }\r\n\r\n default: {\r\n break;\r\n }\r\n }\r\n }}\r\n {...props}>\r\n {children}\r\n </div>\r\n </CommandContext.Provider>\r\n );\r\n },\r\n);\r\nCommand.displayName = \"Command\";\r\n\r\n/**\r\n * Renders the command surface inside a modal dialog.\r\n *\r\n * @remarks\r\n * - Renders a Base UI dialog popup\r\n * - Built on Base UI Dialog primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandDialog open={open} onOpenChange={setOpen}>\r\n * <CommandInput placeholder='Search...' />\r\n * </CommandDialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog Docs}\r\n */\r\nfunction CommandDialog({children, open, onOpenChange, title = \"Command menu\", ...props}: Readonly<CommandDialogProps>): React.JSX.Element {\r\n return (\r\n <BaseDialog.Root\r\n open={open}\r\n onOpenChange={onOpenChange}\r\n {...props}>\r\n <BaseDialog.Portal>\r\n <BaseDialog.Backdrop className={styles.backdrop} />\r\n <BaseDialog.Popup className={styles.dialogPopup}>\r\n <BaseDialog.Title className={styles.srOnly}>{title}</BaseDialog.Title>\r\n <Command>{children}</Command>\r\n </BaseDialog.Popup>\r\n </BaseDialog.Portal>\r\n </BaseDialog.Root>\r\n );\r\n}\r\nCommandDialog.displayName = \"CommandDialog\";\r\n\r\n/**\r\n * Provides the searchable input surface for a command palette.\r\n *\r\n * @remarks\r\n * - Renders an `<input>` element inside a wrapper `<div>`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandInput placeholder='Search...' />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/combobox_role | ARIA Combobox Role}\r\n */\r\nconst CommandInput = React.forwardRef<HTMLInputElement, CommandInputProps>(({className, onChange, onValueChange, value, ...props}, ref) => {\r\n const {activeItemId, listId, search, selectSpecificItem, setSearch} = useCommandContext(\"CommandInput\");\r\n const isControlled = value !== undefined;\r\n const inputValue = isControlled ? value : search;\r\n\r\n React.useEffect(() => {\r\n if (!isControlled) {\r\n return;\r\n }\r\n\r\n setSearch(value ?? \"\");\r\n }, [isControlled, setSearch, value]);\r\n\r\n return (\r\n <div className={styles.inputWrapper}>\r\n <Search className={styles.searchIcon} />\r\n <input\r\n ref={ref}\r\n aria-activedescendant={activeItemId ?? undefined}\r\n aria-autocomplete='list'\r\n aria-controls={listId}\r\n aria-expanded='true'\r\n className={cn(styles.input, className)}\r\n onChange={(event) => {\r\n onChange?.(event);\r\n\r\n const nextSearchValue = event.currentTarget.value;\r\n setSearch(nextSearchValue);\r\n onValueChange?.(nextSearchValue);\r\n selectSpecificItem(null);\r\n }}\r\n role='combobox'\r\n type='text'\r\n value={inputValue}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCommandInput.displayName = \"CommandInput\";\r\n\r\n/**\r\n * Renders the listbox container that hosts command items and groups.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"listbox\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandList>\r\n * <CommandItem>Settings</CommandItem>\r\n * </CommandList>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/listbox_role | ARIA Listbox Role}\r\n */\r\nconst CommandList = React.forwardRef<HTMLDivElement, CommandListProps>(({className, label, ...props}, ref) => {\r\n const {listId} = useCommandContext(\"CommandList\");\r\n\r\n return (\r\n <div\r\n aria-label={label}\r\n ref={ref}\r\n className={cn(styles.list, className)}\r\n id={listId}\r\n role='listbox'\r\n {...props}\r\n />\r\n );\r\n});\r\nCommandList.displayName = \"CommandList\";\r\n\r\n/**\r\n * Renders a fallback empty-state message when no command items are visible.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"status\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandEmpty>No results found.</CommandEmpty>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/status_role | ARIA Status Role}\r\n */\r\nconst CommandEmpty = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {getVisibleItemCount} = useCommandContext(\"CommandEmpty\");\r\n\r\n if (getVisibleItemCount() > 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(styles.empty, className)}\r\n role='status'\r\n {...props}\r\n />\r\n );\r\n});\r\nCommandEmpty.displayName = \"CommandEmpty\";\r\n\r\n/**\r\n * Groups related command items under an optional heading.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandGroup heading='Suggestions'>\r\n * <CommandItem>Profile</CommandItem>\r\n * </CommandGroup>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/group_role | ARIA Group Role}\r\n */\r\nconst CommandGroup = React.forwardRef<HTMLDivElement, CommandGroupProps>(\r\n ({children, className, forceMount = false, heading, value: _value, ...props}, ref) => {\r\n const groupId = React.useId();\r\n const {hasVisibleItemsInGroup, isFiltering} = useCommandContext(\"CommandGroup\");\r\n\r\n if (!forceMount && isFiltering && !hasVisibleItemsInGroup(groupId)) {\r\n return null;\r\n }\r\n\r\n return (\r\n <CommandGroupContext.Provider value={groupId}>\r\n <div\r\n ref={ref}\r\n className={cn(styles.group, className)}\r\n data-command-group=''\r\n {...props}>\r\n {heading ? <div className={styles.groupHeading}>{heading}</div> : null}\r\n {children}\r\n </div>\r\n </CommandGroupContext.Provider>\r\n );\r\n },\r\n);\r\nCommandGroup.displayName = \"CommandGroup\";\r\n\r\n/**\r\n * Renders a separator between command groups or item sections.\r\n *\r\n * @remarks\r\n * - Renders the shared separator primitive\r\n * - Built on Base UI Separator\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/separator | Base UI Separator Docs}\r\n */\r\nconst CommandSeparator = React.forwardRef<HTMLDivElement, CommandSeparatorProps>(\r\n ({alwaysRender = false, className, orientation = \"horizontal\", ...props}, ref) => {\r\n const {isFiltering} = useCommandContext(\"CommandSeparator\");\r\n\r\n if (isFiltering && !alwaysRender) {\r\n return null;\r\n }\r\n\r\n return (\r\n <BaseSeparator\r\n ref={ref}\r\n className={cn(styles.separator, className)}\r\n orientation={orientation}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nCommandSeparator.displayName = \"CommandSeparator\";\r\n\r\n/**\r\n * Renders a selectable command option with filtering metadata and keyboard support.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"option\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandItem keywords={[\"preferences\"]}>Settings</CommandItem>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/option_role | ARIA Option Role}\r\n */\r\nconst CommandItem = React.forwardRef<HTMLDivElement, CommandItemProps>(\r\n ({children, className, disabled = false, forceMount = false, keywords = [], onClick, onMouseEnter, onSelect, value, ...props}, ref) => {\r\n const {activeItemId, disablePointerSelection, isFiltering, isItemVisible, registerItem, selectSpecificItem, unregisterItem} =\r\n useCommandContext(\"CommandItem\");\r\n const groupId = React.useContext(CommandGroupContext);\r\n const generatedId = React.useId();\r\n const itemReference = React.useRef<HTMLDivElement | null>(null);\r\n const keywordSignature = React.useMemo(() => keywords.join(\"\\u0000\"), [keywords]);\r\n\r\n React.useLayoutEffect(() => {\r\n const textValue = value ?? itemReference.current?.textContent?.trim() ?? \"\";\r\n\r\n registerItem({\r\n disabled,\r\n forceMount,\r\n groupId,\r\n id: generatedId,\r\n keywords,\r\n ref: itemReference,\r\n textValue,\r\n value,\r\n });\r\n }, [children, disabled, forceMount, generatedId, groupId, keywordSignature, keywords, registerItem, value]);\r\n\r\n React.useEffect(() => {\r\n return () => {\r\n unregisterItem(generatedId);\r\n };\r\n }, [generatedId, unregisterItem]);\r\n\r\n const isVisible = forceMount || !isFiltering || isItemVisible(generatedId);\r\n\r\n if (!isVisible) {\r\n return null;\r\n }\r\n\r\n const isSelected = activeItemId === generatedId;\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(node) => {\r\n itemReference.current = node;\r\n assignRef(ref, node);\r\n }}\r\n aria-disabled={disabled || undefined}\r\n aria-selected={isSelected}\r\n className={cn(styles.item, className)}\r\n data-disabled={disabled ? \"true\" : undefined}\r\n data-selected={isSelected ? \"true\" : undefined}\r\n id={generatedId}\r\n onClick={(event) => {\r\n if (disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n onSelect?.(value ?? itemReference.current?.textContent?.trim() ?? \"\");\r\n onClick?.(event);\r\n }}\r\n onFocus={() => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n }}\r\n onMouseEnter={(event) => {\r\n onMouseEnter?.(event);\r\n\r\n if (disabled || disablePointerSelection) {\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n }}\r\n role='option'\r\n tabIndex={disabled ? -1 : 0}>\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\nCommandItem.displayName = \"CommandItem\";\r\n\r\n/**\r\n * Renders auxiliary shortcut text aligned to the edge of a command item.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element\r\n * - Built as a lightweight presentational helper for command menus\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandShortcut>⌘K</CommandShortcut>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/HTML/Element/span | HTML span element}\r\n */\r\nconst CommandShortcut = ({className, ...props}: Readonly<React.HTMLAttributes<HTMLSpanElement>>): React.JSX.Element => {\r\n return (\r\n <span\r\n className={cn(styles.shortcut, className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["CommandContext","React","CommandGroupContext","assignRef","ref","value","normalizeCommandValue","defaultCommandFilter","search","keywords","normalizedSearch","normalizedValue","useCommandContext","componentName","context","Error","Command","children","className","_defaultValue","disablePointerSelection","filter","label","loop","onKeyDown","_onValueChange","shouldFilter","_value","_vimBindings","props","activeItemId","setActiveItemId","setSearch","itemOrderReference","itemsReference","Map","itemsVersion","setItemsVersion","listId","registerItem","item","existingItem","nextItem","hasChanged","currentVersion","unregisterItem","itemId","items","firstItem","secondItem","isFiltering","isItemVisible","itemValue","itemFilter","visibleItems","selectableItems","selectSpecificItem","selectNextItem","currentIndex","nextIndex","selectPreviousItem","previousIndex","triggerActiveItem","hasVisibleItemsInGroup","groupId","getVisibleItemCount","contextValue","cn","styles","event","CommandDialog","open","onOpenChange","title","BaseDialog","CommandInput","onChange","onValueChange","isControlled","undefined","inputValue","Search","nextSearchValue","CommandList","CommandEmpty","CommandGroup","forceMount","heading","CommandSeparator","alwaysRender","orientation","BaseSeparator","CommandItem","disabled","onClick","onMouseEnter","onSelect","generatedId","itemReference","keywordSignature","textValue","isVisible","isSelected","node","CommandShortcut"],"mappings":";;;;;;;;AA8MA,MAAMA,iBAAiB,WAAHA,GAAGC,cAAgD;AACvE,MAAMC,sBAAsB,WAAHA,GAAGD,cAAmC;AAE/D,SAASE,UAAkBC,GAA+B,EAAEC,KAAa;IACvE,IAAI,AAAe,cAAf,OAAOD,KAAoB,YAC7BA,IAAIC;IAIN,IAAID,KACFA,IAAI,OAAO,GAAGC;AAElB;AAEA,SAASC,sBAAsBD,KAAa;IAC1C,OAAOA,MAAM,IAAI,GAAG,WAAW;AACjC;AAEA,SAASE,qBAAqBF,KAAa,EAAEG,MAAc,EAAEC,WAAqB,EAAE;IAClF,IAAID,AAAkB,MAAlBA,OAAO,MAAM,EACf,OAAO;IAGT,MAAME,mBAAmBJ,sBAAsBE;IAC/C,MAAMG,kBAAkBL,sBAAsB;QAACD;WAAUI;KAAS,CAAC,IAAI,CAAC;IAExE,OAAOE,gBAAgB,QAAQ,CAACD,oBAAoB,IAAI;AAC1D;AAEA,SAASE,kBAAkBC,aAAqB;IAC9C,MAAMC,UAAUb,WAAiBD;IAEjC,IAAI,CAACc,SACH,MAAM,IAAIC,MAAM,GAAGF,cAAc,6BAA6B,CAAC;IAGjE,OAAOC;AACT;AAuBA,MAAME,UAAU,WAAHA,GAAGf,WACd,CACE,EACEgB,QAAQ,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;;AAIf2E,gBAAgB,WAAW,GAAG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./command_module.css";
|
|
2
|
+
const command_module = {
|
|
3
|
+
command: "command-eYZUHV",
|
|
4
|
+
srOnly: "srOnly-KBf7C0",
|
|
5
|
+
backdrop: "backdrop-IqhuHJ",
|
|
6
|
+
dialogPopup: "dialogPopup-uCrAem",
|
|
7
|
+
inputWrapper: "inputWrapper-gkdH1j",
|
|
8
|
+
searchIcon: "searchIcon-n1uM3z",
|
|
9
|
+
input: "input-tITn9m",
|
|
10
|
+
list: "list-u9qWEv",
|
|
11
|
+
empty: "empty-rfpqI3",
|
|
12
|
+
group: "group-gXWsyp",
|
|
13
|
+
groupHeading: "groupHeading-AMvZXM",
|
|
14
|
+
separator: "separator-gdtbYv",
|
|
15
|
+
item: "item-J0D0Xh",
|
|
16
|
+
shortcut: "shortcut-mXr9yN"
|
|
17
|
+
};
|
|
18
|
+
export default command_module;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=command.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/ui/command.module.js","sources":["../../../src/components/ui/command.module.css"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./command_module.css\"\nexport default {\"command\":\"command-eYZUHV\",\"srOnly\":\"srOnly-KBf7C0\",\"backdrop\":\"backdrop-IqhuHJ\",\"dialogPopup\":\"dialogPopup-uCrAem\",\"inputWrapper\":\"inputWrapper-gkdH1j\",\"searchIcon\":\"searchIcon-n1uM3z\",\"input\":\"input-tITn9m\",\"list\":\"list-u9qWEv\",\"empty\":\"empty-rfpqI3\",\"group\":\"group-gXWsyp\",\"groupHeading\":\"groupHeading-AMvZXM\",\"separator\":\"separator-gdtbYv\",\"item\":\"item-J0D0Xh\",\"shortcut\":\"shortcut-mXr9yN\"};"],"names":[],"mappings":";AAEA,uBAAe;IAAC,SAAU;IAAiB,QAAS;IAAgB,UAAW;IAAkB,aAAc;IAAqB,cAAe;IAAsB,YAAa;IAAoB,OAAQ;IAAe,MAAO;IAAc,OAAQ;IAAe,OAAQ;IAAe,cAAe;IAAsB,WAAY;IAAmB,MAAO;IAAc,UAAW;AAAiB"}
|