welcome-ui 10.0.0-alpha.1 → 10.0.0-alpha.11

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 (179) hide show
  1. package/README.md +1 -1
  2. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  3. package/dist/4I4MLMKD-BO6Lcy7s.js +150 -0
  4. package/dist/Accordion.js +20 -18
  5. package/dist/Alert.css +1 -1
  6. package/dist/Alert.js +93 -87
  7. package/dist/AspectRatio.js +2 -1
  8. package/dist/Avatar.js +14 -12
  9. package/dist/{B7UTNDHN-BlIblHCu.js → B7UTNDHN-BghjolIs.js} +30 -30
  10. package/dist/Badge.js +2 -1
  11. package/dist/Breadcrumb.css +1 -1
  12. package/dist/Breadcrumb.js +175 -154
  13. package/dist/Button.css +1 -1
  14. package/dist/Button.js +43 -41
  15. package/dist/ButtonGroup.js +7 -5
  16. package/dist/Card.css +1 -1
  17. package/dist/Card.js +68 -15
  18. package/dist/Checkbox.js +32 -30
  19. package/dist/CloseButton.css +1 -1
  20. package/dist/CloseButton.js +15 -13
  21. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  22. package/dist/{DSAASPLT-BaaCUKsb.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  23. package/dist/DatePicker.js +96 -91
  24. package/dist/DateTimePicker.js +21 -20
  25. package/dist/Drawer.js +141 -96
  26. package/dist/DropdownMenu.css +1 -1
  27. package/dist/DropdownMenu.js +902 -462
  28. package/dist/Field.css +1 -1
  29. package/dist/Field.js +50 -50
  30. package/dist/FieldGroup.js +9 -7
  31. package/dist/FileDrop.css +1 -1
  32. package/dist/FileDrop.js +433 -398
  33. package/dist/FileUpload.js +44 -41
  34. package/dist/GVVKDT6A-CF9ejW_c.js +619 -0
  35. package/dist/Hint.js +10 -8
  36. package/dist/Icon.css +1 -1
  37. package/dist/Icon.js +36 -22
  38. package/dist/InputText.css +1 -1
  39. package/dist/InputText.js +59 -57
  40. package/dist/{KPUWHTQJ-D2TPji47.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  41. package/dist/Label.js +9 -7
  42. package/dist/Link.css +1 -1
  43. package/dist/Link.js +54 -49
  44. package/dist/Loader.js +13 -11
  45. package/dist/Logo.js +21 -13
  46. package/dist/Modal.js +153 -113
  47. package/dist/{NI3IVY7K-Ztb3-XAv.js → NI3IVY7K-Dy240mkD.js} +53 -53
  48. package/dist/{NMGNQVTG-C6TqBngP.js → NMGNQVTG-DRO2uXZT.js} +8 -8
  49. package/dist/{OE2EFRVA-C3721cM3.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  50. package/dist/{OLVWQA7U-DysaSaZj.js → OLVWQA7U-Dia3UUnG.js} +51 -51
  51. package/dist/Pagination.css +1 -1
  52. package/dist/Pagination.js +157 -76
  53. package/dist/PasswordInput.js +20 -17
  54. package/dist/Popover.js +89 -72
  55. package/dist/{RTNCFSKZ-qpPg689E.js → RTNCFSKZ-BywELldk.js} +47 -47
  56. package/dist/Radio.css +1 -1
  57. package/dist/Radio.js +39 -40
  58. package/dist/RadioGroup.js +29 -27
  59. package/dist/RadioTab.js +3 -2
  60. package/dist/{SBSPVDDI-DJKkC1eb.js → SBSPVDDI-CmtnvvUX.js} +42 -42
  61. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  62. package/dist/Search.css +1 -1
  63. package/dist/Search.js +136 -129
  64. package/dist/Select.css +1 -1
  65. package/dist/Select.js +259 -257
  66. package/dist/Slider.js +67 -62
  67. package/dist/Stepper.js +34 -27
  68. package/dist/StickyNote.css +1 -0
  69. package/dist/StickyNote.js +49 -0
  70. package/dist/Swiper.js +53 -51
  71. package/dist/{T22PY7TE-C1N0q8Kn.js → T22PY7TE-gLuJpoOm.js} +46 -46
  72. package/dist/Table.js +34 -21
  73. package/dist/Tabs.js +165 -156
  74. package/dist/Tag.css +1 -1
  75. package/dist/Tag.js +67 -62
  76. package/dist/Text.js +5 -3
  77. package/dist/Textarea.css +1 -1
  78. package/dist/Textarea.js +26 -17
  79. package/dist/TimePicker.js +53 -51
  80. package/dist/Toast.css +1 -1
  81. package/dist/Toast.js +275 -165
  82. package/dist/Toggle.js +17 -15
  83. package/dist/Tooltip.css +1 -1
  84. package/dist/Tooltip.js +120 -129
  85. package/dist/VariantIcon.js +8 -6
  86. package/dist/VisuallyHidden.js +9 -7
  87. package/dist/WelcomeLoader.js +4 -3
  88. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  89. package/dist/{Y67KZUMI-DFEgrUv2.js → Y67KZUMI-BwLWwpNF.js} +5 -5
  90. package/dist/{ZTXFEM5L-CkrIQCN1.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  91. package/dist/{downshift.esm-D_6pHXkq.js → downshift.esm-xtYanIDi.js} +1 -1
  92. package/dist/scss/breakpoints.scss +9 -0
  93. package/dist/scss/text-ellipsis.scss +5 -0
  94. package/dist/scss/texts.scss +108 -0
  95. package/dist/theme.css +1 -1
  96. package/dist/theme.js +1 -0
  97. package/dist/{tslib.es6-DpB4Y59c.js → tslib.es6-C80jYMbM.js} +1 -1
  98. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  99. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  100. package/dist/types/components/Alert/index.d.ts +7 -3
  101. package/dist/types/components/Alert/types.d.ts +3 -9
  102. package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
  103. package/dist/types/components/Breadcrumb/index.d.ts +1 -1
  104. package/dist/types/components/Breadcrumb/types.d.ts +6 -3
  105. package/dist/types/components/Card/Body.d.ts +2 -3
  106. package/dist/types/components/Card/Footer.d.ts +6 -0
  107. package/dist/types/components/Card/Header.d.ts +5 -0
  108. package/dist/types/components/Card/index.d.ts +7 -8
  109. package/dist/types/components/Card/types.d.ts +16 -3
  110. package/dist/types/components/Checkbox/index.d.ts +1 -2
  111. package/dist/types/components/Checkbox/types.d.ts +3 -1
  112. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  113. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  114. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  115. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  116. package/dist/types/components/Drawer/AssetDrawer/types.d.ts +3 -0
  117. package/dist/types/components/Drawer/components/Backdrop.d.ts +1 -1
  118. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  119. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  120. package/dist/types/components/Drawer/index.d.ts +13 -4
  121. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  122. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  123. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  124. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  125. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  126. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  127. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  128. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  129. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  130. package/dist/types/components/FileDrop/types.d.ts +2 -0
  131. package/dist/types/components/Icon/icons.d.ts +6 -6
  132. package/dist/types/components/Icon/types.d.ts +2 -0
  133. package/dist/types/components/Loader/index.d.ts +4 -1
  134. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  135. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  136. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  137. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  138. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  139. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  140. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  141. package/dist/types/components/Modal/components/Content.d.ts +1 -1
  142. package/dist/types/components/Modal/index.d.ts +17 -5
  143. package/dist/types/components/Modal/types.d.ts +1 -1
  144. package/dist/types/components/Pagination/types.d.ts +11 -0
  145. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  146. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  147. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  148. package/dist/types/components/Radio/types.d.ts +1 -1
  149. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  150. package/dist/types/components/Stepper/index.d.ts +8 -2
  151. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  152. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  153. package/dist/types/components/StickyNote/index.d.ts +11 -0
  154. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  155. package/dist/types/components/StickyNote/types.d.ts +15 -0
  156. package/dist/types/components/Swiper/index.d.ts +4 -1
  157. package/dist/types/components/Table/index.d.ts +20 -5
  158. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  159. package/dist/types/components/Tag/types.d.ts +4 -2
  160. package/dist/types/components/Textarea/types.d.ts +1 -0
  161. package/dist/types/components/Toast/components/Growl.d.ts +2 -0
  162. package/dist/types/components/Toast/index.d.ts +8 -2
  163. package/dist/types/components/Toast/types.d.ts +8 -9
  164. package/dist/types/components/Tooltip/types.d.ts +1 -1
  165. package/dist/types/theme/types.d.ts +255 -218
  166. package/dist/types/utils/index.d.ts +0 -1
  167. package/dist/{utils-DileZjMm.js → utils-BD597oo6.js} +1 -1
  168. package/dist/utils.js +3 -2
  169. package/package.json +3 -2
  170. package/dist/2W3RN7C5-bkX-rIa3.js +0 -61
  171. package/dist/4I4MLMKD-BLxAidnq.js +0 -43
  172. package/dist/GVVKDT6A-bET6V7Py.js +0 -724
  173. package/dist/SQZLCNLX-CHDXnZ16.js +0 -82
  174. package/dist/XCKGTAUF-DkxWCbaW.js +0 -25
  175. package/dist/index.css +0 -0
  176. package/dist/types/components/Icon/Icon.d.ts +0 -2
  177. package/dist/types/utils/theme/index.d.ts +0 -0
  178. /package/dist/{index-CdiHdiVB.js → index-PAaZGbyz.js} +0 -0
  179. /package/dist/types/components/Icon/{Icon.test.d.ts → index.test.d.ts} +0 -0
@@ -1,29 +1,29 @@
1
1
  "use client";
2
- import { c as te, g as v, s as re, i as w, a as z, d as oe, e as se, C as ne } from "./SBSPVDDI-DJKkC1eb.js";
3
- import { c as ie, _ as L, i as ae, ak as ue, al as ce, M as B, am as C, o as le, af as fe, u as I, j as P, l as de, h as U, x as pe, d as me, p as ve, a as R, W as ge, an as ye, f as Ce, b as Pe, e as Ee } from "./OE2EFRVA-C3721cM3.js";
4
- import { f as Ie, r as Se } from "./B7UTNDHN-BlIblHCu.js";
5
- import { useRef as H, useEffect as V, useState as Fe, useCallback as xe, createContext as b } from "react";
6
- import { jsx as we } from "react/jsx-runtime";
7
- import { P as be, a as Ke } from "./Y67KZUMI-DFEgrUv2.js";
8
- var ke = "div";
9
- function Ae(r) {
2
+ import { c as te, g as v, s as re, i as x, a as z, d as oe, e as se, C as ne } from "./SBSPVDDI-CmtnvvUX.js";
3
+ import { c as ie, _ as L, i as ae, am as ue, an as ce, m as M, ao as C, t as le, ah as fe, u as I, j as P, p as de, h as U, k as pe, d as me, v as ve, a as R, Z as ge, ap as ye, f as Ce, b as Pe, e as Ee } from "./OE2EFRVA-Dg1R6gaC.js";
4
+ import { f as Ie, r as Se } from "./B7UTNDHN-BghjolIs.js";
5
+ import { useRef as H, useEffect as V, useState as Fe, useCallback as we, createContext as b } from "react";
6
+ import { jsx as xe } from "react/jsx-runtime";
7
+ import { P as be, b as Ke } from "./Y67KZUMI-BwLWwpNF.js";
8
+ var he = "div";
9
+ function ke(r) {
10
10
  return r.some((i) => !!i.rowId);
11
11
  }
12
- function _e(r) {
12
+ function Ae(r) {
13
13
  const i = r.target;
14
14
  return i && !U(i) ? !1 : r.key.length === 1 && !r.ctrlKey && !r.metaKey;
15
15
  }
16
- function he(r) {
16
+ function _e(r) {
17
17
  return r.key === "Shift" || r.key === "Control" || r.key === "Alt" || r.key === "Meta";
18
18
  }
19
19
  function O(r, i, l) {
20
20
  return I((e) => {
21
21
  var s;
22
- if (i == null || i(e), e.defaultPrevented || e.isPropagationStopped() || !P(e) || he(e) || _e(e)) return;
22
+ if (i == null || i(e), e.defaultPrevented || e.isPropagationStopped() || !P(e) || _e(e) || Ae(e)) return;
23
23
  const f = r.getState(), p = (s = v(r, f.activeId)) == null ? void 0 : s.element;
24
24
  if (!p) return;
25
- const n = e, { view: K } = n, x = L(n, ["view"]), c = l == null ? void 0 : l.current;
26
- p !== c && p.focus(), ye(p, e.type, x) || e.preventDefault(), e.currentTarget.contains(p) && e.stopPropagation();
25
+ const n = e, { view: K } = n, w = L(n, ["view"]), c = l == null ? void 0 : l.current;
26
+ p !== c && p.focus(), ye(p, e.type, w) || e.preventDefault(), e.currentTarget.contains(p) && e.stopPropagation();
27
27
  });
28
28
  }
29
29
  function Te(r) {
@@ -32,7 +32,7 @@ function Te(r) {
32
32
  );
33
33
  }
34
34
  function De(r) {
35
- const [i, l] = Fe(!1), e = xe(() => l(!0), []), s = r.useState(
35
+ const [i, l] = Fe(!1), e = we(() => l(!0), []), s = r.useState(
36
36
  (f) => v(r, f.activeId)
37
37
  );
38
38
  return V(() => {
@@ -40,7 +40,7 @@ function De(r) {
40
40
  i && f && (l(!1), f.focus({ preventScroll: !0 }));
41
41
  }, [s, i]), e;
42
42
  }
43
- var Me = ie(
43
+ var Be = ie(
44
44
  function(i) {
45
45
  var l = i, {
46
46
  store: e,
@@ -58,7 +58,7 @@ var Me = ie(
58
58
  e,
59
59
  process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
60
60
  );
61
- const x = H(null), c = H(null), N = De(e), S = e.useState("moves"), [, W] = ue(
61
+ const w = H(null), c = H(null), N = De(e), S = e.useState("moves"), [, q] = ue(
62
62
  s ? e.setBaseElement : null
63
63
  );
64
64
  V(() => {
@@ -66,55 +66,55 @@ var Me = ie(
66
66
  if (!e || !S || !s || !f) return;
67
67
  const { activeId: o } = e.getState(), a = (t = v(e, o)) == null ? void 0 : t.element;
68
68
  a && ce(a);
69
- }, [e, S, s, f]), B(() => {
69
+ }, [e, S, s, f]), M(() => {
70
70
  if (!e || !S || !s) return;
71
71
  const { baseElement: t, activeId: o } = e.getState();
72
72
  if (!(o === null) || !t) return;
73
73
  const u = c.current;
74
74
  c.current = null, u && C(u, { relatedTarget: t }), le(t) || t.focus();
75
75
  }, [e, S, s]);
76
- const k = e.useState("activeId"), A = e.useState("virtualFocus");
77
- B(() => {
76
+ const h = e.useState("activeId"), k = e.useState("virtualFocus");
77
+ M(() => {
78
78
  var t;
79
- if (!e || !s || !A) return;
79
+ if (!e || !s || !k) return;
80
80
  const o = c.current;
81
81
  if (c.current = null, !o) return;
82
- const u = ((t = v(e, k)) == null ? void 0 : t.element) || fe(o);
82
+ const u = ((t = v(e, h)) == null ? void 0 : t.element) || fe(o);
83
83
  u !== o && C(o, { relatedTarget: u });
84
- }, [e, k, A, s]);
85
- const q = O(
84
+ }, [e, h, k, s]);
85
+ const G = O(
86
86
  e,
87
87
  n.onKeyDownCapture,
88
88
  c
89
- ), G = O(
89
+ ), W = O(
90
90
  e,
91
91
  n.onKeyUpCapture,
92
92
  c
93
- ), _ = n.onFocusCapture, J = I((t) => {
94
- if (_ == null || _(t), t.defaultPrevented || !e) return;
93
+ ), A = n.onFocusCapture, Z = I((t) => {
94
+ if (A == null || A(t), t.defaultPrevented || !e) return;
95
95
  const { virtualFocus: o } = e.getState();
96
96
  if (!o) return;
97
97
  const a = t.relatedTarget, u = re(t.currentTarget);
98
98
  P(t) && u && (t.stopPropagation(), c.current = a);
99
- }), h = n.onFocus, Q = I((t) => {
100
- if (h == null || h(t), t.defaultPrevented || !s || !e) return;
99
+ }), _ = n.onFocus, J = I((t) => {
100
+ if (_ == null || _(t), t.defaultPrevented || !s || !e) return;
101
101
  const { relatedTarget: o } = t, { virtualFocus: a } = e.getState();
102
- a ? P(t) && !w(e, o) && queueMicrotask(N) : P(t) && e.setActiveId(null);
103
- }), T = n.onBlurCapture, X = I((t) => {
102
+ a ? P(t) && !x(e, o) && queueMicrotask(N) : P(t) && e.setActiveId(null);
103
+ }), T = n.onBlurCapture, Q = I((t) => {
104
104
  var o;
105
105
  if (T == null || T(t), t.defaultPrevented || !e) return;
106
106
  const { virtualFocus: a, activeId: u } = e.getState();
107
107
  if (!a) return;
108
- const m = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, F = w(e, g), d = c.current;
109
- c.current = null, P(t) && F ? (g === m ? d && d !== g && C(d, t) : m ? C(m, t) : d && C(d, t), t.stopPropagation()) : !w(e, t.target) && m && C(m, t);
110
- }), D = n.onKeyDown, Y = de(p), Z = I((t) => {
108
+ const m = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, F = x(e, g), d = c.current;
109
+ c.current = null, P(t) && F ? (g === m ? d && d !== g && C(d, t) : m ? C(m, t) : d && C(d, t), t.stopPropagation()) : !x(e, t.target) && m && C(m, t);
110
+ }), D = n.onKeyDown, X = de(p), Y = I((t) => {
111
111
  var o;
112
112
  if (D == null || D(t), t.nativeEvent.isComposing || t.defaultPrevented || !e || !P(t)) return;
113
113
  const { orientation: a, renderedItems: u, activeId: m } = e.getState(), g = v(e, m);
114
114
  if ((o = g == null ? void 0 : g.element) != null && o.isConnected) return;
115
- const F = a !== "horizontal", d = a !== "vertical", y = Ae(u);
115
+ const F = a !== "horizontal", d = a !== "vertical", y = ke(u);
116
116
  if ((t.key === "ArrowLeft" || t.key === "ArrowRight" || t.key === "Home" || t.key === "End") && U(t.currentTarget)) return;
117
- const M = {
117
+ const B = {
118
118
  ArrowUp: (y || F) && (() => {
119
119
  if (y) {
120
120
  const E = Te(u);
@@ -130,17 +130,17 @@ var Me = ie(
130
130
  PageUp: e.first,
131
131
  PageDown: e.last
132
132
  }[t.key];
133
- if (M) {
134
- const E = M();
133
+ if (B) {
134
+ const E = B();
135
135
  if (E !== void 0) {
136
- if (!Y(t)) return;
136
+ if (!X(t)) return;
137
137
  t.preventDefault(), e.move(E);
138
138
  }
139
139
  }
140
140
  });
141
141
  n = pe(
142
142
  n,
143
- (t) => /* @__PURE__ */ we(z, { value: e, children: t }),
143
+ (t) => /* @__PURE__ */ xe(z, { value: e, children: t }),
144
144
  [e]
145
145
  );
146
146
  const $ = e.useState((t) => {
@@ -151,13 +151,13 @@ var Me = ie(
151
151
  n = me(R({
152
152
  "aria-activedescendant": $
153
153
  }, n), {
154
- ref: ve(x, W, n.ref),
155
- onKeyDownCapture: q,
156
- onKeyUpCapture: G,
157
- onFocusCapture: J,
158
- onFocus: Q,
159
- onBlurCapture: X,
160
- onKeyDown: Z
154
+ ref: ve(w, q, n.ref),
155
+ onKeyDownCapture: G,
156
+ onKeyUpCapture: W,
157
+ onFocusCapture: Z,
158
+ onFocus: J,
159
+ onBlurCapture: Q,
160
+ onKeyDown: Y
161
161
  });
162
162
  const ee = e.useState(
163
163
  (t) => s && (t.virtualFocus || t.activeId === null)
@@ -166,8 +166,8 @@ var Me = ie(
166
166
  }
167
167
  );
168
168
  Ce(function(i) {
169
- const l = Me(i);
170
- return Pe(ke, l);
169
+ const l = Be(i);
170
+ return Pe(he, l);
171
171
  });
172
172
  b(
173
173
  void 0
@@ -175,13 +175,13 @@ b(
175
175
  var j = Ee(
176
176
  [Ke, z],
177
177
  [be, ne]
178
- ), Ne = j.useContext, We = j.useProviderContext;
178
+ ), Ne = j.useContext, qe = j.useProviderContext;
179
179
  b(
180
180
  void 0
181
181
  );
182
182
  b(!1);
183
183
  export {
184
- We as a,
184
+ qe as a,
185
185
  Ne as b,
186
- Me as u
186
+ Be as u
187
187
  };
@@ -1 +1 @@
1
- @layer components{._list_1sith_2{list-style-type:none;padding:0;margin:0;display:flex;gap:var(--components-dimensions-pagination-start-padding-inline-leading-lg);align-items:center;flex-wrap:wrap}._item_1sith_11{color:var(--color, var(--components-colors-pagination-color-icon-unchecked-pressed));background-color:var(--backgroundColor, var(--components-colors-pagination-color-background-unchecked-default));font-size:var(--components-dimensions-pagination-start-padding-inline-trailing-md);font-weight:var(--font-weight-semi-bold);height:var(--components-dimensions-pagination-size-max-height-md);width:var(--components-dimensions-pagination-size-max-height-md);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none}._item_1sith_11:not([disabled]):hover,._item_1sith_11:focus-visible{--backgroundColor: var(--color-background-neutral-subtlest)}._item_1sith_11:focus-visible{--color: var(--components-colors-pagination-color-icon-unchecked-pressed);outline:none!important}._disabled-arrow_1sith_32{cursor:not-allowed;--color: var(--color-icon-warm-tertiary);--backgroundColor: var(--color-background-warm-stronger)}._page_1sith_37[aria-current=true]{--backgroundColor: var(--components-colors-pagination-color-icon-unchecked-pressed);--color: var(--components-colors-pagination-color-background-unchecked-default)}._page_1sith_37[aria-current=true]:hover,._page_1sith_37[aria-current=true]:focus-visible{--backgroundColor: var(--components-colors-pagination-color-icon-unchecked-pressed)}._dots_1sith_44{display:flex;justify-content:center;align-items:center}}
1
+ @layer components{._list_uyk8e_3{list-style-type:none;padding:0;margin:0;display:flex;gap:var(--components-dimensions-pagination-gap-pages);align-items:center;flex-wrap:wrap}._item_uyk8e_13{color:var(--color, var(--components-colors-pagination-color-icon-unchecked-pressed));background-color:var(--backgroundColor, var(--components-colors-pagination-color-background-unchecked-default));font-size:var(--components-dimensions-pagination-start-padding-inline-trailing-md);font-weight:var(--font-weight-semi-bold);border-radius:var(--components-dimensions-pagination-border-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;border-color:var(--borderColor, var(--components-colors-pagination-color-border-unchecked-default));border-width:var(--borderWidth, var(--components-dimensions-pagination-border-width-unchecked));border-style:solid;box-shadow:var(--elevation-10)}._item_uyk8e_13:not([disabled]):not([aria-current=true]):hover,._item_uyk8e_13:not([disabled]):not([aria-current=true]):focus-visible{background-color:var(--components-colors-pagination-color-background-unchecked-hover);border-color:var(--components-colors-pagination-color-border-unchecked-hover);box-shadow:var(--elevation-20);outline:none!important}._item_uyk8e_13:not([disabled]):not([aria-current=true]):active{background-color:var(--components-colors-pagination-color-background-unchecked-pressed);border-color:var(--components-colors-pagination-color-border-unchecked-pressed)}._item_uyk8e_13._disabled-arrow_uyk8e_43,._item_uyk8e_13[disabled]{cursor:not-allowed;color:var(--components-colors-pagination-color-text-unchecked-disabled);background:repeating-linear-gradient(-45deg,var(--color-neutral-30),var(--color-neutral-30) 1.75px,var(--color-background-warm-stronger) 3.75px,var(--color-background-warm-stronger) 3.25px) padding-box;box-shadow:none;border:0}._page_uyk8e_52[aria-current=true]{background-color:var(--components-colors-pagination-color-background-checked-default);border-color:var(--components-colors-pagination-color-border-checked-default);border-width:var(--components-dimensions-pagination-border-width-checked);color:var(--components-colors-pagination-color-text-checked-default)}._page_uyk8e_52[aria-current=true]:hover,._page_uyk8e_52[aria-current=true]:focus-visible{background-color:var(--components-colors-pagination-color-background-checked-hover);border-color:var(--components-colors-pagination-color-border-checked-hover);color:var(--components-colors-pagination-color-text-checked-hover);outline:none!important}._page_uyk8e_52[aria-current=true]:active{background-color:var(--components-colors-pagination-color-background-checked-pressed);border-color:var(--components-colors-pagination-color-border-checked-pressed);color:var(--components-colors-pagination-color-text-checked-pressed)}._with-text-left_uyk8e_72,._with-text-right_uyk8e_72{gap:var(--components-dimensions-pagination-gap-content)}._size-lg_uyk8e_75{font-size:var(--font-size-md);height:var(--components-dimensions-pagination-size-max-height-lg);width:var(--components-dimensions-pagination-size-min-height-lg)}._size-lg_uyk8e_75._with-text-right_uyk8e_72{padding-left:var(--components-dimensions-pagination-start-padding-inline-leading-lg);padding-right:var(--components-dimensions-pagination-end-padding-inline-leading-lg);width:auto}._size-lg_uyk8e_75._with-text-left_uyk8e_72{padding-left:var(--components-dimensions-pagination-start-padding-inline-trailing-lg);padding-right:var(--components-dimensions-pagination-end-padding-inline-trailing-lg);width:auto}._size-md_uyk8e_90{font-size:var(--font-size-sm);height:var(--components-dimensions-pagination-size-max-height-md);width:var(--components-dimensions-pagination-size-min-height-md)}._size-md_uyk8e_90._with-text-right_uyk8e_72{padding-left:var(--components-dimensions-pagination-start-padding-inline-leading-md);padding-right:var(--components-dimensions-pagination-end-padding-inline-leading-md);width:auto}._size-md_uyk8e_90._with-text-left_uyk8e_72{padding-left:var(--components-dimensions-pagination-start-padding-inline-trailing-md);padding-right:var(--components-dimensions-pagination-end-padding-inline-trailing-md);width:auto}}
@@ -1,105 +1,186 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as y } from "react/jsx-runtime";
3
- import { useMemo as z, forwardRef as B, useRef as _, useCallback as N } from "react";
4
- import { Icon as x } from "./Icon.js";
5
- import { c as D } from "./index-CdiHdiVB.js";
6
- const G = "_list_1sith_2", q = "_item_1sith_11", F = "_page_1sith_37", J = "_dots_1sith_44", K = {
7
- list: G,
8
- item: q,
9
- "disabled-arrow": "_disabled-arrow_1sith_32",
10
- page: F,
11
- dots: J
12
- }, c = 5, L = 3;
13
- function O({ page: i, pageCount: t, rangeDisplay: a }) {
14
- return z(() => {
15
- if (t <= a || t <= c + 1)
16
- return h(t, (s) => s + 1);
17
- const r = Q(i, t), d = r === "before" ? h(c, (s) => s + 1) : [1], l = r === "center" ? h(L, (s) => s + i - 1) : [], o = r === "after" ? h(c, (s) => s + t - c + 1) : [t];
18
- return S([d, l, o], "-");
19
- }, [i, t, a]);
2
+ import './Pagination.css';
3
+ import { jsx as s, jsxs as N } from "react/jsx-runtime";
4
+ import { useMemo as Y, forwardRef as Z, useRef as M, useCallback as R } from "react";
5
+ import { Icon as A } from "./Icon.js";
6
+ import { c as H } from "./index-PAaZGbyz.js";
7
+ const I = "_list_uyk8e_3", n = "_item_uyk8e_13", C = "_page_uyk8e_52", a = {
8
+ list: I,
9
+ item: n,
10
+ "disabled-arrow": "_disabled-arrow_uyk8e_43",
11
+ page: C,
12
+ "with-text-left": "_with-text-left_uyk8e_72",
13
+ "with-text-right": "_with-text-right_uyk8e_72",
14
+ "size-lg": "_size-lg_uyk8e_75",
15
+ "size-md": "_size-md_uyk8e_90"
16
+ }, h = 5, x = 3;
17
+ function v({ page: c, pageCount: e, rangeDisplay: P }) {
18
+ return Y(() => {
19
+ if (e <= P || e <= h + 1)
20
+ return B(e, (b) => b + 1);
21
+ const u = g(c, e), o = u === "before" ? B(h, (b) => b + 1) : [1], r = u === "center" ? B(x, (b) => b + c - 1) : [], w = u === "after" ? B(h, (b) => b + e - h + 1) : [e];
22
+ return T([o, r, w], "-");
23
+ }, [c, e, P]);
20
24
  }
21
- function h(i, t) {
22
- return Array.from({ length: i }, (a, r) => t(r));
25
+ function B(c, e) {
26
+ return Array.from({ length: c }, (P, u) => e(u));
23
27
  }
24
- function Q(i, t) {
25
- return i < c ? "before" : i >= c && i <= t - c + 1 ? "center" : i > t - c + 1 ? "after" : "center";
28
+ function g(c, e) {
29
+ return c < h ? "before" : c >= h && c <= e - h + 1 ? "center" : c > e - h + 1 ? "after" : "center";
26
30
  }
27
- function S(i, t) {
28
- return i.reduce((a, r, d) => {
29
- const l = [];
30
- return l.push(...a), l.push(...r), r.length && d < i.length - 1 && l.push(t), l;
31
+ function T(c, e) {
32
+ return c.reduce((P, u, o) => {
33
+ const r = [];
34
+ return r.push(...P), r.push(...u), u.length && o < c.length - 1 && r.push(e), r;
31
35
  }, []);
32
36
  }
33
- const f = D(K), Y = B(
37
+ const m = H(a), ll = Z(
34
38
  ({
35
- "aria-label": i,
36
- buttonNextProps: t,
37
- buttonPrevProps: a,
39
+ "aria-label": c,
40
+ buttonFirstProps: e,
41
+ buttonLastProps: P,
42
+ buttonNextProps: u,
43
+ buttonPrevProps: o,
38
44
  dataTestId: r,
39
- getHref: d,
40
- listProps: l,
41
- onChange: o,
42
- page: s,
43
- pageCount: m,
44
- rangeDisplay: v = 5,
45
- ...w
46
- }, P) => {
47
- const R = O({ page: s, pageCount: m, rangeDisplay: v }), $ = _(null), k = _(null), u = s === 1, b = s === m, A = N(() => {
48
- if (u) return;
49
- const e = Math.max(s - 1, 1);
50
- o(e);
51
- }, [u, s, o]), E = N(() => {
52
- if (b) return;
53
- const e = Math.min(s + 1, m);
54
- o(e);
55
- }, [b, s, m, o]);
56
- return /* @__PURE__ */ n("nav", { "aria-label": i ?? "Pagination", "data-testid": r, ref: P, ...w, children: /* @__PURE__ */ y("ol", { className: f("list"), ...l, children: [
57
- /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
45
+ getHref: w,
46
+ listProps: b,
47
+ navigationTexts: l,
48
+ onChange: d,
49
+ page: f,
50
+ pageCount: _,
51
+ rangeDisplay: G = 5,
52
+ showEdgeControls: D = !1,
53
+ size: i = "lg",
54
+ ...p
55
+ }, q) => {
56
+ const J = v({ page: f, pageCount: _, rangeDisplay: G }), K = M(null), O = M(null), k = f === 1, y = f === _, $ = f === 1, z = f === _, j = (l == null ? void 0 : l.firstPage) || "First Page", E = (l == null ? void 0 : l.lastPage) || "Last Page", F = (l == null ? void 0 : l.nextPage) || "Next Page", L = (l == null ? void 0 : l.previousPage) || "Previous Page", Q = R(() => {
57
+ $ || d(1);
58
+ }, [$, d]), S = R(() => {
59
+ z || d(_);
60
+ }, [z, _, d]), U = R(() => {
61
+ if (k) return;
62
+ const t = Math.max(f - 1, 1);
63
+ d(t);
64
+ }, [k, f, d]), V = R(() => {
65
+ if (y) return;
66
+ const t = Math.min(f + 1, _);
67
+ d(t);
68
+ }, [y, f, _, d]);
69
+ return /* @__PURE__ */ s("nav", { "aria-label": c ?? "Pagination", "data-testid": r, ref: q, ...p, children: /* @__PURE__ */ N("ol", { className: m("list"), ...b, children: [
70
+ D ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ N(
58
71
  "button",
59
72
  {
60
- "aria-label": "Previous Page",
61
- className: f("item", u && "disabled-arrow"),
73
+ "aria-label": j,
74
+ className: m(
75
+ "item",
76
+ `size-${i}`,
77
+ (l == null ? void 0 : l.firstPage) && "with-text-right",
78
+ $ && "disabled-arrow"
79
+ ),
80
+ "data-testid": r ? `${r}-arrow-first` : void 0,
81
+ disabled: $,
82
+ onClick: Q,
83
+ type: "button",
84
+ ...e,
85
+ children: [
86
+ /* @__PURE__ */ s(A, { className: m("icon"), name: "angle-double-left", size: "lg" }),
87
+ l != null && l.firstPage ? j : null
88
+ ]
89
+ }
90
+ ) }) : null,
91
+ /* @__PURE__ */ s("li", { children: /* @__PURE__ */ N(
92
+ "button",
93
+ {
94
+ "aria-label": L,
95
+ className: m(
96
+ "item",
97
+ `size-${i}`,
98
+ (l == null ? void 0 : l.previousPage) && "with-text-right",
99
+ k && "disabled-arrow"
100
+ ),
62
101
  "data-testid": r ? `${r}-arrow-prev` : void 0,
63
- disabled: u,
64
- onClick: A,
65
- ref: $,
102
+ disabled: k,
103
+ onClick: U,
104
+ ref: K,
66
105
  type: "button",
67
- ...a,
68
- children: /* @__PURE__ */ n(x, { name: "angle-left-b", size: "sm" })
106
+ ...o,
107
+ children: [
108
+ /* @__PURE__ */ s(A, { className: m("icon"), name: "angle-left", size: "lg" }),
109
+ l != null && l.previousPage ? L : null
110
+ ]
69
111
  }
70
112
  ) }),
71
- R.map(
72
- (e, j) => e === "-" ? /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("span", { className: f("dots"), children: "..." }) }, `${j}-`) : /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
113
+ J.map(
114
+ (t, W) => t === "-" ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
115
+ "button",
116
+ {
117
+ "aria-label": "Collapsed Pages",
118
+ className: m("item", `size-${i}`),
119
+ type: "button",
120
+ ...u,
121
+ children: "..."
122
+ }
123
+ ) }, `${W}-`) : /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
73
124
  "a",
74
125
  {
75
- "aria-current": e === s,
76
- className: f("item", "page"),
77
- "data-testid": r ? `${r}-${e}` : void 0,
78
- href: d == null ? void 0 : d(e),
79
- onClick: (M) => {
80
- o && (M.preventDefault(), o(e));
126
+ "aria-current": t === f,
127
+ className: m("item", "page", `size-${i}`),
128
+ "data-testid": r ? `${r}-${t}` : void 0,
129
+ href: w == null ? void 0 : w(t),
130
+ onClick: (X) => {
131
+ d && (X.preventDefault(), d(t));
81
132
  },
82
- children: e
133
+ children: t
83
134
  }
84
- ) }, e)
135
+ ) }, t)
85
136
  ),
86
- /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
137
+ /* @__PURE__ */ s("li", { children: /* @__PURE__ */ N(
87
138
  "button",
88
139
  {
89
- "aria-label": "Next Page",
90
- className: f("item", b && "disabled-arrow"),
140
+ "aria-label": F,
141
+ className: m(
142
+ "item",
143
+ `size-${i}`,
144
+ (l == null ? void 0 : l.nextPage) && "with-text-left",
145
+ y && "disabled-arrow"
146
+ ),
91
147
  "data-testid": r ? `${r}-arrow-next` : void 0,
92
- disabled: b,
93
- onClick: E,
94
- ref: k,
148
+ disabled: y,
149
+ onClick: V,
150
+ ref: O,
151
+ type: "button",
152
+ ...u,
153
+ children: [
154
+ l != null && l.nextPage ? F : null,
155
+ /* @__PURE__ */ s(A, { name: "angle-right", size: "lg" })
156
+ ]
157
+ }
158
+ ) }),
159
+ D ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ N(
160
+ "button",
161
+ {
162
+ "aria-label": E,
163
+ className: m(
164
+ "item",
165
+ `size-${i}`,
166
+ (l == null ? void 0 : l.lastPage) && "with-text-left",
167
+ z && "disabled-arrow"
168
+ ),
169
+ "data-testid": r ? `${r}-arrow-last` : void 0,
170
+ disabled: z,
171
+ onClick: S,
95
172
  type: "button",
96
- ...t,
97
- children: /* @__PURE__ */ n(x, { name: "angle-right-b", size: "sm" })
173
+ ...P,
174
+ children: [
175
+ l != null && l.lastPage ? E : null,
176
+ /* @__PURE__ */ s(A, { className: m("icon"), name: "angle-double-right", size: "lg" })
177
+ ]
98
178
  }
99
- ) })
179
+ ) }) : null
100
180
  ] }) });
101
181
  }
102
182
  );
183
+ ll.displayName = "Pagination";
103
184
  export {
104
- Y as Pagination
185
+ ll as Pagination
105
186
  };
@@ -1,36 +1,39 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
- import { forwardRef as c, useState as m } from "react";
4
- import { InputText as l } from "./InputText.js";
3
+ import { forwardRef as c, useState as l } from "react";
4
+ import { InputText as u } from "./InputText.js";
5
5
  import { Button as w } from "./Button.js";
6
6
  import { Icon as n } from "./Icon.js";
7
- const u = ({ isHidden: e, onClick: t, ...a }) => /* @__PURE__ */ o(
7
+ const d = ({ isHidden: a, onClick: t, ...e }) => /* @__PURE__ */ o(
8
8
  w,
9
9
  {
10
10
  "aria-controls": "password",
11
- "aria-expanded": !e,
11
+ "aria-expanded": !a,
12
12
  onClick: t,
13
13
  size: "sm",
14
14
  variant: "tertiary",
15
- ...a,
16
- children: e ? /* @__PURE__ */ o(n, { name: "eye" }) : /* @__PURE__ */ o(n, { name: "eye-slash" })
15
+ ...e,
16
+ children: a ? /* @__PURE__ */ o(n, { name: "eye" }) : /* @__PURE__ */ o(n, { name: "eye-slash" })
17
17
  }
18
- ), I = c(
19
- ({ toggleAriaLabel: e, ...t }, a) => {
20
- const [r, d] = m("password"), s = r === "password", i = () => {
21
- d(s ? "text" : "password");
22
- }, p = t["data-testid"] ? `${t["data-testid"]}-action` : void 0;
23
- return /* @__PURE__ */ o(l, { ...t, ref: a, type: r, children: /* @__PURE__ */ o(
24
- u,
18
+ );
19
+ d.displayName = "PasswordInput.ToggleButton";
20
+ const y = c(
21
+ ({ toggleAriaLabel: a, ...t }, e) => {
22
+ const [r, i] = l("password"), s = r === "password", p = () => {
23
+ i(s ? "text" : "password");
24
+ }, m = t["data-testid"] ? `${t["data-testid"]}-action` : void 0;
25
+ return /* @__PURE__ */ o(u, { ...t, ref: e, type: r, children: /* @__PURE__ */ o(
26
+ d,
25
27
  {
26
- "aria-label": e ?? (s ? "Show password" : "Hide password"),
27
- "data-testid": p,
28
+ "aria-label": a ?? (s ? "Show password" : "Hide password"),
29
+ "data-testid": m,
28
30
  isHidden: s,
29
- onClick: i
31
+ onClick: p
30
32
  }
31
33
  ) });
32
34
  }
33
35
  );
36
+ y.displayName = "PasswordInput";
34
37
  export {
35
- I as PasswordInput
38
+ y as PasswordInput
36
39
  };