@dialpad/dialtone-css 8.78.0-next.1 → 8.78.0-next.3

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.
Files changed (108) hide show
  1. package/README.md +0 -2
  2. package/lib/build/js/dialtone_migrate_flex_to_stack/examples-edge-cases.vue +26 -0
  3. package/lib/build/js/dialtone_migrate_flex_to_stack/index.mjs +56 -15
  4. package/lib/build/js/dialtone_migrate_tshirt_to_numeric/index.mjs +233 -0
  5. package/lib/build/js/dialtone_migrate_tshirt_to_numeric/test.mjs +336 -0
  6. package/lib/build/js/dialtone_migration_helper/configs/physical-to-logical.mjs +86 -0
  7. package/lib/build/js/dialtone_migration_helper/configs/size-to-layout.mjs +212 -0
  8. package/lib/build/js/dialtone_migration_helper/configs/space-to-spacing.mjs +48 -0
  9. package/lib/build/js/dialtone_migration_helper/configs/stack-gap-to-spacing.mjs +88 -0
  10. package/lib/build/js/dialtone_migration_helper/configs/utility-class-to-token-stops.mjs +135 -0
  11. package/lib/build/js/dialtone_migration_helper/tests/size-to-layout-test-examples.vue +275 -0
  12. package/lib/build/js/dialtone_migration_helper/tests/space-to-spacing-test-examples.vue +193 -0
  13. package/lib/build/less/components/avatar.less +8 -19
  14. package/lib/build/less/components/badge.less +22 -20
  15. package/lib/build/less/components/banner.less +5 -5
  16. package/lib/build/less/components/breadcrumbs.less +4 -4
  17. package/lib/build/less/components/button.less +39 -39
  18. package/lib/build/less/components/card.less +4 -4
  19. package/lib/build/less/components/chip.less +41 -51
  20. package/lib/build/less/components/codeblock.less +2 -2
  21. package/lib/build/less/components/collapsible.less +2 -2
  22. package/lib/build/less/components/combobox-multi-select.less +8 -8
  23. package/lib/build/less/components/combobox-with-popover.less +1 -1
  24. package/lib/build/less/components/combobox.less +5 -5
  25. package/lib/build/less/components/datepicker.less +6 -6
  26. package/lib/build/less/components/description-list.less +14 -3
  27. package/lib/build/less/components/dropdown.less +4 -4
  28. package/lib/build/less/components/emoji-picker.less +35 -35
  29. package/lib/build/less/components/empty-state.less +5 -5
  30. package/lib/build/less/components/filter-pill.less +5 -5
  31. package/lib/build/less/components/forms.less +10 -10
  32. package/lib/build/less/components/image-viewer.less +2 -2
  33. package/lib/build/less/components/input.less +17 -22
  34. package/lib/build/less/components/item-layout.less +8 -8
  35. package/lib/build/less/components/keyboard-shortcut.less +3 -3
  36. package/lib/build/less/components/link.less +5 -5
  37. package/lib/build/less/components/list-group.less +1 -1
  38. package/lib/build/less/components/list-item-group.less +1 -1
  39. package/lib/build/less/components/list-item.less +9 -9
  40. package/lib/build/less/components/modal.less +20 -20
  41. package/lib/build/less/components/notice.less +11 -11
  42. package/lib/build/less/components/pagination.less +5 -5
  43. package/lib/build/less/components/popover.less +5 -5
  44. package/lib/build/less/components/radio-checkbox.less +11 -10
  45. package/lib/build/less/components/rich-text-editor.less +13 -13
  46. package/lib/build/less/components/scrollbar.less +2 -2
  47. package/lib/build/less/components/segmented-control.less +6 -6
  48. package/lib/build/less/components/selects.less +18 -13
  49. package/lib/build/less/components/skeleton.less +4 -4
  50. package/lib/build/less/components/stack.less +24 -69
  51. package/lib/build/less/components/table.less +6 -7
  52. package/lib/build/less/components/tabs.less +24 -24
  53. package/lib/build/less/components/toast.less +16 -16
  54. package/lib/build/less/components/toggle.less +23 -23
  55. package/lib/build/less/components/tooltip.less +27 -27
  56. package/lib/build/less/dialtone-reset.less +3 -3
  57. package/lib/build/less/dialtone-transitions.less +4 -4
  58. package/lib/build/less/dialtone.less +2 -2
  59. package/lib/build/less/recipes/attachment_carousel.less +13 -13
  60. package/lib/build/less/recipes/callbar_button.less +1 -1
  61. package/lib/build/less/recipes/callbar_button_with_dropdown.less +7 -7
  62. package/lib/build/less/recipes/callbar_button_with_popover.less +8 -8
  63. package/lib/build/less/recipes/callbox.less +6 -6
  64. package/lib/build/less/recipes/contact_info.less +9 -9
  65. package/lib/build/less/recipes/editor.less +12 -12
  66. package/lib/build/less/recipes/emoji_row.less +8 -8
  67. package/lib/build/less/recipes/feed_item_pill.less +13 -13
  68. package/lib/build/less/recipes/feed_item_row.less +10 -10
  69. package/lib/build/less/recipes/grouped_chip.less +2 -2
  70. package/lib/build/less/recipes/ivr_node.less +13 -13
  71. package/lib/build/less/recipes/leftbar_row.less +23 -23
  72. package/lib/build/less/recipes/message_input.less +16 -16
  73. package/lib/build/less/recipes/settings_menu_button.less +10 -10
  74. package/lib/build/less/recipes/time_pill.less +1 -1
  75. package/lib/build/less/recipes/top_banner_info.less +8 -8
  76. package/lib/build/less/recipes/unread_pill.less +2 -2
  77. package/lib/build/less/themes/default.less +1 -1
  78. package/lib/build/less/utilities/backgrounds.less +3 -3
  79. package/lib/build/less/utilities/effects.less +20 -20
  80. package/lib/build/less/utilities/flex.less +11 -11
  81. package/lib/build/less/utilities/layout.less +4 -4
  82. package/lib/build/less/utilities/sizing.less +172 -0
  83. package/lib/build/less/utilities/spacing.less +49 -49
  84. package/lib/build/less/utilities/typography.less +2 -2
  85. package/lib/build/less/variables/sizes.less +8 -8
  86. package/lib/dist/dialtone-default-theme.css +5220 -1117
  87. package/lib/dist/dialtone-default-theme.min.css +1 -1
  88. package/lib/dist/dialtone-docs.json +1 -1
  89. package/lib/dist/dialtone.css +5203 -1117
  90. package/lib/dist/dialtone.min.css +1 -1
  91. package/lib/dist/js/dialtone_migrate_flex_to_stack/examples-edge-cases.vue +26 -0
  92. package/lib/dist/js/dialtone_migrate_flex_to_stack/index.mjs +56 -15
  93. package/lib/dist/js/dialtone_migrate_tshirt_to_numeric/index.mjs +233 -0
  94. package/lib/dist/js/dialtone_migrate_tshirt_to_numeric/test.mjs +336 -0
  95. package/lib/dist/js/dialtone_migration_helper/configs/physical-to-logical.mjs +86 -0
  96. package/lib/dist/js/dialtone_migration_helper/configs/size-to-layout.mjs +212 -0
  97. package/lib/dist/js/dialtone_migration_helper/configs/space-to-spacing.mjs +48 -0
  98. package/lib/dist/js/dialtone_migration_helper/configs/stack-gap-to-spacing.mjs +88 -0
  99. package/lib/dist/js/dialtone_migration_helper/configs/utility-class-to-token-stops.mjs +135 -0
  100. package/lib/dist/js/dialtone_migration_helper/tests/size-to-layout-test-examples.vue +275 -0
  101. package/lib/dist/js/dialtone_migration_helper/tests/space-to-spacing-test-examples.vue +193 -0
  102. package/lib/dist/tokens/tokens-base-dark.css +17 -0
  103. package/lib/dist/tokens/tokens-base-light.css +17 -0
  104. package/lib/dist/tokens/tokens-debug-base.css +17 -0
  105. package/lib/dist/tokens-docs.json +1 -1
  106. package/package.json +3 -3
  107. package/lib/build/js/dialtone_migration_helper/configs/space-to-size.mjs +0 -15
  108. package/lib/dist/js/dialtone_migration_helper/configs/space-to-size.mjs +0 -15
