welcome-ui 10.0.0-alpha.10 → 10.0.0-alpha.12

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.
Files changed (37) hide show
  1. package/dist/Alert.css +1 -1
  2. package/dist/Alert.js +62 -62
  3. package/dist/Checkbox.js +12 -11
  4. package/dist/DatePicker.js +69 -68
  5. package/dist/DateTimePicker.js +10 -10
  6. package/dist/Field.css +1 -1
  7. package/dist/Field.js +48 -49
  8. package/dist/FileDrop.js +7 -1
  9. package/dist/Icon.js +212 -211
  10. package/dist/InputText.js +6 -6
  11. package/dist/Modal.js +65 -56
  12. package/dist/Search.js +1 -1
  13. package/dist/Select.js +350 -332
  14. package/dist/Slider.js +1 -1
  15. package/dist/Swiper.js +201 -191
  16. package/dist/Tabs.css +1 -1
  17. package/dist/Tabs.js +320 -319
  18. package/dist/Textarea.js +14 -13
  19. package/dist/TimePicker.js +46 -45
  20. package/dist/Toggle.js +11 -11
  21. package/dist/types/components/Icon/icons.d.ts +2 -2
  22. package/dist/types/components/Modal/Assets/AssetContent.d.ts +1 -1
  23. package/dist/types/components/Modal/Assets/index.d.ts +1 -1
  24. package/dist/types/components/Modal/components/Content.d.ts +1 -1
  25. package/dist/types/components/Modal/index.d.ts +2 -2
  26. package/dist/types/components/Modal/types.d.ts +1 -1
  27. package/dist/types/components/Select/types.d.ts +1 -0
  28. package/dist/types/components/Tabs/Tab.d.ts +2 -0
  29. package/dist/types/components/Tabs/{components/TabPanel/index.d.ts → TabPanel.d.ts} +1 -1
  30. package/dist/types/components/Tabs/index.d.ts +6 -5
  31. package/dist/types/components/Tabs/types.d.ts +6 -12
  32. package/dist/types/components/Tabs/utils.d.ts +4 -7
  33. package/package.json +1 -1
  34. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +0 -5
  35. package/dist/types/components/Tabs/components/TabList/index.d.ts +0 -3
  36. package/dist/use-viewport-CgrficYB.js +0 -17
  37. package/dist/useForkRef-D807AV7D.js +0 -22
package/dist/InputText.js CHANGED
@@ -27,11 +27,11 @@ const D = "_root_13hsf_8", F = "_transparent_13hsf_68", L = "_clearable_13hsf_88
27
27
  "icon-placement-right-md": "_icon-placement-right-md_13hsf_124"
