@dmsi/wedgekit-react 0.0.2

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 (263) hide show
  1. package/README.md +35 -0
  2. package/dist/chunk-27KIIUAR.js +59 -0
  3. package/dist/chunk-2G2E2JMA.js +123 -0
  4. package/dist/chunk-4C66DLIJ.js +51 -0
  5. package/dist/chunk-4RD5ZF2V.js +55 -0
  6. package/dist/chunk-4RJKB7LC.js +14 -0
  7. package/dist/chunk-4T7F5BZZ.js +26 -0
  8. package/dist/chunk-5GOBP2JS.js +53 -0
  9. package/dist/chunk-6ZY524ID.js +42 -0
  10. package/dist/chunk-AWQSSKCK.js +32 -0
  11. package/dist/chunk-BNHSAFMP.js +93 -0
  12. package/dist/chunk-BWRHL2AG.js +439 -0
  13. package/dist/chunk-DKKYR6DS.js +132 -0
  14. package/dist/chunk-E5ALT5W7.js +182 -0
  15. package/dist/chunk-FY7PTP6E.js +322 -0
  16. package/dist/chunk-GTCSRHPF.js +119 -0
  17. package/dist/chunk-I2UVVKQI.js +12 -0
  18. package/dist/chunk-IGQVA7SC.js +41 -0
  19. package/dist/chunk-K3IKUSZW.js +59 -0
  20. package/dist/chunk-KENSVWOY.js +151 -0
  21. package/dist/chunk-KX3O6GJ6.js +138 -0
  22. package/dist/chunk-L4UM372R.js +253 -0
  23. package/dist/chunk-ORMEWXMH.js +37 -0
  24. package/dist/chunk-Q3FKEKIN.js +23 -0
  25. package/dist/chunk-SEKKGFM6.js +28 -0
  26. package/dist/chunk-SY3HT54E.js +91 -0
  27. package/dist/chunk-TAW5ZZ4Z.js +346 -0
  28. package/dist/chunk-TRUPPHBQ.js +109 -0
  29. package/dist/chunk-TU55CHXU.js +30 -0
  30. package/dist/chunk-TWZZB4WO.js +114 -0
  31. package/dist/chunk-TYI74BSP.js +62 -0
  32. package/dist/chunk-U42SKNR6.js +104 -0
  33. package/dist/chunk-UU3FA6LV.js +72 -0
  34. package/dist/chunk-WVUIIBRR.js +51 -0
  35. package/dist/chunk-XUIPGYP5.js +39 -0
  36. package/dist/chunk-Z4UCFUF7.js +299 -0
  37. package/dist/components/Breadcrumbs.cjs +376 -0
  38. package/dist/components/Breadcrumbs.js +90 -0
  39. package/dist/components/Button.cjs +319 -0
  40. package/dist/components/Button.js +8 -0
  41. package/dist/components/CalendarRange.cjs +520 -0
  42. package/dist/components/CalendarRange.js +13 -0
  43. package/dist/components/Caption.cjs +283 -0
  44. package/dist/components/Caption.js +80 -0
  45. package/dist/components/Checkbox.cjs +378 -0
  46. package/dist/components/Checkbox.js +11 -0
  47. package/dist/components/ContentTab.cjs +382 -0
  48. package/dist/components/ContentTab.js +10 -0
  49. package/dist/components/ContentTabs.cjs +472 -0
  50. package/dist/components/ContentTabs.js +98 -0
  51. package/dist/components/DMSiLogo.cjs +79 -0
  52. package/dist/components/DMSiLogo.js +56 -0
  53. package/dist/components/DataGrid.cjs +3113 -0
  54. package/dist/components/DataGrid.js +758 -0
  55. package/dist/components/DataGridCell.cjs +1907 -0
  56. package/dist/components/DataGridCell.js +24 -0
  57. package/dist/components/DataTable.cjs +791 -0
  58. package/dist/components/DataTable.js +720 -0
  59. package/dist/components/DateInput.cjs +1130 -0
  60. package/dist/components/DateInput.js +170 -0
  61. package/dist/components/DateRangeInput.cjs +1131 -0
  62. package/dist/components/DateRangeInput.js +171 -0
  63. package/dist/components/DebugJson.cjs +50 -0
  64. package/dist/components/DebugJson.js +27 -0
  65. package/dist/components/Display.cjs +234 -0
  66. package/dist/components/Display.js +12 -0
  67. package/dist/components/EditingContext.cjs +73 -0
  68. package/dist/components/EditingContext.js +35 -0
  69. package/dist/components/FilterGroup.cjs +1431 -0
  70. package/dist/components/FilterGroup.js +231 -0
  71. package/dist/components/FullViewportBox.cjs +35 -0
  72. package/dist/components/FullViewportBox.js +12 -0
  73. package/dist/components/Grid.cjs +69 -0
  74. package/dist/components/Grid.js +36 -0
  75. package/dist/components/GridContainer.cjs +125 -0
  76. package/dist/components/GridContainer.js +92 -0
  77. package/dist/components/Heading.cjs +238 -0
  78. package/dist/components/Heading.js +14 -0
  79. package/dist/components/HorizontalDivider.cjs +33 -0
  80. package/dist/components/HorizontalDivider.js +10 -0
  81. package/dist/components/Icon.cjs +98 -0
  82. package/dist/components/Icon.js +7 -0
  83. package/dist/components/Input.cjs +672 -0
  84. package/dist/components/Input.js +21 -0
  85. package/dist/components/InputGroup.cjs +270 -0
  86. package/dist/components/InputGroup.js +60 -0
  87. package/dist/components/Label.cjs +223 -0
  88. package/dist/components/Label.js +8 -0
  89. package/dist/components/Link.cjs +262 -0
  90. package/dist/components/Link.js +8 -0
  91. package/dist/components/List.cjs +37 -0
  92. package/dist/components/List.js +14 -0
  93. package/dist/components/LiveChatComponent.cjs +63 -0
  94. package/dist/components/LiveChatComponent.js +40 -0
  95. package/dist/components/LogoAgilityTopBar.cjs +115 -0
  96. package/dist/components/LogoAgilityTopBar.js +92 -0
  97. package/dist/components/LogoDMSiTopBar.cjs +79 -0
  98. package/dist/components/LogoDMSiTopBar.js +7 -0
  99. package/dist/components/LogoMillworkTopBar.cjs +221 -0
  100. package/dist/components/LogoMillworkTopBar.js +198 -0
  101. package/dist/components/MainBar.cjs +211 -0
  102. package/dist/components/MainBar.js +65 -0
  103. package/dist/components/Menu.cjs +437 -0
  104. package/dist/components/Menu.js +11 -0
  105. package/dist/components/MenuOption.cjs +483 -0
  106. package/dist/components/MenuOption.js +13 -0
  107. package/dist/components/MobileDataGrid.cjs +658 -0
  108. package/dist/components/MobileDataGrid.js +125 -0
  109. package/dist/components/Modal.cjs +783 -0
  110. package/dist/components/Modal.js +245 -0
  111. package/dist/components/ModalButtons.cjs +385 -0
  112. package/dist/components/ModalButtons.js +10 -0
  113. package/dist/components/ModalContent.cjs +57 -0
  114. package/dist/components/ModalContent.js +7 -0
  115. package/dist/components/ModalHeader.cjs +426 -0
  116. package/dist/components/ModalHeader.js +11 -0
  117. package/dist/components/ModalScrim.cjs +64 -0
  118. package/dist/components/ModalScrim.js +7 -0
  119. package/dist/components/NavigationTab.cjs +431 -0
  120. package/dist/components/NavigationTab.js +10 -0
  121. package/dist/components/NavigationTabs.cjs +477 -0
  122. package/dist/components/NavigationTabs.js +56 -0
  123. package/dist/components/Notification.cjs +640 -0
  124. package/dist/components/Notification.js +117 -0
  125. package/dist/components/OptionPill.cjs +478 -0
  126. package/dist/components/OptionPill.js +11 -0
  127. package/dist/components/Paragraph.cjs +231 -0
  128. package/dist/components/Paragraph.js +8 -0
  129. package/dist/components/Password.cjs +700 -0
  130. package/dist/components/Password.js +53 -0
  131. package/dist/components/ProjectBar.cjs +242 -0
  132. package/dist/components/ProjectBar.js +63 -0
  133. package/dist/components/Radio.cjs +349 -0
  134. package/dist/components/Radio.js +131 -0
  135. package/dist/components/Search.cjs +767 -0
  136. package/dist/components/Search.js +12 -0
  137. package/dist/components/Select.cjs +758 -0
  138. package/dist/components/Select.js +12 -0
  139. package/dist/components/SideMenu.cjs +54 -0
  140. package/dist/components/SideMenu.js +21 -0
  141. package/dist/components/SideMenuGroup.cjs +422 -0
  142. package/dist/components/SideMenuGroup.js +83 -0
  143. package/dist/components/SideMenuItem.cjs +388 -0
  144. package/dist/components/SideMenuItem.js +70 -0
  145. package/dist/components/Stack.cjs +138 -0
  146. package/dist/components/Stack.js +7 -0
  147. package/dist/components/StatusPill.cjs +265 -0
  148. package/dist/components/StatusPill.js +52 -0
  149. package/dist/components/Stepper.cjs +885 -0
  150. package/dist/components/Stepper.js +105 -0
  151. package/dist/components/Subheader.cjs +226 -0
  152. package/dist/components/Subheader.js +8 -0
  153. package/dist/components/Surface.cjs +98 -0
  154. package/dist/components/Surface.js +40 -0
  155. package/dist/components/Swatch.cjs +1728 -0
  156. package/dist/components/Swatch.js +1319 -0
  157. package/dist/components/Textarea.cjs +269 -0
  158. package/dist/components/Textarea.js +96 -0
  159. package/dist/components/Theme.cjs +36 -0
  160. package/dist/components/Theme.js +7 -0
  161. package/dist/components/Time.cjs +1118 -0
  162. package/dist/components/Time.js +353 -0
  163. package/dist/components/Toast.cjs +644 -0
  164. package/dist/components/Toast.js +218 -0
  165. package/dist/components/Tooltip.cjs +273 -0
  166. package/dist/components/Tooltip.js +9 -0
  167. package/dist/components/TopBar.cjs +352 -0
  168. package/dist/components/TopBar.js +132 -0
  169. package/dist/components/useInfiniteScroll.cjs +57 -0
  170. package/dist/components/useInfiniteScroll.js +8 -0
  171. package/dist/components/useMatchesMedia.cjs +53 -0
  172. package/dist/components/useMatchesMedia.js +9 -0
  173. package/dist/components/useMenuSystem.cjs +358 -0
  174. package/dist/components/useMenuSystem.js +11 -0
  175. package/dist/components/useMounted.cjs +39 -0
  176. package/dist/components/useMounted.js +8 -0
  177. package/dist/fonts.css +21 -0
  178. package/dist/icons-light[FILL]-PPZXOLWS.woff2 +0 -0
  179. package/dist/icons-normal[FILL]-PPZXOLWS.woff2 +0 -0
  180. package/dist/index.css +4401 -0
  181. package/dist/open-sans-55T6A4JE.woff2 +0 -0
  182. package/dist/types.cjs +18 -0
  183. package/dist/types.js +0 -0
  184. package/package.json +66 -0
  185. package/src/brand.css +125 -0
  186. package/src/classNames.ts +144 -0
  187. package/src/components/Breadcrumbs.tsx +116 -0
  188. package/src/components/Button.tsx +210 -0
  189. package/src/components/CalendarRange.tsx +429 -0
  190. package/src/components/Caption.tsx +101 -0
  191. package/src/components/Checkbox.tsx +196 -0
  192. package/src/components/ContentTab.tsx +66 -0
  193. package/src/components/ContentTabs.tsx +103 -0
  194. package/src/components/DMSiLogo.tsx +32 -0
  195. package/src/components/DataGrid.tsx +948 -0
  196. package/src/components/DataGridCell.tsx +384 -0
  197. package/src/components/DataTable.tsx +835 -0
  198. package/src/components/DateInput.tsx +188 -0
  199. package/src/components/DateRangeInput.tsx +179 -0
  200. package/src/components/DebugJson.tsx +24 -0
  201. package/src/components/Display.tsx +60 -0
  202. package/src/components/EditingContext.tsx +40 -0
  203. package/src/components/FilterGroup.tsx +234 -0
  204. package/src/components/FullViewportBox.tsx +11 -0
  205. package/src/components/Grid.tsx +75 -0
  206. package/src/components/GridContainer.tsx +124 -0
  207. package/src/components/Heading.tsx +66 -0
  208. package/src/components/HorizontalDivider.tsx +3 -0
  209. package/src/components/Icon.tsx +36 -0
  210. package/src/components/Input.tsx +511 -0
  211. package/src/components/InputGroup.tsx +51 -0
  212. package/src/components/Label.tsx +40 -0
  213. package/src/components/Link.tsx +106 -0
  214. package/src/components/List.tsx +10 -0
  215. package/src/components/LiveChatComponent.tsx +56 -0
  216. package/src/components/LogoAgilityTopBar.tsx +53 -0
  217. package/src/components/LogoDMSiTopBar.tsx +32 -0
  218. package/src/components/LogoMillworkTopBar.tsx +118 -0
  219. package/src/components/MainBar.tsx +83 -0
  220. package/src/components/Menu.tsx +286 -0
  221. package/src/components/MenuOption.tsx +275 -0
  222. package/src/components/MobileDataGrid.tsx +135 -0
  223. package/src/components/Modal.tsx +271 -0
  224. package/src/components/ModalButtons.tsx +44 -0
  225. package/src/components/ModalContent.tsx +23 -0
  226. package/src/components/ModalHeader.tsx +41 -0
  227. package/src/components/ModalScrim.tsx +35 -0
  228. package/src/components/NavigationTab.tsx +89 -0
  229. package/src/components/NavigationTabs.tsx +63 -0
  230. package/src/components/Notification.tsx +120 -0
  231. package/src/components/OptionPill.tsx +114 -0
  232. package/src/components/Paragraph.tsx +49 -0
  233. package/src/components/Password.tsx +46 -0
  234. package/src/components/ProjectBar.tsx +76 -0
  235. package/src/components/Radio.tsx +140 -0
  236. package/src/components/Search.tsx +129 -0
  237. package/src/components/Select.tsx +104 -0
  238. package/src/components/SideMenu.tsx +21 -0
  239. package/src/components/SideMenuGroup.tsx +81 -0
  240. package/src/components/SideMenuItem.tsx +90 -0
  241. package/src/components/Stack.tsx +179 -0
  242. package/src/components/StatusPill.tsx +51 -0
  243. package/src/components/Stepper.tsx +91 -0
  244. package/src/components/Subheader.tsx +44 -0
  245. package/src/components/Surface.tsx +34 -0
  246. package/src/components/Swatch.tsx +1066 -0
  247. package/src/components/Textarea.tsx +101 -0
  248. package/src/components/Theme.tsx +13 -0
  249. package/src/components/Time.tsx +438 -0
  250. package/src/components/Toast.tsx +244 -0
  251. package/src/components/Tooltip.tsx +137 -0
  252. package/src/components/TopBar.tsx +124 -0
  253. package/src/components/useInfiniteScroll.tsx +40 -0
  254. package/src/components/useMatchesMedia.tsx +28 -0
  255. package/src/components/useMenuSystem.tsx +367 -0
  256. package/src/components/useMounted.tsx +14 -0
  257. package/src/darkmode.css +140 -0
  258. package/src/fonts.css +23 -0
  259. package/src/index.css +509 -0
  260. package/src/index.tsx +2 -0
  261. package/src/types.ts +149 -0
  262. package/src/utils/formatting.tsx +81 -0
  263. package/src/utils.ts +23 -0
