zenput 1.0.0

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 (148) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +271 -0
  3. package/dist/cjs/index.js +1126 -0
  4. package/dist/cjs/index.js.map +1 -0
  5. package/dist/cjs/types/components/AutoComplete/AutoComplete.d.ts +3 -0
  6. package/dist/cjs/types/components/AutoComplete/AutoComplete.types.d.ts +27 -0
  7. package/dist/cjs/types/components/AutoComplete/index.d.ts +2 -0
  8. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +3 -0
  9. package/dist/cjs/types/components/Checkbox/Checkbox.types.d.ts +6 -0
  10. package/dist/cjs/types/components/Checkbox/index.d.ts +2 -0
  11. package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
  12. package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.types.d.ts +20 -0
  13. package/dist/cjs/types/components/CheckboxGroup/index.d.ts +2 -0
  14. package/dist/cjs/types/components/ColorInput/ColorInput.d.ts +3 -0
  15. package/dist/cjs/types/components/ColorInput/ColorInput.types.d.ts +6 -0
  16. package/dist/cjs/types/components/ColorInput/index.d.ts +2 -0
  17. package/dist/cjs/types/components/DataTable/DataTable.d.ts +5 -0
  18. package/dist/cjs/types/components/DataTable/DataTable.types.d.ts +31 -0
  19. package/dist/cjs/types/components/DataTable/index.d.ts +2 -0
  20. package/dist/cjs/types/components/DateInput/DateInput.d.ts +3 -0
  21. package/dist/cjs/types/components/DateInput/DateInput.types.d.ts +8 -0
  22. package/dist/cjs/types/components/DateInput/index.d.ts +2 -0
  23. package/dist/cjs/types/components/FileInput/FileInput.d.ts +3 -0
  24. package/dist/cjs/types/components/FileInput/FileInput.types.d.ts +10 -0
  25. package/dist/cjs/types/components/FileInput/index.d.ts +2 -0
  26. package/dist/cjs/types/components/NumberInput/NumberInput.d.ts +3 -0
  27. package/dist/cjs/types/components/NumberInput/NumberInput.types.d.ts +18 -0
  28. package/dist/cjs/types/components/NumberInput/index.d.ts +2 -0
  29. package/dist/cjs/types/components/OTPInput/OTPInput.d.ts +3 -0
  30. package/dist/cjs/types/components/OTPInput/OTPInput.types.d.ts +20 -0
  31. package/dist/cjs/types/components/OTPInput/index.d.ts +2 -0
  32. package/dist/cjs/types/components/PasswordInput/PasswordInput.d.ts +3 -0
  33. package/dist/cjs/types/components/PasswordInput/PasswordInput.types.d.ts +10 -0
  34. package/dist/cjs/types/components/PasswordInput/index.d.ts +2 -0
  35. package/dist/cjs/types/components/PhoneInput/PhoneInput.d.ts +3 -0
  36. package/dist/cjs/types/components/PhoneInput/PhoneInput.types.d.ts +20 -0
  37. package/dist/cjs/types/components/PhoneInput/index.d.ts +2 -0
  38. package/dist/cjs/types/components/RadioGroup/RadioGroup.d.ts +3 -0
  39. package/dist/cjs/types/components/RadioGroup/RadioGroup.types.d.ts +22 -0
  40. package/dist/cjs/types/components/RadioGroup/index.d.ts +2 -0
  41. package/dist/cjs/types/components/RangeInput/RangeInput.d.ts +3 -0
  42. package/dist/cjs/types/components/RangeInput/RangeInput.types.d.ts +14 -0
  43. package/dist/cjs/types/components/RangeInput/index.d.ts +2 -0
  44. package/dist/cjs/types/components/SearchInput/SearchInput.d.ts +3 -0
  45. package/dist/cjs/types/components/SearchInput/SearchInput.types.d.ts +10 -0
  46. package/dist/cjs/types/components/SearchInput/index.d.ts +2 -0
  47. package/dist/cjs/types/components/SelectInput/SelectInput.d.ts +3 -0
  48. package/dist/cjs/types/components/SelectInput/SelectInput.types.d.ts +13 -0
  49. package/dist/cjs/types/components/SelectInput/index.d.ts +2 -0
  50. package/dist/cjs/types/components/TextArea/TextArea.d.ts +3 -0
  51. package/dist/cjs/types/components/TextArea/TextArea.types.d.ts +8 -0
  52. package/dist/cjs/types/components/TextArea/index.d.ts +2 -0
  53. package/dist/cjs/types/components/TextInput/TextInput.d.ts +3 -0
  54. package/dist/cjs/types/components/TextInput/TextInput.types.d.ts +4 -0
  55. package/dist/cjs/types/components/TextInput/index.d.ts +2 -0
  56. package/dist/cjs/types/components/TimeInput/TimeInput.d.ts +3 -0
  57. package/dist/cjs/types/components/TimeInput/TimeInput.types.d.ts +8 -0
  58. package/dist/cjs/types/components/TimeInput/index.d.ts +2 -0
  59. package/dist/cjs/types/components/Toggle/Toggle.d.ts +3 -0
  60. package/dist/cjs/types/components/Toggle/Toggle.types.d.ts +6 -0
  61. package/dist/cjs/types/components/Toggle/index.d.ts +2 -0
  62. package/dist/cjs/types/components/index.d.ts +19 -0
  63. package/dist/cjs/types/context/ThemeProvider.d.ts +27 -0
  64. package/dist/cjs/types/context/index.d.ts +1 -0
  65. package/dist/cjs/types/hooks/index.d.ts +2 -0
  66. package/dist/cjs/types/hooks/useControllable.d.ts +7 -0
  67. package/dist/cjs/types/hooks/useFormField.d.ts +25 -0
  68. package/dist/cjs/types/index.d.ts +4 -0
  69. package/dist/cjs/types/types/common.d.ts +52 -0
  70. package/dist/cjs/types/types/index.d.ts +1 -0
  71. package/dist/cjs/types/utils/classNames.d.ts +3 -0
  72. package/dist/cjs/types/utils/constants.d.ts +9 -0
  73. package/dist/cjs/types/utils/index.d.ts +3 -0
  74. package/dist/cjs/types/utils/validation.d.ts +23 -0
  75. package/dist/esm/index.js +1102 -0
  76. package/dist/esm/index.js.map +1 -0
  77. package/dist/esm/types/components/AutoComplete/AutoComplete.d.ts +3 -0
  78. package/dist/esm/types/components/AutoComplete/AutoComplete.types.d.ts +27 -0
  79. package/dist/esm/types/components/AutoComplete/index.d.ts +2 -0
  80. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
  81. package/dist/esm/types/components/Checkbox/Checkbox.types.d.ts +6 -0
  82. package/dist/esm/types/components/Checkbox/index.d.ts +2 -0
  83. package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
  84. package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.types.d.ts +20 -0
  85. package/dist/esm/types/components/CheckboxGroup/index.d.ts +2 -0
  86. package/dist/esm/types/components/ColorInput/ColorInput.d.ts +3 -0
  87. package/dist/esm/types/components/ColorInput/ColorInput.types.d.ts +6 -0
  88. package/dist/esm/types/components/ColorInput/index.d.ts +2 -0
  89. package/dist/esm/types/components/DataTable/DataTable.d.ts +5 -0
  90. package/dist/esm/types/components/DataTable/DataTable.types.d.ts +31 -0
  91. package/dist/esm/types/components/DataTable/index.d.ts +2 -0
  92. package/dist/esm/types/components/DateInput/DateInput.d.ts +3 -0
  93. package/dist/esm/types/components/DateInput/DateInput.types.d.ts +8 -0
  94. package/dist/esm/types/components/DateInput/index.d.ts +2 -0
  95. package/dist/esm/types/components/FileInput/FileInput.d.ts +3 -0
  96. package/dist/esm/types/components/FileInput/FileInput.types.d.ts +10 -0
  97. package/dist/esm/types/components/FileInput/index.d.ts +2 -0
  98. package/dist/esm/types/components/NumberInput/NumberInput.d.ts +3 -0
  99. package/dist/esm/types/components/NumberInput/NumberInput.types.d.ts +18 -0
  100. package/dist/esm/types/components/NumberInput/index.d.ts +2 -0
  101. package/dist/esm/types/components/OTPInput/OTPInput.d.ts +3 -0
  102. package/dist/esm/types/components/OTPInput/OTPInput.types.d.ts +20 -0
  103. package/dist/esm/types/components/OTPInput/index.d.ts +2 -0
  104. package/dist/esm/types/components/PasswordInput/PasswordInput.d.ts +3 -0
  105. package/dist/esm/types/components/PasswordInput/PasswordInput.types.d.ts +10 -0
  106. package/dist/esm/types/components/PasswordInput/index.d.ts +2 -0
  107. package/dist/esm/types/components/PhoneInput/PhoneInput.d.ts +3 -0
  108. package/dist/esm/types/components/PhoneInput/PhoneInput.types.d.ts +20 -0
  109. package/dist/esm/types/components/PhoneInput/index.d.ts +2 -0
  110. package/dist/esm/types/components/RadioGroup/RadioGroup.d.ts +3 -0
  111. package/dist/esm/types/components/RadioGroup/RadioGroup.types.d.ts +22 -0
  112. package/dist/esm/types/components/RadioGroup/index.d.ts +2 -0
  113. package/dist/esm/types/components/RangeInput/RangeInput.d.ts +3 -0
  114. package/dist/esm/types/components/RangeInput/RangeInput.types.d.ts +14 -0
  115. package/dist/esm/types/components/RangeInput/index.d.ts +2 -0
  116. package/dist/esm/types/components/SearchInput/SearchInput.d.ts +3 -0
  117. package/dist/esm/types/components/SearchInput/SearchInput.types.d.ts +10 -0
  118. package/dist/esm/types/components/SearchInput/index.d.ts +2 -0
  119. package/dist/esm/types/components/SelectInput/SelectInput.d.ts +3 -0
  120. package/dist/esm/types/components/SelectInput/SelectInput.types.d.ts +13 -0
  121. package/dist/esm/types/components/SelectInput/index.d.ts +2 -0
  122. package/dist/esm/types/components/TextArea/TextArea.d.ts +3 -0
  123. package/dist/esm/types/components/TextArea/TextArea.types.d.ts +8 -0
  124. package/dist/esm/types/components/TextArea/index.d.ts +2 -0
  125. package/dist/esm/types/components/TextInput/TextInput.d.ts +3 -0
  126. package/dist/esm/types/components/TextInput/TextInput.types.d.ts +4 -0
  127. package/dist/esm/types/components/TextInput/index.d.ts +2 -0
  128. package/dist/esm/types/components/TimeInput/TimeInput.d.ts +3 -0
  129. package/dist/esm/types/components/TimeInput/TimeInput.types.d.ts +8 -0
  130. package/dist/esm/types/components/TimeInput/index.d.ts +2 -0
  131. package/dist/esm/types/components/Toggle/Toggle.d.ts +3 -0
  132. package/dist/esm/types/components/Toggle/Toggle.types.d.ts +6 -0
  133. package/dist/esm/types/components/Toggle/index.d.ts +2 -0
  134. package/dist/esm/types/components/index.d.ts +19 -0
  135. package/dist/esm/types/context/ThemeProvider.d.ts +27 -0
  136. package/dist/esm/types/context/index.d.ts +1 -0
  137. package/dist/esm/types/hooks/index.d.ts +2 -0
  138. package/dist/esm/types/hooks/useControllable.d.ts +7 -0
  139. package/dist/esm/types/hooks/useFormField.d.ts +25 -0
  140. package/dist/esm/types/index.d.ts +4 -0
  141. package/dist/esm/types/types/common.d.ts +52 -0
  142. package/dist/esm/types/types/index.d.ts +1 -0
  143. package/dist/esm/types/utils/classNames.d.ts +3 -0
  144. package/dist/esm/types/utils/constants.d.ts +9 -0
  145. package/dist/esm/types/utils/index.d.ts +3 -0
  146. package/dist/esm/types/utils/validation.d.ts +23 -0
  147. package/dist/index.d.ts +401 -0
  148. package/package.json +69 -0
