@cck-ui/core 0.23.0 → 0.24.0

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.
@@ -0,0 +1,434 @@
1
+ "use client";
2
+ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
3
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
4
+ import { CBox } from "../../core/box/index.mjs";
5
+ import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
6
+ import divider_module_default from "./divider.module.mjs";
7
+ import { varsResolver } from "./divider.utils.mjs";
8
+ import { computed, createBlock, createCommentVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, useSlots, withCtx } from "vue";
9
+ //#region packages/@cck-ui/core/src/components/divider/divider.vue
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ name: "CDivider",
12
+ __name: "divider",
13
+ props: {
14
+ color: {
15
+ type: null,
16
+ required: false
17
+ },
18
+ size: {
19
+ type: [
20
+ String,
21
+ Number,
22
+ Object
23
+ ],
24
+ required: false
25
+ },
26
+ labelPosition: {
27
+ type: String,
28
+ required: false
29
+ },
30
+ orientation: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ className: {
35
+ type: String,
36
+ required: false
37
+ },
38
+ style: {
39
+ type: [
40
+ Object,
41
+ Function,
42
+ Array
43
+ ],
44
+ required: false,
45
+ skipCheck: true
46
+ },
47
+ __vars: {
48
+ type: null,
49
+ required: false
50
+ },
51
+ __size: {
52
+ type: String,
53
+ required: false
54
+ },
55
+ hiddenFrom: {
56
+ type: null,
57
+ required: false
58
+ },
59
+ visibleFrom: {
60
+ type: null,
61
+ required: false
62
+ },
63
+ lightHidden: {
64
+ type: Boolean,
65
+ required: false
66
+ },
67
+ darkHidden: {
68
+ type: Boolean,
69
+ required: false
70
+ },
71
+ mod: {
72
+ type: [
73
+ Object,
74
+ String,
75
+ Array
76
+ ],
77
+ required: false
78
+ },
79
+ m: {
80
+ type: null,
81
+ required: false
82
+ },
83
+ my: {
84
+ type: null,
85
+ required: false
86
+ },
87
+ mx: {
88
+ type: null,
89
+ required: false
90
+ },
91
+ mt: {
92
+ type: null,
93
+ required: false
94
+ },
95
+ mb: {
96
+ type: null,
97
+ required: false
98
+ },
99
+ ms: {
100
+ type: null,
101
+ required: false
102
+ },
103
+ me: {
104
+ type: null,
105
+ required: false
106
+ },
107
+ mis: {
108
+ type: null,
109
+ required: false
110
+ },
111
+ mie: {
112
+ type: null,
113
+ required: false
114
+ },
115
+ ml: {
116
+ type: null,
117
+ required: false
118
+ },
119
+ mr: {
120
+ type: null,
121
+ required: false
122
+ },
123
+ p: {
124
+ type: null,
125
+ required: false
126
+ },
127
+ py: {
128
+ type: null,
129
+ required: false
130
+ },
131
+ px: {
132
+ type: null,
133
+ required: false
134
+ },
135
+ pt: {
136
+ type: null,
137
+ required: false
138
+ },
139
+ pb: {
140
+ type: null,
141
+ required: false
142
+ },
143
+ ps: {
144
+ type: null,
145
+ required: false
146
+ },
147
+ pe: {
148
+ type: null,
149
+ required: false
150
+ },
151
+ pis: {
152
+ type: null,
153
+ required: false
154
+ },
155
+ pie: {
156
+ type: null,
157
+ required: false
158
+ },
159
+ pl: {
160
+ type: null,
161
+ required: false
162
+ },
163
+ pr: {
164
+ type: null,
165
+ required: false
166
+ },
167
+ bd: {
168
+ type: null,
169
+ required: false
170
+ },
171
+ bdrs: {
172
+ type: null,
173
+ required: false
174
+ },
175
+ bg: {
176
+ type: null,
177
+ required: false
178
+ },
179
+ c: {
180
+ type: null,
181
+ required: false
182
+ },
183
+ opacity: {
184
+ type: [
185
+ String,
186
+ Object,
187
+ Number
188
+ ],
189
+ required: false
190
+ },
191
+ ff: {
192
+ type: [String, Object],
193
+ required: false
194
+ },
195
+ fz: {
196
+ type: null,
197
+ required: false
198
+ },
199
+ fw: {
200
+ type: null,
201
+ required: false
202
+ },
203
+ lts: {
204
+ type: null,
205
+ required: false
206
+ },
207
+ ta: {
208
+ type: [String, Object],
209
+ required: false
210
+ },
211
+ lh: {
212
+ type: null,
213
+ required: false
214
+ },
215
+ fs: {
216
+ type: null,
217
+ required: false
218
+ },
219
+ tt: {
220
+ type: [String, Object],
221
+ required: false
222
+ },
223
+ td: {
224
+ type: null,
225
+ required: false
226
+ },
227
+ w: {
228
+ type: null,
229
+ required: false
230
+ },
231
+ miw: {
232
+ type: null,
233
+ required: false
234
+ },
235
+ maw: {
236
+ type: null,
237
+ required: false
238
+ },
239
+ h: {
240
+ type: null,
241
+ required: false
242
+ },
243
+ mih: {
244
+ type: null,
245
+ required: false
246
+ },
247
+ mah: {
248
+ type: null,
249
+ required: false
250
+ },
251
+ bgsz: {
252
+ type: null,
253
+ required: false
254
+ },
255
+ bgp: {
256
+ type: null,
257
+ required: false
258
+ },
259
+ bgr: {
260
+ type: null,
261
+ required: false
262
+ },
263
+ bga: {
264
+ type: null,
265
+ required: false
266
+ },
267
+ pos: {
268
+ type: [String, Object],
269
+ required: false
270
+ },
271
+ top: {
272
+ type: null,
273
+ required: false
274
+ },
275
+ left: {
276
+ type: null,
277
+ required: false
278
+ },
279
+ bottom: {
280
+ type: null,
281
+ required: false
282
+ },
283
+ right: {
284
+ type: null,
285
+ required: false
286
+ },
287
+ inset: {
288
+ type: null,
289
+ required: false
290
+ },
291
+ display: {
292
+ type: null,
293
+ required: false
294
+ },
295
+ flex: {
296
+ type: null,
297
+ required: false
298
+ },
299
+ unstyled: {
300
+ type: Boolean,
301
+ required: false
302
+ },
303
+ variant: {
304
+ type: null,
305
+ required: false
306
+ },
307
+ classNames: {
308
+ type: null,
309
+ required: false
310
+ },
311
+ styles: {
312
+ type: null,
313
+ required: false
314
+ },
315
+ vars: {
316
+ type: Function,
317
+ required: false
318
+ },
319
+ attributes: {
320
+ type: null,
321
+ required: false
322
+ }
323
+ },
324
+ setup(__props, { expose: __expose }) {
325
+ const _root = ref(null);
326
+ const _label = ref(null);
327
+ const attrs = useAttrs();
328
+ const slots = useSlots();
329
+ const rawProps = __props;
330
+ const defaultProps = { orientation: "horizontal" };
331
+ const props = useComponentProps({
332
+ component: "CDivider",
333
+ defaultProps,
334
+ props: rawProps
335
+ });
336
+ const knownProps = [
337
+ "classNames",
338
+ "className",
339
+ "style",
340
+ "styles",
341
+ "unstyled",
342
+ "vars",
343
+ "color",
344
+ "orientation",
345
+ "labelPosition",
346
+ "mod",
347
+ "attributes"
348
+ ];
349
+ const rootModList = computed(() => [{ orientation: props.value.orientation }, { withLabel: !!slots.label }]);
350
+ const labelModList = computed(() => [{ position: props.value.labelPosition }]);
351
+ const styleProps = computed(() => ({
352
+ ...props.value,
353
+ ...attrs,
354
+ style: attrs.style ?? props.value.style
355
+ }));
356
+ const getStyles = useStyles({
357
+ name: "Divider",
358
+ props: styleProps,
359
+ classes: divider_module_default,
360
+ className: () => props.value.className,
361
+ style: () => props.value.style,
362
+ classNames: props.value.classNames,
363
+ styles: props.value.styles,
364
+ unstyled: props.value.unstyled,
365
+ attributes: props.value.attributes,
366
+ vars: props.value.vars,
367
+ varsResolver
368
+ });
369
+ const rootAttrs = computed(() => getStyles("root"));
370
+ const mergedAttrs = computed(() => {
371
+ const others = {};
372
+ const propsValue = props.value;
373
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
374
+ const userMod = props.value.mod;
375
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean), ...rootModList.value || []];
376
+ return {
377
+ ...others,
378
+ mod: mergedMod,
379
+ ...rootAttrs.value
380
+ };
381
+ });
382
+ const labelAttrs = computed(() => getStyles("label"));
383
+ __expose({
384
+ root: computed(() => _root.value?.root ?? null),
385
+ label: computed(() => _label.value?.root ?? null)
386
+ });
387
+ const __returned__ = {
388
+ _root,
389
+ _label,
390
+ attrs,
391
+ slots,
392
+ rawProps,
393
+ defaultProps,
394
+ props,
395
+ knownProps,
396
+ rootModList,
397
+ labelModList,
398
+ styleProps,
399
+ getStyles,
400
+ rootAttrs,
401
+ mergedAttrs,
402
+ labelAttrs,
403
+ get CBox() {
404
+ return CBox;
405
+ }
406
+ };
407
+ Object.defineProperty(__returned__, "__isScriptSetup", {
408
+ enumerable: false,
409
+ value: true
410
+ });
411
+ return __returned__;
412
+ }
413
+ });
414
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
415
+ return openBlock(), createBlock($setup["CBox"], mergeProps({
416
+ ref: "_root",
417
+ role: "separator"
418
+ }, $setup.mergedAttrs), {
419
+ default: withCtx(() => [_ctx.$slots.label ? (openBlock(), createBlock($setup["CBox"], mergeProps({
420
+ key: 0,
421
+ component: "span",
422
+ ref: "_label"
423
+ }, $setup.labelAttrs, { mod: $setup.labelModList }), {
424
+ default: withCtx(() => [renderSlot(_ctx.$slots, "label")]),
425
+ _: 3
426
+ }, 16, ["mod"])) : createCommentVNode("v-if", true)]),
427
+ _: 3
428
+ }, 16);
429
+ }
430
+ var divider_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/divider/divider.vue"]]);
431
+ //#endregion
432
+ export { divider_default as default };
433
+
434
+ //# sourceMappingURL=divider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.mjs","names":[],"sources":["../../../src/components/divider/divider.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" role=\"separator\" v-bind=\"mergedAttrs\">\n <c-box\n component=\"span\"\n ref=\"_label\"\n v-bind=\"labelAttrs\"\n v-if=\"$slots.label\"\n :mod=\"labelModList\"\n >\n <slot name=\"label\" />\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { DividerFactory, DividerProps } from './divider.types'\nimport classes from './divider.module.css'\nimport { varsResolver } from './divider.utils'\n\ndefineOptions({\n name: 'CDivider',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _label = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<DividerProps>()\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<DividerProps>\n\nconst props = useComponentProps({\n component: 'CDivider',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'color',\n 'orientation',\n 'labelPosition',\n 'mod',\n 'attributes',\n]\n\nconst rootModList = computed(() => [\n { orientation: props.value.orientation },\n { withLabel: !!slots.label },\n])\n\nconst labelModList = computed(() => [{ position: props.value.labelPosition }])\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<DividerFactory>({\n name: 'Divider',\n props: styleProps,\n classes,\n className: () => props.value.className,\n style: () => props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(rootModList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst labelAttrs = computed(() => getStyles('label'))\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n label: computed(() => _label.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,QAAQ,IAAsC,IAAI;EACxD,MAAM,SAAS,IAAsC,IAAI;EAEzD,MAAM,QAAQ,SAAS;EACvB,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,aAAa,aACf;EAEA,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,cAAc,eAAe,CACjC,EAAE,aAAa,MAAM,MAAM,YAAY,GACvC,EAAE,WAAW,CAAC,CAAC,MAAM,MAAM,CAC7B,CAAC;EAED,MAAM,eAAe,eAAe,CAAC,EAAE,UAAU,MAAM,MAAM,cAAc,CAAC,CAAC;EAE7E,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAA0B;GAC1C,MAAM;GACN,OAAO;GACP,SAAA;GACA,iBAAiB,MAAM,MAAM;GAC7B,aAAa,MAAM,MAAM;GACzB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,YAAY,SAAS,CAAC,CAC5B;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,MAAM,aAAa,eAAe,UAAU,OAAO,CAAC;EAEpD,SAAa;GACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI;GAC9C,OAAO,eAAe,OAAO,OAAO,QAAQ,IAAI;EAClD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA1GC,YAUQ,OAAA,SAVR,WAUQ;EAVD,KAAI;EAAQ,MAAK;IAAoB,OAAA,WAAW,GAAA;yBAS7C,CAJA,KAAA,OAAO,SAAA,UAAA,GAJf,YAQQ,OAAA,SARR,WAQQ;;GAPN,WAAU;GACV,KAAI;KACI,OAAA,YAAU,EAEjB,KAAK,OAAA,aAAY,CAAA,GAAA;0BAEG,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/divider/divider.module.css
3
+ var divider_module_default = {
4
+ "root": "m_35209716",
5
+ "label": "m_6e972f40"
6
+ };
7
+ //#endregion
8
+ export { divider_module_default as default };
9
+
10
+ //# sourceMappingURL=divider.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.module.mjs","names":[],"sources":["../../../src/components/divider/divider.module.css"],"sourcesContent":[".root {\n --divider-size-xs: 1px;\n --divider-size-sm: 2px;\n --divider-size-md: 3px;\n --divider-size-lg: 4px;\n --divider-size-xl: 5px;\n --divider-size: var(--divider-size-xs);\n\n @mixin where-light {\n --divider-color: var(--c-color-gray-3);\n }\n\n @mixin where-dark {\n --divider-color: var(--c-color-dark-4);\n }\n\n &:where([data-orientation='horizontal']) {\n border-top: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);\n }\n\n &:where([data-orientation='vertical']) {\n border-inline-start: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);\n height: auto;\n align-self: stretch;\n }\n\n &:where([data-with-label]) {\n border: 0;\n }\n}\n\n.label {\n display: flex;\n align-items: center;\n font-size: var(--c-font-size-xs);\n color: var(--c-color-dimmed);\n white-space: nowrap;\n\n &:where([data-position='left'])::before {\n display: none;\n }\n\n &:where([data-position='right'])::after {\n display: none;\n }\n\n &::before {\n content: '';\n flex: 1;\n height: 1px;\n border-top: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);\n margin-inline-end: var(--c-spacing-xs);\n }\n\n &::after {\n content: '';\n flex: 1;\n height: 1px;\n border-top: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);\n margin-inline-start: var(--c-spacing-xs);\n }\n}\n"],"mappings":";;AAAA,IAAA,yBAAe;CAAC,QAAO;CAAa,SAAQ;AAAY"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { getSize } from "../../core/utils/get-size/get-size.mjs";
3
+ import { getThemeColor } from "../../core/config-provider/color-functions/get-theme-color/get-theme-color.mjs";
4
+ import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
5
+ //#region packages/@cck-ui/core/src/components/divider/divider.utils.ts
6
+ const varsResolver = createVarsResolver((theme, { color, variant, size }) => ({ root: {
7
+ "--divider-border-style": variant,
8
+ "--divider-color": color ? getThemeColor(color, theme) : void 0,
9
+ "--divider-size": getSize(size, "divider-size")
10
+ } }));
11
+ //#endregion
12
+ export { varsResolver };
13
+
14
+ //# sourceMappingURL=divider.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.utils.mjs","names":[],"sources":["../../../src/components/divider/divider.utils.ts"],"sourcesContent":["import { createVarsResolver, getSize, getThemeColor } from '../../core'\nimport { DividerFactory } from './divider.types'\n\nexport const varsResolver = createVarsResolver<DividerFactory>(\n (theme, { color, variant, size }) => ({\n root: {\n '--divider-border-style': variant,\n '--divider-color': color ? getThemeColor(color, theme) : undefined,\n '--divider-size': getSize(size, 'divider-size'),\n },\n })\n)\n"],"mappings":";;;;;AAGA,MAAa,eAAe,oBACzB,OAAO,EAAE,OAAO,SAAS,YAAY,EACpC,MAAM;CACJ,0BAA0B;CAC1B,mBAAmB,QAAQ,cAAc,OAAO,KAAK,IAAI,KAAA;CACzD,kBAAkB,QAAQ,MAAM,cAAc;AAChD,EACF,EACF"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withClasses, withExtend, withPropsFactory, withVarsResolver } from "../../core/utils/vue/statics.mjs";
4
+ import divider_module_default from "./divider.module.mjs";
5
+ import { varsResolver } from "./divider.utils.mjs";
6
+ import divider_default from "./divider.mjs";
7
+ const CDivider = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(divider_default, divider_module_default), varsResolver))));
8
+ //#endregion
9
+ export { CDivider, CDivider as default };
10
+
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Divider","classes"],"sources":["../../../src/components/divider/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport classes from './divider.module.css'\nimport { varsResolver } from './divider.utils'\nimport Divider from './divider.vue'\n\nconst DividerWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Divider, classes), varsResolver))\n)\n\nexport const CDivider: SFCWithInstallAndClasses<typeof Divider, typeof classes> =\n withInstall(DividerWithStatic)\n\nexport default CDivider\n\nexport * from './divider.types'\n"],"mappings":";;;;;;AAgBA,MAAa,WACX,YALwB,iBACxB,WAAW,iBAAiB,YAAYA,iBAASC,sBAAO,GAAG,YAAY,CAAC,CAI5D,CAAiB"}
package/esm/index.mjs CHANGED
@@ -63,6 +63,7 @@ import { CButton, CButtonGroup, CButtonGroupSection } from "./components/button/
63
63
  import { CCenter } from "./components/center/index.mjs";
