@povio/ui 3.3.0-rc.4 → 3.4.0-rc.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 (125) hide show
  1. package/README.md +15 -1
  2. package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
  3. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  4. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  5. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
  6. package/dist/components/inputs/Checkbox/Checkbox.js +93 -100
  7. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  8. package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
  9. package/dist/components/inputs/Checkbox/CheckboxGroup.js +109 -113
  10. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -2
  11. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +97 -238
  12. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -2
  13. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +88 -214
  14. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -2
  15. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +64 -143
  16. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -2
  17. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +275 -294
  18. package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
  19. package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
  20. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
  21. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
  22. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
  23. package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
  24. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +1 -2
  25. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -343
  26. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  27. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
  28. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +43 -46
  29. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  30. package/dist/components/inputs/File/FileUpload.js +18 -18
  31. package/dist/components/inputs/File/InputUpload.d.ts +1 -1
  32. package/dist/components/inputs/File/InputUpload.js +82 -278
  33. package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
  34. package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
  35. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
  36. package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
  37. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
  38. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
  39. package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
  40. package/dist/components/inputs/FormField/FormField.js +34 -47
  41. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
  42. package/dist/components/inputs/Input/NumberInput/NumberInput.js +19 -19
  43. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -1
  44. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -331
  45. package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
  46. package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -1
  47. package/dist/components/inputs/Input/TextArea/TextArea.js +18 -18
  48. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
  49. package/dist/components/inputs/Input/TextInput/TextInput.js +36 -38
  50. package/dist/components/inputs/Inputs/Form.d.ts +4 -4
  51. package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
  52. package/dist/components/inputs/Inputs/InputItem.js +35 -36
  53. package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
  54. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  55. package/dist/components/inputs/RadioGroup/RadioGroup.js +107 -111
  56. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
  57. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +26 -86
  58. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
  59. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +19 -19
  60. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
  61. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
  62. package/dist/components/inputs/Selection/Select/QuerySelect.js +49 -115
  63. package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
  64. package/dist/components/inputs/Selection/Select/Select.js +22 -22
  65. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +0 -1
  66. package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
  67. package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
  68. package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
  69. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  70. package/dist/components/inputs/Selection/shared/select.context.js +4 -8
  71. package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
  72. package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
  73. package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
  74. package/dist/components/inputs/Slider/Slider.d.ts +1 -1
  75. package/dist/components/inputs/Slider/Slider.js +18 -18
  76. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
  77. package/dist/components/inputs/TextEditor/TextEditor.js +105 -407
  78. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
  79. package/dist/components/inputs/Toggle/Toggle.js +59 -63
  80. package/dist/components/inputs/shared/InputClear.js +24 -40
  81. package/dist/components/inputs/shared/form.binding.d.ts +27 -0
  82. package/dist/components/inputs/shared/form.binding.js +57 -0
  83. package/dist/components/inputs/shared/form.types.d.ts +9 -8
  84. package/dist/components/inputs/shared/form.types.js +8 -0
  85. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  86. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  87. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  88. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  89. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
  90. package/dist/components/segment/Segment.d.ts +1 -1
  91. package/dist/components/segment/Segment.js +17 -17
  92. package/dist/components/segment/segment.types.d.ts +1 -1
  93. package/dist/components/shared/pagination/Pagination.js +22 -108
  94. package/dist/components/status/Alert/Alert.js +30 -97
  95. package/dist/components/table/InfiniteTable.js +16 -67
  96. package/dist/components/table/Table.d.ts +2 -8
  97. package/dist/components/table/Table.js +33 -55
  98. package/dist/components/text/Typography/Typography.js +8 -23
  99. package/dist/config/confirmation.context.js +1 -1
  100. package/dist/config/theme.context.js +45 -98
  101. package/dist/config/uiConfig.context.d.ts +5 -5
  102. package/dist/config/uiConfig.context.js +11 -51
  103. package/dist/config/uiOverrides.context.d.ts +0 -1
  104. package/dist/helpers/dynamicColumns.d.ts +1 -1
  105. package/dist/helpers/dynamicInputs.d.ts +7 -7
  106. package/dist/hooks/useAutosave.d.ts +4 -4
  107. package/dist/hooks/useAutosave.js +64 -49
  108. package/dist/hooks/useDebounceCallback.js +17 -51
  109. package/dist/hooks/useForm.d.ts +39 -15
  110. package/dist/hooks/useForm.js +96 -43
  111. package/dist/hooks/useFormAutosave.d.ts +8 -9
  112. package/dist/hooks/useFormAutosave.js +49 -122
  113. package/dist/hooks/useLongPressRepeat.js +20 -55
  114. package/dist/index.d.ts +2 -3
  115. package/dist/index.js +3 -4
  116. package/package.json +3 -4
  117. package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
  118. package/dist/components/inputs/FormField/formField.cva.js +0 -16
  119. package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
  120. package/dist/components/table/TableColumnFilterInput.js +0 -108
  121. package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
  122. package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
  123. package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
  124. package/dist/components/table/TableColumnFilterRow.js +0 -68
  125. package/dist/hooks/useAutosave.spec.d.ts +0 -1
