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

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 (102) 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_migration_helper/configs/size-to-layout.mjs +212 -0
  5. package/lib/build/js/dialtone_migration_helper/configs/space-to-spacing.mjs +48 -0
  6. package/lib/build/js/dialtone_migration_helper/configs/stack-gap-to-spacing.mjs +88 -0
  7. package/lib/build/js/dialtone_migration_helper/configs/utility-class-to-token-stops.mjs +135 -0
  8. package/lib/build/js/dialtone_migration_helper/tests/size-to-layout-test-examples.vue +275 -0
  9. package/lib/build/js/dialtone_migration_helper/tests/space-to-spacing-test-examples.vue +193 -0
  10. package/lib/build/less/components/avatar.less +8 -19
  11. package/lib/build/less/components/badge.less +22 -20
  12. package/lib/build/less/components/banner.less +5 -5
  13. package/lib/build/less/components/breadcrumbs.less +4 -4
  14. package/lib/build/less/components/button.less +39 -39
  15. package/lib/build/less/components/card.less +4 -4
  16. package/lib/build/less/components/chip.less +41 -51
  17. package/lib/build/less/components/codeblock.less +2 -2
  18. package/lib/build/less/components/collapsible.less +2 -2
  19. package/lib/build/less/components/combobox-multi-select.less +8 -8
  20. package/lib/build/less/components/combobox-with-popover.less +1 -1
  21. package/lib/build/less/components/combobox.less +5 -5
  22. package/lib/build/less/components/datepicker.less +6 -6
  23. package/lib/build/less/components/description-list.less +14 -3
  24. package/lib/build/less/components/dropdown.less +4 -4
  25. package/lib/build/less/components/emoji-picker.less +35 -35
  26. package/lib/build/less/components/empty-state.less +5 -5
  27. package/lib/build/less/components/filter-pill.less +5 -5
  28. package/lib/build/less/components/forms.less +10 -10
  29. package/lib/build/less/components/image-viewer.less +2 -2
  30. package/lib/build/less/components/input.less +17 -22
  31. package/lib/build/less/components/item-layout.less +8 -8
  32. package/lib/build/less/components/keyboard-shortcut.less +3 -3
  33. package/lib/build/less/components/link.less +5 -5
  34. package/lib/build/less/components/list-group.less +1 -1
  35. package/lib/build/less/components/list-item-group.less +1 -1
  36. package/lib/build/less/components/list-item.less +9 -9
  37. package/lib/build/less/components/modal.less +20 -20
  38. package/lib/build/less/components/notice.less +11 -11
  39. package/lib/build/less/components/pagination.less +5 -5
  40. package/lib/build/less/components/popover.less +5 -5
  41. package/lib/build/less/components/radio-checkbox.less +11 -10
  42. package/lib/build/less/components/rich-text-editor.less +13 -13
  43. package/lib/build/less/components/scrollbar.less +2 -2
  44. package/lib/build/less/components/segmented-control.less +6 -6
  45. package/lib/build/less/components/selects.less +18 -13
  46. package/lib/build/less/components/skeleton.less +4 -4
  47. package/lib/build/less/components/stack.less +24 -69
  48. package/lib/build/less/components/table.less +6 -7
  49. package/lib/build/less/components/tabs.less +24 -24
  50. package/lib/build/less/components/toast.less +16 -16
  51. package/lib/build/less/components/toggle.less +23 -23
  52. package/lib/build/less/components/tooltip.less +27 -27
  53. package/lib/build/less/dialtone-reset.less +3 -3
  54. package/lib/build/less/dialtone-transitions.less +4 -4
  55. package/lib/build/less/dialtone.less +2 -2
  56. package/lib/build/less/recipes/attachment_carousel.less +13 -13
  57. package/lib/build/less/recipes/callbar_button.less +1 -1
  58. package/lib/build/less/recipes/callbar_button_with_dropdown.less +7 -7
  59. package/lib/build/less/recipes/callbar_button_with_popover.less +8 -8
  60. package/lib/build/less/recipes/callbox.less +6 -6
  61. package/lib/build/less/recipes/contact_info.less +9 -9
  62. package/lib/build/less/recipes/editor.less +12 -12
  63. package/lib/build/less/recipes/emoji_row.less +8 -8
  64. package/lib/build/less/recipes/feed_item_pill.less +13 -13
  65. package/lib/build/less/recipes/feed_item_row.less +10 -10
  66. package/lib/build/less/recipes/grouped_chip.less +2 -2
  67. package/lib/build/less/recipes/ivr_node.less +13 -13
  68. package/lib/build/less/recipes/leftbar_row.less +23 -23
  69. package/lib/build/less/recipes/message_input.less +16 -16
  70. package/lib/build/less/recipes/settings_menu_button.less +10 -10
  71. package/lib/build/less/recipes/time_pill.less +1 -1
  72. package/lib/build/less/recipes/top_banner_info.less +8 -8
  73. package/lib/build/less/recipes/unread_pill.less +2 -2
  74. package/lib/build/less/themes/default.less +1 -1
  75. package/lib/build/less/utilities/backgrounds.less +3 -3
  76. package/lib/build/less/utilities/effects.less +20 -20
  77. package/lib/build/less/utilities/flex.less +11 -11
  78. package/lib/build/less/utilities/layout.less +4 -4
  79. package/lib/build/less/utilities/sizing.less +172 -0
  80. package/lib/build/less/utilities/spacing.less +49 -49
  81. package/lib/build/less/utilities/typography.less +2 -2
  82. package/lib/build/less/variables/sizes.less +8 -8
  83. package/lib/dist/dialtone-default-theme.css +5220 -1117
  84. package/lib/dist/dialtone-default-theme.min.css +1 -1
  85. package/lib/dist/dialtone-docs.json +1 -1
  86. package/lib/dist/dialtone.css +5203 -1117
  87. package/lib/dist/dialtone.min.css +1 -1
  88. package/lib/dist/js/dialtone_migrate_flex_to_stack/examples-edge-cases.vue +26 -0
  89. package/lib/dist/js/dialtone_migrate_flex_to_stack/index.mjs +56 -15
  90. package/lib/dist/js/dialtone_migration_helper/configs/size-to-layout.mjs +212 -0
  91. package/lib/dist/js/dialtone_migration_helper/configs/space-to-spacing.mjs +48 -0
  92. package/lib/dist/js/dialtone_migration_helper/configs/stack-gap-to-spacing.mjs +88 -0
  93. package/lib/dist/js/dialtone_migration_helper/configs/utility-class-to-token-stops.mjs +135 -0
  94. package/lib/dist/js/dialtone_migration_helper/tests/size-to-layout-test-examples.vue +275 -0
  95. package/lib/dist/js/dialtone_migration_helper/tests/space-to-spacing-test-examples.vue +193 -0
  96. package/lib/dist/tokens/tokens-base-dark.css +17 -0
  97. package/lib/dist/tokens/tokens-base-light.css +17 -0
  98. package/lib/dist/tokens/tokens-debug-base.css +17 -0
  99. package/lib/dist/tokens-docs.json +1 -1
  100. package/package.json +3 -3
  101. package/lib/build/js/dialtone_migration_helper/configs/space-to-size.mjs +0 -15
  102. 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>