64
64
  import { CContainer } from "./components/container/index.mjs";
65
65
  import { CCopyButton } from "./components/copy-button/index.mjs";
66
+ import { CDivider } from "./components/divider/index.mjs";
66
67
  import { CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle } from "./components/empty-state/index.mjs";
67
68
  import { CFileButton } from "./components/file-button/index.mjs";
68
69
  import { CFlex } from "./components/flex/index.mjs";
@@ -98,6 +99,7 @@ const components = [
98
99
  CCol,
99
100
  CContainer,
100
101
  CCopyButton,
102
+ CDivider,
101
103
  CEmptyState,
102
104
  CEmptyStateActions,
103
105
  CEmptyStateDescription,
@@ -132,6 +134,6 @@ const CckUI = { install(app) {
132
134
  });
133
135
  } };
134
136
  //#endregion
135
- export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, CLoader, CONFIG_KEY, CPaper, CSemiCircleProgress, CSimpleGrid, CSkeleton, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, CTypography, CVisuallyHidden, CckConfigProvider, CckUI, CckUI as default, DEFAULT_THEME, FOCUS_CLASS_NAMES, STYLE_PROPS_DATA, THEME_KEY, UnstyledButton, alpha, camelToKebabCase, colorsTuple, createTheme, createVarsResolver, darken, deepMerge, defaultCssVariablesResolver, defaultVariantColorsResolver, em, extractStyleProps, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getFontSize, getGradient, getLineHeight, getPrimaryShade, getRadius, getShadow, getSize, getSortedBreakpoints, getSpacing, getThemeColor, getTransitionProps, hashStyleProps, isLightColor, isNumber, isNumberLike, isString, isStringNumber, isUndefined, isVirtualColor, keys, luminance, mergeThemeOverrides, normalizeNumberLikeStringProp, numberLikeStringToNumber, parseStyleProps, parseThemeColor, px, rem, resolveClassNames, resolveStyles, responsiveStyleManager, rgb, rgba, stylesToString, toRgba, useCckClassNamesPrefix, useCckColorScheme, useCckCssVariablesResolver, useCckEnv, useCckIsHeadless, useCckStyleNonce, useCckStylesTransform, useCckSxTransform, useCckTheme, useCckWithStaticClasses, useComponentProps, useConfigContext, useProviderColorScheme, useRandomClassName, useStyles, virtualColor, withClasses, withExtend, withInstall, withPropsDefaultSetter, withPropsFactory, withVarsResolver };
137
+ export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CDivider, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, CLoader, CONFIG_KEY, CPaper, CSemiCircleProgress, CSimpleGrid, CSkeleton, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, CTypography, CVisuallyHidden, CckConfigProvider, CckUI, CckUI as default, DEFAULT_THEME, FOCUS_CLASS_NAMES, STYLE_PROPS_DATA, THEME_KEY, UnstyledButton, alpha, camelToKebabCase, colorsTuple, createTheme, createVarsResolver, darken, deepMerge, defaultCssVariablesResolver, defaultVariantColorsResolver, em, extractStyleProps, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getFontSize, getGradient, getLineHeight, getPrimaryShade, getRadius, getShadow, getSize, getSortedBreakpoints, getSpacing, getThemeColor, getTransitionProps, hashStyleProps, isLightColor, isNumber, isNumberLike, isString, isStringNumber, isUndefined, isVirtualColor, keys, luminance, mergeThemeOverrides, normalizeNumberLikeStringProp, numberLikeStringToNumber, parseStyleProps, parseThemeColor, px, rem, resolveClassNames, resolveStyles, responsiveStyleManager, rgb, rgba, stylesToString, toRgba, useCckClassNamesPrefix, useCckColorScheme, useCckCssVariablesResolver, useCckEnv, useCckIsHeadless, useCckStyleNonce, useCckStylesTransform, useCckSxTransform, useCckTheme, useCckWithStaticClasses, useComponentProps, useConfigContext, useProviderColorScheme, useRandomClassName, useStyles, virtualColor, withClasses, withExtend, withInstall, withPropsDefaultSetter, withPropsFactory, withVarsResolver };
136
138
 
