@cck-ui/core 0.34.1 → 0.36.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 (71) hide show
  1. package/cjs/components/color-swatch/color-swatch.cjs +439 -0
  2. package/cjs/components/color-swatch/color-swatch.cjs.map +1 -0
  3. package/cjs/components/color-swatch/color-swatch.module.cjs +13 -0
  4. package/cjs/components/color-swatch/color-swatch.module.cjs.map +1 -0
  5. package/cjs/components/color-swatch/color-swatch.utils.cjs +12 -0
  6. package/cjs/components/color-swatch/color-swatch.utils.cjs.map +1 -0
  7. package/cjs/components/color-swatch/index.cjs +14 -0
  8. package/cjs/components/color-swatch/index.cjs.map +1 -0
  9. package/cjs/components/data-list/data-list-item/data-list-item.cjs +364 -0
  10. package/cjs/components/data-list/data-list-item/data-list-item.cjs.map +1 -0
  11. package/cjs/components/data-list/data-list-item-label/data-list-item-label.cjs +367 -0
  12. package/cjs/components/data-list/data-list-item-label/data-list-item-label.cjs.map +1 -0
  13. package/cjs/components/data-list/data-list-item-value/data-list-item-value.cjs +367 -0
  14. package/cjs/components/data-list/data-list-item-value/data-list-item-value.cjs.map +1 -0
  15. package/cjs/components/data-list/data-list.cjs +421 -0
  16. package/cjs/components/data-list/data-list.cjs.map +1 -0
  17. package/cjs/components/data-list/data-list.constant.cjs +7 -0
  18. package/cjs/components/data-list/data-list.constant.cjs.map +1 -0
  19. package/cjs/components/data-list/data-list.module.cjs +12 -0
  20. package/cjs/components/data-list/data-list.module.cjs.map +1 -0
  21. package/cjs/components/data-list/data-list.utils.cjs +13 -0
  22. package/cjs/components/data-list/data-list.utils.cjs.map +1 -0
  23. package/cjs/components/data-list/index.cjs +30 -0
  24. package/cjs/components/data-list/index.cjs.map +1 -0
  25. package/cjs/index.cjs +81 -69
  26. package/cjs/index.cjs.map +1 -1
  27. package/esm/components/color-swatch/color-swatch.mjs +439 -0
  28. package/esm/components/color-swatch/color-swatch.mjs.map +1 -0
  29. package/esm/components/color-swatch/color-swatch.module.mjs +13 -0
  30. package/esm/components/color-swatch/color-swatch.module.mjs.map +1 -0
  31. package/esm/components/color-swatch/color-swatch.utils.mjs +13 -0
  32. package/esm/components/color-swatch/color-swatch.utils.mjs.map +1 -0
  33. package/esm/components/color-swatch/index.mjs +11 -0
  34. package/esm/components/color-swatch/index.mjs.map +1 -0
  35. package/esm/components/data-list/data-list-item/data-list-item.mjs +364 -0
  36. package/esm/components/data-list/data-list-item/data-list-item.mjs.map +1 -0
  37. package/esm/components/data-list/data-list-item-label/data-list-item-label.mjs +367 -0
  38. package/esm/components/data-list/data-list-item-label/data-list-item-label.mjs.map +1 -0
  39. package/esm/components/data-list/data-list-item-value/data-list-item-value.mjs +367 -0
  40. package/esm/components/data-list/data-list-item-value/data-list-item-value.mjs.map +1 -0
  41. package/esm/components/data-list/data-list.constant.mjs +7 -0
  42. package/esm/components/data-list/data-list.constant.mjs.map +1 -0
  43. package/esm/components/data-list/data-list.mjs +421 -0
  44. package/esm/components/data-list/data-list.mjs.map +1 -0
  45. package/esm/components/data-list/data-list.module.mjs +12 -0
  46. package/esm/components/data-list/data-list.module.mjs.map +1 -0
  47. package/esm/components/data-list/data-list.utils.mjs +14 -0
  48. package/esm/components/data-list/data-list.utils.mjs.map +1 -0
  49. package/esm/components/data-list/index.mjs +26 -0
  50. package/esm/components/data-list/index.mjs.map +1 -0
  51. package/esm/index.mjs +8 -1
  52. package/esm/index.mjs.map +1 -1
  53. package/lib/components/color-swatch/color-swatch.types.d.ts +29 -0
  54. package/lib/components/color-swatch/color-swatch.utils.d.ts +7 -0
  55. package/lib/components/color-swatch/index.d.ts +6 -0
  56. package/lib/components/data-list/data-list-item/data-list-item.types.d.ts +10 -0
  57. package/lib/components/data-list/data-list-item-label/data-list-item-label.types.d.ts +10 -0
  58. package/lib/components/data-list/data-list-item-value/data-list-item-value.types.d.ts +10 -0
  59. package/lib/components/data-list/data-list.constant.d.ts +3 -0
  60. package/lib/components/data-list/data-list.context.d.ts +5 -0
  61. package/lib/components/data-list/data-list.types.d.ts +50 -0
  62. package/lib/components/data-list/data-list.utils.d.ts +11 -0
  63. package/lib/components/data-list/index.d.ts +18 -0
  64. package/lib/components/index.d.ts +2 -0
  65. package/package.json +1 -1
  66. package/styles/color-swatch.css +71 -0
  67. package/styles/color-swatch.layer.css +72 -0
  68. package/styles/data-list.css +54 -0
  69. package/styles/data-list.layer.css +55 -0
  70. package/styles.css +127 -0
  71. package/styles.layer.css +127 -0
