@mirai/ui 1.0.64 → 1.0.66

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 (264) hide show
  1. package/build/components/Button/Button.js +17 -29
  2. package/build/components/Button/Button.js.map +1 -1
  3. package/build/components/Button/Button.stories.js +4 -11
  4. package/build/components/Button/Button.stories.js.map +1 -1
  5. package/build/components/Button/index.js +0 -2
  6. package/build/components/Button/index.js.map +1 -1
  7. package/build/components/Calendar/Calendar.Month.js +22 -41
  8. package/build/components/Calendar/Calendar.Month.js.map +1 -1
  9. package/build/components/Calendar/Calendar.Week.js +36 -58
  10. package/build/components/Calendar/Calendar.Week.js.map +1 -1
  11. package/build/components/Calendar/Calendar.Weekdays.js +0 -10
  12. package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
  13. package/build/components/Calendar/Calendar.constants.js.map +1 -1
  14. package/build/components/Calendar/Calendar.js +45 -90
  15. package/build/components/Calendar/Calendar.js.map +1 -1
  16. package/build/components/Calendar/Calendar.stories.js +4 -21
  17. package/build/components/Calendar/Calendar.stories.js.map +1 -1
  18. package/build/components/Calendar/helpers/getFirstDateOfMonth.js +0 -3
  19. package/build/components/Calendar/helpers/getFirstDateOfMonth.js.map +1 -1
  20. package/build/components/Calendar/helpers/getFirstDateOfWeek.js +0 -4
  21. package/build/components/Calendar/helpers/getFirstDateOfWeek.js.map +1 -1
  22. package/build/components/Calendar/helpers/getFirstDayOfWeek.js +0 -2
  23. package/build/components/Calendar/helpers/getFirstDayOfWeek.js.map +1 -1
  24. package/build/components/Calendar/helpers/getHeader.js +0 -3
  25. package/build/components/Calendar/helpers/getHeader.js.map +1 -1
  26. package/build/components/Calendar/helpers/getScrollTo.js +6 -19
  27. package/build/components/Calendar/helpers/getScrollTo.js.map +1 -1
  28. package/build/components/Calendar/helpers/getToday.js +0 -3
  29. package/build/components/Calendar/helpers/getToday.js.map +1 -1
  30. package/build/components/Calendar/helpers/getWeekDays.js +0 -5
  31. package/build/components/Calendar/helpers/getWeekDays.js.map +1 -1
  32. package/build/components/Calendar/helpers/getWeekNumber.js +0 -3
  33. package/build/components/Calendar/helpers/getWeekNumber.js.map +1 -1
  34. package/build/components/Calendar/helpers/index.js +0 -16
  35. package/build/components/Calendar/helpers/index.js.map +1 -1
  36. package/build/components/Calendar/index.js +0 -2
  37. package/build/components/Calendar/index.js.map +1 -1
  38. package/build/components/Form/Form.constants.js.map +1 -1
  39. package/build/components/Form/Form.js +39 -76
  40. package/build/components/Form/Form.js.map +1 -1
  41. package/build/components/Form/Form.stories.js +8 -16
  42. package/build/components/Form/Form.stories.js.map +1 -1
  43. package/build/components/Form/helpers/getChildrenErrors.js +10 -21
  44. package/build/components/Form/helpers/getChildrenErrors.js.map +1 -1
  45. package/build/components/Form/helpers/getChildrenValues.js +11 -25
  46. package/build/components/Form/helpers/getChildrenValues.js.map +1 -1
  47. package/build/components/Form/helpers/getField.js +2 -5
  48. package/build/components/Form/helpers/getField.js.map +1 -1
  49. package/build/components/Form/helpers/groupState.js +6 -9
  50. package/build/components/Form/helpers/groupState.js.map +1 -1
  51. package/build/components/Form/helpers/index.js +0 -8
  52. package/build/components/Form/helpers/index.js.map +1 -1
  53. package/build/components/Form/index.js +0 -2
  54. package/build/components/Form/index.js.map +1 -1
  55. package/build/components/InputDate/InputDate.js +35 -66
  56. package/build/components/InputDate/InputDate.js.map +1 -1
  57. package/build/components/InputDate/InputDate.stories.js +6 -20
  58. package/build/components/InputDate/InputDate.stories.js.map +1 -1
  59. package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +5 -1
  60. package/build/components/InputDate/index.js +0 -2
  61. package/build/components/InputDate/index.js.map +1 -1
  62. package/build/components/InputNumber/InputNumber.js +16 -30
  63. package/build/components/InputNumber/InputNumber.js.map +1 -1
  64. package/build/components/InputNumber/InputNumber.module.css +6 -2
  65. package/build/components/InputNumber/InputNumber.stories.js +4 -13
  66. package/build/components/InputNumber/InputNumber.stories.js.map +1 -1
  67. package/build/components/InputNumber/index.js +0 -2
  68. package/build/components/InputNumber/index.js.map +1 -1
  69. package/build/components/InputOption/InputOption.constants.js.map +1 -1
  70. package/build/components/InputOption/InputOption.js +14 -30
  71. package/build/components/InputOption/InputOption.js.map +1 -1
  72. package/build/components/InputOption/InputOption.stories.js +4 -14
  73. package/build/components/InputOption/InputOption.stories.js.map +1 -1
  74. package/build/components/InputOption/index.js +0 -4
  75. package/build/components/InputOption/index.js.map +1 -1
  76. package/build/components/InputSelect/InputSelect.js +20 -48
  77. package/build/components/InputSelect/InputSelect.js.map +1 -1
  78. package/build/components/InputSelect/InputSelect.stories.js +4 -17
  79. package/build/components/InputSelect/InputSelect.stories.js.map +1 -1
  80. package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +9 -9
  81. package/build/components/InputSelect/index.js +0 -2
  82. package/build/components/InputSelect/index.js.map +1 -1
  83. package/build/components/InputText/InputText.js +24 -52
  84. package/build/components/InputText/InputText.js.map +1 -1
  85. package/build/components/InputText/InputText.module.css +4 -1
  86. package/build/components/InputText/InputText.stories.js +4 -25
  87. package/build/components/InputText/InputText.stories.js.map +1 -1
  88. package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +11 -3
  89. package/build/components/InputText/index.js +0 -2
  90. package/build/components/InputText/index.js.map +1 -1
  91. package/build/components/Menu/Menu.Option.js +8 -21
  92. package/build/components/Menu/Menu.Option.js.map +1 -1
  93. package/build/components/Menu/Menu.js +11 -29
  94. package/build/components/Menu/Menu.js.map +1 -1
  95. package/build/components/Menu/Menu.stories.js +4 -13
  96. package/build/components/Menu/Menu.stories.js.map +1 -1
  97. package/build/components/Menu/index.js +0 -2
  98. package/build/components/Menu/index.js.map +1 -1
  99. package/build/components/Modal/Modal.js +13 -29
  100. package/build/components/Modal/Modal.js.map +1 -1
  101. package/build/components/Modal/Modal.stories.js +4 -11
  102. package/build/components/Modal/Modal.stories.js.map +1 -1
  103. package/build/components/Modal/index.js +0 -2
  104. package/build/components/Modal/index.js.map +1 -1
  105. package/build/components/Notification/Notification.js +9 -22
  106. package/build/components/Notification/Notification.js.map +1 -1
  107. package/build/components/Notification/Notification.module.css +0 -13
  108. package/build/components/Notification/Notification.stories.js +4 -11
  109. package/build/components/Notification/Notification.stories.js.map +1 -1
  110. package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +6 -2
  111. package/build/components/Notification/index.js +0 -2
  112. package/build/components/Notification/index.js.map +1 -1
  113. package/build/components/Table/Table.Row.js +13 -26
  114. package/build/components/Table/Table.Row.js.map +1 -1
  115. package/build/components/Table/Table.js +17 -43
  116. package/build/components/Table/Table.js.map +1 -1
  117. package/build/components/Table/Table.stories.js +4 -12
  118. package/build/components/Table/Table.stories.js.map +1 -1
  119. package/build/components/Table/helpers/index.js +0 -2
  120. package/build/components/Table/helpers/index.js.map +1 -1
  121. package/build/components/Table/helpers/select.js +3 -7
  122. package/build/components/Table/helpers/select.js.map +1 -1
  123. package/build/components/Table/index.js +0 -2
  124. package/build/components/Table/index.js.map +1 -1
  125. package/build/components/Tooltip/Tooltip.js +11 -35
  126. package/build/components/Tooltip/Tooltip.js.map +1 -1
  127. package/build/components/Tooltip/Tooltip.stories.js +4 -11
  128. package/build/components/Tooltip/Tooltip.stories.js.map +1 -1
  129. package/build/components/Tooltip/index.js +0 -2
  130. package/build/components/Tooltip/index.js.map +1 -1
  131. package/build/components/index.js +0 -26
  132. package/build/components/index.js.map +1 -1
  133. package/build/helpers/getIconState.js +3 -7
  134. package/build/helpers/getIconState.js.map +1 -1
  135. package/build/helpers/getInputDateErrors.js +9 -13
  136. package/build/helpers/getInputDateErrors.js.map +1 -1
  137. package/build/helpers/getInputErrors.js +21 -30
  138. package/build/helpers/getInputErrors.js.map +1 -1
  139. package/build/helpers/index.js +11 -10
  140. package/build/helpers/index.js.map +1 -1
  141. package/build/helpers/isJest.js +0 -3
  142. package/build/helpers/isJest.js.map +1 -1
  143. package/build/helpers/isValidDate.js +8 -28
  144. package/build/helpers/isValidDate.js.map +1 -1
  145. package/build/helpers/isValidEmail.js +0 -1
  146. package/build/helpers/isValidEmail.js.map +1 -1
  147. package/build/helpers/isValidPhone.js +3 -9
  148. package/build/helpers/isValidPhone.js.map +1 -1
  149. package/build/helpers/splitDate.js +16 -0
  150. package/build/helpers/splitDate.js.map +1 -0
  151. package/build/helpers/styles.js +0 -3
  152. package/build/helpers/styles.js.map +1 -1
  153. package/build/hooks/helpers/getNavigator.js +2 -5
  154. package/build/hooks/helpers/getNavigator.js.map +1 -1
  155. package/build/hooks/helpers/getResolution.js +4 -7
  156. package/build/hooks/helpers/getResolution.js.map +1 -1
  157. package/build/hooks/helpers/index.js +0 -4
  158. package/build/hooks/helpers/index.js.map +1 -1
  159. package/build/hooks/index.js +0 -2
  160. package/build/hooks/index.js.map +1 -1
  161. package/build/hooks/useDevice.js +8 -20
  162. package/build/hooks/useDevice.js.map +1 -1
  163. package/build/hooks/useDevice.stories.js +3 -19
  164. package/build/hooks/useDevice.stories.js.map +1 -1
  165. package/build/index.js +0 -10
  166. package/build/index.js.map +1 -1
  167. package/build/primitives/Checkbox/Checkbox.js +8 -20
  168. package/build/primitives/Checkbox/Checkbox.js.map +1 -1
  169. package/build/primitives/Checkbox/Checkbox.stories.js +4 -11
  170. package/build/primitives/Checkbox/Checkbox.stories.js.map +1 -1
  171. package/build/primitives/Checkbox/index.js +0 -2
  172. package/build/primitives/Checkbox/index.js.map +1 -1
  173. package/build/primitives/Icon/Icon.constants.js +2 -4
  174. package/build/primitives/Icon/Icon.constants.js.map +1 -1
  175. package/build/primitives/Icon/Icon.js +11 -22
  176. package/build/primitives/Icon/Icon.js.map +1 -1
  177. package/build/primitives/Icon/Icon.stories.js +7 -24
  178. package/build/primitives/Icon/Icon.stories.js.map +1 -1
  179. package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +6 -2
  180. package/build/primitives/Icon/index.js +0 -3
  181. package/build/primitives/Icon/index.js.map +1 -1
  182. package/build/primitives/Input/Input.js +15 -28
  183. package/build/primitives/Input/Input.js.map +1 -1
  184. package/build/primitives/Input/Input.stories.js +4 -11
  185. package/build/primitives/Input/Input.stories.js.map +1 -1
  186. package/build/primitives/Input/helpers/index.js +0 -2
  187. package/build/primitives/Input/helpers/index.js.map +1 -1
  188. package/build/primitives/Input/helpers/parseValue.js +2 -5
  189. package/build/primitives/Input/helpers/parseValue.js.map +1 -1
  190. package/build/primitives/Input/index.js +0 -2
  191. package/build/primitives/Input/index.js.map +1 -1
  192. package/build/primitives/Layer/Layer.js +25 -55
  193. package/build/primitives/Layer/Layer.js.map +1 -1
  194. package/build/primitives/Layer/Layer.stories.js +4 -13
  195. package/build/primitives/Layer/Layer.stories.js.map +1 -1
  196. package/build/primitives/Layer/LayerContent.js +0 -4
  197. package/build/primitives/Layer/LayerContent.js.map +1 -1
  198. package/build/primitives/Layer/helpers/getElementLayout.js +3 -5
  199. package/build/primitives/Layer/helpers/getElementLayout.js.map +1 -1
  200. package/build/primitives/Layer/helpers/getLayerPosition.js +18 -24
  201. package/build/primitives/Layer/helpers/getLayerPosition.js.map +1 -1
  202. package/build/primitives/Layer/helpers/index.js +0 -4
  203. package/build/primitives/Layer/helpers/index.js.map +1 -1
  204. package/build/primitives/Layer/index.js +0 -4
  205. package/build/primitives/Layer/index.js.map +1 -1
  206. package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
  207. package/build/primitives/Pressable/Pressable.js +14 -26
  208. package/build/primitives/Pressable/Pressable.js.map +1 -1
  209. package/build/primitives/Pressable/Pressable.module.css +1 -0
  210. package/build/primitives/Pressable/Pressable.stories.js +4 -11
  211. package/build/primitives/Pressable/Pressable.stories.js.map +1 -1
  212. package/build/primitives/Pressable/index.js +0 -2
  213. package/build/primitives/Pressable/index.js.map +1 -1
  214. package/build/primitives/Radio/Radio.js +7 -19
  215. package/build/primitives/Radio/Radio.js.map +1 -1
  216. package/build/primitives/Radio/Radio.stories.js +4 -11
  217. package/build/primitives/Radio/Radio.stories.js.map +1 -1
  218. package/build/primitives/Radio/index.js +0 -2
  219. package/build/primitives/Radio/index.js.map +1 -1
  220. package/build/primitives/ScrollView/ScrollView.js +27 -45
  221. package/build/primitives/ScrollView/ScrollView.js.map +1 -1
  222. package/build/primitives/ScrollView/ScrollView.stories.js +6 -16
  223. package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
  224. package/build/primitives/ScrollView/index.js +0 -2
  225. package/build/primitives/ScrollView/index.js.map +1 -1
  226. package/build/primitives/Select/Select.js +14 -31
  227. package/build/primitives/Select/Select.js.map +1 -1
  228. package/build/primitives/Select/Select.module.css +1 -0
  229. package/build/primitives/Select/Select.stories.js +4 -19
  230. package/build/primitives/Select/Select.stories.js.map +1 -1
  231. package/build/primitives/Select/index.js +0 -2
  232. package/build/primitives/Select/index.js.map +1 -1
  233. package/build/primitives/Switch/Switch.js +5 -18
  234. package/build/primitives/Switch/Switch.js.map +1 -1
  235. package/build/primitives/Switch/Switch.stories.js +4 -11
  236. package/build/primitives/Switch/Switch.stories.js.map +1 -1
  237. package/build/primitives/Switch/index.js +0 -2
  238. package/build/primitives/Switch/index.js.map +1 -1
  239. package/build/primitives/Text/Text.js +14 -25
  240. package/build/primitives/Text/Text.js.map +1 -1
  241. package/build/primitives/Text/Text.stories.js +4 -11
  242. package/build/primitives/Text/Text.stories.js.map +1 -1
  243. package/build/primitives/Text/index.js +0 -2
  244. package/build/primitives/Text/index.js.map +1 -1
  245. package/build/primitives/View/View.js +9 -20
  246. package/build/primitives/View/View.js.map +1 -1
  247. package/build/primitives/View/View.stories.js +4 -11
  248. package/build/primitives/View/View.stories.js.map +1 -1
  249. package/build/primitives/View/index.js +0 -2
  250. package/build/primitives/View/index.js.map +1 -1
  251. package/build/primitives/index.js +0 -22
  252. package/build/primitives/index.js.map +1 -1
  253. package/build/theme/default.theme.css +19 -19
  254. package/build/theme/helpers/camelcase.js +0 -2
  255. package/build/theme/helpers/camelcase.js.map +1 -1
  256. package/build/theme/helpers/colorShade.js +0 -4
  257. package/build/theme/helpers/colorShade.js.map +1 -1
  258. package/build/theme/helpers/index.js +0 -4
  259. package/build/theme/helpers/index.js.map +1 -1
  260. package/build/theme/index.js +0 -2
  261. package/build/theme/index.js.map +1 -1
  262. package/build/theme/theme.js +1 -14
  263. package/build/theme/theme.js.map +1 -1
  264. package/package.json +14 -16
