@cck-ui/core 0.8.1 → 0.9.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,408 @@
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_container_utils = require("./container.utils.cjs");
7
+ const require_container_module = require("./container.module.cjs");
8
+ let vue = require("vue");
9
+ //#region packages/@cck-ui/core/src/components/container/container.vue
10
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
11
+ name: "CContainer",
12
+ __name: "container",
13
+ props: {
14
+ size: {
15
+ type: [
16
+ String,
17
+ Object,
18
+ Number
19
+ ],
20
+ required: false
21
+ },
22
+ fluid: {
23
+ type: Boolean,
24
+ required: false
25
+ },
26
+ strategy: {
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 attrs = (0, vue.useAttrs)();
323
+ const rawProps = __props;
324
+ const defaultProps = { strategy: "block" };
325
+ const props = require_use_component_props.useComponentProps({
326
+ component: "CContainer",
327
+ defaultProps,
328
+ props: rawProps
329
+ });
330
+ const knownProps = [
331
+ "classNames",
332
+ "className",
333
+ "style",
334
+ "styles",
335
+ "unstyled",
336
+ "vars",
337
+ "fluid",
338
+ "mod",
339
+ "attributes",
340
+ "strategy"
341
+ ];
342
+ const modList = (0, vue.computed)(() => [{
343
+ fluid: props.value.fluid,
344
+ strategy: props.value.strategy
345
+ }]);
346
+ const getStyles = require_use_styles.useStyles({
347
+ name: "Container",
348
+ props: {
349
+ ...props.value,
350
+ ...attrs
351
+ },
352
+ classes: require_container_module.default,
353
+ className: props.value.className,
354
+ style: props.value.style,
355
+ classNames: props.value.classNames,
356
+ styles: props.value.styles,
357
+ unstyled: props.value.unstyled,
358
+ attributes: props.value.attributes,
359
+ vars: props.value.vars,
360
+ varsResolver: require_container_utils.varsResolver
361
+ });
362
+ const rootAttrs = (0, vue.computed)(() => getStyles("root"));
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].filter(Boolean), ...modList.value || []];
369
+ return {
370
+ ...others,
371
+ mod: mergedMod,
372
+ ...rootAttrs.value
373
+ };
374
+ });
375
+ __expose({ root: (0, vue.computed)(() => _root.value?.root ?? null) });
376
+ const __returned__ = {
377
+ _root,
378
+ attrs,
379
+ rawProps,
380
+ defaultProps,
381
+ props,
382
+ knownProps,
383
+ modList,
384
+ getStyles,
385
+ rootAttrs,
386
+ mergedRootAttrs,
387
+ get CBox() {
388
+ return require_index.CBox;
389
+ }
390
+ };
391
+ Object.defineProperty(__returned__, "__isScriptSetup", {
392
+ enumerable: false,
393
+ value: true
394
+ });
395
+ return __returned__;
396
+ }
397
+ });
398
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
399
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_root" }, $setup.mergedRootAttrs), {
400
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
401
+ _: 3
402
+ }, 16);
403
+ }
404
+ var container_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/container/container.vue"]]);
405
+ //#endregion
406
+ exports.default = container_default;
407
+
408
+ //# sourceMappingURL=container.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.cjs","names":[],"sources":["../../../src/components/container/container.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport { ContainerFactory, ContainerProps } from './container.types'\nimport { varsResolver } from './container.utils'\nimport classes from './container.module.css'\n\ndefineOptions({\n name: 'CContainer',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ContainerProps>()\n\nconst defaultProps = {\n strategy: 'block',\n} satisfies Partial<ContainerProps>\n\nconst props = useComponentProps({\n component: 'CContainer',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'fluid',\n 'mod',\n 'attributes',\n 'strategy',\n]\n\nconst modList = computed(() => [{ fluid: props.value.fluid, strategy: props.value.strategy }])\n\nconst getStyles = useStyles<ContainerFactory>({\n name: 'Container',\n props: { ...props.value, ...attrs } as ContainerProps,\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'))\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 = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,UAAU,QACZ;EAEA,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,WAAA,GAAA,IAAA,SAAA,OAAyB,CAAC;GAAE,OAAO,MAAM,MAAM;GAAO,UAAU,MAAM,MAAM;EAAS,CAAC,CAAC;EAE7F,MAAM,YAAY,mBAAA,UAA4B;GAC5C,MAAM;GACN,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;GAClC,SAAA,yBAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB,cAAA,wBAAA;EACF,CAAC;EAED,MAAM,aAAA,GAAA,IAAA,SAAA,OAA2B,UAAU,MAAM,CAAC;EAElD,MAAM,mBAAA,GAAA,IAAA,SAAA,OAAiC;GACrC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,OAAA,GAAA,IAAA,SAAA,OAAqB,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;mDA/ES,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,QAAO,GAAS,OAAA,eAAe,GAAA;kCAChC,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/container/container.module.css
3
+ var container_module_default = { "root": "m_b03efeae" };
4
+ //#endregion
5
+ exports.default = container_module_default;
6
+
7
+ //# sourceMappingURL=container.module.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.module.cjs","names":[],"sources":["../../../src/components/container/container.module.css"],"sourcesContent":[".root {\n --container-size-xs: 540px;\n --container-size-sm: 720px;\n --container-size-md: 960px;\n --container-size-lg: 1140px;\n --container-size-xl: 1320px;\n --container-size: var(--container-size-md);\n\n &:where([data-strategy='block']) {\n max-width: var(--container-size);\n padding-inline: var(--c-spacing-md);\n margin-inline: auto;\n\n &:where([data-fluid]) {\n max-width: 100%;\n }\n }\n\n &:where([data-strategy='grid']) {\n display: grid;\n grid-template-columns: 1fr min(100%, var(--container-size)) 1fr;\n margin-inline: auto;\n\n & > * {\n grid-column: 2;\n }\n\n & > [data-breakout] {\n grid-column: 1 / -1;\n\n & > [data-container] {\n max-width: var(--container-size);\n margin-inline: auto;\n }\n }\n }\n}\n"],"mappings":";;AAAA,IAAA,2BAAe,EAAC,QAAO,aAAY"}
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ const require_get_size = require("../../core/utils/get-size/get-size.cjs");
3
+ //#region packages/@cck-ui/core/src/components/container/container.utils.ts
4
+ const varsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs").createVarsResolver((_, { size, fluid }) => ({ root: { "--container-size": fluid ? void 0 : require_get_size.getSize(size, "container-size") } }));
5
+ //#endregion
6
+ exports.varsResolver = varsResolver;
7
+
8
+ //# sourceMappingURL=container.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.utils.cjs","names":["createVarsResolver","getSize"],"sources":["../../../src/components/container/container.utils.ts"],"sourcesContent":["import { createVarsResolver, getSize } from '../../core'\nimport { ContainerFactory } from './container.types'\n\nexport const varsResolver = createVarsResolver<ContainerFactory>((_, { size, fluid }) => ({\n root: {\n '--container-size': fluid ? undefined : getSize(size, 'container-size'),\n },\n}))\n"],"mappings":";;;AAGA,MAAa,4FAAeA,CAAAA,CAAAA,oBAAsC,GAAG,EAAE,MAAM,aAAa,EACxF,MAAM,EACJ,oBAAoB,QAAQ,KAAA,IAAYC,iBAAAA,QAAQ,MAAM,gBAAgB,EACxE,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_container_utils = require("./container.utils.cjs");
5
+ const require_container_module = require("./container.module.cjs");
6
+ const require_container = require("./container.cjs");
7
+ //#region packages/@cck-ui/core/src/components/container/index.ts
8
+ const ContainerWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_container.default, require_container_module.default), require_container_utils.varsResolver)));
9
+ const CContainer = require_install.withInstall(ContainerWithStatic);
10
+ //#endregion
11
+ exports.CContainer = CContainer;
12
+ exports.default = CContainer;
13
+
14
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","Container","classes","varsResolver","withInstall"],"sources":["../../../src/components/container/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\n\nimport Container from './container.vue'\nimport classes from './container.module.css'\nimport { varsResolver } from './container.utils'\n\nconst ContainerWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Container, classes), varsResolver))\n)\n\nexport const CContainer: SFCWithInstallAndClasses<typeof Container, typeof classes> =\n withInstall(ContainerWithStatic)\n\nexport default CContainer\n\nexport * from './container.types'\n"],"mappings":";;;;;;;AAaA,MAAM,sBAAsBA,gBAAAA,iBAC1BC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,kBAAAA,SAAWC,yBAAAA,OAAO,GAAGC,wBAAAA,YAAY,CAAC,CAC5E;AAEA,MAAa,aACXC,gBAAAA,YAAY,mBAAmB"}
package/cjs/index.cjs CHANGED
@@ -62,11 +62,12 @@ const require_get_transition_props = require("./components/transition/get-transi
62
62
  const require_index$6 = require("./components/transition/index.cjs");
63
63
  const require_index$7 = require("./components/button/index.cjs");
64
64
  const require_index$8 = require("./components/center/index.cjs");
65
- const require_index$9 = require("./components/grid/index.cjs");
66
- const require_index$10 = require("./components/group/index.cjs");
67
- const require_index$11 = require("./components/simple-grid/index.cjs");
68
- const require_index$12 = require("./components/stack/index.cjs");
69
- const require_index$13 = require("./components/text/index.cjs");
65
+ const require_index$9 = require("./components/container/index.cjs");
66
+ const require_index$10 = require("./components/grid/index.cjs");
67
+ const require_index$11 = require("./components/group/index.cjs");
68
+ const require_index$12 = require("./components/simple-grid/index.cjs");
69
+ const require_index$13 = require("./components/stack/index.cjs");
70
+ const require_index$14 = require("./components/text/index.cjs");
70
71
  let _vue_shared = require("@vue/shared");
71
72
  //#region packages/@cck-ui/core/src/index.ts
72
73
  const INSTALLED_KEY = Symbol("INSTALLED_KEY");
@@ -78,13 +79,14 @@ const components = [
78
79
  require_index$7.CButtonGroup,
79
80
  require_index$7.CButtonGroupSection,
80
81
  require_index$8.CCenter,
81
- require_index$9.CCol,
82
- require_index$9.CGrid,
83
- require_index$10.CGroup,
82
+ require_index$10.CCol,
83
+ require_index$9.CContainer,
84
+ require_index$10.CGrid,
85
+ require_index$11.CGroup,
84
86
  require_index$5.CLoader,
85
- require_index$11.CSimpleGrid,
86
- require_index$12.CStack,
87
- require_index$13.CText,
87
+ require_index$12.CSimpleGrid,
88
+ require_index$13.CStack,
89
+ require_index$14.CText,
88
90
  require_index$6.CTransition,
89
91
  require_index$4.UnstyledButton
90
92
  ];
@@ -103,15 +105,16 @@ exports.CButtonGroup = require_index$7.CButtonGroup;
103
105
  exports.CButtonGroupSection = require_index$7.CButtonGroupSection;
104
106
  exports.CCK_TRANSITIONS = require_transitions.transitions;
105
107
  exports.CCenter = require_index$8.CCenter;
106
- exports.CCol = require_index$9.CCol;
108
+ exports.CCol = require_index$10.CCol;
109
+ exports.CContainer = require_index$9.CContainer;
107
110
  exports.CDefaultLoaders = require_index$5.CDefaultLoaders;
108
- exports.CGrid = require_index$9.CGrid;
109
- exports.CGroup = require_index$10.CGroup;
111
+ exports.CGrid = require_index$10.CGrid;
112
+ exports.CGroup = require_index$11.CGroup;
110
113
  exports.CLoader = require_index$5.CLoader;
111
114
  exports.CONFIG_KEY = require_config_provider_types.CONFIG_KEY;
112
- exports.CSimpleGrid = require_index$11.CSimpleGrid;
113
- exports.CStack = require_index$12.CStack;
114
- exports.CText = require_index$13.CText;
115
+ exports.CSimpleGrid = require_index$12.CSimpleGrid;
116
+ exports.CStack = require_index$13.CStack;
117
+ exports.CText = require_index$14.CText;
115
118
  exports.CTransition = require_index$6.CTransition;
116
119
  exports.CckConfigProvider = require_index$1.CckConfigProvider;
117
120
  exports.CckUI = CckUI;
package/cjs/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["CckConfigProvider","CBox","CAspectRatio","CButton","CButtonGroup","CButtonGroupSection","CCenter","CCol","CGrid","CGroup","CLoader","CSimpleGrid","CStack","CText","CTransition","UnstyledButton"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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 CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjBA,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;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.cjs","names":["CckConfigProvider","CBox","CAspectRatio","CButton","CButtonGroup","CButtonGroupSection","CCenter","CCol","CContainer","CGrid","CGroup","CLoader","CSimpleGrid","CStack","CText","CTransition","UnstyledButton"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CContainer,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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 CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CContainer,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjBA,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;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,408 @@
1
+ "use client";
2
+ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
3
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
4
+ import { CBox } from "../../core/box/index.mjs";
5
+ import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
6
+ import { varsResolver } from "./container.utils.mjs";
7
+ import container_module_default from "./container.module.mjs";
8
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
9
+ //#region packages/@cck-ui/core/src/components/container/container.vue
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ name: "CContainer",
12
+ __name: "container",
13
+ props: {
14
+ size: {
15
+ type: [
16
+ String,
17
+ Object,
18
+ Number
19
+ ],
20
+ required: false
21
+ },
22
+ fluid: {
23
+ type: Boolean,
24
+ required: false
25
+ },
26
+ strategy: {
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 = ref(null);
322
+ const attrs = useAttrs();
323
+ const rawProps = __props;
324
+ const defaultProps = { strategy: "block" };
325
+ const props = useComponentProps({
326
+ component: "CContainer",
327
+ defaultProps,
328
+ props: rawProps
329
+ });
330
+ const knownProps = [
331
+ "classNames",
332
+ "className",
333
+ "style",
334
+ "styles",
335
+ "unstyled",
336
+ "vars",
337
+ "fluid",
338
+ "mod",
339
+ "attributes",
340
+ "strategy"
341
+ ];
342
+ const modList = computed(() => [{
343
+ fluid: props.value.fluid,
344
+ strategy: props.value.strategy
345
+ }]);
346
+ const getStyles = useStyles({
347
+ name: "Container",
348
+ props: {
349
+ ...props.value,
350
+ ...attrs
351
+ },
352
+ classes: container_module_default,
353
+ className: props.value.className,
354
+ style: props.value.style,
355
+ classNames: props.value.classNames,
356
+ styles: props.value.styles,
357
+ unstyled: props.value.unstyled,
358
+ attributes: props.value.attributes,
359
+ vars: props.value.vars,
360
+ varsResolver
361
+ });
362
+ const rootAttrs = computed(() => getStyles("root"));
363
+ const mergedRootAttrs = 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].filter(Boolean), ...modList.value || []];
369
+ return {
370
+ ...others,
371
+ mod: mergedMod,
372
+ ...rootAttrs.value
373
+ };
374
+ });
375
+ __expose({ root: computed(() => _root.value?.root ?? null) });
376
+ const __returned__ = {
377
+ _root,
378
+ attrs,
379
+ rawProps,
380
+ defaultProps,
381
+ props,
382
+ knownProps,
383
+ modList,
384
+ getStyles,
385
+ rootAttrs,
386
+ mergedRootAttrs,
387
+ get CBox() {
388
+ return CBox;
389
+ }
390
+ };
391
+ Object.defineProperty(__returned__, "__isScriptSetup", {
392
+ enumerable: false,
393
+ value: true
394
+ });
395
+ return __returned__;
396
+ }
397
+ });
398
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
399
+ return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedRootAttrs), {
400
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
401
+ _: 3
402
+ }, 16);
403
+ }
404
+ var container_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/container/container.vue"]]);
405
+ //#endregion
406
+ export { container_default as default };
407
+
408
+ //# sourceMappingURL=container.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.mjs","names":[],"sources":["../../../src/components/container/container.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport { ContainerFactory, ContainerProps } from './container.types'\nimport { varsResolver } from './container.utils'\nimport classes from './container.module.css'\n\ndefineOptions({\n name: 'CContainer',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ContainerProps>()\n\nconst defaultProps = {\n strategy: 'block',\n} satisfies Partial<ContainerProps>\n\nconst props = useComponentProps({\n component: 'CContainer',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'fluid',\n 'mod',\n 'attributes',\n 'strategy',\n]\n\nconst modList = computed(() => [{ fluid: props.value.fluid, strategy: props.value.strategy }])\n\nconst getStyles = useStyles<ContainerFactory>({\n name: 'Container',\n props: { ...props.value, ...attrs } as ContainerProps,\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'))\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 = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,UAAU,QACZ;EAEA,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,UAAU,eAAe,CAAC;GAAE,OAAO,MAAM,MAAM;GAAO,UAAU,MAAM,MAAM;EAAS,CAAC,CAAC;EAE7F,MAAM,YAAY,UAA4B;GAC5C,MAAM;GACN,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;GAClC,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,kBAAkB,eAAe;GACrC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;qBAjFC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,eAAe,GAAA;yBAChC,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/container/container.module.css
3
+ var container_module_default = { "root": "m_b03efeae" };
4
+ //#endregion
5
+ export { container_module_default as default };
6
+
7
+ //# sourceMappingURL=container.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.module.mjs","names":[],"sources":["../../../src/components/container/container.module.css"],"sourcesContent":[".root {\n --container-size-xs: 540px;\n --container-size-sm: 720px;\n --container-size-md: 960px;\n --container-size-lg: 1140px;\n --container-size-xl: 1320px;\n --container-size: var(--container-size-md);\n\n &:where([data-strategy='block']) {\n max-width: var(--container-size);\n padding-inline: var(--c-spacing-md);\n margin-inline: auto;\n\n &:where([data-fluid]) {\n max-width: 100%;\n }\n }\n\n &:where([data-strategy='grid']) {\n display: grid;\n grid-template-columns: 1fr min(100%, var(--container-size)) 1fr;\n margin-inline: auto;\n\n & > * {\n grid-column: 2;\n }\n\n & > [data-breakout] {\n grid-column: 1 / -1;\n\n & > [data-container] {\n max-width: var(--container-size);\n margin-inline: auto;\n }\n }\n }\n}\n"],"mappings":";;AAAA,IAAA,2BAAe,EAAC,QAAO,aAAY"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { getSize } from "../../core/utils/get-size/get-size.mjs";
3
+ import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
4
+ //#region packages/@cck-ui/core/src/components/container/container.utils.ts
5
+ const varsResolver = createVarsResolver((_, { size, fluid }) => ({ root: { "--container-size": fluid ? void 0 : getSize(size, "container-size") } }));
6
+ //#endregion
7
+ export { varsResolver };
8
+
9
+ //# sourceMappingURL=container.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.utils.mjs","names":[],"sources":["../../../src/components/container/container.utils.ts"],"sourcesContent":["import { createVarsResolver, getSize } from '../../core'\nimport { ContainerFactory } from './container.types'\n\nexport const varsResolver = createVarsResolver<ContainerFactory>((_, { size, fluid }) => ({\n root: {\n '--container-size': fluid ? undefined : getSize(size, 'container-size'),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAAsC,GAAG,EAAE,MAAM,aAAa,EACxF,MAAM,EACJ,oBAAoB,QAAQ,KAAA,IAAY,QAAQ,MAAM,gBAAgB,EACxE,EACF,EAAE"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withClasses, withExtend, withPropsFactory, withVarsResolver } from "../../core/utils/vue/statics.mjs";
4
+ import { varsResolver } from "./container.utils.mjs";
5
+ import container_module_default from "./container.module.mjs";
6
+ import container_default from "./container.mjs";
7
+ const CContainer = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(container_default, container_module_default), varsResolver))));
8
+ //#endregion
9
+ export { CContainer, CContainer as default };
10
+
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Container","classes"],"sources":["../../../src/components/container/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\n\nimport Container from './container.vue'\nimport classes from './container.module.css'\nimport { varsResolver } from './container.utils'\n\nconst ContainerWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Container, classes), varsResolver))\n)\n\nexport const CContainer: SFCWithInstallAndClasses<typeof Container, typeof classes> =\n withInstall(ContainerWithStatic)\n\nexport default CContainer\n\nexport * from './container.types'\n"],"mappings":";;;;;;AAiBA,MAAa,aACX,YAL0B,iBAC1B,WAAW,iBAAiB,YAAYA,mBAAWC,wBAAO,GAAG,YAAY,CAAC,CAI9D,CAAmB"}
package/esm/index.mjs CHANGED
@@ -58,6 +58,7 @@ import { getTransitionProps } from "./components/transition/get-transition-props
58
58
  import { CTransition } from "./components/transition/index.mjs";
