@cck-ui/core 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/indicator/get-position-variables/get-position-variables.cjs +47 -0
- package/cjs/components/indicator/get-position-variables/get-position-variables.cjs.map +1 -0
- package/cjs/components/indicator/index.cjs +14 -0
- package/cjs/components/indicator/index.cjs.map +1 -0
- package/cjs/components/indicator/indicator.cjs +496 -0
- package/cjs/components/indicator/indicator.cjs.map +1 -0
- package/cjs/components/indicator/indicator.module.cjs +11 -0
- package/cjs/components/indicator/indicator.module.cjs.map +1 -0
- package/cjs/components/indicator/indicator.utils.cjs +27 -0
- package/cjs/components/indicator/indicator.utils.cjs.map +1 -0
- package/cjs/components/kbd/index.cjs +14 -0
- package/cjs/components/kbd/index.cjs.map +1 -0
- package/cjs/components/kbd/kbd.cjs +396 -0
- package/cjs/components/kbd/kbd.cjs.map +1 -0
- package/cjs/components/kbd/kbd.module.cjs +7 -0
- package/cjs/components/kbd/kbd.module.cjs.map +1 -0
- package/cjs/components/kbd/kbd.utils.cjs +8 -0
- package/cjs/components/kbd/kbd.utils.cjs.map +1 -0
- package/cjs/index.cjs +35 -29
- package/cjs/index.cjs.map +1 -1
- package/esm/components/indicator/get-position-variables/get-position-variables.mjs +47 -0
- package/esm/components/indicator/get-position-variables/get-position-variables.mjs.map +1 -0
- package/esm/components/indicator/index.mjs +11 -0
- package/esm/components/indicator/index.mjs.map +1 -0
- package/esm/components/indicator/indicator.mjs +496 -0
- package/esm/components/indicator/indicator.mjs.map +1 -0
- package/esm/components/indicator/indicator.module.mjs +11 -0
- package/esm/components/indicator/indicator.module.mjs.map +1 -0
- package/esm/components/indicator/indicator.utils.mjs +27 -0
- package/esm/components/indicator/indicator.utils.mjs.map +1 -0
- package/esm/components/kbd/index.mjs +11 -0
- package/esm/components/kbd/index.mjs.map +1 -0
- package/esm/components/kbd/kbd.mjs +396 -0
- package/esm/components/kbd/kbd.mjs.map +1 -0
- package/esm/components/kbd/kbd.module.mjs +7 -0
- package/esm/components/kbd/kbd.module.mjs.map +1 -0
- package/esm/components/kbd/kbd.utils.mjs +9 -0
- package/esm/components/kbd/kbd.utils.mjs.map +1 -0
- package/esm/index.mjs +5 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/indicator/get-position-variables/get-position-variables.d.ts +5 -0
- package/lib/components/indicator/index.d.ts +6 -0
- package/lib/components/indicator/indicator.types.d.ts +82 -0
- package/lib/components/indicator/indicator.utils.d.ts +6 -0
- package/lib/components/kbd/index.d.ts +6 -0
- package/lib/components/kbd/kbd.types.d.ts +18 -0
- package/lib/components/kbd/kbd.utils.d.ts +6 -0
- package/package.json +1 -1
- package/styles/indicator.css +64 -0
- package/styles/indicator.layer.css +65 -0
- package/styles/kbd.css +31 -0
- package/styles/kbd.layer.css +32 -0
- package/styles.css +97 -0
- package/styles.layer.css +97 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_rem = require("../../../core/utils/units-converters/rem.cjs");
|
|
3
|
+
//#region packages/@cck-ui/core/src/components/indicator/get-position-variables/get-position-variables.ts
|
|
4
|
+
function getPositionVariables(_position = "top-end", offset = 0) {
|
|
5
|
+
const variables = {
|
|
6
|
+
"--indicator-top": void 0,
|
|
7
|
+
"--indicator-bottom": void 0,
|
|
8
|
+
"--indicator-left": void 0,
|
|
9
|
+
"--indicator-right": void 0,
|
|
10
|
+
"--indicator-translate-x": void 0,
|
|
11
|
+
"--indicator-translate-y": void 0
|
|
12
|
+
};
|
|
13
|
+
const offsetX = typeof offset === "number" ? offset : offset.x;
|
|
14
|
+
const offsetY = typeof offset === "number" ? offset : offset.y;
|
|
15
|
+
const _offsetX = require_rem.rem(offsetX);
|
|
16
|
+
const _offsetY = require_rem.rem(offsetY);
|
|
17
|
+
const [position, placement] = _position.split("-");
|
|
18
|
+
if (position === "top") {
|
|
19
|
+
variables["--indicator-top"] = _offsetY;
|
|
20
|
+
variables["--indicator-translate-y"] = "-50%";
|
|
21
|
+
}
|
|
22
|
+
if (position === "middle") {
|
|
23
|
+
variables["--indicator-top"] = "50%";
|
|
24
|
+
variables["--indicator-translate-y"] = "-50%";
|
|
25
|
+
}
|
|
26
|
+
if (position === "bottom") {
|
|
27
|
+
variables["--indicator-bottom"] = _offsetY;
|
|
28
|
+
variables["--indicator-translate-y"] = "50%";
|
|
29
|
+
}
|
|
30
|
+
if (placement === "start") {
|
|
31
|
+
variables["--indicator-left"] = _offsetX;
|
|
32
|
+
variables["--indicator-translate-x"] = "-50%";
|
|
33
|
+
}
|
|
34
|
+
if (placement === "center") {
|
|
35
|
+
variables["--indicator-left"] = "50%";
|
|
36
|
+
variables["--indicator-translate-x"] = "-50%";
|
|
37
|
+
}
|
|
38
|
+
if (placement === "end") {
|
|
39
|
+
variables["--indicator-right"] = _offsetX;
|
|
40
|
+
variables["--indicator-translate-x"] = "50%";
|
|
41
|
+
}
|
|
42
|
+
return variables;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.getPositionVariables = getPositionVariables;
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=get-position-variables.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-position-variables.cjs","names":["rem"],"sources":["../../../../src/components/indicator/get-position-variables/get-position-variables.ts"],"sourcesContent":["import { rem } from '../../../core'\nimport type { IndicatorPosition, IndicatorPositionVariables } from '../indicator.types'\n\nexport function getPositionVariables(\n _position: IndicatorPosition = 'top-end',\n offset: number | { x: number; y: number } = 0\n) {\n const variables: Record<IndicatorPositionVariables, string | undefined> = {\n '--indicator-top': undefined,\n '--indicator-bottom': undefined,\n '--indicator-left': undefined,\n '--indicator-right': undefined,\n '--indicator-translate-x': undefined,\n '--indicator-translate-y': undefined,\n }\n\n const offsetX = typeof offset === 'number' ? offset : offset.x\n const offsetY = typeof offset === 'number' ? offset : offset.y\n\n const _offsetX = rem(offsetX)\n const _offsetY = rem(offsetY)\n const [position, placement] = _position.split('-')\n\n if (position === 'top') {\n variables['--indicator-top'] = _offsetY\n variables['--indicator-translate-y'] = '-50%'\n }\n\n if (position === 'middle') {\n variables['--indicator-top'] = '50%'\n variables['--indicator-translate-y'] = '-50%'\n }\n\n if (position === 'bottom') {\n variables['--indicator-bottom'] = _offsetY\n variables['--indicator-translate-y'] = '50%'\n }\n\n if (placement === 'start') {\n variables['--indicator-left'] = _offsetX\n variables['--indicator-translate-x'] = '-50%'\n }\n\n if (placement === 'center') {\n variables['--indicator-left'] = '50%'\n variables['--indicator-translate-x'] = '-50%'\n }\n\n if (placement === 'end') {\n variables['--indicator-right'] = _offsetX\n variables['--indicator-translate-x'] = '50%'\n }\n\n return variables\n}\n"],"mappings":";;;AAGA,SAAgB,qBACd,YAA+B,WAC/B,SAA4C,GAC5C;CACA,MAAM,YAAoE;EACxE,mBAAmB,KAAA;EACnB,sBAAsB,KAAA;EACtB,oBAAoB,KAAA;EACpB,qBAAqB,KAAA;EACrB,2BAA2B,KAAA;EAC3B,2BAA2B,KAAA;CAC7B;CAEA,MAAM,UAAU,OAAO,WAAW,WAAW,SAAS,OAAO;CAC7D,MAAM,UAAU,OAAO,WAAW,WAAW,SAAS,OAAO;CAE7D,MAAM,WAAWA,YAAAA,IAAI,OAAO;CAC5B,MAAM,WAAWA,YAAAA,IAAI,OAAO;CAC5B,MAAM,CAAC,UAAU,aAAa,UAAU,MAAM,GAAG;CAEjD,IAAI,aAAa,OAAO;EACtB,UAAU,qBAAqB;EAC/B,UAAU,6BAA6B;CACzC;CAEA,IAAI,aAAa,UAAU;EACzB,UAAU,qBAAqB;EAC/B,UAAU,6BAA6B;CACzC;CAEA,IAAI,aAAa,UAAU;EACzB,UAAU,wBAAwB;EAClC,UAAU,6BAA6B;CACzC;CAEA,IAAI,cAAc,SAAS;EACzB,UAAU,sBAAsB;EAChC,UAAU,6BAA6B;CACzC;CAEA,IAAI,cAAc,UAAU;EAC1B,UAAU,sBAAsB;EAChC,UAAU,6BAA6B;CACzC;CAEA,IAAI,cAAc,OAAO;EACvB,UAAU,uBAAuB;EACjC,UAAU,6BAA6B;CACzC;CAEA,OAAO;AACT"}
|
|
@@ -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_indicator_module = require("./indicator.module.cjs");
|
|
5
|
+
const require_indicator_utils = require("./indicator.utils.cjs");
|
|
6
|
+
const require_indicator = require("./indicator.cjs");
|
|
7
|
+
//#region packages/@cck-ui/core/src/components/indicator/index.ts
|
|
8
|
+
const IndicatorWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_indicator.default, require_indicator_module.default), require_indicator_utils.varsResolver)));
|
|
9
|
+
const CIndicator = require_install.withInstall(IndicatorWithStatic);
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.CIndicator = CIndicator;
|
|
12
|
+
exports.default = CIndicator;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","Indicator","classes","varsResolver","withInstall"],"sources":["../../../src/components/indicator/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport classes from './indicator.module.css'\nimport { varsResolver } from './indicator.utils'\nimport Indicator from './indicator.vue'\n\nconst IndicatorWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Indicator, classes), varsResolver))\n)\n\nexport const CIndicator: SFCWithInstallAndClasses<typeof Indicator, typeof classes> =\n withInstall(IndicatorWithStatic)\n\nexport default CIndicator\n\nexport * from './indicator.types'\n"],"mappings":";;;;;;;AAYA,MAAM,sBAAsBA,gBAAAA,iBAC1BC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,kBAAAA,SAAWC,yBAAAA,OAAO,GAAGC,wBAAAA,YAAY,CAAC,CAC5E;AAEA,MAAa,aACXC,gBAAAA,YAAY,mBAAmB"}
|
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_index = require("../../core/utils/types/index.cjs");
|
|
3
|
+
const require_export_helper = require("../../_virtual/_/plugin-vue/export-helper.cjs");
|
|
4
|
+
const require_use_component_props = require("../../core/config-provider/use-component-props/use-component-props.cjs");
|
|
5
|
+
const require_index$1 = require("../../core/box/index.cjs");
|
|
6
|
+
const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
|
|
7
|
+
const require_indicator_module = require("./indicator.module.cjs");
|
|
8
|
+
const require_indicator_utils = require("./indicator.utils.cjs");
|
|
9
|
+
let vue = require("vue");
|
|
10
|
+
//#region packages/@cck-ui/core/src/components/indicator/indicator.vue
|
|
11
|
+
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
12
|
+
name: "CIndicator",
|
|
13
|
+
__name: "indicator",
|
|
14
|
+
props: {
|
|
15
|
+
position: {
|
|
16
|
+
type: null,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
19
|
+
offset: {
|
|
20
|
+
type: [Number, Object],
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
inline: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
type: [Number, String],
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
required: false
|
|
34
|
+
},
|
|
35
|
+
radius: {
|
|
36
|
+
type: null,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
color: {
|
|
40
|
+
type: null,
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
withBorder: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
required: false
|
|
50
|
+
},
|
|
51
|
+
processing: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
required: false
|
|
54
|
+
},
|
|
55
|
+
zIndex: {
|
|
56
|
+
type: String,
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
autoContrast: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
63
|
+
maxValue: {
|
|
64
|
+
type: Number,
|
|
65
|
+
required: false
|
|
66
|
+
},
|
|
67
|
+
showZero: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
className: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
75
|
+
style: {
|
|
76
|
+
type: [
|
|
77
|
+
Object,
|
|
78
|
+
Function,
|
|
79
|
+
Array
|
|
80
|
+
],
|
|
81
|
+
required: false,
|
|
82
|
+
skipCheck: true
|
|
83
|
+
},
|
|
84
|
+
__vars: {
|
|
85
|
+
type: null,
|
|
86
|
+
required: false
|
|
87
|
+
},
|
|
88
|
+
__size: {
|
|
89
|
+
type: String,
|
|
90
|
+
required: false
|
|
91
|
+
},
|
|
92
|
+
hiddenFrom: {
|
|
93
|
+
type: null,
|
|
94
|
+
required: false
|
|
95
|
+
},
|
|
96
|
+
visibleFrom: {
|
|
97
|
+
type: null,
|
|
98
|
+
required: false
|
|
99
|
+
},
|
|
100
|
+
lightHidden: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
required: false
|
|
103
|
+
},
|
|
104
|
+
darkHidden: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
required: false
|
|
107
|
+
},
|
|
108
|
+
mod: {
|
|
109
|
+
type: [
|
|
110
|
+
Object,
|
|
111
|
+
String,
|
|
112
|
+
Array
|
|
113
|
+
],
|
|
114
|
+
required: false
|
|
115
|
+
},
|
|
116
|
+
m: {
|
|
117
|
+
type: null,
|
|
118
|
+
required: false
|
|
119
|
+
},
|
|
120
|
+
my: {
|
|
121
|
+
type: null,
|
|
122
|
+
required: false
|
|
123
|
+
},
|
|
124
|
+
mx: {
|
|
125
|
+
type: null,
|
|
126
|
+
required: false
|
|
127
|
+
},
|
|
128
|
+
mt: {
|
|
129
|
+
type: null,
|
|
130
|
+
required: false
|
|
131
|
+
},
|
|
132
|
+
mb: {
|
|
133
|
+
type: null,
|
|
134
|
+
required: false
|
|
135
|
+
},
|
|
136
|
+
ms: {
|
|
137
|
+
type: null,
|
|
138
|
+
required: false
|
|
139
|
+
},
|
|
140
|
+
me: {
|
|
141
|
+
type: null,
|
|
142
|
+
required: false
|
|
143
|
+
},
|
|
144
|
+
mis: {
|
|
145
|
+
type: null,
|
|
146
|
+
required: false
|
|
147
|
+
},
|
|
148
|
+
mie: {
|
|
149
|
+
type: null,
|
|
150
|
+
required: false
|
|
151
|
+
},
|
|
152
|
+
ml: {
|
|
153
|
+
type: null,
|
|
154
|
+
required: false
|
|
155
|
+
},
|
|
156
|
+
mr: {
|
|
157
|
+
type: null,
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
160
|
+
p: {
|
|
161
|
+
type: null,
|
|
162
|
+
required: false
|
|
163
|
+
},
|
|
164
|
+
py: {
|
|
165
|
+
type: null,
|
|
166
|
+
required: false
|
|
167
|
+
},
|
|
168
|
+
px: {
|
|
169
|
+
type: null,
|
|
170
|
+
required: false
|
|
171
|
+
},
|
|
172
|
+
pt: {
|
|
173
|
+
type: null,
|
|
174
|
+
required: false
|
|
175
|
+
},
|
|
176
|
+
pb: {
|
|
177
|
+
type: null,
|
|
178
|
+
required: false
|
|
179
|
+
},
|
|
180
|
+
ps: {
|
|
181
|
+
type: null,
|
|
182
|
+
required: false
|
|
183
|
+
},
|
|
184
|
+
pe: {
|
|
185
|
+
type: null,
|
|
186
|
+
required: false
|
|
187
|
+
},
|
|
188
|
+
pis: {
|
|
189
|
+
type: null,
|
|
190
|
+
required: false
|
|
191
|
+
},
|
|
192
|
+
pie: {
|
|
193
|
+
type: null,
|
|
194
|
+
required: false
|
|
195
|
+
},
|
|
196
|
+
pl: {
|
|
197
|
+
type: null,
|
|
198
|
+
required: false
|
|
199
|
+
},
|
|
200
|
+
pr: {
|
|
201
|
+
type: null,
|
|
202
|
+
required: false
|
|
203
|
+
},
|
|
204
|
+
bd: {
|
|
205
|
+
type: null,
|
|
206
|
+
required: false
|
|
207
|
+
},
|
|
208
|
+
bdrs: {
|
|
209
|
+
type: null,
|
|
210
|
+
required: false
|
|
211
|
+
},
|
|
212
|
+
bg: {
|
|
213
|
+
type: null,
|
|
214
|
+
required: false
|
|
215
|
+
},
|
|
216
|
+
c: {
|
|
217
|
+
type: null,
|
|
218
|
+
required: false
|
|
219
|
+
},
|
|
220
|
+
opacity: {
|
|
221
|
+
type: [
|
|
222
|
+
String,
|
|
223
|
+
Object,
|
|
224
|
+
Number
|
|
225
|
+
],
|
|
226
|
+
required: false
|
|
227
|
+
},
|
|
228
|
+
ff: {
|
|
229
|
+
type: [String, Object],
|
|
230
|
+
required: false
|
|
231
|
+
},
|
|
232
|
+
fz: {
|
|
233
|
+
type: null,
|
|
234
|
+
required: false
|
|
235
|
+
},
|
|
236
|
+
fw: {
|
|
237
|
+
type: null,
|
|
238
|
+
required: false
|
|
239
|
+
},
|
|
240
|
+
lts: {
|
|
241
|
+
type: null,
|
|
242
|
+
required: false
|
|
243
|
+
},
|
|
244
|
+
ta: {
|
|
245
|
+
type: [String, Object],
|
|
246
|
+
required: false
|
|
247
|
+
},
|
|
248
|
+
lh: {
|
|
249
|
+
type: null,
|
|
250
|
+
required: false
|
|
251
|
+
},
|
|
252
|
+
fs: {
|
|
253
|
+
type: null,
|
|
254
|
+
required: false
|
|
255
|
+
},
|
|
256
|
+
tt: {
|
|
257
|
+
type: [String, Object],
|
|
258
|
+
required: false
|
|
259
|
+
},
|
|
260
|
+
td: {
|
|
261
|
+
type: null,
|
|
262
|
+
required: false
|
|
263
|
+
},
|
|
264
|
+
w: {
|
|
265
|
+
type: null,
|
|
266
|
+
required: false
|
|
267
|
+
},
|
|
268
|
+
miw: {
|
|
269
|
+
type: null,
|
|
270
|
+
required: false
|
|
271
|
+
},
|
|
272
|
+
maw: {
|
|
273
|
+
type: null,
|
|
274
|
+
required: false
|
|
275
|
+
},
|
|
276
|
+
h: {
|
|
277
|
+
type: null,
|
|
278
|
+
required: false
|
|
279
|
+
},
|
|
280
|
+
mih: {
|
|
281
|
+
type: null,
|
|
282
|
+
required: false
|
|
283
|
+
},
|
|
284
|
+
mah: {
|
|
285
|
+
type: null,
|
|
286
|
+
required: false
|
|
287
|
+
},
|
|
288
|
+
bgsz: {
|
|
289
|
+
type: null,
|
|
290
|
+
required: false
|
|
291
|
+
},
|
|
292
|
+
bgp: {
|
|
293
|
+
type: null,
|
|
294
|
+
required: false
|
|
295
|
+
},
|
|
296
|
+
bgr: {
|
|
297
|
+
type: null,
|
|
298
|
+
required: false
|
|
299
|
+
},
|
|
300
|
+
bga: {
|
|
301
|
+
type: null,
|
|
302
|
+
required: false
|
|
303
|
+
},
|
|
304
|
+
pos: {
|
|
305
|
+
type: [String, Object],
|
|
306
|
+
required: false
|
|
307
|
+
},
|
|
308
|
+
top: {
|
|
309
|
+
type: null,
|
|
310
|
+
required: false
|
|
311
|
+
},
|
|
312
|
+
left: {
|
|
313
|
+
type: null,
|
|
314
|
+
required: false
|
|
315
|
+
},
|
|
316
|
+
bottom: {
|
|
317
|
+
type: null,
|
|
318
|
+
required: false
|
|
319
|
+
},
|
|
320
|
+
right: {
|
|
321
|
+
type: null,
|
|
322
|
+
required: false
|
|
323
|
+
},
|
|
324
|
+
inset: {
|
|
325
|
+
type: null,
|
|
326
|
+
required: false
|
|
327
|
+
},
|
|
328
|
+
display: {
|
|
329
|
+
type: null,
|
|
330
|
+
required: false
|
|
331
|
+
},
|
|
332
|
+
flex: {
|
|
333
|
+
type: null,
|
|
334
|
+
required: false
|
|
335
|
+
},
|
|
336
|
+
unstyled: {
|
|
337
|
+
type: Boolean,
|
|
338
|
+
required: false
|
|
339
|
+
},
|
|
340
|
+
variant: {
|
|
341
|
+
type: null,
|
|
342
|
+
required: false
|
|
343
|
+
},
|
|
344
|
+
classNames: {
|
|
345
|
+
type: null,
|
|
346
|
+
required: false
|
|
347
|
+
},
|
|
348
|
+
styles: {
|
|
349
|
+
type: null,
|
|
350
|
+
required: false
|
|
351
|
+
},
|
|
352
|
+
vars: {
|
|
353
|
+
type: Function,
|
|
354
|
+
required: false
|
|
355
|
+
},
|
|
356
|
+
attributes: {
|
|
357
|
+
type: null,
|
|
358
|
+
required: false
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
setup(__props, { expose: __expose }) {
|
|
362
|
+
const _root = (0, vue.ref)(null);
|
|
363
|
+
const _indicator = (0, vue.ref)(null);
|
|
364
|
+
const attrs = (0, vue.useAttrs)();
|
|
365
|
+
const slots = (0, vue.useSlots)();
|
|
366
|
+
const rawProps = __props;
|
|
367
|
+
const defaultProps = {
|
|
368
|
+
position: "top-end",
|
|
369
|
+
offset: 0,
|
|
370
|
+
showZero: true
|
|
371
|
+
};
|
|
372
|
+
const props = require_use_component_props.useComponentProps({
|
|
373
|
+
component: "CIndicator",
|
|
374
|
+
defaultProps,
|
|
375
|
+
props: rawProps
|
|
376
|
+
});
|
|
377
|
+
const styleProps = (0, vue.computed)(() => ({
|
|
378
|
+
...props.value,
|
|
379
|
+
...attrs,
|
|
380
|
+
style: attrs.style ?? props.value.style
|
|
381
|
+
}));
|
|
382
|
+
const knownProps = [
|
|
383
|
+
"style",
|
|
384
|
+
"className",
|
|
385
|
+
"styles",
|
|
386
|
+
"classNames",
|
|
387
|
+
"unstyled",
|
|
388
|
+
"vars",
|
|
389
|
+
"position",
|
|
390
|
+
"offset",
|
|
391
|
+
"inline",
|
|
392
|
+
"label",
|
|
393
|
+
"radius",
|
|
394
|
+
"color",
|
|
395
|
+
"withBorder",
|
|
396
|
+
"disabled",
|
|
397
|
+
"processing",
|
|
398
|
+
"zIndex",
|
|
399
|
+
"autoContrast",
|
|
400
|
+
"maxValue",
|
|
401
|
+
"showZero",
|
|
402
|
+
"mod",
|
|
403
|
+
"attributes"
|
|
404
|
+
];
|
|
405
|
+
const getStyles = require_use_styles.useStyles({
|
|
406
|
+
name: "Indicator",
|
|
407
|
+
classes: require_indicator_module.default,
|
|
408
|
+
props: styleProps,
|
|
409
|
+
className: () => props.value.className,
|
|
410
|
+
style: () => props.value.style,
|
|
411
|
+
classNames: props.value.classNames,
|
|
412
|
+
styles: props.value.styles,
|
|
413
|
+
unstyled: props.value.unstyled,
|
|
414
|
+
attributes: props.value.attributes,
|
|
415
|
+
vars: props.value.vars,
|
|
416
|
+
varsResolver: require_indicator_utils.varsResolver
|
|
417
|
+
});
|
|
418
|
+
const modList = (0, vue.computed)(() => [{ inline: props.value.inline }]);
|
|
419
|
+
const rootAttrs = (0, vue.computed)(() => getStyles("root"));
|
|
420
|
+
const mergedRootAttrs = (0, vue.computed)(() => {
|
|
421
|
+
const others = {};
|
|
422
|
+
const propsValue = props.value;
|
|
423
|
+
for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
424
|
+
const userMod = props.value.mod;
|
|
425
|
+
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod], ...modList.value];
|
|
426
|
+
return {
|
|
427
|
+
...others,
|
|
428
|
+
mod: mergedMod,
|
|
429
|
+
...rootAttrs.value
|
|
430
|
+
};
|
|
431
|
+
});
|
|
432
|
+
const shouldHideZero = (0, vue.computed)(() => !props.value.showZero && Number(props.value.label) === 0);
|
|
433
|
+
const formattedLabel = (0, vue.computed)(() => props.value.maxValue !== void 0 && require_index.isNumber(props.value.label) && Number(props.value.label) > props.value.maxValue ? `${props.value.maxValue}+` : props.value.label);
|
|
434
|
+
const indicatorAttrs = (0, vue.computed)(() => getStyles("indicator"));
|
|
435
|
+
const mergedIndicatorAttrs = (0, vue.computed)(() => ({
|
|
436
|
+
mod: [
|
|
437
|
+
{ "with-label": !!props.value.label || !!slots.label },
|
|
438
|
+
{ "with-border": props.value.withBorder },
|
|
439
|
+
{ processing: props.value.processing }
|
|
440
|
+
],
|
|
441
|
+
...indicatorAttrs.value
|
|
442
|
+
}));
|
|
443
|
+
__expose({
|
|
444
|
+
root: (0, vue.computed)(() => _root.value?.root ?? null),
|
|
445
|
+
indicator: (0, vue.computed)(() => _indicator.value?.root ?? null)
|
|
446
|
+
});
|
|
447
|
+
const __returned__ = {
|
|
448
|
+
_root,
|
|
449
|
+
_indicator,
|
|
450
|
+
attrs,
|
|
451
|
+
slots,
|
|
452
|
+
rawProps,
|
|
453
|
+
defaultProps,
|
|
454
|
+
props,
|
|
455
|
+
styleProps,
|
|
456
|
+
knownProps,
|
|
457
|
+
getStyles,
|
|
458
|
+
modList,
|
|
459
|
+
rootAttrs,
|
|
460
|
+
mergedRootAttrs,
|
|
461
|
+
shouldHideZero,
|
|
462
|
+
formattedLabel,
|
|
463
|
+
indicatorAttrs,
|
|
464
|
+
mergedIndicatorAttrs,
|
|
465
|
+
get CBox() {
|
|
466
|
+
return require_index$1.CBox;
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
470
|
+
enumerable: false,
|
|
471
|
+
value: true
|
|
472
|
+
});
|
|
473
|
+
return __returned__;
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
const _hoisted_1 = ["innerHTML"];
|
|
477
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
478
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_root" }, $setup.mergedRootAttrs), {
|
|
479
|
+
default: (0, vue.withCtx)(() => [!$setup.props.disabled && !$setup.shouldHideZero ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
|
|
480
|
+
key: 0,
|
|
481
|
+
ref: "_indicator"
|
|
482
|
+
}, $setup.mergedIndicatorAttrs), {
|
|
483
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "label", {}, () => [$setup.formattedLabel != null ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
484
|
+
key: 0,
|
|
485
|
+
innerHTML: $setup.formattedLabel
|
|
486
|
+
}, null, 8, _hoisted_1)) : (0, vue.createCommentVNode)("v-if", true)])]),
|
|
487
|
+
_: 3
|
|
488
|
+
}, 16)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
489
|
+
_: 3
|
|
490
|
+
}, 16);
|
|
491
|
+
}
|
|
492
|
+
var indicator_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/indicator/indicator.vue"]]);
|
|
493
|
+
//#endregion
|
|
494
|
+
exports.default = indicator_default;
|
|
495
|
+
|
|
496
|
+
//# sourceMappingURL=indicator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.cjs","names":[],"sources":["../../../src/components/indicator/indicator.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_indicator\" v-bind=\"mergedIndicatorAttrs\" v-if=\"!props.disabled && !shouldHideZero\">\n <slot name=\"label\">\n <span v-html=\"formattedLabel\" v-if=\"formattedLabel != null\"></span>\n </slot>\n </c-box>\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, CStyleProp, isNumber, useComponentProps, useStyles } from '../../core'\nimport { IndicatorFactory, IndicatorProps } from './indicator.types'\nimport classes from './indicator.module.css'\nimport { varsResolver } from './indicator.utils'\n\ndefineOptions({\n name: 'CIndicator',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _indicator = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<IndicatorProps>()\n\nconst defaultProps = {\n position: 'top-end',\n offset: 0,\n showZero: true,\n} satisfies Partial<IndicatorProps>\n\nconst props = useComponentProps({\n component: 'CIndicator',\n defaultProps,\n props: rawProps,\n})\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst knownProps = [\n 'style',\n 'className',\n 'styles',\n 'classNames',\n 'unstyled',\n 'vars',\n 'position',\n 'offset',\n 'inline',\n 'label',\n 'radius',\n 'color',\n 'withBorder',\n 'disabled',\n 'processing',\n 'zIndex',\n 'autoContrast',\n 'maxValue',\n 'showZero',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<IndicatorFactory>({\n name: 'Indicator',\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\nconst modList = computed(() => [{ inline: props.value.inline }])\n\nconst rootAttrs = computed(() => getStyles('root'))\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]), ...modList.value]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst shouldHideZero = computed(() => !props.value.showZero && Number(props.value.label) === 0)\n\nconst formattedLabel = computed(() =>\n props.value.maxValue !== undefined &&\n isNumber(props.value.label) &&\n Number(props.value.label) > props.value.maxValue\n ? `${props.value.maxValue}+`\n : props.value.label\n)\n\nconst indicatorAttrs = computed(() => getStyles('indicator'))\nconst mergedIndicatorAttrs = computed(() => ({\n mod: [\n { 'with-label': !!props.value.label || !!slots.label },\n { 'with-border': props.value.withBorder },\n { processing: props.value.processing },\n ],\n ...indicatorAttrs.value,\n}))\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n indicator: computed(() => _indicator.value?.root ?? null),\n})\n</script>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region packages/@cck-ui/core/src/components/indicator/indicator.module.css
|
|
3
|
+
var indicator_module_default = {
|
|
4
|
+
"root": "m_20df55e0",
|
|
5
|
+
"indicator": "m_2b5957d1",
|
|
6
|
+
"processing": "m_7c93cd91"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.default = indicator_module_default;
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=indicator.module.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.module.cjs","names":[],"sources":["../../../src/components/indicator/indicator.module.css"],"sourcesContent":["@keyframes processing {\n 0% {\n opacity: 0.6;\n transform: scale(0);\n }\n\n 100% {\n opacity: 0;\n transform: scale(2.8);\n }\n}\n\n.root {\n --indicator-size: 10px;\n --indicator-color: var(--c-primary-color-filled);\n\n position: relative;\n display: block;\n\n &:where([data-inline]) {\n display: inline-block;\n }\n}\n\n.indicator {\n position: absolute;\n top: var(--indicator-top);\n left: var(--indicator-left);\n right: var(--indicator-right);\n bottom: var(--indicator-bottom);\n transform: translate(var(--indicator-translate-x), var(--indicator-translate-y));\n min-width: var(--indicator-size);\n height: var(--indicator-size);\n border-radius: var(--indicator-radius, 1000rem);\n z-index: var(--indicator-z-index, 200);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--c-font-size-xs);\n background-color: var(--indicator-color);\n color: var(--indicator-text-color, var(--c-color-white));\n white-space: nowrap;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background-color: var(--indicator-color);\n border-radius: var(--indicator-radius, 1000rem);\n z-index: -1;\n }\n\n &:where([data-with-label]) {\n padding-inline: calc(var(--c-spacing-xs) / 2);\n }\n\n &:where([data-with-border]) {\n border: 2px solid var(--c-color-body);\n }\n\n &[data-processing] {\n &::before {\n animation: processing 1000ms linear infinite;\n }\n }\n}\n"],"mappings":";;AAAA,IAAA,2BAAe;CAAC,QAAO;CAAa,aAAY;CAAa,cAAa;AAAY"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_rem = require("../../core/utils/units-converters/rem.cjs");
|
|
3
|
+
const require_get_size = require("../../core/utils/get-size/get-size.cjs");
|
|
4
|
+
const require_get_theme_color = require("../../core/config-provider/color-functions/get-theme-color/get-theme-color.cjs");
|
|
5
|
+
const require_get_contrast_color = require("../../core/config-provider/color-functions/get-contrast-color/get-contrast-color.cjs");
|
|
6
|
+
const require_create_vars_resolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
|
|
7
|
+
const require_get_position_variables = require("./get-position-variables/get-position-variables.cjs");
|
|
8
|
+
//#region packages/@cck-ui/core/src/components/indicator/indicator.utils.ts
|
|
9
|
+
const varsResolver = require_create_vars_resolver.createVarsResolver((theme, { color, position, offset, size, radius, zIndex, autoContrast }) => {
|
|
10
|
+
const ac = typeof autoContrast === "boolean" ? autoContrast : theme.autoContrast;
|
|
11
|
+
return { root: {
|
|
12
|
+
"--indicator-color": color ? require_get_theme_color.getThemeColor(color, theme) : void 0,
|
|
13
|
+
"--indicator-radius": radius === void 0 ? void 0 : require_get_size.getRadius(radius),
|
|
14
|
+
"--indicator-size": require_rem.rem(size),
|
|
15
|
+
"--indicator-text-color": ac ? require_get_contrast_color.getContrastColor({
|
|
16
|
+
color,
|
|
17
|
+
theme,
|
|
18
|
+
autoContrast: ac
|
|
19
|
+
}) : void 0,
|
|
20
|
+
"--indicator-z-index": zIndex?.toString(),
|
|
21
|
+
...require_get_position_variables.getPositionVariables(position, offset)
|
|
22
|
+
} };
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.varsResolver = varsResolver;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=indicator.utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.utils.cjs","names":["createVarsResolver","getThemeColor","getRadius","rem","getContrastColor","getPositionVariables"],"sources":["../../../src/components/indicator/indicator.utils.ts"],"sourcesContent":["import { createVarsResolver, getRadius, getThemeColor, rem } from '../../core'\nimport { getContrastColor } from '../../core/config-provider/color-functions/get-contrast-color/get-contrast-color'\nimport { getPositionVariables } from './get-position-variables/get-position-variables'\nimport { IndicatorFactory } from './indicator.types'\n\nexport const varsResolver = createVarsResolver<IndicatorFactory>(\n (theme, { color, position, offset, size, radius, zIndex, autoContrast }) => {\n const ac = typeof autoContrast === 'boolean' ? autoContrast : theme.autoContrast\n\n return {\n root: {\n '--indicator-color': color ? getThemeColor(color, theme) : undefined,\n '--indicator-radius': radius === undefined ? undefined : getRadius(radius),\n '--indicator-size': rem(size),\n '--indicator-text-color': ac\n ? getContrastColor({ color, theme, autoContrast: ac })\n : undefined,\n '--indicator-z-index': zIndex?.toString(),\n ...getPositionVariables(position, offset),\n },\n }\n }\n)\n"],"mappings":";;;;;;;;AAKA,MAAa,eAAeA,6BAAAA,oBACzB,OAAO,EAAE,OAAO,UAAU,QAAQ,MAAM,QAAQ,QAAQ,mBAAmB;CAC1E,MAAM,KAAK,OAAO,iBAAiB,YAAY,eAAe,MAAM;CAEpE,OAAO,EACL,MAAM;EACJ,qBAAqB,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;EAC3D,sBAAsB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EACzE,oBAAoBC,YAAAA,IAAI,IAAI;EAC5B,0BAA0B,KACtBC,2BAAAA,iBAAiB;GAAE;GAAO;GAAO,cAAc;EAAG,CAAC,IACnD,KAAA;EACJ,uBAAuB,QAAQ,SAAS;EACxC,GAAGC,+BAAAA,qBAAqB,UAAU,MAAM;CAC1C,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_kbd_module = require("./kbd.module.cjs");
|
|
5
|
+
const require_kbd_utils = require("./kbd.utils.cjs");
|
|
6
|
+
const require_kbd = require("./kbd.cjs");
|
|
7
|
+
//#region packages/@cck-ui/core/src/components/kbd/index.ts
|
|
8
|
+
const KbdWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_kbd.default, require_kbd_module.default), require_kbd_utils.varsResolver)));
|
|
9
|
+
const CKbd = require_install.withInstall(KbdWithStatic);
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.CKbd = CKbd;
|
|
12
|
+
exports.default = CKbd;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","Kbd","classes","varsResolver","withInstall"],"sources":["../../../src/components/kbd/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport classes from './kbd.module.css'\nimport { varsResolver } from './kbd.utils'\nimport Kbd from './kbd.vue'\n\nconst KbdWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Kbd, classes), varsResolver))\n)\n\nexport const CKbd: SFCWithInstallAndClasses<typeof Kbd, typeof classes> = withInstall(KbdWithStatic)\n\nexport default CKbd\n\nexport * from './kbd.types'\n"],"mappings":";;;;;;;AAYA,MAAM,gBAAgBA,gBAAAA,iBACpBC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,YAAAA,SAAKC,mBAAAA,OAAO,GAAGC,kBAAAA,YAAY,CAAC,CACtE;AAEA,MAAa,OAA6DC,gBAAAA,YAAY,aAAa"}
|