@kerfjs/ui 5.0.0-beta.52 → 5.0.0-beta.54
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 +1 -0
- package/ai/application-ui-diagnostic-ids-v1.json +1 -0
- package/ai/component-catalog-v2.d.ts +3 -0
- package/ai/component-catalog-v2.json +85 -7
- package/ai/component-catalog-v2.schema.json +9 -1
- package/ai/component-catalog.json +108 -11
- package/ai/public-api-signatures-v1.md +215 -25
- package/ai/skill.md +23 -17
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/index.mjs +48 -0
- package/analyzer/loud-pairs.d.mts +49 -0
- package/analyzer/loud-pairs.mjs +357 -0
- package/dist/app-tab.d.ts +7 -5
- package/dist/app-tab.js +1 -1
- package/dist/browser/segmented-control.js +0 -1
- package/dist/catalog.js +4 -4
- package/dist/{chunk-EKYZCRCX.js → chunk-3CGQ7ZNO.js} +54 -22
- package/dist/chunk-3CGQ7ZNO.js.map +1 -0
- package/dist/{chunk-7XJO4D6A.js → chunk-3NBL3OUQ.js} +2 -2
- package/dist/{chunk-7XJO4D6A.js.map → chunk-3NBL3OUQ.js.map} +1 -1
- package/dist/{chunk-2S7OWAEV.js → chunk-44IG7PFV.js} +3 -3
- package/dist/{chunk-2S7OWAEV.js.map → chunk-44IG7PFV.js.map} +1 -1
- package/dist/{chunk-UKKSMZYT.js → chunk-46263QLK.js} +51 -1
- package/dist/chunk-46263QLK.js.map +1 -0
- package/dist/{chunk-DNCOFEUL.js → chunk-5I22LMCV.js} +2 -2
- package/dist/{chunk-DNCOFEUL.js.map → chunk-5I22LMCV.js.map} +1 -1
- package/dist/{chunk-NDUGJ4TU.js → chunk-5NDQABWK.js} +1 -1
- package/dist/{chunk-NDUGJ4TU.js.map → chunk-5NDQABWK.js.map} +1 -1
- package/dist/{chunk-KAQUUTZR.js → chunk-ATHXW6RP.js} +2 -2
- package/dist/{chunk-KAQUUTZR.js.map → chunk-ATHXW6RP.js.map} +1 -1
- package/dist/{chunk-JGFZ42ZF.js → chunk-BJJKFVWW.js} +14 -5
- package/dist/chunk-BJJKFVWW.js.map +1 -0
- package/dist/{chunk-T7C2VZUB.js → chunk-C2FAYFDE.js} +2 -2
- package/dist/{chunk-T7C2VZUB.js.map → chunk-C2FAYFDE.js.map} +1 -1
- package/dist/{chunk-SV22UIW4.js → chunk-DQA5FMOX.js} +2 -2
- package/dist/{chunk-SV22UIW4.js.map → chunk-DQA5FMOX.js.map} +1 -1
- package/dist/{chunk-LIOXPQ7N.js → chunk-GUIHMIT2.js} +12 -10
- package/dist/chunk-GUIHMIT2.js.map +1 -0
- package/dist/{chunk-3S7OUHUN.js → chunk-KPNTVB7A.js} +9 -4
- package/dist/chunk-KPNTVB7A.js.map +1 -0
- package/dist/{chunk-IR53BQUJ.js → chunk-NE5JAOQS.js} +9 -9
- package/dist/chunk-NE5JAOQS.js.map +1 -0
- package/dist/chunk-PSHUSWQH.js +18 -0
- package/dist/chunk-PSHUSWQH.js.map +1 -0
- package/dist/{chunk-OSCL5TKR.js → chunk-RNZAKSME.js} +11 -8
- package/dist/chunk-RNZAKSME.js.map +1 -0
- package/dist/{chunk-ABAXNUXU.js → chunk-T22EM4ET.js} +7 -5
- package/dist/chunk-T22EM4ET.js.map +1 -0
- package/dist/{chunk-YZV2PTY4.js → chunk-TZ5IHWB2.js} +3 -3
- package/dist/{chunk-YZV2PTY4.js.map → chunk-TZ5IHWB2.js.map} +1 -1
- package/dist/{chunk-VOCPXGQN.js → chunk-VHADGP3B.js} +9 -8
- package/dist/chunk-VHADGP3B.js.map +1 -0
- package/dist/{chunk-2CE22Q2K.js → chunk-WZ2GLEY4.js} +2 -1
- package/dist/chunk-WZ2GLEY4.js.map +1 -0
- package/dist/{chunk-M6GLI6A6.js → chunk-X5QSICJ3.js} +5 -5
- package/dist/chunk-X5QSICJ3.js.map +1 -0
- package/dist/chunk-XQV2B4IL.js +14 -0
- package/dist/chunk-XQV2B4IL.js.map +1 -0
- package/dist/{chunk-4XE2CDYB.js → chunk-ZMBU522F.js} +2 -2
- package/dist/{chunk-4XE2CDYB.js.map → chunk-ZMBU522F.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +6 -2
- package/dist/collapsible-panel.js +1 -0
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/css-values.d.ts +1 -1
- package/dist/css-values.js +1 -1
- package/dist/floating-toolbar.d.ts +5 -2
- package/dist/floating-toolbar.js +1 -1
- package/dist/grid.js +1 -1
- package/dist/index.js +20 -19
- package/dist/list-action-row.d.ts +2 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +1 -0
- package/dist/list-header.js +1 -1
- package/dist/list-item.d.ts +5 -3
- package/dist/list-item.js +1 -1
- package/dist/list.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/resizable-region.d.ts +4 -1
- package/dist/resizable-region.js +1 -1
- package/dist/row.js +1 -1
- package/dist/segmented-control.d.ts +1 -1
- package/dist/segmented-control.js +1 -3
- package/dist/select.js +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/spacer.js +1 -1
- package/dist/split-view.js +2 -2
- package/dist/state-banner.d.ts +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/badge.css +17 -6
- package/dist/styles/collapsible-panel.css +89 -11
- package/dist/styles/floating-toolbar.css +11 -6
- package/dist/styles/foundation.css +82 -26
- package/dist/styles/list-action-row.css +29 -8
- package/dist/styles/list-header.css +19 -7
- package/dist/styles/list-item.css +11 -3
- package/dist/styles/resizable-region.css +82 -14
- package/dist/styles/segmented-control.css +21 -1
- package/dist/styles/select.css +24 -13
- package/dist/styles/skeleton.css +33 -2
- package/dist/styles/state-banner.css +48 -12
- package/dist/styles/webawesome.css +47 -20
- package/dist/styles/workbench.css +473 -11
- package/dist/toolbar-text.js +1 -1
- package/dist/value-table.js +1 -1
- package/dist/wire-resizable-regions.d.ts +2 -1
- package/dist/wire-resizable-regions.js +2 -1
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-workbench.d.ts +109 -0
- package/dist/wire-workbench.js +355 -0
- package/dist/wire-workbench.js.map +1 -0
- package/dist/workbench.d.ts +65 -6
- package/dist/workbench.js +180 -76
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +54 -9
- package/docs/app-layouts.md +12 -1
- package/docs/collapsible-panel.md +59 -1
- package/docs/component-contract.md +76 -4
- package/docs/component-selection.md +16 -6
- package/docs/design/templates/empty-state/with-action-dark.svg +1 -1
- package/docs/design/templates/empty-state-dark.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/selected.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-header/action-dark.svg +1 -1
- package/docs/design/templates/list-header/action.svg +1 -1
- package/docs/design/templates/list-header/count-dark.svg +1 -1
- package/docs/design/templates/list-header/count.svg +1 -1
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -1
- package/docs/design/templates/list-header/inline-action.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/list-item/selected.svg +1 -1
- package/docs/design/templates/list-item.svg +1 -1
- package/docs/design/templates/list.svg +1 -1
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -1
- package/docs/design/templates/segmented-control/equal.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small.svg +1 -1
- package/docs/design/templates/segmented-control-dark.svg +1 -1
- package/docs/design/templates/segmented-control.svg +1 -1
- package/docs/design/templates/state-banner/danger-dark.svg +1 -1
- package/docs/design/templates/state-banner/danger.svg +1 -1
- package/docs/design/templates/state-banner/info-badge-dark.svg +1 -1
- package/docs/design/templates/state-banner/info-badge.svg +1 -1
- package/docs/design/templates/state-banner/info-dark.svg +1 -1
- package/docs/design/templates/state-banner/info.svg +1 -1
- package/docs/design/templates/state-banner/success-dark.svg +1 -1
- package/docs/design/templates/state-banner/success.svg +1 -1
- package/docs/design/templates/state-banner/warning-dark.svg +1 -1
- package/docs/design/templates/state-banner/warning.svg +1 -1
- package/docs/design/templates/state-banner-dark.svg +1 -1
- package/docs/design/templates/state-banner.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/token-search-field/tokens.svg +1 -1
- package/docs/design/templates/token-search-field.svg +1 -1
- package/docs/design/templates.md +11 -1
- package/docs/device-class.md +2 -1
- package/docs/document-baseline.md +4 -0
- package/docs/layout.md +5 -1
- package/docs/recipes.md +5 -3
- package/docs/type-contracts.md +2 -1
- package/docs/ui-analyzer.md +94 -19
- package/docs/ui-doctor.md +6 -0
- package/docs/ux-demo.md +2 -2
- package/docs/webawesome-theme.md +18 -2
- package/docs/workbench.md +302 -7
- package/llms.txt +14 -6
- package/package.json +5 -1
- package/ux-demo/recipes/collapsible-sidebar.tsx +8 -7
- package/ux-demo/recipes/loading-inspector.tsx +3 -2
- package/dist/chunk-2CE22Q2K.js.map +0 -1
- package/dist/chunk-3S7OUHUN.js.map +0 -1
- package/dist/chunk-ABAXNUXU.js.map +0 -1
- package/dist/chunk-EKYZCRCX.js.map +0 -1
- package/dist/chunk-IR53BQUJ.js.map +0 -1
- package/dist/chunk-JGFZ42ZF.js.map +0 -1
- package/dist/chunk-LIOXPQ7N.js.map +0 -1
- package/dist/chunk-M6GLI6A6.js.map +0 -1
- package/dist/chunk-OSCL5TKR.js.map +0 -1
- package/dist/chunk-UKKSMZYT.js.map +0 -1
- package/dist/chunk-VOCPXGQN.js.map +0 -1
|
@@ -21,6 +21,7 @@ var uiColorNames = [
|
|
|
21
21
|
"danger-fill-loud",
|
|
22
22
|
"danger-fill-normal",
|
|
23
23
|
"danger-fill-quiet",
|
|
24
|
+
"danger-on-fill",
|
|
24
25
|
"danger-on-loud",
|
|
25
26
|
"danger-on-normal",
|
|
26
27
|
"danger-on-quiet",
|
|
@@ -160,4 +161,4 @@ function foregroundColorVar(name, fallback) {
|
|
|
160
161
|
|
|
161
162
|
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, remify, space, uiColor };
|
|
162
163
|
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-WZ2GLEY4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/css-values.ts"],"names":[],"mappings":";AAsEA,IAAM,YAAA,GAAe;AAAA,EACnB,QAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,cAAA;AAAA,EACA,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA,oBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,QAAA;AAAA,EACA,oBAAA;AAAA,EACA,sBAAA;AAAA,EACA,qBAAA;AAAA,EACA,kBAAA;AAAA,EACA,oBAAA;AAAA,EACA,mBAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA,uBAAA;AAAA,EACA,sBAAA;AAAA,EACA,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA,oBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,EACA,KAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,E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,YAAY,aAAa,CAAA;AAC1D,EAAA,OAAO,CAAA,IAAA,EAAO,IAAI,CAAA,EAAG,QAAA,KAAa,SAAY,EAAA,GAAK,CAAA,EAAA,EAAK,QAAQ,CAAA,CAAE,CAAA,CAAA,CAAA;AACpE;AAOO,SAAS,kBAAA,CACd,MACA,QAAA,EACoB;AACpB,EAAA,0BAAA,CAA2B,IAAA,EAAM,sBAAsB,kBAAkB,CAAA;AACzE,EAAA,OAAO,CAAA,IAAA,EAAO,IAAI,CAAA,EAAG,QAAA,KAAa,SAAY,EAAA,GAAK,CAAA,EAAA,EAAK,QAAQ,CAAA,CAAE,CAAA,CAAA,CAAA;AACpE","file":"chunk-WZ2GLEY4.js","sourcesContent":["declare const cssValueBrand: unique symbol;\ndeclare const cssLengthBrand: unique symbol;\ndeclare const cssLengthExpressionBrand: unique symbol;\ndeclare const cssFlexBrand: unique symbol;\ndeclare const cssColorBrand: unique symbol;\ndeclare const cssForegroundColorBrand: unique symbol;\n\n/**\n * A complete typed CSS value minted by a property-specific Kerf UI builder.\n *\n * This brand is an authoring correctness aid, not a sanitizer or security\n * boundary. Prefer the narrower property grammar, such as {@link CssLength},\n * whenever one is available.\n */\nexport type CssValue = string & {\n readonly [cssValueBrand]: 'CssValue';\n};\n\n/**\n * A complete CSS length-percentage value suitable for dimension-valued UI\n * props. Despite the concise name, percentages are intentionally included.\n */\nexport type CssLength = CssValue & {\n readonly [cssLengthBrand]: 'CssLength';\n};\n\n/**\n * An incomplete arithmetic expression. Wrap it with {@link calc} before\n * passing it to a prop that accepts {@link CssLength}.\n */\nexport type CssLengthExpression = string & {\n readonly [cssLengthExpressionBrand]: 'CssLengthExpression';\n};\n\n/** A complete CSS `flex` shorthand. It is not interchangeable with a length. */\nexport type CssFlex = CssValue & {\n readonly [cssFlexBrand]: 'CssFlex';\n};\n\n/** A complete CSS color value. It is not interchangeable with a length. */\nexport type CssColor = CssValue & {\n readonly [cssColorBrand]: 'CssColor';\n};\n\n/**\n * A complete CSS color meant to paint a foreground: text or an icon drawn over\n * a surface. Mint it with {@link uiColor} and a foreground token name\n * ({@link UiForegroundColorName}) or with {@link foregroundColorVar}. It is a\n * {@link CssColor}, but a plain `CssColor` is not a foreground color: fill,\n * border, and surface tokens (including the `success` / `warning` / `danger` /\n * `pop` fill aliases) are pale backgrounds that leave a foreground nearly\n * invisible.\n */\nexport type CssForegroundColor = CssColor & {\n readonly [cssForegroundColorBrand]: 'CssForegroundColor';\n};\n\nexport type CssFlexKeyword = 'none' | 'auto' | 'initial';\nexport type CssFlexBasis =\n | CssLength\n | 'auto'\n | 'content'\n | 'min-content'\n | 'max-content'\n | 'fit-content';\nexport type CssSizeKeyword =\n 'auto' | 'min-content' | 'max-content' | 'fit-content';\n/** A complete width/height value accepted by dimension-valued UI props. */\nexport type CssSize = CssLength | CssSizeKeyword;\n\nconst uiColorNames = [\n 'accent',\n 'accent-text',\n 'border',\n 'border-quiet',\n 'brand-border-loud',\n 'brand-border-normal',\n 'brand-border-quiet',\n 'brand-fill-loud',\n 'brand-fill-normal',\n 'brand-fill-quiet',\n 'brand-on-fill',\n 'brand-on-loud',\n 'brand-on-normal',\n 'brand-on-quiet',\n 'danger',\n 'danger-border-loud',\n 'danger-border-normal',\n 'danger-border-quiet',\n 'danger-fill-loud',\n 'danger-fill-normal',\n 'danger-fill-quiet',\n 'danger-on-fill',\n 'danger-on-loud',\n 'danger-on-normal',\n 'danger-on-quiet',\n 'danger-text',\n 'neutral-border-loud',\n 'neutral-border-normal',\n 'neutral-border-quiet',\n 'neutral-fill-loud',\n 'neutral-fill-normal',\n 'neutral-fill-quiet',\n 'neutral-on-loud',\n 'neutral-on-normal',\n 'neutral-on-quiet',\n 'pop',\n 'pop-border-loud',\n 'pop-border-normal',\n 'pop-border-quiet',\n 'pop-fill-loud',\n 'pop-fill-normal',\n 'pop-fill-quiet',\n 'pop-on-fill',\n 'pop-on-loud',\n 'pop-on-normal',\n 'pop-on-quiet',\n 'pop-text',\n 'success',\n 'success-border-loud',\n 'success-border-normal',\n 'success-border-quiet',\n 'success-fill-loud',\n 'success-fill-normal',\n 'success-fill-quiet',\n 'success-on-fill',\n 'success-on-loud',\n 'success-on-normal',\n 'success-on-quiet',\n 'success-text',\n 'surface',\n 'surface-lowered',\n 'surface-raised',\n 'text',\n 'text-link',\n 'text-quiet',\n 'warning',\n 'warning-border-loud',\n 'warning-border-normal',\n 'warning-border-quiet',\n 'warning-fill-loud',\n 'warning-fill-normal',\n 'warning-fill-quiet',\n 'warning-on-fill',\n 'warning-on-loud',\n 'warning-on-normal',\n 'warning-on-quiet',\n 'warning-text',\n] as const;\n\n/** Names of the public `--kui-color-*` semantic tokens. */\nexport type UiColorName = (typeof uiColorNames)[number];\n\n/**\n * The semantic tokens that paint a foreground: the `*-on-*` roles, the text\n * roles, and their `*-text` compatibility aliases. The bare `success`,\n * `warning`, `danger`, `pop`, and `accent` aliases are quiet fills, not\n * foregrounds.\n */\nexport type UiForegroundColorName = Extract<\n UiColorName,\n | `${string}-on-${string}`\n | `${string}-text`\n | 'text'\n | 'text-quiet'\n | 'text-link'\n>;\n\n/** Kerf UI's complete spacing-token vocabulary. `s` and `xl` are exceptions. */\nexport type UiSpaceName = 'none' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl';\n\nconst spaceVariables = {\n none: '--kui-space-none',\n '2xs': '--kui-space-2xs',\n xs: '--kui-space-xs',\n s: '--kui-space-s',\n m: '--kui-space-m',\n l: '--kui-space-l',\n xl: '--kui-space-xl',\n} as const satisfies Record<UiSpaceName, string>;\n\nfunction serializeNumber(value: number, helper: string): string {\n if (!Number.isFinite(value))\n throw new RangeError(`${helper}() requires a finite number.`);\n return String(Object.is(value, -0) ? 0 : value);\n}\n\nfunction serializeNonnegativeNumber(value: number, helper: string): string {\n const serialized = serializeNumber(value, helper);\n if (value < 0)\n throw new RangeError(`${helper}() requires nonnegative flex factors.`);\n return serialized;\n}\n\nfunction validateCustomPropertyName(\n name: string,\n helper: string,\n example: string,\n): void {\n if (!/^--[A-Za-z_][A-Za-z0-9_-]*$/.test(name))\n throw new TypeError(\n `${helper}() requires an ASCII custom property name such as ${example}.`,\n );\n}\n\nfunction dimension(value: number, unit: string, helper: string): CssLength {\n return `${serializeNumber(value, helper)}${unit}` as CssLength;\n}\n\n/** Create a complete pixel length. */\nexport function px(value: number): CssLength {\n return dimension(value, 'px', 'px');\n}\n\n/** Create a complete root-font-relative length. */\nexport function rem(value: number): CssLength {\n return dimension(value, 'rem', 'rem');\n}\n\n/** Converts a pixel value into rem units by dividing by 16. */\nexport function remify(value: number): CssLength {\n return rem(value / 16);\n}\n\n/** Create a complete current-font-relative length. */\nexport function em(value: number): CssLength {\n return dimension(value, 'em', 'em');\n}\n\n/** Create a complete percentage length. */\nexport function pct(value: number): CssLength {\n return dimension(value, '%', 'pct');\n}\n\n/** Resolve a Kerf UI spacing step to its public custom property. */\nexport function space(name: UiSpaceName): CssLength {\n const variable = spaceVariables[name];\n if (variable === undefined)\n throw new RangeError(\n `space() received unknown spacing name ${String(name)}.`,\n );\n return `var(${variable})` as CssLength;\n}\n\n/**\n * Reference an application-owned custom property whose contract is a CSS\n * length-percentage. The deliberately narrow name grammar keeps this helper\n * from becoming an arbitrary CSS-string constructor.\n */\nexport function lengthVar(\n name: `--${string}`,\n fallback?: CssLength,\n): CssLength {\n validateCustomPropertyName(name, 'lengthVar', '--app-gap');\n return `var(${name}${fallback === undefined ? '' : `, ${fallback}`})` as CssLength;\n}\n\n/** Combine two or more complete lengths into a non-standalone sum. */\nexport function plus(\n first: CssLength,\n second: CssLength,\n ...rest: readonly CssLength[]\n): CssLengthExpression {\n return [first, second, ...rest].join(' + ') as CssLengthExpression;\n}\n\n/** Turn a typed length expression into a complete CSS `calc()` value. */\nexport function calc(expression: CssLengthExpression): CssLength {\n return `calc(${expression})` as CssLength;\n}\n\n/** Build a complete, structured CSS flex shorthand. */\nexport function flex(\n grow: number,\n shrink = 1,\n basis: CssFlexBasis = 'auto',\n): CssFlex {\n return `${serializeNonnegativeNumber(grow, 'flex')} ${serializeNonnegativeNumber(shrink, 'flex')} ${basis}` as CssFlex;\n}\n\n/**\n * The brand {@link uiColor} returns for a token name: a\n * {@link CssForegroundColor} for a foreground token, otherwise a plain\n * {@link CssColor}.\n */\nexport type UiColor<Name extends UiColorName> =\n Name extends UiForegroundColorName ? CssForegroundColor : CssColor;\n\n/**\n * Resolve a public Kerf UI semantic color token. A foreground token name\n * (`success-on-quiet`, `text-quiet`, …) returns a {@link CssForegroundColor};\n * any other token returns a plain {@link CssColor}.\n */\nexport function uiColor<Name extends UiColorName>(name: Name): UiColor<Name> {\n if (!(uiColorNames as readonly string[]).includes(name))\n throw new RangeError(\n `uiColor() received unknown color name ${String(name)}.`,\n );\n return `var(--kui-color-${name})` as UiColor<Name>;\n}\n\n/** Reference an application-owned custom property whose contract is a color. */\nexport function colorVar(name: `--${string}`, fallback?: CssColor): CssColor {\n validateCustomPropertyName(name, 'colorVar', '--app-color');\n return `var(${name}${fallback === undefined ? '' : `, ${fallback}`})` as CssColor;\n}\n\n/**\n * Reference an application-owned custom property whose contract is a\n * foreground color (text or an icon over a surface). Use it where a prop\n * accepts only {@link CssForegroundColor}, such as `SelectChoice.color`.\n */\nexport function foregroundColorVar(\n name: `--${string}`,\n fallback?: CssForegroundColor,\n): CssForegroundColor {\n validateCustomPropertyName(name, 'foregroundColorVar', '--app-icon-color');\n return `var(${name}${fallback === undefined ? '' : `, ${fallback}`})` as CssForegroundColor;\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-KAQUUTZR.js';
|
|
2
|
-
import { em } from './chunk-2CE22Q2K.js';
|
|
3
1
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
4
2
|
|
|
3
|
+
// src/segmented-control.tsx
|
|
5
4
|
function SegmentedControl({
|
|
6
5
|
id,
|
|
7
6
|
label,
|
|
@@ -33,7 +32,7 @@ function SegmentedControl({
|
|
|
33
32
|
"aria-busy": placeholder ? "true" : void 0,
|
|
34
33
|
slot,
|
|
35
34
|
children: choices.map((choice) => {
|
|
36
|
-
const selected = choice.value === value;
|
|
35
|
+
const selected = !placeholder && choice.value === value;
|
|
37
36
|
return /* @__PURE__ */ jsx(
|
|
38
37
|
"button",
|
|
39
38
|
{
|
|
@@ -47,7 +46,8 @@ function SegmentedControl({
|
|
|
47
46
|
title: placeholder ? void 0 : choice.title,
|
|
48
47
|
disabled: choice.disabled || placeholder,
|
|
49
48
|
tabindex: placeholder ? "-1" : "0",
|
|
50
|
-
|
|
49
|
+
"data-kui-disabled": choice.disabled ? "true" : void 0,
|
|
50
|
+
children: choice.content ?? /* @__PURE__ */ jsx("span", { children: choice.label })
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
})
|
|
@@ -57,4 +57,4 @@ function SegmentedControl({
|
|
|
57
57
|
|
|
58
58
|
export { SegmentedControl };
|
|
59
59
|
|
|
60
|
-
//# sourceMappingURL=chunk-
|
|
60
|
+
//# sourceMappingURL=chunk-X5QSICJ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/segmented-control.tsx"],"names":[],"mappings":";;;AAgCO,SAAS,gBAAA,CAAuC;AAAA,EACrD,EAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA,GAAS,gBAAA;AAAA,EACT,UAAA,GAAa,QAAA;AAAA,EACb,KAAA,GAAQ,SAAA;AAAA,EACR,IAAA,GAAO,SAAA;AAAA,EACP,MAAA,GAAS,SAAA;AAAA,EACT,SAAA,GAAY,EAAA;AAAA,EACZ,WAAA,GAAc,KAAA;AAAA,EACd;AACF,CAAA,EAAiC;AAC/B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,sBAAA,EAAyB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACjD,gBAAA,EAAe,mBAAA;AAAA,MACf,2BAAA,E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Content":["import type { KerfUiContent } from './semantic-content.js';\n\nexport type SegmentedControlAppearance = 'filled' | 'outlined' | 'toolbar';\nexport type SegmentedControlShape = 'rounded' | 'pill';\nexport type SegmentedControlSize = 'small' | 'default';\nexport type SegmentedControlLayout = 'content' | 'equal';\n\nexport interface SegmentedControlChoice<Value extends string = string> {\n value: Value;\n label: string;\n content?: KerfUiContent;\n title?: string;\n disabled?: boolean;\n}\n\nexport interface SegmentedControlProps<Value extends string = string> {\n id: string;\n label: string;\n value: NoInfer<Value>;\n choices: readonly SegmentedControlChoice<Value>[];\n action?: string;\n appearance?: SegmentedControlAppearance;\n shape?: SegmentedControlShape;\n size?: SegmentedControlSize;\n layout?: SegmentedControlLayout;\n className?: string;\n /** Render as a loading placeholder: every choice keeps its live label or icon, none is selected, and every segment is disabled. */\n placeholder?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport function SegmentedControl<Value extends string>({\n id,\n label,\n value,\n choices,\n action = 'select-segment',\n appearance = 'filled',\n shape = 'rounded',\n size = 'default',\n layout = 'content',\n className = '',\n placeholder = false,\n slot,\n}: SegmentedControlProps<Value>) {\n return (\n <div\n class={`kui-segmented-control ${className}`.trim()}\n data-component=\"segmented-control\"\n data-segmented-control-id={id}\n data-value={value}\n data-appearance={appearance}\n data-shape={shape}\n data-size={size}\n data-layout={layout}\n data-placeholder={placeholder ? 'true' : undefined}\n role=\"group\"\n aria-label={label}\n aria-busy={placeholder ? 'true' : undefined}\n slot={slot}\n >\n {choices.map((choice) => {\n // The choices are known chrome; only the selection is unknown while\n // loading, so a placeholder shows every choice and selects none.\n const selected = !placeholder && choice.value === value;\n return (\n <button\n type=\"button\"\n class=\"kui-segmented-control__item\"\n data-action={placeholder ? undefined : action}\n data-segment-value={choice.value}\n data-selected={String(selected)}\n aria-label={choice.label}\n aria-pressed={String(selected)}\n title={placeholder ? undefined : choice.title}\n disabled={choice.disabled || placeholder}\n tabindex={placeholder ? '-1' : '0'}\n data-kui-disabled={choice.disabled ? 'true' : undefined}\n >\n {choice.content ?? <span>{choice.label}</span>}\n </button>\n );\n })}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { wireResizeHandles } from './chunk-3CGQ7ZNO.js';
|
|
2
|
+
|
|
3
|
+
// src/wire-resizable-regions.ts
|
|
4
|
+
function wireResizableRegions(root, options) {
|
|
5
|
+
return wireResizeHandles(
|
|
6
|
+
root,
|
|
7
|
+
options,
|
|
8
|
+
'[data-component="resizable-region"]'
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { wireResizableRegions };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=chunk-XQV2B4IL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/wire-resizable-regions.ts"],"names":[],"mappings":";;;AASO,SAAS,oBAAA,CACd,MACA,OAAA,EACA;AACA,EAAA,OAAO,iBAAA;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-XQV2B4IL.js","sourcesContent":["import {\n type ResizeCommit,\n type WireResizableRegionsOptions,\n wireResizeHandles,\n} from './resize-wiring.js';\n\nexport type { ResizeCommit, WireResizableRegionsOptions };\n\n/** Wire pointer and separator-keyboard behavior for every ResizableRegion below root. */\nexport function wireResizableRegions(\n root: HTMLElement,\n options: WireResizableRegionsOptions,\n) {\n return wireResizeHandles(\n root,\n options,\n '[data-component=\"resizable-region\"]',\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { space } from './chunk-
|
|
1
|
+
import { space } from './chunk-WZ2GLEY4.js';
|
|
2
2
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
var spaceNames = [
|
|
@@ -41,4 +41,4 @@ function Spacer({
|
|
|
41
41
|
|
|
42
42
|
export { Spacer };
|
|
43
43
|
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-ZMBU522F.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/spacer.tsx"],"names":[],"mappings":";;;AAEA,IAAM,UAAA,GAAqC;AAAA,EACzC,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA;AAcA,SAAS,UAAU,KAAA,EAAwD;AACzE,EAAA,OAAO,WAAW,QAAA,CAAS,KAAoB,CAAA,GAC3C,KAAA,CAAM,KAAoB,CAAA,GACzB,KAAA;AACP;AAGO,SAAS,MAAA,CAAO;AAAA,EACrB,IAAA,GAAO,KAAA;AAAA,EACP,KAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAgB;AACd,EAAA,MAAM,UAAA,GAAa,UAAU,KAAK,CAAA;AAClC,EAAA,MAAM,WAAA,GAAc,UAAU,MAAM,CAAA;AACpC,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,UAAA,GAAa,CAAA,MAAA,EAAS,UAAU,CAAA,CAAA,GAAK,EAAA;AAAA,IACrC,WAAA,GAAc,CAAA,OAAA,EAAU,WAAW,CAAA,CAAA,GAAK;AAAA,GAC1C,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AAEX,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,WAAA,EAAc,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACtC,gBAAA,EAAe,QAAA;AAAA,MACf,WAAA,EAAW,OAAO,IAAI,CAAA;AAAA,MACtB,aAAA,EAAY,MAAA;AAAA,MACZ,OAAO,KAAA,IAAS,MAAA;AAAA,MAChB;AAAA;AAAA,GACD;AAEL","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/spacer.tsx"],"names":[],"mappings":";;;AAEA,IAAM,UAAA,GAAqC;AAAA,EACzC,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA;AAcA,SAAS,UAAU,KAAA,EAAwD;AACzE,EAAA,OAAO,WAAW,QAAA,CAAS,KAAoB,CAAA,GAC3C,KAAA,CAAM,KAAoB,CAAA,GACzB,KAAA;AACP;AAGO,SAAS,MAAA,CAAO;AAAA,EACrB,IAAA,GAAO,KAAA;AAAA,EACP,KAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAgB;AACd,EAAA,MAAM,UAAA,GAAa,UAAU,KAAK,CAAA;AAClC,EAAA,MAAM,WAAA,GAAc,UAAU,MAAM,CAAA;AACpC,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,UAAA,GAAa,CAAA,MAAA,EAAS,UAAU,CAAA,CAAA,GAAK,EAAA;AAAA,IACrC,WAAA,GAAc,CAAA,OAAA,EAAU,WAAW,CAAA,CAAA,GAAK;AAAA,GAC1C,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AAEX,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,WAAA,EAAc,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACtC,gBAAA,EAAe,QAAA;AAAA,MACf,WAAA,EAAW,OAAO,IAAI,CAAA;AAAA,MACtB,aAAA,EAAY,MAAA;AAAA,MACZ,OAAO,KAAA,IAAS,MAAA;AAAA,MAChB;AAAA;AAAA,GACD;AAEL","file":"chunk-ZMBU522F.js","sourcesContent":["import { type CssLength, space, type UiSpaceName } from './css-values.js';\n\nconst spaceNames: readonly UiSpaceName[] = [\n 'none',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n];\n\nexport interface SpacerProps {\n /** Grow and shrink to fill the available space along a parent's flex axis. */\n flex?: boolean;\n /** A named UI spacing token or typed physical width. */\n width?: UiSpaceName | CssLength;\n /** A named UI spacing token or typed physical height. */\n height?: UiSpaceName | CssLength;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nfunction dimension(value?: UiSpaceName | CssLength): CssLength | undefined {\n return spaceNames.includes(value as UiSpaceName)\n ? space(value as UiSpaceName)\n : (value as CssLength | undefined);\n}\n\n/** A decorative fixed-size or flexible gap for Row, List, and other flex layouts. */\nexport function Spacer({\n flex = false,\n width,\n height,\n className = '',\n slot,\n}: SpacerProps) {\n const widthValue = dimension(width);\n const heightValue = dimension(height);\n const style = [\n widthValue ? `width:${widthValue}` : '',\n heightValue ? `height:${heightValue}` : '',\n ]\n .filter(Boolean)\n .join(';');\n\n return (\n <div\n class={`kui-spacer ${className}`.trim()}\n data-component=\"spacer\"\n data-flex={String(flex)}\n aria-hidden=\"true\"\n style={style || undefined}\n slot={slot}\n ></div>\n );\n}\n\nexport type { CssLength, UiSpaceName } from './css-values.js';\n"]}
|
|
@@ -57,7 +57,7 @@ interface CollapsiblePanelProps {
|
|
|
57
57
|
collapseMotion?: ResizableRegionCollapseMotion;
|
|
58
58
|
contentOverflow?: ResizableRegionContentOverflow;
|
|
59
59
|
presentation?: ResizableRegionPresentation;
|
|
60
|
-
/** Control shown in a safe-area-aware
|
|
60
|
+
/** Control shown while collapsed, in a safe-area-aware corner of the panel's container (not the viewport). */
|
|
61
61
|
restoreControl?: SafeHtml;
|
|
62
62
|
restorePosition?: ResizableRegionRestorePosition;
|
|
63
63
|
className?: string;
|
|
@@ -69,7 +69,11 @@ interface CollapsiblePanelProps {
|
|
|
69
69
|
* slides out via `transform` (one reflow, composited — the same technique
|
|
70
70
|
* `Workbench` and the catalog sidebar use). Bottom-drawer content stays anchored
|
|
71
71
|
* to the panel's fixed bottom edge, so the track cannot move its layout origin
|
|
72
|
-
* underneath the transform transition.
|
|
72
|
+
* underneath the transform transition. A collapsed panel renders `inert` (with
|
|
73
|
+
* `aria-hidden`), so neither Tab, pointer, nor assistive technology reaches
|
|
74
|
+
* content that has slid out of view; its `restoreControl` renders outside the
|
|
75
|
+
* panel and stays reachable.
|
|
76
|
+
* The app owns the `collapsed` signal;
|
|
73
77
|
* pair it with `wireSidebar` for the toggle, focus, compact-overlay, keyboard,
|
|
74
78
|
* and persistence semantics, and with `CollapsiblePanelToggle` for the standard
|
|
75
79
|
* affordance. See `ui/docs/collapsible-panel.md` and `docs/23-app-layouts.md`.
|
|
@@ -65,6 +65,7 @@ function CollapsiblePanel({
|
|
|
65
65
|
"data-presentation": presentation,
|
|
66
66
|
"aria-label": label || void 0,
|
|
67
67
|
"aria-hidden": collapsed || presentation === "hidden" ? "true" : void 0,
|
|
68
|
+
inert: collapsed,
|
|
68
69
|
style: size ? `${sizeVar}: ${size}px` : void 0,
|
|
69
70
|
children: /* @__PURE__ */ jsx("div", { class: "kui-collapsible-panel__content", children })
|
|
70
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/collapsible-panel.tsx"],"names":[],"mappings":";;;;AA8BO,SAAS,0BAAA,CACd,MACA,SAAA,EACkE;AAClE,EAAA,IAAI,IAAA,KAAS,MAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,iBAAA,EAAkB,GAC/C,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB;AACvD,EAAA,IAAI,IAAA,KAAS,OAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB,GACjD,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB;AACzD,EAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB,GACnD,EAA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A,EAAe,eAAA;AAAA,QAEd,QAAA,EAAA;AAAA;AAAA;AACH,GAAA,EAEJ,CAAA;AAEJ","file":"collapsible-panel.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport {\n PanelBottomClose,\n PanelBottomOpen,\n PanelLeftClose,\n PanelLeftOpen,\n PanelRightClose,\n PanelRightOpen,\n} from 'lucide';\n\nimport { LucideIcon } from './lucide-icon.js';\nimport type {\n ResizableRegionCollapseMotion,\n ResizableRegionContentOverflow,\n ResizableRegionPresentation,\n ResizableRegionRestorePosition,\n ResizableRegionSeparator,\n} from './resizable-region.js';\nimport type { KerfUiContent } from './semantic-content.js';\n\n/** Which edge a {@link CollapsiblePanel} docks to. */\nexport type CollapsiblePanelSide = 'left' | 'right' | 'bottom';\n\n/**\n * The standard collapse/expand icon for a panel `side` and `collapsed` state,\n * so every app's sidebars and drawers use one recognizable convention:\n * `PanelLeft*` for a left rail, `PanelRight*` for a right rail, `PanelBottom*`\n * for a bottom drawer — the `Close` glyph while open, the `Open` glyph while\n * collapsed. Exposed so an app can render its own toggle affordance.\n */\nexport function collapsiblePanelToggleIcon(\n side: CollapsiblePanelSide,\n collapsed: boolean,\n): { icon: Parameters<typeof LucideIcon>[0]['icon']; name: string } {\n if (side === 'left')\n return collapsed\n ? { icon: PanelLeftOpen, name: 'panel-left-open' }\n : { icon: PanelLeftClose, name: 'panel-left-close' };\n if (side === 'right')\n return collapsed\n ? { icon: PanelRightOpen, name: 'panel-right-open' }\n : { icon: PanelRightClose, name: 'panel-right-close' };\n return collapsed\n ? { icon: PanelBottomOpen, name: 'panel-bottom-open' }\n : { icon: PanelBottomClose, name: 'panel-bottom-close' };\n}\n\nexport interface CollapsiblePanelToggleProps {\n /** The panel this toggle controls. */\n side: CollapsiblePanelSide;\n /** The panel's current collapsed state (drives the icon direction). */\n collapsed: boolean;\n /** `data-action` the button carries so `wireSidebar` can delegate its click. */\n action: string;\n /** The panel id the button targets (`data-tab-panel`-style: `data-collapsible-panel`). */\n panelId?: string;\n /** Accessible label; defaults to \"Collapse\"/\"Expand\". */\n label?: string;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A standard collapse/expand toggle button for a {@link CollapsiblePanel}: the\n * recognizable per-side icon (see {@link collapsiblePanelToggleIcon}) plus the\n * `data-action` / `aria-expanded` `wireSidebar` reads. Placement is the app's —\n * put it in the panel's own header (to collapse) and somewhere always-visible\n * (to expand while collapsed).\n */\nexport function CollapsiblePanelToggle({\n side,\n collapsed,\n action,\n panelId,\n label,\n className = '',\n slot,\n}: CollapsiblePanelToggleProps) {\n const glyph = collapsiblePanelToggleIcon(side, collapsed);\n const accessible = label ?? (collapsed ? 'Expand' : 'Collapse');\n return (\n <button\n type=\"button\"\n class={`kui-collapsible-panel__toggle ${className}`.trim()}\n data-action={action}\n data-collapsible-target={panelId}\n aria-expanded={String(!collapsed)}\n aria-label={accessible}\n slot={slot}\n >\n <LucideIcon icon={glyph.icon} name={glyph.name} />\n </button>\n );\n}\n\nexport interface CollapsiblePanelProps {\n /** A stable id for the panel — `wireSidebar` targets it and toggles reference it. */\n id: string;\n /** Which edge the panel docks to: a left/right rail or a bottom drawer. */\n side: CollapsiblePanelSide;\n /** Whether the panel is currently collapsed (the app owns this signal). */\n collapsed?: boolean;\n /** Rail width or drawer height in px. Overrides the CSS default. */\n size?: number;\n /** Accessible label for the panel region. */\n label?: string;\n /** Panel content. */\n children?: KerfUiContent;\n separator?: ResizableRegionSeparator;\n collapseMotion?: ResizableRegionCollapseMotion;\n contentOverflow?: ResizableRegionContentOverflow;\n presentation?: ResizableRegionPresentation;\n /** Control shown while collapsed, in a safe-area-aware corner of the panel's container (not the viewport). */\n restoreControl?: SafeHtml;\n restorePosition?: ResizableRegionRestorePosition;\n className?: string;\n}\n\n/**\n * A standalone collapsible side rail or bottom drawer, outside the full\n * {@link Workbench} shell. It owns only the presentation: a fixed-size content\n * area that stays laid out while the panel's track snaps to zero and the content\n * slides out via `transform` (one reflow, composited — the same technique\n * `Workbench` and the catalog sidebar use). Bottom-drawer content stays anchored\n * to the panel's fixed bottom edge, so the track cannot move its layout origin\n * underneath the transform transition. A collapsed panel renders `inert` (with\n * `aria-hidden`), so neither Tab, pointer, nor assistive technology reaches\n * content that has slid out of view; its `restoreControl` renders outside the\n * panel and stays reachable.\n * The app owns the `collapsed` signal;\n * pair it with `wireSidebar` for the toggle, focus, compact-overlay, keyboard,\n * and persistence semantics, and with `CollapsiblePanelToggle` for the standard\n * affordance. See `ui/docs/collapsible-panel.md` and `docs/23-app-layouts.md`.\n */\nexport function CollapsiblePanel({\n id,\n side,\n collapsed = false,\n size,\n label,\n children,\n separator = 'auto',\n collapseMotion = 'slide',\n contentOverflow = 'clip',\n presentation = 'inline',\n restoreControl,\n restorePosition = side === 'left' ? 'bottom-start' : 'bottom-end',\n className = '',\n}: CollapsiblePanelProps) {\n const sizeVar =\n side === 'bottom'\n ? '--kui-collapsible-panel-height'\n : '--kui-collapsible-panel-width';\n return (\n <>\n <aside\n class={`kui-collapsible-panel kui-collapsible-panel--${side} ${className}`.trim()}\n data-component=\"collapsible-panel\"\n data-collapsible-panel={id}\n data-side={side}\n data-collapsed={String(collapsed)}\n data-separator={separator}\n data-collapse-motion={collapseMotion}\n data-content-overflow={contentOverflow}\n data-presentation={presentation}\n aria-label={label || undefined}\n aria-hidden={\n collapsed || presentation === 'hidden' ? 'true' : undefined\n }\n inert={collapsed}\n style={size ? `${sizeVar}: ${size}px` : undefined}\n >\n <div class=\"kui-collapsible-panel__content\">{children}</div>\n </aside>\n {collapsed && restoreControl && presentation !== 'hidden' && (\n <div\n class=\"kui-collapsible-panel__restore\"\n data-panel-restore={id}\n data-position={restorePosition}\n >\n {restoreControl}\n </div>\n )}\n </>\n );\n}\n"]}
|
package/dist/css-values.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ type CssFlexBasis = CssLength | 'auto' | 'content' | 'min-content' | 'max-conten
|
|
|
53
53
|
type CssSizeKeyword = 'auto' | 'min-content' | 'max-content' | 'fit-content';
|
|
54
54
|
/** A complete width/height value accepted by dimension-valued UI props. */
|
|
55
55
|
type CssSize = CssLength | CssSizeKeyword;
|
|
56
|
-
declare const uiColorNames: readonly ["accent", "accent-text", "border", "border-quiet", "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", "danger-border-loud", "danger-border-normal", "danger-border-quiet", "danger-fill-loud", "danger-fill-normal", "danger-fill-quiet", "danger-on-loud", "danger-on-normal", "danger-on-quiet", "danger-text", "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", "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", "pop-text", "success", "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", "success-text", "surface", "surface-lowered", "surface-raised", "text", "text-link", "text-quiet", "warning", "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", "warning-text"];
|
|
56
|
+
declare const uiColorNames: readonly ["accent", "accent-text", "border", "border-quiet", "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", "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", "danger-text", "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", "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", "pop-text", "success", "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", "success-text", "surface", "surface-lowered", "surface-raised", "text", "text-link", "text-quiet", "warning", "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", "warning-text"];
|
|
57
57
|
/** Names of the public `--kui-color-*` semantic tokens. */
|
|
58
58
|
type UiColorName = (typeof uiColorNames)[number];
|
|
59
59
|
/**
|
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-WZ2GLEY4.js';
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=css-values.js.map
|
|
@@ -23,8 +23,11 @@ interface FloatingToolbarProps {
|
|
|
23
23
|
* restore button) that sits over the content but NOT over dialogs or overlays
|
|
24
24
|
* (it is not in the top layer). It is inset from the container edges by
|
|
25
25
|
* `--kui-floating-toolbar-inset` (default `--kui-space-m`, i.e. 8px more than a
|
|
26
|
-
* top toolbar's own inset); override that token
|
|
27
|
-
*
|
|
26
|
+
* top toolbar's own inset); override that token, on the toolbar or an
|
|
27
|
+
* ancestor, to move it. Inside a `Workbench`, `CollapsiblePanel`, or
|
|
28
|
+
* `ResizableRegion` restore corner the corner owns the inset, so the toolbar
|
|
29
|
+
* floats from the corner's own position. The app owns the controls and their
|
|
30
|
+
* behavior — wire them with `delegate()` as usual.
|
|
28
31
|
*/
|
|
29
32
|
declare function FloatingToolbar({ children, label, position, className, slot, }: FloatingToolbarProps): kerfjs.SafeHtml;
|
|
30
33
|
|
package/dist/floating-toolbar.js
CHANGED
package/dist/grid.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
export { wireTokenSearchFields } from './chunk-CMUIXJZM.js';
|
|
2
|
-
export { ValueTable, ValueTableRow } from './chunk-
|
|
3
|
-
export { wireResizableRegions } from './chunk-
|
|
4
|
-
|
|
2
|
+
export { ValueTable, ValueTableRow } from './chunk-44IG7PFV.js';
|
|
3
|
+
export { wireResizableRegions } from './chunk-XQV2B4IL.js';
|
|
4
|
+
|
|
5
|
+
export { reorderTabs, wireTabBars } from './chunk-46263QLK.js';
|
|
5
6
|
export { DialogSurface, PopupSurface } from './chunk-NN6GYOA2.js';
|
|
6
7
|
export { TabBar } from './chunk-N3GKMPDW.js';
|
|
7
8
|
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-HJKRCKDR.js';
|
|
8
|
-
export { SegmentedControl } from './chunk-
|
|
9
|
-
export { Select } from './chunk-
|
|
10
|
-
export { Spacer } from './chunk-
|
|
11
|
-
export { StateBanner } from './chunk-
|
|
9
|
+
export { SegmentedControl } from './chunk-X5QSICJ3.js';
|
|
10
|
+
export { Select } from './chunk-T22EM4ET.js';
|
|
11
|
+
export { Spacer } from './chunk-ZMBU522F.js';
|
|
12
|
+
export { StateBanner } from './chunk-BJJKFVWW.js';
|
|
12
13
|
export { SunkenPanel } from './chunk-6ZXOQEAN.js';
|
|
13
|
-
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-
|
|
14
|
-
export { Row } from './chunk-
|
|
14
|
+
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-VHADGP3B.js';
|
|
15
|
+
export { Row } from './chunk-5I22LMCV.js';
|
|
15
16
|
export { EmptyState } from './chunk-E36EVCKG.js';
|
|
16
|
-
export { FloatingToolbar } from './chunk-
|
|
17
|
-
export { Grid } from './chunk-
|
|
18
|
-
export { ListActionRow } from './chunk-
|
|
17
|
+
export { FloatingToolbar } from './chunk-5NDQABWK.js';
|
|
18
|
+
export { Grid } from './chunk-C2FAYFDE.js';
|
|
19
|
+
export { ListActionRow } from './chunk-RNZAKSME.js';
|
|
19
20
|
export { ListInsetControl } from './chunk-D7GWXIAS.js';
|
|
20
21
|
export { ListInsetText } from './chunk-ZK5EGVFP.js';
|
|
21
|
-
export { AppTab } from './chunk-
|
|
22
|
+
export { AppTab } from './chunk-NE5JAOQS.js';
|
|
22
23
|
export { ToolbarActionLink, ToolbarControlGroup } from './chunk-ZIYOJFZD.js';
|
|
23
24
|
export { Toolbar } from './chunk-MTM43SJO.js';
|
|
24
|
-
export { ListItem } from './chunk-
|
|
25
|
-
export { List } from './chunk-
|
|
26
|
-
export { ToolbarText } from './chunk-
|
|
25
|
+
export { ListItem } from './chunk-GUIHMIT2.js';
|
|
26
|
+
export { List } from './chunk-3NBL3OUQ.js';
|
|
27
|
+
export { ToolbarText } from './chunk-TZ5IHWB2.js';
|
|
27
28
|
export { Pane } from './chunk-7GUQYHKA.js';
|
|
28
29
|
|
|
29
30
|
export { LoadingSpinner } from './chunk-ZLWQZUGF.js';
|
|
30
|
-
export { ListHeader } from './chunk-
|
|
31
|
+
export { ListHeader } from './chunk-KPNTVB7A.js';
|
|
31
32
|
export { Text } from './chunk-7IUSV4XG.js';
|
|
32
|
-
export { Skeleton } from './chunk-
|
|
33
|
+
export { Skeleton } from './chunk-ATHXW6RP.js';
|
|
33
34
|
|
|
34
35
|
export { Badge } from './chunk-XD7DWYXG.js';
|
|
35
|
-
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, space, uiColor } from './chunk-
|
|
36
|
+
export { calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, space, uiColor } from './chunk-WZ2GLEY4.js';
|
|
36
37
|
export { DisclosureArrow } from './chunk-HMQ2ZDGG.js';
|
|
37
38
|
export { LucideIcon } from './chunk-4R777DUZ.js';
|
|
38
39
|
|
|
@@ -18,6 +18,7 @@ type ListActionRowTrailingAttributes = Readonly<Record<`data-${string}`, string
|
|
|
18
18
|
'data-component'?: never;
|
|
19
19
|
'data-action'?: never;
|
|
20
20
|
'data-item-id'?: never;
|
|
21
|
+
'data-kui-disabled'?: never;
|
|
21
22
|
popoverTarget?: string;
|
|
22
23
|
popoverTargetAction?: 'toggle' | 'show' | 'hide';
|
|
23
24
|
'aria-controls'?: string;
|
|
@@ -43,7 +44,7 @@ interface ListActionRowProps {
|
|
|
43
44
|
state?: string;
|
|
44
45
|
disabled?: boolean;
|
|
45
46
|
tabIndex?: number;
|
|
46
|
-
/** Render as an unanimated loading skeleton, disabling both actions. */
|
|
47
|
+
/** Render as an unanimated loading skeleton, disabling both actions: label, description, icon, and status text become skeletons; the `busy` indicator stays live. */
|
|
47
48
|
placeholder?: boolean;
|
|
48
49
|
trailingAction: string;
|
|
49
50
|
trailingActionLabel: string;
|
package/dist/list-action-row.js
CHANGED
package/dist/list-header.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ type ListHeaderRootAttributes = Readonly<Record<`data-${string}`, string | undef
|
|
|
14
14
|
}>;
|
|
15
15
|
type ListHeaderTriggerAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
16
16
|
'data-action'?: never;
|
|
17
|
+
'data-kui-disabled'?: never;
|
|
17
18
|
popoverTarget?: string;
|
|
18
19
|
popoverTargetAction?: 'toggle' | 'show' | 'hide';
|
|
19
20
|
'aria-controls'?: string;
|
package/dist/list-header.js
CHANGED
package/dist/list-item.d.ts
CHANGED
|
@@ -12,16 +12,18 @@ type ListItemRootAttributes = Readonly<Record<`data-${string}`, string | undefin
|
|
|
12
12
|
'data-divider'?: never;
|
|
13
13
|
'data-busy'?: never;
|
|
14
14
|
'data-state'?: never;
|
|
15
|
+
'data-kui-disabled'?: never;
|
|
15
16
|
}>;
|
|
16
17
|
interface ListItemProps {
|
|
17
18
|
label: string | SafeHtml;
|
|
18
19
|
/** App-owned supporting text rendered in the component's stable label stack. */
|
|
19
20
|
description?: string | SafeHtml;
|
|
20
21
|
icon?: SafeHtml;
|
|
22
|
+
/** Dormant author content at the row's end; a placeholder renders it as a skeleton. */
|
|
21
23
|
trailing?: KerfUiContent;
|
|
22
|
-
/** Dormant status metadata rendered before trailing content. */
|
|
24
|
+
/** Dormant status metadata rendered before trailing content; a placeholder renders it as a skeleton. */
|
|
23
25
|
status?: string | SafeHtml;
|
|
24
|
-
/** Show a progress indicator and expose the row as busy without replacing its content. */
|
|
26
|
+
/** Show a progress indicator and expose the row as busy without replacing its content; a placeholder keeps the indicator. */
|
|
25
27
|
busy?: boolean;
|
|
26
28
|
density?: 'standard' | 'compact';
|
|
27
29
|
divider?: 'none' | 'before' | 'after' | 'both';
|
|
@@ -36,7 +38,7 @@ interface ListItemProps {
|
|
|
36
38
|
state?: string;
|
|
37
39
|
disabled?: boolean;
|
|
38
40
|
tabIndex?: number;
|
|
39
|
-
/** Render the row as an unanimated loading skeleton, disabling its action. */
|
|
41
|
+
/** Render the row as an unanimated loading skeleton, disabling its action: label, description, icon, status, and trailing content become skeletons; the `busy` indicator stays live. */
|
|
40
42
|
placeholder?: boolean;
|
|
41
43
|
rootAttributes?: ListItemRootAttributes;
|
|
42
44
|
/** Native named-slot assignment when composed inside a web component. */
|
package/dist/list-item.js
CHANGED
package/dist/list.js
CHANGED
package/dist/nav-stack.js
CHANGED
|
@@ -17,6 +17,9 @@ interface ResizableRegionProps {
|
|
|
17
17
|
max: number;
|
|
18
18
|
axis?: ResizableRegionAxis;
|
|
19
19
|
edge?: ResizableRegionEdge;
|
|
20
|
+
/** Snap the track to zero. The region renders `inert` and `aria-hidden`
|
|
21
|
+
* while collapsed, so neither Tab nor assistive technology reaches it or
|
|
22
|
+
* lands on an empty landmark; `restoreControl` renders outside the region. */
|
|
20
23
|
collapsed?: boolean;
|
|
21
24
|
transitioning?: boolean;
|
|
22
25
|
/** Whether the separator line is painted. The resize hit target remains available. */
|
|
@@ -29,7 +32,7 @@ interface ResizableRegionProps {
|
|
|
29
32
|
presentation?: ResizableRegionPresentation;
|
|
30
33
|
/** Always-available control rendered while collapsed, outside the clipped region. */
|
|
31
34
|
restoreControl?: SafeHtml;
|
|
32
|
-
/** Safe-area-aware viewport
|
|
35
|
+
/** Safe-area-aware corner of the region's container (not the viewport) for `restoreControl`. */
|
|
33
36
|
restorePosition?: ResizableRegionRestorePosition;
|
|
34
37
|
/** Fill the available inline track and hide the separator below a container breakpoint. */
|
|
35
38
|
responsiveFillAt?: ResizableRegionResponsiveFillAt;
|
package/dist/resizable-region.js
CHANGED
package/dist/row.js
CHANGED
|
@@ -23,7 +23,7 @@ interface SegmentedControlProps<Value extends string = string> {
|
|
|
23
23
|
size?: SegmentedControlSize;
|
|
24
24
|
layout?: SegmentedControlLayout;
|
|
25
25
|
className?: string;
|
|
26
|
-
/** Render as
|
|
26
|
+
/** Render as a loading placeholder: every choice keeps its live label or icon, none is selected, and every segment is disabled. */
|
|
27
27
|
placeholder?: boolean;
|
|
28
28
|
/** Native named-slot assignment when composed inside a web component. */
|
|
29
29
|
slot?: string;
|
package/dist/select.js
CHANGED
package/dist/skeleton.js
CHANGED
package/dist/spacer.js
CHANGED
package/dist/split-view.js
CHANGED
package/dist/state-banner.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ interface StateBannerProps {
|
|
|
13
13
|
tone?: StateBannerTone;
|
|
14
14
|
urgency?: StateBannerUrgency;
|
|
15
15
|
className?: string;
|
|
16
|
-
/** Render the title, badge, and detail as unanimated loading skeletons, keeping the icon and tone. */
|
|
16
|
+
/** Render the title, badge, and detail as unanimated loading skeletons, keeping the icon and tone. The detail line appears only when `detail` is set, as in the live banner. */
|
|
17
17
|
placeholder?: boolean;
|
|
18
18
|
/** Native named-slot assignment when composed inside a web component. */
|
|
19
19
|
slot?: string;
|
package/dist/state-banner.js
CHANGED
package/dist/styles/badge.css
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
--_kui-badge-fill-quiet: var(--kui-color-brand-fill-quiet);
|
|
28
28
|
--_kui-badge-fill-solid: var(--kui-color-brand-on-fill);
|
|
29
29
|
--_kui-badge-border: var(--kui-color-brand-border-normal);
|
|
30
|
-
--_kui-badge-on-quiet: var(--kui-color-brand-on-
|
|
30
|
+
--_kui-badge-on-quiet: var(--kui-color-brand-on-fill);
|
|
31
31
|
--_kui-badge-on-solid: var(--kui-color-surface);
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
--_kui-badge-fill-quiet: var(--kui-color-pop-fill-quiet);
|
|
36
36
|
--_kui-badge-fill-solid: var(--kui-color-pop-on-fill);
|
|
37
37
|
--_kui-badge-border: var(--kui-color-pop-border-normal);
|
|
38
|
-
--_kui-badge-on-quiet: var(--kui-color-pop-on-
|
|
38
|
+
--_kui-badge-on-quiet: var(--kui-color-pop-on-fill);
|
|
39
39
|
--_kui-badge-on-solid: var(--kui-color-surface);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
--_kui-badge-fill-quiet: var(--kui-color-success-fill-quiet);
|
|
44
44
|
--_kui-badge-fill-solid: var(--kui-color-success-on-fill);
|
|
45
45
|
--_kui-badge-border: var(--kui-color-success-border-normal);
|
|
46
|
-
--_kui-badge-on-quiet: var(--kui-color-success-on-
|
|
46
|
+
--_kui-badge-on-quiet: var(--kui-color-success-on-fill);
|
|
47
47
|
--_kui-badge-on-solid: var(--kui-color-surface);
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -51,19 +51,30 @@
|
|
|
51
51
|
--_kui-badge-fill-quiet: var(--kui-color-warning-fill-quiet);
|
|
52
52
|
--_kui-badge-fill-solid: var(--kui-color-warning-on-fill);
|
|
53
53
|
--_kui-badge-border: var(--kui-color-warning-border-normal);
|
|
54
|
-
--_kui-badge-on-quiet: var(--kui-color-warning-on-
|
|
54
|
+
--_kui-badge-on-quiet: var(--kui-color-warning-on-fill);
|
|
55
55
|
--_kui-badge-on-solid: var(--kui-color-surface);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.kui-badge[data-tone="danger"] {
|
|
59
59
|
--_kui-badge-fill-quiet: var(--kui-color-danger-fill-quiet);
|
|
60
|
-
--_kui-badge-fill-solid: var(--kui-color-danger-on-
|
|
60
|
+
--_kui-badge-fill-solid: var(--kui-color-danger-on-fill);
|
|
61
61
|
--_kui-badge-border: var(--kui-color-danger-border-normal);
|
|
62
|
-
--_kui-badge-on-quiet: var(--kui-color-danger-on-
|
|
62
|
+
--_kui-badge-on-quiet: var(--kui-color-danger-on-fill);
|
|
63
63
|
--_kui-badge-on-solid: var(--kui-color-surface);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.kui-badge[data-appearance="solid"] {
|
|
67
|
+
/* A placeholder's skeleton inside a solid badge: the generic text-color tint
|
|
68
|
+
is nearly invisible on the saturated fill, so derive it from the badge's
|
|
69
|
+
own foreground instead, which contrasts with the fill in every tone and
|
|
70
|
+
color scheme. Quiet and outline badges sit on a pale fill and keep the
|
|
71
|
+
generic tint. */
|
|
72
|
+
--_kui-skeleton-fill: color-mix(
|
|
73
|
+
in srgb,
|
|
74
|
+
var(--_kui-badge-on-solid) 45%,
|
|
75
|
+
transparent
|
|
76
|
+
);
|
|
77
|
+
|
|
67
78
|
color: var(--_kui-badge-on-solid);
|
|
68
79
|
background: var(--_kui-badge-fill-solid);
|
|
69
80
|
}
|