@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
|
@@ -9,15 +9,18 @@ import React from 'react';
|
|
|
9
9
|
import { typographyStyles } from "../../styles/typography.css.js";
|
|
10
10
|
import { Box } from "../Box/Box.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
export const Text = React.forwardRef((_ref, ref) => {
|
|
12
|
+
export const Text = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
13
|
let {
|
|
14
14
|
as = 'span',
|
|
15
15
|
children,
|
|
16
16
|
className,
|
|
17
|
+
//style props
|
|
17
18
|
align = 'left',
|
|
18
19
|
breakWord,
|
|
19
20
|
color,
|
|
21
|
+
// modern semantic colour tokens
|
|
20
22
|
colour,
|
|
23
|
+
// legacy colours
|
|
21
24
|
noWrap,
|
|
22
25
|
size = '4',
|
|
23
26
|
strong = false,
|
|
@@ -26,7 +29,7 @@ export const Text = React.forwardRef((_ref, ref) => {
|
|
|
26
29
|
wrap
|
|
27
30
|
} = _ref,
|
|
28
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
return _jsx(Box, _objectSpread(_objectSpread({
|
|
32
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
|
|
30
33
|
as: as,
|
|
31
34
|
ref: ref,
|
|
32
35
|
textAlign: align,
|
|
@@ -2,5 +2,8 @@ import { type TypographyStyleProps, type TypographyVariants } from '../../styles
|
|
|
2
2
|
export type TextTags = NonNullable<TypographyVariants['as']>;
|
|
3
3
|
export interface TextStyleProps extends TypographyVariants, TypographyStyleProps {
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* primary utility for styling typography, combines reset, vanilla-extract sprinkles and additional variant props
|
|
7
|
+
*/
|
|
5
8
|
export declare const textStyles: ({ as, align: textAlign, breakWord, color, colour, noWrap, size, strong, transform: textTransform, weight, wordBreak, wrap: textWrap, }: TextStyleProps) => string;
|
|
6
9
|
//# sourceMappingURL=textStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textStyles.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/textStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,MAAM,WAAW,cAChB,SAAQ,kBAAkB,EACzB,oBAAoB;CAAG;
|
|
1
|
+
{"version":3,"file":"textStyles.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/textStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,MAAM,WAAW,cAChB,SAAQ,kBAAkB,EACzB,oBAAoB;CAAG;AAEzB;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,wIAcxB,cAAc,WAkBf,CAAC"}
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { sprinkles } from "../../styles/sprinkles.css.js";
|
|
5
5
|
import { typographyStyles } from "../../styles/typography.css.js";
|
|
6
|
+
/**
|
|
7
|
+
* primary utility for styling typography, combines reset, vanilla-extract sprinkles and additional variant props
|
|
8
|
+
*/
|
|
6
9
|
export const textStyles = _ref => {
|
|
7
10
|
let {
|
|
8
11
|
as,
|
|
9
12
|
align: textAlign,
|
|
10
13
|
breakWord,
|
|
11
14
|
color,
|
|
15
|
+
// modern semantic colour tokens
|
|
12
16
|
colour = color ? undefined : 'neutral',
|
|
17
|
+
// legacy colours
|
|
13
18
|
noWrap,
|
|
14
19
|
size,
|
|
15
20
|
strong,
|
|
@@ -21,7 +21,7 @@ export const TextAreaInput = withEnhancedInput(_ref => {
|
|
|
21
21
|
size
|
|
22
22
|
} = _ref,
|
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
-
return _jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
24
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
25
25
|
as: "textarea"
|
|
26
26
|
}, eventHandlers), field), rest), {}, {
|
|
27
27
|
autoComplete: "off",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export interface TextBubbleProps extends Omit<
|
|
1
|
+
import { ComponentProps, FunctionComponent } from 'react';
|
|
2
|
+
import { Box } from '../Box/Box';
|
|
3
|
+
import { Text } from '../Text/Text';
|
|
4
|
+
export interface TextBubbleProps extends Omit<ComponentProps<typeof Box>, 'borderRadius' | 'position' | 'padding'> {
|
|
5
5
|
label: string;
|
|
6
6
|
rawNumbers?: boolean;
|
|
7
|
-
textColour?:
|
|
7
|
+
textColour?: ComponentProps<typeof Text>['colour'];
|
|
8
8
|
}
|
|
9
9
|
export declare const TextBubble: FunctionComponent<TextBubbleProps>;
|
|
10
10
|
//# sourceMappingURL=TextBubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,WAAW,eAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAoDzD,CAAC"}
|
|
@@ -6,7 +6,8 @@ const _excluded = ["textColour", "rawNumbers", "label"];
|
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { useMemo } from 'react';
|
|
10
11
|
import { sprinkles } from "../../styles/index.js";
|
|
11
12
|
import { Box } from "../Box/Box.js";
|
|
12
13
|
import { Text } from "../Text/Text.js";
|
|
@@ -46,7 +47,7 @@ export const TextBubble = _ref => {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
}, [label]);
|
|
49
|
-
return _jsx(Box, _objectSpread(_objectSpread({
|
|
50
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
|
|
50
51
|
borderRadius: "full",
|
|
51
52
|
backgroundColour: "gray900",
|
|
52
53
|
display: "inline-block",
|
|
@@ -54,7 +55,7 @@ export const TextBubble = _ref => {
|
|
|
54
55
|
padding: valuePaddingMap[size],
|
|
55
56
|
odComponent: "text-bubble"
|
|
56
57
|
}, boxProps), {}, {
|
|
57
|
-
children: _jsx(Text, {
|
|
58
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
58
59
|
size: "2",
|
|
59
60
|
strong: true,
|
|
60
61
|
noWrap: true,
|
|
@@ -11,18 +11,18 @@ export const TextContainer = _ref => {
|
|
|
11
11
|
children,
|
|
12
12
|
action
|
|
13
13
|
} = _ref;
|
|
14
|
-
return _jsxs(Stack, {
|
|
14
|
+
return /*#__PURE__*/_jsxs(Stack, {
|
|
15
15
|
as: "article",
|
|
16
16
|
space: "2",
|
|
17
17
|
className: className,
|
|
18
|
-
children: [_jsxs(Box, {
|
|
18
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
19
19
|
alignItems: "center",
|
|
20
20
|
display: "flex",
|
|
21
21
|
justifyContent: "space-between",
|
|
22
22
|
width: "full",
|
|
23
|
-
children: [_jsx(Box, {
|
|
23
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
24
24
|
children: heading
|
|
25
|
-
}), action && _jsx(Box, {
|
|
25
|
+
}), action && /*#__PURE__*/_jsx(Box, {
|
|
26
26
|
children: action
|
|
27
27
|
})]
|
|
28
28
|
}), children]
|
|
@@ -22,7 +22,7 @@ export const TextInput = withEnhancedInput(_ref => {
|
|
|
22
22
|
size
|
|
23
23
|
} = _ref,
|
|
24
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
return _jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
25
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
26
26
|
as: "input"
|
|
27
27
|
}, eventHandlers), field), rest), {}, {
|
|
28
28
|
autoComplete: "off",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.css.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextLink.css.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QASf,CAAC;AAEH,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/TextLink/TextLink.css.ts", "@autoguru/overdrive");
|
|
5
5
|
import { style } from '@vanilla-extract/css';
|
|
6
|
-
import { sprinkles } from "../../styles/sprinkles.css.js";
|
|
7
6
|
import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
8
7
|
export const root = style({
|
|
9
8
|
transitionDelay: '0s',
|
|
@@ -22,10 +21,6 @@ export const icon = style({
|
|
|
22
21
|
top: '50%',
|
|
23
22
|
transform: 'translateY(-50%)'
|
|
24
23
|
}, "icon");
|
|
25
|
-
export const body = sprinkles({
|
|
26
|
-
pointerEvents: 'none',
|
|
27
|
-
position: 'relative'
|
|
28
|
-
});
|
|
29
24
|
export const muted = style({
|
|
30
25
|
':hover': {
|
|
31
26
|
color: 'white',
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { IconType } from '@autoguru/icons';
|
|
2
|
-
import React, {
|
|
3
|
-
import
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
export interface TextLinkProps extends FilteredAnchorProps, FilteredTextStyleProps {
|
|
2
|
+
import React, { AnchorHTMLAttributes, ComponentProps, ElementType, ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { Text } from '../Text/Text';
|
|
4
|
+
type TextProps = Omit<ComponentProps<typeof Text>, 'is' | 'colour'>;
|
|
5
|
+
type AnchorProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color' | 'children' | 'style' | 'is' | keyof TextProps>;
|
|
6
|
+
export interface Props extends TextProps, AnchorProps {
|
|
8
7
|
children?: ReactNode;
|
|
9
8
|
className?: string;
|
|
10
|
-
|
|
9
|
+
is?: ElementType | ReactElement;
|
|
11
10
|
muted?: boolean;
|
|
12
11
|
icon?: IconType;
|
|
13
12
|
}
|
|
14
|
-
export declare const TextLink: React.ForwardRefExoticComponent<
|
|
13
|
+
export declare const TextLink: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
15
14
|
export {};
|
|
16
15
|
//# sourceMappingURL=TextLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,EACb,oBAAoB,EAEpB,cAAc,EAEd,WAAW,EAGX,YAAY,EACZ,SAAS,EACT,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC;AACpE,KAAK,WAAW,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,SAAS,CACvD,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,WAAW;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,8FA0EpB,CAAC"}
|
|
@@ -2,47 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["is", "children", "className", "color", "strong", "muted", "size", "icon", "weight"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { invariant } from '@autoguru/utilities';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import React, { cloneElement, createElement, forwardRef, isValidElement } from 'react';
|
|
11
|
+
import { componentStyles } from "../../styles/index.js";
|
|
11
12
|
import { Box } from "../Box/Box.js";
|
|
12
13
|
import { Icon } from "../Icon/Icon.js";
|
|
13
14
|
import { Text } from "../Text/Text.js";
|
|
14
15
|
import * as styles from "./TextLink.css.js";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
export const TextLink = forwardRef((_ref, ref) => {
|
|
17
|
+
export const TextLink = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
17
18
|
var _props$rel;
|
|
18
19
|
let {
|
|
19
|
-
|
|
20
|
+
is: Component,
|
|
20
21
|
children,
|
|
21
22
|
className,
|
|
22
23
|
color,
|
|
23
|
-
|
|
24
|
-
icon,
|
|
24
|
+
strong,
|
|
25
25
|
muted = false,
|
|
26
|
-
noWrap,
|
|
27
26
|
size,
|
|
28
|
-
|
|
29
|
-
transform,
|
|
27
|
+
icon,
|
|
30
28
|
weight = 'semiBold'
|
|
31
29
|
} = _ref,
|
|
32
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
31
|
!!(Component !== undefined && props.href !== undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You cannot have both href and as defined.') : invariant(false) : void 0;
|
|
34
|
-
const body = _jsxs(Text, {
|
|
32
|
+
const body = /*#__PURE__*/_jsxs(Text, {
|
|
33
|
+
as: "span",
|
|
35
34
|
colour: muted ? 'muted' : 'link',
|
|
36
|
-
noWrap: noWrap,
|
|
37
|
-
pr: icon ? '5' : undefined,
|
|
38
35
|
size: size,
|
|
39
|
-
strong: strong,
|
|
40
|
-
transform: transform,
|
|
41
36
|
weight: weight,
|
|
42
|
-
|
|
37
|
+
strong: strong,
|
|
38
|
+
className: clsx(componentStyles({
|
|
39
|
+
as: 'span',
|
|
40
|
+
pointerEvents: 'none',
|
|
41
|
+
position: 'relative',
|
|
42
|
+
paddingRight: icon ? '5' : undefined
|
|
43
|
+
}), {
|
|
43
44
|
[styles.muted]: muted
|
|
44
|
-
}
|
|
45
|
-
children: [children, icon ? _jsx(Icon, {
|
|
45
|
+
}),
|
|
46
|
+
children: [children, icon ? /*#__PURE__*/_jsx(Icon, {
|
|
46
47
|
icon: icon,
|
|
47
48
|
size: "small",
|
|
48
49
|
display: "inline-block",
|
|
@@ -55,15 +56,14 @@ export const TextLink = forwardRef((_ref, ref) => {
|
|
|
55
56
|
ref
|
|
56
57
|
});
|
|
57
58
|
if (Component === undefined) {
|
|
58
|
-
return _jsx(Box, _objectSpread(_objectSpread({
|
|
59
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
|
|
59
60
|
as: "a",
|
|
60
61
|
color: color,
|
|
61
|
-
colour: colour,
|
|
62
62
|
className: [className, styles.root]
|
|
63
63
|
}, allProps), {}, {
|
|
64
64
|
children: body
|
|
65
65
|
}));
|
|
66
66
|
}
|
|
67
|
-
return isValidElement(Component) ? cloneElement(Component, allProps, body) : createElement(Component, allProps, body);
|
|
67
|
+
return /*#__PURE__*/isValidElement(Component) ? /*#__PURE__*/cloneElement(Component, allProps, body) : /*#__PURE__*/createElement(Component, allProps, body);
|
|
68
68
|
});
|
|
69
69
|
TextLink.displayName = 'TextLink';
|
|
@@ -4,6 +4,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
7
8
|
import { invariant } from '@autoguru/utilities';
|
|
8
9
|
import * as React from 'react';
|
|
9
10
|
import { createContext, useCallback, useContext, useLayoutEffect, useMemo, useReducer } from 'react';
|
|
@@ -14,7 +15,7 @@ import { Portal } from "../Portal/Portal.js";
|
|
|
14
15
|
import { Stack } from "../Stack/Stack.js";
|
|
15
16
|
import * as styles from "./Toast.css.js";
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
-
var ActionTypes = function (ActionTypes) {
|
|
18
|
+
var ActionTypes = /*#__PURE__*/function (ActionTypes) {
|
|
18
19
|
ActionTypes[ActionTypes["ADD"] = 0] = "ADD";
|
|
19
20
|
ActionTypes[ActionTypes["REMOVE"] = 1] = "REMOVE";
|
|
20
21
|
return ActionTypes;
|
|
@@ -47,7 +48,7 @@ const reducer = (state, action) => {
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
|
-
const ToastControllerContext = createContext(null);
|
|
51
|
+
const ToastControllerContext = /*#__PURE__*/createContext(null);
|
|
51
52
|
const InternalToastProvider = _ref2 => {
|
|
52
53
|
let {
|
|
53
54
|
children
|
|
@@ -71,18 +72,18 @@ const InternalToastProvider = _ref2 => {
|
|
|
71
72
|
id
|
|
72
73
|
});
|
|
73
74
|
}, []);
|
|
74
|
-
return _jsxs(ToastControllerContext.Provider, {
|
|
75
|
+
return /*#__PURE__*/_jsxs(ToastControllerContext.Provider, {
|
|
75
76
|
value: addToast,
|
|
76
|
-
children: [children, _jsx(Portal, {
|
|
77
|
-
children: _jsx(Box, {
|
|
77
|
+
children: [children, /*#__PURE__*/_jsx(Portal, {
|
|
78
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
78
79
|
display: "flex",
|
|
79
80
|
position: "fixed",
|
|
80
81
|
alignItems: "center",
|
|
81
82
|
justifyContent: "center",
|
|
82
83
|
className: styles.root,
|
|
83
|
-
children: _jsx(Stack, {
|
|
84
|
+
children: /*#__PURE__*/_jsx(Stack, {
|
|
84
85
|
space: "2",
|
|
85
|
-
children: toasts.map(item => _jsx(Toast, _objectSpread(_objectSpread({}, item), {}, {
|
|
86
|
+
children: toasts.map(item => /*#__PURE__*/_jsx(Toast, _objectSpread(_objectSpread({}, item), {}, {
|
|
86
87
|
remove: removeToast
|
|
87
88
|
}), item.id))
|
|
88
89
|
})
|
|
@@ -96,11 +97,11 @@ export const ToastProvider = _ref3 => {
|
|
|
96
97
|
} = _ref3;
|
|
97
98
|
const currentContext = useContext(ToastControllerContext);
|
|
98
99
|
if (currentContext !== null) {
|
|
99
|
-
return _jsx(_Fragment, {
|
|
100
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
100
101
|
children: children
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
|
-
return _jsx(InternalToastProvider, {
|
|
104
|
+
return /*#__PURE__*/_jsx(InternalToastProvider, {
|
|
104
105
|
children: children
|
|
105
106
|
});
|
|
106
107
|
};
|
|
@@ -116,27 +117,34 @@ export const useToast = () => {
|
|
|
116
117
|
intent: 'information'
|
|
117
118
|
});
|
|
118
119
|
};
|
|
120
|
+
|
|
121
|
+
// @ts-ignore
|
|
119
122
|
fn.primary = function (message) {
|
|
120
123
|
let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
|
|
121
124
|
return void addToast({
|
|
122
125
|
message,
|
|
123
126
|
duration,
|
|
127
|
+
// @ts-ignore
|
|
124
128
|
intent: 'primary'
|
|
125
129
|
});
|
|
126
130
|
};
|
|
131
|
+
// @ts-ignore
|
|
127
132
|
fn.secondary = function (message) {
|
|
128
133
|
let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
|
|
129
134
|
return void addToast({
|
|
130
135
|
message,
|
|
131
136
|
duration,
|
|
137
|
+
// @ts-ignore
|
|
132
138
|
intent: 'secondary'
|
|
133
139
|
});
|
|
134
140
|
};
|
|
141
|
+
// @ts-ignore
|
|
135
142
|
fn.shine = function (message) {
|
|
136
143
|
let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
|
|
137
144
|
return void addToast({
|
|
138
145
|
message,
|
|
139
146
|
duration,
|
|
147
|
+
// @ts-ignore
|
|
140
148
|
intent: 'shine'
|
|
141
149
|
});
|
|
142
150
|
};
|
|
@@ -148,11 +156,13 @@ export const useToast = () => {
|
|
|
148
156
|
intent: 'success'
|
|
149
157
|
});
|
|
150
158
|
};
|
|
159
|
+
// @ts-ignore
|
|
151
160
|
fn.neutral = function (message) {
|
|
152
161
|
let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
|
|
153
162
|
return void addToast({
|
|
154
163
|
message,
|
|
155
164
|
duration,
|
|
165
|
+
// @ts-ignore
|
|
156
166
|
intent: 'neutral'
|
|
157
167
|
});
|
|
158
168
|
};
|
|
@@ -204,7 +214,7 @@ const Toast = _ref4 => {
|
|
|
204
214
|
};
|
|
205
215
|
}, [dismiss]);
|
|
206
216
|
}
|
|
207
|
-
return _jsx(Alert, {
|
|
217
|
+
return /*#__PURE__*/_jsx(Alert, {
|
|
208
218
|
dismissible: true,
|
|
209
219
|
intent: intent,
|
|
210
220
|
className: styles.alert,
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type ToolTipSize } from '../../hooks/useTooltip/useTooltip';
|
|
2
3
|
import type { TestId } from '../../types';
|
|
3
4
|
import { EAlignment } from '../Positioner/alignment';
|
|
4
|
-
type ToolTipSize = 'medium' | 'large';
|
|
5
5
|
export interface TooltipProps extends TestId {
|
|
6
|
+
/** Size of the tooltip text */
|
|
6
7
|
size?: ToolTipSize;
|
|
8
|
+
/** Whether the tooltip is open. When provided, the tooltip becomes controlled */
|
|
7
9
|
isOpen?: boolean;
|
|
10
|
+
/** Text content displayed in the tooltip */
|
|
8
11
|
label: string;
|
|
12
|
+
/** Position of the tooltip relative to the trigger element */
|
|
9
13
|
alignment?: EAlignment;
|
|
14
|
+
/** The element(s) that trigger the tooltip on hover or focus */
|
|
10
15
|
children: ReactNode;
|
|
11
|
-
|
|
16
|
+
/** Auto-close the tooltip after this many milliseconds. Set to null to disable auto-close */
|
|
17
|
+
closeAfter?: number | null;
|
|
18
|
+
/** An HTML tag to wrap the tooltip trigger with if children do not contain a keyboard focusable element */
|
|
19
|
+
wrapper?: boolean | keyof React.JSX.IntrinsicElements;
|
|
12
20
|
}
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Renders a tooltip that appears when the user hovers over or focuses on the trigger element.
|
|
23
|
+
*
|
|
24
|
+
* If the provided children are not keyboard-focusable, you can supply set `wrapper` to true to
|
|
25
|
+
* ensure keyboard accessibility. You can also give a tag name to the `wrapper` prop.
|
|
26
|
+
*
|
|
27
|
+
* This component can operate in either controlled or uncontrolled mode:
|
|
28
|
+
* - In uncontrolled mode, it opens on hover/focus and can auto-close after a specified delay.
|
|
29
|
+
* - In controlled mode, its visibility is managed externally via the `isOpen` prop.
|
|
30
|
+
*/
|
|
31
|
+
export declare const Tooltip: {
|
|
32
|
+
({ alignment, isOpen, label, children, size, closeAfter, testId, wrapper, }: TooltipProps): React.JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
15
35
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../lib/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../lib/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAIb,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAEf,OAAO,EAEN,KAAK,WAAW,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC3C,+BAA+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;IACpB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,2GAA2G;IAC3G,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC;CACtD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO;iFASjB,YAAY;;CAyDd,CAAC"}
|