@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,324 @@
|
|
|
1
|
+
import { alert_dialog_d_exports } from "../../primitives/alert-dialog.js";
|
|
2
|
+
import { AlertDialogActionTone, AlertDialogSize, AlertDialogTone } from "./alert-dialog.types.js";
|
|
3
|
+
import { AlertDialogActionPropsArgs, AlertDialogPartProps, AlertDialogPopupPropsArgs, actionProps, backdropProps, bodyProps, cancelProps, closeProps, descriptionProps, footerProps, headerProps, iconProps, popupProps, titleProps, triggerProps, viewportProps } from "./alert-dialog.props.js";
|
|
4
|
+
import { ComponentProps, ReactElement } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/alert-dialog/alert-dialog.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Groups the parts and owns open state, plus the Cancel-button ref every part shares for initial focus.
|
|
9
|
+
* Always modal — focus is trapped, the page is scroll-locked, and the rest of the document is inert.
|
|
10
|
+
* Unlike a Dialog or Sheet, a click outside does *not* close it: a confirmation must be answered, so
|
|
11
|
+
* only the Cancel/Action buttons or `Escape` dismiss it. Base UI's `AlertDialog.Root` enforces that.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link AlertDialog.Root.Props}
|
|
14
|
+
*/
|
|
15
|
+
declare function AlertDialogRoot(props: AlertDialog.Root.Props): ReactElement;
|
|
16
|
+
/**
|
|
17
|
+
* A button that opens the dialog. Wires the accessible relationship to the panel. Compose it from a
|
|
18
|
+
* `Button` through `render` so it inherits the button's look, hover, and focus.
|
|
19
|
+
*
|
|
20
|
+
* Slot: `noctis-alert-dialog-trigger`.
|
|
21
|
+
* @see {@link AlertDialog.Trigger.Props}
|
|
22
|
+
*/
|
|
23
|
+
declare function AlertDialogTrigger(props: AlertDialog.Trigger.Props): ReactElement;
|
|
24
|
+
/**
|
|
25
|
+
* Moves the panel and backdrop to a portal at the end of `<body>`.
|
|
26
|
+
*
|
|
27
|
+
* @see {@link AlertDialog.Portal.Props}
|
|
28
|
+
*/
|
|
29
|
+
declare function AlertDialogPortal(props: AlertDialog.Portal.Props): ReactElement;
|
|
30
|
+
/**
|
|
31
|
+
* The scrim behind the panel. Fades with the dialog and dims everything beneath it. An AlertDialog is
|
|
32
|
+
* never dismissed by a click on the backdrop — it is a visual scrim only.
|
|
33
|
+
*
|
|
34
|
+
* Slot: `noctis-alert-dialog-backdrop`.
|
|
35
|
+
* @see {@link AlertDialog.Backdrop.Props}
|
|
36
|
+
*/
|
|
37
|
+
declare function AlertDialogBackdrop({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: AlertDialog.Backdrop.Props): ReactElement;
|
|
41
|
+
/**
|
|
42
|
+
* The fixed full-screen container that centres the panel and keeps a gap to the viewport edges. Scrolls
|
|
43
|
+
* when a tall panel outgrows the screen.
|
|
44
|
+
*
|
|
45
|
+
* Slot: `noctis-alert-dialog-viewport`.
|
|
46
|
+
* @see {@link AlertDialog.Viewport.Props}
|
|
47
|
+
*/
|
|
48
|
+
declare function AlertDialogViewport(props: AlertDialog.Viewport.Props): ReactElement;
|
|
49
|
+
/**
|
|
50
|
+
* The panel surface itself. Renders *through* `Surface` (`elevation="elevated"`, `bordered`,
|
|
51
|
+
* `shadow="modal"`) for its elevated scope, border, base paint, and the modal shadow — matching the
|
|
52
|
+
* `Dialog` family — so the Cancel/Action buttons inside re-derive off that base. Initial focus defaults
|
|
53
|
+
* to the Cancel button (the non-destructive choice) — pass `initialFocus` to override; pass `finalFocus`
|
|
54
|
+
* to control where focus returns on close (e.g. when the trigger has unmounted). `tone` paints the
|
|
55
|
+
* restrained severity cue; `size` caps the width.
|
|
56
|
+
*
|
|
57
|
+
* Slot: `noctis-alert-dialog-popup` (with `data-tone`/`data-size`/`data-elevation`). Styling is
|
|
58
|
+
* precompiled in `alert-dialog.css`.
|
|
59
|
+
* @see {@link AlertDialog.Popup.Props}
|
|
60
|
+
*/
|
|
61
|
+
declare function AlertDialogPopup({
|
|
62
|
+
className,
|
|
63
|
+
initialFocus,
|
|
64
|
+
tone,
|
|
65
|
+
size,
|
|
66
|
+
...props
|
|
67
|
+
}: AlertDialog.Popup.Props): ReactElement;
|
|
68
|
+
/**
|
|
69
|
+
* The common composition: portal, backdrop, centring viewport, and panel in one. Drop
|
|
70
|
+
* `AlertDialog.Header`/`Body`/`Footer` (with `Cancel` and `Action`) inside. Reach for the granular parts
|
|
71
|
+
* when you need to customize the portal or backdrop wiring.
|
|
72
|
+
*
|
|
73
|
+
* @see {@link AlertDialog.Content.Props}
|
|
74
|
+
*/
|
|
75
|
+
declare function AlertDialogContent({
|
|
76
|
+
children,
|
|
77
|
+
backdropClassName,
|
|
78
|
+
...props
|
|
79
|
+
}: AlertDialog.Content.Props): ReactElement;
|
|
80
|
+
/**
|
|
81
|
+
* Closes the dialog without committing. Renders a bare button and carries no styling of its own, so it
|
|
82
|
+
* composes with any Noctis `Button` through `render`. It is the popup's default initial-focus target, so
|
|
83
|
+
* keyboard and screen-reader users land on the safe choice; give it visible text or an `aria-label`.
|
|
84
|
+
*
|
|
85
|
+
* Slot: `noctis-alert-dialog-cancel`.
|
|
86
|
+
* @see {@link AlertDialog.Cancel.Props}
|
|
87
|
+
*/
|
|
88
|
+
declare function AlertDialogCancel({
|
|
89
|
+
className,
|
|
90
|
+
...props
|
|
91
|
+
}: AlertDialog.Cancel.Props): ReactElement;
|
|
92
|
+
/**
|
|
93
|
+
* Confirms the dialog's prompt and closes it. Renders a bare button that composes with a Noctis `Button`
|
|
94
|
+
* through `render`. Set `tone="danger"` for a destructive confirmation (compose a danger-toned `Button`
|
|
95
|
+
* to match); the tone is an explicit attribute, not a boolean mode.
|
|
96
|
+
*
|
|
97
|
+
* Slot: `noctis-alert-dialog-action` (with `data-tone`).
|
|
98
|
+
* @see {@link AlertDialog.Action.Props}
|
|
99
|
+
*/
|
|
100
|
+
declare function AlertDialogAction({
|
|
101
|
+
className,
|
|
102
|
+
tone,
|
|
103
|
+
...props
|
|
104
|
+
}: AlertDialog.Action.Props): ReactElement;
|
|
105
|
+
/**
|
|
106
|
+
* Closes the dialog. Renders a bare button with no styling of its own, so it composes with any `Button`
|
|
107
|
+
* through `render` — the low-level dismiss the `Cancel`/`Action` parts are built on, for a corner
|
|
108
|
+
* dismiss or a custom action.
|
|
109
|
+
*
|
|
110
|
+
* Slot: `noctis-alert-dialog-close`.
|
|
111
|
+
* @see {@link AlertDialog.Close.Props}
|
|
112
|
+
*/
|
|
113
|
+
declare function AlertDialogClose({
|
|
114
|
+
className,
|
|
115
|
+
...props
|
|
116
|
+
}: AlertDialog.Close.Props): ReactElement;
|
|
117
|
+
/**
|
|
118
|
+
* The panel's top region — the title and description, separated from the body by a divider.
|
|
119
|
+
*
|
|
120
|
+
* Slot: `noctis-alert-dialog-header`.
|
|
121
|
+
* @see {@link AlertDialog.Header.Props}
|
|
122
|
+
*/
|
|
123
|
+
declare function AlertDialogHeader({
|
|
124
|
+
className,
|
|
125
|
+
...props
|
|
126
|
+
}: AlertDialog.Header.Props): ReactElement;
|
|
127
|
+
/**
|
|
128
|
+
* The leading severity glyph in the header — a decorative icon whose colour follows the panel `tone`
|
|
129
|
+
* (`danger`/`warning`/`neutral`). Wrap a Noctis `Icon` in it. It is `aria-hidden` (the title carries the
|
|
130
|
+
* meaning), so it adds a colour-independent severity signal without doubling the announcement.
|
|
131
|
+
*
|
|
132
|
+
* Slot: `noctis-alert-dialog-icon`.
|
|
133
|
+
* @see {@link AlertDialog.Icon.Props}
|
|
134
|
+
*/
|
|
135
|
+
declare function AlertDialogIcon({
|
|
136
|
+
className,
|
|
137
|
+
...props
|
|
138
|
+
}: AlertDialog.Icon.Props): ReactElement;
|
|
139
|
+
/**
|
|
140
|
+
* The middle region — the message the user is being asked to confirm.
|
|
141
|
+
*
|
|
142
|
+
* Slot: `noctis-alert-dialog-body`.
|
|
143
|
+
* @see {@link AlertDialog.Body.Props}
|
|
144
|
+
*/
|
|
145
|
+
declare function AlertDialogBody({
|
|
146
|
+
className,
|
|
147
|
+
...props
|
|
148
|
+
}: AlertDialog.Body.Props): ReactElement;
|
|
149
|
+
/**
|
|
150
|
+
* The panel's bottom region — the Cancel/Action pair, pinned to the base.
|
|
151
|
+
*
|
|
152
|
+
* Slot: `noctis-alert-dialog-footer`.
|
|
153
|
+
* @see {@link AlertDialog.Footer.Props}
|
|
154
|
+
*/
|
|
155
|
+
declare function AlertDialogFooter({
|
|
156
|
+
className,
|
|
157
|
+
...props
|
|
158
|
+
}: AlertDialog.Footer.Props): ReactElement;
|
|
159
|
+
/**
|
|
160
|
+
* The accessible name of the dialog, linked to the panel via `aria-labelledby`. Renders an `<h2>`.
|
|
161
|
+
*
|
|
162
|
+
* Slot: `noctis-alert-dialog-title`.
|
|
163
|
+
* @see {@link AlertDialog.Title.Props}
|
|
164
|
+
*/
|
|
165
|
+
declare function AlertDialogTitle({
|
|
166
|
+
className,
|
|
167
|
+
...props
|
|
168
|
+
}: AlertDialog.Title.Props): ReactElement;
|
|
169
|
+
/**
|
|
170
|
+
* Supporting copy under the title, linked to the panel via `aria-describedby`.
|
|
171
|
+
*
|
|
172
|
+
* Slot: `noctis-alert-dialog-description`.
|
|
173
|
+
* @see {@link AlertDialog.Description.Props}
|
|
174
|
+
*/
|
|
175
|
+
declare function AlertDialogDescription({
|
|
176
|
+
className,
|
|
177
|
+
...props
|
|
178
|
+
}: AlertDialog.Description.Props): ReactElement;
|
|
179
|
+
/**
|
|
180
|
+
* A centred, focus-trapped confirmation dialog, built on Base UI's AlertDialog for focus management,
|
|
181
|
+
* scroll-lock, and `Escape` dismissal. It is the deliberate cousin of `Sheet`: always modal, and — being
|
|
182
|
+
* a question the user must answer — *not* dismissed by an outside click, only by its Cancel/Action
|
|
183
|
+
* buttons or `Escape`. Compose it from parts: `AlertDialog.Root` owns state, `AlertDialog.Trigger` opens
|
|
184
|
+
* it, and `AlertDialog.Content` (or `Portal` + `Backdrop` + `Viewport` + `Popup`) renders the centred
|
|
185
|
+
* panel holding `Header`/`Body`/`Footer`, `Title`/`Description`, and the `Cancel`/`Action` pair. Initial
|
|
186
|
+
* focus lands on `Cancel` (the safe choice); `Action` takes an explicit `tone="danger"` for destructive
|
|
187
|
+
* confirmations.
|
|
188
|
+
*
|
|
189
|
+
* Styling is precompiled in `alert-dialog.css`, keyed off each part's `data-slot` (plus `data-tone` on
|
|
190
|
+
* the action); the popup renders through `Surface` for its elevated scope and base paint. Each part's
|
|
191
|
+
* function value carries the D12 `props()` escape hatch via `Object.assign`.
|
|
192
|
+
*
|
|
193
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
194
|
+
* exposed through the matching `AlertDialog` namespace below — e.g. `AlertDialog.Action.Props`.
|
|
195
|
+
*/
|
|
196
|
+
declare const AlertDialog: {
|
|
197
|
+
Root: typeof AlertDialogRoot;
|
|
198
|
+
Trigger: typeof AlertDialogTrigger & {
|
|
199
|
+
props: typeof triggerProps;
|
|
200
|
+
};
|
|
201
|
+
Portal: typeof AlertDialogPortal;
|
|
202
|
+
Backdrop: typeof AlertDialogBackdrop & {
|
|
203
|
+
props: typeof backdropProps;
|
|
204
|
+
};
|
|
205
|
+
Viewport: typeof AlertDialogViewport & {
|
|
206
|
+
props: typeof viewportProps;
|
|
207
|
+
};
|
|
208
|
+
Popup: typeof AlertDialogPopup & {
|
|
209
|
+
props: typeof popupProps;
|
|
210
|
+
};
|
|
211
|
+
Content: typeof AlertDialogContent;
|
|
212
|
+
Close: typeof AlertDialogClose & {
|
|
213
|
+
props: typeof closeProps;
|
|
214
|
+
};
|
|
215
|
+
Cancel: typeof AlertDialogCancel & {
|
|
216
|
+
props: typeof cancelProps;
|
|
217
|
+
};
|
|
218
|
+
Action: typeof AlertDialogAction & {
|
|
219
|
+
props: typeof actionProps;
|
|
220
|
+
};
|
|
221
|
+
Header: typeof AlertDialogHeader & {
|
|
222
|
+
props: typeof headerProps;
|
|
223
|
+
};
|
|
224
|
+
Icon: typeof AlertDialogIcon & {
|
|
225
|
+
props: typeof iconProps;
|
|
226
|
+
};
|
|
227
|
+
Body: typeof AlertDialogBody & {
|
|
228
|
+
props: typeof bodyProps;
|
|
229
|
+
};
|
|
230
|
+
Footer: typeof AlertDialogFooter & {
|
|
231
|
+
props: typeof footerProps;
|
|
232
|
+
};
|
|
233
|
+
Title: typeof AlertDialogTitle & {
|
|
234
|
+
props: typeof titleProps;
|
|
235
|
+
};
|
|
236
|
+
Description: typeof AlertDialogDescription & {
|
|
237
|
+
props: typeof descriptionProps;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. This namespace
|
|
242
|
+
* is types-only — it emits no runtime code and merges with the `AlertDialog` object above, so
|
|
243
|
+
* `AlertDialog.Popup` is the component value while `AlertDialog.Popup.Props` is its prop type.
|
|
244
|
+
*/
|
|
245
|
+
declare namespace AlertDialog {
|
|
246
|
+
/** The confirmation's severity — a neutral commit, a destructive `danger`, or a cautionary `warning`. */
|
|
247
|
+
type Tone = AlertDialogTone;
|
|
248
|
+
/** The panel's cross-axis extent — its maximum width. */
|
|
249
|
+
type Size = AlertDialogSize;
|
|
250
|
+
/** The spreadable data-attribute prop bag every `AlertDialog.*.props()` returns (D12). */
|
|
251
|
+
type PartProps = AlertDialogPartProps;
|
|
252
|
+
namespace Root {
|
|
253
|
+
type Props = alert_dialog_d_exports.AlertDialog.Root.Props;
|
|
254
|
+
type State = alert_dialog_d_exports.AlertDialog.Root.State;
|
|
255
|
+
/** The imperative handle from `actionsRef` — `close()`/`unmount()`, for async-confirm flows. */
|
|
256
|
+
type Actions = alert_dialog_d_exports.AlertDialog.Root.Actions;
|
|
257
|
+
}
|
|
258
|
+
namespace Trigger {
|
|
259
|
+
type Props = alert_dialog_d_exports.AlertDialog.Trigger.Props;
|
|
260
|
+
type State = alert_dialog_d_exports.AlertDialog.Trigger.State;
|
|
261
|
+
}
|
|
262
|
+
namespace Portal {
|
|
263
|
+
type Props = alert_dialog_d_exports.AlertDialog.Portal.Props;
|
|
264
|
+
type State = alert_dialog_d_exports.AlertDialog.Portal.State;
|
|
265
|
+
}
|
|
266
|
+
namespace Backdrop {
|
|
267
|
+
type Props = alert_dialog_d_exports.AlertDialog.Backdrop.Props;
|
|
268
|
+
type State = alert_dialog_d_exports.AlertDialog.Backdrop.State;
|
|
269
|
+
}
|
|
270
|
+
namespace Viewport {
|
|
271
|
+
type Props = alert_dialog_d_exports.AlertDialog.Viewport.Props;
|
|
272
|
+
type State = alert_dialog_d_exports.AlertDialog.Viewport.State;
|
|
273
|
+
}
|
|
274
|
+
namespace Popup {
|
|
275
|
+
type Props = alert_dialog_d_exports.AlertDialog.Popup.Props & {
|
|
276
|
+
/** Panel severity — paints the restrained status-role cue. Defaults to `neutral`. */tone?: AlertDialogTone; /** Cross-axis extent — the panel's maximum width. Defaults to `md`. */
|
|
277
|
+
size?: AlertDialogSize;
|
|
278
|
+
};
|
|
279
|
+
type State = alert_dialog_d_exports.AlertDialog.Popup.State;
|
|
280
|
+
/** Argument to the `AlertDialog.Popup.props(...)` escape-hatch helper. */
|
|
281
|
+
type PropsArgs = AlertDialogPopupPropsArgs;
|
|
282
|
+
}
|
|
283
|
+
namespace Content {
|
|
284
|
+
type Props = Popup.Props & {
|
|
285
|
+
/** Classes for the backdrop scrim. */backdropClassName?: string;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
namespace Close {
|
|
289
|
+
type Props = alert_dialog_d_exports.AlertDialog.Close.Props;
|
|
290
|
+
type State = alert_dialog_d_exports.AlertDialog.Close.State;
|
|
291
|
+
}
|
|
292
|
+
namespace Cancel {
|
|
293
|
+
type Props = alert_dialog_d_exports.AlertDialog.Close.Props;
|
|
294
|
+
}
|
|
295
|
+
namespace Action {
|
|
296
|
+
type Props = alert_dialog_d_exports.AlertDialog.Close.Props & {
|
|
297
|
+
/** The action's intent — a neutral commit, or a destructive confirmation. Defaults to `neutral`. */tone?: AlertDialogActionTone;
|
|
298
|
+
};
|
|
299
|
+
/** Argument to the `AlertDialog.Action.props(...)` escape-hatch helper. */
|
|
300
|
+
type PropsArgs = AlertDialogActionPropsArgs;
|
|
301
|
+
}
|
|
302
|
+
namespace Header {
|
|
303
|
+
type Props = ComponentProps<"div">;
|
|
304
|
+
}
|
|
305
|
+
namespace Icon {
|
|
306
|
+
type Props = ComponentProps<"span">;
|
|
307
|
+
}
|
|
308
|
+
namespace Body {
|
|
309
|
+
type Props = ComponentProps<"div">;
|
|
310
|
+
}
|
|
311
|
+
namespace Footer {
|
|
312
|
+
type Props = ComponentProps<"div">;
|
|
313
|
+
}
|
|
314
|
+
namespace Title {
|
|
315
|
+
type Props = alert_dialog_d_exports.AlertDialog.Title.Props;
|
|
316
|
+
type State = alert_dialog_d_exports.AlertDialog.Title.State;
|
|
317
|
+
}
|
|
318
|
+
namespace Description {
|
|
319
|
+
type Props = alert_dialog_d_exports.AlertDialog.Description.Props;
|
|
320
|
+
type State = alert_dialog_d_exports.AlertDialog.Description.State;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
//#endregion
|
|
324
|
+
export { AlertDialog };
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Surface } from "../surface/surface.js";
|
|
3
|
+
import { alert_dialog_exports } from "../../primitives/alert-dialog.js";
|
|
4
|
+
import { AlertDialogContext, useAlertDialogContext } from "./alert-dialog.context.js";
|
|
5
|
+
import { ALERT_DIALOG_SLOTS } from "./alert-dialog.slots.js";
|
|
6
|
+
import { actionProps, backdropProps, bodyProps, cancelProps, closeProps, descriptionProps, footerProps, headerProps, iconProps, popupProps, titleProps, triggerProps, viewportProps } from "./alert-dialog.props.js";
|
|
7
|
+
import { useRef } from "react";
|
|
8
|
+
import clsx$1 from "clsx";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Groups the parts and owns open state, plus the Cancel-button ref every part shares for initial focus.
|
|
13
|
+
* Always modal — focus is trapped, the page is scroll-locked, and the rest of the document is inert.
|
|
14
|
+
* Unlike a Dialog or Sheet, a click outside does *not* close it: a confirmation must be answered, so
|
|
15
|
+
* only the Cancel/Action buttons or `Escape` dismiss it. Base UI's `AlertDialog.Root` enforces that.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link AlertDialog.Root.Props}
|
|
18
|
+
*/
|
|
19
|
+
function AlertDialogRoot(props) {
|
|
20
|
+
return /* @__PURE__ */ jsx(AlertDialogContext, {
|
|
21
|
+
value: { cancelRef: useRef(null) },
|
|
22
|
+
children: /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Root, { ...props })
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A button that opens the dialog. Wires the accessible relationship to the panel. Compose it from a
|
|
27
|
+
* `Button` through `render` so it inherits the button's look, hover, and focus.
|
|
28
|
+
*
|
|
29
|
+
* Slot: `noctis-alert-dialog-trigger`.
|
|
30
|
+
* @see {@link AlertDialog.Trigger.Props}
|
|
31
|
+
*/
|
|
32
|
+
function AlertDialogTrigger(props) {
|
|
33
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Trigger, {
|
|
34
|
+
"data-slot": ALERT_DIALOG_SLOTS.trigger,
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Moves the panel and backdrop to a portal at the end of `<body>`.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link AlertDialog.Portal.Props}
|
|
42
|
+
*/
|
|
43
|
+
function AlertDialogPortal(props) {
|
|
44
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Portal, { ...props });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The scrim behind the panel. Fades with the dialog and dims everything beneath it. An AlertDialog is
|
|
48
|
+
* never dismissed by a click on the backdrop — it is a visual scrim only.
|
|
49
|
+
*
|
|
50
|
+
* Slot: `noctis-alert-dialog-backdrop`.
|
|
51
|
+
* @see {@link AlertDialog.Backdrop.Props}
|
|
52
|
+
*/
|
|
53
|
+
function AlertDialogBackdrop({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Backdrop, {
|
|
55
|
+
"data-slot": ALERT_DIALOG_SLOTS.backdrop,
|
|
56
|
+
className,
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The fixed full-screen container that centres the panel and keeps a gap to the viewport edges. Scrolls
|
|
62
|
+
* when a tall panel outgrows the screen.
|
|
63
|
+
*
|
|
64
|
+
* Slot: `noctis-alert-dialog-viewport`.
|
|
65
|
+
* @see {@link AlertDialog.Viewport.Props}
|
|
66
|
+
*/
|
|
67
|
+
function AlertDialogViewport(props) {
|
|
68
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Viewport, {
|
|
69
|
+
"data-slot": ALERT_DIALOG_SLOTS.viewport,
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The panel surface itself. Renders *through* `Surface` (`elevation="elevated"`, `bordered`,
|
|
75
|
+
* `shadow="modal"`) for its elevated scope, border, base paint, and the modal shadow — matching the
|
|
76
|
+
* `Dialog` family — so the Cancel/Action buttons inside re-derive off that base. Initial focus defaults
|
|
77
|
+
* to the Cancel button (the non-destructive choice) — pass `initialFocus` to override; pass `finalFocus`
|
|
78
|
+
* to control where focus returns on close (e.g. when the trigger has unmounted). `tone` paints the
|
|
79
|
+
* restrained severity cue; `size` caps the width.
|
|
80
|
+
*
|
|
81
|
+
* Slot: `noctis-alert-dialog-popup` (with `data-tone`/`data-size`/`data-elevation`). Styling is
|
|
82
|
+
* precompiled in `alert-dialog.css`.
|
|
83
|
+
* @see {@link AlertDialog.Popup.Props}
|
|
84
|
+
*/
|
|
85
|
+
function AlertDialogPopup({ className, initialFocus, tone = "neutral", size = "md", ...props }) {
|
|
86
|
+
const { cancelRef } = useAlertDialogContext("Popup");
|
|
87
|
+
return /* @__PURE__ */ jsx(Surface, {
|
|
88
|
+
elevation: "elevated",
|
|
89
|
+
bordered: true,
|
|
90
|
+
shadow: "modal",
|
|
91
|
+
"data-slot": ALERT_DIALOG_SLOTS.popup,
|
|
92
|
+
"data-tone": tone,
|
|
93
|
+
"data-size": size,
|
|
94
|
+
render: /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Popup, {
|
|
95
|
+
className,
|
|
96
|
+
initialFocus: initialFocus ?? cancelRef,
|
|
97
|
+
...props
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The common composition: portal, backdrop, centring viewport, and panel in one. Drop
|
|
103
|
+
* `AlertDialog.Header`/`Body`/`Footer` (with `Cancel` and `Action`) inside. Reach for the granular parts
|
|
104
|
+
* when you need to customize the portal or backdrop wiring.
|
|
105
|
+
*
|
|
106
|
+
* @see {@link AlertDialog.Content.Props}
|
|
107
|
+
*/
|
|
108
|
+
function AlertDialogContent({ children, backdropClassName, ...props }) {
|
|
109
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogBackdrop, { className: backdropClassName }), /* @__PURE__ */ jsx(AlertDialogViewport, { children: /* @__PURE__ */ jsx(AlertDialogPopup, {
|
|
110
|
+
...props,
|
|
111
|
+
children
|
|
112
|
+
}) })] });
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Closes the dialog without committing. Renders a bare button and carries no styling of its own, so it
|
|
116
|
+
* composes with any Noctis `Button` through `render`. It is the popup's default initial-focus target, so
|
|
117
|
+
* keyboard and screen-reader users land on the safe choice; give it visible text or an `aria-label`.
|
|
118
|
+
*
|
|
119
|
+
* Slot: `noctis-alert-dialog-cancel`.
|
|
120
|
+
* @see {@link AlertDialog.Cancel.Props}
|
|
121
|
+
*/
|
|
122
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
123
|
+
const { cancelRef } = useAlertDialogContext("Cancel");
|
|
124
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Close, {
|
|
125
|
+
"data-slot": ALERT_DIALOG_SLOTS.cancel,
|
|
126
|
+
className,
|
|
127
|
+
...props,
|
|
128
|
+
ref: cancelRef
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Confirms the dialog's prompt and closes it. Renders a bare button that composes with a Noctis `Button`
|
|
133
|
+
* through `render`. Set `tone="danger"` for a destructive confirmation (compose a danger-toned `Button`
|
|
134
|
+
* to match); the tone is an explicit attribute, not a boolean mode.
|
|
135
|
+
*
|
|
136
|
+
* Slot: `noctis-alert-dialog-action` (with `data-tone`).
|
|
137
|
+
* @see {@link AlertDialog.Action.Props}
|
|
138
|
+
*/
|
|
139
|
+
function AlertDialogAction({ className, tone = "neutral", ...props }) {
|
|
140
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Close, {
|
|
141
|
+
"data-slot": ALERT_DIALOG_SLOTS.action,
|
|
142
|
+
"data-tone": tone,
|
|
143
|
+
className,
|
|
144
|
+
...props
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Closes the dialog. Renders a bare button with no styling of its own, so it composes with any `Button`
|
|
149
|
+
* through `render` — the low-level dismiss the `Cancel`/`Action` parts are built on, for a corner
|
|
150
|
+
* dismiss or a custom action.
|
|
151
|
+
*
|
|
152
|
+
* Slot: `noctis-alert-dialog-close`.
|
|
153
|
+
* @see {@link AlertDialog.Close.Props}
|
|
154
|
+
*/
|
|
155
|
+
function AlertDialogClose({ className, ...props }) {
|
|
156
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Close, {
|
|
157
|
+
"data-slot": ALERT_DIALOG_SLOTS.close,
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The panel's top region — the title and description, separated from the body by a divider.
|
|
164
|
+
*
|
|
165
|
+
* Slot: `noctis-alert-dialog-header`.
|
|
166
|
+
* @see {@link AlertDialog.Header.Props}
|
|
167
|
+
*/
|
|
168
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
169
|
+
return /* @__PURE__ */ jsx("div", {
|
|
170
|
+
"data-slot": ALERT_DIALOG_SLOTS.header,
|
|
171
|
+
className: clsx$1(className),
|
|
172
|
+
...props
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The leading severity glyph in the header — a decorative icon whose colour follows the panel `tone`
|
|
177
|
+
* (`danger`/`warning`/`neutral`). Wrap a Noctis `Icon` in it. It is `aria-hidden` (the title carries the
|
|
178
|
+
* meaning), so it adds a colour-independent severity signal without doubling the announcement.
|
|
179
|
+
*
|
|
180
|
+
* Slot: `noctis-alert-dialog-icon`.
|
|
181
|
+
* @see {@link AlertDialog.Icon.Props}
|
|
182
|
+
*/
|
|
183
|
+
function AlertDialogIcon({ className, ...props }) {
|
|
184
|
+
return /* @__PURE__ */ jsx("span", {
|
|
185
|
+
"data-slot": ALERT_DIALOG_SLOTS.icon,
|
|
186
|
+
"aria-hidden": true,
|
|
187
|
+
className: clsx$1(className),
|
|
188
|
+
...props
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The middle region — the message the user is being asked to confirm.
|
|
193
|
+
*
|
|
194
|
+
* Slot: `noctis-alert-dialog-body`.
|
|
195
|
+
* @see {@link AlertDialog.Body.Props}
|
|
196
|
+
*/
|
|
197
|
+
function AlertDialogBody({ className, ...props }) {
|
|
198
|
+
return /* @__PURE__ */ jsx("div", {
|
|
199
|
+
"data-slot": ALERT_DIALOG_SLOTS.body,
|
|
200
|
+
className: clsx$1(className),
|
|
201
|
+
...props
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The panel's bottom region — the Cancel/Action pair, pinned to the base.
|
|
206
|
+
*
|
|
207
|
+
* Slot: `noctis-alert-dialog-footer`.
|
|
208
|
+
* @see {@link AlertDialog.Footer.Props}
|
|
209
|
+
*/
|
|
210
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
211
|
+
return /* @__PURE__ */ jsx("div", {
|
|
212
|
+
"data-slot": ALERT_DIALOG_SLOTS.footer,
|
|
213
|
+
className: clsx$1(className),
|
|
214
|
+
...props
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The accessible name of the dialog, linked to the panel via `aria-labelledby`. Renders an `<h2>`.
|
|
219
|
+
*
|
|
220
|
+
* Slot: `noctis-alert-dialog-title`.
|
|
221
|
+
* @see {@link AlertDialog.Title.Props}
|
|
222
|
+
*/
|
|
223
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
224
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Title, {
|
|
225
|
+
"data-slot": ALERT_DIALOG_SLOTS.title,
|
|
226
|
+
className,
|
|
227
|
+
...props
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Supporting copy under the title, linked to the panel via `aria-describedby`.
|
|
232
|
+
*
|
|
233
|
+
* Slot: `noctis-alert-dialog-description`.
|
|
234
|
+
* @see {@link AlertDialog.Description.Props}
|
|
235
|
+
*/
|
|
236
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
237
|
+
return /* @__PURE__ */ jsx(alert_dialog_exports.AlertDialog.Description, {
|
|
238
|
+
"data-slot": ALERT_DIALOG_SLOTS.description,
|
|
239
|
+
className,
|
|
240
|
+
...props
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* A centred, focus-trapped confirmation dialog, built on Base UI's AlertDialog for focus management,
|
|
245
|
+
* scroll-lock, and `Escape` dismissal. It is the deliberate cousin of `Sheet`: always modal, and — being
|
|
246
|
+
* a question the user must answer — *not* dismissed by an outside click, only by its Cancel/Action
|
|
247
|
+
* buttons or `Escape`. Compose it from parts: `AlertDialog.Root` owns state, `AlertDialog.Trigger` opens
|
|
248
|
+
* it, and `AlertDialog.Content` (or `Portal` + `Backdrop` + `Viewport` + `Popup`) renders the centred
|
|
249
|
+
* panel holding `Header`/`Body`/`Footer`, `Title`/`Description`, and the `Cancel`/`Action` pair. Initial
|
|
250
|
+
* focus lands on `Cancel` (the safe choice); `Action` takes an explicit `tone="danger"` for destructive
|
|
251
|
+
* confirmations.
|
|
252
|
+
*
|
|
253
|
+
* Styling is precompiled in `alert-dialog.css`, keyed off each part's `data-slot` (plus `data-tone` on
|
|
254
|
+
* the action); the popup renders through `Surface` for its elevated scope and base paint. Each part's
|
|
255
|
+
* function value carries the D12 `props()` escape hatch via `Object.assign`.
|
|
256
|
+
*
|
|
257
|
+
* The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
|
|
258
|
+
* exposed through the matching `AlertDialog` namespace below — e.g. `AlertDialog.Action.Props`.
|
|
259
|
+
*/
|
|
260
|
+
const AlertDialog = {
|
|
261
|
+
Root: AlertDialogRoot,
|
|
262
|
+
Trigger: Object.assign(AlertDialogTrigger, { props: triggerProps }),
|
|
263
|
+
Portal: AlertDialogPortal,
|
|
264
|
+
Backdrop: Object.assign(AlertDialogBackdrop, { props: backdropProps }),
|
|
265
|
+
Viewport: Object.assign(AlertDialogViewport, { props: viewportProps }),
|
|
266
|
+
Popup: Object.assign(AlertDialogPopup, { props: popupProps }),
|
|
267
|
+
Content: AlertDialogContent,
|
|
268
|
+
Close: Object.assign(AlertDialogClose, { props: closeProps }),
|
|
269
|
+
Cancel: Object.assign(AlertDialogCancel, { props: cancelProps }),
|
|
270
|
+
Action: Object.assign(AlertDialogAction, { props: actionProps }),
|
|
271
|
+
Header: Object.assign(AlertDialogHeader, { props: headerProps }),
|
|
272
|
+
Icon: Object.assign(AlertDialogIcon, { props: iconProps }),
|
|
273
|
+
Body: Object.assign(AlertDialogBody, { props: bodyProps }),
|
|
274
|
+
Footer: Object.assign(AlertDialogFooter, { props: footerProps }),
|
|
275
|
+
Title: Object.assign(AlertDialogTitle, { props: titleProps }),
|
|
276
|
+
Description: Object.assign(AlertDialogDescription, { props: descriptionProps })
|
|
277
|
+
};
|
|
278
|
+
//#endregion
|
|
279
|
+
export { AlertDialog };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { AlertDialogActionTone, AlertDialogSize, AlertDialogTone } from "./alert-dialog.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/alert-dialog/alert-dialog.props.d.ts
|
|
4
|
+
/** A spreadable data-attribute prop bag — the shape every `AlertDialog.*.props()` returns. */
|
|
5
|
+
type AlertDialogPartProps = {
|
|
6
|
+
/** The slot value the matching `alert-dialog.css` rules anchor on. */"data-slot": string; /** Forwarded verbatim — styling is attribute-driven, so this is an optional consumer passthrough. */
|
|
7
|
+
className?: string; /** A data-attribute present (a value or empty string) or absent (`undefined`); never `false`. */
|
|
8
|
+
[attr: `data-${string}`]: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
/** Common shape: every part's `.props()` accepts an optional `className` passthrough. */
|
|
11
|
+
interface BasePropsArgs {
|
|
12
|
+
/** Forwarded verbatim onto the returned prop bag. */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Argument to `AlertDialog.Action.props(...)` — the tone the action's look keys off. */
|
|
16
|
+
interface AlertDialogActionPropsArgs extends BasePropsArgs {
|
|
17
|
+
/** The action's intent — a neutral commit, or a destructive/cautionary confirmation. @default "neutral" */
|
|
18
|
+
tone?: AlertDialogActionTone;
|
|
19
|
+
}
|
|
20
|
+
/** Argument to `AlertDialog.Popup.props(...)` — the panel severity and width cap the rules key off. */
|
|
21
|
+
interface AlertDialogPopupPropsArgs extends BasePropsArgs {
|
|
22
|
+
/** Panel severity — paints the restrained status-role cue. @default "neutral" */
|
|
23
|
+
tone?: AlertDialogTone;
|
|
24
|
+
/** Cross-axis extent — the panel's maximum width. @default "md" */
|
|
25
|
+
size?: AlertDialogSize;
|
|
26
|
+
}
|
|
27
|
+
/** Argument to a stateless part's `.props(...)` — no variants of its own. */
|
|
28
|
+
type AlertDialogStatelessPropsArgs = BasePropsArgs;
|
|
29
|
+
/** Trigger prop bag: just the slot anchor. */
|
|
30
|
+
declare function triggerProps({
|
|
31
|
+
className
|
|
32
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
33
|
+
/** Backdrop prop bag: just the slot anchor (the scrim's paint flows from `alert-dialog.css`). */
|
|
34
|
+
declare function backdropProps({
|
|
35
|
+
className
|
|
36
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
37
|
+
/** Viewport prop bag: just the slot anchor (the centring container's paint flows from the CSS). */
|
|
38
|
+
declare function viewportProps({
|
|
39
|
+
className
|
|
40
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
41
|
+
/** Popup prop bag: slot anchor plus the `data-tone`/`data-size` the panel cue and width rules read. */
|
|
42
|
+
declare function popupProps({
|
|
43
|
+
tone,
|
|
44
|
+
size,
|
|
45
|
+
className
|
|
46
|
+
}?: AlertDialogPopupPropsArgs): AlertDialogPartProps;
|
|
47
|
+
/** Close prop bag: just the slot anchor (it carries no paint of its own — it composes with a Button). */
|
|
48
|
+
declare function closeProps({
|
|
49
|
+
className
|
|
50
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
51
|
+
/** Header prop bag: just the slot anchor. */
|
|
52
|
+
declare function headerProps({
|
|
53
|
+
className
|
|
54
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
55
|
+
/** Body prop bag: just the slot anchor. */
|
|
56
|
+
declare function bodyProps({
|
|
57
|
+
className
|
|
58
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
59
|
+
/** Footer prop bag: just the slot anchor. */
|
|
60
|
+
declare function footerProps({
|
|
61
|
+
className
|
|
62
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
63
|
+
/** Icon prop bag: just the slot anchor (the leading tone glyph; its colour flows from the popup tone). */
|
|
64
|
+
declare function iconProps({
|
|
65
|
+
className
|
|
66
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
67
|
+
/** Title prop bag: just the slot anchor. */
|
|
68
|
+
declare function titleProps({
|
|
69
|
+
className
|
|
70
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
71
|
+
/** Description prop bag: just the slot anchor. */
|
|
72
|
+
declare function descriptionProps({
|
|
73
|
+
className
|
|
74
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
75
|
+
/** Cancel prop bag: just the slot anchor (it composes with a Button — no paint of its own). */
|
|
76
|
+
declare function cancelProps({
|
|
77
|
+
className
|
|
78
|
+
}?: AlertDialogStatelessPropsArgs): AlertDialogPartProps;
|
|
79
|
+
/** Action prop bag: slot anchor plus the `data-tone` the action keys its intent off. */
|
|
80
|
+
declare function actionProps({
|
|
81
|
+
tone,
|
|
82
|
+
className
|
|
83
|
+
}?: AlertDialogActionPropsArgs): AlertDialogPartProps;
|
|
84
|
+
//#endregion
|
|
85
|
+
export { AlertDialogActionPropsArgs, AlertDialogPartProps, AlertDialogPopupPropsArgs, actionProps, backdropProps, bodyProps, cancelProps, closeProps, descriptionProps, footerProps, headerProps, iconProps, popupProps, titleProps, triggerProps, viewportProps };
|