melonykit 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +68 -63
- package/package.json +3 -3
- package/dist/assets/icons.svg +0 -1
package/dist/index.js
CHANGED
|
@@ -732,8 +732,8 @@ q.merge, q.getRegisteredStyles;
|
|
|
732
732
|
var Je = q.injectGlobal, Ye = q.keyframes, Y = q.css;
|
|
733
733
|
q.sheet, q.cache;
|
|
734
734
|
//#endregion
|
|
735
|
-
//#region
|
|
736
|
-
var Xe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manrope.woff2", X = {
|
|
735
|
+
//#region \0virtual:svg-sprite
|
|
736
|
+
var Xe = "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"position:absolute;width:0;height:0;\" id=\"svg-sprite\"><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-check\" viewBox=\"0 0 24 24\"><path d=\"m5 13.26 2.586 2.697C8.252 16.652 8.586 17 9 17s.748-.348 1.414-1.043L19 7\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-exclamation-triangle\" viewBox=\"0 0 24 24\"><path d=\"M13.925 21h-3.85c-4.63 0-6.945 0-7.799-1.506-.853-1.506.331-3.503 2.7-7.495L6.9 8.753C9.176 4.918 10.313 3 12 3s2.824 1.918 5.1 5.753L19.023 12c2.369 3.992 3.553 5.989 2.7 7.495C20.87 21 18.555 21 13.924 21\"/><path d=\"M12 9v4\"/><path d=\"M12.125 16.75H12m.25 0a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-plus\" viewBox=\"0 0 24 24\"><path d=\"M11.992 4v16m8-8h-16\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-x\" viewBox=\"0 0 24 24\"><path d=\"m18 6-6 6m0 0-6 6m6-6 6 6m-6-6L6 6\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-trash\" viewBox=\"0 0 24 24\"><path d=\"m19.5 5.5-.62 10.025c-.158 2.561-.237 3.842-.88 4.763a4 4 0 0 1-1.2 1.128c-.957.584-2.24.584-4.806.584-2.57 0-3.855 0-4.814-.585a4 4 0 0 1-1.2-1.13c-.642-.922-.72-2.205-.874-4.77L4.5 5.5\"/><path d=\"M3 5.5h18m-4.944 0-.683-1.408c-.453-.936-.68-1.403-1.071-1.695a2 2 0 0 0-.275-.172C13.594 2 13.074 2 12.035 2c-1.066 0-1.599 0-2.04.234a2 2 0 0 0-.278.18c-.395.303-.616.788-1.058 1.757L8.053 5.5\"/><path d=\"M9.5 16.5v-6\"/><path d=\"M14.5 16.5v-6\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-play\" viewBox=\"0 0 24 24\"><path d=\"M18.89 12.846c-.353 1.343-2.023 2.292-5.364 4.19-3.23 1.835-4.845 2.752-6.146 2.384a3.25 3.25 0 0 1-1.424-.841C5 17.614 5 15.743 5 12s0-5.614.956-6.579a3.25 3.25 0 0 1 1.424-.84c1.301-.37 2.916.548 6.146 2.383 3.34 1.898 5.011 2.847 5.365 4.19a3.3 3.3 0 0 1 0 1.692Z\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-eye\" viewBox=\"0 0 24 24\"><path d=\"M21.544 11.045c.304.426.456.64.456.955 0 .316-.152.529-.456.955C20.178 14.871 16.689 19 12 19c-4.69 0-8.178-4.13-9.544-6.045C2.152 12.529 2 12.315 2 12c0-.316.152-.529.456-.955C3.822 9.129 7.311 5 12 5c4.69 0 8.178 4.13 9.544 6.045Z\"/><path d=\"M15 12a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z\"/></symbol><symbol xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" color=\"currentColor\" id=\"icon-hourglass\" viewBox=\"0 0 24 24\"><path d=\"M17.201 2H6.8c-1.458 0-2.737.985-2.795 2.404-.074 1.785 1.182 2.97 2.5 4.083 1.825 1.54 2.737 2.31 2.832 3.284q.023.229 0 .458c-.095.975-1.007 1.744-2.832 3.284-1.355 1.143-2.578 2.207-2.5 4.083C4.062 21.016 5.34 22 6.799 22H17.2c1.458 0 2.737-.985 2.796-2.404.046-1.13-.373-2.254-1.262-3.036-.405-.357-.826-.698-1.24-1.047-1.824-1.54-2.736-2.31-2.831-3.284a2.3 2.3 0 0 1 0-.458c.095-.975 1.008-1.744 2.832-3.284 1.34-1.131 2.577-2.229 2.5-4.083C19.939 2.984 18.66 2 17.202 2Z\"/><path stroke-linecap=\"round\" d=\"M9 21.638c0-.442 0-.663.088-.856a1 1 0 0 1 .046-.09c.107-.183.288-.312.65-.571 1.006-.719 1.51-1.078 2.081-1.116q.135-.009.27 0c.572.038 1.075.397 2.08 1.116.363.259.544.388.651.571q.026.045.046.09c.088.193.088.414.088.856V22H9z\"/></symbol></svg>", Ze = !1, Qe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manrope.woff2", X = {
|
|
737
737
|
baseUnit: 16,
|
|
738
738
|
maxWidth: 67.5,
|
|
739
739
|
fontFamily: "Manrope",
|
|
@@ -771,11 +771,11 @@ var Xe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manr
|
|
|
771
771
|
horizontalCenter: "\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n ",
|
|
772
772
|
stretch: "\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n "
|
|
773
773
|
},
|
|
774
|
-
|
|
775
|
-
Je(`
|
|
774
|
+
load() {
|
|
775
|
+
Ze || typeof document > "u" || (Je(`
|
|
776
776
|
@font-face {
|
|
777
777
|
font-family: 'Manrope';
|
|
778
|
-
src: url('${
|
|
778
|
+
src: url('${Qe}') format('woff2');
|
|
779
779
|
font-weight: 100 900;
|
|
780
780
|
font-style: normal;
|
|
781
781
|
font-display: swap;
|
|
@@ -790,7 +790,7 @@ var Xe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manr
|
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
html {
|
|
793
|
-
|
|
793
|
+
/* Prevent Safari font flickering while animations */
|
|
794
794
|
width: 100%;
|
|
795
795
|
height: 100%;
|
|
796
796
|
line-height: 1.15;
|
|
@@ -802,12 +802,14 @@ var Xe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manr
|
|
|
802
802
|
body {
|
|
803
803
|
overflow-x: hidden;
|
|
804
804
|
overflow-y: scroll;
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
805
|
+
/*
|
|
806
|
+
background: linear-gradient(
|
|
807
|
+
to top left,
|
|
808
|
+
${this.colors.freshSnow} 0%,
|
|
809
|
+
${this.colors.freshSnow} 25%,
|
|
810
|
+
#eef8fb 60%
|
|
811
|
+
);
|
|
812
|
+
*/
|
|
811
813
|
}
|
|
812
814
|
|
|
813
815
|
img { border-style: none; }
|
|
@@ -861,9 +863,9 @@ var Xe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manr
|
|
|
861
863
|
|
|
862
864
|
&:active { transform: scale(.95); }
|
|
863
865
|
}
|
|
864
|
-
`);
|
|
866
|
+
`), !(document.getElementById("svg-sprite") || !document.body) && (document.body.insertAdjacentHTML("afterbegin", Xe), Ze = !0));
|
|
865
867
|
}
|
|
866
|
-
},
|
|
868
|
+
}, $e = ({ type: e = "normal", width: t = "100%", value: i = 0 }) => /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("div", {
|
|
867
869
|
className: Z.base,
|
|
868
870
|
style: { width: t },
|
|
869
871
|
children: /* @__PURE__ */ r("div", {
|
|
@@ -898,9 +900,9 @@ var Xe = new URL("./assets/manrope.woff2", import.meta.url).href ?? "/fonts/manr
|
|
|
898
900
|
};
|
|
899
901
|
//#endregion
|
|
900
902
|
//#region src/components/_box.jsx
|
|
901
|
-
function
|
|
903
|
+
function et({ className: e, width: t, height: i, children: a }) {
|
|
902
904
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("div", {
|
|
903
|
-
className: J(
|
|
905
|
+
className: J(tt.base, e),
|
|
904
906
|
style: {
|
|
905
907
|
width: t,
|
|
906
908
|
height: i
|
|
@@ -908,17 +910,19 @@ function Qe({ className: e, width: t, height: i, children: a }) {
|
|
|
908
910
|
children: a
|
|
909
911
|
}) });
|
|
910
912
|
}
|
|
911
|
-
var
|
|
913
|
+
var tt = { base: Y`
|
|
912
914
|
position: relative;
|
|
913
915
|
border-radius: 18px;
|
|
914
916
|
border: solid 2px #eee;
|
|
915
917
|
padding: 1.875rem 1.25rem;
|
|
916
918
|
background-color: ${X.colors.back.primary};
|
|
917
919
|
box-shadow: ${X.colors.shadow.primary};
|
|
918
|
-
` }
|
|
920
|
+
` };
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region src/components/_icon.jsx
|
|
919
923
|
function Q({ className: e, size: t = "1.25rem", color: i = X.colors.fore.primary, iconName: a, isSpinning: o }) {
|
|
920
924
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("svg", {
|
|
921
|
-
className: J(
|
|
925
|
+
className: J(nt.base, e),
|
|
922
926
|
style: {
|
|
923
927
|
color: i,
|
|
924
928
|
width: t,
|
|
@@ -926,10 +930,10 @@ function Q({ className: e, size: t = "1.25rem", color: i = X.colors.fore.primary
|
|
|
926
930
|
},
|
|
927
931
|
"aria-hidden": "true",
|
|
928
932
|
"is-spinning": o || void 0,
|
|
929
|
-
children: /* @__PURE__ */ r("use", { href:
|
|
933
|
+
children: /* @__PURE__ */ r("use", { href: `#icon-${a}` })
|
|
930
934
|
}) });
|
|
931
935
|
}
|
|
932
|
-
var
|
|
936
|
+
var nt = { base: Y`
|
|
933
937
|
fill: currentColor;
|
|
934
938
|
display: inline-block;
|
|
935
939
|
flex-shrink: 0;
|
|
@@ -955,7 +959,7 @@ var tt = { base: Y`
|
|
|
955
959
|
` };
|
|
956
960
|
//#endregion
|
|
957
961
|
//#region src/components/_button.jsx
|
|
958
|
-
function
|
|
962
|
+
function rt({ type: e = "primary", label: t, iconName: o, isDisabled: s = !1, isLoading: c = !1, onClick: l }) {
|
|
959
963
|
let u = o || c, d = a(null);
|
|
960
964
|
function f(e) {
|
|
961
965
|
if (s || c) return;
|
|
@@ -1002,7 +1006,7 @@ function nt({ type: e = "primary", label: t, iconName: o, isDisabled: s = !1, is
|
|
|
1002
1006
|
]
|
|
1003
1007
|
}) });
|
|
1004
1008
|
}
|
|
1005
|
-
var
|
|
1009
|
+
var it = Ye`
|
|
1006
1010
|
from {
|
|
1007
1011
|
opacity: .4;
|
|
1008
1012
|
transform: translate(-50%, -50%) scale(0);
|
|
@@ -1037,36 +1041,37 @@ var rt = Ye`
|
|
|
1037
1041
|
border-radius: 50%;
|
|
1038
1042
|
pointer-events: none;
|
|
1039
1043
|
background-color: currentColor;
|
|
1040
|
-
animation: ${
|
|
1044
|
+
animation: ${it} .5s ease-out forwards;
|
|
1041
1045
|
`
|
|
1042
1046
|
};
|
|
1043
1047
|
//#endregion
|
|
1044
1048
|
//#region src/components/_layout.jsx
|
|
1045
|
-
function
|
|
1049
|
+
function at({ className: e, height: t, direction: i = "row", justify: a, align: o, gap: s, children: c }) {
|
|
1046
1050
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("div", {
|
|
1047
|
-
className: J(
|
|
1051
|
+
className: J(ot.base, e),
|
|
1048
1052
|
style: {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
+
height: t,
|
|
1054
|
+
flexDirection: i,
|
|
1055
|
+
justifyContent: a,
|
|
1056
|
+
alignItems: o,
|
|
1057
|
+
gap: s == null ? void 0 : `${s / 2}rem`
|
|
1053
1058
|
},
|
|
1054
|
-
children:
|
|
1059
|
+
children: c
|
|
1055
1060
|
}) });
|
|
1056
1061
|
}
|
|
1057
|
-
var
|
|
1062
|
+
var ot = { base: Y`
|
|
1058
1063
|
display: flex;
|
|
1059
1064
|
` };
|
|
1060
1065
|
//#endregion
|
|
1061
1066
|
//#region src/components/_text.jsx
|
|
1062
|
-
function
|
|
1067
|
+
function st({ as: e = "span", className: t, size: i = "normal", color: a = X.colors.fore.primary, children: o }) {
|
|
1063
1068
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(e, {
|
|
1064
|
-
className: J(
|
|
1069
|
+
className: J(ct.base, ct[i] ?? ct.normal, t),
|
|
1065
1070
|
style: { color: a },
|
|
1066
1071
|
children: o
|
|
1067
1072
|
}) });
|
|
1068
1073
|
}
|
|
1069
|
-
var
|
|
1074
|
+
var ct = {
|
|
1070
1075
|
base: Y`
|
|
1071
1076
|
font-weight: 500;
|
|
1072
1077
|
letter-spacing: 1px;
|
|
@@ -1086,14 +1091,14 @@ var st = {
|
|
|
1086
1091
|
};
|
|
1087
1092
|
//#endregion
|
|
1088
1093
|
//#region src/components/_headline.jsx
|
|
1089
|
-
function
|
|
1094
|
+
function lt({ as: e = "h2", className: t, size: i = "normal", color: a = X.colors.fore.primary, children: o }) {
|
|
1090
1095
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(e, {
|
|
1091
|
-
className: J(
|
|
1096
|
+
className: J(ut.base, ut[i] ?? ut.normal, t),
|
|
1092
1097
|
style: { color: a },
|
|
1093
1098
|
children: o
|
|
1094
1099
|
}) });
|
|
1095
1100
|
}
|
|
1096
|
-
var
|
|
1101
|
+
var ut = {
|
|
1097
1102
|
base: Y`
|
|
1098
1103
|
letter-spacing: 1px;
|
|
1099
1104
|
`,
|
|
@@ -1115,7 +1120,7 @@ var lt = {
|
|
|
1115
1120
|
};
|
|
1116
1121
|
//#endregion
|
|
1117
1122
|
//#region src/components/_space.jsx
|
|
1118
|
-
function
|
|
1123
|
+
function dt({ size: e = 1 }) {
|
|
1119
1124
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("div", {
|
|
1120
1125
|
"aria-hidden": "true",
|
|
1121
1126
|
style: {
|
|
@@ -1126,23 +1131,23 @@ function ut({ size: e = 1 }) {
|
|
|
1126
1131
|
}
|
|
1127
1132
|
//#endregion
|
|
1128
1133
|
//#region src/components/_text-field.jsx
|
|
1129
|
-
function
|
|
1134
|
+
function ft({ placeholder: e, value: t, width: o, isDisabled: s, onChange: c }) {
|
|
1130
1135
|
let l = a(Date.now()), u = a(t);
|
|
1131
1136
|
function d({ target: e }) {
|
|
1132
1137
|
u.value = e.value, c?.(u.value);
|
|
1133
1138
|
}
|
|
1134
1139
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ i("div", {
|
|
1135
|
-
className:
|
|
1140
|
+
className: pt.base,
|
|
1136
1141
|
style: { width: o },
|
|
1137
1142
|
"is-disabled": s,
|
|
1138
1143
|
children: [!u.value && e && /* @__PURE__ */ r("label", {
|
|
1139
|
-
className:
|
|
1144
|
+
className: pt.label,
|
|
1140
1145
|
for: l.value,
|
|
1141
1146
|
children: e
|
|
1142
1147
|
}), /* @__PURE__ */ r("input", {
|
|
1143
1148
|
id: l,
|
|
1144
1149
|
name: l,
|
|
1145
|
-
className:
|
|
1150
|
+
className: pt.input,
|
|
1146
1151
|
value: u.value,
|
|
1147
1152
|
disabled: s,
|
|
1148
1153
|
autocomplete: "off",
|
|
@@ -1150,7 +1155,7 @@ function dt({ placeholder: e, value: t, width: o, isDisabled: s, onChange: c })
|
|
|
1150
1155
|
})]
|
|
1151
1156
|
}) });
|
|
1152
1157
|
}
|
|
1153
|
-
var
|
|
1158
|
+
var pt = {
|
|
1154
1159
|
base: Y`
|
|
1155
1160
|
position: relative;
|
|
1156
1161
|
`,
|
|
@@ -1179,8 +1184,8 @@ var ft = {
|
|
|
1179
1184
|
color: ${X.colors.fore.primary};
|
|
1180
1185
|
background-color: ${X.colors.back.secondary};
|
|
1181
1186
|
`
|
|
1182
|
-
},
|
|
1183
|
-
function
|
|
1187
|
+
}, mt = 28, ht = 3, gt = 11;
|
|
1188
|
+
function _t({ label: e, isChecked: t, isDisabled: s, onChange: c }) {
|
|
1184
1189
|
let l = a(Date.now()), u = a(t);
|
|
1185
1190
|
o(() => u.value = t, [t]);
|
|
1186
1191
|
function d() {
|
|
@@ -1188,10 +1193,10 @@ function gt({ label: e, isChecked: t, isDisabled: s, onChange: c }) {
|
|
|
1188
1193
|
u.value = e, c?.(e);
|
|
1189
1194
|
}
|
|
1190
1195
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ i("div", {
|
|
1191
|
-
className:
|
|
1196
|
+
className: vt.base,
|
|
1192
1197
|
children: [
|
|
1193
1198
|
/* @__PURE__ */ r("label", {
|
|
1194
|
-
className:
|
|
1199
|
+
className: vt.label,
|
|
1195
1200
|
htmlFor: l.value,
|
|
1196
1201
|
"is-disabled": s,
|
|
1197
1202
|
children: e
|
|
@@ -1199,20 +1204,20 @@ function gt({ label: e, isChecked: t, isDisabled: s, onChange: c }) {
|
|
|
1199
1204
|
/* @__PURE__ */ r("input", {
|
|
1200
1205
|
id: l.value,
|
|
1201
1206
|
type: "checkbox",
|
|
1202
|
-
className:
|
|
1207
|
+
className: vt.checkbox,
|
|
1203
1208
|
checked: u.value,
|
|
1204
1209
|
disabled: s,
|
|
1205
1210
|
onChange: d
|
|
1206
1211
|
}),
|
|
1207
1212
|
/* @__PURE__ */ r("label", {
|
|
1208
|
-
className:
|
|
1213
|
+
className: vt.value,
|
|
1209
1214
|
htmlFor: l.value,
|
|
1210
1215
|
"is-disabled": s
|
|
1211
1216
|
})
|
|
1212
1217
|
]
|
|
1213
1218
|
}) });
|
|
1214
1219
|
}
|
|
1215
|
-
var
|
|
1220
|
+
var vt = {
|
|
1216
1221
|
base: Y`
|
|
1217
1222
|
position: relative;
|
|
1218
1223
|
display: flex;
|
|
@@ -1236,7 +1241,7 @@ var _t = {
|
|
|
1236
1241
|
background-color: #e1e1e1;
|
|
1237
1242
|
|
|
1238
1243
|
&:before {
|
|
1239
|
-
right: ${
|
|
1244
|
+
right: ${ht}px;
|
|
1240
1245
|
background-color: #3a3a3a;
|
|
1241
1246
|
}
|
|
1242
1247
|
}
|
|
@@ -1250,7 +1255,7 @@ var _t = {
|
|
|
1250
1255
|
cursor: pointer;
|
|
1251
1256
|
user-select: none;
|
|
1252
1257
|
transition: background .3s ease;
|
|
1253
|
-
width: ${
|
|
1258
|
+
width: ${mt}px;
|
|
1254
1259
|
|
|
1255
1260
|
&:before {
|
|
1256
1261
|
background-color: #e1e1e1;
|
|
@@ -1259,18 +1264,18 @@ var _t = {
|
|
|
1259
1264
|
position: absolute;
|
|
1260
1265
|
transition: background .3s ease, right .3s ease;
|
|
1261
1266
|
border-radius: 50%;
|
|
1262
|
-
top: ${
|
|
1267
|
+
top: ${ht}px;
|
|
1263
1268
|
right: ${14}px;
|
|
1264
|
-
width: ${
|
|
1265
|
-
height: ${
|
|
1269
|
+
width: ${gt}px;
|
|
1270
|
+
height: ${gt}px;
|
|
1266
1271
|
}
|
|
1267
1272
|
`
|
|
1268
1273
|
};
|
|
1269
1274
|
//#endregion
|
|
1270
1275
|
//#region src/components/_tag.jsx
|
|
1271
|
-
function
|
|
1276
|
+
function yt({ className: t, variant: a = "normal", iconName: o, label: s }) {
|
|
1272
1277
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ i("div", {
|
|
1273
|
-
className: J(
|
|
1278
|
+
className: J(bt.base, bt[a] ?? bt.normal, t),
|
|
1274
1279
|
"has-icon": !e(o),
|
|
1275
1280
|
children: [o && /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(Q, {
|
|
1276
1281
|
className: Y`
|
|
@@ -1282,7 +1287,7 @@ function vt({ className: t, variant: a = "normal", iconName: o, label: s }) {
|
|
|
1282
1287
|
}) }), s]
|
|
1283
1288
|
}) });
|
|
1284
1289
|
}
|
|
1285
|
-
var
|
|
1290
|
+
var bt = { base: Y`
|
|
1286
1291
|
position: relative;
|
|
1287
1292
|
display: inline-block;
|
|
1288
1293
|
padding: .3rem .5rem;
|
|
@@ -1298,12 +1303,12 @@ var yt = { base: Y`
|
|
|
1298
1303
|
` };
|
|
1299
1304
|
//#endregion
|
|
1300
1305
|
//#region src/components/_icon-button.jsx
|
|
1301
|
-
function
|
|
1306
|
+
function xt({ iconName: e, color: t, isDisabled: i, onClick: a }) {
|
|
1302
1307
|
function o(e) {
|
|
1303
1308
|
i || (e.stopPropagation(), e.preventDefault(), a?.(e));
|
|
1304
1309
|
}
|
|
1305
1310
|
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("button", {
|
|
1306
|
-
className:
|
|
1311
|
+
className: St.base,
|
|
1307
1312
|
"is-disabled": i || void 0,
|
|
1308
1313
|
"is-clickable": !!a || void 0,
|
|
1309
1314
|
disabled: i,
|
|
@@ -1316,7 +1321,7 @@ function bt({ iconName: e, color: t, isDisabled: i, onClick: a }) {
|
|
|
1316
1321
|
})
|
|
1317
1322
|
}) });
|
|
1318
1323
|
}
|
|
1319
|
-
var
|
|
1324
|
+
var St = { base: Y`
|
|
1320
1325
|
position: relative;
|
|
1321
1326
|
width: 2.25rem;
|
|
1322
1327
|
height: 2.25rem;
|
|
@@ -1325,4 +1330,4 @@ var xt = { base: Y`
|
|
|
1325
1330
|
background-color: ${X.colors.back.secondary};
|
|
1326
1331
|
` };
|
|
1327
1332
|
//#endregion
|
|
1328
|
-
export {
|
|
1333
|
+
export { $e as Bar, et as Box, rt as Button, lt as Headline, Q as Icon, xt as IconButton, at as Layout, dt as Space, _t as Switch, yt as Tag, st as Text, ft as TextField, X as Theme };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Vadim Hermann",
|
|
3
3
|
"name": "melonykit",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Preact based ui and utility functions toolkit",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@pivanov/vite-plugin-svg-sprite": "3.1.8",
|
|
34
|
-
"@playwright/test": "1.
|
|
34
|
+
"@playwright/test": "1.62.1",
|
|
35
35
|
"@preact/preset-vite": "2.10.6",
|
|
36
|
-
"@preact/signals": "2.
|
|
36
|
+
"@preact/signals": "2.11.0",
|
|
37
37
|
"@types/node": "26.1.2",
|
|
38
38
|
"preact": "10.29.8",
|
|
39
39
|
"vite": "8.2.0"
|
package/dist/assets/icons.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="position:absolute;width:0;height:0;" id="svg-sprite"><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" color="currentColor" id="icon-check" viewBox="0 0 24 24"><path d="m5 13.26 2.586 2.697C8.252 16.652 8.586 17 9 17s.748-.348 1.414-1.043L19 7"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" color="currentColor" id="icon-exclamation-triangle" viewBox="0 0 24 24"><path d="M13.925 21h-3.85c-4.63 0-6.945 0-7.799-1.506-.853-1.506.331-3.503 2.7-7.495L6.9 8.753C9.176 4.918 10.313 3 12 3s2.824 1.918 5.1 5.753L19.023 12c2.369 3.992 3.553 5.989 2.7 7.495C20.87 21 18.555 21 13.924 21"/><path d="M12 9v4"/><path d="M12.125 16.75H12m.25 0a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" color="currentColor" id="icon-plus" viewBox="0 0 24 24"><path d="M11.992 4v16m8-8h-16"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" color="currentColor" id="icon-x" viewBox="0 0 24 24"><path d="m18 6-6 6m0 0-6 6m6-6 6 6m-6-6L6 6"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" color="currentColor" id="icon-trash" viewBox="0 0 24 24"><path d="m19.5 5.5-.62 10.025c-.158 2.561-.237 3.842-.88 4.763a4 4 0 0 1-1.2 1.128c-.957.584-2.24.584-4.806.584-2.57 0-3.855 0-4.814-.585a4 4 0 0 1-1.2-1.13c-.642-.922-.72-2.205-.874-4.77L4.5 5.5"/><path d="M3 5.5h18m-4.944 0-.683-1.408c-.453-.936-.68-1.403-1.071-1.695a2 2 0 0 0-.275-.172C13.594 2 13.074 2 12.035 2c-1.066 0-1.599 0-2.04.234a2 2 0 0 0-.278.18c-.395.303-.616.788-1.058 1.757L8.053 5.5"/><path d="M9.5 16.5v-6"/><path d="M14.5 16.5v-6"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="1.5" color="currentColor" id="icon-play" viewBox="0 0 24 24"><path d="M18.89 12.846c-.353 1.343-2.023 2.292-5.364 4.19-3.23 1.835-4.845 2.752-6.146 2.384a3.25 3.25 0 0 1-1.424-.841C5 17.614 5 15.743 5 12s0-5.614.956-6.579a3.25 3.25 0 0 1 1.424-.84c1.301-.37 2.916.548 6.146 2.383 3.34 1.898 5.011 2.847 5.365 4.19a3.3 3.3 0 0 1 0 1.692Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" color="currentColor" id="icon-eye" viewBox="0 0 24 24"><path d="M21.544 11.045c.304.426.456.64.456.955 0 .316-.152.529-.456.955C20.178 14.871 16.689 19 12 19c-4.69 0-8.178-4.13-9.544-6.045C2.152 12.529 2 12.315 2 12c0-.316.152-.529.456-.955C3.822 9.129 7.311 5 12 5c4.69 0 8.178 4.13 9.544 6.045Z"/><path d="M15 12a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" color="currentColor" id="icon-hourglass" viewBox="0 0 24 24"><path d="M17.201 2H6.8c-1.458 0-2.737.985-2.795 2.404-.074 1.785 1.182 2.97 2.5 4.083 1.825 1.54 2.737 2.31 2.832 3.284q.023.229 0 .458c-.095.975-1.007 1.744-2.832 3.284-1.355 1.143-2.578 2.207-2.5 4.083C4.062 21.016 5.34 22 6.799 22H17.2c1.458 0 2.737-.985 2.796-2.404.046-1.13-.373-2.254-1.262-3.036-.405-.357-.826-.698-1.24-1.047-1.824-1.54-2.736-2.31-2.831-3.284a2.3 2.3 0 0 1 0-.458c.095-.975 1.008-1.744 2.832-3.284 1.34-1.131 2.577-2.229 2.5-4.083C19.939 2.984 18.66 2 17.202 2Z"/><path stroke-linecap="round" d="M9 21.638c0-.442 0-.663.088-.856a1 1 0 0 1 .046-.09c.107-.183.288-.312.65-.571 1.006-.719 1.51-1.078 2.081-1.116q.135-.009.27 0c.572.038 1.075.397 2.08 1.116.363.259.544.388.651.571q.026.045.046.09c.088.193.088.414.088.856V22H9z"/></symbol></svg>
|