@@ -23,8 +23,8 @@
23
23
  --avatar-color-background: var(--dt-avatar-color-background-000);
24
24
  --avatar-color-text: var(--dt-color-neutral-black);
25
25
  --avatar-size-shape: var(--dt-spacing-400);
26
- --avatar-size-image: var(--dt-size-100-percent);
27
- --avatar-canvas-size: var(--dt-size-100-percent);
26
+ --avatar-size-image: var(--dt-layout-100-percent);
27
+ --avatar-canvas-size: var(--dt-layout-100-percent);
28
28
  --avatar-size-text: var(--dt-font-size-200);
29
29
  --avatar-border-radius: calc(var(--avatar-size-shape) * 0.125);
30
30
  --avatar-presence-shape: calc(var(--avatar-size-shape) * 0.375);
@@ -322,19 +322,19 @@
322
322
  display: flex;
323
323
  align-items: center;
324
324
  justify-content: center;
325
- inline-size: var(--dt-size-100-percent);
326
- block-size: var(--dt-size-100-percent);
325
+ inline-size: var(--dt-layout-100-percent);
326
+ block-size: var(--dt-layout-100-percent);
327
327
  background-color: var(--dt-color-surface-contrast-opaque);
328
328
  border-radius: var(--avatar-border-radius);
329
329
  opacity: var(--dt-opacity-900);
330
330
 
331
331
  &-icon {
332
- inline-size: var(--dt-size-100-percent);
332
+ inline-size: var(--dt-layout-100-percent);
333
333
  color: var(--dt-color-foreground-primary-inverted);
334
334
  }
