armtek-uikit-react 1.0.2 → 1.0.3

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 (278) hide show
  1. package/lib/Adornment/package.json +7 -0
  2. package/lib/Alert/package.json +7 -0
  3. package/lib/Avatar/package.json +7 -0
  4. package/lib/AvatarGroup/package.json +6 -0
  5. package/lib/Badge/package.json +7 -0
  6. package/lib/Button/package.json +7 -7
  7. package/lib/ButtonGroup/package.json +6 -0
  8. package/lib/ButtonIcon/package.json +6 -0
  9. package/lib/Card/package.json +7 -0
  10. package/lib/Checkbox/package.json +6 -0
  11. package/lib/Chip/package.json +7 -0
  12. package/lib/DateField/package.json +6 -0
  13. package/lib/DatePicker/package.json +6 -0
  14. package/lib/DateService/package.json +6 -0
  15. package/lib/HelperText/package.json +6 -0
  16. package/lib/Interval/package.json +6 -0
  17. package/lib/IntervalSlide/package.json +6 -0
  18. package/lib/ListItem/package.json +6 -0
  19. package/lib/Loader/package.json +7 -0
  20. package/lib/Logo/package.json +7 -0
  21. package/lib/Password/package.json +6 -0
  22. package/lib/Period/package.json +6 -0
  23. package/lib/PeriodSelect/package.json +6 -0
  24. package/lib/Radio/package.json +6 -0
  25. package/lib/Rating/package.json +6 -0
  26. package/lib/RcSlider/package.json +6 -0
  27. package/lib/Select/package.json +6 -0
  28. package/lib/Slider/package.json +7 -0
  29. package/lib/Status/package.json +7 -0
  30. package/lib/StepItem/package.json +6 -0
  31. package/lib/StepItemIcon/package.json +6 -0
  32. package/lib/Stepper/package.json +7 -0
  33. package/lib/Switch/package.json +6 -0
  34. package/lib/TextArea/package.json +6 -0
  35. package/lib/TextField/package.json +6 -0
  36. package/lib/TimeField/package.json +6 -0
  37. package/lib/TimePicker/package.json +6 -0
  38. package/lib/Tooltip/package.json +7 -0
  39. package/lib/cjs/Adornment/Adornment.d.ts +7 -0
  40. package/lib/cjs/Adornment/Adornment.js +47 -0
  41. package/lib/cjs/Adornment/Adornment.module.scss +18 -0
  42. package/lib/cjs/Alert/Alert.d.ts +10 -0
  43. package/lib/cjs/Alert/Alert.js +46 -0
  44. package/lib/cjs/Alert/Alert.module.scss +38 -0
  45. package/lib/cjs/Avatar/Avatar.d.ts +13 -0
  46. package/lib/cjs/Avatar/Avatar.js +50 -0
  47. package/lib/cjs/Avatar/Avatar.module.scss +82 -0
  48. package/lib/cjs/Avatar/AvatarGroup.d.ts +8 -0
  49. package/lib/cjs/Avatar/AvatarGroup.js +34 -0
  50. package/lib/cjs/Avatar/AvatarGroup.module.scss +48 -0
  51. package/lib/cjs/Badge/Badge.d.ts +11 -0
  52. package/lib/cjs/Badge/Badge.js +34 -0
  53. package/lib/cjs/Badge/Badge.module.scss +83 -0
  54. package/lib/cjs/Button/Button.css +3 -0
  55. package/lib/cjs/{ui/Button → Button}/Button.d.ts +1 -1
  56. package/lib/cjs/{ui/Button → Button}/Button.js +4 -5
  57. package/lib/cjs/{ui/Button → Button}/Button.module.scss +1 -1
  58. package/lib/cjs/Card/Card.d.ts +4 -0
  59. package/lib/cjs/Card/Card.js +19 -0
  60. package/lib/cjs/Card/Card.module.scss +7 -0
  61. package/lib/cjs/Chip/Chip.d.ts +13 -0
  62. package/lib/cjs/Chip/Chip.js +41 -0
  63. package/lib/cjs/Chip/Chip.module.scss +96 -0
  64. package/lib/cjs/Form/Checkbox/Checkbox.d.ts +12 -0
  65. package/lib/cjs/Form/Checkbox/Checkbox.js +53 -0
  66. package/lib/cjs/Form/Checkbox/Checkbox.module.scss +297 -0
  67. package/lib/cjs/Form/Checkbox/Radio.d.ts +3 -0
  68. package/lib/cjs/Form/Checkbox/Radio.js +21 -0
  69. package/lib/cjs/Form/DateField/DateField.d.ts +26 -0
  70. package/lib/cjs/Form/DateField/DateField.js +71 -0
  71. package/lib/cjs/Form/DateField/DateField.module.scss +1 -0
  72. package/lib/cjs/Form/DateField/TimeField.d.ts +3 -0
  73. package/lib/cjs/Form/DateField/TimeField.js +19 -0
  74. package/lib/cjs/Form/DatePicker/DatePicker.d.ts +7 -0
  75. package/lib/cjs/Form/DatePicker/DatePicker.js +49 -0
  76. package/lib/cjs/Form/DatePicker/DatePicker.module.scss +7 -0
  77. package/lib/cjs/Form/DatePicker/PeriodSelect.d.ts +2 -0
  78. package/lib/cjs/Form/DatePicker/PeriodSelect.js +29 -0
  79. package/lib/cjs/Form/DatePicker/TimePicker.d.ts +2 -0
  80. package/lib/cjs/Form/DatePicker/TimePicker.js +28 -0
  81. package/lib/cjs/Form/DatePicker/styles.css +766 -0
  82. package/lib/cjs/Form/Interval/Interval.d.ts +21 -0
  83. package/lib/cjs/Form/Interval/Interval.js +98 -0
  84. package/lib/cjs/Form/Interval/Interval.module.scss +35 -0
  85. package/lib/cjs/Form/Interval/IntervalSlide.d.ts +4 -0
  86. package/lib/cjs/Form/Interval/IntervalSlide.js +48 -0
  87. package/lib/cjs/Form/Password/Password.d.ts +12 -0
  88. package/lib/cjs/Form/Password/Password.js +46 -0
  89. package/lib/cjs/Form/Password/Password.module.scss +2 -0
  90. package/lib/cjs/Form/Period/Period.d.ts +15 -0
  91. package/lib/cjs/Form/Period/Period.js +69 -0
  92. package/lib/cjs/Form/Period/Period.module.scss +10 -0
  93. package/lib/cjs/Form/Rating/Rating.d.ts +10 -0
  94. package/lib/cjs/Form/Rating/Rating.js +54 -0
  95. package/lib/cjs/Form/Rating/Rating.module.scss +19 -0
  96. package/lib/cjs/Form/Select/Select.d.ts +23 -0
  97. package/lib/cjs/Form/Select/Select.js +139 -0
  98. package/lib/cjs/Form/Select/Select.module.scss +26 -0
  99. package/lib/cjs/Form/Switch/Switch.d.ts +7 -0
  100. package/lib/cjs/Form/Switch/Switch.js +30 -0
  101. package/lib/cjs/Form/Switch/Switch.module.scss +69 -0
  102. package/lib/cjs/Form/TextArea/TextArea.d.ts +4 -0
  103. package/lib/cjs/Form/TextArea/TextArea.js +46 -0
  104. package/lib/cjs/Form/TextArea/TextArea.module.scss +15 -0
  105. package/lib/cjs/Form/TextField/TextField.d.ts +40 -0
  106. package/lib/cjs/Form/TextField/TextField.js +152 -0
  107. package/lib/cjs/Form/TextField/TextField.module.scss +160 -0
  108. package/lib/cjs/List/ListItem.d.ts +10 -0
  109. package/lib/cjs/List/ListItem.js +60 -0
  110. package/lib/cjs/List/ListItem.module.scss +34 -0
  111. package/lib/cjs/Loader/Loader.d.ts +6 -0
  112. package/lib/cjs/Loader/Loader.js +120 -0
  113. package/lib/cjs/Loader/Loader.module.scss +37 -0
  114. package/lib/cjs/Logo/Logo.d.ts +12 -0
  115. package/lib/cjs/Logo/Logo.js +102 -0
  116. package/lib/cjs/Logo/Logo.module.scss +29 -0
  117. package/lib/cjs/Slider/RcSlider.d.ts +2 -0
  118. package/lib/cjs/Slider/RcSlider.js +9 -0
  119. package/lib/cjs/Slider/Slider.d.ts +8 -0
  120. package/lib/cjs/Slider/Slider.js +34 -0
  121. package/lib/cjs/Slider/Slider.module.scss +6 -0
  122. package/lib/cjs/Slider/style.css +281 -0
  123. package/lib/cjs/Status/Status.d.ts +10 -0
  124. package/lib/cjs/Status/Status.js +31 -0
  125. package/lib/cjs/Status/Status.module.scss +45 -0
  126. package/lib/cjs/Stepper/StepItem.d.ts +14 -0
  127. package/lib/cjs/Stepper/StepItem.js +56 -0
  128. package/lib/cjs/Stepper/StepItem.module.scss +67 -0
  129. package/lib/cjs/Stepper/StepItemIcon.d.ts +11 -0
  130. package/lib/cjs/Stepper/StepItemIcon.js +40 -0
  131. package/lib/cjs/Stepper/StepItemIcon.module.scss +47 -0
  132. package/lib/cjs/Stepper/Stepper.d.ts +11 -0
  133. package/lib/cjs/Stepper/Stepper.js +45 -0
  134. package/lib/cjs/Stepper/Stepper.module.scss +34 -0
  135. package/lib/cjs/Tooltip/Tooltip.d.ts +7 -0
  136. package/lib/cjs/Tooltip/Tooltip.js +32 -0
  137. package/lib/cjs/Tooltip/Tooltip.module.scss +18 -0
  138. package/lib/cjs/Typography/HelperText/HelperText.d.ts +6 -0
  139. package/lib/cjs/Typography/HelperText/HelperText.js +28 -0
  140. package/lib/cjs/Typography/HelperText/HelperText.module.scss +10 -0
  141. package/lib/cjs/assets/fonts.scss +0 -18
  142. package/lib/cjs/assets/global.css +36 -0
  143. package/lib/cjs/assets/styles.scss +0 -10
  144. package/lib/cjs/index.d.ts +29 -29
  145. package/lib/cjs/index.js +30 -2
  146. package/lib/dist/armtek-uikit-react-index.js +293 -293
  147. package/lib/dist/armtek-uikit-react-index.min.js +1 -1
  148. package/lib/esm/Adornment/Adornment.d.ts +7 -0
  149. package/lib/esm/Adornment/Adornment.js +40 -0
  150. package/lib/esm/Adornment/Adornment.module.scss +18 -0
  151. package/lib/esm/Alert/Alert.d.ts +10 -0
  152. package/lib/esm/Alert/Alert.js +41 -0
  153. package/lib/esm/Alert/Alert.module.scss +38 -0
  154. package/lib/esm/Avatar/Avatar.d.ts +13 -0
  155. package/lib/esm/Avatar/Avatar.js +45 -0
  156. package/lib/esm/Avatar/Avatar.module.scss +82 -0
  157. package/lib/esm/Avatar/AvatarGroup.d.ts +8 -0
  158. package/lib/esm/Avatar/AvatarGroup.js +29 -0
  159. package/lib/esm/Avatar/AvatarGroup.module.scss +48 -0
  160. package/lib/esm/Badge/Badge.d.ts +11 -0
  161. package/lib/esm/Badge/Badge.js +29 -0
  162. package/lib/esm/Badge/Badge.module.scss +83 -0
  163. package/lib/esm/Button/Button.css +3 -0
  164. package/lib/esm/{ui/Button → Button}/Button.d.ts +1 -1
  165. package/lib/esm/{ui/Button → Button}/Button.js +5 -5
  166. package/lib/esm/{ui/Button → Button}/Button.module.scss +1 -1
  167. package/lib/esm/Card/Card.d.ts +4 -0
  168. package/lib/esm/Card/Card.js +13 -0
  169. package/lib/esm/Card/Card.module.scss +7 -0
  170. package/lib/esm/Chip/Chip.d.ts +13 -0
  171. package/lib/esm/Chip/Chip.js +36 -0
  172. package/lib/esm/Chip/Chip.module.scss +96 -0
  173. package/lib/esm/Form/Checkbox/Checkbox.d.ts +12 -0
  174. package/lib/esm/Form/Checkbox/Checkbox.js +49 -0
  175. package/lib/esm/Form/Checkbox/Checkbox.module.scss +297 -0
  176. package/lib/esm/Form/Checkbox/Radio.d.ts +3 -0
  177. package/lib/esm/Form/Checkbox/Radio.js +15 -0
  178. package/lib/esm/Form/DateField/DateField.d.ts +26 -0
  179. package/lib/esm/Form/DateField/DateField.js +66 -0
  180. package/lib/esm/Form/DateField/DateField.module.scss +1 -0
  181. package/lib/esm/Form/DateField/TimeField.d.ts +3 -0
  182. package/lib/esm/Form/DateField/TimeField.js +13 -0
  183. package/lib/esm/Form/DatePicker/DatePicker.d.ts +7 -0
  184. package/lib/esm/Form/DatePicker/DatePicker.js +41 -0
  185. package/lib/esm/Form/DatePicker/DatePicker.module.scss +7 -0
  186. package/lib/esm/Form/DatePicker/PeriodSelect.d.ts +2 -0
  187. package/lib/esm/Form/DatePicker/PeriodSelect.js +24 -0
  188. package/lib/esm/Form/DatePicker/TimePicker.d.ts +2 -0
  189. package/lib/esm/Form/DatePicker/TimePicker.js +23 -0
  190. package/lib/esm/Form/DatePicker/styles.css +766 -0
  191. package/lib/esm/Form/Interval/Interval.d.ts +21 -0
  192. package/lib/esm/Form/Interval/Interval.js +94 -0
  193. package/lib/esm/Form/Interval/Interval.module.scss +35 -0
  194. package/lib/esm/Form/Interval/IntervalSlide.d.ts +4 -0
  195. package/lib/esm/Form/Interval/IntervalSlide.js +44 -0
  196. package/lib/esm/Form/Password/Password.d.ts +12 -0
  197. package/lib/esm/Form/Password/Password.js +41 -0
  198. package/lib/esm/Form/Password/Password.module.scss +2 -0
  199. package/lib/esm/Form/Period/Period.d.ts +15 -0
  200. package/lib/esm/Form/Period/Period.js +65 -0
  201. package/lib/esm/Form/Period/Period.module.scss +10 -0
  202. package/lib/esm/Form/Rating/Rating.d.ts +10 -0
  203. package/lib/esm/Form/Rating/Rating.js +50 -0
  204. package/lib/esm/Form/Rating/Rating.module.scss +19 -0
  205. package/lib/esm/Form/Select/Select.d.ts +23 -0
  206. package/lib/esm/Form/Select/Select.js +135 -0
  207. package/lib/esm/Form/Select/Select.module.scss +26 -0
  208. package/lib/esm/Form/Switch/Switch.d.ts +7 -0
  209. package/lib/esm/Form/Switch/Switch.js +25 -0
  210. package/lib/esm/Form/Switch/Switch.module.scss +69 -0
  211. package/lib/esm/Form/TextArea/TextArea.d.ts +4 -0
  212. package/lib/esm/Form/TextArea/TextArea.js +41 -0
  213. package/lib/esm/Form/TextArea/TextArea.module.scss +15 -0
  214. package/lib/esm/Form/TextField/TextField.d.ts +40 -0
  215. package/lib/esm/Form/TextField/TextField.js +147 -0
  216. package/lib/esm/Form/TextField/TextField.module.scss +160 -0
  217. package/lib/esm/List/ListItem.d.ts +10 -0
  218. package/lib/esm/List/ListItem.js +53 -0
  219. package/lib/esm/List/ListItem.module.scss +34 -0
  220. package/lib/esm/Loader/Loader.d.ts +6 -0
  221. package/lib/esm/Loader/Loader.js +115 -0
  222. package/lib/esm/Loader/Loader.module.scss +37 -0
  223. package/lib/esm/Logo/Logo.d.ts +12 -0
  224. package/lib/esm/Logo/Logo.js +97 -0
  225. package/lib/esm/Logo/Logo.module.scss +29 -0
  226. package/lib/esm/Slider/RcSlider.d.ts +2 -0
  227. package/lib/esm/Slider/RcSlider.js +2 -0
  228. package/lib/esm/Slider/Slider.d.ts +8 -0
  229. package/lib/esm/Slider/Slider.js +29 -0
  230. package/lib/esm/Slider/Slider.module.scss +6 -0
  231. package/lib/esm/Slider/style.css +281 -0
  232. package/lib/esm/Status/Status.d.ts +10 -0
  233. package/lib/esm/Status/Status.js +26 -0
  234. package/lib/esm/Status/Status.module.scss +45 -0
  235. package/lib/esm/Stepper/StepItem.d.ts +14 -0
  236. package/lib/esm/Stepper/StepItem.js +51 -0
  237. package/lib/esm/Stepper/StepItem.module.scss +67 -0
  238. package/lib/esm/Stepper/StepItemIcon.d.ts +11 -0
  239. package/lib/esm/Stepper/StepItemIcon.js +34 -0
  240. package/lib/esm/Stepper/StepItemIcon.module.scss +47 -0
  241. package/lib/esm/Stepper/Stepper.d.ts +11 -0
  242. package/lib/esm/Stepper/Stepper.js +40 -0
  243. package/lib/esm/Stepper/Stepper.module.scss +34 -0
  244. package/lib/esm/Tooltip/Tooltip.d.ts +7 -0
  245. package/lib/esm/Tooltip/Tooltip.js +28 -0
  246. package/lib/esm/Tooltip/Tooltip.module.scss +18 -0
  247. package/lib/esm/Typography/HelperText/HelperText.d.ts +6 -0
  248. package/lib/esm/Typography/HelperText/HelperText.js +22 -0
  249. package/lib/esm/Typography/HelperText/HelperText.module.scss +10 -0
  250. package/lib/esm/assets/fonts.scss +0 -18
  251. package/lib/esm/assets/global.css +36 -0
  252. package/lib/esm/assets/styles.scss +0 -10
  253. package/lib/esm/index.d.ts +29 -29
  254. package/lib/esm/index.js +15 -1
  255. package/lib/helpers/package.json +6 -0
  256. package/lib/theme/package.json +6 -0
  257. package/lib/useClickOutside/package.json +6 -0
  258. package/package.json +6 -2
  259. package/lib/cjs/assets/index.d.ts +0 -16
  260. package/lib/cjs/ui/Button/style.css +0 -299
  261. package/lib/esm/assets/index.d.ts +0 -16
  262. package/lib/esm/ui/Button/style.css +0 -299
  263. /package/lib/cjs/{ui/Button → Button}/ButtonGroup.d.ts +0 -0
  264. /package/lib/cjs/{ui/Button → Button}/ButtonGroup.js +0 -0
  265. /package/lib/cjs/{ui/Button → Button}/ButtonIcon.d.ts +0 -0
  266. /package/lib/cjs/{ui/Button → Button}/ButtonIcon.js +0 -0
  267. /package/lib/cjs/{shared/hooks → hooks}/useClickOutside.d.ts +0 -0
  268. /package/lib/cjs/{shared/hooks → hooks}/useClickOutside.js +0 -0
  269. /package/lib/cjs/{shared/services → services}/DateService.d.ts +0 -0
  270. /package/lib/cjs/{shared/services → services}/DateService.js +0 -0
  271. /package/lib/esm/{ui/Button → Button}/ButtonGroup.d.ts +0 -0
  272. /package/lib/esm/{ui/Button → Button}/ButtonGroup.js +0 -0
  273. /package/lib/esm/{ui/Button → Button}/ButtonIcon.d.ts +0 -0
  274. /package/lib/esm/{ui/Button → Button}/ButtonIcon.js +0 -0
  275. /package/lib/esm/{shared/hooks → hooks}/useClickOutside.d.ts +0 -0
  276. /package/lib/esm/{shared/hooks → hooks}/useClickOutside.js +0 -0
  277. /package/lib/esm/{shared/services → services}/DateService.d.ts +0 -0
  278. /package/lib/esm/{shared/services → services}/DateService.js +0 -0
