@cregis/ui 0.1.1 → 0.1.3
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/es/cregis-ui.js +483 -15
- package/dist/index.css +1 -1
- package/dist/types/index.d.ts +173 -0
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/dist/umd/index.css +1 -1
- package/package.json +1 -1
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,28 +1,496 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as k, computed as y, createElementBlock as r, openBlock as s, createElementVNode as u, createCommentVNode as h, mergeProps as p, createBlock as z, renderSlot as v, resolveDynamicComponent as Y, normalizeClass as g, toDisplayString as $, unref as W, ref as C, watch as S, normalizeStyle as x, withDirectives as F, vModelDynamic as j, withModifiers as Z, vModelText as G, createVNode as D, withCtx as P, createTextVNode as T, nextTick as M, reactive as H, provide as J, toRef as Q, Fragment as X, renderList as _, inject as ee, onMounted as te, onUnmounted as ae } from "vue";
|
|
2
|
+
import { EdsLoad as ie, EdsCloseCircleFill as le } from "@cregis/icon";
|
|
3
|
+
const ne = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "cregis-button__icon-wrapper"
|
|
6
|
+
}, se = ["disabled"], oe = ["disabled"], re = ["disabled"], B = /* @__PURE__ */ k({
|
|
7
|
+
name: "Button",
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
__name: "Button",
|
|
10
|
+
props: {
|
|
11
|
+
type: { default: "primary" },
|
|
12
|
+
size: { default: "medium" },
|
|
13
|
+
plain: { type: Boolean },
|
|
14
|
+
text: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
loading: { type: Boolean },
|
|
17
|
+
block: { type: Boolean },
|
|
18
|
+
link: { type: Boolean },
|
|
19
|
+
icon: {},
|
|
20
|
+
iconType: { default: "rectangle" },
|
|
21
|
+
iconText: {},
|
|
22
|
+
affix: { type: Boolean }
|
|
23
|
+
},
|
|
24
|
+
setup(e) {
|
|
25
|
+
const t = e, i = y(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), d = y(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = y(() => {
|
|
26
|
+
if (t.plain || t.text)
|
|
27
|
+
switch (t.type) {
|
|
28
|
+
case "primary":
|
|
29
|
+
return "var(--material-vibrant-brand-primary)";
|
|
30
|
+
case "secondary":
|
|
31
|
+
return "var(--material-foreground-base-secondary)";
|
|
32
|
+
case "danger":
|
|
33
|
+
return "var(--material-vibrant-error-primary)";
|
|
34
|
+
case "foreground":
|
|
35
|
+
return "var(--material-foreground-base-primary)";
|
|
36
|
+
case "sameWhite":
|
|
37
|
+
return "var(--material-same-black)";
|
|
38
|
+
}
|
|
39
|
+
else
|
|
40
|
+
return t.type === "secondary" ? "var(--material-foreground-base-secondary)" : t.type === "foreground" ? "var(--text-face-primary)" : t.type === "sameWhite" ? "var(--text-same-black)" : "var(--material-same-white)";
|
|
41
|
+
});
|
|
42
|
+
return (a, o) => e.icon || a.$slots.icon ? (s(), r("div", ne, [
|
|
43
|
+
u("button", p(a.$attrs, {
|
|
44
|
+
class: ["cregis-button__icon", {
|
|
45
|
+
[`cregis-button__icon--${e.iconType}`]: e.iconType,
|
|
46
|
+
[`cregis-button__icon--${e.size}`]: e.size,
|
|
47
|
+
"is-disabled": e.disabled
|
|
48
|
+
}],
|
|
49
|
+
disabled: e.disabled || e.loading
|
|
50
|
+
}), [
|
|
51
|
+
e.icon ? (s(), z(Y(e.icon), {
|
|
52
|
+
key: 0,
|
|
53
|
+
size: i.value
|
|
54
|
+
}, null, 8, ["size"])) : v(a.$slots, "icon", { key: 1 })
|
|
55
|
+
], 16, se),
|
|
56
|
+
e.iconText ? (s(), r("span", {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: g(["cregis-button__icon-text", { "is-disabled": e.disabled }])
|
|
59
|
+
}, $(e.iconText), 3)) : h("", !0)
|
|
60
|
+
])) : e.link ? (s(), r("button", p({ key: 1 }, a.$attrs, {
|
|
61
|
+
class: ["cregis-button__link", {
|
|
62
|
+
[`cregis-button__link--${e.type}`]: e.type,
|
|
63
|
+
[`cregis-button__link--${e.size}`]: e.size,
|
|
64
|
+
"is-disabled": e.disabled
|
|
65
|
+
}],
|
|
66
|
+
disabled: e.disabled || e.loading
|
|
67
|
+
}), [
|
|
68
|
+
v(a.$slots, "default")
|
|
69
|
+
], 16, oe)) : (s(), r("button", p({
|
|
70
|
+
key: 2,
|
|
71
|
+
ref: "buttonRef"
|
|
72
|
+
}, a.$attrs, {
|
|
73
|
+
class: ["cregis-button", {
|
|
74
|
+
[`cregis-button--${e.type}`]: e.type,
|
|
75
|
+
[`cregis-button--${e.size}`]: e.size,
|
|
76
|
+
"is-plain": e.plain,
|
|
77
|
+
"is-text": e.text,
|
|
78
|
+
"is-disabled": e.disabled,
|
|
79
|
+
"is-loading": e.loading,
|
|
80
|
+
"is-block": e.block,
|
|
81
|
+
"is-affix": e.affix
|
|
82
|
+
}],
|
|
83
|
+
disabled: e.disabled || e.loading
|
|
84
|
+
}), [
|
|
85
|
+
e.loading ? (s(), z(W(ie), {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: "loading",
|
|
88
|
+
size: d.value,
|
|
89
|
+
color: l.value
|
|
90
|
+
}, null, 8, ["size", "color"])) : v(a.$slots, "default", { key: 1 })
|
|
91
|
+
], 16, re));
|
|
92
|
+
}
|
|
93
|
+
}), de = {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: "cregis-input__prefix"
|
|
96
|
+
}, ue = ["type", "placeholder", "disabled"], ce = {
|
|
97
|
+
key: 2,
|
|
98
|
+
class: "cregis-input__suffix"
|
|
99
|
+
}, me = ["disabled", "placeholder", "rows"], be = {
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "cregis-textarea__buttons"
|
|
102
|
+
}, ze = /* @__PURE__ */ k({
|
|
103
|
+
name: "Input",
|
|
104
|
+
inheritAttrs: !1,
|
|
105
|
+
__name: "Input",
|
|
106
|
+
props: {
|
|
107
|
+
type: { default: "text" },
|
|
108
|
+
modelValue: {},
|
|
109
|
+
size: { default: "medium" },
|
|
110
|
+
width: { default: "300px" },
|
|
111
|
+
placeholder: { default: "please input" },
|
|
112
|
+
disabled: { type: Boolean },
|
|
113
|
+
clearable: { type: Boolean },
|
|
114
|
+
inputStyle: {},
|
|
115
|
+
unit: {},
|
|
116
|
+
rows: { default: 3 }
|
|
117
|
+
},
|
|
118
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
|
|
119
|
+
setup(e, { expose: t, emit: i }) {
|
|
120
|
+
const d = e, l = i, a = C(d.modelValue);
|
|
121
|
+
S(
|
|
122
|
+
() => d.modelValue,
|
|
123
|
+
(n) => {
|
|
124
|
+
a.value = n;
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
const o = C(), c = C(0), f = C(!1);
|
|
128
|
+
let w = null;
|
|
129
|
+
const q = async () => {
|
|
130
|
+
await M(), o.value?.focus();
|
|
131
|
+
}, V = async () => {
|
|
132
|
+
l("update:modelValue", a.value), l("input", a.value), await M(), E();
|
|
133
|
+
}, R = () => {
|
|
134
|
+
l("change", a.value);
|
|
135
|
+
}, I = (n) => {
|
|
136
|
+
f.value = !0, l("focus", n);
|
|
137
|
+
}, L = (n) => {
|
|
138
|
+
f.value = !1, l("blur", n);
|
|
139
|
+
}, N = y(() => d.clearable && !d.disabled && !!a.value && f.value), A = () => {
|
|
140
|
+
a.value = "", l("update:modelValue", ""), l("clear"), l("input", ""), l("change", "");
|
|
141
|
+
}, E = () => {
|
|
142
|
+
w && cancelAnimationFrame(w), w = requestAnimationFrame(() => {
|
|
143
|
+
if (!o.value || o.value.tagName !== "INPUT") return;
|
|
144
|
+
const n = o.value, b = n.value, m = document.createElement("span");
|
|
145
|
+
m.style.position = "absolute", m.style.visibility = "hidden", m.style.whiteSpace = "pre", m.style.font = window.getComputedStyle(n).font, m.style.letterSpacing = window.getComputedStyle(n).letterSpacing, m.textContent = b || " ", document.body.appendChild(m), c.value = m.getBoundingClientRect().width, document.body.removeChild(m);
|
|
146
|
+
});
|
|
147
|
+
}, K = y(() => {
|
|
148
|
+
const n = {};
|
|
149
|
+
return c.value > 0 && (n.position = "absolute", n.left = `${c.value + 16}px`), n;
|
|
150
|
+
}), O = async () => {
|
|
151
|
+
try {
|
|
152
|
+
a.value = await navigator.clipboard.readText();
|
|
153
|
+
} catch (n) {
|
|
154
|
+
console.error("paste error:", n);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
return t({
|
|
158
|
+
focus: q,
|
|
159
|
+
updateTextWidth: E
|
|
160
|
+
}), (n, b) => e.type !== "textarea" ? (s(), r("div", {
|
|
161
|
+
key: 0,
|
|
162
|
+
class: g(["cregis-input", {
|
|
163
|
+
[`cregis-input--${e.size}`]: e.size,
|
|
164
|
+
"is-disabled": e.disabled,
|
|
165
|
+
"is-prefix": n.$slots.prefix,
|
|
166
|
+
"is-suffix": n.$slots.suffix
|
|
167
|
+
}]),
|
|
168
|
+
style: x([{ width: e.width }, e.inputStyle])
|
|
169
|
+
}, [
|
|
170
|
+
u("div", {
|
|
171
|
+
class: g(["cregis-input__wrapper", { "is-focus": f.value }])
|
|
172
|
+
}, [
|
|
173
|
+
n.$slots.prefix ? (s(), r("span", de, [
|
|
174
|
+
v(n.$slots, "prefix")
|
|
175
|
+
])) : h("", !0),
|
|
176
|
+
F(u("input", p({
|
|
177
|
+
class: "cregis-input__inner",
|
|
178
|
+
"onUpdate:modelValue": b[0] || (b[0] = (m) => a.value = m),
|
|
179
|
+
ref_key: "inputRef",
|
|
180
|
+
ref: o,
|
|
181
|
+
type: e.type,
|
|
182
|
+
placeholder: e.placeholder
|
|
183
|
+
}, n.$attrs, {
|
|
184
|
+
disabled: e.disabled,
|
|
185
|
+
onInput: V,
|
|
186
|
+
onChange: R,
|
|
187
|
+
onFocus: I,
|
|
188
|
+
onBlur: L
|
|
189
|
+
}), null, 16, ue), [
|
|
190
|
+
[j, a.value]
|
|
191
|
+
]),
|
|
192
|
+
e.unit && a.value ? (s(), r("span", {
|
|
193
|
+
key: 1,
|
|
194
|
+
style: x(K.value),
|
|
195
|
+
class: "cregis-input__unit"
|
|
196
|
+
}, $(e.unit), 5)) : h("", !0),
|
|
197
|
+
n.$slots.suffix || N.value ? (s(), r("span", ce, [
|
|
198
|
+
v(n.$slots, "suffix"),
|
|
199
|
+
N.value ? (s(), z(B, {
|
|
200
|
+
key: 0,
|
|
201
|
+
icon: W(le),
|
|
202
|
+
"icon-type": "square",
|
|
203
|
+
onClick: A,
|
|
204
|
+
onMousedown: b[1] || (b[1] = Z(() => {
|
|
205
|
+
}, ["prevent"]))
|
|
206
|
+
}, null, 8, ["icon"])) : h("", !0)
|
|
207
|
+
])) : h("", !0)
|
|
208
|
+
], 2)
|
|
209
|
+
], 6)) : (s(), r("div", {
|
|
210
|
+
key: 1,
|
|
211
|
+
class: g(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
212
|
+
style: x([{ width: e.width }, e.inputStyle])
|
|
213
|
+
}, [
|
|
214
|
+
F(u("textarea", p({ class: "cregis-textarea__wrapper" }, n.$attrs, {
|
|
215
|
+
ref_key: "inputRef",
|
|
216
|
+
ref: o,
|
|
217
|
+
disabled: e.disabled,
|
|
218
|
+
placeholder: e.placeholder,
|
|
219
|
+
rows: e.rows,
|
|
220
|
+
"onUpdate:modelValue": b[2] || (b[2] = (m) => a.value = m),
|
|
221
|
+
onInput: V,
|
|
222
|
+
onChange: R,
|
|
223
|
+
onFocus: I,
|
|
224
|
+
onBlur: L
|
|
225
|
+
}), null, 16, me), [
|
|
226
|
+
[G, a.value]
|
|
227
|
+
]),
|
|
228
|
+
e.disabled ? h("", !0) : (s(), r("div", be, [
|
|
229
|
+
D(B, {
|
|
230
|
+
class: "cregis-textarea__button",
|
|
231
|
+
link: "",
|
|
232
|
+
size: "small",
|
|
233
|
+
onClick: O
|
|
234
|
+
}, {
|
|
235
|
+
default: P(() => [...b[3] || (b[3] = [
|
|
236
|
+
T(" Paste ", -1)
|
|
237
|
+
])]),
|
|
238
|
+
_: 1
|
|
239
|
+
}),
|
|
240
|
+
D(B, {
|
|
241
|
+
class: "cregis-textarea__button",
|
|
242
|
+
link: "",
|
|
243
|
+
size: "small",
|
|
244
|
+
disabled: !a.value,
|
|
245
|
+
onClick: A
|
|
246
|
+
}, {
|
|
247
|
+
default: P(() => [...b[4] || (b[4] = [
|
|
248
|
+
T(" Clear ", -1)
|
|
249
|
+
])]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["disabled"])
|
|
252
|
+
]))
|
|
253
|
+
], 6));
|
|
254
|
+
}
|
|
255
|
+
}), fe = ["width", "height"], ge = {
|
|
256
|
+
stroke: "none",
|
|
257
|
+
"stroke-width": "1",
|
|
258
|
+
fill: "none",
|
|
259
|
+
"fill-rule": "evenodd"
|
|
260
|
+
}, ye = { transform: "translate(-394.000000, -457.000000)" }, he = { transform: "translate(394.000000, 457.000000)" }, ve = ["width", "height"], ke = /* @__PURE__ */ k({
|
|
261
|
+
__name: "checked-basis",
|
|
262
|
+
props: {
|
|
263
|
+
size: { default: "16px" }
|
|
264
|
+
},
|
|
265
|
+
setup(e) {
|
|
266
|
+
return (t, i) => (s(), r("svg", {
|
|
267
|
+
width: e.size,
|
|
268
|
+
height: e.size,
|
|
269
|
+
viewBox: "0 0 16 16",
|
|
270
|
+
version: "1.1",
|
|
271
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
272
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
273
|
+
}, [
|
|
274
|
+
u("g", ge, [
|
|
275
|
+
u("g", ye, [
|
|
276
|
+
u("g", he, [
|
|
277
|
+
u("rect", {
|
|
278
|
+
x: "0",
|
|
279
|
+
y: "0",
|
|
280
|
+
width: e.size,
|
|
281
|
+
height: e.size
|
|
282
|
+
}, null, 8, ve),
|
|
283
|
+
i[0] || (i[0] = u("path", {
|
|
284
|
+
d: "M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",
|
|
285
|
+
fill: "currentColor",
|
|
286
|
+
"fill-rule": "nonzero"
|
|
287
|
+
}, null, -1))
|
|
288
|
+
])
|
|
289
|
+
])
|
|
290
|
+
])
|
|
291
|
+
], 8, fe));
|
|
292
|
+
}
|
|
293
|
+
}), pe = {
|
|
294
|
+
key: 0,
|
|
295
|
+
class: "cregis-checkbox--indeterminate"
|
|
296
|
+
}, Te = /* @__PURE__ */ k({
|
|
297
|
+
name: "Checkbox",
|
|
298
|
+
__name: "Checkbox",
|
|
299
|
+
props: {
|
|
300
|
+
modelValue: { type: [Boolean, Number], default: !1 },
|
|
301
|
+
label: {},
|
|
302
|
+
disabled: { type: Boolean, default: !1 },
|
|
303
|
+
circle: { type: Boolean },
|
|
304
|
+
indeterminate: { type: Boolean }
|
|
305
|
+
},
|
|
306
|
+
emits: ["update:modelValue", "change"],
|
|
307
|
+
setup(e, { emit: t }) {
|
|
308
|
+
const i = e, d = t, l = y(() => i.modelValue), a = () => {
|
|
309
|
+
i.disabled || d("update:modelValue", !l.value);
|
|
310
|
+
};
|
|
311
|
+
return S(
|
|
312
|
+
() => l.value,
|
|
313
|
+
() => {
|
|
314
|
+
d("change", l.value);
|
|
315
|
+
}
|
|
316
|
+
), (o, c) => (s(), r("div", {
|
|
317
|
+
class: "cregis-checkbox__wrapper",
|
|
318
|
+
onClick: a
|
|
319
|
+
}, [
|
|
320
|
+
u("div", {
|
|
321
|
+
class: g(["cregis-checkbox", {
|
|
322
|
+
"is-disabled": e.disabled,
|
|
323
|
+
"is-checked": l.value,
|
|
324
|
+
"is-circle": e.circle,
|
|
325
|
+
"is-indeterminate": e.indeterminate
|
|
326
|
+
}])
|
|
327
|
+
}, [
|
|
328
|
+
e.indeterminate ? (s(), r("div", pe)) : (s(), z(ke, {
|
|
329
|
+
key: 1,
|
|
330
|
+
size: "10px"
|
|
331
|
+
}))
|
|
332
|
+
], 2),
|
|
333
|
+
o.$slots.default || e.label ? (s(), r("span", {
|
|
334
|
+
key: 0,
|
|
335
|
+
class: g(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
336
|
+
}, [
|
|
337
|
+
v(o.$slots, "default", {}, () => [
|
|
338
|
+
T($(e.label), 1)
|
|
339
|
+
])
|
|
340
|
+
], 2)) : h("", !0)
|
|
341
|
+
]));
|
|
342
|
+
}
|
|
343
|
+
}), Be = /* @__PURE__ */ k({
|
|
344
|
+
name: "Radio",
|
|
345
|
+
__name: "Radio",
|
|
346
|
+
props: {
|
|
347
|
+
modelValue: { type: [Boolean, String, Number] },
|
|
348
|
+
value: { type: [Boolean, String, Number] },
|
|
349
|
+
label: {},
|
|
350
|
+
disabled: { type: Boolean }
|
|
351
|
+
},
|
|
352
|
+
emits: ["update:modelValue", "change"],
|
|
353
|
+
setup(e, { emit: t }) {
|
|
354
|
+
const i = e, d = t, l = y(() => i.modelValue === i.value), a = () => {
|
|
355
|
+
i.disabled || (d("update:modelValue", i.value), d("change", i.value));
|
|
356
|
+
};
|
|
357
|
+
return (o, c) => (s(), r("div", {
|
|
358
|
+
class: "cregis-radio__wrapper",
|
|
359
|
+
onClick: a
|
|
360
|
+
}, [
|
|
361
|
+
u("div", {
|
|
362
|
+
class: g(["cregis-radio", {
|
|
363
|
+
"is-disabled": e.disabled,
|
|
364
|
+
"is-checked": l.value
|
|
365
|
+
}])
|
|
366
|
+
}, [...c[0] || (c[0] = [
|
|
367
|
+
u("div", { class: "cregis-radio__inner" }, null, -1)
|
|
368
|
+
])], 2),
|
|
369
|
+
o.$slots.default || e.label ? (s(), r("span", {
|
|
370
|
+
key: 0,
|
|
371
|
+
class: g(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
372
|
+
}, [
|
|
373
|
+
v(o.$slots, "default", {}, () => [
|
|
374
|
+
T($(e.label), 1)
|
|
375
|
+
])
|
|
376
|
+
], 2)) : h("", !0)
|
|
377
|
+
]));
|
|
378
|
+
}
|
|
379
|
+
}), Se = /* @__PURE__ */ k({
|
|
380
|
+
name: "Divider",
|
|
381
|
+
__name: "Divider",
|
|
382
|
+
props: {
|
|
383
|
+
direction: { default: "horizontal" },
|
|
384
|
+
borderStyle: { default: "solid" },
|
|
385
|
+
lineThickness: { default: "1px" },
|
|
386
|
+
color: { default: "var(--line-module)" },
|
|
387
|
+
margin: { default: "8px" },
|
|
388
|
+
length: {}
|
|
389
|
+
},
|
|
390
|
+
setup(e) {
|
|
391
|
+
const t = e, i = y(() => {
|
|
392
|
+
if (Array.isArray(t.margin)) {
|
|
393
|
+
const [l, a] = t.margin;
|
|
394
|
+
return t.direction === "horizontal" ? `${l} 0 ${a} 0` : `0 ${a} 0 ${l}`;
|
|
395
|
+
} else
|
|
396
|
+
return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
|
|
397
|
+
}), d = y(() => t.direction === "horizontal" ? {
|
|
398
|
+
width: t.length || "100%",
|
|
399
|
+
borderTopWidth: t.lineThickness,
|
|
400
|
+
borderTopStyle: t.borderStyle,
|
|
401
|
+
borderTopColor: t.color,
|
|
402
|
+
margin: i.value
|
|
403
|
+
} : {
|
|
404
|
+
height: t.length || "1rem",
|
|
405
|
+
borderLeftWidth: t.lineThickness,
|
|
406
|
+
borderLeftStyle: t.borderStyle,
|
|
407
|
+
borderLeftColor: t.color,
|
|
408
|
+
margin: i.value
|
|
409
|
+
});
|
|
410
|
+
return (l, a) => (s(), r("div", {
|
|
411
|
+
class: g(["cregis-divider", {
|
|
412
|
+
[`cregis-divider--${e.direction}`]: e.direction
|
|
413
|
+
}]),
|
|
414
|
+
style: x(d.value)
|
|
415
|
+
}, null, 6));
|
|
416
|
+
}
|
|
417
|
+
}), U = Symbol("TABS_KEY"), xe = ["onClick"], $e = { style: { display: "none" } }, Ve = /* @__PURE__ */ k({
|
|
418
|
+
name: "Tabs",
|
|
419
|
+
__name: "Tabs",
|
|
420
|
+
props: {
|
|
421
|
+
modelValue: {},
|
|
422
|
+
type: { default: "default" },
|
|
423
|
+
size: { default: "medium" }
|
|
424
|
+
},
|
|
425
|
+
emits: ["update:modelValue"],
|
|
426
|
+
setup(e) {
|
|
427
|
+
const t = e, i = H([]), d = (o) => {
|
|
428
|
+
i.some((c) => c.name === o.name) || i.push(o);
|
|
429
|
+
}, l = (o) => {
|
|
430
|
+
const c = i.findIndex((f) => f.name === o);
|
|
431
|
+
c !== -1 && i.splice(c, 1);
|
|
432
|
+
}, a = y(() => t.type === "card" ? t.size === "large" ? {
|
|
433
|
+
borderRadius: "13px"
|
|
434
|
+
} : t.size === "medium" ? {
|
|
435
|
+
borderRadius: "11px"
|
|
436
|
+
} : {
|
|
437
|
+
borderRadius: "9px"
|
|
438
|
+
} : {
|
|
439
|
+
borderRadius: 0
|
|
440
|
+
});
|
|
441
|
+
return J(U, {
|
|
442
|
+
activeName: Q(t, "modelValue"),
|
|
443
|
+
registerTab: d,
|
|
444
|
+
unregisterTab: l
|
|
445
|
+
}), (o, c) => (s(), r("div", {
|
|
446
|
+
class: g(["cregis-tabs", {
|
|
447
|
+
[`cregis-tabs--${e.type}`]: e.type,
|
|
448
|
+
[`cregis-tabs--${e.size}`]: e.size
|
|
449
|
+
}])
|
|
450
|
+
}, [
|
|
451
|
+
(s(!0), r(X, null, _(i, (f) => (s(), r("div", {
|
|
452
|
+
key: f.name,
|
|
453
|
+
class: g(["cregis-tabs__item", { "is-active": e.modelValue === f.name }]),
|
|
454
|
+
style: x(a.value),
|
|
455
|
+
onClick: (w) => o.$emit("update:modelValue", f.name)
|
|
456
|
+
}, [
|
|
457
|
+
u("span", null, $(f.label), 1)
|
|
458
|
+
], 14, xe))), 128)),
|
|
459
|
+
u("div", $e, [
|
|
460
|
+
v(o.$slots, "default")
|
|
461
|
+
])
|
|
462
|
+
], 2));
|
|
463
|
+
}
|
|
464
|
+
}), Re = /* @__PURE__ */ k({
|
|
3
465
|
name: "TabPane",
|
|
4
466
|
__name: "TabPane",
|
|
5
467
|
props: {
|
|
6
468
|
label: {},
|
|
7
469
|
name: {}
|
|
8
470
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
() =>
|
|
16
|
-
(
|
|
17
|
-
|
|
471
|
+
setup(e) {
|
|
472
|
+
const t = e, i = ee(U);
|
|
473
|
+
if (!i) throw new Error("TabPane must be used within Tabs");
|
|
474
|
+
return te(() => {
|
|
475
|
+
i.registerTab({ label: t.label, name: t.name });
|
|
476
|
+
}), S(
|
|
477
|
+
() => t.label,
|
|
478
|
+
(d) => {
|
|
479
|
+
i.unregisterTab(t.name), i.registerTab({ label: d, name: t.name });
|
|
18
480
|
}
|
|
19
|
-
),
|
|
20
|
-
|
|
481
|
+
), ae(() => {
|
|
482
|
+
i.unregisterTab(t.name);
|
|
21
483
|
}), () => {
|
|
22
484
|
};
|
|
23
485
|
}
|
|
24
486
|
});
|
|
25
487
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
488
|
+
B as Button,
|
|
489
|
+
Te as Checkbox,
|
|
490
|
+
Se as Divider,
|
|
491
|
+
ze as Input,
|
|
492
|
+
Be as Radio,
|
|
493
|
+
U as TABS_KEY,
|
|
494
|
+
Re as TabPane,
|
|
495
|
+
Ve as Tabs
|
|
28
496
|
};
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 .0078 .1765 .051;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 255 255 255;--foreground-base: 2 3 4;--module-line: 235 236 237;--page: 255 255 255}.dark{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 1 1 1;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 2 3 4;--foreground-base: 255 255 255;--module-line: 0 0 0;--page: 30 33 35}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}:root{--material-vibrant-brand-primary: color(var(--system-brand) / 1);--material-opaque-card-moderate: rgb(var(--foreground-base) / .05);--material-foreground-face-primary: rgb(var(--foreground-face) / 1);--material-foreground-face-quaternary: rgb(var(--foreground-face) / .2);--material-foreground-base-primary: rgb(var(--foreground-base) / 1);--material-foreground-base-secondary: rgb(var(--foreground-base) / .6);--material-foreground-base-quaternary: rgb(var(--foreground-base) / .2);--material-vibrant-error-primary: color(var(--system-error) / 1);--material-decor-primary: color(var(--system-decor) / 1);--material-same-white: rgb(var(--same-white) / 1);--material-opaque-hide: rgb(var(--foreground-base) / 0);--text-base-primary: rgb(var(--foreground-base) / 1);--text-base-secondary: rgb(var(--foreground-base) / .6);--text-base-tertiary: rgb(var(--foreground-base) / .4);--text-base-quaternary: rgb(var(--foreground-base) / .2);--text-face-primary: rgb(var(--foreground-face) / 1);--text-face-secondary: rgb(var(--foreground-face) / .6);--text-same-white: rgb(var(--same-white) / 1);--text-same-white-tap: rgb(var(--same-white) / .6);--text-same-black: rgb(var(--same-black) / 1);--text-same-black-tap: rgb(var(--same-black) / .6);--text-brand-tap: color(var(--system-brand) / .6);--text-brand-40: color(var(--system-brand) / .4);--text-brand-disabled: color(var(--system-brand) / .2);--text-error-tap: color(var(--system-error) / .6);--line-border-deep: rgb(var(--foreground-base) / .18);--line-module: rgb(var(--module-line) / 1);--event-hover-secondary: rgb(var(--foreground-base) / .05);--event-hover-tertiary: rgb(var(--page) / 1);--event-focus-secondary: rgb(var(--foreground-base) / .07)}.dark{--material-opaque-card-moderate: rgb(var(--foreground-base) / .07);--event-hover-secondary: rgb(var(--foreground-base) / .07);--event-focus-secondary: rgb(var(--foreground-base) / .1)}.cregis-input{width:100%;position:relative;display:inline-flex;font-size:15px;line-height:22px;box-sizing:border-box;vertical-align:middle;caret-color:var(--text-base-primary)}.cregis-input.is-disabled{cursor:not-allowed}.cregis-input.is-disabled .cregis-input__inner{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-input__wrapper{position:relative;display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:0 12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent}.cregis-input__wrapper.is-focus{border:2px solid var(--material-vibrant-brand-primary);border-radius:6px;background-color:var(--material-foreground-face-quaternary)}.cregis-input__wrapper.is-focus .cregis-input__inner::placeholder{color:var(--text-base-quaternary)}.cregis-input__inner{width:100%;min-width:20px;-webkit-appearance:none;font-size:inherit;padding:0;outline:none;border:none;background:none;box-sizing:border-box;color:var(--text-base-primary)}.cregis-input__inner::placeholder{color:var(--text-base-tertiary)}.cregis-input__inner::-webkit-outer-spin-button,.cregis-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cregis-input--small{height:32px}.cregis-input--medium{height:40px}.cregis-input--large{height:48px}.cregis-input__unit{color:var(--text-base-primary)}.cregis-input__prefix,.cregis-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;align-items:center}.cregis-input__prefix>:first-child{margin-left:0!important}.cregis-input__prefix>:last-child{margin-right:8px!important}.cregis-input__suffix>:first-child{margin-left:8px!important}.cregis-input__suffix>:last-child{margin-right:0!important}.cregis-input__clear-button svg g path{fill:var(--material-foreground-base-secondary)}.cregis-input__clear-button:hover svg g path{fill:var(--material-foreground-base-primary)}.cregis-input__clear-button:active svg g path{fill:var(--material-foreground-base-secondary)}.cregis-textarea{position:relative}.cregis-textarea.is-disabled .cregis-textarea__wrapper{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-textarea__wrapper{resize:none;position:relative;display:block;padding:12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;background-image:none;-webkit-appearance:none;caret-color:var(--text-base-primary);color:var(--text-base-primary)}.cregis-textarea__wrapper:focus{outline:none;border:2px solid var(--material-vibrant-brand-primary)}.cregis-textarea__wrapper:focus::placeholder{color:var(--text-base-quaternary)}.cregis-textarea__wrapper::placeholder{color:var(--text-base-tertiary)}.cregis-textarea__buttons{position:absolute;bottom:10px;left:12px;display:flex;gap:16px}.cregis-textarea__button{font-size:12px;font-weight:500;cursor:default;color:var(--material-vibrant-brand-primary)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cregis-button{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary);border:1px solid var(--material-vibrant-brand-primary);font-size:13px;border-radius:30px}.cregis-button:active{color:var(--text-same-white-tap)}.cregis-button.is-plain{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide)}.cregis-button.is-plain:hover{color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary)}.cregis-button.is-plain:active{color:var(--text-same-white-tap)}.cregis-button.is-text{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide);border-color:transparent}.cregis-button.is-text:hover{background-color:var(--event-hover-secondary)}.cregis-button.is-text:active{color:var(--text-brand-tap)}.cregis-button.is-block{width:100%}:is(.cregis-button.is-plain.is-loading,.cregis-button.is-text.is-loading):hover{background-color:var(--material-opaque-hide)}.cregis-button .loading{animation:rotate 2s linear infinite}.cregis-button.is-affix{gap:4px}.cregis-button.is-affix svg g path{stroke:var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active svg g path{stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled span{color:var(--text-base-quaternary)}.cregis-button--secondary{background-color:var(--material-opaque-card-moderate);border-color:transparent;color:var(--text-base-primary)}.cregis-button--secondary:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-plain{border:.5px solid var(--line-border-deep);color:var(--text-base-primary)}.cregis-button--secondary.is-plain:hover{border:.5px solid transparent;color:var(--text-base-primary);background-color:var(--material-opaque-card-moderate)}.cregis-button--secondary.is-plain.is-plain.is-loading{border:.5px solid var(--line-border-deep)}.cregis-button--secondary.is-plain:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active{color:var(--text-base-secondary)}.cregis-button--danger{background-color:var(--material-vibrant-error-primary);border-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain:hover{background-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text:active{color:var(--text-error-tap)}.cregis-button--foreground{background-color:var(--material-decor-primary);border-color:var(--material-decor-primary);color:var(--text-face-primary)}.cregis-button--foreground:active{color:var(--text-face-secondary)}.cregis-button--foreground.is-plain{color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:hover{color:var(--text-face-primary);background-color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:active{color:var(--text-face-secondary)}.cregis-button--sameWhite{background-color:var(--material-same-white);border-color:transparent;color:var(--text-same-black)}.cregis-button--sameWhite:active{color:var(--text-same-black-tap)}.cregis-button--large{padding:0 20px;height:40px;font-size:15px;line-height:22px}.cregis-button--medium{padding:0 16px;height:32px;font-size:13px;line-height:18px}.cregis-button--small{padding:0 12px;height:24px;font-size:13px;line-height:18px}.cregis-button--extraSmall{padding:0 12px;height:20px;font-size:12px;line-height:16px}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled{color:var(--text-base-quaternary);background-color:var(--material-opaque-card-moderate);border-color:transparent;cursor:not-allowed}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled{border:.5px solid var(--line-border-deep);background-color:var(--material-opaque-hide)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled:hover{color:var(--text-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled{background-color:var(--material-opaque-hide);border-color:transparent}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled:active{color:var(--text-base-quaternary)}.cregis-button__link{border:none;border-bottom:1px dashed var(--material-opaque-hide);background-color:var(--material-opaque-hide);color:var(--material-vibrant-brand-primary);font-weight:500;padding:0}.cregis-button__link:hover{border-bottom:1px dashed var(--text-brand-40)}.cregis-button__link:active{border-bottom:1px dashed var(--text-brand-disabled);color:var(--text-brand-tap)}.cregis-button__link.is-disabled{color:var(--text-base-quaternary);border-color:transparent;cursor:not-allowed}.cregis-button__link--foreground{color:var(--text-base-primary)}.cregis-button__link--foreground:hover{border-bottom:1px dashed var(--text-base-tertiary)}.cregis-button__link--foreground:active{border-bottom:1px dashed var(--text-base-quaternary);color:var(--text-base-secondary)}.cregis-button__link--foreground.is-disabled{color:var(--text-base-quaternary);border-color:transparent}.cregis-button__link--large{font-size:15px}.cregis-button__link--medium{font-size:13px}.cregis-button__link--small,.cregis-button__link--extraSmall{font-size:12px}.cregis-button__icon-wrapper{display:flex;flex-direction:column;align-items:center}.cregis-button__icon{display:flex;justify-content:center;align-items:center;border-color:transparent;background-color:var(--material-opaque-hide);padding:0;border-radius:6px}.cregis-button__icon svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:hover{background-color:var(--event-hover-secondary)}.cregis-button__icon:hover svg g path{stroke:var(--material-foreground-base-primary)}.cregis-button__icon:active{background-color:var(--event-focus-secondary)}.cregis-button__icon:active svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon.is-disabled{cursor:not-allowed}.cregis-button__icon.is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled:hover{background-color:var(--material-opaque-hide)}.cregis-button__icon--rectangle.cregis-button__icon--large{width:36px;height:28px}.cregis-button__icon--rectangle.cregis-button__icon--medium{width:32px;height:24px}.cregis-button__icon--rectangle.cregis-button__icon--small,.cregis-button__icon--rectangle.cregis-button__icon--extraSmall{width:26px;height:20px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--large{width:28px;height:28px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--medium{width:24px;height:24px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--small,:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--extraSmall{width:20px;height:20px}.cregis-button__icon--circle{border-radius:50%}.cregis-button__icon--professional{width:32px;height:24px}.cregis-button__icon-text{font-size:11px;line-height:14px;font-weight:500;color:var(--text-base-secondary)}.cregis-button__icon-text.is-disabled{cursor:not-allowed;color:var(--text-base-quaternary)}.cregis-checkbox__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-checkbox{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:4px;display:flex;align-items:center;justify-content:center}.cregis-checkbox svg{visibility:hidden}.cregis-checkbox:hover svg{color:var(--line-border-deep);visibility:visible}.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}:is(.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate) svg{visibility:visible!important;color:var(--material-same-white)}.cregis-checkbox.is-circle{border-radius:50%}.cregis-checkbox.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-checkbox.is-disabled:hover svg{visibility:hidden}.cregis-checkbox.is-checked.is-disabled{opacity:.6}.cregis-checkbox__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-checkbox__label.is-disabled{cursor:not-allowed}.cregis-checkbox--indeterminate{width:8px;height:1.5px;border-radius:1px;background-color:var(--material-same-white)}.cregis-radio__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-radio{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:50%;display:flex;align-items:center;justify-content:center}.cregis-radio:hover .cregis-radio__inner{visibility:visible}.cregis-radio.is-checked{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}.cregis-radio.is-checked .cregis-radio__inner{visibility:visible!important;background-color:var(--text-same-white)}.cregis-radio.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-radio.is-disabled:hover .cregis-radio__inner{visibility:hidden}.cregis-radio.is-checked.is-disabled{opacity:.6}.cregis-radio__inner{width:6px;height:6px;border-radius:50%;background-color:var(--material-foreground-base-quaternary);visibility:hidden}.cregis-radio__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-radio__label.is-disabled{cursor:not-allowed}.cregis-divider{display:flex;align-items:center}.cregis-divider--horizontal{flex-direction:row}.cregis-divider--vertical{flex-direction:column}.cregis-tabs{display:flex;gap:16px;width:fit-content;height:29px;font-size:13px;font-weight:500;color:var(--text-base-primary);cursor:default}.cregis-tabs__item{border-bottom:2px solid var(--material-opaque-hide);transition:color .2s ease,border-color .2s ease}.cregis-tabs__item.is-active{color:var(--material-vibrant-brand-primary);border-bottom:2px solid var(--material-vibrant-brand-primary)}.cregis-tabs--large{height:33px;font-size:15px}.cregis-tabs--small{height:28px;font-size:12px}.cregis-tabs--card{height:28px;background-color:var(--material-opaque-card-moderate);border-radius:14px;padding:3px;font-size:12px;gap:6px}.cregis-tabs--card.cregis-tabs--large{height:32px;border-radius:16px}.cregis-tabs--card.cregis-tabs--small{height:24px;border-radius:12px}.cregis-tabs--card .cregis-tabs__item{display:flex;align-items:center;justify-content:center;border:none;padding:0 6px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
|
|
1
|
+
:root{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 .0078 .1765 .051;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 255 255 255;--foreground-base: 2 3 4;--module-line: 235 236 237;--page: 255 255 255}.dark{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 1 1 1;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 2 3 4;--foreground-base: 255 255 255;--module-line: 0 0 0;--page: 30 33 35}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}circle,path,polygon,rect,ellipse,line,polyline,g{vector-effect:non-scaling-stroke}:root{--material-vibrant-brand-primary: color(var(--system-brand) / 1);--material-opaque-card-moderate: rgb(var(--foreground-base) / .05);--material-foreground-face-primary: rgb(var(--foreground-face) / 1);--material-foreground-face-quaternary: rgb(var(--foreground-face) / .2);--material-foreground-base-primary: rgb(var(--foreground-base) / 1);--material-foreground-base-secondary: rgb(var(--foreground-base) / .6);--material-foreground-base-quaternary: rgb(var(--foreground-base) / .2);--material-vibrant-error-primary: color(var(--system-error) / 1);--material-decor-primary: color(var(--system-decor) / 1);--material-same-white: rgb(var(--same-white) / 1);--material-opaque-hide: rgb(var(--foreground-base) / 0);--text-base-primary: rgb(var(--foreground-base) / 1);--text-base-secondary: rgb(var(--foreground-base) / .6);--text-base-tertiary: rgb(var(--foreground-base) / .4);--text-base-quaternary: rgb(var(--foreground-base) / .2);--text-face-primary: rgb(var(--foreground-face) / 1);--text-face-secondary: rgb(var(--foreground-face) / .6);--text-same-white: rgb(var(--same-white) / 1);--text-same-white-tap: rgb(var(--same-white) / .6);--text-same-black: rgb(var(--same-black) / 1);--text-same-black-tap: rgb(var(--same-black) / .6);--text-brand-tap: color(var(--system-brand) / .6);--text-brand-40: color(var(--system-brand) / .4);--text-brand-disabled: color(var(--system-brand) / .2);--text-error-tap: color(var(--system-error) / .6);--line-border-deep: rgb(var(--foreground-base) / .18);--line-module: rgb(var(--module-line) / 1);--event-hover-secondary: rgb(var(--foreground-base) / .05);--event-hover-tertiary: rgb(var(--page) / 1);--event-focus-secondary: rgb(var(--foreground-base) / .07)}.dark{--material-opaque-card-moderate: rgb(var(--foreground-base) / .07);--event-hover-secondary: rgb(var(--foreground-base) / .07);--event-focus-secondary: rgb(var(--foreground-base) / .1)}.cregis-input{width:100%;position:relative;display:inline-flex;font-size:15px;line-height:22px;box-sizing:border-box;vertical-align:middle;caret-color:var(--text-base-primary)}.cregis-input.is-disabled{cursor:not-allowed}.cregis-input.is-disabled .cregis-input__inner{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-input__wrapper{position:relative;display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:0 12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent}.cregis-input__wrapper.is-focus{border:2px solid var(--material-vibrant-brand-primary);border-radius:6px;background-color:var(--material-foreground-face-quaternary)}.cregis-input__wrapper.is-focus .cregis-input__inner::placeholder{color:var(--text-base-quaternary)}.cregis-input__inner{width:100%;min-width:20px;-webkit-appearance:none;font-size:inherit;padding:0;outline:none;border:none;background:none;box-sizing:border-box;color:var(--text-base-primary)}.cregis-input__inner::placeholder{color:var(--text-base-tertiary)}.cregis-input__inner::-webkit-outer-spin-button,.cregis-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cregis-input--small{height:32px}.cregis-input--medium{height:40px}.cregis-input--large{height:48px}.cregis-input__unit{color:var(--text-base-primary)}.cregis-input__prefix,.cregis-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;align-items:center}.cregis-input__prefix>:first-child{margin-left:0!important}.cregis-input__prefix>:last-child{margin-right:8px!important}.cregis-input__suffix>:first-child{margin-left:8px!important}.cregis-input__suffix>:last-child{margin-right:0!important}.cregis-textarea{position:relative}.cregis-textarea.is-disabled .cregis-textarea__wrapper{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-textarea__wrapper{resize:none;position:relative;display:block;padding:12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;background-image:none;-webkit-appearance:none;caret-color:var(--text-base-primary);color:var(--text-base-primary)}.cregis-textarea__wrapper:focus{outline:none;border:2px solid var(--material-vibrant-brand-primary)}.cregis-textarea__wrapper:focus::placeholder{color:var(--text-base-quaternary)}.cregis-textarea__wrapper::placeholder{color:var(--text-base-tertiary)}.cregis-textarea__buttons{position:absolute;bottom:10px;left:12px;display:flex;gap:16px}.cregis-textarea__button{font-size:12px;font-weight:500;cursor:default;color:var(--material-vibrant-brand-primary)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cregis-button{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary);border:1px solid var(--material-vibrant-brand-primary);font-size:13px;border-radius:30px}.cregis-button:active{color:var(--text-same-white-tap)}.cregis-button.is-plain{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide)}.cregis-button.is-plain:hover{color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary)}.cregis-button.is-plain:active{color:var(--text-same-white-tap)}.cregis-button.is-text{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide);border-color:transparent}.cregis-button.is-text:hover{background-color:var(--event-hover-secondary)}.cregis-button.is-text:active{color:var(--text-brand-tap)}.cregis-button.is-block{width:100%}:is(.cregis-button.is-plain.is-loading,.cregis-button.is-text.is-loading):hover{background-color:var(--material-opaque-hide)}.cregis-button .loading{animation:rotate 2s linear infinite}.cregis-button.is-affix{gap:4px}.cregis-button.is-affix svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button.is-affix svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--text-same-white)}.cregis-button.is-affix svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button.is-affix:active svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--text-same-white-tap)}.cregis-button.is-affix:active span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled span{color:var(--text-base-quaternary)}.cregis-button--secondary{background-color:var(--material-opaque-card-moderate);border-color:transparent;color:var(--text-base-primary)}.cregis-button--secondary:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-plain{border:.5px solid var(--line-border-deep);color:var(--text-base-primary)}.cregis-button--secondary.is-plain:hover{border:.5px solid transparent;color:var(--text-base-primary);background-color:var(--material-opaque-card-moderate)}.cregis-button--secondary.is-plain.is-plain.is-loading{border:.5px solid var(--line-border-deep)}.cregis-button--secondary.is-plain:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active{color:var(--text-base-secondary)}.cregis-button--danger{background-color:var(--material-vibrant-error-primary);border-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain:hover{background-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text:active{color:var(--text-error-tap)}.cregis-button--foreground{background-color:var(--material-decor-primary);border-color:var(--material-decor-primary);color:var(--text-face-primary)}.cregis-button--foreground:active{color:var(--text-face-secondary)}.cregis-button--foreground.is-plain{color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:hover{color:var(--text-face-primary);background-color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:active{color:var(--text-face-secondary)}.cregis-button--sameWhite{background-color:var(--material-same-white);border-color:transparent;color:var(--text-same-black)}.cregis-button--sameWhite:active{color:var(--text-same-black-tap)}.cregis-button--large{padding:0 20px;height:40px;font-size:15px;line-height:22px}.cregis-button--medium{padding:0 16px;height:32px;font-size:13px;line-height:18px}.cregis-button--small{padding:0 12px;height:24px;font-size:13px;line-height:18px}.cregis-button--extraSmall{padding:0 12px;height:20px;font-size:12px;line-height:16px}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled{color:var(--text-base-quaternary);background-color:var(--material-opaque-card-moderate);border-color:transparent;cursor:not-allowed}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg>g:is([fill=none],[fill=transparent]) path:not([fill]),:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg>g:is([fill=none],[fill=transparent]) path:not([fill]),:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled{border:.5px solid var(--line-border-deep);background-color:var(--material-opaque-hide)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled:hover{color:var(--text-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled{background-color:var(--material-opaque-hide);border-color:transparent}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled:active{color:var(--text-base-quaternary)}.cregis-button__link{border:none;border-bottom:1px dashed var(--material-opaque-hide);background-color:var(--material-opaque-hide);color:var(--material-vibrant-brand-primary);font-weight:500;padding:0}.cregis-button__link:hover{border-bottom:1px dashed var(--text-brand-40)}.cregis-button__link:active{border-bottom:1px dashed var(--text-brand-disabled);color:var(--text-brand-tap)}.cregis-button__link.is-disabled{color:var(--text-base-quaternary);border-color:transparent;cursor:not-allowed}.cregis-button__link--foreground{color:var(--text-base-primary)}.cregis-button__link--foreground:hover{border-bottom:1px dashed var(--text-base-tertiary)}.cregis-button__link--foreground:active{border-bottom:1px dashed var(--text-base-quaternary);color:var(--text-base-secondary)}.cregis-button__link--foreground.is-disabled{color:var(--text-base-quaternary);border-color:transparent}.cregis-button__link--large{font-size:15px}.cregis-button__link--medium{font-size:13px}.cregis-button__link--small,.cregis-button__link--extraSmall{font-size:12px}.cregis-button__icon-wrapper{display:flex;flex-direction:column;align-items:center}.cregis-button__icon{display:flex;justify-content:center;align-items:center;border-color:transparent;background-color:var(--material-opaque-hide);padding:0;border-radius:6px}.cregis-button__icon svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-secondary)}.cregis-button__icon:hover{background-color:var(--event-hover-secondary)}.cregis-button__icon:hover svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon:hover svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-primary)}.cregis-button__icon:hover svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-primary)}.cregis-button__icon:active{background-color:var(--event-focus-secondary)}.cregis-button__icon:active svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon:active svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:active svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-secondary)}.cregis-button__icon.is-disabled{cursor:not-allowed}.cregis-button__icon.is-disabled svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon.is-disabled svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled:hover{background-color:var(--material-opaque-hide)}.cregis-button__icon--rectangle.cregis-button__icon--large{width:36px;height:28px}.cregis-button__icon--rectangle.cregis-button__icon--medium{width:32px;height:24px}.cregis-button__icon--rectangle.cregis-button__icon--small,.cregis-button__icon--rectangle.cregis-button__icon--extraSmall{width:26px;height:20px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--large{width:28px;height:28px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--medium{width:24px;height:24px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--small,:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--extraSmall{width:20px;height:20px}.cregis-button__icon--circle{border-radius:50%}.cregis-button__icon--professional{width:32px;height:24px}.cregis-button__icon-text{font-size:11px;line-height:14px;font-weight:500;color:var(--text-base-secondary)}.cregis-button__icon-text.is-disabled{cursor:not-allowed;color:var(--text-base-quaternary)}.cregis-checkbox__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-checkbox{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:4px;display:flex;align-items:center;justify-content:center}.cregis-checkbox svg{visibility:hidden}.cregis-checkbox:hover svg{color:var(--line-border-deep);visibility:visible}.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}:is(.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate) svg{visibility:visible!important;color:var(--material-same-white)}.cregis-checkbox.is-circle{border-radius:50%}.cregis-checkbox.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-checkbox.is-disabled:hover svg{visibility:hidden}.cregis-checkbox.is-checked.is-disabled{opacity:.6}.cregis-checkbox__label{font-size:15px;font-weight:500;color:var(--text-base-primary)}.cregis-checkbox__label.is-disabled{cursor:not-allowed}.cregis-checkbox--indeterminate{width:8px;height:1.5px;border-radius:1px;background-color:var(--material-same-white)}.cregis-radio__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-radio{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:50%;display:flex;align-items:center;justify-content:center}.cregis-radio:hover .cregis-radio__inner{visibility:visible}.cregis-radio.is-checked{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}.cregis-radio.is-checked .cregis-radio__inner{visibility:visible!important;background-color:var(--text-same-white)}.cregis-radio.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-radio.is-disabled:hover .cregis-radio__inner{visibility:hidden}.cregis-radio.is-checked.is-disabled{opacity:.6}.cregis-radio__inner{width:6px;height:6px;border-radius:50%;background-color:var(--material-foreground-base-quaternary);visibility:hidden}.cregis-radio__label{font-size:15px;font-weight:500;color:var(--text-base-primary)}.cregis-radio__label.is-disabled{cursor:not-allowed}.cregis-divider{display:flex;align-items:center}.cregis-divider--horizontal{flex-direction:row}.cregis-divider--vertical{flex-direction:column}.cregis-tabs{display:flex;gap:16px;width:fit-content;height:29px;font-size:13px;font-weight:500;color:var(--text-base-primary);cursor:default}.cregis-tabs__item{border-bottom:2px solid var(--material-opaque-hide);transition:color .2s ease,border-color .2s ease}.cregis-tabs__item.is-active{color:var(--material-vibrant-brand-primary);border-bottom:2px solid var(--material-vibrant-brand-primary)}.cregis-tabs--large{height:33px;font-size:15px}.cregis-tabs--small{height:28px;font-size:12px}.cregis-tabs--card{height:28px;background-color:var(--material-opaque-card-moderate);border-radius:14px;padding:3px;font-size:12px;gap:6px}.cregis-tabs--card.cregis-tabs--large{height:32px;border-radius:16px}.cregis-tabs--card.cregis-tabs--small{height:24px;border-radius:12px}.cregis-tabs--card .cregis-tabs__item{display:flex;align-items:center;justify-content:center;border:none;padding:0 6px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,163 @@ import { InjectionKey } from 'vue';
|
|
|
7
7
|
import { PublicProps } from 'vue';
|
|
8
8
|
import { Ref } from 'vue';
|
|
9
9
|
|
|
10
|
+
declare const __VLS_component: DefineComponent<InputProps, {
|
|
11
|
+
focus: () => Promise<void>;
|
|
12
|
+
updateTextWidth: () => void;
|
|
13
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
14
|
+
"update:modelValue": (value: string | number) => any;
|
|
15
|
+
input: (value: string | number) => any;
|
|
16
|
+
change: (value: string | number) => any;
|
|
17
|
+
focus: (value: FocusEvent) => any;
|
|
18
|
+
blur: (value: FocusEvent) => any;
|
|
19
|
+
clear: () => any;
|
|
20
|
+
}, string, PublicProps, Readonly<InputProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
22
|
+
onInput?: (value: string | number) => any;
|
|
23
|
+
onChange?: (value: string | number) => any;
|
|
24
|
+
onFocus?: (value: FocusEvent) => any;
|
|
25
|
+
onBlur?: (value: FocusEvent) => any;
|
|
26
|
+
onClear?: () => any;
|
|
27
|
+
}>, {
|
|
28
|
+
type: "text" | "number" | "textarea";
|
|
29
|
+
size: "small" | "medium" | "large";
|
|
30
|
+
width: string;
|
|
31
|
+
placeholder: string;
|
|
32
|
+
rows: number;
|
|
33
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
34
|
+
inputRef: HTMLTextAreaElement;
|
|
35
|
+
}, any>;
|
|
36
|
+
|
|
37
|
+
declare const __VLS_component_2: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
38
|
+
type: ButtonType;
|
|
39
|
+
size: ButtonSize;
|
|
40
|
+
iconType: IconButtonType;
|
|
41
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
42
|
+
buttonRef: HTMLButtonElement;
|
|
43
|
+
}, any>;
|
|
44
|
+
|
|
45
|
+
declare const __VLS_component_3: DefineComponent<CheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
46
|
+
"update:modelValue": (value: number | boolean) => any;
|
|
47
|
+
change: (value: number | boolean) => any;
|
|
48
|
+
}, string, PublicProps, Readonly<CheckboxProps> & Readonly<{
|
|
49
|
+
"onUpdate:modelValue"?: (value: number | boolean) => any;
|
|
50
|
+
onChange?: (value: number | boolean) => any;
|
|
51
|
+
}>, {
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
modelValue: boolean | number;
|
|
54
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
55
|
+
|
|
56
|
+
declare const __VLS_component_4: DefineComponent<RadioProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
57
|
+
"update:modelValue": (value: RadioValue) => any;
|
|
58
|
+
change: (value: RadioValue) => any;
|
|
59
|
+
}, string, PublicProps, Readonly<RadioProps> & Readonly<{
|
|
60
|
+
"onUpdate:modelValue"?: (value: RadioValue) => any;
|
|
61
|
+
onChange?: (value: RadioValue) => any;
|
|
62
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
63
|
+
|
|
64
|
+
declare const __VLS_component_5: DefineComponent<TabsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
65
|
+
"update:modelValue": (name: string | number) => any;
|
|
66
|
+
}, string, PublicProps, Readonly<TabsProps> & Readonly<{
|
|
67
|
+
"onUpdate:modelValue"?: (name: string | number) => any;
|
|
68
|
+
}>, {
|
|
69
|
+
type: "default" | "card";
|
|
70
|
+
size: TabSize;
|
|
71
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
72
|
+
|
|
73
|
+
declare function __VLS_template(): {
|
|
74
|
+
attrs: Partial<{}>;
|
|
75
|
+
slots: {
|
|
76
|
+
prefix?(_: {}): any;
|
|
77
|
+
suffix?(_: {}): any;
|
|
78
|
+
};
|
|
79
|
+
refs: {
|
|
80
|
+
inputRef: HTMLTextAreaElement;
|
|
81
|
+
};
|
|
82
|
+
rootEl: any;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
declare function __VLS_template_2(): {
|
|
86
|
+
attrs: Partial<{}>;
|
|
87
|
+
slots: {
|
|
88
|
+
icon?(_: {}): any;
|
|
89
|
+
default?(_: {}): any;
|
|
90
|
+
default?(_: {}): any;
|
|
91
|
+
};
|
|
92
|
+
refs: {
|
|
93
|
+
buttonRef: HTMLButtonElement;
|
|
94
|
+
};
|
|
95
|
+
rootEl: any;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare function __VLS_template_3(): {
|
|
99
|
+
attrs: Partial<{}>;
|
|
100
|
+
slots: {
|
|
101
|
+
default?(_: {}): any;
|
|
102
|
+
};
|
|
103
|
+
refs: {};
|
|
104
|
+
rootEl: HTMLDivElement;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
declare function __VLS_template_4(): {
|
|
108
|
+
attrs: Partial<{}>;
|
|
109
|
+
slots: {
|
|
110
|
+
default?(_: {}): any;
|
|
111
|
+
};
|
|
112
|
+
refs: {};
|
|
113
|
+
rootEl: HTMLDivElement;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
declare function __VLS_template_5(): {
|
|
117
|
+
attrs: Partial<{}>;
|
|
118
|
+
slots: {
|
|
119
|
+
default?(_: {}): any;
|
|
120
|
+
};
|
|
121
|
+
refs: {};
|
|
122
|
+
rootEl: HTMLDivElement;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
126
|
+
|
|
127
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
128
|
+
|
|
129
|
+
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
130
|
+
|
|
131
|
+
declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
|
|
132
|
+
|
|
133
|
+
declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
|
|
134
|
+
|
|
135
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
136
|
+
new (): {
|
|
137
|
+
$slots: S;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
142
|
+
new (): {
|
|
143
|
+
$slots: S;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
148
|
+
new (): {
|
|
149
|
+
$slots: S;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
declare type __VLS_WithTemplateSlots_4<T, S> = T & {
|
|
154
|
+
new (): {
|
|
155
|
+
$slots: S;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare type __VLS_WithTemplateSlots_5<T, S> = T & {
|
|
160
|
+
new (): {
|
|
161
|
+
$slots: S;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare const Button: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
166
|
+
|
|
10
167
|
export declare interface ButtonProps {
|
|
11
168
|
type?: ButtonType;
|
|
12
169
|
size?: ButtonSize;
|
|
@@ -26,6 +183,8 @@ export declare type ButtonSize = 'extraSmall' | 'small' | 'medium' | 'large';
|
|
|
26
183
|
|
|
27
184
|
export declare type ButtonType = 'primary' | 'secondary' | 'danger' | 'foreground' | 'sameWhite';
|
|
28
185
|
|
|
186
|
+
export declare const Checkbox: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
187
|
+
|
|
29
188
|
export declare interface CheckboxEmits {
|
|
30
189
|
(e: 'update:modelValue', value: boolean | number): void;
|
|
31
190
|
(e: 'change', value: boolean | number): void;
|
|
@@ -39,6 +198,14 @@ export declare interface CheckboxProps {
|
|
|
39
198
|
indeterminate?: boolean;
|
|
40
199
|
}
|
|
41
200
|
|
|
201
|
+
export declare const Divider: DefineComponent<DividerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DividerProps> & Readonly<{}>, {
|
|
202
|
+
color: string;
|
|
203
|
+
direction: "horizontal" | "vertical";
|
|
204
|
+
borderStyle: "solid" | "dashed" | "dotted";
|
|
205
|
+
lineThickness: string;
|
|
206
|
+
margin: string | [string, string];
|
|
207
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
208
|
+
|
|
42
209
|
export declare interface DividerProps {
|
|
43
210
|
direction?: 'horizontal' | 'vertical';
|
|
44
211
|
borderStyle?: 'solid' | 'dashed' | 'dotted';
|
|
@@ -50,6 +217,8 @@ export declare interface DividerProps {
|
|
|
50
217
|
|
|
51
218
|
export declare type IconButtonType = 'rectangle' | 'square' | 'circle' | 'professional';
|
|
52
219
|
|
|
220
|
+
export declare const Input: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
221
|
+
|
|
53
222
|
export declare interface InputEmits {
|
|
54
223
|
(e: 'update:modelValue', value: StringOrNumber): void;
|
|
55
224
|
(e: 'input', value: StringOrNumber): void;
|
|
@@ -72,6 +241,8 @@ export declare interface InputProps {
|
|
|
72
241
|
rows?: number;
|
|
73
242
|
}
|
|
74
243
|
|
|
244
|
+
export declare const Radio: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
245
|
+
|
|
75
246
|
export declare interface RadioEmits {
|
|
76
247
|
(e: 'update:modelValue', value: RadioValue): void;
|
|
77
248
|
(e: 'change', value: RadioValue): void;
|
|
@@ -95,6 +266,8 @@ export declare interface TabPaneProps {
|
|
|
95
266
|
name: string | number;
|
|
96
267
|
}
|
|
97
268
|
|
|
269
|
+
export declare const Tabs: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
270
|
+
|
|
98
271
|
export declare const TABS_KEY: InjectionKey<TabsContext>;
|
|
99
272
|
|
|
100
273
|
export declare interface TabsContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.CregisUI={},n.Vue))})(this,(function(n,e){"use strict";const o=Symbol("TABS_KEY"),i=e.defineComponent({name:"TabPane",__name:"TabPane",props:{label:{},name:{}},setup(s){const t=s,a=e.inject(o);if(!a)throw new Error("TabPane must be used within Tabs");return e.onMounted(()=>{a.registerTab({label:t.label,name:t.name})}),e.watch(()=>t.label,r=>{a.unregisterTab(t.name),a.registerTab({label:r,name:t.name})}),e.onUnmounted(()=>{a.unregisterTab(t.name)}),()=>{}}});n.TABS_KEY=o,n.TabPane=i,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@cregis/icon")):typeof define=="function"&&define.amd?define(["exports","vue","@cregis/icon"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.CregisUI={},d.Vue,d.CregisIcon))})(this,(function(d,e,k){"use strict";const w={key:0,class:"cregis-button__icon-wrapper"},V=["disabled"],S=["disabled"],T=["disabled"],f=e.defineComponent({name:"Button",inheritAttrs:!1,__name:"Button",props:{type:{default:"primary"},size:{default:"medium"},plain:{type:Boolean},text:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},block:{type:Boolean},link:{type:Boolean},icon:{},iconType:{default:"rectangle"},iconText:{},affix:{type:Boolean}},setup(t){const l=t,a=e.computed(()=>l.size==="large"?"20px":l.size==="medium"?"16px":"12px"),r=e.computed(()=>l.size==="large"||l.size==="medium"?"16px":"12px"),i=e.computed(()=>{if(l.plain||l.text)switch(l.type){case"primary":return"var(--material-vibrant-brand-primary)";case"secondary":return"var(--material-foreground-base-secondary)";case"danger":return"var(--material-vibrant-error-primary)";case"foreground":return"var(--material-foreground-base-primary)";case"sameWhite":return"var(--material-same-black)"}else return l.type==="secondary"?"var(--material-foreground-base-secondary)":l.type==="foreground"?"var(--text-face-primary)":l.type==="sameWhite"?"var(--text-same-black)":"var(--material-same-white)"});return(n,s)=>t.icon||n.$slots.icon?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("button",e.mergeProps(n.$attrs,{class:["cregis-button__icon",{[`cregis-button__icon--${t.iconType}`]:t.iconType,[`cregis-button__icon--${t.size}`]:t.size,"is-disabled":t.disabled}],disabled:t.disabled||t.loading}),[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,size:a.value},null,8,["size"])):e.renderSlot(n.$slots,"icon",{key:1})],16,V),t.iconText?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cregis-button__icon-text",{"is-disabled":t.disabled}])},e.toDisplayString(t.iconText),3)):e.createCommentVNode("",!0)])):t.link?(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1},n.$attrs,{class:["cregis-button__link",{[`cregis-button__link--${t.type}`]:t.type,[`cregis-button__link--${t.size}`]:t.size,"is-disabled":t.disabled}],disabled:t.disabled||t.loading}),[e.renderSlot(n.$slots,"default")],16,S)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:2,ref:"buttonRef"},n.$attrs,{class:["cregis-button",{[`cregis-button--${t.type}`]:t.type,[`cregis-button--${t.size}`]:t.size,"is-plain":t.plain,"is-text":t.text,"is-disabled":t.disabled,"is-loading":t.loading,"is-block":t.block,"is-affix":t.affix}],disabled:t.disabled||t.loading}),[t.loading?(e.openBlock(),e.createBlock(e.unref(k.EdsLoad),{key:0,class:"loading",size:r.value,color:i.value},null,8,["size","color"])):e.renderSlot(n.$slots,"default",{key:1})],16,T))}}),E={key:0,class:"cregis-input__prefix"},N=["type","placeholder","disabled"],R={key:2,class:"cregis-input__suffix"},I=["disabled","placeholder","rows"],D={key:0,class:"cregis-textarea__buttons"},P=e.defineComponent({name:"Input",inheritAttrs:!1,__name:"Input",props:{type:{default:"text"},modelValue:{},size:{default:"medium"},width:{default:"300px"},placeholder:{default:"please input"},disabled:{type:Boolean},clearable:{type:Boolean},inputStyle:{},unit:{},rows:{default:3}},emits:["update:modelValue","input","change","focus","blur","clear"],setup(t,{expose:l,emit:a}){const r=t,i=a,n=e.ref(r.modelValue);e.watch(()=>r.modelValue,o=>{n.value=o});const s=e.ref(),c=e.ref(0),b=e.ref(!1);let g=null;const J=async()=>{await e.nextTick(),s.value?.focus()},h=async()=>{i("update:modelValue",n.value),i("input",n.value),await e.nextTick(),z()},p=()=>{i("change",n.value)},B=o=>{b.value=!0,i("focus",o)},C=o=>{b.value=!1,i("blur",o)},$=e.computed(()=>r.clearable&&!r.disabled&&!!n.value&&b.value),x=()=>{n.value="",i("update:modelValue",""),i("clear"),i("input",""),i("change","")},z=()=>{g&&cancelAnimationFrame(g),g=requestAnimationFrame(()=>{if(!s.value||s.value.tagName!=="INPUT")return;const o=s.value,u=o.value,m=document.createElement("span");m.style.position="absolute",m.style.visibility="hidden",m.style.whiteSpace="pre",m.style.font=window.getComputedStyle(o).font,m.style.letterSpacing=window.getComputedStyle(o).letterSpacing,m.textContent=u||" ",document.body.appendChild(m),c.value=m.getBoundingClientRect().width,document.body.removeChild(m)})},Q=e.computed(()=>{const o={};return c.value>0&&(o.position="absolute",o.left=`${c.value+16}px`),o}),X=async()=>{try{n.value=await navigator.clipboard.readText()}catch(o){console.error("paste error:",o)}};return l({focus:J,updateTextWidth:z}),(o,u)=>t.type!=="textarea"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cregis-input",{[`cregis-input--${t.size}`]:t.size,"is-disabled":t.disabled,"is-prefix":o.$slots.prefix,"is-suffix":o.$slots.suffix}]),style:e.normalizeStyle([{width:t.width},t.inputStyle])},[e.createElementVNode("div",{class:e.normalizeClass(["cregis-input__wrapper",{"is-focus":b.value}])},[o.$slots.prefix?(e.openBlock(),e.createElementBlock("span",E,[e.renderSlot(o.$slots,"prefix")])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({class:"cregis-input__inner","onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),ref_key:"inputRef",ref:s,type:t.type,placeholder:t.placeholder},o.$attrs,{disabled:t.disabled,onInput:h,onChange:p,onFocus:B,onBlur:C}),null,16,N),[[e.vModelDynamic,n.value]]),t.unit&&n.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(Q.value),class:"cregis-input__unit"},e.toDisplayString(t.unit),5)):e.createCommentVNode("",!0),o.$slots.suffix||$.value?(e.openBlock(),e.createElementBlock("span",R,[e.renderSlot(o.$slots,"suffix"),$.value?(e.openBlock(),e.createBlock(f,{key:0,icon:e.unref(k.EdsCloseCircleFill),"icon-type":"square",onClick:x,onMousedown:u[1]||(u[1]=e.withModifiers(()=>{},["prevent"]))},null,8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)],6)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["cregis-textarea",{"is-disabled":t.disabled}]),style:e.normalizeStyle([{width:t.width},t.inputStyle])},[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({class:"cregis-textarea__wrapper"},o.$attrs,{ref_key:"inputRef",ref:s,disabled:t.disabled,placeholder:t.placeholder,rows:t.rows,"onUpdate:modelValue":u[2]||(u[2]=m=>n.value=m),onInput:h,onChange:p,onFocus:B,onBlur:C}),null,16,I),[[e.vModelText,n.value]]),t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",D,[e.createVNode(f,{class:"cregis-textarea__button",link:"",size:"small",onClick:X},{default:e.withCtx(()=>[...u[3]||(u[3]=[e.createTextVNode(" Paste ",-1)])]),_:1}),e.createVNode(f,{class:"cregis-textarea__button",link:"",size:"small",disabled:!n.value,onClick:x},{default:e.withCtx(()=>[...u[4]||(u[4]=[e.createTextVNode(" Clear ",-1)])]),_:1},8,["disabled"])]))],6))}}),L=["width","height"],A={stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F={transform:"translate(-394.000000, -457.000000)"},M={transform:"translate(394.000000, 457.000000)"},W=["width","height"],U=e.defineComponent({__name:"checked-basis",props:{size:{default:"16px"}},setup(t){return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{width:t.size,height:t.size,viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[e.createElementVNode("g",A,[e.createElementVNode("g",F,[e.createElementVNode("g",M,[e.createElementVNode("rect",{x:"0",y:"0",width:t.size,height:t.size},null,8,W),a[0]||(a[0]=e.createElementVNode("path",{d:"M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",fill:"currentColor","fill-rule":"nonzero"},null,-1))])])])],8,L))}}),q={key:0,class:"cregis-checkbox--indeterminate"},j=e.defineComponent({name:"Checkbox",__name:"Checkbox",props:{modelValue:{type:[Boolean,Number],default:!1},label:{},disabled:{type:Boolean,default:!1},circle:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue","change"],setup(t,{emit:l}){const a=t,r=l,i=e.computed(()=>a.modelValue),n=()=>{a.disabled||r("update:modelValue",!i.value)};return e.watch(()=>i.value,()=>{r("change",i.value)}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:"cregis-checkbox__wrapper",onClick:n},[e.createElementVNode("div",{class:e.normalizeClass(["cregis-checkbox",{"is-disabled":t.disabled,"is-checked":i.value,"is-circle":t.circle,"is-indeterminate":t.indeterminate}])},[t.indeterminate?(e.openBlock(),e.createElementBlock("div",q)):(e.openBlock(),e.createBlock(U,{key:1,size:"10px"}))],2),s.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cregis-checkbox__label",{"is-disabled":t.disabled}])},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],2)):e.createCommentVNode("",!0)]))}}),K=e.defineComponent({name:"Radio",__name:"Radio",props:{modelValue:{type:[Boolean,String,Number]},value:{type:[Boolean,String,Number]},label:{},disabled:{type:Boolean}},emits:["update:modelValue","change"],setup(t,{emit:l}){const a=t,r=l,i=e.computed(()=>a.modelValue===a.value),n=()=>{a.disabled||(r("update:modelValue",a.value),r("change",a.value))};return(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:"cregis-radio__wrapper",onClick:n},[e.createElementVNode("div",{class:e.normalizeClass(["cregis-radio",{"is-disabled":t.disabled,"is-checked":i.value}])},[...c[0]||(c[0]=[e.createElementVNode("div",{class:"cregis-radio__inner"},null,-1)])],2),s.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cregis-radio__label",{"is-disabled":t.disabled}])},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],2)):e.createCommentVNode("",!0)]))}}),O=e.defineComponent({name:"Divider",__name:"Divider",props:{direction:{default:"horizontal"},borderStyle:{default:"solid"},lineThickness:{default:"1px"},color:{default:"var(--line-module)"},margin:{default:"8px"},length:{}},setup(t){const l=t,a=e.computed(()=>{if(Array.isArray(l.margin)){const[i,n]=l.margin;return l.direction==="horizontal"?`${i} 0 ${n} 0`:`0 ${n} 0 ${i}`}else return l.direction==="horizontal"?`${l.margin} 0`:`0 ${l.margin}`}),r=e.computed(()=>l.direction==="horizontal"?{width:l.length||"100%",borderTopWidth:l.lineThickness,borderTopStyle:l.borderStyle,borderTopColor:l.color,margin:a.value}:{height:l.length||"1rem",borderLeftWidth:l.lineThickness,borderLeftStyle:l.borderStyle,borderLeftColor:l.color,margin:a.value});return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cregis-divider",{[`cregis-divider--${t.direction}`]:t.direction}]),style:e.normalizeStyle(r.value)},null,6))}}),y=Symbol("TABS_KEY"),Y=["onClick"],Z={style:{display:"none"}},G=e.defineComponent({name:"Tabs",__name:"Tabs",props:{modelValue:{},type:{default:"default"},size:{default:"medium"}},emits:["update:modelValue"],setup(t){const l=t,a=e.reactive([]),r=s=>{a.some(c=>c.name===s.name)||a.push(s)},i=s=>{const c=a.findIndex(b=>b.name===s);c!==-1&&a.splice(c,1)},n=e.computed(()=>l.type==="card"?l.size==="large"?{borderRadius:"13px"}:l.size==="medium"?{borderRadius:"11px"}:{borderRadius:"9px"}:{borderRadius:0});return e.provide(y,{activeName:e.toRef(l,"modelValue"),registerTab:r,unregisterTab:i}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cregis-tabs",{[`cregis-tabs--${t.type}`]:t.type,[`cregis-tabs--${t.size}`]:t.size}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,b=>(e.openBlock(),e.createElementBlock("div",{key:b.name,class:e.normalizeClass(["cregis-tabs__item",{"is-active":t.modelValue===b.name}]),style:e.normalizeStyle(n.value),onClick:g=>s.$emit("update:modelValue",b.name)},[e.createElementVNode("span",null,e.toDisplayString(b.label),1)],14,Y))),128)),e.createElementVNode("div",Z,[e.renderSlot(s.$slots,"default")])],2))}}),H=e.defineComponent({name:"TabPane",__name:"TabPane",props:{label:{},name:{}},setup(t){const l=t,a=e.inject(y);if(!a)throw new Error("TabPane must be used within Tabs");return e.onMounted(()=>{a.registerTab({label:l.label,name:l.name})}),e.watch(()=>l.label,r=>{a.unregisterTab(l.name),a.registerTab({label:r,name:l.name})}),e.onUnmounted(()=>{a.unregisterTab(l.name)}),()=>{}}});d.Button=f,d.Checkbox=j,d.Divider=O,d.Input=P,d.Radio=K,d.TABS_KEY=y,d.TabPane=H,d.Tabs=G,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/umd/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 .0078 .1765 .051;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 255 255 255;--foreground-base: 2 3 4;--module-line: 235 236 237;--page: 255 255 255}.dark{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 1 1 1;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 2 3 4;--foreground-base: 255 255 255;--module-line: 0 0 0;--page: 30 33 35}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}:root{--material-vibrant-brand-primary: color(var(--system-brand) / 1);--material-opaque-card-moderate: rgb(var(--foreground-base) / .05);--material-foreground-face-primary: rgb(var(--foreground-face) / 1);--material-foreground-face-quaternary: rgb(var(--foreground-face) / .2);--material-foreground-base-primary: rgb(var(--foreground-base) / 1);--material-foreground-base-secondary: rgb(var(--foreground-base) / .6);--material-foreground-base-quaternary: rgb(var(--foreground-base) / .2);--material-vibrant-error-primary: color(var(--system-error) / 1);--material-decor-primary: color(var(--system-decor) / 1);--material-same-white: rgb(var(--same-white) / 1);--material-opaque-hide: rgb(var(--foreground-base) / 0);--text-base-primary: rgb(var(--foreground-base) / 1);--text-base-secondary: rgb(var(--foreground-base) / .6);--text-base-tertiary: rgb(var(--foreground-base) / .4);--text-base-quaternary: rgb(var(--foreground-base) / .2);--text-face-primary: rgb(var(--foreground-face) / 1);--text-face-secondary: rgb(var(--foreground-face) / .6);--text-same-white: rgb(var(--same-white) / 1);--text-same-white-tap: rgb(var(--same-white) / .6);--text-same-black: rgb(var(--same-black) / 1);--text-same-black-tap: rgb(var(--same-black) / .6);--text-brand-tap: color(var(--system-brand) / .6);--text-brand-40: color(var(--system-brand) / .4);--text-brand-disabled: color(var(--system-brand) / .2);--text-error-tap: color(var(--system-error) / .6);--line-border-deep: rgb(var(--foreground-base) / .18);--line-module: rgb(var(--module-line) / 1);--event-hover-secondary: rgb(var(--foreground-base) / .05);--event-hover-tertiary: rgb(var(--page) / 1);--event-focus-secondary: rgb(var(--foreground-base) / .07)}.dark{--material-opaque-card-moderate: rgb(var(--foreground-base) / .07);--event-hover-secondary: rgb(var(--foreground-base) / .07);--event-focus-secondary: rgb(var(--foreground-base) / .1)}.cregis-input{width:100%;position:relative;display:inline-flex;font-size:15px;line-height:22px;box-sizing:border-box;vertical-align:middle;caret-color:var(--text-base-primary)}.cregis-input.is-disabled{cursor:not-allowed}.cregis-input.is-disabled .cregis-input__inner{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-input__wrapper{position:relative;display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:0 12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent}.cregis-input__wrapper.is-focus{border:2px solid var(--material-vibrant-brand-primary);border-radius:6px;background-color:var(--material-foreground-face-quaternary)}.cregis-input__wrapper.is-focus .cregis-input__inner::placeholder{color:var(--text-base-quaternary)}.cregis-input__inner{width:100%;min-width:20px;-webkit-appearance:none;font-size:inherit;padding:0;outline:none;border:none;background:none;box-sizing:border-box;color:var(--text-base-primary)}.cregis-input__inner::placeholder{color:var(--text-base-tertiary)}.cregis-input__inner::-webkit-outer-spin-button,.cregis-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cregis-input--small{height:32px}.cregis-input--medium{height:40px}.cregis-input--large{height:48px}.cregis-input__unit{color:var(--text-base-primary)}.cregis-input__prefix,.cregis-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;align-items:center}.cregis-input__prefix>:first-child{margin-left:0!important}.cregis-input__prefix>:last-child{margin-right:8px!important}.cregis-input__suffix>:first-child{margin-left:8px!important}.cregis-input__suffix>:last-child{margin-right:0!important}.cregis-input__clear-button svg g path{fill:var(--material-foreground-base-secondary)}.cregis-input__clear-button:hover svg g path{fill:var(--material-foreground-base-primary)}.cregis-input__clear-button:active svg g path{fill:var(--material-foreground-base-secondary)}.cregis-textarea{position:relative}.cregis-textarea.is-disabled .cregis-textarea__wrapper{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-textarea__wrapper{resize:none;position:relative;display:block;padding:12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;background-image:none;-webkit-appearance:none;caret-color:var(--text-base-primary);color:var(--text-base-primary)}.cregis-textarea__wrapper:focus{outline:none;border:2px solid var(--material-vibrant-brand-primary)}.cregis-textarea__wrapper:focus::placeholder{color:var(--text-base-quaternary)}.cregis-textarea__wrapper::placeholder{color:var(--text-base-tertiary)}.cregis-textarea__buttons{position:absolute;bottom:10px;left:12px;display:flex;gap:16px}.cregis-textarea__button{font-size:12px;font-weight:500;cursor:default;color:var(--material-vibrant-brand-primary)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cregis-button{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary);border:1px solid var(--material-vibrant-brand-primary);font-size:13px;border-radius:30px}.cregis-button:active{color:var(--text-same-white-tap)}.cregis-button.is-plain{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide)}.cregis-button.is-plain:hover{color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary)}.cregis-button.is-plain:active{color:var(--text-same-white-tap)}.cregis-button.is-text{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide);border-color:transparent}.cregis-button.is-text:hover{background-color:var(--event-hover-secondary)}.cregis-button.is-text:active{color:var(--text-brand-tap)}.cregis-button.is-block{width:100%}:is(.cregis-button.is-plain.is-loading,.cregis-button.is-text.is-loading):hover{background-color:var(--material-opaque-hide)}.cregis-button .loading{animation:rotate 2s linear infinite}.cregis-button.is-affix{gap:4px}.cregis-button.is-affix svg g path{stroke:var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active svg g path{stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled span{color:var(--text-base-quaternary)}.cregis-button--secondary{background-color:var(--material-opaque-card-moderate);border-color:transparent;color:var(--text-base-primary)}.cregis-button--secondary:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-plain{border:.5px solid var(--line-border-deep);color:var(--text-base-primary)}.cregis-button--secondary.is-plain:hover{border:.5px solid transparent;color:var(--text-base-primary);background-color:var(--material-opaque-card-moderate)}.cregis-button--secondary.is-plain.is-plain.is-loading{border:.5px solid var(--line-border-deep)}.cregis-button--secondary.is-plain:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active{color:var(--text-base-secondary)}.cregis-button--danger{background-color:var(--material-vibrant-error-primary);border-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain:hover{background-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text:active{color:var(--text-error-tap)}.cregis-button--foreground{background-color:var(--material-decor-primary);border-color:var(--material-decor-primary);color:var(--text-face-primary)}.cregis-button--foreground:active{color:var(--text-face-secondary)}.cregis-button--foreground.is-plain{color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:hover{color:var(--text-face-primary);background-color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:active{color:var(--text-face-secondary)}.cregis-button--sameWhite{background-color:var(--material-same-white);border-color:transparent;color:var(--text-same-black)}.cregis-button--sameWhite:active{color:var(--text-same-black-tap)}.cregis-button--large{padding:0 20px;height:40px;font-size:15px;line-height:22px}.cregis-button--medium{padding:0 16px;height:32px;font-size:13px;line-height:18px}.cregis-button--small{padding:0 12px;height:24px;font-size:13px;line-height:18px}.cregis-button--extraSmall{padding:0 12px;height:20px;font-size:12px;line-height:16px}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled{color:var(--text-base-quaternary);background-color:var(--material-opaque-card-moderate);border-color:transparent;cursor:not-allowed}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled{border:.5px solid var(--line-border-deep);background-color:var(--material-opaque-hide)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled:hover{color:var(--text-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled{background-color:var(--material-opaque-hide);border-color:transparent}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled:active{color:var(--text-base-quaternary)}.cregis-button__link{border:none;border-bottom:1px dashed var(--material-opaque-hide);background-color:var(--material-opaque-hide);color:var(--material-vibrant-brand-primary);font-weight:500;padding:0}.cregis-button__link:hover{border-bottom:1px dashed var(--text-brand-40)}.cregis-button__link:active{border-bottom:1px dashed var(--text-brand-disabled);color:var(--text-brand-tap)}.cregis-button__link.is-disabled{color:var(--text-base-quaternary);border-color:transparent;cursor:not-allowed}.cregis-button__link--foreground{color:var(--text-base-primary)}.cregis-button__link--foreground:hover{border-bottom:1px dashed var(--text-base-tertiary)}.cregis-button__link--foreground:active{border-bottom:1px dashed var(--text-base-quaternary);color:var(--text-base-secondary)}.cregis-button__link--foreground.is-disabled{color:var(--text-base-quaternary);border-color:transparent}.cregis-button__link--large{font-size:15px}.cregis-button__link--medium{font-size:13px}.cregis-button__link--small,.cregis-button__link--extraSmall{font-size:12px}.cregis-button__icon-wrapper{display:flex;flex-direction:column;align-items:center}.cregis-button__icon{display:flex;justify-content:center;align-items:center;border-color:transparent;background-color:var(--material-opaque-hide);padding:0;border-radius:6px}.cregis-button__icon svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:hover{background-color:var(--event-hover-secondary)}.cregis-button__icon:hover svg g path{stroke:var(--material-foreground-base-primary)}.cregis-button__icon:active{background-color:var(--event-focus-secondary)}.cregis-button__icon:active svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon.is-disabled{cursor:not-allowed}.cregis-button__icon.is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled:hover{background-color:var(--material-opaque-hide)}.cregis-button__icon--rectangle.cregis-button__icon--large{width:36px;height:28px}.cregis-button__icon--rectangle.cregis-button__icon--medium{width:32px;height:24px}.cregis-button__icon--rectangle.cregis-button__icon--small,.cregis-button__icon--rectangle.cregis-button__icon--extraSmall{width:26px;height:20px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--large{width:28px;height:28px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--medium{width:24px;height:24px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--small,:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--extraSmall{width:20px;height:20px}.cregis-button__icon--circle{border-radius:50%}.cregis-button__icon--professional{width:32px;height:24px}.cregis-button__icon-text{font-size:11px;line-height:14px;font-weight:500;color:var(--text-base-secondary)}.cregis-button__icon-text.is-disabled{cursor:not-allowed;color:var(--text-base-quaternary)}.cregis-checkbox__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-checkbox{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:4px;display:flex;align-items:center;justify-content:center}.cregis-checkbox svg{visibility:hidden}.cregis-checkbox:hover svg{color:var(--line-border-deep);visibility:visible}.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}:is(.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate) svg{visibility:visible!important;color:var(--material-same-white)}.cregis-checkbox.is-circle{border-radius:50%}.cregis-checkbox.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-checkbox.is-disabled:hover svg{visibility:hidden}.cregis-checkbox.is-checked.is-disabled{opacity:.6}.cregis-checkbox__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-checkbox__label.is-disabled{cursor:not-allowed}.cregis-checkbox--indeterminate{width:8px;height:1.5px;border-radius:1px;background-color:var(--material-same-white)}.cregis-radio__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-radio{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:50%;display:flex;align-items:center;justify-content:center}.cregis-radio:hover .cregis-radio__inner{visibility:visible}.cregis-radio.is-checked{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}.cregis-radio.is-checked .cregis-radio__inner{visibility:visible!important;background-color:var(--text-same-white)}.cregis-radio.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-radio.is-disabled:hover .cregis-radio__inner{visibility:hidden}.cregis-radio.is-checked.is-disabled{opacity:.6}.cregis-radio__inner{width:6px;height:6px;border-radius:50%;background-color:var(--material-foreground-base-quaternary);visibility:hidden}.cregis-radio__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-radio__label.is-disabled{cursor:not-allowed}.cregis-divider{display:flex;align-items:center}.cregis-divider--horizontal{flex-direction:row}.cregis-divider--vertical{flex-direction:column}.cregis-tabs{display:flex;gap:16px;width:fit-content;height:29px;font-size:13px;font-weight:500;color:var(--text-base-primary);cursor:default}.cregis-tabs__item{border-bottom:2px solid var(--material-opaque-hide);transition:color .2s ease,border-color .2s ease}.cregis-tabs__item.is-active{color:var(--material-vibrant-brand-primary);border-bottom:2px solid var(--material-vibrant-brand-primary)}.cregis-tabs--large{height:33px;font-size:15px}.cregis-tabs--small{height:28px;font-size:12px}.cregis-tabs--card{height:28px;background-color:var(--material-opaque-card-moderate);border-radius:14px;padding:3px;font-size:12px;gap:6px}.cregis-tabs--card.cregis-tabs--large{height:32px;border-radius:16px}.cregis-tabs--card.cregis-tabs--small{height:24px;border-radius:12px}.cregis-tabs--card .cregis-tabs__item{display:flex;align-items:center;justify-content:center;border:none;padding:0 6px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
|
|
1
|
+
:root{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 .0078 .1765 .051;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 255 255 255;--foreground-base: 2 3 4;--module-line: 235 236 237;--page: 255 255 255}.dark{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 1 1 1;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 2 3 4;--foreground-base: 255 255 255;--module-line: 0 0 0;--page: 30 33 35}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}circle,path,polygon,rect,ellipse,line,polyline,g{vector-effect:non-scaling-stroke}:root{--material-vibrant-brand-primary: color(var(--system-brand) / 1);--material-opaque-card-moderate: rgb(var(--foreground-base) / .05);--material-foreground-face-primary: rgb(var(--foreground-face) / 1);--material-foreground-face-quaternary: rgb(var(--foreground-face) / .2);--material-foreground-base-primary: rgb(var(--foreground-base) / 1);--material-foreground-base-secondary: rgb(var(--foreground-base) / .6);--material-foreground-base-quaternary: rgb(var(--foreground-base) / .2);--material-vibrant-error-primary: color(var(--system-error) / 1);--material-decor-primary: color(var(--system-decor) / 1);--material-same-white: rgb(var(--same-white) / 1);--material-opaque-hide: rgb(var(--foreground-base) / 0);--text-base-primary: rgb(var(--foreground-base) / 1);--text-base-secondary: rgb(var(--foreground-base) / .6);--text-base-tertiary: rgb(var(--foreground-base) / .4);--text-base-quaternary: rgb(var(--foreground-base) / .2);--text-face-primary: rgb(var(--foreground-face) / 1);--text-face-secondary: rgb(var(--foreground-face) / .6);--text-same-white: rgb(var(--same-white) / 1);--text-same-white-tap: rgb(var(--same-white) / .6);--text-same-black: rgb(var(--same-black) / 1);--text-same-black-tap: rgb(var(--same-black) / .6);--text-brand-tap: color(var(--system-brand) / .6);--text-brand-40: color(var(--system-brand) / .4);--text-brand-disabled: color(var(--system-brand) / .2);--text-error-tap: color(var(--system-error) / .6);--line-border-deep: rgb(var(--foreground-base) / .18);--line-module: rgb(var(--module-line) / 1);--event-hover-secondary: rgb(var(--foreground-base) / .05);--event-hover-tertiary: rgb(var(--page) / 1);--event-focus-secondary: rgb(var(--foreground-base) / .07)}.dark{--material-opaque-card-moderate: rgb(var(--foreground-base) / .07);--event-hover-secondary: rgb(var(--foreground-base) / .07);--event-focus-secondary: rgb(var(--foreground-base) / .1)}.cregis-input{width:100%;position:relative;display:inline-flex;font-size:15px;line-height:22px;box-sizing:border-box;vertical-align:middle;caret-color:var(--text-base-primary)}.cregis-input.is-disabled{cursor:not-allowed}.cregis-input.is-disabled .cregis-input__inner{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-input__wrapper{position:relative;display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:0 12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent}.cregis-input__wrapper.is-focus{border:2px solid var(--material-vibrant-brand-primary);border-radius:6px;background-color:var(--material-foreground-face-quaternary)}.cregis-input__wrapper.is-focus .cregis-input__inner::placeholder{color:var(--text-base-quaternary)}.cregis-input__inner{width:100%;min-width:20px;-webkit-appearance:none;font-size:inherit;padding:0;outline:none;border:none;background:none;box-sizing:border-box;color:var(--text-base-primary)}.cregis-input__inner::placeholder{color:var(--text-base-tertiary)}.cregis-input__inner::-webkit-outer-spin-button,.cregis-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cregis-input--small{height:32px}.cregis-input--medium{height:40px}.cregis-input--large{height:48px}.cregis-input__unit{color:var(--text-base-primary)}.cregis-input__prefix,.cregis-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;align-items:center}.cregis-input__prefix>:first-child{margin-left:0!important}.cregis-input__prefix>:last-child{margin-right:8px!important}.cregis-input__suffix>:first-child{margin-left:8px!important}.cregis-input__suffix>:last-child{margin-right:0!important}.cregis-textarea{position:relative}.cregis-textarea.is-disabled .cregis-textarea__wrapper{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-textarea__wrapper{resize:none;position:relative;display:block;padding:12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;background-image:none;-webkit-appearance:none;caret-color:var(--text-base-primary);color:var(--text-base-primary)}.cregis-textarea__wrapper:focus{outline:none;border:2px solid var(--material-vibrant-brand-primary)}.cregis-textarea__wrapper:focus::placeholder{color:var(--text-base-quaternary)}.cregis-textarea__wrapper::placeholder{color:var(--text-base-tertiary)}.cregis-textarea__buttons{position:absolute;bottom:10px;left:12px;display:flex;gap:16px}.cregis-textarea__button{font-size:12px;font-weight:500;cursor:default;color:var(--material-vibrant-brand-primary)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cregis-button{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary);border:1px solid var(--material-vibrant-brand-primary);font-size:13px;border-radius:30px}.cregis-button:active{color:var(--text-same-white-tap)}.cregis-button.is-plain{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide)}.cregis-button.is-plain:hover{color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary)}.cregis-button.is-plain:active{color:var(--text-same-white-tap)}.cregis-button.is-text{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide);border-color:transparent}.cregis-button.is-text:hover{background-color:var(--event-hover-secondary)}.cregis-button.is-text:active{color:var(--text-brand-tap)}.cregis-button.is-block{width:100%}:is(.cregis-button.is-plain.is-loading,.cregis-button.is-text.is-loading):hover{background-color:var(--material-opaque-hide)}.cregis-button .loading{animation:rotate 2s linear infinite}.cregis-button.is-affix{gap:4px}.cregis-button.is-affix svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button.is-affix svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--text-same-white)}.cregis-button.is-affix svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button.is-affix:active svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--text-same-white-tap)}.cregis-button.is-affix:active span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled span{color:var(--text-base-quaternary)}.cregis-button--secondary{background-color:var(--material-opaque-card-moderate);border-color:transparent;color:var(--text-base-primary)}.cregis-button--secondary:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-plain{border:.5px solid var(--line-border-deep);color:var(--text-base-primary)}.cregis-button--secondary.is-plain:hover{border:.5px solid transparent;color:var(--text-base-primary);background-color:var(--material-opaque-card-moderate)}.cregis-button--secondary.is-plain.is-plain.is-loading{border:.5px solid var(--line-border-deep)}.cregis-button--secondary.is-plain:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active{color:var(--text-base-secondary)}.cregis-button--danger{background-color:var(--material-vibrant-error-primary);border-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain:hover{background-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text:active{color:var(--text-error-tap)}.cregis-button--foreground{background-color:var(--material-decor-primary);border-color:var(--material-decor-primary);color:var(--text-face-primary)}.cregis-button--foreground:active{color:var(--text-face-secondary)}.cregis-button--foreground.is-plain{color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:hover{color:var(--text-face-primary);background-color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:active{color:var(--text-face-secondary)}.cregis-button--sameWhite{background-color:var(--material-same-white);border-color:transparent;color:var(--text-same-black)}.cregis-button--sameWhite:active{color:var(--text-same-black-tap)}.cregis-button--large{padding:0 20px;height:40px;font-size:15px;line-height:22px}.cregis-button--medium{padding:0 16px;height:32px;font-size:13px;line-height:18px}.cregis-button--small{padding:0 12px;height:24px;font-size:13px;line-height:18px}.cregis-button--extraSmall{padding:0 12px;height:20px;font-size:12px;line-height:16px}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled{color:var(--text-base-quaternary);background-color:var(--material-opaque-card-moderate);border-color:transparent;cursor:not-allowed}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg>g:is([fill=none],[fill=transparent]) path:not([fill]),:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg>g:is([fill=none],[fill=transparent]) path:not([fill]),:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled{border:.5px solid var(--line-border-deep);background-color:var(--material-opaque-hide)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled:hover{color:var(--text-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled{background-color:var(--material-opaque-hide);border-color:transparent}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled:active{color:var(--text-base-quaternary)}.cregis-button__link{border:none;border-bottom:1px dashed var(--material-opaque-hide);background-color:var(--material-opaque-hide);color:var(--material-vibrant-brand-primary);font-weight:500;padding:0}.cregis-button__link:hover{border-bottom:1px dashed var(--text-brand-40)}.cregis-button__link:active{border-bottom:1px dashed var(--text-brand-disabled);color:var(--text-brand-tap)}.cregis-button__link.is-disabled{color:var(--text-base-quaternary);border-color:transparent;cursor:not-allowed}.cregis-button__link--foreground{color:var(--text-base-primary)}.cregis-button__link--foreground:hover{border-bottom:1px dashed var(--text-base-tertiary)}.cregis-button__link--foreground:active{border-bottom:1px dashed var(--text-base-quaternary);color:var(--text-base-secondary)}.cregis-button__link--foreground.is-disabled{color:var(--text-base-quaternary);border-color:transparent}.cregis-button__link--large{font-size:15px}.cregis-button__link--medium{font-size:13px}.cregis-button__link--small,.cregis-button__link--extraSmall{font-size:12px}.cregis-button__icon-wrapper{display:flex;flex-direction:column;align-items:center}.cregis-button__icon{display:flex;justify-content:center;align-items:center;border-color:transparent;background-color:var(--material-opaque-hide);padding:0;border-radius:6px}.cregis-button__icon svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-secondary)}.cregis-button__icon:hover{background-color:var(--event-hover-secondary)}.cregis-button__icon:hover svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon:hover svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-primary)}.cregis-button__icon:hover svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-primary)}.cregis-button__icon:active{background-color:var(--event-focus-secondary)}.cregis-button__icon:active svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon:active svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:active svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-secondary)}.cregis-button__icon.is-disabled{cursor:not-allowed}.cregis-button__icon.is-disabled svg>g:is([fill=none],[fill=transparent]) path:not([fill]),.cregis-button__icon.is-disabled svg>g:is([fill=none],[fill=transparent]) path:is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled svg path[fill]:not([fill=none]):not([fill=transparent]){fill:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled:hover{background-color:var(--material-opaque-hide)}.cregis-button__icon--rectangle.cregis-button__icon--large{width:36px;height:28px}.cregis-button__icon--rectangle.cregis-button__icon--medium{width:32px;height:24px}.cregis-button__icon--rectangle.cregis-button__icon--small,.cregis-button__icon--rectangle.cregis-button__icon--extraSmall{width:26px;height:20px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--large{width:28px;height:28px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--medium{width:24px;height:24px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--small,:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--extraSmall{width:20px;height:20px}.cregis-button__icon--circle{border-radius:50%}.cregis-button__icon--professional{width:32px;height:24px}.cregis-button__icon-text{font-size:11px;line-height:14px;font-weight:500;color:var(--text-base-secondary)}.cregis-button__icon-text.is-disabled{cursor:not-allowed;color:var(--text-base-quaternary)}.cregis-checkbox__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-checkbox{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:4px;display:flex;align-items:center;justify-content:center}.cregis-checkbox svg{visibility:hidden}.cregis-checkbox:hover svg{color:var(--line-border-deep);visibility:visible}.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}:is(.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate) svg{visibility:visible!important;color:var(--material-same-white)}.cregis-checkbox.is-circle{border-radius:50%}.cregis-checkbox.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-checkbox.is-disabled:hover svg{visibility:hidden}.cregis-checkbox.is-checked.is-disabled{opacity:.6}.cregis-checkbox__label{font-size:15px;font-weight:500;color:var(--text-base-primary)}.cregis-checkbox__label.is-disabled{cursor:not-allowed}.cregis-checkbox--indeterminate{width:8px;height:1.5px;border-radius:1px;background-color:var(--material-same-white)}.cregis-radio__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-radio{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:50%;display:flex;align-items:center;justify-content:center}.cregis-radio:hover .cregis-radio__inner{visibility:visible}.cregis-radio.is-checked{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}.cregis-radio.is-checked .cregis-radio__inner{visibility:visible!important;background-color:var(--text-same-white)}.cregis-radio.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-radio.is-disabled:hover .cregis-radio__inner{visibility:hidden}.cregis-radio.is-checked.is-disabled{opacity:.6}.cregis-radio__inner{width:6px;height:6px;border-radius:50%;background-color:var(--material-foreground-base-quaternary);visibility:hidden}.cregis-radio__label{font-size:15px;font-weight:500;color:var(--text-base-primary)}.cregis-radio__label.is-disabled{cursor:not-allowed}.cregis-divider{display:flex;align-items:center}.cregis-divider--horizontal{flex-direction:row}.cregis-divider--vertical{flex-direction:column}.cregis-tabs{display:flex;gap:16px;width:fit-content;height:29px;font-size:13px;font-weight:500;color:var(--text-base-primary);cursor:default}.cregis-tabs__item{border-bottom:2px solid var(--material-opaque-hide);transition:color .2s ease,border-color .2s ease}.cregis-tabs__item.is-active{color:var(--material-vibrant-brand-primary);border-bottom:2px solid var(--material-vibrant-brand-primary)}.cregis-tabs--large{height:33px;font-size:15px}.cregis-tabs--small{height:28px;font-size:12px}.cregis-tabs--card{height:28px;background-color:var(--material-opaque-card-moderate);border-radius:14px;padding:3px;font-size:12px;gap:6px}.cregis-tabs--card.cregis-tabs--large{height:32px;border-radius:16px}.cregis-tabs--card.cregis-tabs--small{height:24px;border-radius:12px}.cregis-tabs--card .cregis-tabs__item{display:flex;align-items:center;justify-content:center;border:none;padding:0 6px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
|