da-style 0.1.1 → 0.1.2
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/LICENSE +21 -0
- package/README.md +225 -0
- package/dist/da-style.css +2 -0
- package/dist/da-style.js +2 -0
- package/dist/da-style.mjs +704 -0
- package/dist/src/components/Button/DButton.types.d.ts +23 -0
- package/dist/src/components/Button/DButton.vue.d.ts +29 -0
- package/dist/src/components/Button/index.d.ts +4 -0
- package/dist/src/components/Icon/DIcon.types.d.ts +12 -0
- package/dist/src/components/Icon/DIcon.vue.d.ts +8 -0
- package/dist/src/components/Icon/icons.d.ts +2 -0
- package/dist/src/components/Icon/index.d.ts +5 -0
- package/dist/src/components/Input/DInput.types.d.ts +17 -0
- package/dist/src/components/Input/DInput.vue.d.ts +45 -0
- package/dist/src/components/Input/index.d.ts +9 -0
- package/dist/src/components/Loading/DLoading.types.d.ts +14 -0
- package/dist/src/components/Loading/DLoading.vue.d.ts +10 -0
- package/dist/src/components/Loading/index.d.ts +8 -0
- package/dist/src/components/Tag/DTag.types.d.ts +22 -0
- package/dist/src/components/Tag/DTag.vue.d.ts +25 -0
- package/dist/src/components/Tag/index.d.ts +9 -0
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/shared/index.d.ts +3 -0
- package/dist/src/shared/props.d.ts +24 -0
- package/dist/src/shared/types.d.ts +15 -0
- package/dist/src/shared/utils.d.ts +7 -0
- package/dist/src/token/borders.d.ts +41 -0
- package/dist/src/token/colors.d.ts +84 -0
- package/dist/src/token/index.d.ts +20 -0
- package/dist/src/token/inject.d.ts +24 -0
- package/dist/src/token/shadows.d.ts +43 -0
- package/dist/src/token/spacing.d.ts +58 -0
- package/dist/src/token/typography.d.ts +86 -0
- package/package.json +38 -45
- package/lib/da-style.common.js +0 -2011
- package/lib/da-style.common.js.map +0 -1
- package/lib/da-style.css +0 -1
- package/lib/da-style.umd.js +0 -2021
- package/lib/da-style.umd.js.map +0 -1
- package/lib/da-style.umd.min.js +0 -2
- package/lib/da-style.umd.min.js.map +0 -1
- package/lib/demo.html +0 -10
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, normalizeStyle as l, openBlock as u, ref as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, withModifiers as _ } from "vue";
|
|
2
|
+
//#region src/shared/utils.ts
|
|
3
|
+
var v = (e) => typeof e == "string", y = (e) => typeof e == "number", b = (e) => typeof e == "boolean", x = (e) => e === void 0, ee = (e) => typeof e == "function", te = (e, t, n) => Math.min(Math.max(e, t), n), S = (...e) => {
|
|
4
|
+
let t = [];
|
|
5
|
+
for (let n of e) if (n) {
|
|
6
|
+
if (v(n)) t.push(n);
|
|
7
|
+
else if (typeof n == "object") for (let [e, r] of Object.entries(n)) r && t.push(e);
|
|
8
|
+
}
|
|
9
|
+
return t.join(" ");
|
|
10
|
+
}, ne = [
|
|
11
|
+
"disabled",
|
|
12
|
+
"type",
|
|
13
|
+
"aria-busy"
|
|
14
|
+
], re = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "d-btn__spinner"
|
|
17
|
+
}, ie = { class: "d-btn__content" }, ae = /*@__PURE__*/ o({
|
|
18
|
+
__name: "DButton",
|
|
19
|
+
props: {
|
|
20
|
+
status: { default: "primary" },
|
|
21
|
+
size: { default: "medium" },
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
loading: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
glow: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
ghost: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
block: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
round: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
circle: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
nativeType: { default: "button" }
|
|
51
|
+
},
|
|
52
|
+
emits: ["click"],
|
|
53
|
+
setup(e, { emit: a }) {
|
|
54
|
+
let o = e, s = a, l = t(() => S("d-btn", `d-btn--${o.status}`, `d-btn--${o.size}`, {
|
|
55
|
+
"d-btn--disabled": o.disabled,
|
|
56
|
+
"d-btn--loading": o.loading,
|
|
57
|
+
"d-btn--glow": o.glow,
|
|
58
|
+
"d-btn--ghost": o.ghost,
|
|
59
|
+
"d-btn--block": o.block,
|
|
60
|
+
"d-btn--round": o.round,
|
|
61
|
+
"d-btn--circle": o.circle
|
|
62
|
+
}));
|
|
63
|
+
function d(e) {
|
|
64
|
+
!o.disabled && !o.loading && s("click", e);
|
|
65
|
+
}
|
|
66
|
+
return (t, a) => (u(), r("button", {
|
|
67
|
+
class: c(l.value),
|
|
68
|
+
disabled: e.disabled || e.loading,
|
|
69
|
+
type: e.nativeType,
|
|
70
|
+
"aria-busy": e.loading || void 0,
|
|
71
|
+
onClick: d
|
|
72
|
+
}, [
|
|
73
|
+
e.loading ? (u(), r("span", re)) : n("", !0),
|
|
74
|
+
i("span", ie, [p(t.$slots, "default", {}, void 0, !0)]),
|
|
75
|
+
a[0] ||= i("span", {
|
|
76
|
+
class: "d-btn__scanline",
|
|
77
|
+
"aria-hidden": "true"
|
|
78
|
+
}, null, -1)
|
|
79
|
+
], 10, ne));
|
|
80
|
+
}
|
|
81
|
+
}), C = (e, t) => {
|
|
82
|
+
let n = e.__vccOpts || e;
|
|
83
|
+
for (let [e, r] of t) n[e] = r;
|
|
84
|
+
return n;
|
|
85
|
+
}, w = /*#__PURE__*/ C(ae, [["__scopeId", "data-v-fe9a4e44"]]);
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/Button/index.ts
|
|
88
|
+
w.install = (e) => {
|
|
89
|
+
e.component(w.name ?? "DButton", w);
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/shared/props.ts
|
|
93
|
+
var oe = (e = "medium") => ({
|
|
94
|
+
type: String,
|
|
95
|
+
default: e,
|
|
96
|
+
validator: (e) => [
|
|
97
|
+
"small",
|
|
98
|
+
"medium",
|
|
99
|
+
"large"
|
|
100
|
+
].includes(e)
|
|
101
|
+
}), se = (e = "primary") => ({
|
|
102
|
+
type: String,
|
|
103
|
+
default: e,
|
|
104
|
+
validator: (e) => [
|
|
105
|
+
"primary",
|
|
106
|
+
"success",
|
|
107
|
+
"warning",
|
|
108
|
+
"danger",
|
|
109
|
+
"info"
|
|
110
|
+
].includes(e)
|
|
111
|
+
}), ce = () => ({
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !1
|
|
114
|
+
}), le = () => ({
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: !1
|
|
117
|
+
}), ue = () => ({
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !1
|
|
120
|
+
}), de = {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: "d-input__affix d-input__affix--prefix"
|
|
123
|
+
}, fe = [
|
|
124
|
+
"type",
|
|
125
|
+
"value",
|
|
126
|
+
"disabled",
|
|
127
|
+
"readonly",
|
|
128
|
+
"placeholder"
|
|
129
|
+
], pe = {
|
|
130
|
+
key: 2,
|
|
131
|
+
class: "d-input__affix d-input__affix--suffix"
|
|
132
|
+
}, me = /*#__PURE__*/ C(/* @__PURE__ */ o({
|
|
133
|
+
__name: "DInput",
|
|
134
|
+
props: /*@__PURE__*/ s({
|
|
135
|
+
modelValue: {},
|
|
136
|
+
type: { default: "text" },
|
|
137
|
+
size: { default: "medium" },
|
|
138
|
+
disabled: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: !1
|
|
141
|
+
},
|
|
142
|
+
readonly: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
default: !1
|
|
145
|
+
},
|
|
146
|
+
placeholder: { default: "" },
|
|
147
|
+
clearable: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: !1
|
|
150
|
+
},
|
|
151
|
+
glow: {
|
|
152
|
+
type: Boolean,
|
|
153
|
+
default: !1
|
|
154
|
+
},
|
|
155
|
+
prefix: {},
|
|
156
|
+
suffix: {}
|
|
157
|
+
}, {
|
|
158
|
+
modelValue: { default: "" },
|
|
159
|
+
modelModifiers: {}
|
|
160
|
+
}),
|
|
161
|
+
emits: ["update:modelValue"],
|
|
162
|
+
setup(e) {
|
|
163
|
+
let o = e, s = d(null), l = d(!1), f = g(e, "modelValue"), h = t(() => S("d-input", `d-input--${o.size}`, {
|
|
164
|
+
"d-input--disabled": o.disabled,
|
|
165
|
+
"d-input--readonly": o.readonly,
|
|
166
|
+
"d-input--focused": l.value,
|
|
167
|
+
"d-input--glow": o.glow && l.value
|
|
168
|
+
}));
|
|
169
|
+
function _(e) {
|
|
170
|
+
o.disabled || (f.value = e.target.value);
|
|
171
|
+
}
|
|
172
|
+
function v() {
|
|
173
|
+
f.value = "", s.value?.focus();
|
|
174
|
+
}
|
|
175
|
+
function y() {
|
|
176
|
+
l.value = !0;
|
|
177
|
+
}
|
|
178
|
+
function b() {
|
|
179
|
+
l.value = !1;
|
|
180
|
+
}
|
|
181
|
+
function x() {
|
|
182
|
+
s.value?.focus();
|
|
183
|
+
}
|
|
184
|
+
return (t, o) => (u(), r("div", {
|
|
185
|
+
class: c(h.value),
|
|
186
|
+
onClick: x
|
|
187
|
+
}, [
|
|
188
|
+
e.prefix !== void 0 || t.$slots.prefix ? (u(), r("span", de, [p(t.$slots, "prefix", {}, () => [a(m(e.prefix), 1)], !0)])) : n("", !0),
|
|
189
|
+
i("input", {
|
|
190
|
+
ref_key: "inputRef",
|
|
191
|
+
ref: s,
|
|
192
|
+
type: e.type,
|
|
193
|
+
value: f.value,
|
|
194
|
+
disabled: e.disabled,
|
|
195
|
+
readonly: e.readonly,
|
|
196
|
+
placeholder: e.placeholder,
|
|
197
|
+
class: "d-input__native",
|
|
198
|
+
onInput: _,
|
|
199
|
+
onFocus: y,
|
|
200
|
+
onBlur: b
|
|
201
|
+
}, null, 40, fe),
|
|
202
|
+
e.clearable && f.value ? (u(), r("button", {
|
|
203
|
+
key: 1,
|
|
204
|
+
class: "d-input__clear",
|
|
205
|
+
onClick: v,
|
|
206
|
+
type: "button",
|
|
207
|
+
tabindex: "-1",
|
|
208
|
+
"aria-label": "clear"
|
|
209
|
+
}, "×")) : n("", !0),
|
|
210
|
+
e.suffix !== void 0 || t.$slots.suffix ? (u(), r("span", pe, [p(t.$slots, "suffix", {}, () => [a(m(e.suffix), 1)], !0)])) : n("", !0),
|
|
211
|
+
o[0] ||= i("span", {
|
|
212
|
+
class: "d-input__scanline",
|
|
213
|
+
"aria-hidden": "true"
|
|
214
|
+
}, null, -1)
|
|
215
|
+
], 2));
|
|
216
|
+
}
|
|
217
|
+
}), [["__scopeId", "data-v-21d07f13"]]), he = {
|
|
218
|
+
primary: "--d-cyan",
|
|
219
|
+
success: "--d-green",
|
|
220
|
+
warning: "--d-yellow",
|
|
221
|
+
danger: "--d-red",
|
|
222
|
+
info: "--d-purple"
|
|
223
|
+
}, ge = {
|
|
224
|
+
primary: "--d-glow-cyan",
|
|
225
|
+
success: "--d-glow-green",
|
|
226
|
+
warning: "--d-glow-yellow",
|
|
227
|
+
danger: "--d-glow-red",
|
|
228
|
+
info: "--d-glow-purple"
|
|
229
|
+
}, _e = /*#__PURE__*/ C(/* @__PURE__ */ o({
|
|
230
|
+
__name: "DTag",
|
|
231
|
+
props: {
|
|
232
|
+
status: { default: "primary" },
|
|
233
|
+
size: { default: "medium" },
|
|
234
|
+
closable: {
|
|
235
|
+
type: Boolean,
|
|
236
|
+
default: !1
|
|
237
|
+
},
|
|
238
|
+
ghost: {
|
|
239
|
+
type: Boolean,
|
|
240
|
+
default: !1
|
|
241
|
+
},
|
|
242
|
+
glow: {
|
|
243
|
+
type: Boolean,
|
|
244
|
+
default: !1
|
|
245
|
+
},
|
|
246
|
+
round: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: !1
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
emits: ["close"],
|
|
252
|
+
setup(e, { emit: i }) {
|
|
253
|
+
let a = e, o = i, s = t(() => S("d-tag", `d-tag--${a.status}`, `d-tag--${a.size}`, {
|
|
254
|
+
"d-tag--ghost": a.ghost,
|
|
255
|
+
"d-tag--glow": a.glow,
|
|
256
|
+
"d-tag--round": a.round,
|
|
257
|
+
"d-tag--closable": a.closable
|
|
258
|
+
})), d = t(() => {
|
|
259
|
+
let e = { "--d-tag-accent": `var(${he[a.status]})` };
|
|
260
|
+
return a.glow && (e["--d-tag-glow"] = `var(${ge[a.status]})`), e;
|
|
261
|
+
});
|
|
262
|
+
function f() {
|
|
263
|
+
o("close");
|
|
264
|
+
}
|
|
265
|
+
return (t, i) => (u(), r("span", {
|
|
266
|
+
class: c(s.value),
|
|
267
|
+
style: l(d.value)
|
|
268
|
+
}, [p(t.$slots, "default", {}, void 0, !0), e.closable ? (u(), r("button", {
|
|
269
|
+
key: 0,
|
|
270
|
+
class: "d-tag__close",
|
|
271
|
+
"aria-label": "close",
|
|
272
|
+
onClick: _(f, ["stop"]),
|
|
273
|
+
onMousedown: i[0] ||= _(() => {}, ["prevent"])
|
|
274
|
+
}, " × ", 32)) : n("", !0)], 6));
|
|
275
|
+
}
|
|
276
|
+
}), [["__scopeId", "data-v-e3cafe54"]]), ve = ["aria-label"], ye = {
|
|
277
|
+
key: 0,
|
|
278
|
+
class: "d-loading__spinner"
|
|
279
|
+
}, be = {
|
|
280
|
+
key: 1,
|
|
281
|
+
class: "d-loading__dots"
|
|
282
|
+
}, xe = {
|
|
283
|
+
key: 3,
|
|
284
|
+
class: "d-loading__text"
|
|
285
|
+
}, Se = /*#__PURE__*/ C(/* @__PURE__ */ o({
|
|
286
|
+
__name: "DLoading",
|
|
287
|
+
props: {
|
|
288
|
+
type: { default: "spinner" },
|
|
289
|
+
size: { default: "medium" },
|
|
290
|
+
color: { default: void 0 },
|
|
291
|
+
text: { default: void 0 },
|
|
292
|
+
fullscreen: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: !1
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
setup(a) {
|
|
298
|
+
let o = a, s = {
|
|
299
|
+
small: 16,
|
|
300
|
+
medium: 24,
|
|
301
|
+
large: 32
|
|
302
|
+
}, d = {
|
|
303
|
+
small: 2,
|
|
304
|
+
medium: 3,
|
|
305
|
+
large: 4
|
|
306
|
+
}, p = {
|
|
307
|
+
small: 6,
|
|
308
|
+
medium: 8,
|
|
309
|
+
large: 10
|
|
310
|
+
}, h = [
|
|
311
|
+
"var(--d-cyan)",
|
|
312
|
+
"var(--d-magenta)",
|
|
313
|
+
"var(--d-purple)"
|
|
314
|
+
], g = t(() => s[o.size] ?? 24), _ = t(() => d[o.size] ?? 3), v = t(() => p[o.size] ?? 8), y = t(() => o.color || "var(--d-cyan)"), b = t(() => ({
|
|
315
|
+
"d-loading": !0,
|
|
316
|
+
[`d-loading--${o.type}`]: !0,
|
|
317
|
+
"d-loading--fullscreen": o.fullscreen,
|
|
318
|
+
"d-loading--has-color": !!o.color
|
|
319
|
+
})), x = t(() => {
|
|
320
|
+
let e = {};
|
|
321
|
+
return o.color && (e["--d-loading-custom-color"] = o.color), e;
|
|
322
|
+
}), ee = t(() => ({
|
|
323
|
+
width: `${g.value}px`,
|
|
324
|
+
height: `${g.value}px`,
|
|
325
|
+
borderWidth: `${_.value}px`
|
|
326
|
+
})), te = t(() => {
|
|
327
|
+
let e = `${g.value * 2.5}px`;
|
|
328
|
+
return {
|
|
329
|
+
width: e,
|
|
330
|
+
height: e
|
|
331
|
+
};
|
|
332
|
+
});
|
|
333
|
+
function S(e) {
|
|
334
|
+
let t = o.color ? `var(--d-loading-custom-color, ${y.value})` : h[e - 1];
|
|
335
|
+
return {
|
|
336
|
+
width: `${v.value}px`,
|
|
337
|
+
height: `${v.value}px`,
|
|
338
|
+
backgroundColor: t,
|
|
339
|
+
boxShadow: `0 0 4px ${t}, 0 0 10px ${t}, 0 0 20px ${t}`
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function ne(e) {
|
|
343
|
+
let t = (e - 1) * .5;
|
|
344
|
+
return {
|
|
345
|
+
width: `${g.value}px`,
|
|
346
|
+
height: `${g.value}px`,
|
|
347
|
+
borderColor: y.value,
|
|
348
|
+
boxShadow: `0 0 6px ${y.value}, 0 0 12px ${y.value}`,
|
|
349
|
+
animationDelay: `${t}s`
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
return (t, a) => (u(), r("div", {
|
|
353
|
+
class: c(b.value),
|
|
354
|
+
style: l(x.value),
|
|
355
|
+
role: "status",
|
|
356
|
+
"aria-label": o.text || "Loading"
|
|
357
|
+
}, [o.type === "spinner" ? (u(), r("div", ye, [i("div", {
|
|
358
|
+
class: "d-loading__spinner-ring",
|
|
359
|
+
style: l(ee.value)
|
|
360
|
+
}, null, 4)])) : o.type === "dots" ? (u(), r("div", be, [(u(), r(e, null, f(3, (e) => i("div", {
|
|
361
|
+
key: e,
|
|
362
|
+
class: "d-loading__dot",
|
|
363
|
+
style: l(S(e))
|
|
364
|
+
}, null, 4)), 64))])) : (u(), r("div", {
|
|
365
|
+
key: 2,
|
|
366
|
+
class: "d-loading__pulse",
|
|
367
|
+
style: l(te.value)
|
|
368
|
+
}, [(u(), r(e, null, f(3, (e) => i("div", {
|
|
369
|
+
key: e,
|
|
370
|
+
class: "d-loading__pulse-ring",
|
|
371
|
+
style: l(ne(e))
|
|
372
|
+
}, null, 4)), 64))], 4)), o.text ? (u(), r("p", xe, m(o.text), 1)) : n("", !0)], 14, ve));
|
|
373
|
+
}
|
|
374
|
+
}), [["__scopeId", "data-v-57cfd478"]]), Ce = {
|
|
375
|
+
close: "M6 18 18 6M6 6l12 12",
|
|
376
|
+
check: "M5 13l4 4L19 7",
|
|
377
|
+
"chevron-left": "M15 19l-7-7 7-7",
|
|
378
|
+
"chevron-right": "M9 5l7 7-7 7",
|
|
379
|
+
"chevron-down": "M19 9l-7 7-7-7",
|
|
380
|
+
"chevron-up": "M5 15l7-7 7 7",
|
|
381
|
+
loading: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
382
|
+
search: "M21 21l-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0z",
|
|
383
|
+
info: "M11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9-3.75h.008v.008H12V8.25z",
|
|
384
|
+
warning: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",
|
|
385
|
+
error: "m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
|
|
386
|
+
success: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
|
|
387
|
+
eye: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0zM2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z",
|
|
388
|
+
"eye-off": "M3.98 3.98A10.96 10.96 0 0 1 12 5c4.477 0 8.268 2.943 9.542 7a10.94 10.94 0 0 1-2.068 4.002m-1.334 1.334A10.96 10.96 0 0 1 12 19c-4.477 0-8.268-2.943-9.542-7a10.95 10.95 0 0 1 2.068-4.002M9.879 9.879a3 3 0 0 0 4.242 4.242m4.242-8.242L4.93 19.07"
|
|
389
|
+
}, we = [
|
|
390
|
+
"width",
|
|
391
|
+
"height",
|
|
392
|
+
"stroke",
|
|
393
|
+
"aria-label"
|
|
394
|
+
], Te = ["d"], T = /*#__PURE__*/ C(/* @__PURE__ */ o({
|
|
395
|
+
__name: "DIcon",
|
|
396
|
+
props: {
|
|
397
|
+
name: {},
|
|
398
|
+
size: { default: "medium" },
|
|
399
|
+
color: { default: "" },
|
|
400
|
+
spin: {
|
|
401
|
+
type: Boolean,
|
|
402
|
+
default: !1
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
setup(e) {
|
|
406
|
+
let n = e, a = {
|
|
407
|
+
small: 16,
|
|
408
|
+
medium: 24,
|
|
409
|
+
large: 32
|
|
410
|
+
}, o = t(() => typeof n.size == "number" ? n.size : a[n.size] ?? 24);
|
|
411
|
+
return (t, n) => (u(), r("svg", {
|
|
412
|
+
class: c(["d-icon", { "d-icon--spin": e.spin }]),
|
|
413
|
+
width: o.value,
|
|
414
|
+
height: o.value,
|
|
415
|
+
stroke: e.color || "currentColor",
|
|
416
|
+
viewBox: "0 0 24 24",
|
|
417
|
+
fill: "none",
|
|
418
|
+
"stroke-width": "2",
|
|
419
|
+
"stroke-linecap": "round",
|
|
420
|
+
"stroke-linejoin": "round",
|
|
421
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
422
|
+
"aria-label": e.name,
|
|
423
|
+
role: "img"
|
|
424
|
+
}, [i("path", { d: h(Ce)[e.name] }, null, 8, Te)], 10, we));
|
|
425
|
+
}
|
|
426
|
+
}), [["__scopeId", "data-v-932d5321"]]);
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region src/components/Icon/index.ts
|
|
429
|
+
T.install = (e) => {
|
|
430
|
+
e.component("DIcon", T);
|
|
431
|
+
};
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region src/token/colors.ts
|
|
434
|
+
var Ee = "#0a0a0f", De = "#12121a", Oe = "#1a1a2e", ke = "rgba(10,10,15,0.9)", Ae = "#e0e0ff", je = "#8888aa", Me = "#444466", Ne = "#0a0a0f", Pe = "#00f0ff", Fe = "#ff00c8", Ie = "#7000ff", Le = "#0066ff", Re = "#ffea00", ze = "#00ff41", Be = "#ff6600", Ve = "#ff003c", He = "var(--d-cyan)", Ue = "var(--d-green)", We = "var(--d-yellow)", Ge = "var(--d-red)", Ke = "var(--d-purple)", qe = {
|
|
435
|
+
bg: {
|
|
436
|
+
primary: "--d-bg-primary",
|
|
437
|
+
secondary: "--d-bg-secondary",
|
|
438
|
+
elevated: "--d-bg-elevated",
|
|
439
|
+
overlay: "--d-bg-overlay"
|
|
440
|
+
},
|
|
441
|
+
text: {
|
|
442
|
+
primary: "--d-text-primary",
|
|
443
|
+
secondary: "--d-text-secondary",
|
|
444
|
+
disabled: "--d-text-disabled",
|
|
445
|
+
inverse: "--d-text-inverse"
|
|
446
|
+
},
|
|
447
|
+
accent: {
|
|
448
|
+
cyan: "--d-cyan",
|
|
449
|
+
magenta: "--d-magenta",
|
|
450
|
+
purple: "--d-purple",
|
|
451
|
+
blue: "--d-blue",
|
|
452
|
+
yellow: "--d-yellow",
|
|
453
|
+
green: "--d-green",
|
|
454
|
+
orange: "--d-orange",
|
|
455
|
+
red: "--d-red"
|
|
456
|
+
},
|
|
457
|
+
semantic: {
|
|
458
|
+
primary: "--d-color-primary",
|
|
459
|
+
success: "--d-color-success",
|
|
460
|
+
warning: "--d-color-warning",
|
|
461
|
+
danger: "--d-color-danger",
|
|
462
|
+
info: "--d-color-info"
|
|
463
|
+
}
|
|
464
|
+
}, E = {
|
|
465
|
+
bgPrimary: Ee,
|
|
466
|
+
bgSecondary: De,
|
|
467
|
+
bgElevated: Oe,
|
|
468
|
+
bgOverlay: ke,
|
|
469
|
+
textPrimary: Ae,
|
|
470
|
+
textSecondary: je,
|
|
471
|
+
textDisabled: Me,
|
|
472
|
+
textInverse: Ne,
|
|
473
|
+
cyan: Pe,
|
|
474
|
+
magenta: Fe,
|
|
475
|
+
purple: Ie,
|
|
476
|
+
blue: Le,
|
|
477
|
+
yellow: Re,
|
|
478
|
+
green: ze,
|
|
479
|
+
orange: Be,
|
|
480
|
+
red: Ve,
|
|
481
|
+
colorPrimary: He,
|
|
482
|
+
colorSuccess: Ue,
|
|
483
|
+
colorWarning: We,
|
|
484
|
+
colorDanger: Ge,
|
|
485
|
+
colorInfo: Ke
|
|
486
|
+
}, Je = "4px", Ye = "8px", D = "12px", O = "16px", k = "20px", A = "24px", j = "32px", M = "40px", N = "48px", P = "640px", F = "768px", I = "1024px", L = "1280px", Xe = {
|
|
487
|
+
space: {
|
|
488
|
+
1: "--d-spacing-1",
|
|
489
|
+
2: "--d-spacing-2",
|
|
490
|
+
3: "--d-spacing-3",
|
|
491
|
+
4: "--d-spacing-4",
|
|
492
|
+
5: "--d-spacing-5",
|
|
493
|
+
6: "--d-spacing-6",
|
|
494
|
+
8: "--d-spacing-8",
|
|
495
|
+
10: "--d-spacing-10",
|
|
496
|
+
12: "--d-spacing-12"
|
|
497
|
+
},
|
|
498
|
+
container: {
|
|
499
|
+
sm: "--d-container-sm",
|
|
500
|
+
md: "--d-container-md",
|
|
501
|
+
lg: "--d-container-lg",
|
|
502
|
+
xl: "--d-container-xl"
|
|
503
|
+
}
|
|
504
|
+
}, Ze = {
|
|
505
|
+
space1: "4px",
|
|
506
|
+
space2: "8px",
|
|
507
|
+
space3: D,
|
|
508
|
+
space4: O,
|
|
509
|
+
space5: k,
|
|
510
|
+
space6: A,
|
|
511
|
+
space8: j,
|
|
512
|
+
space10: M,
|
|
513
|
+
space12: N,
|
|
514
|
+
containerSm: P,
|
|
515
|
+
containerMd: F,
|
|
516
|
+
containerLg: I,
|
|
517
|
+
containerXl: L
|
|
518
|
+
}, R = "'Courier New', 'Consolas', 'Source Code Pro', monospace", Qe = "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", z = "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", B = "'Courier New', Consolas, monospace", V = "12px", H = "14px", U = "16px", W = "18px", G = "20px", K = "24px", q = "30px", $e = "400", et = "500", tt = "600", nt = "700", rt = "1.2", it = "1.5", J = "1.75", Y = "-0.02em", at = "0", X = "0.08em", ot = {
|
|
519
|
+
font: {
|
|
520
|
+
mono: "--d-font-mono",
|
|
521
|
+
sans: "--d-font-sans",
|
|
522
|
+
heading: "--d-font-heading",
|
|
523
|
+
body: "--d-font-body"
|
|
524
|
+
},
|
|
525
|
+
size: {
|
|
526
|
+
xs: "--d-text-xs",
|
|
527
|
+
sm: "--d-text-sm",
|
|
528
|
+
base: "--d-text-base",
|
|
529
|
+
lg: "--d-text-lg",
|
|
530
|
+
xl: "--d-text-xl",
|
|
531
|
+
"2xl": "--d-text-2xl",
|
|
532
|
+
"3xl": "--d-text-3xl"
|
|
533
|
+
},
|
|
534
|
+
weight: {
|
|
535
|
+
regular: "--d-weight-regular",
|
|
536
|
+
medium: "--d-weight-medium",
|
|
537
|
+
semibold: "--d-weight-semibold",
|
|
538
|
+
bold: "--d-weight-bold"
|
|
539
|
+
},
|
|
540
|
+
leading: {
|
|
541
|
+
tight: "--d-leading-tight",
|
|
542
|
+
normal: "--d-leading-normal",
|
|
543
|
+
relaxed: "--d-leading-relaxed"
|
|
544
|
+
},
|
|
545
|
+
tracking: {
|
|
546
|
+
tight: "--d-tracking-tight",
|
|
547
|
+
normal: "--d-tracking-normal",
|
|
548
|
+
wide: "--d-tracking-wide"
|
|
549
|
+
}
|
|
550
|
+
}, st = {
|
|
551
|
+
fontMono: R,
|
|
552
|
+
fontSans: Qe,
|
|
553
|
+
fontHeading: z,
|
|
554
|
+
fontBody: B,
|
|
555
|
+
textXs: V,
|
|
556
|
+
textSm: H,
|
|
557
|
+
textBase: U,
|
|
558
|
+
textLg: W,
|
|
559
|
+
textXl: G,
|
|
560
|
+
text2xl: K,
|
|
561
|
+
text3xl: q,
|
|
562
|
+
weightRegular: "400",
|
|
563
|
+
weightMedium: "500",
|
|
564
|
+
weightSemibold: "600",
|
|
565
|
+
weightBold: "700",
|
|
566
|
+
leadingTight: "1.2",
|
|
567
|
+
leadingNormal: "1.5",
|
|
568
|
+
leadingRelaxed: J,
|
|
569
|
+
trackingTight: Y,
|
|
570
|
+
trackingNormal: "0",
|
|
571
|
+
trackingWide: X
|
|
572
|
+
}, ct = "0", lt = "2px", ut = "4px", dt = "8px", Z = "9999px", ft = "1px", pt = "2px", mt = "4px", ht = {
|
|
573
|
+
radius: {
|
|
574
|
+
none: "--d-radius-none",
|
|
575
|
+
sm: "--d-radius-sm",
|
|
576
|
+
md: "--d-radius-md",
|
|
577
|
+
lg: "--d-radius-lg",
|
|
578
|
+
full: "--d-radius-full"
|
|
579
|
+
},
|
|
580
|
+
width: {
|
|
581
|
+
default: "--d-border-width",
|
|
582
|
+
md: "--d-border-width-md",
|
|
583
|
+
lg: "--d-border-width-lg"
|
|
584
|
+
}
|
|
585
|
+
}, gt = {
|
|
586
|
+
radiusNone: "0",
|
|
587
|
+
radiusSm: "2px",
|
|
588
|
+
radiusMd: "4px",
|
|
589
|
+
radiusLg: "8px",
|
|
590
|
+
radiusFull: Z,
|
|
591
|
+
borderWidth: "1px",
|
|
592
|
+
borderWidthMd: "2px",
|
|
593
|
+
borderWidthLg: "4px"
|
|
594
|
+
}, Q = "0 1px 2px rgba(0,0,0,0.5)", $ = "0 4px 8px rgba(0,0,0,0.6)", _t = "0 8px 24px rgba(0,0,0,0.7)", vt = "0 0 4px rgba(0,240,255,0.6), 0 0 12px rgba(0,240,255,0.4), 0 0 24px rgba(0,240,255,0.2), 0 0 48px rgba(0,240,255,0.1)", yt = "0 0 4px rgba(255,0,200,0.6), 0 0 12px rgba(255,0,200,0.4), 0 0 24px rgba(255,0,200,0.2), 0 0 48px rgba(255,0,200,0.1)", bt = "0 0 4px rgba(112,0,255,0.6), 0 0 12px rgba(112,0,255,0.4), 0 0 24px rgba(112,0,255,0.2)", xt = "0 0 4px rgba(0,255,65,0.6), 0 0 12px rgba(0,255,65,0.4), 0 0 24px rgba(0,255,65,0.2)", St = "0 0 4px rgba(255,234,0,0.6), 0 0 12px rgba(255,234,0,0.4), 0 0 24px rgba(255,234,0,0.2)", Ct = "0 0 4px rgba(255,0,60,0.6), 0 0 12px rgba(255,0,60,0.4), 0 0 24px rgba(255,0,60,0.2)", wt = {
|
|
595
|
+
shadow: {
|
|
596
|
+
sm: "--d-shadow-sm",
|
|
597
|
+
md: "--d-shadow-md",
|
|
598
|
+
lg: "--d-shadow-lg"
|
|
599
|
+
},
|
|
600
|
+
glow: {
|
|
601
|
+
cyan: "--d-glow-cyan",
|
|
602
|
+
magenta: "--d-glow-magenta",
|
|
603
|
+
purple: "--d-glow-purple",
|
|
604
|
+
green: "--d-glow-green",
|
|
605
|
+
yellow: "--d-glow-yellow",
|
|
606
|
+
red: "--d-glow-red"
|
|
607
|
+
}
|
|
608
|
+
}, Tt = {
|
|
609
|
+
shadowSm: Q,
|
|
610
|
+
shadowMd: $,
|
|
611
|
+
shadowLg: _t,
|
|
612
|
+
shadowGlowCyan: vt,
|
|
613
|
+
shadowGlowMagenta: yt,
|
|
614
|
+
shadowGlowPurple: bt,
|
|
615
|
+
shadowGlowGreen: xt,
|
|
616
|
+
shadowGlowYellow: St,
|
|
617
|
+
shadowGlowRed: Ct
|
|
618
|
+
};
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region src/token/inject.ts
|
|
621
|
+
function Et() {
|
|
622
|
+
return {
|
|
623
|
+
"bg-primary": E.bgPrimary,
|
|
624
|
+
"bg-secondary": E.bgSecondary,
|
|
625
|
+
"bg-elevated": E.bgElevated,
|
|
626
|
+
"bg-overlay": E.bgOverlay,
|
|
627
|
+
"text-primary": E.textPrimary,
|
|
628
|
+
"text-secondary": E.textSecondary,
|
|
629
|
+
"text-disabled": E.textDisabled,
|
|
630
|
+
"text-inverse": E.textInverse,
|
|
631
|
+
cyan: E.cyan,
|
|
632
|
+
magenta: E.magenta,
|
|
633
|
+
yellow: E.yellow,
|
|
634
|
+
green: E.green,
|
|
635
|
+
orange: E.orange,
|
|
636
|
+
red: E.red,
|
|
637
|
+
"color-primary": E.colorPrimary.replace("var(--d-cyan)", E.cyan),
|
|
638
|
+
"color-success": E.colorSuccess.replace("var(--d-green)", E.green),
|
|
639
|
+
"color-warning": E.colorWarning.replace("var(--d-yellow)", E.yellow),
|
|
640
|
+
"color-danger": E.colorDanger.replace("var(--d-red)", E.red),
|
|
641
|
+
"color-info": E.colorInfo.replace("var(--d-cyan)", E.cyan),
|
|
642
|
+
"spacing-1": "4px",
|
|
643
|
+
"spacing-2": "8px",
|
|
644
|
+
"spacing-3": D,
|
|
645
|
+
"spacing-4": O,
|
|
646
|
+
"spacing-5": k,
|
|
647
|
+
"spacing-6": A,
|
|
648
|
+
"spacing-8": j,
|
|
649
|
+
"spacing-10": M,
|
|
650
|
+
"spacing-12": N,
|
|
651
|
+
"container-sm": P,
|
|
652
|
+
"container-md": F,
|
|
653
|
+
"container-lg": I,
|
|
654
|
+
"container-xl": L,
|
|
655
|
+
"font-mono": R,
|
|
656
|
+
"font-sans": Qe,
|
|
657
|
+
"font-heading": z,
|
|
658
|
+
"font-body": B,
|
|
659
|
+
"text-xs": V,
|
|
660
|
+
"text-sm": H,
|
|
661
|
+
"text-base": U,
|
|
662
|
+
"text-lg": W,
|
|
663
|
+
"text-xl": G,
|
|
664
|
+
"text-2xl": K,
|
|
665
|
+
"text-3xl": q,
|
|
666
|
+
"weight-regular": "400",
|
|
667
|
+
"weight-medium": "500",
|
|
668
|
+
"weight-semibold": "600",
|
|
669
|
+
"weight-bold": "700",
|
|
670
|
+
"leading-tight": "1.2",
|
|
671
|
+
"leading-normal": "1.5",
|
|
672
|
+
"leading-relaxed": J,
|
|
673
|
+
"tracking-tight": Y,
|
|
674
|
+
"tracking-normal": "0",
|
|
675
|
+
"tracking-wide": X,
|
|
676
|
+
"radius-none": "0",
|
|
677
|
+
"radius-sm": "2px",
|
|
678
|
+
"radius-md": "4px",
|
|
679
|
+
"radius-lg": "8px",
|
|
680
|
+
"radius-full": Z,
|
|
681
|
+
"border-width": "1px",
|
|
682
|
+
"border-width-md": "2px",
|
|
683
|
+
"border-width-lg": "4px",
|
|
684
|
+
"shadow-sm": Q,
|
|
685
|
+
"shadow-md": $,
|
|
686
|
+
"shadow-lg": _t,
|
|
687
|
+
"shadow-glow-cyan": vt,
|
|
688
|
+
"shadow-glow-magenta": yt,
|
|
689
|
+
"shadow-glow-green": xt,
|
|
690
|
+
"shadow-glow-yellow": St
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
var Dt = !1;
|
|
694
|
+
function Ot() {
|
|
695
|
+
if (Dt) return;
|
|
696
|
+
Dt = !0;
|
|
697
|
+
let e = Et(), t = Object.entries(e).map(([e, t]) => ` --d-${e}: ${t};`).join("\n"), n = document.createElement("style");
|
|
698
|
+
n.textContent = `:root {\n${t}\n}`, document.head.appendChild(n);
|
|
699
|
+
}
|
|
700
|
+
function kt() {
|
|
701
|
+
Dt = !1;
|
|
702
|
+
}
|
|
703
|
+
//#endregion
|
|
704
|
+
export { w as DButton, T as DIcon, me as DInput, Se as DLoading, _e as DTag, Oe as bgElevated, ke as bgOverlay, Ee as bgPrimary, De as bgSecondary, Le as blue, ht as borderCssVars, ft as borderWidth, mt as borderWidthLg, pt as borderWidthMd, gt as borders, te as clamp, S as classNames, qe as colorCssVars, Ge as colorDanger, Ke as colorInfo, He as colorPrimary, Ue as colorSuccess, We as colorWarning, E as colors, I as containerLg, F as containerMd, P as containerSm, L as containerXl, Pe as cyan, B as fontBody, z as fontHeading, R as fontMono, Qe as fontSans, ze as green, Ot as injectTokens, b as isBoolean, ee as isFunction, y as isNumber, v as isString, x as isUndefined, it as leadingNormal, J as leadingRelaxed, rt as leadingTight, Fe as magenta, Be as orange, Ie as purple, Z as radiusFull, dt as radiusLg, ut as radiusMd, ct as radiusNone, lt as radiusSm, Ve as red, kt as resetInjection, wt as shadowCssVars, vt as shadowGlowCyan, xt as shadowGlowGreen, yt as shadowGlowMagenta, bt as shadowGlowPurple, Ct as shadowGlowRed, St as shadowGlowYellow, _t as shadowLg, $ as shadowMd, Q as shadowSm, Tt as shadows, Je as space1, M as space10, N as space12, Ye as space2, D as space3, O as space4, k as space5, A as space6, j as space8, Ze as spacing, Xe as spacingCssVars, K as text2xl, q as text3xl, U as textBase, Me as textDisabled, Ne as textInverse, W as textLg, Ae as textPrimary, je as textSecondary, H as textSm, G as textXl, V as textXs, at as trackingNormal, Y as trackingTight, X as trackingWide, st as typography, ot as typographyCssVars, ce as useDisabledProp, ue as useGlowProp, le as useLoadingProp, oe as useSizeProp, se as useStatusProp, nt as weightBold, et as weightMedium, $e as weightRegular, tt as weightSemibold, Re as yellow };
|