@cck-ui/core 0.32.0 → 0.34.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 (72) hide show
  1. package/cjs/components/badge/badge.cjs +488 -0
  2. package/cjs/components/badge/badge.cjs.map +1 -0
  3. package/cjs/components/badge/badge.module.cjs +12 -0
  4. package/cjs/components/badge/badge.module.cjs.map +1 -0
  5. package/cjs/components/badge/badge.utils.cjs +27 -0
  6. package/cjs/components/badge/badge.utils.cjs.map +1 -0
  7. package/cjs/components/badge/index.cjs +14 -0
  8. package/cjs/components/badge/index.cjs.map +1 -0
  9. package/cjs/components/card/card-section/card-section.cjs +376 -0
  10. package/cjs/components/card/card-section/card-section.cjs.map +1 -0
  11. package/cjs/components/card/card.cjs +441 -0
  12. package/cjs/components/card/card.cjs.map +1 -0
  13. package/cjs/components/card/card.constant.cjs +7 -0
  14. package/cjs/components/card/card.constant.cjs.map +1 -0
  15. package/cjs/components/card/card.module.cjs +10 -0
  16. package/cjs/components/card/card.module.cjs.map +1 -0
  17. package/cjs/components/card/card.utils.cjs +8 -0
  18. package/cjs/components/card/card.utils.cjs.map +1 -0
  19. package/cjs/components/card/index.cjs +18 -0
  20. package/cjs/components/card/index.cjs.map +1 -0
  21. package/cjs/components/paper/index.cjs +1 -1
  22. package/cjs/components/paper/paper.cjs +1 -1
  23. package/cjs/core/utils/filter-falsy-children/filter-falsy-children.cjs +17 -0
  24. package/cjs/core/utils/filter-falsy-children/filter-falsy-children.cjs.map +1 -0
  25. package/cjs/index.cjs +95 -85
  26. package/cjs/index.cjs.map +1 -1
  27. package/esm/components/badge/badge.mjs +488 -0
  28. package/esm/components/badge/badge.mjs.map +1 -0
  29. package/esm/components/badge/badge.module.mjs +12 -0
  30. package/esm/components/badge/badge.module.mjs.map +1 -0
  31. package/esm/components/badge/badge.utils.mjs +28 -0
  32. package/esm/components/badge/badge.utils.mjs.map +1 -0
  33. package/esm/components/badge/index.mjs +11 -0
  34. package/esm/components/badge/index.mjs.map +1 -0
  35. package/esm/components/card/card-section/card-section.mjs +376 -0
  36. package/esm/components/card/card-section/card-section.mjs.map +1 -0
  37. package/esm/components/card/card.constant.mjs +7 -0
  38. package/esm/components/card/card.constant.mjs.map +1 -0
  39. package/esm/components/card/card.mjs +441 -0
  40. package/esm/components/card/card.mjs.map +1 -0
  41. package/esm/components/card/card.module.mjs +10 -0
  42. package/esm/components/card/card.module.mjs.map +1 -0
  43. package/esm/components/card/card.utils.mjs +9 -0
  44. package/esm/components/card/card.utils.mjs.map +1 -0
  45. package/esm/components/card/index.mjs +15 -0
  46. package/esm/components/card/index.mjs.map +1 -0
  47. package/esm/components/paper/index.mjs +1 -1
  48. package/esm/components/paper/paper.mjs +1 -1
  49. package/esm/core/utils/filter-falsy-children/filter-falsy-children.mjs +17 -0
  50. package/esm/core/utils/filter-falsy-children/filter-falsy-children.mjs.map +1 -0
  51. package/esm/index.mjs +7 -1
  52. package/esm/index.mjs.map +1 -1
  53. package/lib/components/badge/badge.types.d.ts +52 -0
  54. package/lib/components/badge/badge.utils.d.ts +8 -0
  55. package/lib/components/badge/index.d.ts +6 -0
  56. package/lib/components/card/card-section/card-section.types.d.ts +15 -0
  57. package/lib/components/card/card.constant.d.ts +3 -0
  58. package/lib/components/card/card.context.d.ts +5 -0
  59. package/lib/components/card/card.types.d.ts +34 -0
  60. package/lib/components/card/card.utils.d.ts +8 -0
  61. package/lib/components/card/index.d.ts +11 -0
  62. package/lib/components/index.d.ts +2 -0
  63. package/lib/core/styles-api/styles-api.types.d.ts +2 -1
  64. package/lib/core/utils/filter-falsy-children/filter-falsy-children.d.ts +2 -0
  65. package/lib/core/utils/index.d.ts +1 -0
  66. package/package.json +1 -1
  67. package/styles/badge.css +124 -0
  68. package/styles/badge.layer.css +125 -0
  69. package/styles/card.css +89 -0
  70. package/styles/card.layer.css +90 -0
  71. package/styles.css +215 -0
  72. package/styles.layer.css +215 -0
