@cck-ui/core 0.21.0 → 0.23.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 (34) hide show
  1. package/cjs/components/focus-trap/focus-trap.cjs +41 -0
  2. package/cjs/components/focus-trap/focus-trap.cjs.map +1 -0
  3. package/cjs/components/focus-trap/index.cjs +12 -0
  4. package/cjs/components/focus-trap/index.cjs.map +1 -0
  5. package/cjs/components/visually-hidden/index.cjs +13 -0
  6. package/cjs/components/visually-hidden/index.cjs.map +1 -0
  7. package/cjs/components/visually-hidden/visually-hidden.cjs +385 -0
  8. package/cjs/components/visually-hidden/visually-hidden.cjs.map +1 -0
  9. package/cjs/components/visually-hidden/visually-hidden.module.cjs +7 -0
  10. package/cjs/components/visually-hidden/visually-hidden.module.cjs.map +1 -0
  11. package/cjs/index.cjs +46 -40
  12. package/cjs/index.cjs.map +1 -1
  13. package/esm/components/focus-trap/focus-trap.mjs +39 -0
  14. package/esm/components/focus-trap/focus-trap.mjs.map +1 -0
  15. package/esm/components/focus-trap/index.mjs +9 -0
  16. package/esm/components/focus-trap/index.mjs.map +1 -0
  17. package/esm/components/visually-hidden/index.mjs +10 -0
  18. package/esm/components/visually-hidden/index.mjs.map +1 -0
  19. package/esm/components/visually-hidden/visually-hidden.mjs +385 -0
  20. package/esm/components/visually-hidden/visually-hidden.mjs.map +1 -0
  21. package/esm/components/visually-hidden/visually-hidden.module.mjs +7 -0
  22. package/esm/components/visually-hidden/visually-hidden.module.mjs.map +1 -0
  23. package/esm/index.mjs +5 -1
  24. package/esm/index.mjs.map +1 -1
  25. package/lib/components/focus-trap/focus-trap.types.d.ts +6 -0
  26. package/lib/components/focus-trap/index.d.ts +5 -0
  27. package/lib/components/index.d.ts +2 -0
  28. package/lib/components/visually-hidden/index.d.ts +6 -0
  29. package/lib/components/visually-hidden/visually-hidden.types.d.ts +9 -0
  30. package/package.json +1 -1
  31. package/styles/visually-hidden.css +11 -0
  32. package/styles/visually-hidden.layer.css +12 -0
  33. package/styles.css +12 -0
  34. package/styles.layer.css +12 -0
