@cck-ui/core 0.12.2 → 0.13.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex-props.mjs","names":[],"sources":["../../../src/components/flex/flex-props.ts"],"sourcesContent":["import { SystemPropData } from '../../core'\n\nexport const FLEX_STYLE_PROPS_DATA: Record<string, SystemPropData> = {\n gap: { type: 'spacing', property: 'gap' },\n rowGap: { type: 'spacing', property: 'rowGap' },\n columnGap: { type: 'spacing', property: 'columnGap' },\n\n align: { type: 'identity', property: 'alignItems' },\n justify: { type: 'identity', property: 'justifyContent' },\n wrap: { type: 'identity', property: 'flexWrap' },\n direction: { type: 'identity', property: 'flexDirection' },\n}\n"],"mappings":";;AAEA,MAAa,wBAAwD;CACnE,KAAK;EAAE,MAAM;EAAW,UAAU;CAAM;CACxC,QAAQ;EAAE,MAAM;EAAW,UAAU;CAAS;CAC9C,WAAW;EAAE,MAAM;EAAW,UAAU;CAAY;CAEpD,OAAO;EAAE,MAAM;EAAY,UAAU;CAAa;CAClD,SAAS;EAAE,MAAM;EAAY,UAAU;CAAiB;CACxD,MAAM;EAAE,MAAM;EAAY,UAAU;CAAW;CAC/C,WAAW;EAAE,MAAM;EAAY,UAAU;CAAgB;AAC3D"}
@@ -0,0 +1,478 @@
1
+ "use client";
2
+ import { filterProps } from "../../core/utils/filter-props/filter-props.mjs";
3
+ import { useCckTheme } from "../../core/config-provider/config-provider.context.mjs";
4
+ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
5
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
6
+ import { parseStyleProps } from "../../core/box/style-props/parse-style-props/parse-style-props.mjs";
7
+ import { responsiveStyleManager } from "../../core/responsive-style-manager/responsive-style-manager.mjs";
8
+ import { hashStyleProps } from "../../core/responsive-style-manager/hash-styles.mjs";
9
+ import { stylesToString } from "../../core/responsive-style-manager/styles-to-string/styles-to-string.mjs";
10
+ import { useRandomClassName } from "../../core/box/use-random-classname/use-random-classname.mjs";
11
+ import { CBox } from "../../core/box/index.mjs";
12
+ import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
13
+ import flex_module_default from "./flex.module.mjs";
14
+ import { FLEX_STYLE_PROPS_DATA } from "./flex-props.mjs";
15
+ import { computed, createBlock, defineComponent, mergeProps, onUnmounted, openBlock, ref, renderSlot, useAttrs, watchEffect, withCtx } from "vue";
16
+ //#region packages/@cck-ui/core/src/components/flex/flex.vue
17
+ const _sfc_main = /*@__PURE__*/ defineComponent({
18
+ name: "CFlex",
19
+ __name: "flex",
20
+ props: {
21
+ gap: {
22
+ type: null,
23
+ required: false
24
+ },
25
+ rowGap: {
26
+ type: null,
27
+ required: false
28
+ },
29
+ columnGap: {
30
+ type: null,
31
+ required: false
32
+ },
33
+ align: {
34
+ type: null,
35
+ required: false
36
+ },
37
+ justify: {
38
+ type: null,
39
+ required: false
40
+ },
41
+ wrap: {
42
+ type: null,
43
+ required: false
44
+ },
45
+ direction: {
46
+ type: null,
47
+ required: false
48
+ },
49
+ className: {
50
+ type: String,
51
+ required: false
52
+ },
53
+ style: {
54
+ type: [
55
+ Object,
56
+ Function,
57
+ Array
58
+ ],
59
+ required: false,
60
+ skipCheck: true
61
+ },
62
+ __vars: {
63
+ type: null,
64
+ required: false
65
+ },
66
+ __size: {
67
+ type: String,
68
+ required: false
69
+ },
70
+ hiddenFrom: {
71
+ type: null,
72
+ required: false
73
+ },
74
+ visibleFrom: {
75
+ type: null,
76
+ required: false
77
+ },
78
+ lightHidden: {
79
+ type: Boolean,
80
+ required: false
81
+ },
82
+ darkHidden: {
83
+ type: Boolean,
84
+ required: false
85
+ },
86
+ mod: {
87
+ type: [
88
+ Object,
89
+ String,
90
+ Array
91
+ ],
92
+ required: false
93
+ },
94
+ m: {
95
+ type: null,
96
+ required: false
97
+ },
98
+ my: {
99
+ type: null,
100
+ required: false
101
+ },
102
+ mx: {
103
+ type: null,
104
+ required: false
105
+ },
106
+ mt: {
107
+ type: null,
108
+ required: false
109
+ },
110
+ mb: {
111
+ type: null,
112
+ required: false
113
+ },
114
+ ms: {
115
+ type: null,
116
+ required: false
117
+ },
118
+ me: {
119
+ type: null,
120
+ required: false
121
+ },
122
+ mis: {
123
+ type: null,
124
+ required: false
125
+ },
126
+ mie: {
127
+ type: null,
128
+ required: false
129
+ },
130
+ ml: {
131
+ type: null,
132
+ required: false
133
+ },
134
+ mr: {
135
+ type: null,
136
+ required: false
137
+ },
138
+ p: {
139
+ type: null,
140
+ required: false
141
+ },
142
+ py: {
143
+ type: null,
144
+ required: false
145
+ },
146
+ px: {
147
+ type: null,
148
+ required: false
149
+ },
150
+ pt: {
151
+ type: null,
152
+ required: false
153
+ },
154
+ pb: {
155
+ type: null,
156
+ required: false
157
+ },
158
+ ps: {
159
+ type: null,
160
+ required: false
161
+ },
162
+ pe: {
163
+ type: null,
164
+ required: false
165
+ },
166
+ pis: {
167
+ type: null,
168
+ required: false
169
+ },
170
+ pie: {
171
+ type: null,
172
+ required: false
173
+ },
174
+ pl: {
175
+ type: null,
176
+ required: false
177
+ },
178
+ pr: {
179
+ type: null,
180
+ required: false
181
+ },
182
+ bd: {
183
+ type: null,
184
+ required: false
185
+ },
186
+ bdrs: {
187
+ type: null,
188
+ required: false
189
+ },
190
+ bg: {
191
+ type: null,
192
+ required: false
193
+ },
194
+ c: {
195
+ type: null,
196
+ required: false
197
+ },
198
+ opacity: {
199
+ type: [
200
+ String,
201
+ Object,
202
+ Number
203
+ ],
204
+ required: false
205
+ },
206
+ ff: {
207
+ type: [String, Object],
208
+ required: false
209
+ },
210
+ fz: {
211
+ type: null,
212
+ required: false
213
+ },
214
+ fw: {
215
+ type: null,
216
+ required: false
217
+ },
218
+ lts: {
219
+ type: null,
220
+ required: false
221
+ },
222
+ ta: {
223
+ type: [String, Object],
224
+ required: false
225
+ },
226
+ lh: {
227
+ type: null,
228
+ required: false
229
+ },
230
+ fs: {
231
+ type: null,
232
+ required: false
233
+ },
234
+ tt: {
235
+ type: [String, Object],
236
+ required: false
237
+ },
238
+ td: {
239
+ type: null,
240
+ required: false
241
+ },
242
+ w: {
243
+ type: null,
244
+ required: false
245
+ },
246
+ miw: {
247
+ type: null,
248
+ required: false
249
+ },
250
+ maw: {
251
+ type: null,
252
+ required: false
253
+ },
254
+ h: {
255
+ type: null,
256
+ required: false
257
+ },
258
+ mih: {
259
+ type: null,
260
+ required: false
261
+ },
262
+ mah: {
263
+ type: null,
264
+ required: false
265
+ },
266
+ bgsz: {
267
+ type: null,
268
+ required: false
269
+ },
270
+ bgp: {
271
+ type: null,
272
+ required: false
273
+ },
274
+ bgr: {
275
+ type: null,
276
+ required: false
277
+ },
278
+ bga: {
279
+ type: null,
280
+ required: false
281
+ },
282
+ pos: {
283
+ type: [String, Object],
284
+ required: false
285
+ },
286
+ top: {
287
+ type: null,
288
+ required: false
289
+ },
290
+ left: {
291
+ type: null,
292
+ required: false
293
+ },
294
+ bottom: {
295
+ type: null,
296
+ required: false
297
+ },
298
+ right: {
299
+ type: null,
300
+ required: false
301
+ },
302
+ inset: {
303
+ type: null,
304
+ required: false
305
+ },
306
+ display: {
307
+ type: null,
308
+ required: false
309
+ },
310
+ flex: {
311
+ type: null,
312
+ required: false
313
+ },
314
+ unstyled: {
315
+ type: Boolean,
316
+ required: false
317
+ },
318
+ variant: {
319
+ type: null,
320
+ required: false
321
+ },
322
+ classNames: {
323
+ type: null,
324
+ required: false
325
+ },
326
+ styles: {
327
+ type: null,
328
+ required: false
329
+ },
330
+ vars: {
331
+ type: Function,
332
+ required: false
333
+ },
334
+ attributes: {
335
+ type: null,
336
+ required: false
337
+ }
338
+ },
339
+ setup(__props, { expose: __expose }) {
340
+ const _root = ref(null);
341
+ const attrs = useAttrs();
342
+ const rawProps = __props;
343
+ const props = useComponentProps({
344
+ component: "CFlex",
345
+ defaultProps: {},
346
+ props: rawProps
347
+ });
348
+ const knownProps = [
349
+ "classNames",
350
+ "className",
351
+ "style",
352
+ "styles",
353
+ "unstyled",
354
+ "vars",
355
+ "gap",
356
+ "rowGap",
357
+ "columnGap",
358
+ "align",
359
+ "justify",
360
+ "wrap",
361
+ "direction",
362
+ "attributes"
363
+ ];
364
+ const getStyles = useStyles({
365
+ name: "Flex",
366
+ classes: flex_module_default,
367
+ props: {
368
+ ...props.value,
369
+ ...attrs
370
+ },
371
+ className: props.value.className,
372
+ style: props.value.style,
373
+ classNames: props.value.classNames,
374
+ styles: props.value.styles,
375
+ unstyled: props.value.unstyled,
376
+ attributes: props.value.attributes,
377
+ vars: props.value.vars
378
+ });
379
+ const theme = useCckTheme();
380
+ const randomClassName = useRandomClassName();
381
+ const parsedStyleProps = parseStyleProps({
382
+ styleProps: {
383
+ gap: props.value.gap,
384
+ rowGap: props.value.rowGap,
385
+ columnGap: props.value.columnGap,
386
+ align: props.value.align,
387
+ justify: props.value.justify,
388
+ wrap: props.value.wrap,
389
+ direction: props.value.direction
390
+ },
391
+ theme: theme.value,
392
+ data: FLEX_STYLE_PROPS_DATA
393
+ });
394
+ const responsiveClassName = parsedStyleProps.hasResponsiveStyles ? hashStyleProps(parsedStyleProps.styles, parsedStyleProps.media) : randomClassName;
395
+ const rootAttrs = computed(() => getStyles("root", { className: responsiveClassName }));
396
+ const mergedStyle = computed(() => {
397
+ const rootStyle = rootAttrs.value.style || {};
398
+ const inlineStyles = filterProps(parsedStyleProps.inlineStyles);
399
+ return {
400
+ ...rootStyle,
401
+ ...inlineStyles
402
+ };
403
+ });
404
+ const mergedAttrs = computed(() => {
405
+ const others = {};
406
+ const propsValue = props.value;
407
+ Object.keys(propsValue).forEach((key) => {
408
+ if (!knownProps.includes(key)) others[key] = propsValue[key];
409
+ });
410
+ const userMod = props.value.mod;
411
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
412
+ return {
413
+ ...others,
414
+ mod: mergedMod,
415
+ ...rootAttrs.value,
416
+ style: mergedStyle.value
417
+ };
418
+ });
419
+ const queryStyles = {
420
+ styles: parsedStyleProps.styles,
421
+ media: parsedStyleProps.media,
422
+ selector: responsiveClassName
423
+ };
424
+ const queryStylesString = stylesToString(queryStyles);
425
+ const currentStyleKey = ref(null);
426
+ watchEffect(() => {
427
+ if (queryStylesString) {
428
+ const newKey = responsiveStyleManager.register(queryStylesString);
429
+ if (currentStyleKey.value && currentStyleKey.value !== newKey) responsiveStyleManager.unregister(currentStyleKey.value);
430
+ currentStyleKey.value = newKey;
431
+ } else if (currentStyleKey.value) {
432
+ responsiveStyleManager.unregister(currentStyleKey.value);
433
+ currentStyleKey.value = null;
434
+ }
435
+ });
436
+ onUnmounted(() => {
437
+ if (currentStyleKey.value) responsiveStyleManager.unregister(currentStyleKey.value);
438
+ });
439
+ __expose({ root: computed(() => _root.value?.root ?? null) });
440
+ const __returned__ = {
441
+ _root,
442
+ attrs,
443
+ rawProps,
444
+ props,
445
+ knownProps,
446
+ getStyles,
447
+ theme,
448
+ randomClassName,
449
+ parsedStyleProps,
450
+ responsiveClassName,
451
+ rootAttrs,
452
+ mergedStyle,
453
+ mergedAttrs,
454
+ queryStyles,
455
+ queryStylesString,
456
+ currentStyleKey,
457
+ get CBox() {
458
+ return CBox;
459
+ }
460
+ };
461
+ Object.defineProperty(__returned__, "__isScriptSetup", {
462
+ enumerable: false,
463
+ value: true
464
+ });
465
+ return __returned__;
466
+ }
467
+ });
468
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
469
+ return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedAttrs), {
470
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
471
+ _: 3
472
+ }, 16);
473
+ }
474
+ var flex_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/flex/flex.vue"]]);
475
+ //#endregion
476
+ export { flex_default as default };
477
+
478
+ //# sourceMappingURL=flex.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.mjs","names":[],"sources":["../../../src/components/flex/flex.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n filterProps,\n hashStyleProps,\n parseStyleProps,\n responsiveStyleManager,\n stylesToString,\n useCckTheme,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport classes from './flex.module.css'\nimport { FlexFactory, FlexProps } from './flex.types'\nimport { FLEX_STYLE_PROPS_DATA } from './flex-props'\n\ndefineOptions({\n name: 'CFlex',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<FlexProps>()\n\nconst props = useComponentProps({\n component: 'CFlex',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'align',\n 'justify',\n 'wrap',\n 'direction',\n 'attributes',\n]\n\nconst getStyles = useStyles<FlexFactory>({\n name: 'Flex',\n classes,\n props: { ...props.value, ...attrs } as FlexProps,\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})\n\nconst theme = useCckTheme()\nconst randomClassName = useRandomClassName()\n\nconst parsedStyleProps = parseStyleProps({\n styleProps: {\n gap: props.value.gap,\n rowGap: props.value.rowGap,\n columnGap: props.value.columnGap,\n align: props.value.align,\n justify: props.value.justify,\n wrap: props.value.wrap,\n direction: props.value.direction,\n },\n theme: theme.value,\n data: FLEX_STYLE_PROPS_DATA,\n})\n\nconst responsiveClassName = parsedStyleProps.hasResponsiveStyles\n ? hashStyleProps(parsedStyleProps.styles, parsedStyleProps.media)\n : randomClassName\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassName }))\n\nconst mergedStyle = computed(() => {\n const rootStyle = rootAttrs.value.style || {}\n const inlineStyles = filterProps(parsedStyleProps.inlineStyles)\n return { ...rootStyle, ...inlineStyles }\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 = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return {\n ...others,\n mod: mergedMod,\n ...rootAttrs.value,\n style: mergedStyle.value,\n }\n})\n\nconst queryStyles = {\n styles: parsedStyleProps.styles,\n media: parsedStyleProps.media,\n selector: responsiveClassName,\n}\n\nconst queryStylesString = stylesToString(queryStyles)\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n if (queryStylesString) {\n const newKey = responsiveStyleManager.register(queryStylesString)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
3
+ var flex_module_default = { "root": "m_148db636" };
4
+ //#endregion
5
+ export { flex_module_default as default };
6
+
7
+ //# sourceMappingURL=flex.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.module.mjs","names":[],"sources":["../../../src/components/flex/flex.module.css"],"sourcesContent":[".root {\n display: flex;\n}\n"],"mappings":";;AAAA,IAAA,sBAAe,EAAC,QAAO,aAAY"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withClasses, withExtend, withPropsFactory } from "../../core/utils/vue/statics.mjs";
4
+ import flex_module_default from "./flex.module.mjs";
5
+ import flex_default from "./flex.mjs";
6
+ const CFlex = withInstall(withPropsFactory(withExtend(withClasses(flex_default, flex_module_default))));
7
+ //#endregion
8
+ export { CFlex, CFlex as default };
9
+
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Flex","classes"],"sources":["../../../src/components/flex/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n} from '../../core'\nimport Flex from './flex.vue'\nimport classes from './flex.module.css'\n\nconst FlexWithStatic = withPropsFactory(withExtend(withClasses(Flex, classes)))\n\nexport const CFlex: SFCWithInstallAndClasses<typeof Flex, typeof classes> =\n withInstall(FlexWithStatic)\n\nexport default CFlex\n\nexport * from './flex.types'\n"],"mappings":";;;;;AAYA,MAAa,QACX,YAHqB,iBAAiB,WAAW,YAAYA,cAAMC,mBAAO,CAAC,CAG/D,CAAc"}
package/esm/index.mjs CHANGED
@@ -61,6 +61,7 @@ import { CTransition } from "./components/transition/index.mjs";
61
61
  import { CButton, CButtonGroup, CButtonGroupSection } from "./components/button/index.mjs";
