softable-pixels-web 1.2.33 → 1.2.35

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 (91) hide show
  1. package/dist/{BasePopover-aHgl90XE.js → BasePopover-CY-9StFD.js} +1 -1
  2. package/dist/{BasePopover-aHgl90XE.js.map → BasePopover-CY-9StFD.js.map} +1 -1
  3. package/dist/{Breadcrumb-CBCBNcIC.js → Breadcrumb--lRHi6sr.js} +2 -2
  4. package/dist/{Breadcrumb-CBCBNcIC.js.map → Breadcrumb--lRHi6sr.js.map} +1 -1
  5. package/dist/{Button-BnPQoBEH.js → Button-o_4n7GFO.js} +3 -3
  6. package/dist/{Button-BnPQoBEH.js.map → Button-o_4n7GFO.js.map} +1 -1
  7. package/dist/{CheckItem-D45HN7Ir.js → CheckItem-C2NriXyN.js} +2 -2
  8. package/dist/{CheckItem-D45HN7Ir.js.map → CheckItem-C2NriXyN.js.map} +1 -1
  9. package/dist/{Checkbox-ClKDCBdz.js → Checkbox-qoUWy3Nj.js} +2 -2
  10. package/dist/{Checkbox-ClKDCBdz.js.map → Checkbox-qoUWy3Nj.js.map} +1 -1
  11. package/dist/{Chip-r5K3xdb9.js → Chip-DJVwuXlv.js} +2 -2
  12. package/dist/{Chip-r5K3xdb9.js.map → Chip-DJVwuXlv.js.map} +1 -1
  13. package/dist/{ChipList-DLehs_z2.js → ChipList-D7J-hTLW.js} +4 -4
  14. package/dist/{ChipList-DLehs_z2.js.map → ChipList-D7J-hTLW.js.map} +1 -1
  15. package/dist/{ColorPicker-v5ULLhFP.js → ColorPicker-sqs31Md7.js} +3 -3
  16. package/dist/{ColorPicker-v5ULLhFP.js.map → ColorPicker-sqs31Md7.js.map} +1 -1
  17. package/dist/{ContextMenu-DOIbV9BE.js → ContextMenu-CrVwvqGG.js} +6 -4
  18. package/dist/ContextMenu-CrVwvqGG.js.map +1 -0
  19. package/dist/{DatePicker-Cj_fGnhg.js → DatePicker-FL9pUwup.js} +7 -7
  20. package/dist/{DatePicker-Cj_fGnhg.js.map → DatePicker-FL9pUwup.js.map} +1 -1
  21. package/dist/{ErrorMessage-kAHOafpg.js → ErrorMessage-6pG4hFId.js} +1 -1
  22. package/dist/{ErrorMessage-kAHOafpg.js.map → ErrorMessage-6pG4hFId.js.map} +1 -1
  23. package/dist/{FileInput-CFaWGwh1.js → FileInput-CfUBqmTu.js} +4 -4
  24. package/dist/{FileInput-CFaWGwh1.js.map → FileInput-CfUBqmTu.js.map} +1 -1
  25. package/dist/{IconButton-izpMeHBl.js → IconButton-C7nGG3_D.js} +1 -1
  26. package/dist/{IconButton-izpMeHBl.js.map → IconButton-C7nGG3_D.js.map} +1 -1
  27. package/dist/{InfoSummary-BLsz7swQ.js → InfoSummary-B6k4_vpG.js} +2 -2
  28. package/dist/{InfoSummary-BLsz7swQ.js.map → InfoSummary-B6k4_vpG.js.map} +1 -1
  29. package/dist/{Input-BWk-tP51.js → Input-BLnysNxN.js} +15 -7
  30. package/dist/Input-BLnysNxN.js.map +1 -0
  31. package/dist/{Label-lzG8Cp8P.js → Label-VE3hoSbt.js} +2 -2
  32. package/dist/{Label-lzG8Cp8P.js.map → Label-VE3hoSbt.js.map} +1 -1
  33. package/dist/{Loader-D21KyoAr.js → Loader-BTp8PCMz.js} +1 -1
  34. package/dist/{Loader-D21KyoAr.js.map → Loader-BTp8PCMz.js.map} +1 -1
  35. package/dist/{MaskModule-DKpEoLUF.js → MaskModule-DZko7F_e.js} +7 -7
  36. package/dist/MaskModule-DZko7F_e.js.map +1 -0
  37. package/dist/{Pagination-CqVu9N0h.js → Pagination-D-eoDEIJ.js} +4 -4
  38. package/dist/{Pagination-CqVu9N0h.js.map → Pagination-D-eoDEIJ.js.map} +1 -1
  39. package/dist/{ScrollPaginationContainer-C_VJlEww.js → ScrollPaginationContainer-isAA4BsG.js} +1 -1
  40. package/dist/{ScrollPaginationContainer-C_VJlEww.js.map → ScrollPaginationContainer-isAA4BsG.js.map} +1 -1
  41. package/dist/{SearchInput-BdscRWx2.js → SearchInput-vI-WcTPT.js} +2 -2
  42. package/dist/{SearchInput-BdscRWx2.js.map → SearchInput-vI-WcTPT.js.map} +1 -1
  43. package/dist/{Select-DCtpaxaW.js → Select-ChVwX-7Z.js} +68 -31
  44. package/dist/Select-ChVwX-7Z.js.map +1 -0
  45. package/dist/{Switch-CaoMMeS7.js → Switch-DlZXMyGG.js} +11 -4
  46. package/dist/Switch-DlZXMyGG.js.map +1 -0
  47. package/dist/{TabSwitch-2PNcQRsB.js → TabSwitch-Co6kaDbi.js} +2 -2
  48. package/dist/{TabSwitch-2PNcQRsB.js.map → TabSwitch-Co6kaDbi.js.map} +1 -1
  49. package/dist/{TextArea-NeN7ynND.js → TextArea-s6HdNSc5.js} +4 -4
  50. package/dist/{TextArea-NeN7ynND.js.map → TextArea-s6HdNSc5.js.map} +1 -1
  51. package/dist/{Typography-D1dxTP-6.js → Typography-u0BPHgCr.js} +1 -1
  52. package/dist/{Typography-D1dxTP-6.js.map → Typography-u0BPHgCr.js.map} +1 -1
  53. package/dist/base-popover.js +1 -1
  54. package/dist/breadcrumb.js +2 -2
  55. package/dist/button.js +3 -3
  56. package/dist/check-item.js +2 -2
  57. package/dist/checkbox.js +2 -2
  58. package/dist/chip-list.js +5 -5
  59. package/dist/chip.js +2 -2
  60. package/dist/color-picker.js +4 -4
  61. package/dist/context-menu.js +4 -4
  62. package/dist/date-picker.js +8 -8
  63. package/dist/file-input.js +4 -4
  64. package/dist/icon-button.js +1 -1
  65. package/dist/{index-BxDK_Go8.d.ts → index-D6on4J-S.d.ts} +2 -2
  66. package/dist/{index-B0g1F3X4.d.ts → index-DoLWDzDX.d.ts} +2 -1
  67. package/dist/{index-DAAEXO7G.d.ts → index-j6W-PwB7.d.ts} +7 -3
  68. package/dist/{index-DFfPk9_X.d.ts → index-qPJuO65u.d.ts} +8 -3
  69. package/dist/index.d.ts +4 -4
  70. package/dist/index.js +26 -26
  71. package/dist/info-summary.js +2 -2
  72. package/dist/input.d.ts +1 -1
  73. package/dist/input.js +5 -5
  74. package/dist/mask-modules.js +1 -1
  75. package/dist/pagination.js +5 -5
  76. package/dist/scroll-pagination-container.js +1 -1
  77. package/dist/searchInput.js +3 -3
  78. package/dist/select.d.ts +1 -1
  79. package/dist/select.js +9 -7
  80. package/dist/switch.d.ts +1 -1
  81. package/dist/switch.js +2 -2
  82. package/dist/tab-switch.js +2 -2
  83. package/dist/text-area.d.ts +1 -1
  84. package/dist/text-area.js +4 -4
  85. package/dist/typography.js +1 -1
  86. package/package.json +1 -1
  87. package/dist/ContextMenu-DOIbV9BE.js.map +0 -1
  88. package/dist/Input-BWk-tP51.js.map +0 -1
  89. package/dist/MaskModule-DKpEoLUF.js.map +0 -1
  90. package/dist/Select-DCtpaxaW.js.map +0 -1
  91. package/dist/Switch-CaoMMeS7.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
