@simplybusiness/mobius 3.9.3 → 3.9.4

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 (218) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  3. package/package.json +1 -1
  4. package/src/components/NumberField/NumberField.mdx +17 -0
  5. package/dist/esm/components/Accordion/Accordion.stories.js +0 -45
  6. package/dist/esm/components/Accordion/Accordion.stories.js.map +0 -1
  7. package/dist/esm/components/Accordion/Accordion.test.js +0 -65
  8. package/dist/esm/components/Accordion/Accordion.test.js.map +0 -1
  9. package/dist/esm/components/Alert/Alert.stories.js +0 -32
  10. package/dist/esm/components/Alert/Alert.stories.js.map +0 -1
  11. package/dist/esm/components/Alert/Alert.test.js +0 -48
  12. package/dist/esm/components/Alert/Alert.test.js.map +0 -1
  13. package/dist/esm/components/Box/Box.stories.js +0 -20
  14. package/dist/esm/components/Box/Box.stories.js.map +0 -1
  15. package/dist/esm/components/Box/Box.test.js +0 -31
  16. package/dist/esm/components/Box/Box.test.js.map +0 -1
  17. package/dist/esm/components/Breadcrumbs/Breadcrumbs.stories.js +0 -17
  18. package/dist/esm/components/Breadcrumbs/Breadcrumbs.stories.js.map +0 -1
  19. package/dist/esm/components/Breadcrumbs/Breadcrumbs.test.js +0 -33
  20. package/dist/esm/components/Breadcrumbs/Breadcrumbs.test.js.map +0 -1
  21. package/dist/esm/components/Button/Button.stories.js +0 -213
  22. package/dist/esm/components/Button/Button.stories.js.map +0 -1
  23. package/dist/esm/components/Button/Button.test.js +0 -81
  24. package/dist/esm/components/Button/Button.test.js.map +0 -1
  25. package/dist/esm/components/Checkbox/Checkbox.stories.js +0 -98
  26. package/dist/esm/components/Checkbox/Checkbox.stories.js.map +0 -1
  27. package/dist/esm/components/Checkbox/Checkbox.test.js +0 -108
  28. package/dist/esm/components/Checkbox/Checkbox.test.js.map +0 -1
  29. package/dist/esm/components/Checkbox/CheckboxGroup.stories.js +0 -71
  30. package/dist/esm/components/Checkbox/CheckboxGroup.stories.js.map +0 -1
  31. package/dist/esm/components/Checkbox/CheckboxGroup.test.js +0 -44
  32. package/dist/esm/components/Checkbox/CheckboxGroup.test.js.map +0 -1
  33. package/dist/esm/components/Chopin/Actions/Actions.stories.js +0 -56
  34. package/dist/esm/components/Chopin/Actions/Actions.stories.js.map +0 -1
  35. package/dist/esm/components/Chopin/Actions/Actions.test.js +0 -95
  36. package/dist/esm/components/Chopin/Actions/Actions.test.js.map +0 -1
  37. package/dist/esm/components/Chopin/Actions/LinkOrButton.test.js +0 -33
  38. package/dist/esm/components/Chopin/Actions/LinkOrButton.test.js.map +0 -1
  39. package/dist/esm/components/Chopin/Footer/Footer.stories.js +0 -166
  40. package/dist/esm/components/Chopin/Footer/Footer.stories.js.map +0 -1
  41. package/dist/esm/components/Chopin/Footer/Footer.test.js +0 -90
  42. package/dist/esm/components/Chopin/Footer/Footer.test.js.map +0 -1
  43. package/dist/esm/components/Chopin/Header/Header.stories.js +0 -38
  44. package/dist/esm/components/Chopin/Header/Header.stories.js.map +0 -1
  45. package/dist/esm/components/Chopin/Header/Header.test.js +0 -86
  46. package/dist/esm/components/Chopin/Header/Header.test.js.map +0 -1
  47. package/dist/esm/components/Chopin/PercentageTotalsQuestion/PercentageTotalsQuestion.stories.js +0 -43
  48. package/dist/esm/components/Chopin/PercentageTotalsQuestion/PercentageTotalsQuestion.stories.js.map +0 -1
  49. package/dist/esm/components/Chopin/PercentageTotalsQuestion/PercentageTotalsQuestion.test.js +0 -108
  50. package/dist/esm/components/Chopin/PercentageTotalsQuestion/PercentageTotalsQuestion.test.js.map +0 -1
  51. package/dist/esm/components/Chopin/Question/Question.stories.js +0 -136
  52. package/dist/esm/components/Chopin/Question/Question.stories.js.map +0 -1
  53. package/dist/esm/components/Chopin/Question/Question.test.js +0 -116
  54. package/dist/esm/components/Chopin/Question/Question.test.js.map +0 -1
  55. package/dist/esm/components/Chopin/QuestionGroup/QuestionGroup.stories.js +0 -40
  56. package/dist/esm/components/Chopin/QuestionGroup/QuestionGroup.stories.js.map +0 -1
  57. package/dist/esm/components/Chopin/QuestionGroup/QuestionGroup.test.js +0 -62
  58. package/dist/esm/components/Chopin/QuestionGroup/QuestionGroup.test.js.map +0 -1
  59. package/dist/esm/components/Chopin/QuestionHelp/QuestionHelp.test.js +0 -41
  60. package/dist/esm/components/Chopin/QuestionHelp/QuestionHelp.test.js.map +0 -1
  61. package/dist/esm/components/Chopin/Section/Section.stories.js +0 -16
  62. package/dist/esm/components/Chopin/Section/Section.stories.js.map +0 -1
  63. package/dist/esm/components/Chopin/Section/Section.test.js +0 -35
  64. package/dist/esm/components/Chopin/Section/Section.test.js.map +0 -1
  65. package/dist/esm/components/Chopin/Steps/Steps.stories.js +0 -12
  66. package/dist/esm/components/Chopin/Steps/Steps.stories.js.map +0 -1
  67. package/dist/esm/components/Chopin/Steps/Steps.test.js +0 -93
  68. package/dist/esm/components/Chopin/Steps/Steps.test.js.map +0 -1
  69. package/dist/esm/components/Chopin/Testimonial/Testimonial.stories.js +0 -15
  70. package/dist/esm/components/Chopin/Testimonial/Testimonial.stories.js.map +0 -1
  71. package/dist/esm/components/Chopin/Testimonial/Testimonial.test.js +0 -35
  72. package/dist/esm/components/Chopin/Testimonial/Testimonial.test.js.map +0 -1
  73. package/dist/esm/components/Chopin/TradeSelector/Listing/Listing.test.js +0 -26
  74. package/dist/esm/components/Chopin/TradeSelector/Listing/Listing.test.js.map +0 -1
  75. package/dist/esm/components/Chopin/TradeSelector/Listing/ListingItem.test.js +0 -37
  76. package/dist/esm/components/Chopin/TradeSelector/Listing/ListingItem.test.js.map +0 -1
  77. package/dist/esm/components/Chopin/TradeSelector/SearchResults/SearchResults.test.js +0 -86
  78. package/dist/esm/components/Chopin/TradeSelector/SearchResults/SearchResults.test.js.map +0 -1
  79. package/dist/esm/components/Chopin/TradeSelector/TradeInput/TradeInput.test.js +0 -52
  80. package/dist/esm/components/Chopin/TradeSelector/TradeInput/TradeInput.test.js.map +0 -1
  81. package/dist/esm/components/Chopin/TradeSelector/TradeSelector.stories.js +0 -52
  82. package/dist/esm/components/Chopin/TradeSelector/TradeSelector.stories.js.map +0 -1
  83. package/dist/esm/components/Chopin/TradeSelector/TradeSelector.test.js +0 -226
  84. package/dist/esm/components/Chopin/TradeSelector/TradeSelector.test.js.map +0 -1
  85. package/dist/esm/components/Container/Container.stories.js +0 -12
  86. package/dist/esm/components/Container/Container.stories.js.map +0 -1
  87. package/dist/esm/components/Container/Container.test.js +0 -37
  88. package/dist/esm/components/Container/Container.test.js.map +0 -1
  89. package/dist/esm/components/DataTable/DataTable.stories.js +0 -174
  90. package/dist/esm/components/DataTable/DataTable.stories.js.map +0 -1
  91. package/dist/esm/components/DataTable/DataTable.test.js +0 -119
  92. package/dist/esm/components/DataTable/DataTable.test.js.map +0 -1
  93. package/dist/esm/components/DatePicker/DatePicker.stories.js +0 -25
  94. package/dist/esm/components/DatePicker/DatePicker.stories.js.map +0 -1
  95. package/dist/esm/components/Divider/Divider.stories.js +0 -12
  96. package/dist/esm/components/Divider/Divider.stories.js.map +0 -1
  97. package/dist/esm/components/DropdownMenu/DropdownMenu.stories.js +0 -58
  98. package/dist/esm/components/DropdownMenu/DropdownMenu.stories.js.map +0 -1
  99. package/dist/esm/components/DropdownMenu/DropdownMenu.test.js +0 -95
  100. package/dist/esm/components/DropdownMenu/DropdownMenu.test.js.map +0 -1
  101. package/dist/esm/components/ErrorMessage/ErrorMessage.stories.js +0 -21
  102. package/dist/esm/components/ErrorMessage/ErrorMessage.stories.js.map +0 -1
  103. package/dist/esm/components/ErrorMessage/ErrorMessage.test.js +0 -30
  104. package/dist/esm/components/ErrorMessage/ErrorMessage.test.js.map +0 -1
  105. package/dist/esm/components/Fieldset/Fieldset.stories.js +0 -22
  106. package/dist/esm/components/Fieldset/Fieldset.stories.js.map +0 -1
  107. package/dist/esm/components/Fieldset/Fieldset.test.js +0 -10
  108. package/dist/esm/components/Fieldset/Fieldset.test.js.map +0 -1
  109. package/dist/esm/components/Flex/Flex.stories.js +0 -148
  110. package/dist/esm/components/Flex/Flex.stories.js.map +0 -1
  111. package/dist/esm/components/Flex/Flex.test.js +0 -31
  112. package/dist/esm/components/Flex/Flex.test.js.map +0 -1
  113. package/dist/esm/components/Grid/Grid.stories.js +0 -227
  114. package/dist/esm/components/Grid/Grid.stories.js.map +0 -1
  115. package/dist/esm/components/Grid/Grid.test.js +0 -95
  116. package/dist/esm/components/Grid/Grid.test.js.map +0 -1
  117. package/dist/esm/components/Icon/Icon.stories.js +0 -43
  118. package/dist/esm/components/Icon/Icon.stories.js.map +0 -1
  119. package/dist/esm/components/Icon/Icon.test.js +0 -52
  120. package/dist/esm/components/Icon/Icon.test.js.map +0 -1
  121. package/dist/esm/components/Image/Image.stories.js +0 -17
  122. package/dist/esm/components/Image/Image.stories.js.map +0 -1
  123. package/dist/esm/components/Image/Image.test.js +0 -37
  124. package/dist/esm/components/Image/Image.test.js.map +0 -1
  125. package/dist/esm/components/Label/Label.stories.js +0 -15
  126. package/dist/esm/components/Label/Label.stories.js.map +0 -1
  127. package/dist/esm/components/Label/Label.test.js +0 -35
  128. package/dist/esm/components/Label/Label.test.js.map +0 -1
  129. package/dist/esm/components/Link/Link.stories.js +0 -41
  130. package/dist/esm/components/Link/Link.stories.js.map +0 -1
  131. package/dist/esm/components/Link/Link.test.js +0 -65
  132. package/dist/esm/components/Link/Link.test.js.map +0 -1
  133. package/dist/esm/components/LinkButton/LinkButton.stories.js +0 -42
  134. package/dist/esm/components/LinkButton/LinkButton.stories.js.map +0 -1
  135. package/dist/esm/components/LinkButton/LinkButton.test.js +0 -62
  136. package/dist/esm/components/LinkButton/LinkButton.test.js.map +0 -1
  137. package/dist/esm/components/List/List.stories.js +0 -77
  138. package/dist/esm/components/List/List.stories.js.map +0 -1
  139. package/dist/esm/components/List/List.test.js +0 -93
  140. package/dist/esm/components/List/List.test.js.map +0 -1
  141. package/dist/esm/components/LoadingIndicator/LoadingIndicator.stories.js +0 -50
  142. package/dist/esm/components/LoadingIndicator/LoadingIndicator.stories.js.map +0 -1
  143. package/dist/esm/components/LoadingIndicator/LoadingIndicator.test.js +0 -27
  144. package/dist/esm/components/LoadingIndicator/LoadingIndicator.test.js.map +0 -1
  145. package/dist/esm/components/MaskedField/MaskedField.stories.js +0 -22
  146. package/dist/esm/components/MaskedField/MaskedField.stories.js.map +0 -1
  147. package/dist/esm/components/MaskedField/MaskedField.test.js +0 -64
  148. package/dist/esm/components/MaskedField/MaskedField.test.js.map +0 -1
  149. package/dist/esm/components/Modal/Modal.stories.js +0 -79
  150. package/dist/esm/components/Modal/Modal.stories.js.map +0 -1
  151. package/dist/esm/components/Modal/Modal.test.js +0 -135
  152. package/dist/esm/components/Modal/Modal.test.js.map +0 -1
  153. package/dist/esm/components/NumberField/NumberField.stories.js +0 -103
  154. package/dist/esm/components/NumberField/NumberField.stories.js.map +0 -1
  155. package/dist/esm/components/NumberField/NumberField.test.js +0 -81
  156. package/dist/esm/components/NumberField/NumberField.test.js.map +0 -1
  157. package/dist/esm/components/PasswordField/PasswordField.stories.js +0 -31
  158. package/dist/esm/components/PasswordField/PasswordField.stories.js.map +0 -1
  159. package/dist/esm/components/PasswordField/PasswordField.test.js +0 -29
  160. package/dist/esm/components/PasswordField/PasswordField.test.js.map +0 -1
  161. package/dist/esm/components/Progress/Progress.stories.js +0 -89
  162. package/dist/esm/components/Progress/Progress.stories.js.map +0 -1
  163. package/dist/esm/components/Progress/Progress.test.js +0 -32
  164. package/dist/esm/components/Progress/Progress.test.js.map +0 -1
  165. package/dist/esm/components/Radio/Radio.stories.js +0 -118
  166. package/dist/esm/components/Radio/Radio.stories.js.map +0 -1
  167. package/dist/esm/components/Radio/Radio.test.js +0 -139
  168. package/dist/esm/components/Radio/Radio.test.js.map +0 -1
  169. package/dist/esm/components/Radio/RadioButton.stories.js +0 -88
  170. package/dist/esm/components/Radio/RadioButton.stories.js.map +0 -1
  171. package/dist/esm/components/Radio/RadioButton.test.js +0 -118
  172. package/dist/esm/components/Radio/RadioButton.test.js.map +0 -1
  173. package/dist/esm/components/SVG/SVG.stories.js +0 -19
  174. package/dist/esm/components/SVG/SVG.stories.js.map +0 -1
  175. package/dist/esm/components/SVG/SVG.test.js +0 -26
  176. package/dist/esm/components/SVG/SVG.test.js.map +0 -1
  177. package/dist/esm/components/Segment/Segment.stories.js +0 -112
  178. package/dist/esm/components/Segment/Segment.stories.js.map +0 -1
  179. package/dist/esm/components/Select/Select.stories.js +0 -79
  180. package/dist/esm/components/Select/Select.stories.js.map +0 -1
  181. package/dist/esm/components/Select/Select.test.js +0 -94
  182. package/dist/esm/components/Select/Select.test.js.map +0 -1
  183. package/dist/esm/components/Slider/Slider.stories.js +0 -63
  184. package/dist/esm/components/Slider/Slider.stories.js.map +0 -1
  185. package/dist/esm/components/Slider/Slider.test.js +0 -58
  186. package/dist/esm/components/Slider/Slider.test.js.map +0 -1
  187. package/dist/esm/components/Table/Table.stories.js +0 -15
  188. package/dist/esm/components/Table/Table.stories.js.map +0 -1
  189. package/dist/esm/components/Table/Table.test.js +0 -73
  190. package/dist/esm/components/Table/Table.test.js.map +0 -1
  191. package/dist/esm/components/Text/Text.stories.js +0 -31
  192. package/dist/esm/components/Text/Text.stories.js.map +0 -1
  193. package/dist/esm/components/Text/Text.test.js +0 -31
  194. package/dist/esm/components/Text/Text.test.js.map +0 -1
  195. package/dist/esm/components/TextArea/TextArea.stories.js +0 -80
  196. package/dist/esm/components/TextArea/TextArea.stories.js.map +0 -1
  197. package/dist/esm/components/TextArea/TextArea.test.js +0 -84
  198. package/dist/esm/components/TextArea/TextArea.test.js.map +0 -1
  199. package/dist/esm/components/TextAreaInput/TextAreaInput.test.js +0 -42
  200. package/dist/esm/components/TextAreaInput/TextAreaInput.test.js.map +0 -1
  201. package/dist/esm/components/TextField/TextField.stories.js +0 -103
  202. package/dist/esm/components/TextField/TextField.stories.js.map +0 -1
  203. package/dist/esm/components/TextField/TextField.test.js +0 -123
  204. package/dist/esm/components/TextField/TextField.test.js.map +0 -1
  205. package/dist/esm/components/Title/Title.stories.js +0 -16
  206. package/dist/esm/components/Title/Title.stories.js.map +0 -1
  207. package/dist/esm/components/Title/Title.test.js +0 -20
  208. package/dist/esm/components/Title/Title.test.js.map +0 -1
  209. package/dist/esm/components/VisuallyHidden/VisuallyHidden.stories.js +0 -12
  210. package/dist/esm/components/VisuallyHidden/VisuallyHidden.stories.js.map +0 -1
  211. package/dist/esm/contexts/ThemeContext/ThemeContext.test.js +0 -10
  212. package/dist/esm/contexts/ThemeContext/ThemeContext.test.js.map +0 -1
  213. package/dist/esm/hooks/useBreakpoint/useBreakpoint.stories.js +0 -40
  214. package/dist/esm/hooks/useBreakpoint/useBreakpoint.stories.js.map +0 -1
  215. package/dist/esm/hooks/useBreakpoint/useBreakpoint.test.js +0 -242
  216. package/dist/esm/hooks/useBreakpoint/useBreakpoint.test.js.map +0 -1
  217. package/dist/esm/hooks/useButton/useButton.test.js +0 -141
  218. package/dist/esm/hooks/useButton/useButton.test.js.map +0 -1
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Text } from "./Text";
3
- import { excludeControls } from "../../utils/excludeControls";
4
- import { Box } from "../Box";
5
- export default {
6
- title: "Components/Text",
7
- component: Text,
8
- excludeStories: ["Example", "ExampleSpacing", "ExampleVariant"],
9
- argTypes: excludeControls("className", "style"),
10
- };
11
- export const Normal = {
12
- render: (args) => _jsx(Text, Object.assign({}, args, { children: "Sample Text" })),
13
- args: {
14
- elementType: "h4",
15
- variant: "h4",
16
- },
17
- };
18
- export const Themed = {
19
- render: (args) => _jsx(Text, Object.assign({}, args, { children: "Sample Text" })),
20
- args: {
21
- elementType: "h4",
22
- variant: "h4",
23
- style: {
24
- color: "green",
25
- },
26
- },
27
- };
28
- export const Example = () => (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, Object.assign({ elementType: "h1" }, { children: "Heading 1" })), _jsx(Text, Object.assign({ elementType: "h2" }, { children: "Heading 2" })), _jsx(Text, Object.assign({ elementType: "h3" }, { children: "Heading 3" })), _jsx(Text, Object.assign({ elementType: "h4" }, { children: "Heading 4" })), _jsx(Text, Object.assign({ elementType: "h5" }, { children: "Heading 5" })), _jsx(Text, Object.assign({ elementType: "h6" }, { children: "Heading 6" })), _jsx(Text, { children: "Paragraph" })] }), _jsxs(Box, { children: [_jsx(Text, Object.assign({ elementType: "h1" }, { children: "First Heading" })), _jsx(Text, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel lorem enim. Nam vitae enim mollis turpis scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id turpis nisl. In hac habitasse platea dictumst. Morbi blandit sodales nibh, auctor dapibus orci pellentesque sit amet. Etiam posuere massa vel imperdiet dapibus. Morbi sed tempor neque, sit amet viverra magna. Etiam efficitur augue accumsan, feugiat libero id, tincidunt turpis. Nam ullamcorper enim in leo dapibus aliquam eu sit amet erat. Morbi iaculis magna ut tincidunt rhoncus." }), _jsx(Text, { children: "Mauris pharetra enim et turpis lacinia, quis porta velit commodo. Proin at vehicula ligula, ut semper sapien. Donec felis elit, pretium vitae viverra eget, venenatis id elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit et erat nec placerat. Vestibulum vitae risus pellentesque, semper odio eget, elementum orci. Nam pulvinar metus sed sapien gravida bibendum. Praesent a malesuada ipsum. Vivamus ac congue odio." }), _jsx(Text, Object.assign({ elementType: "h2" }, { children: "Second Heading" })), _jsx(Text, { children: "Ut vel lectus arcu. Etiam ut efficitur turpis, pretium pretium nunc. Ut dolor nibh, facilisis at tempus at, iaculis sed mi. Etiam sollicitudin, elit eu dapibus pharetra, purus turpis egestas enim, vel pulvinar leo libero ac ante. Sed posuere, mi a commodo bibendum, dui lacus ullamcorper dolor, ut dapibus nunc libero vel felis. Morbi quis porttitor nisi. Aenean ac elit ipsum. Curabitur nunc nibh, tristique non purus vel, efficitur vulputate massa. Donec eget risus venenatis turpis tempor venenatis. Nam aliquet ipsum non faucibus tempus. Vestibulum efficitur ex erat, eget varius urna venenatis vel. Aenean mollis arcu purus, id pretium ligula facilisis et." })] })] }));
29
- export const ExampleVariant = () => (_jsxs("div", Object.assign({ style: { display: "flex", flexDirection: "column" } }, { children: [_jsx(Text, Object.assign({ variant: "h1" }, { children: "variant h1" })), _jsx(Text, Object.assign({ variant: "h2" }, { children: "variant h2" })), _jsx(Text, Object.assign({ variant: "h3" }, { children: "variant h3" })), _jsx(Text, Object.assign({ variant: "h4" }, { children: "variant h4" })), _jsx(Text, Object.assign({ variant: "h5" }, { children: "variant h5" })), _jsx(Text, Object.assign({ variant: "lead" }, { children: "variant lead" })), _jsx(Text, Object.assign({ variant: "body" }, { children: "variant body" })), _jsx(Text, Object.assign({ variant: "caption" }, { children: "variant caption" })), _jsx(Text, Object.assign({ variant: "legal" }, { children: "variant legal" }))] })));
30
- export const ExampleSpacing = () => (_jsxs(Box, { children: [_jsx(Text, Object.assign({ variant: "h3" }, { children: "Tight Spacing" })), _jsx(Text, Object.assign({ spacing: "tight" }, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel lorem enim. Nam vitae enim mollis turpis scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc." })), _jsx(Text, Object.assign({ spacing: "tight" }, { children: "Mauris pharetra enim et turpis lacinia, quis porta velit commodo. Scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc." })), _jsx(Text, Object.assign({ spacing: "tight" }, { children: "Ut vel lectus arcu. Etiam ut efficitur turpis, pretium pretium nunc. Ut dolor nibh, facilisis at tempus at, iaculis sed mi." })), _jsx(Text, Object.assign({ variant: "h3" }, { children: "Loose Spacing" })), _jsx(Text, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel lorem enim. Nam vitae enim mollis turpis scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc." }), _jsx(Text, { children: "Mauris pharetra enim et turpis lacinia, quis porta velit commodo. Scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc." }), _jsx(Text, { children: "Ut vel lectus arcu. Etiam ut efficitur turpis, pretium pretium nunc. Ut dolor nibh, facilisis at tempus at, iaculis sed mi." })] }));
31
- //# sourceMappingURL=Text.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.stories.js","sourceRoot":"","sources":["../../../../src/components/Text/Text.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,IAAI;IACf,cAAc,EAAE,CAAC,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;IAC/D,QAAQ,EAAE,eAAe,CAAC,WAAW,EAAE,OAAO,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAsB;IACvC,MAAM,EAAE,CAAC,IAAe,EAAE,EAAE,CAAC,KAAC,IAAI,oBAAK,IAAI,+BAAoB;IAC/D,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,IAAI;KACd;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAsB;IACvC,MAAM,EAAE,CAAC,IAAe,EAAE,EAAE,CAAC,KAAC,IAAI,oBAAK,IAAI,+BAAoB;IAC/D,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,IAAI;QACb,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OA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;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CAClC,MAAC,GAAG,eACF,KAAC,IAAI,kBAAC,OAAO,EAAC,IAAI,mCAAqB,EACvC,KAAC,IAAI,kBAAC,OAAO,EAAC,OAAO,8NAId,EACP,KAAC,IAAI,kBAAC,OAAO,EAAC,OAAO,oLAId,EACP,KAAC,IAAI,kBAAC,OAAO,EAAC,OAAO,iJAGd,EACP,KAAC,IAAI,kBAAC,OAAO,EAAC,IAAI,mCAAqB,EACvC,KAAC,IAAI,2NAIE,EACP,KAAC,IAAI,iLAIE,EACP,KAAC,IAAI,8IAGE,IACH,CACP,CAAC"}
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render, screen } from "@testing-library/react";
3
- import { Text } from ".";
4
- const CLASS_NAME = "mobius/Text";
5
- describe("Text", () => {
6
- it("should render without errors", () => {
7
- render(_jsx(Text, Object.assign({ elementType: "h1" }, { children: "Sample text" })));
8
- });
9
- describe("given elementType", () => {
10
- it("is not applied as element attribute", () => {
11
- const { container } = render(_jsx(Text, Object.assign({ elementType: "h6" }, { children: "Sample text" })));
12
- expect(container.firstChild).not.toHaveAttribute("elementtype", "h6");
13
- });
14
- });
15
- describe("uses correct class names", () => {
16
- it("uses Mobius class", () => {
17
- render(_jsx(Text, Object.assign({ elementType: "h1", "data-testid": "test" }, { children: "Sample text" })));
18
- expect(screen.getByTestId("test")).toHaveClass("mobius");
19
- });
20
- it("uses base Mobius class", () => {
21
- render(_jsx(Text, Object.assign({ elementType: "h1", "data-testid": "test" }, { children: "Sample text" })));
22
- expect(screen.getByTestId("test")).toHaveClass(CLASS_NAME);
23
- });
24
- it("includes custom class name", () => {
25
- render(_jsx(Text, Object.assign({ elementType: "h1", className: "my-class", "data-testid": "test" }, { children: "Sample text" })));
26
- expect(screen.getByTestId("test")).toHaveClass("my-class");
27
- expect(screen.getByTestId("test")).toHaveClass(CLASS_NAME);
28
- });
29
- });
30
- });
31
- //# sourceMappingURL=Text.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.test.js","sourceRoot":"","sources":["../../../../src/components/Text/Text.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;AAEzB,MAAM,UAAU,GAAG,aAAa,CAAC;AAEjC,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,KAAC,IAAI,kBAAC,WAAW,EAAC,IAAI,iCAAmB,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACjC,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC7C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,KAAC,IAAI,kBAAC,WAAW,EAAC,IAAI,iCAAmB,CAAC,CAAC;YACxE,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;YAC3B,MAAM,CACJ,KAAC,IAAI,kBAAC,WAAW,EAAC,IAAI,iBAAa,MAAM,iCAElC,CACR,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;YAChC,MAAM,CACJ,KAAC,IAAI,kBAAC,WAAW,EAAC,IAAI,iBAAa,MAAM,iCAElC,CACR,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;YACpC,MAAM,CACJ,KAAC,IAAI,kBAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,UAAU,iBAAa,MAAM,iCAEvD,CACR,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC3D,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,80 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TextArea } from "./TextArea";
3
- import { excludeControls } from "../../utils/excludeControls";
4
- export default {
5
- title: "Forms/TextArea",
6
- component: TextArea,
7
- argTypes: Object.assign({ validationState: {
8
- options: ["valid", "invalid", "neither"],
9
- control: { type: "radio" },
10
- mapping: {
11
- valid: "valid",
12
- invalid: "invalid",
13
- neither: "",
14
- },
15
- } }, excludeControls("className")),
16
- };
17
- export const Normal = {
18
- render: (args) => _jsx(TextArea, Object.assign({}, args)),
19
- args: {
20
- label: "first name",
21
- placeholder: "Placeholder",
22
- defaultValue: "",
23
- isDisabled: false,
24
- errorMessage: "",
25
- },
26
- };
27
- export const ControlledValue = {
28
- render: (args) => _jsx(TextArea, Object.assign({}, args)),
29
- args: {
30
- label: "first name",
31
- placeholder: "Placeholder",
32
- defaultValue: "John Doe",
33
- isDisabled: false,
34
- errorMessage: "",
35
- },
36
- };
37
- export const Disabled = {
38
- render: (args) => _jsx(TextArea, Object.assign({}, args)),
39
- args: {
40
- label: "first name",
41
- placeholder: "Placeholder",
42
- defaultValue: "John Doe",
43
- isDisabled: true,
44
- errorMessage: "",
45
- },
46
- };
47
- export const WithError = {
48
- render: (args) => _jsx(TextArea, Object.assign({}, args)),
49
- args: {
50
- label: "first name",
51
- placeholder: "Placeholder",
52
- defaultValue: "John Doe",
53
- isDisabled: false,
54
- errorMessage: "This is an error message",
55
- validationState: "invalid",
56
- },
57
- };
58
- export const Valid = {
59
- render: (args) => _jsx(TextArea, Object.assign({}, args)),
60
- args: {
61
- label: "first name",
62
- placeholder: "Placeholder",
63
- defaultValue: "John Doe",
64
- isDisabled: false,
65
- errorMessage: "",
66
- validationState: "valid",
67
- },
68
- };
69
- export const Invalid = {
70
- render: (args) => _jsx(TextArea, Object.assign({}, args)),
71
- args: {
72
- label: "first name",
73
- placeholder: "Placeholder",
74
- defaultValue: "John Doe",
75
- isDisabled: false,
76
- errorMessage: "",
77
- validationState: "invalid",
78
- },
79
- };
80
- //# sourceMappingURL=TextArea.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextArea.stories.js","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,QAAQ;IACnB,QAAQ,kBACN,eAAe,EAAE;YACf,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;YACxC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YAC1B,OAAO,EAAE;gBACP,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,SAAS;gBAClB,OAAO,EAAE,EAAE;aACZ;SACF,IACE,eAAe,CAAC,WAAW,CAAC,CAChC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B;IAC3C,MAAM,EAAE,CAAC,IAAmB,EAAE,EA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AAE,aAAa;QAC1B,YAAY,EAAE,UAAU;QACxB,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,OAAO;KACzB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAA0B;IAC5C,MAAM,EAAE,CAAC,IAAmB,EAAE,EAAE,CAAC,KAAC,QAAQ,oBAAK,IAAI,EAAI;IACvD,IAAI,EAAE;QACJ,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE,UAAU;QACxB,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC"}
@@ -1,84 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { render, screen } from "@testing-library/react";
3
- import userEvent from "@testing-library/user-event";
4
- import { TextArea } from ".";
5
- const CLASS_NAME = "mobius/TextArea";
6
- describe("TextArea", () => {
7
- it("should render without error", () => {
8
- const component = render(_jsx(TextArea, { label: "First name" }));
9
- expect(component).toBeTruthy();
10
- });
11
- it("should call onChange with the updated value when the user types", async () => {
12
- const callback = jest.fn();
13
- const { getByLabelText } = render(_jsx(TextArea, { label: "First name", onChange: callback }));
14
- await userEvent.type(getByLabelText("First name"), "John");
15
- expect(callback).toHaveBeenCalledWith("John");
16
- });
17
- it("focuses correctly via keyboard", async () => {
18
- const callbackFirstName = jest.fn();
19
- const callbackLastName = jest.fn();
20
- render(_jsxs(_Fragment, { children: [_jsx(TextArea, { label: "First name", onChange: callbackFirstName }), _jsx(TextArea, { label: "Last name", onChange: callbackLastName })] }));
21
- await userEvent.tab();
22
- await userEvent.type(document.activeElement, "John");
23
- expect(callbackFirstName).toHaveBeenCalledWith("John");
24
- await userEvent.tab();
25
- await userEvent.type(document.activeElement, "Doe");
26
- expect(callbackLastName).toHaveBeenCalledWith("Doe");
27
- });
28
- it("handles hover events correctly", async () => {
29
- const callback = jest.fn();
30
- const { getByLabelText } = render(_jsx(TextArea, { label: "First name", onHoverChange: callback }));
31
- await userEvent.hover(getByLabelText("First name"));
32
- expect(callback).toHaveBeenCalledWith(true);
33
- await userEvent.unhover(getByLabelText("First name"));
34
- expect(callback).toHaveBeenCalledWith(false);
35
- });
36
- describe("with errors", () => {
37
- it("should render the error", () => {
38
- const { getByText } = render(_jsx(TextArea, { label: "Message", name: "message", errorMessage: "Required" }));
39
- expect(getByText("Required")).toBeTruthy();
40
- });
41
- it("should set aria-invalid to true", () => {
42
- const { getByLabelText } = render(_jsx(TextArea, { label: "Message", name: "message", errorMessage: "Required" }));
43
- expect(getByLabelText("Message")).toHaveAccessibleDescription("Required");
44
- });
45
- it("should set the correct aria-describedby attribute", () => {
46
- const { getByLabelText } = render(_jsx(TextArea, { label: "Message", name: "message", errorMessage: "Required" }));
47
- expect(getByLabelText("Message")).toHaveAccessibleDescription("Required");
48
- });
49
- });
50
- describe("uses correct class names", () => {
51
- it("uses Mobius class", () => {
52
- render(_jsx(TextArea, { label: "Test", "data-testid": "test" }));
53
- expect(screen.getByTestId("test").closest("div")).toHaveClass("mobius");
54
- });
55
- it("uses base Mobius class", () => {
56
- render(_jsx(TextArea, { label: "Test", "data-testid": "test" }));
57
- expect(screen.getByTestId("test").closest("div")).toHaveClass(CLASS_NAME);
58
- });
59
- it("includes custom class name", () => {
60
- render(_jsx(TextArea, { label: "Message", name: "message", "data-testid": "test", className: "my-class" }));
61
- expect(screen.getByTestId("test").closest("div")).toHaveClass("my-class");
62
- expect(screen.getByTestId("test").closest("div")).toHaveClass(CLASS_NAME);
63
- });
64
- it("includes disabled class name", () => {
65
- render(_jsx(TextArea, { label: "Test", "data-testid": "test", isDisabled: true }));
66
- expect(screen.getByTestId("test")).toHaveClass("--is-disabled");
67
- });
68
- it("includes valid class name", () => {
69
- render(_jsx(TextArea, { label: "Test", "data-testid": "test", validationState: "valid" }));
70
- expect(screen.getByTestId("test")).toHaveClass("--is-valid");
71
- });
72
- it("includes invalid class name", () => {
73
- render(_jsx(TextArea, { label: "Test", "data-testid": "test", validationState: "invalid" }));
74
- expect(screen.getByTestId("test")).toHaveClass("--is-invalid");
75
- });
76
- });
77
- describe("when disabled", () => {
78
- it("has disabled attribute set on textarea field", () => {
79
- render(_jsx(TextArea, { label: "Test", "data-testid": "test", isDisabled: true }));
80
- expect(screen.getByTestId("test")).toBeDisabled();
81
- });
82
- });
83
- });
84
- //# sourceMappingURL=TextArea.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextArea.test.js","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAE7B,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAC,YAAY,GAAG,CAAC,CAAC;QAC1D,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAC/B,KAAC,QAAQ,IAAC,KAAK,EAAC,YAAY,EAAC,QAAQ,EAAE,QAAQ,GAAI,CACpD,CAAC;QACF,MAAM,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;QAC3D,MAAM,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,MAAM,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AAE;YACnC,MAAM,CACJ,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,iBAAa,MAAM,EAAC,eAAe,EAAC,OAAO,GAAG,CACrE,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,CACJ,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,iBAAa,MAAM,EAAC,eAAe,EAAC,SAAS,GAAG,CACvE,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;YACtD,MAAM,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,iBAAa,MAAM,EAAC,UAAU,SAAG,CAAC,CAAC;YAChE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,42 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render, screen } from "@testing-library/react";
3
- import { TextAreaInput } from ".";
4
- const CLASS_NAME = "mobius/TextAreaInput";
5
- describe("TextAreaInput", () => {
6
- it("should render without errors", () => {
7
- render(_jsx(TextAreaInput, {}));
8
- });
9
- describe("uses correct class names", () => {
10
- it("uses Mobius class", () => {
11
- render(_jsx(TextAreaInput, { "aria-label": "test" }));
12
- expect(screen.getByLabelText("test")).toHaveClass("mobius");
13
- });
14
- it("uses base Mobius class", () => {
15
- render(_jsx(TextAreaInput, { "aria-label": "test" }));
16
- expect(screen.getByLabelText("test")).toHaveClass(CLASS_NAME);
17
- });
18
- it("includes hovered class name", () => {
19
- render(_jsx(TextAreaInput, { "aria-label": "test", isHovered: true }));
20
- // fireEvent.mouseOver(screen.getByLabelText("test"));
21
- expect(screen.getByLabelText("test")).toHaveClass("--is-hovered");
22
- });
23
- it("includes focused-visible class name", () => {
24
- render(_jsx(TextAreaInput, { "aria-label": "test", isFocusVisible: true }));
25
- expect(screen.getByLabelText("test")).toHaveClass("--is-focused");
26
- });
27
- it("includes disabled class name", () => {
28
- render(_jsx(TextAreaInput, { "aria-label": "test", isDisabled: true }));
29
- expect(screen.getByLabelText("test")).toHaveClass("--is-disabled");
30
- });
31
- it("includes selected class name", () => {
32
- render(_jsx(TextAreaInput, { "aria-label": "test", isSelected: true }));
33
- expect(screen.getByLabelText("test")).toHaveClass("--is-selected");
34
- });
35
- it("includes custom class name", () => {
36
- render(_jsx(TextAreaInput, { "aria-label": "test", className: "my-class" }));
37
- expect(screen.getByLabelText("test")).toHaveClass("my-class");
38
- expect(screen.getByLabelText("test")).toHaveClass(CLASS_NAME);
39
- });
40
- });
41
- });
42
- //# sourceMappingURL=TextAreaInput.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextAreaInput.test.js","sourceRoot":"","sources":["../../../../src/components/TextAreaInput/TextAreaInput.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAElC,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAE1C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAA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AAE;YACtC,MAAM,CAAC,KAAC,aAAa,kBAAY,MAAM,EAAC,UAAU,SAAG,CAAC,CAAC;YACvD,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;YACpC,MAAM,CAAC,KAAC,aAAa,kBAAY,MAAM,EAAC,SAAS,EAAC,UAAU,GAAG,CAAC,CAAC;YACjE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC9D,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,103 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { TextField } from "./TextField";
3
- import { excludeControls } from "../../utils/excludeControls";
4
- import { Segment, SegmentGroup } from "../Segment";
5
- export default {
6
- title: "Forms/TextField",
7
- component: TextField,
8
- excludeStories: ["ExampleHorizontal"],
9
- argTypes: Object.assign({ validationState: {
10
- options: ["valid", "invalid", "neither"],
11
- control: { type: "radio" },
12
- mapping: {
13
- valid: "valid",
14
- invalid: "invalid",
15
- neither: "",
16
- },
17
- }, type: {
18
- options: ["text", "password", "email", "tel", "url", "hidden"],
19
- control: { type: "radio" },
20
- } }, excludeControls("className")),
21
- args: {
22
- isRequired: false,
23
- },
24
- };
25
- export const Normal = {
26
- render: (args) => _jsx(TextField, Object.assign({}, args)),
27
- args: {
28
- label: "First name",
29
- placeholder: "",
30
- type: "text",
31
- isDisabled: false,
32
- errorMessage: "",
33
- },
34
- };
35
- export const Placeholder = {
36
- render: (args) => _jsx(TextField, Object.assign({}, args)),
37
- args: {
38
- label: "Email",
39
- placeholder: "email@example.com",
40
- type: "text",
41
- isDisabled: false,
42
- errorMessage: "",
43
- },
44
- };
45
- export const ControlledValue = {
46
- render: (args) => _jsx(TextField, Object.assign({}, args)),
47
- args: {
48
- label: "First name",
49
- placeholder: "",
50
- defaultValue: "john.doe@email.com",
51
- type: "text",
52
- isDisabled: false,
53
- errorMessage: "",
54
- },
55
- };
56
- export const Disabled = {
57
- render: (args) => _jsx(TextField, Object.assign({}, args)),
58
- args: {
59
- label: "First name",
60
- placeholder: "",
61
- defaultValue: "john.doe@email.com",
62
- type: "text",
63
- isDisabled: true,
64
- errorMessage: "",
65
- },
66
- };
67
- export const Valid = {
68
- render: (args) => _jsx(TextField, Object.assign({}, args)),
69
- args: {
70
- label: "First name",
71
- placeholder: "",
72
- defaultValue: "john.doe@email.com",
73
- type: "text",
74
- isDisabled: false,
75
- validationState: "valid",
76
- errorMessage: "",
77
- },
78
- };
79
- export const Hidden = {
80
- render: (args) => _jsx(TextField, Object.assign({}, args)),
81
- args: {
82
- label: "Secret",
83
- placeholder: "",
84
- defaultValue: "",
85
- type: "hidden",
86
- isDisabled: false,
87
- errorMessage: "",
88
- },
89
- };
90
- export const Invalid = {
91
- render: (args) => _jsx(TextField, Object.assign({}, args)),
92
- args: {
93
- label: "First name",
94
- placeholder: "",
95
- defaultValue: "john.doe@email.com",
96
- type: "text",
97
- isDisabled: false,
98
- validationState: "invalid",
99
- errorMessage: "This is an error message",
100
- },
101
- };
102
- export const ExampleHorizontal = () => (_jsxs(SegmentGroup, Object.assign({ horizontal: true }, { children: [_jsx(Segment, { children: _jsx(TextField, { label: "First name" }) }), _jsx(Segment, { children: _jsx(TextField, { label: "Last name" }) })] })));
103
- //# sourceMappingURL=TextField.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextField.stories.js","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAkB,MAAM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YAAY,EAAE,EAAE;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC7C,MAAM,EAAE,CAAC,IAAoB,EAAE,EAAE,CAAC,KAAC,SAAS,oBAAK,IAAI,EAAI;IACzD,IAAI,EAAE;QACJ,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,oBAAoB;QAClC,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,KAAK;QACjB,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE,0BAA0B;KACzC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,CACrC,MAAC,YAAY,kBAAC,UAAU,uBACtB,KAAC,OAAO,cACN,KAAC,SAAS,IAAC,KAAK,EAAC,YAAY,GAAG,GACxB,EACV,KAAC,OAAO,cACN,KAAC,SAAS,IAAC,KAAK,EAAC,WAAW,GAAG,GACvB,KACG,CAChB,CAAC"}
@@ -1,123 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { fireEvent, render, screen } from "@testing-library/react";
3
- import userEvent from "@testing-library/user-event";
4
- import { TextField } from ".";
5
- const WRAPPER_CLASS_NAME = "mobius/TextField";
6
- const INPUT_CLASS_NAME = "mobius/TextInput";
7
- describe("Test for TextField", () => {
8
- it("should render without errors", () => {
9
- render(_jsx(TextField, { label: "First name", "data-testid": "textfield" }));
10
- expect(screen.getByTestId("textfield")).toHaveAttribute("type", "text");
11
- });
12
- it("can be hidden", () => {
13
- render(_jsx(TextField, { label: "Secret Value", type: "hidden", value: "SECRET", "data-testid": "test" }));
14
- expect(screen.getByTestId("test")).toHaveAttribute("type", "hidden");
15
- expect(screen.getByTestId("test")).toHaveAttribute("value", "SECRET");
16
- expect(screen.getByTestId("test")).toHaveAttribute("aria-label", "Secret Value");
17
- });
18
- it("correctly passes on type attribute", () => {
19
- render(_jsx(TextField, { label: "Secret Value", type: "password", value: "SECRET", "data-testid": "test" }));
20
- expect(screen.getByTestId("test")).toHaveAttribute("type", "password");
21
- });
22
- describe("isRequired", () => {
23
- it("should set aria-required to true", () => {
24
- render(_jsx(TextField, { label: "First name", isRequired: true }));
25
- expect(screen.getByLabelText("First name")).toHaveAttribute("aria-required", "true");
26
- });
27
- it("should have className of --is-required when true", () => {
28
- render(_jsx(TextField, { label: "First name", isRequired: true }));
29
- expect(screen.getByLabelText("First name")).toHaveClass("--is-required");
30
- });
31
- it("should have className of --is-optional when false", () => {
32
- render(_jsx(TextField, { label: "First name", isRequired: false }));
33
- expect(screen.getByLabelText("First name")).toHaveClass("--is-optional");
34
- });
35
- it("should have neither --is-required nor --is-optional when unset", () => {
36
- render(_jsx(TextField, { label: "First name" }));
37
- expect(screen.getByLabelText("First name")).not.toHaveClass("--is-required");
38
- expect(screen.getByLabelText("First name")).not.toHaveClass("--is-optional");
39
- });
40
- });
41
- describe("uses correct class names", () => {
42
- describe("for container", () => {
43
- it("uses Mobius class", () => {
44
- const { container } = render(_jsx(TextField, { label: "TextField", "data-testid": "test" }));
45
- expect(container.firstChild).toHaveClass("mobius");
46
- });
47
- it("uses base Mobius class", () => {
48
- const { container } = render(_jsx(TextField, { label: "TextField", "data-testid": "test" }));
49
- expect(container.firstChild).toHaveClass(WRAPPER_CLASS_NAME);
50
- });
51
- it("includes disabled class name", () => {
52
- const { container } = render(_jsx(TextField, { label: "TextField", "data-testid": "test", isDisabled: true }));
53
- expect(container.firstChild).toHaveClass("--is-disabled");
54
- });
55
- it("includes valid class name", () => {
56
- const { container } = render(_jsx(TextField, { label: "TextField", "data-testid": "test", validationState: "valid" }));
57
- expect(container.firstChild).toHaveClass("--is-valid");
58
- });
59
- it("includes invalid class name", () => {
60
- const { container } = render(_jsx(TextField, { label: "TextField", "data-testid": "test", validationState: "invalid" }));
61
- expect(container.firstChild).toHaveClass("--is-invalid");
62
- });
63
- it("includes custom class name", () => {
64
- const { container } = render(_jsx(TextField, { label: "TextField", "data-testid": "test", className: "my-class" }));
65
- expect(container.firstChild).toHaveClass("my-class");
66
- });
67
- });
68
- describe("for input", () => {
69
- it("uses Mobius class", () => {
70
- render(_jsx(TextField, { label: "TextField", "data-testid": "test" }));
71
- expect(screen.getByTestId("test")).toHaveClass("mobius");
72
- });
73
- it("uses base Mobius class", () => {
74
- render(_jsx(TextField, { label: "TextField", "data-testid": "test" }));
75
- expect(screen.getByTestId("test")).toHaveClass(INPUT_CLASS_NAME);
76
- });
77
- it("includes disabled class name and attribute", () => {
78
- render(_jsx(TextField, { label: "TextField", "data-testid": "test", isDisabled: true }));
79
- const inputField = screen.getByTestId("test");
80
- expect(inputField).toBeDisabled();
81
- expect(screen.getByLabelText("TextField")).toHaveClass("--is-disabled");
82
- });
83
- it("includes valid class name", () => {
84
- render(_jsx(TextField, { label: "TextField", validationState: "valid" }));
85
- expect(screen.getByLabelText("TextField")).toHaveClass("--is-valid");
86
- });
87
- it("includes invalid class name", () => {
88
- render(_jsx(TextField, { label: "TextField", validationState: "invalid" }));
89
- expect(screen.getByLabelText("TextField")).toHaveClass("--is-invalid");
90
- });
91
- it("includes hovered class name", async () => {
92
- render(_jsx(TextField, { label: "TextField", "data-testid": "test" }));
93
- const input = screen.getByTestId("test");
94
- await fireEvent.mouseEnter(input);
95
- expect(input).toHaveClass("--is-hovered");
96
- });
97
- it("includes focused-visible class name", async () => {
98
- render(_jsx(TextField, { label: "TextField", "data-testid": "test" }));
99
- await userEvent.tab();
100
- expect(screen.getByTestId("test")).toHaveClass("--is-focused");
101
- });
102
- it("includes custom class name", () => {
103
- render(_jsx(TextField, { label: "TextField", "data-testid": "test", className: "my-class" }));
104
- expect(screen.getByTestId("test")).toHaveClass("my-class");
105
- });
106
- });
107
- });
108
- describe("with errors", () => {
109
- it("should render the error", () => {
110
- const { getByText } = render(_jsx(TextField, { label: "Name", name: "name", errorMessage: "Required" }));
111
- expect(getByText("Required")).toBeTruthy();
112
- });
113
- it("should set aria-invalid to true", () => {
114
- const { getByLabelText } = render(_jsx(TextField, { label: "Name", name: "name", errorMessage: "Required" }));
115
- expect(getByLabelText("Name").getAttribute("aria-invalid")).toBeTruthy();
116
- });
117
- it("should set the correct aria-describedby attribute", () => {
118
- const { getByLabelText } = render(_jsx(TextField, { label: "Name", name: "name", errorMessage: "Required" }));
119
- expect(getByLabelText("Name")).toHaveAccessibleDescription("Required");
120
- });
121
- });
122
- });
123
- //# sourceMappingURL=TextField.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextField.test.js","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAE9B,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAC9C,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,KAAC,SAAS,IAAC,KAAK,EAAC,YAAY,iBAAa,WAAW,GAAG,CAAC,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACvB,MAAM,CACJ,KAAC,SAAS,IACR,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,QAAQ,iBACF,MAAM,GAClB,CACH,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACrE,MAAM,CAAC,MAAM,CAAC,WAAW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,EAAC,UAAU,GAAG,CAC/D,CAAC;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;YACzC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAC/B,KAAC,SAAS,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,YAAY,EAAC,UAAU,GAAG,CAC/D,CAAC;YACF,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QAC3E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAC/B,KAAC,SAAS,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,YAAY,EAAC,UAAU,GAAG,CAC/D,CAAC;YACF,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Title } from "./Title";
3
- import { excludeControls } from "../../utils/excludeControls";
4
- export default {
5
- title: "Components/Title",
6
- component: Title,
7
- argTypes: excludeControls("className", "elementType"),
8
- };
9
- export const Normal = {
10
- render: (args) => _jsx(Title, Object.assign({}, args)),
11
- args: {
12
- title: "General Liability",
13
- description: "Business Co.",
14
- },
15
- };
16
- //# sourceMappingURL=Title.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Title.stories.js","sourceRoot":"","sources":["../../../../src/components/Title/Title.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAc,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,eAAe,CAAC,WAAW,EAAE,aAAa,CAAC;CACtD,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,MAAM,EAAE,CAAC,IAAgB,EAAE,EAAE,CAAC,KAAC,KAAK,oBAAK,IAAI,EAAI;IACjD,IAAI,EAAE;QACJ,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,cAAc;KAC5B;CACF,CAAC"}
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render, screen } from "@testing-library/react";
3
- import { Title } from ".";
4
- describe("Title", () => {
5
- it("should render the correct title", () => {
6
- render(_jsx(Title, { title: "General Liability", description: "Business Co." }));
7
- expect(screen.getByText("General Liability")).toBeInTheDocument();
8
- });
9
- it("should render the correct description", () => {
10
- render(_jsx(Title, { title: "General Liability", description: "Business Co." }));
11
- expect(screen.getByText("Business Co.")).toBeInTheDocument();
12
- });
13
- describe("given elementType", () => {
14
- it("is not applied as element attribute", () => {
15
- const { container } = render(_jsx(Title, { title: "General Liability", description: "Business Co.", elementType: "ul" }));
16
- expect(container.firstChild).not.toHaveAttribute("elementtype", "ul");
17
- });
18
- });
19
- });
20
- //# sourceMappingURL=Title.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Title.test.js","sourceRoot":"","sources":["../../../../src/components/Title/Title.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,KAAC,KAAK,IAAC,KAAK,EAAC,mBAAmB,EAAC,WAAW,EAAC,cAAc,GAAG,CAAC,CAAC;QAEvE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,KAAC,KAAK,IAAC,KAAK,EAAC,mBAAmB,EAAC,WAAW,EAAC,cAAc,GAAG,CAAC,CAAC;QAEvE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACjC,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC7C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,KAAC,KAAK,IACJ,KAAK,EAAC,mBAAmB,EACzB,WAAW,EAAC,cAAc,EAC1B,WAAW,EAAC,IAAI,GAChB,CACH,CAAC;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { VisuallyHidden } from ".";
3
- import { excludeControls } from "../../utils/excludeControls";
4
- export default {
5
- title: "Components/VisuallyHidden",
6
- component: VisuallyHidden,
7
- argTypes: excludeControls("className", "elementType"),
8
- };
9
- export const Normal = {
10
- render: (args) => (_jsx(VisuallyHidden, Object.assign({}, args, { children: "This will only be visible to screen readers." }))),
11
- };
12
- //# sourceMappingURL=VisuallyHidden.stories.js.map