@taiv/ui 1.3.2 → 1.4.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 (205) hide show
  1. package/dist/components/Data/Cards/ChartCard.d.ts +2 -1
  2. package/dist/components/Data/Cards/ChartCard.d.ts.map +1 -1
  3. package/dist/components/Data/Cards/ChartCard.js +6 -4
  4. package/dist/components/Data/Cards/PieChartCard.d.ts +2 -1
  5. package/dist/components/Data/Cards/PieChartCard.d.ts.map +1 -1
  6. package/dist/components/Data/Cards/PieChartCard.js +6 -4
  7. package/dist/components/Data/Cards/StatsCard.d.ts +1 -1
  8. package/dist/components/Data/Cards/StatsCard.d.ts.map +1 -1
  9. package/dist/components/Data/Cards/StatsCard.js +4 -4
  10. package/dist/components/Data/Chart.js +4 -4
  11. package/dist/components/Data/CheckboxTable.d.ts +1 -1
  12. package/dist/components/Data/CheckboxTable.d.ts.map +1 -1
  13. package/dist/components/Data/CheckboxTable.js +6 -6
  14. package/dist/components/Data/PieChart.js +4 -4
  15. package/dist/components/Info/InfoCard.d.ts +1 -1
  16. package/dist/components/Info/InfoCard.d.ts.map +1 -1
  17. package/dist/components/Info/InfoCard.js +2 -2
  18. package/dist/components/Info/Modals/Modal.js +2 -2
  19. package/dist/components/Info/Notifications/variants.js +1 -1
  20. package/dist/components/Info/Tooltips/FormulaTooltip.js +3 -3
  21. package/dist/components/Info/Tooltips/InfoTooltip.d.ts +16 -1
  22. package/dist/components/Info/Tooltips/InfoTooltip.d.ts.map +1 -1
  23. package/dist/components/Info/Tooltips/InfoTooltip.js +18 -4
  24. package/dist/components/Inputs/Buttons/Button/Button.d.ts +12 -0
  25. package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -0
  26. package/dist/components/Inputs/Buttons/Button/Button.js +37 -0
  27. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +11 -0
  28. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -0
  29. package/dist/components/Inputs/Buttons/Button/Button.stories.js +176 -0
  30. package/dist/components/Inputs/Buttons/Button/sizes.d.ts +25 -0
  31. package/dist/components/Inputs/Buttons/Button/sizes.d.ts.map +1 -0
  32. package/dist/components/Inputs/Buttons/Button/sizes.js +7 -0
  33. package/dist/components/Inputs/Buttons/Button/variants.d.ts +191 -0
  34. package/dist/components/Inputs/Buttons/Button/variants.d.ts.map +1 -0
  35. package/dist/components/Inputs/Buttons/Button/variants.js +191 -0
  36. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts +10 -0
  37. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts.map +1 -0
  38. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.js +6 -0
  39. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts +8 -0
  40. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts.map +1 -0
  41. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.js +97 -0
  42. package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts +27 -0
  43. package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts.map +1 -0
  44. package/dist/components/Inputs/Controls/Checkbox/Checkbox.js +55 -0
  45. package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.d.ts +10 -0
  46. package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.d.ts.map +1 -0
  47. package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.js +154 -0
  48. package/dist/components/Inputs/Controls/Radio/Radio.d.ts +8 -0
  49. package/dist/components/Inputs/Controls/Radio/Radio.d.ts.map +1 -0
  50. package/dist/components/Inputs/Controls/Radio/Radio.js +43 -0
  51. package/dist/components/Inputs/Controls/Radio/Radio.stories.d.ts +10 -0
  52. package/dist/components/Inputs/Controls/Radio/Radio.stories.d.ts.map +1 -0
  53. package/dist/components/Inputs/Controls/Radio/Radio.stories.js +143 -0
  54. package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts +16 -0
  55. package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -0
  56. package/dist/components/Inputs/Controls/RadioList/RadioList.js +24 -0
  57. package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts +11 -0
  58. package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts.map +1 -0
  59. package/dist/components/Inputs/Controls/RadioList/RadioList.stories.js +138 -0
  60. package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +29 -0
  61. package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts.map +1 -0
  62. package/dist/components/Inputs/Controls/Toggle/Toggle.js +40 -0
  63. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts +11 -0
  64. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts.map +1 -0
  65. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +179 -0
  66. package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts +12 -0
  67. package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -0
  68. package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +74 -0
  69. package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.d.ts +12 -0
  70. package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.d.ts.map +1 -0
  71. package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.js +203 -0
  72. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts +17 -0
  73. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -0
  74. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.js +70 -0
  75. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.d.ts +14 -0
  76. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.d.ts.map +1 -0
  77. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.js +362 -0
  78. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts +11 -0
  79. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts.map +1 -0
  80. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +48 -0
  81. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.d.ts +12 -0
  82. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.d.ts.map +1 -0
  83. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.js +215 -0
  84. package/dist/components/Inputs/Dropdowns/FontSelect/font-options.d.ts +9 -0
  85. package/dist/components/Inputs/Dropdowns/FontSelect/font-options.d.ts.map +1 -0
  86. package/dist/components/Inputs/Dropdowns/FontSelect/font-options.js +65 -0
  87. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts +12 -0
  88. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -0
  89. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +94 -0
  90. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.d.ts +12 -0
  91. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
  92. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.js +260 -0
  93. package/dist/components/Inputs/Dropdowns/Select/Select.d.ts +11 -0
  94. package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -0
  95. package/dist/components/Inputs/Dropdowns/Select/Select.js +62 -0
  96. package/dist/components/Inputs/Dropdowns/Select/Select.stories.d.ts +12 -0
  97. package/dist/components/Inputs/Dropdowns/Select/Select.stories.d.ts.map +1 -0
  98. package/dist/components/Inputs/Dropdowns/Select/Select.stories.js +242 -0
  99. package/dist/components/Inputs/Sliders/Slider/Slider.d.ts +16 -0
  100. package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -0
  101. package/dist/components/Inputs/Sliders/Slider/Slider.js +91 -0
  102. package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts +6 -0
  103. package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -0
  104. package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.js +37 -0
  105. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts +11 -0
  106. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -0
  107. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.js +57 -0
  108. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.d.ts +12 -0
  109. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.d.ts.map +1 -0
  110. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.js +218 -0
  111. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts +12 -0
  112. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts.map +1 -0
  113. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.js +52 -0
  114. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.d.ts +12 -0
  115. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.d.ts.map +1 -0
  116. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.js +235 -0
  117. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts +7 -0
  118. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -0
  119. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.js +23 -0
  120. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.d.ts +12 -0
  121. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.d.ts.map +1 -0
  122. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.js +202 -0
  123. package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts +12 -0
  124. package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -0
  125. package/dist/components/Inputs/TextInputs/TextArea/TextArea.js +33 -0
  126. package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.d.ts +12 -0
  127. package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.d.ts.map +1 -0
  128. package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.js +231 -0
  129. package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts +12 -0
  130. package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts.map +1 -0
  131. package/dist/components/Inputs/TextInputs/TextInput/TextInput.js +32 -0
  132. package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.d.ts +12 -0
  133. package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.d.ts.map +1 -0
  134. package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.js +219 -0
  135. package/dist/components/Layout/AutoGrid/AutoGrid.d.ts +8 -0
  136. package/dist/components/Layout/AutoGrid/AutoGrid.d.ts.map +1 -0
  137. package/dist/components/Layout/AutoGrid/AutoGrid.js +6 -0
  138. package/dist/components/Layout/Box/Box.d.ts +10 -0
  139. package/dist/components/Layout/Box/Box.d.ts.map +1 -0
  140. package/dist/components/Layout/Box/Box.js +6 -0
  141. package/dist/components/Layout/Box/Box.stories.d.ts +9 -0
  142. package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -0
  143. package/dist/components/Layout/Box/Box.stories.js +121 -0
  144. package/dist/components/Layout/Card/Card.d.ts +8 -0
  145. package/dist/components/Layout/Card/Card.d.ts.map +1 -0
  146. package/dist/components/Layout/Card/Card.js +16 -0
  147. package/dist/components/Layout/Center/Center.d.ts +9 -0
  148. package/dist/components/Layout/Center/Center.d.ts.map +1 -0
  149. package/dist/components/Layout/Center/Center.js +6 -0
  150. package/dist/components/Layout/Divider/Divider.d.ts +10 -0
  151. package/dist/components/Layout/Divider/Divider.d.ts.map +1 -0
  152. package/dist/components/Layout/Divider/Divider.js +7 -0
  153. package/dist/components/Layout/Frame/Frame.d.ts +12 -0
  154. package/dist/components/Layout/Frame/Frame.d.ts.map +1 -0
  155. package/dist/components/Layout/Frame/Frame.js +7 -0
  156. package/dist/components/Layout/Grid/Grid.d.ts +10 -0
  157. package/dist/components/Layout/Grid/Grid.d.ts.map +1 -0
  158. package/dist/components/Layout/Grid/Grid.js +9 -0
  159. package/dist/components/Layout/Group/Group.d.ts +10 -0
  160. package/dist/components/Layout/Group/Group.d.ts.map +1 -0
  161. package/dist/components/Layout/Group/Group.js +6 -0
  162. package/dist/components/Layout/Loader/Loader.d.ts +8 -0
  163. package/dist/components/Layout/Loader/Loader.d.ts.map +1 -0
  164. package/dist/components/Layout/Loader/Loader.js +6 -0
  165. package/dist/components/Layout/SectionCard/SectionCard.d.ts +11 -0
  166. package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -0
  167. package/dist/components/Layout/SectionCard/SectionCard.js +13 -0
  168. package/dist/components/Layout/Stack/Stack.d.ts +10 -0
  169. package/dist/components/Layout/Stack/Stack.d.ts.map +1 -0
  170. package/dist/components/Layout/Stack/Stack.js +6 -0
  171. package/dist/components/Layout/Stack/Stack.stories.d.ts +9 -0
  172. package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -0
  173. package/dist/components/Layout/Stack/Stack.stories.js +108 -0
  174. package/dist/components/Layout/Tabs/Tabs.d.ts +17 -0
  175. package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -0
  176. package/dist/components/Layout/Tabs/Tabs.js +48 -0
  177. package/dist/components/Misc/IconBadge/IconBadge.d.ts +8 -0
  178. package/dist/components/Misc/IconBadge/IconBadge.d.ts.map +1 -0
  179. package/dist/components/Misc/IconBadge/IconBadge.js +28 -0
  180. package/dist/components/Misc/Transition/Transition.d.ts +4 -0
  181. package/dist/components/Misc/Transition/Transition.d.ts.map +1 -0
  182. package/dist/components/Misc/Transition/Transition.js +6 -0
  183. package/dist/components/Typography/CollapsibleText.js +4 -4
  184. package/dist/components/Typography/Formula.d.ts.map +1 -1
  185. package/dist/components/Typography/Formula.js +2 -6
  186. package/dist/components/Typography/Fraction.js +2 -2
  187. package/dist/components/Typography/Text.d.ts.map +1 -1
  188. package/dist/components/Typography/Text.js +0 -2
  189. package/dist/components/index.d.ts +32 -32
  190. package/dist/components/index.d.ts.map +1 -1
  191. package/dist/components/index.js +32 -32
  192. package/dist/constants/index.d.ts +1 -0
  193. package/dist/constants/index.d.ts.map +1 -1
  194. package/dist/constants/index.js +1 -0
  195. package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
  196. package/dist/hooks/useConfirmationModal.js +6 -6
  197. package/dist/hooks/useInfoModal.d.ts.map +1 -1
  198. package/dist/hooks/useInfoModal.js +4 -4
  199. package/dist/utils/index.d.ts +1 -1
  200. package/dist/utils/index.d.ts.map +1 -1
  201. package/dist/utils/index.js +1 -1
  202. package/dist/utils/select.d.ts +1 -0
  203. package/dist/utils/select.d.ts.map +1 -1
  204. package/dist/utils/select.js +18 -0
  205. package/package.json +10 -2
