@cck-ui/core 0.25.0 → 0.27.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.
Files changed (56) hide show
  1. package/cjs/components/anchor/anchor.cjs +430 -0
  2. package/cjs/components/anchor/anchor.cjs.map +1 -0
  3. package/cjs/components/anchor/anchor.module.cjs +7 -0
  4. package/cjs/components/anchor/anchor.module.cjs.map +1 -0
  5. package/cjs/components/anchor/index.cjs +13 -0
  6. package/cjs/components/anchor/index.cjs.map +1 -0
  7. package/cjs/components/breadcrumbs/breadcrumbs.cjs +445 -0
  8. package/cjs/components/breadcrumbs/breadcrumbs.cjs.map +1 -0
  9. package/cjs/components/breadcrumbs/breadcrumbs.module.cjs +11 -0
  10. package/cjs/components/breadcrumbs/breadcrumbs.module.cjs.map +1 -0
  11. package/cjs/components/breadcrumbs/breadcrumbs.utils.cjs +8 -0
  12. package/cjs/components/breadcrumbs/breadcrumbs.utils.cjs.map +1 -0
  13. package/cjs/components/breadcrumbs/filter-falsy-children/filter-falsy-children.cjs +17 -0
  14. package/cjs/components/breadcrumbs/filter-falsy-children/filter-falsy-children.cjs.map +1 -0
  15. package/cjs/components/breadcrumbs/index.cjs +14 -0
  16. package/cjs/components/breadcrumbs/index.cjs.map +1 -0
  17. package/cjs/components/group/group.cjs +14 -11
  18. package/cjs/components/group/group.cjs.map +1 -1
  19. package/cjs/components/text/text.cjs.map +1 -1
  20. package/cjs/index.cjs +94 -88
  21. package/cjs/index.cjs.map +1 -1
  22. package/esm/components/anchor/anchor.mjs +428 -0
  23. package/esm/components/anchor/anchor.mjs.map +1 -0
  24. package/esm/components/anchor/anchor.module.mjs +7 -0
  25. package/esm/components/anchor/anchor.module.mjs.map +1 -0
  26. package/esm/components/anchor/index.mjs +10 -0
  27. package/esm/components/anchor/index.mjs.map +1 -0
  28. package/esm/components/breadcrumbs/breadcrumbs.mjs +443 -0
  29. package/esm/components/breadcrumbs/breadcrumbs.mjs.map +1 -0
  30. package/esm/components/breadcrumbs/breadcrumbs.module.mjs +11 -0
  31. package/esm/components/breadcrumbs/breadcrumbs.module.mjs.map +1 -0
  32. package/esm/components/breadcrumbs/breadcrumbs.utils.mjs +9 -0
  33. package/esm/components/breadcrumbs/breadcrumbs.utils.mjs.map +1 -0
  34. package/esm/components/breadcrumbs/filter-falsy-children/filter-falsy-children.mjs +17 -0
  35. package/esm/components/breadcrumbs/filter-falsy-children/filter-falsy-children.mjs.map +1 -0
  36. package/esm/components/breadcrumbs/index.mjs +11 -0
  37. package/esm/components/breadcrumbs/index.mjs.map +1 -0
  38. package/esm/components/group/group.mjs +15 -12
  39. package/esm/components/group/group.mjs.map +1 -1
  40. package/esm/components/text/text.mjs.map +1 -1
  41. package/esm/index.mjs +6 -2
  42. package/esm/index.mjs.map +1 -1
  43. package/lib/components/anchor/anchor.types.d.ts +16 -0
  44. package/lib/components/anchor/index.d.ts +6 -0
  45. package/lib/components/breadcrumbs/breadcrumbs.types.d.ts +25 -0
  46. package/lib/components/breadcrumbs/breadcrumbs.utils.d.ts +6 -0
  47. package/lib/components/breadcrumbs/filter-falsy-children/filter-falsy-children.d.ts +2 -0
  48. package/lib/components/breadcrumbs/index.d.ts +6 -0
  49. package/lib/components/index.d.ts +2 -0
  50. package/package.json +1 -1
  51. package/styles/anchor.css +56 -0
  52. package/styles/anchor.layer.css +57 -0
  53. package/styles/breadcrumbs.css +27 -0
  54. package/styles/breadcrumbs.layer.css +28 -0
  55. package/styles.css +137 -52
  56. package/styles.layer.css +137 -52
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withClasses, withExtend, withPropsFactory } from "../../core/utils/vue/statics.mjs";
4
+ import anchor_module_default from "./anchor.module.mjs";
5
+ import anchor_default from "./anchor.mjs";
6
+ const CAnchor = withInstall(withPropsFactory(withExtend(withClasses(anchor_default, anchor_module_default))));
7
+ //#endregion
8
+ export { CAnchor, CAnchor as default };
9
+
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Anchor","classes"],"sources":["../../../src/components/anchor/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n} from '../../core'\n\nimport classes from './anchor.module.css'\nimport Anchor from './anchor.vue'\n\nconst AnchorWithStatic = withPropsFactory(withExtend(withClasses(Anchor, classes)))\n\nexport const CAnchor: SFCWithInstallAndClasses<typeof Anchor, typeof classes> =\n withInstall(AnchorWithStatic)\n\nexport default CAnchor\n\nexport * from './anchor.types'\n"],"mappings":";;;;;AAaA,MAAa,UACX,YAHuB,iBAAiB,WAAW,YAAYA,gBAAQC,qBAAO,CAAC,CAGnE,CAAgB"}
@@ -0,0 +1,443 @@
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 { varsResolver } from "./breadcrumbs.utils.mjs";
7
+ import breadcrumbs_module_default from "./breadcrumbs.module.mjs";
8
+ import { filterFalsyChildren } from "./filter-falsy-children/filter-falsy-children.mjs";
9
+ import { Fragment, computed, createBlock, createElementBlock, defineComponent, h, mergeProps, openBlock, ref, renderList, resolveDynamicComponent, useAttrs, useSlots, withCtx } from "vue";
10
+ import cx from "clsx";
11
+ //#region packages/@cck-ui/core/src/components/breadcrumbs/breadcrumbs.vue
12
+ const _sfc_main = /*@__PURE__*/ defineComponent({
13
+ name: "CBreadcrumbs",
14
+ __name: "breadcrumbs",
15
+ props: {
16
+ separator: {
17
+ type: [
18
+ String,
19
+ Object,
20
+ Function
21
+ ],
22
+ required: false
23
+ },
24
+ separatorMargin: {
25
+ type: null,
26
+ required: false
27
+ },
28
+ className: {
29
+ type: String,
30
+ required: false
31
+ },
32
+ style: {
33
+ type: [
34
+ Object,
35
+ Function,
36
+ Array
37
+ ],
38
+ required: false,
39
+ skipCheck: true
40
+ },
41
+ __vars: {
42
+ type: null,
43
+ required: false
44
+ },
45
+ __size: {
46
+ type: String,
47
+ required: false
48
+ },
49
+ hiddenFrom: {
50
+ type: null,
51
+ required: false
52
+ },
53
+ visibleFrom: {
54
+ type: null,
55
+ required: false
56
+ },
57
+ lightHidden: {
58
+ type: Boolean,
59
+ required: false
60
+ },
61
+ darkHidden: {
62
+ type: Boolean,
63
+ required: false
64
+ },
65
+ mod: {
66
+ type: [
67
+ Object,
68
+ String,
69
+ Array
70
+ ],
71
+ required: false
72
+ },
73
+ m: {
74
+ type: null,
75
+ required: false
76
+ },
77
+ my: {
78
+ type: null,
79
+ required: false
80
+ },
81
+ mx: {
82
+ type: null,
83
+ required: false
84
+ },
85
+ mt: {
86
+ type: null,
87
+ required: false
88
+ },
89
+ mb: {
90
+ type: null,
91
+ required: false
92
+ },
93
+ ms: {
94
+ type: null,
95
+ required: false
96
+ },
97
+ me: {
98
+ type: null,
99
+ required: false
100
+ },
101
+ mis: {
102
+ type: null,
103
+ required: false
104
+ },
105
+ mie: {
106
+ type: null,
107
+ required: false
108
+ },
109
+ ml: {
110
+ type: null,
111
+ required: false
112
+ },
113
+ mr: {
114
+ type: null,
115
+ required: false
116
+ },
117
+ p: {
118
+ type: null,
119
+ required: false
120
+ },
121
+ py: {
122
+ type: null,
123
+ required: false
124
+ },
125
+ px: {
126
+ type: null,
127
+ required: false
128
+ },
129
+ pt: {
130
+ type: null,
131
+ required: false
132
+ },
133
+ pb: {
134
+ type: null,
135
+ required: false
136
+ },
137
+ ps: {
138
+ type: null,
139
+ required: false
140
+ },
141
+ pe: {
142
+ type: null,
143
+ required: false
144
+ },
145
+ pis: {
146
+ type: null,
147
+ required: false
148
+ },
149
+ pie: {
150
+ type: null,
151
+ required: false
152
+ },
153
+ pl: {
154
+ type: null,
155
+ required: false
156
+ },
157
+ pr: {
158
+ type: null,
159
+ required: false
160
+ },
161
+ bd: {
162
+ type: null,
163
+ required: false
164
+ },
165
+ bdrs: {
166
+ type: null,
167
+ required: false
168
+ },
169
+ bg: {
170
+ type: null,
171
+ required: false
172
+ },
173
+ c: {
174
+ type: null,
175
+ required: false
176
+ },
177
+ opacity: {
178
+ type: [
179
+ String,
180
+ Object,
181
+ Number
182
+ ],
183
+ required: false
184
+ },
185
+ ff: {
186
+ type: [String, Object],
187
+ required: false
188
+ },
189
+ fz: {
190
+ type: null,
191
+ required: false
192
+ },
193
+ fw: {
194
+ type: null,
195
+ required: false
196
+ },
197
+ lts: {
198
+ type: null,
199
+ required: false
200
+ },
201
+ ta: {
202
+ type: [String, Object],
203
+ required: false
204
+ },
205
+ lh: {
206
+ type: null,
207
+ required: false
208
+ },
209
+ fs: {
210
+ type: null,
211
+ required: false
212
+ },
213
+ tt: {
214
+ type: [String, Object],
215
+ required: false
216
+ },
217
+ td: {
218
+ type: null,
219
+ required: false
220
+ },
221
+ w: {
222
+ type: null,
223
+ required: false
224
+ },
225
+ miw: {
226
+ type: null,
227
+ required: false
228
+ },
229
+ maw: {
230
+ type: null,
231
+ required: false
232
+ },
233
+ h: {
234
+ type: null,
235
+ required: false
236
+ },
237
+ mih: {
238
+ type: null,
239
+ required: false
240
+ },
241
+ mah: {
242
+ type: null,
243
+ required: false
244
+ },
245
+ bgsz: {
246
+ type: null,
247
+ required: false
248
+ },
249
+ bgp: {
250
+ type: null,
251
+ required: false
252
+ },
253
+ bgr: {
254
+ type: null,
255
+ required: false
256
+ },
257
+ bga: {
258
+ type: null,
259
+ required: false
260
+ },
261
+ pos: {
262
+ type: [String, Object],
263
+ required: false
264
+ },
265
+ top: {
266
+ type: null,
267
+ required: false
268
+ },
269
+ left: {
270
+ type: null,
271
+ required: false
272
+ },
273
+ bottom: {
274
+ type: null,
275
+ required: false
276
+ },
277
+ right: {
278
+ type: null,
279
+ required: false
280
+ },
281
+ inset: {
282
+ type: null,
283
+ required: false
284
+ },
285
+ display: {
286
+ type: null,
287
+ required: false
288
+ },
289
+ flex: {
290
+ type: null,
291
+ required: false
292
+ },
293
+ unstyled: {
294
+ type: Boolean,
295
+ required: false
296
+ },
297
+ variant: {
298
+ type: null,
299
+ required: false
300
+ },
301
+ classNames: {
302
+ type: null,
303
+ required: false
304
+ },
305
+ styles: {
306
+ type: null,
307
+ required: false
308
+ },
309
+ vars: {
310
+ type: Function,
311
+ required: false
312
+ },
313
+ attributes: {
314
+ type: null,
315
+ required: false
316
+ }
317
+ },
318
+ setup(__props, { expose: __expose }) {
319
+ const _root = ref(null);
320
+ const attrs = useAttrs();
321
+ const slots = useSlots();
322
+ const defaultProps = { separator: "/" };
323
+ const rawProps = __props;
324
+ const props = useComponentProps({
325
+ component: "CBreadcrumbs",
326
+ defaultProps,
327
+ props: rawProps
328
+ });
329
+ const knownProps = [
330
+ "classNames",
331
+ "className",
332
+ "style",
333
+ "styles",
334
+ "unstyled",
335
+ "vars",
336
+ "separator",
337
+ "separatorMargin",
338
+ "attributes"
339
+ ];
340
+ const styleProps = computed(() => ({
341
+ ...props.value,
342
+ ...attrs,
343
+ style: attrs.style ?? props.value.style
344
+ }));
345
+ const getStyles = useStyles({
346
+ name: "Breadcrumbs",
347
+ props: styleProps,
348
+ classes: breadcrumbs_module_default,
349
+ className: () => props.value.className,
350
+ style: () => props.value.style,
351
+ classNames: props.value.classNames,
352
+ styles: props.value.styles,
353
+ unstyled: props.value.unstyled,
354
+ attributes: props.value.attributes,
355
+ vars: props.value.vars,
356
+ varsResolver
357
+ });
358
+ const rootAttrs = computed(() => getStyles("root"));
359
+ const mergedRootAttrs = computed(() => {
360
+ const others = {};
361
+ const propsValue = props.value;
362
+ Object.keys(propsValue).forEach((key) => {
363
+ if (!knownProps.includes(key)) others[key] = propsValue[key];
364
+ });
365
+ const userMod = props.value.mod;
366
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
367
+ return {
368
+ ...others,
369
+ mod: mergedMod,
370
+ ...rootAttrs.value
371
+ };
372
+ });
373
+ const items = computed(() => {
374
+ const children = filterFalsyChildren(slots.default?.());
375
+ const separatorSlot = slots.separator;
376
+ const result = [];
377
+ children.forEach((child, index) => {
378
+ const childProps = child.props || {};
379
+ const { className: bcClass, style: bcStyle, ...rest } = getStyles("breadcrumb", { className: childProps.className });
380
+ const mergedClass = cx(bcClass, childProps.class, childProps.className);
381
+ const mergedStyle = [bcStyle, childProps.style].filter(Boolean);
382
+ const breadcrumbNode = h(child, {
383
+ ...rest,
384
+ class: mergedClass,
385
+ style: mergedStyle,
386
+ key: child.key ?? `breadcrumb-${index}`
387
+ }, child.children ?? []);
388
+ result.push(breadcrumbNode);
389
+ if (index !== children.length - 1) {
390
+ const { className: sepClass, style: sepStyle, ...sepRest } = getStyles("separator");
391
+ let separatorContent;
392
+ if (separatorSlot) separatorContent = separatorSlot();
393
+ else if (typeof props.value.separator === "function") separatorContent = props.value.separator(child, index, children.length);
394
+ else separatorContent = props.value.separator;
395
+ const separatorNode = h(CBox, {
396
+ ...sepRest,
397
+ class: sepClass,
398
+ style: sepStyle,
399
+ key: `separator-${index}`
400
+ }, { default: () => separatorContent });
401
+ result.push(separatorNode);
402
+ }
403
+ });
404
+ return result;
405
+ });
406
+ __expose({ root: computed(() => _root.value?.root ?? null) });
407
+ const __returned__ = {
408
+ _root,
409
+ attrs,
410
+ slots,
411
+ defaultProps,
412
+ rawProps,
413
+ props,
414
+ knownProps,
415
+ styleProps,
416
+ getStyles,
417
+ rootAttrs,
418
+ mergedRootAttrs,
419
+ items,
420
+ get CBox() {
421
+ return CBox;
422
+ }
423
+ };
424
+ Object.defineProperty(__returned__, "__isScriptSetup", {
425
+ enumerable: false,
426
+ value: true
427
+ });
428
+ return __returned__;
429
+ }
430
+ });
431
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
432
+ return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedRootAttrs), {
433
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList($setup.items, (item, idx) => {
434
+ return openBlock(), createBlock(resolveDynamicComponent(item), { key: item.key ?? idx });
435
+ }), 128))]),
436
+ _: 1
437
+ }, 16);
438
+ }
439
+ var breadcrumbs_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/breadcrumbs/breadcrumbs.vue"]]);
440
+ //#endregion
441
+ export { breadcrumbs_default as default };
442
+
443
+ //# sourceMappingURL=breadcrumbs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.mjs","names":[],"sources":["../../../src/components/breadcrumbs/breadcrumbs.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <template v-for=\"(item, idx) in items\" :key=\"item.key ?? idx\">\n <component :is=\"item\" />\n </template>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, h, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { BreadcrumbsFactory, BreadcrumbsProps, SeparatorRenderer } from './breadcrumbs.types'\nimport classes from './breadcrumbs.module.css'\nimport { varsResolver } from './breadcrumbs.utils'\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children'\nimport clsx from 'clsx'\n\ndefineOptions({\n name: 'CBreadcrumbs',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst defaultProps = {\n separator: '/',\n} satisfies Partial<BreadcrumbsProps>\n\nconst rawProps = defineProps<BreadcrumbsProps>()\n\nconst props = useComponentProps({\n component: 'CBreadcrumbs',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'separator',\n 'separatorMargin',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<BreadcrumbsFactory>({\n name: 'Breadcrumbs',\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 mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\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 = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst items = computed(() => {\n const children = filterFalsyChildren(slots.default?.())\n const separatorSlot = slots.separator\n const result: any[] = []\n\n children.forEach((child, index) => {\n const childProps = child.props || {}\n const breadcrumbStyles = getStyles('breadcrumb', {\n className: childProps.className,\n })\n const { className: bcClass, style: bcStyle, ...rest } = breadcrumbStyles\n\n const mergedClass = clsx(bcClass, childProps.class, childProps.className)\n\n const mergedStyle = [bcStyle, childProps.style].filter(Boolean)\n\n const breadcrumbNode = h(\n child,\n { ...rest, class: mergedClass, style: mergedStyle, key: child.key ?? `breadcrumb-${index}` },\n child.children ?? []\n )\n result.push(breadcrumbNode)\n\n if (index !== children.length - 1) {\n const separatorStyles = getStyles('separator')\n const { className: sepClass, style: sepStyle, ...sepRest } = separatorStyles\n\n let separatorContent\n if (separatorSlot) {\n separatorContent = separatorSlot()\n } else if (typeof props.value.separator === 'function') {\n separatorContent = (props.value.separator as SeparatorRenderer)(\n child,\n index,\n children.length\n )\n } else {\n separatorContent = props.value.separator\n }\n\n const separatorNode = h(\n CBox,\n { ...sepRest, class: sepClass, style: sepStyle, key: `separator-${index}` } as any,\n { default: () => separatorContent }\n )\n result.push(separatorNode)\n }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E,EAAE,eAAe,iBAAiB,CACpC;KACA,OAAO,KAAK,aAAa;IAC3B;GACF,CAAC;GACD,OAAO;EACT,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;qBAzIC,YAIQ,OAAA,SAJR,WAIQ,EAJD,KAAI,QAAO,GAAS,OAAA,eAAe,GAAA;yBACF,EAAA,UAAA,IAAA,GAAtC,mBAEW,UAAA,MAAA,WAFqB,OAAA,QAAd,MAAM,QAAG;uBACzB,YAAwB,wBAAR,IAAI,GAAA,EAAA,KADuB,KAAK,OAAO,IAAA,CAAA"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/breadcrumbs/breadcrumbs.module.css
3
+ var breadcrumbs_module_default = {
4
+ "root": "m_bd72d3bf",
5
+ "breadcrumb": "m_c7302920",
6
+ "separator": "m_ceadd228"
7
+ };
8
+ //#endregion
9
+ export { breadcrumbs_module_default as default };
10
+
11
+ //# sourceMappingURL=breadcrumbs.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.module.mjs","names":[],"sources":["../../../src/components/breadcrumbs/breadcrumbs.module.css"],"sourcesContent":[".root {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.breadcrumb {\n line-height: 1;\n word-spacing: nowrap;\n -webkit-tap-highlight-color: transparent;\n}\n\n.separator {\n margin-inline: var(--bc-separator-margin, var(--c-spacing-xs));\n line-height: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @mixin where-light {\n color: var(--c-color-gray-7);\n }\n\n @mixin where-dark {\n color: var(--c-color-dark-2);\n }\n}\n"],"mappings":";;AAAA,IAAA,6BAAe;CAAC,QAAO;CAAa,cAAa;CAAa,aAAY;AAAY"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { getSpacing } from "../../core/utils/get-size/get-size.mjs";
3
+ import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
4
+ //#region packages/@cck-ui/core/src/components/breadcrumbs/breadcrumbs.utils.ts
5
+ const varsResolver = createVarsResolver((_, { separatorMargin }) => ({ root: { "--bc-separator-margin": getSpacing(separatorMargin) } }));
6
+ //#endregion
7
+ export { varsResolver };
8
+
9
+ //# sourceMappingURL=breadcrumbs.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.utils.mjs","names":[],"sources":["../../../src/components/breadcrumbs/breadcrumbs.utils.ts"],"sourcesContent":["import { createVarsResolver, getSpacing } from '../../core'\nimport { BreadcrumbsFactory } from './breadcrumbs.types'\n\nexport const varsResolver = createVarsResolver<BreadcrumbsFactory>((_, { separatorMargin }) => ({\n root: {\n '--bc-separator-margin': getSpacing(separatorMargin),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAAwC,GAAG,EAAE,uBAAuB,EAC9F,MAAM,EACJ,yBAAyB,WAAW,eAAe,EACrD,EACF,EAAE"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { Fragment, isVNode } from "vue";
3
+ //#region packages/@cck-ui/core/src/components/breadcrumbs/filter-falsy-children/filter-falsy-children.ts
4
+ function filterFalsyChildren(children) {
5
+ const nodes = Array.isArray(children) ? children : children ? [children] : [];
6
+ function process(node) {
7
+ if (Array.isArray(node)) return node.flatMap((item) => process(item));
8
+ if (!isVNode(node)) return [];
9
+ if (node.type === Fragment) return process(Array.isArray(node.children) ? node.children : node.children ? [node.children] : []);
10
+ return [node];
11
+ }
12
+ return process(nodes);
13
+ }
14
+ //#endregion
15
+ export { filterFalsyChildren };
16
+
17
+ //# sourceMappingURL=filter-falsy-children.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-falsy-children.mjs","names":[],"sources":["../../../../src/components/breadcrumbs/filter-falsy-children/filter-falsy-children.ts"],"sourcesContent":["import { Fragment, isVNode, VNode } from 'vue'\n\nexport function filterFalsyChildren(children: unknown): VNode[] {\n const nodes = Array.isArray(children) ? children : children ? [children] : []\n\n function process(node: unknown): VNode[] {\n if (Array.isArray(node)) {\n return node.flatMap((item) => process(item))\n }\n\n if (!isVNode(node)) {\n return []\n }\n\n if (node.type === Fragment) {\n const childNodes = Array.isArray(node.children)\n ? node.children\n : node.children\n ? [node.children]\n : []\n return process(childNodes)\n }\n\n return [node]\n }\n\n return process(nodes)\n}\n"],"mappings":";;;AAEA,SAAgB,oBAAoB,UAA4B;CAC9D,MAAM,QAAQ,MAAM,QAAQ,QAAQ,IAAI,WAAW,WAAW,CAAC,QAAQ,IAAI,CAAC;CAE5E,SAAS,QAAQ,MAAwB;EACvC,IAAI,MAAM,QAAQ,IAAI,GACpB,OAAO,KAAK,SAAS,SAAS,QAAQ,IAAI,CAAC;EAG7C,IAAI,CAAC,QAAQ,IAAI,GACf,OAAO,CAAC;EAGV,IAAI,KAAK,SAAS,UAMhB,OAAO,QALY,MAAM,QAAQ,KAAK,QAAQ,IAC1C,KAAK,WACL,KAAK,WACH,CAAC,KAAK,QAAQ,IACd,CAAC,CACkB;EAG3B,OAAO,CAAC,IAAI;CACd;CAEA,OAAO,QAAQ,KAAK;AACtB"}
@@ -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 { varsResolver } from "./breadcrumbs.utils.mjs";
5
+ import breadcrumbs_module_default from "./breadcrumbs.module.mjs";
6
+ import breadcrumbs_default from "./breadcrumbs.mjs";
7
+ const CBreadcrumbs = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(breadcrumbs_default, breadcrumbs_module_default), varsResolver))));
8
+ //#endregion
9
+ export { CBreadcrumbs, CBreadcrumbs as default };
10
+
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Breadcrumbs","classes"],"sources":["../../../src/components/breadcrumbs/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport { varsResolver } from './breadcrumbs.utils'\nimport Breadcrumbs from './breadcrumbs.vue'\nimport classes from './breadcrumbs.module.css'\n\nconst BreadcrumbsWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Breadcrumbs, classes), varsResolver))\n)\n\nexport const CBreadcrumbs: SFCWithInstallAndClasses<typeof Breadcrumbs, typeof classes> =\n withInstall(BreadcrumbsWithStatic)\n\nexport default CBreadcrumbs\n\nexport * from './breadcrumbs.types'\n"],"mappings":";;;;;;AAgBA,MAAa,eACX,YAL4B,iBAC5B,WAAW,iBAAiB,YAAYA,qBAAaC,0BAAO,GAAG,YAAY,CAAC,CAIhE,CAAqB"}
@@ -7,7 +7,7 @@ import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
7
7
  import { filterFalsyChildren } from "./filter-falsy-children/filter-falsy-children.mjs";