335
335
 
336
336
  &-text {
337
- inline-size: var(--dt-size-100-percent);
337
+ inline-size: var(--dt-layout-100-percent);
338
338
  color: var(--dt-color-foreground-primary-inverted);
339
339
  font-weight: var(--dt-font-weight-bold);
340
340
  font-size: var(--dt-font-size-200);
@@ -430,20 +430,9 @@
430
430
  position: absolute;
431
431
  background-color: var(--dt-color-neutral-transparent);
432
432
  border: var(--dt-size-border-100) solid var(--avatar-color-border);
433
- border-radius: var(--dt-size-radius-circle);
433
+ border-radius: var(--avatar-border-radius);
434
434
  content: "";
435
- inset: calc(var(--dt-size-100) * -1);
436
- mask: radial-gradient(
437
- circle calc(var(--avatar-presence-mask-size) / 2) at
438
- calc(
439
- var(--dt-size-100-percent) - var(--avatar-presence-mask-offset-x) - var(--dt-size-100)
440
- )
441
- calc(
442
- var(--dt-size-100-percent) - var(--avatar-presence-mask-offset-y) - var(--dt-size-100)
443
- ),
444
- var(--dt-color-neutral-transparent) 92%, // less than 99% to smooth the edges
445
- var(--dt-color-neutral-white) var(--dt-size-100-percent)
446
- );
435
+ inset: var(--dt-spacing-1-negative);
447
436
  }
448
437
  }
449
438
 
@@ -24,15 +24,15 @@
24
24
  --badge-color-text: var(--dt-badge-color-foreground-default);
25
25
  --badge-color-background: var(--dt-badge-color-background-default);
26
26
  --badge-color-outline: var(--dt-badge-color-border-default);
27
- --badge-radius: var(--dt-size-300);
28
- --badge-line-height: calc(var(--dt-size-500) + var(--dt-size-200));
27
+ --badge-radius: var(--dt-size-radius-300);
28
+ --badge-line-height: calc(var(--dt-spacing-200) + var(--dt-spacing-25));
29
29
  --badge-font-size: var(--dt-font-size-100);
30
30
  --badge-font-weight: var(--dt-font-weight-semi-bold);
31
- --badge-gap: var(--dt-size-200);
32
- --badge-letter-spacing: var(--dt-size-50);
33
- --badge-padding-y: var(--dt-size-100);
34
- --badge-padding-x: var(--dt-size-300);
35
- --badge-label-padding-x: var(--dt-size-200);
31
+ --badge-gap: var(--dt-spacing-25);
32
+ --badge-letter-spacing: calc(var(--dt-spacing-1) / 2);
33
+ --badge-padding-y: var(--dt-spacing-1);
34
+ --badge-padding-x: var(--dt-spacing-50);
35
+ --badge-label-padding-x: var(--dt-spacing-25);
36
36
  --badge-text-case: none;
37
37
  --badge-decorative-color: var(--dt-color-black-900);
38
38
 
@@ -43,7 +43,7 @@
43
43
  align-items: center;
44
44
  justify-content: center;
45
45
  box-sizing: border-box;
46
- min-inline-size: var(--dt-size-550);
46
+ min-inline-size: calc(var(--dt-layout-25) * 1.5);
47
47
  padding: var(--badge-padding-y) var(--badge-padding-x);
48
48
  color: var(--badge-color-text);
49
49
  font-weight: var(--badge-font-weight);
@@ -59,11 +59,11 @@
59
59
  // --------------------------------------------------------------------------
60
60
  &--count {
61
61
  --badge-radius: var(--dt-size-radius-pill);
62
- --badge-padding-x: calc(var(--dt-size-400) - var(--dt-size-100));
63
- --badge-padding-y: var(--dt-size-300);
64
- --badge-line-height: var(--dt-size-500);
65
- --badge-label-padding-x: var(--dt-size-0);
66
- --badge-gap: var(--dt-size-300);
62
+ --badge-padding-x: calc(var(--dt-spacing-100) - var(--dt-spacing-1));
63
+ --badge-padding-y: var(--dt-spacing-50);
64
+ --badge-line-height: var(--dt-layout-25);
65
+ --badge-label-padding-x: var(--dt-spacing-0);
66
+ --badge-gap: var(--dt-spacing-50);
67
67
  }
68
68
 
69
69
  // TYPE
