@tempoxyz/ds 0.2.5 → 0.2.6
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/fonts/Inter-cyrillic-ext.woff2 +0 -0
- package/dist/fonts/Inter-cyrillic.woff2 +0 -0
- package/dist/fonts/Inter-greek-ext.woff2 +0 -0
- package/dist/fonts/Inter-greek.woff2 +0 -0
- package/dist/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/fonts/Inter-latin.woff2 +0 -0
- package/dist/fonts/Inter-symbols.woff2 +0 -0
- package/dist/fonts/Inter-vietnamese.woff2 +0 -0
- package/dist/mobile/Haptics.d.ts +39 -0
- package/dist/mobile/Haptics.d.ts.map +1 -0
- package/dist/mobile/Haptics.js +51 -0
- package/dist/mobile/Haptics.js.map +1 -0
- package/dist/mobile/components/Button.d.ts.map +1 -1
- package/dist/mobile/components/Button.js +3 -3
- package/dist/mobile/components/Button.js.map +1 -1
- package/dist/mobile/components/IconButton.d.ts.map +1 -1
- package/dist/mobile/components/IconButton.js +3 -3
- package/dist/mobile/components/IconButton.js.map +1 -1
- package/dist/mobile/components/Spinner.js +1 -1
- package/dist/mobile/components/Spinner.js.map +1 -1
- package/dist/mobile/components/TextButton.d.ts.map +1 -1
- package/dist/mobile/components/TextButton.js +3 -3
- package/dist/mobile/components/TextButton.js.map +1 -1
- package/dist/mobile/components/TextInput.js +1 -1
- package/dist/mobile/components/TextInput.js.map +1 -1
- package/dist/mobile/components/Toast.js +1 -1
- package/dist/mobile/components/Toast.js.map +1 -1
- package/dist/mobile/components/Toggle.d.ts.map +1 -1
- package/dist/mobile/components/Toggle.js +2 -2
- package/dist/mobile/components/Toggle.js.map +1 -1
- package/dist/mobile/index.d.ts +2 -0
- package/dist/mobile/index.d.ts.map +1 -1
- package/dist/mobile/index.js +2 -0
- package/dist/mobile/index.js.map +1 -1
- package/dist/mobile/useColor.d.ts +23 -0
- package/dist/mobile/useColor.d.ts.map +1 -0
- package/dist/mobile/useColor.js +29 -0
- package/dist/mobile/useColor.js.map +1 -0
- package/dist/web/components/Accordion.css +1 -1
- package/dist/web/components/Accordion.js +8 -8
- package/dist/web/components/Accordion.js.zyzz.json +1 -1
- package/dist/web/components/AlertDialog.css +1 -1
- package/dist/web/components/AlertDialog.js +2 -2
- package/dist/web/components/AlertDialog.js.zyzz.json +1 -1
- package/dist/web/components/Amount.css +1 -1
- package/dist/web/components/Amount.js +3 -3
- package/dist/web/components/Amount.js.zyzz.json +1 -1
- package/dist/web/components/AmountInput.css +1 -1
- package/dist/web/components/AmountInput.js +4 -4
- package/dist/web/components/AmountInput.js.zyzz.json +1 -1
- package/dist/web/components/AppShell.css +1 -1
- package/dist/web/components/AppShell.js +16 -16
- 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.css +1 -1
- package/dist/web/components/Avatar.js +4 -6
- package/dist/web/components/Avatar.js.zyzz.json +1 -1
- package/dist/web/components/Banner.css +1 -1
- package/dist/web/components/Banner.js +5 -5
- package/dist/web/components/Banner.js.zyzz.json +1 -1
- package/dist/web/components/Breadcrumbs.css +1 -1
- package/dist/web/components/Breadcrumbs.js +6 -6
- package/dist/web/components/Breadcrumbs.js.zyzz.json +1 -1
- package/dist/web/components/Button.css +1 -1
- package/dist/web/components/Button.js +4 -4
- package/dist/web/components/Button.js.zyzz.json +1 -1
- package/dist/web/components/Calendar.css +1 -1
- package/dist/web/components/Calendar.js +7 -7
- package/dist/web/components/Calendar.js.zyzz.json +1 -1
- package/dist/web/components/Callout.css +1 -1
- package/dist/web/components/Callout.js +5 -5
- package/dist/web/components/Callout.js.zyzz.json +1 -1
- package/dist/web/components/Checkbox.css +1 -1
- package/dist/web/components/Checkbox.js +5 -5
- package/dist/web/components/Checkbox.js.zyzz.json +1 -1
- package/dist/web/components/CheckboxGroup.css +1 -1
- package/dist/web/components/CheckboxGroup.js +1 -1
- package/dist/web/components/CheckboxGroup.js.zyzz.json +1 -1
- package/dist/web/components/ChoiceGroup.css +1 -1
- package/dist/web/components/ChoiceGroup.js +5 -5
- package/dist/web/components/ChoiceGroup.js.zyzz.json +1 -1
- package/dist/web/components/Choicebox.css +1 -1
- package/dist/web/components/Choicebox.js +11 -11
- package/dist/web/components/Choicebox.js.zyzz.json +1 -1
- package/dist/web/components/Combobox.css +1 -1
- package/dist/web/components/Combobox.js +4 -4
- package/dist/web/components/Combobox.js.zyzz.json +1 -1
- package/dist/web/components/Container.css +1 -1
- package/dist/web/components/Container.js +1 -3
- package/dist/web/components/Container.js.zyzz.json +1 -1
- package/dist/web/components/CopyButton.css +1 -1
- package/dist/web/components/CopyButton.js +3 -3
- package/dist/web/components/CopyButton.js.zyzz.json +1 -1
- package/dist/web/components/DatePicker.css +1 -1
- package/dist/web/components/DatePicker.js +6 -6
- package/dist/web/components/DatePicker.js.zyzz.json +1 -1
- package/dist/web/components/Dialog.css +1 -1
- package/dist/web/components/Dialog.js +6 -6
- package/dist/web/components/Dialog.js.zyzz.json +1 -1
- package/dist/web/components/Drawer.css +1 -1
- package/dist/web/components/Drawer.js +4 -4
- package/dist/web/components/Drawer.js.zyzz.json +1 -1
- package/dist/web/components/Empty.css +1 -1
- package/dist/web/components/Empty.js +5 -5
- package/dist/web/components/Empty.js.zyzz.json +1 -1
- package/dist/web/components/Field.css +1 -1
- package/dist/web/components/Field.js +5 -5
- package/dist/web/components/Field.js.zyzz.json +1 -1
- package/dist/web/components/Fieldset.css +1 -1
- package/dist/web/components/Fieldset.js +2 -2
- package/dist/web/components/Fieldset.js.zyzz.json +1 -1
- package/dist/web/components/Frame.css +1 -1
- package/dist/web/components/Frame.js +8 -10
- package/dist/web/components/Frame.js.zyzz.json +1 -1
- package/dist/web/components/Gauge.css +1 -1
- package/dist/web/components/Gauge.js +6 -6
- package/dist/web/components/Gauge.js.zyzz.json +1 -1
- package/dist/web/components/Grid.css +1 -1
- package/dist/web/components/Grid.js +1 -3
- package/dist/web/components/Grid.js.zyzz.json +1 -1
- package/dist/web/components/Hex.css +1 -1
- package/dist/web/components/Hex.d.ts +43 -1
- package/dist/web/components/Hex.d.ts.map +1 -1
- package/dist/web/components/Hex.js +10 -8
- package/dist/web/components/Hex.js.map +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.js +1 -3
- package/dist/web/components/IconChip.js.zyzz.json +1 -1
- package/dist/web/components/Identicon.css +1 -1
- package/dist/web/components/Identicon.d.ts +8 -0
- package/dist/web/components/Identicon.d.ts.map +1 -1
- package/dist/web/components/Identicon.js +5 -4
- package/dist/web/components/Identicon.js.map +1 -1
- package/dist/web/components/Identicon.js.zyzz.json +1 -1
- package/dist/web/components/Inline.css +1 -1
- package/dist/web/components/Inline.js +1 -3
- package/dist/web/components/Inline.js.zyzz.json +1 -1
- package/dist/web/components/Input.css +1 -1
- package/dist/web/components/Input.js +4 -4
- package/dist/web/components/Input.js.zyzz.json +1 -1
- package/dist/web/components/Inset.css +1 -1
- package/dist/web/components/Inset.js +1 -3
- package/dist/web/components/Inset.js.zyzz.json +1 -1
- package/dist/web/components/Kbd.css +1 -1
- package/dist/web/components/Kbd.js +3 -3
- package/dist/web/components/Kbd.js.zyzz.json +1 -1
- package/dist/web/components/LoadingDots.css +1 -1
- package/dist/web/components/LoadingDots.js +3 -3
- package/dist/web/components/LoadingDots.js.zyzz.json +1 -1
- package/dist/web/components/Menu.css +1 -1
- package/dist/web/components/Menu.js +9 -9
- package/dist/web/components/Menu.js.zyzz.json +1 -1
- package/dist/web/components/NumberField.css +1 -1
- package/dist/web/components/NumberField.js +5 -5
- package/dist/web/components/NumberField.js.zyzz.json +1 -1
- package/dist/web/components/OtpField.css +1 -1
- package/dist/web/components/OtpField.js +3 -3
- package/dist/web/components/OtpField.js.zyzz.json +1 -1
- package/dist/web/components/Pagination.css +1 -1
- package/dist/web/components/Pagination.js +6 -6
- package/dist/web/components/Pagination.js.zyzz.json +1 -1
- package/dist/web/components/Popover.css +1 -1
- package/dist/web/components/Popover.js +5 -5
- package/dist/web/components/Popover.js.zyzz.json +1 -1
- package/dist/web/components/Progress.css +1 -1
- package/dist/web/components/Progress.js +6 -6
- package/dist/web/components/Progress.js.zyzz.json +1 -1
- package/dist/web/components/Qr.css +1 -1
- package/dist/web/components/Qr.js +1 -3
- package/dist/web/components/Qr.js.zyzz.json +1 -1
- package/dist/web/components/RadioGroup.css +1 -1
- package/dist/web/components/RadioGroup.js +4 -4
- 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 +61 -9
- package/dist/web/components/Rows.d.ts.map +1 -1
- package/dist/web/components/Rows.js +33 -22
- package/dist/web/components/Rows.js.map +1 -1
- package/dist/web/components/Rows.js.zyzz.json +1 -1
- package/dist/web/components/SecretValue.css +1 -1
- package/dist/web/components/SecretValue.js +3 -3
- package/dist/web/components/SecretValue.js.zyzz.json +1 -1
- package/dist/web/components/Select.css +1 -1
- package/dist/web/components/Select.js +2 -2
- package/dist/web/components/Select.js.zyzz.json +1 -1
- package/dist/web/components/Separator.css +1 -1
- package/dist/web/components/Separator.js +1 -1
- package/dist/web/components/Separator.js.zyzz.json +1 -1
- package/dist/web/components/SidebarMenu.css +1 -1
- package/dist/web/components/SidebarMenu.js +8 -8
- package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
- package/dist/web/components/Skeleton.css +1 -1
- package/dist/web/components/Skeleton.js +1 -3
- package/dist/web/components/Skeleton.js.zyzz.json +1 -1
- package/dist/web/components/Slider.css +1 -1
- package/dist/web/components/Slider.js +6 -6
- package/dist/web/components/Slider.js.zyzz.json +1 -1
- package/dist/web/components/Snippet.css +1 -1
- package/dist/web/components/Snippet.js +4 -4
- package/dist/web/components/Snippet.js.zyzz.json +1 -1
- package/dist/web/components/Spinner.css +1 -1
- package/dist/web/components/Spinner.js +3 -3
- package/dist/web/components/Spinner.js.zyzz.json +1 -1
- package/dist/web/components/SplitButton.css +1 -1
- package/dist/web/components/SplitButton.js +1 -1
- package/dist/web/components/SplitButton.js.zyzz.json +1 -1
- package/dist/web/components/Stack.css +1 -1
- package/dist/web/components/Stack.js +1 -3
- package/dist/web/components/Stack.js.zyzz.json +1 -1
- package/dist/web/components/Stepper.css +1 -1
- package/dist/web/components/Stepper.js +3 -3
- package/dist/web/components/Stepper.js.zyzz.json +1 -1
- package/dist/web/components/Surface.css +1 -1
- package/dist/web/components/Surface.js +5 -7
- package/dist/web/components/Surface.js.zyzz.json +1 -1
- package/dist/web/components/Switch.css +1 -1
- package/dist/web/components/Switch.js +3 -3
- package/dist/web/components/Switch.js.zyzz.json +1 -1
- package/dist/web/components/Table.css +1 -1
- package/dist/web/components/Table.js +5 -7
- package/dist/web/components/Table.js.zyzz.json +1 -1
- package/dist/web/components/Tabs.css +1 -1
- package/dist/web/components/Tabs.js +4 -6
- package/dist/web/components/Tabs.js.zyzz.json +1 -1
- package/dist/web/components/Tag.css +1 -1
- package/dist/web/components/Tag.js +3 -3
- package/dist/web/components/Tag.js.zyzz.json +1 -1
- package/dist/web/components/Textarea.css +1 -1
- package/dist/web/components/Textarea.js +1 -3
- package/dist/web/components/Textarea.js.zyzz.json +1 -1
- package/dist/web/components/Toast.css +1 -1
- package/dist/web/components/Toast.js +10 -10
- package/dist/web/components/Toast.js.zyzz.json +1 -1
- package/dist/web/components/Token.css +1 -1
- package/dist/web/components/Token.js +1 -3
- package/dist/web/components/Token.js.zyzz.json +1 -1
- package/dist/web/components/Tooltip.css +1 -1
- package/dist/web/components/Tooltip.js +2 -2
- package/dist/web/components/Tooltip.js.zyzz.json +1 -1
- package/dist/web/components/internal/Field.css +1 -1
- package/dist/web/components/internal/Field.js +4 -4
- 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.js +1 -3
- package/dist/web/components/internal/InputGroup.js.zyzz.json +1 -1
- package/dist/web/components/internal/Listbox.css +1 -1
- package/dist/web/components/internal/Listbox.js +13 -13
- 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 +7 -0
- package/dist/web/vars.d.ts.map +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 +35 -0
- package/dist/web/zyzz.config.d.ts.map +1 -1
- package/dist/web/zyzz.config.js +10 -0
- package/dist/web/zyzz.config.js.map +1 -1
- package/dist/web/zyzz.config.js.zyzz.json +1 -1
- package/package.json +33 -1
- package/src/fonts/Inter-cyrillic-ext.woff2 +0 -0
- package/src/fonts/Inter-cyrillic.woff2 +0 -0
- package/src/fonts/Inter-greek-ext.woff2 +0 -0
- package/src/fonts/Inter-greek.woff2 +0 -0
- package/src/fonts/Inter-latin-ext.woff2 +0 -0
- package/src/fonts/Inter-latin.woff2 +0 -0
- package/src/fonts/Inter-symbols.woff2 +0 -0
- package/src/fonts/Inter-vietnamese.woff2 +0 -0
- package/src/fonts/README.md +8 -0
- package/src/mobile/Haptics.ts +55 -0
- package/src/mobile/README.md +97 -1
- package/src/mobile/components/Button.tsx +3 -3
- package/src/mobile/components/IconButton.tsx +3 -3
- package/src/mobile/components/Spinner.tsx +1 -1
- package/src/mobile/components/TextButton.tsx +3 -3
- package/src/mobile/components/TextInput.tsx +1 -1
- package/src/mobile/components/Toast.tsx +1 -1
- package/src/mobile/components/Toggle.tsx +2 -2
- package/src/mobile/index.ts +2 -0
- package/src/mobile/useColor.ts +31 -0
- package/src/web/components/Hex.tsx +45 -2
- package/src/web/components/Identicon.tsx +15 -1
- package/src/web/components/Rows.tsx +74 -15
- package/src/web/vars.ts +9 -0
- package/src/web/zyzz.config.ts +72 -1
- package/dist/mobile/internal/useColor.d.ts +0 -4
- package/dist/mobile/internal/useColor.d.ts.map +0 -1
- package/dist/mobile/internal/useColor.js +0 -12
- package/dist/mobile/internal/useColor.js.map +0 -1
- package/src/mobile/internal/useColor.ts +0 -13
|
@@ -3,7 +3,6 @@ import type { ComponentPropsWithRef, ReactNode } from 'react'
|
|
|
3
3
|
import { use } from 'react'
|
|
4
4
|
import type * as zyzz from 'zyzz'
|
|
5
5
|
import { keyframes } from 'zyzz/web'
|
|
6
|
-
import { ChevronDown } from '../icons/ChevronDown.js'
|
|
7
6
|
import { ChevronRight } from '../icons/ChevronRight.js'
|
|
8
7
|
import { style, variants } from '../zyzz.config.js'
|
|
9
8
|
import * as RowsSize from './internal/RowsSize.js'
|
|
@@ -51,18 +50,31 @@ export namespace Rows {
|
|
|
51
50
|
zyzz.Props.Variants<typeof styles.description>
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* A block wrapper for a run of rows. `RowGroupLoader` renders the same wrapper while loading.
|
|
55
|
+
* Directly after an expanded row, or after a group that follows one, its dividers start at the
|
|
56
|
+
* row text.
|
|
57
|
+
*/
|
|
55
58
|
export function Group(props: Group.Props) {
|
|
56
59
|
const { className, vars, ...attributes } = props
|
|
57
60
|
|
|
58
|
-
return
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
{...attributes}
|
|
64
|
+
data-group=""
|
|
65
|
+
{...styles.group({ className, style: props.style, vars })}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
export namespace Group {
|
|
62
71
|
export type Props = ComponentPropsWithRef<'div'> & zyzz.Props.Variants<typeof styles.group>
|
|
63
72
|
}
|
|
64
73
|
|
|
65
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Groups a `Rows.Title` and `Rows.Description` beside a control, or stacks a `Rows.Label` over a
|
|
76
|
+
* short paragraph that does not fit on one line beside it.
|
|
77
|
+
*/
|
|
66
78
|
export function Info(props: Info.Props) {
|
|
67
79
|
const { className, vars, ...attributes } = props
|
|
68
80
|
|
|
@@ -79,7 +91,11 @@ export namespace Rows {
|
|
|
79
91
|
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.info>
|
|
80
92
|
}
|
|
81
93
|
|
|
82
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* The key of a key-value row. It keeps its width, holds at least half the row, and pushes the
|
|
96
|
+
* content after it to the end. The value then takes at most the other half, so a `Hex` truncates
|
|
97
|
+
* and long text wraps.
|
|
98
|
+
*/
|
|
83
99
|
export function Label(props: Label.Props) {
|
|
84
100
|
const { className, vars, ...attributes } = props
|
|
85
101
|
|
|
@@ -98,7 +114,7 @@ export namespace Rows {
|
|
|
98
114
|
|
|
99
115
|
/**
|
|
100
116
|
* Content revealed by an expandable row. Mount it directly after the row while open. It eases in
|
|
101
|
-
* on mount, and the divider
|
|
117
|
+
* on mount, and the divider above it starts at the row text.
|
|
102
118
|
*/
|
|
103
119
|
export function Panel(props: Panel.Props) {
|
|
104
120
|
const { className, vars, ...attributes } = props
|
|
@@ -149,7 +165,8 @@ export namespace Rows {
|
|
|
149
165
|
/**
|
|
150
166
|
* `size` sets one row height for every row. A 32px control fits `small` and `medium` rows, and a
|
|
151
167
|
* 40px control fits `large` rows, without changing that height. `inset` dividers start where the
|
|
152
|
-
* row text does.
|
|
168
|
+
* row text does. Dividers in a `Rows.Panel` or `Rows.Group` directly after an expanded row start
|
|
169
|
+
* there with `full` dividers too.
|
|
153
170
|
* Inside a `Surface`, rows reach its edges. Variants default to `dividers="inset"`,
|
|
154
171
|
* `size="medium"`.
|
|
155
172
|
*/
|
|
@@ -210,7 +227,7 @@ export namespace Rows {
|
|
|
210
227
|
children: (
|
|
211
228
|
<>
|
|
212
229
|
<span {...styles.content()}>{children}</span>
|
|
213
|
-
{action === 'expand' && <
|
|
230
|
+
{action === 'expand' && <ChevronRight data-indicator="" {...styles.indicator()} />}
|
|
214
231
|
{action === 'navigation' && <ChevronRight {...styles.indicator()} />}
|
|
215
232
|
</>
|
|
216
233
|
),
|
|
@@ -224,8 +241,9 @@ export namespace Rows {
|
|
|
224
241
|
export type Props = Omit<useRender.ComponentProps<'div'>, 'children'> &
|
|
225
242
|
Omit<zyzz.Props.Variants<typeof styles.row>, 'size'> & {
|
|
226
243
|
/**
|
|
227
|
-
* `expand` shows a chevron that turns
|
|
228
|
-
* chevron. Either makes the row a button unless `render`
|
|
244
|
+
* `expand` shows a trailing chevron that turns from right to down while `aria-expanded` is
|
|
245
|
+
* true. `navigation` shows a trailing chevron. Either makes the row a button unless `render`
|
|
246
|
+
* is set.
|
|
229
247
|
* @default 'none'
|
|
230
248
|
*/
|
|
231
249
|
action?: 'expand' | 'navigation' | 'none' | undefined
|
|
@@ -263,6 +281,7 @@ export namespace Rows {
|
|
|
263
281
|
aria-label="Loading"
|
|
264
282
|
role="status"
|
|
265
283
|
{...attributes}
|
|
284
|
+
data-group=""
|
|
266
285
|
{...styles.group({ className, style: props.style, vars })}
|
|
267
286
|
>
|
|
268
287
|
{['30%', '45%'].map((width) => (
|
|
@@ -355,6 +374,29 @@ namespace styles {
|
|
|
355
374
|
color: 'gray.900',
|
|
356
375
|
flexShrink: '0 !custom',
|
|
357
376
|
marginInlineEnd: 'auto !custom',
|
|
377
|
+
// Holding half the row leaves the value at most the other half, however long it is.
|
|
378
|
+
minWidth: '50% !custom',
|
|
379
|
+
selectors: {
|
|
380
|
+
// A `Hex` value yields the width of its leading identicon and gap back from this half.
|
|
381
|
+
'&:has(~ [data-hex] > [data-identicon="16"]:first-child)': {
|
|
382
|
+
minWidth: 'calc(50% - 24px) !custom',
|
|
383
|
+
},
|
|
384
|
+
'&:has(~ [data-hex] > [data-identicon="24"]:first-child)': {
|
|
385
|
+
minWidth: 'calc(50% - 32px) !custom',
|
|
386
|
+
},
|
|
387
|
+
'&:has(~ [data-hex] > [data-identicon="32"]:first-child)': {
|
|
388
|
+
minWidth: 'calc(50% - 40px) !custom',
|
|
389
|
+
},
|
|
390
|
+
'&:has(~ [data-hex] > [data-identicon="40"]:first-child)': {
|
|
391
|
+
minWidth: 'calc(50% - 48px) !custom',
|
|
392
|
+
},
|
|
393
|
+
'&:has(~ [data-hex] > [data-identicon="48"]:first-child)': {
|
|
394
|
+
minWidth: 'calc(50% - 56px) !custom',
|
|
395
|
+
},
|
|
396
|
+
'&:has(~ [data-hex] > [data-identicon="64"]:first-child)': {
|
|
397
|
+
minWidth: 'calc(50% - 72px) !custom',
|
|
398
|
+
},
|
|
399
|
+
},
|
|
358
400
|
},
|
|
359
401
|
},
|
|
360
402
|
{ id: 'tds/web/rows/label' },
|
|
@@ -415,8 +457,8 @@ namespace styles {
|
|
|
415
457
|
{ display: 'none' },
|
|
416
458
|
'& :is(button, a[href], [role="button"])[data-divider]:hover:not(:disabled, [aria-disabled="true"]) + [data-divider]::before':
|
|
417
459
|
{ display: 'none' },
|
|
418
|
-
|
|
419
|
-
|
|
460
|
+
'& :is(button, a[href], [role="button"])[data-divider]:hover:not(:disabled, [aria-disabled="true"]) + [data-group] > [data-divider]:first-child::before':
|
|
461
|
+
{ display: 'none' },
|
|
420
462
|
},
|
|
421
463
|
},
|
|
422
464
|
// Inset dividers start where the row text does: 16, 20 or 24px in.
|
|
@@ -439,17 +481,34 @@ namespace styles {
|
|
|
439
481
|
},
|
|
440
482
|
// Panels share the rows' side padding so their text lines up. Info takes back the block
|
|
441
483
|
// padding that small and medium rows trim for controls, so two-line text keeps its room.
|
|
484
|
+
// Dividers in content revealed by an expanded row start at the row text, even with `full`
|
|
485
|
+
// dividers, so the content reads as nested under the row.
|
|
442
486
|
size: {
|
|
443
|
-
large: {
|
|
487
|
+
large: {
|
|
488
|
+
selectors: {
|
|
489
|
+
'& :is([aria-expanded="true"] + [data-group], [aria-expanded="true"] + [data-group] + [data-group]) > [data-divider]::before':
|
|
490
|
+
{ insetInlineStart: '24' },
|
|
491
|
+
'& [aria-expanded="true"] + [data-panel]::before': { insetInlineStart: '24' },
|
|
492
|
+
'& [data-panel]': { paddingInline: '24' },
|
|
493
|
+
},
|
|
494
|
+
},
|
|
444
495
|
medium: {
|
|
445
496
|
selectors: {
|
|
497
|
+
'& :is([aria-expanded="true"] + [data-group], [aria-expanded="true"] + [data-group] + [data-group]) > [data-divider]::before':
|
|
498
|
+
{ insetInlineStart: '20' },
|
|
499
|
+
'& [aria-expanded="true"] + [data-panel]::before': { insetInlineStart: '20' },
|
|
446
500
|
'& [data-info]': { paddingBlock: '4' },
|
|
447
501
|
'& [data-panel]': { paddingInline: '20' },
|
|
448
502
|
},
|
|
449
503
|
},
|
|
450
504
|
small: {
|
|
451
505
|
typography: 'label.13.strong',
|
|
452
|
-
selectors: {
|
|
506
|
+
selectors: {
|
|
507
|
+
'& :is([aria-expanded="true"] + [data-group], [aria-expanded="true"] + [data-group] + [data-group]) > [data-divider]::before':
|
|
508
|
+
{ insetInlineStart: '16' },
|
|
509
|
+
'& [aria-expanded="true"] + [data-panel]::before': { insetInlineStart: '16' },
|
|
510
|
+
'& [data-info]': { paddingBlock: '2' },
|
|
511
|
+
},
|
|
453
512
|
},
|
|
454
513
|
},
|
|
455
514
|
},
|
|
@@ -492,7 +551,7 @@ namespace styles {
|
|
|
492
551
|
outlineOffset: '-2',
|
|
493
552
|
},
|
|
494
553
|
'&:disabled, &[aria-disabled="true"]': { cursor: 'default', opacity: 'disabled' },
|
|
495
|
-
'&[aria-expanded="true"] [data-indicator]': { transform: 'rotate(
|
|
554
|
+
'&[aria-expanded="true"] [data-indicator]': { transform: 'rotate(90deg) !custom' },
|
|
496
555
|
},
|
|
497
556
|
'@media (prefers-reduced-motion: reduce)': {
|
|
498
557
|
transitionProperty: 'background-color, opacity, outline-color',
|
package/src/web/vars.ts
CHANGED
|
@@ -405,6 +405,15 @@ export const variables = Vars.define(
|
|
|
405
405
|
fontWeight: 400,
|
|
406
406
|
letterSpacing: '0px',
|
|
407
407
|
lineHeight: '18px',
|
|
408
|
+
// Matches the 500 weight of `label.*.strong` row text, for a Hex value in a row.
|
|
409
|
+
strong: {
|
|
410
|
+
fontFamily:
|
|
411
|
+
'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
412
|
+
fontSize: '13px',
|
|
413
|
+
fontWeight: 500,
|
|
414
|
+
letterSpacing: '0px',
|
|
415
|
+
lineHeight: '18px',
|
|
416
|
+
},
|
|
408
417
|
},
|
|
409
418
|
},
|
|
410
419
|
'14': {
|
package/src/web/zyzz.config.ts
CHANGED
|
@@ -32,12 +32,83 @@ export const { style, variants, vars } = Config.create({
|
|
|
32
32
|
vars: variables,
|
|
33
33
|
})
|
|
34
34
|
|
|
35
|
+
// Inter's subsets, written by `scripts/subset-fonts.ts`. A browser downloads only the subsets whose
|
|
36
|
+
// `unicodeRange` the page's text uses, and a face declared later takes precedence where ranges
|
|
37
|
+
// overlap, so the order is intentional: `symbols` first and `latin` last, as Google Fonts orders them.
|
|
35
38
|
fontFace({
|
|
36
39
|
fontDisplay: 'swap',
|
|
37
40
|
fontFamily: 'Inter',
|
|
38
41
|
fontStyle: 'normal',
|
|
39
42
|
fontWeight: '100 900',
|
|
40
|
-
src: "url('../fonts/Inter-
|
|
43
|
+
src: "url('../fonts/Inter-symbols.woff2') format('woff2')",
|
|
44
|
+
unicodeRange:
|
|
45
|
+
'U+02CD-036F,U+0E3F,U+1DC0-1DFF,U+2070-2298,U+2303-232B,U+2380-238B,U+23CE-23CF,U+2423-2468,U+24B6-24EA,U+25A0-26A0,U+2713-2788,U+27EF-27FA,U+2913,U+2A38,U+2B06-2B24,U+2E18,U+A92E,U+E000-E163,U+E1C3-E2DC,U+EE01-EEE1,U+F6C3,U+1F12F-1F16B,U+1F850-1F852',
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
fontFace({
|
|
49
|
+
fontDisplay: 'swap',
|
|
50
|
+
fontFamily: 'Inter',
|
|
51
|
+
fontStyle: 'normal',
|
|
52
|
+
fontWeight: '100 900',
|
|
53
|
+
src: "url('../fonts/Inter-cyrillic-ext.woff2') format('woff2')",
|
|
54
|
+
unicodeRange: 'U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F',
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
fontFace({
|
|
58
|
+
fontDisplay: 'swap',
|
|
59
|
+
fontFamily: 'Inter',
|
|
60
|
+
fontStyle: 'normal',
|
|
61
|
+
fontWeight: '100 900',
|
|
62
|
+
src: "url('../fonts/Inter-cyrillic.woff2') format('woff2')",
|
|
63
|
+
unicodeRange: 'U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116',
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
fontFace({
|
|
67
|
+
fontDisplay: 'swap',
|
|
68
|
+
fontFamily: 'Inter',
|
|
69
|
+
fontStyle: 'normal',
|
|
70
|
+
fontWeight: '100 900',
|
|
71
|
+
src: "url('../fonts/Inter-greek-ext.woff2') format('woff2')",
|
|
72
|
+
unicodeRange: 'U+1F00-1FFF',
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
fontFace({
|
|
76
|
+
fontDisplay: 'swap',
|
|
77
|
+
fontFamily: 'Inter',
|
|
78
|
+
fontStyle: 'normal',
|
|
79
|
+
fontWeight: '100 900',
|
|
80
|
+
src: "url('../fonts/Inter-greek.woff2') format('woff2')",
|
|
81
|
+
unicodeRange: 'U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF',
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
fontFace({
|
|
85
|
+
fontDisplay: 'swap',
|
|
86
|
+
fontFamily: 'Inter',
|
|
87
|
+
fontStyle: 'normal',
|
|
88
|
+
fontWeight: '100 900',
|
|
89
|
+
src: "url('../fonts/Inter-vietnamese.woff2') format('woff2')",
|
|
90
|
+
unicodeRange:
|
|
91
|
+
'U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB',
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
fontFace({
|
|
95
|
+
fontDisplay: 'swap',
|
|
96
|
+
fontFamily: 'Inter',
|
|
97
|
+
fontStyle: 'normal',
|
|
98
|
+
fontWeight: '100 900',
|
|
99
|
+
src: "url('../fonts/Inter-latin-ext.woff2') format('woff2')",
|
|
100
|
+
unicodeRange:
|
|
101
|
+
'U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF',
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
fontFace({
|
|
105
|
+
fontDisplay: 'swap',
|
|
106
|
+
fontFamily: 'Inter',
|
|
107
|
+
fontStyle: 'normal',
|
|
108
|
+
fontWeight: '100 900',
|
|
109
|
+
src: "url('../fonts/Inter-latin.woff2') format('woff2')",
|
|
110
|
+
unicodeRange:
|
|
111
|
+
'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
|
|
41
112
|
})
|
|
42
113
|
|
|
43
114
|
fontFace({
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ColorValue } from 'react-native';
|
|
2
|
-
/** Resolves a compiled style's color for props that take a color instead of a style, such as SVG fills. */
|
|
3
|
-
export declare function useColor(style: Readonly<Record<string, string | number | undefined>> | undefined): ColorValue;
|
|
4
|
-
//# sourceMappingURL=useColor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useColor.d.ts","sourceRoot":"","sources":["../../../src/mobile/internal/useColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,2GAA2G;AAC3G,wBAAgB,QAAQ,CACtB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,GACvE,UAAU,CAMZ"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useStyles } from 'zyzz/react-native';
|
|
2
|
-
/** Resolves a compiled style's color for props that take a color instead of a style, such as SVG fills. */
|
|
3
|
-
export function useColor(style) {
|
|
4
|
-
const color = useStyles().style(style).color;
|
|
5
|
-
if (typeof color === 'string')
|
|
6
|
-
return color;
|
|
7
|
-
// iOS resolves `system` schemes to dynamic colors, which Zyzz's resolved style type omits.
|
|
8
|
-
if (color && typeof color === 'object')
|
|
9
|
-
return color;
|
|
10
|
-
throw new Error('Expected a compiled style with a color');
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=useColor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useColor.js","sourceRoot":"","sources":["../../../src/mobile/internal/useColor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C,2GAA2G;AAC3G,MAAM,UAAU,QAAQ,CACtB,KAAwE;IAExE,MAAM,KAAK,GAAY,SAAS,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAA;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,2FAA2F;IAC3F,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAmB,CAAA;IAClE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;AAC3D,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ColorValue } from 'react-native'
|
|
2
|
-
import { useStyles } from 'zyzz/react-native'
|
|
3
|
-
|
|
4
|
-
/** Resolves a compiled style's color for props that take a color instead of a style, such as SVG fills. */
|
|
5
|
-
export function useColor(
|
|
6
|
-
style: Readonly<Record<string, string | number | undefined>> | undefined,
|
|
7
|
-
): ColorValue {
|
|
8
|
-
const color: unknown = useStyles().style(style).color
|
|
9
|
-
if (typeof color === 'string') return color
|
|
10
|
-
// iOS resolves `system` schemes to dynamic colors, which Zyzz's resolved style type omits.
|
|
11
|
-
if (color && typeof color === 'object') return color as ColorValue
|
|
12
|
-
throw new Error('Expected a compiled style with a color')
|
|
13
|
-
}
|