@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
|
@@ -7,7 +7,7 @@ import clsx from 'clsx';
|
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { cloneElement, createElement, forwardRef, isValidElement, useCallback, useEffect, useMemo, useState } from 'react';
|
|
9
9
|
import { dataAttrs } from "../../utils/dataAttrs.js";
|
|
10
|
-
import { Box,
|
|
10
|
+
import { Box, boxStyles } from "../Box/index.js";
|
|
11
11
|
import { Icon } from "../Icon/index.js";
|
|
12
12
|
import { ProgressSpinner } from "../ProgressSpinner/index.js";
|
|
13
13
|
import { useTextStyles } from "../Text/index.js";
|
|
@@ -84,9 +84,9 @@ export const Button = forwardRef((_ref, ref) => {
|
|
|
84
84
|
disabled: disabled || isLoading,
|
|
85
85
|
'aria-label': isLoading ? language.loading : ariaLabel,
|
|
86
86
|
'data-loading': isLoading ? '' : undefined,
|
|
87
|
-
className: clsx(
|
|
88
|
-
|
|
89
|
-
display: '
|
|
87
|
+
className: clsx(boxStyles({
|
|
88
|
+
as: typeof Component === 'string' ? Component : undefined,
|
|
89
|
+
display: 'inline-block',
|
|
90
90
|
overflow: 'hidden',
|
|
91
91
|
borderRadius: getBorderRadius(rounded),
|
|
92
92
|
textAlign: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Button/Button.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Button/Button.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAE3B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAsB7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAKF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AA2FF,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC"}
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { warning } from '@autoguru/utilities';
|
|
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 { Text } from "../Text/index.js";
|
|
13
13
|
import { withEnhancedInput } from "../private/InputBase/index.js";
|
|
14
14
|
import * as styles from "./ColourInput.css.js";
|
|
@@ -36,7 +36,7 @@ export const ColourInput = withEnhancedInput(_ref => {
|
|
|
36
36
|
display: "flex",
|
|
37
37
|
height: "full",
|
|
38
38
|
alignItems: "center",
|
|
39
|
-
justifyContent: "
|
|
39
|
+
justifyContent: "space-around",
|
|
40
40
|
flexShrink: 0,
|
|
41
41
|
pointerEvents: "none",
|
|
42
42
|
position: "absolute",
|
|
@@ -49,12 +49,12 @@ export const ColourInput = withEnhancedInput(_ref => {
|
|
|
49
49
|
})
|
|
50
50
|
}), _jsx(Text, {
|
|
51
51
|
display: "block",
|
|
52
|
-
className: clsx(styles.valueText, styles.valueTextSize[size],
|
|
52
|
+
className: clsx(styles.valueText, styles.valueTextSize[size], boxStyles({
|
|
53
53
|
position: 'absolute'
|
|
54
54
|
})),
|
|
55
55
|
children: field.value
|
|
56
56
|
}), _jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
57
|
-
|
|
57
|
+
as: "input",
|
|
58
58
|
type: "color",
|
|
59
59
|
flexGrow: 1
|
|
60
60
|
}, eventHandlers), field), rest), {}, {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
alignSelf?: keyof typeof styles.align;
|
|
11
|
-
className?: string;
|
|
12
|
-
children: ReactNode | ReactNode[];
|
|
1
|
+
import React, { type ElementType, type Ref } from 'react';
|
|
2
|
+
import { type SprinklesResponsive } from '../../styles/sprinkles.css';
|
|
3
|
+
import { type BoxBasedProps } from '../Box';
|
|
4
|
+
export interface ColumnProps<E extends ElementType> extends BoxBasedProps<E> {
|
|
5
|
+
alignSelf?: SprinklesResponsive['alignSelf'];
|
|
6
|
+
justifyContent?: SprinklesResponsive['justifyContent'];
|
|
7
|
+
order?: SprinklesResponsive['order'];
|
|
8
|
+
ref?: Ref<E>;
|
|
9
|
+
width?: SprinklesResponsive['gridColumn'];
|
|
13
10
|
}
|
|
14
|
-
export declare const Column:
|
|
15
|
-
|
|
11
|
+
export declare const Column: {
|
|
12
|
+
<E extends ElementType>({ alignSelf, children, justifyContent, order, width, ...props }: ColumnProps<E>): React.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
16
15
|
//# sourceMappingURL=Column.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Column.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Column.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAO,KAAK,aAAa,EAA4B,MAAM,QAAQ,CAAC;AAE3E,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IAC3E,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC7C,cAAc,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACvD,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACb,KAAK,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,MAAM;KAAI,CAAC,SAAS,WAAW,mEAOzC,WAAW,CAAC,CAAC,CAAC;;CAmBhB,CAAC"}
|
|
@@ -2,52 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["alignSelf", "children", "justifyContent", "order", "width"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { forwardRef, useContext } from 'react';
|
|
11
|
-
import { resolveResponsiveStyle } from "../../utils/resolveResponsiveProps.js";
|
|
12
|
-
import { Box } from "../Box/index.js";
|
|
13
|
-
import * as styles from "./Column.css.js";
|
|
14
|
-
import { ColumnContext } from "./Columns.js";
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Box, useBox } from "../Box/index.js";
|
|
15
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
export const Column =
|
|
11
|
+
export const Column = _ref => {
|
|
17
12
|
let {
|
|
18
|
-
className = '',
|
|
19
|
-
children,
|
|
20
|
-
width,
|
|
21
13
|
alignSelf,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
children,
|
|
15
|
+
justifyContent,
|
|
16
|
+
order,
|
|
17
|
+
width
|
|
26
18
|
} = _ref,
|
|
27
|
-
|
|
28
|
-
const columnsContext = useContext(ColumnContext);
|
|
29
|
-
!(columnsContext !== null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Column must be wrapped inside a Columns element') : invariant(false) : void 0;
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
20
|
const {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
Component,
|
|
22
|
+
componentProps
|
|
23
|
+
} = useBox(_objectSpread(_objectSpread({}, props), {}, {
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
height: 'full',
|
|
27
|
+
width: 'full'
|
|
28
|
+
}));
|
|
35
29
|
return _jsx(Box, {
|
|
36
|
-
|
|
30
|
+
alignSelf: alignSelf,
|
|
31
|
+
gridColumn: width,
|
|
32
|
+
justifyContent: justifyContent,
|
|
37
33
|
order: order,
|
|
38
|
-
|
|
39
|
-
flexShrink: noShrink ? 0 : void 0,
|
|
40
|
-
className: [spaceXCls, spaceYCls, resolveResponsiveStyle(width, styles.width), styles.align[alignSelf]],
|
|
41
|
-
children: _jsx(Box, _objectSpread(_objectSpread({
|
|
42
|
-
ref: ref,
|
|
43
|
-
is: is,
|
|
44
|
-
display: "flex",
|
|
45
|
-
width: "full",
|
|
46
|
-
height: "full",
|
|
47
|
-
className: className
|
|
48
|
-
}, boxProps), {}, {
|
|
34
|
+
children: _jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
49
35
|
children: children
|
|
50
36
|
}))
|
|
51
37
|
});
|
|
52
|
-
}
|
|
53
|
-
|
|
38
|
+
};
|
|
39
|
+
Column.displayName = 'Column';
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { type RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
export declare const columnWrapper: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
align: {
|
|
4
|
+
stretch: string;
|
|
5
|
+
top: string;
|
|
6
|
+
center: string;
|
|
7
|
+
bottom: string;
|
|
8
|
+
};
|
|
9
|
+
noWrap: {
|
|
10
|
+
false: string;
|
|
11
|
+
true: string;
|
|
12
|
+
};
|
|
13
|
+
wrappingDirection: {
|
|
14
|
+
default: string;
|
|
15
|
+
reverse: string;
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
export type ColumnWrapperVariants = NonNullable<RecipeVariants<typeof columnWrapper>>;
|
|
7
19
|
//# sourceMappingURL=Columns.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Columns.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAOvE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;EAwCxB,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAC9C,cAAc,CAAC,OAAO,aAAa,CAAC,CACpC,CAAC"}
|
|
@@ -2,40 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/Columns/Columns.css.ts", "@autoguru/overdrive");
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
6
|
+
import { sprinklesResponsive, totalGridColumns } from "../../styles/sprinkles.css.js";
|
|
7
|
+
export const columnWrapper = recipe({
|
|
8
|
+
base: [sprinklesResponsive({
|
|
9
|
+
display: 'grid'
|
|
10
|
+
}), {
|
|
11
|
+
gridAutoFlow: 'row',
|
|
12
|
+
gridTemplateColumns: `repeat(${totalGridColumns}, [col-start] 1fr)`
|
|
13
|
+
}],
|
|
14
|
+
variants: {
|
|
15
|
+
align: {
|
|
16
|
+
stretch: sprinklesResponsive({
|
|
17
|
+
alignItems: 'stretch',
|
|
18
|
+
alignContent: 'stretch'
|
|
19
|
+
}),
|
|
20
|
+
top: sprinklesResponsive({
|
|
21
|
+
alignItems: 'flex-start',
|
|
22
|
+
alignContent: 'flex-start'
|
|
23
|
+
}),
|
|
24
|
+
center: sprinklesResponsive({
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
alignContent: 'center'
|
|
27
|
+
}),
|
|
28
|
+
bottom: sprinklesResponsive({
|
|
29
|
+
alignItems: 'flex-end',
|
|
30
|
+
alignContent: 'flex-end'
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
noWrap: {
|
|
34
|
+
false: sprinklesResponsive({
|
|
35
|
+
flexWrap: 'wrap'
|
|
36
|
+
}),
|
|
37
|
+
true: sprinklesResponsive({
|
|
38
|
+
flexWrap: 'nowrap'
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
wrappingDirection: {
|
|
42
|
+
default: '',
|
|
43
|
+
reverse: sprinklesResponsive({
|
|
44
|
+
flexWrap: 'wrap-reverse'
|
|
45
|
+
})
|
|
46
|
+
}
|
|
15
47
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
reverseWrap: {
|
|
20
|
-
flexWrap: 'wrap-reverse'
|
|
21
|
-
}
|
|
22
|
-
}, "wrapping");
|
|
23
|
-
export const align = styleVariants({
|
|
24
|
-
stretch: {
|
|
25
|
-
alignContent: 'stretch',
|
|
26
|
-
alignItems: 'stretch'
|
|
27
|
-
},
|
|
28
|
-
top: {
|
|
29
|
-
alignContent: 'flex-start',
|
|
30
|
-
alignItems: 'flex-start'
|
|
31
|
-
},
|
|
32
|
-
centre: {
|
|
33
|
-
alignContent: 'center',
|
|
34
|
-
alignItems: 'center'
|
|
35
|
-
},
|
|
36
|
-
bottom: {
|
|
37
|
-
alignContent: 'flex-end',
|
|
38
|
-
alignItems: 'flex-end'
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
align: 'stretch',
|
|
50
|
+
noWrap: false
|
|
39
51
|
}
|
|
40
|
-
}, "
|
|
52
|
+
}, "columnWrapper");
|
|
41
53
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
columns?: number;
|
|
10
|
-
space?: ResponsiveProp<keyof Tokens['space']>;
|
|
11
|
-
spaceX?: ResponsiveProp<keyof typeof styles.space.spaceX>;
|
|
12
|
-
spaceY?: ResponsiveProp<keyof typeof styles.space.spaceY>;
|
|
13
|
-
noWrap?: boolean;
|
|
14
|
-
wrappingDirection?: keyof typeof styles.wrapping;
|
|
15
|
-
align?: keyof typeof styles.align;
|
|
16
|
-
children?: ReactNode;
|
|
1
|
+
import React, { type ElementType } from 'react';
|
|
2
|
+
import { type SprinklesResponsive } from '../../styles/sprinkles.css';
|
|
3
|
+
import { type PolymorphicBoxProps } from '../Box';
|
|
4
|
+
import type { ColumnWrapperVariants } from './Columns.css';
|
|
5
|
+
export interface ColumnsBaseProps extends ColumnWrapperVariants {
|
|
6
|
+
space?: SprinklesResponsive['gap'];
|
|
7
|
+
spaceX?: SprinklesResponsive['columnGap'];
|
|
8
|
+
spaceY?: SprinklesResponsive['rowGap'];
|
|
17
9
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
export declare const ColumnContext: React.Context<ColumnContextValue | null>;
|
|
24
|
-
export declare const Columns: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
25
|
-
export default Columns;
|
|
10
|
+
export type StyledColumnsProps<E extends ElementType> = PolymorphicBoxProps<E, ColumnsBaseProps>;
|
|
11
|
+
export declare const Columns: {
|
|
12
|
+
<E extends ElementType>({ align, as, children, className, noWrap, space, spaceX, spaceY, wrappingDirection, ...props }: StyledColumnsProps<E>): React.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
26
15
|
//# sourceMappingURL=Columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Columns.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,mBAAmB,EAA4B,MAAM,QAAQ,CAAC;AAG5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAK9D,KAAK,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAKnC,MAAM,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAK1C,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACvC;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,WAAW,IAAI,mBAAmB,CAC1E,CAAC,EACD,gBAAgB,CAChB,CAAC;AA8BF,eAAO,MAAM,OAAO;KAAI,CAAC,SAAS,WAAW,kGAW1C,kBAAkB,CAAC,CAAC,CAAC;;CAqBvB,CAAC"}
|
|
@@ -2,54 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["align", "as", "children", "className", "noWrap", "space", "spaceX", "spaceY", "wrappingDirection"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { useNegativeMarginLeft, useNegativeMarginTop } from "../../hooks/useNegativeMargin/useNegativeMargin.js";
|
|
12
|
-
import { resolveResponsiveStyle } from "../../utils/resolveResponsiveProps.js";
|
|
13
|
-
import { Box } from "../Box/index.js";
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { sprinklesResponsive } from "../../styles/sprinkles.css.js";
|
|
10
|
+
import { useBox } from "../Box/index.js";
|
|
14
11
|
import * as styles from "./Columns.css.js";
|
|
15
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
export const
|
|
17
|
-
export const Columns = forwardRef((_ref, ref) => {
|
|
13
|
+
export const Columns = _ref => {
|
|
18
14
|
let {
|
|
19
|
-
|
|
15
|
+
align = 'stretch',
|
|
16
|
+
as,
|
|
20
17
|
children,
|
|
18
|
+
className,
|
|
19
|
+
noWrap,
|
|
21
20
|
space,
|
|
22
21
|
spaceX,
|
|
23
22
|
spaceY,
|
|
24
|
-
|
|
25
|
-
wrappingDirection = 'default',
|
|
26
|
-
align = 'stretch',
|
|
27
|
-
is
|
|
23
|
+
wrappingDirection = 'default'
|
|
28
24
|
} = _ref,
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
spaceYCls: resolveResponsiveStyle(resolvedSpaceY, styles.space.spaceY),
|
|
49
|
-
isList: typeof is === 'string' && ['ul', 'ol'].includes(is)
|
|
50
|
-
}), [resolvedSpaceX, resolvedSpaceY, styles]),
|
|
51
|
-
children: children
|
|
52
|
-
})
|
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
const {
|
|
27
|
+
Component,
|
|
28
|
+
componentProps
|
|
29
|
+
} = useBox(_objectSpread({
|
|
30
|
+
as,
|
|
31
|
+
className: [styles.columnWrapper({
|
|
32
|
+
align,
|
|
33
|
+
noWrap,
|
|
34
|
+
wrappingDirection
|
|
35
|
+
}), sprinklesResponsive({
|
|
36
|
+
gap: space,
|
|
37
|
+
columnGap: spaceX,
|
|
38
|
+
rowGap: spaceY
|
|
39
|
+
}), className],
|
|
40
|
+
odComponent: 'columns'
|
|
41
|
+
}, props));
|
|
42
|
+
return _jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
43
|
+
children: children
|
|
53
44
|
}));
|
|
54
|
-
}
|
|
55
|
-
|
|
45
|
+
};
|
|
46
|
+
Columns.displayName = 'Columns';
|