@luminescent/ui 0.18.2 → 0.19.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/lib/index.qwik.cjs
CHANGED
|
@@ -291,9 +291,15 @@ const buttonColorClasses = {
|
|
|
291
291
|
bg: "bg-rose-700/90 border-rose-600"
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
const
|
|
294
|
+
const mobileSizeClasses = {
|
|
295
|
+
xs: {
|
|
296
|
+
base: "text-sm gap-1",
|
|
297
|
+
round: "rounded-md",
|
|
298
|
+
pad: "px-2 py-1",
|
|
299
|
+
equal: "p-1"
|
|
300
|
+
},
|
|
295
301
|
sm: {
|
|
296
|
-
base: "text-
|
|
302
|
+
base: "text-sm gap-2",
|
|
297
303
|
round: "rounded-md",
|
|
298
304
|
pad: "px-2.5 py-1.5",
|
|
299
305
|
equal: "p-1.5"
|
|
@@ -317,12 +323,45 @@ const sizeClasses = {
|
|
|
317
323
|
equal: "p-4"
|
|
318
324
|
}
|
|
319
325
|
};
|
|
326
|
+
const sizeClasses = {
|
|
327
|
+
xs: {
|
|
328
|
+
base: "sm:text-sm sm:gap-1",
|
|
329
|
+
round: "sm:rounded-md",
|
|
330
|
+
pad: "sm:px-2 sm:py-1",
|
|
331
|
+
equal: "sm:p-1"
|
|
332
|
+
},
|
|
333
|
+
sm: {
|
|
334
|
+
base: "sm:text-base sm:gap-2",
|
|
335
|
+
round: "sm:rounded-md",
|
|
336
|
+
pad: "sm:px-2.5 sm:py-1.5",
|
|
337
|
+
equal: "sm:p-1.5"
|
|
338
|
+
},
|
|
339
|
+
md: {
|
|
340
|
+
base: "sm:text-base sm:gap-3",
|
|
341
|
+
round: "sm:rounded-md",
|
|
342
|
+
pad: "sm:px-4 sm:py-2",
|
|
343
|
+
equal: "sm:p-2"
|
|
344
|
+
},
|
|
345
|
+
lg: {
|
|
346
|
+
base: "sm:text-lg sm:gap-3",
|
|
347
|
+
round: "sm:rounded-lg",
|
|
348
|
+
pad: "sm:px-6 sm:py-3",
|
|
349
|
+
equal: "sm:p-3"
|
|
350
|
+
},
|
|
351
|
+
xl: {
|
|
352
|
+
base: "sm:text-lg sm:gap-4",
|
|
353
|
+
round: "sm:rounded-xl",
|
|
354
|
+
pad: "sm:px-8 sm:py-4",
|
|
355
|
+
equal: "sm:p-4"
|
|
356
|
+
}
|
|
357
|
+
};
|
|
320
358
|
const buttonClass = "relative flex items-center gap-3 motion-safe:transition ease-in-out border text-gray-50 fill-gray-50 disabled:opacity-50 hover:shadow-lg motion-safe:active:scale-95 whitespace-nowrap touch-manipulation select-none text-center";
|
|
321
359
|
const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
322
360
|
const props1 = qwik._restProps(props, [
|
|
323
361
|
"color",
|
|
324
362
|
"transparent",
|
|
325
363
|
"size",
|
|
364
|
+
"mobilesize",
|
|
326
365
|
"round",
|
|
327
366
|
"square"
|
|
328
367
|
]);
|
|
@@ -331,10 +370,14 @@ const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
331
370
|
[buttonColorClasses[props.color ?? "darkgray"].bg]: !props.transparent,
|
|
332
371
|
"border-transparent": props.transparent,
|
|
333
372
|
[buttonColorClasses[props.color ?? "darkgray"].hover]: true,
|
|
373
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].base]: true,
|
|
334
374
|
[sizeClasses[props.size ?? "md"].base]: true,
|
|
375
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].round]: !props.round,
|
|
335
376
|
[sizeClasses[props.size ?? "md"].round]: !props.round,
|
|
336
377
|
"rounded-full": props.round,
|
|
378
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].pad]: !props.square,
|
|
337
379
|
[sizeClasses[props.size ?? "md"].pad]: !props.square,
|
|
380
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].equal]: props.square,
|
|
338
381
|
[sizeClasses[props.size ?? "md"].equal]: props.square,
|
|
339
382
|
...props1.class
|
|
340
383
|
};
|
|
@@ -348,6 +391,7 @@ const ButtonAnchor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
348
391
|
"color",
|
|
349
392
|
"transparent",
|
|
350
393
|
"size",
|
|
394
|
+
"mobilesize",
|
|
351
395
|
"round",
|
|
352
396
|
"square"
|
|
353
397
|
]);
|
|
@@ -356,10 +400,14 @@ const ButtonAnchor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
356
400
|
[buttonColorClasses[props.color ?? "darkgray"].bg]: !props.transparent,
|
|
357
401
|
"border-transparent": props.transparent,
|
|
358
402
|
[buttonColorClasses[props.color ?? "darkgray"].hover]: true,
|
|
403
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].base]: true,
|
|
359
404
|
[sizeClasses[props.size ?? "md"].base]: true,
|
|
405
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].round]: !props.round,
|
|
360
406
|
[sizeClasses[props.size ?? "md"].round]: !props.round,
|
|
361
407
|
"rounded-full": props.round,
|
|
408
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].pad]: !props.square,
|
|
362
409
|
[sizeClasses[props.size ?? "md"].pad]: !props.square,
|
|
410
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].equal]: props.square,
|
|
363
411
|
[sizeClasses[props.size ?? "md"].equal]: props.square,
|
|
364
412
|
...props1.class
|
|
365
413
|
};
|
|
@@ -797,7 +845,8 @@ const ColorPicker = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
797
845
|
});
|
|
798
846
|
const setColor = /* @__PURE__ */ qwik.inlinedQrl((color) => {
|
|
799
847
|
const [maxHue2, props2, store2, width2] = qwik.useLexicalScope();
|
|
800
|
-
if (!color.match(/^#[0-9A-F]{6}$/i))
|
|
848
|
+
if (!color.match(/^#[0-9A-F]{6}$/i))
|
|
849
|
+
return;
|
|
801
850
|
const number = hexStringToNumber(color);
|
|
802
851
|
const hsv = rgbToHsv(hexNumberToRgb(number));
|
|
803
852
|
store2.hue.position = hsv.h * maxHue2;
|
|
@@ -903,7 +952,8 @@ const ColorPicker = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
903
952
|
], "p0.id"),
|
|
904
953
|
onInput$: /* @__PURE__ */ qwik.inlinedQrl((e, el) => {
|
|
905
954
|
const [setColor2] = qwik.useLexicalScope();
|
|
906
|
-
if (!el.dataset.value)
|
|
955
|
+
if (!el.dataset.value)
|
|
956
|
+
return;
|
|
907
957
|
setColor2(el.dataset.value);
|
|
908
958
|
}, "ColorPicker_component_div_onInput_61AfRqNB51A", [
|
|
909
959
|
setColor
|
|
@@ -1082,182 +1132,6 @@ const ColorPicker = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
1082
1132
|
], 1, null)
|
|
1083
1133
|
], 1, "sj_4");
|
|
1084
1134
|
}, "ColorPicker_component_D1OSB6ycLrI"));
|
|
1085
|
-
const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
1086
|
-
const props1 = qwik._restProps(props, [
|
|
1087
|
-
"onInput$",
|
|
1088
|
-
"value",
|
|
1089
|
-
"color",
|
|
1090
|
-
"colors",
|
|
1091
|
-
"preview",
|
|
1092
|
-
"horizontal",
|
|
1093
|
-
"class",
|
|
1094
|
-
"showInput"
|
|
1095
|
-
]);
|
|
1096
|
-
const store = qwik.useStore({
|
|
1097
|
-
opened: false
|
|
1098
|
-
});
|
|
1099
|
-
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
1100
|
-
class: "relative"
|
|
1101
|
-
}, [
|
|
1102
|
-
/* @__PURE__ */ qwik._jsxQ("label", {
|
|
1103
|
-
for: qwik._wrapSignal(props1, "id")
|
|
1104
|
-
}, {
|
|
1105
|
-
class: "text-gray-300 pb-1 flex select-none"
|
|
1106
|
-
}, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0s_0"), 1, null),
|
|
1107
|
-
/* @__PURE__ */ qwik._jsxQ("div", {
|
|
1108
|
-
class: {
|
|
1109
|
-
"flex": true,
|
|
1110
|
-
"flex-row gap-1": (props.preview ?? "left") == "left",
|
|
1111
|
-
"flex-row-reverse gap-1": (props.preview ?? "left") == "right",
|
|
1112
|
-
"flex-col": (props.preview ?? "left") == "top",
|
|
1113
|
-
"flex-col-reverse": (props.preview ?? "left") == "bottom"
|
|
1114
|
-
}
|
|
1115
|
-
}, null, [
|
|
1116
|
-
(props.preview ?? "left") != "full" && /* @__PURE__ */ qwik._jsxQ("div", {
|
|
1117
|
-
id: `${props1.id}-preview`,
|
|
1118
|
-
class: {
|
|
1119
|
-
"border border-gray-700": true,
|
|
1120
|
-
"w-9 rounded-md": (props.preview ?? "left") == "left" || (props.preview ?? "left") == "right",
|
|
1121
|
-
"w-full h-3": (props.preview ?? "left") == "top" || (props.preview ?? "left") == "bottom",
|
|
1122
|
-
"rounded-t-md": (props.preview ?? "left") == "top",
|
|
1123
|
-
"rounded-b-md": (props.preview ?? "left") == "bottom"
|
|
1124
|
-
}
|
|
1125
|
-
}, {
|
|
1126
|
-
style: qwik._fnSignal((p0) => ({
|
|
1127
|
-
backgroundColor: `${p0.value ?? "#000000"}`
|
|
1128
|
-
}), [
|
|
1129
|
-
props
|
|
1130
|
-
], '{backgroundColor:`${p0.value??"#000000"}`}')
|
|
1131
|
-
}, null, 3, "0s_1"),
|
|
1132
|
-
/* @__PURE__ */ qwik._jsxC(TextInputRaw, {
|
|
1133
|
-
get class() {
|
|
1134
|
-
return {
|
|
1135
|
-
"border-t-0 rounded-t-none": (props.preview ?? "left") == "top",
|
|
1136
|
-
"border-b-0 rounded-b-none": (props.preview ?? "left") == "bottom",
|
|
1137
|
-
...props.class
|
|
1138
|
-
};
|
|
1139
|
-
},
|
|
1140
|
-
...props1,
|
|
1141
|
-
get value() {
|
|
1142
|
-
return props.value ?? "#000000";
|
|
1143
|
-
},
|
|
1144
|
-
get color() {
|
|
1145
|
-
return props.color;
|
|
1146
|
-
},
|
|
1147
|
-
onFocus$: /* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
1148
|
-
const [props12, store2] = qwik.useLexicalScope();
|
|
1149
|
-
const abortController = new AbortController();
|
|
1150
|
-
document.addEventListener("click", (e) => {
|
|
1151
|
-
if (e.target instanceof HTMLElement && !e.target.closest(`#${props12.id}-popup`) && !e.target.closest(`#${props12.id}`)) {
|
|
1152
|
-
store2.opened = false;
|
|
1153
|
-
abortController.abort();
|
|
1154
|
-
}
|
|
1155
|
-
}, {
|
|
1156
|
-
signal: abortController.signal
|
|
1157
|
-
});
|
|
1158
|
-
store2.opened = true;
|
|
1159
|
-
}, "ColorInput_component_div_div_TextInputRaw_onFocus_Vqaw9AH9HEM", [
|
|
1160
|
-
props1,
|
|
1161
|
-
store
|
|
1162
|
-
]),
|
|
1163
|
-
onInput$: /* @__PURE__ */ qwik.inlinedQrl((e, el) => {
|
|
1164
|
-
const [props12] = qwik.useLexicalScope();
|
|
1165
|
-
const div = document.getElementById(`${props12.id}-popup`);
|
|
1166
|
-
div.dataset.value = el.value;
|
|
1167
|
-
div.dispatchEvent(new Event("input"));
|
|
1168
|
-
}, "ColorInput_component_div_div_TextInputRaw_onInput_Z1LFYfy6bG8", [
|
|
1169
|
-
props1
|
|
1170
|
-
]),
|
|
1171
|
-
style: (props.preview ?? "left") == "full" ? {
|
|
1172
|
-
backgroundColor: `${props.value ?? "#000000"}`,
|
|
1173
|
-
color: getBrightness(hexNumberToRgb(hexStringToNumber(props.value ?? "#000000"))) > 0.5 ? "black" : "white"
|
|
1174
|
-
} : {},
|
|
1175
|
-
[qwik._IMMUTABLE]: {
|
|
1176
|
-
class: qwik._fnSignal((p0) => ({
|
|
1177
|
-
"border-t-0 rounded-t-none": (p0.preview ?? "left") == "top",
|
|
1178
|
-
"border-b-0 rounded-b-none": (p0.preview ?? "left") == "bottom",
|
|
1179
|
-
...p0.class
|
|
1180
|
-
}), [
|
|
1181
|
-
props
|
|
1182
|
-
], '{"border-t-0 rounded-t-none":(p0.preview??"left")=="top","border-b-0 rounded-b-none":(p0.preview??"left")=="bottom",...p0.class}'),
|
|
1183
|
-
value: qwik._fnSignal((p0) => p0.value ?? "#000000", [
|
|
1184
|
-
props
|
|
1185
|
-
], 'p0.value??"#000000"'),
|
|
1186
|
-
color: qwik._fnSignal((p0) => p0.color, [
|
|
1187
|
-
props
|
|
1188
|
-
], "p0.color")
|
|
1189
|
-
}
|
|
1190
|
-
}, 0, "0s_2")
|
|
1191
|
-
], 1, null),
|
|
1192
|
-
/* @__PURE__ */ qwik._jsxC(ColorPicker, {
|
|
1193
|
-
id: `${props1.id}-popup`,
|
|
1194
|
-
get value() {
|
|
1195
|
-
return props.value ?? "#000000";
|
|
1196
|
-
},
|
|
1197
|
-
get color() {
|
|
1198
|
-
return props.color;
|
|
1199
|
-
},
|
|
1200
|
-
get colors() {
|
|
1201
|
-
return props.colors;
|
|
1202
|
-
},
|
|
1203
|
-
get preview() {
|
|
1204
|
-
return props.preview ?? "left";
|
|
1205
|
-
},
|
|
1206
|
-
get horizontal() {
|
|
1207
|
-
return props.horizontal;
|
|
1208
|
-
},
|
|
1209
|
-
get showInput() {
|
|
1210
|
-
return props.showInput ?? false;
|
|
1211
|
-
},
|
|
1212
|
-
get class() {
|
|
1213
|
-
return {
|
|
1214
|
-
"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
1215
|
-
"opacity-0 scale-95 pointer-events-none": !store.opened
|
|
1216
|
-
};
|
|
1217
|
-
},
|
|
1218
|
-
onInput$: /* @__PURE__ */ qwik.inlinedQrl((color) => {
|
|
1219
|
-
const [props12, props2] = qwik.useLexicalScope();
|
|
1220
|
-
const el = document.getElementById(props12.id);
|
|
1221
|
-
const previewel = document.getElementById(`${props12.id}-preview`);
|
|
1222
|
-
el.value = color;
|
|
1223
|
-
if ((props2.preview ?? "left") == "full") {
|
|
1224
|
-
el.style.backgroundColor = color;
|
|
1225
|
-
el.style.color = getBrightness(hexNumberToRgb(hexStringToNumber(color))) > 0.5 ? "black" : "white";
|
|
1226
|
-
} else previewel.style.backgroundColor = color;
|
|
1227
|
-
props2.onInput$?.(color);
|
|
1228
|
-
}, "ColorInput_component_div_ColorPicker_onInput_iZguRdHILBQ", [
|
|
1229
|
-
props1,
|
|
1230
|
-
props
|
|
1231
|
-
]),
|
|
1232
|
-
[qwik._IMMUTABLE]: {
|
|
1233
|
-
value: qwik._fnSignal((p0) => p0.value ?? "#000000", [
|
|
1234
|
-
props
|
|
1235
|
-
], 'p0.value??"#000000"'),
|
|
1236
|
-
color: qwik._fnSignal((p0) => p0.color, [
|
|
1237
|
-
props
|
|
1238
|
-
], "p0.color"),
|
|
1239
|
-
colors: qwik._fnSignal((p0) => p0.colors, [
|
|
1240
|
-
props
|
|
1241
|
-
], "p0.colors"),
|
|
1242
|
-
preview: qwik._fnSignal((p0) => p0.preview ?? "left", [
|
|
1243
|
-
props
|
|
1244
|
-
], 'p0.preview??"left"'),
|
|
1245
|
-
horizontal: qwik._fnSignal((p0) => p0.horizontal, [
|
|
1246
|
-
props
|
|
1247
|
-
], "p0.horizontal"),
|
|
1248
|
-
showInput: qwik._fnSignal((p0) => p0.showInput ?? false, [
|
|
1249
|
-
props
|
|
1250
|
-
], "p0.showInput??false"),
|
|
1251
|
-
class: qwik._fnSignal((p0) => ({
|
|
1252
|
-
"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
1253
|
-
"opacity-0 scale-95 pointer-events-none": !p0.opened
|
|
1254
|
-
}), [
|
|
1255
|
-
store
|
|
1256
|
-
], '{"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]":true,"opacity-0 scale-95 pointer-events-none":!p0.opened}')
|
|
1257
|
-
}
|
|
1258
|
-
}, 3, "0s_3")
|
|
1259
|
-
], 1, "0s_4");
|
|
1260
|
-
}, "ColorInput_component_jilGo0Bn3Ps"));
|
|
1261
1135
|
const ChevronDown = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
1262
1136
|
return /* @__PURE__ */ qwik._jsxS("svg", {
|
|
1263
1137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1600,35 +1474,37 @@ const Header = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
1600
1474
|
}, 3, "dL_2"), 1, "dL_3")
|
|
1601
1475
|
], 1, null)
|
|
1602
1476
|
}, 1, "dL_4");
|
|
1603
|
-
if (props.subheader)
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
], "p0.subheader"), 3, null)
|
|
1612
|
-
], 1, "dL_5");
|
|
1613
|
-
if (props.loading !== void 0) Component = /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
1614
|
-
class: "flex"
|
|
1615
|
-
}, [
|
|
1616
|
-
Component,
|
|
1617
|
-
/* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
1618
|
-
class: qwik._fnSignal((p0) => ({
|
|
1619
|
-
"motion-safe:transition-all duration-200": true,
|
|
1620
|
-
"opacity-0": !p0.loading,
|
|
1621
|
-
"opacity-100": p0.loading
|
|
1622
|
-
}), [
|
|
1477
|
+
if (props.subheader)
|
|
1478
|
+
Component = /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
1479
|
+
class: "flex flex-col gap-1"
|
|
1480
|
+
}, [
|
|
1481
|
+
Component,
|
|
1482
|
+
/* @__PURE__ */ qwik._jsxQ("h3", null, {
|
|
1483
|
+
class: "flex items-center text-gray-400 text-sm"
|
|
1484
|
+
}, qwik._fnSignal((p0) => p0.subheader, [
|
|
1623
1485
|
props
|
|
1624
|
-
],
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1486
|
+
], "p0.subheader"), 3, null)
|
|
1487
|
+
], 1, "dL_5");
|
|
1488
|
+
if (props.loading !== void 0)
|
|
1489
|
+
Component = /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
1490
|
+
class: "flex"
|
|
1491
|
+
}, [
|
|
1492
|
+
Component,
|
|
1493
|
+
/* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
1494
|
+
class: qwik._fnSignal((p0) => ({
|
|
1495
|
+
"motion-safe:transition-all duration-200": true,
|
|
1496
|
+
"opacity-0": !p0.loading,
|
|
1497
|
+
"opacity-100": p0.loading
|
|
1498
|
+
}), [
|
|
1499
|
+
props
|
|
1500
|
+
], '{"motion-safe:transition-all duration-200":true,"opacity-0":!p0.loading,"opacity-100":p0.loading}')
|
|
1501
|
+
}, /* @__PURE__ */ qwik._jsxC(LoadingIcon, {
|
|
1502
|
+
width: 24,
|
|
1503
|
+
[qwik._IMMUTABLE]: {
|
|
1504
|
+
width: qwik._IMMUTABLE
|
|
1505
|
+
}
|
|
1506
|
+
}, 3, "dL_6"), 1, null)
|
|
1507
|
+
], 1, "dL_7");
|
|
1632
1508
|
return Component;
|
|
1633
1509
|
}, "Header_component_FfGOhhBNG5k"));
|
|
1634
1510
|
const navColorClasses = {
|
|
@@ -1676,9 +1552,9 @@ const Nav = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((p
|
|
|
1676
1552
|
children: [
|
|
1677
1553
|
/* @__PURE__ */ qwik._jsxQ("div", {
|
|
1678
1554
|
class: {
|
|
1679
|
-
"sm:hidden motion-safe:transition-all flex flex-col px-2 items-center absolute w-full": true,
|
|
1680
|
-
"
|
|
1681
|
-
"opacity-0
|
|
1555
|
+
"sm:hidden motion-safe:transition-all flex flex-col px-2 items-center absolute w-full top-full": true,
|
|
1556
|
+
"mt-2": menu.value,
|
|
1557
|
+
"opacity-0 pointer-events-none": !menu.value,
|
|
1682
1558
|
"before:backdrop-blur-lg": props.color !== "transparent",
|
|
1683
1559
|
'before:absolute before:content-[""] before:w-full before:h-full before:drop-shadow-xl before:-z-10 before:rounded-lg': true
|
|
1684
1560
|
}
|
|
@@ -2816,7 +2692,6 @@ exports.Blobs = Blobs;
|
|
|
2816
2692
|
exports.Button = Button;
|
|
2817
2693
|
exports.ButtonAnchor = ButtonAnchor;
|
|
2818
2694
|
exports.Card = Card;
|
|
2819
|
-
exports.ColorInput = ColorInput;
|
|
2820
2695
|
exports.ColorPicker = ColorPicker;
|
|
2821
2696
|
exports.Dropdown = Dropdown;
|
|
2822
2697
|
exports.DropdownRaw = DropdownRaw;
|
|
@@ -2848,6 +2723,7 @@ exports._auto_buttonClass = buttonClass;
|
|
|
2848
2723
|
exports.blobColorClasses = blobColorClasses;
|
|
2849
2724
|
exports.buttonColorClasses = buttonColorClasses;
|
|
2850
2725
|
exports.cardColorClasses = cardColorClasses;
|
|
2726
|
+
exports.mobileSizeClasses = mobileSizeClasses;
|
|
2851
2727
|
exports.navColorClasses = navColorClasses;
|
|
2852
2728
|
exports.sizeClasses = sizeClasses;
|
|
2853
2729
|
exports.toggleOffColorClasses = toggleOffColorClasses;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -289,9 +289,15 @@ const buttonColorClasses = {
|
|
|
289
289
|
bg: "bg-rose-700/90 border-rose-600"
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
|
-
const
|
|
292
|
+
const mobileSizeClasses = {
|
|
293
|
+
xs: {
|
|
294
|
+
base: "text-sm gap-1",
|
|
295
|
+
round: "rounded-md",
|
|
296
|
+
pad: "px-2 py-1",
|
|
297
|
+
equal: "p-1"
|
|
298
|
+
},
|
|
293
299
|
sm: {
|
|
294
|
-
base: "text-
|
|
300
|
+
base: "text-sm gap-2",
|
|
295
301
|
round: "rounded-md",
|
|
296
302
|
pad: "px-2.5 py-1.5",
|
|
297
303
|
equal: "p-1.5"
|
|
@@ -315,12 +321,45 @@ const sizeClasses = {
|
|
|
315
321
|
equal: "p-4"
|
|
316
322
|
}
|
|
317
323
|
};
|
|
324
|
+
const sizeClasses = {
|
|
325
|
+
xs: {
|
|
326
|
+
base: "sm:text-sm sm:gap-1",
|
|
327
|
+
round: "sm:rounded-md",
|
|
328
|
+
pad: "sm:px-2 sm:py-1",
|
|
329
|
+
equal: "sm:p-1"
|
|
330
|
+
},
|
|
331
|
+
sm: {
|
|
332
|
+
base: "sm:text-base sm:gap-2",
|
|
333
|
+
round: "sm:rounded-md",
|
|
334
|
+
pad: "sm:px-2.5 sm:py-1.5",
|
|
335
|
+
equal: "sm:p-1.5"
|
|
336
|
+
},
|
|
337
|
+
md: {
|
|
338
|
+
base: "sm:text-base sm:gap-3",
|
|
339
|
+
round: "sm:rounded-md",
|
|
340
|
+
pad: "sm:px-4 sm:py-2",
|
|
341
|
+
equal: "sm:p-2"
|
|
342
|
+
},
|
|
343
|
+
lg: {
|
|
344
|
+
base: "sm:text-lg sm:gap-3",
|
|
345
|
+
round: "sm:rounded-lg",
|
|
346
|
+
pad: "sm:px-6 sm:py-3",
|
|
347
|
+
equal: "sm:p-3"
|
|
348
|
+
},
|
|
349
|
+
xl: {
|
|
350
|
+
base: "sm:text-lg sm:gap-4",
|
|
351
|
+
round: "sm:rounded-xl",
|
|
352
|
+
pad: "sm:px-8 sm:py-4",
|
|
353
|
+
equal: "sm:p-4"
|
|
354
|
+
}
|
|
355
|
+
};
|
|
318
356
|
const buttonClass = "relative flex items-center gap-3 motion-safe:transition ease-in-out border text-gray-50 fill-gray-50 disabled:opacity-50 hover:shadow-lg motion-safe:active:scale-95 whitespace-nowrap touch-manipulation select-none text-center";
|
|
319
357
|
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
320
358
|
const props1 = _restProps(props, [
|
|
321
359
|
"color",
|
|
322
360
|
"transparent",
|
|
323
361
|
"size",
|
|
362
|
+
"mobilesize",
|
|
324
363
|
"round",
|
|
325
364
|
"square"
|
|
326
365
|
]);
|
|
@@ -329,10 +368,14 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
329
368
|
[buttonColorClasses[props.color ?? "darkgray"].bg]: !props.transparent,
|
|
330
369
|
"border-transparent": props.transparent,
|
|
331
370
|
[buttonColorClasses[props.color ?? "darkgray"].hover]: true,
|
|
371
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].base]: true,
|
|
332
372
|
[sizeClasses[props.size ?? "md"].base]: true,
|
|
373
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].round]: !props.round,
|
|
333
374
|
[sizeClasses[props.size ?? "md"].round]: !props.round,
|
|
334
375
|
"rounded-full": props.round,
|
|
376
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].pad]: !props.square,
|
|
335
377
|
[sizeClasses[props.size ?? "md"].pad]: !props.square,
|
|
378
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].equal]: props.square,
|
|
336
379
|
[sizeClasses[props.size ?? "md"].equal]: props.square,
|
|
337
380
|
...props1.class
|
|
338
381
|
};
|
|
@@ -346,6 +389,7 @@ const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
346
389
|
"color",
|
|
347
390
|
"transparent",
|
|
348
391
|
"size",
|
|
392
|
+
"mobilesize",
|
|
349
393
|
"round",
|
|
350
394
|
"square"
|
|
351
395
|
]);
|
|
@@ -354,10 +398,14 @@ const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
354
398
|
[buttonColorClasses[props.color ?? "darkgray"].bg]: !props.transparent,
|
|
355
399
|
"border-transparent": props.transparent,
|
|
356
400
|
[buttonColorClasses[props.color ?? "darkgray"].hover]: true,
|
|
401
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].base]: true,
|
|
357
402
|
[sizeClasses[props.size ?? "md"].base]: true,
|
|
403
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].round]: !props.round,
|
|
358
404
|
[sizeClasses[props.size ?? "md"].round]: !props.round,
|
|
359
405
|
"rounded-full": props.round,
|
|
406
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].pad]: !props.square,
|
|
360
407
|
[sizeClasses[props.size ?? "md"].pad]: !props.square,
|
|
408
|
+
[mobileSizeClasses[props.mobilesize ? props.mobilesize : (props.size ?? "md") == "xs" ? "xs" : (props.size ?? "md") == "sm" ? "xs" : (props.size ?? "md") == "md" ? "sm" : (props.size ?? "md") == "lg" ? "md" : (props.size ?? "md") == "xl" ? "lg" : "md"].equal]: props.square,
|
|
361
409
|
[sizeClasses[props.size ?? "md"].equal]: props.square,
|
|
362
410
|
...props1.class
|
|
363
411
|
};
|
|
@@ -795,7 +843,8 @@ const ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
795
843
|
});
|
|
796
844
|
const setColor = /* @__PURE__ */ inlinedQrl((color) => {
|
|
797
845
|
const [maxHue2, props2, store2, width2] = useLexicalScope();
|
|
798
|
-
if (!color.match(/^#[0-9A-F]{6}$/i))
|
|
846
|
+
if (!color.match(/^#[0-9A-F]{6}$/i))
|
|
847
|
+
return;
|
|
799
848
|
const number = hexStringToNumber(color);
|
|
800
849
|
const hsv = rgbToHsv(hexNumberToRgb(number));
|
|
801
850
|
store2.hue.position = hsv.h * maxHue2;
|
|
@@ -901,7 +950,8 @@ const ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
901
950
|
], "p0.id"),
|
|
902
951
|
onInput$: /* @__PURE__ */ inlinedQrl((e, el) => {
|
|
903
952
|
const [setColor2] = useLexicalScope();
|
|
904
|
-
if (!el.dataset.value)
|
|
953
|
+
if (!el.dataset.value)
|
|
954
|
+
return;
|
|
905
955
|
setColor2(el.dataset.value);
|
|
906
956
|
}, "ColorPicker_component_div_onInput_61AfRqNB51A", [
|
|
907
957
|
setColor
|
|
@@ -1080,182 +1130,6 @@ const ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
1080
1130
|
], 1, null)
|
|
1081
1131
|
], 1, "sj_4");
|
|
1082
1132
|
}, "ColorPicker_component_D1OSB6ycLrI"));
|
|
1083
|
-
const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1084
|
-
const props1 = _restProps(props, [
|
|
1085
|
-
"onInput$",
|
|
1086
|
-
"value",
|
|
1087
|
-
"color",
|
|
1088
|
-
"colors",
|
|
1089
|
-
"preview",
|
|
1090
|
-
"horizontal",
|
|
1091
|
-
"class",
|
|
1092
|
-
"showInput"
|
|
1093
|
-
]);
|
|
1094
|
-
const store = useStore({
|
|
1095
|
-
opened: false
|
|
1096
|
-
});
|
|
1097
|
-
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1098
|
-
class: "relative"
|
|
1099
|
-
}, [
|
|
1100
|
-
/* @__PURE__ */ _jsxQ("label", {
|
|
1101
|
-
for: _wrapSignal(props1, "id")
|
|
1102
|
-
}, {
|
|
1103
|
-
class: "text-gray-300 pb-1 flex select-none"
|
|
1104
|
-
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "0s_0"), 1, null),
|
|
1105
|
-
/* @__PURE__ */ _jsxQ("div", {
|
|
1106
|
-
class: {
|
|
1107
|
-
"flex": true,
|
|
1108
|
-
"flex-row gap-1": (props.preview ?? "left") == "left",
|
|
1109
|
-
"flex-row-reverse gap-1": (props.preview ?? "left") == "right",
|
|
1110
|
-
"flex-col": (props.preview ?? "left") == "top",
|
|
1111
|
-
"flex-col-reverse": (props.preview ?? "left") == "bottom"
|
|
1112
|
-
}
|
|
1113
|
-
}, null, [
|
|
1114
|
-
(props.preview ?? "left") != "full" && /* @__PURE__ */ _jsxQ("div", {
|
|
1115
|
-
id: `${props1.id}-preview`,
|
|
1116
|
-
class: {
|
|
1117
|
-
"border border-gray-700": true,
|
|
1118
|
-
"w-9 rounded-md": (props.preview ?? "left") == "left" || (props.preview ?? "left") == "right",
|
|
1119
|
-
"w-full h-3": (props.preview ?? "left") == "top" || (props.preview ?? "left") == "bottom",
|
|
1120
|
-
"rounded-t-md": (props.preview ?? "left") == "top",
|
|
1121
|
-
"rounded-b-md": (props.preview ?? "left") == "bottom"
|
|
1122
|
-
}
|
|
1123
|
-
}, {
|
|
1124
|
-
style: _fnSignal((p0) => ({
|
|
1125
|
-
backgroundColor: `${p0.value ?? "#000000"}`
|
|
1126
|
-
}), [
|
|
1127
|
-
props
|
|
1128
|
-
], '{backgroundColor:`${p0.value??"#000000"}`}')
|
|
1129
|
-
}, null, 3, "0s_1"),
|
|
1130
|
-
/* @__PURE__ */ _jsxC(TextInputRaw, {
|
|
1131
|
-
get class() {
|
|
1132
|
-
return {
|
|
1133
|
-
"border-t-0 rounded-t-none": (props.preview ?? "left") == "top",
|
|
1134
|
-
"border-b-0 rounded-b-none": (props.preview ?? "left") == "bottom",
|
|
1135
|
-
...props.class
|
|
1136
|
-
};
|
|
1137
|
-
},
|
|
1138
|
-
...props1,
|
|
1139
|
-
get value() {
|
|
1140
|
-
return props.value ?? "#000000";
|
|
1141
|
-
},
|
|
1142
|
-
get color() {
|
|
1143
|
-
return props.color;
|
|
1144
|
-
},
|
|
1145
|
-
onFocus$: /* @__PURE__ */ inlinedQrl(() => {
|
|
1146
|
-
const [props12, store2] = useLexicalScope();
|
|
1147
|
-
const abortController = new AbortController();
|
|
1148
|
-
document.addEventListener("click", (e) => {
|
|
1149
|
-
if (e.target instanceof HTMLElement && !e.target.closest(`#${props12.id}-popup`) && !e.target.closest(`#${props12.id}`)) {
|
|
1150
|
-
store2.opened = false;
|
|
1151
|
-
abortController.abort();
|
|
1152
|
-
}
|
|
1153
|
-
}, {
|
|
1154
|
-
signal: abortController.signal
|
|
1155
|
-
});
|
|
1156
|
-
store2.opened = true;
|
|
1157
|
-
}, "ColorInput_component_div_div_TextInputRaw_onFocus_Vqaw9AH9HEM", [
|
|
1158
|
-
props1,
|
|
1159
|
-
store
|
|
1160
|
-
]),
|
|
1161
|
-
onInput$: /* @__PURE__ */ inlinedQrl((e, el) => {
|
|
1162
|
-
const [props12] = useLexicalScope();
|
|
1163
|
-
const div = document.getElementById(`${props12.id}-popup`);
|
|
1164
|
-
div.dataset.value = el.value;
|
|
1165
|
-
div.dispatchEvent(new Event("input"));
|
|
1166
|
-
}, "ColorInput_component_div_div_TextInputRaw_onInput_Z1LFYfy6bG8", [
|
|
1167
|
-
props1
|
|
1168
|
-
]),
|
|
1169
|
-
style: (props.preview ?? "left") == "full" ? {
|
|
1170
|
-
backgroundColor: `${props.value ?? "#000000"}`,
|
|
1171
|
-
color: getBrightness(hexNumberToRgb(hexStringToNumber(props.value ?? "#000000"))) > 0.5 ? "black" : "white"
|
|
1172
|
-
} : {},
|
|
1173
|
-
[_IMMUTABLE]: {
|
|
1174
|
-
class: _fnSignal((p0) => ({
|
|
1175
|
-
"border-t-0 rounded-t-none": (p0.preview ?? "left") == "top",
|
|
1176
|
-
"border-b-0 rounded-b-none": (p0.preview ?? "left") == "bottom",
|
|
1177
|
-
...p0.class
|
|
1178
|
-
}), [
|
|
1179
|
-
props
|
|
1180
|
-
], '{"border-t-0 rounded-t-none":(p0.preview??"left")=="top","border-b-0 rounded-b-none":(p0.preview??"left")=="bottom",...p0.class}'),
|
|
1181
|
-
value: _fnSignal((p0) => p0.value ?? "#000000", [
|
|
1182
|
-
props
|
|
1183
|
-
], 'p0.value??"#000000"'),
|
|
1184
|
-
color: _fnSignal((p0) => p0.color, [
|
|
1185
|
-
props
|
|
1186
|
-
], "p0.color")
|
|
1187
|
-
}
|
|
1188
|
-
}, 0, "0s_2")
|
|
1189
|
-
], 1, null),
|
|
1190
|
-
/* @__PURE__ */ _jsxC(ColorPicker, {
|
|
1191
|
-
id: `${props1.id}-popup`,
|
|
1192
|
-
get value() {
|
|
1193
|
-
return props.value ?? "#000000";
|
|
1194
|
-
},
|
|
1195
|
-
get color() {
|
|
1196
|
-
return props.color;
|
|
1197
|
-
},
|
|
1198
|
-
get colors() {
|
|
1199
|
-
return props.colors;
|
|
1200
|
-
},
|
|
1201
|
-
get preview() {
|
|
1202
|
-
return props.preview ?? "left";
|
|
1203
|
-
},
|
|
1204
|
-
get horizontal() {
|
|
1205
|
-
return props.horizontal;
|
|
1206
|
-
},
|
|
1207
|
-
get showInput() {
|
|
1208
|
-
return props.showInput ?? false;
|
|
1209
|
-
},
|
|
1210
|
-
get class() {
|
|
1211
|
-
return {
|
|
1212
|
-
"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
1213
|
-
"opacity-0 scale-95 pointer-events-none": !store.opened
|
|
1214
|
-
};
|
|
1215
|
-
},
|
|
1216
|
-
onInput$: /* @__PURE__ */ inlinedQrl((color) => {
|
|
1217
|
-
const [props12, props2] = useLexicalScope();
|
|
1218
|
-
const el = document.getElementById(props12.id);
|
|
1219
|
-
const previewel = document.getElementById(`${props12.id}-preview`);
|
|
1220
|
-
el.value = color;
|
|
1221
|
-
if ((props2.preview ?? "left") == "full") {
|
|
1222
|
-
el.style.backgroundColor = color;
|
|
1223
|
-
el.style.color = getBrightness(hexNumberToRgb(hexStringToNumber(color))) > 0.5 ? "black" : "white";
|
|
1224
|
-
} else previewel.style.backgroundColor = color;
|
|
1225
|
-
props2.onInput$?.(color);
|
|
1226
|
-
}, "ColorInput_component_div_ColorPicker_onInput_iZguRdHILBQ", [
|
|
1227
|
-
props1,
|
|
1228
|
-
props
|
|
1229
|
-
]),
|
|
1230
|
-
[_IMMUTABLE]: {
|
|
1231
|
-
value: _fnSignal((p0) => p0.value ?? "#000000", [
|
|
1232
|
-
props
|
|
1233
|
-
], 'p0.value??"#000000"'),
|
|
1234
|
-
color: _fnSignal((p0) => p0.color, [
|
|
1235
|
-
props
|
|
1236
|
-
], "p0.color"),
|
|
1237
|
-
colors: _fnSignal((p0) => p0.colors, [
|
|
1238
|
-
props
|
|
1239
|
-
], "p0.colors"),
|
|
1240
|
-
preview: _fnSignal((p0) => p0.preview ?? "left", [
|
|
1241
|
-
props
|
|
1242
|
-
], 'p0.preview??"left"'),
|
|
1243
|
-
horizontal: _fnSignal((p0) => p0.horizontal, [
|
|
1244
|
-
props
|
|
1245
|
-
], "p0.horizontal"),
|
|
1246
|
-
showInput: _fnSignal((p0) => p0.showInput ?? false, [
|
|
1247
|
-
props
|
|
1248
|
-
], "p0.showInput??false"),
|
|
1249
|
-
class: _fnSignal((p0) => ({
|
|
1250
|
-
"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
1251
|
-
"opacity-0 scale-95 pointer-events-none": !p0.opened
|
|
1252
|
-
}), [
|
|
1253
|
-
store
|
|
1254
|
-
], '{"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]":true,"opacity-0 scale-95 pointer-events-none":!p0.opened}')
|
|
1255
|
-
}
|
|
1256
|
-
}, 3, "0s_3")
|
|
1257
|
-
], 1, "0s_4");
|
|
1258
|
-
}, "ColorInput_component_jilGo0Bn3Ps"));
|
|
1259
1133
|
const ChevronDown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1260
1134
|
return /* @__PURE__ */ _jsxS("svg", {
|
|
1261
1135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1598,35 +1472,37 @@ const Header = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1598
1472
|
}, 3, "dL_2"), 1, "dL_3")
|
|
1599
1473
|
], 1, null)
|
|
1600
1474
|
}, 1, "dL_4");
|
|
1601
|
-
if (props.subheader)
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
], "p0.subheader"), 3, null)
|
|
1610
|
-
], 1, "dL_5");
|
|
1611
|
-
if (props.loading !== void 0) Component = /* @__PURE__ */ _jsxQ("div", null, {
|
|
1612
|
-
class: "flex"
|
|
1613
|
-
}, [
|
|
1614
|
-
Component,
|
|
1615
|
-
/* @__PURE__ */ _jsxQ("div", null, {
|
|
1616
|
-
class: _fnSignal((p0) => ({
|
|
1617
|
-
"motion-safe:transition-all duration-200": true,
|
|
1618
|
-
"opacity-0": !p0.loading,
|
|
1619
|
-
"opacity-100": p0.loading
|
|
1620
|
-
}), [
|
|
1475
|
+
if (props.subheader)
|
|
1476
|
+
Component = /* @__PURE__ */ _jsxQ("div", null, {
|
|
1477
|
+
class: "flex flex-col gap-1"
|
|
1478
|
+
}, [
|
|
1479
|
+
Component,
|
|
1480
|
+
/* @__PURE__ */ _jsxQ("h3", null, {
|
|
1481
|
+
class: "flex items-center text-gray-400 text-sm"
|
|
1482
|
+
}, _fnSignal((p0) => p0.subheader, [
|
|
1621
1483
|
props
|
|
1622
|
-
],
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1484
|
+
], "p0.subheader"), 3, null)
|
|
1485
|
+
], 1, "dL_5");
|
|
1486
|
+
if (props.loading !== void 0)
|
|
1487
|
+
Component = /* @__PURE__ */ _jsxQ("div", null, {
|
|
1488
|
+
class: "flex"
|
|
1489
|
+
}, [
|
|
1490
|
+
Component,
|
|
1491
|
+
/* @__PURE__ */ _jsxQ("div", null, {
|
|
1492
|
+
class: _fnSignal((p0) => ({
|
|
1493
|
+
"motion-safe:transition-all duration-200": true,
|
|
1494
|
+
"opacity-0": !p0.loading,
|
|
1495
|
+
"opacity-100": p0.loading
|
|
1496
|
+
}), [
|
|
1497
|
+
props
|
|
1498
|
+
], '{"motion-safe:transition-all duration-200":true,"opacity-0":!p0.loading,"opacity-100":p0.loading}')
|
|
1499
|
+
}, /* @__PURE__ */ _jsxC(LoadingIcon, {
|
|
1500
|
+
width: 24,
|
|
1501
|
+
[_IMMUTABLE]: {
|
|
1502
|
+
width: _IMMUTABLE
|
|
1503
|
+
}
|
|
1504
|
+
}, 3, "dL_6"), 1, null)
|
|
1505
|
+
], 1, "dL_7");
|
|
1630
1506
|
return Component;
|
|
1631
1507
|
}, "Header_component_FfGOhhBNG5k"));
|
|
1632
1508
|
const navColorClasses = {
|
|
@@ -1674,9 +1550,9 @@ const Nav = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
|
1674
1550
|
children: [
|
|
1675
1551
|
/* @__PURE__ */ _jsxQ("div", {
|
|
1676
1552
|
class: {
|
|
1677
|
-
"sm:hidden motion-safe:transition-all flex flex-col px-2 items-center absolute w-full": true,
|
|
1678
|
-
"
|
|
1679
|
-
"opacity-0
|
|
1553
|
+
"sm:hidden motion-safe:transition-all flex flex-col px-2 items-center absolute w-full top-full": true,
|
|
1554
|
+
"mt-2": menu.value,
|
|
1555
|
+
"opacity-0 pointer-events-none": !menu.value,
|
|
1680
1556
|
"before:backdrop-blur-lg": props.color !== "transparent",
|
|
1681
1557
|
'before:absolute before:content-[""] before:w-full before:h-full before:drop-shadow-xl before:-z-10 before:rounded-lg': true
|
|
1682
1558
|
}
|
|
@@ -2815,7 +2691,6 @@ export {
|
|
|
2815
2691
|
Button,
|
|
2816
2692
|
ButtonAnchor,
|
|
2817
2693
|
Card,
|
|
2818
|
-
ColorInput,
|
|
2819
2694
|
ColorPicker,
|
|
2820
2695
|
Dropdown,
|
|
2821
2696
|
DropdownRaw,
|
|
@@ -2847,6 +2722,7 @@ export {
|
|
|
2847
2722
|
blobColorClasses,
|
|
2848
2723
|
buttonColorClasses,
|
|
2849
2724
|
cardColorClasses,
|
|
2725
|
+
mobileSizeClasses,
|
|
2850
2726
|
navColorClasses,
|
|
2851
2727
|
sizeClasses,
|
|
2852
2728
|
toggleOffColorClasses,
|
|
@@ -97,7 +97,45 @@ export declare const buttonColorClasses: {
|
|
|
97
97
|
bg: string;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
+
export declare const mobileSizeClasses: {
|
|
101
|
+
xs: {
|
|
102
|
+
base: string;
|
|
103
|
+
round: string;
|
|
104
|
+
pad: string;
|
|
105
|
+
equal: string;
|
|
106
|
+
};
|
|
107
|
+
sm: {
|
|
108
|
+
base: string;
|
|
109
|
+
round: string;
|
|
110
|
+
pad: string;
|
|
111
|
+
equal: string;
|
|
112
|
+
};
|
|
113
|
+
md: {
|
|
114
|
+
base: string;
|
|
115
|
+
round: string;
|
|
116
|
+
pad: string;
|
|
117
|
+
equal: string;
|
|
118
|
+
};
|
|
119
|
+
lg: {
|
|
120
|
+
base: string;
|
|
121
|
+
round: string;
|
|
122
|
+
pad: string;
|
|
123
|
+
equal: string;
|
|
124
|
+
};
|
|
125
|
+
xl: {
|
|
126
|
+
base: string;
|
|
127
|
+
round: string;
|
|
128
|
+
pad: string;
|
|
129
|
+
equal: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
100
132
|
export declare const sizeClasses: {
|
|
133
|
+
xs: {
|
|
134
|
+
base: string;
|
|
135
|
+
round: string;
|
|
136
|
+
pad: string;
|
|
137
|
+
equal: string;
|
|
138
|
+
};
|
|
101
139
|
sm: {
|
|
102
140
|
base: string;
|
|
103
141
|
round: string;
|
|
@@ -127,6 +165,7 @@ interface GenericButtonProps {
|
|
|
127
165
|
color?: keyof typeof buttonColorClasses;
|
|
128
166
|
transparent?: boolean;
|
|
129
167
|
size?: keyof typeof sizeClasses;
|
|
168
|
+
mobilesize?: keyof typeof mobileSizeClasses;
|
|
130
169
|
round?: boolean;
|
|
131
170
|
square?: boolean;
|
|
132
171
|
class?: {
|
|
@@ -2,7 +2,6 @@ export * from './elements/Anchor';
|
|
|
2
2
|
export * from './elements/Blobs';
|
|
3
3
|
export * from './elements/Button';
|
|
4
4
|
export * from './elements/Card';
|
|
5
|
-
export * from './elements/ColorInput';
|
|
6
5
|
export * from './elements/ColorPicker';
|
|
7
6
|
export * from './elements/Dropdown';
|
|
8
7
|
export * from './elements/Header';
|