@cck-ui/core 0.30.0 → 0.32.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.
- package/cjs/components/affix/affix.cjs +0 -3
- package/cjs/components/affix/affix.cjs.map +1 -1
- package/cjs/components/avatar/avatar-group/avatar-group.cjs +395 -0
- package/cjs/components/avatar/avatar-group/avatar-group.cjs.map +1 -0
- package/cjs/components/avatar/avatar-group/avatar-group.constant.cjs +7 -0
- package/cjs/components/avatar/avatar-group/avatar-group.constant.cjs.map +1 -0
- package/cjs/components/avatar/avatar-group/avatar-group.utils.cjs +8 -0
- package/cjs/components/avatar/avatar-group/avatar-group.utils.cjs.map +1 -0
- package/cjs/components/avatar/avatar-placeholder-icon.cjs +35 -0
- package/cjs/components/avatar/avatar-placeholder-icon.cjs.map +1 -0
- package/cjs/components/avatar/avatar.cjs +489 -0
- package/cjs/components/avatar/avatar.cjs.map +1 -0
- package/cjs/components/avatar/avatar.module.cjs +12 -0
- package/cjs/components/avatar/avatar.module.cjs.map +1 -0
- package/cjs/components/avatar/avatar.utils.cjs +26 -0
- package/cjs/components/avatar/avatar.utils.cjs.map +1 -0
- package/cjs/components/avatar/get-initials/get-initials.cjs +11 -0
- package/cjs/components/avatar/get-initials/get-initials.cjs.map +1 -0
- package/cjs/components/avatar/get-initials-color/get-initials-color.cjs +33 -0
- package/cjs/components/avatar/get-initials-color/get-initials-color.cjs.map +1 -0
- package/cjs/components/avatar/index.cjs +19 -0
- package/cjs/components/avatar/index.cjs.map +1 -0
- package/cjs/components/background-image/background-image.cjs +396 -0
- package/cjs/components/background-image/background-image.cjs.map +1 -0
- package/cjs/components/background-image/background-image.module.cjs +7 -0
- package/cjs/components/background-image/background-image.module.cjs.map +1 -0
- package/cjs/components/background-image/background-image.utils.cjs +8 -0
- package/cjs/components/background-image/background-image.utils.cjs.map +1 -0
- package/cjs/components/background-image/index.cjs +14 -0
- package/cjs/components/background-image/index.cjs.map +1 -0
- package/cjs/index.cjs +93 -85
- package/cjs/index.cjs.map +1 -1
- package/esm/components/affix/affix.mjs +0 -3
- package/esm/components/affix/affix.mjs.map +1 -1
- package/esm/components/avatar/avatar-group/avatar-group.constant.mjs +7 -0
- package/esm/components/avatar/avatar-group/avatar-group.constant.mjs.map +1 -0
- package/esm/components/avatar/avatar-group/avatar-group.mjs +395 -0
- package/esm/components/avatar/avatar-group/avatar-group.mjs.map +1 -0
- package/esm/components/avatar/avatar-group/avatar-group.utils.mjs +9 -0
- package/esm/components/avatar/avatar-group/avatar-group.utils.mjs.map +1 -0
- package/esm/components/avatar/avatar-placeholder-icon.mjs +35 -0
- package/esm/components/avatar/avatar-placeholder-icon.mjs.map +1 -0
- package/esm/components/avatar/avatar.mjs +489 -0
- package/esm/components/avatar/avatar.mjs.map +1 -0
- package/esm/components/avatar/avatar.module.mjs +12 -0
- package/esm/components/avatar/avatar.module.mjs.map +1 -0
- package/esm/components/avatar/avatar.utils.mjs +26 -0
- package/esm/components/avatar/avatar.utils.mjs.map +1 -0
- package/esm/components/avatar/get-initials/get-initials.mjs +11 -0
- package/esm/components/avatar/get-initials/get-initials.mjs.map +1 -0
- package/esm/components/avatar/get-initials-color/get-initials-color.mjs +33 -0
- package/esm/components/avatar/get-initials-color/get-initials-color.mjs.map +1 -0
- package/esm/components/avatar/index.mjs +17 -0
- package/esm/components/avatar/index.mjs.map +1 -0
- package/esm/components/background-image/background-image.mjs +396 -0
- package/esm/components/background-image/background-image.mjs.map +1 -0
- package/esm/components/background-image/background-image.module.mjs +7 -0
- package/esm/components/background-image/background-image.module.mjs.map +1 -0
- package/esm/components/background-image/background-image.utils.mjs +9 -0
- package/esm/components/background-image/background-image.utils.mjs.map +1 -0
- package/esm/components/background-image/index.mjs +11 -0
- package/esm/components/background-image/index.mjs.map +1 -0
- package/esm/index.mjs +6 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/avatar/avatar-group/avatar-group.constant.d.ts +3 -0
- package/lib/components/avatar/avatar-group/avatar-group.context.d.ts +3 -0
- package/lib/components/avatar/avatar-group/avatar-group.types.d.ts +18 -0
- package/lib/components/avatar/avatar-group/avatar-group.utils.d.ts +6 -0
- package/lib/components/avatar/avatar.types.d.ts +52 -0
- package/lib/components/avatar/avatar.utils.d.ts +11 -0
- package/lib/components/avatar/get-initials/get-initials.d.ts +1 -0
- package/lib/components/avatar/get-initials-color/get-initials-color.d.ts +2 -0
- package/lib/components/avatar/index.d.ts +11 -0
- package/lib/components/background-image/background-image.types.d.ts +21 -0
- package/lib/components/background-image/background-image.utils.d.ts +7 -0
- package/lib/components/background-image/index.d.ts +6 -0
- package/lib/components/index.d.ts +2 -0
- package/package.json +1 -1
- package/styles/avatar.css +67 -0
- package/styles/avatar.layer.css +68 -0
- package/styles/background-image.css +9 -0
- package/styles/background-image.layer.css +10 -0
- package/styles.css +78 -0
- package/styles.layer.css +78 -0
|
@@ -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 background_image_module_default from "./background-image.module.mjs";
|
|
7
|
+
import { varsResolver } from "./background-image.utils.mjs";
|
|
8
|
+
import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
|
|
9
|
+
//#region packages/@cck-ui/core/src/components/background-image/background-image.vue
|
|
10
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
11
|
+
name: "CBackgroundImage",
|
|
12
|
+
__name: "background-image",
|
|
13
|
+
props: {
|
|
14
|
+
radius: {
|
|
15
|
+
type: null,
|
|
16
|
+
required: false
|
|
17
|
+
},
|
|
18
|
+
src: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true
|
|
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: "CBackgroundImage",
|
|
318
|
+
defaultProps: {},
|
|
319
|
+
props: rawProps
|
|
320
|
+
});
|
|
321
|
+
const knownProps = [
|
|
322
|
+
"classNames",
|
|
323
|
+
"className",
|
|
324
|
+
"style",
|
|
325
|
+
"styles",
|
|
326
|
+
"unstyled",
|
|
327
|
+
"vars",
|
|
328
|
+
"radius",
|
|
329
|
+
"src",
|
|
330
|
+
"variant",
|
|
331
|
+
"attributes"
|
|
332
|
+
];
|
|
333
|
+
const styleProps = computed(() => ({
|
|
334
|
+
...props.value,
|
|
335
|
+
...attrs,
|
|
336
|
+
style: attrs.style ?? props.value.style
|
|
337
|
+
}));
|
|
338
|
+
const getStyles = useStyles({
|
|
339
|
+
name: "BackgroundImage",
|
|
340
|
+
props: styleProps,
|
|
341
|
+
classes: background_image_module_default,
|
|
342
|
+
className: () => props.value.className,
|
|
343
|
+
style: () => props.value.style,
|
|
344
|
+
classNames: props.value.classNames,
|
|
345
|
+
styles: props.value.styles,
|
|
346
|
+
unstyled: props.value.unstyled,
|
|
347
|
+
attributes: props.value.attributes,
|
|
348
|
+
vars: props.value.vars,
|
|
349
|
+
varsResolver
|
|
350
|
+
});
|
|
351
|
+
const rootAttrs = computed(() => getStyles("root", { style: { backgroundImage: `url(${props.value.src})` } }));
|
|
352
|
+
const mergedAttrs = computed(() => {
|
|
353
|
+
const others = {};
|
|
354
|
+
const propsValue = props.value;
|
|
355
|
+
for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
356
|
+
const userMod = props.value.mod;
|
|
357
|
+
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
|
|
358
|
+
return {
|
|
359
|
+
...others,
|
|
360
|
+
mod: mergedMod,
|
|
361
|
+
...rootAttrs.value
|
|
362
|
+
};
|
|
363
|
+
});
|
|
364
|
+
__expose({ root: computed(() => _root.value?.root ?? null) });
|
|
365
|
+
const __returned__ = {
|
|
366
|
+
_root,
|
|
367
|
+
attrs,
|
|
368
|
+
rawProps,
|
|
369
|
+
props,
|
|
370
|
+
knownProps,
|
|
371
|
+
styleProps,
|
|
372
|
+
getStyles,
|
|
373
|
+
rootAttrs,
|
|
374
|
+
mergedAttrs,
|
|
375
|
+
get CBox() {
|
|
376
|
+
return CBox;
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
380
|
+
enumerable: false,
|
|
381
|
+
value: true
|
|
382
|
+
});
|
|
383
|
+
return __returned__;
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
387
|
+
return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedAttrs, { variant: $setup.props.variant }), {
|
|
388
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
389
|
+
_: 3
|
|
390
|
+
}, 16, ["variant"]);
|
|
391
|
+
}
|
|
392
|
+
var background_image_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/background-image/background-image.vue"]]);
|
|
393
|
+
//#endregion
|
|
394
|
+
export { background_image_default as default };
|
|
395
|
+
|
|
396
|
+
//# sourceMappingURL=background-image.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-image.mjs","names":[],"sources":["../../../src/components/background-image/background-image.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\" :variant=\"props.variant\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport classes from './background-image.module.css'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { BackgroundImageFactory, BackgroundImageProps } from './background-image.types'\nimport { varsResolver } from './background-image.utils'\n\ndefineOptions({\n name: 'CBackgroundImage',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<BackgroundImageProps>()\n\nconst props = useComponentProps({\n component: 'CBackgroundImage',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'radius',\n 'src',\n 'variant',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<BackgroundImageFactory>({\n name: 'BackgroundImage',\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(() =>\n getStyles('root', { style: { backgroundImage: `url(${props.value.src})` } })\n)\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAkC;GAClD,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,eAChB,UAAU,QAAQ,EAAE,OAAO,EAAE,iBAAiB,OAAO,MAAM,MAAM,IAAI,GAAG,EAAE,CAAC,CAC7E;EAEA,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;;;;;;;;;;;;;;;;;;;;;;;qBAhFC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,aAAW,EAAG,SAAS,OAAA,MAAM,QAAA,CAAA,GAAA;yBAC9C,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region packages/@cck-ui/core/src/components/background-image/background-image.module.css
|
|
3
|
+
var background_image_module_default = { "root": "m_31af4813" };
|
|
4
|
+
//#endregion
|
|
5
|
+
export { background_image_module_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=background-image.module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-image.module.mjs","names":[],"sources":["../../../src/components/background-image/background-image.module.css"],"sourcesContent":[".root {\n background-size: cover;\n background-position: center;\n display: block;\n width: 100%;\n border: 0;\n text-decoration: none;\n border-radius: var(--bi-radius, 0);\n}\n"],"mappings":";;AAAA,IAAA,kCAAe,EAAC,QAAO,aAAY"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getRadius } 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/background-image/background-image.utils.ts
|
|
5
|
+
const varsResolver = createVarsResolver((_, { radius }) => ({ root: { "--bi-radius": radius === void 0 ? void 0 : getRadius(radius) } }));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { varsResolver };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=background-image.utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-image.utils.mjs","names":[],"sources":["../../../src/components/background-image/background-image.utils.ts"],"sourcesContent":["import { createVarsResolver, getRadius } from '../../core'\nimport { BackgroundImageFactory } from './background-image.types'\n\nexport const varsResolver = createVarsResolver<BackgroundImageFactory>((_, { radius }) => ({\n root: {\n '--bi-radius': radius === undefined ? undefined : getRadius(radius),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAA4C,GAAG,EAAE,cAAc,EACzF,MAAM,EACJ,eAAe,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,MAAM,EACpE,EACF,EAAE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { withInstall } from "../../core/utils/vue/install.mjs";
|
|
3
|
+
import { withClasses, withExtend, withPropsFactory, withVarsResolver } from "../../core/utils/vue/statics.mjs";
|
|
4
|
+
import background_image_module_default from "./background-image.module.mjs";
|
|
5
|
+
import { varsResolver } from "./background-image.utils.mjs";
|
|
6
|
+
import background_image_default from "./background-image.mjs";
|
|
7
|
+
const CBackgroundImage = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(background_image_default, background_image_module_default), varsResolver))));
|
|
8
|
+
//#endregion
|
|
9
|
+
export { CBackgroundImage, CBackgroundImage as default };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["BackgroundImage","classes"],"sources":["../../../src/components/background-image/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport classes from './background-image.module.css'\nimport { varsResolver } from './background-image.utils'\nimport BackgroundImage from './background-image.vue'\n\nconst BackgroundImageWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(BackgroundImage, classes), varsResolver))\n)\n\nexport const CBackgroundImage: SFCWithInstallAndClasses<typeof BackgroundImage, typeof classes> =\n withInstall(BackgroundImageWithStatic)\n\nexport default CBackgroundImage\n\nexport * from './background-image.types'\n"],"mappings":";;;;;;AAgBA,MAAa,mBACX,YALgC,iBAChC,WAAW,iBAAiB,YAAYA,0BAAiBC,+BAAO,GAAG,YAAY,CAAC,CAIpE,CAAyB"}
|
package/esm/index.mjs
CHANGED
|
@@ -64,6 +64,8 @@ import { CAlert } from "./components/alert/index.mjs";
|
|
|
64
64
|
import { CText } from "./components/text/index.mjs";
|
|
65
65
|
import { CAnchor } from "./components/anchor/index.mjs";
|
|
66
66
|
import { CAspectRatio } from "./components/aspect-ratio/index.mjs";
|
|
67
|
+
import { CAvatar, CAvatarGroup } from "./components/avatar/index.mjs";
|
|
68
|
+
import { CBackgroundImage } from "./components/background-image/index.mjs";
|
|
67
69
|
import { CBreadcrumbs } from "./components/breadcrumbs/index.mjs";
|
|
68
70
|
import { CBurger } from "./components/burger/index.mjs";
|
|
69
71
|
import { CButton, CButtonGroup, CButtonGroupSection } from "./components/button/index.mjs";
|
|
@@ -99,6 +101,9 @@ const components = [
|
|
|
99
101
|
CAlert,
|
|
100
102
|
CAnchor,
|
|
101
103
|
CAspectRatio,
|
|
104
|
+
CAvatar,
|
|
105
|
+
CAvatarGroup,
|
|
106
|
+
CBackgroundImage,
|
|
102
107
|
CBreadcrumbs,
|
|
103
108
|
CBurger,
|
|
104
109
|
CButton,
|
|
@@ -145,6 +150,6 @@ const CckUI = { install(app) {
|
|
|
145
150
|
});
|
|
146
151
|
} };
|
|
147
152
|
//#endregion
|
|
148
|
-
export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAffix, CAlert, CAnchor, CAspectRatio, CBox, CBreadcrumbs, CBurger, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CDivider, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, 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, 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 };
|
|
153
|
+
export { CActionIcon, CActionIconGroup, CActionIconGroupSection, CAffix, CAlert, CAnchor, CAspectRatio, CAvatar, CAvatarGroup, CBackgroundImage, CBox, CBreadcrumbs, CBurger, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CCopyButton, CDefaultLoaders, CDivider, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFileButton, CFlex, CFocusTrap, CGrid, CGroup, CImage, 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, 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 };
|
|
149
154
|
|
|
150
155
|
//# 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 CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\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 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 CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\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 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":"
|
|
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 CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\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 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 CBreadcrumbs,\n CBurger,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,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;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,18 @@
|
|
|
1
|
+
import { BoxProps, CSpacing, ElementProps, Factory, StylesApiProps } from '../../../core';
|
|
2
|
+
export type AvatarGroupStylesNames = 'group';
|
|
3
|
+
export type AvatarGroupCssVariables = {
|
|
4
|
+
group: '--ag-spacing';
|
|
5
|
+
};
|
|
6
|
+
export interface AvatarGroupProps extends BoxProps, StylesApiProps<AvatarGroupFactory>, /* @vue-ignore */ ElementProps<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* Negative space between Avatar components
|
|
9
|
+
* @default 'sm'
|
|
10
|
+
*/
|
|
11
|
+
spacing?: CSpacing;
|
|
12
|
+
}
|
|
13
|
+
export type AvatarGroupFactory = Factory<{
|
|
14
|
+
props: AvatarGroupProps;
|
|
15
|
+
ref: HTMLDivElement;
|
|
16
|
+
stylesNames: AvatarGroupStylesNames;
|
|
17
|
+
vars: AvatarGroupCssVariables;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const varsResolver: import("../../..").VarsResolver<{
|
|
2
|
+
props: import("./avatar-group.types").AvatarGroupProps;
|
|
3
|
+
ref: HTMLDivElement;
|
|
4
|
+
stylesNames: import("./avatar-group.types").AvatarGroupStylesNames;
|
|
5
|
+
vars: import("./avatar-group.types").AvatarGroupCssVariables;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BoxProps, CColor, CGradient, CRadius, CSize, ElementProps, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
2
|
+
import AvatarGroup from './avatar-group/avatar-group.vue';
|
|
3
|
+
export type AvatarStylesNames = 'root' | 'placeholder' | 'image';
|
|
4
|
+
export type AvatarVariant = 'default' | 'filled' | 'light' | 'gradient' | 'outline' | 'dashed' | 'transparent' | 'white';
|
|
5
|
+
export type AvatarCssVariables = {
|
|
6
|
+
root: '--avatar-size' | '--avatar-radius' | '--avatar-bg' | '--avatar-color' | '--avatar-bd';
|
|
7
|
+
};
|
|
8
|
+
export interface AvatarProps extends BoxProps, StylesApiProps<AvatarFactory> {
|
|
9
|
+
/**
|
|
10
|
+
* Width and height of the avatar, numbers are converted to rem
|
|
11
|
+
* @default 'md'
|
|
12
|
+
*/
|
|
13
|
+
size?: CSize | (string | {}) | number;
|
|
14
|
+
/**
|
|
15
|
+
* Key of `theme.radius` or any valid CSS value to set border-radius
|
|
16
|
+
* @default '1000px'
|
|
17
|
+
*/
|
|
18
|
+
radius?: CRadius;
|
|
19
|
+
/**
|
|
20
|
+
* Key of `theme.colors` or any valid CSS color
|
|
21
|
+
* @default 'gray'
|
|
22
|
+
*/
|
|
23
|
+
color?: CColor | 'initials';
|
|
24
|
+
/**
|
|
25
|
+
* Gradient configuration for `variant="gradient"`
|
|
26
|
+
* @default theme.defaultGradient
|
|
27
|
+
*/
|
|
28
|
+
gradient?: CGradient;
|
|
29
|
+
/** Image url, if the image connot be loaded, then placeholder is displayed instead */
|
|
30
|
+
src?: string;
|
|
31
|
+
/** Image `alt` attribute, also used as `title` attribute for placeholder */
|
|
32
|
+
alt?: string;
|
|
33
|
+
/** Attributes passed down to `img` element */
|
|
34
|
+
imageProps?: ElementProps<'img'>;
|
|
35
|
+
/** If set, adjusts text color based on background color for `filled` variant */
|
|
36
|
+
autoContrast?: boolean;
|
|
37
|
+
/** Name of the user. When `src` is not set, used to display initials and to generate color when `color="initials"` is set. */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** A list of colors that is used for autogenerated initials. By default, all default CCK UI colors can be used except gray and dark */
|
|
40
|
+
allowedInitialsColors?: CColor[];
|
|
41
|
+
}
|
|
42
|
+
export type AvatarFactory = PolymorphicFactory<{
|
|
43
|
+
props: AvatarProps;
|
|
44
|
+
defaultRef: HTMLDivElement;
|
|
45
|
+
defaultComponent: 'div';
|
|
46
|
+
stylesNames: AvatarStylesNames;
|
|
47
|
+
vars: AvatarCssVariables;
|
|
48
|
+
variant: AvatarVariant;
|
|
49
|
+
staticComponents: {
|
|
50
|
+
Group: typeof AvatarGroup;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const varsResolver: import("../..").VarsResolver<{
|
|
2
|
+
props: import("./avatar.types").AvatarProps;
|
|
3
|
+
defaultRef: HTMLDivElement;
|
|
4
|
+
defaultComponent: "div";
|
|
5
|
+
stylesNames: import("./avatar.types").AvatarStylesNames;
|
|
6
|
+
vars: import("./avatar.types").AvatarCssVariables;
|
|
7
|
+
variant: import("./avatar.types").AvatarVariant;
|
|
8
|
+
staticComponents: {
|
|
9
|
+
Group: typeof import("*.vue");
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getInitials(name: string, limit?: number): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SFCWithInstallAndClasses } from '../../core';
|
|
2
|
+
import AvatarGroup from './avatar-group/avatar-group.vue';
|
|
3
|
+
import classes from './avatar.module.css';
|
|
4
|
+
import Avatar from './avatar.vue';
|
|
5
|
+
export declare const CAvatarGroup: SFCWithInstallAndClasses<typeof AvatarGroup, typeof classes>;
|
|
6
|
+
export declare const CAvatar: SFCWithInstallAndClasses<typeof Avatar, typeof classes> & {
|
|
7
|
+
Group: typeof AvatarGroup;
|
|
8
|
+
};
|
|
9
|
+
export default CAvatar;
|
|
10
|
+
export * from './avatar.types';
|
|
11
|
+
export * from './avatar-group/avatar-group.types';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BoxProps, CRadius, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
2
|
+
export type BackgroundImageStylesNames = 'root';
|
|
3
|
+
export type BackgroundImageCssVariables = {
|
|
4
|
+
root: '--bi-radius';
|
|
5
|
+
};
|
|
6
|
+
export interface BackgroundImageProps extends BoxProps, StylesApiProps<BackgroundImageFactory> {
|
|
7
|
+
/**
|
|
8
|
+
* Key of `theme.radius` or any valid CSS value to set border-radius, numbers are converted to rem
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
radius?: CRadius;
|
|
12
|
+
/** Image url */
|
|
13
|
+
src: string;
|
|
14
|
+
}
|
|
15
|
+
export type BackgroundImageFactory = PolymorphicFactory<{
|
|
16
|
+
props: BackgroundImageProps;
|
|
17
|
+
defaultRef: HTMLDivElement;
|
|
18
|
+
defaultComponent: 'div';
|
|
19
|
+
stylesNames: BackgroundImageStylesNames;
|
|
20
|
+
vars: BackgroundImageCssVariables;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const varsResolver: import("../..").VarsResolver<{
|
|
2
|
+
props: import("./background-image.types").BackgroundImageProps;
|
|
3
|
+
defaultRef: HTMLDivElement;
|
|
4
|
+
defaultComponent: "div";
|
|
5
|
+
stylesNames: import("./background-image.types").BackgroundImageStylesNames;
|
|
6
|
+
vars: import("./background-image.types").BackgroundImageCssVariables;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SFCWithInstallAndClasses } from '../../core';
|
|
2
|
+
import classes from './background-image.module.css';
|
|
3
|
+
import BackgroundImage from './background-image.vue';
|
|
4
|
+
export declare const CBackgroundImage: SFCWithInstallAndClasses<typeof BackgroundImage, typeof classes>;
|
|
5
|
+
export default CBackgroundImage;
|
|
6
|
+
export * from './background-image.types';
|
|
@@ -3,6 +3,8 @@ export * from './affix';
|
|
|
3
3
|
export * from './alert';
|
|
4
4
|
export * from './anchor';
|
|
5
5
|
export * from './aspect-ratio';
|
|
6
|
+
export * from './avatar';
|
|
7
|
+
export * from './background-image';
|
|
6
8
|
export * from './breadcrumbs';
|
|
7
9
|
export * from './burger';
|
|
8
10
|
export * from './button';
|