@kerfjs/ui 5.0.0-beta.76 → 5.0.0-beta.77

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.
Files changed (101) hide show
  1. package/README.md +12 -0
  2. package/ai/component-catalog.json +212 -19
  3. package/ai/component-composition.json +122 -11
  4. package/ai/components/nav-stack.md +1 -0
  5. package/ai/components/select.md +1 -0
  6. package/ai/components/split-view.md +1 -0
  7. package/ai/components/text.md +4 -2
  8. package/ai/components/toolbar-control-group.md +20 -3
  9. package/ai/components/toolbar-text.md +19 -4
  10. package/ai/components/toolbar.md +10 -4
  11. package/ai/public-api-signatures-v1.md +51 -7
  12. package/ai/skill.md +26 -2
  13. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  14. package/dist/catalog.js +5 -5
  15. package/dist/{chunk-ZVYA6TLR.js → chunk-4Y4L5YEI.js} +3 -1
  16. package/dist/chunk-4Y4L5YEI.js.map +1 -0
  17. package/dist/{chunk-7QWIJEK5.js → chunk-6VQPLV3O.js} +3 -3
  18. package/dist/{chunk-7QWIJEK5.js.map → chunk-6VQPLV3O.js.map} +1 -1
  19. package/dist/{chunk-IVLTEBBT.js → chunk-M6BWQMQY.js} +2 -2
  20. package/dist/{chunk-IVLTEBBT.js.map → chunk-M6BWQMQY.js.map} +1 -1
  21. package/dist/{chunk-72LLWYP2.js → chunk-NVKRZ5DI.js} +1 -1
  22. package/dist/chunk-NVKRZ5DI.js.map +1 -0
  23. package/dist/{chunk-GO2CZX4M.js → chunk-RRCD3A6G.js} +13 -5
  24. package/dist/chunk-RRCD3A6G.js.map +1 -0
  25. package/dist/{chunk-5PAVAR4B.js → chunk-VHXHLZ6R.js} +10 -1
  26. package/dist/chunk-VHXHLZ6R.js.map +1 -0
  27. package/dist/chunk-WJN3V2H5.js +256 -0
  28. package/dist/chunk-WJN3V2H5.js.map +1 -0
  29. package/dist/{chunk-SJY7KC45.js → chunk-Z4EPMX25.js} +3 -3
  30. package/dist/{chunk-SJY7KC45.js.map → chunk-Z4EPMX25.js.map} +1 -1
  31. package/dist/{chunk-HGSTMZZ6.js → chunk-Z6PE5T7N.js} +2 -2
  32. package/dist/{chunk-HGSTMZZ6.js.map → chunk-Z6PE5T7N.js.map} +1 -1
  33. package/dist/collapsible-panel.js +2 -2
  34. package/dist/index.d.ts +3 -2
  35. package/dist/index.js +6 -5
  36. package/dist/list-header.d.ts +1 -0
  37. package/dist/list-header.js +1 -1
  38. package/dist/nav-stack.d.ts +1 -0
  39. package/dist/nav-stack.js +1 -1
  40. package/dist/select-register.js +3 -0
  41. package/dist/select-register.js.map +1 -1
  42. package/dist/select.d.ts +1 -0
  43. package/dist/select.js +1 -1
  44. package/dist/split-view.js +1 -1
  45. package/dist/styles/components/actions/toolbar/toolbar.css +32 -0
  46. package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +51 -0
  47. package/dist/styles/components/actions/toolbar-text/toolbar-text.css +11 -0
  48. package/dist/styles/components/navigation/nav-stack/nav-stack.css +11 -0
  49. package/dist/styles/components/typography/text/text.css +19 -0
  50. package/dist/styles/nav-stack.css +11 -0
  51. package/dist/styles/text.css +19 -0
  52. package/dist/styles/toolbar-control-group.css +51 -0
  53. package/dist/styles/toolbar-text.css +11 -0
  54. package/dist/styles/toolbar.css +32 -0
  55. package/dist/text.d.ts +5 -2
  56. package/dist/text.js +1 -1
  57. package/dist/toolbar-control-group.d.ts +14 -2
  58. package/dist/toolbar-control-group.js +1 -1
  59. package/dist/toolbar-text.d.ts +10 -2
  60. package/dist/toolbar-text.js +1 -1
  61. package/dist/wire-nav-stack.js +58 -22
  62. package/dist/wire-nav-stack.js.map +1 -1
  63. package/dist/wire-toolbar-visibility.d.ts +13 -0
  64. package/dist/wire-toolbar-visibility.js +3 -0
  65. package/dist/wire-toolbar-visibility.js.map +1 -0
  66. package/dist/workbench.js +1 -1
  67. package/docs/accessibility.md +15 -0
  68. package/docs/collapsible-panel.md +4 -0
  69. package/docs/component-contract.md +31 -0
  70. package/docs/component-selection.md +55 -1
  71. package/docs/design/templates/toolbar/width-visibility-320-dark.svg +1 -0
  72. package/docs/design/templates/toolbar/width-visibility-320.svg +1 -0
  73. package/docs/design/templates/toolbar/width-visibility-600-dark.svg +1 -0
  74. package/docs/design/templates/toolbar/width-visibility-600.svg +1 -0
  75. package/docs/design/templates/toolbar-control-group/icon-tile-brand-dark.svg +1 -0
  76. package/docs/design/templates/toolbar-control-group/icon-tile-brand.svg +1 -0
  77. package/docs/design/templates/toolbar-control-group/icon-tile-danger-dark.svg +1 -0
  78. package/docs/design/templates/toolbar-control-group/icon-tile-danger.svg +1 -0
  79. package/docs/design/templates/toolbar-control-group/icon-tile-neutral-dark.svg +1 -0
  80. package/docs/design/templates/toolbar-control-group/icon-tile-neutral.svg +1 -0
  81. package/docs/design/templates/toolbar-control-group/icon-tile-success-dark.svg +1 -0
  82. package/docs/design/templates/toolbar-control-group/icon-tile-success.svg +1 -0
  83. package/docs/design/templates/toolbar-control-group/icon-tile-warning-dark.svg +1 -0
  84. package/docs/design/templates/toolbar-control-group/icon-tile-warning.svg +1 -0
  85. package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
  86. package/docs/design/templates/toolbar-control-group.svg +1 -1
  87. package/docs/design/templates/toolbar-dark.svg +1 -1
  88. package/docs/design/templates/toolbar-text/dark-tone-dark.svg +1 -0
  89. package/docs/design/templates/toolbar-text/dark-tone.svg +1 -0
  90. package/docs/design/templates/toolbar-text-dark.svg +1 -1
  91. package/docs/design/templates/toolbar-text.svg +1 -1
  92. package/docs/design/templates/toolbar.svg +1 -1
  93. package/docs/design/templates.md +2 -0
  94. package/docs/layout.md +12 -1
  95. package/docs/nav-stack.md +5 -1
  96. package/llms.txt +24 -0
  97. package/package.json +5 -1
  98. package/dist/chunk-5PAVAR4B.js.map +0 -1
  99. package/dist/chunk-72LLWYP2.js.map +0 -1
  100. package/dist/chunk-GO2CZX4M.js.map +0 -1
  101. package/dist/chunk-ZVYA6TLR.js.map +0 -1
