@cck-ui/core 0.33.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 (51) hide show
  1. package/cjs/components/card/card-section/card-section.cjs +376 -0
  2. package/cjs/components/card/card-section/card-section.cjs.map +1 -0
  3. package/cjs/components/card/card.cjs +441 -0
  4. package/cjs/components/card/card.cjs.map +1 -0
  5. package/cjs/components/card/card.constant.cjs +7 -0
  6. package/cjs/components/card/card.constant.cjs.map +1 -0
  7. package/cjs/components/card/card.module.cjs +10 -0
  8. package/cjs/components/card/card.module.cjs.map +1 -0
  9. package/cjs/components/card/card.utils.cjs +8 -0
  10. package/cjs/components/card/card.utils.cjs.map +1 -0
  11. package/cjs/components/card/index.cjs +18 -0
  12. package/cjs/components/card/index.cjs.map +1 -0
  13. package/cjs/components/paper/index.cjs +1 -1
  14. package/cjs/components/paper/paper.cjs +1 -1
  15. package/cjs/core/utils/filter-falsy-children/filter-falsy-children.cjs +17 -0
  16. package/cjs/core/utils/filter-falsy-children/filter-falsy-children.cjs.map +1 -0
  17. package/cjs/index.cjs +79 -72
  18. package/cjs/index.cjs.map +1 -1
  19. package/esm/components/card/card-section/card-section.mjs +376 -0
  20. package/esm/components/card/card-section/card-section.mjs.map +1 -0
  21. package/esm/components/card/card.constant.mjs +7 -0
  22. package/esm/components/card/card.constant.mjs.map +1 -0
  23. package/esm/components/card/card.mjs +441 -0
  24. package/esm/components/card/card.mjs.map +1 -0
  25. package/esm/components/card/card.module.mjs +10 -0
  26. package/esm/components/card/card.module.mjs.map +1 -0
  27. package/esm/components/card/card.utils.mjs +9 -0
  28. package/esm/components/card/card.utils.mjs.map +1 -0
  29. package/esm/components/card/index.mjs +15 -0
  30. package/esm/components/card/index.mjs.map +1 -0
  31. package/esm/components/paper/index.mjs +1 -1
  32. package/esm/components/paper/paper.mjs +1 -1
  33. package/esm/core/utils/filter-falsy-children/filter-falsy-children.mjs +17 -0
  34. package/esm/core/utils/filter-falsy-children/filter-falsy-children.mjs.map +1 -0
  35. package/esm/index.mjs +5 -1
  36. package/esm/index.mjs.map +1 -1
  37. package/lib/components/card/card-section/card-section.types.d.ts +15 -0
  38. package/lib/components/card/card.constant.d.ts +3 -0
  39. package/lib/components/card/card.context.d.ts +5 -0
  40. package/lib/components/card/card.types.d.ts +34 -0
  41. package/lib/components/card/card.utils.d.ts +8 -0
  42. package/lib/components/card/index.d.ts +11 -0
  43. package/lib/components/index.d.ts +1 -0
  44. package/lib/core/styles-api/styles-api.types.d.ts +2 -1
  45. package/lib/core/utils/filter-falsy-children/filter-falsy-children.d.ts +2 -0
  46. package/lib/core/utils/index.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/styles/card.css +89 -0
  49. package/styles/card.layer.css +90 -0
  50. package/styles.css +90 -0
  51. package/styles.layer.css +90 -0
