@ensi-platform/admin-ui 0.13.1 → 0.14.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.
Files changed (223) hide show
  1. package/bin/ai.js +0 -0
  2. package/dist/Component--pn4mDeS.js +870 -0
  3. package/dist/Component--pn4mDeS.js.map +1 -0
  4. package/dist/{Component-BhZC1r4b.js → Component-BJz78zCJ.js} +2 -2
  5. package/dist/{Component-BhZC1r4b.js.map → Component-BJz78zCJ.js.map} +1 -1
  6. package/dist/{Component-DV6H96-0.js → Component-BbslNbTq.js} +2 -2
  7. package/dist/{Component-DV6H96-0.js.map → Component-BbslNbTq.js.map} +1 -1
  8. package/dist/{Component-B6OSgrmp.js → Component-COgt_U9z.js} +3 -3
  9. package/dist/{Component-B6OSgrmp.js.map → Component-COgt_U9z.js.map} +1 -1
  10. package/dist/{Component-kqMyROjC.js → Component-DHBQ3LMI.js} +2 -2
  11. package/dist/{Component-kqMyROjC.js.map → Component-DHBQ3LMI.js.map} +1 -1
  12. package/dist/{Component-BoAQ166N.js → Component-DrdEP1wD.js} +3 -3
  13. package/dist/{Component-BoAQ166N.js.map → Component-DrdEP1wD.js.map} +1 -1
  14. package/dist/{Component-CMdJyqc-.js → Component-Qhj0uSjq.js} +2 -2
  15. package/dist/{Component-CMdJyqc-.js.map → Component-Qhj0uSjq.js.map} +1 -1
  16. package/dist/{Component-CiwX3wP8.js → Component-Zja2mwzK.js} +2 -2
  17. package/dist/{Component-CiwX3wP8.js.map → Component-Zja2mwzK.js.map} +1 -1
  18. package/dist/{Component-CS-9-L8S.js → Component-_PP1i9V1.js} +3 -3
  19. package/dist/{Component-CS-9-L8S.js.map → Component-_PP1i9V1.js.map} +1 -1
  20. package/dist/{Component-BBzbDcdq.js → Component-yeVZUFid.js} +2 -2
  21. package/dist/{Component-BBzbDcdq.js.map → Component-yeVZUFid.js.map} +1 -1
  22. package/dist/{Search-CS1rsu-f.js → Search-dQa9wT3n.js} +3 -3
  23. package/dist/{Search-CS1rsu-f.js.map → Search-dQa9wT3n.js.map} +1 -1
  24. package/dist/Star-JBCU7DBD.js +28 -0
  25. package/dist/Star-JBCU7DBD.js.map +1 -0
  26. package/dist/action-popup/index.js +2 -2
  27. package/dist/active-filters/index.js +1 -1
  28. package/dist/arrangement-settings/index.js +2 -2
  29. package/dist/assets/Component16.css +1 -1
  30. package/dist/assets/index.css +1 -1
  31. package/dist/assets/index27.css +1 -1
  32. package/dist/assets/index28.css +1 -1
  33. package/dist/assets/index29.css +1 -1
  34. package/dist/assets/index30.css +1 -1
  35. package/dist/assets/index31.css +1 -1
  36. package/dist/assets/index32.css +1 -1
  37. package/dist/assets/index33.css +1 -1
  38. package/dist/assets/index34.css +1 -1
  39. package/dist/assets/index35.css +1 -0
  40. package/dist/autocomplete/index.js +1 -1
  41. package/dist/autocomplete-async/Component.d.ts.map +1 -1
  42. package/dist/autocomplete-async/index.js +98 -92
  43. package/dist/autocomplete-async/index.js.map +1 -1
  44. package/dist/bottom-sheet/index.js +2 -2
  45. package/dist/cascade-menu/index.js +4 -4
  46. package/dist/color-field/index.js +2 -2
  47. package/dist/color-picker/index.js +1 -1
  48. package/dist/combobox/components/Trigger/index.d.ts +1 -0
  49. package/dist/combobox/components/Trigger/index.d.ts.map +1 -1
  50. package/dist/combobox/index.d.ts +1 -1
  51. package/dist/combobox/index.d.ts.map +1 -1
  52. package/dist/combobox/index.js +15 -14
  53. package/dist/copy-button/index.js +1 -1
  54. package/dist/data-table/Component.d.ts +1 -1
  55. package/dist/data-table/index.js +2 -2
  56. package/dist/date-picker/index.js +2 -2
  57. package/dist/date-range-picker/index.js +2 -2
  58. package/dist/drawer/index.js +1 -1
  59. package/dist/dropzone/index.js +2 -2
  60. package/dist/{hooks-Di5rgHTG.js → hooks-BSSTu-2y.js} +3 -2
  61. package/dist/{hooks-Di5rgHTG.js.map → hooks-BSSTu-2y.js.map} +1 -1
  62. package/dist/icons/AlignCenter.d.ts +7 -0
  63. package/dist/icons/AlignCenter.d.ts.map +1 -0
  64. package/dist/icons/AlignJustify.d.ts +7 -0
  65. package/dist/icons/AlignJustify.d.ts.map +1 -0
  66. package/dist/icons/AlignLeft.d.ts +7 -0
  67. package/dist/icons/AlignLeft.d.ts.map +1 -0
  68. package/dist/icons/AlignRight.d.ts +7 -0
  69. package/dist/icons/AlignRight.d.ts.map +1 -0
  70. package/dist/icons/Anchor.d.ts +7 -0
  71. package/dist/icons/Anchor.d.ts.map +1 -0
  72. package/dist/icons/Bold.d.ts +7 -0
  73. package/dist/icons/Bold.d.ts.map +1 -0
  74. package/dist/icons/Code.d.ts +7 -0
  75. package/dist/icons/Code.d.ts.map +1 -0
  76. package/dist/icons/HorizontalRule.d.ts +7 -0
  77. package/dist/icons/HorizontalRule.d.ts.map +1 -0
  78. package/dist/icons/Indent.d.ts +7 -0
  79. package/dist/icons/Indent.d.ts.map +1 -0
  80. package/dist/icons/Italic.d.ts +7 -0
  81. package/dist/icons/Italic.d.ts.map +1 -0
  82. package/dist/icons/Link.d.ts +7 -0
  83. package/dist/icons/Link.d.ts.map +1 -0
  84. package/dist/icons/List.d.ts +7 -0
  85. package/dist/icons/List.d.ts.map +1 -0
  86. package/dist/icons/ListOrdered.d.ts +7 -0
  87. package/dist/icons/ListOrdered.d.ts.map +1 -0
  88. package/dist/icons/Maximize.d.ts +7 -0
  89. package/dist/icons/Maximize.d.ts.map +1 -0
  90. package/dist/icons/Outdent.d.ts +7 -0
  91. package/dist/icons/Outdent.d.ts.map +1 -0
  92. package/dist/icons/Palette.d.ts +7 -0
  93. package/dist/icons/Palette.d.ts.map +1 -0
  94. package/dist/icons/Quote.d.ts +7 -0
  95. package/dist/icons/Quote.d.ts.map +1 -0
  96. package/dist/icons/Redo.d.ts +7 -0
  97. package/dist/icons/Redo.d.ts.map +1 -0
  98. package/dist/icons/Smile.d.ts +7 -0
  99. package/dist/icons/Smile.d.ts.map +1 -0
  100. package/dist/icons/Star.d.ts +7 -0
  101. package/dist/icons/Star.d.ts.map +1 -0
  102. package/dist/icons/Strike.d.ts +7 -0
  103. package/dist/icons/Strike.d.ts.map +1 -0
  104. package/dist/icons/Subscript.d.ts +7 -0
  105. package/dist/icons/Subscript.d.ts.map +1 -0
  106. package/dist/icons/Superscript.d.ts +7 -0
  107. package/dist/icons/Superscript.d.ts.map +1 -0
  108. package/dist/icons/Table.d.ts +7 -0
  109. package/dist/icons/Table.d.ts.map +1 -0
  110. package/dist/icons/Underline.d.ts +7 -0
  111. package/dist/icons/Underline.d.ts.map +1 -0
  112. package/dist/icons/Undo.d.ts +7 -0
  113. package/dist/icons/Undo.d.ts.map +1 -0
  114. package/dist/icons/Video.d.ts +7 -0
  115. package/dist/icons/Video.d.ts.map +1 -0
  116. package/dist/icons/index.d.ts +27 -0
  117. package/dist/icons/index.d.ts.map +1 -1
  118. package/dist/icons/index.js +709 -177
  119. package/dist/icons/index.js.map +1 -1
  120. package/dist/{index-Co6mzXrw.js → index-CYUeRS10.js} +3 -3
  121. package/dist/{index-Co6mzXrw.js.map → index-CYUeRS10.js.map} +1 -1
  122. package/dist/index-Rx06m88a.js +101 -0
  123. package/dist/index-Rx06m88a.js.map +1 -0
  124. package/dist/{index-BAFoUNz-.js → index-o14ps46j.js} +2 -2
  125. package/dist/{index-BAFoUNz-.js.map → index-o14ps46j.js.map} +1 -1
  126. package/dist/input/index.js +1 -1
  127. package/dist/loader/index.js +1 -1
  128. package/dist/mask/index.js +1 -1
  129. package/dist/menu-list/index.js +1 -1
  130. package/dist/{metrics-CaN_sENu.js → metrics-D4vChkd-.js} +2 -2
  131. package/dist/{metrics-CaN_sENu.js.map → metrics-D4vChkd-.js.map} +1 -1
  132. package/dist/modal/index.js +1 -1
  133. package/dist/multi-autocomplete/index.js +1 -1
  134. package/dist/multi-autocomplete-async/index.js +1 -1
  135. package/dist/multi-select/index.js +2 -2
  136. package/dist/number-input/index.js +1 -1
  137. package/dist/number-range/index.js +1 -1
  138. package/dist/password/index.js +2 -2
  139. package/dist/provider/context.d.ts.map +1 -1
  140. package/dist/provider/index.js +2 -2
  141. package/dist/provider/types.d.ts +2 -0
  142. package/dist/provider/types.d.ts.map +1 -1
  143. package/dist/rating/Component.d.ts +5 -0
  144. package/dist/rating/Component.d.ts.map +1 -0
  145. package/dist/rating/FormRating.d.ts +6 -0
  146. package/dist/rating/FormRating.d.ts.map +1 -0
  147. package/dist/rating/components/Star/index.d.ts +14 -0
  148. package/dist/rating/components/Star/index.d.ts.map +1 -0
  149. package/dist/rating/components/Star/theme.d.ts +5 -0
  150. package/dist/rating/components/Star/theme.d.ts.map +1 -0
  151. package/dist/rating/components/Track/index.d.ts +41 -0
  152. package/dist/rating/components/Track/index.d.ts.map +1 -0
  153. package/dist/rating/index.d.ts +4 -0
  154. package/dist/rating/index.d.ts.map +1 -0
  155. package/dist/rating/index.js +361 -0
  156. package/dist/rating/index.js.map +1 -0
  157. package/dist/rating/theme.d.ts +5 -0
  158. package/dist/rating/theme.d.ts.map +1 -0
  159. package/dist/rating/types.d.ts +56 -0
  160. package/dist/rating/types.d.ts.map +1 -0
  161. package/dist/rating/utils.d.ts +11 -0
  162. package/dist/rating/utils.d.ts.map +1 -0
  163. package/dist/select/index.js +1 -1
  164. package/dist/suggest-checklist/index.js +3 -3
  165. package/dist/table/Component.d.ts +3 -3
  166. package/dist/table/components/Cell/index.d.ts +1 -1
  167. package/dist/table/components/Cell/index.d.ts.map +1 -1
  168. package/dist/table/components/Cell/theme.d.ts +1 -0
  169. package/dist/table/components/Cell/theme.d.ts.map +1 -1
  170. package/dist/table/components/CheckboxCell/index.d.ts.map +1 -1
  171. package/dist/table/components/HeaderCell/index.d.ts +1 -1
  172. package/dist/table/components/HeaderCell/index.d.ts.map +1 -1
  173. package/dist/table/components/HeaderCell/theme.d.ts +1 -0
  174. package/dist/table/components/HeaderCell/theme.d.ts.map +1 -1
  175. package/dist/table/components/HeaderCheckboxCell/index.d.ts.map +1 -1
  176. package/dist/table/components/Row/index.d.ts +1 -1
  177. package/dist/table/components/Row/index.d.ts.map +1 -1
  178. package/dist/table/components/Row/types.d.ts +6 -0
  179. package/dist/table/components/Row/types.d.ts.map +1 -1
  180. package/dist/table/components/TableElement/index.d.ts.map +1 -1
  181. package/dist/table/hooks/useTablePin.d.ts +6 -0
  182. package/dist/table/hooks/useTablePin.d.ts.map +1 -0
  183. package/dist/table/index.js +1 -1
  184. package/dist/table/types.d.ts +5 -1
  185. package/dist/table/types.d.ts.map +1 -1
  186. package/dist/table/utils.d.ts +45 -1
  187. package/dist/table/utils.d.ts.map +1 -1
  188. package/dist/tabs/index.js +1 -1
  189. package/dist/tag/index.js +1 -1
  190. package/dist/textarea/index.js +1 -1
  191. package/dist/time-field/index.js +1 -1
  192. package/dist/toast/index.js +2 -2
  193. package/dist/typography/index.js +1 -1
  194. package/dist/{utils-qHAuIhao.js → utils-Dfp1NDWx.js} +3 -3
  195. package/dist/{utils-qHAuIhao.js.map → utils-Dfp1NDWx.js.map} +1 -1
  196. package/dist/vertical-tabs/index.js +1 -1
  197. package/docs/design-language.md +14 -13
  198. package/package.json +5 -1
  199. package/src/autocomplete/docs/Description.md +2 -0
  200. package/src/autocomplete-async/docs/Description.md +1 -1
  201. package/src/badge/docs/cssVariables.ts +3 -3
  202. package/src/bottom-sheet/docs/cssVariables.ts +1 -1
  203. package/src/cascade-menu/docs/cssVariables.ts +7 -7
  204. package/src/data-table/docs/Description.md +2 -1
  205. package/src/ds/tokens/docs/Description.md +2 -1
  206. package/src/link/docs/cssVariables.ts +1 -1
  207. package/src/provider/docs/cssVariables.ts +1 -1
  208. package/src/provider/types.ts +2 -0
  209. package/src/rating/docs/Description.md +47 -0
  210. package/src/rating/docs/Example.md +9 -0
  211. package/src/rating/docs/cssVariables.ts +14 -0
  212. package/src/rating/types.ts +69 -0
  213. package/src/table/docs/Description.md +10 -8
  214. package/src/table/docs/Example.md +22 -5
  215. package/src/table/docs/cssVariables.ts +8 -3
  216. package/src/table/types.ts +6 -1
  217. package/src/toast/docs/cssVariables.ts +4 -4
  218. package/src/tooltip/docs/cssVariables.ts +2 -2
  219. package/LICENSE +0 -55
  220. package/dist/Component-DmKmX7so.js +0 -712
  221. package/dist/Component-DmKmX7so.js.map +0 -1
  222. package/dist/index-BHUJOcwj.js +0 -85
  223. package/dist/index-BHUJOcwj.js.map +0 -1
