@stridge/noctis 1.0.0-beta.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/README.md +60 -0
- package/dist/_virtual/_rolldown/runtime.js +27 -0
- package/dist/components/accordion/accordion.context.js +15 -0
- package/dist/components/accordion/accordion.d.ts +136 -0
- package/dist/components/accordion/accordion.js +132 -0
- package/dist/components/accordion/accordion.props.d.ts +45 -0
- package/dist/components/accordion/accordion.props.js +53 -0
- package/dist/components/accordion/accordion.slots.d.ts +24 -0
- package/dist/components/accordion/accordion.slots.js +39 -0
- package/dist/components/accordion/accordion.types.d.ts +11 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/alert-dialog/alert-dialog.context.js +16 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +324 -0
- package/dist/components/alert-dialog/alert-dialog.js +279 -0
- package/dist/components/alert-dialog/alert-dialog.props.d.ts +85 -0
- package/dist/components/alert-dialog/alert-dialog.props.js +84 -0
- package/dist/components/alert-dialog/alert-dialog.slots.d.ts +29 -0
- package/dist/components/alert-dialog/alert-dialog.slots.js +52 -0
- package/dist/components/alert-dialog/alert-dialog.types.d.ts +22 -0
- package/dist/components/alert-dialog/index.d.ts +3 -0
- package/dist/components/autocomplete/autocomplete.context.d.ts +5 -0
- package/dist/components/autocomplete/autocomplete.context.js +13 -0
- package/dist/components/autocomplete/autocomplete.d.ts +364 -0
- package/dist/components/autocomplete/autocomplete.js +373 -0
- package/dist/components/autocomplete/autocomplete.props.d.ts +83 -0
- package/dist/components/autocomplete/autocomplete.props.js +63 -0
- package/dist/components/autocomplete/autocomplete.slots.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.slots.js +61 -0
- package/dist/components/autocomplete/index.d.ts +3 -0
- package/dist/components/avatar/avatar.context.js +21 -0
- package/dist/components/avatar/avatar.d.ts +235 -0
- package/dist/components/avatar/avatar.js +208 -0
- package/dist/components/avatar/avatar.props.d.ts +86 -0
- package/dist/components/avatar/avatar.props.js +78 -0
- package/dist/components/avatar/avatar.slots.d.ts +35 -0
- package/dist/components/avatar/avatar.slots.js +49 -0
- package/dist/components/avatar/avatar.types.d.ts +28 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/button/button.d.ts +91 -0
- package/dist/components/button/button.js +82 -0
- package/dist/components/button/button.props.d.ts +48 -0
- package/dist/components/button/button.props.js +25 -0
- package/dist/components/button/button.slots.d.ts +30 -0
- package/dist/components/button/button.slots.js +40 -0
- package/dist/components/button/button.types.d.ts +12 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button-group/button-group.context.js +15 -0
- package/dist/components/button-group/button-group.d.ts +60 -0
- package/dist/components/button-group/button-group.js +50 -0
- package/dist/components/button-group/button-group.props.d.ts +22 -0
- package/dist/components/button-group/button-group.props.js +33 -0
- package/dist/components/button-group/button-group.slots.d.ts +12 -0
- package/dist/components/button-group/button-group.slots.js +18 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/checkbox/checkbox-group.d.ts +46 -0
- package/dist/components/checkbox/checkbox-group.js +31 -0
- package/dist/components/checkbox/checkbox.context.js +15 -0
- package/dist/components/checkbox/checkbox.d.ts +130 -0
- package/dist/components/checkbox/checkbox.js +117 -0
- package/dist/components/checkbox/checkbox.props.d.ts +84 -0
- package/dist/components/checkbox/checkbox.props.js +49 -0
- package/dist/components/checkbox/checkbox.slots.d.ts +27 -0
- package/dist/components/checkbox/checkbox.slots.js +40 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/code-block/brand-logo.d.ts +37 -0
- package/dist/components/code-block/brand-logo.js +212 -0
- package/dist/components/code-block/code-block.context.js +13 -0
- package/dist/components/code-block/code-block.d.ts +190 -0
- package/dist/components/code-block/code-block.js +267 -0
- package/dist/components/code-block/code-block.props.d.ts +42 -0
- package/dist/components/code-block/code-block.props.js +51 -0
- package/dist/components/code-block/code-block.slots.d.ts +16 -0
- package/dist/components/code-block/code-block.slots.js +31 -0
- package/dist/components/code-block/index.d.ts +3 -0
- package/dist/components/code-block/language-label.js +43 -0
- package/dist/components/collapsible/collapsible.context.js +18 -0
- package/dist/components/collapsible/collapsible.d.ts +167 -0
- package/dist/components/collapsible/collapsible.js +182 -0
- package/dist/components/collapsible/collapsible.props.d.ts +33 -0
- package/dist/components/collapsible/collapsible.props.js +44 -0
- package/dist/components/collapsible/collapsible.slots.d.ts +25 -0
- package/dist/components/collapsible/collapsible.slots.js +40 -0
- package/dist/components/collapsible/collapsible.types.d.ts +23 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/color-picker/area.d.ts +11 -0
- package/dist/components/color-picker/area.js +148 -0
- package/dist/components/color-picker/color-picker.d.ts +110 -0
- package/dist/components/color-picker/color-picker.js +149 -0
- package/dist/components/color-picker/color-picker.props.d.ts +69 -0
- package/dist/components/color-picker/color-picker.props.js +74 -0
- package/dist/components/color-picker/color-picker.slots.js +21 -0
- package/dist/components/color-picker/color.d.ts +18 -0
- package/dist/components/color-picker/color.js +224 -0
- package/dist/components/color-picker/context.d.ts +25 -0
- package/dist/components/color-picker/context.js +23 -0
- package/dist/components/color-picker/eyedropper.d.ts +14 -0
- package/dist/components/color-picker/eyedropper.js +50 -0
- package/dist/components/color-picker/format-tabs.d.ts +11 -0
- package/dist/components/color-picker/format-tabs.js +35 -0
- package/dist/components/color-picker/index.d.ts +3 -0
- package/dist/components/color-picker/inputs.d.ts +16 -0
- package/dist/components/color-picker/inputs.js +61 -0
- package/dist/components/color-picker/sliders.d.ts +17 -0
- package/dist/components/color-picker/sliders.js +94 -0
- package/dist/components/color-picker/store.js +48 -0
- package/dist/components/color-picker/swatch.d.ts +15 -0
- package/dist/components/color-picker/swatch.js +25 -0
- package/dist/components/color-swatch/color-swatch-picker.d.ts +87 -0
- package/dist/components/color-swatch/color-swatch-picker.js +73 -0
- package/dist/components/color-swatch/color-swatch.context.js +8 -0
- package/dist/components/color-swatch/color-swatch.d.ts +55 -0
- package/dist/components/color-swatch/color-swatch.js +48 -0
- package/dist/components/color-swatch/color-swatch.props.d.ts +54 -0
- package/dist/components/color-swatch/color-swatch.props.js +32 -0
- package/dist/components/color-swatch/color-swatch.slots.js +13 -0
- package/dist/components/color-swatch/index.d.ts +2 -0
- package/dist/components/combobox/combobox.context.js +13 -0
- package/dist/components/combobox/combobox.d.ts +328 -0
- package/dist/components/combobox/combobox.js +315 -0
- package/dist/components/combobox/combobox.props.d.ts +85 -0
- package/dist/components/combobox/combobox.props.js +79 -0
- package/dist/components/combobox/combobox.slots.d.ts +28 -0
- package/dist/components/combobox/combobox.slots.js +63 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/context-menu/context-menu.d.ts +254 -0
- package/dist/components/context-menu/context-menu.js +150 -0
- package/dist/components/context-menu/context-menu.props.d.ts +22 -0
- package/dist/components/context-menu/context-menu.props.js +32 -0
- package/dist/components/context-menu/context-menu.slots.d.ts +24 -0
- package/dist/components/context-menu/context-menu.slots.js +42 -0
- package/dist/components/context-menu/index.d.ts +2 -0
- package/dist/components/copy-button/copy-button.d.ts +56 -0
- package/dist/components/copy-button/copy-button.js +88 -0
- package/dist/components/copy-button/copy-button.props.d.ts +27 -0
- package/dist/components/copy-button/copy-button.props.js +51 -0
- package/dist/components/copy-button/copy-button.slots.d.ts +20 -0
- package/dist/components/copy-button/copy-button.slots.js +36 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/dialog/dialog.context.js +15 -0
- package/dist/components/dialog/dialog.d.ts +299 -0
- package/dist/components/dialog/dialog.js +263 -0
- package/dist/components/dialog/dialog.props.d.ts +71 -0
- package/dist/components/dialog/dialog.props.js +75 -0
- package/dist/components/dialog/dialog.slots.d.ts +26 -0
- package/dist/components/dialog/dialog.slots.js +46 -0
- package/dist/components/dialog/dialog.types.d.ts +16 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/field/field.d.ts +221 -0
- package/dist/components/field/field.js +192 -0
- package/dist/components/field/field.props.d.ts +66 -0
- package/dist/components/field/field.props.js +65 -0
- package/dist/components/field/field.slots.d.ts +35 -0
- package/dist/components/field/field.slots.js +54 -0
- package/dist/components/field/field.types.d.ts +5 -0
- package/dist/components/field/index.d.ts +4 -0
- package/dist/components/inline-code/index.d.ts +1 -0
- package/dist/components/inline-code/inline-code.d.ts +46 -0
- package/dist/components/inline-code/inline-code.js +36 -0
- package/dist/components/inline-code/inline-code.props.d.ts +17 -0
- package/dist/components/inline-code/inline-code.props.js +27 -0
- package/dist/components/inline-code/inline-code.slots.js +8 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/input.context.js +13 -0
- package/dist/components/input/input.d.ts +161 -0
- package/dist/components/input/input.js +117 -0
- package/dist/components/input/input.props.d.ts +51 -0
- package/dist/components/input/input.props.js +50 -0
- package/dist/components/input/input.slots.d.ts +35 -0
- package/dist/components/input/input.slots.js +46 -0
- package/dist/components/input/input.types.d.ts +12 -0
- package/dist/components/kbd/glyphs.js +45 -0
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/kbd.d.ts +61 -0
- package/dist/components/kbd/kbd.js +233 -0
- package/dist/components/kbd/kbd.props.d.ts +30 -0
- package/dist/components/kbd/kbd.props.js +39 -0
- package/dist/components/kbd/kbd.slots.js +14 -0
- package/dist/components/kbd/use-apple-platform.js +25 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +355 -0
- package/dist/components/menu/menu.js +263 -0
- package/dist/components/menu/menu.props.d.ts +92 -0
- package/dist/components/menu/menu.props.js +97 -0
- package/dist/components/menu/menu.slots.d.ts +32 -0
- package/dist/components/menu/menu.slots.js +60 -0
- package/dist/components/menubar/index.d.ts +2 -0
- package/dist/components/menubar/menubar.context.js +13 -0
- package/dist/components/menubar/menubar.d.ts +162 -0
- package/dist/components/menubar/menubar.js +122 -0
- package/dist/components/menubar/menubar.props.d.ts +41 -0
- package/dist/components/menubar/menubar.props.js +45 -0
- package/dist/components/menubar/menubar.slots.d.ts +26 -0
- package/dist/components/menubar/menubar.slots.js +40 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/meter.context.d.ts +9 -0
- package/dist/components/meter/meter.context.js +13 -0
- package/dist/components/meter/meter.d.ts +163 -0
- package/dist/components/meter/meter.js +121 -0
- package/dist/components/meter/meter.props.d.ts +50 -0
- package/dist/components/meter/meter.props.js +33 -0
- package/dist/components/meter/meter.slots.d.ts +18 -0
- package/dist/components/meter/meter.slots.js +31 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +328 -0
- package/dist/components/navigation-menu/navigation-menu.js +274 -0
- package/dist/components/navigation-menu/navigation-menu.props.d.ts +98 -0
- package/dist/components/navigation-menu/navigation-menu.props.js +90 -0
- package/dist/components/navigation-menu/navigation-menu.slots.d.ts +34 -0
- package/dist/components/navigation-menu/navigation-menu.slots.js +60 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/number-field.context.d.ts +13 -0
- package/dist/components/number-field/number-field.context.js +13 -0
- package/dist/components/number-field/number-field.d.ts +197 -0
- package/dist/components/number-field/number-field.js +187 -0
- package/dist/components/number-field/number-field.props.d.ts +66 -0
- package/dist/components/number-field/number-field.props.js +50 -0
- package/dist/components/number-field/number-field.slots.d.ts +31 -0
- package/dist/components/number-field/number-field.slots.js +48 -0
- package/dist/components/otp-field/index.d.ts +3 -0
- package/dist/components/otp-field/otp-field.context.js +13 -0
- package/dist/components/otp-field/otp-field.d.ts +99 -0
- package/dist/components/otp-field/otp-field.js +76 -0
- package/dist/components/otp-field/otp-field.props.d.ts +48 -0
- package/dist/components/otp-field/otp-field.props.js +43 -0
- package/dist/components/otp-field/otp-field.slots.d.ts +28 -0
- package/dist/components/otp-field/otp-field.slots.js +39 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +192 -0
- package/dist/components/popover/popover.js +152 -0
- package/dist/components/popover/popover.props.d.ts +34 -0
- package/dist/components/popover/popover.props.js +44 -0
- package/dist/components/popover/popover.slots.d.ts +22 -0
- package/dist/components/popover/popover.slots.js +42 -0
- package/dist/components/preview-card/index.d.ts +2 -0
- package/dist/components/preview-card/preview-card.d.ts +182 -0
- package/dist/components/preview-card/preview-card.js +146 -0
- package/dist/components/preview-card/preview-card.props.d.ts +37 -0
- package/dist/components/preview-card/preview-card.props.js +48 -0
- package/dist/components/preview-card/preview-card.slots.d.ts +22 -0
- package/dist/components/preview-card/preview-card.slots.js +39 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/progress.context.d.ts +9 -0
- package/dist/components/progress/progress.context.js +13 -0
- package/dist/components/progress/progress.d.ts +139 -0
- package/dist/components/progress/progress.js +92 -0
- package/dist/components/progress/progress.props.d.ts +56 -0
- package/dist/components/progress/progress.props.js +38 -0
- package/dist/components/progress/progress.slots.d.ts +24 -0
- package/dist/components/progress/progress.slots.js +37 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/radio.context.js +5 -0
- package/dist/components/radio/radio.d.ts +205 -0
- package/dist/components/radio/radio.js +168 -0
- package/dist/components/radio/radio.props.d.ts +106 -0
- package/dist/components/radio/radio.props.js +65 -0
- package/dist/components/radio/radio.slots.d.ts +29 -0
- package/dist/components/radio/radio.slots.js +44 -0
- package/dist/components/rail/index.d.ts +3 -0
- package/dist/components/rail/rail.context.d.ts +17 -0
- package/dist/components/rail/rail.context.js +23 -0
- package/dist/components/rail/rail.d.ts +232 -0
- package/dist/components/rail/rail.js +254 -0
- package/dist/components/rail/rail.props.d.ts +98 -0
- package/dist/components/rail/rail.props.js +64 -0
- package/dist/components/rail/rail.slots.d.ts +20 -0
- package/dist/components/rail/rail.slots.js +40 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.context.js +15 -0
- package/dist/components/scroll-area/scroll-area.d.ts +217 -0
- package/dist/components/scroll-area/scroll-area.js +153 -0
- package/dist/components/scroll-area/scroll-area.props.d.ts +73 -0
- package/dist/components/scroll-area/scroll-area.props.js +64 -0
- package/dist/components/scroll-area/scroll-area.slots.d.ts +40 -0
- package/dist/components/scroll-area/scroll-area.slots.js +54 -0
- package/dist/components/scroll-area/scroll-area.types.d.ts +24 -0
- package/dist/components/search-dialog/index.d.ts +3 -0
- package/dist/components/search-dialog/parts/input.d.ts +24 -0
- package/dist/components/search-dialog/parts/input.js +53 -0
- package/dist/components/search-dialog/parts/messages.d.ts +80 -0
- package/dist/components/search-dialog/parts/messages.js +75 -0
- package/dist/components/search-dialog/parts/results.d.ts +43 -0
- package/dist/components/search-dialog/parts/results.js +63 -0
- package/dist/components/search-dialog/parts/root.d.ts +54 -0
- package/dist/components/search-dialog/parts/root.js +99 -0
- package/dist/components/search-dialog/search-dialog.context.d.ts +15 -0
- package/dist/components/search-dialog/search-dialog.context.js +20 -0
- package/dist/components/search-dialog/search-dialog.d.ts +84 -0
- package/dist/components/search-dialog/search-dialog.js +43 -0
- package/dist/components/search-dialog/search-dialog.props.d.ts +45 -0
- package/dist/components/search-dialog/search-dialog.props.js +49 -0
- package/dist/components/search-dialog/search-dialog.slots.d.ts +16 -0
- package/dist/components/search-dialog/search-dialog.slots.js +32 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.context.js +17 -0
- package/dist/components/select/select.d.ts +356 -0
- package/dist/components/select/select.js +314 -0
- package/dist/components/select/select.props.d.ts +110 -0
- package/dist/components/select/select.props.js +103 -0
- package/dist/components/select/select.slots.d.ts +38 -0
- package/dist/components/select/select.slots.js +67 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/separator.d.ts +69 -0
- package/dist/components/separator/separator.js +44 -0
- package/dist/components/separator/separator.props.d.ts +30 -0
- package/dist/components/separator/separator.props.js +30 -0
- package/dist/components/separator/separator.slots.d.ts +22 -0
- package/dist/components/separator/separator.slots.js +21 -0
- package/dist/components/separator/separator.types.d.ts +5 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/sheet-stack.d.ts +106 -0
- package/dist/components/sheet/sheet-stack.js +146 -0
- package/dist/components/sheet/sheet.d.ts +279 -0
- package/dist/components/sheet/sheet.js +264 -0
- package/dist/components/sheet/sheet.props.d.ts +74 -0
- package/dist/components/sheet/sheet.props.js +77 -0
- package/dist/components/sheet/sheet.slots.js +22 -0
- package/dist/components/sheet/sheet.types.d.ts +12 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/slider.context.d.ts +5 -0
- package/dist/components/slider/slider.context.js +29 -0
- package/dist/components/slider/slider.d.ts +230 -0
- package/dist/components/slider/slider.js +274 -0
- package/dist/components/slider/slider.props.d.ts +72 -0
- package/dist/components/slider/slider.props.js +59 -0
- package/dist/components/slider/slider.slots.d.ts +30 -0
- package/dist/components/slider/slider.slots.js +50 -0
- package/dist/components/surface/index.d.ts +1 -0
- package/dist/components/surface/surface.d.ts +84 -0
- package/dist/components/surface/surface.js +48 -0
- package/dist/components/surface/surface.props.d.ts +35 -0
- package/dist/components/surface/surface.props.js +26 -0
- package/dist/components/surface/surface.slots.js +9 -0
- package/dist/components/surface/surface.types.d.ts +14 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/switch.context.js +14 -0
- package/dist/components/switch/switch.d.ts +110 -0
- package/dist/components/switch/switch.js +92 -0
- package/dist/components/switch/switch.props.d.ts +68 -0
- package/dist/components/switch/switch.props.js +41 -0
- package/dist/components/switch/switch.slots.d.ts +23 -0
- package/dist/components/switch/switch.slots.js +35 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +104 -0
- package/dist/components/table/table.js +92 -0
- package/dist/components/table/table.props.d.ts +38 -0
- package/dist/components/table/table.props.js +49 -0
- package/dist/components/table/table.slots.js +17 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.context.d.ts +9 -0
- package/dist/components/tabs/tabs.context.js +13 -0
- package/dist/components/tabs/tabs.d.ts +139 -0
- package/dist/components/tabs/tabs.js +118 -0
- package/dist/components/tabs/tabs.props.d.ts +59 -0
- package/dist/components/tabs/tabs.props.js +39 -0
- package/dist/components/tabs/tabs.slots.d.ts +20 -0
- package/dist/components/tabs/tabs.slots.js +33 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/textarea.context.js +13 -0
- package/dist/components/textarea/textarea.d.ts +142 -0
- package/dist/components/textarea/textarea.js +129 -0
- package/dist/components/textarea/textarea.props.d.ts +44 -0
- package/dist/components/textarea/textarea.props.js +32 -0
- package/dist/components/textarea/textarea.slots.d.ts +23 -0
- package/dist/components/textarea/textarea.slots.js +33 -0
- package/dist/components/textarea/textarea.types.d.ts +5 -0
- package/dist/components/toast/index.d.ts +4 -0
- package/dist/components/toast/toast.d.ts +241 -0
- package/dist/components/toast/toast.js +193 -0
- package/dist/components/toast/toast.manager.d.ts +76 -0
- package/dist/components/toast/toast.manager.js +71 -0
- package/dist/components/toast/toast.props.d.ts +66 -0
- package/dist/components/toast/toast.props.js +74 -0
- package/dist/components/toast/toast.slots.d.ts +30 -0
- package/dist/components/toast/toast.slots.js +49 -0
- package/dist/components/toast/toast.types.d.ts +19 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/toggle.context.d.ts +11 -0
- package/dist/components/toggle/toggle.context.js +14 -0
- package/dist/components/toggle/toggle.d.ts +136 -0
- package/dist/components/toggle/toggle.js +101 -0
- package/dist/components/toggle/toggle.props.d.ts +51 -0
- package/dist/components/toggle/toggle.props.js +29 -0
- package/dist/components/toggle/toggle.slots.d.ts +26 -0
- package/dist/components/toggle/toggle.slots.js +36 -0
- package/dist/components/toolbar/index.d.ts +3 -0
- package/dist/components/toolbar/toolbar.context.js +23 -0
- package/dist/components/toolbar/toolbar.d.ts +218 -0
- package/dist/components/toolbar/toolbar.js +197 -0
- package/dist/components/toolbar/toolbar.props.d.ts +54 -0
- package/dist/components/toolbar/toolbar.props.js +55 -0
- package/dist/components/toolbar/toolbar.slots.d.ts +24 -0
- package/dist/components/toolbar/toolbar.slots.js +37 -0
- package/dist/components/toolbar/toolbar.types.d.ts +15 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +170 -0
- package/dist/components/tooltip/tooltip.js +143 -0
- package/dist/components/tooltip/tooltip.props.d.ts +36 -0
- package/dist/components/tooltip/tooltip.props.js +42 -0
- package/dist/components/tooltip/tooltip.slots.d.ts +26 -0
- package/dist/components/tooltip/tooltip.slots.js +42 -0
- package/dist/core/derive-threshold-tone.js +35 -0
- package/dist/core/merge-class-name.d.ts +17 -0
- package/dist/core/merge-class-name.js +16 -0
- package/dist/core/noctis-provider.d.ts +38 -0
- package/dist/core/noctis-provider.js +44 -0
- package/dist/core/primitive/index.d.ts +1 -0
- package/dist/core/primitive/primitive.d.ts +44 -0
- package/dist/core/primitive/primitive.js +27 -0
- package/dist/core/radius-scope/index.d.ts +2 -0
- package/dist/core/radius-scope/radius-scope.d.ts +43 -0
- package/dist/core/radius-scope/radius-scope.js +36 -0
- package/dist/core/radius-scope/radius-scope.styles.d.ts +13 -0
- package/dist/core/radius-scope/radius-scope.styles.js +11 -0
- package/dist/core/render.d.ts +24 -0
- package/dist/core/render.js +12 -0
- package/dist/core/use-copy.d.ts +13 -0
- package/dist/core/use-copy.js +30 -0
- package/dist/core/use-injected-labels.js +55 -0
- package/dist/core/use-reduced-motion.d.ts +9 -0
- package/dist/core/use-reduced-motion.js +26 -0
- package/dist/core/visually-hidden/index.d.ts +1 -0
- package/dist/core/visually-hidden/visually-hidden.d.ts +24 -0
- package/dist/core/visually-hidden/visually-hidden.js +19 -0
- package/dist/i18n/default-messages.d.ts +12 -0
- package/dist/i18n/default-messages.js +10 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/messages/index.d.ts +2 -0
- package/dist/i18n/messages/index.js +2 -0
- package/dist/icons/glyphs.d.ts +2 -0
- package/dist/icons/glyphs.js +2 -0
- package/dist/icons/icon.d.ts +40 -0
- package/dist/icons/icon.js +26 -0
- package/dist/icons/icon.styles.d.ts +9 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.d.ts +126 -0
- package/dist/index.js +112 -0
- package/dist/primitives/accordion.d.ts +7 -0
- package/dist/primitives/accordion.js +8 -0
- package/dist/primitives/alert-dialog.d.ts +7 -0
- package/dist/primitives/alert-dialog.js +8 -0
- package/dist/primitives/autocomplete/autocomplete.d.ts +58 -0
- package/dist/primitives/autocomplete/autocomplete.js +58 -0
- package/dist/primitives/autocomplete/index.d.ts +1 -0
- package/dist/primitives/autocomplete.d.ts +2 -0
- package/dist/primitives/autocomplete.js +2 -0
- package/dist/primitives/avatar.d.ts +7 -0
- package/dist/primitives/avatar.js +8 -0
- package/dist/primitives/button.d.ts +7 -0
- package/dist/primitives/button.js +8 -0
- package/dist/primitives/checkbox-group.d.ts +7 -0
- package/dist/primitives/checkbox-group.js +8 -0
- package/dist/primitives/checkbox.d.ts +7 -0
- package/dist/primitives/checkbox.js +8 -0
- package/dist/primitives/collapsible.d.ts +7 -0
- package/dist/primitives/collapsible.js +8 -0
- package/dist/primitives/combobox/combobox.d.ts +71 -0
- package/dist/primitives/combobox/combobox.js +66 -0
- package/dist/primitives/combobox/index.d.ts +1 -0
- package/dist/primitives/combobox.d.ts +2 -0
- package/dist/primitives/combobox.js +2 -0
- package/dist/primitives/context-menu.d.ts +7 -0
- package/dist/primitives/context-menu.js +8 -0
- package/dist/primitives/csp-provider.d.ts +1 -0
- package/dist/primitives/csp-provider.js +2 -0
- package/dist/primitives/dialog.d.ts +7 -0
- package/dist/primitives/dialog.js +8 -0
- package/dist/primitives/direction-provider.d.ts +1 -0
- package/dist/primitives/direction-provider.js +8 -0
- package/dist/primitives/drawer.d.ts +1 -0
- package/dist/primitives/drawer.js +2 -0
- package/dist/primitives/field.d.ts +7 -0
- package/dist/primitives/field.js +8 -0
- package/dist/primitives/fieldset.d.ts +7 -0
- package/dist/primitives/fieldset.js +8 -0
- package/dist/primitives/form.d.ts +7 -0
- package/dist/primitives/form.js +8 -0
- package/dist/primitives/index.d.ts +79 -0
- package/dist/primitives/index.js +113 -0
- package/dist/primitives/input.d.ts +7 -0
- package/dist/primitives/input.js +8 -0
- package/dist/primitives/menu.d.ts +7 -0
- package/dist/primitives/menu.js +8 -0
- package/dist/primitives/menubar.d.ts +7 -0
- package/dist/primitives/menubar.js +8 -0
- package/dist/primitives/meter/index.d.ts +1 -0
- package/dist/primitives/meter/meter.d.ts +56 -0
- package/dist/primitives/meter/meter.js +59 -0
- package/dist/primitives/meter.d.ts +2 -0
- package/dist/primitives/meter.js +2 -0
- package/dist/primitives/navigation-menu.d.ts +7 -0
- package/dist/primitives/navigation-menu.js +8 -0
- package/dist/primitives/number-field/context.d.ts +13 -0
- package/dist/primitives/number-field/context.js +36 -0
- package/dist/primitives/number-field/index.d.ts +2 -0
- package/dist/primitives/number-field/number-field.d.ts +90 -0
- package/dist/primitives/number-field/number-field.js +107 -0
- package/dist/primitives/number-field.d.ts +3 -0
- package/dist/primitives/number-field.js +2 -0
- package/dist/primitives/otp-field.d.ts +7 -0
- package/dist/primitives/otp-field.js +8 -0
- package/dist/primitives/popover.d.ts +7 -0
- package/dist/primitives/popover.js +8 -0
- package/dist/primitives/preview-card.d.ts +7 -0
- package/dist/primitives/preview-card.js +8 -0
- package/dist/primitives/progress/index.d.ts +1 -0
- package/dist/primitives/progress/progress.d.ts +56 -0
- package/dist/primitives/progress/progress.js +59 -0
- package/dist/primitives/progress.d.ts +2 -0
- package/dist/primitives/progress.js +2 -0
- package/dist/primitives/radio-group.d.ts +7 -0
- package/dist/primitives/radio-group.js +8 -0
- package/dist/primitives/radio.d.ts +7 -0
- package/dist/primitives/radio.js +8 -0
- package/dist/primitives/scroll-area.d.ts +7 -0
- package/dist/primitives/scroll-area.js +8 -0
- package/dist/primitives/select.d.ts +7 -0
- package/dist/primitives/select.js +8 -0
- package/dist/primitives/separator.d.ts +7 -0
- package/dist/primitives/separator.js +8 -0
- package/dist/primitives/slider/context.d.ts +12 -0
- package/dist/primitives/slider/context.js +18 -0
- package/dist/primitives/slider/index.d.ts +2 -0
- package/dist/primitives/slider/slider.d.ts +83 -0
- package/dist/primitives/slider/slider.js +99 -0
- package/dist/primitives/slider.d.ts +3 -0
- package/dist/primitives/slider.js +2 -0
- package/dist/primitives/switch.d.ts +1 -0
- package/dist/primitives/switch.js +2 -0
- package/dist/primitives/tabs.d.ts +7 -0
- package/dist/primitives/tabs.js +8 -0
- package/dist/primitives/toast/context.d.ts +11 -0
- package/dist/primitives/toast/context.js +18 -0
- package/dist/primitives/toast/index.d.ts +2 -0
- package/dist/primitives/toast/toast.d.ts +122 -0
- package/dist/primitives/toast/toast.js +133 -0
- package/dist/primitives/toast.d.ts +3 -0
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/toggle-group.d.ts +7 -0
- package/dist/primitives/toggle-group.js +8 -0
- package/dist/primitives/toggle.d.ts +7 -0
- package/dist/primitives/toggle.js +8 -0
- package/dist/primitives/toolbar.d.ts +7 -0
- package/dist/primitives/toolbar.js +8 -0
- package/dist/primitives/tooltip.d.ts +7 -0
- package/dist/primitives/tooltip.js +8 -0
- package/dist/props.d.ts +46 -0
- package/dist/props.js +46 -0
- package/dist/styles.css +11513 -0
- package/dist/tailwind/cn.d.ts +33 -0
- package/dist/tailwind/cn.js +42 -0
- package/dist/tailwind/index.d.ts +3 -0
- package/dist/tailwind/index.js +3 -0
- package/dist/tailwind/tv.d.ts +20 -0
- package/dist/tailwind/tv.js +11 -0
- package/dist/tailwind.css +485 -0
- package/dist/theme/react.d.ts +1 -0
- package/dist/theme/react.js +1 -0
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +1 -0
- package/dist/tokens/react.d.ts +1 -0
- package/dist/tokens/react.js +1 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.js +1 -0
- package/package.json +121 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { Combobox as Combobox$1 } from "../../primitives/combobox/combobox.js";
|
|
2
|
+
import { ComboboxSize, chipProps, chipsInputProps, emptyProps, groupLabelProps, iconProps, inputProps, itemProps, listProps, separatorProps, statusProps } from "./combobox.props.js";
|
|
3
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/combobox/combobox.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Owns the combobox state and filtering, and shares the control `size` with the field. Wraps Base
|
|
8
|
+
* UI's Combobox (which auto-injects the active locale so the filter collator matches the reader).
|
|
9
|
+
* Renders no DOM element — compose an `Input`, a `Content` of `Item`s, and (for multiple selection)
|
|
10
|
+
* the `Chips`/`Chip` parts inside it.
|
|
11
|
+
*/
|
|
12
|
+
declare function ComboboxRoot<Value, Multiple extends boolean | undefined = false>({
|
|
13
|
+
size,
|
|
14
|
+
loading,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}: Combobox.Root.Props<Value, Multiple>): ReactElement;
|
|
18
|
+
/**
|
|
19
|
+
* The text field. Follows the field family look (filled surface, field border, a calm ring-less focus
|
|
20
|
+
* that shifts only the border) and reads the control `size` from the root unless overridden. Pass
|
|
21
|
+
* `invalid` for the danger border. Type to filter the list; the popup opens as you type.
|
|
22
|
+
*/
|
|
23
|
+
declare function ComboboxInput({
|
|
24
|
+
size,
|
|
25
|
+
invalid,
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: Combobox.Input.Props): ReactElement;
|
|
29
|
+
/**
|
|
30
|
+
* The field shell that lays out the `Input` beside its `Trigger`/`Clear` affordances. Wrap the input
|
|
31
|
+
* and the buttons in it so the chevron/clear pin to the field's inline-end.
|
|
32
|
+
*/
|
|
33
|
+
declare function ComboboxInputGroup({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: Combobox.InputGroup.Props): ReactElement;
|
|
37
|
+
/**
|
|
38
|
+
* The button that opens the popup, sitting at the field's inline-end with a chevron that rotates
|
|
39
|
+
* while open. Decorative glyph; give it an `aria-label` so screen-reader users can open the list.
|
|
40
|
+
*/
|
|
41
|
+
declare function ComboboxTrigger({
|
|
42
|
+
className,
|
|
43
|
+
children,
|
|
44
|
+
...props
|
|
45
|
+
}: Combobox.Trigger.Props): ReactElement;
|
|
46
|
+
/**
|
|
47
|
+
* The button that clears the current value, shown only while the field holds one. Give it an
|
|
48
|
+
* `aria-label`; it renders a small dismiss glyph by default.
|
|
49
|
+
*/
|
|
50
|
+
declare function ComboboxClear({
|
|
51
|
+
className,
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}: Combobox.Clear.Props): ReactElement;
|
|
55
|
+
/**
|
|
56
|
+
* The floating listbox surface — portaled, elevated, and animated — holding the options, groups, and
|
|
57
|
+
* the empty state. Opens below the field, aligned to its start, capped at the available viewport
|
|
58
|
+
* height so the list scrolls and keeps the keyboard highlight in view.
|
|
59
|
+
*/
|
|
60
|
+
declare function ComboboxContent({
|
|
61
|
+
sideOffset,
|
|
62
|
+
align,
|
|
63
|
+
collisionPadding,
|
|
64
|
+
className,
|
|
65
|
+
style,
|
|
66
|
+
children,
|
|
67
|
+
...props
|
|
68
|
+
}: Combobox.Content.Props): ReactElement;
|
|
69
|
+
/** The scrollable listbox holding the option rows. Accepts an item-render child (`{(item) => …}`). */
|
|
70
|
+
declare function ComboboxList({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}: Combobox.List.Props): ReactElement;
|
|
74
|
+
/**
|
|
75
|
+
* An option row. The leading column holds a check that appears once selected (mirroring the Menu item
|
|
76
|
+
* idiom); the row lights up neutrally — not the accent — while highlighted by pointer or keyboard.
|
|
77
|
+
*/
|
|
78
|
+
declare function ComboboxItem({
|
|
79
|
+
className,
|
|
80
|
+
children,
|
|
81
|
+
...props
|
|
82
|
+
}: Combobox.Item.Props): ReactElement;
|
|
83
|
+
/** The centred message shown when the filter matches nothing. Holds the no-results copy. */
|
|
84
|
+
declare function ComboboxEmpty({
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
}: Combobox.Empty.Props): ReactElement;
|
|
88
|
+
/** A labelled section of related options. Put a `GroupLabel` inside to name it for screen readers. */
|
|
89
|
+
declare function ComboboxGroup({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}: Combobox.Group.Props): ReactElement;
|
|
93
|
+
/** Maps a group's (or the list's) filtered items to rows via a render-prop child. Renders no element. */
|
|
94
|
+
declare function ComboboxCollection(props: Combobox.Collection.Props): ReactElement;
|
|
95
|
+
/** The group's muted, non-interactive heading — announced as the group's accessible name. */
|
|
96
|
+
declare function ComboboxGroupLabel({
|
|
97
|
+
className,
|
|
98
|
+
...props
|
|
99
|
+
}: Combobox.GroupLabel.Props): ReactElement;
|
|
100
|
+
/**
|
|
101
|
+
* Renders the current value(s); pass a render function to map over the selected values (the chip
|
|
102
|
+
* pattern for multiple selection). Renders no element of its own.
|
|
103
|
+
*/
|
|
104
|
+
declare function ComboboxValue(props: Combobox.Value.Props): ReactElement;
|
|
105
|
+
/** The wrapper that lays out the selected-value chips inside the field for multiple selection. */
|
|
106
|
+
declare function ComboboxChips({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}: Combobox.Chips.Props): ReactElement;
|
|
110
|
+
/** One selected value, rendered as a pill with a trailing remove control, for multiple selection. */
|
|
111
|
+
declare function ComboboxChip({
|
|
112
|
+
className,
|
|
113
|
+
children,
|
|
114
|
+
...props
|
|
115
|
+
}: Combobox.Chip.Props): ReactElement;
|
|
116
|
+
/** The trailing remove control inside a chip. Give it an `aria-label`; it renders a dismiss glyph. */
|
|
117
|
+
declare function ComboboxChipRemove({
|
|
118
|
+
className,
|
|
119
|
+
children,
|
|
120
|
+
...props
|
|
121
|
+
}: Combobox.ChipRemove.Props): ReactElement;
|
|
122
|
+
/**
|
|
123
|
+
* The multi-select field shell: a bordered, filled box that wraps the `Chips` and the `Input` so they
|
|
124
|
+
* read as one field, with a single accent focus ring on `:focus-within`. Pass `invalid` for the danger
|
|
125
|
+
* border. Built on Base UI's `InputGroup`, so it is the popup's anchor — the list opens below the whole
|
|
126
|
+
* field, never over the chips — and a click anywhere in it focuses the input.
|
|
127
|
+
*/
|
|
128
|
+
declare function ComboboxChipsInput({
|
|
129
|
+
invalid,
|
|
130
|
+
className,
|
|
131
|
+
children,
|
|
132
|
+
...props
|
|
133
|
+
}: Combobox.ChipsInput.Props): ReactElement;
|
|
134
|
+
/**
|
|
135
|
+
* A polite live region for async filtering — render it inside `Content` (kept mounted) and put the
|
|
136
|
+
* loading / results-count / no-results copy inside; Base UI announces content changes politely.
|
|
137
|
+
*/
|
|
138
|
+
declare function ComboboxStatus({
|
|
139
|
+
className,
|
|
140
|
+
...props
|
|
141
|
+
}: Combobox.Status.Props): ReactElement;
|
|
142
|
+
/**
|
|
143
|
+
* A leading decorative icon in the field (a search magnifier by default), reserving a leading column.
|
|
144
|
+
* Muted and signal-free; Base UI marks it `aria-hidden`. Render it as the first child of the
|
|
145
|
+
* `InputGroup`, before the `Input`.
|
|
146
|
+
*/
|
|
147
|
+
declare function ComboboxIcon({
|
|
148
|
+
className,
|
|
149
|
+
children,
|
|
150
|
+
...props
|
|
151
|
+
}: Combobox.Icon.Props): ReactElement;
|
|
152
|
+
/** A thin divider between option groups inside the list. Decorative structure, never accent. */
|
|
153
|
+
declare function ComboboxSeparator({
|
|
154
|
+
className,
|
|
155
|
+
...props
|
|
156
|
+
}: Combobox.Separator.Props): ReactElement;
|
|
157
|
+
/**
|
|
158
|
+
* A filterable select: a text input that filters a floating list of options, for single or multiple
|
|
159
|
+
* selection. Built on Base UI's Combobox for type-to-filter, keyboard navigation (arrows, Home/End,
|
|
160
|
+
* `Enter` to select, `Escape` to dismiss), focus management, and locale-aware filtering.
|
|
161
|
+
*
|
|
162
|
+
* Compose from parts: `Combobox.Root` owns the state, `Combobox.Input` is the field (with optional
|
|
163
|
+
* `Trigger`/`Clear` affordances), and `Combobox.Content` holds the rows — `Item`s, `Group`s with a
|
|
164
|
+
* `GroupLabel`, and an `Empty` no-results message. For multiple selection, render `Chips`/`Chip`
|
|
165
|
+
* inside the field. The popup surface paint is owned by the composed `<Surface elevation="menu">`.
|
|
166
|
+
*
|
|
167
|
+
* Styling is precompiled in `combobox.css`, keyed off each part's prefixed `data-slot`. Several parts
|
|
168
|
+
* also carry the D12 `props()` escape hatch via `Object.assign` (e.g. `Combobox.Item.props({
|
|
169
|
+
* selected })`), returning a spreadable `{ "data-slot": "noctis-combobox-<part>", ...dataAttrs }` bag.
|
|
170
|
+
*
|
|
171
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
172
|
+
* exposed through the matching `Combobox` namespace — e.g. `Combobox.Item.Props`.
|
|
173
|
+
*/
|
|
174
|
+
declare const Combobox: {
|
|
175
|
+
Root: typeof ComboboxRoot;
|
|
176
|
+
Input: typeof ComboboxInput & {
|
|
177
|
+
props: typeof inputProps;
|
|
178
|
+
};
|
|
179
|
+
InputGroup: typeof ComboboxInputGroup;
|
|
180
|
+
ChipsInput: typeof ComboboxChipsInput & {
|
|
181
|
+
props: typeof chipsInputProps;
|
|
182
|
+
};
|
|
183
|
+
Icon: typeof ComboboxIcon & {
|
|
184
|
+
props: typeof iconProps;
|
|
185
|
+
};
|
|
186
|
+
Trigger: typeof ComboboxTrigger;
|
|
187
|
+
Clear: typeof ComboboxClear;
|
|
188
|
+
Content: typeof ComboboxContent;
|
|
189
|
+
Status: typeof ComboboxStatus & {
|
|
190
|
+
props: typeof statusProps;
|
|
191
|
+
};
|
|
192
|
+
List: typeof ComboboxList & {
|
|
193
|
+
props: typeof listProps;
|
|
194
|
+
};
|
|
195
|
+
Item: typeof ComboboxItem & {
|
|
196
|
+
props: typeof itemProps;
|
|
197
|
+
};
|
|
198
|
+
Empty: typeof ComboboxEmpty & {
|
|
199
|
+
props: typeof emptyProps;
|
|
200
|
+
};
|
|
201
|
+
Group: typeof ComboboxGroup;
|
|
202
|
+
Separator: typeof ComboboxSeparator & {
|
|
203
|
+
props: typeof separatorProps;
|
|
204
|
+
};
|
|
205
|
+
Collection: typeof ComboboxCollection;
|
|
206
|
+
GroupLabel: typeof ComboboxGroupLabel & {
|
|
207
|
+
props: typeof groupLabelProps;
|
|
208
|
+
};
|
|
209
|
+
Value: typeof ComboboxValue;
|
|
210
|
+
Chips: typeof ComboboxChips;
|
|
211
|
+
Chip: typeof ComboboxChip & {
|
|
212
|
+
props: typeof chipProps;
|
|
213
|
+
};
|
|
214
|
+
ChipRemove: typeof ComboboxChipRemove;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. Types-only —
|
|
218
|
+
* it emits no runtime code and merges with the `Combobox` object above, so `Combobox.Item` is the
|
|
219
|
+
* component value while `Combobox.Item.Props` is its prop type.
|
|
220
|
+
*/
|
|
221
|
+
declare namespace Combobox {
|
|
222
|
+
/** The control sizes the field offers. */
|
|
223
|
+
type Size = ComboboxSize;
|
|
224
|
+
namespace Root {
|
|
225
|
+
type Props<Value, Multiple extends boolean | undefined = false> = Combobox$1.Root.Props<Value, Multiple> & {
|
|
226
|
+
/**
|
|
227
|
+
* Control height and type, shared with the field.
|
|
228
|
+
* @default "md"
|
|
229
|
+
*/
|
|
230
|
+
size?: ComboboxSize;
|
|
231
|
+
/**
|
|
232
|
+
* Whether the combobox is loading async results — shows a spinner in place of the chevron and
|
|
233
|
+
* names it for assistive tech. Compose a `Status` for a richer live announcement.
|
|
234
|
+
* @default false
|
|
235
|
+
*/
|
|
236
|
+
loading?: boolean;
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
namespace Input {
|
|
240
|
+
type Props = Omit<Combobox$1.InputProps, "size"> & {
|
|
241
|
+
/**
|
|
242
|
+
* Control height and type, overriding the root's `size` for this field.
|
|
243
|
+
* @default the root's size
|
|
244
|
+
*/
|
|
245
|
+
size?: ComboboxSize;
|
|
246
|
+
/**
|
|
247
|
+
* Whether the field is invalid — shifts the border to the danger role. Usually flows from a
|
|
248
|
+
* `Field.Root` automatically; set it explicitly as an additive override.
|
|
249
|
+
*/
|
|
250
|
+
invalid?: boolean;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
namespace ChipsInput {
|
|
254
|
+
type Props = ComponentProps<"div"> & {
|
|
255
|
+
/** Whether the field is invalid — shifts the shell's border to the danger role. */invalid?: boolean; /** The `Chips` and `Input` that compose the multi-select field. */
|
|
256
|
+
children?: ReactNode;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
namespace Status {
|
|
260
|
+
type Props = Combobox$1.StatusProps;
|
|
261
|
+
}
|
|
262
|
+
namespace Icon {
|
|
263
|
+
type Props = Combobox$1.IconProps;
|
|
264
|
+
}
|
|
265
|
+
namespace Separator {
|
|
266
|
+
type Props = Combobox$1.SeparatorProps;
|
|
267
|
+
}
|
|
268
|
+
namespace InputGroup {
|
|
269
|
+
type Props = ComponentProps<typeof Combobox$1.InputGroup>;
|
|
270
|
+
}
|
|
271
|
+
namespace Trigger {
|
|
272
|
+
type Props = Combobox$1.TriggerProps;
|
|
273
|
+
}
|
|
274
|
+
namespace Clear {
|
|
275
|
+
type Props = ComponentProps<typeof Combobox$1.Clear>;
|
|
276
|
+
}
|
|
277
|
+
namespace Content {
|
|
278
|
+
type Props = Combobox$1.PopupProps & {
|
|
279
|
+
/**
|
|
280
|
+
* Gap from the field, in px.
|
|
281
|
+
* @default 6
|
|
282
|
+
*/
|
|
283
|
+
sideOffset?: Combobox$1.PositionerProps["sideOffset"];
|
|
284
|
+
/**
|
|
285
|
+
* Alignment along the field's edge.
|
|
286
|
+
* @default "start"
|
|
287
|
+
*/
|
|
288
|
+
align?: Combobox$1.PositionerProps["align"];
|
|
289
|
+
/**
|
|
290
|
+
* Minimum space kept from the viewport edge when avoiding collisions, in px.
|
|
291
|
+
* @default 8
|
|
292
|
+
*/
|
|
293
|
+
collisionPadding?: Combobox$1.PositionerProps["collisionPadding"];
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
namespace List {
|
|
297
|
+
type Props = Combobox$1.ListProps;
|
|
298
|
+
}
|
|
299
|
+
namespace Item {
|
|
300
|
+
type Props = Combobox$1.ItemProps;
|
|
301
|
+
}
|
|
302
|
+
namespace Empty {
|
|
303
|
+
type Props = Combobox$1.EmptyProps;
|
|
304
|
+
}
|
|
305
|
+
namespace Group {
|
|
306
|
+
type Props = ComponentProps<typeof Combobox$1.Group>;
|
|
307
|
+
}
|
|
308
|
+
namespace Collection {
|
|
309
|
+
type Props = ComponentProps<typeof Combobox$1.Collection>;
|
|
310
|
+
}
|
|
311
|
+
namespace GroupLabel {
|
|
312
|
+
type Props = ComponentProps<typeof Combobox$1.GroupLabel>;
|
|
313
|
+
}
|
|
314
|
+
namespace Value {
|
|
315
|
+
type Props = ComponentProps<typeof Combobox$1.Value>;
|
|
316
|
+
}
|
|
317
|
+
namespace Chips {
|
|
318
|
+
type Props = ComponentProps<typeof Combobox$1.Chips>;
|
|
319
|
+
}
|
|
320
|
+
namespace Chip {
|
|
321
|
+
type Props = ComponentProps<typeof Combobox$1.Chip>;
|
|
322
|
+
}
|
|
323
|
+
namespace ChipRemove {
|
|
324
|
+
type Props = ComponentProps<typeof Combobox$1.ChipRemove>;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
//#endregion
|
|
328
|
+
export { Combobox };
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon } from "../../icons/icon.js";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, SearchIcon, SpinnerIcon, XIcon } from "../../icons/glyphs.js";
|
|
4
|
+
import { useInjectedLabels } from "../../core/use-injected-labels.js";
|
|
5
|
+
import { VisuallyHidden } from "../../core/visually-hidden/visually-hidden.js";
|
|
6
|
+
import { Surface } from "../surface/surface.js";
|
|
7
|
+
import { Combobox as Combobox$1 } from "../../primitives/combobox/combobox.js";
|
|
8
|
+
import { ComboboxProvider, useComboboxContext } from "./combobox.context.js";
|
|
9
|
+
import { COMBOBOX_SLOTS } from "./combobox.slots.js";
|
|
10
|
+
import { chipProps, chipsInputProps, emptyProps, groupLabelProps, iconProps, inputProps, itemProps, listProps, separatorProps, statusProps } from "./combobox.props.js";
|
|
11
|
+
import clsx$1 from "clsx";
|
|
12
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/combobox/combobox.tsx
|
|
14
|
+
const LOADING_LABEL_DEFAULTS = { loadingLabel: "Loading…" };
|
|
15
|
+
const LOADING_LABEL_KEYS = { loadingLabel: "combobox.loadingLabel" };
|
|
16
|
+
/**
|
|
17
|
+
* Owns the combobox state and filtering, and shares the control `size` with the field. Wraps Base
|
|
18
|
+
* UI's Combobox (which auto-injects the active locale so the filter collator matches the reader).
|
|
19
|
+
* Renders no DOM element — compose an `Input`, a `Content` of `Item`s, and (for multiple selection)
|
|
20
|
+
* the `Chips`/`Chip` parts inside it.
|
|
21
|
+
*/
|
|
22
|
+
function ComboboxRoot({ size = "md", loading = false, children, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(ComboboxProvider, {
|
|
24
|
+
value: {
|
|
25
|
+
size,
|
|
26
|
+
loading
|
|
27
|
+
},
|
|
28
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Root, {
|
|
29
|
+
...props,
|
|
30
|
+
children
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The text field. Follows the field family look (filled surface, field border, a calm ring-less focus
|
|
36
|
+
* that shifts only the border) and reads the control `size` from the root unless overridden. Pass
|
|
37
|
+
* `invalid` for the danger border. Type to filter the list; the popup opens as you type.
|
|
38
|
+
*/
|
|
39
|
+
function ComboboxInput({ size, invalid, className, ...props }) {
|
|
40
|
+
const ctx = useComboboxContext("Input");
|
|
41
|
+
return /* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
42
|
+
...inputProps({
|
|
43
|
+
size: size ?? ctx.size,
|
|
44
|
+
invalid
|
|
45
|
+
}),
|
|
46
|
+
className: clsx$1(className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The field shell that lays out the `Input` beside its `Trigger`/`Clear` affordances. Wrap the input
|
|
52
|
+
* and the buttons in it so the chevron/clear pin to the field's inline-end.
|
|
53
|
+
*/
|
|
54
|
+
function ComboboxInputGroup({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(Combobox$1.InputGroup, {
|
|
56
|
+
"data-slot": COMBOBOX_SLOTS.inputGroup,
|
|
57
|
+
className: clsx$1(className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The button that opens the popup, sitting at the field's inline-end with a chevron that rotates
|
|
63
|
+
* while open. Decorative glyph; give it an `aria-label` so screen-reader users can open the list.
|
|
64
|
+
*/
|
|
65
|
+
function ComboboxTrigger({ className, children, ...props }) {
|
|
66
|
+
const { loading } = useComboboxContext("Trigger");
|
|
67
|
+
const labels = useInjectedLabels(LOADING_LABEL_DEFAULTS, LOADING_LABEL_KEYS, void 0);
|
|
68
|
+
return /* @__PURE__ */ jsx(Combobox$1.Trigger, {
|
|
69
|
+
"data-slot": COMBOBOX_SLOTS.trigger,
|
|
70
|
+
className: clsx$1(className),
|
|
71
|
+
...props,
|
|
72
|
+
children: children ?? (loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
73
|
+
"data-slot": COMBOBOX_SLOTS.spinner,
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
76
|
+
icon: SpinnerIcon,
|
|
77
|
+
size: "sm"
|
|
78
|
+
})
|
|
79
|
+
}), /* @__PURE__ */ jsx(VisuallyHidden, { children: labels.loadingLabel })] }) : /* @__PURE__ */ jsx(Icon, {
|
|
80
|
+
icon: ChevronDownIcon,
|
|
81
|
+
size: "sm",
|
|
82
|
+
"aria-hidden": true
|
|
83
|
+
}))
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The button that clears the current value, shown only while the field holds one. Give it an
|
|
88
|
+
* `aria-label`; it renders a small dismiss glyph by default.
|
|
89
|
+
*/
|
|
90
|
+
function ComboboxClear({ className, children, ...props }) {
|
|
91
|
+
return /* @__PURE__ */ jsx(Combobox$1.Clear, {
|
|
92
|
+
"data-slot": COMBOBOX_SLOTS.clear,
|
|
93
|
+
className: clsx$1(className),
|
|
94
|
+
...props,
|
|
95
|
+
children: children ?? /* @__PURE__ */ jsx(Icon, {
|
|
96
|
+
icon: XIcon,
|
|
97
|
+
size: "sm",
|
|
98
|
+
"aria-hidden": true
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The floating listbox surface — portaled, elevated, and animated — holding the options, groups, and
|
|
104
|
+
* the empty state. Opens below the field, aligned to its start, capped at the available viewport
|
|
105
|
+
* height so the list scrolls and keeps the keyboard highlight in view.
|
|
106
|
+
*/
|
|
107
|
+
function ComboboxContent({ sideOffset = 6, align = "start", collisionPadding = 8, className, style, children, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
109
|
+
"data-slot": COMBOBOX_SLOTS.positioner,
|
|
110
|
+
sideOffset,
|
|
111
|
+
align,
|
|
112
|
+
collisionPadding,
|
|
113
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
|
|
114
|
+
"data-slot": COMBOBOX_SLOTS.content,
|
|
115
|
+
render: /* @__PURE__ */ jsx(Surface, {
|
|
116
|
+
elevation: "menu",
|
|
117
|
+
bordered: true,
|
|
118
|
+
shadow: "popover"
|
|
119
|
+
}),
|
|
120
|
+
style: {
|
|
121
|
+
transformOrigin: "var(--transform-origin)",
|
|
122
|
+
maxHeight: "var(--available-height)",
|
|
123
|
+
minInlineSize: "var(--anchor-width)",
|
|
124
|
+
...style
|
|
125
|
+
},
|
|
126
|
+
className: clsx$1(className),
|
|
127
|
+
...props,
|
|
128
|
+
children
|
|
129
|
+
})
|
|
130
|
+
}) });
|
|
131
|
+
}
|
|
132
|
+
/** The scrollable listbox holding the option rows. Accepts an item-render child (`{(item) => …}`). */
|
|
133
|
+
function ComboboxList({ className, ...props }) {
|
|
134
|
+
return /* @__PURE__ */ jsx(Combobox$1.List, {
|
|
135
|
+
...listProps(),
|
|
136
|
+
"data-custom-scrollbar": true,
|
|
137
|
+
className: clsx$1(className),
|
|
138
|
+
...props
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* An option row. The leading column holds a check that appears once selected (mirroring the Menu item
|
|
143
|
+
* idiom); the row lights up neutrally — not the accent — while highlighted by pointer or keyboard.
|
|
144
|
+
*/
|
|
145
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
146
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
147
|
+
"data-slot": COMBOBOX_SLOTS.item,
|
|
148
|
+
className: clsx$1(className),
|
|
149
|
+
...props,
|
|
150
|
+
children: [/* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
|
|
151
|
+
keepMounted: true,
|
|
152
|
+
"data-slot": COMBOBOX_SLOTS.itemIndicator,
|
|
153
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
154
|
+
icon: CheckIcon,
|
|
155
|
+
size: "sm"
|
|
156
|
+
})
|
|
157
|
+
}), children]
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/** The centred message shown when the filter matches nothing. Holds the no-results copy. */
|
|
161
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
162
|
+
return /* @__PURE__ */ jsx(Combobox$1.Empty, {
|
|
163
|
+
...emptyProps(),
|
|
164
|
+
className: clsx$1(className),
|
|
165
|
+
...props
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/** A labelled section of related options. Put a `GroupLabel` inside to name it for screen readers. */
|
|
169
|
+
function ComboboxGroup({ className, ...props }) {
|
|
170
|
+
return /* @__PURE__ */ jsx(Combobox$1.Group, {
|
|
171
|
+
"data-slot": COMBOBOX_SLOTS.group,
|
|
172
|
+
className: clsx$1(className),
|
|
173
|
+
...props
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/** Maps a group's (or the list's) filtered items to rows via a render-prop child. Renders no element. */
|
|
177
|
+
function ComboboxCollection(props) {
|
|
178
|
+
return /* @__PURE__ */ jsx(Combobox$1.Collection, { ...props });
|
|
179
|
+
}
|
|
180
|
+
/** The group's muted, non-interactive heading — announced as the group's accessible name. */
|
|
181
|
+
function ComboboxGroupLabel({ className, ...props }) {
|
|
182
|
+
return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
|
|
183
|
+
...groupLabelProps(),
|
|
184
|
+
className: clsx$1(className),
|
|
185
|
+
...props
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Renders the current value(s); pass a render function to map over the selected values (the chip
|
|
190
|
+
* pattern for multiple selection). Renders no element of its own.
|
|
191
|
+
*/
|
|
192
|
+
function ComboboxValue(props) {
|
|
193
|
+
return /* @__PURE__ */ jsx(Combobox$1.Value, { ...props });
|
|
194
|
+
}
|
|
195
|
+
/** The wrapper that lays out the selected-value chips inside the field for multiple selection. */
|
|
196
|
+
function ComboboxChips({ className, ...props }) {
|
|
197
|
+
return /* @__PURE__ */ jsx(Combobox$1.Chips, {
|
|
198
|
+
"data-slot": COMBOBOX_SLOTS.chips,
|
|
199
|
+
className: clsx$1(className),
|
|
200
|
+
...props
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/** One selected value, rendered as a pill with a trailing remove control, for multiple selection. */
|
|
204
|
+
function ComboboxChip({ className, children, ...props }) {
|
|
205
|
+
return /* @__PURE__ */ jsx(Combobox$1.Chip, {
|
|
206
|
+
...chipProps(),
|
|
207
|
+
className: clsx$1(className),
|
|
208
|
+
...props,
|
|
209
|
+
children
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
/** The trailing remove control inside a chip. Give it an `aria-label`; it renders a dismiss glyph. */
|
|
213
|
+
function ComboboxChipRemove({ className, children, ...props }) {
|
|
214
|
+
return /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
|
|
215
|
+
"data-slot": COMBOBOX_SLOTS.chipRemove,
|
|
216
|
+
className: clsx$1(className),
|
|
217
|
+
...props,
|
|
218
|
+
children: children ?? /* @__PURE__ */ jsx(Icon, {
|
|
219
|
+
icon: XIcon,
|
|
220
|
+
size: "sm",
|
|
221
|
+
"aria-hidden": true
|
|
222
|
+
})
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The multi-select field shell: a bordered, filled box that wraps the `Chips` and the `Input` so they
|
|
227
|
+
* read as one field, with a single accent focus ring on `:focus-within`. Pass `invalid` for the danger
|
|
228
|
+
* border. Built on Base UI's `InputGroup`, so it is the popup's anchor — the list opens below the whole
|
|
229
|
+
* field, never over the chips — and a click anywhere in it focuses the input.
|
|
230
|
+
*/
|
|
231
|
+
function ComboboxChipsInput({ invalid, className, children, ...props }) {
|
|
232
|
+
return /* @__PURE__ */ jsx(Combobox$1.InputGroup, {
|
|
233
|
+
...chipsInputProps({ invalid }),
|
|
234
|
+
className: clsx$1(className),
|
|
235
|
+
...props,
|
|
236
|
+
children
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* A polite live region for async filtering — render it inside `Content` (kept mounted) and put the
|
|
241
|
+
* loading / results-count / no-results copy inside; Base UI announces content changes politely.
|
|
242
|
+
*/
|
|
243
|
+
function ComboboxStatus({ className, ...props }) {
|
|
244
|
+
return /* @__PURE__ */ jsx(Combobox$1.Status, {
|
|
245
|
+
...statusProps(),
|
|
246
|
+
className: clsx$1(className),
|
|
247
|
+
...props
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* A leading decorative icon in the field (a search magnifier by default), reserving a leading column.
|
|
252
|
+
* Muted and signal-free; Base UI marks it `aria-hidden`. Render it as the first child of the
|
|
253
|
+
* `InputGroup`, before the `Input`.
|
|
254
|
+
*/
|
|
255
|
+
function ComboboxIcon({ className, children, ...props }) {
|
|
256
|
+
return /* @__PURE__ */ jsx(Combobox$1.Icon, {
|
|
257
|
+
...iconProps(),
|
|
258
|
+
className: clsx$1(className),
|
|
259
|
+
...props,
|
|
260
|
+
children: children ?? /* @__PURE__ */ jsx(Icon, {
|
|
261
|
+
icon: SearchIcon,
|
|
262
|
+
size: "sm",
|
|
263
|
+
"aria-hidden": true
|
|
264
|
+
})
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/** A thin divider between option groups inside the list. Decorative structure, never accent. */
|
|
268
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
269
|
+
return /* @__PURE__ */ jsx(Combobox$1.Separator, {
|
|
270
|
+
...separatorProps(),
|
|
271
|
+
className: clsx$1(className),
|
|
272
|
+
...props
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* A filterable select: a text input that filters a floating list of options, for single or multiple
|
|
277
|
+
* selection. Built on Base UI's Combobox for type-to-filter, keyboard navigation (arrows, Home/End,
|
|
278
|
+
* `Enter` to select, `Escape` to dismiss), focus management, and locale-aware filtering.
|
|
279
|
+
*
|
|
280
|
+
* Compose from parts: `Combobox.Root` owns the state, `Combobox.Input` is the field (with optional
|
|
281
|
+
* `Trigger`/`Clear` affordances), and `Combobox.Content` holds the rows — `Item`s, `Group`s with a
|
|
282
|
+
* `GroupLabel`, and an `Empty` no-results message. For multiple selection, render `Chips`/`Chip`
|
|
283
|
+
* inside the field. The popup surface paint is owned by the composed `<Surface elevation="menu">`.
|
|
284
|
+
*
|
|
285
|
+
* Styling is precompiled in `combobox.css`, keyed off each part's prefixed `data-slot`. Several parts
|
|
286
|
+
* also carry the D12 `props()` escape hatch via `Object.assign` (e.g. `Combobox.Item.props({
|
|
287
|
+
* selected })`), returning a spreadable `{ "data-slot": "noctis-combobox-<part>", ...dataAttrs }` bag.
|
|
288
|
+
*
|
|
289
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
290
|
+
* exposed through the matching `Combobox` namespace — e.g. `Combobox.Item.Props`.
|
|
291
|
+
*/
|
|
292
|
+
const Combobox = {
|
|
293
|
+
Root: ComboboxRoot,
|
|
294
|
+
Input: Object.assign(ComboboxInput, { props: inputProps }),
|
|
295
|
+
InputGroup: ComboboxInputGroup,
|
|
296
|
+
ChipsInput: Object.assign(ComboboxChipsInput, { props: chipsInputProps }),
|
|
297
|
+
Icon: Object.assign(ComboboxIcon, { props: iconProps }),
|
|
298
|
+
Trigger: ComboboxTrigger,
|
|
299
|
+
Clear: ComboboxClear,
|
|
300
|
+
Content: ComboboxContent,
|
|
301
|
+
Status: Object.assign(ComboboxStatus, { props: statusProps }),
|
|
302
|
+
List: Object.assign(ComboboxList, { props: listProps }),
|
|
303
|
+
Item: Object.assign(ComboboxItem, { props: itemProps }),
|
|
304
|
+
Empty: Object.assign(ComboboxEmpty, { props: emptyProps }),
|
|
305
|
+
Group: ComboboxGroup,
|
|
306
|
+
Separator: Object.assign(ComboboxSeparator, { props: separatorProps }),
|
|
307
|
+
Collection: ComboboxCollection,
|
|
308
|
+
GroupLabel: Object.assign(ComboboxGroupLabel, { props: groupLabelProps }),
|
|
309
|
+
Value: ComboboxValue,
|
|
310
|
+
Chips: ComboboxChips,
|
|
311
|
+
Chip: Object.assign(ComboboxChip, { props: chipProps }),
|
|
312
|
+
ChipRemove: ComboboxChipRemove
|
|
313
|
+
};
|
|
314
|
+
//#endregion
|
|
315
|
+
export { Combobox };
|