8
8
  import group_module_default from "./group.module.mjs";
9
9
  import { varsResolver } from "./group.utils.mjs";
10
- import { computed, createBlock, createCommentVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, useSlots, withCtx } from "vue";
10
+ import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock, ref, renderList, resolveDynamicComponent, useAttrs, useSlots, withCtx } from "vue";
11
11
  //#region packages/@cck-ui/core/src/components/group/group.vue
12
12
  const _sfc_main = /*@__PURE__*/ defineComponent({
13
13
  name: "CGroup",
@@ -361,11 +361,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
361
361
  "mod",
362
362
  "attributes"
363
363
  ];
364
- const filteredChildren = filterFalsyChildren(slots.default?.());
365
- const childrenCount = filteredChildren.length;
366
- const resolvedGap = getSpacing(props.value.gap);
367
- const childWidth = `calc(${100 / childrenCount}% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))`;
368
- const stylesCtx = { childWidth };
364
+ const filteredChildren = computed(() => filterFalsyChildren(slots.default?.()));
365
+ const childrenCount = computed(() => filteredChildren.value.length);
366
+ const resolvedGap = computed(() => getSpacing(props.value.gap));
367
+ const childWidth = computed(() => {
368
+ const count = childrenCount.value;
369
+ const gap = resolvedGap.value;
370
+ if (count === 0) return "auto";
371
+ return `calc(${100 / count}% - (${gap} - ${gap} / ${count}))`;
372
+ });
373
+ const stylesCtx = computed(() => ({ childWidth: childWidth.value }));
369
374
  const styleProps = computed(() => ({
370
375
  ...props.value,
371
376
  ...attrs,
@@ -435,12 +440,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
435
440
  size: $props.__size,
436
441
  variant: $props.variant
437
442
  }), {
438
- default: withCtx(() => [
439
- createCommentVNode(" TODO: filter falsy children "),
440
- createCommentVNode(" <component v-for=\"(node, index) in filteredChildren\" :key=\"node.key || index\" :is=\"node\" /> "),
441
- renderSlot(_ctx.$slots, "default")
442
- ]),
443
- _: 3
443
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList($setup.filteredChildren, (node, index) => {
444
+ return openBlock(), createBlock(resolveDynamicComponent(node), { key: node.key || index });
445
+ }), 128))]),
446
+ _: 1
444
447
  }, 16, ["size", "variant"]);
