@cregis/ui 0.1.6 → 0.1.8
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/README.md +5 -5
- package/dist/es/cregis-ui.js +62 -58
- package/dist/index.css +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/dist/umd/index.css +1 -1
- package/package.json +79 -79
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Vue 3 + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
-
|
|
5
|
-
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
|
1
|
+
# Vue 3 + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, computed as
|
|
1
|
+
import { defineComponent as k, computed as g, createElementBlock as r, openBlock as s, createElementVNode as u, createCommentVNode as h, mergeProps as x, createBlock as z, renderSlot as v, resolveDynamicComponent as Y, normalizeClass as y, toDisplayString as p, unref as W, ref as C, watch as S, normalizeStyle as $, 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
2
|
import { EdsLoad as ie, EdsCloseCircleFill as le } from "@cregis/icon";
|
|
3
3
|
const ne = {
|
|
4
4
|
key: 0,
|
|
@@ -19,10 +19,11 @@ const ne = {
|
|
|
19
19
|
icon: {},
|
|
20
20
|
iconType: { default: "rectangle" },
|
|
21
21
|
iconText: {},
|
|
22
|
-
affix: { type: Boolean }
|
|
22
|
+
affix: { type: Boolean },
|
|
23
|
+
isActive: { type: Boolean }
|
|
23
24
|
},
|
|
24
25
|
setup(e) {
|
|
25
|
-
const t = e, i =
|
|
26
|
+
const t = e, i = g(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), d = g(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = g(() => {
|
|
26
27
|
if (t.plain || t.text)
|
|
27
28
|
switch (t.type) {
|
|
28
29
|
case "primary":
|
|
@@ -40,11 +41,12 @@ const ne = {
|
|
|
40
41
|
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
|
});
|
|
42
43
|
return (a, o) => e.icon || a.$slots.icon ? (s(), r("div", ne, [
|
|
43
|
-
u("button",
|
|
44
|
+
u("button", x(a.$attrs, {
|
|
44
45
|
class: ["cregis-button__icon", {
|
|
45
46
|
[`cregis-button__icon--${e.iconType}`]: e.iconType,
|
|
46
47
|
[`cregis-button__icon--${e.size}`]: e.size,
|
|
47
|
-
"is-disabled": e.disabled
|
|
48
|
+
"is-disabled": e.disabled,
|
|
49
|
+
"is-active": e.isActive
|
|
48
50
|
}],
|
|
49
51
|
disabled: e.disabled || e.loading
|
|
50
52
|
}), [
|
|
@@ -55,18 +57,19 @@ const ne = {
|
|
|
55
57
|
], 16, se),
|
|
56
58
|
e.iconText ? (s(), r("span", {
|
|
57
59
|
key: 0,
|
|
58
|
-
class:
|
|
59
|
-
},
|
|
60
|
-
])) : e.link ? (s(), r("button",
|
|
60
|
+
class: y(["cregis-button__icon-text", { "is-disabled": e.disabled }])
|
|
61
|
+
}, p(e.iconText), 3)) : h("", !0)
|
|
62
|
+
])) : e.link ? (s(), r("button", x({ key: 1 }, a.$attrs, {
|
|
61
63
|
class: ["cregis-button__link", {
|
|
62
64
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
63
65
|
[`cregis-button__link--${e.size}`]: e.size,
|
|
64
|
-
"is-disabled": e.disabled
|
|
66
|
+
"is-disabled": e.disabled,
|
|
67
|
+
"is-active": e.isActive
|
|
65
68
|
}],
|
|
66
69
|
disabled: e.disabled || e.loading
|
|
67
70
|
}), [
|
|
68
71
|
v(a.$slots, "default")
|
|
69
|
-
], 16, oe)) : (s(), r("button",
|
|
72
|
+
], 16, oe)) : (s(), r("button", x({
|
|
70
73
|
key: 2,
|
|
71
74
|
ref: "buttonRef"
|
|
72
75
|
}, a.$attrs, {
|
|
@@ -78,7 +81,8 @@ const ne = {
|
|
|
78
81
|
"is-disabled": e.disabled,
|
|
79
82
|
"is-loading": e.loading,
|
|
80
83
|
"is-block": e.block,
|
|
81
|
-
"is-affix": e.affix
|
|
84
|
+
"is-affix": e.affix,
|
|
85
|
+
"is-active": e.isActive
|
|
82
86
|
}],
|
|
83
87
|
disabled: e.disabled || e.loading
|
|
84
88
|
}), [
|
|
@@ -132,11 +136,11 @@ const ne = {
|
|
|
132
136
|
l("update:modelValue", a.value), l("input", a.value), await M(), E();
|
|
133
137
|
}, R = () => {
|
|
134
138
|
l("change", a.value);
|
|
135
|
-
},
|
|
139
|
+
}, A = (n) => {
|
|
136
140
|
f.value = !0, l("focus", n);
|
|
137
|
-
},
|
|
141
|
+
}, I = (n) => {
|
|
138
142
|
f.value = !1, l("blur", n);
|
|
139
|
-
},
|
|
143
|
+
}, L = g(() => d.clearable && !d.disabled && !!a.value && f.value), N = () => {
|
|
140
144
|
a.value = "", l("update:modelValue", ""), l("clear"), l("input", ""), l("change", "");
|
|
141
145
|
}, E = () => {
|
|
142
146
|
w && cancelAnimationFrame(w), w = requestAnimationFrame(() => {
|
|
@@ -144,7 +148,7 @@ const ne = {
|
|
|
144
148
|
const n = o.value, b = n.value, m = document.createElement("span");
|
|
145
149
|
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
150
|
});
|
|
147
|
-
}, K =
|
|
151
|
+
}, K = g(() => {
|
|
148
152
|
const n = {};
|
|
149
153
|
return c.value > 0 && (n.position = "absolute", n.left = `${c.value + 16}px`), n;
|
|
150
154
|
}), O = async () => {
|
|
@@ -159,21 +163,21 @@ const ne = {
|
|
|
159
163
|
updateTextWidth: E
|
|
160
164
|
}), (n, b) => e.type !== "textarea" ? (s(), r("div", {
|
|
161
165
|
key: 0,
|
|
162
|
-
class:
|
|
166
|
+
class: y(["cregis-input", {
|
|
163
167
|
[`cregis-input--${e.size}`]: e.size,
|
|
164
168
|
"is-disabled": e.disabled,
|
|
165
169
|
"is-prefix": n.$slots.prefix,
|
|
166
170
|
"is-suffix": n.$slots.suffix
|
|
167
171
|
}]),
|
|
168
|
-
style:
|
|
172
|
+
style: $([{ width: e.width }, e.inputStyle])
|
|
169
173
|
}, [
|
|
170
174
|
u("div", {
|
|
171
|
-
class:
|
|
175
|
+
class: y(["cregis-input__wrapper", { "is-focus": f.value }])
|
|
172
176
|
}, [
|
|
173
177
|
n.$slots.prefix ? (s(), r("span", de, [
|
|
174
178
|
v(n.$slots, "prefix")
|
|
175
179
|
])) : h("", !0),
|
|
176
|
-
F(u("input",
|
|
180
|
+
F(u("input", x({
|
|
177
181
|
class: "cregis-input__inner",
|
|
178
182
|
"onUpdate:modelValue": b[0] || (b[0] = (m) => a.value = m),
|
|
179
183
|
ref_key: "inputRef",
|
|
@@ -184,23 +188,23 @@ const ne = {
|
|
|
184
188
|
disabled: e.disabled,
|
|
185
189
|
onInput: V,
|
|
186
190
|
onChange: R,
|
|
187
|
-
onFocus:
|
|
188
|
-
onBlur:
|
|
191
|
+
onFocus: A,
|
|
192
|
+
onBlur: I
|
|
189
193
|
}), null, 16, ue), [
|
|
190
194
|
[j, a.value]
|
|
191
195
|
]),
|
|
192
196
|
e.unit && a.value ? (s(), r("span", {
|
|
193
197
|
key: 1,
|
|
194
|
-
style:
|
|
198
|
+
style: $(K.value),
|
|
195
199
|
class: "cregis-input__unit"
|
|
196
|
-
},
|
|
197
|
-
n.$slots.suffix ||
|
|
200
|
+
}, p(e.unit), 5)) : h("", !0),
|
|
201
|
+
n.$slots.suffix || L.value ? (s(), r("span", ce, [
|
|
198
202
|
v(n.$slots, "suffix"),
|
|
199
|
-
|
|
203
|
+
L.value ? (s(), z(B, {
|
|
200
204
|
key: 0,
|
|
201
205
|
icon: W(le),
|
|
202
206
|
"icon-type": "square",
|
|
203
|
-
onClick:
|
|
207
|
+
onClick: N,
|
|
204
208
|
onMousedown: b[1] || (b[1] = Z(() => {
|
|
205
209
|
}, ["prevent"]))
|
|
206
210
|
}, null, 8, ["icon"])) : h("", !0)
|
|
@@ -208,10 +212,10 @@ const ne = {
|
|
|
208
212
|
], 2)
|
|
209
213
|
], 6)) : (s(), r("div", {
|
|
210
214
|
key: 1,
|
|
211
|
-
class:
|
|
212
|
-
style:
|
|
215
|
+
class: y(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
216
|
+
style: $([{ width: e.width }, e.inputStyle])
|
|
213
217
|
}, [
|
|
214
|
-
F(u("textarea",
|
|
218
|
+
F(u("textarea", x({ class: "cregis-textarea__wrapper" }, n.$attrs, {
|
|
215
219
|
ref_key: "inputRef",
|
|
216
220
|
ref: o,
|
|
217
221
|
disabled: e.disabled,
|
|
@@ -220,8 +224,8 @@ const ne = {
|
|
|
220
224
|
"onUpdate:modelValue": b[2] || (b[2] = (m) => a.value = m),
|
|
221
225
|
onInput: V,
|
|
222
226
|
onChange: R,
|
|
223
|
-
onFocus:
|
|
224
|
-
onBlur:
|
|
227
|
+
onFocus: A,
|
|
228
|
+
onBlur: I
|
|
225
229
|
}), null, 16, me), [
|
|
226
230
|
[G, a.value]
|
|
227
231
|
]),
|
|
@@ -242,7 +246,7 @@ const ne = {
|
|
|
242
246
|
link: "",
|
|
243
247
|
size: "small",
|
|
244
248
|
disabled: !a.value,
|
|
245
|
-
onClick:
|
|
249
|
+
onClick: N
|
|
246
250
|
}, {
|
|
247
251
|
default: P(() => [...b[4] || (b[4] = [
|
|
248
252
|
T(" Clear ", -1)
|
|
@@ -252,12 +256,12 @@ const ne = {
|
|
|
252
256
|
]))
|
|
253
257
|
], 6));
|
|
254
258
|
}
|
|
255
|
-
}), fe = ["width", "height"],
|
|
259
|
+
}), fe = ["width", "height"], ye = {
|
|
256
260
|
stroke: "none",
|
|
257
261
|
"stroke-width": "1",
|
|
258
262
|
fill: "none",
|
|
259
263
|
"fill-rule": "evenodd"
|
|
260
|
-
},
|
|
264
|
+
}, ge = { transform: "translate(-394.000000, -457.000000)" }, he = { transform: "translate(394.000000, 457.000000)" }, ve = ["width", "height"], ke = /* @__PURE__ */ k({
|
|
261
265
|
__name: "checked-basis",
|
|
262
266
|
props: {
|
|
263
267
|
size: { default: "16px" }
|
|
@@ -271,8 +275,8 @@ const ne = {
|
|
|
271
275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
272
276
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
273
277
|
}, [
|
|
274
|
-
u("g",
|
|
275
|
-
u("g",
|
|
278
|
+
u("g", ye, [
|
|
279
|
+
u("g", ge, [
|
|
276
280
|
u("g", he, [
|
|
277
281
|
u("rect", {
|
|
278
282
|
x: "0",
|
|
@@ -290,7 +294,7 @@ const ne = {
|
|
|
290
294
|
])
|
|
291
295
|
], 8, fe));
|
|
292
296
|
}
|
|
293
|
-
}),
|
|
297
|
+
}), xe = {
|
|
294
298
|
key: 0,
|
|
295
299
|
class: "cregis-checkbox--indeterminate"
|
|
296
300
|
}, Te = /* @__PURE__ */ k({
|
|
@@ -305,7 +309,7 @@ const ne = {
|
|
|
305
309
|
},
|
|
306
310
|
emits: ["update:modelValue", "change"],
|
|
307
311
|
setup(e, { emit: t }) {
|
|
308
|
-
const i = e, d = t, l =
|
|
312
|
+
const i = e, d = t, l = g(() => i.modelValue), a = () => {
|
|
309
313
|
i.disabled || d("update:modelValue", !l.value);
|
|
310
314
|
};
|
|
311
315
|
return S(
|
|
@@ -318,24 +322,24 @@ const ne = {
|
|
|
318
322
|
onClick: a
|
|
319
323
|
}, [
|
|
320
324
|
u("div", {
|
|
321
|
-
class:
|
|
325
|
+
class: y(["cregis-checkbox", {
|
|
322
326
|
"is-disabled": e.disabled,
|
|
323
327
|
"is-checked": l.value,
|
|
324
328
|
"is-circle": e.circle,
|
|
325
329
|
"is-indeterminate": e.indeterminate
|
|
326
330
|
}])
|
|
327
331
|
}, [
|
|
328
|
-
e.indeterminate ? (s(), r("div",
|
|
332
|
+
e.indeterminate ? (s(), r("div", xe)) : (s(), z(ke, {
|
|
329
333
|
key: 1,
|
|
330
334
|
size: "10px"
|
|
331
335
|
}))
|
|
332
336
|
], 2),
|
|
333
337
|
o.$slots.default || e.label ? (s(), r("span", {
|
|
334
338
|
key: 0,
|
|
335
|
-
class:
|
|
339
|
+
class: y(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
336
340
|
}, [
|
|
337
341
|
v(o.$slots, "default", {}, () => [
|
|
338
|
-
T(
|
|
342
|
+
T(p(e.label), 1)
|
|
339
343
|
])
|
|
340
344
|
], 2)) : h("", !0)
|
|
341
345
|
]));
|
|
@@ -351,7 +355,7 @@ const ne = {
|
|
|
351
355
|
},
|
|
352
356
|
emits: ["update:modelValue", "change"],
|
|
353
357
|
setup(e, { emit: t }) {
|
|
354
|
-
const i = e, d = t, l =
|
|
358
|
+
const i = e, d = t, l = g(() => i.modelValue === i.value), a = () => {
|
|
355
359
|
i.disabled || (d("update:modelValue", i.value), d("change", i.value));
|
|
356
360
|
};
|
|
357
361
|
return (o, c) => (s(), r("div", {
|
|
@@ -359,7 +363,7 @@ const ne = {
|
|
|
359
363
|
onClick: a
|
|
360
364
|
}, [
|
|
361
365
|
u("div", {
|
|
362
|
-
class:
|
|
366
|
+
class: y(["cregis-radio", {
|
|
363
367
|
"is-disabled": e.disabled,
|
|
364
368
|
"is-checked": l.value
|
|
365
369
|
}])
|
|
@@ -368,10 +372,10 @@ const ne = {
|
|
|
368
372
|
])], 2),
|
|
369
373
|
o.$slots.default || e.label ? (s(), r("span", {
|
|
370
374
|
key: 0,
|
|
371
|
-
class:
|
|
375
|
+
class: y(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
372
376
|
}, [
|
|
373
377
|
v(o.$slots, "default", {}, () => [
|
|
374
|
-
T(
|
|
378
|
+
T(p(e.label), 1)
|
|
375
379
|
])
|
|
376
380
|
], 2)) : h("", !0)
|
|
377
381
|
]));
|
|
@@ -388,13 +392,13 @@ const ne = {
|
|
|
388
392
|
length: {}
|
|
389
393
|
},
|
|
390
394
|
setup(e) {
|
|
391
|
-
const t = e, i =
|
|
395
|
+
const t = e, i = g(() => {
|
|
392
396
|
if (Array.isArray(t.margin)) {
|
|
393
397
|
const [l, a] = t.margin;
|
|
394
398
|
return t.direction === "horizontal" ? `${l} 0 ${a} 0` : `0 ${a} 0 ${l}`;
|
|
395
399
|
} else
|
|
396
400
|
return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
|
|
397
|
-
}), d =
|
|
401
|
+
}), d = g(() => t.direction === "horizontal" ? {
|
|
398
402
|
width: t.length || "100%",
|
|
399
403
|
borderTopWidth: t.lineThickness,
|
|
400
404
|
borderTopStyle: t.borderStyle,
|
|
@@ -408,13 +412,13 @@ const ne = {
|
|
|
408
412
|
margin: i.value
|
|
409
413
|
});
|
|
410
414
|
return (l, a) => (s(), r("div", {
|
|
411
|
-
class:
|
|
415
|
+
class: y(["cregis-divider", {
|
|
412
416
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
413
417
|
}]),
|
|
414
|
-
style:
|
|
418
|
+
style: $(d.value)
|
|
415
419
|
}, null, 6));
|
|
416
420
|
}
|
|
417
|
-
}), U = Symbol("TABS_KEY"),
|
|
421
|
+
}), U = Symbol("TABS_KEY"), $e = ["onClick"], pe = { style: { display: "none" } }, Ve = /* @__PURE__ */ k({
|
|
418
422
|
name: "Tabs",
|
|
419
423
|
__name: "Tabs",
|
|
420
424
|
props: {
|
|
@@ -429,7 +433,7 @@ const ne = {
|
|
|
429
433
|
}, l = (o) => {
|
|
430
434
|
const c = i.findIndex((f) => f.name === o);
|
|
431
435
|
c !== -1 && i.splice(c, 1);
|
|
432
|
-
}, a =
|
|
436
|
+
}, a = g(() => t.type === "card" ? t.size === "large" ? {
|
|
433
437
|
borderRadius: "13px"
|
|
434
438
|
} : t.size === "medium" ? {
|
|
435
439
|
borderRadius: "11px"
|
|
@@ -443,20 +447,20 @@ const ne = {
|
|
|
443
447
|
registerTab: d,
|
|
444
448
|
unregisterTab: l
|
|
445
449
|
}), (o, c) => (s(), r("div", {
|
|
446
|
-
class:
|
|
450
|
+
class: y(["cregis-tabs", {
|
|
447
451
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
448
452
|
[`cregis-tabs--${e.size}`]: e.size
|
|
449
453
|
}])
|
|
450
454
|
}, [
|
|
451
455
|
(s(!0), r(X, null, _(i, (f) => (s(), r("div", {
|
|
452
456
|
key: f.name,
|
|
453
|
-
class:
|
|
454
|
-
style:
|
|
457
|
+
class: y(["cregis-tabs__item", { "is-active": e.modelValue === f.name }]),
|
|
458
|
+
style: $(a.value),
|
|
455
459
|
onClick: (w) => o.$emit("update:modelValue", f.name)
|
|
456
460
|
}, [
|
|
457
|
-
u("span", null,
|
|
458
|
-
], 14,
|
|
459
|
-
u("div",
|
|
461
|
+
u("span", null, p(f.label), 1)
|
|
462
|
+
], 14, $e))), 128)),
|
|
463
|
+
u("div", pe, [
|
|
460
464
|
v(o.$slots, "default")
|
|
461
465
|
])
|
|
462
466
|
], 2));
|
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}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]) :is(path,polyline):not([fill]),.cregis-button.is-affix svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--text-same-white)}.cregis-button.is-affix svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button.is-affix:active svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active svg :is(path,polyline)[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]) :is(path,polyline):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]) :is(path,polyline):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 :is(path,polyline)[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]) :is(path,polyline):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]) :is(path,polyline):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 :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon:hover svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-primary)}.cregis-button__icon:hover svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon:active svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:active svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon.is-disabled svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled svg :is(path,polyline)[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:0}.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 12px}.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)}}:is(.cregis-button.is-affix,.cregis-button__icon,:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled) svg>g:is([fill=none],[fill=transparent]) :is(path,line,polyline,polygon,circle,ellipse):not([fill]),:is(.cregis-button.is-affix,.cregis-button__icon,:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled) svg>g:is([fill=none],[fill=transparent]) :is(path,line,polyline,polygon,circle,ellipse):is([fill=none],[fill=transparent]){stroke:var(--cregis-btn-svg-stroke)}:is(.cregis-button.is-affix,.cregis-button__icon,:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled) svg :is(path,line,polyline,polygon,circle,ellipse)[fill]:not([fill=none]):not([fill=transparent]){fill:var(--cregis-btn-svg-fill)}.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,.cregis-button.is-active:not(.is-disabled){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,.cregis-button.is-plain.is-active:not(.is-disabled){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,.cregis-button.is-text.is-active:not(.is-disabled){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-btn-svg-stroke: var(--text-same-white);--cregis-btn-svg-fill: var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active:not(.is-disabled),.cregis-button.is-affix.is-active:not(.is-disabled){--cregis-btn-svg-stroke: var(--text-same-white-tap);--cregis-btn-svg-fill: var(--text-same-white-tap)}:is(.cregis-button.is-affix:active:not(.is-disabled),.cregis-button.is-affix.is-active:not(.is-disabled)) span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled{--cregis-btn-svg-stroke: var(--material-foreground-base-quaternary);--cregis-btn-svg-fill: var(--material-foreground-base-quaternary)}.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,.cregis-button--secondary.is-active:not(.is-disabled){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,.cregis-button--secondary.is-plain.is-active:not(.is-disabled){color:var(--text-base-secondary)}.cregis-button--secondary.is-plain.is-affix{--cregis-btn-svg-stroke: var(--text-base-primary);--cregis-btn-svg-fill: var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix span{color:var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix:hover:not(.is-disabled){--cregis-btn-svg-stroke: var(--text-base-primary);--cregis-btn-svg-fill: var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix:hover:not(.is-disabled) span{color:var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix:active:not(.is-disabled),.cregis-button--secondary.is-plain.is-affix.is-active:not(.is-disabled){--cregis-btn-svg-stroke: var(--text-base-secondary);--cregis-btn-svg-fill: var(--text-base-secondary)}:is(.cregis-button--secondary.is-plain.is-affix:active:not(.is-disabled),.cregis-button--secondary.is-plain.is-affix.is-active:not(.is-disabled)) span{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active,.cregis-button--secondary.is-text.is-active:not(.is-disabled){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,.cregis-button--danger.is-text.is-active:not(.is-disabled){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,.cregis-button--foreground.is-active:not(.is-disabled){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,.cregis-button--foreground.is-plain.is-active:not(.is-disabled){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,.cregis-button--sameWhite.is-active:not(.is-disabled){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{--cregis-btn-svg-stroke: var(--material-foreground-base-quaternary);--cregis-btn-svg-fill: var(--material-foreground-base-quaternary);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-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,.cregis-button__link.is-active:not(.is-disabled){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,.cregis-button__link--foreground.is-active:not(.is-disabled){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{--cregis-btn-svg-stroke: var(--material-foreground-base-secondary);--cregis-btn-svg-fill: var(--material-foreground-base-secondary);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:hover{--cregis-btn-svg-stroke: var(--material-foreground-base-primary);--cregis-btn-svg-fill: var(--material-foreground-base-primary);background-color:var(--event-hover-secondary)}.cregis-button__icon:active,.cregis-button__icon.is-active:not(.is-disabled){--cregis-btn-svg-stroke: var(--material-foreground-base-secondary);--cregis-btn-svg-fill: var(--material-foreground-base-secondary);background-color:var(--event-focus-secondary)}.cregis-button__icon.is-disabled{--cregis-btn-svg-stroke: var(--material-foreground-base-quaternary);--cregis-btn-svg-fill: var(--material-foreground-base-quaternary);cursor:not-allowed}.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;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;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:0}.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 12px}.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
|
@@ -177,6 +177,8 @@ export declare interface ButtonProps {
|
|
|
177
177
|
iconType?: IconButtonType;
|
|
178
178
|
iconText?: string;
|
|
179
179
|
affix?: boolean;
|
|
180
|
+
/** 为 true 时保持与 :active 一致的视觉(用于选中态等) */
|
|
181
|
+
isActive?: boolean;
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
export declare type ButtonSize = 'extraSmall' | 'small' | 'medium' | 'large';
|
|
@@ -1 +1 @@
|
|
|
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"})}));
|
|
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},isActive:{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,"is-active":t.isActive}],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,"is-active":t.isActive}],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,"is-active":t.isActive}],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"],A={key:0,class:"cregis-textarea__buttons"},D=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 y=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=()=>{y&&cancelAnimationFrame(y),y=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",A,[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))}}),P=["width","height"],L={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",L,[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,P))}}),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))}}),g=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(g,{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:y=>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(g);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=D,d.Radio=K,d.TABS_KEY=g,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}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]) :is(path,polyline):not([fill]),.cregis-button.is-affix svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--text-same-white)}.cregis-button.is-affix svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button.is-affix:active svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active svg :is(path,polyline)[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]) :is(path,polyline):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]) :is(path,polyline):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 :is(path,polyline)[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]) :is(path,polyline):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]) :is(path,polyline):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 :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon:hover svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-primary)}.cregis-button__icon:hover svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon:active svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:active svg :is(path,polyline)[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]) :is(path,polyline):not([fill]),.cregis-button__icon.is-disabled svg>g:is([fill=none],[fill=transparent]) :is(path,polyline):is([fill=none],[fill=transparent]){stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled svg :is(path,polyline)[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:0}.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 12px}.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)}}:is(.cregis-button.is-affix,.cregis-button__icon,:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled) svg>g:is([fill=none],[fill=transparent]) :is(path,line,polyline,polygon,circle,ellipse):not([fill]),:is(.cregis-button.is-affix,.cregis-button__icon,:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled) svg>g:is([fill=none],[fill=transparent]) :is(path,line,polyline,polygon,circle,ellipse):is([fill=none],[fill=transparent]){stroke:var(--cregis-btn-svg-stroke)}:is(.cregis-button.is-affix,.cregis-button__icon,:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled) svg :is(path,line,polyline,polygon,circle,ellipse)[fill]:not([fill=none]):not([fill=transparent]){fill:var(--cregis-btn-svg-fill)}.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,.cregis-button.is-active:not(.is-disabled){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,.cregis-button.is-plain.is-active:not(.is-disabled){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,.cregis-button.is-text.is-active:not(.is-disabled){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-btn-svg-stroke: var(--text-same-white);--cregis-btn-svg-fill: var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active:not(.is-disabled),.cregis-button.is-affix.is-active:not(.is-disabled){--cregis-btn-svg-stroke: var(--text-same-white-tap);--cregis-btn-svg-fill: var(--text-same-white-tap)}:is(.cregis-button.is-affix:active:not(.is-disabled),.cregis-button.is-affix.is-active:not(.is-disabled)) span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled{--cregis-btn-svg-stroke: var(--material-foreground-base-quaternary);--cregis-btn-svg-fill: var(--material-foreground-base-quaternary)}.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,.cregis-button--secondary.is-active:not(.is-disabled){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,.cregis-button--secondary.is-plain.is-active:not(.is-disabled){color:var(--text-base-secondary)}.cregis-button--secondary.is-plain.is-affix{--cregis-btn-svg-stroke: var(--text-base-primary);--cregis-btn-svg-fill: var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix span{color:var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix:hover:not(.is-disabled){--cregis-btn-svg-stroke: var(--text-base-primary);--cregis-btn-svg-fill: var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix:hover:not(.is-disabled) span{color:var(--text-base-primary)}.cregis-button--secondary.is-plain.is-affix:active:not(.is-disabled),.cregis-button--secondary.is-plain.is-affix.is-active:not(.is-disabled){--cregis-btn-svg-stroke: var(--text-base-secondary);--cregis-btn-svg-fill: var(--text-base-secondary)}:is(.cregis-button--secondary.is-plain.is-affix:active:not(.is-disabled),.cregis-button--secondary.is-plain.is-affix.is-active:not(.is-disabled)) span{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active,.cregis-button--secondary.is-text.is-active:not(.is-disabled){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,.cregis-button--danger.is-text.is-active:not(.is-disabled){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,.cregis-button--foreground.is-active:not(.is-disabled){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,.cregis-button--foreground.is-plain.is-active:not(.is-disabled){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,.cregis-button--sameWhite.is-active:not(.is-disabled){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{--cregis-btn-svg-stroke: var(--material-foreground-base-quaternary);--cregis-btn-svg-fill: var(--material-foreground-base-quaternary);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-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,.cregis-button__link.is-active:not(.is-disabled){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,.cregis-button__link--foreground.is-active:not(.is-disabled){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{--cregis-btn-svg-stroke: var(--material-foreground-base-secondary);--cregis-btn-svg-fill: var(--material-foreground-base-secondary);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:hover{--cregis-btn-svg-stroke: var(--material-foreground-base-primary);--cregis-btn-svg-fill: var(--material-foreground-base-primary);background-color:var(--event-hover-secondary)}.cregis-button__icon:active,.cregis-button__icon.is-active:not(.is-disabled){--cregis-btn-svg-stroke: var(--material-foreground-base-secondary);--cregis-btn-svg-fill: var(--material-foreground-base-secondary);background-color:var(--event-focus-secondary)}.cregis-button__icon.is-disabled{--cregis-btn-svg-stroke: var(--material-foreground-base-quaternary);--cregis-btn-svg-fill: var(--material-foreground-base-quaternary);cursor:not-allowed}.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;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;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:0}.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 12px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
|
package/package.json
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cregis/ui",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"sideEffects": [
|
|
10
|
-
"dist/index.css"
|
|
11
|
-
],
|
|
12
|
-
"main": "./dist/umd/cregis-ui.umd.cjs",
|
|
13
|
-
"module": "./dist/es/cregis-ui.js",
|
|
14
|
-
"types": "./dist/types/index.d.ts",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/types/index.d.ts",
|
|
18
|
-
"import": "./dist/es/cregis-ui.js",
|
|
19
|
-
"require": "./dist/umd/cregis-ui.umd.cjs"
|
|
20
|
-
},
|
|
21
|
-
"./dist/": {
|
|
22
|
-
"import": "./dist/",
|
|
23
|
-
"require": "./dist/"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"dev": "vite --host",
|
|
28
|
-
"build": "npm run build-only && npm run move-style",
|
|
29
|
-
"build-only": "run-p build-es build-umd",
|
|
30
|
-
"build-umd": "vite build --config vite.umd.config.ts",
|
|
31
|
-
"build-es": "vite build --config vite.es.config.ts",
|
|
32
|
-
"move-style": "move-file dist/es/index.css dist/index.css",
|
|
33
|
-
"preview": "vite preview",
|
|
34
|
-
"prepare": "husky install"
|
|
35
|
-
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"@cregis/icon": "^0.1.10",
|
|
38
|
-
"vue": "^3.5.0"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@commitlint/cli": "^20.1.0",
|
|
42
|
-
"@commitlint/config-conventional": "^20.0.0",
|
|
43
|
-
"@cregis/icon": "^0.1.14",
|
|
44
|
-
"@rushstack/eslint-patch": "^1.14.1",
|
|
45
|
-
"@types/node": "^24.6.0",
|
|
46
|
-
"@vitejs/plugin-vue": "^6.0.1",
|
|
47
|
-
"@vue/eslint-config-typescript": "^14.6.0",
|
|
48
|
-
"@vue/tsconfig": "^0.8.1",
|
|
49
|
-
"husky": "^9.1.7",
|
|
50
|
-
"lint-staged": "^16.2.6",
|
|
51
|
-
"move-file-cli": "^3.0.0",
|
|
52
|
-
"npm-run-all": "^4.1.5",
|
|
53
|
-
"prettier": "^3.6.2",
|
|
54
|
-
"stylelint": "^16.25.0",
|
|
55
|
-
"stylelint-config-standard": "^39.0.1",
|
|
56
|
-
"typescript": "~5.9.3",
|
|
57
|
-
"vite": "^7.1.7",
|
|
58
|
-
"vite-plugin-dts": "^4.5.4",
|
|
59
|
-
"vue": "^3.5.24",
|
|
60
|
-
"vue-tsc": "^3.1.0"
|
|
61
|
-
},
|
|
62
|
-
"husky": {
|
|
63
|
-
"hooks": {
|
|
64
|
-
"pre-commit": "lint-staged",
|
|
65
|
-
"commit-msg": "commitlint --config .commitlintrc.cjs -E HUSKY_GIT_PARAMS"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"lint-staged": {
|
|
69
|
-
"*.{ts,tsx,js,jsx}": [
|
|
70
|
-
"eslint --config .eslintrc.cjs"
|
|
71
|
-
],
|
|
72
|
-
"*.{css,less,scss}": [
|
|
73
|
-
"stylelint --config .stylelintrc.cjs"
|
|
74
|
-
],
|
|
75
|
-
"*.{ts,tsx,js,json,html,yml,css,less,scss,md}": [
|
|
76
|
-
"prettier --write"
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@cregis/ui",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.1.8",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"dist/index.css"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist/umd/cregis-ui.umd.cjs",
|
|
13
|
+
"module": "./dist/es/cregis-ui.js",
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/types/index.d.ts",
|
|
18
|
+
"import": "./dist/es/cregis-ui.js",
|
|
19
|
+
"require": "./dist/umd/cregis-ui.umd.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./dist/": {
|
|
22
|
+
"import": "./dist/",
|
|
23
|
+
"require": "./dist/"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vite --host",
|
|
28
|
+
"build": "npm run build-only && npm run move-style",
|
|
29
|
+
"build-only": "run-p build-es build-umd",
|
|
30
|
+
"build-umd": "vite build --config vite.umd.config.ts",
|
|
31
|
+
"build-es": "vite build --config vite.es.config.ts",
|
|
32
|
+
"move-style": "move-file dist/es/index.css dist/index.css",
|
|
33
|
+
"preview": "vite preview",
|
|
34
|
+
"prepare": "husky install"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@cregis/icon": "^0.1.10",
|
|
38
|
+
"vue": "^3.5.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@commitlint/cli": "^20.1.0",
|
|
42
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
43
|
+
"@cregis/icon": "^0.1.14",
|
|
44
|
+
"@rushstack/eslint-patch": "^1.14.1",
|
|
45
|
+
"@types/node": "^24.6.0",
|
|
46
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
47
|
+
"@vue/eslint-config-typescript": "^14.6.0",
|
|
48
|
+
"@vue/tsconfig": "^0.8.1",
|
|
49
|
+
"husky": "^9.1.7",
|
|
50
|
+
"lint-staged": "^16.2.6",
|
|
51
|
+
"move-file-cli": "^3.0.0",
|
|
52
|
+
"npm-run-all": "^4.1.5",
|
|
53
|
+
"prettier": "^3.6.2",
|
|
54
|
+
"stylelint": "^16.25.0",
|
|
55
|
+
"stylelint-config-standard": "^39.0.1",
|
|
56
|
+
"typescript": "~5.9.3",
|
|
57
|
+
"vite": "^7.1.7",
|
|
58
|
+
"vite-plugin-dts": "^4.5.4",
|
|
59
|
+
"vue": "^3.5.24",
|
|
60
|
+
"vue-tsc": "^3.1.0"
|
|
61
|
+
},
|
|
62
|
+
"husky": {
|
|
63
|
+
"hooks": {
|
|
64
|
+
"pre-commit": "lint-staged",
|
|
65
|
+
"commit-msg": "commitlint --config .commitlintrc.cjs -E HUSKY_GIT_PARAMS"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"lint-staged": {
|
|
69
|
+
"*.{ts,tsx,js,jsx}": [
|
|
70
|
+
"eslint --config .eslintrc.cjs"
|
|
71
|
+
],
|
|
72
|
+
"*.{css,less,scss}": [
|
|
73
|
+
"stylelint --config .stylelintrc.cjs"
|
|
74
|
+
],
|
|
75
|
+
"*.{ts,tsx,js,json,html,yml,css,less,scss,md}": [
|
|
76
|
+
"prettier --write"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|