@@ -1,712 +0,0 @@
1
- import { jsxs as v, jsx as l, Fragment as pe } from "react/jsx-runtime";
2
- import { useContext as q, createContext as G, useMemo as x, useState as he, useId as ve } from "react";
3
- import b from "classnames";
4
- import { s as g } from "./index-h8z54aFR.js";
5
- import { B as Y } from "./Component-DlBYWjUa.js";
6
- import { M as Ne, F as Te, S as J, a as K, C as ke } from "./SortDescending-DziKhSYN.js";
7
- import { P as C } from "./Component-CQyBQxAb.js";
8
- import { u as E } from "./hooks-Di5rgHTG.js";
9
- import { cva as w } from "class-variance-authority";
10
- import { C as Q } from "./Component-uzbYiLD9.js";
11
- import { C as X } from "./ChevronDown-Dzp7mD66.js";
12
- import { typographyStyles as W } from "./typography/index.js";
13
- import { S as Ce } from "./Component-CS-9-L8S.js";
14
- import { C as Se } from "./ChevronRight-BsaiJImC.js";
15
- import './assets/Component16.css';const Z = G(void 0), B = () => {
16
- const e = q(Z);
17
- if (!e)
18
- throw new Error("This component must be used within a <Table> component");
19
- return e;
20
- }, $e = "aub_styles-module_root_3dc5f", Ie = "aub_styles-module_menu_6e4e6", xe = "aub_styles-module_menuItem_f71c0", Ee = "aub_styles-module_overflowTrigger_7c588", Pe = "aub_styles-module_visuallyHidden_0e593", $ = {
21
- root: $e,
22
- menu: Ie,
23
- menuItem: xe,
24
- overflowTrigger: Ee,
25
- visuallyHidden: Pe
26
- }, U = ({
27
- item: e,
28
- size: t,
29
- className: a
30
- }) => /* @__PURE__ */ l(
31
- Y,
32
- {
33
- type: "button",
34
- size: t === "lg" ? "md" : "sm",
35
- variant: e.danger ? "danger" : "secondary",
36
- disabled: e.disabled,
37
- icon: e.icon,
38
- className: a,
39
- onClick: (s) => {
40
- s.stopPropagation(), e.onClick?.();
41
- },
42
- children: e.text
43
- }
44
- ), ee = ({
45
- items: e,
46
- visibleCount: t = 1,
47
- overflowLabel: a,
48
- dataTestId: s,
49
- className: o
50
- }) => {
51
- const { moreActions: n } = E(), i = a ?? n, { size: u } = B(), r = e.slice(0, Math.max(0, t)), d = e.slice(Math.max(0, t));
52
- return /* @__PURE__ */ v("div", { className: b($.root, o), "data-test-id": s, children: [
53
- r.map((c) => /* @__PURE__ */ l(U, { item: c, size: u }, c.key ?? String(c.text))),
54
- d.length > 0 ? /* @__PURE__ */ v(C, { children: [
55
- /* @__PURE__ */ l(C.Trigger, { children: /* @__PURE__ */ l(
56
- Y,
57
- {
58
- type: "button",
59
- size: u === "lg" ? "md" : "sm",
60
- variant: "secondary",
61
- "aria-label": i,
62
- icon: { Component: Ne },
63
- className: $.overflowTrigger,
64
- onClick: (c) => c.stopPropagation(),
65
- children: /* @__PURE__ */ l("span", { className: $.visuallyHidden, children: i })
66
- }
67
- ) }),
68
- /* @__PURE__ */ l(C.Content, { placement: "bottom end", children: /* @__PURE__ */ l("div", { className: $.menu, role: "menu", children: d.map((c) => /* @__PURE__ */ l(
69
- U,
70
- {
71
- item: c,
72
- size: u,
73
- className: $.menuItem
74
- },
75
- c.key ?? String(c.text)
76
- )) }) })
77
- ] }) : null
78
- ] });
79
- };
80
- ee.displayName = "Table.ActionBar";
81
- const Le = "aub_styles-module_root_dd92c", Ae = {
82
- root: Le
83
- }, te = g(({ ref: e, children: t, className: a, dataTestId: s, ...o }) => /* @__PURE__ */ l("tbody", { ...o, ref: e, className: b(Ae.root, a), "data-test-id": s, children: t }));
84
- te.displayName = "Table.Body";
85
- const He = "aub_styles-module_root_9238b", Oe = "aub_styles-module_numeric_cb295", ze = "aub_styles-module_alignStart_1287f", Re = "aub_styles-module_alignEnd_8f2d8", we = "aub_styles-module_alignCenter_c83e7", We = "aub_styles-module_noWrap_80a17", Be = "aub_styles-module_utility_f2ad7", k = {
86
- root: He,
87
- numeric: Oe,
88
- alignStart: ze,
89
- alignEnd: Re,
90
- alignCenter: we,
91
- noWrap: We,
92
- utility: Be
93
- }, Me = w(k.root, {
94
- variants: {
95
- numeric: {
96
- true: k.numeric,
97
- false: null
98
- },
99
- align: {
100
- start: k.alignStart,
101
- end: k.alignEnd,
102
- center: k.alignCenter
103
- },
104
- noWrap: {
105
- true: k.noWrap,
106
- false: null
107
- },
108
- utility: {
109
- true: k.utility,
110
- false: null
111
- }
112
- }
113
- }), M = g(
114
- ({
115
- ref: e,
116
- children: t,
117
- numeric: a = !1,
118
- align: s,
119
- noWrap: o = !1,
120
- utility: n = !1,
121
- width: i,
122
- colSpan: u,
123
- className: r,
124
- dataTestId: d,
125
- style: c,
126
- ...m
127
- }) => /* @__PURE__ */ l(
128
- "td",
129
- {
130
- ...m,
131
- ref: e,
132
- colSpan: u,
133
- className: b(Me({ numeric: a, align: s, noWrap: o, utility: n }), r),
134
- style: { width: i, ...c },
135
- "data-numeric": a || void 0,
136
- "data-utility": n || void 0,
137
- "data-test-id": d,
138
- children: t
139
- }
140
- )
141
- );
142
- M.displayName = "Table.Cell";
143
- const Fe = "aub_styles-module_root_e0d29", Ve = {
144
- root: Fe
145
- }, ae = ({
146
- checked: e,
147
- indeterminate: t = !1,
148
- onChange: a,
149
- "aria-label": s,
150
- className: o,
151
- dataTestId: n,
152
- onClick: i,
153
- children: u,
154
- ...r
155
- }) => {
156
- const { size: d } = B(), c = (m) => {
157
- m.stopPropagation(), i?.(m);
158
- };
159
- return /* @__PURE__ */ l(
160
- M,
161
- {
162
- ...r,
163
- utility: !0,
164
- className: b(Ve.root, o),
165
- dataTestId: n,
166
- onClick: c,
167
- children: /* @__PURE__ */ l(
168
- Q,
169
- {
170
- size: d,
171
- checked: e,
172
- indeterminate: t,
173
- onChange: a,
174
- "aria-label": s,
175
- children: u
176
- }
177
- )
178
- }
179
- );
180
- };
181
- ae.displayName = "Table.CheckboxCell";
182
- const je = "aub_styles-module_root_0f9dc", Ue = {
183
- root: je
184
- }, le = g(
185
- ({ ref: e, children: t, sticky: a = !0, className: s, dataTestId: o, ...n }) => /* @__PURE__ */ l(
186
- "div",
187
- {
188
- ...n,
189
- ref: e,
190
- className: b(Ue.root, s),
191
- "data-sticky": a || void 0,
192
- "data-test-id": o,
193
- children: t
194
- }
195
- )
196
- );
197
- le.displayName = "Table.Footer";
198
- const se = G({ sticky: !1 }), De = se.Provider, qe = () => q(se).sticky, Ge = "aub_styles-module_root_d320c", Ye = "aub_styles-module_sticky_3efca", D = {
199
- root: Ge,
200
- sticky: Ye
201
- }, oe = g(
202
- ({ ref: e, children: t, sticky: a = !1, className: s, dataTestId: o, ...n }) => {
203
- const i = x(() => ({ sticky: a }), [a]);
204
- return /* @__PURE__ */ l(De, { value: i, children: /* @__PURE__ */ l(
205
- "thead",
206
- {
207
- ...n,
208
- ref: e,
209
- className: b(D.root, a && D.sticky, s),
210
- "data-sticky": a || void 0,
211
- "data-test-id": o,
212
- children: t
213
- }
214
- ) });
215
- }
216
- );
217
- oe.displayName = "Table.Header";
218
- const Je = '[role="listbox"], [role="dialog"]', Ke = (e) => !!e.closest(Je), Qe = (e) => {
219
- if (e === void 0) return "asc";
220
- if (e === "asc") return "desc";
221
- }, Xe = 7, Ze = (e, t, a) => e === "any" ? t : e === "center" ? a : a - 1, et = (e, t, a = Xe) => {
222
- if (t < 1) return [];
223
- const s = Math.ceil(a / 2), n = t > a ? e < s ? "start" : e > t - s + 1 ? "end" : "center" : "any", i = Ze(n, t, a), u = (r) => n === "any" ? r : r === 1 ? 1 : r === i ? t : r === 2 && n !== "start" || r === i - 1 && n !== "end" ? null : n === "center" ? e + r - s : n === "end" ? t + r - i : r;
224
- return Array.from({ length: i }, (r, d) => {
225
- const c = u(d + 1);
226
- return c === null ? "ellipsis" : c;
227
- });
228
- }, tt = "aub_styles-module_trigger_e351e", at = "aub_styles-module_triggerLabel_e57b8", lt = "aub_styles-module_sortIcon_0a409", st = "aub_styles-module_filterIcon_ad45e", ot = "aub_styles-module_sortMark_e22c1", nt = "aub_styles-module_chevron_8c778", rt = "aub_styles-module_panel_b14cb", ct = "aub_styles-module_sortList_f8a4a", it = "aub_styles-module_sortItem_60ebf", dt = "aub_styles-module_divider_a4798", f = {
229
- trigger: tt,
230
- triggerLabel: at,
231
- sortIcon: lt,
232
- filterIcon: st,
233
- sortMark: ot,
234
- chevron: nt,
235
- panel: rt,
236
- sortList: ct,
237
- sortItem: it,
238
- divider: dt
239
- }, ut = (e) => !Ke(e), mt = [
240
- { direction: "asc", Icon: J },
241
- { direction: "desc", Icon: K }
242
- ], ne = ({
243
- children: e,
244
- sortable: t,
245
- sortDirection: a,
246
- onSort: s,
247
- filter: o,
248
- filterActive: n
249
- }) => {
250
- const { sortAscending: i, sortDescending: u } = E(), [r, d] = he(!1), c = { asc: i, desc: u };
251
- return /* @__PURE__ */ v(C, { isOpen: r, onOpenChange: d, children: [
252
- /* @__PURE__ */ l(C.Trigger, { children: /* @__PURE__ */ v("button", { type: "button", className: f.trigger, "aria-haspopup": "dialog", "data-open": r || void 0, children: [
253
- /* @__PURE__ */ l("span", { className: f.triggerLabel, children: e }),
254
- n ? /* @__PURE__ */ l(Te, { className: f.filterIcon, "data-active": !0, "aria-hidden": !0 }) : null,
255
- a === "asc" ? /* @__PURE__ */ l(J, { className: f.sortMark, "data-sort-mark": "asc", "aria-hidden": !0 }) : null,
256
- a === "desc" ? /* @__PURE__ */ l(K, { className: f.sortMark, "data-sort-mark": "desc", "aria-hidden": !0 }) : null,
257
- !n && a == null ? /* @__PURE__ */ l(X, { className: f.chevron, "data-trigger-chevron": !0, "aria-hidden": !0 }) : null
258
- ] }) }),
259
- /* @__PURE__ */ v(
260
- C.Content,
261
- {
262
- className: f.panel,
263
- placement: "bottom start",
264
- shouldCloseOnInteractOutside: ut,
265
- children: [
266
- o,
267
- t ? /* @__PURE__ */ v(pe, { children: [
268
- /* @__PURE__ */ l("div", { className: f.divider }),
269
- /* @__PURE__ */ l("div", { className: f.sortList, children: mt.map(({ direction: m, Icon: _ }) => /* @__PURE__ */ v(
270
- "button",
271
- {
272
- type: "button",
273
- className: f.sortItem,
274
- onClick: () => s?.(m),
275
- children: [
276
- /* @__PURE__ */ l("span", { children: c[m] }),
277
- /* @__PURE__ */ l(_, { className: f.sortIcon, "aria-hidden": !0 })
278
- ]
279
- },
280
- m
281
- )) })
282
- ] }) : null
283
- ]
284
- }
285
- )
286
- ] });
287
- };
288
- ne.displayName = "Table.HeaderFilter";
289
- const bt = "aub_styles-module_root_25792", _t = "aub_styles-module_label_d7503", yt = "aub_styles-module_icon_a73d0", ft = "aub_styles-module_asc_29781", I = {
290
- root: bt,
291
- label: _t,
292
- icon: yt,
293
- asc: ft
294
- }, F = ({
295
- sortDirection: e,
296
- onClick: t,
297
- dataTestId: a,
298
- className: s,
299
- children: o
300
- }) => /* @__PURE__ */ v(
301
- "button",
302
- {
303
- type: "button",
304
- className: b(I.root, s),
305
- onClick: t,
306
- "data-sorted": e != null || void 0,
307
- "data-sort-direction": e,
308
- "data-test-id": a,
309
- children: [
310
- /* @__PURE__ */ l("span", { className: I.label, children: o }),
311
- /* @__PURE__ */ l(X, { className: b(I.icon, e === "asc" && I.asc), "aria-hidden": !0 })
312
- ]
313
- }
314
- );
315
- F.displayName = "Table.SortIndicator";
316
- const gt = "aub_styles-module_root_ab198", pt = "aub_styles-module_sticky_5f518", ht = "aub_styles-module_numeric_c623f", vt = "aub_styles-module_alignStart_874f7", Nt = "aub_styles-module_alignEnd_b80f1", Tt = "aub_styles-module_alignCenter_0eb45", kt = "aub_styles-module_noWrap_b3b77", Ct = "aub_styles-module_utility_d7a98", St = "aub_styles-module_content_cfe0e", p = {
317
- root: gt,
318
- sticky: pt,
319
- numeric: ht,
320
- alignStart: vt,
321
- alignEnd: Nt,
322
- alignCenter: Tt,
323
- noWrap: kt,
324
- utility: Ct,
325
- content: St
326
- }, $t = w(p.root, {
327
- variants: {
328
- numeric: {
329
- true: p.numeric,
330
- false: null
331
- },
332
- align: {
333
- start: p.alignStart,
334
- end: p.alignEnd,
335
- center: p.alignCenter
336
- },
337
- noWrap: {
338
- true: p.noWrap,
339
- false: null
340
- },
341
- utility: {
342
- true: p.utility,
343
- false: null
344
- },
345
- sticky: {
346
- true: p.sticky,
347
- false: null
348
- }
349
- }
350
- }), It = (e, t) => {
351
- if (e)
352
- return t === "asc" ? "ascending" : t === "desc" ? "descending" : "none";
353
- }, V = g(
354
- ({
355
- ref: e,
356
- children: t,
357
- numeric: a = !1,
358
- align: s,
359
- noWrap: o = !1,
360
- utility: n = !1,
361
- width: i,
362
- colSpan: u,
363
- sortable: r = !1,
364
- sortDirection: d,
365
- onSort: c,
366
- filter: m,
367
- filterActive: _ = !1,
368
- sticky: T,
369
- className: y,
370
- dataTestId: P,
371
- style: L,
372
- scope: A = "col",
373
- ...H
374
- }) => {
375
- const O = qe(), z = T ?? O;
376
- let S = t;
377
- return r && m == null && (S = /* @__PURE__ */ l("span", { className: p.content, children: /* @__PURE__ */ l(
378
- F,
379
- {
380
- sortDirection: d,
381
- onClick: () => c?.(Qe(d)),
382
- children: t
383
- }
384
- ) })), m != null && (S = /* @__PURE__ */ l("span", { className: p.content, children: /* @__PURE__ */ l(
385
- ne,
386
- {
387
- sortable: r,
388
- sortDirection: d,
389
- onSort: c,
390
- filter: m,
391
- filterActive: _,
392
- children: t
393
- }
394
- ) })), /* @__PURE__ */ l(
395
- "th",
396
- {
397
- ...H,
398
- ref: e,
399
- scope: A,
400
- colSpan: u,
401
- className: b($t({ numeric: a, align: s, noWrap: o, utility: n, sticky: z }), y),
402
- style: { width: i, ...L },
403
- "aria-sort": It(r, d),
404
- "data-numeric": a || void 0,
405
- "data-utility": n || void 0,
406
- "data-sortable": r || void 0,
407
- "data-filter": m != null || void 0,
408
- "data-test-id": P,
409
- children: S
410
- }
411
- );
412
- }
413
- );
414
- V.displayName = "Table.HeaderCell";
415
- const xt = "aub_styles-module_root_78429", Et = {
416
- root: xt
417
- }, re = ({
418
- checked: e,
419
- indeterminate: t = !1,
420
- onChange: a,
421
- "aria-label": s,
422
- className: o,
423
- dataTestId: n,
424
- onClick: i,
425
- children: u,
426
- ...r
427
- }) => {
428
- const { size: d } = B(), c = (m) => {
429
- m.stopPropagation(), i?.(m);
430
- };
431
- return /* @__PURE__ */ l(
432
- V,
433
- {
434
- ...r,
435
- utility: !0,
436
- className: b(Et.root, o),
437
- dataTestId: n,
438
- onClick: c,
439
- children: /* @__PURE__ */ l(
440
- Q,
441
- {
442
- size: d,
443
- checked: e,
444
- indeterminate: t,
445
- onChange: a,
446
- "aria-label": s,
447
- children: u
448
- }
449
- )
450
- }
451
- );
452
- };
453
- re.displayName = "Table.HeaderCheckboxCell";
454
- const Pt = "aub_styles-module_root_6aae8", Lt = "aub_styles-module_label_2bcb7", At = "aub_styles-module_select_a3d31", R = {
455
- root: Pt,
456
- label: Lt,
457
- select: At
458
- }, Ht = [5, 10, 25, 50, 100], ce = g(
459
- ({
460
- ref: e,
461
- value: t,
462
- onChange: a,
463
- options: s = Ht,
464
- label: o,
465
- disabled: n = !1,
466
- className: i,
467
- dataTestId: u,
468
- ...r
469
- }) => {
470
- const { pageSize: d } = E(), c = o ?? d, m = ve(), _ = x(
471
- () => s.map((y) => ({ value: y, label: String(y) })),
472
- [s]
473
- ), T = (y) => {
474
- y != null && a(typeof y == "number" ? y : Number(y));
475
- };
476
- return /* @__PURE__ */ v(
477
- "div",
478
- {
479
- ...r,
480
- ref: e,
481
- className: b(R.root, W.bodyS, i),
482
- "data-test-id": u,
483
- children: [
484
- /* @__PURE__ */ l("span", { id: m, className: R.label, children: c }),
485
- /* @__PURE__ */ l(
486
- Ce,
487
- {
488
- className: R.select,
489
- size: "sm",
490
- block: !1,
491
- clear: !1,
492
- disabled: n,
493
- value: t,
494
- options: _,
495
- onChange: T,
496
- "aria-labelledby": m
497
- }
498
- )
499
- ]
500
- }
501
- );
502
- }
503
- );
504
- ce.displayName = "Table.PageSize";
505
- const Ot = "aub_styles-module_root_b4bb7", zt = "aub_styles-module_range_def38", Rt = "aub_styles-module_list_dd1ba", wt = "aub_styles-module_item_817c3", Wt = "aub_styles-module_ellipsis_45def", Bt = "aub_styles-module_control_216a4", Mt = "aub_styles-module_chevron_903a0", h = {
506
- root: Ot,
507
- range: zt,
508
- list: Rt,
509
- item: wt,
510
- ellipsis: Wt,
511
- control: Bt,
512
- chevron: Mt
513
- }, Ft = (e, t, a, s) => e.replaceAll("{from}", String(t)).replaceAll("{to}", String(a)).replaceAll("{total}", String(s)), Vt = (e, t) => e.replaceAll("{page}", String(t)), jt = (e, t, a, s, o, n) => e === "ellipsis" ? /* @__PURE__ */ l("li", { className: h.ellipsis, "aria-hidden": !0, children: "…" }, n) : e === t ? /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("span", { className: h.item, "aria-current": "page", children: e }) }, e) : /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
514
- "button",
515
- {
516
- type: "button",
517
- className: h.item,
518
- "aria-label": Vt(o, e),
519
- disabled: a,
520
- onClick: () => s(e),
521
- children: e
522
- }
523
- ) }, e), ie = g(
524
- ({
525
- ref: e,
526
- page: t,
527
- pageCount: a,
528
- onPageChange: s,
529
- from: o,
530
- to: n,
531
- total: i,
532
- rangeLabel: u,
533
- prevLabel: r,
534
- nextLabel: d,
535
- disabled: c = !1,
536
- className: m,
537
- dataTestId: _,
538
- "aria-label": T = "Pagination",
539
- ...y
540
- }) => {
541
- const { paginationPrev: P, paginationNext: L, paginationPage: A, paginationRange: H } = E(), O = r ?? P, z = d ?? L, S = u ?? Ft(H, o, n, i), j = x(() => a >= 2 ? et(t, a) : [], [t, a]), _e = c || t <= 1 || a < 1, ye = c || t >= a || a < 1;
542
- return /* @__PURE__ */ v(
543
- "nav",
544
- {
545
- ...y,
546
- ref: e,
547
- className: b(h.root, W.bodyS, m),
548
- "aria-label": T,
549
- "data-test-id": _,
550
- children: [
551
- /* @__PURE__ */ l("span", { className: h.range, children: S }),
552
- /* @__PURE__ */ l(
553
- "button",
554
- {
555
- type: "button",
556
- className: h.control,
557
- "aria-label": O,
558
- disabled: _e,
559
- onClick: () => s(t - 1),
560
- children: /* @__PURE__ */ l(ke, { className: h.chevron })
561
- }
562
- ),
563
- j.length > 0 ? /* @__PURE__ */ l("ul", { className: h.list, children: j.map(
564
- (fe, ge) => jt(fe, t, c, s, A, `ellipsis-${ge}`)
565
- ) }) : null,
566
- /* @__PURE__ */ l(
567
- "button",
568
- {
569
- type: "button",
570
- className: h.control,
571
- "aria-label": z,
572
- disabled: ye,
573
- onClick: () => s(t + 1),
574
- children: /* @__PURE__ */ l(Se, { className: h.chevron })
575
- }
576
- )
577
- ]
578
- }
579
- );
580
- }
581
- );
582
- ie.displayName = "Table.Pagination";
583
- const Ut = "aub_styles-module_root_880a9", Dt = {
584
- root: Ut
585
- }, qt = 'button, a, input, textarea, select, label, [role="button"]', de = g(
586
- ({
587
- ref: e,
588
- children: t,
589
- checked: a = !1,
590
- disabled: s = !1,
591
- bottomBorder: o = !0,
592
- onClick: n,
593
- className: i,
594
- dataTestId: u,
595
- tabIndex: r,
596
- ...d
597
- }) => {
598
- const c = n != null && !s;
599
- return /* @__PURE__ */ l(
600
- "tr",
601
- {
602
- ...d,
603
- ref: e,
604
- onClick: s ? void 0 : (_) => {
605
- if (n?.(_), _.defaultPrevented || _.currentTarget.closest("tbody") == null) return;
606
- const { target: T } = _;
607
- !(T instanceof Element) || T.closest(qt) || _.currentTarget.querySelector('input[type="checkbox"]:not(:disabled)')?.click();
608
- },
609
- tabIndex: c ? r ?? 0 : r,
610
- className: b(Dt.root, i),
611
- "data-checked": a || void 0,
612
- "data-disabled": s || void 0,
613
- "data-bottom-border": o ? void 0 : "false",
614
- "data-clickable": c || void 0,
615
- "aria-disabled": s || void 0,
616
- "data-test-id": u,
617
- children: t
618
- }
619
- );
620
- }
621
- );
622
- de.displayName = "Table.Row";
623
- const Gt = "aub_styles-module_root_4a623", Yt = "aub_styles-module_scroll_fd039", Jt = "aub_styles-module_block_5507d", Kt = "aub_styles-module_table_4f242", Qt = "aub_styles-module_hasChecked_5267f", Xt = "aub_styles-module_zebra_6672f", Zt = "aub_styles-module_sm_8a2a2", ea = "aub_styles-module_md_72133", ta = "aub_styles-module_lg_df04a", N = {
624
- root: Gt,
625
- scroll: Yt,
626
- block: Jt,
627
- table: Kt,
628
- hasChecked: Qt,
629
- zebra: Xt,
630
- sm: Zt,
631
- md: ea,
632
- lg: ta
633
- }, aa = w(N.root, {
634
- variants: {
635
- size: {
636
- sm: N.sm,
637
- md: N.md,
638
- lg: N.lg
639
- },
640
- block: {
641
- true: N.block,
642
- false: null
643
- },
644
- hasChecked: {
645
- true: N.hasChecked,
646
- false: null
647
- },
648
- zebra: {
649
- true: N.zebra,
650
- false: null
651
- }
652
- },
653
- defaultVariants: {
654
- size: "md",
655
- block: !0,
656
- hasChecked: !1,
657
- zebra: !1
658
- }
659
- }), la = N.scroll, sa = b(N.table, W.bodyS), ue = g(({ ref: e, children: t, className: a, dataTestId: s, ...o }) => /* @__PURE__ */ l("div", { ...o, ref: e, className: b(la, a), "data-test-id": s, children: t }));
660
- ue.displayName = "Table.Scroll";
661
- const me = g(({ ref: e, children: t, className: a, dataTestId: s, ...o }) => /* @__PURE__ */ l("table", { ...o, ref: e, className: b(sa, a), "data-test-id": s, children: t }));
662
- me.displayName = "Table.Table";
663
- const be = g(
664
- ({
665
- ref: e,
666
- children: t,
667
- size: a = "md",
668
- block: s = !0,
669
- hasChecked: o = !1,
670
- zebra: n = !1,
671
- className: i,
672
- dataTestId: u,
673
- ...r
674
- }) => {
675
- const d = x(() => ({ size: a, hasChecked: o }), [a, o]);
676
- return /* @__PURE__ */ l(Z.Provider, { value: d, children: /* @__PURE__ */ l(
677
- "div",
678
- {
679
- ...r,
680
- ref: e,
681
- className: b(aa({ size: a, block: s, hasChecked: o, zebra: n }), i),
682
- "data-size": a,
683
- "data-has-checked": o || void 0,
684
- "data-zebra": n || void 0,
685
- "data-test-id": u,
686
- children: t
687
- }
688
- ) });
689
- }
690
- );
691
- be.displayName = "Table";
692
- const ha = Object.assign(be, {
693
- Scroll: ue,
694
- Table: me,
695
- Header: oe,
696
- Body: te,
697
- Footer: le,
698
- Row: de,
699
- Cell: M,
700
- HeaderCell: V,
701
- CheckboxCell: ae,
702
- HeaderCheckboxCell: re,
703
- ActionBar: ee,
704
- SortIndicator: F,
705
- Pagination: ie,
706
- PageSize: ce
707
- });
708
- export {
709
- ha as T,
710
- B as u
711
- };
712
- //# sourceMappingURL=Component-DmKmX7so.js.map