highsoft-ui 1.0.126 → 1.0.127
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/{Button-CJp__tle.js → Button-FtTHXgq3.js} +1 -1
- package/dist/{ButtonGroup-CfNp_xXf.js → ButtonGroup-eZng2GQy.js} +1 -1
- package/dist/Checkbox-CMWwWnbI.js +153 -0
- package/dist/{CookiePolicyModal-BN_AXefZ.js → CookiePolicyModal-_zwtaOvm.js} +3 -3
- package/dist/{CopyCode-BLXf0o74.js → CopyCode-C7iHMVIg.js} +2 -2
- package/dist/Dropdown-B6J7ph3w.js +817 -0
- package/dist/{Footer-BsddrH6J.js → Footer-Q3Z-Synu.js} +8 -8
- package/dist/{FooterBottom-ybvI6wyw.js → FooterBottom-Dbr8oMdf.js} +1 -1
- package/dist/{FooterHelp-D88w95D4.js → FooterHelp-BsApOrYf.js} +1 -1
- package/dist/{FooterLinks-B8QP6uKP.js → FooterLinks-Dx7GBu-X.js} +2 -2
- package/dist/{Header-B8todalU.js → Header-DxauB1pI.js} +41 -41
- package/dist/{InputGrouped-jbMns5qa.js → InputGrouped-B9jyncxb.js} +13 -13
- package/dist/{Label-bbLlUYRM.js → Label-BHGkcLu9.js} +1 -1
- package/dist/{NewsletterSignup-DEgL93rH.js → NewsletterSignup-jPKQLKvl.js} +4 -4
- package/dist/{Notification-CuVjbJzV.js → Notification-CO-mX_7b.js} +3 -3
- package/dist/PrefPanel-D-xcKbcr.js +253 -0
- package/dist/{Search-BcX6xtAY.js → Search-DokUD0o9.js} +972 -1171
- package/dist/{YoutubeModal-C58qsc27.js → YoutubeModal-T25hkIhQ.js} +3 -3
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/Dropdown/index.js +2 -0
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/GPTInput/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +37 -0
- package/dist/components/Modal/index.js +94 -0
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/RadioBox/index.js +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/{dist-O77K9Ele.js → dist-9h8Pur86.js} +62 -62
- package/dist/dist-BMBUb7XY.js +208 -0
- package/dist/dist-MBZ50zVE.js +1303 -0
- package/dist/{dist-D4rcQ6qo.js → dist-SfVqm611.js} +1 -1
- package/dist/{es2015-BE1Gei7w.js → es2015-CJyFgdNb.js} +1 -1
- package/dist/{esm-T3Xn_ZHF.js → esm-vjQoQCu2.js} +46 -18
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/Checkbox/index.d.ts +54 -0
- package/dist/lib/components/Dropdown/index.d.ts +67 -0
- package/dist/lib/components/Modal/ModalContactFooter.d.ts +21 -0
- package/dist/lib/components/Modal/index.d.ts +41 -0
- package/dist/lib/main.d.ts +8 -0
- package/dist/main.js +19 -15
- package/dist/scss/variables.scss +84 -0
- package/dist/styles.module-BZplfYRW.js +17 -0
- package/package.json +1 -1
- package/dist/PrefPanel-CPWoS-hm.js +0 -1548
- /package/dist/{GPTInput-CZF0-SfI.js → GPTInput-Cgu6_F53.js} +0 -0
- /package/dist/{RadioBox-C_KZn7fw.js → RadioBox-B9rLrNTK.js} +0 -0
- /package/dist/{Tabs-CNkFaolf.js → Tabs-DanjfIHP.js} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { t as e } from "./clsx-D7D_XZ_-.js";
|
|
2
|
+
import { x as t } from "./esm-vjQoQCu2.js";
|
|
3
|
+
import { createContext as n, useCallback as r, useContext as i, useEffect as a, useId as o, useRef as s, useState as c } from "react";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
var d = {
|
|
6
|
+
alignLeft: "icr6Fq_alignLeft",
|
|
7
|
+
box: "icr6Fq_box",
|
|
8
|
+
checkbox: "icr6Fq_checkbox",
|
|
9
|
+
content: "icr6Fq_content",
|
|
10
|
+
disabled: "icr6Fq_disabled",
|
|
11
|
+
glyph: "icr6Fq_glyph",
|
|
12
|
+
"hsui-checkbox-shake": "icr6Fq_hsui-checkbox-shake",
|
|
13
|
+
iconVariant: "icr6Fq_iconVariant",
|
|
14
|
+
indeterminate: "icr6Fq_indeterminate",
|
|
15
|
+
input: "icr6Fq_input",
|
|
16
|
+
lockGlyph: "icr6Fq_lockGlyph",
|
|
17
|
+
selected: "icr6Fq_selected",
|
|
18
|
+
shake: "icr6Fq_shake"
|
|
19
|
+
}, f = n(null);
|
|
20
|
+
function p({ name: e, value: t, defaultValue: n, onChange: i, align: a = "right", children: o, className: s, style: u }) {
|
|
21
|
+
let [d, p] = c(n ?? []), m = t !== void 0, h = m ? t : d, g = r((e) => {
|
|
22
|
+
let t = h.includes(e) ? h.filter((t) => t !== e) : [...h, e];
|
|
23
|
+
m || p(t), i?.(t);
|
|
24
|
+
}, [
|
|
25
|
+
m,
|
|
26
|
+
i,
|
|
27
|
+
h
|
|
28
|
+
]);
|
|
29
|
+
return /* @__PURE__ */ l(f.Provider, {
|
|
30
|
+
value: {
|
|
31
|
+
name: e,
|
|
32
|
+
value: h,
|
|
33
|
+
onToggle: g,
|
|
34
|
+
align: a
|
|
35
|
+
},
|
|
36
|
+
children: /* @__PURE__ */ l("div", {
|
|
37
|
+
role: "group",
|
|
38
|
+
className: s,
|
|
39
|
+
style: u,
|
|
40
|
+
children: o
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function m({ value: n, children: p, disabled: m = !1, checked: h, defaultChecked: g, indeterminate: _ = !1, onChange: v, name: y, variant: b = "default", align: x, iconLeft: S, className: C, style: w }) {
|
|
45
|
+
let T = i(f), E = o(), D = s(null), O = s(null), [k, A] = c(g ?? !1), j = T !== null, M = h !== void 0, N = j ? T.name : y, P = x ?? T?.align ?? "right", F = j ? n !== void 0 && T.value.includes(n) : M ? h : k, I = _ && !F, L = m && (F || I), R = r(() => {
|
|
46
|
+
let e = O.current;
|
|
47
|
+
e && (e.classList.remove(d.shake), e.offsetWidth, e.classList.add(d.shake));
|
|
48
|
+
}, []);
|
|
49
|
+
a(() => {
|
|
50
|
+
let e = O.current;
|
|
51
|
+
if (!e) return;
|
|
52
|
+
let t = () => e.classList.remove(d.shake);
|
|
53
|
+
return e.addEventListener("animationend", t), () => e.removeEventListener("animationend", t);
|
|
54
|
+
}, []);
|
|
55
|
+
let z = r(() => {
|
|
56
|
+
if (!m) if (j) n !== void 0 && T.onToggle(n);
|
|
57
|
+
else {
|
|
58
|
+
let e = !(F ?? !1);
|
|
59
|
+
M || A(e), v?.(e, n);
|
|
60
|
+
}
|
|
61
|
+
}, [
|
|
62
|
+
m,
|
|
63
|
+
T,
|
|
64
|
+
F,
|
|
65
|
+
M,
|
|
66
|
+
j,
|
|
67
|
+
v,
|
|
68
|
+
n
|
|
69
|
+
]), B = r(() => {
|
|
70
|
+
L && R();
|
|
71
|
+
}, [L, R]), V = r((e) => {
|
|
72
|
+
(e.key === " " || e.key === "Enter") && (e.preventDefault(), L ? R() : z());
|
|
73
|
+
}, [
|
|
74
|
+
z,
|
|
75
|
+
L,
|
|
76
|
+
R
|
|
77
|
+
]);
|
|
78
|
+
a(() => {
|
|
79
|
+
D.current && (D.current.indeterminate = _ && !F);
|
|
80
|
+
}, [_, F]);
|
|
81
|
+
let H = { checked: F ?? !1 };
|
|
82
|
+
return /* @__PURE__ */ u("label", {
|
|
83
|
+
ref: O,
|
|
84
|
+
tabIndex: m ? -1 : 0,
|
|
85
|
+
onKeyDown: V,
|
|
86
|
+
onClick: B,
|
|
87
|
+
className: e("hsui-checkbox", d.checkbox, {
|
|
88
|
+
[d.selected]: F,
|
|
89
|
+
[d.indeterminate]: I,
|
|
90
|
+
[d.disabled]: m,
|
|
91
|
+
[d.iconVariant]: b === "icon",
|
|
92
|
+
[d.alignLeft]: b !== "icon" && P === "left"
|
|
93
|
+
}, C),
|
|
94
|
+
style: w,
|
|
95
|
+
children: [
|
|
96
|
+
S,
|
|
97
|
+
p !== void 0 && /* @__PURE__ */ l("div", {
|
|
98
|
+
className: d.content,
|
|
99
|
+
children: p
|
|
100
|
+
}),
|
|
101
|
+
b === "default" && /* @__PURE__ */ u("span", {
|
|
102
|
+
className: d.box,
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
children: [m && (F || I) && /* @__PURE__ */ l(t, {
|
|
105
|
+
className: d.lockGlyph,
|
|
106
|
+
width: 10,
|
|
107
|
+
height: 10
|
|
108
|
+
}), I ? /* @__PURE__ */ l("svg", {
|
|
109
|
+
className: d.glyph,
|
|
110
|
+
width: "10",
|
|
111
|
+
height: "10",
|
|
112
|
+
viewBox: "0 0 10 10",
|
|
113
|
+
fill: "none",
|
|
114
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
115
|
+
children: /* @__PURE__ */ l("path", {
|
|
116
|
+
d: "M1.5 5h7",
|
|
117
|
+
stroke: "currentColor",
|
|
118
|
+
strokeWidth: "2",
|
|
119
|
+
strokeLinecap: "round"
|
|
120
|
+
})
|
|
121
|
+
}) : /* @__PURE__ */ l("svg", {
|
|
122
|
+
className: d.glyph,
|
|
123
|
+
width: "12",
|
|
124
|
+
height: "12",
|
|
125
|
+
viewBox: "0 0 12 12",
|
|
126
|
+
fill: "none",
|
|
127
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
128
|
+
children: /* @__PURE__ */ l("path", {
|
|
129
|
+
d: "M2.5 6.2 4.8 8.5 9.5 3.5",
|
|
130
|
+
stroke: "currentColor",
|
|
131
|
+
strokeWidth: "2",
|
|
132
|
+
strokeLinecap: "round",
|
|
133
|
+
strokeLinejoin: "round"
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ l("input", {
|
|
138
|
+
ref: D,
|
|
139
|
+
type: "checkbox",
|
|
140
|
+
id: E,
|
|
141
|
+
tabIndex: -1,
|
|
142
|
+
className: d.input,
|
|
143
|
+
name: N,
|
|
144
|
+
value: n,
|
|
145
|
+
disabled: m,
|
|
146
|
+
onChange: z,
|
|
147
|
+
...H
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { p as n, m as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./esm-
|
|
2
|
-
import { t } from "./Button-
|
|
3
|
-
import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./dist-
|
|
1
|
+
import { t as e } from "./esm-vjQoQCu2.js";
|
|
2
|
+
import { t } from "./Button-FtTHXgq3.js";
|
|
3
|
+
import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./dist-9h8Pur86.js";
|
|
4
4
|
import { useEffect as l, useRef as u, useState as d } from "react";
|
|
5
5
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
6
|
var m = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as e, s as t } from "./utils-BCI5dixg.js";
|
|
2
2
|
import { t as n } from "./clsx-D7D_XZ_-.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as a } from "./Button-
|
|
3
|
+
import { F as r, j as i } from "./esm-vjQoQCu2.js";
|
|
4
|
+
import { t as a } from "./Button-FtTHXgq3.js";
|
|
5
5
|
import { forwardRef as o, useCallback as s } from "react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
var u = {
|