@povio/ui 3.4.0-rc.17 → 3.4.0-rc.18

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 (211) hide show
  1. package/README.md +20 -1
  2. package/dist/components/Menu/Menu.d.ts +23 -0
  3. package/dist/components/Menu/Menu.js +27 -0
  4. package/dist/components/Menu/MenuItem.d.ts +1 -1
  5. package/dist/components/Menu/MenuPopover.d.ts +1 -1
  6. package/dist/components/accordion.d.ts +3 -5
  7. package/dist/components/accordion.js +1 -80
  8. package/dist/components/action-modal.d.ts +1 -1
  9. package/dist/components/action-modal.js +1 -1
  10. package/dist/components/alert.js +1 -1
  11. package/dist/components/autocomplete.js +1 -1
  12. package/dist/components/breadcrumbs.js +1 -1
  13. package/dist/components/checkbox-group.js +2 -2
  14. package/dist/components/checkbox.js +2 -2
  15. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +3 -3
  16. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +4 -4
  17. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +3 -3
  18. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +3 -3
  19. package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
  20. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
  21. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +2 -2
  22. package/dist/components/inputs/DateTime/shared/MonthPicker.js +1 -1
  23. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +1 -1
  24. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +2 -2
  25. package/dist/components/inputs/DateTime/shared/YearPicker.js +1 -1
  26. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +1 -1
  27. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +1 -1
  28. package/dist/components/inputs/File/shared/FileUploadContentError.js +1 -1
  29. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +1 -1
  30. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +1 -1
  31. package/dist/components/inputs/File/shared/InputUploadContent.js +1 -1
  32. package/dist/components/inputs/File/shared/InputUploadFilled.js +1 -1
  33. package/dist/components/inputs/File/shared/ProgressBar.js +1 -1
  34. package/dist/components/inputs/FormField/FormFieldHeader.js +1 -1
  35. package/dist/components/inputs/Input/shared/InputContent.js +1 -1
  36. package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
  37. package/dist/components/inputs/Inputs/InputItem.js +5 -5
  38. package/dist/components/inputs/Selection/Select/Select.js +2 -2
  39. package/dist/components/inputs/Selection/shared/SelectDesktop.js +2 -2
  40. package/dist/components/inputs/Selection/shared/SelectInput.js +3 -3
  41. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +1 -1
  42. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +1 -1
  43. package/dist/components/inputs/Skeleton/InputFrame.js +1 -1
  44. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +1 -1
  45. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +1 -1
  46. package/dist/components/menu.d.ts +3 -23
  47. package/dist/components/menu.js +3 -27
  48. package/dist/components/navigation/Accordion/Accordion.d.ts +5 -0
  49. package/dist/components/navigation/Accordion/Accordion.js +81 -0
  50. package/dist/components/navigation/Accordion/AccordionItem.js +1 -1
  51. package/dist/components/navigation/Stepper/Stepper.d.ts +5 -0
  52. package/dist/components/navigation/Stepper/Stepper.js +79 -0
  53. package/dist/components/navigation/Stepper/StepperItem.js +1 -1
  54. package/dist/components/number-input.js +3 -3
  55. package/dist/components/number-range-input.js +2 -2
  56. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +1 -1
  57. package/dist/components/{shared/pagination/PaginationList.d.ts → pagination-list.d.ts} +1 -1
  58. package/dist/components/{shared/pagination/PaginationList.js → pagination-list.js} +3 -3
  59. package/dist/components/pagination.d.ts +1 -1
  60. package/dist/components/pagination.js +2 -2
  61. package/dist/components/pill.d.ts +1 -1
  62. package/dist/components/pill.js +1 -1
  63. package/dist/components/progress-bar.d.ts +2 -0
  64. package/dist/components/progress-bar.js +2 -0
  65. package/dist/components/radio-group.js +1 -1
  66. package/dist/components/segment/Segment.d.ts +7 -0
  67. package/dist/components/segment/Segment.js +245 -0
  68. package/dist/components/segment/SegmentItem.js +1 -1
  69. package/dist/components/segment.d.ts +3 -7
  70. package/dist/components/segment.js +1 -244
  71. package/dist/components/slider.js +1 -1
  72. package/dist/components/split-button.d.ts +1 -1
  73. package/dist/components/split-button.js +1 -1
  74. package/dist/components/status/Toast/Toast.d.ts +17 -0
  75. package/dist/components/status/Toast/Toast.js +82 -0
  76. package/dist/components/stepper.d.ts +3 -5
  77. package/dist/components/stepper.js +1 -78
  78. package/dist/components/table/CellText.d.ts +1 -1
  79. package/dist/components/table/CellText.js +1 -1
  80. package/dist/components/table/ColumnConfig.js +1 -1
  81. package/dist/components/table/HeaderText.d.ts +1 -1
  82. package/dist/components/table/HeaderText.js +1 -1
  83. package/dist/components/tag.d.ts +1 -1
  84. package/dist/components/tag.js +1 -1
  85. package/dist/components/text/Typography/Typography.d.ts +12 -0
  86. package/dist/components/text/Typography/Typography.js +31 -0
  87. package/dist/components/text-area.js +1 -1
  88. package/dist/components/text-input.js +2 -2
  89. package/dist/components/toast.d.ts +2 -16
  90. package/dist/components/toast.js +1 -81
  91. package/dist/components/tooltip.js +1 -1
  92. package/dist/components/typography.d.ts +2 -11
  93. package/dist/components/typography.js +1 -30
  94. package/dist/components/use-toast.d.ts +16 -0
  95. package/dist/components/{status/Toast/useToast.js → use-toast.js} +1 -1
  96. package/dist/config/confirmation.d.ts +2 -0
  97. package/dist/config/confirmation.js +2 -0
  98. package/dist/config/link-context.d.ts +3 -0
  99. package/dist/config/link-context.js +2 -0
  100. package/dist/config/resources.d.ts +2 -0
  101. package/dist/config/resources.js +2 -0
  102. package/dist/config/theme-context.d.ts +2 -0
  103. package/dist/config/theme-context.js +2 -0
  104. package/dist/config/ui-config.d.ts +2 -0
  105. package/dist/config/ui-config.js +2 -0
  106. package/dist/config/ui-overrides.d.ts +2 -0
  107. package/dist/config/ui-overrides.js +2 -0
  108. package/dist/config/ui-router.d.ts +2 -0
  109. package/dist/config/ui-router.js +2 -0
  110. package/dist/config/uiConfig.context.d.ts +1 -1
  111. package/dist/helpers/dynamicInputs.d.ts +1 -1
  112. package/dist/hooks/use-filters.d.ts +2 -0
  113. package/dist/hooks/use-filters.js +2 -0
  114. package/dist/hooks/use-local-storage.d.ts +2 -0
  115. package/dist/hooks/use-local-storage.js +2 -0
  116. package/dist/hooks/use-translation-memo.d.ts +2 -0
  117. package/dist/hooks/use-translation-memo.js +2 -0
  118. package/dist/hooks/useTableNav.js +1 -1
  119. package/dist/icons.d.ts +2 -0
  120. package/dist/icons.js +2 -0
  121. package/dist/index.d.ts +59 -39
  122. package/dist/index.js +43 -23
  123. package/dist/rhf/Inputs.d.ts +19 -1
  124. package/dist/rhf/{Inputs.js → Inputs2.js} +18 -1
  125. package/dist/rhf/autocomplete.d.ts +15 -2
  126. package/dist/rhf/autocomplete.js +8 -1
  127. package/dist/rhf/checkbox-group.d.ts +8 -2
  128. package/dist/rhf/checkbox-group.js +8 -1
  129. package/dist/rhf/checkbox.d.ts +8 -2
  130. package/dist/rhf/checkbox.js +8 -1
  131. package/dist/rhf/components.d.ts +30 -69
  132. package/dist/rhf/date-picker.d.ts +8 -2
  133. package/dist/rhf/date-picker.js +9 -1
  134. package/dist/rhf/date-range-picker.d.ts +8 -2
  135. package/dist/rhf/date-range-picker.js +9 -1
  136. package/dist/rhf/date-time-picker.d.ts +8 -2
  137. package/dist/rhf/date-time-picker.js +9 -1
  138. package/dist/rhf/date.transforms.js +15 -0
  139. package/dist/rhf/entry.utils.js +19 -2
  140. package/dist/rhf/file-upload.d.ts +10 -0
  141. package/dist/rhf/file-upload.js +7 -0
  142. package/dist/rhf/input-upload.d.ts +10 -0
  143. package/dist/rhf/input-upload.js +7 -0
  144. package/dist/rhf/inputs.js +3 -0
  145. package/dist/rhf/inputs2.d.ts +6 -0
  146. package/dist/rhf/number-input.js +2 -2
  147. package/dist/rhf/number-range-input.js +2 -2
  148. package/dist/rhf/password-input.js +2 -2
  149. package/dist/rhf/query-autocomplete.d.ts +14 -2
  150. package/dist/rhf/query-autocomplete.js +8 -1
  151. package/dist/rhf/query-select.d.ts +15 -2
  152. package/dist/rhf/query-select.js +8 -1
  153. package/dist/rhf/radio-group.d.ts +8 -2
  154. package/dist/rhf/radio-group.js +8 -1
  155. package/dist/rhf/segment.d.ts +8 -2
  156. package/dist/rhf/segment.js +6 -1
  157. package/dist/rhf/select.d.ts +15 -2
  158. package/dist/rhf/select.js +8 -1
  159. package/dist/rhf/slider.d.ts +7 -2
  160. package/dist/rhf/slider.js +6 -1
  161. package/dist/rhf/text-area.js +2 -2
  162. package/dist/rhf/text-editor.d.ts +8 -0
  163. package/dist/rhf/text-editor.js +7 -0
  164. package/dist/rhf/text-input.js +1 -1
  165. package/dist/rhf/time-picker.d.ts +8 -2
  166. package/dist/rhf/time-picker.js +9 -1
  167. package/dist/rhf/toggle.d.ts +8 -2
  168. package/dist/rhf/toggle.js +8 -1
  169. package/dist/rhf.d.ts +60 -39
  170. package/dist/rhf.js +43 -23
  171. package/dist/styles/input.d.ts +2 -0
  172. package/dist/styles/input.js +0 -0
  173. package/dist/styles/outline.d.ts +2 -0
  174. package/dist/styles/outline.js +2 -0
  175. package/dist/tanstack/file-upload.d.ts +3 -0
  176. package/dist/tanstack/file-upload.js +2 -0
  177. package/dist/tanstack/form.d.ts +2 -1
  178. package/dist/tanstack/form.js +2 -1
  179. package/dist/tanstack/input-upload.d.ts +3 -0
  180. package/dist/tanstack/input-upload.js +2 -0
  181. package/dist/tanstack/inputs.d.ts +6 -0
  182. package/dist/tanstack/inputs.js +3 -0
  183. package/dist/tanstack/segment.d.ts +1 -1
  184. package/dist/tanstack/segment.js +1 -1
  185. package/dist/tanstack/table.d.ts +2 -1
  186. package/dist/tanstack/table.js +2 -1
  187. package/dist/tanstack/text-editor.d.ts +2 -0
  188. package/dist/tanstack/text-editor.js +2 -0
  189. package/dist/tanstack.d.ts +40 -40
  190. package/dist/tanstack.js +30 -30
  191. package/dist/types/index.d.ts +2 -0
  192. package/dist/types/index.js +0 -0
  193. package/dist/utils/compound-mapper.d.ts +2 -0
  194. package/dist/utils/compound-mapper.js +2 -0
  195. package/dist/utils/date-time.d.ts +2 -0
  196. package/dist/utils/date-time.js +2 -0
  197. package/dist/utils/date.d.ts +2 -0
  198. package/dist/utils/date.js +2 -0
  199. package/dist/utils/file.d.ts +2 -0
  200. package/dist/utils/file.js +2 -0
  201. package/dist/utils/intl.d.ts +2 -0
  202. package/dist/utils/intl.js +2 -0
  203. package/dist/utils/logger.js +1 -18
  204. package/dist/utils/logger2.d.ts +2 -0
  205. package/dist/utils/logger2.js +19 -0
  206. package/dist/utils/string.d.ts +2 -0
  207. package/dist/utils/string.js +2 -0
  208. package/package.json +197 -10
  209. package/dist/components/status/Toast/useToast.d.ts +0 -16
  210. package/dist/rhf/components.js +0 -101
  211. /package/dist/styles/{editor.css → styles/editor.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  import "../../../../config/i18n.js";
3
- import { CheckboxCheckmark } from "../../Checkbox/CheckboxCheckmark.js";
4
3
  import { SelectContext } from "./select.context.js";
4
+ import { CheckboxCheckmark } from "../../Checkbox/CheckboxCheckmark.js";
5
5
  import { selectListBoxItemDefinition } from "./selectItem.cva.js";
6
6
  import { useRef } from "react";
7
7
  import { ListBoxItem } from "react-aria-components";
@@ -5,8 +5,8 @@ import { UIConfig } from "../../../config/uiConfig.context.js";
5
5
  import { InlineIconButton } from "../../inline-icon-button.js";
6
6
  import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
7
7
  import { FormField } from "../../form-field.js";
8
- import { inputBaseDefinition, inputContentWrapperDefinition, inputSizeDefinition } from "../shared/input.cva.js";
9
8
  import { InputClear } from "../shared/InputClear.js";
9
+ import { inputBaseDefinition, inputContentWrapperDefinition, inputSizeDefinition } from "../shared/input.cva.js";
10
10
  import { TooltipWrapper } from "../shared/TooltipWrapper.js";
11
11
  import { clsx } from "clsx";
12
12
  import { isValidElement, useId, useRef } from "react";
@@ -1,5 +1,5 @@
1
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
- import { Typography } from "../../../typography.js";
2
+ import { Typography } from "../../../text/Typography/Typography.js";
3
3
  import { useInputCva } from "../../shared/input.cva.js";
4
4
  import { popoverDefinition } from "../../../shared/popover.cva.js";
5
5
  import { ColorPicker } from "./ColorPicker.js";
@@ -1,4 +1,4 @@
1
- import { Typography } from "../../../typography.js";
1
+ import { Typography } from "../../../text/Typography/Typography.js";
2
2
  import "../../../../config/i18n.js";
3
3
  import { Select } from "../../Selection/Select/Select.js";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -1,23 +1,3 @@
1
- import { BottomSheetProps } from "./bottom-sheet.js";
2
- import { MenuCvaVariantProps, MenuItemVariantProps, MenuPopoverVariantProps, MenuPopoverWrapperVariantProps } from "./Menu/menu.cva.js";
3
- import { ReactElement } from "react";
4
- import { Key, MenuItemProps } from "react-aria-components";
5
- import { Placement } from "react-aria";
6
- //#region src/components/Menu/Menu.d.ts
7
- interface MenuItem extends Omit<MenuItemProps, "aria-label" | "textValue" | "children">, MenuItemVariantProps, MenuCvaVariantProps, MenuPopoverVariantProps, MenuPopoverWrapperVariantProps {
8
- label: string;
9
- content?: string | ReactElement;
10
- children?: MenuItem[];
11
- }
12
- type MenuBottomSheetProps = Partial<Omit<BottomSheetProps, "children" | "isOpen" | "onOpenChange" | "trigger">>;
13
- interface MenuProps {
14
- trigger: ReactElement;
15
- items: MenuItem[];
16
- closeDelay?: number;
17
- placement?: Placement;
18
- onAction?: (key: Key, e: any) => void;
19
- bottomSheetProps?: MenuBottomSheetProps;
20
- }
21
- declare const Menu: (props: MenuProps) => import("react/jsx-runtime").JSX.Element;
22
- //#endregion
23
- export { Menu, MenuItem, MenuProps };
1
+ import { Menu, MenuItem as MenuItem$1, MenuProps } from "./Menu/Menu.js";
2
+ import { MenuItem, MenuListItemProps } from "./Menu/MenuItem.js";
3
+ export { Menu, MenuItem, type MenuItem$1 as MenuItemDefinition, type MenuListItemProps, type MenuProps };
@@ -1,27 +1,3 @@
1
- import { MenuDesktop } from "./Menu/MenuDesktop.js";
2
- import { MenuMobile } from "./Menu/MenuMobile.js";
3
- import { useBreakpoint } from "../hooks/useBreakpoint.js";
4
- import { c } from "react/compiler-runtime";
5
- import { jsx } from "react/jsx-runtime";
6
- //#region src/components/Menu/Menu.tsx
7
- const Menu = (props) => {
8
- const $ = c(4);
9
- if (useBreakpoint("md")) {
10
- let t0;
11
- if ($[0] !== props) {
12
- t0 = /* @__PURE__ */ jsx(MenuDesktop, { ...props });
13
- $[0] = props;
14
- $[1] = t0;
15
- } else t0 = $[1];
16
- return t0;
17
- }
18
- let t0;
19
- if ($[2] !== props) {
20
- t0 = /* @__PURE__ */ jsx(MenuMobile, { ...props });
21
- $[2] = props;
22
- $[3] = t0;
23
- } else t0 = $[3];
24
- return t0;
25
- };
26
- //#endregion
27
- export { Menu };
1
+ import { MenuItem } from "./Menu/MenuItem.js";
2
+ import { Menu } from "./Menu/Menu.js";
3
+ export { Menu, MenuItem };
@@ -0,0 +1,5 @@
1
+ import { AccordionItemProps, AccordionProps } from "./accordion.types.js";
2
+ //#region src/components/navigation/Accordion/Accordion.d.ts
3
+ declare const Accordion: ({ items, variant, actionPosition, allowsMultipleExpanded, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { Accordion, type AccordionItemProps, type AccordionProps };
@@ -0,0 +1,81 @@
1
+ import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
+ import { accordionDefinition } from "./accordion.cva.js";
3
+ import { AccordionItem } from "./AccordionItem.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { clsx } from "clsx";
6
+ import { DisclosureGroup } from "react-aria-components";
7
+ import { jsx } from "react/jsx-runtime";
8
+ //#region src/components/navigation/Accordion/Accordion.tsx
9
+ const Accordion = (t0) => {
10
+ const $ = c(23);
11
+ const { items, variant: t1, actionPosition: t2, allowsMultipleExpanded: t3, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled } = t0;
12
+ const variant = t1 === void 0 ? "filled" : t1;
13
+ const actionPosition = t2 === void 0 ? "right" : t2;
14
+ const allowsMultipleExpanded = t3 === void 0 ? false : t3;
15
+ const accordionCva = UIOverrides.useCva("accordion.cva", accordionDefinition);
16
+ const t4 = items.length === 1;
17
+ let t5;
18
+ if ($[0] !== accordionCva || $[1] !== className || $[2] !== t4 || $[3] !== variant) {
19
+ t5 = clsx(accordionCva({
20
+ className,
21
+ variant,
22
+ singleItem: t4
23
+ }));
24
+ $[0] = accordionCva;
25
+ $[1] = className;
26
+ $[2] = t4;
27
+ $[3] = variant;
28
+ $[4] = t5;
29
+ } else t5 = $[4];
30
+ let t6;
31
+ if ($[5] !== actionPosition || $[6] !== disabled || $[7] !== items || $[8] !== variant) {
32
+ let t7;
33
+ if ($[10] !== actionPosition || $[11] !== disabled || $[12] !== items.length || $[13] !== variant) {
34
+ t7 = (item) => /* @__PURE__ */ jsx(AccordionItem, {
35
+ id: item.id,
36
+ heading: item.heading,
37
+ subheading: item.subheading,
38
+ icon: item.icon,
39
+ variant,
40
+ actionPosition,
41
+ disabled: item.disabled || disabled,
42
+ isSingle: items.length === 1,
43
+ children: item.children
44
+ }, item.id);
45
+ $[10] = actionPosition;
46
+ $[11] = disabled;
47
+ $[12] = items.length;
48
+ $[13] = variant;
49
+ $[14] = t7;
50
+ } else t7 = $[14];
51
+ t6 = items.map(t7);
52
+ $[5] = actionPosition;
53
+ $[6] = disabled;
54
+ $[7] = items;
55
+ $[8] = variant;
56
+ $[9] = t6;
57
+ } else t6 = $[9];
58
+ let t7;
59
+ if ($[15] !== allowsMultipleExpanded || $[16] !== defaultExpandedKeys || $[17] !== disabled || $[18] !== expandedKeys || $[19] !== onExpandedChange || $[20] !== t5 || $[21] !== t6) {
60
+ t7 = /* @__PURE__ */ jsx(DisclosureGroup, {
61
+ allowsMultipleExpanded,
62
+ expandedKeys,
63
+ defaultExpandedKeys,
64
+ onExpandedChange,
65
+ className: t5,
66
+ isDisabled: disabled,
67
+ children: t6
68
+ });
69
+ $[15] = allowsMultipleExpanded;
70
+ $[16] = defaultExpandedKeys;
71
+ $[17] = disabled;
72
+ $[18] = expandedKeys;
73
+ $[19] = onExpandedChange;
74
+ $[20] = t5;
75
+ $[21] = t6;
76
+ $[22] = t7;
77
+ } else t7 = $[22];
78
+ return t7;
79
+ };
80
+ //#endregion
81
+ export { Accordion };
@@ -1,5 +1,5 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
- import { Typography } from "../../typography.js";
2
+ import { Typography } from "../../text/Typography/Typography.js";
3
3
  import { accordionChevronDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition } from "./accordion.cva.js";
4
4
  import { ChevronDown } from "lucide-react";
5
5
  import { c } from "react/compiler-runtime";
@@ -0,0 +1,5 @@
1
+ import { StepperProps } from "./stepper.types.js";
2
+ //#region src/components/navigation/Stepper/Stepper.d.ts
3
+ declare const Stepper: ({ steps, currentStep, orientation, contentOrientation, iconsOnly, titlesOnly, onStepClick, className }: StepperProps) => import("react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { Stepper };
@@ -0,0 +1,79 @@
1
+ import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
+ import { stepperDefinition } from "./stepper.cva.js";
3
+ import { StepperItem } from "./StepperItem.js";
4
+ import { StepperSeparator } from "./StepperSeparator.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { Fragment } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/components/navigation/Stepper/Stepper.tsx
9
+ const 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({
18
+ orientation,
19
+ 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, { 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;
77
+ };
78
+ //#endregion
79
+ export { Stepper };
@@ -1,5 +1,5 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
- import { Typography } from "../../typography.js";
2
+ import { Typography } from "../../text/Typography/Typography.js";
3
3
  import { stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSubtextDefinition, stepperTitleDefinition } from "./stepper.cva.js";
4
4
  import { Check } from "lucide-react";
5
5
  import { c } from "react/compiler-runtime";
@@ -3,12 +3,12 @@ import { UIConfig } from "../config/uiConfig.context.js";
3
3
  import { FieldController } from "./inputs/shared/form.binding.js";
4
4
  import { FormField } from "./form-field.js";
5
5
  import { inputBaseDefinition } from "./inputs/shared/input.cva.js";
6
- import { IntlUtils } from "../utils/intl.utils.js";
7
6
  import { TooltipWrapper } from "./inputs/shared/TooltipWrapper.js";
8
- import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
9
- import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
10
7
  import { InputContent } from "./inputs/Input/shared/InputContent.js";
8
+ import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
11
9
  import { useFieldAccessibility } from "./inputs/shared/useFieldAccessibility.js";
10
+ import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
11
+ import { IntlUtils } from "../utils/intl.utils.js";
12
12
  import { getStaticNumberDisplayValue } from "./inputs/Input/shared/numberStatic.utils.js";
13
13
  import { clsx } from "clsx";
14
14
  import { memo, useCallback, useEffect, useRef, useState } from "react";
@@ -2,11 +2,11 @@ import { UIOverrides } from "../config/uiOverrides.context.js";
2
2
  import { UIConfig } from "../config/uiConfig.context.js";
3
3
  import { FieldController } from "./inputs/shared/form.binding.js";
4
4
  import { FormFieldLabel } from "./inputs/FormField/FormFieldLabel.js";
5
- import { inputBaseDefinition, inputSizeDefinition } from "./inputs/shared/input.cva.js";
6
- import { IntlUtils } from "../utils/intl.utils.js";
7
5
  import { InputClear } from "./inputs/shared/InputClear.js";
6
+ import { inputBaseDefinition, inputSizeDefinition } from "./inputs/shared/input.cva.js";
8
7
  import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
9
8
  import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
9
+ import { IntlUtils } from "../utils/intl.utils.js";
10
10
  import { getStaticNumberDisplayValue } from "./inputs/Input/shared/numberStatic.utils.js";
11
11
  import { NumberRangeField } from "./inputs/Input/NumberRangeInput/NumberRangeField.js";
12
12
  import { clsx } from "clsx";
@@ -1,4 +1,4 @@
1
- import { Typography } from "../../typography.js";
1
+ import { Typography } from "../../text/Typography/Typography.js";
2
2
  import "../../../config/i18n.js";
3
3
  import { X } from "lucide-react";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- import { ButtonProps } from "../../buttons/Button/Button.js";
1
+ import { ButtonProps } from "./buttons/Button/Button.js";
2
2
  //#region src/components/shared/pagination/PaginationList.d.ts
3
3
  interface PaginationListProps {
4
4
  page: number;
@@ -1,6 +1,6 @@
1
- import { Button } from "../../buttons/Button/Button.js";
2
- import "../../../config/i18n.js";
3
- import { minWidth } from "./minWidth.cva.js";
1
+ import { Button } from "./buttons/Button/Button.js";
2
+ import "../config/i18n.js";
3
+ import { minWidth } from "./shared/pagination/minWidth.cva.js";
4
4
  import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { clsx } from "clsx";
@@ -1,4 +1,4 @@
1
- import { PaginationListProps } from "./shared/pagination/PaginationList.js";
1
+ import { PaginationListProps } from "./pagination-list.js";
2
2
  //#region src/components/shared/pagination/Pagination.d.ts
3
3
  interface PaginationProps extends Omit<PaginationListProps, "totalPages"> {
4
4
  totalItems: number;
@@ -1,7 +1,7 @@
1
- import { Typography } from "./typography.js";
1
+ import { Typography } from "./text/Typography/Typography.js";
2
2
  import "../config/i18n.js";
3
3
  import { NumberInput } from "./number-input.js";
4
- import { PaginationList } from "./shared/pagination/PaginationList.js";
4
+ import { PaginationList } from "./pagination-list.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { clsx } from "clsx";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { PillButtonVariants } from "./buttons/PillButton/pillButton.cva.js";
2
- import { TypographyProps } from "./typography.js";
2
+ import { TypographyProps } from "./text/Typography/Typography.js";
3
3
  import { Ref } from "react";
4
4
  import { ButtonProps } from "react-aria-components";
5
5
  //#region src/components/text/Pill/Pill.d.ts
@@ -1,5 +1,5 @@
1
1
  import { UIOverrides } from "../config/uiOverrides.context.js";
2
- import { Typography } from "./typography.js";
2
+ import { Typography } from "./text/Typography/Typography.js";
3
3
  import { UIConfig } from "../config/uiConfig.context.js";
4
4
  import { pillButtonDefinition } from "./buttons/PillButton/pillButton.cva.js";
5
5
  import "../config/i18n.js";
@@ -0,0 +1,2 @@
1
+ import { ProgressBar } from "./inputs/File/shared/ProgressBar.js";
2
+ export { ProgressBar };
@@ -0,0 +1,2 @@
1
+ import { ProgressBar } from "./inputs/File/shared/ProgressBar.js";
2
+ export { ProgressBar };
@@ -1,10 +1,10 @@
1
1
  import { UIOverrides } from "../config/uiOverrides.context.js";
2
2
  import { UIConfig } from "../config/uiConfig.context.js";
3
3
  import { FieldController } from "./inputs/shared/form.binding.js";
4
- import { CheckContent } from "./inputs/shared/CheckContent.js";
5
4
  import { FormFieldLabel } from "./inputs/FormField/FormFieldLabel.js";
6
5
  import { FormField } from "./form-field.js";
7
6
  import { inputBaseDefinition, inputSizeDefinition } from "./inputs/shared/input.cva.js";
7
+ import { CheckContent } from "./inputs/shared/CheckContent.js";
8
8
  import { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography } from "./inputs/RadioGroup/radio.cva.js";
9
9
  import { clsx } from "clsx";
10
10
  import { memo } from "react";
@@ -0,0 +1,7 @@
1
+ import { FieldValues } from "../inputs/shared/form.binding.js";
2
+ import { ControlledSegmentProps } from "./segment.types.js";
3
+ import { Key } from "react-aria-components";
4
+ //#region src/components/segment/Segment.d.ts
5
+ declare const Segment: <TFieldValues extends FieldValues, TKey extends Key = Key>(props: ControlledSegmentProps<TFieldValues, TKey>) => import("react/jsx-runtime").JSX.Element;
6
+ //#endregion
7
+ export { Segment };
@@ -0,0 +1,245 @@
1
+ import { UIOverrides } from "../../config/uiOverrides.context.js";
2
+ import { FieldController } from "../inputs/shared/form.binding.js";
3
+ import { FormField } from "../form-field.js";
4
+ import { segmentDefinition } from "./segment.cva.js";
5
+ import { SegmentItem } from "./SegmentItem.js";
6
+ import { c } from "react/compiler-runtime";
7
+ import { clsx } from "clsx";
8
+ import { Fragment, useRef } from "react";
9
+ import { ToggleButtonGroup } from "react-aria-components";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { useToggleButtonGroup } from "react-aria";
12
+ import { mergeRefs } from "@react-aria/utils";
13
+ import { useToggleGroupState } from "react-stately";
14
+ //#region src/components/segment/Segment.tsx
15
+ const SegmentBase = (t0) => {
16
+ const $ = c(49);
17
+ let className;
18
+ let defaultValue;
19
+ let error;
20
+ let items;
21
+ let onChange;
22
+ let rest;
23
+ let segmentItemClassName;
24
+ let value;
25
+ if ($[0] !== t0) {
26
+ ({className, items, error, onChange, value, defaultValue, segmentItemClassName, ...rest} = t0);
27
+ $[0] = t0;
28
+ $[1] = className;
29
+ $[2] = defaultValue;
30
+ $[3] = error;
31
+ $[4] = items;
32
+ $[5] = onChange;
33
+ $[6] = rest;
34
+ $[7] = segmentItemClassName;
35
+ $[8] = value;
36
+ } else {
37
+ className = $[1];
38
+ defaultValue = $[2];
39
+ error = $[3];
40
+ items = $[4];
41
+ onChange = $[5];
42
+ rest = $[6];
43
+ segmentItemClassName = $[7];
44
+ value = $[8];
45
+ }
46
+ let t1;
47
+ if ($[9] !== defaultValue) {
48
+ t1 = defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0;
49
+ $[9] = defaultValue;
50
+ $[10] = t1;
51
+ } else t1 = $[10];
52
+ let t2;
53
+ if ($[11] !== value) {
54
+ t2 = value ? Array.isArray(value) ? value : [value] : void 0;
55
+ $[11] = value;
56
+ $[12] = t2;
57
+ } else t2 = $[12];
58
+ let t3;
59
+ if ($[13] !== rest || $[14] !== t1 || $[15] !== t2) {
60
+ t3 = {
61
+ ...rest,
62
+ defaultSelectedKeys: t1,
63
+ selectedKeys: t2
64
+ };
65
+ $[13] = rest;
66
+ $[14] = t1;
67
+ $[15] = t2;
68
+ $[16] = t3;
69
+ } else t3 = $[16];
70
+ const props = t3;
71
+ const buttonGroupRef = useRef(null);
72
+ const state = useToggleGroupState(props);
73
+ const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
74
+ const segmentCva = UIOverrides.useCva("segment.cva", segmentDefinition);
75
+ let t4;
76
+ if ($[17] !== error || $[18] !== props.isDisabled) {
77
+ t4 = {
78
+ error,
79
+ label: "",
80
+ hideLabel: true,
81
+ isDisabled: props.isDisabled
82
+ };
83
+ $[17] = error;
84
+ $[18] = props.isDisabled;
85
+ $[19] = t4;
86
+ } else t4 = $[19];
87
+ const formFieldProps = t4;
88
+ let t5;
89
+ if ($[20] !== onChange || $[21] !== props.selectionMode) {
90
+ t5 = (keys) => {
91
+ if (props.selectionMode === "multiple") onChange?.(Array.from(keys.values()));
92
+ else onChange?.(Array.from(keys.values())[0]);
93
+ };
94
+ $[20] = onChange;
95
+ $[21] = props.selectionMode;
96
+ $[22] = t5;
97
+ } else t5 = $[22];
98
+ const onSelectionChange = t5;
99
+ let t6;
100
+ if ($[23] !== items.length) {
101
+ t6 = items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, _temp).join(" ") : `repeat(${items.length}, 1fr)`;
102
+ $[23] = items.length;
103
+ $[24] = t6;
104
+ } else t6 = $[24];
105
+ const gridTemplateColumns = t6;
106
+ let t7;
107
+ if ($[25] !== className) {
108
+ t7 = clsx("relative w-full", className);
109
+ $[25] = className;
110
+ $[26] = t7;
111
+ } else t7 = $[26];
112
+ let t8;
113
+ if ($[27] !== className || $[28] !== props || $[29] !== segmentCva) {
114
+ t8 = segmentCva({
115
+ ...props,
116
+ className
117
+ });
118
+ $[27] = className;
119
+ $[28] = props;
120
+ $[29] = segmentCva;
121
+ $[30] = t8;
122
+ } else t8 = $[30];
123
+ let t9;
124
+ if ($[31] !== gridTemplateColumns) {
125
+ t9 = { gridTemplateColumns };
126
+ $[31] = gridTemplateColumns;
127
+ $[32] = t9;
128
+ } else t9 = $[32];
129
+ let t10;
130
+ if ($[33] !== items || $[34] !== props.isDisabled || $[35] !== segmentItemClassName || $[36] !== state) {
131
+ t10 = items.map((item, index) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SegmentItem, {
132
+ ...item,
133
+ className: clsx(item.className, segmentItemClassName),
134
+ isDisabled: item.isDisabled || props.isDisabled,
135
+ isSelected: state.selectedKeys.has(item.id),
136
+ onPress: () => {
137
+ state.toggleKey(item.id);
138
+ }
139
+ }), index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx("div", {
140
+ className: clsx("h-5 w-px rounded-2xl", !state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"),
141
+ children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
142
+ })] }, item.id));
143
+ $[33] = items;
144
+ $[34] = props.isDisabled;
145
+ $[35] = segmentItemClassName;
146
+ $[36] = state;
147
+ $[37] = t10;
148
+ } else t10 = $[37];
149
+ let t11;
150
+ if ($[38] !== groupProps || $[39] !== onSelectionChange || $[40] !== props || $[41] !== t10 || $[42] !== t8 || $[43] !== t9) {
151
+ t11 = /* @__PURE__ */ jsx(ToggleButtonGroup, {
152
+ ...props,
153
+ ...groupProps,
154
+ ref: buttonGroupRef,
155
+ onSelectionChange,
156
+ className: t8,
157
+ style: t9,
158
+ children: t10
159
+ });
160
+ $[38] = groupProps;
161
+ $[39] = onSelectionChange;
162
+ $[40] = props;
163
+ $[41] = t10;
164
+ $[42] = t8;
165
+ $[43] = t9;
166
+ $[44] = t11;
167
+ } else t11 = $[44];
168
+ let t12;
169
+ if ($[45] !== formFieldProps || $[46] !== t11 || $[47] !== t7) {
170
+ t12 = /* @__PURE__ */ jsx(FormField, {
171
+ ...formFieldProps,
172
+ className: t7,
173
+ children: t11
174
+ });
175
+ $[45] = formFieldProps;
176
+ $[46] = t11;
177
+ $[47] = t7;
178
+ $[48] = t12;
179
+ } else t12 = $[48];
180
+ return t12;
181
+ };
182
+ const Segment = (props) => {
183
+ const $ = c(15);
184
+ if ("field" in props && props.field) {
185
+ let field;
186
+ let innerProps;
187
+ let ref;
188
+ if ($[0] !== props) {
189
+ ({field, ref, ...innerProps} = props);
190
+ $[0] = props;
191
+ $[1] = field;
192
+ $[2] = innerProps;
193
+ $[3] = ref;
194
+ } else {
195
+ field = $[1];
196
+ innerProps = $[2];
197
+ ref = $[3];
198
+ }
199
+ let t0;
200
+ if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
201
+ t0 = (t1) => {
202
+ const { field: field_0, fieldState: t2 } = t1;
203
+ const { error } = t2;
204
+ return /* @__PURE__ */ jsx(SegmentBase, {
205
+ ...innerProps,
206
+ ref: mergeRefs(ref, field_0.ref),
207
+ value: field_0.value,
208
+ onChange: field_0.onChange,
209
+ isDisabled: field_0.disabled || props.isDisabled,
210
+ error: props.error ?? error?.message
211
+ });
212
+ };
213
+ $[4] = innerProps;
214
+ $[5] = props.error;
215
+ $[6] = props.isDisabled;
216
+ $[7] = ref;
217
+ $[8] = t0;
218
+ } else t0 = $[8];
219
+ let t1;
220
+ if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
221
+ t1 = /* @__PURE__ */ jsx(FieldController, {
222
+ control: field.form,
223
+ name: field.name,
224
+ render: t0
225
+ });
226
+ $[9] = field.form;
227
+ $[10] = field.name;
228
+ $[11] = t0;
229
+ $[12] = t1;
230
+ } else t1 = $[12];
231
+ return t1;
232
+ }
233
+ let t0;
234
+ if ($[13] !== props) {
235
+ t0 = /* @__PURE__ */ jsx(SegmentBase, { ...props });
236
+ $[13] = props;
237
+ $[14] = t0;
238
+ } else t0 = $[14];
239
+ return t0;
240
+ };
241
+ function _temp(_, i) {
242
+ return i % 2 === 0 ? "1fr" : "auto";
243
+ }
244
+ //#endregion
245
+ export { Segment };
@@ -1,5 +1,5 @@
1
1
  import { UIOverrides } from "../../config/uiOverrides.context.js";
2
- import { Typography } from "../typography.js";
2
+ import { Typography } from "../text/Typography/Typography.js";
3
3
  import { segmentItemDefinition } from "./segment.cva.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { ToggleButton } from "react-aria-components";