@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.
Files changed (98) hide show
  1. package/dist/web/components/Accordion.js.zyzz.json +1 -1
  2. package/dist/web/components/AlertDialog.js.zyzz.json +1 -1
  3. package/dist/web/components/Amount.js.zyzz.json +1 -1
  4. package/dist/web/components/AmountInput.js.zyzz.json +1 -1
  5. package/dist/web/components/AppShell.js.zyzz.json +1 -1
  6. package/dist/web/components/Autocomplete.js.zyzz.json +1 -1
  7. package/dist/web/components/Avatar.js.zyzz.json +1 -1
  8. package/dist/web/components/Banner.js.zyzz.json +1 -1
  9. package/dist/web/components/Breadcrumbs.js.zyzz.json +1 -1
  10. package/dist/web/components/Button.js.zyzz.json +1 -1
  11. package/dist/web/components/Calendar.js.zyzz.json +1 -1
  12. package/dist/web/components/Callout.js.zyzz.json +1 -1
  13. package/dist/web/components/Checkbox.js.zyzz.json +1 -1
  14. package/dist/web/components/CheckboxGroup.js.zyzz.json +1 -1
  15. package/dist/web/components/ChoiceGroup.js.zyzz.json +1 -1
  16. package/dist/web/components/Choicebox.js.zyzz.json +1 -1
  17. package/dist/web/components/Combobox.js.zyzz.json +1 -1
  18. package/dist/web/components/Container.js.zyzz.json +1 -1
  19. package/dist/web/components/CopyButton.js.zyzz.json +1 -1
  20. package/dist/web/components/DatePicker.js.zyzz.json +1 -1
  21. package/dist/web/components/Dialog.js.zyzz.json +1 -1
  22. package/dist/web/components/Drawer.js.zyzz.json +1 -1
  23. package/dist/web/components/Empty.js.zyzz.json +1 -1
  24. package/dist/web/components/Field.js.zyzz.json +1 -1
  25. package/dist/web/components/Fieldset.js.zyzz.json +1 -1
  26. package/dist/web/components/Frame.js.zyzz.json +1 -1
  27. package/dist/web/components/Gauge.js.zyzz.json +1 -1
  28. package/dist/web/components/Grid.js.zyzz.json +1 -1
  29. package/dist/web/components/Hex.js.zyzz.json +1 -1
  30. package/dist/web/components/IconChip.css +1 -1
  31. package/dist/web/components/IconChip.d.ts.map +1 -1
  32. package/dist/web/components/IconChip.js.map +1 -1
  33. package/dist/web/components/IconChip.js.zyzz.json +1 -1
  34. package/dist/web/components/Identicon.js.zyzz.json +1 -1
  35. package/dist/web/components/Inline.js.zyzz.json +1 -1
  36. package/dist/web/components/Input.js.zyzz.json +1 -1
  37. package/dist/web/components/Inset.js.zyzz.json +1 -1
  38. package/dist/web/components/Kbd.js.zyzz.json +1 -1
  39. package/dist/web/components/LoadingDots.js.zyzz.json +1 -1
  40. package/dist/web/components/Menu.js.zyzz.json +1 -1
  41. package/dist/web/components/NumberField.js.zyzz.json +1 -1
  42. package/dist/web/components/OtpField.js.zyzz.json +1 -1
  43. package/dist/web/components/Pagination.js.zyzz.json +1 -1
  44. package/dist/web/components/Popover.js.zyzz.json +1 -1
  45. package/dist/web/components/Progress.js.zyzz.json +1 -1
  46. package/dist/web/components/Qr.js.zyzz.json +1 -1
  47. package/dist/web/components/RadioGroup.js.zyzz.json +1 -1
  48. package/dist/web/components/Rows.css +1 -1
  49. package/dist/web/components/Rows.d.ts +14 -3
  50. package/dist/web/components/Rows.d.ts.map +1 -1
  51. package/dist/web/components/Rows.js +6 -4
  52. package/dist/web/components/Rows.js.map +1 -1
  53. package/dist/web/components/Rows.js.zyzz.json +1 -1
  54. package/dist/web/components/SecretValue.js.zyzz.json +1 -1
  55. package/dist/web/components/Select.js.zyzz.json +1 -1
  56. package/dist/web/components/Separator.js.zyzz.json +1 -1
  57. package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
  58. package/dist/web/components/Skeleton.js.zyzz.json +1 -1
  59. package/dist/web/components/Slider.js.zyzz.json +1 -1
  60. package/dist/web/components/Snippet.js.zyzz.json +1 -1
  61. package/dist/web/components/Spinner.js.zyzz.json +1 -1
  62. package/dist/web/components/SplitButton.js.zyzz.json +1 -1
  63. package/dist/web/components/Stack.js.zyzz.json +1 -1
  64. package/dist/web/components/Stepper.js.zyzz.json +1 -1
  65. package/dist/web/components/Surface.css +1 -1
  66. package/dist/web/components/Surface.d.ts +19 -1
  67. package/dist/web/components/Surface.d.ts.map +1 -1
  68. package/dist/web/components/Surface.js +2 -2
  69. package/dist/web/components/Surface.js.map +1 -1
  70. package/dist/web/components/Surface.js.zyzz.json +1 -1
  71. package/dist/web/components/Switch.js.zyzz.json +1 -1
  72. package/dist/web/components/Table.js.zyzz.json +1 -1
  73. package/dist/web/components/Tabs.js.zyzz.json +1 -1
  74. package/dist/web/components/Tag.js.zyzz.json +1 -1
  75. package/dist/web/components/Textarea.js.zyzz.json +1 -1
  76. package/dist/web/components/Toast.js.zyzz.json +1 -1
  77. package/dist/web/components/Token.js.zyzz.json +1 -1
  78. package/dist/web/components/Tooltip.js.zyzz.json +1 -1
  79. package/dist/web/components/internal/Field.js.zyzz.json +1 -1
  80. package/dist/web/components/internal/InputGroup.css +1 -1
  81. package/dist/web/components/internal/InputGroup.d.ts +11 -0
  82. package/dist/web/components/internal/InputGroup.d.ts.map +1 -1
  83. package/dist/web/components/internal/InputGroup.js +1 -1
  84. package/dist/web/components/internal/InputGroup.js.map +1 -1
  85. package/dist/web/components/internal/InputGroup.js.zyzz.json +1 -1
  86. package/dist/web/components/internal/Listbox.js.zyzz.json +1 -1
  87. package/dist/web/index.js.zyzz.json +1 -1
  88. package/dist/web/vars.d.ts +1 -1
  89. package/dist/web/vars.js.map +1 -1
  90. package/dist/web/vars.js.zyzz.json +1 -1
  91. package/dist/web/zyzz.config.d.ts +5 -5
  92. package/dist/web/zyzz.config.js.zyzz.json +1 -1
  93. package/package.json +1 -1
  94. package/src/web/components/IconChip.tsx +0 -1
  95. package/src/web/components/Rows.tsx +28 -9
  96. package/src/web/components/Surface.tsx +9 -3
  97. package/src/web/components/internal/InputGroup.ts +10 -0
  98. package/src/web/vars.ts +3 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tempoxyz/ds",
3
3
  "type": "module",
4
- "version": "0.2.4",
4
+ "version": "0.2.5",
5
5
  "license": "MIT",
6
6
  "files": [
7
7
  "DESIGN.md",
@@ -32,7 +32,6 @@ namespace styles {
32
32
  {
33
33
  base: {
34
34
  alignItems: 'center',
35
- // grayAlpha 100 in light mode and 300 in dark, where 100 reads as black.
36
35
  backgroundColor: 'background.chip',
37
36
  borderRadius: '12',
38
37
  boxSizing: 'border-box',
@@ -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 <span {...attributes} {...styles.info({ className, style: props.style, vars })} />
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. `inset` dividers start where the row text does.
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.200',
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: { selectors: { '& [data-panel]': { paddingInline: '20' } } },
435
- small: { typography: 'label.13.strong' },
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. Small rows sit a step taller than 32px controls so list text can breathe.
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: '4' },
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 inline padding, so row fills reach the edges.
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 also take half the block padding, since each row brings
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. The status fills tint callouts with step 300 in light mode and step 100 in
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: '#ffffff21', light: '#0000000d' },
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' },