@autoguru/overdrive 4.43.5 → 4.43.6-next.1
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 +5 -5
- package/dist/components/Actions/Actions.d.ts.map +1 -1
- package/dist/components/Actions/Actions.js +12 -6
- package/dist/components/Actions/Actions.stories.d.ts +2 -2
- 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 +8 -8
- package/dist/components/Alert/Alert.stories.d.ts +1 -1
- package/dist/components/Anchor/Anchor.css.d.ts +2 -0
- package/dist/components/Anchor/Anchor.css.d.ts.map +1 -0
- package/dist/components/Anchor/Anchor.css.js +10 -0
- package/dist/components/Anchor/Anchor.d.ts +8 -7
- package/dist/components/Anchor/Anchor.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.js +34 -33
- package/dist/components/Anchor/Anchor.spec.d.ts +2 -0
- package/dist/components/Anchor/Anchor.spec.d.ts.map +1 -0
- package/dist/components/Anchor/Anchor.stories.d.ts +1 -1
- package/dist/components/AutoSuggest/AutoSuggest.js +3 -3
- package/dist/components/Box/Box.d.ts +9 -6
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +163 -16
- package/dist/components/Box/Box.stories.d.ts +0 -1
- package/dist/components/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Box/index.d.ts +3 -3
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/index.js +2 -3
- package/dist/components/Box/newBox/NewBox.d.ts +7 -0
- package/dist/components/Box/newBox/NewBox.d.ts.map +1 -0
- package/dist/components/Box/newBox/NewBox.js +28 -0
- package/dist/components/Box/{boxStyles.d.ts → newBox/boxStyles.d.ts} +4 -4
- package/dist/components/Box/newBox/boxStyles.d.ts.map +1 -0
- package/dist/components/Box/{boxStyles.js → newBox/boxStyles.js} +4 -6
- package/dist/components/Box/{useBox.d.ts → newBox/useBox.d.ts} +1 -3
- package/dist/components/Box/newBox/useBox.d.ts.map +1 -0
- package/dist/components/Box/{useBox.js → newBox/useBox.js} +2 -2
- package/dist/components/Box/useBoxStyles.css.d.ts +48 -0
- package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -0
- package/dist/components/Box/useBoxStyles.css.js +141 -0
- package/dist/components/Box/useBoxStyles.d.ts +69 -0
- package/dist/components/Box/useBoxStyles.d.ts.map +1 -0
- package/dist/components/Box/useBoxStyles.js +80 -0
- package/dist/components/BulletText/BulletText.d.ts +4 -4
- package/dist/components/BulletText/BulletText.d.ts.map +1 -1
- package/dist/components/BulletText/BulletText.js +3 -3
- package/dist/components/BulletText/BulletText.stories.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +10 -11
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +53 -63
- package/dist/components/ColourInput/ColourInput.js +3 -3
- package/dist/components/Columns/Column.css.d.ts +1 -1
- package/dist/components/Columns/Column.css.d.ts.map +1 -1
- package/dist/components/Columns/Column.css.js +5 -5
- package/dist/components/Columns/Column.d.ts +8 -10
- package/dist/components/Columns/Column.d.ts.map +1 -1
- package/dist/components/Columns/Column.js +22 -28
- package/dist/components/Columns/ColumnGrid.css.js +8 -8
- package/dist/components/Columns/Columns.css.d.ts +4 -0
- package/dist/components/Columns/Columns.css.d.ts.map +1 -1
- package/dist/components/Columns/Columns.css.js +6 -0
- package/dist/components/Columns/Columns.d.ts +15 -20
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/Columns/Columns.js +24 -37
- package/dist/components/Columns/index.d.ts +2 -2
- package/dist/components/Columns/index.d.ts.map +1 -1
- package/dist/components/Columns/index.js +2 -2
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.css.js +3 -3
- package/dist/components/DateTimePicker/DateTimePicker.js +3 -3
- package/dist/components/DropDown/DropDown.stories.d.ts +19 -6
- package/dist/components/DropDown/DropDown.stories.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.d.ts +4 -4
- package/dist/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -3
- package/dist/components/Flyout/Flyout.d.ts.map +1 -1
- package/dist/components/Flyout/Flyout.stories.d.ts +1 -2
- package/dist/components/Flyout/Flyout.stories.d.ts.map +1 -1
- package/dist/components/Heading/Heading.d.ts +2 -2
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +371 -235
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/Heading/index.d.ts.map +1 -1
- package/dist/components/Heading/index.js +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts +0 -12
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +0 -33
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +6 -6
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +35 -45
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.stories.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +3 -2
- package/dist/components/Inline/Inline.d.ts +13 -12
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +57 -60
- package/dist/components/Inline/index.d.ts +1 -1
- package/dist/components/Inline/index.d.ts.map +1 -1
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts +623 -208
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts.map +1 -1
- package/dist/components/MinimalModal/MinimalModal.d.ts +2 -2
- package/dist/components/MinimalModal/MinimalModal.d.ts.map +1 -1
- package/dist/components/MinimalModal/MinimalModal.js +3 -3
- package/dist/components/MinimalModal/MinimalModal.stories.d.ts +6 -6
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +4 -4
- package/dist/components/NumberBubble/NumberBubble.js +2 -2
- package/dist/components/OptionGrid/OptionGrid.css.js +5 -5
- package/dist/components/OptionList/OptionList.css.js +2 -2
- package/dist/components/OptionList/OptionListItem.js +3 -3
- package/dist/components/OrderedList/OrderedList.d.ts +3 -3
- package/dist/components/OrderedList/OrderedList.d.ts.map +1 -1
- package/dist/components/OrderedList/OrderedList.js +4 -3
- package/dist/components/OrderedList/OrderedList.stories.d.ts +1 -1
- package/dist/components/Pagination/Bubble.js +1 -1
- package/dist/components/Pagination/Pagination.js +4 -4
- package/dist/components/ProgressSpinner/ProgressSpinner.d.ts.map +1 -1
- package/dist/components/ProgressSpinner/ProgressSpinner.js +2 -1
- package/dist/components/SearchBar/SearchBar.css.js +2 -2
- package/dist/components/Section/Section.d.ts +7 -6
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/Section/Section.js +14 -25
- package/dist/components/Section/Section.stories.d.ts +1 -407
- package/dist/components/Section/Section.stories.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInput.d.ts +1 -0
- package/dist/components/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInput.js +6 -5
- 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.css.d.ts +5 -0
- package/dist/components/Stack/Stack.css.d.ts.map +1 -0
- package/dist/components/Stack/Stack.css.js +18 -0
- package/dist/components/Stack/Stack.d.ts +8 -8
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +34 -53
- package/dist/components/StandardModal/StandardModal.js +4 -4
- package/dist/components/StarRating/StarRating.js +1 -1
- package/dist/components/Stepper/Stepper.css.js +2 -2
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/TableHeadCell.d.ts +3 -3
- package/dist/components/Table/TableHeadCell.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/Tab.d.ts +8 -7
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.js +31 -40
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Text/Text.d.ts +8 -11
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +31 -35
- package/dist/components/Text/Text.stories.d.ts.map +1 -1
- package/dist/components/Text/index.d.ts +3 -2
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +2 -2
- package/dist/components/Text/useTextStyles.css.d.ts +8 -0
- package/dist/components/Text/useTextStyles.css.d.ts.map +1 -0
- package/dist/components/Text/useTextStyles.css.js +40 -0
- package/dist/components/Text/useTextStyles.d.ts +22 -0
- package/dist/components/Text/useTextStyles.d.ts.map +1 -0
- package/dist/components/Text/useTextStyles.js +24 -0
- package/dist/components/TextAreaInput/TextAreaInput.d.ts +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.js +6 -7
- package/dist/components/TextAreaInput/index.d.ts +1 -1
- package/dist/components/TextAreaInput/index.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.js +1 -1
- package/dist/components/TextBubble/TextBubble.js +2 -2
- package/dist/components/TextBubble/index.d.ts +1 -1
- package/dist/components/TextBubble/index.d.ts.map +1 -1
- package/dist/components/TextBubble/index.js +1 -1
- package/dist/components/TextContainer/index.d.ts +1 -1
- package/dist/components/TextContainer/index.d.ts.map +1 -1
- package/dist/components/TextContainer/index.js +1 -1
- package/dist/components/TextInput/TextInput.d.ts +1 -1
- package/dist/components/TextInput/index.d.ts +1 -1
- package/dist/components/TextInput/index.d.ts.map +1 -1
- package/dist/components/TextInput/index.js +1 -1
- package/dist/components/TextLink/TextLink.css.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.css.js +1 -0
- package/dist/components/TextLink/TextLink.d.ts +10 -11
- package/dist/components/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.js +36 -36
- package/dist/components/TextLink/TextLink.stories.d.ts +193 -599
- package/dist/components/TextLink/TextLink.stories.d.ts.map +1 -1
- package/dist/components/TextLink/index.d.ts +1 -1
- package/dist/components/TextLink/index.d.ts.map +1 -1
- package/dist/components/TextLink/index.js +1 -1
- package/dist/components/Toaster/index.d.ts +1 -1
- package/dist/components/Toaster/index.d.ts.map +1 -1
- package/dist/components/Toaster/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +5 -3
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +3 -13
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +5 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/index.d.ts +1 -1
- package/dist/components/VisuallyHidden/index.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/index.js +1 -1
- package/dist/components/private/CheckableBase/CheckableBase.js +1 -1
- package/dist/components/private/InputBase/HintText.js +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +3 -3
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +7 -6
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts +3 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts.map +1 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts +3 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles/sprinkles.css.d.ts +133 -95
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +58 -16
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/sprinkles.d.ts +2 -4
- package/dist/utils/sprinkles.d.ts.map +1 -1
- package/dist/utils/sprinkles.js +2 -9
- package/package.json +1 -1
- package/dist/components/Box/boxStyles.d.ts.map +0 -1
- package/dist/components/Box/useBox.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import { ComponentProps, FunctionComponent, ReactElement } from 'react';
|
|
2
|
+
import { Columns } from '../Columns/Columns';
|
|
3
|
+
export interface Props extends Partial<Pick<ComponentProps<typeof Columns>, 'noWrap' | 'wrappingDirection'>> {
|
|
4
4
|
children: ReactElement | ReactElement[];
|
|
5
5
|
className?: string;
|
|
6
|
-
wrappingDirection?: 'default' | 'reverse';
|
|
7
6
|
}
|
|
8
|
-
export declare const Actions: FunctionComponent<
|
|
7
|
+
export declare const Actions: FunctionComponent<Props>;
|
|
8
|
+
export default Actions;
|
|
9
9
|
//# sourceMappingURL=Actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../lib/components/Actions/Actions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../lib/components/Actions/Actions.tsx"],"names":[],"mappings":"AACA,OAAO,EAEN,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,WAAW,KAChB,SAAQ,OAAO,CACd,IAAI,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAAE,QAAQ,GAAG,mBAAmB,CAAC,CACpE;IACD,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAU5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Children } from 'react';
|
|
5
|
+
import flattenChildren from 'react-keyed-flatten-children';
|
|
6
|
+
import { Column } from "../Columns/Column.js";
|
|
7
|
+
import { Columns } from "../Columns/Columns.js";
|
|
5
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
9
|
export const Actions = _ref => {
|
|
7
10
|
let {
|
|
@@ -9,10 +12,13 @@ export const Actions = _ref => {
|
|
|
9
12
|
noWrap,
|
|
10
13
|
wrappingDirection
|
|
11
14
|
} = _ref;
|
|
12
|
-
return _jsx(
|
|
15
|
+
return _jsx(Columns, {
|
|
13
16
|
space: "3",
|
|
14
17
|
noWrap: noWrap,
|
|
15
|
-
|
|
16
|
-
children: children
|
|
18
|
+
wrappingDirection: wrappingDirection,
|
|
19
|
+
children: Children.map(flattenChildren(children), child => _jsx(Column, {
|
|
20
|
+
children: child
|
|
21
|
+
}))
|
|
17
22
|
});
|
|
18
|
-
};
|
|
23
|
+
};
|
|
24
|
+
export default Actions;
|
|
@@ -3,12 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { Actions } from './Actions';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.FunctionComponent<import("./Actions").
|
|
6
|
+
component: React.FunctionComponent<import("./Actions").Props>;
|
|
7
7
|
decorators: ((story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
8
8
|
children: React.ReactElement | React.ReactElement[];
|
|
9
9
|
className?: string | undefined;
|
|
10
|
-
wrappingDirection?: "default" | "reverse" | undefined;
|
|
11
10
|
noWrap?: boolean | undefined;
|
|
11
|
+
wrappingDirection?: "reverse" | "default" | undefined;
|
|
12
12
|
}>) => React.JSX.Element)[];
|
|
13
13
|
};
|
|
14
14
|
export default meta;
|
|
@@ -2,13 +2,13 @@ import { ComponentProps, FunctionComponent, ReactNode } from 'react';
|
|
|
2
2
|
import { Button } from '../Button/Button';
|
|
3
3
|
import { IntentStripe } from '../IntentStripe/IntentStripe';
|
|
4
4
|
type IntentStripeProps = ComponentProps<typeof IntentStripe>;
|
|
5
|
-
export interface
|
|
5
|
+
export interface Props extends IntentStripeProps {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
className?: string;
|
|
8
8
|
inline?: boolean;
|
|
9
9
|
dismissible?: boolean;
|
|
10
10
|
onRequestClose?: ComponentProps<typeof Button>['onClick'];
|
|
11
11
|
}
|
|
12
|
-
export declare const Alert: FunctionComponent<
|
|
13
|
-
export
|
|
12
|
+
export declare const Alert: FunctionComponent<Props>;
|
|
13
|
+
export default Alert;
|
|
14
14
|
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../lib/components/Alert/Alert.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAM5D,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AAG7D,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../lib/components/Alert/Alert.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAM5D,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AAG7D,MAAM,WAAW,KAAM,SAAQ,iBAAiB;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CAC1D;AASD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAsE1C,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -4,12 +4,12 @@ import { AlertCircleIcon, AlertIcon, CheckCircleIcon, InformationIcon, WindowClo
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { Box } from "../Box/Box.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useBoxStyles } from "../Box/useBoxStyles.js";
|
|
8
8
|
import { Button } from "../Button/Button.js";
|
|
9
9
|
import { Icon } from "../Icon/Icon.js";
|
|
10
10
|
import { IntentStripe } from "../IntentStripe/IntentStripe.js";
|
|
11
11
|
import { Text } from "../Text/Text.js";
|
|
12
|
-
import {
|
|
12
|
+
import { useTextStyles } from "../Text/useTextStyles.js";
|
|
13
13
|
import * as styles from "./Alert.css.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const iconMapForIntent = {
|
|
@@ -27,10 +27,10 @@ export const Alert = _ref => {
|
|
|
27
27
|
onRequestClose,
|
|
28
28
|
dismissible = typeof onRequestClose === 'function'
|
|
29
29
|
} = _ref;
|
|
30
|
-
const dismissBtnStyles =
|
|
30
|
+
const dismissBtnStyles = useTextStyles({
|
|
31
31
|
colour: 'muted'
|
|
32
32
|
});
|
|
33
|
-
const intentColourStyles =
|
|
33
|
+
const intentColourStyles = useTextStyles({
|
|
34
34
|
colour: intent
|
|
35
35
|
});
|
|
36
36
|
return _jsxs(Box, {
|
|
@@ -46,7 +46,6 @@ export const Alert = _ref => {
|
|
|
46
46
|
borderRadius: "1",
|
|
47
47
|
boxShadow: inline ? 'none' : '4',
|
|
48
48
|
padding: "2",
|
|
49
|
-
"data-od-component": "alert",
|
|
50
49
|
children: [_jsx(IntentStripe, {
|
|
51
50
|
intent: intent
|
|
52
51
|
}), _jsxs(Box, {
|
|
@@ -57,7 +56,7 @@ export const Alert = _ref => {
|
|
|
57
56
|
children: _jsx(Icon, {
|
|
58
57
|
icon: iconMapForIntent[intent],
|
|
59
58
|
size: "medium",
|
|
60
|
-
className:
|
|
59
|
+
className: useBoxStyles({
|
|
61
60
|
marginY: '2',
|
|
62
61
|
marginLeft: '2'
|
|
63
62
|
})
|
|
@@ -65,7 +64,7 @@ export const Alert = _ref => {
|
|
|
65
64
|
}), _jsx(Box, {
|
|
66
65
|
alignSelf: "center",
|
|
67
66
|
width: "auto",
|
|
68
|
-
className:
|
|
67
|
+
className: useTextStyles({
|
|
69
68
|
colour: 'dark'
|
|
70
69
|
}),
|
|
71
70
|
children: typeof children === 'string' ? _jsx(Text, {
|
|
@@ -89,4 +88,5 @@ export const Alert = _ref => {
|
|
|
89
88
|
})]
|
|
90
89
|
})]
|
|
91
90
|
});
|
|
92
|
-
};
|
|
91
|
+
};
|
|
92
|
+
export default Alert;
|
|
@@ -4,7 +4,7 @@ import { Alert } from './Alert';
|
|
|
4
4
|
type Intent = ComponentProps<typeof Alert>['intent'];
|
|
5
5
|
declare const meta: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: React.FunctionComponent<import("./Alert").
|
|
7
|
+
component: React.FunctionComponent<import("./Alert").Props>;
|
|
8
8
|
args: {
|
|
9
9
|
intent: "success";
|
|
10
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Anchor.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Anchor/Anchor.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAGf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/Anchor/Anchor.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
export const root = style({
|
|
7
|
+
textDecoration: 'none',
|
|
8
|
+
cursor: 'pointer'
|
|
9
|
+
}, "root");
|
|
10
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { IconType } from '@autoguru/icons';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { AnchorHTMLAttributes, ElementType, FunctionComponent, ReactElement, ReactNode } from 'react';
|
|
3
|
+
export interface Props extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'style' | 'is'> {
|
|
4
|
+
className?: string;
|
|
5
|
+
is?: ElementType | ReactElement;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
6
8
|
icon?: IconType;
|
|
7
9
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export {};
|
|
10
|
+
export declare const Anchor: FunctionComponent<Props>;
|
|
11
|
+
export default Anchor;
|
|
11
12
|
//# sourceMappingURL=Anchor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../lib/components/Anchor/Anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../lib/components/Anchor/Anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EACN,oBAAoB,EAGpB,WAAW,EACX,iBAAiB,EAEjB,YAAY,EACZ,SAAS,EACT,MAAM,OAAO,CAAC;AAUf,MAAM,WAAW,KAChB,SAAQ,IAAI,CACX,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,OAAO,GAAG,IAAI,CAC3B;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,IAAI,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAyC3C,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -2,50 +2,51 @@
|
|
|
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 = ["className", "is", "disabled", "children", "icon"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { cloneElement, createElement, isValidElement } from 'react';
|
|
11
|
+
import { useBoxStyles } from "../Box/useBoxStyles.js";
|
|
11
12
|
import { Icon } from "../Icon/Icon.js";
|
|
13
|
+
import { Inline } from "../Inline/Inline.js";
|
|
14
|
+
import { Text } from "../Text/Text.js";
|
|
15
|
+
import { useTextStyles } from "../Text/useTextStyles.js";
|
|
16
|
+
import * as styles from "./Anchor.css.js";
|
|
12
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const ANCHOR_TAG = 'a';
|
|
14
18
|
export const Anchor = _ref => {
|
|
15
19
|
let {
|
|
16
|
-
|
|
20
|
+
className = '',
|
|
21
|
+
is: Component = 'a',
|
|
22
|
+
disabled = false,
|
|
17
23
|
children,
|
|
18
24
|
icon
|
|
19
25
|
} = _ref,
|
|
20
|
-
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
colour: "link",
|
|
34
|
-
display: "inline-flex",
|
|
35
|
-
fontSize: "4",
|
|
36
|
-
fontWeight: "bold",
|
|
37
|
-
gap: "2",
|
|
26
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
const textStyles = useTextStyles({
|
|
28
|
+
colour: 'link'
|
|
29
|
+
});
|
|
30
|
+
const props = _objectSpread({
|
|
31
|
+
className: clsx(styles.root, textStyles, useBoxStyles({
|
|
32
|
+
is: typeof Component === 'string' ? Component : undefined,
|
|
33
|
+
display: 'inline'
|
|
34
|
+
}), className),
|
|
35
|
+
disabled
|
|
36
|
+
}, rest);
|
|
37
|
+
const childs = _jsxs(Inline, {
|
|
38
|
+
space: "2",
|
|
38
39
|
children: [icon && _jsx(Icon, {
|
|
39
40
|
icon: icon,
|
|
40
|
-
size: "small"
|
|
41
|
-
|
|
41
|
+
size: "small",
|
|
42
|
+
className: textStyles
|
|
43
|
+
}), _jsx(Text, {
|
|
44
|
+
fontWeight: "bold",
|
|
45
|
+
size: "4",
|
|
46
|
+
colour: "link",
|
|
42
47
|
children: children
|
|
43
48
|
})]
|
|
44
49
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return _jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
49
|
-
children: _jsx(Content, {})
|
|
50
|
-
}));
|
|
51
|
-
};
|
|
50
|
+
return isValidElement(Component) ? cloneElement(Component, props, childs) : createElement(Component, props, childs);
|
|
51
|
+
};
|
|
52
|
+
export default Anchor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Anchor.spec.d.ts","sourceRoot":"","sources":["../../../lib/components/Anchor/Anchor.spec.jsx"],"names":[],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
tags: string[];
|
|
5
|
-
component:
|
|
5
|
+
component: import("react").FunctionComponent<import("./Anchor").Props>;
|
|
6
6
|
args: {
|
|
7
7
|
href: string;
|
|
8
8
|
icon: string;
|
|
@@ -480,14 +480,14 @@ const AutoSuggestInputPrimitive = withEnhancedInput(_ref5 => {
|
|
|
480
480
|
as: "button",
|
|
481
481
|
paddingY: size === 'small' ? '1' : '3',
|
|
482
482
|
paddingRight: size === 'small' ? '2' : '3',
|
|
483
|
-
flexShrink:
|
|
483
|
+
flexShrink: 0,
|
|
484
484
|
onMouseDown: onRequestReset,
|
|
485
485
|
children: _jsx(Icon, {
|
|
486
486
|
size: size === 'large' ? size : 'medium',
|
|
487
487
|
icon: CloseIcon
|
|
488
488
|
})
|
|
489
489
|
}) : fieldIcon ? _jsx(Box, {
|
|
490
|
-
flexShrink:
|
|
490
|
+
flexShrink: 0,
|
|
491
491
|
paddingY: size === 'medium' ? '3' : '2',
|
|
492
492
|
paddingRight: size === 'medium' ? '3' : '2',
|
|
493
493
|
onClick: focusHandler,
|
|
@@ -505,7 +505,7 @@ const AutoSuggestInputPrimitive = withEnhancedInput(_ref5 => {
|
|
|
505
505
|
className: className,
|
|
506
506
|
children: [_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
507
507
|
as: "input",
|
|
508
|
-
flexGrow:
|
|
508
|
+
flexGrow: 1
|
|
509
509
|
}, inputEventHandlers), field), {}, {
|
|
510
510
|
ref: handleRef,
|
|
511
511
|
autoCapitalize: "none",
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { AllHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type BoxStylesProps } from './newBox/boxStyles';
|
|
4
|
+
export interface BoxProps extends Omit<BoxStylesProps, 'as'>, Omit<AllHTMLAttributes<HTMLElement>, 'as' | 'className' | 'color' | 'height' | 'is' | 'size' | 'width'> {
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
is?: ElementType;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLElement>>;
|
|
7
10
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/Box.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,WAAW,QAChB,SAAQ,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,EACjC,IAAI,CACH,iBAAiB,CAAC,WAAW,CAAC,EAC9B,IAAI,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CACjE;IACF,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAKD,eAAO,MAAM,GAAG,8EA0Lf,CAAC"}
|
|
@@ -2,27 +2,174 @@
|
|
|
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 = ["children"];
|
|
5
|
+
const _excluded = ["is", "as", "children", "className", "display", "width", "maxWidth", "minWidth", "height", "position", "overflow", "userSelect", "textAlign", "pointerEvents", "backgroundColour", "boxShadow", "color", "colour", "opacity", "borderRadius", "borderColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColour", "borderColourX", "borderColourY", "borderColourTop", "borderColourRight", "borderColourBottom", "borderColourLeft", "borderWidth", "borderWidthX", "borderWidthY", "borderWidthTop", "borderWidthRight", "borderWidthBottom", "borderWidthLeft", "alignItems", "order", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "justifyContent", "justifySelf", "gap", "columnGap", "rowGap", "m", "mb", "ml", "mr", "mt", "mx", "margin", "marginX", "marginY", "marginTop", "marginBottom", "marginLeft", "marginRight", "p", "pb", "pl", "pr", "pt", "px", "padding", "paddingX", "paddingY", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { boxStyles } from "./newBox/boxStyles.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export const Box = _ref => {
|
|
12
|
+
export const Box = forwardRef((_ref, ref) => {
|
|
12
13
|
let {
|
|
13
|
-
|
|
14
|
+
is = 'div',
|
|
15
|
+
as = is,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
display,
|
|
19
|
+
width,
|
|
20
|
+
maxWidth,
|
|
21
|
+
minWidth,
|
|
22
|
+
height,
|
|
23
|
+
position,
|
|
24
|
+
overflow,
|
|
25
|
+
userSelect,
|
|
26
|
+
textAlign,
|
|
27
|
+
pointerEvents,
|
|
28
|
+
backgroundColour,
|
|
29
|
+
boxShadow,
|
|
30
|
+
color,
|
|
31
|
+
colour,
|
|
32
|
+
opacity,
|
|
33
|
+
borderRadius,
|
|
34
|
+
borderColor,
|
|
35
|
+
borderBottomColor,
|
|
36
|
+
borderLeftColor,
|
|
37
|
+
borderRightColor,
|
|
38
|
+
borderTopColor,
|
|
39
|
+
borderColour,
|
|
40
|
+
borderColourX,
|
|
41
|
+
borderColourY,
|
|
42
|
+
borderColourTop,
|
|
43
|
+
borderColourRight,
|
|
44
|
+
borderColourBottom,
|
|
45
|
+
borderColourLeft,
|
|
46
|
+
borderWidth,
|
|
47
|
+
borderWidthX,
|
|
48
|
+
borderWidthY,
|
|
49
|
+
borderWidthTop,
|
|
50
|
+
borderWidthRight,
|
|
51
|
+
borderWidthBottom,
|
|
52
|
+
borderWidthLeft,
|
|
53
|
+
alignItems,
|
|
54
|
+
order,
|
|
55
|
+
flexDirection,
|
|
56
|
+
flexGrow,
|
|
57
|
+
flexShrink,
|
|
58
|
+
flexWrap,
|
|
59
|
+
justifyContent,
|
|
60
|
+
justifySelf,
|
|
61
|
+
gap,
|
|
62
|
+
columnGap,
|
|
63
|
+
rowGap,
|
|
64
|
+
m,
|
|
65
|
+
mb,
|
|
66
|
+
ml,
|
|
67
|
+
mr,
|
|
68
|
+
mt,
|
|
69
|
+
mx,
|
|
70
|
+
margin,
|
|
71
|
+
marginX,
|
|
72
|
+
marginY,
|
|
73
|
+
marginTop,
|
|
74
|
+
marginBottom,
|
|
75
|
+
marginLeft,
|
|
76
|
+
marginRight,
|
|
77
|
+
p,
|
|
78
|
+
pb,
|
|
79
|
+
pl,
|
|
80
|
+
pr,
|
|
81
|
+
pt,
|
|
82
|
+
px,
|
|
83
|
+
padding,
|
|
84
|
+
paddingX,
|
|
85
|
+
paddingY,
|
|
86
|
+
paddingTop,
|
|
87
|
+
paddingBottom,
|
|
88
|
+
paddingLeft,
|
|
89
|
+
paddingRight
|
|
14
90
|
} = _ref,
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
91
|
+
allOtherProps = _objectWithoutProperties(_ref, _excluded);
|
|
92
|
+
const cls = boxStyles({
|
|
93
|
+
as,
|
|
94
|
+
display,
|
|
95
|
+
width,
|
|
96
|
+
maxWidth,
|
|
97
|
+
minWidth,
|
|
98
|
+
height,
|
|
99
|
+
position,
|
|
100
|
+
overflow,
|
|
101
|
+
userSelect,
|
|
102
|
+
textAlign,
|
|
103
|
+
pointerEvents,
|
|
104
|
+
backgroundColour,
|
|
105
|
+
boxShadow,
|
|
106
|
+
color,
|
|
107
|
+
colour,
|
|
108
|
+
opacity,
|
|
109
|
+
borderRadius,
|
|
110
|
+
borderColor,
|
|
111
|
+
borderBottomColor,
|
|
112
|
+
borderLeftColor,
|
|
113
|
+
borderRightColor,
|
|
114
|
+
borderTopColor,
|
|
115
|
+
borderColour,
|
|
116
|
+
borderColourX,
|
|
117
|
+
borderColourY,
|
|
118
|
+
borderColourTop,
|
|
119
|
+
borderColourRight,
|
|
120
|
+
borderColourBottom,
|
|
121
|
+
borderColourLeft,
|
|
122
|
+
borderWidth,
|
|
123
|
+
borderWidthX,
|
|
124
|
+
borderWidthY,
|
|
125
|
+
borderWidthTop,
|
|
126
|
+
borderWidthRight,
|
|
127
|
+
borderWidthBottom,
|
|
128
|
+
borderWidthLeft,
|
|
129
|
+
alignItems,
|
|
130
|
+
order,
|
|
131
|
+
flexDirection,
|
|
132
|
+
flexGrow,
|
|
133
|
+
flexShrink,
|
|
134
|
+
flexWrap,
|
|
135
|
+
justifyContent,
|
|
136
|
+
justifySelf,
|
|
137
|
+
gap,
|
|
138
|
+
columnGap,
|
|
139
|
+
rowGap,
|
|
140
|
+
m,
|
|
141
|
+
mb,
|
|
142
|
+
ml,
|
|
143
|
+
mr,
|
|
144
|
+
mt,
|
|
145
|
+
mx,
|
|
146
|
+
margin,
|
|
147
|
+
marginX,
|
|
148
|
+
marginY,
|
|
149
|
+
marginTop,
|
|
150
|
+
marginBottom,
|
|
151
|
+
marginLeft,
|
|
152
|
+
marginRight,
|
|
153
|
+
p,
|
|
154
|
+
pb,
|
|
155
|
+
pl,
|
|
156
|
+
pr,
|
|
157
|
+
pt,
|
|
158
|
+
px,
|
|
159
|
+
padding,
|
|
160
|
+
paddingX,
|
|
161
|
+
paddingY,
|
|
162
|
+
paddingTop,
|
|
163
|
+
paddingBottom,
|
|
164
|
+
paddingLeft,
|
|
165
|
+
paddingRight
|
|
166
|
+
});
|
|
167
|
+
const Component = as;
|
|
168
|
+
return _jsx(Component, _objectSpread(_objectSpread({
|
|
169
|
+
ref: ref,
|
|
170
|
+
className: clsx(cls, className)
|
|
171
|
+
}, allOtherProps), {}, {
|
|
25
172
|
children: children
|
|
26
173
|
}));
|
|
27
|
-
};
|
|
174
|
+
});
|
|
28
175
|
Box.displayName = 'Box';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAiB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAKlC,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAKF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC
|
|
1
|
+
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAiB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAKlC,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAKF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { Box, type BoxProps } from './Box';
|
|
2
|
+
export { useBoxStyles } from './useBoxStyles';
|
|
3
|
+
export type { BoxStyleProps } from './useBoxStyles';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { type ElementType } from 'react';
|
|
2
|
+
import { type UseBoxProps } from './useBox';
|
|
3
|
+
export declare const NewBox: {
|
|
4
|
+
<E extends ElementType = "div">({ children, ...props }: UseBoxProps<E>): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=NewBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewBox.d.ts","sourceRoot":"","sources":["../../../../lib/components/Box/newBox/NewBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAyBpD,eAAO,MAAM,MAAM;KAAI,CAAC,SAAS,WAAW,kCAGzC,WAAW,CAAC,CAAC,CAAC;;CAUhB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["children"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React, { cloneElement } from 'react';
|
|
9
|
+
import { useBox } from "./useBox.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const NewBox = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children
|
|
14
|
+
} = _ref,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
const {
|
|
17
|
+
Component,
|
|
18
|
+
componentProps,
|
|
19
|
+
reactElement
|
|
20
|
+
} = useBox(props);
|
|
21
|
+
if (reactElement) {
|
|
22
|
+
return cloneElement(reactElement, componentProps, children);
|
|
23
|
+
}
|
|
24
|
+
return _jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
25
|
+
children: children
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
NewBox.displayName = 'NewBox';
|