@cck-ui/core 0.37.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Kbd","classes"],"sources":["../../../src/components/kbd/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport classes from './kbd.module.css'\nimport { varsResolver } from './kbd.utils'\nimport Kbd from './kbd.vue'\n\nconst KbdWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Kbd, classes), varsResolver))\n)\n\nexport const CKbd: SFCWithInstallAndClasses<typeof Kbd, typeof classes> = withInstall(KbdWithStatic)\n\nexport default CKbd\n\nexport * from './kbd.types'\n"],"mappings":";;;;;;AAgBA,MAAa,OAA6D,YAJpD,iBACpB,WAAW,iBAAiB,YAAYA,aAAKC,kBAAO,GAAG,YAAY,CAAC,CAGgB,CAAa"}
@@ -0,0 +1,396 @@
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 kbd_module_default from "./kbd.module.mjs";
7
+ import { varsResolver } from "./kbd.utils.mjs";
8
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
9
+ //#region packages/@cck-ui/core/src/components/kbd/kbd.vue
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ name: "CKbd",
12
+ __name: "kbd",
13
+ props: {
14
+ size: {
15
+ type: [
16
+ String,
17
+ Number,
18
+ Object
19
+ ],
20
+ required: false
21
+ },
22
+ className: {
23
+ type: String,
24
+ required: false
25
+ },
26
+ style: {
27
+ type: [
28
+ Object,
29
+ Function,
30
+ Array
31
+ ],
32
+ required: false,
33
+ skipCheck: true
34
+ },
35
+ __vars: {
36
+ type: null,
37
+ required: false
38
+ },
39
+ __size: {
40
+ type: String,
41
+ required: false
42
+ },
43
+ hiddenFrom: {
44
+ type: null,
45
+ required: false
46
+ },
47
+ visibleFrom: {
48
+ type: null,
49
+ required: false
50
+ },
51
+ lightHidden: {
52
+ type: Boolean,
53
+ required: false
54
+ },
55
+ darkHidden: {
56
+ type: Boolean,
57
+ required: false
58
+ },
59
+ mod: {
60
+ type: [
61
+ Object,
62
+ String,
63
+ Array
64
+ ],
65
+ required: false
66
+ },
67
+ m: {
68
+ type: null,
69
+ required: false
70
+ },
71
+ my: {
72
+ type: null,
73
+ required: false
74
+ },
75
+ mx: {
76
+ type: null,
77
+ required: false
78
+ },
79
+ mt: {
80
+ type: null,
81
+ required: false
82
+ },
83
+ mb: {
84
+ type: null,
85
+ required: false
86
+ },
87
+ ms: {
88
+ type: null,
89
+ required: false
90
+ },
91
+ me: {
92
+ type: null,
93
+ required: false
94
+ },
95
+ mis: {
96
+ type: null,
97
+ required: false
98
+ },
99
+ mie: {
100
+ type: null,
101
+ required: false
102
+ },
103
+ ml: {
104
+ type: null,
105
+ required: false
106
+ },
107
+ mr: {
108
+ type: null,
109
+ required: false
110
+ },
111
+ p: {
112
+ type: null,
113
+ required: false
114
+ },
115
+ py: {
116
+ type: null,
117
+ required: false
118
+ },
119
+ px: {
120
+ type: null,
121
+ required: false
122
+ },
123
+ pt: {
124
+ type: null,
125
+ required: false
126
+ },
127
+ pb: {
128
+ type: null,
129
+ required: false
130
+ },
131
+ ps: {
132
+ type: null,
133
+ required: false
134
+ },
135
+ pe: {
136
+ type: null,
137
+ required: false
138
+ },
139
+ pis: {
140
+ type: null,
141
+ required: false
142
+ },
143
+ pie: {
144
+ type: null,
145
+ required: false
146
+ },
147
+ pl: {
148
+ type: null,
149
+ required: false
150
+ },
151
+ pr: {
152
+ type: null,
153
+ required: false
154
+ },
155
+ bd: {
156
+ type: null,
157
+ required: false
158
+ },
159
+ bdrs: {
160
+ type: null,
161
+ required: false
162
+ },
163
+ bg: {
164
+ type: null,
165
+ required: false
166
+ },
167
+ c: {
168
+ type: null,
169
+ required: false
170
+ },
171
+ opacity: {
172
+ type: [
173
+ String,
174
+ Object,
175
+ Number
176
+ ],
177
+ required: false
178
+ },
179
+ ff: {
180
+ type: [String, Object],
181
+ required: false
182
+ },
183
+ fz: {
184
+ type: null,
185
+ required: false
186
+ },
187
+ fw: {
188
+ type: null,
189
+ required: false
190
+ },
191
+ lts: {
192
+ type: null,
193
+ required: false
194
+ },
195
+ ta: {
196
+ type: [String, Object],
197
+ required: false
198
+ },
199
+ lh: {
200
+ type: null,
201
+ required: false
202
+ },
203
+ fs: {
204
+ type: null,
205
+ required: false
206
+ },
207
+ tt: {
208
+ type: [String, Object],
209
+ required: false
210
+ },
211
+ td: {
212
+ type: null,
213
+ required: false
214
+ },
215
+ w: {
216
+ type: null,
217
+ required: false
218
+ },
219
+ miw: {
220
+ type: null,
221
+ required: false
222
+ },
223
+ maw: {
224
+ type: null,
225
+ required: false
226
+ },
227
+ h: {
228
+ type: null,
229
+ required: false
230
+ },
231
+ mih: {
232
+ type: null,
233
+ required: false
234
+ },
235
+ mah: {
236
+ type: null,
237
+ required: false
238
+ },
239
+ bgsz: {
240
+ type: null,
241
+ required: false
242
+ },
243
+ bgp: {
244
+ type: null,
245
+ required: false
246
+ },
247
+ bgr: {
248
+ type: null,
249
+ required: false
250
+ },
251
+ bga: {
252
+ type: null,
253
+ required: false
254
+ },
255
+ pos: {
256
+ type: [String, Object],
257
+ required: false
258
+ },
259
+ top: {
260
+ type: null,
261
+ required: false
262
+ },
263
+ left: {
264
+ type: null,
265
+ required: false
266
+ },
267
+ bottom: {
268
+ type: null,
269
+ required: false
270
+ },
271
+ right: {
272
+ type: null,
273
+ required: false
274
+ },
275
+ inset: {
276
+ type: null,
277
+ required: false
278
+ },
279
+ display: {
280
+ type: null,
281
+ required: false
282
+ },
283
+ flex: {
284
+ type: null,
285
+ required: false
286
+ },
287
+ unstyled: {
288
+ type: Boolean,
289
+ required: false
290
+ },
291
+ variant: {
292
+ type: null,
293
+ required: false
294
+ },
295
+ classNames: {
296
+ type: null,
297
+ required: false
298
+ },
299
+ styles: {
300
+ type: null,
301
+ required: false
302
+ },
303
+ vars: {
304
+ type: Function,
305
+ required: false
306
+ },
307
+ attributes: {
308
+ type: null,
309
+ required: false
310
+ }
311
+ },
312
+ setup(__props, { expose: __expose }) {
313
+ const _root = ref(null);
314
+ const attrs = useAttrs();
315
+ const rawProps = __props;
316
+ const props = useComponentProps({
317
+ component: "CKbd",
318
+ defaultProps: {},
319
+ props: rawProps
320
+ });
321
+ const knownProps = [
322
+ "classNames",
323
+ "className",
324
+ "style",
325
+ "styles",
326
+ "unstyled",
327
+ "vars",
328
+ "attributes"
329
+ ];
330
+ const styleProps = computed(() => ({
331
+ ...props.value,
332
+ ...attrs,
333
+ style: attrs.style ?? props.value.style
334
+ }));
335
+ const getStyles = useStyles({
336
+ name: "Kbd",
337
+ props: styleProps,
338
+ classes: kbd_module_default,
339
+ className: () => props.value.className,
340
+ style: () => props.value.style,
341
+ classNames: props.value.classNames,
342
+ styles: props.value.styles,
343
+ unstyled: props.value.unstyled,
344
+ attributes: props.value.attributes,
345
+ vars: props.value.vars,
346
+ varsResolver
347
+ });
348
+ const rootAttrs = computed(() => getStyles("root"));
349
+ const mergedAttrs = computed(() => {
350
+ const others = {};
351
+ const propsValue = props.value;
352
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
353
+ const userMod = props.value.mod;
354
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod]];
355
+ return {
356
+ ...others,
357
+ mod: mergedMod,
358
+ ...rootAttrs.value
359
+ };
360
+ });
361
+ __expose({ root: computed(() => _root.value?.root ?? null) });
362
+ const __returned__ = {
363
+ _root,
364
+ attrs,
365
+ rawProps,
366
+ props,
367
+ knownProps,
368
+ styleProps,
369
+ getStyles,
370
+ rootAttrs,
371
+ mergedAttrs,
372
+ get CBox() {
373
+ return CBox;
374
+ }
375
+ };
376
+ Object.defineProperty(__returned__, "__isScriptSetup", {
377
+ enumerable: false,
378
+ value: true
379
+ });
380
+ return __returned__;
381
+ }
382
+ });
383
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
384
+ return openBlock(), createBlock($setup["CBox"], mergeProps({
385
+ ref: "_root",
386
+ tag: "kbd"
387
+ }, $setup.mergedAttrs), {
388
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
389
+ _: 3
390
+ }, 16);
391
+ }
392
+ var kbd_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/kbd/kbd.vue"]]);
393
+ //#endregion
394
+ export { kbd_default as default };
395
+
396
+ //# sourceMappingURL=kbd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd.mjs","names":[],"sources":["../../../src/components/kbd/kbd.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"kbd\" 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 classes from './kbd.module.css'\nimport { KbdFactory, KbdProps } from './kbd.types'\nimport { varsResolver } from './kbd.utils'\n\ndefineOptions({\n name: 'CKbd',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<KbdProps>()\n\nconst props = useComponentProps({\n component: 'CKbd',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = ['classNames', 'className', 'style', '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<KbdFactory>({\n name: 'Kbd',\n props: styleProps,\n classes,\n className: () => props.value.className,\n style: () => props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\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])]\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,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GAAC;GAAc;GAAa;GAAS;GAAU;GAAY;GAAQ;EAAY;EAElG,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAsB;GACtC,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;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,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,CAAE;GACpE,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAnEC,YAEQ,OAAA,SAFR,WAEQ;EAFD,KAAI;EAAQ,KAAI;IAAc,OAAA,WAAW,GAAA;yBACtC,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/kbd/kbd.module.css
3
+ var kbd_module_default = { "root": "m_d894b0c2" };
4
+ //#endregion
5
+ export { kbd_module_default as default };
6
+
7
+ //# sourceMappingURL=kbd.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd.module.mjs","names":[],"sources":["../../../src/components/kbd/kbd.module.css"],"sourcesContent":[".root {\n --kbd-fz-xs: 10px;\n --kbd-fz-sm: 12px;\n --kbd-fz-md: 14px;\n --kbd-fz-lg: 16px;\n --kbd-fz-xl: 20px;\n --kbd-fz: var(--kbd-fz-sm);\n\n font-family: var(--c-font-family-monospace);\n line-height: var(--c-line-height);\n font-weight: var(--c-font-weight-bold);\n font-size: var(--kbd-fz);\n border-radius: var(--c-radius-sm);\n border: 1px solid;\n border-bottom-width: 3px;\n unicode-bidi: embed;\n text-align: center;\n padding: 0.12em 0.45em;\n\n @mixin where-light {\n border-color: var(--c-color-gray-3);\n color: var(--c-color-gray-7);\n background-color: var(--c-color-gray-0);\n }\n\n @mixin where-dark {\n border-color: var(--c-color-dark-4);\n color: var(--c-color-dark-0);\n background-color: var(--c-color-dark-6);\n }\n}\n"],"mappings":";;AAAA,IAAA,qBAAe,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/kbd/kbd.utils.ts
5
+ const varsResolver = createVarsResolver((_, { size }) => ({ root: { "--kbd-fz": getSize(size, "kbd-fz") } }));
6
+ //#endregion
7
+ export { varsResolver };
8
+
9
+ //# sourceMappingURL=kbd.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd.utils.mjs","names":[],"sources":["../../../src/components/kbd/kbd.utils.ts"],"sourcesContent":["import { createVarsResolver, getSize } from '../../core'\nimport { KbdFactory } from './kbd.types'\n\nexport const varsResolver = createVarsResolver<KbdFactory>((_, { size }) => ({\n root: {\n '--kbd-fz': getSize(size, 'kbd-fz'),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAAgC,GAAG,EAAE,YAAY,EAC3E,MAAM,EACJ,YAAY,QAAQ,MAAM,QAAQ,EACpC,EACF,EAAE"}
package/esm/index.mjs CHANGED
@@ -86,6 +86,7 @@ import { CCol, CGrid } from "./components/grid/index.mjs";
86
86
  import { CGroup } from "./components/group/index.mjs";
