@karmo-co/drift-kit-reference 25.5.0 → 25.7.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/manifest/components/action-bar.md +4 -2
- package/manifest/components/app-shell.md +7 -1
- package/manifest/components/body.md +5 -3
- package/manifest/components/box.md +4 -2
- package/manifest/components/carousel.md +20 -5
- package/manifest/components/code-input.md +2 -2
- package/manifest/components/eyebrow.md +1 -0
- package/manifest/components/heading.md +1 -0
- package/manifest/components/hero.md +1 -0
- package/manifest/components/image.md +4 -2
- package/manifest/components/modal.md +2 -1
- package/manifest/components/tabs.md +1 -1
- package/manifest/components/tag.md +4 -1
- package/manifest/components/timeline.md +23 -0
- package/manifest/components/top-bar.md +7 -5
- package/manifest/index.json +29 -2
- package/manifest/setup.md +28 -27
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ A flow's controls along the bottom: Back, Next, what the step costs and how far
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
div.dk-component-action-bar[data-variant="float"]?[data-align="split"]?[data-sticky]?
|
|
9
|
+
div.dk-component-action-bar[data-variant="float"]?[data-align="split"]?[data-layout="fill"]?[data-sticky]?
|
|
10
10
|
div.__inner
|
|
11
11
|
div.__start (Back: a plain Button)
|
|
12
12
|
button.__summary? (__summary-label, __summary-value, __summary-chevron; opens __detail)
|
|
@@ -21,6 +21,7 @@ div.dk-component-action-bar[data-variant="float"]?[data-align="split"]?[data-sti
|
|
|
21
21
|
|---|---|
|
|
22
22
|
| `data-align` | `split` |
|
|
23
23
|
| `data-closing` | (present or absent) |
|
|
24
|
+
| `data-layout` | `fill` |
|
|
24
25
|
| `data-open` | (present or absent) |
|
|
25
26
|
| `data-phone` | (present or absent) |
|
|
26
27
|
| `data-sticky` | (present or absent) |
|
|
@@ -42,10 +43,11 @@ import { ActionBar } from '@karmo-co/drift-kit/react';
|
|
|
42
43
|
| `variant` | `'fixed' \| 'float'` | |
|
|
43
44
|
| `sticky` | `boolean` | |
|
|
44
45
|
| `align` | `'end' \| 'split'` | 'end' (the design's) keeps Back beside Next; 'split' puts it at the start. |
|
|
46
|
+
| `layout` | `'fill'` | 'fill' (data-layout): a flow's footer, on the page's surface edge to edge, Next the bar's width on a phone. Render it as the AppShell's own child, after its main, to span the shell over the Sidebar. |
|
|
45
47
|
| `device` | `'auto' \| 'phone' \| 'desktop'` | |
|
|
46
48
|
| `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. |
|
|
47
49
|
| `className` | `string` | |
|
|
48
50
|
|
|
49
51
|
## Component tokens
|
|
50
52
|
|
|
51
|
-
`--dk-component-action-bar-padding-block`, `--dk-component-action-bar-padding-inline`, `--dk-component-action-bar-phone-padding-inline`, `--dk-component-action-bar-gap`, `--dk-component-action-bar-button-gap`, `--dk-component-action-bar-max-width`, `--dk-component-action-bar-surface`, `--dk-component-action-bar-border`, `--dk-component-action-bar-border-width`, `--dk-component-action-bar-float-radius`, `--dk-component-action-bar-float-surface`, `--dk-component-action-bar-blur`, `--dk-component-action-bar-float-inset`, `--dk-component-action-bar-float-shadow`, `--dk-component-action-bar-stuck-shadow`, `--dk-component-action-bar-z-index`, `--dk-component-action-bar-summary-label-font-size`, `--dk-component-action-bar-summary-label-line-height`, `--dk-component-action-bar-summary-label-font-weight`, `--dk-component-action-bar-summary-label-letter-spacing`, `--dk-component-action-bar-summary-label-color`, `--dk-component-action-bar-summary-value-font-size`, `--dk-component-action-bar-summary-value-line-height`, `--dk-component-action-bar-summary-value-font-weight`, `--dk-component-action-bar-summary-value-color`, `--dk-component-action-bar-progress-thickness`, `--dk-component-action-bar-progress-track`, `--dk-component-action-bar-progress-fill`, `--dk-component-action-bar-progress-gradient`, `--dk-component-action-bar-progress-gradient-rtl`, `--dk-component-action-bar-duration`, `--dk-component-action-bar-progress-duration`, `--dk-component-action-bar-easing`, `--dk-component-action-bar-summary-padding`, `--dk-component-action-bar-summary-radius`, `--dk-component-action-bar-summary-surface-hover`, `--dk-component-action-bar-summary-surface-active`, `--dk-component-action-bar-summary-press-scale`, `--dk-component-action-bar-summary-ring`, `--dk-component-action-bar-summary-ring-width`, `--dk-component-action-bar-chevron-size`, `--dk-component-action-bar-chevron-color`, `--dk-component-action-bar-chevron-color-hover`, `--dk-component-action-bar-chevron-color-active`, `--dk-component-action-bar-detail-surface`, `--dk-component-action-bar-detail-border`, `--dk-component-action-bar-detail-radius`, `--dk-component-action-bar-detail-shadow`, `--dk-component-action-bar-detail-padding`, `--dk-component-action-bar-detail-width`, `--dk-component-action-bar-detail-gap`, `--dk-component-action-bar-detail-rise`, `--dk-component-action-bar-detail-enter-duration`, `--dk-component-action-bar-detail-enter-easing`, `--dk-component-action-bar-detail-exit-duration`, `--dk-component-action-bar-detail-exit-easing`
|
|
53
|
+
`--dk-component-action-bar-padding-block`, `--dk-component-action-bar-padding-inline`, `--dk-component-action-bar-phone-padding-inline`, `--dk-component-action-bar-gap`, `--dk-component-action-bar-button-gap`, `--dk-component-action-bar-max-width`, `--dk-component-action-bar-surface`, `--dk-component-action-bar-border`, `--dk-component-action-bar-border-width`, `--dk-component-action-bar-fill-surface`, `--dk-component-action-bar-fill-border`, `--dk-component-action-bar-fill-padding-block`, `--dk-component-action-bar-fill-padding-inline`, `--dk-component-action-bar-fill-phone-padding-block-end`, `--dk-component-action-bar-float-radius`, `--dk-component-action-bar-float-surface`, `--dk-component-action-bar-blur`, `--dk-component-action-bar-float-inset`, `--dk-component-action-bar-float-shadow`, `--dk-component-action-bar-stuck-shadow`, `--dk-component-action-bar-z-index`, `--dk-component-action-bar-summary-label-font-size`, `--dk-component-action-bar-summary-label-line-height`, `--dk-component-action-bar-summary-label-font-weight`, `--dk-component-action-bar-summary-label-letter-spacing`, `--dk-component-action-bar-summary-label-color`, `--dk-component-action-bar-summary-value-font-size`, `--dk-component-action-bar-summary-value-line-height`, `--dk-component-action-bar-summary-value-font-weight`, `--dk-component-action-bar-summary-value-color`, `--dk-component-action-bar-progress-thickness`, `--dk-component-action-bar-progress-track`, `--dk-component-action-bar-progress-fill`, `--dk-component-action-bar-progress-gradient`, `--dk-component-action-bar-progress-gradient-rtl`, `--dk-component-action-bar-duration`, `--dk-component-action-bar-progress-duration`, `--dk-component-action-bar-easing`, `--dk-component-action-bar-summary-padding`, `--dk-component-action-bar-summary-radius`, `--dk-component-action-bar-summary-surface-hover`, `--dk-component-action-bar-summary-surface-active`, `--dk-component-action-bar-summary-press-scale`, `--dk-component-action-bar-summary-ring`, `--dk-component-action-bar-summary-ring-width`, `--dk-component-action-bar-chevron-size`, `--dk-component-action-bar-chevron-color`, `--dk-component-action-bar-chevron-color-hover`, `--dk-component-action-bar-chevron-color-active`, `--dk-component-action-bar-detail-surface`, `--dk-component-action-bar-detail-border`, `--dk-component-action-bar-detail-radius`, `--dk-component-action-bar-detail-shadow`, `--dk-component-action-bar-detail-padding`, `--dk-component-action-bar-detail-width`, `--dk-component-action-bar-detail-gap`, `--dk-component-action-bar-detail-rise`, `--dk-component-action-bar-detail-enter-duration`, `--dk-component-action-bar-detail-enter-easing`, `--dk-component-action-bar-detail-exit-duration`, `--dk-component-action-bar-detail-exit-easing`
|
|
@@ -12,6 +12,10 @@ div.dk-component-app-shell[data-contained]?[data-presentation="bar|drawer"]?
|
|
|
12
12
|
header.dk-component-top-bar? (its own component)
|
|
13
13
|
main.__content
|
|
14
14
|
div.dk-component-action-bar? (its own component)
|
|
15
|
+
div.dk-component-action-bar[data-layout="fill"]? (a flow's footer, the shell's own child: spans the
|
|
16
|
+
whole shell over the Sidebar, at the foot of the screen, or of the box
|
|
17
|
+
when contained, above a phone bar; the page leaves room for it;
|
|
18
|
+
React `footer`)
|
|
15
19
|
```
|
|
16
20
|
|
|
17
21
|
## Attributes
|
|
@@ -19,6 +23,7 @@ div.dk-component-app-shell[data-contained]?[data-presentation="bar|drawer"]?
|
|
|
19
23
|
| Attribute | Values the stylesheet styles |
|
|
20
24
|
|---|---|
|
|
21
25
|
| `data-contained` | (present or absent) |
|
|
26
|
+
| `data-layout` | `fill` |
|
|
22
27
|
| `data-presentation` | `bar`, `drawer` |
|
|
23
28
|
| `data-sticky` | (present or absent) |
|
|
24
29
|
| `data-variant` | `float`, `floating` |
|
|
@@ -33,7 +38,8 @@ import { AppShell } from '@karmo-co/drift-kit/react';
|
|
|
33
38
|
|---|---|---|
|
|
34
39
|
| `sidebar` | `ReactNode` | A Sidebar. |
|
|
35
40
|
| `topBar` | `ReactNode` | A Top bar, usually sticky. |
|
|
36
|
-
| `actionBar` | `ReactNode` | An Action bar, usually sticky. |
|
|
41
|
+
| `actionBar` | `ReactNode` | An Action bar, usually sticky. It sits in the main column, under the page. |
|
|
42
|
+
| `footer` | `ReactNode` | The shell's own last child, after the main column (10 Nov 2026): where a fill Action bar (layout="fill") goes to span the whole shell over the Sidebar's foot, at the foot of the screen (of the box, contained). |
|
|
37
43
|
| `children` | `ReactNode` | The page. |
|
|
38
44
|
| `contained` | `boolean \| 'layout'` | Fill the parent's box instead of the viewport: the main column scrolls and the phone bar stays in the frame. true makes the shell a layer (a transform) that everything fixed inside it is placed in; 'layout' (23 Oct 2026) makes it only a box, with no layer: the Sidebar's bar, drawer and scrim are absolute in it instead (its runtime writes them), so nothing in the shell is rasterised differently from the page around it. In HTML the Sidebar's runtime takes the layer away (an inline transform: none), so a layout shell with no Sidebar in it keeps the layer; when the shell stops being 'layout' the runtime gives it back at its next sync. |
|
|
39
45
|
| `className` | `string` | |
|
|
@@ -6,7 +6,7 @@ The body-copy primitive: one element, eleven colours, two emphasis rungs, four s
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
p|span.dk-component-body[data-size="xlarge|large|medium|small|xsmall"]?[data-weight]?[data-color]?[data-emphasis="subtle"]?[data-align]?[data-style]?[data-trim]?
|
|
9
|
+
p|span.dk-component-body[data-size="xlarge|large|medium|small|xsmall"]?[data-weight]?[data-color]?[data-emphasis="subtle"]?[data-align]?[data-style="normal|underline|italic|strikethrough"]?[data-trim]?[data-nowrap]?
|
|
10
10
|
span.__value? (a figure inside running text)
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -18,8 +18,9 @@ p|span.dk-component-body[data-size="xlarge|large|medium|small|xsmall"]?[data-wei
|
|
|
18
18
|
| `data-color` | `black`, `default`, `error`, `information`, `inverse`, `neutral`, `primary`, `success`, `warning`, `white` |
|
|
19
19
|
| `data-disabled` | (present or absent) |
|
|
20
20
|
| `data-emphasis` | `subtle` |
|
|
21
|
+
| `data-nowrap` | (present or absent) |
|
|
21
22
|
| `data-size` | `large`, `medium`, `small`, `xlarge`, `xsmall` |
|
|
22
|
-
| `data-style` | `italic`, `normal`, `underline` |
|
|
23
|
+
| `data-style` | `italic`, `normal`, `strikethrough`, `underline` |
|
|
23
24
|
| `data-trim` | `both`, `end`, `start` |
|
|
24
25
|
| `data-weight` | `bold`, `extra-bold`, `extra-light`, `light`, `medium`, `regular`, `semi-bold`, `thin` |
|
|
25
26
|
|
|
@@ -33,7 +34,7 @@ import { Body } from '@karmo-co/drift-kit/react';
|
|
|
33
34
|
|---|---|---|
|
|
34
35
|
| `size` | `'xlarge' \| 'large' \| 'medium' \| 'small' \| 'xsmall'` | |
|
|
35
36
|
| `weight` | `\| 'thin' \| 'extra-light' \| 'light' \| 'regular' \| 'medium' \| 'semi-bold' \| 'bold' \| 'extra-bold'` | |
|
|
36
|
-
| `textStyle` | `'normal' \| 'underline' \| 'italic'` | React owns `style`, so the data-style axis is `textStyle`. This is the one place the mirror-the-HTML rule cannot hold. |
|
|
37
|
+
| `textStyle` | `'normal' \| 'underline' \| 'italic' \| 'strikethrough'` | React owns `style`, so the data-style axis is `textStyle`. This is the one place the mirror-the-HTML rule cannot hold. |
|
|
37
38
|
| `as` | `ElementType` | |
|
|
38
39
|
| `color` | `Color` | |
|
|
39
40
|
| `emphasis` | `Emphasis` | |
|
|
@@ -41,6 +42,7 @@ import { Body } from '@karmo-co/drift-kit/react';
|
|
|
41
42
|
| `trim` | `Trim` | |
|
|
42
43
|
| `disabled` | `boolean` | A span cannot carry :disabled, so the kit uses [data-disabled]. |
|
|
43
44
|
| `children` | `ReactNode` | |
|
|
45
|
+
| `nowrap` | `boolean` | Body only: the words stay on one line (data-nowrap). |
|
|
44
46
|
| `className` | `string` | |
|
|
45
47
|
|
|
46
48
|
## Component tokens
|
|
@@ -6,11 +6,11 @@ A grouped surface: a panel that separates what is in it from what is around it,
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
section.dk-component-box[data-variant][data-size][data-radius][data-tone][data-tone-fill][data-surface][data-interactive][data-align][data-sticky]
|
|
9
|
+
section.dk-component-box[data-variant][data-size][data-radius][data-tone][data-tone-fill][data-surface][data-interactive][data-align][data-sticky][data-flush="phone"]
|
|
10
10
|
header.__header
|
|
11
11
|
div.__heading > .__title + .__description?
|
|
12
12
|
div.__actions?
|
|
13
|
-
dl|div.__grid[data-columns="1..6"][data-dividers][data-align]
|
|
13
|
+
dl|div.__grid[data-columns="1..6"][data-dividers][data-align] (style: --dk-box-grid-gap?)
|
|
14
14
|
div.__cell[data-span="full"]?
|
|
15
15
|
dt.__label + dd.__value (a fact)
|
|
16
16
|
… or anything
|
|
@@ -23,6 +23,7 @@ section.dk-component-box[data-variant][data-size][data-radius][data-tone][data-t
|
|
|
23
23
|
| `data-align` | `center`, `end`, `start` |
|
|
24
24
|
| `data-columns` | `1`, `2`, `3`, `4`, `5`, `6` |
|
|
25
25
|
| `data-dividers` | `both`, `columns`, `rows` |
|
|
26
|
+
| `data-flush` | `phone` |
|
|
26
27
|
| `data-interactive` | (present or absent) |
|
|
27
28
|
| `data-radius` | `large`, `medium`, `xlarge` |
|
|
28
29
|
| `data-size` | `large`, `small`, `xlarge`, `xsmall` |
|
|
@@ -58,6 +59,7 @@ import { Box } from '@karmo-co/drift-kit/react';
|
|
|
58
59
|
| `contentAlign` | `'center'` | The box's own content: center centres what an interactive box (data-interactive) holds, which otherwise starts it. With or without columns; align stays the cells'. |
|
|
59
60
|
| `radius` | `'medium' \| 'large' \| 'xlarge'` | The corner of that size, whatever the box's size: a small card a rung rounder without the large padding. |
|
|
60
61
|
| `sticky` | `boolean` | Stays at the top of what scrolls, in its own paint (data-sticky): the page's surface for an untoned box; a toned or levelled one paints its fill, so stick a plain section around it instead. In style, --dk-sticky-cover opts into a cover rising above it (only where nothing sits above it in its scroller), --dk-sticky-bleed widens that cover and --dk-sticky-z-index lifts it. |
|
|
62
|
+
| `flush` | `'phone'` | phone: below the kit's breakpoint the box runs to the screen's sides, no corner and no side edges (data-flush). The page bleeds it to the edges. |
|
|
61
63
|
| `interactivePress` | `InteractivePress` | With data-interactive: the press, over the tier's own. none keeps it still (a row in a divided list), control presses it like a button. |
|
|
62
64
|
| `as` | `'section' \| 'div' \| 'aside' \| 'article'` | section when the box has a name (a title or an aria-label), div when it does not; pass one to choose. |
|
|
63
65
|
|
|
@@ -6,7 +6,7 @@ Browse a short run of cards sideways. Two presentations: a slider on a phone or
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
div.dk-component-carousel[data-presentation="slider|row"]?[data-loop]?[data-start]?[data-bleed]?[data-lift]?[data-device]?[data-arrow-look="solid|raised-inverse"]?[data-item-hover="showcase"]?
|
|
9
|
+
div.dk-component-carousel[data-presentation="slider|row|viewer"]?[data-variant="viewer"]?[data-phone]?[data-loop]?[data-start]?[data-bleed]?[data-lift]?[data-device]?[data-arrow-look="solid|raised-inverse|plain"]?[data-item-hover="showcase"]?
|
|
10
10
|
(data-presentation follows the nearest data-device when there is one,
|
|
11
11
|
else the kit's phone breakpoint, and the runtime owns it; data-start is
|
|
12
12
|
the real item's index; data-lift is a selector inside an item whose
|
|
@@ -17,10 +17,22 @@ div.dk-component-carousel[data-presentation="slider|row"]?[data-loop]?[data-star
|
|
|
17
17
|
body beside a rail when the document scrolls)
|
|
18
18
|
div.__track
|
|
19
19
|
div.__item
|
|
20
|
+
a|button.__action? (10 Nov 2026: the item's one child when the whole
|
|
21
|
+
card goes somewhere, a link with href or a type="button". It draws
|
|
22
|
+
as the div it replaces: a plain block whose layout is weightless,
|
|
23
|
+
so the author's own layout class wins, and whose chrome reset
|
|
24
|
+
weighs one class, so a page's plain a { } or button { } does not
|
|
25
|
+
(its states are its own, not data-interactive, which would change
|
|
26
|
+
the look; deliberate). An aria-disabled link takes no pointer and
|
|
27
|
+
React drops its href. It adds the pointer,
|
|
28
|
+
the kit's focus ring (inside its box, so the track never clips it)
|
|
29
|
+
and takes the row's press, which a disabled or aria-disabled one
|
|
30
|
+
does not. React CarouselAction.)
|
|
20
31
|
(loop: two aria-hidden clones a side, out of the tab order, which the
|
|
21
32
|
runtime makes; a tap on a clone opens its original)
|
|
22
33
|
button.dk-component-icon-button.__prev
|
|
23
34
|
button.dk-component-icon-button.__next
|
|
35
|
+
span.__count? (a viewer's "2 / 12": the runtime writes it, polite live text)
|
|
24
36
|
(the row's arrows: a solid IconButton in light, lifted on
|
|
25
37
|
the carousel's floating / overlay / lifted shadows, and a raised one
|
|
26
38
|
in a light island in dark, on its own shadow, so they hold on any
|
|
@@ -36,9 +48,10 @@ div.dk-component-carousel[data-presentation="slider|row"]?[data-loop]?[data-star
|
|
|
36
48
|
| `data-at-end` | (present or absent) |
|
|
37
49
|
| `data-at-start` | (present or absent) |
|
|
38
50
|
| `data-item-hover` | `showcase` |
|
|
51
|
+
| `data-phone` | (present or absent) |
|
|
39
52
|
| `data-presentation` | `row`, `slider` |
|
|
40
|
-
| `data-pseudo-class` | `hover` |
|
|
41
|
-
| `data-variant` | `showcase`, `solid` |
|
|
53
|
+
| `data-pseudo-class` | `focus`, `hover` |
|
|
54
|
+
| `data-variant` | `showcase`, `solid`, `viewer` |
|
|
42
55
|
|
|
43
56
|
## React
|
|
44
57
|
|
|
@@ -55,11 +68,13 @@ import { Carousel } from '@karmo-co/drift-kit/react';
|
|
|
55
68
|
| `lift` | `string` | A selector inside each item whose centre stays level as an item shrinks (the image of a card), e.g. lift=".dk-component-vehicle" for a row of Vehicle cards. |
|
|
56
69
|
| `device` | `'phone' \| 'tablet' \| 'desktop'` | phone and tablet a slider, desktop a row; else the nearest data-device, else the kit's phone breakpoint. |
|
|
57
70
|
| `arrows` | `{ prev: ReactNode; next: ReactNode; label?: { prev: string; next: string } }` | Previous and Next, for the row (the slider hides them). |
|
|
58
|
-
| `arrowLook` | `'solid' \| 'raised-inverse'` | solid is the primary fill; raised-inverse the raised IconButton in a light island. Unset: solid in light, raised-inverse in dark (the nearest data-theme, followed as it changes). |
|
|
71
|
+
| `arrowLook` | `'solid' \| 'raised-inverse' \| 'plain'` | solid is the primary fill; raised-inverse the raised IconButton in a light island; plain the bordered one. Unset: solid in light, raised-inverse in dark (the nearest data-theme, followed as it changes); a viewer's are plain. |
|
|
72
|
+
| `variant` | `'viewer'` | 'viewer' (10 Nov 2026): a photo viewer, one photo at a time at every width, no shrink or fade; the arrows beside the photo on a desktop, none on a phone or tablet; plain arrows unless arrowLook says; ArrowLeft and ArrowRight step while focus is inside. |
|
|
73
|
+
| `count` | `boolean` | A viewer's count under the photo, "2 / 12", which the runtime writes. |
|
|
59
74
|
| `itemHover` | `'showcase'` | showcase: in the row, a hovered item's Vehicle showcase steps its panel up and grows its car (the slider has no hover). |
|
|
60
75
|
| `onChange` | `(index: number) => void` | The real item now centred (slider) or first (row). |
|
|
61
76
|
| `className` | `string` | |
|
|
62
77
|
|
|
63
78
|
## Component tokens
|
|
64
79
|
|
|
65
|
-
`--dk-component-carousel-gap`, `--dk-component-carousel-slider-item-width`, `--dk-component-carousel-padding-block`, `--dk-component-carousel-row-count`, `--dk-component-carousel-row-count-wide`, `--dk-component-carousel-row-count-medium`, `--dk-component-carousel-row-count-narrow`, `--dk-component-carousel-row-peek`, `--dk-component-carousel-fade-inset`, `--dk-component-carousel-item-press-scale`, `--dk-component-carousel-showcase-hover-panel`, `--dk-component-carousel-showcase-hover-grow`, `--dk-component-carousel-arrow-shadow`, `--dk-component-carousel-arrow-shadow-hover`, `--dk-component-carousel-arrow-shadow-active`, `--dk-component-carousel-arrow-offset`
|
|
80
|
+
`--dk-component-carousel-gap`, `--dk-component-carousel-slider-item-width`, `--dk-component-carousel-padding-block`, `--dk-component-carousel-row-count`, `--dk-component-carousel-row-count-wide`, `--dk-component-carousel-row-count-medium`, `--dk-component-carousel-row-count-narrow`, `--dk-component-carousel-row-peek`, `--dk-component-carousel-fade-inset`, `--dk-component-carousel-item-press-scale`, `--dk-component-carousel-action-ring`, `--dk-component-carousel-action-ring-width`, `--dk-component-carousel-action-radius`, `--dk-component-carousel-showcase-hover-panel`, `--dk-component-carousel-showcase-hover-grow`, `--dk-component-carousel-viewer-inset`, `--dk-component-carousel-viewer-arrow-gap`, `--dk-component-carousel-count-gap`, `--dk-component-carousel-count-font-family`, `--dk-component-carousel-count-font-size`, `--dk-component-carousel-count-line-height`, `--dk-component-carousel-count-color`, `--dk-component-carousel-arrow-shadow`, `--dk-component-carousel-arrow-shadow-hover`, `--dk-component-carousel-arrow-shadow-active`, `--dk-component-carousel-arrow-offset`
|
|
@@ -6,11 +6,11 @@ A verification code, a PIN, a voucher. N characters, one per box, with one real
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
div.dk-component-code-input[data-cells="
|
|
9
|
+
div.dk-component-code-input[data-cells="1..12"][data-size="small|large"]?[data-group="N"]?[data-charset="alphanumeric"]?[data-mask]?[data-placeholder]?[data-label-size="small"]?[data-width="cells"]?[data-ready]?
|
|
10
10
|
label.__label
|
|
11
11
|
div.__field
|
|
12
12
|
input.__control (one real input)
|
|
13
|
-
span.__cells[aria-hidden] > span.__cell (written by the runtime)
|
|
13
|
+
span.__cells[aria-hidden] > span.__cell[data-group-end]? (written by the runtime; square at any width)
|
|
14
14
|
p.__caption? | p.__error?
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -31,6 +31,7 @@ import { Eyebrow } from '@karmo-co/drift-kit/react';
|
|
|
31
31
|
| `size` | `'large' \| 'medium' \| 'small'` | |
|
|
32
32
|
| `weight` | `'medium' \| 'semi-bold' \| 'bold'` | |
|
|
33
33
|
| `textStyle` | `` | React owns `style`, so the data-style axis is `textStyle`. This is the one place the mirror-the-HTML rule cannot hold. |
|
|
34
|
+
| `nowrap` | `` | Body only: the words stay on one line (data-nowrap). |
|
|
34
35
|
| `as` | `ElementType` | |
|
|
35
36
|
| `color` | `Color` | |
|
|
36
37
|
| `emphasis` | `Emphasis` | |
|
|
@@ -33,6 +33,7 @@ import { Heading } from '@karmo-co/drift-kit/react';
|
|
|
33
33
|
| `size` | `\| 'xxlarge' \| 'xlarge' \| 'large' \| 'medium' \| 'small' \| 'xsmall' \| 'xxsmall'` | |
|
|
34
34
|
| `weight` | `HeadingWeight` | |
|
|
35
35
|
| `textStyle` | `'italic'` | React owns `style`, so the data-style axis is `textStyle`. This is the one place the mirror-the-HTML rule cannot hold. |
|
|
36
|
+
| `nowrap` | `` | Body only: the words stay on one line (data-nowrap). |
|
|
36
37
|
| `as` | `ElementType` | |
|
|
37
38
|
| `color` | `Color` | |
|
|
38
39
|
| `emphasis` | `Emphasis` | |
|
|
@@ -32,6 +32,7 @@ import { Hero } from '@karmo-co/drift-kit/react';
|
|
|
32
32
|
| `size` | `\| 'xxlarge' \| 'xlarge' \| 'large' \| 'medium' \| 'small' \| 'xsmall' \| 'xxsmall' \| 'xxxsmall'` | |
|
|
33
33
|
| `weight` | `'regular' \| 'medium' \| 'semi-bold' \| 'bold'` | |
|
|
34
34
|
| `textStyle` | `` | React owns `style`, so the data-style axis is `textStyle`. This is the one place the mirror-the-HTML rule cannot hold. |
|
|
35
|
+
| `nowrap` | `` | Body only: the words stay on one line (data-nowrap). |
|
|
35
36
|
| `as` | `ElementType` | |
|
|
36
37
|
| `color` | `Color` | |
|
|
37
38
|
| `emphasis` | `Emphasis` | |
|
|
@@ -6,7 +6,7 @@ An image slot: a picture on the kit's corner, or, with data-placeholder, the emp
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
div.dk-component-image[data-placeholder]?[data-size="16|20|24"]?[data-ratio="1/1|4/3|3/2|16/9|21/9"]?
|
|
9
|
+
div.dk-component-image[data-placeholder]?[data-fill]?[data-size="16|20|24"]?[data-ratio="1/1|4/3|3/2|16/9|21/9"]?
|
|
10
10
|
img (a picture; none on a placeholder)
|
|
11
11
|
::before (the cross, on a placeholder)
|
|
12
12
|
```
|
|
@@ -15,6 +15,7 @@ div.dk-component-image[data-placeholder]?[data-size="16|20|24"]?[data-ratio="1/1
|
|
|
15
15
|
|
|
16
16
|
| Attribute | Values the stylesheet styles |
|
|
17
17
|
|---|---|
|
|
18
|
+
| `data-fill` | (present or absent) |
|
|
18
19
|
| `data-placeholder` | (present or absent) |
|
|
19
20
|
| `data-ratio` | `1/1`, `16/9`, `21/9`, `3/2`, `4/3` |
|
|
20
21
|
| `data-size` | `16`, `20`, `24` |
|
|
@@ -30,10 +31,11 @@ import { Image } from '@karmo-co/drift-kit/react';
|
|
|
30
31
|
| `src` | `string` | The picture. Absent with placeholder, which draws the empty slot. |
|
|
31
32
|
| `alt` | `string` | The picture's text alternative; "" for a decorative one. |
|
|
32
33
|
| `placeholder` | `boolean` | The empty slot: a hairline box crossed corner to corner. Decorative (aria-hidden) unless it is given an aria-label, which makes it an image with that name. |
|
|
34
|
+
| `fill` | `boolean` | Painted in the surface it sits on (data-fill), so a slot in front of another, a pile of photos, covers it. |
|
|
33
35
|
| `size` | `16 \| 20 \| 24` | A fixed square, Icon's sizes: the small slot beside a title or a row. |
|
|
34
36
|
| `ratio` | `'1/1' \| '4/3' \| '3/2' \| '16/9' \| '21/9'` | The height from the width. Without it, or a size, the layout sizes it. |
|
|
35
37
|
| `imgProps` | `ImgHTMLAttributes<HTMLImageElement>` | The img's own attributes (loading, decoding, srcSet, sizes, width, height). src and alt above win over any here. |
|
|
36
38
|
|
|
37
39
|
## Component tokens
|
|
38
40
|
|
|
39
|
-
`--dk-component-image-radius`, `--dk-component-image-placeholder-color`, `--dk-component-image-placeholder-border-width`, `--dk-component-image-16-size`, `--dk-component-image-20-size`, `--dk-component-image-24-size`
|
|
41
|
+
`--dk-component-image-radius`, `--dk-component-image-placeholder-color`, `--dk-component-image-placeholder-border-width`, `--dk-component-image-16-size`, `--dk-component-image-20-size`, `--dk-component-image-24-size`, `--dk-component-image-fill`
|
|
@@ -15,6 +15,7 @@ div.dk-component-modal[hidden][data-sheet][data-sheet-open][data-sheet-drag][dat
|
|
|
15
15
|
h2.dk-component-modal__title
|
|
16
16
|
button.dk-component-icon-button[aria-label]
|
|
17
17
|
div.dk-component-modal__body
|
|
18
|
+
div.dk-component-modal__actions? (last: the body's own buttons, scrolling with it)
|
|
18
19
|
div.dk-component-modal__footer
|
|
19
20
|
```
|
|
20
21
|
|
|
@@ -63,4 +64,4 @@ import { Modal } from '@karmo-co/drift-kit/react';
|
|
|
63
64
|
|
|
64
65
|
## Component tokens
|
|
65
66
|
|
|
66
|
-
`--dk-component-modal-small-width`, `--dk-component-modal-width`, `--dk-component-modal-large-width`, `--dk-component-modal-xlarge-width`, `--dk-component-modal-radius`, `--dk-component-modal-surface`, `--dk-component-modal-border`, `--dk-component-modal-border-width`, `--dk-component-modal-shadow`, `--dk-component-modal-inset`, `--dk-component-modal-max-height`, `--dk-component-modal-backdrop`, `--dk-component-modal-backdrop-blur`, `--dk-component-modal-padding-inline`, `--dk-component-modal-header-padding-block`, `--dk-component-modal-body-padding-block`, `--dk-component-modal-footer-padding-block`, `--dk-component-modal-body-gap`, `--dk-component-modal-footer-gap`, `--dk-component-modal-header-gap`, `--dk-component-modal-divider`, `--dk-component-modal-title-font-size`, `--dk-component-modal-title-line-height`, `--dk-component-modal-title-font-weight`, `--dk-component-modal-title-color`, `--dk-component-modal-text-color`, `--dk-component-modal-icon-size`, `--dk-component-modal-icon-color`, `--dk-component-modal-sheet-max-height`, `--dk-component-modal-sheet-max-width`, `--dk-component-modal-sheet-radius`, `--dk-component-modal-sheet-action-height`, `--dk-component-modal-sheet-action-min`, `--dk-component-modal-grabber-width`, `--dk-component-modal-grabber-height`, `--dk-component-modal-grabber-offset`, `--dk-component-modal-grabber-color`, `--dk-component-modal-sheet-header-padding-top`, `--dk-component-modal-settle-duration`, `--dk-component-modal-settle-easing`, `--dk-component-modal-enter-duration`, `--dk-component-modal-exit-duration`, `--dk-component-modal-enter-easing`, `--dk-component-modal-exit-easing`, `--dk-component-modal-enter-travel`
|
|
67
|
+
`--dk-component-modal-small-width`, `--dk-component-modal-width`, `--dk-component-modal-large-width`, `--dk-component-modal-xlarge-width`, `--dk-component-modal-radius`, `--dk-component-modal-surface`, `--dk-component-modal-border`, `--dk-component-modal-border-width`, `--dk-component-modal-shadow`, `--dk-component-modal-inset`, `--dk-component-modal-max-height`, `--dk-component-modal-backdrop`, `--dk-component-modal-backdrop-blur`, `--dk-component-modal-padding-inline`, `--dk-component-modal-header-padding-block`, `--dk-component-modal-body-padding-block`, `--dk-component-modal-footer-padding-block`, `--dk-component-modal-body-gap`, `--dk-component-modal-footer-gap`, `--dk-component-modal-actions-padding-block-start`, `--dk-component-modal-actions-gap`, `--dk-component-modal-header-gap`, `--dk-component-modal-divider`, `--dk-component-modal-title-font-size`, `--dk-component-modal-title-line-height`, `--dk-component-modal-title-font-weight`, `--dk-component-modal-title-color`, `--dk-component-modal-text-color`, `--dk-component-modal-icon-size`, `--dk-component-modal-icon-color`, `--dk-component-modal-sheet-max-height`, `--dk-component-modal-sheet-max-width`, `--dk-component-modal-sheet-radius`, `--dk-component-modal-sheet-action-height`, `--dk-component-modal-sheet-action-min`, `--dk-component-modal-grabber-width`, `--dk-component-modal-grabber-height`, `--dk-component-modal-grabber-offset`, `--dk-component-modal-grabber-color`, `--dk-component-modal-sheet-header-padding-top`, `--dk-component-modal-settle-duration`, `--dk-component-modal-settle-easing`, `--dk-component-modal-enter-duration`, `--dk-component-modal-exit-duration`, `--dk-component-modal-enter-easing`, `--dk-component-modal-exit-easing`, `--dk-component-modal-enter-travel`
|
|
@@ -6,7 +6,7 @@ A strip of tabs that switch between panels of one page, on a hairline with a bar
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
div.dk-component-tabs[role="tablist"][data-size]?
|
|
9
|
+
div.dk-component-tabs[role="tablist"][data-size]? (style: --dk-tabs-inset?)
|
|
10
10
|
button.__tab[role="tab"][data-value][aria-selected]
|
|
11
11
|
span.__icon?
|
|
12
12
|
span.__label
|
|
@@ -6,16 +6,18 @@ A label, a category, a status. Six statuses, three variants, and a dot for the c
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
span.dk-component-tag[data-status|data-hue][data-variant][data-size]
|
|
9
|
+
span.dk-component-tag[data-status|data-hue][data-variant][data-size][data-caret]?
|
|
10
10
|
span.dk-component-tag__dot (optional, aria-hidden)
|
|
11
11
|
span.dk-component-tag__icon (optional, aria-hidden, holds an svg)
|
|
12
12
|
span.dk-component-tag__text (the words; end in an ellipsis when a tag alone in its container is squeezed)
|
|
13
|
+
::after (with data-caret: a chevron-down, for a tag that opens a menu)
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
## Attributes
|
|
16
17
|
|
|
17
18
|
| Attribute | Values the stylesheet styles |
|
|
18
19
|
|---|---|
|
|
20
|
+
| `data-caret` | (present or absent) |
|
|
19
21
|
| `data-hue` | `next1`, `next2`, `next3`, `next4`, `prev1`, `prev2`, `prev3`, `prev4`, `primary` |
|
|
20
22
|
| `data-size` | `large`, `small`, `xsmall` |
|
|
21
23
|
| `data-status` | `error`, `information`, `primary`, `success`, `warning` |
|
|
@@ -39,6 +41,7 @@ import { Tag } from '@karmo-co/drift-kit/react';
|
|
|
39
41
|
| `weight` | `'medium' \| 'semi-bold'` | The label weight; semi-bold when absent. |
|
|
40
42
|
| `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. |
|
|
41
43
|
| `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. |
|
|
44
|
+
| `caret` | `boolean` | A chevron after the words (data-caret), for a tag that opens a menu, a chip filter. The element that opens it is the button around it. |
|
|
42
45
|
| `children` | `ReactNode` | |
|
|
43
46
|
|
|
44
47
|
## Component tokens
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Timeline (`timeline`)
|
|
2
|
+
|
|
3
|
+
Dated moments down a page (pick-up, then refresh, then return): a dot beside each, a line joining one dot to the next, and what happens at each moment beside its dot.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Anatomy (HTML)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
ol.dk-component-timeline[aria-label]?
|
|
10
|
+
li.dk-component-timeline__item (any content: an eyebrow, a date, cards)
|
|
11
|
+
::before (the dot)
|
|
12
|
+
::after (the line to the next dot; not on the last)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## React
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Timeline } from '@karmo-co/drift-kit/react';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Component tokens
|
|
22
|
+
|
|
23
|
+
`--dk-component-timeline-color`, `--dk-component-timeline-dot-size`, `--dk-component-timeline-dot-offset`, `--dk-component-timeline-line-width`, `--dk-component-timeline-line-clearance`, `--dk-component-timeline-indent`, `--dk-component-timeline-item-gap`, `--dk-component-timeline-spacing`
|
|
@@ -6,7 +6,7 @@ The page's banner: the brand, an optional row of links, and what the page puts a
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
header.dk-component-top-bar[data-variant="glass"]?[data-sticky]?
|
|
9
|
+
header.dk-component-top-bar[data-variant="glass|transparent|flow"]?[data-sticky]?
|
|
10
10
|
div.__inner
|
|
11
11
|
a.__brand (a dk-component-logo)
|
|
12
12
|
nav.__links?
|
|
@@ -27,7 +27,7 @@ header.dk-component-top-bar[data-variant="glass"]?[data-sticky]?
|
|
|
27
27
|
| `data-phone` | (present or absent) |
|
|
28
28
|
| `data-scrolled` | (present or absent) |
|
|
29
29
|
| `data-sticky` | (present or absent) |
|
|
30
|
-
| `data-variant` | `glass`, `transparent` |
|
|
30
|
+
| `data-variant` | `flow`, `glass`, `transparent` |
|
|
31
31
|
| `data-width` | `full` |
|
|
32
32
|
|
|
33
33
|
## React
|
|
@@ -44,8 +44,10 @@ import { TopBar } from '@karmo-co/drift-kit/react';
|
|
|
44
44
|
| `links` | `TopBarLink[]` | |
|
|
45
45
|
| `linksLabel` | `string` | The links' landmark name, and the menu button's when they fold. |
|
|
46
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
|
-
| `
|
|
47
|
+
| `end` | `ReactNode` | Actions, the account: anything, at the end. In the flow bar, the close. |
|
|
48
|
+
| `start` | `ReactNode` | The flow bar (variant="flow"): a back button at the start (an icon button with aria-label="Back"; end's close takes aria-label="Close"), and a title or a Stepper centred on the bar, with or without a start. |
|
|
49
|
+
| `title` | `ReactNode` | |
|
|
50
|
+
| `variant` | `'solid' \| 'glass' \| 'transparent' \| 'flow'` | |
|
|
49
51
|
| `sticky` | `boolean` | |
|
|
50
52
|
| `hideOnScroll` | `boolean` | |
|
|
51
53
|
| `fullWidth` | `boolean` | No max width: the bar's contents run edge to edge. |
|
|
@@ -58,4 +60,4 @@ import { TopBar } from '@karmo-co/drift-kit/react';
|
|
|
58
60
|
|
|
59
61
|
## Component tokens
|
|
60
62
|
|
|
61
|
-
`--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`
|
|
63
|
+
`--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-flow-surface`, `--dk-component-top-bar-flow-border`, `--dk-component-top-bar-flow-padding-block`, `--dk-component-top-bar-flow-padding-inline`, `--dk-component-top-bar-flow-end-size`, `--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`
|
package/manifest/index.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "25.
|
|
4
|
-
"built": "2026-11-
|
|
3
|
+
"version": "25.7.0",
|
|
4
|
+
"built": "2026-11-10",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"id": "accordion",
|
|
@@ -273,6 +273,11 @@
|
|
|
273
273
|
"name": "Tile check",
|
|
274
274
|
"purpose": "The leading mark of a selectable row (a notification, a message, a document): its icon tile at rest, its checkbox once the row is being picked from, ticked once it is picked."
|
|
275
275
|
},
|
|
276
|
+
{
|
|
277
|
+
"id": "timeline",
|
|
278
|
+
"name": "Timeline",
|
|
279
|
+
"purpose": "Dated moments down a page (pick-up, then refresh, then return): a dot beside each, a line joining one dot to the next, and what happens at each moment beside its dot."
|
|
280
|
+
},
|
|
276
281
|
{
|
|
277
282
|
"id": "toast",
|
|
278
283
|
"name": "Toast",
|
|
@@ -1819,6 +1824,28 @@
|
|
|
1819
1824
|
"components": [],
|
|
1820
1825
|
"tokens": []
|
|
1821
1826
|
}
|
|
1827
|
+
},
|
|
1828
|
+
"25.6.0": {
|
|
1829
|
+
"added": {
|
|
1830
|
+
"components": [
|
|
1831
|
+
"timeline"
|
|
1832
|
+
],
|
|
1833
|
+
"tokens": []
|
|
1834
|
+
},
|
|
1835
|
+
"removed": {
|
|
1836
|
+
"components": [],
|
|
1837
|
+
"tokens": []
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1840
|
+
"25.7.0": {
|
|
1841
|
+
"added": {
|
|
1842
|
+
"components": [],
|
|
1843
|
+
"tokens": []
|
|
1844
|
+
},
|
|
1845
|
+
"removed": {
|
|
1846
|
+
"components": [],
|
|
1847
|
+
"tokens": []
|
|
1848
|
+
}
|
|
1822
1849
|
}
|
|
1823
1850
|
}
|
|
1824
1851
|
}
|
package/manifest/setup.md
CHANGED
|
@@ -49,6 +49,7 @@ Set on any element, a kit component's or a plain one.
|
|
|
49
49
|
| Attribute | What it does |
|
|
50
50
|
|---|---|
|
|
51
51
|
| `data-sticky` | On a Box or a plain section: stays at the top of what scrolls, in its own paint (`--dk-surface-current` as the element resolves it), at `z-index` `--dk-sticky-z-index` (5 when unset). `--dk-sticky-cover` opts into a cover of that height rising above it, set only where nothing sits above it in its scroller; `--dk-sticky-bleed` widens the cover past its sides. Top bar and Action bar keep their own `data-sticky`. |
|
|
52
|
+
| `data-reveal="hover"` | On an element inside a `[data-interactive]` row (the row's own action): transparent until the row is hovered or holds focus where the pointer is fine and hovers and none is coarse, always shown on a touch screen. It keeps its room, stays in the tab order and the accessibility tree (Tab onto it shows it) and takes no clicks while hidden. Tile check keeps its own meaning of the attribute. |
|
|
52
53
|
|
|
53
54
|
## Verify
|
|
54
55
|
|
|
@@ -67,47 +68,47 @@ Both scripts are deferred, and an icon script goes after `components.js`, which
|
|
|
67
68
|
|
|
68
69
|
```html
|
|
69
70
|
<!-- in the head -->
|
|
70
|
-
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.
|
|
71
|
-
<script src="https://storage.googleapis.com/drift-kit-public/25.
|
|
72
|
-
<script src="https://storage.googleapis.com/drift-kit-public/25.
|
|
71
|
+
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.7.0/drift-kit.css" integrity="sha384-yIcruPPY0SZY8L4hvjBK9hLx/wrYBcKeL9Qd0D6luvnbBPo1JCMo/2DIjKAQVpZr" crossorigin="anonymous" />
|
|
72
|
+
<script src="https://storage.googleapis.com/drift-kit-public/25.7.0/components.js" integrity="sha384-ohIBRwGMj4F4dqWELA2MY0XPdpBPLa3Zp+bo5KYM5U5/8CZefnnm584U8oFPdat3" crossorigin="anonymous" defer></script>
|
|
73
|
+
<script src="https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-<set>.js" integrity="<its integrity>" crossorigin="anonymous" defer></script>
|
|
73
74
|
<!-- the attributes go on the body -->
|
|
74
75
|
<body data-brand="karmo" data-theme="light">
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
| File | Address | Integrity |
|
|
78
79
|
|---|---|---|
|
|
79
|
-
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
80
|
-
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
81
|
-
| `components.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
82
|
-
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
83
|
-
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
84
|
-
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
85
|
-
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
86
|
-
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
87
|
-
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
88
|
-
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
80
|
+
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-kit.css` | `sha384-yIcruPPY0SZY8L4hvjBK9hLx/wrYBcKeL9Qd0D6luvnbBPo1JCMo/2DIjKAQVpZr` |
|
|
81
|
+
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-kit.min.css` | `sha384-2cEzMdltjqrISOHkNdmOA2lkwLEOzR9y1v4QIFagdP+KxB1Rqf8EqRl6R8apTbwe` |
|
|
82
|
+
| `components.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/components.js` | `sha384-ohIBRwGMj4F4dqWELA2MY0XPdpBPLa3Zp+bo5KYM5U5/8CZefnnm584U8oFPdat3` |
|
|
83
|
+
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
|
|
84
|
+
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
|
|
85
|
+
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
|
|
86
|
+
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
|
|
87
|
+
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
|
|
88
|
+
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
|
|
89
|
+
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/25.7.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
|
|
89
90
|
|
|
90
91
|
### In Claude chat and Cowork
|
|
91
92
|
|
|
92
93
|
Their previews load nothing from the bucket. There, link the same version from jsdelivr instead, with these addresses and integrity: the stylesheet is `drift-kit.min.css`, and the attributes still go on `<body>`.
|
|
93
94
|
|
|
94
95
|
```html
|
|
95
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
96
|
-
<script src="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
96
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-kit.min.css" integrity="sha384-2cEzMdltjqrISOHkNdmOA2lkwLEOzR9y1v4QIFagdP+KxB1Rqf8EqRl6R8apTbwe" crossorigin="anonymous" />
|
|
97
|
+
<script src="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/components.js" integrity="sha384-EkxpP8foDxi+64liYemlkT26UWaZ9+OR6MVJ+bsxZJ9JFermGICWgHTTsHidIKtE" crossorigin="anonymous" defer></script>
|
|
97
98
|
```
|
|
98
99
|
|
|
99
100
|
| File | Address | Integrity |
|
|
100
101
|
|---|---|---|
|
|
101
|
-
| `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
102
|
-
| `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
103
|
-
| `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
104
|
-
| `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
105
|
-
| `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
106
|
-
| `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
107
|
-
| `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
108
|
-
| `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
109
|
-
| `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
110
|
-
| `drift-kit.min.css` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
102
|
+
| `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/components.js` | `sha384-EkxpP8foDxi+64liYemlkT26UWaZ9+OR6MVJ+bsxZJ9JFermGICWgHTTsHidIKtE` |
|
|
103
|
+
| `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-data-countries.js` | `sha384-GttgZnsRDPioKDxlsEyQtUqCwO0ObYYdjdjKBBt9LWThZld3OnUBnZ9EScI41qIf` |
|
|
104
|
+
| `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
|
|
105
|
+
| `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
|
|
106
|
+
| `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
|
|
107
|
+
| `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
|
|
108
|
+
| `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
|
|
109
|
+
| `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
|
|
110
|
+
| `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
|
|
111
|
+
| `drift-kit.min.css` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.7.0/drift-kit.min.css` | `sha384-2cEzMdltjqrISOHkNdmOA2lkwLEOzR9y1v4QIFagdP+KxB1Rqf8EqRl6R8apTbwe` |
|
|
111
112
|
|
|
112
113
|
### Integrity for 23.4.0
|
|
113
114
|
|
|
@@ -132,12 +133,12 @@ The behaviour script initialises every component on the page when it loads. Mark
|
|
|
132
133
|
|
|
133
134
|
## Theme from the address
|
|
134
135
|
|
|
135
|
-
`data-theme-from="url"` on `<body>` makes the behaviour script read `?theme=light` or `?theme=dark` from the address and write it as
|
|
136
|
+
`data-theme-from="url"` on `<body>` (or `<html>`, which writes the body's theme as well, since the body's own `data-theme` would otherwise win) makes the behaviour script read `?theme=light` or `?theme=dark` from the address and write it as `data-theme` when the page loads; any other value, or none, leaves the page's own theme. Load `components.js` (or `kit/theme.js`) in `<head>` and the theme is on the body as it is parsed, before anything in it paints. A `[data-theme-toggle]` element flips the nearest `[data-theme-from]` element between the two on click; one that is not a button or a link is given `role="button"` and a tab stop, and Enter and Space flip it (`dk.theme.init(scope)` for one added later). `dk.theme.set(el, 'light' | 'dark')` sets one from script.
|
|
136
137
|
|
|
137
138
|
## Capture selectors
|
|
138
139
|
|
|
139
140
|
The kit class names the drift-critique capture script keys on, at this version. Pass them to it as `--kit '<this JSON>'` so its alignment and reduced-motion checks read this version's names.
|
|
140
141
|
|
|
141
142
|
```json
|
|
142
|
-
{"version":"25.
|
|
143
|
+
{"version":"25.7.0","field":".dk-component-input__field","trigger":".dk-component-select__trigger","button":".dk-component-button","iconButton":".dk-component-icon-button","spinners":[".dk-component-loading-spinner",".dk-component-button__spinner"],"componentPrefix":"dk-component-","fieldRoot":"dk-component-input"}
|
|
143
144
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karmo-co/drift-kit-reference",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.7.0",
|
|
4
4
|
"description": "Reference documentation of Karmo's private Drift design system, for Karmo's Claude skills. Documentation only.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"drift-kit-ref": "bin/drift-kit-ref.js"
|