@proto.ui/prototypes-shadcn 0.3.0-alpha.0 → 0.3.0-rc.1
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 +90 -4
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/dist/accordion/content.proto.d.ts +4 -0
- package/dist/accordion/content.proto.js +20 -0
- package/dist/accordion/heading.proto.d.ts +4 -0
- package/dist/accordion/heading.proto.js +13 -0
- package/dist/accordion/index.d.ts +7 -0
- package/dist/accordion/index.js +5 -0
- package/dist/accordion/item.proto.d.ts +4 -0
- package/dist/accordion/item.proto.js +33 -0
- package/dist/accordion/root.proto.d.ts +4 -0
- package/dist/accordion/root.proto.js +35 -0
- package/dist/accordion/trigger.proto.d.ts +4 -0
- package/dist/accordion/trigger.proto.js +130 -0
- package/dist/accordion/types.d.ts +7 -0
- package/dist/accordion/types.js +1 -0
- package/dist/accordion/visual.d.ts +4 -0
- package/dist/accordion/visual.js +38 -0
- package/dist/alert-dialog/action-paint.d.ts +18 -0
- package/dist/alert-dialog/action-paint.js +232 -0
- package/dist/alert-dialog/action.proto.d.ts +4 -0
- package/dist/alert-dialog/action.proto.js +19 -0
- package/dist/alert-dialog/cancel.proto.d.ts +4 -0
- package/dist/alert-dialog/cancel.proto.js +19 -0
- package/dist/alert-dialog/content.proto.d.ts +4 -0
- package/dist/alert-dialog/content.proto.js +39 -0
- package/dist/alert-dialog/description.proto.d.ts +4 -0
- package/dist/alert-dialog/description.proto.js +11 -0
- package/dist/alert-dialog/footer.proto.d.ts +4 -0
- package/dist/alert-dialog/footer.proto.js +14 -0
- package/dist/alert-dialog/header.proto.d.ts +4 -0
- package/dist/alert-dialog/header.proto.js +26 -0
- package/dist/alert-dialog/index.d.ts +13 -0
- package/dist/alert-dialog/index.js +11 -0
- package/dist/alert-dialog/mask.proto.d.ts +3 -0
- package/dist/alert-dialog/mask.proto.js +25 -0
- package/dist/alert-dialog/recipes.d.ts +60 -0
- package/dist/alert-dialog/recipes.js +61 -0
- package/dist/alert-dialog/root.proto.d.ts +4 -0
- package/dist/alert-dialog/root.proto.js +11 -0
- package/dist/alert-dialog/title.proto.d.ts +4 -0
- package/dist/alert-dialog/title.proto.js +11 -0
- package/dist/alert-dialog/trigger.proto.d.ts +4 -0
- package/dist/alert-dialog/trigger.proto.js +18 -0
- package/dist/alert-dialog/types.d.ts +38 -0
- package/dist/alert-dialog/types.js +1 -0
- package/dist/async-region/index.d.ts +2 -0
- package/dist/async-region/index.js +1 -0
- package/dist/async-region/root.proto.d.ts +4 -0
- package/dist/async-region/root.proto.js +14 -0
- package/dist/autocomplete/content.proto.d.ts +3 -0
- package/dist/autocomplete/content.proto.js +17 -0
- package/dist/autocomplete/empty.proto.d.ts +3 -0
- package/dist/autocomplete/empty.proto.js +13 -0
- package/dist/autocomplete/index.d.ts +15 -0
- package/dist/autocomplete/index.js +21 -0
- package/dist/autocomplete/input.proto.d.ts +3 -0
- package/dist/autocomplete/input.proto.js +43 -0
- package/dist/autocomplete/item.proto.d.ts +3 -0
- package/dist/autocomplete/item.proto.js +54 -0
- package/dist/autocomplete/root.proto.d.ts +3 -0
- package/dist/autocomplete/root.proto.js +13 -0
- package/dist/autocomplete/textarea.proto.d.ts +8 -0
- package/dist/autocomplete/textarea.proto.js +29 -0
- package/dist/autocomplete/trigger.proto.d.ts +3 -0
- package/dist/autocomplete/trigger.proto.js +140 -0
- package/dist/autocomplete/types.d.ts +14 -0
- package/dist/autocomplete/types.js +1 -0
- package/dist/button/button.proto.d.ts +4 -7
- package/dist/button/button.proto.js +222 -90
- package/dist/button/index.d.ts +3 -2
- package/dist/button/index.js +1 -1
- package/dist/button/new-york.d.ts +31 -0
- package/dist/button/new-york.js +31 -0
- package/dist/button/paint.d.ts +12 -0
- package/dist/button/paint.js +13 -0
- package/dist/button/profiles.d.ts +105 -0
- package/dist/button/profiles.js +190 -0
- package/dist/button/types.d.ts +10 -2
- package/dist/calendar/calendar.proto.d.ts +35 -0
- package/dist/calendar/calendar.proto.js +161 -0
- package/dist/calendar/index.d.ts +2 -0
- package/dist/calendar/index.js +1 -0
- package/dist/calendar/visual.d.ts +80 -0
- package/dist/calendar/visual.js +288 -0
- package/dist/card/content.proto.d.ts +2 -0
- package/dist/card/content.proto.js +9 -0
- package/dist/card/footer.proto.d.ts +2 -0
- package/dist/card/footer.proto.js +46 -0
- package/dist/card/header.proto.d.ts +2 -0
- package/dist/card/header.proto.js +50 -0
- package/dist/card/index.d.ts +5 -0
- package/dist/card/index.js +5 -0
- package/dist/card/root.proto.d.ts +2 -0
- package/dist/card/root.proto.js +46 -0
- package/dist/card/types.d.ts +20 -0
- package/dist/card/types.js +1 -0
- package/dist/card/visual.d.ts +14 -0
- package/dist/card/visual.js +70 -0
- package/dist/carousel/carousel.proto.d.ts +20 -0
- package/dist/carousel/carousel.proto.js +85 -0
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +1 -0
- package/dist/carousel/visual.d.ts +17 -0
- package/dist/carousel/visual.js +211 -0
- package/dist/checkbox/composition.d.ts +55 -0
- package/dist/checkbox/composition.js +45 -0
- package/dist/checkbox/index.d.ts +8 -6
- package/dist/checkbox/index.js +6 -5
- package/dist/checkbox/indicator.proto.d.ts +1 -1
- package/dist/checkbox/indicator.proto.js +1 -1
- package/dist/checkbox/root-visual.d.ts +4 -0
- package/dist/checkbox/root-visual.js +89 -0
- package/dist/checkbox/root.proto.d.ts +3 -8
- package/dist/checkbox/root.proto.js +8 -55
- package/dist/checkbox/types.d.ts +3 -1
- package/dist/checkbox-group/all.proto.d.ts +4 -0
- package/dist/checkbox-group/all.proto.js +27 -0
- package/dist/checkbox-group/index.d.ts +5 -0
- package/dist/checkbox-group/index.js +3 -0
- package/dist/checkbox-group/indicator-paint.d.ts +12 -0
- package/dist/checkbox-group/indicator-paint.js +101 -0
- package/dist/checkbox-group/item.proto.d.ts +4 -0
- package/dist/checkbox-group/item.proto.js +27 -0
- package/dist/checkbox-group/root.proto.d.ts +4 -0
- package/dist/checkbox-group/root.proto.js +20 -0
- package/dist/checkbox-group/types.d.ts +7 -0
- package/dist/checkbox-group/types.js +1 -0
- package/dist/collapsible/content.proto.d.ts +3 -0
- package/dist/collapsible/content.proto.js +56 -0
- package/dist/collapsible/index.d.ts +4 -0
- package/dist/collapsible/index.js +3 -0
- package/dist/collapsible/root.proto.d.ts +3 -0
- package/dist/collapsible/root.proto.js +20 -0
- package/dist/collapsible/trigger.proto.d.ts +3 -0
- package/dist/collapsible/trigger.proto.js +98 -0
- package/dist/collapsible/types.d.ts +19 -0
- package/dist/collapsible/types.js +1 -0
- package/dist/combobox/chip-remove.proto.d.ts +6 -0
- package/dist/combobox/chip-remove.proto.js +28 -0
- package/dist/combobox/chip.proto.d.ts +6 -0
- package/dist/combobox/chip.proto.js +18 -0
- package/dist/combobox/chips.proto.d.ts +6 -0
- package/dist/combobox/chips.proto.js +28 -0
- package/dist/combobox/content.proto.d.ts +3 -0
- package/dist/combobox/content.proto.js +12 -0
- package/dist/combobox/empty.proto.d.ts +3 -0
- package/dist/combobox/empty.proto.js +12 -0
- package/dist/combobox/index.d.ts +19 -0
- package/dist/combobox/index.js +23 -0
- package/dist/combobox/input.proto.d.ts +3 -0
- package/dist/combobox/input.proto.js +24 -0
- package/dist/combobox/item.proto.d.ts +3 -0
- package/dist/combobox/item.proto.js +16 -0
- package/dist/combobox/root.proto.d.ts +3 -0
- package/dist/combobox/root.proto.js +13 -0
- package/dist/combobox/trigger.proto.d.ts +3 -0
- package/dist/combobox/trigger.proto.js +16 -0
- package/dist/combobox/types.d.ts +11 -0
- package/dist/combobox/types.js +1 -0
- package/dist/combobox/visual.d.ts +18 -0
- package/dist/combobox/visual.js +234 -0
- package/dist/command/content.proto.d.ts +4 -0
- package/dist/command/content.proto.js +12 -0
- package/dist/command/dialog-content.proto.d.ts +12 -0
- package/dist/command/dialog-content.proto.js +75 -0
- package/dist/command/dialog-mask.proto.d.ts +10 -0
- package/dist/command/dialog-mask.proto.js +17 -0
- package/dist/command/empty.proto.d.ts +4 -0
- package/dist/command/empty.proto.js +16 -0
- package/dist/command/index.d.ts +18 -0
- package/dist/command/index.js +23 -0
- package/dist/command/input-wrapper.proto.d.ts +5 -0
- package/dist/command/input-wrapper.proto.js +25 -0
- package/dist/command/input.proto.d.ts +4 -0
- package/dist/command/input.proto.js +47 -0
- package/dist/command/item.proto.d.ts +4 -0
- package/dist/command/item.proto.js +28 -0
- package/dist/command/root.proto.d.ts +4 -0
- package/dist/command/root.proto.js +17 -0
- package/dist/command/types.d.ts +12 -0
- package/dist/command/types.js +1 -0
- package/dist/command/visual.d.ts +94 -0
- package/dist/command/visual.js +145 -0
- package/dist/component-presets.d.ts +4 -4
- package/dist/component-presets.js +3 -3
- package/dist/context-menu/content.proto.d.ts +3 -0
- package/dist/context-menu/content.proto.js +13 -0
- package/dist/context-menu/index.d.ts +17 -0
- package/dist/context-menu/index.js +31 -0
- package/dist/context-menu/item.proto.d.ts +3 -0
- package/dist/context-menu/item.proto.js +37 -0
- package/dist/context-menu/root.proto.d.ts +3 -0
- package/dist/context-menu/root.proto.js +12 -0
- package/dist/context-menu/trigger.proto.d.ts +3 -0
- package/dist/context-menu/trigger.proto.js +18 -0
- package/dist/context-menu/types.d.ts +10 -0
- package/dist/context-menu/types.js +1 -0
- package/dist/data-table/data-table.proto.d.ts +25 -0
- package/dist/data-table/data-table.proto.js +161 -0
- package/dist/data-table/header-row.proto.d.ts +5 -0
- package/dist/data-table/header-row.proto.js +14 -0
- package/dist/data-table/index.d.ts +2 -0
- package/dist/data-table/index.js +1 -0
- package/dist/data-table/visual.d.ts +10 -0
- package/dist/data-table/visual.js +58 -0
- package/dist/date-picker/date-picker.proto.d.ts +18 -0
- package/dist/date-picker/date-picker.proto.js +186 -0
- package/dist/date-picker/index.d.ts +2 -0
- package/dist/date-picker/index.js +1 -0
- package/dist/dialog/close-icon.proto.d.ts +2 -1
- package/dist/dialog/close-icon.proto.js +29 -5
- package/dist/dialog/close.proto.d.ts +2 -1
- package/dist/dialog/close.proto.js +4 -1
- package/dist/dialog/content.proto.d.ts +1 -1
- package/dist/dialog/content.proto.js +5 -1
- package/dist/dialog/description.proto.d.ts +2 -1
- package/dist/dialog/description.proto.js +4 -2
- package/dist/dialog/footer.proto.d.ts +2 -1
- package/dist/dialog/footer.proto.js +4 -1
- package/dist/dialog/header.proto.d.ts +2 -1
- package/dist/dialog/header.proto.js +4 -1
- package/dist/dialog/index.d.ts +22 -22
- package/dist/dialog/index.js +21 -21
- package/dist/dialog/overlay.proto.d.ts +1 -1
- package/dist/dialog/overlay.proto.js +8 -2
- package/dist/dialog/recipes.d.ts +71 -0
- package/dist/dialog/recipes.js +75 -0
- package/dist/dialog/root.proto.d.ts +2 -1
- package/dist/dialog/root.proto.js +2 -0
- package/dist/dialog/style.d.ts +17 -0
- package/dist/dialog/style.js +84 -0
- package/dist/dialog/title.proto.d.ts +2 -1
- package/dist/dialog/title.proto.js +4 -2
- package/dist/dialog/trigger.proto.d.ts +2 -1
- package/dist/dialog/trigger.proto.js +3 -1
- package/dist/dialog/types.d.ts +8 -7
- package/dist/drawer/close.proto.d.ts +4 -0
- package/dist/drawer/close.proto.js +15 -0
- package/dist/drawer/command-paint.d.ts +13 -0
- package/dist/drawer/command-paint.js +37 -0
- package/dist/drawer/content.proto.d.ts +4 -0
- package/dist/drawer/content.proto.js +92 -0
- package/dist/drawer/description.proto.d.ts +4 -0
- package/dist/drawer/description.proto.js +11 -0
- package/dist/drawer/footer.proto.d.ts +4 -0
- package/dist/drawer/footer.proto.js +13 -0
- package/dist/drawer/handle.proto.d.ts +4 -0
- package/dist/drawer/handle.proto.js +38 -0
- package/dist/drawer/header.proto.d.ts +4 -0
- package/dist/drawer/header.proto.js +25 -0
- package/dist/drawer/index.d.ts +15 -0
- package/dist/drawer/index.js +11 -0
- package/dist/drawer/mask.proto.d.ts +3 -0
- package/dist/drawer/mask.proto.js +21 -0
- package/dist/drawer/recipes.d.ts +68 -0
- package/dist/drawer/recipes.js +73 -0
- package/dist/drawer/root.proto.d.ts +4 -0
- package/dist/drawer/root.proto.js +11 -0
- package/dist/drawer/title.proto.d.ts +4 -0
- package/dist/drawer/title.proto.js +11 -0
- package/dist/drawer/trigger.proto.d.ts +4 -0
- package/dist/drawer/trigger.proto.js +15 -0
- package/dist/drawer/types.d.ts +17 -0
- package/dist/drawer/types.js +1 -0
- package/dist/dropdown/content.proto.d.ts +2 -1
- package/dist/dropdown/content.proto.js +6 -30
- package/dist/dropdown/group.proto.d.ts +4 -0
- package/dist/dropdown/group.proto.js +11 -0
- package/dist/dropdown/index.d.ts +21 -9
- package/dist/dropdown/index.js +32 -8
- package/dist/dropdown/item.proto.d.ts +1 -1
- package/dist/dropdown/item.proto.js +4 -38
- package/dist/dropdown/label.proto.d.ts +3 -0
- package/dist/dropdown/label.proto.js +30 -0
- package/dist/dropdown/root.proto.d.ts +2 -1
- package/dist/dropdown/root.proto.js +5 -0
- package/dist/dropdown/separator.proto.d.ts +4 -0
- package/dist/dropdown/separator.proto.js +19 -0
- package/dist/dropdown/shortcut.proto.d.ts +4 -0
- package/dist/dropdown/shortcut.proto.js +29 -0
- package/dist/dropdown/trigger.proto.d.ts +1 -1
- package/dist/dropdown/trigger.proto.js +27 -33
- package/dist/dropdown/types.d.ts +12 -5
- package/dist/dropdown/visual.d.ts +97 -0
- package/dist/dropdown/visual.js +219 -0
- package/dist/field/checkbox.proto.d.ts +6 -0
- package/dist/field/checkbox.proto.js +14 -0
- package/dist/field/control.proto.d.ts +4 -0
- package/dist/field/control.proto.js +15 -0
- package/dist/field/description.proto.d.ts +4 -0
- package/dist/field/description.proto.js +12 -0
- package/dist/field/error.proto.d.ts +4 -0
- package/dist/field/error.proto.js +12 -0
- package/dist/field/index.d.ts +18 -0
- package/dist/field/index.js +11 -0
- package/dist/field/label.proto.d.ts +4 -0
- package/dist/field/label.proto.js +12 -0
- package/dist/field/radio-group.proto.d.ts +6 -0
- package/dist/field/radio-group.proto.js +11 -0
- package/dist/field/root.proto.d.ts +4 -0
- package/dist/field/root.proto.js +24 -0
- package/dist/field/select-trigger.proto.d.ts +7 -0
- package/dist/field/select-trigger.proto.js +15 -0
- package/dist/field/switch.proto.d.ts +6 -0
- package/dist/field/switch.proto.js +15 -0
- package/dist/field/textarea.proto.d.ts +7 -0
- package/dist/field/textarea.proto.js +16 -0
- package/dist/field/types.d.ts +11 -0
- package/dist/field/types.js +1 -0
- package/dist/field/validity.proto.d.ts +4 -0
- package/dist/field/validity.proto.js +12 -0
- package/dist/field/visual.d.ts +6 -0
- package/dist/field/visual.js +68 -0
- package/dist/fieldset/description.proto.d.ts +4 -0
- package/dist/fieldset/description.proto.js +12 -0
- package/dist/fieldset/index.d.ts +5 -0
- package/dist/fieldset/index.js +3 -0
- package/dist/fieldset/legend.proto.d.ts +5 -0
- package/dist/fieldset/legend.proto.js +51 -0
- package/dist/fieldset/root.proto.d.ts +4 -0
- package/dist/fieldset/root.proto.js +23 -0
- package/dist/fieldset/types.d.ts +8 -0
- package/dist/fieldset/types.js +1 -0
- package/dist/form/action-visual.d.ts +8 -0
- package/dist/form/action-visual.js +200 -0
- package/dist/form/field.proto.d.ts +4 -0
- package/dist/form/field.proto.js +16 -0
- package/dist/form/index.d.ts +6 -0
- package/dist/form/index.js +4 -0
- package/dist/form/reset.proto.d.ts +4 -0
- package/dist/form/reset.proto.js +12 -0
- package/dist/form/root.proto.d.ts +4 -0
- package/dist/form/root.proto.js +20 -0
- package/dist/form/submit.proto.d.ts +4 -0
- package/dist/form/submit.proto.js +12 -0
- package/dist/form/types.d.ts +10 -0
- package/dist/form/types.js +1 -0
- package/dist/hover-card/content.proto.d.ts +2 -1
- package/dist/hover-card/content.proto.js +15 -19
- package/dist/hover-card/index.d.ts +7 -7
- package/dist/hover-card/index.js +6 -6
- package/dist/hover-card/recipes.d.ts +17 -0
- package/dist/hover-card/recipes.js +20 -0
- package/dist/hover-card/root.proto.d.ts +2 -1
- package/dist/hover-card/root.proto.js +2 -0
- package/dist/hover-card/trigger.proto.d.ts +2 -1
- package/dist/hover-card/trigger.proto.js +7 -3
- package/dist/hover-card/types.d.ts +4 -3
- package/dist/image/index.d.ts +3 -0
- package/dist/image/index.js +1 -0
- package/dist/image/root.proto.d.ts +10 -0
- package/dist/image/root.proto.js +57 -0
- package/dist/index.d.ts +113 -57
- package/dist/index.js +92 -45
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +1 -0
- package/dist/input/root.proto.d.ts +3 -0
- package/dist/input/root.proto.js +19 -0
- package/dist/input/types.d.ts +4 -0
- package/dist/input/types.js +1 -0
- package/dist/input/visual.d.ts +7 -0
- package/dist/input/visual.js +131 -0
- package/dist/input-otp/control.proto.d.ts +4 -0
- package/dist/input-otp/control.proto.js +20 -0
- package/dist/input-otp/index.d.ts +7 -0
- package/dist/input-otp/index.js +5 -0
- package/dist/input-otp/input.proto.d.ts +5 -0
- package/dist/input-otp/input.proto.js +31 -0
- package/dist/input-otp/root.proto.d.ts +4 -0
- package/dist/input-otp/root.proto.js +40 -0
- package/dist/input-otp/separator.proto.d.ts +3 -0
- package/dist/input-otp/separator.proto.js +14 -0
- package/dist/input-otp/slot.proto.d.ts +4 -0
- package/dist/input-otp/slot.proto.js +165 -0
- package/dist/input-otp/types.d.ts +16 -0
- package/dist/input-otp/types.js +1 -0
- package/dist/input-otp/visual.d.ts +6 -0
- package/dist/input-otp/visual.js +3 -0
- package/dist/input-shell/bind-control.d.ts +28 -0
- package/dist/input-shell/bind-control.js +235 -0
- package/dist/input-shell/context.d.ts +6 -0
- package/dist/input-shell/context.js +12 -0
- package/dist/input-shell/control.proto.d.ts +4 -0
- package/dist/input-shell/control.proto.js +16 -0
- package/dist/input-shell/index.d.ts +5 -0
- package/dist/input-shell/index.js +3 -0
- package/dist/input-shell/root.proto.d.ts +4 -0
- package/dist/input-shell/root.proto.js +26 -0
- package/dist/input-shell/types.d.ts +14 -0
- package/dist/input-shell/types.js +1 -0
- package/dist/input-shell/visual.d.ts +4 -0
- package/dist/input-shell/visual.js +166 -0
- package/dist/label/index.d.ts +3 -0
- package/dist/label/index.js +1 -0
- package/dist/label/root.proto.d.ts +5 -0
- package/dist/label/root.proto.js +32 -0
- package/dist/live-region/index.d.ts +2 -0
- package/dist/live-region/index.js +1 -0
- package/dist/live-region/root.proto.d.ts +4 -0
- package/dist/live-region/root.proto.js +14 -0
- package/dist/menu-extensions.d.ts +49 -0
- package/dist/menu-extensions.js +156 -0
- package/dist/menubar/content.proto.d.ts +3 -0
- package/dist/menubar/content.proto.js +13 -0
- package/dist/menubar/index.d.ts +17 -0
- package/dist/menubar/index.js +31 -0
- package/dist/menubar/item.proto.d.ts +3 -0
- package/dist/menubar/item.proto.js +16 -0
- package/dist/menubar/root.proto.d.ts +3 -0
- package/dist/menubar/root.proto.js +12 -0
- package/dist/menubar/trigger.proto.d.ts +3 -0
- package/dist/menubar/trigger.proto.js +17 -0
- package/dist/menubar/types.d.ts +10 -0
- package/dist/menubar/types.js +1 -0
- package/dist/menubar/visual.d.ts +9 -0
- package/dist/menubar/visual.js +83 -0
- package/dist/message-scroller/index.d.ts +1 -0
- package/dist/message-scroller/index.js +1 -0
- package/dist/message-scroller/message-scroller.proto.d.ts +16 -0
- package/dist/message-scroller/message-scroller.proto.js +64 -0
- package/dist/message-scroller/visual.d.ts +14 -0
- package/dist/message-scroller/visual.js +87 -0
- package/dist/meter/index.d.ts +7 -0
- package/dist/meter/index.js +5 -0
- package/dist/meter/indicator.proto.d.ts +3 -0
- package/dist/meter/indicator.proto.js +26 -0
- package/dist/meter/label.proto.d.ts +3 -0
- package/dist/meter/label.proto.js +12 -0
- package/dist/meter/root.proto.d.ts +4 -0
- package/dist/meter/root.proto.js +13 -0
- package/dist/meter/track.proto.d.ts +3 -0
- package/dist/meter/track.proto.js +12 -0
- package/dist/meter/types.d.ts +4 -0
- package/dist/meter/types.js +1 -0
- package/dist/meter/value.proto.d.ts +3 -0
- package/dist/meter/value.proto.js +12 -0
- package/dist/meter/visual.d.ts +6 -0
- package/dist/meter/visual.js +64 -0
- package/dist/navigation-menu/content.proto.d.ts +3 -0
- package/dist/navigation-menu/content.proto.js +13 -0
- package/dist/navigation-menu/index.d.ts +7 -0
- package/dist/navigation-menu/index.js +6 -0
- package/dist/navigation-menu/item.proto.d.ts +3 -0
- package/dist/navigation-menu/item.proto.js +18 -0
- package/dist/navigation-menu/link.proto.d.ts +3 -0
- package/dist/navigation-menu/link.proto.js +16 -0
- package/dist/navigation-menu/root.proto.d.ts +3 -0
- package/dist/navigation-menu/root.proto.js +15 -0
- package/dist/navigation-menu/trigger.proto.d.ts +3 -0
- package/dist/navigation-menu/trigger.proto.js +17 -0
- package/dist/navigation-menu/types.d.ts +8 -0
- package/dist/navigation-menu/types.js +1 -0
- package/dist/navigation-menu/visual.d.ts +15 -0
- package/dist/navigation-menu/visual.js +184 -0
- package/dist/number-field/control.proto.d.ts +4 -0
- package/dist/number-field/control.proto.js +21 -0
- package/dist/number-field/decrement.proto.d.ts +4 -0
- package/dist/number-field/decrement.proto.js +12 -0
- package/dist/number-field/increment.proto.d.ts +4 -0
- package/dist/number-field/increment.proto.js +12 -0
- package/dist/number-field/index.d.ts +8 -0
- package/dist/number-field/index.js +6 -0
- package/dist/number-field/input.proto.d.ts +5 -0
- package/dist/number-field/input.proto.js +23 -0
- package/dist/number-field/label.proto.d.ts +4 -0
- package/dist/number-field/label.proto.js +13 -0
- package/dist/number-field/root.proto.d.ts +4 -0
- package/dist/number-field/root.proto.js +14 -0
- package/dist/number-field/step-visual.d.ts +6 -0
- package/dist/number-field/step-visual.js +115 -0
- package/dist/number-field/types.d.ts +4 -0
- package/dist/number-field/types.js +1 -0
- package/dist/popover/close.proto.d.ts +4 -0
- package/dist/popover/close.proto.js +18 -0
- package/dist/popover/command-paint.d.ts +13 -0
- package/dist/popover/command-paint.js +127 -0
- package/dist/popover/content.proto.d.ts +4 -0
- package/dist/popover/content.proto.js +84 -0
- package/dist/popover/description.proto.d.ts +4 -0
- package/dist/popover/description.proto.js +13 -0
- package/dist/popover/index.d.ts +9 -0
- package/dist/popover/index.js +7 -0
- package/dist/popover/motion.d.ts +13 -0
- package/dist/popover/motion.js +33 -0
- package/dist/popover/recipes.d.ts +47 -0
- package/dist/popover/recipes.js +48 -0
- package/dist/popover/root.proto.d.ts +4 -0
- package/dist/popover/root.proto.js +13 -0
- package/dist/popover/title.proto.d.ts +4 -0
- package/dist/popover/title.proto.js +13 -0
- package/dist/popover/trigger.proto.d.ts +4 -0
- package/dist/popover/trigger.proto.js +24 -0
- package/dist/popover/types.d.ts +13 -0
- package/dist/popover/types.js +1 -0
- package/dist/progress/index.d.ts +7 -0
- package/dist/progress/index.js +5 -0
- package/dist/progress/indicator.proto.d.ts +3 -0
- package/dist/progress/indicator.proto.js +26 -0
- package/dist/progress/label.proto.d.ts +3 -0
- package/dist/progress/label.proto.js +12 -0
- package/dist/progress/root.proto.d.ts +4 -0
- package/dist/progress/root.proto.js +24 -0
- package/dist/progress/track.proto.d.ts +3 -0
- package/dist/progress/track.proto.js +12 -0
- package/dist/progress/types.d.ts +7 -0
- package/dist/progress/types.js +1 -0
- package/dist/progress/value.proto.d.ts +3 -0
- package/dist/progress/value.proto.js +12 -0
- package/dist/progress/visual.d.ts +6 -0
- package/dist/progress/visual.js +64 -0
- package/dist/radio-group/index.d.ts +4 -0
- package/dist/radio-group/index.js +3 -0
- package/dist/radio-group/indicator.proto.d.ts +3 -0
- package/dist/radio-group/indicator.proto.js +86 -0
- package/dist/radio-group/item.proto.d.ts +3 -0
- package/dist/radio-group/item.proto.js +92 -0
- package/dist/radio-group/root-visual.d.ts +3 -0
- package/dist/radio-group/root-visual.js +28 -0
- package/dist/radio-group/root.proto.d.ts +3 -0
- package/dist/radio-group/root.proto.js +11 -0
- package/dist/radio-group/types.d.ts +17 -0
- package/dist/radio-group/types.js +1 -0
- package/dist/radio-group/visual.d.ts +4 -0
- package/dist/radio-group/visual.js +4 -0
- package/dist/resizable/index.d.ts +1 -0
- package/dist/resizable/index.js +1 -0
- package/dist/resizable/resizable.proto.d.ts +15 -0
- package/dist/resizable/resizable.proto.js +161 -0
- package/dist/scroll-area/index.d.ts +5 -0
- package/dist/scroll-area/index.js +4 -0
- package/dist/scroll-area/root.proto.d.ts +3 -0
- package/dist/scroll-area/root.proto.js +14 -0
- package/dist/scroll-area/scrollbar.proto.d.ts +3 -0
- package/dist/scroll-area/scrollbar.proto.js +33 -0
- package/dist/scroll-area/thumb.proto.d.ts +3 -0
- package/dist/scroll-area/thumb.proto.js +31 -0
- package/dist/scroll-area/types.d.ts +18 -0
- package/dist/scroll-area/types.js +1 -0
- package/dist/scroll-area/viewport.proto.d.ts +3 -0
- package/dist/scroll-area/viewport.proto.js +28 -0
- package/dist/search-extensions.d.ts +18 -0
- package/dist/search-extensions.js +50 -0
- package/dist/select/content.proto.d.ts +1 -2
- package/dist/select/content.proto.js +86 -22
- package/dist/select/group.proto.d.ts +2 -0
- package/dist/select/group.proto.js +17 -0
- package/dist/select/index.d.ts +21 -11
- package/dist/select/index.js +16 -10
- package/dist/select/item-text.proto.d.ts +2 -0
- package/dist/select/item-text.proto.js +15 -0
- package/dist/select/item.proto.d.ts +2 -1
- package/dist/select/item.proto.js +55 -9
- package/dist/select/label.proto.d.ts +2 -0
- package/dist/select/label.proto.js +21 -0
- package/dist/select/recipes.d.ts +56 -0
- package/dist/select/recipes.js +191 -0
- package/dist/select/root.proto.d.ts +2 -1
- package/dist/select/root.proto.js +3 -1
- package/dist/select/separator.proto.d.ts +2 -0
- package/dist/select/separator.proto.js +22 -0
- package/dist/select/style.d.ts +6 -0
- package/dist/select/style.js +32 -0
- package/dist/select/surface.proto.d.ts +2 -0
- package/dist/select/surface.proto.js +14 -0
- package/dist/select/trigger-visual.d.ts +4 -0
- package/dist/select/trigger-visual.js +201 -0
- package/dist/select/trigger.proto.d.ts +3 -4
- package/dist/select/trigger.proto.js +6 -60
- package/dist/select/types.d.ts +18 -5
- package/dist/select/value.proto.d.ts +2 -1
- package/dist/select/value.proto.js +17 -5
- package/dist/select/viewport.proto.d.ts +2 -0
- package/dist/select/viewport.proto.js +31 -0
- package/dist/select/visual.d.ts +9 -0
- package/dist/select/visual.js +94 -0
- package/dist/separator/index.d.ts +2 -2
- package/dist/separator/index.js +1 -1
- package/dist/separator/root.proto.d.ts +2 -2
- package/dist/separator/root.proto.js +9 -2
- package/dist/separator/types.d.ts +2 -1
- package/dist/slider/field-thumb.proto.d.ts +4 -0
- package/dist/slider/field-thumb.proto.js +41 -0
- package/dist/slider/index.d.ts +17 -0
- package/dist/slider/index.js +13 -0
- package/dist/slider/indicator.proto.d.ts +4 -0
- package/dist/slider/indicator.proto.js +32 -0
- package/dist/slider/label.proto.d.ts +4 -0
- package/dist/slider/label.proto.js +29 -0
- package/dist/slider/paint.d.ts +13 -0
- package/dist/slider/paint.js +39 -0
- package/dist/slider/root.proto.d.ts +4 -0
- package/dist/slider/root.proto.js +27 -0
- package/dist/slider/scalar-visual.d.ts +28 -0
- package/dist/slider/scalar-visual.js +128 -0
- package/dist/slider/thumb.proto.d.ts +4 -0
- package/dist/slider/thumb.proto.js +41 -0
- package/dist/slider/track.proto.d.ts +4 -0
- package/dist/slider/track.proto.js +56 -0
- package/dist/slider/value.proto.d.ts +4 -0
- package/dist/slider/value.proto.js +25 -0
- package/dist/slider/values-indicator.proto.d.ts +4 -0
- package/dist/slider/values-indicator.proto.js +31 -0
- package/dist/slider/values-label.proto.d.ts +3 -0
- package/dist/slider/values-label.proto.js +11 -0
- package/dist/slider/values-root.proto.d.ts +5 -0
- package/dist/slider/values-root.proto.js +16 -0
- package/dist/slider/values-thumb.proto.d.ts +4 -0
- package/dist/slider/values-thumb.proto.js +70 -0
- package/dist/slider/values-track.proto.d.ts +4 -0
- package/dist/slider/values-track.proto.js +50 -0
- package/dist/slider/values-value.proto.d.ts +3 -0
- package/dist/slider/values-value.proto.js +11 -0
- package/dist/slider/values-visual.d.ts +19 -0
- package/dist/slider/values-visual.js +147 -0
- package/dist/style-scope/context.d.ts +12 -0
- package/dist/style-scope/context.js +16 -0
- package/dist/style-scope/ids.d.ts +3 -0
- package/dist/style-scope/ids.js +12 -0
- package/dist/style-scope/index.d.ts +5 -0
- package/dist/style-scope/index.js +4 -0
- package/dist/style-scope/root.proto.d.ts +4 -0
- package/dist/style-scope/root.proto.js +8 -0
- package/dist/style-scope/selection.d.ts +8 -0
- package/dist/style-scope/selection.js +59 -0
- package/dist/surface/action-appearance.d.ts +20 -0
- package/dist/surface/action-appearance.js +78 -0
- package/dist/surface/index.d.ts +4 -0
- package/dist/surface/index.js +2 -0
- package/dist/surface/root.proto.d.ts +8 -0
- package/dist/surface/root.proto.js +206 -0
- package/dist/switch/hit-lease.d.ts +5 -0
- package/dist/switch/hit-lease.js +33 -0
- package/dist/switch/index.d.ts +6 -6
- package/dist/switch/index.js +5 -5
- package/dist/switch/root-visual.d.ts +6 -0
- package/dist/switch/root-visual.js +242 -0
- package/dist/switch/root.proto.d.ts +3 -8
- package/dist/switch/root.proto.js +10 -71
- package/dist/switch/thumb.proto.d.ts +1 -6
- package/dist/switch/thumb.proto.js +197 -32
- package/dist/switch/types.d.ts +10 -2
- package/dist/switch/visual.d.ts +7 -0
- package/dist/switch/visual.js +8 -0
- package/dist/table/caption.proto.d.ts +2 -0
- package/dist/table/caption.proto.js +15 -0
- package/dist/table/cell.proto.d.ts +3 -0
- package/dist/table/cell.proto.js +14 -0
- package/dist/table/header-cell.proto.d.ts +3 -0
- package/dist/table/header-cell.proto.js +17 -0
- package/dist/table/index.d.ts +7 -0
- package/dist/table/index.js +5 -0
- package/dist/table/root.proto.d.ts +2 -0
- package/dist/table/root.proto.js +20 -0
- package/dist/table/row.proto.d.ts +3 -0
- package/dist/table/row.proto.js +61 -0
- package/dist/table/types.d.ts +31 -0
- package/dist/table/types.js +1 -0
- package/dist/table/visual.d.ts +6 -0
- package/dist/table/visual.js +48 -0
- package/dist/tabs/content.proto.d.ts +1 -2
- package/dist/tabs/content.proto.js +13 -10
- package/dist/tabs/index.d.ts +14 -10
- package/dist/tabs/index.js +13 -9
- package/dist/tabs/indicator.proto.d.ts +3 -0
- package/dist/tabs/indicator.proto.js +20 -0
- package/dist/tabs/list.proto.d.ts +1 -2
- package/dist/tabs/list.proto.js +86 -4
- package/dist/tabs/root.proto.d.ts +1 -2
- package/dist/tabs/root.proto.js +12 -4
- package/dist/tabs/trigger.proto.d.ts +1 -2
- package/dist/tabs/trigger.proto.js +136 -37
- package/dist/tabs/types.d.ts +13 -5
- package/dist/tabs/visual.d.ts +59 -0
- package/dist/tabs/visual.js +147 -0
- package/dist/text/index.d.ts +4 -0
- package/dist/text/index.js +2 -0
- package/dist/text/root.proto.d.ts +8 -0
- package/dist/text/root.proto.js +180 -0
- package/dist/text/typography.d.ts +4 -0
- package/dist/text/typography.js +11 -0
- package/dist/textarea/index.d.ts +2 -2
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/root.proto.d.ts +2 -1
- package/dist/textarea/root.proto.js +8 -45
- package/dist/textarea/types.d.ts +2 -1
- package/dist/textarea/visual.d.ts +6 -0
- package/dist/textarea/visual.js +103 -0
- package/dist/toast/action.proto.d.ts +4 -0
- package/dist/toast/action.proto.js +37 -0
- package/dist/toast/close.proto.d.ts +4 -0
- package/dist/toast/close.proto.js +36 -0
- package/dist/toast/description.proto.d.ts +4 -0
- package/dist/toast/description.proto.js +12 -0
- package/dist/toast/index.d.ts +9 -0
- package/dist/toast/index.js +7 -0
- package/dist/toast/recipes.d.ts +71 -0
- package/dist/toast/recipes.js +72 -0
- package/dist/toast/root.proto.d.ts +4 -0
- package/dist/toast/root.proto.js +168 -0
- package/dist/toast/title.proto.d.ts +4 -0
- package/dist/toast/title.proto.js +12 -0
- package/dist/toast/types.d.ts +11 -0
- package/dist/toast/types.js +1 -0
- package/dist/toast/viewport.proto.d.ts +4 -0
- package/dist/toast/viewport.proto.js +51 -0
- package/dist/toggle/index.d.ts +2 -2
- package/dist/toggle/index.js +1 -1
- package/dist/toggle/profiles.d.ts +72 -0
- package/dist/toggle/profiles.js +73 -0
- package/dist/toggle/toggle.proto.d.ts +5 -8
- package/dist/toggle/toggle.proto.js +54 -43
- package/dist/toggle/types.d.ts +6 -3
- package/dist/toggle-group/index.d.ts +6 -0
- package/dist/toggle-group/index.js +3 -0
- package/dist/toggle-group/item.proto.d.ts +8 -0
- package/dist/toggle-group/item.proto.js +224 -0
- package/dist/toggle-group/root.proto.d.ts +8 -0
- package/dist/toggle-group/root.proto.js +112 -0
- package/dist/toggle-group/types.d.ts +16 -0
- package/dist/toggle-group/types.js +1 -0
- package/dist/toggle-group/visual.d.ts +10 -0
- package/dist/toggle-group/visual.js +3 -0
- package/dist/toolbar/action-visual.d.ts +12 -0
- package/dist/toolbar/action-visual.js +164 -0
- package/dist/toolbar/button.proto.d.ts +3 -0
- package/dist/toolbar/button.proto.js +259 -0
- package/dist/toolbar/index.d.ts +7 -0
- package/dist/toolbar/index.js +4 -0
- package/dist/toolbar/root.proto.d.ts +3 -0
- package/dist/toolbar/root.proto.js +83 -0
- package/dist/toolbar/separator.proto.d.ts +3 -0
- package/dist/toolbar/separator.proto.js +32 -0
- package/dist/toolbar/types.d.ts +16 -0
- package/dist/toolbar/types.js +1 -0
- package/dist/tooltip/content.proto.d.ts +2 -1
- package/dist/tooltip/content.proto.js +13 -14
- package/dist/tooltip/group.proto.d.ts +2 -1
- package/dist/tooltip/group.proto.js +2 -0
- package/dist/tooltip/index.d.ts +5 -5
- package/dist/tooltip/index.js +4 -4
- package/dist/tooltip/recipes.d.ts +17 -0
- package/dist/tooltip/recipes.js +18 -0
- package/dist/tooltip/root.proto.d.ts +2 -1
- package/dist/tooltip/root.proto.js +3 -1
- package/dist/tooltip/trigger.proto.d.ts +2 -1
- package/dist/tooltip/trigger.proto.js +10 -0
- package/dist/tooltip/types.d.ts +5 -4
- package/dist/transition/index.d.ts +2 -0
- package/dist/transition/index.js +1 -0
- package/dist/transition/transition.proto.d.ts +8 -0
- package/dist/transition/transition.proto.js +26 -0
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.js +1 -0
- package/dist/tree/tree.proto.d.ts +24 -0
- package/dist/tree/tree.proto.js +307 -0
- package/dist/virtual-list/index.d.ts +1 -0
- package/dist/virtual-list/index.js +1 -0
- package/dist/virtual-list/virtual-list.proto.d.ts +16 -0
- package/dist/virtual-list/virtual-list.proto.js +104 -0
- package/package.json +380 -4
- package/src/button/button.proto.ts +477 -0
- package/src/button/index.ts +8 -0
- package/src/button/new-york.ts +32 -0
- package/src/button/paint.ts +16 -0
- package/src/button/profiles.ts +222 -0
- package/src/button/types.ts +36 -0
- package/src/checkbox/composition.ts +57 -0
- package/src/checkbox/index.ts +24 -0
- package/src/checkbox/indicator.proto.ts +99 -0
- package/src/checkbox/preset.ts +18 -0
- package/src/checkbox/root-visual.ts +115 -0
- package/src/checkbox/root.proto.ts +14 -0
- package/src/checkbox/types.ts +28 -0
- package/src/collapsible/content.proto.ts +70 -0
- package/src/collapsible/index.ts +20 -0
- package/src/collapsible/root.proto.ts +23 -0
- package/src/collapsible/trigger.proto.ts +132 -0
- package/src/collapsible/types.ts +33 -0
- package/src/component-presets.types.ts +10 -0
- package/src/data-table/data-table.proto.ts +220 -0
- package/src/data-table/header-row.proto.ts +24 -0
- package/src/data-table/index.ts +11 -0
- package/src/data-table/visual.ts +79 -0
- package/src/dialog/close-icon.proto.ts +77 -0
- package/src/dialog/close.proto.ts +19 -0
- package/src/dialog/content.proto.ts +40 -0
- package/src/dialog/description.proto.ts +22 -0
- package/src/dialog/footer.proto.ts +17 -0
- package/src/dialog/header.proto.ts +17 -0
- package/src/dialog/index.ts +59 -0
- package/src/dialog/overlay.proto.ts +38 -0
- package/src/dialog/preset.ts +18 -0
- package/src/dialog/recipes.ts +118 -0
- package/src/dialog/root.proto.ts +19 -0
- package/src/dialog/style.ts +122 -0
- package/src/dialog/title.proto.ts +19 -0
- package/src/dialog/trigger.proto.ts +19 -0
- package/src/dialog/types.ts +56 -0
- package/src/drawer/close.proto.ts +18 -0
- package/src/drawer/command-paint.ts +59 -0
- package/src/drawer/content.proto.ts +96 -0
- package/src/drawer/description.proto.ts +16 -0
- package/src/drawer/footer.proto.ts +15 -0
- package/src/drawer/handle.proto.ts +48 -0
- package/src/drawer/header.proto.ts +31 -0
- package/src/drawer/index.ts +38 -0
- package/src/drawer/mask.proto.ts +23 -0
- package/src/drawer/recipes.ts +86 -0
- package/src/drawer/root.proto.ts +13 -0
- package/src/drawer/title.proto.ts +13 -0
- package/src/drawer/trigger.proto.ts +18 -0
- package/src/drawer/types.ts +25 -0
- package/src/field/visual.ts +93 -0
- package/src/input/index.ts +6 -0
- package/src/input/root.proto.ts +24 -0
- package/src/input/types.ts +5 -0
- package/src/input/visual.ts +169 -0
- package/src/label/index.ts +3 -0
- package/src/label/root.proto.ts +43 -0
- package/src/message-scroller/index.ts +1 -0
- package/src/message-scroller/message-scroller.proto.ts +124 -0
- package/src/message-scroller/visual.ts +155 -0
- package/src/number-field/control.proto.ts +24 -0
- package/src/number-field/decrement.proto.ts +15 -0
- package/src/number-field/increment.proto.ts +15 -0
- package/src/number-field/index.ts +8 -0
- package/src/number-field/input.proto.ts +26 -0
- package/src/number-field/label.proto.ts +15 -0
- package/src/number-field/root.proto.ts +16 -0
- package/src/number-field/step-visual.ts +137 -0
- package/src/number-field/types.ts +7 -0
- package/src/scroll-area/index.ts +28 -0
- package/src/scroll-area/root.proto.ts +17 -0
- package/src/scroll-area/scrollbar.proto.ts +53 -0
- package/src/scroll-area/thumb.proto.ts +34 -0
- package/src/scroll-area/types.ts +36 -0
- package/src/scroll-area/viewport.proto.ts +41 -0
- package/src/select/content.proto.ts +163 -0
- package/src/select/group.proto.ts +19 -0
- package/src/select/index.ts +59 -0
- package/src/select/item-text.proto.ts +18 -0
- package/src/select/item.proto.ts +136 -0
- package/src/select/label.proto.ts +23 -0
- package/src/select/recipes.ts +235 -0
- package/src/select/root.proto.ts +17 -0
- package/src/select/separator.proto.ts +24 -0
- package/src/select/style.ts +43 -0
- package/src/select/surface.proto.ts +17 -0
- package/src/select/trigger-visual.ts +321 -0
- package/src/select/trigger.proto.ts +12 -0
- package/src/select/types.ts +73 -0
- package/src/select/value.proto.ts +31 -0
- package/src/select/viewport.proto.ts +42 -0
- package/src/select/visual.ts +127 -0
- package/src/separator/index.ts +7 -0
- package/src/separator/root.proto.ts +61 -0
- package/src/separator/types.ts +15 -0
- package/src/style-scope/context.ts +19 -0
- package/src/style-scope/ids.ts +13 -0
- package/src/style-scope/index.ts +5 -0
- package/src/style-scope/root.proto.ts +10 -0
- package/src/style-scope/selection.ts +82 -0
- package/src/switch/hit-lease.ts +29 -0
- package/src/switch/index.ts +18 -0
- package/src/switch/preset.ts +18 -0
- package/src/switch/root-visual.ts +302 -0
- package/src/switch/root.proto.ts +15 -0
- package/src/switch/thumb.proto.ts +261 -0
- package/src/switch/types.ts +36 -0
- package/src/switch/visual.ts +15 -0
- package/src/tabs/content.proto.ts +26 -0
- package/src/tabs/index.ts +34 -0
- package/src/tabs/indicator.proto.ts +21 -0
- package/src/tabs/list.proto.ts +129 -0
- package/src/tabs/root.proto.ts +22 -0
- package/src/tabs/trigger.proto.ts +220 -0
- package/src/tabs/types.ts +45 -0
- package/src/tabs/visual.ts +184 -0
- package/src/textarea/index.ts +6 -0
- package/src/textarea/root.proto.ts +19 -0
- package/src/textarea/types.ts +6 -0
- package/src/textarea/visual.ts +144 -0
- package/src/toggle/index.ts +7 -0
- package/src/toggle/profiles.ts +76 -0
- package/src/toggle/toggle.proto.ts +128 -0
- package/src/toggle/types.ts +21 -0
- package/src/toggle-group/index.ts +12 -0
- package/src/toggle-group/item.proto.ts +328 -0
- package/src/toggle-group/root.proto.ts +128 -0
- package/src/toggle-group/types.ts +25 -0
- package/src/toggle-group/visual.ts +15 -0
- package/src/toolbar/action-visual.ts +229 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asNumberFieldLabel } from '@proto.ui/prototypes-base/number-field';
|
|
3
|
+
import { setupFieldTextVisual } from "../field/visual.js";
|
|
4
|
+
export default definePrototype({
|
|
5
|
+
name: 'shadcn-number-field-label',
|
|
6
|
+
modules: asNumberFieldLabel.modules,
|
|
7
|
+
setup(def) {
|
|
8
|
+
const inherited = asNumberFieldLabel();
|
|
9
|
+
setupFieldTextVisual(def, 'label');
|
|
10
|
+
def.feedback.style.use(tw('w-full basis-full'));
|
|
11
|
+
return inherited.render;
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NumberFieldRootExposes } from '@proto.ui/prototypes-base/number-field';
|
|
2
|
+
import type { ShadcnNumberFieldRootProps } from "./types.js";
|
|
3
|
+
declare const _default: import("@proto.ui/core").Prototype<ShadcnNumberFieldRootProps, NumberFieldRootExposes>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asNumberFieldRoot } from '@proto.ui/prototypes-base/number-field';
|
|
3
|
+
import { setupShadcnStyleSelection } from "../style-scope/index.js";
|
|
4
|
+
export default definePrototype({
|
|
5
|
+
name: 'shadcn-number-field-root',
|
|
6
|
+
modules: asNumberFieldRoot.modules,
|
|
7
|
+
setup(def) {
|
|
8
|
+
const inherited = asNumberFieldRoot();
|
|
9
|
+
// Proto composition layout has no claimed upstream NumberField equivalent.
|
|
10
|
+
setupShadcnStyleSelection(def, 'nova');
|
|
11
|
+
def.feedback.style.use(tw('flex w-full min-w-0 items-center gap-2 text-foreground'));
|
|
12
|
+
return inherited.render;
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DefHandle, type State } from '@proto.ui/core';
|
|
2
|
+
import type { ShadcnNumberFieldPartProps } from "./types.js";
|
|
3
|
+
export declare function setupNumberFieldStepVisual(def: DefHandle<ShadcnNumberFieldPartProps>, state: {
|
|
4
|
+
disabled: State<boolean>;
|
|
5
|
+
focusVisible: State<boolean>;
|
|
6
|
+
}): import("@proto.ui/core").OwnedStateHandle<"vega" | "nova" | "maia" | "lyra" | "mira" | "luma" | "sera" | "rhea" | "new-york-v4">;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { tw } from '@proto.ui/core';
|
|
2
|
+
import { setupShadcnStyleSelection, SHADCN_STYLE_IDS } from "../style-scope/index.js";
|
|
3
|
+
import { setupCollectionHover } from "../toolbar/action-visual.js";
|
|
4
|
+
/** Proto steppers borrowing the pinned Button outline/icon face; Base still owns stepping. */
|
|
5
|
+
const STEP_SURFACE = {
|
|
6
|
+
vega: 'size-9 rounded-md border-border bg-background text-sm shadow-xs',
|
|
7
|
+
nova: 'size-8 rounded-lg border-border bg-background text-sm',
|
|
8
|
+
maia: 'size-9 rounded-[var(--pui-radius-4xl)] border-border bg-input/30 text-sm',
|
|
9
|
+
lyra: 'size-8 rounded-none border-border bg-background text-xs',
|
|
10
|
+
mira: 'size-7 rounded-md border-border bg-transparent text-xs leading-relaxed',
|
|
11
|
+
luma: 'size-9 rounded-[var(--pui-radius-4xl)] border-border bg-background text-sm',
|
|
12
|
+
sera: 'size-10 rounded-none border-border bg-transparent text-xs font-semibold uppercase tracking-widest',
|
|
13
|
+
rhea: 'size-8 rounded-[var(--pui-radius-2xl)] border-transparent bg-input/50 text-sm',
|
|
14
|
+
'new-york-v4': 'size-9 rounded-md border-border bg-background text-sm shadow-xs',
|
|
15
|
+
};
|
|
16
|
+
const STEP_HOVER = {
|
|
17
|
+
vega: 'bg-accent text-accent-foreground',
|
|
18
|
+
nova: 'bg-accent text-accent-foreground',
|
|
19
|
+
maia: 'bg-muted text-foreground',
|
|
20
|
+
lyra: 'bg-accent text-accent-foreground',
|
|
21
|
+
mira: 'bg-muted text-foreground',
|
|
22
|
+
luma: 'bg-muted text-foreground',
|
|
23
|
+
sera: 'bg-muted text-foreground',
|
|
24
|
+
rhea: 'bg-muted text-foreground',
|
|
25
|
+
'new-york-v4': 'bg-accent text-accent-foreground',
|
|
26
|
+
};
|
|
27
|
+
const STEP_FOCUS = {
|
|
28
|
+
vega: 'border-ring ring-3 ring-ring/50 forced-colors-focus-outline',
|
|
29
|
+
nova: 'border-ring ring-3 ring-ring/50 forced-colors-focus-outline',
|
|
30
|
+
maia: 'border-ring ring-3 ring-ring/50 forced-colors-focus-outline',
|
|
31
|
+
lyra: 'border-ring ring-1 ring-ring/50 forced-colors-focus-outline',
|
|
32
|
+
mira: 'border-ring ring-2 ring-ring/30 forced-colors-focus-outline',
|
|
33
|
+
luma: 'border-ring ring-3 ring-ring/30 forced-colors-focus-outline',
|
|
34
|
+
sera: 'border-ring ring-2 ring-ring/30 forced-colors-focus-outline',
|
|
35
|
+
rhea: 'border-ring ring-3 ring-ring/30 forced-colors-focus-outline',
|
|
36
|
+
'new-york-v4': 'border-ring ring-3 ring-ring/50 forced-colors-focus-outline',
|
|
37
|
+
};
|
|
38
|
+
export function setupNumberFieldStepVisual(def, state) {
|
|
39
|
+
const style = setupShadcnStyleSelection(def, 'nova');
|
|
40
|
+
const hovered = setupCollectionHover(def, state.disabled);
|
|
41
|
+
const pressed = def.state.bool('stepPointerPressed', false);
|
|
42
|
+
const clearPressed = () => pressed.set(false, 'reason: step pointer press ended');
|
|
43
|
+
def.event.on('pointer.down', () => {
|
|
44
|
+
if (!state.disabled.get())
|
|
45
|
+
pressed.set(true, 'reason: step pointer down');
|
|
46
|
+
});
|
|
47
|
+
def.event.on('pointer.up', clearPressed);
|
|
48
|
+
def.event.on('pointer.leave', clearPressed);
|
|
49
|
+
def.event.on('pointer.cancel', clearPressed);
|
|
50
|
+
def.lifecycle.onUnmounted(clearPressed);
|
|
51
|
+
if ('watch' in state.disabled) {
|
|
52
|
+
state.disabled.watch((_run, event) => {
|
|
53
|
+
if (event.type === 'next' && event.next)
|
|
54
|
+
clearPressed();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
def.feedback.style.use(tw('inline-flex shrink-0 items-center justify-center border p-0 text-foreground font-medium outline-none select-none cursor-pointer transition-colors'));
|
|
58
|
+
for (const profile of SHADCN_STYLE_IDS) {
|
|
59
|
+
def.rule({
|
|
60
|
+
when: (w) => w.state(style).eq(profile),
|
|
61
|
+
intent: (i) => i.feedback.style.use(tw(STEP_SURFACE[profile])),
|
|
62
|
+
});
|
|
63
|
+
def.rule({
|
|
64
|
+
when: (w) => w.all(w.state(style).eq(profile), w.state(hovered).eq(true)),
|
|
65
|
+
intent: (i) => i.feedback.style.use(tw(STEP_HOVER[profile])),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
for (const profile of ['vega', 'nova', 'maia', 'lyra', 'mira', 'new-york-v4']) {
|
|
69
|
+
def.rule({
|
|
70
|
+
when: (w) => w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark')),
|
|
71
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/30 border-input')),
|
|
72
|
+
});
|
|
73
|
+
def.rule({
|
|
74
|
+
when: (w) => w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark'), w.state(hovered).eq(true)),
|
|
75
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/50')),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
for (const profile of ['luma', 'sera']) {
|
|
79
|
+
def.rule({
|
|
80
|
+
when: (w) => w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark')),
|
|
81
|
+
intent: (i) => i.feedback.style.use(tw('bg-transparent border-input')),
|
|
82
|
+
});
|
|
83
|
+
def.rule({
|
|
84
|
+
when: (w) => w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark'), w.state(hovered).eq(true)),
|
|
85
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/30')),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
def.rule({
|
|
89
|
+
when: (w) => w.all(w.state(style).eq('rhea'), w.meta('colorScheme').eq('dark')),
|
|
90
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/30 border-transparent')),
|
|
91
|
+
});
|
|
92
|
+
def.rule({
|
|
93
|
+
when: (w) => w.all(w.state(style).eq('rhea'), w.meta('colorScheme').eq('dark'), w.state(hovered).eq(true)),
|
|
94
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/50')),
|
|
95
|
+
});
|
|
96
|
+
def.rule({
|
|
97
|
+
when: (w) => w.all(w.state(pressed).eq(true), w.not(w.state(style).eq('new-york-v4'))),
|
|
98
|
+
intent: (i) => i.feedback.style.use(tw('translate-y-px')),
|
|
99
|
+
});
|
|
100
|
+
def.rule({
|
|
101
|
+
when: (w) => w.all(w.state(pressed).eq(true), w.state(style).eq('new-york-v4')),
|
|
102
|
+
intent: (i) => i.feedback.style.use(tw('bg-accent/80')),
|
|
103
|
+
});
|
|
104
|
+
for (const profile of SHADCN_STYLE_IDS) {
|
|
105
|
+
def.rule({
|
|
106
|
+
when: (w) => w.all(w.state(style).eq(profile), w.state(state.focusVisible).eq(true)),
|
|
107
|
+
intent: (i) => i.feedback.style.use(tw(STEP_FOCUS[profile])),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
def.rule({
|
|
111
|
+
when: (w) => w.state(state.disabled).eq(true),
|
|
112
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50 cursor-not-allowed')),
|
|
113
|
+
});
|
|
114
|
+
return style;
|
|
115
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NumberFieldRootProps, NumberFieldPartProps } from '@proto.ui/prototypes-base/number-field';
|
|
2
|
+
import type { ShadcnStyleProps } from "../style-scope/index.js";
|
|
3
|
+
export type ShadcnNumberFieldRootProps = NumberFieldRootProps & ShadcnStyleProps;
|
|
4
|
+
export type ShadcnNumberFieldPartProps = NumberFieldPartProps & ShadcnStyleProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { definePrototype } from '@proto.ui/core';
|
|
2
|
+
import { asPopoverClose } from '@proto.ui/prototypes-base/popover';
|
|
3
|
+
import { setupPopoverCommandPaint } from "./command-paint.js";
|
|
4
|
+
export default definePrototype({
|
|
5
|
+
name: 'shadcn-popover-close',
|
|
6
|
+
modules: asPopoverClose.modules,
|
|
7
|
+
setup(def) {
|
|
8
|
+
const behavior = asPopoverClose();
|
|
9
|
+
const state = behavior.getState;
|
|
10
|
+
setupPopoverCommandPaint(def, {
|
|
11
|
+
hovered: state('hovered'),
|
|
12
|
+
focusVisible: state('focusVisible'),
|
|
13
|
+
disabled: state('disabled'),
|
|
14
|
+
pressed: state('pressed'),
|
|
15
|
+
}, 'close');
|
|
16
|
+
return behavior.render;
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DefHandle, type State } from '@proto.ui/core';
|
|
2
|
+
import type { PopoverTriggerProps } from "./types.js";
|
|
3
|
+
/** Existing Proto command appearance, not an upstream Popover Close export.
|
|
4
|
+
* The default keeps the independently adopted c2a67849 Nova density. Every
|
|
5
|
+
* explicit modern profile maps its own default outline Button paint only.
|
|
6
|
+
* No Button hook, event, variant/size API or second activation owner is added.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setupPopoverCommandPaint<Exposes = Record<string, unknown>>(def: DefHandle<PopoverTriggerProps, Exposes>, state: {
|
|
9
|
+
hovered: State<boolean>;
|
|
10
|
+
focusVisible: State<boolean>;
|
|
11
|
+
disabled: State<boolean>;
|
|
12
|
+
pressed: State<boolean>;
|
|
13
|
+
}, command: 'trigger' | 'close'): void;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { tw } from '@proto.ui/core';
|
|
2
|
+
import { NEW_YORK_BASE, NEW_YORK_SIZES, NEW_YORK_VARIANTS } from "../button/new-york.js";
|
|
3
|
+
import { SHADCN_STYLE_IDS } from "../style-scope/index.js";
|
|
4
|
+
import { MODERN_OVERLAY_STYLES, setupOverlayStyle } from "../dialog/style.js";
|
|
5
|
+
import { SHADCN_ACTION_BASE, SHADCN_ACTION_TEXT, SHADCN_ACTION_RADIUS, SHADCN_ACTION_FOCUS, SHADCN_ACTION_SIZES, SHADCN_BUTTON_OUTLINE, SHADCN_SECONDARY_HOVER, SHADCN_BUTTON_OUTLINE_HOVER, } from "../button/profiles.js";
|
|
6
|
+
import { SHADCN_BUTTON_BASE_TOKENS, SHADCN_BUTTON_DEFAULT_SIZE_TOKENS, SHADCN_BUTTON_OUTLINE_VARIANT_TOKENS, SHADCN_BUTTON_OUTLINE_HOVER_TOKENS, SHADCN_BUTTON_FOCUS_TOKENS, SHADCN_BUTTON_DISABLED_TOKENS, } from "../button/paint.js";
|
|
7
|
+
const DARK_OUTLINE = {
|
|
8
|
+
vega: 'border-input bg-input/30',
|
|
9
|
+
nova: 'border-input bg-input/30',
|
|
10
|
+
maia: '',
|
|
11
|
+
lyra: 'border-input bg-input/30',
|
|
12
|
+
mira: 'bg-input/30',
|
|
13
|
+
luma: 'bg-transparent',
|
|
14
|
+
sera: '',
|
|
15
|
+
rhea: 'bg-transparent',
|
|
16
|
+
'new-york-v4': 'border-input bg-input/30',
|
|
17
|
+
};
|
|
18
|
+
const DARK_OUTLINE_HOVER = {
|
|
19
|
+
vega: 'bg-input/50',
|
|
20
|
+
nova: 'bg-input/50',
|
|
21
|
+
maia: 'bg-input/50',
|
|
22
|
+
lyra: 'bg-input/50',
|
|
23
|
+
mira: 'bg-input/50',
|
|
24
|
+
luma: 'bg-input/30',
|
|
25
|
+
sera: 'bg-input/30',
|
|
26
|
+
rhea: 'bg-input/30',
|
|
27
|
+
'new-york-v4': 'bg-input/50',
|
|
28
|
+
};
|
|
29
|
+
/** Existing Proto command appearance, not an upstream Popover Close export.
|
|
30
|
+
* The default keeps the independently adopted c2a67849 Nova density. Every
|
|
31
|
+
* explicit modern profile maps its own default outline Button paint only.
|
|
32
|
+
* No Button hook, event, variant/size API or second activation owner is added.
|
|
33
|
+
*/
|
|
34
|
+
export function setupPopoverCommandPaint(def, state, command) {
|
|
35
|
+
// Only Trigger declares presentation. Close keeps its original conditions
|
|
36
|
+
// and never reads that prop; neither command mirrors it into State.
|
|
37
|
+
const style = setupOverlayStyle(def, 'nova');
|
|
38
|
+
def.rule({
|
|
39
|
+
when: (w) => command === 'trigger'
|
|
40
|
+
? w.all(w.prop('presentation').eq('default'), w.state(style).eq('new-york-v4'))
|
|
41
|
+
: w.state(style).eq('new-york-v4'),
|
|
42
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_BUTTON_BASE_TOKENS, SHADCN_BUTTON_DEFAULT_SIZE_TOKENS, SHADCN_BUTTON_OUTLINE_VARIANT_TOKENS)),
|
|
43
|
+
});
|
|
44
|
+
def.rule({
|
|
45
|
+
when: (w) => command === 'trigger'
|
|
46
|
+
? w.all(w.prop('presentation').eq('default'), w.all(w.state(style).eq('new-york-v4'), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false)))
|
|
47
|
+
: w.all(w.state(style).eq('new-york-v4'), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false)),
|
|
48
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_BUTTON_OUTLINE_HOVER_TOKENS)),
|
|
49
|
+
});
|
|
50
|
+
def.rule({
|
|
51
|
+
when: (w) => command === 'trigger'
|
|
52
|
+
? w.all(w.prop('presentation').eq('default'), w.all(w.state(style).eq('new-york-v4'), w.state(state.focusVisible).eq(true)))
|
|
53
|
+
: w.all(w.state(style).eq('new-york-v4'), w.state(state.focusVisible).eq(true)),
|
|
54
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_BUTTON_FOCUS_TOKENS)),
|
|
55
|
+
});
|
|
56
|
+
for (const profile of MODERN_OVERLAY_STYLES) {
|
|
57
|
+
def.rule({
|
|
58
|
+
when: (w) => command === 'trigger'
|
|
59
|
+
? w.all(w.prop('presentation').eq('default'), w.state(style).eq(profile))
|
|
60
|
+
: w.state(style).eq(profile),
|
|
61
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_ACTION_BASE, SHADCN_ACTION_TEXT[profile], SHADCN_ACTION_RADIUS[profile], SHADCN_ACTION_SIZES[`${profile}-default`], SHADCN_BUTTON_OUTLINE[profile])),
|
|
62
|
+
});
|
|
63
|
+
def.rule({
|
|
64
|
+
when: (w) => command === 'trigger'
|
|
65
|
+
? w.all(w.prop('presentation').eq('default'), w.all(w.state(style).eq(profile), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false)))
|
|
66
|
+
: w.all(w.state(style).eq(profile), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false)),
|
|
67
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_BUTTON_OUTLINE_HOVER[profile])),
|
|
68
|
+
});
|
|
69
|
+
def.rule({
|
|
70
|
+
when: (w) => command === 'trigger'
|
|
71
|
+
? w.all(w.prop('presentation').eq('default'), w.all(w.state(style).eq(profile), w.state(state.focusVisible).eq(true)))
|
|
72
|
+
: w.all(w.state(style).eq(profile), w.state(state.focusVisible).eq(true)),
|
|
73
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_ACTION_FOCUS[profile])),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
for (const profile of SHADCN_STYLE_IDS) {
|
|
77
|
+
if (DARK_OUTLINE[profile])
|
|
78
|
+
def.rule({
|
|
79
|
+
when: (w) => command === 'trigger'
|
|
80
|
+
? w.all(w.prop('presentation').eq('default'), w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark')))
|
|
81
|
+
: w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark')),
|
|
82
|
+
intent: (i) => i.feedback.style.use(tw(DARK_OUTLINE[profile])),
|
|
83
|
+
});
|
|
84
|
+
def.rule({
|
|
85
|
+
when: (w) => command === 'trigger'
|
|
86
|
+
? w.all(w.prop('presentation').eq('default'), w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark'), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false)))
|
|
87
|
+
: w.all(w.state(style).eq(profile), w.meta('colorScheme').eq('dark'), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false)),
|
|
88
|
+
intent: (i) => i.feedback.style.use(tw(DARK_OUTLINE_HOVER[profile])),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// The trigger carries hasPopup=dialog; upstream's active movement excludes
|
|
92
|
+
// popup triggers. The separate Close has no popup and borrows its own press.
|
|
93
|
+
if (command === 'close') {
|
|
94
|
+
def.rule({
|
|
95
|
+
when: (w) => w.all(w.not(w.state(style).eq('new-york-v4')), w.state(state.pressed).eq(true), w.state(state.disabled).eq(false)),
|
|
96
|
+
intent: (i) => i.feedback.style.use(tw('translate-y-px')),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (command === 'trigger') {
|
|
100
|
+
for (const profile of SHADCN_STYLE_IDS) {
|
|
101
|
+
def.rule({
|
|
102
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.state(style).eq(profile)),
|
|
103
|
+
intent: (i) => i.feedback.style.use(profile === 'new-york-v4'
|
|
104
|
+
? tw(NEW_YORK_BASE, NEW_YORK_VARIANTS.secondary, NEW_YORK_SIZES.icon)
|
|
105
|
+
: tw(SHADCN_ACTION_BASE, SHADCN_ACTION_TEXT[profile], SHADCN_ACTION_RADIUS[profile], SHADCN_ACTION_SIZES[`${profile}-icon`], NEW_YORK_VARIANTS.secondary)),
|
|
106
|
+
});
|
|
107
|
+
def.rule({
|
|
108
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.all(w.state(style).eq(profile), w.state(state.hovered).eq(true), w.state(state.disabled).eq(false))),
|
|
109
|
+
intent: (i) => i.feedback.style.use(tw(profile === 'new-york-v4' ? 'bg-secondary/80' : SHADCN_SECONDARY_HOVER)),
|
|
110
|
+
});
|
|
111
|
+
def.rule({
|
|
112
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.all(w.state(style).eq(profile), w.state(state.focusVisible).eq(true))),
|
|
113
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_ACTION_FOCUS[profile])),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
def.rule({
|
|
117
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.state(state.disabled).eq(true)),
|
|
118
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_BUTTON_DISABLED_TOKENS)),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
def.rule({
|
|
122
|
+
when: (w) => command === 'trigger'
|
|
123
|
+
? w.all(w.prop('presentation').eq('default'), w.state(state.disabled).eq(true))
|
|
124
|
+
: w.state(state.disabled).eq(true),
|
|
125
|
+
intent: (i) => i.feedback.style.use(tw(SHADCN_BUTTON_DISABLED_TOKENS)),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asPopoverContent } from '@proto.ui/prototypes-base/popover';
|
|
3
|
+
import { setupOverlayStyle } from "../dialog/style.js";
|
|
4
|
+
import { SHADCN_STYLE_IDS } from "../style-scope/index.js";
|
|
5
|
+
import { POPOVER_PANEL, POPOVER_NAVIGATION_PANEL, POPOVER_NAVIGATION_SUPPORTED_TRANSLUCENCY, } from "./recipes.js";
|
|
6
|
+
import { POPUP_OPEN_MOTION, POPUP_CLOSE_MOTION, POPUP_SIDE_MOTION } from "./motion.js";
|
|
7
|
+
export default definePrototype({
|
|
8
|
+
name: 'shadcn-popover-content',
|
|
9
|
+
modules: asPopoverContent.modules,
|
|
10
|
+
setup(def) {
|
|
11
|
+
const behavior = asPopoverContent();
|
|
12
|
+
def.props.define({
|
|
13
|
+
presentation: { type: 'enum', empty: 'fallback', options: ['default', 'navigation'] },
|
|
14
|
+
});
|
|
15
|
+
def.props.setDefaults({ presentation: 'default' });
|
|
16
|
+
const style = setupOverlayStyle(def, 'nova');
|
|
17
|
+
// Keep keyframe timing without interpolating host positioning or panel paint.
|
|
18
|
+
def.feedback.style.use(tw('transition-none'));
|
|
19
|
+
for (const profile of SHADCN_STYLE_IDS) {
|
|
20
|
+
def.rule({
|
|
21
|
+
when: (w) => w.all(w.prop('presentation').eq('default'), w.state(style).eq(profile)),
|
|
22
|
+
intent: (i) => i.feedback.style.use(POPOVER_PANEL[profile]),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
for (const profile of ['luma', 'rhea']) {
|
|
26
|
+
def.rule({
|
|
27
|
+
when: (w) => w.all(w.prop('presentation').eq('default'), w.state(style).eq(profile), w.meta('colorScheme').eq('dark')),
|
|
28
|
+
intent: (i) => i.feedback.style.use(tw('ring-foreground/10')),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
def.rule({
|
|
32
|
+
when: (w) => w.prop('presentation').eq('default'),
|
|
33
|
+
intent: (i) => i.feedback.style.use(tw('z-50 w-72 max-w-[var(--proto-ui-available-width)] max-h-[var(--proto-ui-available-height)] overflow-y-auto outline-none')),
|
|
34
|
+
});
|
|
35
|
+
def.rule({
|
|
36
|
+
when: (w) => w.prop('presentation').eq('navigation'),
|
|
37
|
+
intent: (i) => i.feedback.style.use(POPOVER_NAVIGATION_PANEL),
|
|
38
|
+
});
|
|
39
|
+
def.rule({
|
|
40
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.meta('preference.reducedTransparency').eq('no-preference'), w.meta('preference.forcedColors').eq('none'), w.meta('styleSupport.backdropBlur4px').eq(true)),
|
|
41
|
+
intent: (i) => i.feedback.style.use(POPOVER_NAVIGATION_SUPPORTED_TRANSLUCENCY),
|
|
42
|
+
});
|
|
43
|
+
const { open } = behavior.stateHandles;
|
|
44
|
+
// Concrete presentation conditions compose the shared pure motion recipes
|
|
45
|
+
// while honoring user reduced-motion preferences.
|
|
46
|
+
const defaultMotionRule = (rule) => def.rule({
|
|
47
|
+
...rule,
|
|
48
|
+
when: (w) => w.all(w.prop('presentation').eq('default'), w.not(w.meta('preference.reducedMotion').eq('reduce')), rule.when(w)),
|
|
49
|
+
});
|
|
50
|
+
defaultMotionRule({
|
|
51
|
+
when: (w) => w.state(open).eq(true),
|
|
52
|
+
intent: (i) => i.feedback.style.use(POPUP_OPEN_MOTION),
|
|
53
|
+
});
|
|
54
|
+
defaultMotionRule({
|
|
55
|
+
when: (w) => w.state(open).eq(false),
|
|
56
|
+
intent: (i) => i.feedback.style.use(POPUP_CLOSE_MOTION),
|
|
57
|
+
});
|
|
58
|
+
for (const [side, animation] of POPUP_SIDE_MOTION) {
|
|
59
|
+
defaultMotionRule({
|
|
60
|
+
when: (w) => w.prop('side').eq(side),
|
|
61
|
+
intent: (i) => i.feedback.style.use(animation),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
def.rule({
|
|
65
|
+
when: (w) => w.all(w.prop('presentation').eq('default'), w.meta('preference.reducedMotion').eq('reduce')),
|
|
66
|
+
intent: (i) => i.feedback.style.use(tw('animate-none')),
|
|
67
|
+
});
|
|
68
|
+
def.rule({
|
|
69
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.state(open).eq(true)),
|
|
70
|
+
intent: (i) => i.feedback.style.use(tw('animate-none')),
|
|
71
|
+
});
|
|
72
|
+
def.rule({
|
|
73
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.state(open).eq(false), w.not(w.meta('preference.reducedMotion').eq('reduce'))),
|
|
74
|
+
intent: (i) => i.feedback.style.use(POPUP_CLOSE_MOTION),
|
|
75
|
+
});
|
|
76
|
+
def.rule({
|
|
77
|
+
when: (w) => w.all(w.prop('presentation').eq('navigation'), w.state(open).eq(false), w.meta('preference.reducedMotion').eq('reduce')),
|
|
78
|
+
intent: (i) => i.feedback.style.use(tw('animate-none')),
|
|
79
|
+
});
|
|
80
|
+
// The existing zero-duration default remains a retention-policy gap; CSS
|
|
81
|
+
// animation tokens alone do not establish a retained native leave frame.
|
|
82
|
+
behavior.asTransition.configure({ enterDuration: 0, leaveDuration: 0 });
|
|
83
|
+
},
|
|
84
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type PopoverDescriptionExposes } from '@proto.ui/prototypes-base/popover';
|
|
2
|
+
import type { PopoverDescriptionProps } from "./types.js";
|
|
3
|
+
declare const _default: import("@proto.ui/core").Prototype<PopoverDescriptionProps, PopoverDescriptionExposes>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { definePrototype } from '@proto.ui/core';
|
|
2
|
+
import { asPopoverDescription, } from '@proto.ui/prototypes-base/popover';
|
|
3
|
+
import { setupOverlayPaint } from "../dialog/style.js";
|
|
4
|
+
import { POPOVER_DESCRIPTION } from "./recipes.js";
|
|
5
|
+
export default definePrototype({
|
|
6
|
+
name: 'shadcn-popover-description',
|
|
7
|
+
modules: asPopoverDescription.modules,
|
|
8
|
+
setup(def) {
|
|
9
|
+
const behavior = asPopoverDescription();
|
|
10
|
+
setupOverlayPaint(def, POPOVER_DESCRIPTION, 'nova');
|
|
11
|
+
return behavior.render;
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as popoverRoot } from "./root.proto.js";
|
|
2
|
+
export { default as popoverTrigger } from "./trigger.proto.js";
|
|
3
|
+
export { default as popoverContent } from "./content.proto.js";
|
|
4
|
+
export { default as popoverTitle } from "./title.proto.js";
|
|
5
|
+
export { default as popoverDescription } from "./description.proto.js";
|
|
6
|
+
export { default as popoverClose } from "./close.proto.js";
|
|
7
|
+
export { default } from "./root.proto.js";
|
|
8
|
+
export type { PopoverRootExposes, PopoverTriggerExposes, PopoverContentExposes, PopoverTitleExposes, PopoverDescriptionExposes, PopoverCloseExposes, } from '@proto.ui/prototypes-base/popover';
|
|
9
|
+
export type { PopoverRootProps, PopoverTriggerProps, PopoverContentProps, PopoverTitleProps, PopoverDescriptionProps, PopoverCloseProps, } from "./types.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as popoverRoot } from "./root.proto.js";
|
|
2
|
+
export { default as popoverTrigger } from "./trigger.proto.js";
|
|
3
|
+
export { default as popoverContent } from "./content.proto.js";
|
|
4
|
+
export { default as popoverTitle } from "./title.proto.js";
|
|
5
|
+
export { default as popoverDescription } from "./description.proto.js";
|
|
6
|
+
export { default as popoverClose } from "./close.proto.js";
|
|
7
|
+
export { default } from "./root.proto.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DefHandle, type State } from '@proto.ui/core';
|
|
2
|
+
export declare const POPUP_OPEN_MOTION: import("@proto.ui/core").StyleHandle;
|
|
3
|
+
export declare const POPUP_CLOSE_MOTION: import("@proto.ui/core").StyleHandle;
|
|
4
|
+
export declare const POPUP_SIDE_MOTION: readonly [readonly ["top", import("@proto.ui/core").StyleHandle], readonly ["bottom", import("@proto.ui/core").StyleHandle], readonly ["left", import("@proto.ui/core").StyleHandle], readonly ["right", import("@proto.ui/core").StyleHandle]];
|
|
5
|
+
/** Finite common popup CSS recipes at shadcn-ui/ui 3d98900e9b73.
|
|
6
|
+
* Borrows the caller's actual open State. Installs no hook, timer, Transition,
|
|
7
|
+
* positioning or focus owner, and never mutates the borrowed State.
|
|
8
|
+
* Duration stays in the profile recipe and inherited Transition policy.
|
|
9
|
+
* Requested-side paint is not proof of collision-resolved side/origin parity.
|
|
10
|
+
*/
|
|
11
|
+
export declare function setupPopupMotion(def: DefHandle<{
|
|
12
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
13
|
+
}>, open: State<boolean>): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tw } from '@proto.ui/core';
|
|
2
|
+
// Pure paint shared with concrete authors that add their own public conditions.
|
|
3
|
+
// No hook, timer, state subscription or borrowed-state mutation is introduced.
|
|
4
|
+
export const POPUP_OPEN_MOTION = tw('animate-in fade-in-0 zoom-in-95');
|
|
5
|
+
export const POPUP_CLOSE_MOTION = tw('animate-out fade-out-0 zoom-out-95');
|
|
6
|
+
export const POPUP_SIDE_MOTION = [
|
|
7
|
+
['top', tw('slide-in-from-bottom-2')],
|
|
8
|
+
['bottom', tw('slide-in-from-top-2')],
|
|
9
|
+
['left', tw('slide-in-from-right-2')],
|
|
10
|
+
['right', tw('slide-in-from-left-2')],
|
|
11
|
+
];
|
|
12
|
+
/** Finite common popup CSS recipes at shadcn-ui/ui 3d98900e9b73.
|
|
13
|
+
* Borrows the caller's actual open State. Installs no hook, timer, Transition,
|
|
14
|
+
* positioning or focus owner, and never mutates the borrowed State.
|
|
15
|
+
* Duration stays in the profile recipe and inherited Transition policy.
|
|
16
|
+
* Requested-side paint is not proof of collision-resolved side/origin parity.
|
|
17
|
+
*/
|
|
18
|
+
export function setupPopupMotion(def, open) {
|
|
19
|
+
def.rule({
|
|
20
|
+
when: (w) => w.state(open).eq(true),
|
|
21
|
+
intent: (i) => i.feedback.style.use(POPUP_OPEN_MOTION),
|
|
22
|
+
});
|
|
23
|
+
def.rule({
|
|
24
|
+
when: (w) => w.state(open).eq(false),
|
|
25
|
+
intent: (i) => i.feedback.style.use(POPUP_CLOSE_MOTION),
|
|
26
|
+
});
|
|
27
|
+
for (const [side, animation] of POPUP_SIDE_MOTION) {
|
|
28
|
+
def.rule({
|
|
29
|
+
when: (w) => w.prop('side').eq(side),
|
|
30
|
+
intent: (i) => i.feedback.style.use(animation),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** shadcn-ui/ui 3d98900e9b73c45f035f8109e9d41ba6a51685e7 .cn-popover-* and
|
|
2
|
+
* bases/base/ui/popover.tsx, plus independent new-york-v4/ui/popover.tsx.
|
|
3
|
+
* Existing compatibility default stays Base/Nova: c2a67849be260701852b0977ba15eb5f3a0ce2a4
|
|
4
|
+
* for Title/command geometry, not a retroactively renamed New York baseline.
|
|
5
|
+
* MIT; see THIRD_PARTY_NOTICES.md. No new Header, Anchor, size or Button owner.
|
|
6
|
+
*/
|
|
7
|
+
export declare const POPOVER_PANEL: {
|
|
8
|
+
readonly vega: import("@proto.ui/core").StyleHandle;
|
|
9
|
+
readonly nova: import("@proto.ui/core").StyleHandle;
|
|
10
|
+
readonly maia: import("@proto.ui/core").StyleHandle;
|
|
11
|
+
readonly lyra: import("@proto.ui/core").StyleHandle;
|
|
12
|
+
readonly mira: import("@proto.ui/core").StyleHandle;
|
|
13
|
+
readonly luma: import("@proto.ui/core").StyleHandle;
|
|
14
|
+
readonly sera: import("@proto.ui/core").StyleHandle;
|
|
15
|
+
readonly rhea: import("@proto.ui/core").StyleHandle;
|
|
16
|
+
readonly 'new-york-v4': import("@proto.ui/core").StyleHandle;
|
|
17
|
+
};
|
|
18
|
+
export declare const POPOVER_TITLE: {
|
|
19
|
+
readonly vega: import("@proto.ui/core").StyleHandle;
|
|
20
|
+
readonly nova: import("@proto.ui/core").StyleHandle;
|
|
21
|
+
readonly maia: import("@proto.ui/core").StyleHandle;
|
|
22
|
+
readonly lyra: import("@proto.ui/core").StyleHandle;
|
|
23
|
+
readonly mira: import("@proto.ui/core").StyleHandle;
|
|
24
|
+
readonly luma: import("@proto.ui/core").StyleHandle;
|
|
25
|
+
readonly sera: import("@proto.ui/core").StyleHandle;
|
|
26
|
+
readonly rhea: import("@proto.ui/core").StyleHandle;
|
|
27
|
+
readonly 'new-york-v4': import("@proto.ui/core").StyleHandle;
|
|
28
|
+
};
|
|
29
|
+
export declare const POPOVER_DESCRIPTION: {
|
|
30
|
+
readonly vega: import("@proto.ui/core").StyleHandle;
|
|
31
|
+
readonly nova: import("@proto.ui/core").StyleHandle;
|
|
32
|
+
readonly maia: import("@proto.ui/core").StyleHandle;
|
|
33
|
+
readonly lyra: import("@proto.ui/core").StyleHandle;
|
|
34
|
+
readonly mira: import("@proto.ui/core").StyleHandle;
|
|
35
|
+
readonly luma: import("@proto.ui/core").StyleHandle;
|
|
36
|
+
readonly sera: import("@proto.ui/core").StyleHandle;
|
|
37
|
+
readonly rhea: import("@proto.ui/core").StyleHandle;
|
|
38
|
+
readonly 'new-york-v4': import("@proto.ui/core").StyleHandle;
|
|
39
|
+
};
|
|
40
|
+
/** Website navigation presentation pinned independently to shadcn-ui/ui
|
|
41
|
+
* c0d63c339d6cd2fc26135590a54cf1f362269451 apps/v4/components/mobile-nav.tsx.
|
|
42
|
+
* This explicit family variant is not the default Popover card or a new owner.
|
|
43
|
+
* Opaque fallback is deliberate; the source's bare blur needs a separate support
|
|
44
|
+
* fact before exact translucent parity can be claimed. The current bounded
|
|
45
|
+
* 4px supported enhancement below is recorded as a Proto adaptation. */
|
|
46
|
+
export declare const POPOVER_NAVIGATION_PANEL: import("@proto.ui/core").StyleHandle;
|
|
47
|
+
export declare const POPOVER_NAVIGATION_SUPPORTED_TRANSLUCENCY: import("@proto.ui/core").StyleHandle;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { tw } from '@proto.ui/core';
|
|
2
|
+
/** shadcn-ui/ui 3d98900e9b73c45f035f8109e9d41ba6a51685e7 .cn-popover-* and
|
|
3
|
+
* bases/base/ui/popover.tsx, plus independent new-york-v4/ui/popover.tsx.
|
|
4
|
+
* Existing compatibility default stays Base/Nova: c2a67849be260701852b0977ba15eb5f3a0ce2a4
|
|
5
|
+
* for Title/command geometry, not a retroactively renamed New York baseline.
|
|
6
|
+
* MIT; see THIRD_PARTY_NOTICES.md. No new Header, Anchor, size or Button owner.
|
|
7
|
+
*/
|
|
8
|
+
export const POPOVER_PANEL = {
|
|
9
|
+
vega: tw('bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100'),
|
|
10
|
+
nova: tw('bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100'),
|
|
11
|
+
maia: tw('bg-popover text-popover-foreground ring-foreground/5 flex flex-col gap-4 rounded-[var(--pui-radius-2xl)] p-4 text-sm shadow-2xl ring-1 duration-100'),
|
|
12
|
+
lyra: tw('bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100'),
|
|
13
|
+
mira: tw('bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-4 rounded-lg p-2.5 text-xs shadow-md ring-1 duration-100'),
|
|
14
|
+
luma: tw('bg-popover text-popover-foreground ring-foreground/5 flex flex-col gap-4 rounded-[var(--pui-radius-3xl)] p-4 text-sm shadow-lg ring-1 duration-100'),
|
|
15
|
+
sera: tw('bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-4 rounded-none p-4 text-sm shadow-md ring-1 duration-100'),
|
|
16
|
+
rhea: tw('bg-popover text-popover-foreground ring-foreground/5 flex flex-col gap-4 rounded-[var(--pui-radius-3xl)] p-4 text-sm shadow-lg ring-1 duration-100'),
|
|
17
|
+
'new-york-v4': tw('flex flex-col gap-4 rounded-md border border-border bg-popover p-4 text-sm text-popover-foreground shadow-md duration-100'),
|
|
18
|
+
};
|
|
19
|
+
export const POPOVER_TITLE = {
|
|
20
|
+
vega: tw('font-medium'),
|
|
21
|
+
nova: tw('font-medium'),
|
|
22
|
+
maia: tw('text-base font-medium'),
|
|
23
|
+
lyra: tw('text-sm font-medium'),
|
|
24
|
+
mira: tw('text-sm font-medium'),
|
|
25
|
+
luma: tw('text-base font-medium'),
|
|
26
|
+
sera: tw('text-xs font-semibold uppercase'),
|
|
27
|
+
rhea: tw('text-base font-medium'),
|
|
28
|
+
'new-york-v4': tw('font-medium'),
|
|
29
|
+
};
|
|
30
|
+
export const POPOVER_DESCRIPTION = {
|
|
31
|
+
vega: tw('text-muted-foreground'),
|
|
32
|
+
nova: tw('text-muted-foreground'),
|
|
33
|
+
maia: tw('text-muted-foreground'),
|
|
34
|
+
lyra: tw('text-muted-foreground text-xs leading-relaxed'),
|
|
35
|
+
mira: tw('text-muted-foreground'),
|
|
36
|
+
luma: tw('text-muted-foreground'),
|
|
37
|
+
sera: tw('text-muted-foreground text-sm leading-relaxed mt-0.5'),
|
|
38
|
+
rhea: tw('text-muted-foreground'),
|
|
39
|
+
'new-york-v4': tw('text-muted-foreground'),
|
|
40
|
+
};
|
|
41
|
+
/** Website navigation presentation pinned independently to shadcn-ui/ui
|
|
42
|
+
* c0d63c339d6cd2fc26135590a54cf1f362269451 apps/v4/components/mobile-nav.tsx.
|
|
43
|
+
* This explicit family variant is not the default Popover card or a new owner.
|
|
44
|
+
* Opaque fallback is deliberate; the source's bare blur needs a separate support
|
|
45
|
+
* fact before exact translucent parity can be claimed. The current bounded
|
|
46
|
+
* 4px supported enhancement below is recorded as a Proto adaptation. */
|
|
47
|
+
export const POPOVER_NAVIGATION_PANEL = tw('z-50 w-[var(--proto-ui-available-width)] h-[var(--proto-ui-available-height)] max-w-[var(--proto-ui-available-width)] max-h-[var(--proto-ui-available-height)] overflow-y-auto overscroll-contain rounded-none border-0 ring-0 bg-background text-foreground p-0 shadow-none outline-none duration-100');
|
|
48
|
+
export const POPOVER_NAVIGATION_SUPPORTED_TRANSLUCENCY = tw('bg-background/90 backdrop-blur-xs');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asPopoverRoot } from '@proto.ui/prototypes-base/popover';
|
|
3
|
+
import { setupShadcnStyleScope } from "../style-scope/index.js";
|
|
4
|
+
export default definePrototype({
|
|
5
|
+
name: 'shadcn-popover-root',
|
|
6
|
+
modules: asPopoverRoot.modules,
|
|
7
|
+
setup(def) {
|
|
8
|
+
const behavior = asPopoverRoot();
|
|
9
|
+
setupShadcnStyleScope(def);
|
|
10
|
+
def.feedback.style.use(tw('relative inline-flex min-w-0'));
|
|
11
|
+
return behavior.render;
|
|
12
|
+
},
|
|
13
|
+
});
|