87
87
  import { CImage } from "./components/image/index.mjs";
88
88
  import { CIndicator } from "./components/indicator/index.mjs";
89
+ import { CKbd } from "./components/kbd/index.mjs";
89
90
  import { CPaper } from "./components/paper/index.mjs";
90
91
  import { CSemiCircleProgress } from "./components/semi-circle-progress/index.mjs";
91
92
  import { CSimpleGrid } from "./components/simple-grid/index.mjs";
@@ -141,6 +142,7 @@ const components = [
141
142
  CGroup,
142
143
  CImage,
143
144
  CIndicator,
145
+ CKbd,
144
146
  CLoader,
145
147
  CPaper,
146
148
  CPortal,
@@ -165,6 +167,6 @@ const CckUI = { install(app) {
165
167
  });
166
168
  } };
167
169
  //#endregion
168
- export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAffix, CAlert, CAnchor, CAspectRatio, CAvatar, CAvatarGroup, CBackgroundImage, CBadge, CBox, CBreadcrumbs, CBurger, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCard, CCardSection, CCenter, CCloseButton, CCol, CColorSwatch, CContainer, CCopyButton, CDataList, CDataListItem, CDataListItemLabel, CDataListItemValue, CDefaultLoaders, CDivider, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, CIndicator, CLoader, CONFIG_KEY, CPaper, CPortal, 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, filterFalsyChildren, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getDefaultZIndex, 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 };
170
+ export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAffix, CAlert, CAnchor, CAspectRatio, CAvatar, CAvatarGroup, CBackgroundImage, CBadge, CBox, CBreadcrumbs, CBurger, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCard, CCardSection, CCenter, CCloseButton, CCol, CColorSwatch, CContainer, CCopyButton, CDataList, CDataListItem, CDataListItemLabel, CDataListItemValue, CDefaultLoaders, CDivider, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, CIndicator, CKbd, CLoader, CONFIG_KEY, CPaper, CPortal, 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, filterFalsyChildren, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getDefaultZIndex, 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 };
169
171
 