@@ -0,0 +1,1126 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+
6
+ function classNames(...args) {
7
+ const classes = [];
8
+ for (const arg of args) {
9
+ if (!arg)
10
+ continue;
11
+ if (typeof arg === 'string') {
12
+ classes.push(arg);
13
+ }
14
+ else if (typeof arg === 'object') {
15
+ for (const [key, value] of Object.entries(arg)) {
16
+ if (value)
17
+ classes.push(key);
18
+ }
19
+ }
20
+ }
21
+ return classes.join(' ');
22
+ }
23
+
24
+ /**
25
+ * Gets the appropriate message based on validation state
26
+ * @param validationState - Current validation state
27
+ * @param errorMessage - Message to show in error state
28
+ * @param successMessage - Message to show in success state
29
+ * @param warningMessage - Message to show in warning state
30
+ * @param helperText - Default helper text
31
+ * @returns The active message to display
32
+ */
33
+ function getValidationMessage(validationState = 'default', errorMessage, successMessage, warningMessage, helperText) {
34
+ if (validationState === 'error')
35
+ return errorMessage;
36
+ if (validationState === 'success')
37
+ return successMessage;
38
+ if (validationState === 'warning')
39
+ return warningMessage;
40
+ return helperText;
41
+ }
42
+ /**
43
+ * Gets the CSS class name for validation message styling
44
+ * @param validationState - Current validation state
45
+ * @param styles - CSS modules styles object containing message class names
46
+ * @returns The appropriate CSS class name
47
+ */
48
+ function getValidationMessageClass(validationState = 'default', styles) {
49
+ if (validationState === 'error')
50
+ return styles.errorText;
51
+ if (validationState === 'success')
52
+ return styles.successText;
53
+ if (validationState === 'warning')
54
+ return styles.warningText;
55
+ return styles.helperText;
56
+ }
57
+
58
+ /**
59
+ * Common constants used across the library
60
+ */
61
+ /** Delay before closing dropdown after blur to allow click events to fire (in milliseconds) */
62
+ const DROPDOWN_BLUR_DELAY_MS = 150;
63
+
64
+ function useFormField({ id, helperText, errorMessage, validationState, required, disabled, }) {
65
+ const generatedId = React.useId();
66
+ const inputId = id !== null && id !== void 0 ? id : `input-${generatedId}`;
67
+ const helperId = `${inputId}-helper`;
68
+ const hasHelperContent = Boolean(helperText || errorMessage);
69
+ return {
70
+ inputId,
71
+ helperId,
72
+ labelProps: { htmlFor: inputId },
73
+ inputAriaProps: {
74
+ ...(hasHelperContent ? { 'aria-describedby': helperId } : {}),
75
+ ...(validationState === 'error' ? { 'aria-invalid': true } : {}),
76
+ ...(required ? { 'aria-required': true } : {}),
77
+ ...(disabled ? { 'aria-disabled': true } : {}),
78
+ },
79
+ };
80
+ }
81
+
82
+ function useControllable({ value, defaultValue, onChange, }) {
83
+ const isControlled = value !== undefined;
84
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
85
+ const currentValue = isControlled ? value : internalValue;
86
+ const handleChange = React.useCallback((newValue) => {
87
+ if (!isControlled) {
88
+ setInternalValue(newValue);
89
+ }
90
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
91
+ }, [isControlled, onChange]);
92
+ return [currentValue, handleChange];
93
+ }
94
+
95
+ function styleInject(css, ref) {
96
+ if ( ref === void 0 ) ref = {};
97
+ var insertAt = ref.insertAt;
98
+
99
+ if (!css || typeof document === 'undefined') { return; }
100
+
101
+ var head = document.head || document.getElementsByTagName('head')[0];
102
+ var style = document.createElement('style');
103
+ style.type = 'text/css';
104
+
105
+ if (insertAt === 'top') {
106
+ if (head.firstChild) {
107
+ head.insertBefore(style, head.firstChild);
108
+ } else {
109
+ head.appendChild(style);
110
+ }
111
+ } else {
112
+ head.appendChild(style);
113
+ }
114
+
115
+ if (style.styleSheet) {
116
+ style.styleSheet.cssText = css;
117
+ } else {
118
+ style.appendChild(document.createTextNode(css));
119
+ }
120
+ }
121
+
122
+ var css_248z$i = ".TextInput-module_wrapper__MwqRi {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.TextInput-module_fullWidth__AMPyY {\n width: 100%;\n}\n\n.TextInput-module_label__JY3GX {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.TextInput-module_required__7j2Rq::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.TextInput-module_inputWrapper__mGu9t {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.TextInput-module_input__gzKqV {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;\n outline: none;\n box-sizing: border-box;\n}\n\n.TextInput-module_input__gzKqV::placeholder {\n color: var(--input-placeholder-color);\n}\n\n/* Sizes */\n.TextInput-module_sm__Jpp-B .TextInput-module_input__gzKqV {\n padding: 6px 10px;\n font-size: 0.75rem;\n height: 32px;\n}\n\n.TextInput-module_md__YrGPN .TextInput-module_input__gzKqV {\n padding: 8px 12px;\n font-size: 0.875rem;\n height: 40px;\n}\n\n.TextInput-module_lg__NX0s3 .TextInput-module_input__gzKqV {\n padding: 10px 16px;\n font-size: 1rem;\n height: 48px;\n}\n\n/* Variants */\n.TextInput-module_outlined__m-eGw .TextInput-module_input__gzKqV {\n border: 1px solid var(--input-border-color);\n}\n\n.TextInput-module_outlined__m-eGw .TextInput-module_input__gzKqV:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.TextInput-module_outlined__m-eGw .TextInput-module_input__gzKqV:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.TextInput-module_filled__YmoWE .TextInput-module_input__gzKqV {\n border: 1px solid transparent;\n background-color: #f3f4f6;\n}\n\n.TextInput-module_filled__YmoWE .TextInput-module_input__gzKqV:hover:not(:disabled) {\n background-color: #e5e7eb;\n}\n\n.TextInput-module_filled__YmoWE .TextInput-module_input__gzKqV:focus {\n background-color: var(--input-bg-color);\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.TextInput-module_underlined__JWk-- .TextInput-module_input__gzKqV {\n border: none;\n border-bottom: 2px solid var(--input-border-color);\n border-radius: 0;\n padding-left: 0;\n padding-right: 0;\n}\n\n.TextInput-module_underlined__JWk-- .TextInput-module_input__gzKqV:hover:not(:disabled) {\n border-bottom-color: var(--input-primary-color);\n}\n\n.TextInput-module_underlined__JWk-- .TextInput-module_input__gzKqV:focus {\n border-bottom-color: var(--input-primary-color);\n box-shadow: 0 2px 0 0 var(--input-focus-ring-color);\n}\n\n/* Validation states */\n.TextInput-module_error__IzapV .TextInput-module_input__gzKqV {\n border-color: var(--input-error-color) !important;\n}\n\n.TextInput-module_error__IzapV .TextInput-module_input__gzKqV:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;\n}\n\n.TextInput-module_success__YeilQ .TextInput-module_input__gzKqV {\n border-color: var(--input-success-color) !important;\n}\n\n.TextInput-module_success__YeilQ .TextInput-module_input__gzKqV:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important;\n}\n\n.TextInput-module_warning__1384Y .TextInput-module_input__gzKqV {\n border-color: var(--input-warning-color) !important;\n}\n\n.TextInput-module_warning__1384Y .TextInput-module_input__gzKqV:focus {\n box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;\n}\n\n/* Disabled */\n.TextInput-module_input__gzKqV:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n/* Prefix/Suffix */\n.TextInput-module_hasPrefixIcon__Q6XXk .TextInput-module_input__gzKqV {\n padding-left: 36px;\n}\n\n.TextInput-module_hasSuffixIcon__kwORB .TextInput-module_input__gzKqV {\n padding-right: 36px;\n}\n\n.TextInput-module_prefixIcon__xPlid,\n.TextInput-module_suffixIcon__ZgZRE {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--input-placeholder-color);\n pointer-events: none;\n}\n\n.TextInput-module_prefixIcon__xPlid {\n left: 10px;\n}\n\n.TextInput-module_suffixIcon__ZgZRE {\n right: 10px;\n}\n\n.TextInput-module_helperText__OVezy {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.TextInput-module_errorText__WcPXZ {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n\n.TextInput-module_successText__OXyzP {\n font-size: 0.75rem;\n color: var(--input-success-color);\n}\n\n.TextInput-module_warningText__Q6KnJ {\n font-size: 0.75rem;\n color: var(--input-warning-color);\n}\n";
123
+ var styles$i = {"wrapper":"TextInput-module_wrapper__MwqRi","fullWidth":"TextInput-module_fullWidth__AMPyY","label":"TextInput-module_label__JY3GX","required":"TextInput-module_required__7j2Rq","inputWrapper":"TextInput-module_inputWrapper__mGu9t","input":"TextInput-module_input__gzKqV","sm":"TextInput-module_sm__Jpp-B","md":"TextInput-module_md__YrGPN","lg":"TextInput-module_lg__NX0s3","outlined":"TextInput-module_outlined__m-eGw","filled":"TextInput-module_filled__YmoWE","underlined":"TextInput-module_underlined__JWk--","error":"TextInput-module_error__IzapV","success":"TextInput-module_success__YeilQ","warning":"TextInput-module_warning__1384Y","hasPrefixIcon":"TextInput-module_hasPrefixIcon__Q6XXk","hasSuffixIcon":"TextInput-module_hasSuffixIcon__kwORB","prefixIcon":"TextInput-module_prefixIcon__xPlid","suffixIcon":"TextInput-module_suffixIcon__ZgZRE","helperText":"TextInput-module_helperText__OVezy","errorText":"TextInput-module_errorText__WcPXZ","successText":"TextInput-module_successText__OXyzP","warningText":"TextInput-module_warningText__Q6KnJ"};
124
+ styleInject(css_248z$i);
125
+
126
+ const TextInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon, suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, ...rest }, ref) => {
127
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
128
+ id,
129
+ helperText,
130
+ errorMessage,
131
+ validationState,
132
+ required,
133
+ disabled,
134
+ });
135
+ const activeMessage = getValidationMessage(validationState, errorMessage, successMessage, warningMessage, helperText);
136
+ const messageClass = getValidationMessageClass(validationState, styles$i);
137
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$i.wrapper, styles$i[size], styles$i[variant], validationState !== 'default' ? styles$i[validationState] : undefined, fullWidth ? styles$i.fullWidth : undefined, prefixIcon ? styles$i.hasPrefixIcon : undefined, suffixIcon ? styles$i.hasSuffixIcon : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$i.label, required ? styles$i.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$i.inputWrapper, children: [prefixIcon && jsxRuntime.jsx("span", { className: styles$i.prefixIcon, children: prefixIcon }), jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, disabled: disabled, readOnly: readOnly, required: required, className: classNames(styles$i.input, inputClassName, className), style: inputStyle }), suffixIcon && jsxRuntime.jsx("span", { className: styles$i.suffixIcon, children: suffixIcon })] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
138
+ });
139
+ TextInput.displayName = 'TextInput';
140
+
141
+ var css_248z$h = ".TextArea-module_wrapper__O0sWP {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.TextArea-module_fullWidth__l88p- {\n width: 100%;\n}\n\n.TextArea-module_label__2TV89 {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.TextArea-module_required__c0fwb::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.TextArea-module_inputWrapper__1s0yh {\n position: relative;\n display: flex;\n align-items: flex-start;\n}\n\n.TextArea-module_input__8l36v {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n resize: vertical;\n min-height: 80px;\n}\n\n.TextArea-module_autoResize__z0lFS {\n resize: none;\n overflow: hidden;\n}\n\n.TextArea-module_input__8l36v::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.TextArea-module_sm__ZMvWk .TextArea-module_input__8l36v {\n padding: 6px 10px;\n font-size: 0.75rem;\n}\n\n.TextArea-module_md__3VeXV .TextArea-module_input__8l36v {\n padding: 8px 12px;\n font-size: 0.875rem;\n}\n\n.TextArea-module_lg__BzTNh .TextArea-module_input__8l36v {\n padding: 10px 16px;\n font-size: 1rem;\n}\n\n.TextArea-module_outlined__kPBWN .TextArea-module_input__8l36v {\n border: 1px solid var(--input-border-color);\n}\n\n.TextArea-module_outlined__kPBWN .TextArea-module_input__8l36v:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.TextArea-module_outlined__kPBWN .TextArea-module_input__8l36v:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.TextArea-module_filled__dMfK8 .TextArea-module_input__8l36v {\n border: 1px solid transparent;\n background-color: #f3f4f6;\n}\n\n.TextArea-module_filled__dMfK8 .TextArea-module_input__8l36v:hover:not(:disabled) {\n background-color: #e5e7eb;\n}\n\n.TextArea-module_filled__dMfK8 .TextArea-module_input__8l36v:focus {\n background-color: var(--input-bg-color);\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.TextArea-module_underlined__ToCv5 .TextArea-module_input__8l36v {\n border: none;\n border-bottom: 2px solid var(--input-border-color);\n border-radius: 0;\n padding-left: 0;\n padding-right: 0;\n resize: none;\n}\n\n.TextArea-module_underlined__ToCv5 .TextArea-module_input__8l36v:hover:not(:disabled) {\n border-bottom-color: var(--input-primary-color);\n}\n\n.TextArea-module_underlined__ToCv5 .TextArea-module_input__8l36v:focus {\n border-bottom-color: var(--input-primary-color);\n box-shadow: 0 2px 0 0 var(--input-focus-ring-color);\n}\n\n.TextArea-module_error__Jvxk5 .TextArea-module_input__8l36v {\n border-color: var(--input-error-color) !important;\n}\n\n.TextArea-module_error__Jvxk5 .TextArea-module_input__8l36v:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;\n}\n\n.TextArea-module_success__VhgM4 .TextArea-module_input__8l36v {\n border-color: var(--input-success-color) !important;\n}\n\n.TextArea-module_success__VhgM4 .TextArea-module_input__8l36v:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important;\n}\n\n.TextArea-module_warning__5iMT- .TextArea-module_input__8l36v {\n border-color: var(--input-warning-color) !important;\n}\n\n.TextArea-module_warning__5iMT- .TextArea-module_input__8l36v:focus {\n box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;\n}\n\n.TextArea-module_input__8l36v:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n resize: none;\n}\n\n.TextArea-module_footer__Plp7P {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n}\n\n.TextArea-module_helperText__0ecSv {\n font-size: 0.75rem;\n color: #6b7280;\n flex: 1;\n}\n\n.TextArea-module_errorText__-WKsN {\n font-size: 0.75rem;\n color: var(--input-error-color);\n flex: 1;\n}\n\n.TextArea-module_successText__vqWFw {\n font-size: 0.75rem;\n color: var(--input-success-color);\n flex: 1;\n}\n\n.TextArea-module_warningText__45qdi {\n font-size: 0.75rem;\n color: var(--input-warning-color);\n flex: 1;\n}\n\n.TextArea-module_charCount__oakcx {\n font-size: 0.75rem;\n color: #9ca3af;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.TextArea-module_charCountExceeded__QZkpi {\n color: var(--input-error-color);\n}\n";
142
+ var styles$h = {"wrapper":"TextArea-module_wrapper__O0sWP","fullWidth":"TextArea-module_fullWidth__l88p-","label":"TextArea-module_label__2TV89","required":"TextArea-module_required__c0fwb","inputWrapper":"TextArea-module_inputWrapper__1s0yh","input":"TextArea-module_input__8l36v","autoResize":"TextArea-module_autoResize__z0lFS","sm":"TextArea-module_sm__ZMvWk","md":"TextArea-module_md__3VeXV","lg":"TextArea-module_lg__BzTNh","outlined":"TextArea-module_outlined__kPBWN","filled":"TextArea-module_filled__dMfK8","underlined":"TextArea-module_underlined__ToCv5","error":"TextArea-module_error__Jvxk5","success":"TextArea-module_success__VhgM4","warning":"TextArea-module_warning__5iMT-","footer":"TextArea-module_footer__Plp7P","helperText":"TextArea-module_helperText__0ecSv","errorText":"TextArea-module_errorText__-WKsN","successText":"TextArea-module_successText__vqWFw","warningText":"TextArea-module_warningText__45qdi","charCount":"TextArea-module_charCount__oakcx","charCountExceeded":"TextArea-module_charCountExceeded__QZkpi"};
143
+ styleInject(css_248z$h);
144
+
145
+ const TextArea = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, autoResize, showCharCount, maxLength, value, defaultValue, onChange, ...rest }, ref) => {
146
+ var _a;
147
+ const internalRef = React.useRef(null);
148
+ const textareaRef = (_a = ref) !== null && _a !== void 0 ? _a : internalRef;
149
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
150
+ id,
151
+ helperText,
152
+ errorMessage,
153
+ validationState,
154
+ required,
155
+ disabled,
156
+ });
157
+ const [charCount, setCharCount] = React.useState(() => {
158
+ var _a;
159
+ const initial = (_a = value !== null && value !== void 0 ? value : defaultValue) !== null && _a !== void 0 ? _a : '';
160
+ return String(initial).length;
161
+ });
162
+ const handleChange = React.useCallback((e) => {
163
+ setCharCount(e.target.value.length);
164
+ if (autoResize && textareaRef.current) {
165
+ textareaRef.current.style.height = 'auto';
166
+ textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
167
+ }
168
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
169
+ }, [autoResize, onChange, textareaRef]);
170
+ const activeMessage = validationState === 'error'
171
+ ? errorMessage
172
+ : validationState === 'success'
173
+ ? successMessage
174
+ : validationState === 'warning'
175
+ ? warningMessage
176
+ : helperText;
177
+ const messageClass = validationState === 'error'
178
+ ? styles$h.errorText
179
+ : validationState === 'success'
180
+ ? styles$h.successText
181
+ : validationState === 'warning'
182
+ ? styles$h.warningText
183
+ : styles$h.helperText;
184
+ const isExceeded = maxLength !== undefined && charCount > maxLength;
185
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$h.wrapper, styles$h[size], styles$h[variant], validationState !== 'default' ? styles$h[validationState] : undefined, fullWidth ? styles$h.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$h.label, required ? styles$h.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("div", { className: styles$h.inputWrapper, children: jsxRuntime.jsx("textarea", { ...rest, ...inputAriaProps, ref: textareaRef, id: inputId, disabled: disabled, readOnly: readOnly, required: required, maxLength: maxLength, value: value, defaultValue: defaultValue, onChange: handleChange, className: classNames(styles$h.input, autoResize ? styles$h.autoResize : undefined, inputClassName, className), style: inputStyle }) }), (activeMessage || showCharCount) && (jsxRuntime.jsxs("div", { className: styles$h.footer, children: [activeMessage ? (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage })) : (jsxRuntime.jsx("span", {})), showCharCount && (jsxRuntime.jsx("span", { className: classNames(styles$h.charCount, isExceeded ? styles$h.charCountExceeded : undefined), children: maxLength !== undefined ? `${charCount}/${maxLength}` : charCount }))] }))] }));
186
+ });
187
+ TextArea.displayName = 'TextArea';
188
+
189
+ var css_248z$g = ".NumberInput-module_wrapper__Cd82l {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.NumberInput-module_fullWidth__CiS2F {\n width: 100%;\n}\n\n.NumberInput-module_label__fyNSO {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.NumberInput-module_required__1ewMt::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.NumberInput-module_inputWrapper__yHfPf {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.NumberInput-module_input__Ss8p7 {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n -moz-appearance: textfield;\n}\n\n.NumberInput-module_input__Ss8p7::-webkit-inner-spin-button,\n.NumberInput-module_input__Ss8p7::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.NumberInput-module_input__Ss8p7::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.NumberInput-module_sm__p2G3q .NumberInput-module_input__Ss8p7 {\n padding: 6px 10px;\n font-size: 0.75rem;\n height: 32px;\n}\n\n.NumberInput-module_md__8J0Mb .NumberInput-module_input__Ss8p7 {\n padding: 8px 12px;\n font-size: 0.875rem;\n height: 40px;\n}\n\n.NumberInput-module_lg__oLOi- .NumberInput-module_input__Ss8p7 {\n padding: 10px 16px;\n font-size: 1rem;\n height: 48px;\n}\n\n.NumberInput-module_hasControls__xlqy8 .NumberInput-module_input__Ss8p7 {\n padding-right: 40px;\n}\n\n.NumberInput-module_outlined__qw--3 .NumberInput-module_input__Ss8p7 {\n border: 1px solid var(--input-border-color);\n}\n\n.NumberInput-module_outlined__qw--3 .NumberInput-module_input__Ss8p7:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.NumberInput-module_outlined__qw--3 .NumberInput-module_input__Ss8p7:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.NumberInput-module_filled__uY4SE .NumberInput-module_input__Ss8p7 {\n border: 1px solid transparent;\n background-color: #f3f4f6;\n}\n\n.NumberInput-module_filled__uY4SE .NumberInput-module_input__Ss8p7:hover:not(:disabled) {\n background-color: #e5e7eb;\n}\n\n.NumberInput-module_filled__uY4SE .NumberInput-module_input__Ss8p7:focus {\n background-color: var(--input-bg-color);\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.NumberInput-module_underlined__zVPeD .NumberInput-module_input__Ss8p7 {\n border: none;\n border-bottom: 2px solid var(--input-border-color);\n border-radius: 0;\n padding-left: 0;\n}\n\n.NumberInput-module_underlined__zVPeD .NumberInput-module_input__Ss8p7:hover:not(:disabled) {\n border-bottom-color: var(--input-primary-color);\n}\n\n.NumberInput-module_underlined__zVPeD .NumberInput-module_input__Ss8p7:focus {\n border-bottom-color: var(--input-primary-color);\n box-shadow: 0 2px 0 0 var(--input-focus-ring-color);\n}\n\n.NumberInput-module_error__-r8V- .NumberInput-module_input__Ss8p7 {\n border-color: var(--input-error-color) !important;\n}\n\n.NumberInput-module_error__-r8V- .NumberInput-module_input__Ss8p7:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;\n}\n\n.NumberInput-module_success__ha9Nv .NumberInput-module_input__Ss8p7 {\n border-color: var(--input-success-color) !important;\n}\n\n.NumberInput-module_success__ha9Nv .NumberInput-module_input__Ss8p7:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important;\n}\n\n.NumberInput-module_warning__6ryvV .NumberInput-module_input__Ss8p7 {\n border-color: var(--input-warning-color) !important;\n}\n\n.NumberInput-module_warning__6ryvV .NumberInput-module_input__Ss8p7:focus {\n box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;\n}\n\n.NumberInput-module_input__Ss8p7:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.NumberInput-module_controls__8UfQ2 {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n border-left: 1px solid var(--input-border-color);\n}\n\n.NumberInput-module_controlBtn__nJrGV {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--input-text-color);\n font-size: 0.625rem;\n padding: 0 6px;\n transition: background-color 0.1s ease;\n line-height: 1;\n}\n\n.NumberInput-module_controlBtn__nJrGV:hover:not(:disabled) {\n background-color: #f3f4f6;\n}\n\n.NumberInput-module_controlBtn__nJrGV:disabled {\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.NumberInput-module_controlBtn__nJrGV + .NumberInput-module_controlBtn__nJrGV {\n border-top: 1px solid var(--input-border-color);\n}\n\n.NumberInput-module_helperText__0tllq {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.NumberInput-module_errorText__FDg9z {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n\n.NumberInput-module_successText__ApMoU {\n font-size: 0.75rem;\n color: var(--input-success-color);\n}\n\n.NumberInput-module_warningText__4Jluc {\n font-size: 0.75rem;\n color: var(--input-warning-color);\n}\n";
190
+ var styles$g = {"wrapper":"NumberInput-module_wrapper__Cd82l","fullWidth":"NumberInput-module_fullWidth__CiS2F","label":"NumberInput-module_label__fyNSO","required":"NumberInput-module_required__1ewMt","inputWrapper":"NumberInput-module_inputWrapper__yHfPf","input":"NumberInput-module_input__Ss8p7","sm":"NumberInput-module_sm__p2G3q","md":"NumberInput-module_md__8J0Mb","lg":"NumberInput-module_lg__oLOi-","hasControls":"NumberInput-module_hasControls__xlqy8","outlined":"NumberInput-module_outlined__qw--3","filled":"NumberInput-module_filled__uY4SE","underlined":"NumberInput-module_underlined__zVPeD","error":"NumberInput-module_error__-r8V-","success":"NumberInput-module_success__ha9Nv","warning":"NumberInput-module_warning__6ryvV","controls":"NumberInput-module_controls__8UfQ2","controlBtn":"NumberInput-module_controlBtn__nJrGV","helperText":"NumberInput-module_helperText__0tllq","errorText":"NumberInput-module_errorText__FDg9z","successText":"NumberInput-module_successText__ApMoU","warningText":"NumberInput-module_warningText__4Jluc"};
191
+ styleInject(css_248z$g);
192
+
193
+ const NumberInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, value, defaultValue, onChange, min, max, step = 1, hideControls, placeholder, ...rest }, ref) => {
194
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
195
+ id,
196
+ helperText,
197
+ errorMessage,
198
+ validationState,
199
+ required,
200
+ disabled,
201
+ });
202
+ const [currentValue, setCurrentValue] = useControllable({
203
+ value,
204
+ defaultValue,
205
+ onChange,
206
+ });
207
+ const clamp = React.useCallback((n) => {
208
+ let clamped = n;
209
+ if (min !== undefined)
210
+ clamped = Math.max(min, clamped);
211
+ if (max !== undefined)
212
+ clamped = Math.min(max, clamped);
213
+ return clamped;
214
+ }, [min, max]);
215
+ const handleIncrement = React.useCallback(() => {
216
+ const next = clamp((currentValue !== null && currentValue !== void 0 ? currentValue : 0) + (step !== null && step !== void 0 ? step : 1));
217
+ setCurrentValue(next);
218
+ }, [currentValue, step, clamp, setCurrentValue]);
219
+ const handleDecrement = React.useCallback(() => {
220
+ const next = clamp((currentValue !== null && currentValue !== void 0 ? currentValue : 0) - (step !== null && step !== void 0 ? step : 1));
221
+ setCurrentValue(next);
222
+ }, [currentValue, step, clamp, setCurrentValue]);
223
+ const handleChange = React.useCallback((e) => {
224
+ const raw = e.target.value;
225
+ if (raw === '' || raw === '-') {
226
+ setCurrentValue(undefined);
227
+ return;
228
+ }
229
+ const parsed = parseFloat(raw);
230
+ if (!isNaN(parsed)) {
231
+ setCurrentValue(parsed);
232
+ }
233
+ }, [setCurrentValue]);
234
+ const activeMessage = validationState === 'error'
235
+ ? errorMessage
236
+ : validationState === 'success'
237
+ ? successMessage
238
+ : validationState === 'warning'
239
+ ? warningMessage
240
+ : helperText;
241
+ const messageClass = validationState === 'error'
242
+ ? styles$g.errorText
243
+ : validationState === 'success'
244
+ ? styles$g.successText
245
+ : validationState === 'warning'
246
+ ? styles$g.warningText
247
+ : styles$g.helperText;
248
+ const showControls = !hideControls && !readOnly;
249
+ const isAtMin = min !== undefined && (currentValue !== null && currentValue !== void 0 ? currentValue : 0) <= min;
250
+ const isAtMax = max !== undefined && (currentValue !== null && currentValue !== void 0 ? currentValue : 0) >= max;
251
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$g.wrapper, styles$g[size], styles$g[variant], validationState !== 'default' ? styles$g[validationState] : undefined, fullWidth ? styles$g.fullWidth : undefined, showControls ? styles$g.hasControls : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$g.label, required ? styles$g.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$g.inputWrapper, children: [jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "number", disabled: disabled, readOnly: readOnly, required: required, min: min, max: max, step: step, placeholder: placeholder, value: currentValue !== undefined ? currentValue : '', onChange: handleChange, className: classNames(styles$g.input, inputClassName, className), style: inputStyle }), showControls && (jsxRuntime.jsxs("div", { className: styles$g.controls, children: [jsxRuntime.jsx("button", { type: "button", className: styles$g.controlBtn, onClick: handleIncrement, disabled: disabled || isAtMax, "aria-label": "Increment", tabIndex: -1, children: "\u25B2" }), jsxRuntime.jsx("button", { type: "button", className: styles$g.controlBtn, onClick: handleDecrement, disabled: disabled || isAtMin, "aria-label": "Decrement", tabIndex: -1, children: "\u25BC" })] }))] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
252
+ });
253
+ NumberInput.displayName = 'NumberInput';
254
+
255
+ var css_248z$f = ".PasswordInput-module_wrapper__zEU-L {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.PasswordInput-module_fullWidth__DWkhh {\n width: 100%;\n}\n\n.PasswordInput-module_label__ps3gD {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.PasswordInput-module_required__pGrok::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.PasswordInput-module_inputWrapper__iBTIJ {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.PasswordInput-module_input__FWEvb {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n padding-right: 40px;\n}\n\n.PasswordInput-module_input__FWEvb::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.PasswordInput-module_sm__3-CZz .PasswordInput-module_input__FWEvb {\n padding: 6px 40px 6px 10px;\n font-size: 0.75rem;\n height: 32px;\n}\n\n.PasswordInput-module_md__ReV0O .PasswordInput-module_input__FWEvb {\n padding: 8px 40px 8px 12px;\n font-size: 0.875rem;\n height: 40px;\n}\n\n.PasswordInput-module_lg__DiTiB .PasswordInput-module_input__FWEvb {\n padding: 10px 40px 10px 16px;\n font-size: 1rem;\n height: 48px;\n}\n\n.PasswordInput-module_outlined__rHezs .PasswordInput-module_input__FWEvb {\n border: 1px solid var(--input-border-color);\n}\n\n.PasswordInput-module_outlined__rHezs .PasswordInput-module_input__FWEvb:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.PasswordInput-module_outlined__rHezs .PasswordInput-module_input__FWEvb:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.PasswordInput-module_filled__8FYu5 .PasswordInput-module_input__FWEvb {\n border: 1px solid transparent;\n background-color: #f3f4f6;\n}\n\n.PasswordInput-module_filled__8FYu5 .PasswordInput-module_input__FWEvb:hover:not(:disabled) {\n background-color: #e5e7eb;\n}\n\n.PasswordInput-module_filled__8FYu5 .PasswordInput-module_input__FWEvb:focus {\n background-color: var(--input-bg-color);\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.PasswordInput-module_underlined__TyF25 .PasswordInput-module_input__FWEvb {\n border: none;\n border-bottom: 2px solid var(--input-border-color);\n border-radius: 0;\n padding-left: 0;\n}\n\n.PasswordInput-module_underlined__TyF25 .PasswordInput-module_input__FWEvb:hover:not(:disabled) {\n border-bottom-color: var(--input-primary-color);\n}\n\n.PasswordInput-module_underlined__TyF25 .PasswordInput-module_input__FWEvb:focus {\n border-bottom-color: var(--input-primary-color);\n box-shadow: 0 2px 0 0 var(--input-focus-ring-color);\n}\n\n.PasswordInput-module_error__QdIFf .PasswordInput-module_input__FWEvb {\n border-color: var(--input-error-color) !important;\n}\n\n.PasswordInput-module_error__QdIFf .PasswordInput-module_input__FWEvb:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;\n}\n\n.PasswordInput-module_success__gIUkQ .PasswordInput-module_input__FWEvb {\n border-color: var(--input-success-color) !important;\n}\n\n.PasswordInput-module_success__gIUkQ .PasswordInput-module_input__FWEvb:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important;\n}\n\n.PasswordInput-module_warning__pPuhN .PasswordInput-module_input__FWEvb {\n border-color: var(--input-warning-color) !important;\n}\n\n.PasswordInput-module_warning__pPuhN .PasswordInput-module_input__FWEvb:focus {\n box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;\n}\n\n.PasswordInput-module_input__FWEvb:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.PasswordInput-module_toggleBtn__2egfq {\n position: absolute;\n right: 10px;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--input-placeholder-color);\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color 0.15s ease;\n}\n\n.PasswordInput-module_toggleBtn__2egfq:hover {\n color: var(--input-text-color);\n}\n\n.PasswordInput-module_toggleBtn__2egfq:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.PasswordInput-module_strengthBar__PAPHR {\n display: flex;\n gap: 4px;\n margin-top: 4px;\n}\n\n.PasswordInput-module_strengthSegment__EznE5 {\n flex: 1;\n height: 4px;\n border-radius: 2px;\n background-color: #e5e7eb;\n transition: background-color 0.3s ease;\n}\n\n.PasswordInput-module_strength0__AVibk .PasswordInput-module_strengthSegment__EznE5 {\n background-color: #e5e7eb;\n}\n\n.PasswordInput-module_strength1__E2iS6 .PasswordInput-module_strengthSegment__EznE5:nth-child(1) {\n background-color: var(--input-error-color);\n}\n\n.PasswordInput-module_strength2__GWibw .PasswordInput-module_strengthSegment__EznE5:nth-child(-n+2) {\n background-color: var(--input-warning-color);\n}\n\n.PasswordInput-module_strength3__DvKqs .PasswordInput-module_strengthSegment__EznE5:nth-child(-n+3) {\n background-color: #3b82f6;\n}\n\n.PasswordInput-module_strength4__XPt5W .PasswordInput-module_strengthSegment__EznE5 {\n background-color: var(--input-success-color);\n}\n\n.PasswordInput-module_strengthLabel__u9QHS {\n font-size: 0.75rem;\n color: #6b7280;\n margin-top: 2px;\n}\n\n.PasswordInput-module_helperText__MXkZe {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.PasswordInput-module_errorText__73Uvv {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n\n.PasswordInput-module_successText__1-NXP {\n font-size: 0.75rem;\n color: var(--input-success-color);\n}\n\n.PasswordInput-module_warningText__vIY-N {\n font-size: 0.75rem;\n color: var(--input-warning-color);\n}\n";
256
+ var styles$f = {"wrapper":"PasswordInput-module_wrapper__zEU-L","fullWidth":"PasswordInput-module_fullWidth__DWkhh","label":"PasswordInput-module_label__ps3gD","required":"PasswordInput-module_required__pGrok","inputWrapper":"PasswordInput-module_inputWrapper__iBTIJ","input":"PasswordInput-module_input__FWEvb","sm":"PasswordInput-module_sm__3-CZz","md":"PasswordInput-module_md__ReV0O","lg":"PasswordInput-module_lg__DiTiB","outlined":"PasswordInput-module_outlined__rHezs","filled":"PasswordInput-module_filled__8FYu5","underlined":"PasswordInput-module_underlined__TyF25","error":"PasswordInput-module_error__QdIFf","success":"PasswordInput-module_success__gIUkQ","warning":"PasswordInput-module_warning__pPuhN","toggleBtn":"PasswordInput-module_toggleBtn__2egfq","strengthBar":"PasswordInput-module_strengthBar__PAPHR","strengthSegment":"PasswordInput-module_strengthSegment__EznE5","strength0":"PasswordInput-module_strength0__AVibk","strength1":"PasswordInput-module_strength1__E2iS6","strength2":"PasswordInput-module_strength2__GWibw","strength3":"PasswordInput-module_strength3__DvKqs","strength4":"PasswordInput-module_strength4__XPt5W","strengthLabel":"PasswordInput-module_strengthLabel__u9QHS","helperText":"PasswordInput-module_helperText__MXkZe","errorText":"PasswordInput-module_errorText__73Uvv","successText":"PasswordInput-module_successText__1-NXP","warningText":"PasswordInput-module_warningText__vIY-N"};
257
+ styleInject(css_248z$f);
258
+
259
+ function getPasswordStrength(password) {
260
+ if (!password)
261
+ return 0;
262
+ let score = 0;
263
+ if (password.length >= 8)
264
+ score++;
265
+ if (/[A-Z]/.test(password))
266
+ score++;
267
+ if (/[0-9]/.test(password))
268
+ score++;
269
+ if (/[^A-Za-z0-9]/.test(password))
270
+ score++;
271
+ return score;
272
+ }
273
+ const STRENGTH_LABELS = ['', 'Weak', 'Fair', 'Good', 'Strong'];
274
+ const PasswordInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, showStrengthIndicator, showIcon, hideIcon, value, defaultValue, onChange, ...rest }, ref) => {
275
+ var _a;
276
+ const [visible, setVisible] = React.useState(false);
277
+ const [internalValue, setInternalValue] = React.useState((_a = defaultValue) !== null && _a !== void 0 ? _a : '');
278
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
279
+ id,
280
+ helperText,
281
+ errorMessage,
282
+ validationState,
283
+ required,
284
+ disabled,
285
+ });
286
+ const currentValue = value !== undefined ? value : internalValue;
287
+ const handleChange = React.useCallback((e) => {
288
+ if (value === undefined) {
289
+ setInternalValue(e.target.value);
290
+ }
291
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
292
+ }, [value, onChange]);
293
+ const strength = showStrengthIndicator ? getPasswordStrength(currentValue) : 0;
294
+ const activeMessage = validationState === 'error'
295
+ ? errorMessage
296
+ : validationState === 'success'
297
+ ? successMessage
298
+ : validationState === 'warning'
299
+ ? warningMessage
300
+ : helperText;
301
+ const messageClass = validationState === 'error'
302
+ ? styles$f.errorText
303
+ : validationState === 'success'
304
+ ? styles$f.successText
305
+ : validationState === 'warning'
306
+ ? styles$f.warningText
307
+ : styles$f.helperText;
308
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$f.wrapper, styles$f[size], styles$f[variant], validationState !== 'default' ? styles$f[validationState] : undefined, fullWidth ? styles$f.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$f.label, required ? styles$f.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$f.inputWrapper, children: [jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: visible ? 'text' : 'password', disabled: disabled, readOnly: readOnly, required: required, value: value !== undefined ? value : internalValue, onChange: handleChange, className: classNames(styles$f.input, inputClassName, className), style: inputStyle }), jsxRuntime.jsx("button", { type: "button", className: styles$f.toggleBtn, onClick: () => setVisible((v) => !v), disabled: disabled, "aria-label": visible ? 'Hide password' : 'Show password', tabIndex: -1, children: visible
309
+ ? (hideIcon !== null && hideIcon !== void 0 ? hideIcon : jsxRuntime.jsx("span", { children: "\uD83D\uDE48" }))
310
+ : (showIcon !== null && showIcon !== void 0 ? showIcon : jsxRuntime.jsx("span", { children: "\uD83D\uDC41" })) })] }), showStrengthIndicator && currentValue.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classNames(styles$f.strengthBar, styles$f[`strength${strength}`]), children: [1, 2, 3, 4].map((i) => (jsxRuntime.jsx("div", { className: styles$f.strengthSegment }, i))) }), jsxRuntime.jsx("span", { className: styles$f.strengthLabel, children: STRENGTH_LABELS[strength] })] })), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
311
+ });
312
+ PasswordInput.displayName = 'PasswordInput';
313
+
314
+ var css_248z$e = ".SelectInput-module_wrapper__2Sa1I {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.SelectInput-module_fullWidth__Uxy2x {\n width: 100%;\n}\n\n.SelectInput-module_label__XSFuZ {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.SelectInput-module_required__yanj5::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.SelectInput-module_inputWrapper__wyLVU {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.SelectInput-module_input__MHG7u {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n padding-right: 36px;\n}\n\n.SelectInput-module_arrow__o6835 {\n position: absolute;\n right: 10px;\n pointer-events: none;\n color: var(--input-placeholder-color);\n display: flex;\n align-items: center;\n}\n\n.SelectInput-module_sm__u-ldy .SelectInput-module_input__MHG7u {\n padding: 6px 36px 6px 10px;\n font-size: 0.75rem;\n height: 32px;\n}\n\n.SelectInput-module_md__j4xAN .SelectInput-module_input__MHG7u {\n padding: 8px 36px 8px 12px;\n font-size: 0.875rem;\n height: 40px;\n}\n\n.SelectInput-module_lg__7cLZ3 .SelectInput-module_input__MHG7u {\n padding: 10px 36px 10px 16px;\n font-size: 1rem;\n height: 48px;\n}\n\n.SelectInput-module_outlined__4iiDL .SelectInput-module_input__MHG7u {\n border: 1px solid var(--input-border-color);\n}\n\n.SelectInput-module_outlined__4iiDL .SelectInput-module_input__MHG7u:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.SelectInput-module_outlined__4iiDL .SelectInput-module_input__MHG7u:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.SelectInput-module_filled__O-v4z .SelectInput-module_input__MHG7u {\n border: 1px solid transparent;\n background-color: #f3f4f6;\n}\n\n.SelectInput-module_filled__O-v4z .SelectInput-module_input__MHG7u:hover:not(:disabled) {\n background-color: #e5e7eb;\n}\n\n.SelectInput-module_filled__O-v4z .SelectInput-module_input__MHG7u:focus {\n background-color: var(--input-bg-color);\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.SelectInput-module_underlined__nhbMF .SelectInput-module_input__MHG7u {\n border: none;\n border-bottom: 2px solid var(--input-border-color);\n border-radius: 0;\n padding-left: 0;\n}\n\n.SelectInput-module_underlined__nhbMF .SelectInput-module_input__MHG7u:hover:not(:disabled) {\n border-bottom-color: var(--input-primary-color);\n}\n\n.SelectInput-module_underlined__nhbMF .SelectInput-module_input__MHG7u:focus {\n border-bottom-color: var(--input-primary-color);\n box-shadow: 0 2px 0 0 var(--input-focus-ring-color);\n}\n\n.SelectInput-module_error__QGP-5 .SelectInput-module_input__MHG7u {\n border-color: var(--input-error-color) !important;\n}\n\n.SelectInput-module_error__QGP-5 .SelectInput-module_input__MHG7u:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;\n}\n\n.SelectInput-module_success__U-U37 .SelectInput-module_input__MHG7u {\n border-color: var(--input-success-color) !important;\n}\n\n.SelectInput-module_success__U-U37 .SelectInput-module_input__MHG7u:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important;\n}\n\n.SelectInput-module_warning__coH4N .SelectInput-module_input__MHG7u {\n border-color: var(--input-warning-color) !important;\n}\n\n.SelectInput-module_warning__coH4N .SelectInput-module_input__MHG7u:focus {\n box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;\n}\n\n.SelectInput-module_input__MHG7u:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.SelectInput-module_placeholderOption__33EfK {\n color: var(--input-placeholder-color);\n}\n\n.SelectInput-module_helperText__SN7ny {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.SelectInput-module_errorText__RTSlz {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n\n.SelectInput-module_successText__SlHSc {\n font-size: 0.75rem;\n color: var(--input-success-color);\n}\n\n.SelectInput-module_warningText__5RI8k {\n font-size: 0.75rem;\n color: var(--input-warning-color);\n}\n";
315
+ var styles$e = {"wrapper":"SelectInput-module_wrapper__2Sa1I","fullWidth":"SelectInput-module_fullWidth__Uxy2x","label":"SelectInput-module_label__XSFuZ","required":"SelectInput-module_required__yanj5","inputWrapper":"SelectInput-module_inputWrapper__wyLVU","input":"SelectInput-module_input__MHG7u","arrow":"SelectInput-module_arrow__o6835","sm":"SelectInput-module_sm__u-ldy","md":"SelectInput-module_md__j4xAN","lg":"SelectInput-module_lg__7cLZ3","outlined":"SelectInput-module_outlined__4iiDL","filled":"SelectInput-module_filled__O-v4z","underlined":"SelectInput-module_underlined__nhbMF","error":"SelectInput-module_error__QGP-5","success":"SelectInput-module_success__U-U37","warning":"SelectInput-module_warning__coH4N","placeholderOption":"SelectInput-module_placeholderOption__33EfK","helperText":"SelectInput-module_helperText__SN7ny","errorText":"SelectInput-module_errorText__RTSlz","successText":"SelectInput-module_successText__SlHSc","warningText":"SelectInput-module_warningText__5RI8k"};
316
+ styleInject(css_248z$e);
317
+
318
+ const SelectInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly: _readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, options, placeholder, ...rest }, ref) => {
319
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
320
+ id,
321
+ helperText,
322
+ errorMessage,
323
+ validationState,
324
+ required,
325
+ disabled,
326
+ });
327
+ const activeMessage = validationState === 'error'
328
+ ? errorMessage
329
+ : validationState === 'success'
330
+ ? successMessage
331
+ : validationState === 'warning'
332
+ ? warningMessage
333
+ : helperText;
334
+ const messageClass = validationState === 'error'
335
+ ? styles$e.errorText
336
+ : validationState === 'success'
337
+ ? styles$e.successText
338
+ : validationState === 'warning'
339
+ ? styles$e.warningText
340
+ : styles$e.helperText;
341
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$e.wrapper, styles$e[size], styles$e[variant], validationState !== 'default' ? styles$e[validationState] : undefined, fullWidth ? styles$e.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$e.label, required ? styles$e.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$e.inputWrapper, children: [jsxRuntime.jsxs("select", { ...rest, ...inputAriaProps, ref: ref, id: inputId, disabled: disabled, required: required, className: classNames(styles$e.input, inputClassName, className), style: inputStyle, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, className: styles$e.placeholderOption, children: placeholder })), options.map((opt) => (jsxRuntime.jsx("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value)))] }), jsxRuntime.jsx("span", { className: styles$e.arrow, children: "\u25BE" })] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
342
+ });
343
+ SelectInput.displayName = 'SelectInput';
344
+
345
+ var css_248z$d = ".Checkbox-module_wrapper__rpthW {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-border-radius: 4px;\n --input-font-family: inherit;\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.Checkbox-module_checkboxRow__CtGUR {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n cursor: pointer;\n}\n\n.Checkbox-module_checkboxRow__CtGUR.Checkbox-module_disabled__x7-eg {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.Checkbox-module_input__2kt-h {\n position: relative;\n appearance: none;\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n min-width: 16px;\n min-height: 16px;\n border: 2px solid var(--input-border-color);\n border-radius: var(--input-border-radius);\n background-color: var(--input-bg-color);\n cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n outline: none;\n flex-shrink: 0;\n margin: 0;\n}\n\n.Checkbox-module_sm__2pjJ9 .Checkbox-module_input__2kt-h {\n width: 14px;\n height: 14px;\n min-width: 14px;\n min-height: 14px;\n}\n\n.Checkbox-module_lg__lIue0 .Checkbox-module_input__2kt-h {\n width: 20px;\n height: 20px;\n min-width: 20px;\n min-height: 20px;\n}\n\n.Checkbox-module_input__2kt-h:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.Checkbox-module_input__2kt-h:focus-visible {\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);\n}\n\n.Checkbox-module_input__2kt-h:checked {\n background-color: var(--input-primary-color);\n border-color: var(--input-primary-color);\n}\n\n.Checkbox-module_input__2kt-h:checked::after {\n content: '';\n position: absolute;\n left: 3px;\n top: 0px;\n width: 5px;\n height: 9px;\n border: 2px solid #fff;\n border-top: none;\n border-left: none;\n transform: rotate(45deg);\n}\n\n.Checkbox-module_sm__2pjJ9 .Checkbox-module_input__2kt-h:checked::after {\n left: 2px;\n top: 0px;\n width: 4px;\n height: 7px;\n}\n\n.Checkbox-module_lg__lIue0 .Checkbox-module_input__2kt-h:checked::after {\n left: 4px;\n top: 1px;\n width: 7px;\n height: 11px;\n}\n\n.Checkbox-module_input__2kt-h:indeterminate {\n background-color: var(--input-primary-color);\n border-color: var(--input-primary-color);\n}\n\n.Checkbox-module_input__2kt-h:indeterminate::after {\n content: '';\n position: absolute;\n left: 2px;\n top: 5px;\n width: 8px;\n height: 2px;\n background-color: #fff;\n}\n\n.Checkbox-module_input__2kt-h:disabled {\n background-color: var(--input-disabled-bg);\n border-color: #d1d5db;\n cursor: not-allowed;\n}\n\n.Checkbox-module_error__E-bmD .Checkbox-module_input__2kt-h {\n border-color: var(--input-error-color);\n}\n\n.Checkbox-module_label__cwRtI {\n font-size: 0.875rem;\n color: var(--input-text-color);\n line-height: 1.4;\n}\n\n.Checkbox-module_sm__2pjJ9 .Checkbox-module_label__cwRtI {\n font-size: 0.75rem;\n}\n\n.Checkbox-module_lg__lIue0 .Checkbox-module_label__cwRtI {\n font-size: 1rem;\n}\n\n.Checkbox-module_required__t9DLN::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.Checkbox-module_helperText__-2pe1 {\n font-size: 0.75rem;\n color: #6b7280;\n margin-left: 24px;\n}\n\n.Checkbox-module_errorText__ARqRg {\n font-size: 0.75rem;\n color: var(--input-error-color);\n margin-left: 24px;\n}\n";
346
+ var styles$d = {"wrapper":"Checkbox-module_wrapper__rpthW","checkboxRow":"Checkbox-module_checkboxRow__CtGUR","disabled":"Checkbox-module_disabled__x7-eg","input":"Checkbox-module_input__2kt-h","sm":"Checkbox-module_sm__2pjJ9","lg":"Checkbox-module_lg__lIue0","error":"Checkbox-module_error__E-bmD","label":"Checkbox-module_label__cwRtI","required":"Checkbox-module_required__t9DLN","helperText":"Checkbox-module_helperText__-2pe1","errorText":"Checkbox-module_errorText__ARqRg"};
347
+ styleInject(css_248z$d);
348
+
349
+ const Checkbox = React.forwardRef(({ size = 'md', validationState = 'default', label, helperText, errorMessage, required, disabled, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, indeterminate, className, ...rest }, ref) => {
350
+ var _a;
351
+ const internalRef = React.useRef(null);
352
+ const checkboxRef = (_a = ref) !== null && _a !== void 0 ? _a : internalRef;
353
+ const { inputId, helperId, inputAriaProps } = useFormField({
354
+ id,
355
+ helperText,
356
+ errorMessage,
357
+ validationState,
358
+ required,
359
+ disabled,
360
+ });
361
+ React.useEffect(() => {
362
+ if (checkboxRef.current) {
363
+ checkboxRef.current.indeterminate = indeterminate !== null && indeterminate !== void 0 ? indeterminate : false;
364
+ }
365
+ }, [indeterminate, checkboxRef]);
366
+ const activeMessage = validationState === 'error' ? errorMessage : helperText;
367
+ const messageClass = validationState === 'error' ? styles$d.errorText : styles$d.helperText;
368
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$d.wrapper, styles$d[size], validationState === 'error' ? styles$d.error : undefined, wrapperClassName), style: wrapperStyle, children: [jsxRuntime.jsxs("label", { className: classNames(styles$d.checkboxRow, disabled ? styles$d.disabled : undefined), style: labelStyle, children: [jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: checkboxRef, id: inputId, type: "checkbox", disabled: disabled, required: required, className: classNames(styles$d.input, inputClassName, className), style: inputStyle }), label && (jsxRuntime.jsx("span", { className: classNames(styles$d.label, required ? styles$d.required : undefined, labelClassName), children: label }))] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
369
+ });
370
+ Checkbox.displayName = 'Checkbox';
371
+
372
+ var css_248z$c = ".CheckboxGroup-module_wrapper__44TEs {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-border-color: #d1d5db;\n --input-text-color: #111827;\n --input-font-family: inherit;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 8px;\n font-family: var(--input-font-family);\n}\n\n.CheckboxGroup-module_fullWidth__MO8rU {\n width: 100%;\n}\n\n.CheckboxGroup-module_groupLabel__8IcWE {\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--input-text-color);\n}\n\n.CheckboxGroup-module_required__1epKt::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.CheckboxGroup-module_optionsWrapper__JQHgx {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.CheckboxGroup-module_horizontal__myCqF {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n}\n\n.CheckboxGroup-module_helperText__p2M3v {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.CheckboxGroup-module_errorText__sDVQ7 {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n";
373
+ var styles$c = {"wrapper":"CheckboxGroup-module_wrapper__44TEs","groupLabel":"CheckboxGroup-module_groupLabel__8IcWE","required":"CheckboxGroup-module_required__1epKt","optionsWrapper":"CheckboxGroup-module_optionsWrapper__JQHgx","horizontal":"CheckboxGroup-module_horizontal__myCqF","helperText":"CheckboxGroup-module_helperText__p2M3v","errorText":"CheckboxGroup-module_errorText__sDVQ7"};
374
+ styleInject(css_248z$c);
375
+
376
+ const CheckboxGroup = React.forwardRef(({ size = 'md', validationState = 'default', label, helperText, errorMessage, required, disabled, wrapperClassName, wrapperStyle, labelClassName, labelStyle, helperTextClassName, helperTextStyle, id, options, value, defaultValue, onChange, direction = 'vertical', }, ref) => {
377
+ const generatedId = React.useId();
378
+ const groupId = id !== null && id !== void 0 ? id : `checkbox-group-${generatedId}`;
379
+ const helperId = `${groupId}-helper`;
380
+ const [selectedValues, setSelectedValues] = useControllable({
381
+ value,
382
+ defaultValue: defaultValue !== null && defaultValue !== void 0 ? defaultValue : [],
383
+ onChange,
384
+ });
385
+ const handleChange = (optionValue, checked) => {
386
+ const current = selectedValues !== null && selectedValues !== void 0 ? selectedValues : [];
387
+ const next = checked
388
+ ? [...current, optionValue]
389
+ : current.filter((v) => v !== optionValue);
390
+ setSelectedValues(next);
391
+ };
392
+ const activeMessage = validationState === 'error' ? errorMessage : helperText;
393
+ const messageClass = validationState === 'error' ? styles$c.errorText : styles$c.helperText;
394
+ return (jsxRuntime.jsxs("div", { ref: ref, role: "group", "aria-labelledby": label ? `${groupId}-label` : undefined, "aria-describedby": activeMessage ? helperId : undefined, className: classNames(styles$c.wrapper, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("span", { id: `${groupId}-label`, className: classNames(styles$c.groupLabel, required ? styles$c.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("div", { className: classNames(styles$c.optionsWrapper, direction === 'horizontal' ? styles$c.horizontal : undefined), children: options.map((opt) => (jsxRuntime.jsx(Checkbox, { id: `${groupId}-${opt.value}`, label: opt.label, size: size, disabled: disabled || opt.disabled, checked: (selectedValues !== null && selectedValues !== void 0 ? selectedValues : []).includes(opt.value), onChange: (e) => handleChange(opt.value, e.target.checked), validationState: validationState }, opt.value))) }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
395
+ });
396
+ CheckboxGroup.displayName = 'CheckboxGroup';
397
+
398
+ var css_248z$b = ".RadioGroup-module_wrapper__fzRcA {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-text-color: #111827;\n --input-border-color: #d1d5db;\n --input-font-family: inherit;\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 8px;\n font-family: var(--input-font-family);\n}\n\n.RadioGroup-module_groupLabel__xqi-9 {\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--input-text-color);\n}\n\n.RadioGroup-module_required__9kFI3::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.RadioGroup-module_optionsWrapper__iWJHD {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.RadioGroup-module_horizontal__vsHUV {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n}\n\n.RadioGroup-module_radioRow__kIJs1 {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n}\n\n.RadioGroup-module_radioRow__kIJs1.RadioGroup-module_disabled__tibJb {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.RadioGroup-module_input__qkBm0 {\n position: relative;\n appearance: none;\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n min-width: 16px;\n border: 2px solid var(--input-border-color);\n border-radius: 50%;\n background-color: #ffffff;\n cursor: pointer;\n transition: border-color 0.15s ease;\n outline: none;\n flex-shrink: 0;\n margin: 0;\n}\n\n.RadioGroup-module_sm__VOJtL .RadioGroup-module_input__qkBm0 {\n width: 14px;\n height: 14px;\n min-width: 14px;\n}\n\n.RadioGroup-module_lg__phnZ9 .RadioGroup-module_input__qkBm0 {\n width: 20px;\n height: 20px;\n min-width: 20px;\n}\n\n.RadioGroup-module_input__qkBm0:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.RadioGroup-module_input__qkBm0:focus-visible {\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);\n}\n\n.RadioGroup-module_input__qkBm0:checked {\n border-color: var(--input-primary-color);\n}\n\n.RadioGroup-module_input__qkBm0:checked::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background-color: var(--input-primary-color);\n}\n\n.RadioGroup-module_sm__VOJtL .RadioGroup-module_input__qkBm0:checked::after {\n width: 6px;\n height: 6px;\n}\n\n.RadioGroup-module_lg__phnZ9 .RadioGroup-module_input__qkBm0:checked::after {\n width: 10px;\n height: 10px;\n}\n\n.RadioGroup-module_input__qkBm0:disabled {\n background-color: var(--input-disabled-bg);\n border-color: #d1d5db;\n cursor: not-allowed;\n}\n\n.RadioGroup-module_error__lrqsC .RadioGroup-module_input__qkBm0 {\n border-color: var(--input-error-color);\n}\n\n.RadioGroup-module_radioLabel__ceNBE {\n font-size: 0.875rem;\n color: var(--input-text-color);\n line-height: 1.4;\n}\n\n.RadioGroup-module_sm__VOJtL .RadioGroup-module_radioLabel__ceNBE {\n font-size: 0.75rem;\n}\n\n.RadioGroup-module_lg__phnZ9 .RadioGroup-module_radioLabel__ceNBE {\n font-size: 1rem;\n}\n\n.RadioGroup-module_helperText__BAR5x {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.RadioGroup-module_errorText__n15-1 {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n";
399
+ var styles$b = {"wrapper":"RadioGroup-module_wrapper__fzRcA","groupLabel":"RadioGroup-module_groupLabel__xqi-9","required":"RadioGroup-module_required__9kFI3","optionsWrapper":"RadioGroup-module_optionsWrapper__iWJHD","horizontal":"RadioGroup-module_horizontal__vsHUV","radioRow":"RadioGroup-module_radioRow__kIJs1","disabled":"RadioGroup-module_disabled__tibJb","input":"RadioGroup-module_input__qkBm0","sm":"RadioGroup-module_sm__VOJtL","lg":"RadioGroup-module_lg__phnZ9","error":"RadioGroup-module_error__lrqsC","radioLabel":"RadioGroup-module_radioLabel__ceNBE","helperText":"RadioGroup-module_helperText__BAR5x","errorText":"RadioGroup-module_errorText__n15-1"};
400
+ styleInject(css_248z$b);
401
+
402
+ const RadioGroup = React.forwardRef(({ size = 'md', validationState = 'default', label, helperText, errorMessage, required, disabled, wrapperClassName, wrapperStyle, labelClassName, labelStyle, helperTextClassName, helperTextStyle, id, name, options, value, defaultValue, onChange, direction = 'vertical', }, ref) => {
403
+ const generatedId = React.useId();
404
+ const groupId = id !== null && id !== void 0 ? id : `radio-group-${generatedId}`;
405
+ const helperId = `${groupId}-helper`;
406
+ const [selectedValue, setSelectedValue] = useControllable({
407
+ value,
408
+ defaultValue,
409
+ onChange: onChange,
410
+ });
411
+ const handleChange = (optionValue) => {
412
+ setSelectedValue(optionValue);
413
+ onChange === null || onChange === void 0 ? void 0 : onChange(optionValue);
414
+ };
415
+ const activeMessage = validationState === 'error' ? errorMessage : helperText;
416
+ const messageClass = validationState === 'error' ? styles$b.errorText : styles$b.helperText;
417
+ return (jsxRuntime.jsxs("div", { ref: ref, role: "radiogroup", "aria-labelledby": label ? `${groupId}-label` : undefined, "aria-describedby": activeMessage ? helperId : undefined, "aria-required": required, className: classNames(styles$b.wrapper, styles$b[size], validationState === 'error' ? styles$b.error : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("span", { id: `${groupId}-label`, className: classNames(styles$b.groupLabel, required ? styles$b.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("div", { className: classNames(styles$b.optionsWrapper, direction === 'horizontal' ? styles$b.horizontal : undefined), children: options.map((opt) => {
418
+ const optId = `${groupId}-${opt.value}`;
419
+ const isDisabled = disabled || opt.disabled;
420
+ return (jsxRuntime.jsxs("label", { htmlFor: optId, className: classNames(styles$b.radioRow, isDisabled ? styles$b.disabled : undefined), children: [jsxRuntime.jsx("input", { id: optId, type: "radio", name: name, value: opt.value, disabled: isDisabled, checked: selectedValue === opt.value, onChange: () => handleChange(opt.value), className: styles$b.input }), jsxRuntime.jsx("span", { className: styles$b.radioLabel, children: opt.label })] }, opt.value));
421
+ }) }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
422
+ });
423
+ RadioGroup.displayName = 'RadioGroup';
424
+
425
+ var css_248z$a = ".Toggle-module_wrapper__BDsrR {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-text-color: #111827;\n --input-border-color: #d1d5db;\n --input-font-family: inherit;\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.Toggle-module_toggleRow__hjzZK {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n user-select: none;\n}\n\n.Toggle-module_toggleRow__hjzZK.Toggle-module_disabled__zqNfH {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.Toggle-module_labelLeft__kifkm {\n flex-direction: row-reverse;\n}\n\n/* Hidden native input */\n.Toggle-module_nativeInput__lSrsx {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n/* The visible track */\n.Toggle-module_track__mMcgG {\n position: relative;\n display: inline-block;\n border-radius: 9999px;\n transition: background-color 0.2s ease;\n flex-shrink: 0;\n background-color: #d1d5db;\n}\n\n.Toggle-module_sm__JTqaB .Toggle-module_track__mMcgG {\n width: 32px;\n height: 18px;\n}\n\n.Toggle-module_md__QfS4K .Toggle-module_track__mMcgG {\n width: 40px;\n height: 22px;\n}\n\n.Toggle-module_lg__ajzsM .Toggle-module_track__mMcgG {\n width: 52px;\n height: 28px;\n}\n\n/* The thumb */\n.Toggle-module_thumb__nibyJ {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n border-radius: 50%;\n background-color: #ffffff;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);\n transition: left 0.2s ease;\n}\n\n.Toggle-module_sm__JTqaB .Toggle-module_thumb__nibyJ {\n width: 14px;\n height: 14px;\n left: 2px;\n}\n\n.Toggle-module_md__QfS4K .Toggle-module_thumb__nibyJ {\n width: 18px;\n height: 18px;\n left: 2px;\n}\n\n.Toggle-module_lg__ajzsM .Toggle-module_thumb__nibyJ {\n width: 22px;\n height: 22px;\n left: 3px;\n}\n\n/* Checked state */\n.Toggle-module_checked__wOt93 .Toggle-module_track__mMcgG {\n background-color: var(--input-primary-color);\n}\n\n.Toggle-module_sm__JTqaB.Toggle-module_checked__wOt93 .Toggle-module_thumb__nibyJ {\n left: calc(32px - 14px - 2px);\n}\n\n.Toggle-module_md__QfS4K.Toggle-module_checked__wOt93 .Toggle-module_thumb__nibyJ {\n left: calc(40px - 18px - 2px);\n}\n\n.Toggle-module_lg__ajzsM.Toggle-module_checked__wOt93 .Toggle-module_thumb__nibyJ {\n left: calc(52px - 22px - 3px);\n}\n\n/* Focus */\n.Toggle-module_nativeInput__lSrsx:focus-visible + .Toggle-module_toggleRow__hjzZK .Toggle-module_track__mMcgG {\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);\n}\n\n/* Error state */\n.Toggle-module_error__9PzE1 .Toggle-module_track__mMcgG {\n outline: 2px solid var(--input-error-color);\n}\n\n.Toggle-module_label__gfTxr {\n font-size: 0.875rem;\n color: var(--input-text-color);\n line-height: 1.4;\n}\n\n.Toggle-module_sm__JTqaB .Toggle-module_label__gfTxr {\n font-size: 0.75rem;\n}\n\n.Toggle-module_lg__ajzsM .Toggle-module_label__gfTxr {\n font-size: 1rem;\n}\n\n.Toggle-module_helperText__YNB8v {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.Toggle-module_errorText__DHrSa {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n";
426
+ var styles$a = {"wrapper":"Toggle-module_wrapper__BDsrR","toggleRow":"Toggle-module_toggleRow__hjzZK","disabled":"Toggle-module_disabled__zqNfH","labelLeft":"Toggle-module_labelLeft__kifkm","nativeInput":"Toggle-module_nativeInput__lSrsx","track":"Toggle-module_track__mMcgG","sm":"Toggle-module_sm__JTqaB","md":"Toggle-module_md__QfS4K","lg":"Toggle-module_lg__ajzsM","thumb":"Toggle-module_thumb__nibyJ","checked":"Toggle-module_checked__wOt93","error":"Toggle-module_error__9PzE1","label":"Toggle-module_label__gfTxr","helperText":"Toggle-module_helperText__YNB8v","errorText":"Toggle-module_errorText__DHrSa"};
427
+ styleInject(css_248z$a);
428
+
429
+ const Toggle = React.forwardRef(({ size = 'md', validationState = 'default', label, helperText, errorMessage, required, disabled, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, checked, defaultChecked, onChange, labelPosition = 'right', ...rest }, ref) => {
430
+ const { inputId, helperId, inputAriaProps } = useFormField({
431
+ id,
432
+ helperText,
433
+ errorMessage,
434
+ validationState,
435
+ required,
436
+ disabled,
437
+ });
438
+ const [internalChecked, setInternalChecked] = React.useState(defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : false);
439
+ const isControlled = checked !== undefined;
440
+ const isChecked = isControlled ? checked : internalChecked;
441
+ const handleChange = React.useCallback((e) => {
442
+ if (!isControlled) {
443
+ setInternalChecked(e.target.checked);
444
+ }
445
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
446
+ }, [isControlled, onChange]);
447
+ const activeMessage = validationState === 'error' ? errorMessage : helperText;
448
+ const messageClass = validationState === 'error' ? styles$a.errorText : styles$a.helperText;
449
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$a.wrapper, styles$a[size], isChecked ? styles$a.checked : undefined, validationState === 'error' ? styles$a.error : undefined, wrapperClassName), style: wrapperStyle, children: [jsxRuntime.jsxs("label", { className: classNames(styles$a.toggleRow, labelPosition === 'left' ? styles$a.labelLeft : undefined, disabled ? styles$a.disabled : undefined), style: labelStyle, children: [jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "checkbox", role: "switch", disabled: disabled, required: required, checked: isChecked, onChange: handleChange, className: classNames(styles$a.nativeInput, inputClassName, className), style: inputStyle, "aria-checked": isChecked }), jsxRuntime.jsx("span", { className: styles$a.track, "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: styles$a.thumb }) }), label && (jsxRuntime.jsx("span", { className: classNames(styles$a.label, required ? styles$a.required : undefined, labelClassName), children: label }))] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
450
+ });
451
+ Toggle.displayName = 'Toggle';
452
+
453
+ var css_248z$9 = ".DateInput-module_wrapper__gb-Sc {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.DateInput-module_fullWidth__SKTCn {\n width: 100%;\n}\n\n.DateInput-module_label__tPp1n {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.DateInput-module_required__-XUm4::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.DateInput-module_inputWrapper__1pthk {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.DateInput-module_input__YJOxe {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n}\n\n.DateInput-module_sm__o3ZGy .DateInput-module_input__YJOxe {\n padding: 6px 10px;\n font-size: 0.75rem;\n height: 32px;\n}\n\n.DateInput-module_md__WL3so .DateInput-module_input__YJOxe {\n padding: 8px 12px;\n font-size: 0.875rem;\n height: 40px;\n}\n\n.DateInput-module_lg__0SNFP .DateInput-module_input__YJOxe {\n padding: 10px 16px;\n font-size: 1rem;\n height: 48px;\n}\n\n.DateInput-module_outlined__lRSD0 .DateInput-module_input__YJOxe {\n border: 1px solid var(--input-border-color);\n}\n\n.DateInput-module_outlined__lRSD0 .DateInput-module_input__YJOxe:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.DateInput-module_outlined__lRSD0 .DateInput-module_input__YJOxe:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.DateInput-module_filled__tr8HZ .DateInput-module_input__YJOxe {\n border: 1px solid transparent;\n background-color: #f3f4f6;\n}\n\n.DateInput-module_filled__tr8HZ .DateInput-module_input__YJOxe:hover:not(:disabled) {\n background-color: #e5e7eb;\n}\n\n.DateInput-module_filled__tr8HZ .DateInput-module_input__YJOxe:focus {\n background-color: var(--input-bg-color);\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.DateInput-module_underlined__043p4 .DateInput-module_input__YJOxe {\n border: none;\n border-bottom: 2px solid var(--input-border-color);\n border-radius: 0;\n padding-left: 0;\n}\n\n.DateInput-module_underlined__043p4 .DateInput-module_input__YJOxe:hover:not(:disabled) {\n border-bottom-color: var(--input-primary-color);\n}\n\n.DateInput-module_underlined__043p4 .DateInput-module_input__YJOxe:focus {\n border-bottom-color: var(--input-primary-color);\n box-shadow: 0 2px 0 0 var(--input-focus-ring-color);\n}\n\n.DateInput-module_error__E7Fsi .DateInput-module_input__YJOxe {\n border-color: var(--input-error-color) !important;\n}\n\n.DateInput-module_error__E7Fsi .DateInput-module_input__YJOxe:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;\n}\n\n.DateInput-module_success__6YfwD .DateInput-module_input__YJOxe {\n border-color: var(--input-success-color) !important;\n}\n\n.DateInput-module_success__6YfwD .DateInput-module_input__YJOxe:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important;\n}\n\n.DateInput-module_warning__-9La5 .DateInput-module_input__YJOxe {\n border-color: var(--input-warning-color) !important;\n}\n\n.DateInput-module_warning__-9La5 .DateInput-module_input__YJOxe:focus {\n box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;\n}\n\n.DateInput-module_input__YJOxe:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.DateInput-module_helperText__ti32b {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.DateInput-module_errorText__HrTwK {\n font-size: 0.75rem;\n color: var(--input-error-color);\n}\n\n.DateInput-module_successText__9d9y2 {\n font-size: 0.75rem;\n color: var(--input-success-color);\n}\n\n.DateInput-module_warningText__Jr92E {\n font-size: 0.75rem;\n color: var(--input-warning-color);\n}\n";
454
+ var styles$9 = {"wrapper":"DateInput-module_wrapper__gb-Sc","fullWidth":"DateInput-module_fullWidth__SKTCn","label":"DateInput-module_label__tPp1n","required":"DateInput-module_required__-XUm4","inputWrapper":"DateInput-module_inputWrapper__1pthk","input":"DateInput-module_input__YJOxe","sm":"DateInput-module_sm__o3ZGy","md":"DateInput-module_md__WL3so","lg":"DateInput-module_lg__0SNFP","outlined":"DateInput-module_outlined__lRSD0","filled":"DateInput-module_filled__tr8HZ","underlined":"DateInput-module_underlined__043p4","error":"DateInput-module_error__E7Fsi","success":"DateInput-module_success__6YfwD","warning":"DateInput-module_warning__-9La5","helperText":"DateInput-module_helperText__ti32b","errorText":"DateInput-module_errorText__HrTwK","successText":"DateInput-module_successText__9d9y2","warningText":"DateInput-module_warningText__Jr92E"};
455
+ styleInject(css_248z$9);
456
+
457
+ const DateInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, min, max, ...rest }, ref) => {
458
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
459
+ id,
460
+ helperText,
461
+ errorMessage,
462
+ validationState,
463
+ required,
464
+ disabled,
465
+ });
466
+ const activeMessage = validationState === 'error'
467
+ ? errorMessage
468
+ : validationState === 'success'
469
+ ? successMessage
470
+ : validationState === 'warning'
471
+ ? warningMessage
472
+ : helperText;
473
+ const messageClass = validationState === 'error'
474
+ ? styles$9.errorText
475
+ : validationState === 'success'
476
+ ? styles$9.successText
477
+ : validationState === 'warning'
478
+ ? styles$9.warningText
479
+ : styles$9.helperText;
480
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$9.wrapper, styles$9[size], styles$9[variant], validationState !== 'default' ? styles$9[validationState] : undefined, fullWidth ? styles$9.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$9.label, required ? styles$9.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("div", { className: styles$9.inputWrapper, children: jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "date", disabled: disabled, readOnly: readOnly, required: required, min: min, max: max, className: classNames(styles$9.input, inputClassName, className), style: inputStyle }) }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
481
+ });
482
+ DateInput.displayName = 'DateInput';
483
+
484
+ var css_248z$8 = ".TimeInput-module_wrapper__MCOm5 {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.TimeInput-module_fullWidth__lpC7A { width: 100%; }\n\n.TimeInput-module_label__sAZQ3 {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.TimeInput-module_required__DCIFs::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.TimeInput-module_inputWrapper__ZJCl4 {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.TimeInput-module_input__SCl1Y {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n}\n\n.TimeInput-module_sm__WI89h .TimeInput-module_input__SCl1Y { padding: 6px 10px; font-size: 0.75rem; height: 32px; }\n.TimeInput-module_md__OHCbV .TimeInput-module_input__SCl1Y { padding: 8px 12px; font-size: 0.875rem; height: 40px; }\n.TimeInput-module_lg__049J0 .TimeInput-module_input__SCl1Y { padding: 10px 16px; font-size: 1rem; height: 48px; }\n\n.TimeInput-module_outlined__Lgmjn .TimeInput-module_input__SCl1Y { border: 1px solid var(--input-border-color); }\n.TimeInput-module_outlined__Lgmjn .TimeInput-module_input__SCl1Y:hover:not(:disabled) { border-color: var(--input-primary-color); }\n.TimeInput-module_outlined__Lgmjn .TimeInput-module_input__SCl1Y:focus { border-color: var(--input-primary-color); box-shadow: 0 0 0 3px var(--input-focus-ring-color); }\n\n.TimeInput-module_filled__bidEU .TimeInput-module_input__SCl1Y { border: 1px solid transparent; background-color: #f3f4f6; }\n.TimeInput-module_filled__bidEU .TimeInput-module_input__SCl1Y:hover:not(:disabled) { background-color: #e5e7eb; }\n.TimeInput-module_filled__bidEU .TimeInput-module_input__SCl1Y:focus { background-color: var(--input-bg-color); border-color: var(--input-primary-color); box-shadow: 0 0 0 3px var(--input-focus-ring-color); }\n\n.TimeInput-module_underlined__lk2qU .TimeInput-module_input__SCl1Y { border: none; border-bottom: 2px solid var(--input-border-color); border-radius: 0; padding-left: 0; }\n.TimeInput-module_underlined__lk2qU .TimeInput-module_input__SCl1Y:hover:not(:disabled) { border-bottom-color: var(--input-primary-color); }\n.TimeInput-module_underlined__lk2qU .TimeInput-module_input__SCl1Y:focus { border-bottom-color: var(--input-primary-color); box-shadow: 0 2px 0 0 var(--input-focus-ring-color); }\n\n.TimeInput-module_error__m9Y23 .TimeInput-module_input__SCl1Y { border-color: var(--input-error-color) !important; }\n.TimeInput-module_error__m9Y23 .TimeInput-module_input__SCl1Y:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important; }\n.TimeInput-module_success__Wq--r .TimeInput-module_input__SCl1Y { border-color: var(--input-success-color) !important; }\n.TimeInput-module_success__Wq--r .TimeInput-module_input__SCl1Y:focus { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3) !important; }\n.TimeInput-module_warning__cwJ1N .TimeInput-module_input__SCl1Y { border-color: var(--input-warning-color) !important; }\n.TimeInput-module_warning__cwJ1N .TimeInput-module_input__SCl1Y:focus { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important; }\n\n.TimeInput-module_input__SCl1Y:disabled { background-color: var(--input-disabled-bg); color: var(--input-disabled-text); cursor: not-allowed; }\n\n.TimeInput-module_helperText__3oL9r { font-size: 0.75rem; color: #6b7280; }\n.TimeInput-module_errorText__pPqKU { font-size: 0.75rem; color: var(--input-error-color); }\n.TimeInput-module_successText__e1oON { font-size: 0.75rem; color: var(--input-success-color); }\n.TimeInput-module_warningText__rKU22 { font-size: 0.75rem; color: var(--input-warning-color); }\n";
485
+ var styles$8 = {"wrapper":"TimeInput-module_wrapper__MCOm5","fullWidth":"TimeInput-module_fullWidth__lpC7A","label":"TimeInput-module_label__sAZQ3","required":"TimeInput-module_required__DCIFs","inputWrapper":"TimeInput-module_inputWrapper__ZJCl4","input":"TimeInput-module_input__SCl1Y","sm":"TimeInput-module_sm__WI89h","md":"TimeInput-module_md__OHCbV","lg":"TimeInput-module_lg__049J0","outlined":"TimeInput-module_outlined__Lgmjn","filled":"TimeInput-module_filled__bidEU","underlined":"TimeInput-module_underlined__lk2qU","error":"TimeInput-module_error__m9Y23","success":"TimeInput-module_success__Wq--r","warning":"TimeInput-module_warning__cwJ1N","helperText":"TimeInput-module_helperText__3oL9r","errorText":"TimeInput-module_errorText__pPqKU","successText":"TimeInput-module_successText__e1oON","warningText":"TimeInput-module_warningText__rKU22"};
486
+ styleInject(css_248z$8);
487
+
488
+ const TimeInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, min, max, ...rest }, ref) => {
489
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
490
+ id,
491
+ helperText,
492
+ errorMessage,
493
+ validationState,
494
+ required,
495
+ disabled,
496
+ });
497
+ const activeMessage = validationState === 'error'
498
+ ? errorMessage
499
+ : validationState === 'success'
500
+ ? successMessage
501
+ : validationState === 'warning'
502
+ ? warningMessage
503
+ : helperText;
504
+ const messageClass = validationState === 'error'
505
+ ? styles$8.errorText
506
+ : validationState === 'success'
507
+ ? styles$8.successText
508
+ : validationState === 'warning'
509
+ ? styles$8.warningText
510
+ : styles$8.helperText;
511
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$8.wrapper, styles$8[size], styles$8[variant], validationState !== 'default' ? styles$8[validationState] : undefined, fullWidth ? styles$8.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$8.label, required ? styles$8.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("div", { className: styles$8.inputWrapper, children: jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "time", disabled: disabled, readOnly: readOnly, required: required, min: min, max: max, className: classNames(styles$8.input, inputClassName, className), style: inputStyle }) }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
512
+ });
513
+ TimeInput.displayName = 'TimeInput';
514
+
515
+ var css_248z$7 = ".FileInput-module_wrapper__hyUy4 {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.FileInput-module_fullWidth__fn0EN { width: 100%; }\n\n.FileInput-module_label__hDf85 {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.FileInput-module_required__ZZjss::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n/* Hidden native input */\n.FileInput-module_nativeInput__klmhh {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n/* Default file button trigger */\n.FileInput-module_fileButton__75R-4 {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n border: 1px solid var(--input-border-color);\n border-radius: var(--input-border-radius);\n background-color: var(--input-bg-color);\n color: var(--input-text-color);\n font-family: var(--input-font-family);\n font-size: 0.875rem;\n cursor: pointer;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n width: 100%;\n justify-content: center;\n}\n\n.FileInput-module_fileButton__75R-4:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n background-color: #f0f9ff;\n}\n\n.FileInput-module_fileButton__75R-4:focus-visible {\n outline: none;\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);\n}\n\n.FileInput-module_fileButton__75R-4:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.FileInput-module_sm__cGKgA .FileInput-module_fileButton__75R-4 { padding: 6px 12px; font-size: 0.75rem; }\n.FileInput-module_lg__1Cgy8 .FileInput-module_fileButton__75R-4 { padding: 10px 20px; font-size: 1rem; }\n\n/* Dropzone */\n.FileInput-module_dropzone__-pJmr {\n border: 2px dashed var(--input-border-color);\n border-radius: var(--input-border-radius);\n padding: 24px 16px;\n text-align: center;\n cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n background-color: var(--input-bg-color);\n color: var(--input-text-color);\n font-size: 0.875rem;\n}\n\n.FileInput-module_dropzone__-pJmr:hover:not(.FileInput-module_dropzoneDisabled__qF45l) {\n border-color: var(--input-primary-color);\n background-color: #f0f9ff;\n}\n\n.FileInput-module_dropzoneActive__Mn2IV {\n border-color: var(--input-primary-color);\n background-color: #eff6ff;\n}\n\n.FileInput-module_dropzoneDisabled__qF45l {\n background-color: var(--input-disabled-bg);\n cursor: not-allowed;\n color: var(--input-disabled-text);\n}\n\n.FileInput-module_dropzoneHint__Po1bF {\n font-size: 0.75rem;\n color: #6b7280;\n margin-top: 4px;\n}\n\n.FileInput-module_error__ZT6sh .FileInput-module_fileButton__75R-4,\n.FileInput-module_error__ZT6sh .FileInput-module_dropzone__-pJmr {\n border-color: var(--input-error-color);\n}\n\n.FileInput-module_fileNames__SREPS {\n margin-top: 4px;\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.FileInput-module_fileName__5RBXD {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.FileInput-module_helperText__a-3N7 { font-size: 0.75rem; color: #6b7280; }\n.FileInput-module_errorText__Axxn6 { font-size: 0.75rem; color: var(--input-error-color); }\n.FileInput-module_successText__caweh { font-size: 0.75rem; color: var(--input-success-color); }\n.FileInput-module_warningText__X6mA6 { font-size: 0.75rem; color: var(--input-warning-color); }\n";
516
+ var styles$7 = {"wrapper":"FileInput-module_wrapper__hyUy4","fullWidth":"FileInput-module_fullWidth__fn0EN","label":"FileInput-module_label__hDf85","required":"FileInput-module_required__ZZjss","nativeInput":"FileInput-module_nativeInput__klmhh","fileButton":"FileInput-module_fileButton__75R-4","sm":"FileInput-module_sm__cGKgA","lg":"FileInput-module_lg__1Cgy8","dropzone":"FileInput-module_dropzone__-pJmr","dropzoneDisabled":"FileInput-module_dropzoneDisabled__qF45l","dropzoneActive":"FileInput-module_dropzoneActive__Mn2IV","dropzoneHint":"FileInput-module_dropzoneHint__Po1bF","error":"FileInput-module_error__ZT6sh","fileNames":"FileInput-module_fileNames__SREPS","fileName":"FileInput-module_fileName__5RBXD","helperText":"FileInput-module_helperText__a-3N7","errorText":"FileInput-module_errorText__Axxn6","successText":"FileInput-module_successText__caweh","warningText":"FileInput-module_warningText__X6mA6"};
517
+ styleInject(css_248z$7);
518
+
519
+ const FileInput = React.forwardRef(({ size = 'md', variant: _variant, validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly: _readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, buttonLabel = 'Choose file', showFileNames = true, dropzone, onChange, multiple, accept, ...rest }, ref) => {
520
+ var _a;
521
+ const internalRef = React.useRef(null);
522
+ const fileRef = (_a = ref) !== null && _a !== void 0 ? _a : internalRef;
523
+ const [fileNames, setFileNames] = React.useState([]);
524
+ const [isDragActive, setIsDragActive] = React.useState(false);
525
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
526
+ id,
527
+ helperText,
528
+ errorMessage,
529
+ validationState,
530
+ required,
531
+ disabled,
532
+ });
533
+ const handleChange = React.useCallback((e) => {
534
+ const files = e.target.files;
535
+ if (files && showFileNames) {
536
+ setFileNames(Array.from(files).map((f) => f.name));
537
+ }
538
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
539
+ }, [onChange, showFileNames]);
540
+ const handleDrop = React.useCallback((e) => {
541
+ e.preventDefault();
542
+ setIsDragActive(false);
543
+ if (disabled || !fileRef.current)
544
+ return;
545
+ const dt = e.dataTransfer;
546
+ const files = dt.files;
547
+ if (files && showFileNames) {
548
+ setFileNames(Array.from(files).map((f) => f.name));
549
+ }
550
+ // Create synthetic change event
551
+ const changeEvent = { target: { files } };
552
+ onChange === null || onChange === void 0 ? void 0 : onChange(changeEvent);
553
+ }, [disabled, fileRef, onChange, showFileNames]);
554
+ const activeMessage = getValidationMessage(validationState, errorMessage, successMessage, warningMessage, helperText);
555
+ const messageClass = getValidationMessageClass(validationState, styles$7);
556
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$7.wrapper, styles$7[size], validationState === 'error' ? styles$7.error : undefined, fullWidth ? styles$7.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$7.label, required ? styles$7.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: fileRef, id: inputId, type: "file", disabled: disabled, required: required, multiple: multiple, accept: accept, onChange: handleChange, className: classNames(styles$7.nativeInput, inputClassName, className), style: inputStyle }), dropzone ? (jsxRuntime.jsxs("div", { role: "button", tabIndex: disabled ? -1 : 0, "aria-label": buttonLabel, "aria-disabled": disabled, className: classNames(styles$7.dropzone, isDragActive ? styles$7.dropzoneActive : undefined, disabled ? styles$7.dropzoneDisabled : undefined), onClick: () => { var _a; return !disabled && ((_a = fileRef.current) === null || _a === void 0 ? void 0 : _a.click()); }, onKeyDown: (e) => {
557
+ var _a;
558
+ if (!disabled && (e.key === 'Enter' || e.key === ' ')) {
559
+ e.preventDefault();
560
+ (_a = fileRef.current) === null || _a === void 0 ? void 0 : _a.click();
561
+ }
562
+ }, onDragOver: (e) => { e.preventDefault(); if (!disabled)
563
+ setIsDragActive(true); }, onDragLeave: () => setIsDragActive(false), onDrop: handleDrop, children: [jsxRuntime.jsxs("div", { children: ["\uD83D\uDCC1 ", buttonLabel] }), jsxRuntime.jsx("p", { className: styles$7.dropzoneHint, children: "or drag and drop files here" })] })) : (jsxRuntime.jsxs("button", { type: "button", className: styles$7.fileButton, disabled: disabled, onClick: () => { var _a; return (_a = fileRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, "aria-controls": inputId, children: ["\uD83D\uDCC1 ", buttonLabel] })), showFileNames && fileNames.length > 0 && (jsxRuntime.jsx("div", { className: styles$7.fileNames, children: fileNames.map((name) => (jsxRuntime.jsxs("div", { className: styles$7.fileName, children: ["\uD83D\uDCC4 ", name] }, name))) })), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
564
+ });
565
+ FileInput.displayName = 'FileInput';
566
+
567
+ var css_248z$6 = ".RangeInput-module_wrapper__ulryd {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-text-color: #111827;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 6px;\n font-family: var(--input-font-family);\n}\n\n.RangeInput-module_fullWidth__zBY4h { width: 100%; }\n\n.RangeInput-module_label__-gTdX {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.RangeInput-module_required__S74-H::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.RangeInput-module_rangeRow__S-3Jj {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.RangeInput-module_input__R7g-4 {\n flex: 1;\n -webkit-appearance: none;\n appearance: none;\n height: 4px;\n border-radius: 2px;\n background: var(--input-border-color);\n outline: none;\n cursor: pointer;\n accent-color: var(--input-primary-color);\n}\n\n.RangeInput-module_sm__TU2Ae .RangeInput-module_input__R7g-4 { height: 2px; }\n.RangeInput-module_lg__lBSD8 .RangeInput-module_input__R7g-4 { height: 6px; }\n\n.RangeInput-module_input__R7g-4::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--input-primary-color);\n cursor: pointer;\n transition: box-shadow 0.15s ease;\n}\n\n.RangeInput-module_sm__TU2Ae .RangeInput-module_input__R7g-4::-webkit-slider-thumb { width: 14px; height: 14px; }\n.RangeInput-module_lg__lBSD8 .RangeInput-module_input__R7g-4::-webkit-slider-thumb { width: 22px; height: 22px; }\n\n.RangeInput-module_input__R7g-4::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--input-primary-color);\n cursor: pointer;\n border: none;\n}\n\n.RangeInput-module_input__R7g-4:focus-visible::-webkit-slider-thumb {\n box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4);\n}\n\n.RangeInput-module_input__R7g-4:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.RangeInput-module_error__KD74b .RangeInput-module_input__R7g-4 { accent-color: var(--input-error-color); }\n.RangeInput-module_success__5qCxe .RangeInput-module_input__R7g-4 { accent-color: var(--input-success-color); }\n.RangeInput-module_warning__Y2lJr .RangeInput-module_input__R7g-4 { accent-color: var(--input-warning-color); }\n\n.RangeInput-module_valueDisplay__bEJfU {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n min-width: 40px;\n text-align: right;\n white-space: nowrap;\n}\n\n.RangeInput-module_sm__TU2Ae .RangeInput-module_valueDisplay__bEJfU { font-size: 0.75rem; min-width: 32px; }\n.RangeInput-module_lg__lBSD8 .RangeInput-module_valueDisplay__bEJfU { font-size: 1rem; min-width: 48px; }\n\n.RangeInput-module_rangeFooter__H0fdW {\n display: flex;\n justify-content: space-between;\n font-size: 0.75rem;\n color: #9ca3af;\n}\n\n.RangeInput-module_helperText__nTZre { font-size: 0.75rem; color: #6b7280; }\n.RangeInput-module_errorText__--65V { font-size: 0.75rem; color: var(--input-error-color); }\n.RangeInput-module_successText__80mA- { font-size: 0.75rem; color: var(--input-success-color); }\n.RangeInput-module_warningText__UGKM5 { font-size: 0.75rem; color: var(--input-warning-color); }\n";
568
+ var styles$6 = {"wrapper":"RangeInput-module_wrapper__ulryd","fullWidth":"RangeInput-module_fullWidth__zBY4h","label":"RangeInput-module_label__-gTdX","required":"RangeInput-module_required__S74-H","rangeRow":"RangeInput-module_rangeRow__S-3Jj","input":"RangeInput-module_input__R7g-4","sm":"RangeInput-module_sm__TU2Ae","lg":"RangeInput-module_lg__lBSD8","error":"RangeInput-module_error__KD74b","success":"RangeInput-module_success__5qCxe","warning":"RangeInput-module_warning__Y2lJr","valueDisplay":"RangeInput-module_valueDisplay__bEJfU","rangeFooter":"RangeInput-module_rangeFooter__H0fdW","helperText":"RangeInput-module_helperText__nTZre","errorText":"RangeInput-module_errorText__--65V","successText":"RangeInput-module_successText__80mA-","warningText":"RangeInput-module_warningText__UGKM5"};
569
+ styleInject(css_248z$6);
570
+
571
+ const RangeInput = React.forwardRef(({ size = 'md', variant: _variant, validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly: _readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, min = 0, max = 100, step = 1, showValue, formatValue, value, defaultValue, onChange, ...rest }, ref) => {
572
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
573
+ id,
574
+ helperText,
575
+ errorMessage,
576
+ validationState,
577
+ required,
578
+ disabled,
579
+ });
580
+ const getInitial = () => {
581
+ if (value !== undefined)
582
+ return Number(value);
583
+ if (defaultValue !== undefined)
584
+ return Number(defaultValue);
585
+ return (Number(min) + Number(max)) / 2;
586
+ };
587
+ const [internalValue, setInternalValue] = React.useState(getInitial);
588
+ const isControlled = value !== undefined;
589
+ const currentValue = isControlled ? Number(value) : internalValue;
590
+ const handleChange = React.useCallback((e) => {
591
+ const numVal = parseFloat(e.target.value);
592
+ if (!isControlled) {
593
+ setInternalValue(numVal);
594
+ }
595
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
596
+ }, [isControlled, onChange]);
597
+ const displayValue = formatValue ? formatValue(currentValue) : String(currentValue);
598
+ const activeMessage = validationState === 'error'
599
+ ? errorMessage
600
+ : validationState === 'success'
601
+ ? successMessage
602
+ : validationState === 'warning'
603
+ ? warningMessage
604
+ : helperText;
605
+ const messageClass = validationState === 'error'
606
+ ? styles$6.errorText
607
+ : validationState === 'success'
608
+ ? styles$6.successText
609
+ : validationState === 'warning'
610
+ ? styles$6.warningText
611
+ : styles$6.helperText;
612
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$6.wrapper, styles$6[size], validationState !== 'default' ? styles$6[validationState] : undefined, fullWidth ? styles$6.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$6.label, required ? styles$6.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$6.rangeRow, children: [jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "range", disabled: disabled, required: required, min: min, max: max, step: step, value: currentValue, onChange: handleChange, className: classNames(styles$6.input, inputClassName, className), style: inputStyle }), showValue && (jsxRuntime.jsx("span", { className: styles$6.valueDisplay, children: displayValue }))] }), jsxRuntime.jsxs("div", { className: styles$6.rangeFooter, children: [jsxRuntime.jsx("span", { children: min }), jsxRuntime.jsx("span", { children: max })] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
613
+ });
614
+ RangeInput.displayName = 'RangeInput';
615
+
616
+ var css_248z$5 = ".ColorInput-module_wrapper__qUnwO {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.ColorInput-module_fullWidth__hh3zh { width: 100%; }\n\n.ColorInput-module_label__IqBt0 {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.ColorInput-module_required__sxFlJ::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.ColorInput-module_colorRow__ohcMv {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.ColorInput-module_colorSwatch__w3O57 {\n position: relative;\n flex-shrink: 0;\n width: 40px;\n height: 40px;\n border-radius: var(--input-border-radius);\n border: 1px solid var(--input-border-color);\n overflow: hidden;\n cursor: pointer;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.ColorInput-module_sm__0382y .ColorInput-module_colorSwatch__w3O57 { width: 32px; height: 32px; }\n.ColorInput-module_lg__o-y7B .ColorInput-module_colorSwatch__w3O57 { width: 48px; height: 48px; }\n\n.ColorInput-module_colorSwatch__w3O57:hover:not(.ColorInput-module_disabledSwatch__Z4jau) {\n border-color: var(--input-primary-color);\n}\n\n.ColorInput-module_colorSwatch__w3O57:focus-within {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);\n}\n\n.ColorInput-module_disabledSwatch__Z4jau {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.ColorInput-module_error__f3QfI .ColorInput-module_colorSwatch__w3O57 {\n border-color: var(--input-error-color);\n}\n\n.ColorInput-module_input__j9Fzh {\n position: absolute;\n top: 0;\n left: 0;\n width: 200%;\n height: 200%;\n transform: translate(-25%, -25%);\n cursor: pointer;\n border: none;\n padding: 0;\n background: none;\n opacity: 0.01;\n}\n\n.ColorInput-module_input__j9Fzh:disabled {\n cursor: not-allowed;\n}\n\n.ColorInput-module_hexValue__2c1oZ {\n font-size: 0.875rem;\n font-family: monospace;\n color: var(--input-text-color);\n padding: 6px 10px;\n border: 1px solid var(--input-border-color);\n border-radius: var(--input-border-radius);\n background-color: var(--input-bg-color);\n min-width: 90px;\n}\n\n.ColorInput-module_sm__0382y .ColorInput-module_hexValue__2c1oZ { font-size: 0.75rem; padding: 4px 8px; min-width: 80px; }\n.ColorInput-module_lg__o-y7B .ColorInput-module_hexValue__2c1oZ { font-size: 1rem; padding: 8px 12px; min-width: 100px; }\n\n.ColorInput-module_helperText__1cY-b { font-size: 0.75rem; color: #6b7280; }\n.ColorInput-module_errorText__9qkSK { font-size: 0.75rem; color: var(--input-error-color); }\n.ColorInput-module_successText__Fgf5d { font-size: 0.75rem; color: var(--input-success-color); }\n.ColorInput-module_warningText__xYykx { font-size: 0.75rem; color: var(--input-warning-color); }\n";
617
+ var styles$5 = {"wrapper":"ColorInput-module_wrapper__qUnwO","fullWidth":"ColorInput-module_fullWidth__hh3zh","label":"ColorInput-module_label__IqBt0","required":"ColorInput-module_required__sxFlJ","colorRow":"ColorInput-module_colorRow__ohcMv","colorSwatch":"ColorInput-module_colorSwatch__w3O57","sm":"ColorInput-module_sm__0382y","lg":"ColorInput-module_lg__o-y7B","disabledSwatch":"ColorInput-module_disabledSwatch__Z4jau","error":"ColorInput-module_error__f3QfI","input":"ColorInput-module_input__j9Fzh","hexValue":"ColorInput-module_hexValue__2c1oZ","helperText":"ColorInput-module_helperText__1cY-b","errorText":"ColorInput-module_errorText__9qkSK","successText":"ColorInput-module_successText__Fgf5d","warningText":"ColorInput-module_warningText__xYykx"};
618
+ styleInject(css_248z$5);
619
+
620
+ const ColorInput = React.forwardRef(({ size = 'md', variant: _variant, validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly: _readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, showHexValue = true, value, defaultValue, onChange, ...rest }, ref) => {
621
+ var _a;
622
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
623
+ id,
624
+ helperText,
625
+ errorMessage,
626
+ validationState,
627
+ required,
628
+ disabled,
629
+ });
630
+ const [internalColor, setInternalColor] = React.useState((_a = defaultValue) !== null && _a !== void 0 ? _a : '#3b82f6');
631
+ const isControlled = value !== undefined;
632
+ const currentColor = isControlled ? value : internalColor;
633
+ const handleChange = React.useCallback((e) => {
634
+ if (!isControlled) {
635
+ setInternalColor(e.target.value);
636
+ }
637
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
638
+ }, [isControlled, onChange]);
639
+ const activeMessage = validationState === 'error'
640
+ ? errorMessage
641
+ : validationState === 'success'
642
+ ? successMessage
643
+ : validationState === 'warning'
644
+ ? warningMessage
645
+ : helperText;
646
+ const messageClass = validationState === 'error'
647
+ ? styles$5.errorText
648
+ : validationState === 'success'
649
+ ? styles$5.successText
650
+ : validationState === 'warning'
651
+ ? styles$5.warningText
652
+ : styles$5.helperText;
653
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$5.wrapper, styles$5[size], validationState === 'error' ? styles$5.error : undefined, fullWidth ? styles$5.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$5.label, required ? styles$5.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$5.colorRow, children: [jsxRuntime.jsx("div", { className: classNames(styles$5.colorSwatch, disabled ? styles$5.disabledSwatch : undefined), style: { backgroundColor: currentColor }, children: jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "color", disabled: disabled, required: required, value: currentColor, onChange: handleChange, className: classNames(styles$5.input, inputClassName, className), style: inputStyle }) }), showHexValue && (jsxRuntime.jsx("span", { className: styles$5.hexValue, children: currentColor.toUpperCase() }))] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
654
+ });
655
+ ColorInput.displayName = 'ColorInput';
656
+
657
+ var css_248z$4 = ".SearchInput-module_wrapper__q8GEq {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 9999px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.SearchInput-module_fullWidth__AFi3K { width: 100%; }\n\n.SearchInput-module_label__4lcBT {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.SearchInput-module_required__Bf3HX::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.SearchInput-module_inputWrapper__8rYVN {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.SearchInput-module_input__rhhzi {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n}\n\n.SearchInput-module_input__rhhzi::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.SearchInput-module_sm__duydm .SearchInput-module_input__rhhzi { padding: 6px 32px 6px 32px; font-size: 0.75rem; height: 32px; }\n.SearchInput-module_md__6Z2o0 .SearchInput-module_input__rhhzi { padding: 8px 36px 8px 36px; font-size: 0.875rem; height: 40px; }\n.SearchInput-module_lg__tTVz- .SearchInput-module_input__rhhzi { padding: 10px 44px 10px 44px; font-size: 1rem; height: 48px; }\n\n.SearchInput-module_hasClear__T5LPA.SearchInput-module_sm__duydm .SearchInput-module_input__rhhzi { padding-right: 56px; }\n.SearchInput-module_hasClear__T5LPA.SearchInput-module_md__6Z2o0 .SearchInput-module_input__rhhzi { padding-right: 64px; }\n.SearchInput-module_hasClear__T5LPA.SearchInput-module_lg__tTVz- .SearchInput-module_input__rhhzi { padding-right: 72px; }\n\n.SearchInput-module_outlined__UjHm1 .SearchInput-module_input__rhhzi { border: 1px solid var(--input-border-color); }\n.SearchInput-module_outlined__UjHm1 .SearchInput-module_input__rhhzi:hover:not(:disabled) { border-color: var(--input-primary-color); }\n.SearchInput-module_outlined__UjHm1 .SearchInput-module_input__rhhzi:focus { border-color: var(--input-primary-color); box-shadow: 0 0 0 3px var(--input-focus-ring-color); }\n\n.SearchInput-module_filled__A8jTf .SearchInput-module_input__rhhzi { border: 1px solid transparent; background-color: #f3f4f6; }\n.SearchInput-module_filled__A8jTf .SearchInput-module_input__rhhzi:hover:not(:disabled) { background-color: #e5e7eb; }\n.SearchInput-module_filled__A8jTf .SearchInput-module_input__rhhzi:focus { background-color: var(--input-bg-color); border-color: var(--input-primary-color); box-shadow: 0 0 0 3px var(--input-focus-ring-color); }\n\n.SearchInput-module_underlined__AGfjj .SearchInput-module_input__rhhzi { border: none; border-bottom: 2px solid var(--input-border-color); border-radius: 0; }\n.SearchInput-module_underlined__AGfjj .SearchInput-module_input__rhhzi:hover:not(:disabled) { border-bottom-color: var(--input-primary-color); }\n.SearchInput-module_underlined__AGfjj .SearchInput-module_input__rhhzi:focus { border-bottom-color: var(--input-primary-color); box-shadow: 0 2px 0 0 var(--input-focus-ring-color); }\n\n.SearchInput-module_error__Ewib2 .SearchInput-module_input__rhhzi { border-color: var(--input-error-color) !important; }\n.SearchInput-module_error__Ewib2 .SearchInput-module_input__rhhzi:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important; }\n\n.SearchInput-module_input__rhhzi:disabled { background-color: var(--input-disabled-bg); color: var(--input-disabled-text); cursor: not-allowed; }\n\n.SearchInput-module_searchIcon__O0FTp {\n position: absolute;\n left: 10px;\n color: var(--input-placeholder-color);\n pointer-events: none;\n display: flex;\n align-items: center;\n font-size: 0.875rem;\n}\n\n.SearchInput-module_clearBtn__2cwc9 {\n position: absolute;\n right: 10px;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--input-placeholder-color);\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: color 0.15s ease, background-color 0.15s ease;\n line-height: 1;\n font-size: 0.875rem;\n}\n\n.SearchInput-module_clearBtn__2cwc9:hover { color: var(--input-text-color); background-color: #f3f4f6; }\n.SearchInput-module_clearBtn__2cwc9:disabled { cursor: not-allowed; opacity: 0.5; }\n\n.SearchInput-module_helperText__pCOLe { font-size: 0.75rem; color: #6b7280; }\n.SearchInput-module_errorText__MbWFu { font-size: 0.75rem; color: var(--input-error-color); }\n.SearchInput-module_successText__LN6Yh { font-size: 0.75rem; color: var(--input-success-color); }\n.SearchInput-module_warningText__K07X1 { font-size: 0.75rem; color: var(--input-warning-color); }\n";
658
+ var styles$4 = {"wrapper":"SearchInput-module_wrapper__q8GEq","fullWidth":"SearchInput-module_fullWidth__AFi3K","label":"SearchInput-module_label__4lcBT","required":"SearchInput-module_required__Bf3HX","inputWrapper":"SearchInput-module_inputWrapper__8rYVN","input":"SearchInput-module_input__rhhzi","sm":"SearchInput-module_sm__duydm","md":"SearchInput-module_md__6Z2o0","lg":"SearchInput-module_lg__tTVz-","hasClear":"SearchInput-module_hasClear__T5LPA","outlined":"SearchInput-module_outlined__UjHm1","filled":"SearchInput-module_filled__A8jTf","underlined":"SearchInput-module_underlined__AGfjj","error":"SearchInput-module_error__Ewib2","searchIcon":"SearchInput-module_searchIcon__O0FTp","clearBtn":"SearchInput-module_clearBtn__2cwc9","helperText":"SearchInput-module_helperText__pCOLe","errorText":"SearchInput-module_errorText__MbWFu","successText":"SearchInput-module_successText__LN6Yh","warningText":"SearchInput-module_warningText__K07X1"};
659
+ styleInject(css_248z$4);
660
+
661
+ const SearchInput = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, onSearch, showClearButton = true, showSearchIcon = true, value, defaultValue, onChange, onKeyDown, placeholder = 'Search…', ...rest }, ref) => {
662
+ var _a, _b;
663
+ const internalRef = React.useRef(null);
664
+ const inputRef = (_a = ref) !== null && _a !== void 0 ? _a : internalRef;
665
+ const [internalValue, setInternalValue] = React.useState((_b = defaultValue) !== null && _b !== void 0 ? _b : '');
666
+ const isControlled = value !== undefined;
667
+ const currentValue = isControlled ? value : internalValue;
668
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
669
+ id,
670
+ helperText,
671
+ errorMessage,
672
+ validationState,
673
+ required,
674
+ disabled,
675
+ });
676
+ const handleChange = React.useCallback((e) => {
677
+ if (!isControlled)
678
+ setInternalValue(e.target.value);
679
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
680
+ }, [isControlled, onChange]);
681
+ const handleKeyDown = React.useCallback((e) => {
682
+ if (e.key === 'Enter') {
683
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(currentValue);
684
+ }
685
+ onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
686
+ }, [currentValue, onSearch, onKeyDown]);
687
+ const handleClear = React.useCallback(() => {
688
+ var _a;
689
+ if (!isControlled)
690
+ setInternalValue('');
691
+ // Call onChange with a synthetic event if the component is controlled
692
+ if (onChange && inputRef.current) {
693
+ const syntheticEvent = {
694
+ target: { ...inputRef.current, value: '' },
695
+ currentTarget: inputRef.current,
696
+ };
697
+ onChange(syntheticEvent);
698
+ }
699
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch('');
700
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
701
+ }, [isControlled, inputRef, onChange, onSearch]);
702
+ const activeMessage = getValidationMessage(validationState, errorMessage, successMessage, warningMessage, helperText);
703
+ const messageClass = getValidationMessageClass(validationState, styles$4);
704
+ const hasClearButton = showClearButton && Boolean(currentValue);
705
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$4.wrapper, styles$4[size], styles$4[variant], validationState !== 'default' ? styles$4[validationState] : undefined, fullWidth ? styles$4.fullWidth : undefined, hasClearButton ? styles$4.hasClear : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$4.label, required ? styles$4.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$4.inputWrapper, children: [showSearchIcon && jsxRuntime.jsx("span", { className: styles$4.searchIcon, children: "\uD83D\uDD0D" }), jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: inputRef, id: inputId, type: "search", disabled: disabled, readOnly: readOnly, required: required, placeholder: placeholder, value: currentValue, onChange: handleChange, onKeyDown: handleKeyDown, className: classNames(styles$4.input, inputClassName, className), style: inputStyle }), hasClearButton && (jsxRuntime.jsx("button", { type: "button", className: styles$4.clearBtn, onClick: handleClear, disabled: disabled, "aria-label": "Clear search", tabIndex: -1, children: "\u2715" }))] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
706
+ });
707
+ SearchInput.displayName = 'SearchInput';
708
+
709
+ var css_248z$3 = ".PhoneInput-module_wrapper__iOjQp {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n}\n\n.PhoneInput-module_fullWidth__9uKh2 { width: 100%; }\n\n.PhoneInput-module_label__UCCbp {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.PhoneInput-module_required__6VEPp::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.PhoneInput-module_inputWrapper__nBvRv {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--input-border-color);\n border-radius: var(--input-border-radius);\n overflow: hidden;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n background-color: var(--input-bg-color);\n}\n\n.PhoneInput-module_inputWrapper__nBvRv:hover:not(.PhoneInput-module_disabledWrapper__u-AtZ) {\n border-color: var(--input-primary-color);\n}\n\n.PhoneInput-module_inputWrapper__nBvRv:focus-within:not(.PhoneInput-module_disabledWrapper__u-AtZ) {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.PhoneInput-module_error__GzzTI .PhoneInput-module_inputWrapper__nBvRv {\n border-color: var(--input-error-color);\n}\n\n.PhoneInput-module_error__GzzTI .PhoneInput-module_inputWrapper__nBvRv:focus-within {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);\n}\n\n.PhoneInput-module_success__z-7Ws .PhoneInput-module_inputWrapper__nBvRv {\n border-color: var(--input-success-color);\n}\n\n.PhoneInput-module_warning__aO217 .PhoneInput-module_inputWrapper__nBvRv {\n border-color: var(--input-warning-color);\n}\n\n.PhoneInput-module_disabledWrapper__u-AtZ {\n background-color: var(--input-disabled-bg);\n cursor: not-allowed;\n}\n\n.PhoneInput-module_dialCodeSelect__cA5WX {\n appearance: none;\n -webkit-appearance: none;\n background: none;\n border: none;\n border-right: 1px solid var(--input-border-color);\n outline: none;\n cursor: pointer;\n color: var(--input-text-color);\n font-family: var(--input-font-family);\n padding-right: 4px;\n}\n\n.PhoneInput-module_dialCodeSelect__cA5WX:disabled {\n cursor: not-allowed;\n color: var(--input-disabled-text);\n}\n\n.PhoneInput-module_sm__uuSpa .PhoneInput-module_dialCodeSelect__cA5WX { padding: 6px 8px; font-size: 0.75rem; }\n.PhoneInput-module_md__NldZt .PhoneInput-module_dialCodeSelect__cA5WX { padding: 8px 10px; font-size: 0.875rem; }\n.PhoneInput-module_lg__68zrK .PhoneInput-module_dialCodeSelect__cA5WX { padding: 10px 12px; font-size: 1rem; }\n\n.PhoneInput-module_phoneInput__3TeHi {\n flex: 1;\n border: none;\n outline: none;\n background: none;\n color: var(--input-text-color);\n font-family: var(--input-font-family);\n}\n\n.PhoneInput-module_phoneInput__3TeHi::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.PhoneInput-module_phoneInput__3TeHi:disabled {\n cursor: not-allowed;\n color: var(--input-disabled-text);\n}\n\n.PhoneInput-module_sm__uuSpa .PhoneInput-module_phoneInput__3TeHi { padding: 6px 10px; font-size: 0.75rem; }\n.PhoneInput-module_md__NldZt .PhoneInput-module_phoneInput__3TeHi { padding: 8px 12px; font-size: 0.875rem; }\n.PhoneInput-module_lg__68zrK .PhoneInput-module_phoneInput__3TeHi { padding: 10px 16px; font-size: 1rem; }\n\n.PhoneInput-module_helperText__liCEX { font-size: 0.75rem; color: #6b7280; }\n.PhoneInput-module_errorText__a64SR { font-size: 0.75rem; color: var(--input-error-color); }\n.PhoneInput-module_successText__1ncrR { font-size: 0.75rem; color: var(--input-success-color); }\n.PhoneInput-module_warningText__zbRzg { font-size: 0.75rem; color: var(--input-warning-color); }\n";
710
+ var styles$3 = {"wrapper":"PhoneInput-module_wrapper__iOjQp","fullWidth":"PhoneInput-module_fullWidth__9uKh2","label":"PhoneInput-module_label__UCCbp","required":"PhoneInput-module_required__6VEPp","inputWrapper":"PhoneInput-module_inputWrapper__nBvRv","disabledWrapper":"PhoneInput-module_disabledWrapper__u-AtZ","error":"PhoneInput-module_error__GzzTI","success":"PhoneInput-module_success__z-7Ws","warning":"PhoneInput-module_warning__aO217","dialCodeSelect":"PhoneInput-module_dialCodeSelect__cA5WX","sm":"PhoneInput-module_sm__uuSpa","md":"PhoneInput-module_md__NldZt","lg":"PhoneInput-module_lg__68zrK","phoneInput":"PhoneInput-module_phoneInput__3TeHi","helperText":"PhoneInput-module_helperText__liCEX","errorText":"PhoneInput-module_errorText__a64SR","successText":"PhoneInput-module_successText__1ncrR","warningText":"PhoneInput-module_warningText__zbRzg"};
711
+ styleInject(css_248z$3);
712
+
713
+ const DEFAULT_COUNTRIES = [
714
+ { code: 'US', dialCode: '+1', flag: '🇺🇸', name: 'United States' },
715
+ { code: 'GB', dialCode: '+44', flag: '🇬🇧', name: 'United Kingdom' },
716
+ { code: 'CA', dialCode: '+1', flag: '🇨🇦', name: 'Canada' },
717
+ { code: 'AU', dialCode: '+61', flag: '🇦🇺', name: 'Australia' },
718
+ { code: 'DE', dialCode: '+49', flag: '🇩🇪', name: 'Germany' },
719
+ { code: 'FR', dialCode: '+33', flag: '🇫🇷', name: 'France' },
720
+ { code: 'IN', dialCode: '+91', flag: '🇮🇳', name: 'India' },
721
+ { code: 'JP', dialCode: '+81', flag: '🇯🇵', name: 'Japan' },
722
+ { code: 'CN', dialCode: '+86', flag: '🇨🇳', name: 'China' },
723
+ { code: 'BR', dialCode: '+55', flag: '🇧🇷', name: 'Brazil' },
724
+ ];
725
+ const PhoneInput = React.forwardRef(({ size = 'md', variant: _variant, validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, dialCode, defaultDialCode = '+1', countries = DEFAULT_COUNTRIES, onChange, phoneValue, placeholder = '(555) 000-0000', ...rest }, ref) => {
726
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
727
+ id,
728
+ helperText,
729
+ errorMessage,
730
+ validationState,
731
+ required,
732
+ disabled,
733
+ });
734
+ const [internalDial, setInternalDial] = React.useState(defaultDialCode);
735
+ const [internalPhone, setInternalPhone] = React.useState('');
736
+ const isDialControlled = dialCode !== undefined;
737
+ const isPhoneControlled = phoneValue !== undefined;
738
+ const currentDial = isDialControlled ? dialCode : internalDial;
739
+ const currentPhone = isPhoneControlled ? phoneValue : internalPhone;
740
+ const handleDialChange = React.useCallback((e) => {
741
+ const newDial = e.target.value;
742
+ if (!isDialControlled)
743
+ setInternalDial(newDial);
744
+ onChange === null || onChange === void 0 ? void 0 : onChange(currentPhone, newDial);
745
+ }, [isDialControlled, currentPhone, onChange]);
746
+ const handlePhoneChange = React.useCallback((e) => {
747
+ const newPhone = e.target.value.replace(/[^\d\s\-().+]/g, '');
748
+ if (!isPhoneControlled)
749
+ setInternalPhone(newPhone);
750
+ onChange === null || onChange === void 0 ? void 0 : onChange(newPhone, currentDial);
751
+ }, [isPhoneControlled, currentDial, onChange]);
752
+ const activeMessage = validationState === 'error'
753
+ ? errorMessage
754
+ : validationState === 'success'
755
+ ? successMessage
756
+ : validationState === 'warning'
757
+ ? warningMessage
758
+ : helperText;
759
+ const messageClass = validationState === 'error'
760
+ ? styles$3.errorText
761
+ : validationState === 'success'
762
+ ? styles$3.successText
763
+ : validationState === 'warning'
764
+ ? styles$3.warningText
765
+ : styles$3.helperText;
766
+ return (jsxRuntime.jsxs("div", { className: classNames(styles$3.wrapper, styles$3[size], validationState !== 'default' ? styles$3[validationState] : undefined, fullWidth ? styles$3.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$3.label, required ? styles$3.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: classNames(styles$3.inputWrapper, disabled ? styles$3.disabledWrapper : undefined), children: [jsxRuntime.jsx("select", { className: styles$3.dialCodeSelect, value: currentDial, onChange: handleDialChange, disabled: disabled, "aria-label": "Country dial code", children: countries.map((c) => (jsxRuntime.jsxs("option", { value: c.dialCode, children: [c.flag, " ", c.dialCode] }, `${c.code}-${c.dialCode}`))) }), jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "tel", disabled: disabled, readOnly: readOnly, required: required, placeholder: placeholder, value: currentPhone, onChange: handlePhoneChange, className: classNames(styles$3.phoneInput, inputClassName, className), style: inputStyle })] }), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
767
+ });
768
+ PhoneInput.displayName = 'PhoneInput';
769
+
770
+ var css_248z$2 = ".OTPInput-module_wrapper__ylADf {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-border-radius: 8px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 8px;\n font-family: var(--input-font-family);\n}\n\n.OTPInput-module_label__Z5sSZ {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.OTPInput-module_required__-26HV::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.OTPInput-module_inputsRow__xHAzs {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.OTPInput-module_separator__1rLQ5 {\n color: var(--input-text-color);\n font-weight: 600;\n user-select: none;\n}\n\n.OTPInput-module_digitInput__JmEt3 {\n width: 40px;\n height: 48px;\n text-align: center;\n font-size: 1.25rem;\n font-weight: 600;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border: 2px solid var(--input-border-color);\n border-radius: var(--input-border-radius);\n outline: none;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n caret-color: transparent;\n cursor: default;\n box-sizing: border-box;\n}\n\n.OTPInput-module_sm__OBISd .OTPInput-module_digitInput__JmEt3 { width: 32px; height: 38px; font-size: 1rem; }\n.OTPInput-module_lg__nv2s6 .OTPInput-module_digitInput__JmEt3 { width: 52px; height: 60px; font-size: 1.5rem; }\n\n.OTPInput-module_digitInput__JmEt3:hover:not(:disabled) {\n border-color: var(--input-primary-color);\n}\n\n.OTPInput-module_digitInput__JmEt3:focus {\n border-color: var(--input-primary-color);\n box-shadow: 0 0 0 3px var(--input-focus-ring-color);\n}\n\n.OTPInput-module_digitInput__JmEt3:disabled {\n background-color: var(--input-disabled-bg);\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.OTPInput-module_digitFilled__66FNT {\n border-color: var(--input-primary-color);\n}\n\n.OTPInput-module_error__bjKug .OTPInput-module_digitInput__JmEt3 {\n border-color: var(--input-error-color);\n}\n\n.OTPInput-module_error__bjKug .OTPInput-module_digitInput__JmEt3:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);\n}\n\n.OTPInput-module_success__hD6NL .OTPInput-module_digitInput__JmEt3 {\n border-color: var(--input-success-color);\n}\n\n.OTPInput-module_success__hD6NL .OTPInput-module_digitInput__JmEt3:focus {\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);\n}\n\n.OTPInput-module_helperText__8ml-k { font-size: 0.75rem; color: #6b7280; }\n.OTPInput-module_errorText__GuIyd { font-size: 0.75rem; color: var(--input-error-color); }\n.OTPInput-module_successText__mU1eR { font-size: 0.75rem; color: var(--input-success-color); }\n.OTPInput-module_warningText__LlJYz { font-size: 0.75rem; color: var(--input-warning-color); }\n";
771
+ var styles$2 = {"wrapper":"OTPInput-module_wrapper__ylADf","label":"OTPInput-module_label__Z5sSZ","required":"OTPInput-module_required__-26HV","inputsRow":"OTPInput-module_inputsRow__xHAzs","separator":"OTPInput-module_separator__1rLQ5","digitInput":"OTPInput-module_digitInput__JmEt3","sm":"OTPInput-module_sm__OBISd","lg":"OTPInput-module_lg__nv2s6","digitFilled":"OTPInput-module_digitFilled__66FNT","error":"OTPInput-module_error__bjKug","success":"OTPInput-module_success__hD6NL","helperText":"OTPInput-module_helperText__8ml-k","errorText":"OTPInput-module_errorText__GuIyd","successText":"OTPInput-module_successText__mU1eR","warningText":"OTPInput-module_warningText__LlJYz"};
772
+ styleInject(css_248z$2);
773
+
774
+ const OTPInput = React.forwardRef(({ size = 'md', validationState = 'default', label, helperText, errorMessage, required, disabled, wrapperClassName, wrapperStyle, labelClassName, labelStyle, helperTextClassName, helperTextStyle, id, length = 6, value, defaultValue, onChange, onComplete, inputType = 'numeric', mask, }, ref) => {
775
+ const generatedId = React.useId();
776
+ const groupId = id !== null && id !== void 0 ? id : `otp-${generatedId}`;
777
+ const helperId = `${groupId}-helper`;
778
+ const inputRefs = React.useRef([]);
779
+ const [internalValue, setInternalValue] = useControllable({
780
+ value,
781
+ defaultValue: defaultValue !== null && defaultValue !== void 0 ? defaultValue : '',
782
+ onChange,
783
+ });
784
+ const currentValue = internalValue !== null && internalValue !== void 0 ? internalValue : '';
785
+ const digits = Array.from({ length }, (_, i) => { var _a; return (_a = currentValue[i]) !== null && _a !== void 0 ? _a : ''; });
786
+ const isAllowed = React.useCallback((char) => {
787
+ if (inputType === 'numeric')
788
+ return /^\d$/.test(char);
789
+ return /^[a-zA-Z0-9]$/.test(char);
790
+ }, [inputType]);
791
+ const updateValue = React.useCallback((newDigits) => {
792
+ const newValue = newDigits.join('');
793
+ setInternalValue(newValue);
794
+ if (newValue.length === length && !newDigits.includes('')) {
795
+ onComplete === null || onComplete === void 0 ? void 0 : onComplete(newValue);
796
+ }
797
+ }, [length, setInternalValue, onComplete]);
798
+ const handleChange = React.useCallback((index, e) => {
799
+ var _a;
800
+ const raw = e.target.value;
801
+ const char = raw.slice(-1);
802
+ if (char && !isAllowed(char))
803
+ return;
804
+ const newDigits = [...digits];
805
+ newDigits[index] = char;
806
+ updateValue(newDigits);
807
+ if (char && index < length - 1) {
808
+ (_a = inputRefs.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
809
+ }
810
+ }, [digits, isAllowed, length, updateValue]);
811
+ const handleKeyDown = React.useCallback((index, e) => {
812
+ var _a, _b, _c;
813
+ if (e.key === 'Backspace') {
814
+ if (digits[index]) {
815
+ const newDigits = [...digits];
816
+ newDigits[index] = '';
817
+ updateValue(newDigits);
818
+ }
819
+ else if (index > 0) {
820
+ (_a = inputRefs.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
821
+ const newDigits = [...digits];
822
+ newDigits[index - 1] = '';
823
+ updateValue(newDigits);
824
+ }
825
+ }
826
+ else if (e.key === 'ArrowLeft' && index > 0) {
827
+ (_b = inputRefs.current[index - 1]) === null || _b === void 0 ? void 0 : _b.focus();
828
+ }
829
+ else if (e.key === 'ArrowRight' && index < length - 1) {
830
+ (_c = inputRefs.current[index + 1]) === null || _c === void 0 ? void 0 : _c.focus();
831
+ }
832
+ }, [digits, length, updateValue]);
833
+ const handlePaste = React.useCallback((e) => {
834
+ var _a;
835
+ e.preventDefault();
836
+ const pasted = e.clipboardData.getData('text').split('');
837
+ const newDigits = [...digits];
838
+ let filled = 0;
839
+ for (let i = 0; i < pasted.length && filled < length; i++) {
840
+ const char = pasted[i];
841
+ if (isAllowed(char)) {
842
+ const targetIdx = filled;
843
+ newDigits[targetIdx] = char;
844
+ filled++;
845
+ }
846
+ }
847
+ updateValue(newDigits);
848
+ const nextFocus = Math.min(filled, length - 1);
849
+ (_a = inputRefs.current[nextFocus]) === null || _a === void 0 ? void 0 : _a.focus();
850
+ }, [digits, isAllowed, length, updateValue]);
851
+ const activeMessage = validationState === 'error'
852
+ ? errorMessage
853
+ : validationState === 'success'
854
+ ? undefined
855
+ : helperText;
856
+ const messageClass = validationState === 'error'
857
+ ? styles$2.errorText
858
+ : validationState === 'success'
859
+ ? styles$2.successText
860
+ : validationState === 'warning'
861
+ ? styles$2.warningText
862
+ : styles$2.helperText;
863
+ return (jsxRuntime.jsxs("div", { ref: ref, className: classNames(styles$2.wrapper, styles$2[size], validationState !== 'default' ? styles$2[validationState] : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { htmlFor: `${groupId}-0`, className: classNames(styles$2.label, required ? styles$2.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsx("div", { className: styles$2.inputsRow, role: "group", "aria-label": label !== null && label !== void 0 ? label : 'One-time password', children: digits.map((digit, index) => (jsxRuntime.jsxs(React.Fragment, { children: [index === length / 2 && length > 4 && (jsxRuntime.jsx("span", { className: styles$2.separator, "aria-hidden": "true", children: "\u2014" })), jsxRuntime.jsx("input", { ref: (el) => { inputRefs.current[index] = el; }, id: index === 0 ? `${groupId}-0` : undefined, type: mask ? 'password' : 'text', inputMode: inputType === 'numeric' ? 'numeric' : 'text', maxLength: 1, value: digit, disabled: disabled, required: required && index === 0, onChange: (e) => handleChange(index, e), onKeyDown: (e) => handleKeyDown(index, e), onPaste: handlePaste, onFocus: (e) => e.target.select(), className: classNames(styles$2.digitInput, digit ? styles$2.digitFilled : undefined), "aria-label": `Digit ${index + 1} of ${length}`, autoComplete: index === 0 ? 'one-time-code' : 'off' })] }, index))) }), (activeMessage || (validationState === 'error' && errorMessage)) && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: validationState === 'error' ? errorMessage : activeMessage }))] }));
864
+ });
865
+ OTPInput.displayName = 'OTPInput';
866
+
867
+ var css_248z$1 = ".AutoComplete-module_wrapper__Xt0k7 {\n --input-primary-color: #3b82f6;\n --input-error-color: #ef4444;\n --input-success-color: #22c55e;\n --input-warning-color: #f59e0b;\n --input-border-color: #d1d5db;\n --input-bg-color: #ffffff;\n --input-text-color: #111827;\n --input-placeholder-color: #9ca3af;\n --input-border-radius: 6px;\n --input-font-family: inherit;\n --input-focus-ring-color: rgba(59, 130, 246, 0.5);\n --input-disabled-bg: #f3f4f6;\n --input-disabled-text: #9ca3af;\n display: inline-flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--input-font-family);\n position: relative;\n}\n\n.AutoComplete-module_fullWidth__FebWu { width: 100%; }\n\n.AutoComplete-module_label__Mg45U {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--input-text-color);\n}\n\n.AutoComplete-module_required__o79Ww::after {\n content: ' *';\n color: var(--input-error-color);\n}\n\n.AutoComplete-module_inputWrapper__fray2 {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.AutoComplete-module_input__g51MC {\n width: 100%;\n font-family: var(--input-font-family);\n color: var(--input-text-color);\n background-color: var(--input-bg-color);\n border-radius: var(--input-border-radius);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n outline: none;\n box-sizing: border-box;\n}\n\n.AutoComplete-module_input__g51MC::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.AutoComplete-module_sm__HXySZ .AutoComplete-module_input__g51MC { padding: 6px 32px 6px 10px; font-size: 0.75rem; height: 32px; }\n.AutoComplete-module_md__4a2vG .AutoComplete-module_input__g51MC { padding: 8px 36px 8px 12px; font-size: 0.875rem; height: 40px; }\n.AutoComplete-module_lg__RkNNN .AutoComplete-module_input__g51MC { padding: 10px 44px 10px 16px; font-size: 1rem; height: 48px; }\n\n.AutoComplete-module_outlined__8n-FG .AutoComplete-module_input__g51MC { border: 1px solid var(--input-border-color); }\n.AutoComplete-module_outlined__8n-FG .AutoComplete-module_input__g51MC:hover:not(:disabled) { border-color: var(--input-primary-color); }\n.AutoComplete-module_outlined__8n-FG .AutoComplete-module_input__g51MC:focus { border-color: var(--input-primary-color); box-shadow: 0 0 0 3px var(--input-focus-ring-color); }\n\n.AutoComplete-module_filled__ZonX5 .AutoComplete-module_input__g51MC { border: 1px solid transparent; background-color: #f3f4f6; }\n.AutoComplete-module_filled__ZonX5 .AutoComplete-module_input__g51MC:hover:not(:disabled) { background-color: #e5e7eb; }\n.AutoComplete-module_filled__ZonX5 .AutoComplete-module_input__g51MC:focus { background-color: var(--input-bg-color); border-color: var(--input-primary-color); box-shadow: 0 0 0 3px var(--input-focus-ring-color); }\n\n.AutoComplete-module_underlined__m-XYe .AutoComplete-module_input__g51MC { border: none; border-bottom: 2px solid var(--input-border-color); border-radius: 0; padding-left: 0; }\n.AutoComplete-module_underlined__m-XYe .AutoComplete-module_input__g51MC:hover:not(:disabled) { border-bottom-color: var(--input-primary-color); }\n.AutoComplete-module_underlined__m-XYe .AutoComplete-module_input__g51MC:focus { border-bottom-color: var(--input-primary-color); box-shadow: 0 2px 0 0 var(--input-focus-ring-color); }\n\n.AutoComplete-module_error__5DK2R .AutoComplete-module_input__g51MC { border-color: var(--input-error-color) !important; }\n.AutoComplete-module_error__5DK2R .AutoComplete-module_input__g51MC:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important; }\n.AutoComplete-module_success__w2wNi .AutoComplete-module_input__g51MC { border-color: var(--input-success-color) !important; }\n.AutoComplete-module_warning__lKl11 .AutoComplete-module_input__g51MC { border-color: var(--input-warning-color) !important; }\n\n.AutoComplete-module_input__g51MC:disabled { background-color: var(--input-disabled-bg); color: var(--input-disabled-text); cursor: not-allowed; }\n\n.AutoComplete-module_chevron__zs4E0 {\n position: absolute;\n right: 10px;\n color: var(--input-placeholder-color);\n pointer-events: none;\n font-size: 0.75rem;\n transition: transform 0.15s ease;\n}\n\n.AutoComplete-module_chevronOpen__PyIml {\n transform: rotate(180deg);\n}\n\n/* Dropdown */\n.AutoComplete-module_dropdown__NqO3E {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 1000;\n margin-top: 4px;\n background-color: var(--input-bg-color);\n border: 1px solid var(--input-border-color);\n border-radius: var(--input-border-radius);\n box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);\n max-height: 240px;\n overflow-y: auto;\n list-style: none;\n margin: 4px 0 0;\n padding: 4px 0;\n}\n\n.AutoComplete-module_option__Y-Kja {\n padding: 8px 12px;\n cursor: pointer;\n font-size: 0.875rem;\n color: var(--input-text-color);\n transition: background-color 0.1s ease;\n display: flex;\n align-items: center;\n}\n\n.AutoComplete-module_optionHighlighted__uAhz6 {\n background-color: #eff6ff;\n color: var(--input-primary-color);\n}\n\n.AutoComplete-module_optionSelected__OrY5D {\n background-color: #dbeafe;\n color: var(--input-primary-color);\n font-weight: 500;\n}\n\n.AutoComplete-module_optionDisabled__089aq {\n color: var(--input-disabled-text);\n cursor: not-allowed;\n}\n\n.AutoComplete-module_optionDisabled__089aq:hover {\n background-color: transparent;\n}\n\n.AutoComplete-module_noOptions__y6NiQ,\n.AutoComplete-module_loading__d-V8X {\n padding: 10px 12px;\n font-size: 0.875rem;\n color: var(--input-placeholder-color);\n text-align: center;\n}\n\n.AutoComplete-module_helperText__n1pbz { font-size: 0.75rem; color: #6b7280; }\n.AutoComplete-module_errorText__YJ8I3 { font-size: 0.75rem; color: var(--input-error-color); }\n.AutoComplete-module_successText__BcYro { font-size: 0.75rem; color: var(--input-success-color); }\n.AutoComplete-module_warningText__z9V-G { font-size: 0.75rem; color: var(--input-warning-color); }\n";
868
+ var styles$1 = {"wrapper":"AutoComplete-module_wrapper__Xt0k7","fullWidth":"AutoComplete-module_fullWidth__FebWu","label":"AutoComplete-module_label__Mg45U","required":"AutoComplete-module_required__o79Ww","inputWrapper":"AutoComplete-module_inputWrapper__fray2","input":"AutoComplete-module_input__g51MC","sm":"AutoComplete-module_sm__HXySZ","md":"AutoComplete-module_md__4a2vG","lg":"AutoComplete-module_lg__RkNNN","outlined":"AutoComplete-module_outlined__8n-FG","filled":"AutoComplete-module_filled__ZonX5","underlined":"AutoComplete-module_underlined__m-XYe","error":"AutoComplete-module_error__5DK2R","success":"AutoComplete-module_success__w2wNi","warning":"AutoComplete-module_warning__lKl11","chevron":"AutoComplete-module_chevron__zs4E0","chevronOpen":"AutoComplete-module_chevronOpen__PyIml","dropdown":"AutoComplete-module_dropdown__NqO3E","option":"AutoComplete-module_option__Y-Kja","optionHighlighted":"AutoComplete-module_optionHighlighted__uAhz6","optionSelected":"AutoComplete-module_optionSelected__OrY5D","optionDisabled":"AutoComplete-module_optionDisabled__089aq","noOptions":"AutoComplete-module_noOptions__y6NiQ","loading":"AutoComplete-module_loading__d-V8X","helperText":"AutoComplete-module_helperText__n1pbz","errorText":"AutoComplete-module_errorText__YJ8I3","successText":"AutoComplete-module_successText__BcYro","warningText":"AutoComplete-module_warningText__z9V-G"};
869
+ styleInject(css_248z$1);
870
+
871
+ const AutoComplete = React.forwardRef(({ size = 'md', variant = 'outlined', validationState = 'default', label, helperText, errorMessage, successMessage, warningMessage, required, disabled, readOnly, prefixIcon: _prefixIcon, suffixIcon: _suffixIcon, floatingLabel: _floatingLabel, fullWidth, wrapperClassName, wrapperStyle, labelClassName, labelStyle, inputClassName, inputStyle, helperTextClassName, helperTextStyle, id, className, options, value, defaultValue, onChange, onSelect, onSearch, loading, noOptionsMessage = 'No options found', allowCustomValue, placeholder, onBlur, onFocus, ...rest }, ref) => {
872
+ var _a;
873
+ const generatedId = React.useId();
874
+ const listboxId = `ac-listbox-${generatedId}`;
875
+ const { inputId, helperId, labelProps, inputAriaProps } = useFormField({
876
+ id,
877
+ helperText,
878
+ errorMessage,
879
+ validationState,
880
+ required,
881
+ disabled,
882
+ });
883
+ const [isOpen, setIsOpen] = React.useState(false);
884
+ const [highlightedIndex, setHighlightedIndex] = React.useState(-1);
885
+ const [inputValue, setInputValue] = React.useState((_a = defaultValue) !== null && _a !== void 0 ? _a : '');
886
+ const isControlled = value !== undefined;
887
+ const currentInputValue = isControlled ? value : inputValue;
888
+ const wrapperRef = React.useRef(null);
889
+ const blurTimeoutRef = React.useRef(null);
890
+ const filteredOptions = options.filter((opt) => opt.label.toLowerCase().includes(currentInputValue.toLowerCase()));
891
+ const handleInputChange = React.useCallback((e) => {
892
+ const newVal = e.target.value;
893
+ if (!isControlled)
894
+ setInputValue(newVal);
895
+ onChange === null || onChange === void 0 ? void 0 : onChange(newVal);
896
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(newVal);
897
+ setIsOpen(true);
898
+ setHighlightedIndex(-1);
899
+ }, [isControlled, onChange, onSearch]);
900
+ const selectOption = React.useCallback((option) => {
901
+ if (option.disabled)
902
+ return;
903
+ if (!isControlled)
904
+ setInputValue(option.label);
905
+ onChange === null || onChange === void 0 ? void 0 : onChange(option.label);
906
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect(option);
907
+ setIsOpen(false);
908
+ setHighlightedIndex(-1);
909
+ }, [isControlled, onChange, onSelect]);
910
+ const handleKeyDown = React.useCallback((e) => {
911
+ if (!isOpen) {
912
+ if (e.key === 'ArrowDown' || e.key === 'Enter') {
913
+ setIsOpen(true);
914
+ }
915
+ return;
916
+ }
917
+ if (e.key === 'ArrowDown') {
918
+ e.preventDefault();
919
+ setHighlightedIndex((i) => Math.min(i + 1, filteredOptions.length - 1));
920
+ }
921
+ else if (e.key === 'ArrowUp') {
922
+ e.preventDefault();
923
+ setHighlightedIndex((i) => Math.max(i - 1, 0));
924
+ }
925
+ else if (e.key === 'Enter') {
926
+ e.preventDefault();
927
+ if (highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
928
+ selectOption(filteredOptions[highlightedIndex]);
929
+ }
930
+ else if (allowCustomValue) {
931
+ setIsOpen(false);
932
+ }
933
+ }
934
+ else if (e.key === 'Escape') {
935
+ setIsOpen(false);
936
+ setHighlightedIndex(-1);
937
+ }
938
+ }, [isOpen, filteredOptions, highlightedIndex, selectOption, allowCustomValue]);
939
+ const handleFocus = React.useCallback((e) => {
940
+ setIsOpen(true);
941
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
942
+ }, [onFocus]);
943
+ const handleBlur = React.useCallback((e) => {
944
+ // Clear any existing timeout
945
+ if (blurTimeoutRef.current) {
946
+ clearTimeout(blurTimeoutRef.current);
947
+ }
948
+ blurTimeoutRef.current = setTimeout(() => {
949
+ var _a;
950
+ if (!((_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement))) {
951
+ setIsOpen(false);
952
+ }
953
+ }, DROPDOWN_BLUR_DELAY_MS);
954
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
955
+ }, [onBlur]);
956
+ // Cleanup blur timeout on unmount
957
+ React.useEffect(() => {
958
+ return () => {
959
+ if (blurTimeoutRef.current) {
960
+ clearTimeout(blurTimeoutRef.current);
961
+ }
962
+ };
963
+ }, []);
964
+ // Close dropdown on outside click
965
+ React.useEffect(() => {
966
+ const handleClick = (e) => {
967
+ if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
968
+ setIsOpen(false);
969
+ }
970
+ };
971
+ document.addEventListener('mousedown', handleClick);
972
+ return () => document.removeEventListener('mousedown', handleClick);
973
+ }, []);
974
+ const activeMessage = getValidationMessage(validationState, errorMessage, successMessage, warningMessage, helperText);
975
+ const messageClass = getValidationMessageClass(validationState, styles$1);
976
+ const showDropdown = isOpen && !disabled && !readOnly;
977
+ return (jsxRuntime.jsxs("div", { ref: wrapperRef, className: classNames(styles$1.wrapper, styles$1[size], styles$1[variant], validationState !== 'default' ? styles$1[validationState] : undefined, fullWidth ? styles$1.fullWidth : undefined, wrapperClassName), style: wrapperStyle, children: [label && (jsxRuntime.jsx("label", { ...labelProps, className: classNames(styles$1.label, required ? styles$1.required : undefined, labelClassName), style: labelStyle, children: label })), jsxRuntime.jsxs("div", { className: styles$1.inputWrapper, children: [jsxRuntime.jsx("input", { ...rest, ...inputAriaProps, ref: ref, id: inputId, type: "text", disabled: disabled, readOnly: readOnly, required: required, placeholder: placeholder, value: currentInputValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur, role: "combobox", "aria-expanded": showDropdown, "aria-controls": listboxId, "aria-autocomplete": "list", "aria-activedescendant": highlightedIndex >= 0
978
+ ? `${listboxId}-option-${highlightedIndex}`
979
+ : undefined, className: classNames(styles$1.input, inputClassName, className), style: inputStyle }), jsxRuntime.jsx("span", { className: classNames(styles$1.chevron, showDropdown ? styles$1.chevronOpen : undefined), "aria-hidden": "true", children: "\u25BE" })] }), showDropdown && (jsxRuntime.jsx("ul", { id: listboxId, role: "listbox", className: styles$1.dropdown, "aria-label": label !== null && label !== void 0 ? label : 'Suggestions', children: loading ? (jsxRuntime.jsx("li", { className: styles$1.loading, children: "Loading\u2026" })) : filteredOptions.length === 0 ? (jsxRuntime.jsx("li", { className: styles$1.noOptions, children: noOptionsMessage })) : (filteredOptions.map((option, index) => (jsxRuntime.jsx("li", { id: `${listboxId}-option-${index}`, role: "option", "aria-selected": option.label === currentInputValue, "aria-disabled": option.disabled, className: classNames(styles$1.option, index === highlightedIndex ? styles$1.optionHighlighted : undefined, option.label === currentInputValue ? styles$1.optionSelected : undefined, option.disabled ? styles$1.optionDisabled : undefined), onMouseDown: (e) => {
980
+ e.preventDefault();
981
+ selectOption(option);
982
+ }, onMouseEnter: () => setHighlightedIndex(index), children: option.label }, option.value)))) })), activeMessage && (jsxRuntime.jsx("span", { id: helperId, className: classNames(messageClass, helperTextClassName), style: helperTextStyle, children: activeMessage }))] }));
983
+ });
984
+ AutoComplete.displayName = 'AutoComplete';
985
+
986
+ var css_248z = ".DataTable-module_wrapper__iB6ka {\n --dt-border-color: #d1d5db;\n --dt-bg-color: #ffffff;\n --dt-text-color: #111827;\n --dt-header-bg: #f9fafb;\n --dt-header-text: #374151;\n --dt-row-hover-bg: #f3f4f6;\n --dt-primary-color: #3b82f6;\n --dt-primary-focus-ring: rgba(59, 130, 246, 0.4);\n --dt-active-filter-color: #2563eb;\n --dt-dropdown-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n --dt-border-radius: 6px;\n --dt-font-family: inherit;\n font-family: var(--dt-font-family);\n color: var(--dt-text-color);\n display: block;\n}\n\n/* Horizontally scrollable container so wide tables don't break layout */\n.DataTable-module_tableContainer__-u5tn {\n width: 100%;\n overflow-x: auto;\n border: 1px solid var(--dt-border-color);\n border-radius: var(--dt-border-radius);\n}\n\n.DataTable-module_table__oL4Dz {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.875rem;\n background-color: var(--dt-bg-color);\n}\n\n/* ── Header ──────────────────────────────────────────── */\n\n.DataTable-module_th__jFpTv {\n padding: 10px 14px;\n text-align: left;\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--dt-header-text);\n background-color: var(--dt-header-bg);\n border-bottom: 1px solid var(--dt-border-color);\n white-space: nowrap;\n}\n\n.DataTable-module_thContent__J4j9A {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.DataTable-module_headerText__AzimD {\n flex: 1;\n}\n\n/* ── Filter button & dropdown ─────────────────────────── */\n\n.DataTable-module_filterContainer__ClpaH {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n\n.DataTable-module_filterButton__ndWCp {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: 1px solid transparent;\n border-radius: 4px;\n padding: 2px 4px;\n cursor: pointer;\n color: #9ca3af;\n line-height: 1;\n transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;\n}\n\n.DataTable-module_filterButton__ndWCp:hover {\n color: var(--dt-primary-color);\n background-color: #eff6ff;\n border-color: #bfdbfe;\n}\n\n.DataTable-module_filterButton__ndWCp:focus-visible {\n outline: none;\n box-shadow: 0 0 0 3px var(--dt-primary-focus-ring);\n}\n\n.DataTable-module_filterButtonActive__SmXd9 {\n color: var(--dt-active-filter-color);\n background-color: #dbeafe;\n border-color: #93c5fd;\n}\n\n.DataTable-module_filterArrow__dOd4L {\n font-size: 0.75rem;\n display: inline-block;\n transition: transform 0.15s ease;\n}\n\n.DataTable-module_filterArrowOpen__Xvy3v {\n transform: rotate(180deg);\n}\n\n.DataTable-module_filterDropdown__yA3MC {\n position: absolute;\n top: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n z-index: 1000;\n min-width: 160px;\n max-width: 260px;\n background-color: var(--dt-bg-color);\n border: 1px solid var(--dt-border-color);\n border-radius: var(--dt-border-radius);\n box-shadow: var(--dt-dropdown-shadow);\n padding: 4px 0;\n}\n\n.DataTable-module_filterList__jWtZQ {\n list-style: none;\n margin: 0;\n padding: 4px 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n.DataTable-module_filterItem__-zo0D {\n padding: 0;\n}\n\n.DataTable-module_filterLabel__RHEuV {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 12px;\n cursor: pointer;\n font-size: 0.8125rem;\n color: var(--dt-text-color);\n transition: background-color 0.1s ease;\n user-select: none;\n}\n\n.DataTable-module_filterLabel__RHEuV:hover {\n background-color: #eff6ff;\n}\n\n.DataTable-module_filterCheckbox__eN71a {\n width: 15px;\n height: 15px;\n accent-color: var(--dt-primary-color);\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.DataTable-module_filterValueText__REuyI {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.DataTable-module_filterEmpty__hEO-0 {\n padding: 10px 12px;\n font-size: 0.8125rem;\n color: #9ca3af;\n text-align: center;\n}\n\n.DataTable-module_filterActions__6FvQn {\n border-top: 1px solid var(--dt-border-color);\n padding: 6px 8px;\n display: flex;\n justify-content: flex-end;\n}\n\n.DataTable-module_clearButton__bp2du {\n background: none;\n border: none;\n font-size: 0.75rem;\n color: var(--dt-primary-color);\n cursor: pointer;\n padding: 2px 6px;\n border-radius: 4px;\n transition: background-color 0.1s ease;\n}\n\n.DataTable-module_clearButton__bp2du:hover {\n background-color: #eff6ff;\n}\n\n.DataTable-module_clearButton__bp2du:focus-visible {\n outline: none;\n box-shadow: 0 0 0 3px var(--dt-primary-focus-ring);\n}\n\n/* ── Body ─────────────────────────────────────────────── */\n\n.DataTable-module_tr__t3OSd {\n transition: background-color 0.1s ease;\n}\n\n.DataTable-module_tr__t3OSd:hover {\n background-color: var(--dt-row-hover-bg);\n}\n\n.DataTable-module_tr__t3OSd:not(:last-child) {\n border-bottom: 1px solid var(--dt-border-color);\n}\n\n.DataTable-module_td__kjyJu {\n padding: 10px 14px;\n vertical-align: middle;\n color: var(--dt-text-color);\n font-size: 0.875rem;\n}\n\n/* ── Empty state ─────────────────────────────────────── */\n\n.DataTable-module_emptyCell__JORLK {\n padding: 24px 14px;\n text-align: center;\n color: #9ca3af;\n font-size: 0.875rem;\n}\n";
987
+ var styles = {"wrapper":"DataTable-module_wrapper__iB6ka","tableContainer":"DataTable-module_tableContainer__-u5tn","table":"DataTable-module_table__oL4Dz","th":"DataTable-module_th__jFpTv","thContent":"DataTable-module_thContent__J4j9A","headerText":"DataTable-module_headerText__AzimD","filterContainer":"DataTable-module_filterContainer__ClpaH","filterButton":"DataTable-module_filterButton__ndWCp","filterButtonActive":"DataTable-module_filterButtonActive__SmXd9","filterArrow":"DataTable-module_filterArrow__dOd4L","filterArrowOpen":"DataTable-module_filterArrowOpen__Xvy3v","filterDropdown":"DataTable-module_filterDropdown__yA3MC","filterList":"DataTable-module_filterList__jWtZQ","filterItem":"DataTable-module_filterItem__-zo0D","filterLabel":"DataTable-module_filterLabel__RHEuV","filterCheckbox":"DataTable-module_filterCheckbox__eN71a","filterValueText":"DataTable-module_filterValueText__REuyI","filterEmpty":"DataTable-module_filterEmpty__hEO-0","filterActions":"DataTable-module_filterActions__6FvQn","clearButton":"DataTable-module_clearButton__bp2du","tr":"DataTable-module_tr__t3OSd","td":"DataTable-module_td__kjyJu","emptyCell":"DataTable-module_emptyCell__JORLK"};
988
+ styleInject(css_248z);
989
+
990
+ function DataTable({ columns, data, rowKey, className, style, emptyMessage = 'No data available', }) {
991
+ /** Key of the column whose filter dropdown is currently open */
992
+ const [openFilterKey, setOpenFilterKey] = React.useState(null);
993
+ /**
994
+ * Active filter selections: maps column key → array of selected string values.
995
+ * An empty (or absent) array means "no filter applied" for that column.
996
+ */
997
+ const [activeFilters, setActiveFilters] = React.useState({});
998
+ const wrapperRef = React.useRef(null);
999
+ /** Close the open dropdown when user clicks outside the table wrapper */
1000
+ React.useEffect(() => {
1001
+ const handleOutsideClick = (e) => {
1002
+ if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
1003
+ setOpenFilterKey(null);
1004
+ }
1005
+ };
1006
+ document.addEventListener('mousedown', handleOutsideClick);
1007
+ return () => document.removeEventListener('mousedown', handleOutsideClick);
1008
+ }, []);
1009
+ /** Returns sorted unique string values for a given column key from ALL rows */
1010
+ const getUniqueValues = React.useCallback((key) => {
1011
+ const seen = new Set();
1012
+ data.forEach((row) => { var _a; return seen.add(String((_a = row[key]) !== null && _a !== void 0 ? _a : '')); });
1013
+ return Array.from(seen).sort((a, b) => a.localeCompare(b));
1014
+ }, [data]);
1015
+ /** Toggle the filter dropdown for a column */
1016
+ const toggleFilterDropdown = React.useCallback((key) => {
1017
+ setOpenFilterKey((prev) => (prev === key ? null : key));
1018
+ }, []);
1019
+ /** Toggle a single checkbox value inside a column's filter */
1020
+ const toggleFilterValue = React.useCallback((columnKey, value) => {
1021
+ setActiveFilters((prev) => {
1022
+ var _a;
1023
+ const current = (_a = prev[columnKey]) !== null && _a !== void 0 ? _a : [];
1024
+ const next = current.includes(value)
1025
+ ? current.filter((v) => v !== value)
1026
+ : [...current, value];
1027
+ return { ...prev, [columnKey]: next };
1028
+ });
1029
+ }, []);
1030
+ /** Clear all selected values for a column filter */
1031
+ const clearFilter = React.useCallback((columnKey) => {
1032
+ setActiveFilters((prev) => ({ ...prev, [columnKey]: [] }));
1033
+ }, []);
1034
+ /** Rows after applying all active filters (AND across columns, OR within a column) */
1035
+ const filteredData = React.useMemo(() => {
1036
+ return data.filter((row) => columns.every((col) => {
1037
+ var _a;
1038
+ if (!col.filterable)
1039
+ return true;
1040
+ const selected = activeFilters[col.key];
1041
+ if (!selected || selected.length === 0)
1042
+ return true;
1043
+ return selected.includes(String((_a = row[col.key]) !== null && _a !== void 0 ? _a : ''));
1044
+ }));
1045
+ }, [data, columns, activeFilters]);
1046
+ return (jsxRuntime.jsx("div", { ref: wrapperRef, className: classNames(styles.wrapper, className), style: style, children: jsxRuntime.jsx("div", { className: styles.tableContainer, children: jsxRuntime.jsxs("table", { className: styles.table, children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsx("tr", { children: columns.map((col) => {
1047
+ var _a;
1048
+ const isOpen = openFilterKey === col.key;
1049
+ const selectedValues = (_a = activeFilters[col.key]) !== null && _a !== void 0 ? _a : [];
1050
+ const isActive = selectedValues.length > 0;
1051
+ const uniqueValues = col.filterable ? getUniqueValues(col.key) : [];
1052
+ return (jsxRuntime.jsx("th", { className: styles.th, style: col.width === undefined ? undefined : { width: col.width }, children: jsxRuntime.jsxs("div", { className: styles.thContent, children: [jsxRuntime.jsx("span", { className: styles.headerText, children: col.header }), col.filterable && (jsxRuntime.jsxs("div", { className: styles.filterContainer, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": `Filter by ${col.header}`, "aria-expanded": isOpen, "aria-haspopup": "listbox", className: classNames(styles.filterButton, isActive ? styles.filterButtonActive : undefined), onClick: () => toggleFilterDropdown(col.key), children: jsxRuntime.jsx("span", { className: classNames(styles.filterArrow, isOpen ? styles.filterArrowOpen : undefined), "aria-hidden": "true", children: "\u25BE" }) }), isOpen && (jsxRuntime.jsxs("div", { className: styles.filterDropdown, role: "dialog", "aria-label": `Filter options for ${col.header}`, children: [jsxRuntime.jsx("ul", { className: styles.filterList, role: "listbox", children: uniqueValues.length === 0 ? (jsxRuntime.jsx("li", { className: styles.filterEmpty, children: "No options" })) : (uniqueValues.map((val, valIndex) => {
1053
+ const checked = selectedValues.includes(val);
1054
+ const checkboxId = `dt-filter-${col.key}-${valIndex}`;
1055
+ return (jsxRuntime.jsx("li", { className: styles.filterItem, children: jsxRuntime.jsxs("label", { htmlFor: checkboxId, className: styles.filterLabel, children: [jsxRuntime.jsx("input", { id: checkboxId, type: "checkbox", checked: checked, onChange: () => toggleFilterValue(col.key, val), className: styles.filterCheckbox }), jsxRuntime.jsx("span", { className: styles.filterValueText, children: val })] }) }, val));
1056
+ })) }), selectedValues.length > 0 && (jsxRuntime.jsx("div", { className: styles.filterActions, children: jsxRuntime.jsx("button", { type: "button", className: styles.clearButton, onClick: () => clearFilter(col.key), children: "Clear" }) }))] }))] }))] }) }, col.key));
1057
+ }) }) }), jsxRuntime.jsx("tbody", { children: filteredData.length === 0 ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles.emptyCell, children: emptyMessage }) })) : (filteredData.map((row, rowIndex) => (jsxRuntime.jsx("tr", { className: styles.tr, children: columns.map((col) => {
1058
+ var _a;
1059
+ return (jsxRuntime.jsx("td", { className: styles.td, children: col.render
1060
+ ? col.render(row[col.key], row)
1061
+ : String((_a = row[col.key]) !== null && _a !== void 0 ? _a : '') }, col.key));
1062
+ }) }, rowKey ? rowKey(row, rowIndex) : rowIndex)))) })] }) }) }));
1063
+ }
1064
+ DataTable.displayName = 'DataTable';
1065
+
1066
+ const ThemeContext = React.createContext({ theme: {} });
1067
+ function ThemeProvider({ theme, children }) {
1068
+ const cssVars = {};
1069
+ if (theme.primaryColor)
1070
+ cssVars['--input-primary-color'] = theme.primaryColor;
1071
+ if (theme.errorColor)
1072
+ cssVars['--input-error-color'] = theme.errorColor;
1073
+ if (theme.successColor)
1074
+ cssVars['--input-success-color'] = theme.successColor;
1075
+ if (theme.warningColor)
1076
+ cssVars['--input-warning-color'] = theme.warningColor;
1077
+ if (theme.borderRadius)
1078
+ cssVars['--input-border-radius'] = theme.borderRadius;
1079
+ if (theme.fontFamily)
1080
+ cssVars['--input-font-family'] = theme.fontFamily;
1081
+ if (theme.fontSize)
1082
+ cssVars['--input-font-size'] = theme.fontSize;
1083
+ if (theme.borderColor)
1084
+ cssVars['--input-border-color'] = theme.borderColor;
1085
+ if (theme.bgColor)
1086
+ cssVars['--input-bg-color'] = theme.bgColor;
1087
+ if (theme.textColor)
1088
+ cssVars['--input-text-color'] = theme.textColor;
1089
+ if (theme.placeholderColor)
1090
+ cssVars['--input-placeholder-color'] = theme.placeholderColor;
1091
+ if (theme.focusRingColor)
1092
+ cssVars['--input-focus-ring-color'] = theme.focusRingColor;
1093
+ if (theme.disabledBg)
1094
+ cssVars['--input-disabled-bg'] = theme.disabledBg;
1095
+ if (theme.disabledText)
1096
+ cssVars['--input-disabled-text'] = theme.disabledText;
1097
+ return (jsxRuntime.jsx(ThemeContext.Provider, { value: { theme }, children: jsxRuntime.jsx("div", { style: cssVars, children: children }) }));
1098
+ }
1099
+ function useTheme() {
1100
+ return React.useContext(ThemeContext);
1101
+ }
1102
+
1103
+ exports.AutoComplete = AutoComplete;
1104
+ exports.Checkbox = Checkbox;
1105
+ exports.CheckboxGroup = CheckboxGroup;
1106
+ exports.ColorInput = ColorInput;
1107
+ exports.DataTable = DataTable;
1108
+ exports.DateInput = DateInput;
1109
+ exports.FileInput = FileInput;
1110
+ exports.NumberInput = NumberInput;
1111
+ exports.OTPInput = OTPInput;
1112
+ exports.PasswordInput = PasswordInput;
1113
+ exports.PhoneInput = PhoneInput;
1114
+ exports.RadioGroup = RadioGroup;
1115
+ exports.RangeInput = RangeInput;
1116
+ exports.SearchInput = SearchInput;
1117
+ exports.SelectInput = SelectInput;
1118
+ exports.TextArea = TextArea;
1119
+ exports.TextInput = TextInput;
1120
+ exports.ThemeProvider = ThemeProvider;
1121
+ exports.TimeInput = TimeInput;
1122
+ exports.Toggle = Toggle;
1123
+ exports.useControllable = useControllable;
1124
+ exports.useFormField = useFormField;
1125
+ exports.useTheme = useTheme;
1126
+ //# sourceMappingURL=index.js.map