@kerfjs/ui 5.0.0-beta.55 → 5.0.0-beta.56
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 +12 -10
- package/ai/compile-time-contracts-v1.json +2 -2
- package/ai/component-catalog-v2.json +149 -39
- package/ai/component-catalog.json +202 -51
- package/ai/public-api-signatures-v1.md +439 -97
- package/ai/skill.md +43 -40
- package/ai/webawesome-jsx-signatures-v1.md +8 -2
- package/dist/app-tab.js +1 -1
- package/dist/badge.d.ts +35 -7
- package/dist/badge.js +1 -1
- package/dist/browser/content-item.js +3 -0
- package/dist/browser/select.js +1 -0
- package/dist/catalog-resources.d.ts +12 -1
- package/dist/catalog.d.ts +14 -3
- package/dist/catalog.js +52 -43
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-WZ2GLEY4.js → chunk-2G2ZJQYK.js} +2 -14
- package/dist/chunk-2G2ZJQYK.js.map +1 -0
- package/dist/{chunk-D7GWXIAS.js → chunk-5I7QGQVT.js} +1 -1
- package/dist/chunk-5I7QGQVT.js.map +1 -0
- package/dist/{chunk-RNRUVPJ3.js → chunk-63ZWBGE3.js} +3 -2
- package/dist/chunk-63ZWBGE3.js.map +1 -0
- package/dist/{chunk-44IG7PFV.js → chunk-6CINWX2E.js} +3 -3
- package/dist/{chunk-44IG7PFV.js.map → chunk-6CINWX2E.js.map} +1 -1
- package/dist/{chunk-C2FAYFDE.js → chunk-AGXQQFKZ.js} +2 -2
- package/dist/{chunk-C2FAYFDE.js.map → chunk-AGXQQFKZ.js.map} +1 -1
- package/dist/{chunk-ATHXW6RP.js → chunk-AHEG27M7.js} +2 -2
- package/dist/{chunk-ATHXW6RP.js.map → chunk-AHEG27M7.js.map} +1 -1
- package/dist/{chunk-7GUQYHKA.js → chunk-AK67F6QN.js} +4 -1
- package/dist/chunk-AK67F6QN.js.map +1 -0
- package/dist/chunk-BFPBS5Y4.js +250 -0
- package/dist/chunk-BFPBS5Y4.js.map +1 -0
- package/dist/{chunk-5OLVUEND.js → chunk-DG6G5EPF.js} +4 -6
- package/dist/chunk-DG6G5EPF.js.map +1 -0
- package/dist/{chunk-MTM43SJO.js → chunk-G33XC2NB.js} +1 -1
- package/dist/chunk-G33XC2NB.js.map +1 -0
- package/dist/{chunk-TZ5IHWB2.js → chunk-K6UNVKDK.js} +3 -3
- package/dist/{chunk-TZ5IHWB2.js.map → chunk-K6UNVKDK.js.map} +1 -1
- package/dist/{chunk-HMQ2ZDGG.js → chunk-KROD7KZK.js} +3 -2
- package/dist/chunk-KROD7KZK.js.map +1 -0
- package/dist/{chunk-5NDQABWK.js → chunk-M7QV3IHH.js} +3 -1
- package/dist/chunk-M7QV3IHH.js.map +1 -0
- package/dist/{chunk-RNZAKSME.js → chunk-MA6Z6EIM.js} +3 -3
- package/dist/{chunk-RNZAKSME.js.map → chunk-MA6Z6EIM.js.map} +1 -1
- package/dist/chunk-MA73TA6D.js +42 -0
- package/dist/chunk-MA73TA6D.js.map +1 -0
- package/dist/{chunk-ZMBU522F.js → chunk-MEY33VWB.js} +2 -2
- package/dist/{chunk-ZMBU522F.js.map → chunk-MEY33VWB.js.map} +1 -1
- package/dist/{chunk-T22EM4ET.js → chunk-MOBRFZH3.js} +81 -31
- package/dist/chunk-MOBRFZH3.js.map +1 -0
- package/dist/chunk-MP2GDBQZ.js +50 -0
- package/dist/chunk-MP2GDBQZ.js.map +1 -0
- package/dist/{chunk-3NBL3OUQ.js → chunk-NAPE7WUS.js} +2 -2
- package/dist/chunk-NAPE7WUS.js.map +1 -0
- package/dist/{chunk-BSKEH3UC.js → chunk-NBYTIVHS.js} +2 -2
- package/dist/{chunk-BSKEH3UC.js.map → chunk-NBYTIVHS.js.map} +1 -1
- package/dist/chunk-O3EXIBEZ.js +114 -0
- package/dist/chunk-O3EXIBEZ.js.map +1 -0
- package/dist/{chunk-R754MHXX.js → chunk-PK4N5QTO.js} +7 -6
- package/dist/chunk-PK4N5QTO.js.map +1 -0
- package/dist/{chunk-EAX2GSS4.js → chunk-QQOTQTDD.js} +51 -20
- package/dist/chunk-QQOTQTDD.js.map +1 -0
- package/dist/{chunk-LZXQVUGN.js → chunk-T4UZTNZ4.js} +4 -4
- package/dist/{chunk-LZXQVUGN.js.map → chunk-T4UZTNZ4.js.map} +1 -1
- package/dist/{chunk-N7FHFNT6.js → chunk-V65EOWNF.js} +33 -5
- package/dist/chunk-V65EOWNF.js.map +1 -0
- package/dist/{chunk-GUIHMIT2.js → chunk-VNPQDCQZ.js} +3 -3
- package/dist/{chunk-GUIHMIT2.js.map → chunk-VNPQDCQZ.js.map} +1 -1
- package/dist/{chunk-5I22LMCV.js → chunk-VZOFZPSO.js} +2 -2
- package/dist/chunk-VZOFZPSO.js.map +1 -0
- package/dist/{chunk-4BIMLITI.js → chunk-WLG6SSNT.js} +5 -3
- package/dist/chunk-WLG6SSNT.js.map +1 -0
- package/dist/{chunk-NE5JAOQS.js → chunk-WOUF7YXM.js} +3 -3
- package/dist/{chunk-NE5JAOQS.js.map → chunk-WOUF7YXM.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +14 -3
- package/dist/collapsible-panel.js +13 -16
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/content-item.d.ts +46 -0
- package/dist/content-item.js +4 -0
- package/dist/content-item.js.map +1 -0
- package/dist/css-values.d.ts +5 -11
- package/dist/css-values.js +1 -1
- package/dist/disclosure-arrow.d.ts +4 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/floating-toolbar.d.ts +17 -6
- package/dist/floating-toolbar.js +1 -1
- package/dist/grid.js +1 -1
- package/dist/help-tags-register.d.ts +13 -0
- package/dist/help-tags-register.js +9 -0
- package/dist/help-tags-register.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +27 -26
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +14 -1
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +1 -1
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +3 -10
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +10 -3
- package/dist/list.js +1 -1
- package/dist/nav-stack.d.ts +38 -5
- package/dist/nav-stack.js +4 -1
- package/dist/pane.d.ts +20 -2
- package/dist/pane.js +1 -1
- package/dist/{panel-toolbar-BFQxFITu.d.ts → panel-toolbar-C8sF-YZC.d.ts} +12 -1
- package/dist/popup-menu-register.js +3 -2
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.js +1 -1
- package/dist/row.d.ts +1 -1
- package/dist/row.js +1 -1
- package/dist/select-register.js +70 -3
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +46 -8
- package/dist/select.js +2 -1
- package/dist/{divider-sides-BzB6rphT.d.ts → sides-BPSWde0A.d.ts} +1 -3
- package/dist/skeleton.js +1 -1
- package/dist/spacer.js +1 -1
- package/dist/split-view.d.ts +31 -3
- package/dist/split-view.js +33 -5
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/badge.css +13 -0
- package/dist/styles/catalog/components/catalog-example.css +1 -1
- package/dist/styles/catalog/components/catalog-stage.css +1 -1
- package/dist/styles/collapsible-panel.css +192 -39
- package/dist/styles/content-item.css +30 -0
- package/dist/styles/floating-toolbar.css +5 -0
- package/dist/styles/foundation.css +28 -19
- package/dist/styles/layout.css +1 -21
- package/dist/styles/list-action-row.css +13 -1
- package/dist/styles/list-inset-text.css +1 -2
- package/dist/styles/list-item.css +14 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/nav-stack.css +29 -64
- package/dist/styles/pane.css +33 -1
- package/dist/styles/popup-menu.css +78 -0
- package/dist/styles/resizable-region.css +53 -10
- package/dist/styles/select.css +39 -12
- package/dist/styles/split-view.css +21 -25
- package/dist/styles/tab-scaffold.css +36 -14
- package/dist/styles/text.css +1 -1
- package/dist/styles/token-search-field.css +4 -4
- package/dist/styles/toolbar-control-group.css +31 -12
- package/dist/styles/toolbar.css +14 -5
- package/dist/styles/value-table.css +19 -2
- package/dist/styles/webawesome.css +3 -1
- package/dist/styles/workbench.css +134 -31
- package/dist/tab-scaffold.d.ts +35 -1
- package/dist/tab-scaffold.js +50 -16
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/token-search-field.d.ts +4 -2
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +12 -4
- package/dist/toolbar.js +1 -1
- package/dist/{types-D6vzj-VT.d.ts → types-DXAGogOS.d.ts} +39 -6
- package/dist/value-table.js +1 -1
- package/dist/webawesome.d.ts +7 -1
- package/dist/wire-catalog.d.ts +12 -1
- package/dist/wire-catalog.js +10 -2
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +59 -22
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +116 -7
- package/docs/app-layouts.md +9 -7
- package/docs/catalog.md +17 -3
- package/docs/collapsible-panel.md +26 -7
- package/docs/component-contract.md +36 -10
- package/docs/component-selection.md +41 -40
- package/docs/design/templates/empty-state/with-action-dark.svg +1 -1
- package/docs/design/templates/empty-state/with-action.svg +1 -1
- package/docs/design/templates/empty-state-dark.svg +1 -1
- package/docs/design/templates/empty-state.svg +1 -1
- package/docs/design/templates/list/compact-dark.svg +1 -1
- package/docs/design/templates/list/compact.svg +1 -1
- package/docs/design/templates/list/stack-dark.svg +1 -1
- package/docs/design/templates/list/stack.svg +1 -1
- package/docs/design/templates/list-action-row/default-dark.svg +1 -1
- package/docs/design/templates/list-action-row/default.svg +1 -1
- package/docs/design/templates/list-action-row/selected-dark.svg +1 -1
- package/docs/design/templates/list-action-row/selected.svg +1 -1
- package/docs/design/templates/list-action-row-dark.svg +1 -1
- package/docs/design/templates/list-action-row.svg +1 -1
- package/docs/design/templates/list-dark.svg +1 -1
- package/docs/design/templates/list-item/default-dark.svg +1 -1
- package/docs/design/templates/list-item/default.svg +1 -1
- package/docs/design/templates/list-item/selected-dark.svg +1 -1
- package/docs/design/templates/list-item/selected.svg +1 -1
- package/docs/design/templates/list-item/trailing-dark.svg +1 -1
- package/docs/design/templates/list-item/trailing.svg +1 -1
- package/docs/design/templates/list-item-dark.svg +1 -1
- package/docs/design/templates/list-item.svg +1 -1
- package/docs/design/templates/list.svg +1 -1
- package/docs/design/templates/value-table/details-dark.svg +1 -1
- package/docs/design/templates/value-table/details.svg +1 -1
- package/docs/design/templates/value-table-dark.svg +1 -1
- package/docs/design/templates/value-table.svg +1 -1
- package/docs/design-philosophy.md +1 -1
- package/docs/examples/command-palette-adapter.tsx +3 -2
- package/docs/layout.md +69 -29
- package/docs/nav-stack.md +45 -1
- package/docs/recipes.md +4 -3
- package/docs/split-view.md +46 -2
- package/docs/tab-scaffold.md +50 -1
- package/docs/type-contracts.md +17 -17
- package/docs/ux-demo.md +2 -2
- package/docs/webawesome-theme.md +1 -2
- package/docs/workbench.md +45 -9
- package/llms.txt +32 -4
- package/package.json +13 -2
- package/ux-demo/recipes/collapsible-sidebar.tsx +3 -2
- package/ux-demo/recipes/navigation-sidebar.tsx +3 -2
- package/ux-demo/recipes/navigation-stack.tsx +3 -2
- package/dist/chunk-3NBL3OUQ.js.map +0 -1
- package/dist/chunk-4BIMLITI.js.map +0 -1
- package/dist/chunk-5I22LMCV.js.map +0 -1
- package/dist/chunk-5NDQABWK.js.map +0 -1
- package/dist/chunk-5OLVUEND.js.map +0 -1
- package/dist/chunk-7GUQYHKA.js.map +0 -1
- package/dist/chunk-D7GWXIAS.js.map +0 -1
- package/dist/chunk-DQA5FMOX.js +0 -85
- package/dist/chunk-DQA5FMOX.js.map +0 -1
- package/dist/chunk-EAX2GSS4.js.map +0 -1
- package/dist/chunk-HMQ2ZDGG.js.map +0 -1
- package/dist/chunk-MTM43SJO.js.map +0 -1
- package/dist/chunk-N7FHFNT6.js.map +0 -1
- package/dist/chunk-R754MHXX.js.map +0 -1
- package/dist/chunk-RNRUVPJ3.js.map +0 -1
- package/dist/chunk-T22EM4ET.js.map +0 -1
- package/dist/chunk-WZ2GLEY4.js.map +0 -1
- package/dist/chunk-XD7DWYXG.js +0 -34
- package/dist/chunk-XD7DWYXG.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as kerfjs from 'kerfjs';
|
|
2
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
|
+
|
|
4
|
+
/** Whether the item's always-reserved 1px border is transparent or visible. */
|
|
5
|
+
type ContentItemFrame = 'none' | 'framed';
|
|
6
|
+
/** Corner shape: the 12px rounded rectangle or the 22px pill. */
|
|
7
|
+
type ContentItemShape = 'rounded' | 'pill';
|
|
8
|
+
type ContentItemRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
9
|
+
'data-component'?: never;
|
|
10
|
+
}>;
|
|
11
|
+
interface ContentItemProps {
|
|
12
|
+
/** Item content; a plain string is allowed for bare copy. */
|
|
13
|
+
children?: KerfUiContent | string;
|
|
14
|
+
/**
|
|
15
|
+
* `framed` paints the standard neutral border in the 1px the item always
|
|
16
|
+
* reserves, so framing never changes geometry. Frame only an item that
|
|
17
|
+
* marks a real distinction. Defaults to `none` (transparent border).
|
|
18
|
+
*/
|
|
19
|
+
frame?: ContentItemFrame;
|
|
20
|
+
/** Corner shape. Defaults to `rounded`. */
|
|
21
|
+
shape?: ContentItemShape;
|
|
22
|
+
/**
|
|
23
|
+
* Names the item as a distinct region (`role="region"`). Omit it for an
|
|
24
|
+
* ordinary item, which stays a non-landmark grouping.
|
|
25
|
+
*/
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Makes the item a programmatic focus target (`tabindex="-1"`, never a tab
|
|
29
|
+
* stop), for example the preferred initial focus of a NavStack view when
|
|
30
|
+
* combined with `data-nav-focus` in `rootAttributes`.
|
|
31
|
+
*/
|
|
32
|
+
focusTarget?: boolean;
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Safe `data-*` metadata; component-owned structural attributes stay protected. */
|
|
35
|
+
rootAttributes?: ContentItemRootAttributes;
|
|
36
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
37
|
+
slot?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* One self-contained `.kui-content` child: an 8px inline margin, a real 1px
|
|
41
|
+
* border (transparent unless `framed`), 8px padding, and a rounded or pill
|
|
42
|
+
* radius. It owns that whole geometry, so wrappers must not add more.
|
|
43
|
+
*/
|
|
44
|
+
declare function ContentItem({ children, frame, shape, ariaLabel, focusTarget, className, rootAttributes, slot, }: ContentItemProps): kerfjs.SafeHtml;
|
|
45
|
+
|
|
46
|
+
export { ContentItem, type ContentItemFrame, type ContentItemProps, type ContentItemShape };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"content-item.js"}
|
package/dist/css-values.d.ts
CHANGED
|
@@ -41,9 +41,8 @@ type CssColor = CssValue & {
|
|
|
41
41
|
* a surface. Mint it with {@link uiColor} and a foreground token name
|
|
42
42
|
* ({@link UiForegroundColorName}) or with {@link foregroundColorVar}. It is a
|
|
43
43
|
* {@link CssColor}, but a plain `CssColor` is not a foreground color: fill,
|
|
44
|
-
* border, and surface tokens
|
|
45
|
-
*
|
|
46
|
-
* invisible.
|
|
44
|
+
* border, and surface tokens are pale backgrounds that leave a foreground
|
|
45
|
+
* nearly invisible.
|
|
47
46
|
*/
|
|
48
47
|
type CssForegroundColor = CssColor & {
|
|
49
48
|
readonly [cssForegroundColorBrand]: 'CssForegroundColor';
|
|
@@ -53,16 +52,11 @@ type CssFlexBasis = CssLength | 'auto' | 'content' | 'min-content' | 'max-conten
|
|
|
53
52
|
type CssSizeKeyword = 'auto' | 'min-content' | 'max-content' | 'fit-content';
|
|
54
53
|
/** A complete width/height value accepted by dimension-valued UI props. */
|
|
55
54
|
type CssSize = CssLength | CssSizeKeyword;
|
|
56
|
-
declare const uiColorNames: readonly ["
|
|
55
|
+
declare const uiColorNames: readonly ["brand-border-loud", "brand-border-normal", "brand-border-quiet", "brand-fill-loud", "brand-fill-normal", "brand-fill-quiet", "brand-on-fill", "brand-on-loud", "brand-on-normal", "brand-on-quiet", "danger-border-loud", "danger-border-normal", "danger-border-quiet", "danger-fill-loud", "danger-fill-normal", "danger-fill-quiet", "danger-on-fill", "danger-on-loud", "danger-on-normal", "danger-on-quiet", "neutral-border-loud", "neutral-border-normal", "neutral-border-quiet", "neutral-fill-loud", "neutral-fill-normal", "neutral-fill-quiet", "neutral-on-loud", "neutral-on-normal", "neutral-on-quiet", "pop-border-loud", "pop-border-normal", "pop-border-quiet", "pop-fill-loud", "pop-fill-normal", "pop-fill-quiet", "pop-on-fill", "pop-on-loud", "pop-on-normal", "pop-on-quiet", "success-border-loud", "success-border-normal", "success-border-quiet", "success-fill-loud", "success-fill-normal", "success-fill-quiet", "success-on-fill", "success-on-loud", "success-on-normal", "success-on-quiet", "surface", "surface-lowered", "surface-raised", "text", "text-link", "text-quiet", "warning-border-loud", "warning-border-normal", "warning-border-quiet", "warning-fill-loud", "warning-fill-normal", "warning-fill-quiet", "warning-on-fill", "warning-on-loud", "warning-on-normal", "warning-on-quiet"];
|
|
57
56
|
/** Names of the public `--kui-color-*` semantic tokens. */
|
|
58
57
|
type UiColorName = (typeof uiColorNames)[number];
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
* roles, and their `*-text` compatibility aliases. The bare `success`,
|
|
62
|
-
* `warning`, `danger`, `pop`, and `accent` aliases are quiet fills, not
|
|
63
|
-
* foregrounds.
|
|
64
|
-
*/
|
|
65
|
-
type UiForegroundColorName = Extract<UiColorName, `${string}-on-${string}` | `${string}-text` | 'text' | 'text-quiet' | 'text-link'>;
|
|
58
|
+
/** The semantic tokens that paint a foreground: the `*-on-*` and text roles. */
|
|
59
|
+
type UiForegroundColorName = Extract<UiColorName, `${string}-on-${string}` | 'text' | 'text-quiet' | 'text-link'>;
|
|
66
60
|
/** Kerf UI's complete spacing-token vocabulary. `s` and `xl` are exceptions. */
|
|
67
61
|
type UiSpaceName = 'none' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
68
62
|
/** Create a complete pixel length. */
|
package/dist/css-values.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, remify, space, uiColor } from './chunk-
|
|
1
|
+
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, remify, space, uiColor } from './chunk-2G2ZJQYK.js';
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=css-values.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
import { CssLength } from './css-values.js';
|
|
2
3
|
|
|
3
4
|
type DisclosureDirection = 'up' | 'down' | 'left' | 'right';
|
|
4
5
|
interface DisclosureArrowProps {
|
|
@@ -7,10 +8,12 @@ interface DisclosureArrowProps {
|
|
|
7
8
|
closedDirection?: DisclosureDirection;
|
|
8
9
|
/** Replacement icons should use right as their unrotated orientation. */
|
|
9
10
|
icon?: SafeHtml;
|
|
11
|
+
/** Typed box size for the square visual. Default: `remify(18px)`. */
|
|
12
|
+
size?: CssLength;
|
|
10
13
|
className?: string;
|
|
11
14
|
/** Native named-slot assignment when composed inside a web component. */
|
|
12
15
|
slot?: string;
|
|
13
16
|
}
|
|
14
|
-
declare function DisclosureArrow({ open, openDirection, closedDirection, icon, className, slot, }: DisclosureArrowProps): SafeHtml;
|
|
17
|
+
declare function DisclosureArrow({ open, openDirection, closedDirection, icon, size, className, slot, }: DisclosureArrowProps): SafeHtml;
|
|
15
18
|
|
|
16
19
|
export { DisclosureArrow, type DisclosureArrowProps, type DisclosureDirection };
|
package/dist/disclosure-arrow.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
|
+
import { CssLength } from './css-values.js';
|
|
2
3
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
4
|
|
|
4
5
|
/** Where a {@link FloatingToolbar} floats within its positioned container. */
|
|
@@ -13,6 +14,13 @@ interface FloatingToolbarProps {
|
|
|
13
14
|
* Default: `'bottom-end'`.
|
|
14
15
|
*/
|
|
15
16
|
position?: FloatingToolbarPosition;
|
|
17
|
+
/**
|
|
18
|
+
* Distance from the container edges named by `position`. Default:
|
|
19
|
+
* `space('m')` (16px, 8px past a top toolbar's own inset). Omit it inside a
|
|
20
|
+
* `Workbench`, `CollapsiblePanel`, or `ResizableRegion` restore corner: the
|
|
21
|
+
* corner owns the inset there and sets it to zero.
|
|
22
|
+
*/
|
|
23
|
+
inset?: CssLength;
|
|
16
24
|
className?: string;
|
|
17
25
|
/** Native named-slot assignment when composed inside a web component. */
|
|
18
26
|
slot?: string;
|
|
@@ -22,13 +30,16 @@ interface FloatingToolbarProps {
|
|
|
22
30
|
* ancestor — a transparent, forced-dark cluster of controls (e.g. a drawer
|
|
23
31
|
* restore button) that sits over the content but NOT over dialogs or overlays
|
|
24
32
|
* (it is not in the top layer). It is inset from the container edges by
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* ancestor, to move it. Inside a `Workbench`, `CollapsiblePanel`, or
|
|
33
|
+
* `inset` (default `--kui-space-m`, i.e. 8px more than a top toolbar's own
|
|
34
|
+
* inset); pass a typed length to move it. Inside a `Workbench`, `CollapsiblePanel`, or
|
|
28
35
|
* `ResizableRegion` restore corner the corner owns the inset, so the toolbar
|
|
29
|
-
* floats from the corner's own position.
|
|
30
|
-
*
|
|
36
|
+
* floats from the corner's own position. While one of those layouts has a
|
|
37
|
+
* side overlay open over the toolbar's region (a Workbench rail overlay, a
|
|
38
|
+
* `wireSidebar` compact overlay, an overlay `CollapsiblePanel` or horizontal
|
|
39
|
+
* `ResizableRegion`), the toolbar is hidden — unfocusable and out of the
|
|
40
|
+
* accessibility tree — until the overlay closes. The app owns the controls
|
|
41
|
+
* and their behavior — wire them with `delegate()` as usual.
|
|
31
42
|
*/
|
|
32
|
-
declare function FloatingToolbar({ children, label, position, className, slot, }: FloatingToolbarProps): kerfjs.SafeHtml;
|
|
43
|
+
declare function FloatingToolbar({ children, label, position, inset, className, slot, }: FloatingToolbarProps): kerfjs.SafeHtml;
|
|
33
44
|
|
|
34
45
|
export { FloatingToolbar, type FloatingToolbarPosition, type FloatingToolbarProps };
|
package/dist/floating-toolbar.js
CHANGED
package/dist/grid.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marker export for tests and tooling; importing this module registers the
|
|
3
|
+
* Web Awesome tooltip and installs the document-level help tags that name
|
|
4
|
+
* icon-only controls on hover and keyboard focus: an icon-only `<button>` or
|
|
5
|
+
* link inside a `ToolbarControlGroup` (named by `aria-label`, without a
|
|
6
|
+
* native `title`), plus the icon-only `Select` and `PopupMenu` triggers that
|
|
7
|
+
* `select/register` and `popup-menu/register` already cover. Import it once
|
|
8
|
+
* in an application whose toolbars have icon-only buttons but no registered
|
|
9
|
+
* `Select` or `PopupMenu`; importing it alongside them is harmless.
|
|
10
|
+
*/
|
|
11
|
+
declare const helpTagsRegistered = true;
|
|
12
|
+
|
|
13
|
+
export { helpTagsRegistered };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { installHelpTags } from './chunk-BFPBS5Y4.js';
|
|
2
|
+
import '@awesome.me/webawesome/dist/components/tooltip/tooltip.js';
|
|
3
|
+
|
|
4
|
+
installHelpTags();
|
|
5
|
+
var helpTagsRegistered = true;
|
|
6
|
+
|
|
7
|
+
export { helpTagsRegistered };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=help-tags-register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/help-tags-register.ts"],"names":[],"mappings":";;;AAIA,eAAA,EAAgB;AAYT,IAAM,kBAAA,GAAqB","file":"help-tags-register.js","sourcesContent":["import '@awesome.me/webawesome/dist/components/tooltip/tooltip.js';\n\nimport { installHelpTags } from './install-help-tag.js';\n\ninstallHelpTags();\n\n/**\n * Marker export for tests and tooling; importing this module registers the\n * Web Awesome tooltip and installs the document-level help tags that name\n * icon-only controls on hover and keyboard focus: an icon-only `<button>` or\n * link inside a `ToolbarControlGroup` (named by `aria-label`, without a\n * native `title`), plus the icon-only `Select` and `PopupMenu` triggers that\n * `select/register` and `popup-menu/register` already cover. Import it once\n * in an application whose toolbars have icon-only buttons but no registered\n * `Select` or `PopupMenu`; importing it alongside them is harmless.\n */\nexport const helpTagsRegistered = true;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export { AppTab, AppTabPresentation, AppTabProps, AppTabSize } from './app-tab.js';
|
|
2
|
-
export { Badge, BadgeAppearance, BadgeProps, BadgeShape, BadgeSize, BadgeTone } from './badge.js';
|
|
2
|
+
export { Badge, BadgeAppearance, BadgeDotProps, BadgeProps, BadgeShape, BadgeSize, BadgeTextProps, BadgeTone } from './badge.js';
|
|
3
|
+
export { ContentItem, ContentItemFrame, ContentItemProps, ContentItemShape } from './content-item.js';
|
|
3
4
|
export { CssColor, CssFlex, CssFlexBasis, CssFlexKeyword, CssForegroundColor, CssLength, CssLengthExpression, CssSize, CssSizeKeyword, CssValue, UiColor, UiColorName, UiForegroundColorName, UiSpaceName, calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, space, uiColor } from './css-values.js';
|
|
4
5
|
export { DisclosureArrow, DisclosureArrowProps, DisclosureDirection } from './disclosure-arrow.js';
|
|
5
6
|
export { EmptyState, EmptyStateProps } from './empty-state.js';
|
|
6
7
|
export { FloatingToolbar, FloatingToolbarPosition, FloatingToolbarProps } from './floating-toolbar.js';
|
|
7
8
|
export { Grid, GridProps } from './grid.js';
|
|
8
|
-
export { List, ListProps } from './list.js';
|
|
9
|
+
export { List, ListConfig, ListProps } from './list.js';
|
|
9
10
|
export { ListActionRow, ListActionRowProps } from './list-action-row.js';
|
|
10
11
|
export { ListHeader, ListHeaderProps } from './list-header.js';
|
|
11
12
|
export { ListInsetControl, ListInsetControlProps } from './list-inset-control.js';
|
|
@@ -13,7 +14,7 @@ export { ListInsetText, ListInsetTextProps } from './list-inset-text.js';
|
|
|
13
14
|
export { ListItem, ListItemProps } from './list-item.js';
|
|
14
15
|
export { LoadingSpinner, LoadingSpinnerProps } from './loading-spinner.js';
|
|
15
16
|
export { LucideIcon, LucideIconProps, LucideNode } from './lucide-icon.js';
|
|
16
|
-
export { Pane, PaneContentElement, PaneElement, PaneProps, PaneSeparatorSide } from './pane.js';
|
|
17
|
+
export { Pane, PaneChromePlacement, PaneConfig, PaneContentElement, PaneElement, PaneProps, PaneSeparatorSide } from './pane.js';
|
|
17
18
|
export { PopupMenu, PopupMenuDivider, PopupMenuEntry, PopupMenuHeading, PopupMenuItem, PopupMenuPlacement, PopupMenuProps } from './popup-menu.js';
|
|
18
19
|
export { ResizableRegion, ResizableRegionAxis, ResizableRegionCollapseMotion, ResizableRegionContentOverflow, ResizableRegionEdge, ResizableRegionPresentation, ResizableRegionProps, ResizableRegionResponsiveFillAt, ResizableRegionRestorePosition, ResizableRegionSeparator, clampRegionSize, resizeRegionFromPointer } from './resizable-region.js';
|
|
19
20
|
export { Row, RowProps } from './row.js';
|
|
@@ -28,15 +29,15 @@ export { DialogSurface, DialogSurfacePresentation, DialogSurfaceProps, DialogSur
|
|
|
28
29
|
export { TabActivation, TabBar, TabBarAllocation, TabBarPresentation, TabBarProps, TabBarTrailingPlacement } from './tab-bar.js';
|
|
29
30
|
export { Text, TextContent, TextFont, TextProps, TextSize, TextTone, TextVariant } from './text.js';
|
|
30
31
|
export { TokenSearchEditorAttributes, TokenSearchField, TokenSearchFieldProps, TokenSearchFieldValue, TokenSearchToken, placeTokenSearchCaret, readTokenSearchField } from './token-search-field.js';
|
|
31
|
-
export { Toolbar, ToolbarProps } from './toolbar.js';
|
|
32
|
+
export { Toolbar, ToolbarConfig, ToolbarProps } from './toolbar.js';
|
|
32
33
|
export { ToolbarActionLink, ToolbarActionLinkProps, ToolbarControlGroup, ToolbarControlGroupAppearance, ToolbarControlGroupButtonAppearance, ToolbarControlGroupContent, ToolbarControlGroupDensity, ToolbarControlGroupMenuInset, ToolbarControlGroupOverflow, ToolbarControlGroupProps, ToolbarControlGroupSelectedChrome, ToolbarControlGroupSelectedTone, ToolbarControlGroupShape, ToolbarControlGroupSize, ToolbarControlGroupTone, ToolbarControlGroupVisibility } from './toolbar-control-group.js';
|
|
33
34
|
export { HeadingLevel, ToolbarText, ToolbarTextProps, ToolbarTextSize } from './toolbar-text.js';
|
|
34
35
|
export { ValueTable, ValueTableProps, ValueTableRow, ValueTableRowProps } from './value-table.js';
|
|
35
36
|
export { ResizeCommit, WireResizableRegionsOptions, wireResizableRegions } from './wire-resizable-regions.js';
|
|
36
37
|
export { TabDropPosition, TabReorder, TabReorderSource, WireTabBarsOptions, reorderTabs, wireTabBars } from './wire-tab-bars.js';
|
|
37
38
|
export { TokenSearchCollapsibleOptions, TokenSearchEdit, TokenSearchFieldsHandle, TokenSearchSubmit, WireTokenSearchFieldsOptions, wireTokenSearchFields } from './wire-token-search-fields.js';
|
|
38
|
-
export { D as DividerSides, S as Sides } from './divider-sides-BzB6rphT.js';
|
|
39
39
|
export { H as HorizontalAlignment, L as ListVerticalAlignment, V as VerticalAlignment } from './flex-alignment-4ms8ZbV8.js';
|
|
40
|
+
export { S as Sides } from './sides-BPSWde0A.js';
|
|
40
41
|
import 'kerfjs';
|
|
41
42
|
import 'lucide';
|
|
42
43
|
import 'kerfjs/jsx-runtime';
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
export { reorderTabs, wireTabBars } from './chunk-46263QLK.js';
|
|
2
|
-
export { wireTokenSearchFields } from './chunk-BSKEH3UC.js';
|
|
3
|
-
export { ValueTable, ValueTableRow } from './chunk-44IG7PFV.js';
|
|
4
1
|
export { wireResizableRegions } from './chunk-XQV2B4IL.js';
|
|
2
|
+
export { reorderTabs, wireTabBars } from './chunk-46263QLK.js';
|
|
3
|
+
export { wireTokenSearchFields } from './chunk-NBYTIVHS.js';
|
|
4
|
+
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-63ZWBGE3.js';
|
|
5
|
+
export { ValueTable, ValueTableRow } from './chunk-6CINWX2E.js';
|
|
5
6
|
|
|
6
|
-
export {
|
|
7
|
+
export { Spacer } from './chunk-MEY33VWB.js';
|
|
8
|
+
export { StateBanner } from './chunk-T4UZTNZ4.js';
|
|
7
9
|
export { SunkenPanel } from './chunk-6ZXOQEAN.js';
|
|
8
10
|
export { DialogSurface, PopupSurface } from './chunk-NN6GYOA2.js';
|
|
9
11
|
export { TabBar } from './chunk-N3GKMPDW.js';
|
|
10
|
-
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-RNRUVPJ3.js';
|
|
11
12
|
export { SegmentedControl } from './chunk-X5QSICJ3.js';
|
|
12
|
-
export { Select } from './chunk-
|
|
13
|
-
export {
|
|
13
|
+
export { Select } from './chunk-MOBRFZH3.js';
|
|
14
|
+
export { ListInsetControl } from './chunk-5I7QGQVT.js';
|
|
14
15
|
export { EmptyState } from './chunk-E36EVCKG.js';
|
|
15
|
-
export { Grid } from './chunk-
|
|
16
|
-
export { ListActionRow } from './chunk-
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export { Row } from './chunk-5I22LMCV.js';
|
|
16
|
+
export { Grid } from './chunk-AGXQQFKZ.js';
|
|
17
|
+
export { ListActionRow } from './chunk-MA6Z6EIM.js';
|
|
18
|
+
export { AppTab } from './chunk-WOUF7YXM.js';
|
|
19
|
+
export { PopupMenu } from './chunk-WLG6SSNT.js';
|
|
20
20
|
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-VHADGP3B.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
21
|
+
export { Row } from './chunk-VZOFZPSO.js';
|
|
22
|
+
export { ListInsetText } from './chunk-DG6G5EPF.js';
|
|
23
|
+
export { ListItem } from './chunk-VNPQDCQZ.js';
|
|
24
|
+
export { List } from './chunk-NAPE7WUS.js';
|
|
23
25
|
|
|
24
|
-
export { ToolbarText } from './chunk-
|
|
25
|
-
export {
|
|
26
|
-
export { FloatingToolbar } from './chunk-5NDQABWK.js';
|
|
26
|
+
export { ToolbarText } from './chunk-K6UNVKDK.js';
|
|
27
|
+
export { FloatingToolbar } from './chunk-M7QV3IHH.js';
|
|
27
28
|
export { LoadingSpinner } from './chunk-ZLWQZUGF.js';
|
|
28
|
-
export { ListHeader } from './chunk-
|
|
29
|
+
export { ListHeader } from './chunk-PK4N5QTO.js';
|
|
29
30
|
export { Text } from './chunk-24PHKUR3.js';
|
|
30
|
-
export {
|
|
31
|
-
export { Skeleton } from './chunk-
|
|
32
|
-
export { Badge } from './chunk-
|
|
33
|
-
export { Toolbar } from './chunk-MTM43SJO.js';
|
|
31
|
+
export { DisclosureArrow } from './chunk-KROD7KZK.js';
|
|
32
|
+
export { Skeleton } from './chunk-AHEG27M7.js';
|
|
33
|
+
export { Badge } from './chunk-MP2GDBQZ.js';
|
|
34
34
|
export { ToolbarActionLink, ToolbarControlGroup } from './chunk-ZIYOJFZD.js';
|
|
35
|
-
export {
|
|
36
|
-
|
|
37
|
-
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, space, uiColor } from './chunk-WZ2GLEY4.js';
|
|
38
|
-
export { DisclosureArrow } from './chunk-HMQ2ZDGG.js';
|
|
35
|
+
export { Toolbar } from './chunk-G33XC2NB.js';
|
|
36
|
+
export { Pane } from './chunk-AK67F6QN.js';
|
|
39
37
|
export { LucideIcon } from './chunk-4R777DUZ.js';
|
|
38
|
+
export { ContentItem } from './chunk-MA73TA6D.js';
|
|
39
|
+
|
|
40
|
+
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, space, uiColor } from './chunk-2G2ZJQYK.js';
|
|
40
41
|
|
|
41
42
|
//# sourceMappingURL=index.js.map
|
package/dist/list-action-row.js
CHANGED
package/dist/list-header.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
import { HeadingLevel } from './toolbar-text.js';
|
|
2
3
|
|
|
3
4
|
type ListHeaderRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4
5
|
'data-component'?: never;
|
|
@@ -39,6 +40,8 @@ interface ListHeaderBaseProps {
|
|
|
39
40
|
type ListHeaderModeProps = {
|
|
40
41
|
/** Render the title as a controlled disclosure trigger. */
|
|
41
42
|
toggle: true;
|
|
43
|
+
/** A toggle's label is its button text, not a heading. */
|
|
44
|
+
headingLevel?: never;
|
|
42
45
|
action: string;
|
|
43
46
|
expanded: boolean;
|
|
44
47
|
actionIcon?: SafeHtml;
|
|
@@ -48,6 +51,11 @@ type ListHeaderModeProps = {
|
|
|
48
51
|
} | {
|
|
49
52
|
/** Render a separately named trailing action. */
|
|
50
53
|
toggle?: false;
|
|
54
|
+
/**
|
|
55
|
+
* Native heading level (`h1`–`h6`) of the label. Default `2`. Match the
|
|
56
|
+
* document outline; the visual treatment does not change.
|
|
57
|
+
*/
|
|
58
|
+
headingLevel?: HeadingLevel;
|
|
51
59
|
action: string;
|
|
52
60
|
actionLabel: string;
|
|
53
61
|
actionIcon: SafeHtml;
|
|
@@ -57,6 +65,11 @@ type ListHeaderModeProps = {
|
|
|
57
65
|
} | {
|
|
58
66
|
/** Render a passive section heading. */
|
|
59
67
|
toggle?: false;
|
|
68
|
+
/**
|
|
69
|
+
* Native heading level (`h1`–`h6`) of the label. Default `2`. Match the
|
|
70
|
+
* document outline; the visual treatment does not change.
|
|
71
|
+
*/
|
|
72
|
+
headingLevel?: HeadingLevel;
|
|
60
73
|
action?: never;
|
|
61
74
|
actionLabel?: never;
|
|
62
75
|
actionIcon?: never;
|
|
@@ -81,6 +94,6 @@ type ListHeaderIndicatorProps = {
|
|
|
81
94
|
status?: SafeHtml;
|
|
82
95
|
};
|
|
83
96
|
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps & ListHeaderModeProps;
|
|
84
|
-
declare function ListHeader({ label, count, countLabel, badge, status, density, divider, inline, width, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, slot, }: ListHeaderProps): SafeHtml;
|
|
97
|
+
declare function ListHeader({ label, headingLevel, count, countLabel, badge, status, density, divider, inline, width, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, slot, }: ListHeaderProps): SafeHtml;
|
|
85
98
|
|
|
86
99
|
export { ListHeader, type ListHeaderProps };
|
package/dist/list-header.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
|
-
import { S as Sides } from './divider-sides-BzB6rphT.js';
|
|
3
2
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
|
+
import { S as Sides } from './sides-BPSWde0A.js';
|
|
4
4
|
|
|
5
5
|
interface ListInsetControlProps {
|
|
6
6
|
/** Control(s) that own their own border and padding (e.g. an input, a `wa-*`). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
|
-
import { S as Sides } from './divider-sides-BzB6rphT.js';
|
|
3
2
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
|
+
import { S as Sides } from './sides-BPSWde0A.js';
|
|
4
4
|
|
|
5
5
|
type ListInsetTextRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
6
6
|
'data-component'?: never;
|
|
@@ -11,13 +11,6 @@ interface ListInsetTextProps {
|
|
|
11
11
|
children: KerfUiContent | string;
|
|
12
12
|
/** Physical inset sides in canonical top/right/bottom/left order. Defaults to all sides. */
|
|
13
13
|
sides?: Sides;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated Pass `sides="rl"` instead. Keep only the horizontal geometry (inline margin, left/right border, and
|
|
16
|
-
* left/right padding) and drop the vertical margin, border, and padding. Use it
|
|
17
|
-
* when the text edge must still align with bordered items but the line should not
|
|
18
|
-
* add its own vertical box space — tight text layout inside a content region.
|
|
19
|
-
*/
|
|
20
|
-
horizontalOnly?: boolean;
|
|
21
14
|
className?: string;
|
|
22
15
|
/** Safe `data-*` metadata; component-owned structural attributes stay protected. */
|
|
23
16
|
rootAttributes?: ListInsetTextRootAttributes;
|
|
@@ -29,9 +22,9 @@ interface ListInsetTextProps {
|
|
|
29
22
|
* transparent border, and 8px padding — so a plain string lines up with
|
|
30
23
|
* bordered `.kui-content` items (its text edge lands at the same 17px inset).
|
|
31
24
|
* Use it for text elements that have no margin, border, or padding of their own.
|
|
32
|
-
* Pass `
|
|
25
|
+
* Pass `sides="rl"` to keep the horizontal inset but drop the vertical box
|
|
33
26
|
* space for tight text layout.
|
|
34
27
|
*/
|
|
35
|
-
declare function ListInsetText({ children, sides,
|
|
28
|
+
declare function ListInsetText({ children, sides, className, rootAttributes, slot, }: ListInsetTextProps): kerfjs.SafeHtml;
|
|
36
29
|
|
|
37
30
|
export { ListInsetText, type ListInsetTextProps, Sides };
|
package/dist/list-inset-text.js
CHANGED
package/dist/list-item.js
CHANGED
package/dist/list.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { UiSpaceName, CssLength, CssFlexKeyword, CssFlex } from './css-values.js';
|
|
3
|
-
import { D as DividerSides, S as Sides } from './divider-sides-BzB6rphT.js';
|
|
4
3
|
import { H as HorizontalAlignment, L as ListVerticalAlignment } from './flex-alignment-4ms8ZbV8.js';
|
|
5
4
|
export { V as VerticalAlignment } from './flex-alignment-4ms8ZbV8.js';
|
|
6
5
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
6
|
+
import { S as Sides } from './sides-BPSWde0A.js';
|
|
7
7
|
|
|
8
8
|
type ListRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
9
9
|
'data-component'?: never;
|
|
@@ -35,7 +35,7 @@ interface ListProps {
|
|
|
35
35
|
/** Own vertical scrolling and overscroll containment. */
|
|
36
36
|
scrollable?: boolean;
|
|
37
37
|
/** Physical divider edges in canonical top/right/bottom/left order. */
|
|
38
|
-
dividerSides?:
|
|
38
|
+
dividerSides?: Sides;
|
|
39
39
|
/** Physical sides that receive the standard 17px text inset. */
|
|
40
40
|
textInsets?: Sides;
|
|
41
41
|
/** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */
|
|
@@ -46,7 +46,14 @@ interface ListProps {
|
|
|
46
46
|
/** Native named-slot assignment when composed inside a web component. */
|
|
47
47
|
slot?: string;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* A list's configuration, apart from its content and styling hooks: the props a
|
|
51
|
+
* composite that renders a `List` for the app (the Workbench's `mainHeader` /
|
|
52
|
+
* `mainFooter` chrome) forwards, so the app configures that list instead of
|
|
53
|
+
* styling it. An omitted or `undefined` field keeps the composite's default.
|
|
54
|
+
*/
|
|
55
|
+
type ListConfig = Pick<ListProps, 'gap' | 'hAlign' | 'vAlign' | 'dividerSides' | 'textInsets' | 'controlInsets'>;
|
|
49
56
|
/** A stretch-aligned vertical stack with optional gap, flex, fill, scroll, and dividers. */
|
|
50
57
|
declare function List({ children, gap, flex, fill, hAlign, vAlign, scrollable, dividerSides, textInsets, controlInsets, className, rootAttributes, slot, }: ListProps): kerfjs.SafeHtml;
|
|
51
58
|
|
|
52
|
-
export { CssFlex, CssFlexKeyword, CssLength,
|
|
59
|
+
export { CssFlex, CssFlexKeyword, CssLength, HorizontalAlignment, List, type ListConfig, type ListProps, ListVerticalAlignment, Sides, UiSpaceName };
|
package/dist/list.js
CHANGED
package/dist/nav-stack.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
|
+
import { ToolbarConfig } from './toolbar.js';
|
|
4
|
+
import { ToolbarTextSize, HeadingLevel } from './toolbar-text.js';
|
|
5
|
+
import './pane.js';
|
|
6
|
+
import './sides-BPSWde0A.js';
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
9
|
* One entry in a {@link NavStack}. The app owns the stack as an array (usually a
|
|
@@ -11,19 +15,46 @@ interface NavStackView {
|
|
|
11
15
|
content: KerfUiContent;
|
|
12
16
|
/** Title shown in the top toolbar for this view. */
|
|
13
17
|
title?: string;
|
|
18
|
+
/** Leading groups for this view's top toolbar, after the back control and before the title. */
|
|
19
|
+
leading?: KerfUiContent;
|
|
20
|
+
/** Center content for this view's top toolbar (placed per `toolbarConfig.centerAlign`). */
|
|
21
|
+
center?: KerfUiContent;
|
|
14
22
|
/** Trailing actions for this view's top toolbar. */
|
|
15
23
|
toolbar?: KerfUiContent;
|
|
16
24
|
/** Bottom toolbar for this view. Cross-fades with the top chrome on navigation. */
|
|
17
25
|
bottomToolbar?: KerfUiContent;
|
|
18
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The top toolbar's configuration. Its `ToolbarConfig` forwards to the real
|
|
29
|
+
* `Toolbar` the stack renders; by default that toolbar draws no divider and
|
|
30
|
+
* claims the top and side safe-area edges the stack still touches.
|
|
31
|
+
*/
|
|
32
|
+
interface NavStackToolbarConfig extends ToolbarConfig {
|
|
33
|
+
/** Accessible name of the top toolbar (default: none). */
|
|
34
|
+
label?: string;
|
|
35
|
+
/** Size of the view title's `ToolbarText` (default `large`). */
|
|
36
|
+
titleSize?: ToolbarTextSize;
|
|
37
|
+
/** Expose the view title as a heading at this level (default: a plain span). */
|
|
38
|
+
headingLevel?: HeadingLevel;
|
|
39
|
+
}
|
|
19
40
|
interface NavStackProps {
|
|
20
41
|
id: string;
|
|
21
42
|
/** Accessible name for the stack region. */
|
|
22
43
|
label: string;
|
|
23
44
|
/** The stack, root first; the last entry is the active top view. */
|
|
24
45
|
views: NavStackView[];
|
|
25
|
-
/** Accessible label for the back control (default "Back"). */
|
|
46
|
+
/** Accessible label for the icon-only back control (default "Back"). */
|
|
26
47
|
backLabel?: string;
|
|
48
|
+
/** The back control's icon (default a chevron-left `LucideIcon`). */
|
|
49
|
+
backIcon?: KerfUiContent;
|
|
50
|
+
/**
|
|
51
|
+
* Visible text beside the back icon, such as the previous view's title
|
|
52
|
+
* (default: icon only). When set, the text names the control and
|
|
53
|
+
* `backLabel` is not used.
|
|
54
|
+
*/
|
|
55
|
+
backText?: string;
|
|
56
|
+
/** The top toolbar's configuration, forwarded to its `Toolbar`. */
|
|
57
|
+
toolbarConfig?: NavStackToolbarConfig;
|
|
27
58
|
/** Hide the top toolbar entirely (rare — a fully custom-chrome view). */
|
|
28
59
|
hideToolbar?: boolean;
|
|
29
60
|
/** Optional persistent bottom toolbar used when the active view does not provide one. */
|
|
@@ -35,9 +66,11 @@ interface NavStackProps {
|
|
|
35
66
|
/**
|
|
36
67
|
* A navigation stack (iOS-style push/pop). Renders every entry stacked, the last
|
|
37
68
|
* one active; `@kerfjs/ui/wire-nav-stack`'s `wireNavStack` slides the content and
|
|
38
|
-
* cross-fades the chrome across a change.
|
|
39
|
-
*
|
|
69
|
+
* cross-fades the chrome across a change. Its top chrome is a real `Toolbar`: the
|
|
70
|
+
* back control and title lead, the active view's `leading` / `center` / `toolbar`
|
|
71
|
+
* content fills the zones, and `toolbarConfig` configures it. A single-pane
|
|
72
|
+
* layout is a `NavStack` with one entry. See `docs/23-app-layouts.md` §3.1.
|
|
40
73
|
*/
|
|
41
|
-
declare function NavStack({ id, label, views, backLabel, hideToolbar, bottomToolbar, className, slot, }: NavStackProps): kerfjs.SafeHtml;
|
|
74
|
+
declare function NavStack({ id, label, views, backLabel, backIcon, backText, toolbarConfig, hideToolbar, bottomToolbar, className, slot, }: NavStackProps): kerfjs.SafeHtml;
|
|
42
75
|
|
|
43
|
-
export { NavStack, type NavStackProps, type NavStackView };
|
|
76
|
+
export { NavStack, type NavStackProps, type NavStackToolbarConfig, type NavStackView };
|