@cck-ui/core 0.11.1 → 0.12.1
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/alert/alert.cjs +493 -0
- package/cjs/components/alert/alert.cjs.map +1 -0
- package/cjs/components/alert/alert.module.cjs +16 -0
- package/cjs/components/alert/alert.module.cjs.map +1 -0
- package/cjs/components/alert/alert.utils.cjs +21 -0
- package/cjs/components/alert/alert.utils.cjs.map +1 -0
- package/cjs/components/alert/index.cjs +14 -0
- package/cjs/components/alert/index.cjs.map +1 -0
- package/cjs/components/aspect-ratio/aspect-ratio.cjs +1 -1
- package/cjs/components/aspect-ratio/aspect-ratio.cjs.map +1 -1
- package/cjs/components/button/button.cjs +1 -1
- package/cjs/components/close-button/close-button.cjs +434 -0
- package/cjs/components/close-button/close-button.cjs.map +1 -0
- package/cjs/components/close-button/close-button.module.cjs +10 -0
- package/cjs/components/close-button/close-button.module.cjs.map +1 -0
- package/cjs/components/close-button/close-button.utils.cjs +13 -0
- package/cjs/components/close-button/close-button.utils.cjs.map +1 -0
- package/cjs/components/close-button/close-icon.cjs +56 -0
- package/cjs/components/close-button/close-icon.cjs.map +1 -0
- package/cjs/components/close-button/index.cjs +14 -0
- package/cjs/components/close-button/index.cjs.map +1 -0
- package/cjs/index.cjs +57 -51
- package/cjs/index.cjs.map +1 -1
- package/esm/components/alert/alert.mjs +493 -0
- package/esm/components/alert/alert.mjs.map +1 -0
- package/esm/components/alert/alert.module.mjs +16 -0
- package/esm/components/alert/alert.module.mjs.map +1 -0
- package/esm/components/alert/alert.utils.mjs +22 -0
- package/esm/components/alert/alert.utils.mjs.map +1 -0
- package/esm/components/alert/index.mjs +11 -0
- package/esm/components/alert/index.mjs.map +1 -0
- package/esm/components/aspect-ratio/aspect-ratio.mjs +1 -1
- package/esm/components/aspect-ratio/aspect-ratio.mjs.map +1 -1
- package/esm/components/button/button.mjs +1 -1
- package/esm/components/close-button/close-button.mjs +434 -0
- package/esm/components/close-button/close-button.mjs.map +1 -0
- package/esm/components/close-button/close-button.module.mjs +10 -0
- package/esm/components/close-button/close-button.module.mjs.map +1 -0
- package/esm/components/close-button/close-button.utils.mjs +14 -0
- package/esm/components/close-button/close-button.utils.mjs.map +1 -0
- package/esm/components/close-button/close-icon.mjs +56 -0
- package/esm/components/close-button/close-icon.mjs.map +1 -0
- package/esm/components/close-button/index.mjs +11 -0
- package/esm/components/close-button/index.mjs.map +1 -0
- package/esm/index.mjs +6 -2
- package/esm/index.mjs.map +1 -1
- package/lib/components/alert/alert.types.d.ts +42 -0
- package/lib/components/alert/alert.utils.d.ts +7 -0
- package/lib/components/alert/index.d.ts +6 -0
- package/lib/components/close-button/close-button.types.d.ts +39 -0
- package/lib/components/close-button/close-button.utils.d.ts +8 -0
- package/lib/components/close-button/index.d.ts +6 -0
- package/lib/components/index.d.ts +2 -0
- package/package.json +1 -1
- package/styles/alert.css +82 -0
- package/styles/alert.layer.css +83 -0
- package/styles/close-button.css +58 -0
- package/styles/close-button.layer.css +59 -0
- package/styles.css +142 -0
- package/styles.layer.css +142 -0
|
@@ -0,0 +1,493 @@
|
|
|
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_alert_module = require("./alert.module.cjs");
|
|
7
|
+
const require_alert_utils = require("./alert.utils.cjs");
|
|
8
|
+
const require_index$1 = require("../close-button/index.cjs");
|
|
9
|
+
let vue = require("vue");
|
|
10
|
+
let _cck_ui_hooks = require("@cck-ui/hooks");
|
|
11
|
+
//#region packages/@cck-ui/core/src/components/alert/alert.vue
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
13
|
+
name: "CAlert",
|
|
14
|
+
__name: "alert",
|
|
15
|
+
props: {
|
|
16
|
+
radius: {
|
|
17
|
+
type: null,
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
color: {
|
|
21
|
+
type: null,
|
|
22
|
+
required: false
|
|
23
|
+
},
|
|
24
|
+
withCloseButton: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
onClose: {
|
|
29
|
+
type: Function,
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
closeButtonLabel: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
autoContrast: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false
|
|
39
|
+
},
|
|
40
|
+
className: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
44
|
+
style: {
|
|
45
|
+
type: [
|
|
46
|
+
Object,
|
|
47
|
+
Function,
|
|
48
|
+
Array
|
|
49
|
+
],
|
|
50
|
+
required: false,
|
|
51
|
+
skipCheck: true
|
|
52
|
+
},
|
|
53
|
+
__vars: {
|
|
54
|
+
type: null,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
__size: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
61
|
+
hiddenFrom: {
|
|
62
|
+
type: null,
|
|
63
|
+
required: false
|
|
64
|
+
},
|
|
65
|
+
visibleFrom: {
|
|
66
|
+
type: null,
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
lightHidden: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
required: false
|
|
72
|
+
},
|
|
73
|
+
darkHidden: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
required: false
|
|
76
|
+
},
|
|
77
|
+
mod: {
|
|
78
|
+
type: [
|
|
79
|
+
Object,
|
|
80
|
+
String,
|
|
81
|
+
Array
|
|
82
|
+
],
|
|
83
|
+
required: false
|
|
84
|
+
},
|
|
85
|
+
m: {
|
|
86
|
+
type: null,
|
|
87
|
+
required: false
|
|
88
|
+
},
|
|
89
|
+
my: {
|
|
90
|
+
type: null,
|
|
91
|
+
required: false
|
|
92
|
+
},
|
|
93
|
+
mx: {
|
|
94
|
+
type: null,
|
|
95
|
+
required: false
|
|
96
|
+
},
|
|
97
|
+
mt: {
|
|
98
|
+
type: null,
|
|
99
|
+
required: false
|
|
100
|
+
},
|
|
101
|
+
mb: {
|
|
102
|
+
type: null,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
ms: {
|
|
106
|
+
type: null,
|
|
107
|
+
required: false
|
|
108
|
+
},
|
|
109
|
+
me: {
|
|
110
|
+
type: null,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
113
|
+
mis: {
|
|
114
|
+
type: null,
|
|
115
|
+
required: false
|
|
116
|
+
},
|
|
117
|
+
mie: {
|
|
118
|
+
type: null,
|
|
119
|
+
required: false
|
|
120
|
+
},
|
|
121
|
+
ml: {
|
|
122
|
+
type: null,
|
|
123
|
+
required: false
|
|
124
|
+
},
|
|
125
|
+
mr: {
|
|
126
|
+
type: null,
|
|
127
|
+
required: false
|
|
128
|
+
},
|
|
129
|
+
p: {
|
|
130
|
+
type: null,
|
|
131
|
+
required: false
|
|
132
|
+
},
|
|
133
|
+
py: {
|
|
134
|
+
type: null,
|
|
135
|
+
required: false
|
|
136
|
+
},
|
|
137
|
+
px: {
|
|
138
|
+
type: null,
|
|
139
|
+
required: false
|
|
140
|
+
},
|
|
141
|
+
pt: {
|
|
142
|
+
type: null,
|
|
143
|
+
required: false
|
|
144
|
+
},
|
|
145
|
+
pb: {
|
|
146
|
+
type: null,
|
|
147
|
+
required: false
|
|
148
|
+
},
|
|
149
|
+
ps: {
|
|
150
|
+
type: null,
|
|
151
|
+
required: false
|
|
152
|
+
},
|
|
153
|
+
pe: {
|
|
154
|
+
type: null,
|
|
155
|
+
required: false
|
|
156
|
+
},
|
|
157
|
+
pis: {
|
|
158
|
+
type: null,
|
|
159
|
+
required: false
|
|
160
|
+
},
|
|
161
|
+
pie: {
|
|
162
|
+
type: null,
|
|
163
|
+
required: false
|
|
164
|
+
},
|
|
165
|
+
pl: {
|
|
166
|
+
type: null,
|
|
167
|
+
required: false
|
|
168
|
+
},
|
|
169
|
+
pr: {
|
|
170
|
+
type: null,
|
|
171
|
+
required: false
|
|
172
|
+
},
|
|
173
|
+
bd: {
|
|
174
|
+
type: null,
|
|
175
|
+
required: false
|
|
176
|
+
},
|
|
177
|
+
bdrs: {
|
|
178
|
+
type: null,
|
|
179
|
+
required: false
|
|
180
|
+
},
|
|
181
|
+
bg: {
|
|
182
|
+
type: null,
|
|
183
|
+
required: false
|
|
184
|
+
},
|
|
185
|
+
c: {
|
|
186
|
+
type: null,
|
|
187
|
+
required: false
|
|
188
|
+
},
|
|
189
|
+
opacity: {
|
|
190
|
+
type: [
|
|
191
|
+
String,
|
|
192
|
+
Object,
|
|
193
|
+
Number
|
|
194
|
+
],
|
|
195
|
+
required: false
|
|
196
|
+
},
|
|
197
|
+
ff: {
|
|
198
|
+
type: [String, Object],
|
|
199
|
+
required: false
|
|
200
|
+
},
|
|
201
|
+
fz: {
|
|
202
|
+
type: null,
|
|
203
|
+
required: false
|
|
204
|
+
},
|
|
205
|
+
fw: {
|
|
206
|
+
type: null,
|
|
207
|
+
required: false
|
|
208
|
+
},
|
|
209
|
+
lts: {
|
|
210
|
+
type: null,
|
|
211
|
+
required: false
|
|
212
|
+
},
|
|
213
|
+
ta: {
|
|
214
|
+
type: [String, Object],
|
|
215
|
+
required: false
|
|
216
|
+
},
|
|
217
|
+
lh: {
|
|
218
|
+
type: null,
|
|
219
|
+
required: false
|
|
220
|
+
},
|
|
221
|
+
fs: {
|
|
222
|
+
type: null,
|
|
223
|
+
required: false
|
|
224
|
+
},
|
|
225
|
+
tt: {
|
|
226
|
+
type: [String, Object],
|
|
227
|
+
required: false
|
|
228
|
+
},
|
|
229
|
+
td: {
|
|
230
|
+
type: null,
|
|
231
|
+
required: false
|
|
232
|
+
},
|
|
233
|
+
w: {
|
|
234
|
+
type: null,
|
|
235
|
+
required: false
|
|
236
|
+
},
|
|
237
|
+
miw: {
|
|
238
|
+
type: null,
|
|
239
|
+
required: false
|
|
240
|
+
},
|
|
241
|
+
maw: {
|
|
242
|
+
type: null,
|
|
243
|
+
required: false
|
|
244
|
+
},
|
|
245
|
+
h: {
|
|
246
|
+
type: null,
|
|
247
|
+
required: false
|
|
248
|
+
},
|
|
249
|
+
mih: {
|
|
250
|
+
type: null,
|
|
251
|
+
required: false
|
|
252
|
+
},
|
|
253
|
+
mah: {
|
|
254
|
+
type: null,
|
|
255
|
+
required: false
|
|
256
|
+
},
|
|
257
|
+
bgsz: {
|
|
258
|
+
type: null,
|
|
259
|
+
required: false
|
|
260
|
+
},
|
|
261
|
+
bgp: {
|
|
262
|
+
type: null,
|
|
263
|
+
required: false
|
|
264
|
+
},
|
|
265
|
+
bgr: {
|
|
266
|
+
type: null,
|
|
267
|
+
required: false
|
|
268
|
+
},
|
|
269
|
+
bga: {
|
|
270
|
+
type: null,
|
|
271
|
+
required: false
|
|
272
|
+
},
|
|
273
|
+
pos: {
|
|
274
|
+
type: [String, Object],
|
|
275
|
+
required: false
|
|
276
|
+
},
|
|
277
|
+
top: {
|
|
278
|
+
type: null,
|
|
279
|
+
required: false
|
|
280
|
+
},
|
|
281
|
+
left: {
|
|
282
|
+
type: null,
|
|
283
|
+
required: false
|
|
284
|
+
},
|
|
285
|
+
bottom: {
|
|
286
|
+
type: null,
|
|
287
|
+
required: false
|
|
288
|
+
},
|
|
289
|
+
right: {
|
|
290
|
+
type: null,
|
|
291
|
+
required: false
|
|
292
|
+
},
|
|
293
|
+
inset: {
|
|
294
|
+
type: null,
|
|
295
|
+
required: false
|
|
296
|
+
},
|
|
297
|
+
display: {
|
|
298
|
+
type: null,
|
|
299
|
+
required: false
|
|
300
|
+
},
|
|
301
|
+
flex: {
|
|
302
|
+
type: null,
|
|
303
|
+
required: false
|
|
304
|
+
},
|
|
305
|
+
unstyled: {
|
|
306
|
+
type: Boolean,
|
|
307
|
+
required: false
|
|
308
|
+
},
|
|
309
|
+
variant: {
|
|
310
|
+
type: null,
|
|
311
|
+
required: false
|
|
312
|
+
},
|
|
313
|
+
classNames: {
|
|
314
|
+
type: null,
|
|
315
|
+
required: false
|
|
316
|
+
},
|
|
317
|
+
styles: {
|
|
318
|
+
type: null,
|
|
319
|
+
required: false
|
|
320
|
+
},
|
|
321
|
+
vars: {
|
|
322
|
+
type: Function,
|
|
323
|
+
required: false
|
|
324
|
+
},
|
|
325
|
+
attributes: {
|
|
326
|
+
type: null,
|
|
327
|
+
required: false
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
setup(__props, { expose: __expose }) {
|
|
331
|
+
const slots = (0, vue.useSlots)();
|
|
332
|
+
const _root = (0, vue.ref)(null);
|
|
333
|
+
const attrs = (0, vue.useAttrs)();
|
|
334
|
+
const rawProps = __props;
|
|
335
|
+
const props = require_use_component_props.useComponentProps({
|
|
336
|
+
component: "CAlert",
|
|
337
|
+
defaultProps: {},
|
|
338
|
+
props: rawProps
|
|
339
|
+
});
|
|
340
|
+
const knownProps = [
|
|
341
|
+
"style",
|
|
342
|
+
"className",
|
|
343
|
+
"styles",
|
|
344
|
+
"classNames",
|
|
345
|
+
"unstyled",
|
|
346
|
+
"vars",
|
|
347
|
+
"radius",
|
|
348
|
+
"color",
|
|
349
|
+
"id",
|
|
350
|
+
"withCloseButton",
|
|
351
|
+
"onClose",
|
|
352
|
+
"closeButtonLabel",
|
|
353
|
+
"variant",
|
|
354
|
+
"autoContrast",
|
|
355
|
+
"role",
|
|
356
|
+
"attributes"
|
|
357
|
+
];
|
|
358
|
+
const getStyles = require_use_styles.useStyles({
|
|
359
|
+
name: "Alert",
|
|
360
|
+
props: {
|
|
361
|
+
...props.value,
|
|
362
|
+
...attrs
|
|
363
|
+
},
|
|
364
|
+
classes: require_alert_module.default,
|
|
365
|
+
className: props.value.className,
|
|
366
|
+
style: props.value.style,
|
|
367
|
+
classNames: props.value.classNames,
|
|
368
|
+
styles: props.value.styles,
|
|
369
|
+
unstyled: props.value.unstyled,
|
|
370
|
+
attributes: props.value.attributes,
|
|
371
|
+
vars: props.value.vars,
|
|
372
|
+
varsResolver: require_alert_utils.varsResolver
|
|
373
|
+
});
|
|
374
|
+
const rootId = (0, _cck_ui_hooks.useId)(props.value.id);
|
|
375
|
+
const titleId = slots.title && `${rootId}-title` || void 0;
|
|
376
|
+
const bodyId = `${rootId}-body`;
|
|
377
|
+
const rootAttrs = (0, vue.computed)(() => getStyles("root"));
|
|
378
|
+
const wrapperAttrs = (0, vue.computed)(() => getStyles("wrapper"));
|
|
379
|
+
const iconAttrs = (0, vue.computed)(() => getStyles("icon"));
|
|
380
|
+
const bodyAttrs = (0, vue.computed)(() => getStyles("body"));
|
|
381
|
+
const titleAttrs = (0, vue.computed)(() => getStyles("title"));
|
|
382
|
+
const labelAttrs = (0, vue.computed)(() => getStyles("label"));
|
|
383
|
+
const messageAttrs = (0, vue.computed)(() => getStyles("message"));
|
|
384
|
+
const closeButtonAttrs = (0, vue.computed)(() => getStyles("close-button"));
|
|
385
|
+
const mergedRootAttrs = (0, vue.computed)(() => {
|
|
386
|
+
const others = {};
|
|
387
|
+
const propsValue = props.value;
|
|
388
|
+
for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
389
|
+
const userMod = props.value.mod;
|
|
390
|
+
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod]];
|
|
391
|
+
return {
|
|
392
|
+
...others,
|
|
393
|
+
mod: mergedMod,
|
|
394
|
+
...rootAttrs.value
|
|
395
|
+
};
|
|
396
|
+
});
|
|
397
|
+
__expose({ root: (0, vue.computed)(() => _root.value?.root ?? null) });
|
|
398
|
+
const __returned__ = {
|
|
399
|
+
slots,
|
|
400
|
+
_root,
|
|
401
|
+
attrs,
|
|
402
|
+
rawProps,
|
|
403
|
+
props,
|
|
404
|
+
knownProps,
|
|
405
|
+
getStyles,
|
|
406
|
+
rootId,
|
|
407
|
+
titleId,
|
|
408
|
+
bodyId,
|
|
409
|
+
rootAttrs,
|
|
410
|
+
wrapperAttrs,
|
|
411
|
+
iconAttrs,
|
|
412
|
+
bodyAttrs,
|
|
413
|
+
titleAttrs,
|
|
414
|
+
labelAttrs,
|
|
415
|
+
messageAttrs,
|
|
416
|
+
closeButtonAttrs,
|
|
417
|
+
mergedRootAttrs,
|
|
418
|
+
get CBox() {
|
|
419
|
+
return require_index.CBox;
|
|
420
|
+
},
|
|
421
|
+
get CCloseButton() {
|
|
422
|
+
return require_index$1.CCloseButton;
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
426
|
+
enumerable: false,
|
|
427
|
+
value: true
|
|
428
|
+
});
|
|
429
|
+
return __returned__;
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
433
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_root" }, $setup.mergedRootAttrs, {
|
|
434
|
+
"aria-describedby": _ctx.$slots.default ? $setup.bodyId : void 0,
|
|
435
|
+
"aria-labelledby": _ctx.$slots.title ? $setup.titleId : void 0,
|
|
436
|
+
id: $setup.rootId,
|
|
437
|
+
role: $setup.props.role || "alert",
|
|
438
|
+
variant: $setup.props.variant
|
|
439
|
+
}), {
|
|
440
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.normalizeProps)((0, vue.guardReactiveProps)($setup.wrapperAttrs)), {
|
|
441
|
+
default: (0, vue.withCtx)(() => [
|
|
442
|
+
_ctx.$slots.icon ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 0 }, $setup.iconAttrs)), {
|
|
443
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "icon")]),
|
|
444
|
+
_: 3
|
|
445
|
+
}, 16)) : (0, vue.createCommentVNode)("v-if", true),
|
|
446
|
+
(0, vue.createVNode)($setup["CBox"], (0, vue.normalizeProps)((0, vue.guardReactiveProps)($setup.bodyAttrs)), {
|
|
447
|
+
default: (0, vue.withCtx)(() => [_ctx.$slots.title ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ key: 0 }, $setup.titleAttrs, { "data-with-close-button": $setup.props.withCloseButton || void 0 }), {
|
|
448
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({
|
|
449
|
+
tag: "span",
|
|
450
|
+
id: $setup.titleId
|
|
451
|
+
}, $setup.labelAttrs), {
|
|
452
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "title")]),
|
|
453
|
+
_: 3
|
|
454
|
+
}, 16, ["id"])]),
|
|
455
|
+
_: 3
|
|
456
|
+
}, 16, ["data-with-close-button"])) : (0, vue.createCommentVNode)("v-if", true), _ctx.$slots.default ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ key: 1 }, $setup.messageAttrs, {
|
|
457
|
+
"data-variant": $setup.props.variant,
|
|
458
|
+
id: $setup.bodyId
|
|
459
|
+
}), {
|
|
460
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
461
|
+
_: 3
|
|
462
|
+
}, 16, ["data-variant"])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
463
|
+
_: 3
|
|
464
|
+
}, 16),
|
|
465
|
+
$setup.props.withCloseButton ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CCloseButton"], (0, vue.mergeProps)({ key: 1 }, $setup.closeButtonAttrs, {
|
|
466
|
+
"aria-label": $props.closeButtonLabel,
|
|
467
|
+
"icon-size": 16,
|
|
468
|
+
size: 16,
|
|
469
|
+
unstyled: $setup.props.unstyled,
|
|
470
|
+
variant: "transparent",
|
|
471
|
+
onClick: $setup.props.onClose
|
|
472
|
+
}), null, 16, [
|
|
473
|
+
"aria-label",
|
|
474
|
+
"unstyled",
|
|
475
|
+
"onClick"
|
|
476
|
+
])) : (0, vue.createCommentVNode)("v-if", true)
|
|
477
|
+
]),
|
|
478
|
+
_: 3
|
|
479
|
+
}, 16)]),
|
|
480
|
+
_: 3
|
|
481
|
+
}, 16, [
|
|
482
|
+
"aria-describedby",
|
|
483
|
+
"aria-labelledby",
|
|
484
|
+
"id",
|
|
485
|
+
"role",
|
|
486
|
+
"variant"
|
|
487
|
+
]);
|
|
488
|
+
}
|
|
489
|
+
var alert_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/alert/alert.vue"]]);
|
|
490
|
+
//#endregion
|
|
491
|
+
exports.default = alert_default;
|
|
492
|
+
|
|
493
|
+
//# sourceMappingURL=alert.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.cjs","names":[],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-describedby=\"$slots.default ? bodyId : undefined\"\n :aria-labelledby=\"$slots.title ? titleId : undefined\"\n :id=\"rootId\"\n :role=\"props.role || 'alert'\"\n :variant=\"props.variant\"\n >\n <c-box v-bind=\"wrapperAttrs\">\n <c-box v-bind=\"iconAttrs\" v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </c-box>\n\n <c-box v-bind=\"bodyAttrs\">\n <c-box\n v-bind=\"titleAttrs\"\n v-if=\"$slots.title\"\n :data-with-close-button=\"props.withCloseButton || undefined\"\n >\n <c-box tag=\"span\" :id=\"titleId\" v-bind=\"labelAttrs\">\n <slot name=\"title\" />\n </c-box>\n </c-box>\n\n <c-box\n v-bind=\"messageAttrs\"\n v-if=\"$slots.default\"\n :data-variant=\"props.variant\"\n :id=\"bodyId\"\n >\n <slot />\n </c-box>\n </c-box>\n\n <c-close-button\n v-bind=\"closeButtonAttrs\"\n v-if=\"props.withCloseButton\"\n :aria-label=\"closeButtonLabel\"\n :icon-size=\"16\"\n :size=\"16\"\n :unstyled=\"props.unstyled\"\n variant=\"transparent\"\n @click=\"props.onClose\"\n ></c-close-button>\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useId } from '@cck-ui/hooks'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './alert.module.css'\nimport { AlertFactory, type AlertProps } from './alert.types'\nimport { varsResolver } from './alert.utils'\nimport CCloseButton from '../close-button'\n\ndefineOptions({\n name: 'CAlert',\n})\n\nconst slots = defineSlots<{\n default: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AlertProps>()\n\nconst props = useComponentProps({\n component: 'CAlert',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'className',\n 'styles',\n 'classNames',\n 'unstyled',\n 'vars',\n 'radius',\n 'color',\n 'id',\n 'withCloseButton',\n 'onClose',\n 'closeButtonLabel',\n 'variant',\n 'autoContrast',\n 'role',\n 'attributes',\n]\n\nconst getStyles = useStyles<AlertFactory>({\n name: 'Alert',\n props: { ...props.value, ...attrs } as AlertProps,\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 rootId = useId(props.value.id)\nconst titleId = (slots.title && `${rootId}-title`) || undefined\nconst bodyId = `${rootId}-body`\n\nconst rootAttrs = computed(() => getStyles('root'))\nconst wrapperAttrs = computed(() => getStyles('wrapper'))\nconst iconAttrs = computed(() => getStyles('icon'))\nconst bodyAttrs = computed(() => getStyles('body'))\nconst titleAttrs = computed(() => getStyles('title'))\nconst labelAttrs = computed(() => getStyles('label'))\nconst messageAttrs = computed(() => getStyles('message'))\nconst closeButtonAttrs = computed(() => getStyles('close-button'))\n\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [...(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":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region packages/@cck-ui/core/src/components/alert/alert.module.css
|
|
3
|
+
var alert_module_default = {
|
|
4
|
+
"root": "m_efb192b3",
|
|
5
|
+
"wrapper": "m_7636d522",
|
|
6
|
+
"body": "m_efaa4b73",
|
|
7
|
+
"title": "m_69a4aa7",
|
|
8
|
+
"label": "m_625a743",
|
|
9
|
+
"icon": "m_efad4e4a",
|
|
10
|
+
"message": "m_50085096",
|
|
11
|
+
"close-button": "m_91af3d78"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.default = alert_module_default;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=alert.module.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.module.cjs","names":[],"sources":["../../../src/components/alert/alert.module.css"],"sourcesContent":[".root {\n --alert-radius: var(--c-radius-default);\n --alert-bg: var(--c-primary-color-light);\n --alert-bd: 1px solid transparent;\n --alert-color: var(--c-primary-color-light-color);\n\n padding: var(--c-spacing-md) var(--c-spacing-md);\n border-radius: var(--alert-radius);\n position: relative;\n overflow: hidden;\n background-color: var(--alert-bg);\n border: var(--alert-bd);\n color: var(--alert-color);\n}\n\n.wrapper {\n display: flex;\n}\n\n.body {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: var(--c-spacing-xs);\n}\n\n.title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: var(--c-font-size-sm);\n font-weight: var(--c-font-weight-bold);\n\n &:where([data-with-close-button]) {\n padding-inline-end: var(--c-spacing-md);\n }\n}\n\n.label {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.icon {\n line-height: 1;\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-inline-end: var(--c-spacing-md);\n margin-top: 1px;\n}\n\n.message {\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: var(--c-font-size-sm);\n\n @mixin where-light {\n color: var(--c-color-black);\n }\n\n @mixin where-dark {\n color: var(--c-color-white);\n }\n\n &:where([data-variant='filled']) {\n color: var(--alert-color);\n }\n\n &:where([data-variant='white']) {\n color: var(--c-color-black);\n }\n}\n\n.close-button {\n width: 20px;\n height: 20px;\n color: var(--alert-color);\n}\n"],"mappings":";;AAAA,IAAA,uBAAe;CAAC,QAAO;CAAa,WAAU;CAAa,QAAO;CAAa,SAAQ;CAAY,SAAQ;CAAY,QAAO;CAAa,WAAU;CAAa,gBAAe;AAAY"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_get_size = require("../../core/utils/get-size/get-size.cjs");
|
|
3
|
+
//#region packages/@cck-ui/core/src/components/alert/alert.utils.ts
|
|
4
|
+
const varsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs").createVarsResolver((theme, { radius, color, variant, autoContrast }) => {
|
|
5
|
+
const colors = theme.variantColorResolver({
|
|
6
|
+
color: color || theme.primaryColor,
|
|
7
|
+
theme,
|
|
8
|
+
variant: variant || "light",
|
|
9
|
+
autoContrast
|
|
10
|
+
});
|
|
11
|
+
return { root: {
|
|
12
|
+
"--alert-radius": radius === void 0 ? void 0 : require_get_size.getRadius(radius),
|
|
13
|
+
"--alert-bg": color || variant ? colors.background : void 0,
|
|
14
|
+
"--alert-color": colors.color,
|
|
15
|
+
"--alert-bd": color || variant ? colors.border : void 0
|
|
16
|
+
} };
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.varsResolver = varsResolver;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=alert.utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.utils.cjs","names":["createVarsResolver","getRadius"],"sources":["../../../src/components/alert/alert.utils.ts"],"sourcesContent":["import { createVarsResolver, getRadius } from '../../core'\nimport { AlertFactory } from './alert.types'\n\nexport const varsResolver = createVarsResolver<AlertFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n variant: variant || 'light',\n autoContrast,\n })\n return {\n root: {\n '--alert-radius': radius === undefined ? undefined : getRadius(radius),\n '--alert-bg': color || variant ? colors.background : undefined,\n '--alert-color': colors.color,\n '--alert-bd': color || variant ? colors.border : undefined,\n },\n }\n }\n)\n"],"mappings":";;;AAGA,MAAa,4FAAeA,CAAAA,CAAAA,oBACzB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;EACpB;CACF,CAAC;CACD,OAAO,EACL,MAAM;EACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EACrE,cAAc,SAAS,UAAU,OAAO,aAAa,KAAA;EACrD,iBAAiB,OAAO;EACxB,cAAc,SAAS,UAAU,OAAO,SAAS,KAAA;CACnD,EACF;AACF,CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_install = require("../../core/utils/vue/install.cjs");
|
|
3
|
+
const require_statics = require("../../core/utils/vue/statics.cjs");
|
|
4
|
+
const require_alert_module = require("./alert.module.cjs");
|
|
5
|
+
const require_alert_utils = require("./alert.utils.cjs");
|
|
6
|
+
const require_alert = require("./alert.cjs");
|
|
7
|
+
//#region packages/@cck-ui/core/src/components/alert/index.ts
|
|
8
|
+
const AlertWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_alert.default, require_alert_module.default), require_alert_utils.varsResolver)));
|
|
9
|
+
const CAlert = require_install.withInstall(AlertWithStatic);
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.CAlert = CAlert;
|
|
12
|
+
exports.default = CAlert;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","Alert","classes","varsResolver","withInstall"],"sources":["../../../src/components/alert/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport Alert from './alert.vue'\nimport classes from './alert.module.css'\nimport { varsResolver } from './alert.utils'\n\nconst AlertWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Alert, classes), varsResolver))\n)\n\nexport const CAlert: SFCWithInstallAndClasses<typeof Alert, typeof classes> =\n withInstall(AlertWithStatic)\n\nexport default CAlert\n\nexport * from './alert.types'\n"],"mappings":";;;;;;;AAYA,MAAM,kBAAkBA,gBAAAA,iBACtBC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,cAAAA,SAAOC,qBAAAA,OAAO,GAAGC,oBAAAA,YAAY,CAAC,CACxE;AAEA,MAAa,SACXC,gBAAAA,YAAY,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.cjs","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { AspectRatioFactory, AspectRatioProps } from './aspect-ratio.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './aspect-ratio.module.css'\nimport { varsResolver } from './aspect-ratio.utils'\n\ndefineOptions({\n name: 'CAspectRatio',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AspectRatioProps>()\n\nconst props = useComponentProps({\n component: 'CAspectRatio',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'ratio',\n '
|
|
1
|
+
{"version":3,"file":"aspect-ratio.cjs","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { AspectRatioFactory, AspectRatioProps } from './aspect-ratio.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './aspect-ratio.module.css'\nimport { varsResolver } from './aspect-ratio.utils'\n\ndefineOptions({\n name: 'CAspectRatio',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AspectRatioProps>()\n\nconst props = useComponentProps({\n component: 'CAspectRatio',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'ratio',\n 'attributes',\n]\n\nconst getStyles = useStyles<AspectRatioFactory>({\n name: 'AspectRatio',\n props: { ...props.value, ...attrs } as AspectRatioProps,\n classes,\n className: props.value.className,\n classNames: props.value.classNames,\n style: props.value.style,\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 Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,YAAY,mBAAA,UAA8B;GAC9C,MAAM;GACN,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;GAClC,SAAA,4BAAA;GACA,WAAW,MAAM,MAAM;GACvB,YAAY,MAAM,MAAM;GACxB,OAAO,MAAM,MAAM;GACnB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB,cAAA,2BAAA;EACF,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,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;IACvC,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAE7B,CAAC;GACD,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;;;;;;;;;;;;;;;;;;;;;;mDApES,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;kCAC5B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -4,8 +4,8 @@ const require_export_helper = require("../../_virtual/_/plugin-vue/export-helper
|
|
|
4
4
|
const require_use_component_props = require("../../core/config-provider/use-component-props/use-component-props.cjs");
|
|
5
5
|
const require_index = require("../../core/box/index.cjs");
|
|
6
6
|
const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
|
|
7
|
-
const require_button_module = require("./button.module.cjs");
|
|
8
7
|
const require_index$1 = require("../unstyled-button/index.cjs");
|
|
8
|
+
const require_button_module = require("./button.module.cjs");
|
|
9
9
|
const require_button_utils = require("./button.utils.cjs");
|
|
10
10
|
const require_index$2 = require("../loader/index.cjs");
|
|
11
11
|
const require_index$3 = require("../transition/index.cjs");
|