@razorpay/blade 11.8.2 → 11.9.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 (226) hide show
  1. package/build/lib/native/components/Checkbox/Checkbox.js +4 -3
  2. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  3. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js +1 -1
  4. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  5. package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -1
  6. package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
  7. package/build/lib/native/components/Checkbox/checkboxTokens.js +1 -1
  8. package/build/lib/native/components/Checkbox/checkboxTokens.js.map +1 -1
  9. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +2 -1
  10. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  11. package/build/lib/native/components/Form/FormHint.js +2 -1
  12. package/build/lib/native/components/Form/FormHint.js.map +1 -1
  13. package/build/lib/native/components/Form/FormLabel.js +3 -1
  14. package/build/lib/native/components/Form/FormLabel.js.map +1 -1
  15. package/build/lib/native/components/Form/Selector/SelectorSupportText.js +1 -1
  16. package/build/lib/native/components/Form/Selector/SelectorSupportText.js.map +1 -1
  17. package/build/lib/native/components/Form/Selector/SelectorTitle.js.map +1 -1
  18. package/build/lib/native/components/Form/formTokens.js +8 -0
  19. package/build/lib/native/components/Form/formTokens.js.map +1 -0
  20. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +5 -3
  21. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  22. package/build/lib/native/components/Input/BaseInput/BaseInput.js +8 -2
  23. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  24. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +2 -2
  25. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
  26. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +4 -2
  27. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  28. package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js +2 -3
  29. package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
  30. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +2 -1
  31. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  32. package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +6 -3
  33. package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
  34. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +8 -0
  35. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -0
  36. package/build/lib/native/components/Input/BaseInput/getBaseInputBorderStyles.native.js +4 -0
  37. package/build/lib/native/components/Input/BaseInput/getBaseInputBorderStyles.native.js.map +1 -0
  38. package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +1 -1
  39. package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  40. package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
  41. package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
  42. package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -1
  43. package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  44. package/build/lib/native/components/Input/TextArea/TextArea.js +2 -1
  45. package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
  46. package/build/lib/native/components/Input/TextInput/TextInput.js +2 -1
  47. package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
  48. package/build/lib/native/components/Radio/Radio.js +4 -3
  49. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  50. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js +1 -1
  51. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  52. package/build/lib/native/components/Radio/radioTokens.js +1 -1
  53. package/build/lib/native/components/Radio/radioTokens.js.map +1 -1
  54. package/build/lib/native/components/Tag/Tag.js +1 -1
  55. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  56. package/build/lib/native/components/Tag/getTagsGroup.js +1 -1
  57. package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
  58. package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
  59. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  60. package/build/lib/native/components/Typography/Heading/getHeadingStyles.js +7 -0
  61. package/build/lib/native/components/Typography/Heading/getHeadingStyles.js.map +1 -0
  62. package/build/lib/native/components/Typography/Text/Text.js +1 -1
  63. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  64. package/build/lib/native/components/index.js +1 -1
  65. package/build/lib/native/tokens/global/size.js +1 -1
  66. package/build/lib/native/tokens/global/size.js.map +1 -1
  67. package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js.map +1 -1
  68. package/build/lib/web/development/components/Checkbox/Checkbox.js +17 -3
  69. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  70. package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -0
  71. package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  72. package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +4 -0
  73. package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
  74. package/build/lib/web/development/components/Checkbox/checkboxTokens.js +12 -4
  75. package/build/lib/web/development/components/Checkbox/checkboxTokens.js.map +1 -1
  76. package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js +5 -1
  77. package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  78. package/build/lib/web/development/components/Form/FormHint.js +34 -17
  79. package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
  80. package/build/lib/web/development/components/Form/FormLabel.js +10 -7
  81. package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
  82. package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js +8 -2
  83. package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js.map +1 -1
  84. package/build/lib/web/development/components/Form/Selector/SelectorTitle.js.map +1 -1
  85. package/build/lib/web/development/components/Form/formTokens.js +53 -0
  86. package/build/lib/web/development/components/Form/formTokens.js.map +1 -0
  87. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +23 -37
  88. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  89. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +200 -155
  90. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  91. package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -3
  92. package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
  93. package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +101 -34
  94. package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  95. package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +3 -7
  96. package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
  97. package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +14 -5
  98. package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
  99. package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +119 -67
  100. package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
  101. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +88 -0
  102. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -0
  103. package/build/lib/web/development/components/Input/BaseInput/getBaseInputBorderStyles.web.js +23 -0
  104. package/build/lib/web/development/components/Input/BaseInput/getBaseInputBorderStyles.web.js.map +1 -0
  105. package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +11 -6
  106. package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  107. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +9 -3
  108. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
  109. package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +5 -2
  110. package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  111. package/build/lib/web/development/components/Input/TextArea/TextArea.js +7 -3
  112. package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
  113. package/build/lib/web/development/components/Input/TextInput/TextInput.js +17 -6
  114. package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
  115. package/build/lib/web/development/components/Radio/Radio.js +10 -3
  116. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  117. package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +2 -0
  118. package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  119. package/build/lib/web/development/components/Radio/radioTokens.js +13 -4
  120. package/build/lib/web/development/components/Radio/radioTokens.js.map +1 -1
  121. package/build/lib/web/development/components/Tag/AnimatedTag.web.js +4 -1
  122. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  123. package/build/lib/web/development/components/Tag/Tag.js +2 -2
  124. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  125. package/build/lib/web/development/components/Tag/getTagsGroup.js +4 -1
  126. package/build/lib/web/development/components/Tag/getTagsGroup.js.map +1 -1
  127. package/build/lib/web/development/components/Typography/Heading/Heading.js +3 -3
  128. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  129. package/build/lib/web/development/components/Typography/Heading/getHeadingStyles.js +22 -0
  130. package/build/lib/web/development/components/Typography/Heading/getHeadingStyles.js.map +1 -0
  131. package/build/lib/web/development/components/Typography/Heading/index.js +1 -1
  132. package/build/lib/web/development/components/Typography/Text/Text.js +8 -3
  133. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  134. package/build/lib/web/development/components/index.js +1 -1
  135. package/build/lib/web/development/tokens/global/size.js +2 -0
  136. package/build/lib/web/development/tokens/global/size.js.map +1 -1
  137. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -0
  138. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  139. package/build/lib/web/production/components/Checkbox/Checkbox.js +17 -3
  140. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  141. package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -0
  142. package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  143. package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +4 -0
  144. package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
  145. package/build/lib/web/production/components/Checkbox/checkboxTokens.js +12 -4
  146. package/build/lib/web/production/components/Checkbox/checkboxTokens.js.map +1 -1
  147. package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js +5 -1
  148. package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  149. package/build/lib/web/production/components/Form/FormHint.js +34 -17
  150. package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
  151. package/build/lib/web/production/components/Form/FormLabel.js +10 -7
  152. package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
  153. package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js +8 -2
  154. package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js.map +1 -1
  155. package/build/lib/web/production/components/Form/Selector/SelectorTitle.js.map +1 -1
  156. package/build/lib/web/production/components/Form/formTokens.js +53 -0
  157. package/build/lib/web/production/components/Form/formTokens.js.map +1 -0
  158. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +23 -37
  159. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  160. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +200 -155
  161. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  162. package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -3
  163. package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
  164. package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +101 -34
  165. package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  166. package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +3 -7
  167. package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
  168. package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +14 -5
  169. package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
  170. package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +119 -67
  171. package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
  172. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +88 -0
  173. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -0
  174. package/build/lib/web/production/components/Input/BaseInput/getBaseInputBorderStyles.web.js +23 -0
  175. package/build/lib/web/production/components/Input/BaseInput/getBaseInputBorderStyles.web.js.map +1 -0
  176. package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +11 -6
  177. package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  178. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +9 -3
  179. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
  180. package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +5 -2
  181. package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  182. package/build/lib/web/production/components/Input/TextArea/TextArea.js +7 -3
  183. package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
  184. package/build/lib/web/production/components/Input/TextInput/TextInput.js +17 -6
  185. package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
  186. package/build/lib/web/production/components/Radio/Radio.js +10 -3
  187. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  188. package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +2 -0
  189. package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  190. package/build/lib/web/production/components/Radio/radioTokens.js +13 -4
  191. package/build/lib/web/production/components/Radio/radioTokens.js.map +1 -1
  192. package/build/lib/web/production/components/Tag/AnimatedTag.web.js +4 -1
  193. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  194. package/build/lib/web/production/components/Tag/Tag.js +2 -2
  195. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  196. package/build/lib/web/production/components/Tag/getTagsGroup.js +4 -1
  197. package/build/lib/web/production/components/Tag/getTagsGroup.js.map +1 -1
  198. package/build/lib/web/production/components/Typography/Heading/Heading.js +3 -3
  199. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  200. package/build/lib/web/production/components/Typography/Heading/getHeadingStyles.js +22 -0
  201. package/build/lib/web/production/components/Typography/Heading/getHeadingStyles.js.map +1 -0
  202. package/build/lib/web/production/components/Typography/Heading/index.js +1 -1
  203. package/build/lib/web/production/components/Typography/Text/Text.js +8 -3
  204. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  205. package/build/lib/web/production/components/index.js +1 -1
  206. package/build/lib/web/production/tokens/global/size.js +2 -0
  207. package/build/lib/web/production/tokens/global/size.js.map +1 -1
  208. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -0
  209. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  210. package/build/types/components/index.d.ts +36 -15
  211. package/build/types/components/index.native.d.ts +36 -15
  212. package/build/types/tokens/index.d.ts +2 -0
  213. package/build/types/tokens/index.native.d.ts +2 -0
  214. package/package.json +1 -1
  215. package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js +0 -16
  216. package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js.map +0 -1
  217. package/build/lib/native/components/Input/BaseInput/baseInputConfig.js +0 -8
  218. package/build/lib/native/components/Input/BaseInput/baseInputConfig.js.map +0 -1
  219. package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +0 -43
  220. package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +0 -1
  221. package/build/lib/web/development/components/Input/BaseInput/baseInputConfig.js +0 -26
  222. package/build/lib/web/development/components/Input/BaseInput/baseInputConfig.js.map +0 -1
  223. package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +0 -43
  224. package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +0 -1
  225. package/build/lib/web/production/components/Input/BaseInput/baseInputConfig.js +0 -26
  226. package/build/lib/web/production/components/Input/BaseInput/baseInputConfig.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import 'react';