@@ -2,15 +2,10 @@ import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
2
2
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
3
3
  import { Typography } from "../../text/Typography/Typography.js";
4
4
  import { accordionChevronDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition } from "./accordion.cva.js";
5
- import { c } from "react/compiler-runtime";
6
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
6
  import { Button, Disclosure, DisclosurePanel, Heading } from "react-aria-components";
8
7
  //#region src/components/navigation/Accordion/AccordionItem.tsx
9
- var AccordionItem = (t0) => {
10
- const $ = c(25);
11
- const { id, disabled, heading, subheading, children, icon: Icon, variant: t1, actionPosition: t2, isSingle } = t0;
12
- const variant = t1 === void 0 ? "filled" : t1;
13
- const actionPosition = t2 === void 0 ? "right" : t2;
8
+ var AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon, variant = "filled", actionPosition = "right", isSingle }) => {
14
9
  const itemCva = UIOverrides.useCva("accordion.itemCva", accordionItemDefinition);
15
10
  const triggerCva = UIOverrides.useCva("accordion.triggerCva", accordionTriggerDefinition);
16
11
  const headingCva = UIOverrides.useCva("accordion.headingCva", accordionHeadingDefinition);
@@ -20,89 +15,49 @@ var AccordionItem = (t0) => {
20
15
  const iconCva = UIOverrides.useCva("accordion.iconCva", accordionIconDefinition);
21
16
  const panelCva = UIOverrides.useCva("accordion.panelCva", accordionPanelDefinition);
22
17
  const panelContentCva = UIOverrides.useCva("accordion.panelContentCva", accordionPanelContentDefinition);
23
- let t3;
24
- if ($[0] !== isSingle || $[1] !== itemCva || $[2] !== variant) {
25
- t3 = itemCva({
18
+ return /* @__PURE__ */ jsx(Disclosure, {
19
+ id,
20
+ className: itemCva({
26
21
  variant,
27
22
  singleItem: isSingle
28
- });
29
- $[0] = isSingle;
30
- $[1] = itemCva;
31
- $[2] = variant;
32
- $[3] = t3;
33
- } else t3 = $[3];
34
- let t4;
35
- if ($[4] !== Icon || $[5] !== actionPosition || $[6] !== chevronCva || $[7] !== children || $[8] !== disabled || $[9] !== heading || $[10] !== headingCva || $[11] !== headingSubtitleCva || $[12] !== headingTitleCva || $[13] !== iconCva || $[14] !== panelContentCva || $[15] !== panelCva || $[16] !== subheading || $[17] !== triggerCva || $[18] !== variant) {
36
- t4 = (t5) => {
37
- const { isExpanded } = t5;
38
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heading, { children: /* @__PURE__ */ jsxs(Button, {
39
- slot: "trigger",
40
- className: triggerCva({
41
- variant,
42
- actionPosition,
43
- disabled
44
- }),
45
- children: [/* @__PURE__ */ jsx("div", {
46
- className: headingCva({}),
47
- children: /* @__PURE__ */ jsxs("div", {
48
- className: "flex flex-1 items-center gap-accordion-gap-icon-to-text",
49
- children: [
50
- Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({}) }),
51
- /* @__PURE__ */ jsx(Typography, {
52
- size: "label-2",
53
- variant: "default",
54
- className: headingTitleCva({}),
55
- children: heading
56
- }),
57
- subheading && /* @__PURE__ */ jsx(Typography, {
58
- size: "label-3",
59
- variant: "default",
60
- className: headingSubtitleCva({}),
61
- children: subheading
62
- })
63
- ]
64
- })
65
- }), /* @__PURE__ */ jsx(ChevronDownIcon, { className: chevronCva({ isExpanded }) })]
66
- }) }), /* @__PURE__ */ jsx(DisclosurePanel, {
67
- className: panelCva({ isExpanded }),
68
- children: /* @__PURE__ */ jsx("div", {
69
- className: panelContentCva({}),
70
- children
23
+ }),
24
+ isDisabled: disabled,
25
+ children: ({ isExpanded }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heading, { children: /* @__PURE__ */ jsxs(Button, {
26
+ slot: "trigger",
27
+ className: triggerCva({
28
+ variant,
29
+ actionPosition,
30
+ disabled
31
+ }),
32
+ children: [/* @__PURE__ */ jsx("div", {
33
+ className: headingCva({}),
34
+ children: /* @__PURE__ */ jsxs("div", {
35
+ className: "flex flex-1 items-center gap-accordion-gap-icon-to-text",
36
+ children: [
37
+ Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({}) }),
38
+ /* @__PURE__ */ jsx(Typography, {
39
+ size: "label-2",
40
+ variant: "default",
41
+ className: headingTitleCva({}),
42
+ children: heading
43
+ }),
44
+ subheading && /* @__PURE__ */ jsx(Typography, {
45
+ size: "label-3",
46
+ variant: "default",
47
+ className: headingSubtitleCva({}),
48
+ children: subheading
49
+ })
50
+ ]
71
51
  })
72
- })] });
73
- };
74
- $[4] = Icon;
75
- $[5] = actionPosition;
76
- $[6] = chevronCva;
77
- $[7] = children;
78
- $[8] = disabled;
79
- $[9] = heading;
80
- $[10] = headingCva;
81
- $[11] = headingSubtitleCva;
82
- $[12] = headingTitleCva;
83
- $[13] = iconCva;
84
- $[14] = panelContentCva;
85
- $[15] = panelCva;
86
- $[16] = subheading;
87
- $[17] = triggerCva;
88
- $[18] = variant;
89
- $[19] = t4;
90
- } else t4 = $[19];
91
- let t5;
92
- if ($[20] !== disabled || $[21] !== id || $[22] !== t3 || $[23] !== t4) {
93
- t5 = /* @__PURE__ */ jsx(Disclosure, {
94
- id,
95
- className: t3,
96
- isDisabled: disabled,
97
- children: t4
98
- });
99
- $[20] = disabled;
100
- $[21] = id;
101
- $[22] = t3;
102
- $[23] = t4;
103
- $[24] = t5;
104
- } else t5 = $[24];
105
- return t5;
52
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, { className: chevronCva({ isExpanded }) })]
53
+ }) }), /* @__PURE__ */ jsx(DisclosurePanel, {
54
+ className: panelCva({ isExpanded }),
55
+ children: /* @__PURE__ */ jsx("div", {
56
+ className: panelContentCva({}),
57
+ children
58
+ })
59
+ })] })
60
+ });
106
61
  };
