@autoguru/overdrive 4.34.0 → 4.35.1

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 (240) hide show
  1. package/dist/components/Alert/Alert.js +1 -2
  2. package/dist/components/Anchor/Anchor.js +3 -4
  3. package/dist/components/AutoSuggest/AutoSuggest.css.js +3 -3
  4. package/dist/components/AutoSuggest/AutoSuggest.d.ts.map +1 -1
  5. package/dist/components/AutoSuggest/AutoSuggest.js +8 -9
  6. package/dist/components/Box/Box.js +2 -2
  7. package/dist/components/Box/argTypes.d.ts.map +1 -1
  8. package/dist/components/Box/argTypes.js +2 -2
  9. package/dist/components/Box/useBoxStyles.css.d.ts +1 -1
  10. package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -1
  11. package/dist/components/Box/useBoxStyles.css.js +5 -11
  12. package/dist/components/BulletList/Bullet.css.js +3 -3
  13. package/dist/components/BulletList/Bullet.d.ts.map +1 -1
  14. package/dist/components/BulletList/Bullet.js +12 -4
  15. package/dist/components/BulletText/BulletText.js +1 -2
  16. package/dist/components/Button/Button.css.js +21 -21
  17. package/dist/components/Button/Button.js +3 -5
  18. package/dist/components/CheckBox/CheckBox.css.js +3 -3
  19. package/dist/components/CheckBox/CheckBox.js +1 -2
  20. package/dist/components/ColourInput/ColourInput.css.js +2 -2
  21. package/dist/components/ColourInput/ColourInput.js +3 -4
  22. package/dist/components/Columns/Column.css.js +1 -1
  23. package/dist/components/Columns/Column.js +2 -2
  24. package/dist/components/Columns/Columns.js +2 -2
  25. package/dist/components/DateInput/DateInput.js +2 -2
  26. package/dist/components/DatePicker/DatePicker.js +3 -4
  27. package/dist/components/DividerLine/DividerLine.d.ts +1 -1
  28. package/dist/components/DividerLine/DividerLine.d.ts.map +1 -1
  29. package/dist/components/DividerLine/DividerLine.js +1 -1
  30. package/dist/components/DropDown/DropDown.js +3 -5
  31. package/dist/components/DropDown/DropDownOption.css.js +2 -2
  32. package/dist/components/DropDown/DropDownOption.js +3 -4
  33. package/dist/components/EditableText/EditableText.css.js +1 -1
  34. package/dist/components/EditableText/EditableText.d.ts.map +1 -1
  35. package/dist/components/EditableText/EditableText.js +5 -6
  36. package/dist/components/FillHeightBox/FillHeightBox.js +2 -2
  37. package/dist/components/Flyout/Flyout.js +2 -2
  38. package/dist/components/Heading/Heading.d.ts +2 -0
  39. package/dist/components/Heading/Heading.d.ts.map +1 -1
  40. package/dist/components/Heading/Heading.js +3 -1
  41. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +1 -1
  42. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +1 -1
  43. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
  44. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +5 -7
  45. package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.d.ts.map +1 -1
  46. package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.js +5 -9
  47. package/dist/components/Image/Image.js +2 -2
  48. package/dist/components/Image/ImageServerProvider.js +9 -8
  49. package/dist/components/Image/ResponsiveImage.js +2 -2
  50. package/dist/components/Image/SimpleImage.js +2 -2
  51. package/dist/components/Inline/Inline.js +1 -3
  52. package/dist/components/LoadingBox/LoadingBox.js +3 -3
  53. package/dist/components/Meta/Meta.js +2 -3
  54. package/dist/components/MinimalModal/MinimalModal.js +2 -2
  55. package/dist/components/Modal/Modal.css.js +1 -1
  56. package/dist/components/Modal/Modal.d.ts.map +1 -1
  57. package/dist/components/Modal/Modal.js +16 -9
  58. package/dist/components/NumberBubble/NumberBubble.js +2 -2
  59. package/dist/components/NumberInput/NumberInput.js +3 -3
  60. package/dist/components/OrderedList/OrderedList.css.js +1 -1
  61. package/dist/components/OutsideClick/OutsideClick.js +1 -1
  62. package/dist/components/Pagination/Pagination.css.js +6 -6
  63. package/dist/components/Pagination/Pagination.js +1 -2
  64. package/dist/components/Positioner/Positioner.d.ts.map +1 -1
  65. package/dist/components/Positioner/Positioner.js +17 -7
  66. package/dist/components/Positioner/alignment.js +3 -3
  67. package/dist/components/ProgressBar/ProgressBar.css.js +1 -1
  68. package/dist/components/ProgressBar/ProgressBar.js +1 -1
  69. package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +1 -1
  70. package/dist/components/ProgressBarGroup/ProgressBarGroup.js +2 -3
  71. package/dist/components/Radio/Radio.css.js +4 -4
  72. package/dist/components/Radio/Radio.js +1 -2
  73. package/dist/components/ScrollPane/ScrollPane.css.js +3 -3
  74. package/dist/components/ScrollPane/ScrollPane.js +2 -2
  75. package/dist/components/SelectInput/SelectInput.css.js +3 -3
  76. package/dist/components/SelectInput/SelectInput.d.ts +1 -1
  77. package/dist/components/SelectInput/SelectInput.d.ts.map +1 -1
  78. package/dist/components/SelectInput/SelectInput.js +5 -5
  79. package/dist/components/SimplePagination/SimplePagination.js +4 -5
  80. package/dist/components/SliderProgress/ProgressStep.js +1 -2
  81. package/dist/components/SliderProgress/SliderProgress.css.js +1 -1
  82. package/dist/components/SliderProgress/SliderProgress.js +1 -1
  83. package/dist/components/Stack/Divider.css.js +1 -1
  84. package/dist/components/Stack/Stack.js +1 -3
  85. package/dist/components/StandardModal/StandardModal.css.js +8 -8
  86. package/dist/components/StandardModal/StandardModal.js +4 -5
  87. package/dist/components/StarRating/StarRating.js +7 -8
  88. package/dist/components/Stepper/Stepper.css.js +4 -4
  89. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  90. package/dist/components/Stepper/Stepper.js +19 -10
  91. package/dist/components/StickyBox/StickyBox.css.js +4 -4
  92. package/dist/components/StickyBox/StickyBox.js +3 -3
  93. package/dist/components/Switch/Switch.css.js +18 -18
  94. package/dist/components/Switch/Switch.js +4 -5
  95. package/dist/components/Table/TableCell.css.js +1 -1
  96. package/dist/components/Table/TableHeadCell.css.js +5 -5
  97. package/dist/components/Table/TableHeadCell.js +1 -2
  98. package/dist/components/Tabs/Tab.css.js +4 -4
  99. package/dist/components/Tabs/Tab.js +2 -3
  100. package/dist/components/Tabs/TabList.css.js +1 -1
  101. package/dist/components/Tabs/TabList.js +1 -2
  102. package/dist/components/Tabs/TabPane.js +1 -1
  103. package/dist/components/Text/Text.d.ts +2 -0
  104. package/dist/components/Text/Text.d.ts.map +1 -1
  105. package/dist/components/Text/Text.js +4 -0
  106. package/dist/components/Text/useTextStyles.css.d.ts +1 -1
  107. package/dist/components/Text/useTextStyles.css.d.ts.map +1 -1
  108. package/dist/components/Text/useTextStyles.css.js +2 -2
  109. package/dist/components/TextAreaInput/TextAreaInput.js +2 -2
  110. package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
  111. package/dist/components/TextBubble/TextBubble.js +14 -6
  112. package/dist/components/TextContainer/TextContainer.js +1 -2
  113. package/dist/components/TextInput/TextInput.js +2 -2
  114. package/dist/components/TextLink/TextLink.css.js +4 -4
  115. package/dist/components/TextLink/TextLink.js +3 -4
  116. package/dist/components/ThemeOverrideProvider/ThemeOverrideDebugger.js +1 -2
  117. package/dist/components/ThemeOverrideProvider/ThemeOverrideProvider.js +2 -2
  118. package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.d.ts.map +1 -1
  119. package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.js +5 -3
  120. package/dist/components/Toaster/Toast.css.js +1 -1
  121. package/dist/components/Toaster/Toast.d.ts.map +1 -1
  122. package/dist/components/Toaster/Toast.js +24 -20
  123. package/dist/components/Tooltip/Tooltip.css.js +2 -2
  124. package/dist/components/Tooltip/Tooltip.js +1 -3
  125. package/dist/components/private/CheckableBase/CheckableBase.css.js +8 -8
  126. package/dist/components/private/CheckableBase/CheckableBase.js +1 -2
  127. package/dist/components/private/InputBase/HintText.css.js +1 -1
  128. package/dist/components/private/InputBase/NotchedBase.css.js +20 -20
  129. package/dist/components/private/InputBase/NotchedBase.js +1 -2
  130. package/dist/components/private/InputBase/withEnhancedInput.css.js +16 -16
  131. package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
  132. package/dist/components/private/InputBase/withEnhancedInput.js +3 -4
  133. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts +1 -1
  134. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts.map +1 -1
  135. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +5 -5
  136. package/dist/hooks/useMedia/useMedia.js +4 -4
  137. package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +2 -2
  138. package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +1 -1
  139. package/dist/hooks/useNullCheck/useNullCheck.js +1 -1
  140. package/dist/hooks/useWindowHeightFill/useWindowHeightFill.d.ts.map +1 -1
  141. package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +4 -3
  142. package/dist/reset/globalFonts.css.js +3 -3
  143. package/dist/reset/reset.css.js +2 -2
  144. package/dist/stories/helpers/index.d.ts +14 -0
  145. package/dist/stories/helpers/index.d.ts.map +1 -0
  146. package/dist/stories/helpers/styles.css.d.ts +28 -0
  147. package/dist/stories/helpers/styles.css.d.ts.map +1 -0
  148. package/dist/styles/sprinkles.css.d.ts +42 -0
  149. package/dist/styles/sprinkles.css.d.ts.map +1 -0
  150. package/dist/styles/sprinkles.css.js +81 -0
  151. package/dist/styles/stack.css.d.ts +19 -0
  152. package/dist/styles/stack.css.d.ts.map +1 -0
  153. package/dist/styles/stack.css.js +38 -0
  154. package/dist/themes/base/tokens.d.ts +2 -1
  155. package/dist/themes/base/tokens.d.ts.map +1 -1
  156. package/dist/themes/base/tokens.js +4 -4
  157. package/dist/themes/flat_red/tokens.js +2 -2
  158. package/dist/themes/helpers.d.ts.map +1 -1
  159. package/dist/themes/helpers.js +2 -2
  160. package/dist/themes/makeTheme.js +3 -3
  161. package/dist/themes/neutral/tokens.js +3 -3
  162. package/dist/themes/theme.css.js +2 -2
  163. package/dist/themes/tokens.d.ts +6 -6
  164. package/dist/themes/tokens.d.ts.map +1 -1
  165. package/dist/utils/css.js +1 -1
  166. package/dist/utils/index.d.ts +1 -1
  167. package/dist/utils/index.d.ts.map +1 -1
  168. package/dist/utils/index.js +6 -5
  169. package/dist/utils/mapTokenToProperty.js +2 -2
  170. package/dist/utils/number.js +1 -1
  171. package/dist/utils/responsiveProps.css.d.ts.map +1 -1
  172. package/dist/utils/responsiveProps.css.js +2 -2
  173. package/dist/utils/responsiveStyle.js +3 -3
  174. package/package.json +121 -27
  175. package/dist/components/Actions/stories.js +0 -53
  176. package/dist/components/Alert/stories.js +0 -106
  177. package/dist/components/Anchor/stories.js +0 -65
  178. package/dist/components/AutoSuggest/stories.js +0 -213
  179. package/dist/components/Badge/stories.js +0 -64
  180. package/dist/components/Box/stories.js +0 -43
  181. package/dist/components/BulletList/stories.js +0 -72
  182. package/dist/components/BulletText/stories.js +0 -88
  183. package/dist/components/Button/stories.js +0 -291
  184. package/dist/components/CheckBox/stories.js +0 -206
  185. package/dist/components/ColourInput/stories.js +0 -173
  186. package/dist/components/Columns/stories.js +0 -209
  187. package/dist/components/DateInput/stories.js +0 -181
  188. package/dist/components/DatePicker/stories.js +0 -89
  189. package/dist/components/DividerLine/stories.js +0 -117
  190. package/dist/components/DropDown/stories.js +0 -117
  191. package/dist/components/EditableText/stories.js +0 -84
  192. package/dist/components/FillHeightBox/stories.js +0 -47
  193. package/dist/components/Flyout/stories.js +0 -88
  194. package/dist/components/Heading/stories.js +0 -127
  195. package/dist/components/HorizontalAutoScroller/stories.js +0 -88
  196. package/dist/components/Icon/stories.js +0 -62
  197. package/dist/components/Image/stories.js +0 -183
  198. package/dist/components/Inline/stories.js +0 -122
  199. package/dist/components/IntentStripe/stories.js +0 -76
  200. package/dist/components/LinearProgressIndicator/stories.js +0 -26
  201. package/dist/components/LoadingBox/stories.js +0 -41
  202. package/dist/components/Meta/stories.js +0 -45
  203. package/dist/components/MinimalModal/stories.js +0 -83
  204. package/dist/components/Modal/stories.js +0 -52
  205. package/dist/components/NumberBubble/stories.js +0 -23
  206. package/dist/components/NumberInput/stories.js +0 -218
  207. package/dist/components/OrderedList/stories.js +0 -58
  208. package/dist/components/OutsideClick/stories.js +0 -39
  209. package/dist/components/Pagination/stories.js +0 -112
  210. package/dist/components/Portal/stories.js +0 -72
  211. package/dist/components/Positioner/stories.js +0 -124
  212. package/dist/components/ProgressBar/stories.js +0 -44
  213. package/dist/components/ProgressBarGroup/stories.js +0 -21
  214. package/dist/components/ProgressSpinner/stories.js +0 -36
  215. package/dist/components/Radio/stories.js +0 -215
  216. package/dist/components/ScrollPane/stories.js +0 -55
  217. package/dist/components/Section/stories.js +0 -43
  218. package/dist/components/SelectInput/stories.js +0 -188
  219. package/dist/components/SimplePagination/stories.js +0 -42
  220. package/dist/components/SliderProgress/stories.js +0 -44
  221. package/dist/components/Stack/stories.js +0 -75
  222. package/dist/components/StandardModal/stories.js +0 -62
  223. package/dist/components/StarRating/stories.js +0 -50
  224. package/dist/components/Stepper/stories.js +0 -61
  225. package/dist/components/StickyBox/stories.js +0 -70
  226. package/dist/components/Switch/stories.js +0 -42
  227. package/dist/components/Table/stories.js +0 -302
  228. package/dist/components/Tabs/stories.js +0 -253
  229. package/dist/components/Text/stories.js +0 -154
  230. package/dist/components/TextAreaInput/stories.js +0 -129
  231. package/dist/components/TextBubble/stories.js +0 -30
  232. package/dist/components/TextContainer/stories.js +0 -128
  233. package/dist/components/TextInput/stories.js +0 -260
  234. package/dist/components/TextLink/stories.js +0 -111
  235. package/dist/components/Toaster/stories.js +0 -59
  236. package/dist/components/Tooltip/stories.js +0 -90
  237. package/dist/components/VisuallyHidden/stories.js +0 -36
  238. package/dist/hooks/useAttachedBoxes/stories.js +0 -94
  239. package/dist/hooks/useMedia/stories.js +0 -46
  240. package/dist/hooks/useResponsiveValue/stories.js +0 -38
