@autoguru/overdrive 4.44.4-next.0 → 4.44.4
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.js +12 -15
- package/dist/components/Alert/Alert.js +8 -9
- package/dist/components/AutoSuggest/AutoSuggest.js +114 -126
- package/dist/components/Badge/Badge.js +8 -9
- package/dist/components/BulletList/Bullet.js +4 -5
- package/dist/components/BulletList/BulletList.js +4 -5
- package/dist/components/BulletText/BulletText.js +44 -47
- package/dist/components/Button/Button.js +23 -24
- package/dist/components/CheckBox/CheckBox.js +11 -12
- package/dist/components/DateTimePicker/CalendarGrid.js +7 -8
- package/dist/components/DateTimePicker/DateTimePicker.js +9 -10
- package/dist/components/DividerLine/DividerLine.js +16 -19
- package/dist/components/DropDown/DropDownOptionsList.js +15 -18
- package/dist/components/Flex/flex.js +35 -41
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +12 -13
- package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.js +7 -8
- package/dist/components/Icon/Icon.js +6 -7
- package/dist/components/Image/ImageServerProvider.js +17 -21
- package/dist/components/Inline/Inline.js +13 -15
- package/dist/components/IntentStripe/IntentStripe.js +10 -13
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +3 -4
- package/dist/components/Meta/Meta.js +18 -21
- package/dist/components/Modal/Modal.js +13 -14
- package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
- package/dist/components/NumberBubble/NumberBubble.js +28 -29
- package/dist/components/NumberInput/useNumberInputBehaviours.js +8 -9
- package/dist/components/OptionGrid/OptionGrid.js +53 -57
- package/dist/components/OptionList/OptionListItem.js +4 -5
- package/dist/components/OrderedList/OrderedList.js +14 -18
- package/dist/components/OutsideClick/OutsideClick.js +4 -5
- package/dist/components/OverdriveProvider/FallbackProvider.js +3 -4
- package/dist/components/OverdriveProvider/OverdriveProvider.js +8 -9
- package/dist/components/Pagination/Bubble.js +8 -9
- package/dist/components/Pagination/Pagination.js +56 -63
- package/dist/components/Portal/Portal.js +5 -6
- package/dist/components/ProgressBar/ProgressBar.js +16 -19
- package/dist/components/ProgressBarGroup/ProgressBarGroup.js +7 -8
- package/dist/components/ProgressSpinner/ProgressSpinner.js +23 -26
- package/dist/components/Radio/Radio.js +6 -7
- package/dist/components/Radio/RadioGroup.js +7 -8
- package/dist/components/Section/Section.js +12 -15
- package/dist/components/SimplePagination/SimplePagination.js +5 -6
- package/dist/components/SliderProgress/ProgressStep.js +9 -10
- package/dist/components/SliderProgress/SliderProgress.js +25 -28
- package/dist/components/Stack/Stack.js +9 -10
- package/dist/components/StandardModal/StandardModal.js +11 -12
- package/dist/components/StarRating/StarRating.js +32 -36
- package/dist/components/Stepper/Stepper.js +45 -50
- package/dist/components/Table/Table.js +20 -23
- package/dist/components/Table/TableCell.js +8 -9
- package/dist/components/Table/TableHeadCell.js +10 -11
- package/dist/components/Table/TableRow.js +10 -13
- package/dist/components/Table/TableRowGroup.js +8 -11
- package/dist/components/Table/context.js +5 -6
- package/dist/components/Tabs/Tab.js +6 -7
- package/dist/components/Tabs/TabList.js +5 -6
- package/dist/components/Tabs/TabPane.js +4 -5
- package/dist/components/Tabs/TabPanes.js +18 -21
- package/dist/components/Tabs/Tabs.js +7 -8
- package/dist/components/TextContainer/TextContainer.js +21 -24
- package/dist/components/Toaster/Toast.js +65 -98
- package/dist/components/Tooltip/Tooltip.js +10 -11
- package/dist/components/Tooltip/useTooltip/useTooltip.js +11 -13
- package/dist/components/private/CheckableBase/CheckableBase.js +12 -13
- package/dist/components/private/InputBase/HintText.js +7 -8
- package/dist/components/private/InputBase/NotchedBase.js +17 -18
- package/dist/components/private/InputBase/withEnhancedInput.js +182 -187
- package/dist/hooks/useAnimationEvents/useAnimationEvents.js +5 -6
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +9 -10
- package/dist/hooks/useMedia/useMedia.js +1 -2
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +8 -9
- package/dist/styles/sprinkles.css.js +9 -18
- package/dist/styles/typography.js +28 -31
- package/dist/themes/helpers.js +13 -15
- package/dist/themes/makeTheme.js +8 -15
- package/dist/utils/css.js +1 -2
- package/dist/utils/dataAttrs.js +1 -2
- package/dist/utils/index.js +3 -9
- package/dist/utils/mapTokenToProperty.js +5 -14
- package/dist/utils/number.js +1 -2
- package/dist/utils/responsiveProps.css.js +1 -2
- package/dist/utils/sprinkles.js +1 -2
- package/package.json +2 -2
- package/dist/components/NumberBubble/NumberBubble.css.d.ts +0 -2
- package/dist/components/NumberBubble/NumberBubble.css.d.ts.map +0 -1
- package/dist/components/NumberBubble/NumberBubble.css.js +0 -11
|
@@ -62,11 +62,10 @@ OptionListItem.displayName = 'OptionList.Item';
|
|
|
62
62
|
/**
|
|
63
63
|
* Helper component part to display a checkbox button label with a second column justified to the end
|
|
64
64
|
*/
|
|
65
|
-
export const ItemSplitLabel =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} = _ref;
|
|
65
|
+
export const ItemSplitLabel = ({
|
|
66
|
+
children,
|
|
67
|
+
content
|
|
68
|
+
}) => {
|
|
70
69
|
if (!children && !content) return null;
|
|
71
70
|
return /*#__PURE__*/_jsx("div", {
|
|
72
71
|
className: sprinkles({
|
|
@@ -9,13 +9,12 @@ import * as styles from "./OrderedList.css.js";
|
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
const cycles = ['decimal', 'lower-roman', 'lower-alpha', 'upper-alpha', 'lower-roman'];
|
|
11
11
|
const OrderedListContext = /*#__PURE__*/createContext(-1);
|
|
12
|
-
export const OrderedList =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
12
|
+
export const OrderedList = ({
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
type = null,
|
|
16
|
+
start
|
|
17
|
+
}) => {
|
|
19
18
|
const cycle = useContext(OrderedListContext);
|
|
20
19
|
let myCycle;
|
|
21
20
|
if (cycle + 1 > cycles.length) {
|
|
@@ -46,15 +45,12 @@ export const OrderedList = _ref => {
|
|
|
46
45
|
})
|
|
47
46
|
});
|
|
48
47
|
};
|
|
49
|
-
const Item =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children: children
|
|
58
|
-
});
|
|
59
|
-
};
|
|
48
|
+
const Item = ({
|
|
49
|
+
className,
|
|
50
|
+
children
|
|
51
|
+
}) => /*#__PURE__*/_jsx(Box, {
|
|
52
|
+
as: "li",
|
|
53
|
+
className: className,
|
|
54
|
+
children: children
|
|
55
|
+
});
|
|
60
56
|
OrderedList.Item = Item;
|
|
@@ -28,11 +28,10 @@ const bindEvent = (node, event, callback) => {
|
|
|
28
28
|
node.removeEventListener(event, callback);
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
export const OutsideClick =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = _ref;
|
|
31
|
+
export const OutsideClick = ({
|
|
32
|
+
children,
|
|
33
|
+
onOutsideClick = noop
|
|
34
|
+
}) => {
|
|
36
35
|
const child = Children.only(children);
|
|
37
36
|
const rootClickRef = useRef(null);
|
|
38
37
|
const hasRef = Object.prototype.hasOwnProperty.call(child.props, 'ref');
|
|
@@ -7,10 +7,9 @@ import React from 'react';
|
|
|
7
7
|
* @deprecated `<OverdriveProvider>` includes the theme context and theme overrides
|
|
8
8
|
*/
|
|
9
9
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export const FallbackProvider =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
10
|
+
export const FallbackProvider = ({
|
|
11
|
+
children
|
|
12
|
+
}) => {
|
|
14
13
|
process.env.NODE_ENV !== "production" ? warning(false, 'This application is using a provider which is now deprecated. The theme context and overrides are available from <OverdriveProvider>') : void 0;
|
|
15
14
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
16
15
|
children: children
|
|
@@ -27,15 +27,14 @@ export const useRuntimeTokens = () => {
|
|
|
27
27
|
const isSafeElement = element => {
|
|
28
28
|
return element instanceof HTMLElement && !element.hasAttribute('onclick') && !element.hasAttribute('onerror');
|
|
29
29
|
};
|
|
30
|
-
export const Provider =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = _ref;
|
|
30
|
+
export const Provider = ({
|
|
31
|
+
breakpoints,
|
|
32
|
+
children,
|
|
33
|
+
colorOverrides,
|
|
34
|
+
noBodyLevelTheming = false,
|
|
35
|
+
portalMountPoint,
|
|
36
|
+
theme = baseTheme
|
|
37
|
+
}) => {
|
|
39
38
|
const runtimeTokens = useMemo(() => makeRuntimeTokens(breakpoints), [breakpoints]);
|
|
40
39
|
const styles = useColorOverrides(colorOverrides, String(theme.vars.mode));
|
|
41
40
|
const themeValues = useMemo(() => ({
|
|
@@ -6,15 +6,14 @@ import { textStyles } from "../../styles/typography.js";
|
|
|
6
6
|
import { Box } from "../Box/index.js";
|
|
7
7
|
import * as styles from "./Pagination.css.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export const Bubble =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
9
|
+
export const Bubble = ({
|
|
10
|
+
className = '',
|
|
11
|
+
selected = false,
|
|
12
|
+
gap = false,
|
|
13
|
+
children,
|
|
14
|
+
disabled,
|
|
15
|
+
onClick
|
|
16
|
+
}) => {
|
|
18
17
|
let backgroundColour = 'transparent';
|
|
19
18
|
if (selected) backgroundColour = 'green900';else if (disabled) backgroundColour = 'gray200';
|
|
20
19
|
return /*#__PURE__*/_jsx(Box, {
|
|
@@ -12,69 +12,62 @@ import { Inline } from "../Inline/Inline.js";
|
|
|
12
12
|
import { Bubble } from "./Bubble.js";
|
|
13
13
|
import * as styles from "./Pagination.css.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const NavButton =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
total,
|
|
72
|
-
pageSize,
|
|
73
|
-
activePage,
|
|
74
|
-
numPagesDisplayed = 5,
|
|
75
|
-
loading = false,
|
|
76
|
-
onChange = noop
|
|
77
|
-
} = _ref3;
|
|
15
|
+
const NavButton = ({
|
|
16
|
+
icon,
|
|
17
|
+
disabled,
|
|
18
|
+
label = '',
|
|
19
|
+
onClick = noop
|
|
20
|
+
}) => /*#__PURE__*/_jsx(Box, {
|
|
21
|
+
as: "button",
|
|
22
|
+
"aria-disabled": disabled,
|
|
23
|
+
"aria-label": label,
|
|
24
|
+
display: "flex",
|
|
25
|
+
overflow: "hidden",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
textAlign: "center",
|
|
30
|
+
borderRadius: "pill",
|
|
31
|
+
padding: "2",
|
|
32
|
+
userSelect: "none",
|
|
33
|
+
pointerEvents: disabled ? 'none' : void 0,
|
|
34
|
+
className: clsx(textStyles({
|
|
35
|
+
colour: 'light'
|
|
36
|
+
}), {
|
|
37
|
+
[styles.disabled]: disabled
|
|
38
|
+
}),
|
|
39
|
+
onClick: onClick,
|
|
40
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
41
|
+
size: "medium",
|
|
42
|
+
icon: icon
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
const Loading = ({
|
|
46
|
+
placeholderBubblesNum = 3
|
|
47
|
+
}) => /*#__PURE__*/_jsxs(Inline, {
|
|
48
|
+
as: "span",
|
|
49
|
+
space: "3",
|
|
50
|
+
children: [/*#__PURE__*/_jsx(NavButton, {
|
|
51
|
+
disabled: true,
|
|
52
|
+
icon: ChevronLeftIcon
|
|
53
|
+
}), Array.from({
|
|
54
|
+
length: placeholderBubblesNum
|
|
55
|
+
}).fill('').map((_, index) => /*#__PURE__*/_jsx(Bubble, {
|
|
56
|
+
disabled: true,
|
|
57
|
+
className: styles.disabled
|
|
58
|
+
}, index)), /*#__PURE__*/_jsx(NavButton, {
|
|
59
|
+
disabled: true,
|
|
60
|
+
icon: ChevronRightIcon
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
export const Pagination = ({
|
|
64
|
+
total,
|
|
65
|
+
pageSize,
|
|
66
|
+
activePage,
|
|
67
|
+
numPagesDisplayed = 5,
|
|
68
|
+
loading = false,
|
|
69
|
+
onChange = noop
|
|
70
|
+
}) => {
|
|
78
71
|
const numPages = useMemo(() => calcPagesNum(total, pageSize), [total, pageSize]);
|
|
79
72
|
const handleClick = useCallback(num => () => {
|
|
80
73
|
onChange({
|
|
@@ -5,12 +5,11 @@ import { createPortal } from 'react-dom';
|
|
|
5
5
|
import { isBrowser, isHtmlElement, setRef } from "../../utils/index.js";
|
|
6
6
|
import { useTheme } from "../OverdriveProvider/index.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
function Portal(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
8
|
+
function Portal({
|
|
9
|
+
children,
|
|
10
|
+
container,
|
|
11
|
+
noThemedWrapper
|
|
12
|
+
}, ref) {
|
|
14
13
|
const {
|
|
15
14
|
themeClass,
|
|
16
15
|
portalMountPoint
|
|
@@ -13,23 +13,20 @@ const backgroundColorMap = {
|
|
|
13
13
|
yellow: 'yellow600',
|
|
14
14
|
neutral: 'gray500'
|
|
15
15
|
};
|
|
16
|
-
export const ProgressBar =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
export const ProgressBar = ({
|
|
17
|
+
value = 0,
|
|
18
|
+
colour = 'green'
|
|
19
|
+
}) => /*#__PURE__*/_jsx(Box, {
|
|
20
|
+
className: styles.container,
|
|
21
|
+
borderRadius: "1",
|
|
22
|
+
backgroundColour: "gray100",
|
|
23
|
+
odComponent: "progress-bar",
|
|
24
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
23
25
|
borderRadius: "1",
|
|
24
|
-
backgroundColour:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
width: `${clamp(value, 0, 1) * 100}%`
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
});
|
|
35
|
-
};
|
|
26
|
+
backgroundColour: backgroundColorMap[colour],
|
|
27
|
+
className: [styles.bar, styles.container],
|
|
28
|
+
style: {
|
|
29
|
+
width: `${clamp(value, 0, 1) * 100}%`
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
});
|
|
@@ -7,14 +7,13 @@ import { ProgressBar } from "../ProgressBar/ProgressBar.js";
|
|
|
7
7
|
import { Text } from "../Text/Text.js";
|
|
8
8
|
import * as styles from "./ProgressBarGroup.css.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
export const ProgressBarGroup =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
10
|
+
export const ProgressBarGroup = ({
|
|
11
|
+
prefixLabels,
|
|
12
|
+
suffixLabels,
|
|
13
|
+
values,
|
|
14
|
+
count = values.reduce((result, item) => result + item, 0),
|
|
15
|
+
colour
|
|
16
|
+
}) => {
|
|
18
17
|
const hasPrefixLabels = Array.isArray(prefixLabels);
|
|
19
18
|
const hasSuffixLabels = Array.isArray(suffixLabels);
|
|
20
19
|
return /*#__PURE__*/_jsx(Box, {
|
|
@@ -6,30 +6,27 @@ import { elementStyles } from "../../styles/index.js";
|
|
|
6
6
|
import { Box } from "../Box/Box.js";
|
|
7
7
|
import * as styles from "./ProgressSpinner.css.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export const ProgressSpinner =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
fill: "none",
|
|
31
|
-
strokeMiterlimit: "10"
|
|
32
|
-
})
|
|
9
|
+
export const ProgressSpinner = ({
|
|
10
|
+
className = '',
|
|
11
|
+
colour = 'primary',
|
|
12
|
+
size = 'medium'
|
|
13
|
+
}) => /*#__PURE__*/_jsx(Box, {
|
|
14
|
+
className: [styles.size[size].circular, styles.colours[colour], className],
|
|
15
|
+
odComponent: "progress-spinner",
|
|
16
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
17
|
+
className: clsx(elementStyles({
|
|
18
|
+
as: 'svg',
|
|
19
|
+
display: 'block',
|
|
20
|
+
overflow: 'hidden'
|
|
21
|
+
}), styles.circular),
|
|
22
|
+
viewBox: "25 25 50 50",
|
|
23
|
+
children: /*#__PURE__*/_jsx("circle", {
|
|
24
|
+
className: clsx(styles.path, styles.size[size].path),
|
|
25
|
+
cx: "50",
|
|
26
|
+
cy: "50",
|
|
27
|
+
r: "20",
|
|
28
|
+
fill: "none",
|
|
29
|
+
strokeMiterlimit: "10"
|
|
33
30
|
})
|
|
34
|
-
})
|
|
35
|
-
};
|
|
31
|
+
})
|
|
32
|
+
});
|
|
@@ -9,13 +9,12 @@ import { checkableIndicator } from "../private/CheckableBase/CheckableBase.css.j
|
|
|
9
9
|
import * as styles from "./Radio.css.js";
|
|
10
10
|
import { useRadioContext } from "./RadioGroup.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
export const Radio = /*#__PURE__*/forwardRef((
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
12
|
+
export const Radio = /*#__PURE__*/forwardRef(({
|
|
13
|
+
value,
|
|
14
|
+
className = '',
|
|
15
|
+
children,
|
|
16
|
+
disabled = false
|
|
17
|
+
}, ref) => {
|
|
19
18
|
const radioContext = useRadioContext();
|
|
20
19
|
const isChecked = value === radioContext.value;
|
|
21
20
|
const handleClick = () => {
|
|
@@ -5,14 +5,13 @@ import { Box } from "../Box/index.js";
|
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export const RadioContext = /*#__PURE__*/createContext(null);
|
|
7
7
|
export const useRadioContext = () => useContext(RadioContext);
|
|
8
|
-
export const RadioGroup = /*#__PURE__*/forwardRef((
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
8
|
+
export const RadioGroup = /*#__PURE__*/forwardRef(({
|
|
9
|
+
name,
|
|
10
|
+
value,
|
|
11
|
+
className = '',
|
|
12
|
+
onChange,
|
|
13
|
+
children
|
|
14
|
+
}, ref) => {
|
|
16
15
|
const contextValue = useMemo(() => ({
|
|
17
16
|
value,
|
|
18
17
|
inputName: name,
|
|
@@ -4,18 +4,15 @@ import React from 'react';
|
|
|
4
4
|
import { Box } from "../Box/Box.js";
|
|
5
5
|
import * as styles from "./Section.css.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export const Section =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
children: children
|
|
20
|
-
});
|
|
21
|
-
};
|
|
7
|
+
export const Section = ({
|
|
8
|
+
children,
|
|
9
|
+
width = 'medium',
|
|
10
|
+
paddingX,
|
|
11
|
+
ref
|
|
12
|
+
}) => /*#__PURE__*/_jsx(Box, {
|
|
13
|
+
ref: ref,
|
|
14
|
+
className: [styles.root, styles.width[width]],
|
|
15
|
+
width: "full",
|
|
16
|
+
paddingX: paddingX,
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
@@ -12,12 +12,11 @@ export let EChangeDirection = /*#__PURE__*/function (EChangeDirection) {
|
|
|
12
12
|
EChangeDirection["Next"] = "next";
|
|
13
13
|
return EChangeDirection;
|
|
14
14
|
}({});
|
|
15
|
-
export const SimplePagination =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
15
|
+
export const SimplePagination = ({
|
|
16
|
+
hasNext = false,
|
|
17
|
+
hasPrevious = false,
|
|
18
|
+
onChange = noop
|
|
19
|
+
}) => {
|
|
21
20
|
const handleClick = direction => () => {
|
|
22
21
|
onChange(direction);
|
|
23
22
|
};
|
|
@@ -6,16 +6,15 @@ import { useAnimationEvents } from "../../hooks/useAnimationEvents/index.js";
|
|
|
6
6
|
import { Box } from "../Box/index.js";
|
|
7
7
|
import * as styles from "./ProgressStep.css.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export const ProgressStep = /*#__PURE__*/memo(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
9
|
+
export const ProgressStep = /*#__PURE__*/memo(({
|
|
10
|
+
className = '',
|
|
11
|
+
paused,
|
|
12
|
+
isActive,
|
|
13
|
+
hasPassed,
|
|
14
|
+
duration,
|
|
15
|
+
backgroundColour = 'white',
|
|
16
|
+
onFinished
|
|
17
|
+
}) => {
|
|
19
18
|
const {
|
|
20
19
|
elementRef
|
|
21
20
|
} = useAnimationEvents({
|
|
@@ -6,32 +6,29 @@ import { memo } from 'react';
|
|
|
6
6
|
import { ProgressStep } from "./ProgressStep.js";
|
|
7
7
|
import * as styles from "./SliderProgress.css.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export const SliderProgress = /*#__PURE__*/memo(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, index))
|
|
35
|
-
});
|
|
36
|
-
});
|
|
9
|
+
export const SliderProgress = /*#__PURE__*/memo(({
|
|
10
|
+
className = '',
|
|
11
|
+
paused,
|
|
12
|
+
totalCount,
|
|
13
|
+
activeIndex,
|
|
14
|
+
duration,
|
|
15
|
+
backgroundColour,
|
|
16
|
+
onRequestNext
|
|
17
|
+
}) => /*#__PURE__*/_jsx("div", {
|
|
18
|
+
className: clsx(className, styles.root),
|
|
19
|
+
style: {
|
|
20
|
+
gridTemplateColumns: `repeat(${totalCount}, 1fr)`
|
|
21
|
+
},
|
|
22
|
+
children: Array.from({
|
|
23
|
+
length: totalCount
|
|
24
|
+
}).fill('').map((_, index) => /*#__PURE__*/_jsx(ProgressStep, {
|
|
25
|
+
className: styles.step,
|
|
26
|
+
paused: paused,
|
|
27
|
+
duration: duration,
|
|
28
|
+
backgroundColour: backgroundColour,
|
|
29
|
+
hasPassed: index < activeIndex,
|
|
30
|
+
isActive: index === activeIndex,
|
|
31
|
+
onFinished: onRequestNext
|
|
32
|
+
}, index))
|
|
33
|
+
}));
|
|
37
34
|
SliderProgress.displayName = 'SliderProgress';
|
|
@@ -37,16 +37,15 @@ const Divider = () => /*#__PURE__*/_jsx("hr", {
|
|
|
37
37
|
* <Card>Card 2</Card>
|
|
38
38
|
* </Stack>
|
|
39
39
|
*/
|
|
40
|
-
export const Stack =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
} = _ref;
|
|
40
|
+
export const Stack = ({
|
|
41
|
+
alignItems,
|
|
42
|
+
as = 'div',
|
|
43
|
+
className,
|
|
44
|
+
children,
|
|
45
|
+
dividers = false,
|
|
46
|
+
space = '2',
|
|
47
|
+
width
|
|
48
|
+
}) => {
|
|
50
49
|
const items = useMemo(() => flattenChildren(children), [children]);
|
|
51
50
|
if (items.length === 0) {
|
|
52
51
|
return null;
|
|
@@ -21,18 +21,17 @@ export let ESize = /*#__PURE__*/function (ESize) {
|
|
|
21
21
|
ESize["Standard"] = "standard"; // 800px wide
|
|
22
22
|
return ESize;
|
|
23
23
|
}({});
|
|
24
|
-
export const StandardModal =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = _ref;
|
|
24
|
+
export const StandardModal = ({
|
|
25
|
+
isOpen,
|
|
26
|
+
size = 'standard',
|
|
27
|
+
className = '',
|
|
28
|
+
title,
|
|
29
|
+
container,
|
|
30
|
+
noThemedWrapper,
|
|
31
|
+
ref,
|
|
32
|
+
onRequestClose,
|
|
33
|
+
children
|
|
34
|
+
}) => {
|
|
36
35
|
const titleId = useId();
|
|
37
36
|
const locked = useRef(true);
|
|
38
37
|
const closeButtonHandler = useEventCallback(() => {
|