@konstructio/ui 0.1.2-alpha.119 → 0.1.2-alpha.120

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 (135) hide show
  1. package/dist/Breadcrumb-DDRmDlWK.js +93 -0
  2. package/dist/{Checkbox-DRdyrKjk.js → Checkbox-DrounE52.js} +2 -2
  3. package/dist/{CollapsedSteps-CR7oCTRC.js → CollapsedSteps-DvBeYShi.js} +3 -3
  4. package/dist/{CommandInput-Du2o616y.js → CommandInput-_vujzQ6B.js} +2 -2
  5. package/dist/{Counter-DMkXIsOO.js → Counter-LQ5_uh06.js} +2 -2
  6. package/dist/{DayPicker-BtpJg2q3.js → DayPicker-D7KFB2bI.js} +383 -383
  7. package/dist/DropdownButton-BWfWN4fg.js +121 -0
  8. package/dist/{HamburgerTrigger-BgeS_nBA.js → HamburgerTrigger-CfrAnhmG.js} +10 -10
  9. package/dist/{Input-2M2I_H60.js → Input-O2bqyJKW.js} +2 -2
  10. package/dist/Modal-B-l4ii6w.js +84 -0
  11. package/dist/{Wrapper-JmStmade.js → Wrapper-B5PmrW4J.js} +3 -3
  12. package/dist/{Wrapper-ThpRi_Gg.js → Wrapper-CZCSSCLm.js} +2 -2
  13. package/dist/components/Alert/Alert.js +1 -1
  14. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  15. package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +1 -1
  16. package/dist/components/Breadcrumb/components/index.js +1 -1
  17. package/dist/components/Button/Button.variants.js +1 -0
  18. package/dist/components/Checkbox/Checkbox.js +1 -1
  19. package/dist/components/CheckboxCard/CheckboxCard.js +1 -1
  20. package/dist/components/Command/components/CommandInput.js +1 -1
  21. package/dist/components/Command/components/DialogContent.js +1 -1
  22. package/dist/components/Command/components/index.js +1 -1
  23. package/dist/components/ConfirmDialog/ConfirmDialog.js +7 -5
  24. package/dist/components/CopyButton/CopyButton.variants.js +3 -1
  25. package/dist/components/Counter/Counter.js +1 -1
  26. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +1 -1
  27. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
  28. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
  29. package/dist/components/Datepicker/components/DatePickerContent/DatePickerContent.js +1 -1
  30. package/dist/components/Drawer/Drawer.js +78 -58
  31. package/dist/components/Drawer/Drawer.variants.js +40 -22
  32. package/dist/components/Drawer/components/Footer/Footer.js +5 -5
  33. package/dist/components/Drawer/constants/index.js +5 -4
  34. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  35. package/dist/components/DropdownButton/components/ActionSheet/ActionSheet.js +34 -0
  36. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  37. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
  38. package/dist/components/Filter/utils/index.js +2 -2
  39. package/dist/components/Input/Input.js +1 -1
  40. package/dist/components/Input/Input.variants.js +1 -0
  41. package/dist/components/LineChart/components/LineChartContent/LineChartContent.js +1 -1
  42. package/dist/components/Modal/Modal.js +1 -1
  43. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  44. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +12 -6
  45. package/dist/components/Modal/components/index.js +1 -1
  46. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  47. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  48. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  49. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  50. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +1 -1
  51. package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.js +2 -2
  52. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
  53. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  54. package/dist/components/PhoneNumberInput/components/index.js +1 -1
  55. package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
  56. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  57. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  58. package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +1 -1
  59. package/dist/components/Select/Select.variants.js +2 -0
  60. package/dist/components/Select/components/List/List.js +2 -2
  61. package/dist/components/Sheet/Sheet.js +130 -0
  62. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  63. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +103 -86
  64. package/dist/components/Sidebar/components/index.js +1 -1
  65. package/dist/components/Table/components/Filter.js +1 -1
  66. package/dist/components/Tabs/components/Trigger.js +13 -13
  67. package/dist/components/TagSelect/TagSelect.js +1 -1
  68. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  69. package/dist/components/TagSelect/components/index.js +1 -1
  70. package/dist/components/TextArea/TextArea.variants.js +1 -0
  71. package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +7 -7
  72. package/dist/components/VirtualizedTable/components/Body/Body.js +47 -44
  73. package/dist/components/VirtualizedTable/components/Filter/Filter.js +68 -68
  74. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  75. package/dist/components/VirtualizedTable/components/Header/Header.js +38 -31
  76. package/dist/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.js +75 -0
  77. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +42 -35
  78. package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +72 -72
  79. package/dist/components/VirtualizedTable/components/index.js +14 -12
  80. package/dist/components/VirtualizedTable/constants/index.js +5 -3
  81. package/dist/components/VirtualizedTable/constants/responsive.js +10 -0
  82. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  83. package/dist/components/VirtualizedTable/contexts/table.context.js +4 -0
  84. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  85. package/dist/components/VirtualizedTable/utils/index.js +8 -4
  86. package/dist/components/VirtualizedTable/utils/pinned-columns/index.js +6 -0
  87. package/dist/components/VirtualizedTable/utils/pinned-columns/pinned-columns.js +32 -0
  88. package/dist/components/index.js +147 -145
  89. package/dist/{components-B_SWqhCL.js → components-Bq71eyUH.js} +1 -1
  90. package/dist/{country-locale-map-DbrJ3bEE.js → country-locale-map-BQYYErun.js} +1407 -1407
  91. package/dist/{debounce-dMRJxNsT.js → debounce-DhCY9mXz.js} +2 -2
  92. package/dist/{dist-Dg3vyTx9.js → dist-BCqfbYE9.js} +1356 -1317
  93. package/dist/dist-CMqY_9n-.js +445 -0
  94. package/dist/{es2015-B_07N-UL.js → es2015-BvX7Yq5Q.js} +2 -2
  95. package/dist/index.js +158 -156
  96. package/dist/{isSymbol-BG9higgO.js → isSymbol-CcfkyZfq.js} +1 -1
  97. package/dist/lib/components/Drawer/Drawer.types.d.ts +10 -0
  98. package/dist/lib/components/Drawer/Drawer.variants.d.ts +1 -0
  99. package/dist/lib/components/Drawer/constants/index.d.ts +1 -0
  100. package/dist/lib/components/DropdownButton/DropdownButton.d.ts +2 -1
  101. package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +25 -0
  102. package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.d.ts +7 -0
  103. package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.types.d.ts +12 -0
  104. package/dist/lib/components/Modal/Modal.types.d.ts +2 -0
  105. package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -0
  106. package/dist/lib/components/Sheet/Sheet.d.ts +21 -0
  107. package/dist/lib/components/Sheet/Sheet.types.d.ts +39 -0
  108. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +9 -0
  109. package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +11 -2
  110. package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.d.ts +10 -0
  111. package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.types.d.ts +6 -0
  112. package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +1 -1
  113. package/dist/lib/components/VirtualizedTable/components/index.d.ts +1 -0
  114. package/dist/lib/components/VirtualizedTable/constants/index.d.ts +1 -0
  115. package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +2 -0
  116. package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +4 -0
  117. package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
  118. package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +2 -1
  119. package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
  120. package/dist/lib/components/VirtualizedTable/utils/pinned-columns/index.d.ts +1 -0
  121. package/dist/lib/components/VirtualizedTable/utils/pinned-columns/pinned-columns.d.ts +23 -0
  122. package/dist/lib/components/index.d.ts +3 -1
  123. package/dist/{libphonenumber-DtibHRPP.js → libphonenumber-BIeQOhzl.js} +196 -164
  124. package/dist/package.json +18 -18
  125. package/dist/{phone-number.provider-DnuL-yYF.js → phone-number.provider-CJeivoDY.js} +2 -2
  126. package/dist/{prop-types-BCUW56rg.js → prop-types-qsAjMBb1.js} +1 -1
  127. package/dist/{rolldown-runtime-Dw9YIBcH.js → rolldown-runtime-B28h4lGi.js} +6 -6
  128. package/dist/styles.css +1 -1
  129. package/dist/{table.provider-CzfMGbe4.js → table.provider-QUo2buYX.js} +561 -523
  130. package/dist/{x-Vur_9PXW.js → x-BmNOD9Gr.js} +2 -2
  131. package/package.json +18 -18
  132. package/dist/Breadcrumb-CpXRb08J.js +0 -93
  133. package/dist/DropdownButton-JilCRLJY.js +0 -92
  134. package/dist/Modal-0Wp5szX4.js +0 -84
  135. package/dist/dist-BCoDIdCt.js +0 -429