@@ -136,3 +136,5 @@ ListItem templates retain the shared 18px leading icon and 44px row target;
136
136
  regenerate both themes and library sheets when that geometry changes. The browser
137
137
  pane/sidebar geometry checks cover the resulting 43px icon-label offset from the
138
138
  section edge (17px content inset + 18px icon + 8px gap).
139
+
140
+ For a focused update, pass component names: `npm run design-templates:build -- toolbar`. Omit them to capture all components. Toolbar width variants use the real `wireToolbarVisibility` helper after rendering typed props.
package/docs/layout.md CHANGED
@@ -376,10 +376,21 @@ variant owns no margin, border, or padding. Choose heading levels from the
376
376
  document outline, not for visual size. Toolbar identity and page-heading
377
377
  compositions continue to use `ToolbarText`.
378
378
 
379
+ `Text.controlMargins` accepts canonical physical `Sides` (`t`, `r`, `b`, `l`,
380
+ in that order, or empty). Selected edges gain the exterior
381
+ `--kui-layout-inline-margin` gutter (8px by default); the border and padding
382
+ stay unchanged, including with `flush`. Use `controlMargins="rl"` for a
383
+ single text box that needs the control gutter without a Row wrapper. Do not
384
+ combine it with a parent inset on the same edges. Spans remain native inline
385
+ elements: horizontal margins separate inline content, while vertical margins
386
+ do not create line spacing.
387
+
379
388
  `Text` is also the answer for a normal-color subsection title. `ToolbarText`
380
389
  below `xlarge` (`large`, `default`, `small`) is deliberately quiet: it labels a
381
390
  toolbar's identity — a pane name or a status — and must not compete with the
382
- content and controls around it, so it has no tone option. A subsection title is
391
+ content and controls around it. Set `tone="dark"` on a loud or photo-backed
392
+ toolbar surface to use `--kui-color-neutral-on-loud` at every size, matching
393
+ dark control groups. Default tone keeps existing identity and heading colors. A subsection title is
383
394
  document content, not toolbar identity: use `Text` with the `h2`–`h6` variant
384
395
  the outline calls for (inside a `List` with `controlInsets`, its text lines up
385
396
  with content items). Use `ListHeader` when the section is a list or menu group
package/docs/nav-stack.md CHANGED
@@ -164,7 +164,11 @@ unsafe area but can always be scrolled clear. A view whose only child is a
164
164
  `wireNavStack(root, { onBack, duration? })` observes the rendered stack and
165
165
  animates each change: a pushed view slides in from the trailing edge; a popped
166
166
  view slides back off it over the revealed view; and snapshots of the previous
167
- top and bottom chrome cross-fade into the active view's chrome. Focus moves to
167
+ top and bottom chrome cross-fade into the active view's chrome. The preserved
168
+ underlying view remains visible during a push, while remaining inaccessible.
169
+ Starting transforms and opacity apply instantly before the transition begins.
170
+ A new navigation settles the previous transition and cancels its pending frames
171
+ and cleanup timers; disposal removes temporary copies and exiting views. Focus moves to
168
172
  the new top view independently of animation duration. It returns a disposer.
169
173
  The animation honors `prefers-reduced-motion` (transitions collapse to instant)
170
174
  and `duration: 0` disables it. Applicable at every device size and inside
package/llms.txt CHANGED
@@ -19,6 +19,10 @@ the folder modules, and CSS only imports their owner stylesheets.
19
19
 
20
20
  ### Shared semantic tones
21
21
 
22
+ Use `ToolbarText tone="dark"` on a loud or photo-backed toolbar surface to
23
+ match dark control groups. It applies to read-only headings and actionable
24
+ titles at every size; default tone retains existing identity and heading colors.
25
+
22
26
  `SemanticTone` is the shared color-role type for `Badge`, `Chip`, `StateBanner`,
23
27
  and semantic `ContentItem` appearances: `neutral`, `info`, `pop`, `success`,
24
28
  `warning`, and `danger`. Import it as a type from `@kerfjs/ui`,
@@ -342,6 +346,11 @@ headingLevel`, `TokenSearchField clearIcon`, `ContentItem frame="framed"` for a
342
346
  compact, prominent, display, and code roles instead of global utility classes. It passes native attributes
343
347
  through; block variants own the standard transparent border plus item padding, while `span` owns none. Keep
344
348
  toolbar titles on `ToolbarText` and list-aligned bare prose on `ListInsetText`.
349
+ Text supports `controlMargins` with canonical physical Sides for an exterior 8px control gutter; it preserves border/padding and avoids an isolated Row wrapper. Avoid stacking it with parent insets. Inline spans retain native inline margin behavior.
350
+
351
+ `ToolbarControlGroup.tileTone` selects `neutral`, `brand`, `success`, `warning`, or `danger` quiet fill, matching quiet border, and on-quiet foreground for a non-interactive icon tile. Compose a contained `single` group whose only child is a direct decorative LucideIcon (`aria-hidden="true"`). Omission preserves the normal group palette. The prop does not recolor interactive, mixed, multi-control, or borderless groups; keep real actions in controls with their existing focus/hover/pressed treatments.
352
+ Expanded search groups accept `expandedOverflow="visible"` to anchor app-owned suggestion/date/help surfaces below their relative root; collapsed/default groups retain existing clipping. Apps own surface placement/dismissal and use `data-token-search-keep-open` or `collapsible.keepOpenOn` for focus.
353
+
345
354
  - **Space by the five-step scale, by relationship not by eye.** `0`
346
355
  `--kui-space-none`, `4px` `--kui-space-2xs`, `8px` `--kui-space-xs` (inside a
347
356
  group), `16px` `--kui-space-m`, `24px` `--kui-space-l` (between major differing
@@ -533,3 +542,18 @@ shell, `@kerfjs/ui/collapsible-panel` (`CollapsiblePanel`, `CollapsiblePanelTogg
533
542
  - [README.md](./README.md): package overview and the component subpath table.
