@dialpad/dialtone-css 8.80.0-next.1 → 8.80.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.
- package/lib/build/less/components/box.less +241 -0
- package/lib/build/less/components/text.less +0 -2
- package/lib/build/less/dialtone.less +1 -0
- package/lib/build/less/recipes/leftbar_row.less +2 -1
- package/lib/dist/dialtone-default-theme.css +1600 -7
- package/lib/dist/dialtone-default-theme.min.css +1 -1
- package/lib/dist/dialtone-docs.json +1 -1
- package/lib/dist/dialtone.css +1600 -7
- package/lib/dist/dialtone.min.css +1 -1
- package/lib/dist/tokens-docs.json +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
//
|
|
2
|
+
// DIALTONE
|
|
3
|
+
// COMPONENTS: BOX
|
|
4
|
+
//
|
|
5
|
+
// These are the styles for box component.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
// TABLE OF CONTENTS
|
|
9
|
+
// • @PROPERTY REGISTRATIONS
|
|
10
|
+
// • PARAMETRIC MIXINS
|
|
11
|
+
// • VALUE LISTS
|
|
12
|
+
// • BASE STYLE
|
|
13
|
+
// • MODIFIERS
|
|
14
|
+
|
|
15
|
+
// @@ @PROPERTY REGISTRATIONS
|
|
16
|
+
// ----------------------------------------------------------------------------
|
|
17
|
+
@property --box-p { syntax: "*"; inherits: false; }
|
|
18
|
+
|
|
19
|
+
@property --box-pi { syntax: "*"; inherits: false; }
|
|
20
|
+
|
|
21
|
+
@property --box-pis { syntax: "*"; inherits: false; }
|
|
22
|
+
|
|
23
|
+
@property --box-pie { syntax: "*"; inherits: false; }
|
|
24
|
+
|
|
25
|
+
@property --box-pbl { syntax: "*"; inherits: false; }
|
|
26
|
+
|
|
27
|
+
@property --box-pbs { syntax: "*"; inherits: false; }
|
|
28
|
+
|
|
29
|
+
@property --box-pbe { syntax: "*"; inherits: false; }
|
|
30
|
+
|
|
31
|
+
@property --box-surface { syntax: "<color>"; inherits: false; initial-value: transparent; }
|
|
32
|
+
|
|
33
|
+
@property --box-bc { syntax: "<color>"; inherits: false; initial-value: transparent; }
|
|
34
|
+
|
|
35
|
+
@property --box-bw { syntax: "*"; inherits: false; }
|
|
36
|
+
|
|
37
|
+
@property --box-bwi { syntax: "*"; inherits: false; }
|
|
38
|
+
|
|
39
|
+
@property --box-bwis { syntax: "*"; inherits: false; }
|
|
40
|
+
|
|
41
|
+
@property --box-bwie { syntax: "*"; inherits: false; }
|
|
42
|
+
|
|
43
|
+
@property --box-bwbl { syntax: "*"; inherits: false; }
|
|
44
|
+
|
|
45
|
+
@property --box-bwbs { syntax: "*"; inherits: false; }
|
|
46
|
+
|
|
47
|
+
@property --box-bwbe { syntax: "*"; inherits: false; }
|
|
48
|
+
|
|
49
|
+
@property --box-br { syntax: "<length-percentage>"; inherits: false; initial-value: 0; }
|
|
50
|
+
|
|
51
|
+
@property --box-shadow { syntax: "*"; inherits: false; }
|
|
52
|
+
|
|
53
|
+
@property --box-of { syntax: "*"; inherits: false; }
|
|
54
|
+
|
|
55
|
+
// ============================================================================
|
|
56
|
+
// $ PARAMETRIC MIXINS
|
|
57
|
+
// ----------------------------------------------------------------------------
|
|
58
|
+
._box-token(@prefix; @prop; @token; @names) {
|
|
59
|
+
each(@names, {
|
|
60
|
+
.d-box--@{prefix}-@{value} { @{prop}: ~"var(--@{token}-@{value})"; }
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
._box-layout(@prop) {
|
|
65
|
+
&-25 { @{prop}: var(--dt-layout-25); }
|
|
66
|
+
&-50 { @{prop}: var(--dt-layout-50); }
|
|
67
|
+
&-75 { @{prop}: var(--dt-layout-75); }
|
|
68
|
+
each(range(0, 1600, 100), {
|
|
69
|
+
&-@{value} { @{prop}: ~"var(--dt-layout-@{value})"; }
|
|
70
|
+
});
|
|
71
|
+
// Percentage tokens
|
|
72
|
+
each(@box-layout-percent-values, {
|
|
73
|
+
&-@{value}-percent { @{prop}: ~"var(--dt-layout-@{value}-percent)"; }
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
._box-border-width(@prop) {
|
|
78
|
+
each(@box-border-width-values, {
|
|
79
|
+
&-@{value} { @{prop}: ~"var(--dt-size-border-@{value})"; }
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
._box-spacing(@prop) {
|
|
84
|
+
// Stops outside both range() sequences: 1 (not a multiple of 25), 525 (not a multiple of 50)
|
|
85
|
+
&-1 { @{prop}: var(--dt-spacing-1); }
|
|
86
|
+
&-525 { @{prop}: var(--dt-spacing-525); }
|
|
87
|
+
|
|
88
|
+
each(range(0, 200, 25), {
|
|
89
|
+
&-@{value} { @{prop}: ~"var(--dt-spacing-@{value})"; }
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
each(range(250, 800, 50), {
|
|
93
|
+
&-@{value} { @{prop}: ~"var(--dt-spacing-@{value})"; }
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ============================================================================
|
|
98
|
+
// $ VALUE LISTS
|
|
99
|
+
// ----------------------------------------------------------------------------
|
|
100
|
+
// `positive*` is intentionally absent from these lists. Surface and border
|
|
101
|
+
// tokens still use legacy `success*` naming (no `--dt-color-surface-positive-*`
|
|
102
|
+
// exists yet), so `positive*` modifier classes are generated from explicit
|
|
103
|
+
// alias blocks below that map to `--dt-color-surface-success-*` /
|
|
104
|
+
// `--dt-color-border-success-*`. Once DLT-3331 lands the token rename,
|
|
105
|
+
// `positive*` moves into these lists and the alias blocks can be dropped.
|
|
106
|
+
@box-surface-values: primary, secondary, moderate, bold, strong, contrast, backdrop, brand, info, warning, critical, brand-subtle, brand-strong, info-subtle, info-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, primary-opaque, secondary-opaque, moderate-opaque, bold-opaque, strong-opaque, contrast-opaque, brand-opaque, brand-subtle-opaque, info-opaque, info-subtle-opaque, warning-opaque, warning-subtle-opaque, critical-opaque, critical-subtle-opaque;
|
|
107
|
+
|
|
108
|
+
@box-border-color-values: subtle, default, moderate, bold, accent, focus, brand, warning, critical, brand-subtle, brand-strong, warning-subtle, warning-strong, critical-subtle, critical-strong;
|
|
109
|
+
|
|
110
|
+
@box-border-width-values: 0, 50, 100, 150, 200, 300, 400;
|
|
111
|
+
@box-layout-percent-values: 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 95, 100;
|
|
112
|
+
@box-shadow-values: small, medium, large, extra-large, card;
|
|
113
|
+
@box-overflow-values: hidden, scroll, auto, clip, visible;
|
|
114
|
+
|
|
115
|
+
@layer dialtone.components {
|
|
116
|
+
|
|
117
|
+
// @@ BASE STYLE
|
|
118
|
+
// ----------------------------------------------------------------------------
|
|
119
|
+
.d-box {
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
|
|
122
|
+
// Overflow
|
|
123
|
+
overflow: var(--box-of, visible);
|
|
124
|
+
|
|
125
|
+
// Surface — OKLCH relative syntax supports d-bgo* opacity utilities
|
|
126
|
+
background-color: oklch(from var(--box-surface) l c h / var(--bgo, alpha));
|
|
127
|
+
border-color: oklch(from var(--box-bc) l c h / var(--bco, alpha));
|
|
128
|
+
|
|
129
|
+
// Border — always solid, no visible border until borderWidth prop is set.
|
|
130
|
+
// Width cascade: specific → axis → shorthand → 0
|
|
131
|
+
border-style: solid;
|
|
132
|
+
border-block-start-width: var(--box-bwbs, var(--box-bwbl, var(--box-bw, 0)));
|
|
133
|
+
border-block-end-width: var(--box-bwbe, var(--box-bwbl, var(--box-bw, 0)));
|
|
134
|
+
border-inline-start-width: var(--box-bwis, var(--box-bwi, var(--box-bw, 0)));
|
|
135
|
+
border-inline-end-width: var(--box-bwie, var(--box-bwi, var(--box-bw, 0)));
|
|
136
|
+
border-radius: var(--box-br);
|
|
137
|
+
|
|
138
|
+
// Shadow
|
|
139
|
+
box-shadow: var(--box-shadow, none);
|
|
140
|
+
|
|
141
|
+
// Padding cascade: specific → axis → shorthand → 0
|
|
142
|
+
padding-block: var(--box-pbs, var(--box-pbl, var(--box-p, 0))) var(--box-pbe, var(--box-pbl, var(--box-p, 0)));
|
|
143
|
+
padding-inline: var(--box-pis, var(--box-pi, var(--box-p, 0))) var(--box-pie, var(--box-pi, var(--box-p, 0)));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// ============================================================================
|
|
147
|
+
// $ MODIFIERS
|
|
148
|
+
// ----------------------------------------------------------------------------
|
|
149
|
+
// $$ PADDING
|
|
150
|
+
// ----------------------------------------------------------------------------
|
|
151
|
+
.d-box--p { ._box-spacing(--box-p); }
|
|
152
|
+
.d-box--pi { ._box-spacing(--box-pi); }
|
|
153
|
+
.d-box--pis { ._box-spacing(--box-pis); }
|
|
154
|
+
.d-box--pie { ._box-spacing(--box-pie); }
|
|
155
|
+
.d-box--pbl { ._box-spacing(--box-pbl); }
|
|
156
|
+
.d-box--pbs { ._box-spacing(--box-pbs); }
|
|
157
|
+
.d-box--pbe { ._box-spacing(--box-pbe); }
|
|
158
|
+
|
|
159
|
+
// ----------------------------------------------------------------------------
|
|
160
|
+
// $$ SURFACE
|
|
161
|
+
// ----------------------------------------------------------------------------
|
|
162
|
+
._box-token(surface; --box-surface; dt-color-surface; @box-surface-values);
|
|
163
|
+
|
|
164
|
+
// `positive` prop → maps to `--dt-color-surface-success-*` tokens (surface tokens use legacy `success` naming; see DLT-3331)
|
|
165
|
+
.d-box--surface-positive { --box-surface: var(--dt-color-surface-success); }
|
|
166
|
+
.d-box--surface-positive-subtle { --box-surface: var(--dt-color-surface-success-subtle); }
|
|
167
|
+
.d-box--surface-positive-strong { --box-surface: var(--dt-color-surface-success-strong); }
|
|
168
|
+
.d-box--surface-positive-opaque { --box-surface: var(--dt-color-surface-success-opaque); }
|
|
169
|
+
.d-box--surface-positive-subtle-opaque { --box-surface: var(--dt-color-surface-success-subtle-opaque); }
|
|
170
|
+
|
|
171
|
+
// ----------------------------------------------------------------------------
|
|
172
|
+
// $$ BORDER
|
|
173
|
+
// ----------------------------------------------------------------------------
|
|
174
|
+
// ── Border ──────────────────────────────────────────────────────────────────
|
|
175
|
+
.d-box--bc-transparent { --box-bc: transparent; }
|
|
176
|
+
._box-token(bc; --box-bc; dt-color-border; @box-border-color-values);
|
|
177
|
+
|
|
178
|
+
// `positive` prop → maps to `--dt-color-border-success-*` tokens (border tokens use legacy `success` naming; see DLT-3331)
|
|
179
|
+
.d-box--bc-positive { --box-bc: var(--dt-color-border-success); }
|
|
180
|
+
.d-box--bc-positive-subtle { --box-bc: var(--dt-color-border-success-subtle); }
|
|
181
|
+
.d-box--bc-positive-strong { --box-bc: var(--dt-color-border-success-strong); }
|
|
182
|
+
|
|
183
|
+
@box-border-radius-values: 0, 100, 200, 300, 350, 400, 450, 500, 600;
|
|
184
|
+
|
|
185
|
+
// Border width — 7 axes × border-width scale
|
|
186
|
+
.d-box--bw { ._box-border-width(--box-bw); }
|
|
187
|
+
.d-box--bwi { ._box-border-width(--box-bwi); }
|
|
188
|
+
.d-box--bwis { ._box-border-width(--box-bwis); }
|
|
189
|
+
.d-box--bwie { ._box-border-width(--box-bwie); }
|
|
190
|
+
.d-box--bwbl { ._box-border-width(--box-bwbl); }
|
|
191
|
+
.d-box--bwbs { ._box-border-width(--box-bwbs); }
|
|
192
|
+
.d-box--bwbe { ._box-border-width(--box-bwbe); }
|
|
193
|
+
|
|
194
|
+
// Border radius
|
|
195
|
+
each(@box-border-radius-values, {
|
|
196
|
+
.d-box--br-@{value} { --box-br: ~"var(--dt-size-radius-@{value})"; }
|
|
197
|
+
});
|
|
198
|
+
.d-box--br-pill { --box-br: var(--dt-size-radius-pill); }
|
|
199
|
+
.d-box--br-circle { --box-br: var(--dt-size-radius-circle); }
|
|
200
|
+
|
|
201
|
+
// ----------------------------------------------------------------------------
|
|
202
|
+
// $$ SHADOW
|
|
203
|
+
// ----------------------------------------------------------------------------
|
|
204
|
+
// ── Shadow ──────────────────────────────────────────────────────────────────
|
|
205
|
+
._box-token(shadow; --box-shadow; dt-shadow; @box-shadow-values);
|
|
206
|
+
|
|
207
|
+
// ----------------------------------------------------------------------------
|
|
208
|
+
// $$ SIZING
|
|
209
|
+
// ----------------------------------------------------------------------------
|
|
210
|
+
// Layout token values → modifier classes. Raw CSS fallback → inline :style.
|
|
211
|
+
.d-box--is { ._box-layout(inline-size); }
|
|
212
|
+
.d-box--bls { ._box-layout(block-size); }
|
|
213
|
+
.d-box--min-is { ._box-layout(min-inline-size); }
|
|
214
|
+
.d-box--max-is { ._box-layout(max-inline-size); }
|
|
215
|
+
.d-box--min-bls { ._box-layout(min-block-size); }
|
|
216
|
+
.d-box--max-bls { ._box-layout(max-block-size); }
|
|
217
|
+
|
|
218
|
+
// ----------------------------------------------------------------------------
|
|
219
|
+
// $$ OVERFLOW
|
|
220
|
+
// ----------------------------------------------------------------------------
|
|
221
|
+
each(@box-overflow-values, {
|
|
222
|
+
.d-box--of-@{value} { --box-of: @value; }
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// ----------------------------------------------------------------------------
|
|
226
|
+
// $$ SCROLLBAR
|
|
227
|
+
// ----------------------------------------------------------------------------
|
|
228
|
+
// Inner viewport wrapper — only rendered when scrollbar prop is active.
|
|
229
|
+
// OverlayScrollbars uses this as the viewport element (el.children[0]).
|
|
230
|
+
// :has() detects the wrapper — CSS reacts to its presence without JS class toggling.
|
|
231
|
+
.d-box__scrollbar-content {
|
|
232
|
+
inline-size: 100%;
|
|
233
|
+
block-size: 100%;
|
|
234
|
+
overflow: auto; // Native scroll fallback when OverlayScrollbars is unavailable
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.d-box:has(> .d-box__scrollbar-content) {
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
}
|
|
@@ -231,8 +231,6 @@
|
|
|
231
231
|
&--tone-critical-strong { --text-tone: var(--dt-color-foreground-critical-strong); }
|
|
232
232
|
&--tone-positive { --text-tone: var(--dt-color-foreground-positive); }
|
|
233
233
|
&--tone-positive-strong { --text-tone: var(--dt-color-foreground-positive-strong); }
|
|
234
|
-
&--tone-success { --text-tone: var(--dt-color-foreground-success); }
|
|
235
|
-
&--tone-success-strong { --text-tone: var(--dt-color-foreground-success-strong); }
|
|
236
234
|
&--tone-warning { --text-tone: var(--dt-color-foreground-warning); }
|
|
237
235
|
&--tone-neutral-black { --text-tone: var(--dt-color-neutral-black); }
|
|
238
236
|
&--tone-neutral-white { --text-tone: var(--dt-color-neutral-white); }
|
|
@@ -204,7 +204,8 @@
|
|
|
204
204
|
--button-color-background: color-mix(in srgb, var(--dt-shell-mention-color-surface-primary) 30%, var(--dt-color-surface-primary) 100%);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.d-fc-success
|
|
207
|
+
.d-fc-success,
|
|
208
|
+
.d-fc-positive {
|
|
208
209
|
color:var(--dt-shell-color-foreground-positive)!important;
|
|
209
210
|
}
|
|
210
211
|
|