137
139
  //# sourceMappingURL=index.mjs.map
package/esm/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\n UnstyledButton,\n} from './components'\nimport { CckConfigProvider, CBox } from './core'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\n\nconst components = [\n CckConfigProvider,\n CBox,\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\n UnstyledButton,\n]\n\nconst CckUI: Plugin = {\n install(app: App) {\n if ((app as any)[INSTALLED_KEY]) {\n return\n }\n ;(app as any)[INSTALLED_KEY] = true\n components.forEach((c) => {\n if (c.name) {\n app.component(c.name, c)\n }\n })\n },\n}\n\nexport default CckUI\nexport { CckUI }\n\nexport * from './components'\nexport * from './core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAgB,EACpB,QAAQ,KAAU;CAChB,IAAK,IAAY,gBACf;CAED,IAAa,iBAAiB;CAC/B,WAAW,SAAS,MAAM;EACxB,IAAI,EAAE,MACJ,IAAI,UAAU,EAAE,MAAM,CAAC;CAE3B,CAAC;AACH,EACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CDivider,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\n UnstyledButton,\n} from './components'\nimport { CckConfigProvider, CBox } from './core'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\n\nconst components = [\n CckConfigProvider,\n CBox,\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CDivider,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\n UnstyledButton,\n]\n\nconst CckUI: Plugin = {\n install(app: App) {\n if ((app as any)[INSTALLED_KEY]) {\n return\n }\n ;(app as any)[INSTALLED_KEY] = true\n components.forEach((c) => {\n if (c.name) {\n app.component(c.name, c)\n }\n })\n },\n}\n\nexport default CckUI\nexport { CckUI }\n\nexport * from './components'\nexport * from './core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAgB,EACpB,QAAQ,KAAU;CAChB,IAAK,IAAY,gBACf;CAED,IAAa,iBAAiB;CAC/B,WAAW,SAAS,MAAM;EACxB,IAAI,EAAE,MACJ,IAAI,UAAU,EAAE,MAAM,CAAC;CAE3B,CAAC;AACH,EACF"}
@@ -0,0 +1,28 @@
1
+ import { BoxProps, CColor, CSize, ElementProps, Factory, StylesApiProps } from '../../core';
2
+ export type DividerStylesNames = 'root' | 'label';
3
+ export type DividerVariant = 'solid' | 'dashed' | 'dotted';
4
+ export type DividerCssVariables = {
5
+ root: '--divider-color' | '--divider-border-style' | '--divider-size';
6
+ };
7
+ export interface DividerProps extends BoxProps, StylesApiProps<DividerFactory>, /* @vue-ignore */ ElementProps<'div'> {
8
+ /** Key of `theme.colors` or any valid CSS color value */
9
+ color?: CColor;
10
+ /**
11
+ * Controls width/height (depends on orientation)
12
+ * @default 'xs'
13
+ */
14
+ size?: CSize | number | (string & {});
15
+ /**
16
+ * label position
17
+ * @default 'center'
18
+ */
19
+ labelPosition?: 'left' | 'center' | 'right';
20
+ orientation?: 'horizontal' | 'vertical';
21
+ }
22
+ export type DividerFactory = Factory<{
23
+ props: DividerProps;
24
+ ref: HTMLDivElement;
25
+ stylesNames: DividerStylesNames;
26
+ vars: DividerCssVariables;
27
+ variant: DividerVariant;
28
+ }>;
@@ -0,0 +1,7 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./divider.types").DividerProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./divider.types").DividerStylesNames;
5
+ vars: import("./divider.types").DividerCssVariables;
6
+ variant: import("./divider.types").DividerVariant;
7
+ }>;
@@ -0,0 +1,6 @@
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
+ import classes from './divider.module.css';
3
+ import Divider from './divider.vue';
4
+ export declare const CDivider: SFCWithInstallAndClasses<typeof Divider, typeof classes>;
5
+ export default CDivider;
6
+ export * from './divider.types';
@@ -6,6 +6,7 @@ export * from './center';
6
6
  export * from './close-button';
