@skewedaspect/sleekspace-ui 0.8.1 → 0.9.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/dist/components/Dropdown/SkDropdown.vue.d.ts +9 -1
- package/dist/components/Dropdown/types.d.ts +2 -1
- package/dist/components/NavBar/SkNavBar.vue.d.ts +9 -1
- package/dist/components/NavBar/context.d.ts +2 -0
- package/dist/components/NavBar/types.d.ts +5 -1
- package/dist/components/NumberInput/SkNumberInput.vue.d.ts +8 -0
- package/dist/components/Page/SkPage.vue.d.ts +9 -0
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +105 -4
- package/dist/composables/useCustomColors.d.ts +18 -56
- package/{src → dist}/global.d.ts +6 -2
- package/dist/sleekspace-ui.css +4257 -1253
- package/dist/sleekspace-ui.es.js +300 -170
- package/dist/sleekspace-ui.umd.js +299 -169
- package/dist/static/classes.d.ts +18 -0
- package/dist/static/components/alert.d.ts +12 -0
- package/dist/static/components/avatar.d.ts +9 -0
- package/dist/static/components/breadcrumbs.d.ts +6 -0
- package/dist/static/components/button.d.ts +13 -0
- package/dist/static/components/card.d.ts +5 -0
- package/dist/static/components/checkbox.d.ts +10 -0
- package/dist/static/components/colorPicker.d.ts +8 -0
- package/dist/static/components/divider.d.ts +8 -0
- package/dist/static/components/dropdown.d.ts +8 -0
- package/dist/static/components/field.d.ts +15 -0
- package/dist/static/components/group.d.ts +5 -0
- package/dist/static/components/input.d.ts +14 -0
- package/dist/static/components/navBar.d.ts +16 -0
- package/dist/static/components/numberInput.d.ts +15 -0
- package/dist/static/components/page.d.ts +9 -0
- package/dist/static/components/pagination.d.ts +5 -0
- package/dist/static/components/panel.d.ts +11 -0
- package/dist/static/components/progress.d.ts +9 -0
- package/dist/static/components/radio.d.ts +11 -0
- package/dist/static/components/select.d.ts +10 -0
- package/dist/static/components/sidebar.d.ts +9 -0
- package/dist/static/components/skeleton.d.ts +11 -0
- package/dist/static/components/slider.d.ts +12 -0
- package/dist/static/components/spinner.d.ts +12 -0
- package/dist/static/components/switchInput.d.ts +10 -0
- package/dist/static/components/table.d.ts +12 -0
- package/dist/static/components/tag.d.ts +8 -0
- package/dist/static/components/tagsInput.d.ts +7 -0
- package/dist/static/components/textarea.d.ts +12 -0
- package/dist/static/components/toolbar.d.ts +12 -0
- package/dist/static/components/tooltip.d.ts +7 -0
- package/dist/static/escape.d.ts +2 -0
- package/dist/static/index.cjs.js +1 -0
- package/dist/static/index.d.ts +68 -0
- package/dist/static/index.es.js +732 -0
- package/dist/static/render.d.ts +12 -0
- package/dist/static/specs.d.ts +2 -0
- package/dist/static/types.d.ts +43 -0
- package/dist/tokens.css +322 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/utils/slots.d.ts +6 -0
- package/docs/guides/installation.md +8 -2
- package/docs/guides/pure-css/_meta.yaml +8 -0
- package/docs/guides/pure-css/class-api.md +1070 -0
- package/docs/guides/pure-css/custom-elements.md +574 -0
- package/docs/guides/pure-css/index.md +86 -0
- package/docs/guides/pure-css/limitations.md +152 -0
- package/docs/guides/pure-css/static-helpers.md +1203 -0
- package/llms-full.txt +3739 -261
- package/package.json +19 -5
- package/src/components/Alert/SkAlert.vue +4 -2
- package/src/components/Breadcrumbs/SkBreadcrumbs.vue +6 -12
- package/src/components/Button/SkButton.vue +8 -5
- package/src/components/Card/SkCard.vue +13 -5
- package/src/components/Checkbox/SkCheckbox.vue +9 -2
- package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +4 -1
- package/src/components/Dropdown/SkDropdown.vue +20 -3
- package/src/components/Dropdown/SkDropdownRadioGroup.vue +4 -1
- package/src/components/Dropdown/types.ts +2 -1
- package/src/components/Modal/SkModal.vue +11 -4
- package/src/components/NavBar/SkNavBar.vue +19 -8
- package/src/components/NavBar/context.ts +4 -2
- package/src/components/NavBar/types.ts +6 -1
- package/src/components/NumberInput/SkNumberInput.vue +10 -1
- package/src/components/Page/SkPage.vue +29 -15
- package/src/components/Panel/SkPanel.vue +2 -1
- package/src/components/Popover/SkPopover.vue +11 -4
- package/src/components/Radio/SkRadio.vue +9 -2
- package/src/components/ScrollArea/SkScrollArea.vue +78 -5
- package/src/components/Switch/SkSwitch.vue +14 -13
- package/src/components/Tabs/SkTab.vue +7 -2
- package/src/components/TreeView/SkTreeItem.vue +10 -2
- package/src/components/TreeView/SkTreeView.vue +7 -2
- package/src/composables/useCustomColors.ts +86 -77
- package/src/composables/usePortalContext.test.ts +0 -2
- package/src/shims.d.ts +10 -0
- package/src/static/__tests__/parity.test.ts +717 -0
- package/src/static/__tests__/parityHarness.test.ts +98 -0
- package/src/static/__tests__/parityHarness.ts +260 -0
- package/src/static/classes.test.ts +82 -0
- package/src/static/classes.ts +111 -0
- package/src/static/components/__tests__/helpers.test.ts +837 -0
- package/src/static/components/alert.ts +117 -0
- package/src/static/components/avatar.ts +86 -0
- package/src/static/components/breadcrumbs.ts +28 -0
- package/src/static/components/button.ts +75 -0
- package/src/static/components/card.ts +27 -0
- package/src/static/components/checkbox.ts +48 -0
- package/src/static/components/colorPicker.ts +45 -0
- package/src/static/components/divider.ts +39 -0
- package/src/static/components/dropdown.ts +36 -0
- package/src/static/components/field.ts +86 -0
- package/src/static/components/group.ts +27 -0
- package/src/static/components/input.ts +55 -0
- package/src/static/components/navBar.ts +94 -0
- package/src/static/components/numberInput.ts +64 -0
- package/src/static/components/page.ts +31 -0
- package/src/static/components/pagination.ts +27 -0
- package/src/static/components/panel.ts +33 -0
- package/src/static/components/progress.ts +31 -0
- package/src/static/components/radio.ts +53 -0
- package/src/static/components/select.ts +51 -0
- package/src/static/components/sidebar.ts +85 -0
- package/src/static/components/skeleton.ts +66 -0
- package/src/static/components/slider.ts +50 -0
- package/src/static/components/spinner.ts +94 -0
- package/src/static/components/switchInput.ts +49 -0
- package/src/static/components/table.ts +88 -0
- package/src/static/components/tag.ts +76 -0
- package/src/static/components/tagsInput.ts +35 -0
- package/src/static/components/textarea.ts +53 -0
- package/src/static/components/toolbar.ts +74 -0
- package/src/static/components/tooltip.ts +29 -0
- package/src/static/escape.test.ts +53 -0
- package/src/static/escape.ts +28 -0
- package/src/static/generated/defaults.ts +379 -0
- package/src/static/generated/propTypes.ts +426 -0
- package/src/static/index.ts +116 -0
- package/src/static/render.test.ts +83 -0
- package/src/static/render.ts +76 -0
- package/src/static/specs.test.ts +58 -0
- package/src/static/specs.ts +230 -0
- package/src/static/types.ts +176 -0
- package/src/styles/__tests__/testHelpers.ts +97 -0
- package/src/styles/base/_custom-elements.scss +51 -0
- package/src/styles/base/_index.scss +4 -0
- package/src/styles/components/__tests__/componentSelectors.test.ts +2575 -0
- package/src/styles/components/_alert.scss +82 -39
- package/src/styles/components/_avatar.scss +102 -47
- package/src/styles/components/_breadcrumbs.scss +39 -37
- package/src/styles/components/_button.scss +58 -5
- package/src/styles/components/_card.scss +64 -2
- package/src/styles/components/_checkbox.scss +35 -5
- package/src/styles/components/_color-picker.scss +48 -13
- package/src/styles/components/_divider.scss +86 -52
- package/src/styles/components/_dropdown.scss +214 -0
- package/src/styles/components/_field.scss +76 -23
- package/src/styles/components/_group.scss +190 -79
- package/src/styles/components/_index.scss +1 -0
- package/src/styles/components/_input.scss +81 -5
- package/src/styles/components/_menu.scss +1 -1
- package/src/styles/components/_navbar.scss +76 -45
- package/src/styles/components/_number-input.scss +98 -85
- package/src/styles/components/_page.scss +82 -23
- package/src/styles/components/_pagination.scss +240 -212
- package/src/styles/components/_panel.scss +268 -122
- package/src/styles/components/_progress.scss +120 -70
- package/src/styles/components/_radio.scss +35 -5
- package/src/styles/components/_scroll-area.scss +50 -22
- package/src/styles/components/_select.scss +40 -9
- package/src/styles/components/_sidebar.scss +59 -34
- package/src/styles/components/_skeleton.scss +111 -65
- package/src/styles/components/_slider.scss +34 -10
- package/src/styles/components/_spinner.scss +107 -56
- package/src/styles/components/_switch.scss +36 -5
- package/src/styles/components/_table.scss +150 -166
- package/src/styles/components/_tag.scss +244 -154
- package/src/styles/components/_tags-input.scss +46 -12
- package/src/styles/components/_textarea.scss +36 -5
- package/src/styles/components/_toolbar.scss +85 -31
- package/src/styles/components/_tooltip.scss +172 -3
- package/src/styles/mixins/_cut-border.scss +18 -4
- package/src/styles/mixins/_dual-selector.scss +192 -0
- package/src/styles/mixins/_index.scss +1 -0
- package/src/styles/mixins/dualSelector.test.ts +151 -0
- package/src/styles/themes/_colorful.scss +25 -0
- package/src/styles/themes/_greyscale.scss +25 -0
- package/src/styles/themes/_shade-scale.scss +39 -0
- package/src/styles/tokens/_semantic-color-kinds.scss +66 -0
- package/src/{types.ts → types/index.ts} +19 -11
- package/src/utils/slots.ts +75 -0
- package/web-types.json +980 -137
- package/dist/composables/useCustomColors.test.d.ts +0 -1
- package/dist/composables/useFocusTrap.test.d.ts +0 -1
- package/dist/composables/usePortalContext.test.d.ts +0 -1
- package/dist/styles/mixins/fluidSize.test.d.ts +0 -1
- package/dist/types.d.ts +0 -29
|
@@ -0,0 +1,732 @@
|
|
|
1
|
+
//#region src/static/escape.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/static/classes.ts
|
|
10
|
+
function n(e) {
|
|
11
|
+
return e.replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
12
|
+
}
|
|
13
|
+
function r(e, t) {
|
|
14
|
+
let r = [e.base];
|
|
15
|
+
if (e.kind && typeof t.kind == "string" && r.push(`sk-${t.kind}`), e.size && typeof t.size == "string" && (r.push(`sk-${t.size}`), r.push(`sk-size-${t.size}`)), e.variant && typeof t.variant == "string" && r.push(`sk-${t.variant}`), e.booleanFlags) for (let i of e.booleanFlags) t[n(i)] === !0 && r.push(`sk-${i}`);
|
|
16
|
+
if (e.listFlags) for (let { prop: n, family: i } of e.listFlags) {
|
|
17
|
+
let e = t[n];
|
|
18
|
+
if (Array.isArray(e)) for (let t of e) typeof t == "string" && r.push(`sk-${i}-${t}`);
|
|
19
|
+
}
|
|
20
|
+
if (e.singleChoiceFlags) for (let { prop: n, family: i } of e.singleChoiceFlags) {
|
|
21
|
+
let e = t[n];
|
|
22
|
+
typeof e == "string" && r.push(`sk-${i}-${e}`);
|
|
23
|
+
}
|
|
24
|
+
return r.join(" ");
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/static/render.ts
|
|
28
|
+
function i(t, n, i) {
|
|
29
|
+
let a = [`class="${e(r(t.classSpec, n))}"`];
|
|
30
|
+
if (t.tag === "button" && a.push("type=\"button\""), t.extraAttrs) for (let [n, r] of Object.entries(t.extraAttrs)) a.push(`${n}="${e(r)}"`);
|
|
31
|
+
let o = [];
|
|
32
|
+
if (t.customColorVars) {
|
|
33
|
+
let { base: r, text: i } = t.customColorVars;
|
|
34
|
+
r && typeof n.baseColor == "string" && o.push(`${r}: ${e(n.baseColor)};`), i && typeof n.textColor == "string" && o.push(`${i}: ${e(n.textColor)};`);
|
|
35
|
+
}
|
|
36
|
+
o.length > 0 && a.push(`style="${o.join(" ")}"`);
|
|
37
|
+
let s = a.join(" ");
|
|
38
|
+
return t.void ? `<${t.tag} ${s} />` : `<${t.tag} ${s}>${i}</${t.tag}>`;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/static/specs.ts
|
|
42
|
+
var a = {
|
|
43
|
+
panel: {
|
|
44
|
+
tag: "div",
|
|
45
|
+
classSpec: {
|
|
46
|
+
base: "sk-panel",
|
|
47
|
+
kind: !0,
|
|
48
|
+
size: !0,
|
|
49
|
+
booleanFlags: ["no-border", "no-decoration"],
|
|
50
|
+
listFlags: [{
|
|
51
|
+
prop: "corners",
|
|
52
|
+
family: "cut"
|
|
53
|
+
}],
|
|
54
|
+
singleChoiceFlags: [{
|
|
55
|
+
prop: "decorationCorner",
|
|
56
|
+
family: "decoration"
|
|
57
|
+
}]
|
|
58
|
+
},
|
|
59
|
+
customColorVars: {
|
|
60
|
+
base: "--sk-panel-color-base",
|
|
61
|
+
text: "--sk-panel-fg"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
card: {
|
|
65
|
+
tag: "div",
|
|
66
|
+
classSpec: {
|
|
67
|
+
base: "sk-card",
|
|
68
|
+
kind: !0
|
|
69
|
+
},
|
|
70
|
+
customColorVars: {
|
|
71
|
+
base: "--sk-panel-color-base",
|
|
72
|
+
text: "--sk-panel-fg"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
alert: {
|
|
76
|
+
tag: "div",
|
|
77
|
+
classSpec: {
|
|
78
|
+
base: "sk-alert",
|
|
79
|
+
kind: !0,
|
|
80
|
+
booleanFlags: ["subtle"]
|
|
81
|
+
},
|
|
82
|
+
extraAttrs: { role: "alert" },
|
|
83
|
+
customColorVars: {
|
|
84
|
+
base: "--sk-alert-color-base",
|
|
85
|
+
text: "--sk-alert-fg"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
divider: {
|
|
89
|
+
tag: "div",
|
|
90
|
+
classSpec: {
|
|
91
|
+
base: "sk-divider",
|
|
92
|
+
kind: !0,
|
|
93
|
+
booleanFlags: ["subtle"],
|
|
94
|
+
singleChoiceFlags: [{
|
|
95
|
+
prop: "orientation",
|
|
96
|
+
family: "orientation"
|
|
97
|
+
}]
|
|
98
|
+
},
|
|
99
|
+
extraAttrs: { role: "separator" }
|
|
100
|
+
},
|
|
101
|
+
page: {
|
|
102
|
+
tag: "div",
|
|
103
|
+
classSpec: {
|
|
104
|
+
base: "sk-page",
|
|
105
|
+
booleanFlags: [
|
|
106
|
+
"flush",
|
|
107
|
+
"fixed-header",
|
|
108
|
+
"fixed-footer"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
group: {
|
|
113
|
+
tag: "div",
|
|
114
|
+
classSpec: {
|
|
115
|
+
base: "sk-group",
|
|
116
|
+
singleChoiceFlags: [{
|
|
117
|
+
prop: "orientation",
|
|
118
|
+
family: "orientation"
|
|
119
|
+
}]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
skeleton: {
|
|
123
|
+
tag: "div",
|
|
124
|
+
classSpec: {
|
|
125
|
+
base: "sk-skeleton",
|
|
126
|
+
singleChoiceFlags: [{
|
|
127
|
+
prop: "variant",
|
|
128
|
+
family: "shape"
|
|
129
|
+
}],
|
|
130
|
+
booleanFlags: ["shimmer", "pulse"]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
progress: {
|
|
134
|
+
tag: "progress",
|
|
135
|
+
classSpec: {
|
|
136
|
+
base: "sk-progress",
|
|
137
|
+
kind: !0,
|
|
138
|
+
size: !0,
|
|
139
|
+
booleanFlags: ["indeterminate"]
|
|
140
|
+
},
|
|
141
|
+
void: !0
|
|
142
|
+
},
|
|
143
|
+
spinner: {
|
|
144
|
+
tag: "div",
|
|
145
|
+
classSpec: {
|
|
146
|
+
base: "sk-spinner",
|
|
147
|
+
kind: !0,
|
|
148
|
+
size: !0
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
navBar: {
|
|
152
|
+
tag: "nav",
|
|
153
|
+
classSpec: {
|
|
154
|
+
base: "sk-navbar",
|
|
155
|
+
kind: !0,
|
|
156
|
+
booleanFlags: ["sticky"]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
toolbar: {
|
|
160
|
+
tag: "div",
|
|
161
|
+
classSpec: {
|
|
162
|
+
base: "sk-toolbar",
|
|
163
|
+
kind: !0,
|
|
164
|
+
singleChoiceFlags: [{
|
|
165
|
+
prop: "orientation",
|
|
166
|
+
family: "orientation"
|
|
167
|
+
}]
|
|
168
|
+
},
|
|
169
|
+
extraAttrs: { role: "toolbar" }
|
|
170
|
+
},
|
|
171
|
+
sidebar: {
|
|
172
|
+
tag: "aside",
|
|
173
|
+
classSpec: {
|
|
174
|
+
base: "sk-sidebar",
|
|
175
|
+
kind: !0,
|
|
176
|
+
booleanFlags: ["dense"]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
breadcrumbs: {
|
|
180
|
+
tag: "nav",
|
|
181
|
+
classSpec: {
|
|
182
|
+
base: "sk-breadcrumbs",
|
|
183
|
+
kind: !0
|
|
184
|
+
},
|
|
185
|
+
extraAttrs: { "aria-label": "Breadcrumbs" }
|
|
186
|
+
},
|
|
187
|
+
pagination: {
|
|
188
|
+
tag: "nav",
|
|
189
|
+
classSpec: {
|
|
190
|
+
base: "sk-pagination",
|
|
191
|
+
kind: !0
|
|
192
|
+
},
|
|
193
|
+
extraAttrs: { "aria-label": "Pagination" }
|
|
194
|
+
},
|
|
195
|
+
tag: {
|
|
196
|
+
tag: "span",
|
|
197
|
+
classSpec: {
|
|
198
|
+
base: "sk-tag",
|
|
199
|
+
kind: !0,
|
|
200
|
+
size: !0,
|
|
201
|
+
variant: !0,
|
|
202
|
+
booleanFlags: ["removable"]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
avatar: {
|
|
206
|
+
tag: "div",
|
|
207
|
+
classSpec: {
|
|
208
|
+
base: "sk-avatar",
|
|
209
|
+
kind: !0,
|
|
210
|
+
size: !0,
|
|
211
|
+
singleChoiceFlags: [{
|
|
212
|
+
prop: "shape",
|
|
213
|
+
family: "shape"
|
|
214
|
+
}]
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
field: {
|
|
218
|
+
tag: "div",
|
|
219
|
+
classSpec: {
|
|
220
|
+
base: "sk-field",
|
|
221
|
+
booleanFlags: ["has-error"],
|
|
222
|
+
singleChoiceFlags: [{
|
|
223
|
+
prop: "labelPosition",
|
|
224
|
+
family: "label-position"
|
|
225
|
+
}]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
table: {
|
|
229
|
+
tag: "table",
|
|
230
|
+
classSpec: {
|
|
231
|
+
base: "sk-table",
|
|
232
|
+
kind: !0,
|
|
233
|
+
variant: !0,
|
|
234
|
+
booleanFlags: [
|
|
235
|
+
"striped",
|
|
236
|
+
"bordered",
|
|
237
|
+
"compact",
|
|
238
|
+
"comfortable"
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
tooltip: {
|
|
243
|
+
tag: "div",
|
|
244
|
+
classSpec: {
|
|
245
|
+
base: "sk-tooltip",
|
|
246
|
+
kind: !0,
|
|
247
|
+
variant: !0,
|
|
248
|
+
singleChoiceFlags: [{
|
|
249
|
+
prop: "placement",
|
|
250
|
+
family: "placement"
|
|
251
|
+
}]
|
|
252
|
+
},
|
|
253
|
+
extraAttrs: { role: "tooltip" }
|
|
254
|
+
},
|
|
255
|
+
input: {
|
|
256
|
+
tag: "input",
|
|
257
|
+
classSpec: {
|
|
258
|
+
base: "sk-input",
|
|
259
|
+
kind: !0,
|
|
260
|
+
size: !0
|
|
261
|
+
},
|
|
262
|
+
void: !0
|
|
263
|
+
},
|
|
264
|
+
textarea: {
|
|
265
|
+
tag: "textarea",
|
|
266
|
+
classSpec: {
|
|
267
|
+
base: "sk-textarea",
|
|
268
|
+
kind: !0,
|
|
269
|
+
size: !0
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
select: {
|
|
273
|
+
tag: "select",
|
|
274
|
+
classSpec: {
|
|
275
|
+
base: "sk-select",
|
|
276
|
+
kind: !0,
|
|
277
|
+
size: !0
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
slider: {
|
|
281
|
+
tag: "input",
|
|
282
|
+
classSpec: {
|
|
283
|
+
base: "sk-slider",
|
|
284
|
+
kind: !0,
|
|
285
|
+
size: !0,
|
|
286
|
+
singleChoiceFlags: [{
|
|
287
|
+
prop: "orientation",
|
|
288
|
+
family: "orientation"
|
|
289
|
+
}]
|
|
290
|
+
},
|
|
291
|
+
void: !0,
|
|
292
|
+
extraAttrs: { type: "range" }
|
|
293
|
+
},
|
|
294
|
+
colorPicker: {
|
|
295
|
+
tag: "input",
|
|
296
|
+
classSpec: {
|
|
297
|
+
base: "sk-color-picker",
|
|
298
|
+
size: !0
|
|
299
|
+
},
|
|
300
|
+
void: !0,
|
|
301
|
+
extraAttrs: { type: "color" }
|
|
302
|
+
},
|
|
303
|
+
dropdown: {
|
|
304
|
+
tag: "details",
|
|
305
|
+
classSpec: {
|
|
306
|
+
base: "sk-dropdown",
|
|
307
|
+
kind: !0,
|
|
308
|
+
size: !0
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/static/components/panel.ts
|
|
314
|
+
function o(e = {}, t = "") {
|
|
315
|
+
return i(a.panel, e, t);
|
|
316
|
+
}
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/static/components/card.ts
|
|
319
|
+
function s(e = {}, t = "") {
|
|
320
|
+
return i(a.card, e, t);
|
|
321
|
+
}
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/static/components/alert.ts
|
|
324
|
+
var c = new Set([
|
|
325
|
+
"info",
|
|
326
|
+
"success",
|
|
327
|
+
"warning",
|
|
328
|
+
"danger"
|
|
329
|
+
]), l = {
|
|
330
|
+
info: "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"></line><circle cx=\"12\" cy=\"8\" r=\"0.5\" fill=\"currentColor\"></circle></svg>",
|
|
331
|
+
success: "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path><polyline points=\"22 4 12 14.01 9 11.01\"></polyline></svg>",
|
|
332
|
+
warning: "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"></path><line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"></line><circle cx=\"12\" cy=\"17\" r=\"0.5\" fill=\"currentColor\"></circle></svg>",
|
|
333
|
+
danger: "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"></line><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"></line></svg>"
|
|
334
|
+
};
|
|
335
|
+
function u(t = {}, n = "") {
|
|
336
|
+
let i = t.kind ?? "info", a = [`class="${e(r({
|
|
337
|
+
base: "sk-alert",
|
|
338
|
+
kind: !0,
|
|
339
|
+
booleanFlags: ["subtle"]
|
|
340
|
+
}, {
|
|
341
|
+
...t,
|
|
342
|
+
kind: i
|
|
343
|
+
}))}"`, "role=\"alert\""], o = [];
|
|
344
|
+
typeof t.baseColor == "string" && o.push(`--sk-alert-color-base: ${e(t.baseColor)};`), typeof t.textColor == "string" && o.push(`--sk-alert-fg: ${e(t.textColor)};`), o.length > 0 && a.push(`style="${o.join(" ")}"`);
|
|
345
|
+
let s = "";
|
|
346
|
+
if (t.icon !== !1) {
|
|
347
|
+
let e = typeof t.icon == "string" ? t.icon : c.has(i) ? l[i] ?? "" : null;
|
|
348
|
+
e !== null && (s = `<div class="sk-alert-icon">${e}</div>`);
|
|
349
|
+
}
|
|
350
|
+
let u = `<div class="sk-alert-content">${n}</div>`;
|
|
351
|
+
return `<div ${a.join(" ")}>${s}${u}</div>`;
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region src/static/components/divider.ts
|
|
355
|
+
function d(t = {}) {
|
|
356
|
+
let n = t.orientation ?? "horizontal", r = t.kind ?? "neutral", i = t.size ?? "md", a = [
|
|
357
|
+
"sk-divider",
|
|
358
|
+
`sk-${n}`,
|
|
359
|
+
`sk-${r}`,
|
|
360
|
+
`sk-${i}`
|
|
361
|
+
];
|
|
362
|
+
return t.variant === "subtle" && a.push("sk-subtle"), `<hr class="${e(a.join(" "))}" role="separator">`;
|
|
363
|
+
}
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/static/components/page.ts
|
|
366
|
+
function f(e = {}, t = "") {
|
|
367
|
+
return i(a.page, e, t);
|
|
368
|
+
}
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/static/components/group.ts
|
|
371
|
+
function p(e = {}, t = "") {
|
|
372
|
+
return i(a.group, e, t);
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region src/static/components/skeleton.ts
|
|
376
|
+
function m(t = {}) {
|
|
377
|
+
let n = t.variant ?? "text", r = t.animation ?? "shimmer", i = ["sk-skeleton", `sk-${n}`];
|
|
378
|
+
r !== "none" && i.push(`sk-${r}`);
|
|
379
|
+
let a = [`class="${e(i.join(" "))}"`], o = [], s = t.height ?? ((n === "circular" || n === "square") && t.width ? t.width : void 0);
|
|
380
|
+
return typeof t.width == "string" && o.push(`width: ${e(t.width)};`), typeof s == "string" && o.push(`height: ${e(s)};`), o.length > 0 && a.push(`style="${o.join(" ")}"`), `<div ${a.join(" ")}></div>`;
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/static/components/progress.ts
|
|
384
|
+
function h(e = {}, t = "") {
|
|
385
|
+
return i(a.progress, e, t);
|
|
386
|
+
}
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/static/components/spinner.ts
|
|
389
|
+
function g(e) {
|
|
390
|
+
switch (e) {
|
|
391
|
+
case "circular": return "<div class=\"sk-spinner-circular\"><div class=\"sk-arc sk-arc-large\"></div><div class=\"sk-arc sk-arc-small\"></div></div>";
|
|
392
|
+
case "dots": return "<div class=\"sk-spinner-dots\"><div class=\"sk-dot\"></div><div class=\"sk-dot\"></div><div class=\"sk-dot\"></div></div>";
|
|
393
|
+
case "crosshair": return "<div class=\"sk-crosshair-loader\"></div>";
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function _(t = {}) {
|
|
397
|
+
let n = t.kind ?? "primary", r = t.size ?? "md", i = t.variant ?? "circular", a = [
|
|
398
|
+
`class="${e([
|
|
399
|
+
"sk-spinner",
|
|
400
|
+
`sk-${n}`,
|
|
401
|
+
`sk-${r}`,
|
|
402
|
+
`sk-variant-${i}`
|
|
403
|
+
].join(" "))}"`,
|
|
404
|
+
"role=\"status\"",
|
|
405
|
+
"aria-live=\"polite\"",
|
|
406
|
+
"aria-label=\"Loading\""
|
|
407
|
+
];
|
|
408
|
+
return typeof t.color == "string" && a.push(`style="--sk-spinner-color: ${e(t.color)};"`), `<div ${a.join(" ")}>${g(i)}</div>`;
|
|
409
|
+
}
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/static/components/navBar.ts
|
|
412
|
+
function v(t = {}, n = "") {
|
|
413
|
+
let i = t.sticky !== !1, a = r({
|
|
414
|
+
base: "sk-navbar",
|
|
415
|
+
kind: !0
|
|
416
|
+
}, t), o = [`class="${e(i ? `${a} sk-sticky` : a)}"`], s = [];
|
|
417
|
+
typeof t.baseColor == "string" && s.push(`--sk-navbar-color-base: ${e(t.baseColor)};`), typeof t.textColor == "string" && s.push(`--sk-navbar-fg: ${e(t.textColor)};`), s.length > 0 && o.push(`style="${s.join(" ")}"`);
|
|
418
|
+
let c = "";
|
|
419
|
+
t.leading && (c += `<div class="sk-navbar-leading">${t.leading}</div>`), t.brand && (c += `<div class="sk-navbar-brand">${t.brand}</div>`), n && (c += `<div class="sk-navbar-nav">${n}</div>`), t.actions && (c += `<div class="sk-navbar-actions">${t.actions}</div>`);
|
|
420
|
+
let l = `<div class="sk-navbar-content">${c}</div>`;
|
|
421
|
+
return `<nav ${o.join(" ")}>${l}</nav>`;
|
|
422
|
+
}
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region src/static/components/toolbar.ts
|
|
425
|
+
var y = [
|
|
426
|
+
"top-left",
|
|
427
|
+
"top-right",
|
|
428
|
+
"bottom-right",
|
|
429
|
+
"bottom-left"
|
|
430
|
+
];
|
|
431
|
+
function b(t = {}, n = "") {
|
|
432
|
+
let r = t.kind, i = t.orientation ?? "horizontal", a = t.corners ?? y, o = ["sk-toolbar"];
|
|
433
|
+
typeof r == "string" && o.push(`sk-${r}`), o.push(`sk-${i}`);
|
|
434
|
+
for (let e of a) o.push(`sk-cut-${e}`);
|
|
435
|
+
let s = [`class="${e(o.join(" "))}"`, "role=\"toolbar\""], c = [];
|
|
436
|
+
return typeof t.baseColor == "string" && c.push(`--sk-toolbar-color-base: ${e(t.baseColor)};`), typeof t.textColor == "string" && c.push(`--sk-toolbar-fg: ${e(t.textColor)};`), c.length > 0 && s.push(`style="${c.join(" ")}"`), `<div ${s.join(" ")}>${n}</div>`;
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/static/components/sidebar.ts
|
|
440
|
+
function x(t = {}, n = "") {
|
|
441
|
+
let r = t.kind ?? "neutral", i = t.side ?? "left", a = ["sk-sidebar", `sk-${r}`];
|
|
442
|
+
i === "right" && a.push("sk-sidebar-right"), t.dense === !0 && a.push("sk-dense");
|
|
443
|
+
let o = i === "right" ? "bottom-left" : "bottom-right", s = [
|
|
444
|
+
"sk-panel",
|
|
445
|
+
`sk-${r}`,
|
|
446
|
+
"sk-md",
|
|
447
|
+
`sk-cut-${o}`,
|
|
448
|
+
`sk-decoration-${o}`,
|
|
449
|
+
"sk-sidebar-panel"
|
|
450
|
+
], c = `class="${e(a.join(" "))}"`, l = `class="${e(s.join(" "))}"`, u = [];
|
|
451
|
+
return typeof t.baseColor == "string" && u.push(`--sk-sidebar-color-base: ${e(t.baseColor)};`), `<aside ${c}${u.length > 0 ? ` style="${u.join(" ")}"` : ""}><div ${l}>${`<div class="sk-panel-scroll-content"><nav class="sk-sidebar-nav">${n}</nav></div>`}</div></aside>`;
|
|
452
|
+
}
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/static/components/breadcrumbs.ts
|
|
455
|
+
function S(e = {}, t = "") {
|
|
456
|
+
return i(a.breadcrumbs, e, t);
|
|
457
|
+
}
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region src/static/components/pagination.ts
|
|
460
|
+
function C(e = {}, t = "") {
|
|
461
|
+
return i(a.pagination, e, t);
|
|
462
|
+
}
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/static/components/tag.ts
|
|
465
|
+
var w = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg>";
|
|
466
|
+
function T(t = {}, n = "") {
|
|
467
|
+
let r = t.kind ?? "neutral", i = t.variant ?? "solid", a = t.size ?? "md", o = [
|
|
468
|
+
"sk-tag",
|
|
469
|
+
`sk-${r}`,
|
|
470
|
+
`sk-${i}`,
|
|
471
|
+
`sk-${a}`
|
|
472
|
+
];
|
|
473
|
+
t.removable && o.push("sk-removable");
|
|
474
|
+
let s = [`class="${e(o.join(" "))}"`], c = [];
|
|
475
|
+
typeof t.baseColor == "string" && c.push(`--sk-tag-color-base: ${e(t.baseColor)};`), typeof t.textColor == "string" && c.push(`--sk-tag-fg: ${e(t.textColor)};`), c.length > 0 && s.push(`style="${c.join(" ")}"`);
|
|
476
|
+
let l = `<span class="sk-tag-content">${n}</span>`, u = t.removable ? `<button type="button" class="sk-tag-remove" aria-label="Remove">${w}</button>` : "";
|
|
477
|
+
return `<span ${s.join(" ")}>${l}${u}</span>`;
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/static/components/avatar.ts
|
|
481
|
+
var E = "<svg class=\"sk-avatar-icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"></path></svg>";
|
|
482
|
+
function D(t = {}) {
|
|
483
|
+
let n = t.kind ?? "neutral", r = t.size ?? "md", i = [`class="${e([
|
|
484
|
+
"sk-avatar",
|
|
485
|
+
`sk-${n}`,
|
|
486
|
+
`sk-${r}`
|
|
487
|
+
].join(" "))}"`], a = [];
|
|
488
|
+
typeof t.baseColor == "string" && a.push(`--sk-avatar-color-base: ${e(t.baseColor)};`), typeof t.textColor == "string" && a.push(`--sk-avatar-fg: ${e(t.textColor)};`), a.length > 0 && i.push(`style="${a.join(" ")}"`);
|
|
489
|
+
let o;
|
|
490
|
+
if (t.src) {
|
|
491
|
+
let n = t.alt ?? "";
|
|
492
|
+
o = `<img src="${e(t.src)}" alt="${e(n)}" class="sk-avatar-image">`;
|
|
493
|
+
} else o = t.initials ? `<span class="sk-avatar-initials">${e(t.initials.slice(0, 2).toUpperCase())}</span>` : E;
|
|
494
|
+
return `<div ${i.join(" ")}>${o}</div>`;
|
|
495
|
+
}
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/static/components/field.ts
|
|
498
|
+
function O(t = {}, n = "") {
|
|
499
|
+
let r = ["sk-field", `sk-label-${t.labelPosition ?? "top"}`];
|
|
500
|
+
t.error && r.push("sk-has-error");
|
|
501
|
+
let i = `class="${e(r.join(" "))}"`, a = "";
|
|
502
|
+
if (t.label) {
|
|
503
|
+
let n = t.id ? ` for="${e(t.id)}"` : "", r = t.required ? "<span class=\"sk-field-required\">*</span>" : "";
|
|
504
|
+
a = `<label${n} class="sk-field-label">${e(t.label)}${r}</label>`;
|
|
505
|
+
}
|
|
506
|
+
let o = `<div class="sk-field-input-wrapper">${n}</div>`, s = "";
|
|
507
|
+
t.description && !t.error && (s = `<p${t.id ? ` id="${e(t.id)}-description"` : ""} class="sk-field-description">${e(t.description)}</p>`);
|
|
508
|
+
let c = "";
|
|
509
|
+
return t.error && (c = `<p${t.id ? ` id="${e(t.id)}-error"` : ""} class="sk-field-error">${e(t.error)}</p>`), `<div ${i}>${a}${o}${s}${c}</div>`;
|
|
510
|
+
}
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region src/static/components/table.ts
|
|
513
|
+
function k(t = {}, n = "") {
|
|
514
|
+
let r = t.kind ?? "neutral", i = t.variant ?? "default", a = t.hoverable !== !1, o = t.bordered !== !1, s = t.innerBorders === !0, c = t.subtle === !0, l = t.darkBackground === !0, u = t.striped === !0, d = ["sk-table-wrapper", `sk-table-wrapper-${r}`];
|
|
515
|
+
l && d.push("sk-dark-background"), c && d.push("sk-subtle");
|
|
516
|
+
let f = [
|
|
517
|
+
"sk-table",
|
|
518
|
+
`sk-${r}`,
|
|
519
|
+
`sk-${i}`
|
|
520
|
+
];
|
|
521
|
+
u && f.push("sk-striped"), a && f.push("sk-hoverable"), o && f.push("sk-bordered"), s || f.push("sk-no-inner-borders"), c && f.push("sk-subtle");
|
|
522
|
+
let p = [`class="${e(f.join(" "))}"`], m = [];
|
|
523
|
+
return typeof t.baseColor == "string" && m.push(`--sk-table-color-base: ${e(t.baseColor)};`), typeof t.textColor == "string" && m.push(`--sk-table-fg: ${e(t.textColor)};`), m.length > 0 && p.push(`style="${m.join(" ")}"`), `<div ${`class="${e(d.join(" "))}"`}><table ${p.join(" ")}>${n}</table></div>`;
|
|
524
|
+
}
|
|
525
|
+
//#endregion
|
|
526
|
+
//#region src/static/components/tooltip.ts
|
|
527
|
+
function A(e = {}, t = "") {
|
|
528
|
+
return i(a.tooltip, e, t);
|
|
529
|
+
}
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/static/components/button.ts
|
|
532
|
+
function j(t = {}, n = "") {
|
|
533
|
+
let i = [`class="${e(r({
|
|
534
|
+
base: "sk-button",
|
|
535
|
+
kind: !0,
|
|
536
|
+
size: !0,
|
|
537
|
+
variant: !0,
|
|
538
|
+
booleanFlags: [
|
|
539
|
+
"loading",
|
|
540
|
+
"pressed",
|
|
541
|
+
"dense"
|
|
542
|
+
]
|
|
543
|
+
}, t))}"`], a = typeof t.href == "string";
|
|
544
|
+
if (a) i.push(`href="${e(t.href ?? "")}"`);
|
|
545
|
+
else {
|
|
546
|
+
let n = t.type ?? "button";
|
|
547
|
+
i.push(`type="${e(n)}"`);
|
|
548
|
+
}
|
|
549
|
+
t.disabled && i.push(a ? "aria-disabled=\"true\"" : "disabled"), t.loading && i.push("aria-busy=\"true\""), t.pressed && i.push("aria-pressed=\"true\"");
|
|
550
|
+
let o = a ? "a" : "button", s = `<span class="sk-button-chrome">${n}</span>`;
|
|
551
|
+
return `<${o} ${i.join(" ")}>${s}</${o}>`;
|
|
552
|
+
}
|
|
553
|
+
//#endregion
|
|
554
|
+
//#region src/static/components/input.ts
|
|
555
|
+
function M(t = {}) {
|
|
556
|
+
let n = [`class="${e(r({
|
|
557
|
+
base: "sk-input",
|
|
558
|
+
kind: !0,
|
|
559
|
+
size: !0
|
|
560
|
+
}, t))}"`];
|
|
561
|
+
for (let r of [
|
|
562
|
+
"type",
|
|
563
|
+
"value",
|
|
564
|
+
"placeholder",
|
|
565
|
+
"name",
|
|
566
|
+
"id"
|
|
567
|
+
]) {
|
|
568
|
+
let i = t[r];
|
|
569
|
+
typeof i == "string" && n.push(`${r}="${e(i)}"`);
|
|
570
|
+
}
|
|
571
|
+
for (let e of [
|
|
572
|
+
"disabled",
|
|
573
|
+
"readonly",
|
|
574
|
+
"required"
|
|
575
|
+
]) t[e] === !0 && n.push(e);
|
|
576
|
+
return `<input ${n.join(" ")} />`;
|
|
577
|
+
}
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region src/static/components/textarea.ts
|
|
580
|
+
function N(t = {}, n = "") {
|
|
581
|
+
let i = [`class="${e(r({
|
|
582
|
+
base: "sk-textarea",
|
|
583
|
+
kind: !0,
|
|
584
|
+
size: !0
|
|
585
|
+
}, t))}"`];
|
|
586
|
+
for (let n of [
|
|
587
|
+
"placeholder",
|
|
588
|
+
"name",
|
|
589
|
+
"id"
|
|
590
|
+
]) {
|
|
591
|
+
let r = t[n];
|
|
592
|
+
typeof r == "string" && i.push(`${n}="${e(r)}"`);
|
|
593
|
+
}
|
|
594
|
+
for (let e of [
|
|
595
|
+
"disabled",
|
|
596
|
+
"readonly",
|
|
597
|
+
"required"
|
|
598
|
+
]) t[e] === !0 && i.push(e);
|
|
599
|
+
return `<textarea ${i.join(" ")}>${n}</textarea>`;
|
|
600
|
+
}
|
|
601
|
+
//#endregion
|
|
602
|
+
//#region src/static/components/select.ts
|
|
603
|
+
function P(t = {}, n = "") {
|
|
604
|
+
let i = [`class="${e(r({
|
|
605
|
+
base: "sk-select",
|
|
606
|
+
kind: !0,
|
|
607
|
+
size: !0
|
|
608
|
+
}, t))}"`];
|
|
609
|
+
for (let n of ["name", "id"]) {
|
|
610
|
+
let r = t[n];
|
|
611
|
+
typeof r == "string" && i.push(`${n}="${e(r)}"`);
|
|
612
|
+
}
|
|
613
|
+
for (let e of ["disabled", "required"]) t[e] === !0 && i.push(e);
|
|
614
|
+
return `<select ${i.join(" ")}>${n}</select>`;
|
|
615
|
+
}
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region src/static/components/slider.ts
|
|
618
|
+
function F(t = {}) {
|
|
619
|
+
let n = [`class="${e(r({
|
|
620
|
+
base: "sk-slider",
|
|
621
|
+
kind: !0,
|
|
622
|
+
size: !0
|
|
623
|
+
}, t))}"`, "type=\"range\""];
|
|
624
|
+
for (let r of [
|
|
625
|
+
"min",
|
|
626
|
+
"max",
|
|
627
|
+
"step",
|
|
628
|
+
"value",
|
|
629
|
+
"name"
|
|
630
|
+
]) {
|
|
631
|
+
let i = t[r];
|
|
632
|
+
typeof i == "string" && n.push(`${r}="${e(i)}"`);
|
|
633
|
+
}
|
|
634
|
+
return t.disabled === !0 && n.push("disabled"), `<input ${n.join(" ")} />`;
|
|
635
|
+
}
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region src/static/components/colorPicker.ts
|
|
638
|
+
function I(t = {}) {
|
|
639
|
+
let n = [`class="${e(r({
|
|
640
|
+
base: "sk-color-picker",
|
|
641
|
+
size: !0
|
|
642
|
+
}, t))}"`, "type=\"color\""];
|
|
643
|
+
for (let r of ["value", "name"]) {
|
|
644
|
+
let i = t[r];
|
|
645
|
+
typeof i == "string" && n.push(`${r}="${e(i)}"`);
|
|
646
|
+
}
|
|
647
|
+
return t.disabled === !0 && n.push("disabled"), `<input ${n.join(" ")} />`;
|
|
648
|
+
}
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region src/static/components/checkbox.ts
|
|
651
|
+
function L(t = {}, n = "") {
|
|
652
|
+
let i = r({
|
|
653
|
+
base: "sk-checkbox",
|
|
654
|
+
kind: !0,
|
|
655
|
+
size: !0
|
|
656
|
+
}, t), a = ["type=\"checkbox\""];
|
|
657
|
+
t.name && a.push(`name="${e(t.name)}"`), t.checked === !0 && a.push("checked"), t.disabled === !0 && a.push("disabled"), t.required === !0 && a.push("required");
|
|
658
|
+
let o = `<input ${a.join(" ")} />`, s = `<span class="sk-checkbox-label">${n}</span>`;
|
|
659
|
+
return `<label class="${e(i)}">${o}<span class="sk-checkbox-box"></span>${s}</label>`;
|
|
660
|
+
}
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region src/static/components/radio.ts
|
|
663
|
+
function R(t = {}, n = "") {
|
|
664
|
+
let i = r({
|
|
665
|
+
base: "sk-radio",
|
|
666
|
+
kind: !0,
|
|
667
|
+
size: !0
|
|
668
|
+
}, t), a = ["type=\"radio\""];
|
|
669
|
+
t.name && a.push(`name="${e(t.name)}"`), t.value !== void 0 && a.push(`value="${e(t.value)}"`), t.checked === !0 && a.push("checked"), t.disabled === !0 && a.push("disabled"), t.required === !0 && a.push("required");
|
|
670
|
+
let o = `<input ${a.join(" ")} />`, s = `<span class="sk-radio-label">${n}</span>`;
|
|
671
|
+
return `<label class="${e(i)}">${o}<span class="sk-radio-dot"></span>${s}</label>`;
|
|
672
|
+
}
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/static/components/switchInput.ts
|
|
675
|
+
function z(t = {}, n = "") {
|
|
676
|
+
let i = r({
|
|
677
|
+
base: "sk-switch",
|
|
678
|
+
kind: !0,
|
|
679
|
+
size: !0
|
|
680
|
+
}, t), a = ["type=\"checkbox\""];
|
|
681
|
+
t.name && a.push(`name="${e(t.name)}"`), t.checked === !0 && a.push("checked"), t.disabled === !0 && a.push("disabled"), t.required === !0 && a.push("required");
|
|
682
|
+
let o = `<input ${a.join(" ")} />`, s = `<span class="sk-switch-label">${n}</span>`;
|
|
683
|
+
return `<label class="${e(i)}">${o}<span class="sk-switch-track"><span class="sk-switch-thumb"></span></span>${s}</label>`;
|
|
684
|
+
}
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region src/static/components/numberInput.ts
|
|
687
|
+
function B(t = {}) {
|
|
688
|
+
let n = r({
|
|
689
|
+
base: "sk-number-input-wrapper",
|
|
690
|
+
kind: !0,
|
|
691
|
+
size: !0
|
|
692
|
+
}, t), i = ["class=\"sk-number-input-field\"", "type=\"number\""];
|
|
693
|
+
for (let n of [
|
|
694
|
+
"value",
|
|
695
|
+
"min",
|
|
696
|
+
"max",
|
|
697
|
+
"step",
|
|
698
|
+
"name",
|
|
699
|
+
"placeholder"
|
|
700
|
+
]) {
|
|
701
|
+
let r = t[n];
|
|
702
|
+
typeof r == "string" && i.push(`${n}="${e(r)}"`);
|
|
703
|
+
}
|
|
704
|
+
for (let e of [
|
|
705
|
+
"disabled",
|
|
706
|
+
"readonly",
|
|
707
|
+
"required"
|
|
708
|
+
]) t[e] === !0 && i.push(e);
|
|
709
|
+
let a = `<input ${i.join(" ")} />`;
|
|
710
|
+
return `<div class="${e(n)}">${a}</div>`;
|
|
711
|
+
}
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/static/components/tagsInput.ts
|
|
714
|
+
function V(t = {}, n = "") {
|
|
715
|
+
return `<div class="${e(r({
|
|
716
|
+
base: "sk-tags-input",
|
|
717
|
+
kind: !0,
|
|
718
|
+
size: !0
|
|
719
|
+
}, t))}">${n}</div>`;
|
|
720
|
+
}
|
|
721
|
+
//#endregion
|
|
722
|
+
//#region src/static/components/dropdown.ts
|
|
723
|
+
function H(t, n = "") {
|
|
724
|
+
let i = [`class="${e(r({
|
|
725
|
+
base: "sk-dropdown",
|
|
726
|
+
kind: !0,
|
|
727
|
+
size: !0
|
|
728
|
+
}, t))}"`];
|
|
729
|
+
return t.open && i.push("open"), `<details ${i.join(" ")}><summary>${e(t.summary)}</summary>${n}</details>`;
|
|
730
|
+
}
|
|
731
|
+
//#endregion
|
|
732
|
+
export { u as alert, D as avatar, S as breadcrumbs, j as button, s as card, L as checkbox, I as colorPicker, r as composeClasses, d as divider, H as dropdown, e as escapeAttr, O as field, p as group, M as input, v as navBar, B as numberInput, f as page, C as pagination, o as panel, h as progress, R as radio, i as render, P as select, x as sidebar, m as skeleton, F as slider, _ as spinner, z as switchInput, k as table, T as tag, V as tagsInput, t as text, N as textarea, b as toolbar, A as tooltip };
|