@audius/harmony 0.0.34 → 0.2.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 (277) hide show
  1. package/dist/_virtual/_tslib.js +11 -1
  2. package/dist/_virtual/_tslib.js.map +1 -1
  3. package/dist/assets/icons/LogoPhantomPlain.svg.js +78 -0
  4. package/dist/assets/icons/LogoPhantomPlain.svg.js.map +1 -0
  5. package/dist/assets/icons/PaperAirplane.svg.js +76 -0
  6. package/dist/assets/icons/PaperAirplane.svg.js.map +1 -0
  7. package/dist/assets/icons/Pin.svg.js +76 -0
  8. package/dist/assets/icons/Pin.svg.js.map +1 -0
  9. package/dist/assets/icons/QrCode.svg.js +78 -0
  10. package/dist/assets/icons/QrCode.svg.js.map +1 -0
  11. package/dist/assets/icons/Send.svg.js +6 -3
  12. package/dist/assets/icons/Send.svg.js.map +1 -1
  13. package/dist/assets/icons/TowerBroadcast.svg.js +75 -0
  14. package/dist/assets/icons/TowerBroadcast.svg.js.map +1 -0
  15. package/dist/components/artwork/Artwork.d.ts.map +1 -1
  16. package/dist/components/artwork/Artwork.js +5 -4
  17. package/dist/components/artwork/Artwork.js.map +1 -1
  18. package/dist/components/avatar/Avatar.d.ts.map +1 -1
  19. package/dist/components/avatar/Avatar.js +1 -1
  20. package/dist/components/avatar/Avatar.js.map +1 -1
  21. package/dist/components/button/BaseButton/BaseButton.d.ts +3 -2
  22. package/dist/components/button/BaseButton/BaseButton.d.ts.map +1 -1
  23. package/dist/components/button/BaseButton/BaseButton.js +2 -2
  24. package/dist/components/button/BaseButton/BaseButton.js.map +1 -1
  25. package/dist/components/button/BaseButton/types.d.ts +3 -2
  26. package/dist/components/button/BaseButton/types.d.ts.map +1 -1
  27. package/dist/components/button/Button/Button.d.ts +1 -1
  28. package/dist/components/button/FilterButton/FilterButton.d.ts +1 -1
  29. package/dist/components/button/FilterButton/FilterButton.d.ts.map +1 -1
  30. package/dist/components/button/FilterButton/FilterButton.js +92 -74
  31. package/dist/components/button/FilterButton/FilterButton.js.map +1 -1
  32. package/dist/components/button/FilterButton/FilterButton.stories.d.ts +1 -0
  33. package/dist/components/button/FilterButton/FilterButton.stories.d.ts.map +1 -1
  34. package/dist/components/button/FilterButton/FilterButtonKeyHandler.d.ts +18 -0
  35. package/dist/components/button/FilterButton/FilterButtonKeyHandler.d.ts.map +1 -0
  36. package/dist/components/button/FilterButton/FilterButtonOption.d.ts +11 -0
  37. package/dist/components/button/FilterButton/FilterButtonOption.d.ts.map +1 -0
  38. package/dist/components/button/FilterButton/FilterButtonOption.js +57 -0
  39. package/dist/components/button/FilterButton/FilterButtonOption.js.map +1 -0
  40. package/dist/components/button/FilterButton/FilterButtonOptionsList.d.ts +21 -0
  41. package/dist/components/button/FilterButton/FilterButtonOptionsList.d.ts.map +1 -0
  42. package/dist/components/button/FilterButton/FilterButtonOptionsList.js +40 -0
  43. package/dist/components/button/FilterButton/FilterButtonOptionsList.js.map +1 -0
  44. package/dist/components/button/FilterButton/types.d.ts +65 -23
  45. package/dist/components/button/FilterButton/types.d.ts.map +1 -1
  46. package/dist/components/button/IconButton/IconButton.d.ts +19 -2
  47. package/dist/components/button/IconButton/IconButton.d.ts.map +1 -1
  48. package/dist/components/button/IconButton/IconButton.js +5 -3
  49. package/dist/components/button/IconButton/IconButton.js.map +1 -1
  50. package/dist/components/button/index.d.ts +3 -2
  51. package/dist/components/button/index.d.ts.map +1 -1
  52. package/dist/components/checkbox/Checkbox.d.ts +7 -0
  53. package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
  54. package/dist/components/checkbox/Checkbox.js +64 -0
  55. package/dist/components/checkbox/Checkbox.js.map +1 -0
  56. package/dist/components/checkbox/Checkbox.stories.d.ts +9 -0
  57. package/dist/components/checkbox/Checkbox.stories.d.ts.map +1 -0
  58. package/dist/components/checkbox/Indeterminate.svg.js +114 -0
  59. package/dist/components/checkbox/Indeterminate.svg.js.map +1 -0
  60. package/dist/components/checkbox/Select.svg.js +118 -0
  61. package/dist/components/checkbox/Select.svg.js.map +1 -0
  62. package/dist/components/checkbox/index.d.ts +3 -0
  63. package/dist/components/checkbox/index.d.ts.map +1 -0
  64. package/dist/components/checkbox/types.d.ts +7 -0
  65. package/dist/components/checkbox/types.d.ts.map +1 -0
  66. package/dist/components/comments/ArtistPick/ArtistPick.d.ts +3 -0
  67. package/dist/components/comments/ArtistPick/ArtistPick.d.ts.map +1 -0
  68. package/dist/components/comments/ArtistPick/ArtistPick.js +20 -0
  69. package/dist/components/comments/ArtistPick/ArtistPick.js.map +1 -0
  70. package/dist/components/comments/ArtistPick/ArtistPick.stories.d.ts +7 -0
  71. package/dist/components/comments/ArtistPick/ArtistPick.stories.d.ts.map +1 -0
  72. package/dist/components/comments/ArtistPick/index.d.ts +3 -0
  73. package/dist/components/comments/ArtistPick/index.d.ts.map +1 -0
  74. package/dist/components/comments/ArtistPick/types.d.ts +5 -0
  75. package/dist/components/comments/ArtistPick/types.d.ts.map +1 -0
  76. package/dist/components/comments/CommentText/CommentText.d.ts +3 -0
  77. package/dist/components/comments/CommentText/CommentText.d.ts.map +1 -0
  78. package/dist/components/comments/CommentText/CommentText.js +36 -0
  79. package/dist/components/comments/CommentText/CommentText.js.map +1 -0
  80. package/dist/components/comments/CommentText/CommentText.stories.d.ts +10 -0
  81. package/dist/components/comments/CommentText/CommentText.stories.d.ts.map +1 -0
  82. package/dist/components/comments/CommentText/index.d.ts +3 -0
  83. package/dist/components/comments/CommentText/index.d.ts.map +1 -0
  84. package/dist/components/comments/CommentText/types.d.ts +5 -0
  85. package/dist/components/comments/CommentText/types.d.ts.map +1 -0
  86. package/dist/components/comments/IconText/IconText.d.ts +3 -0
  87. package/dist/components/comments/IconText/IconText.d.ts.map +1 -0
  88. package/dist/components/comments/IconText/IconText.js +19 -0
  89. package/dist/components/comments/IconText/IconText.js.map +1 -0
  90. package/dist/components/comments/IconText/IconText.stories.d.ts +7 -0
  91. package/dist/components/comments/IconText/IconText.stories.d.ts.map +1 -0
  92. package/dist/components/comments/IconText/index.d.ts +3 -0
  93. package/dist/components/comments/IconText/index.d.ts.map +1 -0
  94. package/dist/components/comments/IconText/types.d.ts +14 -0
  95. package/dist/components/comments/IconText/types.d.ts.map +1 -0
  96. package/dist/components/comments/Identifier/Identifier.d.ts +3 -0
  97. package/dist/components/comments/Identifier/Identifier.d.ts.map +1 -0
  98. package/dist/components/comments/Identifier/Identifier.js +30 -0
  99. package/dist/components/comments/Identifier/Identifier.js.map +1 -0
  100. package/dist/components/comments/Identifier/Identifier.stories.d.ts +7 -0
  101. package/dist/components/comments/Identifier/Identifier.stories.d.ts.map +1 -0
  102. package/dist/components/comments/Identifier/index.d.ts +3 -0
  103. package/dist/components/comments/Identifier/index.d.ts.map +1 -0
  104. package/dist/components/comments/Identifier/types.d.ts +5 -0
  105. package/dist/components/comments/Identifier/types.d.ts.map +1 -0
  106. package/dist/components/comments/SendIcon/SendIcon.d.ts +3 -0
  107. package/dist/components/comments/SendIcon/SendIcon.d.ts.map +1 -0
  108. package/dist/components/comments/SendIcon/SendIcon.js +36 -0
  109. package/dist/components/comments/SendIcon/SendIcon.js.map +1 -0
  110. package/dist/components/comments/SendIcon/SendIcon.stories.d.ts +7 -0
  111. package/dist/components/comments/SendIcon/SendIcon.stories.d.ts.map +1 -0
  112. package/dist/components/comments/SendIcon/index.d.ts +3 -0
  113. package/dist/components/comments/SendIcon/index.d.ts.map +1 -0
  114. package/dist/components/comments/SendIcon/types.d.ts +5 -0
  115. package/dist/components/comments/SendIcon/types.d.ts.map +1 -0
  116. package/dist/components/comments/Timestamp/Timestamp.d.ts +3 -0
  117. package/dist/components/comments/Timestamp/Timestamp.d.ts.map +1 -0
  118. package/dist/components/comments/Timestamp/Timestamp.js +13 -0
  119. package/dist/components/comments/Timestamp/Timestamp.js.map +1 -0
  120. package/dist/components/comments/Timestamp/Timestamp.stories.d.ts +7 -0
  121. package/dist/components/comments/Timestamp/Timestamp.stories.d.ts.map +1 -0
  122. package/dist/components/comments/Timestamp/index.d.ts +4 -0
  123. package/dist/components/comments/Timestamp/index.d.ts.map +1 -0
  124. package/dist/components/comments/Timestamp/types.d.ts +11 -0
  125. package/dist/components/comments/Timestamp/types.d.ts.map +1 -0
  126. package/dist/components/comments/Timestamp/types.js +10 -0
  127. package/dist/components/comments/Timestamp/types.js.map +1 -0
  128. package/dist/components/comments/Timestamp/util.d.ts +2 -0
  129. package/dist/components/comments/Timestamp/util.d.ts.map +1 -0
  130. package/dist/components/comments/Timestamp/util.js +26 -0
  131. package/dist/components/comments/Timestamp/util.js.map +1 -0
  132. package/dist/components/icon.d.ts +2 -1
  133. package/dist/components/icon.d.ts.map +1 -1
  134. package/dist/components/index.d.ts +10 -0
  135. package/dist/components/index.d.ts.map +1 -1
  136. package/dist/components/input/PasswordInput/PasswordInput.js +2 -1
  137. package/dist/components/input/PasswordInput/PasswordInput.js.map +1 -1
  138. package/dist/components/input/SelectablePill/SelectablePill.d.ts.map +1 -1
  139. package/dist/components/input/SelectablePill/SelectablePill.js +2 -4
  140. package/dist/components/input/SelectablePill/SelectablePill.js.map +1 -1
  141. package/dist/components/input/TextInput/TextInput.d.ts +2 -0
  142. package/dist/components/input/TextInput/TextInput.d.ts.map +1 -1
  143. package/dist/components/input/TextInput/TextInput.js +10 -6
  144. package/dist/components/input/TextInput/TextInput.js.map +1 -1
  145. package/dist/components/input/TextInput/types.d.ts +8 -1
  146. package/dist/components/input/TextInput/types.d.ts.map +1 -1
  147. package/dist/components/input/TextInput/types.js.map +1 -1
  148. package/dist/components/internal/Menu.d.ts +22 -0
  149. package/dist/components/internal/Menu.d.ts.map +1 -0
  150. package/dist/components/internal/Menu.js +17 -0
  151. package/dist/components/internal/Menu.js.map +1 -0
  152. package/dist/components/internal/MenuItem.d.ts +19 -0
  153. package/dist/components/internal/MenuItem.d.ts.map +1 -0
  154. package/dist/components/internal/MenuItem.js +57 -0
  155. package/dist/components/internal/MenuItem.js.map +1 -0
  156. package/dist/components/internal/OptionKeyHandler.d.ts +30 -0
  157. package/dist/components/internal/OptionKeyHandler.d.ts.map +1 -0
  158. package/dist/components/internal/OptionKeyHandler.js +77 -0
  159. package/dist/components/internal/OptionKeyHandler.js.map +1 -0
  160. package/dist/components/layout/Box/Box.js +4 -4
  161. package/dist/components/layout/Box/Box.js.map +1 -1
  162. package/dist/components/layout/Box/types.d.ts +6 -6
  163. package/dist/components/layout/Box/types.d.ts.map +1 -1
  164. package/dist/components/layout/Flex/Flex.d.ts.map +1 -1
  165. package/dist/components/layout/Flex/Flex.js +2 -2
  166. package/dist/components/layout/Flex/Flex.js.map +1 -1
  167. package/dist/components/layout/Flex/types.d.ts +2 -0
  168. package/dist/components/layout/Flex/types.d.ts.map +1 -1
  169. package/dist/components/modal/Modal.js +4 -4
  170. package/dist/components/modal/Modal.js.map +1 -1
  171. package/dist/components/modal/ModalContentPages.d.ts +10 -10
  172. package/dist/components/modal/ModalContentPages.d.ts.map +1 -1
  173. package/dist/components/modal/ModalContentPages.js +2 -2
  174. package/dist/components/modal/ModalContentPages.js.map +1 -1
  175. package/dist/components/modal/ModalHeader.js +2 -1
  176. package/dist/components/modal/ModalHeader.js.map +1 -1
  177. package/dist/components/music-badge/MusicBadge.d.ts +25 -0
  178. package/dist/components/music-badge/MusicBadge.d.ts.map +1 -0
  179. package/dist/components/music-badge/MusicBadge.js +40 -0
  180. package/dist/components/music-badge/MusicBadge.js.map +1 -0
  181. package/dist/components/music-badge/MusicBadge.stories.d.ts +7 -0
  182. package/dist/components/music-badge/MusicBadge.stories.d.ts.map +1 -0
  183. package/dist/components/music-badge/index.d.ts +3 -0
  184. package/dist/components/music-badge/index.d.ts.map +1 -0
  185. package/dist/components/pill/Pill.d.ts +3 -2
  186. package/dist/components/pill/Pill.d.ts.map +1 -1
  187. package/dist/components/popup/Popup.d.ts +6 -1
  188. package/dist/components/popup/Popup.d.ts.map +1 -1
  189. package/dist/components/popup/Popup.js +49 -36
  190. package/dist/components/popup/Popup.js.map +1 -1
  191. package/dist/components/popup/types.d.ts +4 -0
  192. package/dist/components/popup/types.d.ts.map +1 -1
  193. package/dist/components/scrubber/Scrubber.d.ts.map +1 -1
  194. package/dist/components/scrubber/Scrubber.js +3 -13
  195. package/dist/components/scrubber/Scrubber.js.map +1 -1
  196. package/dist/components/scrubber/Slider.js +1 -1
  197. package/dist/components/scrubber/Slider.js.map +1 -1
  198. package/dist/components/segmented-control/SegmentedControl.js +1 -3
  199. package/dist/components/segmented-control/SegmentedControl.js.map +1 -1
  200. package/dist/components/select/Select/Select.d.ts +21 -0
  201. package/dist/components/select/Select/Select.d.ts.map +1 -0
  202. package/dist/components/select/Select/Select.js +115 -0
  203. package/dist/components/select/Select/Select.js.map +1 -0
  204. package/dist/components/select/Select/Select.stories.d.ts +8 -0
  205. package/dist/components/select/Select/Select.stories.d.ts.map +1 -0
  206. package/dist/components/select/Select/index.d.ts +3 -0
  207. package/dist/components/select/Select/index.d.ts.map +1 -0
  208. package/dist/components/select/Select/types.d.ts +46 -0
  209. package/dist/components/select/Select/types.d.ts.map +1 -0
  210. package/dist/components/select/index.d.ts +2 -0
  211. package/dist/components/select/index.d.ts.map +1 -0
  212. package/dist/components/tag/Tag.d.ts.map +1 -1
  213. package/dist/components/tag/Tag.js +1 -1
  214. package/dist/components/tag/Tag.js.map +1 -1
  215. package/dist/components/text/Text.d.ts.map +1 -1
  216. package/dist/components/text/Text.js +20 -9
  217. package/dist/components/text/Text.js.map +1 -1
  218. package/dist/components/text/constants.d.ts +18 -0
  219. package/dist/components/text/constants.d.ts.map +1 -1
  220. package/dist/components/text/constants.js +7 -1
  221. package/dist/components/text/constants.js.map +1 -1
  222. package/dist/components/text/types.d.ts +2 -0
  223. package/dist/components/text/types.d.ts.map +1 -1
  224. package/dist/components/text-link/TextLink.d.ts.map +1 -1
  225. package/dist/components/text-link/TextLink.js +1 -1
  226. package/dist/components/text-link/TextLink.js.map +1 -1
  227. package/dist/foundations/color/color.d.ts +125 -0
  228. package/dist/foundations/color/color.d.ts.map +1 -1
  229. package/dist/foundations/color/color.js +2 -1
  230. package/dist/foundations/color/color.js.map +1 -1
  231. package/dist/foundations/color/primitive.d.ts +58 -0
  232. package/dist/foundations/color/primitive.d.ts.map +1 -1
  233. package/dist/foundations/color/primitive.js +58 -0
  234. package/dist/foundations/color/primitive.js.map +1 -1
  235. package/dist/foundations/color/semantic.d.ts +69 -0
  236. package/dist/foundations/color/semantic.d.ts.map +1 -1
  237. package/dist/foundations/color/semantic.js +10 -4
  238. package/dist/foundations/color/semantic.js.map +1 -1
  239. package/dist/foundations/theme/theme.d.ts +2 -0
  240. package/dist/foundations/theme/theme.d.ts.map +1 -1
  241. package/dist/foundations/theme/theme.js +4 -2
  242. package/dist/foundations/theme/theme.js.map +1 -1
  243. package/dist/foundations/theme/types.d.ts +6 -1
  244. package/dist/foundations/theme/types.d.ts.map +1 -1
  245. package/dist/foundations/typography/typography.d.ts +1 -0
  246. package/dist/foundations/typography/typography.d.ts.map +1 -1
  247. package/dist/foundations/typography/typography.js +2 -0
  248. package/dist/foundations/typography/typography.js.map +1 -1
  249. package/dist/harmony.css +1 -1
  250. package/dist/hooks/useClickOutside.d.ts +1 -1
  251. package/dist/hooks/useClickOutside.d.ts.map +1 -1
  252. package/dist/hooks/useClickOutside.js +11 -8
  253. package/dist/hooks/useClickOutside.js.map +1 -1
  254. package/dist/hooks/useControlled.d.ts +1 -1
  255. package/dist/hooks/useControlled.js.map +1 -1
  256. package/dist/hooks/useHotKeys.d.ts.map +1 -1
  257. package/dist/hooks/useHotKeys.js +2 -1
  258. package/dist/hooks/useHotKeys.js.map +1 -1
  259. package/dist/icons/logos.d.ts +1 -0
  260. package/dist/icons/logos.d.ts.map +1 -1
  261. package/dist/icons/logos.js +3 -1
  262. package/dist/icons/logos.js.map +1 -1
  263. package/dist/icons/utilityIcons.d.ts +4 -0
  264. package/dist/icons/utilityIcons.d.ts.map +1 -1
  265. package/dist/icons/utilityIcons.js +9 -1
  266. package/dist/icons/utilityIcons.js.map +1 -1
  267. package/dist/index.d.ts +1 -0
  268. package/dist/index.d.ts.map +1 -1
  269. package/dist/index.js +21 -5
  270. package/dist/index.js.map +1 -1
  271. package/dist/utils/formatTrackTimestamp.d.ts +6 -0
  272. package/dist/utils/formatTrackTimestamp.d.ts.map +1 -0
  273. package/dist/utils/formatTrackTimestamp.js +18 -0
  274. package/dist/utils/formatTrackTimestamp.js.map +1 -0
  275. package/dist/utils/index.d.ts +5 -0
  276. package/dist/utils/index.d.ts.map +1 -0
  277. package/package.json +6 -2
