@karmo-co/drift-kit-reference 0.0.0-stage → 23.4.0
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/LICENSE +7 -0
- package/README.md +24 -2
- package/bin/drift-kit-ref.js +169 -0
- package/manifest/components/accordion.md +47 -0
- package/manifest/components/action-bar.md +51 -0
- package/manifest/components/alert.md +53 -0
- package/manifest/components/app-shell.md +43 -0
- package/manifest/components/avatar.md +42 -0
- package/manifest/components/body.md +48 -0
- package/manifest/components/box.md +58 -0
- package/manifest/components/breadcrumb.md +59 -0
- package/manifest/components/button.md +46 -0
- package/manifest/components/calendar.md +69 -0
- package/manifest/components/card.md +71 -0
- package/manifest/components/checkbox.md +43 -0
- package/manifest/components/choice-card.md +61 -0
- package/manifest/components/code-input.md +56 -0
- package/manifest/components/date-picker.md +66 -0
- package/manifest/components/day-of-month.md +54 -0
- package/manifest/components/detail-list.md +37 -0
- package/manifest/components/divider.md +33 -0
- package/manifest/components/dropdown.md +52 -0
- package/manifest/components/dropzone.md +56 -0
- package/manifest/components/eyebrow.md +45 -0
- package/manifest/components/feedback-badge.md +35 -0
- package/manifest/components/glider.md +34 -0
- package/manifest/components/heading.md +47 -0
- package/manifest/components/hero.md +46 -0
- package/manifest/components/icon-button.md +41 -0
- package/manifest/components/icon-tile.md +44 -0
- package/manifest/components/icon.md +30 -0
- package/manifest/components/input.md +63 -0
- package/manifest/components/link.md +42 -0
- package/manifest/components/loading-spinner.md +42 -0
- package/manifest/components/logo.md +38 -0
- package/manifest/components/modal.md +53 -0
- package/manifest/components/pagination.md +54 -0
- package/manifest/components/payment-form.md +29 -0
- package/manifest/components/price-summary.md +30 -0
- package/manifest/components/radio.md +42 -0
- package/manifest/components/section-heading.md +41 -0
- package/manifest/components/select.md +99 -0
- package/manifest/components/shield.md +34 -0
- package/manifest/components/sidebar.md +73 -0
- package/manifest/components/stepper.md +53 -0
- package/manifest/components/switch.md +45 -0
- package/manifest/components/table.md +77 -0
- package/manifest/components/tabs.md +43 -0
- package/manifest/components/tag.md +43 -0
- package/manifest/components/textarea.md +52 -0
- package/manifest/components/toast.md +52 -0
- package/manifest/components/tooltip.md +42 -0
- package/manifest/components/top-bar.md +60 -0
- package/manifest/components/vehicle.md +43 -0
- package/manifest/index.json +402 -0
- package/manifest/migrations/1.0.0.md +50 -0
- package/manifest/migrations/10.0.0.md +154 -0
- package/manifest/migrations/11.0.0.md +24 -0
- package/manifest/migrations/12.0.0.md +38 -0
- package/manifest/migrations/13.0.0.md +50 -0
- package/manifest/migrations/14.0.0.md +148 -0
- package/manifest/migrations/15.0.0.md +140 -0
- package/manifest/migrations/16.0.0.md +196 -0
- package/manifest/migrations/17.0.0.md +19 -0
- package/manifest/migrations/18.0.0.md +23 -0
- package/manifest/migrations/19.0.0.md +15 -0
- package/manifest/migrations/2.0.0.md +18 -0
- package/manifest/migrations/20.0.0.md +43 -0
- package/manifest/migrations/21.0.0.md +97 -0
- package/manifest/migrations/22.0.0.md +17 -0
- package/manifest/migrations/23.0.0.md +86 -0
- package/manifest/migrations/3.0.0.md +34 -0
- package/manifest/migrations/4.0.0.md +147 -0
- package/manifest/migrations/5.0.0.md +73 -0
- package/manifest/migrations/6.0.0.md +67 -0
- package/manifest/migrations/7.0.0.md +71 -0
- package/manifest/migrations/8.0.0.md +16 -0
- package/manifest/migrations/9.0.0.md +107 -0
- package/manifest/rules.md +37 -0
- package/manifest/setup.md +28 -0
- package/manifest/tokens/border-width.md +12 -0
- package/manifest/tokens/border.md +147 -0
- package/manifest/tokens/font.md +90 -0
- package/manifest/tokens/icon.md +84 -0
- package/manifest/tokens/interactive.md +37 -0
- package/manifest/tokens/motion.md +69 -0
- package/manifest/tokens/radius.md +20 -0
- package/manifest/tokens/shadow.md +28 -0
- package/manifest/tokens/spacing.md +35 -0
- package/manifest/tokens/surface.md +138 -0
- package/manifest/tokens/text.md +92 -0
- package/package.json +20 -4
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Switch (`switch`)
|
|
2
|
+
|
|
3
|
+
An on/off setting that takes effect immediately. Checkbox's label, description, sizes and states on a track and a thumb, with a settings-row treatment of its own.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
label.dk-component-switch[data-variant][data-size][data-align]
|
|
10
|
+
input.dk-component-switch__input (role="switch")
|
|
11
|
+
span.dk-component-switch__track (the thumb is its ::after)
|
|
12
|
+
span.dk-component-switch__icon (optional, a settings row)
|
|
13
|
+
span.dk-component-switch__text
|
|
14
|
+
span.dk-component-switch__label
|
|
15
|
+
span.dk-component-switch__desc
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Attributes
|
|
19
|
+
|
|
20
|
+
| Attribute | Values the stylesheet styles |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `data-align` | `end` |
|
|
23
|
+
| `data-pseudo-class` | `active`, `focus`, `hover` |
|
|
24
|
+
| `data-size` | `large`, `small` |
|
|
25
|
+
| `data-variant` | `inset`, `plain`, `raised` |
|
|
26
|
+
|
|
27
|
+
## React
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { Switch } from '@karmo-co/drift-kit/react';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
| Prop | Type | Notes |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `label` | `ReactNode` | The visible label. Optional for the reason Checkbox's is: a switch in a toolbar or a table row takes its name from what it sits in. Without one, pass aria-label or aria-labelledby; a switch with neither announces as "switch, on" and nothing else, which is the one shape to keep hard. |
|
|
36
|
+
| `size` | `'small' \| 'medium' \| 'large'` | |
|
|
37
|
+
| `variant` | `'ghost' \| 'raised' \| 'plain' \| 'inset'` | A container around the row; the switch itself never changes. ghost (the default) has none; raised stands the row on the raised surface with a lift, plain draws an edge around it, inset sinks it into the control fill. |
|
|
38
|
+
| `description` | `ReactNode` | A second line under the label. The control's DESCRIPTION, never part of its name: rendered outside the naming path and wired with aria-describedby, so a reader hears "Weekly summary, switch, on" and then the explanation. |
|
|
39
|
+
| `align` | `'start' \| 'end'` | The control at the far end of the row rather than before the label: the settings-row arrangement, and the half of dk-component-switch-field worth keeping. Presentation only, so the DOM order, the reading order and the tab order are unchanged. The recessed BOX that class also drew is deliberately not here: a padded, bordered container is something a page puts around this component rather than something the component owns. |
|
|
40
|
+
| `icon` | `ReactNode` | A leading glyph, for a settings row that wants one. Decoration: it sits outside the label text and is hidden from assistive technology. |
|
|
41
|
+
| `className` | `string` | |
|
|
42
|
+
|
|
43
|
+
## Component tokens
|
|
44
|
+
|
|
45
|
+
`--dk-component-switch-track-height`, `--dk-component-switch-small-track-height`, `--dk-component-switch-large-track-height`, `--dk-component-switch-track-ratio`, `--dk-component-switch-border-width`, `--dk-component-switch-thumb-inset`, `--dk-component-switch-thumb-radius`, `--dk-component-switch-thumb-shadow`, `--dk-component-switch-thumb-scale-active`, `--dk-component-switch-focus-ring-width`, `--dk-component-switch-gap`, `--dk-component-switch-text-gap`, `--dk-component-switch-group-gap`, `--dk-component-switch-group-legend-gap`, `--dk-component-switch-icon-color`, `--dk-component-switch-icon-size`, `--dk-component-switch-small-icon-size`, `--dk-component-switch-large-icon-size`, `--dk-component-switch-label-font-family`, `--dk-component-switch-label-font-size`, `--dk-component-switch-label-line-height`, `--dk-component-switch-small-label-font-size`, `--dk-component-switch-small-label-line-height`, `--dk-component-switch-large-label-font-size`, `--dk-component-switch-large-label-line-height`, `--dk-component-switch-label-font-weight`, `--dk-component-switch-desc-font-weight`, `--dk-component-switch-surface-default`, `--dk-component-switch-surface-hover`, `--dk-component-switch-surface-active`, `--dk-component-switch-border-default`, `--dk-component-switch-border-hover`, `--dk-component-switch-border-active`, `--dk-component-switch-thumb`, `--dk-component-switch-thumb-hover`, `--dk-component-switch-checked-surface-default`, `--dk-component-switch-checked-surface-hover`, `--dk-component-switch-checked-surface-active`, `--dk-component-switch-checked-border-default`, `--dk-component-switch-checked-border-hover`, `--dk-component-switch-checked-border-active`, `--dk-component-switch-checked-thumb`, `--dk-component-switch-checked-thumb-hover`, `--dk-component-switch-small-container-padding`, `--dk-component-switch-container-padding`, `--dk-component-switch-large-container-padding`, `--dk-component-switch-small-container-radius`, `--dk-component-switch-container-radius`, `--dk-component-switch-large-container-radius`, `--dk-component-switch-container-border-width`, `--dk-component-switch-raised-container-surface`, `--dk-component-switch-raised-container-surface-hover`, `--dk-component-switch-raised-container-border`, `--dk-component-switch-raised-container-border-hover`, `--dk-component-switch-raised-container-shadow`, `--dk-component-switch-plain-container-surface`, `--dk-component-switch-plain-container-surface-hover`, `--dk-component-switch-plain-container-border`, `--dk-component-switch-plain-container-border-hover`, `--dk-component-switch-inset-container-surface`, `--dk-component-switch-inset-container-surface-hover`, `--dk-component-switch-inset-container-shadow`, `--dk-component-switch-halo`, `--dk-component-switch-halo-width`, `--dk-component-switch-ring`, `--dk-component-switch-focus-border`, `--dk-component-switch-disabled-surface`, `--dk-component-switch-disabled-border`, `--dk-component-switch-disabled-thumb`, `--dk-component-switch-disabled-checked-surface`, `--dk-component-switch-disabled-checked-border`, `--dk-component-switch-disabled-checked-thumb`, `--dk-component-switch-label-color`, `--dk-component-switch-desc-color`, `--dk-component-switch-disabled-label-color`, `--dk-component-switch-disabled-desc-color`, `--dk-component-switch-disabled-icon-color`, `--dk-component-switch-duration`, `--dk-component-switch-easing`
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Table (`table`)
|
|
2
|
+
|
|
3
|
+
Rows and columns, as a real <table>. Sorting, selection, sticky edges and the two rows that stand in for rows.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
div.dk-component-table__scroll[role=region][tabindex=0][aria-label]
|
|
10
|
+
table.dk-component-table[data-size][data-zebra][data-sticky-head]
|
|
11
|
+
[data-sticky-col][data-interactive]
|
|
12
|
+
caption.dk-component-table__caption
|
|
13
|
+
thead > tr > th[scope=col][data-numeric|data-align][aria-sort]
|
|
14
|
+
> button.dk-component-table__sort > svg.…__sort-icon
|
|
15
|
+
tbody > tr[data-selected] > td[data-numeric|data-align]
|
|
16
|
+
tr > td.dk-component-table__empty[colspan]
|
|
17
|
+
tr > td.dk-component-table__loading[colspan]
|
|
18
|
+
tfoot > tr > td
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Attributes
|
|
22
|
+
|
|
23
|
+
| Attribute | Values the stylesheet styles |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `data-align` | `center`, `right` |
|
|
26
|
+
| `data-dk-table-dragging` | (present or absent) |
|
|
27
|
+
| `data-fits` | (present or absent) |
|
|
28
|
+
| `data-interactive` | (present or absent) |
|
|
29
|
+
| `data-nowrap` | (present or absent) |
|
|
30
|
+
| `data-numeric` | (present or absent) |
|
|
31
|
+
| `data-placeholder` | (present or absent) |
|
|
32
|
+
| `data-pressed` | (present or absent) |
|
|
33
|
+
| `data-reorder` | (present or absent) |
|
|
34
|
+
| `data-reordering` | (present or absent) |
|
|
35
|
+
| `data-selected` | (present or absent) |
|
|
36
|
+
| `data-size` | `large`, `small` |
|
|
37
|
+
| `data-sort-ready` | (present or absent) |
|
|
38
|
+
| `data-sticky-col` | (present or absent) |
|
|
39
|
+
| `data-sticky-head` | (present or absent) |
|
|
40
|
+
| `data-tone-fill` | `solid` |
|
|
41
|
+
| `data-zebra` | (present or absent) |
|
|
42
|
+
|
|
43
|
+
## React
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { Table } from '@karmo-co/drift-kit/react';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
| Prop | Type | Notes |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `columns` (required) | `TableColumn[]` | |
|
|
52
|
+
| `rows` (required) | `TableRow[]` | |
|
|
53
|
+
| `label` (required) | `string` | The scroll region's accessible name. REQUIRED, and not for form's sake: the box scrolls, so it is focusable, so a screen reader stops on it and has to be able to say what it is. |
|
|
54
|
+
| `caption` | `ReactNode` | A visible description above the table, rendered as its <caption>, which is also how a table announces its own name. |
|
|
55
|
+
| `size` | `'small' \| 'medium' \| 'large'` | |
|
|
56
|
+
| `zebra` | `boolean` | |
|
|
57
|
+
| `interactive` | `boolean` | The rows respond to the pointer. What makes a row clickable is a real link or button inside it, stretched over the row the way Card does it: this is the feedback, not the behaviour. |
|
|
58
|
+
| `stickyHead` | `boolean` | |
|
|
59
|
+
| `stickyCol` | `boolean` | |
|
|
60
|
+
| `sortRows` | `boolean` | Sort the rows that are in the DOM, as well as firing onSort. For a list that is all here already; leave it off when the sort is server-side. |
|
|
61
|
+
| `selectable` | `boolean` | |
|
|
62
|
+
| `selectAllLabel` | `string` | |
|
|
63
|
+
| `onSort` | `(detail: { key: string \| null; column: number; direction: TableSortDirection }) => void` | Fires on every header press: ascending, descending, then none, which is the order the rows arrived in. |
|
|
64
|
+
| `reorderable` | `boolean` | Drag a header, or Alt + Left / Right on it, to move its column. React owns the columns, so the behaviour only says what the order should be and this re-renders in it. |
|
|
65
|
+
| `columnOrder` | `string[]` | Controlled order, by column key. Without it the table keeps its own. |
|
|
66
|
+
| `defaultColumnOrder` | `string[]` | |
|
|
67
|
+
| `onColumnOrderChange` | `(order: string[]) => void` | |
|
|
68
|
+
| `persistColumnOrder` | `{ key: string; storage?: TableOrderStorage }` | Remember the order in the browser, per key: 'session' for this tab, 'local' across visits. A product saving it to the user's profile would use onColumnOrderChange instead. |
|
|
69
|
+
| `onSelectionChange` | `(detail: { values: string[]; count: number; all: boolean }) => void` | NOT `onSelect`: that name belongs to the DOM's own select event, which <table> inherits, and taking it would shadow a handler a caller might legitimately pass. |
|
|
70
|
+
| `empty` | `ReactNode` | What the table says when it has no rows. A table with an empty body is a header and a silence. |
|
|
71
|
+
| `loading` | `boolean` | |
|
|
72
|
+
| `loadingLabel` | `string` | The words under the spinner, and what a screen reader hears. |
|
|
73
|
+
| `className` | `string` | |
|
|
74
|
+
|
|
75
|
+
## Component tokens
|
|
76
|
+
|
|
77
|
+
`--dk-component-table-small-padding-y`, `--dk-component-table-padding-y`, `--dk-component-table-large-padding-y`, `--dk-component-table-padding-inline`, `--dk-component-table-head-surface`, `--dk-component-table-head-radius`, `--dk-component-table-head-font-size`, `--dk-component-table-head-line-height`, `--dk-component-table-head-font-weight`, `--dk-component-table-head-color`, `--dk-component-table-font-family`, `--dk-component-table-font-size`, `--dk-component-table-line-height`, `--dk-component-table-large-font-size`, `--dk-component-table-large-line-height`, `--dk-component-table-font-weight`, `--dk-component-table-color`, `--dk-component-table-rule`, `--dk-component-table-rule-width`, `--dk-component-table-row-hover`, `--dk-component-table-row-active`, `--dk-component-table-row-selected`, `--dk-component-table-row-selected-hover`, `--dk-component-table-row-duration`, `--dk-component-table-row-easing`, `--dk-component-table-zebra-mix`, `--dk-component-table-zebra`, `--dk-component-table-sort-icon-size`, `--dk-component-table-sort-gap`, `--dk-component-table-sort-hover`, `--dk-component-table-sort-active`, `--dk-component-table-sort-radius`, `--dk-component-table-sort-color`, `--dk-component-table-sort-color-hover`, `--dk-component-table-sort-color-active`, `--dk-component-table-sort-icon-mix-rest`, `--dk-component-table-sort-icon-mix-hover`, `--dk-component-table-sort-icon-mix-active`, `--dk-component-table-sort-icon-color`, `--dk-component-table-sort-icon-color-hover`, `--dk-component-table-sort-icon-color-active`, `--dk-component-table-sort-icon-sorted-mix-rest`, `--dk-component-table-sort-icon-sorted-mix-hover`, `--dk-component-table-sort-icon-color-sorted`, `--dk-component-table-sort-icon-color-sorted-hover`, `--dk-component-table-sort-icon-color-sorted-active`, `--dk-component-table-empty-color`, `--dk-component-table-empty-padding-y`, `--dk-component-table-loading-padding-bottom`, `--dk-component-table-sticky-offset`, `--dk-component-table-placeholder-surface`, `--dk-component-table-placeholder-border`, `--dk-component-table-placeholder-border-width`, `--dk-component-table-ghost-surface`, `--dk-component-table-ghost-shadow`, `--dk-component-table-ghost-radius`, `--dk-component-table-reorder-duration`, `--dk-component-table-reorder-easing`, `--dk-component-table-drop-duration`, `--dk-component-table-actions-padding-block`, `--dk-component-table-actions-padding-inline`, `--dk-component-table-chip-padding-block`, `--dk-component-table-caption-font-size`, `--dk-component-table-caption-line-height`, `--dk-component-table-caption-color`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Tabs (`tabs`)
|
|
2
|
+
|
|
3
|
+
A strip of tabs that switch between panels of one page, on a hairline with a bar that slides to the selected tab.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
div.dk-component-tabs[role="tablist"][data-size]?
|
|
10
|
+
button.__tab[role="tab"][data-value][aria-selected]
|
|
11
|
+
span.__icon?
|
|
12
|
+
span.__label
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Attributes
|
|
16
|
+
|
|
17
|
+
| Attribute | Values the stylesheet styles |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `data-direction` | `back`, `forward` |
|
|
20
|
+
| `data-full-width` | (present or absent) |
|
|
21
|
+
| `data-size` | `large`, `small` |
|
|
22
|
+
|
|
23
|
+
## React
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Tabs } from '@karmo-co/drift-kit/react';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Notes |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `items` (required) | `TabsItem[]` | |
|
|
32
|
+
| `'aria-label'` (required) | `string` | |
|
|
33
|
+
| `value` | `string` | Controlled: the strip shows this one, and a click asks through onChange. It must be one of the items' values; one that matches none leaves the runtime showing the first enabled tab. |
|
|
34
|
+
| `defaultValue` | `string` | Uncontrolled: where it starts; the first enabled tab when absent. |
|
|
35
|
+
| `onChange` | `(value: string) => void` | |
|
|
36
|
+
| `size` | `'small' \| 'medium' \| 'large'` | |
|
|
37
|
+
| `fullWidth` | `boolean` | The tabs share the strip's width equally. |
|
|
38
|
+
| `activation` | `'automatic' \| 'manual'` | automatic (the default) selects as the arrows move; manual waits for Enter, Space or a click. |
|
|
39
|
+
| `className` | `string` | |
|
|
40
|
+
|
|
41
|
+
## Component tokens
|
|
42
|
+
|
|
43
|
+
`--dk-component-tabs-height`, `--dk-component-tabs-small-height`, `--dk-component-tabs-large-height`, `--dk-component-tabs-padding-inline`, `--dk-component-tabs-small-padding-inline`, `--dk-component-tabs-large-padding-inline`, `--dk-component-tabs-gap`, `--dk-component-tabs-font-family`, `--dk-component-tabs-font-size`, `--dk-component-tabs-line-height`, `--dk-component-tabs-small-font-size`, `--dk-component-tabs-small-line-height`, `--dk-component-tabs-large-font-size`, `--dk-component-tabs-large-line-height`, `--dk-component-tabs-font-weight`, `--dk-component-tabs-selected-font-weight`, `--dk-component-tabs-icon-size`, `--dk-component-tabs-small-icon-size`, `--dk-component-tabs-large-icon-size`, `--dk-component-tabs-icon-gap`, `--dk-component-tabs-color`, `--dk-component-tabs-color-hover`, `--dk-component-tabs-color-active`, `--dk-component-tabs-selected-color`, `--dk-component-tabs-color-disabled`, `--dk-component-tabs-hairline`, `--dk-component-tabs-hairline-width`, `--dk-component-tabs-underline-thickness`, `--dk-component-tabs-underline-surface`, `--dk-component-tabs-radius`, `--dk-component-tabs-count-size`, `--dk-component-tabs-count-radius`, `--dk-component-tabs-count-font-size`, `--dk-component-tabs-count-font-weight`, `--dk-component-tabs-count-surface`, `--dk-component-tabs-count-color`, `--dk-component-tabs-count-selected-surface`, `--dk-component-tabs-count-selected-color`, `--dk-component-tabs-focus-ring`, `--dk-component-tabs-focus-ring-width`, `--dk-component-tabs-transition-duration`, `--dk-component-tabs-slide-duration`, `--dk-component-tabs-easing`, `--dk-component-tabs-slide-lag`, `--dk-component-tabs-slide-easing`, `--dk-component-tabs-hover-line`, `--dk-component-tabs-hover-line-from`, `--dk-component-tabs-press-scale`, `--dk-component-tabs-press-duration`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Tag (`tag`)
|
|
2
|
+
|
|
3
|
+
A label, a category, a status. Six statuses, three variants, and a dot for the column where the word is already there.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
span.dk-component-tag[data-status|data-hue][data-variant][data-size]
|
|
10
|
+
span.dk-component-tag__dot (optional, aria-hidden)
|
|
11
|
+
span.dk-component-tag__icon (optional, aria-hidden, holds an svg)
|
|
12
|
+
the text
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Attributes
|
|
16
|
+
|
|
17
|
+
| Attribute | Values the stylesheet styles |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `data-hue` | `next1`, `next2`, `next3`, `next4`, `prev1`, `prev2`, `prev3`, `prev4`, `primary` |
|
|
20
|
+
| `data-size` | `large`, `small` |
|
|
21
|
+
| `data-status` | `error`, `information`, `primary`, `success`, `warning` |
|
|
22
|
+
| `data-tone-fill` | `solid` |
|
|
23
|
+
| `data-variant` | `outline`, `solid` |
|
|
24
|
+
|
|
25
|
+
## React
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Tag } from '@karmo-co/drift-kit/react';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
| Prop | Type | Notes |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `status` | `'neutral' \| 'primary' \| 'success' \| 'error' \| 'warning' \| 'information'` | Neutral when absent, where the component library's Tag defaults to primary. A tag with no status is a label rather than a signal, and a page whose every unmarked label arrives in the brand colour has spent it. |
|
|
34
|
+
| `hue` | `'prev4' \| 'prev3' \| 'prev2' \| 'prev1' \| 'primary' \| 'next1' \| 'next2' \| 'next3' \| 'next4'` | A category colour instead of a status, for departments, series and filters. |
|
|
35
|
+
| `variant` | `'subtle' \| 'solid' \| 'outline'` | |
|
|
36
|
+
| `size` | `'small' \| 'medium' \| 'large'` | |
|
|
37
|
+
| `dot` | `boolean` | A coloured circle before the label, for the status that has a word beside it already. Decorative, and hidden from the reader for that reason. |
|
|
38
|
+
| `icon` | `ReactNode` | A glyph before the label. It takes the tag's own colour rather than the status tone: on a tint the text IS the status colour, and on a fill anything else would fail. |
|
|
39
|
+
| `children` | `ReactNode` | |
|
|
40
|
+
|
|
41
|
+
## Component tokens
|
|
42
|
+
|
|
43
|
+
`--dk-component-tag-padding-block`, `--dk-component-tag-padding-inline`, `--dk-component-tag-small-padding-inline`, `--dk-component-tag-large-padding-inline`, `--dk-component-tag-gap`, `--dk-component-tag-font-family`, `--dk-component-tag-font-size`, `--dk-component-tag-line-height`, `--dk-component-tag-small-font-size`, `--dk-component-tag-small-line-height`, `--dk-component-tag-large-font-size`, `--dk-component-tag-large-line-height`, `--dk-component-tag-font-weight`, `--dk-component-tag-icon-size`, `--dk-component-tag-small-icon-size`, `--dk-component-tag-large-icon-size`, `--dk-component-tag-dot-size`, `--dk-component-tag-primary-solid`, `--dk-component-tag-success-solid`, `--dk-component-tag-error-solid`, `--dk-component-tag-warning-solid`, `--dk-component-tag-information-solid`, `--dk-component-tag-radius`, `--dk-component-tag-border-width`
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Text area (`textarea`)
|
|
2
|
+
|
|
3
|
+
Several lines of text: notes, messages, comments. Input's field, sized in rows, with auto-grow, a character counter and a submit shortcut.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
div.dk-component-textarea[data-size][data-resize][data-autogrow][data-max-rows]
|
|
10
|
+
[data-limit][data-count][data-submit-shortcut]
|
|
11
|
+
label.dk-component-textarea__label
|
|
12
|
+
div.dk-component-textarea__field > textarea.dk-component-textarea__control
|
|
13
|
+
p.dk-component-textarea__caption optional
|
|
14
|
+
span.dk-component-textarea__count runtime, when there is a limit or data-count
|
|
15
|
+
p.dk-component-textarea__error optional
|
|
16
|
+
The root is a two-column grid: the label and field span it, the caption
|
|
17
|
+
sits left and the counter right on the same line, the error under both.
|
|
18
|
+
──
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Attributes
|
|
22
|
+
|
|
23
|
+
| Attribute | Values the stylesheet styles |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `data-autogrow` | (present or absent) |
|
|
26
|
+
| `data-resize` | `none` |
|
|
27
|
+
| `data-size` | `large`, `small` |
|
|
28
|
+
| `data-state` | `over`, `warning` |
|
|
29
|
+
|
|
30
|
+
## React
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Textarea } from '@karmo-co/drift-kit/react';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Prop | Type | Notes |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `label` | `ReactNode` | |
|
|
39
|
+
| `caption` | `ReactNode` | Helper text, wired as the control's description. |
|
|
40
|
+
| `error` | `ReactNode` | The message AND the invalid state, as Input spells it. |
|
|
41
|
+
| `size` | `'small' \| 'medium' \| 'large'` | |
|
|
42
|
+
| `autoGrow` | `boolean` | Grows with the text from rows up to maxRows, then scrolls. |
|
|
43
|
+
| `maxRows` | `number` | |
|
|
44
|
+
| `resize` | `'vertical' \| 'none'` | |
|
|
45
|
+
| `limit` | `number` | A SOFT limit: you can go past it, and then it is an error. maxLength is the hard one, the native attribute. Either shows the counter. |
|
|
46
|
+
| `showCount` | `boolean` | The count with no limit. |
|
|
47
|
+
| `submitShortcut` | `boolean` | Cmd or Ctrl + Enter submits the form. |
|
|
48
|
+
| `className` | `string` | On the root. The textarea takes every other native attribute, and the ref, controlled or not. |
|
|
49
|
+
|
|
50
|
+
## Component tokens
|
|
51
|
+
|
|
52
|
+
`--dk-component-textarea-gap`, `--dk-component-textarea-count-gap`, `--dk-component-textarea-label-font-family`, `--dk-component-textarea-label-font-size`, `--dk-component-textarea-label-line-height`, `--dk-component-textarea-label-letter-spacing`, `--dk-component-textarea-label-font-weight`, `--dk-component-textarea-font-family`, `--dk-component-textarea-font-weight`, `--dk-component-textarea-small-font-size`, `--dk-component-textarea-small-line-height`, `--dk-component-textarea-font-size`, `--dk-component-textarea-line-height`, `--dk-component-textarea-large-font-size`, `--dk-component-textarea-large-line-height`, `--dk-component-textarea-small-height`, `--dk-component-textarea-height`, `--dk-component-textarea-large-height`, `--dk-component-textarea-small-padding-block`, `--dk-component-textarea-padding-block`, `--dk-component-textarea-large-padding-block`, `--dk-component-textarea-padding-inline`, `--dk-component-textarea-large-padding-inline`, `--dk-component-textarea-radius`, `--dk-component-textarea-border-width`, `--dk-component-textarea-focus-ring-width`, `--dk-component-textarea-caption-font-size`, `--dk-component-textarea-caption-line-height`, `--dk-component-textarea-caption-color`, `--dk-component-textarea-error-color`, `--dk-component-textarea-count-color`, `--dk-component-textarea-count-warning-color`, `--dk-component-textarea-count-over-color`
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Toast (`toast`)
|
|
2
|
+
|
|
3
|
+
A message that arrives, says one thing and goes: a card with a badge, a title and a description, or a compact one-liner.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
div.dk-component-toast[data-status][data-variant="compact"]?[role="status"]
|
|
10
|
+
div.__panel
|
|
11
|
+
div.dk-component-feedback-badge?
|
|
12
|
+
div.__text > p.__title + p.__description?
|
|
13
|
+
button.dk-component-icon-button.__close?
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Values the stylesheet styles |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `data-counter` | (present or absent) |
|
|
21
|
+
| `data-paused` | (present or absent) |
|
|
22
|
+
| `data-placement` | `bottom-center`, `bottom-left`, `bottom-right`, `top-center`, `top-left`, `top-right` |
|
|
23
|
+
| `data-state` | `leaving` |
|
|
24
|
+
| `data-status` | `error`, `information`, `neutral`, `primary`, `success`, `warning` |
|
|
25
|
+
| `data-variant` | `compact` |
|
|
26
|
+
|
|
27
|
+
## React
|
|
28
|
+
|
|
29
|
+
An imperative API rather than a component:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { toast } from '@karmo-co/drift-kit/react';
|
|
33
|
+
toast.show({ /* options */ });
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Option | Type | Notes |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `variant` | `'default' \| 'compact'` | |
|
|
39
|
+
| `status` | `'primary' \| 'neutral' \| 'success' \| 'error' \| 'warning' \| 'information'` | |
|
|
40
|
+
| `title` | `string` | |
|
|
41
|
+
| `description` | `string` | |
|
|
42
|
+
| `placement` | `'top-left' \| 'top-center' \| 'top-right' \| 'bottom-left' \| 'bottom-center' \| 'bottom-right'` | |
|
|
43
|
+
| `icon` | `boolean \| string` | true for the status glyph, false for none, or kit icon markup. |
|
|
44
|
+
| `dismissible` | `boolean` | |
|
|
45
|
+
| `counter` | `boolean` | |
|
|
46
|
+
| `duration` | `number` | ms before it closes itself; 0 keeps it. |
|
|
47
|
+
| `replace` | `boolean` | |
|
|
48
|
+
| `onClose` | `() => void` | |
|
|
49
|
+
|
|
50
|
+
## Component tokens
|
|
51
|
+
|
|
52
|
+
`--dk-component-toast-max-width`, `--dk-component-toast-compact-max-width`, `--dk-component-toast-radius`, `--dk-component-toast-ring-width`, `--dk-component-toast-compact-border-width`, `--dk-component-toast-ring`, `--dk-component-toast-surface`, `--dk-component-toast-compact-surface`, `--dk-component-toast-shadow`, `--dk-component-toast-padding`, `--dk-component-toast-compact-padding-block`, `--dk-component-toast-compact-padding-start`, `--dk-component-toast-compact-padding-end`, `--dk-component-toast-content-gap`, `--dk-component-toast-compact-gap`, `--dk-component-toast-compact-close-gap`, `--dk-component-toast-gap`, `--dk-component-toast-region-offset`, `--dk-component-toast-region-offset-small`, `--dk-component-toast-slide`, `--dk-component-toast-compact-slide`, `--dk-component-toast-enter-duration`, `--dk-component-toast-exit-duration`, `--dk-component-toast-enter-easing`, `--dk-component-toast-exit-easing`, `--dk-component-toast-compact-enter-duration`, `--dk-component-toast-compact-exit-duration`, `--dk-component-toast-compact-enter-easing`, `--dk-component-toast-title-font-size`, `--dk-component-toast-title-line-height`, `--dk-component-toast-title-font-weight`, `--dk-component-toast-title-color`, `--dk-component-toast-description-color`, `--dk-component-toast-compact-icon-size`, `--dk-component-toast-compact-glyph-size`, `--dk-component-toast-z-index`
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Tooltip (`tooltip`)
|
|
2
|
+
|
|
3
|
+
A floating label for an element that needs one word more than it can show.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
div.dk-component-tooltip[role="tooltip"] (one shared bubble, rendered by the runtime)
|
|
10
|
+
div.__surface > span.__icon? + span.__label | dl.__rows
|
|
11
|
+
span.__arrow
|
|
12
|
+
The trigger is any element: [data-dk-tooltip="<text>"], with
|
|
13
|
+
[data-dk-tooltip-placement]?, [data-dk-tooltip-trigger]?, [data-dk-tooltip-delay]?
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Values the stylesheet styles |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `data-placement` | `bottom`, `left`, `right`, `top` |
|
|
21
|
+
| `data-rows` | (present or absent) |
|
|
22
|
+
| `data-total` | (present or absent) |
|
|
23
|
+
|
|
24
|
+
## React
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { Tooltip } from '@karmo-co/drift-kit/react';
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Prop | Type | Notes |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `content` | `string` | The words. A string, because the runtime reads it from an attribute. Leave it out when `rows` gives a breakdown instead. |
|
|
33
|
+
| `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | The preferred side; it flips when there is no room there. |
|
|
34
|
+
| `trigger` | `'hover' \| 'click'` | hover (the default) also shows on focus, so it is reachable by keyboard. click makes it a disclosure for a tip worth opening on purpose. |
|
|
35
|
+
| `icon` | `string` | A glyph name from the icon library, shown before the words. |
|
|
36
|
+
| `delay` | `number` | Milliseconds to rest before it shows. 0 shows at once. |
|
|
37
|
+
| `rows` | `string` | A selector for a <dl> in the page to show as label and value rows, instead of a sentence. |
|
|
38
|
+
| `children` (required) | `ReactElement` | The one element it describes. It keeps its own markup; the tooltip is attributes on it. |
|
|
39
|
+
|
|
40
|
+
## Component tokens
|
|
41
|
+
|
|
42
|
+
`--dk-component-tooltip-font-weight`, `--dk-component-tooltip-font-size`, `--dk-component-tooltip-line-height`, `--dk-component-tooltip-max-width`, `--dk-component-tooltip-padding-block`, `--dk-component-tooltip-padding-inline`, `--dk-component-tooltip-radius`, `--dk-component-tooltip-gap`, `--dk-component-tooltip-icon-size`, `--dk-component-tooltip-rows-max-width`, `--dk-component-tooltip-rows-column-gap`, `--dk-component-tooltip-rows-row-gap`, `--dk-component-tooltip-rows-label-weight`, `--dk-component-tooltip-rule-width`, `--dk-component-tooltip-rule-color`, `--dk-component-tooltip-arrow-size`, `--dk-component-tooltip-viewport-gap`, `--dk-component-tooltip-travel`, `--dk-component-tooltip-delay`
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Top bar (`top-bar`)
|
|
2
|
+
|
|
3
|
+
The page's banner: the brand, an optional row of links, and what the page puts at the end, from a help line to the account.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
header.dk-component-top-bar[data-variant="glass"]?[data-sticky]?
|
|
10
|
+
div.__inner
|
|
11
|
+
a.__brand (a dk-component-logo)
|
|
12
|
+
nav.__links?
|
|
13
|
+
div.__end (help, the account, actions)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Values the stylesheet styles |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `data-dk-sidebar-open` | (present or absent) |
|
|
21
|
+
| `data-help-compact` | (present or absent) |
|
|
22
|
+
| `data-hidden` | (present or absent) |
|
|
23
|
+
| `data-idle` | (present or absent) |
|
|
24
|
+
| `data-indicator` | (present or absent) |
|
|
25
|
+
| `data-nav-collapsed` | (present or absent) |
|
|
26
|
+
| `data-open` | (present or absent) |
|
|
27
|
+
| `data-phone` | (present or absent) |
|
|
28
|
+
| `data-scrolled` | (present or absent) |
|
|
29
|
+
| `data-sticky` | (present or absent) |
|
|
30
|
+
| `data-variant` | `glass`, `transparent` |
|
|
31
|
+
| `data-width` | `full` |
|
|
32
|
+
|
|
33
|
+
## React
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { TopBar } from '@karmo-co/drift-kit/react';
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Notes |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `brand` | `ReactNode` | |
|
|
42
|
+
| `brandHref` | `string` | |
|
|
43
|
+
| `brandLabel` | `string` | The brand link's name, when the brand is a picture. |
|
|
44
|
+
| `links` | `TopBarLink[]` | |
|
|
45
|
+
| `linksLabel` | `string` | The links' landmark name, and the menu button's when they fold. |
|
|
46
|
+
| `help` | `{ icon: ReactNode; title: ReactNode; text: ReactNode }` | The component library's help line: an icon, an overline title and a line with a link in it. |
|
|
47
|
+
| `end` | `ReactNode` | Actions, the account: anything, at the end. |
|
|
48
|
+
| `variant` | `'solid' \| 'glass' \| 'transparent'` | |
|
|
49
|
+
| `sticky` | `boolean` | |
|
|
50
|
+
| `hideOnScroll` | `boolean` | |
|
|
51
|
+
| `fullWidth` | `boolean` | No max width: the bar's contents run edge to edge. |
|
|
52
|
+
| `drawer` | `string` | The id of a drawer Sidebar: a menu button that opens it shows while it is one. |
|
|
53
|
+
| `drawerLabel` | `string` | |
|
|
54
|
+
| `renderLink` | `(props: TopBarLinkProps) => ReactElement` | |
|
|
55
|
+
| `theme` | `'light' \| 'dark'` | Dark chrome: 'dark' makes it dark on a light page and one step deeper than a dark one. Everything inside resolves dark, menus included. |
|
|
56
|
+
| `className` | `string` | |
|
|
57
|
+
|
|
58
|
+
## Component tokens
|
|
59
|
+
|
|
60
|
+
`--dk-component-top-bar-height`, `--dk-component-top-bar-padding-inline`, `--dk-component-top-bar-phone-padding-inline`, `--dk-component-top-bar-gap`, `--dk-component-top-bar-max-width`, `--dk-component-top-bar-brand-width`, `--dk-component-top-bar-brand-height`, `--dk-component-top-bar-solid-surface`, `--dk-component-top-bar-glass-surface`, `--dk-component-top-bar-blur`, `--dk-component-top-bar-border`, `--dk-component-top-bar-border-width`, `--dk-component-top-bar-shadow`, `--dk-component-top-bar-z-index`, `--dk-component-top-bar-link-font-family`, `--dk-component-top-bar-link-font-size`, `--dk-component-top-bar-link-line-height`, `--dk-component-top-bar-link-font-weight`, `--dk-component-top-bar-link-padding-block`, `--dk-component-top-bar-link-padding-inline`, `--dk-component-top-bar-link-radius`, `--dk-component-top-bar-link-text`, `--dk-component-top-bar-link-text-hover`, `--dk-component-top-bar-link-text-active`, `--dk-component-top-bar-link-text-current`, `--dk-component-top-bar-link-surface-hover`, `--dk-component-top-bar-link-surface-active`, `--dk-component-top-bar-link-press-scale`, `--dk-component-top-bar-indicator`, `--dk-component-top-bar-indicator-thickness`, `--dk-component-top-bar-focus-ring`, `--dk-component-top-bar-focus-ring-width`, `--dk-component-top-bar-help-gap`, `--dk-component-top-bar-help-icon-size`, `--dk-component-top-bar-help-icon`, `--dk-component-top-bar-help-title-font-size`, `--dk-component-top-bar-help-title-line-height`, `--dk-component-top-bar-help-title-font-weight`, `--dk-component-top-bar-help-title-letter-spacing`, `--dk-component-top-bar-help-title-color`, `--dk-component-top-bar-help-text-font-size`, `--dk-component-top-bar-help-text-line-height`, `--dk-component-top-bar-help-text-color`, `--dk-component-top-bar-help-link`, `--dk-component-top-bar-help-link-hover`, `--dk-component-top-bar-account-ring`, `--dk-component-top-bar-duration`, `--dk-component-top-bar-indicator-duration`, `--dk-component-top-bar-easing`, `--dk-component-top-bar-hide-duration`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Vehicle (`vehicle`)
|
|
2
|
+
|
|
3
|
+
A photo of a vehicle, from the car-line photo catalogue trimmed to the car: on its own at any size, or stood on a panel the car overflows. 304 models ship with the kit.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
figure.dk-component-vehicle[data-variant="plain|showcase"][data-padding][data-size][data-tone][data-tone-fill][data-surface]
|
|
10
|
+
img.dk-component-vehicle__image[alt]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Attributes
|
|
14
|
+
|
|
15
|
+
| Attribute | Values the stylesheet styles |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `data-padding` | `large`, `medium`, `small` |
|
|
18
|
+
| `data-size` | `large`, `small` |
|
|
19
|
+
| `data-surface` | (present or absent) |
|
|
20
|
+
| `data-tone` | `none` |
|
|
21
|
+
| `data-variant` | `showcase` |
|
|
22
|
+
|
|
23
|
+
## React
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Vehicle } from '@karmo-co/drift-kit/react';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Notes |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `src` (required) | `string` | A photo, trimmed to the car: one of drift-kit's vehicle photos (the vehicles export), or a car line's image_url from the vehicle catalogue. |
|
|
32
|
+
| `alt` (required) | `string` | Required. The make and model, or '' when the name sits right beside it. |
|
|
33
|
+
| `variant` | `'plain' \| 'showcase'` | plain (the default) is the photo alone; showcase stands it on a panel whose bottom edge is two thirds down the car. |
|
|
34
|
+
| `padding` | `'none' \| 'small' \| 'medium' \| 'large'` | Plain only: room around the photo, so the car does not touch the edges of what holds it (a card's media): none (the default), small, medium or large, on the responsive spacing tier. |
|
|
35
|
+
| `size` | `'small' \| 'medium' \| 'large'` | Showcase only: the space around the car, 12, 24 (the default) or 32. |
|
|
36
|
+
| `tone` | `'primary' \| 'success' \| 'warning' \| 'error' \| 'information' \| 'inverse'` | Showcase only: the kit tone for the panel; a solid fill with toneFill. |
|
|
37
|
+
| `toneFill` | `'solid'` | |
|
|
38
|
+
| `surface` | `1 \| 2` | A step down the neutral ladder for the panel. |
|
|
39
|
+
| `className` | `string` | className and style go on the figure, not the image: sizing the figure sizes the photo and its panel together. |
|
|
40
|
+
|
|
41
|
+
## Component tokens
|
|
42
|
+
|
|
43
|
+
`--dk-component-vehicle-ratio`, `--dk-component-vehicle-small-padding`, `--dk-component-vehicle-padding`, `--dk-component-vehicle-large-padding`, `--dk-component-vehicle-small-inset`, `--dk-component-vehicle-inset`, `--dk-component-vehicle-large-inset`, `--dk-component-vehicle-headroom`, `--dk-component-vehicle-panel-reach`, `--dk-component-vehicle-radius`, `--dk-component-vehicle-panel`
|