@povio/ui 2.3.0-rc.9 → 2.3.1

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 (282) hide show
  1. package/dist/assets/icons/AlignCenter.js +11 -26
  2. package/dist/assets/icons/AlignLeft.js +11 -26
  3. package/dist/assets/icons/AlignLeftRight.js +11 -26
  4. package/dist/assets/icons/AlignRight.js +11 -26
  5. package/dist/assets/icons/ArrowDropDown.js +11 -26
  6. package/dist/assets/icons/ArrowDropUp.js +11 -26
  7. package/dist/assets/icons/ArrowLeft.js +11 -26
  8. package/dist/assets/icons/ArrowRight.js +11 -26
  9. package/dist/assets/icons/Bold.js +11 -26
  10. package/dist/assets/icons/BulletedList.js +11 -26
  11. package/dist/assets/icons/Calendar.js +13 -28
  12. package/dist/assets/icons/Check.js +13 -28
  13. package/dist/assets/icons/CheckCircle.js +11 -26
  14. package/dist/assets/icons/CheckboxCheckmark.js +14 -29
  15. package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
  16. package/dist/assets/icons/ChevronDown.js +13 -28
  17. package/dist/assets/icons/ChevronLeft.js +13 -28
  18. package/dist/assets/icons/ChevronRight.js +13 -28
  19. package/dist/assets/icons/ChevronUp.js +13 -28
  20. package/dist/assets/icons/ChevronsLeft.js +13 -28
  21. package/dist/assets/icons/ChevronsRight.js +13 -28
  22. package/dist/assets/icons/Clock.js +11 -26
  23. package/dist/assets/icons/Close.js +11 -26
  24. package/dist/assets/icons/DateTime.js +14 -35
  25. package/dist/assets/icons/DragIndicator.js +11 -26
  26. package/dist/assets/icons/File.js +13 -28
  27. package/dist/assets/icons/Highlight.js +11 -26
  28. package/dist/assets/icons/HighlightOn.js +15 -49
  29. package/dist/assets/icons/Home.js +11 -26
  30. package/dist/assets/icons/Info.js +16 -37
  31. package/dist/assets/icons/Italic.js +11 -26
  32. package/dist/assets/icons/Link.js +11 -26
  33. package/dist/assets/icons/Menu.js +11 -26
  34. package/dist/assets/icons/NumberedList.js +11 -26
  35. package/dist/assets/icons/PointerHorizontal.js +11 -26
  36. package/dist/assets/icons/PointerVertical.js +11 -26
  37. package/dist/assets/icons/Search.js +11 -26
  38. package/dist/assets/icons/Send.js +13 -28
  39. package/dist/assets/icons/Strikethrough.js +11 -26
  40. package/dist/assets/icons/TextColor.js +14 -48
  41. package/dist/assets/icons/Today.js +11 -26
  42. package/dist/assets/icons/Underlined.js +13 -28
  43. package/dist/assets/icons/Upload.js +14 -35
  44. package/dist/assets/icons/Visibility.js +11 -26
  45. package/dist/assets/icons/VisibilityOff.js +11 -26
  46. package/dist/assets/icons/WarningFilled.js +13 -28
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
  48. package/dist/components/Menu/Menu.js +2 -18
  49. package/dist/components/Menu/MenuDesktop.js +7 -41
  50. package/dist/components/Menu/MenuItem.js +9 -32
  51. package/dist/components/Menu/MenuMobile.js +38 -97
  52. package/dist/components/Menu/MenuPopover.js +29 -105
  53. package/dist/components/buttons/IconButton/IconButton.js +8 -40
  54. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  56. package/dist/components/buttons/PillButton/PillButton.js +17 -55
  57. package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
  58. package/dist/components/buttons/TextButton/TextButton.js +8 -30
  59. package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
  60. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  61. package/dist/components/inputs/Checkbox/Checkbox.js +35 -172
  62. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  63. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
  64. package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
  65. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -10
  66. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +20 -121
  67. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -10
  68. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -215
  69. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -11
  70. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +19 -123
  71. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -5
  72. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +104 -448
  73. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
  74. package/dist/components/inputs/DateTime/shared/Calendar.js +119 -330
  75. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +1 -1
  76. package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -283
  77. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +1 -1
  78. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -142
  79. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
  80. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
  81. package/dist/components/inputs/DateTime/shared/DateField.js +112 -296
  82. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -6
  83. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -355
  84. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -14
  85. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -97
  86. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
  87. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  88. package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
  89. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
  90. package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
  91. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
  92. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
  93. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -207
  94. package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
  95. package/dist/components/inputs/File/FileUpload.js +44 -87
  96. package/dist/components/inputs/File/FileUploadContainer.js +7 -15
  97. package/dist/components/inputs/File/InputUpload.js +79 -317
  98. package/dist/components/inputs/File/shared/FileCard.js +41 -104
  99. package/dist/components/inputs/File/shared/FileCardList.js +12 -47
  100. package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
  101. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
  102. package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
  103. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
  104. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
  105. package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
  106. package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
  107. package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
  108. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  109. package/dist/components/inputs/FormField/FormField.js +37 -119
  110. package/dist/components/inputs/FormField/FormFieldError.js +5 -25
  111. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  112. package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
  113. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
  114. package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
  115. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  116. package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
  117. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
  118. package/dist/components/inputs/Input/NumberInput/NumberInput.js +88 -334
  119. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
  120. package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
  121. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
  122. package/dist/components/inputs/Input/TextInput/TextInput.js +79 -319
  123. package/dist/components/inputs/Input/shared/InputContent.js +59 -192
  124. package/dist/components/inputs/Inputs/Form.js +11 -40
  125. package/dist/components/inputs/Inputs/InputItem.d.ts +21 -16
  126. package/dist/components/inputs/Inputs/InputItem.js +14 -71
  127. package/dist/components/inputs/Inputs/Inputs.js +11 -37
  128. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  129. package/dist/components/inputs/RadioGroup/RadioGroup.js +60 -352
  130. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
  131. package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
  132. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
  133. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +7 -109
  134. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
  135. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -34
  136. package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
  137. package/dist/components/inputs/Selection/Select/Select.js +5 -132
  138. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
  139. package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
  140. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  141. package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
  142. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  143. package/dist/components/inputs/Selection/shared/SelectInput.js +116 -338
  144. package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
  145. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  146. package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
  147. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
  148. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
  149. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
  150. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
  151. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  152. package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
  153. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
  154. package/dist/components/inputs/Selection/shared/select.context.js +34 -57
  155. package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
  156. package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
  157. package/dist/components/inputs/Slider/Slider.js +74 -250
  158. package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
  159. package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
  160. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
  161. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
  162. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
  163. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
  164. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
  165. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
  166. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
  167. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
  168. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
  169. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
  170. package/dist/components/inputs/Toggle/Toggle.js +37 -189
  171. package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
  172. package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
  173. package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
  174. package/dist/components/inputs/shared/CheckContent.js +11 -21
  175. package/dist/components/inputs/shared/InputClear.d.ts +1 -2
  176. package/dist/components/inputs/shared/InputClear.js +13 -79
  177. package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
  178. package/dist/components/inputs/shared/input.cva.d.ts +0 -10
  179. package/dist/components/inputs/shared/input.cva.js +4 -32
  180. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  181. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  182. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  183. package/dist/components/navigation/Stepper/StepperItem.js +31 -104
  184. package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
  185. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  186. package/dist/components/overlays/BottomSheet/BottomSheet.js +49 -98
  187. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
  188. package/dist/components/overlays/Drawer/Drawer.js +20 -62
  189. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
  190. package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
  191. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
  192. package/dist/components/segment/Segment.js +57 -218
  193. package/dist/components/segment/SegmentItem.js +10 -67
  194. package/dist/components/shared/pagination/Pagination.js +22 -108
  195. package/dist/components/shared/pagination/PaginationList.js +64 -167
  196. package/dist/components/status/Alert/Alert.js +30 -97
  197. package/dist/components/status/Loader/Loader.js +22 -77
  198. package/dist/components/status/Toast/Toast.js +13 -21
  199. package/dist/components/status/Toast/useToast.js +57 -62
  200. package/dist/components/table/ColumnConfig.js +54 -158
  201. package/dist/components/table/InfiniteTable.js +16 -67
  202. package/dist/components/table/PaginatedTable.js +18 -84
  203. package/dist/components/table/Table.js +27 -28
  204. package/dist/components/text/Link/Link.js +7 -19
  205. package/dist/components/text/Typography/Typography.js +8 -23
  206. package/dist/config/confirmation.context.js +1 -1
  207. package/dist/config/link.context.js +9 -23
  208. package/dist/config/router.context.js +16 -42
  209. package/dist/config/theme.context.js +45 -98
  210. package/dist/config/uiConfig.context.d.ts +6 -16
  211. package/dist/config/uiConfig.context.js +13 -56
  212. package/dist/config/uiStyle.context.d.ts +4 -27
  213. package/dist/config/uiStyle.context.js +5 -15
  214. package/dist/helpers/dynamicInputs.d.ts +5 -5
  215. package/dist/helpers/dynamicInputs.js +0 -3
  216. package/dist/hooks/useBreakpoint.js +3 -16
  217. package/dist/hooks/useDebounceCallback.js +17 -51
  218. package/dist/hooks/useFilters.js +64 -125
  219. package/dist/hooks/useForm.js +8 -42
  220. package/dist/hooks/useFormAutosave.js +30 -101
  221. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  222. package/dist/hooks/useIntersectionObserver.js +24 -91
  223. package/dist/hooks/useLocalStorage.js +10 -43
  224. package/dist/hooks/useLongPressRepeat.js +20 -55
  225. package/dist/hooks/usePagination.js +19 -49
  226. package/dist/hooks/useScrollableListBox.js +16 -37
  227. package/dist/hooks/useSorting.js +28 -69
  228. package/dist/hooks/useStateAndRef.js +7 -21
  229. package/dist/hooks/useTableColumnConfig.js +31 -124
  230. package/dist/hooks/useTranslationMemo.js +5 -25
  231. package/dist/index.d.ts +0 -7
  232. package/dist/index.js +3 -5
  233. package/dist/tw-ui-plugin.js +0 -2
  234. package/dist/utils/date-time.utils.d.ts +10 -31
  235. package/dist/utils/date-time.utils.js +22 -123
  236. package/dist/utils/dom.utils.js +1 -1
  237. package/package.json +1 -1
  238. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -4
  239. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
  240. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
  241. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -6
  242. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -21
  243. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
  244. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
  245. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -31
  246. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -80
  247. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
  248. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
  249. package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
  250. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
  251. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
  252. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
  253. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -479
  254. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
  255. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
  256. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
  257. package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
  258. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
  259. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
  260. package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -122
  261. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
  262. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
  263. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -6
  264. package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -13
  265. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
  266. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
  267. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
  268. package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
  269. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
  270. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
  271. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
  272. package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -79
  273. package/dist/components/inputs/Skeleton/InputFrame.js +0 -526
  274. package/dist/components/inputs/shared/StaticInput.d.ts +0 -38
  275. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
  276. package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
  277. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
  278. package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
  279. package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
  280. package/dist/hooks/useQueryAutocomplete.js +0 -57
  281. package/dist/utils/query.utils.d.ts +0 -4
  282. package/dist/utils/query.utils.js +0 -8