@@ -0,0 +1,441 @@
1
+ "use client";
2
+ import { filterFalsyChildren } from "../../core/utils/filter-falsy-children/filter-falsy-children.mjs";
3
+ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
4
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
5
+ import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
6
+ import { CARD_CONTEXT_KEY } from "./card.constant.mjs";
7
+ import card_module_default from "./card.module.mjs";
8
+ import { varsResolver } from "./card.utils.mjs";
9
+ import paper_default from "../paper/paper.mjs";
10
+ import { Fragment, computed, createBlock, createElementBlock, defineComponent, h, mergeProps, openBlock, provide, ref, renderList, resolveDynamicComponent, useAttrs, useSlots, withCtx } from "vue";
11
+ //#region packages/@cck-ui/core/src/components/card/card.vue
12
+ const _sfc_main = /*@__PURE__*/ defineComponent({
13
+ name: "CCard",
14
+ __name: "card",
15
+ props: {
16
+ shadow: {
17
+ type: null,
18
+ required: false
19
+ },
20
+ radius: {
21
+ type: null,
22
+ required: false
23
+ },
24
+ withBorder: {
25
+ type: Boolean,
26
+ required: false
27
+ },
28
+ padding: {
29
+ type: null,
30
+ required: false
31
+ },
32
+ orientation: {
33
+ type: String,
34
+ required: false
35
+ },
36
+ className: {
37
+ type: String,
38
+ required: false
39
+ },
40
+ style: {
41
+ type: [
42
+ Object,
43
+ Function,
44
+ Array
45
+ ],
46
+ required: false,
47
+ skipCheck: true
48
+ },
49
+ __vars: {
50
+ type: null,
51
+ required: false
52
+ },
53
+ __size: {
54
+ type: String,
55
+ required: false
56
+ },
57
+ hiddenFrom: {
58
+ type: null,
59
+ required: false
60
+ },
61
+ visibleFrom: {
62
+ type: null,
63
+ required: false
64
+ },
65
+ lightHidden: {
66
+ type: Boolean,
67
+ required: false
68
+ },
69
+ darkHidden: {
70
+ type: Boolean,
71
+ required: false
72
+ },
73
+ mod: {
74
+ type: [
75
+ Object,
76
+ String,
77
+ Array
78
+ ],
79
+ required: false
80
+ },
81
+ m: {
82
+ type: null,
83
+ required: false
84
+ },
85
+ my: {
86
+ type: null,
87
+ required: false
88
+ },
89
+ mx: {
90
+ type: null,
91
+ required: false
92
+ },
93
+ mt: {
94
+ type: null,
95
+ required: false
96
+ },
97
+ mb: {
98
+ type: null,
99
+ required: false
100
+ },
101
+ ms: {
102
+ type: null,
103
+ required: false
104
+ },
105
+ me: {
106
+ type: null,
107
+ required: false
108
+ },
109
+ mis: {
110
+ type: null,
111
+ required: false
112
+ },
113
+ mie: {
114
+ type: null,
115
+ required: false
116
+ },
117
+ ml: {
118
+ type: null,
119
+ required: false
120
+ },
121
+ mr: {
122
+ type: null,
123
+ required: false
124
+ },
125
+ p: {
126
+ type: null,
127
+ required: false
128
+ },
129
+ py: {
130
+ type: null,
131
+ required: false
132
+ },
133
+ px: {
134
+ type: null,
135
+ required: false
136
+ },
137
+ pt: {
138
+ type: null,
139
+ required: false
140
+ },
141
+ pb: {
142
+ type: null,
143
+ required: false
144
+ },
145
+ ps: {
146
+ type: null,
147
+ required: false
148
+ },
149
+ pe: {
150
+ type: null,
151
+ required: false
152
+ },
153
+ pis: {
154
+ type: null,
155
+ required: false
156
+ },
157
+ pie: {
158
+ type: null,
159
+ required: false
160
+ },
161
+ pl: {
162
+ type: null,
163
+ required: false
164
+ },
165
+ pr: {
166
+ type: null,
167
+ required: false
168
+ },
169
+ bd: {
170
+ type: null,
171
+ required: false
172
+ },
173
+ bdrs: {
174
+ type: null,
175
+ required: false
176
+ },
177
+ bg: {
178
+ type: null,
179
+ required: false
180
+ },
181
+ c: {
182
+ type: null,
183
+ required: false
184
+ },
185
+ opacity: {
186
+ type: [
187
+ String,
188
+ Object,
189
+ Number
190
+ ],
191
+ required: false
192
+ },
193
+ ff: {
194
+ type: [String, Object],
195
+ required: false
196
+ },
197
+ fz: {
198
+ type: null,
199
+ required: false
200
+ },
201
+ fw: {
202
+ type: null,
203
+ required: false
204
+ },
205
+ lts: {
206
+ type: null,
207
+ required: false
208
+ },
209
+ ta: {
210
+ type: [String, Object],
211
+ required: false
212
+ },
213
+ lh: {
214
+ type: null,
215
+ required: false
216
+ },
217
+ fs: {
218
+ type: null,
219
+ required: false
220
+ },
221
+ tt: {
222
+ type: [String, Object],
223
+ required: false
224
+ },
225
+ td: {
226
+ type: null,
227
+ required: false
228
+ },
229
+ w: {
230
+ type: null,
231
+ required: false
232
+ },
233
+ miw: {
234
+ type: null,
235
+ required: false
236
+ },
237
+ maw: {
238
+ type: null,
239
+ required: false
240
+ },
241
+ h: {
242
+ type: null,
243
+ required: false
244
+ },
245
+ mih: {
246
+ type: null,
247
+ required: false
248
+ },
249
+ mah: {
250
+ type: null,
251
+ required: false
252
+ },
253
+ bgsz: {
254
+ type: null,
255
+ required: false
256
+ },
257
+ bgp: {
258
+ type: null,
259
+ required: false
260
+ },
261
+ bgr: {
262
+ type: null,
263
+ required: false
264
+ },
265
+ bga: {
266
+ type: null,
267
+ required: false
268
+ },
269
+ pos: {
270
+ type: [String, Object],
271
+ required: false
272
+ },
273
+ top: {
274
+ type: null,
275
+ required: false
276
+ },
277
+ left: {
278
+ type: null,
279
+ required: false
280
+ },
281
+ bottom: {
282
+ type: null,
283
+ required: false
284
+ },
285
+ right: {
286
+ type: null,
287
+ required: false
288
+ },
289
+ inset: {
290
+ type: null,
291
+ required: false
292
+ },
293
+ display: {
294
+ type: null,
295
+ required: false
296
+ },
297
+ flex: {
298
+ type: null,
299
+ required: false
300
+ },
301
+ unstyled: {
302
+ type: Boolean,
303
+ required: false
304
+ },
305
+ variant: {
306
+ type: null,
307
+ required: false
308
+ },
309
+ classNames: {
310
+ type: null,
311
+ required: false
312
+ },
313
+ styles: {
314
+ type: null,
315
+ required: false
316
+ },
317
+ vars: {
318
+ type: Function,
319
+ required: false
320
+ },
321
+ attributes: {
322
+ type: null,
323
+ required: false
324
+ }
325
+ },
326
+ setup(__props, { expose: __expose }) {
327
+ const _root = ref(null);
328
+ const attrs = useAttrs();
329
+ const slots = useSlots();
330
+ const rawProps = __props;
331
+ const defaultProps = { orientation: "vertical" };
332
+ const props = useComponentProps({
333
+ component: "CCard",
334
+ defaultProps,
335
+ props: rawProps
336
+ });
337
+ const knownProps = [
338
+ "classNames",
339
+ "className",
340
+ "style",
341
+ "styles",
342
+ "unstyled",
343
+ "vars",
344
+ "padding",
345
+ "attributes",
346
+ "orientation"
347
+ ];
348
+ const styleProps = computed(() => ({
349
+ ...props.value,
350
+ ...attrs,
351
+ style: attrs.style ?? props.value.style
352
+ }));
353
+ const getStyles = useStyles({
354
+ name: "Card",
355
+ classes: card_module_default,
356
+ props: styleProps,
357
+ className: () => props.value.className,
358
+ style: () => props.value.style,
359
+ classNames: props.value.classNames,
360
+ styles: props.value.styles,
361
+ unstyled: props.value.unstyled,
362
+ attributes: props.value.attributes,
363
+ vars: props.value.vars,
364
+ varsResolver
365
+ });
366
+ provide(CARD_CONTEXT_KEY, { getStyles });
367
+ const rootAttrs = computed(() => getStyles("root"));
368
+ const mergedAttrs = computed(() => {
369
+ const others = {};
370
+ const propsValue = props.value;
371
+ Object.keys(propsValue).forEach((key) => {
372
+ if (!knownProps.includes(key)) others[key] = propsValue[key];
373
+ });
374
+ const userMod = props.value.mod;
375
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
376
+ return {
377
+ ...others,
378
+ mod: mergedMod,
379
+ ...rootAttrs.value
380
+ };
381
+ });
382
+ function isCardSection(vnode) {
383
+ if (!vnode || !vnode.type) return false;
384
+ const type = vnode.type;
385
+ if (typeof type === "object" && "name" in type) return type.name === "CCardSection";
386
+ return false;
387
+ }
388
+ const processedChildren = computed(() => {
389
+ const children = filterFalsyChildren(slots.default?.());
390
+ const orientation = props.value.orientation;
391
+ const total = children.length;
392
+ return children.map((child, index) => {
393
+ if (isCardSection(child)) return h(child, {
394
+ ...child.props,
395
+ "data-orientation": orientation,
396
+ "data-first-section": index === 0 ? true : void 0,
397
+ "data-last-section": index === total - 1 ? true : void 0
398
+ });
399
+ return child;
400
+ });
401
+ });
402
+ __expose({ root: computed(() => _root.value?.root ?? null) });
403
+ const __returned__ = {
404
+ _root,
405
+ attrs,
406
+ slots,
407
+ rawProps,
408
+ defaultProps,
409
+ props,
410
+ knownProps,
411
+ styleProps,
412
+ getStyles,
413
+ rootAttrs,
414
+ mergedAttrs,
415
+ isCardSection,
416
+ processedChildren,
417
+ CPaper: paper_default
418
+ };
419
+ Object.defineProperty(__returned__, "__isScriptSetup", {
420
+ enumerable: false,
421
+ value: true
422
+ });
423
+ return __returned__;
424
+ }
425
+ });
426
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
427
+ return openBlock(), createBlock($setup["CPaper"], mergeProps({ ref: "_root" }, $setup.mergedAttrs, {
428
+ "data-orientation": $setup.props.orientation,
429
+ unstyled: $setup.props.unstyled
430
+ }), {
431
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList($setup.processedChildren, (item, idx) => {
432
+ return openBlock(), createBlock(resolveDynamicComponent(item), { key: item.key ?? idx });
433
+ }), 128))]),
434
+ _: 1
435
+ }, 16, ["data-orientation", "unstyled"]);
436
+ }
437
+ var card_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/card/card.vue"]]);
438
+ //#endregion
439
+ export { card_default as default };
440
+
441
+ //# sourceMappingURL=card.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.mjs","names":[],"sources":["../../../src/components/card/card.vue"],"sourcesContent":["<template>\n <c-paper\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :data-orientation=\"props.orientation\"\n :unstyled=\"props.unstyled\"\n >\n <template v-for=\"(item, idx) in processedChildren\" :key=\"item.key ?? idx\">\n <component :is=\"item\" />\n </template>\n </c-paper>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, h, provide, ref, useAttrs, useSlots } from 'vue'\nimport CPaper from '../paper/paper.vue'\nimport { CardFactory, CardProps } from './card.types'\nimport { CStyleProp, filterFalsyChildren, useComponentProps, useStyles } from '../../core'\nimport { varsResolver } from './card.utils'\nimport classes from './card.module.css'\nimport { CARD_CONTEXT_KEY } from './card.constant.js'\n\ndefineOptions({\n name: 'CCard',\n})\n\nconst _root = ref<InstanceType<typeof CPaper> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<CardProps>()\n\nconst defaultProps = {\n orientation: 'vertical',\n} satisfies Partial<CardProps>\n\nconst props = useComponentProps({\n component: 'CCard',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'padding',\n 'attributes',\n 'orientation',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<CardFactory>({\n name: 'Card',\n classes,\n props: styleProps,\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\nprovide(CARD_CONTEXT_KEY, { getStyles })\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 = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nfunction isCardSection(vnode: any) {\n if (!vnode || !vnode.type) {\n return false\n }\n const type = vnode.type\n if (typeof type === 'object' && 'name' in type) {\n return type.name === 'CCardSection'\n }\n return false\n}\n\nconst processedChildren = computed(() => {\n const children = filterFalsyChildren(slots.default?.())\n const orientation = props.value.orientation\n const total = children.length\n\n return children.map((child, index) => {\n if (isCardSection(child)) {\n return h(child, {\n ...child.props,\n 'data-orientation': orientation,\n 'data-first-section': index === 0 ? true : undefined,\n 'data-last-section': index === total - 1 ? true : undefined,\n })\n }\n return child\n })\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/card/card.module.css
3
+ var card_module_default = {
4
+ "root": "m_6ea3917f",
5
+ "section": "m_4fcecd28"
6
+ };
7
+ //#endregion
8
+ export { card_module_default as default };
9
+
10
+ //# sourceMappingURL=card.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.module.mjs","names":[],"sources":["../../../src/components/card/card.module.css"],"sourcesContent":[".root {\n --card-padding: var(--c-spacing-md);\n\n position: relative;\n overflow: hidden;\n display: flex;\n padding: var(--card-padding);\n color: var(--c-color-text);\n\n &:where([data-orientation='horizontal']) {\n flex-direction: row;\n }\n\n &:where([data-orientation='vertical']) {\n flex-direction: column;\n }\n\n @mixin where-light {\n background-color: var(--c-color-white);\n }\n\n @mixin where-dark {\n background-color: var(--c-color-dark-6);\n }\n}\n\n.section {\n display: block;\n margin-inline: calc(var(--card-padding) * -1);\n\n @mixin where-light {\n --border-color: var(--c-color-gray-3);\n }\n\n @mixin where-dark {\n --border-color: var(--c-color-dark-4);\n }\n\n &:where([data-orientation='vertical']) {\n &:first-child {\n margin-top: calc(var(--card-padding) * -1);\n border-top: none !important;\n }\n\n &:last-child {\n margin-bottom: calc(var(--card-padding) * -1);\n border-bottom: none !important;\n }\n\n &[data-inherit-padding] {\n padding-inline: var(--card-padding);\n }\n\n &[data-with-border] {\n border-top: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n }\n\n & + & {\n border-top: none !important;\n }\n }\n\n &:where([data-orientation='horizontal']) {\n margin-block: calc(var(--card-padding) * -1);\n margin-inline: 0;\n\n &:first-child {\n margin-inline-start: calc(var(--card-padding) * -1);\n border-inline-start: none !important;\n }\n\n &:last-child {\n margin-inline-end: calc(var(--card-padding) * -1);\n border-inline-end: none !important;\n }\n\n &[data-inherit-padding] {\n padding-block: var(--card-padding);\n }\n\n &[data-with-border] {\n border-inline-start: 1px solid var(--border-color);\n border-inline-end: 1px solid var(--border-color);\n }\n\n & + & {\n border-inline-start: none !important;\n }\n }\n}\n"],"mappings":";;AAAA,IAAA,sBAAe;CAAC,QAAO;CAAa,WAAU;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/card/card.utils.ts
5
+ const varsResolver = createVarsResolver((_, { padding }) => ({ root: { "--card-padding": getSpacing(padding) } }));
6
+ //#endregion
7
+ export { varsResolver };
8
+
9
+ //# sourceMappingURL=card.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.utils.mjs","names":[],"sources":["../../../src/components/card/card.utils.ts"],"sourcesContent":["import { createVarsResolver, getSpacing } from '../../core'\nimport { CardFactory } from './card.types'\n\nexport const varsResolver = createVarsResolver<CardFactory>((_, { padding }) => ({\n root: {\n '--card-padding': getSpacing(padding),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAAiC,GAAG,EAAE,eAAe,EAC/E,MAAM,EACJ,kBAAkB,WAAW,OAAO,EACtC,EACF,EAAE"}
@@ -0,0 +1,15 @@
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 card_section_default from "./card-section/card-section.mjs";
5
+ import card_module_default from "./card.module.mjs";
6
+ import { varsResolver } from "./card.utils.mjs";
7
+ import card_default from "./card.mjs";
8
+ //#region packages/@cck-ui/core/src/components/card/index.ts
9
+ const CardWithStatic = withPropsFactory(withExtend(withVarsResolver(withClasses(card_default, card_module_default), varsResolver)));
10
+ const CCardSection = withInstall(withPropsFactory(withExtend(withClasses(card_section_default, card_module_default))));
11
+ const CCard = withInstall(CardWithStatic, { Section: card_section_default });
12
+ //#endregion
13
+ export { CCard, CCard as default, CCardSection };
14
+
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Card","classes","CardSection"],"sources":["../../../src/components/card/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport CardSection from './card-section/card-section.vue'\nimport classes from './card.module.css'\nimport { varsResolver } from './card.utils'\nimport Card from './card.vue'\n\nconst CardWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Card, classes), varsResolver))\n)\nconst CardSectionWithStatic = withPropsFactory(withExtend(withClasses(CardSection, classes)))\n\nexport const CCardSection: SFCWithInstallAndClasses<typeof CardSection> =\n withInstall(CardSectionWithStatic)\nexport const CCard: SFCWithInstallAndClasses<typeof Card, typeof classes> & {\n Section: typeof CardSection\n} = withInstall(CardWithStatic, { Section: CardSection })\n\nexport default CCard\n\nexport * from './card-section/card-section.types'\nexport * from './card.types'\n"],"mappings":";;;;;;;;AAaA,MAAM,iBAAiB,iBACrB,WAAW,iBAAiB,YAAYA,cAAMC,mBAAO,GAAG,YAAY,CAAC,CACvE;AAGA,MAAa,eACX,YAH4B,iBAAiB,WAAW,YAAYC,sBAAaD,mBAAO,CAAC,CAG7E,CAAqB;AACnC,MAAa,QAET,YAAY,gBAAgB,EAAE,SAASC,qBAAY,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { withInstall } from "../../core/utils/vue/install.mjs";
3
3
  import { withClasses, withExtend, withPropsFactory, withVarsResolver } from "../../core/utils/vue/statics.mjs";
