@kerfjs/ui 5.0.0-beta.74 → 5.0.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-catalog.json +31 -5
- package/ai/component-composition.json +9 -3
- package/ai/components/list.md +3 -2
- package/ai/components/lucide-icon.md +9 -1
- package/ai/components/select.md +5 -4
- package/ai/public-api-signatures-v1.md +12 -3
- package/ai/skill.md +2 -0
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/app-tab.js +1 -1
- package/dist/catalog.js +8 -8
- package/dist/{chunk-W2AC6Q2A.js → chunk-4FEVHE7C.js} +2 -2
- package/dist/{chunk-W2AC6Q2A.js.map → chunk-4FEVHE7C.js.map} +1 -1
- package/dist/{chunk-2IGHGE3M.js → chunk-5TTZPGUY.js} +4 -4
- package/dist/{chunk-2IGHGE3M.js.map → chunk-5TTZPGUY.js.map} +1 -1
- package/dist/{chunk-RT5WKYX3.js → chunk-5UGLKFBF.js} +3 -3
- package/dist/{chunk-RT5WKYX3.js.map → chunk-5UGLKFBF.js.map} +1 -1
- package/dist/{chunk-KFJSNWO4.js → chunk-DA3HS64I.js} +3 -3
- package/dist/{chunk-KFJSNWO4.js.map → chunk-DA3HS64I.js.map} +1 -1
- package/dist/{chunk-WTSNV5RG.js → chunk-DUBUXJA3.js} +7 -3
- package/dist/chunk-DUBUXJA3.js.map +1 -0
- package/dist/{chunk-B2ZMR7NY.js → chunk-EHIMH4J7.js} +2 -2
- package/dist/{chunk-B2ZMR7NY.js.map → chunk-EHIMH4J7.js.map} +1 -1
- package/dist/{chunk-RVERAFFY.js → chunk-FKPKGP2H.js} +2 -2
- package/dist/{chunk-RVERAFFY.js.map → chunk-FKPKGP2H.js.map} +1 -1
- package/dist/{chunk-2RMDP7HQ.js → chunk-GRHJQWV2.js} +4 -4
- package/dist/{chunk-2RMDP7HQ.js.map → chunk-GRHJQWV2.js.map} +1 -1
- package/dist/{chunk-IJNYCPAU.js → chunk-HKVJ5MW3.js} +3 -3
- package/dist/{chunk-IJNYCPAU.js.map → chunk-HKVJ5MW3.js.map} +1 -1
- package/dist/{chunk-6LAQWWEX.js → chunk-HXTAPIHQ.js} +4 -4
- package/dist/{chunk-6LAQWWEX.js.map → chunk-HXTAPIHQ.js.map} +1 -1
- package/dist/{chunk-KZRR7NNV.js → chunk-JA4J7Y4C.js} +2 -2
- package/dist/{chunk-KZRR7NNV.js.map → chunk-JA4J7Y4C.js.map} +1 -1
- package/dist/{chunk-TT5ROTQK.js → chunk-JGIV6ZDA.js} +2 -2
- package/dist/{chunk-TT5ROTQK.js.map → chunk-JGIV6ZDA.js.map} +1 -1
- package/dist/{chunk-3DOHW3K4.js → chunk-LHSUPNSE.js} +2 -2
- package/dist/{chunk-3DOHW3K4.js.map → chunk-LHSUPNSE.js.map} +1 -1
- package/dist/{chunk-DB5ADJKF.js → chunk-NPNSKX3K.js} +2 -2
- package/dist/{chunk-DB5ADJKF.js.map → chunk-NPNSKX3K.js.map} +1 -1
- package/dist/{chunk-33EOFAUN.js → chunk-O5GM2JAM.js} +4 -4
- package/dist/{chunk-33EOFAUN.js.map → chunk-O5GM2JAM.js.map} +1 -1
- package/dist/{chunk-L67OYMGE.js → chunk-OYQIONQF.js} +4 -4
- package/dist/{chunk-L67OYMGE.js.map → chunk-OYQIONQF.js.map} +1 -1
- package/dist/{chunk-RU2EMR56.js → chunk-PL26TKNK.js} +4 -4
- package/dist/{chunk-RU2EMR56.js.map → chunk-PL26TKNK.js.map} +1 -1
- package/dist/{chunk-2G2ZJQYK.js → chunk-RFGW735Q.js} +8 -2
- package/dist/chunk-RFGW735Q.js.map +1 -0
- package/dist/{chunk-I6FTU27I.js → chunk-SVLDRGPJ.js} +2 -2
- package/dist/{chunk-I6FTU27I.js.map → chunk-SVLDRGPJ.js.map} +1 -1
- package/dist/{chunk-VZOFZPSO.js → chunk-SX7FJXPJ.js} +2 -2
- package/dist/{chunk-VZOFZPSO.js.map → chunk-SX7FJXPJ.js.map} +1 -1
- package/dist/{chunk-ZSJOLL3S.js → chunk-TCXDZNCX.js} +4 -4
- package/dist/{chunk-ZSJOLL3S.js.map → chunk-TCXDZNCX.js.map} +1 -1
- package/dist/{chunk-BGD7EHUE.js → chunk-TOICTHR2.js} +2 -2
- package/dist/{chunk-BGD7EHUE.js.map → chunk-TOICTHR2.js.map} +1 -1
- package/dist/{chunk-7KHKLG5C.js → chunk-V4GAQ74C.js} +3 -3
- package/dist/{chunk-7KHKLG5C.js.map → chunk-V4GAQ74C.js.map} +1 -1
- package/dist/{chunk-G4S2QU6V.js → chunk-VA5TN5PR.js} +2 -2
- package/dist/{chunk-G4S2QU6V.js.map → chunk-VA5TN5PR.js.map} +1 -1
- package/dist/collapsible-panel.js +3 -3
- package/dist/css-values.d.ts +6 -1
- package/dist/css-values.js +1 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/empty-state.js +1 -1
- package/dist/grid.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -21
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.js +1 -1
- package/dist/loading-spinner.d.ts +1 -0
- package/dist/loading-spinner.js +1 -1
- package/dist/lucide-icon.d.ts +4 -1
- package/dist/lucide-icon.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/row.js +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/spacer.js +1 -1
- package/dist/split-view.js +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/value-table.js +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.js +1 -1
- package/docs/component-selection.md +1 -1
- package/docs/type-contracts.md +17 -17
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/dist/chunk-2G2ZJQYK.js.map +0 -1
- package/dist/chunk-WTSNV5RG.js.map +0 -1
|
@@ -155,7 +155,8 @@
|
|
|
155
155
|
],
|
|
156
156
|
"appOwns": [
|
|
157
157
|
"icon choice",
|
|
158
|
-
"meaningful label"
|
|
158
|
+
"meaningful label",
|
|
159
|
+
"optional foreground color"
|
|
159
160
|
],
|
|
160
161
|
"variants": [
|
|
161
162
|
"decorative",
|
|
@@ -168,6 +169,11 @@
|
|
|
168
169
|
"title": "Solid selected glyph",
|
|
169
170
|
"description": "The solid appearance fills a compatible Lucide glyph with currentColor while retaining its stroke and accessible name policy.",
|
|
170
171
|
"code": "<LucideIcon icon={Star} name=\"star\" appearance=\"solid\" />"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"title": "Semantic icon color",
|
|
175
|
+
"description": "Set an icon foreground with a semantic color token; omit color to inherit from surrounding text. Use foregroundColor() for a custom CSS color or foregroundColorVar() for an app variable.",
|
|
176
|
+
"code": "<LucideIcon icon={Bell} name=\"alert\" color={uiColor('warning-on-quiet')} />"
|
|
171
177
|
}
|
|
172
178
|
],
|
|
173
179
|
"accessibility": [
|
|
@@ -2707,6 +2713,17 @@
|
|
|
2707
2713
|
"calc",
|
|
2708
2714
|
"flex"
|
|
2709
2715
|
],
|
|
2716
|
+
"publicExportImports": {
|
|
2717
|
+
"px": "@kerfjs/ui/css-values",
|
|
2718
|
+
"rem": "@kerfjs/ui/css-values",
|
|
2719
|
+
"em": "@kerfjs/ui/css-values",
|
|
2720
|
+
"pct": "@kerfjs/ui/css-values",
|
|
2721
|
+
"space": "@kerfjs/ui/css-values",
|
|
2722
|
+
"lengthVar": "@kerfjs/ui/css-values",
|
|
2723
|
+
"plus": "@kerfjs/ui/css-values",
|
|
2724
|
+
"calc": "@kerfjs/ui/css-values",
|
|
2725
|
+
"flex": "@kerfjs/ui/css-values"
|
|
2726
|
+
},
|
|
2710
2727
|
"cssValueProps": [
|
|
2711
2728
|
{
|
|
2712
2729
|
"path": "gap",
|
|
@@ -4171,15 +4188,23 @@
|
|
|
4171
4188
|
"Select",
|
|
4172
4189
|
"uiColor",
|
|
4173
4190
|
"colorVar",
|
|
4174
|
-
"foregroundColorVar"
|
|
4191
|
+
"foregroundColorVar",
|
|
4192
|
+
"foregroundColor"
|
|
4175
4193
|
],
|
|
4194
|
+
"publicExportImports": {
|
|
4195
|
+
"uiColor": "@kerfjs/ui/css-values",
|
|
4196
|
+
"colorVar": "@kerfjs/ui/css-values",
|
|
4197
|
+
"foregroundColorVar": "@kerfjs/ui/css-values",
|
|
4198
|
+
"foregroundColor": "@kerfjs/ui/css-values"
|
|
4199
|
+
},
|
|
4176
4200
|
"cssValueProps": [
|
|
4177
4201
|
{
|
|
4178
4202
|
"path": "choices[].color",
|
|
4179
4203
|
"grammar": "color",
|
|
4180
4204
|
"helpers": [
|
|
4181
4205
|
"uiColor",
|
|
4182
|
-
"foregroundColorVar"
|
|
4206
|
+
"foregroundColorVar",
|
|
4207
|
+
"foregroundColor"
|
|
4183
4208
|
],
|
|
4184
4209
|
"shorthands": [],
|
|
4185
4210
|
"canonicalShorthands": [],
|
|
@@ -4187,13 +4212,14 @@
|
|
|
4187
4212
|
"rawPolicy": "forbid",
|
|
4188
4213
|
"examples": [
|
|
4189
4214
|
"color: uiColor(\"success-on-quiet\")",
|
|
4190
|
-
"color: foregroundColorVar(\"--app-choice-color\")"
|
|
4215
|
+
"color: foregroundColorVar(\"--app-choice-color\")",
|
|
4216
|
+
"color: foregroundColor(\"rebeccapurple\")"
|
|
4191
4217
|
]
|
|
4192
4218
|
}
|
|
4193
4219
|
],
|
|
4194
4220
|
"useWhen": [
|
|
4195
4221
|
"Choose a controlled value from a moderate or long list, including grouped and icon-bearing choices.",
|
|
4196
|
-
"Color an optional choice icon with a CssForegroundColor: uiColor() with a foreground token such as success-on-quiet,
|
|
4222
|
+
"Color an optional choice icon with a CssForegroundColor: uiColor() with a foreground token such as success-on-quiet, foregroundColorVar() for an app-owned property, or foregroundColor() for a direct custom CSS color. Fill tokens such as success are backgrounds that leave the icon nearly invisible, so they, lengths, raw color strings, and unqualified colorVar() values are rejected."
|
|
4197
4223
|
],
|
|
4198
4224
|
"avoidWhen": [
|
|
4199
4225
|
"Do not use for commands or a small choice set that should stay visible."
|
|
@@ -126,7 +126,12 @@
|
|
|
126
126
|
"children": { "mode": "any", "concepts": [], "requiredConcepts": [] },
|
|
127
127
|
"state": [
|
|
128
128
|
{ "id": "icon choice", "owner": "application", "required": false },
|
|
129
|
-
{ "id": "meaningful label", "owner": "application", "required": false }
|
|
129
|
+
{ "id": "meaningful label", "owner": "application", "required": false },
|
|
130
|
+
{
|
|
131
|
+
"id": "optional foreground color",
|
|
132
|
+
"owner": "application",
|
|
133
|
+
"required": false
|
|
134
|
+
}
|
|
130
135
|
],
|
|
131
136
|
"wiring": {
|
|
132
137
|
"required": false,
|
|
@@ -3494,14 +3499,15 @@
|
|
|
3494
3499
|
{
|
|
3495
3500
|
"path": "choices[].color",
|
|
3496
3501
|
"grammar": "color",
|
|
3497
|
-
"helpers": ["uiColor", "foregroundColorVar"],
|
|
3502
|
+
"helpers": ["uiColor", "foregroundColorVar", "foregroundColor"],
|
|
3498
3503
|
"shorthands": [],
|
|
3499
3504
|
"canonicalShorthands": [],
|
|
3500
3505
|
"exceptionalShorthands": [],
|
|
3501
3506
|
"rawPolicy": "forbid",
|
|
3502
3507
|
"examples": [
|
|
3503
3508
|
"color: uiColor(\"success-on-quiet\")",
|
|
3504
|
-
"color: foregroundColorVar(\"--app-choice-color\")"
|
|
3509
|
+
"color: foregroundColorVar(\"--app-choice-color\")",
|
|
3510
|
+
"color: foregroundColor(\"rebeccapurple\")"
|
|
3505
3511
|
]
|
|
3506
3512
|
}
|
|
3507
3513
|
],
|
package/ai/components/list.md
CHANGED
|
@@ -26,14 +26,15 @@ Standardize vertical component layout, optional physical-side text/control inset
|
|
|
26
26
|
|
|
27
27
|
## Imports
|
|
28
28
|
|
|
29
|
-
- JavaScript: `@kerfjs/ui/list` — exports `List
|
|
29
|
+
- JavaScript: `@kerfjs/ui/list` — exports `List`.
|
|
30
|
+
- JavaScript: `@kerfjs/ui/css-values` — exports `px`, `rem`, `em`, `pct`, `space`, `lengthVar`, `plus`, `calc`, `flex`.
|
|
30
31
|
- CSS: the browser build of `@kerfjs/ui/list` pulls its CSS automatically; import `@kerfjs/ui/list.css` manually only without the `browser` export condition.
|
|
31
32
|
- Wiring: `wireScrollDividers` from `@kerfjs/ui/wire-scroll-dividers` (optional).
|
|
32
33
|
- Declared side effects: browser-condition-css.
|
|
33
34
|
|
|
34
35
|
## Props
|
|
35
36
|
|
|
36
|
-
Exact prop names and types: [`@kerfjs/ui/list`](../public-api-signatures-v1.md#kerfjsuilist), [`@kerfjs/ui/wire-scroll-dividers`](../public-api-signatures-v1.md#kerfjsuiwire-scroll-dividers) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
37
|
+
Exact prop names and types: [`@kerfjs/ui/list`](../public-api-signatures-v1.md#kerfjsuilist), [`@kerfjs/ui/css-values`](../public-api-signatures-v1.md#kerfjsuicss-values), [`@kerfjs/ui/wire-scroll-dividers`](../public-api-signatures-v1.md#kerfjsuiwire-scroll-dividers) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
37
38
|
|
|
38
39
|
**Variants (configure, do not restyle):**
|
|
39
40
|
|
|
@@ -43,7 +43,7 @@ Exact prop names and types: [`@kerfjs/ui/lucide-icon`](../public-api-signatures-
|
|
|
43
43
|
|
|
44
44
|
## State and wiring
|
|
45
45
|
|
|
46
|
-
**The app owns:** icon choice; meaningful label.
|
|
46
|
+
**The app owns:** icon choice; meaningful label; optional foreground color.
|
|
47
47
|
|
|
48
48
|
No wiring helper.
|
|
49
49
|
|
|
@@ -65,6 +65,14 @@ The solid appearance fills a compatible Lucide glyph with currentColor while ret
|
|
|
65
65
|
<LucideIcon icon={Star} name="star" appearance="solid" />
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
### Semantic icon color
|
|
69
|
+
|
|
70
|
+
Set an icon foreground with a semantic color token; omit color to inherit from surrounding text. Use foregroundColor() for a custom CSS color or foregroundColorVar() for an app variable.
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<LucideIcon icon={Bell} name="alert" color={uiColor('warning-on-quiet')} />
|
|
74
|
+
```
|
|
75
|
+
|
|
68
76
|
## Styling boundary
|
|
69
77
|
|
|
70
78
|
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
package/ai/components/select.md
CHANGED
|
@@ -11,7 +11,7 @@ Controlled Web Awesome select with typed single or multiple values, disabled cho
|
|
|
11
11
|
Choose one or more controlled values, keep unavailable choices visible, and optionally select all enabled choices or clear a multiple selection.
|
|
12
12
|
|
|
13
13
|
- Choose a controlled value from a moderate or long list, including grouped and icon-bearing choices.
|
|
14
|
-
- Color an optional choice icon with a CssForegroundColor: uiColor() with a foreground token such as success-on-quiet,
|
|
14
|
+
- Color an optional choice icon with a CssForegroundColor: uiColor() with a foreground token such as success-on-quiet, foregroundColorVar() for an app-owned property, or foregroundColor() for a direct custom CSS color. Fill tokens such as success are backgrounds that leave the icon nearly invisible, so they, lengths, raw color strings, and unqualified colorVar() values are rejected.
|
|
15
15
|
|
|
16
16
|
**Not when:**
|
|
17
17
|
|
|
@@ -25,14 +25,15 @@ Choose one or more controlled values, keep unavailable choices visible, and opti
|
|
|
25
25
|
|
|
26
26
|
## Imports
|
|
27
27
|
|
|
28
|
-
- JavaScript: `@kerfjs/ui/select` — exports `Select
|
|
28
|
+
- JavaScript: `@kerfjs/ui/select` — exports `Select`.
|
|
29
|
+
- JavaScript: `@kerfjs/ui/css-values` — exports `uiColor`, `colorVar`, `foregroundColorVar`, `foregroundColor`.
|
|
29
30
|
- CSS: the browser build of `@kerfjs/ui/select` pulls its CSS automatically; import `@kerfjs/ui/select.css` manually only without the `browser` export condition.
|
|
30
31
|
- Registration: import `@kerfjs/ui/select/register` once (a side effect).
|
|
31
32
|
- Declared side effects: custom-element-registration.
|
|
32
33
|
|
|
33
34
|
## Props
|
|
34
35
|
|
|
35
|
-
Exact prop names and types: [`@kerfjs/ui/select`](../public-api-signatures-v1.md#kerfjsuiselect) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
36
|
+
Exact prop names and types: [`@kerfjs/ui/select`](../public-api-signatures-v1.md#kerfjsuiselect), [`@kerfjs/ui/css-values`](../public-api-signatures-v1.md#kerfjsuicss-values) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
36
37
|
|
|
37
38
|
**Variants (configure, do not restyle):**
|
|
38
39
|
|
|
@@ -58,7 +59,7 @@ Exact prop names and types: [`@kerfjs/ui/select`](../public-api-signatures-v1.md
|
|
|
58
59
|
|
|
59
60
|
**CSS-value props** (typed builders from `@kerfjs/ui/css-values`; raw CSS strings are rejected):
|
|
60
61
|
|
|
61
|
-
- `choices[].color`: color grammar; raw values: forbid; helpers `uiColor`, `foregroundColorVar` — e.g. `color: uiColor("success-on-quiet")`
|
|
62
|
+
- `choices[].color`: color grammar; raw values: forbid; helpers `uiColor`, `foregroundColorVar`, `foregroundColor` — e.g. `color: uiColor("success-on-quiet")`
|
|
62
63
|
|
|
63
64
|
## Composition
|
|
64
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.75` and `kerfjs@5.0.0-beta.75`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
|
|
4
4
|
|
|
5
5
|
## `@kerfjs/ui/css-values`
|
|
6
6
|
|
|
@@ -110,8 +110,13 @@ declare function colorVar(name: `--${string}`, fallback?: CssColor): CssColor;
|
|
|
110
110
|
* accepts only {@link CssForegroundColor}, such as `SelectChoice.color`.
|
|
111
111
|
*/
|
|
112
112
|
declare function foregroundColorVar(name: `--${string}`, fallback?: CssForegroundColor): CssForegroundColor;
|
|
113
|
+
/**
|
|
114
|
+
* Use an application-chosen CSS color for foreground content. The browser
|
|
115
|
+
* resolves the color syntax; this checks only that it is one declaration value.
|
|
116
|
+
*/
|
|
117
|
+
declare function foregroundColor(value: string): CssForegroundColor;
|
|
113
118
|
|
|
114
|
-
export { type CssColor, type CssFlex, type CssFlexBasis, type CssFlexKeyword, type CssForegroundColor, type CssLength, type CssLengthExpression, type CssSize, type CssSizeKeyword, type CssValue, type UiColor, type UiColorName, type UiForegroundColorName, type UiSpaceName, calc, colorVar, em, flex, foregroundColorVar, lengthVar, pct, plus, px, rem, remify, space, uiColor };
|
|
119
|
+
export { type CssColor, type CssFlex, type CssFlexBasis, type CssFlexKeyword, type CssForegroundColor, type CssLength, type CssLengthExpression, type CssSize, type CssSizeKeyword, type CssValue, type UiColor, type UiColorName, type UiForegroundColorName, type UiSpaceName, calc, colorVar, em, flex, foregroundColor, foregroundColorVar, lengthVar, pct, plus, px, rem, remify, space, uiColor };
|
|
115
120
|
```
|
|
116
121
|
|
|
117
122
|
## `@kerfjs/ui/disclosure-arrow`
|
|
@@ -2871,6 +2876,7 @@ export { EmptyState, type EmptyStateProps };
|
|
|
2871
2876
|
import * as kerfjs from 'kerfjs';
|
|
2872
2877
|
import { LucideIconSize } from './lucide-icon.js';
|
|
2873
2878
|
import 'lucide';
|
|
2879
|
+
import './css-values.js';
|
|
2874
2880
|
|
|
2875
2881
|
type LoadingSpinnerSize = LucideIconSize;
|
|
2876
2882
|
interface LoadingSpinnerProps {
|
|
@@ -3262,6 +3268,7 @@ export { Chip, type ChipProps };
|
|
|
3262
3268
|
```ts
|
|
3263
3269
|
import * as kerfjs from 'kerfjs';
|
|
3264
3270
|
import { IconNode } from 'lucide';
|
|
3271
|
+
import { CssForegroundColor } from './css-values.js';
|
|
3265
3272
|
|
|
3266
3273
|
type LucideNode = IconNode;
|
|
3267
3274
|
type LucideIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | number;
|
|
@@ -3271,6 +3278,8 @@ interface LucideIconProps {
|
|
|
3271
3278
|
/** Outline by default; solid fills compatible glyphs with the current text color. */
|
|
3272
3279
|
appearance?: 'outline' | 'solid';
|
|
3273
3280
|
className?: string;
|
|
3281
|
+
/** Foreground color; omit to inherit the surrounding text color. */
|
|
3282
|
+
color?: CssForegroundColor;
|
|
3274
3283
|
label?: string;
|
|
3275
3284
|
/** Named icon scale or positive pixel size, converted to rem. Omit for 1em. */
|
|
3276
3285
|
size?: LucideIconSize;
|
|
@@ -3278,7 +3287,7 @@ interface LucideIconProps {
|
|
|
3278
3287
|
slot?: string;
|
|
3279
3288
|
}
|
|
3280
3289
|
/** Render a Lucide-compatible icon node without copying icon SVG strings. */
|
|
3281
|
-
declare function LucideIcon({ icon, name, appearance, className, label, size, slot, }: LucideIconProps): kerfjs.SafeHtml;
|
|
3290
|
+
declare function LucideIcon({ icon, name, appearance, className, color, label, size, slot, }: LucideIconProps): kerfjs.SafeHtml;
|
|
3282
3291
|
|
|
3283
3292
|
export { LucideIcon, type LucideIconProps, type LucideIconSize, type LucideNode };
|
|
3284
3293
|
```
|
package/ai/skill.md
CHANGED
|
@@ -309,6 +309,8 @@ For prominent content text, use `Text size="large"`; use `size="xlarge"` for dis
|
|
|
309
309
|
|
|
310
310
|
For removable tags use `Chip`, with `removeAction` for delegated handling and a specific `removeLabel` for the native button. `itemId` identifies the tag; the app owns removal. `size="compact"` and `disabled` replace app styling of raw `wa-tag` internals. Use `Badge` for non-interactive metadata.
|
|
311
311
|
|
|
312
|
+
For an icon with a specific meaning, set `LucideIcon.color` using `uiColor('warning-on-quiet')` or another foreground token. Use `foregroundColorVar('--app-icon-color')` for an app-owned property or `foregroundColor('#8b5cf6')` for a direct custom CSS color. Omit the prop to inherit text color. Outline stroke and solid fill both follow the chosen color; size, appearance, label, and slot remain separate props. Avoid pale fill tokens as foregrounds.
|
|
313
|
+
|
|
312
314
|
For `Select`, mark an unavailable choice with `disabled` and optionally `disabledReason`. In a multiple Select, `selectAllLabel` and `clearLabel` opt in to localized footer actions that select enabled choices or clear the selection through normal input/change events; the app still owns the controlled `value`.
|
|
313
315
|
|
|
314
316
|
For nested action menus, use `PopupMenuItem.submenu` with item, heading, and divider entries; headings and dividers do not enter keyboard navigation. Items support `checked`, `icon`, `details`, `disabledReason`, and `tone`. The app owns choice state. For a right-click menu, use `PopupMenu` with `context: true` and call `openPopupMenuAt` from the app's `contextmenu` handler; the package positions and opens the menu. Call `closePopupMenu` for programmatic dismissal.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Web Awesome JSX signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from the emitted `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from the emitted `@kerfjs/ui@5.0.0-beta.75` declaration boundary. Import `@kerfjs/ui/webawesome` for type effects when authoring direct `wa-*` JSX. The module emits no runtime behavior and does not register custom elements.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { KerfCustomElement } from 'kerfjs/jsx-runtime';
|
package/dist/app-tab.js
CHANGED
package/dist/catalog.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Workbench } from './chunk-
|
|
1
|
+
import { Workbench } from './chunk-O5GM2JAM.js';
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
import { PopupMenu } from './chunk-4NG4Y2Q6.js';
|
|
5
5
|
|
|
6
|
-
import { Row } from './chunk-
|
|
7
|
-
import { ListHeader } from './chunk-
|
|
6
|
+
import { Row } from './chunk-SX7FJXPJ.js';
|
|
7
|
+
import { ListHeader } from './chunk-PL26TKNK.js';
|
|
8
8
|
import { Text } from './chunk-YDGNU2OD.js';
|
|
9
9
|
import { ListInsetText } from './chunk-DG6G5EPF.js';
|
|
10
|
-
import { ListItem } from './chunk-
|
|
11
|
-
import { ToolbarText } from './chunk-
|
|
10
|
+
import { ListItem } from './chunk-HXTAPIHQ.js';
|
|
11
|
+
import { ToolbarText } from './chunk-HKVJ5MW3.js';
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -16,11 +16,11 @@ import { ToolbarText } from './chunk-IJNYCPAU.js';
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
import { List } from './chunk-
|
|
19
|
+
import { List } from './chunk-4FEVHE7C.js';
|
|
20
20
|
|
|
21
|
-
import { ToolbarControlGroup, ToolbarActionLink } from './chunk-
|
|
21
|
+
import { ToolbarControlGroup, ToolbarActionLink } from './chunk-TOICTHR2.js';
|
|
22
22
|
import { Toolbar } from './chunk-RGS4WX2M.js';
|
|
23
|
-
import { LucideIcon } from './chunk-
|
|
23
|
+
import { LucideIcon } from './chunk-DUBUXJA3.js';
|
|
24
24
|
|
|
25
25
|
import { filterDataAttributes } from './chunk-SRSJO5QE.js';
|
|
26
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { verticalAlignment, horizontalAlignment } from './chunk-AYUHMAI6.js';
|
|
2
2
|
import { filterDataAttributes } from './chunk-SRSJO5QE.js';
|
|
3
|
-
import { space } from './chunk-
|
|
3
|
+
import { space } from './chunk-RFGW735Q.js';
|
|
4
4
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var listProtectedAttributes = /* @__PURE__ */ new Set([
|
|
@@ -80,4 +80,4 @@ function List({
|
|
|
80
80
|
|
|
81
81
|
export { List };
|
|
82
82
|
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-4FEVHE7C.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/list.tsx"],"names":[],"mappings":";;;;;AAiBA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,iBAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAAC,CAAA;AAgBD,IAAM,UAAA,GAAqC;AAAA,EACzC,MAAA;AAAA,EACA,KA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,IAAA;AAAA,MACE,GAAG,kBAAA;AAAA,MACJ,KAAA,EAAO,CAAA,SAAA,EAAY,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACpC,gBAAA,EAAe,MAAA;AAAA,MACf,IAAA,EAAM,aAAA,KAAkB,UAAA,GAAa,MAAA,GAAS,MAAA;AAAA,MAC9C,YAAA,EAAY,aAAA,KAAkB,UAAA,GAAa,SAAA,GAAY,MAAA;AAAA,MACvD,sBAAA,EAAsB,aAAA,KAAkB,UAAA,GAAa,MAAA,GAAS,MAAA;AAAA,MAC9D,UAAA,EAAU,MAAA,CAAO,OAAA,CAAQ,GAAG,CAAC,CAAA;AAAA,MAC7B,WAAA,EAAW,MAAA,CAAO,OAAA,CAAQ,IAAI,CAAC,CAAA;AAAA,MAC/B,WAAA,EAAW,OAAO,MAAA,GAAS,MAAA;AAAA,MAC3B,cAAA,EAAc,oBAAoB,MAAM,CAAA;AAAA,MACxC,cAAA,EAAc,kBAAkB,MAAM,CAAA;AAAA,MACtC,iBAAA,EAAiB,OAAO,UAAU,CAAA;AAAA,MAClC,iBAAe,YAAA,IAAgB,MAAA;AAAA,MAC/B,oBAAkB,UAAA,IAAc,MAAA;AAAA,MAChC,uBAAqB,aAAA,IAAiB,MAAA;AAAA,MACtC,OAAO,KAAA,IAAS,MAAA;AAAA,MAChB,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"chunk-4FEVHE7C.js","sourcesContent":["import {\n type CssFlex,\n type CssFlexKeyword,\n type CssLength,\n space,\n type UiSpaceName,\n} from './css-values.js';\nimport { filterDataAttributes } from './extension-attributes.js';\nimport {\n type HorizontalAlignment,\n horizontalAlignment,\n type ListVerticalAlignment,\n verticalAlignment,\n} from './flex-alignment.js';\nimport type { KerfUiContent } from './semantic-content.js';\nimport type { Sides } from './sides.js';\n\nconst listProtectedAttributes = new Set([\n 'data-component',\n 'data-gap',\n 'data-flex',\n 'data-fill',\n 'data-h-align',\n 'data-v-align',\n 'data-scrollable',\n 'data-text-insets',\n 'data-control-insets',\n]);\n\ntype ListRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-gap'?: never;\n 'data-flex'?: never;\n 'data-fill'?: never;\n 'data-h-align'?: never;\n 'data-v-align'?: never;\n 'data-scrollable'?: never;\n 'data-text-insets'?: never;\n 'data-control-insets'?: never;\n }\n>;\n\nconst spaceNames: readonly UiSpaceName[] = [\n 'none',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n];\n\nexport interface ListProps {\n children?: KerfUiContent;\n /** Make this list a labeled multi-select grid for `ContentItem selectionMode=\"multiple\"` rows. */\n selectionMode?: 'multiple';\n /** Accessible name for the multi-select grid. */\n ariaLabel?: string;\n /** Use the standard item gap, a named UI spacing token, or a typed CSS length. Defaults to no gap. */\n gap?: boolean | UiSpaceName | CssLength;\n /** Allow this list to grow/shrink, use a keyword, or supply a typed CSS flex shorthand. */\n flex?: boolean | CssFlexKeyword | CssFlex;\n /**\n * Fill the height of a parent with a definite height, such as an app root or\n * a fixed-height frame, when this list is that parent's layout root. Inside a\n * flex layout use `flex` instead. Defaults to false.\n */\n fill?: boolean;\n /** Horizontal alignment. Defaults to full to preserve stretch-aligned list children. */\n hAlign?: HorizontalAlignment;\n /** Vertical distribution. Defaults to top. */\n vAlign?: ListVerticalAlignment;\n /** Own vertical scrolling and overscroll containment. */\n scrollable?: boolean;\n /** Physical divider edges in canonical top/right/bottom/left order. */\n dividerSides?: Sides;\n /** Physical sides that receive the standard 17px text inset. */\n textInsets?: Sides;\n /** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */\n controlInsets?: Sides;\n className?: string;\n /** Safe `data-*` metadata; List-owned structural attributes remain protected. */\n rootAttributes?: ListRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A list's configuration, apart from its content and styling hooks: the props a\n * composite that renders a `List` for the app (the Workbench's `mainHeader` /\n * `mainFooter` chrome) forwards, so the app configures that list instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type ListConfig = Pick<\n ListProps,\n 'gap' | 'hAlign' | 'vAlign' | 'dividerSides' | 'textInsets' | 'controlInsets'\n>;\n\n/** A stretch-aligned vertical stack with optional gap, flex, fill, scroll, and dividers. */\nexport function List({\n children,\n selectionMode,\n ariaLabel,\n gap = false,\n flex = false,\n fill = false,\n hAlign = 'full',\n vAlign = 'top',\n scrollable = false,\n dividerSides = '',\n textInsets = '',\n controlInsets = '',\n className = '',\n rootAttributes = {},\n slot,\n}: ListProps) {\n if (selectionMode === 'multiple' && !ariaLabel) {\n throw new Error('Multi-select List requires an ariaLabel');\n }\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n listProtectedAttributes,\n );\n const gapValue =\n gap === true\n ? 'var(--kui-list-gap)'\n : spaceNames.includes(gap as UiSpaceName)\n ? space(gap as UiSpaceName)\n : gap || undefined;\n const flexValue = flex === true ? '1 1 auto' : flex || undefined;\n const style = [\n gapValue ? `--_kui-list-gap:${gapValue}` : '',\n flexValue ? `--_kui-list-flex:${flexValue}` : '',\n ]\n .filter(Boolean)\n .join(';');\n\n return (\n <div\n {...safeRootAttributes}\n class={`kui-list ${className}`.trim()}\n data-component=\"list\"\n role={selectionMode === 'multiple' ? 'grid' : undefined}\n aria-label={selectionMode === 'multiple' ? ariaLabel : undefined}\n aria-multiselectable={selectionMode === 'multiple' ? 'true' : undefined}\n data-gap={String(Boolean(gap))}\n data-flex={String(Boolean(flex))}\n data-fill={fill ? 'true' : undefined}\n data-h-align={horizontalAlignment(hAlign)}\n data-v-align={verticalAlignment(vAlign)}\n data-scrollable={String(scrollable)}\n divider-sides={dividerSides || undefined}\n data-text-insets={textInsets || undefined}\n data-control-insets={controlInsets || undefined}\n style={style || undefined}\n slot={slot}\n >\n {children}\n </div>\n );\n}\n\nexport type {\n CssFlex,\n CssFlexKeyword,\n CssLength,\n UiSpaceName,\n} from './css-values.js';\nexport type {\n HorizontalAlignment,\n ListVerticalAlignment,\n VerticalAlignment,\n} from './flex-alignment.js';\nexport type { Sides } from './sides.js';\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-JGIV6ZDA.js';
|
|
2
2
|
import { Badge } from './chunk-ALGYHYXP.js';
|
|
3
|
-
import { LucideIcon } from './chunk-
|
|
4
|
-
import { em } from './chunk-
|
|
3
|
+
import { LucideIcon } from './chunk-DUBUXJA3.js';
|
|
4
|
+
import { em } from './chunk-RFGW735Q.js';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'kerfjs/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
function SelectChevron() {
|
|
@@ -219,4 +219,4 @@ function Select(props) {
|
|
|
219
219
|
|
|
220
220
|
export { Select };
|
|
221
221
|
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
222
|
+
//# sourceMappingURL=chunk-5TTZPGUY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/select.tsx"],"names":[],"mappings":";;;;;;AA0IA,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,IAAA,GAAO,SAAA;AAAA,IAC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,kBACL,oBAAA,EAAmB,OAAA;AAAA,kBAElB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA;AACT;AAAA;AAAA;AAEJ;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-2IGHGE3M.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { Badge } from './badge.js';\nimport { type CssForegroundColor, em } from './css-values.js';\nimport { LucideIcon, type LucideNode } from './lucide-icon.js';\nimport type { KerfUiContent } from './semantic-content.js';\nimport { Skeleton } from './skeleton.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=\"brand\" 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
|
+
{"version":3,"sources":["../src/select.tsx"],"names":[],"mappings":";;;;;;AA0IA,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,SAA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AA,EAAK,QAAA;AAAA,kBACL,oBAAA,EAAmB,KAAA;AAAA,kBAElB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA,eACT;AAAA,cAED,MAAM,UAAA,oBACL,GAAA;AAAA,gBAAC,QAAA;AAAA,gBAAA;AAAA,kBACC,KAAA,EAAM,oBAAA;AAAA,kBACN,IAAA,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-5TTZPGUY.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { Badge } from './badge.js';\nimport { type CssForegroundColor, em } from './css-values.js';\nimport { LucideIcon, type LucideNode } from './lucide-icon.js';\nimport type { KerfUiContent } from './semantic-content.js';\nimport { Skeleton } from './skeleton.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=\"brand\" 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,6 +1,6 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-JGIV6ZDA.js';
|
|
2
2
|
import { Badge } from './chunk-ALGYHYXP.js';
|
|
3
|
-
import { em } from './chunk-
|
|
3
|
+
import { em } from './chunk-RFGW735Q.js';
|
|
4
4
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
function StateBanner({
|
|
@@ -46,4 +46,4 @@ function StateBanner({
|
|
|
46
46
|
|
|
47
47
|
export { StateBanner };
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-5UGLKFBF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state-banner.tsx"],"names":[],"mappings":";;;;;AAiCO,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA,GAAO,MAAA;AAAA,EACP,OAAA,GAAU,QAAA;AAAA,EACV,UAAA,GAAa,QAAA;AAAA,EACb,eAAA,GAAkB,UAAA;AAAA,EAClB,SAAA,GAAY,EAAA;AAAA,EACZ,WAAA,GAAc,KAAA;AAAA,EACd;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,SAAA,GAAY,IAAA,KAAS,MAAA,GAAS,OAAA,GAAU,IAAA;AAC9C,EAAA,uBACE,IAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC5C,gBAAA,EAAe,cAAA;AAAA,MACf,WAAA,EAAW,IAAA;AAAA,MACX,kBAAA,EAAkB,UAAA;AAAA,MAClB,uBAAA,EAAuB,eAAA;AAAA,MACvB,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,MACzC,IAAA,EAAM,OAAA;AAAA,MACN,WAAA,EAAW,OAAA,KAAY,OAAA,GAAU,WAAA,GAAc,QAAA;AAAA,MAC/C,WAAA,EAAW,cAAc,MAAA,GAAS,M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,CAAA,EAAG,IAAK,KAAA,EACjD,CAAA;AAAA,UAED,0BACC,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,0BAAA,EACV,8BAAC,MAAA,EAAA,EAAM,QAAA,EAAA,WAAA,mBAAc,GAAA,CAAC,QAAA,EAAA,EAAS,OAAO,EAAA,CAAG,EAAE,CAAA,EAAG,CAAA,GAAK,QAAO,CAAA,EAC5D;AAAA,SAAA,EAEJ,CAAA;AAAA,QACC,MAAA,oBAAU,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,4BAA4B,QAAA,EAAA,MAAA,EAAO;AAAA;AAAA;AAAA,GAC3D;AAEJ","file":"chunk-5UGLKFBF.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { Badge } from './badge.js';\nimport { em } from './css-values.js';\nimport type { KerfUiContent } from './semantic-content.js';\nimport { Skeleton } from './skeleton.js';\n\nexport type StateBannerTone =\n 'neutral' | 'info' | 'pop' | 'success' | 'warning' | 'danger';\nexport type StateBannerUrgency = 'status' | 'alert';\nexport type StateBannerCopyLayout = 'inline' | 'stacked';\nexport type StateBannerActionPlacement = 'trailing' | 'below';\n\nexport interface StateBannerProps {\n title: string;\n detail?: string;\n /** Optional compact status or count shown beside the title. */\n badge?: string;\n icon?: SafeHtml;\n action?: KerfUiContent;\n tone?: StateBannerTone;\n urgency?: StateBannerUrgency;\n /** Keep the detail beside the title, or give it its own line. */\n copyLayout?: StateBannerCopyLayout;\n /** Place the action beside the copy or on a separate trailing row. */\n actionPlacement?: StateBannerActionPlacement;\n className?: string;\n /** 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. */\n placeholder?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport function StateBanner({\n title,\n detail,\n badge,\n icon,\n action,\n tone = 'info',\n urgency = 'status',\n copyLayout = 'inline',\n actionPlacement = 'trailing',\n className = '',\n placeholder = false,\n slot,\n}: StateBannerProps) {\n const badgeTone = tone === 'info' ? 'brand' : tone;\n return (\n <section\n class={`kui-state-banner ${className}`.trim()}\n data-component=\"state-banner\"\n data-tone={tone}\n data-copy-layout={copyLayout}\n data-action-placement={actionPlacement}\n data-placeholder={placeholder ? 'true' : undefined}\n role={urgency}\n aria-live={urgency === 'alert' ? 'assertive' : 'polite'}\n aria-busy={placeholder ? 'true' : undefined}\n slot={slot}\n >\n {icon && <span class=\"kui-state-banner__icon\">{icon}</span>}\n <div class=\"kui-state-banner__copy\">\n <strong>{placeholder ? <Skeleton width={em(10)} /> : title}</strong>\n {badge && (\n <Badge appearance=\"solid\" size=\"compact\" tone={badgeTone}>\n {placeholder ? <Skeleton width={em(1.75)} /> : badge}\n </Badge>\n )}\n {detail && (\n <span class=\"kui-state-banner__detail\">\n <span>{placeholder ? <Skeleton width={em(16)} /> : detail}</span>\n </span>\n )}\n </div>\n {action && <div class=\"kui-state-banner__action\">{action}</div>}\n </section>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
2
|
-
import { em } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-JGIV6ZDA.js';
|
|
2
|
+
import { em } from './chunk-RFGW735Q.js';
|
|
3
3
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
function ValueTableRow({
|
|
@@ -49,4 +49,4 @@ function ValueTable({
|
|
|
49
49
|
|
|
50
50
|
export { ValueTable, ValueTableRow };
|
|
51
51
|
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-DA3HS64I.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/value-table-row.tsx","../src/value-table.tsx"],"names":["jsx"],"mappings":";;;;AAgBO,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,SAAA,GAAY,EAAA;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IAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,gBAAA,EAAmB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC3C,gBAAA,EAAe,aAAA;AAAA,MACf,cAAA,EAAc,OAAA;AAAA,MACd,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"chunk-DA3HS64I.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { em } from './css-values.js';\nimport { Skeleton } from './skeleton.js';\n\nexport interface ValueTableRowProps {\n label: string | SafeHtml;\n value: string | SafeHtml;\n icon?: SafeHtml;\n className?: string;\n /** Render the value as an unanimated loading skeleton, keeping the field label. */\n placeholder?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport function ValueTableRow({\n label,\n value,\n icon,\n className = '',\n placeholder = false,\n slot,\n}: ValueTableRowProps) {\n return (\n <div\n class={`kui-value-table__row ${className}`.trim()}\n data-has-icon={String(Boolean(icon))}\n data-placeholder={placeholder ? 'true' : undefined}\n slot={slot}\n >\n <dt>\n {icon && <span class=\"kui-value-table__icon\">{icon}</span>}\n <span class=\"kui-value-table__label\">{label}</span>\n </dt>\n <dd>{placeholder ? <Skeleton width={em(10)} /> : value}</dd>\n </div>\n );\n}\n","import type { KerfUiContent } from './semantic-content.js';\n\nexport { ValueTableRow, type ValueTableRowProps } from './value-table-row.js';\n\nexport interface ValueTableProps {\n label: string;\n /** Compact row spacing for metadata-dense surfaces. */\n density?: 'default' | 'compact';\n className?: string;\n children: KerfUiContent;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport function ValueTable({\n label,\n density = 'default',\n className = '',\n children,\n slot,\n}: ValueTableProps) {\n return (\n <dl\n class={`kui-value-table ${className}`.trim()}\n data-component=\"value-table\"\n data-density={density}\n aria-label={label}\n slot={slot}\n >\n {children}\n </dl>\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { remify } from './chunk-
|
|
1
|
+
import { remify } from './chunk-RFGW735Q.js';
|
|
2
2
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
var lucideIconSizePixels = {
|
|
@@ -13,6 +13,7 @@ function LucideIcon({
|
|
|
13
13
|
name,
|
|
14
14
|
appearance = "outline",
|
|
15
15
|
className,
|
|
16
|
+
color,
|
|
16
17
|
label,
|
|
17
18
|
size,
|
|
18
19
|
slot
|
|
@@ -41,7 +42,10 @@ function LucideIcon({
|
|
|
41
42
|
"stroke-width": "2",
|
|
42
43
|
"stroke-linecap": "round",
|
|
43
44
|
"stroke-linejoin": "round",
|
|
44
|
-
style:
|
|
45
|
+
style: [
|
|
46
|
+
pixels === void 0 ? void 0 : `--_kui-lucide-size:${remify(pixels)}`,
|
|
47
|
+
color === void 0 ? void 0 : `color:${color}`
|
|
48
|
+
].filter(Boolean).join(";") || void 0,
|
|
45
49
|
children: icon.map(([tag, attrs]) => jsx(tag, attrs))
|
|
46
50
|
}
|
|
47
51
|
);
|
|
@@ -49,4 +53,4 @@ function LucideIcon({
|
|
|
49
53
|
|
|
50
54
|
export { LucideIcon };
|
|
51
55
|
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-DUBUXJA3.js.map
|