@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,254 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon } from "../../icons/icon.js";
|
|
3
|
+
import { XIcon } from "../../icons/glyphs.js";
|
|
4
|
+
import { useInjectedLabels } from "../../core/use-injected-labels.js";
|
|
5
|
+
import { Surface } from "../surface/surface.js";
|
|
6
|
+
import { Button } from "../button/button.js";
|
|
7
|
+
import { collapsible_exports } from "../../primitives/collapsible.js";
|
|
8
|
+
import { RailLayoutProvider, RailTitleProvider, useRailLayout, useRailTitleId } from "./rail.context.js";
|
|
9
|
+
import { RAIL_SLOTS } from "./rail.slots.js";
|
|
10
|
+
import { bodyProps, closeProps, contentProps, headerProps, layoutProps, panelProps, rootProps, surfaceProps, titleProps, triggerProps } from "./rail.props.js";
|
|
11
|
+
import { useId } from "react";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/rail/rail.tsx
|
|
14
|
+
/**
|
|
15
|
+
* The translate distance for `push` — the rail's width, mapped from `RailSize`. The panel's own width
|
|
16
|
+
* is the `--_rail-panel-width` token; the push translate lives on a sibling subtree the token's slot
|
|
17
|
+
* doesn't reach, so it carries the same widths as a runtime var (`--rail-w`) here.
|
|
18
|
+
*/
|
|
19
|
+
const RAIL_WIDTH = {
|
|
20
|
+
xs: "14rem",
|
|
21
|
+
sm: "18rem",
|
|
22
|
+
md: "22rem",
|
|
23
|
+
lg: "28rem"
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Groups the parts and owns open state — controlled via `open`/`onOpenChange`, or uncontrolled via
|
|
27
|
+
* `defaultOpen` — on Base UI's Collapsible. Unlike a modal sheet, the rail is non-modal: no backdrop,
|
|
28
|
+
* no focus trap, no `Escape`-to-close. It renders transparently (`display: contents`) so the `Layout`
|
|
29
|
+
* (or a lone `Panel`) becomes the surrounding layout's child directly.
|
|
30
|
+
*
|
|
31
|
+
* Slot: `noctis-rail`.
|
|
32
|
+
* @see {@link Rail.Root.Props}
|
|
33
|
+
*/
|
|
34
|
+
function RailRoot({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(collapsible_exports.Collapsible.Root, {
|
|
36
|
+
"data-slot": RAIL_SLOTS.root,
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A button that toggles the rail. Base UI wires `aria-expanded` and `aria-controls` to the panel.
|
|
43
|
+
*
|
|
44
|
+
* Slot: `noctis-rail-trigger`.
|
|
45
|
+
* @see {@link Rail.Trigger.Props}
|
|
46
|
+
*/
|
|
47
|
+
function RailTrigger({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(collapsible_exports.Collapsible.Trigger, {
|
|
49
|
+
"data-slot": RAIL_SLOTS.trigger,
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The docking row: lays the content and the rail side by side and sets the reflow `variant` so an
|
|
56
|
+
* open rail reshapes the content beside it. Place a `Rail.Content` and a `Rail.Panel` inside. Use this
|
|
57
|
+
* to dock a rail inside a region; drop a `Rail.Panel` on its own (no `Layout`) to dock it to the
|
|
58
|
+
* viewport edge instead.
|
|
59
|
+
*
|
|
60
|
+
* Slot: `noctis-rail-layout`.
|
|
61
|
+
* @see {@link Rail.Layout.Props}
|
|
62
|
+
*/
|
|
63
|
+
function RailLayout({ variant = "squeeze", side = "end", size = "md", className, style, ...props }) {
|
|
64
|
+
const railStyle = {
|
|
65
|
+
"--rail-w": RAIL_WIDTH[size],
|
|
66
|
+
...style
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ jsx(RailLayoutProvider, {
|
|
69
|
+
value: {
|
|
70
|
+
variant,
|
|
71
|
+
side,
|
|
72
|
+
size
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
75
|
+
"data-slot": RAIL_SLOTS.layout,
|
|
76
|
+
"data-variant": variant,
|
|
77
|
+
className,
|
|
78
|
+
style: railStyle,
|
|
79
|
+
...props
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The content beside the rail inside a `Rail.Layout`. Reshapes per the layout's `variant` when open.
|
|
85
|
+
*
|
|
86
|
+
* Slot: `noctis-rail-content`.
|
|
87
|
+
* @see {@link Rail.Content.Props}
|
|
88
|
+
*/
|
|
89
|
+
function RailContent({ className, ...props }) {
|
|
90
|
+
const layout = useRailLayout();
|
|
91
|
+
return /* @__PURE__ */ jsx("div", {
|
|
92
|
+
"data-slot": RAIL_SLOTS.content,
|
|
93
|
+
"data-variant": layout?.variant ?? "squeeze",
|
|
94
|
+
"data-side": layout?.side ?? "end",
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The docked rail itself: a `Collapsible.Panel` rendered as an `aside` (a complementary landmark).
|
|
101
|
+
* Kept mounted while closed and hidden via Base UI, so it leaves the layout and the a11y tree without
|
|
102
|
+
* losing its content. Drop `Rail.Header`/`Rail.Body` inside; a `Rail.Title` names it automatically via
|
|
103
|
+
* `aria-labelledby`. Inside a `Rail.Layout` it docks in that layout's cell; on its own it docks to the
|
|
104
|
+
* viewport edge. `side`/`size` default to the surrounding `Rail.Layout`'s.
|
|
105
|
+
*
|
|
106
|
+
* Slots: `noctis-rail-panel` (the collapsible), `noctis-rail-surface` (the inner surface).
|
|
107
|
+
* @see {@link Rail.Panel.Props}
|
|
108
|
+
*/
|
|
109
|
+
function RailPanel({ side, size, keepMounted = true, className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }) {
|
|
110
|
+
const layout = useRailLayout();
|
|
111
|
+
const titleId = useId();
|
|
112
|
+
const resolvedSide = side ?? layout?.side ?? "end";
|
|
113
|
+
const resolvedSize = size ?? layout?.size ?? "md";
|
|
114
|
+
const docking = layout ? "inline" : "dock";
|
|
115
|
+
return /* @__PURE__ */ jsx(RailTitleProvider, {
|
|
116
|
+
value: titleId,
|
|
117
|
+
children: /* @__PURE__ */ jsx(collapsible_exports.Collapsible.Panel, {
|
|
118
|
+
"data-slot": RAIL_SLOTS.panel,
|
|
119
|
+
"data-docking": docking,
|
|
120
|
+
"data-variant": layout?.variant ?? "squeeze",
|
|
121
|
+
"data-side": resolvedSide,
|
|
122
|
+
"data-size": resolvedSize,
|
|
123
|
+
keepMounted,
|
|
124
|
+
"aria-label": ariaLabel,
|
|
125
|
+
"aria-labelledby": ariaLabelledby ?? (ariaLabel ? void 0 : titleId),
|
|
126
|
+
className,
|
|
127
|
+
render: /* @__PURE__ */ jsx("aside", {}),
|
|
128
|
+
...props,
|
|
129
|
+
children: /* @__PURE__ */ jsx(Surface, {
|
|
130
|
+
"data-slot": RAIL_SLOTS.surface,
|
|
131
|
+
"data-side": resolvedSide,
|
|
132
|
+
children
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/** English fallbacks and catalog keys for the close button's accessible name (resolved per active locale). */
|
|
138
|
+
const DEFAULT_CLOSE_LABELS = { close: "Close" };
|
|
139
|
+
const CLOSE_LABEL_KEYS = { close: "rail.closeLabel" };
|
|
140
|
+
/**
|
|
141
|
+
* A ghost icon button that closes the rail. Defaults its glyph to a lucide `X` and its name to the
|
|
142
|
+
* translated "Close"; pass `children` to swap the glyph or `aria-label` to override the name.
|
|
143
|
+
*
|
|
144
|
+
* Slot: `noctis-rail-close`.
|
|
145
|
+
* @see {@link Rail.Close.Props}
|
|
146
|
+
*/
|
|
147
|
+
function RailClose({ className, children, "aria-label": ariaLabel, ...props }) {
|
|
148
|
+
const labels = useInjectedLabels(DEFAULT_CLOSE_LABELS, CLOSE_LABEL_KEYS, void 0);
|
|
149
|
+
return /* @__PURE__ */ jsx(collapsible_exports.Collapsible.Trigger, {
|
|
150
|
+
...Button.props({
|
|
151
|
+
variant: "ghost",
|
|
152
|
+
iconOnly: true
|
|
153
|
+
}),
|
|
154
|
+
"data-slot": RAIL_SLOTS.close,
|
|
155
|
+
"aria-label": ariaLabel ?? labels.close,
|
|
156
|
+
className,
|
|
157
|
+
...props,
|
|
158
|
+
children: children ?? /* @__PURE__ */ jsx(Icon, {
|
|
159
|
+
icon: XIcon,
|
|
160
|
+
size: "sm"
|
|
161
|
+
})
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The rail's top region — title and corner actions. Separated by a divider.
|
|
166
|
+
*
|
|
167
|
+
* Slot: `noctis-rail-header`.
|
|
168
|
+
* @see {@link Rail.Header.Props}
|
|
169
|
+
*/
|
|
170
|
+
function RailHeader({ className, ...props }) {
|
|
171
|
+
return /* @__PURE__ */ jsx("div", {
|
|
172
|
+
"data-slot": RAIL_SLOTS.header,
|
|
173
|
+
className,
|
|
174
|
+
...props
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* The scrollable middle region. Grows to fill and scrolls its overflow so the header stays put.
|
|
179
|
+
*
|
|
180
|
+
* Slot: `noctis-rail-body`.
|
|
181
|
+
* @see {@link Rail.Body.Props}
|
|
182
|
+
*/
|
|
183
|
+
function RailBody({ className, ...props }) {
|
|
184
|
+
return /* @__PURE__ */ jsx("div", {
|
|
185
|
+
"data-slot": RAIL_SLOTS.body,
|
|
186
|
+
className,
|
|
187
|
+
...props
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* The accessible name of the rail, linked to the panel via `aria-labelledby`. Renders an `<h2>`.
|
|
192
|
+
*
|
|
193
|
+
* Slot: `noctis-rail-title`.
|
|
194
|
+
* @see {@link Rail.Title.Props}
|
|
195
|
+
*/
|
|
196
|
+
function RailTitle({ className, children, ...props }) {
|
|
197
|
+
const titleId = useRailTitleId();
|
|
198
|
+
return /* @__PURE__ */ jsx("h2", {
|
|
199
|
+
"data-slot": RAIL_SLOTS.title,
|
|
200
|
+
className,
|
|
201
|
+
...props,
|
|
202
|
+
id: titleId ?? void 0,
|
|
203
|
+
children
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A docked, collapsible side rail — a non-modal panel that lives in the layout rather than over it.
|
|
208
|
+
*
|
|
209
|
+
* **Rail vs. Sheet.** Reach for a `Sheet` when the panel is a *modal task*: it overlays the page on a
|
|
210
|
+
* dimmed backdrop, traps focus, and closes on `Escape`/outside-click — the page behind is inert until
|
|
211
|
+
* it's dismissed. Reach for a `Rail` when the panel is a *persistent companion* to the page (an
|
|
212
|
+
* inspector, a filter rail, a settings panel): it docks beside the content and **reshapes** it instead
|
|
213
|
+
* of covering it, so the page stays fully usable with the rail open. No backdrop, no focus trap, no
|
|
214
|
+
* `Escape`-to-close.
|
|
215
|
+
*
|
|
216
|
+
* **Two reflow variants** (set on {@link Rail.Layout}): `squeeze` shrinks the content's width so it
|
|
217
|
+
* re-lays-out into the narrower space; `push` keeps the content's width and slides it over, clipping
|
|
218
|
+
* the overflow. Both keep the content interactive — that's the line between a rail and a sheet.
|
|
219
|
+
*
|
|
220
|
+
* **Docking.** Wrap a `Rail.Content` and a `Rail.Panel` in a `Rail.Layout` to dock the rail inside a
|
|
221
|
+
* region. Or drop a `Rail.Panel` straight into the page (no `Layout`) to dock it full-height to the
|
|
222
|
+
* viewport edge — reflowing on large screens, overlaying the edge on small ones.
|
|
223
|
+
*
|
|
224
|
+
* Compose it from parts: `Rail.Root` owns state, `Rail.Trigger` toggles it, `Rail.Layout` +
|
|
225
|
+
* `Rail.Content` set up the reflow, and `Rail.Panel` holds `Header`/`Body`, `Title`, and `Close`.
|
|
226
|
+
*
|
|
227
|
+
* Built on Base UI's Collapsible for the open/close behavior, measured-size animation, and a11y; the
|
|
228
|
+
* runtime compound is a plain object (kept tree-shakeable), with per-part prop types exposed through
|
|
229
|
+
* the matching `Rail` namespace below — e.g. `Rail.Panel.Props`.
|
|
230
|
+
*/
|
|
231
|
+
const Rail = {
|
|
232
|
+
/** Groups the parts and owns open state. `Rail.Root.props()` → its spreadable prop bag. */
|
|
233
|
+
Root: Object.assign(RailRoot, { props: rootProps }),
|
|
234
|
+
/** Toggles the rail. `Rail.Trigger.props()` → its spreadable prop bag. */
|
|
235
|
+
Trigger: Object.assign(RailTrigger, { props: triggerProps }),
|
|
236
|
+
/** The docking row. `Rail.Layout.props({ variant })` → its spreadable prop bag. */
|
|
237
|
+
Layout: Object.assign(RailLayout, { props: layoutProps }),
|
|
238
|
+
/** The content beside the rail. `Rail.Content.props({ variant, side })` → its spreadable prop bag. */
|
|
239
|
+
Content: Object.assign(RailContent, { props: contentProps }),
|
|
240
|
+
/** The docked rail. `Rail.Panel.props({ docking, variant, side, size })` → its spreadable prop bag. */
|
|
241
|
+
Panel: Object.assign(RailPanel, { props: panelProps }),
|
|
242
|
+
/** The ghost-icon close button. `Rail.Close.props()` → its spreadable prop bag. */
|
|
243
|
+
Close: Object.assign(RailClose, { props: closeProps }),
|
|
244
|
+
/** The header region. `Rail.Header.props()` → its spreadable prop bag. */
|
|
245
|
+
Header: Object.assign(RailHeader, { props: headerProps }),
|
|
246
|
+
/** The scrollable body. `Rail.Body.props()` → its spreadable prop bag. */
|
|
247
|
+
Body: Object.assign(RailBody, { props: bodyProps }),
|
|
248
|
+
/** The accessible name. `Rail.Title.props()` → its spreadable prop bag. */
|
|
249
|
+
Title: Object.assign(RailTitle, { props: titleProps }),
|
|
250
|
+
/** The inner surface escape-hatch. `Rail.Surface.props({ side })` → its spreadable prop bag. */
|
|
251
|
+
Surface: { props: surfaceProps }
|
|
252
|
+
};
|
|
253
|
+
//#endregion
|
|
254
|
+
export { Rail };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { RailSide, RailSize, RailVariant } from "./rail.context.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/rail/rail.props.d.ts
|
|
4
|
+
/** A spreadable data-attribute prop bag — the shape every `Rail.*.props()` returns. */
|
|
5
|
+
type RailPartProps = {
|
|
6
|
+
/** The slot value the matching `rail.css` rules anchor on. */"data-slot": string; /** Forwarded verbatim — styling is attribute-driven, so this is an optional consumer passthrough. */
|
|
7
|
+
className?: string; /** A data-attribute present (a value) or absent (`undefined`); never `false`. */
|
|
8
|
+
[attr: `data-${string}`]: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
/** Common shape: every part's `.props()` accepts an optional `className` passthrough. */
|
|
11
|
+
interface BasePropsArgs {
|
|
12
|
+
/** Forwarded verbatim onto the returned prop bag. */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Argument to `Rail.Root.props(...)` — the contents-root that carries the `--_rail-padding` scope. */
|
|
16
|
+
type RailRootPropsArgs = BasePropsArgs;
|
|
17
|
+
/** Argument to `Rail.Trigger.props(...)` — slot-only; toggles the rail. */
|
|
18
|
+
type RailTriggerPropsArgs = BasePropsArgs;
|
|
19
|
+
/** Argument to `Rail.Layout.props(...)` — the docking row; `variant` drives the push-clip overflow. */
|
|
20
|
+
interface RailLayoutPropsArgs extends BasePropsArgs {
|
|
21
|
+
/** How an open rail reshapes the content. @default "squeeze" */
|
|
22
|
+
variant?: RailVariant;
|
|
23
|
+
}
|
|
24
|
+
/** Argument to `Rail.Content.props(...)` — the region beside the rail; `variant`/`side` drive its reflow. */
|
|
25
|
+
interface RailContentPropsArgs extends BasePropsArgs {
|
|
26
|
+
/** How an open rail reshapes this content. @default "squeeze" */
|
|
27
|
+
variant?: RailVariant;
|
|
28
|
+
/** Which edge the rail docks to (the push slide direction). @default "end" */
|
|
29
|
+
side?: RailSide;
|
|
30
|
+
}
|
|
31
|
+
/** Argument to `Rail.Panel.props(...)` — the collapsible; carries docking mode, reflow, side, and size. */
|
|
32
|
+
interface RailPanelPropsArgs extends BasePropsArgs {
|
|
33
|
+
/** Standalone (viewport-edge) vs in-layout docking. @default "dock" */
|
|
34
|
+
docking?: "dock" | "inline";
|
|
35
|
+
/** The surrounding layout's reflow mode (only meaningful for `inline` docking). @default "squeeze" */
|
|
36
|
+
variant?: RailVariant;
|
|
37
|
+
/** Which edge the rail docks to. @default "end" */
|
|
38
|
+
side?: RailSide;
|
|
39
|
+
/** The rail's width — re-points the `--_rail-panel-width` token. @default "md" */
|
|
40
|
+
size?: RailSize;
|
|
41
|
+
}
|
|
42
|
+
/** Argument to `Rail.Surface.props(...)` — the inner surface; `side` draws the divider toward the content. */
|
|
43
|
+
interface RailSurfacePropsArgs extends BasePropsArgs {
|
|
44
|
+
/** Which edge the rail docks to (the divider faces the content). @default "end" */
|
|
45
|
+
side?: RailSide;
|
|
46
|
+
}
|
|
47
|
+
/** Argument to a stateless part's `.props(...)` — no recipe of its own; look flows from its own slot. */
|
|
48
|
+
type RailStatelessPropsArgs = BasePropsArgs;
|
|
49
|
+
/** Root prop bag: the contents-root slot anchor (also the `--_rail-padding` scope). */
|
|
50
|
+
declare function rootProps({
|
|
51
|
+
className
|
|
52
|
+
}?: RailRootPropsArgs): RailPartProps;
|
|
53
|
+
/** Trigger prop bag: just the slot anchor. */
|
|
54
|
+
declare function triggerProps({
|
|
55
|
+
className
|
|
56
|
+
}?: RailTriggerPropsArgs): RailPartProps;
|
|
57
|
+
/** Layout prop bag: slot anchor plus the `data-variant` the push-clip overflow keys off. */
|
|
58
|
+
declare function layoutProps({
|
|
59
|
+
variant,
|
|
60
|
+
className
|
|
61
|
+
}?: RailLayoutPropsArgs): RailPartProps;
|
|
62
|
+
/** Content prop bag: slot anchor plus the `data-variant`/`data-side` the reflow + push slide read. */
|
|
63
|
+
declare function contentProps({
|
|
64
|
+
variant,
|
|
65
|
+
side,
|
|
66
|
+
className
|
|
67
|
+
}?: RailContentPropsArgs): RailPartProps;
|
|
68
|
+
/** Panel prop bag: slot anchor plus the `data-docking`/`data-variant`/`data-side`/`data-size` recipe. */
|
|
69
|
+
declare function panelProps({
|
|
70
|
+
docking,
|
|
71
|
+
variant,
|
|
72
|
+
side,
|
|
73
|
+
size,
|
|
74
|
+
className
|
|
75
|
+
}?: RailPanelPropsArgs): RailPartProps;
|
|
76
|
+
/** Surface prop bag: slot anchor plus the `data-side` the divider edge keys off. */
|
|
77
|
+
declare function surfaceProps({
|
|
78
|
+
side,
|
|
79
|
+
className
|
|
80
|
+
}?: RailSurfacePropsArgs): RailPartProps;
|
|
81
|
+
/** Close prop bag: just the slot anchor (its ghost-icon look comes from the composed `Button.props`). */
|
|
82
|
+
declare function closeProps({
|
|
83
|
+
className
|
|
84
|
+
}?: RailStatelessPropsArgs): RailPartProps;
|
|
85
|
+
/** Header prop bag: just the slot anchor. */
|
|
86
|
+
declare function headerProps({
|
|
87
|
+
className
|
|
88
|
+
}?: RailStatelessPropsArgs): RailPartProps;
|
|
89
|
+
/** Body prop bag: just the slot anchor. */
|
|
90
|
+
declare function bodyProps({
|
|
91
|
+
className
|
|
92
|
+
}?: RailStatelessPropsArgs): RailPartProps;
|
|
93
|
+
/** Title prop bag: just the slot anchor. */
|
|
94
|
+
declare function titleProps({
|
|
95
|
+
className
|
|
96
|
+
}?: RailStatelessPropsArgs): RailPartProps;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { RailPartProps, bodyProps, closeProps, contentProps, headerProps, layoutProps, panelProps, rootProps, surfaceProps, titleProps, triggerProps };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { RAIL_SLOTS } from "./rail.slots.js";
|
|
2
|
+
//#region src/components/rail/rail.props.ts
|
|
3
|
+
const withClassName = (bag, className) => className === void 0 ? bag : {
|
|
4
|
+
...bag,
|
|
5
|
+
className
|
|
6
|
+
};
|
|
7
|
+
/** Root prop bag: the contents-root slot anchor (also the `--_rail-padding` scope). */
|
|
8
|
+
function rootProps({ className } = {}) {
|
|
9
|
+
return withClassName({ "data-slot": RAIL_SLOTS.root }, className);
|
|
10
|
+
}
|
|
11
|
+
/** Trigger prop bag: just the slot anchor. */
|
|
12
|
+
function triggerProps({ className } = {}) {
|
|
13
|
+
return withClassName({ "data-slot": RAIL_SLOTS.trigger }, className);
|
|
14
|
+
}
|
|
15
|
+
/** Layout prop bag: slot anchor plus the `data-variant` the push-clip overflow keys off. */
|
|
16
|
+
function layoutProps({ variant = "squeeze", className } = {}) {
|
|
17
|
+
return withClassName({
|
|
18
|
+
"data-slot": RAIL_SLOTS.layout,
|
|
19
|
+
"data-variant": variant
|
|
20
|
+
}, className);
|
|
21
|
+
}
|
|
22
|
+
/** Content prop bag: slot anchor plus the `data-variant`/`data-side` the reflow + push slide read. */
|
|
23
|
+
function contentProps({ variant = "squeeze", side = "end", className } = {}) {
|
|
24
|
+
return withClassName({
|
|
25
|
+
"data-slot": RAIL_SLOTS.content,
|
|
26
|
+
"data-variant": variant,
|
|
27
|
+
"data-side": side
|
|
28
|
+
}, className);
|
|
29
|
+
}
|
|
30
|
+
/** Panel prop bag: slot anchor plus the `data-docking`/`data-variant`/`data-side`/`data-size` recipe. */
|
|
31
|
+
function panelProps({ docking = "dock", variant = "squeeze", side = "end", size = "md", className } = {}) {
|
|
32
|
+
return withClassName({
|
|
33
|
+
"data-slot": RAIL_SLOTS.panel,
|
|
34
|
+
"data-docking": docking,
|
|
35
|
+
"data-variant": variant,
|
|
36
|
+
"data-side": side,
|
|
37
|
+
"data-size": size
|
|
38
|
+
}, className);
|
|
39
|
+
}
|
|
40
|
+
/** Surface prop bag: slot anchor plus the `data-side` the divider edge keys off. */
|
|
41
|
+
function surfaceProps({ side = "end", className } = {}) {
|
|
42
|
+
return withClassName({
|
|
43
|
+
"data-slot": RAIL_SLOTS.surface,
|
|
44
|
+
"data-side": side
|
|
45
|
+
}, className);
|
|
46
|
+
}
|
|
47
|
+
/** Close prop bag: just the slot anchor (its ghost-icon look comes from the composed `Button.props`). */
|
|
48
|
+
function closeProps({ className } = {}) {
|
|
49
|
+
return withClassName({ "data-slot": RAIL_SLOTS.close }, className);
|
|
50
|
+
}
|
|
51
|
+
/** Header prop bag: just the slot anchor. */
|
|
52
|
+
function headerProps({ className } = {}) {
|
|
53
|
+
return withClassName({ "data-slot": RAIL_SLOTS.header }, className);
|
|
54
|
+
}
|
|
55
|
+
/** Body prop bag: just the slot anchor. */
|
|
56
|
+
function bodyProps({ className } = {}) {
|
|
57
|
+
return withClassName({ "data-slot": RAIL_SLOTS.body }, className);
|
|
58
|
+
}
|
|
59
|
+
/** Title prop bag: just the slot anchor. */
|
|
60
|
+
function titleProps({ className } = {}) {
|
|
61
|
+
return withClassName({ "data-slot": RAIL_SLOTS.title }, className);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { bodyProps, closeProps, contentProps, headerProps, layoutProps, panelProps, rootProps, surfaceProps, titleProps, triggerProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/components/rail/rail.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The data attributes `Rail`'s parts expose for styling and testing. Each member's value is the
|
|
4
|
+
* attribute name and its JSDoc is the description; the docs API reference reads this enum directly, so
|
|
5
|
+
* the documented attributes can't drift from the precompiled `rail.css` rules that key off them.
|
|
6
|
+
*/
|
|
7
|
+
declare enum RailDataAttributes {
|
|
8
|
+
/** The catalog slot that anchors every `rail.css` rule and marks the part for SLOTS.md/testing. */
|
|
9
|
+
slot = "data-slot",
|
|
10
|
+
/** The reflow mode — `squeeze` | `push` — on the layout/content/panel; drives clip/slide/float. */
|
|
11
|
+
variant = "data-variant",
|
|
12
|
+
/** Which edge the rail docks to — `start` | `end`; drives the divider edge and the slide direction. */
|
|
13
|
+
side = "data-side",
|
|
14
|
+
/** The rail's width — `xs` | `sm` | `md` | `lg`; the generated layer keys the width token off it. */
|
|
15
|
+
size = "data-size",
|
|
16
|
+
/** Standalone vs in-layout docking — `dock` | `inline`; selects the viewport-edge vs cell rules. */
|
|
17
|
+
docking = "data-docking"
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { RailDataAttributes };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region src/components/rail/rail.slots.ts
|
|
2
|
+
/**
|
|
3
|
+
* The slot vocabulary every `Rail` part stamps as its `data-slot`. The authored source the
|
|
4
|
+
* orchestration file reads from, kebab-cased `{component}[-{part}]` under the `noctis-` prefix; SLOTS.md
|
|
5
|
+
* still generates from the token-graph declarations. `Rail.Root` renders a `display: contents` element
|
|
6
|
+
* carrying the bare `noctis-rail` slot, and `Rail.Panel` stamps two — `noctis-rail-panel` on the
|
|
7
|
+
* collapsible and `noctis-rail-surface` on the inner surface.
|
|
8
|
+
*/
|
|
9
|
+
const RAIL_SLOTS = {
|
|
10
|
+
root: "noctis-rail",
|
|
11
|
+
trigger: "noctis-rail-trigger",
|
|
12
|
+
layout: "noctis-rail-layout",
|
|
13
|
+
content: "noctis-rail-content",
|
|
14
|
+
panel: "noctis-rail-panel",
|
|
15
|
+
surface: "noctis-rail-surface",
|
|
16
|
+
close: "noctis-rail-close",
|
|
17
|
+
header: "noctis-rail-header",
|
|
18
|
+
body: "noctis-rail-body",
|
|
19
|
+
title: "noctis-rail-title"
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The data attributes `Rail`'s parts expose for styling and testing. Each member's value is the
|
|
23
|
+
* attribute name and its JSDoc is the description; the docs API reference reads this enum directly, so
|
|
24
|
+
* the documented attributes can't drift from the precompiled `rail.css` rules that key off them.
|
|
25
|
+
*/
|
|
26
|
+
let RailDataAttributes = /* @__PURE__ */ function(RailDataAttributes) {
|
|
27
|
+
/** The catalog slot that anchors every `rail.css` rule and marks the part for SLOTS.md/testing. */
|
|
28
|
+
RailDataAttributes["slot"] = "data-slot";
|
|
29
|
+
/** The reflow mode — `squeeze` | `push` — on the layout/content/panel; drives clip/slide/float. */
|
|
30
|
+
RailDataAttributes["variant"] = "data-variant";
|
|
31
|
+
/** Which edge the rail docks to — `start` | `end`; drives the divider edge and the slide direction. */
|
|
32
|
+
RailDataAttributes["side"] = "data-side";
|
|
33
|
+
/** The rail's width — `xs` | `sm` | `md` | `lg`; the generated layer keys the width token off it. */
|
|
34
|
+
RailDataAttributes["size"] = "data-size";
|
|
35
|
+
/** Standalone vs in-layout docking — `dock` | `inline`; selects the viewport-edge vs cell rules. */
|
|
36
|
+
RailDataAttributes["docking"] = "data-docking";
|
|
37
|
+
return RailDataAttributes;
|
|
38
|
+
}({});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { RAIL_SLOTS, RailDataAttributes };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, use } from "react";
|
|
3
|
+
//#region src/components/scroll-area/scroll-area.context.ts
|
|
4
|
+
const ScrollAreaContext = createContext(null);
|
|
5
|
+
/** Provides the root's visibility policy to the scrollbars beneath it. */
|
|
6
|
+
const ScrollAreaProvider = ScrollAreaContext.Provider;
|
|
7
|
+
/**
|
|
8
|
+
* Read the scroll-area context, or `null` when a part renders standalone (outside `ScrollArea.Root`)
|
|
9
|
+
* — the scrollbar stays usable on its own, it just can't auto-derive `keepMounted` from the policy.
|
|
10
|
+
*/
|
|
11
|
+
function useScrollAreaContext() {
|
|
12
|
+
return use(ScrollAreaContext);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ScrollAreaProvider, useScrollAreaContext };
|