@@ -0,0 +1,41 @@
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
+ let _cck_ui_hooks = require("@cck-ui/hooks");
6
+ //#region packages/@cck-ui/core/src/components/focus-trap/focus-trap.vue
7
+ const _sfc_main = (0, vue.defineComponent)({
8
+ name: "CFocusTrap",
9
+ props: { active: { type: Boolean } },
10
+ setup(props, { slots }) {
11
+ const computedProps = require_use_component_props.useComponentProps({
12
+ component: "CFocusTrap",
13
+ defaultProps: { active: true },
14
+ props
15
+ });
16
+ const trapRef = (0, _cck_ui_hooks.useFocusTrap)(() => computedProps.value.active);
17
+ return () => {
18
+ const children = slots.default?.();
19
+ if (!children || children.length === 0) {
20
+ if (process.env.NODE_ENV === "development") console.warn("[@cck-ui/core/focus-trap] No children provided, nothing to trap.");
21
+ return null;
22
+ }
23
+ if (children.length === 1) {
24
+ const child = children[0];
25
+ if ((0, vue.isVNode)(child) && child.type === vue.Fragment) {
26
+ if (process.env.NODE_ENV === "development") console.warn("[@cck-ui/core/focus-trap] Fragment as single child is not supported; wrapping with div.");
27
+ const subChildren = Array.isArray(child.children) ? child.children : [];
28
+ return (0, vue.h)("div", { ref: trapRef }, subChildren);
29
+ }
30
+ return (0, vue.h)(child, { ref: trapRef });
31
+ }
32
+ if (process.env.NODE_ENV === "development") console.warn("[@cck-ui/core/focus-trap] Multiple root elements found; wrapping with div.");
33
+ return (0, vue.h)("div", { ref: trapRef }, children);
34
+ };
35
+ }
36
+ });
37
+ var focus_trap_default = /*#__PURE__*/ require_export_helper.default(_sfc_main, [["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/focus-trap/focus-trap.vue"]]);
38
+ //#endregion
39
+ exports.default = focus_trap_default;
40
+
41
+ //# sourceMappingURL=focus-trap.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-trap.cjs","names":[],"sources":["../../../src/components/focus-trap/focus-trap.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { useFocusTrap } from '@cck-ui/hooks'\nimport { defineComponent, Fragment, h, isVNode } from 'vue'\nimport { FocusTrapPrpos } from './focus-trap.types'\nimport { useComponentProps } from '../../core'\nexport default defineComponent({\n name: 'CFocusTrap',\n props: {\n active: {\n type: Boolean,\n },\n },\n setup(props, { slots }) {\n const defaultProps = { active: true } satisfies Partial<FocusTrapPrpos>\n const computedProps = useComponentProps({\n component: 'CFocusTrap',\n defaultProps,\n props,\n })\n\n const trapRef = useFocusTrap(() => computedProps.value.active)\n\n return () => {\n const children = slots.default?.()\n if (!children || children.length === 0) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[@cck-ui/core/focus-trap] No children provided, nothing to trap.')\n }\n return null\n }\n\n if (children.length === 1) {\n const child = children[0]\n if (isVNode(child) && child.type === Fragment) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(\n '[@cck-ui/core/focus-trap] Fragment as single child is not supported; wrapping with div.'\n )\n }\n const subChildren = Array.isArray(child.children) ? child.children : []\n return h('div', { ref: trapRef }, subChildren)\n }\n return h(child, { ref: trapRef })\n }\n\n if (process.env.NODE_ENV === 'development') {\n console.warn('[@cck-ui/core/focus-trap] Multiple root elements found; wrapping with div.')\n }\n return h('div', { ref: trapRef }, children)\n }\n },\n})\n</script>\n"],"mappings":";;;;;;AAKA,MAAK,aAAA,GAAA,IAAA,gBAAA,CAA0B;CAC7B,MAAM;CACN,OAAO,EACL,QAAQ,EACN,MAAM,QACR,EACF;CACA,MAAM,OAAO,EAAE,SAAS;EAEtB,MAAM,gBAAgB,4BAAA,kBAAkB;GACtC,WAAW;GACX,cAAA,EAHqB,QAAQ,KAG7B;GACA;EACF,CAAC;EAED,MAAM,WAAA,GAAA,cAAA,aAAA,OAA6B,cAAc,MAAM,MAAM;EAE7D,aAAa;GACX,MAAM,WAAW,MAAM,UAAU;GACjC,IAAI,CAAC,YAAY,SAAS,WAAW,GAAG;IACtC,IAAI,QAAQ,IAAI,aAAa,eAC3B,QAAQ,KAAK,kEAAkE;IAEjF,OAAO;GACT;GAEA,IAAI,SAAS,WAAW,GAAG;IACzB,MAAM,QAAQ,SAAS;IACvB,KAAA,GAAA,IAAA,QAAA,CAAY,KAAK,KAAK,MAAM,SAAS,IAAA,UAAU;KAC7C,IAAI,QAAQ,IAAI,aAAa,eAC3B,QAAQ,KACN,yFACF;KAEF,MAAM,cAAc,MAAM,QAAQ,MAAM,QAAQ,IAAI,MAAM,WAAW,CAAC;KACtE,QAAA,GAAA,IAAA,EAAA,CAAS,OAAO,EAAE,KAAK,QAAQ,GAAG,WAAW;IAC/C;IACA,QAAA,GAAA,IAAA,EAAA,CAAS,OAAO,EAAE,KAAK,QAAQ,CAAC;GAClC;GAEA,IAAI,QAAQ,IAAI,aAAa,eAC3B,QAAQ,KAAK,4EAA4E;GAE3F,QAAA,GAAA,IAAA,EAAA,CAAS,OAAO,EAAE,KAAK,QAAQ,GAAG,QAAQ;EAC5C;CACF;AACF,CAAC"}
@@ -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_focus_trap = require("./focus-trap.cjs");
5
+ //#region packages/@cck-ui/core/src/components/focus-trap/index.ts
6
+ const FocusTrapWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_focus_trap.default));
7
+ const CFocusTrap = require_install.withInstall(FocusTrapWithStatic);
8
+ //#endregion
9
+ exports.CFocusTrap = CFocusTrap;
10
+ exports.default = CFocusTrap;
11
+
12
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","FocusTrap","withInstall"],"sources":["../../../src/components/focus-trap/index.ts"],"sourcesContent":["import { SFCWithInstall, withExtend, withInstall, withPropsFactory } from '../../core'\nimport FocusTrap from './focus-trap.vue'\n\nconst FocusTrapWithStatic = withPropsFactory(withExtend(FocusTrap))\n\nexport const CFocusTrap: SFCWithInstall<typeof FocusTrap> = withInstall(FocusTrapWithStatic)\n\nexport default CFocusTrap\n\nexport * from './focus-trap.types'\n"],"mappings":";;;;;AAGA,MAAM,sBAAsBA,gBAAAA,iBAAiBC,gBAAAA,WAAWC,mBAAAA,OAAS,CAAC;AAElE,MAAa,aAA+CC,gBAAAA,YAAY,mBAAmB"}
@@ -0,0 +1,13 @@
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_visually_hidden_module = require("./visually-hidden.module.cjs");
5
+ const require_visually_hidden = require("./visually-hidden.cjs");
6
+ //#region packages/@cck-ui/core/src/components/visually-hidden/index.ts
7
+ const VisuallyHiddenWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withClasses(require_visually_hidden.default, require_visually_hidden_module.default)));
8
+ const CVisuallyHidden = require_install.withInstall(VisuallyHiddenWithStatic);
9
+ //#endregion
10
+ exports.CVisuallyHidden = CVisuallyHidden;
11
+ exports.default = CVisuallyHidden;
12
+
13
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withClasses","VisuallyHidden","classes","withInstall"],"sources":["../../../src/components/visually-hidden/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n} from '../../core'\nimport classes from './visually-hidden.module.css'\nimport VisuallyHidden from './visually-hidden.vue'\n\nconst VisuallyHiddenWithStatic = withPropsFactory(withExtend(withClasses(VisuallyHidden, classes)))\n\nexport const CVisuallyHidden: SFCWithInstallAndClasses<typeof VisuallyHidden, typeof classes> =\n withInstall(VisuallyHiddenWithStatic)\n\nexport default CVisuallyHidden\n\nexport * from './visually-hidden.types'\n"],"mappings":";;;;;;AAUA,MAAM,2BAA2BA,gBAAAA,iBAAiBC,gBAAAA,WAAWC,gBAAAA,YAAYC,wBAAAA,SAAgBC,+BAAAA,OAAO,CAAC,CAAC;AAElG,MAAa,kBACXC,gBAAAA,YAAY,wBAAwB"}
@@ -0,0 +1,385 @@
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_visually_hidden_module = require("./visually-hidden.module.cjs");
7
+ let vue = require("vue");
8
+ //#region packages/@cck-ui/core/src/components/visually-hidden/visually-hidden.vue
9
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
10
+ name: "CVisuallyHidden",
11
+ __name: "visually-hidden",
12
+ props: {
13
+ className: {
14
+ type: String,
15
+ required: false
16
+ },
17
+ style: {
18
+ type: [
19
+ Object,
20
+ Function,
21
+ Array
22
+ ],
23
+ required: false,
24
+ skipCheck: true
25
+ },
26
+ __vars: {
27
+ type: null,
28
+ required: false
29
+ },
30
+ __size: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ hiddenFrom: {
35
+ type: null,
36
+ required: false
37
+ },
38
+ visibleFrom: {
39
+ type: null,
40
+ required: false
41
+ },
42
+ lightHidden: {
43
+ type: Boolean,
44
+ required: false
45
+ },
46
+ darkHidden: {
47
+ type: Boolean,
48
+ required: false
49
+ },
50
+ mod: {
51
+ type: [
52
+ Object,
53
+ String,
54
+ Array
55
+ ],
56
+ required: false
57
+ },
58
+ m: {
59
+ type: null,
60
+ required: false
61
+ },
62
+ my: {
63
+ type: null,
64
+ required: false
65
+ },
66
+ mx: {
67
+ type: null,
68
+ required: false
69
+ },
70
+ mt: {
71
+ type: null,
72
+ required: false
73
+ },
74
+ mb: {
75
+ type: null,
76
+ required: false
77
+ },
78
+ ms: {
79
+ type: null,
80
+ required: false
81
+ },
82
+ me: {
83
+ type: null,
84
+ required: false
85
+ },
86
+ mis: {
87
+ type: null,
88
+ required: false
89
+ },
90
+ mie: {
91
+ type: null,
92
+ required: false
93
+ },
94
+ ml: {
95
+ type: null,
96
+ required: false
97
+ },
98
+ mr: {
99
+ type: null,
100
+ required: false
101
+ },
102
+ p: {
103
+ type: null,
104
+ required: false
105
+ },
106
+ py: {
107
+ type: null,
108
+ required: false
109
+ },
110
+ px: {
111
+ type: null,
112
+ required: false
113
+ },
114
+ pt: {
115
+ type: null,
116
+ required: false
117
+ },
118
+ pb: {
119
+ type: null,
120
+ required: false
121
+ },
122
+ ps: {
123
+ type: null,
124
+ required: false
125
+ },
126
+ pe: {
127
+ type: null,
128
+ required: false
129
+ },
130
+ pis: {
131
+ type: null,
132
+ required: false
133
+ },
134
+ pie: {
135
+ type: null,
136
+ required: false
137
+ },
138
+ pl: {
139
+ type: null,
140
+ required: false
141
+ },
142
+ pr: {
143
+ type: null,
144
+ required: false
145
+ },
146
+ bd: {
147
+ type: null,
148
+ required: false
149
+ },
150
+ bdrs: {
151
+ type: null,
152
+ required: false
153
+ },
154
+ bg: {
155
+ type: null,
156
+ required: false
157
+ },
158
+ c: {
159
+ type: null,
160
+ required: false
161
+ },
162
+ opacity: {
163
+ type: [
164
+ String,
165
+ Object,
166
+ Number
167
+ ],
168
+ required: false
169
+ },
170
+ ff: {
171
+ type: [String, Object],
172
+ required: false
173
+ },
174
+ fz: {
175
+ type: null,
176
+ required: false
177
+ },
178
+ fw: {
179
+ type: null,
180
+ required: false
181
+ },
182
+ lts: {
183
+ type: null,
184
+ required: false
185
+ },
186
+ ta: {
187
+ type: [String, Object],
188
+ required: false
189
+ },
190
+ lh: {
191
+ type: null,
192
+ required: false
193
+ },
194
+ fs: {
195
+ type: null,
196
+ required: false
197
+ },
198
+ tt: {
199
+ type: [String, Object],
200
+ required: false
201
+ },
202
+ td: {
203
+ type: null,
204
+ required: false
205
+ },
206
+ w: {
207
+ type: null,
208
+ required: false
209
+ },
210
+ miw: {
211
+ type: null,
212
+ required: false
213
+ },
214
+ maw: {
215
+ type: null,
216
+ required: false
217
+ },
218
+ h: {
219
+ type: null,
220
+ required: false
221
+ },
222
+ mih: {
223
+ type: null,
224
+ required: false
225
+ },
226
+ mah: {
227
+ type: null,
228
+ required: false
229
+ },
230
+ bgsz: {
231
+ type: null,
232
+ required: false
233
+ },
234
+ bgp: {
235
+ type: null,
236
+ required: false
237
+ },
238
+ bgr: {
239
+ type: null,
240
+ required: false
241
+ },
242
+ bga: {
243
+ type: null,
244
+ required: false
245
+ },
246
+ pos: {
247
+ type: [String, Object],
248
+ required: false
249
+ },
250
+ top: {
251
+ type: null,
252
+ required: false
253
+ },
254
+ left: {
255
+ type: null,
256
+ required: false
257
+ },
258
+ bottom: {
259
+ type: null,
260
+ required: false
261
+ },
262
+ right: {
263
+ type: null,
264
+ required: false
265
+ },
266
+ inset: {
267
+ type: null,
268
+ required: false
269
+ },
270
+ display: {
271
+ type: null,
272
+ required: false
273
+ },
274
+ flex: {
275
+ type: null,
276
+ required: false
277
+ },
278
+ unstyled: {
279
+ type: Boolean,
280
+ required: false
281
+ },
282
+ variant: {
283
+ type: null,
284
+ required: false
285
+ },
286
+ classNames: {
287
+ type: null,
288
+ required: false
289
+ },
290
+ styles: {
291
+ type: null,
292
+ required: false
293
+ },
294
+ vars: {
295
+ type: Function,
296
+ required: false
297
+ },
298
+ attributes: {
299
+ type: null,
300
+ required: false
301
+ }
302
+ },
303
+ setup(__props, { expose: __expose }) {
304
+ const _root = (0, vue.ref)(null);
305
+ const attrs = (0, vue.useAttrs)();
306
+ const rawProps = __props;
307
+ const props = require_use_component_props.useComponentProps({
308
+ component: "CVisuallyHidden",
309
+ defaultProps: {},
310
+ props: rawProps
311
+ });
312
+ const knownProps = [
313
+ "className",
314
+ "style",
315
+ "classNames",
316
+ "styles",
317
+ "unstyled",
318
+ "vars",
319
+ "attributes"
320
+ ];
321
+ const styleProps = (0, vue.computed)(() => ({
322
+ ...props.value,
323
+ ...attrs,
324
+ style: attrs.style ?? props.value.style
325
+ }));
326
+ const getStyles = require_use_styles.useStyles({
327
+ name: "VisuallyHidden",
328
+ props: styleProps,
329
+ classes: require_visually_hidden_module.default,
330
+ className: () => props.value.className,
331
+ style: () => props.value.style,
332
+ classNames: props.value.classNames,
333
+ styles: props.value.styles,
334
+ unstyled: props.value.unstyled,
335
+ attributes: props.value.attributes
336
+ });
337
+ const rootAttrs = (0, vue.computed)(() => getStyles("root"));
338
+ const mergedAttrs = (0, vue.computed)(() => {
339
+ const others = {};
340
+ const propsValue = props.value;
341
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
342
+ const userMod = props.value.mod;
343
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
344
+ return {
345
+ ...others,
346
+ mod: mergedMod,
347
+ ...rootAttrs.value
348
+ };
349
+ });
350
+ __expose({ root: (0, vue.computed)(() => _root.value?.root ?? null) });
351
+ const __returned__ = {
352
+ _root,
353
+ attrs,
354
+ rawProps,
355
+ props,
356
+ knownProps,
357
+ styleProps,
358
+ getStyles,
359
+ rootAttrs,
360
+ mergedAttrs,
361
+ get CBox() {
362
+ return require_index.CBox;
363
+ }
364
+ };
365
+ Object.defineProperty(__returned__, "__isScriptSetup", {
366
+ enumerable: false,
367
+ value: true
368
+ });
369
+ return __returned__;
370
+ }
371
+ });
372
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
373
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
374
+ ref: "_root",
375
+ tag: "span"
376
+ }, $setup.mergedAttrs), {
377
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
378
+ _: 3
379
+ }, 16);
380
+ }
381
+ var visually_hidden_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/visually-hidden/visually-hidden.vue"]]);
382
+ //#endregion
383
+ exports.default = visually_hidden_default;
384
+
385
+ //# sourceMappingURL=visually-hidden.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visually-hidden.cjs","names":[],"sources":["../../../src/components/visually-hidden/visually-hidden.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"span\" v-bind=\"mergedAttrs\">\n <slot />\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 { VisuallyHiddenFactory, VisuallyHiddenProps } from './visually-hidden.types'\nimport classes from './visually-hidden.module.css'\n\ndefineOptions({\n name: 'CVisuallyHidden',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<VisuallyHiddenProps>()\n\nconst props = useComponentProps({\n component: 'CVisuallyHidden',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = ['className', 'style', 'classNames', 'styles', 'unstyled', 'vars', 'attributes']\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<VisuallyHiddenFactory>({\n name: 'VisuallyHidden',\n props: styleProps,\n classes,\n className: () => props.value.className,\n style: () => props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = 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].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GAAC;GAAa;GAAS;GAAc;GAAU;GAAY;GAAQ;EAAY;EAElG,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAiC;GACjD,MAAM;GACN,OAAO;GACP,SAAA,+BAAA;GACA,iBAAiB,MAAM,MAAM;GAC7B,aAAa,MAAM,MAAM;GACzB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;EAC1B,CAAC;EAED,MAAM,aAAA,GAAA,IAAA,SAAA,OAA2B,UAAU,MAAM,CAAC;EAElD,MAAM,eAAA,GAAA,IAAA,SAAA,OAA6B;GACjC,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,CAAC,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,CAAE;GACpF,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;;;;;;;;;;;;;;;;;;;;;;;mDA9DS,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA;EAFD,KAAI;EAAQ,KAAI;IAAe,OAAA,WAAW,GAAA;kCACvC,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/visually-hidden/visually-hidden.module.css
3
+ var visually_hidden_module_default = { "root": "m_56280a25" };
4
+ //#endregion
5
+ exports.default = visually_hidden_module_default;
6
+
7
+ //# sourceMappingURL=visually-hidden.module.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visually-hidden.module.cjs","names":[],"sources":["../../../src/components/visually-hidden/visually-hidden.module.css"],"sourcesContent":[".root {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n"],"mappings":";;AAAA,IAAA,iCAAe,EAAC,QAAO,aAAY"}
package/cjs/index.cjs CHANGED
@@ -70,18 +70,20 @@ const require_index$13 = require("./components/copy-button/index.cjs");
70
70
  const require_index$14 = require("./components/empty-state/index.cjs");