4
- import { varsResolver } from "./paper.utils.mjs";
5
4
  import paper_module_default from "./paper.module.mjs";
5
+ import { varsResolver } from "./paper.utils.mjs";
6
6
  import paper_default from "./paper.mjs";
7
7
  const CPaper = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(paper_default, paper_module_default), varsResolver))));
8
8
  //#endregion
@@ -3,8 +3,8 @@ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs
3
3
  import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
4
4
  import { CBox } from "../../core/box/index.mjs";
5
5
  import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
6
- import { varsResolver } from "./paper.utils.mjs";
7
6
  import paper_module_default from "./paper.module.mjs";
7
+ import { varsResolver } from "./paper.utils.mjs";
8
8
  import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
9
9
  //#region packages/@cck-ui/core/src/components/paper/paper.vue
10
10
  const _sfc_main = /*@__PURE__*/ defineComponent({
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { Fragment, isVNode } from "vue";
3
+ //#region packages/@cck-ui/core/src/core/utils/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/core/utils/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"}
package/esm/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { deepMerge } from "./core/utils/deep-merge/deep-merge.mjs";
2
2
  import { camelToKebabCase } from "./core/utils/camel-to-kebab-case/camel-to-kebab-case.mjs";
3
+ import { filterFalsyChildren } from "./core/utils/filter-falsy-children/filter-falsy-children.mjs";
3
4
  import { filterProps } from "./core/utils/filter-props/filter-props.mjs";
4
5
  import { getBaseValue } from "./core/utils/get-base-value/get-base-value.mjs";
5
6
  import { px } from "./core/utils/units-converters/px.mjs";
@@ -66,9 +67,11 @@ import { CAnchor } from "./components/anchor/index.mjs";
66
67
  import { CAspectRatio } from "./components/aspect-ratio/index.mjs";
67
68
  import { CAvatar, CAvatarGroup } from "./components/avatar/index.mjs";
68
69
  import { CBackgroundImage } from "./components/background-image/index.mjs";
70
+ import { CBadge } from "./components/badge/index.mjs";
69
71
  import { CBreadcrumbs } from "./components/breadcrumbs/index.mjs";
70
72
  import { CBurger } from "./components/burger/index.mjs";
71
73
  import { CButton, CButtonGroup, CButtonGroupSection } from "./components/button/index.mjs";
74
+ import { CCard, CCardSection } from "./components/card/index.mjs";
72
75
  import { CCenter } from "./components/center/index.mjs";
73
76
  import { CContainer } from "./components/container/index.mjs";
74
77
  import { CCopyButton } from "./components/copy-button/index.mjs";
@@ -104,11 +107,14 @@ const components = [
104
107
  CAvatar,
105
108
  CAvatarGroup,
106
109
  CBackgroundImage,
110
+ CBadge,
107
111
  CBreadcrumbs,
108
112
  CBurger,
109
113
  CButton,
110
114
  CButtonGroup,
111
115
  CButtonGroupSection,
116
+ CCard,
117
+ CCardSection,
112
118
  CCenter,
113
119
  CCloseButton,
114
120
  CCol,
@@ -150,6 +156,6 @@ const CckUI = { install(app) {
150
156
  });
151
157
  } };
152
158
  //#endregion
153
- export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAffix, CAlert, CAnchor, CAspectRatio, CAvatar, CAvatarGroup, CBackgroundImage, CBox, CBreadcrumbs, CBurger, 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, CPortal, 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, getDefaultZIndex, 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 };
159
+ export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAffix, CAlert, CAnchor, CAspectRatio, CAvatar, CAvatarGroup, CBackgroundImage, CBadge, CBox, CBreadcrumbs, CBurger, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCard, CCardSection, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CDivider, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, CLoader, CONFIG_KEY, CPaper, CPortal, 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, filterFalsyChildren, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getDefaultZIndex, 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 };
154
160
 
