@karmo-co/drift-kit-reference 23.5.1 → 23.6.1
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/app-shell.md +1 -1
- package/manifest/components/avatar.md +4 -3
- package/manifest/components/dropdown.md +6 -1
- package/manifest/components/icon-button.md +7 -1
- package/manifest/components/loading-spinner.md +1 -0
- package/manifest/components/modal.md +10 -1
- package/manifest/components/select.md +7 -0
- package/manifest/components/sidebar.md +9 -5
- package/manifest/components/stepper.md +2 -2
- package/manifest/components/toast.md +2 -0
- package/manifest/index.json +22 -2
- package/manifest/setup.md +44 -13
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ import { AppShell } from '@karmo-co/drift-kit/react';
|
|
|
35
35
|
| `topBar` | `ReactNode` | A Top bar, usually sticky. |
|
|
36
36
|
| `actionBar` | `ReactNode` | An Action bar, usually sticky. |
|
|
37
37
|
| `children` | `ReactNode` | The page. |
|
|
38
|
-
| `contained` | `boolean` | Fill the parent's box instead of the viewport: the main column scrolls and the phone bar stays in the frame. |
|
|
38
|
+
| `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
39
|
| `className` | `string` | |
|
|
40
40
|
|
|
41
41
|
## Component tokens
|
|
@@ -6,9 +6,9 @@ A person, as their photo or their initials: the photo fades in once it has loade
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
span.dk-component-avatar[data-name][data-size="24|40|48"]?[data-variant="solid"]?[data-hue]?
|
|
9
|
+
span.dk-component-avatar[data-name][data-size="24|40|48|<px>"]?[data-variant="solid"]?[data-hue]?
|
|
10
10
|
img? (the photo; the runtime sets data-loaded)
|
|
11
|
-
span.__initials (written by the runtime from data-name)
|
|
11
|
+
span.__initials (written by the runtime from data-name, unless written in it)
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Attributes
|
|
@@ -29,8 +29,9 @@ import { Avatar } from '@karmo-co/drift-kit/react';
|
|
|
29
29
|
| Prop | Type | Notes |
|
|
30
30
|
|---|---|---|
|
|
31
31
|
| `name` (required) | `string` | Whose it is: the initials come from it ("Ada Lovelace" is AL). |
|
|
32
|
+
| `initials` | `string` | The initials to draw, when the product has them already (a record's, or a name that does not split the usual way). Worked out from name when absent. |
|
|
32
33
|
| `src` | `string` | A photo. Until it decodes, and if it fails, the initials show. |
|
|
33
|
-
| `size` | `
|
|
34
|
+
| `size` | `AvatarSize \| number` | 32 when absent. 24, 40 or 48, or any other number of pixels: the avatar is drawn at that size, its initials a quarter of it plus 4px (the step the named sizes follow, so 64 has 20px initials). |
|
|
34
35
|
| `hue` | `AvatarHue` | A category colour instead of primary, to tell people apart without photos. |
|
|
35
36
|
| `variant` | `'subtle' \| 'solid'` | Subtle when absent. |
|
|
36
37
|
| `label` | `string` | A name for a screen reader, for an avatar that stands on its own. Without one it is decorative: the name is usually written beside it. |
|
|
@@ -9,7 +9,8 @@ A menu of commands hanging off a trigger. Select's surface, a menu's semantics:
|
|
|
9
9
|
div.dk-component-dropdown
|
|
10
10
|
button.dk-component-dropdown__trigger (aria-haspopup="menu")
|
|
11
11
|
div.dk-component-menu.dk-component-dropdown__menu (role="menu", portalled)
|
|
12
|
-
span.dk-component-dropdown__label
|
|
12
|
+
span|div.dk-component-dropdown__label (optional heading: a span for
|
|
13
|
+
words, a div for an element)
|
|
13
14
|
button|a.dk-component-dropdown__item (role="menuitem"
|
|
14
15
|
span.dk-component-dropdown__item-icon | "menuitemradio"
|
|
15
16
|
span.dk-component-dropdown__item-label | "menuitemcheckbox")
|
|
@@ -44,6 +45,10 @@ import { Dropdown } from '@karmo-co/drift-kit/react';
|
|
|
44
45
|
| `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | Where the menu opens, in dk.position's vocabulary. Below and start-aligned by default. |
|
|
45
46
|
| `align` | `'start' \| 'center' \| 'end'` | |
|
|
46
47
|
| `sheet` | `'auto' \| 'always' \| 'never'` | How it presents on a phone: a bottom sheet below the mobile breakpoint by default; 'never' for a menu already inside a sheet; 'always' to force it. |
|
|
48
|
+
| `exact` | `boolean` | Place the menu exactly where it was asked, to the fraction of a pixel, never flipped or slid on screen (a page drawing a wireframe). |
|
|
49
|
+
| `container` | `MenuContainer` | Where the menu opens instead of <body>: an element, or a function asked at each opening. It must be positioned; the menu is absolute in it. |
|
|
50
|
+
| `position` | `'anchor' \| 'css'` | 'css' (23 Oct 2026): the stylesheet places the menu, not its trigger. Nothing inline but its position (fixed, or absolute in a container), so a rule on menuClassName must say where, for example .my-menu { bottom: 72px; left: 16px; } for an account menu above a bar. With no such rule it sits at its static position, and the runtime warns once in the console. 'anchor', beside the trigger, when absent. |
|
|
51
|
+
| `menuClassName` | `string` | A class of the caller's on the menu itself, which is portalled out of the root and so out of reach of any selector through it. |
|
|
47
52
|
| `onSelect` | `(value: string \| undefined, item: HTMLElement) => void` | Any item chosen: its value (undefined for one without) and the element. |
|
|
48
53
|
| `className` | `string` | |
|
|
49
54
|
|
|
@@ -6,8 +6,12 @@ A button whose whole label is its icon. Same rungs as Button, so the two line up
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
button.dk-component-icon-button[data-variant="subtle|ghost|plain|raised"]?[data-size="extra-small|small|medium|large"]?[aria-label][aria-pressed]?[data-pressed-glyph="fill"]?
|
|
9
|
+
button.dk-component-icon-button[data-variant="subtle|ghost|plain|raised"]?[data-status="primary"]?[data-size="extra-small|small|medium|large"]?[aria-label][aria-pressed]?[data-pressed-glyph="fill"]?
|
|
10
10
|
svg | i.dk-component-icon (the glyph)
|
|
11
|
+
span.__label[hidden]? (optional; when present, hidden is
|
|
12
|
+
required: words beside the glyph, drawn
|
|
13
|
+
by the fidelity looks on a desktop only,
|
|
14
|
+
which override [hidden] on purpose)
|
|
11
15
|
span.__spinner? (while .is-loading)
|
|
12
16
|
```
|
|
13
17
|
|
|
@@ -35,6 +39,8 @@ import { IconButton } from '@karmo-co/drift-kit/react';
|
|
|
35
39
|
| `size` | `'extra-small' \| 'small' \| 'medium' \| 'large'` | medium when absent. small, medium and large are Button's rungs and land on its heights, so the two line up in a row. |
|
|
36
40
|
| `loading` | `boolean` | Button's loading state: a spinner in place of the glyph, aria-busy and aria-disabled, still focusable, clicks and Enter/Space blocked. |
|
|
37
41
|
| `pressedGlyph` | `'fill'` | With aria-pressed: fill the glyph when on. For closed glyphs only (a heart, a star, a bookmark); a line glyph would fill to a blob. |
|
|
42
|
+
| `status` | `'primary'` | The main action of a toolbar or a row, filled. Drawn by the wireframe and mid-fi looks (filled with the ink); the full look has not designed it yet and draws the variant. |
|
|
43
|
+
| `label` | `ReactNode` | Words beside the glyph, where a look draws them: the wireframe and mid-fi looks on a desktop. Hidden everywhere else, the full look included (not designed yet), so the button stays a square there. Never its name: aria-label still names it. |
|
|
38
44
|
|
|
39
45
|
## Component tokens
|
|
40
46
|
|
|
@@ -36,6 +36,7 @@ import { LoadingSpinner } from '@karmo-co/drift-kit/react';
|
|
|
36
36
|
| `label` | `string` | |
|
|
37
37
|
| `message` | `string` | Text under the spinner, "Loading reports". It is also the accessible name unless label is given. |
|
|
38
38
|
| `brand` | `LogoBrand` | |
|
|
39
|
+
| `as` | `'div' \| 'span'` | 'span' (23 Oct 2026) for a spinner where a div is not allowed: inside a button, in its icon slot. The stylesheet draws both the same. |
|
|
39
40
|
|
|
40
41
|
## Component tokens
|
|
41
42
|
|
|
@@ -40,13 +40,22 @@ import { Modal } from '@karmo-co/drift-kit/react';
|
|
|
40
40
|
| `sheet` | `'auto' \| 'always' \| 'never'` | |
|
|
41
41
|
| `dismissible` | `boolean` | false: it has to be answered; Escape and the backdrop are both refused. |
|
|
42
42
|
| `backdropDismiss` | `boolean` | false keeps Escape and refuses a click beside it, for a form. |
|
|
43
|
-
| `initialFocus` | `string` | A selector inside the box to focus on open. |
|
|
43
|
+
| `initialFocus` | `string \| false` | A selector inside the box to focus on open. false: nothing is focused on open (no ring at rest, the page keeps its focus), and nothing is given back on close unless the keyboard went in. |
|
|
44
44
|
| `title` | `ReactNode` | |
|
|
45
45
|
| `icon` | `ReactNode` | |
|
|
46
46
|
| `footer` | `ReactNode` | |
|
|
47
47
|
| `showClose` | `boolean` | The header's cross. On unless dismissible is false. |
|
|
48
48
|
| `closeLabel` | `string` | |
|
|
49
49
|
| `children` | `ReactNode` | |
|
|
50
|
+
| `container` | `Element \| null \| (() => Element \| null)` | Where the overlay renders instead of <body>: an element, or a function asked once it mounts. The overlay is then data-contained, absolute in it (the container must be positioned), and only the container's own content goes inert behind it. <body> (or nothing) is no container. |
|
|
51
|
+
| `variant` | `'side' \| 'bare'` | 'side': a full-height panel on the inline end. 'bare': a lightbox, no box chrome. data-variant on the overlay; drawn by the fidelity looks only for now (the full look draws them as the dialog). |
|
|
52
|
+
| `header` | `ReactNode` | Replaces the header's icon, title and cross with your own row. Name its title with labelledBy. |
|
|
53
|
+
| `labelledBy` | `string` | |
|
|
54
|
+
| `classNames` | `{ overlay?: string; header?: string; body?: string; footer?: string }` | Classes for the parts the box's className does not reach. |
|
|
55
|
+
| `scrollLock` | `boolean` | Default true. false leaves <html>'s overflow alone: a contained dialog has no page to hold still. |
|
|
56
|
+
| `swapKey` | `string \| number` | Changing it while open swaps: the box plays its exit with the old content (data-swapping on the overlay), then the new content comes in and the box plays its enter; the backdrop never leaves. |
|
|
57
|
+
| `onExited` | `() => void` | After the exit has played, for EVERY close (by open or by the dialog), unlike onClose. Not on unmount. |
|
|
58
|
+
| `onDismiss` | `(how: ModalDismissReason) => void` | Given, the dialog never closes itself: Escape, a click beside the box and the cross call this, and the parent closes it by setting open to false. onClose is then never called. |
|
|
50
59
|
|
|
51
60
|
## Component tokens
|
|
52
61
|
|
|
@@ -90,6 +90,13 @@ import { Select } from '@karmo-co/drift-kit/react';
|
|
|
90
90
|
| `sheet` | `'auto' \| 'always' \| 'never'` | How the menu presents itself on a phone. 'auto', the default, is a bottom sheet below the kit's mobile breakpoint and a dropdown above it. 'never' opts out, for a select inside something that is already a sheet or a full-screen modal. 'always' forces the sheet at any width, which is how the documentation shows it on a desktop. |
|
|
91
91
|
| `layout` | `'list' \| 'grid'` | 'grid' lays the options out as cards in a wider popup, for options that are pictures (VehicleSelect). Up and down move a row, left and right a card. |
|
|
92
92
|
| `appearance` | `'field' \| 'sentence'` | 'sentence' sets the trigger inside a line of text, the value in bold primary ("Every [Monday] of each week"). Name it with label (kept, not shown) or aria-label. |
|
|
93
|
+
| `align` | `'start' \| 'end'` | Which edge of the trigger the menu lines up with. |
|
|
94
|
+
| `menuMinWidth` | `number` | A floor for the menu's width, in px, beside the trigger's own width: the menu is as wide as the wider of the two, or its content. |
|
|
95
|
+
| `exact` | `boolean` | Place the menu exactly where it was asked, to the fraction of a pixel, never flipped above the trigger or slid along the screen. For a page drawing something else's layout (a wireframe); a product wants the default, which keeps a menu on screen. |
|
|
96
|
+
| `container` | `MenuContainer` | Where the menu opens instead of <body> (see MenuContainer). |
|
|
97
|
+
| `searchIcon` | `string` | The search field's glyph, as raw markup like an option's icon. |
|
|
98
|
+
| `searchFocus` | `boolean` | false: opening leaves focus on the trigger instead of moving it into the search field (a desktop's default); Tab from the trigger then goes into the field instead of closing. |
|
|
99
|
+
| `countLabel` | `(count: number) => string` | multiple only: the trigger says how many are chosen in these words instead of holding a chip per value ("3 subscriptions selected"). |
|
|
93
100
|
| `className` | `string` | |
|
|
94
101
|
| `id` | `string` | |
|
|
95
102
|
| `'aria-label'` | `string` | |
|
|
@@ -7,12 +7,16 @@ An app's main navigation. A rail on a desktop that collapses to its glyphs, and
|
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
9
|
nav.dk-component-sidebar[data-collapsed]?
|
|
10
|
-
div.__head > a.__brand > span.__mark + span.__wordmark
|
|
10
|
+
div.__head > a|div.__brand > span.__mark + span.__wordmark
|
|
11
|
+
(a div when the brand goes nowhere: named by its wordmark, or
|
|
12
|
+
role="img" with aria-label when it has none)
|
|
11
13
|
div.__body
|
|
12
14
|
div.__section > span.__heading? + ul.__list > a|button.__item[aria-current]?
|
|
13
15
|
div.__foot
|
|
14
16
|
ul.__list > button.__item.__toggle
|
|
15
|
-
div.dk-component-dropdown.__account > button.__user
|
|
17
|
+
div.dk-component-dropdown.__account > button.__user
|
|
18
|
+
> span.__icon[data-bar-icon]? + an avatar + __user-text
|
|
19
|
+
(the glyph shows in place of the avatar on a phone bar only)
|
|
16
20
|
```
|
|
17
21
|
|
|
18
22
|
## Attributes
|
|
@@ -46,11 +50,11 @@ import { Sidebar } from '@karmo-co/drift-kit/react';
|
|
|
46
50
|
|---|---|---|
|
|
47
51
|
| `'aria-label'` | `string` | |
|
|
48
52
|
| `id` | `string` | |
|
|
49
|
-
| `brand` | `{ mark: ReactNode; wordmark?: ReactNode; href?: string; label?: string }` |
|
|
53
|
+
| `brand` | `{ mark: ReactNode; wordmark?: ReactNode; href?: string \| null; label?: string }` | href null (23 Oct 2026): a brand that goes nowhere, not a link. |
|
|
50
54
|
| `sections` (required) | `SidebarSection[]` | |
|
|
51
55
|
| `panel` | `SidebarPanel` | Nested: the current section's pages in a panel beside the rail. Mark the section's own row current: 'section'. |
|
|
52
56
|
| `footer` | `SidebarItem[]` | Utilities above the user row: Settings, Help. On a phone bar they are in More. |
|
|
53
|
-
| `user` | `SidebarUser` |
|
|
57
|
+
| `user` | `SidebarUser` | The account row: name, meta, avatar, barLabel, menu and onSelect; barIcon (a glyph in place of the avatar on a phone bar), menuHeader (the menu opens with this row and a rule), and sheet, container and position, passed to the account menu's Dropdown. |
|
|
54
58
|
| `collapsible` | `boolean` | A collapse toggle in the foot. On by default. |
|
|
55
59
|
| `collapsed` | `boolean` | |
|
|
56
60
|
| `defaultCollapsed` | `boolean` | |
|
|
@@ -59,7 +63,7 @@ import { Sidebar } from '@karmo-co/drift-kit/react';
|
|
|
59
63
|
| `variant` | `'docked' \| 'floating'` | |
|
|
60
64
|
| `size` | `'medium' \| 'small'` | 'small' steps everything down for an app that needs the room. Medium when absent. |
|
|
61
65
|
| `phone` | `'bar' \| 'drawer' \| 'rail'` | |
|
|
62
|
-
| `device` | `'auto' \| 'phone' \| 'desktop'` | Force a presentation regardless of the screen, as the docs do. |
|
|
66
|
+
| `device` | `'auto' \| 'phone' \| 'tablet' \| 'desktop'` | Force a presentation regardless of the screen, as the docs do. |
|
|
63
67
|
| `motion` | `'rise' \| 'simple'` | 'simple' skips the letters' rise: the labels fade. |
|
|
64
68
|
| `panelEnter` | `boolean` | Play the panel's opening on mount, not only when a panel arrives later. The page knows how it was reached; the Sidebar does not. |
|
|
65
69
|
| `moreLabel` | `string` | |
|
|
@@ -36,7 +36,7 @@ import { Stepper } from '@karmo-co/drift-kit/react';
|
|
|
36
36
|
| Prop | Type | Notes |
|
|
37
37
|
|---|---|---|
|
|
38
38
|
| `steps` (required) | `StepperStep[]` | |
|
|
39
|
-
| `current` (required) | `number` | The current step's index. Controlled: the stepper shows what you pass. |
|
|
39
|
+
| `current` (required) | `number` | The current step's index. Controlled: the stepper shows what you pass. steps.length (or more, which clamps to it) is a finished flow: every step complete, none current. |
|
|
40
40
|
| `variant` | `'numbered' \| 'dots' \| 'segments' \| 'inline'` | |
|
|
41
41
|
| `orientation` | `'horizontal' \| 'vertical'` | |
|
|
42
42
|
| `narrowOrientation` | `'vertical'` | 'vertical' turns the stepper vertical while it is narrow (a phone), so every step keeps its label; it goes back to orientation when wide. Without it a narrow stepper stays horizontal and shows only the current label. |
|
|
@@ -44,7 +44,7 @@ import { Stepper } from '@karmo-co/drift-kit/react';
|
|
|
44
44
|
| `size` | `'small' \| 'medium' \| 'large'` | |
|
|
45
45
|
| `onStepClick` | `(index: number) => void` | Makes completed steps buttons. You decide whether to go back, and pass the new current. |
|
|
46
46
|
| `free` | `boolean` | Every step is reachable, not only the completed ones. |
|
|
47
|
-
| `onChange` | `(index: number) => void` | After the current step changes (announced to screen readers). |
|
|
47
|
+
| `onChange` | `(index: number) => void` | After the current step changes (announced to screen readers). The index is steps.length when the flow finishes: there is no steps[index] then. |
|
|
48
48
|
| `'aria-label'` (required) | `string` | |
|
|
49
49
|
| `className` | `string` | |
|
|
50
50
|
|
|
@@ -45,6 +45,8 @@ toast.show({ /* options */ });
|
|
|
45
45
|
| `counter` | `boolean` | |
|
|
46
46
|
| `duration` | `number` | ms before it closes itself; 0 keeps it. |
|
|
47
47
|
| `replace` | `boolean` | |
|
|
48
|
+
| `container` | `Element \| null \| (() => Element \| null)` | Where the region lives instead of <body> (23 Oct 2026): an element, or a function asked at each show. The region is absolute in it (the container must be positioned), one per container and placement, and replace reaches only that container's. <body> is no container. |
|
|
49
|
+
| `className` | `string` | A class of the caller's on the toast itself. |
|
|
48
50
|
| `onClose` | `() => void` | |
|
|
49
51
|
|
|
50
52
|
## Component tokens
|
package/manifest/index.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "23.
|
|
4
|
-
"built": "2026-10-
|
|
3
|
+
"version": "23.6.1",
|
|
4
|
+
"built": "2026-10-27",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"id": "accordion",
|
|
@@ -1175,6 +1175,26 @@
|
|
|
1175
1175
|
"components": [],
|
|
1176
1176
|
"tokens": []
|
|
1177
1177
|
}
|
|
1178
|
+
},
|
|
1179
|
+
"23.6.0": {
|
|
1180
|
+
"added": {
|
|
1181
|
+
"components": [],
|
|
1182
|
+
"tokens": []
|
|
1183
|
+
},
|
|
1184
|
+
"removed": {
|
|
1185
|
+
"components": [],
|
|
1186
|
+
"tokens": []
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
"23.6.1": {
|
|
1190
|
+
"added": {
|
|
1191
|
+
"components": [],
|
|
1192
|
+
"tokens": []
|
|
1193
|
+
},
|
|
1194
|
+
"removed": {
|
|
1195
|
+
"components": [],
|
|
1196
|
+
"tokens": []
|
|
1197
|
+
}
|
|
1178
1198
|
}
|
|
1179
1199
|
}
|
|
1180
1200
|
}
|
package/manifest/setup.md
CHANGED
|
@@ -26,6 +26,8 @@ Installed as `@karmo-co/drift-kit` from GitHub Packages.
|
|
|
26
26
|
| `data-border-radius` | `bubbly`, `normal`, `sharp` |
|
|
27
27
|
| `data-border-width` | `medium`, `thick`, `thin` |
|
|
28
28
|
| `data-density` | `normal`, `spacious`, `tight` |
|
|
29
|
+
| `data-fidelity` | `midfi`, `wireframe` |
|
|
30
|
+
| `data-device` | `desktop`, `phone`, `tablet` |
|
|
29
31
|
|
|
30
32
|
## Container attributes
|
|
31
33
|
|
|
@@ -51,20 +53,49 @@ A page with no npm install (a plain HTML prototype, a slide deck) links this ver
|
|
|
51
53
|
Both scripts are deferred, and an icon script goes after `components.js`, which replaces the icon registry when it runs: an icon script that runs first loses its set. Every tag carries its file's `integrity` from the table below and `crossorigin="anonymous"`, so a file whose bytes changed never loads. In this order:
|
|
52
54
|
|
|
53
55
|
```html
|
|
54
|
-
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/23.
|
|
55
|
-
<script src="https://storage.googleapis.com/drift-kit-public/23.
|
|
56
|
-
<script src="https://storage.googleapis.com/drift-kit-public/23.
|
|
56
|
+
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/23.6.1/drift-kit.css" integrity="sha384-1KPdwoNY8dP62q3PAuFek/7F1iVJ9sIwaJeC9MDps2mrQur7Gy5ZQnhgfNB2kNZ1" crossorigin="anonymous" />
|
|
57
|
+
<script src="https://storage.googleapis.com/drift-kit-public/23.6.1/components.js" integrity="sha384-a+GsziEadZEo+OKihZJEql+BAhCXddJegWhdZHn1n/6Pkm5QlC6UacG6MFomUc/R" crossorigin="anonymous" defer></script>
|
|
58
|
+
<script src="https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-<set>.js" integrity="<its integrity>" crossorigin="anonymous" defer></script>
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
| File | Address | Integrity |
|
|
60
62
|
|---|---|---|
|
|
61
|
-
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
62
|
-
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
63
|
-
| `components.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
64
|
-
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
65
|
-
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
66
|
-
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
67
|
-
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
68
|
-
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
69
|
-
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
70
|
-
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/23.
|
|
63
|
+
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-kit.css` | `sha384-1KPdwoNY8dP62q3PAuFek/7F1iVJ9sIwaJeC9MDps2mrQur7Gy5ZQnhgfNB2kNZ1` |
|
|
64
|
+
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-kit.min.css` | `sha384-q9dPWOz0cXKAeg10Ng/hhdulQGlWIIFpMWfW0e+CTbn8lqMeTD0iiZ7JfDxGimYG` |
|
|
65
|
+
| `components.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/components.js` | `sha384-a+GsziEadZEo+OKihZJEql+BAhCXddJegWhdZHn1n/6Pkm5QlC6UacG6MFomUc/R` |
|
|
66
|
+
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
|
|
67
|
+
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-coolicon.js` | `sha384-8WaBw9LZuhj/u7G2Jf1aiVo8HBhMj1fBsmpSWJnYi5Xdi2ANXB3BLBZxz2NLQGYl` |
|
|
68
|
+
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
|
|
69
|
+
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
|
|
70
|
+
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
|
|
71
|
+
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-lucide.js` | `sha384-yEy9LdLbPCXUy577fmNq4loJ2G9AQ1InAW54iozwnVfe8KIK6gVe2227eaNmxFi1` |
|
|
72
|
+
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/23.6.1/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
|
|
73
|
+
|
|
74
|
+
### Integrity for 23.4.0
|
|
75
|
+
|
|
76
|
+
A page pinned to 23.4.0 keeps its version in each address and takes the integrity from here.
|
|
77
|
+
|
|
78
|
+
| File | Address | Integrity |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `components.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/components.js` | `sha384-B4tUaUMgOQoy7IlJk4qIR/JkIveajIbA8j13603GVhfIJznbT21dw0rRnzYI4QXK` |
|
|
81
|
+
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
|
|
82
|
+
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-coolicon.js` | `sha384-8WaBw9LZuhj/u7G2Jf1aiVo8HBhMj1fBsmpSWJnYi5Xdi2ANXB3BLBZxz2NLQGYl` |
|
|
83
|
+
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
|
|
84
|
+
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
|
|
85
|
+
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
|
|
86
|
+
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-lucide.js` | `sha384-yEy9LdLbPCXUy577fmNq4loJ2G9AQ1InAW54iozwnVfe8KIK6gVe2227eaNmxFi1` |
|
|
87
|
+
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
|
|
88
|
+
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-kit.css` | `sha384-0Roll8sSBP0mENc86ioKN/hPpYfcI8oBtsSeWRdshsf6S7N8Rsp2VnVd2JYmtaU7` |
|
|
89
|
+
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/23.4.0/drift-kit.min.css` | `sha384-CLIu21rr62tKaYFC7EFgQr8Wgmy8rbc318n5NzVmWeViqgsTiNx/gF2fGCoM8GAt` |
|
|
90
|
+
|
|
91
|
+
## Behaviour script
|
|
92
|
+
|
|
93
|
+
The behaviour script initialises every component on the page when it loads. Markup inserted later is initialised with `dk.component.<name>.init(scope)`, where `<name>` is the component id in camel case (`actionBar` for `action-bar`) and `scope` is the inserted element. React components carry their own behaviour and never need it.
|
|
94
|
+
|
|
95
|
+
## Capture selectors
|
|
96
|
+
|
|
97
|
+
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.
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{"version":"23.6.1","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"}
|
|
101
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karmo-co/drift-kit-reference",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.6.1",
|
|
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"
|