@karmo-co/drift-kit-reference 25.6.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.
|
@@ -14,7 +14,8 @@ div.dk-component-app-shell[data-contained]?[data-presentation="bar|drawer"]?
|
|
|
14
14
|
div.dk-component-action-bar? (its own component)
|
|
15
15
|
div.dk-component-action-bar[data-layout="fill"]? (a flow's footer, the shell's own child: spans the
|
|
16
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
|
|
17
|
+
when contained, above a phone bar; the page leaves room for it;
|
|
18
|
+
React `footer`)
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
## Attributes
|
|
@@ -37,7 +38,8 @@ import { AppShell } from '@karmo-co/drift-kit/react';
|
|
|
37
38
|
|---|---|---|
|
|
38
39
|
| `sidebar` | `ReactNode` | A Sidebar. |
|
|
39
40
|
| `topBar` | `ReactNode` | A Top bar, usually sticky. |
|
|
40
|
-
| `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). |
|
|
41
43
|
| `children` | `ReactNode` | The page. |
|
|
42
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. |
|
|
43
45
|
| `className` | `string` | |
|
|
@@ -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
|
|
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",
|
|
@@ -1836,6 +1836,16 @@
|
|
|
1836
1836
|
"components": [],
|
|
1837
1837
|
"tokens": []
|
|
1838
1838
|
}
|
|
1839
|
+
},
|
|
1840
|
+
"25.7.0": {
|
|
1841
|
+
"added": {
|
|
1842
|
+
"components": [],
|
|
1843
|
+
"tokens": []
|
|
1844
|
+
},
|
|
1845
|
+
"removed": {
|
|
1846
|
+
"components": [],
|
|
1847
|
+
"tokens": []
|
|
1848
|
+
}
|
|
1839
1849
|
}
|
|
1840
1850
|
}
|
|
1841
1851
|
}
|
package/manifest/setup.md
CHANGED
|
@@ -68,47 +68,47 @@ Both scripts are deferred, and an icon script goes after `components.js`, which
|
|
|
68
68
|
|
|
69
69
|
```html
|
|
70
70
|
<!-- in the head -->
|
|
71
|
-
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.
|
|
72
|
-
<script src="https://storage.googleapis.com/drift-kit-public/25.
|
|
73
|
-
<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>
|
|
74
74
|
<!-- the attributes go on the body -->
|
|
75
75
|
<body data-brand="karmo" data-theme="light">
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
| File | Address | Integrity |
|
|
79
79
|
|---|---|---|
|
|
80
|
-
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
81
|
-
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
82
|
-
| `components.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
83
|
-
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
84
|
-
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
85
|
-
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
86
|
-
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
87
|
-
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
88
|
-
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
89
|
-
| `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` |
|
|
90
90
|
|
|
91
91
|
### In Claude chat and Cowork
|
|
92
92
|
|
|
93
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>`.
|
|
94
94
|
|
|
95
95
|
```html
|
|
96
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
97
|
-
<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>
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
| File | Address | Integrity |
|
|
101
101
|
|---|---|---|
|
|
102
|
-
| `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
103
|
-
| `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
104
|
-
| `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
105
|
-
| `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
106
|
-
| `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
107
|
-
| `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
108
|
-
| `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
109
|
-
| `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
110
|
-
| `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
111
|
-
| `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` |
|
|
112
112
|
|
|
113
113
|
### Integrity for 23.4.0
|
|
114
114
|
|
|
@@ -133,12 +133,12 @@ The behaviour script initialises every component on the page when it loads. Mark
|
|
|
133
133
|
|
|
134
134
|
## Theme from the address
|
|
135
135
|
|
|
136
|
-
`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.
|
|
137
137
|
|
|
138
138
|
## Capture selectors
|
|
139
139
|
|
|
140
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.
|
|
141
141
|
|
|
142
142
|
```json
|
|
143
|
-
{"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"}
|
|
144
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"
|