@kerfjs/ui 5.0.0-beta.35 → 5.0.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/ai/component-catalog-v2.json +90 -4
- package/ai/component-catalog.json +123 -17
- package/ai/public-api-signatures-v1.md +52 -13
- package/ai/skill.md +3 -3
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/spacer.js +3 -0
- package/dist/catalog.js +2 -2
- package/dist/{chunk-MFR2IIFG.js → chunk-2TYUFZUC.js} +3 -1
- package/dist/chunk-2TYUFZUC.js.map +1 -0
- package/dist/{chunk-OC275HHS.js → chunk-5FJ53EOF.js} +5 -1
- package/dist/chunk-5FJ53EOF.js.map +1 -0
- package/dist/{chunk-7JQAQWVC.js → chunk-C34NZOLJ.js} +5 -1
- package/dist/chunk-C34NZOLJ.js.map +1 -0
- package/dist/{chunk-KFUUFNTS.js → chunk-EYALJQQD.js} +12 -2
- package/dist/chunk-EYALJQQD.js.map +1 -0
- package/dist/chunk-OGTJNHRG.js +42 -0
- package/dist/chunk-OGTJNHRG.js.map +1 -0
- package/dist/{chunk-QHCBZTDK.js → chunk-X5GRDQ7V.js} +5 -1
- package/dist/chunk-X5GRDQ7V.js.map +1 -0
- package/dist/divider-sides-BzB6rphT.d.ts +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -5
- package/dist/list-header.d.ts +4 -1
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +5 -2
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +6 -3
- package/dist/list-inset-text.js +1 -1
- package/dist/list.d.ts +7 -3
- package/dist/list.js +1 -1
- package/dist/row.d.ts +7 -2
- package/dist/row.js +1 -1
- package/dist/spacer.d.ts +16 -0
- package/dist/spacer.js +4 -0
- package/dist/spacer.js.map +1 -0
- package/dist/styles/list-header.css +27 -0
- package/dist/styles/list-inset-control.css +17 -1
- package/dist/styles/list-inset-text.css +27 -11
- package/dist/styles/list.css +46 -0
- package/dist/styles/row.css +46 -0
- package/dist/styles/spacer.css +11 -0
- package/dist/styles/styles.css +1 -0
- package/dist/toolbar.d.ts +1 -1
- package/docs/component-contract.md +6 -3
- package/docs/component-selection.md +6 -3
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -0
- package/docs/design/templates/list-header/inline-action.svg +1 -0
- package/docs/design/templates/list-header-dark.svg +1 -1
- package/docs/design/templates/list-header.svg +1 -1
- package/docs/layout.md +38 -0
- package/llms.txt +6 -1
- package/package.json +7 -1
- package/dist/chunk-7JQAQWVC.js.map +0 -1
- package/dist/chunk-KFUUFNTS.js.map +0 -1
- package/dist/chunk-MFR2IIFG.js.map +0 -1
- package/dist/chunk-OC275HHS.js.map +0 -1
- package/dist/chunk-QHCBZTDK.js.map +0 -1
- package/dist/divider-sides-267FA7sY.d.ts +0 -4
|
@@ -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.37` 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/catalog.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ToolbarControlGroup } from './chunk-B6JYRX3P.js';
|
|
2
2
|
import { Toolbar } from './chunk-VXFGMDA7.js';
|
|
3
3
|
import { Pane } from './chunk-I4V3UDSA.js';
|
|
4
|
-
import { ListHeader } from './chunk-
|
|
4
|
+
import { ListHeader } from './chunk-5FJ53EOF.js';
|
|
5
5
|
import { ListItem } from './chunk-I45QO2IZ.js';
|
|
6
|
-
import { List } from './chunk-
|
|
6
|
+
import { List } from './chunk-C34NZOLJ.js';
|
|
7
7
|
|
|
8
8
|
import { filterDataAttributes } from './chunk-SRSJO5QE.js';
|
|
9
9
|
|
|
@@ -3,6 +3,7 @@ import { jsx } from 'kerfjs/jsx-runtime';
|
|
|
3
3
|
// src/list-inset-control.tsx
|
|
4
4
|
function ListInsetControl({
|
|
5
5
|
children,
|
|
6
|
+
sides = "trbl",
|
|
6
7
|
className = ""
|
|
7
8
|
}) {
|
|
8
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -10,6 +11,7 @@ function ListInsetControl({
|
|
|
10
11
|
{
|
|
11
12
|
class: `kui-list-inset-control ${className}`.trim(),
|
|
12
13
|
"data-component": "list-inset-control",
|
|
14
|
+
"data-sides": sides,
|
|
13
15
|
children
|
|
14
16
|
}
|
|
15
17
|
);
|
|
@@ -17,4 +19,4 @@ function ListInsetControl({
|
|
|
17
19
|
|
|
18
20
|
export { ListInsetControl };
|
|
19
21
|
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-2TYUFZUC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/list-inset-control.tsx"],"names":[],"mappings":";;;AAiBO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,QAAA;AAAA,EACA,KAAA,GAAQ,MAAA;AAAA,EACR,SAAA,GAAY;AACd,CAAA,EAA0B;AACxB,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,uBAAA,EAA0B,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAClD,gBAAA,EAAe,oBAAA;AAAA,MACf,YAAA,EAAY,KAAA;AAAA,MAEX;AAAA;AAAA,GACH;AAEJ","file":"chunk-2TYUFZUC.js","sourcesContent":["import type { Sides } from './divider-sides.js';\nimport type { KerfUiContent } from './semantic-content.js';\n\nexport interface ListInsetControlProps {\n /** Control(s) that own their own border and padding (e.g. an input, a `wa-*`). */\n children: KerfUiContent;\n /** Physical inset sides in canonical top/right/bottom/left order. Defaults to all sides. */\n sides?: Sides;\n className?: string;\n}\n\n/**\n * Insets a control into a pane/list content region: an 8px inline margin (so its\n * edges line up with `.kui-content` items) and a stretch flex row with an 8px gap.\n * Use it for controls that carry their own border and padding but no outer margin\n * — the wrapper adds only the alignment margin and layout, not a second inset.\n */\nexport function ListInsetControl({\n children,\n sides = 'trbl',\n className = '',\n}: ListInsetControlProps) {\n return (\n <div\n class={`kui-list-inset-control ${className}`.trim()}\n data-component=\"list-inset-control\"\n data-sides={sides}\n >\n {children}\n </div>\n );\n}\n\nexport type { Sides } from './divider-sides.js';\n"]}
|
|
@@ -11,6 +11,7 @@ var PROTECTED_ROOT_DATA_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
|
11
11
|
"data-has-count",
|
|
12
12
|
"data-density",
|
|
13
13
|
"data-divider",
|
|
14
|
+
"data-inline",
|
|
14
15
|
"data-indicator-tone",
|
|
15
16
|
"data-toggle"
|
|
16
17
|
]);
|
|
@@ -23,6 +24,7 @@ function ListHeader({
|
|
|
23
24
|
status,
|
|
24
25
|
density = "standard",
|
|
25
26
|
divider = "none",
|
|
27
|
+
inline = false,
|
|
26
28
|
indicatorTone = "neutral",
|
|
27
29
|
action,
|
|
28
30
|
actionLabel,
|
|
@@ -61,6 +63,7 @@ function ListHeader({
|
|
|
61
63
|
"data-has-count": String(normalizedCount !== void 0),
|
|
62
64
|
"data-density": density,
|
|
63
65
|
"data-divider": divider,
|
|
66
|
+
"data-inline": String(inline),
|
|
64
67
|
"data-indicator-tone": indicatorTone,
|
|
65
68
|
"data-toggle": "true",
|
|
66
69
|
"data-placeholder": placeholder ? "true" : void 0,
|
|
@@ -96,6 +99,7 @@ function ListHeader({
|
|
|
96
99
|
"data-has-count": String(normalizedCount !== void 0),
|
|
97
100
|
"data-density": density,
|
|
98
101
|
"data-divider": divider,
|
|
102
|
+
"data-inline": String(inline),
|
|
99
103
|
"data-indicator-tone": indicatorTone,
|
|
100
104
|
"data-toggle": "false",
|
|
101
105
|
"data-placeholder": placeholder ? "true" : void 0,
|
|
@@ -125,4 +129,4 @@ function ListHeader({
|
|
|
125
129
|
|
|
126
130
|
export { ListHeader };
|
|
127
131
|
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-5FJ53EOF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/list-header.tsx"],"names":[],"mappings":";;;;;;AAUA,IAAM,8BAAA,uBAAqC,GAAA,CAAI;AAAA,EAC7C,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF,CAAC,CAAA;AACD,IAAM,iCAAA,mBAAoC,IAAI,GAAA,CAAI,CAAC,aAAa,CAAC,CAAA;AAgF1D,SAAS,UAAA,CAAW;AAAA,EACzB,KAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,GAAU,UAAA;AAAA,EACV,OAAA,GAAU,MAAA;AAAA,EACV,MAAA,GAAS,KAAA;AAAA,EACT,aAAA,GAAgB,SAAA;AAAA,EAChB,MAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,cAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA,GAAS,KAAA;AAAA,EACT,WAAA,GAAc,KAAA;AAAA,EACd,iBAAiB,EAAC;AAAA,EAClB,oBAAoB;AACtB,CAAA,EAAoB;AAClB,EAAA,MAAM,uBAAA,GAA0B,oBAAA;AAAA,IAC9B,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,0BAAA,GAA6B,uBAAA;AAAA,IACjC,iBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,eAAA,GACJ,OAAO,KAAA,KAAU,QAAA,IAAY,MAAA,CAAO,cAAc,KAAK,CAAA,IAAK,KAAA,IAAS,CAAA,GACjE,KAAA,GACA,MAAA;AACN,EAAA,MAAM,oBAAA,GACJ,eAAA,KAAoB,MAAA,GAChB,MAAA,GACA,OAAO,UAAA,KAAe,QAAA,IAAY,UAAA,CAAW,IAAA,EAAK,GAChD,UAAA,GACA,MAAA,CAAO,eAAe,CAAA;AAC9B,EAAA,MAAM,aAAA,GACJ,eAAA,KAAoB,MAAA,GAAa,MAAA,IAAU,KAAA,GAAS,MAAA;AACtD,EAAA,MAAM,kBAAA,GACJ,eACC,MAAA,mBAAS,GAAA,CAAC,mBAAgB,IAAA,EAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG,CAAA,GAAK,MAAA,CAAA;AAC3D,EAAA,MAAM,kBACJ,eAAA,KAAoB,MAAA,GAChB,SACA,CAAA,EAAG,KAAK,KAAK,oBAAoB,CAAA,CAAA;AACvC,EAAA,MAAM,SAAA,GAAY,WAAA,GAAA,CACf,eAAA,KAAoB,MAAA,IAAa,kCAChC,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,wBAAA,EACV,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAO,EAAA,CAAG,IAAI,CAAA,EAAG,CAAA,EAC7B,CAAA,GAEA,eAAA,KAAoB,MAAA,GACtB,aAAA,oBAAiB,GAAA,CAAC,MAAA,EAAA,EAAK,OAAM,wBAAA,EAA0B,QAAA,EAAA,aAAA,EAAc,CAAA,mBAErE,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,wBAAA,EAAyB,aAAA,EAAY,QAC9C,QAAA,EAAA,eAAA,EACH,CAAA;AAEF,EAAA,MAAM,IAAA,GAAO,cAAe,MAAA,GAAmB,MAAA;AAC/C,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,uBACE,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACE,GAAG,uBAAA;AAAA,QACJ,KAAA,EAAM,iBAAA;AAAA,QACN,gBAAA,EAAe,aAAA;AAAA,QACf,gBAAA,EAAgB,MAAA,CAAO,OAAA,CAAQ,aAAa,CAAC,CAAA;AAAA,QAC7C,gBAAA,EAAgB,MAAA,CAAO,eAAA,KAAoB,MAAS,CAAA;AAAA,QACpD,cAAA,EAAc,OAAA;AAAA,QACd,cAAA,EAAc,OAAA;AAAA,QACd,aAAA,EAAa,OAAO,MAAM,CAAA;AAAA,QAC1B,qBAAA,EAAqB,aAAA;AAAA,QACrB,aAAA,EAAY,MAAA;AAAA,QACZ,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,QACzC,WAAA,EAAW,IAAA;AAAA,QAEX,QAAA,kBAAA,IAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACE,GAAG,0BAAA;AAAA,YACJ,IAAA,EAAK,QAAA;AAAA,YACL,KAAA,EAAM,gDAAA;AAAA,YACN,aAAA,EAAa,cAAc,MAAA,GAAY,MAAA;AAAA,YACvC,KAAA,EAAO,iBAAiB,cAAA,GAAiB,MAAA;AAAA,YACzC,QAAA,EAAU,kBAAkB,WAAA,IAAe,MAAA;AAAA,YAC3C,YAAA,EAAY,eAAA;AAAA,YACZ,eAAA,EAAe,MAAA,CAAO,OAAA,CAAQ,QAAQ,CAAC,CAAA;AAAA,YAEvC,QAAA,EAAA;AAAA,8BAAA,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,wBAAA,EAA0B,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,cAC3C,SAAA;AAAA,cACA,kBAAA,oBACC,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,iCACT,QAAA,EAAA,kBAAA,EACH;AAAA;AAAA;AAAA;AAEJ;AAAA,KACF;AAAA,EAEJ;AACA,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,uBAAA;AAAA,MACJ,KAAA,EAAM,iBAAA;AAAA,MACN,gBAAA,EAAe,aAAA;AAAA,MACf,gBAAA,EAAgB,MAAA,CAAO,OAAA,CAAQ,aAAa,CAAC,CAAA;AAAA,MAC7C,gBAAA,EAAgB,MAAA,CAAO,eAAA,KAAoB,MAAS,CAAA;AAAA,MACpD,cAAA,EAAc,OAAA;AAAA,MACd,cAAA,EAAc,OAAA;AAAA,MACd,aAAA,EAAa,OAAO,MAAM,CAAA;AAAA,MAC1B,qBAAA,EAAqB,aAAA;AAAA,MACrB,aAAA,EAAY,OAAA;AAAA,MACZ,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,MACzC,WAAA,EAAW,IAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,OAAM,wBAAA,EACT,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,IAAA,EAAA,EAAG,KAAA,EAAM,wBAAA,EAAyB,YAAA,EAAY,iBAC5C,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,UACC;AAAA,SAAA,EACH,CAAA;AAAA,QACC,MAAA,oBACC,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACE,GAAG,0BAAA;AAAA,YACJ,IAAA,EAAK,QAAA;AAAA,YACL,KAAA,EAAM,yBAAA;AAAA,YACN,aAAA,EAAa,cAAc,MAAA,GAAY,MAAA;AAAA,YACvC,YAAA,EAAY,WAAA;AAAA,YACZ,KAAA,EAAO,iBAAiB,cAAA,GAAiB,WAAA;AAAA,YACzC,QAAA,EAAU,kBAAkB,WAAA,IAAe,MAAA;AAAA,YAE1C,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-5FJ53EOF.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { em } from './css-values.js';\nimport { DisclosureArrow } from './disclosure-arrow.js';\nimport {\n filterControlAttributes,\n filterDataAttributes,\n} from './extension-attributes.js';\nimport { Skeleton } from './skeleton.js';\n\nconst PROTECTED_ROOT_DATA_ATTRIBUTES = new Set([\n 'data-component',\n 'data-action',\n 'data-has-badge',\n 'data-has-count',\n 'data-density',\n 'data-divider',\n 'data-inline',\n 'data-indicator-tone',\n 'data-toggle',\n]);\nconst PROTECTED_TRIGGER_DATA_ATTRIBUTES = new Set(['data-action']);\n\ntype ListHeaderRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-action'?: never;\n 'data-has-badge'?: never;\n 'data-has-count'?: never;\n 'data-density'?: never;\n 'data-divider'?: never;\n 'data-inline'?: never;\n 'data-indicator-tone'?: never;\n 'data-toggle'?: never;\n }\n>;\n\ntype ListHeaderTriggerAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-action'?: never;\n popoverTarget?: string;\n popoverTargetAction?: 'toggle' | 'show' | 'hide';\n 'aria-controls'?: string;\n 'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';\n }\n>;\n\ninterface ListHeaderBaseProps {\n label: string;\n density?: 'standard' | 'compact';\n divider?: 'none' | 'before' | 'after' | 'both';\n /** Shrink-wrap the header without its default outer margin, border, or padding. */\n inline?: boolean;\n indicatorTone?: 'neutral' | 'accent' | 'pop' | 'danger';\n /** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */\n placeholder?: boolean;\n rootAttributes?: ListHeaderRootAttributes;\n triggerAttributes?: ListHeaderTriggerAttributes;\n}\n\ntype ListHeaderModeProps =\n | {\n /** Render the title as a controlled disclosure trigger. */\n toggle: true;\n action: string;\n expanded: boolean;\n actionIcon?: SafeHtml;\n actionLabel?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n }\n | {\n /** Render a separately named trailing action. */\n toggle?: false;\n action: string;\n actionLabel: string;\n actionIcon: SafeHtml;\n expanded?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n }\n | {\n /** Render a passive section heading. */\n toggle?: false;\n action?: never;\n actionLabel?: never;\n actionIcon?: never;\n expanded?: never;\n actionDisabled?: never;\n disabledReason?: never;\n };\n\ntype ListHeaderIndicatorProps =\n | { count: number; countLabel: string; badge?: never; status?: never }\n | { count?: never; countLabel?: never; badge: SafeHtml; status?: never }\n | { count?: never; countLabel?: never; badge?: never; status?: SafeHtml };\n\nexport type ListHeaderProps = ListHeaderBaseProps &\n ListHeaderIndicatorProps &\n ListHeaderModeProps;\n\nexport function ListHeader({\n label,\n count,\n countLabel,\n badge,\n status,\n density = 'standard',\n divider = 'none',\n inline = false,\n indicatorTone = 'neutral',\n action,\n actionLabel,\n actionIcon,\n actionDisabled = false,\n disabledReason,\n expanded,\n toggle = false,\n placeholder = false,\n rootAttributes = {},\n triggerAttributes = {},\n}: ListHeaderProps) {\n const extensionRootAttributes = filterDataAttributes(\n rootAttributes,\n PROTECTED_ROOT_DATA_ATTRIBUTES,\n );\n const extensionTriggerAttributes = filterControlAttributes(\n triggerAttributes,\n PROTECTED_TRIGGER_DATA_ATTRIBUTES,\n );\n const normalizedCount =\n typeof count === 'number' && Number.isSafeInteger(count) && count >= 0\n ? count\n : undefined;\n const normalizedCountLabel =\n normalizedCount === undefined\n ? undefined\n : typeof countLabel === 'string' && countLabel.trim()\n ? countLabel\n : String(normalizedCount);\n const renderedBadge =\n normalizedCount === undefined ? (status ?? badge) : undefined;\n const renderedActionIcon =\n actionIcon ??\n (toggle ? <DisclosureArrow open={Boolean(expanded)} /> : undefined);\n const accessibleLabel =\n normalizedCount === undefined\n ? undefined\n : `${label}, ${normalizedCountLabel}`;\n const indicator = placeholder ? (\n (normalizedCount !== undefined || renderedBadge) && (\n <span class=\"kui-list-header__badge\">\n <Skeleton width={em(1.75)} />\n </span>\n )\n ) : normalizedCount === undefined ? (\n renderedBadge && <span class=\"kui-list-header__badge\">{renderedBadge}</span>\n ) : (\n <span class=\"kui-list-header__count\" aria-hidden=\"true\">\n {normalizedCount}\n </span>\n );\n const busy = placeholder ? ('true' as const) : undefined;\n if (toggle) {\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(Boolean(renderedBadge))}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density}\n data-divider={divider}\n data-inline={String(inline)}\n data-indicator-tone={indicatorTone}\n data-toggle=\"true\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n >\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__title kui-list-header__toggle\"\n data-action={placeholder ? undefined : action}\n title={actionDisabled ? disabledReason : undefined}\n disabled={actionDisabled || placeholder || undefined}\n aria-label={accessibleLabel}\n aria-expanded={String(Boolean(expanded))}\n >\n <span class=\"kui-list-header__label\">{label}</span>\n {indicator}\n {renderedActionIcon && (\n <span class=\"kui-list-header__action-layer\">\n {renderedActionIcon}\n </span>\n )}\n </button>\n </header>\n );\n }\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(Boolean(renderedBadge))}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density}\n data-divider={divider}\n data-inline={String(inline)}\n data-indicator-tone={indicatorTone}\n data-toggle=\"false\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n >\n <div class=\"kui-list-header__title\">\n <h2 class=\"kui-list-header__label\" aria-label={accessibleLabel}>\n {label}\n </h2>\n {indicator}\n </div>\n {action && (\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__action\"\n data-action={placeholder ? undefined : action}\n aria-label={actionLabel}\n title={actionDisabled ? disabledReason : actionLabel}\n disabled={actionDisabled || placeholder || undefined}\n >\n {renderedActionIcon}\n </button>\n )}\n </header>\n );\n}\n"]}
|
|
@@ -19,6 +19,8 @@ function List({
|
|
|
19
19
|
vAlign = "top",
|
|
20
20
|
scrollable = false,
|
|
21
21
|
dividerSides = "",
|
|
22
|
+
textInsets = "",
|
|
23
|
+
controlInsets = "",
|
|
22
24
|
className = ""
|
|
23
25
|
}) {
|
|
24
26
|
const gapValue = gap === true ? "var(--kui-list-gap)" : spaceNames.includes(gap) ? space(gap) : gap || void 0;
|
|
@@ -38,6 +40,8 @@ function List({
|
|
|
38
40
|
"data-v-align": verticalAlignment(vAlign),
|
|
39
41
|
"data-scrollable": String(scrollable),
|
|
40
42
|
"divider-sides": dividerSides || void 0,
|
|
43
|
+
"data-text-insets": textInsets || void 0,
|
|
44
|
+
"data-control-insets": controlInsets || void 0,
|
|
41
45
|
style: style || void 0,
|
|
42
46
|
children
|
|
43
47
|
}
|
|
@@ -46,4 +50,4 @@ function List({
|
|
|
46
50
|
|
|
47
51
|
export { List };
|
|
48
52
|
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-C34NZOLJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/list.tsx"],"names":[],"mappings":";;;;AAgBA,IAAM,UAAA,GAAqC;AAAA,EACzC,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA;AAwBO,SAAS,IAAA,CAAK;AAAA,EACnB,QAAA;AAAA,EACA,GAAA,GAAM,KAAA;AAAA,EACN,IAAA,GAAO,KAAA;AAAA,EACP,MAAA,GAAS,MAAA;AAAA,EACT,MAAA,GAAS,KAAA;AAAA,EACT,UAAA,GAAa,KAAA;AAAA,EACb,YAAA,GAAe,EAAA;AAAA,EACf,UAAA,GAAa,EAAA;AAAA,EACb,aAAA,GAAgB,EAAA;AAAA,EAChB,SAAA,GAAY;AACd,CAAA,EAAc;AACZ,EAAA,MAAM,QAAA,GACJ,GAAA,KAAQ,IAAA,GACJ,qBAAA,GACA,UAAA,CAAW,QAAA,CAAS,GAAkB,CAAA,GACpC,KAAA,CAAM,GAAkB,CAAA,GACxB,GAAA,IAAO,MAAA;AACf,EAAA,MAAM,SAAA,GAAY,IAAA,KAAS,IAAA,GAAO,UAAA,GAAa,IAAA,IAAQ,MAAA;AACvD,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,QAAA,GAAW,CAAA,gBAAA,EAAmB,QAAQ,CAAA,CAAA,GAAK,EAAA;AAAA,IAC3C,SAAA,GAAY,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAA,GAAK;AAAA,GAChD,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AAEX,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,SAAA,EAAY,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACpC,gBAAA,EAAe,MAAA;AAAA,MACf,UAAA,EAAU,MAAA,CAAO,OAAA,CAAQ,GAAG,CAAC,CAAA;AAAA,MAC7B,WAAA,EAAW,MAAA,CAAO,OAAA,CAAQ,IAAI,CAAC,CAAA;AAAA,MAC/B,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,MAEf;AAAA;AAAA,GACH;AAEJ","file":"chunk-C34NZOLJ.js","sourcesContent":["import {\n type CssFlex,\n type CssFlexKeyword,\n type CssLength,\n space,\n type UiSpaceName,\n} from './css-values.js';\nimport type { DividerSides, Sides } from './divider-sides.js';\nimport {\n type HorizontalAlignment,\n horizontalAlignment,\n type VerticalAlignment,\n verticalAlignment,\n} from './flex-alignment.js';\nimport type { KerfUiContent } from './semantic-content.js';\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 /** 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 /** Horizontal alignment. Defaults to full to preserve stretch-aligned list children. */\n hAlign?: HorizontalAlignment;\n /** Vertical distribution. Defaults to top. */\n vAlign?: VerticalAlignment;\n /** Own vertical scrolling and overscroll containment. */\n scrollable?: boolean;\n /** Physical divider edges in canonical top/right/bottom/left order. */\n dividerSides?: DividerSides;\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}\n\n/** A stretch-aligned vertical stack with optional gap, flex, scroll, and dividers. */\nexport function List({\n children,\n gap = false,\n flex = false,\n hAlign = 'full',\n vAlign = 'top',\n scrollable = false,\n dividerSides = '',\n textInsets = '',\n controlInsets = '',\n className = '',\n}: ListProps) {\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 class={`kui-list ${className}`.trim()}\n data-component=\"list\"\n data-gap={String(Boolean(gap))}\n data-flex={String(Boolean(flex))}\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 >\n {children}\n </div>\n );\n}\n\nexport type {\n CssFlex,\n CssFlexKeyword,\n CssLength,\n UiSpaceName,\n} from './css-values.js';\nexport type { DividerSides, Sides } from './divider-sides.js';\nexport type {\n HorizontalAlignment,\n VerticalAlignment,\n} from './flex-alignment.js';\n"]}
|
|
@@ -3,13 +3,23 @@ import { jsx } from 'kerfjs/jsx-runtime';
|
|
|
3
3
|
// src/list-inset-text.tsx
|
|
4
4
|
function ListInsetText({
|
|
5
5
|
children,
|
|
6
|
+
sides,
|
|
6
7
|
horizontalOnly = false,
|
|
7
8
|
className = ""
|
|
8
9
|
}) {
|
|
10
|
+
const resolvedSides = sides ?? (horizontalOnly ? "rl" : "trbl");
|
|
9
11
|
const cls = `kui-list-inset-text${horizontalOnly ? " kui-list-inset-text--horizontal" : ""} ${className}`.trim();
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
class: cls,
|
|
16
|
+
"data-component": "list-inset-text",
|
|
17
|
+
"data-sides": resolvedSides,
|
|
18
|
+
children
|
|
19
|
+
}
|
|
20
|
+
);
|
|
11
21
|
}
|
|
12
22
|
|
|
13
23
|
export { ListInsetText };
|
|
14
24
|
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-EYALJQQD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/list-inset-text.tsx"],"names":[],"mappings":";;;AA0BO,SAAS,aAAA,CAAc;AAAA,EAC5B,QAAA;AAAA,EACA,KAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,SAAA,GAAY;AACd,CAAA,EAAuB;AACrB,EAAA,MAAM,aAAA,GAAgB,KAAA,KAAU,cAAA,GAAiB,IAAA,GAAO,MAAA,CAAA;AACxD,EAAA,MAAM,GAAA,GACJ,sBAAsB,cAAA,GAAiB,kCAAA,GAAqC,EAAE,CAAA,CAAA,EAAI,SAAS,GAAG,IAAA,EAAK;AACrG,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,GAAA;AAAA,MACP,gBAAA,EAAe,iBAAA;AAAA,MACf,YAAA,EAAY,aAAA;AAAA,MAEX;AAAA;AAAA,GACH;AAEJ","file":"chunk-EYALJQQD.js","sourcesContent":["import type { Sides } from './divider-sides.js';\nimport type { KerfUiContent } from './semantic-content.js';\n\nexport interface ListInsetTextProps {\n /** Text (or inline content) that carries no margin, border, or padding of its own. */\n children: KerfUiContent | string;\n /** Physical inset sides in canonical top/right/bottom/left order. Defaults to all sides. */\n sides?: Sides;\n /**\n * @deprecated Pass `sides=\"rl\"` instead. Keep only the horizontal geometry (inline margin, left/right border, and\n * left/right padding) and drop the vertical margin, border, and padding. Use it\n * when the text edge must still align with bordered items but the line should not\n * add its own vertical box space — tight text layout inside a content region.\n */\n horizontalOnly?: boolean;\n className?: string;\n}\n\n/**\n * Gives bare text the content-item geometry — an 8px inline margin, a 1px\n * transparent border, and 8px padding — so a plain string lines up with\n * bordered `.kui-content` items (its text edge lands at the same 17px inset).\n * Use it for text elements that have no margin, border, or padding of their own.\n * Pass `horizontalOnly` to keep the horizontal inset but drop the vertical box\n * space for tight text layout.\n */\nexport function ListInsetText({\n children,\n sides,\n horizontalOnly = false,\n className = '',\n}: ListInsetTextProps) {\n const resolvedSides = sides ?? (horizontalOnly ? 'rl' : 'trbl');\n const cls =\n `kui-list-inset-text${horizontalOnly ? ' kui-list-inset-text--horizontal' : ''} ${className}`.trim();\n return (\n <div\n class={cls}\n data-component=\"list-inset-text\"\n data-sides={resolvedSides}\n >\n {children}\n </div>\n );\n}\n\nexport type { Sides } from './divider-sides.js';\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { space } from './chunk-OL4TC3U2.js';
|
|
2
|
+
import { jsx } from 'kerfjs/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var spaceNames = [
|
|
5
|
+
"none",
|
|
6
|
+
"2xs",
|
|
7
|
+
"xs",
|
|
8
|
+
"s",
|
|
9
|
+
"m",
|
|
10
|
+
"l",
|
|
11
|
+
"xl"
|
|
12
|
+
];
|
|
13
|
+
function dimension(value) {
|
|
14
|
+
return spaceNames.includes(value) ? space(value) : value;
|
|
15
|
+
}
|
|
16
|
+
function Spacer({
|
|
17
|
+
flex = false,
|
|
18
|
+
width,
|
|
19
|
+
height,
|
|
20
|
+
className = ""
|
|
21
|
+
}) {
|
|
22
|
+
const widthValue = dimension(width);
|
|
23
|
+
const heightValue = dimension(height);
|
|
24
|
+
const style = [
|
|
25
|
+
widthValue ? `width:${widthValue}` : "",
|
|
26
|
+
heightValue ? `height:${heightValue}` : ""
|
|
27
|
+
].filter(Boolean).join(";");
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
class: `kui-spacer ${className}`.trim(),
|
|
32
|
+
"data-component": "spacer",
|
|
33
|
+
"data-flex": String(flex),
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
style: style || void 0
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { Spacer };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=chunk-OGTJNHRG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/spacer.tsx"],"names":[],"mappings":";;;AAEA,IAAM,UAAA,GAAqC;AAAA,EACzC,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA;AAYA,SAAS,UAAU,KAAA,EAAwD;AACzE,EAAA,OAAO,WAAW,QAAA,CAAS,KAAoB,CAAA,GAC3C,KAAA,CAAM,KAAoB,CAAA,GACzB,KAAA;AACP;AAGO,SAAS,MAAA,CAAO;AAAA,EACrB,IAAA,GAAO,KAAA;AAAA,EACP,KAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA,GAAY;AACd,CAAA,EAAgB;AACd,EAAA,MAAM,UAAA,GAAa,UAAU,KAAK,CAAA;AAClC,EAAA,MAAM,WAAA,GAAc,UAAU,MAAM,CAAA;AACpC,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,UAAA,GAAa,CAAA,MAAA,EAAS,UAAU,CAAA,CAAA,GAAK,EAAA;AAAA,IACrC,WAAA,GAAc,CAAA,OAAA,EAAU,WAAW,CAAA,CAAA,GAAK;AAAA,GAC1C,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AAEX,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,WAAA,EAAc,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACtC,gBAAA,EAAe,QAAA;AAAA,MACf,WAAA,EAAW,OAAO,IAAI,CAAA;AAAA,MACtB,aAAA,EAAY,MAAA;AAAA,MACZ,OAAO,KAAA,IAAS;AAAA;AAAA,GACjB;AAEL","file":"chunk-OGTJNHRG.js","sourcesContent":["import { type CssLength, space, type UiSpaceName } from './css-values.js';\n\nconst spaceNames: readonly UiSpaceName[] = [\n 'none',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n];\n\nexport interface SpacerProps {\n /** Grow and shrink to fill the available space along a parent's flex axis. */\n flex?: boolean;\n /** A named UI spacing token or typed physical width. */\n width?: UiSpaceName | CssLength;\n /** A named UI spacing token or typed physical height. */\n height?: UiSpaceName | CssLength;\n className?: string;\n}\n\nfunction dimension(value?: UiSpaceName | CssLength): CssLength | undefined {\n return spaceNames.includes(value as UiSpaceName)\n ? space(value as UiSpaceName)\n : (value as CssLength | undefined);\n}\n\n/** A decorative fixed-size or flexible gap for Row, List, and other flex layouts. */\nexport function Spacer({\n flex = false,\n width,\n height,\n className = '',\n}: SpacerProps) {\n const widthValue = dimension(width);\n const heightValue = dimension(height);\n const style = [\n widthValue ? `width:${widthValue}` : '',\n heightValue ? `height:${heightValue}` : '',\n ]\n .filter(Boolean)\n .join(';');\n\n return (\n <div\n class={`kui-spacer ${className}`.trim()}\n data-component=\"spacer\"\n data-flex={String(flex)}\n aria-hidden=\"true\"\n style={style || undefined}\n ></div>\n );\n}\n\nexport type { CssLength, UiSpaceName } from './css-values.js';\n"]}
|
|
@@ -18,6 +18,8 @@ function Row({
|
|
|
18
18
|
gap = "xs",
|
|
19
19
|
flex = false,
|
|
20
20
|
wrap = false,
|
|
21
|
+
textInsets = "",
|
|
22
|
+
controlInsets = "",
|
|
21
23
|
className = ""
|
|
22
24
|
}) {
|
|
23
25
|
const gapValue = spaceNames.includes(gap) ? space(gap) : gap;
|
|
@@ -35,6 +37,8 @@ function Row({
|
|
|
35
37
|
"data-v-align": verticalAlignment(vAlign),
|
|
36
38
|
"data-flex": String(Boolean(flex)),
|
|
37
39
|
"data-wrap": String(wrap),
|
|
40
|
+
"data-text-insets": textInsets || void 0,
|
|
41
|
+
"data-control-insets": controlInsets || void 0,
|
|
38
42
|
style,
|
|
39
43
|
children
|
|
40
44
|
}
|
|
@@ -43,4 +47,4 @@ function Row({
|
|
|
43
47
|
|
|
44
48
|
export { Row };
|
|
45
49
|
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-X5GRDQ7V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/row.tsx"],"names":[],"mappings":";;;;AAgBA,IAAM,UAAA,GAAqC;AAAA,EACzC,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA;AAsBO,SAAS,GAAA,CAAI;AAAA,EAClB,QAAA;AAAA,EACA,MAAA,GAAS,MAAA;AAAA,EACT,MAAA,GAAS,MAAA;AAAA,EACT,GAAA,GAAM,IAAA;AAAA,EACN,IAAA,GAAO,KAAA;AAAA,EACP,IAAA,GAAO,KAAA;AAAA,EACP,UAAA,GAAa,EAAA;AAAA,EACb,aAAA,GAAgB,EAAA;AAAA,EAChB,SAAA,GAAY;AACd,CAAA,EAAa;AACX,EAAA,MAAM,WAAW,UAAA,CAAW,QAAA,CAAS,GAAkB,CAAA,GACnD,KAAA,CAAM,GAAkB,CAAA,GACxB,GAAA;AACJ,EAAA,MAAM,SAAA,GAAY,IAAA,KAAS,IAAA,GAAO,UAAA,GAAa,IAAA,IAAQ,MAAA;AACvD,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,kBAAkB,QAAQ,CAAA,CAAA;AAAA,IAC1B,SAAA,GAAY,CAAA,gBAAA,EAAmB,SAAS,CAAA,CAAA,GAAK;AAAA,GAC/C,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AAEX,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,QAAA,EAAW,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACnC,gBAAA,EAAe,KAAA;AAAA,MACf,cAAA,EAAc,oBAAoB,MAAM,CAAA;AAAA,MACxC,cAAA,EAAc,kBAAkB,MAAM,CAAA;AAAA,MACtC,WAAA,EAAW,MAAA,CAAO,OAAA,CAAQ,IAAI,CAAC,CAAA;AAAA,MAC/B,WAAA,EAAW,OAAO,IAAI,CAAA;AAAA,MACtB,oBAAkB,UAAA,IAAc,MAAA;AAAA,MAChC,uBAAqB,aAAA,IAAiB,MAAA;AAAA,MACtC,KAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"chunk-X5GRDQ7V.js","sourcesContent":["import {\n type CssFlex,\n type CssFlexKeyword,\n type CssLength,\n space,\n type UiSpaceName,\n} from './css-values.js';\nimport type { Sides } from './divider-sides.js';\nimport {\n type HorizontalAlignment,\n horizontalAlignment,\n type VerticalAlignment,\n verticalAlignment,\n} from './flex-alignment.js';\nimport type { KerfUiContent } from './semantic-content.js';\n\nconst spaceNames: readonly UiSpaceName[] = [\n 'none',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n];\n\nexport interface RowProps {\n children?: KerfUiContent;\n /** Horizontal distribution. Defaults to left. */\n hAlign?: HorizontalAlignment;\n /** Vertical alignment and wrapped-line distribution. Defaults to full. */\n vAlign?: VerticalAlignment;\n /** A named UI spacing token or typed CSS length. Defaults to xs. */\n gap?: UiSpaceName | CssLength;\n /** Allow this row to grow/shrink, use a keyword, or supply a typed CSS flex shorthand. */\n flex?: boolean | CssFlexKeyword | CssFlex;\n /** Allow children to wrap onto additional lines. */\n wrap?: boolean;\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}\n\n/** A horizontal flex row with explicit physical-axis alignment and spacing. */\nexport function Row({\n children,\n hAlign = 'left',\n vAlign = 'full',\n gap = 'xs',\n flex = false,\n wrap = false,\n textInsets = '',\n controlInsets = '',\n className = '',\n}: RowProps) {\n const gapValue = spaceNames.includes(gap as UiSpaceName)\n ? space(gap as UiSpaceName)\n : gap;\n const flexValue = flex === true ? '1 1 auto' : flex || undefined;\n const style = [\n `--_kui-row-gap:${gapValue}`,\n flexValue ? `--_kui-row-flex:${flexValue}` : '',\n ]\n .filter(Boolean)\n .join(';');\n\n return (\n <div\n class={`kui-row ${className}`.trim()}\n data-component=\"row\"\n data-h-align={horizontalAlignment(hAlign)}\n data-v-align={verticalAlignment(vAlign)}\n data-flex={String(Boolean(flex))}\n data-wrap={String(wrap)}\n data-text-insets={textInsets || undefined}\n data-control-insets={controlInsets || undefined}\n style={style}\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 { Sides } from './divider-sides.js';\nexport type {\n HorizontalAlignment,\n VerticalAlignment,\n} from './flex-alignment.js';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Canonical physical edge combinations in top/right/bottom/left order. */
|
|
2
|
+
type Sides = '' | 't' | 'r' | 'b' | 'l' | 'tr' | 'tb' | 'tl' | 'rb' | 'rl' | 'bl' | 'trb' | 'trl' | 'tbl' | 'rbl' | 'trbl';
|
|
3
|
+
/** @deprecated Use the general `Sides` type. */
|
|
4
|
+
type DividerSides = Sides;
|
|
5
|
+
|
|
6
|
+
export type { DividerSides as D, Sides as S };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { SegmentedControl, SegmentedControlAppearance, SegmentedControlChoice, S
|
|
|
18
18
|
export { Select, SelectChoice, SelectFocusRingOwner, SelectPresentation, SelectProps, SelectSelectedPresentation, SelectSize } from './select.js';
|
|
19
19
|
export { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
20
20
|
export { Skeleton, SkeletonProps } from './skeleton.js';
|
|
21
|
+
export { Spacer, SpacerProps } from './spacer.js';
|
|
21
22
|
export { StateBanner, StateBannerProps, StateBannerTone, StateBannerUrgency } from './state-banner.js';
|
|
22
23
|
export { SunkenPanel, SunkenPanelProps, SunkenPanelShape } from './sunken-panel.js';
|
|
23
24
|
export { DialogSurface, DialogSurfacePresentation, DialogSurfaceProps, DialogSurfaceSize, PopupSurface, PopupSurfaceInset, PopupSurfaceProps, SurfaceInset } from './surface-scaffold.js';
|
|
@@ -30,7 +31,7 @@ export { ValueTable, ValueTableProps, ValueTableRow, ValueTableRowProps } from '
|
|
|
30
31
|
export { ResizeCommit, WireResizableRegionsOptions, wireResizableRegions } from './wire-resizable-regions.js';
|
|
31
32
|
export { TabDropPosition, TabReorder, TabReorderSource, WireTabBarsOptions, reorderTabs, wireTabBars } from './wire-tab-bars.js';
|
|
32
33
|
export { TokenSearchCollapsibleOptions, TokenSearchEdit, TokenSearchFieldsHandle, TokenSearchSubmit, WireTokenSearchFieldsOptions, wireTokenSearchFields } from './wire-token-search-fields.js';
|
|
33
|
-
export { D as DividerSides } from './divider-sides-
|
|
34
|
+
export { D as DividerSides, S as Sides } from './divider-sides-BzB6rphT.js';
|
|
34
35
|
export { H as HorizontalAlignment, V as VerticalAlignment } from './flex-alignment-CF8NLj7i.js';
|
|
35
36
|
import 'kerfjs';
|
|
36
37
|
import 'lucide';
|
package/dist/index.js
CHANGED
|
@@ -4,25 +4,26 @@ export { wireTokenSearchFields } from './chunk-VDUJZF5G.js';
|
|
|
4
4
|
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-TIGSG6BX.js';
|
|
5
5
|
export { ValueTable, ValueTableRow } from './chunk-V6HCTCVD.js';
|
|
6
6
|
export { Select } from './chunk-CK6P5AUK.js';
|
|
7
|
+
export { Spacer } from './chunk-OGTJNHRG.js';
|
|
7
8
|
export { StateBanner } from './chunk-UDHHKZWO.js';
|
|
8
9
|
export { SunkenPanel } from './chunk-SOK5EUF7.js';
|
|
9
10
|
export { DialogSurface, PopupSurface } from './chunk-WSXUPSID.js';
|
|
10
11
|
export { TabBar } from './chunk-ZPWZIVI6.js';
|
|
11
12
|
export { ToolbarText } from './chunk-V6GQKOX2.js';
|
|
12
13
|
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-CAB6NQ2T.js';
|
|
13
|
-
export { Row } from './chunk-
|
|
14
|
+
export { Row } from './chunk-X5GRDQ7V.js';
|
|
14
15
|
export { SegmentedControl } from './chunk-E34TE2ZI.js';
|
|
15
16
|
export { FloatingToolbar } from './chunk-DYBPI5O2.js';
|
|
16
17
|
export { ListActionRow } from './chunk-DAO2VFTT.js';
|
|
17
|
-
export { ListInsetControl } from './chunk-
|
|
18
|
-
export { ListInsetText } from './chunk-
|
|
18
|
+
export { ListInsetControl } from './chunk-2TYUFZUC.js';
|
|
19
|
+
export { ListInsetText } from './chunk-EYALJQQD.js';
|
|
19
20
|
export { AppTab } from './chunk-OMSRSL3B.js';
|
|
20
21
|
export { ToolbarControlGroup } from './chunk-B6JYRX3P.js';
|
|
21
22
|
export { Toolbar } from './chunk-VXFGMDA7.js';
|
|
22
23
|
export { Pane } from './chunk-I4V3UDSA.js';
|
|
23
|
-
export { ListHeader } from './chunk-
|
|
24
|
+
export { ListHeader } from './chunk-5FJ53EOF.js';
|
|
24
25
|
export { ListItem } from './chunk-I45QO2IZ.js';
|
|
25
|
-
export { List } from './chunk-
|
|
26
|
+
export { List } from './chunk-C34NZOLJ.js';
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
export { Skeleton } from './chunk-T7DOWS6T.js';
|
package/dist/list-header.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ type ListHeaderRootAttributes = Readonly<Record<`data-${string}`, string | undef
|
|
|
7
7
|
'data-has-count'?: never;
|
|
8
8
|
'data-density'?: never;
|
|
9
9
|
'data-divider'?: never;
|
|
10
|
+
'data-inline'?: never;
|
|
10
11
|
'data-indicator-tone'?: never;
|
|
11
12
|
'data-toggle'?: never;
|
|
12
13
|
}>;
|
|
@@ -21,6 +22,8 @@ interface ListHeaderBaseProps {
|
|
|
21
22
|
label: string;
|
|
22
23
|
density?: 'standard' | 'compact';
|
|
23
24
|
divider?: 'none' | 'before' | 'after' | 'both';
|
|
25
|
+
/** Shrink-wrap the header without its default outer margin, border, or padding. */
|
|
26
|
+
inline?: boolean;
|
|
24
27
|
indicatorTone?: 'neutral' | 'accent' | 'pop' | 'danger';
|
|
25
28
|
/** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */
|
|
26
29
|
placeholder?: boolean;
|
|
@@ -72,6 +75,6 @@ type ListHeaderIndicatorProps = {
|
|
|
72
75
|
status?: SafeHtml;
|
|
73
76
|
};
|
|
74
77
|
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps & ListHeaderModeProps;
|
|
75
|
-
declare function ListHeader({ label, count, countLabel, badge, status, density, divider, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, }: ListHeaderProps): SafeHtml;
|
|
78
|
+
declare function ListHeader({ label, count, countLabel, badge, status, density, divider, inline, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, }: ListHeaderProps): SafeHtml;
|
|
76
79
|
|
|
77
80
|
export { ListHeader, type ListHeaderProps };
|
package/dist/list-header.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
|
+
import { S as Sides } from './divider-sides-BzB6rphT.js';
|
|
2
3
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
4
|
|
|
4
5
|
interface ListInsetControlProps {
|
|
5
6
|
/** Control(s) that own their own border and padding (e.g. an input, a `wa-*`). */
|
|
6
7
|
children: KerfUiContent;
|
|
8
|
+
/** Physical inset sides in canonical top/right/bottom/left order. Defaults to all sides. */
|
|
9
|
+
sides?: Sides;
|
|
7
10
|
className?: string;
|
|
8
11
|
}
|
|
9
12
|
/**
|
|
@@ -12,6 +15,6 @@ interface ListInsetControlProps {
|
|
|
12
15
|
* Use it for controls that carry their own border and padding but no outer margin
|
|
13
16
|
* — the wrapper adds only the alignment margin and layout, not a second inset.
|
|
14
17
|
*/
|
|
15
|
-
declare function ListInsetControl({ children, className, }: ListInsetControlProps): kerfjs.SafeHtml;
|
|
18
|
+
declare function ListInsetControl({ children, sides, className, }: ListInsetControlProps): kerfjs.SafeHtml;
|
|
16
19
|
|
|
17
|
-
export { ListInsetControl, type ListInsetControlProps };
|
|
20
|
+
export { ListInsetControl, type ListInsetControlProps, Sides };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
|
+
import { S as Sides } from './divider-sides-BzB6rphT.js';
|
|
2
3
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
4
|
|
|
4
5
|
interface ListInsetTextProps {
|
|
5
6
|
/** Text (or inline content) that carries no margin, border, or padding of its own. */
|
|
6
7
|
children: KerfUiContent | string;
|
|
8
|
+
/** Physical inset sides in canonical top/right/bottom/left order. Defaults to all sides. */
|
|
9
|
+
sides?: Sides;
|
|
7
10
|
/**
|
|
8
|
-
* Keep only the horizontal geometry (inline margin, left/right border, and
|
|
11
|
+
* @deprecated Pass `sides="rl"` instead. Keep only the horizontal geometry (inline margin, left/right border, and
|
|
9
12
|
* left/right padding) and drop the vertical margin, border, and padding. Use it
|
|
10
13
|
* when the text edge must still align with bordered items but the line should not
|
|
11
14
|
* add its own vertical box space — tight text layout inside a content region.
|
|
@@ -21,6 +24,6 @@ interface ListInsetTextProps {
|
|
|
21
24
|
* Pass `horizontalOnly` to keep the horizontal inset but drop the vertical box
|
|
22
25
|
* space for tight text layout.
|
|
23
26
|
*/
|
|
24
|
-
declare function ListInsetText({ children, horizontalOnly, className, }: ListInsetTextProps): kerfjs.SafeHtml;
|
|
27
|
+
declare function ListInsetText({ children, sides, horizontalOnly, className, }: ListInsetTextProps): kerfjs.SafeHtml;
|
|
25
28
|
|
|
26
|
-
export { ListInsetText, type ListInsetTextProps };
|
|
29
|
+
export { ListInsetText, type ListInsetTextProps, Sides };
|
package/dist/list-inset-text.js
CHANGED
package/dist/list.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { UiSpaceName, CssLength, CssFlexKeyword, CssFlex } from './css-values.js';
|
|
3
|
-
import { D as DividerSides } from './divider-sides-
|
|
3
|
+
import { D as DividerSides, S as Sides } from './divider-sides-BzB6rphT.js';
|
|
4
4
|
import { H as HorizontalAlignment, V as VerticalAlignment } from './flex-alignment-CF8NLj7i.js';
|
|
5
5
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
6
6
|
|
|
@@ -18,9 +18,13 @@ interface ListProps {
|
|
|
18
18
|
scrollable?: boolean;
|
|
19
19
|
/** Physical divider edges in canonical top/right/bottom/left order. */
|
|
20
20
|
dividerSides?: DividerSides;
|
|
21
|
+
/** Physical sides that receive the standard 17px text inset. */
|
|
22
|
+
textInsets?: Sides;
|
|
23
|
+
/** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */
|
|
24
|
+
controlInsets?: Sides;
|
|
21
25
|
className?: string;
|
|
22
26
|
}
|
|
23
27
|
/** A stretch-aligned vertical stack with optional gap, flex, scroll, and dividers. */
|
|
24
|
-
declare function List({ children, gap, flex, hAlign, vAlign, scrollable, dividerSides, className, }: ListProps): kerfjs.SafeHtml;
|
|
28
|
+
declare function List({ children, gap, flex, hAlign, vAlign, scrollable, dividerSides, textInsets, controlInsets, className, }: ListProps): kerfjs.SafeHtml;
|
|
25
29
|
|
|
26
|
-
export { CssFlex, CssFlexKeyword, CssLength, DividerSides, HorizontalAlignment, List, type ListProps, UiSpaceName, VerticalAlignment };
|
|
30
|
+
export { CssFlex, CssFlexKeyword, CssLength, DividerSides, HorizontalAlignment, List, type ListProps, Sides, UiSpaceName, VerticalAlignment };
|
package/dist/list.js
CHANGED
package/dist/row.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { UiSpaceName, CssLength, CssFlexKeyword, CssFlex } from './css-values.js';
|
|
3
|
+
import { S as Sides } from './divider-sides-BzB6rphT.js';
|
|
3
4
|
import { H as HorizontalAlignment, V as VerticalAlignment } from './flex-alignment-CF8NLj7i.js';
|
|
4
5
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
5
6
|
|
|
@@ -15,9 +16,13 @@ interface RowProps {
|
|
|
15
16
|
flex?: boolean | CssFlexKeyword | CssFlex;
|
|
16
17
|
/** Allow children to wrap onto additional lines. */
|
|
17
18
|
wrap?: boolean;
|
|
19
|
+
/** Physical sides that receive the standard 17px text inset. */
|
|
20
|
+
textInsets?: Sides;
|
|
21
|
+
/** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */
|
|
22
|
+
controlInsets?: Sides;
|
|
18
23
|
className?: string;
|
|
19
24
|
}
|
|
20
25
|
/** A horizontal flex row with explicit physical-axis alignment and spacing. */
|
|
21
|
-
declare function Row({ children, hAlign, vAlign, gap, flex, wrap, className, }: RowProps): kerfjs.SafeHtml;
|
|
26
|
+
declare function Row({ children, hAlign, vAlign, gap, flex, wrap, textInsets, controlInsets, className, }: RowProps): kerfjs.SafeHtml;
|
|
22
27
|
|
|
23
|
-
export { CssFlex, CssFlexKeyword, CssLength, HorizontalAlignment, Row, type RowProps, UiSpaceName, VerticalAlignment };
|
|
28
|
+
export { CssFlex, CssFlexKeyword, CssLength, HorizontalAlignment, Row, type RowProps, Sides, UiSpaceName, VerticalAlignment };
|
package/dist/row.js
CHANGED
package/dist/spacer.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as kerfjs from 'kerfjs';
|
|
2
|
+
import { UiSpaceName, CssLength } from './css-values.js';
|
|
3
|
+
|
|
4
|
+
interface SpacerProps {
|
|
5
|
+
/** Grow and shrink to fill the available space along a parent's flex axis. */
|
|
6
|
+
flex?: boolean;
|
|
7
|
+
/** A named UI spacing token or typed physical width. */
|
|
8
|
+
width?: UiSpaceName | CssLength;
|
|
9
|
+
/** A named UI spacing token or typed physical height. */
|
|
10
|
+
height?: UiSpaceName | CssLength;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A decorative fixed-size or flexible gap for Row, List, and other flex layouts. */
|
|
14
|
+
declare function Spacer({ flex, width, height, className, }: SpacerProps): kerfjs.SafeHtml;
|
|
15
|
+
|
|
16
|
+
export { CssLength, Spacer, type SpacerProps, UiSpaceName };
|
package/dist/spacer.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"spacer.js"}
|
|
@@ -38,6 +38,33 @@
|
|
|
38
38
|
border-block-end: 1px solid var(--kui-list-group-divider-color);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
.kui-list-header[data-inline="true"] {
|
|
42
|
+
display: inline-block;
|
|
43
|
+
width: auto;
|
|
44
|
+
margin: 0;
|
|
45
|
+
border: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
vertical-align: middle;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.kui-list-header[data-inline="true"] > .kui-list-header__title,
|
|
51
|
+
.kui-list-header[data-inline="true"] > .kui-list-header__action {
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.kui-list-header[data-inline="true"] > .kui-list-header__title {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
width: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.kui-list-header[data-inline="true"] > .kui-list-header__action {
|
|
61
|
+
margin-inline-start: var(--kui-layout-item-gap, 0.5rem);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.kui-list-header[data-inline="true"] > .kui-list-header__toggle {
|
|
65
|
+
width: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
41
68
|
.kui-list-header__title,
|
|
42
69
|
.kui-list-header__action {
|
|
43
70
|
box-sizing: border-box;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
.kui-list-inset-control {
|
|
2
2
|
display: flex;
|
|
3
|
-
margin
|
|
3
|
+
margin: 0;
|
|
4
4
|
justify-content: stretch;
|
|
5
5
|
align-items: stretch;
|
|
6
6
|
gap: 0.5rem;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.kui-list-inset-control[data-sides*="t"] {
|
|
10
|
+
margin-top: var(--kui-layout-inline-margin, 0.5rem);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.kui-list-inset-control[data-sides*="r"] {
|
|
14
|
+
margin-right: var(--kui-layout-inline-margin, 0.5rem);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.kui-list-inset-control[data-sides*="b"] {
|
|
18
|
+
margin-bottom: var(--kui-layout-inline-margin, 0.5rem);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.kui-list-inset-control[data-sides*="l"] {
|
|
22
|
+
margin-left: var(--kui-layout-inline-margin, 0.5rem);
|
|
23
|
+
}
|
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
.kui-list-inset-text
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.kui-list-inset-text,
|
|
2
|
+
.kui-list-inset-text--horizontal {
|
|
3
|
+
margin: 0;
|
|
4
|
+
border: 0 solid transparent;
|
|
5
|
+
padding: 0;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
.kui-list-inset-text[data-sides*="t"] {
|
|
9
|
+
margin-top: var(--kui-layout-inline-margin, 0.5rem);
|
|
10
|
+
border-top-width: 1px;
|
|
11
|
+
padding-top: var(--kui-layout-item-padding, 0.5rem);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.kui-list-inset-text[data-sides*="r"] {
|
|
15
|
+
margin-right: var(--kui-layout-inline-margin, 0.5rem);
|
|
16
|
+
border-right-width: 1px;
|
|
17
|
+
padding-right: var(--kui-layout-item-padding, 0.5rem);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.kui-list-inset-text[data-sides*="b"] {
|
|
21
|
+
margin-bottom: var(--kui-layout-inline-margin, 0.5rem);
|
|
22
|
+
border-bottom-width: 1px;
|
|
23
|
+
padding-bottom: var(--kui-layout-item-padding, 0.5rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.kui-list-inset-text[data-sides*="l"] {
|
|
27
|
+
margin-left: var(--kui-layout-inline-margin, 0.5rem);
|
|
28
|
+
border-left-width: 1px;
|
|
29
|
+
padding-left: var(--kui-layout-item-padding, 0.5rem);
|
|
14
30
|
}
|