@lostgradient/cinder 0.12.0 → 0.13.0
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/CHANGELOG.md +12 -0
- package/components.json +9 -6
- package/dist/components/accordion/index.js +14 -11
- package/dist/components/accordion-item/accordion-item.css +20 -7
- package/dist/components/accordion-item/accordion-item.schema.js +5 -1
- package/dist/components/accordion-item/accordion-item.types.d.ts +4 -0
- package/dist/components/accordion-item/accordion-item.variables.js +13 -2
- package/dist/components/accordion-item/index.js +14 -11
- package/dist/components/action-row/action-row.css +20 -9
- package/dist/components/action-row/action-row.schema.js +5 -1
- package/dist/components/action-row/action-row.types.d.ts +43 -0
- package/dist/components/action-row/action-row.variables.js +12 -2
- package/dist/components/chat/chat.svelte.d.ts +1 -0
- package/dist/components/diff-viewer/index.js +201 -101
- package/dist/components/json-schema-editor/index.js +229 -129
- package/dist/components/markdown-editor/index.js +207 -107
- package/dist/components/review-editor/index.js +291 -191
- package/dist/components/schedule-builder/index.js +205 -105
- package/dist/components/segment/index.js +119 -56
- package/dist/components/segment/segment.schema.d.ts +2 -2
- package/dist/components/segment/segment.schema.js +71 -33
- package/dist/components/segment/segment.svelte.d.ts +2 -1
- package/dist/components/segment/segment.types.d.ts +67 -10
- package/dist/components/segmented-control/index.js +193 -93
- package/dist/components/segmented-control/segmented-control-state.svelte.d.ts +4 -4
- package/dist/components/segmented-control/segmented-control.css +26 -6
- package/dist/components/segmented-control/segmented-control.schema.js +3 -3
- package/dist/components/segmented-control/segmented-control.svelte.d.ts +2 -1
- package/dist/components/segmented-control/segmented-control.types.d.ts +4 -4
- package/dist/components/side-navigation/side-navigation.css +2 -1
- package/dist/components/side-navigation/side-navigation.schema.js +9 -6
- package/dist/components/side-navigation/side-navigation.types.d.ts +11 -0
- package/dist/components/side-navigation/side-navigation.variables.js +2 -2
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/sidebar/index.js +9 -3
- package/dist/components/sidebar/sidebar.constants.d.ts +12 -0
- package/dist/components/stat/stat.css +16 -8
- package/dist/components/stat/stat.schema.js +5 -1
- package/dist/components/stat/stat.types.d.ts +19 -0
- package/dist/components/stat/stat.variables.js +11 -2
- package/dist/components/stat-group/stat-group.css +7 -4
- package/dist/components/stat-group/stat-group.schema.js +5 -1
- package/dist/components/stat-group/stat-group.types.d.ts +27 -0
- package/dist/components/stat-group/stat-group.variables.js +6 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +479 -368
- package/dist/server/components/accordion/index.js +2 -2
- package/dist/server/components/accordion-item/index.js +2 -2
- package/dist/server/components/diff-viewer/index.js +4 -4
- package/dist/server/components/json-schema-editor/index.js +4 -4
- package/dist/server/components/markdown-editor/index.js +3 -3
- package/dist/server/components/review-editor/index.js +4 -4
- package/dist/server/components/schedule-builder/index.js +3 -3
- package/dist/server/components/segment/index.js +2 -2
- package/dist/server/components/segmented-control/index.js +3 -3
- package/dist/server/components/sidebar/index.js +7 -3
- package/dist/server/index.js +19 -13
- package/dist/server/{index.server-cf6pxeyg.js → index.server-0rzd71e0.js} +1 -1
- package/dist/server/{index.server-jgb8yh5k.js → index.server-2m1kenak.js} +1 -1
- package/dist/server/{index.server-jfrssta6.js → index.server-ck3fwrab.js} +1 -1
- package/dist/server/{index.server-sedjxt36.js → index.server-e89qfamd.js} +79 -35
- package/dist/server/{index.server-pag862vz.js → index.server-grgv455a.js} +2 -2
- package/dist/server/{index.server-y83kqayt.js → index.server-h3nzp8g8.js} +1 -1
- package/dist/server/{index.server-2qj6s2mh.js → index.server-j570vb03.js} +7 -3
- package/dist/server/index.server-jwvxxjvc.js +50 -0
- package/dist/server/{index.server-xeqtpv61.js → index.server-mr68brd6.js} +49 -24
- package/dist/server/{index.server-qbkxz7r2.js → index.server-nx9c2ep1.js} +2 -2
- package/dist/server/{index.server-jj76374p.js → index.server-p071e531.js} +1 -1
- package/dist/server/{index.server-5gzyqv78.js → index.server-v3arexq8.js} +2 -2
- package/dist/server/{index.server-85p4ydph.js → index.server-zzd5wpbw.js} +1 -1
- package/package.json +1 -1
- package/src/components/accordion/accordion.examples.json +6 -0
- package/src/components/accordion-item/accordion-item.css +20 -7
- package/src/components/accordion-item/accordion-item.schema.json +4 -0
- package/src/components/accordion-item/accordion-item.schema.ts +4 -0
- package/src/components/accordion-item/accordion-item.svelte +9 -7
- package/src/components/accordion-item/accordion-item.types.ts +4 -0
- package/src/components/accordion-item/accordion-item.variables.json +12 -1
- package/src/components/accordion-item/accordion-item.variables.ts +12 -1
- package/src/components/action-row/action-row.css +20 -9
- package/src/components/action-row/action-row.examples.json +6 -0
- package/src/components/action-row/action-row.schema.json +4 -0
- package/src/components/action-row/action-row.schema.ts +4 -0
- package/src/components/action-row/action-row.types.ts +44 -0
- package/src/components/action-row/action-row.variables.json +11 -1
- package/src/components/action-row/action-row.variables.ts +11 -1
- package/src/components/chat/chat.examples.json +6 -0
- package/src/components/segment/segment.schema.json +34 -7
- package/src/components/segment/segment.schema.ts +5 -47
- package/src/components/segment/segment.svelte +58 -23
- package/src/components/segment/segment.types.ts +81 -11
- package/src/components/segmented-control/segmented-control.css +26 -6
- package/src/components/segmented-control/segmented-control.examples.json +6 -0
- package/src/components/segmented-control/segmented-control.schema.json +2 -2
- package/src/components/segmented-control/segmented-control.schema.ts +2 -2
- package/src/components/segmented-control/segmented-control.svelte +50 -23
- package/src/components/segmented-control/segmented-control.types.ts +4 -7
- package/src/components/side-navigation/side-navigation.css +2 -1
- package/src/components/side-navigation/side-navigation.examples.json +6 -0
- package/src/components/side-navigation/side-navigation.schema.json +8 -5
- package/src/components/side-navigation/side-navigation.schema.ts +8 -5
- package/src/components/side-navigation/side-navigation.types.ts +12 -0
- package/src/components/side-navigation/side-navigation.variables.json +1 -1
- package/src/components/side-navigation/side-navigation.variables.ts +1 -1
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/sidebar/sidebar.constants.ts +13 -0
- package/src/components/sidebar/sidebar.examples.json +6 -0
- package/src/components/sidebar/sidebar.svelte +4 -5
- package/src/components/stat/stat.css +16 -8
- package/src/components/stat/stat.schema.json +4 -0
- package/src/components/stat/stat.schema.ts +4 -0
- package/src/components/stat/stat.types.ts +20 -0
- package/src/components/stat/stat.variables.json +10 -1
- package/src/components/stat/stat.variables.ts +10 -1
- package/src/components/stat-group/stat-group.css +7 -4
- package/src/components/stat-group/stat-group.examples.json +6 -0
- package/src/components/stat-group/stat-group.schema.json +4 -0
- package/src/components/stat-group/stat-group.schema.ts +4 -0
- package/src/components/stat-group/stat-group.types.ts +28 -0
- package/src/components/stat-group/stat-group.variables.json +5 -1
- package/src/components/stat-group/stat-group.variables.ts +5 -1
- package/src/index.ts +5 -1
- package/src/styles/foundation.css +2 -1
- package/dist/server/index.server-hfx487zj.js +0 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SegmentedControlController,
|
|
3
3
|
setSegmentedControlContext
|
|
4
|
-
} from "./index.server-
|
|
4
|
+
} from "./index.server-e89qfamd.js";
|
|
5
5
|
import {
|
|
6
6
|
classNames
|
|
7
7
|
} from "./index.server-z7nvkz8v.js";
|
|
@@ -38,9 +38,11 @@ function Segmented_control($$renderer, $$props) {
|
|
|
38
38
|
let resetSyncTimeout;
|
|
39
39
|
const initialSingleValue = untrack(() => typeof value === "string" ? value : undefined);
|
|
40
40
|
const initialMultipleValues = untrack(() => selectionMode === "multiple" && value instanceof SvelteSet ? Array.from(value) : undefined);
|
|
41
|
+
const effectiveVariant = $.derived(() => selectionMode === "multiple" && variant !== "radiogroup" ? "radiogroup" : variant);
|
|
42
|
+
const rendersNavigation = $.derived(() => effectiveVariant() === "navigation");
|
|
41
43
|
const controller = new SegmentedControlController({
|
|
42
44
|
selectionMode: () => selectionMode,
|
|
43
|
-
variant: () =>
|
|
45
|
+
variant: () => effectiveVariant(),
|
|
44
46
|
orientation: () => orientation,
|
|
45
47
|
controlDisabled: () => disabled,
|
|
46
48
|
disallowEmptySelection: () => disallowEmptySelection,
|
|
@@ -55,7 +57,7 @@ function Segmented_control($$renderer, $$props) {
|
|
|
55
57
|
return selectionMode;
|
|
56
58
|
},
|
|
57
59
|
get variant() {
|
|
58
|
-
return
|
|
60
|
+
return effectiveVariant();
|
|
59
61
|
},
|
|
60
62
|
get controlDisabled() {
|
|
61
63
|
return disabled;
|
|
@@ -66,7 +68,7 @@ function Segmented_control($$renderer, $$props) {
|
|
|
66
68
|
toggle: (segmentValue) => controller.toggle(segmentValue)
|
|
67
69
|
};
|
|
68
70
|
setSegmentedControlContext(contextValue);
|
|
69
|
-
const groupRole = $.derived(() => selectionMode === "multiple" ? "group" : variant === "tablist" ? "tablist" : "radiogroup");
|
|
71
|
+
const groupRole = $.derived(() => selectionMode === "multiple" ? "group" : variant === "navigation" ? undefined : variant === "tablist" ? "tablist" : "radiogroup");
|
|
70
72
|
const effectiveSize = $.derived(() => density === "toolbar" ? "sm" : size);
|
|
71
73
|
const selectedValues = $.derived(() => selectionMode === "multiple" ? value instanceof SvelteSet ? Array.from(value) : [] : typeof value === "string" ? [value] : []);
|
|
72
74
|
function resetToInitialValue(event) {
|
|
@@ -83,25 +85,48 @@ function Segmented_control($$renderer, $$props) {
|
|
|
83
85
|
value = initialSingleValue;
|
|
84
86
|
}, 0);
|
|
85
87
|
}
|
|
86
|
-
$$renderer2.push(`<div class="cinder-segmented-control-container"><span${$.attr("id", `${id}-label`)}${$.attr_class($.clsx(classNames("cinder-segmented-control-label", hideLabel && "cinder-sr-only")))}>${$.escape(label)}</span>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
$$renderer2.push(`<div class="cinder-segmented-control-container"><span${$.attr("id", `${id}-label`)}${$.attr_class($.clsx(classNames("cinder-segmented-control-label", hideLabel && "cinder-sr-only")))}>${$.escape(label)}</span> `);
|
|
89
|
+
if (rendersNavigation()) {
|
|
90
|
+
$$renderer2.push("<!--[0-->");
|
|
91
|
+
$$renderer2.push(`<nav${$.attributes({
|
|
92
|
+
...rest,
|
|
93
|
+
id,
|
|
94
|
+
role: "navigation",
|
|
95
|
+
"aria-labelledby": `${id}-label`,
|
|
96
|
+
"data-cinder-orientation": orientation,
|
|
97
|
+
"data-cinder-size": effectiveSize(),
|
|
98
|
+
"data-cinder-density": density === "toolbar" ? "toolbar" : undefined,
|
|
99
|
+
"data-cinder-selection-mode": selectionMode,
|
|
100
|
+
"data-cinder-detached": detached ? "" : undefined,
|
|
101
|
+
"data-cinder-full-width": fullWidth ? "" : undefined,
|
|
102
|
+
"data-cinder-variant": effectiveVariant(),
|
|
103
|
+
class: $.clsx(classNames("cinder-segmented-control", customClassName))
|
|
104
|
+
})}>`);
|
|
105
|
+
children($$renderer2);
|
|
106
|
+
$$renderer2.push(`<!----></nav>`);
|
|
107
|
+
} else {
|
|
108
|
+
$$renderer2.push("<!--[-1-->");
|
|
109
|
+
$$renderer2.push(`<div${$.attributes({
|
|
110
|
+
...rest,
|
|
111
|
+
id,
|
|
112
|
+
role: groupRole(),
|
|
113
|
+
"aria-labelledby": `${id}-label`,
|
|
114
|
+
"aria-disabled": disabled ? "true" : undefined,
|
|
115
|
+
"aria-orientation": selectionMode === "single" ? orientation : undefined,
|
|
116
|
+
"data-cinder-orientation": orientation,
|
|
117
|
+
"data-cinder-size": effectiveSize(),
|
|
118
|
+
"data-cinder-density": density === "toolbar" ? "toolbar" : undefined,
|
|
119
|
+
"data-cinder-selection-mode": selectionMode,
|
|
120
|
+
"data-cinder-detached": detached ? "" : undefined,
|
|
121
|
+
"data-cinder-full-width": fullWidth ? "" : undefined,
|
|
122
|
+
"data-cinder-variant": effectiveVariant(),
|
|
123
|
+
class: $.clsx(classNames("cinder-segmented-control", customClassName))
|
|
124
|
+
})}>`);
|
|
125
|
+
children($$renderer2);
|
|
126
|
+
$$renderer2.push(`<!----></div>`);
|
|
127
|
+
}
|
|
128
|
+
$$renderer2.push(`<!--]--> `);
|
|
129
|
+
if (name && !rendersNavigation()) {
|
|
105
130
|
$$renderer2.push("<!--[0-->");
|
|
106
131
|
$$renderer2.push(`<input type="hidden" disabled=""/> <!--[-->`);
|
|
107
132
|
const each_array = $.ensure_array_like(selectedValues());
|
|
@@ -120,4 +145,4 @@ function Segmented_control($$renderer, $$props) {
|
|
|
120
145
|
|
|
121
146
|
export { Segmented_control };
|
|
122
147
|
|
|
123
|
-
//# debugId=
|
|
148
|
+
//# debugId=2670B4695EBCBA5F64756E2164756E21
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./index.server-d146g8pr.js";
|
|
10
10
|
import {
|
|
11
11
|
Segmented_control
|
|
12
|
-
} from "./index.server-
|
|
12
|
+
} from "./index.server-mr68brd6.js";
|
|
13
13
|
import {
|
|
14
14
|
Segment
|
|
15
|
-
} from "./index.server-
|
|
15
|
+
} from "./index.server-e89qfamd.js";
|
|
16
16
|
import {
|
|
17
17
|
Input
|
|
18
18
|
} from "./index.server-8xvc73zh.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./index.server-x1dha7bk.js";
|
|
4
4
|
import {
|
|
5
5
|
Segmented_control
|
|
6
|
-
} from "./index.server-
|
|
6
|
+
} from "./index.server-mr68brd6.js";
|
|
7
7
|
import {
|
|
8
8
|
Segment
|
|
9
|
-
} from "./index.server-
|
|
9
|
+
} from "./index.server-e89qfamd.js";
|
|
10
10
|
import {
|
|
11
11
|
Kbd
|
|
12
12
|
} from "./index.server-02tkmzvs.js";
|
package/package.json
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
"featured": true,
|
|
11
11
|
"code": "<script lang=\"ts\">\n import { Accordion } from '@lostgradient/cinder/accordion';\n\n let expandedIds = $state<string[]>([]);\n</script>\n\n<Accordion bind:expandedIds>\n <Accordion.Item id=\"item-1\" title=\"What is Cinder?\">\n Cinder is a Svelte 5 design system built for composability and accessibility.\n </Accordion.Item>\n <Accordion.Item id=\"item-2\" title=\"How do I install it?\">\n Run <code>bun add @lostgradient/cinder</code> and import components from\n <code>@lostgradient/cinder</code> or via subpath imports.\n </Accordion.Item>\n <Accordion.Item id=\"item-3\" title=\"Does it support SSR?\">\n Yes — every component is SSR-safe and renders meaningful HTML before hydration.\n </Accordion.Item>\n</Accordion>\n"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"id": "dense-inspector",
|
|
15
|
+
"title": "Dense inspector accordion",
|
|
16
|
+
"description": "Inspector panels can compact trigger and panel spacing with public Accordion.Item CSS variables.",
|
|
17
|
+
"code": "<script lang=\"ts\">\n import { Accordion } from '@lostgradient/cinder/accordion';\n\n let expandedIds = $state<string[]>(['selection', 'metadata']);\n</script>\n\n<div style=\"max-inline-size: 32rem;\">\n <Accordion multiple bind:expandedIds>\n <Accordion.Item\n id=\"selection\"\n title=\"Selection\"\n style=\"--cinder-accordion-item-trigger-padding-block: var(--cinder-space-2); --cinder-accordion-item-trigger-padding-inline: var(--cinder-space-3); --cinder-accordion-item-trigger-gap: var(--cinder-space-2); --cinder-accordion-item-trigger-font-size: var(--cinder-text-sm); --cinder-accordion-item-panel-inner-padding-block-start: var(--cinder-space-2); --cinder-accordion-item-panel-inner-padding-block-end: var(--cinder-space-3); --cinder-accordion-item-panel-inner-padding-inline: var(--cinder-space-3); --cinder-accordion-item-panel-font-size: var(--cinder-text-sm);\"\n >\n Current workflow edge, matched transition, and queued activity identifiers.\n </Accordion.Item>\n <Accordion.Item\n id=\"metadata\"\n title=\"Metadata\"\n style=\"--cinder-accordion-item-trigger-padding-block: var(--cinder-space-2); --cinder-accordion-item-trigger-padding-inline: var(--cinder-space-3); --cinder-accordion-item-trigger-gap: var(--cinder-space-2); --cinder-accordion-item-trigger-font-size: var(--cinder-text-sm); --cinder-accordion-item-panel-inner-padding-block-start: var(--cinder-space-2); --cinder-accordion-item-panel-inner-padding-block-end: var(--cinder-space-3); --cinder-accordion-item-panel-inner-padding-inline: var(--cinder-space-3); --cinder-accordion-item-panel-font-size: var(--cinder-text-sm);\"\n >\n Retry policy, namespace, task queue, and worker lease timing.\n </Accordion.Item>\n <Accordion.Item\n id=\"payload\"\n title=\"Payload\"\n style=\"--cinder-accordion-item-trigger-padding-block: var(--cinder-space-2); --cinder-accordion-item-trigger-padding-inline: var(--cinder-space-3); --cinder-accordion-item-trigger-gap: var(--cinder-space-2); --cinder-accordion-item-trigger-font-size: var(--cinder-text-sm); --cinder-accordion-item-panel-inner-padding-block-start: var(--cinder-space-2); --cinder-accordion-item-panel-inner-padding-block-end: var(--cinder-space-3); --cinder-accordion-item-panel-inner-padding-inline: var(--cinder-space-3); --cinder-accordion-item-panel-font-size: var(--cinder-text-sm);\"\n >\n Normalized event fields and source artifact references.\n </Accordion.Item>\n </Accordion>\n</div>\n"
|
|
18
|
+
},
|
|
13
19
|
{
|
|
14
20
|
"id": "disabled",
|
|
15
21
|
"title": "Disabled item",
|
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
* ======================================== */
|
|
6
6
|
|
|
7
7
|
.cinder-accordion-item {
|
|
8
|
+
--cinder-accordion-item-trigger-gap: var(--cinder-space-4);
|
|
9
|
+
--cinder-accordion-item-trigger-padding-block: var(--cinder-space-4);
|
|
10
|
+
--cinder-accordion-item-trigger-padding-inline: var(--cinder-space-5);
|
|
11
|
+
--cinder-accordion-item-trigger-font-size: var(--cinder-text-base);
|
|
12
|
+
--cinder-accordion-item-trigger-font-weight: var(--cinder-font-medium);
|
|
13
|
+
--cinder-accordion-item-panel-inner-padding-block-start: var(--cinder-space-4);
|
|
14
|
+
--cinder-accordion-item-panel-inner-padding-block-end: var(--cinder-space-5);
|
|
15
|
+
--cinder-accordion-item-panel-inner-padding-inline: var(--cinder-space-5);
|
|
16
|
+
--cinder-accordion-item-panel-font-size: var(--cinder-text-base);
|
|
17
|
+
--cinder-accordion-item-panel-line-height: var(--cinder-leading-normal);
|
|
8
18
|
border-block-end: 1px solid var(--cinder-border);
|
|
9
19
|
}
|
|
10
20
|
|
|
@@ -31,12 +41,13 @@
|
|
|
31
41
|
display: flex;
|
|
32
42
|
align-items: center;
|
|
33
43
|
justify-content: space-between;
|
|
34
|
-
gap: var(--cinder-space-4);
|
|
44
|
+
gap: var(--cinder-accordion-item-trigger-gap, var(--cinder-space-4));
|
|
35
45
|
width: 100%;
|
|
36
|
-
padding: var(--cinder-
|
|
46
|
+
padding: var(--cinder-accordion-item-trigger-padding-block, var(--cinder-space-4))
|
|
47
|
+
var(--cinder-accordion-item-trigger-padding-inline, var(--cinder-space-5));
|
|
37
48
|
|
|
38
|
-
font-size: var(--cinder-text-base);
|
|
39
|
-
font-weight: var(--cinder-font-medium);
|
|
49
|
+
font-size: var(--cinder-accordion-item-trigger-font-size, var(--cinder-text-base));
|
|
50
|
+
font-weight: var(--cinder-accordion-item-trigger-font-weight, var(--cinder-font-medium));
|
|
40
51
|
line-height: var(--cinder-leading-snug);
|
|
41
52
|
color: var(--cinder-text);
|
|
42
53
|
text-align: start;
|
|
@@ -146,9 +157,11 @@
|
|
|
146
157
|
}
|
|
147
158
|
|
|
148
159
|
.cinder-accordion-item__panel-inner {
|
|
149
|
-
padding: var(--cinder-
|
|
150
|
-
|
|
151
|
-
|
|
160
|
+
padding: var(--cinder-accordion-item-panel-inner-padding-block-start, var(--cinder-space-4))
|
|
161
|
+
var(--cinder-accordion-item-panel-inner-padding-inline, var(--cinder-space-5))
|
|
162
|
+
var(--cinder-accordion-item-panel-inner-padding-block-end, var(--cinder-space-5));
|
|
163
|
+
font-size: var(--cinder-accordion-item-panel-font-size, var(--cinder-text-base));
|
|
164
|
+
line-height: var(--cinder-accordion-item-panel-line-height, var(--cinder-leading-normal));
|
|
152
165
|
color: var(--cinder-text-muted);
|
|
153
166
|
}
|
|
154
167
|
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"class": {
|
|
19
19
|
"type": "string",
|
|
20
20
|
"description": "Additional CSS class merged with `.cinder-accordion-item`."
|
|
21
|
+
},
|
|
22
|
+
"style": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Inline style string applied to the `.cinder-accordion-item` root."
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"additionalProperties": false,
|
|
@@ -21,6 +21,10 @@ const schema = {
|
|
|
21
21
|
type: 'string',
|
|
22
22
|
description: 'Additional CSS class merged with `.cinder-accordion-item`.',
|
|
23
23
|
},
|
|
24
|
+
style: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Inline style string applied to the `.cinder-accordion-item` root.',
|
|
27
|
+
},
|
|
24
28
|
},
|
|
25
29
|
additionalProperties: false,
|
|
26
30
|
required: ['id', 'title'],
|
|
@@ -5,11 +5,12 @@ export {};
|
|
|
5
5
|
<script lang="ts">
|
|
6
6
|
import { getAccordionContext } from '../accordion/accordion.context.ts';
|
|
7
7
|
import { classNames } from '../../utilities/class-names.ts';
|
|
8
|
-
let { id, title, disabled = false, class: className, children } = $props();
|
|
8
|
+
let { id, title, disabled = false, class: className, style, children, } = $props();
|
|
9
9
|
const context = getAccordionContext();
|
|
10
|
+
const instanceId = $props.id();
|
|
10
11
|
const isExpanded = $derived(context.expandedIds.includes(id));
|
|
11
|
-
const headerId = $derived(`${
|
|
12
|
-
const panelId = $derived(`${
|
|
12
|
+
const headerId = $derived(`${instanceId}-header`);
|
|
13
|
+
const panelId = $derived(`${instanceId}-panel`);
|
|
13
14
|
function handleClick() {
|
|
14
15
|
if (disabled)
|
|
15
16
|
return;
|
|
@@ -19,6 +20,7 @@ function handleClick() {
|
|
|
19
20
|
|
|
20
21
|
<div
|
|
21
22
|
class={classNames('cinder-accordion-item', className)}
|
|
23
|
+
{style}
|
|
22
24
|
data-cinder-expanded={isExpanded ? '' : undefined}
|
|
23
25
|
data-cinder-disabled={disabled ? '' : undefined}
|
|
24
26
|
>
|
|
@@ -50,11 +52,11 @@ function handleClick() {
|
|
|
50
52
|
</button>
|
|
51
53
|
</h3>
|
|
52
54
|
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
+
<div id={panelId} class="cinder-accordion-item__panel" hidden={!isExpanded}>
|
|
56
|
+
{#if isExpanded}
|
|
55
57
|
<div class="cinder-accordion-item__panel-inner">
|
|
56
58
|
{@render children()}
|
|
57
59
|
</div>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
{/if}
|
|
61
|
+
</div>
|
|
60
62
|
</div>
|
|
@@ -13,6 +13,8 @@ export type AccordionItemProps = {
|
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
/** Additional CSS class merged with `.cinder-accordion-item`. */
|
|
15
15
|
class?: string;
|
|
16
|
+
/** Inline style string applied to the `.cinder-accordion-item` root. */
|
|
17
|
+
style?: string;
|
|
16
18
|
/** Panel content rendered when the item is expanded. */
|
|
17
19
|
children: Snippet;
|
|
18
20
|
};
|
|
@@ -30,4 +32,6 @@ export interface AccordionItemSchemaProps {
|
|
|
30
32
|
disabled?: boolean;
|
|
31
33
|
/** Additional CSS class merged with `.cinder-accordion-item`. */
|
|
32
34
|
class?: string;
|
|
35
|
+
/** Inline style string applied to the `.cinder-accordion-item` root. */
|
|
36
|
+
style?: string;
|
|
33
37
|
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
[
|
|
1
|
+
[
|
|
2
|
+
"--cinder-accordion-item-panel-font-size",
|
|
3
|
+
"--cinder-accordion-item-panel-inner-padding-block-end",
|
|
4
|
+
"--cinder-accordion-item-panel-inner-padding-block-start",
|
|
5
|
+
"--cinder-accordion-item-panel-inner-padding-inline",
|
|
6
|
+
"--cinder-accordion-item-panel-line-height",
|
|
7
|
+
"--cinder-accordion-item-trigger-font-size",
|
|
8
|
+
"--cinder-accordion-item-trigger-font-weight",
|
|
9
|
+
"--cinder-accordion-item-trigger-gap",
|
|
10
|
+
"--cinder-accordion-item-trigger-padding-block",
|
|
11
|
+
"--cinder-accordion-item-trigger-padding-inline"
|
|
12
|
+
]
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
const variables: readonly string[] = [
|
|
1
|
+
const variables: readonly string[] = [
|
|
2
|
+
'--cinder-accordion-item-panel-font-size',
|
|
3
|
+
'--cinder-accordion-item-panel-inner-padding-block-end',
|
|
4
|
+
'--cinder-accordion-item-panel-inner-padding-block-start',
|
|
5
|
+
'--cinder-accordion-item-panel-inner-padding-inline',
|
|
6
|
+
'--cinder-accordion-item-panel-line-height',
|
|
7
|
+
'--cinder-accordion-item-trigger-font-size',
|
|
8
|
+
'--cinder-accordion-item-trigger-font-weight',
|
|
9
|
+
'--cinder-accordion-item-trigger-gap',
|
|
10
|
+
'--cinder-accordion-item-trigger-padding-block',
|
|
11
|
+
'--cinder-accordion-item-trigger-padding-inline',
|
|
12
|
+
];
|
|
2
13
|
|
|
3
14
|
export default variables;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
|
|
2
2
|
@layer cinder.components {
|
|
3
3
|
.cinder-action-row {
|
|
4
|
+
--cinder-action-row-padding-block: var(--cinder-space-3);
|
|
5
|
+
--cinder-action-row-padding-inline: var(--cinder-space-4);
|
|
6
|
+
--cinder-action-row-layout-column-gap: var(--cinder-space-3);
|
|
7
|
+
--cinder-action-row-layout-row-gap: var(--cinder-space-2);
|
|
8
|
+
--cinder-action-row-body-gap: var(--cinder-space-1);
|
|
9
|
+
--cinder-action-row-title-font-size: var(--cinder-text-sm);
|
|
10
|
+
--cinder-action-row-description-font-size: var(--cinder-text-sm);
|
|
11
|
+
--cinder-action-row-meta-font-size: var(--cinder-text-xs);
|
|
12
|
+
--cinder-action-row-trailing-gap: var(--cinder-space-2);
|
|
4
13
|
display: block;
|
|
5
14
|
inline-size: 100%;
|
|
6
|
-
padding: var(--cinder-
|
|
15
|
+
padding: var(--cinder-action-row-padding-block, var(--cinder-space-3))
|
|
16
|
+
var(--cinder-action-row-padding-inline, var(--cinder-space-4));
|
|
7
17
|
border: 0;
|
|
8
18
|
border-radius: var(--cinder-radius-md);
|
|
9
19
|
background: transparent;
|
|
@@ -14,7 +24,8 @@
|
|
|
14
24
|
}
|
|
15
25
|
|
|
16
26
|
.cinder-action-row[data-cinder-density='condensed'] {
|
|
17
|
-
|
|
27
|
+
--cinder-action-row-padding-block: var(--cinder-space-2);
|
|
28
|
+
--cinder-action-row-padding-inline: var(--cinder-space-3);
|
|
18
29
|
}
|
|
19
30
|
|
|
20
31
|
@media (hover: hover) {
|
|
@@ -67,8 +78,8 @@
|
|
|
67
78
|
.cinder-action-row__layout {
|
|
68
79
|
display: grid;
|
|
69
80
|
align-items: center;
|
|
70
|
-
column-gap: var(--cinder-space-3);
|
|
71
|
-
row-gap: var(--cinder-space-2);
|
|
81
|
+
column-gap: var(--cinder-action-row-layout-column-gap, var(--cinder-space-3));
|
|
82
|
+
row-gap: var(--cinder-action-row-layout-row-gap, var(--cinder-space-2));
|
|
72
83
|
grid-template-columns: 1fr;
|
|
73
84
|
grid-template-areas: 'body';
|
|
74
85
|
}
|
|
@@ -99,34 +110,34 @@
|
|
|
99
110
|
display: flex;
|
|
100
111
|
min-inline-size: 0;
|
|
101
112
|
flex-direction: column;
|
|
102
|
-
gap: var(--cinder-space-1);
|
|
113
|
+
gap: var(--cinder-action-row-body-gap, var(--cinder-space-1));
|
|
103
114
|
}
|
|
104
115
|
|
|
105
116
|
.cinder-action-row__trailing {
|
|
106
117
|
grid-area: trailing;
|
|
107
118
|
display: inline-flex;
|
|
108
119
|
align-items: center;
|
|
109
|
-
gap: var(--cinder-space-2);
|
|
120
|
+
gap: var(--cinder-action-row-trailing-gap, var(--cinder-space-2));
|
|
110
121
|
color: var(--cinder-text-muted);
|
|
111
122
|
}
|
|
112
123
|
|
|
113
124
|
.cinder-action-row__title {
|
|
114
125
|
color: inherit;
|
|
115
|
-
font-size: var(--cinder-text-sm);
|
|
126
|
+
font-size: var(--cinder-action-row-title-font-size, var(--cinder-text-sm));
|
|
116
127
|
line-height: var(--cinder-leading-snug);
|
|
117
128
|
overflow-wrap: anywhere;
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
.cinder-action-row__description {
|
|
121
132
|
color: var(--cinder-text-muted);
|
|
122
|
-
font-size: var(--cinder-text-sm);
|
|
133
|
+
font-size: var(--cinder-action-row-description-font-size, var(--cinder-text-sm));
|
|
123
134
|
line-height: var(--cinder-leading-snug);
|
|
124
135
|
overflow-wrap: anywhere;
|
|
125
136
|
}
|
|
126
137
|
|
|
127
138
|
.cinder-action-row__meta {
|
|
128
139
|
color: var(--cinder-text-muted);
|
|
129
|
-
font-size: var(--cinder-text-xs);
|
|
140
|
+
font-size: var(--cinder-action-row-meta-font-size, var(--cinder-text-xs));
|
|
130
141
|
line-height: var(--cinder-leading-snug);
|
|
131
142
|
overflow-wrap: anywhere;
|
|
132
143
|
}
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"description": "Rows with button semantics for master-detail lists and timeline selections.",
|
|
10
10
|
"code": "<script lang=\"ts\">\n import ActionRow from '@lostgradient/cinder/action-row';\n\n let selectedRun = $state('run-2');\n\n const runs = [\n { id: 'run-1', title: 'Morning sync', status: 'Queued', time: '09:00' },\n { id: 'run-2', title: 'Webhook replay', status: 'Running', time: '09:12' },\n { id: 'run-3', title: 'Cleanup sweep', status: 'Finished', time: '09:18' },\n ];\n</script>\n\n<div style=\"display: grid; gap: var(--cinder-space-1); max-inline-size: 28rem;\">\n {#each runs as run (run.id)}\n <ActionRow\n selected={selectedRun === run.id}\n onclick={() => {\n selectedRun = run.id;\n }}\n >\n {#snippet title()}{run.title}{/snippet}\n {#snippet description()}{run.status}{/snippet}\n {#snippet meta()}Run {run.id}{/snippet}\n {#snippet trailing()}{run.time}{/snippet}\n </ActionRow>\n {/each}\n</div>\n"
|
|
11
11
|
},
|
|
12
|
+
{
|
|
13
|
+
"id": "dense-timeline",
|
|
14
|
+
"title": "Dense timeline rows",
|
|
15
|
+
"description": "Timeline rows can tune row padding, layout gap, and description/meta type through public CSS variables.",
|
|
16
|
+
"code": "<script lang=\"ts\">\n import ActionRow from '@lostgradient/cinder/action-row';\n\n let selectedEvent = $state('event-2');\n\n const events = [\n {\n id: 'event-1',\n title: 'Webhook received',\n description: 'Payload validated against the trigger schema',\n meta: 'Queued',\n time: '09:14:02',\n },\n {\n id: 'event-2',\n title: 'Workflow matched',\n description: 'Selected branch accepted the event filters',\n meta: 'Current',\n time: '09:14:04',\n },\n {\n id: 'event-3',\n title: 'Activity scheduled',\n description: 'Worker lease created for the next attempt',\n meta: 'Pending',\n time: '09:14:05',\n },\n ];\n</script>\n\n<div style=\"display: grid; gap: var(--cinder-space-1); max-inline-size: 32rem;\">\n {#each events as event (event.id)}\n <ActionRow\n density=\"condensed\"\n style=\"--cinder-action-row-padding-block: var(--cinder-space-1); --cinder-action-row-padding-inline: var(--cinder-space-2); --cinder-action-row-layout-column-gap: var(--cinder-space-2); --cinder-action-row-body-gap: 0; --cinder-action-row-description-font-size: var(--cinder-text-xs); --cinder-action-row-meta-font-size: var(--cinder-text-xs);\"\n selected={selectedEvent === event.id}\n selectedState=\"current\"\n currentValue=\"step\"\n onclick={() => {\n selectedEvent = event.id;\n }}\n >\n {#snippet title()}{event.title}{/snippet}\n {#snippet description()}{event.description}{/snippet}\n {#snippet meta()}{event.meta}{/snippet}\n {#snippet trailing()}{event.time}{/snippet}\n </ActionRow>\n {/each}\n</div>\n"
|
|
17
|
+
},
|
|
12
18
|
{
|
|
13
19
|
"id": "timeline-edge",
|
|
14
20
|
"title": "Timeline edge rows",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"class": {
|
|
31
31
|
"type": "string",
|
|
32
32
|
"description": "Additional classes merged with `.cinder-action-row`."
|
|
33
|
+
},
|
|
34
|
+
"style": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Inline style string applied to the `.cinder-action-row` root."
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"additionalProperties": false,
|
|
@@ -35,6 +35,10 @@ const schema = {
|
|
|
35
35
|
type: 'string',
|
|
36
36
|
description: 'Additional classes merged with `.cinder-action-row`.',
|
|
37
37
|
},
|
|
38
|
+
style: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Inline style string applied to the `.cinder-action-row` root.',
|
|
41
|
+
},
|
|
38
42
|
},
|
|
39
43
|
additionalProperties: false,
|
|
40
44
|
metadata: {
|
|
@@ -48,3 +48,47 @@ export type ActionRowProps = Omit<
|
|
|
48
48
|
/** Additional classes merged with `.cinder-action-row`. */
|
|
49
49
|
class?: string;
|
|
50
50
|
};
|
|
51
|
+
|
|
52
|
+
/** Schema generator surface for ActionRow — excludes native button attributes except supported styling hooks. */
|
|
53
|
+
export interface ActionRowSchemaProps {
|
|
54
|
+
/**
|
|
55
|
+
* Density token surfaced as `data-cinder-density`.
|
|
56
|
+
* @default "comfortable"
|
|
57
|
+
*/
|
|
58
|
+
density?: ActionRowDensity;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the row is currently selected.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
selected?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Accessible state mapping for selected rows.
|
|
66
|
+
* Use `pressed` for in-page selectable rows and `current` for navigation/current-item rows.
|
|
67
|
+
* @default "pressed"
|
|
68
|
+
*/
|
|
69
|
+
selectedState?: ActionRowSelectedState;
|
|
70
|
+
/**
|
|
71
|
+
* `aria-current` value used when `selectedState="current"` and `selected` is true.
|
|
72
|
+
* @default "true"
|
|
73
|
+
*/
|
|
74
|
+
currentValue?: ActionRowCurrentValue;
|
|
75
|
+
/**
|
|
76
|
+
* Native button type.
|
|
77
|
+
* @default "button"
|
|
78
|
+
*/
|
|
79
|
+
type?: 'button' | 'submit' | 'reset';
|
|
80
|
+
/** Leading visual such as an icon, avatar, marker, or status dot. */
|
|
81
|
+
leading?: Snippet;
|
|
82
|
+
/** Primary row label. Required so the row has visible text and an accessible name. */
|
|
83
|
+
title: Snippet;
|
|
84
|
+
/** Secondary description below the title. */
|
|
85
|
+
description?: Snippet;
|
|
86
|
+
/** Tertiary metadata such as timestamp, status text, or a compact badge. */
|
|
87
|
+
meta?: Snippet;
|
|
88
|
+
/** Trailing region such as a timestamp, count, badge, chevron, or shortcut hint. */
|
|
89
|
+
trailing?: Snippet;
|
|
90
|
+
/** Additional classes merged with `.cinder-action-row`. */
|
|
91
|
+
class?: string;
|
|
92
|
+
/** Inline style string applied to the `.cinder-action-row` root. */
|
|
93
|
+
style?: string;
|
|
94
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
[
|
|
1
|
+
[
|
|
2
|
+
"--cinder-action-row-body-gap",
|
|
3
|
+
"--cinder-action-row-description-font-size",
|
|
4
|
+
"--cinder-action-row-layout-column-gap",
|
|
5
|
+
"--cinder-action-row-layout-row-gap",
|
|
6
|
+
"--cinder-action-row-meta-font-size",
|
|
7
|
+
"--cinder-action-row-padding-block",
|
|
8
|
+
"--cinder-action-row-padding-inline",
|
|
9
|
+
"--cinder-action-row-title-font-size",
|
|
10
|
+
"--cinder-action-row-trailing-gap"
|
|
11
|
+
]
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
const variables: readonly string[] = [
|
|
1
|
+
const variables: readonly string[] = [
|
|
2
|
+
'--cinder-action-row-body-gap',
|
|
3
|
+
'--cinder-action-row-description-font-size',
|
|
4
|
+
'--cinder-action-row-layout-column-gap',
|
|
5
|
+
'--cinder-action-row-layout-row-gap',
|
|
6
|
+
'--cinder-action-row-meta-font-size',
|
|
7
|
+
'--cinder-action-row-padding-block',
|
|
8
|
+
'--cinder-action-row-padding-inline',
|
|
9
|
+
'--cinder-action-row-title-font-size',
|
|
10
|
+
'--cinder-action-row-trailing-gap',
|
|
11
|
+
];
|
|
2
12
|
|
|
3
13
|
export default variables;
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
"description": "Compare comfortable vs compact density and bubble vs flat visual variant on the same conversationalist-shaped transcript.",
|
|
16
16
|
"code": "<script lang=\"ts\">\n import {\n Chat,\n appendAssistantMessage,\n appendUserMessage,\n createConversation,\n } from '@lostgradient/cinder/chat';\n import { Select } from '@lostgradient/cinder/select';\n\n // Build a shared Conversationalist transcript.\n const baseConversation = appendAssistantMessage(\n appendUserMessage(\n appendAssistantMessage(\n appendUserMessage(\n createConversation({ id: 'density-variant-chat' }),\n 'What are the density and variant props for?',\n ),\n 'The `density` prop controls spacing — `comfortable` uses standard padding and gap, `compact` tightens them for data-dense contexts like embedded side panels.\\n\\nThe `variant` prop controls visual treatment — `bubble` uses colored backgrounds to differentiate roles; `flat` removes backgrounds and relies on alignment and the role label instead.',\n ),\n 'Does compact affect the action buttons?',\n ),\n 'No — action buttons keep `min-height: var(--cinder-touch-target-min)` regardless of density. Only padding and gap change.',\n );\n\n type Density = 'comfortable' | 'compact';\n type Variant = 'bubble' | 'flat';\n\n const densityOptions = [\n { value: 'comfortable', label: 'comfortable' },\n { value: 'compact', label: 'compact' },\n ] satisfies { value: Density; label: string }[];\n\n const variantOptions = [\n { value: 'bubble', label: 'bubble' },\n { value: 'flat', label: 'flat' },\n ] satisfies { value: Variant; label: string }[];\n\n let density = $state<Density>('comfortable');\n let variant = $state<Variant>('bubble');\n</script>\n\n<div style=\"display: grid; gap: 1rem;\">\n <div style=\"display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap;\">\n <Select id=\"density-select\" bind:value={density} options={densityOptions} label=\"Density\" />\n <Select id=\"variant-select\" bind:value={variant} options={variantOptions} label=\"Variant\" />\n </div>\n\n <div style=\"height: 28rem;\">\n <Chat\n id=\"density-variant\"\n conversation={baseConversation}\n {density}\n {variant}\n capabilities={{ attachments: false }}\n />\n </div>\n</div>\n"
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"id": "full-height-layout",
|
|
20
|
+
"title": "Full-height layout",
|
|
21
|
+
"description": "Place Chat in a definite-height flex or grid cell with min-height: 0 so the transcript owns the scroll region.",
|
|
22
|
+
"code": "<script lang=\"ts\">\n import {\n Chat,\n appendAssistantMessage,\n appendUserMessage,\n createConversation,\n } from '@lostgradient/cinder/chat';\n\n const conversation = appendAssistantMessage(\n appendUserMessage(\n createConversation({ id: 'full-height-layout-chat' }),\n 'Why does the wrapper need min-height: 0?',\n ),\n 'Chat fills its parent. In a flex or grid app shell, the cell that contains Chat needs a definite height and min-height: 0 so the transcript can scroll internally instead of forcing the page taller.',\n );\n</script>\n\n<div\n style=\"display: flex; flex-direction: column; height: 100dvh; max-height: 36rem; border: 1px solid var(--cinder-border-muted);\"\n>\n <header style=\"padding: 0.75rem; border-block-end: 1px solid var(--cinder-border-muted);\">\n Support thread\n </header>\n <div style=\"flex: 1; min-height: 0;\">\n <Chat\n id=\"playground-full-height-layout-chat\"\n {conversation}\n capabilities={{ attachments: false }}\n />\n </div>\n</div>\n"
|
|
23
|
+
},
|
|
18
24
|
{
|
|
19
25
|
"id": "interactive-harness",
|
|
20
26
|
"title": "Interactive harness",
|
|
@@ -10,6 +10,22 @@
|
|
|
10
10
|
"type": "boolean",
|
|
11
11
|
"description": "Disable just this segment (independent of the control-level `disabled`)."
|
|
12
12
|
},
|
|
13
|
+
"href": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Render this segment as a real link inside `SegmentedControl variant=\"navigation\"`."
|
|
16
|
+
},
|
|
17
|
+
"current": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "Marks this linked segment as the current route/filter."
|
|
20
|
+
},
|
|
21
|
+
"currentToken": {
|
|
22
|
+
"enum": ["page", "step", "location", "date", "time", "true"],
|
|
23
|
+
"description": "`aria-current` token emitted while `current` is true. Defaults to `\"page\"`."
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Value this segment represents. Required when `href` is not provided."
|
|
28
|
+
},
|
|
13
29
|
"controls": {
|
|
14
30
|
"type": "string",
|
|
15
31
|
"description": "ID of the panel this segment controls — only meaningful when the parent\n`SegmentedControl` uses `variant=\"tablist\"`."
|
|
@@ -30,16 +46,27 @@
|
|
|
30
46
|
"description": "Optional decorative content rendered before the label, inside `aria-hidden`."
|
|
31
47
|
},
|
|
32
48
|
{
|
|
33
|
-
"name": "
|
|
49
|
+
"name": "onclick",
|
|
34
50
|
"reason": "function-or-snippet",
|
|
35
|
-
"description": "Optional
|
|
51
|
+
"description": "Optional click handler for the rendered link. Disabled navigation segments\nprevent default and do not call this handler."
|
|
36
52
|
},
|
|
37
53
|
{
|
|
38
|
-
"name": "
|
|
39
|
-
"reason": "
|
|
40
|
-
"
|
|
41
|
-
"description": "Value this segment represents. Must be unique within the parent control."
|
|
54
|
+
"name": "trailing",
|
|
55
|
+
"reason": "function-or-snippet",
|
|
56
|
+
"description": "Optional decorative content rendered after the label, inside `aria-hidden`."
|
|
42
57
|
}
|
|
43
58
|
]
|
|
44
|
-
}
|
|
59
|
+
},
|
|
60
|
+
"allOf": [
|
|
61
|
+
{
|
|
62
|
+
"if": {
|
|
63
|
+
"not": {
|
|
64
|
+
"required": ["href"]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"then": {
|
|
68
|
+
"required": ["value"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
45
72
|
}
|