@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,202 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SearchBar } from './SearchBar';
3
+ import { Group } from '../../../Layout/Group/Group';
4
+ const meta = {
5
+ title: 'Components/Inputs/TextInputs/SearchBar',
6
+ component: SearchBar,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ argTypes: {
11
+ size: {
12
+ control: { type: 'select' },
13
+ options: ['sm', 'md', 'lg'],
14
+ description: 'Controls the search bar 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: "'Search'" },
26
+ },
27
+ },
28
+ label: {
29
+ control: { type: 'text' },
30
+ description: 'Search bar 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: 'number' },
75
+ description: 'Custom width in pixels',
76
+ table: {
77
+ type: { summary: 'number' },
78
+ },
79
+ },
80
+ styles: {
81
+ control: { type: 'object' },
82
+ description: 'Custom styles object',
83
+ table: {
84
+ type: { summary: 'Record<string, CSSObject>' },
85
+ },
86
+ },
87
+ onChange: {
88
+ action: 'changed',
89
+ description: 'Change handler function',
90
+ table: {
91
+ type: { summary: '(event: React.ChangeEvent<HTMLInputElement>) => void' },
92
+ },
93
+ },
94
+ },
95
+ };
96
+ export default meta;
97
+ export const Default = {
98
+ args: {
99
+ size: 'md',
100
+ disabled: false,
101
+ required: false,
102
+ fullWidth: false,
103
+ },
104
+ parameters: {
105
+ docs: {
106
+ source: {
107
+ code: `<SearchBar
108
+ value={searchQuery}
109
+ onChange={(event) => setSearchQuery(event.currentTarget.value)}
110
+ />`,
111
+ },
112
+ },
113
+ },
114
+ };
115
+ export const Variants = {
116
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(SearchBar, { label: "Find Users", description: "Search by name, email, or username" }), _jsx(SearchBar, { placeholder: "Search products..." }), _jsx(SearchBar, { label: "Product Search", error: "Search query is too short" })] })),
117
+ parameters: {
118
+ docs: {
119
+ source: {
120
+ code: false,
121
+ },
122
+ },
123
+ },
124
+ };
125
+ export const Sizes = {
126
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(SearchBar, { size: "sm" }), _jsx(SearchBar, { size: "md" }), _jsx(SearchBar, { size: "lg" })] })),
127
+ parameters: {
128
+ docs: {
129
+ source: {
130
+ code: `<SearchBar size="sm" value={query} onChange={handleSearch} />
131
+ <SearchBar size="lg" value={query} onChange={handleSearch} />`,
132
+ },
133
+ },
134
+ },
135
+ };
136
+ export const States = {
137
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(SearchBar, { label: "Normal Search Bar" }), _jsx(SearchBar, { label: "Disabled Search Bar", disabled: true }), _jsx(SearchBar, { label: "Required Search Bar", required: true }), _jsx(SearchBar, { label: "Search Bar with Description", description: "Enter your search terms" }), _jsx(SearchBar, { label: "Search Bar with Error", error: "Please enter a valid search term" })] })),
138
+ parameters: {
139
+ docs: {
140
+ source: {
141
+ code: false,
142
+ },
143
+ },
144
+ },
145
+ };
146
+ export const AdditionalFunctionality = {
147
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(SearchBar, { width: 400, placeholder: "Search products..." }), _jsx(SearchBar, { label: "Find Users", description: "Search by name, email, or username" }), _jsx(SearchBar, { label: "Product Search", error: "Search query is too short" })] })),
148
+ parameters: {
149
+ docs: {
150
+ source: {
151
+ code: `<SearchBar
152
+ width={400}
153
+ value={searchTerm}
154
+ onChange={handleSearchChange}
155
+ placeholder="Search products..."
156
+ />
157
+
158
+ <SearchBar
159
+ label="Find Users"
160
+ description="Search by name, email, or username"
161
+ value={userSearch}
162
+ onChange={handleUserSearch}
163
+ />`,
164
+ },
165
+ },
166
+ },
167
+ };
168
+ export const CustomStyling = {
169
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(SearchBar, { label: "Custom Styled Search Bar", styles: {
170
+ input: {
171
+ borderColor: '#ff6b6b',
172
+ '&:focus': {
173
+ borderColor: '#ff6b6b',
174
+ boxShadow: '0 0 0 2px rgba(255, 107, 107, 0.2)',
175
+ },
176
+ },
177
+ label: {
178
+ color: '#ff6b6b',
179
+ fontWeight: 600,
180
+ },
181
+ } }), _jsx(SearchBar, { label: "Another Custom Style", styles: {
182
+ input: {
183
+ backgroundColor: '#f8f9fa',
184
+ borderColor: '#4CAF50',
185
+ '&:focus': {
186
+ borderColor: '#4CAF50',
187
+ boxShadow: '0 0 0 2px rgba(76, 175, 80, 0.2)',
188
+ },
189
+ },
190
+ label: {
191
+ color: '#4CAF50',
192
+ fontSize: '16px',
193
+ },
194
+ } })] })),
195
+ parameters: {
196
+ docs: {
197
+ source: {
198
+ code: false,
199
+ },
200
+ },
201
+ },
202
+ };
@@ -0,0 +1,12 @@
1
+ import { TextareaProps as MantineTextareaProps } from '@mantine/core';
2
+ import { CSSObject } from '@mantine/styles';
3
+ import { componentSizes } from '../shared/sizes';
4
+ type TextAreaProps = MantineTextareaProps & {
5
+ size?: keyof typeof componentSizes;
6
+ width?: string | number;
7
+ fullWidth?: boolean;
8
+ styles?: Record<string, CSSObject>;
9
+ };
10
+ declare const TextArea: ({ size, width, fullWidth, styles, ...props }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
11
+ export { TextArea };
12
+ //# sourceMappingURL=TextArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+B,aAAa,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,aAAa,GAAG,oBAAoB,GAAG;IAC1C,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,QAAQ,GAAI,8CAA6D,aAAa,4CA4B3F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Textarea as MantineTextarea } from '@mantine/core';
3
+ import { neutral } from '../../../../constants/colors';
4
+ import { fontBase } from '../../../../constants/font';
5
+ import { componentSizes } from '../shared/sizes';
6
+ const TextArea = ({ size = 'md', width, fullWidth = false, styles, ...props }) => {
7
+ const selectedSize = componentSizes[size];
8
+ const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
9
+ const style = {
10
+ input: {
11
+ minHeight: `${selectedSize.height}rem`,
12
+ fontSize: selectedSize.fontSize,
13
+ padding: '0.75rem 1rem',
14
+ ...fontBase,
15
+ color: neutral[200],
16
+ transition: 'all 200ms ease-in-out',
17
+ borderRadius: '8px',
18
+ resize: 'vertical',
19
+ },
20
+ label: {
21
+ ...fontBase,
22
+ fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
23
+ color: neutral[200],
24
+ },
25
+ error: {
26
+ ...fontBase,
27
+ fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
28
+ },
29
+ ...styles,
30
+ };
31
+ return _jsx(MantineTextarea, { ...props, size: size, styles: style, w: computedWidth, minRows: props.minRows || selectedSize.minRows, maxRows: props.maxRows || selectedSize.maxRows });
32
+ };
33
+ export { TextArea };
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { TextArea } from './TextArea';
3
+ declare const meta: Meta<typeof TextArea>;
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=TextArea.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAgH/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAsBrB,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,KA8BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA6C3B,CAAC"}
@@ -0,0 +1,231 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { TextArea } from './TextArea';
3
+ import { Group } from '../../../Layout/Group/Group';
4
+ const meta = {
5
+ title: 'Components/Inputs/TextInputs/TextArea',
6
+ component: TextArea,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ argTypes: {
11
+ size: {
12
+ control: { type: 'select' },
13
+ options: ['sm', 'md', 'lg'],
14
+ description: 'Controls the textarea 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
+ },
26
+ },
27
+ label: {
28
+ control: { type: 'text' },
29
+ description: 'Textarea label',
30
+ table: {
31
+ type: { summary: 'string' },
32
+ },
33
+ },
34
+ description: {
35
+ control: { type: 'text' },
36
+ description: 'Description text',
37
+ table: {
38
+ type: { summary: 'string' },
39
+ },
40
+ },
41
+ error: {
42
+ control: { type: 'text' },
43
+ description: 'Error message',
44
+ table: {
45
+ type: { summary: 'string' },
46
+ },
47
+ },
48
+ disabled: {
49
+ control: { type: 'boolean' },
50
+ description: 'Disabled state',
51
+ table: {
52
+ type: { summary: 'boolean' },
53
+ defaultValue: { summary: 'false' },
54
+ },
55
+ },
56
+ required: {
57
+ control: { type: 'boolean' },
58
+ description: 'Required field',
59
+ table: {
60
+ type: { summary: 'boolean' },
61
+ defaultValue: { summary: 'false' },
62
+ },
63
+ },
64
+ fullWidth: {
65
+ control: { type: 'boolean' },
66
+ description: 'Full width of container',
67
+ table: {
68
+ type: { summary: 'boolean' },
69
+ defaultValue: { summary: 'false' },
70
+ },
71
+ },
72
+ width: {
73
+ control: { type: 'text' },
74
+ description: 'Custom width',
75
+ table: {
76
+ type: { summary: 'string | number' },
77
+ },
78
+ },
79
+ minRows: {
80
+ control: { type: 'number' },
81
+ description: 'Minimum number of rows',
82
+ table: {
83
+ type: { summary: 'number' },
84
+ },
85
+ },
86
+ maxRows: {
87
+ control: { type: 'number' },
88
+ description: 'Maximum number of rows',
89
+ table: {
90
+ type: { summary: 'number' },
91
+ },
92
+ },
93
+ autosize: {
94
+ control: { type: 'boolean' },
95
+ description: 'Auto-resize based on content',
96
+ table: {
97
+ type: { summary: 'boolean' },
98
+ defaultValue: { summary: 'false' },
99
+ },
100
+ },
101
+ styles: {
102
+ control: { type: 'object' },
103
+ description: 'Custom styles object',
104
+ table: {
105
+ type: { summary: 'Record<string, CSSObject>' },
106
+ },
107
+ },
108
+ onChange: {
109
+ action: 'changed',
110
+ description: 'Change handler function',
111
+ table: {
112
+ type: { summary: '(event: React.ChangeEvent<HTMLTextAreaElement>) => void' },
113
+ },
114
+ },
115
+ },
116
+ };
117
+ export default meta;
118
+ export const Default = {
119
+ args: {
120
+ label: 'Message',
121
+ placeholder: 'Enter your message here...',
122
+ size: 'md',
123
+ disabled: false,
124
+ required: false,
125
+ fullWidth: false,
126
+ autosize: false,
127
+ },
128
+ parameters: {
129
+ docs: {
130
+ source: {
131
+ code: `<TextArea
132
+ label="Message"
133
+ placeholder="Enter your message here..."
134
+ value={message}
135
+ onChange={(event) => setMessage(event.currentTarget.value)}
136
+ />`,
137
+ },
138
+ },
139
+ },
140
+ };
141
+ export const Variants = {
142
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(TextArea, { label: "Basic TextArea" }), _jsx(TextArea, { label: "With Placeholder", placeholder: "Enter your text here..." }), _jsx(TextArea, { label: "With Description", description: "This is a description" })] })),
143
+ parameters: {
144
+ docs: {
145
+ source: {
146
+ code: false,
147
+ },
148
+ },
149
+ },
150
+ };
151
+ export const Sizes = {
152
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(TextArea, { size: "sm", label: "Small TextArea", placeholder: "Small textarea" }), _jsx(TextArea, { size: "md", label: "Medium TextArea (Default)", placeholder: "Medium textarea" }), _jsx(TextArea, { size: "lg", label: "Large TextArea", placeholder: "Large textarea" })] })),
153
+ parameters: {
154
+ docs: {
155
+ source: {
156
+ code: `<TextArea size="sm" label="Small TextArea" placeholder="Small textarea" />
157
+ <TextArea size="lg" label="Large TextArea" placeholder="Large textarea" />`,
158
+ },
159
+ },
160
+ },
161
+ };
162
+ export const States = {
163
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(TextArea, { label: "Normal TextArea" }), _jsx(TextArea, { label: "Disabled TextArea", disabled: true }), _jsx(TextArea, { label: "Required TextArea", required: true }), _jsx(TextArea, { label: "TextArea with Description", description: "Please provide detailed information" }), _jsx(TextArea, { label: "TextArea with Error", error: "This field is required" })] })),
164
+ parameters: {
165
+ docs: {
166
+ source: {
167
+ code: false,
168
+ },
169
+ },
170
+ },
171
+ };
172
+ export const AdditionalFunctionality = {
173
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(TextArea, { label: "Auto-resize TextArea", autosize: true, placeholder: "This will grow as you type..." }), _jsx(TextArea, { label: "Fixed Rows", minRows: 3, maxRows: 6, placeholder: "Fixed height textarea" }), _jsx(TextArea, { label: "Custom Width TextArea", width: "400px", placeholder: "Custom width textarea" })] })),
174
+ parameters: {
175
+ docs: {
176
+ source: {
177
+ code: `<TextArea
178
+ label="Auto-resize TextArea"
179
+ autosize
180
+ placeholder="This will grow as you type..."
181
+ value={content}
182
+ onChange={(event) => setContent(event.currentTarget.value)}
183
+ />
184
+
185
+ <TextArea
186
+ label="Fixed Rows"
187
+ minRows={3}
188
+ maxRows={6}
189
+ placeholder="Fixed height textarea"
190
+ value={content}
191
+ onChange={(event) => setContent(event.currentTarget.value)}
192
+ />`,
193
+ },
194
+ },
195
+ },
196
+ };
197
+ export const CustomStyling = {
198
+ render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(TextArea, { label: "Custom Styled TextArea", styles: {
199
+ input: {
200
+ borderColor: '#ff6b6b',
201
+ '&:focus': {
202
+ borderColor: '#ff6b6b',
203
+ boxShadow: '0 0 0 2px rgba(255, 107, 107, 0.2)',
204
+ },
205
+ },
206
+ label: {
207
+ color: '#ff6b6b',
208
+ fontWeight: 600,
209
+ },
210
+ } }), _jsx(TextArea, { label: "Another Custom Style", styles: {
211
+ input: {
212
+ backgroundColor: '#f8f9fa',
213
+ borderColor: '#4CAF50',
214
+ '&:focus': {
215
+ borderColor: '#4CAF50',
216
+ boxShadow: '0 0 0 2px rgba(76, 175, 80, 0.2)',
217
+ },
218
+ },
219
+ label: {
220
+ color: '#4CAF50',
221
+ fontSize: '16px',
222
+ },
223
+ } })] })),
224
+ parameters: {
225
+ docs: {
226
+ source: {
227
+ code: false,
228
+ },
229
+ },
230
+ },
231
+ };
@@ -0,0 +1,12 @@
1
+ import { TextInputProps as MantineTextInputProps } from '@mantine/core';
2
+ import { CSSObject } from '@mantine/styles';
3
+ import { componentSizes } from '../shared/sizes';
4
+ type TextInputProps = MantineTextInputProps & {
5
+ size?: keyof typeof componentSizes;
6
+ width?: string | number;
7
+ fullWidth?: boolean;
8
+ styles?: Record<string, CSSObject>;
9
+ };
10
+ declare const TextInput: ({ size, width, fullWidth, styles, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
11
+ export { TextInput };
12
+ //# sourceMappingURL=TextInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextInput/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiC,cAAc,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,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,SAAS,GAAI,8CAA6D,cAAc,4CA2B7F,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TextInput as MantineTextInput } from '@mantine/core';
3
+ import { neutral } from '../../../../constants/colors';
4
+ import { fontBase } from '../../../../constants/font';
5
+ import { componentSizes } from '../shared/sizes';
6
+ const TextInput = ({ size = 'md', width, fullWidth = false, styles, ...props }) => {
7
+ const selectedSize = componentSizes[size];
8
+ const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}rem`;
9
+ const style = {
10
+ input: {
11
+ height: `${selectedSize.height}rem`,
12
+ fontSize: selectedSize.fontSize,
13
+ padding: '0 1rem',
14
+ ...fontBase,
15
+ color: neutral[200],
16
+ transition: 'all 200ms ease-in-out',
17
+ borderRadius: '8px',
18
+ },
19
+ label: {
20
+ ...fontBase,
21
+ fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
22
+ color: neutral[200],
23
+ },
24
+ error: {
25
+ ...fontBase,
26
+ fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
27
+ },
28
+ ...styles,
29
+ };
30
+ return _jsx(MantineTextInput, { w: computedWidth, ...props, size: size, styles: style });
31
+ };
32
+ export { TextInput };
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { TextInput } from './TextInput';
3
+ declare const meta: Meta<typeof TextInput>;
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=TextInput.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextInput/TextInput.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,CAmGhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAsBrB,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,KA+BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA6C3B,CAAC"}