@@ -1,5 +1,5 @@
1
- import { o as u } from "./rolldown-runtime-Dw9YIBcH.js";
2
- import { t as c } from "./prop-types-BCUW56rg.js";
1
+ import { o as u } from "./rolldown-runtime-B28h4lGi.js";
2
+ import { t as c } from "./prop-types-qsAjMBb1.js";
3
3
  import l, { forwardRef as m } from "react";
4
4
  var a = /* @__PURE__ */ u(c());
5
5
  function p() {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.2-alpha.119",
5
+ "version": "0.1.2-alpha.120",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
@@ -92,17 +92,17 @@
92
92
  "@react-input/mask": "^2.0.4",
93
93
  "@tanstack/react-table": "^8.21.3",
94
94
  "@tanstack/react-virtual": "^3.14.18",
95
- "chart.js": "^4.5.1",
95
+ "chart.js": "^4.6.1",
96
96
  "class-variance-authority": "^0.7.1",
97
97
  "clsx": "^2.1.1",
98
98
  "cmdk": "^1.1.1",
99
99
  "countries-and-timezones": "^3.11.0",
100
100
  "country-flag-icons": "^1.6.20",
101
101
  "country-locale-map": "^1.9.14",
102
- "google-libphonenumber": "^3.2.47",
102
+ "google-libphonenumber": "^3.2.48",
103
103
  "i18n-iso-countries": "^7.14.0",
104
104
  "js-cookie": "^3.0.8",
105
- "lucide-react": "^1.59.0",
105
+ "lucide-react": "^1.62.0",
106
106
  "react-chartjs-2": "^5.3.1",
107
107
  "react-day-picker": "^10.0.2",
108
108
  "react-feather": "^2.0.10",
@@ -145,46 +145,46 @@
145
145
  },
