@yahoo/uds-v5-wip 0.0.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/dist/components/accordion.config.d.ts +2 -0
- package/dist/components/accordion.config.js +2 -0
- package/dist/components/accordion.d.ts +2 -0
- package/dist/components/accordion.js +2 -0
- package/dist/components/alert.config.d.ts +2 -0
- package/dist/components/alert.config.js +2 -0
- package/dist/components/alert.d.ts +2 -0
- package/dist/components/alert.js +2 -0
- package/dist/components/anchor.config.d.ts +2 -0
- package/dist/components/anchor.config.js +2 -0
- package/dist/components/anchor.d.ts +2 -0
- package/dist/components/anchor.js +2 -0
- package/dist/components/article.d.ts +2 -0
- package/dist/components/article.js +2 -0
- package/dist/components/aside.d.ts +2 -0
- package/dist/components/aside.js +2 -0
- package/dist/components/avatar-group.config.d.ts +2 -0
- package/dist/components/avatar-group.config.js +2 -0
- package/dist/components/avatar-group.d.ts +2 -0
- package/dist/components/avatar-group.js +2 -0
- package/dist/components/avatar.config.d.ts +2 -0
- package/dist/components/avatar.config.js +2 -0
- package/dist/components/avatar.d.ts +2 -0
- package/dist/components/avatar.js +2 -0
- package/dist/components/badge.config.d.ts +2 -0
- package/dist/components/badge.config.js +2 -0
- package/dist/components/badge.d.ts +2 -0
- package/dist/components/badge.js +2 -0
- package/dist/components/box.d.ts +2 -0
- package/dist/components/box.js +2 -0
- package/dist/components/breadcrumb.config.d.ts +2 -0
- package/dist/components/breadcrumb.config.js +2 -0
- package/dist/components/breadcrumb.d.ts +2 -0
- package/dist/components/breadcrumb.js +2 -0
- package/dist/components/button.config.d.ts +2 -0
- package/dist/components/button.config.js +2 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.js +2 -0
- package/dist/components/card.config.d.ts +2 -0
- package/dist/components/card.config.js +2 -0
- package/dist/components/card.d.ts +2 -0
- package/dist/components/card.js +2 -0
- package/dist/components/collapsible.config.d.ts +2 -0
- package/dist/components/collapsible.config.js +2 -0
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.js +2 -0
- package/dist/components/command.config.d.ts +2 -0
- package/dist/components/command.config.js +2 -0
- package/dist/components/command.d.ts +2 -0
- package/dist/components/command.js +2 -0
- package/dist/components/control-color.config.d.ts +2 -0
- package/dist/components/control-color.config.js +2 -0
- package/dist/components/control-color.d.ts +2 -0
- package/dist/components/control-color.js +2 -0
- package/dist/components/control-curve.config.d.ts +2 -0
- package/dist/components/control-curve.config.js +2 -0
- package/dist/components/control-curve.d.ts +2 -0
- package/dist/components/control-curve.js +2 -0
- package/dist/components/control-folder.config.d.ts +2 -0
- package/dist/components/control-folder.config.js +2 -0
- package/dist/components/control-folder.d.ts +2 -0
- package/dist/components/control-folder.js +2 -0
- package/dist/components/control-group.config.d.ts +2 -0
- package/dist/components/control-group.config.js +2 -0
- package/dist/components/control-group.d.ts +2 -0
- package/dist/components/control-group.js +2 -0
- package/dist/components/control-knob.config.d.ts +2 -0
- package/dist/components/control-knob.config.js +2 -0
- package/dist/components/control-knob.d.ts +2 -0
- package/dist/components/control-knob.js +2 -0
- package/dist/components/control-panel.config.d.ts +2 -0
- package/dist/components/control-panel.config.js +2 -0
- package/dist/components/control-panel.d.ts +2 -0
- package/dist/components/control-panel.js +2 -0
- package/dist/components/control-select.config.d.ts +2 -0
- package/dist/components/control-select.config.js +2 -0
- package/dist/components/control-select.d.ts +2 -0
- package/dist/components/control-select.js +2 -0
- package/dist/components/control-slider.config.d.ts +2 -0
- package/dist/components/control-slider.config.js +2 -0
- package/dist/components/control-slider.d.ts +2 -0
- package/dist/components/control-slider.js +2 -0
- package/dist/components/control-spring.config.d.ts +2 -0
- package/dist/components/control-spring.config.js +2 -0
- package/dist/components/control-spring.d.ts +2 -0
- package/dist/components/control-spring.js +2 -0
- package/dist/components/control-stepper.config.d.ts +2 -0
- package/dist/components/control-stepper.config.js +2 -0
- package/dist/components/control-stepper.d.ts +2 -0
- package/dist/components/control-stepper.js +2 -0
- package/dist/components/control-toggle.config.d.ts +2 -0
- package/dist/components/control-toggle.config.js +2 -0
- package/dist/components/control-toggle.d.ts +2 -0
- package/dist/components/control-toggle.js +2 -0
- package/dist/components/dist/_slots.js +8 -0
- package/dist/components/dist/accordion.config.d.ts +432 -0
- package/dist/components/dist/accordion.config.js +81 -0
- package/dist/components/dist/accordion.d.ts +454 -0
- package/dist/components/dist/accordion.js +60 -0
- package/dist/components/dist/alert.config.d.ts +220 -0
- package/dist/components/dist/alert.config.js +54 -0
- package/dist/components/dist/alert.d.ts +231 -0
- package/dist/components/dist/alert.js +16 -0
- package/dist/components/dist/anchor.config.d.ts +251 -0
- package/dist/components/dist/anchor.config.js +22 -0
- package/dist/components/dist/anchor.d.ts +262 -0
- package/dist/components/dist/anchor.js +9 -0
- package/dist/components/dist/article.d.ts +12 -0
- package/dist/components/dist/article.js +9 -0
- package/dist/components/dist/aside.d.ts +12 -0
- package/dist/components/dist/aside.js +9 -0
- package/dist/components/dist/avatar-group.config.d.ts +316 -0
- package/dist/components/dist/avatar-group.config.js +33 -0
- package/dist/components/dist/avatar-group.d.ts +330 -0
- package/dist/components/dist/avatar-group.js +39 -0
- package/dist/components/dist/avatar.config.d.ts +198 -0
- package/dist/components/dist/avatar.config.js +49 -0
- package/dist/components/dist/avatar.d.ts +212 -0
- package/dist/components/dist/avatar.js +20 -0
- package/dist/components/dist/badge.config.d.ts +478 -0
- package/dist/components/dist/badge.config.js +99 -0
- package/dist/components/dist/badge.d.ts +490 -0
- package/dist/components/dist/badge.js +16 -0
- package/dist/components/dist/box.d.ts +15 -0
- package/dist/components/dist/box.js +9 -0
- package/dist/components/dist/breadcrumb.config.d.ts +391 -0
- package/dist/components/dist/breadcrumb.config.js +43 -0
- package/dist/components/dist/breadcrumb.d.ts +421 -0
- package/dist/components/dist/breadcrumb.js +119 -0
- package/dist/components/dist/button.config.d.ts +382 -0
- package/dist/components/dist/button.config.js +91 -0
- package/dist/components/dist/button.d.ts +404 -0
- package/dist/components/dist/button.js +35 -0
- package/dist/components/dist/card.config.d.ts +337 -0
- package/dist/components/dist/card.config.js +33 -0
- package/dist/components/dist/card.d.ts +353 -0
- package/dist/components/dist/card.js +27 -0
- package/dist/components/dist/collapsible.config.d.ts +46 -0
- package/dist/components/dist/collapsible.config.js +46 -0
- package/dist/components/dist/collapsible.d.ts +62 -0
- package/dist/components/dist/collapsible.js +38 -0
- package/dist/components/dist/command.config.d.ts +1614 -0
- package/dist/components/dist/command.config.js +170 -0
- package/dist/components/dist/command.d.ts +1723 -0
- package/dist/components/dist/command.js +341 -0
- package/dist/components/dist/control-color.config.d.ts +980 -0
- package/dist/components/dist/control-color.config.js +81 -0
- package/dist/components/dist/control-color.d.ts +996 -0
- package/dist/components/dist/control-color.js +64 -0
- package/dist/components/dist/control-curve.config.d.ts +19 -0
- package/dist/components/dist/control-curve.config.js +14 -0
- package/dist/components/dist/control-curve.d.ts +36 -0
- package/dist/components/dist/control-curve.js +81 -0
- package/dist/components/dist/control-folder.config.d.ts +178 -0
- package/dist/components/dist/control-folder.config.js +47 -0
- package/dist/components/dist/control-folder.d.ts +195 -0
- package/dist/components/dist/control-folder.js +41 -0
- package/dist/components/dist/control-group.config.d.ts +860 -0
- package/dist/components/dist/control-group.config.js +80 -0
- package/dist/components/dist/control-group.d.ts +882 -0
- package/dist/components/dist/control-group.js +89 -0
- package/dist/components/dist/control-knob.config.d.ts +793 -0
- package/dist/components/dist/control-knob.config.js +67 -0
- package/dist/components/dist/control-knob.d.ts +820 -0
- package/dist/components/dist/control-knob.js +148 -0
- package/dist/components/dist/control-panel.config.d.ts +403 -0
- package/dist/components/dist/control-panel.config.js +38 -0
- package/dist/components/dist/control-panel.d.ts +416 -0
- package/dist/components/dist/control-panel.js +22 -0
- package/dist/components/dist/control-select.config.d.ts +1177 -0
- package/dist/components/dist/control-select.config.js +102 -0
- package/dist/components/dist/control-select.d.ts +1201 -0
- package/dist/components/dist/control-select.js +63 -0
- package/dist/components/dist/control-slider.config.d.ts +105 -0
- package/dist/components/dist/control-slider.config.js +98 -0
- package/dist/components/dist/control-slider.d.ts +128 -0
- package/dist/components/dist/control-slider.js +87 -0
- package/dist/components/dist/control-spring.config.d.ts +418 -0
- package/dist/components/dist/control-spring.config.js +36 -0
- package/dist/components/dist/control-spring.d.ts +440 -0
- package/dist/components/dist/control-spring.js +136 -0
- package/dist/components/dist/control-stepper.config.d.ts +1085 -0
- package/dist/components/dist/control-stepper.config.js +108 -0
- package/dist/components/dist/control-stepper.d.ts +1105 -0
- package/dist/components/dist/control-stepper.js +109 -0
- package/dist/components/dist/control-toggle.config.d.ts +408 -0
- package/dist/components/dist/control-toggle.config.js +26 -0
- package/dist/components/dist/control-toggle.d.ts +421 -0
- package/dist/components/dist/control-toggle.js +36 -0
- package/dist/components/dist/createSlot.d.ts +9 -0
- package/dist/components/dist/createSlot.js +89 -0
- package/dist/components/dist/dropdown.config.d.ts +921 -0
- package/dist/components/dist/dropdown.config.js +107 -0
- package/dist/components/dist/dropdown.d.ts +951 -0
- package/dist/components/dist/dropdown.js +92 -0
- package/dist/components/dist/empty-state.config.d.ts +397 -0
- package/dist/components/dist/empty-state.config.js +53 -0
- package/dist/components/dist/empty-state.d.ts +417 -0
- package/dist/components/dist/empty-state.js +33 -0
- package/dist/components/dist/footer.d.ts +12 -0
- package/dist/components/dist/footer.js +9 -0
- package/dist/components/dist/grid.d.ts +42 -0
- package/dist/components/dist/grid.js +34 -0
- package/dist/components/dist/header.d.ts +12 -0
- package/dist/components/dist/header.js +9 -0
- package/dist/components/dist/hstack.d.ts +16 -0
- package/dist/components/dist/hstack.js +21 -0
- package/dist/components/dist/image.d.ts +20 -0
- package/dist/components/dist/image.js +9 -0
- package/dist/components/dist/input.config.d.ts +59 -0
- package/dist/components/dist/input.config.js +42 -0
- package/dist/components/dist/input.d.ts +68 -0
- package/dist/components/dist/input.js +14 -0
- package/dist/components/dist/item.config.d.ts +352 -0
- package/dist/components/dist/item.config.js +83 -0
- package/dist/components/dist/item.d.ts +375 -0
- package/dist/components/dist/item.js +51 -0
- package/dist/components/dist/list.d.ts +20 -0
- package/dist/components/dist/list.js +21 -0
- package/dist/components/dist/main.d.ts +12 -0
- package/dist/components/dist/main.js +9 -0
- package/dist/components/dist/modal.config.d.ts +398 -0
- package/dist/components/dist/modal.config.js +92 -0
- package/dist/components/dist/modal.d.ts +434 -0
- package/dist/components/dist/modal.js +125 -0
- package/dist/components/dist/nav-header.config.d.ts +159 -0
- package/dist/components/dist/nav-header.config.js +26 -0
- package/dist/components/dist/nav-header.d.ts +174 -0
- package/dist/components/dist/nav-header.js +23 -0
- package/dist/components/dist/nav.d.ts +12 -0
- package/dist/components/dist/nav.js +9 -0
- package/dist/components/dist/preset-bar.config.d.ts +193 -0
- package/dist/components/dist/preset-bar.config.js +39 -0
- package/dist/components/dist/preset-bar.d.ts +216 -0
- package/dist/components/dist/preset-bar.js +71 -0
- package/dist/components/dist/presets/index.d.ts +17675 -0
- package/dist/components/dist/presets/index.js +97 -0
- package/dist/components/dist/pressable.d.ts +12 -0
- package/dist/components/dist/pressable.js +9 -0
- package/dist/components/dist/progress.config.d.ts +297 -0
- package/dist/components/dist/progress.config.js +35 -0
- package/dist/components/dist/progress.d.ts +312 -0
- package/dist/components/dist/progress.js +43 -0
- package/dist/components/dist/section.d.ts +12 -0
- package/dist/components/dist/section.js +9 -0
- package/dist/components/dist/select.config.d.ts +32 -0
- package/dist/components/dist/select.config.js +25 -0
- package/dist/components/dist/select.d.ts +46 -0
- package/dist/components/dist/select.js +13 -0
- package/dist/components/dist/sheet.config.d.ts +246 -0
- package/dist/components/dist/sheet.config.js +99 -0
- package/dist/components/dist/sheet.d.ts +268 -0
- package/dist/components/dist/sheet.js +53 -0
- package/dist/components/dist/sidebar.config.d.ts +1652 -0
- package/dist/components/dist/sidebar.config.js +217 -0
- package/dist/components/dist/sidebar.d.ts +1826 -0
- package/dist/components/dist/sidebar.js +496 -0
- package/dist/components/dist/skeleton.config.d.ts +17 -0
- package/dist/components/dist/skeleton.config.js +10 -0
- package/dist/components/dist/skeleton.d.ts +28 -0
- package/dist/components/dist/skeleton.js +16 -0
- package/dist/components/dist/slider.config.d.ts +45 -0
- package/dist/components/dist/slider.config.js +40 -0
- package/dist/components/dist/slider.d.ts +71 -0
- package/dist/components/dist/slider.js +247 -0
- package/dist/components/dist/spinner.config.d.ts +35 -0
- package/dist/components/dist/spinner.config.js +24 -0
- package/dist/components/dist/spinner.d.ts +43 -0
- package/dist/components/dist/spinner.js +29 -0
- package/dist/components/dist/svg.d.ts +22 -0
- package/dist/components/dist/svg.js +17 -0
- package/dist/components/dist/switch.config.d.ts +354 -0
- package/dist/components/dist/switch.config.js +47 -0
- package/dist/components/dist/switch.d.ts +371 -0
- package/dist/components/dist/switch.js +32 -0
- package/dist/components/dist/table.d.ts +37 -0
- package/dist/components/dist/table.js +29 -0
- package/dist/components/dist/tabs.config.d.ts +612 -0
- package/dist/components/dist/tabs.config.js +56 -0
- package/dist/components/dist/tabs.d.ts +633 -0
- package/dist/components/dist/tabs.js +77 -0
- package/dist/components/dist/text.config.d.ts +307 -0
- package/dist/components/dist/text.config.js +149 -0
- package/dist/components/dist/text.d.ts +206 -0
- package/dist/components/dist/text.js +12 -0
- package/dist/components/dist/textarea.config.d.ts +353 -0
- package/dist/components/dist/textarea.config.js +57 -0
- package/dist/components/dist/textarea.d.ts +363 -0
- package/dist/components/dist/textarea.js +9 -0
- package/dist/components/dist/toast.config.d.ts +336 -0
- package/dist/components/dist/toast.config.js +145 -0
- package/dist/components/dist/toast.d.ts +427 -0
- package/dist/components/dist/toast.js +159 -0
- package/dist/components/dist/tooltip.config.d.ts +194 -0
- package/dist/components/dist/tooltip.config.js +40 -0
- package/dist/components/dist/tooltip.d.ts +207 -0
- package/dist/components/dist/tooltip.js +28 -0
- package/dist/components/dist/vstack.d.ts +16 -0
- package/dist/components/dist/vstack.js +20 -0
- package/dist/components/dropdown.config.d.ts +2 -0
- package/dist/components/dropdown.config.js +2 -0
- package/dist/components/dropdown.d.ts +2 -0
- package/dist/components/dropdown.js +2 -0
- package/dist/components/empty-state.config.d.ts +2 -0
- package/dist/components/empty-state.config.js +2 -0
- package/dist/components/empty-state.d.ts +2 -0
- package/dist/components/empty-state.js +2 -0
- package/dist/components/footer.d.ts +2 -0
- package/dist/components/footer.js +2 -0
- package/dist/components/grid.d.ts +2 -0
- package/dist/components/grid.js +2 -0
- package/dist/components/header.d.ts +2 -0
- package/dist/components/header.js +2 -0
- package/dist/components/hstack.d.ts +2 -0
- package/dist/components/hstack.js +2 -0
- package/dist/components/image.d.ts +2 -0
- package/dist/components/image.js +2 -0
- package/dist/components/input.config.d.ts +2 -0
- package/dist/components/input.config.js +2 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.js +2 -0
- package/dist/components/item.config.d.ts +2 -0
- package/dist/components/item.config.js +2 -0
- package/dist/components/item.d.ts +2 -0
- package/dist/components/item.js +2 -0
- package/dist/components/list.d.ts +2 -0
- package/dist/components/list.js +2 -0
- package/dist/components/main.d.ts +2 -0
- package/dist/components/main.js +2 -0
- package/dist/components/modal.config.d.ts +2 -0
- package/dist/components/modal.config.js +2 -0
- package/dist/components/modal.d.ts +2 -0
- package/dist/components/modal.js +2 -0
- package/dist/components/nav-header.config.d.ts +2 -0
- package/dist/components/nav-header.config.js +2 -0
- package/dist/components/nav-header.d.ts +2 -0
- package/dist/components/nav-header.js +2 -0
- package/dist/components/nav.d.ts +2 -0
- package/dist/components/nav.js +2 -0
- package/dist/components/preset-bar.config.d.ts +2 -0
- package/dist/components/preset-bar.config.js +2 -0
- package/dist/components/preset-bar.d.ts +2 -0
- package/dist/components/preset-bar.js +2 -0
- package/dist/components/presets/index.d.ts +44 -0
- package/dist/components/presets/index.js +44 -0
- package/dist/components/pressable.d.ts +2 -0
- package/dist/components/pressable.js +2 -0
- package/dist/components/progress.config.d.ts +2 -0
- package/dist/components/progress.config.js +2 -0
- package/dist/components/progress.d.ts +2 -0
- package/dist/components/progress.js +2 -0
- package/dist/components/section.d.ts +2 -0
- package/dist/components/section.js +2 -0
- package/dist/components/select.config.d.ts +2 -0
- package/dist/components/select.config.js +2 -0
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +2 -0
- package/dist/components/sheet.config.d.ts +2 -0
- package/dist/components/sheet.config.js +2 -0
- package/dist/components/sheet.d.ts +2 -0
- package/dist/components/sheet.js +2 -0
- package/dist/components/sidebar.config.d.ts +2 -0
- package/dist/components/sidebar.config.js +2 -0
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -0
- package/dist/components/skeleton.config.d.ts +2 -0
- package/dist/components/skeleton.config.js +2 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +2 -0
- package/dist/components/slider.config.d.ts +2 -0
- package/dist/components/slider.config.js +2 -0
- package/dist/components/slider.d.ts +2 -0
- package/dist/components/slider.js +2 -0
- package/dist/components/spinner.config.d.ts +2 -0
- package/dist/components/spinner.config.js +2 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.js +2 -0
- package/dist/components/svg.d.ts +2 -0
- package/dist/components/svg.js +2 -0
- package/dist/components/switch.config.d.ts +2 -0
- package/dist/components/switch.config.js +2 -0
- package/dist/components/switch.d.ts +2 -0
- package/dist/components/switch.js +2 -0
- package/dist/components/table.d.ts +2 -0
- package/dist/components/table.js +2 -0
- package/dist/components/tabs.config.d.ts +2 -0
- package/dist/components/tabs.config.js +2 -0
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +2 -0
- package/dist/components/text.config.d.ts +2 -0
- package/dist/components/text.config.js +2 -0
- package/dist/components/text.d.ts +2 -0
- package/dist/components/text.js +2 -0
- package/dist/components/textarea.config.d.ts +2 -0
- package/dist/components/textarea.config.js +2 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/toast.config.d.ts +2 -0
- package/dist/components/toast.config.js +2 -0
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.js +2 -0
- package/dist/components/tooltip.config.d.ts +2 -0
- package/dist/components/tooltip.config.js +2 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -0
- package/dist/components/vstack.d.ts +2 -0
- package/dist/components/vstack.js +2 -0
- package/dist/config/dist/component-resolution.d.ts +1 -0
- package/dist/config/dist/component-resolution.js +78 -0
- package/dist/config/dist/consts/defaultColors.d.ts +253 -0
- package/dist/config/dist/consts/defaultColors.js +252 -0
- package/dist/config/dist/createConfig.d.ts +214 -0
- package/dist/config/dist/createConfig.js +454 -0
- package/dist/config/dist/index.d.ts +5 -0
- package/dist/config/dist/index.js +4 -0
- package/dist/config/dist/preset-merge.js +165 -0
- package/dist/config/dist/serialize.d.ts +57 -0
- package/dist/config/dist/serialize.js +153 -0
- package/dist/config-utils/dist/componentConfig.d.ts +10 -0
- package/dist/config-utils/dist/componentConfig.js +11 -0
- package/dist/config-utils.d.ts +2 -0
- package/dist/config-utils.js +2 -0
- package/dist/config.d.ts +3512 -0
- package/dist/config.js +22 -0
- package/dist/core/dist/createComponent.boundaries.js +192 -0
- package/dist/core/dist/createComponent.d.ts +57 -0
- package/dist/core/dist/createComponent.js +67 -0
- package/dist/core/dist/createComponentExample.d.ts +42 -0
- package/dist/core/dist/createComponentExample.js +27 -0
- package/dist/core/dist/createProvider.d.ts +13 -0
- package/dist/core/dist/createProvider.js +24 -0
- package/dist/core/dist/generated/stylePropsTwMap.d.ts +1701 -0
- package/dist/core/dist/generated/stylePropsTwMap.js +570 -0
- package/dist/core/dist/getComponentStyles.d.ts +50 -0
- package/dist/core/dist/getComponentStyles.js +85 -0
- package/dist/core/dist/getStyles.d.ts +43 -0
- package/dist/core/dist/getStyles.js +305 -0
- package/dist/core/dist/index.d.ts +11 -0
- package/dist/core/dist/index.js +11 -0
- package/dist/core/dist/macros.d.ts +22 -0
- package/dist/core/dist/macros.js +49 -0
- package/dist/core/dist/propMappings.d.ts +77 -0
- package/dist/core/dist/propMappings.js +1404 -0
- package/dist/core/dist/resolveMotionState.d.ts +5 -0
- package/dist/core/dist/resolveMotionState.js +17 -0
- package/dist/core/dist/resolveProps.boundaries.js +130 -0
- package/dist/core/dist/transformPreset.d.ts +18 -0
- package/dist/core/dist/transformPreset.js +28 -0
- package/dist/core/dist/withDefaultStyleProps.d.ts +44 -0
- package/dist/core/dist/withDefaultStyleProps.js +18 -0
- package/dist/core.d.ts +12 -0
- package/dist/core.js +13 -0
- package/dist/createSlot.d.ts +2 -0
- package/dist/createSlot.js +2 -0
- package/dist/devtools.d.ts +2 -0
- package/dist/devtools.js +3 -0
- package/dist/fixtures.d.ts +2 -0
- package/dist/fixtures.js +3 -0
- package/dist/foundational-presets/dist/boldVibrant.d.ts +3575 -0
- package/dist/foundational-presets/dist/boldVibrant.js +326 -0
- package/dist/foundational-presets/dist/brutalist.d.ts +3575 -0
- package/dist/foundational-presets/dist/brutalist.js +326 -0
- package/dist/foundational-presets/dist/candy.d.ts +3575 -0
- package/dist/foundational-presets/dist/candy.js +326 -0
- package/dist/foundational-presets/dist/cleanMinimalist.d.ts +3575 -0
- package/dist/foundational-presets/dist/cleanMinimalist.js +326 -0
- package/dist/foundational-presets/dist/corporate.d.ts +3575 -0
- package/dist/foundational-presets/dist/corporate.js +326 -0
- package/dist/foundational-presets/dist/darkMoody.d.ts +3575 -0
- package/dist/foundational-presets/dist/darkMoody.js +326 -0
- package/dist/foundational-presets/dist/defaultPreset.d.ts +3509 -0
- package/dist/foundational-presets/dist/defaultPreset.js +1784 -0
- package/dist/foundational-presets/dist/forest.d.ts +3575 -0
- package/dist/foundational-presets/dist/forest.js +326 -0
- package/dist/foundational-presets/dist/highContrast.d.ts +3575 -0
- package/dist/foundational-presets/dist/highContrast.js +326 -0
- package/dist/foundational-presets/dist/index.d.ts +19 -0
- package/dist/foundational-presets/dist/index.js +19 -0
- package/dist/foundational-presets/dist/lavender.d.ts +3575 -0
- package/dist/foundational-presets/dist/lavender.js +326 -0
- package/dist/foundational-presets/dist/luxury.d.ts +3575 -0
- package/dist/foundational-presets/dist/luxury.js +326 -0
- package/dist/foundational-presets/dist/monochrome.d.ts +3575 -0
- package/dist/foundational-presets/dist/monochrome.js +326 -0
- package/dist/foundational-presets/dist/motion.d.ts +13 -0
- package/dist/foundational-presets/dist/motion.js +10 -0
- package/dist/foundational-presets/dist/neonCyber.d.ts +3575 -0
- package/dist/foundational-presets/dist/neonCyber.js +326 -0
- package/dist/foundational-presets/dist/newspaper.d.ts +3575 -0
- package/dist/foundational-presets/dist/newspaper.js +326 -0
- package/dist/foundational-presets/dist/ocean.d.ts +3575 -0
- package/dist/foundational-presets/dist/ocean.js +326 -0
- package/dist/foundational-presets/dist/slate.d.ts +3575 -0
- package/dist/foundational-presets/dist/slate.js +326 -0
- package/dist/foundational-presets/dist/sunset.d.ts +3575 -0
- package/dist/foundational-presets/dist/sunset.js +326 -0
- package/dist/foundational-presets/dist/terminal.d.ts +3575 -0
- package/dist/foundational-presets/dist/terminal.js +326 -0
- package/dist/foundational-presets/dist/warmOrganic.d.ts +3575 -0
- package/dist/foundational-presets/dist/warmOrganic.js +326 -0
- package/dist/loader/dist/_virtual/_rolldown/runtime.js +6 -0
- package/dist/loader/dist/loader/artifacts.js +43 -0
- package/dist/loader/dist/loader/babel-utils.js +29 -0
- package/dist/loader/dist/loader/create-component-data.js +33 -0
- package/dist/loader/dist/loader/create-component-lowering.js +454 -0
- package/dist/loader/dist/loader/data-attr-transform.js +191 -0
- package/dist/loader/dist/loader/dynamic-style-codegen.js +96 -0
- package/dist/loader/dist/loader/internal-meta.js +22 -0
- package/dist/loader/dist/loader/motion-transform.js +717 -0
- package/dist/loader/dist/loader/style-transform.js +670 -0
- package/dist/loader/dist/loader.d.ts +8 -0
- package/dist/loader/dist/loader.js +357 -0
- package/dist/loader/dist/next.d.ts +17 -0
- package/dist/loader/dist/next.js +77 -0
- package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +203 -0
- package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +25 -0
- package/dist/loader/dist/node_modules/react/cjs/react.development.js +762 -0
- package/dist/loader/dist/node_modules/react/cjs/react.production.js +351 -0
- package/dist/loader/dist/node_modules/react/index.js +10 -0
- package/dist/loader/dist/node_modules/react/jsx-runtime.js +10 -0
- package/dist/loader/dist/packages/core/dist/createComponent.js +6 -0
- package/dist/loader/dist/packages/core/dist/createProvider.js +7 -0
- package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +570 -0
- package/dist/loader/dist/packages/core/dist/getComponentStyles.js +2 -0
- package/dist/loader/dist/packages/core/dist/getStyles.js +58 -0
- package/dist/loader/dist/packages/core/dist/index.js +6 -0
- package/dist/loader/dist/packages/core/dist/macros.js +41 -0
- package/dist/loader/dist/packages/core/dist/propMappings.js +1347 -0
- package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +1 -0
- package/dist/loader.d.ts +2 -0
- package/dist/loader.js +2 -0
- package/dist/next.d.ts +2 -0
- package/dist/next.js +2 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +2 -0
- package/dist/presets/dist/boldVibrant.d.ts +6 -0
- package/dist/presets/dist/boldVibrant.js +7 -0
- package/dist/presets/dist/brutalist.d.ts +6 -0
- package/dist/presets/dist/brutalist.js +7 -0
- package/dist/presets/dist/candy.d.ts +6 -0
- package/dist/presets/dist/candy.js +7 -0
- package/dist/presets/dist/cleanMinimalist.d.ts +6 -0
- package/dist/presets/dist/cleanMinimalist.js +7 -0
- package/dist/presets/dist/corporate.d.ts +6 -0
- package/dist/presets/dist/corporate.js +7 -0
- package/dist/presets/dist/darkMoody.d.ts +6 -0
- package/dist/presets/dist/darkMoody.js +7 -0
- package/dist/presets/dist/defaultPreset.d.ts +6 -0
- package/dist/presets/dist/defaultPreset.js +68 -0
- package/dist/presets/dist/forest.d.ts +6 -0
- package/dist/presets/dist/forest.js +7 -0
- package/dist/presets/dist/highContrast.d.ts +6 -0
- package/dist/presets/dist/highContrast.js +7 -0
- package/dist/presets/dist/index.d.ts +19 -0
- package/dist/presets/dist/index.js +19 -0
- package/dist/presets/dist/lavender.d.ts +6 -0
- package/dist/presets/dist/lavender.js +7 -0
- package/dist/presets/dist/luxury.d.ts +6 -0
- package/dist/presets/dist/luxury.js +7 -0
- package/dist/presets/dist/monochrome.d.ts +6 -0
- package/dist/presets/dist/monochrome.js +7 -0
- package/dist/presets/dist/neonCyber.d.ts +6 -0
- package/dist/presets/dist/neonCyber.js +7 -0
- package/dist/presets/dist/newspaper.d.ts +6 -0
- package/dist/presets/dist/newspaper.js +7 -0
- package/dist/presets/dist/ocean.d.ts +6 -0
- package/dist/presets/dist/ocean.js +7 -0
- package/dist/presets/dist/slate.d.ts +6 -0
- package/dist/presets/dist/slate.js +7 -0
- package/dist/presets/dist/sunset.d.ts +6 -0
- package/dist/presets/dist/sunset.js +7 -0
- package/dist/presets/dist/terminal.d.ts +6 -0
- package/dist/presets/dist/terminal.js +7 -0
- package/dist/presets/dist/warmOrganic.d.ts +6 -0
- package/dist/presets/dist/warmOrganic.js +7 -0
- package/dist/presets/motion.d.ts +2 -0
- package/dist/presets/motion.js +2 -0
- package/dist/presets.d.ts +20 -0
- package/dist/presets.js +21 -0
- package/dist/remotion/dist/components/image-slide.config.js +43 -0
- package/dist/remotion/dist/components/image-slide.d.ts +20 -0
- package/dist/remotion/dist/components/image-slide.js +24 -0
- package/dist/remotion/dist/components/index.js +16 -0
- package/dist/remotion/dist/components/lower-third.config.js +54 -0
- package/dist/remotion/dist/components/lower-third.d.ts +21 -0
- package/dist/remotion/dist/components/lower-third.js +26 -0
- package/dist/remotion/dist/components/quote-card.config.js +85 -0
- package/dist/remotion/dist/components/quote-card.d.ts +21 -0
- package/dist/remotion/dist/components/quote-card.js +27 -0
- package/dist/remotion/dist/components/split-screen.config.js +90 -0
- package/dist/remotion/dist/components/split-screen.d.ts +25 -0
- package/dist/remotion/dist/components/split-screen.js +35 -0
- package/dist/remotion/dist/components/stat-card.config.js +55 -0
- package/dist/remotion/dist/components/stat-card.d.ts +19 -0
- package/dist/remotion/dist/components/stat-card.js +23 -0
- package/dist/remotion/dist/components/text-overlay.config.js +46 -0
- package/dist/remotion/dist/components/text-overlay.d.ts +17 -0
- package/dist/remotion/dist/components/text-overlay.js +16 -0
- package/dist/remotion/dist/components/title-card.config.js +56 -0
- package/dist/remotion/dist/components/title-card.d.ts +19 -0
- package/dist/remotion/dist/components/title-card.js +23 -0
- package/dist/remotion/dist/components/typing-text.config.js +57 -0
- package/dist/remotion/dist/components/typing-text.d.ts +21 -0
- package/dist/remotion/dist/components/typing-text.js +23 -0
- package/dist/remotion/dist/index.d.ts +8 -0
- package/dist/remotion/dist/index.js +8 -0
- package/dist/remotion/dist/transitions/fade.js +19 -0
- package/dist/remotion/dist/transitions/index.js +7 -0
- package/dist/remotion/dist/transitions/slide-down.js +21 -0
- package/dist/remotion/dist/transitions/slide-left.js +21 -0
- package/dist/remotion/dist/transitions/slide-right.js +21 -0
- package/dist/remotion/dist/transitions/slide-up.js +21 -0
- package/dist/remotion/dist/transitions/wipe.js +21 -0
- package/dist/remotion/dist/transitions/zoom.js +19 -0
- package/dist/remotion.d.ts +9 -0
- package/dist/remotion.js +10 -0
- package/dist/styles.d.ts +4 -0
- package/dist/styles.js +5 -0
- package/dist/transformPreset.d.ts +2 -0
- package/dist/transformPreset.js +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/utils/dist/array-utils/closestItem.d.ts +5 -0
- package/dist/utils/dist/array-utils/closestItem.js +9 -0
- package/dist/utils/dist/array-utils/removeItem.d.ts +5 -0
- package/dist/utils/dist/array-utils/removeItem.js +8 -0
- package/dist/utils/dist/component-style-defaults.d.ts +6 -0
- package/dist/utils/dist/component-style-defaults.js +68 -0
- package/dist/utils/dist/index.js +23 -0
- package/dist/utils/dist/math-utils/clamp.d.ts +13 -0
- package/dist/utils/dist/math-utils/clamp.js +14 -0
- package/dist/utils/dist/motion-utils/interpolate.d.ts +11 -0
- package/dist/utils/dist/motion-utils/interpolate.js +25 -0
- package/dist/utils/dist/object-utils/entries.d.ts +5 -0
- package/dist/utils/dist/object-utils/entries.js +6 -0
- package/dist/utils/dist/object-utils/flattenObj.d.ts +13 -0
- package/dist/utils/dist/object-utils/flattenObj.js +21 -0
- package/dist/utils/dist/object-utils/fromEntries.d.ts +5 -0
- package/dist/utils/dist/object-utils/fromEntries.js +6 -0
- package/dist/utils/dist/object-utils/keys.d.ts +5 -0
- package/dist/utils/dist/object-utils/keys.js +6 -0
- package/dist/utils/dist/object-utils/mapKeys.d.ts +6 -0
- package/dist/utils/dist/object-utils/mapKeys.js +10 -0
- package/dist/utils/dist/object-utils/mapValues.d.ts +6 -0
- package/dist/utils/dist/object-utils/mapValues.js +9 -0
- package/dist/utils/dist/string-utils/arrayToUnion.d.ts +5 -0
- package/dist/utils/dist/string-utils/arrayToUnion.js +6 -0
- package/dist/utils/dist/string-utils/capitalize.d.ts +5 -0
- package/dist/utils/dist/string-utils/capitalize.js +6 -0
- package/dist/utils/dist/string-utils/componentClassName.d.ts +26 -0
- package/dist/utils/dist/string-utils/componentClassName.js +33 -0
- package/dist/utils/dist/string-utils/createTemplate.d.ts +17 -0
- package/dist/utils/dist/string-utils/createTemplate.js +142 -0
- package/dist/utils/dist/string-utils/cssVar.d.ts +54 -0
- package/dist/utils/dist/string-utils/cssVar.js +61 -0
- package/dist/utils/dist/string-utils/cssVars.d.ts +82 -0
- package/dist/utils/dist/string-utils/cssVars.js +108 -0
- package/dist/utils/dist/string-utils/dedent.d.ts +48 -0
- package/dist/utils/dist/string-utils/dedent.js +68 -0
- package/dist/utils/dist/string-utils/indent.d.ts +5 -0
- package/dist/utils/dist/string-utils/indent.js +6 -0
- package/dist/utils/dist/string-utils/join.d.ts +6 -0
- package/dist/utils/dist/string-utils/join.js +6 -0
- package/dist/utils/dist/string-utils/kebabCase.d.ts +14 -0
- package/dist/utils/dist/string-utils/kebabCase.js +14 -0
- package/dist/utils/dist/string-utils/objectToInterface.js +6 -0
- package/dist/utils/dist/string-utils/split.d.ts +11 -0
- package/dist/utils/dist/string-utils/split.js +12 -0
- package/dist/utils/dist/string-utils/tsProperties.d.ts +30 -0
- package/dist/utils/dist/string-utils/tsProperties.js +60 -0
- package/dist/utils.d.ts +24 -0
- package/dist/utils.js +25 -0
- package/package.json +185 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { componentSlotClass, componentVariantClass } from "../../utils/dist/string-utils/componentClassName.js";
|
|
2
|
+
import "../../utils/dist/index.js";
|
|
3
|
+
import { cx, processStyleProps } from "./getStyles.js";
|
|
4
|
+
import { ELEMENT_HTML_PROPS, classifyResolvedProps } from "./resolveProps.boundaries.js";
|
|
5
|
+
//#region ../core/dist/getComponentStyles.js
|
|
6
|
+
function getRuntimeMap() {
|
|
7
|
+
if (!("document" in globalThis)) return null;
|
|
8
|
+
if (!globalThis.__UDS_META__) globalThis.__UDS_META__ = {};
|
|
9
|
+
return globalThis.__UDS_META__;
|
|
10
|
+
}
|
|
11
|
+
function nextRuntimeId() {
|
|
12
|
+
const current = globalThis.__UDS_ID_COUNTER__ ?? 1e5;
|
|
13
|
+
globalThis.__UDS_ID_COUNTER__ = current + 1;
|
|
14
|
+
return String(current);
|
|
15
|
+
}
|
|
16
|
+
function registerRuntimeMeta(id, meta) {
|
|
17
|
+
const map = getRuntimeMap();
|
|
18
|
+
if (!map) return;
|
|
19
|
+
map[id] = meta;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a type-safe style resolver for a slot-based component.
|
|
23
|
+
*
|
|
24
|
+
* Returns a function that maps variant selections to per-slot class names.
|
|
25
|
+
* Pure string concatenation — no hooks, no context, no side effects.
|
|
26
|
+
*
|
|
27
|
+
* The returned function also has a `.resolve()` method that handles
|
|
28
|
+
* the full prop separation pipeline for configurable components.
|
|
29
|
+
*
|
|
30
|
+
* @param componentName - Registry component name
|
|
31
|
+
* @param slots - Array of slot names
|
|
32
|
+
* @param element - Optional HTML element tag for element-specific prop forwarding
|
|
33
|
+
*/
|
|
34
|
+
function createComponentStyler(componentName, slots, element, variants) {
|
|
35
|
+
const elementProps = element ? ELEMENT_HTML_PROPS[element] : void 0;
|
|
36
|
+
const variantSet = variants ? new Set(variants) : null;
|
|
37
|
+
const styler = ((variants = {}) => {
|
|
38
|
+
const passed = variants;
|
|
39
|
+
const result = {};
|
|
40
|
+
for (const slot of slots) {
|
|
41
|
+
const parts = [componentSlotClass(componentName, slot)];
|
|
42
|
+
for (const [axis, value] of Object.entries(passed)) {
|
|
43
|
+
if (axis.startsWith("data-uds")) continue;
|
|
44
|
+
if (value) parts.push(componentVariantClass(componentName, slot, axis, value));
|
|
45
|
+
}
|
|
46
|
+
result[slot] = parts.join(" ");
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
});
|
|
50
|
+
styler.resolve = (allProps) => {
|
|
51
|
+
const { _html, className: userClassName, ...rest } = allProps;
|
|
52
|
+
const internalUdsId = typeof rest["data-uds-id"] === "string" ? rest["data-uds-id"] : void 0;
|
|
53
|
+
const internalUdsSource = typeof rest["data-uds-source"] === "string" ? rest["data-uds-source"] : void 0;
|
|
54
|
+
delete rest["data-uds-id"];
|
|
55
|
+
delete rest["data-uds-source"];
|
|
56
|
+
const [styleClassName, remaining] = processStyleProps(rest, { extractNativeProps: true });
|
|
57
|
+
const { htmlProps, variantProps } = classifyResolvedProps({
|
|
58
|
+
remaining,
|
|
59
|
+
variantSet,
|
|
60
|
+
elementProps
|
|
61
|
+
});
|
|
62
|
+
const classes = styler(variantProps);
|
|
63
|
+
if (_html && typeof _html === "object") Object.assign(htmlProps, _html);
|
|
64
|
+
const rootClass = classes.root;
|
|
65
|
+
const merged = cx(rootClass, styleClassName, remaining.className, userClassName) || void 0;
|
|
66
|
+
const udsId = internalUdsId ?? nextRuntimeId();
|
|
67
|
+
htmlProps["data-uds-slot"] = "root";
|
|
68
|
+
htmlProps["data-uds-component"] = String(componentName);
|
|
69
|
+
htmlProps["data-uds-id"] = udsId;
|
|
70
|
+
registerRuntimeMeta(udsId, {
|
|
71
|
+
c: String(componentName),
|
|
72
|
+
s: "root",
|
|
73
|
+
v: variantProps,
|
|
74
|
+
src: internalUdsSource
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
classes,
|
|
78
|
+
htmlProps,
|
|
79
|
+
className: merged
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
return styler;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { createComponentStyler };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ClassValue } from "clsx";
|
|
2
|
+
import { ModifierProp, ModifierProps, StyleAndModifierProps, StyleProps } from "@uds/types";
|
|
3
|
+
|
|
4
|
+
//#region ../core/dist/getStyles.d.ts
|
|
5
|
+
//#region src/getStyles.d.ts
|
|
6
|
+
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
7
|
+
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
8
|
+
declare function toCamelCase(str: string): string;
|
|
9
|
+
declare function createVariants<K extends Record<string, StyleAndModifierProps>>(variants: K): K;
|
|
10
|
+
declare function cx(...inputs: ClassValue[]): string;
|
|
11
|
+
interface ProcessStylesParams {
|
|
12
|
+
extractNativeProps?: boolean;
|
|
13
|
+
modifier?: ModifierProp;
|
|
14
|
+
/**
|
|
15
|
+
* Existing className string. When provided, any style prop that is already
|
|
16
|
+
* represented by a class in this string will be skipped. This prevents
|
|
17
|
+
* component defaults from conflicting with user-provided values
|
|
18
|
+
* (e.g. HStack defaulting alignItems='center' when user set 'end').
|
|
19
|
+
*/
|
|
20
|
+
existingClassName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Config-driven modifier prefix → CSS selector map.
|
|
23
|
+
* Used by ensureArbitraryRule to generate correct CSS for custom modifiers
|
|
24
|
+
* (e.g. { "dark:": ".dark", "sm:": "@media (min-width: 640px)" }).
|
|
25
|
+
*
|
|
26
|
+
* Built-in pseudo modifiers (hover:, focus:, etc.) are handled automatically.
|
|
27
|
+
* Only needed for config modes and custom modifiers.
|
|
28
|
+
*/
|
|
29
|
+
modifierSelectors?: Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
declare function processStyleProps(props?: StyleProps, opts?: ProcessStylesParams): readonly [string, Record<string, unknown>];
|
|
32
|
+
interface GetStylesParams extends StyleProps, ModifierProps {
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Consumer facing function that takes style props and returns a className.
|
|
36
|
+
* Unlike processStyleProps (runtime), this produces Tailwind-compatible
|
|
37
|
+
* class names for arbitrary bracket values (e.g. `[768px]` → `max-w-[768px]`)
|
|
38
|
+
* so they can be included in the CSS safelist.
|
|
39
|
+
*/
|
|
40
|
+
declare function getStyles(props: GetStylesParams): string;
|
|
41
|
+
declare function getVariantClassName(componentName: string, variant: string | undefined): string; //#endregion
|
|
42
|
+
//#endregion
|
|
43
|
+
export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
2
|
+
import { componentSlotClass } from "../../utils/dist/string-utils/componentClassName.js";
|
|
3
|
+
import "../../utils/dist/index.js";
|
|
4
|
+
import { expandMacros, getMacroConfig } from "./macros.js";
|
|
5
|
+
import { colorPropToOpacityProp, modifierMappings, propMappings } from "./propMappings.js";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
//#region ../core/dist/getStyles.js
|
|
8
|
+
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
9
|
+
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
10
|
+
function toCamelCase(str) {
|
|
11
|
+
if (str.startsWith("--")) return str;
|
|
12
|
+
return str.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase());
|
|
13
|
+
}
|
|
14
|
+
const _dynRuleCache = /* @__PURE__ */ new Set();
|
|
15
|
+
let _dynSheet = null;
|
|
16
|
+
/**
|
|
17
|
+
* Built-in modifier prefix → CSS pseudo-selector, derived from modifierMappings.
|
|
18
|
+
* e.g. "hover:" → ":hover", "focus-visible:" → ":focus-visible"
|
|
19
|
+
*
|
|
20
|
+
* Complex modifiers (data attributes, pseudo-elements, at-rules) are excluded —
|
|
21
|
+
* they're unlikely to appear with arbitrary values at runtime.
|
|
22
|
+
*/
|
|
23
|
+
const _builtinPseudoMap = {};
|
|
24
|
+
for (const prefix of Object.values(modifierMappings)) {
|
|
25
|
+
if (prefix.startsWith("data-[") || prefix.startsWith("aria-") || prefix.includes("::") || prefix.includes("*")) continue;
|
|
26
|
+
_builtinPseudoMap[prefix] = `:${prefix.slice(0, -1)}`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolve a single modifier part to its CSS selector contribution.
|
|
30
|
+
*
|
|
31
|
+
* @param modifierSelectors - Config-driven map of custom modifier prefix → CSS selector
|
|
32
|
+
* (e.g. { "dark:": ".dark", "sm:": "@media (min-width: 640px)" }).
|
|
33
|
+
* Passed through from processStyleProps opts.
|
|
34
|
+
*/
|
|
35
|
+
/** @internal Exported for testing only. */
|
|
36
|
+
function resolveModifierPart(part, modifierSelectors) {
|
|
37
|
+
const pseudo = _builtinPseudoMap[part];
|
|
38
|
+
if (pseudo) return {
|
|
39
|
+
type: "pseudo",
|
|
40
|
+
selector: pseudo
|
|
41
|
+
};
|
|
42
|
+
const custom = modifierSelectors?.[part];
|
|
43
|
+
if (custom) return {
|
|
44
|
+
type: "ancestor",
|
|
45
|
+
selector: custom
|
|
46
|
+
};
|
|
47
|
+
const name = part.slice(0, -1);
|
|
48
|
+
if (name) return {
|
|
49
|
+
type: "ancestor",
|
|
50
|
+
selector: `.${name}`
|
|
51
|
+
};
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Inject a CSS rule for an arbitrary value class if it doesn't already exist.
|
|
56
|
+
* Handles both top-level (bg-[#ff0000]) and modifier (hover:bg-[#00cc6e]) classes.
|
|
57
|
+
*
|
|
58
|
+
* @param modifierSelectors - Config-driven modifier → CSS selector map, threaded
|
|
59
|
+
* from processStyleProps. Enables config-aware CSS rule generation.
|
|
60
|
+
*/
|
|
61
|
+
function ensureArbitraryRule(className, modifier, cssProperty, cssValue, modifierSelectors) {
|
|
62
|
+
if (_dynRuleCache.has(className)) return;
|
|
63
|
+
_dynRuleCache.add(className);
|
|
64
|
+
if (typeof document === "undefined") return;
|
|
65
|
+
if (!_dynSheet) {
|
|
66
|
+
const el = document.createElement("style");
|
|
67
|
+
el.setAttribute("data-uds-dynamic-arb", "");
|
|
68
|
+
document.head.appendChild(el);
|
|
69
|
+
_dynSheet = el.sheet;
|
|
70
|
+
}
|
|
71
|
+
let ancestorParts = "";
|
|
72
|
+
let pseudoParts = "";
|
|
73
|
+
if (modifier) {
|
|
74
|
+
const parts = modifier.split(":").filter(Boolean).map((p) => `${p}:`);
|
|
75
|
+
for (const part of parts) {
|
|
76
|
+
const resolved = resolveModifierPart(part, modifierSelectors);
|
|
77
|
+
if (!resolved) continue;
|
|
78
|
+
if (resolved.type === "ancestor") ancestorParts += `${resolved.selector} `;
|
|
79
|
+
else pseudoParts += resolved.selector;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const escaped = CSS.escape(className);
|
|
83
|
+
const rule = `${ancestorParts}.${escaped}${pseudoParts} { ${cssProperty}: ${cssValue}; }`;
|
|
84
|
+
try {
|
|
85
|
+
_dynSheet.insertRule(rule, _dynSheet.cssRules.length);
|
|
86
|
+
} catch {}
|
|
87
|
+
}
|
|
88
|
+
/** Detect arbitrary values like `[#ff0000]` or `[250px]` */
|
|
89
|
+
function parseArbitraryValue(val, propName) {
|
|
90
|
+
if (typeof val !== "string") return null;
|
|
91
|
+
const match = val.match(/^\[(.+)\]$/);
|
|
92
|
+
if (!match) return null;
|
|
93
|
+
const mapping = propMappings[propName];
|
|
94
|
+
if (!mapping?.cssProperty && !mapping?.arbitraryValueTemplate) return null;
|
|
95
|
+
const rawValue = match[1];
|
|
96
|
+
if (mapping.arbitraryValueTemplate) {
|
|
97
|
+
const { cssProperty, valueTemplate } = mapping.arbitraryValueTemplate;
|
|
98
|
+
return {
|
|
99
|
+
cssValue: valueTemplate.replace("%s", rawValue),
|
|
100
|
+
cssProperty: toCamelCase(cssProperty)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
cssValue: rawValue,
|
|
105
|
+
cssProperty: toCamelCase(mapping.cssProperty ?? "")
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Set of opacity prop names — these are consumed by their parent color prop, not processed independently */
|
|
109
|
+
const opacityPropSet = new Set(Object.values(colorPropToOpacityProp));
|
|
110
|
+
function createVariants(variants) {
|
|
111
|
+
return variants;
|
|
112
|
+
}
|
|
113
|
+
const parse = (prefix, value) => {
|
|
114
|
+
if (value === "") return prefix;
|
|
115
|
+
return (prefix === value ? String(value) : `${prefix}-${value}`).replace(/[./]/g, "_");
|
|
116
|
+
};
|
|
117
|
+
const classnames = {};
|
|
118
|
+
const styleOptionsByProp = {};
|
|
119
|
+
for (const entry of Object.values(stylePropsTwMap)) {
|
|
120
|
+
const [propName, option] = Object.entries(entry)[0] ?? [];
|
|
121
|
+
if (!propName || typeof option !== "string") continue;
|
|
122
|
+
if (!styleOptionsByProp[propName]) styleOptionsByProp[propName] = /* @__PURE__ */ new Set();
|
|
123
|
+
styleOptionsByProp[propName].add(option);
|
|
124
|
+
}
|
|
125
|
+
for (const [propName, mapping] of Object.entries(propMappings)) {
|
|
126
|
+
const options = styleOptionsByProp[propName] ?? /* @__PURE__ */ new Set();
|
|
127
|
+
const hasBoolean = options.has("boolean");
|
|
128
|
+
const isNoPrefix = mapping.classPrefix === "no-prefix";
|
|
129
|
+
const handler = (val) => {
|
|
130
|
+
if (hasBoolean && options.size === 1) return val === true ? mapping.classPrefix : "";
|
|
131
|
+
if (hasBoolean) return val === true ? mapping.classPrefix : parse(mapping.classPrefix, val);
|
|
132
|
+
if (isNoPrefix) return String(val);
|
|
133
|
+
return parse(mapping.classPrefix, val);
|
|
134
|
+
};
|
|
135
|
+
classnames[propName] = handler;
|
|
136
|
+
}
|
|
137
|
+
const colorPropCssInfo = {};
|
|
138
|
+
for (const [colorProp] of Object.entries(colorPropToOpacityProp)) {
|
|
139
|
+
const mapping = propMappings[colorProp];
|
|
140
|
+
if (mapping?.cssProperty && mapping.defaultVarPrefix) colorPropCssInfo[colorProp] = {
|
|
141
|
+
cssProperty: mapping.cssProperty,
|
|
142
|
+
varPrefix: mapping.defaultVarPrefix
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function cx(...inputs) {
|
|
146
|
+
return clsx(inputs);
|
|
147
|
+
}
|
|
148
|
+
function processStyleProps(props = {}, opts = {}) {
|
|
149
|
+
const macroConfig = getMacroConfig();
|
|
150
|
+
const hasMacros = Object.keys(macroConfig).length > 0;
|
|
151
|
+
let effectiveProps = props;
|
|
152
|
+
let macroMarkerClasses;
|
|
153
|
+
if (hasMacros && !opts.modifier) {
|
|
154
|
+
const { expanded, markerClasses } = expandMacros(props, macroConfig);
|
|
155
|
+
effectiveProps = expanded;
|
|
156
|
+
if (markerClasses.length > 0) macroMarkerClasses = markerClasses;
|
|
157
|
+
}
|
|
158
|
+
const coveredProps = opts.existingClassName ? getPropsFromClassName(opts.existingClassName) : void 0;
|
|
159
|
+
const classnameParts = [];
|
|
160
|
+
const nativeProps = {};
|
|
161
|
+
let inlineStyles;
|
|
162
|
+
if (macroMarkerClasses) classnameParts.push(...macroMarkerClasses);
|
|
163
|
+
for (const propKey in effectiveProps) {
|
|
164
|
+
if (!Object.hasOwn(effectiveProps, propKey)) continue;
|
|
165
|
+
const propValue = effectiveProps[propKey];
|
|
166
|
+
if (propValue === void 0) continue;
|
|
167
|
+
const modifierName = modifierMappings[propKey];
|
|
168
|
+
if (modifierName) {
|
|
169
|
+
const combinedModifier = opts.modifier ? `${opts.modifier}${modifierName}` : modifierName;
|
|
170
|
+
const [newClassName] = processStyleProps(propValue, {
|
|
171
|
+
...opts,
|
|
172
|
+
modifier: combinedModifier
|
|
173
|
+
});
|
|
174
|
+
if (newClassName) classnameParts.push(newClassName);
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (propKey.startsWith("_")) {
|
|
178
|
+
const customModifierName = `${propKey.slice(1)}:`;
|
|
179
|
+
const combinedModifier = opts.modifier ? `${opts.modifier}${customModifierName}` : customModifierName;
|
|
180
|
+
const [newClassName] = processStyleProps(propValue, {
|
|
181
|
+
...opts,
|
|
182
|
+
modifier: combinedModifier
|
|
183
|
+
});
|
|
184
|
+
if (newClassName) classnameParts.push(newClassName);
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (coveredProps?.has(propKey)) continue;
|
|
188
|
+
{
|
|
189
|
+
const arbitrary = parseArbitraryValue(propValue, propKey);
|
|
190
|
+
if (arbitrary) {
|
|
191
|
+
const opacityPropName = colorPropToOpacityProp[propKey];
|
|
192
|
+
if (opacityPropName) {
|
|
193
|
+
const opacityValue = effectiveProps[opacityPropName];
|
|
194
|
+
if (opacityValue !== void 0) arbitrary.cssValue = `color-mix(in srgb, ${arbitrary.cssValue} ${opacityValue}%, transparent)`;
|
|
195
|
+
}
|
|
196
|
+
const handler = classnames[propKey];
|
|
197
|
+
if (handler) {
|
|
198
|
+
const baseClass = handler(propValue);
|
|
199
|
+
if (baseClass) {
|
|
200
|
+
const opacityPropName = colorPropToOpacityProp[propKey];
|
|
201
|
+
const opacityValue = opacityPropName ? effectiveProps[opacityPropName] : void 0;
|
|
202
|
+
const classWithOpacity = `${baseClass}${opacityValue !== void 0 ? `/${opacityValue}` : ""}`;
|
|
203
|
+
const fullClass = opts.modifier ? `${opts.modifier}${classWithOpacity}` : classWithOpacity;
|
|
204
|
+
const kebabProp = arbitrary.cssProperty.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
205
|
+
ensureArbitraryRule(fullClass, opts.modifier ?? null, kebabProp, arbitrary.cssValue, opts.modifierSelectors);
|
|
206
|
+
classnameParts.push(fullClass);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (opacityPropSet.has(propKey)) continue;
|
|
213
|
+
const handler = classnames[propKey];
|
|
214
|
+
if (handler) {
|
|
215
|
+
const opacityPropName = colorPropToOpacityProp[propKey];
|
|
216
|
+
if (opacityPropName && !opts.modifier && typeof propValue === "string") {
|
|
217
|
+
let opacityValue = effectiveProps[opacityPropName];
|
|
218
|
+
let baseToken = propValue;
|
|
219
|
+
if (opacityValue === void 0) {
|
|
220
|
+
const slashIdx = propValue.lastIndexOf("/");
|
|
221
|
+
if (slashIdx > 0 && /^\d{1,3}$/.test(propValue.slice(slashIdx + 1))) {
|
|
222
|
+
baseToken = propValue.slice(0, slashIdx);
|
|
223
|
+
opacityValue = propValue.slice(slashIdx + 1);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (opacityValue !== void 0) {
|
|
227
|
+
const cssInfo = colorPropCssInfo[propKey];
|
|
228
|
+
if (cssInfo) {
|
|
229
|
+
const safeToken = baseToken.replace(/[./]/g, "_");
|
|
230
|
+
const varName = `--uds-${cssInfo.varPrefix}-${safeToken}`;
|
|
231
|
+
const cssProp = toCamelCase(cssInfo.cssProperty);
|
|
232
|
+
inlineStyles ??= {};
|
|
233
|
+
inlineStyles[cssProp] = `color-mix(in srgb, var(${varName}) ${opacityValue}%, transparent)`;
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const propClassname = String(handler(propValue));
|
|
239
|
+
if (propClassname) {
|
|
240
|
+
const finalClassname = opts.modifier ? `${opts.modifier}${propClassname}` : propClassname;
|
|
241
|
+
classnameParts.push(finalClassname);
|
|
242
|
+
}
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if (opts.extractNativeProps) nativeProps[propKey] = propValue;
|
|
246
|
+
}
|
|
247
|
+
if (inlineStyles && opts.extractNativeProps) nativeProps.style = nativeProps.style ? {
|
|
248
|
+
...nativeProps.style,
|
|
249
|
+
...inlineStyles
|
|
250
|
+
} : inlineStyles;
|
|
251
|
+
return [clsx(classnameParts.join(" ")), nativeProps];
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Extract the set of style prop names represented by classes in a className string.
|
|
255
|
+
* Uses the reverse map (stylePropsTwMap) to identify which props are covered.
|
|
256
|
+
*/
|
|
257
|
+
function getPropsFromClassName(className) {
|
|
258
|
+
const props = /* @__PURE__ */ new Set();
|
|
259
|
+
for (const token of className.split(" ")) {
|
|
260
|
+
if (!token) continue;
|
|
261
|
+
const entry = stylePropsTwMap[token];
|
|
262
|
+
if (!entry) continue;
|
|
263
|
+
const propName = Object.keys(entry)[0];
|
|
264
|
+
if (propName) props.add(propName);
|
|
265
|
+
}
|
|
266
|
+
return props;
|
|
267
|
+
}
|
|
268
|
+
/** Consumer facing function that takes style props and returns a className.
|
|
269
|
+
* Unlike processStyleProps (runtime), this produces Tailwind-compatible
|
|
270
|
+
* class names for arbitrary bracket values (e.g. `[768px]` → `max-w-[768px]`)
|
|
271
|
+
* so they can be included in the CSS safelist.
|
|
272
|
+
*/
|
|
273
|
+
function getStyles(props) {
|
|
274
|
+
const processed = {};
|
|
275
|
+
const arbitraryParts = [];
|
|
276
|
+
for (const key in props) {
|
|
277
|
+
if (!Object.hasOwn(props, key)) continue;
|
|
278
|
+
const val = props[key];
|
|
279
|
+
if (typeof val === "string" && /^\[.+\](?:\/\d+)?$/.test(val)) {
|
|
280
|
+
const mapping = propMappings[key];
|
|
281
|
+
if (mapping?.classPrefix && mapping.classPrefix !== "no-prefix") {
|
|
282
|
+
arbitraryParts.push(`${mapping.classPrefix}-${val}`);
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
processed[key] = val;
|
|
287
|
+
}
|
|
288
|
+
for (const [colorProp, opacityPropName] of Object.entries(colorPropToOpacityProp)) {
|
|
289
|
+
const opacityValue = processed[opacityPropName];
|
|
290
|
+
if (opacityValue !== void 0 && processed[colorProp] !== void 0) {
|
|
291
|
+
processed[colorProp] = `${processed[colorProp]}/${opacityValue}`;
|
|
292
|
+
delete processed[opacityPropName];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
const [finalClassName] = processStyleProps(processed, { extractNativeProps: false });
|
|
296
|
+
if (arbitraryParts.length === 0) return finalClassName;
|
|
297
|
+
return [finalClassName, ...arbitraryParts].filter(Boolean).join(" ");
|
|
298
|
+
}
|
|
299
|
+
function getVariantClassName(componentName, variant) {
|
|
300
|
+
const base = componentSlotClass(componentName, "root");
|
|
301
|
+
if (!variant) return base;
|
|
302
|
+
return `${base} ${base}--variant-${variant}`;
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createComponent } from "./createComponent.js";
|
|
2
|
+
import { ComponentExample, createComponentExample } from "./createComponentExample.js";
|
|
3
|
+
import { createProvider } from "./createProvider.js";
|
|
4
|
+
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
5
|
+
import { createComponentStyler } from "./getComponentStyles.js";
|
|
6
|
+
import { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase } from "./getStyles.js";
|
|
7
|
+
import { expandMacros, getMacroConfig, setMacroConfig } from "./macros.js";
|
|
8
|
+
import { ConfigurablePropertyEntry, CssVariablePrefixEntry, ModifierEntry, PropMapping, colorPropToOpacityProp, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, modifierMappings, propMappings } from "./propMappings.js";
|
|
9
|
+
import { resolveMotionState } from "./resolveMotionState.js";
|
|
10
|
+
import { TransformedMotionProps, transformPreset } from "./transformPreset.js";
|
|
11
|
+
import { withDefaultStyleProps } from "./withDefaultStyleProps.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./generated/stylePropsTwMap.js";
|
|
2
|
+
import "./macros.js";
|
|
3
|
+
import "./propMappings.js";
|
|
4
|
+
import "./getStyles.js";
|
|
5
|
+
import "./getComponentStyles.js";
|
|
6
|
+
import "./createComponent.js";
|
|
7
|
+
import "./createComponentExample.js";
|
|
8
|
+
import "./createProvider.js";
|
|
9
|
+
import "./resolveMotionState.js";
|
|
10
|
+
import "./transformPreset.js";
|
|
11
|
+
import "./withDefaultStyleProps.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MacroConfig } from "@uds/types";
|
|
2
|
+
|
|
3
|
+
//#region ../core/dist/macros.d.ts
|
|
4
|
+
//#region src/macros.d.ts
|
|
5
|
+
/** Set the macro config (called by loader at build time) */
|
|
6
|
+
declare function setMacroConfig(config: MacroConfig): void;
|
|
7
|
+
/** Get the current macro config */
|
|
8
|
+
declare function getMacroConfig(): MacroConfig;
|
|
9
|
+
/**
|
|
10
|
+
* Expand macro props into their constituent style props + marker classes.
|
|
11
|
+
*
|
|
12
|
+
* - Macros are lowest priority: explicit props always win
|
|
13
|
+
* - Nested macros are supported (a macro value can reference another macro)
|
|
14
|
+
* - Circular references are detected and throw
|
|
15
|
+
* - Marker classes (e.g. "elevation-elevation_1") are returned for modifier targeting
|
|
16
|
+
*/
|
|
17
|
+
declare function expandMacros(props: Record<string, unknown>, config?: MacroConfig): {
|
|
18
|
+
expanded: Record<string, unknown>;
|
|
19
|
+
markerClasses: string[];
|
|
20
|
+
}; //#endregion
|
|
21
|
+
//#endregion
|
|
22
|
+
export { expandMacros, getMacroConfig, setMacroConfig };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
|
|
2
|
+
import "../../utils/dist/index.js";
|
|
3
|
+
//#region ../core/dist/macros.js
|
|
4
|
+
/**
|
|
5
|
+
* Runtime macro config — set by the loader/codegen at build time.
|
|
6
|
+
* Maps macro prop names to their value → style-bag definitions.
|
|
7
|
+
*/
|
|
8
|
+
let macroConfig = {};
|
|
9
|
+
/** Set the macro config (called by loader at build time) */
|
|
10
|
+
function setMacroConfig(config) {
|
|
11
|
+
macroConfig = config;
|
|
12
|
+
}
|
|
13
|
+
/** Get the current macro config */
|
|
14
|
+
function getMacroConfig() {
|
|
15
|
+
return macroConfig;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Expand macro props into their constituent style props + marker classes.
|
|
19
|
+
*
|
|
20
|
+
* - Macros are lowest priority: explicit props always win
|
|
21
|
+
* - Nested macros are supported (a macro value can reference another macro)
|
|
22
|
+
* - Circular references are detected and throw
|
|
23
|
+
* - Marker classes (e.g. "elevation-elevation_1") are returned for modifier targeting
|
|
24
|
+
*/
|
|
25
|
+
function expandMacros(props, config = macroConfig) {
|
|
26
|
+
const expanded = {};
|
|
27
|
+
const markers = [];
|
|
28
|
+
const seen = /* @__PURE__ */ new Set();
|
|
29
|
+
function expand(key, value) {
|
|
30
|
+
if (key in config && typeof value === "string") {
|
|
31
|
+
if (seen.has(key)) throw new Error(`Circular macro: ${[...seen, key].join(" → ")}`);
|
|
32
|
+
seen.add(key);
|
|
33
|
+
markers.push(`${key}-${safeTokenName(value)}`);
|
|
34
|
+
const bag = config[key][value];
|
|
35
|
+
if (bag) {
|
|
36
|
+
for (const [k, v] of Object.entries(bag)) if (!(k in expanded)) expand(k, v);
|
|
37
|
+
}
|
|
38
|
+
seen.delete(key);
|
|
39
|
+
} else if (!(key in expanded)) expanded[key] = value;
|
|
40
|
+
}
|
|
41
|
+
for (const [key, value] of Object.entries(props)) if (key in config) expand(key, value);
|
|
42
|
+
for (const [key, value] of Object.entries(props)) if (!(key in config)) expanded[key] = value;
|
|
43
|
+
return {
|
|
44
|
+
expanded,
|
|
45
|
+
markerClasses: markers
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { expandMacros, getMacroConfig, setMacroConfig };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ConfigurableProp, ModifierProp, StyleProp } from "@uds/types";
|
|
2
|
+
|
|
3
|
+
//#region ../core/dist/propMappings.d.ts
|
|
4
|
+
//#region src/propMappings.d.ts
|
|
5
|
+
interface PropMapping {
|
|
6
|
+
/** Class name prefix for runtime class generation. 'no-prefix' means value IS the class. */
|
|
7
|
+
classPrefix: string;
|
|
8
|
+
/** CSS property name (for @utility directive generation). Only needed for token-based props. */
|
|
9
|
+
cssProperty?: string;
|
|
10
|
+
/** CSS variable namespace for tokens. Only needed for token-based (configurable) props. */
|
|
11
|
+
defaultVarPrefix?: string;
|
|
12
|
+
/** Module augmentation interface name. Only needed for configurable props. */
|
|
13
|
+
augmentType?: string;
|
|
14
|
+
/** Known literal values for functional @utility generation. Used for props with cssProperty but no defaultVarPrefix. */
|
|
15
|
+
literalValues?: string[];
|
|
16
|
+
/** Alternate CSS property for component configs (directValues mode).
|
|
17
|
+
* Use when the utility cssProperty differs from the CSS shorthand needed for direct values.
|
|
18
|
+
* e.g. transition utility maps to 'transition-property', but direct values need 'transition'. */
|
|
19
|
+
directCssProperty?: string;
|
|
20
|
+
/** Template for generating inline style values from arbitrary bracket values.
|
|
21
|
+
* When present, arbitrary values like `[3.5px]` produce inline styles instead of Tailwind classes.
|
|
22
|
+
* `cssProperty` is the CSS property name (kebab-case), `valueTemplate` uses `%s` as value placeholder.
|
|
23
|
+
* e.g. { cssProperty: 'transform', valueTemplate: 'translateX(%s)' } */
|
|
24
|
+
arbitraryValueTemplate?: {
|
|
25
|
+
cssProperty: string;
|
|
26
|
+
valueTemplate: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Exclude className — it's passed through, not mapped to a utility class */
|
|
30
|
+
type MappedStyleProp = Exclude<StyleProp, 'className'>;
|
|
31
|
+
declare const propMappings: Record<MappedStyleProp, PropMapping>;
|
|
32
|
+
/**
|
|
33
|
+
* Built-in modifier mappings (pseudo-classes, pseudo-elements, etc.).
|
|
34
|
+
* Custom modifiers from defineModes() are handled dynamically in the runtime.
|
|
35
|
+
*/
|
|
36
|
+
declare const modifierMappings: Record<ModifierProp, string>;
|
|
37
|
+
/** Look up a PropMapping by ConfigurableProp name */
|
|
38
|
+
declare function getConfigurablePropMapping(prop: ConfigurableProp): PropMapping | undefined;
|
|
39
|
+
interface ConfigurablePropertyEntry {
|
|
40
|
+
property: string;
|
|
41
|
+
subProperties: string[];
|
|
42
|
+
augmentType: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Derives the configurable properties table from propMappings.
|
|
46
|
+
* Groups props by augmentType — the primary prop is the one matching
|
|
47
|
+
* a ConfigurableProp name, the rest are sub-properties.
|
|
48
|
+
*/
|
|
49
|
+
declare function getConfigurableProperties(): ConfigurablePropertyEntry[];
|
|
50
|
+
interface CssVariablePrefixEntry {
|
|
51
|
+
property: string;
|
|
52
|
+
cssPrefix: string;
|
|
53
|
+
exampleVariable: string;
|
|
54
|
+
exampleUtility: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Derives the CSS variable prefix table from propMappings.
|
|
58
|
+
* Only includes props that have both cssProperty and defaultVarPrefix.
|
|
59
|
+
* Deduplicates by defaultVarPrefix so each namespace appears once.
|
|
60
|
+
*/
|
|
61
|
+
declare function getCssVariablePrefixes(): CssVariablePrefixEntry[];
|
|
62
|
+
interface ModifierEntry {
|
|
63
|
+
prop: string;
|
|
64
|
+
cssSelector: string;
|
|
65
|
+
category: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Maps each color prop name to its corresponding opacity prop name.
|
|
70
|
+
* Used by runtime (getStyles) and loader (style-transform) to merge
|
|
71
|
+
* a color value with its opacity before class generation.
|
|
72
|
+
*
|
|
73
|
+
* e.g. `bg="primary"` + `bgOpacity="75"` → class `bg-primary_75`
|
|
74
|
+
*/
|
|
75
|
+
declare const colorPropToOpacityProp: Record<string, string>; //#endregion
|
|
76
|
+
//#endregion
|
|
77
|
+
export { ConfigurablePropertyEntry, CssVariablePrefixEntry, ModifierEntry, PropMapping, colorPropToOpacityProp, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, modifierMappings, propMappings };
|