@cck-ui/core 0.38.0 → 0.40.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 (39) hide show
  1. package/cjs/components/blockquote/blockquote.cjs +435 -0
  2. package/cjs/components/blockquote/blockquote.cjs.map +1 -0
  3. package/cjs/components/blockquote/blockquote.module.cjs +11 -0
  4. package/cjs/components/blockquote/blockquote.module.cjs.map +1 -0
  5. package/cjs/components/blockquote/blockquote.utils.cjs +31 -0
  6. package/cjs/components/blockquote/blockquote.utils.cjs.map +1 -0
  7. package/cjs/components/blockquote/index.cjs +14 -0
  8. package/cjs/components/blockquote/index.cjs.map +1 -0
  9. package/cjs/components/number-formatter/index.cjs +12 -0
  10. package/cjs/components/number-formatter/index.cjs.map +1 -0
  11. package/cjs/components/number-formatter/number-formatter.cjs +120 -0
  12. package/cjs/components/number-formatter/number-formatter.cjs.map +1 -0
  13. package/cjs/index.cjs +114 -108
  14. package/cjs/index.cjs.map +1 -1
  15. package/esm/components/blockquote/blockquote.mjs +435 -0
  16. package/esm/components/blockquote/blockquote.mjs.map +1 -0
  17. package/esm/components/blockquote/blockquote.module.mjs +11 -0
  18. package/esm/components/blockquote/blockquote.module.mjs.map +1 -0
  19. package/esm/components/blockquote/blockquote.utils.mjs +32 -0
  20. package/esm/components/blockquote/blockquote.utils.mjs.map +1 -0
  21. package/esm/components/blockquote/index.mjs +11 -0
  22. package/esm/components/blockquote/index.mjs.map +1 -0
  23. package/esm/components/number-formatter/index.mjs +9 -0
  24. package/esm/components/number-formatter/index.mjs.map +1 -0
  25. package/esm/components/number-formatter/number-formatter.mjs +120 -0
  26. package/esm/components/number-formatter/number-formatter.mjs.map +1 -0
  27. package/esm/index.mjs +5 -1
  28. package/esm/index.mjs.map +1 -1
  29. package/lib/components/blockquote/blockquote.types.d.ts +30 -0
  30. package/lib/components/blockquote/blockquote.utils.d.ts +6 -0
  31. package/lib/components/blockquote/index.d.ts +6 -0
  32. package/lib/components/index.d.ts +2 -0
  33. package/lib/components/number-formatter/index.d.ts +5 -0
  34. package/lib/components/number-formatter/number-formatter.types.d.ts +36 -0
  35. package/package.json +1 -1
  36. package/styles/blockquote.css +42 -0
  37. package/styles/blockquote.layer.css +43 -0
  38. package/styles.css +43 -0
  39. package/styles.layer.css +43 -0