3
  import "./useDismiss-Dpzg5Xpf.js";
4
4
  import "./useFloating-D-2IDIWG.js";
5
5
  import "./Popover-BV_1hBez.js";
6
6
  import "./Icon-bV19y393.js";
7
- import { n as types_exports, t as DatePicker } from "./DatePicker-Cj_fGnhg.js";
8
- import "./BasePopover-aHgl90XE.js";
9
- import "./Label-lzG8Cp8P.js";
10
- import "./ErrorMessage-kAHOafpg.js";
11
- import "./Loader-D21KyoAr.js";
12
- import "./Button-BnPQoBEH.js";
13
- import "./MaskModule-DKpEoLUF.js";
7
+ import { n as types_exports, t as DatePicker } from "./DatePicker-FL9pUwup.js";
8
+ import "./BasePopover-CY-9StFD.js";
9
+ import "./Label-VE3hoSbt.js";
10
+ import "./ErrorMessage-6pG4hFId.js";
11
+ import "./Loader-BTp8PCMz.js";
12
+ import "./Button-o_4n7GFO.js";
13
+ import "./MaskModule-DZko7F_e.js";
14
14
 
15
15
  export { DatePicker, types_exports as DatePickerTypes };
@@ -1,8 +1,8 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
3
  import "./Icon-bV19y393.js";
4
- import "./Label-lzG8Cp8P.js";
5
- import "./ErrorMessage-kAHOafpg.js";
6
- import { n as types_exports, t as FileInput } from "./FileInput-CFaWGwh1.js";
4
+ import "./Label-VE3hoSbt.js";
5
+ import "./ErrorMessage-6pG4hFId.js";
6
+ import { n as types_exports, t as FileInput } from "./FileInput-CfUBqmTu.js";
7
7
 
8
8
  export { FileInput, types_exports as FileInputTypes };
@@ -1,4 +1,4 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import { t as IconButton } from "./IconButton-izpMeHBl.js";
2
+ import { t as IconButton } from "./IconButton-C7nGG3_D.js";
3
3
 
4
4
  export { IconButton };