3
+ import { labelOptionalIndicatorTextSize, labelTextSize, labelWidth, labelLeftMarginRight, labelMarginBottom } from './formTokens.js';
3
4
  import '../VisuallyHidden/index.web.js';
4
5
  import '../Typography/index.js';
5
6
  import '../../utils/index.js';
@@ -7,8 +8,8 @@ import '../../utils/metaAttribute/index.js';
7
8
  import '../Box/BaseBox/index.js';
8
9
  import '../BladeProvider/index.js';
9
10
  import '../../utils/makeSpace/index.js';
10
- import '../../utils/makeSize/index.js';
11
11
  import '../../tokens/global/index.js';
12
+ import getIn from '../../utils/lodashButBetter/get.js';
12
13
  import { jsx, jsxs } from 'react/jsx-runtime';
13
14
  import useTheme from '../BladeProvider/useTheme.js';
14
15
  import { useBreakpoint } from '../../utils/useBreakpoint/useBreakpoint.js';
@@ -34,7 +35,9 @@ var FormLabel = function FormLabel(_ref) {
34
35
  accessibilityText = _ref.accessibilityText,
35
36
  children = _ref.children,
36
37
  id = _ref.id,
37
- htmlFor = _ref.htmlFor;
38
+ htmlFor = _ref.htmlFor,
39
+ _ref$size = _ref.size,
40
+ size$1 = _ref$size === void 0 ? 'medium' : _ref$size;
38
41
  var _useTheme = useTheme(),
39
42
  theme = _useTheme.theme;
40
43
  var _useBreakpoint = useBreakpoint({
@@ -48,7 +51,7 @@ var FormLabel = function FormLabel(_ref) {
48
51
  if (necessityIndicator === 'optional') {
49
52
  necessityLabel = /*#__PURE__*/jsx(Text, {
50
53
  variant: "caption",
51
- size: "small",
54
+ size: labelOptionalIndicatorTextSize[size$1],
52
55
  color: "surface.text.gray.muted",
53
56
  children: "(optional)"
54
57
  });
@@ -77,7 +80,7 @@ var FormLabel = function FormLabel(_ref) {
77
80
  maxHeight: makeSpace(size[36]),
78
81
  children: [/*#__PURE__*/jsx(Text, {
79
82
  variant: "body",
80
- size: isLabelLeftPositioned ? 'medium' : 'small',
83
+ size: labelTextSize[isLabelLeftPositioned ? 'left' : 'top'][size$1],
81
84
  color: "surface.text.gray.subtle",
82
85
  truncateAfterLines: 2,
83
86
  weight: "semibold",
@@ -96,20 +99,20 @@ var FormLabel = function FormLabel(_ref) {
96
99
  }
97
100
  var Component = as;
98
101
  // only set 120px label when device is desktop
99
- var width = isLabelLeftPositioned && isDesktop ? makeSize(size[120]) : 'auto';
102
+ var width = isLabelLeftPositioned && isDesktop ? makeSize(labelWidth[size$1]) : 'auto';
100
103
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({
101
104
  htmlFor: htmlFor,
102
105
  style: {
103
106
  width: width,
104
107
  flexShrink: 0,
105
- marginRight: makeSpace(theme.spacing[5])
108
+ marginRight: isLabelLeftPositioned ? makeSpace(getIn(theme, labelLeftMarginRight[size$1])) : makeSpace(getIn(theme, 'spacing.0'))
106
109
  },
107
110
  id: id
108
111
  }, metaAttribute({
109
112
  name: MetaConstants.FormLabel
110
113
  })), {}, {
111
114
  children: /*#__PURE__*/jsx(BaseBox, {
112
- marginBottom: isLabelLeftPositioned ? 'spacing.0' : 'spacing.2',
115
+ marginBottom: isLabelLeftPositioned ? 'spacing.0' : labelMarginBottom[size$1],
113
116
  children: textNode
114
117
  })
115
118
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"FormLabel.js","sources":["../../../../../../src/components/Form/FormLabel.tsx"],"sourcesContent":["import React from 'react';\nimport { VisuallyHidden } from '~components/VisuallyHidden';\nimport { Text } from '~components/Typography';\nimport { getPlatformType, useBreakpoint } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeSize } from '~utils/makeSize';\nimport { size } from '~tokens/global';\n\ntype CommonProps = {\n as: 'span' | 'label';\n position?: 'top' | 'left';\n necessityIndicator?: 'required' | 'optional' | 'none';\n accessibilityText?: string;\n children: string | undefined;\n id?: string;\n};\n\ntype LabelProps = CommonProps & {\n htmlFor: string;\n as: 'label';\n};\n\ntype SpanProps = CommonProps & {\n as: 'span';\n htmlFor?: undefined;\n};\n\ntype FormLabelProps = LabelProps | SpanProps;\n\nexport type FormInputLabelProps = {\n /**\n * Label to be shown for the input field\n */\n label?: string;\n /**\n * Desktop only prop. Default value on mobile will be `top`\n */\n labelPosition?: 'left' | 'top';\n /**\n * Displays `(optional)` when `optional` is passed or `*` when `required` is passed\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n};\n\nconst FormLabel = ({\n as = 'span',\n position = 'top',\n necessityIndicator = 'none',\n accessibilityText,\n children,\n id,\n htmlFor,\n}: FormLabelProps): React.ReactElement => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n const isReactNative = getPlatformType() === 'react-native';\n\n let necessityLabel: React.ReactNode = null;\n\n const isLabelLeftPositioned = position === 'left' && isDesktop;\n\n if (necessityIndicator === 'optional') {\n necessityLabel = (\n <Text variant=\"caption\" size=\"small\" color=\"surface.text.gray.muted\">\n (optional)\n </Text>\n );\n }\n if (necessityIndicator === 'required') {\n necessityLabel = (\n <Text\n variant=\"body\"\n size={isLabelLeftPositioned ? 'medium' : 'small'}\n color=\"feedback.text.negative.intense\"\n >\n *\n </Text>\n );\n }\n\n const computedAccessibilityNode = (\n <VisuallyHidden>\n {necessityIndicator !== 'none' && <Text>{necessityIndicator}</Text>}\n <Text>{accessibilityText}</Text>\n </VisuallyHidden>\n );\n\n const textNode = (\n <BaseBox\n gap={necessityIndicator === 'optional' ? 'spacing.2' : 'spacing.0'}\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n flexWrap=\"wrap\"\n maxHeight={makeSpace(size[36])}\n >\n <Text\n variant=\"body\"\n size={isLabelLeftPositioned ? 'medium' : 'small'}\n color=\"surface.text.gray.subtle\"\n truncateAfterLines={2}\n weight=\"semibold\"\n wordBreak={isLabelLeftPositioned ? 'break-word' : undefined}\n >\n {children}\n </Text>\n {computedAccessibilityNode}\n {/* TODO: Hide from screen readers to prevent double announcement */}\n {necessityLabel}\n </BaseBox>\n );\n\n // What harm can it do?\n if (isReactNative) {\n return (\n <BaseBox marginRight=\"spacing.5\" marginBottom=\"spacing.2\">\n {textNode}\n </BaseBox>\n );\n }\n\n const Component = as;\n // only set 120px label when device is desktop\n const width = isLabelLeftPositioned && isDesktop ? makeSize(size[120]) : 'auto';\n\n return (\n <Component\n htmlFor={htmlFor}\n style={{\n width,\n flexShrink: 0,\n marginRight: makeSpace(theme.spacing[5]),\n }}\n id={id}\n {...metaAttribute({ name: MetaConstants.FormLabel })}\n >\n <BaseBox marginBottom={isLabelLeftPositioned ? 'spacing.0' : 'spacing.2'}>{textNode}</BaseBox>\n </Component>\n );\n};\n\nexport { FormLabel };\n"],"names":["FormLabel","_ref","_ref$as","as","_ref$position","position","_ref$necessityIndicat","necessityIndicator","accessibilityText","children","id","htmlFor","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","isReactNative","getPlatformType","necessityLabel","isLabelLeftPositioned","_jsx","Text","variant","size","color","computedAccessibilityNode","_jsxs","VisuallyHidden","textNode","BaseBox","gap","display","flexDirection","alignItems","flexWrap","maxHeight","makeSpace","truncateAfterLines","weight","wordBreak","undefined","marginRight","marginBottom","Component","width","makeSize","_objectSpread","style","flexShrink","spacing","metaAttribute","name","MetaConstants"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQ2B;AAAA,EAAA,IAAAC,OAAA,GAAAD,IAAA,CAPxCE,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,OAAA;IAAAE,aAAA,GAAAH,IAAA,CACXI,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAAAE,qBAAA,GAAAL,IAAA,CAChBM,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,qBAAA;IAC3BE,iBAAiB,GAAAP,IAAA,CAAjBO,iBAAiB;IACjBC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,EAAE,GAAAT,IAAA,CAAFS,EAAE;IACFC,OAAO,GAAAV,IAAA,CAAPU,OAAO,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;EACb,IAAAC,cAA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jBwC,IAAAA,KAAK,EAAE;AACLH,MAAAA,KAAK,EAALA,KAAK;AACLI,MAAAA,UAAU,EAAE,CAAC;MACbP,WAAW,EAAEL,SAAS,CAAC1B,KAAK,CAACuC,OAAO,CAAC,CAAC,CAAC,CAAA;KACvC;AACF3C,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACH4C,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACxD,SAAAA;AAAU,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAS,QAAA,eAEpDe,GAAA,CAACS,OAAO,EAAA;AAACa,MAAAA,YAAY,EAAEvB,qBAAqB,GAAG,WAAW,GAAG,WAAY;AAAAd,MAAAA,QAAA,EAAEuB,QAAAA;KAAkB,CAAA;AAAC,GAAA,CACrF,CAAC,CAAA;AAEhB;;;;"}
1
+ {"version":3,"file":"FormLabel.js","sources":["../../../../../../src/components/Form/FormLabel.tsx"],"sourcesContent":["import React from 'react';\nimport {\n labelLeftMarginRight,\n labelMarginBottom,\n labelOptionalIndicatorTextSize,\n labelTextSize,\n labelWidth,\n} from './formTokens';\nimport { VisuallyHidden } from '~components/VisuallyHidden';\nimport { Text } from '~components/Typography';\nimport { getPlatformType, makeSize, useBreakpoint } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeSpace } from '~utils/makeSpace';\nimport { size as sizeToken } from '~tokens/global';\nimport getIn from '~utils/lodashButBetter/get';\n\ntype CommonProps = {\n as: 'span' | 'label';\n position?: 'top' | 'left';\n necessityIndicator?: 'required' | 'optional' | 'none';\n accessibilityText?: string;\n children: string | undefined;\n id?: string;\n /**\n * Sets the size of the label\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\ntype LabelProps = CommonProps & {\n htmlFor: string;\n as: 'label';\n};\n\ntype SpanProps = CommonProps & {\n as: 'span';\n htmlFor?: undefined;\n};\n\ntype FormLabelProps = LabelProps | SpanProps;\n\nexport type FormInputLabelProps = {\n /**\n * Label to be shown for the input field\n */\n label?: string;\n /**\n * Desktop only prop. Default value on mobile will be `top`\n */\n labelPosition?: 'left' | 'top';\n /**\n * Displays `(optional)` when `optional` is passed or `*` when `required` is passed\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n};\n\nconst FormLabel = ({\n as = 'span',\n position = 'top',\n necessityIndicator = 'none',\n accessibilityText,\n children,\n id,\n htmlFor,\n size = 'medium',\n}: FormLabelProps): React.ReactElement => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n const isReactNative = getPlatformType() === 'react-native';\n\n let necessityLabel: React.ReactNode = null;\n\n const isLabelLeftPositioned = position === 'left' && isDesktop;\n\n if (necessityIndicator === 'optional') {\n necessityLabel = (\n <Text\n variant=\"caption\"\n size={labelOptionalIndicatorTextSize[size]}\n color=\"surface.text.gray.muted\"\n >\n (optional)\n </Text>\n );\n }\n if (necessityIndicator === 'required') {\n necessityLabel = (\n <Text\n variant=\"body\"\n size={isLabelLeftPositioned ? 'medium' : 'small'}\n color=\"feedback.text.negative.intense\"\n >\n *\n </Text>\n );\n }\n\n const computedAccessibilityNode = (\n <VisuallyHidden>\n {necessityIndicator !== 'none' && <Text>{necessityIndicator}</Text>}\n <Text>{accessibilityText}</Text>\n </VisuallyHidden>\n );\n\n const textNode = (\n <BaseBox\n gap={necessityIndicator === 'optional' ? 'spacing.2' : 'spacing.0'}\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n flexWrap=\"wrap\"\n maxHeight={makeSpace(sizeToken[36])}\n >\n <Text\n variant=\"body\"\n size={labelTextSize[isLabelLeftPositioned ? 'left' : 'top'][size]}\n color=\"surface.text.gray.subtle\"\n truncateAfterLines={2}\n weight=\"semibold\"\n wordBreak={isLabelLeftPositioned ? 'break-word' : undefined}\n >\n {children}\n </Text>\n {computedAccessibilityNode}\n {/* TODO: Hide from screen readers to prevent double announcement */}\n {necessityLabel}\n </BaseBox>\n );\n\n // What harm can it do?\n if (isReactNative) {\n return (\n <BaseBox marginRight=\"spacing.5\" marginBottom=\"spacing.2\">\n {textNode}\n </BaseBox>\n );\n }\n\n const Component = as;\n // only set 120px label when device is desktop\n const width = isLabelLeftPositioned && isDesktop ? makeSize(labelWidth[size]) : 'auto';\n\n return (\n <Component\n htmlFor={htmlFor}\n style={{\n width,\n flexShrink: 0,\n marginRight: isLabelLeftPositioned\n ? makeSpace(getIn(theme, labelLeftMarginRight[size]))\n : makeSpace(getIn(theme, 'spacing.0')),\n }}\n id={id}\n {...metaAttribute({ name: MetaConstants.FormLabel })}\n >\n <BaseBox marginBottom={isLabelLeftPositioned ? 'spacing.0' : labelMarginBottom[size]}>\n {textNode}\n </BaseBox>\n </Component>\n );\n};\n\nexport { FormLabel };\n"],"names":["FormLabel","_ref","_ref$as","as","_ref$position","position","_ref$necessityIndicat","necessityIndicator","accessibilityText","children","id","htmlFor","_ref$size","size","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","isReactNative","getPlatformType","necessityLabel","isLabelLeftPositioned","_jsx","Text","variant","labelOptionalIndicatorTextSize","color","computedAccessibilityNode","_jsxs","VisuallyHidden","textNode","BaseBox","gap","display","flexDirection","alignItems","flexWrap","maxHeight","makeSpace","sizeToken","labelTextSize","truncateAfterLines","weight","wordBreak","undefined","marginRight","marginBottom","Component","width","makeSize","labelWidth","_objectSpread","style","flexShrink","getIn","labelLeftMarginRight","metaAttribute","name","MetaConstants","labelMarginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAS2B;AAAA,EAAA,IAAAC,OAAA,GAAAD,IAAA,CARxCE,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,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AAiB,CAAClD,MAAI,CAAE;AAAAJ,MAAAA,QAAA,EAClFyB,QAAAA;KACM,CAAA;AAAC,GAAA,CACD,CAAC,CAAA;AAEhB;;;;"}
@@ -10,14 +10,20 @@ import { Text } from '../../Typography/Text/Text.js';
10
10
  var SelectorSupportText = function SelectorSupportText(_ref) {
11
11
  var children = _ref.children,
12
12
  id = _ref.id,
13
- isNegative = _ref.isNegative;
13
+ isNegative = _ref.isNegative,
14
+ size = _ref.size;
14
15
  var isReactNative = getPlatformType() === 'react-native';
16
+ var sizeMapping = {
17
+ small: 'small',
18
+ medium: 'small',
19
+ large: 'medium'
20
+ };
15
21
  return /*#__PURE__*/jsx(Box, {
16
22
  id: id,
17
23
  display: isReactNative ? undefined : castWebType('contents'),
18
24
  children: /*#__PURE__*/jsx(Text, {
19
25
  variant: "caption",
20
- size: "small",
26
+ size: sizeMapping[size],
21
27
  as: isReactNative ? undefined : 'span',
22
28
  color: isNegative ? 'feedback.text.negative.intense' : 'surface.text.gray.muted',
23
29
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorSupportText.js","sources":["../../../../../../../src/components/Form/Selector/SelectorSupportText.tsx"],"sourcesContent":["import { Box } from '~components/Box';\nimport { Text } from '~components/Typography/Text';\nimport { castWebType, getPlatformType } from '~utils';\n\nconst SelectorSupportText = ({\n children,\n id,\n isNegative,\n}: {\n children: React.ReactNode;\n id?: string;\n isNegative?: boolean;\n}): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <Box id={id} display={isReactNative ? undefined : castWebType('contents')}>\n <Text\n variant=\"caption\"\n size=\"small\"\n as={isReactNative ? undefined : 'span'}\n color={isNegative ? 'feedback.text.negative.intense' : 'surface.text.gray.muted'}\n >\n {children}\n </Text>\n </Box>\n );\n};\n\nexport { SelectorSupportText };\n"],"names":["SelectorSupportText","_ref","children","id","isNegative","isReactNative","getPlatformType","_jsx","Box","display","undefined","castWebType","Text","variant","size","as","color"],"mappings":";;;;;;;;;AAIA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAQC;AAAA,EAAA,IAPxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,UAAU,GAAAH,IAAA,CAAVG,UAAU,CAAA;AAMV,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;EAE1D,oBACEC,GAAA,CAACC,GAAG,EAAA;AAACL,IAAAA,EAAE,EAAEA,EAAG;IAACM,OAAO,EAAEJ,aAAa,GAAGK,SAAS,GAAGC,WAAW,CAAC,UAAU,CAAE;IAAAT,QAAA,eACxEK,GAAA,CAACK,IAAI,EAAA;AACHC,MAAAA,OAAO,EAAC,SAAS;AACjBC,MAAAA,IAAI,EAAC,OAAO;AACZC,MAAAA,EAAE,EAAEV,aAAa,GAAGK,SAAS,GAAG,MAAO;AACvCM,MAAAA,KAAK,EAAEZ,UAAU,GAAG,gCAAgC,GAAG,yBAA0B;AAAAF,MAAAA,QAAA,EAEhFA,QAAAA;KACG,CAAA;AAAC,GACJ,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"SelectorSupportText.js","sources":["../../../../../../../src/components/Form/Selector/SelectorSupportText.tsx"],"sourcesContent":["import { Box } from '~components/Box';\nimport { Text } from '~components/Typography/Text';\nimport { castWebType, getPlatformType } from '~utils';\n\nconst SelectorSupportText = ({\n children,\n id,\n isNegative,\n size,\n}: {\n children: React.ReactNode;\n id?: string;\n isNegative?: boolean;\n size: 'small' | 'medium' | 'large';\n}): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const sizeMapping = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n } as const;\n\n return (\n <Box id={id} display={isReactNative ? undefined : castWebType('contents')}>\n <Text\n variant=\"caption\"\n size={sizeMapping[size]}\n as={isReactNative ? undefined : 'span'}\n color={isNegative ? 'feedback.text.negative.intense' : 'surface.text.gray.muted'}\n >\n {children}\n </Text>\n </Box>\n );\n};\n\nexport { SelectorSupportText };\n"],"names":["SelectorSupportText","_ref","children","id","isNegative","size","isReactNative","getPlatformType","sizeMapping","small","medium","large","_jsx","Box","display","undefined","castWebType","Text","variant","as","color"],"mappings":";;;;;;;;;AAIA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAUC;AAAA,EAAA,IATxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,IAAI,GAAAJ,IAAA,CAAJI,IAAI,CAAA;AAOJ,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC1D,EAAA,IAAMC,WAAW,GAAG;AAClBC,IAAAA,KAAK,EAAE,OAAO;AACdC,IAAAA,MAAM,EAAE,OAAO;AACfC,IAAAA,KAAK,EAAE,QAAA;GACC,CAAA;EAEV,oBACEC,GAAA,CAACC,GAAG,EAAA;AAACV,IAAAA,EAAE,EAAEA,EAAG;IAACW,OAAO,EAAER,aAAa,GAAGS,SAAS,GAAGC,WAAW,CAAC,UAAU,CAAE;IAAAd,QAAA,eACxEU,GAAA,CAACK,IAAI,EAAA;AACHC,MAAAA,OAAO,EAAC,SAAS;AACjBb,MAAAA,IAAI,EAAEG,WAAW,CAACH,IAAI,CAAE;AACxBc,MAAAA,EAAE,EAAEb,aAAa,GAAGS,SAAS,GAAG,MAAO;AACvCK,MAAAA,KAAK,EAAEhB,UAAU,GAAG,gCAAgC,GAAG,yBAA0B;AAAAF,MAAAA,QAAA,EAEhFA,QAAAA;KACG,CAAA;AAAC,GACJ,CAAC,CAAA;AAEV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorTitle.js","sources":["../../../../../../../src/components/Form/Selector/SelectorTitle.tsx"],"sourcesContent":["import BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography/Text';\n\nconst SelectorTitle = ({\n children,\n isDisabled,\n size = 'medium',\n}: {\n children: React.ReactNode;\n isDisabled?: boolean;\n size: 'small' | 'medium';\n}): React.ReactElement => {\n return (\n <>\n <BaseBox marginLeft=\"spacing.2\" />\n <Text\n size={size}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {children}\n </Text>\n </>\n );\n};\n\nexport { SelectorTitle };\n"],"names":["SelectorTitle","_ref","children","isDisabled","_ref$size","size","_jsxs","_Fragment","_jsx","BaseBox","marginLeft","Text","color"],"mappings":";;;;;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQO;AAAA,EAAA,IAPxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAAC,SAAA,GAAAH,IAAA,CACVI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA,CAAA;EAMf,oBACEE,IAAA,CAAAC,QAAA,EAAA;IAAAL,QAAA,EAAA,cACEM,GAAA,CAACC,OAAO,EAAA;AAACC,MAAAA,UAAU,EAAC,WAAA;AAAW,KAAE,CAAC,eAClCF,GAAA,CAACG,IAAI,EAAA;AACHN,MAAAA,IAAI,EAAEA,IAAK;AACXO,MAAAA,KAAK,EAAET,UAAU,GAAG,4BAA4B,GAAG,0BAA2B;AAAAD,MAAAA,QAAA,EAE7EA,QAAAA;AAAQ,KACL,CAAC,CAAA;AAAA,GACP,CAAC,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"SelectorTitle.js","sources":["../../../../../../../src/components/Form/Selector/SelectorTitle.tsx"],"sourcesContent":["import BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography/Text';\n\nconst SelectorTitle = ({\n children,\n isDisabled,\n size = 'medium',\n}: {\n children: React.ReactNode;\n isDisabled?: boolean;\n size: 'small' | 'medium' | 'large';\n}): React.ReactElement => {\n return (\n <>\n <BaseBox marginLeft=\"spacing.2\" />\n <Text\n size={size}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {children}\n </Text>\n </>\n );\n};\n\nexport { SelectorTitle };\n"],"names":["SelectorTitle","_ref","children","isDisabled","_ref$size","size","_jsxs","_Fragment","_jsx","BaseBox","marginLeft","Text","color"],"mappings":";;;;;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQO;AAAA,EAAA,IAPxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAAC,SAAA,GAAAH,IAAA,CACVI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA,CAAA;EAMf,oBACEE,IAAA,CAAAC,QAAA,EAAA;IAAAL,QAAA,EAAA,cACEM,GAAA,CAACC,OAAO,EAAA;AAACC,MAAAA,UAAU,EAAC,WAAA;AAAW,KAAE,CAAC,eAClCF,GAAA,CAACG,IAAI,EAAA;AACHN,MAAAA,IAAI,EAAEA,IAAK;AACXO,MAAAA,KAAK,EAAET,UAAU,GAAG,4BAA4B,GAAG,0BAA2B;AAAAD,MAAAA,QAAA,EAE7EA,QAAAA;AAAQ,KACL,CAAC,CAAA;AAAA,GACP,CAAC,CAAA;AAEP;;;;"}
@@ -0,0 +1,53 @@
1
+ import '../../tokens/global/index.js';
2
+ import { size } from '../../tokens/global/size.js';
3
+
4
+ var labelTextSize = {
5
+ top: {
6
+ small: 'small',
7
+ medium: 'small',
8
+ large: 'medium'
9
+ },
10
+ left: {
11
+ small: 'small',
12
+ medium: 'medium',
13
+ large: 'large'
14
+ }
15
+ };
16
+ var labelOptionalIndicatorTextSize = {
17
+ small: 'small',
18
+ medium: 'small',
19
+ large: 'medium'
20
+ };
21
+ var hintTextSize = {
22
+ small: 'small',
23
+ medium: 'small',
24
+ large: 'medium'
25
+ };
26
+ var hintIconSize = {
27
+ small: 'small',
28
+ medium: 'small',
29
+ large: 'medium'
30
+ };
31
+ var hintMarginTop = {
32
+ small: 'spacing.2',
33
+ medium: 'spacing.2',
34
+ large: 'spacing.3'
35
+ };
36
+ var labelMarginBottom = {
37
+ small: 'spacing.2',
38
+ medium: 'spacing.2',
39
+ large: 'spacing.3'
40
+ };
41
+ var labelWidth = {
42
+ small: size[120],
43
+ medium: size[120],
44
+ large: size[176]
45
+ };
46
+ var labelLeftMarginRight = {
47
+ small: 'spacing.3',
48
+ medium: 'spacing.4',
49
+ large: 'spacing.5'
50
+ };
51
+
52
+ export { hintIconSize, hintMarginTop, hintTextSize, labelLeftMarginRight, labelMarginBottom, labelOptionalIndicatorTextSize, labelTextSize, labelWidth };
53
+ //# sourceMappingURL=formTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formTokens.js","sources":["../../../../../../src/components/Form/formTokens.ts"],"sourcesContent":["import { size } from '~tokens/global';\n\nconst labelTextSize = {\n top: {\n small: 'small',\n medium: 'small',\n large: 'medium',\n },\n left: {\n small: 'small',\n medium: 'medium',\n large: 'large',\n },\n} as const;\n\nconst labelOptionalIndicatorTextSize = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst hintTextSize = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst hintIconSize = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst hintMarginTop = {\n small: 'spacing.2',\n medium: 'spacing.2',\n large: 'spacing.3',\n} as const;\n\nconst labelMarginBottom = {\n small: 'spacing.2',\n medium: 'spacing.2',\n large: 'spacing.3',\n} as const;\n\nconst labelWidth = {\n small: size[120],\n medium: size[120],\n large: size[176],\n} as const;\n\nconst labelLeftMarginRight = {\n small: 'spacing.3',\n medium: 'spacing.4',\n large: 'spacing.5',\n} as const;\n\nexport {\n labelTextSize,\n labelOptionalIndicatorTextSize,\n hintTextSize,\n hintIconSize,\n hintMarginTop,\n labelMarginBottom,\n labelWidth,\n labelLeftMarginRight,\n};\n"],"names":["labelTextSize","top","small","medium","large","left","labelOptionalIndicatorTextSize","hintTextSize","hintIconSize","hintMarginTop","labelMarginBottom","labelWidth","size","labelLeftMarginRight"],"mappings":";;;AAEA,IAAMA,aAAa,GAAG;AACpBC,EAAAA,GAAG,EAAE;AACHC,IAAAA,KAAK,EAAE,OAAO;AACdC,IAAAA,MAAM,EAAE,OAAO;AACfC,IAAAA,KAAK,EAAE,QAAA;GACR;AACDC,EAAAA,IAAI,EAAE;AACJH,IAAAA,KAAK,EAAE,OAAO;AACdC,IAAAA,MAAM,EAAE,QAAQ;AAChBC,IAAAA,KAAK,EAAE,OAAA;AACT,GAAA;AACF,EAAU;AAEV,IAAME,8BAA8B,GAAG;AACrCJ,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,OAAO;AACfC,EAAAA,KAAK,EAAE,QAAA;AACT,EAAU;AAEV,IAAMG,YAAY,GAAG;AACnBL,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,OAAO;AACfC,EAAAA,KAAK,EAAE,QAAA;AACT,EAAU;AAEV,IAAMI,YAAY,GAAG;AACnBN,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,OAAO;AACfC,EAAAA,KAAK,EAAE,QAAA;AACT,EAAU;AAEV,IAAMK,aAAa,GAAG;AACpBP,EAAAA,KAAK,EAAE,WAAW;AAClBC,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,KAAK,EAAE,WAAA;AACT,EAAU;AAEV,IAAMM,iBAAiB,GAAG;AACxBR,EAAAA,KAAK,EAAE,WAAW;AAClBC,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,KAAK,EAAE,WAAA;AACT,EAAU;AAEV,IAAMO,UAAU,GAAG;AACjBT,EAAAA,KAAK,EAAEU,IAAI,CAAC,GAAG,CAAC;AAChBT,EAAAA,MAAM,EAAES,IAAI,CAAC,GAAG,CAAC;EACjBR,KAAK,EAAEQ,IAAI,CAAC,GAAG,CAAA;AACjB,EAAU;AAEV,IAAMC,oBAAoB,GAAG;AAC3BX,EAAAA,KAAK,EAAE,WAAW;AAClBC,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,KAAK,EAAE,WAAA;AACT;;;;"}
@@ -1,28 +1,22 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import React__default from 'react';
4
- import styled, { keyframes, css } from 'styled-components';
5
- import { getInputBackgroundAndBorderStyles } from './baseInputStyles.js';
6
- import { BASEINPUT_WRAPPER_MIN_HEIGHT, BASEINPUT_WRAPPER_MAX_HEIGHT } from './baseInputConfig.js';
4
+ import styled, { css, keyframes } from 'styled-components';
5
+ import { getInputBackgroundAndBorderStyles, getAnimatedBaseInputWrapperMaxHeight } from './baseInputStyles.js';
6
+ import { baseInputHeight, baseInputWrapperMaxHeight } from './baseInputTokens.js';
7
7
  import '../../Box/BaseBox/index.js';
8
8
  import '../../../tokens/global/index.js';
9
9
  import '../../../utils/index.js';
10
10
  import { jsx } from 'react/jsx-runtime';
11
- import { makeSize } from '../../../utils/makeSize/makeSize.js';
12
- import { makeMotionTime } from '../../../utils/makeMotionTime/makeMotionTime.web.js';
13
- import { motion } from '../../../tokens/global/motion.js';
14
11
  import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
15
12
  import { castWebType } from '../../../utils/platform/castUtils.js';
13
+ import { makeMotionTime } from '../../../utils/makeMotionTime/makeMotionTime.web.js';
14
+ import { makeSize } from '../../../utils/makeSize/makeSize.js';
15
+ import { motion } from '../../../tokens/global/motion.js';
16
16
 
17
17
  var _excluded = ["showAllTags", "setShowAllTagsWithAnimation", "maxTagRows", "isDropdownTrigger"];
18
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
- // Define the animation keyframes
21
- var expandAnimation = /*#__PURE__*/keyframes(["from{max-height:", ";}to{max-height:", ";}"], makeSize(BASEINPUT_WRAPPER_MIN_HEIGHT), makeSize(BASEINPUT_WRAPPER_MAX_HEIGHT));
22
- var collapseAnimation = /*#__PURE__*/keyframes(["from{max-height:", ";}to{max-height:", ";}"], makeSize(BASEINPUT_WRAPPER_MAX_HEIGHT), makeSize(BASEINPUT_WRAPPER_MIN_HEIGHT));
23
- var expandTransition = /*#__PURE__*/css(["animation:", " ", " ", ";"], expandAnimation, makeMotionTime(motion.duration.quick), String(motion.easing.entrance.effective));
24
- var collapseTransition = /*#__PURE__*/css(["animation:", " ", " ", ";"], collapseAnimation, makeMotionTime(motion.duration.quick), String(motion.easing.exit.effective));
25
- var noTransition = /*#__PURE__*/css(["animation:none;"]);
26
20
  var StyledBaseInputWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
27
21
  displayName: "AnimatedBaseInputWrapperweb__StyledBaseInputWrapper",
28
22
  componentId: "e1vobd-0"
@@ -56,36 +50,30 @@ var StyledBaseInputWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
56
50
  }))
57
51
  });
58
52
  });
59
- var getMaxHeight = function getMaxHeight(_ref) {
60
- var maxTagRows = _ref.maxTagRows,
61
- showAllTags = _ref.showAllTags;
62
- if (maxTagRows === 'single') {
63
- return BASEINPUT_WRAPPER_MIN_HEIGHT;
64
- }
65
- if (maxTagRows === 'multiple') {
66
- return BASEINPUT_WRAPPER_MAX_HEIGHT;
67
- }
68
-
69
- // In expandable, max-height depends on the state
70
- return showAllTags ? BASEINPUT_WRAPPER_MAX_HEIGHT : BASEINPUT_WRAPPER_MIN_HEIGHT;
71
- };
72
53
 
73
54
  // Styled component with animation
74
55
  var StyledAnimatedBaseInputWrapper = /*#__PURE__*/styled(StyledBaseInputWrapper).withConfig({
75
56
  displayName: "AnimatedBaseInputWrapperweb__StyledAnimatedBaseInputWrapper",
76
57
  componentId: "e1vobd-1"
77
58
  })(function (props) {
78
- return props.isDropdownTrigger ? css(["", ";max-height:", ";"], props.transition, makeSize(getMaxHeight({
59
+ return props.isDropdownTrigger ? css(["", ";max-height:", ";"], props.transition, makeSize(getAnimatedBaseInputWrapperMaxHeight({
79
60
  maxTagRows: props.maxTagRows,
80
- showAllTags: props.showAllTags
61
+ showAllTags: props.showAllTags,
62
+ size: props.size
81
63
  }))) : undefined;
82
64
  });
83
- var _AnimatedBaseInputWrapper = function _AnimatedBaseInputWrapper(_ref2, ref) {
84
- var showAllTags = _ref2.showAllTags,
85
- setShowAllTagsWithAnimation = _ref2.setShowAllTagsWithAnimation,
86
- maxTagRows = _ref2.maxTagRows,
87
- isDropdownTrigger = _ref2.isDropdownTrigger,
88
- rest = _objectWithoutProperties(_ref2, _excluded);
65
+ var _AnimatedBaseInputWrapper = function _AnimatedBaseInputWrapper(_ref, ref) {
66
+ var showAllTags = _ref.showAllTags,
67
+ setShowAllTagsWithAnimation = _ref.setShowAllTagsWithAnimation,
68
+ maxTagRows = _ref.maxTagRows,
69
+ isDropdownTrigger = _ref.isDropdownTrigger,
70
+ rest = _objectWithoutProperties(_ref, _excluded);
71
+ // Define the animation keyframes
72
+ var expandAnimation = /*#__PURE__*/keyframes(["from{max-height:", ";}to{max-height:", ";}"], makeSize(baseInputHeight[rest.size]), makeSize(baseInputWrapperMaxHeight[rest.size]));
73
+ var collapseAnimation = /*#__PURE__*/keyframes(["from{max-height:", ";}to{max-height:", ";}"], makeSize(baseInputWrapperMaxHeight[rest.size]), makeSize(baseInputHeight[rest.size]));
74
+ var expandTransition = /*#__PURE__*/css(["animation:", " ", " ", ";"], expandAnimation, makeMotionTime(motion.duration.quick), String(motion.easing.entrance.effective));
75
+ var collapseTransition = /*#__PURE__*/css(["animation:", " ", " ", ";"], collapseAnimation, makeMotionTime(motion.duration.quick), String(motion.easing.exit.effective));
76
+ var noTransition = /*#__PURE__*/css(["animation:none;"]);
89
77
  return /*#__PURE__*/jsx(StyledAnimatedBaseInputWrapper
90
78
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
91
79
  , _objectSpread(_objectSpread({
@@ -97,9 +85,7 @@ var _AnimatedBaseInputWrapper = function _AnimatedBaseInputWrapper(_ref2, ref) {
97
85
  maxTagRows: maxTagRows,
98
86
  onAnimationEnd: function onAnimationEnd(e) {
99
87
  if (!showAllTags && e.animationName === collapseAnimation.getName()) {
100
- setShowAllTagsWithAnimation === null || setShowAllTagsWithAnimation === void 0 ? void 0 : setShowAllTagsWithAnimation(false);
101
- }
102
- if (maxTagRows !== 'expandable' && !showAllTags) {
88
+ // Triggered for the collapse animation
103
89
  setShowAllTagsWithAnimation === null || setShowAllTagsWithAnimation === void 0 ? void 0 : setShowAllTagsWithAnimation(false);
104
90
  }
105
91
  }
@@ -107,5 +93,5 @@ var _AnimatedBaseInputWrapper = function _AnimatedBaseInputWrapper(_ref2, ref) {
107
93
  };
108
94
  var AnimatedBaseInputWrapper = /*#__PURE__*/React__default.forwardRef(_AnimatedBaseInputWrapper);
109
95
 
110
- export { AnimatedBaseInputWrapper, collapseAnimation, expandAnimation };
96
+ export { AnimatedBaseInputWrapper };
111
97
  //# sourceMappingURL=AnimatedBaseInputWrapper.web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedBaseInputWrapper.web.js","sources":["../../../../../../../src/components/Input/BaseInput/AnimatedBaseInputWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { BaseInputWrapperProps } from './types';\nimport { getInputBackgroundAndBorderStyles } from './baseInputStyles';\nimport { BASEINPUT_WRAPPER_MIN_HEIGHT, BASEINPUT_WRAPPER_MAX_HEIGHT } from './baseInputConfig';\nimport BaseBox from '~components/Box/BaseBox';\nimport { motion } from '~tokens/global';\nimport { castWebType, makeMotionTime, makeSize } from '~utils';\nimport type { BladeElementRef } from '~utils/types';\n\n// Define the animation keyframes\nconst expandAnimation = keyframes`\n from {\n max-height: ${makeSize(BASEINPUT_WRAPPER_MIN_HEIGHT)};\n }\n to {\n max-height: ${makeSize(BASEINPUT_WRAPPER_MAX_HEIGHT)};\n }\n`;\n\nconst collapseAnimation = keyframes`\n from {\n max-height: ${makeSize(BASEINPUT_WRAPPER_MAX_HEIGHT)};\n }\n to {\n max-height: ${makeSize(BASEINPUT_WRAPPER_MIN_HEIGHT)};\n }\n`;\n\nconst expandTransition = css`\n animation: ${expandAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.entrance.effective)};\n`;\n\nconst collapseTransition = css`\n animation: ${collapseAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.exit.effective)};\n`;\n\nconst noTransition = css`\n animation: none;\n`;\n\nconst StyledBaseInputWrapper = styled(BaseBox)<\n Pick<\n BaseInputWrapperProps,\n 'currentInteraction' | 'isDisabled' | 'validationState' | 'isTextArea' | 'isDropdownTrigger'\n >\n>((props) => ({\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isTextArea: props.isTextArea,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n '&:hover': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isHovered: true,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n transitionProperty: 'background-color',\n transitionDuration: castWebType(makeMotionTime(props.theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(props.theme.motion.easing.standard.effective),\n },\n ':focus-within': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n },\n}));\n\nconst getMaxHeight = ({\n maxTagRows,\n showAllTags,\n}: Pick<BaseInputWrapperProps, 'maxTagRows' | 'showAllTags'>): number => {\n if (maxTagRows === 'single') {\n return BASEINPUT_WRAPPER_MIN_HEIGHT;\n }\n\n if (maxTagRows === 'multiple') {\n return BASEINPUT_WRAPPER_MAX_HEIGHT;\n }\n\n // In expandable, max-height depends on the state\n return showAllTags ? BASEINPUT_WRAPPER_MAX_HEIGHT : BASEINPUT_WRAPPER_MIN_HEIGHT;\n};\n\n// Styled component with animation\nconst StyledAnimatedBaseInputWrapper = styled(StyledBaseInputWrapper)<{\n transition?: FlattenSimpleInterpolation;\n maxTagRows: BaseInputWrapperProps['maxTagRows'];\n showAllTags: BaseInputWrapperProps['showAllTags'];\n isDropdownTrigger: BaseInputWrapperProps['isDropdownTrigger'];\n}>((props) =>\n props.isDropdownTrigger\n ? css`\n ${props.transition};\n max-height: ${makeSize(\n getMaxHeight({ maxTagRows: props.maxTagRows, showAllTags: props.showAllTags }),\n )};\n `\n : undefined,\n);\n\nconst _AnimatedBaseInputWrapper: React.ForwardRefRenderFunction<\n BladeElementRef,\n BaseInputWrapperProps & {\n showAllTags?: boolean;\n }\n> = (\n { showAllTags, setShowAllTagsWithAnimation, maxTagRows, isDropdownTrigger, ...rest },\n ref,\n): React.ReactElement => {\n return (\n <StyledAnimatedBaseInputWrapper\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n {...rest}\n transition={\n maxTagRows !== 'expandable'\n ? noTransition\n : showAllTags\n ? expandTransition\n : collapseTransition\n }\n isDropdownTrigger={isDropdownTrigger}\n showAllTags={showAllTags}\n maxTagRows={maxTagRows}\n onAnimationEnd={(e) => {\n if (!showAllTags && e.animationName === collapseAnimation.getName()) {\n setShowAllTagsWithAnimation?.(false);\n }\n\n if (maxTagRows !== 'expandable' && !showAllTags) {\n setShowAllTagsWithAnimation?.(false);\n }\n }}\n />\n );\n};\n\nconst AnimatedBaseInputWrapper = React.forwardRef(_AnimatedBaseInputWrapper);\n\nexport { AnimatedBaseInputWrapper, expandAnimation, collapseAnimation };\n"],"names":["expandAnimation","keyframes","makeSize","BASEINPUT_WRAPPER_MIN_HEIGHT","BASEINPUT_WRAPPER_MAX_HEIGHT","collapseAnimation","expandTransition","css","makeMotionTime","motion","duration","quick","String","easing","entrance","effective","collapseTransition","exit","noTransition","StyledBaseInputWrapper","styled","BaseBox","withConfig","displayName","componentId","props","_objectSpread","getInputBackgroundAndBorderStyles","theme","isFocused","currentInteraction","isDisabled","validationState","isTextArea","isDropdownTrigger","isHovered","transitionProperty","transitionDuration","castWebType","xquick","transitionTimingFunction","standard","getMaxHeight","_ref","maxTagRows","showAllTags","StyledAnimatedBaseInputWrapper","transition","undefined","_AnimatedBaseInputWrapper","_ref2","ref","setShowAllTagsWithAnimation","rest","_objectWithoutProperties","_excluded","_jsx","onAnimationEnd","e","animationName","getName","AnimatedBaseInputWrapper","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA;AACA,IAAMA,eAAe,gBAAGC,SAAS,CAAA,CAAA,kBAAA,EAAA,kBAAA,EAAA,IAAA,CAAA,EAEfC,QAAQ,CAACC,4BAA4B,CAAC,EAGtCD,QAAQ,CAACE,4BAA4B,CAAC,EAEvD;AAED,IAAMC,iBAAiB,gBAAGJ,SAAS,CAAA,CAAA,kBAAA,EAAA,kBAAA,EAAA,IAAA,CAAA,EAEjBC,QAAQ,CAACE,4BAA4B,CAAC,EAGtCF,QAAQ,CAACC,4BAA4B,CAAC,EAEv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;AACrCW,IAAAA,WAAW,EAAEA,WAAY;AACzBD,IAAAA,UAAU,EAAEA,UAAW;AACvBa,IAAAA,cAAc,EAAE,SAAAA,cAACC,CAAAA,CAAC,EAAK;AACrB,MAAA,IAAI,CAACb,WAAW,IAAIa,CAAC,CAACC,aAAa,KAAKtD,iBAAiB,CAACuD,OAAO,EAAE,EAAE;AACnER,QAAAA,2BAA2B,aAA3BA,2BAA2B,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA3BA,2BAA2B,CAAG,KAAK,CAAC,CAAA;AACtC,OAAA;AAEA,MAAA,IAAIR,UAAU,KAAK,YAAY,IAAI,CAACC,WAAW,EAAE;AAC/CO,QAAAA,2BAA2B,aAA3BA,2BAA2B,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA3BA,2BAA2B,CAAG,KAAK,CAAC,CAAA;AACtC,OAAA;AACF,KAAA;AAAE,GAAA,CACH,CAAC,CAAA;AAEN,CAAC,CAAA;AAED,IAAMS,wBAAwB,gBAAGC,cAAK,CAACC,UAAU,CAACd,yBAAyB;;;;"}
1
+ {"version":3,"file":"AnimatedBaseInputWrapper.web.js","sources":["../../../../../../../src/components/Input/BaseInput/AnimatedBaseInputWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { BaseInputWrapperProps } from './types';\nimport {\n getAnimatedBaseInputWrapperMaxHeight,\n getInputBackgroundAndBorderStyles,\n} from './baseInputStyles';\nimport { baseInputHeight, baseInputWrapperMaxHeight } from './baseInputTokens';\nimport BaseBox from '~components/Box/BaseBox';\nimport { motion } from '~tokens/global';\nimport { castWebType, makeMotionTime, makeSize } from '~utils';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledBaseInputWrapper = styled(BaseBox)<\n Pick<\n BaseInputWrapperProps,\n | 'currentInteraction'\n | 'isDisabled'\n | 'validationState'\n | 'isTextArea'\n | 'isDropdownTrigger'\n | 'maxTagRows'\n >\n>((props) => ({\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isTextArea: props.isTextArea,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n '&:hover': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isHovered: true,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n transitionProperty: 'background-color',\n transitionDuration: castWebType(makeMotionTime(props.theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(props.theme.motion.easing.standard.effective),\n },\n ':focus-within': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n },\n}));\n\n// Styled component with animation\nconst StyledAnimatedBaseInputWrapper = styled(StyledBaseInputWrapper)<{\n transition?: FlattenSimpleInterpolation;\n maxTagRows: BaseInputWrapperProps['maxTagRows'];\n showAllTags: BaseInputWrapperProps['showAllTags'];\n isDropdownTrigger: BaseInputWrapperProps['isDropdownTrigger'];\n size: NonNullable<BaseInputWrapperProps['size']>;\n}>((props) =>\n props.isDropdownTrigger\n ? css`\n ${props.transition};\n max-height: ${makeSize(\n getAnimatedBaseInputWrapperMaxHeight({\n maxTagRows: props.maxTagRows,\n showAllTags: props.showAllTags,\n size: props.size,\n }),\n )};\n `\n : undefined,\n);\n\nconst _AnimatedBaseInputWrapper: React.ForwardRefRenderFunction<\n BladeElementRef,\n BaseInputWrapperProps & {\n showAllTags?: boolean;\n }\n> = (\n { showAllTags, setShowAllTagsWithAnimation, maxTagRows, isDropdownTrigger, ...rest },\n ref,\n): React.ReactElement => {\n // Define the animation keyframes\n const expandAnimation = keyframes`\nfrom {\n max-height: ${makeSize(baseInputHeight[rest.size])};\n}\nto {\n max-height: ${makeSize(baseInputWrapperMaxHeight[rest.size])};\n}\n`;\n\n const collapseAnimation = keyframes`\nfrom {\n max-height: ${makeSize(baseInputWrapperMaxHeight[rest.size])};\n}\nto {\n max-height: ${makeSize(baseInputHeight[rest.size])};\n}\n`;\n\n const expandTransition = css`\n animation: ${expandAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.entrance.effective)};\n `;\n\n const collapseTransition = css`\n animation: ${collapseAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.exit.effective)};\n `;\n\n const noTransition = css`\n animation: none;\n `;\n return (\n <StyledAnimatedBaseInputWrapper\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n {...rest}\n transition={\n maxTagRows !== 'expandable'\n ? noTransition\n : showAllTags\n ? expandTransition\n : collapseTransition\n }\n isDropdownTrigger={isDropdownTrigger}\n showAllTags={showAllTags}\n maxTagRows={maxTagRows}\n onAnimationEnd={(e) => {\n if (!showAllTags && e.animationName === collapseAnimation.getName()) {\n // Triggered for the collapse animation\n setShowAllTagsWithAnimation?.(false);\n }\n }}\n />\n );\n};\n\nconst AnimatedBaseInputWrapper = React.forwardRef(_AnimatedBaseInputWrapper);\n\nexport { AnimatedBaseInputWrapper };\n"],"names":["StyledBaseInputWrapper","styled","BaseBox","withConfig","displayName","componentId","props","_objectSpread","getInputBackgroundAndBorderStyles","theme","isFocused","currentInteraction","isDisabled","validationState","isTextArea","isDropdownTrigger","isHovered","transitionProperty","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","StyledAnimatedBaseInputWrapper","css","transition","makeSize","getAnimatedBaseInputWrapperMaxHeight","maxTagRows","showAllTags","size","undefined","_AnimatedBaseInputWrapper","_ref","ref","setShowAllTagsWithAnimation","rest","_objectWithoutProperties","_excluded","expandAnimation","keyframes","baseInputHeight","baseInputWrapperMaxHeight","collapseAnimation","expandTransition","quick","String","entrance","collapseTransition","exit","noTransition","_j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