@@ -1,30 +1,12 @@
1
1
  import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { stepperSeparatorCva } from "./stepper.cva.js";
3
- import { c } from "react/compiler-runtime";
4
3
  import { jsx } from "react/jsx-runtime";
5
4
  //#region src/components/navigation/Stepper/StepperSeparator.tsx
6
- var StepperSeparator = (t0) => {
7
- const $ = c(6);
8
- const { orientation, contentOrientation } = t0;
9
- const stepperSeparatorCva$1 = UIStyle.useCva("stepper.separatorCva", stepperSeparatorCva);
10
- let t1;
11
- if ($[0] !== contentOrientation || $[1] !== orientation || $[2] !== stepperSeparatorCva$1) {
12
- t1 = stepperSeparatorCva$1({
13
- orientation,
14
- contentOrientation
15
- });
16
- $[0] = contentOrientation;
17
- $[1] = orientation;
18
- $[2] = stepperSeparatorCva$1;
19
- $[3] = t1;
20
- } else t1 = $[3];
21
- let t2;
22
- if ($[4] !== t1) {
23
- t2 = /* @__PURE__ */ jsx("div", { className: t1 });
24
- $[4] = t1;
25
- $[5] = t2;
26
- } else t2 = $[5];
27
- return t2;
5
+ var StepperSeparator = ({ orientation, contentOrientation }) => {
6
+ return /* @__PURE__ */ jsx("div", { className: UIStyle.useCva("stepper.separatorCva", stepperSeparatorCva)({
7
+ orientation,
8
+ contentOrientation
9
+ }) });
28
10
  };
29
11
  //#endregion
30
12
  export { StepperSeparator };
@@ -2,7 +2,6 @@ import { Typography } from "../../text/Typography/Typography.js";
2
2
  import { UIConfig } from "../../../config/uiConfig.context.js";
3
3
  import { Button } from "../../buttons/Button/Button.js";
4
4
  import { Modal } from "../Modal/Modal.js";
5
- import { c } from "react/compiler-runtime";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { clsx } from "clsx";
8
7
  //#region src/components/overlays/ActionModal/ActionModal.tsx
@@ -11,178 +10,45 @@ var textAlignClassMap = {
11
10
  center: "text-center",
12
11
  right: "text-right"
13
12
  };
14
- var ActionModal = (t0) => {
15
- const $ = c(52);
16
- let description;
17
- let descriptionClassName;
18
- let descriptionTypography;
19
- let heading;
20
- let modalClassName;
21
- let modalProps;
22
- let primaryAction;
23
- let secondaryAction;
24
- let t1;
25
- let t2;
26
- let titleClassName;
27
- let titleTypography;
28
- if ($[0] !== t0) {
29
- ({heading, description, primaryAction, secondaryAction, buttonSize: t1, textAlign: t2, modalClassName, titleTypography, titleClassName, descriptionTypography, descriptionClassName, ...modalProps} = t0);
30
- $[0] = t0;
31
- $[1] = description;
32
- $[2] = descriptionClassName;
33
- $[3] = descriptionTypography;
34
- $[4] = heading;
35
- $[5] = modalClassName;
36
- $[6] = modalProps;
37
- $[7] = primaryAction;
38
- $[8] = secondaryAction;
39
- $[9] = t1;
40
- $[10] = t2;
41
- $[11] = titleClassName;
42
- $[12] = titleTypography;
43
- } else {
44
- description = $[1];
45
- descriptionClassName = $[2];
46
- descriptionTypography = $[3];
47
- heading = $[4];
48
- modalClassName = $[5];
49
- modalProps = $[6];
50
- primaryAction = $[7];
51
- secondaryAction = $[8];
52
- t1 = $[9];
53
- t2 = $[10];
54
- titleClassName = $[11];
55
- titleTypography = $[12];
56
- }
57
- const buttonSize = t1 === void 0 ? "m" : t1;
58
- const textAlign = t2 === void 0 ? "left" : t2;
13
+ var ActionModal = ({ heading, description, primaryAction, secondaryAction, buttonSize = "m", textAlign = "left", modalClassName, titleTypography, titleClassName, descriptionTypography, descriptionClassName, ...modalProps }) => {
59
14
  const ui = UIConfig.useConfig();
60
15
  const textAlignClass = textAlignClassMap[textAlign];
61
- let t3;
62
- if ($[13] !== modalClassName) {
63
- t3 = clsx("w-modal", modalClassName);
64
- $[13] = modalClassName;
65
- $[14] = t3;
66
- } else t3 = $[14];
67
- const t4 = titleTypography ?? ui.actionModal.titleTypography;
68
- let t5;
69
- if ($[15] !== textAlignClass || $[16] !== titleClassName) {
70
- t5 = clsx("text-text-default-1", textAlignClass, titleClassName);
71
- $[15] = textAlignClass;
72
- $[16] = titleClassName;
73
- $[17] = t5;
74
- } else t5 = $[17];
75
- let t6;
76
- if ($[18] !== heading || $[19] !== t4 || $[20] !== t5) {
77
- t6 = /* @__PURE__ */ jsx(Typography, {
78
- ...t4,
79
- as: "h2",
80
- className: t5,
81
- children: heading
82
- });
83
- $[18] = heading;
84
- $[19] = t4;
85
- $[20] = t5;
86
- $[21] = t6;
87
- } else t6 = $[21];
88
- const t7 = descriptionTypography ?? ui.actionModal.descriptionTypography;
89
- let t8;
90
- if ($[22] !== descriptionClassName || $[23] !== textAlignClass) {
91
- t8 = clsx("text-text-default-1", textAlignClass, descriptionClassName);
92
- $[22] = descriptionClassName;
93
- $[23] = textAlignClass;
94
- $[24] = t8;
95
- } else t8 = $[24];
96
- let t9;
97
- if ($[25] !== description || $[26] !== t7 || $[27] !== t8) {
98
- t9 = /* @__PURE__ */ jsx(Typography, {
99
- ...t7,
100
- className: t8,
101
- children: description
102
- });
103
- $[25] = description;
104
- $[26] = t7;
105
- $[27] = t8;
106
- $[28] = t9;
107
- } else t9 = $[28];
108
- let t10;
109
- if ($[29] !== t6 || $[30] !== t9) {
110
- t10 = /* @__PURE__ */ jsxs("div", {
16
+ return /* @__PURE__ */ jsxs(Modal, {
17
+ modalClassName: clsx("w-modal", modalClassName),
18
+ ...modalProps,
19
+ children: [/* @__PURE__ */ jsxs("div", {
111
20
  className: "flex flex-col gap-modal-gap-text",
112
- children: [t6, t9]
113
- });
114
- $[29] = t6;
115
- $[30] = t9;
116
- $[31] = t10;
117
- } else t10 = $[31];
118
- let t11;
119
- if ($[32] !== buttonSize || $[33] !== secondaryAction) {
120
- t11 = secondaryAction && /* @__PURE__ */ jsx(Button, {
121
- variant: secondaryAction?.variant ?? "contained",
122
- size: buttonSize,
123
- color: secondaryAction?.color ?? "secondary",
124
- width: "fill",
125
- onPress: secondaryAction?.onPress,
126
- className: clsx("min-w-40 flex-1 shrink-0", secondaryAction?.className),
127
- children: secondaryAction?.label
128
- });
129
- $[32] = buttonSize;
130
- $[33] = secondaryAction;
131
- $[34] = t11;
132
- } else t11 = $[34];
133
- const t12 = primaryAction?.variant ?? "contained";
134
- const t13 = primaryAction?.color ?? "primary";
135
- const t14 = primaryAction.onPress;
136
- const t15 = primaryAction?.className;
137
- let t16;
138
- if ($[35] !== t15) {
139
- t16 = clsx("min-w-40 flex-1 shrink-0", t15);
140
- $[35] = t15;
141
- $[36] = t16;
142
- } else t16 = $[36];
143
- let t17;
144
- if ($[37] !== buttonSize || $[38] !== primaryAction.label || $[39] !== primaryAction.onPress || $[40] !== t12 || $[41] !== t13 || $[42] !== t16) {
145
- t17 = /* @__PURE__ */ jsx(Button, {
146
- variant: t12,
147
- size: buttonSize,
148
- color: t13,
149
- width: "fill",
150
- onPress: t14,
151
- className: t16,
152
- children: primaryAction.label
153
- });
154
- $[37] = buttonSize;
155
- $[38] = primaryAction.label;
156
- $[39] = primaryAction.onPress;
157
- $[40] = t12;
158
- $[41] = t13;
159
- $[42] = t16;
160
- $[43] = t17;
161
- } else t17 = $[43];
162
- let t18;
163
- if ($[44] !== t11 || $[45] !== t17) {
164
- t18 = /* @__PURE__ */ jsxs("div", {
21
+ children: [/* @__PURE__ */ jsx(Typography, {
22
+ ...titleTypography ?? ui.actionModal.titleTypography,
23
+ as: "h2",
24
+ className: clsx("text-text-default-1", textAlignClass, titleClassName),
25
+ children: heading
26
+ }), /* @__PURE__ */ jsx(Typography, {
27
+ ...descriptionTypography ?? ui.actionModal.descriptionTypography,
28
+ className: clsx("text-text-default-1", textAlignClass, descriptionClassName),
29
+ children: description
30
+ })]
31
+ }), /* @__PURE__ */ jsxs("div", {
165
32
  className: "flex w-full flex-wrap gap-modal-gap-buttons pt-1",
166
- children: [t11, t17]
167
- });
168
- $[44] = t11;
169
- $[45] = t17;
170
- $[46] = t18;
171
- } else t18 = $[46];
172
- let t19;
173
- if ($[47] !== modalProps || $[48] !== t10 || $[49] !== t18 || $[50] !== t3) {
174
- t19 = /* @__PURE__ */ jsxs(Modal, {
175
- modalClassName: t3,
176
- ...modalProps,
177
- children: [t10, t18]
178
- });
179
- $[47] = modalProps;
180
- $[48] = t10;
181
- $[49] = t18;
182
- $[50] = t3;
183
- $[51] = t19;
184
- } else t19 = $[51];
185
- return t19;
33
+ children: [secondaryAction && /* @__PURE__ */ jsx(Button, {
34
+ variant: secondaryAction?.variant ?? "contained",
35
+ size: buttonSize,
36
+ color: secondaryAction?.color ?? "secondary",
37
+ width: "fill",
38
+ onPress: secondaryAction?.onPress,
39
+ className: clsx("min-w-40 flex-1 shrink-0", secondaryAction?.className),
40
+ children: secondaryAction?.label
41
+ }), /* @__PURE__ */ jsx(Button, {
42
+ variant: primaryAction?.variant ?? "contained",
43
+ size: buttonSize,
44
+ color: primaryAction?.color ?? "primary",
45
+ width: "fill",
46
+ onPress: primaryAction.onPress,
47
+ className: clsx("min-w-40 flex-1 shrink-0", primaryAction?.className),
48
+ children: primaryAction.label
49
+ })]
50
+ })]
51
+ });
186
52
  };
187
53
  //#endregion
188
54
  export { ActionModal };
@@ -2,7 +2,6 @@ import { UIConfig } from "../../../config/uiConfig.context.js";
2
2
  import { BottomSheetHeader } from "./BottomSheetHeader.js";
3
3
  import { useStateAndRef } from "../../../hooks/useStateAndRef.js";
4
4
  import { DomUtils } from "../../../utils/dom.utils.js";
5
- import { c } from "react/compiler-runtime";
6
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
6
  import { clsx } from "clsx";
8
7
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -27,6 +26,7 @@ var staticTransition = {
27
26
  1
28
27
  ]
29
28
  };
29
+ var KEYBOARD_INSET_THRESHOLD = 48;
30
30
  var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = true, isScrollable = true, height = "full", label, portalContainerRef, children, footer, hideHeader, hideThumb: hideThumbProp, sheetMarginTop = 96, sheetMarginBottom = 128, closeDragThreshold: closeDragThresholdProp, closeVelocityThreshold: closeVelocityThresholdProp, shouldCloseOnInteractOutside, containerClassName, overlayClassName, headerTypography: headerTypographyProp }) => {
31
31
  const uiConfig = UIConfig.useConfig();
32
32
  const closeDragThreshold = closeDragThresholdProp ?? uiConfig.bottomSheet.closeDragThreshold;
@@ -49,6 +49,27 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
49
49
  const focusTrapRef = useRef(null);
50
50
  const [footerElement, footerRef, setFooterElement] = useStateAndRef(null);
51
51
  const [footerHeight, setFooterHeight] = useState(0);
52
+ const [keyboardInset, setKeyboardInset] = useState(0);
53
+ useEffect(() => {
54
+ if (!isOpen) {
55
+ setKeyboardInset(0);
56
+ return;
57
+ }
58
+ const vv = window.visualViewport;
59
+ if (!vv) return;
60
+ const update = () => {
61
+ const naturalHeight = vv.height * Math.max(vv.scale, 1);
62
+ const next = Math.max(0, window.innerHeight - naturalHeight);
63
+ setKeyboardInset(next > KEYBOARD_INSET_THRESHOLD ? Math.round(next) : 0);
64
+ };
65
+ update();
66
+ vv.addEventListener("resize", update);
67
+ vv.addEventListener("scroll", update);
68
+ return () => {
69
+ vv.removeEventListener("resize", update);
70
+ vv.removeEventListener("scroll", update);
71
+ };
72
+ }, [isOpen]);
52
73
  useEffect(() => {
53
74
  if (!footerElement) return;
54
75
  const onResize = () => {
@@ -78,6 +99,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
78
99
  isOpen: true,
79
100
  UNSTABLE_portalContainer: portalContainerRef?.current,
80
101
  className: clsx("fixed top-0 left-0 z-10 w-screen h-dvh", containerClassName),
102
+ style: { "--bottom-sheet-keyboard-inset": `${keyboardInset}px` },
81
103
  onOpenChange,
82
104
  isDismissable,
83
105
  ref: overlayRef,
@@ -105,13 +127,14 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
105
127
  onAnimationComplete: (data) => {
106
128
  onStateChange?.(data.y === 0 ? "opened" : "closed");
107
129
  },
108
- onAnimationStart: (data_0) => {
109
- onStateChange?.(data_0.y === 0 ? "opening" : "closing");
130
+ onAnimationStart: (data) => {
131
+ onStateChange?.(data.y === 0 ? "opening" : "closing");
110
132
  },
111
133
  transition: staticTransition,
112
134
  style: {
113
135
  y,
114
- minHeight: "100%"
136
+ height: "calc(100dvh - var(--bottom-sheet-keyboard-inset, 0px))",
137
+ minHeight: "calc(100dvh - var(--bottom-sheet-keyboard-inset, 0px))"
115
138
  },
116
139
  drag: "y",
117
140
  dragListener: false,
@@ -189,7 +212,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
189
212
  initial: { opacity: 0 },
190
213
  exit: { opacity: 0 },
191
214
  ref: setFooterElement,
192
- className: clsx("pointer-events-auto absolute z-50 w-full bg-elevation-fill-default-2", "top-[100dvh] left-0 translate-y-[calc(-100%-var(--scroll-position,0px))]"),
215
+ className: clsx("pointer-events-auto absolute z-50 w-full bg-elevation-fill-default-2", "top-[calc(100dvh-var(--bottom-sheet-keyboard-inset,0))] left-0 translate-y-[calc(-100%-var(--scroll-position,0))]"),
193
216
  children: footer
194
217
  })
195
218
  ] })