@@ -1,76 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import * as React from 'react';
7
- import { Box } from "../Box/index.js";
8
- import { IntentStripe } from "./index.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
- export default {
12
- title: 'Components/IntentStripe',
13
- component: IntentStripe,
14
- argTypes: {
15
- intent: {
16
- options: ['information', 'success', 'warning', 'danger'],
17
- defaultValue: 'primary',
18
- control: {
19
- type: 'select'
20
- }
21
- }
22
- }
23
- };
24
- const MyStripe = args => _jsx(Box, {
25
- position: "relative",
26
- width: "full",
27
- padding: "6",
28
- backgroundColour: "gray200",
29
- borderRadius: "1",
30
- overflow: "hidden",
31
- children: _jsx(IntentStripe, _objectSpread({}, args))
32
- });
33
- const template = args => _jsx(Box, {
34
- style: {
35
- display: 'grid',
36
- gridAutoFlow: 'row dense',
37
- gridGap: '24px',
38
- width: '100%'
39
- },
40
- children: _jsx(MyStripe, _objectSpread({}, args))
41
- });
42
- const templateAllIntents = args => _jsxs(Box, {
43
- style: {
44
- display: 'grid',
45
- gridAutoFlow: 'row dense',
46
- gridGap: '24px',
47
- width: '100%'
48
- },
49
- children: [_jsx(MyStripe, _objectSpread(_objectSpread({}, args), {}, {
50
- intent: "success"
51
- })), _jsx(MyStripe, _objectSpread(_objectSpread({}, args), {}, {
52
- intent: "warning"
53
- })), _jsx(MyStripe, _objectSpread(_objectSpread({}, args), {}, {
54
- intent: "danger"
55
- })), _jsx(MyStripe, _objectSpread(_objectSpread({}, args), {}, {
56
- intent: "information"
57
- }))]
58
- });
59
- const standardProps = {
60
- intent: void 0,
61
- className: void 0
62
- };
63
- export const Standard = template.bind(standardProps);
64
- Standard.args = standardProps;
65
- export const StandardAllIntents = templateAllIntents.bind(standardProps);
66
- StandardAllIntents.args = standardProps;
67
- const inlineProps = _objectSpread(_objectSpread({}, standardProps), {}, {
68
- inline: true
69
- });
70
- export const InlineAllIntents = templateAllIntents.bind(inlineProps);
71
- InlineAllIntents.args = inlineProps;
72
- const noneDismissibleProps = _objectSpread(_objectSpread({}, standardProps), {}, {
73
- dismissible: false
74
- });
75
- export const NoneDismissibleAllIntents = templateAllIntents.bind(noneDismissibleProps);
76
- NoneDismissibleAllIntents.args = noneDismissibleProps;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import * as React from 'react';
7
- import { LinearProgressIndicator } from "./index.js";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- export default {
10
- title: 'Components/Progress/Linear',
11
- component: LinearProgressIndicator,
12
- decorators: [story => _jsx("div", {
13
- style: {
14
- width: '100%',
15
- height: '100%'
16
- },
17
- children: story()
18
- })],
19
- parameters: {
20
- chromatic: {
21
- disable: true
22
- }
23
- }
24
- };
25
- const Template = args => _jsx(LinearProgressIndicator, _objectSpread({}, args));
26
- export const standard = Template.bind({});
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import * as React from 'react';
7
- import { boxArgTypes } from "../Box/argTypes.js";
8
- import { LoadingBox } from "./index.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- export default {
11
- title: 'Components/Loading/Box',
12
- component: LoadingBox,
13
- decorators: [story => _jsx("div", {
14
- style: {
15
- width: '50%',
16
- height: '100%',
17
- margin: '0 auto'
18
- },
19
- children: story()
20
- })],
21
- parameters: {
22
- chromatic: {
23
- disable: true
24
- }
25
- },
26
- argTypes: boxArgTypes
27
- };
28
- const Template = args => _jsx(LoadingBox, _objectSpread({}, args));
29
- const standardProps = {};
30
- export const standard = Template.bind(standardProps);
31
- standard.args = standardProps;
32
- const blinkingOffProps = {
33
- blinking: false
34
- };
35
- export const blinkingOff = Template.bind(blinkingOffProps);
36
- blinkingOff.args = blinkingOffProps;
37
- const randomWidthProps = {
38
- randomWidth: true
39
- };
40
- export const randomWidth = Template.bind(randomWidthProps);
41
- randomWidth.args = randomWidthProps;
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import { AccountEditIcon, AlertCircleIcon, CalendarIcon, CarMultipleIcon, CurrencyUsdIcon, PlusIcon, StarIcon } from '@autoguru/icons';
7
- import * as React from 'react';
8
- import { Meta } from "./index.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- const iconOptions = {
11
- CalendarIcon,
12
- AccountEditIcon,
13
- AlertCircleIcon,
14
- CarMultipleIcon,
15
- CurrencyUsdIcon,
16
- PlusIcon,
17
- StarIcon
18
- };
19
- export default {
20
- title: 'Components/Meta',
21
- component: Meta,
22
- argTypes: {
23
- icon: {
24
- options: iconOptions,
25
- control: {
26
- type: 'select'
27
- }
28
- }
29
- }
30
- };
31
- const Template = args => _jsx(Meta, _objectSpread({}, args));
32
- const standardProps = {
33
- variant: 'primary',
34
- icon: CalendarIcon,
35
- label: 'Hello World'
36
- };
37
- export const primary = Template.bind(standardProps);
38
- primary.args = standardProps;
39
- const secondaryProps = {
40
- variant: 'secondary',
41
- icon: CalendarIcon,
42
- label: 'Hello World'
43
- };
44
- export const secondary = Template.bind(secondaryProps);
45
- secondary.args = secondaryProps;
@@ -1,83 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import { action } from '@storybook/addon-actions';
7
- import * as React from 'react';
8
- import { Box } from "../Box/index.js";
9
- import { Text } from "../Text/index.js";
10
- import { MinimalModal } from "./index.js";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Fragment as _Fragment } from "react/jsx-runtime";
14
- const argTypes = {
15
- alignItems: {
16
- options: ['flexStart', 'center', 'flexEnd'],
17
- control: {
18
- type: 'select'
19
- }
20
- }
21
- };
22
- export default {
23
- title: 'Components/MinimalModal',
24
- component: MinimalModal,
25
- parameters: {
26
- chromatic: {
27
- disable: true
28
- }
29
- }
30
- };
31
- const Template = args => _jsxs(_Fragment, {
32
- children: [_jsx(MinimalModal, _objectSpread(_objectSpread({}, args), {}, {
33
- children: _jsxs(Box, {
34
- backgroundColour: "white",
35
- paddingX: "4",
36
- paddingY: "3",
37
- children: [_jsx(Text, {
38
- children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis convallis neque a laoreet maximus. Vestibulum hendrerit quam at mi venenatis faucibus at vel nisi. In ut risus et ipsum tincidunt tempor. Suspendisse potenti. Praesent faucibus posuere risus, at congue mauris porttitor ut. Donec sit amet elit vitae purus dictum aliquet quis ut ligula. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum dui sapien, porttitor ac erat vel, malesuada rutrum mauris. Nam arcu tellus, pretium ut aliquet eget, ultrices vel est. Maecenas dapibus volutpat eros a volutpat."
39
- }), _jsx("br", {}), _jsx(Text, {
40
- children: "Sed ante dui, sagittis sit amet tortor nec, egestas tincidunt mauris. Phasellus sed felis arcu. Etiam sit amet pharetra risus, a posuere magna. Pellentesque finibus arcu vitae orci luctus sagittis. Proin porta metus ut dapibus pharetra. Sed interdum mi et tristique aliquam. Curabitur finibus at dolor eu fermentum. Cras diam mauris, malesuada quis lacinia eu, porttitor at lectus. Duis pellentesque ante eget efficitur lacinia. Vivamus ornare venenatis tortor euismod imperdiet."
41
- }), _jsx("br", {}), _jsx(Text, {
42
- children: "Nulla condimentum iaculis nisi, quis lobortis ligula. Nulla tempus semper velit, id ullamcorper orci molestie vel. Sed maximus nisi ac risus malesuada, quis varius purus interdum. Donec volutpat dolor in euismod hendrerit. Integer posuere tortor sit amet turpis viverra euismod. Mauris scelerisque ex diam, eget sodales erat accumsan vel. Etiam interdum odio a tortor fermentum, molestie interdum tellus bibendum. Vivamus vitae pulvinar ante. Aenean convallis aliquam velit congue ultricies. Aenean vel blandit erat. Mauris quis auctor nibh. Morbi dui ipsum, lobortis non nisi vitae, convallis pulvinar nunc."
43
- }), _jsx("br", {}), _jsx(Text, {
44
- children: "Morbi mollis massa in eros tempus, ut venenatis ligula posuere. Nam ut ante lectus. Integer congue risus arcu, et ornare odio hendrerit eu. Mauris arcu ligula, interdum vitae consectetur vitae, volutpat a elit. Nulla luctus faucibus ipsum vitae maximus. Quisque in est nec libero commodo egestas. Donec faucibus, felis eget euismod facilisis, urna tortor molestie ex, eu eleifend leo tellus vel ligula. Mauris et urna massa. Integer ultrices massa commodo eleifend facilisis. Vestibulum dapibus magna cursus metus pellentesque tempor. Donec blandit elementum feugiat. Sed nec congue est."
45
- }), _jsx("br", {}), _jsx(Text, {
46
- children: "Nulla quam magna, aliquet et odio non, porta condimentum tellus. Maecenas fringilla sodales erat eu facilisis. Nunc rutrum purus quis diam tempus laoreet. Fusce gravida arcu et lectus ultricies suscipit. Quisque sagittis tempus diam, malesuada posuere lorem sagittis et. Duis eget eros nibh. Aenean at augue tincidunt nunc consequat porta."
47
- }), _jsx("br", {}), _jsx(Text, {
48
- children: "Nunc ac congue lacus, ac vulputate lectus. Suspendisse vel malesuada tellus. In nec fringilla elit. Cras vitae metus et leo convallis consectetur. Cras quis congue sapien, vitae aliquet ante. Integer sed lorem pretium, vestibulum arcu eu, imperdiet mauris. Nam blandit pharetra feugiat. Maecenas eget ante metus. Vivamus pretium ipsum justo, a faucibus ex dictum non. Vestibulum et dui diam."
49
- })]
50
- })
51
- })), _jsx(Text, {
52
- children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis convallis neque a laoreet maximus. Vestibulum hendrerit quam at mi venenatis faucibus at vel nisi. In ut risus et ipsum tincidunt tempor. Suspendisse potenti. Praesent faucibus posuere risus, at congue mauris porttitor ut. Donec sit amet elit vitae purus dictum aliquet quis ut ligula. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum dui sapien, porttitor ac erat vel, malesuada rutrum mauris. Nam arcu tellus, pretium ut aliquet eget, ultrices vel est. Maecenas dapibus volutpat eros a volutpat."
53
- }), _jsx("br", {}), _jsx(Text, {
54
- children: "Sed ante dui, sagittis sit amet tortor nec, egestas tincidunt mauris. Phasellus sed felis arcu. Etiam sit amet pharetra risus, a posuere magna. Pellentesque finibus arcu vitae orci luctus sagittis. Proin porta metus ut dapibus pharetra. Sed interdum mi et tristique aliquam. Curabitur finibus at dolor eu fermentum. Cras diam mauris, malesuada quis lacinia eu, porttitor at lectus. Duis pellentesque ante eget efficitur lacinia. Vivamus ornare venenatis tortor euismod imperdiet."
55
- }), _jsx("br", {}), _jsx(Text, {
56
- children: "Nulla condimentum iaculis nisi, quis lobortis ligula. Nulla tempus semper velit, id ullamcorper orci molestie vel. Sed maximus nisi ac risus malesuada, quis varius purus interdum. Donec volutpat dolor in euismod hendrerit. Integer posuere tortor sit amet turpis viverra euismod. Mauris scelerisque ex diam, eget sodales erat accumsan vel. Etiam interdum odio a tortor fermentum, molestie interdum tellus bibendum. Vivamus vitae pulvinar ante. Aenean convallis aliquam velit congue ultricies. Aenean vel blandit erat. Mauris quis auctor nibh. Morbi dui ipsum, lobortis non nisi vitae, convallis pulvinar nunc."
57
- })]
58
- });
59
- const standardProps = {
60
- isOpen: true,
61
- onRequestClose: action('onChange')
62
- };
63
- export const Standard = Template.bind(standardProps);
64
- Standard.args = standardProps;
65
- Standard.argTypes = argTypes;
66
- const pinnedToTopProps = _objectSpread(_objectSpread({}, standardProps), {}, {
67
- alignItems: 'flexStart'
68
- });
69
- export const PinnedToTop = Template.bind(pinnedToTopProps);
70
- PinnedToTop.args = pinnedToTopProps;
71
- PinnedToTop.argTypes = argTypes;
72
- const pinnedToTopCentreProps = _objectSpread(_objectSpread({}, standardProps), {}, {
73
- alignItems: 'center'
74
- });
75
- export const pinnedToTopCentre = Template.bind(pinnedToTopCentreProps);
76
- pinnedToTopCentre.args = pinnedToTopCentreProps;
77
- pinnedToTopCentre.argTypes = argTypes;
78
- const pinnedToTopBottomProps = _objectSpread(_objectSpread({}, standardProps), {}, {
79
- alignItems: 'flexEnd'
80
- });
81
- export const pinnedToTopBottom = Template.bind(pinnedToTopBottomProps);
82
- pinnedToTopBottom.args = pinnedToTopBottomProps;
83
- pinnedToTopBottom.argTypes = argTypes;
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import { action } from '@storybook/addon-actions';
7
- import * as React from 'react';
8
- import { Box } from "../Box/index.js";
9
- import { Text } from "../Text/index.js";
10
- import { Modal } from "./index.js";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
13
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export default {
15
- title: 'Utility/Modal',
16
- component: Modal,
17
- parameters: {
18
- chromatic: {
19
- disable: true
20
- }
21
- }
22
- };
23
- const Template = args => _jsxs(_Fragment, {
24
- children: [_jsx(Modal, _objectSpread(_objectSpread({}, args), {}, {
25
- children: _jsx(Box, {
26
- backgroundColour: "gray200",
27
- padding: "5",
28
- borderRadius: "2",
29
- children: _jsx("p", {
30
- children: "Hello, I am a modal body!"
31
- })
32
- })
33
- })), _jsx(Text, {
34
- children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis convallis neque a laoreet maximus. Vestibulum hendrerit quam at mi venenatis faucibus at vel nisi. In ut risus et ipsum tincidunt tempor. Suspendisse potenti. Praesent faucibus posuere risus, at congue mauris porttitor ut. Donec sit amet elit vitae purus dictum aliquet quis ut ligula. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum dui sapien, porttitor ac erat vel, malesuada rutrum mauris. Nam arcu tellus, pretium ut aliquet eget, ultrices vel est. Maecenas dapibus volutpat eros a volutpat."
35
- }), _jsx("br", {}), _jsx(Text, {
36
- children: "Sed ante dui, sagittis sit amet tortor nec, egestas tincidunt mauris. Phasellus sed felis arcu. Etiam sit amet pharetra risus, a posuere magna. Pellentesque finibus arcu vitae orci luctus sagittis. Proin porta metus ut dapibus pharetra. Sed interdum mi et tristique aliquam. Curabitur finibus at dolor eu fermentum. Cras diam mauris, malesuada quis lacinia eu, porttitor at lectus. Duis pellentesque ante eget efficitur lacinia. Vivamus ornare venenatis tortor euismod imperdiet."
37
- }), _jsx("br", {}), _jsx(Text, {
38
- children: "Nulla condimentum iaculis nisi, quis lobortis ligula. Nulla tempus semper velit, id ullamcorper orci molestie vel. Sed maximus nisi ac risus malesuada, quis varius purus interdum. Donec volutpat dolor in euismod hendrerit. Integer posuere tortor sit amet turpis viverra euismod. Mauris scelerisque ex diam, eget sodales erat accumsan vel. Etiam interdum odio a tortor fermentum, molestie interdum tellus bibendum. Vivamus vitae pulvinar ante. Aenean convallis aliquam velit congue ultricies. Aenean vel blandit erat. Mauris quis auctor nibh. Morbi dui ipsum, lobortis non nisi vitae, convallis pulvinar nunc."
39
- }), _jsx("br", {}), _jsx(Text, {
40
- children: "Morbi mollis massa in eros tempus, ut venenatis ligula posuere. Nam ut ante lectus. Integer congue risus arcu, et ornare odio hendrerit eu. Mauris arcu ligula, interdum vitae consectetur vitae, volutpat a elit. Nulla luctus faucibus ipsum vitae maximus. Quisque in est nec libero commodo egestas. Donec faucibus, felis eget euismod facilisis, urna tortor molestie ex, eu eleifend leo tellus vel ligula. Mauris et urna massa. Integer ultrices massa commodo eleifend facilisis. Vestibulum dapibus magna cursus metus pellentesque tempor. Donec blandit elementum feugiat. Sed nec congue est."
41
- }), _jsx("br", {}), _jsx(Text, {
42
- children: "Nulla quam magna, aliquet et odio non, porta condimentum tellus. Maecenas fringilla sodales erat eu facilisis. Nunc rutrum purus quis diam tempus laoreet. Fusce gravida arcu et lectus ultricies suscipit. Quisque sagittis tempus diam, malesuada posuere lorem sagittis et. Duis eget eros nibh. Aenean at augue tincidunt nunc consequat porta."
43
- }), _jsx("br", {}), _jsx(Text, {
44
- children: "Nunc ac congue lacus, ac vulputate lectus. Suspendisse vel malesuada tellus. In nec fringilla elit. Cras vitae metus et leo convallis consectetur. Cras quis congue sapien, vitae aliquet ante. Integer sed lorem pretium, vestibulum arcu eu, imperdiet mauris. Nam blandit pharetra feugiat. Maecenas eget ante metus. Vivamus pretium ipsum justo, a faucibus ex dictum non. Vestibulum et dui diam."
45
- })]
46
- });
47
- const standardProps = {
48
- isOpen: true,
49
- onRequestClose: action('onRequestClose')
50
- };
51
- export const standard = Template.bind(standardProps);
52
- standard.args = standardProps;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import * as React from 'react';
7
- import { NumberBubble } from "./index.js";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- export default {
10
- title: 'Foundation/Typography/NumberBubble',
11
- component: NumberBubble
12
- };
13
- const template = args => _jsx(NumberBubble, _objectSpread({}, args));
14
- const standardProps = {
15
- value: 0
16
- };
17
- export const standard = template.bind(standardProps);
18
- standard.args = standardProps;
19
- const bigNumberProps = {
20
- value: 2345
21
- };
22
- export const bigNumber = template.bind(bigNumberProps);
23
- bigNumber.args = bigNumberProps;
@@ -1,218 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- const _excluded = ["value", "onChange"];
6
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
- import { AccountEditIcon, AlertCircleIcon, CalendarIcon, CarIcon, CarMultipleIcon, CheckIcon, CurrencyUsdIcon, PlusIcon, StarIcon } from '@autoguru/icons';
9
- import { action } from '@storybook/addon-actions';
10
- import isChromatic from 'chromatic/isChromatic';
11
- import * as React from 'react';
12
- import { NumberInput } from "./index.js";
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- const meta = {
15
- title: 'Components/Inputs/Number',
16
- component: NumberInput,
17
- parameters: {
18
- chromatic: {}
19
- }
20
- };
21
- export default meta;
22
- const defaultValue = isChromatic() ? '42' : Math.round(Math.random() * 100).toString();
23
- const defaultPlaceholder = 'How many?';
24
- const iconOptions = {
25
- CalendarIcon,
26
- AccountEditIcon,
27
- AlertCircleIcon,
28
- CarMultipleIcon,
29
- CurrencyUsdIcon,
30
- PlusIcon,
31
- StarIcon,
32
- CheckIcon
33
- };
34
- const attachOptions = {
35
- NONE: 'NONE',
36
- TOP: 'TOP',
37
- RIGHT: 'RIGHT',
38
- LEFT: 'LEFT',
39
- BOTTOM: 'BOTTOM',
40
- ALL: 'ALL'
41
- };
42
- const argTypes = {
43
- prefixIcon: {
44
- defaultValue: null,
45
- description: 'Input prefix Icon',
46
- options: iconOptions,
47
- control: {
48
- type: 'select'
49
- }
50
- },
51
- attach: {
52
- defaultValue: 'NONE',
53
- description: 'Input attach',
54
- options: attachOptions,
55
- control: {
56
- type: 'select'
57
- }
58
- },
59
- suffixIcon: {
60
- defaultValue: null,
61
- description: 'Input suffix Icon',
62
- options: iconOptions,
63
- control: {
64
- type: 'select'
65
- }
66
- },
67
- maxLength: {
68
- defaultValue: null,
69
- description: 'Set the max length of the number',
70
- control: {
71
- type: 'number'
72
- }
73
- }
74
- };
75
- const Template = _ref => {
76
- let {
77
- value: initialValue,
78
- onChange: incomingOnChange
79
- } = _ref,
80
- args = _objectWithoutProperties(_ref, _excluded);
81
- const [value, setValue] = React.useState(initialValue);
82
- return _jsx(NumberInput, _objectSpread(_objectSpread({}, args), {}, {
83
- value: value,
84
- onChange: e => {
85
- setValue(e.currentTarget.value);
86
- incomingOnChange(e);
87
- }
88
- }));
89
- };
90
- const sharedProps = {
91
- disabled: false,
92
- name: 'number',
93
- value: '',
94
- placeholder: defaultPlaceholder,
95
- isValid: false,
96
- isTouched: false,
97
- isLoading: false,
98
- isFocused: false,
99
- reserveHintSpace: false,
100
- hintText: '',
101
- notch: true,
102
- preventMouseWheel: true,
103
- prefixIcon: null,
104
- onChange: action('onChange'),
105
- onFocus: action('onFocus'),
106
- onBlur: action('onBlur')
107
- };
108
- const standardProps = sharedProps;
109
- const withAValueProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
110
- value: defaultValue,
111
- placeholder: defaultPlaceholder
112
- });
113
- const withHintTextProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
114
- hintText: 'Hint Text',
115
- placeholder: defaultPlaceholder
116
- });
117
- const withPrefixIconProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
118
- prefixIcon: CalendarIcon
119
- });
120
- const withSuffixIconProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
121
- suffixIcon: AccountEditIcon
122
- });
123
- const withBothIconsProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
124
- prefixIcon: CalendarIcon,
125
- suffixIcon: AccountEditIcon
126
- });
127
- const disabledProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
128
- value: defaultValue,
129
- placeholder: defaultPlaceholder,
130
- disabled: true
131
- });
132
- const validProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
133
- value: defaultValue,
134
- placeholder: defaultPlaceholder,
135
- isTouched: true,
136
- isValid: true
137
- });
138
- const invalidProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
139
- value: '99',
140
- placeholder: defaultPlaceholder,
141
- isTouched: true,
142
- isValid: false,
143
- hintText: 'Required litres of oil is not valid'
144
- });
145
- const noNotchProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
146
- placeholder: defaultPlaceholder,
147
- notch: false
148
- });
149
- const noNotchWithValueProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
150
- value: defaultValue,
151
- placeholder: defaultPlaceholder,
152
- notch: false
153
- });
154
- const loadingProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
155
- isLoading: true
156
- });
157
- export const standard = Template.bind(standardProps);
158
- standard.args = standardProps;
159
- standard.argTypes = argTypes;
160
- export const withAValue = Template.bind(withAValueProps);
161
- withAValue.args = withAValueProps;
162
- withAValue.argTypes = argTypes;
163
- export const withHintText = Template.bind(withHintTextProps);
164
- withHintText.args = withHintTextProps;
165
- withHintText.argTypes = argTypes;
166
- export const notchDisabled = Template.bind(noNotchProps);
167
- notchDisabled.args = noNotchProps;
168
- notchDisabled.argTypes = argTypes;
169
- export const notchDisabledWithValue = Template.bind(noNotchWithValueProps);
170
- notchDisabledWithValue.args = noNotchWithValueProps;
171
- notchDisabledWithValue.argTypes = argTypes;
172
- export const withPrefixIcon = Template.bind(withPrefixIconProps);
173
- withPrefixIcon.args = withPrefixIconProps;
174
- withPrefixIcon.argTypes = argTypes;
175
- export const withSuffixIcon = Template.bind(withSuffixIconProps);
176
- withSuffixIcon.args = withSuffixIconProps;
177
- withSuffixIcon.argTypes = argTypes;
178
- export const withBothIcons = Template.bind(withBothIconsProps);
179
- withBothIcons.args = withBothIconsProps;
180
- withBothIcons.argTypes = argTypes;
181
- export const disabled = Template.bind(disabledProps);
182
- disabled.args = disabledProps;
183
- disabled.argTypes = argTypes;
184
- export const valid = Template.bind(validProps);
185
- valid.args = validProps;
186
- valid.argTypes = argTypes;
187
- export const invalid = Template.bind(invalidProps);
188
- invalid.args = invalidProps;
189
- invalid.argTypes = argTypes;
190
- export const loading = Template.bind(loadingProps);
191
- loading.args = loadingProps;
192
- loading.argTypes = argTypes;
193
- const smallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
194
- size: 'small'
195
- });
196
- export const small = Template.bind(smallProps);
197
- small.args = smallProps;
198
- small.argTypes = argTypes;
199
- const withValueSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
200
- size: 'small'
201
- });
202
- export const withValueSmall = Template.bind(withValueSmallProps);
203
- withValueSmall.args = withValueSmallProps;
204
- withValueSmall.argTypes = argTypes;
205
- const withIconSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
206
- prefixIcon: CarIcon,
207
- size: 'small'
208
- });
209
- export const withIconSmall = Template.bind(withIconSmallProps);
210
- withIconSmall.args = withIconSmallProps;
211
- withIconSmall.argTypes = argTypes;
212
- const loadingSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
213
- isLoading: true,
214
- size: 'small'
215
- });
216
- export const loadingSmall = Template.bind(loadingSmallProps);
217
- loadingSmall.args = loadingSmallProps;
218
- loadingSmall.argTypes = argTypes;
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import * as React from 'react';
7
- import { Text } from "../Text/index.js";
8
- import { OrderedList } from "./index.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
- export default {
12
- title: 'Foundation/List/OrderedList',
13
- component: OrderedList
14
- };
15
- const Template = args => _jsxs(OrderedList, _objectSpread(_objectSpread({}, args), {}, {
16
- children: [_jsx(OrderedList.Item, {
17
- children: _jsx(Text, {
18
- children: "Strawberry"
19
- })
20
- }), _jsxs(OrderedList.Item, {
21
- children: [_jsx(Text, {
22
- children: "Watermelon"
23
- }), _jsxs(OrderedList, {
24
- children: [_jsx(OrderedList.Item, {
25
- children: _jsx(Text, {
26
- children: "Mango"
27
- })
28
- }), _jsx(OrderedList.Item, {
29
- children: _jsx(Text, {
30
- children: "Banana"
31
- })
32
- }), _jsxs(OrderedList.Item, {
33
- children: [_jsx(Text, {
34
- children: "Apple"
35
- }), _jsxs(OrderedList, {
36
- children: [_jsx(OrderedList.Item, {
37
- children: _jsx(Text, {
38
- children: "Grape"
39
- })
40
- }), _jsx(OrderedList.Item, {
41
- children: _jsx(Text, {
42
- children: "Orange"
43
- })
44
- })]
45
- })]
46
- }), _jsx(OrderedList.Item, {
47
- children: _jsx(Text, {
48
- children: "Pineapple"
49
- })
50
- })]
51
- })]
52
- }), _jsx(OrderedList.Item, {
53
- children: _jsx(Text, {
54
- children: "Pear"
55
- })
56
- })]
57
- }));
58
- export const standard = Template.bind({});