71
71
  const require_index$15 = require("./components/file-button/index.cjs");
72
72
  const require_index$16 = require("./components/flex/index.cjs");
73
- const require_index$17 = require("./components/grid/index.cjs");
74
- const require_index$18 = require("./components/group/index.cjs");
75
- const require_index$19 = require("./components/image/index.cjs");
76
- const require_index$20 = require("./components/paper/index.cjs");
77
- const require_index$21 = require("./components/semi-circle-progress/index.cjs");
78
- const require_index$22 = require("./components/simple-grid/index.cjs");
79
- const require_index$23 = require("./components/skeleton/index.cjs");
80
- const require_index$24 = require("./components/space/index.cjs");
81
- const require_index$25 = require("./components/splitter/index.cjs");
82
- const require_index$26 = require("./components/stack/index.cjs");
83
- const require_index$27 = require("./components/text/index.cjs");
84
- const require_index$28 = require("./components/typography/index.cjs");
73
+ const require_index$17 = require("./components/focus-trap/index.cjs");
74
+ const require_index$18 = require("./components/grid/index.cjs");
75
+ const require_index$19 = require("./components/group/index.cjs");
76
+ const require_index$20 = require("./components/image/index.cjs");
77
+ const require_index$21 = require("./components/paper/index.cjs");
78
+ const require_index$22 = require("./components/semi-circle-progress/index.cjs");
79
+ const require_index$23 = require("./components/simple-grid/index.cjs");
80
+ const require_index$24 = require("./components/skeleton/index.cjs");
81
+ const require_index$25 = require("./components/space/index.cjs");
82
+ const require_index$26 = require("./components/splitter/index.cjs");
83
+ const require_index$27 = require("./components/stack/index.cjs");
84
+ const require_index$28 = require("./components/text/index.cjs");
85
+ const require_index$29 = require("./components/typography/index.cjs");
86
+ const require_index$30 = require("./components/visually-hidden/index.cjs");
85
87
  let _vue_shared = require("@vue/shared");