28
28
  }, a = B(C), O = { lg: "md", md: "md", sm: "sm" }, V = T(
29
29
  ({
30
- children: c,
30
+ children: p,
31
31
  className: v,
32
32
  icon: t,
33
33
  iconPlacement: s = "left",
34
- isClearable: p,
34
+ isClearable: c,
35
35
  name: _,
36
36
  onChange: r,
37
37
  size: m = "lg",
@@ -41,13 +41,13 @@ const D = "_root_13hsf_8", F = "_transparent_13hsf_68", L = "_clearable_13hsf_88
41
41
  variant: z,
42
42
  ...I
43
43
  }, b) => {
44
- const { getInputProps: N, variant: $ } = y(), d = $ || z, i = t && s, h = i && s === "right", R = i && s === "left", n = O[m], l = N(I), o = !!c, S = p || h || o, E = () => {
44
+ const { getInputProps: N, variant: $ } = y(), d = $ || z, i = t && s, h = i && s === "right", R = i && s === "left", n = O[m], l = N(I), o = !!p, S = c || h || o, E = () => {
45
45
  r && r({
46
46
  preventDefault: () => null,
47
47
  target: { name: _, value: "" }
48
48
  });
49
49
  };
50
- return /* @__PURE__ */ u("div", { className: a("input-text-wrapper"), children: [
50
+ return /* @__PURE__ */ u("div", { className: a("input-text-wrapper", "field-input"), children: [
51
51
  /* @__PURE__ */ e(
52
52
  "input",
53
53
  {
@@ -87,9 +87,9 @@ const D = "_root_13hsf_8", F = "_transparent_13hsf_68", L = "_clearable_13hsf_88
87
87
  l.disabled && "disabled"
88
88
  ),
89
89
  children: [
90
- p && f ? /* @__PURE__ */ e(j, { onClick: E, size: "sm" }) : null,
90
+ c && f ? /* @__PURE__ */ e(j, { onClick: E, size: "sm" }) : null,
91
91
  h && !o ? /* @__PURE__ */ e(g, { ...t.props, name: t.props.name, size: n }) : null,
92
- o ? c : null
92
+ o ? p : null
93
93
  ]
94
94
  }
95
95
  ) : null
package/dist/Modal.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import './Modal.css';
3
- import { jsx as s, jsxs as _ } from "react/jsx-runtime";
3
+ import { jsx as o, jsxs as _ } from "react/jsx-runtime";
4
4
  import { b as R } from "./RTNCFSKZ-BywELldk.js";
5
5
  import { D as V, u as q } from "./NI3IVY7K-Dy240mkD.js";
6
- import { forwardRef as l, isValidElement as G, cloneElement as J, useState as K, useEffect as L } from "react";
6
+ import { forwardRef as i, isValidElement as G, cloneElement as J, useState as K, useEffect as L } from "react";
7
7
  import { c as r } from "./index-PAaZGbyz.js";
8
8
  import { f as j } from "./forwardRefWithAs-8eP3ZN15.js";
9
9
  import { D as y } from "./DSAASPLT-Fx1kuAsk.js";
@@ -12,7 +12,7 @@ import { Button as Q } from "./Button.js";
12
12
  import { Text as m } from "./Text.js";
13
13
  import { CloseButton as U } from "./CloseButton.js";
14
14
  import { D as X } from "./ZTXFEM5L-WGHY_jqg.js";
15
- const Y = "_root_1ruus_3", Z = "_hideOnInteractOutside_1ruus_19", ee = "_dialog_1ruus_117", i = {
15
+ const Y = "_root_1ruus_3", Z = "_hideOnInteractOutside_1ruus_19", ee = "_dialog_1ruus_117", c = {
16
16
  root: Y,
17
17
  "asset-backdrop": "_asset-backdrop_1ruus_8",
18
18
  hideOnInteractOutside: Z,
@@ -23,49 +23,50 @@ const Y = "_root_1ruus_3", Z = "_hideOnInteractOutside_1ruus_19", ee = "_dialog_
23
23
  "asset-content": "_asset-content_1ruus_96",
24
24
  dialog: ee,
25
25
  "close-button": "_close-button_1ruus_159"
26
- }, te = r(i), x = ({ children: e, ...t }) => /* @__PURE__ */ s(Q, { className: te("close-button"), variant: "primary-neutral", ...t, children: e });
26
+ }, te = r(c), x = ({ children: e, ...t }) => /* @__PURE__ */ o(Q, { className: te("close-button"), variant: "primary-neutral", ...t, children: e });
27
27
  x.displayName = "AssetModal.Close";
28
- const se = r(i), M = l(
29
- ({ hideOnInteractOutside: e, ...t }, o) => /* @__PURE__ */ s(
28
+ const se = r(c), M = i(
29
+ ({ hideOnInteractOutside: e, ...t }, s) => /* @__PURE__ */ o(
30
30
  "div",
31
31
  {
32
32
  className: se("asset-backdrop", e && "hideOnInteractOutside"),
33
33
  ...t,
34
- ref: o,
35
- children: /* @__PURE__ */ s(
34
+ ref: s,
35
+ children: /* @__PURE__ */ o(
36
36
  y,
37
37
  {
38
- render: /* @__PURE__ */ s(x, { children: /* @__PURE__ */ s(P, { name: "times" }) })
38
+ render: /* @__PURE__ */ o(x, { children: /* @__PURE__ */ o(P, { name: "times" }) })
39
39
  }
40
40
  )
41
41
  }
42
42
  )
43
43
  );
44
44
  M.displayName = "AssetModal.Backdrop";
45
- const oe = r(i), $ = ({
45
+ const oe = r(c), $ = ({
46
46
  children: e,
47
- ...t
48
- }) => /* @__PURE__ */ s("div", { className: oe("root", "asset-content"), ...t, children: e });
47
+ className: t,
48
+ ...s
49
+ }) => /* @__PURE__ */ o("div", { className: oe("root", "asset-content", t), ...s, children: e });
49
50
  $.displayName = "AssetModal.Content";
50
- const ae = r(i), f = ({ children: e, ...t }) => /* @__PURE__ */ s(m, { as: "p", className: ae("asset-title"), lines: 2, variant: "heading-md-strong", ...t, children: e });
51
+ const ae = r(c), f = ({ children: e, ...t }) => /* @__PURE__ */ o(m, { as: "p", className: ae("asset-title"), lines: 2, variant: "heading-md-strong", ...t, children: e });
51
52
  f.displayName = "AssetModal.Title";
52
- const g = r(i), v = l(
53
- ({ children: e, customContent: t, subtitle: o, title: a, ...d }, n) => /* @__PURE__ */ _("div", { className: g("root", "asset-wrapper"), ref: n, ...d, children: [
53
+ const g = r(c), v = i(
54
+ ({ children: e, customContent: t, subtitle: s, title: a, ...n }, l) => /* @__PURE__ */ _("div", { className: g("root", "asset-wrapper"), ref: l, ...n, children: [
54
55
  e,
55
56
  /* @__PURE__ */ _("div", { className: g("root", "asset-title-wrapper"), children: [
56
57
  t,
57
- !t && o ? /* @__PURE__ */ s(m, { variant: "label-md", children: o }) : null,
58
- !t && a ? /* @__PURE__ */ s(f, { children: a }) : null
58
+ !t && s ? /* @__PURE__ */ o(m, { variant: "label-md", children: s }) : null,
59
+ !t && a ? /* @__PURE__ */ o(f, { children: a }) : null
59
60
  ] })
60
61
  ] })
61
62
  );
62
63
  v.displayName = "AssetModal.AssetWithTitle";
63
- const re = r(i), w = ({
64
+ const re = r(c), w = ({
64
65
  children: e,
65
66
  ...t
66
- }) => /* @__PURE__ */ s("div", { className: re("root", "dialog"), ...t, children: e });
67
+ }) => /* @__PURE__ */ o("div", { className: re("root", "dialog"), ...t, children: e });
67
68
  w.displayName = "AssetModal";
68
- const ne = r(i), O = ({ children: e }) => /* @__PURE__ */ s("div", { className: ne("root", "iframe-wrapper"), children: e });
69
+ const ne = r(c), O = ({ children: e }) => /* @__PURE__ */ o("div", { className: ne("root", "iframe-wrapper"), children: e });
69
70
  O.displayName = "AssetModal.Iframe";
70
71
  const le = Object.assign(w, {
71
72
  AssetWithTitle: v,
@@ -73,7 +74,7 @@ const le = Object.assign(w, {
73
74
  Content: $,
74
75
  Iframe: O,
75
76
  Title: f
76
- }), ie = "_root_a4zjh_4", ce = "_body_a4zjh_48", de = "_footer_a4zjh_48", _e = "_header_a4zjh_48", me = "_scrollable_a4zjh_60", ue = "_content_a4zjh_66", pe = "_close_a4zjh_66", he = "_backdrop_a4zjh_85", fe = "_hideOnInteractOutside_a4zjh_96", Ne = "_icon_a4zjh_127", c = {
77
+ }), ie = "_root_a4zjh_4", ce = "_body_a4zjh_48", de = "_footer_a4zjh_48", _e = "_header_a4zjh_48", me = "_scrollable_a4zjh_60", ue = "_content_a4zjh_66", pe = "_close_a4zjh_66", he = "_backdrop_a4zjh_85", fe = "_hideOnInteractOutside_a4zjh_96", Ne = "_icon_a4zjh_127", d = {
77
78
  root: ie,
78
79
  body: ce,
79
80
  footer: de,
@@ -95,57 +96,65 @@ const le = Object.assign(w, {
95
96
  "footer-information": "_footer-information_a4zjh_163",
96
97
  "footer-information-title": "_footer-information-title_a4zjh_170",
97
98
  "footer-information-subtitle": "_footer-information-subtitle_a4zjh_174"
98
- }, be = r(c), A = l(
99
- ({ backdrop: e, hideOnInteractOutside: t, ...o }, a) => e === !0 ? /* @__PURE__ */ s(
99
+ }, be = r(d), A = i(
100
+ ({ backdrop: e, hideOnInteractOutside: t, ...s }, a) => e === !0 ? /* @__PURE__ */ o(
100
101
  "div",
101
102
  {
102
103
  className: be("backdrop", t && "hideOnInteractOutside"),
103
104
  ref: a,
104
- ...o
105
+ ...s
105
106
  }
106
- ) : G(e) ? J(e, { ref: a, ...o }) : null
107
+ ) : G(e) ? J(e, { ref: a, ...s }) : null
107
108
  );
108
109
  A.displayName = "Modal.Backdrop";
109
- const ze = r(c), k = l((e, t) => /* @__PURE__ */ s("section", { className: ze("body"), ref: t, ...e }));
110
+ const ze = r(d), k = i(({ className: e, ...t }, s) => /* @__PURE__ */ o("section", { className: ze("body", e), ref: s, ...t }));
110
111
  k.displayName = "Modal.Body";
111
- const ge = r(c), N = (e) => /* @__PURE__ */ s(y, { render: /* @__PURE__ */ s(U, { className: ge("close"), ...e }) });
112
+ const ge = r(d), N = (e) => /* @__PURE__ */ o(y, { render: /* @__PURE__ */ o(U, { className: ge("close"), ...e }) });
112
113
  N.displayName = "Modal.Close";
113
- const je = r(c), B = l(
114
- ({ children: e, withClosingButton: t = !0, ...o }, a) => /* @__PURE__ */ _("div", { className: je("content", t && "with-close-button"), ref: a, ...o, children: [
115
- /* @__PURE__ */ s(N, {}),
116
- e
117
- ] })
114
+ const je = r(d), B = i(
115
+ ({ children: e, className: t, withClosingButton: s = !0, ...a }, n) => /* @__PURE__ */ _(
116
+ "div",
117
+ {
118
+ className: (je("content", s && "with-close-button"), t),
119
+ ref: n,
120
+ ...a,
121
+ children: [
122
+ /* @__PURE__ */ o(N, {}),
123
+ e
124
+ ]
125
+ }
126
+ )
118
127
  );
119
128
  B.displayName = "Modal.Content";
120
- const u = r(c), C = l(
121
- ({ children: e, information: t, ...o }, a) => /* @__PURE__ */ _("footer", { className: u("footer"), ref: a, ...o, children: [
122
- e ? /* @__PURE__ */ s("div", { className: u("footer-children-wrapper"), children: e }) : null,
123
- t ? /* @__PURE__ */ _("div", { className: u("footer-information"), children: [
124
- /* @__PURE__ */ s(m, { className: u("footer-information-title"), variant: "label-md", children: t.title }),
125
- /* @__PURE__ */ s(m, { className: u("footer-information-subtitle"), variant: "body-md", children: t.subtitle })
129
+ const u = r(d), C = i(
130
+ ({ children: e, className: t, information: s, ...a }, n) => /* @__PURE__ */ _("footer", { className: u("footer", t), ref: n, ...a, children: [
131
+ e ? /* @__PURE__ */ o("div", { className: u("footer-children-wrapper"), children: e }) : null,
132
+ s ? /* @__PURE__ */ _("div", { className: u("footer-information"), children: [
133
+ /* @__PURE__ */ o(m, { className: u("footer-information-title"), variant: "label-md", children: s.title }),
134
+ /* @__PURE__ */ o(m, { className: u("footer-information-subtitle"), variant: "body-md", children: s.subtitle })
126
135
  ] }) : null
127
136
  ] })
128
137
  );
129
138
  C.displayName = "Modal.Footer";
130
- const h = r(c), D = l(
131
- ({ icon: e, subtitle: t, title: o, ...a }, d) => /* @__PURE__ */ _("header", { className: h("header", e && "icon"), ref: d, ...a, children: [
132
- /* @__PURE__ */ s(N, {}),
133
- e,
134
- /* @__PURE__ */ s(m, { as: "h4", className: h("header-title"), variant: "heading-md-strong", children: o }),
135
- t ? /* @__PURE__ */ s(m, { className: h("header-subtitle"), children: t }) : null
139
+ const h = r(d), D = i(
140
+ ({ className: e, icon: t, subtitle: s, title: a, ...n }, l) => /* @__PURE__ */ _("header", { className: h("header", t && "icon", e), ref: l, ...n, children: [
141
+ /* @__PURE__ */ o(N, {}),
142
+ t,
143
+ /* @__PURE__ */ o(m, { as: "h4", className: h("header-title"), variant: "heading-md-strong", children: a }),
144
+ s ? /* @__PURE__ */ o(m, { className: h("header-subtitle"), children: s }) : null
136
145
  ] })
137
146
  );
138
147
  D.displayName = "Modal.Header";
139
148
  const I = j(
140
- ({ as: e, store: t, ...o }, a) => /* @__PURE__ */ s(X, { ref: a, render: e ? /* @__PURE__ */ s(e, {}) : void 0, store: t, ...o })
149
+ ({ as: e, store: t, ...s }, a) => /* @__PURE__ */ o(X, { ref: a, render: e ? /* @__PURE__ */ o(e, {}) : void 0, store: t, ...s })
141
150
  );
142
151
  I.displayName = "Modal.Trigger";
143
- const ye = r(c);
152
+ const ye = r(d);
144
153
  function Te(e) {
145
- const { onClose: t, setOpen: o, ...a } = e || {};
154
+ const { onClose: t, setOpen: s, ...a } = e || {};
146
155
  return q({
147
- setOpen: (n) => {
148
- !n && t && t(), o == null || o(n);
156
+ setOpen: (l) => {
157
+ !l && t && t(), s == null || s(l);
149
158
  },
150
159
  ...a
151
160
  });
@@ -155,10 +164,10 @@ const T = j(
155
164
  ariaLabel: e,
156
165
  /** for render property */
157
166
  as: t,
158
- backdrop: o = !0,
167
+ backdrop: s = !0,
159
168
  children: a,
160
- className: d,
161
- hideOnInteractOutside: n = !0,
169
+ className: n,
170
+ hideOnInteractOutside: l = !0,
162
171
  size: S = "lg",
163
172
  store: b,
164
173
  ...E
@@ -166,13 +175,13 @@ const T = j(
166
175
  const [W, F] = K(!1), { contentElement: p, open: z } = R(b);
167
176
  return L(() => {
168
177
  z && p && F(p.scrollHeight > p.offsetHeight);
169
- }, [p, z]), /* @__PURE__ */ s(
178
+ }, [p, z]), /* @__PURE__ */ o(
170
179
  V,
171
180
  {
172
- backdrop: /* @__PURE__ */ s(A, { backdrop: o, hideOnInteractOutside: n }),
173
- hideOnInteractOutside: n,
181
+ backdrop: /* @__PURE__ */ o(A, { backdrop: s, hideOnInteractOutside: l }),
182
+ hideOnInteractOutside: l,
174
183
  ref: H,
175
- render: t ? /* @__PURE__ */ s(t, {}) : /* @__PURE__ */ s("div", { className: ye("root", `size-${S}`, W && "scrollable", d) }),
184
+ render: t ? /* @__PURE__ */ o(t, {}) : /* @__PURE__ */ o("div", { className: ye("root", `size-${S}`, W && "scrollable", n) }),
176
185
  store: b,
177
186
  ...E,
178
187
  "aria-label": e,
package/dist/Search.js CHANGED
@@ -126,7 +126,7 @@ const qe = "_wrapper_qaadj_2", we = "_indicators_qaadj_5", Ne = "_root_qaadj_33"
126
126
  variant: b ? "focused" : f,
127
127
  ...j
128
128
  });
129
- return /* @__PURE__ */ w("div", { ...se, className: t("wrapper"), children: [
129
+ return /* @__PURE__ */ w("div", { ...se, className: t("wrapper", "field-input"), children: [
130
130
  /* @__PURE__ */ w("div", { className: t("input-wrapper"), children: [
131
131
  /* @__PURE__ */ a(
132
132
  "input",