@yahoo/uds-v5-wip 1.60.0 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen/dist/loader/getLoaderArtifacts.js +2 -0
- package/dist/config/dist/Props.d.ts +161 -25
- package/dist/config/dist/bindRender.d.ts +16 -0
- package/dist/config/dist/bindRender.js +310 -0
- package/dist/config/dist/className.d.ts +54 -0
- package/dist/config/dist/className.js +77 -0
- package/dist/config/dist/component-config.d.ts +674 -161
- package/dist/config/dist/component-config.js +163 -0
- package/dist/config/dist/component-refs.d.ts +41 -18
- package/dist/config/dist/createConfig.d.ts +140 -59
- package/dist/config/dist/createConfig.js +95 -217
- package/dist/config/dist/createStyler.d.ts +35 -0
- package/dist/config/dist/createStyler.js +93 -0
- package/dist/config/dist/defineComponent.d.ts +297 -4
- package/dist/config/dist/defineComponent.js +264 -2
- package/dist/config/dist/defineCompositeStyle.d.ts +93 -0
- package/dist/config/dist/defineCompositeStyle.js +18 -0
- package/dist/config/dist/defineMotionConfig.d.ts +152 -0
- package/dist/config/dist/definePreview.d.ts +45 -0
- package/dist/config/dist/definePreview.js +35 -0
- package/dist/config/dist/defineStyleProp.d.ts +199 -3
- package/dist/config/dist/defineStyleProp.js +3 -2
- package/dist/config/dist/index.d.ts +20 -11
- package/dist/config/dist/index.js +8 -4
- package/dist/config/dist/merge-utils.js +51 -0
- package/dist/config/dist/propertyAcceptedTypes.d.ts +19 -0
- package/dist/config/dist/refs.d.ts +85 -0
- package/dist/config/dist/refs.js +92 -47
- package/dist/config/dist/resolveCompoundProps.d.ts +65 -0
- package/dist/config/dist/resolveCompoundProps.js +120 -0
- package/dist/config/dist/resolveStyleProp.d.ts +72 -3
- package/dist/config/dist/resolveStyleProp.js +68 -43
- package/dist/config/dist/runtime-registry.js +30 -2
- package/dist/config/dist/serialize.d.ts +8 -34
- package/dist/config/dist/serialize.js +10 -71
- package/dist/config/dist/sniffTokenType.d.ts +7 -0
- package/dist/config/dist/sniffTokenType.js +67 -0
- package/dist/config/dist/style-prop-runtime.d.ts +75 -1
- package/dist/config/dist/style-prop-runtime.js +390 -0
- package/dist/config/dist/types/css-properties.d.ts +223 -0
- package/dist/config/dist/types/css-values.d.ts +2 -1
- package/dist/config/dist/types.d.ts +14 -3
- package/dist/config.d.ts +21 -1560
- package/dist/config.js +15 -20
- package/dist/loader/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/loader/dist/index.d.ts +2 -0
- package/dist/loader/dist/index.js +3 -0
- package/dist/loader/dist/loader/artifacts.js +2 -2
- package/dist/loader/dist/loader/babel-utils.js +1 -29
- package/dist/loader/dist/loader/internal-meta.js +38 -1
- package/dist/loader/dist/loader/lower-new-api-primitive.js +176 -14
- package/dist/loader/dist/loader.d.ts +29 -1
- package/dist/loader/dist/loader.js +71 -309
- package/dist/loader/dist/next.d.ts +2 -1
- package/dist/loader/dist/transform-runner.js +14 -0
- package/dist/loader/dist/unplugin.d.ts +27 -0
- package/dist/loader/dist/unplugin.js +52 -0
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -51
- package/dist/components/accordion.config.d.ts +0 -2
- package/dist/components/accordion.config.js +0 -2
- package/dist/components/accordion.d.ts +0 -2
- package/dist/components/accordion.js +0 -2
- package/dist/components/alert.config.d.ts +0 -2
- package/dist/components/alert.config.js +0 -2
- package/dist/components/alert.d.ts +0 -2
- package/dist/components/alert.js +0 -2
- package/dist/components/anchor.config.d.ts +0 -2
- package/dist/components/anchor.config.js +0 -2
- package/dist/components/anchor.d.ts +0 -2
- package/dist/components/anchor.js +0 -2
- package/dist/components/article.d.ts +0 -2
- package/dist/components/article.js +0 -2
- package/dist/components/aside.d.ts +0 -2
- package/dist/components/aside.js +0 -2
- package/dist/components/avatar-group.config.d.ts +0 -2
- package/dist/components/avatar-group.config.js +0 -2
- package/dist/components/avatar-group.d.ts +0 -2
- package/dist/components/avatar-group.js +0 -2
- package/dist/components/avatar.config.d.ts +0 -2
- package/dist/components/avatar.config.js +0 -2
- package/dist/components/avatar.d.ts +0 -2
- package/dist/components/avatar.js +0 -2
- package/dist/components/badge.config.d.ts +0 -2
- package/dist/components/badge.config.js +0 -2
- package/dist/components/badge.d.ts +0 -2
- package/dist/components/badge.js +0 -2
- package/dist/components/box.d.ts +0 -2
- package/dist/components/box.js +0 -2
- package/dist/components/breadcrumb.config.d.ts +0 -2
- package/dist/components/breadcrumb.config.js +0 -2
- package/dist/components/breadcrumb.d.ts +0 -2
- package/dist/components/breadcrumb.js +0 -2
- package/dist/components/button.config.d.ts +0 -2
- package/dist/components/button.config.js +0 -2
- package/dist/components/button.d.ts +0 -2
- package/dist/components/button.js +0 -2
- package/dist/components/card.config.d.ts +0 -2
- package/dist/components/card.config.js +0 -2
- package/dist/components/card.d.ts +0 -2
- package/dist/components/card.js +0 -2
- package/dist/components/collapsible.config.d.ts +0 -2
- package/dist/components/collapsible.config.js +0 -2
- package/dist/components/collapsible.d.ts +0 -2
- package/dist/components/collapsible.js +0 -2
- package/dist/components/command.config.d.ts +0 -2
- package/dist/components/command.config.js +0 -2
- package/dist/components/command.d.ts +0 -2
- package/dist/components/command.js +0 -2
- package/dist/components/control-color.config.d.ts +0 -2
- package/dist/components/control-color.config.js +0 -2
- package/dist/components/control-color.d.ts +0 -2
- package/dist/components/control-color.js +0 -2
- package/dist/components/control-curve.config.d.ts +0 -2
- package/dist/components/control-curve.config.js +0 -2
- package/dist/components/control-curve.d.ts +0 -2
- package/dist/components/control-curve.js +0 -2
- package/dist/components/control-folder.config.d.ts +0 -2
- package/dist/components/control-folder.config.js +0 -2
- package/dist/components/control-folder.d.ts +0 -2
- package/dist/components/control-folder.js +0 -2
- package/dist/components/control-group.config.d.ts +0 -2
- package/dist/components/control-group.config.js +0 -2
- package/dist/components/control-group.d.ts +0 -2
- package/dist/components/control-group.js +0 -2
- package/dist/components/control-knob.config.d.ts +0 -2
- package/dist/components/control-knob.config.js +0 -2
- package/dist/components/control-knob.d.ts +0 -2
- package/dist/components/control-knob.js +0 -2
- package/dist/components/control-panel.config.d.ts +0 -2
- package/dist/components/control-panel.config.js +0 -2
- package/dist/components/control-panel.d.ts +0 -2
- package/dist/components/control-panel.js +0 -2
- package/dist/components/control-select.config.d.ts +0 -2
- package/dist/components/control-select.config.js +0 -2
- package/dist/components/control-select.d.ts +0 -2
- package/dist/components/control-select.js +0 -2
- package/dist/components/control-slider.config.d.ts +0 -2
- package/dist/components/control-slider.config.js +0 -2
- package/dist/components/control-slider.d.ts +0 -2
- package/dist/components/control-slider.js +0 -2
- package/dist/components/control-spring.config.d.ts +0 -2
- package/dist/components/control-spring.config.js +0 -2
- package/dist/components/control-spring.d.ts +0 -2
- package/dist/components/control-spring.js +0 -2
- package/dist/components/control-stepper.config.d.ts +0 -2
- package/dist/components/control-stepper.config.js +0 -2
- package/dist/components/control-stepper.d.ts +0 -2
- package/dist/components/control-stepper.js +0 -2
- package/dist/components/control-toggle.config.d.ts +0 -2
- package/dist/components/control-toggle.config.js +0 -2
- package/dist/components/control-toggle.d.ts +0 -2
- package/dist/components/control-toggle.js +0 -2
- package/dist/components/dist/_slots.js +0 -8
- package/dist/components/dist/accordion.config.d.ts +0 -431
- package/dist/components/dist/accordion.config.js +0 -81
- package/dist/components/dist/accordion.d.ts +0 -453
- package/dist/components/dist/accordion.js +0 -60
- package/dist/components/dist/alert.config.d.ts +0 -219
- package/dist/components/dist/alert.config.js +0 -54
- package/dist/components/dist/alert.d.ts +0 -230
- package/dist/components/dist/alert.js +0 -16
- package/dist/components/dist/anchor.config.d.ts +0 -250
- package/dist/components/dist/anchor.config.js +0 -22
- package/dist/components/dist/anchor.d.ts +0 -261
- package/dist/components/dist/anchor.js +0 -9
- package/dist/components/dist/article.d.ts +0 -11
- package/dist/components/dist/article.js +0 -9
- package/dist/components/dist/aside.d.ts +0 -11
- package/dist/components/dist/aside.js +0 -9
- package/dist/components/dist/avatar-group.config.d.ts +0 -315
- package/dist/components/dist/avatar-group.config.js +0 -33
- package/dist/components/dist/avatar-group.d.ts +0 -329
- package/dist/components/dist/avatar-group.js +0 -39
- package/dist/components/dist/avatar.config.d.ts +0 -197
- package/dist/components/dist/avatar.config.js +0 -49
- package/dist/components/dist/avatar.d.ts +0 -211
- package/dist/components/dist/avatar.js +0 -20
- package/dist/components/dist/badge.config.d.ts +0 -477
- package/dist/components/dist/badge.config.js +0 -99
- package/dist/components/dist/badge.d.ts +0 -489
- package/dist/components/dist/badge.js +0 -16
- package/dist/components/dist/box.d.ts +0 -14
- package/dist/components/dist/box.js +0 -9
- package/dist/components/dist/breadcrumb.config.d.ts +0 -390
- package/dist/components/dist/breadcrumb.config.js +0 -43
- package/dist/components/dist/breadcrumb.d.ts +0 -420
- package/dist/components/dist/breadcrumb.js +0 -119
- package/dist/components/dist/button.config.d.ts +0 -381
- package/dist/components/dist/button.config.js +0 -91
- package/dist/components/dist/button.d.ts +0 -403
- package/dist/components/dist/button.js +0 -35
- package/dist/components/dist/card.config.d.ts +0 -336
- package/dist/components/dist/card.config.js +0 -33
- package/dist/components/dist/card.d.ts +0 -352
- package/dist/components/dist/card.js +0 -27
- package/dist/components/dist/collapsible.config.d.ts +0 -45
- package/dist/components/dist/collapsible.config.js +0 -46
- package/dist/components/dist/collapsible.d.ts +0 -61
- package/dist/components/dist/collapsible.js +0 -38
- package/dist/components/dist/command.config.d.ts +0 -1613
- package/dist/components/dist/command.config.js +0 -170
- package/dist/components/dist/command.d.ts +0 -1722
- package/dist/components/dist/command.js +0 -341
- package/dist/components/dist/control-color.config.d.ts +0 -979
- package/dist/components/dist/control-color.config.js +0 -81
- package/dist/components/dist/control-color.d.ts +0 -995
- package/dist/components/dist/control-color.js +0 -64
- package/dist/components/dist/control-curve.config.d.ts +0 -18
- package/dist/components/dist/control-curve.config.js +0 -14
- package/dist/components/dist/control-curve.d.ts +0 -35
- package/dist/components/dist/control-curve.js +0 -81
- package/dist/components/dist/control-folder.config.d.ts +0 -177
- package/dist/components/dist/control-folder.config.js +0 -47
- package/dist/components/dist/control-folder.d.ts +0 -194
- package/dist/components/dist/control-folder.js +0 -41
- package/dist/components/dist/control-group.config.d.ts +0 -859
- package/dist/components/dist/control-group.config.js +0 -80
- package/dist/components/dist/control-group.d.ts +0 -881
- package/dist/components/dist/control-group.js +0 -89
- package/dist/components/dist/control-knob.config.d.ts +0 -792
- package/dist/components/dist/control-knob.config.js +0 -67
- package/dist/components/dist/control-knob.d.ts +0 -819
- package/dist/components/dist/control-knob.js +0 -148
- package/dist/components/dist/control-panel.config.d.ts +0 -402
- package/dist/components/dist/control-panel.config.js +0 -38
- package/dist/components/dist/control-panel.d.ts +0 -415
- package/dist/components/dist/control-panel.js +0 -22
- package/dist/components/dist/control-select.config.d.ts +0 -1176
- package/dist/components/dist/control-select.config.js +0 -102
- package/dist/components/dist/control-select.d.ts +0 -1200
- package/dist/components/dist/control-select.js +0 -63
- package/dist/components/dist/control-slider.config.d.ts +0 -104
- package/dist/components/dist/control-slider.config.js +0 -98
- package/dist/components/dist/control-slider.d.ts +0 -127
- package/dist/components/dist/control-slider.js +0 -87
- package/dist/components/dist/control-spring.config.d.ts +0 -417
- package/dist/components/dist/control-spring.config.js +0 -36
- package/dist/components/dist/control-spring.d.ts +0 -439
- package/dist/components/dist/control-spring.js +0 -136
- package/dist/components/dist/control-stepper.config.d.ts +0 -1084
- package/dist/components/dist/control-stepper.config.js +0 -108
- package/dist/components/dist/control-stepper.d.ts +0 -1104
- package/dist/components/dist/control-stepper.js +0 -109
- package/dist/components/dist/control-toggle.config.d.ts +0 -407
- package/dist/components/dist/control-toggle.config.js +0 -26
- package/dist/components/dist/control-toggle.d.ts +0 -420
- package/dist/components/dist/control-toggle.js +0 -36
- package/dist/components/dist/createSlot.d.ts +0 -8
- package/dist/components/dist/createSlot.js +0 -89
- package/dist/components/dist/dropdown.config.d.ts +0 -920
- package/dist/components/dist/dropdown.config.js +0 -107
- package/dist/components/dist/dropdown.d.ts +0 -950
- package/dist/components/dist/dropdown.js +0 -92
- package/dist/components/dist/empty-state.config.d.ts +0 -396
- package/dist/components/dist/empty-state.config.js +0 -53
- package/dist/components/dist/empty-state.d.ts +0 -416
- package/dist/components/dist/empty-state.js +0 -33
- package/dist/components/dist/footer.d.ts +0 -11
- package/dist/components/dist/footer.js +0 -9
- package/dist/components/dist/grid.d.ts +0 -41
- package/dist/components/dist/grid.js +0 -34
- package/dist/components/dist/header.d.ts +0 -11
- package/dist/components/dist/header.js +0 -9
- package/dist/components/dist/hstack.d.ts +0 -15
- package/dist/components/dist/hstack.js +0 -21
- package/dist/components/dist/image.d.ts +0 -19
- package/dist/components/dist/image.js +0 -9
- package/dist/components/dist/input.config.d.ts +0 -58
- package/dist/components/dist/input.config.js +0 -42
- package/dist/components/dist/input.d.ts +0 -67
- package/dist/components/dist/input.js +0 -14
- package/dist/components/dist/item.config.d.ts +0 -351
- package/dist/components/dist/item.config.js +0 -83
- package/dist/components/dist/item.d.ts +0 -374
- package/dist/components/dist/item.js +0 -51
- package/dist/components/dist/list.d.ts +0 -19
- package/dist/components/dist/list.js +0 -21
- package/dist/components/dist/main.d.ts +0 -11
- package/dist/components/dist/main.js +0 -9
- package/dist/components/dist/modal.config.d.ts +0 -397
- package/dist/components/dist/modal.config.js +0 -92
- package/dist/components/dist/modal.d.ts +0 -433
- package/dist/components/dist/modal.js +0 -125
- package/dist/components/dist/nav-header.config.d.ts +0 -158
- package/dist/components/dist/nav-header.config.js +0 -26
- package/dist/components/dist/nav-header.d.ts +0 -173
- package/dist/components/dist/nav-header.js +0 -23
- package/dist/components/dist/nav.d.ts +0 -11
- package/dist/components/dist/nav.js +0 -9
- package/dist/components/dist/preset-bar.config.d.ts +0 -192
- package/dist/components/dist/preset-bar.config.js +0 -39
- package/dist/components/dist/preset-bar.d.ts +0 -215
- package/dist/components/dist/preset-bar.js +0 -71
- package/dist/components/dist/presets/index.d.ts +0 -17674
- package/dist/components/dist/presets/index.js +0 -97
- package/dist/components/dist/pressable.d.ts +0 -11
- package/dist/components/dist/pressable.js +0 -9
- package/dist/components/dist/progress.config.d.ts +0 -296
- package/dist/components/dist/progress.config.js +0 -35
- package/dist/components/dist/progress.d.ts +0 -311
- package/dist/components/dist/progress.js +0 -43
- package/dist/components/dist/section.d.ts +0 -11
- package/dist/components/dist/section.js +0 -9
- package/dist/components/dist/select.config.d.ts +0 -31
- package/dist/components/dist/select.config.js +0 -25
- package/dist/components/dist/select.d.ts +0 -45
- package/dist/components/dist/select.js +0 -13
- package/dist/components/dist/sheet.config.d.ts +0 -245
- package/dist/components/dist/sheet.config.js +0 -99
- package/dist/components/dist/sheet.d.ts +0 -267
- package/dist/components/dist/sheet.js +0 -53
- package/dist/components/dist/sidebar.config.d.ts +0 -1651
- package/dist/components/dist/sidebar.config.js +0 -217
- package/dist/components/dist/sidebar.d.ts +0 -1825
- package/dist/components/dist/sidebar.js +0 -492
- package/dist/components/dist/skeleton.config.d.ts +0 -16
- package/dist/components/dist/skeleton.config.js +0 -10
- package/dist/components/dist/skeleton.d.ts +0 -27
- package/dist/components/dist/skeleton.js +0 -16
- package/dist/components/dist/slider.config.d.ts +0 -44
- package/dist/components/dist/slider.config.js +0 -40
- package/dist/components/dist/slider.d.ts +0 -70
- package/dist/components/dist/slider.js +0 -247
- package/dist/components/dist/spinner.config.d.ts +0 -34
- package/dist/components/dist/spinner.config.js +0 -24
- package/dist/components/dist/spinner.d.ts +0 -42
- package/dist/components/dist/spinner.js +0 -29
- package/dist/components/dist/svg.d.ts +0 -21
- package/dist/components/dist/svg.js +0 -17
- package/dist/components/dist/switch.config.d.ts +0 -353
- package/dist/components/dist/switch.config.js +0 -47
- package/dist/components/dist/switch.d.ts +0 -370
- package/dist/components/dist/switch.js +0 -32
- package/dist/components/dist/table.d.ts +0 -36
- package/dist/components/dist/table.js +0 -29
- package/dist/components/dist/tabs.config.d.ts +0 -611
- package/dist/components/dist/tabs.config.js +0 -56
- package/dist/components/dist/tabs.d.ts +0 -632
- package/dist/components/dist/tabs.js +0 -77
- package/dist/components/dist/text.config.d.ts +0 -306
- package/dist/components/dist/text.config.js +0 -149
- package/dist/components/dist/text.d.ts +0 -205
- package/dist/components/dist/text.js +0 -12
- package/dist/components/dist/textarea.config.d.ts +0 -352
- package/dist/components/dist/textarea.config.js +0 -57
- package/dist/components/dist/textarea.d.ts +0 -362
- package/dist/components/dist/textarea.js +0 -9
- package/dist/components/dist/toast.config.d.ts +0 -335
- package/dist/components/dist/toast.config.js +0 -145
- package/dist/components/dist/toast.d.ts +0 -426
- package/dist/components/dist/toast.js +0 -159
- package/dist/components/dist/tooltip.config.d.ts +0 -193
- package/dist/components/dist/tooltip.config.js +0 -40
- package/dist/components/dist/tooltip.d.ts +0 -206
- package/dist/components/dist/tooltip.js +0 -28
- package/dist/components/dist/vstack.d.ts +0 -15
- package/dist/components/dist/vstack.js +0 -20
- package/dist/components/dropdown.config.d.ts +0 -2
- package/dist/components/dropdown.config.js +0 -2
- package/dist/components/dropdown.d.ts +0 -2
- package/dist/components/dropdown.js +0 -2
- package/dist/components/empty-state.config.d.ts +0 -2
- package/dist/components/empty-state.config.js +0 -2
- package/dist/components/empty-state.d.ts +0 -2
- package/dist/components/empty-state.js +0 -2
- package/dist/components/footer.d.ts +0 -2
- package/dist/components/footer.js +0 -2
- package/dist/components/grid.d.ts +0 -2
- package/dist/components/grid.js +0 -2
- package/dist/components/header.d.ts +0 -2
- package/dist/components/header.js +0 -2
- package/dist/components/hstack.d.ts +0 -2
- package/dist/components/hstack.js +0 -2
- package/dist/components/image.d.ts +0 -2
- package/dist/components/image.js +0 -2
- package/dist/components/input.config.d.ts +0 -2
- package/dist/components/input.config.js +0 -2
- package/dist/components/input.d.ts +0 -2
- package/dist/components/input.js +0 -2
- package/dist/components/item.config.d.ts +0 -2
- package/dist/components/item.config.js +0 -2
- package/dist/components/item.d.ts +0 -2
- package/dist/components/item.js +0 -2
- package/dist/components/list.d.ts +0 -2
- package/dist/components/list.js +0 -2
- package/dist/components/main.d.ts +0 -2
- package/dist/components/main.js +0 -2
- package/dist/components/modal.config.d.ts +0 -2
- package/dist/components/modal.config.js +0 -2
- package/dist/components/modal.d.ts +0 -2
- package/dist/components/modal.js +0 -2
- package/dist/components/nav-header.config.d.ts +0 -2
- package/dist/components/nav-header.config.js +0 -2
- package/dist/components/nav-header.d.ts +0 -2
- package/dist/components/nav-header.js +0 -2
- package/dist/components/nav.d.ts +0 -2
- package/dist/components/nav.js +0 -2
- package/dist/components/preset-bar.config.d.ts +0 -2
- package/dist/components/preset-bar.config.js +0 -2
- package/dist/components/preset-bar.d.ts +0 -2
- package/dist/components/preset-bar.js +0 -2
- package/dist/components/presets/index.d.ts +0 -44
- package/dist/components/presets/index.js +0 -44
- package/dist/components/pressable.d.ts +0 -2
- package/dist/components/pressable.js +0 -2
- package/dist/components/progress.config.d.ts +0 -2
- package/dist/components/progress.config.js +0 -2
- package/dist/components/progress.d.ts +0 -2
- package/dist/components/progress.js +0 -2
- package/dist/components/section.d.ts +0 -2
- package/dist/components/section.js +0 -2
- package/dist/components/select.config.d.ts +0 -2
- package/dist/components/select.config.js +0 -2
- package/dist/components/select.d.ts +0 -2
- package/dist/components/select.js +0 -2
- package/dist/components/sheet.config.d.ts +0 -2
- package/dist/components/sheet.config.js +0 -2
- package/dist/components/sheet.d.ts +0 -2
- package/dist/components/sheet.js +0 -2
- package/dist/components/sidebar.config.d.ts +0 -2
- package/dist/components/sidebar.config.js +0 -2
- package/dist/components/sidebar.d.ts +0 -2
- package/dist/components/sidebar.js +0 -2
- package/dist/components/skeleton.config.d.ts +0 -2
- package/dist/components/skeleton.config.js +0 -2
- package/dist/components/skeleton.d.ts +0 -2
- package/dist/components/skeleton.js +0 -2
- package/dist/components/slider.config.d.ts +0 -2
- package/dist/components/slider.config.js +0 -2
- package/dist/components/slider.d.ts +0 -2
- package/dist/components/slider.js +0 -2
- package/dist/components/spinner.config.d.ts +0 -2
- package/dist/components/spinner.config.js +0 -2
- package/dist/components/spinner.d.ts +0 -2
- package/dist/components/spinner.js +0 -2
- package/dist/components/svg.d.ts +0 -2
- package/dist/components/svg.js +0 -2
- package/dist/components/switch.config.d.ts +0 -2
- package/dist/components/switch.config.js +0 -2
- package/dist/components/switch.d.ts +0 -2
- package/dist/components/switch.js +0 -2
- package/dist/components/table.d.ts +0 -2
- package/dist/components/table.js +0 -2
- package/dist/components/tabs.config.d.ts +0 -2
- package/dist/components/tabs.config.js +0 -2
- package/dist/components/tabs.d.ts +0 -2
- package/dist/components/tabs.js +0 -2
- package/dist/components/text.config.d.ts +0 -2
- package/dist/components/text.config.js +0 -2
- package/dist/components/text.d.ts +0 -2
- package/dist/components/text.js +0 -2
- package/dist/components/textarea.config.d.ts +0 -2
- package/dist/components/textarea.config.js +0 -2
- package/dist/components/textarea.d.ts +0 -2
- package/dist/components/textarea.js +0 -2
- package/dist/components/toast.config.d.ts +0 -2
- package/dist/components/toast.config.js +0 -2
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.js +0 -2
- package/dist/components/tooltip.config.d.ts +0 -2
- package/dist/components/tooltip.config.js +0 -2
- package/dist/components/tooltip.d.ts +0 -2
- package/dist/components/tooltip.js +0 -2
- package/dist/components/vstack.d.ts +0 -2
- package/dist/components/vstack.js +0 -2
- package/dist/config/dist/component-resolution.js +0 -78
- package/dist/config/dist/consts/defaultColors.d.ts +0 -253
- package/dist/config/dist/consts/defaultColors.js +0 -252
- package/dist/config/dist/createComponent.d.ts +0 -1
- package/dist/config/dist/createComponent.js +0 -1
- package/dist/config/dist/preset-merge.js +0 -192
- package/dist/config/dist/propertyGroups.d.ts +0 -1
- package/dist/config/dist/propertyGroups.js +0 -414
- package/dist/config/dist/resolveTokenTypes.d.ts +0 -1
- package/dist/config/dist/resolveTokenTypes.js +0 -149
- package/dist/config-utils/dist/componentConfig.d.ts +0 -10
- package/dist/config-utils/dist/componentConfig.js +0 -11
- package/dist/config-utils.d.ts +0 -2
- package/dist/config-utils.js +0 -2
- package/dist/core/dist/color-opacity-map.js +0 -33
- package/dist/core/dist/compositeStyles.d.ts +0 -21
- package/dist/core/dist/compositeStyles.js +0 -51
- package/dist/core/dist/configurable-prop-helpers.d.ts +0 -31
- package/dist/core/dist/configurable-prop-helpers.js +0 -61
- package/dist/core/dist/createComponent.boundaries.js +0 -192
- package/dist/core/dist/createComponent.d.ts +0 -56
- package/dist/core/dist/createComponent.js +0 -67
- package/dist/core/dist/createComponentExample.d.ts +0 -41
- package/dist/core/dist/createComponentExample.js +0 -27
- package/dist/core/dist/createProvider.d.ts +0 -12
- package/dist/core/dist/createProvider.js +0 -24
- package/dist/core/dist/generated/stylePropsTwMap.d.ts +0 -1700
- package/dist/core/dist/generated/stylePropsTwMap.js +0 -570
- package/dist/core/dist/getComponentStyles.d.ts +0 -49
- package/dist/core/dist/getComponentStyles.js +0 -85
- package/dist/core/dist/getStyles.d.ts +0 -42
- package/dist/core/dist/getStyles.js +0 -300
- package/dist/core/dist/index.d.ts +0 -13
- package/dist/core/dist/index.js +0 -13
- package/dist/core/dist/modifier-mappings.d.ts +0 -12
- package/dist/core/dist/modifier-mappings.js +0 -61
- package/dist/core/dist/resolveMotionState.d.ts +0 -4
- package/dist/core/dist/resolveMotionState.js +0 -17
- package/dist/core/dist/resolveProps.boundaries.js +0 -131
- package/dist/core/dist/style-prop-data.d.ts +0 -32
- package/dist/core/dist/style-prop-data.js +0 -1257
- package/dist/core/dist/transformPreset.d.ts +0 -17
- package/dist/core/dist/transformPreset.js +0 -28
- package/dist/core/dist/withDefaultStyleProps.d.ts +0 -43
- package/dist/core/dist/withDefaultStyleProps.js +0 -18
- package/dist/core.d.ts +0 -14
- package/dist/core.js +0 -15
- package/dist/createSlot.d.ts +0 -2
- package/dist/createSlot.js +0 -2
- package/dist/fixtures.d.ts +0 -4
- package/dist/fixtures.js +0 -5
- package/dist/foundational-presets/dist/_virtual/_rolldown/runtime.js +0 -13
- package/dist/foundational-presets/dist/defaultPreset.d.ts +0 -1557
- package/dist/foundational-presets/dist/defaultPreset.js +0 -615
- package/dist/foundational-presets/dist/index.d.ts +0 -1
- package/dist/foundational-presets/dist/index.js +0 -1
- package/dist/foundational-presets/dist/motion.d.ts +0 -12
- package/dist/foundational-presets/dist/motion.js +0 -10
- package/dist/foundational-presets/dist/style-props.js +0 -1445
- package/dist/loader/dist/loader/create-component-data.js +0 -33
- package/dist/loader/dist/loader/create-component-lowering.js +0 -454
- package/dist/loader/dist/loader/data-attr-transform.js +0 -191
- package/dist/loader/dist/loader/dynamic-style-codegen.js +0 -97
- package/dist/loader/dist/loader/motion-transform.js +0 -717
- package/dist/loader/dist/loader/style-transform.js +0 -670
- package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -203
- package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -25
- package/dist/loader/dist/node_modules/react/cjs/react.development.js +0 -762
- package/dist/loader/dist/node_modules/react/cjs/react.production.js +0 -351
- package/dist/loader/dist/node_modules/react/index.js +0 -10
- package/dist/loader/dist/node_modules/react/jsx-runtime.js +0 -10
- package/dist/loader/dist/packages/core/dist/color-opacity-map.js +0 -33
- package/dist/loader/dist/packages/core/dist/compositeStyles.js +0 -43
- package/dist/loader/dist/packages/core/dist/createComponent.js +0 -6
- package/dist/loader/dist/packages/core/dist/createProvider.js +0 -7
- package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +0 -570
- package/dist/loader/dist/packages/core/dist/getComponentStyles.js +0 -2
- package/dist/loader/dist/packages/core/dist/getStyles.js +0 -60
- package/dist/loader/dist/packages/core/dist/index.js +0 -6
- package/dist/loader/dist/packages/core/dist/modifier-mappings.js +0 -61
- package/dist/loader/dist/packages/core/dist/style-prop-data.js +0 -1257
- package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +0 -1
- package/dist/presets/dist/defaultPreset.d.ts +0 -6
- package/dist/presets/dist/defaultPreset.js +0 -51
- package/dist/presets/dist/index.d.ts +0 -1
- package/dist/presets/dist/index.js +0 -1
- package/dist/presets/motion.d.ts +0 -2
- package/dist/presets/motion.js +0 -2
- package/dist/presets.d.ts +0 -2
- package/dist/presets.js +0 -3
- package/dist/styles.d.ts +0 -4
- package/dist/styles.js +0 -5
- package/dist/transformPreset.d.ts +0 -2
- package/dist/transformPreset.js +0 -3
- /package/dist/{config/dist/component-resolution.d.ts → loader/dist/transform-runner.d.ts} +0 -0
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
//#region ../config/dist/resolveTokenTypes.js
|
|
2
|
-
/**
|
|
3
|
-
* Default `TokenType` for each property group. Used to infer a var
|
|
4
|
-
* namespace's type when no explicit `$type` is declared — e.g. a namespace
|
|
5
|
-
* scoped to `['textColor', 'background']` is clearly a `color` namespace.
|
|
6
|
-
*
|
|
7
|
-
* Property groups that hold composite values (`shadow`, `textShadow`) or
|
|
8
|
-
* mixed-kind values (`transform` — mixes rotate/scale/translate/skew) are
|
|
9
|
-
* intentionally omitted; they fall through to `undefined` until the
|
|
10
|
-
* Composite Tokens RFC lands.
|
|
11
|
-
*/
|
|
12
|
-
const propertyGroupDefaultType = {
|
|
13
|
-
textColor: "color",
|
|
14
|
-
background: "color",
|
|
15
|
-
borderColor: "color",
|
|
16
|
-
outlineColor: "color",
|
|
17
|
-
ringColor: "color",
|
|
18
|
-
divideColor: "color",
|
|
19
|
-
shadowColor: "color",
|
|
20
|
-
svgFill: "color",
|
|
21
|
-
svgStroke: "color",
|
|
22
|
-
caretColor: "color",
|
|
23
|
-
textDecorationColor: "color",
|
|
24
|
-
opacity: "number",
|
|
25
|
-
colorOpacity: "number",
|
|
26
|
-
bgOpacity: "number",
|
|
27
|
-
borderColorOpacity: "number",
|
|
28
|
-
divideColorOpacity: "number",
|
|
29
|
-
outlineColorOpacity: "number",
|
|
30
|
-
ringColorOpacity: "number",
|
|
31
|
-
textDecorationColorOpacity: "number",
|
|
32
|
-
svgFillOpacity: "number",
|
|
33
|
-
svgStrokeOpacity: "number",
|
|
34
|
-
shadowColorOpacity: "number",
|
|
35
|
-
caretColorOpacity: "number",
|
|
36
|
-
fontFamily: "fontFamily",
|
|
37
|
-
fontSize: "dimension",
|
|
38
|
-
fontWeight: "fontWeight",
|
|
39
|
-
lineHeight: "number",
|
|
40
|
-
letterSpacing: "dimension",
|
|
41
|
-
blur: "dimension",
|
|
42
|
-
backdropBlur: "dimension",
|
|
43
|
-
animation: "duration",
|
|
44
|
-
zIndex: "number",
|
|
45
|
-
borderWidth: "dimension",
|
|
46
|
-
borderRadius: "dimension",
|
|
47
|
-
outlineWidth: "dimension",
|
|
48
|
-
divideWidth: "dimension",
|
|
49
|
-
ringWidth: "dimension",
|
|
50
|
-
padding: "dimension",
|
|
51
|
-
margin: "dimension",
|
|
52
|
-
offset: "dimension",
|
|
53
|
-
gap: "dimension",
|
|
54
|
-
indent: "dimension",
|
|
55
|
-
scrollSnapGap: "dimension",
|
|
56
|
-
scrollSnapSpacing: "dimension",
|
|
57
|
-
tableBorderSpacing: "dimension",
|
|
58
|
-
width: "dimension",
|
|
59
|
-
height: "dimension",
|
|
60
|
-
aspectRatio: "number",
|
|
61
|
-
positionPlacement: "dimension",
|
|
62
|
-
flex: "number",
|
|
63
|
-
strokeWidth: "dimension"
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Resolve a token's `TokenType` in priority order:
|
|
67
|
-
*
|
|
68
|
-
* 1. Explicit `$type` (from the token or its group)
|
|
69
|
-
* 2. Derived from `defineScopes` — when all scopes agree on a default type
|
|
70
|
-
* 3. Value sniff (last resort) — regex-matches obvious value shapes
|
|
71
|
-
*
|
|
72
|
-
* Returns `undefined` when none of the strategies produce a confident answer.
|
|
73
|
-
* Consumers (Studio, tooling) should treat `undefined` as "render a plain
|
|
74
|
-
* string input" — never guess wrong.
|
|
75
|
-
*/
|
|
76
|
-
function resolveTokenType(input) {
|
|
77
|
-
if (input.explicit) return input.explicit;
|
|
78
|
-
if (input.scopes && input.scopes.length > 0) {
|
|
79
|
-
const types = /* @__PURE__ */ new Set();
|
|
80
|
-
for (const scope of input.scopes) {
|
|
81
|
-
const t = propertyGroupDefaultType[scope];
|
|
82
|
-
if (t) types.add(t);
|
|
83
|
-
}
|
|
84
|
-
if (types.size === 1) {
|
|
85
|
-
const [only] = types;
|
|
86
|
-
return only;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (typeof input.value === "string") {
|
|
90
|
-
const sniffed = sniffTokenTypeFromValue(input.value);
|
|
91
|
-
if (sniffed) return sniffed;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Heuristic last-resort classifier for a raw CSS value. Returns `undefined`
|
|
96
|
-
* when no confident match is possible (e.g. `var(...)` references).
|
|
97
|
-
*
|
|
98
|
-
* Exported for testing; prefer `resolveTokenType` in most call sites.
|
|
99
|
-
*/
|
|
100
|
-
function sniffTokenTypeFromValue(value) {
|
|
101
|
-
const v = value.trim();
|
|
102
|
-
if (v.length === 0) return void 0;
|
|
103
|
-
if (CSS_WIDE_KEYWORDS.has(v)) return "string";
|
|
104
|
-
if (v.startsWith("var(")) return void 0;
|
|
105
|
-
if (COLOR_FUNCTION_RE.test(v)) return "color";
|
|
106
|
-
if (HEX_COLOR_RE.test(v)) return "color";
|
|
107
|
-
if (NAMED_COLOR_KEYWORDS.has(v.toLowerCase())) return "color";
|
|
108
|
-
if (DURATION_RE.test(v)) return "duration";
|
|
109
|
-
if (DIMENSION_RE.test(v)) return "dimension";
|
|
110
|
-
if (PURE_NUMBER_RE.test(v)) return "number";
|
|
111
|
-
}
|
|
112
|
-
const CSS_WIDE_KEYWORDS = new Set([
|
|
113
|
-
"inherit",
|
|
114
|
-
"initial",
|
|
115
|
-
"unset",
|
|
116
|
-
"revert",
|
|
117
|
-
"revert-layer",
|
|
118
|
-
"auto",
|
|
119
|
-
"none",
|
|
120
|
-
"currentColor",
|
|
121
|
-
"currentcolor",
|
|
122
|
-
"transparent"
|
|
123
|
-
]);
|
|
124
|
-
const HEX_COLOR_RE = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
|
|
125
|
-
const COLOR_FUNCTION_RE = /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\s*\(/i;
|
|
126
|
-
const NUMBER_RE_SRC = "(?:\\d+(?:\\.\\d+)?|\\.\\d+)";
|
|
127
|
-
const DIMENSION_RE = new RegExp(`^-?${NUMBER_RE_SRC}(?:px|rem|em|%|vh|vw|vmin|vmax|vi|vb|svh|svw|lvh|lvw|dvh|dvw|ch|ex|cap|ic|lh|rlh|pt|pc|in|cm|mm|q|fr|deg|turn|rad|grad)$`, "i");
|
|
128
|
-
const DURATION_RE = new RegExp(`^-?${NUMBER_RE_SRC}(?:ms|s)$`, "i");
|
|
129
|
-
const PURE_NUMBER_RE = new RegExp(`^-?${NUMBER_RE_SRC}$`);
|
|
130
|
-
const NAMED_COLOR_KEYWORDS = new Set([
|
|
131
|
-
"black",
|
|
132
|
-
"white",
|
|
133
|
-
"red",
|
|
134
|
-
"green",
|
|
135
|
-
"blue",
|
|
136
|
-
"yellow",
|
|
137
|
-
"orange",
|
|
138
|
-
"purple",
|
|
139
|
-
"pink",
|
|
140
|
-
"gray",
|
|
141
|
-
"grey",
|
|
142
|
-
"brown",
|
|
143
|
-
"cyan",
|
|
144
|
-
"magenta",
|
|
145
|
-
"silver",
|
|
146
|
-
"gold"
|
|
147
|
-
]);
|
|
148
|
-
//#endregion
|
|
149
|
-
export { propertyGroupDefaultType, resolveTokenType, sniffTokenTypeFromValue };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../config-utils/dist/componentConfig.d.ts
|
|
2
|
-
//#region src/componentConfig.d.ts
|
|
3
|
-
interface ComponentConfigLike {
|
|
4
|
-
variants?: Record<string, Record<string, unknown>>;
|
|
5
|
-
defaultVariants?: Record<string, unknown> | null | undefined;
|
|
6
|
-
}
|
|
7
|
-
declare function getComponentVariantAxes(componentConfig: ComponentConfigLike | null | undefined): Set<string>;
|
|
8
|
-
declare function getComponentDefaultVariants(defaultVariants: ComponentConfigLike['defaultVariants']): Record<string, string>; //#endregion
|
|
9
|
-
//#endregion
|
|
10
|
-
export { ComponentConfigLike, getComponentDefaultVariants, getComponentVariantAxes };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ../config-utils/dist/componentConfig.js
|
|
2
|
-
function getComponentVariantAxes(componentConfig) {
|
|
3
|
-
return new Set(Object.keys(componentConfig?.variants ?? {}));
|
|
4
|
-
}
|
|
5
|
-
function getComponentDefaultVariants(defaultVariants) {
|
|
6
|
-
const normalized = {};
|
|
7
|
-
for (const [axis, axisValue] of Object.entries(defaultVariants ?? {})) if (typeof axisValue === "string") normalized[axis] = axisValue;
|
|
8
|
-
return normalized;
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { getComponentDefaultVariants, getComponentVariantAxes };
|
package/dist/config-utils.d.ts
DELETED
package/dist/config-utils.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//#region ../core/dist/color-opacity-map.js
|
|
2
|
-
/**
|
|
3
|
-
* Maps each color prop name to its corresponding opacity prop name.
|
|
4
|
-
* Used by the runtime (`getStyles`) and loader (`style-transform`) to merge
|
|
5
|
-
* a color value with its opacity before class generation.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* `bg="primary"` + `bgOpacity="75"` → class `bg-primary_75`
|
|
9
|
-
*/
|
|
10
|
-
const colorPropToOpacityProp = {
|
|
11
|
-
bg: "bgOpacity",
|
|
12
|
-
color: "colorOpacity",
|
|
13
|
-
textDecorationColor: "textDecorationColorOpacity",
|
|
14
|
-
borderColor: "borderColorOpacity",
|
|
15
|
-
borderYColor: "borderYColorOpacity",
|
|
16
|
-
borderXColor: "borderXColorOpacity",
|
|
17
|
-
borderStartColor: "borderStartColorOpacity",
|
|
18
|
-
borderLeftColor: "borderLeftColorOpacity",
|
|
19
|
-
borderEndColor: "borderEndColorOpacity",
|
|
20
|
-
borderRightColor: "borderRightColorOpacity",
|
|
21
|
-
borderTopColor: "borderTopColorOpacity",
|
|
22
|
-
borderBottomColor: "borderBottomColorOpacity",
|
|
23
|
-
divideColor: "divideColorOpacity",
|
|
24
|
-
outlineColor: "outlineColorOpacity",
|
|
25
|
-
ringColor: "ringColorOpacity",
|
|
26
|
-
ringOffsetColor: "ringOffsetColorOpacity",
|
|
27
|
-
fillColor: "fillColorOpacity",
|
|
28
|
-
strokeColor: "strokeColorOpacity",
|
|
29
|
-
shadowColor: "shadowColorOpacity",
|
|
30
|
-
caretColor: "caretColorOpacity"
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { colorPropToOpacityProp };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CompositeStylesConfig } from "@uds/types";
|
|
2
|
-
|
|
3
|
-
//#region ../core/dist/compositeStyles.d.ts
|
|
4
|
-
/** Set the composite-styles config (called by loader at build time) */
|
|
5
|
-
declare function setCompositeStylesConfig(config: CompositeStylesConfig): void;
|
|
6
|
-
/** Get the current composite-styles config */
|
|
7
|
-
declare function getCompositeStylesConfig(): CompositeStylesConfig;
|
|
8
|
-
/**
|
|
9
|
-
* Expand composite-style props into their constituent style props + marker classes.
|
|
10
|
-
*
|
|
11
|
-
* - Composite styles are lowest priority: explicit props always win
|
|
12
|
-
* - Nested composite styles are supported (a style bag can reference another group)
|
|
13
|
-
* - Circular references are detected and throw
|
|
14
|
-
* - Marker classes (e.g. "elevation-0") are returned for modifier targeting
|
|
15
|
-
*/
|
|
16
|
-
declare function expandCompositeStyles(props: Record<string, unknown>, config?: CompositeStylesConfig): {
|
|
17
|
-
expanded: Record<string, unknown>;
|
|
18
|
-
markerClasses: string[];
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
|
|
2
|
-
import "../../utils/dist/index.js";
|
|
3
|
-
//#region ../core/dist/compositeStyles.js
|
|
4
|
-
/**
|
|
5
|
-
* Runtime composite-styles config — set by the loader/codegen at build time.
|
|
6
|
-
* Maps composite-style group names to a `{ label, description?, styles }`
|
|
7
|
-
* definition where `styles` holds variant id -> style bag.
|
|
8
|
-
*/
|
|
9
|
-
let compositeStylesConfig = {};
|
|
10
|
-
/** Set the composite-styles config (called by loader at build time) */
|
|
11
|
-
function setCompositeStylesConfig(config) {
|
|
12
|
-
compositeStylesConfig = config;
|
|
13
|
-
}
|
|
14
|
-
/** Get the current composite-styles config */
|
|
15
|
-
function getCompositeStylesConfig() {
|
|
16
|
-
return compositeStylesConfig;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Expand composite-style props into their constituent style props + marker classes.
|
|
20
|
-
*
|
|
21
|
-
* - Composite styles are lowest priority: explicit props always win
|
|
22
|
-
* - Nested composite styles are supported (a style bag can reference another group)
|
|
23
|
-
* - Circular references are detected and throw
|
|
24
|
-
* - Marker classes (e.g. "elevation-0") are returned for modifier targeting
|
|
25
|
-
*/
|
|
26
|
-
function expandCompositeStyles(props, config = compositeStylesConfig) {
|
|
27
|
-
const expanded = {};
|
|
28
|
-
const markers = [];
|
|
29
|
-
const seen = /* @__PURE__ */ new Set();
|
|
30
|
-
function expand(key, value) {
|
|
31
|
-
const def = config[key];
|
|
32
|
-
if (def && typeof value === "string") {
|
|
33
|
-
if (seen.has(key)) throw new Error(`Circular composite style: ${[...seen, key].join(" → ")}`);
|
|
34
|
-
seen.add(key);
|
|
35
|
-
markers.push(`${key}-${safeTokenName(value)}`);
|
|
36
|
-
const bag = def.styles[value];
|
|
37
|
-
if (bag) {
|
|
38
|
-
for (const [k, v] of Object.entries(bag)) if (!(k in expanded)) expand(k, v);
|
|
39
|
-
}
|
|
40
|
-
seen.delete(key);
|
|
41
|
-
} else if (!(key in expanded)) expanded[key] = value;
|
|
42
|
-
}
|
|
43
|
-
for (const [key, value] of Object.entries(props)) if (key in config) expand(key, value);
|
|
44
|
-
for (const [key, value] of Object.entries(props)) if (!(key in config)) expanded[key] = value;
|
|
45
|
-
return {
|
|
46
|
-
expanded,
|
|
47
|
-
markerClasses: markers
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
export { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { PropMapping } from "./style-prop-data.js";
|
|
2
|
-
import { ConfigurableProp } from "@uds/types";
|
|
3
|
-
|
|
4
|
-
//#region ../core/dist/configurable-prop-helpers.d.ts
|
|
5
|
-
/** Look up a {@link PropMapping} by ConfigurableProp name. */
|
|
6
|
-
declare function getConfigurablePropMapping(prop: ConfigurableProp): PropMapping | undefined;
|
|
7
|
-
interface ConfigurablePropertyEntry {
|
|
8
|
-
property: string;
|
|
9
|
-
subProperties: string[];
|
|
10
|
-
augmentType: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Derives the configurable properties table from {@link propMappings}.
|
|
14
|
-
* Groups props by augmentType — the primary prop is the one matching
|
|
15
|
-
* a ConfigurableProp name, the rest are sub-properties.
|
|
16
|
-
*/
|
|
17
|
-
declare function getConfigurableProperties(): ConfigurablePropertyEntry[];
|
|
18
|
-
interface CssVariablePrefixEntry {
|
|
19
|
-
property: string;
|
|
20
|
-
cssPrefix: string;
|
|
21
|
-
exampleVariable: string;
|
|
22
|
-
exampleUtility: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Derives the CSS variable prefix table from {@link propMappings}.
|
|
26
|
-
* Only includes props that have both `cssProperty` and `defaultVarPrefix`.
|
|
27
|
-
* Deduplicates by `defaultVarPrefix` so each namespace appears once.
|
|
28
|
-
*/
|
|
29
|
-
declare function getCssVariablePrefixes(): CssVariablePrefixEntry[];
|
|
30
|
-
//#endregion
|
|
31
|
-
export { ConfigurablePropertyEntry, CssVariablePrefixEntry, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { propMappings } from "./style-prop-data.js";
|
|
2
|
-
//#region ../core/dist/configurable-prop-helpers.js
|
|
3
|
-
/** Maps ConfigurableProp names to propMappings keys when they differ. */
|
|
4
|
-
const configurablePropAliases = {};
|
|
5
|
-
/** Look up a {@link PropMapping} by ConfigurableProp name. */
|
|
6
|
-
function getConfigurablePropMapping(prop) {
|
|
7
|
-
return propMappings[configurablePropAliases[prop] ?? prop];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Derives the configurable properties table from {@link propMappings}.
|
|
11
|
-
* Groups props by augmentType — the primary prop is the one matching
|
|
12
|
-
* a ConfigurableProp name, the rest are sub-properties.
|
|
13
|
-
*/
|
|
14
|
-
function getConfigurableProperties() {
|
|
15
|
-
const byAugment = {};
|
|
16
|
-
for (const [prop, mapping] of Object.entries(propMappings)) {
|
|
17
|
-
if (!mapping.augmentType) continue;
|
|
18
|
-
const aug = mapping.augmentType;
|
|
19
|
-
if (!byAugment[aug]) byAugment[aug] = [];
|
|
20
|
-
byAugment[aug].push(prop);
|
|
21
|
-
}
|
|
22
|
-
const entries = [];
|
|
23
|
-
for (const [augmentType, props] of Object.entries(byAugment)) {
|
|
24
|
-
const sorted = [...props].sort((a, b) => a.length - b.length);
|
|
25
|
-
const primary = sorted[0];
|
|
26
|
-
const subs = sorted.slice(1);
|
|
27
|
-
entries.push({
|
|
28
|
-
property: primary,
|
|
29
|
-
subProperties: subs,
|
|
30
|
-
augmentType
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return entries;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Derives the CSS variable prefix table from {@link propMappings}.
|
|
37
|
-
* Only includes props that have both `cssProperty` and `defaultVarPrefix`.
|
|
38
|
-
* Deduplicates by `defaultVarPrefix` so each namespace appears once.
|
|
39
|
-
*/
|
|
40
|
-
function getCssVariablePrefixes() {
|
|
41
|
-
const seen = /* @__PURE__ */ new Set();
|
|
42
|
-
const entries = [];
|
|
43
|
-
for (const [prop, mapping] of Object.entries(propMappings)) {
|
|
44
|
-
if (!mapping.defaultVarPrefix || !mapping.cssProperty) continue;
|
|
45
|
-
if (seen.has(mapping.defaultVarPrefix)) continue;
|
|
46
|
-
seen.add(mapping.defaultVarPrefix);
|
|
47
|
-
const prefix = `--uds-${mapping.defaultVarPrefix}-*`;
|
|
48
|
-
const exampleToken = mapping.defaultVarPrefix.includes("color") ? "brand" : mapping.defaultVarPrefix === "spacing" ? "4" : mapping.defaultVarPrefix === "radius" ? "lg" : mapping.defaultVarPrefix === "border-width" ? "2" : "value";
|
|
49
|
-
const exampleVar = `--uds-${mapping.defaultVarPrefix}-${exampleToken}`;
|
|
50
|
-
const exampleUtility = `${mapping.classPrefix}-${exampleToken}`;
|
|
51
|
-
entries.push({
|
|
52
|
-
property: prop,
|
|
53
|
-
cssPrefix: prefix,
|
|
54
|
-
exampleVariable: exampleVar,
|
|
55
|
-
exampleUtility
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return entries;
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes };
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
2
|
-
//#region ../core/dist/createComponent.boundaries.js
|
|
3
|
-
const RESERVED_PROP_KEYS = new Set([
|
|
4
|
-
"children",
|
|
5
|
-
"motion",
|
|
6
|
-
"motionConfig",
|
|
7
|
-
"props",
|
|
8
|
-
"data-uds-class"
|
|
9
|
-
]);
|
|
10
|
-
function assertTransformedConfig(nameOrConfig) {
|
|
11
|
-
if (typeof nameOrConfig !== "string") return nameOrConfig;
|
|
12
|
-
return {
|
|
13
|
-
name: nameOrConfig,
|
|
14
|
-
element: "div",
|
|
15
|
-
slots: ["root"],
|
|
16
|
-
variants: [],
|
|
17
|
-
defaultVariants: {},
|
|
18
|
-
ownPropKeys: [],
|
|
19
|
-
_udsUntransformed: true
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function inferComponentNameFromRenderFn(renderFn) {
|
|
23
|
-
if (typeof renderFn.displayName === "string" && renderFn.displayName.trim().length > 0) return renderFn.displayName;
|
|
24
|
-
if (typeof renderFn.name === "string" && renderFn.name.trim().length > 0) return renderFn.name;
|
|
25
|
-
return "Component";
|
|
26
|
-
}
|
|
27
|
-
function partitionMergedProps(mergedProps, ownPropKeySet, slotNames) {
|
|
28
|
-
const ownProps = {};
|
|
29
|
-
const resolveProps = {};
|
|
30
|
-
let children;
|
|
31
|
-
let injectedClassName;
|
|
32
|
-
let userMotionConfig;
|
|
33
|
-
let slotOverrides;
|
|
34
|
-
for (const key in mergedProps) {
|
|
35
|
-
if (!Object.hasOwn(mergedProps, key)) continue;
|
|
36
|
-
const value = mergedProps[key];
|
|
37
|
-
if (ownPropKeySet.has(key)) {
|
|
38
|
-
ownProps[key] = value;
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
if (key === "children") {
|
|
42
|
-
children = value;
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
if (key === "data-uds-class") {
|
|
46
|
-
injectedClassName = typeof value === "string" ? value : void 0;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (key === "motionConfig") {
|
|
50
|
-
userMotionConfig = value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
if (slotNames && key.startsWith("_") && value && typeof value === "object" && !Array.isArray(value)) {
|
|
54
|
-
const slotName = key.slice(1);
|
|
55
|
-
if (slotNames.has(slotName)) {
|
|
56
|
-
slotOverrides ??= {};
|
|
57
|
-
slotOverrides[slotName] = value;
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (!RESERVED_PROP_KEYS.has(key)) resolveProps[key] = value;
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
ownProps,
|
|
65
|
-
resolveProps,
|
|
66
|
-
children,
|
|
67
|
-
injectedClassName,
|
|
68
|
-
userMotionConfig,
|
|
69
|
-
slotOverrides
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function mergeRootClassName(classes, injectedClassName) {
|
|
73
|
-
if (!injectedClassName) return classes;
|
|
74
|
-
return {
|
|
75
|
-
...classes,
|
|
76
|
-
root: `${classes.root ?? ""} ${injectedClassName}`.trim()
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function buildSlotProps(slots, classes, htmlProps, rootClassName) {
|
|
80
|
-
const slotProps = {};
|
|
81
|
-
for (const slot of slots) slotProps[slot] = { className: classes[slot] };
|
|
82
|
-
const rootSlot = slots.includes("root") ? "root" : slots[0];
|
|
83
|
-
if (!rootSlot) return slotProps;
|
|
84
|
-
const { className: htmlClassName, motionConfig: _mc, ...rootHtmlProps } = htmlProps;
|
|
85
|
-
const mergedRootClassName = [rootClassName ?? slotProps[rootSlot]?.className, typeof htmlClassName === "string" ? htmlClassName : void 0].filter(Boolean).join(" ").trim();
|
|
86
|
-
slotProps[rootSlot] = {
|
|
87
|
-
...slotProps[rootSlot],
|
|
88
|
-
...rootHtmlProps,
|
|
89
|
-
className: mergedRootClassName || void 0
|
|
90
|
-
};
|
|
91
|
-
if (!slotProps.root) slotProps.root = slotProps[rootSlot];
|
|
92
|
-
return slotProps;
|
|
93
|
-
}
|
|
94
|
-
function mergeMotionConfig(defaultMotion, userMotionConfig) {
|
|
95
|
-
if (!defaultMotion && !userMotionConfig) return;
|
|
96
|
-
const merged = { ...defaultMotion ?? {} };
|
|
97
|
-
if (!userMotionConfig) return merged;
|
|
98
|
-
for (const [slot, slotConfig] of Object.entries(userMotionConfig)) {
|
|
99
|
-
if (slotConfig && typeof slotConfig === "object" && !Array.isArray(slotConfig) && merged[slot] && typeof merged[slot] === "object" && !Array.isArray(merged[slot])) {
|
|
100
|
-
merged[slot] = {
|
|
101
|
-
...merged[slot],
|
|
102
|
-
...slotConfig
|
|
103
|
-
};
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
merged[slot] = slotConfig;
|
|
107
|
-
}
|
|
108
|
-
return merged;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Render a component that hasn't been transformed by the build plugin.
|
|
112
|
-
* Strips internal data attributes, runs processStyleProps to extract style
|
|
113
|
-
* props into className, and builds minimal slot props for the render function.
|
|
114
|
-
*
|
|
115
|
-
* Returns both the slot props and any extracted own props (non-HTML-attribute
|
|
116
|
-
* values like arrays and objects that should be passed at the top level of
|
|
117
|
-
* the render props, not inside slot props).
|
|
118
|
-
*/
|
|
119
|
-
function buildUntransformedSlotProps(resolveProps, injectedClassName, processStylePropsFn) {
|
|
120
|
-
const { "data-uds-id": _internalUdsId, "data-uds-source": _internalUdsSource, ...publicResolveProps } = resolveProps;
|
|
121
|
-
const { className: userClassName, ...styleAndHtml } = publicResolveProps;
|
|
122
|
-
const [styleClassName, htmlOnly] = processStylePropsFn(styleAndHtml, {
|
|
123
|
-
extractNativeProps: true,
|
|
124
|
-
existingClassName: typeof userClassName === "string" ? userClassName : void 0
|
|
125
|
-
});
|
|
126
|
-
const htmlProps = {};
|
|
127
|
-
const extractedOwnProps = {};
|
|
128
|
-
for (const key in htmlOnly) {
|
|
129
|
-
if (!Object.hasOwn(htmlOnly, key)) continue;
|
|
130
|
-
const value = htmlOnly[key];
|
|
131
|
-
if (key === "as" || key !== "style" && (Array.isArray(value) || value !== null && typeof value === "object" && !(value instanceof Date))) extractedOwnProps[key] = value;
|
|
132
|
-
else htmlProps[key] = value;
|
|
133
|
-
}
|
|
134
|
-
for (const key in styleAndHtml) {
|
|
135
|
-
if (!Object.hasOwn(styleAndHtml, key)) continue;
|
|
136
|
-
if (!(key in htmlOnly)) extractedOwnProps[key] = styleAndHtml[key];
|
|
137
|
-
}
|
|
138
|
-
if (typeof userClassName === "string") for (const token of userClassName.split(" ")) {
|
|
139
|
-
if (!token) continue;
|
|
140
|
-
const entry = stylePropsTwMap[token];
|
|
141
|
-
if (!entry) continue;
|
|
142
|
-
const [propName, propValue] = Object.entries(entry)[0];
|
|
143
|
-
if (propName && propValue !== void 0 && !(propName in extractedOwnProps)) extractedOwnProps[propName] = propValue;
|
|
144
|
-
}
|
|
145
|
-
const rootClassName = [
|
|
146
|
-
typeof userClassName === "string" ? userClassName : void 0,
|
|
147
|
-
styleClassName,
|
|
148
|
-
injectedClassName
|
|
149
|
-
].filter(Boolean).join(" ").trim();
|
|
150
|
-
return {
|
|
151
|
-
slotProps: { root: {
|
|
152
|
-
...htmlProps,
|
|
153
|
-
className: rootClassName || void 0
|
|
154
|
-
} },
|
|
155
|
-
extractedOwnProps
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function applySlotOverrides(slotProps, slotOverrides, processStylePropsFn) {
|
|
159
|
-
if (!slotOverrides) return slotProps;
|
|
160
|
-
const merged = { ...slotProps };
|
|
161
|
-
for (const [slotName, overrideProps] of Object.entries(slotOverrides)) {
|
|
162
|
-
if (!merged[slotName]) continue;
|
|
163
|
-
const [overrideClassName, overrideHtmlProps] = processStylePropsFn(overrideProps, { extractNativeProps: true });
|
|
164
|
-
const existing = merged[slotName];
|
|
165
|
-
const mergedClassName = [
|
|
166
|
-
typeof existing.className === "string" ? existing.className : "",
|
|
167
|
-
overrideClassName,
|
|
168
|
-
typeof overrideHtmlProps.className === "string" ? overrideHtmlProps.className : ""
|
|
169
|
-
].filter(Boolean).join(" ").trim();
|
|
170
|
-
const { className: _overrideHtmlCn, ...restHtmlProps } = overrideHtmlProps;
|
|
171
|
-
merged[slotName] = {
|
|
172
|
-
...existing,
|
|
173
|
-
...restHtmlProps,
|
|
174
|
-
className: mergedClassName || void 0
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
return merged;
|
|
178
|
-
}
|
|
179
|
-
function mergeSlotMotionProps(slotProps, motionConfig) {
|
|
180
|
-
if (!motionConfig) return slotProps;
|
|
181
|
-
const merged = { ...slotProps };
|
|
182
|
-
for (const [slot, slotMotion] of Object.entries(motionConfig)) {
|
|
183
|
-
if (!slotMotion || typeof slotMotion !== "object" || Array.isArray(slotMotion) || !merged[slot]) continue;
|
|
184
|
-
merged[slot] = {
|
|
185
|
-
...merged[slot],
|
|
186
|
-
...slotMotion
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
return merged;
|
|
190
|
-
}
|
|
191
|
-
//#endregion
|
|
192
|
-
export { applySlotOverrides, assertTransformedConfig, buildSlotProps, buildUntransformedSlotProps, inferComponentNameFromRenderFn, mergeMotionConfig, mergeRootClassName, mergeSlotMotionProps, partitionMergedProps };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { CreateComponentConfig, CreateComponentProps, CreateComponentRenderFn, CreateComponentSlotTagConfig, CreateComponentTypeInput } from "@uds/types";
|
|
2
|
-
|
|
3
|
-
//#region ../core/dist/createComponent.d.ts
|
|
4
|
-
type PrimitiveTag = keyof React.JSX.IntrinsicElements;
|
|
5
|
-
type SpecConfig<TSpec> = TSpec extends {
|
|
6
|
-
config: infer TConfig extends CreateComponentTypeInput;
|
|
7
|
-
} ? TConfig : string;
|
|
8
|
-
type SpecOwnProps<TSpec> = TSpec extends {
|
|
9
|
-
props: infer TOwnProps;
|
|
10
|
-
} ? TOwnProps : TSpec;
|
|
11
|
-
type SpecSlotConfig<TSpec> = SpecConfig<TSpec> extends infer TConfig extends CreateComponentTypeInput ? TSpec extends {
|
|
12
|
-
slots: infer TSlots;
|
|
13
|
-
} ? TSlots extends CreateComponentSlotTagConfig<TConfig> ? TSlots : 'div' : 'div' : 'div';
|
|
14
|
-
type PrimitiveOwnProps<TSpecOrProps> = TSpecOrProps extends {
|
|
15
|
-
props: infer TOwnProps;
|
|
16
|
-
} ? TOwnProps : TSpecOrProps;
|
|
17
|
-
/**
|
|
18
|
-
* Create a custom uds component with automatic style/variant resolution.
|
|
19
|
-
*
|
|
20
|
-
* At author-time, call `createComponent(renderFn)`. The loader infers the
|
|
21
|
-
* component name from the assigned variable (e.g. `const Name = createComponent(...)`).
|
|
22
|
-
*
|
|
23
|
-
* The uds-loader build plugin rewrites calls to inline a config object so
|
|
24
|
-
* the runtime can resolve styles without an extra manifest import.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* type CardConfig = typeof cardConfig;
|
|
29
|
-
*
|
|
30
|
-
* interface CardSpec {
|
|
31
|
-
* config: CardConfig;
|
|
32
|
-
* props: CardOwnProps;
|
|
33
|
-
* }
|
|
34
|
-
*
|
|
35
|
-
* export const Card = createComponent<CardSpec>(
|
|
36
|
-
* ({ props, children, title, actions }) => (
|
|
37
|
-
* <VStack {...props.root}>
|
|
38
|
-
* <Text {...props.title}>{title}</Text>
|
|
39
|
-
* {children}
|
|
40
|
-
* </VStack>
|
|
41
|
-
* )
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
declare function createComponent<TSpecOrProps = {}>(tag: PrimitiveTag): React.FC<TSpecOrProps extends {
|
|
46
|
-
config: infer TConfig extends CreateComponentTypeInput;
|
|
47
|
-
props: infer TOwnProps;
|
|
48
|
-
slots: infer TSlots;
|
|
49
|
-
} ? CreateComponentProps<TConfig, TOwnProps, TSlots extends CreateComponentSlotTagConfig<TConfig> ? TSlots : PrimitiveTag> : TSpecOrProps extends {
|
|
50
|
-
config: infer TConfig extends CreateComponentTypeInput;
|
|
51
|
-
props: infer TOwnProps;
|
|
52
|
-
} ? CreateComponentProps<TConfig, TOwnProps, PrimitiveTag> : PrimitiveOwnProps<TSpecOrProps>>;
|
|
53
|
-
declare function createComponent<TSpec>(renderFn: CreateComponentRenderFn<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>): React.FC<CreateComponentProps<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>>;
|
|
54
|
-
declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { createComponent };
|