445
448
  }
446
449
  var group_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/group/group.vue"]]);
@@ -1 +1 @@
1
- {"version":3,"file":"group.mjs","names":[],"sources":["../../../src/components/group/group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\" :size=\"__size\" :variant=\"variant\">\n <!-- TODO: filter falsy children -->\n <!-- <component v-for=\"(node, index) in filteredChildren\" :key=\"node.key || index\" :is=\"node\" /> -->\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport type { GroupFactory, GroupProps, GroupStylesCtx } from './group.types'\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children'\nimport { getSpacing, useStyles, CBox, useComponentProps, CStyleProp } from '../../core'\nimport classes from './group.module.css'\nimport { varsResolver } from './group.utils'\n\ndefineOptions({\n name: 'CGroup',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<GroupProps>()\n\nconst props = useComponentProps({\n component: 'CGroup',\n defaultProps: {\n preventGrowOverflow: true,\n gap: 'md',\n align: 'center',\n justify: 'flex-start',\n wrap: 'wrap',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'gap',\n 'align',\n 'justify',\n 'wrap',\n 'grow',\n 'preventGrowOverflow',\n 'vars',\n 'variant',\n '__size',\n 'mod',\n 'attributes',\n]\n\nconst filteredChildren = filterFalsyChildren(slots.default?.())\nconst childrenCount = filteredChildren.length\nconst resolvedGap = getSpacing(props.value.gap)\nconst childWidth = `calc(${100 / childrenCount}% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))`\n\nconst stylesCtx: GroupStylesCtx = { childWidth }\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<GroupFactory>({\n name: 'Group',\n props: styleProps,\n stylesCtx,\n className: () => props.value.className,\n style: () => props.value.style,\n classes,\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 modList = computed(() => [{ grow: props.value.grow }])\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\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 ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EACvB,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc;IACZ,qBAAqB;IACrB,KAAK;IACL,OAAO;IACP,SAAS;IACT,MAAM;GACR;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,mBAAmB,oBAAoB,MAAM,UAAU,CAAC;EAC9D,MAAM,gBAAgB,iBAAiB;EACvC,MAAM,cAAc,WAAW,MAAM,MAAM,GAAG;EAC9C,MAAM,aAAa,QAAQ,MAAM,cAAc,OAAO,YAAY,KAAK,YAAY,KAAK,cAAc;EAEtG,MAAM,YAA4B,EAAE,WAAW;EAE/C,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAwB;GACxC,MAAM;GACN,OAAO;GACP;GACA,iBAAiB,MAAM,MAAM;GAC7B,aAAa,MAAM,MAAM;GACzB,SAAA;GACA,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,UAAU,eAAe,CAAC,EAAE,MAAM,MAAM,MAAM,KAAK,CAAC,CAAC;EAE3D,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;IACvC,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAE7B,CAAC;GACD,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA3GC,YAIQ,OAAA,SAJR,WAIQ,EAJD,KAAI,QAAO,GAAS,OAAA,aAAW;EAAG,MAAM,OAAA;EAAS,SAAS,OAAA;;yBAC3B;GAApC,mBAAA,+BAAA;GACA,mBAAA,qGAAA;GACA,WAAQ,KAAA,QAAA,SAAA"}
1
+ {"version":3,"file":"group.mjs","names":[],"sources":["../../../src/components/group/group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\" :size=\"__size\" :variant=\"variant\">\n <component v-for=\"(node, index) in filteredChildren\" :key=\"node.key || index\" :is=\"node\" />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport type { GroupFactory, GroupProps, GroupStylesCtx } from './group.types'\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children'\nimport { getSpacing, useStyles, CBox, useComponentProps, CStyleProp } from '../../core'\nimport classes from './group.module.css'\nimport { varsResolver } from './group.utils'\n\ndefineOptions({\n name: 'CGroup',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<GroupProps>()\n\nconst props = useComponentProps({\n component: 'CGroup',\n defaultProps: {\n preventGrowOverflow: true,\n gap: 'md',\n align: 'center',\n justify: 'flex-start',\n wrap: 'wrap',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'gap',\n 'align',\n 'justify',\n 'wrap',\n 'grow',\n 'preventGrowOverflow',\n 'vars',\n 'variant',\n '__size',\n 'mod',\n 'attributes',\n]\n\nconst filteredChildren = computed(() => filterFalsyChildren(slots.default?.()))\nconst childrenCount = computed(() => filteredChildren.value.length)\nconst resolvedGap = computed(() => getSpacing(props.value.gap))\n\nconst childWidth = computed(() => {\n const count = childrenCount.value\n const gap = resolvedGap.value\n if (count === 0) {\n return 'auto'\n }\n return `calc(${100 / count}% - (${gap} - ${gap} / ${count}))`\n})\n\nconst stylesCtx = computed<GroupStylesCtx>(() => ({\n childWidth: childWidth.value,\n}))\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<GroupFactory>({\n name: 'Group',\n props: styleProps,\n stylesCtx,\n className: () => props.value.className,\n style: () => props.value.style,\n classes,\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 modList = computed(() => [{ grow: props.value.grow }])\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\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 ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EACvB,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc;IACZ,qBAAqB;IACrB,KAAK;IACL,OAAO;IACP,SAAS;IACT,MAAM;GACR;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,mBAAmB,eAAe,oBAAoB,MAAM,UAAU,CAAC,CAAC;EAC9E,MAAM,gB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;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAnHC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,aAAW;EAAG,MAAM,OAAA;EAAS,SAAS,OAAA;;yBACX,EAAA,UAAA,IAAA,GAApD,mBAA2F,UAAA,MAAA,WAAxD,OAAA,mBAAhB,MAAM,UAAK;uBAA9B,YAA2F,wBAAR,IAAI,GAAA,EAAjC,KAAK,KAAK,OAAO,MAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"text.mjs","names":[],"sources":["../../../src/components/text/text.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :size=\"props.size\"\n :tag=\"props.span ? 'span' : 'p'\"\n :variant=\"props.variant\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport type { TextFactory, TextProps, TextTruncate } from './text.types.ts'\nimport classes from './text.module.css'\nimport { useStyles, CBox, useComponentProps, CStyleProp } from '../../core'\nimport { varsResolver } from './text.utils.js'\n\ndefineOptions({\n name: 'CText',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<TextProps>()\n\nconst props = useComponentProps({\n component: 'CText',\n defaultProps: {},\n props: rawProps,\n})\n\nfunction getTextTruncate(truncate: TextTruncate | undefined) {\n if (truncate === 'start') {\n return 'start'\n }\n\n if (truncate === 'end' || truncate) {\n return 'end'\n }\n\n return undefined\n}\n\nconst knownProps = [\n 'lineClamp',\n 'truncate',\n 'inline',\n 'inherit',\n 'gradient',\n 'span',\n 'textWrap',\n '__staticSelector',\n 'vars',\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'variant',\n 'mod',\n 'size',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n 'data-truncate': getTextTruncate(props.value.truncate),\n 'data-line-clamp': typeof props.value.lineClamp === 'number',\n 'data-inline': props.value.inline,\n 'data-inherit': props.value.inherit,\n },\n])\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<TextFactory>({\n name: ['Text', props.value.__staticSelector],\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', { focusable: true }))\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 ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB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,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;qBApHC,YAQQ,OAAA,SARR,WAQQ,EAPN,KAAI,QAAO,GACH,OAAA,aAAW;EAClB,MAAM,OAAA,MAAM;EACZ,KAAK,OAAA,MAAM,OAAI,SAAA;EACf,SAAS,OAAA,MAAM;;yBAER,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"text.mjs","names":[],"sources":["../../../src/components/text/text.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :size=\"props.size\"\n :tag=\"props.span ? 'span' : 'p'\"\n :variant=\"props.variant\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport type { TextFactory, TextProps, TextTruncate } from './text.types'\nimport classes from './text.module.css'\nimport { useStyles, CBox, useComponentProps, CStyleProp } from '../../core'\nimport { varsResolver } from './text.utils'\n\ndefineOptions({\n name: 'CText',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<TextProps>()\n\nconst props = useComponentProps({\n component: 'CText',\n defaultProps: {},\n props: rawProps,\n})\n\nfunction getTextTruncate(truncate: TextTruncate | undefined) {\n if (truncate === 'start') {\n return 'start'\n }\n\n if (truncate === 'end' || truncate) {\n return 'end'\n }\n\n return undefined\n}\n\nconst knownProps = [\n 'lineClamp',\n 'truncate',\n 'inline',\n 'inherit',\n 'gradient',\n 'span',\n 'textWrap',\n '__staticSelector',\n 'vars',\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'variant',\n 'mod',\n 'size',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n 'data-truncate': getTextTruncate(props.value.truncate),\n 'data-line-clamp': typeof props.value.lineClamp === 'number',\n 'data-inline': props.value.inline,\n 'data-inherit': props.value.inherit,\n },\n])\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<TextFactory>({\n name: ['Text', props.value.__staticSelector],\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', { focusable: true }))\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 ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAA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