@@ -0,0 +1,1431 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __getProtoOf = Object.getPrototypeOf;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues = (a, b) => {
15
+ for (var prop in b || (b = {}))
16
+ if (__hasOwnProp.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ if (__getOwnPropSymbols)
19
+ for (var prop of __getOwnPropSymbols(b)) {
20
+ if (__propIsEnum.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ }
23
+ return a;
24
+ };
25
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ var __export = (target, all) => {
39
+ for (var name in all)
40
+ __defProp(target, name, { get: all[name], enumerable: true });
41
+ };
42
+ var __copyProps = (to, from, except, desc) => {
43
+ if (from && typeof from === "object" || typeof from === "function") {
44
+ for (let key of __getOwnPropNames(from))
45
+ if (!__hasOwnProp.call(to, key) && key !== except)
46
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
47
+ }
48
+ return to;
49
+ };
50
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
51
+ // If the importer is in node compatibility mode or this is not an ESM
52
+ // file that has been converted to a CommonJS file using a Babel-
53
+ // compatible transform (i.e. "__esModule" has not been set), then set
54
+ // "default" to the CommonJS "module.exports" for node compatibility.
55
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
56
+ mod
57
+ ));
58
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
+
60
+ // src/components/FilterGroup.tsx
61
+ var FilterGroup_exports = {};
62
+ __export(FilterGroup_exports, {
63
+ FilterGroup: () => FilterGroup,
64
+ FilterGroupItem: () => FilterGroupItem
65
+ });
66
+ module.exports = __toCommonJS(FilterGroup_exports);
67
+ var import_react3 = require("react");
68
+
69
+ // src/components/Label.tsx
70
+ var import_clsx2 = __toESM(require("clsx"), 1);
71
+
72
+ // src/classNames.ts
73
+ var import_clsx = __toESM(require("clsx"), 1);
74
+ var typography = {
75
+ display1: (0, import_clsx.default)(
76
+ "font-sans font-semibold",
77
+ "text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
78
+ "leading-display-1-mobile desktop:leading-display-1-desktop"
79
+ ),
80
+ display2: (0, import_clsx.default)(
81
+ "font-sans font-bold",
82
+ "text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
83
+ "leading-display-2-mobile desktop:leading-display-2-desktop"
84
+ ),
85
+ heading1: (0, import_clsx.default)(
86
+ "font-sans font-semibold",
87
+ "text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
88
+ "leading-heading-1-mobile desktop:leading-heading-1-desktop"
89
+ ),
90
+ heading2: (0, import_clsx.default)(
91
+ "font-sans font-normal",
92
+ "text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
93
+ "leading-heading-2-mobile desktop:leading-heading-2-desktop"
94
+ ),
95
+ heading3: (0, import_clsx.default)(
96
+ "font-sans font-semibold",
97
+ "text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
98
+ "leading-heading-3-mobile desktop:leading-heading-3-desktop"
99
+ ),
100
+ subheader: (0, import_clsx.default)(
101
+ "font-sans font-semibold",
102
+ "text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
103
+ "leading-subheader-mobile desktop:leading-subheader-desktop"
104
+ ),
105
+ link: (0, import_clsx.default)(
106
+ "font-sans font-normal",
107
+ "text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
108
+ "leading-link-mobile desktop:leading-link-desktop"
109
+ ),
110
+ buttonLabel: (0, import_clsx.default)(
111
+ "font-sans font-semibold",
112
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
113
+ "leading-label-mobile desktop:leading-label-desktop"
114
+ ),
115
+ label: (0, import_clsx.default)(
116
+ "font-sans font-semibold",
117
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
118
+ "leading-label-mobile desktop:leading-label-desktop"
119
+ ),
120
+ paragraph: (0, import_clsx.default)(
121
+ "font-sans font-normal",
122
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
123
+ "leading-paragraph-mobile desktop:leading-paragraph-desktop"
124
+ ),
125
+ caption: (0, import_clsx.default)(
126
+ "font-sans font-normal",
127
+ "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
128
+ "leading-caption-mobile desktop:leading-caption-desktop"
129
+ )
130
+ };
131
+ var baseTransition = (0, import_clsx.default)(
132
+ "transition-colors duration-100 ease-in-out"
133
+ );
134
+ var componentGap = (0, import_clsx.default)(
135
+ "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
136
+ );
137
+ var paddingUsingComponentGap = (0, import_clsx.default)(
138
+ "p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
139
+ );
140
+ var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
141
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
142
+ );
143
+ var componentPadding = (0, import_clsx.default)(
144
+ "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
145
+ );
146
+ var componentPaddingBottom = (0, import_clsx.default)(
147
+ "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
148
+ );
149
+ var componentPaddingY = (0, import_clsx.default)(
150
+ "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
151
+ );
152
+ var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
153
+ "px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
154
+ );
155
+ var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
156
+ "py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
157
+ );
158
+ var componentPaddingMinusBorder = (0, import_clsx.default)(
159
+ "p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]"
160
+ );
161
+ var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
162
+ "p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]"
163
+ );
164
+ var layoutPaddingBottom = (0, import_clsx.default)(
165
+ "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
166
+ );
167
+ var layoutPaddingY = (0, import_clsx.default)(
168
+ "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
169
+ );
170
+ var containerPaddingX = (0, import_clsx.default)(
171
+ "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
172
+ );
173
+ var containerPaddingY = (0, import_clsx.default)(
174
+ "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
175
+ );
176
+ var layoutGroupGapPaddingY = (0, import_clsx.default)(
177
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
178
+ );
179
+ var layoutGroupGap = (0, import_clsx.default)(
180
+ "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
181
+ );
182
+ var layoutGap = (0, import_clsx.default)(
183
+ "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
184
+ );
185
+ var gapUsingContainerPadding = (0, import_clsx.default)(
186
+ "gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
187
+ );
188
+
189
+ // src/components/Label.tsx
190
+ var import_jsx_runtime = require("react/jsx-runtime");
191
+ var Label = (_a) => {
192
+ var _b = _a, {
193
+ as = "span",
194
+ padded,
195
+ className,
196
+ color,
197
+ align
198
+ } = _b, props = __objRest(_b, [
199
+ "as",
200
+ "padded",
201
+ "className",
202
+ "color",
203
+ "align"
204
+ ]);
205
+ const Element = as;
206
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
207
+ Element,
208
+ __spreadProps(__spreadValues({
209
+ className: (0, import_clsx2.default)(
210
+ typography.label,
211
+ align === "left" && "text-left",
212
+ align === "center" && "text-center",
213
+ align === "right" && "text-right",
214
+ className,
215
+ padded && componentPaddingXUsingComponentGap
216
+ )
217
+ }, props), {
218
+ style: __spreadProps(__spreadValues({}, props.style), {
219
+ color: color ? `var(--color-${color})` : void 0
220
+ })
221
+ })
222
+ );
223
+ };
224
+ Label.displayName = "Label";
225
+
226
+ // src/components/Checkbox.tsx
227
+ var import_clsx5 = __toESM(require("clsx"), 1);
228
+
229
+ // src/components/Icon.tsx
230
+ var import_clsx3 = __toESM(require("clsx"), 1);
231
+ var import_jsx_runtime2 = require("react/jsx-runtime");
232
+ function Icon(_a) {
233
+ var _b = _a, {
234
+ name,
235
+ size = 24,
236
+ variant = "outline"
237
+ } = _b, props = __objRest(_b, [
238
+ "name",
239
+ "size",
240
+ "variant"
241
+ ]);
242
+ const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
243
+ const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
244
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
245
+ "span",
246
+ __spreadProps(__spreadValues({}, props), {
247
+ className: (0, import_clsx3.default)(
248
+ "icon",
249
+ `icon-${size}`,
250
+ // size === 16 ? "font-normal" : "font-light", // size 16 font weight is not working as normal from before
251
+ props.className
252
+ ),
253
+ style: __spreadValues({
254
+ fontVariationSettings: variantStyle + `, ${weightStyle}`
255
+ }, props.style),
256
+ children: name
257
+ })
258
+ );
259
+ }
260
+
261
+ // src/components/Paragraph.tsx
262
+ var import_clsx4 = __toESM(require("clsx"), 1);
263
+ var import_jsx_runtime3 = require("react/jsx-runtime");
264
+ var Paragraph = (_a) => {
265
+ var _b = _a, {
266
+ className,
267
+ color,
268
+ padded,
269
+ align = "left",
270
+ tall,
271
+ addOverflow,
272
+ children,
273
+ as = "p"
274
+ } = _b, props = __objRest(_b, [
275
+ "className",
276
+ "color",
277
+ "padded",
278
+ "align",
279
+ "tall",
280
+ "addOverflow",
281
+ "children",
282
+ "as"
283
+ ]);
284
+ const Element = as;
285
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
286
+ Element,
287
+ __spreadProps(__spreadValues({}, props), {
288
+ className: (0, import_clsx4.default)(
289
+ typography.paragraph,
290
+ className,
291
+ padded && componentPaddingXUsingComponentGap,
292
+ align === "left" && "text-left",
293
+ align === "center" && "text-center",
294
+ align === "right" && "text-right",
295
+ tall && "!leading-6",
296
+ addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
297
+ ),
298
+ style: __spreadProps(__spreadValues({}, props.style), {
299
+ color: color ? `var(--color-${color})` : void 0
300
+ }),
301
+ children
302
+ })
303
+ );
304
+ };
305
+ Paragraph.displayName = "Paragraph";
306
+
307
+ // src/components/Checkbox.tsx
308
+ var import_jsx_runtime4 = require("react/jsx-runtime");
309
+ var Checkbox = (_a) => {
310
+ var _b = _a, {
311
+ label,
312
+ error,
313
+ disabled,
314
+ readOnly,
315
+ checked,
316
+ onChange,
317
+ indeterminate,
318
+ paragraphClassName
319
+ } = _b, props = __objRest(_b, [
320
+ "label",
321
+ "error",
322
+ "disabled",
323
+ "readOnly",
324
+ "checked",
325
+ "onChange",
326
+ "indeterminate",
327
+ "paragraphClassName"
328
+ ]);
329
+ const selected = indeterminate || checked;
330
+ const normalClassName = (0, import_clsx5.default)(
331
+ !selected && !error && !disabled && !readOnly && "border-border-primary-normal bg-background-action-secondary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active"
332
+ );
333
+ const normalSelectedClassName = (0, import_clsx5.default)(
334
+ selected && !error && !disabled && !readOnly && "bg-background-action-primary-normal border-background-action-primary-normal peer-hover:bg-background-action-primary-hover peer-hover:border-background-action-primary-hover peer-active:bg-background-action-primary-active peer-active:border-background-action-primary-active"
335
+ );
336
+ const errorClassName = (0, import_clsx5.default)(
337
+ error && !selected && "bg-background-action-critical-secondary-normal border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active"
338
+ );
339
+ const errorSelectedClassName = (0, import_clsx5.default)(
340
+ error && selected && "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal peer-hover:bg-background-action-critical-primary-hover peer-hover:border-background-action-critical-primary-hover peer-active:bg-background-action-critical-primary-active peer-active:border-background-action-critical-primary-active"
341
+ );
342
+ const disabledClassName = (0, import_clsx5.default)(
343
+ disabled && !readOnly && "border-border-primary-normal bg-background-action-secondary-disabled peer-checked:bg-icon-on-action-primary-disabled peer-checked:border-icon-on-action-primary-disabled"
344
+ );
345
+ const readOnlyClassName = (0, import_clsx5.default)(
346
+ readOnly && "border-transparent bg-transparent peer-checked:bg-transparent peer-checked:border-transparent"
347
+ );
348
+ const checkColor = (0, import_clsx5.default)(
349
+ selected && !disabled && !readOnly && "color-icon-on-action-primary-normal peer-hover:color-icon-on-action-primary-hover peer-active:color-icon-on-action-primary-active",
350
+ selected && disabled && "color-background-action-primary-disabled"
351
+ );
352
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
353
+ "label",
354
+ {
355
+ className: (0, import_clsx5.default)(
356
+ "flex items-center",
357
+ componentGap,
358
+ (disabled || readOnly && error || readOnly) && "cursor-default",
359
+ !(readOnly && error) && !disabled && !readOnly && "cursor-pointer"
360
+ ),
361
+ children: [
362
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "relative", children: [
363
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
364
+ "input",
365
+ __spreadValues({
366
+ type: "checkbox",
367
+ className: "sr-only peer",
368
+ disabled,
369
+ checked: selected,
370
+ onChange: handleOnChange,
371
+ id: props.id,
372
+ "data-indeterminate": indeterminate
373
+ }, props)
374
+ ),
375
+ error && (readOnly || disabled) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_clsx5.default)("size-6", "flex items-center justify-center"), children: selected ? indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "question_mark" }) }) : readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-success-400 contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "check" }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "check", className: "pointer-events-none" }) }) : readOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "close" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
376
+ "div",
377
+ {
378
+ className: (0, import_clsx5.default)(
379
+ "size-6 border rounded-base",
380
+ "flex items-center justify-center",
381
+ baseTransition,
382
+ normalClassName,
383
+ normalSelectedClassName,
384
+ errorClassName,
385
+ errorSelectedClassName,
386
+ disabledClassName,
387
+ readOnlyClassName,
388
+ checkColor
389
+ ),
390
+ children: selected ? indeterminate ? readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "question_mark" }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "remove", className: "pointer-events-none" }) }) : readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-success-400 contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "check" }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "check", className: "pointer-events-none" }) }) : readOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "close" }) })
391
+ }
392
+ )
393
+ ] }),
394
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
395
+ Paragraph,
396
+ {
397
+ as: "span",
398
+ padded: true,
399
+ className: (0, import_clsx5.default)(
400
+ "text-nowrap",
401
+ disabled && !error && "!text-text-primary-disabled",
402
+ error && !disabled && !readOnly && "!text-text-primary-error",
403
+ paragraphClassName
404
+ ),
405
+ children: label
406
+ }
407
+ )
408
+ ]
409
+ }
410
+ );
411
+ function handleOnChange(e) {
412
+ if (disabled || readOnly || readOnly && error || !onChange) {
413
+ return;
414
+ }
415
+ onChange(e);
416
+ }
417
+ };
418
+ Checkbox.displayName = "Checkbox";
419
+
420
+ // src/components/OptionPill.tsx
421
+ var import_clsx7 = __toESM(require("clsx"), 1);
422
+
423
+ // src/components/Button.tsx
424
+ var import_clsx6 = __toESM(require("clsx"), 1);
425
+ var import_jsx_runtime5 = require("react/jsx-runtime");
426
+ var Button = (_a) => {
427
+ var _b = _a, {
428
+ variant = "primary",
429
+ as = "button",
430
+ block,
431
+ leftIcon,
432
+ rightIcon,
433
+ className,
434
+ classNameLabel,
435
+ disabled = false,
436
+ children,
437
+ iconOnly = false,
438
+ colorClassName,
439
+ href
440
+ } = _b, props = __objRest(_b, [
441
+ "variant",
442
+ "as",
443
+ "block",
444
+ "leftIcon",
445
+ "rightIcon",
446
+ "className",
447
+ "classNameLabel",
448
+ "disabled",
449
+ "children",
450
+ "iconOnly",
451
+ "colorClassName",
452
+ "href"
453
+ ]);
454
+ const primaryVariantStyles = variant === "primary" && (0, import_clsx6.default)(
455
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
456
+ "bg-background-action-primary-normal border-background-action-primary-normal",
457
+ "hover:bg-background-action-primary-hover hover:border-background-action-primary-hover",
458
+ "focus:bg-background-action-primary-hover focus:border-background-action-primary-hover focus:outline-0",
459
+ "active:bg-background-action-primary-active active:border-background-action-primary-active",
460
+ "disabled:bg-background-action-primary-disabled disabled:border-background-action-primary-disabled disabled:text-text-on-action-primary-disabled"
461
+ );
462
+ const secondaryVariantStyles = variant === "secondary" && (0, import_clsx6.default)(
463
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
464
+ "bg-background-action-secondary-normal border-border-action-normal",
465
+ "hover:bg-background-action-secondary-hover hover:border-border-action-hover hover:text-text-action-primary-hover",
466
+ "focus:bg-background-action-secondary-hover focus:border-border-action-hover focus:text-text-action-primary-hover focus:outline-0",
467
+ "active:bg-background-action-secondary-active active:border-border-action-active active:text-text-action-primary-active",
468
+ "disabled:bg-background-action-primary-disabled disabled:border-border-action-disabled disabled:text-text-action-primary-disabled"
469
+ );
470
+ const tertiaryVariantStyles = variant === "tertiary" && (0, import_clsx6.default)(
471
+ "bg-transparent border-transparent",
472
+ iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
473
+ "bg-transparent border-transparent",
474
+ "hover:bg-background-action-secondary-hover hover:border-background-action-secondary-hover hover:text-text-action-primary-hover",
475
+ "focus:bg-background-action-secondary-hover focus:border-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
476
+ "active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
477
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
478
+ );
479
+ const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx6.default)(
480
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
481
+ "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
482
+ "hover:bg-background-action-critical-primary-hover hover:border-background-action-critical-primary-hover",
483
+ "focus:bg-background-action-critical-primary-hover focus:border-background-action-critical-primary-hover focus:outline-0",
484
+ "active:bg-background-action-critical-primary-active active:border-background-action-critical-primary-active",
485
+ "disabled:bg-background-action-critical-primary-disabled disabled:border-background-action-critical-primary-disabled disabled:text-text-on-action-primary-disabled"
486
+ );
487
+ const secondaryCriticalVariantStyles = variant === "secondary-critical" && (0, import_clsx6.default)(
488
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
489
+ "bg-background-action-critical-secondary-normal border-border-action-critical-normal",
490
+ "hover:bg-background-action-critical-secondary-hover hover:border-border-action-critical-hover hover:text-text-action-critical-hover",
491
+ "focus:bg-background-action-critical-secondary-hover focus:border-border-action-critical-hover focus:text-text-action-critical-hover focus:outline-0",
492
+ "active:bg-background-action-critical-secondary-active active:border-border-action-critical-active active:text-text-action-critical-active",
493
+ "disabled:bg-background-action-critical-disabled disabled:border-border-action-critical-disabled disabled:text-text-action-critical-disabled"
494
+ );
495
+ const tertiaryCriticalVariantStyles = variant === "tertiary-critical" && (0, import_clsx6.default)(
496
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
497
+ "bg-transparent border-transparent text-text-action-critical-normal",
498
+ "hover:bg-background-action-critical-secondary-hover hover:border-background-action-critical-secondary-hover hover:text-text-action-critical-hover",
499
+ "focus:bg-background-action-critical-secondary-hover focus:border-background-action-critical-secondary-hover focus:text-text-action-critical-hover focus:outline-0",
500
+ "active:bg-background-action-critical-secondary-active active:border-background-action-critical-secondary-active active:text-text-action-critical-active",
501
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-critical-disabled"
502
+ );
503
+ const navigationVarianStyles = variant === "navigation" && (0, import_clsx6.default)(
504
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
505
+ "bg-transparent",
506
+ "hover:bg-background-on-action-secondary-hover hover:text-brand-text-action-primary-hover",
507
+ // "hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover", // Will use this once colors are finalized
508
+ "focus:bg-background-on-action-secondary-hover focus:text-brand-text-action-primary-hover focus:outline-0",
509
+ // "focus:bg-background-action-secondary-hover focus:text-text-action-primary-hover", // Will use this once colors are finalized
510
+ "active:bg-background-on-action-secondary-active active:text-brand-text-action-primary-active",
511
+ // "active:bg-background-action-secondary-active active:text-text-action-primary-active", // Will use this once colors are finalized
512
+ "disabled:bg-transparent disabled:text-text-on-action-primary-disabled",
513
+ "flex-col",
514
+ paddingUsingComponentGap
515
+ );
516
+ const notNavigationVariantStyles = variant !== "navigation" && (0, import_clsx6.default)("border-2 flex-row", componentPaddingMinus2pxBorder, componentGap);
517
+ const buttonClasses = (0, import_clsx6.default)(
518
+ disabled ? "cursor-default" : "cursor-pointer",
519
+ block ? "w-full" : "w-fit",
520
+ baseTransition,
521
+ "rounded-sm whitespace-nowrap inline-flex items-center justify-center group/btn",
522
+ primaryVariantStyles,
523
+ secondaryVariantStyles,
524
+ tertiaryVariantStyles,
525
+ primaryCriticalVariantStyles,
526
+ secondaryCriticalVariantStyles,
527
+ tertiaryCriticalVariantStyles,
528
+ navigationVarianStyles,
529
+ notNavigationVariantStyles,
530
+ className
531
+ );
532
+ const labelClasses = (0, import_clsx6.default)(
533
+ "min-h-6 flex items-center justify-center",
534
+ classNameLabel,
535
+ componentPaddingXUsingComponentGap,
536
+ typography.buttonLabel
537
+ );
538
+ const Element = href ? "a" : as;
539
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
540
+ Element,
541
+ __spreadProps(__spreadValues({
542
+ type: Element === "button" ? "button" : void 0,
543
+ className: buttonClasses
544
+ }, props), {
545
+ disabled,
546
+ href,
547
+ children: [
548
+ leftIcon && leftIcon,
549
+ !iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: labelClasses, children }),
550
+ rightIcon && rightIcon
551
+ ]
552
+ })
553
+ );
554
+ };
555
+ Button.displayName = "Button";
556
+
557
+ // src/components/OptionPill.tsx
558
+ var import_jsx_runtime6 = require("react/jsx-runtime");
559
+ var OptionPill = (_a) => {
560
+ var _b = _a, {
561
+ selected = false,
562
+ onClick,
563
+ onRemove,
564
+ removable = false,
565
+ disabled = false,
566
+ children,
567
+ className
568
+ } = _b, props = __objRest(_b, [
569
+ "selected",
570
+ "onClick",
571
+ "onRemove",
572
+ "removable",
573
+ "disabled",
574
+ "children",
575
+ "className"
576
+ ]);
577
+ const additionalAttributes = {
578
+ "data-disabled": disabled || null,
579
+ "data-selected": selected || null
580
+ };
581
+ const classNames = (0, import_clsx7.default)(
582
+ {
583
+ "hover:border-border-action-hover active:border-border-action-active": !disabled,
584
+ "data-disabled:cursor-default data-disabled:border-border-primary-normal": disabled,
585
+ "data-selected:border-transparent data-selected:bg-background-action-secondary-hover data-selected:outline-border-action-normal data-selected:hover:outline-border-action-hover data-selected:active:outline-border-action-active": selected,
586
+ "data-selected:data-disabled:bg-background-action-secondary-disabled data-selected:data-disabled:border-border-action-disabled data-selected:data-disabled:outline-transparent": disabled && selected
587
+ },
588
+ !removable && componentPadding,
589
+ removable && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding"
590
+ );
591
+ const textColor = (0, import_clsx7.default)(
592
+ !disabled && "text-text-primary-normal",
593
+ disabled && !selected && "text-text-primary-disabled",
594
+ disabled && selected && "text-text-on-action-primary-disabled"
595
+ );
596
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
597
+ "div",
598
+ __spreadProps(__spreadValues(__spreadValues({
599
+ onClick: handleOnClick
600
+ }, props), additionalAttributes), {
601
+ className: (0, import_clsx7.default)(
602
+ "flex items-center justify-between cursor-pointer w-max",
603
+ "border border-border-primary-normal rounded-base",
604
+ "outline-2 outline-transparent -outline-offset-2",
605
+ componentGap,
606
+ baseTransition,
607
+ classNames,
608
+ className,
609
+ textColor
610
+ ),
611
+ children: [
612
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Label, { padded: true, className: componentPaddingYUsingComponentGap, children }),
613
+ removable && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
614
+ Button,
615
+ {
616
+ onClick: handleOnRemove,
617
+ disabled,
618
+ className: (0, import_clsx7.default)(
619
+ "mx-0 h-full w-10 !border-0",
620
+ componentPaddingMinusBorder
621
+ ),
622
+ iconOnly: true,
623
+ variant: "tertiary",
624
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "close" })
625
+ }
626
+ )
627
+ ]
628
+ })
629
+ );
630
+ function handleOnClick() {
631
+ if (disabled) {
632
+ return;
633
+ }
634
+ onClick == null ? void 0 : onClick();
635
+ }
636
+ function handleOnRemove() {
637
+ if (!removable || !onRemove) {
638
+ return;
639
+ }
640
+ onRemove();
641
+ }
642
+ };
643
+ OptionPill.displayName = "OptionPill";
644
+
645
+ // src/components/FilterGroup.tsx
646
+ var import_clsx10 = __toESM(require("clsx"), 1);
647
+
648
+ // src/components/Link.tsx
649
+ var import_clsx8 = __toESM(require("clsx"), 1);
650
+ var import_jsx_runtime7 = require("react/jsx-runtime");
651
+ var Link = (_a) => {
652
+ var _b = _a, {
653
+ as = "a",
654
+ className,
655
+ variant = "primary",
656
+ typographyStyle = "paragraph",
657
+ disabled = false,
658
+ color,
659
+ paddedY,
660
+ align,
661
+ underline = false
662
+ } = _b, props = __objRest(_b, [
663
+ "as",
664
+ "className",
665
+ "variant",
666
+ "typographyStyle",
667
+ "disabled",
668
+ "color",
669
+ "paddedY",
670
+ "align",
671
+ "underline"
672
+ ]);
673
+ const Component = as;
674
+ const primaryStateStyles = variant === "primary" && !disabled && (0, import_clsx8.default)(
675
+ "text-text-link-normal hover:text-text-link-hover active:text-text-link-active"
676
+ );
677
+ const secondaryStateStyles = variant === "secondary" && !disabled && (0, import_clsx8.default)(
678
+ "text-text-primary-normal hover:text-text-link-hover active:text-text-link-active"
679
+ );
680
+ const criticalStateStyles = variant === "critical" && !disabled && (0, import_clsx8.default)(
681
+ "text-text-action-critical-normal hover:text-text-action-critical-hover active:text-text-action-critical-active"
682
+ );
683
+ const criticalStateDisabledStyles = disabled && variant === "critical" && (0, import_clsx8.default)("text-text-action-critical-disabled");
684
+ const disabledStateStyles = disabled && ["primary", "secondary"].includes(variant) && (0, import_clsx8.default)("text-text-link-disabled");
685
+ const disabledStyles = disabled && (0, import_clsx8.default)("pointer-events-none cursor-default");
686
+ const underlineStyles = underline ? "decoration-current" : "decoration-transparent";
687
+ const paddingY = paddedY && componentPaddingY;
688
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
689
+ Component,
690
+ __spreadProps(__spreadValues({
691
+ className: (0, import_clsx8.default)(
692
+ "inline",
693
+ disabled ? "cursor-default" : "cursor-pointer",
694
+ "underline decoration-[10%] underline-offset-[32%]",
695
+ !disabled && "hover:decoration-current",
696
+ !disabled && "active:decoration-transparent",
697
+ "flex flex-col items-center justify-center",
698
+ baseTransition,
699
+ primaryStateStyles,
700
+ secondaryStateStyles,
701
+ criticalStateStyles,
702
+ criticalStateDisabledStyles,
703
+ disabledStateStyles,
704
+ disabledStyles,
705
+ underlineStyles,
706
+ typographyStyle === "caption" && typography.caption,
707
+ typographyStyle === "paragraph" && typography.paragraph,
708
+ align === "left" && "text-left",
709
+ align === "center" && "text-center",
710
+ align === "right" && "text-right",
711
+ paddingY,
712
+ className
713
+ )
714
+ }, props), {
715
+ style: __spreadProps(__spreadValues({}, props.style), {
716
+ color: color ? `var(--color-${color})` : void 0
717
+ }),
718
+ "aria-disabled": disabled,
719
+ tabIndex: disabled ? -1 : void 0
720
+ })
721
+ );
722
+ };
723
+ Link.displayName = "Link";
724
+
725
+ // src/components/Search.tsx
726
+ var import_react2 = require("react");
727
+
728
+ // src/components/Input.tsx
729
+ var import_react = require("react");
730
+ var import_clsx9 = __toESM(require("clsx"), 1);
731
+
732
+ // src/utils/formatting.tsx
733
+ function getDecimalPlaceholder(decimals) {
734
+ if (!decimals || decimals <= 0) {
735
+ return {};
736
+ }
737
+ return {
738
+ placeholder: `0.${"0".repeat(decimals)}`
739
+ };
740
+ }
741
+ function formatDecimalValue(value, decimals) {
742
+ if (!value || value === "") {
743
+ return "";
744
+ }
745
+ const numValue = typeof value === "string" ? parseFloat(value) : value;
746
+ if (isNaN(numValue)) {
747
+ return "";
748
+ }
749
+ if (!decimals || decimals <= 0) {
750
+ return String(Math.round(numValue));
751
+ }
752
+ return numValue.toFixed(decimals);
753
+ }
754
+ function formatCurrencyDisplay(value) {
755
+ if (!value || value === "") {
756
+ return "";
757
+ }
758
+ const parts = value.split(".");
759
+ const integerPart = parts[0];
760
+ const decimalPart = parts[1];
761
+ const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
762
+ return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
763
+ }
764
+
765
+ // src/components/Input.tsx
766
+ var import_jsx_runtime8 = require("react/jsx-runtime");
767
+ var InputBase = (_a) => {
768
+ var _b = _a, {
769
+ before,
770
+ after,
771
+ type,
772
+ label,
773
+ error,
774
+ className,
775
+ align = "left",
776
+ caption,
777
+ required,
778
+ selectOnFocus,
779
+ removeRoundness,
780
+ inputContainerRef,
781
+ removeBorder,
782
+ wrapperClassName,
783
+ focus
784
+ } = _b, props = __objRest(_b, [
785
+ "before",
786
+ "after",
787
+ "type",
788
+ "label",
789
+ "error",
790
+ "className",
791
+ "align",
792
+ "caption",
793
+ "required",
794
+ "selectOnFocus",
795
+ "removeRoundness",
796
+ "inputContainerRef",
797
+ "removeBorder",
798
+ "wrapperClassName",
799
+ "focus"
800
+ ]);
801
+ const attributes = {
802
+ "data-error": error && !focus || null,
803
+ "data-focus": focus || null
804
+ };
805
+ const inputRef = (0, import_react.useRef)(null);
806
+ (0, import_react.useEffect)(() => {
807
+ var _a2;
808
+ const input = inputRef.current;
809
+ const focusHandler = () => {
810
+ input == null ? void 0 : input.select();
811
+ };
812
+ if (selectOnFocus) {
813
+ (_a2 = inputRef.current) == null ? void 0 : _a2.addEventListener("focus", focusHandler);
814
+ return () => {
815
+ input == null ? void 0 : input.removeEventListener("focus", focusHandler);
816
+ };
817
+ }
818
+ }, [selectOnFocus]);
819
+ const inputBaseClass = (0, import_clsx9.default)(
820
+ "w-full",
821
+ "flex flex-row items-center",
822
+ "bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
823
+ componentGap,
824
+ baseTransition,
825
+ "outline-transparent outline-2 -outline-offset-2",
826
+ componentPaddingMinusBorder,
827
+ !removeRoundness && "rounded-base",
828
+ !removeBorder && "border border-border-primary-normal",
829
+ "relative"
830
+ );
831
+ const inputFocusClass = (0, import_clsx9.default)(
832
+ "has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
833
+ );
834
+ const inputDisabledClass = (0, import_clsx9.default)(
835
+ "has-disabled:bg-background-action-secondary-disabled"
836
+ );
837
+ const inputReadOnlyClass = (0, import_clsx9.default)(
838
+ "has-[input:not(:disabled):read-only]:outline-none has-[input:not(:disabled):read-only]:bg-transparent has-[input:not(:disabled):read-only]:border-transparent has-[input:not(:disabled):read-only]:pl-0"
839
+ );
840
+ const inputInvalidClass = (0, import_clsx9.default)(
841
+ "has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
842
+ );
843
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
844
+ "label",
845
+ {
846
+ ref: inputContainerRef,
847
+ className: (0, import_clsx9.default)(
848
+ "w-full flex flex-col",
849
+ "block",
850
+ "text-text-primary-normal has-disabled:text-text-primary-disabled",
851
+ componentGap
852
+ ),
853
+ style: __spreadValues({}, props.style),
854
+ children: [
855
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx9.default)("flex items-center", componentGap), children: [
856
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
857
+ Label,
858
+ {
859
+ className: (0, import_clsx9.default)(
860
+ props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
861
+ ),
862
+ children: label
863
+ }
864
+ ),
865
+ required && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
866
+ "span",
867
+ {
868
+ className: (0, import_clsx9.default)(typography.label, "text-text-critical-normal"),
869
+ children: "*"
870
+ }
871
+ )
872
+ ] }),
873
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
874
+ "div",
875
+ {
876
+ className: (0, import_clsx9.default)(
877
+ inputBaseClass,
878
+ !props.disabled && inputInvalidClass,
879
+ inputFocusClass,
880
+ inputDisabledClass,
881
+ inputReadOnlyClass,
882
+ wrapperClassName
883
+ ),
884
+ children: [
885
+ before,
886
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
887
+ "input",
888
+ __spreadProps(__spreadValues(__spreadValues({
889
+ ref: (el) => {
890
+ inputRef.current = el;
891
+ },
892
+ type,
893
+ required
894
+ }, props), attributes), {
895
+ id: props.id,
896
+ className: (0, import_clsx9.default)(
897
+ "flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
898
+ "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
899
+ "placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
900
+ align === "right" && "text-right",
901
+ align === "center" && "text-center",
902
+ componentPaddingXUsingComponentGap,
903
+ typography.paragraph,
904
+ className,
905
+ props.readOnly && !props.disabled && "!px-0"
906
+ )
907
+ })
908
+ ),
909
+ after
910
+ ]
911
+ }
912
+ ),
913
+ caption
914
+ ]
915
+ }
916
+ );
917
+ };
918
+ var Input = (_a) => {
919
+ var _b = _a, {
920
+ variant = "default",
921
+ decimals,
922
+ uom,
923
+ removeSearchIcon,
924
+ value: propValue,
925
+ onChange,
926
+ onBlur,
927
+ onClear
928
+ } = _b, props = __objRest(_b, [
929
+ "variant",
930
+ "decimals",
931
+ "uom",
932
+ "removeSearchIcon",
933
+ "value",
934
+ "onChange",
935
+ "onBlur",
936
+ "onClear"
937
+ ]);
938
+ const [internalValue, setInternalValue] = (0, import_react.useState)("");
939
+ const [displayValue, setDisplayValue] = (0, import_react.useState)("");
940
+ (0, import_react.useEffect)(() => {
941
+ var _a2;
942
+ const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
943
+ if (variant === "currency") {
944
+ if (propValue === void 0 || propValue === "" || typeof propValue === "number" && isNaN(propValue)) {
945
+ setInternalValue("");
946
+ setDisplayValue("");
947
+ } else {
948
+ const numValue = typeof propValue === "string" ? parseFloat(propValue) : propValue;
949
+ if (!isNaN(numValue)) {
950
+ const formatted = numValue.toFixed(decimals != null ? decimals : 2);
951
+ setInternalValue(formatted);
952
+ setDisplayValue(formatCurrencyDisplay(formatted));
953
+ }
954
+ }
955
+ } else {
956
+ setInternalValue(stringValue);
957
+ setDisplayValue(stringValue);
958
+ }
959
+ }, [propValue, decimals, variant]);
960
+ const getInputProps = () => {
961
+ var _a2;
962
+ const baseProps = __spreadProps(__spreadValues(__spreadValues({}, props), getDecimalPlaceholder(decimals)), {
963
+ value: propValue
964
+ });
965
+ switch (variant) {
966
+ case "search":
967
+ return __spreadProps(__spreadValues({}, baseProps), {
968
+ placeholder: (_a2 = props.placeholder) != null ? _a2 : "Search",
969
+ className: "!mr-6",
970
+ value: displayValue
971
+ });
972
+ case "finder":
973
+ return baseProps;
974
+ case "currency":
975
+ return __spreadProps(__spreadValues({}, baseProps), {
976
+ align: "right",
977
+ type: "text",
978
+ value: displayValue
979
+ });
980
+ case "percentage":
981
+ case "uom":
982
+ return __spreadProps(__spreadValues({}, baseProps), {
983
+ type: "number",
984
+ align: "right"
985
+ });
986
+ default:
987
+ return baseProps;
988
+ }
989
+ };
990
+ const getBeforeElement = () => {
991
+ if (props.before) return props.before;
992
+ switch (variant) {
993
+ case "search":
994
+ return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "search" }) }) : null;
995
+ case "currency":
996
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "attach_money" }) });
997
+ default:
998
+ return null;
999
+ }
1000
+ };
1001
+ const getAfterElement = () => {
1002
+ if (props.after) return props.after;
1003
+ switch (variant) {
1004
+ case "search": {
1005
+ const hasValue = displayValue.length > 0;
1006
+ return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1007
+ Icon,
1008
+ {
1009
+ name: "close",
1010
+ onClick: handleSearchReset,
1011
+ className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
1012
+ }
1013
+ ) : null;
1014
+ }
1015
+ case "finder":
1016
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "search" });
1017
+ case "uom":
1018
+ return uom ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-text-secondary-normal uppercase", children: uom.slice(0, 4) }) : null;
1019
+ case "percentage":
1020
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "percent" }) });
1021
+ default:
1022
+ return null;
1023
+ }
1024
+ };
1025
+ const handleSearchReset = () => {
1026
+ setInternalValue("");
1027
+ setDisplayValue("");
1028
+ if (onChange) {
1029
+ const syntheticEvent = {
1030
+ target: { value: "" }
1031
+ };
1032
+ if (typeof onChange === "function") {
1033
+ onChange(syntheticEvent);
1034
+ }
1035
+ }
1036
+ onClear == null ? void 0 : onClear();
1037
+ };
1038
+ const handleChange = (e) => {
1039
+ const rawValue = e.target.value;
1040
+ if (variant === "search") {
1041
+ setInternalValue(rawValue);
1042
+ setDisplayValue(rawValue);
1043
+ if (typeof onChange === "function") {
1044
+ onChange(e);
1045
+ }
1046
+ return;
1047
+ }
1048
+ if (variant === "currency") {
1049
+ const raw = rawValue.replace(/,/g, "");
1050
+ if (raw === "") {
1051
+ setInternalValue("");
1052
+ setDisplayValue("");
1053
+ if (onChange) {
1054
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1055
+ target: __spreadProps(__spreadValues({}, e.target), { value: "" })
1056
+ });
1057
+ onChange(syntheticEvent);
1058
+ }
1059
+ return;
1060
+ }
1061
+ const regex = /^\d*\.?\d*$/;
1062
+ if (!regex.test(raw)) return;
1063
+ const parts = raw.split(".");
1064
+ const currentDecimals = decimals != null ? decimals : 2;
1065
+ if (parts.length === 2 && parts[1].length > currentDecimals) return;
1066
+ setInternalValue(raw);
1067
+ setDisplayValue(formatCurrencyDisplay(raw));
1068
+ const asNumber = Number(raw);
1069
+ if (!isNaN(asNumber) && onChange) {
1070
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1071
+ target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
1072
+ });
1073
+ onChange(syntheticEvent);
1074
+ }
1075
+ return;
1076
+ }
1077
+ setInternalValue(rawValue);
1078
+ setDisplayValue(rawValue);
1079
+ if (typeof onChange === "function") {
1080
+ onChange(e);
1081
+ }
1082
+ };
1083
+ const handleBlur = (e) => {
1084
+ if (variant === "currency") {
1085
+ const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
1086
+ setInternalValue(formatted);
1087
+ setDisplayValue(formatCurrencyDisplay(formatted));
1088
+ const asNumber = Number(formatted);
1089
+ if (!isNaN(asNumber) && onChange) {
1090
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1091
+ target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
1092
+ });
1093
+ onChange(syntheticEvent);
1094
+ }
1095
+ } else if (variant === "uom" || variant === "percentage") {
1096
+ const formattedValue = formatDecimalValue(e.target.value, decimals);
1097
+ e.target.value = formattedValue;
1098
+ }
1099
+ onBlur == null ? void 0 : onBlur(e);
1100
+ };
1101
+ const inputProps = getInputProps();
1102
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1103
+ InputBase,
1104
+ __spreadProps(__spreadValues({}, inputProps), {
1105
+ before: getBeforeElement(),
1106
+ after: getAfterElement(),
1107
+ onChange: handleChange,
1108
+ onBlur: handleBlur
1109
+ })
1110
+ );
1111
+ };
1112
+ Input.displayName = "Input";
1113
+ var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
1114
+ var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
1115
+ var Currency = (props) => {
1116
+ var _a;
1117
+ const handleCurrencyChange = (e) => {
1118
+ var _a2;
1119
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
1120
+ };
1121
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1122
+ Input,
1123
+ __spreadProps(__spreadValues({}, props), {
1124
+ variant: "currency",
1125
+ decimals: (_a = props.decimals) != null ? _a : 2,
1126
+ onChange: handleCurrencyChange
1127
+ })
1128
+ );
1129
+ };
1130
+ var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
1131
+ Finder.displayName = "Finder";
1132
+ UOM.displayName = "UOM";
1133
+ Currency.displayName = "Currency";
1134
+ Percentage.displayName = "Percentage";
1135
+
1136
+ // src/components/Search.tsx
1137
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1138
+ var Search = (_a) => {
1139
+ var _b = _a, {
1140
+ label,
1141
+ error,
1142
+ children,
1143
+ readOnly,
1144
+ renderMenu,
1145
+ onClick,
1146
+ className,
1147
+ wrapperClassName,
1148
+ removeRoundness
1149
+ } = _b, props = __objRest(_b, [
1150
+ "label",
1151
+ "error",
1152
+ "children",
1153
+ "readOnly",
1154
+ "renderMenu",
1155
+ "onClick",
1156
+ "className",
1157
+ "wrapperClassName",
1158
+ "removeRoundness"
1159
+ ]);
1160
+ const inputRef = (0, import_react2.useRef)(null);
1161
+ const inputContainerRef = (0, import_react2.useRef)(null);
1162
+ const preventFocusOnInitialRender = (0, import_react2.useRef)(true);
1163
+ const [show, setShow] = (0, import_react2.useState)(false);
1164
+ const [clearing, setClearing] = (0, import_react2.useState)(false);
1165
+ const uniqueId = (0, import_react2.useId)();
1166
+ const searchMenuName = `search-menu-${uniqueId}`;
1167
+ (0, import_react2.useEffect)(() => {
1168
+ var _a2;
1169
+ if (preventFocusOnInitialRender.current) {
1170
+ preventFocusOnInitialRender.current = false;
1171
+ return;
1172
+ }
1173
+ (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
1174
+ }, [props.value]);
1175
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1176
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1177
+ Input,
1178
+ __spreadValues({
1179
+ variant: "search",
1180
+ inputContainerRef,
1181
+ ref: inputRef,
1182
+ label,
1183
+ wrapperClassName,
1184
+ onClick: (e) => {
1185
+ if (props.disabled || readOnly) {
1186
+ return;
1187
+ }
1188
+ if (clearing) {
1189
+ setClearing(false);
1190
+ return;
1191
+ }
1192
+ onClick == null ? void 0 : onClick(e);
1193
+ setShow(!show);
1194
+ },
1195
+ onClear: () => {
1196
+ setClearing(true);
1197
+ },
1198
+ onKeyDown: (e) => {
1199
+ setShow(true);
1200
+ if (["ArrowUp", "ArrowDown"].includes(e.key)) {
1201
+ e.preventDefault();
1202
+ const menu = document.querySelector(`[data-menu="${searchMenuName}"]`);
1203
+ const selectedMenuOption = menu == null ? void 0 : menu.querySelector("[data-selected]");
1204
+ if (selectedMenuOption) {
1205
+ const allMenuOptions = Array.from((menu == null ? void 0 : menu.querySelectorAll('[role="menuitem"]')) || []);
1206
+ const currentIndex = allMenuOptions.indexOf(selectedMenuOption);
1207
+ let targetOption;
1208
+ if (e.key === "ArrowDown") {
1209
+ targetOption = allMenuOptions[currentIndex + 1] || allMenuOptions[0];
1210
+ } else {
1211
+ targetOption = allMenuOptions[currentIndex - 1] || allMenuOptions[allMenuOptions.length - 1];
1212
+ }
1213
+ targetOption == null ? void 0 : targetOption.focus();
1214
+ } else {
1215
+ const toFocusMenuOption = e.key === "ArrowDown" ? menu == null ? void 0 : menu.querySelector('[role="menuitem"]') : menu == null ? void 0 : menu.querySelector('[role="menuitem"]:last-child');
1216
+ toFocusMenuOption == null ? void 0 : toFocusMenuOption.focus();
1217
+ }
1218
+ }
1219
+ },
1220
+ error,
1221
+ readOnly,
1222
+ removeRoundness,
1223
+ focus: show
1224
+ }, props)
1225
+ ),
1226
+ renderMenu ? renderMenu({
1227
+ positionTo: inputContainerRef,
1228
+ show,
1229
+ setShow,
1230
+ topOffset: props.caption ? -16 : null,
1231
+ autoFocusOff: true,
1232
+ menuName: searchMenuName
1233
+ }) : children
1234
+ ] });
1235
+ };
1236
+ Search.displayName = "Search";
1237
+
1238
+ // src/components/FilterGroup.tsx
1239
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1240
+ var FilterGroup = (_a) => {
1241
+ var _b = _a, {
1242
+ label,
1243
+ type = "link",
1244
+ open = false,
1245
+ showMore = false,
1246
+ onShowMore,
1247
+ onClearAll,
1248
+ children,
1249
+ showSearchField = false,
1250
+ searchValue,
1251
+ onSearchChange
1252
+ } = _b, props = __objRest(_b, [
1253
+ "label",
1254
+ "type",
1255
+ "open",
1256
+ "showMore",
1257
+ "onShowMore",
1258
+ "onClearAll",
1259
+ "children",
1260
+ "showSearchField",
1261
+ "searchValue",
1262
+ "onSearchChange"
1263
+ ]);
1264
+ const isSummary = type === "summary";
1265
+ const [internalExpanded, setInternalExpanded] = (0, import_react3.useState)(open);
1266
+ const [showAllItems, setShowAllItems] = (0, import_react3.useState)(false);
1267
+ const isExpanded = open || internalExpanded;
1268
+ const childArray = import_react3.Children.toArray(children).filter(import_react3.isValidElement);
1269
+ const shouldShowAll = isSummary || showAllItems;
1270
+ const visibleChildren = childArray.slice(
1271
+ 0,
1272
+ shouldShowAll ? childArray.length : 5
1273
+ );
1274
+ const showShowMoreLink = showMore && !isSummary && childArray.length > 5 && !showAllItems && isExpanded;
1275
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1276
+ "div",
1277
+ __spreadProps(__spreadValues({}, props), {
1278
+ className: (0, import_clsx10.default)(
1279
+ "border-b border-border-primary-normal",
1280
+ isSummary ? layoutPaddingBottom : componentPaddingBottom
1281
+ ),
1282
+ children: [
1283
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1284
+ "div",
1285
+ {
1286
+ className: (0, import_clsx10.default)(
1287
+ "flex items-center justify-between cursor-pointer",
1288
+ layoutGroupGap
1289
+ ),
1290
+ onClick: handleToggleExpanded,
1291
+ children: [
1292
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Label, { children: label }),
1293
+ type !== "summary" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1294
+ Icon,
1295
+ {
1296
+ name: "keyboard_arrow_down",
1297
+ className: (0, import_clsx10.default)(
1298
+ baseTransition.replace(
1299
+ "transition-colors",
1300
+ "transition-transform"
1301
+ ),
1302
+ isExpanded && "rotate-180",
1303
+ "text-icon-action-primary-normal"
1304
+ )
1305
+ }
1306
+ ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1307
+ Link,
1308
+ {
1309
+ className: (0, import_clsx10.default)("block", componentPaddingY),
1310
+ onClick: handleClearAll,
1311
+ children: "Clear All"
1312
+ }
1313
+ )
1314
+ ]
1315
+ }
1316
+ ),
1317
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1318
+ "div",
1319
+ {
1320
+ className: (0, import_clsx10.default)(
1321
+ "grid",
1322
+ baseTransition.replace(
1323
+ "transition-colors",
1324
+ "transition-[grid-template-rows]"
1325
+ ),
1326
+ isExpanded || isSummary ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
1327
+ ),
1328
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1329
+ "div",
1330
+ {
1331
+ className: (0, import_clsx10.default)(
1332
+ "overflow-hidden",
1333
+ componentGap,
1334
+ (isExpanded || isSummary || internalExpanded) && "mt-mobile-component-gap desktop:mt-desktop-component-gap compact:mt-desktop-compact-component-gap"
1335
+ ),
1336
+ children: [
1337
+ !isSummary && showSearchField && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1338
+ Search,
1339
+ {
1340
+ style: { marginBottom: "2px" },
1341
+ onChange: onSearchChange,
1342
+ value: searchValue
1343
+ }
1344
+ ),
1345
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_clsx10.default)(isSummary && `flex flex-col ${componentGap}`), children: visibleChildren }),
1346
+ showShowMoreLink && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1347
+ Link,
1348
+ {
1349
+ className: (0, import_clsx10.default)("block", "!items-start", componentPaddingY),
1350
+ onClick: handleOnShowMore,
1351
+ children: "Show More"
1352
+ }
1353
+ )
1354
+ ]
1355
+ }
1356
+ )
1357
+ }
1358
+ )
1359
+ ]
1360
+ })
1361
+ );
1362
+ function handleOnShowMore(e) {
1363
+ e.stopPropagation();
1364
+ setShowAllItems(true);
1365
+ onShowMore == null ? void 0 : onShowMore();
1366
+ }
1367
+ function handleToggleExpanded(e) {
1368
+ if (type === "summary") return;
1369
+ e.stopPropagation();
1370
+ setInternalExpanded(!internalExpanded);
1371
+ }
1372
+ function handleClearAll(e) {
1373
+ e.stopPropagation();
1374
+ onClearAll == null ? void 0 : onClearAll();
1375
+ }
1376
+ };
1377
+ var FilterGroupItem = (_a) => {
1378
+ var _b = _a, {
1379
+ type = "link",
1380
+ children,
1381
+ onClick
1382
+ } = _b, props = __objRest(_b, [
1383
+ "type",
1384
+ "children",
1385
+ "onClick"
1386
+ ]);
1387
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1388
+ "div",
1389
+ __spreadProps(__spreadValues({
1390
+ onClick: handleClick
1391
+ }, props), {
1392
+ className: (0, import_clsx10.default)(
1393
+ "flex items-center justify-between *:first:flex-1 cursor-pointer",
1394
+ type !== "summary" ? "*:first:py-mobile-component-padding *:first:desktop:py-desktop-component-padding *:first:compact:py-desktop-compact-component-padding" : ""
1395
+ ),
1396
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FilterGroupItemChildComponent, __spreadProps(__spreadValues({}, props), { type, count: props.count, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "flex items-center justify-between w-full", children: [
1397
+ children,
1398
+ type !== "summary" && props.count && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
1399
+ "(",
1400
+ props.count,
1401
+ ")"
1402
+ ] })
1403
+ ] }) }))
1404
+ })
1405
+ );
1406
+ function handleClick(e) {
1407
+ e.stopPropagation();
1408
+ onClick == null ? void 0 : onClick();
1409
+ }
1410
+ };
1411
+ var FilterGroupItemChildComponent = (_a) => {
1412
+ var _b = _a, {
1413
+ type = "link",
1414
+ children
1415
+ } = _b, props = __objRest(_b, [
1416
+ "type",
1417
+ "children"
1418
+ ]);
1419
+ if (type === "checkbox") {
1420
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Checkbox, __spreadValues({ paragraphClassName: "w-full", label: children }, props));
1421
+ }
1422
+ if (type === "summary") {
1423
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(OptionPill, __spreadProps(__spreadValues({ removable: true }, props), { children })) });
1424
+ }
1425
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Link, __spreadProps(__spreadValues({ variant: "secondary" }, props), { children }));
1426
+ };
1427
+ // Annotate the CommonJS export names for ESM import in node:
1428
+ 0 && (module.exports = {
1429
+ FilterGroup,
1430
+ FilterGroupItem
1431
+ });