@autoguru/overdrive 4.43.9-next.0 → 4.43.10-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 +3 -3
- package/dist/components/Actions/Actions.d.ts.map +1 -1
- package/dist/components/Actions/Actions.js +4 -3
- package/dist/components/Alert/Alert.d.ts +3 -3
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +11 -11
- package/dist/components/Anchor/Anchor.d.ts +4 -3
- package/dist/components/Anchor/Anchor.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.js +21 -19
- package/dist/components/AutoSuggest/AutoSuggest.js +52 -34
- package/dist/components/AutoSuggest/useLayoutSuggestionVisible.js +1 -0
- package/dist/components/Badge/Badge.d.ts +13 -2
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +7 -1
- package/dist/components/Box/Box.d.ts +7 -0
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +11 -2
- package/dist/components/Box/newBox/NewBox.d.ts +23 -0
- package/dist/components/Box/newBox/NewBox.d.ts.map +1 -1
- package/dist/components/Box/newBox/NewBox.js +25 -2
- package/dist/components/Box/newBox/useBox.d.ts +24 -0
- package/dist/components/Box/newBox/useBox.d.ts.map +1 -1
- package/dist/components/Box/newBox/useBox.js +38 -1
- package/dist/components/BulletList/Bullet.js +2 -2
- package/dist/components/BulletList/BulletList.js +2 -2
- package/dist/components/BulletList/context.js +1 -1
- package/dist/components/BulletText/BulletText.d.ts.map +1 -1
- package/dist/components/BulletText/BulletText.js +13 -12
- package/dist/components/Button/Button.css.d.ts +9 -0
- package/dist/components/Button/Button.css.d.ts.map +1 -1
- package/dist/components/Button/Button.css.js +12 -2
- package/dist/components/Button/Button.d.ts +11 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +23 -11
- package/dist/components/CheckBox/CheckBox.d.ts +4 -0
- package/dist/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.js +4 -4
- package/dist/components/ColourInput/ColourInput.d.ts.map +1 -1
- package/dist/components/ColourInput/ColourInput.js +10 -9
- package/dist/components/Columns/Column.css.js +1 -0
- package/dist/components/Columns/Column.js +3 -3
- package/dist/components/Columns/ColumnGrid.css.js +1 -1
- package/dist/components/Columns/Columns.d.ts +3 -3
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/Columns/Columns.js +4 -4
- package/dist/components/DateInput/DateInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +6 -6
- package/dist/components/DateTimePicker/CalendarButton.js +1 -1
- package/dist/components/DateTimePicker/CalendarGrid.js +10 -10
- package/dist/components/DateTimePicker/DateTimePicker.css.js +9 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +39 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +50 -17
- package/dist/components/DividerLine/DividerLine.js +1 -1
- package/dist/components/DropDown/DropDown.js +5 -5
- package/dist/components/DropDown/DropDownOption.js +4 -4
- package/dist/components/DropDown/DropDownOptionsList.js +4 -4
- 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 +10 -10
- package/dist/components/FillHeightBox/FillHeightBox.js +2 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -2
- package/dist/components/Flyout/Flyout.d.ts.map +1 -1
- package/dist/components/Flyout/Flyout.js +3 -3
- package/dist/components/Heading/Heading.d.ts +6 -1
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +10 -3
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +2 -2
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +19 -18
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Image/Image.d.ts +3 -0
- package/dist/components/Image/Image.d.ts.map +1 -1
- package/dist/components/Image/Image.js +2 -2
- package/dist/components/Image/ImageServerProvider.js +7 -2
- package/dist/components/Image/ResponsiveImage.d.ts +22 -0
- package/dist/components/Image/ResponsiveImage.d.ts.map +1 -1
- package/dist/components/Image/ResponsiveImage.js +2 -1
- package/dist/components/Image/SimpleImage.d.ts +18 -0
- package/dist/components/Image/SimpleImage.d.ts.map +1 -1
- package/dist/components/Image/SimpleImage.js +6 -2
- package/dist/components/Inline/Inline.d.ts +9 -6
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +53 -46
- package/dist/components/IntentStripe/IntentStripe.js +1 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +4 -4
- package/dist/components/LoadingBox/LoadingBox.js +1 -1
- package/dist/components/Meta/Meta.js +3 -3
- package/dist/components/MinimalModal/MinimalModal.js +4 -4
- package/dist/components/Modal/Modal.js +7 -6
- package/dist/components/NumberBubble/NumberBubble.js +2 -2
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/NumberInput/useNumberInputBehaviours.js +9 -3
- package/dist/components/OptionGrid/OptionGrid.css.js +7 -1
- package/dist/components/OptionGrid/OptionGrid.d.ts +32 -0
- package/dist/components/OptionGrid/OptionGrid.d.ts.map +1 -1
- package/dist/components/OptionGrid/OptionGrid.js +26 -12
- package/dist/components/OptionList/OptionList.css.js +5 -1
- package/dist/components/OptionList/OptionList.d.ts +25 -0
- package/dist/components/OptionList/OptionList.d.ts.map +1 -1
- package/dist/components/OptionList/OptionList.js +19 -6
- package/dist/components/OptionList/OptionListItem.d.ts +10 -0
- package/dist/components/OptionList/OptionListItem.d.ts.map +1 -1
- package/dist/components/OptionList/OptionListItem.js +16 -9
- package/dist/components/OrderedList/OrderedList.css.d.ts +0 -1
- package/dist/components/OrderedList/OrderedList.css.d.ts.map +1 -1
- package/dist/components/OrderedList/OrderedList.css.js +1 -8
- package/dist/components/OrderedList/OrderedList.d.ts +4 -4
- package/dist/components/OrderedList/OrderedList.d.ts.map +1 -1
- package/dist/components/OrderedList/OrderedList.js +11 -9
- package/dist/components/OutsideClick/OutsideClick.js +4 -1
- package/dist/components/OverdriveProvider/FallbackProvider.d.ts +3 -0
- package/dist/components/OverdriveProvider/FallbackProvider.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/FallbackProvider.js +5 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts +5 -0
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.js +10 -6
- package/dist/components/OverdriveProvider/ThemeOverrideDebugger.js +7 -7
- package/dist/components/OverdriveProvider/index.d.ts +2 -1
- package/dist/components/OverdriveProvider/index.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/index.js +3 -1
- package/dist/components/OverdriveProvider/useColorOverrides.d.ts +1 -0
- package/dist/components/OverdriveProvider/useColorOverrides.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/useColorOverrides.js +9 -0
- package/dist/components/Pagination/Bubble.js +1 -1
- package/dist/components/Pagination/Pagination.js +11 -11
- package/dist/components/Portal/Portal.js +5 -2
- package/dist/components/Positioner/Positioner.js +18 -2
- package/dist/components/Positioner/alignment.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +3 -3
- package/dist/components/ProgressBarGroup/ProgressBarGroup.js +5 -5
- package/dist/components/ProgressSpinner/ProgressSpinner.js +3 -3
- package/dist/components/Radio/Radio.js +4 -4
- package/dist/components/Radio/RadioGroup.js +4 -4
- package/dist/components/ScrollPane/ScrollPane.js +2 -2
- package/dist/components/SearchBar/SearchBar.d.ts +17 -0
- package/dist/components/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/components/SearchBar/SearchBar.js +21 -9
- package/dist/components/Section/Section.d.ts +3 -3
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/Section/Section.js +4 -3
- package/dist/components/SelectInput/SelectInput.js +6 -6
- package/dist/components/SimplePagination/SimplePagination.js +6 -6
- package/dist/components/SliderProgress/ProgressStep.js +4 -4
- package/dist/components/SliderProgress/SliderProgress.js +3 -3
- package/dist/components/Stack/Divider.d.ts +3 -0
- package/dist/components/Stack/Divider.d.ts.map +1 -0
- package/dist/components/Stack/Divider.js +13 -0
- package/dist/components/Stack/Stack.d.ts +6 -10
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +28 -28
- package/dist/components/StandardModal/StandardModal.d.ts +2 -2
- package/dist/components/StandardModal/StandardModal.d.ts.map +1 -1
- package/dist/components/StandardModal/StandardModal.js +13 -11
- package/dist/components/StarRating/StarRating.js +11 -9
- package/dist/components/Stepper/Stepper.js +10 -10
- package/dist/components/StickyBox/StickyBox.js +4 -3
- package/dist/components/Switch/Switch.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +10 -5
- package/dist/components/Table/Table.css.js +4 -0
- package/dist/components/Table/Table.js +9 -3
- package/dist/components/Table/TableCell.css.js +5 -0
- package/dist/components/Table/TableCell.js +7 -4
- package/dist/components/Table/TableHeadCell.js +7 -7
- package/dist/components/Table/TableRow.js +2 -2
- package/dist/components/Table/TableRowGroup.js +2 -2
- package/dist/components/Table/context.js +2 -2
- package/dist/components/Tabs/Tab.d.ts +3 -3
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.js +6 -6
- package/dist/components/Tabs/TabList.js +10 -10
- package/dist/components/Tabs/TabPane.js +1 -1
- package/dist/components/Tabs/TabPanes.d.ts +1 -0
- package/dist/components/Tabs/TabPanes.d.ts.map +1 -1
- package/dist/components/Tabs/TabPanes.js +3 -3
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Text/Text.d.ts +3 -5
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +5 -2
- package/dist/components/Text/textStyles.d.ts +3 -0
- package/dist/components/Text/textStyles.d.ts.map +1 -1
- package/dist/components/Text/textStyles.js +5 -0
- package/dist/components/TextAreaInput/TextAreaInput.js +1 -1
- package/dist/components/TextBubble/TextBubble.d.ts +5 -5
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +4 -3
- package/dist/components/TextContainer/TextContainer.js +4 -4
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/TextLink/TextLink.css.d.ts +0 -1
- package/dist/components/TextLink/TextLink.css.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.css.js +0 -5
- package/dist/components/TextLink/TextLink.d.ts +7 -8
- package/dist/components/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.js +19 -19
- package/dist/components/Toaster/Toast.js +20 -10
- package/dist/components/Tooltip/Tooltip.d.ts +25 -5
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +61 -82
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +5 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +6 -1
- package/dist/components/private/CheckableBase/CheckableBase.css.js +2 -0
- package/dist/components/private/CheckableBase/CheckableBase.js +6 -6
- package/dist/components/private/CheckableBase/useCheckableStyles.d.ts +3 -0
- package/dist/components/private/CheckableBase/useCheckableStyles.d.ts.map +1 -1
- package/dist/components/private/CheckableBase/useCheckableStyles.js +3 -0
- package/dist/components/private/InputBase/HintText.js +1 -1
- package/dist/components/private/InputBase/NotchedBase.js +7 -7
- package/dist/components/private/InputBase/withEnhancedInput.css.js +1 -0
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +32 -10
- 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/useAttachedBoxes/useAttachedBoxes.js +2 -1
- package/dist/hooks/useDeepCompareMemo/index.d.ts +4 -0
- package/dist/hooks/useDeepCompareMemo/index.d.ts.map +1 -1
- package/dist/hooks/useDeepCompareMemo/index.js +12 -0
- package/dist/hooks/useMedia/useMedia.js +1 -0
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +3 -1
- package/dist/hooks/useTooltip/index.d.ts +2 -0
- package/dist/hooks/useTooltip/index.d.ts.map +1 -0
- package/dist/hooks/useTooltip/index.js +3 -0
- package/dist/hooks/useTooltip/useTooltip.d.ts +38 -0
- package/dist/hooks/useTooltip/useTooltip.d.ts.map +1 -0
- package/dist/hooks/useTooltip/useTooltip.js +125 -0
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +1 -0
- package/dist/hooks/useWindowScrollLock/index.js +2 -0
- package/dist/styles/componentStyles.d.ts +14 -1
- package/dist/styles/componentStyles.d.ts.map +1 -1
- package/dist/styles/componentStyles.js +17 -3
- package/dist/styles/componentStyles.spec.d.ts +2 -0
- package/dist/styles/componentStyles.spec.d.ts.map +1 -0
- package/dist/styles/componentStyles.spec.js +251 -0
- package/dist/styles/elementReset.css.d.ts +1 -0
- package/dist/styles/elementReset.css.d.ts.map +1 -1
- package/dist/styles/elementReset.css.js +4 -0
- package/dist/styles/global/reset.css.js +2 -0
- package/dist/styles/layers.css.d.ts +3 -2
- package/dist/styles/layers.css.d.ts.map +1 -1
- package/dist/styles/layers.css.js +6 -2
- package/dist/styles/sprinkles.css.d.ts +11 -11
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +39 -14
- package/dist/styles/typography.css.d.ts +14 -0
- package/dist/styles/typography.css.d.ts.map +1 -1
- package/dist/styles/typography.css.js +5 -0
- package/dist/styles/vars.css.js +2 -0
- package/dist/themes/base/theme.css.js +3 -1
- package/dist/themes/base/tokens.d.ts +3 -0
- package/dist/themes/base/tokens.d.ts.map +1 -1
- package/dist/themes/base/tokens.js +3 -0
- package/dist/themes/helpers.d.ts +22 -0
- package/dist/themes/helpers.d.ts.map +1 -1
- package/dist/themes/helpers.js +24 -0
- package/dist/themes/makeTheme.d.ts +3 -0
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/makeTheme.js +7 -1
- package/dist/themes/theme.css.d.ts +4 -0
- package/dist/themes/theme.css.d.ts.map +1 -1
- package/dist/themes/theme.css.js +16 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/css.d.ts +15 -0
- package/dist/utils/css.d.ts.map +1 -1
- package/dist/utils/css.js +18 -0
- package/dist/utils/dataAttrs.d.ts +3 -0
- package/dist/utils/dataAttrs.d.ts.map +1 -1
- package/dist/utils/dataAttrs.js +3 -0
- package/dist/utils/estimateTextWidth.js +3 -2
- package/dist/utils/index.d.ts +21 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +39 -0
- package/dist/utils/number.js +7 -2
- package/dist/utils/propGuards.d.ts +14 -0
- package/dist/utils/propGuards.d.ts.map +1 -1
- package/dist/utils/propGuards.js +14 -0
- package/dist/utils/responsiveProps.css.js +1 -1
- package/dist/utils/sprinkles.d.ts +18 -0
- package/dist/utils/sprinkles.d.ts.map +1 -1
- package/dist/utils/sprinkles.js +21 -1
- package/package.json +19 -19
|
@@ -17,23 +17,23 @@ export const ProgressBarGroup = _ref => {
|
|
|
17
17
|
} = _ref;
|
|
18
18
|
const hasPrefixLabels = Array.isArray(prefixLabels);
|
|
19
19
|
const hasSuffixLabels = Array.isArray(suffixLabels);
|
|
20
|
-
return _jsx(Box, {
|
|
20
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
21
21
|
className: styles.root,
|
|
22
22
|
alignItems: "center",
|
|
23
23
|
style: {
|
|
24
24
|
gridTemplateColumns: `${hasPrefixLabels ? 'auto ' : ''}1fr${hasSuffixLabels ? ' auto' : ''}`
|
|
25
25
|
},
|
|
26
26
|
odComponent: "progress-bar-group",
|
|
27
|
-
children: values.map((value, idx) => _jsxs(Fragment, {
|
|
28
|
-
children: [_jsx(Text, {
|
|
27
|
+
children: values.map((value, idx) => /*#__PURE__*/_jsxs(Fragment, {
|
|
28
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
29
29
|
size: "3",
|
|
30
30
|
colour: "light",
|
|
31
31
|
className: styles.label,
|
|
32
32
|
children: hasPrefixLabels ? prefixLabels[idx] : ''
|
|
33
|
-
}), _jsx(ProgressBar, {
|
|
33
|
+
}), /*#__PURE__*/_jsx(ProgressBar, {
|
|
34
34
|
colour: colour,
|
|
35
35
|
value: value / count
|
|
36
|
-
}), _jsx(Text, {
|
|
36
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
37
37
|
size: "3",
|
|
38
38
|
colour: "light",
|
|
39
39
|
children: hasSuffixLabels ? suffixLabels[idx] : ''
|
|
@@ -12,17 +12,17 @@ export const ProgressSpinner = _ref => {
|
|
|
12
12
|
colour = 'primary',
|
|
13
13
|
size = 'medium'
|
|
14
14
|
} = _ref;
|
|
15
|
-
return _jsx(Box, {
|
|
15
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
16
16
|
className: [styles.size[size].circular, styles.colours[colour], className],
|
|
17
17
|
odComponent: "progress-spinner",
|
|
18
|
-
children: _jsx("svg", {
|
|
18
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
19
19
|
className: clsx(componentStyles({
|
|
20
20
|
as: 'svg',
|
|
21
21
|
display: 'block',
|
|
22
22
|
overflow: 'hidden'
|
|
23
23
|
}), styles.circular),
|
|
24
24
|
viewBox: "25 25 50 50",
|
|
25
|
-
children: _jsx("circle", {
|
|
25
|
+
children: /*#__PURE__*/_jsx("circle", {
|
|
26
26
|
className: clsx(styles.path, styles.size[size].path),
|
|
27
27
|
cx: "50",
|
|
28
28
|
cy: "50",
|
|
@@ -9,7 +9,7 @@ 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 = forwardRef((_ref, ref) => {
|
|
12
|
+
export const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
13
13
|
let {
|
|
14
14
|
value,
|
|
15
15
|
className = '',
|
|
@@ -22,7 +22,7 @@ export const Radio = forwardRef((_ref, ref) => {
|
|
|
22
22
|
var _radioContext$radioSe;
|
|
23
23
|
return (_radioContext$radioSe = radioContext.radioSelected) === null || _radioContext$radioSe === void 0 ? void 0 : _radioContext$radioSe.call(radioContext, value);
|
|
24
24
|
};
|
|
25
|
-
return _jsxs(CheckableBase, {
|
|
25
|
+
return /*#__PURE__*/_jsxs(CheckableBase, {
|
|
26
26
|
ref: ref,
|
|
27
27
|
inputType: "radio",
|
|
28
28
|
className: className,
|
|
@@ -32,11 +32,11 @@ export const Radio = forwardRef((_ref, ref) => {
|
|
|
32
32
|
disabled: disabled,
|
|
33
33
|
checked: isChecked,
|
|
34
34
|
handleClick: handleClick,
|
|
35
|
-
children: [_jsx(Box, {
|
|
35
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
36
36
|
className: clsx(checkableIndicator, styles.radio, {
|
|
37
37
|
[styles.radioSelected]: isChecked
|
|
38
38
|
})
|
|
39
|
-
}), _jsx(Box, {
|
|
39
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
40
40
|
className: clsx(styles.inner, {
|
|
41
41
|
[styles.innerSelected]: isChecked
|
|
42
42
|
})
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import React, { createContext, forwardRef, useContext, useMemo } from 'react';
|
|
4
4
|
import { Box } from "../Box/index.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const RadioContext = createContext(null);
|
|
6
|
+
export const RadioContext = /*#__PURE__*/createContext(null);
|
|
7
7
|
export const useRadioContext = () => useContext(RadioContext);
|
|
8
|
-
export const RadioGroup = forwardRef((_ref, ref) => {
|
|
8
|
+
export const RadioGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
9
9
|
let {
|
|
10
10
|
name,
|
|
11
11
|
value,
|
|
@@ -18,9 +18,9 @@ export const RadioGroup = forwardRef((_ref, ref) => {
|
|
|
18
18
|
inputName: name,
|
|
19
19
|
radioSelected: onChange
|
|
20
20
|
}), [value, name, onChange]);
|
|
21
|
-
return _jsx(RadioContext.Provider, {
|
|
21
|
+
return /*#__PURE__*/_jsx(RadioContext.Provider, {
|
|
22
22
|
value: contextValue,
|
|
23
|
-
children: _jsx(Box, {
|
|
23
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
24
24
|
ref: ref,
|
|
25
25
|
position: "relative",
|
|
26
26
|
display: "flex",
|
|
@@ -10,13 +10,13 @@ import React, { forwardRef } from 'react';
|
|
|
10
10
|
import { Box } from "../Box/index.js";
|
|
11
11
|
import * as styles from "./ScrollPane.css.js";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
export const ScrollPane = forwardRef((_ref, ref) => {
|
|
13
|
+
export const ScrollPane = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
14
14
|
let {
|
|
15
15
|
className = '',
|
|
16
16
|
rounded = false
|
|
17
17
|
} = _ref,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return _jsx(Box, _objectSpread({
|
|
19
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread({
|
|
20
20
|
ref: ref,
|
|
21
21
|
overflow: "auto",
|
|
22
22
|
className: clsx(className, styles.root, {
|
|
@@ -10,10 +10,27 @@ interface SearchBarProps extends AriaSearchFieldProps, TestId {
|
|
|
10
10
|
onChange?: AriaSearchFieldProps['onChange'];
|
|
11
11
|
isDisabled?: AriaSearchFieldProps['isDisabled'];
|
|
12
12
|
maxLength?: AriaSearchFieldProps['maxLength'];
|
|
13
|
+
/**
|
|
14
|
+
* The placeholder text is also used as the aria-label since the SearchBar does not have a label element
|
|
15
|
+
*/
|
|
13
16
|
placeholder: string;
|
|
17
|
+
/**
|
|
18
|
+
* Language content override
|
|
19
|
+
*/
|
|
14
20
|
lang?: Partial<Record<TextContent, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* Optional forwarded ref for the input element (React 19)
|
|
23
|
+
*/
|
|
15
24
|
ref?: React.Ref<HTMLInputElement>;
|
|
16
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Oversized search bar implemented via the react-aria `useSearchField` hook
|
|
28
|
+
* ([docs](https://react-spectrum.adobe.com/react-aria/useSearchField.html)). This search bar is used primarily in
|
|
29
|
+
* combination with the `OptionGrid` in order to filter displayed options and can be reset once text is entered.
|
|
30
|
+
*
|
|
31
|
+
* This field does not have a visible label, so an placeholder text is used as `aria-label`.
|
|
32
|
+
* It is recommended to use the `onChange` prop to handle the input content, uncontrolled.
|
|
33
|
+
*/
|
|
17
34
|
export declare const SearchBar: (componentProps: SearchBarProps) => React.JSX.Element;
|
|
18
35
|
export {};
|
|
19
36
|
//# sourceMappingURL=SearchBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../lib/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAMN,KAAK,oBAAoB,EACzB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAY1C,QAAA,MAAM,cAAc;;;CAGV,CAAC;AAEX,KAAK,WAAW,GAAG,MAAM,OAAO,cAAc,CAAC;AAE/C,UAAU,cAAe,SAAQ,oBAAoB,EAAE,MAAM;IAC5D,QAAQ,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../lib/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAMN,KAAK,oBAAoB,EACzB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAY1C,QAAA,MAAM,cAAc;;;CAGV,CAAC;AAEX,KAAK,WAAW,GAAG,MAAM,OAAO,cAAc,CAAC;AAE/C,UAAU,cAAe,SAAQ,oBAAoB,EAAE,MAAM;IAC5D,QAAQ,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAC9C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAClC;AAYD;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,GAAI,gBAAgB,cAAc,sBAiEvD,CAAC"}
|
|
@@ -21,12 +21,21 @@ const ReactAriaButton = props => {
|
|
|
21
21
|
const {
|
|
22
22
|
buttonProps
|
|
23
23
|
} = useButton(props, ref);
|
|
24
|
-
return _jsx("button", _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
24
|
+
return /*#__PURE__*/_jsx("button", _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
25
25
|
className: props.className,
|
|
26
26
|
ref: ref,
|
|
27
27
|
children: props.children
|
|
28
28
|
}));
|
|
29
29
|
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Oversized search bar implemented via the react-aria `useSearchField` hook
|
|
33
|
+
* ([docs](https://react-spectrum.adobe.com/react-aria/useSearchField.html)). This search bar is used primarily in
|
|
34
|
+
* combination with the `OptionGrid` in order to filter displayed options and can be reset once text is entered.
|
|
35
|
+
*
|
|
36
|
+
* This field does not have a visible label, so an placeholder text is used as `aria-label`.
|
|
37
|
+
* It is recommended to use the `onChange` prop to handle the input content, uncontrolled.
|
|
38
|
+
*/
|
|
30
39
|
export const SearchBar = componentProps => {
|
|
31
40
|
var _ref;
|
|
32
41
|
const {
|
|
@@ -57,16 +66,19 @@ export const SearchBar = componentProps => {
|
|
|
57
66
|
};
|
|
58
67
|
const ClearButton = () => {
|
|
59
68
|
if (state.value === '') return null;
|
|
60
|
-
return _jsx(ReactAriaButton, _objectSpread(_objectSpread({
|
|
69
|
+
return /*#__PURE__*/_jsx(ReactAriaButton, _objectSpread(_objectSpread({
|
|
61
70
|
className: styledClearButton({})
|
|
62
71
|
}, clearButtonProps), {}, {
|
|
63
|
-
children: _jsx(Icon, {
|
|
72
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
64
73
|
icon: CloseIcon,
|
|
65
74
|
size: "100%"
|
|
66
75
|
})
|
|
67
76
|
}));
|
|
68
77
|
};
|
|
69
|
-
return (
|
|
78
|
+
return (
|
|
79
|
+
/*#__PURE__*/
|
|
80
|
+
// this is a pass-through for mouse/touch interaction, the interactive element is keyboard focusable
|
|
81
|
+
_jsxs("div", _objectSpread(_objectSpread({
|
|
70
82
|
className: styledSearchBar({}),
|
|
71
83
|
onClick: handleWrapperClick,
|
|
72
84
|
ref: refWrapper
|
|
@@ -76,17 +88,17 @@ export const SearchBar = componentProps => {
|
|
|
76
88
|
'focus-visible': isFocusVisible,
|
|
77
89
|
testid: props.testId
|
|
78
90
|
})), {}, {
|
|
79
|
-
children: [_jsx("div", {
|
|
80
|
-
children: _jsx(Icon, {
|
|
91
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
92
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
81
93
|
icon: MagnifyIcon,
|
|
82
94
|
size: "large"
|
|
83
95
|
})
|
|
84
|
-
}), _jsxs("div", {
|
|
96
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
85
97
|
className: fieldWrapper,
|
|
86
|
-
children: [_jsx("input", _objectSpread(_objectSpread({}, mergeProps(inputProps, focusProps)), {}, {
|
|
98
|
+
children: [/*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({}, mergeProps(inputProps, focusProps)), {}, {
|
|
87
99
|
className: styledInput({}),
|
|
88
100
|
ref: mergeRefs([refInput, refForwarded])
|
|
89
|
-
})), _jsx(ClearButton, {})]
|
|
101
|
+
})), /*#__PURE__*/_jsx(ClearButton, {})]
|
|
90
102
|
})]
|
|
91
103
|
}))
|
|
92
104
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps, FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { Box } from '../Box/Box';
|
|
3
3
|
import * as styles from './Section.css';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Props extends Pick<ComponentProps<typeof Box>, 'paddingX' | 'ref'> {
|
|
5
5
|
width?: keyof typeof styles.width;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export declare const Section:
|
|
8
|
+
export declare const Section: FunctionComponent<Props>;
|
|
9
9
|
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../lib/components/Section/Section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../lib/components/Section/Section.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,KAChB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAc5C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import * as React from 'react';
|
|
4
5
|
import { Box } from "../Box/Box.js";
|
|
5
6
|
import * as styles from "./Section.css.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,9 +12,9 @@ export const Section = _ref => {
|
|
|
11
12
|
paddingX,
|
|
12
13
|
ref
|
|
13
14
|
} = _ref;
|
|
14
|
-
return _jsx(Box, {
|
|
15
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
15
16
|
ref: ref,
|
|
16
|
-
className:
|
|
17
|
+
className: clsx(styles.root, styles.width[width]),
|
|
17
18
|
width: "full",
|
|
18
19
|
paddingX: paddingX,
|
|
19
20
|
children: children
|
|
@@ -26,28 +26,28 @@ export const SelectInput = withEnhancedInput(_ref => {
|
|
|
26
26
|
fieldIcon = ChevronDownIcon
|
|
27
27
|
} = _ref,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
return _jsxs(Box, {
|
|
29
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
30
30
|
display: "flex",
|
|
31
31
|
flexWrap: "nowrap",
|
|
32
32
|
alignItems: "center",
|
|
33
33
|
justifyContent: "center",
|
|
34
34
|
position: "relative",
|
|
35
|
-
children: [_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
35
|
+
children: [/*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
36
36
|
as: "select",
|
|
37
|
-
flexGrow:
|
|
37
|
+
flexGrow: 1
|
|
38
38
|
}, eventHandlers), field), rest), {}, {
|
|
39
39
|
className: [styles.input, styles.paddedInput, field.className],
|
|
40
40
|
autoComplete: "off"
|
|
41
|
-
})), isLoading ? null : _jsx(Box, {
|
|
41
|
+
})), isLoading ? null : /*#__PURE__*/_jsx(Box, {
|
|
42
42
|
className: clsx(styles.arrow, field.disabled && styles.arrowDisabled),
|
|
43
43
|
display: "flex",
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
height: "full",
|
|
46
46
|
marginRight: size === 'medium' ? '4' : '2',
|
|
47
|
-
flexShrink:
|
|
47
|
+
flexShrink: 0,
|
|
48
48
|
pointerEvents: "none",
|
|
49
49
|
position: "absolute",
|
|
50
|
-
children: _jsx(Icon, {
|
|
50
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
51
51
|
size: size === 'large' ? size : 'medium',
|
|
52
52
|
icon: fieldIcon
|
|
53
53
|
})
|
|
@@ -7,7 +7,7 @@ import { Button } from "../Button/Button.js";
|
|
|
7
7
|
import { Icon } from "../Icon/Icon.js";
|
|
8
8
|
import { Inline } from "../Inline/Inline.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
export let EChangeDirection = function (EChangeDirection) {
|
|
10
|
+
export let EChangeDirection = /*#__PURE__*/function (EChangeDirection) {
|
|
11
11
|
EChangeDirection["Previous"] = "previous";
|
|
12
12
|
EChangeDirection["Next"] = "next";
|
|
13
13
|
return EChangeDirection;
|
|
@@ -21,13 +21,13 @@ export const SimplePagination = _ref => {
|
|
|
21
21
|
const handleClick = direction => () => {
|
|
22
22
|
onChange(direction);
|
|
23
23
|
};
|
|
24
|
-
return _jsxs(Inline, {
|
|
24
|
+
return /*#__PURE__*/_jsxs(Inline, {
|
|
25
25
|
as: "nav",
|
|
26
26
|
space: "6",
|
|
27
27
|
"aria-label": "pagination",
|
|
28
28
|
alignX: "center",
|
|
29
29
|
alignY: "center",
|
|
30
|
-
children: [_jsx(Button, {
|
|
30
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
31
31
|
rounded: true,
|
|
32
32
|
withDoubleClicks: true,
|
|
33
33
|
disabled: !hasPrevious,
|
|
@@ -35,11 +35,11 @@ export const SimplePagination = _ref => {
|
|
|
35
35
|
variant: "secondary",
|
|
36
36
|
"aria-label": "previous page",
|
|
37
37
|
onClick: handleClick(EChangeDirection.Previous),
|
|
38
|
-
children: _jsx(Icon, {
|
|
38
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
39
39
|
size: "medium",
|
|
40
40
|
icon: ChevronLeftIcon
|
|
41
41
|
})
|
|
42
|
-
}), _jsx(Button, {
|
|
42
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
43
43
|
rounded: true,
|
|
44
44
|
withDoubleClicks: true,
|
|
45
45
|
disabled: !hasNext,
|
|
@@ -47,7 +47,7 @@ export const SimplePagination = _ref => {
|
|
|
47
47
|
variant: "secondary",
|
|
48
48
|
"aria-label": "next page",
|
|
49
49
|
onClick: handleClick(EChangeDirection.Next),
|
|
50
|
-
children: _jsx(Icon, {
|
|
50
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
51
51
|
size: "medium",
|
|
52
52
|
icon: ChevronRightIcon
|
|
53
53
|
})
|
|
@@ -6,7 +6,7 @@ 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 = memo(_ref => {
|
|
9
|
+
export const ProgressStep = /*#__PURE__*/memo(_ref => {
|
|
10
10
|
let {
|
|
11
11
|
className = '',
|
|
12
12
|
paused,
|
|
@@ -21,16 +21,16 @@ export const ProgressStep = memo(_ref => {
|
|
|
21
21
|
} = useAnimationEvents({
|
|
22
22
|
onAnimationEnd: useCallback(() => !hasPassed && isActive && onFinished(), [isActive, hasPassed, onFinished])
|
|
23
23
|
});
|
|
24
|
-
return _jsxs(Box, {
|
|
24
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
25
25
|
className: className,
|
|
26
26
|
position: "relative",
|
|
27
|
-
children: [_jsx(Box, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
28
28
|
ref: elementRef,
|
|
29
29
|
position: "absolute",
|
|
30
30
|
display: hasPassed ? 'none' : 'block',
|
|
31
31
|
className: [styles.item, styles.empty],
|
|
32
32
|
backgroundColour: backgroundColour
|
|
33
|
-
}), _jsx(Box, {
|
|
33
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
34
34
|
ref: elementRef,
|
|
35
35
|
position: "absolute",
|
|
36
36
|
display: isActive || hasPassed ? 'block' : 'none',
|
|
@@ -6,7 +6,7 @@ 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 = memo(_ref => {
|
|
9
|
+
export const SliderProgress = /*#__PURE__*/memo(_ref => {
|
|
10
10
|
let {
|
|
11
11
|
className = '',
|
|
12
12
|
paused,
|
|
@@ -16,14 +16,14 @@ export const SliderProgress = memo(_ref => {
|
|
|
16
16
|
backgroundColour,
|
|
17
17
|
onRequestNext
|
|
18
18
|
} = _ref;
|
|
19
|
-
return _jsx("div", {
|
|
19
|
+
return /*#__PURE__*/_jsx("div", {
|
|
20
20
|
className: clsx(className, styles.root),
|
|
21
21
|
style: {
|
|
22
22
|
gridTemplateColumns: `repeat(${totalCount}, 1fr)`
|
|
23
23
|
},
|
|
24
24
|
children: Array.from({
|
|
25
25
|
length: totalCount
|
|
26
|
-
}).fill('').map((_, index) => _jsx(ProgressStep, {
|
|
26
|
+
}).fill('').map((_, index) => /*#__PURE__*/_jsx(ProgressStep, {
|
|
27
27
|
className: styles.step,
|
|
28
28
|
paused: paused,
|
|
29
29
|
duration: duration,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Divider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1C,eAAO,MAAM,OAAO,EAAE,iBAIrB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Box } from "../Box/Box.js";
|
|
5
|
+
import * as styles from "./Divider.css.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const Divider = () => /*#__PURE__*/_jsx(Box, {
|
|
8
|
+
position: "relative",
|
|
9
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
10
|
+
position: "absolute",
|
|
11
|
+
className: styles.hr
|
|
12
|
+
})
|
|
13
|
+
});
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { Sprinkles } from '../../styles/sprinkles.css';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
3
2
|
import { type BoxProps } from '../Box/Box';
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import * as styles from './Stack.css';
|
|
4
|
+
export interface Props extends Pick<BoxProps, 'as' | 'width' | 'alignItems'> {
|
|
5
|
+
space?: keyof typeof styles.child.spaces;
|
|
6
6
|
className?: string;
|
|
7
7
|
dividers?: boolean;
|
|
8
|
-
|
|
8
|
+
children: ReactNode | ReactNode[];
|
|
9
9
|
}
|
|
10
|
-
export declare const
|
|
11
|
-
readonly ol: "li";
|
|
12
|
-
readonly ul: "li";
|
|
13
|
-
};
|
|
14
|
-
export declare const Stack: ({ alignItems, as, className, children, dividers, space, width, }: StackProps) => React.JSX.Element | null;
|
|
10
|
+
export declare const Stack: FunctionComponent<Props>;
|
|
15
11
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Stack.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,GAAG,YAAY,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAClC;AAOD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CA0C1C,CAAC"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Children } from 'react';
|
|
4
5
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
5
6
|
import { Box } from "../Box/Box.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ul: 'li'
|
|
11
|
-
};
|
|
12
|
-
const Divider = () => _jsx("hr", {
|
|
13
|
-
className: styles.hr
|
|
14
|
-
});
|
|
7
|
+
import { Divider } from "./Divider.js";
|
|
8
|
+
import * as styles from "./Stack.css.js";
|
|
9
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const supportedListTypes = ['ul', 'ol'];
|
|
15
11
|
export const Stack = _ref => {
|
|
16
12
|
let {
|
|
17
|
-
alignItems,
|
|
18
13
|
as = 'div',
|
|
19
|
-
|
|
14
|
+
space = '2',
|
|
20
15
|
children,
|
|
16
|
+
alignItems,
|
|
17
|
+
width,
|
|
21
18
|
dividers = false,
|
|
22
|
-
|
|
23
|
-
width
|
|
19
|
+
className = ''
|
|
24
20
|
} = _ref;
|
|
25
|
-
const items =
|
|
26
|
-
if (items.length
|
|
27
|
-
return
|
|
21
|
+
const items = flattenChildren(children);
|
|
22
|
+
if (items.length < 2) {
|
|
23
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
24
|
+
children: items
|
|
25
|
+
});
|
|
28
26
|
}
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
let listItem = 'div';
|
|
28
|
+
if (typeof as === 'string') listItem = supportedListTypes.includes(as) ? 'li' : 'div';
|
|
29
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
31
30
|
as: as,
|
|
32
31
|
className: className,
|
|
33
|
-
display: "flex",
|
|
34
|
-
flexDirection: "column",
|
|
35
|
-
gap: space,
|
|
36
|
-
odComponent: "stack",
|
|
37
32
|
width: width,
|
|
38
|
-
children: Children.map(items, (child, idx) =>
|
|
33
|
+
children: Children.map(items, (child, idx) => /*#__PURE__*/_jsxs(Box, {
|
|
34
|
+
as: listItem,
|
|
35
|
+
display: alignItems ? 'flex' : void 0,
|
|
36
|
+
flexDirection: "column",
|
|
39
37
|
alignItems: alignItems,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
className: [styles.child.default, dividers ? undefined : styles.child.spaces[space]],
|
|
39
|
+
children: [dividers && idx > 0 ? /*#__PURE__*/_jsx(Box, {
|
|
40
|
+
paddingY: space,
|
|
41
|
+
width: "full",
|
|
42
|
+
children: /*#__PURE__*/_jsx(Divider, {})
|
|
43
|
+
}) : null, child]
|
|
44
44
|
}))
|
|
45
45
|
});
|
|
46
46
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComponentProps, FunctionComponent } from 'react';
|
|
2
2
|
import { Modal } from '../Modal/Modal';
|
|
3
3
|
export declare enum ESize {
|
|
4
|
-
Skinny = "skinny"
|
|
5
|
-
Narrow = "narrow"
|
|
4
|
+
Skinny = "skinny",// 420px wide
|
|
5
|
+
Narrow = "narrow",// 600px wide
|
|
6
6
|
Standard = "standard"
|
|
7
7
|
}
|
|
8
8
|
type Size = 'skinny' | 'narrow' | 'standard';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardModal.d.ts","sourceRoot":"","sources":["../../../lib/components/StandardModal/StandardModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,cAAc,EACd,iBAAiB,EAEjB,MAAM,OAAO,CAAC;AASf,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAKvC,oBAAY,KAAK;IAChB,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"StandardModal.d.ts","sourceRoot":"","sources":["../../../lib/components/StandardModal/StandardModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,cAAc,EACd,iBAAiB,EAEjB,MAAM,OAAO,CAAC;AASf,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAKvC,oBAAY,KAAK;IAChB,MAAM,WAAW,CAAE,aAAa;IAChC,MAAM,WAAW,CAAE,aAAa;IAChC,QAAQ,aAAa;CACrB;AAED,KAAK,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE7C,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,OAAO,KAAK,CAAC;IACvE,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA+H/D,CAAC"}
|
|
@@ -13,10 +13,12 @@ import { Modal } from "../Modal/Modal.js";
|
|
|
13
13
|
import { textStyles } from "../Text/textStyles.js";
|
|
14
14
|
import * as styles from "./StandardModal.css.js";
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
export let ESize = function (ESize) {
|
|
16
|
+
export let ESize = /*#__PURE__*/function (ESize) {
|
|
17
17
|
ESize["Skinny"] = "skinny";
|
|
18
|
+
// 420px wide
|
|
18
19
|
ESize["Narrow"] = "narrow";
|
|
19
|
-
|
|
20
|
+
// 600px wide
|
|
21
|
+
ESize["Standard"] = "standard"; // 800px wide
|
|
20
22
|
return ESize;
|
|
21
23
|
}({});
|
|
22
24
|
export const StandardModal = _ref => {
|
|
@@ -51,13 +53,13 @@ export const StandardModal = _ref => {
|
|
|
51
53
|
};
|
|
52
54
|
}, [isOpen]);
|
|
53
55
|
}
|
|
54
|
-
return _jsx(Modal, {
|
|
56
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
55
57
|
isOpen: isOpen,
|
|
56
58
|
ref: ref,
|
|
57
59
|
noThemedWrapper: noThemedWrapper,
|
|
58
60
|
container: container,
|
|
59
61
|
onRequestClose: onRequestClose,
|
|
60
|
-
children: _jsx(Box, {
|
|
62
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
61
63
|
className: styles.container,
|
|
62
64
|
height: "full",
|
|
63
65
|
display: "flex",
|
|
@@ -67,7 +69,7 @@ export const StandardModal = _ref => {
|
|
|
67
69
|
role: "none presentation",
|
|
68
70
|
onMouseDown: unlockModal,
|
|
69
71
|
onClick: backdropHandler,
|
|
70
|
-
children: _jsxs(Box, {
|
|
72
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
71
73
|
as: "article",
|
|
72
74
|
overflow: "hidden",
|
|
73
75
|
role: "dialog",
|
|
@@ -84,7 +86,7 @@ export const StandardModal = _ref => {
|
|
|
84
86
|
}, {
|
|
85
87
|
[styles.modalSizeSkinny]: size === 'skinny'
|
|
86
88
|
}, className]),
|
|
87
|
-
children: [_jsxs(Box, {
|
|
89
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
88
90
|
as: "header",
|
|
89
91
|
flexShrink: "0",
|
|
90
92
|
position: "relative",
|
|
@@ -97,21 +99,21 @@ export const StandardModal = _ref => {
|
|
|
97
99
|
paddingRight: "2",
|
|
98
100
|
borderWidthBottom: "1",
|
|
99
101
|
borderColour: "light",
|
|
100
|
-
children: [_jsx(Box, {
|
|
102
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
101
103
|
flexGrow: "0",
|
|
102
104
|
id: titleId,
|
|
103
|
-
children: _jsx(Heading, {
|
|
105
|
+
children: /*#__PURE__*/_jsx(Heading, {
|
|
104
106
|
as: "h4",
|
|
105
107
|
children: title
|
|
106
108
|
})
|
|
107
|
-
}), _jsx(Button, {
|
|
109
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
108
110
|
minimal: true,
|
|
109
111
|
rounded: true,
|
|
110
112
|
variant: "secondary",
|
|
111
113
|
size: "small",
|
|
112
114
|
"aria-label": "close",
|
|
113
115
|
onClick: closeButtonHandler,
|
|
114
|
-
children: _jsx(Icon, {
|
|
116
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
115
117
|
className: textStyles({
|
|
116
118
|
colour: 'muted'
|
|
117
119
|
}),
|
|
@@ -119,7 +121,7 @@ export const StandardModal = _ref => {
|
|
|
119
121
|
size: "medium"
|
|
120
122
|
})
|
|
121
123
|
})]
|
|
122
|
-
}), _jsx(Box, {
|
|
124
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
123
125
|
as: "main",
|
|
124
126
|
display: "flex",
|
|
125
127
|
flexDirection: "column",
|