7
7
  export * from './container';
8
8
  export * from './copy-button';
9
+ export * from './divider';
9
10
  export * from './empty-state';
10
11
  export * from './file-button';
11
12
  export * from './flex';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Vue component library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://cck-ui.jackatlas.xyz",
6
6
  "license": "ISC",
@@ -0,0 +1,62 @@
1
+ .m_35209716 {
2
+ --divider-size-xs: calc(0.0625rem * var(--c-scale));
3
+ --divider-size-sm: calc(0.125rem * var(--c-scale));
4
+ --divider-size-md: calc(0.1875rem * var(--c-scale));
5
+ --divider-size-lg: calc(0.25rem * var(--c-scale));
6
+ --divider-size-xl: calc(0.3125rem * var(--c-scale));
7
+ --divider-size: var(--divider-size-xs);
8
+ }
9
+
10
+ :where([data-c-color-scheme='light']) .m_35209716 {
11
+ --divider-color: var(--c-color-gray-3);
12
+ }
13
+
14
+ :where([data-c-color-scheme='dark']) .m_35209716 {
15
+ --divider-color: var(--c-color-dark-4);
16
+ }
17
+
18
+ .m_35209716:where([data-orientation='horizontal']) {
19
+ border-top: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);
20
+ }
21
+
22
+ .m_35209716:where([data-orientation='vertical']) {
23
+ border-inline-start: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);
24
+ height: auto;
25
+ align-self: stretch;
26
+ }
27
+
28
+ .m_35209716:where([data-with-label]) {
29
+ border: 0;
30
+ }
31
+
32
+ .m_6e972f40 {
33
+ display: flex;
34
+ align-items: center;
35
+ font-size: var(--c-font-size-xs);
36
+ color: var(--c-color-dimmed);
37
+ white-space: nowrap;
38
+ }
39
+
40
+ .m_6e972f40:where([data-position='left'])::before {
41
+ display: none;
42
+ }
43
+
44
+ .m_6e972f40:where([data-position='right'])::after {
45
+ display: none;
46
+ }
47
+
48
+ .m_6e972f40::before {
49
+ content: '';
50
+ flex: 1;
51
+ height: calc(0.0625rem * var(--c-scale));
52
+ border-top: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);
53
+ margin-inline-end: var(--c-spacing-xs);
54
+ }
55
+
56
+ .m_6e972f40::after {
57
+ content: '';
58
+ flex: 1;
59
+ height: calc(0.0625rem * var(--c-scale));
60
+ border-top: var(--divider-size) var(--divider-border-style, solid) var(--divider-color);
61
+ margin-inline-start: var(--c-spacing-xs);
62
+ }