59
59
  import { CButton, CButtonGroup, CButtonGroupSection } from "./components/button/index.mjs";
60
60
  import { CCenter } from "./components/center/index.mjs";
61
+ import { CContainer } from "./components/container/index.mjs";
61
62
  import { CCol, CGrid } from "./components/grid/index.mjs";
62
63
  import { CGroup } from "./components/group/index.mjs";
63
64
  import { CSimpleGrid } from "./components/simple-grid/index.mjs";
@@ -74,6 +75,7 @@ const components = [
74
75
  CButtonGroupSection,
75
76
  CCenter,
76
77
  CCol,
78
+ CContainer,
77
79
  CGrid,
78
80
  CGroup,
79
81
  CLoader,
@@ -91,6 +93,6 @@ const CckUI = { install(app) {
91
93
  });
92
94
  } };
93
95
  //#endregion
94
- export { CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCol, CDefaultLoaders, CGrid, CGroup, CLoader, CONFIG_KEY, CSimpleGrid, 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 };
96
+ export { CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCol, CContainer, CDefaultLoaders, CGrid, CGroup, CLoader, CONFIG_KEY, CSimpleGrid, 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 };
95
97
 
96
98
  //# 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 CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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 CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjB;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 CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CContainer,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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 CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCol,\n CContainer,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjB;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,28 @@