@@ -99,7 +99,7 @@
99
99
  --badge-color-text: var(--dt-badge-color-foreground-ai);
100
100
  --badge-color-background: var(--dt-color-brand-magenta); // fallback to gradient
101
101
 
102
- text-shadow: var(--dt-size-50) var(--dt-size-50) 0 oklch(from var(--dt-color-neutral-black) l c h / 0.6);
102
+ text-shadow: calc(var(--dt-spacing-1) / 2) calc(var(--dt-spacing-1) / 2) 0 oklch(from var(--dt-color-neutral-black) l c h / 0.6);
103
103
  background-image: var(--dt-badge-color-background-ai);
104
104
  }
105
105
 
@@ -135,12 +135,14 @@
135
135
  // SLOTS
136
136
  // --------------------------------------------------------------------------
137
137
  &__decorative {
138
+ --badge-size: calc(var(--dt-layout-25) / 2);
139
+
138
140
  display: inline-flex;
139
- inline-size: var(--dt-size-400);
140
- block-size: var(--dt-size-400);
141
+ inline-size: var(--badge-size);
142
+ block-size: var(--badge-size);
141
143
  background-color: var(--badge-decorative-color);
142
- border-radius: var(--dt-size-200);
143
- margin-inline-start: var(--dt-size-200);
144
+ border-radius: var(--dt-size-radius-200);
145
+ margin-inline-start: var(--dt-spacing-25);
144
146
  }
145
147
 
146
148
  &__label {
@@ -155,11 +157,11 @@
155
157
  }
156
158
 
157
159
  &__icon-left {
158
- padding-inline-start: var(--dt-size-100);
160
+ padding-inline-start: var(--dt-spacing-1);
159
161
  }
160
162
 
161
163
  &__icon-right {
162
- padding-inline-end: var(--dt-size-100);
164
+ padding-inline-end: var(--dt-spacing-1);
163
165
  }
164
166
  }
165
167
  }
@@ -16,8 +16,8 @@
16
16
  // ------------------------------------------------------------------------
17
17
  --banner-color-border: var(--dt-color-border-default);
18
18
  --banner-line-height: var(--dt-font-line-height-200);
19
- --banner-dialog-padding-y: var(--dt-size-400);
20
- --banner-dialog-padding-x: var(--dt-size-500);
19
+ --banner-dialog-padding-y: var(--dt-spacing-100);
20
+ --banner-dialog-padding-x: var(--dt-spacing-200);
21
21
 
22
22
  position: fixed;
23
23
  inset-block-start: 0;
@@ -54,17 +54,17 @@
54
54
  display: flex;
55
55
  align-items: center;
56
56
  inline-size: 100%;
57
- min-block-size: calc(var(--dt-size-650) + var(--dt-size-200));
57
+ min-block-size: calc(var(--dt-layout-75) + var(--dt-spacing-25));
58
58
  margin: 0 auto;
59
59
  padding: var(--banner-dialog-padding-y) var(--banner-dialog-padding-x);
60
60
 
61
61
  .d-notice__icon {
62
- margin-block-start: var(--dt-size-0);
62
+ margin-block-start: var(--dt-spacing-0);
63
63
  }
64
64
 
65
65
  .d-notice__content {
66
66
  flex-direction: row;
67
- gap: var(--dt-size-350);
67
+ gap: var(--dt-spacing-75);
68
68
  align-items: baseline;
69
69
  }
70
70
 
@@ -49,19 +49,19 @@
49
49
  font-size: var(--breadcrumbs-font-size);
50
50
  line-height: var(--breadcrumbs-line-height);
51
51
  list-style: none;
52
- margin-inline: var(--dt-size-400) 0;
52
+ margin-inline: var(--dt-spacing-100) 0;
53
53
  margin-block: 0;
54
54
 
55
55
  // Provide a forward slash with each element except when it's the last one.
56
56
  &:not(:last-of-type) {
57
- margin-inline-end: var(--dt-size-450);
57
+ margin-inline-end: var(--dt-spacing-150);
58
58
 
59
59
  &::before {
60
60
  position: absolute;
61
61
  color: var(--breadcrumbs-color-separator);
62
62
  content: '/';
63
- inset-inline-end: var(--dt-size-450-negative);
64
- margin-block-start: var(--dt-size-100-negative);
63
+ inset-inline-end: var(--dt-spacing-150-negative);
64
+ margin-block-start: var(--dt-spacing-1-negative);
65
65
  }
66
66
  }
67
67