146
146
  "devDependencies": {
147
147
  "@faker-js/faker": "^10.6.0",
148
- "@rollup/plugin-alias": "^6.0.0",
149
- "@storybook/addon-docs": "^10.6.2",
150
- "@storybook/addon-links": "^10.6.2",
151
- "@storybook/react-vite": "^10.6.2",
148
+ "@rollup/plugin-alias": "^6.0.1",
149
+ "@storybook/addon-docs": "^10.6.5",
150
+ "@storybook/addon-links": "^10.6.5",
151
+ "@storybook/react-vite": "^10.6.5",
152
152
  "@tailwindcss/vite": "^4.3.3",
153
- "@tanstack/react-query": "^5.104.5",
153
+ "@tanstack/react-query": "^5.105.0",
154
154
  "@testing-library/jest-dom": "^7.0.1",
155
155
  "@testing-library/react": "^16.3.3",
156
156
  "@testing-library/user-event": "^14.6.8",
157
157
  "@types/google-libphonenumber": "^7.4.31",
158
158
  "@types/jest-axe": "^3.5.9",
159
159
  "@types/js-cookie": "^3.0.6",
160
- "@types/lodash": "^4.17.26",
160
+ "@types/lodash": "^4.17.27",
161
161
  "@types/react": "^19.3.0",
162
162
  "@types/react-dom": "^19.3.0",
163
- "@typescript-eslint/eslint-plugin": "^8.72.0",
164
- "@typescript-eslint/parser": "^8.72.0",
163
+ "@typescript-eslint/eslint-plugin": "^8.72.1",
164
+ "@typescript-eslint/parser": "^8.72.1",
165
165
  "@vitejs/plugin-react": "^6.1.2",
166
166
  "@vitest/coverage-v8": "^5.0.5",
167
- "autoprefixer": "^10.6.1",
167
+ "autoprefixer": "^10.6.2",
168
168
  "eslint": "^9.39.5",
169
169
  "eslint-plugin-react": "^7.37.5",
170
170
  "eslint-plugin-react-hooks": "^7.1.1",
171
171
  "eslint-plugin-react-refresh": "^0.5.7",
172
- "eslint-plugin-storybook": "^10.6.2",
172
+ "eslint-plugin-storybook": "^10.6.5",
173
173
  "eslint-plugin-vitest": "^0.5.4",
174
174
  "glob": "^13.0.6",
175
175
  "husky": "^9.1.7",
176
176
  "jest-axe": "^11.0.0",
177
177
  "jsdom": "^30.1.3",
178
178
  "lodash": "^4.18.1",
179
- "motion": "^14.4.0",
180
- "postcss": "^8.5.31",
179
+ "motion": "^14.7.1",
180
+ "postcss": "^8.5.32",
181
181
  "prettier": "^3.9.10",
182
182
  "rimraf": "^6.1.3",
183
- "storybook": "^10.6.2",
183
+ "storybook": "^10.6.5",
184
184
  "tailwindcss": "^4.3.3",
185
185
  "ts-node": "^10.9.2",
186
186
  "typescript": "^6.0.3",
187
- "vite": "^8.3.4",
187
+ "vite": "^8.3.5",
188
188
  "vite-plugin-dts": "^5.1.2",
189
189
  "vite-plugin-lib-inject-css": "^2.2.2",
190
190
  "vite-plugin-svgr": "^5.2.0",
@@ -1,93 +0,0 @@
1
- import { o as N } from "./rolldown-runtime-Dw9YIBcH.js";
2
- import { t as S } from "./prop-types-BCUW56rg.js";
3
- import { t as x } from "./CollapsedSteps-CR7oCTRC.js";
4
- import { t as b } from "./utils-DnIJruo0.js";
5
- import { breadcrumbVariants as k, breadcrumbWrapperVariants as z } from "./components/Breadcrumb/Breadcrumb.variants.js";
6
- import { BackButton as C } from "./components/Breadcrumb/components/BackButton/BackButton.js";
7
- import { Item as P } from "./components/Breadcrumb/components/Item/Item.js";
8
- import y, { Fragment as $, forwardRef as E, useId as L } from "react";
9
- import { Fragment as R, jsx as i, jsxs as f } from "react/jsx-runtime";
10
- var s = /* @__PURE__ */ N(S());
11
- function d() {
12
- return d = Object.assign || function(r) {
13
- for (var a = 1; a < arguments.length; a++) {
14
- var o = arguments[a];
15
- for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (r[t] = o[t]);
16
- }
17
- return r;
18
- }, d.apply(this, arguments);
19
- }
20
- function W(r, a) {
21
- if (r == null) return {};
22
- var o = B(r, a), t, e;
23
- if (Object.getOwnPropertySymbols) {
24
- var n = Object.getOwnPropertySymbols(r);
25
- for (e = 0; e < n.length; e++)
26
- t = n[e], !(a.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(r, t) && (o[t] = r[t]);
27
- }
28
- return o;
29
- }
30
- function B(r, a) {
31
- if (r == null) return {};
32
- for (var o = {}, t = Object.keys(r), e, n = 0; n < t.length; n++)
33
- e = t[n], !(a.indexOf(e) >= 0) && (o[e] = r[e]);
34
- return o;
35
- }
36
- var c = E(function(r, a) {
37
- var o = r.color, t = o === void 0 ? "currentColor" : o, e = r.size, n = e === void 0 ? 24 : e, l = W(r, ["color", "size"]);
38
- return /* @__PURE__ */ y.createElement("svg", d({
39
- ref: a,
40
- xmlns: "http://www.w3.org/2000/svg",
41
- width: n,
42
- height: n,
43
- viewBox: "0 0 24 24",
44
- fill: "none",
45
- stroke: t,
46
- strokeWidth: "2",
47
- strokeLinecap: "round",
48
- strokeLinejoin: "round"
49
- }, l), /* @__PURE__ */ y.createElement("polyline", { points: "9 18 15 12 9 6" }));
50
- });
51
- c.propTypes = {
52
- color: s.default.string,
53
- size: s.default.oneOfType([s.default.string, s.default.number])
54
- };
55
- c.displayName = "ChevronRight";
56
- var J = ({ "aria-label": r = "breadcrumb", backButton: a, className: o, collapsedLabel: t = "Show hidden steps", maxVisibleItems: e, steps: n, theme: l, wrapperClassName: w, ...O }) => {
57
- const j = L(), h = e !== void 0 && e >= 2 && n.length > e, u = n.length - (e ?? 0) + 1, g = h ? n.slice(1, u) : [], p = h ? [n[0], ...n.slice(u)] : n;
58
- return /* @__PURE__ */ f("nav", {
59
- "aria-label": r,
60
- "data-theme": l,
61
- className: b(z({ className: w })),
62
- children: [a && /* @__PURE__ */ i(C, {
63
- ...a,
64
- theme: l
65
- }), /* @__PURE__ */ i("ol", {
66
- className: b(k({ className: o })),
67
- ...O,
68
- children: p.map(({ label: v, ..._ }, m) => /* @__PURE__ */ f($, { children: [
69
- /* @__PURE__ */ i(P, {
70
- ..._,
71
- label: v,
72
- isLast: m === p.length - 1
73
- }),
74
- m !== p.length - 1 && /* @__PURE__ */ i("li", {
75
- "aria-hidden": "true",
76
- className: "flex items-center",
77
- children: /* @__PURE__ */ i(c, { className: "text-gray-400 w-5 h-5" })
78
- }),
79
- m === 0 && g.length > 0 && /* @__PURE__ */ f(R, { children: [/* @__PURE__ */ i(x, {
80
- label: t,
81
- steps: g
82
- }), /* @__PURE__ */ i("li", {
83
- "aria-hidden": "true",
84
- className: "flex items-center",
85
- children: /* @__PURE__ */ i(c, { className: "text-gray-400 w-5 h-5" })
86
- })] })
87
- ] }, `${j}-${v}`))
88
- })]
89
- });
90
- };
91
- export {
92
- J as t
93
- };
@@ -1,92 +0,0 @@
1
- import { o as b } from "./rolldown-runtime-Dw9YIBcH.js";
2
- import { t as O } from "./prop-types-BCUW56rg.js";
3
- import { t as s } from "./utils-DnIJruo0.js";
4
- import { LoaderIcon as j } from "./assets/icons/components/Loader.js";
5
- import { Button as x } from "./components/Button/Button.js";
6
- import { i as _, n as D, r as k, t as z } from "./dist-BCoDIdCt.js";
7
- import m, { forwardRef as N } from "react";
8
- import { jsx as i, jsxs as c } from "react/jsx-runtime";
9
- var l = /* @__PURE__ */ b(O());
10
- function f() {
11
- return f = Object.assign || function(e) {
12
- for (var n = 1; n < arguments.length; n++) {
13
- var o = arguments[n];
14
- for (var r in o) Object.prototype.hasOwnProperty.call(o, r) && (e[r] = o[r]);
15
- }
16
- return e;
17
- }, f.apply(this, arguments);
18
- }
19
- function C(e, n) {
20
- if (e == null) return {};
21
- var o = M(e, n), r, t;
22
- if (Object.getOwnPropertySymbols) {
23
- var a = Object.getOwnPropertySymbols(e);
24
- for (t = 0; t < a.length; t++)
25
- r = a[t], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
26
- }
27
- return o;
28
- }
29
- function M(e, n) {
30
- if (e == null) return {};
31
- for (var o = {}, r = Object.keys(e), t, a = 0; a < r.length; a++)
32
- t = r[a], !(n.indexOf(t) >= 0) && (o[t] = e[t]);
33
- return o;
34
- }
35
- var u = N(function(e, n) {
36
- var o = e.color, r = o === void 0 ? "currentColor" : o, t = e.size, a = t === void 0 ? 24 : t, p = C(e, ["color", "size"]);
37
- return /* @__PURE__ */ m.createElement("svg", f({
38
- ref: n,
39
- xmlns: "http://www.w3.org/2000/svg",
40
- width: a,
41
- height: a,
42
- viewBox: "0 0 24 24",
43
- fill: "none",
44
- stroke: r,
45
- strokeWidth: "2",
46
- strokeLinecap: "round",
47
- strokeLinejoin: "round"
48
- }, p), /* @__PURE__ */ m.createElement("polyline", { points: "6 9 12 15 18 9" }));
49
- });
50
- u.propTypes = {
51
- color: l.default.string,
52
- size: l.default.oneOfType([l.default.string, l.default.number])
53
- };
54
- u.displayName = "ChevronDown";
55
- var $ = ({ appearance: e, buttonClassName: n, className: o, disabled: r = !1, isLoading: t = !1, itemClassName: a, label: p = "Download Invoice as", listClassName: h, options: g, variant: v, version: w }) => /* @__PURE__ */ i(z, {
56
- modal: !1,
57
- children: /* @__PURE__ */ c("div", {
58
- className: s("relative w-full", o),
59
- children: [/* @__PURE__ */ i(_, {
60
- asChild: !0,
61
- disabled: r || t,
62
- children: /* @__PURE__ */ c(x, {
63
- appearance: e,
64
- variant: v,
65
- version: w,
66
- disabled: r || t,
67
- "aria-busy": t || void 0,
68
- className: s("group flex gap-2 items-center justify-between w-full", n),
69
- children: [p, t ? /* @__PURE__ */ i(j, {
70
- size: 16,
71
- className: "animate-spin shrink-0"
72
- }) : /* @__PURE__ */ i(u, { className: "transition-transform duration-200 group-data-[state=open]:rotate-180" })]
73
- })
74
- }), /* @__PURE__ */ i(D, {
75
- align: "start",
76
- sideOffset: 4,
77
- loop: !0,
78
- className: s("z-10 bg-white border border-gray-200 rounded shadow-xs animate-in fade-in-0 py-2", h),
79
- style: { width: "var(--radix-dropdown-menu-trigger-width)" },
80
- children: g.map((d, y) => /* @__PURE__ */ i(k, {
81
- className: s("hover:bg-gray-50 focus:bg-gray-50 outline-none px-6 py-1.5 hover:cursor-pointer", a),
82
- onSelect: () => {
83
- d.onClick?.();
84
- },
85
- children: d.label
86
- }, y))
87
- })]
88
- })
89
- });
90
- export {
91
- $ as t
92
- };
@@ -1,84 +0,0 @@
1
- import { t as A } from "./x-Vur_9PXW.js";
2
- import { t as H } from "./dist-C_jtUTU9.js";
3
- import { t as h } from "./utils-DnIJruo0.js";
4
- import { t as x } from "./Combination-CnMM05mt.js";
5
- import { Body as B } from "./components/Modal/components/Body/Body.js";
6
- import { Footer as C } from "./components/Modal/components/Footer/Footer.js";
7
- import { Header as E } from "./components/Modal/components/Header/Header.js";
8
- import { t as R } from "./es2015-B_07N-UL.js";
9
- import { buttonCloseVariants as V, modalVariants as j } from "./components/Modal/components/Wrapper/Wrapper.variants.js";
10
- import { Children as d, isValidElement as l, useEffect as g, useRef as D, useState as S } from "react";
11
- import { createPortal as z } from "react-dom";
12
- import { Fragment as I, jsx as a, jsxs as m } from "react/jsx-runtime";
13
- import { motion as K } from "motion/react";
14
- var L = ({ animateResize: c = !1, ariaLabel: n, ariaLabelledBy: s, autoFocus: i = !0, buttonCloseClassName: f, children: r, className: u, containerClassName: p, showCloseButton: o = !0, theme: y, transition: b, onClose: v }) => {
15
- const F = d.toArray(r).find((e) => l(e) && e.type === t.Header), N = d.toArray(r).find((e) => l(e) && e.type === t.Body), k = d.toArray(r).find((e) => l(e) && e.type === t.Footer), w = d.toArray(r).filter((e) => !l(e) || ![
16
- t.Header,
17
- t.Body,
18
- t.Footer
19
- ].includes(e.type));
20
- return /* @__PURE__ */ a(x, { children: /* @__PURE__ */ m("div", {
21
- className: h("fixed inset-0 grid place-content-center", p),
22
- "data-theme": y,
23
- children: [/* @__PURE__ */ a("div", {
24
- className: "absolute inset-0 bg-black opacity-70 dark:opacity-85 animate-in fade-in-0",
25
- onClick: v,
26
- role: "presentation"
27
- }), /* @__PURE__ */ a(R, {
28
- returnFocus: !0,
29
- autoFocus: i,
30
- className: "contents",
31
- children: /* @__PURE__ */ m(K.div, {
32
- className: h(j({ className: u })),
33
- role: "dialog",
34
- "aria-modal": "true",
35
- "aria-label": n,
36
- "aria-labelledby": s,
37
- layout: c ? "size" : void 0,
38
- transition: b ?? {
39
- duration: 0.25,
40
- ease: "easeInOut"
41
- },
42
- children: [
43
- F,
44
- o && /* @__PURE__ */ m("button", {
45
- className: h(V({ className: f })),
46
- onClick: v,
47
- children: [/* @__PURE__ */ a(A, {}), /* @__PURE__ */ a(H, { children: "Dismiss modal" })]
48
- }),
49
- N ?? w,
50
- k
51
- ]
52
- })
53
- })]
54
- }) });
55
- }, t = ({ isOpen: c, onClose: n, container: s, theme: i, ...f }) => {
56
- const r = D(null), [u, p] = S(null);
57
- return g(() => {
58
- if (!r.current || i || s) return;
59
- const o = r.current.closest("[data-theme]");
60
- o && p(o);
61
- }, [i, s]), g(() => {
62
- const o = new AbortController(), y = (b) => {
63
- b.code === "Escape" && n?.();
64
- };
65
- return window.addEventListener("keydown", y, { signal: o.signal }), () => {
66
- o.abort();
67
- };
68
- }, [n]), /* @__PURE__ */ m(I, { children: [/* @__PURE__ */ a("span", {
69
- ref: r,
70
- "data-testid": "modal-anchor",
71
- hidden: !0
72
- }), c && z(/* @__PURE__ */ a(L, {
73
- ...f,
74
- theme: i,
75
- onClose: n
76
- }), s || u || document.body)] });
77
- };
78
- t.Header = E;
79
- t.Body = B;
80
- t.Footer = C;
81
- export {
82
- L as n,
83
- t
84
- };