@lostgradient/cinder 0.11.0 → 0.12.1
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 +16 -0
- package/components.json +3 -2
- 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/code-block/code-block.css +15 -9
- package/dist/components/code-block/code-block.variables.js +8 -2
- package/dist/components/confirm-dialog/confirm-dialog.css +2 -0
- package/dist/components/confirm-dialog/confirm-dialog.schema.js +10 -1
- package/dist/components/confirm-dialog/confirm-dialog.types.d.ts +7 -0
- package/dist/components/confirm-dialog/index.js +478 -106
- package/dist/components/faceted-filter-bar/faceted-filter-bar.schema.js +5 -1
- package/dist/components/faceted-filter-bar/faceted-filter-bar.types.d.ts +2 -0
- package/dist/components/faceted-filter-bar/index.js +40 -31
- package/dist/components/navigation-bar/index.js +11 -17
- package/dist/components/run-step-timeline/index.js +65 -6
- package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +9 -1
- 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/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.js +365 -256
- package/dist/server/components/accordion/index.js +2 -2
- package/dist/server/components/accordion-item/index.js +2 -2
- package/dist/server/components/color-field/index.js +2 -2
- package/dist/server/components/confirm-dialog/index.js +7 -2
- package/dist/server/components/faceted-filter-bar/index.js +1 -1
- package/dist/server/components/navigation-bar/index.js +1 -1
- package/dist/server/components/run-step-timeline/index.js +1 -1
- package/dist/server/index.js +10 -10
- package/dist/server/{index.server-cf6pxeyg.js → index.server-0rzd71e0.js} +1 -1
- package/dist/server/{index.server-5tf22d6e.js → index.server-4wx0qven.js} +3 -3
- package/dist/server/{index.server-894t97kv.js → index.server-7yvpb6z7.js} +4 -4
- package/dist/server/{index.server-btgb3d56.js → index.server-d5a5ccz7.js} +18 -12
- package/dist/server/{index.server-z38bxms8.js → index.server-g5jgq3jp.js} +65 -6
- package/dist/server/{index.server-y83kqayt.js → index.server-h3nzp8g8.js} +1 -1
- package/dist/server/index.server-jwvxxjvc.js +50 -0
- package/dist/server/{index.server-39ne5cd1.js → index.server-pxq277t5.js} +32 -1
- package/package.json +22 -95
- 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/code-block/code-block.css +15 -9
- package/src/components/code-block/code-block.variables.json +7 -1
- package/src/components/code-block/code-block.variables.ts +7 -1
- package/src/components/confirm-dialog/confirm-dialog.css +2 -0
- package/src/components/confirm-dialog/confirm-dialog.schema.json +8 -0
- package/src/components/confirm-dialog/confirm-dialog.schema.ts +10 -0
- package/src/components/confirm-dialog/confirm-dialog.svelte +31 -3
- package/src/components/confirm-dialog/confirm-dialog.types.ts +7 -0
- package/src/components/faceted-filter-bar/faceted-filter-bar.schema.json +4 -0
- package/src/components/faceted-filter-bar/faceted-filter-bar.schema.ts +4 -0
- package/src/components/faceted-filter-bar/faceted-filter-bar.svelte +13 -11
- package/src/components/faceted-filter-bar/faceted-filter-bar.types.ts +2 -0
- package/src/components/navigation-bar/navigation-bar.svelte +2 -2
- package/src/components/run-step-timeline/run-step-timeline.svelte +4 -4
- package/src/components/run-step-timeline/run-step-timeline.utilities.ts +68 -0
- 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/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/dist/server/index.server-hfx487zj.js +0 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lostgradient/cinder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "A Svelte 5 component library and design system focused on accessibility, theming, and per-component tree-shaking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"svelte",
|
|
@@ -6508,13 +6508,33 @@
|
|
|
6508
6508
|
"dependencies": {
|
|
6509
6509
|
"@floating-ui/dom": "1.7.6",
|
|
6510
6510
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
6511
|
+
"@shikijs/engine-oniguruma": "^3.21.0",
|
|
6512
|
+
"@shikijs/langs": "^3.21.0",
|
|
6513
|
+
"@shikijs/types": "^3.21.0",
|
|
6511
6514
|
"@tanstack/virtual-core": "^3.17.1",
|
|
6515
|
+
"@types/hast": "^3.0.4",
|
|
6516
|
+
"@types/mdast": "^4.0.4",
|
|
6517
|
+
"@types/unist": "^3.0.0",
|
|
6512
6518
|
"ajv": "^8",
|
|
6519
|
+
"comlink": "^4.4.2",
|
|
6513
6520
|
"conversationalist": "^0.2.1",
|
|
6514
6521
|
"diff-match-patch": "^1.0.5",
|
|
6515
6522
|
"esm-env": "^1.2.0",
|
|
6523
|
+
"hast-util-sanitize": "^5.0.0",
|
|
6524
|
+
"js-yaml": "^4.1.0",
|
|
6516
6525
|
"libphonenumber-js": "^1.13.3",
|
|
6517
|
-
"qrcode": "^1.5.4"
|
|
6526
|
+
"qrcode": "^1.5.4",
|
|
6527
|
+
"rehype-katex": "^7.0.1",
|
|
6528
|
+
"rehype-sanitize": "^6.0.0",
|
|
6529
|
+
"rehype-stringify": "^10.0.1",
|
|
6530
|
+
"remark-gfm": "^4.0.1",
|
|
6531
|
+
"remark-math": "^6.0.0",
|
|
6532
|
+
"remark-parse": "^11.0.0",
|
|
6533
|
+
"remark-rehype": "^11.1.2",
|
|
6534
|
+
"remark-stringify": "^11.0.0",
|
|
6535
|
+
"shiki": "^3.21.0",
|
|
6536
|
+
"unified": "^11.0.5",
|
|
6537
|
+
"unist-util-visit": "^5.0.0"
|
|
6518
6538
|
},
|
|
6519
6539
|
"devDependencies": {
|
|
6520
6540
|
"@changesets/parse": "0.4.3",
|
|
@@ -6527,7 +6547,6 @@
|
|
|
6527
6547
|
"chalk": "^5.6.2",
|
|
6528
6548
|
"change-case": "^5.4.4",
|
|
6529
6549
|
"happy-dom": "^15.11.7",
|
|
6530
|
-
"js-yaml": "^4.1.0",
|
|
6531
6550
|
"lucide-svelte": "^0.503.0",
|
|
6532
6551
|
"oxlint": "^1.56.0",
|
|
6533
6552
|
"oxlint-tsgolint": "^0.17.0",
|
|
@@ -6548,35 +6567,12 @@
|
|
|
6548
6567
|
"@milkdown/ctx": "^7.17.3",
|
|
6549
6568
|
"@milkdown/kit": "^7.17.3",
|
|
6550
6569
|
"@milkdown/prose": "^7.17.3",
|
|
6551
|
-
"@shikijs/engine-oniguruma": "^3.21.0",
|
|
6552
|
-
"@shikijs/langs": "^3.21.0",
|
|
6553
|
-
"@shikijs/rehype": "^3.21.0",
|
|
6554
|
-
"@shikijs/types": "^3.21.0",
|
|
6555
|
-
"@types/hast": "^3.0.4",
|
|
6556
|
-
"@types/mdast": "^4.0.4",
|
|
6557
|
-
"@types/unist": "^3.0.0",
|
|
6558
|
-
"comlink": "^4.4.2",
|
|
6559
|
-
"hast-util-sanitize": "^5.0.0",
|
|
6560
|
-
"js-yaml": "^4.1.0",
|
|
6561
6570
|
"lucide-svelte": ">=0.400.0 <1",
|
|
6562
6571
|
"prosemirror-inputrules": "^1.5.1",
|
|
6563
6572
|
"prosemirror-model": "^1.25.4",
|
|
6564
6573
|
"prosemirror-state": "^1.4.4",
|
|
6565
6574
|
"prosemirror-view": "^1.41.3",
|
|
6566
|
-
"rehype-katex": "^7.0.1",
|
|
6567
|
-
"rehype-sanitize": "^6.0.0",
|
|
6568
|
-
"rehype-stringify": "^10.0.1",
|
|
6569
|
-
"remark-gfm": "^4.0.1",
|
|
6570
|
-
"remark-html": "^16.0.1",
|
|
6571
|
-
"remark-math": "^6.0.0",
|
|
6572
|
-
"remark-parse": "^11.0.0",
|
|
6573
|
-
"remark-rehype": "^11.1.2",
|
|
6574
|
-
"remark-stringify": "^11.0.0",
|
|
6575
|
-
"shiki": "^3.21.0",
|
|
6576
6575
|
"svelte": ">=5.56.0 <6",
|
|
6577
|
-
"unified": "^11.0.5",
|
|
6578
|
-
"unist-util-remove": "^4.0.0",
|
|
6579
|
-
"unist-util-visit": "^5.0.0",
|
|
6580
6576
|
"zod": "4.4.1"
|
|
6581
6577
|
},
|
|
6582
6578
|
"peerDependenciesMeta": {
|
|
@@ -6589,36 +6585,6 @@
|
|
|
6589
6585
|
"@milkdown/prose": {
|
|
6590
6586
|
"optional": true
|
|
6591
6587
|
},
|
|
6592
|
-
"@shikijs/engine-oniguruma": {
|
|
6593
|
-
"optional": true
|
|
6594
|
-
},
|
|
6595
|
-
"@shikijs/langs": {
|
|
6596
|
-
"optional": true
|
|
6597
|
-
},
|
|
6598
|
-
"@shikijs/rehype": {
|
|
6599
|
-
"optional": true
|
|
6600
|
-
},
|
|
6601
|
-
"@shikijs/types": {
|
|
6602
|
-
"optional": true
|
|
6603
|
-
},
|
|
6604
|
-
"@types/hast": {
|
|
6605
|
-
"optional": true
|
|
6606
|
-
},
|
|
6607
|
-
"@types/mdast": {
|
|
6608
|
-
"optional": true
|
|
6609
|
-
},
|
|
6610
|
-
"@types/unist": {
|
|
6611
|
-
"optional": true
|
|
6612
|
-
},
|
|
6613
|
-
"comlink": {
|
|
6614
|
-
"optional": true
|
|
6615
|
-
},
|
|
6616
|
-
"hast-util-sanitize": {
|
|
6617
|
-
"optional": true
|
|
6618
|
-
},
|
|
6619
|
-
"js-yaml": {
|
|
6620
|
-
"optional": true
|
|
6621
|
-
},
|
|
6622
6588
|
"prosemirror-inputrules": {
|
|
6623
6589
|
"optional": true
|
|
6624
6590
|
},
|
|
@@ -6630,45 +6596,6 @@
|
|
|
6630
6596
|
},
|
|
6631
6597
|
"prosemirror-view": {
|
|
6632
6598
|
"optional": true
|
|
6633
|
-
},
|
|
6634
|
-
"rehype-katex": {
|
|
6635
|
-
"optional": true
|
|
6636
|
-
},
|
|
6637
|
-
"rehype-sanitize": {
|
|
6638
|
-
"optional": true
|
|
6639
|
-
},
|
|
6640
|
-
"rehype-stringify": {
|
|
6641
|
-
"optional": true
|
|
6642
|
-
},
|
|
6643
|
-
"remark-gfm": {
|
|
6644
|
-
"optional": true
|
|
6645
|
-
},
|
|
6646
|
-
"remark-html": {
|
|
6647
|
-
"optional": true
|
|
6648
|
-
},
|
|
6649
|
-
"remark-math": {
|
|
6650
|
-
"optional": true
|
|
6651
|
-
},
|
|
6652
|
-
"remark-parse": {
|
|
6653
|
-
"optional": true
|
|
6654
|
-
},
|
|
6655
|
-
"remark-rehype": {
|
|
6656
|
-
"optional": true
|
|
6657
|
-
},
|
|
6658
|
-
"remark-stringify": {
|
|
6659
|
-
"optional": true
|
|
6660
|
-
},
|
|
6661
|
-
"shiki": {
|
|
6662
|
-
"optional": true
|
|
6663
|
-
},
|
|
6664
|
-
"unified": {
|
|
6665
|
-
"optional": true
|
|
6666
|
-
},
|
|
6667
|
-
"unist-util-remove": {
|
|
6668
|
-
"optional": true
|
|
6669
|
-
},
|
|
6670
|
-
"unist-util-visit": {
|
|
6671
|
-
"optional": true
|
|
6672
6599
|
}
|
|
6673
6600
|
},
|
|
6674
6601
|
"engines": {
|
|
@@ -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",
|
|
@@ -9,12 +9,17 @@
|
|
|
9
9
|
* ======================================== */
|
|
10
10
|
|
|
11
11
|
.cinder-code-block {
|
|
12
|
+
--cinder-code-block-background: var(--_cinder-code-block-code-surface);
|
|
13
|
+
--cinder-code-block-font-size: var(--cinder-text-sm);
|
|
14
|
+
--cinder-code-block-height: auto;
|
|
15
|
+
--cinder-code-block-line-height: var(--cinder-leading-relaxed);
|
|
16
|
+
--cinder-code-block-padding: var(--cinder-space-4);
|
|
12
17
|
--_cinder-code-block-code-surface: light-dark(
|
|
13
18
|
var(--cinder-surface-raised),
|
|
14
19
|
var(--cinder-surface-inset)
|
|
15
20
|
);
|
|
16
21
|
|
|
17
|
-
background: var(--cinder-
|
|
22
|
+
background: var(--cinder-code-block-background);
|
|
18
23
|
border: 1px solid var(--cinder-border);
|
|
19
24
|
border-radius: var(--cinder-radius-md);
|
|
20
25
|
overflow: hidden;
|
|
@@ -44,33 +49,34 @@
|
|
|
44
49
|
* inner pre elements can stay metrically identical. */
|
|
45
50
|
.cinder-code-block__viewport {
|
|
46
51
|
display: block;
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
block-size: var(--cinder-code-block-height);
|
|
53
|
+
overflow: auto;
|
|
54
|
+
background: var(--cinder-code-block-background);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.cinder-code-block__pre,
|
|
52
58
|
.cinder-code-block :where(pre.shiki) {
|
|
53
59
|
margin: 0;
|
|
54
|
-
padding: var(--cinder-
|
|
60
|
+
padding: var(--cinder-code-block-padding);
|
|
55
61
|
width: max-content;
|
|
56
62
|
min-width: 100%;
|
|
57
63
|
overflow-x: clip;
|
|
58
64
|
font-family: var(--cinder-font-mono);
|
|
59
|
-
font-size: var(--cinder-
|
|
60
|
-
line-height: var(--cinder-
|
|
65
|
+
font-size: var(--cinder-code-block-font-size);
|
|
66
|
+
line-height: var(--cinder-code-block-line-height);
|
|
61
67
|
color: var(--cinder-text);
|
|
62
68
|
/* Use near-white in light mode so github-light token colors (e.g. #d73a49
|
|
63
69
|
* keyword red) clear 4.5:1 WCAG AA. In dark mode keep the deep inset so
|
|
64
70
|
* github-dark tokens maintain contrast on a very dark surface. */
|
|
65
|
-
background: var(--
|
|
71
|
+
background: var(--cinder-code-block-background);
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
/* Shiki writes inline background styles on its generated <pre>; keep the
|
|
69
75
|
* highlighted state visually and metrically identical to the plain fallback. */
|
|
70
76
|
.cinder-code-block :where(pre.shiki) {
|
|
71
77
|
margin: 0 !important;
|
|
72
|
-
padding: var(--cinder-
|
|
73
|
-
background: var(--
|
|
78
|
+
padding: var(--cinder-code-block-padding) !important;
|
|
79
|
+
background: var(--cinder-code-block-background) !important;
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
.cinder-code-block__code,
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
const variables: readonly string[] = [
|
|
1
|
+
const variables: readonly string[] = [
|
|
2
|
+
'--cinder-code-block-background',
|
|
3
|
+
'--cinder-code-block-font-size',
|
|
4
|
+
'--cinder-code-block-height',
|
|
5
|
+
'--cinder-code-block-line-height',
|
|
6
|
+
'--cinder-code-block-padding',
|
|
7
|
+
];
|
|
2
8
|
|
|
3
9
|
export default variables;
|