@autoguru/overdrive 4.33.1 → 4.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.js +1 -2
- package/dist/components/Anchor/Anchor.js +3 -4
- package/dist/components/AutoSuggest/AutoSuggest.css.js +3 -3
- package/dist/components/AutoSuggest/AutoSuggest.d.ts.map +1 -1
- package/dist/components/AutoSuggest/AutoSuggest.js +8 -9
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/argTypes.d.ts.map +1 -1
- package/dist/components/Box/argTypes.js +2 -2
- package/dist/components/Box/useBoxStyles.css.d.ts +1 -1
- package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -1
- package/dist/components/Box/useBoxStyles.css.js +5 -11
- package/dist/components/BulletList/Bullet.css.js +3 -3
- package/dist/components/BulletList/Bullet.d.ts.map +1 -1
- package/dist/components/BulletList/Bullet.js +12 -4
- package/dist/components/BulletText/BulletText.js +1 -2
- package/dist/components/Button/Button.css.js +21 -21
- package/dist/components/Button/Button.js +3 -5
- package/dist/components/CheckBox/CheckBox.css.js +3 -3
- package/dist/components/CheckBox/CheckBox.js +1 -2
- package/dist/components/ColourInput/ColourInput.css.js +2 -2
- package/dist/components/ColourInput/ColourInput.js +3 -4
- package/dist/components/Columns/Column.css.js +1 -1
- package/dist/components/Columns/Column.js +2 -2
- package/dist/components/Columns/Columns.js +2 -2
- package/dist/components/DateInput/DateInput.js +2 -2
- package/dist/components/DatePicker/DatePicker.js +3 -4
- package/dist/components/DividerLine/DividerLine.d.ts +1 -1
- package/dist/components/DividerLine/DividerLine.d.ts.map +1 -1
- package/dist/components/DividerLine/DividerLine.js +1 -1
- package/dist/components/DropDown/DropDown.js +3 -5
- package/dist/components/DropDown/DropDownOption.css.js +2 -2
- package/dist/components/DropDown/DropDownOption.js +3 -4
- package/dist/components/EditableText/EditableText.css.js +1 -1
- package/dist/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.js +5 -6
- package/dist/components/FillHeightBox/FillHeightBox.js +2 -2
- package/dist/components/Flyout/Flyout.js +2 -2
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +5 -7
- package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.js +5 -9
- package/dist/components/Image/Image.js +2 -2
- package/dist/components/Image/ImageServerProvider.js +9 -8
- package/dist/components/Image/ResponsiveImage.js +2 -2
- package/dist/components/Image/SimpleImage.js +2 -2
- package/dist/components/Inline/Inline.js +1 -3
- package/dist/components/LoadingBox/LoadingBox.js +3 -3
- package/dist/components/Meta/Meta.js +2 -3
- package/dist/components/MinimalModal/MinimalModal.js +2 -2
- package/dist/components/Modal/Modal.css.js +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +16 -9
- package/dist/components/NumberBubble/NumberBubble.js +2 -2
- package/dist/components/NumberInput/NumberInput.js +3 -3
- package/dist/components/OrderedList/OrderedList.css.js +1 -1
- package/dist/components/OutsideClick/OutsideClick.js +1 -1
- package/dist/components/Pagination/Pagination.css.js +6 -6
- package/dist/components/Pagination/Pagination.js +1 -2
- package/dist/components/Positioner/Positioner.d.ts.map +1 -1
- package/dist/components/Positioner/Positioner.js +17 -7
- package/dist/components/Positioner/alignment.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.css.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +1 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.js +2 -3
- package/dist/components/Radio/Radio.css.js +4 -4
- package/dist/components/Radio/Radio.js +1 -2
- package/dist/components/ScrollPane/ScrollPane.css.js +3 -3
- package/dist/components/ScrollPane/ScrollPane.js +2 -2
- package/dist/components/SelectInput/SelectInput.css.js +3 -3
- package/dist/components/SelectInput/SelectInput.d.ts +1 -1
- package/dist/components/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInput.js +5 -5
- package/dist/components/SimplePagination/SimplePagination.js +4 -5
- package/dist/components/SliderProgress/ProgressStep.js +1 -2
- package/dist/components/SliderProgress/SliderProgress.css.js +1 -1
- package/dist/components/SliderProgress/SliderProgress.js +1 -1
- package/dist/components/Stack/Divider.css.js +1 -1
- package/dist/components/Stack/Stack.js +1 -3
- package/dist/components/StandardModal/StandardModal.css.js +8 -8
- package/dist/components/StandardModal/StandardModal.js +4 -5
- package/dist/components/StarRating/StarRating.js +7 -8
- package/dist/components/Stepper/Stepper.css.js +4 -4
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +19 -10
- package/dist/components/StickyBox/StickyBox.css.js +4 -4
- package/dist/components/StickyBox/StickyBox.js +3 -3
- package/dist/components/Switch/Switch.css.js +18 -18
- package/dist/components/Switch/Switch.js +4 -5
- package/dist/components/Table/TableCell.css.js +1 -1
- package/dist/components/Table/TableHeadCell.css.js +5 -5
- package/dist/components/Table/TableHeadCell.js +1 -2
- package/dist/components/Tabs/Tab.css.js +4 -4
- package/dist/components/Tabs/Tab.js +2 -3
- package/dist/components/Tabs/TabList.css.js +1 -1
- package/dist/components/Tabs/TabList.js +1 -2
- package/dist/components/Tabs/TabPane.js +1 -1
- package/dist/components/Text/useTextStyles.css.js +2 -2
- package/dist/components/TextAreaInput/TextAreaInput.js +2 -2
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +14 -6
- package/dist/components/TextContainer/TextContainer.js +1 -2
- package/dist/components/TextInput/TextInput.js +2 -2
- package/dist/components/TextLink/TextLink.css.js +4 -4
- package/dist/components/TextLink/TextLink.js +3 -4
- package/dist/components/ThemeOverrideProvider/ThemeOverrideDebugger.js +1 -2
- package/dist/components/ThemeOverrideProvider/ThemeOverrideProvider.js +2 -2
- package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.d.ts.map +1 -1
- package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.js +5 -3
- package/dist/components/Toaster/Toast.css.js +1 -1
- package/dist/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/components/Toaster/Toast.js +24 -20
- package/dist/components/Tooltip/Tooltip.css.js +2 -2
- package/dist/components/Tooltip/Tooltip.js +1 -3
- package/dist/components/private/CheckableBase/CheckableBase.css.js +8 -8
- package/dist/components/private/CheckableBase/CheckableBase.js +1 -2
- package/dist/components/private/InputBase/HintText.css.js +1 -1
- package/dist/components/private/InputBase/NotchedBase.css.js +20 -20
- package/dist/components/private/InputBase/NotchedBase.js +1 -2
- package/dist/components/private/InputBase/withEnhancedInput.css.js +16 -16
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +3 -4
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts +1 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts.map +1 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +5 -5
- package/dist/hooks/useMedia/useMedia.js +4 -4
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +2 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +1 -1
- package/dist/hooks/useNullCheck/useNullCheck.js +1 -1
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.d.ts.map +1 -1
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +4 -3
- package/dist/reset/globalFonts.css.js +3 -3
- package/dist/reset/reset.css.js +2 -2
- package/dist/themes/base/tokens.js +3 -3
- package/dist/themes/flat_red/tokens.js +2 -2
- package/dist/themes/helpers.d.ts.map +1 -1
- package/dist/themes/helpers.js +2 -2
- package/dist/themes/makeTheme.js +3 -3
- package/dist/themes/neutral/tokens.js +3 -3
- package/dist/themes/theme.css.js +2 -2
- package/dist/utils/css.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/utils/mapTokenToProperty.js +2 -2
- package/dist/utils/number.js +1 -1
- package/dist/utils/responsiveProps.css.d.ts.map +1 -1
- package/dist/utils/responsiveProps.css.js +2 -2
- package/dist/utils/responsiveStyle.js +3 -3
- package/package.json +118 -26
- package/dist/components/Actions/stories.js +0 -53
- package/dist/components/Alert/stories.js +0 -106
- package/dist/components/Anchor/stories.js +0 -65
- package/dist/components/AutoSuggest/stories.js +0 -213
- package/dist/components/Badge/stories.js +0 -64
- package/dist/components/Box/stories.js +0 -43
- package/dist/components/BulletList/stories.js +0 -72
- package/dist/components/BulletText/stories.js +0 -88
- package/dist/components/Button/stories.js +0 -291
- package/dist/components/CheckBox/stories.js +0 -206
- package/dist/components/ColourInput/stories.js +0 -173
- package/dist/components/Columns/stories.js +0 -209
- package/dist/components/DateInput/stories.js +0 -181
- package/dist/components/DatePicker/stories.js +0 -89
- package/dist/components/DividerLine/stories.js +0 -117
- package/dist/components/DropDown/stories.js +0 -117
- package/dist/components/EditableText/stories.js +0 -84
- package/dist/components/FillHeightBox/stories.js +0 -47
- package/dist/components/Flyout/stories.js +0 -88
- package/dist/components/Heading/stories.js +0 -127
- package/dist/components/HorizontalAutoScroller/stories.js +0 -88
- package/dist/components/Icon/stories.js +0 -62
- package/dist/components/Image/stories.js +0 -183
- package/dist/components/Inline/stories.js +0 -122
- package/dist/components/IntentStripe/stories.js +0 -76
- package/dist/components/LinearProgressIndicator/stories.js +0 -26
- package/dist/components/LoadingBox/stories.js +0 -41
- package/dist/components/Meta/stories.js +0 -45
- package/dist/components/MinimalModal/stories.js +0 -83
- package/dist/components/Modal/stories.js +0 -52
- package/dist/components/NumberBubble/stories.js +0 -23
- package/dist/components/NumberInput/stories.js +0 -218
- package/dist/components/OrderedList/stories.js +0 -58
- package/dist/components/OutsideClick/stories.js +0 -39
- package/dist/components/Pagination/stories.js +0 -112
- package/dist/components/Portal/stories.js +0 -72
- package/dist/components/Positioner/stories.js +0 -124
- package/dist/components/ProgressBar/stories.js +0 -44
- package/dist/components/ProgressBarGroup/stories.js +0 -21
- package/dist/components/ProgressSpinner/stories.js +0 -36
- package/dist/components/Radio/stories.js +0 -215
- package/dist/components/ScrollPane/stories.js +0 -55
- package/dist/components/Section/stories.js +0 -43
- package/dist/components/SelectInput/stories.js +0 -188
- package/dist/components/SimplePagination/stories.js +0 -42
- package/dist/components/SliderProgress/stories.js +0 -44
- package/dist/components/Stack/stories.js +0 -75
- package/dist/components/StandardModal/stories.js +0 -62
- package/dist/components/StarRating/stories.js +0 -50
- package/dist/components/Stepper/stories.js +0 -61
- package/dist/components/StickyBox/stories.js +0 -70
- package/dist/components/Switch/stories.js +0 -42
- package/dist/components/Table/stories.js +0 -302
- package/dist/components/Tabs/stories.js +0 -253
- package/dist/components/Text/stories.js +0 -154
- package/dist/components/TextAreaInput/stories.js +0 -129
- package/dist/components/TextBubble/stories.js +0 -30
- package/dist/components/TextContainer/stories.js +0 -128
- package/dist/components/TextInput/stories.js +0 -260
- package/dist/components/TextLink/stories.js +0 -111
- package/dist/components/Toaster/stories.js +0 -59
- package/dist/components/Tooltip/stories.js +0 -90
- package/dist/components/VisuallyHidden/stories.js +0 -36
- package/dist/hooks/useAttachedBoxes/stories.js +0 -94
- package/dist/hooks/useMedia/stories.js +0 -46
- package/dist/hooks/useResponsiveValue/stories.js +0 -38
|
@@ -1,213 +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, CarIcon, CarMultipleIcon, CheckIcon, CurrencyUsdIcon, MagnifyIcon, PlusIcon, StarIcon } from '@autoguru/icons';
|
|
7
|
-
import { action } from '@storybook/addon-actions';
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
import { Box } from "../Box/index.js";
|
|
10
|
-
import { Stack } from "../Stack/index.js";
|
|
11
|
-
import { Text } from "../Text/index.js";
|
|
12
|
-
import { AutoSuggest } from "./index.js";
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const mockSuggestions = ['Alfa Romeo', 'Aston Martin', 'Bentley', 'BMW', 'Bugatti', 'Ferrari', 'Jaguar', 'Koenigsegg', 'Lamborghini', 'Lotus', 'Maserati', 'McLaren', 'Pontiac', 'Porsche'].map(item => ({
|
|
16
|
-
text: item,
|
|
17
|
-
payload: item
|
|
18
|
-
}));
|
|
19
|
-
const iconOptions = {
|
|
20
|
-
MagnifyIcon,
|
|
21
|
-
CarIcon,
|
|
22
|
-
CarMultipleIcon,
|
|
23
|
-
CalendarIcon,
|
|
24
|
-
AccountEditIcon,
|
|
25
|
-
AlertCircleIcon,
|
|
26
|
-
CurrencyUsdIcon,
|
|
27
|
-
PlusIcon,
|
|
28
|
-
StarIcon,
|
|
29
|
-
CheckIcon
|
|
30
|
-
};
|
|
31
|
-
const attachOptions = {
|
|
32
|
-
NONE: 'NONE',
|
|
33
|
-
TOP: 'TOP',
|
|
34
|
-
RIGHT: 'RIGHT',
|
|
35
|
-
LEFT: 'LEFT',
|
|
36
|
-
BOTTOM: 'BOTTOM',
|
|
37
|
-
ALL: 'ALL'
|
|
38
|
-
};
|
|
39
|
-
export default {
|
|
40
|
-
title: 'Components/Inputs/AutoSuggest',
|
|
41
|
-
component: AutoSuggest,
|
|
42
|
-
decorators: [story => _jsx("div", {
|
|
43
|
-
style: {
|
|
44
|
-
maxWidth: 900,
|
|
45
|
-
margin: '0 auto'
|
|
46
|
-
},
|
|
47
|
-
children: story()
|
|
48
|
-
})],
|
|
49
|
-
argTypes: {
|
|
50
|
-
value: {
|
|
51
|
-
options: _objectSpread({
|
|
52
|
-
unselected: null
|
|
53
|
-
}, mockSuggestions.reduce((map, item) => _objectSpread(_objectSpread({}, map), {}, {
|
|
54
|
-
[item.text]: item
|
|
55
|
-
}), {})),
|
|
56
|
-
defaultValue: null,
|
|
57
|
-
control: {
|
|
58
|
-
type: 'select'
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
attach: {
|
|
62
|
-
defaultValue: 'NONE',
|
|
63
|
-
description: 'Input attach',
|
|
64
|
-
options: attachOptions,
|
|
65
|
-
control: {
|
|
66
|
-
type: 'select'
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
fieldIcon: {
|
|
70
|
-
defaultValue: void 0,
|
|
71
|
-
description: 'Input field Icon',
|
|
72
|
-
options: iconOptions,
|
|
73
|
-
control: {
|
|
74
|
-
type: 'select'
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
prefixIcon: {
|
|
78
|
-
defaultValue: void 0,
|
|
79
|
-
description: 'Input prefix Icon',
|
|
80
|
-
options: iconOptions,
|
|
81
|
-
control: {
|
|
82
|
-
type: 'select'
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
wrapperRef: {
|
|
86
|
-
control: {
|
|
87
|
-
disable: true
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
ref: {
|
|
91
|
-
control: {
|
|
92
|
-
disable: true
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
parameters: {
|
|
97
|
-
chromatic: {}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const Template = args => _jsxs(Stack, {
|
|
101
|
-
space: "5",
|
|
102
|
-
children: [_jsx(Box, {
|
|
103
|
-
paddingTop: "8",
|
|
104
|
-
children: _jsx(AutoSuggest, _objectSpread({}, args))
|
|
105
|
-
}), _jsx(Text, {
|
|
106
|
-
is: "p",
|
|
107
|
-
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."
|
|
108
|
-
}), _jsx(Text, {
|
|
109
|
-
is: "p",
|
|
110
|
-
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."
|
|
111
|
-
}), _jsx(Text, {
|
|
112
|
-
is: "p",
|
|
113
|
-
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."
|
|
114
|
-
}), _jsx(Text, {
|
|
115
|
-
is: "p",
|
|
116
|
-
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."
|
|
117
|
-
}), _jsx(Text, {
|
|
118
|
-
is: "p",
|
|
119
|
-
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."
|
|
120
|
-
}), _jsx(Text, {
|
|
121
|
-
is: "p",
|
|
122
|
-
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."
|
|
123
|
-
})]
|
|
124
|
-
});
|
|
125
|
-
const standardProps = {
|
|
126
|
-
value: null,
|
|
127
|
-
suggestions: mockSuggestions,
|
|
128
|
-
disabled: void 0,
|
|
129
|
-
name: 'text',
|
|
130
|
-
placeholder: 'Pick an exotic car brand',
|
|
131
|
-
isValid: void 0,
|
|
132
|
-
isTouched: void 0,
|
|
133
|
-
isLoading: void 0,
|
|
134
|
-
isFocused: void 0,
|
|
135
|
-
reserveHintSpace: void 0,
|
|
136
|
-
hintText: '',
|
|
137
|
-
notch: true,
|
|
138
|
-
prefixIcon: void 0,
|
|
139
|
-
onReset: () => action('onReset')(),
|
|
140
|
-
onChange: thing => action('onChange')(thing),
|
|
141
|
-
onEnter: thing => action('onEnter')(thing),
|
|
142
|
-
onFocus: thing => action('onFocus')(thing),
|
|
143
|
-
onBlur: thing => action('onBlur')(thing)
|
|
144
|
-
};
|
|
145
|
-
export const standard = Template.bind(standardProps);
|
|
146
|
-
standard.args = standardProps;
|
|
147
|
-
const withValueProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
148
|
-
value: mockSuggestions[3]
|
|
149
|
-
});
|
|
150
|
-
export const withValue = Template.bind(withValueProps);
|
|
151
|
-
withValue.args = withValueProps;
|
|
152
|
-
const withoutNotchProps = _objectSpread(_objectSpread({}, withValueProps), {}, {
|
|
153
|
-
notch: false
|
|
154
|
-
});
|
|
155
|
-
export const withoutNotch = Template.bind(withoutNotchProps);
|
|
156
|
-
withoutNotch.args = withoutNotchProps;
|
|
157
|
-
const withNoItemsProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
158
|
-
suggestions: []
|
|
159
|
-
});
|
|
160
|
-
export const withNoItems = Template.bind(withNoItemsProps);
|
|
161
|
-
withNoItems.args = withNoItemsProps;
|
|
162
|
-
const withIconProps = _objectSpread(_objectSpread({}, withValueProps), {}, {
|
|
163
|
-
prefixIcon: CarIcon
|
|
164
|
-
});
|
|
165
|
-
export const withIcon = Template.bind(withIconProps);
|
|
166
|
-
withIcon.args = withIconProps;
|
|
167
|
-
const disabledProps = _objectSpread(_objectSpread({}, withIconProps), {}, {
|
|
168
|
-
disabled: true
|
|
169
|
-
});
|
|
170
|
-
export const disabled = Template.bind(disabledProps);
|
|
171
|
-
disabled.args = disabledProps;
|
|
172
|
-
const withHintTextProps = _objectSpread(_objectSpread({}, withIconProps), {}, {
|
|
173
|
-
hintText: 'Choose a sports car make'
|
|
174
|
-
});
|
|
175
|
-
export const withHintText = Template.bind(withHintTextProps);
|
|
176
|
-
withHintText.args = withHintTextProps;
|
|
177
|
-
const validProps = _objectSpread(_objectSpread({}, withHintTextProps), {}, {
|
|
178
|
-
value: mockSuggestions[8],
|
|
179
|
-
isTouched: true,
|
|
180
|
-
isValid: true
|
|
181
|
-
});
|
|
182
|
-
export const valid = Template.bind(validProps);
|
|
183
|
-
valid.args = validProps;
|
|
184
|
-
const invalidProps = _objectSpread(_objectSpread({}, withHintTextProps), {}, {
|
|
185
|
-
value: mockSuggestions[3],
|
|
186
|
-
isTouched: true,
|
|
187
|
-
isValid: false
|
|
188
|
-
});
|
|
189
|
-
export const invalid = Template.bind(invalidProps);
|
|
190
|
-
invalid.args = invalidProps;
|
|
191
|
-
const withIconSmallProps = _objectSpread(_objectSpread({}, withValueProps), {}, {
|
|
192
|
-
prefixIcon: CarIcon,
|
|
193
|
-
size: 'small'
|
|
194
|
-
});
|
|
195
|
-
const smallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
196
|
-
size: 'small'
|
|
197
|
-
});
|
|
198
|
-
export const small = Template.bind(smallProps);
|
|
199
|
-
small.args = smallProps;
|
|
200
|
-
const withValueSmallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
201
|
-
value: mockSuggestions[3],
|
|
202
|
-
size: 'small'
|
|
203
|
-
});
|
|
204
|
-
export const withValueSmall = Template.bind(withValueSmallProps);
|
|
205
|
-
withValueSmall.args = withValueSmallProps;
|
|
206
|
-
export const withIconSmall = Template.bind(withIconSmallProps);
|
|
207
|
-
withIconSmall.args = withIconSmallProps;
|
|
208
|
-
const loadingSmallProps = _objectSpread(_objectSpread({}, withValueSmallProps), {}, {
|
|
209
|
-
isLoading: true,
|
|
210
|
-
size: 'small'
|
|
211
|
-
});
|
|
212
|
-
export const loadingSmall = Template.bind(loadingSmallProps);
|
|
213
|
-
loadingSmall.args = loadingSmallProps;
|
|
@@ -1,64 +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 { Badge } from "./index.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
-
const colours = ['blue', 'red', 'green', 'yellow', 'neutral'];
|
|
11
|
-
export default {
|
|
12
|
-
title: 'Components/Badge',
|
|
13
|
-
component: Badge,
|
|
14
|
-
decorators: [story => _jsx("div", {
|
|
15
|
-
style: {
|
|
16
|
-
display: 'grid',
|
|
17
|
-
gridAutoFlow: 'row dense',
|
|
18
|
-
gridGap: '10px'
|
|
19
|
-
},
|
|
20
|
-
children: _jsx("div", {
|
|
21
|
-
style: {
|
|
22
|
-
display: 'grid',
|
|
23
|
-
gap: '10px',
|
|
24
|
-
gridTemplateColumns: 'repeat(auto-fit, minmax(10px, max-content))'
|
|
25
|
-
},
|
|
26
|
-
children: story()
|
|
27
|
-
})
|
|
28
|
-
})]
|
|
29
|
-
};
|
|
30
|
-
const template = args => _jsx(Badge, _objectSpread({}, args));
|
|
31
|
-
const templateAllColours = args => _jsx(_Fragment, {
|
|
32
|
-
children: colours.map(colour => _jsx(Badge, _objectSpread(_objectSpread({}, args), {}, {
|
|
33
|
-
colour: colour
|
|
34
|
-
}), colour))
|
|
35
|
-
});
|
|
36
|
-
const standardProps = {
|
|
37
|
-
label: 'TITANIUM'
|
|
38
|
-
};
|
|
39
|
-
export const standard = template.bind(standardProps);
|
|
40
|
-
standard.args = standardProps;
|
|
41
|
-
export const standardAllColours = templateAllColours.bind(standardProps);
|
|
42
|
-
standardAllColours.args = standardProps;
|
|
43
|
-
const largeProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
44
|
-
size: 'large'
|
|
45
|
-
});
|
|
46
|
-
export const largeAllColours = templateAllColours.bind(largeProps);
|
|
47
|
-
largeAllColours.args = largeProps;
|
|
48
|
-
const smallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
49
|
-
size: 'small'
|
|
50
|
-
});
|
|
51
|
-
export const smallAllColours = templateAllColours.bind(smallProps);
|
|
52
|
-
smallAllColours.args = smallProps;
|
|
53
|
-
const invertedProps = _objectSpread(_objectSpread({}, standardProps), {}, {
|
|
54
|
-
look: 'inverted'
|
|
55
|
-
});
|
|
56
|
-
export const inverted = template.bind(invertedProps);
|
|
57
|
-
inverted.args = invertedProps;
|
|
58
|
-
export const invertedAllColours = templateAllColours.bind(invertedProps);
|
|
59
|
-
invertedAllColours.args = invertedProps;
|
|
60
|
-
const invertedLargeProps = _objectSpread(_objectSpread({}, largeProps), {}, {
|
|
61
|
-
look: 'inverted'
|
|
62
|
-
});
|
|
63
|
-
export const invertedLargeAllColours = templateAllColours.bind(invertedLargeProps);
|
|
64
|
-
invertedLargeAllColours.args = invertedLargeProps;
|
|
@@ -1,43 +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 "./argTypes.js";
|
|
8
|
-
import { Box } from "./index.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
export default {
|
|
13
|
-
title: 'Foundation/Box',
|
|
14
|
-
component: Box,
|
|
15
|
-
decorators: [story => _jsx("div", {
|
|
16
|
-
style: {
|
|
17
|
-
maxWidth: 500,
|
|
18
|
-
margin: '0 auto'
|
|
19
|
-
},
|
|
20
|
-
children: story()
|
|
21
|
-
})],
|
|
22
|
-
argTypes: boxArgTypes
|
|
23
|
-
};
|
|
24
|
-
const template = args => _jsxs(_Fragment, {
|
|
25
|
-
children: [_jsx(Box, _objectSpread(_objectSpread({}, args), {}, {
|
|
26
|
-
children: "Box 1"
|
|
27
|
-
})), _jsx(Box, _objectSpread(_objectSpread({}, args), {}, {
|
|
28
|
-
children: "Box 2"
|
|
29
|
-
}))]
|
|
30
|
-
});
|
|
31
|
-
const standardProps = {
|
|
32
|
-
borderColour: 'dark',
|
|
33
|
-
borderWidth: ['none', 'none', '1', '2'],
|
|
34
|
-
padding: ['2', '4'],
|
|
35
|
-
marginBottom: ['2', '4', '5', '8'],
|
|
36
|
-
marginX: ['none', '3', '5'],
|
|
37
|
-
backgroundColour: 'primary',
|
|
38
|
-
colour: 'primary',
|
|
39
|
-
borderRadius: 'pill',
|
|
40
|
-
boxShadow: ['none', '1', '2', '3']
|
|
41
|
-
};
|
|
42
|
-
export const standard = template.bind(standardProps);
|
|
43
|
-
standard.args = standardProps;
|
|
@@ -1,72 +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 { Bullet, BulletList } 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/BulletList',
|
|
13
|
-
component: BulletList,
|
|
14
|
-
decorators: [story => _jsx("div", {
|
|
15
|
-
style: {
|
|
16
|
-
maxWidth: '500px',
|
|
17
|
-
width: '100%'
|
|
18
|
-
},
|
|
19
|
-
children: story()
|
|
20
|
-
})]
|
|
21
|
-
};
|
|
22
|
-
const StandardBulletListTemplate = args => _jsxs(BulletList, _objectSpread(_objectSpread({}, args), {}, {
|
|
23
|
-
children: [_jsx(Bullet, {
|
|
24
|
-
children: _jsx(Text, {
|
|
25
|
-
children: "For some, it could be argued that air-conditioning is the most important feature of a car, excluding all the mechanical bits that make it go, stop and turn."
|
|
26
|
-
})
|
|
27
|
-
}), _jsx(Bullet, {
|
|
28
|
-
children: _jsx(Text, {
|
|
29
|
-
children: "There are many components that have to work together to ensure the air-conditioning system is working correctly and, with so many contributing parts, it\u2019s clear the system should only be serviced or repaired by a qualified technician."
|
|
30
|
-
})
|
|
31
|
-
})]
|
|
32
|
-
}));
|
|
33
|
-
const NestedBulletListTemplate = args => _jsxs(BulletList, _objectSpread(_objectSpread({}, args), {}, {
|
|
34
|
-
children: [_jsx(Bullet, {
|
|
35
|
-
children: _jsx(Text, {
|
|
36
|
-
children: "For some, it could be argued that air-conditioning is the most important feature of a car, excluding all the mechanical bits that make it go, stop and turn."
|
|
37
|
-
})
|
|
38
|
-
}), _jsx(Bullet, {
|
|
39
|
-
children: _jsxs(BulletList, _objectSpread(_objectSpread({}, args), {}, {
|
|
40
|
-
children: [_jsx(Bullet, {
|
|
41
|
-
children: _jsx(Text, {
|
|
42
|
-
children: "For some, it could be argued that air-conditioning is the most important feature of a car, excluding all the mechanical bits that make it go, stop and turn."
|
|
43
|
-
})
|
|
44
|
-
}), _jsx(Bullet, {
|
|
45
|
-
children: _jsxs(BulletList, _objectSpread(_objectSpread({}, args), {}, {
|
|
46
|
-
children: [_jsx(Bullet, {
|
|
47
|
-
children: _jsx(Text, {
|
|
48
|
-
children: "For some, it could be argued that air-conditioning is the most important feature of a car, excluding all the mechanical bits that make it go, stop and turn."
|
|
49
|
-
})
|
|
50
|
-
}), _jsx(Bullet, {
|
|
51
|
-
children: _jsx(BulletList, {
|
|
52
|
-
children: _jsx(Bullet, {
|
|
53
|
-
children: _jsx(Text, {
|
|
54
|
-
children: "For some, it could be argued that air-conditioning is the most important feature of a car, excluding all the mechanical bits that make it go, stop and turn."
|
|
55
|
-
})
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
})]
|
|
59
|
-
}))
|
|
60
|
-
})]
|
|
61
|
-
}))
|
|
62
|
-
}), _jsx(Bullet, {
|
|
63
|
-
children: _jsx(Text, {
|
|
64
|
-
children: "For some, it could be argued that air-conditioning is the most important feature of a car, excluding all the mechanical bits that make it go, stop and turn."
|
|
65
|
-
})
|
|
66
|
-
})]
|
|
67
|
-
}));
|
|
68
|
-
const standardProps = {};
|
|
69
|
-
export const standard = StandardBulletListTemplate.bind(standardProps);
|
|
70
|
-
standard.args = {};
|
|
71
|
-
export const nested = NestedBulletListTemplate.bind(standardProps);
|
|
72
|
-
nested.args = {};
|
|
@@ -1,88 +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 { CheckIcon } from '@autoguru/icons';
|
|
7
|
-
import * as React from 'react';
|
|
8
|
-
import { Icon } from "../Icon/index.js";
|
|
9
|
-
import { BulletText } from "./index.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export default {
|
|
12
|
-
title: 'Components/BulletText',
|
|
13
|
-
component: BulletText,
|
|
14
|
-
argTypes: {
|
|
15
|
-
variant: {
|
|
16
|
-
options: ['primary', 'secondary'],
|
|
17
|
-
defaultValue: 'primary',
|
|
18
|
-
control: {
|
|
19
|
-
type: 'select'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
bullet: {
|
|
23
|
-
table: {
|
|
24
|
-
type: {
|
|
25
|
-
summary: 'Any custom react element'
|
|
26
|
-
},
|
|
27
|
-
defaultValue: void 0
|
|
28
|
-
},
|
|
29
|
-
description: 'Any custom react element',
|
|
30
|
-
control: {
|
|
31
|
-
type: 'select'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
is: {
|
|
35
|
-
table: {
|
|
36
|
-
type: {
|
|
37
|
-
summary: 'div'
|
|
38
|
-
},
|
|
39
|
-
defaultValue: 'div'
|
|
40
|
-
},
|
|
41
|
-
description: 'HTML dom tag to be used',
|
|
42
|
-
control: {
|
|
43
|
-
disable: true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
const template = args => _jsx(BulletText, _objectSpread({
|
|
49
|
-
is: "div"
|
|
50
|
-
}, args));
|
|
51
|
-
const primaryProps = {
|
|
52
|
-
variant: 'primary',
|
|
53
|
-
children: 'Hello World',
|
|
54
|
-
bullet: void 0
|
|
55
|
-
};
|
|
56
|
-
const secondaryProps = {
|
|
57
|
-
variant: 'secondary',
|
|
58
|
-
children: 'Hello World',
|
|
59
|
-
bullet: void 0
|
|
60
|
-
};
|
|
61
|
-
const withCustomBulletProps = {
|
|
62
|
-
variant: 'primary',
|
|
63
|
-
children: 'Hello World',
|
|
64
|
-
bullet: _jsx("span", {
|
|
65
|
-
style: {
|
|
66
|
-
width: '20px',
|
|
67
|
-
height: '20px',
|
|
68
|
-
backgroundColor: ' #00dd95',
|
|
69
|
-
color: 'white',
|
|
70
|
-
borderRadius: '50%',
|
|
71
|
-
flexDirection: 'row',
|
|
72
|
-
display: 'flex',
|
|
73
|
-
alignContent: 'center',
|
|
74
|
-
justifyContent: 'center',
|
|
75
|
-
alignItems: 'center'
|
|
76
|
-
},
|
|
77
|
-
children: _jsx(Icon, {
|
|
78
|
-
size: "small",
|
|
79
|
-
icon: CheckIcon
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
};
|
|
83
|
-
export const primary = template.bind(primaryProps);
|
|
84
|
-
export const secondary = template.bind(secondaryProps);
|
|
85
|
-
export const withCustomBullet = template.bind(withCustomBulletProps);
|
|
86
|
-
primary.args = primaryProps;
|
|
87
|
-
secondary.args = secondaryProps;
|
|
88
|
-
withCustomBullet.args = withCustomBulletProps;
|