534
543
 
535
544
  Neutral lowered surfaces and decorative neutral fills/borders are translucent theme colors; compose nested public components directly. Default/raised canvases, foregrounds, focus indicators, and loud contrast-bearing fills remain opaque. Do not assign depth-specific component tokens in demo wrappers.
545
+
546
+ Navigation transition continuity: `wireNavStack` slides the incoming view over the preserved previous view on push and the outgoing view off on pop, cross-fades both live chrome surfaces with inert snapshots, and settles/cancels an interrupted transition before starting the next. Reduced motion and duration zero settle immediately.
547
+
548
+ `ToolbarText` and `ToolbarControlGroup` accept typed `hideBelow`/`showBelow`
549
+ lengths (for example `px(416)`). Wire `wireToolbarVisibility(root)` from
550
+ `@kerfjs/ui/wire-toolbar-visibility` and dispose on unmount. Thresholds use the
551
+ nearest Toolbar content-box width: hideBelow hides strictly below, showBelow
552
+ shows strictly below, with complementary behavior at equality. Percentages use
553
+ that content width; em and custom properties use the item's own context. Invalid,
554
+ negative, unresolved, or contradictory values leave the item visible under this
555
+ width policy. Keep primary actions visible and offer a complementary overflow
556
+ group. See `docs/component-contract.md` "Toolbar width visibility" for lifecycle
557
+ details.
558
+
559
+ Select menus use native viewport shifting with 10px gutters: default menus grow to content (up to 20rem), while `fitMenu` matches trigger width and long labels wrap. Keep popup sizing and position repairs out of consumer CSS.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerfjs/ui",
3
- "version": "5.0.0-beta.76",
3
+ "version": "5.0.0-beta.77",
4
4
  "description": "Accessible, composable UI primitives for kerf applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -215,6 +215,10 @@
215
215
  "types": "./dist/wire-scroll-dividers.d.ts",
216
216
  "import": "./dist/wire-scroll-dividers.js"
217
217
  },