1
+ import { BoxProps, CSize, ElementProps, Factory, StylesApiProps } from '../../core';
2
+ export type ContainerStylesNames = 'root';
3
+ export type ContainerCssVariables = {
4
+ root: '--container-size';
5
+ };
6
+ export interface ContainerProps extends BoxProps, StylesApiProps<ContainerFactory>, /* @vue-ignore */ ElementProps<'div'> {
7
+ /**
8
+ * @description `max-width` of the container, value is not responsive - it is the same for all screen sizes. Numbers are converted to rem. Ignored when `fluid` prop is set.
9
+ * @default 'md'
10
+ */
11
+ size?: CSize | (string & {}) | number;
12
+ /**
13
+ * @description If set, the container takes 100% width of its parent and `size` prop is ignored.
14
+ * @default false
15
+ */
16
+ fluid?: boolean;
17
+ /**
18
+ * @description Centering strategy
19
+ * @default 'block'
20
+ */
21
+ strategy?: 'block' | 'grid';
22
+ }
23
+ export type ContainerFactory = Factory<{
24
+ props: ContainerProps;
25
+ ref: HTMLDivElement;
26
+ stylesNames: ContainerStylesNames;
27
+ vars: ContainerCssVariables;
28
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./container.types").ContainerProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./container.types").ContainerStylesNames;
5
+ vars: import("./container.types").ContainerCssVariables;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
+ import Container from './container.vue';
3
+ import classes from './container.module.css';
4
+ export declare const CContainer: SFCWithInstallAndClasses<typeof Container, typeof classes>;
5
+ export default CContainer;
6
+ export * from './container.types';
@@ -1,6 +1,7 @@
1
1
  export * from './aspect-ratio';