@@ -0,0 +1,376 @@
1
+ "use client";
2
+ const require_export_helper = require("../../../_virtual/_/plugin-vue/export-helper.cjs");
3
+ const require_use_component_props = require("../../../core/config-provider/use-component-props/use-component-props.cjs");
4
+ const require_index = require("../../../core/box/index.cjs");
5
+ const require_card_constant = require("../card.constant.cjs");
6
+ let vue = require("vue");
7
+ //#region packages/@cck-ui/core/src/components/card/card-section/card-section.vue
8
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
9
+ name: "CCardSection",
10
+ __name: "card-section",
11
+ props: {
12
+ withBorder: {
13
+ type: Boolean,
14
+ required: false
15
+ },
16
+ inheritPadding: {
17
+ type: Boolean,
18
+ required: false
19
+ },
20
+ className: {
21
+ type: String,
22
+ required: false
23
+ },
24
+ style: {
25
+ type: [
26
+ Object,
27
+ Function,
28
+ Array
29
+ ],
30
+ required: false,
31
+ skipCheck: true
32
+ },
33
+ __vars: {
34
+ type: null,
35
+ required: false
36
+ },
37
+ __size: {
38
+ type: String,
39
+ required: false
40
+ },
41
+ hiddenFrom: {
42
+ type: null,
43
+ required: false
44
+ },
45
+ visibleFrom: {
46
+ type: null,
47
+ required: false
48
+ },
49
+ lightHidden: {
50
+ type: Boolean,
51
+ required: false
52
+ },
53
+ darkHidden: {
54
+ type: Boolean,
55
+ required: false
56
+ },
57
+ mod: {
58
+ type: [
59
+ Object,
60
+ String,
61
+ Array
62
+ ],
63
+ required: false
64
+ },
65
+ m: {
66
+ type: null,
67
+ required: false
68
+ },
69
+ my: {
70
+ type: null,
71
+ required: false
72
+ },
73
+ mx: {
74
+ type: null,
75
+ required: false
76
+ },
77
+ mt: {
78
+ type: null,
79
+ required: false
80
+ },
81
+ mb: {
82
+ type: null,
83
+ required: false
84
+ },
85
+ ms: {
86
+ type: null,
87
+ required: false
88
+ },
89
+ me: {
90
+ type: null,
91
+ required: false
92
+ },
93
+ mis: {
94
+ type: null,
95
+ required: false
96
+ },
97
+ mie: {
98
+ type: null,
99
+ required: false
100
+ },
101
+ ml: {
102
+ type: null,
103
+ required: false
104
+ },
105
+ mr: {
106
+ type: null,
107
+ required: false
108
+ },
109
+ p: {
110
+ type: null,
111
+ required: false
112
+ },
113
+ py: {
114
+ type: null,
115
+ required: false
116
+ },
117
+ px: {
118
+ type: null,
119
+ required: false
120
+ },
121
+ pt: {
122
+ type: null,
123
+ required: false
124
+ },
125
+ pb: {
126
+ type: null,
127
+ required: false
128
+ },
129
+ ps: {
130
+ type: null,
131
+ required: false
132
+ },
133
+ pe: {
134
+ type: null,
135
+ required: false
136
+ },
137
+ pis: {
138
+ type: null,
139
+ required: false
140
+ },
141
+ pie: {
142
+ type: null,
143
+ required: false
144
+ },
145
+ pl: {
146
+ type: null,
147
+ required: false
148
+ },
149
+ pr: {
150
+ type: null,
151
+ required: false
152
+ },
153
+ bd: {
154
+ type: null,
155
+ required: false
156
+ },
157
+ bdrs: {
158
+ type: null,
159
+ required: false
160
+ },
161
+ bg: {
162
+ type: null,
163
+ required: false
164
+ },
165
+ c: {
166
+ type: null,
167
+ required: false
168
+ },
169
+ opacity: {
170
+ type: [
171
+ String,
172
+ Object,
173
+ Number
174
+ ],
175
+ required: false
176
+ },
177
+ ff: {
178
+ type: [String, Object],
179
+ required: false
180
+ },
181
+ fz: {
182
+ type: null,
183
+ required: false
184
+ },
185
+ fw: {
186
+ type: null,
187
+ required: false
188
+ },
189
+ lts: {
190
+ type: null,
191
+ required: false
192
+ },
193
+ ta: {
194
+ type: [String, Object],
195
+ required: false
196
+ },
197
+ lh: {
198
+ type: null,
199
+ required: false
200
+ },
201
+ fs: {
202
+ type: null,
203
+ required: false
204
+ },
205
+ tt: {
206
+ type: [String, Object],
207
+ required: false
208
+ },
209
+ td: {
210
+ type: null,
211
+ required: false
212
+ },
213
+ w: {
214
+ type: null,
215
+ required: false
216
+ },
217
+ miw: {
218
+ type: null,
219
+ required: false
220
+ },
221
+ maw: {
222
+ type: null,
223
+ required: false
224
+ },
225
+ h: {
226
+ type: null,
227
+ required: false
228
+ },
229
+ mih: {
230
+ type: null,
231
+ required: false
232
+ },
233
+ mah: {
234
+ type: null,
235
+ required: false
236
+ },
237
+ bgsz: {
238
+ type: null,
239
+ required: false
240
+ },
241
+ bgp: {
242
+ type: null,
243
+ required: false
244
+ },
245
+ bgr: {
246
+ type: null,
247
+ required: false
248
+ },
249
+ bga: {
250
+ type: null,
251
+ required: false
252
+ },
253
+ pos: {
254
+ type: [String, Object],
255
+ required: false
256
+ },
257
+ top: {
258
+ type: null,
259
+ required: false
260
+ },
261
+ left: {
262
+ type: null,
263
+ required: false
264
+ },
265
+ bottom: {
266
+ type: null,
267
+ required: false
268
+ },
269
+ right: {
270
+ type: null,
271
+ required: false
272
+ },
273
+ inset: {
274
+ type: null,
275
+ required: false
276
+ },
277
+ display: {
278
+ type: null,
279
+ required: false
280
+ },
281
+ flex: {
282
+ type: null,
283
+ required: false
284
+ },
285
+ variant: {
286
+ type: null,
287
+ required: false
288
+ },
289
+ classNames: {
290
+ type: null,
291
+ required: false
292
+ },
293
+ styles: {
294
+ type: null,
295
+ required: false
296
+ },
297
+ vars: {
298
+ type: Function,
299
+ required: false
300
+ }
301
+ },
302
+ setup(__props, { expose: __expose }) {
303
+ const _section = (0, vue.ref)(null);
304
+ const rawProps = __props;
305
+ const props = require_use_component_props.useComponentProps({
306
+ component: "CCardSection",
307
+ defaultProps: {},
308
+ props: rawProps
309
+ });
310
+ const knownProps = [
311
+ "classNames",
312
+ "className",
313
+ "style",
314
+ "styles",
315
+ "vars",
316
+ "withBorder",
317
+ "inheritPadding",
318
+ "mod"
319
+ ];
320
+ const cardContext = (0, vue.inject)(require_card_constant.CARD_CONTEXT_KEY);
321
+ if (!cardContext) throw new Error("[@cck-ui/card-section] CCardSection component should be wrapped inside CCard component.");
322
+ const modList = (0, vue.computed)(() => [{ "with-border": props.value.withBorder }, { "inherit-padding": props.value.inheritPadding }]);
323
+ const sectionAttrs = (0, vue.computed)(() => {
324
+ return cardContext.getStyles("section", {
325
+ className: () => props.value.className,
326
+ style: props.value.style,
327
+ classNames: props.value.classNames,
328
+ styles: props.value.styles
329
+ });
330
+ });
331
+ const mergedAttrs = (0, vue.computed)(() => {
332
+ const others = {};
333
+ const propsValue = props.value;
334
+ Object.keys(propsValue).forEach((key) => {
335
+ if (!knownProps.includes(key)) others[key] = propsValue[key];
336
+ });
337
+ const userMod = props.value.mod;
338
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean), ...modList.value];
339
+ return {
340
+ ...others,
341
+ mod: mergedMod,
342
+ ...sectionAttrs.value
343
+ };
344
+ });
345
+ __expose({ root: (0, vue.computed)(() => _section.value?.root ?? null) });
346
+ const __returned__ = {
347
+ _section,
348
+ rawProps,
349
+ props,
350
+ knownProps,
351
+ cardContext,
352
+ modList,
353
+ sectionAttrs,
354
+ mergedAttrs,
355
+ get CBox() {
356
+ return require_index.CBox;
357
+ }
358
+ };
359
+ Object.defineProperty(__returned__, "__isScriptSetup", {
360
+ enumerable: false,
361
+ value: true
362
+ });
363
+ return __returned__;
364
+ }
365
+ });
366
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
367
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_section" }, $setup.mergedAttrs), {
368
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
369
+ _: 3
370
+ }, 16);
371
+ }
372
+ var card_section_default = /*#__PURE__*/ require_export_helper.default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/card/card-section/card-section.vue"]]);
373
+ //#endregion
374
+ exports.default = card_section_default;
375
+
376
+ //# sourceMappingURL=card-section.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-section.cjs","names":[],"sources":["../../../../src/components/card/card-section/card-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue'\nimport { CBox, useComponentProps } from '../../../core'\nimport { CardSectionProps } from './card-section.types'\nimport { CARD_CONTEXT_KEY } from '../card.constant'\n\ndefineOptions({\n name: 'CCardSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst rawProps = defineProps<CardSectionProps>()\n\nconst props = useComponentProps({\n component: 'CCardSection',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'vars',\n 'withBorder',\n 'inheritPadding',\n 'mod',\n]\n\nconst cardContext = inject(CARD_CONTEXT_KEY)\n\nif (!cardContext) {\n throw new Error(\n '[@cck-ui/card-section] CCardSection component should be wrapped inside CCard component.'\n )\n}\n\nconst modList = computed(() => [\n { 'with-border': props.value.withBorder },\n { 'inherit-padding': props.value.inheritPadding },\n])\n\nconst sectionAttrs = computed(() => {\n return cardContext.getStyles('section', {\n className: () => props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n })\n})\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, ...sectionAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _section.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,YAAA,GAAA,IAAA,IAAA,CAAiD,IAAI;EAE3D,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,eAAA,GAAA,IAAA,OAAA,CAAqB,sBAAA,gBAAgB;EAE3C,IAAI,CAAC,aACH,MAAM,IAAI,MACR,yFACF;EAGF,MAAM,WAAA,GAAA,IAAA,SAAA,OAAyB,CAC7B,EAAE,eAAe,MAAM,MAAM,WAAW,GACxC,EAAE,mBAAmB,MAAM,MAAM,eAAe,CAClD,CAAC;EAED,MAAM,gBAAA,GAAA,IAAA,SAAA,OAA8B;GAClC,OAAO,YAAY,UAAU,WAAW;IACtC,iBAAiB,MAAM,MAAM;IAC7B,OAAO,MAAM,MAAM;IACnB,YAAY,MAAM,MAAM;IACxB,QAAQ,MAAM,MAAM;GACtB,CAAC;EACH,CAAC;EAED,MAAM,eAAA,GAAA,IAAA,SAAA,OAA6B;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,GAAG,QAAQ,KACb;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,aAAa;GAAM;EAC5D,CAAC;EAED,SAAa,EACX,OAAA,GAAA,IAAA,SAAA,OAAqB,SAAS,OAAO,QAAQ,IAAI,EACnD,CAAC;;;;;;;;;;;;;;;;;;;;;;mDA1ES,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,WAAU,GAAS,OAAA,WAAW,GAAA;kCAC/B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}