155
161
  //# 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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBreadcrumbs,\n CBurger,\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 CPortal,\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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBreadcrumbs,\n CBurger,\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 CPortal,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,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;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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBadge,\n CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCard,\n CCardSection,\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 CPortal,\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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBadge,\n CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCard,\n CCardSection,\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 CPortal,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,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;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,52 @@
1
+ import { VNode } from 'vue';
2
+ import { BoxProps, CColor, CGradient, CRadius, CSize, PolymorphicFactory, StylesApiProps } from '../../core';
3
+ export type BadgeStylesNames = 'root' | 'section' | 'label';
4
+ export type BadgeVariant = 'default' | 'filled' | 'light' | 'outline' | 'dashed' | 'dot' | 'transparent' | 'white' | 'gradient';
5
+ export type BadgeCssVariables = {
6
+ root: '--badge-height' | '--badge-padding-x' | '--badge-fz' | '--badge-radius' | '--badge-bg' | '--badge-color' | '--badge-bd' | '--badge-dot-color';
7
+ };
8
+ export interface BadgeProps extends BoxProps, StylesApiProps<BadgeFactory> {
9
+ /**
10
+ * Controls `font-size`, `height` and horizontal `padding`
11
+ * @default 'md'
12
+ */
13
+ size?: CSize | (string & {});
14
+ /**
15
+ * If set, badge `min-width` becomes equal to its `height` and horizontal padding is removed
16
+ */
17
+ circle?: boolean;
18
+ /**
19
+ * Key of `theme.radius` or any valid CSS value to set `border-radius`
20
+ * @default 'xl'
21
+ */
22
+ radius?: CRadius;
23
+ /**
24
+ * Key of `theme.colors` or any valid CSS color
25
+ * @default theme.primaryColor
26
+ */
27
+ color?: CColor;
28
+ /**
29
+ * Gradient configuration used when `variant="gradient"`
30
+ * @default theme.defaultGradient
31
+ */
32
+ gradient?: CGradient;
33
+ /** Content displayed on the left side of the badge label */
34
+ leftSection?: string | VNode;
35
+ /** Content displayed on the right side of the badge label */
36
+ rightSection?: string | VNode;
37
+ /**
38
+ * Determines whether Badge should take 100% of its parent width
39
+ * @default false
40
+ */
41
+ fullWidth?: boolean;
42
+ /** If set, adjusts text color based on background color for `filled` variant */
43
+ autoContrast?: boolean;
44
+ }
45
+ export type BadgeFactory = PolymorphicFactory<{
46
+ props: BadgeProps;
47
+ defaultRef: HTMLDivElement;
48
+ defaultComponent: 'div';
49
+ stylesNames: BadgeStylesNames;
50
+ vars: BadgeCssVariables;
51
+ variant: BadgeVariant;
52
+ }>;
@@ -0,0 +1,8 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./badge.types").BadgeProps;
3
+ defaultRef: HTMLDivElement;
4
+ defaultComponent: "div";
5
+ stylesNames: import("./badge.types").BadgeStylesNames;
6
+ vars: import("./badge.types").BadgeCssVariables;
7
+ variant: import("./badge.types").BadgeVariant;
8
+ }>;