2
2
  export * from './button';
3
3
  export * from './center';
4
+ export * from './container';
4
5
  export * from './grid';
5
6
  export * from './group';
6
7
  export * from './loader';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.8.1",
3
+ "version": "0.9.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,37 @@
1
+ .m_b03efeae {
2
+ --container-size-xs: calc(33.75rem * var(--c-scale));
3
+ --container-size-sm: calc(45rem * var(--c-scale));
4
+ --container-size-md: calc(60rem * var(--c-scale));
5
+ --container-size-lg: calc(71.25rem * var(--c-scale));
6
+ --container-size-xl: calc(82.5rem * var(--c-scale));
7
+ --container-size: var(--container-size-md);
8
+ }
9
+
10
+ .m_b03efeae:where([data-strategy='block']) {
11
+ max-width: var(--container-size);
12
+ padding-inline: var(--c-spacing-md);
13
+ margin-inline: auto;
14
+ }
15
+
16
+ .m_b03efeae:where([data-strategy='block']):where([data-fluid]) {
17
+ max-width: 100%;
18
+ }
19
+
20
+ .m_b03efeae:where([data-strategy='grid']) {
21
+ display: grid;
22
+ grid-template-columns: 1fr min(100%, var(--container-size)) 1fr;
23
+ margin-inline: auto;
24
+ }
25
+
26
+ .m_b03efeae:where([data-strategy='grid']) > * {
27
+ grid-column: 2;
28
+ }
29
+
30
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] {
31
+ grid-column: 1 / -1;
32
+ }
33
+
34
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] > [data-container] {
35
+ max-width: var(--container-size);
36
+ margin-inline: auto;
37
+ }
@@ -0,0 +1,38 @@
1
+ @layer cck {.m_b03efeae {
2
+ --container-size-xs: calc(33.75rem * var(--c-scale));
3
+ --container-size-sm: calc(45rem * var(--c-scale));
4
+ --container-size-md: calc(60rem * var(--c-scale));
5
+ --container-size-lg: calc(71.25rem * var(--c-scale));
6
+ --container-size-xl: calc(82.5rem * var(--c-scale));
7
+ --container-size: var(--container-size-md);
8
+ }
9
+
10
+ .m_b03efeae:where([data-strategy='block']) {
11
+ max-width: var(--container-size);
12
+ padding-inline: var(--c-spacing-md);
13
+ margin-inline: auto;
14
+ }
15
+
16
+ .m_b03efeae:where([data-strategy='block']):where([data-fluid]) {
17
+ max-width: 100%;
18
+ }
19
+
20
+ .m_b03efeae:where([data-strategy='grid']) {
21
+ display: grid;
22
+ grid-template-columns: 1fr min(100%, var(--container-size)) 1fr;
23
+ margin-inline: auto;
24
+ }
25
+
26
+ .m_b03efeae:where([data-strategy='grid']) > * {
27
+ grid-column: 2;
28
+ }
29
+
30
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] {
31
+ grid-column: 1 / -1;
32
+ }
33
+
34
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] > [data-container] {
35
+ max-width: var(--container-size);
36
+ margin-inline: auto;
37
+ }
38
+ }
package/styles.css CHANGED
@@ -906,6 +906,44 @@ fieldset:disabled .c-active:active {
906
906
  display: inline-flex;
907
907
  }
