@hattisar/design-tokens 0.3.27 → 0.3.28
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/package.json +1 -1
- package/tokens.css +34 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattisar/design-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.28",
|
|
4
4
|
"description": "Shared design tokens (colors, type, radius, spacing, motion) and base primitives (reset, buttons, inputs, cards, modals, auth shell) for every Hattisar frontend.",
|
|
5
5
|
"main": "tokens.css",
|
|
6
6
|
"files": [
|
package/tokens.css
CHANGED
|
@@ -267,6 +267,28 @@
|
|
|
267
267
|
--card-header-height: 36px;
|
|
268
268
|
--card-header-control-height: 24px;
|
|
269
269
|
|
|
270
|
+
/* The signature widget card: a filled frame, a header band that shows the
|
|
271
|
+
frame's own fill, and a white body set into it. WidgetCard, the line-items
|
|
272
|
+
card, the form sections and the settings cards all read these, so the look
|
|
273
|
+
is changed here once and never restated per card. They are built from the
|
|
274
|
+
colour and radius tokens, so they follow the theme without a block of
|
|
275
|
+
their own. */
|
|
276
|
+
--widget-bg: var(--color-table-header);
|
|
277
|
+
--widget-border-width: 1px;
|
|
278
|
+
--widget-border-color: var(--color-border-strong);
|
|
279
|
+
--widget-radius: var(--radius-sm);
|
|
280
|
+
--widget-shadow: var(--shadow-sm);
|
|
281
|
+
--widget-header-height: var(--card-header-height);
|
|
282
|
+
--widget-header-padding: 6px var(--space-3);
|
|
283
|
+
--widget-title-size: var(--text-sm);
|
|
284
|
+
--widget-title-weight: var(--font-weight-medium);
|
|
285
|
+
--widget-body-bg: var(--color-background-card);
|
|
286
|
+
--widget-body-padding: var(--space-3) var(--space-4);
|
|
287
|
+
--widget-divider: var(--color-border);
|
|
288
|
+
/* The surface a sheet or label sits on in a preview: a shade off the card. */
|
|
289
|
+
--widget-canvas-bg: color-mix(in srgb, var(--color-text-primary) 5%, var(--color-background-card));
|
|
290
|
+
--widget-row-padding: var(--space-3) var(--space-4);
|
|
291
|
+
|
|
270
292
|
/* Colours that must not follow the theme, named instead of repeated as
|
|
271
293
|
hex. White on a saturated fill (an org tile, an integration logo)
|
|
272
294
|
stays white in dark mode; the scrim dims the page behind a modal or
|
|
@@ -296,6 +318,11 @@
|
|
|
296
318
|
--button-height: 28px;
|
|
297
319
|
--button-radius: var(--radius-full);
|
|
298
320
|
--button-padding-x: var(--space-3);
|
|
321
|
+
/* Not equal on purpose: the label's cap-height centre sits 0.75px above the
|
|
322
|
+
box's centre with equal padding, which reads as text riding high in the
|
|
323
|
+
pill. Three-quarters of a pixel off each side puts the ink in the middle. */
|
|
324
|
+
--button-padding-top: calc(var(--space-1) + 0.75px);
|
|
325
|
+
--button-padding-bottom: calc(var(--space-1) - 0.75px);
|
|
299
326
|
--button-font-size: var(--text-sm);
|
|
300
327
|
--button-font-weight: var(--font-weight-medium);
|
|
301
328
|
|
|
@@ -1048,7 +1075,7 @@ button {
|
|
|
1048
1075
|
border: none;
|
|
1049
1076
|
border-radius: var(--button-radius);
|
|
1050
1077
|
min-height: var(--button-height);
|
|
1051
|
-
padding: var(--
|
|
1078
|
+
padding: var(--button-padding-top) var(--button-padding-x) var(--button-padding-bottom);
|
|
1052
1079
|
font-size: var(--button-font-size);
|
|
1053
1080
|
font-weight: var(--button-font-weight);
|
|
1054
1081
|
background: var(--color-cta);
|
|
@@ -1119,7 +1146,7 @@ button:focus-visible {
|
|
|
1119
1146
|
border: none;
|
|
1120
1147
|
border-radius: var(--button-radius);
|
|
1121
1148
|
min-height: var(--button-height);
|
|
1122
|
-
padding: var(--
|
|
1149
|
+
padding: var(--button-padding-top) var(--button-padding-x) var(--button-padding-bottom);
|
|
1123
1150
|
font-size: var(--button-font-size);
|
|
1124
1151
|
font-weight: var(--button-font-weight);
|
|
1125
1152
|
background: var(--button-secondary-bg);
|
|
@@ -1156,7 +1183,7 @@ button:focus-visible {
|
|
|
1156
1183
|
border: none;
|
|
1157
1184
|
border-radius: var(--button-radius);
|
|
1158
1185
|
min-height: var(--button-height);
|
|
1159
|
-
padding: var(--
|
|
1186
|
+
padding: var(--button-padding-top) var(--button-padding-x) var(--button-padding-bottom);
|
|
1160
1187
|
font-size: var(--button-font-size);
|
|
1161
1188
|
font-weight: var(--button-font-weight);
|
|
1162
1189
|
background: var(--color-destructive-fill);
|
|
@@ -1469,6 +1496,10 @@ select:disabled {
|
|
|
1469
1496
|
input[type="checkbox"],
|
|
1470
1497
|
input[type="radio"] {
|
|
1471
1498
|
width: auto;
|
|
1499
|
+
/* No vertical margin: the field rule above gives every input a top margin,
|
|
1500
|
+
which on a checkbox or radio set beside its label pushes it below the
|
|
1501
|
+
text's centre. The sides keep the browser's own spacing. */
|
|
1502
|
+
margin-block: 0;
|
|
1472
1503
|
accent-color: var(--color-brand);
|
|
1473
1504
|
}
|
|
1474
1505
|
|
|
@@ -1594,8 +1625,6 @@ input[type="radio"] {
|
|
|
1594
1625
|
display: block;
|
|
1595
1626
|
font-size: var(--text-xs);
|
|
1596
1627
|
font-weight: 400;
|
|
1597
|
-
letter-spacing: 0.06em;
|
|
1598
|
-
text-transform: uppercase;
|
|
1599
1628
|
color: var(--color-text-muted);
|
|
1600
1629
|
margin-bottom: 6px;
|
|
1601
1630
|
}
|