@cck-ui/core 0.35.0 → 0.36.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/data-list/data-list-item/data-list-item.cjs +364 -0
- package/cjs/components/data-list/data-list-item/data-list-item.cjs.map +1 -0
- package/cjs/components/data-list/data-list-item-label/data-list-item-label.cjs +367 -0
- package/cjs/components/data-list/data-list-item-label/data-list-item-label.cjs.map +1 -0
- package/cjs/components/data-list/data-list-item-value/data-list-item-value.cjs +367 -0
- package/cjs/components/data-list/data-list-item-value/data-list-item-value.cjs.map +1 -0
- package/cjs/components/data-list/data-list.cjs +421 -0
- package/cjs/components/data-list/data-list.cjs.map +1 -0
- package/cjs/components/data-list/data-list.constant.cjs +7 -0
- package/cjs/components/data-list/data-list.constant.cjs.map +1 -0
- package/cjs/components/data-list/data-list.module.cjs +12 -0
- package/cjs/components/data-list/data-list.module.cjs.map +1 -0
- package/cjs/components/data-list/data-list.utils.cjs +13 -0
- package/cjs/components/data-list/data-list.utils.cjs.map +1 -0
- package/cjs/components/data-list/index.cjs +30 -0
- package/cjs/components/data-list/index.cjs.map +1 -0
- package/cjs/index.cjs +72 -63
- package/cjs/index.cjs.map +1 -1
- package/esm/components/data-list/data-list-item/data-list-item.mjs +364 -0
- package/esm/components/data-list/data-list-item/data-list-item.mjs.map +1 -0
- package/esm/components/data-list/data-list-item-label/data-list-item-label.mjs +367 -0
- package/esm/components/data-list/data-list-item-label/data-list-item-label.mjs.map +1 -0
- package/esm/components/data-list/data-list-item-value/data-list-item-value.mjs +367 -0
- package/esm/components/data-list/data-list-item-value/data-list-item-value.mjs.map +1 -0
- package/esm/components/data-list/data-list.constant.mjs +7 -0
- package/esm/components/data-list/data-list.constant.mjs.map +1 -0
- package/esm/components/data-list/data-list.mjs +421 -0
- package/esm/components/data-list/data-list.mjs.map +1 -0
- package/esm/components/data-list/data-list.module.mjs +12 -0
- package/esm/components/data-list/data-list.module.mjs.map +1 -0
- package/esm/components/data-list/data-list.utils.mjs +14 -0
- package/esm/components/data-list/data-list.utils.mjs.map +1 -0
- package/esm/components/data-list/index.mjs +26 -0
- package/esm/components/data-list/index.mjs.map +1 -0
- package/esm/index.mjs +6 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/data-list/data-list-item/data-list-item.types.d.ts +10 -0
- package/lib/components/data-list/data-list-item-label/data-list-item-label.types.d.ts +10 -0
- package/lib/components/data-list/data-list-item-value/data-list-item-value.types.d.ts +10 -0
- package/lib/components/data-list/data-list.constant.d.ts +3 -0
- package/lib/components/data-list/data-list.context.d.ts +5 -0
- package/lib/components/data-list/data-list.types.d.ts +50 -0
- package/lib/components/data-list/data-list.utils.d.ts +11 -0
- package/lib/components/data-list/index.d.ts +18 -0
- package/lib/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/styles/data-list.css +54 -0
- package/styles/data-list.layer.css +55 -0
- package/styles.css +55 -0
- package/styles.layer.css +55 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list-item-value.mjs","names":[],"sources":["../../../../src/components/data-list/data-list-item-value/data-list-item-value.vue"],"sourcesContent":["<template>\n <c-box ref=\"_value\" tag=\"dd\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue'\nimport { CBox, useComponentProps } from '../../../core'\nimport { DataListItemValueProps } from './data-list-item-value.types'\nimport { DATA_LIST_CONTEXT_KEY } from '../data-list.constant'\n\ndefineOptions({\n name: 'CDataListItemValue',\n})\n\nconst _value = ref<InstanceType<typeof CBox> | null>(null)\n\nconst rawProps = defineProps<DataListItemValueProps>()\n\nconst props = useComponentProps({\n component: 'CDataListItemValue',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = ['classNames', 'className', 'style', 'styles', 'vars', 'mod']\n\nconst dataListContext = inject(DATA_LIST_CONTEXT_KEY)\n\nif (!dataListContext) {\n throw new Error(\n '[@cck-ui/data-list-item-value] CDataListItemValue component should be wrapped inside CDataList component.'\n )\n}\n\nconst valueAttrs = computed(() => {\n return dataListContext.getStyles('itemValue', {\n className: () => props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n })\n})\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, ...valueAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _value.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,SAAS,IAAsC,IAAI;EAEzD,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GAAC;GAAc;GAAa;GAAS;GAAU;GAAQ;EAAK;EAE/E,MAAM,kBAAkB,OAAO,qBAAqB;EAEpD,IAAI,CAAC,iBACH,MAAM,IAAI,MACR,2GACF;EAGF,MAAM,aAAa,eAAe;GAChC,OAAO,gBAAgB,UAAU,aAAa;IAC5C,iBAAiB,MAAM,MAAM;IAC7B,OAAO,MAAM,MAAM;IACnB,YAAY,MAAM,MAAM;IACxB,QAAQ,MAAM,MAAM;GACtB,CAAC;EACH,CAAC;EAED,MAAM,cAAc,eAAe;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,WAAW;GAAM;EAC1D,CAAC;EAED,SAAa,EACX,MAAM,eAAe,OAAO,OAAO,QAAQ,IAAI,EACjD,CAAC;;;;;;;;;;;;;;;;;;;;;qBA3DC,YAEQ,OAAA,SAFR,WAEQ;EAFD,KAAI;EAAS,KAAI;IAAa,OAAA,WAAW,GAAA;yBACtC,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list.constant.mjs","names":[],"sources":["../../../src/components/data-list/data-list.constant.ts"],"sourcesContent":["import { InjectionKey } from 'vue'\nimport { DataListContextValue } from './data-list.context'\n\nexport const DATA_LIST_CONTEXT_KEY: InjectionKey<DataListContextValue> = Symbol('DataListContext')\n"],"mappings":";;AAGA,MAAa,wBAA4D,OAAO,iBAAiB"}
|
|
@@ -0,0 +1,421 @@
|
|
|
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 data_list_module_default from "./data-list.module.mjs";
|
|
7
|
+
import { varsResolver } from "./data-list.utils.mjs";
|
|
8
|
+
import { DATA_LIST_CONTEXT_KEY } from "./data-list.constant.mjs";
|
|
9
|
+
import { computed, createBlock, defineComponent, mergeProps, openBlock, provide, ref, renderSlot, useAttrs, withCtx } from "vue";
|
|
10
|
+
//#region packages/@cck-ui/core/src/components/data-list/data-list.vue
|
|
11
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
12
|
+
name: "CDataList",
|
|
13
|
+
__name: "data-list",
|
|
14
|
+
props: {
|
|
15
|
+
size: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
19
|
+
gap: {
|
|
20
|
+
type: null,
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
orientation: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
withDivider: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
labelWidth: {
|
|
32
|
+
type: null,
|
|
33
|
+
required: false
|
|
34
|
+
},
|
|
35
|
+
className: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
style: {
|
|
40
|
+
type: [
|
|
41
|
+
Object,
|
|
42
|
+
Function,
|
|
43
|
+
Array
|
|
44
|
+
],
|
|
45
|
+
required: false,
|
|
46
|
+
skipCheck: true
|
|
47
|
+
},
|
|
48
|
+
__vars: {
|
|
49
|
+
type: null,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
__size: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
hiddenFrom: {
|
|
57
|
+
type: null,
|
|
58
|
+
required: false
|
|
59
|
+
},
|
|
60
|
+
visibleFrom: {
|
|
61
|
+
type: null,
|
|
62
|
+
required: false
|
|
63
|
+
},
|
|
64
|
+
lightHidden: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
required: false
|
|
67
|
+
},
|
|
68
|
+
darkHidden: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: false
|
|
71
|
+
},
|
|
72
|
+
mod: {
|
|
73
|
+
type: [
|
|
74
|
+
Object,
|
|
75
|
+
String,
|
|
76
|
+
Array
|
|
77
|
+
],
|
|
78
|
+
required: false
|
|
79
|
+
},
|
|
80
|
+
m: {
|
|
81
|
+
type: null,
|
|
82
|
+
required: false
|
|
83
|
+
},
|
|
84
|
+
my: {
|
|
85
|
+
type: null,
|
|
86
|
+
required: false
|
|
87
|
+
},
|
|
88
|
+
mx: {
|
|
89
|
+
type: null,
|
|
90
|
+
required: false
|
|
91
|
+
},
|
|
92
|
+
mt: {
|
|
93
|
+
type: null,
|
|
94
|
+
required: false
|
|
95
|
+
},
|
|
96
|
+
mb: {
|
|
97
|
+
type: null,
|
|
98
|
+
required: false
|
|
99
|
+
},
|
|
100
|
+
ms: {
|
|
101
|
+
type: null,
|
|
102
|
+
required: false
|
|
103
|
+
},
|
|
104
|
+
me: {
|
|
105
|
+
type: null,
|
|
106
|
+
required: false
|
|
107
|
+
},
|
|
108
|
+
mis: {
|
|
109
|
+
type: null,
|
|
110
|
+
required: false
|
|
111
|
+
},
|
|
112
|
+
mie: {
|
|
113
|
+
type: null,
|
|
114
|
+
required: false
|
|
115
|
+
},
|
|
116
|
+
ml: {
|
|
117
|
+
type: null,
|
|
118
|
+
required: false
|
|
119
|
+
},
|
|
120
|
+
mr: {
|
|
121
|
+
type: null,
|
|
122
|
+
required: false
|
|
123
|
+
},
|
|
124
|
+
p: {
|
|
125
|
+
type: null,
|
|
126
|
+
required: false
|
|
127
|
+
},
|
|
128
|
+
py: {
|
|
129
|
+
type: null,
|
|
130
|
+
required: false
|
|
131
|
+
},
|
|
132
|
+
px: {
|
|
133
|
+
type: null,
|
|
134
|
+
required: false
|
|
135
|
+
},
|
|
136
|
+
pt: {
|
|
137
|
+
type: null,
|
|
138
|
+
required: false
|
|
139
|
+
},
|
|
140
|
+
pb: {
|
|
141
|
+
type: null,
|
|
142
|
+
required: false
|
|
143
|
+
},
|
|
144
|
+
ps: {
|
|
145
|
+
type: null,
|
|
146
|
+
required: false
|
|
147
|
+
},
|
|
148
|
+
pe: {
|
|
149
|
+
type: null,
|
|
150
|
+
required: false
|
|
151
|
+
},
|
|
152
|
+
pis: {
|
|
153
|
+
type: null,
|
|
154
|
+
required: false
|
|
155
|
+
},
|
|
156
|
+
pie: {
|
|
157
|
+
type: null,
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
160
|
+
pl: {
|
|
161
|
+
type: null,
|
|
162
|
+
required: false
|
|
163
|
+
},
|
|
164
|
+
pr: {
|
|
165
|
+
type: null,
|
|
166
|
+
required: false
|
|
167
|
+
},
|
|
168
|
+
bd: {
|
|
169
|
+
type: null,
|
|
170
|
+
required: false
|
|
171
|
+
},
|
|
172
|
+
bdrs: {
|
|
173
|
+
type: null,
|
|
174
|
+
required: false
|
|
175
|
+
},
|
|
176
|
+
bg: {
|
|
177
|
+
type: null,
|
|
178
|
+
required: false
|
|
179
|
+
},
|
|
180
|
+
c: {
|
|
181
|
+
type: null,
|
|
182
|
+
required: false
|
|
183
|
+
},
|
|
184
|
+
opacity: {
|
|
185
|
+
type: [
|
|
186
|
+
String,
|
|
187
|
+
Object,
|
|
188
|
+
Number
|
|
189
|
+
],
|
|
190
|
+
required: false
|
|
191
|
+
},
|
|
192
|
+
ff: {
|
|
193
|
+
type: [String, Object],
|
|
194
|
+
required: false
|
|
195
|
+
},
|
|
196
|
+
fz: {
|
|
197
|
+
type: null,
|
|
198
|
+
required: false
|
|
199
|
+
},
|
|
200
|
+
fw: {
|
|
201
|
+
type: null,
|
|
202
|
+
required: false
|
|
203
|
+
},
|
|
204
|
+
lts: {
|
|
205
|
+
type: null,
|
|
206
|
+
required: false
|
|
207
|
+
},
|
|
208
|
+
ta: {
|
|
209
|
+
type: [String, Object],
|
|
210
|
+
required: false
|
|
211
|
+
},
|
|
212
|
+
lh: {
|
|
213
|
+
type: null,
|
|
214
|
+
required: false
|
|
215
|
+
},
|
|
216
|
+
fs: {
|
|
217
|
+
type: null,
|
|
218
|
+
required: false
|
|
219
|
+
},
|
|
220
|
+
tt: {
|
|
221
|
+
type: [String, Object],
|
|
222
|
+
required: false
|
|
223
|
+
},
|
|
224
|
+
td: {
|
|
225
|
+
type: null,
|
|
226
|
+
required: false
|
|
227
|
+
},
|
|
228
|
+
w: {
|
|
229
|
+
type: null,
|
|
230
|
+
required: false
|
|
231
|
+
},
|
|
232
|
+
miw: {
|
|
233
|
+
type: null,
|
|
234
|
+
required: false
|
|
235
|
+
},
|
|
236
|
+
maw: {
|
|
237
|
+
type: null,
|
|
238
|
+
required: false
|
|
239
|
+
},
|
|
240
|
+
h: {
|
|
241
|
+
type: null,
|
|
242
|
+
required: false
|
|
243
|
+
},
|
|
244
|
+
mih: {
|
|
245
|
+
type: null,
|
|
246
|
+
required: false
|
|
247
|
+
},
|
|
248
|
+
mah: {
|
|
249
|
+
type: null,
|
|
250
|
+
required: false
|
|
251
|
+
},
|
|
252
|
+
bgsz: {
|
|
253
|
+
type: null,
|
|
254
|
+
required: false
|
|
255
|
+
},
|
|
256
|
+
bgp: {
|
|
257
|
+
type: null,
|
|
258
|
+
required: false
|
|
259
|
+
},
|
|
260
|
+
bgr: {
|
|
261
|
+
type: null,
|
|
262
|
+
required: false
|
|
263
|
+
},
|
|
264
|
+
bga: {
|
|
265
|
+
type: null,
|
|
266
|
+
required: false
|
|
267
|
+
},
|
|
268
|
+
pos: {
|
|
269
|
+
type: [String, Object],
|
|
270
|
+
required: false
|
|
271
|
+
},
|
|
272
|
+
top: {
|
|
273
|
+
type: null,
|
|
274
|
+
required: false
|
|
275
|
+
},
|
|
276
|
+
left: {
|
|
277
|
+
type: null,
|
|
278
|
+
required: false
|
|
279
|
+
},
|
|
280
|
+
bottom: {
|
|
281
|
+
type: null,
|
|
282
|
+
required: false
|
|
283
|
+
},
|
|
284
|
+
right: {
|
|
285
|
+
type: null,
|
|
286
|
+
required: false
|
|
287
|
+
},
|
|
288
|
+
inset: {
|
|
289
|
+
type: null,
|
|
290
|
+
required: false
|
|
291
|
+
},
|
|
292
|
+
display: {
|
|
293
|
+
type: null,
|
|
294
|
+
required: false
|
|
295
|
+
},
|
|
296
|
+
flex: {
|
|
297
|
+
type: null,
|
|
298
|
+
required: false
|
|
299
|
+
},
|
|
300
|
+
unstyled: {
|
|
301
|
+
type: Boolean,
|
|
302
|
+
required: false
|
|
303
|
+
},
|
|
304
|
+
variant: {
|
|
305
|
+
type: null,
|
|
306
|
+
required: false
|
|
307
|
+
},
|
|
308
|
+
classNames: {
|
|
309
|
+
type: null,
|
|
310
|
+
required: false
|
|
311
|
+
},
|
|
312
|
+
styles: {
|
|
313
|
+
type: null,
|
|
314
|
+
required: false
|
|
315
|
+
},
|
|
316
|
+
vars: {
|
|
317
|
+
type: Function,
|
|
318
|
+
required: false
|
|
319
|
+
},
|
|
320
|
+
attributes: {
|
|
321
|
+
type: null,
|
|
322
|
+
required: false
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
setup(__props, { expose: __expose }) {
|
|
326
|
+
const _root = ref(null);
|
|
327
|
+
const attrs = useAttrs();
|
|
328
|
+
const rawProps = __props;
|
|
329
|
+
const defaultProps = { orientation: "horizontal" };
|
|
330
|
+
const props = useComponentProps({
|
|
331
|
+
component: "CDataList",
|
|
332
|
+
defaultProps,
|
|
333
|
+
props: rawProps
|
|
334
|
+
});
|
|
335
|
+
const knownProps = [
|
|
336
|
+
"classNames",
|
|
337
|
+
"className",
|
|
338
|
+
"style",
|
|
339
|
+
"styles",
|
|
340
|
+
"unstyled",
|
|
341
|
+
"vars",
|
|
342
|
+
"gap",
|
|
343
|
+
"orientation",
|
|
344
|
+
"withDivider",
|
|
345
|
+
"labelWidth",
|
|
346
|
+
"mod",
|
|
347
|
+
"attributes"
|
|
348
|
+
];
|
|
349
|
+
const styleProps = computed(() => ({
|
|
350
|
+
...props.value,
|
|
351
|
+
...attrs,
|
|
352
|
+
style: attrs.style ?? props.value.style
|
|
353
|
+
}));
|
|
354
|
+
const getStyles = useStyles({
|
|
355
|
+
name: "DataList",
|
|
356
|
+
classes: data_list_module_default,
|
|
357
|
+
props: styleProps,
|
|
358
|
+
className: () => props.value.className,
|
|
359
|
+
style: () => props.value.style,
|
|
360
|
+
classNames: props.value.classNames,
|
|
361
|
+
styles: props.value.styles,
|
|
362
|
+
unstyled: props.value.unstyled,
|
|
363
|
+
attributes: props.value.attributes,
|
|
364
|
+
vars: props.value.vars,
|
|
365
|
+
varsResolver
|
|
366
|
+
});
|
|
367
|
+
provide(DATA_LIST_CONTEXT_KEY, { getStyles });
|
|
368
|
+
const modList = computed(() => [{ orientation: props.value.orientation }, { "with-divider": props.value.withDivider }]);
|
|
369
|
+
const rootAttrs = computed(() => getStyles("root"));
|
|
370
|
+
const mergedAttrs = computed(() => {
|
|
371
|
+
const others = {};
|
|
372
|
+
const propsValue = props.value;
|
|
373
|
+
Object.keys(propsValue).forEach((key) => {
|
|
374
|
+
if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
375
|
+
});
|
|
376
|
+
const userMod = props.value.mod;
|
|
377
|
+
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean), ...modList.value];
|
|
378
|
+
return {
|
|
379
|
+
...others,
|
|
380
|
+
mod: mergedMod,
|
|
381
|
+
...rootAttrs.value
|
|
382
|
+
};
|
|
383
|
+
});
|
|
384
|
+
__expose({ root: computed(() => _root.value?.root ?? null) });
|
|
385
|
+
const __returned__ = {
|
|
386
|
+
_root,
|
|
387
|
+
attrs,
|
|
388
|
+
rawProps,
|
|
389
|
+
defaultProps,
|
|
390
|
+
props,
|
|
391
|
+
knownProps,
|
|
392
|
+
styleProps,
|
|
393
|
+
getStyles,
|
|
394
|
+
modList,
|
|
395
|
+
rootAttrs,
|
|
396
|
+
mergedAttrs,
|
|
397
|
+
get CBox() {
|
|
398
|
+
return CBox;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
402
|
+
enumerable: false,
|
|
403
|
+
value: true
|
|
404
|
+
});
|
|
405
|
+
return __returned__;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
409
|
+
return openBlock(), createBlock($setup["CBox"], mergeProps({
|
|
410
|
+
ref: "_root",
|
|
411
|
+
tag: "dl"
|
|
412
|
+
}, $setup.mergedAttrs), {
|
|
413
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
414
|
+
_: 3
|
|
415
|
+
}, 16);
|
|
416
|
+
}
|
|
417
|
+
var data_list_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/data-list/data-list.vue"]]);
|
|
418
|
+
//#endregion
|
|
419
|
+
export { data_list_default as default };
|
|
420
|
+
|
|
421
|
+
//# sourceMappingURL=data-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list.mjs","names":[],"sources":["../../../src/components/data-list/data-list.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"dl\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './data-list.module.css'\nimport { DataListFactory, DataListProps } from './data-list.types'\nimport { varsResolver } from './data-list.utils'\nimport { DATA_LIST_CONTEXT_KEY } from './data-list.constant'\n\ndefineOptions({\n name: 'CDataList',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<DataListProps>()\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<DataListProps>\n\nconst props = useComponentProps({\n component: 'CDataList',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'gap',\n 'orientation',\n 'withDivider',\n 'labelWidth',\n 'mod',\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<DataListFactory>({\n name: 'DataList',\n classes,\n props: styleProps,\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\nprovide(DATA_LIST_CONTEXT_KEY, { getStyles })\n\nconst modList = computed(() => [\n { orientation: props.value.orientation },\n { 'with-divider': props.value.withDivider },\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 = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...modList.value,\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,aAAa,aACf;EAEA,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;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,UAA2B;GAC3C,MAAM;GACN,SAAA;GACA,OAAO;GACP,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,QAAQ,uBAAuB,EAAE,UAAU,CAAC;EAE5C,MAAM,UAAU,eAAe,CAC7B,EAAE,aAAa,MAAM,MAAM,YAAY,GACvC,EAAE,gBAAgB,MAAM,MAAM,YAAY,CAC5C,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;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,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAG,QAAQ,KACb;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;qBA/FC,YAEQ,OAAA,SAFR,WAEQ;EAFD,KAAI;EAAQ,KAAI;IAAa,OAAA,WAAW,GAAA;yBACrC,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region packages/@cck-ui/core/src/components/data-list/data-list.module.css
|
|
3
|
+
var data_list_module_default = {
|
|
4
|
+
"root": "m_a6a06a4e",
|
|
5
|
+
"item": "m_a69c647f",
|
|
6
|
+
"itemLabel": "m_9c9621b5",
|
|
7
|
+
"itemValue": "m_9d233432"
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { data_list_module_default as default };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=data-list.module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list.module.mjs","names":[],"sources":["../../../src/components/data-list/data-list.module.css"],"sourcesContent":[".root {\n --data-list-fz: var(--c-font-size-sm);\n --data-list-lh: var(--c-line-height-sm);\n --data-list-gap: var(--c-spacing-sm);\n --data-list-label-width: rem(120px);\n\n display: flex;\n flex-direction: column;\n gap: var(--data-list-gap);\n font-size: var(--data-list-fz);\n line-height: var(--data-list-lh);\n margin: 0;\n padding: 0;\n\n &:where([data-with-divider]) {\n gap: 0;\n }\n}\n\n.item {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: var(--c-spacing-xs);\n}\n\n.root:where([data-orientation='vertical']) > .item {\n flex-direction: column;\n gap: 0;\n}\n\n.itemLabel {\n color: var(--c-color-dimmed);\n font-size: var(--data-list-fz);\n line-height: var(--data-list-lh);\n min-width: var(--data-list-label-width);\n margin: 0;\n}\n\n.root:where([data-orientation='vertical']) .itemLabel {\n min-width: 100%;\n}\n\n.itemValue {\n font-size: var(--data-list-fz);\n line-height: var(--data-list-lh);\n margin: 0;\n}\n\n.root:where([data-with-divider]) > .item:where(:not(:first-of-type)) {\n border-top: rem(1px) solid var(--c-color-default-border);\n padding-top: var(--data-list-gap);\n margin-top: var(--data-list-gap);\n}\n"],"mappings":";;AAAA,IAAA,2BAAe;CAAC,QAAO;CAAa,QAAO;CAAa,aAAY;CAAa,aAAY;AAAY"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getFontSize, getLineHeight, getSpacing } 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/data-list/data-list.utils.ts
|
|
5
|
+
const varsResolver = createVarsResolver((_, { size, gap, labelWidth }) => ({ root: {
|
|
6
|
+
"--data-list-fz": getFontSize(size),
|
|
7
|
+
"--data-list-gap": getSpacing(size),
|
|
8
|
+
"--data-list-label-width": labelWidth !== void 0 ? typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth : void 0,
|
|
9
|
+
"--data-list-lh": getLineHeight(gap)
|
|
10
|
+
} }));
|
|
11
|
+
//#endregion
|
|
12
|
+
export { varsResolver };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=data-list.utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list.utils.mjs","names":[],"sources":["../../../src/components/data-list/data-list.utils.ts"],"sourcesContent":["import { createVarsResolver, getFontSize, getLineHeight, getSpacing } from '../../core'\nimport { DataListFactory } from './data-list.types'\n\nexport const varsResolver = createVarsResolver<DataListFactory>((_, { size, gap, labelWidth }) => ({\n root: {\n '--data-list-fz': getFontSize(size),\n '--data-list-gap': getSpacing(size),\n '--data-list-label-width':\n labelWidth !== undefined\n ? typeof labelWidth === 'number'\n ? `${labelWidth}px`\n : labelWidth\n : undefined,\n '--data-list-lh': getLineHeight(gap),\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAAqC,GAAG,EAAE,MAAM,KAAK,kBAAkB,EACjG,MAAM;CACJ,kBAAkB,YAAY,IAAI;CAClC,mBAAmB,WAAW,IAAI;CAClC,2BACE,eAAe,KAAA,IACX,OAAO,eAAe,WACpB,GAAG,WAAW,MACd,aACF,KAAA;CACN,kBAAkB,cAAc,GAAG;AACrC,EACF,EAAE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 data_list_module_default from "./data-list.module.mjs";
|
|
5
|
+
import { varsResolver } from "./data-list.utils.mjs";
|
|
6
|
+
import data_list_default from "./data-list.mjs";
|
|
7
|
+
import data_list_item_default from "./data-list-item/data-list-item.mjs";
|
|
8
|
+
import data_list_item_label_default from "./data-list-item-label/data-list-item-label.mjs";
|
|
9
|
+
import data_list_item_value_default from "./data-list-item-value/data-list-item-value.mjs";
|
|
10
|
+
//#region packages/@cck-ui/core/src/components/data-list/index.ts
|
|
11
|
+
const DataListWithStatic = withPropsFactory(withExtend(withVarsResolver(withClasses(data_list_default, data_list_module_default), varsResolver)));
|
|
12
|
+
const DataListItemWithStatic = withPropsFactory(withExtend(withClasses(data_list_item_default, data_list_module_default)));
|
|
13
|
+
const DataListItemLabelWithStatic = withPropsFactory(withExtend(withClasses(data_list_item_label_default, data_list_module_default)));
|
|
14
|
+
const DataListItemValueWithStatic = withPropsFactory(withExtend(withClasses(data_list_item_value_default, data_list_module_default)));
|
|
15
|
+
const CDataListItem = withInstall(DataListItemWithStatic);
|
|
16
|
+
const CDataListItemLabel = withInstall(DataListItemLabelWithStatic);
|
|
17
|
+
const CDataListItemValue = withInstall(DataListItemValueWithStatic);
|
|
18
|
+
const CDataList = withInstall(DataListWithStatic, {
|
|
19
|
+
Item: CDataListItem,
|
|
20
|
+
Label: CDataListItemLabel,
|
|
21
|
+
Value: CDataListItemValue
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { CDataList, CDataList as default, CDataListItem, CDataListItemLabel, CDataListItemValue };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["DataList","classes","DataListItem","DataListItemLabel","DataListItemValue"],"sources":["../../../src/components/data-list/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport DataList from './data-list.vue'\nimport classes from './data-list.module.css'\nimport { varsResolver } from './data-list.utils'\nimport DataListItem from './data-list-item/data-list-item.vue'\nimport DataListItemLabel from './data-list-item-label/data-list-item-label.vue'\nimport DataListItemValue from './data-list-item-value/data-list-item-value.vue'\n\nconst DataListWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(DataList, classes), varsResolver))\n)\nconst DataListItemWithStatic = withPropsFactory(withExtend(withClasses(DataListItem, classes)))\nconst DataListItemLabelWithStatic = withPropsFactory(\n withExtend(withClasses(DataListItemLabel, classes))\n)\nconst DataListItemValueWithStatic = withPropsFactory(\n withExtend(withClasses(DataListItemValue, classes))\n)\n\nexport const CDataListItem: SFCWithInstallAndClasses<typeof DataListItem> =\n withInstall(DataListItemWithStatic)\nexport const CDataListItemLabel: SFCWithInstallAndClasses<typeof DataListItemLabel> = withInstall(\n DataListItemLabelWithStatic\n)\nexport const CDataListItemValue: SFCWithInstallAndClasses<typeof DataListItemValue> = withInstall(\n DataListItemValueWithStatic\n)\nexport const CDataList: SFCWithInstallAndClasses<typeof DataList> & {\n Item: typeof DataListItem\n Label: typeof DataListItemLabel\n Value: typeof DataListItemValue\n} = withInstall(DataListWithStatic, {\n Item: CDataListItem,\n Label: CDataListItemLabel,\n Value: CDataListItemValue,\n})\n\nexport default CDataList\n\nexport * from './data-list-item/data-list-item.types'\nexport * from './data-list-item-label/data-list-item-label.types'\nexport * from './data-list-item-value/data-list-item-value.types'\nexport * from './data-list.types'\n"],"mappings":";;;;;;;;;;AAeA,MAAM,qBAAqB,iBACzB,WAAW,iBAAiB,YAAYA,mBAAUC,wBAAO,GAAG,YAAY,CAAC,CAC3E;AACA,MAAM,yBAAyB,iBAAiB,WAAW,YAAYC,wBAAcD,wBAAO,CAAC,CAAC;AAC9F,MAAM,8BAA8B,iBAClC,WAAW,YAAYE,8BAAmBF,wBAAO,CAAC,CACpD;AACA,MAAM,8BAA8B,iBAClC,WAAW,YAAYG,8BAAmBH,wBAAO,CAAC,CACpD;AAEA,MAAa,gBACX,YAAY,sBAAsB;AACpC,MAAa,qBAAyE,YACpF,2BACF;AACA,MAAa,qBAAyE,YACpF,2BACF;AACA,MAAa,YAIT,YAAY,oBAAoB;CAClC,MAAM;CACN,OAAO;CACP,OAAO;AACT,CAAC"}
|
package/esm/index.mjs
CHANGED
|
@@ -76,6 +76,7 @@ import { CCenter } from "./components/center/index.mjs";
|
|
|
76
76
|
import { CColorSwatch } from "./components/color-swatch/index.mjs";
|
|
77
77
|
import { CContainer } from "./components/container/index.mjs";
|
|
78
78
|
import { CCopyButton } from "./components/copy-button/index.mjs";
|
|
79
|
+
import { CDataList, CDataListItem, CDataListItemLabel, CDataListItemValue } from "./components/data-list/index.mjs";
|
|
79
80
|
import { CDivider } from "./components/divider/index.mjs";
|
|
80
81
|
import { CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle } from "./components/empty-state/index.mjs";
|
|
81
82
|
import { CFileButton } from "./components/file-button/index.mjs";
|
|
@@ -122,6 +123,10 @@ const components = [
|
|
|
122
123
|
CColorSwatch,
|
|
123
124
|
CContainer,
|
|
124
125
|
CCopyButton,
|
|
126
|
+
CDataList,
|
|
127
|
+
CDataListItem,
|
|
128
|
+
CDataListItemLabel,
|
|
129
|
+
CDataListItemValue,
|
|
125
130
|
CDivider,
|
|
126
131
|
CEmptyState,
|
|
127
132
|
CEmptyStateActions,
|
|
@@ -158,6 +163,6 @@ const CckUI = { install(app) {
|
|
|
158
163
|
});
|
|
159
164
|
} };
|
|
160
165
|
//#endregion
|
|
161
|
-
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, 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, 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 };
|
|
166
|
+
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, 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 };
|
|
162
167
|
|
|
163
168
|
//# 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 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 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 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 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 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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,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;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,10 @@
|
|
|
1
|
+
import { BoxProps, CompoundStylesApiProps, ElementProps, Factory } from '../../../core';
|
|
2
|
+
export type DataListItemStylesNames = 'item';
|
|
3
|
+
export interface DataListItemProps extends BoxProps, CompoundStylesApiProps<DataListItemFactory>, ElementProps<'div'> {
|
|
4
|
+
}
|
|
5
|
+
export type DataListItemFactory = Factory<{
|
|
6
|
+
props: DataListItemProps;
|
|
7
|
+
ref: HTMLDivElement;
|
|
8
|
+
stylesNames: DataListItemStylesNames;
|
|
9
|
+
compound: true;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxProps, CompoundStylesApiProps, ElementProps, Factory } from '../../../core';
|
|
2
|
+
export type DataListItemLabelStylesNames = 'itemLabel';
|
|
3
|
+
export interface DataListItemLabelProps extends BoxProps, CompoundStylesApiProps<DataListItemLabelFactory>, ElementProps<'div'> {
|
|
4
|
+
}
|
|
5
|
+
export type DataListItemLabelFactory = Factory<{
|
|
6
|
+
props: DataListItemLabelProps;
|
|
7
|
+
ref: HTMLDivElement;
|
|
8
|
+
stylesNames: DataListItemLabelStylesNames;
|
|
9
|
+
compound: true;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxProps, CompoundStylesApiProps, ElementProps, Factory } from '../../../core';
|
|
2
|
+
export type DataListItemValueStylesNames = 'itemValue';
|
|
3
|
+
export interface DataListItemValueProps extends BoxProps, CompoundStylesApiProps<DataListItemValueFactory>, ElementProps<'div'> {
|
|
4
|
+
}
|
|
5
|
+
export type DataListItemValueFactory = Factory<{
|
|
6
|
+
props: DataListItemValueProps;
|
|
7
|
+
ref: HTMLDivElement;
|
|
8
|
+
stylesNames: DataListItemValueStylesNames;
|
|
9
|
+
compound: true;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Properties } from 'csstype';
|
|
2
|
+
import { BoxProps, CSize, CSpacing, ElementProps, Factory, StylesApiProps } from '../../core';
|
|
3
|
+
import { DataListItemLabelStylesNames } from './data-list-item-label/data-list-item-label.types';
|
|
4
|
+
import { DataListItemValueStylesNames } from './data-list-item-value/data-list-item-value.types';
|
|
5
|
+
import { DataListItemStylesNames } from './data-list-item/data-list-item.types';
|
|
6
|
+
import DataListItem from './data-list-item/data-list-item.vue';
|
|
7
|
+
import DataListItemLabel from './data-list-item-label/data-list-item-label.vue';
|
|
8
|
+
import DataListItemValue from './data-list-item-value/data-list-item-value.vue';
|
|
9
|
+
export type DataListStylesNames = 'root' | DataListItemStylesNames | DataListItemLabelStylesNames | DataListItemValueStylesNames;
|
|
10
|
+
export type DataListCssVariables = {
|
|
11
|
+
root: '--data-list-fz' | '--data-list-lh' | '--data-list-gap' | '--data-list-label-width';
|
|
12
|
+
};
|
|
13
|
+
export interface DataListProps extends BoxProps, StylesApiProps<DataListFactory>, /* @vue-ignore */ ElementProps<'div'> {
|
|
14
|
+
/**
|
|
15
|
+
* Controls `font-size` and `line-height`
|
|
16
|
+
* @default 'sm'
|
|
17
|
+
*/
|
|
18
|
+
size?: CSize;
|
|
19
|
+
/**
|
|
20
|
+
* Key of `theme.spacing` or any valid CSS value to set gap between items
|
|
21
|
+
* @default 'sm'
|
|
22
|
+
*/
|
|
23
|
+
gap?: CSpacing;
|
|
24
|
+
/**
|
|
25
|
+
* Controls arrangement of label and value within each item. `horizontal` renders label and value side by side, `vertical` stacks label on top of value
|
|
26
|
+
* @default 'horizontal'
|
|
27
|
+
*/
|
|
28
|
+
orientation?: 'horizontal' | 'vertical';
|
|
29
|
+
/**
|
|
30
|
+
* Adds border between items
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
withDivider?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Controls min-width of the label (dt) element, any valid CSS value
|
|
36
|
+
* @default '120px'
|
|
37
|
+
*/
|
|
38
|
+
labelWidth?: Properties['minWidth'];
|
|
39
|
+
}
|
|
40
|
+
export type DataListFactory = Factory<{
|
|
41
|
+
props: DataListProps;
|
|
42
|
+
ref: HTMLDivElement;
|
|
43
|
+
stylesNames: DataListStylesNames;
|
|
44
|
+
vars: DataListCssVariables;
|
|
45
|
+
staticComponents: {
|
|
46
|
+
Item: typeof DataListItem;
|
|
47
|
+
ItemLabel: typeof DataListItemLabel;
|
|
48
|
+
ItemValue: typeof DataListItemValue;
|
|
49
|
+
};
|
|
50
|
+
}>;
|