908
908
 
909
+ .m_b03efeae {
910
+ --container-size-xs: calc(33.75rem * var(--c-scale));
911
+ --container-size-sm: calc(45rem * var(--c-scale));
912
+ --container-size-md: calc(60rem * var(--c-scale));
913
+ --container-size-lg: calc(71.25rem * var(--c-scale));
914
+ --container-size-xl: calc(82.5rem * var(--c-scale));
915
+ --container-size: var(--container-size-md);
916
+ }
917
+
918
+ .m_b03efeae:where([data-strategy='block']) {
919
+ max-width: var(--container-size);
920
+ padding-inline: var(--c-spacing-md);
921
+ margin-inline: auto;
922
+ }
923
+
924
+ .m_b03efeae:where([data-strategy='block']):where([data-fluid]) {
925
+ max-width: 100%;
926
+ }
927
+
928
+ .m_b03efeae:where([data-strategy='grid']) {
929
+ display: grid;
930
+ grid-template-columns: 1fr min(100%, var(--container-size)) 1fr;
931
+ margin-inline: auto;
932
+ }
933
+
934
+ .m_b03efeae:where([data-strategy='grid']) > * {
935
+ grid-column: 2;
936
+ }
937
+
938
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] {
939
+ grid-column: 1 / -1;
940
+ }
941
+
942
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] > [data-container] {
943
+ max-width: var(--container-size);
944
+ margin-inline: auto;
945
+ }
946
+
909
947
  .m_c031daba {
910
948
  container: c-grid / inline-size;
911
949
  }
