@kerfjs/ui 5.0.0-beta.135 → 5.0.0-beta.136
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/README.md +19 -0
- package/ai/component-catalog.json +3 -1
- package/ai/components/popup-menu.md +1 -1
- package/ai/public-api-signatures-v1.md +63 -12
- package/ai/skill.md +10 -0
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/catalog-library.d.ts +2 -2
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +3 -3
- package/dist/catalog.js +3 -3
- package/dist/{chunk-IXT2ARIM.js → chunk-6FQFZVRV.js} +2 -2
- package/dist/{chunk-IXT2ARIM.js.map → chunk-6FQFZVRV.js.map} +1 -1
- package/dist/{chunk-LH5V6XGH.js → chunk-7G6BSG4B.js} +1 -1
- package/dist/{chunk-LH5V6XGH.js.map → chunk-7G6BSG4B.js.map} +1 -1
- package/dist/{chunk-42NLFCIN.js → chunk-AUYGZ3UP.js} +32 -3
- package/dist/chunk-AUYGZ3UP.js.map +1 -0
- package/dist/{chunk-XNSYDA6G.js → chunk-B4UWDIUL.js} +5 -5
- package/dist/{chunk-XNSYDA6G.js.map → chunk-B4UWDIUL.js.map} +1 -1
- package/dist/{chunk-QNB5DKKP.js → chunk-LMBSIRGQ.js} +2 -2
- package/dist/{chunk-QNB5DKKP.js.map → chunk-LMBSIRGQ.js.map} +1 -1
- package/dist/{chunk-YRQ4KKLG.js → chunk-NPPL3NXM.js} +16 -2
- package/dist/chunk-NPPL3NXM.js.map +1 -0
- package/dist/{chunk-MPT6Y7Z2.js → chunk-QOZABB23.js} +29 -1
- package/dist/chunk-QOZABB23.js.map +1 -0
- package/dist/{chunk-EI55KWHP.js → chunk-QWB4FEWD.js} +2 -1
- package/dist/chunk-QWB4FEWD.js.map +1 -0
- package/dist/{chunk-ZDI5I2HT.js → chunk-RMGHAIV5.js} +3 -3
- package/dist/{chunk-ZDI5I2HT.js.map → chunk-RMGHAIV5.js.map} +1 -1
- package/dist/{chunk-QWAAR5JX.js → chunk-ZS4WBHQG.js} +3 -3
- package/dist/{chunk-QWAAR5JX.js.map → chunk-ZS4WBHQG.js.map} +1 -1
- package/dist/collapsible-panel.js +2 -2
- package/dist/column-explorer.js +1 -1
- package/dist/{compose-B_GFfFhm.d.ts → compose-Qkitwg3x.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.js +2 -2
- package/dist/list-header.d.ts +41 -1
- package/dist/list-header.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +2 -2
- package/dist/pane.js +1 -1
- package/dist/popup-menu.d.ts +12 -1
- package/dist/popup-menu.js +1 -1
- package/dist/split-view.js +1 -1
- package/dist/styles/backdrop-image.css +26 -0
- package/dist/styles/color-picker.css +4 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +15 -0
- package/dist/styles/components/collections/list-header/list-header.css +60 -4
- package/dist/styles/components/forms/color-picker/color-picker.css +4 -0
- package/dist/styles/components/layout/pane/pane.css +6 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +12 -0
- package/dist/styles/components/navigation/paged-view/paged-view.css +4 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +6 -0
- package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +22 -0
- package/dist/styles/components/surfaces/scroll-effect/scroll-effect.css +4 -0
- package/dist/styles/components/typography/text/text.css +6 -3
- package/dist/styles/content-item.css +26 -0
- package/dist/styles/foundation.css +28 -4
- package/dist/styles/list-header.css +60 -4
- package/dist/styles/nav-stack.css +12 -0
- package/dist/styles/paged-view.css +4 -0
- package/dist/styles/pane.css +6 -0
- package/dist/styles/scroll-effect.css +4 -0
- package/dist/styles/tab-navigator.css +6 -0
- package/dist/styles/text.css +6 -3
- package/dist/styles/toolbar-control-group.css +15 -0
- package/dist/styles/webawesome.css +19 -0
- package/dist/{types-CuKf5G87.d.ts → types-PGGOsJug.d.ts} +2 -1
- package/dist/wire-catalog.d.ts +1 -1
- package/dist/wire-search-fields.js +1 -1
- package/dist/wire-tag-fields.js +1 -1
- package/dist/workbench-dialog.js +1 -1
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +1 -1
- package/docs/component-selection.md +7 -0
- package/docs/design/sketch/README.md +6 -3
- package/docs/design/sketch/unified/README.md +1 -1
- package/docs/design/templates.md +1 -1
- package/docs/workbench.md +6 -1
- package/package.json +1 -1
- package/dist/chunk-42NLFCIN.js.map +0 -1
- package/dist/chunk-EI55KWHP.js.map +0 -1
- package/dist/chunk-MPT6Y7Z2.js.map +0 -1
- package/dist/chunk-YRQ4KKLG.js.map +0 -1
|
@@ -29,11 +29,17 @@
|
|
|
29
29
|
padding-block: var(--kui-list-header-title-padding-block, 0.25rem);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/*
|
|
33
|
-
|
|
34
|
-
height. */
|
|
32
|
+
/* A content-sized toggle lets further label lines increase the header's own
|
|
33
|
+
height; align the count and disclosure with its first line. */
|
|
35
34
|
.kui-list-header[data-wrap="true"] .kui-list-header__title {
|
|
36
|
-
padding-block: var(--kui-list-header-title-padding-block, 0.
|
|
35
|
+
padding-block: var(--kui-list-header-title-padding-block, 0.5rem);
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
height: max-content;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.kui-list-header[data-wrap="true"] > .kui-list-header__action {
|
|
41
|
+
align-self: flex-start;
|
|
42
|
+
margin-block-start: 0.25rem;
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
.kui-list-header[data-divider="before"],
|
|
@@ -104,6 +110,56 @@
|
|
|
104
110
|
text-align: start;
|
|
105
111
|
}
|
|
106
112
|
|
|
113
|
+
.kui-list-header__heading {
|
|
114
|
+
display: flex;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
flex: 1 1 auto;
|
|
117
|
+
margin: 0;
|
|
118
|
+
font: inherit;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.kui-list-header__title-action {
|
|
122
|
+
appearance: none;
|
|
123
|
+
display: flex;
|
|
124
|
+
width: 100%;
|
|
125
|
+
min-width: 0;
|
|
126
|
+
min-height: var(
|
|
127
|
+
--kui-list-header-title-min-height,
|
|
128
|
+
var(--kui-list-header-min-height, 2.75rem)
|
|
129
|
+
);
|
|
130
|
+
padding: 0;
|
|
131
|
+
border: 1px solid transparent;
|
|
132
|
+
border-radius: var(--kui-layout-rounded-radius, calc(1px + 0.6875rem));
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: flex-start;
|
|
135
|
+
gap: var(--kui-layout-item-gap, 0.5rem);
|
|
136
|
+
color: inherit;
|
|
137
|
+
background: transparent;
|
|
138
|
+
font: inherit;
|
|
139
|
+
text-align: start;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.kui-list-header:not([data-placeholder="true"])
|
|
144
|
+
.kui-list-header__title-action:hover:not(:disabled) {
|
|
145
|
+
border-color: var(--kui-color-neutral-border-normal);
|
|
146
|
+
background: var(--kui-list-header-hover-background);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.kui-list-header__title-action:focus-visible {
|
|
150
|
+
outline: var(--kui-focus-ring);
|
|
151
|
+
outline-offset: 1px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.kui-list-header__title-action[data-kui-disabled="true"] {
|
|
155
|
+
opacity: 0.48;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.kui-list-header:not([data-placeholder="true"])
|
|
159
|
+
.kui-list-header__title-action:disabled {
|
|
160
|
+
cursor: not-allowed;
|
|
161
|
+
}
|
|
162
|
+
|
|
107
163
|
.kui-list-header__action,
|
|
108
164
|
.kui-list-header__action-layer {
|
|
109
165
|
display: grid;
|
|
@@ -437,6 +437,12 @@
|
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
|
|
440
|
+
:where(:root[data-kui-contrast="more"])
|
|
441
|
+
.kui-nav-stack[data-chrome-material="clear"]
|
|
442
|
+
> .kui-nav-stack__chrome {
|
|
443
|
+
background: var(--kui-chrome-material);
|
|
444
|
+
}
|
|
445
|
+
|
|
440
446
|
@media (forced-colors: active) {
|
|
441
447
|
.kui-nav-stack[data-chrome-material="clear"] > .kui-nav-stack__chrome {
|
|
442
448
|
background: Canvas;
|
|
@@ -522,6 +528,12 @@
|
|
|
522
528
|
}
|
|
523
529
|
}
|
|
524
530
|
|
|
531
|
+
:where(:root[data-kui-contrast="more"])
|
|
532
|
+
.kui-nav-stack[data-bottom-toolbar-material="clear"]
|
|
533
|
+
> .kui-nav-stack__bottom {
|
|
534
|
+
background: var(--kui-chrome-material);
|
|
535
|
+
}
|
|
536
|
+
|
|
525
537
|
@media (forced-colors: active) {
|
|
526
538
|
.kui-nav-stack[data-bottom-toolbar-material="clear"]
|
|
527
539
|
> .kui-nav-stack__bottom {
|
|
@@ -91,6 +91,10 @@
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
:where(:root[data-kui-contrast="more"]) .kui-paged-view__dots {
|
|
95
|
+
border-color: var(--kui-color-neutral-border-quiet);
|
|
96
|
+
}
|
|
97
|
+
|
|
94
98
|
/* Each dot is a 24px target around its 8px mark; the current page's mark is
|
|
95
99
|
a wider pill, so the state never rests on color alone. */
|
|
96
100
|
.kui-paged-view__dot {
|
package/dist/styles/pane.css
CHANGED
|
@@ -395,6 +395,12 @@
|
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
:where(:root[data-kui-contrast="more"])
|
|
399
|
+
.kui-pane[data-header-material="clear"]
|
|
400
|
+
> .kui-pane__header {
|
|
401
|
+
background: var(--kui-chrome-material);
|
|
402
|
+
}
|
|
403
|
+
|
|
398
404
|
@media (forced-colors: active) {
|
|
399
405
|
.kui-pane[data-header-material="clear"] > .kui-pane__header {
|
|
400
406
|
background: Canvas;
|
|
@@ -337,6 +337,12 @@
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
+
:where(:root[data-kui-contrast="more"])
|
|
341
|
+
.kui-tab-scaffold[data-bar-material="clear"]
|
|
342
|
+
> .kui-tab-scaffold__bar {
|
|
343
|
+
background: var(--kui-chrome-material);
|
|
344
|
+
}
|
|
345
|
+
|
|
340
346
|
@media (forced-colors: active) {
|
|
341
347
|
.kui-tab-scaffold[data-bar-material="clear"] > .kui-tab-scaffold__bar {
|
|
342
348
|
background: Canvas;
|
package/dist/styles/text.css
CHANGED
|
@@ -93,8 +93,8 @@ span.kui-text[data-wrap="truncate"] {
|
|
|
93
93
|
white-space: nowrap;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
/* Middle truncation:
|
|
97
|
-
|
|
96
|
+
/* Middle truncation: reserve room for the cut marker, then let the kept suffix
|
|
97
|
+
yield when both pieces cannot fit. Pre keeps a space at the split. */
|
|
98
98
|
.kui-text__truncate-middle {
|
|
99
99
|
display: flex;
|
|
100
100
|
min-width: 0;
|
|
@@ -108,13 +108,16 @@ span.kui-text[data-wrap="truncate"] {
|
|
|
108
108
|
|
|
109
109
|
.kui-text__truncate-head {
|
|
110
110
|
flex: 0 1 auto;
|
|
111
|
-
min-width:
|
|
111
|
+
min-width: 1em;
|
|
112
112
|
overflow: hidden;
|
|
113
113
|
text-overflow: ellipsis;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.kui-text__truncate-tail {
|
|
117
117
|
flex: 0 0 auto;
|
|
118
|
+
max-width: calc(100% - 1em);
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
text-overflow: ellipsis;
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
.kui-text__clamp {
|
|
@@ -555,6 +555,21 @@
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
+
:where(:root[data-kui-contrast="more"])
|
|
559
|
+
.kui-toolbar-control-group[data-material="glass"]:not(
|
|
560
|
+
[data-appearance="borderless"]
|
|
561
|
+
) {
|
|
562
|
+
--kui-toolbar-control-border: var(--kui-color-neutral-border-normal);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
:where(:root[data-kui-contrast="more"])
|
|
566
|
+
.kui-toolbar-control-group[data-material="glass"][data-tone="dark"]:not(
|
|
567
|
+
[data-appearance="borderless"]
|
|
568
|
+
) {
|
|
569
|
+
--kui-toolbar-control-background: var(--kui-color-neutral-fill-loud);
|
|
570
|
+
--kui-toolbar-control-border: var(--kui-toolbar-control-dark-border, #353536);
|
|
571
|
+
}
|
|
572
|
+
|
|
558
573
|
:root[data-kui-effects="static"]
|
|
559
574
|
.kui-toolbar-control-group[data-material="glass"]:not(
|
|
560
575
|
[data-appearance="borderless"]
|
|
@@ -752,6 +752,25 @@
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
+
@layer wa-theme-overrides {
|
|
756
|
+
:root[data-kui-contrast="more"],
|
|
757
|
+
:root[data-kui-contrast="more"]
|
|
758
|
+
:is(
|
|
759
|
+
.wa-theme-default,
|
|
760
|
+
.wa-light,
|
|
761
|
+
.wa-dark,
|
|
762
|
+
.wa-invert,
|
|
763
|
+
.kui-light,
|
|
764
|
+
.kui-dark,
|
|
765
|
+
.kui-invert,
|
|
766
|
+
[data-kui-scheme]
|
|
767
|
+
) {
|
|
768
|
+
--wa-color-surface-border: currentColor;
|
|
769
|
+
--wa-color-neutral-border-normal: currentColor;
|
|
770
|
+
--wa-focus-ring: 3px solid currentColor;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
755
774
|
/*
|
|
756
775
|
* Raw Web Awesome children inside Kerf containers.
|
|
757
776
|
*
|
|
@@ -122,7 +122,8 @@ interface CatalogProps {
|
|
|
122
122
|
content: KerfUiContent;
|
|
123
123
|
collapsed?: boolean;
|
|
124
124
|
theme?: 'light' | 'dark';
|
|
125
|
-
/** Show the controlled increased-contrast toggle when supplied.
|
|
125
|
+
/** Show the controlled increased-contrast toggle when supplied. Set
|
|
126
|
+
* data-kui-contrast="more" on the document root while enabled. */
|
|
126
127
|
increasedContrast?: boolean;
|
|
127
128
|
/** Show the controlled reduced-motion toggle when supplied. The app applies the preference. */
|
|
128
129
|
reducedMotion?: boolean;
|
package/dist/wire-catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Signal } from 'kerfjs';
|
|
2
|
-
import { c as CatalogBackgroundStyle } from './types-
|
|
2
|
+
import { c as CatalogBackgroundStyle } from './types-PGGOsJug.js';
|
|
3
3
|
import './toolbar.js';
|
|
4
4
|
import './semantic-content-BbzjvSu9.js';
|
|
5
5
|
import './extension-attributes-CnqvBmj3.js';
|
package/dist/wire-tag-fields.js
CHANGED
package/dist/workbench-dialog.js
CHANGED
package/dist/workbench.js
CHANGED
package/docs/accessibility.md
CHANGED
|
@@ -8,7 +8,7 @@ These are normative contracts for package components and consuming applications.
|
|
|
8
8
|
- Decorative `LucideIcon` output is `aria-hidden`; pass `label` only when the SVG itself conveys meaning. `size="xs|s|m|l|xl"` selects the 12/16/20/24/32px root-scaled icon steps, and a positive numeric `size` converts pixels to rem; omitting `size` keeps 1em. Size changes the visual only, never the owning control's hit target or accessible name.
|
|
9
9
|
- `ListItem` uses native button Enter/Space behavior. `selected` maps to `aria-current="page"`; `pressed` maps to `aria-pressed`. Selected rows keep the normal foreground over their brand-tinted fill so text retains WCAG AA contrast in light and dark themes. Its leading icon visual is 18px while the row retains its 44px minimum target; multiline icons align to the first text line. Its `trailing` content is dormant and must not contain controls. Its `rootAttributes` slot accepts only application `data-*` metadata and deliberately cannot emit `role="menuitem"` in isolation—a true ARIA menu must own arrow, Home/End, Escape, and focus behavior as one widget.
|
|
10
10
|
- `ListItemLink` shares that row content and geometry but uses native anchor Enter behavior and requires `href`. It has no `action` or `pressed` state. `external` opens a new tab with `rel="noopener noreferrer"`; the default accessible name announces the new tab for a string label, so an explicit `accessibleLabel` should do the same. Disabled and loading links omit `href`, expose `aria-disabled`, and leave the tab order. Its trailing content remains dormant.
|
|
11
|
-
- `ListHeader` owns action naming, disabled state, and disclosure `aria-expanded`. Toggle mode supplies one decorative 18px `DisclosureArrow` when `actionIcon` is omitted; it mirrors `expanded` while the native button's accessible name stays stable. The application must update that controlled state and reveal or hide real content. A valid `count` is visually rendered in an `aria-hidden` neutral pill while the required localized `countLabel` becomes part of the
|
|
11
|
+
- `ListHeader` owns action naming, disabled state, and disclosure `aria-expanded`. Toggle mode supplies one decorative 18px `DisclosureArrow` when `actionIcon` is omitted; it mirrors `expanded` while the native button's accessible name stays stable. The application must update that controlled state and reveal or hide real content. The `titleAction` mode instead puts a native button inside a heading: `titleActionLabel` names its operation, and it has no disclosure arrow or `aria-expanded`. It may have a separate trailing `action` button. A valid `count` is visually rendered in an `aria-hidden` neutral pill while the required localized `countLabel` becomes part of the passive heading or disclosure button's accessible name; zero remains a real count. Optional `badge` and `status` content can appear together and should each carry meaningful text. Name the region a toggle or title action shows or hides with `controls` (its id, reported as `aria-controls` on that button) and hide that region with `List hidden` when it is a List. `titleTriggerAttributes` describes a title action's native popover relationship; `triggerAttributes` describes a toggle or trailing action. A toggle header may also carry one trailing overflow button (`overflowAction`, `overflowLabel`, `overflowIcon`, optional `overflowDisabled` and `overflowTriggerAttributes` with the same popover fields) for the section's own commands: it is a separate button with its own focus stop at the logical end, outside the disclosure button, named by `overflowLabel`, and never toggles the section or carries its `aria-expanded`.
|
|
12
12
|
- Dispose `wireTabBars` and `wireSearchFields` with their owning view. Disposal cancels queued controlled-render focus restoration, so a torn-down view cannot reclaim focus from its successor.
|
|
13
13
|
- `wireNavStack` moves focus into every newly active top view and remembers the last focused descendant of each mounted view for pop restoration. Mark a preferred initial heading or control with `data-nav-focus` (and `tabindex="-1"` when it is not normally tabbable); otherwise the helper uses the first enabled focusable descendant, then a programmatically focusable view-container fallback.
|
|
14
14
|
- In any `.kui-pane`, menu rows, `ListHeader` actions, and toolbar groups keep a minimum 44px target in both dimensions. A `ListHeader` fills the available inline width and keeps that action at the logical end, including in RTL. Its action visual defaults to 18px through `--kui-list-header-action-icon-size` inside a fitted 36px hover square; a transparent hit layer extends the pointer target to at least 44 × 44 around that square without moving layout or enlarging the painted surface. Compact headers are 36px tall like the rest of the compact List family, so their action target is 44px wide and clamped to the 36px header height instead of reaching into a neighboring row. Do not reduce the target to the visible icon, and do not force the button itself to 44px.
|
|
@@ -849,6 +849,13 @@ point, at its `placement` unless the call names one for that opening
|
|
|
849
849
|
keeps the same collision placement, focus management, submenu keyboard
|
|
850
850
|
navigation, and outside/Escape dismissal as a trigger-anchored one.
|
|
851
851
|
|
|
852
|
+
Read a rendered root's state with `isPopupMenuOpen` (`root`). To observe root
|
|
853
|
+
dismissal, capture native `toggle` events on an ancestor and pass each event
|
|
854
|
+
to `closedPopupMenuRoot` (`event`); it returns the root only for its own closed
|
|
855
|
+
panel, not for a submenu closure or opening. The controller resets open state
|
|
856
|
+
and handles focus return before the closed toggle notification. This keeps app
|
|
857
|
+
code independent of PopupMenu's internal trigger and panel selectors.
|
|
858
|
+
|
|
852
859
|
The menu opens in the browser top layer, flips and shifts at viewport edges,
|
|
853
860
|
and limits its height to the available space, scrolling past it. It shifts
|
|
854
861
|
only along its trigger's (or point's) edge, never across it: when neither
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Kerf UI Sketch catalog
|
|
2
2
|
|
|
3
3
|
[Kerf-UI.sketch](Kerf-UI.sketch) is the one Kerf UI Sketch Library. It holds
|
|
4
|
-
all
|
|
4
|
+
all 328 editable light and dark Symbols for the 115 template variants, on one
|
|
5
5
|
page per family: Button, Form Controls, Advanced Inputs, Lists and Data,
|
|
6
6
|
Toolbars and Navigation, and Content and Feedback. Each page shows its light
|
|
7
7
|
masters beside its dark masters on a dark surface, ordered by Symbol name.
|
|
@@ -14,8 +14,11 @@ substitutes for editable Symbols.
|
|
|
14
14
|
|
|
15
15
|
## Install and update
|
|
16
16
|
|
|
17
|
-
The Library was created
|
|
18
|
-
|
|
17
|
+
The Library was created with **Sketch 2026.3.1** and its shipped file was
|
|
18
|
+
reverified with **Sketch 2026.4** on 25 November 2026: all 328 Symbols and 12
|
|
19
|
+
linked cross-family consumer instances passed override, resize, and save/reopen
|
|
20
|
+
checks. Both light and dark library-sync fixtures retained their text
|
|
21
|
+
overrides. Kerf UI ships it as a Sketch Library, not a document template: documents link its Symbols
|
|
19
22
|
and Color Variables, so a new release reaches every design that uses them.
|
|
20
23
|
|
|
21
24
|
To install:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Unified Kerf UI Sketch Library
|
|
2
2
|
|
|
3
3
|
[Kerf-UI.sketch](../Kerf-UI.sketch) is the Library designers install. It is
|
|
4
|
-
rebuilt from the six family Libraries by `npm run sketch:library` and holds
|
|
4
|
+
rebuilt from the six family Libraries by `npm run sketch:library` and holds 328
|
|
5
5
|
Symbols, 141 Color Variables, and Button's 42 shared layer styles and 38 shared
|
|
6
6
|
text styles.
|
|
7
7
|
|
package/docs/design/templates.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The SVG sheets remain the broad, static catalog. The native
|
|
4
4
|
[Kerf UI Sketch Library](sketch/unified/README.md), `Kerf-UI.sketch`, adds
|
|
5
|
-
|
|
5
|
+
328 editable Symbols for every template variant, built from production CSS
|
|
6
6
|
captures and verified through resize, override, linked-consumer sync, and
|
|
7
7
|
save/reopen checks. It ships with the UI package under `docs/design/sketch/`.
|
|
8
8
|
The [native Sketch coverage matrix](sketch/coverage.md) tracks each template
|
package/docs/workbench.md
CHANGED
|
@@ -308,12 +308,17 @@ below it. `mainBottomToolbar` also takes a `center`. A panel's
|
|
|
308
308
|
The `Pane`s and `List`s the Workbench composes around your content are
|
|
309
309
|
configurable the same way:
|
|
310
310
|
|
|
311
|
-
- `mainPane` (`PaneConfig`: `contentElement`, `contentLabel`, `separators`,
|
|
311
|
+
- `mainPane` (`PaneConfig`: `contentElement`, `contentLabel`, `contentClassName`, `separators`,
|
|
312
312
|
`safeAreaEdges`, `chromeDividers`, `appearance`, `deepInset`,
|
|
313
313
|
`scrollClearance`, `headerPresentation`, `tabIndex`, `outlined`) configures the work area's
|
|
314
314
|
`Pane`, which exists whenever the work area has a toolbar, `mainHeader`, or
|
|
315
315
|
`mainFooter`. Without that chrome, `appearance: "sunken"` paints the main
|
|
316
316
|
region's own scroll surface;
|
|
317
|
+
- `mainPane.contentClassName` names the Pane's scrolling content slot when that
|
|
318
|
+
Pane exists. Use an app-owned class to find it for scroll restoration, for
|
|
319
|
+
example `mainPane: { contentClassName: 'review-scroll-region' }`. If the
|
|
320
|
+
content contains its own nested scroller, name and target that app-owned
|
|
321
|
+
scroller instead. The Pane's header and footer remain outside its scroll slot;
|
|
317
322
|
- a panel's `pane` configures the `Pane` a `toolbar` panel's `content` renders
|
|
318
323
|
in — for example `{ contentElement: "nav", contentLabel: "Files" }` for a
|
|
319
324
|
navigator rail. Without a toolbar, `appearance: "sunken"` paints the panel
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/collections/list-header/list-header.tsx"],"names":[],"mappings":";;;;;;;;AAcA,IAAM,8BAAA,uBAAqC,GAAA,CAAI;AAAA,EAC7C,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,qBAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAC,CAAA;AACD,IAAM,iCAAA,uBAAwC,GAAA,CAAI;AAAA,EAChD,aAAA;AAAA,EACA;AACF,CAAC,CAAA;AAqKM,SAAS,UAAA,CAAW;AAAA,EACzB,KAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,YAAA,GAAe,CAAA;AAAA,EACf,KAAA;AAAA,EACA,UAAA;A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AC1B,YAAA,EAAY,KAAA;AAAA,MACZ,WAAA,EAAW,OAAO,MAAA,GAAS,MAAA;AAAA,MAC3B,mBAAA,EACE,WAAA,KAAgB,aAAA,GAAgB,aAAA,GAAgB,MAAA;AAAA,MAElD,qBAAA,EAAqB,aAAA;AAAA,MACrB,aAAA,EAAY,OAAA;AAAA,MACZ,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,MACzC,WAAA,EAAW,IAAA;AAAA,MACX,IAAA;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,OAAM,wBAAA,EACT,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAS,IAAI,YAAY,CAAA,CAAA;AAAA,cACzB,MAAA,EAAO,MAAA;AAAA,cACP,YAAA,EAAY,eAAA;AAAA,cAEX,QAAA,EAAA;AAAA;AAAA,WACH;AAAA,UACC;AAAA,SAAA,EACH,CAAA;AAAA,QACC,MAAA,oBACC,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACE,GAAG,0BAAA;AAAA,YACJ,IAAA,EAAK,QAAA;AAAA,YACL,KAAA,EAAM,yBAAA;AAAA,YACN,aAAA,EAAa,cAAc,MAAA,GAAY,MAAA;AAAA,YACvC,YAAA,EAAY,WAAA;AAAA,YACZ,KAAA,EAAO,iBAAiB,cAAA,GAAiB,WAAA;AAAA,YACzC,QAAA,EAAU,kBAAkB,WAAA,IAAe,MAAA;AAAA,YAC3C,mBAAA,EAAmB,iBAAiB,MAAA,GAAS,MAAA;AAAA,YAE5C,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-42NLFCIN.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport {\n filterControlAttributes,\n filterDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport { em } from '../../../shared/styles/css-values.js';\nimport type { SemanticTone } from '../../../shared/styles/semantic-tone.js';\nimport type { HeadingLevel } from '../../actions/toolbar-text/toolbar-text.js';\nimport { Badge } from '../../feedback/badge/badge.js';\nimport { Skeleton } from '../../feedback/skeleton/skeleton.js';\nimport { DisclosureArrow } from '../../navigation/disclosure-arrow/disclosure-arrow.js';\nimport { Text } from '../../typography/text/text.js';\n\nconst PROTECTED_ROOT_DATA_ATTRIBUTES = new Set([\n 'data-component',\n 'data-action',\n 'data-has-badge',\n 'data-has-count',\n 'data-density',\n 'data-size',\n 'data-divider',\n 'data-inline',\n 'data-width',\n 'data-wrap',\n 'data-indicator-tone',\n 'data-toggle',\n 'data-leading-edge',\n]);\nconst PROTECTED_TRIGGER_DATA_ATTRIBUTES = new Set([\n 'data-action',\n 'data-kui-disabled',\n]);\n\ntype ListHeaderRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-action'?: never;\n 'data-has-badge'?: never;\n 'data-has-count'?: never;\n 'data-density'?: never;\n 'data-size'?: never;\n 'data-divider'?: never;\n 'data-inline'?: never;\n 'data-width'?: never;\n 'data-wrap'?: never;\n 'data-indicator-tone'?: never;\n 'data-toggle'?: never;\n 'data-leading-edge'?: never;\n }\n>;\n\ntype ListHeaderTriggerAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-action'?: never;\n 'data-kui-disabled'?: never;\n popoverTarget?: string;\n popoverTargetAction?: 'toggle' | 'show' | 'hide';\n 'aria-controls'?: string;\n 'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';\n }\n>;\n\ninterface ListHeaderBaseProps {\n label: string;\n /** Visual label size, independent of the native heading level. Default `sm`. */\n size?: 'xs' | 'sm' | 'm' | 'l' | 'xl';\n density?: 'default' | 'compact' | /** @deprecated Use default. */ 'standard';\n divider?: 'none' | 'before' | 'after' | 'both';\n /** Shrink-wrap the header without its default outer margin, border, or padding. */\n inline?: boolean;\n /** Fill the available row or shrink-wrap while retaining normal header geometry. */\n width?: 'fill' | 'content';\n /**\n * Wrap a long label onto further lines instead of truncating it to one\n * ellipsized line. Default false. Use it where the whole label must stay\n * readable in a narrow column, such as a specimen or form-section heading.\n */\n wrap?: boolean;\n /**\n * Start the label on another component's leading-content edge (KF-J8GMA2).\n * `summary-row` spans the full width as `SummaryRow`s do and starts the\n * label where their leading content starts, compacting with them at the\n * same width; for a fill-width header directly above summary rows.\n */\n leadingEdge?: 'default' | 'summary-row';\n indicatorTone?: 'neutral' | 'accent' | 'pop' | 'danger';\n /** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */\n placeholder?: boolean;\n rootAttributes?: ListHeaderRootAttributes;\n triggerAttributes?: ListHeaderTriggerAttributes;\n /**\n * The id of the region the header's toggle or action shows or hides,\n * reported as `aria-controls` on its trigger.\n */\n controls?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A toggle header's one trailing overflow button (KF-X2MRCT): its own focus\n * stop at the logical end, outside the disclosure button, opening the\n * section's commands. The label and arrow toggle the section; the overflow\n * button never does.\n */\ntype ListHeaderOverflowProps =\n | {\n /** The overflow button's `data-action`. */\n overflowAction: string;\n /** Its accessible name and tooltip (\"Group actions\"). */\n overflowLabel: string;\n /** Its icon, typically an `Ellipsis` `LucideIcon`. */\n overflowIcon: SafeHtml;\n overflowDisabled?: boolean;\n /**\n * Popup metadata for the overflow button (`popoverTarget`,\n * `aria-haspopup`, `aria-controls`, `data-*`).\n */\n overflowTriggerAttributes?: ListHeaderTriggerAttributes;\n }\n | {\n overflowAction?: never;\n overflowLabel?: never;\n overflowIcon?: never;\n overflowDisabled?: never;\n overflowTriggerAttributes?: never;\n };\n\n/** The non-toggle modes take no overflow button. */\ntype ListHeaderNoOverflow = {\n overflowAction?: never;\n overflowLabel?: never;\n overflowIcon?: never;\n overflowDisabled?: never;\n overflowTriggerAttributes?: never;\n};\n\ntype ListHeaderModeProps =\n | ({\n /** Render the title as a controlled disclosure trigger. */\n toggle: true;\n /** A toggle's label is its button text, not a heading. */\n headingLevel?: never;\n action: string;\n expanded: boolean;\n actionIcon?: SafeHtml;\n actionLabel?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n } & ListHeaderOverflowProps)\n | ({\n /** Render a separately named trailing action. */\n toggle?: false;\n /**\n * Native heading level (`h1`–`h6`) of the label. Default `2`. Match the\n * document outline; the visual treatment does not change.\n */\n headingLevel?: HeadingLevel;\n action: string;\n actionLabel: string;\n actionIcon: SafeHtml;\n expanded?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n } & ListHeaderNoOverflow)\n | ({\n /** Render a passive section heading. */\n toggle?: false;\n /**\n * Native heading level (`h1`–`h6`) of the label. Default `2`. Match the\n * document outline; the visual treatment does not change.\n */\n headingLevel?: HeadingLevel;\n action?: never;\n actionLabel?: never;\n actionIcon?: never;\n expanded?: never;\n actionDisabled?: never;\n disabledReason?: never;\n } & ListHeaderNoOverflow);\n\ntype ListHeaderIndicatorProps =\n | { count: number; countLabel: string; badge?: never; status?: never }\n | {\n count?: never;\n countLabel?: never;\n /** Non-count indicator text or content; ListHeader wraps it in its own compact Badge. */\n badge?: string | SafeHtml | undefined;\n /** Status text or content, wrapped in its own compact Badge after `badge`. */\n status?: string | SafeHtml | undefined;\n };\n\nexport type ListHeaderProps = ListHeaderBaseProps &\n ListHeaderIndicatorProps &\n ListHeaderModeProps;\n\nexport function ListHeader({\n label,\n size = 'sm',\n headingLevel = 2,\n count,\n countLabel,\n badge,\n status,\n density = 'default',\n divider = 'none',\n inline = false,\n width = 'fill',\n wrap = false,\n leadingEdge = 'default',\n indicatorTone = 'neutral',\n action,\n actionLabel,\n actionIcon,\n actionDisabled = false,\n disabledReason,\n expanded,\n toggle = false,\n overflowAction,\n overflowLabel,\n overflowIcon,\n overflowDisabled = false,\n overflowTriggerAttributes = {},\n placeholder = false,\n rootAttributes = {},\n triggerAttributes = {},\n controls,\n slot,\n}: ListHeaderProps) {\n const extensionRootAttributes = filterDataAttributes(\n rootAttributes,\n PROTECTED_ROOT_DATA_ATTRIBUTES,\n );\n const extensionTriggerAttributes = {\n ...filterControlAttributes(\n triggerAttributes,\n PROTECTED_TRIGGER_DATA_ATTRIBUTES,\n ),\n ...(controls === undefined ? {} : { 'aria-controls': controls }),\n };\n const normalizedCount =\n typeof count === 'number' && Number.isSafeInteger(count) && count >= 0\n ? count\n : undefined;\n const normalizedCountLabel =\n normalizedCount === undefined\n ? undefined\n : typeof countLabel === 'string' && countLabel.trim()\n ? countLabel\n : String(normalizedCount);\n const renderedBadge = normalizedCount === undefined ? badge : undefined;\n const renderedStatus = normalizedCount === undefined ? status : undefined;\n const hasBadge = Boolean(renderedBadge || renderedStatus);\n const renderedActionIcon =\n actionIcon ??\n (toggle ? <DisclosureArrow open={Boolean(expanded)} /> : undefined);\n const accessibleLabel =\n normalizedCount === undefined\n ? undefined\n : `${label}, ${normalizedCountLabel}`;\n const badgeTone: SemanticTone =\n indicatorTone === 'accent' ? 'info' : indicatorTone;\n const indicator =\n normalizedCount !== undefined ? (\n <Badge size=\"compact\" tone={badgeTone} ariaHidden={!placeholder}>\n {placeholder ? <Skeleton width={em(1.75)} /> : normalizedCount}\n </Badge>\n ) : (\n <>\n {renderedBadge && (\n <Badge size=\"compact\" tone={badgeTone}>\n {placeholder ? <Skeleton width={em(1.75)} /> : renderedBadge}\n </Badge>\n )}\n {renderedStatus && (\n <Badge size=\"compact\" tone={badgeTone}>\n {placeholder ? <Skeleton width={em(1.75)} /> : renderedStatus}\n </Badge>\n )}\n </>\n );\n const busy = placeholder ? ('true' as const) : undefined;\n if (toggle) {\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(hasBadge)}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density === 'standard' ? 'default' : density}\n data-size={size}\n data-divider={divider}\n data-inline={String(inline)}\n data-width={width}\n data-wrap={wrap ? 'true' : undefined}\n data-leading-edge={\n leadingEdge === 'summary-row' ? 'summary-row' : undefined\n }\n data-indicator-tone={indicatorTone}\n data-toggle=\"true\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n slot={slot}\n >\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__title kui-list-header__toggle\"\n data-action={placeholder ? undefined : action}\n title={actionDisabled ? disabledReason : undefined}\n disabled={actionDisabled || placeholder || undefined}\n data-kui-disabled={actionDisabled ? 'true' : undefined}\n aria-label={accessibleLabel}\n aria-expanded={String(Boolean(expanded))}\n >\n <Text variant=\"span\">{label}</Text>\n {indicator}\n {renderedActionIcon && (\n <span class=\"kui-list-header__action-layer\">\n {renderedActionIcon}\n </span>\n )}\n </button>\n {overflowAction && (\n <button\n {...filterControlAttributes(\n overflowTriggerAttributes,\n PROTECTED_TRIGGER_DATA_ATTRIBUTES,\n )}\n type=\"button\"\n class=\"kui-list-header__action\"\n data-list-header-overflow=\"true\"\n data-action={placeholder ? undefined : overflowAction}\n aria-label={overflowLabel}\n title={overflowLabel}\n disabled={overflowDisabled || placeholder || undefined}\n data-kui-disabled={overflowDisabled ? 'true' : undefined}\n >\n {overflowIcon}\n </button>\n )}\n </header>\n );\n }\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(hasBadge)}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density === 'standard' ? 'default' : density}\n data-size={size}\n data-divider={divider}\n data-inline={String(inline)}\n data-width={width}\n data-wrap={wrap ? 'true' : undefined}\n data-leading-edge={\n leadingEdge === 'summary-row' ? 'summary-row' : undefined\n }\n data-indicator-tone={indicatorTone}\n data-toggle=\"false\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n slot={slot}\n >\n <div class=\"kui-list-header__title\">\n <Text\n variant={`h${headingLevel}`}\n border=\"none\"\n aria-label={accessibleLabel}\n >\n {label}\n </Text>\n {indicator}\n </div>\n {action && (\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__action\"\n data-action={placeholder ? undefined : action}\n aria-label={actionLabel}\n title={actionDisabled ? disabledReason : actionLabel}\n disabled={actionDisabled || placeholder || undefined}\n data-kui-disabled={actionDisabled ? 'true' : undefined}\n >\n {renderedActionIcon}\n </button>\n )}\n </header>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/pane/model/pane-config-props.ts"],"names":[],"mappings":";AAgBO,SAAS,gBACd,MAAA,EACqB;AACrB,EAAA,OAAO;AAAA,IACL,gBAAgB,MAAA,EAAQ,cAAA;AAAA,IACxB,cAAc,MAAA,EAAQ,YAAA;AAAA,IACtB,YAAY,MAAA,EAAQ,UAAA;AAAA,IACpB,eAAe,MAAA,EAAQ,aAAA;AAAA,IACvB,gBAAgB,MAAA,EAAQ,cAAA;AAAA,IACxB,eAAe,MAAA,EAAQ,aAAA;AAAA,IACvB,mBAAmB,MAAA,EAAQ,iBAAA;AAAA,IAC3B,oBAAoB,MAAA,EAAQ,kBAAA;AAAA,IAC5B,YAAY,MAAA,EAAQ,UAAA;AAAA,IACpB,oBAAoB,MAAA,EAAQ,kBAAA;AAAA,IAC5B,YAAY,MAAA,EAAQ,UAAA;AAAA,IACpB,YAAY,MAAA,EAAQ,UAAA;AAAA,IACpB,MAAM,MAAA,EAAQ,IAAA;AAAA,IACd,WAAW,MAAA,EAAQ,SAAA;AAAA,IACnB,iBAAiB,MAAA,EAAQ,eAAA;AAAA,IACzB,UAAU,MAAA,EAAQ,QAAA;AAAA,IAClB,UAAU,MAAA,EAAQ,QAAA;AAAA,IAClB,YAAY,MAAA,EAAQ,UAAA;AAAA,IACpB,iBAAiB,MAAA,EAAQ;AAAA,GAC3B;AACF","file":"chunk-EI55KWHP.js","sourcesContent":["import type { PaneConfig } from '../pane.js';\n\n/**\n * Every {@link PaneConfig} field, each present (possibly `undefined`). The\n * mapped type makes a new `PaneConfig` field a type error here until it is\n * forwarded, so a composite can never silently drop pane configuration.\n */\ntype ForwardedPaneConfig = {\n [K in keyof Required<PaneConfig>]: PaneConfig[K];\n};\n\n/**\n * The `Pane` props a composite (a Workbench panel or work area, a\n * CollapsiblePanel, a NavStack view) forwards from the app's `PaneConfig`. An\n * omitted or `undefined` field stays `undefined`, so the Pane keeps its default.\n */\nexport function paneConfigProps(\n config: PaneConfig | undefined,\n): ForwardedPaneConfig {\n return {\n contentElement: config?.contentElement,\n contentLabel: config?.contentLabel,\n separators: config?.separators,\n safeAreaEdges: config?.safeAreaEdges,\n chromeDividers: config?.chromeDividers,\n compactChrome: config?.compactChrome,\n compactChromeOpen: config?.compactChromeOpen,\n headerPresentation: config?.headerPresentation,\n scrollEdge: config?.scrollEdge,\n scrollEdgeDistance: config?.scrollEdgeDistance,\n appearance: config?.appearance,\n background: config?.background,\n tint: config?.tint,\n deepInset: config?.deepInset,\n scrollClearance: config?.scrollClearance,\n tabIndex: config?.tabIndex,\n outlined: config?.outlined,\n anchorName: config?.anchorName,\n scrollAnchoring: config?.scrollAnchoring,\n };\n}\n"]}
|