@youcan/celeste 0.6.28 → 0.6.30
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 +28 -0
- package/dist/cjs/checkbox-label.js +112 -0
- package/dist/cjs/index.js +3 -0
- package/dist/components/checkbox/checkbox-label.d.ts +32 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/es/checkbox-label.js +113 -0
- package/dist/es/chunks/index.js +13 -13
- 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/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-root.js +1 -1
- package/dist/es/command-separator.js +1 -1
- package/dist/es/dropdown-menu-group.js +1 -1
- package/dist/es/dropdown-menu-item.js +1 -1
- package/dist/es/dropdown-menu-label.js +1 -1
- package/dist/es/dropdown-menu-separator.js +1 -1
- package/dist/es/dropdown-menu-trigger.js +1 -1
- package/dist/es/dropdown-menu.js +1 -1
- package/dist/es/dropdown.js +1 -1
- package/dist/es/index.js +3 -0
- package/dist/es/label.js +1 -1
- package/package.json +3 -3
- package/src/components/checkbox/checkbox-label.vue +112 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/checkbox/stories/checkbox.stories.ts +37 -20
package/dist/celeste.css
CHANGED
|
@@ -1642,6 +1642,34 @@ to {
|
|
|
1642
1642
|
.celeste-cbutton-white[data-v-c062bacd] {
|
|
1643
1643
|
background-color: var(--color-bg-white-0);
|
|
1644
1644
|
box-shadow: var(--shadow-regular-xs);
|
|
1645
|
+
}.celeste-checkbox-label[data-v-cddafe7b] {
|
|
1646
|
+
display: flex;
|
|
1647
|
+
color: var(--color-text-strong-950);
|
|
1648
|
+
font: var(--paragraph-sm);
|
|
1649
|
+
gap: var(--spacing-8);
|
|
1650
|
+
}
|
|
1651
|
+
[data-v-cddafe7b] .celeste-checkbox-label-checkbox {
|
|
1652
|
+
margin-top: var(--spacing-2);
|
|
1653
|
+
}
|
|
1654
|
+
.celeste-checkbox-label-row[data-v-cddafe7b] {
|
|
1655
|
+
display: flex;
|
|
1656
|
+
align-items: center;
|
|
1657
|
+
gap: var(--spacing-8);
|
|
1658
|
+
}
|
|
1659
|
+
.celeste-checkbox-label-sublabel[data-v-cddafe7b] {
|
|
1660
|
+
color: var(--color-text-sub-600);
|
|
1661
|
+
font: var(--paragraph-xs);
|
|
1662
|
+
}
|
|
1663
|
+
.celeste-checkbox-label-content[data-v-cddafe7b] {
|
|
1664
|
+
display: flex;
|
|
1665
|
+
flex-direction: column;
|
|
1666
|
+
align-items: flex-start;
|
|
1667
|
+
margin-top: var(--spacing-4);
|
|
1668
|
+
color: var(--color-text-sub-600);
|
|
1669
|
+
font: var(--paragraph-xs);
|
|
1670
|
+
}
|
|
1671
|
+
.celeste-checkbox-label-link-button[data-v-cddafe7b] {
|
|
1672
|
+
margin-top: var(--spacing-10);
|
|
1645
1673
|
}.celeste-dropdown-empty-list[data-v-450bfb63] {
|
|
1646
1674
|
display: flex;
|
|
1647
1675
|
align-items: center;
|
|
@@ -0,0 +1,112 @@
|
|
|
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 = { role: "presentation" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
role: "presentation",
|
|
10
|
+
class: "celeste-checkbox-label-row"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = {
|
|
13
|
+
role: "presentation",
|
|
14
|
+
class: "celeste-checkbox-label-content"
|
|
15
|
+
};
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
17
|
+
__name: "checkbox-label",
|
|
18
|
+
props: {
|
|
19
|
+
for: {},
|
|
20
|
+
asChild: { type: Boolean },
|
|
21
|
+
as: {},
|
|
22
|
+
sublabel: {},
|
|
23
|
+
information: {},
|
|
24
|
+
required: { type: Boolean },
|
|
25
|
+
description: {},
|
|
26
|
+
disabled: { type: Boolean },
|
|
27
|
+
class: {}
|
|
28
|
+
},
|
|
29
|
+
setup(__props) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.Oh), Mo.mergeProps(Mo.unref(delegatedProps), {
|
|
34
|
+
"aria-required": _ctx.required,
|
|
35
|
+
"aria-disabcled": _ctx.disabled,
|
|
36
|
+
class: Mo.unref(clsx.clsx)("celeste-checkbox-label", props.class)
|
|
37
|
+
}), {
|
|
38
|
+
default: Mo.withCtx(() => [
|
|
39
|
+
Mo.createVNode(Mo.unref(index.O), {
|
|
40
|
+
"as-child": "",
|
|
41
|
+
class: "celeste-checkbox-label-checkbox"
|
|
42
|
+
}, {
|
|
43
|
+
default: Mo.withCtx(() => [
|
|
44
|
+
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}),
|
|
48
|
+
Mo.createElementVNode("div", _hoisted_1, [
|
|
49
|
+
Mo.createElementVNode("div", _hoisted_2, [
|
|
50
|
+
Mo.createElementVNode("div", null, [
|
|
51
|
+
Mo.createVNode(Mo.unref(index.O), {
|
|
52
|
+
as: "span",
|
|
53
|
+
class: "celeste-checkbox-label-label"
|
|
54
|
+
}, {
|
|
55
|
+
default: Mo.withCtx(() => [
|
|
56
|
+
Mo.renderSlot(_ctx.$slots, "label", {}, void 0, true)
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
}),
|
|
60
|
+
_ctx.$slots.sublabel ? (Mo.openBlock(), Mo.createBlock(Mo.unref(index.O), {
|
|
61
|
+
key: 0,
|
|
62
|
+
as: "span",
|
|
63
|
+
class: "celeste-checkbox-label-sublabel"
|
|
64
|
+
}, {
|
|
65
|
+
default: Mo.withCtx(() => [
|
|
66
|
+
Mo.renderSlot(_ctx.$slots, "sublabel", {}, void 0, true)
|
|
67
|
+
]),
|
|
68
|
+
_: 3
|
|
69
|
+
})) : Mo.createCommentVNode("", true)
|
|
70
|
+
]),
|
|
71
|
+
_ctx.$slots.badge ? (Mo.openBlock(), Mo.createBlock(Mo.unref(index.O), {
|
|
72
|
+
key: 0,
|
|
73
|
+
"as-child": "",
|
|
74
|
+
class: "celeste-checkbox-label-badge"
|
|
75
|
+
}, {
|
|
76
|
+
default: Mo.withCtx(() => [
|
|
77
|
+
Mo.renderSlot(_ctx.$slots, "badge", {}, void 0, true)
|
|
78
|
+
]),
|
|
79
|
+
_: 3
|
|
80
|
+
})) : Mo.createCommentVNode("", true)
|
|
81
|
+
]),
|
|
82
|
+
Mo.createElementVNode("div", _hoisted_3, [
|
|
83
|
+
_ctx.$slots.description ? (Mo.openBlock(), Mo.createBlock(Mo.unref(index.O), {
|
|
84
|
+
key: 0,
|
|
85
|
+
as: "span",
|
|
86
|
+
class: "celeste-checkbox-label-description"
|
|
87
|
+
}, {
|
|
88
|
+
default: Mo.withCtx(() => [
|
|
89
|
+
Mo.renderSlot(_ctx.$slots, "description", {}, void 0, true)
|
|
90
|
+
]),
|
|
91
|
+
_: 3
|
|
92
|
+
})) : Mo.createCommentVNode("", true),
|
|
93
|
+
_ctx.$slots.linkButton ? (Mo.openBlock(), Mo.createBlock(Mo.unref(index.O), {
|
|
94
|
+
key: 1,
|
|
95
|
+
"as-child": "",
|
|
96
|
+
class: "celeste-checkbox-label-link-button"
|
|
97
|
+
}, {
|
|
98
|
+
default: Mo.withCtx(() => [
|
|
99
|
+
Mo.renderSlot(_ctx.$slots, "linkButton", {}, void 0, true)
|
|
100
|
+
]),
|
|
101
|
+
_: 3
|
|
102
|
+
})) : Mo.createCommentVNode("", true)
|
|
103
|
+
])
|
|
104
|
+
])
|
|
105
|
+
]),
|
|
106
|
+
_: 3
|
|
107
|
+
}, 16, ["aria-required", "aria-disabcled", "class"]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
const checkboxLabel = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-cddafe7b"]]);
|
|
112
|
+
module.exports = checkboxLabel;
|
package/dist/cjs/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const compactButton = require("./compact-button.js");
|
|
|
8
8
|
const fancyButton = require("./fancy-button.js");
|
|
9
9
|
const linkButton = require("./link-button.js");
|
|
10
10
|
const socialButton = require("./social-button.js");
|
|
11
|
+
const checkboxLabel = require("./checkbox-label.js");
|
|
11
12
|
const checkbox_vue_vue_type_style_index_0_lang = require("./chunks/checkbox.vue_vue_type_style_index_0_lang.js");
|
|
12
13
|
const comboboxAnchor_vue_vue_type_script_setup_true_lang = require("./chunks/combobox-anchor.js");
|
|
13
14
|
const comboboxEmpty = require("./combobox-empty.js");
|
|
@@ -74,6 +75,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
74
75
|
Badge: badge,
|
|
75
76
|
Button: button,
|
|
76
77
|
Checkbox: checkbox_vue_vue_type_style_index_0_lang._sfc_main,
|
|
78
|
+
CheckboxLabel: checkboxLabel,
|
|
77
79
|
Combobox: combobox,
|
|
78
80
|
ComboboxAnchor: comboboxAnchor_vue_vue_type_script_setup_true_lang._sfc_main,
|
|
79
81
|
ComboboxEmpty: comboboxEmpty,
|
|
@@ -154,6 +156,7 @@ exports.CompactButton = compactButton;
|
|
|
154
156
|
exports.FancyButton = fancyButton;
|
|
155
157
|
exports.LinkButton = linkButton;
|
|
156
158
|
exports.SocialButton = socialButton;
|
|
159
|
+
exports.CheckboxLabel = checkboxLabel;
|
|
157
160
|
exports.Checkbox = checkbox_vue_vue_type_style_index_0_lang._sfc_main;
|
|
158
161
|
exports.ComboboxAnchor = comboboxAnchor_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
159
162
|
exports.ComboboxEmpty = comboboxEmpty;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { LabelProps } from 'radix-vue';
|
|
3
|
+
type __VLS_Props = LabelProps & {
|
|
4
|
+
sublabel?: string;
|
|
5
|
+
information?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
description?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
class?: HTMLAttributes['class'];
|
|
10
|
+
};
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
default?(_: {}): any;
|
|
15
|
+
label?(_: {}): any;
|
|
16
|
+
sublabel?(_: {}): any;
|
|
17
|
+
badge?(_: {}): any;
|
|
18
|
+
description?(_: {}): any;
|
|
19
|
+
linkButton?(_: {}): any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: any;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, createElementVNode, createCommentVNode } from "vue";
|
|
2
|
+
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
3
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
4
|
+
import { B as Oh, f as O } from "./chunks/index.js";
|
|
5
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
|
+
const _hoisted_1 = { role: "presentation" };
|
|
7
|
+
const _hoisted_2 = {
|
|
8
|
+
role: "presentation",
|
|
9
|
+
class: "celeste-checkbox-label-row"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_3 = {
|
|
12
|
+
role: "presentation",
|
|
13
|
+
class: "celeste-checkbox-label-content"
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
+
__name: "checkbox-label",
|
|
17
|
+
props: {
|
|
18
|
+
for: {},
|
|
19
|
+
asChild: { type: Boolean },
|
|
20
|
+
as: {},
|
|
21
|
+
sublabel: {},
|
|
22
|
+
information: {},
|
|
23
|
+
required: { type: Boolean },
|
|
24
|
+
description: {},
|
|
25
|
+
disabled: { type: Boolean },
|
|
26
|
+
class: {}
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const delegatedProps = useDelegatedProps(props, "class");
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createBlock(unref(Oh), mergeProps(unref(delegatedProps), {
|
|
33
|
+
"aria-required": _ctx.required,
|
|
34
|
+
"aria-disabcled": _ctx.disabled,
|
|
35
|
+
class: unref(clsx)("celeste-checkbox-label", props.class)
|
|
36
|
+
}), {
|
|
37
|
+
default: withCtx(() => [
|
|
38
|
+
createVNode(unref(O), {
|
|
39
|
+
"as-child": "",
|
|
40
|
+
class: "celeste-checkbox-label-checkbox"
|
|
41
|
+
}, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}),
|
|
47
|
+
createElementVNode("div", _hoisted_1, [
|
|
48
|
+
createElementVNode("div", _hoisted_2, [
|
|
49
|
+
createElementVNode("div", null, [
|
|
50
|
+
createVNode(unref(O), {
|
|
51
|
+
as: "span",
|
|
52
|
+
class: "celeste-checkbox-label-label"
|
|
53
|
+
}, {
|
|
54
|
+
default: withCtx(() => [
|
|
55
|
+
renderSlot(_ctx.$slots, "label", {}, void 0, true)
|
|
56
|
+
]),
|
|
57
|
+
_: 3
|
|
58
|
+
}),
|
|
59
|
+
_ctx.$slots.sublabel ? (openBlock(), createBlock(unref(O), {
|
|
60
|
+
key: 0,
|
|
61
|
+
as: "span",
|
|
62
|
+
class: "celeste-checkbox-label-sublabel"
|
|
63
|
+
}, {
|
|
64
|
+
default: withCtx(() => [
|
|
65
|
+
renderSlot(_ctx.$slots, "sublabel", {}, void 0, true)
|
|
66
|
+
]),
|
|
67
|
+
_: 3
|
|
68
|
+
})) : createCommentVNode("", true)
|
|
69
|
+
]),
|
|
70
|
+
_ctx.$slots.badge ? (openBlock(), createBlock(unref(O), {
|
|
71
|
+
key: 0,
|
|
72
|
+
"as-child": "",
|
|
73
|
+
class: "celeste-checkbox-label-badge"
|
|
74
|
+
}, {
|
|
75
|
+
default: withCtx(() => [
|
|
76
|
+
renderSlot(_ctx.$slots, "badge", {}, void 0, true)
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
})) : createCommentVNode("", true)
|
|
80
|
+
]),
|
|
81
|
+
createElementVNode("div", _hoisted_3, [
|
|
82
|
+
_ctx.$slots.description ? (openBlock(), createBlock(unref(O), {
|
|
83
|
+
key: 0,
|
|
84
|
+
as: "span",
|
|
85
|
+
class: "celeste-checkbox-label-description"
|
|
86
|
+
}, {
|
|
87
|
+
default: withCtx(() => [
|
|
88
|
+
renderSlot(_ctx.$slots, "description", {}, void 0, true)
|
|
89
|
+
]),
|
|
90
|
+
_: 3
|
|
91
|
+
})) : createCommentVNode("", true),
|
|
92
|
+
_ctx.$slots.linkButton ? (openBlock(), createBlock(unref(O), {
|
|
93
|
+
key: 1,
|
|
94
|
+
"as-child": "",
|
|
95
|
+
class: "celeste-checkbox-label-link-button"
|
|
96
|
+
}, {
|
|
97
|
+
default: withCtx(() => [
|
|
98
|
+
renderSlot(_ctx.$slots, "linkButton", {}, void 0, true)
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
101
|
+
})) : createCommentVNode("", true)
|
|
102
|
+
])
|
|
103
|
+
])
|
|
104
|
+
]),
|
|
105
|
+
_: 3
|
|
106
|
+
}, 16, ["aria-required", "aria-disabcled", "class"]);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const checkboxLabel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cddafe7b"]]);
|
|
111
|
+
export {
|
|
112
|
+
checkboxLabel as default
|
|
113
|
+
};
|
package/dist/es/chunks/index.js
CHANGED
|
@@ -8975,36 +8975,36 @@ const av = /* @__PURE__ */ defineComponent({
|
|
|
8975
8975
|
}
|
|
8976
8976
|
});
|
|
8977
8977
|
export {
|
|
8978
|
-
|
|
8978
|
+
rh as $,
|
|
8979
8979
|
At as A,
|
|
8980
|
-
|
|
8980
|
+
Oh as B,
|
|
8981
8981
|
Ch as C,
|
|
8982
|
-
|
|
8983
|
-
|
|
8982
|
+
qv as D,
|
|
8983
|
+
Wv as E,
|
|
8984
8984
|
Fy as F,
|
|
8985
8985
|
Gy as G,
|
|
8986
|
-
|
|
8987
|
-
|
|
8986
|
+
Qv as H,
|
|
8987
|
+
nm as I,
|
|
8988
8988
|
Jv as J,
|
|
8989
8989
|
Kv as K,
|
|
8990
|
-
|
|
8990
|
+
Hv as L,
|
|
8991
8991
|
My as M,
|
|
8992
8992
|
Ny as N,
|
|
8993
8993
|
Oy as O,
|
|
8994
|
-
|
|
8994
|
+
tm as P,
|
|
8995
8995
|
Qf as Q,
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8996
|
+
fh as R,
|
|
8997
|
+
ch as S,
|
|
8998
|
+
hh as T,
|
|
8999
8999
|
Uv as U,
|
|
9000
9000
|
Vy as V,
|
|
9001
9001
|
Wy as W,
|
|
9002
9002
|
Xv as X,
|
|
9003
9003
|
Yv as Y,
|
|
9004
9004
|
Zv as Z,
|
|
9005
|
-
|
|
9005
|
+
ph as _,
|
|
9006
9006
|
Gl as a,
|
|
9007
|
-
|
|
9007
|
+
sh as a0,
|
|
9008
9008
|
Dv as a1,
|
|
9009
9009
|
Eu as a2,
|
|
9010
9010
|
xu as a3,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import {
|
|
3
|
+
import { D as qv, Y as Yv } from "./chunks/index.js";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "combobox-group",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, mergeModels, useModel, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, createElementVNode } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import {
|
|
3
|
+
import { E as Wv } from "./chunks/index.js";
|
|
4
4
|
import TextInput from "./text-input.js";
|
|
5
5
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
package/dist/es/combobox-item.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, createCommentVNode, createElementBlock, renderSlot, toDisplayString } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { x as xe,
|
|
3
|
+
import { x as xe, H as Qv } from "./chunks/index.js";
|
|
4
4
|
import { _ as _sfc_main$1 } from "./chunks/checkbox.vue_vue_type_style_index_0_lang.js";
|
|
5
5
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
6
|
const _hoisted_1 = ["aria-disabled"];
|
package/dist/es/combobox-list.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { x as xe,
|
|
3
|
+
import { x as xe, I as nm, X as Xv, J as Jv } from "./chunks/index.js";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "combobox-list",
|
package/dist/es/combobox-root.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { x as xe,
|
|
2
|
+
import { x as xe, L as Hv } from "./chunks/index.js";
|
|
3
3
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "combobox-root",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import {
|
|
3
|
+
import { P as tm } from "./chunks/index.js";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "combobox-separator",
|
package/dist/es/command-group.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { D as qv, Y as Yv } from "./chunks/index.js";
|
|
3
3
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "command-group",
|
package/dist/es/command-input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, createVNode, unref, mergeProps } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { A as At,
|
|
3
|
+
import { A as At, E as Wv } from "./chunks/index.js";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
5
|
const _hoisted_1 = {
|
|
6
6
|
class: "celeste-command-input",
|
package/dist/es/command-item.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { x as xe,
|
|
2
|
+
import { x as xe, H as Qv } from "./chunks/index.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "command-item",
|
|
5
5
|
props: {
|
package/dist/es/command-root.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { x as xe,
|
|
2
|
+
import { x as xe, L as Hv } from "./chunks/index.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "command-root",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import {
|
|
3
|
+
import { P as tm } from "./chunks/index.js";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "command-separator",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { R as fh } from "./chunks/index.js";
|
|
3
3
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "dropdown-menu-group",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, renderSlot, toDisplayString, createElementBlock, createCommentVNode } from "vue";
|
|
2
2
|
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
3
3
|
import { c as clsx } from "./chunks/clsx.js";
|
|
4
|
-
import { A as At,
|
|
4
|
+
import { A as At, S as ch } from "./chunks/index.js";
|
|
5
5
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
6
|
const _hoisted_1 = { class: "celeste-dropdown-menu-item-prefix" };
|
|
7
7
|
const _hoisted_2 = { class: "celeste-dropdown-menu-item-body" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
3
3
|
import { c as clsx } from "./chunks/clsx.js";
|
|
4
|
-
import { A as At,
|
|
4
|
+
import { A as At, T as hh } from "./chunks/index.js";
|
|
5
5
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "dropdown-menu-label",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps } from "vue";
|
|
2
2
|
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
3
3
|
import { c as clsx } from "./chunks/clsx.js";
|
|
4
|
-
import {
|
|
4
|
+
import { _ as ph } from "./chunks/index.js";
|
|
5
5
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "dropdown-menu-separator",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { A as At,
|
|
2
|
+
import { A as At, $ as rh } from "./chunks/index.js";
|
|
3
3
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "dropdown-menu-trigger",
|
package/dist/es/dropdown-menu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a0 as sh } from "./chunks/index.js";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "dropdown-menu",
|
package/dist/es/dropdown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, mergeModels, useModel, ref, computed, watch, openBlock, createElementBlock, withKeys, createVNode, unref, withCtx, normalizeClass, createElementVNode, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, toDisplayString, createBlock, createSlots, Fragment, renderList } from "vue";
|
|
2
2
|
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import {
|
|
3
|
+
import { L as Hv, j as jv, U as Uv, X as Xv, J as Jv, P as tm, Z as Zv, D as qv, H as Qv } from "./chunks/index.js";
|
|
4
4
|
import Badge from "./badge.js";
|
|
5
5
|
import TextInput from "./text-input.js";
|
|
6
6
|
import DropdownItem from "./dropdown-item.js";
|
package/dist/es/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import CompactButton from "./compact-button.js";
|
|
|
6
6
|
import fancyButton from "./fancy-button.js";
|
|
7
7
|
import linkButton from "./link-button.js";
|
|
8
8
|
import socialButton from "./social-button.js";
|
|
9
|
+
import checkboxLabel from "./checkbox-label.js";
|
|
9
10
|
import { _ as _sfc_main } from "./chunks/checkbox.vue_vue_type_style_index_0_lang.js";
|
|
10
11
|
import { _ as _sfc_main$1 } from "./chunks/combobox-anchor.js";
|
|
11
12
|
import ComboboxEmpty from "./combobox-empty.js";
|
|
@@ -72,6 +73,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
72
73
|
Badge,
|
|
73
74
|
Button,
|
|
74
75
|
Checkbox: _sfc_main,
|
|
76
|
+
CheckboxLabel: checkboxLabel,
|
|
75
77
|
Combobox: combobox,
|
|
76
78
|
ComboboxAnchor: _sfc_main$1,
|
|
77
79
|
ComboboxEmpty,
|
|
@@ -150,6 +152,7 @@ export {
|
|
|
150
152
|
Button,
|
|
151
153
|
Celeste,
|
|
152
154
|
_sfc_main as Checkbox,
|
|
155
|
+
checkboxLabel as CheckboxLabel,
|
|
153
156
|
combobox as Combobox,
|
|
154
157
|
_sfc_main$1 as ComboboxAnchor,
|
|
155
158
|
ComboboxEmpty,
|
package/dist/es/label.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, re
|
|
|
2
2
|
import Tooltip from "./tooltip.js";
|
|
3
3
|
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
4
4
|
import { c as clsx } from "./chunks/clsx.js";
|
|
5
|
-
import {
|
|
5
|
+
import { B as Oh } from "./chunks/index.js";
|
|
6
6
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
7
7
|
const _hoisted_1 = {
|
|
8
8
|
key: 0,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/celeste",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.30",
|
|
5
5
|
"author": "YouCan <tech@youcan.shop>",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"youcan",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
33
|
"radix-vue": "^1.9.12",
|
|
34
34
|
"tinycolor2": "^1.6.0",
|
|
35
|
-
"@youcan/celeste-icons": "0.6.
|
|
36
|
-
"@youcan/celeste-tokens": "0.6.
|
|
35
|
+
"@youcan/celeste-icons": "0.6.30",
|
|
36
|
+
"@youcan/celeste-tokens": "0.6.30"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@chromatic-com/storybook": "^4.0.0",
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { Label, type LabelProps, Primitive } from 'radix-vue';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<LabelProps & {
|
|
8
|
+
sublabel?: string;
|
|
9
|
+
information?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
description?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
class?: HTMLAttributes['class'];
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = useDelegatedProps(props, 'class');
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<Label
|
|
21
|
+
v-bind="delegatedProps"
|
|
22
|
+
:aria-required="required"
|
|
23
|
+
:aria-disabcled="disabled"
|
|
24
|
+
:class="clsx('celeste-checkbox-label', props.class)"
|
|
25
|
+
>
|
|
26
|
+
|
|
27
|
+
<Primitive as-child class="celeste-checkbox-label-checkbox">
|
|
28
|
+
<slot />
|
|
29
|
+
</Primitive>
|
|
30
|
+
|
|
31
|
+
<div role="presentation">
|
|
32
|
+
<div role="presentation" class="celeste-checkbox-label-row">
|
|
33
|
+
<div>
|
|
34
|
+
<Primitive as="span" class="celeste-checkbox-label-label">
|
|
35
|
+
<slot name="label" />
|
|
36
|
+
</Primitive>
|
|
37
|
+
|
|
38
|
+
<Primitive
|
|
39
|
+
v-if="$slots.sublabel"
|
|
40
|
+
as="span"
|
|
41
|
+
class="celeste-checkbox-label-sublabel"
|
|
42
|
+
>
|
|
43
|
+
<slot name="sublabel" />
|
|
44
|
+
</Primitive>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<Primitive
|
|
48
|
+
v-if="$slots.badge"
|
|
49
|
+
as-child
|
|
50
|
+
class="celeste-checkbox-label-badge"
|
|
51
|
+
>
|
|
52
|
+
<slot name="badge" />
|
|
53
|
+
</Primitive>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div role="presentation" class="celeste-checkbox-label-content">
|
|
57
|
+
<Primitive
|
|
58
|
+
v-if="$slots.description"
|
|
59
|
+
as="span"
|
|
60
|
+
class="celeste-checkbox-label-description"
|
|
61
|
+
>
|
|
62
|
+
<slot name="description" />
|
|
63
|
+
</Primitive>
|
|
64
|
+
|
|
65
|
+
<Primitive
|
|
66
|
+
v-if="$slots.linkButton"
|
|
67
|
+
as-child
|
|
68
|
+
class="celeste-checkbox-label-link-button"
|
|
69
|
+
>
|
|
70
|
+
<slot name="linkButton" />
|
|
71
|
+
</Primitive>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</Label>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<style scoped lang="scss">
|
|
78
|
+
.celeste-checkbox-label {
|
|
79
|
+
display: flex;
|
|
80
|
+
color: var(--color-text-strong-950);
|
|
81
|
+
font: var(--paragraph-sm);
|
|
82
|
+
gap: var(--spacing-8);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:deep(.celeste-checkbox-label-checkbox) {
|
|
86
|
+
margin-top: var(--spacing-2);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.celeste-checkbox-label-row {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: var(--spacing-8);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.celeste-checkbox-label-sublabel {
|
|
96
|
+
color: var(--color-text-sub-600);
|
|
97
|
+
font: var(--paragraph-xs);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.celeste-checkbox-label-content {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
align-items: flex-start;
|
|
104
|
+
margin-top: var(--spacing-4);
|
|
105
|
+
color: var(--color-text-sub-600);
|
|
106
|
+
font: var(--paragraph-xs);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.celeste-checkbox-label-link-button {
|
|
110
|
+
margin-top: var(--spacing-10);
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import Badge from '@/components/badge/badge.vue';
|
|
3
|
+
import LinkButton from '@/components/button/link-button.vue';
|
|
4
|
+
import CheckboxLabel from '../checkbox-label.vue';
|
|
2
5
|
import Checkbox from '../checkbox.vue';
|
|
3
6
|
|
|
4
7
|
const meta: Meta<typeof Checkbox> = {
|
|
@@ -67,34 +70,48 @@ export const Disabled: Story = {
|
|
|
67
70
|
}),
|
|
68
71
|
};
|
|
69
72
|
|
|
70
|
-
export const
|
|
71
|
-
args: {
|
|
72
|
-
},
|
|
73
|
+
export const WithCheckboxLabel: Story = {
|
|
74
|
+
args: {},
|
|
73
75
|
|
|
74
76
|
render: args => ({
|
|
75
|
-
components: { Checkbox },
|
|
77
|
+
components: { Checkbox, CheckboxLabel, Badge, LinkButton },
|
|
76
78
|
setup() {
|
|
77
79
|
return { args };
|
|
78
80
|
},
|
|
79
81
|
template: `
|
|
80
82
|
<div style="display: flex; justify-content: center;">
|
|
81
|
-
<div style="
|
|
82
|
-
<
|
|
83
|
+
<div style="max-width: 400px;">
|
|
84
|
+
<CheckboxLabel>
|
|
83
85
|
<Checkbox v-bind="args" />
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
|
|
87
|
+
<template #label>
|
|
88
|
+
Label
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<template #badge>
|
|
92
|
+
<Badge
|
|
93
|
+
label="NEW"
|
|
94
|
+
state="information"
|
|
95
|
+
variant="light"
|
|
96
|
+
size="sm"
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
<template #sublabel>
|
|
100
|
+
(Sublabel)
|
|
101
|
+
</template>
|
|
102
|
+
<template #description>
|
|
103
|
+
Insert the checkbox description here.
|
|
104
|
+
</template>
|
|
105
|
+
<template #linkButton>
|
|
106
|
+
<LinkButton
|
|
107
|
+
href="#"
|
|
108
|
+
intent="primary"
|
|
109
|
+
size="sm"
|
|
110
|
+
>
|
|
111
|
+
Learn More
|
|
112
|
+
</LinkButton>
|
|
113
|
+
</template>
|
|
114
|
+
</CheckboxLabel>
|
|
98
115
|
</div>
|
|
99
116
|
</div>
|
|
100
117
|
`,
|