170
172
  //# 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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBadge,\n CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCard,\n CCardSection,\n CCenter,\n CCloseButton,\n CCol,\n CColorSwatch,\n CContainer,\n CCopyButton,\n CDataList,\n CDataListItem,\n CDataListItemLabel,\n CDataListItemValue,\n CDivider,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CIndicator,\n CLoader,\n CPaper,\n CPortal,\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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBadge,\n CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCard,\n CCardSection,\n CCenter,\n CCloseButton,\n CCol,\n CColorSwatch,\n CContainer,\n CCopyButton,\n CDataList,\n CDataListItem,\n CDataListItemLabel,\n CDataListItemValue,\n CDivider,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CIndicator,\n CLoader,\n CPaper,\n CPortal,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,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;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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBadge,\n CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCard,\n CCardSection,\n CCenter,\n CCloseButton,\n CCol,\n CColorSwatch,\n CContainer,\n CCopyButton,\n CDataList,\n CDataListItem,\n CDataListItemLabel,\n CDataListItemValue,\n CDivider,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CIndicator,\n CKbd,\n CLoader,\n CPaper,\n CPortal,\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 CAffix,\n CAlert,\n CAnchor,\n CAspectRatio,\n CAvatar,\n CAvatarGroup,\n CBackgroundImage,\n CBadge,\n CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCard,\n CCardSection,\n CCenter,\n CCloseButton,\n CCol,\n CColorSwatch,\n CContainer,\n CCopyButton,\n CDataList,\n CDataListItem,\n CDataListItemLabel,\n CDataListItemValue,\n CDivider,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFileButton,\n CFlex,\n CFocusTrap,\n CGrid,\n CGroup,\n CImage,\n CIndicator,\n CKbd,\n CLoader,\n CPaper,\n CPortal,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,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;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"}