@@ -0,0 +1,275 @@
1
+ <template>
2
+ <!--
3
+ TEST FILE FOR SIZE-TO-LAYOUT MIGRATION
4
+ Tests context-aware migration of --dt-size-* tokens to either:
5
+ --dt-spacing-* (spacing properties: padding, margin, gap, inset)
6
+ --dt-layout-* (layout properties: width, height, min/max, flex-basis)
7
+ Tokens exceeding the layout scale (>1024px) become raw rem + TODO comment.
8
+ Run: node packages/dialtone-css/lib/dist/js/dialtone_migration_helper/index.mjs --cwd .
9
+ then select "size-to-layout"
10
+ -->
11
+
12
+ <!-- ============================================ -->
13
+ <!-- VUE :style — SPACING CONTEXT -->
14
+ <!-- (should route to --dt-spacing-*) -->
15
+ <!-- ============================================ -->
16
+
17
+ <p :style="{ padding: 'var(--dt-size-400)' }">size-400 on padding → spacing-100</p>
18
+ <p :style="{ margin: 'var(--dt-size-500)' }">size-500 on margin → spacing-200</p>
19
+ <p :style="{ gap: 'var(--dt-size-550)' }">size-550 on gap → spacing-300</p>
20
+
21
+ <!-- ============================================ -->
22
+ <!-- VUE :style — LAYOUT CONTEXT -->
23
+ <!-- (should route to --dt-layout-*) -->
24
+ <!-- ============================================ -->
25
+
26
+ <div :style="{ width: 'var(--dt-size-700)' }">size-700 on width → layout-100</div>
27
+ <div :style="{ height: 'var(--dt-size-800)' }">size-800 on height → layout-200</div>
28
+ <div :style="{ maxWidth: 'var(--dt-size-1000)' }">size-1000 on max-width → layout-800</div>
29
+
30
+ <!-- Skip: already-migrated tokens -->
31
+ <div :style="{ width: 'var(--dt-layout-100)' }">already layout-100</div>
32
+ <p :style="{ padding: 'var(--dt-spacing-100)' }">already spacing-100</p>
33
+ </template>
34
+
35
+ <style lang="less">
36
+ /* ============================================ */
37
+ /* SPACING CONTEXT → --dt-spacing-* */
38
+ /* padding, margin, gap, inset and variants */
39
+ /* ============================================ */
40
+
41
+ /* padding: all mapped stops */
42
+ .test-padding-exact {
43
+ padding: var(--dt-size-0); /* → spacing-0 (0px) */
44
+ padding: var(--dt-size-100); /* → spacing-1 (1px) */
45
+ padding: var(--dt-size-200); /* → spacing-25 (2px) */
46
+ padding: var(--dt-size-300); /* → spacing-50 (4px) */
47
+ padding: var(--dt-size-350); /* → spacing-75 (6px) */
48
+ padding: var(--dt-size-400); /* → spacing-100 (8px) */
49
+ padding: var(--dt-size-450); /* → spacing-150 (12px) */
50
+ padding: var(--dt-size-500); /* → spacing-200 (16px) */
51
+ padding: var(--dt-size-525); /* → spacing-250 (20px) */
52
+ padding: var(--dt-size-550); /* → spacing-300 (24px) */
53
+ padding: var(--dt-size-600); /* → spacing-400 (32px) */
54
+ padding: var(--dt-size-625); /* → spacing-525 (42px) */
55
+ padding: var(--dt-size-650); /* → spacing-600 (48px) */
56
+ padding: var(--dt-size-700); /* → spacing-800 (64px) */
57
+ }
58
+
59
+ /* padding directional */
60
+ .test-padding-directional {
61
+ padding-block-start: var(--dt-size-400);
62
+ padding-inline: var(--dt-size-550);
63
+ padding-block-start: var(--dt-size-300);
64
+ padding-inline-end: var(--dt-size-400);
65
+ }
66
+
67
+ /* margin */
68
+ .test-margin {
69
+ margin: var(--dt-size-400);
70
+ margin-block-start: var(--dt-size-550);
71
+ margin-inline: var(--dt-size-600);
72
+ margin-block-end: var(--dt-size-300);
73
+ }
74
+
75
+ /* gap, row-gap, column-gap */
76
+ .test-gap {
77
+ gap: var(--dt-size-400);
78
+ row-gap: var(--dt-size-550);
79
+ column-gap: var(--dt-size-300);
80
+ }
81
+
82
+ /* inset */
83
+ .test-inset {
84
+ inset: var(--dt-size-400);
85
+ inset-block: var(--dt-size-300);
86
+ inset-inline-start: var(--dt-size-550);
87
+ }
88
+
89
+ /* shorthand with multiple size tokens */
90
+ .test-padding-multi {
91
+ padding: var(--dt-size-400) var(--dt-size-550);
92
+ margin: var(--dt-size-300) var(--dt-size-400) var(--dt-size-550) var(--dt-size-600);
93
+ }
94
+
95
+ /* ============================================ */
96
+ /* LAYOUT CONTEXT → --dt-layout-* */
97
+ /* width, height, min/max, flex-basis, logical */
98
+ /* ============================================ */
99
+
100
+ /* width: exact matches */
101
+ .test-width-exact {
102
+ inline-size: var(--dt-size-500); /* → layout-25 (16px) */
103
+ inline-size: var(--dt-size-600); /* → layout-50 (32px) */
104
+ inline-size: var(--dt-size-650); /* → layout-75 (48px) */
105
+ inline-size: var(--dt-size-700); /* → layout-100 (64px) */
106
+ inline-size: var(--dt-size-750); /* → layout-150 (96px) */
107
+ inline-size: var(--dt-size-800); /* → layout-200 (128px) */
108
+ inline-size: var(--dt-size-850); /* → layout-300 (192px) */
109
+ inline-size: var(--dt-size-900); /* → layout-400 (256px) */
110
+ inline-size: var(--dt-size-950); /* → layout-600 (384px) */
111
+ inline-size: var(--dt-size-1000); /* → layout-800 (512px) */
112
+ inline-size: var(--dt-size-1050); /* → layout-1200 (768px) */
113
+ inline-size: var(--dt-size-1100); /* → layout-1600 (1024px) */
114
+ }
115
+
116
+ /* height */
117
+ .test-height {
118
+ block-size: var(--dt-size-700);
119
+ min-block-size: var(--dt-size-800);
120
+ max-block-size: var(--dt-size-1000);
121
+ }
122
+
123
+ /* min/max width */
124
+ .test-minmax {
125
+ min-inline-size: var(--dt-size-650);
126
+ max-inline-size: var(--dt-size-900);
127
+ min-inline-size: var(--dt-size-1000);
128
+ }
129
+
130
+ /* flex-basis */
131
+ .test-flex-basis {
132
+ flex-basis: var(--dt-size-700);
133
+ flex-basis: var(--dt-size-800);
134
+ }
135
+
136
+ /* logical layout properties */
137
+ .test-logical-layout {
138
+ inline-size: var(--dt-size-700);
139
+ block-size: var(--dt-size-800);
140
+ min-inline-size: var(--dt-size-650);
141
+ max-inline-size: var(--dt-size-1000);
142
+ max-block-size: var(--dt-size-950);
143
+ }
144
+
145
+ /* ============================================ */
146
+ /* NEAREST-NEIGHBOR MAPPINGS */
147
+ /* No exact match — mapped to closest stop */
148
+ /* ============================================ */
149
+
150
+ .test-nearest-neighbor {
151
+ inline-size: var(--dt-size-825); /* 164px → layout-250 (160px, Δ4px) */
152
+ inline-size: var(--dt-size-875); /* 216px → layout-350 (224px, Δ8px) */
153
+ inline-size: var(--dt-size-905); /* 264px → layout-400 (256px, Δ8px) */
154
+ inline-size: var(--dt-size-925); /* 332px → layout-500 (320px, Δ12px) */
155
+ block-size: var(--dt-size-975); /* 464px → layout-700 (448px, Δ16px) */
156
+ inline-size: var(--dt-size-1020); /* 628px → layout-1000 (640px, Δ12px) */
157
+ max-inline-size: var(--dt-size-1040); /* 764px → layout-1200 (768px, Δ4px) */
158
+ max-inline-size: var(--dt-size-1060); /* 828px → layout-1300 (832px, Δ4px) */
159
+ max-block-size: var(--dt-size-1080); /* 912px → layout-1400 (896px, Δ16px) */
160
+ }
161
+
162
+ /* ============================================ */
163
+ /* RAW FALLBACK (exceeds layout scale >1024px) */
164
+ /* Converted to rem + TODO comment */
165
+ /* ============================================ */
166
+
167
+ .test-raw-fallback {
168
+ max-inline-size: var(--dt-size-1115); /* 1140px → 71.25rem + TODO comment */
169
+ max-inline-size: var(--dt-size-1120); /* 1268px → 79.25rem + TODO comment */
170
+ max-inline-size: var(--dt-size-1125); /* 1280px → 80rem + TODO comment */
171
+ max-inline-size: var(--dt-size-1130); /* 1340px → 83.75rem + TODO comment */
172
+ inline-size: var(--dt-size-1150); /* 1536px → 96rem + TODO comment */
173
+ inline-size: var(--dt-size-1200); /* 2048px → 128rem + TODO comment */
174
+ }
175
+
176
+ /* ============================================ */
177
+ /* CUSTOM PROPERTY DEFINITIONS */
178
+ /* Script routes by keyword in property name */
179
+ /* ============================================ */
180
+
181
+ /* Spacing keywords in custom property name → --dt-spacing-* */
182
+ .test-custom-spacing {
183
+ --badge-padding-y: var(--dt-size-400); /* "padding" → spacing-100 (8px) */
184
+ --badge-padding-x: var(--dt-size-550); /* "padding" → spacing-300 (24px) */
185
+ --badge-label-padding-x: var(--dt-size-500); /* "padding" → spacing-200 (16px) */
186
+ --badge-letter-spacing: var(--dt-size-100); /* "spacing" → spacing-1 (1px) */
187
+ --badge-gap: var(--dt-size-300); /* "gap" → spacing-50 (4px) */
188
+ --item-margin-start: var(--dt-size-400); /* "margin" → spacing-100 (8px) */
189
+ --item-inset-y: var(--dt-size-300); /* "inset" → spacing-50 (4px) */
190
+ }
191
+
192
+ /* Layout keywords in custom property name → --dt-layout-* */
193
+ .test-custom-layout {
194
+ --badge-radius: var(--dt-size-700); /* "radius" → layout-100 (64px) */
195
+ --panel-width: var(--dt-size-1050); /* "width" → layout-1200 (768px) */
196
+ --sidebar-min-width: var(--dt-size-900); /* "width" → layout-400 (256px) */
197
+ --avatar-basis: var(--dt-size-700); /* "basis" → layout-100 (64px) */
198
+ }
199
+
200
+ /* Ambiguous custom property — no keyword match → default fallback (layout map) */
201
+ /* NOTE: "line-height" intentionally excluded from height keyword matching */
202
+ /* These require manual review after migration */
203
+ .test-custom-ambiguous {
204
+ --badge-line-height: var(--dt-size-500); /* no keyword match → layout-25 (default) */
205
+ --overlay-depth: var(--dt-size-700); /* no keyword match → layout-100 (default) */
206
+ }
207
+
208
+ /* ============================================ */
209
+ /* SKIP CASES (should NOT be modified) */
210
+ /* ============================================ */
211
+
212
+ /* Already using --dt-layout-* */
213
+ .test-skip-already-layout {
214
+ inline-size: var(--dt-layout-100);
215
+ block-size: var(--dt-layout-200);
216
+ max-inline-size: var(--dt-layout-800);
217
+ }
218
+
219
+ /* Already using --dt-spacing-* */
220
+ .test-skip-already-spacing {
221
+ padding: var(--dt-spacing-100);
222
+ margin: var(--dt-spacing-300);
223
+ gap: var(--dt-spacing-400);
224
+ }
225
+
226
+ /* Unknown stop number (not in any map — passed through, lint will flag) */
227
+ .test-skip-unknown {
228
+ inline-size: var(--dt-size-999);
229
+ padding: var(--dt-size-123);
230
+ }
231
+
232
+ /* ============================================ */
233
+ /* ADDITIONAL COVERAGE (from review feedback) */
234
+ /* ============================================ */
235
+
236
+ /* --dt-size-50 in spacing context → spacing-1 (0.5px → 1px nearest) */
237
+ .test-size-50-spacing {
238
+ padding: var(--dt-size-50); /* → spacing-1 */
239
+ letter-spacing: var(--dt-size-50); /* → spacing-1 (via default) */
240
+ }
241
+
242
+ /* Unmapped layout stops that should now have nearest-neighbor entries */
243
+ .test-newly-mapped-stops {
244
+ inline-size: var(--dt-size-720); /* 72px → layout-100 (64px) */
245
+ inline-size: var(--dt-size-730); /* 84px → layout-125 (80px) */
246
+ inline-size: var(--dt-size-760); /* 102px → layout-150 (96px) */
247
+ inline-size: var(--dt-size-775); /* 114px → layout-175 (112px) */
248
+ }
249
+
250
+ /* Negative and percent suffixes */
251
+ .test-suffixes {
252
+ margin: var(--dt-size-400-negative); /* → spacing-100-negative */
253
+ inline-size: var(--dt-size-100-percent); /* → layout-100-percent */
254
+ }
255
+
256
+ /* calc(var(--dt-spacing-*) * -1) → negative token cleanup */
257
+ .test-calc-negation {
258
+ inset: calc(var(--dt-spacing-100) * -1); /* → var(--dt-spacing-100-negative) */
259
+ margin: calc(var(--dt-spacing-300) * -1); /* → var(--dt-spacing-300-negative) */
260
+ }
261
+
262
+ /* Border-width context → --dt-size-border-* */
263
+ .test-border-width {
264
+ border: var(--dt-size-100) solid red; /* → dt-size-border-100 */
265
+ border-width: var(--dt-size-200); /* → dt-size-border-200 */
266
+ outline: var(--dt-size-100) solid; /* → dt-size-border-100 */
267
+ }
268
+
269
+ /* Border-radius context → --dt-size-radius-* */
270
+ .test-border-radius {
271
+ border-radius: var(--dt-size-300); /* → dt-size-radius-300 */
272
+ border-radius: var(--dt-size-400); /* → dt-size-radius-400 */
273
+ --badge-radius: var(--dt-size-300); /* "radius" keyword → dt-size-radius-300 */
274
+ }
275
+ </style>
@@ -0,0 +1,193 @@
1
+ <template>
2
+ <!--
3
+ TEST FILE FOR SPACE-TO-SPACING MIGRATION
4
+ Tests migration of --dt-space-* tokens to --dt-spacing-* (8px base unit scale).
5
+ Run: npx dialtone-migration-helper --cwd . and select "space-to-spacing"
6
+ -->
7
+
8
+ <!-- ============================================ -->
9
+ <!-- VUE :style BINDINGS — SPACING CONTEXT -->
10
+ <!-- ============================================ -->
11
+
12
+ <!-- Mapped: small stops -->
13
+ <p :style="{ padding: 'var(--dt-space-0)' }">space-0 → spacing-0</p>
14
+ <p :style="{ margin: 'var(--dt-space-100)' }">space-100 → spacing-1</p>
15
+ <p :style="{ padding: 'var(--dt-space-200)' }">space-200 → spacing-25</p>
16
+ <p :style="{ gap: 'var(--dt-space-300)' }">space-300 → spacing-50</p>
17
+ <p :style="{ padding: 'var(--dt-space-350)' }">space-350 → spacing-75</p>
18
+ <p :style="{ margin: 'var(--dt-space-400)' }">space-400 → spacing-100</p>
19
+
20
+ <!-- Mapped: mid stops -->
21
+ <p :style="{ padding: 'var(--dt-space-450)' }">space-450 → spacing-150</p>
22
+ <p :style="{ gap: 'var(--dt-space-500)' }">space-500 → spacing-200</p>
23
+ <p :style="{ padding: 'var(--dt-space-525)' }">space-525 → spacing-250</p>
24
+ <p :style="{ margin: 'var(--dt-space-550)' }">space-550 → spacing-300</p>
25
+ <p :style="{ padding: 'var(--dt-space-600)' }">space-600 → spacing-400</p>
26
+ <p :style="{ gap: 'var(--dt-space-625)' }">space-625 → spacing-525</p>
27
+ <p :style="{ padding: 'var(--dt-space-650)' }">space-650 → spacing-600</p>
28
+ <p :style="{ margin: 'var(--dt-space-700)' }">space-700 → spacing-800</p>
29
+
30
+ <!-- Skip: stops with no --dt-spacing-* equivalent (should NOT be modified) -->
31
+ <p :style="{ padding: 'var(--dt-space-720)' }">space-720 (72px) — no equivalent, left unchanged</p>
32
+ <p :style="{ gap: 'var(--dt-space-730)' }">space-730 (84px) — no equivalent, left unchanged</p>
33
+ <p :style="{ margin: 'var(--dt-space-750)' }">space-750 (96px) — use --dt-layout-150 instead</p>
34
+
35
+ <!-- Skip: already-migrated tokens (should NOT be modified) -->
36
+ <p :style="{ padding: 'var(--dt-spacing-100)' }">already spacing-100</p>
37
+ <p :style="{ margin: 'var(--dt-spacing-300)' }">already spacing-300</p>
38
+ </template>
39
+
40
+ <style lang="less">
41
+ /* ============================================ */
42
+ /* SMALL STOPS (0–350) */
43
+ /* ============================================ */
44
+
45
+ /* space-0 → spacing-0 */
46
+ .test-space-0 {
47
+ padding: var(--dt-space-0);
48
+ }
49
+
50
+ /* space-100 → spacing-1 */
51
+ .test-space-100 {
52
+ margin-block-start: var(--dt-space-100);
53
+ }
54
+
55
+ /* space-200 → spacing-25 */
56
+ .test-space-200 {
57
+ gap: var(--dt-space-200);
58
+ }
59
+
60
+ /* space-300 → spacing-50 */
61
+ .test-space-300 {
62
+ padding-inline: var(--dt-space-300);
63
+ }
64
+
65
+ /* space-350 → spacing-75 */
66
+ .test-space-350 {
67
+ column-gap: var(--dt-space-350);
68
+ }
69
+
70
+ /* ============================================ */
71
+ /* BASE AND MID STOPS (400–700) */
72
+ /* ============================================ */
73
+
74
+ /* space-400 → spacing-100 (base unit) */
75
+ .test-space-400 {
76
+ padding: var(--dt-space-400);
77
+ margin: var(--dt-space-400);
78
+ gap: var(--dt-space-400);
79
+ }
80
+
81
+ /* space-450 → spacing-150 */
82
+ .test-space-450 {
83
+ padding-block: var(--dt-space-450);
84
+ }
85
+
86
+ /* space-500 → spacing-200 */
87
+ .test-space-500 {
88
+ inset: var(--dt-space-500);
89
+ }
90
+
91
+ /* space-525 → spacing-250 */
92
+ .test-space-525 {
93
+ row-gap: var(--dt-space-525);
94
+ }
95
+
96
+ /* space-550 → spacing-300 */
97
+ .test-space-550 {
98
+ padding-inline-start: var(--dt-space-550);
99
+ }
100
+
101
+ /* space-600 → spacing-400 */
102
+ .test-space-600 {
103
+ margin-inline: var(--dt-space-600);
104
+ }
105
+
106
+ /* space-625 → spacing-525 */
107
+ .test-space-625 {
108
+ padding: var(--dt-space-625);
109
+ }
110
+
111
+ /* space-650 → spacing-600 */
112
+ .test-space-650 {
113
+ inset-block: var(--dt-space-650);
114
+ }
115
+
116
+ /* space-700 → spacing-800 */
117
+ .test-space-700 {
118
+ padding: var(--dt-space-700);
119
+ gap: var(--dt-space-700);
120
+ }
121
+
122
+ /* ============================================ */
123
+ /* SHORTHAND WITH MULTIPLE TOKENS */
124
+ /* ============================================ */
125
+
126
+ /* Multiple space tokens in one declaration */
127
+ .test-shorthand-multi {
128
+ padding: var(--dt-space-400) var(--dt-space-550);
129
+ margin: var(--dt-space-300) var(--dt-space-400) var(--dt-space-550) var(--dt-space-600);
130
+ }
131
+
132
+ /* ============================================ */
133
+ /* NEGATIVE VARIANTS */
134
+ /* ============================================ */
135
+
136
+ /* space-400-negative → spacing-100-negative */
137
+ .test-negative-400 {
138
+ margin-block-start: var(--dt-space-400-negative);
139
+ }
140
+
141
+ /* space-550-negative → spacing-300-negative */
142
+ .test-negative-550 {
143
+ margin-inline-start: var(--dt-space-550-negative);
144
+ }
145
+
146
+ /* space-700-negative → spacing-800-negative */
147
+ .test-negative-700 {
148
+ margin: var(--dt-space-700-negative);
149
+ }
150
+
151
+ /* ============================================ */
152
+ /* PERCENT VARIANTS */
153
+ /* ============================================ */
154
+
155
+ /* space-400-percent → spacing-100-percent */
156
+ .test-percent-400 {
157
+ padding: var(--dt-space-400-percent);
158
+ }
159
+
160
+ /* space-600-percent → spacing-400-percent */
161
+ .test-percent-600 {
162
+ gap: var(--dt-space-600-percent);
163
+ }
164
+
165
+ /* ============================================ */
166
+ /* SKIP CASES (should NOT be modified) */
167
+ /* ============================================ */
168
+
169
+ /* Stops with no --dt-spacing-* equivalent — leave unchanged */
170
+ .test-skip-720 {
171
+ padding: var(--dt-space-720); /* 72px — no spacing equivalent */
172
+ }
173
+
174
+ .test-skip-730 {
175
+ gap: var(--dt-space-730); /* 84px — no spacing equivalent */
176
+ }
177
+
178
+ .test-skip-750 {
179
+ padding: var(--dt-space-750); /* 96px+ — use --dt-layout-150 instead */
180
+ }
181
+
182
+ /* Already-migrated spacing tokens (should NOT be touched) */
183
+ .test-skip-already-spacing {
184
+ padding: var(--dt-spacing-100);
185
+ margin: var(--dt-spacing-300);
186
+ gap: var(--dt-spacing-400);
187
+ }
188
+
189
+ /* Custom property definition — WILL be replaced (regex is context-free) */
190
+ .test-skip-custom-prop {
191
+ --my-spacing: var(--dt-space-400); /* → var(--dt-spacing-100) */
192
+ }
193
+ </style>
@@ -507,6 +507,23 @@
507
507
  --dt-shadow-medium: var(--dt-shadow-medium-1-offset-x) var(--dt-shadow-medium-1-offset-y) var(--dt-shadow-medium-1-blur) var(--dt-shadow-medium-1-spread) var(--dt-shadow-medium-1-color), var(--dt-shadow-medium-2-offset-x) var(--dt-shadow-medium-2-offset-y) var(--dt-shadow-medium-2-blur) var(--dt-shadow-medium-2-spread) var(--dt-shadow-medium-2-color), var(--dt-shadow-medium-3-offset-x) var(--dt-shadow-medium-3-offset-y) var(--dt-shadow-medium-3-blur) var(--dt-shadow-medium-3-spread) var(--dt-shadow-medium-3-color), var(--dt-shadow-medium-4-offset-x) var(--dt-shadow-medium-4-offset-y) var(--dt-shadow-medium-4-blur) var(--dt-shadow-medium-4-spread) var(--dt-shadow-medium-4-color), var(--dt-shadow-medium-5-offset-x) var(--dt-shadow-medium-5-offset-y) var(--dt-shadow-medium-5-blur) var(--dt-shadow-medium-5-spread) var(--dt-shadow-medium-5-color);