@@ -0,0 +1,218 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { AutoComplete } from './AutoComplete';
3
+ import { Group } from '../../../Layout/Group/Group';
4
+ const meta = {
5
+ title: 'Components/Inputs/TextInputs/AutoComplete',
6
+ component: AutoComplete,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ argTypes: {
11
+ size: {
12
+ control: { type: 'select' },
13
+ options: ['sm', 'md', 'lg'],
14
+ description: 'Controls the autocomplete size',
15
+ table: {
16
+ type: { summary: "'sm' | 'md' | 'lg'" },
17
+ defaultValue: { summary: "'md'" },
18
+ },
19
+ },
20
+ placeholder: {
21
+ control: { type: 'text' },
22
+ description: 'Placeholder text',
23
+ table: {
24
+ type: { summary: 'string' },
25
+ defaultValue: { summary: "'Select an option'" },
26
+ },
27
+ },
28
+ label: {
29
+ control: { type: 'text' },
30
+ description: 'Autocomplete label',
31
+ table: {
32
+ type: { summary: 'string' },
33
+ },
34
+ },
35
+ description: {
36
+ control: { type: 'text' },
37
+ description: 'Description text',
38
+ table: {
39
+ type: { summary: 'string' },
40
+ },
41
+ },
42
+ error: {
43
+ control: { type: 'text' },
44
+ description: 'Error message',
45
+ table: {
46
+ type: { summary: 'string' },
47
+ },
48
+ },
49
+ disabled: {
50
+ control: { type: 'boolean' },
51
+ description: 'Disabled state',
52
+ table: {
53
+ type: { summary: 'boolean' },
54
+ defaultValue: { summary: 'false' },
55
+ },
56
+ },
57
+ required: {
58
+ control: { type: 'boolean' },
59
+ description: 'Required field',
60
+ table: {
61
+ type: { summary: 'boolean' },
62
+ defaultValue: { summary: 'false' },
63
+ },
64
+ },
65
+ fullWidth: {
66
+ control: { type: 'boolean' },
67
+ description: 'Full width of container',
68
+ table: {
69
+ type: { summary: 'boolean' },
70
+ defaultValue: { summary: 'false' },
71
+ },
72
+ },
73
+ width: {
74
+ control: { type: 'text' },
75
+ description: 'Custom width',
76
+ table: {
77
+ type: { summary: 'string | number' },
78
+ },
79
+ },
80
+ data: {
81
+ control: { type: 'object' },
82
+ description: 'Autocomplete data array',
83
+ table: {
84
+ type: { summary: 'string[] | AutocompleteItem[]' },
85
+ },
86
+ },
87
+ styles: {
88
+ control: { type: 'object' },
89
+ description: 'Custom styles object',
90
+ table: {
91
+ type: { summary: 'Record<string, CSSObject>' },
92
+ },
93
+ },
94
+ onChange: {
95
+ action: 'changed',
96
+ description: 'Change handler function',
97
+ table: {
98
+ type: { summary: '(value: string) => void' },
99
+ },
100
+ },
101
+ },
102
+ };
103
+ export default meta;
104
+ const basicOptions = ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry', 'Fig', 'Grape', 'Honeydew'];
105
+ const countryOptions = ['United States', 'Canada', 'United Kingdom', 'Germany', 'France', 'Japan', 'Australia', 'Brazil', 'India', 'China'];
106
+ export const Default = {
107
+ args: {
108
+ data: basicOptions,
109
+ size: 'md',
110
+ disabled: false,
111
+ required: false,
112
+ fullWidth: false,
113
+ },
114
+ decorators: [
115
+ (Story) => (_jsx("div", { style: { height: '220px' }, children: _jsx(Story, {}) })),
116
+ ],
117
+ parameters: {
118
+ docs: {
119
+ source: {
120
+ code: `<AutoComplete
121
+ data={['Apple', 'Banana', 'Cherry', 'Date']}
122
+ value={selectedValue}
123
+ onChange={setSelectedValue}
124
+ />`,
125
+ },
126
+ },
127
+ },
128
+ };
129
+ export const Variants = {
130
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(AutoComplete, { label: "Basic AutoComplete", data: basicOptions }), _jsx(AutoComplete, { label: "With Placeholder", placeholder: "Search fruits...", data: basicOptions }), _jsx(AutoComplete, { label: "With Description", description: "Select your favorite fruit", data: basicOptions })] })),
131
+ parameters: {
132
+ docs: {
133
+ source: {
134
+ code: false,
135
+ },
136
+ },
137
+ },
138
+ };
139
+ export const Sizes = {
140
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(AutoComplete, { size: "sm", label: "Small AutoComplete", data: basicOptions }), _jsx(AutoComplete, { size: "md", label: "Medium AutoComplete (Default)", data: basicOptions }), _jsx(AutoComplete, { size: "lg", label: "Large AutoComplete", data: basicOptions })] })),
141
+ parameters: {
142
+ docs: {
143
+ source: {
144
+ code: `<AutoComplete size="sm" label="Small AutoComplete" data={options} />
145
+ <AutoComplete size="lg" label="Large AutoComplete" data={options} />`,
146
+ },
147
+ },
148
+ },
149
+ };
150
+ export const States = {
151
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(AutoComplete, { label: "Normal AutoComplete", data: basicOptions }), _jsx(AutoComplete, { label: "Disabled AutoComplete", data: basicOptions, disabled: true }), _jsx(AutoComplete, { label: "Required AutoComplete", data: basicOptions, required: true }), _jsx(AutoComplete, { label: "AutoComplete with Description", description: "Please select an option", data: basicOptions }), _jsx(AutoComplete, { label: "AutoComplete with Error", error: "This field is required", data: basicOptions })] })),
152
+ parameters: {
153
+ docs: {
154
+ source: {
155
+ code: false,
156
+ },
157
+ },
158
+ },
159
+ };
160
+ export const AdditionalFunctionality = {
161
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(AutoComplete, { label: "Country Search", data: countryOptions, placeholder: "Search countries..." }), _jsx(AutoComplete, { label: "Custom Width AutoComplete", width: "300px", data: basicOptions }), _jsx(AutoComplete, { label: "Large Dataset", data: Array.from({ length: 50 }, (_, i) => `Option ${i + 1}`), placeholder: "Search options..." })] })),
162
+ parameters: {
163
+ docs: {
164
+ source: {
165
+ code: `<AutoComplete
166
+ label="Country Search"
167
+ data={['United States', 'Canada', 'United Kingdom']}
168
+ placeholder="Search countries..."
169
+ value={selectedCountry}
170
+ onChange={setSelectedCountry}
171
+ />
172
+
173
+ <AutoComplete
174
+ label="Custom Width AutoComplete"
175
+ width="300px"
176
+ data={options}
177
+ value={selectedValue}
178
+ onChange={setSelectedValue}
179
+ />`,
180
+ },
181
+ },
182
+ },
183
+ };
184
+ export const CustomStyling = {
185
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(AutoComplete, { label: "Custom Styled AutoComplete", data: basicOptions, styles: {
186
+ input: {
187
+ borderColor: '#ff6b6b',
188
+ '&:focus': {
189
+ borderColor: '#ff6b6b',
190
+ boxShadow: '0 0 0 2px rgba(255, 107, 107, 0.2)',
191
+ },
192
+ },
193
+ label: {
194
+ color: '#ff6b6b',
195
+ fontWeight: 600,
196
+ },
197
+ } }), _jsx(AutoComplete, { label: "Another Custom Style", data: basicOptions, styles: {
198
+ input: {
199
+ backgroundColor: '#f8f9fa',
200
+ borderColor: '#4CAF50',
201
+ '&:focus': {
202
+ borderColor: '#4CAF50',
203
+ boxShadow: '0 0 0 2px rgba(76, 175, 80, 0.2)',
204
+ },
205
+ },
206
+ label: {
207
+ color: '#4CAF50',
208
+ fontSize: '16px',
209
+ },
210
+ } })] })),
211
+ parameters: {
212
+ docs: {
213
+ source: {
214
+ code: false,
215
+ },
216
+ },
217
+ },
218
+ };
@@ -0,0 +1,12 @@
1
+ import { PasswordInputProps as MantinePasswordInputProps } from '@mantine/core';
2
+ import { CSSObject } from '@mantine/styles';
3
+ import { componentSizes } from '../shared/sizes';
4
+ type PasswordInputProps = MantinePasswordInputProps & {
5
+ size?: keyof typeof componentSizes;
6
+ width?: string | number;
7
+ fullWidth?: boolean;
8
+ styles?: Record<string, CSSObject>;
9
+ };
10
+ declare const PasswordInput: ({ size, width, fullWidth, styles, placeholder, ...props }: PasswordInputProps) => import("react/jsx-runtime").JSX.Element;
11
+ export { PasswordInput };
12
+ //# sourceMappingURL=PasswordInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyC,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AASjD,KAAK,kBAAkB,GAAG,yBAAyB,GAAG;IACpD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,2DAA6F,kBAAkB,4CAyCrI,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PasswordInput as MantinePasswordInput } from '@mantine/core';
3
+ import { neutral } from '../../../../constants/colors';
4
+ import { fontBase } from '../../../../constants/font';
5
+ import { componentSizes } from '../shared/sizes';
6
+ // Workaround for Icon sizing since we dont have a Provider setup
7
+ const mantineSize = {
8
+ sm: 'lg',
9
+ md: 'xl',
10
+ lg: 'xl',
11
+ };
12
+ const PasswordInput = ({ size = 'md', width, fullWidth = false, styles, placeholder = 'Enter password', ...props }) => {
13
+ const selectedSize = componentSizes[size];
14
+ const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
15
+ const style = {
16
+ input: {
17
+ ...fontBase,
18
+ color: neutral[200],
19
+ transition: 'all 200ms ease-in-out',
20
+ borderRadius: '8px',
21
+ height: `${selectedSize.height}rem`,
22
+ fontSize: selectedSize.fontSize,
23
+ padding: '0 1rem',
24
+ },
25
+ label: {
26
+ ...fontBase,
27
+ color: neutral[200],
28
+ fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
29
+ },
30
+ error: {
31
+ ...fontBase,
32
+ fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
33
+ },
34
+ innerInput: {
35
+ ...fontBase,
36
+ color: neutral[200],
37
+ height: `${selectedSize.height}rem`,
38
+ fontSize: selectedSize.fontSize,
39
+ padding: '0 1rem',
40
+ },
41
+ visibilityToggle: {
42
+ color: neutral[200],
43
+ marginRight: '1.25rem',
44
+ '&:hover': {
45
+ backgroundColor: 'transparent',
46
+ },
47
+ },
48
+ ...styles,
49
+ };
50
+ return _jsx(MantinePasswordInput, { w: computedWidth, ...props, placeholder: placeholder, size: mantineSize[size], styles: style });
51
+ };
52
+ export { PasswordInput };
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { PasswordInput } from './PasswordInput';
3
+ declare const meta: Meta<typeof PasswordInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Variants: Story;
8
+ export declare const Sizes: Story;
9
+ export declare const States: Story;
10
+ export declare const AdditionalFunctionality: Story;
11
+ export declare const CustomStyling: Story;
12
+ //# sourceMappingURL=PasswordInput.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAiHpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAiBpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KA6BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAmD3B,CAAC"}
@@ -0,0 +1,235 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PasswordInput } from './PasswordInput';
3
+ import { Group } from '../../../Layout/Group/Group';
4
+ const meta = {
5
+ title: 'Components/Inputs/TextInputs/PasswordInput',
6
+ component: PasswordInput,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ argTypes: {
11
+ size: {
12
+ control: { type: 'select' },
13
+ options: ['sm', 'md', 'lg'],
14
+ description: 'Controls the password input size',
15
+ table: {
16
+ type: { summary: "'sm' | 'md' | 'lg'" },
17
+ defaultValue: { summary: "'md'" },
18
+ },
19
+ },
20
+ placeholder: {
21
+ control: { type: 'text' },
22
+ description: 'Placeholder text',
23
+ table: {
24
+ type: { summary: 'string' },
25
+ defaultValue: { summary: "'Enter password'" },
26
+ },
27
+ },
28
+ label: {
29
+ control: { type: 'text' },
30
+ description: 'Password input label',
31
+ table: {
32
+ type: { summary: 'string' },
33
+ },
34
+ },
35
+ description: {
36
+ control: { type: 'text' },
37
+ description: 'Description text',
38
+ table: {
39
+ type: { summary: 'string' },
40
+ },
41
+ },
42
+ error: {
43
+ control: { type: 'text' },
44
+ description: 'Error message',
45
+ table: {
46
+ type: { summary: 'string' },
47
+ },
48
+ },
49
+ disabled: {
50
+ control: { type: 'boolean' },
51
+ description: 'Disabled state',
52
+ table: {
53
+ type: { summary: 'boolean' },
54
+ defaultValue: { summary: 'false' },
55
+ },
56
+ },
57
+ required: {
58
+ control: { type: 'boolean' },
59
+ description: 'Required field',
60
+ table: {
61
+ type: { summary: 'boolean' },
62
+ defaultValue: { summary: 'false' },
63
+ },
64
+ },
65
+ fullWidth: {
66
+ control: { type: 'boolean' },
67
+ description: 'Full width of container',
68
+ table: {
69
+ type: { summary: 'boolean' },
70
+ defaultValue: { summary: 'false' },
71
+ },
72
+ },
73
+ width: {
74
+ control: { type: 'text' },
75
+ description: 'Custom width',
76
+ table: {
77
+ type: { summary: 'string | number' },
78
+ },
79
+ },
80
+ visible: {
81
+ control: { type: 'boolean' },
82
+ description: 'Controlled visibility state',
83
+ table: {
84
+ type: { summary: 'boolean' },
85
+ },
86
+ },
87
+ defaultVisible: {
88
+ control: { type: 'boolean' },
89
+ description: 'Default visibility state',
90
+ table: {
91
+ type: { summary: 'boolean' },
92
+ defaultValue: { summary: 'false' },
93
+ },
94
+ },
95
+ styles: {
96
+ control: { type: 'object' },
97
+ description: 'Custom styles object',
98
+ table: {
99
+ type: { summary: 'Record<string, CSSObject>' },
100
+ },
101
+ },
102
+ onChange: {
103
+ action: 'changed',
104
+ description: 'Change handler function',
105
+ table: {
106
+ type: { summary: '(event: React.ChangeEvent<HTMLInputElement>) => void' },
107
+ },
108
+ },
109
+ onVisibilityChange: {
110
+ action: 'visibility changed',
111
+ description: 'Visibility change handler',
112
+ table: {
113
+ type: { summary: '(visible: boolean) => void' },
114
+ },
115
+ },
116
+ },
117
+ };
118
+ export default meta;
119
+ export const Default = {
120
+ args: {
121
+ label: 'Password',
122
+ size: 'md',
123
+ disabled: false,
124
+ required: false,
125
+ fullWidth: false,
126
+ defaultVisible: false,
127
+ },
128
+ parameters: {
129
+ docs: {
130
+ source: {
131
+ code: `<PasswordInput
132
+ label="Password"
133
+ value={password}
134
+ onChange={(event) => setPassword(event.currentTarget.value)}
135
+ />`,
136
+ },
137
+ },
138
+ },
139
+ };
140
+ export const Variants = {
141
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(PasswordInput, { label: "Basic Password Input" }), _jsx(PasswordInput, { label: "With Placeholder", placeholder: "Enter your password" }), _jsx(PasswordInput, { label: "With Description", description: "Password must be at least 8 characters" })] })),
142
+ parameters: {
143
+ docs: {
144
+ source: {
145
+ code: false,
146
+ },
147
+ },
148
+ },
149
+ };
150
+ export const Sizes = {
151
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(PasswordInput, { size: "sm", label: "Small Password", placeholder: "Enter password" }), _jsx(PasswordInput, { size: "md", label: "Medium Password (Default)", placeholder: "Enter password" }), _jsx(PasswordInput, { size: "lg", label: "Large Password", placeholder: "Enter password" })] })),
152
+ parameters: {
153
+ docs: {
154
+ source: {
155
+ code: `<PasswordInput size="sm" label="Small Password" placeholder="Enter password" />
156
+ <PasswordInput size="lg" label="Large Password" placeholder="Enter password" />`,
157
+ },
158
+ },
159
+ },
160
+ };
161
+ export const States = {
162
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(PasswordInput, { label: "Normal Password Input" }), _jsx(PasswordInput, { label: "Disabled Password Input", disabled: true }), _jsx(PasswordInput, { label: "Required Password Input", required: true }), _jsx(PasswordInput, { label: "Password Input with Description", description: "Password must be at least 8 characters" }), _jsx(PasswordInput, { label: "Password Input with Error", error: "Password is too short" })] })),
163
+ parameters: {
164
+ docs: {
165
+ source: {
166
+ code: false,
167
+ },
168
+ },
169
+ },
170
+ };
171
+ export const AdditionalFunctionality = {
172
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(PasswordInput, { label: "New Password", description: "Password must be at least 8 characters", placeholder: "Create a strong password" }), _jsx(PasswordInput, { label: "Confirm Password", placeholder: "Re-enter password", error: "Passwords do not match" }), _jsx(PasswordInput, { label: "Custom Width Password", width: "300px" })] })),
173
+ parameters: {
174
+ docs: {
175
+ source: {
176
+ code: `<PasswordInput
177
+ label="New Password"
178
+ description="Password must be at least 8 characters"
179
+ placeholder="Create a strong password"
180
+ value={newPassword}
181
+ onChange={handleNewPassword}
182
+ />
183
+
184
+ <PasswordInput
185
+ label="Confirm Password"
186
+ placeholder="Re-enter password"
187
+ value={confirmPassword}
188
+ onChange={handleConfirmPassword}
189
+ error="Passwords do not match"
190
+ />`,
191
+ },
192
+ },
193
+ },
194
+ };
195
+ export const CustomStyling = {
196
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(PasswordInput, { label: "Custom Styled Password Input", styles: {
197
+ input: {
198
+ borderColor: '#ff6b6b',
199
+ '&:focus': {
200
+ borderColor: '#ff6b6b',
201
+ boxShadow: '0 0 0 2px rgba(255, 107, 107, 0.2)',
202
+ },
203
+ },
204
+ label: {
205
+ color: '#ff6b6b',
206
+ fontWeight: 600,
207
+ },
208
+ visibilityToggle: {
209
+ color: '#ff6b6b',
210
+ },
211
+ } }), _jsx(PasswordInput, { label: "Another Custom Style", styles: {
212
+ input: {
213
+ backgroundColor: '#f8f9fa',
214
+ borderColor: '#4CAF50',
215
+ '&:focus': {
216
+ borderColor: '#4CAF50',
217
+ boxShadow: '0 0 0 2px rgba(76, 175, 80, 0.2)',
218
+ },
219
+ },
220
+ label: {
221
+ color: '#4CAF50',
222
+ fontSize: '16px',
223
+ },
224
+ visibilityToggle: {
225
+ color: '#4CAF50',
226
+ },
227
+ } })] })),
228
+ parameters: {
229
+ docs: {
230
+ source: {
231
+ code: false,
232
+ },
233
+ },
234
+ },
235
+ };
@@ -0,0 +1,7 @@
1
+ import { TextInputProps } from '@mantine/core';
2
+ interface SearchBarProps extends TextInputProps {
3
+ fullWidth?: boolean;
4
+ }
5
+ declare const SearchBar: ({ width, fullWidth, size, styles, ...props }: SearchBarProps) => import("react/jsx-runtime").JSX.Element;
6
+ export { SearchBar };
7
+ //# sourceMappingURL=SearchBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAM/C,UAAU,cAAe,SAAQ,cAAc;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,SAAS,GAAI,8CAA6D,cAAc,4CA4B7F,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TextInput } from '../TextInput/TextInput';
3
+ import { neutral } from '../../../../constants/colors';
4
+ import { fontBase } from '../../../../constants/font';
5
+ import { componentSizes } from '../shared/sizes';
6
+ const SearchBar = ({ width, fullWidth = false, size = 'md', styles, ...props }) => {
7
+ const selectedSize = componentSizes[size || 'md'];
8
+ const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
9
+ const style = {
10
+ input: {
11
+ ...fontBase,
12
+ fontSize: selectedSize.fontSize,
13
+ color: neutral[200],
14
+ border: `1px solid ${neutral[100]}`,
15
+ borderRadius: '8px',
16
+ height: `${selectedSize.height}rem`,
17
+ transition: 'all 200ms ease-in-out',
18
+ },
19
+ ...styles,
20
+ };
21
+ return (_jsx(TextInput, { placeholder: "Search", width: computedWidth, styles: style, icon: _jsx("i", { className: "fas fa-search", style: { fontSize: 14, marginLeft: '0.25rem' } }), size: 'lg', fullWidth: fullWidth, ...props }));
22
+ };
23
+ export { SearchBar };
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { SearchBar } from './SearchBar';
3
+ declare const meta: Meta<typeof SearchBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Variants: Story;
8
+ export declare const Sizes: Story;
9
+ export declare const States: Story;
10
+ export declare const AdditionalFunctionality: Story;
11
+ export declare const CustomStyling: Story;
12
+ //# sourceMappingURL=SearchBar.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/SearchBar/SearchBar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA2FhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAiBpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KA2BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA6C3B,CAAC"}