107
62
  //#endregion
108
63
  export { AccordionItem };
@@ -2,78 +2,33 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
2
  import { stepperDefinition } from "./stepper.cva.js";
3
3
  import { StepperItem } from "./StepperItem.js";
4
4
  import { StepperSeparator } from "./StepperSeparator.js";
5
- import { c } from "react/compiler-runtime";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { Fragment as Fragment$1 } from "react";
8
7
  //#region src/components/navigation/Stepper/Stepper.tsx
9
- var Stepper = (t0) => {
10
- const $ = c(23);
11
- const { steps, currentStep, orientation: t1, contentOrientation: t2, iconsOnly, titlesOnly, onStepClick, className } = t0;
12
- const orientation = t1 === void 0 ? "horizontal" : t1;
13
- const contentOrientation = t2 === void 0 ? "horizontal" : t2;
14
- const stepperCva = UIOverrides.useCva("stepper.cva", stepperDefinition);
15
- let t3;
16
- if ($[0] !== className || $[1] !== orientation || $[2] !== stepperCva) {
17
- t3 = stepperCva({
8
+ var Stepper = ({ steps, currentStep, orientation = "horizontal", contentOrientation = "horizontal", iconsOnly, titlesOnly, onStepClick, className }) => {
9
+ return /* @__PURE__ */ jsx("div", {
10
+ className: UIOverrides.useCva("stepper.cva", stepperDefinition)({
18
11
  orientation,
19
12
  className
20
- });
21
- $[0] = className;
22
- $[1] = orientation;
23
- $[2] = stepperCva;
24
- $[3] = t3;
25
- } else t3 = $[3];
26
- let t4;
27
- if ($[4] !== contentOrientation || $[5] !== currentStep || $[6] !== iconsOnly || $[7] !== onStepClick || $[8] !== orientation || $[9] !== steps || $[10] !== titlesOnly) {
28
- let t5;
29
- if ($[12] !== contentOrientation || $[13] !== currentStep || $[14] !== iconsOnly || $[15] !== onStepClick || $[16] !== orientation || $[17] !== steps.length || $[18] !== titlesOnly) {
30
- t5 = (step, index) => {
31
- const status = index < currentStep ? "completed" : index === currentStep ? "active" : "todo";
32
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepperItem, {
33
- step,
34
- stepNumber: index + 1,
35
- status,
36
- contentOrientation,
37
- iconsOnly,
38
- titlesOnly,
39
- onPress: onStepClick && status === "completed" ? () => onStepClick(index) : void 0
40
- }), index < steps.length - 1 && /* @__PURE__ */ jsx(StepperSeparator, {
41
- orientation,
42
- contentOrientation
43
- })] }, step.id);
44
- };
45
- $[12] = contentOrientation;
46
- $[13] = currentStep;
47
- $[14] = iconsOnly;
48
- $[15] = onStepClick;
49
- $[16] = orientation;
50
- $[17] = steps.length;
51
- $[18] = titlesOnly;
52
- $[19] = t5;
53
- } else t5 = $[19];
54
- t4 = steps.map(t5);
55
- $[4] = contentOrientation;
56
- $[5] = currentStep;
57
- $[6] = iconsOnly;
58
- $[7] = onStepClick;
59
- $[8] = orientation;
60
- $[9] = steps;
61
- $[10] = titlesOnly;
62
- $[11] = t4;
63
- } else t4 = $[11];
64
- let t5;
65
- if ($[20] !== t3 || $[21] !== t4) {
66
- t5 = /* @__PURE__ */ jsx("div", {
67
- className: t3,
68
- role: "group",
69
- "aria-label": "Progress",
70
- children: t4
71
- });
72
- $[20] = t3;
73
- $[21] = t4;
74
- $[22] = t5;
75
- } else t5 = $[22];
76
- return t5;
13
+ }),
14
+ role: "group",
15
+ "aria-label": "Progress",
16
+ children: steps.map((step, index) => {
17
+ const status = index < currentStep ? "completed" : index === currentStep ? "active" : "todo";
18
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepperItem, {
19
+ step,
20
+ stepNumber: index + 1,
21
+ status,
22
+ contentOrientation,
23
+ iconsOnly,
24
+ titlesOnly,
25
+ onPress: onStepClick && status === "completed" ? () => onStepClick(index) : void 0
26
+ }), index < steps.length - 1 && /* @__PURE__ */ jsx(StepperSeparator, {
27
+ orientation,
28
+ contentOrientation
29
+ })] }, step.id);
30
+ })
31
+ });
77
32
  };