508
508
  --dt-shadow-small: var(--dt-shadow-small-1-offset-x) var(--dt-shadow-small-1-offset-y) var(--dt-shadow-small-1-blur) var(--dt-shadow-small-1-spread) var(--dt-shadow-small-1-color), var(--dt-shadow-small-2-offset-x) var(--dt-shadow-small-2-offset-y) var(--dt-shadow-small-2-blur) var(--dt-shadow-small-2-spread) var(--dt-shadow-small-2-color), var(--dt-shadow-small-3-offset-x) var(--dt-shadow-small-3-offset-y) var(--dt-shadow-small-3-blur) var(--dt-shadow-small-3-spread) var(--dt-shadow-small-3-color), var(--dt-shadow-small-4-offset-x) var(--dt-shadow-small-4-offset-y) var(--dt-shadow-small-4-blur) var(--dt-shadow-small-4-spread) var(--dt-shadow-small-4-color), var(--dt-shadow-small-5-offset-x) var(--dt-shadow-small-5-offset-y) var(--dt-shadow-small-5-blur) var(--dt-shadow-small-5-spread) var(--dt-shadow-small-5-color);
509
509
  --dt-color-gradient-magenta-purple: linear-gradient(135deg, var(--dt-color-brand-magenta) 10%, var(--dt-color-brand-purple) 90%); /* Gradient for Ai-oriented treatments. */
