@skbkontur/react-ui 6.1.4-eef21.0 → 6.1.4-ff219.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/components/Autocomplete/Autocomplete.js +3 -2
  2. package/components/Autocomplete/Autocomplete.js.map +1 -1
  3. package/components/FxInput/FxInput.js +2 -2
  4. package/components/FxInput/FxInput.js.map +1 -1
  5. package/components/Group/Group.js +2 -3
  6. package/components/Group/Group.js.map +1 -1
  7. package/components/Input/Input.d.ts +1 -1
  8. package/components/Input/Input.js.map +1 -1
  9. package/components/MaskedInput/MaskedInput.d.ts +2 -0
  10. package/components/MaskedInput/MaskedInput.js +6 -0
  11. package/components/MaskedInput/MaskedInput.js.map +1 -1
  12. package/components/MaskedInputV2/MaskedInputV2.d.ts +57 -0
  13. package/components/MaskedInputV2/MaskedInputV2.helpers.d.ts +9 -0
  14. package/components/MaskedInputV2/MaskedInputV2.helpers.js +17 -0
  15. package/components/MaskedInputV2/MaskedInputV2.helpers.js.map +1 -0
  16. package/components/MaskedInputV2/MaskedInputV2.js +234 -0
  17. package/components/MaskedInputV2/MaskedInputV2.js.map +1 -0
  18. package/components/MaskedInputV2/MaskedInputV2.styles.d.ts +7 -0
  19. package/components/MaskedInputV2/MaskedInputV2.styles.js +19 -0
  20. package/components/MaskedInputV2/MaskedInputV2.styles.js.map +1 -0
  21. package/components/MaskedInputV2/index.d.ts +1 -0
  22. package/components/MaskedInputV2/index.js +2 -0
  23. package/components/MaskedInputV2/index.js.map +1 -0
  24. package/components/MaskedInputV2/internal/MaskOverlay.d.ts +19 -0
  25. package/components/MaskedInputV2/internal/MaskOverlay.js +54 -0
  26. package/components/MaskedInputV2/internal/MaskOverlay.js.map +1 -0
  27. package/components/MaskedInputV2/internal/MaskedCore.d.ts +8 -0
  28. package/components/MaskedInputV2/internal/MaskedCore.js +101 -0
  29. package/components/MaskedInputV2/internal/MaskedCore.js.map +1 -0
  30. package/components/MaskedInputV2/internal/MaskedCore.types.d.ts +30 -0
  31. package/components/MaskedInputV2/internal/MaskedCore.types.js +2 -0
  32. package/components/MaskedInputV2/internal/MaskedCore.types.js.map +1 -0
  33. package/components/MaskedInputV2/internal/MaskedInternal.styles.d.ts +15 -0
  34. package/components/MaskedInputV2/internal/MaskedInternal.styles.js +34 -0
  35. package/components/MaskedInputV2/internal/MaskedInternal.styles.js.map +1 -0
  36. package/components/MaskedInputV2/internal/buildSlotMap.d.ts +11 -0
  37. package/components/MaskedInputV2/internal/buildSlotMap.js +37 -0
  38. package/components/MaskedInputV2/internal/buildSlotMap.js.map +1 -0
  39. package/components/MaskedInputV2/internal/extractRaw.d.ts +10 -0
  40. package/components/MaskedInputV2/internal/extractRaw.js +16 -0
  41. package/components/MaskedInputV2/internal/extractRaw.js.map +1 -0
  42. package/components/MaskedInputV2/internal/findNearestRawLeft.d.ts +10 -0
  43. package/components/MaskedInputV2/internal/findNearestRawLeft.js +18 -0
  44. package/components/MaskedInputV2/internal/findNearestRawLeft.js.map +1 -0
  45. package/components/MaskedInputV2/internal/helpers.d.ts +5 -0
  46. package/components/MaskedInputV2/internal/helpers.js +6 -0
  47. package/components/MaskedInputV2/internal/helpers.js.map +1 -0
  48. package/components/MaskedInputV2/internal/maskedCoreClipboard.d.ts +25 -0
  49. package/components/MaskedInputV2/internal/maskedCoreClipboard.js +30 -0
  50. package/components/MaskedInputV2/internal/maskedCoreClipboard.js.map +1 -0
  51. package/components/MaskedInputV2/internal/maskedCoreDeletion.d.ts +28 -0
  52. package/components/MaskedInputV2/internal/maskedCoreDeletion.js +70 -0
  53. package/components/MaskedInputV2/internal/maskedCoreDeletion.js.map +1 -0
  54. package/components/MaskedInputV2/internal/maskedCoreInputChange.d.ts +35 -0
  55. package/components/MaskedInputV2/internal/maskedCoreInputChange.js +31 -0
  56. package/components/MaskedInputV2/internal/maskedCoreInputChange.js.map +1 -0
  57. package/components/MaskedInputV2/internal/maskedCoreNavigation.d.ts +13 -0
  58. package/components/MaskedInputV2/internal/maskedCoreNavigation.js +79 -0
  59. package/components/MaskedInputV2/internal/maskedCoreNavigation.js.map +1 -0
  60. package/components/MaskedInputV2/internal/stripMaskChars.d.ts +11 -0
  61. package/components/MaskedInputV2/internal/stripMaskChars.js +20 -0
  62. package/components/MaskedInputV2/internal/stripMaskChars.js.map +1 -0
  63. package/components/MaskedInputV2/internal/types.d.ts +74 -0
  64. package/components/MaskedInputV2/internal/types.js +2 -0
  65. package/components/MaskedInputV2/internal/types.js.map +1 -0
  66. package/components/MaskedInputV2/internal/useMaskEngine.d.ts +42 -0
  67. package/components/MaskedInputV2/internal/useMaskEngine.js +82 -0
  68. package/components/MaskedInputV2/internal/useMaskEngine.js.map +1 -0
  69. package/components/MaskedInputV2/internal/useMaskedCoreHandlers.d.ts +28 -0
  70. package/components/MaskedInputV2/internal/useMaskedCoreHandlers.js +190 -0
  71. package/components/MaskedInputV2/internal/useMaskedCoreHandlers.js.map +1 -0
  72. package/components/MaskedInputV2/react-imask/imask/controls/html-input-mask-element.d.ts +16 -0
  73. package/components/MaskedInputV2/react-imask/imask/controls/html-input-mask-element.js +59 -0
  74. package/components/MaskedInputV2/react-imask/imask/controls/html-input-mask-element.js.map +1 -0
  75. package/components/MaskedInputV2/react-imask/imask/controls/html-mask-element.d.ts +20 -0
  76. package/components/MaskedInputV2/react-imask/imask/controls/html-mask-element.js +106 -0
  77. package/components/MaskedInputV2/react-imask/imask/controls/html-mask-element.js.map +1 -0
  78. package/components/MaskedInputV2/react-imask/imask/controls/input-history.d.ts +17 -0
  79. package/components/MaskedInputV2/react-imask/imask/controls/input-history.js +49 -0
  80. package/components/MaskedInputV2/react-imask/imask/controls/input-history.js.map +1 -0
  81. package/components/MaskedInputV2/react-imask/imask/controls/input.d.ts +95 -0
  82. package/components/MaskedInputV2/react-imask/imask/controls/input.js +420 -0
  83. package/components/MaskedInputV2/react-imask/imask/controls/input.js.map +1 -0
  84. package/components/MaskedInputV2/react-imask/imask/controls/mask-element.d.ts +30 -0
  85. package/components/MaskedInputV2/react-imask/imask/controls/mask-element.js +59 -0
  86. package/components/MaskedInputV2/react-imask/imask/controls/mask-element.js.map +1 -0
  87. package/components/MaskedInputV2/react-imask/imask/core/action-details.d.ts +30 -0
  88. package/components/MaskedInputV2/react-imask/imask/core/action-details.js +100 -0
  89. package/components/MaskedInputV2/react-imask/imask/core/action-details.js.map +1 -0
  90. package/components/MaskedInputV2/react-imask/imask/core/change-details.d.ts +20 -0
  91. package/components/MaskedInputV2/react-imask/imask/core/change-details.js +46 -0
  92. package/components/MaskedInputV2/react-imask/imask/core/change-details.js.map +1 -0
  93. package/components/MaskedInputV2/react-imask/imask/core/continuous-tail-details.d.ts +21 -0
  94. package/components/MaskedInputV2/react-imask/imask/core/continuous-tail-details.js +52 -0
  95. package/components/MaskedInputV2/react-imask/imask/core/continuous-tail-details.js.map +1 -0
  96. package/components/MaskedInputV2/react-imask/imask/core/holder.d.ts +34 -0
  97. package/components/MaskedInputV2/react-imask/imask/core/holder.js +38 -0
  98. package/components/MaskedInputV2/react-imask/imask/core/holder.js.map +1 -0
  99. package/components/MaskedInputV2/react-imask/imask/core/tail-details.d.ts +20 -0
  100. package/components/MaskedInputV2/react-imask/imask/core/tail-details.js +2 -0
  101. package/components/MaskedInputV2/react-imask/imask/core/tail-details.js.map +1 -0
  102. package/components/MaskedInputV2/react-imask/imask/core/utils.d.ts +24 -0
  103. package/components/MaskedInputV2/react-imask/imask/core/utils.js +100 -0
  104. package/components/MaskedInputV2/react-imask/imask/core/utils.js.map +1 -0
  105. package/components/MaskedInputV2/react-imask/imask/imask.d.ts +5 -0
  106. package/components/MaskedInputV2/react-imask/imask/imask.js +7 -0
  107. package/components/MaskedInputV2/react-imask/imask/imask.js.map +1 -0
  108. package/components/MaskedInputV2/react-imask/imask/index.d.ts +17 -0
  109. package/components/MaskedInputV2/react-imask/imask/index.js +16 -0
  110. package/components/MaskedInputV2/react-imask/imask/index.js.map +1 -0
  111. package/components/MaskedInputV2/react-imask/imask/masked/base.d.ts +114 -0
  112. package/components/MaskedInputV2/react-imask/imask/masked/base.js +411 -0
  113. package/components/MaskedInputV2/react-imask/imask/masked/base.js.map +1 -0
  114. package/components/MaskedInputV2/react-imask/imask/masked/factory.d.ts +62 -0
  115. package/components/MaskedInputV2/react-imask/imask/masked/factory.js +96 -0
  116. package/components/MaskedInputV2/react-imask/imask/masked/factory.js.map +1 -0
  117. package/components/MaskedInputV2/react-imask/imask/masked/pattern.d.ts +101 -0
  118. package/components/MaskedInputV2/react-imask/imask/masked/pattern.js +543 -0
  119. package/components/MaskedInputV2/react-imask/imask/masked/pattern.js.map +1 -0
  120. package/components/MaskedInputV2/react-imask/imask/masked/patterns/block.d.ts +30 -0
  121. package/components/MaskedInputV2/react-imask/imask/masked/patterns/block.js +2 -0
  122. package/components/MaskedInputV2/react-imask/imask/masked/patterns/block.js.map +1 -0
  123. package/components/MaskedInputV2/react-imask/imask/masked/patterns/chunk-tail-details.d.ts +21 -0
  124. package/components/MaskedInputV2/react-imask/imask/masked/patterns/chunk-tail-details.js +180 -0
  125. package/components/MaskedInputV2/react-imask/imask/masked/patterns/chunk-tail-details.js.map +1 -0
  126. package/components/MaskedInputV2/react-imask/imask/masked/patterns/cursor.d.ts +31 -0
  127. package/components/MaskedInputV2/react-imask/imask/masked/patterns/cursor.js +163 -0
  128. package/components/MaskedInputV2/react-imask/imask/masked/patterns/cursor.js.map +1 -0
  129. package/components/MaskedInputV2/react-imask/imask/masked/patterns/fixed-definition.d.ts +42 -0
  130. package/components/MaskedInputV2/react-imask/imask/masked/patterns/fixed-definition.js +158 -0
  131. package/components/MaskedInputV2/react-imask/imask/masked/patterns/fixed-definition.js.map +1 -0
  132. package/components/MaskedInputV2/react-imask/imask/masked/patterns/input-definition.d.ts +56 -0
  133. package/components/MaskedInputV2/react-imask/imask/masked/patterns/input-definition.js +185 -0
  134. package/components/MaskedInputV2/react-imask/imask/masked/patterns/input-definition.js.map +1 -0
  135. package/components/MaskedInputV2/react-imask/imask/masked/regexp.d.ts +17 -0
  136. package/components/MaskedInputV2/react-imask/imask/masked/regexp.js +36 -0
  137. package/components/MaskedInputV2/react-imask/imask/masked/regexp.js.map +1 -0
  138. package/components/MaskedInputV2/react-imask/index.d.ts +3 -0
  139. package/components/MaskedInputV2/react-imask/index.js +4 -0
  140. package/components/MaskedInputV2/react-imask/index.js.map +1 -0
  141. package/components/MaskedInputV2/react-imask/input.d.ts +8 -0
  142. package/components/MaskedInputV2/react-imask/input.js +35 -0
  143. package/components/MaskedInputV2/react-imask/input.js.map +1 -0
  144. package/components/MaskedInputV2/react-imask/mixin.d.ts +31 -0
  145. package/components/MaskedInputV2/react-imask/mixin.js +246 -0
  146. package/components/MaskedInputV2/react-imask/mixin.js.map +1 -0
  147. package/index.d.ts +1 -1
  148. package/index.js +1 -1
  149. package/index.js.map +1 -1
  150. package/internal/CustomComboBox/ComboBoxView.js +2 -2
  151. package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  152. package/internal/FeaturedMaskedInput/FeaturedMaskedInput.d.ts +4 -0
  153. package/internal/FeaturedMaskedInput/FeaturedMaskedInput.js +24 -0
  154. package/internal/FeaturedMaskedInput/FeaturedMaskedInput.js.map +1 -0
  155. package/internal/themes/BasicTheme.d.ts +0 -34
  156. package/internal/themes/BasicTheme.js +0 -96
  157. package/internal/themes/BasicTheme.js.map +1 -1
  158. package/lib/events/keyboard/KeyboardEventCodes.d.ts +2 -0
  159. package/lib/events/keyboard/KeyboardEventCodes.js +2 -0
  160. package/lib/events/keyboard/KeyboardEventCodes.js.map +1 -1
  161. package/lib/events/keyboard/KeyboardMapKeys.js +2 -0
  162. package/lib/events/keyboard/KeyboardMapKeys.js.map +1 -1
  163. package/lib/events/keyboard/identifiers.d.ts +2 -0
  164. package/lib/events/keyboard/identifiers.js +6 -0
  165. package/lib/events/keyboard/identifiers.js.map +1 -1
  166. package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +2 -0
  167. package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js +1 -0
  168. package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
  169. package/lib/utils.d.ts +0 -2
  170. package/lib/utils.js +0 -1
  171. package/lib/utils.js.map +1 -1
  172. package/package.json +4 -5
  173. package/components/TimePicker/TimeClockIcon.d.ts +0 -3
  174. package/components/TimePicker/TimeClockIcon.js +0 -11
  175. package/components/TimePicker/TimeClockIcon.js.map +0 -1
  176. package/components/TimePicker/TimeFragmentsView.d.ts +0 -15
  177. package/components/TimePicker/TimeFragmentsView.js +0 -72
  178. package/components/TimePicker/TimeFragmentsView.js.map +0 -1
  179. package/components/TimePicker/TimeFragmentsView.styles.d.ts +0 -12
  180. package/components/TimePicker/TimeFragmentsView.styles.js +0 -43
  181. package/components/TimePicker/TimeFragmentsView.styles.js.map +0 -1
  182. package/components/TimePicker/TimeInput.d.ts +0 -22
  183. package/components/TimePicker/TimeInput.js +0 -103
  184. package/components/TimePicker/TimeInput.js.map +0 -1
  185. package/components/TimePicker/TimePicker.d.ts +0 -77
  186. package/components/TimePicker/TimePicker.js +0 -508
  187. package/components/TimePicker/TimePicker.js.map +0 -1
  188. package/components/TimePicker/TimePicker.styles.d.ts +0 -14
  189. package/components/TimePicker/TimePicker.styles.js +0 -45
  190. package/components/TimePicker/TimePicker.styles.js.map +0 -1
  191. package/components/TimePicker/TimePickerItems.d.ts +0 -17
  192. package/components/TimePicker/TimePickerItems.js +0 -80
  193. package/components/TimePicker/TimePickerItems.js.map +0 -1
  194. package/components/TimePicker/TimePickerMobilePopup.d.ts +0 -38
  195. package/components/TimePicker/TimePickerMobilePopup.js +0 -21
  196. package/components/TimePicker/TimePickerMobilePopup.js.map +0 -1
  197. package/components/TimePicker/TimePickerPopup.d.ts +0 -20
  198. package/components/TimePicker/TimePickerPopup.js +0 -18
  199. package/components/TimePicker/TimePickerPopup.js.map +0 -1
  200. package/components/TimePicker/helpers/TimePicker.constants.d.ts +0 -22
  201. package/components/TimePicker/helpers/TimePicker.constants.js +0 -31
  202. package/components/TimePicker/helpers/TimePicker.constants.js.map +0 -1
  203. package/components/TimePicker/helpers/TimePicker.editing.d.ts +0 -23
  204. package/components/TimePicker/helpers/TimePicker.editing.js +0 -101
  205. package/components/TimePicker/helpers/TimePicker.editing.js.map +0 -1
  206. package/components/TimePicker/helpers/TimePicker.layout.d.ts +0 -6
  207. package/components/TimePicker/helpers/TimePicker.layout.js +0 -49
  208. package/components/TimePicker/helpers/TimePicker.layout.js.map +0 -1
  209. package/components/TimePicker/helpers/TimePicker.selection.d.ts +0 -5
  210. package/components/TimePicker/helpers/TimePicker.selection.js +0 -23
  211. package/components/TimePicker/helpers/TimePicker.selection.js.map +0 -1
  212. package/components/TimePicker/helpers/TimePicker.shared.d.ts +0 -47
  213. package/components/TimePicker/helpers/TimePicker.shared.js +0 -70
  214. package/components/TimePicker/helpers/TimePicker.shared.js.map +0 -1
  215. package/components/TimePicker/helpers/TimePicker.value.d.ts +0 -30
  216. package/components/TimePicker/helpers/TimePicker.value.js +0 -96
  217. package/components/TimePicker/helpers/TimePicker.value.js.map +0 -1
  218. package/components/TimePicker/helpers/scrollSelectedItemIntoView.d.ts +0 -4
  219. package/components/TimePicker/helpers/scrollSelectedItemIntoView.js +0 -24
  220. package/components/TimePicker/helpers/scrollSelectedItemIntoView.js.map +0 -1
  221. package/components/TimePicker/helpers/validateTimePicker.d.ts +0 -8
  222. package/components/TimePicker/helpers/validateTimePicker.js +0 -16
  223. package/components/TimePicker/helpers/validateTimePicker.js.map +0 -1
  224. package/components/TimePicker/hooks/useTimePickerDropdown.d.ts +0 -17
  225. package/components/TimePicker/hooks/useTimePickerDropdown.js +0 -62
  226. package/components/TimePicker/hooks/useTimePickerDropdown.js.map +0 -1
  227. package/components/TimePicker/hooks/useTimePickerSelection.d.ts +0 -18
  228. package/components/TimePicker/hooks/useTimePickerSelection.js +0 -66
  229. package/components/TimePicker/hooks/useTimePickerSelection.js.map +0 -1
  230. package/components/TimePicker/hooks/useTimePickerValue.d.ts +0 -18
  231. package/components/TimePicker/hooks/useTimePickerValue.js +0 -59
  232. package/components/TimePicker/hooks/useTimePickerValue.js.map +0 -1
  233. package/components/TimePicker/index.d.ts +0 -2
  234. package/components/TimePicker/index.js +0 -2
  235. package/components/TimePicker/index.js.map +0 -1
  236. package/internal/NativeTimeInput/NativeTimeInput.d.ts +0 -16
  237. package/internal/NativeTimeInput/NativeTimeInput.js +0 -25
  238. package/internal/NativeTimeInput/NativeTimeInput.js.map +0 -1
  239. package/internal/NativeTimeInput/NativeTimeInput.styles.d.ts +0 -3
  240. package/internal/NativeTimeInput/NativeTimeInput.styles.js +0 -15
  241. package/internal/NativeTimeInput/NativeTimeInput.styles.js.map +0 -1
  242. package/internal/NativeTimeInput/NativeTimeInput.utils.d.ts +0 -7
  243. package/internal/NativeTimeInput/NativeTimeInput.utils.js +0 -28
  244. package/internal/NativeTimeInput/NativeTimeInput.utils.js.map +0 -1
  245. package/internal/NativeTimeInput/index.d.ts +0 -1
  246. package/internal/NativeTimeInput/index.js +0 -2
  247. package/internal/NativeTimeInput/index.js.map +0 -1
  248. package/internal/icons2022/TimeClockIcon/TimeClockIcon16Light.d.ts +0 -2
  249. package/internal/icons2022/TimeClockIcon/TimeClockIcon16Light.js +0 -20
  250. package/internal/icons2022/TimeClockIcon/TimeClockIcon16Light.js.map +0 -1
  251. package/internal/icons2022/TimeClockIcon/TimeClockIcon20Light.d.ts +0 -2
  252. package/internal/icons2022/TimeClockIcon/TimeClockIcon20Light.js +0 -20
  253. package/internal/icons2022/TimeClockIcon/TimeClockIcon20Light.js.map +0 -1
  254. package/internal/icons2022/TimeClockIcon/TimeClockIcon24Regular.d.ts +0 -2
  255. package/internal/icons2022/TimeClockIcon/TimeClockIcon24Regular.js +0 -20
  256. package/internal/icons2022/TimeClockIcon/TimeClockIcon24Regular.js.map +0 -1