@@ -0,0 +1,69 @@
1
+ @import "../../assets/styles";
2
+
3
+
4
+ .switch {
5
+ position: relative;
6
+ display: inline-block;
7
+ width: 34px;
8
+ height: 14px;
9
+ }
10
+
11
+
12
+ .switch__input {
13
+ opacity: 0;
14
+ width: 0;
15
+ height: 0;
16
+ }
17
+
18
+ /* The slider */
19
+ .switch__slider {
20
+ position: absolute;
21
+ cursor: pointer;
22
+ top: 0;
23
+ left: 0;
24
+ right: 0;
25
+ bottom: 0;
26
+ background-color: $color-neutral-light;
27
+ -webkit-transition: .4s;
28
+ transition: .4s;
29
+ border-radius: 7px;
30
+ }
31
+
32
+ .switch__slider:before {
33
+ position: absolute;
34
+ content: "";
35
+ height: 20px;
36
+ width: 20px;
37
+ left: -3px;
38
+ bottom: -3px;
39
+ background-color: white;
40
+ -webkit-transition: .4s;
41
+ transition: .4s;
42
+ border-radius: 50%;
43
+ box-shadow: $box-shadow;
44
+ }
45
+
46
+ .switch__input:checked + .switch__slider {
47
+ background-color: $color-orange-400;
48
+ }
49
+
50
+ .switch__input:checked + .switch__slider:before {
51
+ -webkit-transform: translateX(22px);
52
+ -ms-transform: translateX(22px);
53
+ transform: translateX(22px);
54
+ background: $color-secondary;
55
+ }
56
+
57
+ .switch_small{
58
+ width: 26px;
59
+ height: 10px;
60
+ & .switch__slider:before{
61
+ width: 16px;
62
+ height: 16px;
63
+ }
64
+ & .switch__input:checked + .switch__slider:before {
65
+ -webkit-transform: translateX(20px);
66
+ -ms-transform: translateX(20px);
67
+ transform: translateX(18px);
68
+ }
69
+ }
@@ -0,0 +1,4 @@
1
+ import { TextFieldProps } from '../TextField/TextField';
2
+ export type TextAreaProps = {} & TextFieldProps;
3
+ declare const TextArea: (props: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default TextArea;
@@ -0,0 +1,41 @@
1
+ "use client";
2
+
3
+ import TextField from '../TextField/TextField';
4
+ import { useEffect, useRef, useState } from 'react';
5
+ import clsx from 'clsx';
6
+ import css from './TextArea.module.scss';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { Fragment as _Fragment } from "react/jsx-runtime";
9
+ const TextArea = props => {
10
+ var _textareaRef$current, _textareaRef$current2;
11
+ let {
12
+ onChange,
13
+ className,
14
+ ...restProps
15
+ } = props;
16
+ let [value, setValue] = useState('');
17
+ let [minHeight, setMinHeight] = useState(0);
18
+ let textareaRef = useRef();
19
+ const handleChange = e => {
20
+ setValue(e.target.value);
21
+ if (onChange) onChange(e);
22
+ };
23
+ useEffect(() => {
24
+ if (textareaRef.current) setMinHeight(textareaRef.current.clientHeight);
25
+ }, [textareaRef]);
26
+ let textHeight = (((_textareaRef$current = textareaRef.current) == null ? void 0 : _textareaRef$current.scrollHeight) || 0) < minHeight ? minHeight : (_textareaRef$current2 = textareaRef.current) == null ? void 0 : _textareaRef$current2.scrollHeight;
27
+ return /*#__PURE__*/_jsx(_Fragment, {
28
+ children: /*#__PURE__*/_jsx(TextField, {
29
+ ref: textareaRef,
30
+ value: value,
31
+ ...restProps,
32
+ className: clsx(css.textarea, css['size_' + restProps.size], className),
33
+ onChange: handleChange,
34
+ multiline: true,
35
+ style: {
36
+ height: textHeight + 'px'
37
+ }
38
+ })
39
+ });
40
+ };
41
+ export default TextArea;
@@ -0,0 +1,15 @@
1
+ @import "../../assets/styles";
2
+
3
+ .textarea{
4
+ font-family: $font-family;
5
+ height: auto;
6
+ min-height: $size-elarge;
7
+ &.size_small{
8
+ height: auto;
9
+ min-height: $size-large;
10
+ }
11
+ & textarea{
12
+ resize: none;
13
+ appearance: none;
14
+ }
15
+ }
@@ -0,0 +1,40 @@
1
+ import { ElementType, HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
+ import { SizeType, VariantType } from '../../shared/types/theme';
3
+ export type TextFieldProps = {
4
+ label?: string;
5
+ size?: Exclude<SizeType, 'extraLarge' | 'medium'>;
6
+ variant?: VariantType;
7
+ error?: boolean;
8
+ success?: boolean;
9
+ helperText?: string;
10
+ endAdornment?: string | ReactNode;
11
+ multiline?: boolean;
12
+ } & Omit<InputHTMLAttributes<any>, 'size'>;
13
+ declare const TextField: import("react").ForwardRefExoticComponent<{
14
+ label?: string | undefined;
15
+ size?: "small" | "large" | undefined;
16
+ variant?: VariantType | undefined;
17
+ error?: boolean | undefined;
18
+ success?: boolean | undefined;
19
+ helperText?: string | undefined;
20
+ endAdornment?: string | ReactNode;
21
+ multiline?: boolean | undefined;
22
+ } & Omit<InputHTMLAttributes<any>, "size"> & import("react").RefAttributes<unknown>>;
23
+ type ContainerPropsType = {
24
+ focused?: boolean;
25
+ disabled?: boolean;
26
+ error?: boolean;
27
+ size?: TextFieldProps['size'];
28
+ variant?: TextFieldProps['variant'];
29
+ } & HTMLAttributes<HTMLDivElement>;
30
+ export declare const TextFieldContainer: (props: ContainerPropsType) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const TextFieldInput: import("react").ForwardRefExoticComponent<{
32
+ Component?: ElementType | undefined;
33
+ focused?: boolean | undefined;
34
+ size?: TextFieldProps['size'];
35
+ variant?: TextFieldProps['variant'];
36
+ multiline?: boolean | undefined;
37
+ error?: boolean | undefined;
38
+ label?: string | undefined;
39
+ } & Omit<InputHTMLAttributes<any>, "size"> & import("react").RefAttributes<unknown>>;
40
+ export default TextField;
@@ -0,0 +1,147 @@
1
+ "use client";
2
+
3
+ import { forwardRef, useRef, useState } from 'react';
4
+ import css from './TextField.module.scss';
5
+ import clsx from 'clsx';
6
+ import HelperText from '../../Typography/HelperText/HelperText';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { Fragment as _Fragment } from "react/jsx-runtime";
10
+ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11
+ let {
12
+ error,
13
+ success,
14
+ label,
15
+ helperText,
16
+ size = 'large',
17
+ variant = 'solid',
18
+ endAdornment,
19
+ className,
20
+ multiline = false,
21
+ ...inputProps
22
+ } = props;
23
+ let [value, setValue] = useState('');
24
+ let [focused, setFocused] = useState(false);
25
+ const inputRef = useRef();
26
+ const handleFocus = e => {
27
+ setFocused(true);
28
+ if (inputProps.onFocus) inputProps.onFocus(e);
29
+ };
30
+ const handleBlur = e => {
31
+ setFocused(false);
32
+ if (inputProps.onBlur) inputProps.onBlur(e);
33
+ };
34
+ let endContent = /*#__PURE__*/_jsxs("div", {
35
+ className: css.textfield__adornment,
36
+ children: [/*#__PURE__*/_jsx("div", {
37
+ className: css.textfield__icon,
38
+ children: endAdornment
39
+ }), error && /*#__PURE__*/_jsx("div", {
40
+ className: clsx('material_icon', 'text_error', css.textfield__icon),
41
+ children: "error_outline"
42
+ }), success && /*#__PURE__*/_jsx("div", {
43
+ className: clsx('material_icon', 'text_success', css.textfield__icon),
44
+ children: "done"
45
+ })]
46
+ });
47
+ let endContentExists = endAdornment || error || success;
48
+ let Component = multiline ? 'textarea' : 'input';
49
+ let realRef = ref || inputRef;
50
+ return /*#__PURE__*/_jsxs(_Fragment, {
51
+ children: [/*#__PURE__*/_jsxs(TextFieldContainer, {
52
+ size: size,
53
+ variant: variant,
54
+ disabled: inputProps.disabled,
55
+ focused: focused,
56
+ onClick: () => {
57
+ var _realRef$current;
58
+ return (_realRef$current = realRef.current) == null ? void 0 : _realRef$current.focus();
59
+ },
60
+ className: className,
61
+ error: error,
62
+ children: [/*#__PURE__*/_jsx(TextFieldInput, {
63
+ Component: Component,
64
+ ref: realRef,
65
+ value: value,
66
+ onChange: e => setValue(e.target.value),
67
+ size: size,
68
+ variant: variant,
69
+ label: label,
70
+ focused: focused,
71
+ error: error,
72
+ multiline: multiline,
73
+ onFocus: handleFocus,
74
+ onBlur: handleBlur,
75
+ ...inputProps
76
+ }), endContentExists && endContent]
77
+ }), helperText && /*#__PURE__*/_jsx(HelperText, {
78
+ className: css.textfield__helperText,
79
+ error: error,
80
+ children: helperText
81
+ })]
82
+ });
83
+ });
84
+ export const TextFieldContainer = props => {
85
+ let {
86
+ focused,
87
+ disabled,
88
+ variant,
89
+ size,
90
+ className,
91
+ children,
92
+ error,
93
+ ...restProps
94
+ } = props;
95
+ return /*#__PURE__*/_jsx(_Fragment, {
96
+ children: /*#__PURE__*/_jsx("div", {
97
+ ...restProps,
98
+ className: clsx(css.textfield, css['textfield_' + variant], css['size_' + size], {
99
+ [css._focused]: focused,
100
+ [css._disabled]: disabled,
101
+ [css._error]: error
102
+ }, className),
103
+ children: children
104
+ })
105
+ });
106
+ };
107
+ export const TextFieldInput = /*#__PURE__*/forwardRef((props, ref) => {
108
+ let {
109
+ Component = 'input',
110
+ size,
111
+ variant,
112
+ multiline,
113
+ error,
114
+ focused,
115
+ label,
116
+ value,
117
+ className,
118
+ ...inputProps
119
+ } = props;
120
+ return /*#__PURE__*/_jsx(_Fragment, {
121
+ children: /*#__PURE__*/_jsxs("div", {
122
+ className: clsx(css.textfield__container, css['size_' + size], {
123
+ [css._label]: !!label,
124
+ [css.textfield__container_outlined]: variant === 'outlined'
125
+ }),
126
+ children: [/*#__PURE__*/_jsx(Component, {
127
+ ref: ref,
128
+ value: value,
129
+ ...inputProps,
130
+ className: clsx(css.textfield__input, css['size_' + size], css['textfield__input_' + variant], {
131
+ [css._label]: !!label,
132
+ [css._focused]: focused,
133
+ [css._error]: !!error,
134
+ [css.textarea]: multiline
135
+ }, className)
136
+ }), label && /*#__PURE__*/_jsx("span", {
137
+ className: clsx(css.textfield__label, {
138
+ [css.textfield__label_focused]: focused || !!value || !!props.value,
139
+ [css.textfield__label_small]: size === 'small',
140
+ [css.textfield__label_error]: error
141
+ }),
142
+ children: label
143
+ })]
144
+ })
145
+ });
146
+ });
147
+ export default TextField;
@@ -0,0 +1,160 @@
1
+ @import "../../assets/styles";
2
+
3
+ .textfield{
4
+ position: relative;
5
+ overflow: hidden;
6
+ border-radius: $radius;
7
+ border: 1px solid $color-gray-400;
8
+ background-color: #fff;
9
+ height: $size-elarge;
10
+ @include flex();
11
+ &:hover{
12
+ border-color: $color-gray-600;
13
+ }
14
+ &._focused{
15
+ border-color: $color-gray-800;
16
+ }
17
+ &._disabled{
18
+ pointer-events: none;
19
+ background: $color-gray-100;
20
+ border-color: transparent;
21
+ & .textfield__label{
22
+ color: $color-gray-600;
23
+ }
24
+ }
25
+ &.size_small{
26
+ height: $size-large;
27
+ font-size: 14px;
28
+ }
29
+ &_outlined{
30
+ border-top:none;
31
+ border-left: none;
32
+ border-right: none;
33
+ border-radius: 0;
34
+ }
35
+ }
36
+ .textfield__container{
37
+ cursor: text;
38
+ position: relative;
39
+ padding: 11px 12px 8px;
40
+ width: 100%;
41
+ &._label{
42
+ padding: 25px 12px 8px;
43
+ }
44
+ &.size_small{
45
+ &._label{
46
+ padding: 18px 12px 4px
47
+ }
48
+ }
49
+ }
50
+ .textfield__container_outlined{
51
+ padding-left: 0 !important;
52
+ & .textfield__label{
53
+ padding-left: 0;
54
+ }
55
+ }
56
+ .textfield__input{
57
+ display: block;
58
+ width: 100%;
59
+ font-size: 16px;
60
+ outline: none;
61
+ background: transparent;
62
+ border: none;
63
+ padding: 0;
64
+ height: 23px;
65
+ &:focus{
66
+ border-color: $color-gray-800;
67
+ }
68
+ &.size_small{
69
+ font-size: 14px;
70
+ height: 20px;
71
+ }
72
+ &._label::placeholder{
73
+ opacity: 0;
74
+ }
75
+ }
76
+ ._error{
77
+ border-color: $color-error-dark;
78
+ }
79
+
80
+ .textfield__label_small{
81
+ font-size: 14px;
82
+ }
83
+ .textfield__label{
84
+ pointer-events: none;
85
+ color: $color-gray-600;
86
+ position: absolute;
87
+ top: 12px;
88
+ padding-left: 12px;
89
+ left: 1px;
90
+ font-size: 16px;
91
+ transition: 0.2s all ease;
92
+ width: calc(100% - 2px);
93
+ padding-top:8px;
94
+ &_small{
95
+ top: 4px;
96
+ }
97
+ &_focused{
98
+ font-size: 12px;
99
+ transform: none;
100
+ top: 1px;
101
+ &.textfield__label_small{
102
+ padding-top:4px
103
+ }
104
+ }
105
+ }
106
+
107
+ .textfield__input_outlined{
108
+ border-left:none;
109
+ border-top:none;
110
+ border-right: none;
111
+ padding-left: 0 !important;
112
+ &:focus,
113
+ &:hover{
114
+ border-left:none;
115
+ border-top:none;
116
+ border-right: none;
117
+ }
118
+ border-radius: 0;
119
+ & + .textfield__label{
120
+ left:0;
121
+ }
122
+ &:disabled{
123
+ border-bottom-color: $color-gray-400;
124
+ border-bottom-style: dotted;
125
+ background: transparent;
126
+ & + .textfield__label{
127
+ color: $color-gray-400;
128
+ }
129
+ }
130
+ }
131
+
132
+ .textfield__label_error{
133
+ color: $color-error-dark;
134
+ }
135
+ .textfield__adornment{
136
+ @include flex();
137
+ position: relative;
138
+ z-index: 5;
139
+ height: 100%;
140
+ padding-right: 10px;
141
+ & > *{
142
+ margin-left: $size-step;
143
+ }
144
+ }
145
+ .textfield__helperText{
146
+ margin-top: calc($size-step / 2);
147
+ }
148
+ ._disabled{
149
+ & + .textfield__helperText{
150
+ color: $color-gray-600;
151
+ }
152
+ & .textfield_outlined{
153
+ & .textfield__helperText{
154
+ color: $color-gray-400;
155
+ }
156
+ }
157
+ & .textfield__icon{
158
+ color: $color-gray-400;
159
+ }
160
+ }
@@ -0,0 +1,10 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export type ListItemProps = {
3
+ active?: boolean;
4
+ checked?: boolean;
5
+ divider?: boolean;
6
+ endAdornment?: string | ReactNode;
7
+ startAdornment?: string | ReactNode;
8
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
9
+ declare const ListItem: (props: ListItemProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default ListItem;
@@ -0,0 +1,53 @@
1
+ import css from './ListItem.module.scss';
2
+ import clsx from 'clsx';
3
+ import Checkbox from '../Form/Checkbox/Checkbox';
4
+ import Adornment, { AdornmentContainer } from '../Adornment/Adornment';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
+ import { Fragment as _Fragment } from "react/jsx-runtime";
8
+ const ListItem = props => {
9
+ let {
10
+ children,
11
+ className,
12
+ active,
13
+ divider,
14
+ checked,
15
+ startAdornment,
16
+ endAdornment,
17
+ ...restProps
18
+ } = props;
19
+ let withStartAdornment = checked !== undefined || !!startAdornment;
20
+ return /*#__PURE__*/_jsx(_Fragment, {
21
+ children: /*#__PURE__*/_jsxs("button", {
22
+ ...restProps,
23
+ className: clsx(css.listitem, className, {
24
+ [css.listitem_active]: !!active || !!checked,
25
+ [css.listitem_divider]: !!divider,
26
+ [css.listitem_endAdornment]: !!endAdornment,
27
+ [css.listitem_startAdornment]: withStartAdornment
28
+ }),
29
+ children: [withStartAdornment && /*#__PURE__*/_jsxs(AdornmentContainer, {
30
+ children: [checked !== undefined && /*#__PURE__*/_jsx(Adornment, {
31
+ position: 'start',
32
+ children: /*#__PURE__*/_jsx(Checkbox, {
33
+ checked: checked,
34
+ size: 'small'
35
+ })
36
+ }), !!startAdornment && /*#__PURE__*/_jsx(Adornment, {
37
+ position: 'start',
38
+ children: startAdornment
39
+ })]
40
+ }), /*#__PURE__*/_jsx("span", {
41
+ className: css.listitemText,
42
+ children: children
43
+ }), !!endAdornment && /*#__PURE__*/_jsx(AdornmentContainer, {
44
+ position: 'end',
45
+ children: /*#__PURE__*/_jsx(Adornment, {
46
+ position: 'end',
47
+ children: endAdornment
48
+ })
49
+ })]
50
+ })
51
+ });
52
+ };
53
+ export default ListItem;
@@ -0,0 +1,34 @@
1
+ @import "../assets/styles";
2
+
3
+ .listitem{
4
+ outline: none;
5
+ padding: calc($size-step * 1.5) calc($size-step * 2);
6
+ color: $color-neutral;
7
+ background: transparent;
8
+ @include transition(0.3s, background);
9
+ @include flex();
10
+ width: 100%;
11
+ border: none;
12
+ text-align: left;
13
+ cursor: pointer;
14
+ &:hover{
15
+ background: $color-gray-50;
16
+ }
17
+ &.listitem_active,
18
+ &:active{
19
+ background: rgba($color-primary, 0.1);
20
+ }
21
+ }
22
+ .listitem_startAdornment{
23
+
24
+ }
25
+ .listitem_endAdornment{
26
+
27
+ }
28
+ .listitem_divider{
29
+ border-bottom: 1px solid $color-gray-200;
30
+ }
31
+ .listitemText{
32
+ display: block;
33
+ margin: 0 calc($size-step * 2);
34
+ }
@@ -0,0 +1,6 @@
1
+ import { SizeType } from '../shared/types/theme';
2
+ export type LoaderProps = {
3
+ size?: SizeType;
4
+ };
5
+ declare const Loader: (props: LoaderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Loader;