@@ -0,0 +1,3 @@
1
+ export { Identifier } from './Identifier';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Identifier/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,cAAc,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type IdentifierType = 'artist' | 'topSupporter' | 'supporter';
2
+ export type IdentifierProps = {
3
+ type: IdentifierType;
4
+ };
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Identifier/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,cAAc,GAAG,WAAW,CAAA;AAEpE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,cAAc,CAAA;CACrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { SendIconProps } from './types';
2
+ export declare const SendIcon: ({ disabled, onClick }: SendIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=SendIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/SendIcon/SendIcon.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,QAAQ,0BAAmC,aAAa,qDA0BpE,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { useTheme } from '@emotion/react';
3
+ import '../../button/Button/Button.js';
4
+ import '../../button/PlainButton/PlainButton.js';
5
+ import '../../../_virtual/_tslib.js';
6
+ import { IconPaperAirplane } from '../../../icons/utilityIcons.js';
7
+ import 'react';
8
+ import '@emotion/css';
9
+ import '../../button/FollowButton/FollowButton.js';
10
+ import { IconButton } from '../../button/IconButton/IconButton.js';
11
+ import '../../button/UnstyledButton.js';
12
+ import '../../button/FilterButton/FilterButton.js';
13
+ import '../../button/FilterButton/FilterButtonOption.js';
14
+
15
+ var SendIcon = function (_a) {
16
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick;
17
+ var _c = useTheme(), color = _c.color, motion = _c.motion;
18
+ return (jsx(IconButton, { "aria-label": 'Send', icon: IconPaperAirplane, size: '2xl', onClick: onClick, css: {
19
+ cursor: 'pointer',
20
+ pointerEvents: disabled ? 'none' : 'all',
21
+ opacity: disabled ? 0.5 : 1,
22
+ path: {
23
+ fill: color.primary.primary,
24
+ transition: motion.quick
25
+ },
26
+ ':hover path': {
27
+ fill: color.primary.p100
28
+ },
29
+ ':active path': {
30
+ fill: color.primary.p500
31
+ }
32
+ } }));
33
+ };
34
+
35
+ export { SendIcon };
36
+ //# sourceMappingURL=SendIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendIcon.js","sources":["../../../../src/components/comments/SendIcon/SendIcon.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react'\n\nimport { IconButton } from 'components/button'\nimport { IconPaperAirplane } from 'icons'\n\nimport { SendIconProps } from './types'\n\nexport const SendIcon = ({ disabled = false, onClick }: SendIconProps) => {\n const { color, motion } = useTheme()\n\n return (\n <IconButton\n aria-label='Send'\n icon={IconPaperAirplane}\n size='2xl'\n onClick={onClick}\n css={{\n cursor: 'pointer',\n pointerEvents: disabled ? 'none' : 'all',\n opacity: disabled ? 0.5 : 1,\n path: {\n fill: color.primary.primary,\n transition: motion.quick\n },\n ':hover path': {\n fill: color.primary.p100\n },\n ':active path': {\n fill: color.primary.p500\n }\n }}\n />\n )\n}\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AAOO,IAAM,QAAQ,GAAG,UAAC,EAA4C,EAAA;AAA1C,IAAA,IAAA,EAAA,GAAA,EAAA,CAAA,QAAgB,EAAhB,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAK,GAAA,EAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,CAAA;IAC5C,IAAA,EAAA,GAAoB,QAAQ,EAAE,EAA5B,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,MAAM,GAAA,EAAA,CAAA,MAAe,CAAA;AAEpC,IAAA,QACEA,GAAC,CAAA,UAAU,kBACE,MAAM,EACjB,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAC,KAAK,EACV,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE;AACH,YAAA,MAAM,EAAE,SAAS;YACjB,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK;YACxC,OAAO,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC;AAC3B,YAAA,IAAI,EAAE;AACJ,gBAAA,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;gBAC3B,UAAU,EAAE,MAAM,CAAC,KAAK;AACzB,aAAA;AACD,YAAA,aAAa,EAAE;AACb,gBAAA,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;AACzB,aAAA;AACD,YAAA,cAAc,EAAE;AACd,gBAAA,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;AACzB,aAAA;AACF,SAAA,EAAA,CACD,EACH;AACH;;;;"}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { SendIcon } from './SendIcon';
3
+ declare const meta: Meta<typeof SendIcon>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SendIcon>;
6
+ export declare const Default: Story;
7
+ //# sourceMappingURL=SendIcon.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendIcon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/SendIcon/SendIcon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAItD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAG/B,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { SendIcon } from './SendIcon';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/SendIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,cAAc,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type SendIconProps = {
2
+ disabled?: boolean;
3
+ onClick?: () => void;
4
+ };
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/SendIcon/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { TimestampProps } from './types';
2
+ export declare const Timestamp: ({ time }: TimestampProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=Timestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timestamp.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Timestamp/Timestamp.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGxC,eAAO,MAAM,SAAS,aAAc,cAAc,qDAQjD,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { __assign } from '../../../_virtual/_tslib.js';
2
+ import { jsx } from '@emotion/react/jsx-runtime';
3
+ import { Text } from '../../text/Text.js';
4
+ import { getLargestTimeUnitText } from './util.js';
5
+
6
+ var Timestamp = function (_a) {
7
+ var time = _a.time;
8
+ var text = getLargestTimeUnitText(time);
9
+ return (jsx(Text, __assign({ variant: 'body', size: 'xs', color: 'subdued' }, { children: text })));
10
+ };
11
+
12
+ export { Timestamp };
13
+ //# sourceMappingURL=Timestamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timestamp.js","sources":["../../../../src/components/comments/Timestamp/Timestamp.tsx"],"sourcesContent":["import { Text } from 'components/text'\n\nimport { TimestampProps } from './types'\nimport { getLargestTimeUnitText } from './util'\n\nexport const Timestamp = ({ time }: TimestampProps) => {\n const text = getLargestTimeUnitText(time)\n\n return (\n <Text variant='body' size='xs' color='subdued'>\n {text}\n </Text>\n )\n}\n"],"names":["_jsx"],"mappings":";;;;;AAKO,IAAM,SAAS,GAAG,UAAC,EAAwB,EAAA;AAAtB,IAAA,IAAA,IAAI,GAAA,EAAA,CAAA,IAAA,CAAA;AAC9B,IAAA,IAAM,IAAI,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;AAEzC,IAAA,QACEA,GAAC,CAAA,IAAI,aAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,gBAC3C,IAAI,EAAA,CAAA,CACA,EACR;AACH;;;;"}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Timestamp } from './Timestamp';
3
+ declare const meta: Meta<typeof Timestamp>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Timestamp>;
6
+ export declare const Default: Story;
7
+ //# sourceMappingURL=Timestamp.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timestamp.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Timestamp/Timestamp.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAItD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAUvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAGhC,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAA;AASvC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { Timestamp } from './Timestamp';
2
+ export { getLargestTimeUnitText } from './util';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Timestamp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAC/C,cAAc,SAAS,CAAA"}
@@ -0,0 +1,11 @@
1
+ export type TimestampProps = {
2
+ time: Date;
3
+ };
4
+ export declare const MS_IN_S = 1000;
5
+ export declare const S_IN_MIN = 60;
6
+ export declare const MIN_IN_HR = 60;
7
+ export declare const HR_IN_DAY = 24;
8
+ export declare const DAY_IN_MONTH = 30;
9
+ export declare const MONTH_IN_YEAR = 12;
10
+ export type TimeUnit = 'm' | 'h' | 'd' | 'mo' | 'y';
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Timestamp/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAGD,eAAO,MAAM,OAAO,OAAO,CAAA;AAC3B,eAAO,MAAM,QAAQ,KAAK,CAAA;AAC1B,eAAO,MAAM,SAAS,KAAK,CAAA;AAC3B,eAAO,MAAM,SAAS,KAAK,CAAA;AAC3B,eAAO,MAAM,YAAY,KAAK,CAAA;AAC9B,eAAO,MAAM,aAAa,KAAK,CAAA;AAE/B,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA"}
@@ -0,0 +1,10 @@
1
+ // TODO: Probably should move these to a general util file
2
+ var MS_IN_S = 1000;
3
+ var S_IN_MIN = 60;
4
+ var MIN_IN_HR = 60;
5
+ var HR_IN_DAY = 24;
6
+ var DAY_IN_MONTH = 30;
7
+ var MONTH_IN_YEAR = 12;
8
+
9
+ export { DAY_IN_MONTH, HR_IN_DAY, MIN_IN_HR, MONTH_IN_YEAR, MS_IN_S, S_IN_MIN };
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../../src/components/comments/Timestamp/types.ts"],"sourcesContent":["export type TimestampProps = {\n time: Date\n}\n\n// TODO: Probably should move these to a general util file\nexport const MS_IN_S = 1000\nexport const S_IN_MIN = 60\nexport const MIN_IN_HR = 60\nexport const HR_IN_DAY = 24\nexport const DAY_IN_MONTH = 30\nexport const MONTH_IN_YEAR = 12\n\nexport type TimeUnit = 'm' | 'h' | 'd' | 'mo' | 'y'\n"],"names":[],"mappings":"AAIA;AACO,IAAM,OAAO,GAAG,KAAI;AACpB,IAAM,QAAQ,GAAG,GAAE;AACnB,IAAM,SAAS,GAAG,GAAE;AACpB,IAAM,SAAS,GAAG,GAAE;AACpB,IAAM,YAAY,GAAG,GAAE;AACvB,IAAM,aAAa,GAAG;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare const getLargestTimeUnitText: (time: Date) => string;
2
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/components/comments/Timestamp/util.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,sBAAsB,SAAU,IAAI,WAchD,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { MS_IN_S, S_IN_MIN, MIN_IN_HR, HR_IN_DAY, DAY_IN_MONTH, MONTH_IN_YEAR } from './types.js';
2
+
3
+ var timeUnitMsMap = {
4
+ m: MS_IN_S * S_IN_MIN,
5
+ h: MS_IN_S * S_IN_MIN * MIN_IN_HR,
6
+ d: MS_IN_S * S_IN_MIN * MIN_IN_HR * HR_IN_DAY,
7
+ mo: MS_IN_S * S_IN_MIN * MIN_IN_HR * HR_IN_DAY * DAY_IN_MONTH,
8
+ y: MS_IN_S * S_IN_MIN * MIN_IN_HR * HR_IN_DAY * DAY_IN_MONTH * MONTH_IN_YEAR
9
+ };
10
+ var getLargestTimeUnitText = function (time) {
11
+ var then = new Date(time).getTime();
12
+ var now = Date.now();
13
+ var diff = now - then;
14
+ var unit = null;
15
+ // Iterate through all time units to determine the largest one
16
+ Object.entries(timeUnitMsMap).forEach(function (_a) {
17
+ var u = _a[0], ms = _a[1];
18
+ if (diff >= ms) {
19
+ unit = u;
20
+ }
21
+ });
22
+ return unit ? "".concat(Math.floor(diff / timeUnitMsMap[unit])).concat(unit) : 'just now';
23
+ };
24
+
25
+ export { getLargestTimeUnitText };
26
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sources":["../../../../src/components/comments/Timestamp/util.ts"],"sourcesContent":["import type { TimeUnit } from './types'\nimport {\n DAY_IN_MONTH,\n HR_IN_DAY,\n MIN_IN_HR,\n MONTH_IN_YEAR,\n MS_IN_S,\n S_IN_MIN\n} from './types'\n\nconst timeUnitMsMap: Record<TimeUnit, number> = {\n m: MS_IN_S * S_IN_MIN,\n h: MS_IN_S * S_IN_MIN * MIN_IN_HR,\n d: MS_IN_S * S_IN_MIN * MIN_IN_HR * HR_IN_DAY,\n mo: MS_IN_S * S_IN_MIN * MIN_IN_HR * HR_IN_DAY * DAY_IN_MONTH,\n y: MS_IN_S * S_IN_MIN * MIN_IN_HR * HR_IN_DAY * DAY_IN_MONTH * MONTH_IN_YEAR\n} as const\n\nexport const getLargestTimeUnitText = (time: Date) => {\n const then = new Date(time).getTime()\n const now = Date.now()\n const diff = now - then\n let unit: TimeUnit | null = null\n\n // Iterate through all time units to determine the largest one\n Object.entries(timeUnitMsMap).forEach(([u, ms]) => {\n if (diff >= ms) {\n unit = u as TimeUnit\n }\n })\n\n return unit ? `${Math.floor(diff / timeUnitMsMap[unit])}${unit}` : 'just now'\n}\n"],"names":[],"mappings":";;AAUA,IAAM,aAAa,GAA6B;IAC9C,CAAC,EAAE,OAAO,GAAG,QAAQ;AACrB,IAAA,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS;AACjC,IAAA,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS;IAC7C,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY;IAC7D,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa;CACpE,CAAA;AAEH,IAAM,sBAAsB,GAAG,UAAC,IAAU,EAAA;IAC/C,IAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;AACrC,IAAA,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;AACtB,IAAA,IAAM,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IACvB,IAAI,IAAI,GAAoB,IAAI,CAAA;;IAGhC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,UAAC,EAAO,EAAA;YAAN,CAAC,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,EAAE,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA;QAC3C,IAAI,IAAI,IAAI,EAAE,EAAE;YACd,IAAI,GAAG,CAAa,CAAA;AACrB,SAAA;AACH,KAAC,CAAC,CAAA;IAEF,OAAO,IAAI,GAAG,UAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAG,CAAA,MAAA,CAAA,IAAI,CAAE,GAAG,UAAU,CAAA;AAC/E;;;;"}
@@ -1,4 +1,4 @@
1
- import type { ComponentType, SVGProps } from 'react';
1
+ import type { ComponentType, MouseEventHandler, SVGProps } from 'react';
2
2
  import type { IconColors } from '../foundations/color/semantic';
3
3
  import type { ShadowOptions } from '../foundations/shadows';
4
4
  import { IconSize } from '../foundations/spacing';
@@ -12,6 +12,7 @@ export type IconProps = {
12
12
  width?: number;
13
13
  shadow?: ShadowOptions;
14
14
  title?: string;
15
+ onClick?: MouseEventHandler<SVGSVGElement>;
15
16
  };
16
17
  type SVGIconProps = SVGBaseProps & IconProps;
17
18
  export type IconComponent = ComponentType<SVGBaseProps | SVGIconProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD,KAAK,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;AAE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,GAAG,YAAY,GAAG,SAAS,CAAA;AAE5C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC,CAAA"}
@@ -20,6 +20,16 @@ export * from './progress-bar';
20
20
  export * from './scrubber';
21
21
  export * from './skeleton';
22
22
  export * from './artwork';
23
+ export * from './music-badge';
23
24
  export { default as LoadingSpinner } from './loading-spinner/LoadingSpinner';
24
25
  export * from './pill';
26
+ export * from './common/HiddenInput';
27
+ export * from './select';
28
+ export * from './comments/ArtistPick';
29
+ export * from './comments/CommentText';
30
+ export * from './comments/IconText';
31
+ export * from './comments/Identifier';
32
+ export * from './comments/SendIcon';
33
+ export * from './comments/Timestamp';
34
+ export * from './checkbox';
25
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAC5E,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAC5E,cAAc,QAAQ,CAAA;AACtB,cAAc,sBAAsB,CAAA;AACpC,cAAc,UAAU,CAAA;AACxB,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA"}
@@ -8,9 +8,10 @@ import { IconVisibilityPublic, IconVisibilityHidden } from '../../../icons/utili
8
8
  import '@emotion/react';
9
9
  import '@emotion/css';
10
10
  import '../../button/FollowButton/FollowButton.js';
11
- import '../../button/FilterButton/FilterButton.js';
12
11
  import { IconButton } from '../../button/IconButton/IconButton.js';
13
12
  import '../../button/UnstyledButton.js';
13
+ import '../../button/FilterButton/FilterButton.js';
14
+ import '../../button/FilterButton/FilterButtonOption.js';
14
15
  import { TextInput } from '../TextInput/TextInput.js';
15
16
  import '../TextInput/types.js';
16
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInput.js","sources":["../../../../src/components/input/PasswordInput/PasswordInput.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { useToggle } from 'react-use'\n\nimport { IconButton } from 'components/button'\nimport { IconVisibilityHidden, IconVisibilityPublic } from 'icons'\n\nimport { TextInput } from '../TextInput'\n\nimport type { PasswordInputProps } from './types'\n\nconst messages = {\n hidePasswordInput: 'Hide password input',\n showPasswordInput: 'Show password input'\n}\n\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n (props, ref) => {\n const { hideVisibilityToggle, ...restProps } = props\n const [isPasswordVisible, toggleIsPasswordVisible] = useToggle(false)\n const VisibilityIcon = isPasswordVisible\n ? IconVisibilityPublic\n : IconVisibilityHidden\n\n return (\n <TextInput\n ref={ref}\n type={isPasswordVisible ? 'text' : 'password'}\n endAdornment={\n hideVisibilityToggle ? null : (\n <IconButton\n icon={VisibilityIcon}\n color='subdued'\n onClick={toggleIsPasswordVisible}\n aria-label={\n isPasswordVisible\n ? messages.hidePasswordInput\n : messages.showPasswordInput\n }\n ripple\n />\n )\n }\n {...restProps}\n />\n )\n }\n)\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;AAWA,IAAM,QAAQ,GAAG;AACf,IAAA,iBAAiB,EAAE,qBAAqB;AACxC,IAAA,iBAAiB,EAAE,qBAAqB;CACzC,CAAA;IAEY,aAAa,GAAG,UAAU,CACrC,UAAC,KAAK,EAAE,GAAG,EAAA;IACD,IAAA,oBAAoB,GAAmB,KAAK,CAAxB,oBAAA,EAAK,SAAS,GAAA,MAAA,CAAK,KAAK,EAA9C,CAAsC,sBAAA,CAAA,CAAF,CAAU;IAC9C,IAAA,EAAA,GAA+C,SAAS,CAAC,KAAK,CAAC,EAA9D,iBAAiB,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,uBAAuB,GAAA,EAAA,CAAA,CAAA,CAAoB,CAAA;IACrE,IAAM,cAAc,GAAG,iBAAiB;AACtC,UAAE,oBAAoB;UACpB,oBAAoB,CAAA;IAExB,QACEA,IAAC,SAAS,EAAA,QAAA,CAAA,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,UAAU,EAC7C,YAAY,EACV,oBAAoB,GAAG,IAAI,IACzBA,GAAA,CAAC,UAAU,EACT,EAAA,IAAI,EAAE,cAAc,EACpB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,uBAAuB,EAAA,YAAA,EAE9B,iBAAiB;kBACb,QAAQ,CAAC,iBAAiB;AAC5B,kBAAE,QAAQ,CAAC,iBAAiB,EAEhC,MAAM,EACN,IAAA,EAAA,CAAA,CACH,EAEC,EAAA,SAAS,CACb,CAAA,EACH;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"PasswordInput.js","sources":["../../../../src/components/input/PasswordInput/PasswordInput.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { useToggle } from 'react-use'\n\nimport { IconButton } from 'components/button'\nimport { IconVisibilityHidden, IconVisibilityPublic } from 'icons'\n\nimport { TextInput } from '../TextInput'\n\nimport type { PasswordInputProps } from './types'\n\nconst messages = {\n hidePasswordInput: 'Hide password input',\n showPasswordInput: 'Show password input'\n}\n\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n (props, ref) => {\n const { hideVisibilityToggle, ...restProps } = props\n const [isPasswordVisible, toggleIsPasswordVisible] = useToggle(false)\n const VisibilityIcon = isPasswordVisible\n ? IconVisibilityPublic\n : IconVisibilityHidden\n\n return (\n <TextInput\n ref={ref}\n type={isPasswordVisible ? 'text' : 'password'}\n endAdornment={\n hideVisibilityToggle ? null : (\n <IconButton\n icon={VisibilityIcon}\n color='subdued'\n onClick={toggleIsPasswordVisible}\n aria-label={\n isPasswordVisible\n ? messages.hidePasswordInput\n : messages.showPasswordInput\n }\n ripple\n />\n )\n }\n {...restProps}\n />\n )\n }\n)\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;;AAWA,IAAM,QAAQ,GAAG;AACf,IAAA,iBAAiB,EAAE,qBAAqB;AACxC,IAAA,iBAAiB,EAAE,qBAAqB;CACzC,CAAA;IAEY,aAAa,GAAG,UAAU,CACrC,UAAC,KAAK,EAAE,GAAG,EAAA;IACD,IAAA,oBAAoB,GAAmB,KAAK,CAAxB,oBAAA,EAAK,SAAS,GAAA,MAAA,CAAK,KAAK,EAA9C,CAAsC,sBAAA,CAAA,CAAF,CAAU;IAC9C,IAAA,EAAA,GAA+C,SAAS,CAAC,KAAK,CAAC,EAA9D,iBAAiB,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,uBAAuB,GAAA,EAAA,CAAA,CAAA,CAAoB,CAAA;IACrE,IAAM,cAAc,GAAG,iBAAiB;AACtC,UAAE,oBAAoB;UACpB,oBAAoB,CAAA;IAExB,QACEA,IAAC,SAAS,EAAA,QAAA,CAAA,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,UAAU,EAC7C,YAAY,EACV,oBAAoB,GAAG,IAAI,IACzBA,GAAA,CAAC,UAAU,EACT,EAAA,IAAI,EAAE,cAAc,EACpB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,uBAAuB,EAAA,YAAA,EAE9B,iBAAiB;kBACb,QAAQ,CAAC,iBAAiB;AAC5B,kBAAE,QAAQ,CAAC,iBAAiB,EAEhC,MAAM,EACN,IAAA,EAAA,CAAA,CACH,EAEC,EAAA,SAAS,CACb,CAAA,EACH;AACH,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectablePill.d.ts","sourceRoot":"","sources":["../../../../src/components/input/SelectablePill/SelectablePill.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AASlD,eAAO,MAAM,cAAc,UAAW,mBAAmB,qDAuIxD,CAAA"}
1
+ {"version":3,"file":"SelectablePill.d.ts","sourceRoot":"","sources":["../../../../src/components/input/SelectablePill/SelectablePill.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AASlD,eAAO,MAAM,cAAc,UAAW,mBAAmB,qDAoIxD,CAAA"}
@@ -26,7 +26,7 @@ var SelectablePill = function (props) {
26
26
  var activeCss = __assign({ backgroundColor: theme.color.secondary.s400, color: theme.color.static.white, border: "1px solid ".concat(theme.color.secondary.s400) }, (size === 'large' && {
27
27
  boxShadow: 'none'
28
28
  }));
29
- var rootCss = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ display: 'inline-flex', position: 'relative', alignItems: 'center', justifyContent: 'center', gap: theme.spacing.xs, color: theme.color.text.default, backgroundColor: theme.color.background.white, cursor: 'pointer', userSelect: 'none', transition: 'all 0.12s ease-out', textWrap: 'nowrap', border: "1px solid ".concat(theme.color.border.strong), borderRadius: theme.cornerRadius['2xl'] }, (size === 'small' && {
29
+ var rootCss = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ display: 'inline-flex', position: 'relative', alignItems: 'center', justifyContent: 'center', gap: theme.spacing.s, color: theme.color.text.default, backgroundColor: theme.color.background.white, cursor: 'pointer', userSelect: 'none', transition: 'all 0.12s ease-out', textWrap: 'nowrap', border: "1px solid ".concat(theme.color.border.strong), borderRadius: theme.cornerRadius['2xl'] }, (size === 'small' && {
30
30
  height: theme.spacing.xl,
31
31
  paddingInline: theme.spacing.m
32
32
  })), (size === 'large' && {
@@ -41,8 +41,6 @@ var SelectablePill = function (props) {
41
41
  pointerEvents: 'none'
42
42
  })), { ':hover': hoverCss, ':active': activeCss });
43
43
  var iconCss = {
44
- width: spacing.l,
45
- height: spacing.l,
46
44
  '& path': {
47
45
  fill: 'currentColor'
48
46
  }
@@ -51,7 +49,7 @@ var SelectablePill = function (props) {
51
49
  css: rootCss,
52
50
  className: className
53
51
  };
54
- var pillContent = (jsxs(Fragment, { children: [Icon ? jsx(Icon, { css: iconCss }) : null, 'label' in other ? (jsx(Text, __assign({ variant: size === 'oversized' ? 'heading' : 'body', tag: 'span', css: size === 'oversized' && { textTransform: 'uppercase' } }, { children: other.label }))) : null] }));
52
+ var pillContent = (jsxs(Fragment, { children: [size !== 'small' && Icon ? jsx(Icon, { size: 's', css: iconCss }) : null, 'label' in other ? (jsx(Text, __assign({ variant: size === 'oversized' ? 'heading' : 'body', tag: 'span', css: size === 'oversized' && { textTransform: 'uppercase' } }, { children: other.label }))) : null] }));
55
53
  switch (type) {
56
54
  case 'checkbox': {
57
55
  return (jsxs("label", __assign({}, rootProps, { children: [pillContent, jsx(HiddenInput, __assign({}, other, { checked: isSelected }))] })));
@@ -1 +1 @@
1
- {"version":3,"file":"SelectablePill.js","sources":["../../../../src/components/input/SelectablePill/SelectablePill.tsx"],"sourcesContent":["import { ComponentProps } from 'react'\n\nimport { CSSObject, useTheme } from '@emotion/react'\n\nimport { HiddenInput } from 'components/common/HiddenInput'\nimport { useRadioGroup } from 'components/radio-group/useRadioGroup'\nimport { Text } from 'components/text'\n\nimport type { SelectablePillProps } from './types'\n\nconst RadioInput = (props: ComponentProps<'input'>) => {\n const { name, checked, onChange } = useRadioGroup(props)\n return (\n <HiddenInput {...props} name={name} checked={checked} onChange={onChange} />\n )\n}\n\nexport const SelectablePill = (props: SelectablePillProps) => {\n const {\n isSelected: isSelectedProp,\n size = 'small',\n _isHovered,\n icon: Icon,\n className,\n ...other\n } = props\n\n const { disabled, type } = other\n const isSelected =\n type === 'checkbox' || type === 'radio'\n ? other.checked ?? isSelectedProp\n : isSelectedProp\n\n const theme = useTheme()\n const { spacing } = theme\n\n const hoverCss: CSSObject = {\n backgroundColor: theme.color.secondary.s200,\n color: theme.color.static.white,\n border: `1px solid ${theme.color.secondary.secondary}`,\n ...(size === 'large' && {\n backgroundColor: theme.color.secondary.s100,\n border: `1px solid ${theme.color.secondary.s200}`,\n boxShadow: 'none'\n })\n }\n\n const activeCss: CSSObject = {\n backgroundColor: theme.color.secondary.s400,\n color: theme.color.static.white,\n border: `1px solid ${theme.color.secondary.s400}`,\n\n ...(size === 'large' && {\n boxShadow: 'none'\n })\n }\n\n const rootCss: CSSObject = {\n display: 'inline-flex',\n position: 'relative',\n alignItems: 'center',\n justifyContent: 'center',\n gap: theme.spacing.xs,\n color: theme.color.text.default,\n backgroundColor: theme.color.background.white,\n cursor: 'pointer',\n userSelect: 'none',\n transition: 'all 0.12s ease-out',\n textWrap: 'nowrap',\n border: `1px solid ${theme.color.border.strong}`,\n borderRadius: theme.cornerRadius['2xl'],\n ...(size === 'small' && {\n height: theme.spacing.xl,\n paddingInline: theme.spacing.m\n }),\n ...(size === 'large' && {\n height: theme.spacing['2xl'],\n paddingInline: theme.spacing.l,\n boxShadow: theme.shadows.near\n }),\n ...(size === 'oversized' && {\n height: spacing.unit12,\n padding: spacing.m,\n borderWidth: 2\n }),\n ...(disabled && { opacity: 0.45 }),\n ...(_isHovered && hoverCss),\n ...(isSelected && activeCss),\n ...((disabled || _isHovered) && {\n pointerEvents: 'none'\n }),\n ':hover': hoverCss,\n ':active': activeCss\n }\n\n const iconCss = {\n width: spacing.l,\n height: spacing.l,\n\n '& path': {\n fill: 'currentColor'\n }\n }\n\n const rootProps = {\n css: rootCss,\n className\n }\n\n const pillContent = (\n <>\n {Icon ? <Icon css={iconCss} /> : null}\n {'label' in other ? (\n <Text\n variant={size === 'oversized' ? 'heading' : 'body'}\n tag='span'\n css={size === 'oversized' && { textTransform: 'uppercase' }}\n >\n {other.label}\n </Text>\n ) : null}\n </>\n )\n\n switch (type) {\n case 'checkbox': {\n return (\n <label {...rootProps}>\n {pillContent}\n <HiddenInput {...other} checked={isSelected} />\n </label>\n )\n }\n case 'radio': {\n return (\n <label {...rootProps}>\n {pillContent}\n <RadioInput {...other} checked={isSelected} />\n </label>\n )\n }\n case 'button':\n case 'reset':\n case 'submit':\n default: {\n return (\n <button {...rootProps} {...other}>\n {pillContent}\n </button>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EAC7B,EAAA,QAAA,EAAA,WAAW,EACL,CAAA,CAAA,EACV;AACF,SAAA;AACF,KAAA;AACH;;;;"}
1
+ {"version":3,"file":"SelectablePill.js","sources":["../../../../src/components/input/SelectablePill/SelectablePill.tsx"],"sourcesContent":["import { ComponentProps } from 'react'\n\nimport { CSSObject, useTheme } from '@emotion/react'\n\nimport { HiddenInput } from 'components/common/HiddenInput'\nimport { useRadioGroup } from 'components/radio-group/useRadioGroup'\nimport { Text } from 'components/text'\n\nimport type { SelectablePillProps } from './types'\n\nconst RadioInput = (props: ComponentProps<'input'>) => {\n const { name, checked, onChange } = useRadioGroup(props)\n return (\n <HiddenInput {...props} name={name} checked={checked} onChange={onChange} />\n )\n}\n\nexport const SelectablePill = (props: SelectablePillProps) => {\n const {\n isSelected: isSelectedProp,\n size = 'small',\n _isHovered,\n icon: Icon,\n className,\n ...other\n } = props\n\n const { disabled, type } = other\n const isSelected =\n type === 'checkbox' || type === 'radio'\n ? other.checked ?? isSelectedProp\n : isSelectedProp\n\n const theme = useTheme()\n const { spacing } = theme\n\n const hoverCss: CSSObject = {\n backgroundColor: theme.color.secondary.s200,\n color: theme.color.static.white,\n border: `1px solid ${theme.color.secondary.secondary}`,\n ...(size === 'large' && {\n backgroundColor: theme.color.secondary.s100,\n border: `1px solid ${theme.color.secondary.s200}`,\n boxShadow: 'none'\n })\n }\n\n const activeCss: CSSObject = {\n backgroundColor: theme.color.secondary.s400,\n color: theme.color.static.white,\n border: `1px solid ${theme.color.secondary.s400}`,\n\n ...(size === 'large' && {\n boxShadow: 'none'\n })\n }\n\n const rootCss: CSSObject = {\n display: 'inline-flex',\n position: 'relative',\n alignItems: 'center',\n justifyContent: 'center',\n gap: theme.spacing.s,\n color: theme.color.text.default,\n backgroundColor: theme.color.background.white,\n cursor: 'pointer',\n userSelect: 'none',\n transition: 'all 0.12s ease-out',\n textWrap: 'nowrap',\n border: `1px solid ${theme.color.border.strong}`,\n borderRadius: theme.cornerRadius['2xl'],\n ...(size === 'small' && {\n height: theme.spacing.xl,\n paddingInline: theme.spacing.m\n }),\n ...(size === 'large' && {\n height: theme.spacing['2xl'],\n paddingInline: theme.spacing.l,\n boxShadow: theme.shadows.near\n }),\n ...(size === 'oversized' && {\n height: spacing.unit12,\n padding: spacing.m,\n borderWidth: 2\n }),\n ...(disabled && { opacity: 0.45 }),\n ...(_isHovered && hoverCss),\n ...(isSelected && activeCss),\n ...((disabled || _isHovered) && {\n pointerEvents: 'none'\n }),\n ':hover': hoverCss,\n ':active': activeCss\n }\n\n const iconCss = {\n '& path': {\n fill: 'currentColor'\n }\n }\n\n const rootProps = {\n css: rootCss,\n className\n }\n\n const pillContent = (\n <>\n {size !== 'small' && Icon ? <Icon size='s' css={iconCss} /> : null}\n {'label' in other ? (\n <Text\n variant={size === 'oversized' ? 'heading' : 'body'}\n tag='span'\n css={size === 'oversized' && { textTransform: 'uppercase' }}\n >\n {other.label}\n </Text>\n ) : null}\n </>\n )\n\n switch (type) {\n case 'checkbox': {\n return (\n <label {...rootProps}>\n {pillContent}\n <HiddenInput {...other} checked={isSelected} />\n </label>\n )\n }\n case 'radio': {\n return (\n <label {...rootProps}>\n {pillContent}\n <RadioInput {...other} checked={isSelected} />\n </label>\n )\n }\n case 'button':\n case 'reset':\n case 'submit':\n default: {\n return (\n <button {...rootProps} {...other}>\n {pillContent}\n </button>\n )\n }\n }\n}\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;AAUA,IAAM,UAAU,GAAG,UAAC,KAA8B,EAAA;AAC1C,IAAA,IAAA,EAA8B,GAAA,aAAa,CAAC,KAAK,CAAC,EAAhD,IAAI,GAAA,EAAA,CAAA,IAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,QAAQ,cAAyB,CAAA;AACxD,IAAA,QACEA,GAAC,CAAA,WAAW,eAAK,KAAK,EAAA,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAA,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,gBAE1D,KAAK,CAAC,KAAK,EAAA,CAAA,CACP,IACL,IAAI,CAAA,EAAA,CACP,CACJ,CAAA;AAED,IAAA,QAAQ,IAAI;QACV,KAAK,UAAU,EAAE;AACf,YAAA,QACEC,IAAW,CAAA,OAAA,EAAA,QAAA,CAAA,EAAA,EAAA,SAAS,EACjB,EAAA,QAAA,EAAA,CAAA,WAAW,EACZD,GAAC,CAAA,WAAW,EAAK,QAAA,CAAA,EAAA,EAAA,KAAK,IAAE,OAAO,EAAE,UAAU,EAAI,CAAA,CAAA,CAAA,EAAA,CAAA,CACzC,EACT;AACF,SAAA;QACD,KAAK,OAAO,EAAE;AACZ,YAAA,QACEC,IAAW,CAAA,OAAA,EAAA,QAAA,CAAA,EAAA,EAAA,SAAS,EACjB,EAAA,QAAA,EAAA,CAAA,WAAW,EACZD,GAAC,CAAA,UAAU,EAAK,QAAA,CAAA,EAAA,EAAA,KAAK,IAAE,OAAO,EAAE,UAAU,EAAI,CAAA,CAAA,CAAA,EAAA,CAAA,CACxC,EACT;AACF,SAAA;AACD,QAAA,KAAK,QAAQ,CAAC;AACd,QAAA,KAAK,OAAO,CAAC;AACb,QAAA,KAAK,QAAQ,CAAC;AACd,QAAA,SAAS;YACP,QACEA,2BAAY,SAAS,EAAM,KAAK,EAC7B,EAAA,QAAA,EAAA,WAAW,EACL,CAAA,CAAA,EACV;AACF,SAAA;AACF,KAAA;AACH;;;;"}
@@ -8,6 +8,7 @@ export declare const TextInput: (props: Omit<Omit<import("react").DetailedHTMLPr
8
8
  warning?: boolean | undefined;
9
9
  error?: boolean | undefined;
10
10
  hideLabel?: boolean | undefined;
11
+ hidePlaceholder?: boolean | undefined;
11
12
  label: string;
12
13
  inputRootClassName?: string | undefined;
13
14
  helperText?: ReactNode;
@@ -20,6 +21,7 @@ export declare const TextInput: (props: Omit<Omit<import("react").DetailedHTMLPr
20
21
  required?: boolean | undefined;
21
22
  showMaxLengthThreshold?: number | undefined;
22
23
  maxLengthWarningThreshold?: number | undefined;
24
+ elevateLabel?: boolean | undefined;
23
25
  } & {
24
26
  _incorrectError?: boolean | undefined;
25
27
  _isHovered?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAA;AAWpD,OAAO,EAAE,aAAa,EAAuB,MAAM,SAAS,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;qJA4NrB,CAAA"}
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAA;AAWpD,OAAO,EAAE,aAAa,EAAuB,MAAM,SAAS,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;qJAoOrB,CAAA"}
@@ -16,7 +16,7 @@ import { TextInputSize } from './types.js';
16
16
  */
17
17
  var TextInput = forwardRef(function (props, ref) {
18
18
  var _a, _b;
19
- var ariaLabel = props["aria-label"], required = props.required, className = props.className, inputRootClassName = props.inputRootClassName, maxLength = props.maxLength, _c = props.showMaxLengthThreshold, showMaxLengthThreshold = _c === void 0 ? 0.7 : _c, _d = props.maxLengthWarningThreshold, maxLengthWarningThreshold = _d === void 0 ? 0.9 : _d, _e = props.size, size = _e === void 0 ? TextInputSize.DEFAULT : _e, hideLabel = props.hideLabel, labelProp = props.label, value = props.value, idProp = props.id, warningProp = props.warning, error = props.error, inputClassName = props.className, disabled = props.disabled, onFocusProp = props.onFocus, onBlurProp = props.onBlur, placeholder = props.placeholder, helperText = props.helperText, startAdornmentText = props.startAdornmentText, endAdornmentText = props.endAdornmentText, StartIcon = props.startIcon, EndIcon = props.endIcon, IconProps = props.IconProps, endAdornmentProp = props.endAdornment, _incorrectError = props._incorrectError, _isHovered = props._isHovered, _isFocused = props._isFocused, _disablePointerEvents = props._disablePointerEvents, other = __rest(props, ['aria-label', "required", "className", "inputRootClassName", "maxLength", "showMaxLengthThreshold", "maxLengthWarningThreshold", "size", "hideLabel", "label", "value", "id", "warning", "error", "className", "disabled", "onFocus", "onBlur", "placeholder", "helperText", "startAdornmentText", "endAdornmentText", "startIcon", "endIcon", "IconProps", "endAdornment", "_incorrectError", "_isHovered", "_isFocused", "_disablePointerEvents"]);
19
+ var ariaLabel = props["aria-label"], required = props.required, className = props.className, inputRootClassName = props.inputRootClassName, maxLength = props.maxLength, _c = props.showMaxLengthThreshold, showMaxLengthThreshold = _c === void 0 ? 0.7 : _c, _d = props.maxLengthWarningThreshold, maxLengthWarningThreshold = _d === void 0 ? 0.9 : _d, _e = props.size, size = _e === void 0 ? TextInputSize.DEFAULT : _e, hideLabel = props.hideLabel, hidePlaceholder = props.hidePlaceholder, labelProp = props.label, value = props.value, idProp = props.id, warningProp = props.warning, error = props.error, inputClassName = props.className, disabled = props.disabled, onFocusProp = props.onFocus, onBlurProp = props.onBlur, placeholder = props.placeholder, helperText = props.helperText, startAdornmentText = props.startAdornmentText, endAdornmentText = props.endAdornmentText, StartIcon = props.startIcon, EndIcon = props.endIcon, IconProps = props.IconProps, endAdornmentProp = props.endAdornment, elevateLabel = props.elevateLabel, _incorrectError = props._incorrectError, _isHovered = props._isHovered, _isFocused = props._isFocused, _disablePointerEvents = props._disablePointerEvents, other = __rest(props, ['aria-label', "required", "className", "inputRootClassName", "maxLength", "showMaxLengthThreshold", "maxLengthWarningThreshold", "size", "hideLabel", "hidePlaceholder", "label", "value", "id", "warning", "error", "className", "disabled", "onFocus", "onBlur", "placeholder", "helperText", "startAdornmentText", "endAdornmentText", "startIcon", "endIcon", "IconProps", "endAdornment", "elevateLabel", "_incorrectError", "_isHovered", "_isFocused", "_disablePointerEvents"]);
20
20
  var endAdornment;
21
21
  if (EndIcon != null) {
22
22
  endAdornment = jsx(EndIcon, __assign({ size: 'm', color: 'subdued' }, IconProps));
@@ -41,10 +41,14 @@ var TextInput = forwardRef(function (props, ref) {
41
41
  // Hide the label when requested or when the size is set to small
42
42
  var shouldShowLabel = !hideLabel && size !== TextInputSize.SMALL;
43
43
  var labelText = required ? "".concat(labelProp, " *") : labelProp;
44
- var placeholderText = required && hideLabel ? "".concat(placeholder, " *") : placeholder;
44
+ var placeholderText = required && hideLabel
45
+ ? "".concat(placeholder, " *")
46
+ : size === TextInputSize.SMALL
47
+ ? labelText
48
+ : placeholder;
45
49
  var helperTextSize = size === TextInputSize.SMALL ? 'xs' : 's';
46
50
  // Whenever a label isn't visible the placeholder should be visible in it's place (if provided)
47
- var shouldShowPlaceholder = isFocused || !shouldShowLabel;
51
+ var shouldShowPlaceholder = (isFocused || !shouldShowLabel) && !hidePlaceholder;
48
52
  var shouldShowAdornments = isFocused || hasValue || !shouldShowLabel;
49
53
  // Show the maxlength text whenever we hit a certain threshold (default 70%) + the input is focused
50
54
  var shouldShowMaxLengthText = isFocused &&
@@ -79,8 +83,8 @@ var TextInput = forwardRef(function (props, ref) {
79
83
  _b[styles.disabled] = disabled,
80
84
  _b[styles.focused] = isFocused,
81
85
  _b);
82
- var inputRender = (jsxs(Flex, __assign({ alignItems: 'center', justifyContent: 'space-between' }, { children: [startAdornmentText && shouldShowAdornments ? (jsx(Text, __assign({ variant: 'label', size: 'l', color: 'subdued' }, { children: startAdornmentText }))) : null, jsx("input", __assign({ onFocus: handleFocus, onBlur: handleBlur, ref: ref, className: cn(styles.input, inputClassName, inputElStyle), value: value, maxLength: maxLength, disabled: disabled, placeholder: shouldShowPlaceholder ? placeholderText : undefined, "aria-label": (ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : shouldShowLabel) ? labelText : undefined, "aria-required": required, id: id }, other)), endAdornmentText && shouldShowAdornments ? (jsx(Text, __assign({ variant: 'label', size: 'l', color: 'subdued' }, { children: endAdornmentText }))) : null] })));
83
- var isLabelElevated = hasValue || isFocused;
86
+ var inputElement = (jsxs(Flex, __assign({ alignItems: 'center', justifyContent: 'space-between' }, { children: [startAdornmentText && shouldShowAdornments ? (jsx(Text, __assign({ variant: 'label', size: 'l', color: 'subdued' }, { children: startAdornmentText }))) : null, jsx("input", __assign({ onFocus: handleFocus, onBlur: handleBlur, ref: ref, className: cn(styles.input, inputClassName, inputElStyle), value: value, maxLength: maxLength, disabled: disabled, placeholder: shouldShowPlaceholder ? placeholderText : undefined, "aria-label": (ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : shouldShowLabel) ? labelText : undefined, "aria-required": required, id: id, autoComplete: 'off' }, other)), endAdornmentText && shouldShowAdornments ? (jsx(Text, __assign({ variant: 'label', size: 'l', color: 'subdued' }, { children: endAdornmentText }))) : null] })));
87
+ var isLabelElevated = hasValue || isFocused || elevateLabel;
84
88
  return (jsxs(Flex, __assign({ className: cn(styles.root, className), direction: 'column', gap: 'xs', alignItems: 'flex-start', w: '100%' }, { children: [jsxs("label", __assign({ htmlFor: id, className: cn(styles.contentContainer, inputRootClassName, inputRootStyle) }, { children: [StartIcon ? (jsx(StartIcon, __assign({ size: size === TextInputSize.SMALL ? 's' : 'm', color: 'subdued' }, IconProps))) : null, jsxs(Flex, __assign({ direction: 'column', gap: 'xs', justifyContent: 'center', w: '100%' }, { children: [shouldShowLabel ? (jsxs(Flex, __assign({ className: styles.labelRow, direction: 'row', alignItems: 'center', justifyContent: 'space-between', gap: 's' }, { children: [jsx(Text, __assign({ variant: 'body', tag: 'span', size: isLabelElevated ? 's' : 'l', color: 'subdued', css: function (theme) { return ({
85
89
  whiteSpace: 'nowrap',
86
90
  overflow: 'hidden',
@@ -90,7 +94,7 @@ var TextInput = forwardRef(function (props, ref) {
90
94
  transform: isLabelElevated
91
95
  ? 'translate(0, 0)'
92
96
  : 'translate(0px, 13px)'
93
- }); } }, { children: labelText })), shouldShowMaxLengthText ? (jsxs(Text, __assign({ variant: 'body', size: 'xs', tag: 'span', color: maxLengthTextColor }, { children: [characterCount, "/", maxLength] }))) : null] }))) : null, inputRender] })), endAdornment] })), helperText ? (jsx(Text, __assign({ variant: 'body', size: helperTextSize, color: error ? 'danger' : _incorrectError ? 'warning' : 'default' }, { children: helperText }))) : null] })));
97
+ }); } }, { children: labelText })), shouldShowMaxLengthText ? (jsxs(Text, __assign({ variant: 'body', size: 'xs', tag: 'span', color: maxLengthTextColor }, { children: [characterCount, "/", maxLength] }))) : null] }))) : null, inputElement] })), endAdornment] })), helperText ? (jsx(Text, __assign({ variant: 'body', size: helperTextSize, color: error ? 'danger' : _incorrectError ? 'warning' : 'default' }, { children: helperText }))) : null] })));
94
98
  });