@@ -1,59 +0,0 @@
1
- import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { EMPTY_VALUE } from '../helpers/TimePicker.constants.js';
3
- import { getTimeDisplayValue, isTimeDisplayEmpty, normalizeTimeValue, serializeTimeValue, } from '../helpers/TimePicker.value.js';
4
- export var useTimePickerValue = function (options) {
5
- var value = options.value, format = options.format, isInputFocused = options.isInputFocused, onValueChange = options.onValueChange;
6
- var externalValue = value !== null && value !== void 0 ? value : EMPTY_VALUE;
7
- var externalEditingValue = getTimeDisplayValue(externalValue, format);
8
- var _a = useState(externalEditingValue), editingValue = _a[0], setEditingValueState = _a[1];
9
- var editingValueRef = useRef(editingValue);
10
- var emittedValueRef = useRef(externalValue);
11
- var setEditingValue = useCallback(function (nextEditingValue) {
12
- editingValueRef.current = nextEditingValue;
13
- setEditingValueState(nextEditingValue);
14
- }, []);
15
- var emitValue = useCallback(function (nextValue) {
16
- if (emittedValueRef.current !== nextValue) {
17
- emittedValueRef.current = nextValue;
18
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(nextValue);
19
- }
20
- }, [onValueChange]);
21
- var updateEditingValue = useCallback(function (nextEditingValue) {
22
- setEditingValue(nextEditingValue);
23
- emitValue(serializeTimeValue(nextEditingValue, format));
24
- }, [emitValue, format, setEditingValue]);
25
- var clearEditingValue = useCallback(function () {
26
- setEditingValue(EMPTY_VALUE);
27
- }, [setEditingValue]);
28
- var commitEditingValue = useCallback(function () {
29
- var currentEditingValue = editingValueRef.current;
30
- if (isTimeDisplayEmpty(currentEditingValue)) {
31
- clearEditingValue();
32
- return EMPTY_VALUE;
33
- }
34
- var nextValue = normalizeTimeValue(currentEditingValue, format);
35
- setEditingValue(nextValue);
36
- emitValue(nextValue);
37
- return nextValue;
38
- }, [clearEditingValue, editingValueRef, emitValue, format, setEditingValue]);
39
- useEffect(function () {
40
- if (!isInputFocused) {
41
- setEditingValue(externalEditingValue);
42
- }
43
- else if (externalValue !== emittedValueRef.current) {
44
- setEditingValue(externalEditingValue);
45
- }
46
- }, [externalEditingValue, externalValue, isInputFocused, setEditingValue]);
47
- useEffect(function () {
48
- emittedValueRef.current = externalValue;
49
- }, [externalValue]);
50
- return {
51
- editingValue: editingValue,
52
- editingValueRef: editingValueRef,
53
- setEditingValue: setEditingValue,
54
- updateEditingValue: updateEditingValue,
55
- commitEditingValue: commitEditingValue,
56
- clearEditingValue: clearEditingValue,
57
- };
58
- };
59
- //# sourceMappingURL=useTimePickerValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTimePickerValue.js","sourceRoot":"","sources":["useTimePickerValue.ts"],"names":[],"mappings":"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","sourcesContent":["import type { RefObject } from 'react';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { EMPTY_VALUE } from '../helpers/TimePicker.constants.js';\nimport type { TimeFormat } from '../helpers/TimePicker.shared.js';\nimport {\n getTimeDisplayValue,\n isTimeDisplayEmpty,\n normalizeTimeValue,\n serializeTimeValue,\n} from '../helpers/TimePicker.value.js';\n\ninterface UseTimePickerValueOptions {\n isInputFocused: boolean;\n value?: string;\n format: TimeFormat;\n onValueChange?(value: string): void;\n}\n\ninterface UseTimePickerValueResult {\n editingValue: string;\n editingValueRef: RefObject<string>;\n setEditingValue(value: string): void;\n updateEditingValue(value: string): void;\n commitEditingValue(): string;\n clearEditingValue(): void;\n}\n\nexport const useTimePickerValue = (options: UseTimePickerValueOptions): UseTimePickerValueResult => {\n const { value, format, isInputFocused, onValueChange } = options;\n\n const externalValue = value ?? EMPTY_VALUE;\n const externalEditingValue = getTimeDisplayValue(externalValue, format);\n\n const [editingValue, setEditingValueState] = useState<string>(externalEditingValue);\n\n const editingValueRef = useRef(editingValue);\n const emittedValueRef = useRef(externalValue);\n\n const setEditingValue = useCallback((nextEditingValue: string) => {\n editingValueRef.current = nextEditingValue;\n setEditingValueState(nextEditingValue);\n }, []);\n\n const emitValue = useCallback(\n (nextValue: string) => {\n if (emittedValueRef.current !== nextValue) {\n emittedValueRef.current = nextValue;\n onValueChange?.(nextValue);\n }\n },\n [onValueChange],\n );\n\n const updateEditingValue = useCallback(\n (nextEditingValue: string) => {\n setEditingValue(nextEditingValue);\n emitValue(serializeTimeValue(nextEditingValue, format));\n },\n [emitValue, format, setEditingValue],\n );\n\n const clearEditingValue = useCallback(() => {\n setEditingValue(EMPTY_VALUE);\n }, [setEditingValue]);\n\n const commitEditingValue = useCallback((): string => {\n const currentEditingValue = editingValueRef.current;\n\n if (isTimeDisplayEmpty(currentEditingValue)) {\n clearEditingValue();\n return EMPTY_VALUE;\n }\n\n const nextValue = normalizeTimeValue(currentEditingValue, format);\n\n setEditingValue(nextValue);\n emitValue(nextValue);\n\n return nextValue;\n }, [clearEditingValue, editingValueRef, emitValue, format, setEditingValue]);\n\n useEffect(() => {\n if (!isInputFocused) {\n setEditingValue(externalEditingValue);\n } else if (externalValue !== emittedValueRef.current) {\n setEditingValue(externalEditingValue);\n }\n }, [externalEditingValue, externalValue, isInputFocused, setEditingValue]);\n\n useEffect(() => {\n emittedValueRef.current = externalValue;\n }, [externalValue]);\n\n return {\n editingValue,\n editingValueRef,\n setEditingValue,\n updateEditingValue,\n commitEditingValue,\n clearEditingValue,\n };\n};\n"]}
@@ -1,2 +0,0 @@
1
- export * from './TimePicker.js';
2
- export type { TimeFormat, TimeSegment, TimeItem } from './helpers/TimePicker.shared.js';
@@ -1,2 +0,0 @@
1
- export * from './TimePicker.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './TimePicker.js';\nexport type { TimeFormat, TimeSegment, TimeItem } from './helpers/TimePicker.shared.js';\n"]}
@@ -1,16 +0,0 @@
1
- import type { TimeFormat } from '../../components/TimePicker/index.js';
2
- import type { Nullable } from '../../typings/utility-types.js';
3
- export interface NativeTimeInputProps {
4
- 'data-tid'?: string;
5
- disabled?: boolean;
6
- format: TimeFormat;
7
- value: Nullable<string>;
8
- minTime?: Nullable<string>;
9
- maxTime?: Nullable<string>;
10
- onValueChange?(value: string): void;
11
- }
12
- export interface NativeTimeInputRef {
13
- focus(): void;
14
- click(): void;
15
- }
16
- export declare const NativeTimeInput: import("../../lib/forwardRefAndName.js").ReactUIComponentWithRef<NativeTimeInputRef, NativeTimeInputProps> & Record<never, never>;
@@ -1,25 +0,0 @@
1
- import React, { useImperativeHandle, useRef } from 'react';
2
- import { forwardRefAndName } from '../../lib/forwardRefAndName.js';
3
- import { useEmotion } from '../../lib/renderEnvironment/index.js';
4
- import { getJsStyles } from './NativeTimeInput.styles.js';
5
- import { getDefaultMaxTime, getDefaultMinTime, getNativeTimeStep, getTimeForComponent, getTimeForNative, } from './NativeTimeInput.utils.js';
6
- export var NativeTimeInput = forwardRefAndName('NativeTimeInput', function (props, ref) {
7
- var _a;
8
- var value = props.value, minTime = props.minTime, maxTime = props.maxTime, format = props.format, disabled = props.disabled, onValueChange = props.onValueChange, dataTid = props["data-tid"];
9
- var jsStyles = getJsStyles(useEmotion());
10
- var inputRef = useRef(null);
11
- useImperativeHandle(ref, function () { return ({
12
- focus: function () {
13
- var _a;
14
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
15
- },
16
- click: function () {
17
- var _a;
18
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
19
- },
20
- }); }, []);
21
- return (React.createElement("input", { type: 'time', "data-tid": dataTid, ref: inputRef, disabled: disabled, className: jsStyles.inputTypeTime(), tabIndex: -1, step: getNativeTimeStep(format), min: minTime ? getTimeForNative(minTime, format) : getDefaultMinTime(format), max: maxTime ? getTimeForNative(maxTime, format) : getDefaultMaxTime(format), value: (_a = getTimeForNative(value, format)) !== null && _a !== void 0 ? _a : '', onChange: function (event) {
22
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(getTimeForComponent(event.target.value, format));
23
- } }));
24
- });
25
- //# sourceMappingURL=NativeTimeInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeTimeInput.js","sourceRoot":"","sources":["NativeTimeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAiBpC,MAAM,CAAC,IAAM,eAAe,GAAG,iBAAiB,CAC9C,iBAAiB,EACjB,UAAC,KAAK,EAAE,GAAG;;IACD,IAAA,KAAK,GAA6E,KAAK,MAAlF,EAAE,OAAO,GAAoE,KAAK,QAAzE,EAAE,OAAO,GAA2D,KAAK,QAAhE,EAAE,MAAM,GAAmD,KAAK,OAAxD,EAAE,QAAQ,GAAyC,KAAK,SAA9C,EAAE,aAAa,GAA0B,KAAK,cAA/B,EAAc,OAAO,GAAK,KAAK,YAAV,CAAW;IAEhG,IAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3C,IAAM,QAAQ,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IAEvD,mBAAmB,CACjB,GAAG,EACH,cAAM,OAAA,CAAC;QACL,KAAK;;YACH,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;QACD,KAAK;;YACH,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC,EAPI,CAOJ,EACF,EAAE,CACH,CAAC;IAEF,OAAO,CACL,+BACE,IAAI,EAAE,MAAM,cACF,OAAO,EACjB,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,QAAQ,CAAC,aAAa,EAAE,EACnC,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAC/B,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAC5E,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAC5E,KAAK,EAAE,MAAA,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,mCAAI,EAAE,EAC5C,QAAQ,EAAE,UAAC,KAAK;YACd,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;QACnE,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import React, { useImperativeHandle, useRef } from 'react';\n\nimport type { TimeFormat } from '../../components/TimePicker/index.js';\nimport { forwardRefAndName } from '../../lib/forwardRefAndName.js';\nimport { useEmotion } from '../../lib/renderEnvironment/index.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { getJsStyles } from './NativeTimeInput.styles.js';\nimport {\n getDefaultMaxTime,\n getDefaultMinTime,\n getNativeTimeStep,\n getTimeForComponent,\n getTimeForNative,\n} from './NativeTimeInput.utils.js';\n\nexport interface NativeTimeInputProps {\n 'data-tid'?: string;\n disabled?: boolean;\n format: TimeFormat;\n value: Nullable<string>;\n minTime?: Nullable<string>;\n maxTime?: Nullable<string>;\n onValueChange?(value: string): void;\n}\n\nexport interface NativeTimeInputRef {\n focus(): void;\n click(): void;\n}\n\nexport const NativeTimeInput = forwardRefAndName<NativeTimeInputRef, NativeTimeInputProps>(\n 'NativeTimeInput',\n (props, ref) => {\n const { value, minTime, maxTime, format, disabled, onValueChange, 'data-tid': dataTid } = props;\n\n const jsStyles = getJsStyles(useEmotion());\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n focus() {\n inputRef.current?.focus();\n },\n click() {\n inputRef.current?.click();\n },\n }),\n [],\n );\n\n return (\n <input\n type={'time'}\n data-tid={dataTid}\n ref={inputRef}\n disabled={disabled}\n className={jsStyles.inputTypeTime()}\n tabIndex={-1}\n step={getNativeTimeStep(format)}\n min={minTime ? getTimeForNative(minTime, format) : getDefaultMinTime(format)}\n max={maxTime ? getTimeForNative(maxTime, format) : getDefaultMaxTime(format)}\n value={getTimeForNative(value, format) ?? ''}\n onChange={(event) => {\n onValueChange?.(getTimeForComponent(event.target.value, format));\n }}\n />\n );\n },\n);\n"]}
@@ -1,3 +0,0 @@
1
- export declare const getJsStyles: import("../../lib/theming/Emotion.js").StylesGetter<{
2
- inputTypeTime(): string;
3
- }>;
@@ -1,15 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { memoizeGetStyles } from '../../lib/theming/Emotion.js';
6
- export var getJsStyles = memoizeGetStyles(function (_a) {
7
- var css = _a.css;
8
- return ({
9
- inputTypeTime: function () {
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 0;\n height: 0;\n padding: 0;\n margin: 0;\n line-height: 0;\n transform: scale(0);\n border: none;\n overflow: hidden;\n opacity: 0;\n "], ["\n width: 0;\n height: 0;\n padding: 0;\n margin: 0;\n line-height: 0;\n transform: scale(0);\n border: none;\n overflow: hidden;\n opacity: 0;\n "])));
11
- },
12
- });
13
- });
14
- var templateObject_1;
15
- //# sourceMappingURL=NativeTimeInput.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeTimeInput.styles.js","sourceRoot":"","sources":["NativeTimeInput.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QACjE,aAAa;YACX,OAAO,GAAG,uQAAA,oMAUT,KAAC;QACJ,CAAC;KACF,CAAC;AAdgE,CAchE,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../lib/theming/Emotion.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => ({\n inputTypeTime() {\n return css`\n width: 0;\n height: 0;\n padding: 0;\n margin: 0;\n line-height: 0;\n transform: scale(0);\n border: none;\n overflow: hidden;\n opacity: 0;\n `;\n },\n}));\n"]}
@@ -1,7 +0,0 @@
1
- import type { TimeFormat } from '../../components/TimePicker/index.js';
2
- import type { Nullable } from '../../typings/utility-types.js';
3
- export declare const getTimeForNative: (componentTime: Nullable<string>, format: TimeFormat) => string | undefined;
4
- export declare const getTimeForComponent: (nativeTime: Nullable<string>, format: TimeFormat) => string;
5
- export declare const getDefaultMinTime: (format: TimeFormat) => string;
6
- export declare const getDefaultMaxTime: (format: TimeFormat) => string;
7
- export declare const getNativeTimeStep: (format: TimeFormat) => number;
@@ -1,28 +0,0 @@
1
- var DEFAULT_NATIVE_MIN_TIME = '00:00:00';
2
- var DEFAULT_NATIVE_MAX_TIME = '23:59:59';
3
- var padTimePart = function (value) { return (value !== null && value !== void 0 ? value : '00').padStart(2, '0'); };
4
- var normalizeNativeTime = function (value, format) {
5
- var _a = value.split(':'), hours = _a[0], minutes = _a[1], seconds = _a[2];
6
- var normalizedTime = "".concat(padTimePart(hours), ":").concat(padTimePart(minutes), ":").concat(padTimePart(seconds));
7
- return format === 'HH:mm' ? normalizedTime.slice(0, 5) : normalizedTime;
8
- };
9
- export var getTimeForNative = function (componentTime, format) {
10
- if (!componentTime) {
11
- return undefined;
12
- }
13
- return normalizeNativeTime(componentTime, format);
14
- };
15
- export var getTimeForComponent = function (nativeTime, format) {
16
- if (!nativeTime) {
17
- return '';
18
- }
19
- return normalizeNativeTime(nativeTime, format);
20
- };
21
- export var getDefaultMinTime = function (format) {
22
- return format === 'HH:mm' ? DEFAULT_NATIVE_MIN_TIME.slice(0, 5) : DEFAULT_NATIVE_MIN_TIME;
23
- };
24
- export var getDefaultMaxTime = function (format) {
25
- return format === 'HH:mm' ? DEFAULT_NATIVE_MAX_TIME.slice(0, 5) : DEFAULT_NATIVE_MAX_TIME;
26
- };
27
- export var getNativeTimeStep = function (format) { return (format === 'HH:mm' ? 60 : 1); };
28
- //# sourceMappingURL=NativeTimeInput.utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeTimeInput.utils.js","sourceRoot":"","sources":["NativeTimeInput.utils.ts"],"names":[],"mappings":"AAGA,IAAM,uBAAuB,GAAG,UAAU,CAAC;AAC3C,IAAM,uBAAuB,GAAG,UAAU,CAAC;AAE3C,IAAM,WAAW,GAAG,UAAC,KAAyB,IAAa,OAAA,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAhC,CAAgC,CAAC;AAE5F,IAAM,mBAAmB,GAAG,UAAC,KAAa,EAAE,MAAkB;IACtD,IAAA,KAA4B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAA3C,KAAK,QAAA,EAAE,OAAO,QAAA,EAAE,OAAO,QAAoB,CAAC;IAEnD,IAAM,cAAc,GAAG,UAAG,WAAW,CAAC,KAAK,CAAC,cAAI,WAAW,CAAC,OAAO,CAAC,cAAI,WAAW,CAAC,OAAO,CAAC,CAAE,CAAC;IAE/F,OAAO,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,aAA+B,EAAE,MAAkB;IAClF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,mBAAmB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,UAA4B,EAAE,MAAkB;IAClF,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,MAAkB;IAClD,OAAA,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB;AAAlF,CAAkF,CAAC;AAErF,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,MAAkB;IAClD,OAAA,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB;AAAlF,CAAkF,CAAC;AAErF,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,MAAkB,IAAa,OAAA,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAA7B,CAA6B,CAAC","sourcesContent":["import type { TimeFormat } from '../../components/TimePicker/index.js';\nimport type { Nullable } from '../../typings/utility-types.js';\n\nconst DEFAULT_NATIVE_MIN_TIME = '00:00:00';\nconst DEFAULT_NATIVE_MAX_TIME = '23:59:59';\n\nconst padTimePart = (value: string | undefined): string => (value ?? '00').padStart(2, '0');\n\nconst normalizeNativeTime = (value: string, format: TimeFormat): string => {\n const [hours, minutes, seconds] = value.split(':');\n\n const normalizedTime = `${padTimePart(hours)}:${padTimePart(minutes)}:${padTimePart(seconds)}`;\n\n return format === 'HH:mm' ? normalizedTime.slice(0, 5) : normalizedTime;\n};\n\nexport const getTimeForNative = (componentTime: Nullable<string>, format: TimeFormat): string | undefined => {\n if (!componentTime) {\n return undefined;\n }\n\n return normalizeNativeTime(componentTime, format);\n};\n\nexport const getTimeForComponent = (nativeTime: Nullable<string>, format: TimeFormat): string => {\n if (!nativeTime) {\n return '';\n }\n\n return normalizeNativeTime(nativeTime, format);\n};\n\nexport const getDefaultMinTime = (format: TimeFormat): string =>\n format === 'HH:mm' ? DEFAULT_NATIVE_MIN_TIME.slice(0, 5) : DEFAULT_NATIVE_MIN_TIME;\n\nexport const getDefaultMaxTime = (format: TimeFormat): string =>\n format === 'HH:mm' ? DEFAULT_NATIVE_MAX_TIME.slice(0, 5) : DEFAULT_NATIVE_MAX_TIME;\n\nexport const getNativeTimeStep = (format: TimeFormat): number => (format === 'HH:mm' ? 60 : 1);\n"]}
@@ -1 +0,0 @@
1
- export * from './NativeTimeInput.js';
@@ -1,2 +0,0 @@
1
- export * from './NativeTimeInput.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './NativeTimeInput.js';\n"]}
@@ -1,2 +0,0 @@
1
- import type { IconProps } from '../BaseIcon.js';
2
- export declare const TimeClockIcon16Light: import("../../../lib/forwardRefAndName.js").ReactUIComponentWithRef<SVGSVGElement, IconProps> & Record<never, never>;
@@ -1,20 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import React from 'react';
13
- import { forwardRefAndName } from '../../../lib/forwardRefAndName.js';
14
- import { BaseIcon } from '../BaseIcon.js';
15
- export var TimeClockIcon16Light = forwardRefAndName('TimeClockIcon16Light', function (props, ref) {
16
- return (React.createElement(BaseIcon, __assign({ ref: ref }, props),
17
- React.createElement("path", { d: "M8 4.40234C8 4.1262 7.77614 3.90234 7.5 3.90234C7.22386 3.90234 7 4.1262 7 4.40234V6.7274C7 7.39025 7.3745 7.99621 7.96738 8.29265L10.2764 9.44716C10.5234 9.57065 10.8237 9.47054 10.9472 9.22355C11.0707 8.97656 10.9706 8.67623 10.7236 8.55273L8.41459 7.39822C8.1605 7.27118 8 7.01148 8 6.7274V4.40234Z" }),
18
- React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1ZM2 7.5C2 4.46243 4.46243 2 7.5 2C10.5376 2 13 4.46243 13 7.5C13 10.5376 10.5376 13 7.5 13C4.46243 13 2 10.5376 2 7.5Z" })));
19
- });
20
- //# sourceMappingURL=TimeClockIcon16Light.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimeClockIcon16Light.js","sourceRoot":"","sources":["TimeClockIcon16Light.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,IAAM,oBAAoB,GAAG,iBAAiB,CACnD,sBAAsB,EACtB,UAAC,KAAK,EAAE,GAAG;IACT,OAAO,CACL,oBAAC,QAAQ,aAAC,GAAG,EAAE,GAAG,IAAM,KAAK;QAC3B,8BAAM,CAAC,EAAC,+SAA+S,GAAG;QAC1T,8BACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,4OAA4O,GAC9O,CACO,CACZ,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import React from 'react';\n\nimport { forwardRefAndName } from '../../../lib/forwardRefAndName.js';\nimport type { IconProps } from '../BaseIcon.js';\nimport { BaseIcon } from '../BaseIcon.js';\n\nexport const TimeClockIcon16Light = forwardRefAndName<SVGSVGElement, IconProps>(\n 'TimeClockIcon16Light',\n (props, ref) => {\n return (\n <BaseIcon ref={ref} {...props}>\n <path d=\"M8 4.40234C8 4.1262 7.77614 3.90234 7.5 3.90234C7.22386 3.90234 7 4.1262 7 4.40234V6.7274C7 7.39025 7.3745 7.99621 7.96738 8.29265L10.2764 9.44716C10.5234 9.57065 10.8237 9.47054 10.9472 9.22355C11.0707 8.97656 10.9706 8.67623 10.7236 8.55273L8.41459 7.39822C8.1605 7.27118 8 7.01148 8 6.7274V4.40234Z\" />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1ZM2 7.5C2 4.46243 4.46243 2 7.5 2C10.5376 2 13 4.46243 13 7.5C13 10.5376 10.5376 13 7.5 13C4.46243 13 2 10.5376 2 7.5Z\"\n />\n </BaseIcon>\n );\n },\n);\n"]}
@@ -1,2 +0,0 @@
1
- import type { IconProps } from '../BaseIcon.js';
2
- export declare const TimeClockIcon20Light: import("../../../lib/forwardRefAndName.js").ReactUIComponentWithRef<SVGSVGElement, IconProps> & Record<never, never>;
@@ -1,20 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import React from 'react';
13
- import { forwardRefAndName } from '../../../lib/forwardRefAndName.js';
14
- import { BaseIcon } from '../BaseIcon.js';
15
- export var TimeClockIcon20Light = forwardRefAndName('TimeClockIcon20Light', function (props, ref) {
16
- return (React.createElement(BaseIcon, __assign({ ref: ref, viewBoxSize: 20 }, props),
17
- React.createElement("path", { d: "M10.0033 6.50463C10.0033 6.22849 9.77943 6.00464 9.50329 6.00464C9.22715 6.00464 9.00329 6.2285 9.0033 6.50464L9.00332 9.47699C9.00332 10.1394 9.3774 10.7451 9.96974 11.0417L12.7761 12.4471C13.023 12.5707 13.3234 12.4708 13.4471 12.2239C13.5707 11.977 13.4708 11.6766 13.2239 11.5529L10.4175 10.1476C10.1636 10.0205 10.0033 9.76089 10.0033 9.47698L10.0033 6.50463Z" }),
18
- React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10Z" })));
19
- });
20
- //# sourceMappingURL=TimeClockIcon20Light.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimeClockIcon20Light.js","sourceRoot":"","sources":["TimeClockIcon20Light.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,IAAM,oBAAoB,GAAG,iBAAiB,CACnD,sBAAsB,EACtB,UAAC,KAAK,EAAE,GAAG;IACT,OAAO,CACL,oBAAC,QAAQ,aAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,IAAM,KAAK;QAC5C,8BAAM,CAAC,EAAC,8WAA8W,GAAG;QACzX,8BACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,8NAA8N,GAChO,CACO,CACZ,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import React from 'react';\n\nimport { forwardRefAndName } from '../../../lib/forwardRefAndName.js';\nimport type { IconProps } from '../BaseIcon.js';\nimport { BaseIcon } from '../BaseIcon.js';\n\nexport const TimeClockIcon20Light = forwardRefAndName<SVGSVGElement, IconProps>(\n 'TimeClockIcon20Light',\n (props, ref) => {\n return (\n <BaseIcon ref={ref} viewBoxSize={20} {...props}>\n <path d=\"M10.0033 6.50463C10.0033 6.22849 9.77943 6.00464 9.50329 6.00464C9.22715 6.00464 9.00329 6.2285 9.0033 6.50464L9.00332 9.47699C9.00332 10.1394 9.3774 10.7451 9.96974 11.0417L12.7761 12.4471C13.023 12.5707 13.3234 12.4708 13.4471 12.2239C13.5707 11.977 13.4708 11.6766 13.2239 11.5529L10.4175 10.1476C10.1636 10.0205 10.0033 9.76089 10.0033 9.47698L10.0033 6.50463Z\" />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10Z\"\n />\n </BaseIcon>\n );\n },\n);\n"]}
@@ -1,2 +0,0 @@
1
- import type { IconProps } from '../BaseIcon.js';
2
- export declare const TimeClockIcon24Regular: import("../../../lib/forwardRefAndName.js").ReactUIComponentWithRef<SVGSVGElement, IconProps> & Record<never, never>;
@@ -1,20 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import React from 'react';
13
- import { forwardRefAndName } from '../../../lib/forwardRefAndName.js';
14
- import { BaseIcon } from '../BaseIcon.js';
15
- export var TimeClockIcon24Regular = forwardRefAndName('TimeClockIcon24Regular', function (props, ref) {
16
- return (React.createElement(BaseIcon, __assign({ ref: ref, viewBoxSize: 24 }, props),
17
- React.createElement("path", { d: "M12.5 7.3125C12.5 6.89829 12.1642 6.5625 11.75 6.5625C11.3358 6.5625 11 6.89829 11 7.3125V11.2604C11 12.1127 11.4815 12.8918 12.2438 13.2729L15.5396 14.9208C15.9101 15.1061 16.3606 14.9559 16.5458 14.5854C16.7311 14.2149 16.5809 13.7644 16.2104 13.5792L12.9146 11.9313C12.6605 11.8042 12.5 11.5445 12.5 11.2604V7.3125Z" }),
18
- React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2.25C6.61522 2.25 2.25 6.61522 2.25 12C2.25 17.3848 6.61522 21.75 12 21.75C17.3848 21.75 21.75 17.3848 21.75 12C21.75 6.61522 17.3848 2.25 12 2.25ZM3.75 12C3.75 7.44365 7.44365 3.75 12 3.75C16.5563 3.75 20.25 7.44365 20.25 12C20.25 16.5563 16.5563 20.25 12 20.25C7.44365 20.25 3.75 16.5563 3.75 12Z" })));
19
- });
20
- //# sourceMappingURL=TimeClockIcon24Regular.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimeClockIcon24Regular.js","sourceRoot":"","sources":["TimeClockIcon24Regular.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,IAAM,sBAAsB,GAAG,iBAAiB,CACrD,wBAAwB,EACxB,UAAC,KAAK,EAAE,GAAG;IACT,OAAO,CACL,oBAAC,QAAQ,aAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,IAAM,KAAK;QAC5C,8BAAM,CAAC,EAAC,gUAAgU,GAAG;QAC3U,8BACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,gTAAgT,GAClT,CACO,CACZ,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import React from 'react';\n\nimport { forwardRefAndName } from '../../../lib/forwardRefAndName.js';\nimport type { IconProps } from '../BaseIcon.js';\nimport { BaseIcon } from '../BaseIcon.js';\n\nexport const TimeClockIcon24Regular = forwardRefAndName<SVGSVGElement, IconProps>(\n 'TimeClockIcon24Regular',\n (props, ref) => {\n return (\n <BaseIcon ref={ref} viewBoxSize={24} {...props}>\n <path d=\"M12.5 7.3125C12.5 6.89829 12.1642 6.5625 11.75 6.5625C11.3358 6.5625 11 6.89829 11 7.3125V11.2604C11 12.1127 11.4815 12.8918 12.2438 13.2729L15.5396 14.9208C15.9101 15.1061 16.3606 14.9559 16.5458 14.5854C16.7311 14.2149 16.5809 13.7644 16.2104 13.5792L12.9146 11.9313C12.6605 11.8042 12.5 11.5445 12.5 11.2604V7.3125Z\" />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12 2.25C6.61522 2.25 2.25 6.61522 2.25 12C2.25 17.3848 6.61522 21.75 12 21.75C17.3848 21.75 21.75 17.3848 21.75 12C21.75 6.61522 17.3848 2.25 12 2.25ZM3.75 12C3.75 7.44365 7.44365 3.75 12 3.75C16.5563 3.75 20.25 7.44365 20.25 12C20.25 16.5563 16.5563 20.25 12 20.25C7.44365 20.25 3.75 16.5563 3.75 12Z\"\n />\n </BaseIcon>\n );\n },\n);\n"]}