@@ -1,31 +1,24 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = exports.Story = void 0;
9
-
10
7
  var React = _interopRequireWildcard(require("react"));
11
-
12
8
  var _InputSelect = require("./InputSelect");
13
-
14
9
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
10
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
-
11
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
20
15
  var _default = {
21
16
  title: 'Components'
22
17
  };
23
18
  exports.default = _default;
24
-
25
19
  var Story = function Story(props) {
26
20
  return /*#__PURE__*/React.createElement(_InputSelect.InputSelect, props);
27
21
  };
28
-
29
22
  exports.Story = Story;
30
23
  Story.storyName = 'InputSelect';
31
24
  Story.args = _defineProperty({
@@ -38,29 +31,23 @@ Story.args = _defineProperty({
38
31
  value: 'two',
39
32
  onChange: function onChange() {
40
33
  var _console;
41
-
42
34
  for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
43
35
  props[_key] = arguments[_key];
44
36
  }
45
-
46
37
  return (_console = console).log.apply(_console, ['<InputSelect>::onChange'].concat(props));
47
38
  },
48
39
  onEnter: function onEnter() {
49
40
  var _console2;
50
-
51
41
  for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
52
42
  props[_key2] = arguments[_key2];
53
43
  }
54
-
55
44
  return (_console2 = console).log.apply(_console2, ['<InputSelect>::onEnter'].concat(props));
56
45
  },
57
46
  onLeave: function onLeave() {
58
47
  var _console3;
59
-
60
48
  for (var _len3 = arguments.length, props = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
61
49
  props[_key3] = arguments[_key3];
62
50
  }
63
-
64
51
  return (_console3 = console).log.apply(_console3, ['<InputSelect>::onLeave'].concat(props));
65
52
  }
66
53
  }, 'data-testid', 'test-story');