@@ -25,6 +25,7 @@ export * from './grid';
25
25
  export * from './group';
26
26
  export * from './image';
27
27
  export * from './indicator';
28
+ export * from './kbd';
28
29
  export * from './loader';
29
30
  export * from './paper';
30
31
  export * from './portal';
@@ -0,0 +1,6 @@
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
+ import classes from './kbd.module.css';
3
+ import Kbd from './kbd.vue';
4
+ export declare const CKbd: SFCWithInstallAndClasses<typeof Kbd, typeof classes>;
5
+ export default CKbd;
6
+ export * from './kbd.types';
@@ -0,0 +1,18 @@
1
+ import { BoxProps, CSize, ElementProps, Factory, StylesApiProps } from '../../core';
2
+ export type KbdStylesNames = 'root';
3
+ export type KbdCssVariables = {
4
+ root: '--kbd-fz';
5
+ };
6
+ export interface KbdProps extends BoxProps, StylesApiProps<KbdFactory>, /* @vue-ignore */ ElementProps<'kbd'> {
7
+ /**
8
+ * Controls `font-size` and `padding`
9
+ * @default 'sm'
10
+ */
11
+ size?: CSize | number | (string & {});
12
+ }
13
+ export type KbdFactory = Factory<{
14
+ props: KbdProps;
15
+ ref: HTMLElement;
16
+ stylesNames: KbdStylesNames;
17
+ vars: KbdCssVariables;
18
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./kbd.types").KbdProps;
3
+ ref: HTMLElement;
4
+ stylesNames: import("./kbd.types").KbdStylesNames;
5
+ vars: import("./kbd.types").KbdCssVariables;
6
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.37.0",
3
+ "version": "0.38.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",
package/styles/kbd.css ADDED
@@ -0,0 +1,31 @@
1
+ .m_d894b0c2 {
2
+ --kbd-fz-xs: calc(0.625rem * var(--c-scale));
3
+ --kbd-fz-sm: calc(0.75rem * var(--c-scale));
4
+ --kbd-fz-md: calc(0.875rem * var(--c-scale));
5
+ --kbd-fz-lg: calc(1rem * var(--c-scale));
6
+ --kbd-fz-xl: calc(1.25rem * var(--c-scale));
7
+ --kbd-fz: var(--kbd-fz-sm);
8
+
9
+ font-family: var(--c-font-family-monospace);
10
+ line-height: var(--c-line-height);
11
+ font-weight: var(--c-font-weight-bold);
12
+ font-size: var(--kbd-fz);
13
+ border-radius: var(--c-radius-sm);
14
+ border: calc(0.0625rem * var(--c-scale)) solid;
15
+ border-bottom-width: calc(0.1875rem * var(--c-scale));
16
+ unicode-bidi: embed;
17
+ text-align: center;
18
+ padding: 0.12em 0.45em;
19
+ }
20
+
21
+ :where([data-c-color-scheme='light']) .m_d894b0c2 {
22
+ border-color: var(--c-color-gray-3);
23
+ color: var(--c-color-gray-7);
24
+ background-color: var(--c-color-gray-0);
25
+ }
26
+
27
+ :where([data-c-color-scheme='dark']) .m_d894b0c2 {
28
+ border-color: var(--c-color-dark-4);
29
+ color: var(--c-color-dark-0);
30
+ background-color: var(--c-color-dark-6);
31
+ }
@@ -0,0 +1,32 @@
1
+ @layer cck {.m_d894b0c2 {
2
+ --kbd-fz-xs: calc(0.625rem * var(--c-scale));
3
+ --kbd-fz-sm: calc(0.75rem * var(--c-scale));
4
+ --kbd-fz-md: calc(0.875rem * var(--c-scale));
5
+ --kbd-fz-lg: calc(1rem * var(--c-scale));
6
+ --kbd-fz-xl: calc(1.25rem * var(--c-scale));
7
+ --kbd-fz: var(--kbd-fz-sm);
8
+
9
+ font-family: var(--c-font-family-monospace);
10
+ line-height: var(--c-line-height);
11
+ font-weight: var(--c-font-weight-bold);
12
+ font-size: var(--kbd-fz);
13
+ border-radius: var(--c-radius-sm);
14
+ border: calc(0.0625rem * var(--c-scale)) solid;
15
+ border-bottom-width: calc(0.1875rem * var(--c-scale));
16
+ unicode-bidi: embed;
17
+ text-align: center;
18
+ padding: 0.12em 0.45em;
19
+ }
20
+
21
+ :where([data-c-color-scheme='light']) .m_d894b0c2 {
22
+ border-color: var(--c-color-gray-3);
23
+ color: var(--c-color-gray-7);
24
+ background-color: var(--c-color-gray-0);
25
+ }
26
+
27
+ :where([data-c-color-scheme='dark']) .m_d894b0c2 {
28
+ border-color: var(--c-color-dark-4);
29
+ color: var(--c-color-dark-0);
30
+ background-color: var(--c-color-dark-6);
31
+ }
32
+ }
package/styles.css CHANGED
@@ -2245,6 +2245,38 @@ fieldset:disabled .c-active:active {
2245
2245
  animation: m_7c93cd91 1000ms linear infinite;
2246
2246
  }
2247
2247
 
2248
+ .m_d894b0c2 {
2249
+ --kbd-fz-xs: calc(0.625rem * var(--c-scale));
2250
+ --kbd-fz-sm: calc(0.75rem * var(--c-scale));
2251
+ --kbd-fz-md: calc(0.875rem * var(--c-scale));
2252
+ --kbd-fz-lg: calc(1rem * var(--c-scale));
2253
+ --kbd-fz-xl: calc(1.25rem * var(--c-scale));
2254
+ --kbd-fz: var(--kbd-fz-sm);
2255
+
2256
+ font-family: var(--c-font-family-monospace);
2257
+ line-height: var(--c-line-height);
2258
+ font-weight: var(--c-font-weight-bold);
2259
+ font-size: var(--kbd-fz);
2260
+ border-radius: var(--c-radius-sm);
2261
+ border: calc(0.0625rem * var(--c-scale)) solid;
2262
+ border-bottom-width: calc(0.1875rem * var(--c-scale));
2263
+ unicode-bidi: embed;
2264
+ text-align: center;
2265
+ padding: 0.12em 0.45em;
2266
+ }
2267
+
2268
+ :where([data-c-color-scheme='light']) .m_d894b0c2 {
2269
+ border-color: var(--c-color-gray-3);
2270
+ color: var(--c-color-gray-7);
2271
+ background-color: var(--c-color-gray-0);
2272
+ }
2273
+
2274
+ :where([data-c-color-scheme='dark']) .m_d894b0c2 {
2275
+ border-color: var(--c-color-dark-4);
2276
+ color: var(--c-color-dark-0);
2277
+ background-color: var(--c-color-dark-6);
2278
+ }
2279
+
2248
2280
  .m_a244865c {
2249
2281
  --loader-size-xs: calc(1.125rem * var(--c-scale));
2250
2282
  --loader-size-sm: calc(1.375rem * var(--c-scale));
package/styles.layer.css CHANGED
@@ -2245,6 +2245,38 @@ fieldset:disabled .c-active:active {
2245
2245
  animation: m_7c93cd91 1000ms linear infinite;
2246
2246
  }
2247
2247
 
2248
+ .m_d894b0c2 {
2249
+ --kbd-fz-xs: calc(0.625rem * var(--c-scale));
2250
+ --kbd-fz-sm: calc(0.75rem * var(--c-scale));
2251
+ --kbd-fz-md: calc(0.875rem * var(--c-scale));
2252
+ --kbd-fz-lg: calc(1rem * var(--c-scale));
2253
+ --kbd-fz-xl: calc(1.25rem * var(--c-scale));
2254
+ --kbd-fz: var(--kbd-fz-sm);
2255
+
2256
+ font-family: var(--c-font-family-monospace);
2257
+ line-height: var(--c-line-height);
2258
+ font-weight: var(--c-font-weight-bold);
2259
+ font-size: var(--kbd-fz);
2260
+ border-radius: var(--c-radius-sm);
2261
+ border: calc(0.0625rem * var(--c-scale)) solid;
2262
+ border-bottom-width: calc(0.1875rem * var(--c-scale));
2263
+ unicode-bidi: embed;
2264
+ text-align: center;
2265
+ padding: 0.12em 0.45em;
2266
+ }
2267
+
2268
+ :where([data-c-color-scheme='light']) .m_d894b0c2 {
2269
+ border-color: var(--c-color-gray-3);
2270
+ color: var(--c-color-gray-7);
2271
+ background-color: var(--c-color-gray-0);
2272
+ }
2273
+
2274
+ :where([data-c-color-scheme='dark']) .m_d894b0c2 {
2275
+ border-color: var(--c-color-dark-4);
2276
+ color: var(--c-color-dark-0);
2277
+ background-color: var(--c-color-dark-6);
2278
+ }
2279
+
2248
2280
  .m_a244865c {
2249
2281
  --loader-size-xs: calc(1.125rem * var(--c-scale));
2250
2282
  --loader-size-sm: calc(1.375rem * var(--c-scale));