@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,41 @@
|
|
|
1
|
+
import { SWITCH_SLOTS } from "./switch.slots.js";
|
|
2
|
+
//#region src/components/switch/switch.props.ts
|
|
3
|
+
/** Stamp a boolean state as a bare data-attribute: present (`""`) when on, absent (`undefined`) when off. */
|
|
4
|
+
const flag = (on) => on ? "" : void 0;
|
|
5
|
+
const withClassName = (bag, className) => className === void 0 ? bag : {
|
|
6
|
+
...bag,
|
|
7
|
+
className
|
|
8
|
+
};
|
|
9
|
+
/** Track prop bag: slot anchor plus the `data-size`/`data-checked`/`data-disabled`/`data-readonly`/`data-invalid` the CSS keys off. */
|
|
10
|
+
function switchProps({ size = "md", checked, disabled, readonly, invalid, className } = {}) {
|
|
11
|
+
return withClassName({
|
|
12
|
+
"data-slot": SWITCH_SLOTS.root,
|
|
13
|
+
"data-size": size,
|
|
14
|
+
"data-checked": flag(checked),
|
|
15
|
+
"data-disabled": flag(disabled),
|
|
16
|
+
"data-readonly": flag(readonly),
|
|
17
|
+
"data-invalid": flag(invalid)
|
|
18
|
+
}, className);
|
|
19
|
+
}
|
|
20
|
+
/** Thumb prop bag: slot anchor plus the `data-checked`/`data-disabled` that drives its travel. */
|
|
21
|
+
function thumbProps({ checked, disabled, className } = {}) {
|
|
22
|
+
return withClassName({
|
|
23
|
+
"data-slot": SWITCH_SLOTS.thumb,
|
|
24
|
+
"data-checked": flag(checked),
|
|
25
|
+
"data-disabled": flag(disabled)
|
|
26
|
+
}, className);
|
|
27
|
+
}
|
|
28
|
+
/** Field prop bag: the slot anchor for the row that pairs a switch with its label. */
|
|
29
|
+
function fieldProps({ className } = {}) {
|
|
30
|
+
return withClassName({ "data-slot": SWITCH_SLOTS.field }, className);
|
|
31
|
+
}
|
|
32
|
+
/** Label prop bag: slot anchor plus the `data-disabled`/`data-invalid` that mirror the field state. */
|
|
33
|
+
function labelProps({ disabled, invalid, className } = {}) {
|
|
34
|
+
return withClassName({
|
|
35
|
+
"data-slot": SWITCH_SLOTS.label,
|
|
36
|
+
"data-disabled": flag(disabled),
|
|
37
|
+
"data-invalid": flag(invalid)
|
|
38
|
+
}, className);
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { fieldProps, labelProps, switchProps, thumbProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/components/switch/switch.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The `data-*` attributes Base UI's switch stamps, which `switch.css` keys its checked/disabled styling
|
|
4
|
+
* off. Each member's value is the attribute name; its JSDoc is the description docgen renders.
|
|
5
|
+
*/
|
|
6
|
+
declare enum SwitchDataAttributes {
|
|
7
|
+
/** The stable styling/testing hook on each rendered part. */
|
|
8
|
+
slot = "data-slot",
|
|
9
|
+
/** Present on the track and thumb when the switch is on. */
|
|
10
|
+
checked = "data-checked",
|
|
11
|
+
/** Present on the track and thumb when the switch is off. */
|
|
12
|
+
unchecked = "data-unchecked",
|
|
13
|
+
/** Present when the switch is disabled. */
|
|
14
|
+
disabled = "data-disabled",
|
|
15
|
+
/** Present when the switch is read-only. */
|
|
16
|
+
readonly = "data-readonly",
|
|
17
|
+
/** Present when the switch is in an invalid state (also honours `aria-invalid`). */
|
|
18
|
+
invalid = "data-invalid",
|
|
19
|
+
/** The size axis, stamped on the track; the thumb diameter re-points off it. */
|
|
20
|
+
size = "data-size"
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { SwitchDataAttributes };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/components/switch/switch.slots.ts
|
|
2
|
+
/**
|
|
3
|
+
* The slot vocabulary every `Switch` part stamps as its `data-slot`. The authored source the
|
|
4
|
+
* orchestration files read from, kebab-cased `{component}-{part}`; SLOTS.md still generates from the
|
|
5
|
+
* token-graph declarations.
|
|
6
|
+
*/
|
|
7
|
+
const SWITCH_SLOTS = {
|
|
8
|
+
root: "noctis-switch",
|
|
9
|
+
thumb: "noctis-switch-thumb",
|
|
10
|
+
field: "noctis-switch-field",
|
|
11
|
+
label: "noctis-switch-label"
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The `data-*` attributes Base UI's switch stamps, which `switch.css` keys its checked/disabled styling
|
|
15
|
+
* off. Each member's value is the attribute name; its JSDoc is the description docgen renders.
|
|
16
|
+
*/
|
|
17
|
+
let SwitchDataAttributes = /* @__PURE__ */ function(SwitchDataAttributes) {
|
|
18
|
+
/** The stable styling/testing hook on each rendered part. */
|
|
19
|
+
SwitchDataAttributes["slot"] = "data-slot";
|
|
20
|
+
/** Present on the track and thumb when the switch is on. */
|
|
21
|
+
SwitchDataAttributes["checked"] = "data-checked";
|
|
22
|
+
/** Present on the track and thumb when the switch is off. */
|
|
23
|
+
SwitchDataAttributes["unchecked"] = "data-unchecked";
|
|
24
|
+
/** Present when the switch is disabled. */
|
|
25
|
+
SwitchDataAttributes["disabled"] = "data-disabled";
|
|
26
|
+
/** Present when the switch is read-only. */
|
|
27
|
+
SwitchDataAttributes["readonly"] = "data-readonly";
|
|
28
|
+
/** Present when the switch is in an invalid state (also honours `aria-invalid`). */
|
|
29
|
+
SwitchDataAttributes["invalid"] = "data-invalid";
|
|
30
|
+
/** The size axis, stamped on the track; the thumb diameter re-points off it. */
|
|
31
|
+
SwitchDataAttributes["size"] = "data-size";
|
|
32
|
+
return SwitchDataAttributes;
|
|
33
|
+
}({});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { SWITCH_SLOTS, SwitchDataAttributes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Table } from "./table.js";
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { TablePartProps, TablePropsArgs, bodyProps, cellProps, headProps, headerProps, rootProps, rowProps } from "./table.props.js";
|
|
2
|
+
import { ComponentProps, ReactElement } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/table/table.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The root of the table: a bordered, rounded card wrapping the semantic `<table>`. `className` styles
|
|
7
|
+
* that outer card (use it for call-site margins); native `<table>` attributes pass through to the
|
|
8
|
+
* `<table>` element. Compose the body from `Table.Header` / `Table.Body` / `Table.Row` / `Table.Head`
|
|
9
|
+
* / `Table.Cell`.
|
|
10
|
+
*
|
|
11
|
+
* The shape is attribute-driven: the parts stamp the single `data-slot` anchor `table.css` keys off,
|
|
12
|
+
* and `className` is forwarded verbatim (no class merging).
|
|
13
|
+
*/
|
|
14
|
+
declare function TableRoot({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: Table.Root.Props): ReactElement;
|
|
18
|
+
/** The `<thead>` band — a raised surface above the canvas, reading as a header rather than a well. */
|
|
19
|
+
declare function TableHeader({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: Table.Header.Props): ReactElement;
|
|
23
|
+
/** The `<tbody>`; flushes its last row's divider into the frame so the bottom border isn't doubled. */
|
|
24
|
+
declare function TableBody({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: Table.Body.Props): ReactElement;
|
|
28
|
+
/** One `<tr>`, drawing a hairline divider beneath it. */
|
|
29
|
+
declare function TableRow({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: Table.Row.Props): ReactElement;
|
|
33
|
+
/** A header `<th>` — quiet, medium-weight, start-aligned over the browser's centered default. */
|
|
34
|
+
declare function TableHead({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: Table.Head.Props): ReactElement;
|
|
38
|
+
/** A body `<td>` — start-aligned, top-aligned so multi-line cells read against single-line ones. */
|
|
39
|
+
declare function TableCell({
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: Table.Cell.Props): ReactElement;
|
|
43
|
+
/**
|
|
44
|
+
* The Noctis table — one bordered, rounded surface for tabular data, so every table (docs prose, API
|
|
45
|
+
* references, app screens) reads the same. The header sits on a raised `surface` band above the
|
|
46
|
+
* canvas; rows divide with hairlines and the last one flushes into the frame; cells are start-aligned
|
|
47
|
+
* for RTL by construction. It carries no behaviour — sort, select, and paginate are composed by the
|
|
48
|
+
* caller around these parts.
|
|
49
|
+
*
|
|
50
|
+
* Compose it from parts: `Table.Root` is the framed `<table>`, `Table.Header` / `Table.Body` wrap the
|
|
51
|
+
* `<thead>` / `<tbody>`, and `Table.Row` / `Table.Head` / `Table.Cell` are the `<tr>` / `<th>` / `<td>`.
|
|
52
|
+
* Each part also carries a `.props()` static (D12) returning a spreadable `{ "data-slot", className }`
|
|
53
|
+
* bag for styling a foreign element as that part — see `table.props.ts`.
|
|
54
|
+
*/
|
|
55
|
+
declare const Table: {
|
|
56
|
+
/** The framed `<table>`. `Table.Root.props()` → its spreadable prop bag. */Root: typeof TableRoot & {
|
|
57
|
+
props: typeof rootProps;
|
|
58
|
+
}; /** The raised `<thead>` band. `Table.Header.props()` → its spreadable prop bag. */
|
|
59
|
+
Header: typeof TableHeader & {
|
|
60
|
+
props: typeof headerProps;
|
|
61
|
+
}; /** The `<tbody>`. `Table.Body.props()` → its spreadable prop bag. */
|
|
62
|
+
Body: typeof TableBody & {
|
|
63
|
+
props: typeof bodyProps;
|
|
64
|
+
}; /** One `<tr>`. `Table.Row.props()` → its spreadable prop bag. */
|
|
65
|
+
Row: typeof TableRow & {
|
|
66
|
+
props: typeof rowProps;
|
|
67
|
+
}; /** A header `<th>`. `Table.Head.props()` → its spreadable prop bag. */
|
|
68
|
+
Head: typeof TableHead & {
|
|
69
|
+
props: typeof headProps;
|
|
70
|
+
}; /** A body `<td>`. `Table.Cell.props()` → its spreadable prop bag. */
|
|
71
|
+
Cell: typeof TableCell & {
|
|
72
|
+
props: typeof cellProps;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Per-part prop types. This namespace is types-only — it emits no runtime code and merges with the
|
|
77
|
+
* `Table` object above, so `Table.Cell` is the component value while `Table.Cell.Props` is its prop type.
|
|
78
|
+
*/
|
|
79
|
+
declare namespace Table {
|
|
80
|
+
/** The spreadable data-attribute prop bag every `Table.*.props()` returns (D12). */
|
|
81
|
+
type PartProps = TablePartProps;
|
|
82
|
+
/** Argument to every `Table.*.props(...)` escape-hatch helper. */
|
|
83
|
+
type PropsArgs = TablePropsArgs;
|
|
84
|
+
namespace Root {
|
|
85
|
+
type Props = ComponentProps<"table">;
|
|
86
|
+
}
|
|
87
|
+
namespace Header {
|
|
88
|
+
type Props = ComponentProps<"thead">;
|
|
89
|
+
}
|
|
90
|
+
namespace Body {
|
|
91
|
+
type Props = ComponentProps<"tbody">;
|
|
92
|
+
}
|
|
93
|
+
namespace Row {
|
|
94
|
+
type Props = ComponentProps<"tr">;
|
|
95
|
+
}
|
|
96
|
+
namespace Head {
|
|
97
|
+
type Props = ComponentProps<"th">;
|
|
98
|
+
}
|
|
99
|
+
namespace Cell {
|
|
100
|
+
type Props = ComponentProps<"td">;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { Table };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { TABLE_SLOTS } from "./table.slots.js";
|
|
2
|
+
import { bodyProps, cellProps, headProps, headerProps, rootProps, rowProps } from "./table.props.js";
|
|
3
|
+
import { clsx } from "clsx";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/table/table.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The root of the table: a bordered, rounded card wrapping the semantic `<table>`. `className` styles
|
|
8
|
+
* that outer card (use it for call-site margins); native `<table>` attributes pass through to the
|
|
9
|
+
* `<table>` element. Compose the body from `Table.Header` / `Table.Body` / `Table.Row` / `Table.Head`
|
|
10
|
+
* / `Table.Cell`.
|
|
11
|
+
*
|
|
12
|
+
* The shape is attribute-driven: the parts stamp the single `data-slot` anchor `table.css` keys off,
|
|
13
|
+
* and `className` is forwarded verbatim (no class merging).
|
|
14
|
+
*/
|
|
15
|
+
function TableRoot({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-slot": TABLE_SLOTS.root,
|
|
18
|
+
className: clsx(className) || void 0,
|
|
19
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
20
|
+
"data-slot": TABLE_SLOTS.grid,
|
|
21
|
+
...props
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** The `<thead>` band — a raised surface above the canvas, reading as a header rather than a well. */
|
|
26
|
+
function TableHeader({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
28
|
+
"data-slot": TABLE_SLOTS.header,
|
|
29
|
+
className: clsx(className) || void 0,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** The `<tbody>`; flushes its last row's divider into the frame so the bottom border isn't doubled. */
|
|
34
|
+
function TableBody({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
36
|
+
"data-slot": TABLE_SLOTS.body,
|
|
37
|
+
className: clsx(className) || void 0,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/** One `<tr>`, drawing a hairline divider beneath it. */
|
|
42
|
+
function TableRow({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
44
|
+
"data-slot": TABLE_SLOTS.row,
|
|
45
|
+
className: clsx(className) || void 0,
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** A header `<th>` — quiet, medium-weight, start-aligned over the browser's centered default. */
|
|
50
|
+
function TableHead({ className, ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsx("th", {
|
|
52
|
+
"data-slot": TABLE_SLOTS.head,
|
|
53
|
+
className: clsx(className) || void 0,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** A body `<td>` — start-aligned, top-aligned so multi-line cells read against single-line ones. */
|
|
58
|
+
function TableCell({ className, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx("td", {
|
|
60
|
+
"data-slot": TABLE_SLOTS.cell,
|
|
61
|
+
className: clsx(className) || void 0,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The Noctis table — one bordered, rounded surface for tabular data, so every table (docs prose, API
|
|
67
|
+
* references, app screens) reads the same. The header sits on a raised `surface` band above the
|
|
68
|
+
* canvas; rows divide with hairlines and the last one flushes into the frame; cells are start-aligned
|
|
69
|
+
* for RTL by construction. It carries no behaviour — sort, select, and paginate are composed by the
|
|
70
|
+
* caller around these parts.
|
|
71
|
+
*
|
|
72
|
+
* Compose it from parts: `Table.Root` is the framed `<table>`, `Table.Header` / `Table.Body` wrap the
|
|
73
|
+
* `<thead>` / `<tbody>`, and `Table.Row` / `Table.Head` / `Table.Cell` are the `<tr>` / `<th>` / `<td>`.
|
|
74
|
+
* Each part also carries a `.props()` static (D12) returning a spreadable `{ "data-slot", className }`
|
|
75
|
+
* bag for styling a foreign element as that part — see `table.props.ts`.
|
|
76
|
+
*/
|
|
77
|
+
const Table = {
|
|
78
|
+
/** The framed `<table>`. `Table.Root.props()` → its spreadable prop bag. */
|
|
79
|
+
Root: Object.assign(TableRoot, { props: rootProps }),
|
|
80
|
+
/** The raised `<thead>` band. `Table.Header.props()` → its spreadable prop bag. */
|
|
81
|
+
Header: Object.assign(TableHeader, { props: headerProps }),
|
|
82
|
+
/** The `<tbody>`. `Table.Body.props()` → its spreadable prop bag. */
|
|
83
|
+
Body: Object.assign(TableBody, { props: bodyProps }),
|
|
84
|
+
/** One `<tr>`. `Table.Row.props()` → its spreadable prop bag. */
|
|
85
|
+
Row: Object.assign(TableRow, { props: rowProps }),
|
|
86
|
+
/** A header `<th>`. `Table.Head.props()` → its spreadable prop bag. */
|
|
87
|
+
Head: Object.assign(TableHead, { props: headProps }),
|
|
88
|
+
/** A body `<td>`. `Table.Cell.props()` → its spreadable prop bag. */
|
|
89
|
+
Cell: Object.assign(TableCell, { props: cellProps })
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { Table };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/components/table/table.props.d.ts
|
|
2
|
+
/** A spreadable data-attribute prop bag — the shape every `Table.*.props()` returns. */
|
|
3
|
+
type TablePartProps = {
|
|
4
|
+
/** The slot value the matching `table.css` rules anchor on. */"data-slot": string; /** Forwarded verbatim — styling is attribute-driven, so this is an optional consumer passthrough. */
|
|
5
|
+
className?: string; /** A data-attribute present (empty string) or absent (`undefined`); never `false`. */
|
|
6
|
+
[attr: `data-${string}`]: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
/** Common shape: every part's `.props()` accepts an optional `className` passthrough. */
|
|
9
|
+
interface TablePropsArgs {
|
|
10
|
+
/** Forwarded verbatim onto the returned prop bag. */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Root prop bag: the framed card's slot anchor. */
|
|
14
|
+
declare function rootProps({
|
|
15
|
+
className
|
|
16
|
+
}?: TablePropsArgs): TablePartProps;
|
|
17
|
+
/** Header prop bag: the raised `<thead>` band slot anchor. */
|
|
18
|
+
declare function headerProps({
|
|
19
|
+
className
|
|
20
|
+
}?: TablePropsArgs): TablePartProps;
|
|
21
|
+
/** Body prop bag: the `<tbody>` slot anchor. */
|
|
22
|
+
declare function bodyProps({
|
|
23
|
+
className
|
|
24
|
+
}?: TablePropsArgs): TablePartProps;
|
|
25
|
+
/** Row prop bag: the `<tr>` slot anchor. */
|
|
26
|
+
declare function rowProps({
|
|
27
|
+
className
|
|
28
|
+
}?: TablePropsArgs): TablePartProps;
|
|
29
|
+
/** Head prop bag: the `<th>` slot anchor. */
|
|
30
|
+
declare function headProps({
|
|
31
|
+
className
|
|
32
|
+
}?: TablePropsArgs): TablePartProps;
|
|
33
|
+
/** Cell prop bag: the `<td>` slot anchor. */
|
|
34
|
+
declare function cellProps({
|
|
35
|
+
className
|
|
36
|
+
}?: TablePropsArgs): TablePartProps;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { TablePartProps, TablePropsArgs, bodyProps, cellProps, headProps, headerProps, rootProps, rowProps };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { TABLE_SLOTS } from "./table.slots.js";
|
|
2
|
+
//#region src/components/table/table.props.ts
|
|
3
|
+
/**
|
|
4
|
+
* The D12 unified variant contract for Table — the data-attribute-native escape hatch mirroring the
|
|
5
|
+
* other migrated components.
|
|
6
|
+
*
|
|
7
|
+
* Each compound part exposes a `props(...)` builder returning a **spreadable props object** of the form
|
|
8
|
+
* `{ "data-slot": "noctis-table-<part>", ...dataAttrs }`. Under the single-`data-slot` anchor model
|
|
9
|
+
* (D4 final) the `data-slot` is the only styling hook — `table.css` keys every rule off it — so
|
|
10
|
+
* spreading a part's `props()` onto a *foreign* element styles it as that part:
|
|
11
|
+
*
|
|
12
|
+
* <td {...Table.Cell.props()}>cell</td>
|
|
13
|
+
* // → <td data-slot="noctis-table-cell">
|
|
14
|
+
*
|
|
15
|
+
* Table parts carry no variants or state of their own (the look is structural), so each builder takes
|
|
16
|
+
* only an optional `className` passthrough, forwarded verbatim. The same slot vocabulary is emitted as
|
|
17
|
+
* data from the token graph (`generated/declarations.json`) so non-React / agent consumers can
|
|
18
|
+
* hand-write the markup from the docs.
|
|
19
|
+
*/
|
|
20
|
+
const withClassName = (bag, className) => className === void 0 ? bag : {
|
|
21
|
+
...bag,
|
|
22
|
+
className
|
|
23
|
+
};
|
|
24
|
+
/** Root prop bag: the framed card's slot anchor. */
|
|
25
|
+
function rootProps({ className } = {}) {
|
|
26
|
+
return withClassName({ "data-slot": TABLE_SLOTS.root }, className);
|
|
27
|
+
}
|
|
28
|
+
/** Header prop bag: the raised `<thead>` band slot anchor. */
|
|
29
|
+
function headerProps({ className } = {}) {
|
|
30
|
+
return withClassName({ "data-slot": TABLE_SLOTS.header }, className);
|
|
31
|
+
}
|
|
32
|
+
/** Body prop bag: the `<tbody>` slot anchor. */
|
|
33
|
+
function bodyProps({ className } = {}) {
|
|
34
|
+
return withClassName({ "data-slot": TABLE_SLOTS.body }, className);
|
|
35
|
+
}
|
|
36
|
+
/** Row prop bag: the `<tr>` slot anchor. */
|
|
37
|
+
function rowProps({ className } = {}) {
|
|
38
|
+
return withClassName({ "data-slot": TABLE_SLOTS.row }, className);
|
|
39
|
+
}
|
|
40
|
+
/** Head prop bag: the `<th>` slot anchor. */
|
|
41
|
+
function headProps({ className } = {}) {
|
|
42
|
+
return withClassName({ "data-slot": TABLE_SLOTS.head }, className);
|
|
43
|
+
}
|
|
44
|
+
/** Cell prop bag: the `<td>` slot anchor. */
|
|
45
|
+
function cellProps({ className } = {}) {
|
|
46
|
+
return withClassName({ "data-slot": TABLE_SLOTS.cell }, className);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { bodyProps, cellProps, headProps, headerProps, rootProps, rowProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/components/table/table.slots.ts
|
|
2
|
+
/**
|
|
3
|
+
* The slot vocabulary every `Table` part stamps as its `data-slot`. The authored source the
|
|
4
|
+
* orchestration file reads from, kebab-cased `{component}-{part}`; SLOTS.md still generates from the
|
|
5
|
+
* token-graph declarations.
|
|
6
|
+
*/
|
|
7
|
+
const TABLE_SLOTS = {
|
|
8
|
+
root: "noctis-table",
|
|
9
|
+
grid: "noctis-table-grid",
|
|
10
|
+
header: "noctis-table-header",
|
|
11
|
+
body: "noctis-table-body",
|
|
12
|
+
row: "noctis-table-row",
|
|
13
|
+
head: "noctis-table-head",
|
|
14
|
+
cell: "noctis-table-cell"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { TABLE_SLOTS };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/components/tabs/tabs.context.d.ts
|
|
2
|
+
/** Strip look — `line`, `pill`, or `segmented`. */
|
|
3
|
+
type TabsVariant = "line" | "pill" | "segmented";
|
|
4
|
+
/** Control height and type — `sm` or `md`. */
|
|
5
|
+
type TabsSize = "sm" | "md";
|
|
6
|
+
/** The `segmented` active chip's fill — `primary` (default) or the `accent`. */
|
|
7
|
+
type TabsColor = "primary" | "accent";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { TabsColor, TabsSize, TabsVariant };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, use } from "react";
|
|
3
|
+
//#region src/components/tabs/tabs.context.ts
|
|
4
|
+
const TabsContext = createContext(null);
|
|
5
|
+
const TabsProvider = TabsContext.Provider;
|
|
6
|
+
/** Read the strip context, throwing a named error when a part renders outside `Tabs.Root`. */
|
|
7
|
+
function useTabsContext(part) {
|
|
8
|
+
const context = use(TabsContext);
|
|
9
|
+
if (context === null) throw new Error(`Tabs.${part} must be rendered inside <Tabs.Root>.`);
|
|
10
|
+
return context;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TabsProvider, useTabsContext };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { IconGlyph } from "../../icons/glyphs.js";
|
|
2
|
+
import { tabs_d_exports } from "../../primitives/tabs.js";
|
|
3
|
+
import { TabsColor, TabsSize, TabsVariant } from "./tabs.context.js";
|
|
4
|
+
import { TabsPartProps, TabsRootPropsArgs, TabsTabPropsArgs, indicatorProps, listProps, panelProps, rootProps, tabProps } from "./tabs.props.js";
|
|
5
|
+
import { ReactElement, ReactNode } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/tabs/tabs.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Owns the active value and shares the `variant`/`size` with the strip. Works controlled (`value` +
|
|
10
|
+
* `onValueChange`) or uncontrolled (`defaultValue`). Compose `Tabs.List` (holding `Tabs.Tab`s and a
|
|
11
|
+
* `Tabs.Indicator`) with one `Tabs.Panel` per value.
|
|
12
|
+
*/
|
|
13
|
+
declare function TabsRoot({
|
|
14
|
+
variant,
|
|
15
|
+
size,
|
|
16
|
+
color,
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}: Tabs.Root.Props): ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* The row of tabs. Holds the `Tab`s and a single `Indicator`, and carries the strip's `variant` look.
|
|
23
|
+
* Arrow keys move between tabs and switch immediately (`activateOnFocus`); set it `false` for manual
|
|
24
|
+
* activation (move with arrows, commit with Enter/Space) when showing a panel is expensive.
|
|
25
|
+
*/
|
|
26
|
+
declare function TabsList({
|
|
27
|
+
activateOnFocus,
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: Tabs.List.Props): ReactElement;
|
|
31
|
+
/** One tab. Names its panel; pass `value` to match a `Panel`. Optional leading `icon`. */
|
|
32
|
+
declare function TabsTab({
|
|
33
|
+
icon,
|
|
34
|
+
className,
|
|
35
|
+
children,
|
|
36
|
+
...props
|
|
37
|
+
}: Tabs.Tab.Props): ReactElement;
|
|
38
|
+
/** The sliding active highlight. Render it once inside `Tabs.List`; it follows the active tab. */
|
|
39
|
+
declare function TabsIndicator({
|
|
40
|
+
className,
|
|
41
|
+
style,
|
|
42
|
+
...props
|
|
43
|
+
}: Tabs.Indicator.Props): ReactElement;
|
|
44
|
+
/** The content for one tab. Match its `value` to a `Tab`. Only the active panel is shown. */
|
|
45
|
+
declare function TabsPanel({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: Tabs.Panel.Props): ReactElement;
|
|
49
|
+
/**
|
|
50
|
+
* A tabbed control: a strip of tabs over swappable panels, with a single highlight that slides between
|
|
51
|
+
* the active tab. Three looks — `line` (underline), `pill` (floating pill), and `segmented` (raised
|
|
52
|
+
* pill in a sunken track) — in two sizes. Built on Base UI's Tabs, so the strip is fully
|
|
53
|
+
* keyboard-operable (arrows, Home/End), RTL-aware, and the indicator animation respects
|
|
54
|
+
* `prefers-reduced-motion`.
|
|
55
|
+
*
|
|
56
|
+
* Compose from parts: `Tabs.Root` owns the value and the shared `variant`/`size`, `Tabs.List` holds
|
|
57
|
+
* the `Tabs.Tab`s and one `Tabs.Indicator`, and a `Tabs.Panel` renders each value's content.
|
|
58
|
+
*
|
|
59
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
60
|
+
* exposed through the matching `Tabs` namespace — e.g. `Tabs.Tab.Props`.
|
|
61
|
+
*/
|
|
62
|
+
declare const Tabs: {
|
|
63
|
+
/** Owns the value and the shared look/size. `Tabs.Root.props({ variant, size })` → its spreadable prop bag. */Root: typeof TabsRoot & {
|
|
64
|
+
props: typeof rootProps;
|
|
65
|
+
}; /** The tab strip. `Tabs.List.props()` → its spreadable prop bag. */
|
|
66
|
+
List: typeof TabsList & {
|
|
67
|
+
props: typeof listProps;
|
|
68
|
+
}; /** One tab. `Tabs.Tab.props({ selected, disabled })` → its spreadable prop bag for a foreign element. */
|
|
69
|
+
Tab: typeof TabsTab & {
|
|
70
|
+
props: typeof tabProps;
|
|
71
|
+
}; /** The sliding highlight. `Tabs.Indicator.props()` → its spreadable prop bag. */
|
|
72
|
+
Indicator: typeof TabsIndicator & {
|
|
73
|
+
props: typeof indicatorProps;
|
|
74
|
+
}; /** One panel. `Tabs.Panel.props()` → its spreadable prop bag. */
|
|
75
|
+
Panel: typeof TabsPanel & {
|
|
76
|
+
props: typeof panelProps;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. Types-only —
|
|
81
|
+
* it emits no runtime code and merges with the `Tabs` object above, so `Tabs.Tab` is the component
|
|
82
|
+
* value while `Tabs.Tab.Props` is its prop type.
|
|
83
|
+
*/
|
|
84
|
+
declare namespace Tabs {
|
|
85
|
+
/** Strip look — `line`, `pill`, or `segmented`. */
|
|
86
|
+
type Variant = TabsVariant;
|
|
87
|
+
/** Control height and type — `sm` or `md`. */
|
|
88
|
+
type Size = TabsSize;
|
|
89
|
+
/** The `segmented` active chip's fill — `primary` (default) or the `accent`. */
|
|
90
|
+
type Color = TabsColor;
|
|
91
|
+
/** The spreadable data-attribute prop bag every `Tabs.*.props()` returns (D12). */
|
|
92
|
+
type PartProps = TabsPartProps;
|
|
93
|
+
namespace Root {
|
|
94
|
+
type Props = Omit<tabs_d_exports.Tabs.Root.Props, "className" | "children"> & {
|
|
95
|
+
/**
|
|
96
|
+
* Strip look — `line`, `pill`, or `segmented`.
|
|
97
|
+
* @default "line"
|
|
98
|
+
*/
|
|
99
|
+
variant?: TabsVariant;
|
|
100
|
+
/**
|
|
101
|
+
* Control height and type.
|
|
102
|
+
* @default "md"
|
|
103
|
+
*/
|
|
104
|
+
size?: TabsSize;
|
|
105
|
+
/**
|
|
106
|
+
* The `segmented` active chip's fill — `primary` (the default, the bold neutral key) or the
|
|
107
|
+
* indigo `accent`. No effect on the `line` / `pill` variants, which keep their neutral indicator.
|
|
108
|
+
* @default "primary"
|
|
109
|
+
*/
|
|
110
|
+
color?: TabsColor; /** `Tabs.List` and the `Tabs.Panel`s. */
|
|
111
|
+
children?: ReactNode; /** Classes merged onto the root. */
|
|
112
|
+
className?: string;
|
|
113
|
+
};
|
|
114
|
+
/** Argument to the `Tabs.Root.props(...)` escape-hatch helper. */
|
|
115
|
+
type PropsArgs = TabsRootPropsArgs;
|
|
116
|
+
}
|
|
117
|
+
namespace List {
|
|
118
|
+
type Props = tabs_d_exports.Tabs.List.Props;
|
|
119
|
+
type State = tabs_d_exports.Tabs.List.State;
|
|
120
|
+
}
|
|
121
|
+
namespace Tab {
|
|
122
|
+
type Props = tabs_d_exports.Tabs.Tab.Props & {
|
|
123
|
+
/** Optional leading glyph. */icon?: IconGlyph;
|
|
124
|
+
};
|
|
125
|
+
type State = tabs_d_exports.Tabs.Tab.State;
|
|
126
|
+
/** Argument to the `Tabs.Tab.props(...)` escape-hatch helper. */
|
|
127
|
+
type PropsArgs = TabsTabPropsArgs;
|
|
128
|
+
}
|
|
129
|
+
namespace Indicator {
|
|
130
|
+
type Props = tabs_d_exports.Tabs.Indicator.Props;
|
|
131
|
+
type State = tabs_d_exports.Tabs.Indicator.State;
|
|
132
|
+
}
|
|
133
|
+
namespace Panel {
|
|
134
|
+
type Props = tabs_d_exports.Tabs.Panel.Props;
|
|
135
|
+
type State = tabs_d_exports.Tabs.Panel.State;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { Tabs };
|