510
+ --dt-layout-100-percent: var(--dt-size-100-percent);
511
+ --dt-layout-95-percent: var(--dt-size-95-percent);
512
+ --dt-layout-90-percent: var(--dt-size-90-percent);
513
+ --dt-layout-80-percent: var(--dt-size-80-percent);
514
+ --dt-layout-75-percent: var(--dt-size-75-percent);
515
+ --dt-layout-70-percent: var(--dt-size-70-percent);
516
+ --dt-layout-66-percent: var(--dt-size-66-percent);
517
+ --dt-layout-60-percent: var(--dt-size-60-percent);
518
+ --dt-layout-50-percent: var(--dt-size-50-percent);
519
+ --dt-layout-40-percent: var(--dt-size-40-percent);
520
+ --dt-layout-33-percent: var(--dt-size-33-percent);
521
+ --dt-layout-30-percent: var(--dt-size-30-percent);
522
+ --dt-layout-25-percent: var(--dt-size-25-percent);
523
+ --dt-layout-20-percent: var(--dt-size-20-percent);
524
+ --dt-layout-10-percent: var(--dt-size-10-percent);
525
+ --dt-layout-5-percent: var(--dt-size-5-percent);
526
+ --dt-layout-0-percent: var(--dt-size-0-percent);
510
527
  --dt-layout-base: calc(var(--dt-size-base) * 8); /* 64px - Layout base unit unit */