@@ -1 +1 @@
1
- {"version":3,"file":"InputSelect.stories.js","names":["title","Story","props","storyName","args","disabled","error","hint","label","name","options","value","onChange","console","log","onEnter","onLeave","argTypes"],"sources":["../../../src/components/InputSelect/InputSelect.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { InputSelect } from './InputSelect';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputSelect {...props} />;\n\nStory.storyName = 'InputSelect';\n\nStory.args = {\n disabled: false,\n error: false,\n hint: 'hint',\n label: 'label',\n name: 'name',\n options: ['one', 'two', 'three', 'four', 'five'],\n value: 'two',\n onChange: (...props) => console.log('<InputSelect>::onChange', ...props),\n onEnter: (...props) => console.log('<InputSelect>::onEnter', ...props),\n onLeave: (...props) => console.log('<InputSelect>::onLeave', ...props),\n ['data-testid']: 'test-story',\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,wBAAD,EAAiBA,KAAjB,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,aAAlB;AAEAF,KAAK,CAACG,IAAN;EACEC,QAAQ,EAAE,KADZ;EAEEC,KAAK,EAAE,KAFT;EAGEC,IAAI,EAAE,MAHR;EAIEC,KAAK,EAAE,OAJT;EAKEC,IAAI,EAAE,MALR;EAMEC,OAAO,EAAE,CAAC,KAAD,EAAQ,KAAR,EAAe,OAAf,EAAwB,MAAxB,EAAgC,MAAhC,CANX;EAOEC,KAAK,EAAE,KAPT;EAQEC,QAAQ,EAAE;IAAA;;IAAA,kCAAIV,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,YAAAW,OAAO,EAACC,GAAR,kBAAY,yBAAZ,SAA0CZ,KAA1C,EAAd;EAAA,CARZ;EASEa,OAAO,EAAE;IAAA;;IAAA,mCAAIb,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,aAAAW,OAAO,EAACC,GAAR,mBAAY,wBAAZ,SAAyCZ,KAAzC,EAAd;EAAA,CATX;EAUEc,OAAO,EAAE;IAAA;;IAAA,mCAAId,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,aAAAW,OAAO,EAACC,GAAR,mBAAY,wBAAZ,SAAyCZ,KAAzC,EAAd;EAAA;AAVX,GAWG,aAXH,EAWmB,YAXnB;AAcAD,KAAK,CAACgB,QAAN,GAAiB,EAAjB"}
1
+ {"version":3,"file":"InputSelect.stories.js","names":["title","Story","props","storyName","args","disabled","error","hint","label","name","options","value","onChange","console","log","onEnter","onLeave","argTypes"],"sources":["../../../src/components/InputSelect/InputSelect.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { InputSelect } from './InputSelect';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputSelect {...props} />;\n\nStory.storyName = 'InputSelect';\n\nStory.args = {\n disabled: false,\n error: false,\n hint: 'hint',\n label: 'label',\n name: 'name',\n options: ['one', 'two', 'three', 'four', 'five'],\n value: 'two',\n onChange: (...props) => console.log('<InputSelect>::onChange', ...props),\n onEnter: (...props) => console.log('<InputSelect>::onEnter', ...props),\n onLeave: (...props) => console.log('<InputSelect>::onLeave', ...props),\n ['data-testid']: 'test-story',\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;AAAA;AAEA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAE7B;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAE/B,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK;EAAA,oBAAK,oBAAC,wBAAW,EAAKA,KAAK,CAAI;AAAA;AAAC;AAE3DD,KAAK,CAACE,SAAS,GAAG,aAAa;AAE/BF,KAAK,CAACG,IAAI;EACRC,QAAQ,EAAE,KAAK;EACfC,KAAK,EAAE,KAAK;EACZC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;EAChDC,KAAK,EAAE,KAAK;EACZC,QAAQ,EAAE;IAAA;IAAA,kCAAIV,KAAK;MAALA,KAAK;IAAA;IAAA,OAAK,YAAAW,OAAO,EAACC,GAAG,kBAAC,yBAAyB,SAAKZ,KAAK,EAAC;EAAA;EACxEa,OAAO,EAAE;IAAA;IAAA,mCAAIb,KAAK;MAALA,KAAK;IAAA;IAAA,OAAK,aAAAW,OAAO,EAACC,GAAG,mBAAC,wBAAwB,SAAKZ,KAAK,EAAC;EAAA;EACtEc,OAAO,EAAE;IAAA;IAAA,mCAAId,KAAK;MAALA,KAAK;IAAA;IAAA,OAAK,aAAAW,OAAO,EAACC,GAAG,mBAAC,wBAAwB,SAAKZ,KAAK,EAAC;EAAA;AAAA,GACrE,aAAa,EAAG,YAAY,CAC9B;AAEDD,KAAK,CAACgB,QAAQ,GAAG,CAAC,CAAC"}
@@ -39,7 +39,7 @@ exports[`component:<InputSelect> inherit:className 1`] = `
39
39
  </option>
40
40
  </select>
41
41
  <div
42
- class="view row icons"
42
+ class="view row icons select"
43
43
  >
44
44
  <span
45
45
  class="icon headline-3 icon"
@@ -152,7 +152,7 @@ exports[`component:<InputSelect> prop:error 1`] = `
152
152
  </option>
153
153
  </select>
154
154
  <div
155
- class="view row icons"
155
+ class="view row icons select"
156
156
  >
157
157
  <span
158
158
  class="icon headline-3 icon"
@@ -221,7 +221,7 @@ exports[`component:<InputSelect> prop:hint 1`] = `
221
221
  </option>
222
222
  </select>
223
223
  <div
224
- class="view row icons"
224
+ class="view row icons select"
225
225
  >
226
226
  <span
227
227
  class="icon headline-3 icon"
@@ -300,7 +300,7 @@ exports[`component:<InputSelect> prop:label 1`] = `
300
300
  </option>
301
301
  </select>
302
302
  <div
303
- class="view row icons"
303
+ class="view row icons select"
304
304
  >
305
305
  <span
306
306
  class="icon headline-3 icon"
@@ -369,7 +369,7 @@ exports[`component:<InputSelect> prop:label 2`] = `
369
369
  </option>
370
370
  </select>
371
371
  <div
372
- class="view row icons"
372
+ class="view row icons select"
373
373
  >
374
374
  <span
375
375
  class="icon headline-3 icon"
@@ -482,7 +482,7 @@ exports[`component:<InputSelect> prop:warning 1`] = `
482
482
  </option>
483
483
  </select>
484
484
  <div
485
- class="view row icons"
485
+ class="view row icons select"
486
486
  >
487
487
  <span
488
488
  class="icon headline-3 icon"
@@ -519,7 +519,7 @@ exports[`component:<InputSelect> prop:warning 1`] = `
519
519
  xmlns="http://www.w3.org/2000/svg"
520
520
  >
521
521
  <path
522
- d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
522
+ d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
523
523
  />
524
524
  </svg>
525
525
  </span>
@@ -568,7 +568,7 @@ exports[`component:<InputSelect> renders 1`] = `
568
568
  </option>
569
569
  </select>
570
570
  <div
571
- class="view row icons"
571
+ class="view row icons select"
572
572
  >
573
573
  <span
574
574
  class="icon headline-3 icon"
@@ -638,7 +638,7 @@ exports[`component:<InputSelect> testID 1`] = `
638
638
  </option>
639
639
  </select>
640
640
  <div
641
- class="view row icons"
641
+ class="view row icons select"
642
642
  >
643
643
  <span
644
644
  class="icon headline-3 icon"
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _InputSelect = require("./InputSelect");
8
-
9
7
  Object.keys(_InputSelect).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _InputSelect[key]) return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/InputSelect/index.js"],"sourcesContent":["export * from './InputSelect';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/InputSelect/index.js"],"sourcesContent":["export * from './InputSelect';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,93 +1,66 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.InputText = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _react = _interopRequireWildcard(require("react"));
13
-
14
10
  var _helpers = require("../../helpers");
15
-
16
11
  var _primitives = require("../../primitives");
17
-
18
12
  var _InputTextModule = _interopRequireDefault(require("./InputText.module.css"));
19
-
20
13
  var _excluded = ["disabled", "error", "hint", "icon", "label", "showState", "success", "type", "warning", "onChange", "onEnter", "onLeave"];
21
-
22
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
29
-
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
-
32
19
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
33
-
34
20
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
35
-
36
21
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
37
-
38
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
39
-
22
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
40
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
-
42
24
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
43
-
44
25
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
-
46
26
  var InputText = function InputText(_ref) {
47
27
  var _others$value;
48
-
49
28
  var disabled = _ref.disabled,
50
- error = _ref.error,
51
- hint = _ref.hint,
52
- icon = _ref.icon,
53
- label = _ref.label,
54
- _ref$showState = _ref.showState,
55
- showState = _ref$showState === void 0 ? true : _ref$showState,
56
- success = _ref.success,
57
- type = _ref.type,
58
- warning = _ref.warning,
59
- _ref$onChange = _ref.onChange,
60
- onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
61
- _ref$onEnter = _ref.onEnter,
62
- onEnter = _ref$onEnter === void 0 ? function () {} : _ref$onEnter,
63
- _ref$onLeave = _ref.onLeave,
64
- onLeave = _ref$onLeave === void 0 ? function () {} : _ref$onLeave,
65
- others = _objectWithoutProperties(_ref, _excluded);
66
-
29
+ error = _ref.error,
30
+ hint = _ref.hint,
31
+ icon = _ref.icon,
32
+ label = _ref.label,
33
+ _ref$showState = _ref.showState,
34
+ showState = _ref$showState === void 0 ? true : _ref$showState,
35
+ success = _ref.success,
36
+ type = _ref.type,
37
+ warning = _ref.warning,
38
+ _ref$onChange = _ref.onChange,
39
+ onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
40
+ _ref$onEnter = _ref.onEnter,
41
+ onEnter = _ref$onEnter === void 0 ? function () {} : _ref$onEnter,
42
+ _ref$onLeave = _ref.onLeave,
43
+ onLeave = _ref$onLeave === void 0 ? function () {} : _ref$onLeave,
44
+ others = _objectWithoutProperties(_ref, _excluded);
67
45
  var _useState = (0, _react.useState)(false),
68
- _useState2 = _slicedToArray(_useState, 2),
69
- focus = _useState2[0],
70
- setFocus = _useState2[1];
71
-
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ focus = _useState2[0],
48
+ setFocus = _useState2[1];
72
49
  var _useState3 = (0, _react.useState)(true),
73
- _useState4 = _slicedToArray(_useState3, 2),
74
- password = _useState4[0],
75
- setPassword = _useState4[1];
76
-
50
+ _useState4 = _slicedToArray(_useState3, 2),
51
+ password = _useState4[0],
52
+ setPassword = _useState4[1];
77
53
  var handleChange = function handleChange(value, event) {
78
54
  onChange(value, event);
79
55
  };
80
-
81
56
  var handleEnter = function handleEnter(event) {
82
57
  setFocus(true);
83
58
  onEnter(event);
84
59
  };
85
-
86
60
  var handleLeave = function handleLeave() {
87
61
  setFocus(false);
88
62
  onLeave(event);
89
63
  };
90
-
91
64
  var has = {
92
65
  value: others.value !== undefined && ((_others$value = others.value) === null || _others$value === void 0 ? void 0 : _others$value.length) > 0,
93
66
  stateIcon: showState && (error || success || warning)
@@ -139,7 +112,6 @@ var InputText = function InputText(_ref) {
139
112
  className: (0, _helpers.styles)(_InputTextModule.default.text, _InputTextModule.default.hint, disabled && _InputTextModule.default.disabled, error && _InputTextModule.default.error)
140
113
  }, hint));
141
114
  };
142
-
143
115
  exports.InputText = InputText;
144
116
  InputText.displayName = 'Component:InputText';
145
117
  InputText.propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"InputText.js","names":["InputText","disabled","error","hint","icon","label","showState","success","type","warning","onChange","onEnter","onLeave","others","focus","setFocus","password","setPassword","handleChange","value","event","handleEnter","handleLeave","has","undefined","length","stateIcon","is","style","inputContainer","className","text","withIcon","inputBorder","left","input","iconLeft","icons","ICON","EYE_CLOSE","EYE_OPEN","displayName","propTypes","PropTypes","bool","string","func","multiLine","name","isRequired"],"sources":["../../../src/components/InputText/InputText.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { ICON, Icon, Input, Pressable, Text, View } from '../../primitives';\nimport style from './InputText.module.css';\n\nconst InputText = ({\n disabled,\n error,\n hint,\n icon,\n label,\n showState = true,\n success,\n type,\n warning,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n const [password, setPassword] = useState(true);\n\n const handleChange = (value, event) => {\n onChange(value, event);\n };\n\n const handleEnter = (event) => {\n setFocus(true);\n onEnter(event);\n };\n\n const handleLeave = () => {\n setFocus(false);\n onLeave(event);\n };\n\n const has = {\n value: others.value !== undefined && others.value?.length > 0,\n stateIcon: showState && (error || success || warning),\n };\n const is = { password: type === 'password' };\n\n return (\n <View className={styles(style.inputContainer, others.className)} style={others.style}>\n {label && (\n <Text\n className={styles(\n style.text,\n style.label,\n disabled && style.disabled,\n focus && style.focus,\n error && style.error,\n icon && style.withIcon,\n (focus || error || has.value) && style.value,\n )}\n >\n {label}\n </Text>\n )}\n\n <View\n row\n className={styles(\n style.inputBorder,\n disabled && style.disabled,\n error && style.error,\n focus && !error && style.focus,\n )}\n >\n {icon && (\n <Icon\n value={icon}\n className={styles(style.icon, style.left, disabled && style.disabled, error && style.error)}\n />\n )}\n <Input\n {...others}\n disabled={disabled}\n type={!is.password || password ? type : 'text'}\n value={others.value || ''}\n className={styles(style.input, icon && style.iconLeft)}\n style={undefined}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n\n {((is.password && !disabled) || has.stateIcon) && (\n <View row className={style.icons}>\n {is.password && !disabled && (\n <Pressable tabIndex={-1} type=\"button\" onPress={() => setPassword(!password)}>\n <Icon value={password ? ICON.EYE_CLOSE : ICON.EYE_OPEN} className={style.icon} />\n </Pressable>\n )}\n\n {has.stateIcon && (\n <Icon\n value={getIconState({ error, success, warning })}\n className={styles(\n style.icon,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n />\n )}\n </View>\n )}\n </View>\n\n {hint && (\n <Text small className={styles(style.text, style.hint, disabled && style.disabled, error && style.error)}>\n {hint}\n </Text>\n )}\n </View>\n );\n};\n\nInputText.displayName = 'Component:InputText';\n\nInputText.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n icon: PropTypes.func,\n label: PropTypes.string,\n multiLine: PropTypes.bool,\n name: PropTypes.string.isRequired,\n showState: PropTypes.bool,\n success: PropTypes.bool,\n type: PropTypes.string,\n warning: PropTypes.bool,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { InputText };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,OAcZ;EAAA;;EAAA,IAbJC,QAaI,QAbJA,QAaI;EAAA,IAZJC,KAYI,QAZJA,KAYI;EAAA,IAXJC,IAWI,QAXJA,IAWI;EAAA,IAVJC,IAUI,QAVJA,IAUI;EAAA,IATJC,KASI,QATJA,KASI;EAAA,0BARJC,SAQI;EAAA,IARJA,SAQI,+BARQ,IAQR;EAAA,IAPJC,OAOI,QAPJA,OAOI;EAAA,IANJC,IAMI,QANJA,IAMI;EAAA,IALJC,OAKI,QALJA,OAKI;EAAA,yBAJJC,QAII;EAAA,IAJJA,QAII,8BAJO,YAAM,CAAE,CAIf;EAAA,wBAHJC,OAGI;EAAA,IAHJA,OAGI,6BAHM,YAAM,CAAE,CAGd;EAAA,wBAFJC,OAEI;EAAA,IAFJA,OAEI,6BAFM,YAAM,CAAE,CAEd;EAAA,IADDC,MACC;;EACJ,gBAA0B,qBAAS,KAAT,CAA1B;EAAA;EAAA,IAAOC,KAAP;EAAA,IAAcC,QAAd;;EACA,iBAAgC,qBAAS,IAAT,CAAhC;EAAA;EAAA,IAAOC,QAAP;EAAA,IAAiBC,WAAjB;;EAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAQC,KAAR,EAAkB;IACrCV,QAAQ,CAACS,KAAD,EAAQC,KAAR,CAAR;EACD,CAFD;;EAIA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACD,KAAD,EAAW;IAC7BL,QAAQ,CAAC,IAAD,CAAR;IACAJ,OAAO,CAACS,KAAD,CAAP;EACD,CAHD;;EAKA,IAAME,WAAW,GAAG,SAAdA,WA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AAGmB,yBAAMnB,OAAT,GAAmBF,OAAO,GAAGqB,yBAAMrB,OAAT,GAAmBiB,SAFjE;EAFb,EARJ,CA5BJ,CAjBF,EAiEGrB,IAAI,iBACH,6BAAC,gBAAD;IAAM,KAAK,MAAX;IAAY,SAAS,EAAE,qBAAOyB,yBAAMG,IAAb,EAAmBH,yBAAMzB,IAAzB,EAA+BF,QAAQ,IAAI2B,yBAAM3B,QAAjD,EAA2DC,KAAK,IAAI0B,yBAAM1B,KAA1E;EAAvB,GACGC,IADH,CAlEJ,CADF;AAyED,CA/GD;;;AAiHAH,SAAS,CAACyC,WAAV,GAAwB,qBAAxB;AAEAzC,SAAS,CAAC0C,SAAV,GAAsB;EACpBzC,QAAQ,EAAE0C,mBAAUC,IADA;EAEpB1C,KAAK,EAAEyC,mBAAUC,IAFG;EAGpBzC,IAAI,EAAEwC,mBAAUE,MAHI;EAIpBzC,IAAI,EAAEuC,mBAAUG,IAJI;EAKpBzC,KAAK,EAAEsC,mBAAUE,MALG;EAMpBE,SAAS,EAAEJ,mBAAUC,IAND;EAOpBI,IAAI,EAAEL,mBAAUE,MAAV,CAAiBI,UAPH;EAQpB3C,SAAS,EAAEqC,mBAAUC,IARD;EASpBrC,OAAO,EAAEoC,mBAAUC,IATC;EAUpBpC,IAAI,EAAEmC,mBAAUE,MAVI;EAWpBpC,OAAO,EAAEkC,mBAAUC,IAXC;EAYpBlC,QAAQ,EAAEiC,mBAAUG,IAZA;EAapBnC,OAAO,EAAEgC,mBAAUG,IAbC;EAcpBlC,OAAO,EAAE+B,mBAAUG;AAdC,CAAtB"}
1
+ {"version":3,"file":"InputText.js","names":["InputText","disabled","error","hint","icon","label","showState","success","type","warning","onChange","onEnter","onLeave","others","useState","focus","setFocus","password","setPassword","handleChange","value","event","handleEnter","handleLeave","has","undefined","length","stateIcon","is","styles","style","inputContainer","className","text","withIcon","inputBorder","left","input","iconLeft","icons","ICON","EYE_CLOSE","EYE_OPEN","getIconState","displayName","propTypes","PropTypes","bool","string","func","multiLine","name","isRequired"],"sources":["../../../src/components/InputText/InputText.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { ICON, Icon, Input, Pressable, Text, View } from '../../primitives';\nimport style from './InputText.module.css';\n\nconst InputText = ({\n disabled,\n error,\n hint,\n icon,\n label,\n showState = true,\n success,\n type,\n warning,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n const [password, setPassword] = useState(true);\n\n const handleChange = (value, event) => {\n onChange(value, event);\n };\n\n const handleEnter = (event) => {\n setFocus(true);\n onEnter(event);\n };\n\n const handleLeave = () => {\n setFocus(false);\n onLeave(event);\n };\n\n const has = {\n value: others.value !== undefined && others.value?.length > 0,\n stateIcon: showState && (error || success || warning),\n };\n const is = { password: type === 'password' };\n\n return (\n <View className={styles(style.inputContainer, others.className)} style={others.style}>\n {label && (\n <Text\n className={styles(\n style.text,\n style.label,\n disabled && style.disabled,\n focus && style.focus,\n error && style.error,\n icon && style.withIcon,\n (focus || error || has.value) && style.value,\n )}\n >\n {label}\n </Text>\n )}\n\n <View\n row\n className={styles(\n style.inputBorder,\n disabled && style.disabled,\n error && style.error,\n focus && !error && style.focus,\n )}\n >\n {icon && (\n <Icon\n value={icon}\n className={styles(style.icon, style.left, disabled && style.disabled, error && style.error)}\n />\n )}\n <Input\n {...others}\n disabled={disabled}\n type={!is.password || password ? type : 'text'}\n value={others.value || ''}\n className={styles(style.input, icon && style.iconLeft)}\n style={undefined}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n\n {((is.password && !disabled) || has.stateIcon) && (\n <View row className={style.icons}>\n {is.password && !disabled && (\n <Pressable tabIndex={-1} type=\"button\" onPress={() => setPassword(!password)}>\n <Icon value={password ? ICON.EYE_CLOSE : ICON.EYE_OPEN} className={style.icon} />\n </Pressable>\n )}\n\n {has.stateIcon && (\n <Icon\n value={getIconState({ error, success, warning })}\n className={styles(\n style.icon,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n />\n )}\n </View>\n )}\n </View>\n\n {hint && (\n <Text small className={styles(style.text, style.hint, disabled && style.disabled, error && style.error)}>\n {hint}\n </Text>\n )}\n </View>\n );\n};\n\nInputText.displayName = 'Component:InputText';\n\nInputText.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n icon: PropTypes.func,\n label: PropTypes.string,\n multiLine: PropTypes.bool,\n name: PropTypes.string.isRequired,\n showState: PropTypes.bool,\n success: PropTypes.bool,\n type: PropTypes.string,\n warning: PropTypes.bool,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { InputText };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA2C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE3C,IAAMA,SAAS,GAAG,SAAZA,SAAS,OAcT;EAAA;EAAA,IAbJC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,IAAI,QAAJA,IAAI;IACJC,IAAI,QAAJA,IAAI;IACJC,KAAK,QAALA,KAAK;IAAA,sBACLC,SAAS;IAATA,SAAS,+BAAG,IAAI;IAChBC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IAAA,qBACPC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAA,oBACnBC,OAAO;IAAPA,OAAO,6BAAG,YAAM,CAAC,CAAC;IAAA,oBAClBC,OAAO;IAAPA,OAAO,6BAAG,YAAM,CAAC,CAAC;IACfC,MAAM;EAET,gBAA0B,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAlCC,KAAK;IAAEC,QAAQ;EACtB,iBAAgC,IAAAF,eAAQ,EAAC,IAAI,CAAC;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IAAI,EAAEL,kBAAS,CAACE,MAAM,CAACI,UAAU;EACjC9C,SAAS,EAAEwC,kBAAS,CAACC,IAAI;EACzBxC,OAAO,EAAEuC,kBAAS,CAACC,IAAI;EACvBvC,IAAI,EAAEsC,kBAAS,CAACE,MAAM;EACtBvC,OAAO,EAAEqC,kBAAS,CAACC,IAAI;EACvBrC,QAAQ,EAAEoC,kBAAS,CAACG,IAAI;EACxBtC,OAAO,EAAEmC,kBAAS,CAACG,IAAI;EACvBrC,OAAO,EAAEkC,kBAAS,CAACG;AACrB,CAAC"}
@@ -63,6 +63,10 @@
63
63
  right: var(--mirai-ui-input-text-padding-x);
64
64
  }
65
65
 
66
+ .icons.select {
67
+ pointer-events: none;
68
+ }
69
+
66
70
  .icons > .icon {
67
71
  margin-left: calc(var(--mirai-ui-input-text-icon) / 2);
68
72
  position: relative;
@@ -85,7 +89,6 @@
85
89
  font-size var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
86
90
  left var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
87
91
  top var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
88
- z-index: 1;
89
92
  }
90
93
 
91
94
  .label.withIcon:not(.value) {
@@ -1,49 +1,34 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = exports.Story = void 0;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _primitives = require("../../primitives");
13
-
14
10
  var _InputText = require("./InputText");
15
-
16
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
13
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
21
-
22
14
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
-
24
15
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
-
26
16
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
27
-
28
17
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
29
-
30
18
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
31
-
32
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
33
-
34
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
35
-
19
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
36
23
  var _default = {
37
24
  title: 'Components'
38
25
  };
39
26
  exports.default = _default;
40
-
41
27
  var Story = function Story(props) {
42
28
  return /*#__PURE__*/React.createElement(_InputText.InputText, _extends({}, props, {
43
29
  icon: _primitives.ICON[props.icon]
44
30
  }));
45
31
  };
46
-
47
32
  exports.Story = Story;
48
33
  Story.storyName = 'InputText';
49
34
  Story.args = _defineProperty({
@@ -62,29 +47,23 @@ Story.args = _defineProperty({
62
47
  warning: false,
63
48
  onChange: function onChange() {
64
49
  var _console;
65
-
66
50
  for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
67
51
  props[_key] = arguments[_key];
68
52
  }
69
-
70
53
  return (_console = console).log.apply(_console, ['<InputText>::onChange'].concat(props));
71
54
  },
72
55
  onEnter: function onEnter() {
73
56
  var _console2;
74
-
75
57
  for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
76
58
  props[_key2] = arguments[_key2];
77
59
  }
78
-
79
60
  return (_console2 = console).log.apply(_console2, ['<InputText>::onEnter'].concat(props));
80
61
  },
81
62
  onLeave: function onLeave() {
82
63
  var _console3;
83
-
84
64
  for (var _len3 = arguments.length, props = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
85
65
  props[_key3] = arguments[_key3];
86
66
  }
87
-
88
67
  return (_console3 = console).log.apply(_console3, ['<InputText>::onLeave'].concat(props));
89
68
  }
90
69
  }, 'data-testid', 'test-story');
@@ -1 +1 @@
1
- {"version":3,"file":"InputText.stories.js","names":["title","Story","props","ICON","icon","storyName","args","disabled","error","hint","undefined","label","multiLine","name","placeholder","showState","success","type","value","warning","onChange","console","log","onEnter","onLeave","argTypes","options","Object","keys","control","defaultValue"],"sources":["../../../src/components/InputText/InputText.stories.jsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport * as React from 'react';\n\nimport { ICON } from '../../primitives';\nimport { InputText } from './InputText';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputText {...props} icon={ICON[props.icon]} />;\n\nStory.storyName = 'InputText';\n\nStory.args = {\n disabled: false,\n error: false,\n hint: 'hint',\n icon: undefined,\n label: 'label',\n multiLine: false,\n name: 'name',\n placeholder: '',\n showState: true,\n success: false,\n type: 'text',\n value: 'value',\n warning: false,\n onChange: (...props) => console.log('<InputText>::onChange', ...props),\n onEnter: (...props) => console.log('<InputText>::onEnter', ...props),\n onLeave: (...props) => console.log('<InputText>::onLeave', ...props),\n ['data-testid']: 'test-story',\n};\n\nStory.argTypes = {\n icon: {\n options: [undefined, ...Object.keys(ICON)],\n control: { type: 'select' },\n defaultValue: undefined,\n },\n type: {\n options: ['text',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oBAD,KAAK,CAACwB,QAAN,GAAiB;EACfrB,IAAI,EAAE;IACJsB,OAAO,GAAGhB,SAAH,4BAAiBiB,MAAM,CAACC,IAAP,CAAYzB,gBAAZ,CAAjB,EADH;IAEJ0B,OAAO,EAAE;MAAEZ,IAAI,EAAE;IAAR,CAFL;IAGJa,YAAY,EAAEpB;EAHV,CADS;EAMfO,IAAI,EAAE;IACJS,OAAO,EAAE,CAAC,MAAD,EAAS,UAAT,EAAqB,QAArB,EAA+B,OAA/B,EAAwC,MAAxC,CADL;IAEJG,OAAO,EAAE;MAAEZ,IAAI,EAAE;IAAR,CAFL;IAGJa,YAAY,EAAE;EAHV;AANS,CAAjB"}
1
+ {"version":3,"file":"InputText.stories.js","names":["title","Story","props","ICON","icon","storyName","args","disabled","error","hint","undefined","label","multiLine","name","placeholder","showState","success","type","value","warning","onChange","console","log","onEnter","onLeave","argTypes","options","Object","keys","control","defaultValue"],"sources":["../../../src/components/InputText/InputText.stories.jsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport * as React from 'react';\n\nimport { ICON } from '../../primitives';\nimport { InputText } from './InputText';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputText {...props} icon={ICON[props.icon]} />;\n\nStory.storyName = 'InputText';\n\nStory.args = {\n disabled: false,\n error: false,\n hint: 'hint',\n icon: undefined,\n label: 'label',\n multiLine: false,\n name: 'name',\n placeholder: '',\n showState: true,\n success: false,\n type: 'text',\n value: 'value',\n warning: false,\n onChange: (...props) => console.log('<InputText>::onChange', ...props),\n onEnter: (...props) => console.log('<InputText>::onEnter', ...props),\n onLeave: (...props) => console.log('<InputText>::onLeave', ...props),\n ['data-testid']: 'test-story',\n};\n\nStory.argTypes = {\n icon: {\n options: [undefined, ...Object.keys(ICON)],\n control: { type: 'select' },\n defaultValue: undefined,\n },\n type: {\n options: ['text', 'password', 'number', 'email', 'date'],\n control: { type: 'select' },\n defaultValue: 'text',\n },\n};\n"],"mappings":";;;;;;;AACA;AAEA;AACA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BAAKiB,MAAM,CAACC,IAAI,CAACzB,gBAAI,CAAC,EAAC;IAC1C0B,OAAO,EAAE;MAAEZ,IAAI,EAAE;IAAS,CAAC;IAC3Ba,YAAY,EAAEpB;EAChB,CAAC;EACDO,IAAI,EAAE;IACJS,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;IACxDG,OAAO,EAAE;MAAEZ,IAAI,EAAE;IAAS,CAAC;IAC3Ba,YAAY,EAAE;EAChB;AACF,CAAC"}
@@ -69,7 +69,11 @@ exports[`component:<InputText> prop:error 1`] = `
69
69
  xmlns="http://www.w3.org/2000/svg"
70
70
  >
71
71
  <path
72
- d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
72
+ d="M0 0h24v24H0V0z"
73
+ fill="none"
74
+ />
75
+ <path
76
+ d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
73
77
  />
74
78
  </svg>
75
79
  </span>
@@ -215,7 +219,11 @@ exports[`component:<InputText> prop:showState (false) 1`] = `
215
219
  xmlns="http://www.w3.org/2000/svg"
216
220
  >
217
221
  <path
218
- d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
222
+ d="M0 0h24v24H0V0z"
223
+ fill="none"
224
+ />
225
+ <path
226
+ d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
219
227
  />
220
228
  </svg>
221
229
  </span>
@@ -349,7 +357,7 @@ exports[`component:<InputText> prop:warning 1`] = `
349
357
  xmlns="http://www.w3.org/2000/svg"
350
358
  >
351
359
  <path
352
- d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
360
+ d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
353
361
  />
354
362
  </svg>
355
363
  </span>
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _InputText = require("./InputText");
8
-
9
7
  Object.keys(_InputText).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _InputText[key]) return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/InputText/index.js"],"sourcesContent":["export * from './InputText';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/InputText/index.js"],"sourcesContent":["export * from './InputText';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -4,37 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Option = void 0;
7
-
8
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _helpers = require("../../helpers");
13
-
14
10
  var _primitives = require("../../primitives");
15
-
16
11
  var _MenuModule = _interopRequireDefault(require("./Menu.module.css"));
17
-
18
12
  var _excluded = ["children", "disabled", "divider", "icon", "label", "value", "onPress"];
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
-
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
-
26
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
-
28
17
  var Option = function Option(_ref) {
29
18
  var children = _ref.children,
30
- disabled = _ref.disabled,
31
- divider = _ref.divider,
32
- icon = _ref.icon,
33
- label = _ref.label,
34
- value = _ref.value,
35
- onPress = _ref.onPress,
36
- others = _objectWithoutProperties(_ref, _excluded);
37
-
19
+ disabled = _ref.disabled,
20
+ divider = _ref.divider,
21
+ icon = _ref.icon,
22
+ label = _ref.label,
23
+ value = _ref.value,
24
+ onPress = _ref.onPress,
25
+ others = _objectWithoutProperties(_ref, _excluded);
38
26
  return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, _extends({}, others, {
39
27
  preventDefault: false,
40
28
  tag: "div",
@@ -47,7 +35,6 @@ var Option = function Option(_ref) {
47
35
  className: _MenuModule.default.label
48
36
  }, label), children);
49
37
  };
50
-
51
38
  exports.Option = Option;
52
39
  Option.displayName = 'Component:Menu:Option';
53
40
  Option.propTypes = {