@@ -0,0 +1,439 @@
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_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
6
+ const require_color_swatch_module = require("./color-swatch.module.cjs");
7
+ const require_color_swatch_utils = require("./color-swatch.utils.cjs");
8
+ let vue = require("vue");
9
+ //#region packages/@cck-ui/core/src/components/color-swatch/color-swatch.vue
10
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
11
+ name: "CColorSwatch",
12
+ __name: "color-swatch",
13
+ props: {
14
+ color: {
15
+ type: String,
16
+ required: true
17
+ },
18
+ size: {
19
+ type: null,
20
+ required: false
21
+ },
22
+ radius: {
23
+ type: null,
24
+ required: false
25
+ },
26
+ withShadow: {
27
+ type: Boolean,
28
+ required: false
29
+ },
30
+ className: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ style: {
35
+ type: [
36
+ Object,
37
+ Function,
38
+ Array
39
+ ],
40
+ required: false,
41
+ skipCheck: true
42
+ },
43
+ __vars: {
44
+ type: null,
45
+ required: false
46
+ },
47
+ __size: {
48
+ type: String,
49
+ required: false
50
+ },
51
+ hiddenFrom: {
52
+ type: null,
53
+ required: false
54
+ },
55
+ visibleFrom: {
56
+ type: null,
57
+ required: false
58
+ },
59
+ lightHidden: {
60
+ type: Boolean,
61
+ required: false
62
+ },
63
+ darkHidden: {
64
+ type: Boolean,
65
+ required: false
66
+ },
67
+ mod: {
68
+ type: [
69
+ Object,
70
+ String,
71
+ Array
72
+ ],
73
+ required: false
74
+ },
75
+ m: {
76
+ type: null,
77
+ required: false
78
+ },
79
+ my: {
80
+ type: null,
81
+ required: false
82
+ },
83
+ mx: {
84
+ type: null,
85
+ required: false
86
+ },
87
+ mt: {
88
+ type: null,
89
+ required: false
90
+ },
91
+ mb: {
92
+ type: null,
93
+ required: false
94
+ },
95
+ ms: {
96
+ type: null,
97
+ required: false
98
+ },
99
+ me: {
100
+ type: null,
101
+ required: false
102
+ },
103
+ mis: {
104
+ type: null,
105
+ required: false
106
+ },
107
+ mie: {
108
+ type: null,
109
+ required: false
110
+ },
111
+ ml: {
112
+ type: null,
113
+ required: false
114
+ },
115
+ mr: {
116
+ type: null,
117
+ required: false
118
+ },
119
+ p: {
120
+ type: null,
121
+ required: false
122
+ },
123
+ py: {
124
+ type: null,
125
+ required: false
126
+ },
127
+ px: {
128
+ type: null,
129
+ required: false
130
+ },
131
+ pt: {
132
+ type: null,
133
+ required: false
134
+ },
135
+ pb: {
136
+ type: null,
137
+ required: false
138
+ },
139
+ ps: {
140
+ type: null,
141
+ required: false
142
+ },
143
+ pe: {
144
+ type: null,
145
+ required: false
146
+ },
147
+ pis: {
148
+ type: null,
149
+ required: false
150
+ },
151
+ pie: {
152
+ type: null,
153
+ required: false
154
+ },
155
+ pl: {
156
+ type: null,
157
+ required: false
158
+ },
159
+ pr: {
160
+ type: null,
161
+ required: false
162
+ },
163
+ bd: {
164
+ type: null,
165
+ required: false
166
+ },
167
+ bdrs: {
168
+ type: null,
169
+ required: false
170
+ },
171
+ bg: {
172
+ type: null,
173
+ required: false
174
+ },
175
+ c: {
176
+ type: null,
177
+ required: false
178
+ },
179
+ opacity: {
180
+ type: [
181
+ String,
182
+ Object,
183
+ Number
184
+ ],
185
+ required: false
186
+ },
187
+ ff: {
188
+ type: [String, Object],
189
+ required: false
190
+ },
191
+ fz: {
192
+ type: null,
193
+ required: false
194
+ },
195
+ fw: {
196
+ type: null,
197
+ required: false
198
+ },
199
+ lts: {
200
+ type: null,
201
+ required: false
202
+ },
203
+ ta: {
204
+ type: [String, Object],
205
+ required: false
206
+ },
207
+ lh: {
208
+ type: null,
209
+ required: false
210
+ },
211
+ fs: {
212
+ type: null,
213
+ required: false
214
+ },
215
+ tt: {
216
+ type: [String, Object],
217
+ required: false
218
+ },
219
+ td: {
220
+ type: null,
221
+ required: false
222
+ },
223
+ w: {
224
+ type: null,
225
+ required: false
226
+ },
227
+ miw: {
228
+ type: null,
229
+ required: false
230
+ },
231
+ maw: {
232
+ type: null,
233
+ required: false
234
+ },
235
+ h: {
236
+ type: null,
237
+ required: false
238
+ },
239
+ mih: {
240
+ type: null,
241
+ required: false
242
+ },
243
+ mah: {
244
+ type: null,
245
+ required: false
246
+ },
247
+ bgsz: {
248
+ type: null,
249
+ required: false
250
+ },
251
+ bgp: {
252
+ type: null,
253
+ required: false
254
+ },
255
+ bgr: {
256
+ type: null,
257
+ required: false
258
+ },
259
+ bga: {
260
+ type: null,
261
+ required: false
262
+ },
263
+ pos: {
264
+ type: [String, Object],
265
+ required: false
266
+ },
267
+ top: {
268
+ type: null,
269
+ required: false
270
+ },
271
+ left: {
272
+ type: null,
273
+ required: false
274
+ },
275
+ bottom: {
276
+ type: null,
277
+ required: false
278
+ },
279
+ right: {
280
+ type: null,
281
+ required: false
282
+ },
283
+ inset: {
284
+ type: null,
285
+ required: false
286
+ },
287
+ display: {
288
+ type: null,
289
+ required: false
290
+ },
291
+ flex: {
292
+ type: null,
293
+ required: false
294
+ },
295
+ unstyled: {
296
+ type: Boolean,
297
+ required: false
298
+ },
299
+ variant: {
300
+ type: null,
301
+ required: false
302
+ },
303
+ classNames: {
304
+ type: null,
305
+ required: false
306
+ },
307
+ styles: {
308
+ type: null,
309
+ required: false
310
+ },
311
+ vars: {
312
+ type: Function,
313
+ required: false
314
+ },
315
+ attributes: {
316
+ type: null,
317
+ required: false
318
+ }
319
+ },
320
+ setup(__props, { expose: __expose }) {
321
+ const _root = (0, vue.ref)(null);
322
+ const _alpha = (0, vue.ref)(null);
323
+ const _shadow = (0, vue.ref)(null);
324
+ const _color = (0, vue.ref)(null);
325
+ const _children = (0, vue.ref)(null);
326
+ const attrs = (0, vue.useAttrs)();
327
+ const rawProps = __props;
328
+ const defaultProps = { withShadow: true };
329
+ const props = require_use_component_props.useComponentProps({
330
+ component: "CColorSwatch",
331
+ defaultProps,
332
+ props: rawProps
333
+ });
334
+ const knownProps = [
335
+ "classNames",
336
+ "className",
337
+ "style",
338
+ "styles",
339
+ "unstyled",
340
+ "vars",
341
+ "color",
342
+ "radius",
343
+ "withShadow",
344
+ "attributes"
345
+ ];
346
+ const styleProps = (0, vue.computed)(() => ({
347
+ ...props.value,
348
+ ...attrs,
349
+ style: attrs.style ?? props.value.style
350
+ }));
351
+ const getStyles = require_use_styles.useStyles({
352
+ name: "ColorSwatch",
353
+ props: styleProps,
354
+ classes: require_color_swatch_module.default,
355
+ className: () => props.value.className,
356
+ style: () => props.value.style,
357
+ classNames: props.value.classNames,
358
+ styles: props.value.styles,
359
+ unstyled: props.value.unstyled,
360
+ attributes: props.value.attributes,
361
+ vars: props.value.vars,
362
+ varsResolver: require_color_swatch_utils.varsResolver
363
+ });
364
+ const rootAttrs = (0, vue.computed)(() => getStyles("root", { focusable: true }));
365
+ const alphaAttrs = (0, vue.computed)(() => getStyles("alphaOverlay"));
366
+ const shadowAttrs = (0, vue.computed)(() => getStyles("shadowOverlay"));
367
+ const colorAttrs = (0, vue.computed)(() => getStyles("colorOverlay", { style: { backgroundColor: props.value.color } }));
368
+ const childrenAttrs = (0, vue.computed)(() => getStyles("childrenOverlay"));
369
+ const mergedRootAttrs = (0, vue.computed)(() => {
370
+ const others = {};
371
+ const propsValue = props.value;
372
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
373
+ const userMod = props.value.mod;
374
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod]];
375
+ return {
376
+ ...others,
377
+ mod: mergedMod,
378
+ ...rootAttrs.value
379
+ };
380
+ });
381
+ __expose({
382
+ root: (0, vue.computed)(() => _root.value?.root ?? null),
383
+ alphaOverlay: (0, vue.computed)(() => _alpha.value?.root ?? null),
384
+ shadowOverlay: (0, vue.computed)(() => _shadow.value?.root ?? null),
385
+ colorOverlay: (0, vue.computed)(() => _color.value?.root ?? null),
386
+ childrenOverlay: (0, vue.computed)(() => _children.value?.root ?? null)
387
+ });
388
+ const __returned__ = {
389
+ _root,
390
+ _alpha,
391
+ _shadow,
392
+ _color,
393
+ _children,
394
+ attrs,
395
+ rawProps,
396
+ defaultProps,
397
+ props,
398
+ knownProps,
399
+ styleProps,
400
+ getStyles,
401
+ rootAttrs,
402
+ alphaAttrs,
403
+ shadowAttrs,
404
+ colorAttrs,
405
+ childrenAttrs,
406
+ mergedRootAttrs,
407
+ get CBox() {
408
+ return require_index.CBox;
409
+ }
410
+ };
411
+ Object.defineProperty(__returned__, "__isScriptSetup", {
412
+ enumerable: false,
413
+ value: true
414
+ });
415
+ return __returned__;
416
+ }
417
+ });
418
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
419
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_root" }, $setup.mergedRootAttrs), {
420
+ default: (0, vue.withCtx)(() => [
421
+ (0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({ tag: "span" }, $setup.alphaAttrs), null, 16),
422
+ $setup.props.withShadow ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
423
+ key: 0,
424
+ tag: "span"
425
+ }, $setup.shadowAttrs), null, 16)) : (0, vue.createCommentVNode)("v-if", true),
426
+ (0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({ tag: "span" }, $setup.colorAttrs), null, 16),
427
+ (0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({ tag: "span" }, $setup.childrenAttrs), {
428
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
429
+ _: 3
430
+ }, 16)
431
+ ]),
432
+ _: 3
433
+ }, 16);
434
+ }
435
+ var color_swatch_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/color-swatch/color-swatch.vue"]]);
436
+ //#endregion
437
+ exports.default = color_swatch_default;
438
+
439
+ //# sourceMappingURL=color-swatch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-swatch.cjs","names":[],"sources":["../../../src/components/color-swatch/color-swatch.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box tag=\"span\" v-bind=\"alphaAttrs\"></c-box>\n <c-box tag=\"span\" v-bind=\"shadowAttrs\" v-if=\"props.withShadow\"></c-box>\n <c-box tag=\"span\" v-bind=\"colorAttrs\"></c-box>\n <c-box tag=\"span\" v-bind=\"childrenAttrs\">\n <slot />\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { ColorSwatchFactory, ColorSwatchProps } from './color-swatch.types'\nimport classes from './color-swatch.module.css'\nimport { varsResolver } from './color-swatch.utils'\n\ndefineOptions({\n name: 'CColorSwatch',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _alpha = ref<InstanceType<typeof CBox> | null>(null)\nconst _shadow = ref<InstanceType<typeof CBox> | null>(null)\nconst _color = ref<InstanceType<typeof CBox> | null>(null)\nconst _children = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ColorSwatchProps>()\n\nconst defaultProps = {\n withShadow: true,\n} satisfies Partial<ColorSwatchProps>\n\nconst props = useComponentProps({\n component: 'CColorSwatch',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'color',\n 'radius',\n 'withShadow',\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<ColorSwatchFactory>({\n name: 'ColorSwatch',\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 }))\nconst alphaAttrs = computed(() => getStyles('alphaOverlay'))\nconst shadowAttrs = computed(() => getStyles('shadowOverlay'))\nconst colorAttrs = computed(() =>\n getStyles('colorOverlay', { style: { backgroundColor: props.value.color } })\n)\nconst childrenAttrs = computed(() => getStyles('childrenOverlay'))\n\nconst mergedRootAttrs = 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 = [...(Array.isArray(userMod) ? userMod : [userMod])]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n alphaOverlay: computed(() => _alpha.value?.root ?? null),\n shadowOverlay: computed(() => _shadow.value?.root ?? null),\n colorOverlay: computed(() => _color.value?.root ?? null),\n childrenOverlay: computed(() => _children.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,YAAA,CAAoB,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA;;IAAhE,KAAI;MAAe,OAAA,WAAW,GAAA,MAAA,EAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA;wBACS,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAAvC,KAAI,OAAM,GAAS,OAAA,UAAU,GAAA,MAAA,EAAA;wBAG5B,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,OAAM,GAAS,OAAA,aAAa,GAAA;oCAC7B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/color-swatch/color-swatch.module.css
3
+ var color_swatch_module_default = {
4
+ "root": "m_c2451869",
5
+ "colorOverlay": "m_169647f4",
6
+ "shadowOverlay": "m_1528cf69",
7
+ "alphaOverlay": "m_25d7a599",
8
+ "childrenOverlay": "m_5065cf6a"
9
+ };
10
+ //#endregion
11
+ exports.default = color_swatch_module_default;
12
+
13
+ //# sourceMappingURL=color-swatch.module.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-swatch.module.cjs","names":[],"sources":["../../../src/components/color-swatch/color-swatch.module.css"],"sourcesContent":[".root {\n --cs-size: 28px;\n --cs-radius: 1000px;\n\n -webkit-tap-highlight-color: transparent;\n border: none;\n appearance: none;\n display: block;\n line-height: 1;\n position: relative;\n width: var(--cs-size);\n height: var(--cs-size);\n min-width: var(--cs-size);\n min-height: var(--cs-size);\n border-radius: var(--cs-radius);\n color: inherit;\n text-decoration: none;\n\n @mixin light {\n --alpha-overlay-color: var(--c-color-gray-3);\n --alpha-overlay-bg: var(--c-color-white);\n }\n\n @mixin dark {\n --alpha-overlay-color: var(--c-color-dark-4);\n --alpha-overlay-bg: var(--c-color-dark-7);\n }\n}\n\n.colorOverlay {\n position: absolute;\n inset: 0;\n border-radius: var(--cs-radius);\n}\n\n.shadowOverlay {\n position: absolute;\n inset: 0;\n border-radius: var(--cs-radius);\n z-index: 1;\n box-shadow:\n rgba(0, 0, 0, 0.1) 0 0 0 rem(1px) inset,\n rgb(0, 0, 0, 0.15) 0 0 rem(4px) inset;\n}\n\n.alphaOverlay {\n position: absolute;\n inset: 0;\n border-radius: var(--cs-radius);\n background-size: 8px 8px;\n background-position:\n 0 0,\n 0 4px,\n 4px -4px,\n -4px 0;\n background-image:\n linear-gradient(45deg, var(--alpha-overlay-color) 25%, transparent 25%),\n linear-gradient(-45deg, var(--alpha-overlay-color) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--alpha-overlay-color) 75%),\n linear-gradient(-45deg, var(--alpha-overlay-bg) 75%, var(--alpha-overlay-color) 75%);\n}\n\n.childrenOverlay {\n position: absolute;\n inset: 0;\n border-radius: var(--cs-radius);\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n"],"mappings":";;AAAA,IAAA,8BAAe;CAAC,QAAO;CAAa,gBAAe;CAAa,iBAAgB;CAAa,gBAAe;CAAa,mBAAkB;AAAY"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ const require_rem = require("../../core/utils/units-converters/rem.cjs");
3
+ const require_get_size = require("../../core/utils/get-size/get-size.cjs");
4
+ //#region packages/@cck-ui/core/src/components/color-swatch/color-swatch.utils.ts
5
+ const varsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs").createVarsResolver((_, { radius, size }) => ({ root: {
6
+ "--cs-radius": radius === void 0 ? void 0 : require_get_size.getRadius(radius),
7
+ "--cs-size": require_rem.rem(size)
8
+ } }));
9
+ //#endregion
10
+ exports.varsResolver = varsResolver;
11
+
12
+ //# sourceMappingURL=color-swatch.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-swatch.utils.cjs","names":["createVarsResolver","getRadius","rem"],"sources":["../../../src/components/color-swatch/color-swatch.utils.ts"],"sourcesContent":["import { createVarsResolver, getRadius, rem } from '../../core'\nimport { ColorSwatchFactory } from './color-swatch.types'\n\nexport const varsResolver = createVarsResolver<ColorSwatchFactory>((_, { radius, size }) => ({\n root: {\n '--cs-radius': radius === undefined ? undefined : getRadius(radius),\n '--cs-size': rem(size),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,4FAAeA,CAAAA,CAAAA,oBAAwC,GAAG,EAAE,QAAQ,YAAY,EAC3F,MAAM;CACJ,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CAClE,aAAaC,YAAAA,IAAI,IAAI;AACvB,EACF,EAAE"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ const require_install = require("../../core/utils/vue/install.cjs");
3
+ const require_statics = require("../../core/utils/vue/statics.cjs");
4
+ const require_color_swatch_module = require("./color-swatch.module.cjs");
5
+ const require_color_swatch_utils = require("./color-swatch.utils.cjs");
6
+ const require_color_swatch = require("./color-swatch.cjs");
7
+ //#region packages/@cck-ui/core/src/components/color-swatch/index.ts
8
+ const ColorSwatchWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_color_swatch.default, require_color_swatch_module.default), require_color_swatch_utils.varsResolver)));
9
+ const CColorSwatch = require_install.withInstall(ColorSwatchWithStatic);
10
+ //#endregion
11
+ exports.CColorSwatch = CColorSwatch;
12
+ exports.default = CColorSwatch;
13
+
14
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","ColorSwatch","classes","varsResolver","withInstall"],"sources":["../../../src/components/color-swatch/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport classes from './color-swatch.module.css'\nimport { varsResolver } from './color-swatch.utils'\nimport ColorSwatch from './color-swatch.vue'\n\nconst ColorSwatchWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(ColorSwatch, classes), varsResolver))\n)\n\nexport const CColorSwatch: SFCWithInstallAndClasses<typeof ColorSwatch, typeof classes> =\n withInstall(ColorSwatchWithStatic)\n\nexport default CColorSwatch\n\nexport * from './color-swatch.types'\n"],"mappings":";;;;;;;AAYA,MAAM,wBAAwBA,gBAAAA,iBAC5BC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,qBAAAA,SAAaC,4BAAAA,OAAO,GAAGC,2BAAAA,YAAY,CAAC,CAC9E;AAEA,MAAa,eACXC,gBAAAA,YAAY,qBAAqB"}