511
528
  --dt-spacing-1-negative: calc(var(--dt-spacing-1) * -1);
512
529
  --dt-spacing-base: var(--dt-size-base); /* 8px - Base spacing unit */
@@ -387,6 +387,23 @@
387
387
  --dt-shadow-medium: var(--dt-shadow-medium-offset-x) var(--dt-shadow-medium-offset-y) var(--dt-shadow-medium-blur) var(--dt-shadow-medium-spread) var(--dt-shadow-medium-color);
388
388
  --dt-shadow-small: var(--dt-shadow-small-offset-x) var(--dt-shadow-small-offset-y) var(--dt-shadow-small-blur) var(--dt-shadow-small-spread) var(--dt-shadow-small-color);
389
389
  --dt-color-gradient-magenta-purple: linear-gradient(135deg, var(--dt-color-brand-magenta) 10%, var(--dt-color-brand-purple) 90%); /* Gradient for Ai-oriented treatments. */
390
+ --dt-layout-100-percent: var(--dt-size-100-percent);
391
+ --dt-layout-95-percent: var(--dt-size-95-percent);
392
+ --dt-layout-90-percent: var(--dt-size-90-percent);
393
+ --dt-layout-80-percent: var(--dt-size-80-percent);
394
+ --dt-layout-75-percent: var(--dt-size-75-percent);
395
+ --dt-layout-70-percent: var(--dt-size-70-percent);
396
+ --dt-layout-66-percent: var(--dt-size-66-percent);
397
+ --dt-layout-60-percent: var(--dt-size-60-percent);
398
+ --dt-layout-50-percent: var(--dt-size-50-percent);
399
+ --dt-layout-40-percent: var(--dt-size-40-percent);
400
+ --dt-layout-33-percent: var(--dt-size-33-percent);
401
+ --dt-layout-30-percent: var(--dt-size-30-percent);
402
+ --dt-layout-25-percent: var(--dt-size-25-percent);
403
+ --dt-layout-20-percent: var(--dt-size-20-percent);
404
+ --dt-layout-10-percent: var(--dt-size-10-percent);
405
+ --dt-layout-5-percent: var(--dt-size-5-percent);
406
+ --dt-layout-0-percent: var(--dt-size-0-percent);
390
407
  --dt-layout-base: calc(var(--dt-size-base) * 8); /* 64px - Layout base unit unit */
