@youcan/celeste 0.6.32 → 0.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/celeste.css +300 -234
- package/dist/cjs/chunks/index.js +95 -0
- package/dist/cjs/dropdown-menu-content.js +52 -2
- package/dist/cjs/dropdown-menu-item.js +13 -25
- package/dist/cjs/dropdown-menu-sub-content.js +49 -2
- package/dist/cjs/dropdown-menu-sub-trigger.js +43 -2
- package/dist/cjs/dropdown-menu-trigger.js +2 -2
- package/dist/cjs/dropdown.js +1 -2
- package/dist/cjs/index.js +15 -9
- package/dist/cjs/progress-bar.js +84 -0
- package/dist/cjs/progress-circle.js +92 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/progress/progress-bar.d.ts +31 -0
- package/dist/components/progress/progress-circle.d.ts +27 -0
- package/dist/es/checkbox-label.js +1 -1
- package/dist/es/chunks/index.js +142 -47
- package/dist/es/chunks/index2.js +1 -1
- package/dist/es/combobox-group.js +1 -1
- package/dist/es/combobox-input.js +1 -1
- package/dist/es/combobox-item.js +1 -1
- package/dist/es/combobox-list.js +1 -1
- package/dist/es/combobox-root.js +1 -1
- package/dist/es/combobox-separator.js +1 -1
- package/dist/es/combobox-trigger.js +1 -1
- package/dist/es/command-group.js +1 -1
- package/dist/es/command-input.js +1 -1
- package/dist/es/command-item.js +1 -1
- package/dist/es/command-list.js +1 -1
- package/dist/es/command-root.js +1 -1
- package/dist/es/command-separator.js +1 -1
- package/dist/es/dropdown-menu-content.js +52 -2
- package/dist/es/dropdown-menu-group.js +1 -1
- package/dist/es/dropdown-menu-item.js +15 -27
- package/dist/es/dropdown-menu-label.js +1 -1
- package/dist/es/dropdown-menu-separator.js +1 -1
- package/dist/es/dropdown-menu-sub-content.js +49 -2
- package/dist/es/dropdown-menu-sub-trigger.js +43 -2
- package/dist/es/dropdown-menu-trigger.js +2 -2
- package/dist/es/dropdown.js +2 -3
- package/dist/es/index.js +48 -42
- package/dist/es/label.js +1 -1
- package/dist/es/progress-bar.js +85 -0
- package/dist/es/progress-circle.js +93 -0
- package/dist/es/scroll-bar.js +1 -1
- package/dist/es/segmented-control-item.js +1 -1
- package/dist/es/segmented-control.js +1 -1
- package/dist/es/select-content.js +1 -1
- package/dist/es/select-item.js +1 -1
- package/dist/es/select-trigger.js +1 -1
- package/dist/es/select-value.js +1 -1
- package/dist/es/tab-menu-content.js +1 -1
- package/dist/es/tab-menu-item.js +1 -1
- package/dist/es/tab-menu-list.js +1 -1
- package/dist/es/tab-menu.js +1 -1
- package/dist/es/tooltip.js +1 -1
- package/package.json +3 -3
- package/src/components/dropdown/dropdown.vue +0 -1
- package/src/components/dropdown-menu/dropdown-menu-content.vue +31 -21
- package/src/components/dropdown-menu/dropdown-menu-item.vue +8 -62
- package/src/components/dropdown-menu/dropdown-menu-sub-content.vue +32 -21
- package/src/components/dropdown-menu/dropdown-menu-sub-trigger.vue +30 -6
- package/src/components/dropdown-menu/dropdown-menu-trigger.vue +6 -20
- package/src/components/dropdown-menu/stories/dropdown-menu.stories.ts +150 -54
- package/src/components/index.ts +1 -0
- package/src/components/progress/index.ts +5 -0
- package/src/components/progress/progress-bar.vue +167 -0
- package/src/components/progress/progress-circle.vue +126 -0
- package/src/components/progress/stories/progress-bar.stories.ts +328 -0
- package/src/components/progress/stories/progress-circular.stories.ts +152 -0
- package/dist/cjs/chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js +0 -51
- package/dist/cjs/chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js +0 -49
- package/dist/cjs/chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js +0 -32
- package/dist/es/chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js +0 -52
- package/dist/es/chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js +0 -50
- package/dist/es/chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js +0 -33
package/dist/cjs/chunks/index.js
CHANGED
|
@@ -6423,6 +6423,99 @@ const [Nt, Xc] = Q("PopoverRoot"), ys = /* @__PURE__ */ Mo.defineComponent({
|
|
|
6423
6423
|
_: 3
|
|
6424
6424
|
}, 8, ["type", "as", "as-child"]));
|
|
6425
6425
|
}
|
|
6426
|
+
}), da = 100, [Qc, ef] = Q("ProgressRoot"), Po = (a2) => typeof a2 == "number";
|
|
6427
|
+
function tf(a2, t) {
|
|
6428
|
+
return vt(a2) || Po(a2) && !Number.isNaN(a2) && a2 <= t && a2 >= 0 ? a2 : (console.error(`Invalid prop \`value\` of value \`${a2}\` supplied to \`ProgressRoot\`. The \`value\` prop must be:
|
|
6429
|
+
- a positive number
|
|
6430
|
+
- less than the value passed to \`max\` (or ${da} if no \`max\` prop is set)
|
|
6431
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
6432
|
+
|
|
6433
|
+
Defaulting to \`null\`.`), null);
|
|
6434
|
+
}
|
|
6435
|
+
function af(a2) {
|
|
6436
|
+
return Po(a2) && !Number.isNaN(a2) && a2 > 0 ? a2 : (console.error(
|
|
6437
|
+
`Invalid prop \`max\` of value \`${a2}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${da}\`.`
|
|
6438
|
+
), da);
|
|
6439
|
+
}
|
|
6440
|
+
const By = /* @__PURE__ */ Mo.defineComponent({
|
|
6441
|
+
__name: "ProgressRoot",
|
|
6442
|
+
props: {
|
|
6443
|
+
modelValue: {},
|
|
6444
|
+
max: { default: da },
|
|
6445
|
+
getValueLabel: { type: Function, default: (a2, t) => `${Math.round(a2 / t * da)}%` },
|
|
6446
|
+
asChild: { type: Boolean },
|
|
6447
|
+
as: {}
|
|
6448
|
+
},
|
|
6449
|
+
emits: ["update:modelValue", "update:max"],
|
|
6450
|
+
setup(a2, { emit: t }) {
|
|
6451
|
+
const e = a2, n = t;
|
|
6452
|
+
R();
|
|
6453
|
+
const l = ne(e, "modelValue", n, {
|
|
6454
|
+
passive: e.modelValue === void 0
|
|
6455
|
+
}), s = ne(e, "max", n, {
|
|
6456
|
+
passive: e.max === void 0
|
|
6457
|
+
});
|
|
6458
|
+
Mo.watch(
|
|
6459
|
+
() => l.value,
|
|
6460
|
+
async (i) => {
|
|
6461
|
+
const u = tf(i, e.max);
|
|
6462
|
+
u !== i && (await Mo.nextTick(), l.value = u);
|
|
6463
|
+
},
|
|
6464
|
+
{ immediate: true }
|
|
6465
|
+
), Mo.watch(
|
|
6466
|
+
() => e.max,
|
|
6467
|
+
(i) => {
|
|
6468
|
+
const u = af(e.max);
|
|
6469
|
+
u !== i && (s.value = u);
|
|
6470
|
+
},
|
|
6471
|
+
{ immediate: true }
|
|
6472
|
+
);
|
|
6473
|
+
const r = Mo.computed(() => vt(l.value) ? "indeterminate" : l.value === s.value ? "complete" : "loading");
|
|
6474
|
+
return ef({
|
|
6475
|
+
modelValue: l,
|
|
6476
|
+
max: s,
|
|
6477
|
+
progressState: r
|
|
6478
|
+
}), (i, u) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), {
|
|
6479
|
+
"as-child": i.asChild,
|
|
6480
|
+
as: i.as,
|
|
6481
|
+
"aria-valuemax": Mo.unref(s),
|
|
6482
|
+
"aria-valuemin": 0,
|
|
6483
|
+
"aria-valuenow": Po(Mo.unref(l)) ? Mo.unref(l) : void 0,
|
|
6484
|
+
"aria-valuetext": i.getValueLabel(Mo.unref(l), Mo.unref(s)),
|
|
6485
|
+
"aria-label": i.getValueLabel(Mo.unref(l), Mo.unref(s)),
|
|
6486
|
+
role: "progressbar",
|
|
6487
|
+
"data-state": r.value,
|
|
6488
|
+
"data-value": Mo.unref(l) ?? void 0,
|
|
6489
|
+
"data-max": Mo.unref(s)
|
|
6490
|
+
}, {
|
|
6491
|
+
default: Mo.withCtx(() => [
|
|
6492
|
+
Mo.renderSlot(i.$slots, "default", { modelValue: Mo.unref(l) })
|
|
6493
|
+
]),
|
|
6494
|
+
_: 3
|
|
6495
|
+
}, 8, ["as-child", "as", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-label", "data-state", "data-value", "data-max"]));
|
|
6496
|
+
}
|
|
6497
|
+
}), Iy = /* @__PURE__ */ Mo.defineComponent({
|
|
6498
|
+
__name: "ProgressIndicator",
|
|
6499
|
+
props: {
|
|
6500
|
+
asChild: { type: Boolean },
|
|
6501
|
+
as: {}
|
|
6502
|
+
},
|
|
6503
|
+
setup(a2) {
|
|
6504
|
+
const t = a2, e = Qc();
|
|
6505
|
+
return R(), (n, l) => {
|
|
6506
|
+
var s;
|
|
6507
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
|
|
6508
|
+
"data-state": Mo.unref(e).progressState.value,
|
|
6509
|
+
"data-value": ((s = Mo.unref(e).modelValue) == null ? void 0 : s.value) ?? void 0,
|
|
6510
|
+
"data-max": Mo.unref(e).max.value
|
|
6511
|
+
}), {
|
|
6512
|
+
default: Mo.withCtx(() => [
|
|
6513
|
+
Mo.renderSlot(n.$slots, "default")
|
|
6514
|
+
]),
|
|
6515
|
+
_: 3
|
|
6516
|
+
}, 16, ["data-state", "data-value", "data-max"]);
|
|
6517
|
+
};
|
|
6518
|
+
}
|
|
6426
6519
|
});
|
|
6427
6520
|
const [He, Pf] = Q("ScrollAreaRoot"), Oy = /* @__PURE__ */ Mo.defineComponent({
|
|
6428
6521
|
__name: "ScrollAreaRoot",
|
|
@@ -9210,6 +9303,7 @@ const av = /* @__PURE__ */ Mo.defineComponent({
|
|
|
9210
9303
|
}
|
|
9211
9304
|
});
|
|
9212
9305
|
exports.At = At;
|
|
9306
|
+
exports.By = By;
|
|
9213
9307
|
exports.Cg = Cg;
|
|
9214
9308
|
exports.Ch = Ch;
|
|
9215
9309
|
exports.Du = Du;
|
|
@@ -9220,6 +9314,7 @@ exports.Gl = Gl;
|
|
|
9220
9314
|
exports.Gy = Gy;
|
|
9221
9315
|
exports.Hg = Hg;
|
|
9222
9316
|
exports.Hv = Hv;
|
|
9317
|
+
exports.Iy = Iy;
|
|
9223
9318
|
exports.Jv = Jv;
|
|
9224
9319
|
exports.Kg = Kg;
|
|
9225
9320
|
exports.Kv = Kv;
|
|
@@ -1,3 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const Mo = require("vue");
|
|
3
|
+
const useDelegatedProps = require("./use-delegated-props.js");
|
|
4
|
+
const clsx = require("./chunks/clsx.js");
|
|
5
|
+
const index = require("./chunks/index.js");
|
|
6
|
+
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
8
|
+
__name: "dropdown-menu-content",
|
|
9
|
+
props: {
|
|
10
|
+
forceMount: { type: Boolean },
|
|
11
|
+
loop: { type: Boolean },
|
|
12
|
+
side: {},
|
|
13
|
+
sideOffset: { default: 4 },
|
|
14
|
+
align: {},
|
|
15
|
+
alignOffset: {},
|
|
16
|
+
avoidCollisions: { type: Boolean },
|
|
17
|
+
collisionBoundary: {},
|
|
18
|
+
collisionPadding: {},
|
|
19
|
+
arrowPadding: {},
|
|
20
|
+
sticky: {},
|
|
21
|
+
hideWhenDetached: { type: Boolean },
|
|
22
|
+
updatePositionStrategy: {},
|
|
23
|
+
prioritizePosition: { type: Boolean },
|
|
24
|
+
asChild: { type: Boolean },
|
|
25
|
+
as: {},
|
|
26
|
+
class: {}
|
|
27
|
+
},
|
|
28
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "closeAutoFocus"],
|
|
29
|
+
setup(__props, { emit: __emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const emits = __emit;
|
|
32
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
33
|
+
const forwarded = index.xe(delegatedProps, emits);
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.ih), null, {
|
|
36
|
+
default: Mo.withCtx(() => [
|
|
37
|
+
Mo.createVNode(Mo.unref(index.uh), Mo.mergeProps(Mo.unref(forwarded), {
|
|
38
|
+
class: Mo.unref(clsx.clsx)("celeste-dropdown-menu-content", props.class),
|
|
39
|
+
"side-offset": 8
|
|
40
|
+
}), {
|
|
41
|
+
default: Mo.withCtx(() => [
|
|
42
|
+
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
43
|
+
]),
|
|
44
|
+
_: 3
|
|
45
|
+
}, 16, ["class"])
|
|
46
|
+
]),
|
|
47
|
+
_: 3
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const dropdownMenuContent = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-3bd71ed1"]]);
|
|
53
|
+
module.exports = dropdownMenuContent;
|
|
@@ -4,16 +4,15 @@ const useDelegatedProps = require("./use-delegated-props.js");
|
|
|
4
4
|
const clsx = require("./chunks/clsx.js");
|
|
5
5
|
const index = require("./chunks/index.js");
|
|
6
6
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
-
const _hoisted_1 = {
|
|
8
|
-
const _hoisted_2 = { class: "celeste-dropdown-menu-item-body" };
|
|
9
|
-
const _hoisted_3 = { class: "celeste-dropdown-menu-item-text" };
|
|
10
|
-
const _hoisted_4 = ["title"];
|
|
11
|
-
const _hoisted_5 = ["title"];
|
|
12
|
-
const _hoisted_6 = {
|
|
7
|
+
const _hoisted_1 = {
|
|
13
8
|
key: 0,
|
|
14
|
-
class: "celeste-dropdown-menu-item-
|
|
9
|
+
class: "celeste-dropdown-menu-item-prefix"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = { class: "celeste-dropdown-menu-item-body" };
|
|
12
|
+
const _hoisted_3 = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "celeste-dropdown-menu-item-suffix"
|
|
15
15
|
};
|
|
16
|
-
const _hoisted_7 = { class: "celeste-dropdown-menu-item-suffix" };
|
|
17
16
|
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
18
17
|
__name: "dropdown-menu-item",
|
|
19
18
|
props: {
|
|
@@ -38,31 +37,20 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
38
37
|
)
|
|
39
38
|
}), {
|
|
40
39
|
default: Mo.withCtx(() => [
|
|
41
|
-
Mo.
|
|
40
|
+
_ctx.$slots.prefix ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_1, [
|
|
42
41
|
Mo.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
43
|
-
]),
|
|
42
|
+
])) : Mo.createCommentVNode("", true),
|
|
44
43
|
Mo.createElementVNode("div", _hoisted_2, [
|
|
45
|
-
Mo.
|
|
46
|
-
Mo.createElementVNode("span", {
|
|
47
|
-
class: "celeste-dropdown-menu-item-label",
|
|
48
|
-
title: _ctx.label
|
|
49
|
-
}, Mo.toDisplayString(_ctx.label), 9, _hoisted_4),
|
|
50
|
-
_ctx.sublabel ? (Mo.openBlock(), Mo.createElementBlock("span", {
|
|
51
|
-
key: 0,
|
|
52
|
-
title: _ctx.sublabel,
|
|
53
|
-
class: "celeste-dropdown-menu-item-sublabel"
|
|
54
|
-
}, Mo.toDisplayString(_ctx.sublabel), 9, _hoisted_5)) : Mo.createCommentVNode("", true)
|
|
55
|
-
]),
|
|
56
|
-
_ctx.description ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_6, Mo.toDisplayString(_ctx.description), 1)) : Mo.createCommentVNode("", true)
|
|
44
|
+
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
57
45
|
]),
|
|
58
|
-
Mo.
|
|
46
|
+
_ctx.$slots.suffix ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_3, [
|
|
59
47
|
Mo.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
60
|
-
])
|
|
48
|
+
])) : Mo.createCommentVNode("", true)
|
|
61
49
|
]),
|
|
62
50
|
_: 3
|
|
63
51
|
}, 16, ["class"]);
|
|
64
52
|
};
|
|
65
53
|
}
|
|
66
54
|
});
|
|
67
|
-
const dropdownMenuItem = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
55
|
+
const dropdownMenuItem = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-b374fad1"]]);
|
|
68
56
|
module.exports = dropdownMenuItem;
|
|
@@ -1,3 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const Mo = require("vue");
|
|
3
|
+
const useDelegatedProps = require("./use-delegated-props.js");
|
|
4
|
+
const clsx = require("./chunks/clsx.js");
|
|
5
|
+
const index = require("./chunks/index.js");
|
|
6
|
+
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
8
|
+
__name: "dropdown-menu-sub-content",
|
|
9
|
+
props: {
|
|
10
|
+
forceMount: { type: Boolean },
|
|
11
|
+
loop: { type: Boolean },
|
|
12
|
+
sideOffset: {},
|
|
13
|
+
alignOffset: {},
|
|
14
|
+
avoidCollisions: { type: Boolean },
|
|
15
|
+
collisionBoundary: {},
|
|
16
|
+
collisionPadding: {},
|
|
17
|
+
arrowPadding: {},
|
|
18
|
+
sticky: {},
|
|
19
|
+
hideWhenDetached: { type: Boolean },
|
|
20
|
+
updatePositionStrategy: {},
|
|
21
|
+
prioritizePosition: { type: Boolean },
|
|
22
|
+
asChild: { type: Boolean },
|
|
23
|
+
as: {},
|
|
24
|
+
class: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "entryFocus", "openAutoFocus", "closeAutoFocus"],
|
|
27
|
+
setup(__props, { emit: __emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const emits = __emit;
|
|
30
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
31
|
+
const forwarded = index.xe(delegatedProps, emits);
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.ih), null, {
|
|
34
|
+
default: Mo.withCtx(() => [
|
|
35
|
+
Mo.createVNode(Mo.unref(index.Ch), Mo.mergeProps(Mo.unref(forwarded), {
|
|
36
|
+
class: Mo.unref(clsx.clsx)(props.class, "celeste-dropdown-menu-sub-content")
|
|
37
|
+
}), {
|
|
38
|
+
default: Mo.withCtx(() => [
|
|
39
|
+
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
40
|
+
]),
|
|
41
|
+
_: 3
|
|
42
|
+
}, 16, ["class"])
|
|
43
|
+
]),
|
|
44
|
+
_: 3
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const dropdownMenuSubContent = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-ba978953"]]);
|
|
50
|
+
module.exports = dropdownMenuSubContent;
|
|
@@ -1,3 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const Mo = require("vue");
|
|
3
|
+
const useDelegatedProps = require("./use-delegated-props.js");
|
|
4
|
+
const clsx = require("./chunks/clsx.js");
|
|
5
|
+
const index = require("./chunks/index.js");
|
|
6
|
+
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
+
const _hoisted_1 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "celeste-dropdown-menu-sub-prefix"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = { class: "celeste-dropdown-menu-sub-body" };
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
13
|
+
__name: "dropdown-menu-sub-trigger",
|
|
14
|
+
props: {
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
textValue: {},
|
|
17
|
+
asChild: { type: Boolean },
|
|
18
|
+
as: {},
|
|
19
|
+
class: {}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
24
|
+
const forwardedProps = index.At(delegatedProps);
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.wh), Mo.mergeProps(Mo.unref(forwardedProps), {
|
|
27
|
+
class: Mo.unref(clsx.clsx)(props.class, "celeste-dropdown-menu-sub-trigger")
|
|
28
|
+
}), {
|
|
29
|
+
default: Mo.withCtx(() => [
|
|
30
|
+
_ctx.$slots.prefix ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_1, [
|
|
31
|
+
Mo.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
32
|
+
])) : Mo.createCommentVNode("", true),
|
|
33
|
+
Mo.createElementVNode("div", _hoisted_2, [
|
|
34
|
+
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
35
|
+
]),
|
|
36
|
+
_cache[0] || (_cache[0] = Mo.createElementVNode("i", { class: "i-celeste-arrow-right-s-line" }, null, -1))
|
|
37
|
+
]),
|
|
38
|
+
_: 3
|
|
39
|
+
}, 16, ["class"]);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const dropdownMenuSubTrigger = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-44257601"]]);
|
|
44
|
+
module.exports = dropdownMenuSubTrigger;
|
|
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
13
13
|
const props = __props;
|
|
14
14
|
const forwardedProps = index.At(props);
|
|
15
15
|
return (_ctx, _cache) => {
|
|
16
|
-
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.rh), Mo.mergeProps({ class: "celeste-dropdown-menu-trigger" }, Mo.unref(forwardedProps)), {
|
|
16
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.rh), Mo.mergeProps({ class: "celeste-dropdown-menu-trigger" }, Mo.unref(forwardedProps), { as: "div" }), {
|
|
17
17
|
default: Mo.withCtx(() => [
|
|
18
18
|
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
19
19
|
]),
|
|
@@ -22,5 +22,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
const dropdownMenuTrigger = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
25
|
+
const dropdownMenuTrigger = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-003a2030"]]);
|
|
26
26
|
module.exports = dropdownMenuTrigger;
|
package/dist/cjs/dropdown.js
CHANGED
|
@@ -192,7 +192,6 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
192
192
|
}),
|
|
193
193
|
!_ctx.disabled ? (Mo.openBlock(), Mo.createBlock(Mo.unref(index.Xv), {
|
|
194
194
|
key: 0,
|
|
195
|
-
"force-mount": "",
|
|
196
195
|
dismissable: "",
|
|
197
196
|
"avoid-collisions": true,
|
|
198
197
|
class: Mo.normalizeClass(["celeste-dropdown-content", Mo.unref(clsx.clsx)(
|
|
@@ -287,5 +286,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
287
286
|
};
|
|
288
287
|
}
|
|
289
288
|
});
|
|
290
|
-
const dropdown = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
289
|
+
const dropdown = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-13b7b76a"]]);
|
|
291
290
|
module.exports = dropdown;
|
package/dist/cjs/index.js
CHANGED
|
@@ -24,13 +24,13 @@ const contentDivider_vue_vue_type_style_index_0_lang = require("./chunks/content
|
|
|
24
24
|
const contextMenuItem = require("./context-menu-item.js");
|
|
25
25
|
const dropdownItem = require("./dropdown-item.js");
|
|
26
26
|
const dropdown = require("./dropdown.js");
|
|
27
|
-
const
|
|
27
|
+
const dropdownMenuContent = require("./dropdown-menu-content.js");
|
|
28
28
|
const dropdownMenuGroup = require("./dropdown-menu-group.js");
|
|
29
29
|
const dropdownMenuItem = require("./dropdown-menu-item.js");
|
|
30
30
|
const dropdownMenuLabel = require("./dropdown-menu-label.js");
|
|
31
31
|
const dropdownMenuSeparator = require("./dropdown-menu-separator.js");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const dropdownMenuSubContent = require("./dropdown-menu-sub-content.js");
|
|
33
|
+
const dropdownMenuSubTrigger = require("./dropdown-menu-sub-trigger.js");
|
|
34
34
|
const dropdownMenuSub_vue_vue_type_script_setup_true_lang = require("./chunks/dropdown-menu-sub.js");
|
|
35
35
|
const dropdownMenuTrigger = require("./dropdown-menu-trigger.js");
|
|
36
36
|
const dropdownMenu = require("./dropdown-menu.js");
|
|
@@ -46,6 +46,8 @@ const modal_vue_vue_type_script_setup_true_lang = require("./chunks/modal.js");
|
|
|
46
46
|
const popoverContent = require("./popover-content.js");
|
|
47
47
|
const popoverTrigger = require("./popover-trigger.js");
|
|
48
48
|
const popover_vue_vue_type_script_setup_true_lang = require("./chunks/popover.js");
|
|
49
|
+
const progressBar = require("./progress-bar.js");
|
|
50
|
+
const progressCircle = require("./progress-circle.js");
|
|
49
51
|
const richEditor = require("./rich-editor.js");
|
|
50
52
|
const scrollArea_vue_vue_type_script_setup_true_lang = require("./chunks/scroll-area.js");
|
|
51
53
|
const segmentedControlItem = require("./segmented-control-item.js");
|
|
@@ -98,14 +100,14 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
98
100
|
Dropdown: dropdown,
|
|
99
101
|
DropdownItem: dropdownItem,
|
|
100
102
|
DropdownMenu: dropdownMenu,
|
|
101
|
-
DropdownMenuContent:
|
|
103
|
+
DropdownMenuContent: dropdownMenuContent,
|
|
102
104
|
DropdownMenuGroup: dropdownMenuGroup,
|
|
103
105
|
DropdownMenuItem: dropdownMenuItem,
|
|
104
106
|
DropdownMenuLabel: dropdownMenuLabel,
|
|
105
107
|
DropdownMenuSeparator: dropdownMenuSeparator,
|
|
106
108
|
DropdownMenuSub: dropdownMenuSub_vue_vue_type_script_setup_true_lang._sfc_main,
|
|
107
|
-
DropdownMenuSubContent:
|
|
108
|
-
DropdownMenuSubTrigger:
|
|
109
|
+
DropdownMenuSubContent: dropdownMenuSubContent,
|
|
110
|
+
DropdownMenuSubTrigger: dropdownMenuSubTrigger,
|
|
109
111
|
DropdownMenuTrigger: dropdownMenuTrigger,
|
|
110
112
|
FancyButton: fancyButton,
|
|
111
113
|
HintText: hintText,
|
|
@@ -121,6 +123,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
121
123
|
Popover: popover_vue_vue_type_script_setup_true_lang._sfc_main,
|
|
122
124
|
PopoverContent: popoverContent,
|
|
123
125
|
PopoverTrigger: popoverTrigger,
|
|
126
|
+
ProgressBar: progressBar,
|
|
127
|
+
ProgressCircle: progressCircle,
|
|
124
128
|
RichEditor: richEditor,
|
|
125
129
|
ScrollArea: scrollArea_vue_vue_type_script_setup_true_lang._sfc_main,
|
|
126
130
|
SegmentedControl: segmentedControl,
|
|
@@ -230,13 +234,13 @@ exports.ContentDivider = contentDivider_vue_vue_type_style_index_0_lang._sfc_mai
|
|
|
230
234
|
exports.ContextMenuItem = contextMenuItem;
|
|
231
235
|
exports.DropdownItem = dropdownItem;
|
|
232
236
|
exports.Dropdown = dropdown;
|
|
233
|
-
exports.DropdownMenuContent =
|
|
237
|
+
exports.DropdownMenuContent = dropdownMenuContent;
|
|
234
238
|
exports.DropdownMenuGroup = dropdownMenuGroup;
|
|
235
239
|
exports.DropdownMenuItem = dropdownMenuItem;
|
|
236
240
|
exports.DropdownMenuLabel = dropdownMenuLabel;
|
|
237
241
|
exports.DropdownMenuSeparator = dropdownMenuSeparator;
|
|
238
|
-
exports.DropdownMenuSubContent =
|
|
239
|
-
exports.DropdownMenuSubTrigger =
|
|
242
|
+
exports.DropdownMenuSubContent = dropdownMenuSubContent;
|
|
243
|
+
exports.DropdownMenuSubTrigger = dropdownMenuSubTrigger;
|
|
240
244
|
exports.DropdownMenuSub = dropdownMenuSub_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
241
245
|
exports.DropdownMenuTrigger = dropdownMenuTrigger;
|
|
242
246
|
exports.DropdownMenu = dropdownMenu;
|
|
@@ -252,6 +256,8 @@ exports.Modal = modal_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
|
252
256
|
exports.PopoverContent = popoverContent;
|
|
253
257
|
exports.PopoverTrigger = popoverTrigger;
|
|
254
258
|
exports.Popover = popover_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
259
|
+
exports.ProgressBar = progressBar;
|
|
260
|
+
exports.ProgressCircle = progressCircle;
|
|
255
261
|
exports.RichEditor = richEditor;
|
|
256
262
|
exports.ScrollArea = scrollArea_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
257
263
|
exports.SegmentedControlItem = segmentedControlItem;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const Mo = require("vue");
|
|
3
|
+
const useDelegatedProps = require("./use-delegated-props.js");
|
|
4
|
+
const clsx = require("./chunks/clsx.js");
|
|
5
|
+
const index = require("./chunks/index.js");
|
|
6
|
+
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
+
const _hoisted_1 = ["data-layout"];
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "celeste-progress-bar-label"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "celeste-progress-bar-label-title"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_4 = { class: "celeste-progress-bar-label" };
|
|
17
|
+
const _hoisted_5 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "celeste-progress-bar-description"
|
|
20
|
+
};
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
22
|
+
__name: "progress-bar",
|
|
23
|
+
props: {
|
|
24
|
+
modelValue: { default: 0 },
|
|
25
|
+
max: { default: 100 },
|
|
26
|
+
getValueLabel: {},
|
|
27
|
+
asChild: { type: Boolean },
|
|
28
|
+
as: {},
|
|
29
|
+
class: {},
|
|
30
|
+
color: { default: "primary" },
|
|
31
|
+
title: {},
|
|
32
|
+
layout: { default: "bare" }
|
|
33
|
+
},
|
|
34
|
+
setup(__props) {
|
|
35
|
+
Mo.useCssVars((_ctx) => ({
|
|
36
|
+
"6ba22aeb": progressIndicator.value
|
|
37
|
+
}));
|
|
38
|
+
const props = __props;
|
|
39
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
40
|
+
const progress = Mo.computed(() => {
|
|
41
|
+
if (props.max === 0)
|
|
42
|
+
return 0;
|
|
43
|
+
const value = Math.min(Math.max(props.modelValue ?? 0, 0), props.max);
|
|
44
|
+
return Math.round(value / props.max * 100);
|
|
45
|
+
});
|
|
46
|
+
const progressIndicator = Mo.computed(() => {
|
|
47
|
+
return 100 - (props.modelValue ?? 0) / props.max * 100;
|
|
48
|
+
});
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return Mo.openBlock(), Mo.createElementBlock("div", {
|
|
51
|
+
class: "celeste-progress-bar-wrapper",
|
|
52
|
+
"data-layout": _ctx.layout
|
|
53
|
+
}, [
|
|
54
|
+
_ctx.layout !== "bare" ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_2, [
|
|
55
|
+
props.title && _ctx.layout !== "inline" ? (Mo.openBlock(), Mo.createElementBlock("span", _hoisted_3, Mo.toDisplayString(_ctx.title), 1)) : Mo.createCommentVNode("", true),
|
|
56
|
+
Mo.createElementVNode("span", _hoisted_4, [
|
|
57
|
+
Mo.renderSlot(_ctx.$slots, "label", {}, () => [
|
|
58
|
+
Mo.createTextVNode(Mo.toDisplayString(progress.value) + "% ", 1)
|
|
59
|
+
], true)
|
|
60
|
+
])
|
|
61
|
+
])) : Mo.createCommentVNode("", true),
|
|
62
|
+
Mo.createVNode(Mo.unref(index.By), Mo.mergeProps(Mo.unref(delegatedProps), {
|
|
63
|
+
class: Mo.unref(clsx.clsx)(
|
|
64
|
+
"celeste-progress-bar",
|
|
65
|
+
props.class
|
|
66
|
+
)
|
|
67
|
+
}), {
|
|
68
|
+
default: Mo.withCtx(() => [
|
|
69
|
+
Mo.createVNode(Mo.unref(index.Iy), {
|
|
70
|
+
class: "celeste-progress-bar-indicator",
|
|
71
|
+
"data-color": _ctx.color
|
|
72
|
+
}, null, 8, ["data-color"])
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
}, 16, ["class"]),
|
|
76
|
+
_ctx.$slots.description && _ctx.layout === "default" ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_5, [
|
|
77
|
+
Mo.renderSlot(_ctx.$slots, "description", {}, void 0, true)
|
|
78
|
+
])) : Mo.createCommentVNode("", true)
|
|
79
|
+
], 8, _hoisted_1);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const progressBar = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-850aadb2"]]);
|
|
84
|
+
module.exports = progressBar;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const Mo = require("vue");
|
|
3
|
+
const useDelegatedProps = require("./use-delegated-props.js");
|
|
4
|
+
const clsx = require("./chunks/clsx.js");
|
|
5
|
+
const index = require("./chunks/index.js");
|
|
6
|
+
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
+
const _hoisted_1 = ["width", "height"];
|
|
8
|
+
const _hoisted_2 = ["cx", "cy", "r"];
|
|
9
|
+
const _hoisted_3 = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"];
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "celeste-progress-circle-label"
|
|
13
|
+
};
|
|
14
|
+
const STROKE_WIDTH = 6.4;
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
16
|
+
__name: "progress-circle",
|
|
17
|
+
props: {
|
|
18
|
+
modelValue: { default: 0 },
|
|
19
|
+
max: { default: 100 },
|
|
20
|
+
getValueLabel: {},
|
|
21
|
+
asChild: { type: Boolean },
|
|
22
|
+
as: {},
|
|
23
|
+
class: {},
|
|
24
|
+
size: { default: 80 }
|
|
25
|
+
},
|
|
26
|
+
setup(__props) {
|
|
27
|
+
Mo.useCssVars((_ctx) => ({
|
|
28
|
+
"433ff7ca": circleSize.value
|
|
29
|
+
}));
|
|
30
|
+
const props = __props;
|
|
31
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
32
|
+
const radius = Mo.computed(() => (props.size - STROKE_WIDTH) / 2);
|
|
33
|
+
const circumference = Mo.computed(() => 2 * Math.PI * radius.value);
|
|
34
|
+
const progress = Mo.computed(() => {
|
|
35
|
+
if (props.max === 0)
|
|
36
|
+
return 0;
|
|
37
|
+
const value = Math.min(Math.max(props.modelValue ?? 0, 0), props.max);
|
|
38
|
+
return Math.round(value / props.max * 100);
|
|
39
|
+
});
|
|
40
|
+
const offset = Mo.computed(() => {
|
|
41
|
+
return circumference.value * (1 - progress.value / 100);
|
|
42
|
+
});
|
|
43
|
+
const circleSize = Mo.computed(() => `${props.size}px`);
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.By), Mo.mergeProps(Mo.unref(delegatedProps), {
|
|
46
|
+
value: props.modelValue,
|
|
47
|
+
class: Mo.unref(clsx.clsx)("celeste-progress-circle", props.class),
|
|
48
|
+
as: "div"
|
|
49
|
+
}), {
|
|
50
|
+
default: Mo.withCtx(() => [
|
|
51
|
+
Mo.createVNode(Mo.unref(index.Iy), { "as-child": "" }, {
|
|
52
|
+
default: Mo.withCtx(() => [
|
|
53
|
+
(Mo.openBlock(), Mo.createElementBlock("svg", {
|
|
54
|
+
class: "celeste-progress-circle-svg",
|
|
55
|
+
width: props.size,
|
|
56
|
+
height: props.size
|
|
57
|
+
}, [
|
|
58
|
+
Mo.createElementVNode("circle", {
|
|
59
|
+
class: "celeste-progress-circle-track",
|
|
60
|
+
cx: props.size / 2,
|
|
61
|
+
cy: props.size / 2,
|
|
62
|
+
r: radius.value,
|
|
63
|
+
"stroke-width": STROKE_WIDTH,
|
|
64
|
+
fill: "transparent"
|
|
65
|
+
}, null, 8, _hoisted_2),
|
|
66
|
+
Mo.createElementVNode("circle", {
|
|
67
|
+
class: "celeste-progress-circle-indicator",
|
|
68
|
+
cx: props.size / 2,
|
|
69
|
+
cy: props.size / 2,
|
|
70
|
+
r: radius.value,
|
|
71
|
+
"stroke-width": STROKE_WIDTH,
|
|
72
|
+
fill: "transparent",
|
|
73
|
+
"stroke-dasharray": circumference.value,
|
|
74
|
+
"stroke-dashoffset": offset.value
|
|
75
|
+
}, null, 8, _hoisted_3)
|
|
76
|
+
], 8, _hoisted_1))
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
79
|
+
}),
|
|
80
|
+
props.size !== 48 ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_4, [
|
|
81
|
+
Mo.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
82
|
+
Mo.createTextVNode(Mo.toDisplayString(progress.value) + "% ", 1)
|
|
83
|
+
], true)
|
|
84
|
+
])) : Mo.createCommentVNode("", true)
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
}, 16, ["value", "class"]);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const progressCircle = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-f8ba36bb"]]);
|
|
92
|
+
module.exports = progressCircle;
|