@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,182 @@
|
|
|
1
|
+
import { preview_card_d_exports } from "../../primitives/preview-card.js";
|
|
2
|
+
import { descriptionProps, mediaProps, metaProps, popupProps, titleProps, triggerProps } from "./preview-card.props.js";
|
|
3
|
+
import { ComponentPropsWithoutRef, ReactElement } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/preview-card/preview-card.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Owns the open state and shares it with the trigger and popup. Wraps Base UI's PreviewCard, which
|
|
8
|
+
* opens on hover-intent (a delay before opening, a grace period before closing) and on keyboard focus
|
|
9
|
+
* of the trigger, and dismisses on `Escape` / outside interaction.
|
|
10
|
+
*/
|
|
11
|
+
declare function PreviewCardRoot(props: PreviewCard.Root.Props): ReactElement;
|
|
12
|
+
/**
|
|
13
|
+
* The link that opens the preview card — renders an `<a>` and styles itself: an accent link that
|
|
14
|
+
* underlines on hover/focus, shows a focus-visible ring, and keeps a persistent underline while its
|
|
15
|
+
* card is open (no hand-authored classes needed). Opens on hover after `delay` ms (default 500, with a
|
|
16
|
+
* `closeDelay` grace period on leave, default 200) and **instantly** on keyboard focus. Compose your
|
|
17
|
+
* own anchor through `render` (e.g. a Next.js `Link`); the trigger stays inline so it sits naturally
|
|
18
|
+
* inside running text. It does not open on touch — tapping follows the link, so the link must convey
|
|
19
|
+
* the destination.
|
|
20
|
+
*/
|
|
21
|
+
declare function PreviewCardTrigger({
|
|
22
|
+
className,
|
|
23
|
+
delay,
|
|
24
|
+
closeDelay,
|
|
25
|
+
...props
|
|
26
|
+
}: PreviewCard.Trigger.Props): ReactElement;
|
|
27
|
+
/**
|
|
28
|
+
* The floating preview surface — portaled, elevated, flush, rounded, and animated — holding the
|
|
29
|
+
* preview content. Opens above or below the trigger (whichever fits), aligned to its center, and caps
|
|
30
|
+
* between a min and max width. Renders through `<Surface elevation="menu">` so it re-derives the
|
|
31
|
+
* anchored-overlay scope it shares with the menu and popover. It caps at the collision-aware
|
|
32
|
+
* `--available-height` and scrolls its inner `viewport` past that — the same flush, rounded, elevated
|
|
33
|
+
* chassis as the popover. Pass any preview markup as children — a `Media`/`Title`/`Description`/`Meta`
|
|
34
|
+
* stack, or your own. When several triggers share one card (give each a `payload` and read it from
|
|
35
|
+
* `Root`'s render-function child), the popup swaps to the active trigger's content.
|
|
36
|
+
*/
|
|
37
|
+
declare function PreviewCardPopup({
|
|
38
|
+
side,
|
|
39
|
+
align,
|
|
40
|
+
sideOffset,
|
|
41
|
+
alignOffset,
|
|
42
|
+
collisionPadding,
|
|
43
|
+
anchor,
|
|
44
|
+
className,
|
|
45
|
+
style,
|
|
46
|
+
children,
|
|
47
|
+
...props
|
|
48
|
+
}: PreviewCard.Popup.Props): ReactElement;
|
|
49
|
+
/**
|
|
50
|
+
* A media frame for the top of a card — reserves a fixed aspect ratio up front (so the card doesn't
|
|
51
|
+
* reflow when a thumbnail loads), clips its overflow, and rounds its corners a step tighter than the
|
|
52
|
+
* popup. Drop an `<img>` (which covers the frame) or a skeleton inside.
|
|
53
|
+
*/
|
|
54
|
+
declare function PreviewCardMedia({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: PreviewCard.Media.Props): ReactElement;
|
|
58
|
+
/** The card's heading — lifts to the foreground role at medium weight on a tight leading. Renders a `<div>`. */
|
|
59
|
+
declare function PreviewCardTitle({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}: PreviewCard.Title.Props): ReactElement;
|
|
63
|
+
/** Supporting copy under the title — inherits the popup's secondary body tone. Renders a `<p>`. */
|
|
64
|
+
declare function PreviewCardDescription({
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}: PreviewCard.Description.Props): ReactElement;
|
|
68
|
+
/** A subtle flex row for stats or label/value pairs at the foot of a card. Renders a `<div>`. */
|
|
69
|
+
declare function PreviewCardMeta({
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}: PreviewCard.Meta.Props): ReactElement;
|
|
73
|
+
/**
|
|
74
|
+
* A hover/focus link-preview card: a `Trigger` link opens a floating, elevated `Popup` after a short
|
|
75
|
+
* intent delay (and on keyboard focus), showing a richer preview of what the link points to. Built on
|
|
76
|
+
* Base UI's PreviewCard for the hover-intent timing, focus management, and `Escape`/outside-click
|
|
77
|
+
* dismissal.
|
|
78
|
+
*
|
|
79
|
+
* Compose from parts: `PreviewCard.Root` owns the open state, `PreviewCard.Trigger` is the inline link
|
|
80
|
+
* that opens it (and styles itself), and `PreviewCard.Popup` holds the preview content. Lay that
|
|
81
|
+
* content out with the thin rich-content slots — `PreviewCard.Media` (a thumbnail/OG image frame),
|
|
82
|
+
* `PreviewCard.Title`, `PreviewCard.Description`, and `PreviewCard.Meta` (a stats row). Noctis previews
|
|
83
|
+
* are flush against their anchor — there is no arrow/caret part (Base UI offers one; this system
|
|
84
|
+
* doesn't use it) — and the popup is never modal: the page stays interactive beneath it.
|
|
85
|
+
*
|
|
86
|
+
* Styling is precompiled in `preview-card.css`, keyed off each part's prefixed `data-slot`. Each part
|
|
87
|
+
* also carries the D12 `props()` escape hatch via `Object.assign` (e.g. `PreviewCard.Popup.props()`),
|
|
88
|
+
* returning a spreadable `{ "data-slot": "noctis-preview-card-<part>" }` bag for a foreign element a
|
|
89
|
+
* `<PreviewCard.*>` can't wrap.
|
|
90
|
+
*
|
|
91
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
92
|
+
* exposed through the matching `PreviewCard` namespace — e.g. `PreviewCard.Popup.Props`.
|
|
93
|
+
*/
|
|
94
|
+
declare const PreviewCard: {
|
|
95
|
+
Root: typeof PreviewCardRoot;
|
|
96
|
+
Trigger: typeof PreviewCardTrigger & {
|
|
97
|
+
props: typeof triggerProps;
|
|
98
|
+
};
|
|
99
|
+
Popup: typeof PreviewCardPopup & {
|
|
100
|
+
props: typeof popupProps;
|
|
101
|
+
};
|
|
102
|
+
Media: typeof PreviewCardMedia & {
|
|
103
|
+
props: typeof mediaProps;
|
|
104
|
+
};
|
|
105
|
+
Title: typeof PreviewCardTitle & {
|
|
106
|
+
props: typeof titleProps;
|
|
107
|
+
};
|
|
108
|
+
Description: typeof PreviewCardDescription & {
|
|
109
|
+
props: typeof descriptionProps;
|
|
110
|
+
};
|
|
111
|
+
Meta: typeof PreviewCardMeta & {
|
|
112
|
+
props: typeof metaProps;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. Types-only —
|
|
117
|
+
* it emits no runtime code and merges with the `PreviewCard` object above, so `PreviewCard.Popup` is
|
|
118
|
+
* the component value while `PreviewCard.Popup.Props` is its prop type.
|
|
119
|
+
*/
|
|
120
|
+
declare namespace PreviewCard {
|
|
121
|
+
namespace Root {
|
|
122
|
+
type Props = preview_card_d_exports.PreviewCard.Root.Props;
|
|
123
|
+
type State = preview_card_d_exports.PreviewCard.Root.State;
|
|
124
|
+
}
|
|
125
|
+
namespace Trigger {
|
|
126
|
+
type Props = preview_card_d_exports.PreviewCard.Trigger.Props;
|
|
127
|
+
type State = preview_card_d_exports.PreviewCard.Trigger.State;
|
|
128
|
+
}
|
|
129
|
+
namespace Popup {
|
|
130
|
+
type Props = preview_card_d_exports.PreviewCard.Popup.Props & {
|
|
131
|
+
/**
|
|
132
|
+
* Which side of the anchor to open on. Defaults to Base UI's collision-aware placement
|
|
133
|
+
* (`bottom`, flipping to `top` when there's no room below).
|
|
134
|
+
*/
|
|
135
|
+
side?: preview_card_d_exports.PreviewCard.Positioner.Props["side"];
|
|
136
|
+
/**
|
|
137
|
+
* Alignment along that side.
|
|
138
|
+
* @default "center"
|
|
139
|
+
*/
|
|
140
|
+
align?: preview_card_d_exports.PreviewCard.Positioner.Props["align"];
|
|
141
|
+
/**
|
|
142
|
+
* Gap from the anchor, in px. Kept tight so the flush card reads as tied to its anchor and
|
|
143
|
+
* the hover grace area stays small.
|
|
144
|
+
* @default 4
|
|
145
|
+
*/
|
|
146
|
+
sideOffset?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Shift along the alignment axis, in px.
|
|
149
|
+
*/
|
|
150
|
+
alignOffset?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Minimum space kept from the viewport edge when avoiding collisions, in px.
|
|
153
|
+
* @default 8
|
|
154
|
+
*/
|
|
155
|
+
collisionPadding?: preview_card_d_exports.PreviewCard.Positioner.Props["collisionPadding"];
|
|
156
|
+
/**
|
|
157
|
+
* The element to anchor and position against. Defaults to the `PreviewCard.Trigger`; pass an
|
|
158
|
+
* element, a ref, or a `() => Element | null` getter to anchor a triggerless, fully
|
|
159
|
+
* controlled card to an arbitrary element (e.g. a canvas node tracked on hover).
|
|
160
|
+
*/
|
|
161
|
+
anchor?: preview_card_d_exports.PreviewCard.Positioner.Props["anchor"];
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
namespace Media {
|
|
165
|
+
/** Props for {@link PreviewCard.Media} — a `<div>` aspect-ratio frame. */
|
|
166
|
+
type Props = ComponentPropsWithoutRef<"div">;
|
|
167
|
+
}
|
|
168
|
+
namespace Title {
|
|
169
|
+
/** Props for {@link PreviewCard.Title} — a `<div>` heading. */
|
|
170
|
+
type Props = ComponentPropsWithoutRef<"div">;
|
|
171
|
+
}
|
|
172
|
+
namespace Description {
|
|
173
|
+
/** Props for {@link PreviewCard.Description} — a `<p>` of supporting copy. */
|
|
174
|
+
type Props = ComponentPropsWithoutRef<"p">;
|
|
175
|
+
}
|
|
176
|
+
namespace Meta {
|
|
177
|
+
/** Props for {@link PreviewCard.Meta} — a `<div>` stats row. */
|
|
178
|
+
type Props = ComponentPropsWithoutRef<"div">;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { PreviewCard };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Surface } from "../surface/surface.js";
|
|
3
|
+
import { preview_card_exports } from "../../primitives/preview-card.js";
|
|
4
|
+
import { PREVIEW_CARD_SLOTS } from "./preview-card.slots.js";
|
|
5
|
+
import { descriptionProps, mediaProps, metaProps, popupProps, titleProps, triggerProps } from "./preview-card.props.js";
|
|
6
|
+
import clsx$1 from "clsx";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/preview-card/preview-card.tsx
|
|
9
|
+
/** Noctis's snappier hover-intent defaults — a touch quicker than Base UI's 600/300. */
|
|
10
|
+
const DEFAULT_DELAY = 500;
|
|
11
|
+
const DEFAULT_CLOSE_DELAY = 200;
|
|
12
|
+
/**
|
|
13
|
+
* Owns the open state and shares it with the trigger and popup. Wraps Base UI's PreviewCard, which
|
|
14
|
+
* opens on hover-intent (a delay before opening, a grace period before closing) and on keyboard focus
|
|
15
|
+
* of the trigger, and dismisses on `Escape` / outside interaction.
|
|
16
|
+
*/
|
|
17
|
+
function PreviewCardRoot(props) {
|
|
18
|
+
return /* @__PURE__ */ jsx(preview_card_exports.PreviewCard.Root, { ...props });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The link that opens the preview card — renders an `<a>` and styles itself: an accent link that
|
|
22
|
+
* underlines on hover/focus, shows a focus-visible ring, and keeps a persistent underline while its
|
|
23
|
+
* card is open (no hand-authored classes needed). Opens on hover after `delay` ms (default 500, with a
|
|
24
|
+
* `closeDelay` grace period on leave, default 200) and **instantly** on keyboard focus. Compose your
|
|
25
|
+
* own anchor through `render` (e.g. a Next.js `Link`); the trigger stays inline so it sits naturally
|
|
26
|
+
* inside running text. It does not open on touch — tapping follows the link, so the link must convey
|
|
27
|
+
* the destination.
|
|
28
|
+
*/
|
|
29
|
+
function PreviewCardTrigger({ className, delay = DEFAULT_DELAY, closeDelay = DEFAULT_CLOSE_DELAY, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(preview_card_exports.PreviewCard.Trigger, {
|
|
31
|
+
"data-slot": PREVIEW_CARD_SLOTS.trigger,
|
|
32
|
+
delay,
|
|
33
|
+
closeDelay,
|
|
34
|
+
className: clsx$1(className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The floating preview surface — portaled, elevated, flush, rounded, and animated — holding the
|
|
40
|
+
* preview content. Opens above or below the trigger (whichever fits), aligned to its center, and caps
|
|
41
|
+
* between a min and max width. Renders through `<Surface elevation="menu">` so it re-derives the
|
|
42
|
+
* anchored-overlay scope it shares with the menu and popover. It caps at the collision-aware
|
|
43
|
+
* `--available-height` and scrolls its inner `viewport` past that — the same flush, rounded, elevated
|
|
44
|
+
* chassis as the popover. Pass any preview markup as children — a `Media`/`Title`/`Description`/`Meta`
|
|
45
|
+
* stack, or your own. When several triggers share one card (give each a `payload` and read it from
|
|
46
|
+
* `Root`'s render-function child), the popup swaps to the active trigger's content.
|
|
47
|
+
*/
|
|
48
|
+
function PreviewCardPopup({ side, align = "center", sideOffset = 4, alignOffset, collisionPadding = 8, anchor, className, style, children, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx(preview_card_exports.PreviewCard.Portal, { children: /* @__PURE__ */ jsx(preview_card_exports.PreviewCard.Positioner, {
|
|
50
|
+
anchor,
|
|
51
|
+
side,
|
|
52
|
+
align,
|
|
53
|
+
sideOffset,
|
|
54
|
+
alignOffset,
|
|
55
|
+
collisionPadding,
|
|
56
|
+
"data-slot": PREVIEW_CARD_SLOTS.positioner,
|
|
57
|
+
children: /* @__PURE__ */ jsx(preview_card_exports.PreviewCard.Popup, {
|
|
58
|
+
"data-slot": PREVIEW_CARD_SLOTS.popup,
|
|
59
|
+
render: /* @__PURE__ */ jsx(Surface, {
|
|
60
|
+
elevation: "menu",
|
|
61
|
+
bordered: true,
|
|
62
|
+
shadow: "popover"
|
|
63
|
+
}),
|
|
64
|
+
style: {
|
|
65
|
+
transformOrigin: "var(--transform-origin)",
|
|
66
|
+
maxHeight: "var(--available-height)",
|
|
67
|
+
...style
|
|
68
|
+
},
|
|
69
|
+
className: clsx$1(className),
|
|
70
|
+
...props,
|
|
71
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
72
|
+
"data-slot": PREVIEW_CARD_SLOTS.viewport,
|
|
73
|
+
"data-custom-scrollbar": true,
|
|
74
|
+
children
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
}) });
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A media frame for the top of a card — reserves a fixed aspect ratio up front (so the card doesn't
|
|
81
|
+
* reflow when a thumbnail loads), clips its overflow, and rounds its corners a step tighter than the
|
|
82
|
+
* popup. Drop an `<img>` (which covers the frame) or a skeleton inside.
|
|
83
|
+
*/
|
|
84
|
+
function PreviewCardMedia({ className, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx("div", {
|
|
86
|
+
"data-slot": PREVIEW_CARD_SLOTS.media,
|
|
87
|
+
className: clsx$1(className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/** The card's heading — lifts to the foreground role at medium weight on a tight leading. Renders a `<div>`. */
|
|
92
|
+
function PreviewCardTitle({ className, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsx("div", {
|
|
94
|
+
"data-slot": PREVIEW_CARD_SLOTS.title,
|
|
95
|
+
className: clsx$1(className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/** Supporting copy under the title — inherits the popup's secondary body tone. Renders a `<p>`. */
|
|
100
|
+
function PreviewCardDescription({ className, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx("p", {
|
|
102
|
+
"data-slot": PREVIEW_CARD_SLOTS.description,
|
|
103
|
+
className: clsx$1(className),
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/** A subtle flex row for stats or label/value pairs at the foot of a card. Renders a `<div>`. */
|
|
108
|
+
function PreviewCardMeta({ className, ...props }) {
|
|
109
|
+
return /* @__PURE__ */ jsx("div", {
|
|
110
|
+
"data-slot": PREVIEW_CARD_SLOTS.meta,
|
|
111
|
+
className: clsx$1(className),
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A hover/focus link-preview card: a `Trigger` link opens a floating, elevated `Popup` after a short
|
|
117
|
+
* intent delay (and on keyboard focus), showing a richer preview of what the link points to. Built on
|
|
118
|
+
* Base UI's PreviewCard for the hover-intent timing, focus management, and `Escape`/outside-click
|
|
119
|
+
* dismissal.
|
|
120
|
+
*
|
|
121
|
+
* Compose from parts: `PreviewCard.Root` owns the open state, `PreviewCard.Trigger` is the inline link
|
|
122
|
+
* that opens it (and styles itself), and `PreviewCard.Popup` holds the preview content. Lay that
|
|
123
|
+
* content out with the thin rich-content slots — `PreviewCard.Media` (a thumbnail/OG image frame),
|
|
124
|
+
* `PreviewCard.Title`, `PreviewCard.Description`, and `PreviewCard.Meta` (a stats row). Noctis previews
|
|
125
|
+
* are flush against their anchor — there is no arrow/caret part (Base UI offers one; this system
|
|
126
|
+
* doesn't use it) — and the popup is never modal: the page stays interactive beneath it.
|
|
127
|
+
*
|
|
128
|
+
* Styling is precompiled in `preview-card.css`, keyed off each part's prefixed `data-slot`. Each part
|
|
129
|
+
* also carries the D12 `props()` escape hatch via `Object.assign` (e.g. `PreviewCard.Popup.props()`),
|
|
130
|
+
* returning a spreadable `{ "data-slot": "noctis-preview-card-<part>" }` bag for a foreign element a
|
|
131
|
+
* `<PreviewCard.*>` can't wrap.
|
|
132
|
+
*
|
|
133
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
134
|
+
* exposed through the matching `PreviewCard` namespace — e.g. `PreviewCard.Popup.Props`.
|
|
135
|
+
*/
|
|
136
|
+
const PreviewCard = {
|
|
137
|
+
Root: PreviewCardRoot,
|
|
138
|
+
Trigger: Object.assign(PreviewCardTrigger, { props: triggerProps }),
|
|
139
|
+
Popup: Object.assign(PreviewCardPopup, { props: popupProps }),
|
|
140
|
+
Media: Object.assign(PreviewCardMedia, { props: mediaProps }),
|
|
141
|
+
Title: Object.assign(PreviewCardTitle, { props: titleProps }),
|
|
142
|
+
Description: Object.assign(PreviewCardDescription, { props: descriptionProps }),
|
|
143
|
+
Meta: Object.assign(PreviewCardMeta, { props: metaProps })
|
|
144
|
+
};
|
|
145
|
+
//#endregion
|
|
146
|
+
export { PreviewCard };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/components/preview-card/preview-card.props.d.ts
|
|
2
|
+
/** A spreadable data-attribute prop bag — the shape every `PreviewCard.*.props()` returns. */
|
|
3
|
+
type PreviewCardPartProps = {
|
|
4
|
+
/** The slot value the matching `preview-card.css` rules anchor on. */"data-slot": string; /** Forwarded verbatim — styling is attribute-driven, so this is an optional consumer passthrough. */
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
/** Common shape: every part's `.props()` accepts an optional `className` passthrough. */
|
|
8
|
+
interface PreviewCardPropsArgs {
|
|
9
|
+
/** Forwarded verbatim onto the returned prop bag. */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Trigger prop bag: just the slot anchor. */
|
|
13
|
+
declare function triggerProps({
|
|
14
|
+
className
|
|
15
|
+
}?: PreviewCardPropsArgs): PreviewCardPartProps;
|
|
16
|
+
/** Popup prop bag: just the slot anchor (the base surface paint is owned by the composed Surface). */
|
|
17
|
+
declare function popupProps({
|
|
18
|
+
className
|
|
19
|
+
}?: PreviewCardPropsArgs): PreviewCardPartProps;
|
|
20
|
+
/** Media prop bag: just the slot anchor (the aspect-ratio frame; an `<img>` covers it). */
|
|
21
|
+
declare function mediaProps({
|
|
22
|
+
className
|
|
23
|
+
}?: PreviewCardPropsArgs): PreviewCardPartProps;
|
|
24
|
+
/** Title prop bag: just the slot anchor (lifts to the foreground role at medium weight). */
|
|
25
|
+
declare function titleProps({
|
|
26
|
+
className
|
|
27
|
+
}?: PreviewCardPropsArgs): PreviewCardPartProps;
|
|
28
|
+
/** Description prop bag: just the slot anchor (inherits the popup's secondary body tone). */
|
|
29
|
+
declare function descriptionProps({
|
|
30
|
+
className
|
|
31
|
+
}?: PreviewCardPropsArgs): PreviewCardPartProps;
|
|
32
|
+
/** Meta prop bag: just the slot anchor (a subtle flex row for stats / label-value pairs). */
|
|
33
|
+
declare function metaProps({
|
|
34
|
+
className
|
|
35
|
+
}?: PreviewCardPropsArgs): PreviewCardPartProps;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { descriptionProps, mediaProps, metaProps, popupProps, titleProps, triggerProps };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PREVIEW_CARD_SLOTS } from "./preview-card.slots.js";
|
|
2
|
+
//#region src/components/preview-card/preview-card.props.ts
|
|
3
|
+
/**
|
|
4
|
+
* The D12 unified variant contract for PreviewCard — a per-part set of `props(...)` builders that each
|
|
5
|
+
* return a **spreadable props object** of the form `{ "data-slot": "noctis-preview-card-<part>" }`,
|
|
6
|
+
* derived from the part's inputs.
|
|
7
|
+
*
|
|
8
|
+
* Under the single-`data-slot` anchor model the `data-slot` is the only styling hook needed —
|
|
9
|
+
* `preview-card.css` keys every rule off it — so spreading a part's `props()` onto a *foreign*
|
|
10
|
+
* element styles it as that part:
|
|
11
|
+
*
|
|
12
|
+
* <a {...PreviewCard.Trigger.props()}>@noctis</a>
|
|
13
|
+
* // → <a data-slot="noctis-preview-card-trigger">
|
|
14
|
+
*
|
|
15
|
+
* The escape hatch carries no className (styling is attribute-driven); an optional `className`
|
|
16
|
+
* passthrough is accepted and forwarded verbatim. The same mapping is emitted as data from the token
|
|
17
|
+
* graph (`generated/declarations.json`) so non-React / agent consumers can hand-write the markup.
|
|
18
|
+
*/
|
|
19
|
+
const withClassName = (bag, className) => className === void 0 ? bag : {
|
|
20
|
+
...bag,
|
|
21
|
+
className
|
|
22
|
+
};
|
|
23
|
+
/** Trigger prop bag: just the slot anchor. */
|
|
24
|
+
function triggerProps({ className } = {}) {
|
|
25
|
+
return withClassName({ "data-slot": PREVIEW_CARD_SLOTS.trigger }, className);
|
|
26
|
+
}
|
|
27
|
+
/** Popup prop bag: just the slot anchor (the base surface paint is owned by the composed Surface). */
|
|
28
|
+
function popupProps({ className } = {}) {
|
|
29
|
+
return withClassName({ "data-slot": PREVIEW_CARD_SLOTS.popup }, className);
|
|
30
|
+
}
|
|
31
|
+
/** Media prop bag: just the slot anchor (the aspect-ratio frame; an `<img>` covers it). */
|
|
32
|
+
function mediaProps({ className } = {}) {
|
|
33
|
+
return withClassName({ "data-slot": PREVIEW_CARD_SLOTS.media }, className);
|
|
34
|
+
}
|
|
35
|
+
/** Title prop bag: just the slot anchor (lifts to the foreground role at medium weight). */
|
|
36
|
+
function titleProps({ className } = {}) {
|
|
37
|
+
return withClassName({ "data-slot": PREVIEW_CARD_SLOTS.title }, className);
|
|
38
|
+
}
|
|
39
|
+
/** Description prop bag: just the slot anchor (inherits the popup's secondary body tone). */
|
|
40
|
+
function descriptionProps({ className } = {}) {
|
|
41
|
+
return withClassName({ "data-slot": PREVIEW_CARD_SLOTS.description }, className);
|
|
42
|
+
}
|
|
43
|
+
/** Meta prop bag: just the slot anchor (a subtle flex row for stats / label-value pairs). */
|
|
44
|
+
function metaProps({ className } = {}) {
|
|
45
|
+
return withClassName({ "data-slot": PREVIEW_CARD_SLOTS.meta }, className);
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { descriptionProps, mediaProps, metaProps, popupProps, titleProps, triggerProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/components/preview-card/preview-card.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The `data-*` hooks `PreviewCard` stamps on its parts, for host-side styling and tests. The slot
|
|
4
|
+
* value marks each rendered element; the state attributes are emitted by Base UI's PreviewCard —
|
|
5
|
+
* pair a slot with a state to target, say, the popup only while it transitions in.
|
|
6
|
+
*/
|
|
7
|
+
declare enum PreviewCardDataAttributes {
|
|
8
|
+
/** The trigger element (and every rendered part). */
|
|
9
|
+
trigger = "data-slot",
|
|
10
|
+
/** Present on the trigger while its preview card is open. */
|
|
11
|
+
popupOpen = "data-popup-open",
|
|
12
|
+
/** The side of the anchor the popup actually rendered on (`bottom`, `top`, …). */
|
|
13
|
+
side = "data-side",
|
|
14
|
+
/** Present on the popup for the first frame after mount — the transition's start state. */
|
|
15
|
+
startingStyle = "data-starting-style",
|
|
16
|
+
/** Present on the popup while it transitions out before unmounting. */
|
|
17
|
+
endingStyle = "data-ending-style",
|
|
18
|
+
/** Present on the popup when the change should not animate (focus open, dismissal). */
|
|
19
|
+
instant = "data-instant"
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { PreviewCardDataAttributes };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/components/preview-card/preview-card.slots.ts
|
|
2
|
+
/**
|
|
3
|
+
* The slot vocabulary every `PreviewCard` part stamps as its `data-slot`. The authored source the
|
|
4
|
+
* orchestration file reads from, prefixed `noctis-{component}-{part}` (the precompiled
|
|
5
|
+
* `preview-card.css` keys every rule off these anchors); SLOTS.md still generates from the
|
|
6
|
+
* token-graph declaration.
|
|
7
|
+
*/
|
|
8
|
+
const PREVIEW_CARD_SLOTS = {
|
|
9
|
+
trigger: "noctis-preview-card-trigger",
|
|
10
|
+
positioner: "noctis-preview-card-positioner",
|
|
11
|
+
popup: "noctis-preview-card-popup",
|
|
12
|
+
viewport: "noctis-preview-card-viewport",
|
|
13
|
+
media: "noctis-preview-card-media",
|
|
14
|
+
title: "noctis-preview-card-title",
|
|
15
|
+
description: "noctis-preview-card-description",
|
|
16
|
+
meta: "noctis-preview-card-meta"
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The `data-*` hooks `PreviewCard` stamps on its parts, for host-side styling and tests. The slot
|
|
20
|
+
* value marks each rendered element; the state attributes are emitted by Base UI's PreviewCard —
|
|
21
|
+
* pair a slot with a state to target, say, the popup only while it transitions in.
|
|
22
|
+
*/
|
|
23
|
+
let PreviewCardDataAttributes = /* @__PURE__ */ function(PreviewCardDataAttributes) {
|
|
24
|
+
/** The trigger element (and every rendered part). */
|
|
25
|
+
PreviewCardDataAttributes["trigger"] = "data-slot";
|
|
26
|
+
/** Present on the trigger while its preview card is open. */
|
|
27
|
+
PreviewCardDataAttributes["popupOpen"] = "data-popup-open";
|
|
28
|
+
/** The side of the anchor the popup actually rendered on (`bottom`, `top`, …). */
|
|
29
|
+
PreviewCardDataAttributes["side"] = "data-side";
|
|
30
|
+
/** Present on the popup for the first frame after mount — the transition's start state. */
|
|
31
|
+
PreviewCardDataAttributes["startingStyle"] = "data-starting-style";
|
|
32
|
+
/** Present on the popup while it transitions out before unmounting. */
|
|
33
|
+
PreviewCardDataAttributes["endingStyle"] = "data-ending-style";
|
|
34
|
+
/** Present on the popup when the change should not animate (focus open, dismissal). */
|
|
35
|
+
PreviewCardDataAttributes["instant"] = "data-instant";
|
|
36
|
+
return PreviewCardDataAttributes;
|
|
37
|
+
}({});
|
|
38
|
+
//#endregion
|
|
39
|
+
export { PREVIEW_CARD_SLOTS, PreviewCardDataAttributes };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/components/progress/progress.context.d.ts
|
|
2
|
+
/** Status tint of the task outcome — `neutral` by default; the others tint the fill to a status role. */
|
|
3
|
+
type ProgressTone = "neutral" | "success" | "warning" | "danger";
|
|
4
|
+
/** Track thickness — `sm` (thin) or `md` (default). */
|
|
5
|
+
type ProgressSize = "sm" | "md";
|
|
6
|
+
/** Caption placement — `top` (header row above the track) or `side` (inline beside it). */
|
|
7
|
+
type ProgressLabels = "top" | "side";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ProgressLabels, ProgressSize, ProgressTone };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, use } from "react";
|
|
3
|
+
//#region src/components/progress/progress.context.ts
|
|
4
|
+
const ProgressContext = createContext(null);
|
|
5
|
+
const ProgressProvider = ProgressContext.Provider;
|
|
6
|
+
/** Read the bar context, throwing a named error when a part renders outside `Progress.Root`. */
|
|
7
|
+
function useProgressContext(part) {
|
|
8
|
+
const context = use(ProgressContext);
|
|
9
|
+
if (context === null) throw new Error(`Progress.${part} must be rendered inside <Progress.Root>.`);
|
|
10
|
+
return context;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ProgressProvider, useProgressContext };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Progress as Progress$1 } from "../../primitives/progress/progress.js";
|
|
2
|
+
import { ProgressLabels, ProgressSize, ProgressTone } from "./progress.context.js";
|
|
3
|
+
import { ProgressIndicatorPropsArgs, ProgressPartProps, ProgressRootPropsArgs, indicatorProps, labelProps, rootProps, trackProps, valueProps } from "./progress.props.js";
|
|
4
|
+
import { ReactElement, ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/progress/progress.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Owns the value and shares the resolved `tone`/`size`/`labels` with its parts. Determinate when `value`
|
|
9
|
+
* is a number (`0`–`max`, `max` defaulting to `100`); indeterminate when `value` is `null`. Pass `tone`
|
|
10
|
+
* to tint the fill to a task outcome — `danger` for a failed upload, `warning` for at-risk, `success`
|
|
11
|
+
* for done; `neutral` (the default) keeps the active accent. The noctis primitive injects the active
|
|
12
|
+
* locale so the formatted value reads in the reader's language.
|
|
13
|
+
*/
|
|
14
|
+
declare function ProgressRoot({
|
|
15
|
+
tone,
|
|
16
|
+
size,
|
|
17
|
+
labels,
|
|
18
|
+
thickness,
|
|
19
|
+
className,
|
|
20
|
+
style,
|
|
21
|
+
children,
|
|
22
|
+
...props
|
|
23
|
+
}: Progress.Root.Props): ReactElement;
|
|
24
|
+
/** The recessed rail the indicator fills. Holds a single `Progress.Indicator`. */
|
|
25
|
+
declare function ProgressTrack({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: Progress.Track.Props): ReactElement;
|
|
29
|
+
/** The accent fill. Base UI sizes its inline width to the value; an empty value sweeps it indeterminately. */
|
|
30
|
+
declare function ProgressIndicator({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: Progress.Indicator.Props): ReactElement;
|
|
34
|
+
/** The progress bar's accessible label. Place it in a header row beside `Progress.Value`. */
|
|
35
|
+
declare function ProgressLabel({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: Progress.Label.Props): ReactElement;
|
|
39
|
+
/** The formatted completion text, localized via the injected locale. Pass a child function to format it. */
|
|
40
|
+
declare function ProgressValue({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: Progress.Value.Props): ReactElement;
|
|
44
|
+
/**
|
|
45
|
+
* A progress bar for a task's completion: an accent fill over a recessed track, in two thicknesses. It is
|
|
46
|
+
* determinate when given a `value` (`0`–`max`) and indeterminate when `value` is `null`, in which case a
|
|
47
|
+
* sliver sweeps the track. Built on Base UI's Progress, so the root carries the correct `progressbar`
|
|
48
|
+
* role and ARIA value semantics, the value formats for the reader's locale, and the indeterminate sweep
|
|
49
|
+
* respects `prefers-reduced-motion`.
|
|
50
|
+
*
|
|
51
|
+
* Compose from parts: `Progress.Root` owns the value and the shared `tone`/`size`/`labels`,
|
|
52
|
+
* `Progress.Track` holds one `Progress.Indicator`, and an optional `Progress.Label` + `Progress.Value`
|
|
53
|
+
* caption the bar — the root lays them out above (`labels="top"`) or beside (`labels="side"`) the track.
|
|
54
|
+
*
|
|
55
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are exposed
|
|
56
|
+
* through the matching `Progress` namespace — e.g. `Progress.Value.Props`.
|
|
57
|
+
*/
|
|
58
|
+
declare const Progress: {
|
|
59
|
+
/** Owns the value and the shared tone/size/labels. `Progress.Root.props({ tone, size, labels })` → its spreadable prop bag. */Root: typeof ProgressRoot & {
|
|
60
|
+
props: typeof rootProps;
|
|
61
|
+
}; /** The recessed rail. `Progress.Track.props()` → its spreadable prop bag. */
|
|
62
|
+
Track: typeof ProgressTrack & {
|
|
63
|
+
props: typeof trackProps;
|
|
64
|
+
}; /** The accent fill. `Progress.Indicator.props({ indeterminate })` → its spreadable prop bag for a foreign element. */
|
|
65
|
+
Indicator: typeof ProgressIndicator & {
|
|
66
|
+
props: typeof indicatorProps;
|
|
67
|
+
}; /** The accessible label. `Progress.Label.props()` → its spreadable prop bag. */
|
|
68
|
+
Label: typeof ProgressLabel & {
|
|
69
|
+
props: typeof labelProps;
|
|
70
|
+
}; /** The formatted value text. `Progress.Value.props()` → its spreadable prop bag. */
|
|
71
|
+
Value: typeof ProgressValue & {
|
|
72
|
+
props: typeof valueProps;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. Types-only — it
|
|
77
|
+
* emits no runtime code and merges with the `Progress` object above, so `Progress.Value` is the component
|
|
78
|
+
* value while `Progress.Value.Props` is its prop type.
|
|
79
|
+
*/
|
|
80
|
+
declare namespace Progress {
|
|
81
|
+
/** Status tint of the task outcome — `neutral`, `success`, `warning`, or `danger`. */
|
|
82
|
+
type Tone = ProgressTone;
|
|
83
|
+
/** Track thickness — `sm` or `md`. */
|
|
84
|
+
type Size = ProgressSize;
|
|
85
|
+
/** Caption placement — `top` or `side`. */
|
|
86
|
+
type Labels = ProgressLabels;
|
|
87
|
+
/** The spreadable data-attribute prop bag every `Progress.*.props()` returns (D12). */
|
|
88
|
+
type PartProps = ProgressPartProps;
|
|
89
|
+
namespace Root {
|
|
90
|
+
type Props = Omit<Progress$1.Root.Props, "className" | "children"> & {
|
|
91
|
+
/**
|
|
92
|
+
* Status tint of the task outcome — `danger` for failed, `warning` for at-risk, `success`
|
|
93
|
+
* for done. `neutral` keeps the active accent fill.
|
|
94
|
+
* @default "neutral"
|
|
95
|
+
*/
|
|
96
|
+
tone?: ProgressTone;
|
|
97
|
+
/**
|
|
98
|
+
* Track thickness preset.
|
|
99
|
+
* @default "md"
|
|
100
|
+
*/
|
|
101
|
+
size?: ProgressSize;
|
|
102
|
+
/**
|
|
103
|
+
* Caption placement — a header row above the track (`top`) or inline beside it (`side`).
|
|
104
|
+
* @default "top"
|
|
105
|
+
*/
|
|
106
|
+
labels?: ProgressLabels;
|
|
107
|
+
/**
|
|
108
|
+
* An explicit track thickness, overriding the `size` preset. A number is treated as `px`; a
|
|
109
|
+
* string is any CSS length. Writes the public track block-size override var.
|
|
110
|
+
*/
|
|
111
|
+
thickness?: number | string; /** `Progress.Track` and an optional `Progress.Label` + `Progress.Value`. */
|
|
112
|
+
children?: ReactNode; /** Classes merged onto the root. */
|
|
113
|
+
className?: string;
|
|
114
|
+
};
|
|
115
|
+
type State = Progress$1.Root.State;
|
|
116
|
+
/** Argument to the `Progress.Root.props(...)` escape-hatch helper. */
|
|
117
|
+
type PropsArgs = ProgressRootPropsArgs;
|
|
118
|
+
}
|
|
119
|
+
namespace Track {
|
|
120
|
+
type Props = Progress$1.Track.Props;
|
|
121
|
+
type State = Progress$1.Track.State;
|
|
122
|
+
}
|
|
123
|
+
namespace Indicator {
|
|
124
|
+
type Props = Progress$1.Indicator.Props;
|
|
125
|
+
type State = Progress$1.Indicator.State;
|
|
126
|
+
/** Argument to the `Progress.Indicator.props(...)` escape-hatch helper. */
|
|
127
|
+
type PropsArgs = ProgressIndicatorPropsArgs;
|
|
128
|
+
}
|
|
129
|
+
namespace Label {
|
|
130
|
+
type Props = Progress$1.Label.Props;
|
|
131
|
+
type State = Progress$1.Label.State;
|
|
132
|
+
}
|
|
133
|
+
namespace Value {
|
|
134
|
+
type Props = Progress$1.Value.Props;
|
|
135
|
+
type State = Progress$1.Value.State;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { Progress };
|