86
88
  //#region packages/@cck-ui/core/src/index.ts
87
89
  const INSTALLED_KEY = Symbol("INSTALLED_KEY");
@@ -98,7 +100,7 @@ const components = [
98
100
  require_index$10.CButtonGroupSection,
99
101
  require_index$11.CCenter,
100
102
  require_index$7.CCloseButton,
101
- require_index$17.CCol,
103
+ require_index$18.CCol,
102
104
  require_index$12.CContainer,
103
105
  require_index$13.CCopyButton,
104
106
  require_index$14.CEmptyState,
@@ -108,21 +110,23 @@ const components = [
108
110
  require_index$14.CEmptyStateTitle,
109
111
  require_index$15.CFileButton,
110
112
  require_index$16.CFlex,
111
- require_index$17.CGrid,
112
- require_index$18.CGroup,
113
- require_index$19.CImage,
113
+ require_index$17.CFocusTrap,
114
+ require_index$18.CGrid,
115
+ require_index$19.CGroup,
116
+ require_index$20.CImage,
114
117
  require_index$4.CLoader,
115
- require_index$20.CPaper,
116
- require_index$21.CSemiCircleProgress,
117
- require_index$22.CSimpleGrid,
118
- require_index$23.CSkeleton,
119
- require_index$24.CSpace,
120
- require_index$25.CSplitter,
121
- require_index$25.CSplitterPane,
122
- require_index$26.CStack,
123
- require_index$27.CText,
118
+ require_index$21.CPaper,
119
+ require_index$22.CSemiCircleProgress,
120
+ require_index$23.CSimpleGrid,
121
+ require_index$24.CSkeleton,
122
+ require_index$25.CSpace,
123
+ require_index$26.CSplitter,
124
+ require_index$26.CSplitterPane,
125
+ require_index$27.CStack,
126
+ require_index$28.CText,
124
127
  require_index$5.CTransition,
125
- require_index$28.CTypography,
128
+ require_index$29.CTypography,
129
+ require_index$30.CVisuallyHidden,
126
130
  require_index$3.UnstyledButton
127
131
  ];
128
132
  const CckUI = { install(app) {
@@ -145,7 +149,7 @@ exports.CButtonGroupSection = require_index$10.CButtonGroupSection;
145
149
  exports.CCK_TRANSITIONS = require_transitions.transitions;
146
150
  exports.CCenter = require_index$11.CCenter;
147
151
  exports.CCloseButton = require_index$7.CCloseButton;
148
- exports.CCol = require_index$17.CCol;
152
+ exports.CCol = require_index$18.CCol;
149
153
  exports.CContainer = require_index$12.CContainer;
150
154
  exports.CCopyButton = require_index$13.CCopyButton;
151
155
  exports.CDefaultLoaders = require_index$4.CDefaultLoaders;
@@ -156,22 +160,24 @@ exports.CEmptyStateIndicator = require_index$14.CEmptyStateIndicator;
156
160
  exports.CEmptyStateTitle = require_index$14.CEmptyStateTitle;
157
161
  exports.CFileButton = require_index$15.CFileButton;
158
162
  exports.CFlex = require_index$16.CFlex;
159
- exports.CGrid = require_index$17.CGrid;
160
- exports.CGroup = require_index$18.CGroup;
161
- exports.CImage = require_index$19.CImage;
163
+ exports.CFocusTrap = require_index$17.CFocusTrap;
164
+ exports.CGrid = require_index$18.CGrid;
165
+ exports.CGroup = require_index$19.CGroup;
166
+ exports.CImage = require_index$20.CImage;
162
167
  exports.CLoader = require_index$4.CLoader;
163
168
  exports.CONFIG_KEY = require_config_provider_types.CONFIG_KEY;
164
- exports.CPaper = require_index$20.CPaper;
165
- exports.CSemiCircleProgress = require_index$21.CSemiCircleProgress;
166
- exports.CSimpleGrid = require_index$22.CSimpleGrid;
167
- exports.CSkeleton = require_index$23.CSkeleton;
168
- exports.CSpace = require_index$24.CSpace;
169
- exports.CSplitter = require_index$25.CSplitter;
170
- exports.CSplitterPane = require_index$25.CSplitterPane;
171
- exports.CStack = require_index$26.CStack;
172
- exports.CText = require_index$27.CText;
169
+ exports.CPaper = require_index$21.CPaper;
170
+ exports.CSemiCircleProgress = require_index$22.CSemiCircleProgress;
171
+ exports.CSimpleGrid = require_index$23.CSimpleGrid;
172
+ exports.CSkeleton = require_index$24.CSkeleton;
173
+ exports.CSpace = require_index$25.CSpace;
174
+ exports.CSplitter = require_index$26.CSplitter;
175
+ exports.CSplitterPane = require_index$26.CSplitterPane;
176
+ exports.CStack = require_index$27.CStack;
177
+ exports.CText = require_index$28.CText;
173
178
  exports.CTransition = require_index$5.CTransition;
174
- exports.CTypography = require_index$28.CTypography;
179
+ exports.CTypography = require_index$29.CTypography;
180
+ exports.CVisuallyHidden = require_index$30.CVisuallyHidden;
175
181
  exports.CckConfigProvider = require_index$1.CckConfigProvider;
176
182
  exports.CckUI = CckUI;
177
183
  exports.default = CckUI;
package/cjs/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["CckConfigProvider","CBox","CActionIcon","CActionIconGroup","CActionIconGroupSection","CAlert","CAspectRatio","CButton","CButtonGroup","CButtonGroupSection","CCenter","CCloseButton","CCol","CContainer","CCopyButton","CEmptyState","CEmptyStateActions","CEmptyStateDescription","CEmptyStateIndicator","CEmptyStateTitle","CFileButton","CFlex","CGrid","CGroup","CImage","CLoader","CPaper","CSemiCircleProgress","CSimpleGrid","CSkeleton","CSpace","CSplitter","CSplitterPane","CStack","CText","CTransition","CTypography","UnstyledButton"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\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 CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjBA,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;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","CActionIcon","CActionIconGroup","CActionIconGroupSection","CAlert","CAspectRatio","CButton","CButtonGroup","CButtonGroupSection","CCenter","CCloseButton","CCol","CContainer","CCopyButton","CEmptyState","CEmptyStateActions","CEmptyStateDescription","CEmptyStateIndicator","CEmptyStateTitle","CFileButton","CFlex","CFocusTrap","CGrid","CGroup","CImage","CLoader","CPaper","CSemiCircleProgress","CSimpleGrid","CSkeleton","CSpace","CSplitter","CSplitterPane","CStack","CText","CTransition","CTypography","CVisuallyHidden","UnstyledButton"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\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 CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjBA,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;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,39 @@
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 { Fragment, defineComponent, h, isVNode } from "vue";
5
+ import { useFocusTrap } from "@cck-ui/hooks";
6
+ var focus_trap_default = /*#__PURE__*/ export_helper_default(defineComponent({
7
+ name: "CFocusTrap",
8
+ props: { active: { type: Boolean } },
9
+ setup(props, { slots }) {
10
+ const computedProps = useComponentProps({
11
+ component: "CFocusTrap",
12
+ defaultProps: { active: true },
13
+ props
14
+ });
15
+ const trapRef = useFocusTrap(() => computedProps.value.active);
16
+ return () => {
17
+ const children = slots.default?.();
18
+ if (!children || children.length === 0) {
19
+ console.warn("[@cck-ui/core/focus-trap] No children provided, nothing to trap.");
20
+ return null;
21
+ }
22
+ if (children.length === 1) {
23
+ const child = children[0];
24
+ if (isVNode(child) && child.type === Fragment) {
25
+ console.warn("[@cck-ui/core/focus-trap] Fragment as single child is not supported; wrapping with div.");
26
+ const subChildren = Array.isArray(child.children) ? child.children : [];
27
+ return h("div", { ref: trapRef }, subChildren);
28
+ }
29
+ return h(child, { ref: trapRef });
30
+ }
31
+ console.warn("[@cck-ui/core/focus-trap] Multiple root elements found; wrapping with div.");
32
+ return h("div", { ref: trapRef }, children);
33
+ };
34
+ }
35
+ }), [["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/focus-trap/focus-trap.vue"]]);
36
+ //#endregion
37
+ export { focus_trap_default as default };
38
+
39
+ //# sourceMappingURL=focus-trap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-trap.mjs","names":[],"sources":["../../../src/components/focus-trap/focus-trap.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { useFocusTrap } from '@cck-ui/hooks'\nimport { defineComponent, Fragment, h, isVNode } from 'vue'\nimport { FocusTrapPrpos } from './focus-trap.types'\nimport { useComponentProps } from '../../core'\nexport default defineComponent({\n name: 'CFocusTrap',\n props: {\n active: {\n type: Boolean,\n },\n },\n setup(props, { slots }) {\n const defaultProps = { active: true } satisfies Partial<FocusTrapPrpos>\n const computedProps = useComponentProps({\n component: 'CFocusTrap',\n defaultProps,\n props,\n })\n\n const trapRef = useFocusTrap(() => computedProps.value.active)\n\n return () => {\n const children = slots.default?.()\n if (!children || children.length === 0) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[@cck-ui/core/focus-trap] No children provided, nothing to trap.')\n }\n return null\n }\n\n if (children.length === 1) {\n const child = children[0]\n if (isVNode(child) && child.type === Fragment) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(\n '[@cck-ui/core/focus-trap] Fragment as single child is not supported; wrapping with div.'\n )\n }\n const subChildren = Array.isArray(child.children) ? child.children : []\n return h('div', { ref: trapRef }, subChildren)\n }\n return h(child, { ref: trapRef })\n }\n\n if (process.env.NODE_ENV === 'development') {\n console.warn('[@cck-ui/core/focus-trap] Multiple root elements found; wrapping with div.')\n }\n return h('div', { ref: trapRef }, children)\n }\n },\n})\n</script>\n"],"mappings":";;;;;6DAKkB,gBAAa;CAC7B,MAAM;CACN,OAAO,EACL,QAAQ,EACN,MAAM,QACR,EACF;CACA,MAAM,OAAO,EAAE,SAAS;EAEtB,MAAM,gBAAgB,kBAAkB;GACtC,WAAW;GACX,cAAA,EAHqB,QAAQ,KAG7B;GACA;EACF,CAAC;EAED,MAAM,UAAU,mBAAmB,cAAc,MAAM,MAAM;EAE7D,aAAa;GACX,MAAM,WAAW,MAAM,UAAU;GACjC,IAAI,CAAC,YAAY,SAAS,WAAW,GAAG;IAEpC,QAAQ,KAAK,kEAAkE;IAEjF,OAAO;GACT;GAEA,IAAI,SAAS,WAAW,GAAG;IACzB,MAAM,QAAQ,SAAS;IACvB,IAAI,QAAQ,KAAK,KAAK,MAAM,SAAS,UAAU;KAE3C,QAAQ,KACN,yFACF;KAEF,MAAM,cAAc,MAAM,QAAQ,MAAM,QAAQ,IAAI,MAAM,WAAW,CAAC;KACtE,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,WAAW;IAC/C;IACA,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,CAAC;GAClC;GAGE,QAAQ,KAAK,4EAA4E;GAE3F,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,QAAQ;EAC5C;CACF;AACF"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withExtend, withPropsFactory } from "../../core/utils/vue/statics.mjs";
4
+ import focus_trap_default from "./focus-trap.mjs";
5
+ const CFocusTrap = withInstall(withPropsFactory(withExtend(focus_trap_default)));
6
+ //#endregion
7
+ export { CFocusTrap, CFocusTrap as default };
8
+
9
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["FocusTrap"],"sources":["../../../src/components/focus-trap/index.ts"],"sourcesContent":["import { SFCWithInstall, withExtend, withInstall, withPropsFactory } from '../../core'\nimport FocusTrap from './focus-trap.vue'\n\nconst FocusTrapWithStatic = withPropsFactory(withExtend(FocusTrap))\n\nexport const CFocusTrap: SFCWithInstall<typeof FocusTrap> = withInstall(FocusTrapWithStatic)\n\nexport default CFocusTrap\n\nexport * from './focus-trap.types'\n"],"mappings":";;;;AAKA,MAAa,aAA+C,YAFhC,iBAAiB,WAAWA,kBAAS,CAEO,CAAmB"}
@@ -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 visually_hidden_module_default from "./visually-hidden.module.mjs";
5
+ import visually_hidden_default from "./visually-hidden.mjs";
6
+ const CVisuallyHidden = withInstall(withPropsFactory(withExtend(withClasses(visually_hidden_default, visually_hidden_module_default))));
7
+ //#endregion
8
+ export { CVisuallyHidden, CVisuallyHidden as default };
9
+
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["VisuallyHidden","classes"],"sources":["../../../src/components/visually-hidden/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n} from '../../core'\nimport classes from './visually-hidden.module.css'\nimport VisuallyHidden from './visually-hidden.vue'\n\nconst VisuallyHiddenWithStatic = withPropsFactory(withExtend(withClasses(VisuallyHidden, classes)))\n\nexport const CVisuallyHidden: SFCWithInstallAndClasses<typeof VisuallyHidden, typeof classes> =\n withInstall(VisuallyHiddenWithStatic)\n\nexport default CVisuallyHidden\n\nexport * from './visually-hidden.types'\n"],"mappings":";;;;;AAYA,MAAa,kBACX,YAH+B,iBAAiB,WAAW,YAAYA,yBAAgBC,8BAAO,CAAC,CAGnF,CAAwB"}
@@ -0,0 +1,385 @@
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 visually_hidden_module_default from "./visually-hidden.module.mjs";
7
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
8
+ //#region packages/@cck-ui/core/src/components/visually-hidden/visually-hidden.vue
9
+ const _sfc_main = /*@__PURE__*/ defineComponent({
10
+ name: "CVisuallyHidden",
11
+ __name: "visually-hidden",
12
+ props: {
13
+ className: {
14
+ type: String,
15
+ required: false
16
+ },
17
+ style: {
18
+ type: [
19
+ Object,
20
+ Function,
21
+ Array
22
+ ],
23
+ required: false,
24
+ skipCheck: true
25
+ },
26
+ __vars: {
27
+ type: null,
28
+ required: false
29
+ },
30
+ __size: {
31
+ type: String,
32
+ required: false
33
+ },
34
+ hiddenFrom: {
35
+ type: null,
36
+ required: false
37
+ },
38
+ visibleFrom: {
39
+ type: null,
40
+ required: false
41
+ },
42
+ lightHidden: {
43
+ type: Boolean,
44
+ required: false
45
+ },
46
+ darkHidden: {
47
+ type: Boolean,
48
+ required: false
49
+ },
50
+ mod: {
51
+ type: [
52
+ Object,
53
+ String,
54
+ Array
55
+ ],
56
+ required: false
57
+ },
58
+ m: {
59
+ type: null,
60
+ required: false
61
+ },
62
+ my: {
63
+ type: null,
64
+ required: false
65
+ },
66
+ mx: {
67
+ type: null,
68
+ required: false
69
+ },
70
+ mt: {
71
+ type: null,
72
+ required: false
73
+ },
74
+ mb: {
75
+ type: null,
76
+ required: false
77
+ },
78
+ ms: {
79
+ type: null,
80
+ required: false
81
+ },
82
+ me: {
83
+ type: null,
84
+ required: false
85
+ },
86
+ mis: {
87
+ type: null,
88
+ required: false
89
+ },
90
+ mie: {
91
+ type: null,
92
+ required: false
93
+ },
94
+ ml: {
95
+ type: null,
96
+ required: false
97
+ },
98
+ mr: {
99
+ type: null,
100
+ required: false
101
+ },
102
+ p: {
103
+ type: null,
104
+ required: false
105
+ },
106
+ py: {
107
+ type: null,
108
+ required: false
109
+ },
110
+ px: {
111
+ type: null,
112
+ required: false
113
+ },
114
+ pt: {
115
+ type: null,
116
+ required: false
117
+ },
118
+ pb: {
119
+ type: null,
120
+ required: false
121
+ },
122
+ ps: {
123
+ type: null,
124
+ required: false
125
+ },
126
+ pe: {
127
+ type: null,
128
+ required: false
129
+ },
130
+ pis: {
131
+ type: null,
132
+ required: false
133
+ },
134
+ pie: {
135
+ type: null,
136
+ required: false
137
+ },
138
+ pl: {
139
+ type: null,
140
+ required: false
141
+ },
142
+ pr: {
143
+ type: null,
144
+ required: false
145
+ },
146
+ bd: {
147
+ type: null,
148
+ required: false
149
+ },
150
+ bdrs: {
151
+ type: null,
152
+ required: false
153
+ },
154
+ bg: {
155
+ type: null,
156
+ required: false
157
+ },
158
+ c: {
159
+ type: null,
160
+ required: false
161
+ },
162
+ opacity: {
163
+ type: [
164
+ String,
165
+ Object,
166
+ Number
167
+ ],
168
+ required: false
169
+ },
170
+ ff: {
171
+ type: [String, Object],
172
+ required: false
173
+ },
174
+ fz: {
175
+ type: null,
176
+ required: false
177
+ },
178
+ fw: {
179
+ type: null,
180
+ required: false
181
+ },
182
+ lts: {
183
+ type: null,
184
+ required: false
185
+ },
186
+ ta: {
187
+ type: [String, Object],
188
+ required: false
189
+ },
190
+ lh: {
191
+ type: null,
192
+ required: false
193
+ },
194
+ fs: {
195
+ type: null,
196
+ required: false
197
+ },
198
+ tt: {
199
+ type: [String, Object],
200
+ required: false
201
+ },
202
+ td: {
203
+ type: null,
204
+ required: false
205
+ },
206
+ w: {
207
+ type: null,
208
+ required: false
209
+ },
210
+ miw: {
211
+ type: null,
212
+ required: false
213
+ },
214
+ maw: {
215
+ type: null,
216
+ required: false
217
+ },
218
+ h: {
219
+ type: null,
220
+ required: false
221
+ },
222
+ mih: {
223
+ type: null,
224
+ required: false
225
+ },
226
+ mah: {
227
+ type: null,
228
+ required: false
229
+ },
230
+ bgsz: {
231
+ type: null,
232
+ required: false
233
+ },
234
+ bgp: {
235
+ type: null,
236
+ required: false
237
+ },
238
+ bgr: {
239
+ type: null,
240
+ required: false
241
+ },
242
+ bga: {
243
+ type: null,
244
+ required: false
245
+ },
246
+ pos: {
247
+ type: [String, Object],
248
+ required: false
249
+ },
250
+ top: {
251
+ type: null,
252
+ required: false
253
+ },
254
+ left: {
255
+ type: null,
256
+ required: false
257
+ },
258
+ bottom: {
259
+ type: null,
260
+ required: false
261
+ },
262
+ right: {
263
+ type: null,
264
+ required: false
265
+ },
266
+ inset: {
267
+ type: null,
268
+ required: false
269
+ },
270
+ display: {
271
+ type: null,
272
+ required: false
273
+ },
274
+ flex: {
275
+ type: null,
276
+ required: false
277
+ },
278
+ unstyled: {
279
+ type: Boolean,
280
+ required: false
281
+ },
282
+ variant: {
283
+ type: null,
284
+ required: false
285
+ },
286
+ classNames: {
287
+ type: null,
288
+ required: false
289
+ },
290
+ styles: {
291
+ type: null,
292
+ required: false
293
+ },
294
+ vars: {
295
+ type: Function,
296
+ required: false
297
+ },
298
+ attributes: {
299
+ type: null,
300
+ required: false
301
+ }
302
+ },
303
+ setup(__props, { expose: __expose }) {
304
+ const _root = ref(null);
305
+ const attrs = useAttrs();
306
+ const rawProps = __props;
307
+ const props = useComponentProps({
308
+ component: "CVisuallyHidden",
309
+ defaultProps: {},
310
+ props: rawProps
311
+ });
312
+ const knownProps = [
313
+ "className",
314
+ "style",
315
+ "classNames",
316
+ "styles",
317
+ "unstyled",
318
+ "vars",
319
+ "attributes"
320
+ ];
321
+ const styleProps = computed(() => ({
322
+ ...props.value,
323
+ ...attrs,
324
+ style: attrs.style ?? props.value.style
325
+ }));
326
+ const getStyles = useStyles({
327
+ name: "VisuallyHidden",
328
+ props: styleProps,
329
+ classes: visually_hidden_module_default,
330
+ className: () => props.value.className,
331
+ style: () => props.value.style,
332
+ classNames: props.value.classNames,
333
+ styles: props.value.styles,
334
+ unstyled: props.value.unstyled,
335
+ attributes: props.value.attributes
336
+ });
337
+ const rootAttrs = computed(() => getStyles("root"));
338
+ const mergedAttrs = computed(() => {
339
+ const others = {};
340
+ const propsValue = props.value;
341
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
342
+ const userMod = props.value.mod;
343
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
344
+ return {
345
+ ...others,
346
+ mod: mergedMod,
347
+ ...rootAttrs.value
348
+ };
349
+ });
350
+ __expose({ root: computed(() => _root.value?.root ?? null) });
351
+ const __returned__ = {
352
+ _root,
353
+ attrs,
354
+ rawProps,
355
+ props,
356
+ knownProps,
357
+ styleProps,
358
+ getStyles,
359
+ rootAttrs,
360
+ mergedAttrs,
361
+ get CBox() {
362
+ return CBox;
363
+ }
364
+ };
365
+ Object.defineProperty(__returned__, "__isScriptSetup", {
366
+ enumerable: false,
367
+ value: true
368
+ });
369
+ return __returned__;
370
+ }
371
+ });
372
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
373
+ return openBlock(), createBlock($setup["CBox"], mergeProps({
374
+ ref: "_root",
375
+ tag: "span"
376
+ }, $setup.mergedAttrs), {
377
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
378
+ _: 3
379
+ }, 16);
380
+ }
381
+ var visually_hidden_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/visually-hidden/visually-hidden.vue"]]);
382
+ //#endregion
383
+ export { visually_hidden_default as default };
384
+
385
+ //# sourceMappingURL=visually-hidden.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visually-hidden.mjs","names":[],"sources":["../../../src/components/visually-hidden/visually-hidden.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"span\" v-bind=\"mergedAttrs\">\n <slot />\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 { VisuallyHiddenFactory, VisuallyHiddenProps } from './visually-hidden.types'\nimport classes from './visually-hidden.module.css'\n\ndefineOptions({\n name: 'CVisuallyHidden',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<VisuallyHiddenProps>()\n\nconst props = useComponentProps({\n component: 'CVisuallyHidden',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = ['className', 'style', 'classNames', 'styles', 'unstyled', 'vars', 'attributes']\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<VisuallyHiddenFactory>({\n name: 'VisuallyHidden',\n props: styleProps,\n classes,\n className: () => props.value.className,\n style: () => props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = 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].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GAAC;GAAa;GAAS;GAAc;GAAU;GAAY;GAAQ;EAAY;EAElG,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAiC;GACjD,MAAM;GACN,OAAO;GACP,SAAA;GACA,iBAAiB,MAAM,MAAM;GAC7B,aAAa,MAAM,MAAM;GACzB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;EAC1B,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;GACjC,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,CAAC,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,CAAE;GACpF,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAhEC,YAEQ,OAAA,SAFR,WAEQ;EAFD,KAAI;EAAQ,KAAI;IAAe,OAAA,WAAW,GAAA;yBACvC,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/visually-hidden/visually-hidden.module.css
3
+ var visually_hidden_module_default = { "root": "m_56280a25" };
4
+ //#endregion
5
+ export { visually_hidden_module_default as default };
6
+
7
+ //# sourceMappingURL=visually-hidden.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visually-hidden.module.mjs","names":[],"sources":["../../../src/components/visually-hidden/visually-hidden.module.css"],"sourcesContent":[".root {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n"],"mappings":";;AAAA,IAAA,iCAAe,EAAC,QAAO,aAAY"}
package/esm/index.mjs CHANGED
@@ -66,6 +66,7 @@ import { CCopyButton } from "./components/copy-button/index.mjs";
66
66
  import { CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle } from "./components/empty-state/index.mjs";
67
67
  import { CFileButton } from "./components/file-button/index.mjs";
68
68
  import { CFlex } from "./components/flex/index.mjs";
69
+ import { CFocusTrap } from "./components/focus-trap/index.mjs";
69
70
  import { CCol, CGrid } from "./components/grid/index.mjs";
70
71
  import { CGroup } from "./components/group/index.mjs";
71
72
  import { CImage } from "./components/image/index.mjs";
@@ -78,6 +79,7 @@ import { CSplitter, CSplitterPane } from "./components/splitter/index.mjs";
78
79
  import { CStack } from "./components/stack/index.mjs";
79
80
  import { CText } from "./components/text/index.mjs";
80
81
  import { CTypography } from "./components/typography/index.mjs";
82
+ import { CVisuallyHidden } from "./components/visually-hidden/index.mjs";
81
83
  //#region packages/@cck-ui/core/src/index.ts
82
84
  const INSTALLED_KEY = Symbol("INSTALLED_KEY");
83
85
  const components = [
@@ -103,6 +105,7 @@ const components = [
103
105
  CEmptyStateTitle,
104
106
  CFileButton,
105
107
  CFlex,
108
+ CFocusTrap,
106
109
  CGrid,
107
110
  CGroup,
108
111
  CImage,
@@ -118,6 +121,7 @@ const components = [
118
121
  CText,
119
122
  CTransition,
120
123
  CTypography,
124
+ CVisuallyHidden,
121
125
  UnstyledButton
122
126
  ];
123
127
  const CckUI = { install(app) {
@@ -128,6 +132,6 @@ const CckUI = { install(app) {
128
132
  });
129
133
  } };
130
134
  //#endregion
131
- export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CGrid, CGroup, CImage, CLoader, CONFIG_KEY, CPaper, CSemiCircleProgress, CSimpleGrid, CSkeleton, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, CTypography, 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 };
135
+ export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, CLoader, CONFIG_KEY, CPaper, CSemiCircleProgress, CSimpleGrid, CSkeleton, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, CTypography, CVisuallyHidden, 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 };
132
136
 
133
137
  //# 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 CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\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 CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,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;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 CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\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 CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n CTypography,\n CVisuallyHidden,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,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;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,6 @@
1
+ export interface FocusTrapPrpos {
2
+ /**
3
+ * @description If set to `false`, disables focus trap
4
+ */
5
+ active?: boolean;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { SFCWithInstall } from '../../core';
2
+ import FocusTrap from './focus-trap.vue';
3
+ export declare const CFocusTrap: SFCWithInstall<typeof FocusTrap>;
4
+ export default CFocusTrap;
5
+ export * from './focus-trap.types';
@@ -9,6 +9,7 @@ export * from './copy-button';
9
9
  export * from './empty-state';
10
10
  export * from './file-button';
11
11
  export * from './flex';
12
+ export * from './focus-trap';
12
13
  export * from './grid';
13
14
  export * from './group';
14
15
  export * from './image';
@@ -24,3 +25,4 @@ export * from './transition';
24
25
  export * from './text';
25
26
  export * from './typography';
26
27
  export * from './unstyled-button';
28
+ export * from './visually-hidden';
@@ -0,0 +1,6 @@
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
+ import classes from './visually-hidden.module.css';
3
+ import VisuallyHidden from './visually-hidden.vue';
4
+ export declare const CVisuallyHidden: SFCWithInstallAndClasses<typeof VisuallyHidden, typeof classes>;
5
+ export default CVisuallyHidden;
6
+ export * from './visually-hidden.types';
@@ -0,0 +1,9 @@
1
+ import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core';
2
+ export type VisuallyHiddenStylesNames = 'root';
3
+ export interface VisuallyHiddenProps extends BoxProps, StylesApiProps<VisuallyHiddenFactory>, /* @vue-ignore */ ElementProps<'span'> {
4
+ }
5
+ export type VisuallyHiddenFactory = Factory<{
6
+ props: VisuallyHiddenProps;
7
+ ref: HTMLSpanElement;
8
+ stylesNames: VisuallyHiddenStylesNames;
9
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.21.0",
3
+ "version": "0.23.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,11 @@
1
+ .m_56280a25 {
2
+ border: 0;
3
+ clip: rect(0 0 0 0);
4
+ height: calc(0.0625rem * var(--c-scale));
5
+ width: calc(0.0625rem * var(--c-scale));
6
+ margin: calc(-0.0625rem * var(--c-scale));
7
+ overflow: hidden;
8
+ padding: 0;
9
+ position: absolute;
10
+ white-space: nowrap;
11
+ }
@@ -0,0 +1,12 @@
1
+ @layer cck {.m_56280a25 {
2
+ border: 0;
3
+ clip: rect(0 0 0 0);
4
+ height: calc(0.0625rem * var(--c-scale));
5
+ width: calc(0.0625rem * var(--c-scale));
6
+ margin: calc(-0.0625rem * var(--c-scale));
7
+ overflow: hidden;
8
+ padding: 0;
9
+ position: absolute;
10
+ white-space: nowrap;
11
+ }
12
+ }
package/styles.css CHANGED
@@ -2078,3 +2078,15 @@ fieldset:disabled .c-active:active {
2078
2078
  :where([data-c-color-scheme='dark']) .m_487612c0 :where(blockquote) {
2079
2079
  background-color: var(--c-color-dark-8);
2080
2080
  }
2081
+
2082
+ .m_56280a25 {
2083
+ border: 0;
2084
+ clip: rect(0 0 0 0);
2085
+ height: calc(0.0625rem * var(--c-scale));
2086
+ width: calc(0.0625rem * var(--c-scale));
2087
+ margin: calc(-0.0625rem * var(--c-scale));
2088
+ overflow: hidden;
2089
+ padding: 0;
2090
+ position: absolute;
2091
+ white-space: nowrap;
2092
+ }
package/styles.layer.css CHANGED
@@ -2078,4 +2078,16 @@ fieldset:disabled .c-active:active {
2078
2078
  :where([data-c-color-scheme='dark']) .m_487612c0 :where(blockquote) {
2079
2079
  background-color: var(--c-color-dark-8);
2080
2080
  }
2081
+
2082
+ .m_56280a25 {
2083
+ border: 0;
2084
+ clip: rect(0 0 0 0);
2085
+ height: calc(0.0625rem * var(--c-scale));
2086
+ width: calc(0.0625rem * var(--c-scale));
2087
+ margin: calc(-0.0625rem * var(--c-scale));
2088
+ overflow: hidden;
2089
+ padding: 0;
2090
+ position: absolute;
2091
+ white-space: nowrap;
2092
+ }
2081
2093
  }