218
+ "./wire-toolbar-visibility": {
219
+ "types": "./dist/wire-toolbar-visibility.d.ts",
220
+ "import": "./dist/wire-toolbar-visibility.js"
221
+ },
218
222
  "./nav-stack": {
219
223
  "types": "./dist/nav-stack.d.ts",
220
224
  "browser": "./dist/browser/nav-stack.js",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/actions/toolbar-text/toolbar-text.tsx"],"names":[],"mappings":";;;;AA8DO,SAAS,WAAA,CAAY;AAAA,EAC1B,IAAA;AAAA,EACA,IAAA,GAAO,SAAA;AAAA,EACP,SAAA,GAAY,EAAA;AAAA,EACZ,EAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA,GAAc,KAAA;AAAA,EACd,IAAA,GAAO,KAAA;AAAA,EACP,QAAA,GAAW,IAAA;AAAA,EACX,QAAA,GAAW,IAAA;AAAA,EACX,IAAA,GAAO,KAAA;AAAA,EACP,IAAA;AAAA,EACA;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,MAAA,GAAS,IAAA,IAAQ,QAAA,IAAY,IAAA,IAAQ,QAAA,GAAW,CAAA;AACtD,EAAA,IAAI,MAAA,KAAW,MAAA;AACb,IAAA,uBACE,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,QAAA;AAAA,QACL,KAAA,EAAO,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,QAC5C,gBAAA,EAAe,cAAA;AAAA,QACf,WAAA,EAAW,IAAA;AAAA,QACX,WAAA,EAAW,OAAO,MAAA,GAAS,MAAA;AAAA,QAC3B,eAAA,EAAe,WAAW,MAAA,GAAY,OAA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-values.js';\nimport { Skeleton } from '../../feedback/skeleton/skeleton.js';\n\nexport type ToolbarTextSize =\n 'xlarge' | 'xlarge-fixed' | 'large' | 'default' | 'small' | 'xsmall';\n\n/** ARIA heading level for a title exposed as a heading landmark. */\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\ninterface ToolbarTextBaseProps {\n text: string;\n size?: ToolbarTextSize;\n className?: string;\n /** Optional id, e.g. so a dialog can reference the title via aria-labelledby. */\n id?: string;\n /**\n * Show a trailing ellipsis (…) where the text is truncated — on the single line\n * (default), or at the `maxLines` boundary when wrapping. Set false to hard-clip\n * instead. Default true.\n */\n ellipsis?: boolean;\n /**\n * Grow to fill the free space of the flex row it sits in (a Toolbar zone),\n * truncating at the space left by its siblings instead of taking only its\n * text's width. Default false.\n */\n fill?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /**\n * Cap wrapped text to this many lines, truncating past it. Only takes effect with\n * `wrap`; ignored on a single line. `null`/omitted wraps without a line cap. Default null.\n */\n}\n\ntype ToolbarTextWrappingProps =\n | {\n /** Wrap onto multiple lines; combine with `maxLines` to cap them. */\n wrap: true;\n maxLines?: number | null;\n }\n | { wrap?: false; maxLines?: never };\n\nexport type ToolbarTextProps = ToolbarTextBaseProps &\n (\n | ({\n action?: never;\n /** Expose `role=\"heading\"` and `aria-level` on read-only text. */\n headingLevel?: HeadingLevel;\n /** Render an unanimated loading skeleton instead of the text. */\n placeholder?: boolean;\n } & ToolbarTextWrappingProps)\n | {\n /** Render a native button with this delegated action; the app owns editing. */\n action: string;\n headingLevel?: never;\n placeholder?: never;\n wrap?: never;\n maxLines?: never;\n }\n );\n\nexport function ToolbarText({\n text,\n size = 'default',\n className = '',\n id,\n headingLevel,\n placeholder = false,\n wrap = false,\n ellipsis = true,\n maxLines = null,\n fill = false,\n slot,\n action,\n}: ToolbarTextProps) {\n const capped = wrap && maxLines != null && maxLines > 0;\n if (action !== undefined)\n return (\n <button\n type=\"button\"\n class={`kui-toolbar-text ${className}`.trim()}\n data-component=\"toolbar-text\"\n data-size={size}\n data-fill={fill ? 'true' : undefined}\n data-ellipsis={ellipsis ? undefined : 'false'}\n data-action={action}\n id={id}\n slot={slot}\n >\n <span class=\"kui-toolbar-text__text\">{text}</span>\n </button>\n );\n return (\n <span\n class={`kui-toolbar-text ${className}`.trim()}\n data-component=\"toolbar-text\"\n data-size={size}\n data-fill={fill ? 'true' : undefined}\n data-wrap={wrap ? 'true' : undefined}\n data-ellipsis={ellipsis ? undefined : 'false'}\n data-max-lines={capped ? String(maxLines) : undefined}\n style={capped ? `--kui-toolbar-text-max-lines:${maxLines}` : undefined}\n data-placeholder={placeholder ? 'true' : undefined}\n id={id}\n role={headingLevel ? 'heading' : undefined}\n aria-level={headingLevel ? String(headingLevel) : undefined}\n aria-busy={placeholder ? 'true' : undefined}\n slot={slot}\n >\n {placeholder ? (\n <Skeleton width={em(8)} />\n ) : (\n <span class=\"kui-toolbar-text__text\">{text}</span>\n )}\n </span>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/forms/select/select.tsx"],"names":[],"mappings":";;;;;;AAgJA,SAAS,aAAA,GAAgB;AACvB,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,OAAA,EAAQ,aAAA,EAAc,aAAA,EAAY,QACrC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,0KAAA,EAA2K,CAAA,EACrL,CAAA;AAEJ;AAEO,SAAS,OAA6B,KAAA,EAA2B;AACtE,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA,GAAY,EAAA;AAAA,IACZ,eAAA;AAAA,IACA,IAAA;AAAA,IACA,QAAA,GAAW,KAAA;AAAA,IACX,OAAA,GAAU,KAAA;AAAA,IACV,WAAA,GAAc,KAAA;AAAA,IACd,YAAA,GAAe,MAAA;AAAA,IACf,IAA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AAA,EAAK,QAAA;AAAA,kBACL,oBAAA,EAAmB,OAAA;AAAA,kBAElB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA;AACT;AAAA;AAAA;AAEJ;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-72LLWYP2.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n type CssForegroundColor,\n em,\n} from '../../../shared/styles/css-values.js';\nimport { Badge } from '../../feedback/badge/badge.js';\nimport { Skeleton } from '../../feedback/skeleton/skeleton.js';\nimport {\n LucideIcon,\n type LucideNode,\n} from '../../media/lucide-icon/lucide-icon.js';\n\nexport interface SelectChoice<Value extends string = string> {\n value: Value;\n label: string;\n icon?: LucideNode;\n iconName?: string;\n /**\n * Foreground color for the optional icon: a semantic foreground token such\n * as `uiColor('success-on-quiet')`, or an application-owned\n * `foregroundColorVar('--app-icon-color')`. Fill tokens such as\n * `uiColor('success-fill-quiet')` are pale background tints and do not\n * type-check.\n */\n color?: CssForegroundColor;\n group?: string;\n /** Keep an unavailable choice visible but prevent selection. */\n disabled?: boolean;\n /** Optional explanation exposed as the disabled option's native tooltip. */\n disabledReason?: string;\n /**\n * Draw a divider between this choice and the previous choice in the same\n * list. A group boundary is already a separator, so the first choice of a\n * group (or of the whole menu) never draws a second one.\n */\n separatorBefore?: boolean;\n}\n\ntype SelectAccessibleName =\n { label: string; ariaLabel?: string } | { label?: never; ariaLabel: string };\n\nexport type SelectPresentation =\n 'form' | 'toolbar-borderless' | 'navigation' | 'inline' | 'title';\nexport type SelectSize = 'default' | 'compact';\nexport type SelectSelectedPresentation = 'label' | 'icon-only';\nexport type SelectFocusRingOwner = 'select' | 'group';\nexport type SelectTriggerWidth = 'fit-content' | 'max-content' | 'fill';\n\ninterface SelectBaseProps<Value extends string = string> {\n name: string;\n choices: readonly SelectChoice<Value>[];\n className?: string;\n /** Empty-value hint text shown in the closed control (the native select placeholder). */\n placeholderText?: string;\n /** Supporting text shown below the control and associated with its combobox. */\n hint?: string;\n disabled?: boolean;\n fitMenu?: boolean;\n /** Render as an unanimated loading skeleton: the label above a static, empty control box. */\n placeholder?: boolean;\n /** Form (default), borderless toolbar, intrinsic navigation, inline, or view-title chrome. */\n presentation?: SelectPresentation;\n size?: SelectSize;\n /** Closed trigger width; omit to keep the presentation's default. */\n triggerWidth?: SelectTriggerWidth;\n /** Show the disclosure caret (default); omit it for a compact icon-only trigger. */\n caret?: boolean;\n /** Let an enclosing ToolbarControlGroup paint the composed focus ring. */\n focusRingOwner?: SelectFocusRingOwner;\n /** Keep the trigger's focus ring inside its box when an ancestor clips overflow. */\n focusRingInset?: boolean;\n /** Maximum closed-control label width in CSS pixels before ellipsis. */\n labelMaxWidth?: number;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** One chosen value (the default). */\nexport interface SelectSingleValueProps<Value extends string = string> {\n multiple?: false;\n value: NoInfer<Value>;\n renderSelected?: (choice: SelectChoice<Value>) => SafeHtml;\n /** Show only the selected choice icon while retaining the Select's accessible name. */\n selectedPresentation?: SelectSelectedPresentation;\n triggerIcon?: never;\n selectAllLabel?: never;\n clearLabel?: never;\n}\n\n/**\n * Any number of chosen values. The popup stays open while the person toggles\n * choices and closes on an outside click, Escape, or focus leaving; the closed\n * control summarizes the chosen labels in choice order.\n */\nexport interface SelectMultipleLabelProps<Value extends string = string> {\n multiple: true;\n value: readonly NoInfer<Value>[];\n renderSelected?: never;\n selectedPresentation?: 'label';\n triggerIcon?: never;\n /** Opt in to a footer action that selects every enabled choice. */\n selectAllLabel?: string;\n /** Opt in to a footer action that clears the current selection. */\n clearLabel?: string;\n}\n\n/**\n * A multiple Select drawn as an icon-only toolbar trigger, such as a\n * \"Filter by label\" funnel. No single choice is selected, so the trigger shows\n * a fixed `triggerIcon` naming the menu's purpose; while any choice is chosen\n * a count badge sits beside it, and the combobox's accessible name ends with\n * the chosen labels in choice order.\n */\nexport interface SelectMultipleIconProps<Value extends string = string> {\n multiple: true;\n value: readonly NoInfer<Value>[];\n renderSelected?: never;\n selectedPresentation: 'icon-only';\n /**\n * The trigger's fixed icon, typically a `LucideIcon` naming the menu's\n * purpose (a funnel for a filter), independent of the selection.\n */\n triggerIcon: KerfUiContent;\n /** Opt in to a footer action that selects every enabled choice. */\n selectAllLabel?: string;\n /** Opt in to a footer action that clears the current selection. */\n clearLabel?: string;\n}\n\nexport type SelectMultipleValueProps<Value extends string = string> =\n SelectMultipleLabelProps<Value> | SelectMultipleIconProps<Value>;\n\nexport type SelectProps<Value extends string = string> =\n SelectBaseProps<Value> &\n SelectAccessibleName &\n (SelectSingleValueProps<Value> | SelectMultipleValueProps<Value>);\n\n// The closed wa-select's disclosure glyph: Web Awesome's system `chevron-down`,\n// Font Awesome Free 7.0.0 by @fontawesome (https://fontawesome.com), licensed\n// CC BY 4.0 (https://fontawesome.com/license/free). The placeholder draws the\n// same path so the loading box matches the live control without registering\n// Web Awesome.\nfunction SelectChevron() {\n return (\n <svg viewBox=\"0 0 448 512\" aria-hidden=\"true\">\n <path d=\"M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\" />\n </svg>\n );\n}\n\nexport function Select<Value extends string>(props: SelectProps<Value>) {\n const {\n name,\n label,\n ariaLabel,\n choices,\n className = '',\n placeholderText,\n hint,\n disabled = false,\n fitMenu = false,\n placeholder = false,\n presentation = 'form',\n size = 'default',\n triggerWidth,\n caret = true,\n focusRingOwner = 'select',\n focusRingInset = false,\n labelMaxWidth,\n slot,\n } = props;\n const multiple = props.multiple === true;\n const values: readonly Value[] = props.multiple ? props.value : [props.value];\n const renderSelected = props.multiple ? undefined : props.renderSelected;\n const selectedPresentation: SelectSelectedPresentation =\n props.selectedPresentation ?? 'label';\n // A multiple icon-only trigger shows a fixed icon naming the menu's\n // purpose instead of a selected choice's icon.\n const iconTrigger =\n props.multiple && props.selectedPresentation === 'icon-only';\n const triggerIcon = iconTrigger ? props.triggerIcon : undefined;\n if (placeholder) {\n return (\n <div\n class={`kui-select kui-select--placeholder ${className}`.trim()}\n data-component=\"select\"\n data-placeholder=\"true\"\n data-presentation={presentation}\n data-size={size}\n data-trigger-width={triggerWidth}\n data-caret={caret ? undefined : 'false'}\n data-selected-presentation={selectedPresentation}\n data-focus-ring-owner={focusRingOwner}\n data-focus-ring-inset={focusRingInset ? 'true' : undefined}\n aria-busy=\"true\"\n style={\n labelMaxWidth === undefined\n ? undefined\n : `--kui-select-label-max-width:${labelMaxWidth}px`\n }\n slot={slot}\n >\n {label && <span class=\"kui-select__placeholder-label\">{label}</span>}\n <span\n class=\"kui-select__placeholder-box\"\n aria-label={ariaLabel}\n role=\"img\"\n >\n <Skeleton width={em(10)} />\n <span class=\"kui-select__placeholder-chevron\" aria-hidden=\"true\">\n <SelectChevron />\n </span>\n </span>\n {hint && <span class=\"kui-select__placeholder-hint\">{hint}</span>}\n </div>\n );\n }\n // A multiple Select summarizes its choices in the display text instead of\n // leading with one selected icon.\n const selected = multiple\n ? undefined\n : choices.find((choice) => choice.value === values[0] && !choice.disabled);\n const chosenCount = iconTrigger\n ? choices.filter(\n (choice) => !choice.disabled && values.includes(choice.value),\n ).length\n : 0;\n const icon = (choice: SelectChoice<Value>, selectedIcon = false) => (\n <span\n data-key={`${name}:${choice.value}:${selectedIcon ? 'selected' : 'option'}`}\n data-morph-skip\n slot=\"start\"\n class={`kui-select__icon${selectedIcon ? ' kui-select__icon--selected' : ''}`}\n style={choice.color ? `color:${choice.color}` : undefined}\n >\n {choice.icon ? (\n <LucideIcon\n icon={choice.icon}\n name={\n choice.iconName ?? choice.label.toLowerCase().replaceAll(' ', '-')\n }\n />\n ) : null}\n </span>\n );\n const option = (choice: SelectChoice<Value>, index: number) => (\n <>\n {/* Web Awesome sets the divider's role and aria-orientation on its\n host once, so a template that omits them would lose them to the\n next kerf re-render's morph for good. Render them explicitly, with\n the orientation it reflects (see the wa-select note below). */}\n {choice.separatorBefore && index > 0 && (\n <wa-divider\n orientation=\"horizontal\"\n role=\"separator\"\n aria-orientation=\"horizontal\"\n />\n )}\n <wa-option\n value={choice.value}\n selected={multiple && !choice.disabled && values.includes(choice.value)}\n disabled={choice.disabled}\n title={choice.disabled ? choice.disabledReason : undefined}\n >\n {choice.icon ? icon(choice) : null}\n {choice.label}\n </wa-option>\n </>\n );\n const groups = [\n ...new Set(\n choices\n .map((choice) => choice.group)\n .filter((group): group is string => Boolean(group)),\n ),\n ];\n const ungrouped = choices.filter((choice) => !choice.group);\n // Web Awesome names its shadow combobox from the label, not the host's\n // aria-label. Keep ariaLabel-only names available without visible chrome.\n // A multiple Select's value is its selected options (the value attribute\n // holds only one string), kept in sync by @kerfjs/ui/select/register.\n // size/appearance/placement are Web Awesome's defaults, which it reflects\n // onto the host; rendering them keeps a re-render's morph from stripping\n // them and forcing a Lit update to put them back.\n return (\n <wa-select\n size=\"m\"\n appearance=\"outlined\"\n placement=\"bottom\"\n class={`kui-select${renderSelected ? ' kui-select--custom-selected' : ''}${fitMenu ? ' kui-select--fit-menu' : ''}${!label ? ' kui-select--label-hidden' : ''} ${className}`.trim()}\n data-component=\"select\"\n data-presentation={presentation}\n data-size={size}\n data-trigger-width={triggerWidth}\n data-caret={caret ? undefined : 'false'}\n data-selected-presentation={selectedPresentation}\n data-focus-ring-owner={focusRingOwner}\n data-focus-ring-inset={focusRingInset ? 'true' : undefined}\n name={name}\n label={label || ariaLabel}\n aria-label={ariaLabel}\n multiple={multiple}\n value={multiple ? undefined : values[0]}\n placeholder={placeholderText}\n hint={hint}\n disabled={disabled}\n style={\n labelMaxWidth === undefined\n ? undefined\n : `--kui-select-label-max-width:${labelMaxWidth}px`\n }\n slot={slot}\n >\n {iconTrigger && (\n <>\n {/* The accessible name ends with the chosen labels, which\n @kerfjs/ui/select/register writes into the summary. */}\n <span slot=\"label\" data-key={`${name}:trigger-label`}>\n {label || ariaLabel}\n <span class=\"kui-select__name-summary\" data-morph-skip />\n </span>\n <span\n data-key={`${name}:trigger-icon`}\n slot=\"start\"\n class=\"kui-select__icon kui-select__icon--selected kui-select__trigger-icon\"\n >\n {triggerIcon}\n </span>\n {chosenCount > 0 && (\n <Badge slot=\"end\" tone=\"info\" size=\"compact\" ariaHidden>\n {chosenCount}\n </Badge>\n )}\n </>\n )}\n {selected &&\n (renderSelected ? (\n <span\n data-key={`${name}:${values[0]}:custom-selected`}\n slot=\"start\"\n class=\"kui-select__custom-selected\"\n >\n <span class=\"kui-select__custom-selected-content\">\n {renderSelected(selected)}\n </span>\n </span>\n ) : selected.icon ? (\n icon(selected, true)\n ) : null)}\n {ungrouped.map(option)}\n {groups.map((group, index) => (\n <div\n class={`kui-select__group${index > 0 || ungrouped.length > 0 ? ' kui-select__group--separated' : ''}`}\n role=\"group\"\n aria-label={group}\n >\n <span class=\"kui-select__group-title\">{group}</span>\n {choices.filter((choice) => choice.group === group).map(option)}\n </div>\n ))}\n {props.multiple && (props.selectAllLabel || props.clearLabel) && (\n <div\n class=\"kui-select__actions\"\n role=\"group\"\n aria-label={label || ariaLabel}\n >\n {props.selectAllLabel && (\n <button\n class=\"kui-select__action\"\n type=\"button\"\n data-select-action=\"all\"\n >\n {props.selectAllLabel}\n </button>\n )}\n {props.clearLabel && (\n <button\n class=\"kui-select__action\"\n type=\"button\"\n data-select-action=\"clear\"\n >\n {props.clearLabel}\n </button>\n )}\n </div>\n )}\n </wa-select>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/shared/panels/panel-toolbar-group.ts","../src/components/actions/toolbar-control-group/toolbar-control-group.tsx"],"names":[],"mappings":";;;;AAIA,IAAM,uCAAuB,MAAA,CAAO,GAAA;AAAA,EAClC;AACF,CAAA;AAEO,SAAS,qBAAqB,KAAA,EAA2B;AAC9D,EAAA,MAAA,CAAO,eAAe,KAAA,EAAO,oBAAA,EAAsB,EAAE,KA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AAA;AAAA,wBACA,MAAA,EAAA,EAAK,KAAA,EAAM,wCAAA,EAAyC,IAAA,EAAK,UACvD,QAAA,EAAA,SAAA,EACH;AAAA,GAAA,EACF,CAAA,GAEA,aAAA;AAEJ","file":"chunk-GO2CZX4M.js","sourcesContent":["import { isSafeHtml, type SafeHtml } from 'kerfjs';\n\n// A render-time annotation, shared across separately bundled UI subpaths.\n// It never appears in the DOM or changes the group's visual treatment.\nconst RELOCATE_ON_COLLAPSE = Symbol.for(\n '@kerfjs/ui.ToolbarControlGroup.relocateOnCollapse',\n);\n\nexport function markRelocatableGroup(group: SafeHtml): SafeHtml {\n Object.defineProperty(group, RELOCATE_ON_COLLAPSE, { value: true });\n return group;\n}\n\nexport function isRelocatableGroup(value: unknown): value is SafeHtml {\n return (\n isSafeHtml(value) &&\n (value as SafeHtml & { [RELOCATE_ON_COLLAPSE]?: boolean })[\n RELOCATE_ON_COLLAPSE\n ] === true\n );\n}\n","import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { markRelocatableGroup } from '../../../shared/panels/panel-toolbar-group.js';\nimport { LoadingSpinner } from '../../feedback/loading-spinner/loading-spinner.js';\n\nexport type ToolbarControlGroupAppearance = 'contained' | 'borderless';\nexport type ToolbarControlGroupTone = 'default' | 'dark';\nexport type ToolbarControlGroupButtonAppearance = 'plain' | 'push';\nexport type ToolbarControlGroupShape = 'pill' | 'rounded';\nexport type ToolbarControlGroupSize = 'default' | 'compact';\nexport type ToolbarControlGroupDensity = 'comfortable' | 'tight';\nexport type ToolbarControlGroupContent =\n 'icon' | 'text' | 'mixed' | 'avatar' | 'search';\nexport type ToolbarControlGroupFocusRing = 'control' | 'outline' | 'halo';\nexport type ToolbarControlGroupSelectedChrome = 'raised' | 'filled' | 'outline';\nexport type ToolbarControlGroupSelectedTone = 'brand' | 'neutral' | 'pop';\nexport type ToolbarControlGroupOverflow = 'visible' | 'scroll' | 'wrap';\nexport type ToolbarControlGroupMenuInset = 'standard' | 'compact' | 'list-zero';\nexport type ToolbarControlGroupVisibility =\n | 'always'\n | 'compact-only'\n | 'hide-collapsed-tiny'\n | 'yield-to-expanded-sibling';\nexport type ToolbarControlGroupSizing = 'content' | 'grow' | 'fill';\nexport type ToolbarControlGroupPlacement = 'start' | 'end';\n\nexport interface ToolbarActionLinkProps {\n href: string;\n label: string;\n icon?: KerfUiContent;\n /** Optional machine-readable detail hidden visually but included in the default accessible name. */\n detail?: string;\n /** Override the accessible name when surrounding context is needed. */\n ariaLabel?: string;\n /** Open in a new tab with a safe rel and announce that behavior. */\n external?: boolean;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** A semantic anchor with ToolbarControlGroup-owned action geometry. */\nexport function ToolbarActionLink({\n href,\n label,\n icon,\n detail,\n ariaLabel,\n external = false,\n className = '',\n slot,\n}: ToolbarActionLinkProps) {\n const accessibleLabel =\n ariaLabel ??\n `${label}${detail ? `, ${detail}` : ''}${external ? ' (opens in new tab)' : ''}`;\n return (\n <a\n class={`kui-toolbar-action-link ${className}`.trim()}\n data-component=\"toolbar-action-link\"\n href={href}\n target={external ? '_blank' : undefined}\n rel={external ? 'noopener noreferrer' : undefined}\n aria-label={accessibleLabel}\n slot={slot}\n >\n {icon}\n <span>{label}</span>\n {detail ? <code aria-hidden=\"true\">{detail}</code> : null}\n </a>\n );\n}\n\nexport interface ToolbarControlGroupProps {\n children: KerfUiContent;\n label?: string;\n className?: string;\n expanded?: boolean;\n single?: boolean;\n appearance?: ToolbarControlGroupAppearance;\n tone?: ToolbarControlGroupTone;\n buttonAppearance?: ToolbarControlGroupButtonAppearance;\n /** Corner shape: fully round `pill` (default) or a softer `rounded` rectangle. */\n shape?: ToolbarControlGroupShape;\n size?: ToolbarControlGroupSize;\n density?: ToolbarControlGroupDensity;\n content?: ToolbarControlGroupContent;\n /** Whether controls paint focus individually or the group paints an outline/halo on focus-within. */\n focusRing?: ToolbarControlGroupFocusRing;\n selectedChrome?: ToolbarControlGroupSelectedChrome;\n selectedTone?: ToolbarControlGroupSelectedTone;\n /** Size a nested Web Awesome dropdown trigger as part of this group. */\n nestedDropdown?: boolean;\n /** Configure the nested dropdown menu inset without consumer ::part() CSS. */\n menuInset?: ToolbarControlGroupMenuInset;\n /** Keep an overlong row inside the available width by scrolling or wrapping. */\n overflow?: ToolbarControlGroupOverflow;\n /** Responsive visibility owned by the enclosing Toolbar container. */\n visibility?: ToolbarControlGroupVisibility;\n /** Intrinsic (default), grow from a basis, or occupy a full wrapping row. */\n sizing?: ToolbarControlGroupSizing;\n /** Place this group at the end of its flex row in a wrapping Toolbar zone. */\n placement?: ToolbarControlGroupPlacement;\n /** CSS length used as the minimum width and flex basis for `sizing=\"grow\"`; defaults to 19rem. */\n growBasis?: string;\n /** Move this group into the work-area toolbar when its panel collapses. */\n relocateOnCollapse?: boolean;\n /** Add contrast behind photo-backed avatar content. */\n scrim?: boolean;\n /** Block the group's controls and show a spinner without changing its dimensions. */\n busy?: boolean;\n /** Announced status while busy; defaults to “Working”. */\n busyLabel?: string;\n /**\n * Avatar image URL. A single-control group paints it on the group; a\n * multi-control group paints it only on the pressed selection highlight.\n */\n avatarImage?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport function ToolbarControlGroup({\n children,\n label,\n className = '',\n expanded = false,\n single = false,\n appearance = 'contained',\n tone = 'default',\n buttonAppearance = 'plain',\n shape = 'pill',\n size = 'default',\n density = 'comfortable',\n content = 'icon',\n focusRing = 'control',\n selectedChrome = 'raised',\n selectedTone = 'brand',\n nestedDropdown = false,\n menuInset = 'standard',\n overflow = 'visible',\n visibility = 'always',\n sizing = 'content',\n placement = 'start',\n growBasis,\n relocateOnCollapse = false,\n scrim = false,\n busy = false,\n busyLabel = 'Working',\n avatarImage,\n slot,\n}: ToolbarControlGroupProps) {\n const inlineStyles = [\n avatarImage\n ? `--kui-toolbar-avatar-image:url(${JSON.stringify(avatarImage)})`\n : '',\n growBasis ? `--kui-toolbar-group-grow-basis:${growBasis}` : '',\n ].filter(Boolean);\n const group = (\n <div\n class={`kui-toolbar-control-group ${className}`.trim()}\n data-component=\"toolbar-control-group\"\n role={label ? 'group' : undefined}\n aria-label={label}\n data-appearance={appearance}\n data-tone={tone}\n data-button-appearance={buttonAppearance}\n data-expanded={String(expanded)}\n data-single={String(single)}\n data-shape={shape}\n data-size={size}\n data-density={density}\n data-content={content}\n data-focus-ring={focusRing}\n data-selected-chrome={selectedChrome}\n data-selected-tone={selectedTone}\n data-nested-dropdown={String(nestedDropdown)}\n data-menu-inset={menuInset}\n data-overflow={overflow}\n data-visibility={visibility}\n data-sizing={sizing}\n data-placement={placement}\n data-scrim={String(scrim)}\n data-busy={String(busy)}\n aria-busy={busy ? 'true' : undefined}\n inert={busy}\n style={inlineStyles.length ? inlineStyles.join(';') : undefined}\n slot={slot}\n >\n {children}\n {busy ? (\n <span\n class=\"kui-toolbar-control-group__busy-spinner\"\n aria-hidden=\"true\"\n >\n <LoadingSpinner />\n </span>\n ) : null}\n </div>\n );\n const renderedGroup = relocateOnCollapse\n ? markRelocatableGroup(group)\n : group;\n return busy ? (\n <>\n {renderedGroup}\n <span class=\"kui-toolbar-control-group__busy-status\" role=\"status\">\n {busyLabel}\n </span>\n </>\n ) : (\n renderedGroup\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/forms/field-label/field-label.tsx","../src/components/typography/text/text.tsx"],"names":["jsx"],"mappings":";;;AAYO,SAAS,UAAA,CAAW;AAAA,EACzB,QAAA;AAAA,EACA,OAAO,UAAA,GAAa,EAAA;AAAA,EACpB,SAAA,GAAY,EAAA;AAAA,EACZ,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,MAAM,OAAA,GAAU,CAAC,uBAAA,EAAyB,UAAA,EAAY,SAAS,EAC5D,MAAA,CAAO,OAAO,CAAA,CACd,IAAA,CAAK,GAAG,CAAA;AACX,EAAA,uBACE,GAAA,CAAC,SAAK,GAAG,UAAA,EAAY,OAAO,OAAA,EAAS,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AAW,MAAA,GAAY,IAAA;AAAA,MAC3C,gBAAA,EAAgB,QAAA,KAAa,MAAA,GAAY,MAAA,GAAY,OAAO,QAAQ,CAAA;AAAA,MACpE,KAAA,EACE,KAAA,KAAU,MAAA,GACN,KAAA,GACA,GAAG,KAAA,KAAU,MAAA,IAAa,KAAA,KAAU,IAAA,GAAO,EAAA,GAAK,CAAA,EAAG,KAAK,CAAA,CAAA,CAAG,SAAS,KAAK,CAAA,CAAA;AAAA,MAG9E,QAAA,EAAA,QAAA,KAAa,MAAA,GACZ,QAAA,mBAEAA,GAAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAM,iBAAA;AAAA,UACN,KAAA,EAAO,yBAAyB,QAAQ,CAAA,CAAA;AAAA,UAEvC;AAAA;AAAA;AACH;AAAA,GAEJ;AAEJ","file":"chunk-ZVYA6TLR.js","sourcesContent":["import type { KerfBaseAttrs } from 'kerfjs/jsx-runtime';\n\nexport type FieldLabelProps = Omit<\n KerfBaseAttrs,\n 'children' | 'class' | 'className'\n> & {\n children: string;\n class?: string;\n className?: string;\n};\n\n/** Visible field heading for a read-only preview; use its id with aria-labelledby on the preview group. */\nexport function FieldLabel({\n children,\n class: classValue = '',\n className = '',\n ...attributes\n}: FieldLabelProps) {\n const classes = ['kui-text__field-label', classValue, className]\n .filter(Boolean)\n .join(' ');\n return (\n <div {...attributes} class={classes} data-component=\"field-label\">\n {children}\n </div>\n );\n}\n","import type { KerfBaseAttrs } from 'kerfjs/jsx-runtime';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport type { CssForegroundColor } from '../../../shared/styles/css-values.js';\n\nexport {\n FieldLabel,\n type FieldLabelProps,\n} from '../../forms/field-label/field-label.js';\n\nexport type TextVariant =\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';\nexport type TextTone = 'default' | 'quiet' | 'danger';\nexport type TextSize = 'compact' | 'default' | 'large' | 'xlarge';\nexport type TextFont = 'default' | 'monospace';\nexport type TextBorder = 'transparent' | 'none';\nexport type TextLineHeight = 'default' | 'tight';\nexport type TextWrap = 'normal' | 'anywhere' | 'nowrap' | 'truncate';\n\nexport type TextContent =\n KerfUiContent | string | number | readonly TextContent[];\n\ntype TextCommonProps = Omit<\n KerfBaseAttrs,\n 'children' | 'class' | 'className'\n> & {\n /** Native heading, paragraph, or inline span element to render. Defaults to `p`. */\n variant?: TextVariant;\n /** Semantic foreground treatment. Defaults to the inherited foreground. */\n tone?: TextTone;\n /** Foreground color; overrides tone when supplied, or inherits when omitted. */\n color?: CssForegroundColor;\n /** Text sizing independent of the native semantic element. */\n size?: TextSize;\n /** Font family independent of the native semantic element. */\n font?: TextFont;\n /** Transparent alignment border or no border when embedded in owner chrome. */\n border?: TextBorder;\n /** Remove the block variant's item padding and border in compact content. */\n flush?: boolean;\n /** Use compact leading for short dialog or metadata copy. */\n lineHeight?: TextLineHeight;\n children: TextContent;\n class?: string;\n className?: string;\n};\n\nexport type TextProps = TextCommonProps &\n (\n | {\n /** Wrap normally or break long unbroken strings. Defaults to normal. */\n wrap?: 'normal' | 'anywhere';\n /** Cap wrapped text to this positive number of lines. */\n maxLines?: number;\n }\n | {\n /** Keep one line, with or without an ellipsis. */\n wrap: 'nowrap' | 'truncate';\n maxLines?: never;\n }\n );\n\n/**\n * Semantic heading, paragraph, or inline text. Block variants use the standard\n * content-item padding; `span` adds no box geometry.\n * All ordinary native heading/paragraph attributes pass through to the element.\n */\nexport function Text({\n variant: Variant = 'p',\n tone = 'default',\n color,\n size = 'default',\n font = 'default',\n border = 'transparent',\n flush = false,\n lineHeight = 'default',\n wrap = 'normal',\n maxLines,\n children,\n class: classValue = '',\n className = '',\n style,\n ...attributes\n}: TextProps) {\n if (\n maxLines !== undefined &&\n (!Number.isSafeInteger(maxLines) ||\n maxLines < 1 ||\n wrap === 'nowrap' ||\n wrap === 'truncate')\n )\n throw new RangeError(\n 'Text maxLines requires a positive integer and wrapping',\n );\n const classes = ['kui-text', classValue, className].filter(Boolean).join(' ');\n return (\n <Variant\n {...attributes}\n class={classes}\n data-component=\"text\"\n data-tone={tone}\n data-size={size}\n data-font={font}\n data-border={border}\n data-flush={flush ? 'true' : undefined}\n data-line-height={lineHeight === 'tight' ? 'tight' : undefined}\n data-wrap={wrap === 'normal' ? undefined : wrap}\n data-max-lines={maxLines === undefined ? undefined : String(maxLines)}\n style={\n color === undefined\n ? style\n : `${style === undefined || style === null ? '' : `${style};`}color:${color}`\n }\n >\n {maxLines === undefined ? (\n children\n ) : (\n <span\n class=\"kui-text__clamp\"\n style={`--_kui-text-max-lines:${maxLines}`}\n >\n {children}\n </span>\n )}\n </Variant>\n );\n}\n"]}