@pathscale/ui 0.0.39 → 0.0.41
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/index.js +289 -94
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__felte_solid_6a709b1d__ from "@felte/solid";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__felte_validator_zod_bb07151a__ from "@felte/validator-zod";
|
|
3
5
|
const CLASS_PART_SEPARATOR = '-';
|
|
4
6
|
const createClassGroupUtils = (config)=>{
|
|
5
7
|
const classMap = createClassMap(config);
|
|
@@ -3533,6 +3535,43 @@ const Alert = (props)=>{
|
|
|
3533
3535
|
})();
|
|
3534
3536
|
};
|
|
3535
3537
|
const alert_Alert = Alert;
|
|
3538
|
+
var Artboard_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
3539
|
+
const Artboard = (props)=>{
|
|
3540
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
3541
|
+
"children",
|
|
3542
|
+
"demo",
|
|
3543
|
+
"size",
|
|
3544
|
+
"horizontal",
|
|
3545
|
+
"dataTheme",
|
|
3546
|
+
"class",
|
|
3547
|
+
"className"
|
|
3548
|
+
]);
|
|
3549
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
3550
|
+
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("artboard", local.class, local.className, dist_clsx({
|
|
3551
|
+
"artboard-demo": local.demo ?? true,
|
|
3552
|
+
"phone-1": 1 === local.size,
|
|
3553
|
+
"phone-2": 2 === local.size,
|
|
3554
|
+
"phone-3": 3 === local.size,
|
|
3555
|
+
"phone-4": 4 === local.size,
|
|
3556
|
+
"phone-5": 5 === local.size,
|
|
3557
|
+
"phone-6": 6 === local.size,
|
|
3558
|
+
horizontal: local.horizontal
|
|
3559
|
+
})));
|
|
3560
|
+
return (()=>{
|
|
3561
|
+
var _el$ = Artboard_tmpl$();
|
|
3562
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
3563
|
+
get ["data-theme"] () {
|
|
3564
|
+
return local.dataTheme;
|
|
3565
|
+
},
|
|
3566
|
+
get ["class"] () {
|
|
3567
|
+
return classes();
|
|
3568
|
+
}
|
|
3569
|
+
}), false, true);
|
|
3570
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren);
|
|
3571
|
+
return _el$;
|
|
3572
|
+
})();
|
|
3573
|
+
};
|
|
3574
|
+
const artboard_Artboard = Artboard;
|
|
3536
3575
|
const VoidElementList = [
|
|
3537
3576
|
"area",
|
|
3538
3577
|
"base",
|
|
@@ -3854,6 +3893,56 @@ const BreadcrumbsItem = (props)=>{
|
|
|
3854
3893
|
})();
|
|
3855
3894
|
};
|
|
3856
3895
|
const breadcrumbs_BreadcrumbsItem = BreadcrumbsItem;
|
|
3896
|
+
var BrowserMockup_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div><div class=mockup-browser-toolbar><div class=input><input type=text readonly></div></div><div>");
|
|
3897
|
+
const BrowserMockup = (props)=>{
|
|
3898
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
3899
|
+
"dataTheme",
|
|
3900
|
+
"class",
|
|
3901
|
+
"className",
|
|
3902
|
+
"inputClassName",
|
|
3903
|
+
"innerClassName",
|
|
3904
|
+
"children",
|
|
3905
|
+
"url",
|
|
3906
|
+
"variant"
|
|
3907
|
+
]);
|
|
3908
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
3909
|
+
const variant = ()=>local.variant ?? "border";
|
|
3910
|
+
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("mockup-browser border", dist_clsx({
|
|
3911
|
+
"border-base-300": "border" === variant(),
|
|
3912
|
+
"bg-base-300": "background" === variant()
|
|
3913
|
+
}), local.class, local.className));
|
|
3914
|
+
const inputClasses = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("input", dist_clsx({
|
|
3915
|
+
"border-base-300": "border" === variant()
|
|
3916
|
+
}), local.inputClassName));
|
|
3917
|
+
const innerClasses = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("flex justify-center px-4 py-16", dist_clsx({
|
|
3918
|
+
"border-t border-base-300": "border" === variant(),
|
|
3919
|
+
"bg-base-200": "background" === variant()
|
|
3920
|
+
}), local.innerClassName));
|
|
3921
|
+
return (()=>{
|
|
3922
|
+
var _el$ = BrowserMockup_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$2.nextSibling;
|
|
3923
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
3924
|
+
get ["data-theme"] () {
|
|
3925
|
+
return local.dataTheme;
|
|
3926
|
+
},
|
|
3927
|
+
get ["class"] () {
|
|
3928
|
+
return classes();
|
|
3929
|
+
}
|
|
3930
|
+
}), false, true);
|
|
3931
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$5, resolvedChildren);
|
|
3932
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
3933
|
+
var _v$ = inputClasses(), _v$2 = innerClasses();
|
|
3934
|
+
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$4, _p$.e = _v$);
|
|
3935
|
+
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$5, _p$.t = _v$2);
|
|
3936
|
+
return _p$;
|
|
3937
|
+
}, {
|
|
3938
|
+
e: void 0,
|
|
3939
|
+
t: void 0
|
|
3940
|
+
});
|
|
3941
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$4.value = local.url);
|
|
3942
|
+
return _el$;
|
|
3943
|
+
})();
|
|
3944
|
+
};
|
|
3945
|
+
const browsermockup_BrowserMockup = BrowserMockup;
|
|
3857
3946
|
var Loading_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>");
|
|
3858
3947
|
const Loading = (props)=>{
|
|
3859
3948
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -4205,7 +4294,7 @@ const ChatBubbleTime = (props)=>(()=>{
|
|
|
4205
4294
|
return _el$;
|
|
4206
4295
|
})();
|
|
4207
4296
|
const chatbubble_ChatBubbleTime = ChatBubbleTime;
|
|
4208
|
-
const
|
|
4297
|
+
const ChatBubbleAvatar_ChatBubbleAvatar = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(avatar, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(props, {
|
|
4209
4298
|
get size () {
|
|
4210
4299
|
return props.size ?? "xs";
|
|
4211
4300
|
},
|
|
@@ -4216,7 +4305,7 @@ const ChatBubbleAvatar = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d
|
|
|
4216
4305
|
return twMerge("chat-image", props.class);
|
|
4217
4306
|
}
|
|
4218
4307
|
}));
|
|
4219
|
-
const
|
|
4308
|
+
const ChatBubbleAvatar = ChatBubbleAvatar_ChatBubbleAvatar;
|
|
4220
4309
|
var ChatBubbleMessage_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>");
|
|
4221
4310
|
const ChatBubbleMessage_ChatBubbleMessage = (props)=>{
|
|
4222
4311
|
const bubbleClass = clsx({
|
|
@@ -4282,7 +4371,7 @@ const ChatBubble = (props)=>{
|
|
|
4282
4371
|
const chatbubble_ChatBubble = Object.assign(ChatBubble, {
|
|
4283
4372
|
Header: ChatBubbleHeader,
|
|
4284
4373
|
Time: chatbubble_ChatBubbleTime,
|
|
4285
|
-
Avatar:
|
|
4374
|
+
Avatar: ChatBubbleAvatar,
|
|
4286
4375
|
Message: ChatBubbleMessage,
|
|
4287
4376
|
Footer: chatbubble_ChatBubbleFooter
|
|
4288
4377
|
});
|
|
@@ -4596,56 +4685,6 @@ const Countdown = (props)=>{
|
|
|
4596
4685
|
})();
|
|
4597
4686
|
};
|
|
4598
4687
|
const countdown_Countdown = Countdown;
|
|
4599
|
-
var BrowserMockup_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div><div class=mockup-browser-toolbar><div class=input><input type=text readonly></div></div><div>");
|
|
4600
|
-
const BrowserMockup = (props)=>{
|
|
4601
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
4602
|
-
"dataTheme",
|
|
4603
|
-
"class",
|
|
4604
|
-
"className",
|
|
4605
|
-
"inputClassName",
|
|
4606
|
-
"innerClassName",
|
|
4607
|
-
"children",
|
|
4608
|
-
"url",
|
|
4609
|
-
"variant"
|
|
4610
|
-
]);
|
|
4611
|
-
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
4612
|
-
const variant = ()=>local.variant ?? "border";
|
|
4613
|
-
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("mockup-browser border", dist_clsx({
|
|
4614
|
-
"border-base-300": "border" === variant(),
|
|
4615
|
-
"bg-base-300": "background" === variant()
|
|
4616
|
-
}), local.class, local.className));
|
|
4617
|
-
const inputClasses = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("input", dist_clsx({
|
|
4618
|
-
"border-base-300": "border" === variant()
|
|
4619
|
-
}), local.inputClassName));
|
|
4620
|
-
const innerClasses = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("flex justify-center px-4 py-16", dist_clsx({
|
|
4621
|
-
"border-t border-base-300": "border" === variant(),
|
|
4622
|
-
"bg-base-200": "background" === variant()
|
|
4623
|
-
}), local.innerClassName));
|
|
4624
|
-
return (()=>{
|
|
4625
|
-
var _el$ = BrowserMockup_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$2.nextSibling;
|
|
4626
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
4627
|
-
get ["data-theme"] () {
|
|
4628
|
-
return local.dataTheme;
|
|
4629
|
-
},
|
|
4630
|
-
get ["class"] () {
|
|
4631
|
-
return classes();
|
|
4632
|
-
}
|
|
4633
|
-
}), false, true);
|
|
4634
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$5, resolvedChildren);
|
|
4635
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
4636
|
-
var _v$ = inputClasses(), _v$2 = innerClasses();
|
|
4637
|
-
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$4, _p$.e = _v$);
|
|
4638
|
-
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$5, _p$.t = _v$2);
|
|
4639
|
-
return _p$;
|
|
4640
|
-
}, {
|
|
4641
|
-
e: void 0,
|
|
4642
|
-
t: void 0
|
|
4643
|
-
});
|
|
4644
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$4.value = local.url);
|
|
4645
|
-
return _el$;
|
|
4646
|
-
})();
|
|
4647
|
-
};
|
|
4648
|
-
const browsermockup_BrowserMockup = BrowserMockup;
|
|
4649
4688
|
var Diff_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div><div class=diff-item-1></div><div class=diff-item-2></div><div class=diff-resizer>");
|
|
4650
4689
|
const Diff = (props)=>{
|
|
4651
4690
|
const [local, rest] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -5403,6 +5442,7 @@ const Label = (props)=>{
|
|
|
5403
5442
|
"class",
|
|
5404
5443
|
"className"
|
|
5405
5444
|
]);
|
|
5445
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
5406
5446
|
const classes = ()=>twMerge("label", local.class, local.className);
|
|
5407
5447
|
return (()=>{
|
|
5408
5448
|
var _el$ = Label_tmpl$(), _el$2 = _el$.firstChild;
|
|
@@ -5415,11 +5455,56 @@ const Label = (props)=>{
|
|
|
5415
5455
|
}
|
|
5416
5456
|
}), false, true);
|
|
5417
5457
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.title);
|
|
5418
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$,
|
|
5458
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren, null);
|
|
5419
5459
|
return _el$;
|
|
5420
5460
|
})();
|
|
5421
5461
|
};
|
|
5422
5462
|
const form_Label = Label;
|
|
5463
|
+
const FormValidationContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)();
|
|
5464
|
+
function useFormValidation() {
|
|
5465
|
+
const context = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(FormValidationContext);
|
|
5466
|
+
if (!context) throw new Error("useFormValidation must be used within a ValidatedForm");
|
|
5467
|
+
return context;
|
|
5468
|
+
}
|
|
5469
|
+
function ValidatedForm(props) {
|
|
5470
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
5471
|
+
"children",
|
|
5472
|
+
"schema",
|
|
5473
|
+
"onSubmit",
|
|
5474
|
+
"initialValues"
|
|
5475
|
+
]);
|
|
5476
|
+
const { form, errors, touched, data, isValid, isSubmitting } = (0, __WEBPACK_EXTERNAL_MODULE__felte_solid_6a709b1d__.createForm)({
|
|
5477
|
+
initialValues: local.initialValues,
|
|
5478
|
+
extend: [
|
|
5479
|
+
(0, __WEBPACK_EXTERNAL_MODULE__felte_validator_zod_bb07151a__.validator)({
|
|
5480
|
+
schema: local.schema
|
|
5481
|
+
})
|
|
5482
|
+
],
|
|
5483
|
+
onSubmit: local.onSubmit
|
|
5484
|
+
});
|
|
5485
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
5486
|
+
const contextValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>({
|
|
5487
|
+
errors,
|
|
5488
|
+
touched,
|
|
5489
|
+
data,
|
|
5490
|
+
isValid,
|
|
5491
|
+
isSubmitting
|
|
5492
|
+
}));
|
|
5493
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(FormValidationContext.Provider, {
|
|
5494
|
+
get value () {
|
|
5495
|
+
return contextValue();
|
|
5496
|
+
},
|
|
5497
|
+
get children () {
|
|
5498
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(form_Form, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
5499
|
+
ref: form,
|
|
5500
|
+
get children () {
|
|
5501
|
+
return resolvedChildren();
|
|
5502
|
+
}
|
|
5503
|
+
}));
|
|
5504
|
+
}
|
|
5505
|
+
});
|
|
5506
|
+
}
|
|
5507
|
+
const form_ValidatedForm = ValidatedForm;
|
|
5423
5508
|
var Form_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<form role=form>");
|
|
5424
5509
|
const Form = (props)=>{
|
|
5425
5510
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -5428,6 +5513,7 @@ const Form = (props)=>{
|
|
|
5428
5513
|
"class",
|
|
5429
5514
|
"className"
|
|
5430
5515
|
]);
|
|
5516
|
+
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
5431
5517
|
const classes = ()=>twMerge("form-control", local.class, local.className);
|
|
5432
5518
|
return (()=>{
|
|
5433
5519
|
var _el$ = Form_tmpl$();
|
|
@@ -5439,12 +5525,13 @@ const Form = (props)=>{
|
|
|
5439
5525
|
return classes();
|
|
5440
5526
|
}
|
|
5441
5527
|
}), false, true);
|
|
5442
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$,
|
|
5528
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren);
|
|
5443
5529
|
return _el$;
|
|
5444
5530
|
})();
|
|
5445
5531
|
};
|
|
5446
5532
|
const form_Form = Object.assign(Form, {
|
|
5447
|
-
Label: form_Label
|
|
5533
|
+
Label: form_Label,
|
|
5534
|
+
Validated: form_ValidatedForm
|
|
5448
5535
|
});
|
|
5449
5536
|
const colsMap = {
|
|
5450
5537
|
1: "grid-cols-1",
|
|
@@ -7406,6 +7493,151 @@ const steps_Steps = Object.assign(Steps, {
|
|
|
7406
7493
|
Step: Step
|
|
7407
7494
|
});
|
|
7408
7495
|
const steps = steps_Steps;
|
|
7496
|
+
var SvgBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class="absolute inset-0 z-0"></div><div class="relative z-10 h-full w-full">'), SvgBackground_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="absolute inset-0 z-5">');
|
|
7497
|
+
function parseHSL(hslString) {
|
|
7498
|
+
const match = hslString.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
|
|
7499
|
+
if (!match) return null;
|
|
7500
|
+
return {
|
|
7501
|
+
h: parseInt(match[1]),
|
|
7502
|
+
s: parseInt(match[2]),
|
|
7503
|
+
l: parseInt(match[3])
|
|
7504
|
+
};
|
|
7505
|
+
}
|
|
7506
|
+
function interpolateHue(h1, h2, t) {
|
|
7507
|
+
const diff = h2 - h1;
|
|
7508
|
+
if (Math.abs(diff) > 180) if (diff > 0) h1 += 360;
|
|
7509
|
+
else h2 += 360;
|
|
7510
|
+
return (h1 + (h2 - h1) * t + 360) % 360;
|
|
7511
|
+
}
|
|
7512
|
+
function SvgBackground(props) {
|
|
7513
|
+
const { colorStart = 'hsl(129, 100%, 72%)', colorEnd = 'hsl(227, 100%, 50%)', opacity = 1, blurIntensity = 36, turbulenceFrequency = 0.007, animated = false, animationSpeed = 1, class: className = '', style = {}, children, darkness = 0 } = props;
|
|
7514
|
+
const [animationTime, setAnimationTime] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(0);
|
|
7515
|
+
let animationFrame = null;
|
|
7516
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
7517
|
+
if (animated) {
|
|
7518
|
+
const animate = ()=>{
|
|
7519
|
+
setAnimationTime((prev)=>prev + 0.008 * animationSpeed);
|
|
7520
|
+
animationFrame = requestAnimationFrame(animate);
|
|
7521
|
+
};
|
|
7522
|
+
animate();
|
|
7523
|
+
}
|
|
7524
|
+
});
|
|
7525
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
7526
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
7527
|
+
});
|
|
7528
|
+
const gradientId = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>`svg-bg-gradient-${Math.random().toString(36).substr(2, 9)}`, void 0, {
|
|
7529
|
+
equals: false
|
|
7530
|
+
});
|
|
7531
|
+
const filterId = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>`svg-bg-filter-${Math.random().toString(36).substr(2, 9)}`, void 0, {
|
|
7532
|
+
equals: false
|
|
7533
|
+
});
|
|
7534
|
+
const startHSL = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>parseHSL(colorStart));
|
|
7535
|
+
const endHSL = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>parseHSL(colorEnd));
|
|
7536
|
+
const animatedValues = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
7537
|
+
if (!animated) return {
|
|
7538
|
+
color1: colorStart,
|
|
7539
|
+
color2: colorEnd,
|
|
7540
|
+
turbFreq1: turbulenceFrequency,
|
|
7541
|
+
turbFreq2: 0.4 * turbulenceFrequency
|
|
7542
|
+
};
|
|
7543
|
+
const time = animationTime();
|
|
7544
|
+
const baseSpeed = 0.001 * animationSpeed;
|
|
7545
|
+
const freq1 = time * baseSpeed * 7;
|
|
7546
|
+
const freq2 = time * baseSpeed * 11;
|
|
7547
|
+
const freq3 = time * baseSpeed * 13;
|
|
7548
|
+
const freq4 = time * baseSpeed * 17;
|
|
7549
|
+
const freq5 = time * baseSpeed * 19;
|
|
7550
|
+
const wave1 = 0.3 * Math.sin(freq1);
|
|
7551
|
+
const wave2 = 0.25 * Math.sin(freq2);
|
|
7552
|
+
const wave3 = 0.2 * Math.sin(freq3);
|
|
7553
|
+
const wave4 = 0.15 * Math.sin(freq4);
|
|
7554
|
+
const wave5 = 0.1 * Math.sin(freq5);
|
|
7555
|
+
const combinedWave = wave1 + wave2 + wave3 + wave4 + wave5;
|
|
7556
|
+
const colorMix = (combinedWave + 1) / 2;
|
|
7557
|
+
const wave1b = 0.3 * Math.cos(freq2);
|
|
7558
|
+
const wave2b = 0.25 * Math.cos(freq3);
|
|
7559
|
+
const wave3b = 0.2 * Math.cos(freq4);
|
|
7560
|
+
const wave4b = 0.15 * Math.cos(freq5);
|
|
7561
|
+
const wave5b = 0.1 * Math.cos(freq1);
|
|
7562
|
+
const combinedWave2 = wave1b + wave2b + wave3b + wave4b + wave5b;
|
|
7563
|
+
const colorMix2 = (combinedWave2 + 1) / 2;
|
|
7564
|
+
const turbMix1 = (0.5 * Math.sin(0.3 * freq1) + 0.5 * Math.cos(0.2 * freq2) + 1) / 2;
|
|
7565
|
+
const turbMix2 = (0.5 * Math.cos(0.2 * freq3) + 0.5 * Math.sin(0.3 * freq4) + 1) / 2;
|
|
7566
|
+
let color1 = colorStart;
|
|
7567
|
+
let color2 = colorEnd;
|
|
7568
|
+
const start = startHSL();
|
|
7569
|
+
const end = endHSL();
|
|
7570
|
+
if (start && end) {
|
|
7571
|
+
const h1 = interpolateHue(start.h, end.h, colorMix);
|
|
7572
|
+
const s1 = start.s + (end.s - start.s) * colorMix;
|
|
7573
|
+
const l1 = start.l + (end.l - start.l) * colorMix;
|
|
7574
|
+
const h2 = interpolateHue(start.h, end.h, colorMix2);
|
|
7575
|
+
const s2 = start.s + (end.s - start.s) * colorMix2;
|
|
7576
|
+
const l2 = start.l + (end.l - start.l) * colorMix2;
|
|
7577
|
+
color1 = `hsl(${Math.round(h1)}, ${Math.round(s1)}%, ${Math.round(l1)}%)`;
|
|
7578
|
+
color2 = `hsl(${Math.round(h2)}, ${Math.round(s2)}%, ${Math.round(l2)}%)`;
|
|
7579
|
+
}
|
|
7580
|
+
const turbFreq1 = turbulenceFrequency + 0.01 * turbulenceFrequency * turbMix1;
|
|
7581
|
+
const turbFreq2 = 0.4 * turbulenceFrequency + 0.01 * turbulenceFrequency * turbMix2;
|
|
7582
|
+
if (Math.floor(10 * time) % 50 === 0) console.log(`Time: ${time.toFixed(2)}, Mix1: ${colorMix.toFixed(3)}, Mix2: ${colorMix2.toFixed(3)}, Combined: ${combinedWave.toFixed(3)}, C1: ${color1}, C2: ${color2}`);
|
|
7583
|
+
return {
|
|
7584
|
+
color1,
|
|
7585
|
+
color2,
|
|
7586
|
+
turbFreq1,
|
|
7587
|
+
turbFreq2
|
|
7588
|
+
};
|
|
7589
|
+
});
|
|
7590
|
+
const staticSvg = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
7591
|
+
const values = animatedValues();
|
|
7592
|
+
const svg = `
|
|
7593
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" width="700" height="700">
|
|
7594
|
+
<defs>
|
|
7595
|
+
<linearGradient gradientTransform="rotate(63, 0.5, 0.5)" x1="50%" y1="0%" x2="50%" y2="100%" id="${gradientId()}">
|
|
7596
|
+
<stop stop-color="${values.color1}" stop-opacity="1" offset="0%"></stop>
|
|
7597
|
+
<stop stop-color="${values.color2}" stop-opacity="1" offset="100%"></stop>
|
|
7598
|
+
</linearGradient>
|
|
7599
|
+
<filter id="${filterId()}" x="-20%" y="-20%" width="140%" height="140%" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
7600
|
+
<feTurbulence type="fractalNoise" baseFrequency="${values.turbFreq1} ${values.turbFreq2}" numOctaves="2" seed="10" stitchTiles="stitch" result="turbulence"></feTurbulence>
|
|
7601
|
+
<feGaussianBlur stdDeviation="${blurIntensity} ${blurIntensity}" in="turbulence" edgeMode="duplicate" result="blur"></feGaussianBlur>
|
|
7602
|
+
<feBlend mode="color-dodge" in="SourceGraphic" in2="blur" result="blend"></feBlend>
|
|
7603
|
+
</filter>
|
|
7604
|
+
</defs>
|
|
7605
|
+
<rect width="700" height="700" fill="url(#${gradientId()})" filter="url(#${filterId()})"></rect>
|
|
7606
|
+
</svg>
|
|
7607
|
+
`;
|
|
7608
|
+
return `data:image/svg+xml;base64,${btoa(svg)}`;
|
|
7609
|
+
});
|
|
7610
|
+
const backgroundStyle = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>({
|
|
7611
|
+
position: 'relative',
|
|
7612
|
+
...style,
|
|
7613
|
+
'--svg-bg': `url("${staticSvg()}")`
|
|
7614
|
+
}));
|
|
7615
|
+
return (()=>{
|
|
7616
|
+
var _el$ = SvgBackground_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7617
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, `relative ${className}`);
|
|
7618
|
+
_el$2.style.setProperty("background-image", "var(--svg-bg)");
|
|
7619
|
+
_el$2.style.setProperty("background-size", "cover");
|
|
7620
|
+
_el$2.style.setProperty("background-position", "center");
|
|
7621
|
+
_el$2.style.setProperty("background-repeat", "no-repeat");
|
|
7622
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, darkness > 0 && (()=>{
|
|
7623
|
+
var _el$4 = SvgBackground_tmpl$2();
|
|
7624
|
+
_el$4.style.setProperty("background-color", `rgba(0, 0, 0, ${darkness})`);
|
|
7625
|
+
_el$4.style.setProperty("pointer-events", "none");
|
|
7626
|
+
return _el$4;
|
|
7627
|
+
})(), _el$3);
|
|
7628
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, children);
|
|
7629
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
7630
|
+
var _v$ = backgroundStyle(), _v$2 = opacity.toString();
|
|
7631
|
+
_p$.e = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.style)(_el$, _v$, _p$.e);
|
|
7632
|
+
_v$2 !== _p$.t && (null != (_p$.t = _v$2) ? _el$2.style.setProperty("opacity", _v$2) : _el$2.style.removeProperty("opacity"));
|
|
7633
|
+
return _p$;
|
|
7634
|
+
}, {
|
|
7635
|
+
e: void 0,
|
|
7636
|
+
t: void 0
|
|
7637
|
+
});
|
|
7638
|
+
return _el$;
|
|
7639
|
+
})();
|
|
7640
|
+
}
|
|
7409
7641
|
function isJSXElement(node) {
|
|
7410
7642
|
return "object" == typeof node && null !== node;
|
|
7411
7643
|
}
|
|
@@ -8353,41 +8585,4 @@ const WindowMockup = (props)=>{
|
|
|
8353
8585
|
})();
|
|
8354
8586
|
};
|
|
8355
8587
|
const windowmockup_WindowMockup = WindowMockup;
|
|
8356
|
-
|
|
8357
|
-
const Artboard = (props)=>{
|
|
8358
|
-
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
8359
|
-
"children",
|
|
8360
|
-
"demo",
|
|
8361
|
-
"size",
|
|
8362
|
-
"horizontal",
|
|
8363
|
-
"dataTheme",
|
|
8364
|
-
"class",
|
|
8365
|
-
"className"
|
|
8366
|
-
]);
|
|
8367
|
-
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
8368
|
-
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("artboard", local.class, local.className, dist_clsx({
|
|
8369
|
-
"artboard-demo": local.demo ?? true,
|
|
8370
|
-
"phone-1": 1 === local.size,
|
|
8371
|
-
"phone-2": 2 === local.size,
|
|
8372
|
-
"phone-3": 3 === local.size,
|
|
8373
|
-
"phone-4": 4 === local.size,
|
|
8374
|
-
"phone-5": 5 === local.size,
|
|
8375
|
-
"phone-6": 6 === local.size,
|
|
8376
|
-
horizontal: local.horizontal
|
|
8377
|
-
})));
|
|
8378
|
-
return (()=>{
|
|
8379
|
-
var _el$ = Artboard_tmpl$();
|
|
8380
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
8381
|
-
get ["data-theme"] () {
|
|
8382
|
-
return local.dataTheme;
|
|
8383
|
-
},
|
|
8384
|
-
get ["class"] () {
|
|
8385
|
-
return classes();
|
|
8386
|
-
}
|
|
8387
|
-
}), false, true);
|
|
8388
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren);
|
|
8389
|
-
return _el$;
|
|
8390
|
-
})();
|
|
8391
|
-
};
|
|
8392
|
-
const artboard_Artboard = Artboard;
|
|
8393
|
-
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, 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, copy_button_CopyButton as CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, grid_Grid as Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input_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 as Modal, 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, skeleton_Skeleton as Skeleton, Stack, stats_Stats as Stats, status_Status as Status, steps as Steps, Summary, Swap, 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, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup };
|
|
8588
|
+
export { accordion_Accordion as Accordion, alert_Alert as Alert, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, 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, copy_button_CopyButton as CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, grid_Grid as Grid, hero_Hero as Hero, icon_Icon as Icon, indicator_Indicator as Indicator, input_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 as Modal, 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, skeleton_Skeleton as Skeleton, Stack, stats_Stats as Stats, status_Status as Status, steps as Steps, Summary, SvgBackground, Swap, 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, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, useFormValidation };
|