62
62
  import { CCenter } from "./components/center/index.mjs";
63
63
  import { CContainer } from "./components/container/index.mjs";
64
+ import { CFlex } from "./components/flex/index.mjs";
64
65
  import { CCol, CGrid } from "./components/grid/index.mjs";
65
66
  import { CGroup } from "./components/group/index.mjs";
66
67
  import { CSimpleGrid } from "./components/simple-grid/index.mjs";
@@ -82,6 +83,7 @@ const components = [
82
83
  CCloseButton,
83
84
  CCol,
84
85
  CContainer,
86
+ CFlex,
85
87
  CGrid,
86
88
  CGroup,
87
89
  CLoader,
@@ -102,6 +104,6 @@ const CckUI = { install(app) {
102
104
  });
103
105
  } };
104
106
  //#endregion
105
- export { CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CDefaultLoaders, CGrid, CGroup, CLoader, CONFIG_KEY, CSimpleGrid, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, 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, 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 };
107
+ export { CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CDefaultLoaders, CFlex, CGrid, CGroup, CLoader, CONFIG_KEY, CSimpleGrid, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, 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, 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 };
106
108
 
107
109
  //# 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 CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\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 CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,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;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 CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CFlex,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\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 CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CFlex,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,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;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,2 @@
1
+ import { SystemPropData } from '../../core';
2
+ export declare const FLEX_STYLE_PROPS_DATA: Record<string, SystemPropData>;
@@ -0,0 +1,39 @@
1
+ import { Properties } from 'csstype';
2
+ import { BoxProps, CSpacing, ElementProps, PolymorphicFactory, StyleProp, StylesApiProps } from '../../core';
3
+ export type FlexStylesNames = 'root';
4
+ export interface FlexProps extends BoxProps, StylesApiProps<FlexFactory>, /* @vue-ignore */ ElementProps<'div'> {
5
+ /**
6
+ * @description Gap between columns and rows, key of `theme.spacing` or any valid CSS
7
+ */
8
+ gap?: StyleProp<CSpacing>;
9
+ /**
10
+ * @description Row gap, overrides `gap` for vertical spacing
11
+ */
12
+ rowGap?: StyleProp<CSpacing>;
13
+ /**
14
+ * @description Column gap, overrides `gap` for horizontal spacing
15
+ */
16
+ columnGap?: StyleProp<CSpacing>;
17
+ /**
18
+ * @description Sets `align-items`
19
+ */
20
+ align?: StyleProp<Properties['alignItems']>;
21
+ /**
22
+ * @description Sets `justify-content`
23
+ */
24
+ justify?: StyleProp<Properties['justifyContent']>;
25
+ /**
26
+ * @description Sets `flex-wrap`
27
+ */
28
+ wrap?: StyleProp<Properties['flexWrap']>;
29
+ /**
30
+ * @description Sets `flex-direction`
31
+ */
32
+ direction?: StyleProp<Properties['flexDirection']>;
33
+ }
34
+ export type FlexFactory = PolymorphicFactory<{
35
+ props: FlexProps;
36
+ defaultRef: HTMLDivElement;
37
+ defaultComponent: 'div';
38
+ stylesNames: FlexStylesNames;
39
+ }>;
@@ -0,0 +1,6 @@
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
+ import Flex from './flex.vue';
3
+ import classes from './flex.module.css';
4
+ export declare const CFlex: SFCWithInstallAndClasses<typeof Flex, typeof classes>;
5
+ export default CFlex;
6
+ export * from './flex.types';
@@ -4,6 +4,7 @@ export * from './button';
4
4
  export * from './center';