78
33
  //#endregion
79
34
  export { Stepper };
@@ -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,125 +2,44 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
2
  import { BottomSheet } from "../BottomSheet/BottomSheet.js";
3
3
  import { useBreakpoint } from "../../../hooks/useBreakpoint.js";
4
4
  import { popoverDefinition } from "../../shared/popover.cva.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
  import { Dialog, DialogTrigger, Popover } from "react-aria-components";
9
8
  //#region src/components/overlays/ResponsivePopover/ResponsivePopover.tsx
10
- var ResponsivePopover = (t0) => {
11
- const $ = c(33);
12
- const { trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps, popoverProps } = t0;
9
+ var ResponsivePopover = ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps, popoverProps }) => {
13
10
  const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
14
11
  const isDesktop = useBreakpoint("md");
15
- let t1;
16
- if ($[0] !== popoverProps) {
17
- t1 = popoverProps ?? {};
18
- $[0] = popoverProps;
19
- $[1] = t1;
20
- } else t1 = $[1];
21
- let restPopoverProps;
22
- let t2;
23
- let t3;
24
- if ($[2] !== t1) {
25
- ({offset: t2, placement: t3, ...restPopoverProps} = t1);
26
- $[2] = t1;
27
- $[3] = restPopoverProps;
28
- $[4] = t2;
29
- $[5] = t3;
30
- } else {
31
- restPopoverProps = $[3];
32
- t2 = $[4];
33
- t3 = $[5];
34
- }
35
- const offset = t2 === void 0 ? 0 : t2;
36
- const placement = t3 === void 0 ? "bottom start" : t3;
37
- if (!isDesktop) {
38
- let t4;
39
- if ($[6] !== children) {
40
- t4 = /* @__PURE__ */ jsx("div", {
41
- className: "p-4",
42
- children
43
- });
44
- $[6] = children;
45
- $[7] = t4;
46
- } else t4 = $[7];
47
- let t5;
48
- if ($[8] !== bottomSheetProps || $[9] !== isOpen || $[10] !== onOpenChange || $[11] !== sheetLabel || $[12] !== t4 || $[13] !== trigger) {
49
- t5 = /* @__PURE__ */ jsx(BottomSheet, {
50
- height: "auto",
51
- isDismissable: true,
52
- label: sheetLabel,
53
- ...bottomSheetProps,
54
- isOpen,
55
- onOpenChange,
56
- trigger,
57
- children: t4
58
- });
59
- $[8] = bottomSheetProps;
60
- $[9] = isOpen;
61
- $[10] = onOpenChange;
62
- $[11] = sheetLabel;
63
- $[12] = t4;
64
- $[13] = trigger;
65
- $[14] = t5;
66
- } else t5 = $[14];
67
- return t5;
68
- }
69
- let t4;
70
- if ($[15] !== popoverClassName) {
71
- t4 = clsx("my-4 outline-none", popoverClassName);
72
- $[15] = popoverClassName;
73
- $[16] = t4;
74
- } else t4 = $[16];
75
- let t5;
76
- if ($[17] !== popoverCva) {
77
- t5 = clsx(popoverCva({}), "overflow-hidden p-2");
78
- $[17] = popoverCva;
79
- $[18] = t5;
80
- } else t5 = $[18];
81
- let t6;
82
- if ($[19] !== children || $[20] !== t5) {
83
- t6 = /* @__PURE__ */ jsx(Dialog, {
84
- className: "outline-none",
85
- children: /* @__PURE__ */ jsx("div", {
86
- className: t5,
87
- children
88
- })
89
- });
90
- $[19] = children;
91
- $[20] = t5;
92
- $[21] = t6;
93
- } else t6 = $[21];
94
- let t7;
95
- if ($[22] !== offset || $[23] !== placement || $[24] !== restPopoverProps || $[25] !== t4 || $[26] !== t6) {
96
- t7 = /* @__PURE__ */ jsx(Popover, {
12
+ const { offset = 0, placement = "bottom start", ...restPopoverProps } = popoverProps ?? {};
13
+ if (!isDesktop) return /* @__PURE__ */ jsx(BottomSheet, {
14
+ height: "auto",
15
+ isDismissable: true,
16
+ label: sheetLabel,
17
+ ...bottomSheetProps,
18
+ isOpen,
19
+ onOpenChange,
20
+ trigger,
21
+ children: /* @__PURE__ */ jsx("div", {
22
+ className: "p-4",
23
+ children
24
+ })
25
+ });
26
+ return /* @__PURE__ */ jsxs(DialogTrigger, {
27
+ isOpen,
28
+ onOpenChange,
29
+ children: [trigger, /* @__PURE__ */ jsx(Popover, {
97
30
  ...restPopoverProps,
98
- className: t4,
31
+ className: clsx("my-4 outline-none", popoverClassName),
99
32
  offset,
100
33
  placement,
101
- children: t6
102
- });
103
- $[22] = offset;
104
- $[23] = placement;
105
- $[24] = restPopoverProps;
106
- $[25] = t4;
107
- $[26] = t6;
108
- $[27] = t7;
109
- } else t7 = $[27];
110
- let t8;
111
- if ($[28] !== isOpen || $[29] !== onOpenChange || $[30] !== t7 || $[31] !== trigger) {
112
- t8 = /* @__PURE__ */ jsxs(DialogTrigger, {
113
- isOpen,
114
- onOpenChange,
115
- children: [trigger, t7]
116
- });
117
- $[28] = isOpen;
118
- $[29] = onOpenChange;
119
- $[30] = t7;
120
- $[31] = trigger;
121
- $[32] = t8;
122
- } else t8 = $[32];
123
- return t8;
34
+ children: /* @__PURE__ */ jsx(Dialog, {
35
+ className: "outline-none",
36
+ children: /* @__PURE__ */ jsx("div", {
37
+ className: clsx(popoverCva({}), "overflow-hidden p-2"),
38
+ children
39
+ })
40
+ })
41
+ })]
42
+ });
124
43
  };
125
44
  //#endregion
126
45
  export { ResponsivePopover };
@@ -1,4 +1,4 @@
1
1
  import { Key } from 'react-aria-components';
2
- import { FieldValues } from 'react-hook-form';
2
+ import { FieldValues } from '../inputs/shared/form.binding';
3
3
  import { ControlledSegmentProps } from './segment.types';
4
4
  export declare const Segment: <TFieldValues extends FieldValues, TKey extends Key = Key>(props: ControlledSegmentProps<TFieldValues, TKey>) => import("react/jsx-runtime").JSX.Element;