@@ -197,108 +220,36 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
197
220
  })]
198
221
  }) });
199
222
  };
200
- var BottomSheet = (t0) => {
201
- const $ = c(30);
202
- let children;
203
- let isOpen;
204
- let onOpenChange;
205
- let portalContainerRef;
206
- let rest;
207
- let trigger;
208
- if ($[0] !== t0) {
209
- ({isOpen, portalContainerRef, onOpenChange, trigger, children, ...rest} = t0);
210
- $[0] = t0;
211
- $[1] = children;
212
- $[2] = isOpen;
213
- $[3] = onOpenChange;
214
- $[4] = portalContainerRef;
215
- $[5] = rest;
216
- $[6] = trigger;
217
- } else {
218
- children = $[1];
219
- isOpen = $[2];
220
- onOpenChange = $[3];
221
- portalContainerRef = $[4];
222
- rest = $[5];
223
- trigger = $[6];
224
- }
223
+ var BottomSheet = ({ isOpen, portalContainerRef, onOpenChange, trigger, children, ...rest }) => {
225
224
  const [isSheetOpen, setIsSheetOpen] = useState(!!isOpen);
226
225
  const hasTrigger = !!trigger;
227
- let t1;
228
- let t2;
229
- if ($[7] !== hasTrigger || $[8] !== isOpen) {
230
- t1 = () => {
231
- if (hasTrigger) setIsSheetOpen(!!isOpen);
232
- };
233
- t2 = [isOpen, hasTrigger];
234
- $[7] = hasTrigger;
235
- $[8] = isOpen;
236
- $[9] = t1;
237
- $[10] = t2;
238
- } else {
239
- t1 = $[9];
240
- t2 = $[10];
241
- }
242
- useEffect(t1, t2);
226
+ useEffect(() => {
227
+ if (hasTrigger) setIsSheetOpen(!!isOpen);
228
+ }, [isOpen, hasTrigger]);
243
229
  if (trigger) {
244
- let t3;
245
- if ($[11] !== onOpenChange) {
246
- t3 = (open) => {
247
- setIsSheetOpen(open);
248
- onOpenChange?.(open);
249
- };
250
- $[11] = onOpenChange;
251
- $[12] = t3;
252
- } else t3 = $[12];
253
- const handleOpenChange = t3;
254
- let t4;
255
- if ($[13] !== children || $[14] !== handleOpenChange || $[15] !== isSheetOpen || $[16] !== portalContainerRef || $[17] !== rest) {
256
- t4 = /* @__PURE__ */ jsx(BottomSheetBase, {
230
+ const handleOpenChange = (open) => {
231
+ setIsSheetOpen(open);
232
+ onOpenChange?.(open);
233
+ };
234
+ return /* @__PURE__ */ jsxs(DialogTrigger, {
235
+ isOpen: isSheetOpen,
236
+ onOpenChange: handleOpenChange,
237
+ children: [trigger, /* @__PURE__ */ jsx(BottomSheetBase, {
257
238
  isOpen: isSheetOpen,
258
239
  onOpenChange: handleOpenChange,
259
240
  portalContainerRef,
260
241
  ...rest,
261
242
  children
262
- });
263
- $[13] = children;
264
- $[14] = handleOpenChange;
265
- $[15] = isSheetOpen;
266
- $[16] = portalContainerRef;
267
- $[17] = rest;
268
- $[18] = t4;
269
- } else t4 = $[18];
270
- let t5;
271
- if ($[19] !== handleOpenChange || $[20] !== isSheetOpen || $[21] !== t4 || $[22] !== trigger) {
272
- t5 = /* @__PURE__ */ jsxs(DialogTrigger, {
273
- isOpen: isSheetOpen,
274
- onOpenChange: handleOpenChange,
275
- children: [trigger, t4]
276
- });
277
- $[19] = handleOpenChange;
278
- $[20] = isSheetOpen;
279
- $[21] = t4;
280
- $[22] = trigger;
281
- $[23] = t5;
282
- } else t5 = $[23];
283
- return t5;
284
- }
285
- let t3;
286
- if ($[24] !== children || $[25] !== isOpen || $[26] !== onOpenChange || $[27] !== portalContainerRef || $[28] !== rest) {
287
- t3 = /* @__PURE__ */ jsx(BottomSheetBase, {
288
- isOpen,
289
- onOpenChange,
290
- portalContainerRef,
291
- ...rest,
292
- children
243
+ })]
293
244
  });
294
- $[24] = children;
295
- $[25] = isOpen;
296
- $[26] = onOpenChange;
297
- $[27] = portalContainerRef;
298
- $[28] = rest;
299
- $[29] = t3;
300
- } else t3 = $[29];
301
- return t3;
245
+ }
246
+ return /* @__PURE__ */ jsx(BottomSheetBase, {
247
+ isOpen,
248
+ onOpenChange,
249
+ portalContainerRef,
250
+ ...rest,
251
+ children
252
+ });
302
253
  };
303
254
  //#endregion
304
255
  export { BottomSheet };
@@ -1,26 +1,16 @@
1
1
  import { CloseIcon } from "../../../assets/icons/Close.js";
2
2
  import { Typography } from "../../text/Typography/Typography.js";
3
3
  import "../../../config/i18n.js";
4
- import { c } from "react/compiler-runtime";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { clsx } from "clsx";
7
6
  import { Button } from "react-aria-components";
8
7
  import { useTranslation } from "react-i18next";
9
8
  //#region src/components/overlays/BottomSheet/BottomSheetHeader.tsx
10
- var BottomSheetHeader = (t0) => {
11
- const $ = c(17);
12
- const { label, dragControls, isDismissable, hideThumb, hideHeader, headerTypography, onClose } = t0;
9
+ var BottomSheetHeader = ({ label, dragControls, isDismissable, hideThumb, hideHeader, headerTypography, onClose }) => {
13
10
  const { t } = useTranslation("ui");
14
- const t1 = !isDismissable && "pt-list-height-title-top";
15
- let t2;
16
- if ($[0] !== t1) {
17
- t2 = clsx("pb-list-height-title-bottom", t1);
18
- $[0] = t1;
19
- $[1] = t2;
20
- } else t2 = $[1];
21
- let t3;
22
- if ($[2] !== dragControls || $[3] !== hideThumb || $[4] !== isDismissable) {
23
- t3 = isDismissable && !hideThumb && /* @__PURE__ */ jsx("div", {
11
+ return /* @__PURE__ */ jsxs("div", {
12
+ className: clsx("pb-list-height-title-bottom", !isDismissable && "pt-list-height-title-top"),
13
+ children: [isDismissable && !hideThumb && /* @__PURE__ */ jsx("div", {
24
14
  className: "flex shrink-0 cursor-grab touch-none justify-center px-list-side-title pt-list-height-title-top pb-2-5",
25
15
  onPointerDown: (e) => {
26
16
  e.preventDefault();
@@ -28,15 +18,7 @@ var BottomSheetHeader = (t0) => {
28
18
  },
29
19
  "aria-hidden": true,
30
20
  children: /* @__PURE__ */ jsx("div", { className: "h-1 w-16 shrink-0 rounded-full bg-elevation-fill-default-3" })
31
- });
32
- $[2] = dragControls;
33
- $[3] = hideThumb;
34
- $[4] = isDismissable;
35
- $[5] = t3;
36
- } else t3 = $[5];
37
- let t4;
38
- if ($[6] !== headerTypography || $[7] !== hideHeader || $[8] !== isDismissable || $[9] !== label || $[10] !== onClose || $[11] !== t) {
39
- t4 = !hideHeader && /* @__PURE__ */ jsxs("div", {
21
+ }), !hideHeader && /* @__PURE__ */ jsxs("div", {
40
22
  className: "flex justify-between px-list-side-title",
41
23
  children: [/* @__PURE__ */ jsx(Typography, {
42
24
  size: "label-2",
@@ -45,34 +27,12 @@ var BottomSheetHeader = (t0) => {
45
27
  children: label
46
28
  }), onClose && isDismissable && /* @__PURE__ */ jsx(Button, {
47
29
  onPress: onClose,
48
- "aria-label": t(_temp),
30
+ "aria-label": t(($) => $.ui.closeAlt),
49
31
  className: "-m-2 shrink-0 p-2 text-interactive-text-secondary-idle focus-visible:outline-interactive-text-secondary-focus",
50
32
  children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-6" })
51
33
  })]
52
- });
53
- $[6] = headerTypography;
54
- $[7] = hideHeader;
55
- $[8] = isDismissable;
56
- $[9] = label;
57
- $[10] = onClose;
58
- $[11] = t;
59
- $[12] = t4;
60
- } else t4 = $[12];
61
- let t5;
62
- if ($[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
63
- t5 = /* @__PURE__ */ jsxs("div", {
64
- className: t2,
65
- children: [t3, t4]
66
- });
67
- $[13] = t2;
68
- $[14] = t3;
69
- $[15] = t4;
70
- $[16] = t5;
71
- } else t5 = $[16];
72
- return t5;
34
+ })]
35
+ });
73
36
  };
74
- function _temp($) {
75
- return $.ui.closeAlt;
76
- }
77
37
  //#endregion
78
38
  export { BottomSheetHeader };
@@ -1,77 +1,35 @@
1
1
  import { modalOverlay } from "../Modal/modal.cva.js";
2
- import { c } from "react/compiler-runtime";
3
2
  import { jsx, jsxs } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
4
  import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
6
5
  //#region src/components/overlays/Drawer/Drawer.tsx
7
- var Drawer = (t0) => {
8
- const $ = c(25);
9
- const { label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside } = t0;
10
- if (trigger) {
11
- let t1;
12
- if ($[0] !== children || $[1] !== className || $[2] !== dialogClassName || $[3] !== isDismissable || $[4] !== label || $[5] !== overlayClassName || $[6] !== portalContainerRef || $[7] !== shouldCloseOnInteractOutside) {
13
- t1 = /* @__PURE__ */ jsx(DrawerOverlay, {
14
- label,
15
- portalContainerRef,
16
- isDismissable,
17
- overlayClassName,
18
- dialogClassName,
19
- className,
20
- shouldCloseOnInteractOutside,
21
- children
22
- });
23
- $[0] = children;
24
- $[1] = className;
25
- $[2] = dialogClassName;
26
- $[3] = isDismissable;
27
- $[4] = label;
28
- $[5] = overlayClassName;
29
- $[6] = portalContainerRef;
30
- $[7] = shouldCloseOnInteractOutside;
31
- $[8] = t1;
32
- } else t1 = $[8];
33
- let t2;
34
- if ($[9] !== isOpen || $[10] !== onOpenChange || $[11] !== t1 || $[12] !== trigger) {
35
- t2 = /* @__PURE__ */ jsxs(DialogTrigger, {
36
- isOpen,
37
- onOpenChange,
38
- children: [trigger, t1]
39
- });
40
- $[9] = isOpen;
41
- $[10] = onOpenChange;
42
- $[11] = t1;
43
- $[12] = trigger;
44
- $[13] = t2;
45
- } else t2 = $[13];
46
- return t2;
47
- }
48
- let t1;
49
- if ($[14] !== children || $[15] !== className || $[16] !== dialogClassName || $[17] !== isDismissable || $[18] !== isOpen || $[19] !== label || $[20] !== onOpenChange || $[21] !== overlayClassName || $[22] !== portalContainerRef || $[23] !== shouldCloseOnInteractOutside) {
50
- t1 = /* @__PURE__ */ jsx(DrawerOverlay, {
51
- isOpen,
52
- onOpenChange,
6
+ var Drawer = ({ label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
7
+ if (trigger) return /* @__PURE__ */ jsxs(DialogTrigger, {
8
+ isOpen,
9
+ onOpenChange,
10
+ children: [trigger, /* @__PURE__ */ jsx(DrawerOverlay, {
11
+ label,
53
12
  portalContainerRef,
54
13
  isDismissable,
55
14
  overlayClassName,
56
15
  dialogClassName,
57
16
  className,
58
- label,
59
17
  shouldCloseOnInteractOutside,
60
18
  children
61
- });
62
- $[14] = children;
63
- $[15] = className;
64
- $[16] = dialogClassName;
65
- $[17] = isDismissable;
66
- $[18] = isOpen;
67
- $[19] = label;
68
- $[20] = onOpenChange;
69
- $[21] = overlayClassName;
70
- $[22] = portalContainerRef;
71
- $[23] = shouldCloseOnInteractOutside;
72
- $[24] = t1;
73
- } else t1 = $[24];
74
- return t1;
19
+ })]
20
+ });
21
+ return /* @__PURE__ */ jsx(DrawerOverlay, {
22
+ isOpen,
23
+ onOpenChange,
24
+ portalContainerRef,
25
+ isDismissable,
26
+ overlayClassName,
27
+ dialogClassName,
28
+ className,
29
+ label,
30
+ shouldCloseOnInteractOutside,
31
+ children
32
+ });
75
33
  };
76
34
  var DrawerOverlay = ({ label, isOpen, onOpenChange, portalContainerRef, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
77
35
  return /* @__PURE__ */ jsx(ModalOverlay, {