@kerfjs/ui 5.0.0-beta.122 → 5.0.0-beta.123
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/ai/component-catalog.json +3 -6
- package/ai/component-composition.json +0 -2
- package/ai/components/README.md +1 -1
- package/ai/components/tabs.md +3 -4
- package/ai/public-api-signatures-v1.md +3 -6
- package/ai/skill.md +3 -3
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/{chunk-BSNKDW4X.js → chunk-ROEBKSIY.js} +1 -4
- package/dist/chunk-ROEBKSIY.js.map +1 -0
- package/dist/{chunk-HJWFHJ3Z.js → chunk-WPP5Q4A5.js} +10 -82
- package/dist/chunk-WPP5Q4A5.js.map +1 -0
- package/dist/{chunk-7AK5I7U7.js → chunk-YWLDLNAV.js} +1 -1
- package/dist/{chunk-7AK5I7U7.js.map → chunk-YWLDLNAV.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/styles/components/collections/list-header/list-header.css +11 -25
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +15 -17
- package/dist/styles/components/navigation/tab-bar-item/tab-bar-item.css +1 -58
- package/dist/styles/list-header.css +11 -25
- package/dist/styles/tab-bar-item.css +1 -58
- package/dist/styles/tab-bar.css +15 -17
- package/dist/tab-bar-item.d.ts +1 -4
- package/dist/tab-bar-item.js +1 -1
- package/dist/tab-bar.d.ts +1 -1
- package/dist/tab-bar.js +1 -1
- package/dist/wire-tab-bars.js +1 -1
- package/docs/component-contract.md +6 -7
- package/docs/component-selection.md +11 -19
- package/docs/design/sketch/Kerf-UI.sketch +0 -0
- package/docs/design/sketch/README.md +73 -0
- package/docs/design/sketch/advanced/README.md +75 -0
- package/docs/design/sketch/button/README.md +270 -0
- package/docs/design/sketch/content/README.md +70 -0
- package/docs/design/sketch/coverage.md +157 -0
- package/docs/design/sketch/forms/README.md +97 -0
- package/docs/design/sketch/lists/README.md +65 -0
- package/docs/design/sketch/toolbar/README.md +73 -0
- package/docs/design/sketch/unified/README.md +69 -0
- package/docs/design/sketch/unified/pages/advanced.png +0 -0
- package/docs/design/sketch/unified/pages/button.png +0 -0
- package/docs/design/sketch/unified/pages/content.png +0 -0
- package/docs/design/sketch/unified/pages/forms.png +0 -0
- package/docs/design/sketch/unified/pages/lists.png +0 -0
- package/docs/design/sketch/unified/pages/toolbar.png +0 -0
- package/docs/design/sketch-runner.md +87 -0
- package/docs/design/templates/list-header/action-dark.svg +1 -1
- package/docs/design/templates/list-header/action.svg +1 -1
- package/docs/design/templates/list-header/toggle-collapsed-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-collapsed.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
- package/docs/design/templates/list-header-dark.svg +1 -1
- package/docs/design/templates/list-header.svg +1 -1
- package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -1
- package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -1
- package/docs/design/templates/tab-bar-dark.svg +1 -1
- package/docs/design/templates/tab-bar.svg +1 -1
- package/docs/design/templates.md +9 -0
- package/docs/interaction-conventions.md +1 -1
- package/docs/layout.md +7 -6
- package/docs/ux-demo.md +1 -1
- package/llms.txt +3 -3
- package/package.json +17 -6
- package/dist/chunk-BSNKDW4X.js.map +0 -1
- package/dist/chunk-HJWFHJ3Z.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/navigation/tab-bar/tab-bar.tsx"],"names":[],"mappings":";;;AA6CO,SAAS,MAAA,CAAO;AAAA,EACrB,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,UAAA;AAAA,EACA,UAAA,GAAa,WAAA;AAAA,EACb,YAAA,GAAe,MAAA;AAAA,EACf,UAAA;AAAA,EACA,iBAAA,GAAoB,UAAA;AAAA,EACpB,QAAA,GAAW,KAAA;AAAA,EACX;AACF,CAAA,EAAgB;AACd,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,YAAA,EAAe,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACvC,gBAAA,EAAe,SAAA;AAAA,MACf,iBAAA,EAAiB,EAAA;AAAA,MACjB,qBAAA,EAAqB,UAAA;AAAA,MACrB,iBAAA,EAAiB,UAAA;AAAA,MACjB,mBAAA,EAAmB,YAAA;AAAA,MACnB,mBAAA,EAAmB,UAAA;AAAA,MACnB,yBAAA,EAAyB,iBAAA;AAAA,MACzB,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,sBAAA,EAAwB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,wBACvD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,mBAAA;AAAA,YACN,IAAA,EAAK,SAAA;AAAA,YACL,YAAA,EAAY,KAAA;AAAA,YACZ,mBAAA,EAAiB,IAAA;AAAA,YACjB,gBAAA,EAAgB,WAAW,MAAA,GAAS,MAAA;AAAA,YAEnC;AAAA;AAAA,SACH;AAAA,QACC,QAAA,oBAAY,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,yBAAyB,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,QACzD,GAAA,oBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,oBAAoB,QAAA,EAAA,GAAA,EAAI;AAAA;AAAA;AAAA,GAC7C;AAEJ","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation/tab-bar/tab-bar.tsx"],"names":[],"mappings":";;;AA6CO,SAAS,MAAA,CAAO;AAAA,EACrB,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,UAAA;AAAA,EACA,UAAA,GAAa,WAAA;AAAA,EACb,YAAA,GAAe,MAAA;AAAA,EACf,UAAA;AAAA,EACA,iBAAA,GAAoB,UAAA;AAAA,EACpB,QAAA,GAAW,KAAA;AAAA,EACX;AACF,CAAA,EAAgB;AACd,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,YAAA,EAAe,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACvC,gBAAA,EAAe,SAAA;AAAA,MACf,iBAAA,EAAiB,EAAA;AAAA,MACjB,qBAAA,EAAqB,UAAA;AAAA,MACrB,iBAAA,EAAiB,UAAA;AAAA,MACjB,mBAAA,EAAmB,YAAA;AAAA,MACnB,mBAAA,EAAmB,UAAA;AAAA,MACnB,yBAAA,EAAyB,iBAAA;AAAA,MACzB,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,sBAAA,EAAwB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,wBACvD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,mBAAA;AAAA,YACN,IAAA,EAAK,SAAA;AAAA,YACL,YAAA,EAAY,KAAA;AAAA,YACZ,mBAAA,EAAiB,IAAA;AAAA,YACjB,gBAAA,EAAgB,WAAW,MAAA,GAAS,MAAA;AAAA,YAEnC;AAAA;AAAA,SACH;AAAA,QACC,QAAA,oBAAY,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,yBAAyB,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,QACzD,GAAA,oBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,oBAAoB,QAAA,EAAA,GAAA,EAAI;AAAA;AAAA;AAAA,GAC7C;AAEJ","file":"chunk-YWLDLNAV.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\n\nexport type TabActivation = 'automatic' | 'manual';\nexport type TabBarAllocation = 'intrinsic' | 'fill';\nexport type TabBarPresentation = 'rail' | 'segmented' | 'inspector';\nexport type TabBarTrailingPlacement = 'separate' | 'adjacent';\n/** Tablist width where segmented TabBarItems switch to icon-only. */\nexport type TabBarIconOnlyAt = 'wide' | 'narrow' | 'compact';\n\nexport interface TabBarProps {\n id: string;\n label: string;\n children: KerfUiContent;\n leading?: KerfUiContent;\n /** Tab-local action: one ToolbarControlGroup, Kerf Button, or Web Awesome button. */\n trailing?: KerfUiContent;\n /**\n * Action pinned to the far edge of the bar. Combine with an adjacent `trailing`\n * action when the tab-local and workspace-level actions must remain distinct.\n * Accepts one ToolbarControlGroup, Kerf Button, or Web Awesome button.\n */\n end?: KerfUiContent;\n className?: string;\n /**\n * Keyboard activation mode for this strip, emitted as `data-tab-activation` for\n * `wireTabBars` to read (overrides its `activation` option). `'automatic'` (default)\n * selects on arrow / Home / End; `'manual'` moves roving focus only and the user\n * selects with Enter / Space / click — use it when selecting a tab is a heavy action.\n */\n activation?: TabActivation;\n /** How available strip width is allocated across child TabBarItems. */\n allocation?: TabBarAllocation;\n /** Named strip chrome for application rails, segmented tabs, or inspectors. */\n presentation?: TabBarPresentation;\n /** Switch segmented TabBarItems to icon-only at tablist widths of 832, 704, or 448px. Each tab needs a leading icon. */\n iconOnlyAt?: TabBarIconOnlyAt;\n /** Keep a trailing action beside the final tab or at the far edge of the bar. */\n trailingPlacement?: TabBarTrailingPlacement;\n /** Settle scrolling peers at whole-tab starts; the first visible tab aligns with the strip edge. */\n snapTabs?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Render a controlled tab strip. The application owns selection, order, and persistence. */\nexport function TabBar({\n id,\n label,\n children,\n leading,\n trailing,\n end,\n className = '',\n activation,\n allocation = 'intrinsic',\n presentation = 'rail',\n iconOnlyAt,\n trailingPlacement = 'separate',\n snapTabs = false,\n slot,\n}: TabBarProps) {\n return (\n <nav\n class={`kui-tab-bar ${className}`.trim()}\n data-component=\"tab-bar\"\n data-tab-bar-id={id}\n data-tab-activation={activation}\n data-allocation={allocation}\n data-presentation={presentation}\n data-icon-only-at={iconOnlyAt}\n data-trailing-placement={trailingPlacement}\n aria-label={label}\n slot={slot}\n >\n {leading && <div class=\"kui-tab-bar__leading\">{leading}</div>}\n <div\n class=\"kui-tab-bar__tabs\"\n role=\"tablist\"\n aria-label={label}\n data-kui-tab-list\n data-snap-tabs={snapTabs ? 'true' : undefined}\n >\n {children}\n </div>\n {trailing && <div class=\"kui-tab-bar__trailing\">{trailing}</div>}\n {end && <div class=\"kui-tab-bar__end\">{end}</div>}\n </nav>\n );\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { wireToolbarVisibility } from './chunk-2GOCOLQL.js';
|
|
2
|
-
export { reorderTabs, wireTabBars } from './chunk-
|
|
2
|
+
export { reorderTabs, wireTabBars } from './chunk-WPP5Q4A5.js';
|
|
3
3
|
export { wireSearchFields } from './chunk-UMNHJSIO.js';
|
|
4
4
|
export { wireTextFields } from './chunk-KC6WUSNS.js';
|
|
5
5
|
export { fileMatchesAccept, wireFilePickers } from './chunk-KK3S5OTW.js';
|
|
@@ -18,8 +18,8 @@ export { TextField } from './chunk-N2K3QGSX.js';
|
|
|
18
18
|
export { ValuePreview } from './chunk-F653O57X.js';
|
|
19
19
|
export { ValueTable, ValueTableRow } from './chunk-DZJ4GBSP.js';
|
|
20
20
|
export { SunkenPanel } from './chunk-D5RGM3XA.js';
|
|
21
|
-
export { TabBarItem } from './chunk-
|
|
22
|
-
export { TabBar } from './chunk-
|
|
21
|
+
export { TabBarItem } from './chunk-ROEBKSIY.js';
|
|
22
|
+
export { TabBar } from './chunk-YWLDLNAV.js';
|
|
23
23
|
export { applySelection, isApplePlatform, selectionGesture } from './chunk-GXSX6Q6O.js';
|
|
24
24
|
export { Spacer } from './chunk-YMUIQRWK.js';
|
|
25
25
|
export { SplitButton } from './chunk-TI2GV36S.js';
|
|
@@ -136,11 +136,13 @@
|
|
|
136
136
|
/* The fitted square is the visual and hover surface; the pointer target is at
|
|
137
137
|
least 44px in both dimensions. A transparent, out-of-flow layer extends the
|
|
138
138
|
button's hit area evenly around the square without moving layout or painting
|
|
139
|
-
anything, and hovering it lights the unchanged fitted square.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
anything, and hovering it lights the unchanged fitted square. The action is a
|
|
140
|
+
bordered control, so its border box ends flush at the header's 8px inline
|
|
141
|
+
margin, on the outer edge of the selected ListItem rows below it and of a
|
|
142
|
+
Pane header's trailing ToolbarControlGroup. Standard headers are 44px tall;
|
|
143
|
+
the trailing 4px of the extension falls in that inline margin and the leading
|
|
144
|
+
4px in the 8px gap before the dormant title. Offsets are from the padding box,
|
|
145
|
+
hence the extra 1px for the border. */
|
|
144
146
|
.kui-list-header__action::before {
|
|
145
147
|
--_kui-list-header-action-hit-outset: min(
|
|
146
148
|
0px,
|
|
@@ -158,25 +160,6 @@
|
|
|
158
160
|
inset-block: -1px;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
/* Trailing icon actions share one axis: a toolbar control centers its glyph in a
|
|
162
|
-
44px group slot flush with the 8px inline margin, so the fitted action centers
|
|
163
|
-
itself in a slot of that same size instead of sitting flush at the margin
|
|
164
|
-
(which put its glyph ~4px outside a Pane header's trailing toolbar glyph). The
|
|
165
|
-
slot, not the button, grows by the difference, so the fitted hover square and
|
|
166
|
-
its 18px visual are unchanged. Inline headers carry no outer geometry. */
|
|
167
|
-
.kui-list-header:not([data-inline="true"]) > .kui-list-header__action {
|
|
168
|
-
margin-inline-end: max(
|
|
169
|
-
0px,
|
|
170
|
-
calc(
|
|
171
|
-
(
|
|
172
|
-
var(--kui-toolbar-group-size, calc(2px + 2.625rem)) -
|
|
173
|
-
var(--_kui-list-header-action-size)
|
|
174
|
-
) /
|
|
175
|
-
2
|
|
176
|
-
)
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
163
|
.kui-list-header__toggle {
|
|
181
164
|
padding: var(--kui-layout-item-padding, 0.5rem);
|
|
182
165
|
appearance: none;
|
|
@@ -184,8 +167,11 @@
|
|
|
184
167
|
cursor: pointer;
|
|
185
168
|
}
|
|
186
169
|
|
|
170
|
+
/* A toggle's disclosure arrow is a borderless nested glyph, so it aligns with
|
|
171
|
+
the nested content of the ListItem rows below: the layer hugs its 18px glyph
|
|
172
|
+
and ends on the toggle's 1px border + 8px padding, the same inset as a row's
|
|
173
|
+
trailing icon, instead of centering it 3px inside a 24px box. */
|
|
187
174
|
.kui-list-header__action-layer {
|
|
188
|
-
width: 1.5rem;
|
|
189
175
|
height: 1.5rem;
|
|
190
176
|
margin-inline-start: auto;
|
|
191
177
|
flex: none;
|
|
@@ -30,10 +30,7 @@
|
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
border: var(--kui-tab-bar-strip-border-width, 1px) solid
|
|
32
32
|
var(--kui-tab-bar-border);
|
|
33
|
-
border-radius: var(
|
|
34
|
-
--kui-tab-bar-strip-radius,
|
|
35
|
-
var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
|
|
36
|
-
);
|
|
33
|
+
border-radius: var(--kui-tab-bar-strip-radius, 0);
|
|
37
34
|
background: var(
|
|
38
35
|
--kui-tab-bar-strip-background,
|
|
39
36
|
var(--kui-tab-bar-background)
|
|
@@ -53,7 +50,6 @@
|
|
|
53
50
|
}
|
|
54
51
|
.kui-tab-bar__tabs[data-snap-tabs="true"] {
|
|
55
52
|
scroll-snap-type: x mandatory;
|
|
56
|
-
scroll-padding-inline-start: var(--kui-tab-bar-snap-inset, 0px);
|
|
57
53
|
}
|
|
58
54
|
/* The snap end room is scrollable content after the last tab, not padding on
|
|
59
55
|
the strip: padding is part of the strip's box, which a flex item cannot
|
|
@@ -78,6 +74,12 @@
|
|
|
78
74
|
--kui-tab-bar-background: var(--kui-color-neutral-fill-quiet);
|
|
79
75
|
--kui-tab-bar-border: var(--kui-color-neutral-border-quiet);
|
|
80
76
|
}
|
|
77
|
+
.kui-tab-bar[data-presentation="segmented"] .kui-tab-bar__tabs {
|
|
78
|
+
border-radius: var(
|
|
79
|
+
--kui-tab-bar-strip-radius,
|
|
80
|
+
var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
|
|
81
|
+
);
|
|
82
|
+
}
|
|
81
83
|
/* A segmented strip's outer ends follow the pill track: a compact tab is inset
|
|
82
84
|
from the track's ends by the same distance as from its top and bottom, so
|
|
83
85
|
each end is concentric with the track. TabBarItem rounds its own outer corners
|
|
@@ -164,12 +166,12 @@
|
|
|
164
166
|
margin-inline-start: calc(-1px - var(--kui-toolbar-gap, 0.5rem));
|
|
165
167
|
}
|
|
166
168
|
|
|
167
|
-
.kui-tab-bar[data-presentation="rail"]:dir(ltr):
|
|
168
|
-
|
|
169
|
-
)
|
|
170
|
-
.kui-tab-bar[data-presentation="rail"]:dir(rtl):
|
|
171
|
-
|
|
172
|
-
)
|
|
169
|
+
.kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
|
|
170
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="l"]
|
|
171
|
+
)::before,
|
|
172
|
+
.kui-tab-bar[data-presentation="rail"]:dir(rtl):has(
|
|
173
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="r"]
|
|
174
|
+
)::before,
|
|
173
175
|
.kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
|
|
174
176
|
> .kui-tab-bar__tabs[data-scroll-overflow*="r"]
|
|
175
177
|
)::after,
|
|
@@ -183,9 +185,7 @@
|
|
|
183
185
|
}
|
|
184
186
|
|
|
185
187
|
.kui-tab-bar:not([data-presentation="rail"])
|
|
186
|
-
> .kui-tab-bar__tabs[data-scroll-overflow*="l"]
|
|
187
|
-
:dir(ltr):has(> .kui-tab-bar-item[data-pinned="true"])
|
|
188
|
-
) {
|
|
188
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="l"] {
|
|
189
189
|
border-left-color: var(
|
|
190
190
|
--kui-tab-bar-divider-color,
|
|
191
191
|
var(--kui-color-neutral-border-normal)
|
|
@@ -193,9 +193,7 @@
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
.kui-tab-bar:not([data-presentation="rail"])
|
|
196
|
-
> .kui-tab-bar__tabs[data-scroll-overflow*="r"]
|
|
197
|
-
:dir(rtl):has(> .kui-tab-bar-item[data-pinned="true"])
|
|
198
|
-
) {
|
|
196
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="r"] {
|
|
199
197
|
border-right-color: var(
|
|
200
198
|
--kui-tab-bar-divider-color,
|
|
201
199
|
var(--kui-color-neutral-border-normal)
|
|
@@ -29,66 +29,9 @@
|
|
|
29
29
|
align-items: center;
|
|
30
30
|
flex: none;
|
|
31
31
|
}
|
|
32
|
-
.kui-tab-
|
|
33
|
-
position: sticky;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
inset-inline-start: 0;
|
|
36
|
-
background: var(
|
|
37
|
-
--kui-tab-bar-item-pinned-background,
|
|
38
|
-
var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
.kui-tab-bar__tabs[data-snap-tabs="true"]
|
|
42
|
-
> .kui-tab-bar-item:not([data-pinned="true"]) {
|
|
32
|
+
.kui-tab-bar__tabs[data-snap-tabs="true"] > .kui-tab-bar-item {
|
|
43
33
|
scroll-snap-align: start;
|
|
44
34
|
}
|
|
45
|
-
.kui-tab-bar-item[data-pinned="true"]::before {
|
|
46
|
-
content: "";
|
|
47
|
-
position: absolute;
|
|
48
|
-
z-index: -1;
|
|
49
|
-
inset-block: 0;
|
|
50
|
-
inset-inline-start: calc(
|
|
51
|
-
-1 *
|
|
52
|
-
(
|
|
53
|
-
var(--kui-tab-bar-strip-padding, 1px) +
|
|
54
|
-
var(--kui-tab-bar-strip-border-width, 1px)
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
inset-inline-end: 0;
|
|
58
|
-
/* Keep the opaque scroll backing inside the tab's pill silhouette so it
|
|
59
|
-
cannot square off a selected tab's trailing corner and shadow. */
|
|
60
|
-
border-radius: inherit;
|
|
61
|
-
background: var(
|
|
62
|
-
--kui-tab-bar-item-pinned-background,
|
|
63
|
-
var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
/* The leading overflow line belongs after the pinned tab, where its scrolling
|
|
67
|
-
peers disappear. Reuse the opaque backing so drag indicators can still use
|
|
68
|
-
::after. */
|
|
69
|
-
.kui-tab-bar__tabs:dir(ltr)[data-scroll-overflow*="l"]
|
|
70
|
-
> .kui-tab-bar-item[data-pinned="true"]::before,
|
|
71
|
-
.kui-tab-bar__tabs:dir(rtl)[data-scroll-overflow*="r"]
|
|
72
|
-
> .kui-tab-bar-item[data-pinned="true"]::before {
|
|
73
|
-
inset-inline-end: -1px;
|
|
74
|
-
border-inline-end: 1px solid
|
|
75
|
-
var(--kui-tab-bar-divider-color, var(--kui-color-neutral-border-normal));
|
|
76
|
-
}
|
|
77
|
-
.kui-tab-bar[data-presentation="segmented"]
|
|
78
|
-
.kui-tab-bar-item[data-pinned="true"],
|
|
79
|
-
.kui-tab-bar[data-presentation="inspector"]
|
|
80
|
-
.kui-tab-bar-item[data-pinned="true"] {
|
|
81
|
-
--_kui-tab-bar-item-pinned-default-background: var(
|
|
82
|
-
--kui-tab-bar-strip-background,
|
|
83
|
-
var(--kui-color-neutral-fill-quiet)
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
.kui-tab-bar-item[data-pinned="true"]:not([data-selected="true"]):hover {
|
|
87
|
-
background: var(
|
|
88
|
-
--kui-tab-bar-item-pinned-hover-background,
|
|
89
|
-
var(--kui-color-neutral-fill-quiet)
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
35
|
.kui-tab-bar-item[data-size="compact"] {
|
|
93
36
|
height: 2rem;
|
|
94
37
|
}
|
|
@@ -136,11 +136,13 @@
|
|
|
136
136
|
/* The fitted square is the visual and hover surface; the pointer target is at
|
|
137
137
|
least 44px in both dimensions. A transparent, out-of-flow layer extends the
|
|
138
138
|
button's hit area evenly around the square without moving layout or painting
|
|
139
|
-
anything, and hovering it lights the unchanged fitted square.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
anything, and hovering it lights the unchanged fitted square. The action is a
|
|
140
|
+
bordered control, so its border box ends flush at the header's 8px inline
|
|
141
|
+
margin, on the outer edge of the selected ListItem rows below it and of a
|
|
142
|
+
Pane header's trailing ToolbarControlGroup. Standard headers are 44px tall;
|
|
143
|
+
the trailing 4px of the extension falls in that inline margin and the leading
|
|
144
|
+
4px in the 8px gap before the dormant title. Offsets are from the padding box,
|
|
145
|
+
hence the extra 1px for the border. */
|
|
144
146
|
.kui-list-header__action::before {
|
|
145
147
|
--_kui-list-header-action-hit-outset: min(
|
|
146
148
|
0px,
|
|
@@ -158,25 +160,6 @@
|
|
|
158
160
|
inset-block: -1px;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
/* Trailing icon actions share one axis: a toolbar control centers its glyph in a
|
|
162
|
-
44px group slot flush with the 8px inline margin, so the fitted action centers
|
|
163
|
-
itself in a slot of that same size instead of sitting flush at the margin
|
|
164
|
-
(which put its glyph ~4px outside a Pane header's trailing toolbar glyph). The
|
|
165
|
-
slot, not the button, grows by the difference, so the fitted hover square and
|
|
166
|
-
its 18px visual are unchanged. Inline headers carry no outer geometry. */
|
|
167
|
-
.kui-list-header:not([data-inline="true"]) > .kui-list-header__action {
|
|
168
|
-
margin-inline-end: max(
|
|
169
|
-
0px,
|
|
170
|
-
calc(
|
|
171
|
-
(
|
|
172
|
-
var(--kui-toolbar-group-size, calc(2px + 2.625rem)) -
|
|
173
|
-
var(--_kui-list-header-action-size)
|
|
174
|
-
) /
|
|
175
|
-
2
|
|
176
|
-
)
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
163
|
.kui-list-header__toggle {
|
|
181
164
|
padding: var(--kui-layout-item-padding, 0.5rem);
|
|
182
165
|
appearance: none;
|
|
@@ -184,8 +167,11 @@
|
|
|
184
167
|
cursor: pointer;
|
|
185
168
|
}
|
|
186
169
|
|
|
170
|
+
/* A toggle's disclosure arrow is a borderless nested glyph, so it aligns with
|
|
171
|
+
the nested content of the ListItem rows below: the layer hugs its 18px glyph
|
|
172
|
+
and ends on the toggle's 1px border + 8px padding, the same inset as a row's
|
|
173
|
+
trailing icon, instead of centering it 3px inside a 24px box. */
|
|
187
174
|
.kui-list-header__action-layer {
|
|
188
|
-
width: 1.5rem;
|
|
189
175
|
height: 1.5rem;
|
|
190
176
|
margin-inline-start: auto;
|
|
191
177
|
flex: none;
|
|
@@ -29,66 +29,9 @@
|
|
|
29
29
|
align-items: center;
|
|
30
30
|
flex: none;
|
|
31
31
|
}
|
|
32
|
-
.kui-tab-
|
|
33
|
-
position: sticky;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
inset-inline-start: 0;
|
|
36
|
-
background: var(
|
|
37
|
-
--kui-tab-bar-item-pinned-background,
|
|
38
|
-
var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
.kui-tab-bar__tabs[data-snap-tabs="true"]
|
|
42
|
-
> .kui-tab-bar-item:not([data-pinned="true"]) {
|
|
32
|
+
.kui-tab-bar__tabs[data-snap-tabs="true"] > .kui-tab-bar-item {
|
|
43
33
|
scroll-snap-align: start;
|
|
44
34
|
}
|
|
45
|
-
.kui-tab-bar-item[data-pinned="true"]::before {
|
|
46
|
-
content: "";
|
|
47
|
-
position: absolute;
|
|
48
|
-
z-index: -1;
|
|
49
|
-
inset-block: 0;
|
|
50
|
-
inset-inline-start: calc(
|
|
51
|
-
-1 *
|
|
52
|
-
(
|
|
53
|
-
var(--kui-tab-bar-strip-padding, 1px) +
|
|
54
|
-
var(--kui-tab-bar-strip-border-width, 1px)
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
inset-inline-end: 0;
|
|
58
|
-
/* Keep the opaque scroll backing inside the tab's pill silhouette so it
|
|
59
|
-
cannot square off a selected tab's trailing corner and shadow. */
|
|
60
|
-
border-radius: inherit;
|
|
61
|
-
background: var(
|
|
62
|
-
--kui-tab-bar-item-pinned-background,
|
|
63
|
-
var(--_kui-tab-bar-item-pinned-default-background, var(--kui-color-surface))
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
/* The leading overflow line belongs after the pinned tab, where its scrolling
|
|
67
|
-
peers disappear. Reuse the opaque backing so drag indicators can still use
|
|
68
|
-
::after. */
|
|
69
|
-
.kui-tab-bar__tabs:dir(ltr)[data-scroll-overflow*="l"]
|
|
70
|
-
> .kui-tab-bar-item[data-pinned="true"]::before,
|
|
71
|
-
.kui-tab-bar__tabs:dir(rtl)[data-scroll-overflow*="r"]
|
|
72
|
-
> .kui-tab-bar-item[data-pinned="true"]::before {
|
|
73
|
-
inset-inline-end: -1px;
|
|
74
|
-
border-inline-end: 1px solid
|
|
75
|
-
var(--kui-tab-bar-divider-color, var(--kui-color-neutral-border-normal));
|
|
76
|
-
}
|
|
77
|
-
.kui-tab-bar[data-presentation="segmented"]
|
|
78
|
-
.kui-tab-bar-item[data-pinned="true"],
|
|
79
|
-
.kui-tab-bar[data-presentation="inspector"]
|
|
80
|
-
.kui-tab-bar-item[data-pinned="true"] {
|
|
81
|
-
--_kui-tab-bar-item-pinned-default-background: var(
|
|
82
|
-
--kui-tab-bar-strip-background,
|
|
83
|
-
var(--kui-color-neutral-fill-quiet)
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
.kui-tab-bar-item[data-pinned="true"]:not([data-selected="true"]):hover {
|
|
87
|
-
background: var(
|
|
88
|
-
--kui-tab-bar-item-pinned-hover-background,
|
|
89
|
-
var(--kui-color-neutral-fill-quiet)
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
35
|
.kui-tab-bar-item[data-size="compact"] {
|
|
93
36
|
height: 2rem;
|
|
94
37
|
}
|
package/dist/styles/tab-bar.css
CHANGED
|
@@ -30,10 +30,7 @@
|
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
border: var(--kui-tab-bar-strip-border-width, 1px) solid
|
|
32
32
|
var(--kui-tab-bar-border);
|
|
33
|
-
border-radius: var(
|
|
34
|
-
--kui-tab-bar-strip-radius,
|
|
35
|
-
var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
|
|
36
|
-
);
|
|
33
|
+
border-radius: var(--kui-tab-bar-strip-radius, 0);
|
|
37
34
|
background: var(
|
|
38
35
|
--kui-tab-bar-strip-background,
|
|
39
36
|
var(--kui-tab-bar-background)
|
|
@@ -53,7 +50,6 @@
|
|
|
53
50
|
}
|
|
54
51
|
.kui-tab-bar__tabs[data-snap-tabs="true"] {
|
|
55
52
|
scroll-snap-type: x mandatory;
|
|
56
|
-
scroll-padding-inline-start: var(--kui-tab-bar-snap-inset, 0px);
|
|
57
53
|
}
|
|
58
54
|
/* The snap end room is scrollable content after the last tab, not padding on
|
|
59
55
|
the strip: padding is part of the strip's box, which a flex item cannot
|
|
@@ -78,6 +74,12 @@
|
|
|
78
74
|
--kui-tab-bar-background: var(--kui-color-neutral-fill-quiet);
|
|
79
75
|
--kui-tab-bar-border: var(--kui-color-neutral-border-quiet);
|
|
80
76
|
}
|
|
77
|
+
.kui-tab-bar[data-presentation="segmented"] .kui-tab-bar__tabs {
|
|
78
|
+
border-radius: var(
|
|
79
|
+
--kui-tab-bar-strip-radius,
|
|
80
|
+
var(--kui-layout-pill-radius, calc(1px + 1.3125rem))
|
|
81
|
+
);
|
|
82
|
+
}
|
|
81
83
|
/* A segmented strip's outer ends follow the pill track: a compact tab is inset
|
|
82
84
|
from the track's ends by the same distance as from its top and bottom, so
|
|
83
85
|
each end is concentric with the track. TabBarItem rounds its own outer corners
|
|
@@ -164,12 +166,12 @@
|
|
|
164
166
|
margin-inline-start: calc(-1px - var(--kui-toolbar-gap, 0.5rem));
|
|
165
167
|
}
|
|
166
168
|
|
|
167
|
-
.kui-tab-bar[data-presentation="rail"]:dir(ltr):
|
|
168
|
-
|
|
169
|
-
)
|
|
170
|
-
.kui-tab-bar[data-presentation="rail"]:dir(rtl):
|
|
171
|
-
|
|
172
|
-
)
|
|
169
|
+
.kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
|
|
170
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="l"]
|
|
171
|
+
)::before,
|
|
172
|
+
.kui-tab-bar[data-presentation="rail"]:dir(rtl):has(
|
|
173
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="r"]
|
|
174
|
+
)::before,
|
|
173
175
|
.kui-tab-bar[data-presentation="rail"]:dir(ltr):has(
|
|
174
176
|
> .kui-tab-bar__tabs[data-scroll-overflow*="r"]
|
|
175
177
|
)::after,
|
|
@@ -183,9 +185,7 @@
|
|
|
183
185
|
}
|
|
184
186
|
|
|
185
187
|
.kui-tab-bar:not([data-presentation="rail"])
|
|
186
|
-
> .kui-tab-bar__tabs[data-scroll-overflow*="l"]
|
|
187
|
-
:dir(ltr):has(> .kui-tab-bar-item[data-pinned="true"])
|
|
188
|
-
) {
|
|
188
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="l"] {
|
|
189
189
|
border-left-color: var(
|
|
190
190
|
--kui-tab-bar-divider-color,
|
|
191
191
|
var(--kui-color-neutral-border-normal)
|
|
@@ -193,9 +193,7 @@
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
.kui-tab-bar:not([data-presentation="rail"])
|
|
196
|
-
> .kui-tab-bar__tabs[data-scroll-overflow*="r"]
|
|
197
|
-
:dir(rtl):has(> .kui-tab-bar-item[data-pinned="true"])
|
|
198
|
-
) {
|
|
196
|
+
> .kui-tab-bar__tabs[data-scroll-overflow*="r"] {
|
|
199
197
|
border-right-color: var(
|
|
200
198
|
--kui-tab-bar-divider-color,
|
|
201
199
|
var(--kui-color-neutral-border-normal)
|
package/dist/tab-bar-item.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ type TabBarItemRootAttributes = Readonly<Record<`data-${string}`, string | undef
|
|
|
11
11
|
'data-attention'?: never;
|
|
12
12
|
'data-drop-target'?: never;
|
|
13
13
|
'data-name-overflow'?: never;
|
|
14
|
-
'data-pinned'?: never;
|
|
15
14
|
'data-disabled'?: never;
|
|
16
15
|
}>;
|
|
17
16
|
type TabBarItemPresentation = 'pill' | 'segmented' | 'icon-only';
|
|
@@ -31,8 +30,6 @@ interface TabBarItemProps {
|
|
|
31
30
|
attention?: boolean;
|
|
32
31
|
/** Highlight this tab as the target of a drag over its content. */
|
|
33
32
|
dropTarget?: boolean;
|
|
34
|
-
/** Keep the leading tab visible within its TabBar tablist while peers scroll. */
|
|
35
|
-
pinned?: boolean;
|
|
36
33
|
closable?: boolean;
|
|
37
34
|
draggable?: boolean;
|
|
38
35
|
leading?: KerfUiContent;
|
|
@@ -67,6 +64,6 @@ interface TabBarItemProps {
|
|
|
67
64
|
/** Native named-slot assignment when composed inside a web component. */
|
|
68
65
|
slot?: string;
|
|
69
66
|
}
|
|
70
|
-
declare function TabBarItem({ id, name, selected, disabled, tabId, panelId, attention, dropTarget,
|
|
67
|
+
declare function TabBarItem({ id, name, selected, disabled, tabId, panelId, attention, dropTarget, closable, draggable, leading, trailing, presentation, size, labelMaxWidth, nameOverflow, closeIcon, selectAction, closeAction, className, placeholder, pending, rootAttributes, slot, }: TabBarItemProps): SafeHtml;
|
|
71
68
|
|
|
72
69
|
export { TabBarItem, type TabBarItemNameOverflow, type TabBarItemPresentation, type TabBarItemProps, type TabBarItemSize };
|
package/dist/tab-bar-item.js
CHANGED
package/dist/tab-bar.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ interface TabBarProps {
|
|
|
36
36
|
iconOnlyAt?: TabBarIconOnlyAt;
|
|
37
37
|
/** Keep a trailing action beside the final tab or at the far edge of the bar. */
|
|
38
38
|
trailingPlacement?: TabBarTrailingPlacement;
|
|
39
|
-
/** Settle scrolling peers at whole-tab starts;
|
|
39
|
+
/** Settle scrolling peers at whole-tab starts; the first visible tab aligns with the strip edge. */
|
|
40
40
|
snapTabs?: boolean;
|
|
41
41
|
/** Native named-slot assignment when composed inside a web component. */
|
|
42
42
|
slot?: string;
|
package/dist/tab-bar.js
CHANGED
package/dist/wire-tab-bars.js
CHANGED
|
@@ -887,11 +887,10 @@ the only shrinking, horizontally scrolling region; `leading`, `trailing`, and
|
|
|
887
887
|
trailing action belongs immediately after the final tab and use `end` for a
|
|
888
888
|
separate action pinned to the far edge. Applications own the action content,
|
|
889
889
|
but must not restyle TabBar descendants to recreate that allocation.
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
last peer can align there. That room is scrollable content after the last tab,
|
|
890
|
+
Fixed controls belong in those outer zones, outside the scrolling tablist.
|
|
891
|
+
With `snapTabs`, `wireTabBars` settles tabs at whole-tab starts after scroll and
|
|
892
|
+
selection changes, reserving end room so the last tab can align with the strip's
|
|
893
|
+
inline-start edge in LTR and RTL. That room is scrollable content after the last tab,
|
|
895
894
|
inside the strip, so it lengthens the scroll range without widening the strip:
|
|
896
895
|
the strip still shrinks to its allocation, and `trailing` and `end` stay inside
|
|
897
896
|
the bar. The room is still in-flow content, so it counts toward the strip's
|
|
@@ -902,11 +901,11 @@ frames and never pushes `trailing` or `end` out of the bar; keep the trailing
|
|
|
902
901
|
zone non-shrinking with `snapTabs` to avoid it. The application still owns
|
|
903
902
|
selection and tab order.
|
|
904
903
|
ResizeObserver notifications coalesce snap measurements into the next animation
|
|
905
|
-
frame, so
|
|
904
|
+
frame, so geometry writes cannot resize the observed strip during observer delivery.
|
|
906
905
|
`wireTabBars` watches the whole root it is given, but a mutation re-measures only
|
|
907
906
|
the bars it touched: a change inside a bar, a newly inserted bar, or a `dir`
|
|
908
907
|
change on an element above one. Content elsewhere in the root (terminal output,
|
|
909
|
-
list updates, streamed text) triggers no style or layout reads. A
|
|
908
|
+
list updates, streamed text) triggers no style or layout reads. A snap strip
|
|
910
909
|
re-measures when its own size changes, so a layout change outside the bar still
|
|
911
910
|
reaches it.
|
|
912
911
|
|
|
@@ -455,25 +455,17 @@ For a distinct application action, use `end` to pin it at the far edge; use
|
|
|
455
455
|
strip. Each zone accepts one `ToolbarControlGroup` or one standalone
|
|
456
456
|
`Button` for a primary action with its own chrome. Avoid wrappers and
|
|
457
457
|
application flex overrides.
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
`
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
`--kui-tab-bar-item-pinned-background` token if the surrounding surface differs from
|
|
470
|
-
the default; the pinned tab must cover peers as they scroll beneath it. Its
|
|
471
|
-
background also covers the strip's inline padding and border so scrolled labels
|
|
472
|
-
cannot paint beside the pinned edge, including in right-to-left strips. The
|
|
473
|
-
backing follows the tab's pill radius, keeping a selected pinned tab's corners
|
|
474
|
-
and shadow whole beside the overflow divider. Call
|
|
475
|
-
`wireTabBars` for keyboard selection and reorder behavior and its WebKit RTL
|
|
476
|
-
scroll correction.
|
|
458
|
+
Put controls that must stay visible outside the scrolling tabs in `leading`,
|
|
459
|
+
`trailing`, or `end`. Use a `ToolbarControlGroup` with a button or a standalone
|
|
460
|
+
`Button` for a fixed action, rather than a sticky TabBarItem inside the tablist.
|
|
461
|
+
Set `snapTabs` when scrolling tabs should settle at whole-tab starts.
|
|
462
|
+
`wireTabBars` aligns the selected tab with the strip's inline-start edge in LTR
|
|
463
|
+
and RTL and reserves enough end scroll room for the final tab to align there.
|
|
464
|
+
A partial tab can still appear at the trailing edge as an overflow cue.
|
|
465
|
+
Keep the trailing zone non-shrinking (the default
|
|
466
|
+
`--kui-tab-bar-trailing-flex`) when using `snapTabs`: the reserved end room
|
|
467
|
+
counts toward the strip's share when both zones shrink.
|
|
468
|
+
Call `wireTabBars` for keyboard selection and reorder behavior.
|
|
477
469
|
|
|
478
470
|
- `StateBanner` persists beside affected work; `EmptyState` replaces absent content; a `kerfjs/overlay` `toast()` is transient and must not carry the only copy of important state. With the Web Awesome integration, `wa-callout` is contextual ecosystem content and `wa-toast` is the transient equivalent.
|
|
479
471
|
|
|
Binary file
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Kerf UI Sketch catalog
|
|
2
|
+
|
|
3
|
+
[Kerf-UI.sketch](Kerf-UI.sketch) is the one Kerf UI Sketch Library. It holds
|
|
4
|
+
all 308 editable light and dark Symbols for the 110 template variants, on one
|
|
5
|
+
page per family: Button, Form Controls, Advanced Inputs, Lists and Data,
|
|
6
|
+
Toolbars and Navigation, and Content and Feedback. Each page shows its light
|
|
7
|
+
masters beside its dark masters on a dark surface, ordered by Symbol name.
|
|
8
|
+
Symbols are named `Component / Variant / State / Theme` in the component
|
|
9
|
+
browser, and 141 Color Variables are named `Kerf/<Theme>/<Role>`. See the
|
|
10
|
+
[unified Library guide](unified/README.md) for its identity contract, build,
|
|
11
|
+
and verification. [Coverage](coverage.md) accounts for every source variant.
|
|
12
|
+
Source SVG sheets in [templates](../templates.md) are review material, not
|
|
13
|
+
substitutes for editable Symbols.
|
|
14
|
+
|
|
15
|
+
## Install and update
|
|
16
|
+
|
|
17
|
+
The Library was created and verified with **Sketch 2026.3.1**. Kerf UI ships
|
|
18
|
+
it as a Sketch Library, not a document template: documents link its Symbols
|
|
19
|
+
and Color Variables, so a new release reaches every design that uses them.
|
|
20
|
+
|
|
21
|
+
To install:
|
|
22
|
+
|
|
23
|
+
1. Install Apple's [SF Pro](https://developer.apple.com/fonts/) fonts if they
|
|
24
|
+
aren't already installed. The Library's text uses SF Pro, the font
|
|
25
|
+
production's `system-ui` resolves to on macOS. Without it, Sketch reports
|
|
26
|
+
missing fonts and substitutes another face. Sketch can't embed SF Pro, so
|
|
27
|
+
its Embed Fonts settings leave it unembedded, and viewers without SF Pro
|
|
28
|
+
see a fallback font.
|
|
29
|
+
2. Find the file. In a project that depends on `@kerfjs/ui` it is
|
|
30
|
+
`node_modules/@kerfjs/ui/docs/design/sketch/Kerf-UI.sketch`; you can also
|
|
31
|
+
download it from the
|
|
32
|
+
[repository](https://github.com/brianwestphal/kerf/blob/main/ui/docs/design/sketch/Kerf-UI.sketch).
|
|
33
|
+
3. Copy it to a stable folder outside any package or repository checkout, for
|
|
34
|
+
example `~/Design Libraries/Kerf-UI.sketch`. Don't add it from
|
|
35
|
+
`node_modules`: a reinstall or branch switch would move or delete the file
|
|
36
|
+
your designs link to.
|
|
37
|
+
4. In Sketch, open **Settings → Libraries**, choose **Add Library…**, and
|
|
38
|
+
select the copy.
|
|
39
|
+
|
|
40
|
+
To use it, insert a Symbol from the component browser. Symbols are named
|
|
41
|
+
`Component / Variant / State / Theme`, so typing `Button` finds every Button.
|
|
42
|
+
Kerf's Color Variables (`Kerf/<Theme>/<Role>`) appear in the color picker
|
|
43
|
+
under the Library's name.
|
|
44
|
+
|
|
45
|
+
To update, copy the newly published file over the same installed path. Sketch
|
|
46
|
+
then offers the Library update in any open document that uses it; accept it to
|
|
47
|
+
sync. Linked instances keep their overrides: the Library's document ID, Symbol
|
|
48
|
+
IDs, Text layer IDs, and Color Variable IDs stay the same across releases, and
|
|
49
|
+
the build fails if any of them changes. Don't add the new file as a second
|
|
50
|
+
Library alongside the old one. If the native format or supported Sketch version changes, this guide
|
|
51
|
+
and the unified guide must record the new verification result before
|
|
52
|
+
publication.
|
|
53
|
+
|
|
54
|
+
## Family build inputs
|
|
55
|
+
|
|
56
|
+
`Kerf-UI.sketch` is assembled from six family Libraries, which are the
|
|
57
|
+
maintained build inputs rather than files to install:
|
|
58
|
+
[Button](button/README.md), [Forms](forms/README.md),
|
|
59
|
+
[Advanced inputs](advanced/README.md), [Lists and data](lists/README.md),
|
|
60
|
+
[Toolbars and navigation](toolbar/README.md), and
|
|
61
|
+
[Content and feedback](content/README.md). Each family pipeline owns capture,
|
|
62
|
+
semantic layout, edited-source migration, and Color Variable binding for its
|
|
63
|
+
masters, and pins its own document ID (Sketch assigns a new one on each save).
|
|
64
|
+
After a family changes, rebuild the unified Library with
|
|
65
|
+
`npm run sketch:library` from `ui/`.
|
|
66
|
+
|
|
67
|
+
A multi-control SVG variant is a showcase page; it is not an individual
|
|
68
|
+
reusable component.
|
|
69
|
+
|
|
70
|
+
The `@kerfjs/ui` npm package ships `Kerf-UI.sketch`, its page overviews, and
|
|
71
|
+
these guides. The family build-input Libraries, manifests, captured fixtures,
|
|
72
|
+
and verification evidence the guides mention live in the
|
|
73
|
+
[repository](https://github.com/brianwestphal/kerf/tree/main/ui/docs/design/sketch).
|