@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,85 +0,0 @@
|
|
|
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 };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ClassValue } from "clsx";
|
|
2
|
-
import { ModifierProp, ModifierProps, StyleAndModifierProps, StyleProps } from "@uds/types";
|
|
3
|
-
|
|
4
|
-
//#region ../core/dist/getStyles.d.ts
|
|
5
|
-
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
6
|
-
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
7
|
-
declare function toCamelCase(str: string): string;
|
|
8
|
-
declare function createVariants<K extends Record<string, StyleAndModifierProps>>(variants: K): K;
|
|
9
|
-
declare function cx(...inputs: ClassValue[]): string;
|
|
10
|
-
interface ProcessStylesParams {
|
|
11
|
-
extractNativeProps?: boolean;
|
|
12
|
-
modifier?: ModifierProp;
|
|
13
|
-
/**
|
|
14
|
-
* Existing className string. When provided, any style prop that is already
|
|
15
|
-
* represented by a class in this string will be skipped. This prevents
|
|
16
|
-
* component defaults from conflicting with user-provided values
|
|
17
|
-
* (e.g. HStack defaulting alignItems='center' when user set 'end').
|
|
18
|
-
*/
|
|
19
|
-
existingClassName?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Config-driven modifier prefix → CSS selector map.
|
|
22
|
-
* Used by ensureArbitraryRule to generate correct CSS for custom modifiers
|
|
23
|
-
* (e.g. { "dark:": ".dark", "sm:": "@media (min-width: 640px)" }).
|
|
24
|
-
*
|
|
25
|
-
* Built-in pseudo modifiers (hover:, focus:, etc.) are handled automatically.
|
|
26
|
-
* Only needed for config modes and custom modifiers.
|
|
27
|
-
*/
|
|
28
|
-
modifierSelectors?: Record<string, string>;
|
|
29
|
-
}
|
|
30
|
-
declare function processStyleProps(props?: StyleProps, opts?: ProcessStylesParams): readonly [string, Record<string, unknown>];
|
|
31
|
-
interface GetStylesParams extends StyleProps, ModifierProps {
|
|
32
|
-
className?: string;
|
|
33
|
-
}
|
|
34
|
-
/** Consumer facing function that takes style props and returns a className.
|
|
35
|
-
* Unlike processStyleProps (runtime), this produces Tailwind-compatible
|
|
36
|
-
* class names for arbitrary bracket values (e.g. `[768px]` → `max-w-[768px]`)
|
|
37
|
-
* so they can be included in the CSS safelist.
|
|
38
|
-
*/
|
|
39
|
-
declare function getStyles(props: GetStylesParams): string;
|
|
40
|
-
declare function getVariantClassName(componentName: string, variant: string | undefined): string;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { componentSlotClass } from "../../utils/dist/string-utils/componentClassName.js";
|
|
2
|
-
import "../../utils/dist/index.js";
|
|
3
|
-
import { expandCompositeStyles, getCompositeStylesConfig } from "./compositeStyles.js";
|
|
4
|
-
import { propMappings } from "./style-prop-data.js";
|
|
5
|
-
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
6
|
-
import { modifierMappings } from "./modifier-mappings.js";
|
|
7
|
-
import { colorPropToOpacityProp } from "./color-opacity-map.js";
|
|
8
|
-
import { clsx } from "clsx";
|
|
9
|
-
//#region ../core/dist/getStyles.js
|
|
10
|
-
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
11
|
-
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
12
|
-
function toCamelCase(str) {
|
|
13
|
-
if (str.startsWith("--")) return str;
|
|
14
|
-
return str.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase());
|
|
15
|
-
}
|
|
16
|
-
const _dynRuleCache = /* @__PURE__ */ new Set();
|
|
17
|
-
let _dynSheet = null;
|
|
18
|
-
/**
|
|
19
|
-
* Built-in modifier prefix → CSS pseudo-selector, derived from modifierMappings.
|
|
20
|
-
* e.g. "hover:" → ":hover", "focus-visible:" → ":focus-visible"
|
|
21
|
-
*
|
|
22
|
-
* Complex modifiers (data attributes, pseudo-elements, at-rules) are excluded —
|
|
23
|
-
* they're unlikely to appear with arbitrary values at runtime.
|
|
24
|
-
*/
|
|
25
|
-
const _builtinPseudoMap = {};
|
|
26
|
-
for (const prefix of Object.values(modifierMappings)) {
|
|
27
|
-
if (prefix.startsWith("data-[") || prefix.startsWith("aria-") || prefix.includes("::") || prefix.includes("*")) continue;
|
|
28
|
-
_builtinPseudoMap[prefix] = `:${prefix.slice(0, -1)}`;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Resolve a single modifier part to its CSS selector contribution.
|
|
32
|
-
*
|
|
33
|
-
* @param modifierSelectors - Config-driven map of custom modifier prefix → CSS selector
|
|
34
|
-
* (e.g. { "dark:": ".dark", "sm:": "@media (min-width: 640px)" }).
|
|
35
|
-
* Passed through from processStyleProps opts.
|
|
36
|
-
*/
|
|
37
|
-
/** @internal Exported for testing only. */
|
|
38
|
-
function resolveModifierPart(part, modifierSelectors) {
|
|
39
|
-
const pseudo = _builtinPseudoMap[part];
|
|
40
|
-
if (pseudo) return {
|
|
41
|
-
type: "pseudo",
|
|
42
|
-
selector: pseudo
|
|
43
|
-
};
|
|
44
|
-
const custom = modifierSelectors?.[part];
|
|
45
|
-
if (custom) return {
|
|
46
|
-
type: "ancestor",
|
|
47
|
-
selector: custom
|
|
48
|
-
};
|
|
49
|
-
const name = part.slice(0, -1);
|
|
50
|
-
if (name) return {
|
|
51
|
-
type: "ancestor",
|
|
52
|
-
selector: `.${name}`
|
|
53
|
-
};
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Inject a CSS rule for an arbitrary value class if it doesn't already exist.
|
|
58
|
-
* Handles both top-level (bg-[#ff0000]) and modifier (hover:bg-[#00cc6e]) classes.
|
|
59
|
-
*
|
|
60
|
-
* @param modifierSelectors - Config-driven modifier → CSS selector map, threaded
|
|
61
|
-
* from processStyleProps. Enables config-aware CSS rule generation.
|
|
62
|
-
*/
|
|
63
|
-
function ensureArbitraryRule(className, modifier, cssProperty, cssValue, modifierSelectors) {
|
|
64
|
-
if (_dynRuleCache.has(className)) return;
|
|
65
|
-
_dynRuleCache.add(className);
|
|
66
|
-
if (typeof document === "undefined") return;
|
|
67
|
-
if (!_dynSheet) {
|
|
68
|
-
const el = document.createElement("style");
|
|
69
|
-
el.setAttribute("data-uds-dynamic-arb", "");
|
|
70
|
-
document.head.appendChild(el);
|
|
71
|
-
_dynSheet = el.sheet;
|
|
72
|
-
}
|
|
73
|
-
let ancestorParts = "";
|
|
74
|
-
let pseudoParts = "";
|
|
75
|
-
if (modifier) {
|
|
76
|
-
const parts = modifier.split(":").filter(Boolean).map((p) => `${p}:`);
|
|
77
|
-
for (const part of parts) {
|
|
78
|
-
const resolved = resolveModifierPart(part, modifierSelectors);
|
|
79
|
-
if (!resolved) continue;
|
|
80
|
-
if (resolved.type === "ancestor") ancestorParts += `${resolved.selector} `;
|
|
81
|
-
else pseudoParts += resolved.selector;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const escaped = CSS.escape(className);
|
|
85
|
-
const rule = `${ancestorParts}.${escaped}${pseudoParts} { ${cssProperty}: ${cssValue}; }`;
|
|
86
|
-
try {
|
|
87
|
-
_dynSheet.insertRule(rule, _dynSheet.cssRules.length);
|
|
88
|
-
} catch {}
|
|
89
|
-
}
|
|
90
|
-
/** Detect arbitrary values like `[#ff0000]` or `[250px]` */
|
|
91
|
-
function parseArbitraryValue(val, propName) {
|
|
92
|
-
if (typeof val !== "string") return null;
|
|
93
|
-
const match = val.match(/^\[(.+)\]$/);
|
|
94
|
-
if (!match) return null;
|
|
95
|
-
const mapping = propMappings[propName];
|
|
96
|
-
if (!mapping?.cssProperty && !mapping?.arbitraryValueTemplate) return null;
|
|
97
|
-
const rawValue = match[1];
|
|
98
|
-
if (mapping.arbitraryValueTemplate) {
|
|
99
|
-
const { cssProperty, valueTemplate } = mapping.arbitraryValueTemplate;
|
|
100
|
-
return {
|
|
101
|
-
cssValue: valueTemplate.replace("%s", rawValue),
|
|
102
|
-
cssProperty: toCamelCase(cssProperty)
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
cssValue: rawValue,
|
|
107
|
-
cssProperty: toCamelCase(mapping.cssProperty ?? "")
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/** Set of opacity prop names — these are consumed by their parent color prop, not processed independently */
|
|
111
|
-
const opacityPropSet = new Set(Object.values(colorPropToOpacityProp));
|
|
112
|
-
function createVariants(variants) {
|
|
113
|
-
return variants;
|
|
114
|
-
}
|
|
115
|
-
const parse = (prefix, value) => {
|
|
116
|
-
if (value === "") return prefix;
|
|
117
|
-
return (prefix === value ? String(value) : `${prefix}-${value}`).replace(/\./g, "_").replace(/\//g, "-");
|
|
118
|
-
};
|
|
119
|
-
const classnames = {};
|
|
120
|
-
const styleOptionsByProp = {};
|
|
121
|
-
for (const entry of Object.values(stylePropsTwMap)) {
|
|
122
|
-
const [propName, option] = Object.entries(entry)[0] ?? [];
|
|
123
|
-
if (!propName || typeof option !== "string") continue;
|
|
124
|
-
if (!styleOptionsByProp[propName]) styleOptionsByProp[propName] = /* @__PURE__ */ new Set();
|
|
125
|
-
styleOptionsByProp[propName].add(option);
|
|
126
|
-
}
|
|
127
|
-
for (const [propName, mapping] of Object.entries(propMappings)) {
|
|
128
|
-
const options = styleOptionsByProp[propName] ?? /* @__PURE__ */ new Set();
|
|
129
|
-
const hasBoolean = options.has("boolean");
|
|
130
|
-
const isNoPrefix = mapping.classPrefix === "no-prefix";
|
|
131
|
-
const handler = (val) => {
|
|
132
|
-
if (hasBoolean && options.size === 1) return val === true ? mapping.classPrefix : "";
|
|
133
|
-
if (hasBoolean) return val === true ? mapping.classPrefix : parse(mapping.classPrefix, val);
|
|
134
|
-
if (isNoPrefix) return String(val);
|
|
135
|
-
return parse(mapping.classPrefix, val);
|
|
136
|
-
};
|
|
137
|
-
classnames[propName] = handler;
|
|
138
|
-
}
|
|
139
|
-
const colorPropCssInfo = {};
|
|
140
|
-
for (const [colorProp] of Object.entries(colorPropToOpacityProp)) {
|
|
141
|
-
const mapping = propMappings[colorProp];
|
|
142
|
-
if (mapping?.cssProperty && mapping.defaultVarPrefix) colorPropCssInfo[colorProp] = {
|
|
143
|
-
cssProperty: mapping.cssProperty,
|
|
144
|
-
varPrefix: mapping.defaultVarPrefix
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function cx(...inputs) {
|
|
148
|
-
return clsx(inputs);
|
|
149
|
-
}
|
|
150
|
-
function processStyleProps(props = {}, opts = {}) {
|
|
151
|
-
const compositeStylesConfig = getCompositeStylesConfig();
|
|
152
|
-
const hasCompositeStyles = Object.keys(compositeStylesConfig).length > 0;
|
|
153
|
-
let effectiveProps = props;
|
|
154
|
-
let compositeStyleMarkerClasses;
|
|
155
|
-
if (hasCompositeStyles && !opts.modifier) {
|
|
156
|
-
const { expanded, markerClasses } = expandCompositeStyles(props, compositeStylesConfig);
|
|
157
|
-
effectiveProps = expanded;
|
|
158
|
-
if (markerClasses.length > 0) compositeStyleMarkerClasses = markerClasses;
|
|
159
|
-
}
|
|
160
|
-
const coveredProps = opts.existingClassName ? getPropsFromClassName(opts.existingClassName) : void 0;
|
|
161
|
-
const classnameParts = [];
|
|
162
|
-
const nativeProps = {};
|
|
163
|
-
let inlineStyles;
|
|
164
|
-
if (compositeStyleMarkerClasses) classnameParts.push(...compositeStyleMarkerClasses);
|
|
165
|
-
for (const propKey in effectiveProps) {
|
|
166
|
-
if (!Object.hasOwn(effectiveProps, propKey)) continue;
|
|
167
|
-
const propValue = effectiveProps[propKey];
|
|
168
|
-
if (propValue === void 0) continue;
|
|
169
|
-
const modifierName = modifierMappings[propKey];
|
|
170
|
-
if (modifierName) {
|
|
171
|
-
const combinedModifier = opts.modifier ? `${opts.modifier}${modifierName}` : modifierName;
|
|
172
|
-
const [newClassName] = processStyleProps(propValue, {
|
|
173
|
-
...opts,
|
|
174
|
-
modifier: combinedModifier
|
|
175
|
-
});
|
|
176
|
-
if (newClassName) classnameParts.push(newClassName);
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
if (propKey.startsWith("_")) {
|
|
180
|
-
const customModifierName = `${propKey.slice(1)}:`;
|
|
181
|
-
const combinedModifier = opts.modifier ? `${opts.modifier}${customModifierName}` : customModifierName;
|
|
182
|
-
const [newClassName] = processStyleProps(propValue, {
|
|
183
|
-
...opts,
|
|
184
|
-
modifier: combinedModifier
|
|
185
|
-
});
|
|
186
|
-
if (newClassName) classnameParts.push(newClassName);
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
if (coveredProps?.has(propKey)) continue;
|
|
190
|
-
{
|
|
191
|
-
const arbitrary = parseArbitraryValue(propValue, propKey);
|
|
192
|
-
if (arbitrary) {
|
|
193
|
-
const opacityPropName = colorPropToOpacityProp[propKey];
|
|
194
|
-
if (opacityPropName) {
|
|
195
|
-
const opacityValue = effectiveProps[opacityPropName];
|
|
196
|
-
if (opacityValue !== void 0) arbitrary.cssValue = `color-mix(in srgb, ${arbitrary.cssValue} ${opacityValue}%, transparent)`;
|
|
197
|
-
}
|
|
198
|
-
const handler = classnames[propKey];
|
|
199
|
-
if (handler) {
|
|
200
|
-
const baseClass = handler(propValue);
|
|
201
|
-
if (baseClass) {
|
|
202
|
-
const opacityPropName = colorPropToOpacityProp[propKey];
|
|
203
|
-
const opacityValue = opacityPropName ? effectiveProps[opacityPropName] : void 0;
|
|
204
|
-
const classWithOpacity = `${baseClass}${opacityValue !== void 0 ? `/${opacityValue}` : ""}`;
|
|
205
|
-
const fullClass = opts.modifier ? `${opts.modifier}${classWithOpacity}` : classWithOpacity;
|
|
206
|
-
const kebabProp = arbitrary.cssProperty.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
207
|
-
ensureArbitraryRule(fullClass, opts.modifier ?? null, kebabProp, arbitrary.cssValue, opts.modifierSelectors);
|
|
208
|
-
classnameParts.push(fullClass);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
if (opacityPropSet.has(propKey)) continue;
|
|
215
|
-
const handler = classnames[propKey];
|
|
216
|
-
if (handler) {
|
|
217
|
-
const opacityPropName = colorPropToOpacityProp[propKey];
|
|
218
|
-
if (opacityPropName && !opts.modifier && typeof propValue === "string") {
|
|
219
|
-
const opacityValue = effectiveProps[opacityPropName];
|
|
220
|
-
const baseToken = propValue;
|
|
221
|
-
if (opacityValue !== void 0) {
|
|
222
|
-
const cssInfo = colorPropCssInfo[propKey];
|
|
223
|
-
if (cssInfo) {
|
|
224
|
-
const safeToken = baseToken.replace(/[./]/g, "_");
|
|
225
|
-
const varName = `--uds-${cssInfo.varPrefix}-${safeToken}`;
|
|
226
|
-
const cssProp = toCamelCase(cssInfo.cssProperty);
|
|
227
|
-
inlineStyles ??= {};
|
|
228
|
-
inlineStyles[cssProp] = `color-mix(in srgb, var(${varName}) ${opacityValue}%, transparent)`;
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
const propClassname = String(handler(propValue));
|
|
234
|
-
if (propClassname) {
|
|
235
|
-
const finalClassname = opts.modifier ? `${opts.modifier}${propClassname}` : propClassname;
|
|
236
|
-
classnameParts.push(finalClassname);
|
|
237
|
-
}
|
|
238
|
-
continue;
|
|
239
|
-
}
|
|
240
|
-
if (opts.extractNativeProps) nativeProps[propKey] = propValue;
|
|
241
|
-
}
|
|
242
|
-
if (inlineStyles && opts.extractNativeProps) nativeProps.style = nativeProps.style ? {
|
|
243
|
-
...nativeProps.style,
|
|
244
|
-
...inlineStyles
|
|
245
|
-
} : inlineStyles;
|
|
246
|
-
return [clsx(classnameParts.join(" ")), nativeProps];
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Extract the set of style prop names represented by classes in a className string.
|
|
250
|
-
* Uses the reverse map (stylePropsTwMap) to identify which props are covered.
|
|
251
|
-
*/
|
|
252
|
-
function getPropsFromClassName(className) {
|
|
253
|
-
const props = /* @__PURE__ */ new Set();
|
|
254
|
-
for (const token of className.split(" ")) {
|
|
255
|
-
if (!token) continue;
|
|
256
|
-
const entry = stylePropsTwMap[token];
|
|
257
|
-
if (!entry) continue;
|
|
258
|
-
const propName = Object.keys(entry)[0];
|
|
259
|
-
if (propName) props.add(propName);
|
|
260
|
-
}
|
|
261
|
-
return props;
|
|
262
|
-
}
|
|
263
|
-
/** Consumer facing function that takes style props and returns a className.
|
|
264
|
-
* Unlike processStyleProps (runtime), this produces Tailwind-compatible
|
|
265
|
-
* class names for arbitrary bracket values (e.g. `[768px]` → `max-w-[768px]`)
|
|
266
|
-
* so they can be included in the CSS safelist.
|
|
267
|
-
*/
|
|
268
|
-
function getStyles(props) {
|
|
269
|
-
const processed = {};
|
|
270
|
-
const arbitraryParts = [];
|
|
271
|
-
for (const key in props) {
|
|
272
|
-
if (!Object.hasOwn(props, key)) continue;
|
|
273
|
-
const val = props[key];
|
|
274
|
-
if (typeof val === "string" && /^\[.+\](?:\/\d+)?$/.test(val)) {
|
|
275
|
-
const mapping = propMappings[key];
|
|
276
|
-
if (mapping?.classPrefix && mapping.classPrefix !== "no-prefix") {
|
|
277
|
-
arbitraryParts.push(`${mapping.classPrefix}-${val}`);
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
processed[key] = val;
|
|
282
|
-
}
|
|
283
|
-
for (const [colorProp, opacityPropName] of Object.entries(colorPropToOpacityProp)) {
|
|
284
|
-
const opacityValue = processed[opacityPropName];
|
|
285
|
-
if (opacityValue !== void 0 && processed[colorProp] !== void 0) {
|
|
286
|
-
processed[colorProp] = `${processed[colorProp]}/${opacityValue}`;
|
|
287
|
-
delete processed[opacityPropName];
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
const [finalClassName] = processStyleProps(processed, { extractNativeProps: false });
|
|
291
|
-
if (arbitraryParts.length === 0) return finalClassName;
|
|
292
|
-
return [finalClassName, ...arbitraryParts].filter(Boolean).join(" ");
|
|
293
|
-
}
|
|
294
|
-
function getVariantClassName(componentName, variant) {
|
|
295
|
-
const base = componentSlotClass(componentName, "root");
|
|
296
|
-
if (!variant) return base;
|
|
297
|
-
return `${base} ${base}--variant-${variant}`;
|
|
298
|
-
}
|
|
299
|
-
//#endregion
|
|
300
|
-
export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig } from "./compositeStyles.js";
|
|
2
|
-
import { PropMapping, propMappings } from "./style-prop-data.js";
|
|
3
|
-
import { ConfigurablePropertyEntry, CssVariablePrefixEntry, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes } from "./configurable-prop-helpers.js";
|
|
4
|
-
import { createComponent } from "./createComponent.js";
|
|
5
|
-
import { ComponentExample, createComponentExample } from "./createComponentExample.js";
|
|
6
|
-
import { createProvider } from "./createProvider.js";
|
|
7
|
-
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
8
|
-
import { createComponentStyler } from "./getComponentStyles.js";
|
|
9
|
-
import { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase } from "./getStyles.js";
|
|
10
|
-
import { ModifierEntry, modifierMappings } from "./modifier-mappings.js";
|
|
11
|
-
import { resolveMotionState } from "./resolveMotionState.js";
|
|
12
|
-
import { TransformedMotionProps, transformPreset } from "./transformPreset.js";
|
|
13
|
-
import { withDefaultStyleProps } from "./withDefaultStyleProps.js";
|
package/dist/core/dist/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "./compositeStyles.js";
|
|
2
|
-
import "./style-prop-data.js";
|
|
3
|
-
import "./configurable-prop-helpers.js";
|
|
4
|
-
import "./generated/stylePropsTwMap.js";
|
|
5
|
-
import "./modifier-mappings.js";
|
|
6
|
-
import "./getStyles.js";
|
|
7
|
-
import "./getComponentStyles.js";
|
|
8
|
-
import "./createComponent.js";
|
|
9
|
-
import "./createComponentExample.js";
|
|
10
|
-
import "./createProvider.js";
|
|
11
|
-
import "./resolveMotionState.js";
|
|
12
|
-
import "./transformPreset.js";
|
|
13
|
-
import "./withDefaultStyleProps.js";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ModifierProp } from "@uds/types";
|
|
2
|
-
|
|
3
|
-
//#region ../core/dist/modifier-mappings.d.ts
|
|
4
|
-
declare const modifierMappings: Record<ModifierProp, string>;
|
|
5
|
-
interface ModifierEntry {
|
|
6
|
-
prop: string;
|
|
7
|
-
cssSelector: string;
|
|
8
|
-
category: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { ModifierEntry, modifierMappings };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
//#region ../core/dist/modifier-mappings.js
|
|
2
|
-
const modifierMappings = {
|
|
3
|
-
_after: "after:",
|
|
4
|
-
_hover: "hover:",
|
|
5
|
-
_focus: "focus:",
|
|
6
|
-
_focusWithin: "focus-within:",
|
|
7
|
-
_focusVisible: "focus-visible:",
|
|
8
|
-
_active: "active:",
|
|
9
|
-
_visited: "visited:",
|
|
10
|
-
_target: "target:",
|
|
11
|
-
_first: "first:",
|
|
12
|
-
_last: "last:",
|
|
13
|
-
_only: "only:",
|
|
14
|
-
_odd: "odd:",
|
|
15
|
-
_even: "even:",
|
|
16
|
-
_firstOfType: "first-of-type:",
|
|
17
|
-
_lastOfType: "last-of-type:",
|
|
18
|
-
_onlyOfType: "only-of-type:",
|
|
19
|
-
_empty: "empty:",
|
|
20
|
-
_disabled: "disabled:",
|
|
21
|
-
_enabled: "enabled:",
|
|
22
|
-
_checked: "checked:",
|
|
23
|
-
_indeterminate: "indeterminate:",
|
|
24
|
-
_default: "default:",
|
|
25
|
-
_required: "required:",
|
|
26
|
-
_valid: "valid:",
|
|
27
|
-
_invalid: "invalid:",
|
|
28
|
-
_inRange: "in-range:",
|
|
29
|
-
_outOfRange: "out-of-range:",
|
|
30
|
-
_placeholderShown: "placeholder-shown:",
|
|
31
|
-
_autofill: "autofill:",
|
|
32
|
-
_readonly: "read-only:",
|
|
33
|
-
_file: "file:",
|
|
34
|
-
_selection: "selection:",
|
|
35
|
-
_backdrop: "backdrop:",
|
|
36
|
-
_motionReduce: "motion-reduce:",
|
|
37
|
-
_motionSafe: "motion-safe:",
|
|
38
|
-
_contrastMore: "contrast-more:",
|
|
39
|
-
_contrastLess: "contrast-less:",
|
|
40
|
-
_forcedColors: "forced-colors:",
|
|
41
|
-
_placeholder: "placeholder:",
|
|
42
|
-
_ariaBusy: "aria-busy:",
|
|
43
|
-
_ariaChecked: "aria-checked:",
|
|
44
|
-
_ariaHidden: "aria-hidden:",
|
|
45
|
-
_ariaPressed: "aria-pressed:",
|
|
46
|
-
_ariaReadonly: "aria-readonly:",
|
|
47
|
-
_ariaRequired: "aria-required:",
|
|
48
|
-
_ariaSelected: "aria-selected:",
|
|
49
|
-
_ariaCurrent: "aria-[current]:",
|
|
50
|
-
_ariaDisabled: "aria-disabled:",
|
|
51
|
-
_ariaExpanded: "aria-expanded:",
|
|
52
|
-
_dataDisabled: "data-[disabled=true]:",
|
|
53
|
-
_dataStateOpen: "data-[state=open]:",
|
|
54
|
-
_dataStateClosed: "data-[state=closed]:",
|
|
55
|
-
_startingStyle: "starting-style:",
|
|
56
|
-
_scrollbar: "*::-webkit-scrollbar:",
|
|
57
|
-
_scrollbarThumb: "*::-webkit-scrollbar-thumb:",
|
|
58
|
-
_scrollbarTrack: "*::-webkit-scrollbar-track:"
|
|
59
|
-
};
|
|
60
|
-
//#endregion
|
|
61
|
-
export { modifierMappings };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region ../core/dist/resolveMotionState.js
|
|
2
|
-
function resolveInterpolate(marker, index) {
|
|
3
|
-
const { output, extrapolate } = marker;
|
|
4
|
-
if (index < output.length) return output[index];
|
|
5
|
-
if (extrapolate === "clamp") return output[output.length - 1];
|
|
6
|
-
if (extrapolate === "identity") return index;
|
|
7
|
-
const last = output[output.length - 1];
|
|
8
|
-
return last + (last - output[output.length - 2]) * (index - (output.length - 1));
|
|
9
|
-
}
|
|
10
|
-
function resolveMotionState(stateKeyframe, index) {
|
|
11
|
-
const resolved = {};
|
|
12
|
-
for (const [key, value] of Object.entries(stateKeyframe)) if (typeof value === "number") resolved[key] = value;
|
|
13
|
-
else if (value && typeof value === "object" && value.__type === "interpolate") resolved[key] = resolveInterpolate(value, index);
|
|
14
|
-
return resolved;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { resolveMotionState };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
//#region ../core/dist/resolveProps.boundaries.js
|
|
2
|
-
/** Matches event handlers (`onClick`, `onKeyDown`, etc.) */
|
|
3
|
-
const EVENT_HANDLER_RE = /^on[A-Z]/;
|
|
4
|
-
/** Returns true if the key should be forwarded to the DOM by pattern. */
|
|
5
|
-
function isPatternMatchedHtmlProp(key) {
|
|
6
|
-
return EVENT_HANDLER_RE.test(key) || key.startsWith("aria-") || key.startsWith("data-");
|
|
7
|
-
}
|
|
8
|
-
/** HTML attributes that are universally forwarded on every element. */
|
|
9
|
-
const UNIVERSAL_HTML_PROPS = new Set([
|
|
10
|
-
"id",
|
|
11
|
-
"ref",
|
|
12
|
-
"style",
|
|
13
|
-
"tabIndex",
|
|
14
|
-
"role",
|
|
15
|
-
"title",
|
|
16
|
-
"hidden",
|
|
17
|
-
"dir",
|
|
18
|
-
"lang",
|
|
19
|
-
"slot",
|
|
20
|
-
"draggable",
|
|
21
|
-
"spellCheck",
|
|
22
|
-
"autoFocus",
|
|
23
|
-
"enterKeyHint",
|
|
24
|
-
"inputMode",
|
|
25
|
-
"contentEditable",
|
|
26
|
-
"suppressContentEditableWarning",
|
|
27
|
-
"suppressHydrationWarning",
|
|
28
|
-
"translate",
|
|
29
|
-
"itemScope",
|
|
30
|
-
"itemType",
|
|
31
|
-
"itemID",
|
|
32
|
-
"itemProp",
|
|
33
|
-
"itemRef",
|
|
34
|
-
"nonce",
|
|
35
|
-
"inert"
|
|
36
|
-
]);
|
|
37
|
-
/**
|
|
38
|
-
* Per-element HTML props that should be kept flat (not inside `_html`).
|
|
39
|
-
* Arrays are `satisfies` checked at the type level in the source file;
|
|
40
|
-
* at runtime they're plain Sets for O(1) lookup.
|
|
41
|
-
*/
|
|
42
|
-
const ELEMENT_HTML_PROPS = {
|
|
43
|
-
button: new Set([
|
|
44
|
-
"disabled",
|
|
45
|
-
"type",
|
|
46
|
-
"form",
|
|
47
|
-
"formAction",
|
|
48
|
-
"formMethod",
|
|
49
|
-
"formNoValidate",
|
|
50
|
-
"formTarget",
|
|
51
|
-
"formEncType",
|
|
52
|
-
"popoverTarget",
|
|
53
|
-
"value"
|
|
54
|
-
]),
|
|
55
|
-
a: new Set([
|
|
56
|
-
"href",
|
|
57
|
-
"target",
|
|
58
|
-
"rel",
|
|
59
|
-
"download",
|
|
60
|
-
"hrefLang",
|
|
61
|
-
"ping",
|
|
62
|
-
"referrerPolicy"
|
|
63
|
-
]),
|
|
64
|
-
input: new Set([
|
|
65
|
-
"type",
|
|
66
|
-
"name",
|
|
67
|
-
"value",
|
|
68
|
-
"defaultValue",
|
|
69
|
-
"placeholder",
|
|
70
|
-
"disabled",
|
|
71
|
-
"readOnly",
|
|
72
|
-
"required",
|
|
73
|
-
"autoComplete",
|
|
74
|
-
"maxLength",
|
|
75
|
-
"minLength",
|
|
76
|
-
"pattern",
|
|
77
|
-
"min",
|
|
78
|
-
"max",
|
|
79
|
-
"step",
|
|
80
|
-
"checked",
|
|
81
|
-
"defaultChecked",
|
|
82
|
-
"multiple",
|
|
83
|
-
"accept",
|
|
84
|
-
"list",
|
|
85
|
-
"form"
|
|
86
|
-
]),
|
|
87
|
-
textarea: new Set([
|
|
88
|
-
"name",
|
|
89
|
-
"value",
|
|
90
|
-
"defaultValue",
|
|
91
|
-
"placeholder",
|
|
92
|
-
"disabled",
|
|
93
|
-
"readOnly",
|
|
94
|
-
"required",
|
|
95
|
-
"autoComplete",
|
|
96
|
-
"maxLength",
|
|
97
|
-
"minLength",
|
|
98
|
-
"rows",
|
|
99
|
-
"cols",
|
|
100
|
-
"wrap",
|
|
101
|
-
"form"
|
|
102
|
-
]),
|
|
103
|
-
select: new Set([
|
|
104
|
-
"name",
|
|
105
|
-
"value",
|
|
106
|
-
"defaultValue",
|
|
107
|
-
"disabled",
|
|
108
|
-
"required",
|
|
109
|
-
"multiple",
|
|
110
|
-
"form"
|
|
111
|
-
])
|
|
112
|
-
};
|
|
113
|
-
function classifyResolvedProps({ remaining, variantSet, elementProps }) {
|
|
114
|
-
const htmlProps = {};
|
|
115
|
-
const variantProps = {};
|
|
116
|
-
for (const key in remaining) {
|
|
117
|
-
if (!Object.hasOwn(remaining, key)) continue;
|
|
118
|
-
if (key === "className") continue;
|
|
119
|
-
if (key.startsWith("data-uds")) continue;
|
|
120
|
-
if (isPatternMatchedHtmlProp(key) || UNIVERSAL_HTML_PROPS.has(key) || elementProps?.has(key)) htmlProps[key] = remaining[key];
|
|
121
|
-
else if (variantSet) if (variantSet.has(key)) variantProps[key] = remaining[key];
|
|
122
|
-
else htmlProps[key] = remaining[key];
|
|
123
|
-
else variantProps[key] = remaining[key];
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
htmlProps,
|
|
127
|
-
variantProps
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
//#endregion
|
|
131
|
-
export { ELEMENT_HTML_PROPS, classifyResolvedProps };
|