391
408
  --dt-spacing-1-negative: calc(var(--dt-spacing-1) * -1);
392
409
  --dt-spacing-base: var(--dt-size-base); /* 8px - Base spacing unit */
@@ -387,6 +387,23 @@
387
387
  --dt-shadow-medium: var(--dt-shadow-medium-offset-x) var(--dt-shadow-medium-offset-y) var(--dt-shadow-medium-blur) var(--dt-shadow-medium-spread) var(--dt-shadow-medium-color);
388
388
  --dt-shadow-small: var(--dt-shadow-small-offset-x) var(--dt-shadow-small-offset-y) var(--dt-shadow-small-blur) var(--dt-shadow-small-spread) var(--dt-shadow-small-color);
389
389
  --dt-color-gradient-magenta-purple: oklch(0.7 0.25 54.01); /* Gradient for Ai-oriented treatments. */
390
+ --dt-layout-100-percent: var(--dt-size-100-percent);
391
+ --dt-layout-95-percent: var(--dt-size-95-percent);
392
+ --dt-layout-90-percent: var(--dt-size-90-percent);
393
+ --dt-layout-80-percent: var(--dt-size-80-percent);
394
+ --dt-layout-75-percent: var(--dt-size-75-percent);
395
+ --dt-layout-70-percent: var(--dt-size-70-percent);
396
+ --dt-layout-66-percent: var(--dt-size-66-percent);
397
+ --dt-layout-60-percent: var(--dt-size-60-percent);
398
+ --dt-layout-50-percent: var(--dt-size-50-percent);
399
+ --dt-layout-40-percent: var(--dt-size-40-percent);
400
+ --dt-layout-33-percent: var(--dt-size-33-percent);
401
+ --dt-layout-30-percent: var(--dt-size-30-percent);
402
+ --dt-layout-25-percent: var(--dt-size-25-percent);
403
+ --dt-layout-20-percent: var(--dt-size-20-percent);
404
+ --dt-layout-10-percent: var(--dt-size-10-percent);
405
+ --dt-layout-5-percent: var(--dt-size-5-percent);
406
+ --dt-layout-0-percent: var(--dt-size-0-percent);
390
407
  --dt-layout-base: calc(var(--dt-size-base) * 8); /* 64px - Layout base unit unit */
391
408
  --dt-spacing-1-negative: calc(var(--dt-spacing-1) * -1);
392
409
  --dt-spacing-base: var(--dt-size-base); /* 8px - Base spacing unit */