@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,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
alignY?: BoxStyleProps['alignItems'];
|
|
9
|
-
alignX?: BoxStyleProps['justifyContent'];
|
|
10
|
-
noWrap?: boolean;
|
|
1
|
+
import React, { type ElementType, type ReactNode } from 'react';
|
|
2
|
+
import type { SprinklesResponsive } from '../../styles/sprinkles.css';
|
|
3
|
+
export type InlineDivider = ReactNode | boolean;
|
|
4
|
+
export interface InlineProps<E extends ElementType = 'div'> {
|
|
5
|
+
alignX?: SprinklesResponsive['justifyContent'];
|
|
6
|
+
alignY?: SprinklesResponsive['alignItems'];
|
|
7
|
+
as?: E;
|
|
11
8
|
children: ReactNode;
|
|
12
|
-
dividers?:
|
|
9
|
+
dividers?: InlineDivider;
|
|
10
|
+
noWrap?: boolean;
|
|
11
|
+
reverse?: boolean;
|
|
12
|
+
space?: SprinklesResponsive['gap'];
|
|
13
|
+
width?: SprinklesResponsive['width'];
|
|
13
14
|
}
|
|
14
|
-
export declare const Inline:
|
|
15
|
-
export default Inline;
|
|
15
|
+
export declare const Inline: <E extends ElementType = "div">({ alignX, alignY, children, dividers, noWrap, reverse, space, width, ...props }: InlineProps<E>) => React.JSX.Element;
|
|
16
16
|
//# sourceMappingURL=Inline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../../lib/components/Inline/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../../lib/components/Inline/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGb,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAItE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAChD,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK;IAIzD,MAAM,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAK/C,MAAM,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAK3C,EAAE,CAAC,EAAE,CAAC,CAAC;IAIP,QAAQ,EAAE,SAAS,CAAC;IAIpB,QAAQ,CAAC,EAAE,aAAa,CAAC;IAKzB,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAKlB,KAAK,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAInC,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACrC;AAkCD,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,iFAUnD,WAAW,CAAC,CAAC,CAAC,sBA4ChB,CAAC"}
|
|
@@ -1,71 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["alignX", "alignY", "children", "dividers", "noWrap", "reverse", "space", "width"];
|
|
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
|
+
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 React, { Children, isValidElement } from 'react';
|
|
5
9
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
6
|
-
import {
|
|
7
|
-
import { Box } from "../Box/index.js";
|
|
10
|
+
import { Box, useBox } from "../Box/index.js";
|
|
8
11
|
import { Text } from "../Text/index.js";
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const renderDivider = dividers => {
|
|
14
|
+
if (!dividers) return null;
|
|
15
|
+
if (typeof dividers === 'boolean') return _jsx(Text, {
|
|
16
|
+
children: "\u2022"
|
|
17
|
+
});
|
|
18
|
+
if (isValidElement(dividers)) return dividers;
|
|
19
|
+
return _jsx(Text, {
|
|
20
|
+
children: dividers
|
|
21
|
+
});
|
|
22
|
+
};
|
|
11
23
|
export const Inline = _ref => {
|
|
12
24
|
let {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
alignX,
|
|
26
|
+
alignY = 'center',
|
|
27
|
+
children,
|
|
28
|
+
dividers,
|
|
29
|
+
noWrap,
|
|
30
|
+
reverse,
|
|
31
|
+
space = '2',
|
|
32
|
+
width
|
|
33
|
+
} = _ref,
|
|
34
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
+
const divider = renderDivider(dividers);
|
|
36
|
+
const {
|
|
37
|
+
Component,
|
|
38
|
+
componentProps,
|
|
39
|
+
SemanticChild
|
|
40
|
+
} = useBox(_objectSpread({
|
|
41
|
+
alignItems: alignY,
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexDirection: reverse ? 'row-reverse' : 'row',
|
|
44
|
+
flexWrap: noWrap ? 'nowrap' : 'wrap',
|
|
45
|
+
gap: space,
|
|
46
|
+
justifyContent: alignX,
|
|
47
|
+
minWidth: 'fit-content',
|
|
48
|
+
position: 'relative',
|
|
20
49
|
width
|
|
21
|
-
}
|
|
22
|
-
const negativeMarginLeft = useNegativeMarginLeft(space);
|
|
23
|
-
const negativeMarginTop = useNegativeMarginTop(space);
|
|
50
|
+
}, props));
|
|
24
51
|
const items = flattenChildren(children);
|
|
25
52
|
if (items.length < 2) {
|
|
26
53
|
return _jsx(_Fragment, {
|
|
27
54
|
children: items
|
|
28
55
|
});
|
|
29
56
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
is: is,
|
|
35
|
-
width: width,
|
|
36
|
-
position: "relative",
|
|
37
|
-
display: "flex",
|
|
38
|
-
alignItems: alignY,
|
|
39
|
-
justifyContent: alignX,
|
|
40
|
-
flexDirection: "row",
|
|
41
|
-
flexWrap: noWrap ? 'nowrap' : 'wrap',
|
|
42
|
-
className: [negativeMarginTop, !dividers && negativeMarginLeft],
|
|
43
|
-
children: Children.map(items, (child, idx) => child !== null && child !== undefined ? _jsxs(Box, {
|
|
44
|
-
is: listItem,
|
|
57
|
+
return _jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
58
|
+
children: Children.map(items, (child, idx) => child && _jsxs(Box, {
|
|
59
|
+
alignItems: alignY,
|
|
60
|
+
as: SemanticChild,
|
|
45
61
|
display: "flex",
|
|
46
|
-
|
|
62
|
+
gap: space,
|
|
47
63
|
flexWrap: "nowrap",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
paddingLeft: dividers ? undefined : space,
|
|
51
|
-
children: [child, dividers && idx !== items.length - 1 ? _jsx(Box, {
|
|
52
|
-
paddingX: space,
|
|
64
|
+
children: [child, dividers && idx !== items.length - 1 && _jsx(Box, {
|
|
65
|
+
"aria-hidden": true,
|
|
53
66
|
children: divider
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
const renderDivider = dividers => {
|
|
59
|
-
if (typeof dividers === 'boolean') {
|
|
60
|
-
return dividers ? _jsx(Text, {
|
|
61
|
-
children: "\u2022"
|
|
62
|
-
}) : null;
|
|
63
|
-
}
|
|
64
|
-
if (isValidElement(dividers)) {
|
|
65
|
-
return dividers;
|
|
66
|
-
}
|
|
67
|
-
return _jsx(Text, {
|
|
68
|
-
children: dividers
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
export default Inline;
|
|
67
|
+
})]
|
|
68
|
+
}))
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
@@ -1,36 +1,7 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
2
|
import { Inline } from '.';
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
component: React.FunctionComponent<import("./Inline").Props>;
|
|
7
|
-
argTypes: {
|
|
8
|
-
alignY: {
|
|
9
|
-
options: string[];
|
|
10
|
-
control: {
|
|
11
|
-
type: "select";
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
alignX: {
|
|
15
|
-
options: string[];
|
|
16
|
-
control: {
|
|
17
|
-
type: "select";
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
space: {
|
|
21
|
-
options: string[];
|
|
22
|
-
control: {
|
|
23
|
-
type: "select";
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
dividers: {
|
|
27
|
-
control: {
|
|
28
|
-
type: "boolean";
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export default _default;
|
|
3
|
+
declare const meta: Meta<typeof Inline>;
|
|
4
|
+
export default meta;
|
|
34
5
|
type Story = StoryObj<typeof Inline>;
|
|
35
6
|
export declare const Standard: Story;
|
|
36
7
|
export declare const Dividers: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Inline/Inline.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Inline.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Inline/Inline.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQlD,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAE3B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CA4B7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAoB5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA6BhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA8B3B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Inline';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Inline/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Inline/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
|
|
3
|
-
type Intent = keyof Pick<typeof backgroundColours, 'danger' | 'information' | 'success' | 'warning'>;
|
|
2
|
+
type Intent = 'danger' | 'information' | 'success' | 'warning';
|
|
4
3
|
export interface Props {
|
|
5
4
|
className?: string;
|
|
6
5
|
intent: Intent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntentStripe.d.ts","sourceRoot":"","sources":["../../../lib/components/IntentStripe/IntentStripe.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IntentStripe.d.ts","sourceRoot":"","sources":["../../../lib/components/IntentStripe/IntentStripe.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1C,KAAK,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAE/D,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAUjD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearProgressIndicator.d.ts","sourceRoot":"","sources":["../../../lib/components/LinearProgressIndicator/LinearProgressIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAMnD,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,EAAE,oBAAoB,CAAC,KAAK,CA4B/D,CAAC;
|
|
1
|
+
{"version":3,"file":"LinearProgressIndicator.d.ts","sourceRoot":"","sources":["../../../lib/components/LinearProgressIndicator/LinearProgressIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAMnD,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,EAAE,oBAAoB,CAAC,KAAK,CA4B/D,CAAC;AAIF,eAAe,uBAAuB,CAAC"}
|