@autoguru/overdrive 4.42.0-next.1 → 4.43.0-next.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/Actions/Actions.d.ts +4 -3
- package/dist/components/Actions/Actions.d.ts.map +1 -1
- package/dist/components/Actions/Actions.js +5 -9
- package/dist/components/Actions/Actions.stories.d.ts +1 -1
- package/dist/components/Alert/Alert.d.ts +1 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +13 -17
- package/dist/components/Anchor/Anchor.js +3 -3
- package/dist/components/AutoSuggest/AutoSuggest.js +2 -2
- package/dist/components/Box/Box.d.ts +6 -9
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +12 -117
- package/dist/components/Box/Box.stories.d.ts +3 -20
- package/dist/components/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Box/argTypes.d.ts.map +1 -1
- package/dist/components/Box/argTypes.js +1 -1
- package/dist/components/Box/boxStyles.d.ts +5 -0
- package/dist/components/Box/boxStyles.d.ts.map +1 -0
- package/dist/components/Box/boxStyles.js +32 -0
- package/dist/components/Box/index.d.ts +3 -3
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/index.js +3 -2
- package/dist/components/Box/useBox.d.ts +22 -0
- package/dist/components/Box/useBox.d.ts.map +1 -0
- package/dist/components/Box/useBox.js +42 -0
- package/dist/components/BulletText/BulletText.d.ts +4 -5
- package/dist/components/BulletText/BulletText.d.ts.map +1 -1
- package/dist/components/BulletText/BulletText.js +6 -8
- package/dist/components/BulletText/BulletText.stories.d.ts +1 -1
- package/dist/components/BulletText/BulletText.stories.d.ts.map +1 -1
- package/dist/components/Button/Button.js +4 -4
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/ColourInput/ColourInput.js +4 -4
- package/dist/components/Columns/Column.d.ts +13 -14
- package/dist/components/Columns/Column.d.ts.map +1 -1
- package/dist/components/Columns/Column.js +23 -37
- package/dist/components/Columns/Columns.css.d.ts +18 -6
- package/dist/components/Columns/Columns.css.d.ts.map +1 -1
- package/dist/components/Columns/Columns.css.js +46 -34
- package/dist/components/Columns/Columns.d.ts +13 -24
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/Columns/Columns.js +31 -40
- package/dist/components/Columns/Columns.stories.d.ts +7 -904
- package/dist/components/Columns/Columns.stories.d.ts.map +1 -1
- package/dist/components/Columns/index.d.ts +2 -2
- package/dist/components/Columns/index.d.ts.map +1 -1
- package/dist/components/Columns/index.js +2 -2
- package/dist/components/DateInput/DateInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +3 -3
- package/dist/components/DividerLine/DividerLine.js +2 -2
- package/dist/components/DropDown/DropDown.stories.d.ts +5 -5
- package/dist/components/DropDown/DropDown.stories.d.ts.map +1 -1
- package/dist/components/DropDown/DropDownOption.js +2 -2
- package/dist/components/DropDown/DropDownOptionsList.js +2 -1
- package/dist/components/EditableText/EditableText.d.ts +2 -2
- package/dist/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.js +2 -2
- package/dist/components/EditableText/EditableText.stories.d.ts +1 -1
- package/dist/components/EditableText/EditableText.stories.d.ts.map +1 -1
- package/dist/components/FillHeightBox/FillHeightBox.stories.d.ts +1 -1
- package/dist/components/Flyout/Flyout.stories.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +4 -4
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +10 -12
- package/dist/components/Heading/Heading.stories.d.ts +1 -8
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts +12 -0
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +33 -0
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +5 -4
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +46 -35
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Inline/Inline.d.ts +13 -13
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +54 -55
- package/dist/components/Inline/Inline.stories.d.ts +3 -32
- package/dist/components/Inline/Inline.stories.d.ts.map +1 -1
- package/dist/components/Inline/index.d.ts +1 -1
- package/dist/components/Inline/index.d.ts.map +1 -1
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/IntentStripe/IntentStripe.d.ts +1 -2
- package/dist/components/IntentStripe/IntentStripe.d.ts.map +1 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.d.ts.map +1 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +1 -0
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts +394 -431
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts.map +1 -1
- package/dist/components/Meta/Meta.js +1 -1
- package/dist/components/MinimalModal/MinimalModal.css.d.ts +1 -1
- package/dist/components/MinimalModal/MinimalModal.stories.d.ts +6 -1
- package/dist/components/MinimalModal/MinimalModal.stories.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
- package/dist/components/NumberBubble/NumberBubble.js +3 -3
- package/dist/components/OptionGrid/OptionGrid.css.js +1 -1
- package/dist/components/OptionList/OptionList.d.ts +2 -2
- package/dist/components/OptionList/OptionListItem.js +1 -1
- package/dist/components/Pagination/Bubble.js +1 -1
- package/dist/components/Pagination/Pagination.js +3 -3
- package/dist/components/ProgressSpinner/ProgressSpinner.js +3 -3
- package/dist/components/ScrollPane/ScrollPane.d.ts +3 -3
- package/dist/components/ScrollPane/ScrollPane.d.ts.map +1 -1
- package/dist/components/ScrollPane/ScrollPane.js +1 -2
- package/dist/components/ScrollPane/ScrollPane.stories.d.ts +1 -1
- package/dist/components/ScrollPane/ScrollPane.stories.d.ts.map +1 -1
- package/dist/components/Section/Section.d.ts +4 -5
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/Section/Section.js +18 -13
- package/dist/components/Section/Section.stories.d.ts +1 -1
- package/dist/components/SimplePagination/SimplePagination.js +1 -1
- package/dist/components/SliderProgress/ProgressStep.js +2 -1
- package/dist/components/SliderProgress/SliderProgress.js +2 -1
- package/dist/components/SliderProgress/SliderProgress.stories.d.ts +1 -1
- package/dist/components/Stack/Divider.css.d.ts +1 -1
- package/dist/components/Stack/Divider.css.d.ts.map +1 -1
- package/dist/components/Stack/Divider.css.js +8 -3
- package/dist/components/Stack/Stack.d.ts +8 -9
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +50 -35
- package/dist/components/Stack/Stack.stories.d.ts +2 -17
- package/dist/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/components/StandardModal/StandardModal.js +2 -2
- package/dist/components/StarRating/StarRating.d.ts.map +1 -1
- package/dist/components/StarRating/StarRating.js +3 -2
- package/dist/components/Stepper/Stepper.css.d.ts +1 -2
- package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.css.js +7 -12
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +15 -30
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Table/TableCell.js +2 -2
- package/dist/components/Table/TableHeadCell.d.ts +1 -1
- package/dist/components/Table/TableHeadCell.d.ts.map +1 -1
- package/dist/components/Table/TableHeadCell.js +4 -2
- package/dist/components/Tabs/Tab.js +5 -5
- package/dist/components/Text/Text.d.ts +4 -2
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +2 -5
- package/dist/components/Text/Text.stories.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.css.d.ts +1 -1
- package/dist/components/Text/useTextStyles.css.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.css.js +5 -1
- package/dist/components/Text/useTextStyles.d.ts +4 -5
- package/dist/components/Text/useTextStyles.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.js +3 -4
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.js +7 -6
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +3 -3
- package/dist/components/TextContainer/TextContainer.d.ts +0 -1
- package/dist/components/TextContainer/TextContainer.d.ts.map +1 -1
- package/dist/components/TextContainer/TextContainer.js +13 -25
- package/dist/components/TextContainer/TextContainer.stories.d.ts +3 -6
- package/dist/components/TextContainer/TextContainer.stories.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.d.ts +2 -2
- package/dist/components/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.js +8 -8
- package/dist/components/TextLink/TextLink.stories.d.ts +27 -22
- package/dist/components/TextLink/TextLink.stories.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +5 -4
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +9 -3
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +1 -5
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts.map +1 -1
- package/dist/components/private/CheckableBase/CheckableBase.d.ts.map +1 -1
- package/dist/components/private/CheckableBase/CheckableBase.js +10 -10
- package/dist/components/private/InputBase/HintText.js +5 -5
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +3 -3
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +4 -4
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useDeepCompareMemo/index.d.ts +2 -0
- package/dist/hooks/useDeepCompareMemo/index.d.ts.map +1 -0
- package/dist/hooks/useDeepCompareMemo/index.js +13 -0
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts +1 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts.map +1 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts +1 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts.map +1 -1
- package/dist/reset/globalReset.css.js +30 -13
- package/dist/reset/reset.css.d.ts.map +1 -1
- package/dist/reset/reset.css.js +94 -37
- package/dist/stories/helpers/index.d.ts +1 -1
- package/dist/stories/helpers/index.d.ts.map +1 -1
- package/dist/stories/helpers/sprinkles.css.d.ts +1 -1
- package/dist/stories/helpers/stack.css.d.ts.map +1 -0
- package/dist/styles/layers.css.d.ts +2 -0
- package/dist/styles/layers.css.d.ts.map +1 -1
- package/dist/styles/layers.css.js +2 -0
- package/dist/styles/sprinkles.css.d.ts +405 -71
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +193 -19
- package/dist/styles/vars.css.d.ts +2 -0
- package/dist/styles/vars.css.d.ts.map +1 -0
- package/dist/styles/vars.css.js +7 -0
- package/dist/test/vitest.setup.d.ts +2 -0
- package/dist/test/vitest.setup.d.ts.map +1 -0
- package/dist/themes/makeTheme.d.ts +1 -0
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/makeTheme.js +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/sprinkles.d.ts +11 -0
- package/dist/utils/sprinkles.d.ts.map +1 -0
- package/dist/utils/sprinkles.js +34 -0
- package/package.json +26 -23
- package/dist/components/Box/useBoxStyles.css.d.ts +0 -48
- package/dist/components/Box/useBoxStyles.css.d.ts.map +0 -1
- package/dist/components/Box/useBoxStyles.css.js +0 -141
- package/dist/components/Box/useBoxStyles.d.ts +0 -69
- package/dist/components/Box/useBoxStyles.d.ts.map +0 -1
- package/dist/components/Box/useBoxStyles.js +0 -80
- package/dist/components/Columns/Column.css.d.ts +0 -3
- package/dist/components/Columns/Column.css.d.ts.map +0 -1
- package/dist/components/Columns/Column.css.js +0 -35
- package/dist/components/Stack/Divider.d.ts +0 -3
- package/dist/components/Stack/Divider.d.ts.map +0 -1
- package/dist/components/Stack/Divider.js +0 -14
- package/dist/components/Stack/Stack.css.d.ts +0 -5
- package/dist/components/Stack/Stack.css.d.ts.map +0 -1
- package/dist/components/Stack/Stack.css.js +0 -18
- package/dist/styles/stack.css.d.ts.map +0 -1
- package/dist/styles/stack.css.js +0 -44
- package/dist/test/vitest-setup.d.ts +0 -2
- package/dist/test/vitest-setup.d.ts.map +0 -1
- /package/dist/{styles → stories/helpers}/stack.css.d.ts +0 -0
- /package/dist/test/{vitest-setup.js → vitest.setup.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Columns.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAU,OAAO,EAAE,MAAM,GAAG,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAwC9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,QAAQ,EAAE,KAqEtB,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,KAqE5B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './Columns';
|
|
2
|
+
export * from './Column';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const DateInput = withEnhancedInput(_ref => {
|
|
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
24
|
process.env.NODE_ENV !== "production" ? warning(field.value !== '', 'Date Input does not support empty values.') : void 0;
|
|
25
25
|
return _jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
26
|
-
|
|
26
|
+
as: "input"
|
|
27
27
|
}, eventHandlers), field), rest), {}, {
|
|
28
28
|
autoComplete: "off",
|
|
29
29
|
type: "date"
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { CalendarIcon } from '@autoguru/icons';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import * as React from 'react';
|
|
11
|
-
import { Box,
|
|
11
|
+
import { Box, boxStyles } from "../Box/index.js";
|
|
12
12
|
import { Icon } from "../Icon/index.js";
|
|
13
13
|
import { ProgressSpinner } from "../ProgressSpinner/index.js";
|
|
14
14
|
import { Text } from "../Text/index.js";
|
|
@@ -43,10 +43,10 @@ export const DatePicker = _ref => {
|
|
|
43
43
|
[styles.disabled.root]: disabled
|
|
44
44
|
}),
|
|
45
45
|
children: [_jsx(Box, _objectSpread({
|
|
46
|
+
as: "input",
|
|
46
47
|
position: "absolute",
|
|
47
48
|
height: "full",
|
|
48
49
|
width: "full",
|
|
49
|
-
is: "input",
|
|
50
50
|
disabled: disabled,
|
|
51
51
|
onChange: onChangeEvent,
|
|
52
52
|
className: clsx({
|
|
@@ -58,7 +58,7 @@ export const DatePicker = _ref => {
|
|
|
58
58
|
[styles.contents.withLabel]: Boolean(valueLabel)
|
|
59
59
|
}),
|
|
60
60
|
children: [isLoading ? _jsx(ProgressSpinner, {
|
|
61
|
-
className: clsx(styles.spinner,
|
|
61
|
+
className: clsx(styles.spinner, boxStyles({
|
|
62
62
|
position: 'absolute'
|
|
63
63
|
})),
|
|
64
64
|
size: size
|
|
@@ -19,7 +19,7 @@ export const DividerLine = _ref => {
|
|
|
19
19
|
[styles.size.horizontal[size]]: !isVertical,
|
|
20
20
|
[styles.size.vertical[size]]: isVertical
|
|
21
21
|
}),
|
|
22
|
-
marginY: isVertical ?
|
|
23
|
-
marginX: isVertical ? space :
|
|
22
|
+
marginY: isVertical ? undefined : space,
|
|
23
|
+
marginX: isVertical ? space : undefined
|
|
24
24
|
});
|
|
25
25
|
};
|
|
@@ -13,20 +13,20 @@ declare const meta: {
|
|
|
13
13
|
size?: import("../Button/Button.css").ButtonSize | undefined;
|
|
14
14
|
disabled?: boolean | undefined;
|
|
15
15
|
key?: React.Key | null | undefined;
|
|
16
|
-
className?: string | undefined | undefined;
|
|
17
|
-
type?: "submit" | "reset" | "button" | undefined | undefined;
|
|
18
16
|
id?: string | undefined | undefined;
|
|
19
|
-
lang?: Partial<Record<"loading", string>> | undefined;
|
|
20
|
-
"aria-label"?: string | undefined | undefined;
|
|
21
17
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
18
|
+
className?: string | undefined | undefined;
|
|
22
19
|
testId?: string | undefined;
|
|
20
|
+
lang?: Partial<Record<"loading", string>> | undefined;
|
|
21
|
+
"aria-label"?: string | undefined | undefined;
|
|
22
|
+
type?: "submit" | "reset" | "button" | undefined | undefined;
|
|
23
23
|
rounded?: boolean | undefined;
|
|
24
24
|
minimal?: import("../Button/Button.css").ButtonMinimal | undefined;
|
|
25
25
|
isLoading?: boolean | undefined;
|
|
26
26
|
isFullWidth?: boolean | undefined;
|
|
27
27
|
withDoubleClicks?: boolean | undefined;
|
|
28
28
|
variant?: import("../Button/Button.css").ButtonIntent | undefined;
|
|
29
|
-
alignment
|
|
29
|
+
alignment: any;
|
|
30
30
|
}>) => React.JSX.Element)[];
|
|
31
31
|
args: {
|
|
32
32
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDown.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/DropDown/DropDown.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMnC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqCF,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE;;;;;;;CAoBjB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DropDown.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/DropDown/DropDown.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMnC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqCF,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE;;;;;;;CAoBjB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAc7B,CAAC"}
|
|
@@ -22,7 +22,7 @@ export const DropDownOption = _ref => {
|
|
|
22
22
|
display = 'flex',
|
|
23
23
|
iconColour = 'dark',
|
|
24
24
|
is = 'button',
|
|
25
|
-
alignItems = '
|
|
25
|
+
alignItems = 'center',
|
|
26
26
|
width = 'full'
|
|
27
27
|
} = _ref,
|
|
28
28
|
boxProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -44,7 +44,7 @@ export const DropDownOption = _ref => {
|
|
|
44
44
|
noWrap: true,
|
|
45
45
|
space: "2",
|
|
46
46
|
width: "full",
|
|
47
|
-
alignX: "
|
|
47
|
+
alignX: "space-between",
|
|
48
48
|
alignY: "center",
|
|
49
49
|
children: [_jsx(Text, {
|
|
50
50
|
is: "p",
|
|
@@ -4,12 +4,12 @@ import { Box } from '../Box';
|
|
|
4
4
|
import { Text } from '../Text';
|
|
5
5
|
type BoxProps = Pick<ComponentProps<typeof Box>, 'display' | 'onFocus' | 'onBlur' | 'onKeyDown'>;
|
|
6
6
|
type TextProps = Pick<ComponentProps<typeof Text>, 'is' | 'colour' | 'size' | 'children' | 'noWrap'>;
|
|
7
|
-
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'style' | 'is' | 'autoFocus' | 'width' | 'height' | 'onFocus' | 'onBlur' | 'onKeyDown' | keyof TextProps | keyof BoxProps>;
|
|
7
|
+
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'color' | 'style' | 'is' | 'autoFocus' | 'width' | 'height' | 'onFocus' | 'onBlur' | 'onKeyDown' | keyof TextProps | keyof BoxProps>;
|
|
8
8
|
export interface Props extends TextProps, InputProps, BoxProps {
|
|
9
9
|
className?: string;
|
|
10
10
|
onModeChange?: (mode: InputMode) => void;
|
|
11
11
|
}
|
|
12
12
|
type InputMode = 'TEXT' | 'INPUT';
|
|
13
|
-
export declare const EditableText: React.ForwardRefExoticComponent<Props & React.RefAttributes<
|
|
13
|
+
export declare const EditableText: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
export default EditableText;
|
|
15
15
|
//# sourceMappingURL=EditableText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../../../lib/components/EditableText/EditableText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEN,cAAc,EAEd,mBAAmB,EAKnB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAiB,MAAM,SAAS,CAAC;AAK9C,KAAK,QAAQ,GAAG,IAAI,CACnB,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAC9C,CAAC;AACF,KAAK,SAAS,GAAG,IAAI,CACpB,cAAc,CAAC,OAAO,IAAI,CAAC,EAC3B,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAChD,CAAC;AACF,KAAK,UAAU,GAAG,IAAI,CACrB,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,OAAO,GACP,IAAI,GACJ,WAAW,GACX,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,WAAW,GACX,MAAM,SAAS,GACf,MAAM,QAAQ,CAChB,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,UAAU,EAAE,QAAQ;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAED,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAClC,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../../../lib/components/EditableText/EditableText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEN,cAAc,EAEd,mBAAmB,EAKnB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAiB,MAAM,SAAS,CAAC;AAK9C,KAAK,QAAQ,GAAG,IAAI,CACnB,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAC9C,CAAC;AACF,KAAK,SAAS,GAAG,IAAI,CACpB,cAAc,CAAC,OAAO,IAAI,CAAC,EAC3B,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAChD,CAAC;AACF,KAAK,UAAU,GAAG,IAAI,CACrB,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,OAAO,GACP,OAAO,GACP,IAAI,GACJ,WAAW,GACX,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,WAAW,GACX,MAAM,SAAS,GACf,MAAM,QAAQ,CAChB,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,UAAU,EAAE,QAAQ;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAED,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAClC,eAAO,MAAM,YAAY,8EAsHxB,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -20,7 +20,7 @@ export const EditableText = forwardRef((_ref, ref) => {
|
|
|
20
20
|
is,
|
|
21
21
|
colour = 'muted',
|
|
22
22
|
size,
|
|
23
|
-
display = '
|
|
23
|
+
display = 'inline-block',
|
|
24
24
|
value,
|
|
25
25
|
onFocus,
|
|
26
26
|
onBlur,
|
|
@@ -100,7 +100,7 @@ export const EditableText = forwardRef((_ref, ref) => {
|
|
|
100
100
|
})), _jsx(Text, {
|
|
101
101
|
noWrap: true,
|
|
102
102
|
ref: textRef,
|
|
103
|
-
|
|
103
|
+
as: is,
|
|
104
104
|
colour: colour,
|
|
105
105
|
size: size,
|
|
106
106
|
className: clsx(textStyles, styles.text, {
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<import("./EditableText").Props & React.RefAttributes<
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./EditableText").Props & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
argTypes: {
|
|
7
7
|
colour: {
|
|
8
8
|
options: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableText.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/EditableText/EditableText.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAY2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAcnC,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"EditableText.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/EditableText/EditableText.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAY2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAcnC,eAAO,MAAM,IAAI,EAAE,KAuBlB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAQ9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { FillHeightBox } from './FillHeightBox';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.FunctionComponent<Omit<import("../../hooks/useWindowHeightFill/useWindowHeightFill").UseWindowHeightFillProps, "containerRef"> & import("../ScrollPane/ScrollPane").Props
|
|
6
|
+
component: React.FunctionComponent<Omit<import("../../hooks/useWindowHeightFill/useWindowHeightFill").UseWindowHeightFillProps, "containerRef"> & Omit<import("../ScrollPane/ScrollPane").Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
type Story = StoryObj<typeof FillHeightBox>;
|
|
@@ -4,7 +4,7 @@ import { EAlignment } from '../Positioner/alignment';
|
|
|
4
4
|
import { Flyout } from '.';
|
|
5
5
|
declare const meta: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: React.FunctionComponent<import("../Positioner/Positioner").Props
|
|
7
|
+
component: React.FunctionComponent<Omit<import("../Positioner/Positioner").Props, "ref">>;
|
|
8
8
|
argTypes: {
|
|
9
9
|
alignment: {
|
|
10
10
|
options: EAlignment[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ThemeTokens as Tokens } from '../../themes';
|
|
3
3
|
import type { WithTestId } from '../../types';
|
|
4
|
-
import { type
|
|
4
|
+
import { type UseBoxProps } from '../Box';
|
|
5
5
|
import type { TextStyleProps } from '../Text';
|
|
6
|
-
export interface HeadingProps extends Omit<TextStyleProps, '
|
|
7
|
-
|
|
6
|
+
export interface HeadingProps extends Omit<TextStyleProps, 'as'>, Pick<UseBoxProps, 'children' | 'className' | 'id' | 'ref'> {
|
|
7
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
8
8
|
colour?: Exclude<keyof Tokens['typography']['colour'], 'muted'>;
|
|
9
9
|
}
|
|
10
|
-
export declare const Heading: ({
|
|
10
|
+
export declare const Heading: ({ as, breakWord, children, className, colour, fontWeight, id, noWrap, size, testId, transform, }: WithTestId<HeadingProps>) => React.JSX.Element;
|
|
11
11
|
export default Heading;
|
|
12
12
|
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../lib/components/Heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../lib/components/Heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAO,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,MAAM,WAAW,YAChB,SAAQ,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,EACjC,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC;IAC3D,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;CAChE;AAWD,eAAO,MAAM,OAAO,GAAI,kGAYrB,UAAU,CAAC,YAAY,CAAC,sBAmB1B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -18,25 +18,23 @@ const sizeScaleDefaults = {
|
|
|
18
18
|
};
|
|
19
19
|
export const Heading = _ref => {
|
|
20
20
|
let {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
as = 'h1',
|
|
22
|
+
breakWord,
|
|
23
|
+
children,
|
|
24
|
+
className,
|
|
25
|
+
colour = 'dark',
|
|
25
26
|
fontWeight = 'bold',
|
|
27
|
+
id,
|
|
26
28
|
noWrap,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
breakWord,
|
|
31
|
-
className = '',
|
|
32
|
-
children
|
|
29
|
+
size = sizeScaleDefaults[as],
|
|
30
|
+
testId,
|
|
31
|
+
transform
|
|
33
32
|
} = _ref;
|
|
34
33
|
return _jsx(Box, _objectSpread(_objectSpread({
|
|
34
|
+
as: as,
|
|
35
35
|
id: id,
|
|
36
|
-
as: is,
|
|
37
36
|
className: [useTextStyles({
|
|
38
37
|
size,
|
|
39
|
-
align,
|
|
40
38
|
colour,
|
|
41
39
|
noWrap,
|
|
42
40
|
transform,
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Heading } from '.';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({
|
|
6
|
+
component: ({ as, breakWord, children, className, colour, fontWeight, id, noWrap, size, testId, transform, }: import("../../types").WithTestId<import("./Heading").HeadingProps>) => React.JSX.Element;
|
|
7
7
|
argTypes: {
|
|
8
8
|
noWrap: {
|
|
9
9
|
options: (boolean | undefined)[];
|
|
@@ -40,13 +40,6 @@ declare const _default: {
|
|
|
40
40
|
type: "select";
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
align: {
|
|
44
|
-
options: ("left" | "right" | "center" | undefined)[];
|
|
45
|
-
defaultValue: string;
|
|
46
|
-
control: {
|
|
47
|
-
type: "select";
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
43
|
colour: {
|
|
51
44
|
options: ("link" | "white" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark" | undefined)[];
|
|
52
45
|
defaultValue: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Heading/Heading.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"Heading.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Heading/Heading.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsD5B,wBA4DiC;AAEjC,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC"}
|
|
@@ -2,6 +2,18 @@ export declare const controllerBtn: string;
|
|
|
2
2
|
export declare const controllerCol: string;
|
|
3
3
|
export declare const prevBtn: string;
|
|
4
4
|
export declare const nextBtn: string;
|
|
5
|
+
export declare const itemMinWidth: string;
|
|
5
6
|
export declare const item: string;
|
|
6
7
|
export declare const active: string;
|
|
8
|
+
export declare const sprinklesColumnWidth: ((props: {
|
|
9
|
+
flexBasis?: ("full" | "auto" | "1/2" | "1/3" | "2/3" | "1/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | {
|
|
10
|
+
mobile?: "full" | "auto" | "1/2" | "1/3" | "2/3" | "1/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | undefined;
|
|
11
|
+
tablet?: "full" | "auto" | "1/2" | "1/3" | "2/3" | "1/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | undefined;
|
|
12
|
+
desktop?: "full" | "auto" | "1/2" | "1/3" | "2/3" | "1/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | undefined;
|
|
13
|
+
largeDesktop?: "full" | "auto" | "1/2" | "1/3" | "2/3" | "1/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | undefined;
|
|
14
|
+
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "full" | "auto" | "1/2" | "1/3" | "2/3" | "1/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | null>;
|
|
15
|
+
}) => string) & {
|
|
16
|
+
properties: Set<"flexBasis">;
|
|
17
|
+
};
|
|
18
|
+
export type SprinklesColumnWidth = Parameters<typeof sprinklesColumnWidth>[0];
|
|
7
19
|
//# sourceMappingURL=HorizontalAutoScroller.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalAutoScroller.css.d.ts","sourceRoot":"","sources":["../../../lib/components/HorizontalAutoScroller/HorizontalAutoScroller.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HorizontalAutoScroller.css.d.ts","sourceRoot":"","sources":["../../../lib/components/HorizontalAutoScroller/HorizontalAutoScroller.css.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa,QAKxB,CAAC;AAEH,eAAO,MAAM,aAAa,QAExB,CAAC;AAEH,eAAO,MAAM,OAAO,QAIlB,CAAC;AAEH,eAAO,MAAM,OAAO,QAIlB,CAAC;AAEH,eAAO,MAAM,YAAY,QAOvB,CAAC;AAEH,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,MAAM,QAGjB,CAAC;AAyBH,eAAO,MAAM,oBAAoB;;;;;;;;;CAA+B,CAAC;AACjE,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/HorizontalAutoScroller/HorizontalAutoScroller.css.ts", "@autoguru/overdrive");
|
|
5
5
|
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { createSprinkles, defineProperties } from '@vanilla-extract/sprinkles';
|
|
7
|
+
import { responsiveConditions } from "../../styles/sprinkles.css.js";
|
|
8
|
+
import { mediaQuery } from "../../themes/makeTheme.js";
|
|
6
9
|
import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
7
10
|
const actionWidth = 50;
|
|
8
11
|
export const controllerBtn = style({
|
|
@@ -22,6 +25,14 @@ export const nextBtn = style({
|
|
|
22
25
|
right: 0,
|
|
23
26
|
background: 'linear-gradient(-90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.6769301470588236) 70%, rgba(255,255,255,0) 100%)'
|
|
24
27
|
}, "nextBtn");
|
|
28
|
+
export const itemMinWidth = style({
|
|
29
|
+
minWidth: '50vw',
|
|
30
|
+
'@media': {
|
|
31
|
+
[mediaQuery.tablet]: {
|
|
32
|
+
minWidth: 'auto'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, "itemMinWidth");
|
|
25
36
|
export const item = style({
|
|
26
37
|
userSelect: 'none',
|
|
27
38
|
willChange: 'transform',
|
|
@@ -33,4 +44,26 @@ export const active = style({
|
|
|
33
44
|
transform: 'scale(1)',
|
|
34
45
|
opacity: 1
|
|
35
46
|
}, "active");
|
|
47
|
+
const getSizeStyle = scale => `${scale * 100}%`;
|
|
48
|
+
const columnWidth = defineProperties({
|
|
49
|
+
conditions: responsiveConditions,
|
|
50
|
+
defaultCondition: 'mobile',
|
|
51
|
+
responsiveArray: ['mobile', 'tablet', 'desktop', 'largeDesktop'],
|
|
52
|
+
properties: {
|
|
53
|
+
flexBasis: {
|
|
54
|
+
'1/2': getSizeStyle(1 / 2),
|
|
55
|
+
'1/3': getSizeStyle(1 / 3),
|
|
56
|
+
'2/3': getSizeStyle(2 / 3),
|
|
57
|
+
'1/4': getSizeStyle(1 / 4),
|
|
58
|
+
'3/4': getSizeStyle(3 / 4),
|
|
59
|
+
'1/5': getSizeStyle(1 / 5),
|
|
60
|
+
'2/5': getSizeStyle(2 / 5),
|
|
61
|
+
'3/5': getSizeStyle(3 / 5),
|
|
62
|
+
'4/5': getSizeStyle(4 / 5),
|
|
63
|
+
full: getSizeStyle(1),
|
|
64
|
+
auto: 'auto'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export const sprinklesColumnWidth = createSprinkles(columnWidth);
|
|
36
69
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ComponentProps, FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SprinklesResponsive } from '../../styles/sprinkles.css';
|
|
3
3
|
import { SliderProgress } from '../SliderProgress';
|
|
4
|
+
import * as styles from './HorizontalAutoScroller.css';
|
|
4
5
|
import { UseHorizontalAutoScrollerProps } from './useHorizontalAutoScroller';
|
|
5
|
-
export interface Props extends
|
|
6
|
+
export interface Props extends Omit<UseHorizontalAutoScrollerProps, 'itemsRef'> {
|
|
6
7
|
durationSeconds?: number;
|
|
7
8
|
className?: string;
|
|
8
|
-
columnWidth?:
|
|
9
|
+
columnWidth?: styles.SprinklesColumnWidth['flexBasis'];
|
|
9
10
|
sliderProgressColour?: ComponentProps<typeof SliderProgress>['backgroundColour'];
|
|
10
11
|
noControls?: boolean;
|
|
12
|
+
space?: SprinklesResponsive['gap'];
|
|
11
13
|
children: ReactNode | ReactNode[];
|
|
12
14
|
}
|
|
13
15
|
export declare const HorizontalAutoScroller: FunctionComponent<Props>;
|
|
14
|
-
export default HorizontalAutoScroller;
|
|
15
16
|
//# sourceMappingURL=HorizontalAutoScroller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalAutoScroller.d.ts","sourceRoot":"","sources":["../../../lib/components/HorizontalAutoScroller/HorizontalAutoScroller.tsx"],"names":[],"mappings":"AAGA,OAAO,EACN,cAAc,EACd,iBAAiB,EACjB,SAAS,EAGT,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HorizontalAutoScroller.d.ts","sourceRoot":"","sources":["../../../lib/components/HorizontalAutoScroller/HorizontalAutoScroller.tsx"],"names":[],"mappings":"AAGA,OAAO,EACN,cAAc,EACd,iBAAiB,EACjB,SAAS,EAGT,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAKjE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAEN,8BAA8B,EAC9B,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,KAChB,SAAQ,IAAI,CAAC,8BAA8B,EAAE,UAAU,CAAC;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACvD,oBAAoB,CAAC,EAAE,cAAc,CACpC,OAAO,cAAc,CACrB,CAAC,kBAAkB,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnC,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,KAAK,CAqL3D,CAAC"}
|
|
@@ -11,11 +11,9 @@ import flattenChildren from 'react-keyed-flatten-children';
|
|
|
11
11
|
import { useSwipeable } from 'react-swipeable';
|
|
12
12
|
import { Box } from "../Box/index.js";
|
|
13
13
|
import { Button } from "../Button/index.js";
|
|
14
|
-
import { Column, Columns } from "../Columns/index.js";
|
|
15
14
|
import { Icon } from "../Icon/index.js";
|
|
16
|
-
import Section from "../Section/Section.js";
|
|
15
|
+
import { Section } from "../Section/Section.js";
|
|
17
16
|
import { SliderProgress } from "../SliderProgress/index.js";
|
|
18
|
-
import { Stack } from "../Stack/index.js";
|
|
19
17
|
import * as styles from "./HorizontalAutoScroller.css.js";
|
|
20
18
|
import { useHorizontalAutoScroller } from "./useHorizontalAutoScroller.js";
|
|
21
19
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -23,7 +21,7 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
23
21
|
let {
|
|
24
22
|
sliderProgressColour = 'primary',
|
|
25
23
|
noControls = false,
|
|
26
|
-
space = '5',
|
|
24
|
+
space = ['7', '5'],
|
|
27
25
|
durationSeconds = 10,
|
|
28
26
|
children,
|
|
29
27
|
itemsPerPage: incomingItemsPerPage,
|
|
@@ -37,20 +35,27 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
37
35
|
const [itemsRef, setItemsRef] = useState();
|
|
38
36
|
const items = useMemo(() => {
|
|
39
37
|
const itemsRef = [];
|
|
40
|
-
const list = incomingItems.map((item, index) => _jsx(
|
|
38
|
+
const list = incomingItems.map((item, index) => _jsx(Box, {
|
|
41
39
|
ref: el => {
|
|
42
40
|
if (el) itemsRef.push(el);
|
|
43
41
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
justifyContent: "stretch",
|
|
42
|
+
flexGrow: 0,
|
|
43
|
+
flexShrink: 0,
|
|
47
44
|
alignSelf: "stretch",
|
|
45
|
+
className: clsx(styles.itemMinWidth, styles.sprinklesColumnWidth({
|
|
46
|
+
flexBasis: columnWidth
|
|
47
|
+
})),
|
|
48
48
|
children: _jsx(Box, {
|
|
49
|
+
display: "flex",
|
|
50
|
+
height: "full",
|
|
49
51
|
width: "full",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
children: _jsx(Box, {
|
|
53
|
+
width: "full",
|
|
54
|
+
className: clsx(styles.item, {
|
|
55
|
+
[styles.active]: index === activeIndex
|
|
56
|
+
}),
|
|
57
|
+
children: item
|
|
58
|
+
})
|
|
54
59
|
})
|
|
55
60
|
}, index));
|
|
56
61
|
setItemsRef(itemsRef);
|
|
@@ -83,9 +88,13 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
83
88
|
children: items
|
|
84
89
|
});
|
|
85
90
|
}
|
|
86
|
-
return _jsxs(
|
|
91
|
+
return _jsxs(Box, {
|
|
92
|
+
alignItems: "stretch",
|
|
87
93
|
className: className,
|
|
88
|
-
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexDirection: "column",
|
|
96
|
+
gap: "5",
|
|
97
|
+
odComponent: "horizontal-auto-scroller",
|
|
89
98
|
children: [_jsxs(Box, _objectSpread(_objectSpread({
|
|
90
99
|
overflow: "hidden",
|
|
91
100
|
position: "relative"
|
|
@@ -101,7 +110,7 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
101
110
|
className: [styles.controllerBtn, styles.prevBtn],
|
|
102
111
|
display: "flex",
|
|
103
112
|
alignItems: "center",
|
|
104
|
-
justifyContent: "
|
|
113
|
+
justifyContent: "flex-start",
|
|
105
114
|
position: "absolute",
|
|
106
115
|
children: _jsx(Button, {
|
|
107
116
|
rounded: true,
|
|
@@ -115,18 +124,19 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
115
124
|
icon: ChevronLeftIcon
|
|
116
125
|
})
|
|
117
126
|
})
|
|
118
|
-
}), _jsxs(
|
|
119
|
-
|
|
127
|
+
}), _jsxs(Box, {
|
|
128
|
+
alignItems: "stretch",
|
|
129
|
+
display: "flex",
|
|
120
130
|
overflow: "hidden",
|
|
121
|
-
|
|
131
|
+
px: ['7', '8'],
|
|
132
|
+
flexWrap: "nowrap",
|
|
122
133
|
width: "full",
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
gap: space,
|
|
135
|
+
ref: containerRef,
|
|
136
|
+
children: [noControls ? null : _jsx(Box, {
|
|
126
137
|
className: styles.controllerCol,
|
|
127
138
|
children: _jsx("span", {})
|
|
128
|
-
}), items, noControls ? null : _jsx(
|
|
129
|
-
noShrink: true,
|
|
139
|
+
}), items, noControls ? null : _jsx(Box, {
|
|
130
140
|
className: styles.controllerCol,
|
|
131
141
|
children: _jsx("span", {})
|
|
132
142
|
})]
|
|
@@ -134,7 +144,7 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
134
144
|
className: [styles.controllerBtn, styles.nextBtn],
|
|
135
145
|
display: "flex",
|
|
136
146
|
alignItems: "center",
|
|
137
|
-
justifyContent: "
|
|
147
|
+
justifyContent: "flex-end",
|
|
138
148
|
position: "absolute",
|
|
139
149
|
children: _jsx(Button, {
|
|
140
150
|
rounded: true,
|
|
@@ -149,17 +159,18 @@ export const HorizontalAutoScroller = _ref => {
|
|
|
149
159
|
})
|
|
150
160
|
})
|
|
151
161
|
})]
|
|
152
|
-
})), _jsx(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
162
|
+
})), _jsx(Box, {
|
|
163
|
+
children: _jsx(Section, {
|
|
164
|
+
width: "small",
|
|
165
|
+
children: _jsx(SliderProgress, {
|
|
166
|
+
backgroundColour: sliderProgressColour,
|
|
167
|
+
duration: `${durationSeconds}s`,
|
|
168
|
+
paused: paused,
|
|
169
|
+
onRequestNext: next,
|
|
170
|
+
totalCount: pageCount,
|
|
171
|
+
activeIndex: activePage || 0
|
|
172
|
+
})
|
|
161
173
|
})
|
|
162
174
|
})]
|
|
163
175
|
});
|
|
164
|
-
};
|
|
165
|
-
export default HorizontalAutoScroller;
|
|
176
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { IconType } from '@autoguru/icons';
|
|
2
2
|
import type { FunctionComponent, ReactElement, SVGAttributes } from 'react';
|
|
3
3
|
import { ResponsiveProp } from '../../utils/responsiveProps.css';
|
|
4
|
-
import type {
|
|
4
|
+
import type { UseBoxProps } from '../Box';
|
|
5
5
|
import * as styles from './Icon.css';
|
|
6
6
|
export type IconEl = IconType | ReactElement<SVGAttributes<SVGElement>, 'svg'>;
|
|
7
7
|
export interface Props {
|
|
8
|
-
display?: Extract<
|
|
8
|
+
display?: Extract<UseBoxProps['display'], 'block' | 'inline-block'>;
|
|
9
9
|
className?: string;
|
|
10
10
|
size?: ResponsiveProp<keyof typeof styles.size | string>;
|
|
11
11
|
icon: IconEl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../lib/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../lib/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,KAAK,MAAM,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC;AAE/E,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,CAAC;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,IAAI,EAAE,iBAAiB,CAAC,KAAK,CA4BzC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { cloneElement } from 'react';
|
|
5
5
|
import { useNullCheck } from "../../hooks/useNullCheck/index.js";
|
|
6
6
|
import { resolveResponsiveStyle } from "../../utils/resolveResponsiveProps.js";
|
|
7
|
-
import { Box,
|
|
7
|
+
import { Box, boxStyles } from "../Box/index.js";
|
|
8
8
|
import * as styles from "./Icon.css.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export const Icon = _ref => {
|
|
@@ -17,7 +17,7 @@ export const Icon = _ref => {
|
|
|
17
17
|
} = _ref;
|
|
18
18
|
useNullCheck(icon, 'Icon component received an empty icon prop.');
|
|
19
19
|
const iconElement = cloneElement(icon, {
|
|
20
|
-
className:
|
|
20
|
+
className: boxStyles({
|
|
21
21
|
as: 'svg',
|
|
22
22
|
display: 'block',
|
|
23
23
|
width: 'full',
|