5
5
  export * from './close-button';
6
6
  export * from './container';
7
+ export * from './flex';
7
8
  export * from './grid';
8
9
  export * from './group';
9
10
  export * from './loader';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
4
4
  "description": "Vue component library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://cck-ui.jackatlas.xyz",
6
6
  "license": "ISC",
@@ -0,0 +1,3 @@
1
+ .m_148db636 {
2
+ display: flex;
3
+ }
@@ -0,0 +1,4 @@
1
+ @layer cck {.m_148db636 {
2
+ display: flex;
3
+ }
4
+ }
package/styles.css CHANGED
@@ -1086,6 +1086,10 @@ fieldset:disabled .c-active:active {
1086
1086
  margin-inline: auto;
1087
1087
  }
1088
1088
 
1089
+ .m_148db636 {
1090
+ display: flex;
1091
+ }
1092
+
1089
1093
  .m_c031daba {
1090
1094
  container: c-grid / inline-size;
1091
1095
  }
package/styles.layer.css CHANGED
@@ -1086,6 +1086,10 @@ fieldset:disabled .c-active:active {
1086
1086
  margin-inline: auto;
1087
1087
  }
1088
1088
 
1089
+ .m_148db636 {
1090
+ display: flex;
1091
+ }
1092
+
1089
1093
  .m_c031daba {
1090
1094
  container: c-grid / inline-size;
1091
1095
  }