@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @lostgradient/cinder
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#740](https://github.com/stevekinney/cinder/pull/740) [`ddefe5c`](https://github.com/stevekinney/cinder/commit/ddefe5c7fb2beff3b2593ea1179cc1bb6ed56bae) Thanks [@stevekinney](https://github.com/stevekinney)! - Add link-backed SegmentedControl navigation options for route filters.
|
|
8
|
+
|
|
9
|
+
## 0.12.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#737](https://github.com/stevekinney/cinder/pull/737) [`3600db8`](https://github.com/stevekinney/cinder/commit/3600db878c53ae5d7048487207b08a60d5421b22) Thanks [@stevekinney](https://github.com/stevekinney)! - Publish the post-0.12 downstream fixes for Chat full-height layout metadata and dense inspector styling hooks.
|
|
14
|
+
|
|
3
15
|
## 0.12.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/components.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifestVersion": 1,
|
|
4
4
|
"package": {
|
|
5
5
|
"name": "@lostgradient/cinder",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.13.0",
|
|
7
7
|
"framework": "svelte",
|
|
8
8
|
"frameworkVersionRange": ">=5.56.0 <6",
|
|
9
9
|
"classPrefix": "cinder-",
|
|
@@ -924,7 +924,8 @@
|
|
|
924
924
|
"tags": ["chat", "conversation", "domain-suite"],
|
|
925
925
|
"useWhen": [
|
|
926
926
|
"Shipping a full chat surface with composer, scroll-anchor, unread indicator, and attachments bundled as one heavyweight drop-in.",
|
|
927
|
-
"Building an AI assistant or support thread where conversation state is modeled as a transcript of role-tagged messages."
|
|
927
|
+
"Building an AI assistant or support thread where conversation state is modeled as a transcript of role-tagged messages.",
|
|
928
|
+
"Embedding Chat in a definite-height flex or grid region where its internal transcript should own scrolling."
|
|
928
929
|
],
|
|
929
930
|
"avoidWhen": [
|
|
930
931
|
{
|
|
@@ -4376,11 +4377,12 @@
|
|
|
4376
4377
|
"exportName": "Segment",
|
|
4377
4378
|
"category": "form",
|
|
4378
4379
|
"status": "stable",
|
|
4379
|
-
"purpose": "Individual option inside a SegmentedControl that renders
|
|
4380
|
+
"purpose": "Individual option inside a SegmentedControl that renders either a selection button or a route-backed link with shared segmented styling.",
|
|
4380
4381
|
"tags": ["form", "selection"],
|
|
4381
4382
|
"useWhen": [
|
|
4382
4383
|
"Authoring SegmentedControl children declaratively so consumers can compose icons, labels, and badges per segment.",
|
|
4383
|
-
"Mixing disabled and enabled segments inside a single radiogroup/tablist where each segment carries its own metadata."
|
|
4384
|
+
"Mixing disabled and enabled segments inside a single radiogroup/tablist where each segment carries its own metadata.",
|
|
4385
|
+
"Rendering route filters as real links inside `SegmentedControl variant=\"navigation\"`."
|
|
4384
4386
|
],
|
|
4385
4387
|
"avoidWhen": [
|
|
4386
4388
|
{
|
|
@@ -4405,11 +4407,12 @@
|
|
|
4405
4407
|
"exportName": "SegmentedControl",
|
|
4406
4408
|
"category": "form",
|
|
4407
4409
|
"status": "stable",
|
|
4408
|
-
"purpose": "Compact
|
|
4410
|
+
"purpose": "Compact segmented selector that surfaces a small fixed set of options as a connected bar, including bindable selections and route-backed links.",
|
|
4409
4411
|
"tags": ["form", "selection"],
|
|
4410
4412
|
"useWhen": [
|
|
4411
4413
|
"Choosing one of two to five mutually exclusive options that all fit on screen at once.",
|
|
4412
|
-
"Picking a view filter where seeing every option beats hiding them inside a toggle or tabs control."
|
|
4414
|
+
"Picking a view filter where seeing every option beats hiding them inside a toggle or tabs control.",
|
|
4415
|
+
"Rendering route-backed filters as real links with `variant=\"navigation\"` and `Segment href`."
|
|
4413
4416
|
],
|
|
4414
4417
|
"avoidWhen": [
|
|
4415
4418
|
{
|
|
@@ -83,15 +83,16 @@ function classNames(...parts) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// src/components/accordion-item/accordion-item.svelte
|
|
86
|
-
var root = $.from_html(`<div class="cinder-accordion-item__panel
|
|
87
|
-
var root_1 = $.from_html(`<div><h3 class="cinder-accordion-item__heading"><button type="button" class="cinder-accordion-item__trigger"><span class="cinder-accordion-item__title"> </span> <svg class="cinder-accordion-item__chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06z" clip-rule="evenodd"></path></svg></button></h3>
|
|
86
|
+
var root = $.from_html(`<div class="cinder-accordion-item__panel-inner"><!></div>`);
|
|
87
|
+
var root_1 = $.from_html(`<div><h3 class="cinder-accordion-item__heading"><button type="button" class="cinder-accordion-item__trigger"><span class="cinder-accordion-item__title"> </span> <svg class="cinder-accordion-item__chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06z" clip-rule="evenodd"></path></svg></button></h3> <div class="cinder-accordion-item__panel"><!></div></div>`);
|
|
88
88
|
function Accordion_item($$anchor, $$props) {
|
|
89
|
+
const instanceId = $.props_id();
|
|
89
90
|
$.push($$props, true);
|
|
90
91
|
let disabled = $.prop($$props, "disabled", 3, false);
|
|
91
92
|
const context = getAccordionContext();
|
|
92
93
|
const isExpanded = $.derived(() => context.expandedIds.includes($$props.id));
|
|
93
|
-
const headerId = $.derived(() => `${
|
|
94
|
-
const panelId = $.derived(() => `${
|
|
94
|
+
const headerId = $.derived(() => `${instanceId}-header`);
|
|
95
|
+
const panelId = $.derived(() => `${instanceId}-panel`);
|
|
95
96
|
function handleClick() {
|
|
96
97
|
if (disabled())
|
|
97
98
|
return;
|
|
@@ -106,26 +107,26 @@ function Accordion_item($$anchor, $$props) {
|
|
|
106
107
|
$.next(2);
|
|
107
108
|
$.reset(button);
|
|
108
109
|
$.reset(h3);
|
|
109
|
-
var
|
|
110
|
+
var div_1 = $.sibling(h3, 2);
|
|
111
|
+
var node = $.child(div_1);
|
|
110
112
|
{
|
|
111
113
|
var consequent = ($$anchor2) => {
|
|
112
|
-
var
|
|
113
|
-
var div_2 = $.child(div_1);
|
|
114
|
+
var div_2 = root();
|
|
114
115
|
var node_1 = $.child(div_2);
|
|
115
116
|
$.snippet(node_1, () => $$props.children);
|
|
116
117
|
$.reset(div_2);
|
|
117
|
-
$.
|
|
118
|
-
$.template_effect(() => $.set_attribute(div_1, "id", $.get(panelId)));
|
|
119
|
-
$.append($$anchor2, div_1);
|
|
118
|
+
$.append($$anchor2, div_2);
|
|
120
119
|
};
|
|
121
120
|
$.if(node, ($$render) => {
|
|
122
121
|
if ($.get(isExpanded))
|
|
123
122
|
$$render(consequent);
|
|
124
123
|
});
|
|
125
124
|
}
|
|
125
|
+
$.reset(div_1);
|
|
126
126
|
$.reset(div);
|
|
127
127
|
$.template_effect(($0) => {
|
|
128
128
|
$.set_class(div, 1, $0);
|
|
129
|
+
$.set_style(div, $$props.style);
|
|
129
130
|
$.set_attribute(div, "data-cinder-expanded", $.get(isExpanded) ? "" : undefined);
|
|
130
131
|
$.set_attribute(div, "data-cinder-disabled", disabled() ? "" : undefined);
|
|
131
132
|
$.set_attribute(button, "id", $.get(headerId));
|
|
@@ -133,6 +134,8 @@ function Accordion_item($$anchor, $$props) {
|
|
|
133
134
|
$.set_attribute(button, "aria-controls", $.get(panelId));
|
|
134
135
|
button.disabled = disabled();
|
|
135
136
|
$.set_text(text, $$props.title);
|
|
137
|
+
$.set_attribute(div_1, "id", $.get(panelId));
|
|
138
|
+
$.set_attribute(div_1, "hidden", !$.get(isExpanded));
|
|
136
139
|
}, [
|
|
137
140
|
() => $.clsx(classNames("cinder-accordion-item", $$props.class))
|
|
138
141
|
]);
|
|
@@ -223,4 +226,4 @@ export {
|
|
|
223
226
|
Accordion2 as Accordion
|
|
224
227
|
};
|
|
225
228
|
|
|
226
|
-
//# debugId=
|
|
229
|
+
//# debugId=86A20AE2C42C2B0D64756E2164756E21
|
|
@@ -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
|
|
|
@@ -72,6 +72,10 @@ var schema = {
|
|
|
72
72
|
class: {
|
|
73
73
|
type: "string",
|
|
74
74
|
description: "Additional CSS class merged with `.cinder-accordion-item`."
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "Inline style string applied to the `.cinder-accordion-item` root."
|
|
75
79
|
}
|
|
76
80
|
},
|
|
77
81
|
additionalProperties: false,
|
|
@@ -92,4 +96,4 @@ export {
|
|
|
92
96
|
accordion_item_schema_default as default
|
|
93
97
|
};
|
|
94
98
|
|
|
95
|
-
//# debugId=
|
|
99
|
+
//# debugId=D45061C2BEE6BE8464756E2164756E21
|
|
@@ -12,6 +12,8 @@ export type AccordionItemProps = {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
/** Additional CSS class merged with `.cinder-accordion-item`. */
|
|
14
14
|
class?: string;
|
|
15
|
+
/** Inline style string applied to the `.cinder-accordion-item` root. */
|
|
16
|
+
style?: string;
|
|
15
17
|
/** Panel content rendered when the item is expanded. */
|
|
16
18
|
children: Snippet;
|
|
17
19
|
};
|
|
@@ -28,4 +30,6 @@ export interface AccordionItemSchemaProps {
|
|
|
28
30
|
disabled?: boolean;
|
|
29
31
|
/** Additional CSS class merged with `.cinder-accordion-item`. */
|
|
30
32
|
class?: string;
|
|
33
|
+
/** Inline style string applied to the `.cinder-accordion-item` root. */
|
|
34
|
+
style?: string;
|
|
31
35
|
}
|
|
@@ -52,10 +52,21 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
// src/components/accordion-item/accordion-item.variables.ts
|
|
55
|
-
var variables = [
|
|
55
|
+
var variables = [
|
|
56
|
+
"--cinder-accordion-item-panel-font-size",
|
|
57
|
+
"--cinder-accordion-item-panel-inner-padding-block-end",
|
|
58
|
+
"--cinder-accordion-item-panel-inner-padding-block-start",
|
|
59
|
+
"--cinder-accordion-item-panel-inner-padding-inline",
|
|
60
|
+
"--cinder-accordion-item-panel-line-height",
|
|
61
|
+
"--cinder-accordion-item-trigger-font-size",
|
|
62
|
+
"--cinder-accordion-item-trigger-font-weight",
|
|
63
|
+
"--cinder-accordion-item-trigger-gap",
|
|
64
|
+
"--cinder-accordion-item-trigger-padding-block",
|
|
65
|
+
"--cinder-accordion-item-trigger-padding-inline"
|
|
66
|
+
];
|
|
56
67
|
var accordion_item_variables_default = variables;
|
|
57
68
|
export {
|
|
58
69
|
accordion_item_variables_default as default
|
|
59
70
|
};
|
|
60
71
|
|
|
61
|
-
//# debugId=
|
|
72
|
+
//# debugId=FE56BCDDC2ED5DB364756E2164756E21
|
|
@@ -83,15 +83,16 @@ function classNames(...parts) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// src/components/accordion-item/accordion-item.svelte
|
|
86
|
-
var root = $.from_html(`<div class="cinder-accordion-item__panel
|
|
87
|
-
var root_1 = $.from_html(`<div><h3 class="cinder-accordion-item__heading"><button type="button" class="cinder-accordion-item__trigger"><span class="cinder-accordion-item__title"> </span> <svg class="cinder-accordion-item__chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06z" clip-rule="evenodd"></path></svg></button></h3>
|
|
86
|
+
var root = $.from_html(`<div class="cinder-accordion-item__panel-inner"><!></div>`);
|
|
87
|
+
var root_1 = $.from_html(`<div><h3 class="cinder-accordion-item__heading"><button type="button" class="cinder-accordion-item__trigger"><span class="cinder-accordion-item__title"> </span> <svg class="cinder-accordion-item__chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06z" clip-rule="evenodd"></path></svg></button></h3> <div class="cinder-accordion-item__panel"><!></div></div>`);
|
|
88
88
|
function Accordion_item($$anchor, $$props) {
|
|
89
|
+
const instanceId = $.props_id();
|
|
89
90
|
$.push($$props, true);
|
|
90
91
|
let disabled = $.prop($$props, "disabled", 3, false);
|
|
91
92
|
const context = getAccordionContext();
|
|
92
93
|
const isExpanded = $.derived(() => context.expandedIds.includes($$props.id));
|
|
93
|
-
const headerId = $.derived(() => `${
|
|
94
|
-
const panelId = $.derived(() => `${
|
|
94
|
+
const headerId = $.derived(() => `${instanceId}-header`);
|
|
95
|
+
const panelId = $.derived(() => `${instanceId}-panel`);
|
|
95
96
|
function handleClick() {
|
|
96
97
|
if (disabled())
|
|
97
98
|
return;
|
|
@@ -106,26 +107,26 @@ function Accordion_item($$anchor, $$props) {
|
|
|
106
107
|
$.next(2);
|
|
107
108
|
$.reset(button);
|
|
108
109
|
$.reset(h3);
|
|
109
|
-
var
|
|
110
|
+
var div_1 = $.sibling(h3, 2);
|
|
111
|
+
var node = $.child(div_1);
|
|
110
112
|
{
|
|
111
113
|
var consequent = ($$anchor2) => {
|
|
112
|
-
var
|
|
113
|
-
var div_2 = $.child(div_1);
|
|
114
|
+
var div_2 = root();
|
|
114
115
|
var node_1 = $.child(div_2);
|
|
115
116
|
$.snippet(node_1, () => $$props.children);
|
|
116
117
|
$.reset(div_2);
|
|
117
|
-
$.
|
|
118
|
-
$.template_effect(() => $.set_attribute(div_1, "id", $.get(panelId)));
|
|
119
|
-
$.append($$anchor2, div_1);
|
|
118
|
+
$.append($$anchor2, div_2);
|
|
120
119
|
};
|
|
121
120
|
$.if(node, ($$render) => {
|
|
122
121
|
if ($.get(isExpanded))
|
|
123
122
|
$$render(consequent);
|
|
124
123
|
});
|
|
125
124
|
}
|
|
125
|
+
$.reset(div_1);
|
|
126
126
|
$.reset(div);
|
|
127
127
|
$.template_effect(($0) => {
|
|
128
128
|
$.set_class(div, 1, $0);
|
|
129
|
+
$.set_style(div, $$props.style);
|
|
129
130
|
$.set_attribute(div, "data-cinder-expanded", $.get(isExpanded) ? "" : undefined);
|
|
130
131
|
$.set_attribute(div, "data-cinder-disabled", disabled() ? "" : undefined);
|
|
131
132
|
$.set_attribute(button, "id", $.get(headerId));
|
|
@@ -133,6 +134,8 @@ function Accordion_item($$anchor, $$props) {
|
|
|
133
134
|
$.set_attribute(button, "aria-controls", $.get(panelId));
|
|
134
135
|
button.disabled = disabled();
|
|
135
136
|
$.set_text(text, $$props.title);
|
|
137
|
+
$.set_attribute(div_1, "id", $.get(panelId));
|
|
138
|
+
$.set_attribute(div_1, "hidden", !$.get(isExpanded));
|
|
136
139
|
}, [
|
|
137
140
|
() => $.clsx(classNames("cinder-accordion-item", $$props.class))
|
|
138
141
|
]);
|
|
@@ -149,4 +152,4 @@ export {
|
|
|
149
152
|
Accordion_item as AccordionItem
|
|
150
153
|
};
|
|
151
154
|
|
|
152
|
-
//# debugId=
|
|
155
|
+
//# debugId=7FB287FC6F3C44AF64756E2164756E21
|
|
@@ -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
|
}
|
|
@@ -84,6 +84,10 @@ var schema = {
|
|
|
84
84
|
class: {
|
|
85
85
|
type: "string",
|
|
86
86
|
description: "Additional classes merged with `.cinder-action-row`."
|
|
87
|
+
},
|
|
88
|
+
style: {
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Inline style string applied to the `.cinder-action-row` root."
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
93
|
additionalProperties: false,
|
|
@@ -123,4 +127,4 @@ export {
|
|
|
123
127
|
action_row_schema_default as default
|
|
124
128
|
};
|
|
125
129
|
|
|
126
|
-
//# debugId=
|
|
130
|
+
//# debugId=FB7AA1AE4716503064756E2164756E21
|
|
@@ -43,3 +43,46 @@ export type ActionRowProps = Omit<HTMLButtonAttributes, 'aria-current' | 'aria-p
|
|
|
43
43
|
/** Additional classes merged with `.cinder-action-row`. */
|
|
44
44
|
class?: string;
|
|
45
45
|
};
|
|
46
|
+
/** Schema generator surface for ActionRow — excludes native button attributes except supported styling hooks. */
|
|
47
|
+
export interface ActionRowSchemaProps {
|
|
48
|
+
/**
|
|
49
|
+
* Density token surfaced as `data-cinder-density`.
|
|
50
|
+
* @default "comfortable"
|
|
51
|
+
*/
|
|
52
|
+
density?: ActionRowDensity;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the row is currently selected.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
selected?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Accessible state mapping for selected rows.
|
|
60
|
+
* Use `pressed` for in-page selectable rows and `current` for navigation/current-item rows.
|
|
61
|
+
* @default "pressed"
|
|
62
|
+
*/
|
|
63
|
+
selectedState?: ActionRowSelectedState;
|
|
64
|
+
/**
|
|
65
|
+
* `aria-current` value used when `selectedState="current"` and `selected` is true.
|
|
66
|
+
* @default "true"
|
|
67
|
+
*/
|
|
68
|
+
currentValue?: ActionRowCurrentValue;
|
|
69
|
+
/**
|
|
70
|
+
* Native button type.
|
|
71
|
+
* @default "button"
|
|
72
|
+
*/
|
|
73
|
+
type?: 'button' | 'submit' | 'reset';
|
|
74
|
+
/** Leading visual such as an icon, avatar, marker, or status dot. */
|
|
75
|
+
leading?: Snippet;
|
|
76
|
+
/** Primary row label. Required so the row has visible text and an accessible name. */
|
|
77
|
+
title: Snippet;
|
|
78
|
+
/** Secondary description below the title. */
|
|
79
|
+
description?: Snippet;
|
|
80
|
+
/** Tertiary metadata such as timestamp, status text, or a compact badge. */
|
|
81
|
+
meta?: Snippet;
|
|
82
|
+
/** Trailing region such as a timestamp, count, badge, chevron, or shortcut hint. */
|
|
83
|
+
trailing?: Snippet;
|
|
84
|
+
/** Additional classes merged with `.cinder-action-row`. */
|
|
85
|
+
class?: string;
|
|
86
|
+
/** Inline style string applied to the `.cinder-action-row` root. */
|
|
87
|
+
style?: string;
|
|
88
|
+
}
|
|
@@ -52,10 +52,20 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
// src/components/action-row/action-row.variables.ts
|
|
55
|
-
var variables = [
|
|
55
|
+
var variables = [
|
|
56
|
+
"--cinder-action-row-body-gap",
|
|
57
|
+
"--cinder-action-row-description-font-size",
|
|
58
|
+
"--cinder-action-row-layout-column-gap",
|
|
59
|
+
"--cinder-action-row-layout-row-gap",
|
|
60
|
+
"--cinder-action-row-meta-font-size",
|
|
61
|
+
"--cinder-action-row-padding-block",
|
|
62
|
+
"--cinder-action-row-padding-inline",
|
|
63
|
+
"--cinder-action-row-title-font-size",
|
|
64
|
+
"--cinder-action-row-trailing-gap"
|
|
65
|
+
];
|
|
56
66
|
var action_row_variables_default = variables;
|
|
57
67
|
export {
|
|
58
68
|
action_row_variables_default as default
|
|
59
69
|
};
|
|
60
70
|
|
|
61
|
-
//# debugId=
|
|
71
|
+
//# debugId=4A0646B62FFB1E4364756E2164756E21
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @tag domain-suite
|
|
9
9
|
* @useWhen Shipping a full chat surface with composer, scroll-anchor, unread indicator, and attachments bundled as one heavyweight drop-in.
|
|
10
10
|
* @useWhen Building an AI assistant or support thread where conversation state is modeled as a transcript of role-tagged messages.
|
|
11
|
+
* @useWhen Embedding Chat in a definite-height flex or grid region where its internal transcript should own scrolling.
|
|
11
12
|
* @avoidWhen Rendering a one-off message list — compose lighter primitives directly instead of pulling the full suite.
|
|
12
13
|
* @avoidWhen The transcript is read-only and needs no composer — a simple list of message bubbles is a better fit.
|
|
13
14
|
* @related markdown-editor
|