@pathscale/ui 0.0.108 → 0.0.110
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/dist/components/colorpicker/AlphaSlider.d.ts +7 -0
- package/dist/components/colorpicker/ColorInput.d.ts +7 -0
- package/dist/components/colorpicker/ColorPicker.d.ts +18 -0
- package/dist/components/colorpicker/ColorPreview.d.ts +11 -0
- package/dist/components/colorpicker/ColorSwatches.d.ts +8 -0
- package/dist/components/colorpicker/ColorUtils.d.ts +58 -0
- package/dist/components/colorpicker/ColorWheel.d.ts +7 -0
- package/dist/components/colorpicker/HueSlider.d.ts +7 -0
- package/dist/components/colorpicker/LightnessSlider.d.ts +7 -0
- package/dist/components/colorpicker/SaturationBrightness.d.ts +7 -0
- package/dist/components/colorpicker/colorpickerContext.d.ts +11 -0
- package/dist/components/colorpicker/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2212 -1047
- package/dist/stores/toastStore.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4794,7 +4794,7 @@ const xt = globalThis[ot], Se = {
|
|
|
4794
4794
|
cloneNode: 1,
|
|
4795
4795
|
children: 1,
|
|
4796
4796
|
key: 1
|
|
4797
|
-
},
|
|
4797
|
+
}, cally_q = {}, rt = [];
|
|
4798
4798
|
class at extends Text {
|
|
4799
4799
|
}
|
|
4800
4800
|
const Ce = A("atomico/id"), $ = A("atomico/type"), X = A("atomico/ref"), zt = A("atomico/vnode"), Pe = ()=>{};
|
|
@@ -4802,7 +4802,7 @@ function Ne(e, t, n) {
|
|
|
4802
4802
|
return Kt(this, e, t, n);
|
|
4803
4803
|
}
|
|
4804
4804
|
const Ht = (e, t, ...n)=>{
|
|
4805
|
-
const s = t ||
|
|
4805
|
+
const s = t || cally_q;
|
|
4806
4806
|
let { children: r } = s;
|
|
4807
4807
|
if (r = r ?? (n.length ? n : rt), e === Pe) return r;
|
|
4808
4808
|
const o = e ? e instanceof Node ? 1 : e.prototype instanceof HTMLElement && 2 : 0;
|
|
@@ -4831,9 +4831,9 @@ function Kt(e, t, n = Ce, s, r) {
|
|
|
4831
4831
|
(e || !t) && (r = r || "svg" == e.type, o = "host" != e.type && (1 == e.raw ? (t && e.clone ? t[X] : t) != e.type : 2 == e.raw ? !(t instanceof e.type) : t ? t[X] || t.localName != e.type : !t), o && null != e.type && (1 == e.raw && e.clone ? (s = !0, t = e.type.cloneNode(!0), t[X] = e.type) : t = 1 == e.raw ? e.type : 2 == e.raw ? new e.type() : r ? document.createElementNS("http://www.w3.org/2000/svg", e.type) : document.createElement(e.type, e.is ? {
|
|
4832
4832
|
is: e.is
|
|
4833
4833
|
} : void 0)));
|
|
4834
|
-
const a = t[n] ? t[n] :
|
|
4834
|
+
const a = t[n] ? t[n] : cally_q, { vnode: u = cally_q, cycle: i = 0 } = a;
|
|
4835
4835
|
let { fragment: l, handlers: c } = a;
|
|
4836
|
-
const { children: d = rt, props: f =
|
|
4836
|
+
const { children: d = rt, props: f = cally_q } = u;
|
|
4837
4837
|
if (c = o ? {} : c || {}, e.static && !o) return t;
|
|
4838
4838
|
if (e.shadow && !t.shadowRoot && t.attachShadow({
|
|
4839
4839
|
mode: "open",
|
|
@@ -4992,9 +4992,9 @@ const Re = Ht("host", {
|
|
|
4992
4992
|
}
|
|
4993
4993
|
});
|
|
4994
4994
|
return t.value = e, t;
|
|
4995
|
-
},
|
|
4995
|
+
}, cally_p = (e, t, n)=>(null == t ? t = {
|
|
4996
4996
|
key: n
|
|
4997
|
-
} : t.key = n, Ht(e, t)), I =
|
|
4997
|
+
} : t.key = n, Ht(e, t)), I = cally_p, Wt = H`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`, Jt = H`.vh{position:absolute;transform:scale(0)}`;
|
|
4998
4998
|
function lt() {
|
|
4999
4999
|
const e = /* @__PURE__ */ new Date();
|
|
5000
5000
|
return new cally_v(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
@@ -5284,7 +5284,7 @@ const We = (e, t)=>(t + e) % 7, Je = cally_j((e)=>{
|
|
|
5284
5284
|
shadowDom: !0,
|
|
5285
5285
|
focus: r,
|
|
5286
5286
|
children: [
|
|
5287
|
-
/* @__PURE__ */
|
|
5287
|
+
/* @__PURE__ */ cally_p("div", {
|
|
5288
5288
|
id: "h",
|
|
5289
5289
|
part: "heading",
|
|
5290
5290
|
children: s.formatter.format(w(s.yearMonth))
|
|
@@ -5294,18 +5294,18 @@ const We = (e, t)=>(t + e) % 7, Je = cally_j((e)=>{
|
|
|
5294
5294
|
"aria-labelledby": "h",
|
|
5295
5295
|
part: "table",
|
|
5296
5296
|
children: [
|
|
5297
|
-
/* @__PURE__ */
|
|
5298
|
-
children: /* @__PURE__ */
|
|
5297
|
+
/* @__PURE__ */ cally_p("thead", {
|
|
5298
|
+
children: /* @__PURE__ */ cally_p("tr", {
|
|
5299
5299
|
part: "tr head",
|
|
5300
5300
|
children: s.daysLong.map((o, a)=>/* @__PURE__ */ I("th", {
|
|
5301
5301
|
part: `th day day-${We(t.firstDayOfWeek, a)}`,
|
|
5302
5302
|
scope: "col",
|
|
5303
5303
|
children: [
|
|
5304
|
-
/* @__PURE__ */
|
|
5304
|
+
/* @__PURE__ */ cally_p("span", {
|
|
5305
5305
|
class: "vh",
|
|
5306
5306
|
children: o
|
|
5307
5307
|
}),
|
|
5308
|
-
/* @__PURE__ */
|
|
5308
|
+
/* @__PURE__ */ cally_p("span", {
|
|
5309
5309
|
"aria-hidden": "true",
|
|
5310
5310
|
children: s.daysVisible[a]
|
|
5311
5311
|
})
|
|
@@ -5313,14 +5313,14 @@ const We = (e, t)=>(t + e) % 7, Je = cally_j((e)=>{
|
|
|
5313
5313
|
}))
|
|
5314
5314
|
})
|
|
5315
5315
|
}),
|
|
5316
|
-
/* @__PURE__ */
|
|
5317
|
-
children: s.weeks.map((o, a)=>/* @__PURE__ */
|
|
5316
|
+
/* @__PURE__ */ cally_p("tbody", {
|
|
5317
|
+
children: s.weeks.map((o, a)=>/* @__PURE__ */ cally_p("tr", {
|
|
5318
5318
|
part: "tr week",
|
|
5319
5319
|
children: o.map((u, i)=>{
|
|
5320
5320
|
const l = s.getDayProps(u);
|
|
5321
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ cally_p("td", {
|
|
5322
5322
|
part: "td",
|
|
5323
|
-
children: l && /* @__PURE__ */
|
|
5323
|
+
children: l && /* @__PURE__ */ cally_p("button", {
|
|
5324
5324
|
...l,
|
|
5325
5325
|
children: u.day
|
|
5326
5326
|
})
|
|
@@ -5347,11 +5347,11 @@ const We = (e, t)=>(t + e) % 7, Je = cally_j((e)=>{
|
|
|
5347
5347
|
});
|
|
5348
5348
|
customElements.define("calendar-month", Je);
|
|
5349
5349
|
function kt(e) {
|
|
5350
|
-
return /* @__PURE__ */
|
|
5350
|
+
return /* @__PURE__ */ cally_p("button", {
|
|
5351
5351
|
part: `button ${e.name} ${e.onclick ? "" : "disabled"}`,
|
|
5352
5352
|
onclick: e.onclick,
|
|
5353
5353
|
"aria-disabled": e.onclick ? null : "true",
|
|
5354
|
-
children: /* @__PURE__ */
|
|
5354
|
+
children: /* @__PURE__ */ cally_p("slot", {
|
|
5355
5355
|
name: e.name,
|
|
5356
5356
|
children: e.children
|
|
5357
5357
|
})
|
|
@@ -5364,7 +5364,7 @@ function dt(e) {
|
|
|
5364
5364
|
"aria-labelledby": "h",
|
|
5365
5365
|
part: "container",
|
|
5366
5366
|
children: [
|
|
5367
|
-
/* @__PURE__ */
|
|
5367
|
+
/* @__PURE__ */ cally_p("div", {
|
|
5368
5368
|
id: "h",
|
|
5369
5369
|
class: "vh",
|
|
5370
5370
|
"aria-live": "polite",
|
|
@@ -5374,32 +5374,32 @@ function dt(e) {
|
|
|
5374
5374
|
/* @__PURE__ */ I("div", {
|
|
5375
5375
|
part: "header",
|
|
5376
5376
|
children: [
|
|
5377
|
-
/* @__PURE__ */
|
|
5377
|
+
/* @__PURE__ */ cally_p(kt, {
|
|
5378
5378
|
name: "previous",
|
|
5379
5379
|
onclick: e.previous,
|
|
5380
5380
|
children: "Previous"
|
|
5381
5381
|
}),
|
|
5382
|
-
/* @__PURE__ */
|
|
5382
|
+
/* @__PURE__ */ cally_p("slot", {
|
|
5383
5383
|
part: "heading",
|
|
5384
5384
|
name: "heading",
|
|
5385
|
-
children: /* @__PURE__ */
|
|
5385
|
+
children: /* @__PURE__ */ cally_p("div", {
|
|
5386
5386
|
"aria-hidden": "true",
|
|
5387
5387
|
children: e.format.formatRange(t, n)
|
|
5388
5388
|
})
|
|
5389
5389
|
}),
|
|
5390
|
-
/* @__PURE__ */
|
|
5390
|
+
/* @__PURE__ */ cally_p(kt, {
|
|
5391
5391
|
name: "next",
|
|
5392
5392
|
onclick: e.next,
|
|
5393
5393
|
children: "Next"
|
|
5394
5394
|
})
|
|
5395
5395
|
]
|
|
5396
5396
|
}),
|
|
5397
|
-
/* @__PURE__ */
|
|
5397
|
+
/* @__PURE__ */ cally_p(ft, {
|
|
5398
5398
|
value: e,
|
|
5399
5399
|
onselectday: e.onSelect,
|
|
5400
5400
|
onfocusday: e.onFocus,
|
|
5401
5401
|
onhoverday: e.onHover,
|
|
5402
|
-
children: /* @__PURE__ */
|
|
5402
|
+
children: /* @__PURE__ */ cally_p("slot", {})
|
|
5403
5403
|
})
|
|
5404
5404
|
]
|
|
5405
5405
|
});
|
|
@@ -5553,10 +5553,10 @@ const Qe = cally_j((e)=>{
|
|
|
5553
5553
|
function a(u) {
|
|
5554
5554
|
n(u.detail), o.dispatch();
|
|
5555
5555
|
}
|
|
5556
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ cally_p("host", {
|
|
5557
5557
|
shadowDom: !0,
|
|
5558
5558
|
focus: o.focus,
|
|
5559
|
-
children: /* @__PURE__ */
|
|
5559
|
+
children: /* @__PURE__ */ cally_p(dt, {
|
|
5560
5560
|
...e,
|
|
5561
5561
|
...o,
|
|
5562
5562
|
type: "date",
|
|
@@ -5595,10 +5595,10 @@ const Mt = (e, t)=>cally_v.compare(e, t) < 0 ? [
|
|
|
5595
5595
|
y.stopPropagation(), i ? (n(Mt(i, h)), l(void 0), u(w(h)), o.dispatch()) : (l(h), a(w(h)));
|
|
5596
5596
|
}
|
|
5597
5597
|
const g = i ? Mt(i, c ?? i) : t;
|
|
5598
|
-
return /* @__PURE__ */
|
|
5598
|
+
return /* @__PURE__ */ cally_p("host", {
|
|
5599
5599
|
shadowDom: !0,
|
|
5600
5600
|
focus: o.focus,
|
|
5601
|
-
children: /* @__PURE__ */
|
|
5601
|
+
children: /* @__PURE__ */ cally_p(dt, {
|
|
5602
5602
|
...e,
|
|
5603
5603
|
...o,
|
|
5604
5604
|
type: "range",
|
|
@@ -5631,10 +5631,10 @@ const tn = cally_j((e)=>{
|
|
|
5631
5631
|
], l = t.findIndex((c)=>c.equals(u.detail));
|
|
5632
5632
|
l < 0 ? i.push(u.detail) : i.splice(l, 1), n(i), o.dispatch();
|
|
5633
5633
|
}
|
|
5634
|
-
return /* @__PURE__ */
|
|
5634
|
+
return /* @__PURE__ */ cally_p("host", {
|
|
5635
5635
|
shadowDom: !0,
|
|
5636
5636
|
focus: o.focus,
|
|
5637
|
-
children: /* @__PURE__ */
|
|
5637
|
+
children: /* @__PURE__ */ cally_p(dt, {
|
|
5638
5638
|
...e,
|
|
5639
5639
|
...o,
|
|
5640
5640
|
type: "multi",
|
|
@@ -6250,289 +6250,1873 @@ const Checkbox = (props)=>{
|
|
|
6250
6250
|
})();
|
|
6251
6251
|
};
|
|
6252
6252
|
const checkbox_Checkbox = Checkbox;
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
const
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6253
|
+
const ColorPickerContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)(void 0);
|
|
6254
|
+
function useColorPickerContext() {
|
|
6255
|
+
const context = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(ColorPickerContext);
|
|
6256
|
+
if (!context) throw new Error("useColorPickerContext must be used within a ColorPickerContext.Provider");
|
|
6257
|
+
return context;
|
|
6258
|
+
}
|
|
6259
|
+
function hexToRgb(hex) {
|
|
6260
|
+
const cleaned = hex.replace(/^#/, "");
|
|
6261
|
+
if (3 === cleaned.length) {
|
|
6262
|
+
const r = Number.parseInt(cleaned[0] + cleaned[0], 16);
|
|
6263
|
+
const g = Number.parseInt(cleaned[1] + cleaned[1], 16);
|
|
6264
|
+
const b = Number.parseInt(cleaned[2] + cleaned[2], 16);
|
|
6265
|
+
return {
|
|
6266
|
+
r,
|
|
6267
|
+
g,
|
|
6268
|
+
b
|
|
6269
|
+
};
|
|
6270
|
+
}
|
|
6271
|
+
if (6 === cleaned.length) {
|
|
6272
|
+
const r = Number.parseInt(cleaned.substring(0, 2), 16);
|
|
6273
|
+
const g = Number.parseInt(cleaned.substring(2, 4), 16);
|
|
6274
|
+
const b = Number.parseInt(cleaned.substring(4, 6), 16);
|
|
6275
|
+
return {
|
|
6276
|
+
r,
|
|
6277
|
+
g,
|
|
6278
|
+
b
|
|
6279
|
+
};
|
|
6280
|
+
}
|
|
6281
|
+
return null;
|
|
6282
|
+
}
|
|
6283
|
+
function rgbToHex(r, g, b) {
|
|
6284
|
+
const toHex = (n)=>{
|
|
6285
|
+
const hex = Math.max(0, Math.min(255, Math.round(n))).toString(16);
|
|
6286
|
+
return 1 === hex.length ? `0${hex}` : hex;
|
|
6287
|
+
};
|
|
6288
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
6289
|
+
}
|
|
6290
|
+
function rgbToHsl(r, g, b) {
|
|
6291
|
+
const rNorm = r / 255;
|
|
6292
|
+
const gNorm = g / 255;
|
|
6293
|
+
const bNorm = b / 255;
|
|
6294
|
+
const max = Math.max(rNorm, gNorm, bNorm);
|
|
6295
|
+
const min = Math.min(rNorm, gNorm, bNorm);
|
|
6296
|
+
const delta = max - min;
|
|
6297
|
+
let h = 0;
|
|
6298
|
+
let s = 0;
|
|
6299
|
+
const l = (max + min) / 2;
|
|
6300
|
+
if (0 !== delta) {
|
|
6301
|
+
s = l > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
6302
|
+
switch(max){
|
|
6303
|
+
case rNorm:
|
|
6304
|
+
h = ((gNorm - bNorm) / delta + (gNorm < bNorm ? 6 : 0)) / 6;
|
|
6305
|
+
break;
|
|
6306
|
+
case gNorm:
|
|
6307
|
+
h = ((bNorm - rNorm) / delta + 2) / 6;
|
|
6308
|
+
break;
|
|
6309
|
+
case bNorm:
|
|
6310
|
+
h = ((rNorm - gNorm) / delta + 4) / 6;
|
|
6311
|
+
break;
|
|
6312
|
+
}
|
|
6313
|
+
}
|
|
6314
|
+
return {
|
|
6315
|
+
h: Math.round(360 * h),
|
|
6316
|
+
s: Math.round(100 * s),
|
|
6317
|
+
l: Math.round(100 * l)
|
|
6318
|
+
};
|
|
6319
|
+
}
|
|
6320
|
+
function hslToRgb(h, s, l) {
|
|
6321
|
+
const hNorm = h / 360;
|
|
6322
|
+
const sNorm = s / 100;
|
|
6323
|
+
const lNorm = l / 100;
|
|
6324
|
+
const hue2rgb = (p, q, t)=>{
|
|
6325
|
+
let tNorm = t;
|
|
6326
|
+
if (tNorm < 0) tNorm += 1;
|
|
6327
|
+
if (tNorm > 1) tNorm -= 1;
|
|
6328
|
+
if (tNorm < 1 / 6) return p + (q - p) * 6 * tNorm;
|
|
6329
|
+
if (tNorm < 0.5) return q;
|
|
6330
|
+
if (tNorm < 2 / 3) return p + (q - p) * (2 / 3 - tNorm) * 6;
|
|
6331
|
+
return p;
|
|
6332
|
+
};
|
|
6333
|
+
if (0 === sNorm) {
|
|
6334
|
+
const gray = Math.round(255 * lNorm);
|
|
6335
|
+
return {
|
|
6336
|
+
r: gray,
|
|
6337
|
+
g: gray,
|
|
6338
|
+
b: gray
|
|
6339
|
+
};
|
|
6340
|
+
}
|
|
6341
|
+
const q = lNorm < 0.5 ? lNorm * (1 + sNorm) : lNorm + sNorm - lNorm * sNorm;
|
|
6342
|
+
const p = 2 * lNorm - q;
|
|
6343
|
+
return {
|
|
6344
|
+
r: Math.round(255 * hue2rgb(p, q, hNorm + 1 / 3)),
|
|
6345
|
+
g: Math.round(255 * hue2rgb(p, q, hNorm)),
|
|
6346
|
+
b: Math.round(255 * hue2rgb(p, q, hNorm - 1 / 3))
|
|
6347
|
+
};
|
|
6348
|
+
}
|
|
6349
|
+
function parseColor(color) {
|
|
6350
|
+
const trimmed = color.trim();
|
|
6351
|
+
if (trimmed.startsWith("#")) {
|
|
6352
|
+
const rgb = hexToRgb(trimmed);
|
|
6353
|
+
if (!rgb) return null;
|
|
6354
|
+
const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
|
|
6355
|
+
return {
|
|
6356
|
+
rgb: {
|
|
6357
|
+
...rgb,
|
|
6358
|
+
a: 1
|
|
6269
6359
|
},
|
|
6270
|
-
|
|
6271
|
-
|
|
6360
|
+
hsl: {
|
|
6361
|
+
...hsl,
|
|
6362
|
+
a: 1
|
|
6272
6363
|
},
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
const
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(merged, [
|
|
6290
|
-
"dataPrefix",
|
|
6291
|
-
"status",
|
|
6292
|
-
"innerProps",
|
|
6293
|
-
"innerRef",
|
|
6294
|
-
"class",
|
|
6295
|
-
"children",
|
|
6296
|
-
"dataTheme"
|
|
6297
|
-
]);
|
|
6298
|
-
const statusClass = ()=>twMerge(dist_clsx({
|
|
6299
|
-
"bg-info": "info" === local.status,
|
|
6300
|
-
"bg-success": "success" === local.status,
|
|
6301
|
-
"bg-warning": "warning" === local.status,
|
|
6302
|
-
"bg-error": "error" === local.status,
|
|
6303
|
-
"text-info-content": "info" === local.status,
|
|
6304
|
-
"text-success-content": "success" === local.status,
|
|
6305
|
-
"text-warning-content": "warning" === local.status,
|
|
6306
|
-
"text-error-content": "error" === local.status
|
|
6307
|
-
}), local.class);
|
|
6308
|
-
const prefix = ()=>false !== local.dataPrefix ? local.dataPrefix || ">" : void 0;
|
|
6309
|
-
return (()=>{
|
|
6310
|
-
var _el$ = CodeMockupLine_tmpl$(), _el$2 = _el$.firstChild;
|
|
6311
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
6312
|
-
get ["class"] () {
|
|
6313
|
-
return statusClass();
|
|
6364
|
+
hex: trimmed
|
|
6365
|
+
};
|
|
6366
|
+
}
|
|
6367
|
+
const rgbMatch = trimmed.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)/);
|
|
6368
|
+
if (rgbMatch) {
|
|
6369
|
+
const r = Number.parseInt(rgbMatch[1], 10);
|
|
6370
|
+
const g = Number.parseInt(rgbMatch[2], 10);
|
|
6371
|
+
const b = Number.parseInt(rgbMatch[3], 10);
|
|
6372
|
+
const a = rgbMatch[4] ? Number.parseFloat(rgbMatch[4]) : 1;
|
|
6373
|
+
const hsl = rgbToHsl(r, g, b);
|
|
6374
|
+
return {
|
|
6375
|
+
rgb: {
|
|
6376
|
+
r,
|
|
6377
|
+
g,
|
|
6378
|
+
b,
|
|
6379
|
+
a
|
|
6314
6380
|
},
|
|
6315
|
-
|
|
6316
|
-
|
|
6381
|
+
hsl: {
|
|
6382
|
+
...hsl,
|
|
6383
|
+
a
|
|
6317
6384
|
},
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6385
|
+
hex: rgbToHex(r, g, b)
|
|
6386
|
+
};
|
|
6387
|
+
}
|
|
6388
|
+
const hslMatch = trimmed.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);
|
|
6389
|
+
if (hslMatch) {
|
|
6390
|
+
const h = Number.parseFloat(hslMatch[1]);
|
|
6391
|
+
const s = Number.parseFloat(hslMatch[2]);
|
|
6392
|
+
const l = Number.parseFloat(hslMatch[3]);
|
|
6393
|
+
const a = hslMatch[4] ? Number.parseFloat(hslMatch[4]) : 1;
|
|
6394
|
+
const rgb = hslToRgb(h, s, l);
|
|
6395
|
+
return {
|
|
6396
|
+
rgb: {
|
|
6397
|
+
...rgb,
|
|
6398
|
+
a
|
|
6399
|
+
},
|
|
6400
|
+
hsl: {
|
|
6401
|
+
h,
|
|
6402
|
+
s,
|
|
6403
|
+
l,
|
|
6404
|
+
a
|
|
6405
|
+
},
|
|
6406
|
+
hex: rgbToHex(rgb.r, rgb.g, rgb.b)
|
|
6407
|
+
};
|
|
6408
|
+
}
|
|
6409
|
+
return null;
|
|
6338
6410
|
}
|
|
6339
|
-
function
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6411
|
+
function formatColor(color, format) {
|
|
6412
|
+
switch(format){
|
|
6413
|
+
case "hex":
|
|
6414
|
+
return color.hex;
|
|
6415
|
+
case "rgb":
|
|
6416
|
+
return `rgb(${color.rgb.r}, ${color.rgb.g}, ${color.rgb.b})`;
|
|
6417
|
+
case "rgba":
|
|
6418
|
+
return `rgba(${color.rgb.r}, ${color.rgb.g}, ${color.rgb.b}, ${color.rgb.a})`;
|
|
6419
|
+
case "hsl":
|
|
6420
|
+
return `hsl(${color.hsl.h}, ${color.hsl.s}%, ${color.hsl.l}%)`;
|
|
6421
|
+
case "hsla":
|
|
6422
|
+
return `hsla(${color.hsl.h}, ${color.hsl.s}%, ${color.hsl.l}%, ${color.hsl.a})`;
|
|
6423
|
+
default:
|
|
6424
|
+
return color.hex;
|
|
6425
|
+
}
|
|
6426
|
+
}
|
|
6427
|
+
function setAlpha(color, alpha) {
|
|
6428
|
+
const clampedAlpha = Math.max(0, Math.min(1, alpha));
|
|
6429
|
+
return {
|
|
6430
|
+
...color,
|
|
6431
|
+
rgb: {
|
|
6432
|
+
...color.rgb,
|
|
6433
|
+
a: clampedAlpha
|
|
6434
|
+
},
|
|
6435
|
+
hsl: {
|
|
6436
|
+
...color.hsl,
|
|
6437
|
+
a: clampedAlpha
|
|
6438
|
+
}
|
|
6439
|
+
};
|
|
6440
|
+
}
|
|
6441
|
+
function createColorFromHsl(h, s, l, a = 1) {
|
|
6442
|
+
const rgb = hslToRgb(h, s, l);
|
|
6443
|
+
return {
|
|
6444
|
+
rgb: {
|
|
6445
|
+
...rgb,
|
|
6446
|
+
a
|
|
6447
|
+
},
|
|
6448
|
+
hsl: {
|
|
6449
|
+
h,
|
|
6450
|
+
s,
|
|
6451
|
+
l,
|
|
6452
|
+
a
|
|
6453
|
+
},
|
|
6454
|
+
hex: rgbToHex(rgb.r, rgb.g, rgb.b)
|
|
6455
|
+
};
|
|
6456
|
+
}
|
|
6457
|
+
function getDefaultColor() {
|
|
6458
|
+
return {
|
|
6459
|
+
rgb: {
|
|
6460
|
+
r: 255,
|
|
6461
|
+
g: 255,
|
|
6462
|
+
b: 255,
|
|
6463
|
+
a: 1
|
|
6464
|
+
},
|
|
6465
|
+
hsl: {
|
|
6466
|
+
h: 0,
|
|
6467
|
+
s: 0,
|
|
6468
|
+
l: 100,
|
|
6469
|
+
a: 1
|
|
6470
|
+
},
|
|
6471
|
+
hex: "#ffffff"
|
|
6472
|
+
};
|
|
6473
|
+
}
|
|
6474
|
+
var SaturationBrightness_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div role=slider aria-label="Saturation and brightness"aria-valuemin=0 aria-valuemax=100><div>');
|
|
6475
|
+
const SaturationBrightness = (props)=>{
|
|
6476
|
+
const context = useColorPickerContext();
|
|
6477
|
+
const [isDragging, setIsDragging] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
6478
|
+
let containerRef;
|
|
6479
|
+
let cursorRef;
|
|
6480
|
+
const saturation = ()=>context.color().hsl.s;
|
|
6481
|
+
const brightness = ()=>100 - context.color().hsl.l;
|
|
6482
|
+
const updateColor = (x, y)=>{
|
|
6483
|
+
if (!containerRef || context.disabled()) return;
|
|
6484
|
+
const rect = containerRef.getBoundingClientRect();
|
|
6485
|
+
const s = Math.max(0, Math.min(100, (x - rect.left) / rect.width * 100));
|
|
6486
|
+
const l = Math.max(0, Math.min(100, 100 - (y - rect.top) / rect.height * 100));
|
|
6487
|
+
const newColor = createColorFromHsl(context.color().hsl.h, s, l, context.color().hsl.a);
|
|
6488
|
+
context.onChange(newColor);
|
|
6489
|
+
};
|
|
6490
|
+
const handleMouseDown = (e)=>{
|
|
6491
|
+
if (context.disabled()) return;
|
|
6492
|
+
setIsDragging(true);
|
|
6493
|
+
updateColor(e.clientX, e.clientY);
|
|
6494
|
+
e.preventDefault();
|
|
6495
|
+
};
|
|
6496
|
+
const handleMouseMove = (e)=>{
|
|
6497
|
+
if (isDragging()) {
|
|
6498
|
+
updateColor(e.clientX, e.clientY);
|
|
6499
|
+
e.preventDefault();
|
|
6500
|
+
}
|
|
6501
|
+
};
|
|
6502
|
+
const handleMouseUp = ()=>{
|
|
6503
|
+
setIsDragging(false);
|
|
6504
|
+
};
|
|
6505
|
+
const handleKeyDown = (e)=>{
|
|
6506
|
+
if (context.disabled()) return;
|
|
6507
|
+
const step = e.shiftKey ? 10 : 1;
|
|
6508
|
+
let s = saturation();
|
|
6509
|
+
let l = 100 - brightness();
|
|
6510
|
+
switch(e.key){
|
|
6511
|
+
case "ArrowLeft":
|
|
6512
|
+
s = Math.max(0, s - step);
|
|
6513
|
+
e.preventDefault();
|
|
6514
|
+
break;
|
|
6515
|
+
case "ArrowRight":
|
|
6516
|
+
s = Math.min(100, s + step);
|
|
6517
|
+
e.preventDefault();
|
|
6518
|
+
break;
|
|
6519
|
+
case "ArrowUp":
|
|
6520
|
+
l = Math.min(100, l + step);
|
|
6521
|
+
e.preventDefault();
|
|
6522
|
+
break;
|
|
6523
|
+
case "ArrowDown":
|
|
6524
|
+
l = Math.max(0, l - step);
|
|
6525
|
+
e.preventDefault();
|
|
6526
|
+
break;
|
|
6527
|
+
default:
|
|
6528
|
+
return;
|
|
6529
|
+
}
|
|
6530
|
+
const newColor = createColorFromHsl(context.color().hsl.h, s, l, context.color().hsl.a);
|
|
6531
|
+
context.onChange(newColor);
|
|
6532
|
+
};
|
|
6533
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
6534
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
6535
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
6536
|
+
});
|
|
6537
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
6538
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
6539
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
6344
6540
|
});
|
|
6541
|
+
const classes = ()=>twMerge("relative w-full h-48 rounded cursor-crosshair select-none", clsx({
|
|
6542
|
+
"opacity-50 cursor-not-allowed": context.disabled()
|
|
6543
|
+
}), props.class, props.className);
|
|
6544
|
+
const cursorClasses = ()=>twMerge("absolute w-4 h-4 border-2 border-white rounded-full shadow-lg pointer-events-none transform -translate-x-1/2 -translate-y-1/2", clsx({
|
|
6545
|
+
"ring-2 ring-primary": isDragging()
|
|
6546
|
+
}));
|
|
6345
6547
|
return (()=>{
|
|
6346
|
-
var _el$ =
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.
|
|
6548
|
+
var _el$ = SaturationBrightness_tmpl$(), _el$2 = _el$.firstChild;
|
|
6549
|
+
_el$.$$keydown = handleKeyDown;
|
|
6550
|
+
_el$.$$mousedown = handleMouseDown;
|
|
6551
|
+
var _ref$ = containerRef;
|
|
6552
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$) : containerRef = _el$;
|
|
6553
|
+
var _ref$2 = cursorRef;
|
|
6554
|
+
"function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$2) : cursorRef = _el$2;
|
|
6555
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
6556
|
+
var _v$ = classes(), _v$2 = `
|
|
6557
|
+
linear-gradient(to top, #000, transparent),
|
|
6558
|
+
linear-gradient(to right, #fff, hsl(${context.color().hsl.h}, 100%, 50%))
|
|
6559
|
+
`, _v$3 = context.disabled() ? -1 : 0, _v$4 = saturation(), _v$5 = context.disabled(), _v$6 = cursorClasses(), _v$7 = `${saturation()}%`, _v$8 = `${brightness()}%`;
|
|
6560
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
6561
|
+
_v$2 !== _p$.t && (null != (_p$.t = _v$2) ? _el$.style.setProperty("background", _v$2) : _el$.style.removeProperty("background"));
|
|
6562
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "tabindex", _p$.a = _v$3);
|
|
6563
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-valuenow", _p$.o = _v$4);
|
|
6564
|
+
_v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-disabled", _p$.i = _v$5);
|
|
6565
|
+
_v$6 !== _p$.n && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.n = _v$6);
|
|
6566
|
+
_v$7 !== _p$.s && (null != (_p$.s = _v$7) ? _el$2.style.setProperty("left", _v$7) : _el$2.style.removeProperty("left"));
|
|
6567
|
+
_v$8 !== _p$.h && (null != (_p$.h = _v$8) ? _el$2.style.setProperty("top", _v$8) : _el$2.style.removeProperty("top"));
|
|
6568
|
+
return _p$;
|
|
6569
|
+
}, {
|
|
6570
|
+
e: void 0,
|
|
6571
|
+
t: void 0,
|
|
6572
|
+
a: void 0,
|
|
6573
|
+
o: void 0,
|
|
6574
|
+
i: void 0,
|
|
6575
|
+
n: void 0,
|
|
6576
|
+
s: void 0,
|
|
6577
|
+
h: void 0
|
|
6578
|
+
});
|
|
6354
6579
|
return _el$;
|
|
6355
6580
|
})();
|
|
6356
|
-
}
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
const
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
"class",
|
|
6376
|
-
"className",
|
|
6377
|
-
"style"
|
|
6378
|
-
]);
|
|
6379
|
-
const [internalOpen, setInternalOpen] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
6380
|
-
const isControlled = void 0 !== local.open;
|
|
6381
|
-
const isChecked = ()=>isControlled ? local.open : internalOpen();
|
|
6382
|
-
const handleCheckboxChange = ()=>{
|
|
6383
|
-
if (local.onToggle) local.onToggle();
|
|
6384
|
-
if (isControlled) {
|
|
6385
|
-
if (local.open && local.onClose) local.onClose();
|
|
6386
|
-
if (!local.open && local.onOpen) local.onOpen();
|
|
6387
|
-
} else {
|
|
6388
|
-
const next = !internalOpen();
|
|
6389
|
-
setInternalOpen(next);
|
|
6390
|
-
if (next && local.onOpen) local.onOpen();
|
|
6391
|
-
if (!next && local.onClose) local.onClose();
|
|
6392
|
-
}
|
|
6581
|
+
};
|
|
6582
|
+
const colorpicker_SaturationBrightness = SaturationBrightness;
|
|
6583
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
6584
|
+
"mousedown",
|
|
6585
|
+
"keydown"
|
|
6586
|
+
]);
|
|
6587
|
+
var HueSlider_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div role=slider aria-label=Hue aria-valuemin=0 aria-valuemax=360><div>");
|
|
6588
|
+
const HueSlider = (props)=>{
|
|
6589
|
+
const context = useColorPickerContext();
|
|
6590
|
+
const [isDragging, setIsDragging] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
6591
|
+
let sliderRef;
|
|
6592
|
+
const hue = ()=>context.color().hsl.h;
|
|
6593
|
+
const updateHue = (clientX)=>{
|
|
6594
|
+
if (!sliderRef || context.disabled()) return;
|
|
6595
|
+
const rect = sliderRef.getBoundingClientRect();
|
|
6596
|
+
const percentage = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
6597
|
+
const newHue = Math.round(360 * percentage);
|
|
6598
|
+
const newColor = createColorFromHsl(newHue, context.color().hsl.s, context.color().hsl.l, context.color().hsl.a);
|
|
6599
|
+
context.onChange(newColor);
|
|
6393
6600
|
};
|
|
6394
|
-
const
|
|
6395
|
-
if (
|
|
6396
|
-
|
|
6397
|
-
|
|
6601
|
+
const handleMouseDown = (e)=>{
|
|
6602
|
+
if (context.disabled()) return;
|
|
6603
|
+
setIsDragging(true);
|
|
6604
|
+
updateHue(e.clientX);
|
|
6605
|
+
e.preventDefault();
|
|
6606
|
+
};
|
|
6607
|
+
const handleMouseMove = (e)=>{
|
|
6608
|
+
if (isDragging()) {
|
|
6609
|
+
updateHue(e.clientX);
|
|
6610
|
+
e.preventDefault();
|
|
6398
6611
|
}
|
|
6399
|
-
if ("function" == typeof others.onBlur) others.onBlur(e);
|
|
6400
6612
|
};
|
|
6401
|
-
const
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6613
|
+
const handleMouseUp = ()=>{
|
|
6614
|
+
setIsDragging(false);
|
|
6615
|
+
};
|
|
6616
|
+
const handleKeyDown = (e)=>{
|
|
6617
|
+
if (context.disabled()) return;
|
|
6618
|
+
const step = e.shiftKey ? 10 : 1;
|
|
6619
|
+
let newHue = hue();
|
|
6620
|
+
switch(e.key){
|
|
6621
|
+
case "ArrowLeft":
|
|
6622
|
+
case "ArrowDown":
|
|
6623
|
+
newHue = (hue() - step + 360) % 360;
|
|
6624
|
+
e.preventDefault();
|
|
6625
|
+
break;
|
|
6626
|
+
case "ArrowRight":
|
|
6627
|
+
case "ArrowUp":
|
|
6628
|
+
newHue = (hue() + step) % 360;
|
|
6629
|
+
e.preventDefault();
|
|
6630
|
+
break;
|
|
6631
|
+
default:
|
|
6632
|
+
return;
|
|
6405
6633
|
}
|
|
6406
|
-
|
|
6634
|
+
const newColor = createColorFromHsl(newHue, context.color().hsl.s, context.color().hsl.l, context.color().hsl.a);
|
|
6635
|
+
context.onChange(newColor);
|
|
6407
6636
|
};
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
},
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6637
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
6638
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
6639
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
6640
|
+
});
|
|
6641
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
6642
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
6643
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
6644
|
+
});
|
|
6645
|
+
const classes = ()=>twMerge("relative w-full h-6 rounded cursor-pointer select-none", clsx({
|
|
6646
|
+
"opacity-50 cursor-not-allowed": context.disabled()
|
|
6647
|
+
}), props.class, props.className);
|
|
6648
|
+
const thumbClasses = ()=>twMerge("absolute top-1/2 w-4 h-4 border-2 border-white rounded-full shadow-lg transform -translate-x-1/2 -translate-y-1/2 pointer-events-none", clsx({
|
|
6649
|
+
"ring-2 ring-primary": isDragging()
|
|
6650
|
+
}));
|
|
6651
|
+
return (()=>{
|
|
6652
|
+
var _el$ = HueSlider_tmpl$(), _el$2 = _el$.firstChild;
|
|
6653
|
+
_el$.$$keydown = handleKeyDown;
|
|
6654
|
+
_el$.$$mousedown = handleMouseDown;
|
|
6655
|
+
var _ref$ = sliderRef;
|
|
6656
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$) : sliderRef = _el$;
|
|
6657
|
+
_el$.style.setProperty("background", "linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)");
|
|
6658
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
6659
|
+
var _v$ = classes(), _v$2 = context.disabled() ? -1 : 0, _v$3 = hue(), _v$4 = context.disabled(), _v$5 = thumbClasses(), _v$6 = `${hue() / 360 * 100}%`, _v$7 = `hsl(${hue()}, 100%, 50%)`;
|
|
6660
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
6661
|
+
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "tabindex", _p$.t = _v$2);
|
|
6662
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-valuenow", _p$.a = _v$3);
|
|
6663
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-disabled", _p$.o = _v$4);
|
|
6664
|
+
_v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.i = _v$5);
|
|
6665
|
+
_v$6 !== _p$.n && (null != (_p$.n = _v$6) ? _el$2.style.setProperty("left", _v$6) : _el$2.style.removeProperty("left"));
|
|
6666
|
+
_v$7 !== _p$.s && (null != (_p$.s = _v$7) ? _el$2.style.setProperty("background-color", _v$7) : _el$2.style.removeProperty("background-color"));
|
|
6667
|
+
return _p$;
|
|
6668
|
+
}, {
|
|
6669
|
+
e: void 0,
|
|
6670
|
+
t: void 0,
|
|
6671
|
+
a: void 0,
|
|
6672
|
+
o: void 0,
|
|
6673
|
+
i: void 0,
|
|
6674
|
+
n: void 0,
|
|
6675
|
+
s: void 0
|
|
6676
|
+
});
|
|
6445
6677
|
return _el$;
|
|
6446
6678
|
})();
|
|
6447
6679
|
};
|
|
6448
|
-
const
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6680
|
+
const colorpicker_HueSlider = HueSlider;
|
|
6681
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
6682
|
+
"mousedown",
|
|
6683
|
+
"keydown"
|
|
6684
|
+
]);
|
|
6685
|
+
var AlphaSlider_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div role=slider aria-label="Alpha (opacity)"aria-valuemin=0 aria-valuemax=1><div class="absolute inset-0"></div><div class="absolute inset-0"></div><div>');
|
|
6686
|
+
const AlphaSlider_AlphaSlider = (props)=>{
|
|
6687
|
+
const context = useColorPickerContext();
|
|
6688
|
+
const [isDragging, setIsDragging] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
6689
|
+
let sliderRef;
|
|
6690
|
+
const alpha = ()=>context.color().hsl.a;
|
|
6691
|
+
const updateAlpha = (clientX)=>{
|
|
6692
|
+
if (!sliderRef || context.disabled()) return;
|
|
6693
|
+
const rect = sliderRef.getBoundingClientRect();
|
|
6694
|
+
const percentage = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
6695
|
+
const newAlpha = Math.round(100 * percentage) / 100;
|
|
6696
|
+
const newColor = setAlpha(context.color(), newAlpha);
|
|
6697
|
+
context.onChange(newColor);
|
|
6698
|
+
};
|
|
6699
|
+
const handleMouseDown = (e)=>{
|
|
6700
|
+
if (context.disabled()) return;
|
|
6701
|
+
setIsDragging(true);
|
|
6702
|
+
updateAlpha(e.clientX);
|
|
6703
|
+
e.preventDefault();
|
|
6704
|
+
};
|
|
6705
|
+
const handleMouseMove = (e)=>{
|
|
6706
|
+
if (isDragging()) {
|
|
6707
|
+
updateAlpha(e.clientX);
|
|
6708
|
+
e.preventDefault();
|
|
6709
|
+
}
|
|
6710
|
+
};
|
|
6711
|
+
const handleMouseUp = ()=>{
|
|
6712
|
+
setIsDragging(false);
|
|
6713
|
+
};
|
|
6714
|
+
const handleKeyDown = (e)=>{
|
|
6715
|
+
if (context.disabled()) return;
|
|
6716
|
+
const step = e.shiftKey ? 0.1 : 0.01;
|
|
6717
|
+
let newAlpha = alpha();
|
|
6718
|
+
switch(e.key){
|
|
6719
|
+
case "ArrowLeft":
|
|
6720
|
+
case "ArrowDown":
|
|
6721
|
+
newAlpha = Math.max(0, alpha() - step);
|
|
6722
|
+
e.preventDefault();
|
|
6723
|
+
break;
|
|
6724
|
+
case "ArrowRight":
|
|
6725
|
+
case "ArrowUp":
|
|
6726
|
+
newAlpha = Math.min(1, alpha() + step);
|
|
6727
|
+
e.preventDefault();
|
|
6728
|
+
break;
|
|
6729
|
+
default:
|
|
6730
|
+
return;
|
|
6731
|
+
}
|
|
6732
|
+
const newColor = setAlpha(context.color(), newAlpha);
|
|
6733
|
+
context.onChange(newColor);
|
|
6734
|
+
};
|
|
6735
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
6736
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
6737
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
6469
6738
|
});
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
if ("string" == typeof prop || "boolean" == typeof prop) return [
|
|
6474
|
-
classMap[String(prop)]
|
|
6475
|
-
];
|
|
6476
|
-
return breakpoints.flatMap((bp)=>{
|
|
6477
|
-
const value = prop[bp];
|
|
6478
|
-
if (void 0 === value) return [];
|
|
6479
|
-
const className = classMap[String(value)];
|
|
6480
|
-
return "base" === bp ? [
|
|
6481
|
-
className
|
|
6482
|
-
] : [
|
|
6483
|
-
`${bp}:${className}`
|
|
6484
|
-
];
|
|
6739
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
6740
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
6741
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
6485
6742
|
});
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
const
|
|
6490
|
-
|
|
6491
|
-
|
|
6743
|
+
const classes = ()=>twMerge("relative w-full h-6 rounded cursor-pointer select-none overflow-hidden", clsx({
|
|
6744
|
+
"opacity-50 cursor-not-allowed": context.disabled()
|
|
6745
|
+
}), props.class, props.className);
|
|
6746
|
+
const thumbClasses = ()=>twMerge("absolute top-1/2 w-4 h-4 border-2 border-white rounded-full shadow-lg transform -translate-x-1/2 -translate-y-1/2 pointer-events-none", clsx({
|
|
6747
|
+
"ring-2 ring-primary": isDragging()
|
|
6748
|
+
}));
|
|
6749
|
+
return (()=>{
|
|
6750
|
+
var _el$ = AlphaSlider_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling;
|
|
6751
|
+
_el$.$$keydown = handleKeyDown;
|
|
6752
|
+
_el$.$$mousedown = handleMouseDown;
|
|
6753
|
+
var _ref$ = sliderRef;
|
|
6754
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$) : sliderRef = _el$;
|
|
6755
|
+
_el$2.style.setProperty("background-image", "linear-gradient(45deg, hsl(var(--b3)) 25%, transparent 25%), linear-gradient(-45deg, hsl(var(--b3)) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, hsl(var(--b3)) 75%), linear-gradient(-45deg, transparent 75%, hsl(var(--b3)) 75%)");
|
|
6756
|
+
_el$2.style.setProperty("background-size", "8px 8px");
|
|
6757
|
+
_el$2.style.setProperty("background-position", "0 0, 0 4px, 4px -4px, -4px 0px");
|
|
6758
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
6759
|
+
var _v$ = classes(), _v$2 = context.disabled() ? -1 : 0, _v$3 = alpha(), _v$4 = context.disabled(), _v$5 = `linear-gradient(to right, transparent, ${context.color().hex})`, _v$6 = thumbClasses(), _v$7 = `${100 * alpha()}%`;
|
|
6760
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
6761
|
+
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "tabindex", _p$.t = _v$2);
|
|
6762
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-valuenow", _p$.a = _v$3);
|
|
6763
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-disabled", _p$.o = _v$4);
|
|
6764
|
+
_v$5 !== _p$.i && (null != (_p$.i = _v$5) ? _el$3.style.setProperty("background", _v$5) : _el$3.style.removeProperty("background"));
|
|
6765
|
+
_v$6 !== _p$.n && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$4, _p$.n = _v$6);
|
|
6766
|
+
_v$7 !== _p$.s && (null != (_p$.s = _v$7) ? _el$4.style.setProperty("left", _v$7) : _el$4.style.removeProperty("left"));
|
|
6767
|
+
return _p$;
|
|
6768
|
+
}, {
|
|
6769
|
+
e: void 0,
|
|
6770
|
+
t: void 0,
|
|
6771
|
+
a: void 0,
|
|
6772
|
+
o: void 0,
|
|
6773
|
+
i: void 0,
|
|
6774
|
+
n: void 0,
|
|
6775
|
+
s: void 0
|
|
6776
|
+
});
|
|
6777
|
+
return _el$;
|
|
6778
|
+
})();
|
|
6779
|
+
};
|
|
6780
|
+
const AlphaSlider = AlphaSlider_AlphaSlider;
|
|
6781
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
6782
|
+
"mousedown",
|
|
6783
|
+
"keydown"
|
|
6784
|
+
]);
|
|
6785
|
+
var ColorWheel_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div role=slider aria-label="Color Wheel"><div>');
|
|
6786
|
+
const ColorWheel_ColorWheel = (props)=>{
|
|
6787
|
+
const context = useColorPickerContext();
|
|
6788
|
+
const [isDragging, setIsDragging] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
6789
|
+
let containerRef;
|
|
6790
|
+
let cursorRef;
|
|
6791
|
+
const hue = ()=>context.color().hsl.h;
|
|
6792
|
+
const saturation = ()=>context.color().hsl.s;
|
|
6793
|
+
const lightness = ()=>context.color().hsl.l;
|
|
6794
|
+
const updateColor = (x, y)=>{
|
|
6795
|
+
if (!containerRef || context.disabled()) return;
|
|
6796
|
+
const rect = containerRef.getBoundingClientRect();
|
|
6797
|
+
const centerX = rect.width / 2;
|
|
6798
|
+
const centerY = rect.height / 2;
|
|
6799
|
+
const dx = x - rect.left - centerX;
|
|
6800
|
+
const dy = y - rect.top - centerY;
|
|
6801
|
+
let angle = 180 / Math.PI * Math.atan2(dy, dx) + 90;
|
|
6802
|
+
if (angle < 0) angle += 360;
|
|
6803
|
+
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
6804
|
+
const radius = rect.width / 2;
|
|
6805
|
+
const s = Math.min(100, distance / radius * 100);
|
|
6806
|
+
const newColor = createColorFromHsl(Math.round(angle), Math.round(s), lightness(), context.color().hsl.a);
|
|
6807
|
+
context.onChange(newColor);
|
|
6808
|
+
};
|
|
6809
|
+
const handleMouseDown = (e)=>{
|
|
6810
|
+
if (context.disabled()) return;
|
|
6811
|
+
setIsDragging(true);
|
|
6812
|
+
updateColor(e.clientX, e.clientY);
|
|
6813
|
+
e.preventDefault();
|
|
6814
|
+
};
|
|
6815
|
+
const handleMouseMove = (e)=>{
|
|
6816
|
+
if (isDragging()) {
|
|
6817
|
+
updateColor(e.clientX, e.clientY);
|
|
6818
|
+
e.preventDefault();
|
|
6819
|
+
}
|
|
6820
|
+
};
|
|
6821
|
+
const handleMouseUp = ()=>{
|
|
6822
|
+
setIsDragging(false);
|
|
6492
6823
|
};
|
|
6493
6824
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
6494
|
-
|
|
6495
|
-
|
|
6825
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
6826
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
6496
6827
|
});
|
|
6497
6828
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
6498
|
-
|
|
6829
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
6830
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
6499
6831
|
});
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
};
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6832
|
+
const classes = ()=>twMerge("relative w-48 h-48 rounded-full cursor-crosshair select-none overflow-hidden mx-auto", clsx({
|
|
6833
|
+
"opacity-50 cursor-not-allowed": context.disabled()
|
|
6834
|
+
}), props.class, props.className);
|
|
6835
|
+
const cursorPosition = ()=>{
|
|
6836
|
+
const hRad = (hue() - 90) * (Math.PI / 180);
|
|
6837
|
+
const sNorm = saturation() / 100;
|
|
6838
|
+
const x = 50 + 50 * sNorm * Math.cos(hRad);
|
|
6839
|
+
const y = 50 + 50 * sNorm * Math.sin(hRad);
|
|
6840
|
+
return {
|
|
6841
|
+
x,
|
|
6842
|
+
y
|
|
6843
|
+
};
|
|
6844
|
+
};
|
|
6845
|
+
const cursorClasses = ()=>twMerge("absolute w-4 h-4 border-2 border-white rounded-full shadow-lg pointer-events-none transform -translate-x-1/2 -translate-y-1/2", clsx({
|
|
6846
|
+
"ring-2 ring-primary": isDragging()
|
|
6847
|
+
}));
|
|
6848
|
+
return (()=>{
|
|
6849
|
+
var _el$ = ColorWheel_tmpl$(), _el$2 = _el$.firstChild;
|
|
6850
|
+
_el$.$$mousedown = handleMouseDown;
|
|
6851
|
+
var _ref$ = containerRef;
|
|
6852
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$) : containerRef = _el$;
|
|
6853
|
+
_el$.style.setProperty("background", "\n radial-gradient(circle, white 0%, transparent 100%),\n conic-gradient(\n from 0deg,\n hsl(0, 100%, 50%),\n hsl(60, 100%, 50%),\n hsl(120, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(240, 100%, 50%),\n hsl(300, 100%, 50%),\n hsl(360, 100%, 50%)\n )\n ");
|
|
6854
|
+
var _ref$2 = cursorRef;
|
|
6855
|
+
"function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$2) : cursorRef = _el$2;
|
|
6856
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
6857
|
+
var _v$ = classes(), _v$2 = context.disabled() ? -1 : 0, _v$3 = `Hue ${Math.round(hue())}deg, Saturation ${Math.round(saturation())}%`, _v$4 = context.disabled(), _v$5 = cursorClasses(), _v$6 = `${cursorPosition().x}%`, _v$7 = `${cursorPosition().y}%`, _v$8 = `hsl(${hue()}, ${saturation()}%, 50%)`;
|
|
6858
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
6859
|
+
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "tabindex", _p$.t = _v$2);
|
|
6860
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-valuetext", _p$.a = _v$3);
|
|
6861
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-disabled", _p$.o = _v$4);
|
|
6862
|
+
_v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.i = _v$5);
|
|
6863
|
+
_v$6 !== _p$.n && (null != (_p$.n = _v$6) ? _el$2.style.setProperty("left", _v$6) : _el$2.style.removeProperty("left"));
|
|
6864
|
+
_v$7 !== _p$.s && (null != (_p$.s = _v$7) ? _el$2.style.setProperty("top", _v$7) : _el$2.style.removeProperty("top"));
|
|
6865
|
+
_v$8 !== _p$.h && (null != (_p$.h = _v$8) ? _el$2.style.setProperty("background-color", _v$8) : _el$2.style.removeProperty("background-color"));
|
|
6866
|
+
return _p$;
|
|
6867
|
+
}, {
|
|
6868
|
+
e: void 0,
|
|
6869
|
+
t: void 0,
|
|
6870
|
+
a: void 0,
|
|
6871
|
+
o: void 0,
|
|
6872
|
+
i: void 0,
|
|
6873
|
+
n: void 0,
|
|
6874
|
+
s: void 0,
|
|
6875
|
+
h: void 0
|
|
6876
|
+
});
|
|
6877
|
+
return _el$;
|
|
6878
|
+
})();
|
|
6522
6879
|
};
|
|
6523
|
-
const
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6880
|
+
const ColorWheel = ColorWheel_ColorWheel;
|
|
6881
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
6882
|
+
"mousedown"
|
|
6883
|
+
]);
|
|
6884
|
+
var LightnessSlider_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div role=slider aria-label=Lightness aria-valuemin=0 aria-valuemax=100><div>");
|
|
6885
|
+
const LightnessSlider_LightnessSlider = (props)=>{
|
|
6886
|
+
const context = useColorPickerContext();
|
|
6887
|
+
const [isDragging, setIsDragging] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
6888
|
+
let sliderRef;
|
|
6889
|
+
const lightness = ()=>context.color().hsl.l;
|
|
6890
|
+
const updateLightness = (clientX)=>{
|
|
6891
|
+
if (!sliderRef || context.disabled()) return;
|
|
6892
|
+
const rect = sliderRef.getBoundingClientRect();
|
|
6893
|
+
const percentage = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
6894
|
+
const newLightness = Math.round(100 * percentage);
|
|
6895
|
+
const newColor = createColorFromHsl(context.color().hsl.h, context.color().hsl.s, newLightness, context.color().hsl.a);
|
|
6896
|
+
context.onChange(newColor);
|
|
6897
|
+
};
|
|
6898
|
+
const handleMouseDown = (e)=>{
|
|
6899
|
+
if (context.disabled()) return;
|
|
6900
|
+
setIsDragging(true);
|
|
6901
|
+
updateLightness(e.clientX);
|
|
6902
|
+
e.preventDefault();
|
|
6903
|
+
};
|
|
6904
|
+
const handleMouseMove = (e)=>{
|
|
6905
|
+
if (isDragging()) {
|
|
6906
|
+
updateLightness(e.clientX);
|
|
6907
|
+
e.preventDefault();
|
|
6908
|
+
}
|
|
6909
|
+
};
|
|
6910
|
+
const handleMouseUp = ()=>{
|
|
6911
|
+
setIsDragging(false);
|
|
6912
|
+
};
|
|
6913
|
+
const handleKeyDown = (e)=>{
|
|
6914
|
+
if (context.disabled()) return;
|
|
6915
|
+
const step = e.shiftKey ? 10 : 1;
|
|
6916
|
+
let newL = lightness();
|
|
6917
|
+
switch(e.key){
|
|
6918
|
+
case "ArrowLeft":
|
|
6919
|
+
case "ArrowDown":
|
|
6920
|
+
newL = Math.max(0, newL - step);
|
|
6921
|
+
e.preventDefault();
|
|
6922
|
+
break;
|
|
6923
|
+
case "ArrowRight":
|
|
6924
|
+
case "ArrowUp":
|
|
6925
|
+
newL = Math.min(100, newL + step);
|
|
6926
|
+
e.preventDefault();
|
|
6927
|
+
break;
|
|
6928
|
+
default:
|
|
6929
|
+
return;
|
|
6930
|
+
}
|
|
6931
|
+
const newColor = createColorFromHsl(context.color().hsl.h, context.color().hsl.s, newL, context.color().hsl.a);
|
|
6932
|
+
context.onChange(newColor);
|
|
6933
|
+
};
|
|
6934
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
6935
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
6936
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
6937
|
+
});
|
|
6938
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
6939
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
6940
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
6941
|
+
});
|
|
6942
|
+
const classes = ()=>twMerge("relative w-full h-6 rounded cursor-pointer select-none", clsx({
|
|
6943
|
+
"opacity-50 cursor-not-allowed": context.disabled()
|
|
6944
|
+
}), props.class, props.className);
|
|
6945
|
+
const thumbClasses = ()=>twMerge("absolute top-1/2 w-4 h-4 border-2 border-white rounded-full shadow-lg transform -translate-x-1/2 -translate-y-1/2 pointer-events-none", clsx({
|
|
6946
|
+
"ring-2 ring-primary": isDragging()
|
|
6947
|
+
}));
|
|
6948
|
+
const gradientStyle = ()=>{
|
|
6949
|
+
const h = context.color().hsl.h;
|
|
6950
|
+
const s = context.color().hsl.s;
|
|
6951
|
+
return `linear-gradient(to right, hsl(${h}, ${s}%, 0%), hsl(${h}, ${s}%, 50%), hsl(${h}, ${s}%, 100%))`;
|
|
6952
|
+
};
|
|
6953
|
+
return (()=>{
|
|
6954
|
+
var _el$ = LightnessSlider_tmpl$(), _el$2 = _el$.firstChild;
|
|
6955
|
+
_el$.$$keydown = handleKeyDown;
|
|
6956
|
+
_el$.$$mousedown = handleMouseDown;
|
|
6957
|
+
var _ref$ = sliderRef;
|
|
6958
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$) : sliderRef = _el$;
|
|
6959
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
6960
|
+
var _v$ = classes(), _v$2 = gradientStyle(), _v$3 = context.disabled() ? -1 : 0, _v$4 = lightness(), _v$5 = context.disabled(), _v$6 = thumbClasses(), _v$7 = `${lightness()}%`, _v$8 = `hsl(${context.color().hsl.h}, ${context.color().hsl.s}%, ${lightness()}%)`;
|
|
6961
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
6962
|
+
_v$2 !== _p$.t && (null != (_p$.t = _v$2) ? _el$.style.setProperty("background", _v$2) : _el$.style.removeProperty("background"));
|
|
6963
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "tabindex", _p$.a = _v$3);
|
|
6964
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-valuenow", _p$.o = _v$4);
|
|
6965
|
+
_v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-disabled", _p$.i = _v$5);
|
|
6966
|
+
_v$6 !== _p$.n && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.n = _v$6);
|
|
6967
|
+
_v$7 !== _p$.s && (null != (_p$.s = _v$7) ? _el$2.style.setProperty("left", _v$7) : _el$2.style.removeProperty("left"));
|
|
6968
|
+
_v$8 !== _p$.h && (null != (_p$.h = _v$8) ? _el$2.style.setProperty("background-color", _v$8) : _el$2.style.removeProperty("background-color"));
|
|
6969
|
+
return _p$;
|
|
6970
|
+
}, {
|
|
6971
|
+
e: void 0,
|
|
6972
|
+
t: void 0,
|
|
6973
|
+
a: void 0,
|
|
6974
|
+
o: void 0,
|
|
6975
|
+
i: void 0,
|
|
6976
|
+
n: void 0,
|
|
6977
|
+
s: void 0,
|
|
6978
|
+
h: void 0
|
|
6979
|
+
});
|
|
6980
|
+
return _el$;
|
|
6981
|
+
})();
|
|
6527
6982
|
};
|
|
6528
|
-
const
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6983
|
+
const LightnessSlider = LightnessSlider_LightnessSlider;
|
|
6984
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
6985
|
+
"mousedown",
|
|
6986
|
+
"keydown"
|
|
6987
|
+
]);
|
|
6988
|
+
var ColorSwatches_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), ColorSwatches_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<button type=button>");
|
|
6989
|
+
const ColorSwatches = (props)=>{
|
|
6990
|
+
const context = useColorPickerContext();
|
|
6991
|
+
const handleSwatchClick = (swatch)=>{
|
|
6992
|
+
if (context.disabled()) return;
|
|
6993
|
+
const color = parseColor(swatch);
|
|
6994
|
+
if (color) context.onChange(color);
|
|
6995
|
+
};
|
|
6996
|
+
const handleKeyDown = (e, swatch)=>{
|
|
6997
|
+
if (context.disabled()) return;
|
|
6998
|
+
if ("Enter" === e.key || " " === e.key) {
|
|
6999
|
+
e.preventDefault();
|
|
7000
|
+
handleSwatchClick(swatch);
|
|
7001
|
+
}
|
|
7002
|
+
};
|
|
7003
|
+
const classes = ()=>twMerge("grid grid-cols-8 gap-2 w-full", clsx({
|
|
7004
|
+
"opacity-50 pointer-events-none": context.disabled()
|
|
7005
|
+
}), props.class, props.className);
|
|
7006
|
+
const swatchClasses = (swatch)=>{
|
|
7007
|
+
const isSelected = context.color().hex.toLowerCase() === swatch.toLowerCase();
|
|
7008
|
+
return twMerge("w-8 h-8 rounded cursor-pointer border-2 transition-all duration-150", clsx({
|
|
7009
|
+
"border-primary ring-2 ring-primary ring-offset-2 ring-offset-base-100": isSelected,
|
|
7010
|
+
"border-base-300 hover:scale-110 hover:shadow-lg": !isSelected
|
|
7011
|
+
}));
|
|
7012
|
+
};
|
|
7013
|
+
return (()=>{
|
|
7014
|
+
var _el$ = ColorSwatches_tmpl$();
|
|
7015
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
7016
|
+
get each () {
|
|
7017
|
+
return props.swatches;
|
|
7018
|
+
},
|
|
7019
|
+
children: (swatch)=>(()=>{
|
|
7020
|
+
var _el$2 = ColorSwatches_tmpl$2();
|
|
7021
|
+
_el$2.$$keydown = (e)=>handleKeyDown(e, swatch);
|
|
7022
|
+
_el$2.$$click = ()=>handleSwatchClick(swatch);
|
|
7023
|
+
null != swatch ? _el$2.style.setProperty("background-color", swatch) : _el$2.style.removeProperty("background-color");
|
|
7024
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "aria-label", `Select color ${swatch}`);
|
|
7025
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
7026
|
+
var _v$ = swatchClasses(swatch), _v$2 = context.disabled(), _v$3 = context.disabled() ? -1 : 0;
|
|
7027
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.e = _v$);
|
|
7028
|
+
_v$2 !== _p$.t && (_el$2.disabled = _p$.t = _v$2);
|
|
7029
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "tabindex", _p$.a = _v$3);
|
|
7030
|
+
return _p$;
|
|
7031
|
+
}, {
|
|
7032
|
+
e: void 0,
|
|
7033
|
+
t: void 0,
|
|
7034
|
+
a: void 0
|
|
7035
|
+
});
|
|
7036
|
+
return _el$2;
|
|
7037
|
+
})()
|
|
7038
|
+
}));
|
|
7039
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, classes()));
|
|
7040
|
+
return _el$;
|
|
7041
|
+
})();
|
|
6534
7042
|
};
|
|
6535
|
-
const
|
|
7043
|
+
const colorpicker_ColorSwatches = ColorSwatches;
|
|
7044
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
7045
|
+
"click",
|
|
7046
|
+
"keydown"
|
|
7047
|
+
]);
|
|
7048
|
+
var ColorInput_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><input type=text aria-label="Color value"><select aria-label="Color format"><option value=hex>HEX</option><option value=rgb>RGB</option><option value=rgba>RGBA</option><option value=hsl>HSL</option><option value=hsla>HSLA');
|
|
7049
|
+
const ColorInput = (props)=>{
|
|
7050
|
+
const context = useColorPickerContext();
|
|
7051
|
+
const [inputValue, setInputValue] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)("");
|
|
7052
|
+
const [isValid, setIsValid] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(true);
|
|
7053
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
7054
|
+
const formatted = formatColor(context.color(), context.format());
|
|
7055
|
+
setInputValue(formatted);
|
|
7056
|
+
setIsValid(true);
|
|
7057
|
+
});
|
|
7058
|
+
const handleInput = (e)=>{
|
|
7059
|
+
const target = e.target;
|
|
7060
|
+
const value = target.value;
|
|
7061
|
+
setInputValue(value);
|
|
7062
|
+
const parsed = parseColor(value);
|
|
7063
|
+
parsed ? setIsValid(true) : setIsValid(false);
|
|
7064
|
+
};
|
|
7065
|
+
const handleKeyDown = (e)=>{
|
|
7066
|
+
if ("Enter" === e.key) applyColor();
|
|
7067
|
+
};
|
|
7068
|
+
const handleBlur = ()=>{
|
|
7069
|
+
applyColor();
|
|
7070
|
+
};
|
|
7071
|
+
const applyColor = ()=>{
|
|
7072
|
+
const parsed = parseColor(inputValue());
|
|
7073
|
+
if (parsed) {
|
|
7074
|
+
context.onChange(parsed);
|
|
7075
|
+
setIsValid(true);
|
|
7076
|
+
} else {
|
|
7077
|
+
const formatted = formatColor(context.color(), context.format());
|
|
7078
|
+
setInputValue(formatted);
|
|
7079
|
+
setIsValid(true);
|
|
7080
|
+
}
|
|
7081
|
+
};
|
|
7082
|
+
const handleFormatChange = (e)=>{
|
|
7083
|
+
const target = e.target;
|
|
7084
|
+
const newFormat = target.value;
|
|
7085
|
+
context.onFormatChange(newFormat);
|
|
7086
|
+
};
|
|
7087
|
+
const inputClasses = ()=>twMerge("flex-1 px-3 py-2 text-sm border rounded-l focus:outline-none focus:ring-2 focus:ring-primary", clsx({
|
|
7088
|
+
"border-error focus:ring-error": !isValid(),
|
|
7089
|
+
"border-base-300": isValid(),
|
|
7090
|
+
"bg-base-200 cursor-not-allowed": context.disabled(),
|
|
7091
|
+
"bg-base-100 text-base-content": !context.disabled()
|
|
7092
|
+
}));
|
|
7093
|
+
const selectClasses = ()=>twMerge("px-3 py-2 text-sm border border-l-0 rounded-r focus:outline-none focus:ring-2 focus:ring-primary bg-base-100 text-base-content border-base-300", clsx({
|
|
7094
|
+
"bg-base-200 cursor-not-allowed": context.disabled()
|
|
7095
|
+
}));
|
|
7096
|
+
return (()=>{
|
|
7097
|
+
var _el$ = ColorInput_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7098
|
+
_el$2.addEventListener("blur", handleBlur);
|
|
7099
|
+
_el$2.$$keydown = handleKeyDown;
|
|
7100
|
+
_el$2.$$input = handleInput;
|
|
7101
|
+
_el$3.addEventListener("change", handleFormatChange);
|
|
7102
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
7103
|
+
var _v$ = twMerge("flex w-full", props.class, props.className), _v$2 = context.disabled(), _v$3 = inputClasses(), _v$4 = !isValid(), _v$5 = context.disabled(), _v$6 = selectClasses();
|
|
7104
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
7105
|
+
_v$2 !== _p$.t && (_el$2.disabled = _p$.t = _v$2);
|
|
7106
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.a = _v$3);
|
|
7107
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "aria-invalid", _p$.o = _v$4);
|
|
7108
|
+
_v$5 !== _p$.i && (_el$3.disabled = _p$.i = _v$5);
|
|
7109
|
+
_v$6 !== _p$.n && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$3, _p$.n = _v$6);
|
|
7110
|
+
return _p$;
|
|
7111
|
+
}, {
|
|
7112
|
+
e: void 0,
|
|
7113
|
+
t: void 0,
|
|
7114
|
+
a: void 0,
|
|
7115
|
+
o: void 0,
|
|
7116
|
+
i: void 0,
|
|
7117
|
+
n: void 0
|
|
7118
|
+
});
|
|
7119
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$2.value = inputValue());
|
|
7120
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$3.value = context.format());
|
|
7121
|
+
return _el$;
|
|
7122
|
+
})();
|
|
7123
|
+
};
|
|
7124
|
+
const colorpicker_ColorInput = ColorInput;
|
|
7125
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
7126
|
+
"input",
|
|
7127
|
+
"keydown"
|
|
7128
|
+
]);
|
|
7129
|
+
var ColorPreview_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<button type=button><div class="w-full h-full relative">'), ColorPreview_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="absolute inset-0">');
|
|
7130
|
+
const ColorPreview = (props)=>{
|
|
7131
|
+
const classes = ()=>twMerge("w-10 h-10 rounded border-2 cursor-pointer transition-all duration-150 overflow-hidden", clsx({
|
|
7132
|
+
"border-base-300 hover:scale-110 hover:shadow-lg": !props.disabled,
|
|
7133
|
+
"border-base-200 opacity-50 cursor-not-allowed": props.disabled
|
|
7134
|
+
}), props.class, props.className);
|
|
7135
|
+
const hasAlpha = ()=>props.color.hsl.a < 1;
|
|
7136
|
+
return (()=>{
|
|
7137
|
+
var _el$ = ColorPreview_tmpl$(), _el$2 = _el$.firstChild;
|
|
7138
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.addEventListener)(_el$, "click", props.onClick, true);
|
|
7139
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (()=>{
|
|
7140
|
+
var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!hasAlpha());
|
|
7141
|
+
return ()=>_c$() && (()=>{
|
|
7142
|
+
var _el$3 = ColorPreview_tmpl$2();
|
|
7143
|
+
_el$3.style.setProperty("background-image", "linear-gradient(45deg, hsl(var(--b3)) 25%, transparent 25%), linear-gradient(-45deg, hsl(var(--b3)) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, hsl(var(--b3)) 75%), linear-gradient(-45deg, transparent 75%, hsl(var(--b3)) 75%)");
|
|
7144
|
+
_el$3.style.setProperty("background-size", "8px 8px");
|
|
7145
|
+
_el$3.style.setProperty("background-position", "0 0, 0 4px, 4px -4px, -4px 0px");
|
|
7146
|
+
return _el$3;
|
|
7147
|
+
})();
|
|
7148
|
+
})(), _el$2);
|
|
7149
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
7150
|
+
var _v$ = classes(), _v$2 = props.disabled, _v$3 = `Current color: ${formatColor(props.color, "hex")}`, _v$4 = props.disabled ? -1 : 0, _v$5 = `rgba(${props.color.rgb.r}, ${props.color.rgb.g}, ${props.color.rgb.b}, ${props.color.rgb.a})`;
|
|
7151
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$);
|
|
7152
|
+
_v$2 !== _p$.t && (_el$.disabled = _p$.t = _v$2);
|
|
7153
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "aria-label", _p$.a = _v$3);
|
|
7154
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "tabindex", _p$.o = _v$4);
|
|
7155
|
+
_v$5 !== _p$.i && (null != (_p$.i = _v$5) ? _el$2.style.setProperty("background-color", _v$5) : _el$2.style.removeProperty("background-color"));
|
|
7156
|
+
return _p$;
|
|
7157
|
+
}, {
|
|
7158
|
+
e: void 0,
|
|
7159
|
+
t: void 0,
|
|
7160
|
+
a: void 0,
|
|
7161
|
+
o: void 0,
|
|
7162
|
+
i: void 0
|
|
7163
|
+
});
|
|
7164
|
+
return _el$;
|
|
7165
|
+
})();
|
|
7166
|
+
};
|
|
7167
|
+
const colorpicker_ColorPreview = ColorPreview;
|
|
7168
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
7169
|
+
"click"
|
|
7170
|
+
]);
|
|
7171
|
+
const immediateDriver = ({ to, onUpdate, onComplete })=>{
|
|
7172
|
+
onUpdate(to);
|
|
7173
|
+
onComplete?.();
|
|
7174
|
+
return {
|
|
7175
|
+
stop: ()=>{}
|
|
7176
|
+
};
|
|
7177
|
+
};
|
|
7178
|
+
let activeDriver = immediateDriver;
|
|
7179
|
+
const setMotionDriver = (driver)=>{
|
|
7180
|
+
activeDriver = driver;
|
|
7181
|
+
};
|
|
7182
|
+
const getMotionDriver = ()=>activeDriver;
|
|
7183
|
+
const easeOutCubic = (t)=>1 - Math.pow(1 - t, 3);
|
|
7184
|
+
const easeInCubic = (t)=>t * t * t;
|
|
7185
|
+
const easeInOutCubic = (t)=>t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
|
|
7186
|
+
const resolveEase = (easing)=>{
|
|
7187
|
+
if ("function" == typeof easing) return easing;
|
|
7188
|
+
switch(easing){
|
|
7189
|
+
case "ease-in":
|
|
7190
|
+
return easeInCubic;
|
|
7191
|
+
case "ease-in-out":
|
|
7192
|
+
return easeInOutCubic;
|
|
7193
|
+
case "linear":
|
|
7194
|
+
return (t)=>t;
|
|
7195
|
+
case "ease-out":
|
|
7196
|
+
default:
|
|
7197
|
+
return easeOutCubic;
|
|
7198
|
+
}
|
|
7199
|
+
};
|
|
7200
|
+
const resolveDuration = (transition)=>Math.max(0, (transition?.duration ?? 0) * 1000);
|
|
7201
|
+
const resolveDelay = (transition)=>Math.max(0, (transition?.delay ?? 0) * 1000);
|
|
7202
|
+
const readOpacity = (el)=>{
|
|
7203
|
+
const value = Number.parseFloat(getComputedStyle(el).opacity);
|
|
7204
|
+
return Number.isFinite(value) ? value : 1;
|
|
7205
|
+
};
|
|
7206
|
+
const runMotion = (el, from, to, transition, onComplete)=>{
|
|
7207
|
+
const duration = resolveDuration(transition);
|
|
7208
|
+
const delay = resolveDelay(transition);
|
|
7209
|
+
const ease = resolveEase(transition?.easing);
|
|
7210
|
+
const driver = getMotionDriver();
|
|
7211
|
+
const controls = [];
|
|
7212
|
+
const shouldTransform = void 0 !== from.x || void 0 !== from.y || void 0 !== from.scale || void 0 !== to.x || void 0 !== to.y || void 0 !== to.scale;
|
|
7213
|
+
const transformState = {
|
|
7214
|
+
x: from.x ?? 0,
|
|
7215
|
+
y: from.y ?? 0,
|
|
7216
|
+
scale: from.scale ?? 1
|
|
7217
|
+
};
|
|
7218
|
+
const applyTransform = ()=>{
|
|
7219
|
+
if (!shouldTransform) return;
|
|
7220
|
+
el.style.transform = `translate3d(${transformState.x}px, ${transformState.y}px, 0) scale(${transformState.scale})`;
|
|
7221
|
+
};
|
|
7222
|
+
if (void 0 !== from.opacity) el.style.opacity = String(from.opacity);
|
|
7223
|
+
applyTransform();
|
|
7224
|
+
const animationTargets = Object.keys(to);
|
|
7225
|
+
if (0 === animationTargets.length) {
|
|
7226
|
+
onComplete?.();
|
|
7227
|
+
return {
|
|
7228
|
+
stop: ()=>{}
|
|
7229
|
+
};
|
|
7230
|
+
}
|
|
7231
|
+
let remaining = animationTargets.length;
|
|
7232
|
+
const handleComplete = ()=>{
|
|
7233
|
+
remaining -= 1;
|
|
7234
|
+
if (remaining <= 0) onComplete?.();
|
|
7235
|
+
};
|
|
7236
|
+
const start = ()=>{
|
|
7237
|
+
animationTargets.forEach((key)=>{
|
|
7238
|
+
if ("opacity" === key) {
|
|
7239
|
+
const fromValue = from.opacity ?? (void 0 !== to.opacity ? readOpacity(el) : 1);
|
|
7240
|
+
const control = driver({
|
|
7241
|
+
from: fromValue,
|
|
7242
|
+
to: to.opacity ?? fromValue,
|
|
7243
|
+
duration,
|
|
7244
|
+
ease,
|
|
7245
|
+
onUpdate: (latest)=>{
|
|
7246
|
+
el.style.opacity = String(latest);
|
|
7247
|
+
},
|
|
7248
|
+
onComplete: handleComplete
|
|
7249
|
+
});
|
|
7250
|
+
controls.push(control);
|
|
7251
|
+
return;
|
|
7252
|
+
}
|
|
7253
|
+
const fromValue = "scale" === key ? from.scale ?? 1 : "x" === key ? from.x ?? 0 : from.y ?? 0;
|
|
7254
|
+
const toValue = to[key] ?? fromValue;
|
|
7255
|
+
const control = driver({
|
|
7256
|
+
from: fromValue,
|
|
7257
|
+
to: toValue,
|
|
7258
|
+
duration,
|
|
7259
|
+
ease,
|
|
7260
|
+
onUpdate: (latest)=>{
|
|
7261
|
+
if (!shouldTransform) return;
|
|
7262
|
+
if ("x" === key) transformState.x = latest;
|
|
7263
|
+
if ("y" === key) transformState.y = latest;
|
|
7264
|
+
if ("scale" === key) transformState.scale = latest;
|
|
7265
|
+
applyTransform();
|
|
7266
|
+
},
|
|
7267
|
+
onComplete: handleComplete
|
|
7268
|
+
});
|
|
7269
|
+
controls.push(control);
|
|
7270
|
+
});
|
|
7271
|
+
};
|
|
7272
|
+
let timeoutId = null;
|
|
7273
|
+
if (delay > 0) timeoutId = window.setTimeout(start, delay);
|
|
7274
|
+
else start();
|
|
7275
|
+
return {
|
|
7276
|
+
stop: ()=>{
|
|
7277
|
+
if (null !== timeoutId) clearTimeout(timeoutId);
|
|
7278
|
+
controls.forEach((control)=>control.stop());
|
|
7279
|
+
}
|
|
7280
|
+
};
|
|
7281
|
+
};
|
|
7282
|
+
var MotionDiv_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
7283
|
+
const MotionDiv_MotionDiv = (props)=>{
|
|
7284
|
+
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
7285
|
+
"initial",
|
|
7286
|
+
"animate",
|
|
7287
|
+
"exit",
|
|
7288
|
+
"transition",
|
|
7289
|
+
"isExiting",
|
|
7290
|
+
"onExitComplete",
|
|
7291
|
+
"animateKey",
|
|
7292
|
+
"children",
|
|
7293
|
+
"ref"
|
|
7294
|
+
]);
|
|
7295
|
+
const [elementRef, setElementRef] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(void 0);
|
|
7296
|
+
let activeControl = null;
|
|
7297
|
+
let lastTrigger;
|
|
7298
|
+
let lastIsExiting = false;
|
|
7299
|
+
let hasAnimated = false;
|
|
7300
|
+
const stopActive = ()=>{
|
|
7301
|
+
activeControl?.stop();
|
|
7302
|
+
activeControl = null;
|
|
7303
|
+
};
|
|
7304
|
+
const runEnter = (target, from, to, transition)=>{
|
|
7305
|
+
if (!to) return;
|
|
7306
|
+
stopActive();
|
|
7307
|
+
activeControl = runMotion(target, from ?? {}, to ?? {}, transition);
|
|
7308
|
+
};
|
|
7309
|
+
const runExit = (target, from, to, transition, onComplete)=>{
|
|
7310
|
+
if (!to) return void onComplete?.();
|
|
7311
|
+
stopActive();
|
|
7312
|
+
activeControl = runMotion(target, from ?? {}, to ?? {}, transition, onComplete);
|
|
7313
|
+
};
|
|
7314
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
7315
|
+
const target = elementRef();
|
|
7316
|
+
if (!target) return;
|
|
7317
|
+
const isExiting = Boolean(local.isExiting);
|
|
7318
|
+
const trigger = local.animateKey;
|
|
7319
|
+
const initial = local.initial;
|
|
7320
|
+
const animate = local.animate;
|
|
7321
|
+
const exit = local.exit;
|
|
7322
|
+
const transition = local.transition;
|
|
7323
|
+
const onComplete = local.onExitComplete;
|
|
7324
|
+
if (isExiting) {
|
|
7325
|
+
if (!lastIsExiting) {
|
|
7326
|
+
lastIsExiting = true;
|
|
7327
|
+
hasAnimated = false;
|
|
7328
|
+
runExit(target, animate ?? initial, exit, transition, onComplete);
|
|
7329
|
+
}
|
|
7330
|
+
return;
|
|
7331
|
+
}
|
|
7332
|
+
lastIsExiting = false;
|
|
7333
|
+
if (!hasAnimated || trigger !== lastTrigger) {
|
|
7334
|
+
lastTrigger = trigger;
|
|
7335
|
+
hasAnimated = true;
|
|
7336
|
+
runEnter(target, initial, animate, transition);
|
|
7337
|
+
}
|
|
7338
|
+
});
|
|
7339
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
7340
|
+
stopActive();
|
|
7341
|
+
});
|
|
7342
|
+
return (()=>{
|
|
7343
|
+
var _el$ = MotionDiv_tmpl$();
|
|
7344
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)((el)=>{
|
|
7345
|
+
setElementRef(el);
|
|
7346
|
+
if ("function" == typeof local.ref) local.ref(el);
|
|
7347
|
+
}, _el$);
|
|
7348
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, rest, false, true);
|
|
7349
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
7350
|
+
return _el$;
|
|
7351
|
+
})();
|
|
7352
|
+
};
|
|
7353
|
+
const MotionDiv = MotionDiv_MotionDiv;
|
|
7354
|
+
const prefersReducedMotion = ()=>globalThis.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches ?? false;
|
|
7355
|
+
const motionDurations = {
|
|
7356
|
+
route: 0.18,
|
|
7357
|
+
routeAuth: 0.35,
|
|
7358
|
+
fast: 0.2,
|
|
7359
|
+
base: 0.3,
|
|
7360
|
+
slow: 0.45
|
|
7361
|
+
};
|
|
7362
|
+
const motionEasings = {
|
|
7363
|
+
out: "ease-out",
|
|
7364
|
+
inOut: "ease-in-out"
|
|
7365
|
+
};
|
|
7366
|
+
const motionDistances = {
|
|
7367
|
+
sm: 6,
|
|
7368
|
+
md: 12,
|
|
7369
|
+
lg: 20,
|
|
7370
|
+
slideIn: 40
|
|
7371
|
+
};
|
|
7372
|
+
const defaultMotionTokens = {
|
|
7373
|
+
durations: {
|
|
7374
|
+
...motionDurations
|
|
7375
|
+
},
|
|
7376
|
+
easings: {
|
|
7377
|
+
...motionEasings
|
|
7378
|
+
},
|
|
7379
|
+
distances: {
|
|
7380
|
+
...motionDistances
|
|
7381
|
+
}
|
|
7382
|
+
};
|
|
7383
|
+
const mergeDefined = (base, overrides)=>{
|
|
7384
|
+
const next = {
|
|
7385
|
+
...base
|
|
7386
|
+
};
|
|
7387
|
+
if (!overrides) return next;
|
|
7388
|
+
for (const [key, value] of Object.entries(overrides))if (void 0 !== value) next[key] = value;
|
|
7389
|
+
return next;
|
|
7390
|
+
};
|
|
7391
|
+
const mergeMotionTokens = (base, overrides)=>({
|
|
7392
|
+
durations: mergeDefined(base.durations, overrides?.durations),
|
|
7393
|
+
easings: mergeDefined(base.easings, overrides?.easings),
|
|
7394
|
+
distances: mergeDefined(base.distances, overrides?.distances)
|
|
7395
|
+
});
|
|
7396
|
+
const createMotionPresets = (tokens)=>{
|
|
7397
|
+
const durations = tokens.durations;
|
|
7398
|
+
const easings = tokens.easings;
|
|
7399
|
+
const distances = tokens.distances;
|
|
7400
|
+
return {
|
|
7401
|
+
route: {
|
|
7402
|
+
initial: {
|
|
7403
|
+
opacity: 0
|
|
7404
|
+
},
|
|
7405
|
+
animate: {
|
|
7406
|
+
opacity: 1
|
|
7407
|
+
},
|
|
7408
|
+
exit: {
|
|
7409
|
+
opacity: 0
|
|
7410
|
+
},
|
|
7411
|
+
transition: {
|
|
7412
|
+
duration: durations.route,
|
|
7413
|
+
easing: easings.out
|
|
7414
|
+
}
|
|
7415
|
+
},
|
|
7416
|
+
routeAuth: {
|
|
7417
|
+
initial: {
|
|
7418
|
+
opacity: 0,
|
|
7419
|
+
x: distances.slideIn
|
|
7420
|
+
},
|
|
7421
|
+
animate: {
|
|
7422
|
+
opacity: 1,
|
|
7423
|
+
x: 0
|
|
7424
|
+
},
|
|
7425
|
+
exit: {
|
|
7426
|
+
opacity: 0,
|
|
7427
|
+
x: -distances.slideIn
|
|
7428
|
+
},
|
|
7429
|
+
transition: {
|
|
7430
|
+
duration: durations.routeAuth,
|
|
7431
|
+
easing: easings.inOut
|
|
7432
|
+
}
|
|
7433
|
+
},
|
|
7434
|
+
routeAuthBack: {
|
|
7435
|
+
initial: {
|
|
7436
|
+
opacity: 0,
|
|
7437
|
+
x: -distances.slideIn
|
|
7438
|
+
},
|
|
7439
|
+
animate: {
|
|
7440
|
+
opacity: 1,
|
|
7441
|
+
x: 0
|
|
7442
|
+
},
|
|
7443
|
+
exit: {
|
|
7444
|
+
opacity: 0,
|
|
7445
|
+
x: distances.slideIn
|
|
7446
|
+
},
|
|
7447
|
+
transition: {
|
|
7448
|
+
duration: durations.routeAuth,
|
|
7449
|
+
easing: easings.inOut
|
|
7450
|
+
}
|
|
7451
|
+
},
|
|
7452
|
+
authSwap: {
|
|
7453
|
+
initial: {
|
|
7454
|
+
opacity: 0.92
|
|
7455
|
+
},
|
|
7456
|
+
animate: {
|
|
7457
|
+
opacity: 1
|
|
7458
|
+
},
|
|
7459
|
+
exit: {
|
|
7460
|
+
opacity: 0.92
|
|
7461
|
+
},
|
|
7462
|
+
transition: {
|
|
7463
|
+
duration: durations.fast,
|
|
7464
|
+
easing: easings.out
|
|
7465
|
+
}
|
|
7466
|
+
},
|
|
7467
|
+
fade: {
|
|
7468
|
+
initial: {
|
|
7469
|
+
opacity: 0
|
|
7470
|
+
},
|
|
7471
|
+
animate: {
|
|
7472
|
+
opacity: 1
|
|
7473
|
+
},
|
|
7474
|
+
exit: {
|
|
7475
|
+
opacity: 0
|
|
7476
|
+
},
|
|
7477
|
+
transition: {
|
|
7478
|
+
duration: durations.base,
|
|
7479
|
+
easing: easings.out,
|
|
7480
|
+
delay: 0.08
|
|
7481
|
+
}
|
|
7482
|
+
},
|
|
7483
|
+
fadeUp: {
|
|
7484
|
+
initial: {
|
|
7485
|
+
opacity: 0,
|
|
7486
|
+
y: distances.sm
|
|
7487
|
+
},
|
|
7488
|
+
animate: {
|
|
7489
|
+
opacity: 1,
|
|
7490
|
+
y: 0
|
|
7491
|
+
},
|
|
7492
|
+
exit: {
|
|
7493
|
+
opacity: 0,
|
|
7494
|
+
y: -distances.sm
|
|
7495
|
+
},
|
|
7496
|
+
transition: {
|
|
7497
|
+
duration: durations.base,
|
|
7498
|
+
easing: easings.out,
|
|
7499
|
+
delay: 0.08
|
|
7500
|
+
}
|
|
7501
|
+
},
|
|
7502
|
+
scaleIn: {
|
|
7503
|
+
initial: {
|
|
7504
|
+
opacity: 0,
|
|
7505
|
+
scale: 0.96
|
|
7506
|
+
},
|
|
7507
|
+
animate: {
|
|
7508
|
+
opacity: 1,
|
|
7509
|
+
scale: 1
|
|
7510
|
+
},
|
|
7511
|
+
exit: {
|
|
7512
|
+
opacity: 0,
|
|
7513
|
+
scale: 0.96
|
|
7514
|
+
},
|
|
7515
|
+
transition: {
|
|
7516
|
+
duration: durations.fast,
|
|
7517
|
+
easing: easings.out,
|
|
7518
|
+
delay: 0.08
|
|
7519
|
+
}
|
|
7520
|
+
},
|
|
7521
|
+
toast: {
|
|
7522
|
+
initial: {
|
|
7523
|
+
opacity: 0,
|
|
7524
|
+
y: distances.sm
|
|
7525
|
+
},
|
|
7526
|
+
animate: {
|
|
7527
|
+
opacity: 1,
|
|
7528
|
+
y: 0
|
|
7529
|
+
},
|
|
7530
|
+
exit: {
|
|
7531
|
+
opacity: 0,
|
|
7532
|
+
y: -distances.sm
|
|
7533
|
+
},
|
|
7534
|
+
transition: {
|
|
7535
|
+
duration: durations.fast,
|
|
7536
|
+
easing: easings.out
|
|
7537
|
+
}
|
|
7538
|
+
},
|
|
7539
|
+
routeDashboard: {
|
|
7540
|
+
initial: {
|
|
7541
|
+
opacity: 0,
|
|
7542
|
+
y: distances.md,
|
|
7543
|
+
scale: 0.985
|
|
7544
|
+
},
|
|
7545
|
+
animate: {
|
|
7546
|
+
opacity: 1,
|
|
7547
|
+
y: 0,
|
|
7548
|
+
scale: 1
|
|
7549
|
+
},
|
|
7550
|
+
exit: {
|
|
7551
|
+
opacity: 0,
|
|
7552
|
+
y: -distances.sm,
|
|
7553
|
+
scale: 0.985
|
|
7554
|
+
},
|
|
7555
|
+
transition: {
|
|
7556
|
+
duration: durations.route,
|
|
7557
|
+
easing: easings.out
|
|
7558
|
+
}
|
|
7559
|
+
}
|
|
7560
|
+
};
|
|
7561
|
+
};
|
|
7562
|
+
const motionPresets = createMotionPresets(defaultMotionTokens);
|
|
7563
|
+
const routeTransition = motionPresets.route;
|
|
7564
|
+
const noMotion = {
|
|
7565
|
+
initial: {
|
|
7566
|
+
opacity: 1,
|
|
7567
|
+
y: 0,
|
|
7568
|
+
x: 0,
|
|
7569
|
+
scale: 1
|
|
7570
|
+
},
|
|
7571
|
+
animate: {
|
|
7572
|
+
opacity: 1,
|
|
7573
|
+
y: 0,
|
|
7574
|
+
x: 0,
|
|
7575
|
+
scale: 1
|
|
7576
|
+
},
|
|
7577
|
+
exit: {
|
|
7578
|
+
opacity: 1,
|
|
7579
|
+
y: 0,
|
|
7580
|
+
x: 0,
|
|
7581
|
+
scale: 1
|
|
7582
|
+
},
|
|
7583
|
+
transition: {
|
|
7584
|
+
duration: 0
|
|
7585
|
+
}
|
|
7586
|
+
};
|
|
7587
|
+
const presets_getPreset = (name)=>motionPresets[name];
|
|
7588
|
+
const presets_registerPreset = (name, preset)=>{
|
|
7589
|
+
motionPresets[name] = preset;
|
|
7590
|
+
};
|
|
7591
|
+
const presets_resolvePreset = (name, options)=>{
|
|
7592
|
+
const reduce = options?.reduceMotion ?? prefersReducedMotion();
|
|
7593
|
+
if (reduce) return noMotion;
|
|
7594
|
+
return motionPresets[name] ?? noMotion;
|
|
7595
|
+
};
|
|
7596
|
+
var ColorPicker_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="flex p-1 mb-3 bg-base-200 rounded-md"><button type=button>Gradient</button><button type=button>Wheel'), ColorPicker_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="pt-2 border-t border-base-300">'), ColorPicker_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div class=space-y-4>"), ColorPicker_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="fixed inset-0 z-40"aria-hidden=true>'), _tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
7597
|
+
const DEFAULT_SWATCHES = [
|
|
7598
|
+
"#FF6B6B",
|
|
7599
|
+
"#4ECDC4",
|
|
7600
|
+
"#45B7D1",
|
|
7601
|
+
"#FFA07A",
|
|
7602
|
+
"#98D8C8",
|
|
7603
|
+
"#F7DC6F",
|
|
7604
|
+
"#BB8FCE",
|
|
7605
|
+
"#85929E",
|
|
7606
|
+
"#FF5733",
|
|
7607
|
+
"#C70039",
|
|
7608
|
+
"#900C3F",
|
|
7609
|
+
"#581845",
|
|
7610
|
+
"#2ECC71",
|
|
7611
|
+
"#3498DB",
|
|
7612
|
+
"#9B59B6",
|
|
7613
|
+
"#E74C3C"
|
|
7614
|
+
];
|
|
7615
|
+
const ColorPicker = (props)=>{
|
|
7616
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
7617
|
+
"value",
|
|
7618
|
+
"onChange",
|
|
7619
|
+
"format",
|
|
7620
|
+
"disabled",
|
|
7621
|
+
"swatches",
|
|
7622
|
+
"showAlpha",
|
|
7623
|
+
"placement",
|
|
7624
|
+
"initialMode",
|
|
7625
|
+
"class",
|
|
7626
|
+
"className",
|
|
7627
|
+
"dataTheme",
|
|
7628
|
+
"style",
|
|
7629
|
+
"aria-label"
|
|
7630
|
+
]);
|
|
7631
|
+
const [isOpen, setIsOpen] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
7632
|
+
const [internalColor, setInternalColor] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(getDefaultColor());
|
|
7633
|
+
const [currentFormat, setCurrentFormat] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(local.format || "hex");
|
|
7634
|
+
const [mode, setMode] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(local.initialMode || "picker");
|
|
7635
|
+
let containerRef;
|
|
7636
|
+
const color = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
7637
|
+
if (local.value) {
|
|
7638
|
+
const parsed = parseColor(local.value);
|
|
7639
|
+
if (parsed) {
|
|
7640
|
+
setInternalColor(parsed);
|
|
7641
|
+
return parsed;
|
|
7642
|
+
}
|
|
7643
|
+
}
|
|
7644
|
+
return internalColor();
|
|
7645
|
+
});
|
|
7646
|
+
const handleColorChange = (newColor)=>{
|
|
7647
|
+
setInternalColor(newColor);
|
|
7648
|
+
if (local.onChange) {
|
|
7649
|
+
const formatted = formatColor(newColor, currentFormat());
|
|
7650
|
+
local.onChange(formatted);
|
|
7651
|
+
}
|
|
7652
|
+
};
|
|
7653
|
+
const handleFormatChange = (newFormat)=>{
|
|
7654
|
+
setCurrentFormat(newFormat);
|
|
7655
|
+
if (local.onChange) {
|
|
7656
|
+
const formatted = formatColor(color(), newFormat);
|
|
7657
|
+
local.onChange(formatted);
|
|
7658
|
+
}
|
|
7659
|
+
};
|
|
7660
|
+
const togglePicker = ()=>{
|
|
7661
|
+
if (!local.disabled) setIsOpen(!isOpen());
|
|
7662
|
+
};
|
|
7663
|
+
const handleKeyDown = (e)=>{
|
|
7664
|
+
if ("Escape" === e.key && isOpen()) {
|
|
7665
|
+
setIsOpen(false);
|
|
7666
|
+
e.preventDefault();
|
|
7667
|
+
}
|
|
7668
|
+
};
|
|
7669
|
+
const contextValue = {
|
|
7670
|
+
color,
|
|
7671
|
+
format: currentFormat,
|
|
7672
|
+
disabled: ()=>local.disabled || false,
|
|
7673
|
+
onChange: handleColorChange,
|
|
7674
|
+
onFormatChange: handleFormatChange
|
|
7675
|
+
};
|
|
7676
|
+
const containerClasses = ()=>twMerge("relative inline-block", clsx({
|
|
7677
|
+
"opacity-50": local.disabled
|
|
7678
|
+
}), local.class, local.className);
|
|
7679
|
+
const popoverClasses = ()=>{
|
|
7680
|
+
const base = "z-50 p-4 bg-base-100 rounded-lg shadow-xl border border-base-300 min-w-[280px]";
|
|
7681
|
+
return twMerge(base, "absolute mt-2", clsx({
|
|
7682
|
+
"bottom-full mb-2 mt-0": "top" === local.placement,
|
|
7683
|
+
"top-full mt-2": "bottom" === local.placement || !local.placement,
|
|
7684
|
+
"right-full mr-2": "left" === local.placement,
|
|
7685
|
+
"left-full ml-2": "right" === local.placement
|
|
7686
|
+
}));
|
|
7687
|
+
};
|
|
7688
|
+
const ModeSwitcher = ()=>(()=>{
|
|
7689
|
+
var _el$ = ColorPicker_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7690
|
+
_el$2.$$click = ()=>setMode("picker");
|
|
7691
|
+
_el$3.$$click = ()=>setMode("wheel");
|
|
7692
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
7693
|
+
var _v$ = clsx("flex-1 px-3 py-1 text-xs font-medium rounded-sm transition-colors", {
|
|
7694
|
+
"bg-base-100 shadow-sm text-base-content": "picker" === mode(),
|
|
7695
|
+
"text-base-content/60 hover:text-base-content": "picker" !== mode()
|
|
7696
|
+
}), _v$2 = clsx("flex-1 px-3 py-1 text-xs font-medium rounded-sm transition-colors", {
|
|
7697
|
+
"bg-base-100 shadow-sm text-base-content": "wheel" === mode(),
|
|
7698
|
+
"text-base-content/60 hover:text-base-content": "wheel" !== mode()
|
|
7699
|
+
});
|
|
7700
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, _p$.e = _v$);
|
|
7701
|
+
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$3, _p$.t = _v$2);
|
|
7702
|
+
return _p$;
|
|
7703
|
+
}, {
|
|
7704
|
+
e: void 0,
|
|
7705
|
+
t: void 0
|
|
7706
|
+
});
|
|
7707
|
+
return _el$;
|
|
7708
|
+
})();
|
|
7709
|
+
const PopoverContent = ()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(MotionDiv, {
|
|
7710
|
+
get initial () {
|
|
7711
|
+
return motionPresets.fadeUp.initial;
|
|
7712
|
+
},
|
|
7713
|
+
get animate () {
|
|
7714
|
+
return motionPresets.fadeUp.animate;
|
|
7715
|
+
},
|
|
7716
|
+
get exit () {
|
|
7717
|
+
return motionPresets.fadeUp.exit;
|
|
7718
|
+
},
|
|
7719
|
+
get transition () {
|
|
7720
|
+
return motionPresets.fadeUp.transition;
|
|
7721
|
+
},
|
|
7722
|
+
get ["class"] () {
|
|
7723
|
+
return popoverClasses();
|
|
7724
|
+
},
|
|
7725
|
+
get children () {
|
|
7726
|
+
return [
|
|
7727
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(ModeSwitcher, {}),
|
|
7728
|
+
(()=>{
|
|
7729
|
+
var _el$4 = ColorPicker_tmpl$3();
|
|
7730
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
7731
|
+
get when () {
|
|
7732
|
+
return "picker" === mode();
|
|
7733
|
+
},
|
|
7734
|
+
get children () {
|
|
7735
|
+
return [
|
|
7736
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(colorpicker_SaturationBrightness, {}),
|
|
7737
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(colorpicker_HueSlider, {})
|
|
7738
|
+
];
|
|
7739
|
+
}
|
|
7740
|
+
}), null);
|
|
7741
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
7742
|
+
get when () {
|
|
7743
|
+
return "wheel" === mode();
|
|
7744
|
+
},
|
|
7745
|
+
get children () {
|
|
7746
|
+
return [
|
|
7747
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(ColorWheel, {}),
|
|
7748
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(LightnessSlider, {})
|
|
7749
|
+
];
|
|
7750
|
+
}
|
|
7751
|
+
}), null);
|
|
7752
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
7753
|
+
get when () {
|
|
7754
|
+
return local.showAlpha;
|
|
7755
|
+
},
|
|
7756
|
+
get children () {
|
|
7757
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(AlphaSlider, {});
|
|
7758
|
+
}
|
|
7759
|
+
}), null);
|
|
7760
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(colorpicker_ColorInput, {}), null);
|
|
7761
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
7762
|
+
get when () {
|
|
7763
|
+
return local.swatches || DEFAULT_SWATCHES;
|
|
7764
|
+
},
|
|
7765
|
+
get children () {
|
|
7766
|
+
var _el$5 = ColorPicker_tmpl$2();
|
|
7767
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$5, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(colorpicker_ColorSwatches, {
|
|
7768
|
+
get swatches () {
|
|
7769
|
+
return local.swatches || DEFAULT_SWATCHES;
|
|
7770
|
+
}
|
|
7771
|
+
}));
|
|
7772
|
+
return _el$5;
|
|
7773
|
+
}
|
|
7774
|
+
}), null);
|
|
7775
|
+
return _el$4;
|
|
7776
|
+
})()
|
|
7777
|
+
];
|
|
7778
|
+
}
|
|
7779
|
+
});
|
|
7780
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(ColorPickerContext.Provider, {
|
|
7781
|
+
value: contextValue,
|
|
7782
|
+
get children () {
|
|
7783
|
+
var _el$6 = _tmpl$5();
|
|
7784
|
+
_el$6.$$keydown = handleKeyDown;
|
|
7785
|
+
var _ref$ = containerRef;
|
|
7786
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$6) : containerRef = _el$6;
|
|
7787
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
7788
|
+
get ["class"] () {
|
|
7789
|
+
return containerClasses();
|
|
7790
|
+
},
|
|
7791
|
+
get ["data-theme"] () {
|
|
7792
|
+
return local.dataTheme;
|
|
7793
|
+
},
|
|
7794
|
+
get style () {
|
|
7795
|
+
return local.style;
|
|
7796
|
+
}
|
|
7797
|
+
}, others), false, true);
|
|
7798
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(colorpicker_ColorPreview, {
|
|
7799
|
+
get color () {
|
|
7800
|
+
return color();
|
|
7801
|
+
},
|
|
7802
|
+
get disabled () {
|
|
7803
|
+
return local.disabled;
|
|
7804
|
+
},
|
|
7805
|
+
onClick: togglePicker,
|
|
7806
|
+
get ["aria-label"] () {
|
|
7807
|
+
return local["aria-label"] || "Color picker";
|
|
7808
|
+
}
|
|
7809
|
+
}), null);
|
|
7810
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
7811
|
+
get when () {
|
|
7812
|
+
return isOpen() && !local.disabled;
|
|
7813
|
+
},
|
|
7814
|
+
get children () {
|
|
7815
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(PopoverContent, {});
|
|
7816
|
+
}
|
|
7817
|
+
}), null);
|
|
7818
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
7819
|
+
get when () {
|
|
7820
|
+
return isOpen() && !local.disabled;
|
|
7821
|
+
},
|
|
7822
|
+
get children () {
|
|
7823
|
+
var _el$7 = ColorPicker_tmpl$4();
|
|
7824
|
+
_el$7.$$click = ()=>setIsOpen(false);
|
|
7825
|
+
return _el$7;
|
|
7826
|
+
}
|
|
7827
|
+
}), null);
|
|
7828
|
+
return _el$6;
|
|
7829
|
+
}
|
|
7830
|
+
});
|
|
7831
|
+
};
|
|
7832
|
+
const colorpicker_ColorPicker = ColorPicker;
|
|
7833
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
7834
|
+
"click",
|
|
7835
|
+
"keydown"
|
|
7836
|
+
]);
|
|
7837
|
+
var CodeMockup_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
7838
|
+
const CodeMockup = (props)=>{
|
|
7839
|
+
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
7840
|
+
"class",
|
|
7841
|
+
"className",
|
|
7842
|
+
"children",
|
|
7843
|
+
"dataTheme",
|
|
7844
|
+
"aria-label"
|
|
7845
|
+
]);
|
|
7846
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
7847
|
+
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("mockup-code w-full", local.class, local.className));
|
|
7848
|
+
return (()=>{
|
|
7849
|
+
var _el$ = CodeMockup_tmpl$();
|
|
7850
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
7851
|
+
get ["class"] () {
|
|
7852
|
+
return classes();
|
|
7853
|
+
},
|
|
7854
|
+
get ["data-theme"] () {
|
|
7855
|
+
return local.dataTheme;
|
|
7856
|
+
},
|
|
7857
|
+
get ["aria-label"] () {
|
|
7858
|
+
return local["aria-label"] || "Code mockup";
|
|
7859
|
+
}
|
|
7860
|
+
}, rest), false, true);
|
|
7861
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren);
|
|
7862
|
+
return _el$;
|
|
7863
|
+
})();
|
|
7864
|
+
};
|
|
7865
|
+
const codemockup_CodeMockup = CodeMockup;
|
|
7866
|
+
var CodeMockupLine_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<pre><code>");
|
|
7867
|
+
const CodeMockupLine_CodeMockupLine = (props)=>{
|
|
7868
|
+
const merged = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.mergeProps)({
|
|
7869
|
+
dataPrefix: ">",
|
|
7870
|
+
status: null,
|
|
7871
|
+
class: ""
|
|
7872
|
+
}, props);
|
|
7873
|
+
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(merged, [
|
|
7874
|
+
"dataPrefix",
|
|
7875
|
+
"status",
|
|
7876
|
+
"innerProps",
|
|
7877
|
+
"innerRef",
|
|
7878
|
+
"class",
|
|
7879
|
+
"children",
|
|
7880
|
+
"dataTheme"
|
|
7881
|
+
]);
|
|
7882
|
+
const statusClass = ()=>twMerge(dist_clsx({
|
|
7883
|
+
"bg-info": "info" === local.status,
|
|
7884
|
+
"bg-success": "success" === local.status,
|
|
7885
|
+
"bg-warning": "warning" === local.status,
|
|
7886
|
+
"bg-error": "error" === local.status,
|
|
7887
|
+
"text-info-content": "info" === local.status,
|
|
7888
|
+
"text-success-content": "success" === local.status,
|
|
7889
|
+
"text-warning-content": "warning" === local.status,
|
|
7890
|
+
"text-error-content": "error" === local.status
|
|
7891
|
+
}), local.class);
|
|
7892
|
+
const prefix = ()=>false !== local.dataPrefix ? local.dataPrefix || ">" : void 0;
|
|
7893
|
+
return (()=>{
|
|
7894
|
+
var _el$ = CodeMockupLine_tmpl$(), _el$2 = _el$.firstChild;
|
|
7895
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
7896
|
+
get ["class"] () {
|
|
7897
|
+
return statusClass();
|
|
7898
|
+
},
|
|
7899
|
+
get ["data-prefix"] () {
|
|
7900
|
+
return prefix();
|
|
7901
|
+
},
|
|
7902
|
+
get ["data-theme"] () {
|
|
7903
|
+
return local.dataTheme;
|
|
7904
|
+
}
|
|
7905
|
+
}, rest), false, true);
|
|
7906
|
+
var _ref$ = local.innerRef;
|
|
7907
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$2) : local.innerRef = _el$2;
|
|
7908
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$2, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(()=>local.innerProps), false, true);
|
|
7909
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.children);
|
|
7910
|
+
return _el$;
|
|
7911
|
+
})();
|
|
7912
|
+
};
|
|
7913
|
+
const CodeMockupLine = CodeMockupLine_CodeMockupLine;
|
|
7914
|
+
var CollapseDetails_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<details>");
|
|
7915
|
+
function CollapseDetails_classesFn({ className, icon, open }) {
|
|
7916
|
+
return twMerge("collapse", className, clsx({
|
|
7917
|
+
"collapse-arrow": "arrow" === icon,
|
|
7918
|
+
"collapse-plus": "plus" === icon,
|
|
7919
|
+
"collapse-open": true === open,
|
|
7920
|
+
"collapse-close": false === open
|
|
7921
|
+
}));
|
|
7922
|
+
}
|
|
7923
|
+
function CollapseDetails(props) {
|
|
7924
|
+
const classes = CollapseDetails_classesFn({
|
|
7925
|
+
className: props.class,
|
|
7926
|
+
icon: props.icon,
|
|
7927
|
+
open: props.open
|
|
7928
|
+
});
|
|
7929
|
+
return (()=>{
|
|
7930
|
+
var _el$ = CollapseDetails_tmpl$();
|
|
7931
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(props, {
|
|
7932
|
+
class: classes,
|
|
7933
|
+
get open () {
|
|
7934
|
+
return props.open;
|
|
7935
|
+
}
|
|
7936
|
+
}), false, true);
|
|
7937
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
|
|
7938
|
+
return _el$;
|
|
7939
|
+
})();
|
|
7940
|
+
}
|
|
7941
|
+
CollapseDetails.Title = Summary;
|
|
7942
|
+
var Collapse_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), Collapse_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<input type=checkbox class=peer>");
|
|
7943
|
+
const Collapse_classesFn = ({ className, icon, open })=>twMerge("collapse", className, clsx({
|
|
7944
|
+
"collapse-arrow": "arrow" === icon,
|
|
7945
|
+
"collapse-plus": "plus" === icon,
|
|
7946
|
+
"collapse-open": true === open,
|
|
7947
|
+
"collapse-close": false === open
|
|
7948
|
+
}));
|
|
7949
|
+
const Collapse = (props)=>{
|
|
7950
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
7951
|
+
"children",
|
|
7952
|
+
"checkbox",
|
|
7953
|
+
"icon",
|
|
7954
|
+
"open",
|
|
7955
|
+
"onOpen",
|
|
7956
|
+
"onClose",
|
|
7957
|
+
"onToggle",
|
|
7958
|
+
"dataTheme",
|
|
7959
|
+
"class",
|
|
7960
|
+
"className",
|
|
7961
|
+
"style"
|
|
7962
|
+
]);
|
|
7963
|
+
const [internalOpen, setInternalOpen] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
7964
|
+
const isControlled = void 0 !== local.open;
|
|
7965
|
+
const isChecked = ()=>isControlled ? local.open : internalOpen();
|
|
7966
|
+
const handleCheckboxChange = ()=>{
|
|
7967
|
+
if (local.onToggle) local.onToggle();
|
|
7968
|
+
if (isControlled) {
|
|
7969
|
+
if (local.open && local.onClose) local.onClose();
|
|
7970
|
+
if (!local.open && local.onOpen) local.onOpen();
|
|
7971
|
+
} else {
|
|
7972
|
+
const next = !internalOpen();
|
|
7973
|
+
setInternalOpen(next);
|
|
7974
|
+
if (next && local.onOpen) local.onOpen();
|
|
7975
|
+
if (!next && local.onClose) local.onClose();
|
|
7976
|
+
}
|
|
7977
|
+
};
|
|
7978
|
+
const handleBlur = (e)=>{
|
|
7979
|
+
if (!local.checkbox) {
|
|
7980
|
+
local.onToggle?.();
|
|
7981
|
+
local.onClose?.();
|
|
7982
|
+
}
|
|
7983
|
+
if ("function" == typeof others.onBlur) others.onBlur(e);
|
|
7984
|
+
};
|
|
7985
|
+
const handleFocus = (e)=>{
|
|
7986
|
+
if (!local.checkbox) {
|
|
7987
|
+
local.onToggle?.();
|
|
7988
|
+
local.onOpen?.();
|
|
7989
|
+
}
|
|
7990
|
+
if ("function" == typeof others.onFocus) others.onFocus(e);
|
|
7991
|
+
};
|
|
7992
|
+
return (()=>{
|
|
7993
|
+
var _el$ = Collapse_tmpl$();
|
|
7994
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
7995
|
+
get ["aria-expanded"] () {
|
|
7996
|
+
return local.open;
|
|
7997
|
+
}
|
|
7998
|
+
}, others, {
|
|
7999
|
+
get ["data-theme"] () {
|
|
8000
|
+
return local.dataTheme;
|
|
8001
|
+
},
|
|
8002
|
+
get ["class"] () {
|
|
8003
|
+
return Collapse_classesFn({
|
|
8004
|
+
className: twMerge(local.class, local.className),
|
|
8005
|
+
icon: local.icon,
|
|
8006
|
+
open: local.open
|
|
8007
|
+
});
|
|
8008
|
+
},
|
|
8009
|
+
get style () {
|
|
8010
|
+
return local.style;
|
|
8011
|
+
},
|
|
8012
|
+
get tabIndex () {
|
|
8013
|
+
return local.checkbox || isChecked() ? void 0 : 0;
|
|
8014
|
+
},
|
|
8015
|
+
onBlur: handleBlur,
|
|
8016
|
+
onFocus: handleFocus
|
|
8017
|
+
}), false, true);
|
|
8018
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (()=>{
|
|
8019
|
+
var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!local.checkbox);
|
|
8020
|
+
return ()=>_c$() && (()=>{
|
|
8021
|
+
var _el$2 = Collapse_tmpl$2();
|
|
8022
|
+
_el$2.addEventListener("change", handleCheckboxChange);
|
|
8023
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)((el)=>el, _el$2);
|
|
8024
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "tabindex", isChecked() ? 0 : void 0));
|
|
8025
|
+
return _el$2;
|
|
8026
|
+
})();
|
|
8027
|
+
})(), null);
|
|
8028
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children, null);
|
|
8029
|
+
return _el$;
|
|
8030
|
+
})();
|
|
8031
|
+
};
|
|
8032
|
+
const collapse_Collapse = Object.assign(Collapse, {
|
|
8033
|
+
Details: CollapseDetails,
|
|
8034
|
+
Title: CollapseTitle,
|
|
8035
|
+
Content: CollapseContent
|
|
8036
|
+
});
|
|
8037
|
+
const breakpoints = [
|
|
8038
|
+
"base",
|
|
8039
|
+
"sm",
|
|
8040
|
+
"md",
|
|
8041
|
+
"lg",
|
|
8042
|
+
"xl"
|
|
8043
|
+
];
|
|
8044
|
+
function isJSXElement(node) {
|
|
8045
|
+
return "object" == typeof node && null !== node;
|
|
8046
|
+
}
|
|
8047
|
+
function wrapWithElementIfInvalid({ node, wrapper = "div", className = "" }) {
|
|
8048
|
+
null == node || "string" == typeof node || "number" == typeof node || isJSXElement(node);
|
|
8049
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.Dynamic, {
|
|
8050
|
+
component: wrapper,
|
|
8051
|
+
class: className,
|
|
8052
|
+
children: node
|
|
8053
|
+
});
|
|
8054
|
+
}
|
|
8055
|
+
function mapResponsiveProp(prop, classMap) {
|
|
8056
|
+
if (void 0 === prop) return [];
|
|
8057
|
+
if ("string" == typeof prop || "boolean" == typeof prop) return [
|
|
8058
|
+
classMap[String(prop)]
|
|
8059
|
+
];
|
|
8060
|
+
return breakpoints.flatMap((bp)=>{
|
|
8061
|
+
const value = prop[bp];
|
|
8062
|
+
if (void 0 === value) return [];
|
|
8063
|
+
const className = classMap[String(value)];
|
|
8064
|
+
return "base" === bp ? [
|
|
8065
|
+
className
|
|
8066
|
+
] : [
|
|
8067
|
+
`${bp}:${className}`
|
|
8068
|
+
];
|
|
8069
|
+
});
|
|
8070
|
+
}
|
|
8071
|
+
function useDesktop(breakpoint = 1024) {
|
|
8072
|
+
const [isDesktop, setIsDesktop] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
8073
|
+
const checkIfDesktop = ()=>{
|
|
8074
|
+
const width = window.innerWidth;
|
|
8075
|
+
setIsDesktop(width >= breakpoint);
|
|
8076
|
+
};
|
|
8077
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
8078
|
+
checkIfDesktop();
|
|
8079
|
+
window.addEventListener("resize", checkIfDesktop);
|
|
8080
|
+
});
|
|
8081
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
8082
|
+
window.removeEventListener("resize", checkIfDesktop);
|
|
8083
|
+
});
|
|
8084
|
+
return isDesktop;
|
|
8085
|
+
}
|
|
8086
|
+
const directionMap = {
|
|
8087
|
+
row: "flex-row",
|
|
8088
|
+
col: "flex-col",
|
|
8089
|
+
"row-reverse": "flex-row-reverse",
|
|
8090
|
+
"col-reverse": "flex-col-reverse"
|
|
8091
|
+
};
|
|
8092
|
+
const justifyMap = {
|
|
8093
|
+
start: "justify-start",
|
|
8094
|
+
center: "justify-center",
|
|
8095
|
+
end: "justify-end",
|
|
8096
|
+
between: "justify-between",
|
|
8097
|
+
around: "justify-around",
|
|
8098
|
+
evenly: "justify-evenly"
|
|
8099
|
+
};
|
|
8100
|
+
const alignMap = {
|
|
8101
|
+
start: "items-start",
|
|
8102
|
+
center: "items-center",
|
|
8103
|
+
end: "items-end",
|
|
8104
|
+
stretch: "items-stretch",
|
|
8105
|
+
baseline: "items-baseline"
|
|
8106
|
+
};
|
|
8107
|
+
const wrapMap = {
|
|
8108
|
+
wrap: "flex-wrap",
|
|
8109
|
+
nowrap: "flex-nowrap",
|
|
8110
|
+
"wrap-reverse": "flex-wrap-reverse"
|
|
8111
|
+
};
|
|
8112
|
+
const gapMap = {
|
|
8113
|
+
none: "gap-0",
|
|
8114
|
+
sm: "gap-2",
|
|
8115
|
+
md: "gap-4",
|
|
8116
|
+
lg: "gap-6",
|
|
8117
|
+
xl: "gap-8"
|
|
8118
|
+
};
|
|
8119
|
+
const gapXMap = {
|
|
6536
8120
|
none: "gap-x-0",
|
|
6537
8121
|
sm: "gap-x-2",
|
|
6538
8122
|
md: "gap-x-4",
|
|
@@ -8181,7 +9765,7 @@ const NumberField = (props)=>{
|
|
|
8181
9765
|
})();
|
|
8182
9766
|
};
|
|
8183
9767
|
const form_NumberField = NumberField;
|
|
8184
|
-
var FormDropdown_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>"), FormDropdown_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<p>"), FormDropdown_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), FormDropdown_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="text-error ml-1">*'),
|
|
9768
|
+
var FormDropdown_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>"), FormDropdown_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<p>"), FormDropdown_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), FormDropdown_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="text-error ml-1">*'), FormDropdown_tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span class=ml-2>");
|
|
8185
9769
|
const FormDropdown_FormDropdown = (props)=>{
|
|
8186
9770
|
const { errors, touched, setData } = useFormValidation();
|
|
8187
9771
|
const [local, _] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -8262,7 +9846,7 @@ const FormDropdown_FormDropdown = (props)=>{
|
|
|
8262
9846
|
return _el$2;
|
|
8263
9847
|
})(),
|
|
8264
9848
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>local.icon || (()=>{
|
|
8265
|
-
var _el$6 =
|
|
9849
|
+
var _el$6 = FormDropdown_tmpl$5();
|
|
8266
9850
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(icon_Icon, {
|
|
8267
9851
|
name: "icon-[mdi-light--chevron-down]",
|
|
8268
9852
|
width: 20,
|
|
@@ -9853,7 +11437,7 @@ const Select = (props)=>{
|
|
|
9853
11437
|
};
|
|
9854
11438
|
const select_Select = Select;
|
|
9855
11439
|
var ShowcaseSection_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="opacity-0 group-hover/title:opacity-100 text-base-content/70 transition-opacity">#'), ShowcaseSection_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<h2 class="text-xl font-semibold group/title">'), ShowcaseSection_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div><div class=space-y-3>");
|
|
9856
|
-
const
|
|
11440
|
+
const ShowcaseSection_ShowcaseSection = (props)=>{
|
|
9857
11441
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
9858
11442
|
"id",
|
|
9859
11443
|
"title",
|
|
@@ -9918,7 +11502,7 @@ const ShowcaseSection = (props)=>{
|
|
|
9918
11502
|
return _el$;
|
|
9919
11503
|
})();
|
|
9920
11504
|
};
|
|
9921
|
-
const
|
|
11505
|
+
const ShowcaseSection = ShowcaseSection_ShowcaseSection;
|
|
9922
11506
|
var ShowcaseBlock_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<p class="text-base-content/70 mb-4">'), ShowcaseBlock_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="bg-base-200 shadow-sm p-6 rounded-lg"><h3 class="text-lg font-semibold mb-2 text-base-content"></h3><div>');
|
|
9923
11507
|
const ShowcaseBlock = (props)=>{
|
|
9924
11508
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -10611,7 +12195,7 @@ const steps_Steps = Object.assign(Steps, {
|
|
|
10611
12195
|
});
|
|
10612
12196
|
const steps = steps_Steps;
|
|
10613
12197
|
var SvgBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><ellipse></svg>", false, true, false), SvgBackground_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle></svg>", false, true, false), SvgBackground_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=0 cy=0 r=100 opacity=0.7></svg>", false, true, false), SvgBackground_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=400 cy=0 r=120></svg>", false, true, false), SvgBackground_tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=0 cy=400 r=100 opacity=0.7></svg>", false, true, false), _tmpl$6 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=400 cy=400 r=120></svg>", false, true, false), _tmpl$7 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=0 cy=200 r=70 opacity=0.6></svg>", false, true, false), _tmpl$8 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=200 cy=0 r=100></svg>", false, true, false), _tmpl$9 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=400 cy=200 r=100></svg>", false, true, false), _tmpl$0 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=200 cy=400 r=100></svg>", false, true, false), _tmpl$1 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div><svg viewBox="0 0 400 400"xmlns=http://www.w3.org/2000/svg><rect width=400 height=400></rect></svg></div><canvas></canvas><div class="relative z-10 h-full w-full">'), _tmpl$10 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="absolute inset-0 z-5">');
|
|
10614
|
-
function
|
|
12198
|
+
function SvgBackground_hexToRgb(hex) {
|
|
10615
12199
|
hex = hex.replace(/^#/, "");
|
|
10616
12200
|
const bigint = Number.parseInt(hex, 16);
|
|
10617
12201
|
const r = bigint >> 16 & 255;
|
|
@@ -10630,8 +12214,8 @@ function SvgBackground(props) {
|
|
|
10630
12214
|
let canvasRef;
|
|
10631
12215
|
const [isBackgroundReady, setBackgroundReady] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
10632
12216
|
const getIntermediateColor = (t)=>{
|
|
10633
|
-
const start =
|
|
10634
|
-
const end =
|
|
12217
|
+
const start = SvgBackground_hexToRgb(colorStart);
|
|
12218
|
+
const end = SvgBackground_hexToRgb(colorEnd);
|
|
10635
12219
|
const r = Math.round(start.r + (end.r - start.r) * t);
|
|
10636
12220
|
const g = Math.round(start.g + (end.g - start.g) * t);
|
|
10637
12221
|
const b = Math.round(start.b + (end.b - start.b) * t);
|
|
@@ -12313,64 +13897,26 @@ const StreamingTable = (props)=>{
|
|
|
12313
13897
|
get disabled () {
|
|
12314
13898
|
return currentPage() === totalPages() - 1;
|
|
12315
13899
|
},
|
|
12316
|
-
size: "sm",
|
|
12317
|
-
children: "\xBB"
|
|
12318
|
-
})
|
|
12319
|
-
];
|
|
12320
|
-
}
|
|
12321
|
-
}), _el$4);
|
|
12322
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, ()=>currentPage() + 1, _el$7);
|
|
12323
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, totalPages, null);
|
|
12324
|
-
return _el$3;
|
|
12325
|
-
}
|
|
12326
|
-
}), null);
|
|
12327
|
-
return _el$;
|
|
12328
|
-
})();
|
|
12329
|
-
};
|
|
12330
|
-
const streaming_table_StreamingTable = StreamingTable;
|
|
12331
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
12332
|
-
"click"
|
|
12333
|
-
]);
|
|
12334
|
-
var Tab_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<a role=tab>");
|
|
12335
|
-
const Tab = (props)=>{
|
|
12336
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12337
|
-
"children",
|
|
12338
|
-
"class",
|
|
12339
|
-
"className",
|
|
12340
|
-
"color",
|
|
12341
|
-
"bgColor",
|
|
12342
|
-
"borderColor",
|
|
12343
|
-
"active",
|
|
12344
|
-
"disabled"
|
|
12345
|
-
]);
|
|
12346
|
-
const classes = ()=>twMerge("tab", local.class, local.className, clsx({
|
|
12347
|
-
[`[--tab-bg:${local.bgColor}]`]: local.bgColor,
|
|
12348
|
-
[`[--tab-border-color:${local.borderColor}]`]: local.borderColor,
|
|
12349
|
-
"text-neutral": "neutral" === local.color,
|
|
12350
|
-
"text-primary": "primary" === local.color,
|
|
12351
|
-
"text-secondary": "secondary" === local.color,
|
|
12352
|
-
"text-accent": "accent" === local.color,
|
|
12353
|
-
"text-info": "info" === local.color,
|
|
12354
|
-
"text-success": "success" === local.color,
|
|
12355
|
-
"text-warning": "warning" === local.color,
|
|
12356
|
-
"text-error": "error" === local.color,
|
|
12357
|
-
"tab-active": local.active,
|
|
12358
|
-
"tab-disabled": local.disabled
|
|
12359
|
-
}));
|
|
12360
|
-
return (()=>{
|
|
12361
|
-
var _el$ = Tab_tmpl$();
|
|
12362
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
12363
|
-
get ["class"] () {
|
|
12364
|
-
return classes();
|
|
13900
|
+
size: "sm",
|
|
13901
|
+
children: "\xBB"
|
|
13902
|
+
})
|
|
13903
|
+
];
|
|
13904
|
+
}
|
|
13905
|
+
}), _el$4);
|
|
13906
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, ()=>currentPage() + 1, _el$7);
|
|
13907
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, totalPages, null);
|
|
13908
|
+
return _el$3;
|
|
12365
13909
|
}
|
|
12366
|
-
}
|
|
12367
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
13910
|
+
}), null);
|
|
12368
13911
|
return _el$;
|
|
12369
13912
|
})();
|
|
12370
13913
|
};
|
|
12371
|
-
const
|
|
12372
|
-
|
|
12373
|
-
|
|
13914
|
+
const streaming_table_StreamingTable = StreamingTable;
|
|
13915
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
13916
|
+
"click"
|
|
13917
|
+
]);
|
|
13918
|
+
var Tab_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<a role=tab>");
|
|
13919
|
+
const Tab = (props)=>{
|
|
12374
13920
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12375
13921
|
"children",
|
|
12376
13922
|
"class",
|
|
@@ -12379,10 +13925,7 @@ const RadioTab = (props)=>{
|
|
|
12379
13925
|
"bgColor",
|
|
12380
13926
|
"borderColor",
|
|
12381
13927
|
"active",
|
|
12382
|
-
"disabled"
|
|
12383
|
-
"label",
|
|
12384
|
-
"name",
|
|
12385
|
-
"contentClassName"
|
|
13928
|
+
"disabled"
|
|
12386
13929
|
]);
|
|
12387
13930
|
const classes = ()=>twMerge("tab", local.class, local.className, clsx({
|
|
12388
13931
|
[`[--tab-bg:${local.bgColor}]`]: local.bgColor,
|
|
@@ -12398,740 +13941,356 @@ const RadioTab = (props)=>{
|
|
|
12398
13941
|
"tab-active": local.active,
|
|
12399
13942
|
"tab-disabled": local.disabled
|
|
12400
13943
|
}));
|
|
12401
|
-
const contentClasses = ()=>twMerge("tab-content", local.contentClassName);
|
|
12402
|
-
return [
|
|
12403
|
-
(()=>{
|
|
12404
|
-
var _el$ = RadioTab_tmpl$();
|
|
12405
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
12406
|
-
get ["class"] () {
|
|
12407
|
-
return classes();
|
|
12408
|
-
},
|
|
12409
|
-
get name () {
|
|
12410
|
-
return local.name;
|
|
12411
|
-
},
|
|
12412
|
-
get ["aria-label"] () {
|
|
12413
|
-
return local.label;
|
|
12414
|
-
},
|
|
12415
|
-
get disabled () {
|
|
12416
|
-
return local.disabled;
|
|
12417
|
-
}
|
|
12418
|
-
}, others), false, false);
|
|
12419
|
-
return _el$;
|
|
12420
|
-
})(),
|
|
12421
|
-
(()=>{
|
|
12422
|
-
var _el$2 = RadioTab_tmpl$2();
|
|
12423
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.children);
|
|
12424
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, contentClasses()));
|
|
12425
|
-
return _el$2;
|
|
12426
|
-
})()
|
|
12427
|
-
];
|
|
12428
|
-
};
|
|
12429
|
-
const tabs_RadioTab = RadioTab;
|
|
12430
|
-
var Tabs_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div role=tablist>");
|
|
12431
|
-
const Tabs = (props)=>{
|
|
12432
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12433
|
-
"children",
|
|
12434
|
-
"class",
|
|
12435
|
-
"className",
|
|
12436
|
-
"variant",
|
|
12437
|
-
"size",
|
|
12438
|
-
"position"
|
|
12439
|
-
]);
|
|
12440
|
-
const classes = ()=>twMerge("tabs", local.class, local.className, clsx({
|
|
12441
|
-
"tabs-boxed": "boxed" === local.variant,
|
|
12442
|
-
"tabs-bordered": "bordered" === local.variant,
|
|
12443
|
-
"tabs-lift": "lift" === local.variant,
|
|
12444
|
-
"tabs-xl": "xl" === local.size,
|
|
12445
|
-
"tabs-lg": "lg" === local.size,
|
|
12446
|
-
"tabs-md": "md" === local.size,
|
|
12447
|
-
"tabs-sm": "sm" === local.size,
|
|
12448
|
-
"tabs-xs": "xs" === local.size,
|
|
12449
|
-
"tabs-top": "top" === local.position,
|
|
12450
|
-
"tabs-bottom": "bottom" === local.position
|
|
12451
|
-
}));
|
|
12452
13944
|
return (()=>{
|
|
12453
|
-
var _el$ =
|
|
13945
|
+
var _el$ = Tab_tmpl$();
|
|
12454
13946
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
12455
13947
|
get ["class"] () {
|
|
12456
13948
|
return classes();
|
|
12457
|
-
}
|
|
12458
|
-
}, others), false, true);
|
|
12459
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
12460
|
-
return _el$;
|
|
12461
|
-
})();
|
|
12462
|
-
};
|
|
12463
|
-
const tabs_Tabs = Object.assign(Tabs, {
|
|
12464
|
-
Tab: tabs_Tab,
|
|
12465
|
-
RadioTab: tabs_RadioTab
|
|
12466
|
-
});
|
|
12467
|
-
var Textarea_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<textarea>");
|
|
12468
|
-
const Textarea = (props)=>{
|
|
12469
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12470
|
-
"color",
|
|
12471
|
-
"size",
|
|
12472
|
-
"dataTheme",
|
|
12473
|
-
"class",
|
|
12474
|
-
"className",
|
|
12475
|
-
"style",
|
|
12476
|
-
"resize"
|
|
12477
|
-
]);
|
|
12478
|
-
const classes = ()=>twMerge("textarea", local.class, local.className, clsx({
|
|
12479
|
-
"textarea-xl": "xl" === local.size,
|
|
12480
|
-
"textarea-lg": "lg" === local.size,
|
|
12481
|
-
"textarea-md": "md" === local.size,
|
|
12482
|
-
"textarea-sm": "sm" === local.size,
|
|
12483
|
-
"textarea-xs": "xs" === local.size,
|
|
12484
|
-
"textarea-primary": "primary" === local.color,
|
|
12485
|
-
"textarea-secondary": "secondary" === local.color,
|
|
12486
|
-
"textarea-accent": "accent" === local.color,
|
|
12487
|
-
"textarea-ghost": "ghost" === local.color,
|
|
12488
|
-
"textarea-info": "info" === local.color,
|
|
12489
|
-
"textarea-success": "success" === local.color,
|
|
12490
|
-
"textarea-warning": "warning" === local.color,
|
|
12491
|
-
"textarea-error": "error" === local.color,
|
|
12492
|
-
"resize-y": "y" === local.resize,
|
|
12493
|
-
"resize-x": "x" === local.resize,
|
|
12494
|
-
"resize-none": "none" === local.resize,
|
|
12495
|
-
"resize-both": "both" === local.resize
|
|
12496
|
-
}));
|
|
12497
|
-
return (()=>{
|
|
12498
|
-
var _el$ = Textarea_tmpl$();
|
|
12499
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
12500
|
-
get ["data-theme"] () {
|
|
12501
|
-
return local.dataTheme;
|
|
12502
|
-
},
|
|
12503
|
-
get ["class"] () {
|
|
12504
|
-
return classes();
|
|
12505
|
-
},
|
|
12506
|
-
get style () {
|
|
12507
|
-
return local.style;
|
|
12508
|
-
}
|
|
12509
|
-
}), false, false);
|
|
12510
|
-
return _el$;
|
|
12511
|
-
})();
|
|
12512
|
-
};
|
|
12513
|
-
const textarea_Textarea = Textarea;
|
|
12514
|
-
var Timeline_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<ul>");
|
|
12515
|
-
const Timeline_Timeline = (props)=>{
|
|
12516
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12517
|
-
"vertical",
|
|
12518
|
-
"horizontal",
|
|
12519
|
-
"responsive",
|
|
12520
|
-
"snap",
|
|
12521
|
-
"compact",
|
|
12522
|
-
"class",
|
|
12523
|
-
"className",
|
|
12524
|
-
"style",
|
|
12525
|
-
"dataTheme"
|
|
12526
|
-
]);
|
|
12527
|
-
const classes = twMerge("timeline", dist_clsx({
|
|
12528
|
-
"timeline-vertical": local.vertical,
|
|
12529
|
-
"timeline-horizontal": local.horizontal,
|
|
12530
|
-
"timeline-vertical lg:timeline-horizontal": local.responsive,
|
|
12531
|
-
"timeline-snap-icon": local.snap,
|
|
12532
|
-
"timeline-compact": local.compact
|
|
12533
|
-
}), local.class, local.className);
|
|
12534
|
-
return (()=>{
|
|
12535
|
-
var _el$ = Timeline_tmpl$();
|
|
12536
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
12537
|
-
class: classes,
|
|
12538
|
-
get ["data-theme"] () {
|
|
12539
|
-
return local.dataTheme;
|
|
12540
|
-
},
|
|
12541
|
-
get style () {
|
|
12542
|
-
return local.style;
|
|
12543
|
-
}
|
|
12544
|
-
}), false, true);
|
|
12545
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
|
|
12546
|
-
return _el$;
|
|
12547
|
-
})();
|
|
12548
|
-
};
|
|
12549
|
-
const Timeline = Timeline_Timeline;
|
|
12550
|
-
var TimelineEnd_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
12551
|
-
const TimelineEnd = (props)=>{
|
|
12552
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12553
|
-
"box",
|
|
12554
|
-
"class",
|
|
12555
|
-
"style"
|
|
12556
|
-
]);
|
|
12557
|
-
const classes = twMerge("timeline-end", clsx({
|
|
12558
|
-
"timeline-box": local.box ?? true
|
|
12559
|
-
}), local.class);
|
|
12560
|
-
return (()=>{
|
|
12561
|
-
var _el$ = TimelineEnd_tmpl$();
|
|
12562
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
12563
|
-
class: classes,
|
|
12564
|
-
get style () {
|
|
12565
|
-
return local.style;
|
|
12566
|
-
}
|
|
12567
|
-
}), false, true);
|
|
12568
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
|
|
12569
|
-
return _el$;
|
|
12570
|
-
})();
|
|
12571
|
-
};
|
|
12572
|
-
const timeline_TimelineEnd = TimelineEnd;
|
|
12573
|
-
var TimelineItem_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<hr>"), TimelineItem_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<li>");
|
|
12574
|
-
const TimelineItem = (props)=>{
|
|
12575
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12576
|
-
"connect",
|
|
12577
|
-
"startClassName",
|
|
12578
|
-
"endClassName",
|
|
12579
|
-
"class",
|
|
12580
|
-
"style"
|
|
12581
|
-
]);
|
|
12582
|
-
return (()=>{
|
|
12583
|
-
var _el$ = TimelineItem_tmpl$2();
|
|
12584
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
12585
|
-
get ["class"] () {
|
|
12586
|
-
return local.class;
|
|
12587
|
-
},
|
|
12588
|
-
get style () {
|
|
12589
|
-
return local.style;
|
|
12590
|
-
}
|
|
12591
|
-
}), false, true);
|
|
12592
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
12593
|
-
get when () {
|
|
12594
|
-
return "both" === local.connect || "start" === local.connect;
|
|
12595
|
-
},
|
|
12596
|
-
get children () {
|
|
12597
|
-
var _el$2 = TimelineItem_tmpl$();
|
|
12598
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, local.startClassName));
|
|
12599
|
-
return _el$2;
|
|
12600
|
-
}
|
|
12601
|
-
}), null);
|
|
12602
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children, null);
|
|
12603
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
12604
|
-
get when () {
|
|
12605
|
-
return "both" === local.connect || "end" === local.connect;
|
|
12606
|
-
},
|
|
12607
|
-
get children () {
|
|
12608
|
-
var _el$3 = TimelineItem_tmpl$();
|
|
12609
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$3, local.endClassName));
|
|
12610
|
-
return _el$3;
|
|
12611
|
-
}
|
|
12612
|
-
}), null);
|
|
12613
|
-
return _el$;
|
|
12614
|
-
})();
|
|
12615
|
-
};
|
|
12616
|
-
const timeline_TimelineItem = TimelineItem;
|
|
12617
|
-
var TimelineMiddle_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), TimelineMiddle_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor class="w-5 h-5"><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"clip-rule=evenodd>');
|
|
12618
|
-
const TimelineMiddle = (props)=>{
|
|
12619
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12620
|
-
"class",
|
|
12621
|
-
"style",
|
|
12622
|
-
"children"
|
|
12623
|
-
]);
|
|
12624
|
-
const classes = twMerge("timeline-middle", local.class);
|
|
12625
|
-
return (()=>{
|
|
12626
|
-
var _el$ = TimelineMiddle_tmpl$();
|
|
12627
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
12628
|
-
class: classes,
|
|
12629
|
-
get style () {
|
|
12630
|
-
return local.style;
|
|
12631
|
-
}
|
|
12632
|
-
}), false, true);
|
|
12633
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children ?? TimelineMiddle_tmpl$2());
|
|
13949
|
+
}
|
|
13950
|
+
}, others), false, true);
|
|
13951
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
12634
13952
|
return _el$;
|
|
12635
13953
|
})();
|
|
12636
13954
|
};
|
|
12637
|
-
const
|
|
12638
|
-
var
|
|
12639
|
-
const
|
|
13955
|
+
const tabs_Tab = Tab;
|
|
13956
|
+
var RadioTab_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<input role=tab type=radio>"), RadioTab_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
13957
|
+
const RadioTab = (props)=>{
|
|
12640
13958
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12641
|
-
"
|
|
13959
|
+
"children",
|
|
12642
13960
|
"class",
|
|
12643
|
-
"
|
|
13961
|
+
"className",
|
|
13962
|
+
"color",
|
|
13963
|
+
"bgColor",
|
|
13964
|
+
"borderColor",
|
|
13965
|
+
"active",
|
|
13966
|
+
"disabled",
|
|
13967
|
+
"label",
|
|
13968
|
+
"name",
|
|
13969
|
+
"contentClassName"
|
|
12644
13970
|
]);
|
|
12645
|
-
const classes = twMerge("
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
}
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
13971
|
+
const classes = ()=>twMerge("tab", local.class, local.className, clsx({
|
|
13972
|
+
[`[--tab-bg:${local.bgColor}]`]: local.bgColor,
|
|
13973
|
+
[`[--tab-border-color:${local.borderColor}]`]: local.borderColor,
|
|
13974
|
+
"text-neutral": "neutral" === local.color,
|
|
13975
|
+
"text-primary": "primary" === local.color,
|
|
13976
|
+
"text-secondary": "secondary" === local.color,
|
|
13977
|
+
"text-accent": "accent" === local.color,
|
|
13978
|
+
"text-info": "info" === local.color,
|
|
13979
|
+
"text-success": "success" === local.color,
|
|
13980
|
+
"text-warning": "warning" === local.color,
|
|
13981
|
+
"text-error": "error" === local.color,
|
|
13982
|
+
"tab-active": local.active,
|
|
13983
|
+
"tab-disabled": local.disabled
|
|
13984
|
+
}));
|
|
13985
|
+
const contentClasses = ()=>twMerge("tab-content", local.contentClassName);
|
|
13986
|
+
return [
|
|
13987
|
+
(()=>{
|
|
13988
|
+
var _el$ = RadioTab_tmpl$();
|
|
13989
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
13990
|
+
get ["class"] () {
|
|
13991
|
+
return classes();
|
|
13992
|
+
},
|
|
13993
|
+
get name () {
|
|
13994
|
+
return local.name;
|
|
13995
|
+
},
|
|
13996
|
+
get ["aria-label"] () {
|
|
13997
|
+
return local.label;
|
|
13998
|
+
},
|
|
13999
|
+
get disabled () {
|
|
14000
|
+
return local.disabled;
|
|
14001
|
+
}
|
|
14002
|
+
}, others), false, false);
|
|
14003
|
+
return _el$;
|
|
14004
|
+
})(),
|
|
14005
|
+
(()=>{
|
|
14006
|
+
var _el$2 = RadioTab_tmpl$2();
|
|
14007
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.children);
|
|
14008
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, contentClasses()));
|
|
14009
|
+
return _el$2;
|
|
14010
|
+
})()
|
|
14011
|
+
];
|
|
12671
14012
|
};
|
|
12672
|
-
const
|
|
14013
|
+
const tabs_RadioTab = RadioTab;
|
|
14014
|
+
var Tabs_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div role=tablist>");
|
|
14015
|
+
const Tabs = (props)=>{
|
|
12673
14016
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
12674
|
-
"
|
|
12675
|
-
"vertical",
|
|
14017
|
+
"children",
|
|
12676
14018
|
"class",
|
|
12677
14019
|
"className",
|
|
12678
|
-
"
|
|
12679
|
-
"
|
|
12680
|
-
"
|
|
14020
|
+
"variant",
|
|
14021
|
+
"size",
|
|
14022
|
+
"position"
|
|
12681
14023
|
]);
|
|
12682
|
-
const
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
14024
|
+
const classes = ()=>twMerge("tabs", local.class, local.className, clsx({
|
|
14025
|
+
"tabs-boxed": "boxed" === local.variant,
|
|
14026
|
+
"tabs-bordered": "bordered" === local.variant,
|
|
14027
|
+
"tabs-lift": "lift" === local.variant,
|
|
14028
|
+
"tabs-xl": "xl" === local.size,
|
|
14029
|
+
"tabs-lg": "lg" === local.size,
|
|
14030
|
+
"tabs-md": "md" === local.size,
|
|
14031
|
+
"tabs-sm": "sm" === local.size,
|
|
14032
|
+
"tabs-xs": "xs" === local.size,
|
|
14033
|
+
"tabs-top": "top" === local.position,
|
|
14034
|
+
"tabs-bottom": "bottom" === local.position
|
|
14035
|
+
}));
|
|
12691
14036
|
return (()=>{
|
|
12692
|
-
var _el$ =
|
|
12693
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(
|
|
12694
|
-
role: "status",
|
|
14037
|
+
var _el$ = Tabs_tmpl$();
|
|
14038
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
|
|
12695
14039
|
get ["class"] () {
|
|
12696
|
-
return
|
|
12697
|
-
},
|
|
12698
|
-
get ["data-theme"] () {
|
|
12699
|
-
return local.dataTheme;
|
|
12700
|
-
},
|
|
12701
|
-
get style () {
|
|
12702
|
-
return local.style;
|
|
14040
|
+
return classes();
|
|
12703
14041
|
}
|
|
12704
|
-
}), false, true);
|
|
12705
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$,
|
|
14042
|
+
}, others), false, true);
|
|
14043
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
12706
14044
|
return _el$;
|
|
12707
14045
|
})();
|
|
12708
14046
|
};
|
|
12709
|
-
const
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
durations: mergeDefined(base.durations, overrides?.durations),
|
|
12749
|
-
easings: mergeDefined(base.easings, overrides?.easings),
|
|
12750
|
-
distances: mergeDefined(base.distances, overrides?.distances)
|
|
12751
|
-
});
|
|
12752
|
-
const createMotionPresets = (tokens)=>{
|
|
12753
|
-
const durations = tokens.durations;
|
|
12754
|
-
const easings = tokens.easings;
|
|
12755
|
-
const distances = tokens.distances;
|
|
12756
|
-
return {
|
|
12757
|
-
route: {
|
|
12758
|
-
initial: {
|
|
12759
|
-
opacity: 0
|
|
12760
|
-
},
|
|
12761
|
-
animate: {
|
|
12762
|
-
opacity: 1
|
|
12763
|
-
},
|
|
12764
|
-
exit: {
|
|
12765
|
-
opacity: 0
|
|
12766
|
-
},
|
|
12767
|
-
transition: {
|
|
12768
|
-
duration: durations.route,
|
|
12769
|
-
easing: easings.out
|
|
12770
|
-
}
|
|
12771
|
-
},
|
|
12772
|
-
routeAuth: {
|
|
12773
|
-
initial: {
|
|
12774
|
-
opacity: 0,
|
|
12775
|
-
x: distances.slideIn
|
|
12776
|
-
},
|
|
12777
|
-
animate: {
|
|
12778
|
-
opacity: 1,
|
|
12779
|
-
x: 0
|
|
12780
|
-
},
|
|
12781
|
-
exit: {
|
|
12782
|
-
opacity: 0,
|
|
12783
|
-
x: -distances.slideIn
|
|
12784
|
-
},
|
|
12785
|
-
transition: {
|
|
12786
|
-
duration: durations.routeAuth,
|
|
12787
|
-
easing: easings.inOut
|
|
12788
|
-
}
|
|
12789
|
-
},
|
|
12790
|
-
routeAuthBack: {
|
|
12791
|
-
initial: {
|
|
12792
|
-
opacity: 0,
|
|
12793
|
-
x: -distances.slideIn
|
|
12794
|
-
},
|
|
12795
|
-
animate: {
|
|
12796
|
-
opacity: 1,
|
|
12797
|
-
x: 0
|
|
12798
|
-
},
|
|
12799
|
-
exit: {
|
|
12800
|
-
opacity: 0,
|
|
12801
|
-
x: distances.slideIn
|
|
12802
|
-
},
|
|
12803
|
-
transition: {
|
|
12804
|
-
duration: durations.routeAuth,
|
|
12805
|
-
easing: easings.inOut
|
|
12806
|
-
}
|
|
12807
|
-
},
|
|
12808
|
-
authSwap: {
|
|
12809
|
-
initial: {
|
|
12810
|
-
opacity: 0.92
|
|
12811
|
-
},
|
|
12812
|
-
animate: {
|
|
12813
|
-
opacity: 1
|
|
14047
|
+
const tabs_Tabs = Object.assign(Tabs, {
|
|
14048
|
+
Tab: tabs_Tab,
|
|
14049
|
+
RadioTab: tabs_RadioTab
|
|
14050
|
+
});
|
|
14051
|
+
var Textarea_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<textarea>");
|
|
14052
|
+
const Textarea = (props)=>{
|
|
14053
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14054
|
+
"color",
|
|
14055
|
+
"size",
|
|
14056
|
+
"dataTheme",
|
|
14057
|
+
"class",
|
|
14058
|
+
"className",
|
|
14059
|
+
"style",
|
|
14060
|
+
"resize"
|
|
14061
|
+
]);
|
|
14062
|
+
const classes = ()=>twMerge("textarea", local.class, local.className, clsx({
|
|
14063
|
+
"textarea-xl": "xl" === local.size,
|
|
14064
|
+
"textarea-lg": "lg" === local.size,
|
|
14065
|
+
"textarea-md": "md" === local.size,
|
|
14066
|
+
"textarea-sm": "sm" === local.size,
|
|
14067
|
+
"textarea-xs": "xs" === local.size,
|
|
14068
|
+
"textarea-primary": "primary" === local.color,
|
|
14069
|
+
"textarea-secondary": "secondary" === local.color,
|
|
14070
|
+
"textarea-accent": "accent" === local.color,
|
|
14071
|
+
"textarea-ghost": "ghost" === local.color,
|
|
14072
|
+
"textarea-info": "info" === local.color,
|
|
14073
|
+
"textarea-success": "success" === local.color,
|
|
14074
|
+
"textarea-warning": "warning" === local.color,
|
|
14075
|
+
"textarea-error": "error" === local.color,
|
|
14076
|
+
"resize-y": "y" === local.resize,
|
|
14077
|
+
"resize-x": "x" === local.resize,
|
|
14078
|
+
"resize-none": "none" === local.resize,
|
|
14079
|
+
"resize-both": "both" === local.resize
|
|
14080
|
+
}));
|
|
14081
|
+
return (()=>{
|
|
14082
|
+
var _el$ = Textarea_tmpl$();
|
|
14083
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14084
|
+
get ["data-theme"] () {
|
|
14085
|
+
return local.dataTheme;
|
|
12814
14086
|
},
|
|
12815
|
-
|
|
12816
|
-
|
|
14087
|
+
get ["class"] () {
|
|
14088
|
+
return classes();
|
|
12817
14089
|
},
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
easing: easings.out
|
|
14090
|
+
get style () {
|
|
14091
|
+
return local.style;
|
|
12821
14092
|
}
|
|
12822
|
-
},
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
14093
|
+
}), false, false);
|
|
14094
|
+
return _el$;
|
|
14095
|
+
})();
|
|
14096
|
+
};
|
|
14097
|
+
const textarea_Textarea = Textarea;
|
|
14098
|
+
var Timeline_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<ul>");
|
|
14099
|
+
const Timeline_Timeline = (props)=>{
|
|
14100
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14101
|
+
"vertical",
|
|
14102
|
+
"horizontal",
|
|
14103
|
+
"responsive",
|
|
14104
|
+
"snap",
|
|
14105
|
+
"compact",
|
|
14106
|
+
"class",
|
|
14107
|
+
"className",
|
|
14108
|
+
"style",
|
|
14109
|
+
"dataTheme"
|
|
14110
|
+
]);
|
|
14111
|
+
const classes = twMerge("timeline", dist_clsx({
|
|
14112
|
+
"timeline-vertical": local.vertical,
|
|
14113
|
+
"timeline-horizontal": local.horizontal,
|
|
14114
|
+
"timeline-vertical lg:timeline-horizontal": local.responsive,
|
|
14115
|
+
"timeline-snap-icon": local.snap,
|
|
14116
|
+
"timeline-compact": local.compact
|
|
14117
|
+
}), local.class, local.className);
|
|
14118
|
+
return (()=>{
|
|
14119
|
+
var _el$ = Timeline_tmpl$();
|
|
14120
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14121
|
+
class: classes,
|
|
14122
|
+
get ["data-theme"] () {
|
|
14123
|
+
return local.dataTheme;
|
|
12832
14124
|
},
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
easing: easings.out,
|
|
12836
|
-
delay: 0.08
|
|
14125
|
+
get style () {
|
|
14126
|
+
return local.style;
|
|
12837
14127
|
}
|
|
12838
|
-
},
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
14128
|
+
}), false, true);
|
|
14129
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
|
|
14130
|
+
return _el$;
|
|
14131
|
+
})();
|
|
14132
|
+
};
|
|
14133
|
+
const Timeline = Timeline_Timeline;
|
|
14134
|
+
var TimelineEnd_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
14135
|
+
const TimelineEnd = (props)=>{
|
|
14136
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14137
|
+
"box",
|
|
14138
|
+
"class",
|
|
14139
|
+
"style"
|
|
14140
|
+
]);
|
|
14141
|
+
const classes = twMerge("timeline-end", clsx({
|
|
14142
|
+
"timeline-box": local.box ?? true
|
|
14143
|
+
}), local.class);
|
|
14144
|
+
return (()=>{
|
|
14145
|
+
var _el$ = TimelineEnd_tmpl$();
|
|
14146
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14147
|
+
class: classes,
|
|
14148
|
+
get style () {
|
|
14149
|
+
return local.style;
|
|
12856
14150
|
}
|
|
12857
|
-
},
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
14151
|
+
}), false, true);
|
|
14152
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
|
|
14153
|
+
return _el$;
|
|
14154
|
+
})();
|
|
14155
|
+
};
|
|
14156
|
+
const timeline_TimelineEnd = TimelineEnd;
|
|
14157
|
+
var TimelineItem_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<hr>"), TimelineItem_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<li>");
|
|
14158
|
+
const TimelineItem = (props)=>{
|
|
14159
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14160
|
+
"connect",
|
|
14161
|
+
"startClassName",
|
|
14162
|
+
"endClassName",
|
|
14163
|
+
"class",
|
|
14164
|
+
"style"
|
|
14165
|
+
]);
|
|
14166
|
+
return (()=>{
|
|
14167
|
+
var _el$ = TimelineItem_tmpl$2();
|
|
14168
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14169
|
+
get ["class"] () {
|
|
14170
|
+
return local.class;
|
|
12870
14171
|
},
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
easing: easings.out,
|
|
12874
|
-
delay: 0.08
|
|
14172
|
+
get style () {
|
|
14173
|
+
return local.style;
|
|
12875
14174
|
}
|
|
12876
|
-
},
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
y: distances.sm
|
|
12881
|
-
},
|
|
12882
|
-
animate: {
|
|
12883
|
-
opacity: 1,
|
|
12884
|
-
y: 0
|
|
12885
|
-
},
|
|
12886
|
-
exit: {
|
|
12887
|
-
opacity: 0,
|
|
12888
|
-
y: -distances.sm
|
|
14175
|
+
}), false, true);
|
|
14176
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
14177
|
+
get when () {
|
|
14178
|
+
return "both" === local.connect || "start" === local.connect;
|
|
12889
14179
|
},
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
14180
|
+
get children () {
|
|
14181
|
+
var _el$2 = TimelineItem_tmpl$();
|
|
14182
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$2, local.startClassName));
|
|
14183
|
+
return _el$2;
|
|
12893
14184
|
}
|
|
12894
|
-
},
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
scale: 0.985
|
|
12900
|
-
},
|
|
12901
|
-
animate: {
|
|
12902
|
-
opacity: 1,
|
|
12903
|
-
y: 0,
|
|
12904
|
-
scale: 1
|
|
12905
|
-
},
|
|
12906
|
-
exit: {
|
|
12907
|
-
opacity: 0,
|
|
12908
|
-
y: -distances.sm,
|
|
12909
|
-
scale: 0.985
|
|
14185
|
+
}), null);
|
|
14186
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children, null);
|
|
14187
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
14188
|
+
get when () {
|
|
14189
|
+
return "both" === local.connect || "end" === local.connect;
|
|
12910
14190
|
},
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
const routeTransition = motionPresets.route;
|
|
12920
|
-
const noMotion = {
|
|
12921
|
-
initial: {
|
|
12922
|
-
opacity: 1,
|
|
12923
|
-
y: 0,
|
|
12924
|
-
x: 0,
|
|
12925
|
-
scale: 1
|
|
12926
|
-
},
|
|
12927
|
-
animate: {
|
|
12928
|
-
opacity: 1,
|
|
12929
|
-
y: 0,
|
|
12930
|
-
x: 0,
|
|
12931
|
-
scale: 1
|
|
12932
|
-
},
|
|
12933
|
-
exit: {
|
|
12934
|
-
opacity: 1,
|
|
12935
|
-
y: 0,
|
|
12936
|
-
x: 0,
|
|
12937
|
-
scale: 1
|
|
12938
|
-
},
|
|
12939
|
-
transition: {
|
|
12940
|
-
duration: 0
|
|
12941
|
-
}
|
|
12942
|
-
};
|
|
12943
|
-
const presets_getPreset = (name)=>motionPresets[name];
|
|
12944
|
-
const presets_registerPreset = (name, preset)=>{
|
|
12945
|
-
motionPresets[name] = preset;
|
|
12946
|
-
};
|
|
12947
|
-
const presets_resolvePreset = (name, options)=>{
|
|
12948
|
-
const reduce = options?.reduceMotion ?? prefersReducedMotion();
|
|
12949
|
-
if (reduce) return noMotion;
|
|
12950
|
-
return motionPresets[name] ?? noMotion;
|
|
12951
|
-
};
|
|
12952
|
-
const immediateDriver = ({ to, onUpdate, onComplete })=>{
|
|
12953
|
-
onUpdate(to);
|
|
12954
|
-
onComplete?.();
|
|
12955
|
-
return {
|
|
12956
|
-
stop: ()=>{}
|
|
12957
|
-
};
|
|
14191
|
+
get children () {
|
|
14192
|
+
var _el$3 = TimelineItem_tmpl$();
|
|
14193
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$3, local.endClassName));
|
|
14194
|
+
return _el$3;
|
|
14195
|
+
}
|
|
14196
|
+
}), null);
|
|
14197
|
+
return _el$;
|
|
14198
|
+
})();
|
|
12958
14199
|
};
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
14200
|
+
const timeline_TimelineItem = TimelineItem;
|
|
14201
|
+
var TimelineMiddle_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), TimelineMiddle_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor class="w-5 h-5"><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"clip-rule=evenodd>');
|
|
14202
|
+
const TimelineMiddle = (props)=>{
|
|
14203
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14204
|
+
"class",
|
|
14205
|
+
"style",
|
|
14206
|
+
"children"
|
|
14207
|
+
]);
|
|
14208
|
+
const classes = twMerge("timeline-middle", local.class);
|
|
14209
|
+
return (()=>{
|
|
14210
|
+
var _el$ = TimelineMiddle_tmpl$();
|
|
14211
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14212
|
+
class: classes,
|
|
14213
|
+
get style () {
|
|
14214
|
+
return local.style;
|
|
14215
|
+
}
|
|
14216
|
+
}), false, true);
|
|
14217
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children ?? TimelineMiddle_tmpl$2());
|
|
14218
|
+
return _el$;
|
|
14219
|
+
})();
|
|
12962
14220
|
};
|
|
12963
|
-
const
|
|
12964
|
-
|
|
12965
|
-
const
|
|
12966
|
-
const
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
14221
|
+
const timeline_TimelineMiddle = TimelineMiddle;
|
|
14222
|
+
var TimelineStart_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
14223
|
+
const TimelineStart = (props)=>{
|
|
14224
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14225
|
+
"box",
|
|
14226
|
+
"class",
|
|
14227
|
+
"style"
|
|
14228
|
+
]);
|
|
14229
|
+
const classes = twMerge("timeline-start", clsx({
|
|
14230
|
+
"timeline-box": local.box
|
|
14231
|
+
}), local.class);
|
|
14232
|
+
return (()=>{
|
|
14233
|
+
var _el$ = TimelineStart_tmpl$();
|
|
14234
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14235
|
+
class: classes,
|
|
14236
|
+
get style () {
|
|
14237
|
+
return local.style;
|
|
14238
|
+
}
|
|
14239
|
+
}), false, true);
|
|
14240
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
|
|
14241
|
+
return _el$;
|
|
14242
|
+
})();
|
|
12980
14243
|
};
|
|
12981
|
-
const
|
|
12982
|
-
|
|
12983
|
-
const
|
|
12984
|
-
|
|
12985
|
-
|
|
14244
|
+
const timeline_TimelineStart = TimelineStart;
|
|
14245
|
+
var Toast_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
14246
|
+
const horizontalOptions = {
|
|
14247
|
+
start: "toast-start",
|
|
14248
|
+
center: "toast-center",
|
|
14249
|
+
end: "toast-end"
|
|
12986
14250
|
};
|
|
12987
|
-
const
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
const driver = getMotionDriver();
|
|
12992
|
-
const controls = [];
|
|
12993
|
-
const shouldTransform = void 0 !== from.x || void 0 !== from.y || void 0 !== from.scale || void 0 !== to.x || void 0 !== to.y || void 0 !== to.scale;
|
|
12994
|
-
const transformState = {
|
|
12995
|
-
x: from.x ?? 0,
|
|
12996
|
-
y: from.y ?? 0,
|
|
12997
|
-
scale: from.scale ?? 1
|
|
12998
|
-
};
|
|
12999
|
-
const applyTransform = ()=>{
|
|
13000
|
-
if (!shouldTransform) return;
|
|
13001
|
-
el.style.transform = `translate3d(${transformState.x}px, ${transformState.y}px, 0) scale(${transformState.scale})`;
|
|
13002
|
-
};
|
|
13003
|
-
if (void 0 !== from.opacity) el.style.opacity = String(from.opacity);
|
|
13004
|
-
applyTransform();
|
|
13005
|
-
const animationTargets = Object.keys(to);
|
|
13006
|
-
if (0 === animationTargets.length) {
|
|
13007
|
-
onComplete?.();
|
|
13008
|
-
return {
|
|
13009
|
-
stop: ()=>{}
|
|
13010
|
-
};
|
|
13011
|
-
}
|
|
13012
|
-
let remaining = animationTargets.length;
|
|
13013
|
-
const handleComplete = ()=>{
|
|
13014
|
-
remaining -= 1;
|
|
13015
|
-
if (remaining <= 0) onComplete?.();
|
|
13016
|
-
};
|
|
13017
|
-
const start = ()=>{
|
|
13018
|
-
animationTargets.forEach((key)=>{
|
|
13019
|
-
if ("opacity" === key) {
|
|
13020
|
-
const fromValue = from.opacity ?? (void 0 !== to.opacity ? readOpacity(el) : 1);
|
|
13021
|
-
const control = driver({
|
|
13022
|
-
from: fromValue,
|
|
13023
|
-
to: to.opacity ?? fromValue,
|
|
13024
|
-
duration,
|
|
13025
|
-
ease,
|
|
13026
|
-
onUpdate: (latest)=>{
|
|
13027
|
-
el.style.opacity = String(latest);
|
|
13028
|
-
},
|
|
13029
|
-
onComplete: handleComplete
|
|
13030
|
-
});
|
|
13031
|
-
controls.push(control);
|
|
13032
|
-
return;
|
|
13033
|
-
}
|
|
13034
|
-
const fromValue = "scale" === key ? from.scale ?? 1 : "x" === key ? from.x ?? 0 : from.y ?? 0;
|
|
13035
|
-
const toValue = to[key] ?? fromValue;
|
|
13036
|
-
const control = driver({
|
|
13037
|
-
from: fromValue,
|
|
13038
|
-
to: toValue,
|
|
13039
|
-
duration,
|
|
13040
|
-
ease,
|
|
13041
|
-
onUpdate: (latest)=>{
|
|
13042
|
-
if (!shouldTransform) return;
|
|
13043
|
-
if ("x" === key) transformState.x = latest;
|
|
13044
|
-
if ("y" === key) transformState.y = latest;
|
|
13045
|
-
if ("scale" === key) transformState.scale = latest;
|
|
13046
|
-
applyTransform();
|
|
13047
|
-
},
|
|
13048
|
-
onComplete: handleComplete
|
|
13049
|
-
});
|
|
13050
|
-
controls.push(control);
|
|
13051
|
-
});
|
|
13052
|
-
};
|
|
13053
|
-
let timeoutId = null;
|
|
13054
|
-
if (delay > 0) timeoutId = window.setTimeout(start, delay);
|
|
13055
|
-
else start();
|
|
13056
|
-
return {
|
|
13057
|
-
stop: ()=>{
|
|
13058
|
-
if (null !== timeoutId) clearTimeout(timeoutId);
|
|
13059
|
-
controls.forEach((control)=>control.stop());
|
|
13060
|
-
}
|
|
13061
|
-
};
|
|
14251
|
+
const verticalOptions = {
|
|
14252
|
+
top: "toast-top",
|
|
14253
|
+
middle: "toast-middle",
|
|
14254
|
+
bottom: "toast-bottom"
|
|
13062
14255
|
};
|
|
13063
|
-
|
|
13064
|
-
const
|
|
13065
|
-
|
|
13066
|
-
"
|
|
13067
|
-
"
|
|
13068
|
-
"
|
|
13069
|
-
"
|
|
13070
|
-
"
|
|
13071
|
-
"
|
|
13072
|
-
"animateKey",
|
|
13073
|
-
"children",
|
|
13074
|
-
"ref"
|
|
14256
|
+
const Toast = (props)=>{
|
|
14257
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
14258
|
+
"horizontal",
|
|
14259
|
+
"vertical",
|
|
14260
|
+
"class",
|
|
14261
|
+
"className",
|
|
14262
|
+
"style",
|
|
14263
|
+
"dataTheme",
|
|
14264
|
+
"max"
|
|
13075
14265
|
]);
|
|
13076
|
-
const
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
};
|
|
13085
|
-
const runEnter = (target, from, to, transition)=>{
|
|
13086
|
-
if (!to) return;
|
|
13087
|
-
stopActive();
|
|
13088
|
-
activeControl = runMotion(target, from ?? {}, to ?? {}, transition);
|
|
13089
|
-
};
|
|
13090
|
-
const runExit = (target, from, to, transition, onComplete)=>{
|
|
13091
|
-
if (!to) return void onComplete?.();
|
|
13092
|
-
stopActive();
|
|
13093
|
-
activeControl = runMotion(target, from ?? {}, to ?? {}, transition, onComplete);
|
|
13094
|
-
};
|
|
13095
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
13096
|
-
const target = elementRef();
|
|
13097
|
-
if (!target) return;
|
|
13098
|
-
const isExiting = Boolean(local.isExiting);
|
|
13099
|
-
const trigger = local.animateKey;
|
|
13100
|
-
const initial = local.initial;
|
|
13101
|
-
const animate = local.animate;
|
|
13102
|
-
const exit = local.exit;
|
|
13103
|
-
const transition = local.transition;
|
|
13104
|
-
const onComplete = local.onExitComplete;
|
|
13105
|
-
if (isExiting) {
|
|
13106
|
-
if (!lastIsExiting) {
|
|
13107
|
-
lastIsExiting = true;
|
|
13108
|
-
hasAnimated = false;
|
|
13109
|
-
runExit(target, animate ?? initial, exit, transition, onComplete);
|
|
13110
|
-
}
|
|
13111
|
-
return;
|
|
13112
|
-
}
|
|
13113
|
-
lastIsExiting = false;
|
|
13114
|
-
if (!hasAnimated || trigger !== lastTrigger) {
|
|
13115
|
-
lastTrigger = trigger;
|
|
13116
|
-
hasAnimated = true;
|
|
13117
|
-
runEnter(target, initial, animate, transition);
|
|
13118
|
-
}
|
|
13119
|
-
});
|
|
13120
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
13121
|
-
stopActive();
|
|
14266
|
+
const positionClasses = [
|
|
14267
|
+
horizontalOptions[local.horizontal || "end"],
|
|
14268
|
+
verticalOptions[local.vertical || "bottom"]
|
|
14269
|
+
];
|
|
14270
|
+
const limitedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
14271
|
+
const childrenArray = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>props.children).toArray();
|
|
14272
|
+
if (local.max && local.max > 0) return childrenArray.slice(-local.max);
|
|
14273
|
+
return childrenArray;
|
|
13122
14274
|
});
|
|
13123
14275
|
return (()=>{
|
|
13124
|
-
var _el$ =
|
|
13125
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
14276
|
+
var _el$ = Toast_tmpl$();
|
|
14277
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
14278
|
+
role: "status",
|
|
14279
|
+
get ["class"] () {
|
|
14280
|
+
return twMerge("toast", ...positionClasses, local.class, local.className);
|
|
14281
|
+
},
|
|
14282
|
+
get ["data-theme"] () {
|
|
14283
|
+
return local.dataTheme;
|
|
14284
|
+
},
|
|
14285
|
+
get style () {
|
|
14286
|
+
return local.style;
|
|
14287
|
+
}
|
|
14288
|
+
}), false, true);
|
|
14289
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, limitedChildren);
|
|
13131
14290
|
return _el$;
|
|
13132
14291
|
})();
|
|
13133
14292
|
};
|
|
13134
|
-
const
|
|
14293
|
+
const toast_Toast = Toast;
|
|
13135
14294
|
const [toasts, setToasts] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)([]);
|
|
13136
14295
|
let toastCounter = 0;
|
|
13137
14296
|
const toastTimers = new Map();
|
|
@@ -13151,20 +14310,24 @@ const scheduleDismiss = (id, duration)=>{
|
|
|
13151
14310
|
};
|
|
13152
14311
|
const toastStore = {
|
|
13153
14312
|
toasts,
|
|
13154
|
-
addToast: (message, type = "info",
|
|
14313
|
+
addToast: (message, type = "info", durationOrOptions)=>{
|
|
14314
|
+
const hasOptions = void 0 !== durationOrOptions;
|
|
14315
|
+
const duration = "number" == typeof durationOrOptions ? durationOrOptions : durationOrOptions?.duration ?? ("error" !== type || hasOptions ? 8000 : 0);
|
|
14316
|
+
const persist = "number" == typeof durationOrOptions ? false : durationOrOptions?.persist ?? ("error" === type && !hasOptions);
|
|
13155
14317
|
const id = `toast-${++toastCounter}`;
|
|
13156
14318
|
const toast = {
|
|
13157
14319
|
id,
|
|
13158
14320
|
message,
|
|
13159
14321
|
type,
|
|
13160
14322
|
timestamp: Date.now(),
|
|
13161
|
-
duration
|
|
14323
|
+
duration,
|
|
14324
|
+
persist
|
|
13162
14325
|
};
|
|
13163
14326
|
setToasts((prev)=>[
|
|
13164
14327
|
...prev,
|
|
13165
14328
|
toast
|
|
13166
14329
|
]);
|
|
13167
|
-
scheduleDismiss(id, duration);
|
|
14330
|
+
if (!persist) scheduleDismiss(id, duration);
|
|
13168
14331
|
return id;
|
|
13169
14332
|
},
|
|
13170
14333
|
dismissToast: (id)=>{
|
|
@@ -13183,7 +14346,9 @@ const toastStore = {
|
|
|
13183
14346
|
toastTimers.clear();
|
|
13184
14347
|
setToasts([]);
|
|
13185
14348
|
},
|
|
13186
|
-
showError: (message)=>toastStore.addToast(message, "error",
|
|
14349
|
+
showError: (message)=>toastStore.addToast(message, "error", {
|
|
14350
|
+
persist: true
|
|
14351
|
+
}),
|
|
13187
14352
|
showSuccess: (message)=>toastStore.addToast(message, "success", 6000),
|
|
13188
14353
|
showWarning: (message)=>toastStore.addToast(message, "warning", 8000),
|
|
13189
14354
|
showInfo: (message)=>toastStore.addToast(message, "info", 6000)
|
|
@@ -13576,4 +14741,4 @@ const createRouteTransitionResolver = (options)=>{
|
|
|
13576
14741
|
return fallback ?? noMotion;
|
|
13577
14742
|
};
|
|
13578
14743
|
};
|
|
13579
|
-
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, bottom_sheet_BottomSheet as BottomSheet, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, Calendar, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, connectionstatus_ConnectionStatus as ConnectionStatus, CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, EnhancedTable, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input as Input, join_Join as Join, kbd_Kbd as Kbd, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal_Modal as Modal, MotionDiv, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock,
|
|
14744
|
+
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, bottom_sheet_BottomSheet as BottomSheet, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, Calendar, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, colorpicker_ColorPicker as ColorPicker, connectionstatus_ConnectionStatus as ConnectionStatus, CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, EnhancedTable, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input as Input, join_Join as Join, kbd_Kbd as Kbd, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal_Modal as Modal, MotionDiv, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, ShowcaseSection, sidenav_Sidenav as Sidenav, sidenav_SidenavButton as SidenavButton, sidenav_SidenavGroup as SidenavGroup, sidenav_SidenavItem as SidenavItem, sidenav_SidenavLink as SidenavLink, sidenav_SidenavMenu as SidenavMenu, skeleton_Skeleton as Skeleton, Stack, stat_card_StatCard as StatCard, stats_Stats as Stats, status_Status as Status, steps as Steps, streaming_table_StreamingTable as StreamingTable, Summary, SvgBackground, Swap, table_Table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, ToastContainer, ToastStack_ToastStack as ToastStack, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, createMotionPresets, createMotionSystem, createPopmotionDriver, createRouteTransitionResolver, createStreamingTableStore, connectionstatus_ConnectionStatus as default, defaultMotionTokens, enablePopmotion, getMotionDriver, presets_getPreset as getPreset, immediateDriver, mergeMotionTokens, motionDistances, motionDurations, motionEasings, motionPresets, noMotion, prefersReducedMotion, presets_registerPreset as registerPreset, resolveEase, presets_resolvePreset as resolvePreset, routeTransition, runMotion, setMotionDriver, toastStore, useDesktop, useFormValidation };
|