@tempoxyz/ds 0.2.4 → 0.2.5
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/web/components/Accordion.js.zyzz.json +1 -1
- package/dist/web/components/AlertDialog.js.zyzz.json +1 -1
- package/dist/web/components/Amount.js.zyzz.json +1 -1
- package/dist/web/components/AmountInput.js.zyzz.json +1 -1
- package/dist/web/components/AppShell.js.zyzz.json +1 -1
- package/dist/web/components/Autocomplete.js.zyzz.json +1 -1
- package/dist/web/components/Avatar.js.zyzz.json +1 -1
- package/dist/web/components/Banner.js.zyzz.json +1 -1
- package/dist/web/components/Breadcrumbs.js.zyzz.json +1 -1
- package/dist/web/components/Button.js.zyzz.json +1 -1
- package/dist/web/components/Calendar.js.zyzz.json +1 -1
- package/dist/web/components/Callout.js.zyzz.json +1 -1
- package/dist/web/components/Checkbox.js.zyzz.json +1 -1
- package/dist/web/components/CheckboxGroup.js.zyzz.json +1 -1
- package/dist/web/components/ChoiceGroup.js.zyzz.json +1 -1
- package/dist/web/components/Choicebox.js.zyzz.json +1 -1
- package/dist/web/components/Combobox.js.zyzz.json +1 -1
- package/dist/web/components/Container.js.zyzz.json +1 -1
- package/dist/web/components/CopyButton.js.zyzz.json +1 -1
- package/dist/web/components/DatePicker.js.zyzz.json +1 -1
- package/dist/web/components/Dialog.js.zyzz.json +1 -1
- package/dist/web/components/Drawer.js.zyzz.json +1 -1
- package/dist/web/components/Empty.js.zyzz.json +1 -1
- package/dist/web/components/Field.js.zyzz.json +1 -1
- package/dist/web/components/Fieldset.js.zyzz.json +1 -1
- package/dist/web/components/Frame.js.zyzz.json +1 -1
- package/dist/web/components/Gauge.js.zyzz.json +1 -1
- package/dist/web/components/Grid.js.zyzz.json +1 -1
- package/dist/web/components/Hex.js.zyzz.json +1 -1
- package/dist/web/components/IconChip.css +1 -1
- package/dist/web/components/IconChip.d.ts.map +1 -1
- package/dist/web/components/IconChip.js.map +1 -1
- package/dist/web/components/IconChip.js.zyzz.json +1 -1
- package/dist/web/components/Identicon.js.zyzz.json +1 -1
- package/dist/web/components/Inline.js.zyzz.json +1 -1
- package/dist/web/components/Input.js.zyzz.json +1 -1
- package/dist/web/components/Inset.js.zyzz.json +1 -1
- package/dist/web/components/Kbd.js.zyzz.json +1 -1
- package/dist/web/components/LoadingDots.js.zyzz.json +1 -1
- package/dist/web/components/Menu.js.zyzz.json +1 -1
- package/dist/web/components/NumberField.js.zyzz.json +1 -1
- package/dist/web/components/OtpField.js.zyzz.json +1 -1
- package/dist/web/components/Pagination.js.zyzz.json +1 -1
- package/dist/web/components/Popover.js.zyzz.json +1 -1
- package/dist/web/components/Progress.js.zyzz.json +1 -1
- package/dist/web/components/Qr.js.zyzz.json +1 -1
- package/dist/web/components/RadioGroup.js.zyzz.json +1 -1
- package/dist/web/components/Rows.css +1 -1
- package/dist/web/components/Rows.d.ts +14 -3
- package/dist/web/components/Rows.d.ts.map +1 -1
- package/dist/web/components/Rows.js +6 -4
- package/dist/web/components/Rows.js.map +1 -1
- package/dist/web/components/Rows.js.zyzz.json +1 -1
- package/dist/web/components/SecretValue.js.zyzz.json +1 -1
- package/dist/web/components/Select.js.zyzz.json +1 -1
- package/dist/web/components/Separator.js.zyzz.json +1 -1
- package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
- package/dist/web/components/Skeleton.js.zyzz.json +1 -1
- package/dist/web/components/Slider.js.zyzz.json +1 -1
- package/dist/web/components/Snippet.js.zyzz.json +1 -1
- package/dist/web/components/Spinner.js.zyzz.json +1 -1
- package/dist/web/components/SplitButton.js.zyzz.json +1 -1
- package/dist/web/components/Stack.js.zyzz.json +1 -1
- package/dist/web/components/Stepper.js.zyzz.json +1 -1
- package/dist/web/components/Surface.css +1 -1
- package/dist/web/components/Surface.d.ts +19 -1
- package/dist/web/components/Surface.d.ts.map +1 -1
- package/dist/web/components/Surface.js +2 -2
- package/dist/web/components/Surface.js.map +1 -1
- package/dist/web/components/Surface.js.zyzz.json +1 -1
- package/dist/web/components/Switch.js.zyzz.json +1 -1
- package/dist/web/components/Table.js.zyzz.json +1 -1
- package/dist/web/components/Tabs.js.zyzz.json +1 -1
- package/dist/web/components/Tag.js.zyzz.json +1 -1
- package/dist/web/components/Textarea.js.zyzz.json +1 -1
- package/dist/web/components/Toast.js.zyzz.json +1 -1
- package/dist/web/components/Token.js.zyzz.json +1 -1
- package/dist/web/components/Tooltip.js.zyzz.json +1 -1
- package/dist/web/components/internal/Field.js.zyzz.json +1 -1
- package/dist/web/components/internal/InputGroup.css +1 -1
- package/dist/web/components/internal/InputGroup.d.ts +11 -0
- package/dist/web/components/internal/InputGroup.d.ts.map +1 -1
- package/dist/web/components/internal/InputGroup.js +1 -1
- package/dist/web/components/internal/InputGroup.js.map +1 -1
- package/dist/web/components/internal/InputGroup.js.zyzz.json +1 -1
- package/dist/web/components/internal/Listbox.js.zyzz.json +1 -1
- package/dist/web/index.js.zyzz.json +1 -1
- package/dist/web/vars.d.ts +1 -1
- package/dist/web/vars.js.map +1 -1
- package/dist/web/vars.js.zyzz.json +1 -1
- package/dist/web/zyzz.config.d.ts +5 -5
- package/dist/web/zyzz.config.js.zyzz.json +1 -1
- package/package.json +1 -1
- package/src/web/components/IconChip.tsx +0 -1
- package/src/web/components/Rows.tsx +28 -9
- package/src/web/components/Surface.tsx +9 -3
- package/src/web/components/internal/InputGroup.ts +10 -0
- package/src/web/vars.ts +3 -3
package/package.json
CHANGED
|
@@ -66,7 +66,13 @@ export namespace Rows {
|
|
|
66
66
|
export function Info(props: Info.Props) {
|
|
67
67
|
const { className, vars, ...attributes } = props
|
|
68
68
|
|
|
69
|
-
return
|
|
69
|
+
return (
|
|
70
|
+
<span
|
|
71
|
+
{...attributes}
|
|
72
|
+
data-info=""
|
|
73
|
+
{...styles.info({ className, style: props.style, vars })}
|
|
74
|
+
/>
|
|
75
|
+
)
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
export namespace Info {
|
|
@@ -141,7 +147,9 @@ export namespace Rows {
|
|
|
141
147
|
}
|
|
142
148
|
|
|
143
149
|
/**
|
|
144
|
-
* `size` sets one row height for every row. `
|
|
150
|
+
* `size` sets one row height for every row. A 32px control fits `small` and `medium` rows, and a
|
|
151
|
+
* 40px control fits `large` rows, without changing that height. `inset` dividers start where the
|
|
152
|
+
* row text does.
|
|
145
153
|
* Inside a `Surface`, rows reach its edges. Variants default to `dividers="inset"`,
|
|
146
154
|
* `size="medium"`.
|
|
147
155
|
*/
|
|
@@ -392,8 +400,9 @@ namespace styles {
|
|
|
392
400
|
typography: 'label.14.strong',
|
|
393
401
|
selectors: {
|
|
394
402
|
'& [data-divider]': { position: 'relative' },
|
|
403
|
+
// The faintest gray keeps dividers quiet on filled surfaces as well as on the page.
|
|
395
404
|
'& [data-divider]::before': {
|
|
396
|
-
backgroundColor: 'grayAlpha.
|
|
405
|
+
backgroundColor: 'grayAlpha.100',
|
|
397
406
|
content: '"" !custom',
|
|
398
407
|
height: '1',
|
|
399
408
|
insetBlockStart: '0',
|
|
@@ -428,11 +437,20 @@ namespace styles {
|
|
|
428
437
|
inset: { selectors: { '& [data-divider]::before': { insetInline: '16' } } },
|
|
429
438
|
none: { selectors: { '& [data-divider]::before': { display: 'none' } } },
|
|
430
439
|
},
|
|
431
|
-
// Panels share the rows' side padding so their text lines up.
|
|
440
|
+
// Panels share the rows' side padding so their text lines up. Info takes back the block
|
|
441
|
+
// padding that small and medium rows trim for controls, so two-line text keeps its room.
|
|
432
442
|
size: {
|
|
433
443
|
large: { selectors: { '& [data-panel]': { paddingInline: '24' } } },
|
|
434
|
-
medium: {
|
|
435
|
-
|
|
444
|
+
medium: {
|
|
445
|
+
selectors: {
|
|
446
|
+
'& [data-info]': { paddingBlock: '4' },
|
|
447
|
+
'& [data-panel]': { paddingInline: '20' },
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
small: {
|
|
451
|
+
typography: 'label.13.strong',
|
|
452
|
+
selectors: { '& [data-info]': { paddingBlock: '2' } },
|
|
453
|
+
},
|
|
436
454
|
},
|
|
437
455
|
},
|
|
438
456
|
},
|
|
@@ -491,11 +509,12 @@ namespace styles {
|
|
|
491
509
|
],
|
|
492
510
|
defaultVariants: { size: 'medium', spacing: 'both' },
|
|
493
511
|
variants: {
|
|
494
|
-
// 36, 40 and 56px.
|
|
512
|
+
// 36, 40 and 56px. Block padding leaves room for a 32px control in small and medium rows and a
|
|
513
|
+
// 40px control in large rows, so a row with a control matches the text rows beside it.
|
|
495
514
|
size: {
|
|
496
515
|
large: { minHeight: '56' },
|
|
497
|
-
medium: { minHeight: '40' },
|
|
498
|
-
small: { minHeight: '36', paddingBlock: '
|
|
516
|
+
medium: { minHeight: '40', paddingBlock: '4' },
|
|
517
|
+
small: { minHeight: '36', paddingBlock: '2' },
|
|
499
518
|
},
|
|
500
519
|
spacing: {
|
|
501
520
|
both: { paddingInline: '16' },
|
|
@@ -11,7 +11,7 @@ import { variants, vars } from '../zyzz.config.js'
|
|
|
11
11
|
* - `size` sets the corner radius and padding together.
|
|
12
12
|
* - Name the card with `Surface.Title`, which renders an `h2`, so headings keep the card navigable.
|
|
13
13
|
* - A pressable surface should hold no other interactive controls, since nested targets conflict.
|
|
14
|
-
* - A direct child `table` or `Rows` bleeds into the
|
|
14
|
+
* - A direct child `table` or `Rows` bleeds into the padding, so row fills reach the edges.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* <Surface>
|
|
@@ -251,8 +251,8 @@ namespace styles {
|
|
|
251
251
|
// Padding is one and a half times the radius, and they scale together. A direct child
|
|
252
252
|
// table or Rows bleeds into the inline padding so fills reach the edges. Table cells at the
|
|
253
253
|
// edges take back exactly the padding, so their text aligns with the content edge, while rows
|
|
254
|
-
// keep their own side padding. Rows
|
|
255
|
-
// its own.
|
|
254
|
+
// keep their own side padding. Rows at the top or bottom edge take the full block padding,
|
|
255
|
+
// since each row brings its own, and take half beside other content.
|
|
256
256
|
size: {
|
|
257
257
|
large: {
|
|
258
258
|
borderRadius: '16',
|
|
@@ -260,6 +260,8 @@ namespace styles {
|
|
|
260
260
|
selectors: {
|
|
261
261
|
'& > table, & > [data-rows]': { marginInline: '-24' },
|
|
262
262
|
'& > [data-rows]': { marginBlock: '-12' },
|
|
263
|
+
'& > [data-rows]:first-child': { marginBlockStart: '-24' },
|
|
264
|
+
'& > [data-rows]:last-child': { marginBlockEnd: '-24' },
|
|
263
265
|
'& > table': { width: `calc(100% + ${vars.spacing['48']}) !custom` },
|
|
264
266
|
'& > table > caption, & > table tr > :first-child': {
|
|
265
267
|
paddingInlineStart: '24',
|
|
@@ -283,6 +285,8 @@ namespace styles {
|
|
|
283
285
|
selectors: {
|
|
284
286
|
'& > table, & > [data-rows]': { marginInline: '-16' },
|
|
285
287
|
'& > [data-rows]': { marginBlock: '-8' },
|
|
288
|
+
'& > [data-rows]:first-child': { marginBlockStart: '-16' },
|
|
289
|
+
'& > [data-rows]:last-child': { marginBlockEnd: '-16' },
|
|
286
290
|
'& > table': { width: `calc(100% + ${vars.spacing['32']}) !custom` },
|
|
287
291
|
'& > table > caption, & > table tr > :first-child': {
|
|
288
292
|
paddingInlineStart: '16',
|
|
@@ -306,6 +310,8 @@ namespace styles {
|
|
|
306
310
|
selectors: {
|
|
307
311
|
'& > table, & > [data-rows]': { marginInline: '-12' },
|
|
308
312
|
'& > [data-rows]': { marginBlock: '-6' },
|
|
313
|
+
'& > [data-rows]:first-child': { marginBlockStart: '-12' },
|
|
314
|
+
'& > [data-rows]:last-child': { marginBlockEnd: '-12' },
|
|
309
315
|
'& > table': { width: `calc(100% + ${vars.spacing['24']}) !custom` },
|
|
310
316
|
'& > table > caption, & > table tr > :first-child': {
|
|
311
317
|
paddingInlineStart: '12',
|
|
@@ -234,6 +234,16 @@ export namespace styles {
|
|
|
234
234
|
},
|
|
235
235
|
},
|
|
236
236
|
default: {},
|
|
237
|
+
// Fills only on hover, for a picker inside a row. As a button, it sizes to its content.
|
|
238
|
+
text: {
|
|
239
|
+
backgroundColor: 'transparent !custom',
|
|
240
|
+
selectors: {
|
|
241
|
+
'&:is(button)': { width: 'auto !custom' },
|
|
242
|
+
'&:hover:not(:disabled, [data-disabled], :has(input:disabled))': {
|
|
243
|
+
backgroundColor: 'grayAlpha.100',
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
237
247
|
},
|
|
238
248
|
},
|
|
239
249
|
},
|
package/src/web/vars.ts
CHANGED
|
@@ -58,10 +58,10 @@ export const variables = Vars.define(
|
|
|
58
58
|
},
|
|
59
59
|
// Lifts surfaces off the near-black page in dark mode, so cards and popups stay distinct.
|
|
60
60
|
// `raised` fills popups and dialogs above surfaces. `indicator` fills the selected segment of a
|
|
61
|
-
// segmented control.
|
|
62
|
-
// dark mode.
|
|
61
|
+
// segmented control. `chip` matches grayAlpha 100, so it stays dim on gray fills. The status
|
|
62
|
+
// fills tint callouts with step 300 in light mode and step 100 in dark mode.
|
|
63
63
|
background: {
|
|
64
|
-
chip: { dark: '#
|
|
64
|
+
chip: { dark: '#ffffff12', light: '#0000000d' },
|
|
65
65
|
indicator: { dark: 'rgb(255 255 255 / 0.16)', light: '#fff' },
|
|
66
66
|
info: { dark: '#161b29', light: '#e6eefe' },
|
|
67
67
|
negative: { dark: '#2a1410', light: '#ffe6e0' },
|