@@ -27,7 +27,7 @@ declare function createTextAreaStyles(props: TextAreaProps): {
27
27
  fontWeight: "400";
28
28
  fontSize: string;
29
29
  color: "var(--px-text-primary)";
30
- borderColor: "var(--px-border-primary)" | "var(--px-color-error)";
30
+ borderColor: "var(--px-color-error)" | "var(--px-border-primary)";
31
31
  outlineOffset: string;
32
32
  cursor: "default" | undefined;
33
33
  __rules: {
@@ -70,4 +70,4 @@ interface TextAreaProps {
70
70
  declare const TextArea: (props: TextAreaProps) => react_jsx_runtime1.JSX.Element;
71
71
  //#endregion
72
72
  export { TextArea as t };
73
- //# sourceMappingURL=index-BxDK_Go8.d.ts.map
73
+ //# sourceMappingURL=index-D6on4J-S.d.ts.map
@@ -2,6 +2,7 @@ import React from "react";
2
2
 
3
3
  //#region src/components/commons/toolkit/Switch/types.d.ts
4
4
  interface SwitchThumbProps {
5
+ fitContent?: boolean;
5
6
  label?: string;
6
7
  checked: boolean;
7
8
  colorIndicator?: string;
@@ -14,4 +15,4 @@ interface SwitchThumbProps {
14
15
  declare const Switch: React.FC<SwitchThumbProps>;
15
16
  //#endregion
16
17
  export { Switch as t };
17
- //# sourceMappingURL=index-B0g1F3X4.d.ts.map
18
+ //# sourceMappingURL=index-DoLWDzDX.d.ts.map
@@ -27,7 +27,7 @@ declare function createSelectStyles(props: SelectProps): {
27
27
  opacity: number;
28
28
  cursor: "not-allowed" | "pointer" | "progress";
29
29
  boxShadow: "var(--px-shadow-default)";
30
- borderColor: "var(--px-border-primary)" | "var(--px-color-error)";
30
+ borderColor: "var(--px-color-error)" | "var(--px-border-primary)";
31
31
  __rules: {
32
32
  '&:focus-within': {
33
33
  outlineOffset: string;
@@ -74,23 +74,27 @@ interface SelectProps extends LayoutProps, MarginProps {
74
74
  isLoading?: boolean;
75
75
  portalId?: PopoverProps['portalId'];
76
76
  strategy?: FloatingOptions['strategy'];
77
+ placement?: FloatingOptions['placement'];
77
78
  scrollContainerId?: FloatingOptions['scrollContainerId'];
78
79
  absoluteReference?: FloatingOptions['absoluteReference'];
79
- placement?: FloatingOptions['placement'];
80
80
  canClear?: boolean;
81
81
  multiple?: boolean;
82
82
  required?: boolean;
83
83
  disabled?: boolean;
84
84
  hideLabel?: boolean;
85
+ withSearch?: boolean;
86
+ autoFocusFirstOption?: boolean;
85
87
  errorMessage?: string;
86
88
  maxVisibleItems?: number;
87
89
  maxHeightPopover?: string;
90
+ searchPlaceholder?: string;
88
91
  pagination?: Pagination;
89
92
  startIcon?: React.ReactNode;
90
93
  styles?: TypeStyles<typeof createSelectStyles>;
91
94
  requiredColor?: string;
92
95
  labelConfig?: TextProps;
93
96
  onChange: (value: string[]) => void;
97
+ onSearchChange?: (value: string) => void;
94
98
  }
95
99
  interface SelectOption {
96
100
  label: string;
@@ -102,4 +106,4 @@ interface SelectOption {
102
106
  declare const Select: React$1.FC<SelectProps>;
103
107
  //#endregion
104
108
  export { types_d_exports as n, Select as t };
105
- //# sourceMappingURL=index-DAAEXO7G.d.ts.map
109
+ //# sourceMappingURL=index-j6W-PwB7.d.ts.map
@@ -22,7 +22,7 @@ declare function createInputStyles(props: InputProps): {
22
22
  padding: string;
23
23
  opacity: number;
24
24
  boxShadow: "var(--px-shadow-default)";
25
- borderColor: "var(--px-border-primary)" | "var(--px-color-error)";
25
+ borderColor: "var(--px-color-error)" | "var(--px-border-primary)";
26
26
  __rules: {
27
27
  '&:focus-within': {
28
28
  outlineOffset: string;
@@ -66,7 +66,8 @@ declare function createInputStyles(props: InputProps): {
66
66
  };
67
67
  //#endregion
68
68
  //#region src/components/commons/inputs/Input/types.d.ts
69
- interface InputProps extends LayoutProps, MarginProps {
69
+ type InputProps = InputBaseProps | FloatProps;
70
+ interface InputBaseProps extends LayoutProps, MarginProps {
70
71
  id?: string;
71
72
  max?: number;
72
73
  min?: number;
@@ -94,6 +95,10 @@ interface InputProps extends LayoutProps, MarginProps {
94
95
  labelConfig?: TextProps;
95
96
  onChange: (value: string) => void;
96
97
  }
98
+ interface FloatProps extends Omit<InputBaseProps, 'mask'> {
99
+ mask?: 'FLOAT';
100
+ decimalPlaces?: number;
101
+ }
97
102
  interface InputMethods {
98
103
  focus: () => void;
99
104
  blur: () => void;
@@ -103,4 +108,4 @@ interface InputMethods {
103
108
  declare const Input: react0.ForwardRefExoticComponent<InputProps & react0.RefAttributes<InputMethods>>;
104
109
  //#endregion
105
110
  export { Input as t };
106
- //# sourceMappingURL=index-DFfPk9_X.d.ts.map
111
+ //# sourceMappingURL=index-qPJuO65u.d.ts.map
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ import { n as types_d_exports$5 } from "./types-vfa_y8KH.js";
6
6
  import { n as types_d_exports$3, t as DatePicker } from "./index-BaTeJXMP.js";
7
7
  import { n as types_d_exports$4, t as FileInput } from "./index-DDF3jbpO.js";
8
8
  import { n as Locale, r as MaskType, t as MaskModule } from "./index-CSRzYxDc.js";
9
- import { t as Input } from "./index-DFfPk9_X.js";
9
+ import { t as Input } from "./index-qPJuO65u.js";
10
10
  import { t as SearchInput } from "./index-MyZ_XVsH.js";
11
- import { n as types_d_exports$6, t as Select } from "./index-DAAEXO7G.js";
11
+ import { n as types_d_exports$6, t as Select } from "./index-j6W-PwB7.js";
12
12
  import { t as index_d_exports } from "./index-CriBmhqv.js";
13
- import { t as TextArea } from "./index-BxDK_Go8.js";
13
+ import { t as TextArea } from "./index-D6on4J-S.js";
14
14
  import { t as Popover } from "./index-tivXt3ba.js";
15
15
  import { t as BasePopover } from "./index-BKsKKh1p.js";
16
16
  import { t as Breadcrumb } from "./index-CBHEtmuG.js";
@@ -24,7 +24,7 @@ import { n as types_d_exports$2, t as ContextMenu } from "./index-Bo6Mz8jJ.js";
24
24
  import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
25
25
  import { t as Pagination } from "./index-D5kC89SC.js";
26
26
  import { ScrollPaginationContainer } from "./scroll-pagination-container.js";
27
- import { t as Switch } from "./index-B0g1F3X4.js";
27
+ import { t as Switch } from "./index-DoLWDzDX.js";
28
28
  import { n as types_d_exports$7, t as TabSwitch } from "./index-BQRzf4rc.js";
29
29
  import { Typography } from "./typography.js";
30
30
  import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-DPmfBsga.js";
package/dist/index.js CHANGED
@@ -1,36 +1,36 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import { t as Switch } from "./Switch-CaoMMeS7.js";
3
- import { t as Typography } from "./Typography-D1dxTP-6.js";
2
+ import { t as Typography } from "./Typography-u0BPHgCr.js";
3
+ import { t as Switch } from "./Switch-DlZXMyGG.js";
4
4
  import { t as useDismiss } from "./useDismiss-Dpzg5Xpf.js";
5
5
  import { t as useFloating } from "./useFloating-D-2IDIWG.js";
6
6
  import { n as types_exports$5, t as Popover } from "./Popover-BV_1hBez.js";
7
7
  import "./Icon-bV19y393.js";
8
- import { t as Checkbox } from "./Checkbox-ClKDCBdz.js";
9
- import { n as types_exports$3, t as DatePicker } from "./DatePicker-Cj_fGnhg.js";
8
+ import { t as Checkbox } from "./Checkbox-qoUWy3Nj.js";
9
+ import { n as types_exports$3, t as DatePicker } from "./DatePicker-FL9pUwup.js";
10
10
  import { n as useTheme, t as ThemeProvider } from "./ThemeContext-CRVo1wLa.js";
11
- import { n as types_exports$8, t as TabSwitch } from "./TabSwitch-2PNcQRsB.js";
12
- import { t as CheckItem } from "./CheckItem-D45HN7Ir.js";
13
- import { t as InfoSummary } from "./InfoSummary-BLsz7swQ.js";
14
- import { t as BasePopover } from "./BasePopover-aHgl90XE.js";
15
- import { n as types_exports$2, t as ContextMenu } from "./ContextMenu-DOIbV9BE.js";
16
- import { n as types_exports, t as Chip } from "./Chip-r5K3xdb9.js";
17
- import "./Label-lzG8Cp8P.js";
18
- import "./ErrorMessage-kAHOafpg.js";
19
- import { t as ChipList } from "./ChipList-DLehs_z2.js";
20
- import { t as IconButton } from "./IconButton-izpMeHBl.js";
21
- import { t as Pagination } from "./Pagination-CqVu9N0h.js";
22
- import "./Loader-D21KyoAr.js";
23
- import { t as Button } from "./Button-BnPQoBEH.js";
24
- import { n as types_exports$6, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-C_VJlEww.js";
25
- import { a as Locale, o as MaskType, s as MaskModule } from "./MaskModule-DKpEoLUF.js";
26
- import { t as Input } from "./Input-BWk-tP51.js";
27
- import { n as types_exports$7, t as Select } from "./Select-DCtpaxaW.js";
28
- import { t as TextArea } from "./TextArea-NeN7ynND.js";
29
- import { t as SearchInput } from "./SearchInput-BdscRWx2.js";
30
- import { n as types_exports$1, t as ColorPicker } from "./ColorPicker-v5ULLhFP.js";
11
+ import { n as types_exports$7, t as Select } from "./Select-ChVwX-7Z.js";
12
+ import { n as types_exports$8, t as TabSwitch } from "./TabSwitch-Co6kaDbi.js";
13
+ import { t as CheckItem } from "./CheckItem-C2NriXyN.js";
14
+ import { t as InfoSummary } from "./InfoSummary-B6k4_vpG.js";
15
+ import { t as BasePopover } from "./BasePopover-CY-9StFD.js";
16
+ import { n as types_exports$2, t as ContextMenu } from "./ContextMenu-CrVwvqGG.js";
17
+ import { n as types_exports, t as Chip } from "./Chip-DJVwuXlv.js";
18
+ import "./Label-VE3hoSbt.js";
19
+ import "./ErrorMessage-6pG4hFId.js";
20
+ import { t as ChipList } from "./ChipList-D7J-hTLW.js";
21
+ import { t as IconButton } from "./IconButton-C7nGG3_D.js";
22
+ import { t as Pagination } from "./Pagination-D-eoDEIJ.js";
23
+ import "./Loader-BTp8PCMz.js";
24
+ import { t as Button } from "./Button-o_4n7GFO.js";
25
+ import { n as types_exports$6, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-isAA4BsG.js";
26
+ import { c as MaskModule, o as Locale, s as MaskType } from "./MaskModule-DZko7F_e.js";
27
+ import { t as Input } from "./Input-BLnysNxN.js";
28
+ import { t as TextArea } from "./TextArea-s6HdNSc5.js";
29
+ import { t as SearchInput } from "./SearchInput-vI-WcTPT.js";
30
+ import { n as types_exports$1, t as ColorPicker } from "./ColorPicker-sqs31Md7.js";
31
31
  import { t as Skeleton } from "./Skeleton-pvWAx_gn.js";
32
- import { n as types_exports$4, t as FileInput } from "./FileInput-CFaWGwh1.js";
32
+ import { n as types_exports$4, t as FileInput } from "./FileInput-CfUBqmTu.js";
33
33
  import { useVirtualAnchor } from "./use-virtual-anchor.js";
34
- import { t as Breadcrumb } from "./Breadcrumb-CBCBNcIC.js";
34
+ import { t as Breadcrumb } from "./Breadcrumb--lRHi6sr.js";
35
35
 
36
36
  export { BasePopover, Breadcrumb, Button, CheckItem, Checkbox, Chip, ChipList, types_exports as ChipTypes, ColorPicker, types_exports$1 as ColorPickerTypes, ContextMenu, types_exports$2 as ContextMenuTypes, DatePicker, types_exports$3 as DatePickerTypes, FileInput, types_exports$4 as FileInputTypes, IconButton, InfoSummary, Input, Locale, MaskModule, MaskType, Pagination, Popover, types_exports$5 as PopoverTypes, ScrollPaginationContainer, types_exports$6 as ScrollPaginationContainerTypes, SearchInput, Select, types_exports$7 as SelectTypes, Skeleton, Switch, TabSwitch, types_exports$8 as TabSwitchTypes, TextArea, ThemeProvider, Typography, useDismiss, useFloating, useTheme, useVirtualAnchor };
@@ -1,5 +1,5 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
3
- import { t as InfoSummary } from "./InfoSummary-BLsz7swQ.js";
2
+ import "./Typography-u0BPHgCr.js";
3
+ import { t as InfoSummary } from "./InfoSummary-B6k4_vpG.js";
4
4
 
5
5
  export { InfoSummary };
package/dist/input.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Input } from "./index-DFfPk9_X.js";
1
+ import { t as Input } from "./index-qPJuO65u.js";
2
2
  export { Input };
package/dist/input.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
3
  import "./Icon-bV19y393.js";
4
- import "./Label-lzG8Cp8P.js";
5
- import "./ErrorMessage-kAHOafpg.js";
6
- import "./MaskModule-DKpEoLUF.js";
7
- import { t as Input } from "./Input-BWk-tP51.js";
4
+ import "./Label-VE3hoSbt.js";
5
+ import "./ErrorMessage-6pG4hFId.js";
6
+ import "./MaskModule-DZko7F_e.js";
7
+ import { t as Input } from "./Input-BLnysNxN.js";
8
8
 
9
9
  export { Input };
@@ -1,3 +1,3 @@
1
- import { a as Locale, o as MaskType, s as MaskModule } from "./MaskModule-DKpEoLUF.js";
1
+ import { c as MaskModule, o as Locale, s as MaskType } from "./MaskModule-DZko7F_e.js";
2
2
 
3
3
  export { Locale, MaskModule, MaskType };
@@ -1,9 +1,9 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
3
  import "./Icon-bV19y393.js";
4
- import "./IconButton-izpMeHBl.js";
5
- import { t as Pagination } from "./Pagination-CqVu9N0h.js";
6
- import "./Loader-D21KyoAr.js";
7
- import "./Button-BnPQoBEH.js";
4
+ import "./IconButton-C7nGG3_D.js";
5
+ import { t as Pagination } from "./Pagination-D-eoDEIJ.js";
6
+ import "./Loader-BTp8PCMz.js";
7
+ import "./Button-o_4n7GFO.js";
8
8
 
9
9
  export { Pagination };
@@ -1,4 +1,4 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import { n as types_exports, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-C_VJlEww.js";
2
+ import { n as types_exports, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-isAA4BsG.js";
3
3
 
4
4
  export { ScrollPaginationContainer, types_exports as ScrollPaginationContainerTypes };
@@ -1,7 +1,7 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
3
  import "./Icon-bV19y393.js";
4
- import "./Label-lzG8Cp8P.js";
5
- import { t as SearchInput } from "./SearchInput-BdscRWx2.js";
4
+ import "./Label-VE3hoSbt.js";
5
+ import { t as SearchInput } from "./SearchInput-vI-WcTPT.js";
6
6
 
7
7
  export { SearchInput };
package/dist/select.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./types-vfa_y8KH.js";
2
- import { n as types_d_exports, t as Select } from "./index-DAAEXO7G.js";
2
+ import { n as types_d_exports, t as Select } from "./index-j6W-PwB7.js";
3
3
  import "./index-CriBmhqv.js";
4
4
  export { Select, types_d_exports as SelectTypes };
package/dist/select.js CHANGED
@@ -1,14 +1,16 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
3
  import "./useDismiss-Dpzg5Xpf.js";
4
4
  import "./useFloating-D-2IDIWG.js";
5
5
  import "./Popover-BV_1hBez.js";
6
6
  import "./Icon-bV19y393.js";
7
- import "./BasePopover-aHgl90XE.js";
8
- import "./Label-lzG8Cp8P.js";
9
- import "./ErrorMessage-kAHOafpg.js";
10
- import "./Loader-D21KyoAr.js";
11
- import "./ScrollPaginationContainer-C_VJlEww.js";
12
- import { n as types_exports, t as Select } from "./Select-DCtpaxaW.js";
7
+ import { n as types_exports, t as Select } from "./Select-ChVwX-7Z.js";
8
+ import "./BasePopover-CY-9StFD.js";
9
+ import "./Label-VE3hoSbt.js";
10
+ import "./ErrorMessage-6pG4hFId.js";
11
+ import "./Loader-BTp8PCMz.js";
12
+ import "./ScrollPaginationContainer-isAA4BsG.js";
13
+ import "./MaskModule-DZko7F_e.js";
14
+ import "./Input-BLnysNxN.js";
13
15
 
14
16
  export { Select, types_exports as SelectTypes };
package/dist/switch.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Switch } from "./index-B0g1F3X4.js";
1
+ import { t as Switch } from "./index-DoLWDzDX.js";
2
2
  export { Switch };
package/dist/switch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import { t as Switch } from "./Switch-CaoMMeS7.js";
3
- import "./Typography-D1dxTP-6.js";
2
+ import "./Typography-u0BPHgCr.js";
3
+ import { t as Switch } from "./Switch-DlZXMyGG.js";
4
4
 
5
5
  export { Switch };
@@ -1,5 +1,5 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
3
- import { n as types_exports, t as TabSwitch } from "./TabSwitch-2PNcQRsB.js";
2
+ import "./Typography-u0BPHgCr.js";
3
+ import { n as types_exports, t as TabSwitch } from "./TabSwitch-Co6kaDbi.js";
4
4
 
5
5
  export { TabSwitch, types_exports as TabSwitchTypes };
@@ -1,2 +1,2 @@
1
- import { t as TextArea } from "./index-BxDK_Go8.js";
1
+ import { t as TextArea } from "./index-D6on4J-S.js";
2
2
  export { TextArea };
package/dist/text-area.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import "./Typography-D1dxTP-6.js";
3
- import "./Label-lzG8Cp8P.js";
4
- import "./ErrorMessage-kAHOafpg.js";
5
- import { t as TextArea } from "./TextArea-NeN7ynND.js";
2
+ import "./Typography-u0BPHgCr.js";
3
+ import "./Label-VE3hoSbt.js";
4
+ import "./ErrorMessage-6pG4hFId.js";
5
+ import { t as TextArea } from "./TextArea-s6HdNSc5.js";
6
6
 
7
7
  export { TextArea };
@@ -1,4 +1,4 @@
1
1
  import "./useThemedStyles-Dco_54KA.js";
2
- import { t as Typography } from "./Typography-D1dxTP-6.js";
2
+ import { t as Typography } from "./Typography-u0BPHgCr.js";
3
3
 
4
4
  export { Typography };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softable-pixels-web",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "softable",
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContextMenu-DOIbV9BE.js","names":["floatingOptions: FloatingOptions","DividerRow: React.FC"],"sources":["../src/components/commons/toolkit/ContextMenu/components/Menu/components/ItemRow/styles.ts","../src/components/commons/toolkit/ContextMenu/components/Menu/components/ItemRow/index.tsx","../src/components/commons/toolkit/ContextMenu/components/Menu/components/CustomRow/styles.ts","../src/components/commons/toolkit/ContextMenu/components/Menu/components/CustomRow/index.tsx","../src/components/commons/toolkit/ContextMenu/components/Menu/components/DividerRow/styles.ts","../src/components/commons/toolkit/ContextMenu/components/Menu/components/DividerRow/index.tsx","../src/components/commons/toolkit/ContextMenu/components/Menu/styles.ts","../src/components/commons/toolkit/ContextMenu/components/Menu/index.tsx","../src/components/commons/toolkit/ContextMenu/utils/normalizeMenuOptions.ts","../src/components/commons/toolkit/ContextMenu/types.ts","../src/components/commons/toolkit/ContextMenu/styles.ts","../src/components/commons/toolkit/ContextMenu/index.tsx"],"sourcesContent":["// Types\nimport type { ItemRowProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createItemRowStyles<T>({ item, active }: ItemRowProps<T>) {\n return styled({\n button: {\n width: '100%',\n textAlign: 'left',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '0.5rem',\n\n borderRadius: '0.5rem',\n\n paddingInline: '0.5rem',\n paddingBlock: '0.25rem',\n\n userSelect: 'none',\n\n backgroundColor:\n item.disabled || active\n ? 'var(--px-background-card-hover)'\n : 'transparent',\n\n __rules: {\n '&:hover': {\n transition: 'all 200ms',\n backgroundColor: 'var(--px-background-card-hover) !important'\n }\n }\n },\n containerIcon: {\n width: '1rem',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center'\n }\n })\n}\n","// External Libraries\nimport { type MouseEvent, useEffect, useRef, useState } from 'react'\n\n// Components\nimport { Menu } from '../..'\nimport { Switch } from '@components/commons/toolkit/Switch'\nimport { Typography } from '@components/commons/toolkit/Typography'\nimport { BasePopover } from '@components/commons/structure/BasePopover'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { ItemRowProps } from './types'\nimport type { FloatingOptions } from '@hooks/useFloating/types'\n\n// Styles\nimport { createItemRowStyles } from './styles'\n\nexport const ItemRow = <T extends string>(props: ItemRowProps<T>) => {\n const { item, depth, width, onHover, onSelect } = props\n const isGroup = item.type === 'group'\n\n const [subOpen, setSubOpen] = useState(false)\n const closeTimer = useRef<number | null>(null)\n const anchorRef = useRef<HTMLButtonElement | null>(null)\n const floatingOptions: FloatingOptions = {\n offsetX: 10,\n offsetY: -4,\n strategy: 'fixed',\n keepInViewport: true,\n placement: 'right-start'\n }\n\n // Hooks\n const { styles, classes } = useThemedStyles(props, createItemRowStyles, {\n applyCommonProps: true,\n override: props.styles,\n pick: p => [p.active]\n })\n\n // Functions\n function handleMouseEnter() {\n onHover(item.id, isGroup)\n\n if (!isGroup) return\n clearTimer()\n setSubOpen(true)\n }\n\n function handleMouseLeave() {\n if (!isGroup) return\n scheduleClose()\n }\n\n function handleClick(e?: MouseEvent<HTMLButtonElement>) {\n e?.stopPropagation()\n e?.preventDefault()\n if (isGroup) return\n onSelect(item)\n }\n\n function clearTimer() {\n if (closeTimer.current) window.clearTimeout(closeTimer.current)\n closeTimer.current = null\n }\n\n function scheduleClose() {\n clearTimer()\n closeTimer.current = window.setTimeout(() => setSubOpen(false), 150)\n }\n\n function renderMenuType() {\n if (item.type === 'switch')\n return <Switch checked={item.checked} onChange={() => handleClick()} />\n else {\n return (\n <>\n {item.shortcut ? <span>{item.shortcut}</span> : null}\n\n {isGroup ? <span>›</span> : null}\n </>\n )\n }\n }\n\n // UseEffects\n // biome-ignore lint/correctness/useExhaustiveDependencies: <Not needed>\n useEffect(() => {\n return () => clearTimer()\n }, [])\n\n return (\n <>\n <button\n ref={anchorRef}\n type=\"button\"\n role=\"menuitem\"\n style={styles.button}\n className={classes.button}\n disabled={!!item.disabled}\n aria-disabled={item.disabled || undefined}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n {item.icon ? (\n <span style={styles.containerIcon}>{item.icon ?? null}</span>\n ) : null}\n\n <Typography variant=\"b2\">{item.label}</Typography>\n\n {renderMenuType()}\n </button>\n\n {isGroup ? (\n <BasePopover\n // biome-ignore lint/suspicious/noExplicitAny: <Not needed>\n anchorRef={anchorRef as any}\n open={subOpen}\n closeOnEscape={false}\n closeOnOutsideClick={false}\n floatingOptions={floatingOptions}\n dismissScope={props.dismissScope}\n onMouseEnter={() => {\n clearTimer()\n setSubOpen(true)\n }}\n onMouseLeave={() => {\n scheduleClose()\n }}\n onOpenChange={setSubOpen}\n >\n <Menu\n width={width}\n depth={depth + 1}\n activeId={undefined}\n items={item.children}\n onHover={onHover}\n onSelect={onSelect}\n />\n </BasePopover>\n ) : null}\n </>\n )\n}\n","// Types\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createCustomRowStyles() {\n return styled({\n container: {\n padding: '0.25rem'\n }\n })\n}\n","// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { CustomRowProps } from './types'\n\n// Styles\nimport { createCustomRowStyles } from './styles'\n\nexport const CustomRow = <T extends string>(props: CustomRowProps<T>) => {\n const { item, close } = props\n\n // Hooks\n const { styles } = useThemedStyles(props, createCustomRowStyles)\n\n return <div style={styles.container}>{item.render({ close })}</div>\n}\n","// Types\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createDividerRowStyles() {\n return styled({\n container: {\n border: 0,\n display: 'flex',\n marginBlock: '0.1rem',\n borderTop: '1px solid var(--px-border-primary)'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createDividerRowStyles } from './styles'\n\nexport const DividerRow: React.FC = props => {\n // Hooks\n const { styles } = useThemedStyles(props, createDividerRowStyles)\n\n return <hr style={styles.container} />\n}\n","// Types\nimport type { MenuProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createMenuStyles<T>({ width }: MenuProps<T>) {\n return styled({\n container: {\n width,\n flexShrink: 0\n }\n })\n}\n","// Components\nimport { ItemRow } from './components/ItemRow'\nimport { CustomRow } from './components/CustomRow'\nimport { DividerRow } from './components/DividerRow'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { MenuProps } from './types'\n\n// Styles\nimport { createMenuStyles } from './styles'\n\nexport const Menu = <T extends string>(props: MenuProps<T>) => {\n const { items, depth, activeId, width = 240, onHover, onSelect } = props\n\n const { styles } = useThemedStyles(props, createMenuStyles, {\n applyCommonProps: true,\n override: props.styles,\n pick: p => [p.items, p.width, p.activeId, p.onSelect, p.onHover]\n })\n\n // Functions\n function renderItems() {\n return items.map(item => {\n if (item.type === 'divider') return <DividerRow key={item.id} />\n if (item.type === 'custom')\n return <CustomRow key={item.id} item={item} close={close} />\n\n return (\n <ItemRow\n key={item.id}\n item={item}\n depth={depth}\n width={width}\n active={activeId === item.id}\n dismissScope={props.dismissScope}\n onHover={onHover}\n onSelect={onSelect}\n />\n )\n })\n }\n\n return (\n <div style={styles.container} role={depth === 0 ? 'menu' : undefined}>\n {renderItems()}\n </div>\n )\n}\n","// Types\nimport type { MenuOption, MenuOptionInput } from '../types'\n\nexport function normalizeMenuOptions<T>(\n options: MenuOptionInput<T>[]\n): MenuOption<T>[] {\n return options.map(opt => {\n if ('children' in opt) {\n return {\n id: opt.id,\n label: opt.label,\n icon: opt.icon,\n shortcut: opt.shortcut,\n disabled: opt.disabled,\n className: opt.className,\n type: 'group' as const,\n children: normalizeMenuOptions(opt.children)\n }\n }\n return opt as MenuOption<T>\n })\n}\n","// External Libraries\nimport type { ReactNode } from 'react'\n\n// Hooks\nimport type { Placement } from '@hooks/useFloating/types'\n\n// Styles\nimport type { createContextMenuStyles } from './styles'\n\n// Types\nimport type { TypeStyles } from '@hooks/useThemedStyles/types'\n\ninterface BaseOption<T> {\n id: T\n icon?: ReactNode\n label?: ReactNode\n disabled?: boolean\n className?: string\n shortcut?: ReactNode\n closeOnSelect?: boolean\n}\n\nexport type MenuActionOption<T> = BaseOption<T> & {\n type: 'action'\n closeOnSelect?: boolean\n}\n\nexport type MenuSwitchOption<T> = BaseOption<T> & {\n type: 'switch'\n checked: boolean\n closeOnSelect?: boolean\n onCheckedChange: (next: boolean) => void\n}\n\nexport interface MenuDividerOption<T> {\n id: T\n type: 'divider'\n}\n\nexport interface MenuCustomOption<T> extends BaseOption<T> {\n type: 'custom'\n render: (ctx: { close: () => void }) => ReactNode\n}\n\nexport interface MenuGroupInput<T> extends BaseOption<T> {\n type?: 'group'\n children: MenuOptionInput<T>[]\n}\n\nexport type MenuOptionInput<T> =\n | MenuGroupInput<T>\n | MenuActionOption<T>\n | MenuSwitchOption<T>\n | MenuCustomOption<T>\n | MenuDividerOption<T>\n\nexport interface MenuGroup<T> extends BaseOption<T> {\n type: 'group'\n children: MenuOption<T>[]\n}\n\nexport type MenuOption<T> =\n | MenuGroup<T>\n | MenuActionOption<T>\n | MenuSwitchOption<T>\n | MenuCustomOption<T>\n | MenuDividerOption<T>\n\nexport interface ContextMenuProps<T> {\n trigger: ReactNode\n options: MenuOptionInput<T>[]\n\n offsetX?: number\n offsetY?: number\n columnWidth?: number\n placement?: Placement\n\n onSelect: (actionId: T) => void\n\n styles?: TypeStyles<typeof createContextMenuStyles>\n}\n","// Types\nimport type { ContextMenuProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createContextMenuStyles<T>(_props: ContextMenuProps<T>) {\n return styled({\n trigger: {\n width: 'fit-content',\n height: 'fit-content',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer'\n }\n })\n}\n","// External Libraries\nimport { useMemo, useRef, useState } from 'react'\n\n// Components\nimport { Menu } from './components/Menu'\nimport { BasePopover } from '@components/commons/structure/BasePopover'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Utils\nimport { normalizeMenuOptions } from './utils'\n\n// Types\nimport type { ContextMenuProps, MenuOption } from './types'\nimport type { PopoverTriggerRenderProps } from '../Popover/types'\n\nexport * as ContextMenuTypes from './types'\n\n// Styles\nimport { createContextMenuStyles } from './styles'\n\nexport const ContextMenu = <T extends string>(props: ContextMenuProps<T>) => {\n const {\n trigger,\n options,\n offsetX = 0,\n offsetY = 8,\n columnWidth = 240,\n placement = 'bottom-start',\n onSelect\n } = props\n\n // Refs\n const scopeRef = useRef<string>(makeScopeId())\n\n // States\n const [open, setOpen] = useState(false)\n\n const items = useMemo(() => normalizeMenuOptions(options), [options])\n const floatingOptions = useMemo(\n () => ({\n offsetX,\n offsetY,\n placement\n }),\n [offsetX, offsetY, placement]\n )\n\n // Hooks\n const { styles } = useThemedStyles(props, createContextMenuStyles, {\n applyCommonProps: true,\n override: props.styles,\n pick: p => [p.options, p.columnWidth, p.placement]\n })\n\n // Functions\n function makeScopeId() {\n if (typeof crypto !== 'undefined' && crypto.randomUUID)\n return crypto.randomUUID()\n return `scope_${Math.random().toString(16).slice(2)}`\n }\n\n function handleSelect(item: MenuOption<T>, close: () => void) {\n if (item.type === 'action') {\n onSelect(item.id)\n if (item.closeOnSelect ?? true) close()\n }\n\n if (item.type === 'switch') {\n item.onCheckedChange(!item.checked)\n if (item.closeOnSelect ?? false) close()\n }\n }\n\n function renderTrigger({\n ref,\n ariaExpanded,\n onClick\n }: PopoverTriggerRenderProps) {\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: <Not needed>\n // biome-ignore lint/a11y/useKeyWithClickEvents: <Not needed>\n <span\n ref={ref as any}\n style={styles.trigger}\n aria-expanded={ariaExpanded}\n onClick={onClick}\n >\n {trigger}\n </span>\n )\n }\n\n return (\n <BasePopover\n open={open}\n minWidth=\"fit-content\"\n floatingOptions={floatingOptions}\n dismissScope={scopeRef.current}\n trigger={renderTrigger}\n onOpenChange={setOpen}\n >\n <Menu\n depth={0}\n items={items}\n onHover={() => {}}\n width={columnWidth}\n dismissScope={scopeRef.current}\n onSelect={item =>\n handleSelect(item as MenuOption<T>, () => setOpen(false))\n }\n />\n </BasePopover>\n )\n}\n"],"mappings":";;;;;;;;AAIA,SAAgB,oBAAuB,EAAE,MAAM,UAA2B;AACxE,QAAO,OAAO;EACZ,QAAQ;GACN,OAAO;GACP,WAAW;GAEX,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,KAAK;GAEL,cAAc;GAEd,eAAe;GACf,cAAc;GAEd,YAAY;GAEZ,iBACE,KAAK,YAAY,SACb,oCACA;GAEN,SAAS,EACP,WAAW;IACT,YAAY;IACZ,iBAAiB;IAClB,EACF;GACF;EACD,eAAe;GACb,OAAO;GACP,YAAY;GACZ,SAAS;GACT,YAAY;GACb;EACF,CAAC;;;;;ACrBJ,MAAa,WAA6B,UAA2B;CACnE,MAAM,EAAE,MAAM,OAAO,OAAO,SAAS,aAAa;CAClD,MAAM,UAAU,KAAK,SAAS;CAE9B,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;CAC7C,MAAM,aAAa,OAAsB,KAAK;CAC9C,MAAM,YAAY,OAAiC,KAAK;CACxD,MAAMA,kBAAmC;EACvC,SAAS;EACT,SAAS;EACT,UAAU;EACV,gBAAgB;EAChB,WAAW;EACZ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eAAe,OAAO,WAC1C,QAAO,OAAO,YAAY;AAC5B,SAAO,SAAS,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE;;CAGrD,SAAS,aAAa,MAAqB,SAAmB;AAC5D,MAAI,KAAK,SAAS,UAAU;AAC1B,YAAS,KAAK,GAAG;AACjB,OAAI,KAAK,iBAAiB,KAAM,UAAO;;AAGzC,MAAI,KAAK,SAAS,UAAU;AAC1B,QAAK,gBAAgB,CAAC,KAAK,QAAQ;AACnC,OAAI,KAAK,iBAAiB,MAAO,UAAO;;;CAI5C,SAAS,cAAc,EACrB,KACA,cACA,WAC4B;AAC5B,SAGE,oBAAC;GACM;GACL,OAAO,OAAO;GACd,iBAAe;GACN;aAER;IACI;;AAIX,QACE,oBAAC;EACO;EACN,UAAS;EACQ;EACjB,cAAc,SAAS;EACvB,SAAS;EACT,cAAc;YAEd,oBAAC;GACC,OAAO;GACA;GACP,eAAe;GACf,OAAO;GACP,cAAc,SAAS;GACvB,WAAU,SACR,aAAa,YAA6B,QAAQ,MAAM,CAAC;IAE3D;GACU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input-BWk-tP51.js","names":["value"],"sources":["../src/components/commons/inputs/Input/hooks/useInput/index.ts","../src/components/commons/inputs/Input/styles.ts","../src/components/commons/inputs/Input/index.tsx"],"sourcesContent":["// External Libraries\nimport { useState, useRef, useMemo, useEffect } from 'react'\n\n// Services\nimport { Locale, MaskModule, MaskType } from 'src/services/MaskModule'\n\n// Types\nimport type { InputProps } from '../../types'\nimport { IntegerMask } from '@services/MaskModule/locales/br/masks/IntegerMask'\n\nexport function useInput({\n max,\n mask,\n delay,\n value,\n min,\n onChange,\n ...rest\n}: InputProps) {\n // Refs\n const inputRef = useRef<HTMLInputElement>(null)\n const timeoutRef = useRef<NodeJS.Timeout>(null)\n\n // States\n const [inputValue, setInputValue] = useState(value)\n const [showPassword, setShowPassword] = useState(false)\n\n // Constants\n // biome-ignore lint/correctness/useExhaustiveDependencies: Not Needed\n const { minLength, maxLength } = useMemo(() => {\n const appliedMask = getMask()\n\n const minLength = rest.minLength ?? appliedMask?.minLength\n const maxLength = rest.maxLength ?? appliedMask?.maxLength\n\n return { minLength, maxLength }\n }, [mask, rest.minLength, rest.maxLength])\n\n // UseEffects\n useEffect(() => {\n setInputValue(value)\n }, [value])\n\n // Functions\n function getMask() {\n if (!mask) return undefined\n\n if (mask === MaskType.INTEGER) return new IntegerMask({ max, min })\n else return MaskModule.getMask(Locale.BR, mask)\n }\n\n function togglePasswordVisibility() {\n setShowPassword(prev => !prev)\n }\n\n function handleRefMethods() {\n return { focus: handleFocus, blur: handleBlur }\n }\n\n function handleFocus() {\n inputRef.current?.focus()\n }\n\n function handleBlur() {\n inputRef.current?.blur()\n }\n\n function handleChange(e: React.ChangeEvent<HTMLInputElement>) {\n let value = e.target.value\n\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n\n if (mask) {\n const module = getMask()\n if (module) value = module.format(value)\n }\n\n if (!delay) onChange?.(value)\n else {\n timeoutRef.current = setTimeout(() => onChange?.(value), delay)\n }\n }\n\n return {\n inputRef,\n minLength,\n maxLength,\n inputValue,\n showPassword,\n handleChange,\n handleRefMethods,\n togglePasswordVisibility\n }\n}\n","// Hooks\nimport { styled } from '@hooks/useThemedStyles/types'\n\n// Types\nimport type { InputProps } from './types'\n\nexport function createInputStyles(props: InputProps) {\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n\n rowGap: '0.375rem'\n },\n wrapper: {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n\n borderWidth: 1,\n columnGap: '0.25rem',\n borderRadius: '0.5rem',\n padding: '0.625rem 0.875rem',\n\n opacity: props.disabled ? 0.5 : 1,\n boxShadow: 'var(--px-shadow-default)',\n borderColor: props.errorMessage\n ? 'var(--px-color-error)'\n : 'var(--px-border-primary)',\n\n __rules: {\n '&:focus-within': {\n outlineOffset: '-1px',\n outline: `2px solid var(${props.errorMessage ? '--px-color-error' : '--px-color-primary'})`\n }\n }\n },\n\n input: {\n flex: 1,\n\n fontWeight: 500,\n fontSize: '1rem',\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n color: 'var(--px-text-primary)',\n\n __rules: {\n '&:disabled': {\n cursor: 'not-allowed'\n },\n\n '&:focus': {\n outline: 'none'\n },\n\n '&::placeholder': {\n fontWeight: 400,\n color: 'var(--px-text-secondary)'\n }\n }\n },\n\n button: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n cursor: 'pointer',\n padding: '0.25rem',\n borderRadius: '0.5rem',\n\n __rules: {\n '&:focus': {\n outline: '1px solid var(--px-border-primary)'\n }\n }\n }\n })\n}\n","/** biome-ignore-all lint/a11y/noAutofocus: It's a custom input component */\n// External Libraries\nimport { forwardRef, useId, useImperativeHandle, useMemo } from 'react'\n\n// Components\nimport { Label } from '../../toolkit/Label'\nimport { Icon } from '@components/commons/toolkit/Icon'\nimport { ErrorMessage } from '../../toolkit/ErrorMessage'\n\n// Types\nimport type { InputProps, InputMethods } from './types'\n\n// Hooks\nimport { useInput } from './hooks/useInput'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createInputStyles } from './styles'\n\nexport const Input = forwardRef<InputMethods, InputProps>((props, ref) => {\n // Constants\n const reactId = useId()\n const inputId = useMemo(() => {\n return props.id || `input-${reactId}`\n }, [props.id, reactId])\n\n // Hooks\n const {\n inputRef,\n minLength,\n maxLength,\n inputValue,\n showPassword,\n handleChange,\n handleRefMethods,\n togglePasswordVisibility\n } = useInput(props)\n useImperativeHandle(ref, handleRefMethods)\n\n // Hooks\n const { styles, classes } = useThemedStyles(props, createInputStyles, {\n pick: p => [p.disabled, p.errorMessage],\n override: props.styles,\n applyCommonProps: true,\n commonSlot: 'container'\n })\n\n // Functions\n function getType() {\n if (props.type === 'password' && showPassword) return 'text'\n return props.type\n }\n\n function renderEndContent() {\n if (props.type === 'password') {\n return (\n <button\n type=\"button\"\n style={styles.button}\n className={classes.button}\n onClick={togglePasswordVisibility}\n >\n <Icon\n size=\"sm\"\n name={showPassword ? 'general-eye-off' : 'general-eye'}\n />\n </button>\n )\n }\n\n return props.endIcon ?? null\n }\n\n return (\n <div style={styles.container}>\n {props.hideLabel ? null : (\n <Label\n htmlFor={inputId}\n label={props.label}\n required={props.required}\n requiredColor={props.requiredColor}\n {...props.labelConfig}\n />\n )}\n\n <div style={styles.wrapper} className={classes.wrapper}>\n {props.startIcon}\n\n <input\n ref={inputRef}\n id={inputId}\n type={getType()}\n value={inputValue}\n style={styles.input}\n minLength={minLength}\n maxLength={maxLength}\n required={props.required}\n disabled={props.disabled}\n className={classes.input}\n autoFocus={props.autoFocus}\n spellCheck={props.spellCheck}\n autoCorrect={props.autoCorrect}\n placeholder={props.placeholder}\n autoComplete={props.autoComplete}\n autoCapitalize={props.autoCapitalize}\n aria-label={!props.hideLabel ? undefined : props.label}\n onChange={handleChange}\n />\n\n {renderEndContent()}\n </div>\n\n {props.errorMessage ? (\n <ErrorMessage message={props.errorMessage} />\n ) : null}\n </div>\n )\n})\n\nInput.displayName = 'Input'\n"],"mappings":";;;;;;;;;AAUA,SAAgB,SAAS,EACvB,KACA,MACA,OACA,OACA,KACA,UACA,GAAG,QACU;CAEb,MAAM,WAAW,OAAyB,KAAK;CAC/C,MAAM,aAAa,OAAuB,KAAK;CAG/C,MAAM,CAAC,YAAY,iBAAiB,SAAS,MAAM;CACnD,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CAIvD,MAAM,EAAE,WAAW,cAAc,cAAc;EAC7C,MAAM,cAAc,SAAS;AAK7B,SAAO;GAAE,WAHS,KAAK,aAAa,aAAa;GAG7B,WAFF,KAAK,aAAa,aAAa;GAElB;IAC9B;EAAC;EAAM,KAAK;EAAW,KAAK;EAAU,CAAC;AAG1C,iBAAgB;AACd,gBAAc,MAAM;IACnB,CAAC,MAAM,CAAC;CAGX,SAAS,UAAU;AACjB,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI,S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