slexkit 0.2.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/AGENTS.slexkit.md +29 -0
- package/CHANGELOG.md +90 -0
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/README.zh-CN.md +165 -0
- package/dist/ai/llms-authoring.txt +44 -0
- package/dist/ai/llms-components.txt +669 -0
- package/dist/ai/llms-full.txt +6586 -0
- package/dist/ai/llms-runtime.txt +1475 -0
- package/dist/ai/llms-toolhost.txt +295 -0
- package/dist/ai/llms.txt +69 -0
- package/dist/ai/slexkit-ai-manifest.json +2922 -0
- package/dist/base.css +621 -0
- package/dist/chunks/accordion-5f0nvjjm.js +376 -0
- package/dist/chunks/accordion-830dw78f.js +221 -0
- package/dist/chunks/accordion-cfjyxw93.js +630 -0
- package/dist/chunks/accordion-cw5r75jm.js +424 -0
- package/dist/chunks/accordion-ehnhpeca.js +492 -0
- package/dist/chunks/accordion-hzyrngd6.js +2377 -0
- package/dist/chunks/accordion-nw12ytps.js +6823 -0
- package/dist/components/accordion.js +163 -0
- package/dist/components/badge.js +80 -0
- package/dist/components/button.css +114 -0
- package/dist/components/button.js +16 -0
- package/dist/components/callout.js +154 -0
- package/dist/components/card.js +95 -0
- package/dist/components/checkbox.js +114 -0
- package/dist/components/choice.css +165 -0
- package/dist/components/code-block.js +264 -0
- package/dist/components/collapsible.js +111 -0
- package/dist/components/column.js +49 -0
- package/dist/components/content.css +474 -0
- package/dist/components/disclosure.css +162 -0
- package/dist/components/display.css +259 -0
- package/dist/components/divider.js +98 -0
- package/dist/components/feedback.css +219 -0
- package/dist/components/grid.js +67 -0
- package/dist/components/index.js +13364 -0
- package/dist/components/input.css +1247 -0
- package/dist/components/input.js +384 -0
- package/dist/components/link.js +77 -0
- package/dist/components/progress.js +111 -0
- package/dist/components/radio-group.js +189 -0
- package/dist/components/row.js +200 -0
- package/dist/components/section.js +161 -0
- package/dist/components/select.css +260 -0
- package/dist/components/select.js +16 -0
- package/dist/components/slider.css +125 -0
- package/dist/components/slider.js +175 -0
- package/dist/components/specs.js +1090 -0
- package/dist/components/stat.js +178 -0
- package/dist/components/submit.css +9 -0
- package/dist/components/submit.js +77 -0
- package/dist/components/switch.css +114 -0
- package/dist/components/switch.js +114 -0
- package/dist/components/table.js +157 -0
- package/dist/components/tabs.css +192 -0
- package/dist/components/tabs.js +17 -0
- package/dist/components/text-input.css +245 -0
- package/dist/components/text.js +50 -0
- package/dist/components/toast.js +240 -0
- package/dist/components/tooling.css +1009 -0
- package/dist/components/tooling.js +48951 -0
- package/dist/runtime.cjs +3728 -0
- package/dist/runtime.js +3686 -0
- package/dist/slexkit.cjs +18539 -0
- package/dist/slexkit.css +4776 -0
- package/dist/slexkit.js +18497 -0
- package/dist/tooling.js +59141 -0
- package/dist/types/components/accordion.d.ts +2 -0
- package/dist/types/components/badge.d.ts +2 -0
- package/dist/types/components/button.d.ts +2 -0
- package/dist/types/components/callout.d.ts +2 -0
- package/dist/types/components/card.d.ts +2 -0
- package/dist/types/components/checkbox.d.ts +2 -0
- package/dist/types/components/code-block.d.ts +2 -0
- package/dist/types/components/collapsible.d.ts +2 -0
- package/dist/types/components/column.d.ts +2 -0
- package/dist/types/components/divider.d.ts +2 -0
- package/dist/types/components/entries/accordion.d.ts +3 -0
- package/dist/types/components/entries/badge.d.ts +3 -0
- package/dist/types/components/entries/button.d.ts +3 -0
- package/dist/types/components/entries/callout.d.ts +3 -0
- package/dist/types/components/entries/card.d.ts +3 -0
- package/dist/types/components/entries/checkbox.d.ts +3 -0
- package/dist/types/components/entries/code-block.d.ts +3 -0
- package/dist/types/components/entries/collapsible.d.ts +3 -0
- package/dist/types/components/entries/column.d.ts +3 -0
- package/dist/types/components/entries/divider.d.ts +3 -0
- package/dist/types/components/entries/grid.d.ts +3 -0
- package/dist/types/components/entries/input.d.ts +3 -0
- package/dist/types/components/entries/link.d.ts +3 -0
- package/dist/types/components/entries/progress.d.ts +3 -0
- package/dist/types/components/entries/radio-group.d.ts +3 -0
- package/dist/types/components/entries/row.d.ts +3 -0
- package/dist/types/components/entries/section.d.ts +3 -0
- package/dist/types/components/entries/select.d.ts +3 -0
- package/dist/types/components/entries/slider.d.ts +3 -0
- package/dist/types/components/entries/specs.d.ts +1 -0
- package/dist/types/components/entries/stat.d.ts +3 -0
- package/dist/types/components/entries/submit.d.ts +3 -0
- package/dist/types/components/entries/switch.d.ts +3 -0
- package/dist/types/components/entries/table.d.ts +3 -0
- package/dist/types/components/entries/tabs.d.ts +3 -0
- package/dist/types/components/entries/text.d.ts +3 -0
- package/dist/types/components/entries/toast.d.ts +3 -0
- package/dist/types/components/entries/tooling.d.ts +1 -0
- package/dist/types/components/grid.d.ts +2 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/input.d.ts +2 -0
- package/dist/types/components/link.d.ts +2 -0
- package/dist/types/components/progress.d.ts +2 -0
- package/dist/types/components/radio-group.d.ts +2 -0
- package/dist/types/components/row.d.ts +2 -0
- package/dist/types/components/section.d.ts +2 -0
- package/dist/types/components/select.d.ts +2 -0
- package/dist/types/components/slider.d.ts +2 -0
- package/dist/types/components/spec-helpers.d.ts +23 -0
- package/dist/types/components/spec-registry.d.ts +12 -0
- package/dist/types/components/spec-schema.d.ts +74 -0
- package/dist/types/components/specs.d.ts +2 -0
- package/dist/types/components/stat.d.ts +2 -0
- package/dist/types/components/submit.d.ts +2 -0
- package/dist/types/components/svelte/adapter.d.ts +3 -0
- package/dist/types/components/svelte/bindProps.d.ts +2 -0
- package/dist/types/components/svelte/helpers.d.ts +33 -0
- package/dist/types/components/svelte/layout/balancedTiles.d.ts +14 -0
- package/dist/types/components/svelte/types.d.ts +12 -0
- package/dist/types/components/switch.d.ts +2 -0
- package/dist/types/components/table.d.ts +2 -0
- package/dist/types/components/tabs.d.ts +2 -0
- package/dist/types/components/text.d.ts +2 -0
- package/dist/types/components/toast.d.ts +2 -0
- package/dist/types/components/tooling.d.ts +2 -0
- package/dist/types/components-svelte.d.ts +5 -0
- package/dist/types/engine/component-scope.d.ts +14 -0
- package/dist/types/engine/component-state.d.ts +9 -0
- package/dist/types/engine/diagnostics.d.ts +24 -0
- package/dist/types/engine/engineering.d.ts +11 -0
- package/dist/types/engine/eval.d.ts +5 -0
- package/dist/types/engine/index.d.ts +26 -0
- package/dist/types/engine/markdown-runtime.d.ts +33 -0
- package/dist/types/engine/merge.d.ts +1 -0
- package/dist/types/engine/reactive.d.ts +11 -0
- package/dist/types/engine/registry.d.ts +4 -0
- package/dist/types/engine/renderer.d.ts +6 -0
- package/dist/types/engine/sandbox-runner.d.ts +2 -0
- package/dist/types/engine/secure-runtime.d.ts +214 -0
- package/dist/types/engine/store.d.ts +12 -0
- package/dist/types/engine/types.d.ts +58 -0
- package/dist/types/icons/manager.d.ts +17 -0
- package/dist/types/icons/phosphor.d.ts +45 -0
- package/dist/types/index.d.ts +61 -0
- package/dist/types/runtime.d.ts +32 -0
- package/dist/types/toolhost/index.d.ts +78 -0
- package/dist/types/tooling-umd.d.ts +47 -0
- package/dist/types/version.d.ts +8 -0
- package/dist/umd/slexkit.tooling.umd.js +66553 -0
- package/dist/umd/slexkit.umd.js +18552 -0
- package/package.json +136 -0
- package/scripts/cli.mjs +47 -0
- package/skills/slexkit/SKILL.md +27 -0
- package/skills/slexkit-author/SKILL.md +50 -0
- package/skills/slexkit-host-integration/SKILL.md +33 -0
- package/skills/slexkit-secure-runtime/SKILL.md +31 -0
- package/skills/slexkit-toolhost/SKILL.md +38 -0
- package/skills/slexkit-update/SKILL.md +23 -0
- package/src/components/svelte/InlineIcon.svelte +66 -0
- package/src/components/svelte/adapter.ts +76 -0
- package/src/components/svelte/bindProps.ts +9 -0
- package/src/components/svelte/content/Badge.svelte +19 -0
- package/src/components/svelte/content/Callout.svelte +57 -0
- package/src/components/svelte/content/CodeBlock.svelte +130 -0
- package/src/components/svelte/content/Divider.svelte +21 -0
- package/src/components/svelte/content/Link.svelte +21 -0
- package/src/components/svelte/content/Section.svelte +24 -0
- package/src/components/svelte/content/Table.svelte +44 -0
- package/src/components/svelte/disclosure/Accordion.svelte +100 -0
- package/src/components/svelte/disclosure/Collapsible.svelte +45 -0
- package/src/components/svelte/display/Stat.svelte +102 -0
- package/src/components/svelte/display/Text.svelte +11 -0
- package/src/components/svelte/feedback/Progress.svelte +34 -0
- package/src/components/svelte/feedback/Toast.svelte +105 -0
- package/src/components/svelte/helpers.ts +148 -0
- package/src/components/svelte/input/Button.svelte +78 -0
- package/src/components/svelte/input/Checkbox.svelte +52 -0
- package/src/components/svelte/input/Input.svelte +202 -0
- package/src/components/svelte/input/RadioGroup.svelte +71 -0
- package/src/components/svelte/input/Select.svelte +220 -0
- package/src/components/svelte/input/Slider.svelte +96 -0
- package/src/components/svelte/input/Submit.svelte +32 -0
- package/src/components/svelte/input/Switch.svelte +53 -0
- package/src/components/svelte/input/Tabs.svelte +188 -0
- package/src/components/svelte/layout/Card.svelte +17 -0
- package/src/components/svelte/layout/Column.svelte +15 -0
- package/src/components/svelte/layout/Grid.svelte +26 -0
- package/src/components/svelte/layout/Row.svelte +105 -0
- package/src/components/svelte/layout/balancedTiles.ts +85 -0
- package/src/components/svelte/tooling/CodeMirror.svelte +91 -0
- package/src/components/svelte/tooling/Playground.svelte +765 -0
- package/src/components/svelte/tooling/PlaygroundMarkdown.svelte +26 -0
- package/src/components/svelte/tooling/PlaygroundSlexCode.svelte +76 -0
- package/src/components/svelte/types.ts +17 -0
- package/src/styles/animation.css +98 -0
- package/src/styles/components/button.css +114 -0
- package/src/styles/components/choice.css +165 -0
- package/src/styles/components/select.css +260 -0
- package/src/styles/components/slider.css +125 -0
- package/src/styles/components/submit.css +9 -0
- package/src/styles/components/switch.css +114 -0
- package/src/styles/components/tabs.css +192 -0
- package/src/styles/components/text-input.css +245 -0
- package/src/styles/content.css +474 -0
- package/src/styles/disclosure.css +162 -0
- package/src/styles/display.css +259 -0
- package/src/styles/entry.css +34 -0
- package/src/styles/feedback.css +219 -0
- package/src/styles/input.css +8 -0
- package/src/styles/layout.css +365 -0
- package/src/styles/theme.css +31 -0
- package/src/styles/tooling.css +1009 -0
|
@@ -0,0 +1,1090 @@
|
|
|
1
|
+
// src/version.ts
|
|
2
|
+
var SLEX_PROTOCOL_VERSION = "0.1";
|
|
3
|
+
|
|
4
|
+
// src/components/spec-helpers.ts
|
|
5
|
+
var SINCE = "0.1.0";
|
|
6
|
+
function docs(type) {
|
|
7
|
+
return {
|
|
8
|
+
href: `/docs/components/${type}`,
|
|
9
|
+
anchors: {
|
|
10
|
+
api: `${type}-api-reference`,
|
|
11
|
+
examples: `${type}-canonical-example`
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function isSlexExpression(value) {
|
|
16
|
+
return typeof value.namespace === "string" && typeof value.layout === "object" && value.layout !== null;
|
|
17
|
+
}
|
|
18
|
+
function example(type, propsOrSource, title = "Basic usage") {
|
|
19
|
+
return {
|
|
20
|
+
id: "basic",
|
|
21
|
+
title,
|
|
22
|
+
source: isSlexExpression(propsOrSource) ? {
|
|
23
|
+
slex: propsOrSource.slex ?? SLEX_PROTOCOL_VERSION,
|
|
24
|
+
...propsOrSource
|
|
25
|
+
} : {
|
|
26
|
+
slex: SLEX_PROTOCOL_VERSION,
|
|
27
|
+
namespace: `spec_${type.replaceAll("-", "_")}_basic`,
|
|
28
|
+
layout: {
|
|
29
|
+
[`${type}:demo`]: propsOrSource
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
var semanticTones = ["info", "success", "warning", "danger", "muted"];
|
|
35
|
+
var inputState = ["input", "slider", "select", "tabs", "radio-group"];
|
|
36
|
+
var checkedState = ["checkbox"];
|
|
37
|
+
var enabledState = ["switch"];
|
|
38
|
+
var readableState = ["stat", "text", "progress", "badge", "callout", "code-block", "divider", "link", "table", "section"];
|
|
39
|
+
function stateFor(type) {
|
|
40
|
+
if (inputState.includes(type))
|
|
41
|
+
return "value";
|
|
42
|
+
if (checkedState.includes(type))
|
|
43
|
+
return "checked";
|
|
44
|
+
if (enabledState.includes(type))
|
|
45
|
+
return "enabled";
|
|
46
|
+
if (readableState.includes(type))
|
|
47
|
+
return "readable";
|
|
48
|
+
return "none";
|
|
49
|
+
}
|
|
50
|
+
function component(spec) {
|
|
51
|
+
return {
|
|
52
|
+
status: "ready",
|
|
53
|
+
since: SINCE,
|
|
54
|
+
docs: docs(spec.type),
|
|
55
|
+
state: spec.state ?? stateFor(spec.type),
|
|
56
|
+
...spec
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
var childContent = {
|
|
60
|
+
allowed: true,
|
|
61
|
+
description: "Nested component fields are rendered as child content in field order."
|
|
62
|
+
};
|
|
63
|
+
var noChildren = {
|
|
64
|
+
allowed: false,
|
|
65
|
+
description: "This component does not render nested child components."
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// src/components/entries/accordion.spec.ts
|
|
69
|
+
var accordionSpec = component({
|
|
70
|
+
type: "accordion",
|
|
71
|
+
category: "Disclosure",
|
|
72
|
+
title: "Accordion",
|
|
73
|
+
summary: "Expandable grouped panels.",
|
|
74
|
+
description: "Use accordion to reveal one or more sections from a compact list of panels.",
|
|
75
|
+
props: {
|
|
76
|
+
value: { type: "string | string[]", dynamic: true, description: "Current expanded item value; use an array when multiple is true." },
|
|
77
|
+
multiple: { type: "boolean", default: false, description: "Allow multiple items to be expanded at the same time." },
|
|
78
|
+
items: { type: "array", description: "Panel definitions with value, label, content, and optional icon." },
|
|
79
|
+
"items[].icon": { type: "string", description: "Icon name shown before an item trigger label." },
|
|
80
|
+
onchange: { type: "write-expression", description: "Write expression invoked when expanded items change." }
|
|
81
|
+
},
|
|
82
|
+
children: noChildren,
|
|
83
|
+
examples: [example("accordion", {
|
|
84
|
+
namespace: "doc_accordion_typical",
|
|
85
|
+
layout: {
|
|
86
|
+
"accordion:faq": {
|
|
87
|
+
multiple: true,
|
|
88
|
+
value: [
|
|
89
|
+
"install"
|
|
90
|
+
],
|
|
91
|
+
items: [
|
|
92
|
+
{
|
|
93
|
+
value: "install",
|
|
94
|
+
label: "Install",
|
|
95
|
+
icon: "download-simple",
|
|
96
|
+
content: "Prepare dependencies."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
value: "review",
|
|
100
|
+
label: "Review",
|
|
101
|
+
icon: "check-circle",
|
|
102
|
+
content: "Check the result."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
value: "ship",
|
|
106
|
+
label: "Ship",
|
|
107
|
+
icon: "rocket-launch",
|
|
108
|
+
content: "Publish the change."
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
})]
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// src/components/entries/badge.spec.ts
|
|
117
|
+
var badgeSpec = component({
|
|
118
|
+
type: "badge",
|
|
119
|
+
category: "Content",
|
|
120
|
+
title: "Badge",
|
|
121
|
+
summary: "Compact label for status or classification.",
|
|
122
|
+
description: "Use badge to annotate nearby content with a short semantic label.",
|
|
123
|
+
props: {
|
|
124
|
+
label: { type: "string", dynamic: true, description: "Badge text." },
|
|
125
|
+
text: { type: "string", dynamic: true, description: "Alias for label." },
|
|
126
|
+
content: { type: "string", dynamic: true, description: "Alias for label." },
|
|
127
|
+
icon: { type: "string", description: "Icon name shown before the badge label." },
|
|
128
|
+
tone: { type: "string", values: semanticTones, default: "info", description: "Semantic tone applied to the badge." },
|
|
129
|
+
variant: { type: "string", values: semanticTones, description: "Alias for tone." }
|
|
130
|
+
},
|
|
131
|
+
children: noChildren,
|
|
132
|
+
examples: [example("badge", {
|
|
133
|
+
namespace: "doc_badge_typical",
|
|
134
|
+
layout: {
|
|
135
|
+
"row:badges": {
|
|
136
|
+
"badge:ready": {
|
|
137
|
+
label: "ready",
|
|
138
|
+
icon: "check-circle",
|
|
139
|
+
tone: "success"
|
|
140
|
+
},
|
|
141
|
+
"badge:pending": {
|
|
142
|
+
label: "pending",
|
|
143
|
+
tone: "warning"
|
|
144
|
+
},
|
|
145
|
+
"badge:info": {
|
|
146
|
+
label: "info",
|
|
147
|
+
tone: "info"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
})]
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// src/components/entries/button.spec.ts
|
|
155
|
+
var buttonSpec = component({
|
|
156
|
+
type: "button",
|
|
157
|
+
category: "Action",
|
|
158
|
+
title: "Button",
|
|
159
|
+
summary: "Action trigger.",
|
|
160
|
+
description: "Use button for explicit actions in interactive SlexKit layouts.",
|
|
161
|
+
props: {
|
|
162
|
+
label: { type: "string", dynamic: true, description: "Visible button text and accessible name." },
|
|
163
|
+
icon: { type: "string", description: "Icon name shown before the label." },
|
|
164
|
+
iconOnly: { type: "boolean", default: false, description: "Show only the icon while retaining label as the accessible name." },
|
|
165
|
+
variant: { type: "string", values: ["primary", "secondary", "danger", "ghost"], default: "primary", description: "Semantic action variant." },
|
|
166
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable the action." },
|
|
167
|
+
href: { type: "string", dynamic: true, description: "Render the button surface as a link to this URL." },
|
|
168
|
+
target: { type: "string", description: "Link target used when href is present." },
|
|
169
|
+
title: { type: "string", dynamic: true, description: "Tooltip and accessible-label fallback." },
|
|
170
|
+
selected: { type: "boolean", dynamic: true, description: "Render the icon in its selected visual state." },
|
|
171
|
+
active: { type: "boolean", dynamic: true, description: "Render the icon in its active visual state." },
|
|
172
|
+
pressed: { type: "boolean", dynamic: true, description: "Expose pressed state and render the selected icon style." },
|
|
173
|
+
onclick: { type: "write-expression", description: "Write expression invoked when the button is clicked." }
|
|
174
|
+
},
|
|
175
|
+
children: noChildren,
|
|
176
|
+
examples: [example("button", {
|
|
177
|
+
namespace: "doc_button_typical",
|
|
178
|
+
layout: {
|
|
179
|
+
"row:actions": {
|
|
180
|
+
"button:save": {
|
|
181
|
+
label: "Save",
|
|
182
|
+
icon: "floppy-disk",
|
|
183
|
+
variant: "primary"
|
|
184
|
+
},
|
|
185
|
+
"button:cancel": {
|
|
186
|
+
label: "Cancel",
|
|
187
|
+
variant: "secondary"
|
|
188
|
+
},
|
|
189
|
+
"button:delete": {
|
|
190
|
+
label: "Delete",
|
|
191
|
+
variant: "danger"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
})]
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// src/components/entries/callout.spec.ts
|
|
199
|
+
var calloutSpec = component({
|
|
200
|
+
type: "callout",
|
|
201
|
+
category: "Content",
|
|
202
|
+
title: "Callout",
|
|
203
|
+
summary: "Highlighted contextual message.",
|
|
204
|
+
description: "Use callout for notes, warnings, and other contextual blocks.",
|
|
205
|
+
props: {
|
|
206
|
+
title: { type: "string", dynamic: true, description: "Callout title." },
|
|
207
|
+
heading: { type: "string", dynamic: true, description: "Alias for title." },
|
|
208
|
+
label: { type: "string", dynamic: true, description: "Alias for title." },
|
|
209
|
+
icon: { type: "string", description: "Icon name shown before the title." },
|
|
210
|
+
text: { type: "string", dynamic: true, description: "Callout body text." },
|
|
211
|
+
message: { type: "string", dynamic: true, description: "Alias for text." },
|
|
212
|
+
content: { type: "string", dynamic: true, description: "Alias for text." },
|
|
213
|
+
tone: { type: "string", values: ["info", "success", "warning", "danger"], default: "info", description: "Semantic tone for the callout." }
|
|
214
|
+
},
|
|
215
|
+
children: childContent,
|
|
216
|
+
examples: [example("callout", {
|
|
217
|
+
namespace: "doc_callout_typical",
|
|
218
|
+
layout: {
|
|
219
|
+
"callout:notice": {
|
|
220
|
+
tone: "info",
|
|
221
|
+
title: "Notice",
|
|
222
|
+
icon: "info",
|
|
223
|
+
text: "Use callout for information that should stand out."
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
})]
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// src/components/entries/card.spec.ts
|
|
230
|
+
var cardSpec = component({
|
|
231
|
+
type: "card",
|
|
232
|
+
category: "Layout",
|
|
233
|
+
title: "Card",
|
|
234
|
+
summary: "Bordered grouping container.",
|
|
235
|
+
description: "Use card to group related content on a bounded surface.",
|
|
236
|
+
props: {
|
|
237
|
+
title: { type: "string", dynamic: true, description: "Card title." },
|
|
238
|
+
icon: { type: "string", description: "Icon name shown before the title." },
|
|
239
|
+
tone: { type: "string", values: semanticTones, description: "Optional semantic tone for the card surface." }
|
|
240
|
+
},
|
|
241
|
+
children: childContent,
|
|
242
|
+
examples: [example("card", {
|
|
243
|
+
namespace: "doc_card_typical",
|
|
244
|
+
layout: {
|
|
245
|
+
"card:metrics": {
|
|
246
|
+
title: "Metrics",
|
|
247
|
+
icon: "chart-bar",
|
|
248
|
+
"grid:items": {
|
|
249
|
+
columns: 2,
|
|
250
|
+
"stat:requests": {
|
|
251
|
+
label: "Requests",
|
|
252
|
+
value: "1.2k",
|
|
253
|
+
unit: "/min"
|
|
254
|
+
},
|
|
255
|
+
"stat:latency": {
|
|
256
|
+
label: "Latency",
|
|
257
|
+
value: "42",
|
|
258
|
+
unit: "ms"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
})]
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
// src/components/entries/checkbox.spec.ts
|
|
267
|
+
var checkboxSpec = component({
|
|
268
|
+
type: "checkbox",
|
|
269
|
+
category: "Input",
|
|
270
|
+
title: "Checkbox",
|
|
271
|
+
summary: "Boolean checkbox input.",
|
|
272
|
+
description: "Use checkbox for binary choices that can be toggled independently.",
|
|
273
|
+
props: {
|
|
274
|
+
checked: { type: "boolean", default: false, dynamic: true, description: "Checked state." },
|
|
275
|
+
label: { type: "string", dynamic: true, description: "Checkbox label." },
|
|
276
|
+
icon: { type: "string", description: "Icon name shown before the visible label." },
|
|
277
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable the checkbox." },
|
|
278
|
+
haptic: { type: "boolean", default: true, description: "Enable vibration feedback on supported devices." },
|
|
279
|
+
haptics: { type: "boolean", default: true, description: "Alias for haptic." },
|
|
280
|
+
onchange: { type: "write-expression", description: "Write expression invoked when checked state changes." }
|
|
281
|
+
},
|
|
282
|
+
children: noChildren,
|
|
283
|
+
examples: [example("checkbox", {
|
|
284
|
+
namespace: "doc_checkbox_typical",
|
|
285
|
+
layout: {
|
|
286
|
+
"checkbox:agree": {
|
|
287
|
+
checked: true,
|
|
288
|
+
label: "I agree",
|
|
289
|
+
icon: "handshake"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
})]
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// src/components/entries/code-block.spec.ts
|
|
296
|
+
var codeBlockSpec = component({
|
|
297
|
+
type: "code-block",
|
|
298
|
+
category: "Content",
|
|
299
|
+
title: "Code Block",
|
|
300
|
+
summary: "Formatted code or log block.",
|
|
301
|
+
description: "Use code-block for static code samples, configuration snippets, and logs.",
|
|
302
|
+
props: {
|
|
303
|
+
code: { type: "string", dynamic: true, description: "Code text content." },
|
|
304
|
+
source: { type: "string", dynamic: true, description: "Alias for code." },
|
|
305
|
+
content: { type: "string", dynamic: true, description: "Alias for code." },
|
|
306
|
+
language: { type: "string", description: "Language label." },
|
|
307
|
+
title: { type: "string", description: "Code block title." },
|
|
308
|
+
icon: { type: "string", description: "Icon name shown before the title." },
|
|
309
|
+
lineNumbers: { type: "boolean", default: true, description: "Show line numbers." }
|
|
310
|
+
},
|
|
311
|
+
children: noChildren,
|
|
312
|
+
examples: [example("code-block", {
|
|
313
|
+
namespace: "doc_code_block_typical",
|
|
314
|
+
layout: {
|
|
315
|
+
"code-block:config": {
|
|
316
|
+
title: "Config",
|
|
317
|
+
icon: "code",
|
|
318
|
+
language: "js",
|
|
319
|
+
code: "export const enabled = true;"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
})]
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// src/components/entries/collapsible.spec.ts
|
|
326
|
+
var collapsibleSpec = component({
|
|
327
|
+
type: "collapsible",
|
|
328
|
+
category: "Disclosure",
|
|
329
|
+
title: "Collapsible",
|
|
330
|
+
summary: "Single expandable region.",
|
|
331
|
+
description: "Use collapsible to show or hide one related content region.",
|
|
332
|
+
props: {
|
|
333
|
+
open: { type: "boolean", default: false, dynamic: true, description: "Expanded state." },
|
|
334
|
+
trigger: { type: "string", dynamic: true, description: "Trigger button text." },
|
|
335
|
+
icon: { type: "string", description: "Icon name shown before trigger text." },
|
|
336
|
+
content: { type: "string", dynamic: true, description: "Static body content." },
|
|
337
|
+
onchange: { type: "write-expression", description: "Write expression invoked when open state changes." }
|
|
338
|
+
},
|
|
339
|
+
children: childContent,
|
|
340
|
+
examples: [example("collapsible", {
|
|
341
|
+
namespace: "doc_collapsible_typical",
|
|
342
|
+
layout: {
|
|
343
|
+
"collapsible:more": {
|
|
344
|
+
open: true,
|
|
345
|
+
trigger: "Details",
|
|
346
|
+
icon: "caret-circle-down",
|
|
347
|
+
content: "This secondary content can be collapsed."
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
})]
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
// src/components/entries/column.spec.ts
|
|
354
|
+
var columnSpec = component({
|
|
355
|
+
type: "column",
|
|
356
|
+
category: "Layout",
|
|
357
|
+
title: "Column",
|
|
358
|
+
summary: "Vertical layout container.",
|
|
359
|
+
description: "Use column to stack child components vertically in field order.",
|
|
360
|
+
props: {},
|
|
361
|
+
children: childContent,
|
|
362
|
+
examples: [example("column", {
|
|
363
|
+
namespace: "doc_column_typical",
|
|
364
|
+
layout: {
|
|
365
|
+
"column:form": {
|
|
366
|
+
"input:name": {
|
|
367
|
+
placeholder: "Name"
|
|
368
|
+
},
|
|
369
|
+
"input:email": {
|
|
370
|
+
placeholder: "Email"
|
|
371
|
+
},
|
|
372
|
+
"button:save": {
|
|
373
|
+
label: "Save"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
})]
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
// src/components/entries/divider.spec.ts
|
|
381
|
+
var dividerSpec = component({
|
|
382
|
+
type: "divider",
|
|
383
|
+
category: "Content",
|
|
384
|
+
title: "Divider",
|
|
385
|
+
summary: "Visual separator.",
|
|
386
|
+
description: "Use divider to separate related regions, optionally with a label.",
|
|
387
|
+
props: {
|
|
388
|
+
label: { type: "string", dynamic: true, description: "Text shown in the divider." },
|
|
389
|
+
icon: { type: "string", description: "Icon name shown before the label." }
|
|
390
|
+
},
|
|
391
|
+
children: noChildren,
|
|
392
|
+
examples: [example("divider", {
|
|
393
|
+
namespace: "doc_divider_typical",
|
|
394
|
+
layout: {
|
|
395
|
+
"column:content": {
|
|
396
|
+
"text:top": {
|
|
397
|
+
text: "Above"
|
|
398
|
+
},
|
|
399
|
+
"divider:line": {
|
|
400
|
+
label: "Divider",
|
|
401
|
+
icon: "flag"
|
|
402
|
+
},
|
|
403
|
+
"text:bottom": {
|
|
404
|
+
text: "Below"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
})]
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
// src/components/entries/grid.spec.ts
|
|
412
|
+
var gridSpec = component({
|
|
413
|
+
type: "grid",
|
|
414
|
+
category: "Layout",
|
|
415
|
+
title: "Grid",
|
|
416
|
+
summary: "Responsive grid container.",
|
|
417
|
+
description: "Use grid to arrange child components in responsive columns.",
|
|
418
|
+
props: {
|
|
419
|
+
columns: { type: "number", default: 1, dynamic: true, description: "Base column count." },
|
|
420
|
+
smColumns: { type: "number", dynamic: true, description: "Column count at the small breakpoint." },
|
|
421
|
+
mdColumns: { type: "number", dynamic: true, description: "Column count at the medium breakpoint." },
|
|
422
|
+
lgColumns: { type: "number", dynamic: true, description: "Column count at the large breakpoint." },
|
|
423
|
+
xlColumns: { type: "number", dynamic: true, description: "Column count at the extra-large breakpoint." },
|
|
424
|
+
gap: { type: "string", dynamic: true, description: "Spacing between grid items." }
|
|
425
|
+
},
|
|
426
|
+
children: childContent,
|
|
427
|
+
examples: [example("grid", {
|
|
428
|
+
namespace: "doc_grid_typical",
|
|
429
|
+
layout: {
|
|
430
|
+
"grid:stats": {
|
|
431
|
+
columns: 1,
|
|
432
|
+
mdColumns: 3,
|
|
433
|
+
"stat:a": {
|
|
434
|
+
label: "Requests",
|
|
435
|
+
value: "1.2k"
|
|
436
|
+
},
|
|
437
|
+
"stat:b": {
|
|
438
|
+
label: "Success",
|
|
439
|
+
value: "98%"
|
|
440
|
+
},
|
|
441
|
+
"stat:c": {
|
|
442
|
+
label: "Errors",
|
|
443
|
+
value: "3"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
})]
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
// src/components/entries/icon.spec.ts
|
|
451
|
+
var iconSpec = component({
|
|
452
|
+
type: "icon",
|
|
453
|
+
category: "Component",
|
|
454
|
+
title: "Icon",
|
|
455
|
+
summary: "Shared icon field capability.",
|
|
456
|
+
description: "Icon is a shared field capability, not an independent icon component type.",
|
|
457
|
+
props: {
|
|
458
|
+
icon: { type: "string", description: "Icon name resolved through the global icon manager." },
|
|
459
|
+
iconOnly: { type: "boolean", description: "Render only the icon while retaining an accessible label where supported." },
|
|
460
|
+
"items[].icon": { type: "string", description: "Accordion item trigger icon." },
|
|
461
|
+
"options[].icon": { type: "string", description: "Select or radio option icon." },
|
|
462
|
+
"columns[].icon": { type: "string", description: "Table column header icon." },
|
|
463
|
+
"tabs[].icon": { type: "string", description: "Tab trigger icon." },
|
|
464
|
+
"tabs[].iconOnly": { type: "boolean", description: "Tab trigger icon-only mode." }
|
|
465
|
+
},
|
|
466
|
+
children: noChildren,
|
|
467
|
+
examples: [example("button", { label: "Settings", icon: "gear-six", iconOnly: true, variant: "ghost" }, "Icon field usage")]
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
// src/components/entries/input.spec.ts
|
|
471
|
+
var inputSpec = component({
|
|
472
|
+
type: "input",
|
|
473
|
+
category: "Input",
|
|
474
|
+
title: "Input",
|
|
475
|
+
summary: "Text or engineering-value input.",
|
|
476
|
+
description: "Use input for editable text and engineering numeric values.",
|
|
477
|
+
props: {
|
|
478
|
+
value: { type: "string", dynamic: true, description: "Current input value." },
|
|
479
|
+
label: { type: "string", dynamic: true, description: "Input label." },
|
|
480
|
+
unit: { type: "string", dynamic: true, description: "Trailing unit text." },
|
|
481
|
+
description: { type: "string", dynamic: true, description: "Assistive description below the input." },
|
|
482
|
+
help: { type: "string", dynamic: true, description: "Alias for description." },
|
|
483
|
+
hint: { type: "string", dynamic: true, description: "Alias for description." },
|
|
484
|
+
error: { type: "string", dynamic: true, description: "Error text shown below the input and linked with aria-describedby." },
|
|
485
|
+
errorMessage: { type: "string", dynamic: true, description: "Alias for error." },
|
|
486
|
+
invalid: { type: "boolean", default: false, dynamic: true, description: "Mark the input as invalid with aria-invalid and error styling." },
|
|
487
|
+
placeholder: { type: "string", description: "Placeholder text for empty values." },
|
|
488
|
+
type: { type: "string", default: "text", description: "Input value kind; use engineering for parsed engineering values." },
|
|
489
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable editing." },
|
|
490
|
+
readonly: { type: "boolean", default: false, dynamic: true, description: "Make the input read-only." },
|
|
491
|
+
readOnly: { type: "boolean", default: false, dynamic: true, description: "Alias for readonly." },
|
|
492
|
+
required: { type: "boolean", default: false, dynamic: true, description: "Mark the input as required." },
|
|
493
|
+
id: { type: "string", description: "Native input id; defaults to a stable id derived from the component name." },
|
|
494
|
+
name: { type: "string", description: "Native input name attribute." },
|
|
495
|
+
min: { type: "string | number", dynamic: true, description: "Minimum value used by numeric input controls." },
|
|
496
|
+
max: { type: "string | number", dynamic: true, description: "Maximum value used by numeric input controls." },
|
|
497
|
+
step: { type: "string | number", dynamic: true, description: "Step size used by numeric input controls." },
|
|
498
|
+
controls: { type: "boolean", default: true, dynamic: true, description: "Show decrement and increment buttons for numeric inputs." },
|
|
499
|
+
onchange: { type: "write-expression", description: "Write expression invoked when the value changes." }
|
|
500
|
+
},
|
|
501
|
+
children: noChildren,
|
|
502
|
+
examples: [example("input", {
|
|
503
|
+
namespace: "doc_input_typical",
|
|
504
|
+
layout: {
|
|
505
|
+
"input:name": {
|
|
506
|
+
label: "Project",
|
|
507
|
+
value: "SlexKit",
|
|
508
|
+
placeholder: "Enter name",
|
|
509
|
+
description: "Visible labels keep form fields scannable."
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
})]
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
// src/components/entries/link.spec.ts
|
|
516
|
+
var linkSpec = component({
|
|
517
|
+
type: "link",
|
|
518
|
+
category: "Content",
|
|
519
|
+
title: "Link",
|
|
520
|
+
summary: "Inline navigation link.",
|
|
521
|
+
description: "Use link to navigate to another page or resource.",
|
|
522
|
+
props: {
|
|
523
|
+
href: { type: "string", description: "Target URL." },
|
|
524
|
+
text: { type: "string", dynamic: true, description: "Visible link text." },
|
|
525
|
+
label: { type: "string", dynamic: true, description: "Alias for text." },
|
|
526
|
+
content: { type: "string", dynamic: true, description: "Alias for text." },
|
|
527
|
+
icon: { type: "string", description: "Icon name shown before link text." },
|
|
528
|
+
target: { type: "string", description: "Native link target attribute." },
|
|
529
|
+
variant: { type: "string", values: ["default", "muted"], default: "default", description: "Link visual variant." }
|
|
530
|
+
},
|
|
531
|
+
children: noChildren,
|
|
532
|
+
examples: [example("link", {
|
|
533
|
+
namespace: "doc_link_typical",
|
|
534
|
+
layout: {
|
|
535
|
+
"column:links": {
|
|
536
|
+
"link:docs": {
|
|
537
|
+
href: "/components",
|
|
538
|
+
icon: "arrow-square-out",
|
|
539
|
+
text: "View components"
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
})]
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
// src/components/entries/playground.spec.ts
|
|
547
|
+
var playgroundSpec = component({
|
|
548
|
+
type: "playground",
|
|
549
|
+
category: "Tooling",
|
|
550
|
+
title: "Playground",
|
|
551
|
+
summary: "Interactive source preview.",
|
|
552
|
+
description: "Use playground in documentation surfaces to render editable SlexKit or Markdown examples.",
|
|
553
|
+
props: {
|
|
554
|
+
source: { type: "object | string", description: "SlexKit or Markdown source to preview." },
|
|
555
|
+
sourceType: { type: "string", values: ["slex", "markdown", "auto-markdown"], default: "slex", description: "Source parser mode." },
|
|
556
|
+
title: { type: "string", description: "Playground title." },
|
|
557
|
+
previewAlign: { type: "string", values: ["center", "start"], default: "center", description: "Vertical preview alignment in render mode." },
|
|
558
|
+
alignPreview: { type: "string", values: ["center", "start"], description: "Alias for previewAlign." },
|
|
559
|
+
previewPlacement: { type: "string", values: ["center", "start"], description: "Alias for previewAlign." },
|
|
560
|
+
previewMinHeight: { type: "string", description: "Minimum preview area height." },
|
|
561
|
+
previewMaxWidth: { type: "string", description: "Maximum preview content width." },
|
|
562
|
+
themeToggle: { type: "boolean", default: false, description: "Show the theme toggle action." },
|
|
563
|
+
showThemeToggle: { type: "boolean", default: false, description: "Alias for themeToggle." },
|
|
564
|
+
enableThemeToggle: { type: "boolean", default: false, description: "Alias for themeToggle." },
|
|
565
|
+
themeLabel: { type: "string", description: "Accessible label for the theme toggle action." },
|
|
566
|
+
themeToggleLabel: { type: "string", description: "Alias for themeLabel." },
|
|
567
|
+
sourceTypeLabel: { type: "string", description: "Accessible label for the source type selector." },
|
|
568
|
+
copyLabel: { type: "string", description: "Accessible label for the copy source action." },
|
|
569
|
+
openWebLabel: { type: "string", description: "Accessible label for opening the source in the standalone playground." },
|
|
570
|
+
webUrl: { type: "string", description: "Standalone playground URL used by the open action." },
|
|
571
|
+
playgroundUrl: { type: "string", description: "Alias for webUrl." }
|
|
572
|
+
},
|
|
573
|
+
children: noChildren,
|
|
574
|
+
examples: [example("playground", {
|
|
575
|
+
namespace: "doc_playground_typical",
|
|
576
|
+
layout: {
|
|
577
|
+
"playground:demo": {
|
|
578
|
+
title: "Stat Playground",
|
|
579
|
+
previewMinHeight: "180px",
|
|
580
|
+
source: {
|
|
581
|
+
namespace: "inner_stat_demo",
|
|
582
|
+
layout: {
|
|
583
|
+
"stat:value": {
|
|
584
|
+
label: "Requests",
|
|
585
|
+
value: "1.2k",
|
|
586
|
+
unit: "/min"
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
})]
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
// src/components/entries/progress.spec.ts
|
|
596
|
+
var progressSpec = component({
|
|
597
|
+
type: "progress",
|
|
598
|
+
category: "Feedback",
|
|
599
|
+
title: "Progress",
|
|
600
|
+
summary: "Progress bar.",
|
|
601
|
+
description: "Use progress to show completion as a percentage.",
|
|
602
|
+
props: {
|
|
603
|
+
value: { type: "number", default: 0, dynamic: true, description: "Progress percentage from 0 to 100." },
|
|
604
|
+
label: { type: "string", dynamic: true, description: "Progress label." },
|
|
605
|
+
icon: { type: "string", description: "Icon name shown before the label." },
|
|
606
|
+
indeterminate: { type: "boolean", default: false, dynamic: true, description: "Render an indeterminate progress state without aria-valuenow." }
|
|
607
|
+
},
|
|
608
|
+
children: noChildren,
|
|
609
|
+
examples: [example("progress", {
|
|
610
|
+
namespace: "doc_progress_typical",
|
|
611
|
+
layout: {
|
|
612
|
+
"progress:build": {
|
|
613
|
+
label: "Build progress",
|
|
614
|
+
icon: "gear-six",
|
|
615
|
+
value: 64
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
})]
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
// src/components/entries/radio-group.spec.ts
|
|
622
|
+
var radioGroupSpec = component({
|
|
623
|
+
type: "radio-group",
|
|
624
|
+
category: "Input",
|
|
625
|
+
title: "Radio Group",
|
|
626
|
+
summary: "Single-choice option group.",
|
|
627
|
+
description: "Use radio-group for one-of-many choices.",
|
|
628
|
+
props: {
|
|
629
|
+
value: { type: "string", dynamic: true, description: "Current selected value." },
|
|
630
|
+
label: { type: "string", dynamic: true, description: "Group label." },
|
|
631
|
+
icon: { type: "string", description: "Icon name shown before the group label." },
|
|
632
|
+
options: { type: "array", description: "Options with label, value, and optional icon." },
|
|
633
|
+
"options[].icon": { type: "string", description: "Icon name shown before a single option label." },
|
|
634
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable every radio option in the group." },
|
|
635
|
+
orientation: { type: "string", values: ["vertical", "horizontal"], default: "vertical", description: "Radio option layout direction." },
|
|
636
|
+
haptic: { type: "boolean", default: true, description: "Enable vibration feedback on supported devices." },
|
|
637
|
+
haptics: { type: "boolean", default: true, description: "Alias for haptic." },
|
|
638
|
+
name: { type: "string", description: "Native radio group name shared by options." },
|
|
639
|
+
onchange: { type: "write-expression", description: "Write expression invoked when selection changes." }
|
|
640
|
+
},
|
|
641
|
+
children: noChildren,
|
|
642
|
+
examples: [example("radio-group", {
|
|
643
|
+
namespace: "doc_radio_group_typical",
|
|
644
|
+
layout: {
|
|
645
|
+
"radio-group:mode": {
|
|
646
|
+
label: "Mode",
|
|
647
|
+
icon: "sliders-horizontal",
|
|
648
|
+
value: "auto",
|
|
649
|
+
options: [
|
|
650
|
+
{
|
|
651
|
+
label: "Auto",
|
|
652
|
+
value: "auto",
|
|
653
|
+
icon: "sparkle"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
label: "Manual",
|
|
657
|
+
value: "manual",
|
|
658
|
+
icon: "wrench"
|
|
659
|
+
}
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
})]
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
// src/components/entries/row.spec.ts
|
|
667
|
+
var rowSpec = component({
|
|
668
|
+
type: "row",
|
|
669
|
+
category: "Layout",
|
|
670
|
+
title: "Row",
|
|
671
|
+
summary: "Horizontal layout container.",
|
|
672
|
+
description: "Use row to place child components horizontally in field order.",
|
|
673
|
+
props: {
|
|
674
|
+
justify: { type: "string", values: ["start", "center", "end", "space-between", "space-around"], default: "start", description: "Main-axis distribution." },
|
|
675
|
+
align: { type: "string", values: ["start", "center", "end", "baseline", "stretch"], default: "center", description: "Cross-axis alignment." },
|
|
676
|
+
gap: { type: "string", dynamic: true, description: "Spacing between children." }
|
|
677
|
+
},
|
|
678
|
+
children: childContent,
|
|
679
|
+
examples: [example("row", {
|
|
680
|
+
namespace: "doc_row_typical",
|
|
681
|
+
layout: {
|
|
682
|
+
"row:toolbar": {
|
|
683
|
+
justify: "space-between",
|
|
684
|
+
"text:title": {
|
|
685
|
+
text: "Runtime status"
|
|
686
|
+
},
|
|
687
|
+
"button:refresh": {
|
|
688
|
+
label: "Refresh"
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
})]
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
// src/components/entries/section.spec.ts
|
|
696
|
+
var sectionSpec = component({
|
|
697
|
+
type: "section",
|
|
698
|
+
category: "Content",
|
|
699
|
+
title: "Section",
|
|
700
|
+
summary: "Page section with optional heading chrome.",
|
|
701
|
+
description: "Use section to group page content with title, subtitle, and optional action link.",
|
|
702
|
+
props: {
|
|
703
|
+
title: { type: "string", dynamic: true, description: "Section title." },
|
|
704
|
+
icon: { type: "string", description: "Icon name shown before the title." },
|
|
705
|
+
eyebrow: { type: "string", dynamic: true, description: "Small label above the title." },
|
|
706
|
+
subtitle: { type: "string", dynamic: true, description: "Subtitle text below the title." },
|
|
707
|
+
actionLabel: { type: "string", dynamic: true, description: "Optional action link label." },
|
|
708
|
+
actionHref: { type: "string", description: "Optional action link target." }
|
|
709
|
+
},
|
|
710
|
+
children: childContent,
|
|
711
|
+
examples: [example("section", {
|
|
712
|
+
namespace: "doc_section_typical",
|
|
713
|
+
layout: {
|
|
714
|
+
"section:overview": {
|
|
715
|
+
eyebrow: "Dashboard",
|
|
716
|
+
title: "Runtime overview",
|
|
717
|
+
icon: "chart-bar",
|
|
718
|
+
subtitle: "This section groups the most important state.",
|
|
719
|
+
"stat:latency": {
|
|
720
|
+
label: "Latency",
|
|
721
|
+
value: "42",
|
|
722
|
+
unit: "ms"
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
})]
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
// src/components/entries/select.spec.ts
|
|
730
|
+
var selectSpec = component({
|
|
731
|
+
type: "select",
|
|
732
|
+
category: "Input",
|
|
733
|
+
title: "Select",
|
|
734
|
+
summary: "Dropdown selection input.",
|
|
735
|
+
description: "Use select for compact single-choice selection from an option list.",
|
|
736
|
+
props: {
|
|
737
|
+
label: { type: "string", dynamic: true, description: "Select label." },
|
|
738
|
+
icon: { type: "string", description: "Icon name shown before the top label." },
|
|
739
|
+
value: { type: "string", dynamic: true, description: "Current selected value." },
|
|
740
|
+
options: { type: "array", description: "Options with label, value, and optional icon." },
|
|
741
|
+
"options[].icon": { type: "string", description: "Icon name shown before an option label." },
|
|
742
|
+
placeholder: { type: "string", description: "Placeholder shown when no value is selected." },
|
|
743
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable the select trigger and native select." },
|
|
744
|
+
required: { type: "boolean", default: false, dynamic: true, description: "Require a non-placeholder value in the native select." },
|
|
745
|
+
variant: { type: "string", values: ["default", "toolbar"], default: "default", description: "Select surface variant." },
|
|
746
|
+
onchange: { type: "write-expression", description: "Write expression invoked when selection changes." }
|
|
747
|
+
},
|
|
748
|
+
children: noChildren,
|
|
749
|
+
examples: [example("select", {
|
|
750
|
+
namespace: "doc_select_typical",
|
|
751
|
+
layout: {
|
|
752
|
+
"select:env": {
|
|
753
|
+
label: "Environment",
|
|
754
|
+
icon: "server",
|
|
755
|
+
value: "prod",
|
|
756
|
+
options: [
|
|
757
|
+
{
|
|
758
|
+
label: "Development",
|
|
759
|
+
value: "dev",
|
|
760
|
+
icon: "code"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
label: "Production",
|
|
764
|
+
value: "prod",
|
|
765
|
+
icon: "rocket-launch"
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
})]
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
// src/components/entries/slider.spec.ts
|
|
774
|
+
var sliderSpec = component({
|
|
775
|
+
type: "slider",
|
|
776
|
+
category: "Input",
|
|
777
|
+
title: "Slider",
|
|
778
|
+
summary: "Numeric range input.",
|
|
779
|
+
description: "Use slider for bounded numeric adjustments such as volume, brightness, or thresholds.",
|
|
780
|
+
props: {
|
|
781
|
+
label: { type: "string", dynamic: true, description: "Slider label." },
|
|
782
|
+
icon: { type: "string", description: "Icon name shown before the label." },
|
|
783
|
+
value: { type: "number", default: 0, dynamic: true, description: "Current numeric value." },
|
|
784
|
+
min: { type: "number", default: 0, dynamic: true, description: "Minimum value." },
|
|
785
|
+
max: { type: "number", default: 100, dynamic: true, description: "Maximum value." },
|
|
786
|
+
step: { type: "number", default: 1, dynamic: true, description: "Step interval." },
|
|
787
|
+
unit: { type: "string", dynamic: true, description: "Unit shown after the value." },
|
|
788
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable the range input." },
|
|
789
|
+
orientation: { type: "string", values: ["horizontal", "vertical"], default: "horizontal", description: "Slider orientation metadata used for styling." },
|
|
790
|
+
haptic: { type: "boolean", default: true, description: "Enable vibration feedback on supported devices." },
|
|
791
|
+
haptics: { type: "boolean", default: true, description: "Alias for haptic." },
|
|
792
|
+
onchange: { type: "write-expression", description: "Write expression invoked when the value changes." }
|
|
793
|
+
},
|
|
794
|
+
children: noChildren,
|
|
795
|
+
examples: [example("slider", {
|
|
796
|
+
namespace: "doc_slider_typical",
|
|
797
|
+
layout: {
|
|
798
|
+
"slider:volume": {
|
|
799
|
+
label: "Volume",
|
|
800
|
+
icon: "speaker-high",
|
|
801
|
+
value: 42,
|
|
802
|
+
min: 0,
|
|
803
|
+
max: 100,
|
|
804
|
+
step: 1,
|
|
805
|
+
unit: "%"
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
})]
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
// src/components/entries/stat.spec.ts
|
|
812
|
+
var statSpec = component({
|
|
813
|
+
type: "stat",
|
|
814
|
+
category: "Display",
|
|
815
|
+
title: "Stat",
|
|
816
|
+
summary: "Metric display.",
|
|
817
|
+
description: "Use stat to present a labeled metric value with optional unit and semantic tone.",
|
|
818
|
+
props: {
|
|
819
|
+
label: { type: "string", dynamic: true, description: "Metric label." },
|
|
820
|
+
icon: { type: "string", description: "Icon name shown before the label." },
|
|
821
|
+
value: { type: "string | number", dynamic: true, description: "Metric value." },
|
|
822
|
+
unit: { type: "string", dynamic: true, description: "Unit shown after the value." },
|
|
823
|
+
tone: { type: "string", values: semanticTones, description: "Optional semantic tone." },
|
|
824
|
+
animateInitial: { type: "boolean", default: false, description: "Animate the initial rendered value." }
|
|
825
|
+
},
|
|
826
|
+
children: noChildren,
|
|
827
|
+
examples: [example("stat", {
|
|
828
|
+
namespace: "doc_stat_typical",
|
|
829
|
+
layout: {
|
|
830
|
+
"grid:stats": {
|
|
831
|
+
columns: 2,
|
|
832
|
+
"stat:requests": {
|
|
833
|
+
label: "Requests",
|
|
834
|
+
icon: "activity",
|
|
835
|
+
value: "1.2k",
|
|
836
|
+
unit: "/min"
|
|
837
|
+
},
|
|
838
|
+
"stat:success": {
|
|
839
|
+
label: "Success",
|
|
840
|
+
icon: "check-circle",
|
|
841
|
+
value: "98.4",
|
|
842
|
+
unit: "%",
|
|
843
|
+
tone: "success"
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
})]
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
// src/components/entries/submit.spec.ts
|
|
851
|
+
var submitSpec = component({
|
|
852
|
+
type: "submit",
|
|
853
|
+
category: "Action",
|
|
854
|
+
title: "Submit",
|
|
855
|
+
summary: "ToolHost submit and ignore controls.",
|
|
856
|
+
description: "Use submit inside tool templates to return selected state fields to the host.",
|
|
857
|
+
props: {
|
|
858
|
+
submitLabel: { type: "string", default: "Submit", description: "Submit button text." },
|
|
859
|
+
ignoreLabel: { type: "string", default: "Ignore", description: "Ignore button text." },
|
|
860
|
+
returnKeys: { type: "string[]", description: "State field paths returned to ToolHost." },
|
|
861
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable submit action." }
|
|
862
|
+
},
|
|
863
|
+
children: noChildren,
|
|
864
|
+
examples: [example("submit", {
|
|
865
|
+
namespace: "doc_submit_typical",
|
|
866
|
+
layout: {
|
|
867
|
+
"column:tool": {
|
|
868
|
+
"input:title": {
|
|
869
|
+
value: "Release note",
|
|
870
|
+
placeholder: "Title"
|
|
871
|
+
},
|
|
872
|
+
"submit:done": {
|
|
873
|
+
submitLabel: "Submit",
|
|
874
|
+
ignoreLabel: "Ignore",
|
|
875
|
+
returnKeys: [
|
|
876
|
+
"title"
|
|
877
|
+
]
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
})]
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
// src/components/entries/switch.spec.ts
|
|
885
|
+
var switchSpec = component({
|
|
886
|
+
type: "switch",
|
|
887
|
+
category: "Input",
|
|
888
|
+
title: "Switch",
|
|
889
|
+
summary: "Boolean switch input.",
|
|
890
|
+
description: "Use switch for an on/off setting.",
|
|
891
|
+
props: {
|
|
892
|
+
enabled: { type: "boolean", default: false, dynamic: true, description: "Enabled state." },
|
|
893
|
+
label: { type: "string", dynamic: true, description: "Switch label." },
|
|
894
|
+
icon: { type: "string", description: "Icon name shown before the visible label." },
|
|
895
|
+
disabled: { type: "boolean", default: false, dynamic: true, description: "Disable the switch." },
|
|
896
|
+
haptic: { type: "boolean", default: true, description: "Enable vibration feedback on supported devices." },
|
|
897
|
+
haptics: { type: "boolean", default: true, description: "Alias for haptic." },
|
|
898
|
+
onchange: { type: "write-expression", description: "Write expression invoked when enabled state changes." }
|
|
899
|
+
},
|
|
900
|
+
children: noChildren,
|
|
901
|
+
examples: [example("switch", {
|
|
902
|
+
namespace: "doc_switch_typical",
|
|
903
|
+
layout: {
|
|
904
|
+
"switch:feature": {
|
|
905
|
+
enabled: true,
|
|
906
|
+
label: "Enable sync",
|
|
907
|
+
icon: "arrows-clockwise"
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
})]
|
|
911
|
+
});
|
|
912
|
+
|
|
913
|
+
// src/components/entries/table.spec.ts
|
|
914
|
+
var tableSpec = component({
|
|
915
|
+
type: "table",
|
|
916
|
+
category: "Data",
|
|
917
|
+
title: "Table",
|
|
918
|
+
summary: "Simple data table.",
|
|
919
|
+
description: "Use table to render rows of keyed data against a column definition.",
|
|
920
|
+
props: {
|
|
921
|
+
columns: { type: "array", description: "Column definitions with key, label, and optional icon." },
|
|
922
|
+
"columns[].icon": { type: "string", description: "Icon name shown before a column label." },
|
|
923
|
+
rows: { type: "array", description: "Row data objects keyed by column key." },
|
|
924
|
+
items: { type: "array", description: "Alias for rows." }
|
|
925
|
+
},
|
|
926
|
+
children: noChildren,
|
|
927
|
+
examples: [example("table", {
|
|
928
|
+
namespace: "doc_table_typical",
|
|
929
|
+
layout: {
|
|
930
|
+
"table:routes": {
|
|
931
|
+
columns: [
|
|
932
|
+
{
|
|
933
|
+
key: "name",
|
|
934
|
+
label: "Name",
|
|
935
|
+
icon: "text-t"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
key: "status",
|
|
939
|
+
label: "Status",
|
|
940
|
+
icon: "check-circle"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
rows: [
|
|
944
|
+
{
|
|
945
|
+
name: "Parse",
|
|
946
|
+
status: "ready"
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: "Publish",
|
|
950
|
+
status: "pending"
|
|
951
|
+
}
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
})]
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
// src/components/entries/tabs.spec.ts
|
|
959
|
+
var tabsSpec = component({
|
|
960
|
+
type: "tabs",
|
|
961
|
+
category: "Navigation",
|
|
962
|
+
title: "Tabs",
|
|
963
|
+
summary: "Tabbed view switcher.",
|
|
964
|
+
description: "Use tabs to switch between named content panels.",
|
|
965
|
+
props: {
|
|
966
|
+
value: { type: "string", dynamic: true, description: "Current active tab value." },
|
|
967
|
+
tabs: { type: "array", description: "Tab definitions with value, label, content, icon, and iconOnly." },
|
|
968
|
+
"tabs[].icon": { type: "string", description: "Icon name shown before a tab trigger label." },
|
|
969
|
+
"tabs[].iconOnly": { type: "boolean", description: "Show only the tab icon while retaining label as accessible text." },
|
|
970
|
+
orientation: { type: "string", values: ["horizontal", "vertical"], default: "horizontal", description: "Tab list orientation." },
|
|
971
|
+
onchange: { type: "write-expression", description: "Write expression invoked when the active tab changes." }
|
|
972
|
+
},
|
|
973
|
+
children: noChildren,
|
|
974
|
+
examples: [example("tabs", {
|
|
975
|
+
namespace: "doc_tabs_typical",
|
|
976
|
+
layout: {
|
|
977
|
+
"tabs:main": {
|
|
978
|
+
value: "overview",
|
|
979
|
+
tabs: [
|
|
980
|
+
{
|
|
981
|
+
value: "overview",
|
|
982
|
+
label: "Overview"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
value: "settings",
|
|
986
|
+
label: "Settings"
|
|
987
|
+
}
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
})]
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
// src/components/entries/text.spec.ts
|
|
995
|
+
var textSpec = component({
|
|
996
|
+
type: "text",
|
|
997
|
+
category: "Display",
|
|
998
|
+
title: "Text",
|
|
999
|
+
summary: "Plain text display.",
|
|
1000
|
+
description: "Use text for short static or dynamic copy inside SlexKit layouts.",
|
|
1001
|
+
props: {
|
|
1002
|
+
text: { type: "string", dynamic: true, description: "Displayed text." },
|
|
1003
|
+
content: { type: "string", dynamic: true, description: "Alias for text." },
|
|
1004
|
+
label: { type: "string", dynamic: true, description: "Alias for text." },
|
|
1005
|
+
variant: { type: "string", values: ["default", "muted"], default: "default", description: "Text visual variant." },
|
|
1006
|
+
class: { type: "string", description: "Additional host-controlled CSS class." }
|
|
1007
|
+
},
|
|
1008
|
+
children: noChildren,
|
|
1009
|
+
examples: [example("text", {
|
|
1010
|
+
namespace: "doc_text_typical",
|
|
1011
|
+
layout: {
|
|
1012
|
+
"text:status": {
|
|
1013
|
+
text: "System is healthy"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
})]
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
// src/components/entries/toast.spec.ts
|
|
1020
|
+
var toastSpec = component({
|
|
1021
|
+
type: "toast",
|
|
1022
|
+
category: "Feedback",
|
|
1023
|
+
title: "Toast",
|
|
1024
|
+
summary: "Transient notification.",
|
|
1025
|
+
description: "Use toast to show an inline notification with semantic status.",
|
|
1026
|
+
props: {
|
|
1027
|
+
title: { type: "string", dynamic: true, description: "Toast title." },
|
|
1028
|
+
heading: { type: "string", dynamic: true, description: "Alias for title." },
|
|
1029
|
+
label: { type: "string", dynamic: true, description: "Alias for title." },
|
|
1030
|
+
icon: { type: "string", description: "Icon name shown at the left of the toast." },
|
|
1031
|
+
description: { type: "string", dynamic: true, description: "Toast body text." },
|
|
1032
|
+
text: { type: "string", dynamic: true, description: "Alias for description." },
|
|
1033
|
+
message: { type: "string", dynamic: true, description: "Alias for description." },
|
|
1034
|
+
content: { type: "string", dynamic: true, description: "Alias for description." },
|
|
1035
|
+
type: { type: "string", values: ["info", "success", "warning", "danger"], default: "info", description: "Semantic notification type." },
|
|
1036
|
+
tone: { type: "string", values: ["info", "success", "warning", "danger"], default: "info", description: "Alias for type." },
|
|
1037
|
+
duration: { type: "number", description: "Auto-hide delay in milliseconds." },
|
|
1038
|
+
dismissable: { type: "boolean", default: true, description: "Show a close button." },
|
|
1039
|
+
dismissible: { type: "boolean", default: true, description: "Alias for dismissable." },
|
|
1040
|
+
closeLabel: { type: "string", default: "Close notification", description: "Accessible close button label." },
|
|
1041
|
+
closeAriaLabel: { type: "string", description: "Alias for closeLabel." }
|
|
1042
|
+
},
|
|
1043
|
+
children: noChildren,
|
|
1044
|
+
examples: [example("toast", {
|
|
1045
|
+
namespace: "doc_toast_typical",
|
|
1046
|
+
layout: {
|
|
1047
|
+
"toast:saved": {
|
|
1048
|
+
type: "success",
|
|
1049
|
+
title: "Saved",
|
|
1050
|
+
icon: "check-circle",
|
|
1051
|
+
description: "Changes have been written."
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
})]
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
// src/components/entries/specs.ts
|
|
1058
|
+
var componentSpecs = [
|
|
1059
|
+
accordionSpec,
|
|
1060
|
+
badgeSpec,
|
|
1061
|
+
buttonSpec,
|
|
1062
|
+
calloutSpec,
|
|
1063
|
+
cardSpec,
|
|
1064
|
+
checkboxSpec,
|
|
1065
|
+
codeBlockSpec,
|
|
1066
|
+
collapsibleSpec,
|
|
1067
|
+
columnSpec,
|
|
1068
|
+
dividerSpec,
|
|
1069
|
+
gridSpec,
|
|
1070
|
+
iconSpec,
|
|
1071
|
+
inputSpec,
|
|
1072
|
+
linkSpec,
|
|
1073
|
+
playgroundSpec,
|
|
1074
|
+
progressSpec,
|
|
1075
|
+
radioGroupSpec,
|
|
1076
|
+
rowSpec,
|
|
1077
|
+
sectionSpec,
|
|
1078
|
+
selectSpec,
|
|
1079
|
+
sliderSpec,
|
|
1080
|
+
statSpec,
|
|
1081
|
+
submitSpec,
|
|
1082
|
+
switchSpec,
|
|
1083
|
+
tableSpec,
|
|
1084
|
+
tabsSpec,
|
|
1085
|
+
textSpec,
|
|
1086
|
+
toastSpec
|
|
1087
|
+
];
|
|
1088
|
+
export {
|
|
1089
|
+
componentSpecs
|
|
1090
|
+
};
|