95
99
 
96
100
  export { TextInput };
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../../../src/components/input/TextInput/TextInput.tsx"],"sourcesContent":["import { ReactNode, forwardRef, useId } from 'react'\n\nimport cn from 'classnames'\n\nimport { Text, TextSize } from 'components/text'\nimport type { TextColors } from 'foundations/color/semantic'\n\nimport { Flex } from '../../layout'\nimport { useFocusState } from '../useFocusState'\n\nimport styles from './TextInput.module.css'\nimport { TextInputSize, type TextInputProps } from './types'\n\n/**\n * An input is a field where users can enter and edit text and enables the user to provide input in the form of plain text.\n */\nexport const TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n (props, ref) => {\n const {\n 'aria-label': ariaLabel,\n required,\n className,\n inputRootClassName,\n maxLength,\n showMaxLengthThreshold = 0.7,\n maxLengthWarningThreshold = 0.9,\n size = TextInputSize.DEFAULT,\n hideLabel,\n label: labelProp,\n value,\n id: idProp,\n warning: warningProp,\n error,\n className: inputClassName,\n disabled,\n onFocus: onFocusProp,\n onBlur: onBlurProp,\n placeholder,\n helperText,\n startAdornmentText,\n endAdornmentText,\n startIcon: StartIcon,\n endIcon: EndIcon,\n IconProps,\n endAdornment: endAdornmentProp,\n _incorrectError,\n _isHovered,\n _isFocused,\n _disablePointerEvents,\n ...other\n } = props\n\n let endAdornment: null | ReactNode\n if (EndIcon != null) {\n endAdornment = <EndIcon size='m' color='subdued' {...IconProps} />\n } else if (endAdornmentProp != null) {\n endAdornment = endAdornmentProp\n } else {\n endAdornment = null\n }\n\n /**\n * Since Firefox doesn't support the :has() pseudo selector,\n * manually track the focused state and use classes for focus, required, and disabled\n */\n const [isFocusedState, handleFocus, handleBlur] = useFocusState(\n onFocusProp,\n onBlurProp\n )\n\n const isFocused = _isFocused ?? isFocusedState\n\n // For focus behavior and accessiblity, <label> needs to have a htmlFor={} provided to an id matching the input\n const backupId = useId()\n const id = idProp ?? backupId\n\n const characterCount = value !== undefined ? `${value}`.length : 0\n const hasValue = characterCount > 0\n\n // Hide the label when requested or when the size is set to small\n const shouldShowLabel = !hideLabel && size !== TextInputSize.SMALL\n const labelText = required ? `${labelProp} *` : labelProp\n const placeholderText =\n required && hideLabel ? `${placeholder} *` : placeholder\n const helperTextSize: TextSize = size === TextInputSize.SMALL ? 'xs' : 's'\n\n // Whenever a label isn't visible the placeholder should be visible in it's place (if provided)\n const shouldShowPlaceholder = isFocused || !shouldShowLabel\n const shouldShowAdornments = isFocused || hasValue || !shouldShowLabel\n // Show the maxlength text whenever we hit a certain threshold (default 70%) + the input is focused\n const shouldShowMaxLengthText =\n isFocused &&\n maxLength &&\n characterCount >= showMaxLengthThreshold * maxLength\n // Turn the maxlength text to the warning color whenever we hit a certain threshold (default 90%)\n let maxLengthTextColor: TextColors = 'default'\n if (maxLength && characterCount > maxLength) {\n maxLengthTextColor = 'danger'\n } else if (\n maxLength &&\n characterCount >= maxLengthWarningThreshold * maxLength\n ) {\n maxLengthTextColor = 'warning'\n }\n\n // Styles for the root of the input\n const inputRootStyle = {\n [styles.default]: size === TextInputSize.DEFAULT,\n [styles.small]: size === TextInputSize.SMALL,\n [styles.warning]: warningProp,\n [styles.error]: error,\n [styles.focused]: isFocused || _isFocused,\n [styles.disabled]: disabled,\n [styles.required]: required,\n [styles.hover]: _isHovered,\n [styles.incorrectError]: _incorrectError,\n [styles.disablePointerEvents]: _disablePointerEvents\n }\n\n // Styles for the input element itself\n const inputElStyle = {\n [styles.default]: size === TextInputSize.DEFAULT,\n [styles.small]: size === TextInputSize.SMALL,\n [styles.disabled]: disabled,\n [styles.focused]: isFocused\n }\n\n const inputRender = (\n <Flex alignItems='center' justifyContent='space-between'>\n {startAdornmentText && shouldShowAdornments ? (\n <Text variant='label' size='l' color='subdued'>\n {startAdornmentText}\n </Text>\n ) : null}\n <input\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref}\n className={cn(styles.input, inputClassName, inputElStyle)}\n value={value}\n maxLength={maxLength}\n disabled={disabled}\n placeholder={shouldShowPlaceholder ? placeholderText : undefined}\n aria-label={ariaLabel ?? shouldShowLabel ? labelText : undefined}\n aria-required={required}\n id={id}\n {...other}\n />\n {endAdornmentText && shouldShowAdornments ? (\n <Text variant='label' size='l' color='subdued'>\n {endAdornmentText}\n </Text>\n ) : null}\n </Flex>\n )\n\n const isLabelElevated = hasValue || isFocused\n\n return (\n <Flex\n className={cn(styles.root, className)}\n direction='column'\n gap='xs'\n alignItems='flex-start'\n w='100%'\n >\n <label\n htmlFor={id}\n className={cn(\n styles.contentContainer,\n inputRootClassName,\n inputRootStyle\n )}\n >\n {StartIcon ? (\n <StartIcon\n size={size === TextInputSize.SMALL ? 's' : 'm'}\n color='subdued'\n {...IconProps}\n />\n ) : null}\n <Flex direction='column' gap='xs' justifyContent='center' w='100%'>\n {shouldShowLabel ? (\n <Flex\n className={styles.labelRow}\n direction='row'\n alignItems='center'\n justifyContent='space-between'\n gap='s'\n >\n <Text\n variant='body'\n tag='span'\n size={isLabelElevated ? 's' : 'l'}\n color='subdued'\n css={(theme) => ({\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n zIndex: 2,\n transition: `all ${theme.motion.expressive}`,\n transform: isLabelElevated\n ? 'translate(0, 0)'\n : 'translate(0px, 13px)'\n })}\n >\n {labelText}\n </Text>\n {shouldShowMaxLengthText ? (\n <Text\n variant='body'\n size='xs'\n tag='span'\n color={maxLengthTextColor}\n >\n {characterCount}/{maxLength}\n </Text>\n ) : null}\n </Flex>\n ) : null}\n {inputRender}\n </Flex>\n {endAdornment}\n </label>\n {helperText ? (\n <Text\n variant='body'\n size={helperTextSize}\n color={error ? 'danger' : _incorrectError ? 'warning' : 'default'}\n >\n {helperText}\n </Text>\n ) : null}\n </Flex>\n )\n }\n)\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAaA;;AAEG;IACU,SAAS,GAAG,UAAU,CACjC,UAAC,KAAK,EAAE,GAAG,EAAA;;AAEP,IAAA,IAAc,SAAS,GA+BrB,KAAK,CA/BgB,YAAA,CAAA,EACvB,QAAQ,GA8BN,KAAK,CA9BC,QAAA,EACR,SAAS,GA6BP,KAAK,UA7BE,EACT,kBAAkB,GA4BhB,KAAK,CAAA,kBA5BW,EAClB,SAAS,GA2BP,KAAK,CAAA,SA3BE,EACT,EA0BE,GAAA,KAAK,uBA1BqB,EAA5B,sBAAsB,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,GAAG,KAAA,EAC5B,EAAA,GAyBE,KAAK,CAzBwB,yBAAA,EAA/B,yBAAyB,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,GAAG,GAAA,EAAA,EAC/B,KAwBE,KAAK,CAAA,IAxBqB,EAA5B,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,aAAa,CAAC,OAAO,GAAA,EAAA,EAC5B,SAAS,GAuBP,KAAK,UAvBE,EACF,SAAS,GAsBd,KAAK,CAAA,KAtBS,EAChB,KAAK,GAqBH,KAAK,CAAA,KArBF,EACD,MAAM,GAoBR,KAAK,CApBG,EAAA,EACD,WAAW,GAmBlB,KAAK,CAnBa,OAAA,EACpB,KAAK,GAkBH,KAAK,MAlBF,EACM,cAAc,GAiBvB,KAAK,UAjBkB,EACzB,QAAQ,GAgBN,KAAK,SAhBC,EACC,WAAW,GAelB,KAAK,QAfa,EACZ,UAAU,GAchB,KAAK,CAAA,M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xB,4CAAA,MAAM,EAAE,CAAC;AACT,4CAAA,UAAU,EAAE,MAAO,CAAA,MAAA,CAAA,KAAK,CAAC,MAAM,CAAC,UAAU,CAAE;AAC5C,4CAAA,SAAS,EAAE,eAAe;AACxB,kDAAE,iBAAiB;AACnB,kDAAE,sBAAsB;yCAC3B,EAAC,EAAA,EAED,EAAA,EAAA,QAAA,EAAA,SAAS,IACL,EACN,uBAAuB,IACtBC,IAAC,CAAA,IAAI,aACH,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,IAAI,EACT,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,kBAAkB,iBAExB,cAAc,EAAA,GAAA,EAAG,SAAS,CACtB,EAAA,CAAA,CAAA,IACL,IAAI,CACH,EAAA,CAAA,CAAA,IACL,IAAI,EACP,WAAW,CAAA,EAAA,CAAA,CACP,EACN,YAAY,CAAA,EAAA,CAAA,CACP,EACP,UAAU,IACTD,IAAC,IAAI,EAAA,QAAA,CAAA,EACH,OAAO,EAAC,MAAM,EACd,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,EAEhE,EAAA,EAAA,QAAA,EAAA,UAAU,IACN,IACL,IAAI,CACH,EAAA,CAAA,CAAA,EACR;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../../../src/components/input/TextInput/TextInput.tsx"],"sourcesContent":["import { ReactNode, forwardRef, useId } from 'react'\n\nimport cn from 'classnames'\n\nimport { Text, TextSize } from 'components/text'\nimport type { TextColors } from 'foundations/color/semantic'\n\nimport { Flex } from '../../layout'\nimport { useFocusState } from '../useFocusState'\n\nimport styles from './TextInput.module.css'\nimport { TextInputSize, type TextInputProps } from './types'\n\n/**\n * An input is a field where users can enter and edit text and enables the user to provide input in the form of plain text.\n */\nexport const TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n (props, ref) => {\n const {\n 'aria-label': ariaLabel,\n required,\n className,\n inputRootClassName,\n maxLength,\n showMaxLengthThreshold = 0.7,\n maxLengthWarningThreshold = 0.9,\n size = TextInputSize.DEFAULT,\n hideLabel,\n hidePlaceholder,\n label: labelProp,\n value,\n id: idProp,\n warning: warningProp,\n error,\n className: inputClassName,\n disabled,\n onFocus: onFocusProp,\n onBlur: onBlurProp,\n placeholder,\n helperText,\n startAdornmentText,\n endAdornmentText,\n startIcon: StartIcon,\n endIcon: EndIcon,\n IconProps,\n endAdornment: endAdornmentProp,\n elevateLabel,\n _incorrectError,\n _isHovered,\n _isFocused,\n _disablePointerEvents,\n ...other\n } = props\n\n let endAdornment: null | ReactNode\n if (EndIcon != null) {\n endAdornment = <EndIcon size='m' color='subdued' {...IconProps} />\n } else if (endAdornmentProp != null) {\n endAdornment = endAdornmentProp\n } else {\n endAdornment = null\n }\n\n /**\n * Since Firefox doesn't support the :has() pseudo selector,\n * manually track the focused state and use classes for focus, required, and disabled\n */\n const [isFocusedState, handleFocus, handleBlur] = useFocusState(\n onFocusProp,\n onBlurProp\n )\n\n const isFocused = _isFocused ?? isFocusedState\n\n // For focus behavior and accessiblity, <label> needs to have a htmlFor={} provided to an id matching the input\n const backupId = useId()\n const id = idProp ?? backupId\n\n const characterCount = value !== undefined ? `${value}`.length : 0\n const hasValue = characterCount > 0\n\n // Hide the label when requested or when the size is set to small\n const shouldShowLabel = !hideLabel && size !== TextInputSize.SMALL\n const labelText = required ? `${labelProp} *` : labelProp\n const placeholderText =\n required && hideLabel\n ? `${placeholder} *`\n : size === TextInputSize.SMALL\n ? labelText\n : placeholder\n const helperTextSize: TextSize = size === TextInputSize.SMALL ? 'xs' : 's'\n\n // Whenever a label isn't visible the placeholder should be visible in it's place (if provided)\n const shouldShowPlaceholder =\n (isFocused || !shouldShowLabel) && !hidePlaceholder\n const shouldShowAdornments = isFocused || hasValue || !shouldShowLabel\n // Show the maxlength text whenever we hit a certain threshold (default 70%) + the input is focused\n const shouldShowMaxLengthText =\n isFocused &&\n maxLength &&\n characterCount >= showMaxLengthThreshold * maxLength\n // Turn the maxlength text to the warning color whenever we hit a certain threshold (default 90%)\n let maxLengthTextColor: TextColors = 'default'\n if (maxLength && characterCount > maxLength) {\n maxLengthTextColor = 'danger'\n } else if (\n maxLength &&\n characterCount >= maxLengthWarningThreshold * maxLength\n ) {\n maxLengthTextColor = 'warning'\n }\n\n // Styles for the root of the input\n const inputRootStyle = {\n [styles.default]: size === TextInputSize.DEFAULT,\n [styles.small]: size === TextInputSize.SMALL,\n [styles.warning]: warningProp,\n [styles.error]: error,\n [styles.focused]: isFocused || _isFocused,\n [styles.disabled]: disabled,\n [styles.required]: required,\n [styles.hover]: _isHovered,\n [styles.incorrectError]: _incorrectError,\n [styles.disablePointerEvents]: _disablePointerEvents\n }\n\n // Styles for the input element itself\n const inputElStyle = {\n [styles.default]: size === TextInputSize.DEFAULT,\n [styles.small]: size === TextInputSize.SMALL,\n [styles.disabled]: disabled,\n [styles.focused]: isFocused\n }\n\n const inputElement = (\n <Flex alignItems='center' justifyContent='space-between'>\n {startAdornmentText && shouldShowAdornments ? (\n <Text variant='label' size='l' color='subdued'>\n {startAdornmentText}\n </Text>\n ) : null}\n <input\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref}\n className={cn(styles.input, inputClassName, inputElStyle)}\n value={value}\n maxLength={maxLength}\n disabled={disabled}\n placeholder={shouldShowPlaceholder ? placeholderText : undefined}\n aria-label={ariaLabel ?? shouldShowLabel ? labelText : undefined}\n aria-required={required}\n id={id}\n autoComplete='off'\n {...other}\n />\n {endAdornmentText && shouldShowAdornments ? (\n <Text variant='label' size='l' color='subdued'>\n {endAdornmentText}\n </Text>\n ) : null}\n </Flex>\n )\n\n const isLabelElevated = hasValue || isFocused || elevateLabel\n\n return (\n <Flex\n className={cn(styles.root, className)}\n direction='column'\n gap='xs'\n alignItems='flex-start'\n w='100%'\n >\n <label\n htmlFor={id}\n className={cn(\n styles.contentContainer,\n inputRootClassName,\n inputRootStyle\n )}\n >\n {StartIcon ? (\n <StartIcon\n size={size === TextInputSize.SMALL ? 's' : 'm'}\n color='subdued'\n {...IconProps}\n />\n ) : null}\n <Flex direction='column' gap='xs' justifyContent='center' w='100%'>\n {shouldShowLabel ? (\n <Flex\n className={styles.labelRow}\n direction='row'\n alignItems='center'\n justifyContent='space-between'\n gap='s'\n >\n <Text\n variant='body'\n tag='span'\n size={isLabelElevated ? 's' : 'l'}\n color='subdued'\n css={(theme) => ({\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n zIndex: 2,\n transition: `all ${theme.motion.expressive}`,\n transform: isLabelElevated\n ? 'translate(0, 0)'\n : 'translate(0px, 13px)'\n })}\n >\n {labelText}\n </Text>\n {shouldShowMaxLengthText ? (\n <Text\n variant='body'\n size='xs'\n tag='span'\n color={maxLengthTextColor}\n >\n {characterCount}/{maxLength}\n </Text>\n ) : null}\n </Flex>\n ) : null}\n {inputElement}\n </Flex>\n {endAdornment}\n </label>\n {helperText ? (\n <Text\n variant='body'\n size={helperTextSize}\n color={error ? 'danger' : _incorrectError ? 'warning' : 'default'}\n >\n {helperText}\n </Text>\n ) : null}\n </Flex>\n )\n }\n)\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAaA;;AAEG;IACU,SAAS,GAAG,UAAU,CACjC,UAAC,KAAK,EAAE,GAAG,EAAA;;AAEP,IAAA,IAAc,SAAS,GAiCrB,KAAK,cAjCgB,EACvB,QAAQ,GAgCN,KAAK,CAAA,QAhCC,EACR,SAAS,GA+BP,KAAK,CA/BE,SAAA,EACT,kBAAkB,GA8BhB,KAAK,mBA9BW,EAClB,SAAS,GA6BP,KAAK,UA7BE,EACT,EAAA,GA4BE,KAAK,CA5BqB,sBAAA,EAA5B,sBAAsB,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,GAAG,KAAA,EAC5B,EAAA,GA2BE,KAAK,CA3BwB,yBAAA,EAA/B,yBAAyB,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,GAAG,KA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ACP,UAAU,IACTD,IAAC,IAAI,EAAA,QAAA,CAAA,EACH,OAAO,EAAC,MAAM,EACd,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,EAEhE,EAAA,EAAA,QAAA,EAAA,UAAU,IACN,IACL,IAAI,CACH,EAAA,CAAA,CAAA,EACR;AACH,CAAC;;;;"}
@@ -46,9 +46,12 @@ export type TextInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'r
46
46
  error?: boolean;
47
47
  /**
48
48
  * Hides the label. If the label is hidden the placeholder will show by default instead.
49
- * @default false
50
49
  */
51
50
  hideLabel?: boolean;
51
+ /**
52
+ * When `true` hides the placeholder. Used in `Select`.
53
+ */
54
+ hidePlaceholder?: boolean;
52
55
  /**
53
56
  * Label Text. Required due to accessibility. If hideLabel is true, the label is set via aria-label
54
57
  */
@@ -100,6 +103,10 @@ export type TextInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'r
100
103
  * @default 0.9
101
104
  */
102
105
  maxLengthWarningThreshold?: number;
106
+ /**
107
+ * When `true` elevate the label. Useful for adding custom values. Reference `Select` component
108
+ */
109
+ elevateLabel?: boolean;
103
110
  } & InternalProps;
104
111
  export {};
105
112
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TextInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE1D,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,KAAK,aAAa,GAAG;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,wBAAwB,CAAC,OAAO,CAAC,EAEjC,MAAM,GAAG,UAAU,CACpB,GAAG;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAA;CACnC,GAAG,aAAa,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TextInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KA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