package/styles.layer.css CHANGED
@@ -906,6 +906,44 @@ fieldset:disabled .c-active:active {
906
906
  display: inline-flex;
907
907
  }
908
908
 
909
+ .m_b03efeae {
910
+ --container-size-xs: calc(33.75rem * var(--c-scale));
911
+ --container-size-sm: calc(45rem * var(--c-scale));
912
+ --container-size-md: calc(60rem * var(--c-scale));
913
+ --container-size-lg: calc(71.25rem * var(--c-scale));
914
+ --container-size-xl: calc(82.5rem * var(--c-scale));
915
+ --container-size: var(--container-size-md);
916
+ }
917
+
918
+ .m_b03efeae:where([data-strategy='block']) {
919
+ max-width: var(--container-size);
920
+ padding-inline: var(--c-spacing-md);
921
+ margin-inline: auto;
922
+ }
923
+
924
+ .m_b03efeae:where([data-strategy='block']):where([data-fluid]) {
925
+ max-width: 100%;
926
+ }
927
+
928
+ .m_b03efeae:where([data-strategy='grid']) {
929
+ display: grid;
930
+ grid-template-columns: 1fr min(100%, var(--container-size)) 1fr;
931
+ margin-inline: auto;
932
+ }
933
+
934
+ .m_b03efeae:where([data-strategy='grid']) > * {
935
+ grid-column: 2;
936
+ }
937
+
938
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] {
939
+ grid-column: 1 / -1;
940
+ }
941
+
942
+ .m_b03efeae:where([data-strategy='grid']) > [data-breakout] > [data-container] {
943
+ max-width: var(--container-size);
944
+ margin-inline: auto;
945
+ }
946
+
909
947
  .m_c031daba {
910
948
  container: c-grid / inline-size;
911
949
  }