@@ -0,0 +1,435 @@
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_blockquote_module = require("./blockquote.module.cjs");
7
+ const require_blockquote_utils = require("./blockquote.utils.cjs");
8
+ let vue = require("vue");
9
+ //#region packages/@cck-ui/core/src/components/blockquote/blockquote.vue
10
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
11
+ name: "CBlockquote",
12
+ __name: "blockquote",
13
+ props: {
14
+ iconSize: {
15
+ type: [Number, String],
16
+ required: false
17
+ },
18
+ color: {
19
+ type: null,
20
+ required: false
21
+ },
22
+ radius: {
23
+ type: null,
24
+ required: false
25
+ },
26
+ textWrap: {
27
+ type: String,
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 _icon = (0, vue.ref)(null);
323
+ const _cite = (0, vue.ref)(null);
324
+ const attrs = (0, vue.useAttrs)();
325
+ const rawProps = __props;
326
+ const defaultProps = { iconSize: 48 };
327
+ const props = require_use_component_props.useComponentProps({
328
+ component: "CBlockquote",
329
+ defaultProps,
330
+ props: rawProps
331
+ });
332
+ const knownProps = [
333
+ "classNames",
334
+ "className",
335
+ "style",
336
+ "styles",
337
+ "unstyled",
338
+ "vars",
339
+ "textWrap",
340
+ "attributes"
341
+ ];
342
+ const styleProps = (0, vue.computed)(() => ({
343
+ ...props.value,
344
+ ...attrs,
345
+ style: attrs.style ?? props.value.style
346
+ }));
347
+ const getStyles = require_use_styles.useStyles({
348
+ name: "Blockquote",
349
+ classes: require_blockquote_module.default,
350
+ props: styleProps,
351
+ className: () => props.value.className,
352
+ style: () => props.value.style,
353
+ classNames: props.value.classNames,
354
+ styles: props.value.styles,
355
+ unstyled: props.value.unstyled,
356
+ attributes: props.value.attributes,
357
+ vars: props.value.vars,
358
+ varsResolver: require_blockquote_utils.varsResolver
359
+ });
360
+ const rootAttrs = (0, vue.computed)(() => getStyles("root"));
361
+ const iconAttrs = (0, vue.computed)(() => getStyles("icon"));
362
+ const citeAttrs = (0, vue.computed)(() => getStyles("cite"));
363
+ const mergedRootAttrs = (0, vue.computed)(() => {
364
+ const others = {};
365
+ const propsValue = props.value;
366
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
367
+ const userMod = props.value.mod;
368
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod]];
369
+ return {
370
+ ...others,
371
+ mod: mergedMod,
372
+ ...rootAttrs.value
373
+ };
374
+ });
375
+ __expose({
376
+ root: (0, vue.computed)(() => _root.value?.root ?? null),
377
+ icon: (0, vue.computed)(() => _icon.value?.root ?? null),
378
+ cite: (0, vue.computed)(() => _cite.value?.root ?? null)
379
+ });
380
+ const __returned__ = {
381
+ _root,
382
+ _icon,
383
+ _cite,
384
+ attrs,
385
+ rawProps,
386
+ defaultProps,
387
+ props,
388
+ knownProps,
389
+ styleProps,
390
+ getStyles,
391
+ rootAttrs,
392
+ iconAttrs,
393
+ citeAttrs,
394
+ mergedRootAttrs,
395
+ get CBox() {
396
+ return require_index.CBox;
397
+ }
398
+ };
399
+ Object.defineProperty(__returned__, "__isScriptSetup", {
400
+ enumerable: false,
401
+ value: true
402
+ });
403
+ return __returned__;
404
+ }
405
+ });
406
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
407
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
408
+ ref: "_root",
409
+ tag: "blockquote"
410
+ }, $setup.mergedRootAttrs), {
411
+ default: (0, vue.withCtx)(() => [
412
+ _ctx.$slots.icon ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
413
+ key: 0,
414
+ tag: "span"
415
+ }, $setup.iconAttrs), {
416
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "icon")]),
417
+ _: 3
418
+ }, 16)) : (0, vue.createCommentVNode)("v-if", true),
419
+ (0, vue.renderSlot)(_ctx.$slots, "default"),
420
+ _ctx.$slots.cite ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
421
+ key: 1,
422
+ tag: "cite"
423
+ }, $setup.citeAttrs), {
424
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "cite")]),
425
+ _: 3
426
+ }, 16)) : (0, vue.createCommentVNode)("v-if", true)
427
+ ]),
428
+ _: 3
429
+ }, 16);
430
+ }
431
+ var blockquote_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/blockquote/blockquote.vue"]]);
432
+ //#endregion
433
+ exports.default = blockquote_default;
434
+
435
+ //# sourceMappingURL=blockquote.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockquote.cjs","names":[],"sources":["../../../src/components/blockquote/blockquote.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"blockquote\" v-bind=\"mergedRootAttrs\">\n <c-box tag=\"span\" v-bind=\"iconAttrs\" v-if=\"$slots.icon\">\n <slot name=\"icon\"></slot>\n </c-box>\n <slot></slot>\n <c-box tag=\"cite\" v-bind=\"citeAttrs\" v-if=\"$slots.cite\">\n <slot name=\"cite\"></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 classes from './blockquote.module.css'\nimport { BlockquoteFactory, BlockquoteProps } from './blockquote.types'\nimport { varsResolver } from './blockquote.utils'\n\ndefineOptions({\n name: 'CBlockquote',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _icon = ref<InstanceType<typeof CBox> | null>(null)\nconst _cite = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<BlockquoteProps>()\n\nconst defaultProps = {\n iconSize: 48,\n} satisfies Partial<BlockquoteProps>\n\nconst props = useComponentProps({\n component: 'CBlockquote',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'textWrap',\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<BlockquoteFactory>({\n name: 'Blockquote',\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\nconst rootAttrs = computed(() => getStyles('root'))\nconst iconAttrs = computed(() => getStyles('icon'))\nconst citeAttrs = computed(() => getStyles('cite'))\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 icon: computed(() => _icon.value?.root ?? null),\n cite: computed(() => _cite.value?.root ?? null),\n})\n</script>\n"],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/blockquote/blockquote.module.css
3
+ var blockquote_module_default = {
4
+ "root": "m_195949e0",
5
+ "icon": "m_19550577",
6
+ "cite": "m_19526255"
7
+ };
8
+ //#endregion
9
+ exports.default = blockquote_module_default;
10
+
11
+ //# sourceMappingURL=blockquote.module.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockquote.module.cjs","names":[],"sources":["../../../src/components/blockquote/blockquote.module.css"],"sourcesContent":[".root {\n --blockquote-border: 3px solid var(--bq-bd);\n\n position: relative;\n margin: 0;\n text-wrap: var(--bq-text-wrap, var(--c-text-wrap));\n border-inline-start: var(--blockquote-border);\n border-start-end-radius: var(--bq-radius);\n border-end-end-radius: var(--bq-radius);\n padding: var(--c-spacing-xl) rem(38px);\n\n @mixin where-light {\n background-color: var(--bq-bg-light);\n }\n\n @mixin where-dark {\n background-color: var(--bq-bg-dark);\n }\n}\n\n.icon {\n --blockquote-icon-offset: calc(var(--bq-icon-size) / -2);\n\n position: absolute;\n color: var(--bq-bd);\n background-color: var(--c-color-body);\n display: flex;\n align-items: center;\n justify-content: center;\n top: var(--blockquote-icon-offset);\n inset-inline-start: var(--blockquote-icon-offset);\n width: var(--bq-icon-size);\n height: var(--bq-icon-size);\n border-radius: var(--bq-icon-size);\n}\n\n.cite {\n display: block;\n margin-top: var(--c-spacing-md);\n opacity: 0.6;\n font-size: 85%;\n}\n"],"mappings":";;AAAA,IAAA,4BAAe;CAAC,QAAO;CAAa,QAAO;CAAa,QAAO;AAAY"}
@@ -0,0 +1,31 @@
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
+ const require_rgba = require("../../core/config-provider/color-functions/rgba/rgba.cjs");
5
+ const require_parse_theme_color = require("../../core/config-provider/color-functions/parse-theme-color/parse-theme-color.cjs");
6
+ const require_get_theme_color = require("../../core/config-provider/color-functions/get-theme-color/get-theme-color.cjs");
7
+ //#region packages/@cck-ui/core/src/components/blockquote/blockquote.utils.ts
8
+ const varsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs").createVarsResolver((theme, { color, iconSize, radius, textWrap }) => {
9
+ const darkParsed = require_parse_theme_color.parseThemeColor({
10
+ color: color || theme.primaryColor,
11
+ theme,
12
+ colorScheme: "dark"
13
+ });
14
+ const lightParsed = require_parse_theme_color.parseThemeColor({
15
+ color: color || theme.primaryColor,
16
+ theme,
17
+ colorScheme: "light"
18
+ });
19
+ return { root: {
20
+ "--bq-bd": require_get_theme_color.getThemeColor(color, theme),
21
+ "--bq-bg-dark": require_rgba.rgba(darkParsed.value, .06),
22
+ "--bq-bg-light": require_rgba.rgba(lightParsed.value, .07),
23
+ "--bq-icon-size": require_rem.rem(iconSize),
24
+ "--bq-radius": require_get_size.getRadius(radius),
25
+ "--bq-text-wrap": textWrap
26
+ } };
27
+ });
28
+ //#endregion
29
+ exports.varsResolver = varsResolver;
30
+
31
+ //# sourceMappingURL=blockquote.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockquote.utils.cjs","names":["createVarsResolver","parseThemeColor","getThemeColor","rgba","rem","getRadius"],"sources":["../../../src/components/blockquote/blockquote.utils.ts"],"sourcesContent":["import {\n createVarsResolver,\n getRadius,\n getThemeColor,\n parseThemeColor,\n rem,\n rgba,\n} from '../../core'\nimport { BlockquoteFactory } from './blockquote.types'\n\nexport const varsResolver = createVarsResolver<BlockquoteFactory>(\n (theme, { color, iconSize, radius, textWrap }) => {\n const darkParsed = parseThemeColor({\n color: color || theme.primaryColor,\n theme,\n colorScheme: 'dark',\n })\n\n const lightParsed = parseThemeColor({\n color: color || theme.primaryColor,\n theme,\n colorScheme: 'light',\n })\n\n return {\n root: {\n '--bq-bd': getThemeColor(color, theme),\n '--bq-bg-dark': rgba(darkParsed.value, 0.06),\n '--bq-bg-light': rgba(lightParsed.value, 0.07),\n '--bq-icon-size': rem(iconSize),\n '--bq-radius': getRadius(radius),\n '--bq-text-wrap': textWrap,\n },\n }\n }\n)\n"],"mappings":";;;;;;;AAUA,MAAa,4FAAeA,CAAAA,CAAAA,oBACzB,OAAO,EAAE,OAAO,UAAU,QAAQ,eAAe;CAChD,MAAM,aAAaC,0BAAAA,gBAAgB;EACjC,OAAO,SAAS,MAAM;EACtB;EACA,aAAa;CACf,CAAC;CAED,MAAM,cAAcA,0BAAAA,gBAAgB;EAClC,OAAO,SAAS,MAAM;EACtB;EACA,aAAa;CACf,CAAC;CAED,OAAO,EACL,MAAM;EACJ,WAAWC,wBAAAA,cAAc,OAAO,KAAK;EACrC,gBAAgBC,aAAAA,KAAK,WAAW,OAAO,GAAI;EAC3C,iBAAiBA,aAAAA,KAAK,YAAY,OAAO,GAAI;EAC7C,kBAAkBC,YAAAA,IAAI,QAAQ;EAC9B,eAAeC,iBAAAA,UAAU,MAAM;EAC/B,kBAAkB;CACpB,EACF;AACF,CACF"}
@@ -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_blockquote_module = require("./blockquote.module.cjs");
5
+ const require_blockquote_utils = require("./blockquote.utils.cjs");
6
+ const require_blockquote = require("./blockquote.cjs");
7
+ //#region packages/@cck-ui/core/src/components/blockquote/index.ts
8
+ const BlockquoteWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_blockquote.default, require_blockquote_module.default), require_blockquote_utils.varsResolver)));
9
+ const CBlockquote = require_install.withInstall(BlockquoteWithStatic);
10
+ //#endregion
11
+ exports.CBlockquote = CBlockquote;
12
+ exports.default = CBlockquote;
13
+
14
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","Blockquote","classes","varsResolver","withInstall"],"sources":["../../../src/components/blockquote/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport Blockquote from './blockquote.vue'\nimport classes from './blockquote.module.css'\nimport { varsResolver } from './blockquote.utils'\n\nconst BlockquoteWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Blockquote, classes), varsResolver))\n)\n\nexport const CBlockquote: SFCWithInstallAndClasses<typeof Blockquote, typeof classes> =\n withInstall(BlockquoteWithStatic)\n\nexport default CBlockquote\n\nexport * from './blockquote.types'\n"],"mappings":";;;;;;;AAYA,MAAM,uBAAuBA,gBAAAA,iBAC3BC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,mBAAAA,SAAYC,0BAAAA,OAAO,GAAGC,yBAAAA,YAAY,CAAC,CAC7E;AAEA,MAAa,cACXC,gBAAAA,YAAY,oBAAoB"}
@@ -0,0 +1,12 @@
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_number_formatter = require("./number-formatter.cjs");
5
+ //#region packages/@cck-ui/core/src/components/number-formatter/index.ts
6
+ const NumberFormatterWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_number_formatter.default));
7
+ const CNumberFormatter = require_install.withInstall(NumberFormatterWithStatic);
8
+ //#endregion
9
+ exports.CNumberFormatter = CNumberFormatter;
10
+ exports.default = CNumberFormatter;
11
+
12
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","NumberFormatter","withInstall"],"sources":["../../../src/components/number-formatter/index.ts"],"sourcesContent":["import { SFCWithInstall, withExtend, withInstall, withPropsFactory } from '../../core'\nimport NumberFormatter from './number-formatter.vue'\n\nconst NumberFormatterWithStatic = withPropsFactory(withExtend(NumberFormatter))\n\nexport const CNumberFormatter: SFCWithInstall<typeof NumberFormatter> =\n withInstall(NumberFormatterWithStatic)\n\nexport default CNumberFormatter\n\nexport * from './number-formatter.types'\n"],"mappings":";;;;;AAGA,MAAM,4BAA4BA,gBAAAA,iBAAiBC,gBAAAA,WAAWC,yBAAAA,OAAe,CAAC;AAE9E,MAAa,mBACXC,gBAAAA,YAAY,yBAAyB"}
@@ -0,0 +1,120 @@
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
+ let vue = require("vue");
5
+ //#region packages/@cck-ui/core/src/components/number-formatter/number-formatter.vue
6
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
7
+ name: "CNumberFormatter",
8
+ __name: "number-formatter",
9
+ props: {
10
+ value: {
11
+ type: [Number, String],
12
+ required: false
13
+ },
14
+ allowNegative: {
15
+ type: Boolean,
16
+ required: false
17
+ },
18
+ decimalScale: {
19
+ type: Number,
20
+ required: false
21
+ },
22
+ decimalSeparator: {
23
+ type: String,
24
+ required: false
25
+ },
26
+ fixedDecimalScale: {
27
+ type: Boolean,
28
+ required: false
29
+ },
30
+ prefix: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ suffix: {
35
+ type: String,
36
+ required: false
37
+ },
38
+ thousandsGroupStyle: {
39
+ type: String,
40
+ required: false
41
+ },
42
+ thousandSeparator: {
43
+ type: [String, Boolean],
44
+ required: false
45
+ }
46
+ },
47
+ setup(__props, { expose: __expose }) {
48
+ __expose();
49
+ const rawProps = __props;
50
+ const defaultProps = {
51
+ allowNegative: true,
52
+ decimalScale: Infinity,
53
+ decimalSeparator: ".",
54
+ fixedDecimalScale: false,
55
+ thousandSeparator: ",",
56
+ thousandsGroupStyle: "thousand",
57
+ prefix: "",
58
+ suffix: ""
59
+ };
60
+ const props = require_use_component_props.useComponentProps({
61
+ component: "CNumberFormatter",
62
+ defaultProps,
63
+ props: rawProps
64
+ });
65
+ const __returned__ = {
66
+ rawProps,
67
+ defaultProps,
68
+ props,
69
+ formatted: (0, vue.computed)(() => {
70
+ const { value, allowNegative, decimalScale, decimalSeparator, fixedDecimalScale, prefix, suffix, thousandSeparator, thousandsGroupStyle } = props.value;
71
+ if (value === void 0 || value === null) return null;
72
+ let num = typeof value === "string" ? parseFloat(value) : value;
73
+ if (isNaN(num)) return String(value);
74
+ if (!allowNegative && num < 0) num = Math.abs(num);
75
+ let [intPart, decPart] = num.toString().split(".");
76
+ if (decPart === void 0) decPart = "";
77
+ if (decimalScale !== void 0 && Number.isFinite(decimalScale)) {
78
+ const factor = 10 ** decimalScale;
79
+ num = Math.round(num * factor) / factor;
80
+ const parts = num.toString().split(".");
81
+ intPart = parts[0];
82
+ decPart = parts[1] || "";
83
+ if (fixedDecimalScale) decPart = decPart.padEnd(decimalScale, "0");
84
+ else if (decimalScale === 0) decPart = "";
85
+ }
86
+ let sep = defaultProps.thousandSeparator;
87
+ if (typeof thousandSeparator === "string") sep = thousandSeparator === "" ? defaultProps.thousandSeparator : thousandSeparator;
88
+ else if (typeof thousandSeparator === "boolean") sep = thousandSeparator ? defaultProps.thousandSeparator : "";
89
+ let formattedInt = intPart;
90
+ if (sep && thousandsGroupStyle !== "none") if (thousandsGroupStyle === "thousand") formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
91
+ else if (thousandsGroupStyle === "wan") formattedInt = intPart.replace(/\B(?=(\d{4})+(?!\d))/g, sep);
92
+ else if (thousandsGroupStyle === "lakh") {
93
+ const len = intPart.length;
94
+ if (len <= 3) formattedInt = intPart;
95
+ else {
96
+ const firstGroup = len % 2 === 0 ? 2 : 1;
97
+ formattedInt = [intPart.slice(0, firstGroup), ...intPart.slice(firstGroup).match(/.{1,2}/g) || []].join(sep);
98
+ }
99
+ } else formattedInt = intPart;
100
+ let result = formattedInt;
101
+ if (decPart) result += decimalSeparator + decPart;
102
+ return prefix + result + suffix;
103
+ })
104
+ };
105
+ Object.defineProperty(__returned__, "__isScriptSetup", {
106
+ enumerable: false,
107
+ value: true
108
+ });
109
+ return __returned__;
110
+ }
111
+ });
112
+ const _hoisted_1 = { key: 0 };
113
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
114
+ return $setup.formatted !== null ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1, (0, vue.toDisplayString)($setup.formatted), 1)) : (0, vue.createCommentVNode)("v-if", true);
115
+ }
116
+ var number_formatter_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/number-formatter/number-formatter.vue"]]);
117
+ //#endregion
118
+ exports.default = number_formatter_default;
119
+
120
+ //# sourceMappingURL=number-formatter.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-formatter.cjs","names":[],"sources":["../../../src/components/number-formatter/number-formatter.vue"],"sourcesContent":["<template>\n <span v-if=\"formatted !== null\">{{ formatted }}</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useComponentProps } from '../../core'\nimport { NumberFormatterProps } from './number-formatter.types'\n\ndefineOptions({\n name: 'CNumberFormatter',\n})\n\nconst rawProps = defineProps<NumberFormatterProps>()\n\nconst defaultProps: Partial<NumberFormatterProps> = {\n allowNegative: true,\n decimalScale: Infinity,\n decimalSeparator: '.',\n fixedDecimalScale: false,\n thousandSeparator: ',',\n thousandsGroupStyle: 'thousand',\n prefix: '',\n suffix: '',\n}\n\nconst props = useComponentProps({\n component: 'CNumberFormatter',\n defaultProps,\n props: rawProps,\n})\n\nconst formatted = computed(() => {\n const {\n value,\n allowNegative,\n decimalScale,\n decimalSeparator,\n fixedDecimalScale,\n prefix,\n suffix,\n thousandSeparator,\n thousandsGroupStyle,\n } = props.value\n\n if (value === undefined || value === null) {\n return null\n }\n\n let num = typeof value === 'string' ? parseFloat(value) : value\n if (isNaN(num)) {\n return String(value)\n }\n\n if (!allowNegative && num < 0) {\n num = Math.abs(num)\n }\n\n let [intPart, decPart] = num.toString().split('.')\n if (decPart === undefined) {\n decPart = ''\n }\n\n if (decimalScale !== undefined && Number.isFinite(decimalScale)) {\n const factor = 10 ** decimalScale\n num = Math.round(num * factor) / factor\n const parts = num.toString().split('.')\n intPart = parts[0]\n decPart = parts[1] || ''\n if (fixedDecimalScale) {\n decPart = decPart.padEnd(decimalScale, '0')\n } else if (decimalScale === 0) {\n decPart = ''\n }\n }\n\n let sep: string = defaultProps.thousandSeparator as string\n if (typeof thousandSeparator === 'string') {\n sep = thousandSeparator === '' ? (defaultProps.thousandSeparator as string) : thousandSeparator\n } else if (typeof thousandSeparator === 'boolean') {\n sep = thousandSeparator ? (defaultProps.thousandSeparator as string) : ''\n }\n\n let formattedInt = intPart\n if (sep && thousandsGroupStyle !== 'none') {\n if (thousandsGroupStyle === 'thousand') {\n formattedInt = intPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, sep)\n } else if (thousandsGroupStyle === 'wan') {\n formattedInt = intPart.replace(/\\B(?=(\\d{4})+(?!\\d))/g, sep)\n } else if (thousandsGroupStyle === 'lakh') {\n const len = intPart.length\n if (len <= 3) {\n formattedInt = intPart\n } else {\n const firstGroup = len % 2 === 0 ? 2 : 1\n const parts = [\n intPart.slice(0, firstGroup),\n ...(intPart.slice(firstGroup).match(/.{1,2}/g) || []),\n ]\n formattedInt = parts.join(sep)\n }\n } else {\n formattedInt = intPart\n }\n }\n\n let result = formattedInt\n if (decPart) {\n result += decimalSeparator + decPart\n }\n return prefix + result + suffix\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,WAAW;EAEjB,MAAM,eAA8C;GAClD,eAAe;GACf,cAAc;GACd,kBAAkB;GAClB,mBAAmB;GACnB,mBAAmB;GACnB,qBAAqB;GACrB,QAAQ;GACR,QAAQ;EACV;EAEA,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;;;;;sCAEgC;IAC/B,MAAM,EACJ,OACA,eACA,cACA,kBACA,mBACA,QACA,QACA,mBACA,wBACE,MAAM;IAEV,IAAI,UAAU,KAAA,KAAa,UAAU,MACnC,OAAO;IAGT,IAAI,MAAM,OAAO,UAAU,WAAW,WAAW,KAAK,IAAI;IAC1D,IAAI,MAAM,GAAG,GACX,OAAO,OAAO,KAAK;IAGrB,IAAI,CAAC,iBAAiB,MAAM,GAC1B,MAAM,KAAK,IAAI,GAAG;IAGpB,IAAI,CAAC,SAAS,WAAW,IAAI,SAAS,CAAC,CAAC,MAAM,GAAG;IACjD,IAAI,YAAY,KAAA,GACd,UAAU;IAGZ,IAAI,iBAAiB,KAAA,KAAa,OAAO,SAAS,YAAY,GAAG;KAC/D,MAAM,SAAS,MAAM;KACrB,MAAM,KAAK,MAAM,MAAM,MAAM,IAAI;KACjC,MAAM,QAAQ,IAAI,SAAS,CAAC,CAAC,MAAM,GAAG;KACtC,UAAU,MAAM;KAChB,UAAU,MAAM,MAAM;KACtB,IAAI,mBACF,UAAU,QAAQ,OAAO,cAAc,GAAG;UACrC,IAAI,iBAAiB,GAC1B,UAAU;IAEd;IAEA,IAAI,MAAc,aAAa;IAC/B,IAAI,OAAO,sBAAsB,UAC/B,MAAM,sBAAsB,KAAM,aAAa,oBAA+B;SACzE,IAAI,OAAO,sBAAsB,WACtC,MAAM,oBAAqB,aAAa,oBAA+B;IAGzE,IAAI,eAAe;IACnB,IAAI,OAAO,wBAAwB,QACjC,IAAI,wBAAwB,YAC1B,eAAe,QAAQ,QAAQ,yBAAyB,GAAG;SACtD,IAAI,wBAAwB,OACjC,eAAe,QAAQ,QAAQ,yBAAyB,GAAG;SACtD,IAAI,wBAAwB,QAAQ;KACzC,MAAM,MAAM,QAAQ;KACpB,IAAI,OAAO,GACT,eAAe;UACV;MACL,MAAM,aAAa,MAAM,MAAM,IAAI,IAAI;MAKvC,eAAe,CAHb,QAAQ,MAAM,GAAG,UAAU,GAC3B,GAAI,QAAQ,MAAM,UAAU,CAAC,CAAC,MAAM,SAAS,KAAK,CAAC,CAEtC,CAAA,CAAM,KAAK,GAAG;KAC/B;IACF,OACE,eAAe;IAInB,IAAI,SAAS;IACb,IAAI,SACF,UAAU,mBAAmB;IAE/B,OAAO,SAAS,SAAS;GAC3B,CAAA;;;;;;;;;;;QA9Gc,OAAA,cAAS,SAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,mBAAA,CAAiC,QAAA,aAAA,GAAA,IAAA,gBAAA,CAAnB,OAAA,SAAS,GAAA,CAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA"}