@kerfjs/ui 5.0.0-beta.34 → 5.0.0-beta.36
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 +19 -4
- package/ai/component-catalog-v2.json +15 -5
- package/ai/component-catalog.json +45 -19
- package/ai/public-api-signatures-v1.md +107 -11
- package/ai/skill.md +2 -2
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- 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-OKRCKIVO.js → chunk-AVZ2IMWG.js} +13 -2
- package/dist/chunk-AVZ2IMWG.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-7JQAQWVC.js → chunk-TNXDXSGP.js} +5 -1
- package/dist/chunk-TNXDXSGP.js.map +1 -0
- package/dist/divider-sides-BzB6rphT.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -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 +10 -3
- package/dist/row.js +1 -1
- 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 +47 -0
- package/dist/toolbar.d.ts +1 -1
- package/docs/component-contract.md +9 -5
- package/docs/component-integration.md +63 -0
- package/docs/component-selection.md +1 -1
- 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 +20 -0
- package/docs/ux-demo.md +10 -0
- package/llms.txt +4 -0
- package/package.json +9 -3
- 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-OKRCKIVO.js.map +0 -1
- package/dist/divider-sides-267FA7sY.d.ts +0 -4
|
@@ -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;A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;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"]}
|
|
@@ -16,10 +16,18 @@ function Row({
|
|
|
16
16
|
hAlign = "left",
|
|
17
17
|
vAlign = "full",
|
|
18
18
|
gap = "xs",
|
|
19
|
+
flex = false,
|
|
19
20
|
wrap = false,
|
|
21
|
+
textInsets = "",
|
|
22
|
+
controlInsets = "",
|
|
20
23
|
className = ""
|
|
21
24
|
}) {
|
|
22
25
|
const gapValue = spaceNames.includes(gap) ? space(gap) : gap;
|
|
26
|
+
const flexValue = flex === true ? "1 1 auto" : flex || void 0;
|
|
27
|
+
const style = [
|
|
28
|
+
`--_kui-row-gap:${gapValue}`,
|
|
29
|
+
flexValue ? `--_kui-row-flex:${flexValue}` : ""
|
|
30
|
+
].filter(Boolean).join(";");
|
|
23
31
|
return /* @__PURE__ */ jsx(
|
|
24
32
|
"div",
|
|
25
33
|
{
|
|
@@ -27,8 +35,11 @@ function Row({
|
|
|
27
35
|
"data-component": "row",
|
|
28
36
|
"data-h-align": horizontalAlignment(hAlign),
|
|
29
37
|
"data-v-align": verticalAlignment(vAlign),
|
|
38
|
+
"data-flex": String(Boolean(flex)),
|
|
30
39
|
"data-wrap": String(wrap),
|
|
31
|
-
|
|
40
|
+
"text-insets": textInsets || void 0,
|
|
41
|
+
"control-insets": controlInsets || void 0,
|
|
42
|
+
style,
|
|
32
43
|
children
|
|
33
44
|
}
|
|
34
45
|
);
|
|
@@ -36,4 +47,4 @@ function Row({
|
|
|
36
47
|
|
|
37
48
|
export { Row };
|
|
38
49
|
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-AVZ2IMWG.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,CAA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Keyword,\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 text-insets={textInsets || undefined}\n 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"]}
|
|
@@ -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"]}
|
|
@@ -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
|
+
"text-insets": textInsets || void 0,
|
|
44
|
+
"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-TNXDXSGP.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,eAAa,UAAA,IAAc,MAAA;AAAA,MAC3B,kBAAgB,aAAA,IAAiB,MAAA;AAAA,MACjC,OAAO,KAAA,IAAS,MAAA;AAAA,MAEf;AAAA;AAAA,GACH;AAEJ","file":"chunk-TNXDXSGP.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 text-insets={textInsets || undefined}\n 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"]}
|
|
@@ -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
|
@@ -30,7 +30,7 @@ export { ValueTable, ValueTableProps, ValueTableRow, ValueTableRowProps } from '
|
|
|
30
30
|
export { ResizeCommit, WireResizableRegionsOptions, wireResizableRegions } from './wire-resizable-regions.js';
|
|
31
31
|
export { TabDropPosition, TabReorder, TabReorderSource, WireTabBarsOptions, reorderTabs, wireTabBars } from './wire-tab-bars.js';
|
|
32
32
|
export { TokenSearchCollapsibleOptions, TokenSearchEdit, TokenSearchFieldsHandle, TokenSearchSubmit, WireTokenSearchFieldsOptions, wireTokenSearchFields } from './wire-token-search-fields.js';
|
|
33
|
-
export { D as DividerSides } from './divider-sides-
|
|
33
|
+
export { D as DividerSides, S as Sides } from './divider-sides-BzB6rphT.js';
|
|
34
34
|
export { H as HorizontalAlignment, V as VerticalAlignment } from './flex-alignment-CF8NLj7i.js';
|
|
35
35
|
import 'kerfjs';
|
|
36
36
|
import 'lucide';
|
package/dist/index.js
CHANGED
|
@@ -10,19 +10,19 @@ export { DialogSurface, PopupSurface } from './chunk-WSXUPSID.js';
|
|
|
10
10
|
export { TabBar } from './chunk-ZPWZIVI6.js';
|
|
11
11
|
export { ToolbarText } from './chunk-V6GQKOX2.js';
|
|
12
12
|
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-CAB6NQ2T.js';
|
|
13
|
-
export { Row } from './chunk-
|
|
13
|
+
export { Row } from './chunk-AVZ2IMWG.js';
|
|
14
14
|
export { SegmentedControl } from './chunk-E34TE2ZI.js';
|
|
15
15
|
export { FloatingToolbar } from './chunk-DYBPI5O2.js';
|
|
16
16
|
export { ListActionRow } from './chunk-DAO2VFTT.js';
|
|
17
|
-
export { ListInsetControl } from './chunk-
|
|
18
|
-
export { ListInsetText } from './chunk-
|
|
17
|
+
export { ListInsetControl } from './chunk-2TYUFZUC.js';
|
|
18
|
+
export { ListInsetText } from './chunk-EYALJQQD.js';
|
|
19
19
|
export { AppTab } from './chunk-OMSRSL3B.js';
|
|
20
20
|
export { ToolbarControlGroup } from './chunk-B6JYRX3P.js';
|
|
21
21
|
export { Toolbar } from './chunk-VXFGMDA7.js';
|
|
22
22
|
export { Pane } from './chunk-I4V3UDSA.js';
|
|
23
|
-
export { ListHeader } from './chunk-
|
|
23
|
+
export { ListHeader } from './chunk-5FJ53EOF.js';
|
|
24
24
|
export { ListItem } from './chunk-I45QO2IZ.js';
|
|
25
|
-
export { List } from './chunk-
|
|
25
|
+
export { List } from './chunk-TNXDXSGP.js';
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
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
|
-
import { UiSpaceName, CssLength } from './css-values.js';
|
|
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
|
|
|
@@ -11,11 +12,17 @@ interface RowProps {
|
|
|
11
12
|
vAlign?: VerticalAlignment;
|
|
12
13
|
/** A named UI spacing token or typed CSS length. Defaults to xs. */
|
|
13
14
|
gap?: UiSpaceName | CssLength;
|
|
15
|
+
/** Allow this row to grow/shrink, use a keyword, or supply a typed CSS flex shorthand. */
|
|
16
|
+
flex?: boolean | CssFlexKeyword | CssFlex;
|
|
14
17
|
/** Allow children to wrap onto additional lines. */
|
|
15
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;
|
|
16
23
|
className?: string;
|
|
17
24
|
}
|
|
18
25
|
/** A horizontal flex row with explicit physical-axis alignment and spacing. */
|
|
19
|
-
declare function Row({ children, hAlign, vAlign, gap, wrap, className, }: RowProps): kerfjs.SafeHtml;
|
|
26
|
+
declare function Row({ children, hAlign, vAlign, gap, flex, wrap, textInsets, controlInsets, className, }: RowProps): kerfjs.SafeHtml;
|
|
20
27
|
|
|
21
|
-
export { CssLength, HorizontalAlignment, Row, type RowProps, UiSpaceName, VerticalAlignment };
|
|
28
|
+
export { CssFlex, CssFlexKeyword, CssLength, HorizontalAlignment, Row, type RowProps, Sides, UiSpaceName, VerticalAlignment };
|
package/dist/row.js
CHANGED
|
@@ -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
|
}
|
package/dist/styles/list.css
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
min-width: 0;
|
|
11
11
|
min-height: 0;
|
|
12
12
|
box-sizing: border-box;
|
|
13
|
+
padding: var(--_kui-list-inset-top, 0) var(--_kui-list-inset-right, 0)
|
|
14
|
+
var(--_kui-list-inset-bottom, 0) var(--_kui-list-inset-left, 0);
|
|
13
15
|
flex: var(--_kui-list-flex, initial);
|
|
14
16
|
flex-direction: column;
|
|
15
17
|
align-items: stretch;
|
|
@@ -23,6 +25,50 @@
|
|
|
23
25
|
inset 1px 0 var(--_kui-list-divider-left);
|
|
24
26
|
}
|
|
25
27
|
|
|
28
|
+
.kui-list[control-insets*="t"] {
|
|
29
|
+
--_kui-list-inset-top: var(--kui-layout-inline-margin, 0.5rem);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.kui-list[control-insets*="r"] {
|
|
33
|
+
--_kui-list-inset-right: var(--kui-layout-inline-margin, 0.5rem);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.kui-list[control-insets*="b"] {
|
|
37
|
+
--_kui-list-inset-bottom: var(--kui-layout-inline-margin, 0.5rem);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.kui-list[control-insets*="l"] {
|
|
41
|
+
--_kui-list-inset-left: var(--kui-layout-inline-margin, 0.5rem);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.kui-list[text-insets*="t"] {
|
|
45
|
+
--_kui-list-inset-top: calc(
|
|
46
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
47
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.kui-list[text-insets*="r"] {
|
|
52
|
+
--_kui-list-inset-right: calc(
|
|
53
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
54
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.kui-list[text-insets*="b"] {
|
|
59
|
+
--_kui-list-inset-bottom: calc(
|
|
60
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
61
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.kui-list[text-insets*="l"] {
|
|
66
|
+
--_kui-list-inset-left: calc(
|
|
67
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
68
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
26
72
|
.kui-list[data-h-align="left"] {
|
|
27
73
|
align-items: flex-start;
|
|
28
74
|
align-content: flex-start;
|
package/dist/styles/row.css
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
min-width: 0;
|
|
6
6
|
min-height: 0;
|
|
7
7
|
box-sizing: border-box;
|
|
8
|
+
padding: var(--_kui-row-inset-top, 0) var(--_kui-row-inset-right, 0)
|
|
9
|
+
var(--_kui-row-inset-bottom, 0) var(--_kui-row-inset-left, 0);
|
|
10
|
+
flex: var(--_kui-row-flex, initial);
|
|
8
11
|
flex-direction: row;
|
|
9
12
|
flex-wrap: nowrap;
|
|
10
13
|
align-items: stretch;
|
|
@@ -13,6 +16,50 @@
|
|
|
13
16
|
gap: var(--_kui-row-gap, var(--kui-row-gap));
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
.kui-row[control-insets*="t"] {
|
|
20
|
+
--_kui-row-inset-top: var(--kui-layout-inline-margin, 0.5rem);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.kui-row[control-insets*="r"] {
|
|
24
|
+
--_kui-row-inset-right: var(--kui-layout-inline-margin, 0.5rem);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.kui-row[control-insets*="b"] {
|
|
28
|
+
--_kui-row-inset-bottom: var(--kui-layout-inline-margin, 0.5rem);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.kui-row[control-insets*="l"] {
|
|
32
|
+
--_kui-row-inset-left: var(--kui-layout-inline-margin, 0.5rem);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.kui-row[text-insets*="t"] {
|
|
36
|
+
--_kui-row-inset-top: calc(
|
|
37
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
38
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.kui-row[text-insets*="r"] {
|
|
43
|
+
--_kui-row-inset-right: calc(
|
|
44
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
45
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.kui-row[text-insets*="b"] {
|
|
50
|
+
--_kui-row-inset-bottom: calc(
|
|
51
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
52
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.kui-row[text-insets*="l"] {
|
|
57
|
+
--_kui-row-inset-left: calc(
|
|
58
|
+
var(--kui-layout-inline-margin, 0.5rem) + 1px +
|
|
59
|
+
var(--kui-layout-item-padding, 0.5rem)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
16
63
|
.kui-row[data-wrap="true"] {
|
|
17
64
|
flex-wrap: wrap;
|
|
18
65
|
}
|
package/dist/toolbar.d.ts
CHANGED
|
@@ -231,9 +231,12 @@ In `ListHeader` toggle mode, omitting `actionIcon` composes the production
|
|
|
231
231
|
`DisclosureArrow` and derives its visual direction from `expanded`. The app
|
|
232
232
|
must update that controlled state and reveal or hide real content. Passing a
|
|
233
233
|
custom `actionIcon` replaces the default rather than layering or rotating both.
|
|
234
|
-
The root fills the available inline width after its standard margins
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
The root fills the available inline width after its standard margins by
|
|
235
|
+
default. Set `inline` when it must shrink-wrap beside surrounding content; that
|
|
236
|
+
presentation removes the root margin, border, and padding while retaining the
|
|
237
|
+
title and optional action's own control geometry. A separate action stays at
|
|
238
|
+
the logical end while the visible glyph defaults to 18px through
|
|
239
|
+
`--kui-list-header-action-icon-size`.
|
|
237
240
|
|
|
238
241
|
`StateBanner` exposes instance-level `--kui-state-banner-background`,
|
|
239
242
|
`--kui-state-banner-border`, `--kui-state-banner-foreground`,
|
|
@@ -269,7 +272,8 @@ Logical-edge separator lines are independently opt-in and default off.
|
|
|
269
272
|
geometry classes.
|
|
270
273
|
`List` is the corresponding layout-only vertical stack: its children stretch by
|
|
271
274
|
default, while `gap`, `flex`, and `scrollable` opt into typed spacing,
|
|
272
|
-
flex growth, and vertical scroll ownership. `
|
|
275
|
+
flex growth, and vertical scroll ownership. `Row.flex` uses the same typed flex
|
|
276
|
+
participation contract on the horizontal counterpart. `dividerSides` accepts canonical
|
|
273
277
|
physical top/right/bottom/left combinations such as `tr` and `trbl`; the stack
|
|
274
278
|
adds no list semantics, margin, or padding of its own. Use a direct finite
|
|
275
279
|
spacing shorthand such as `gap="2xs"`, or pass a `CssLength` created by the
|
|
@@ -280,7 +284,7 @@ length. Raw CSS strings and source-only `remify(4px)` are not valid runtime
|
|
|
280
284
|
props. The `CssLength` name intentionally includes percentages for UI dimension
|
|
281
285
|
props. Its opaque string brand improves authoring correctness; it is not a CSS
|
|
282
286
|
sanitizer or security boundary.
|
|
283
|
-
`List.flex` likewise
|
|
287
|
+
`Row.flex` and `List.flex` likewise accept their boolean default, finite keywords, or `CssFlex`
|
|
284
288
|
from `flex(grow, shrink, basis)`. `Skeleton` width/height use `CssSize`, radius
|
|
285
289
|
uses `CssLength`, and `SelectChoice.color` uses `CssColor` from `uiColor()` or
|
|
286
290
|
`colorVar()`. Never exchange these property grammars. List rows expose
|