@faststore/ui 1.3.36 → 1.3.40
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/CHANGELOG.md +38 -0
- package/dist/atoms/Badge/Badge.d.ts +2 -2
- package/dist/atoms/Icon/stories/Icon.stories.d.ts +1 -1
- package/dist/atoms/Link/Link.d.ts +19 -0
- package/dist/atoms/Link/index.d.ts +2 -0
- package/dist/atoms/Price/stories/Price.stories.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/molecules/Banner/BannerContent.d.ts +1 -1
- package/dist/organisms/Card/Card.d.ts +10 -0
- package/dist/organisms/Card/CardActions.d.ts +10 -0
- package/dist/organisms/Card/CardContent.d.ts +14 -0
- package/dist/organisms/Card/CardImage.d.ts +10 -0
- package/dist/organisms/Card/index.d.ts +8 -0
- package/dist/organisms/Card/stories/Card.stories.d.ts +4 -0
- package/dist/typings/PolymorphicGenerics.d.ts +1 -0
- package/dist/typings/index.d.ts +1 -1
- package/dist/ui.cjs.development.js +79 -8
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +75 -9
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/atoms/Badge/Badge.tsx +4 -4
- package/src/atoms/Link/Link.test.tsx +53 -0
- package/src/atoms/Link/Link.tsx +47 -0
- package/src/atoms/Link/index.tsx +2 -0
- package/src/atoms/Link/stories/Link.mdx +35 -0
- package/src/atoms/Link/stories/Link.stories.tsx +30 -0
- package/src/index.ts +15 -0
- package/src/molecules/Banner/BannerContent.tsx +1 -3
- package/src/molecules/SearchInput/SearchInput.tsx +2 -1
- package/src/organisms/Card/Card.test.tsx +68 -0
- package/src/organisms/Card/Card.tsx +22 -0
- package/src/organisms/Card/CardActions.tsx +29 -0
- package/src/organisms/Card/CardContent.tsx +40 -0
- package/src/organisms/Card/CardImage.tsx +22 -0
- package/src/organisms/Card/index.tsx +11 -0
- package/src/organisms/Card/stories/Card.mdx +54 -0
- package/src/organisms/Card/stories/Card.stories.tsx +62 -0
- package/src/typings/PolymorphicGenerics.ts +5 -0
- package/src/typings/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.3.40 (2021-12-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui:** Link atom ([#1067](https://github.com/vtex/faststore/issues/1067)) ([c49b2dd](https://github.com/vtex/faststore/commit/c49b2ddc31ba4184bed19a8934fbf4d5f0b47a5f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 1.3.39 (2021-12-17)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @faststore/ui
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 1.3.38 (2021-12-16)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @faststore/ui
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## 1.3.37 (2021-12-15)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **ui:** Card component ([#1079](https://github.com/vtex/faststore/issues/1079)) ([7f10a5d](https://github.com/vtex/faststore/commit/7f10a5dcec21f7c9d59ba645755fe298e96269df))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## 1.3.36 (2021-12-15)
|
|
7
45
|
|
|
8
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export interface BadgeProps {
|
|
3
|
+
export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
6
|
*/
|
|
@@ -4,7 +4,7 @@ import type { ComponentArgTypes } from '../../../typings/utils';
|
|
|
4
4
|
export declare const Icon: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, IconProps>;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
argTypes: ComponentArgTypes<Pick<IconProps, "testId" | "children" | "
|
|
7
|
+
argTypes: ComponentArgTypes<Pick<IconProps, "testId" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">>;
|
|
8
8
|
parameters: {
|
|
9
9
|
docs: {
|
|
10
10
|
page: (props: any) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ElementType, ReactElement } from 'react';
|
|
3
|
+
import type { PolymorphicComponentPropsWithRef } from '../../typings';
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type LinkProps<C extends ElementType> = PolymorphicComponentPropsWithRef<C, Props>;
|
|
11
|
+
declare type LinkComponent = <C extends ElementType = 'a'>(props: LinkProps<C>) => ReactElement | null;
|
|
12
|
+
declare const Link: LinkComponent;
|
|
13
|
+
/**
|
|
14
|
+
* This is only being exported to make it easier to use in Storybook.
|
|
15
|
+
* **DON'T** import this directly to use this component, use the default export
|
|
16
|
+
* instead.
|
|
17
|
+
*/
|
|
18
|
+
export declare const StorybookLink: React.FC<Props>;
|
|
19
|
+
export default Link;
|
|
@@ -8,7 +8,7 @@ export declare const INTLFormattedToParts: import("@storybook/csf").AnnotatedSto
|
|
|
8
8
|
export declare const Custom: Story<PriceProps>;
|
|
9
9
|
declare const _default: {
|
|
10
10
|
title: string;
|
|
11
|
-
argTypes: ComponentArgTypes<Pick<PriceProps, "testId" | "
|
|
11
|
+
argTypes: ComponentArgTypes<Pick<PriceProps, "testId" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "variant" | "as" | "formatter">>;
|
|
12
12
|
parameters: {
|
|
13
13
|
docs: {
|
|
14
14
|
page: (props: any) => JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { default as Link } from './atoms/Link';
|
|
2
|
+
export type { LinkProps } from './atoms/Link';
|
|
1
3
|
export { default as Button } from './atoms/Button';
|
|
2
4
|
export type { ButtonProps } from './atoms/Button';
|
|
3
5
|
export { default as Input } from './atoms/Input';
|
|
@@ -60,5 +62,7 @@ export { default as Form } from './molecules/Form';
|
|
|
60
62
|
export type { FormProps } from './molecules/Form';
|
|
61
63
|
export { default as Alert } from './molecules/Alert';
|
|
62
64
|
export type { AlertProps } from './molecules/Alert';
|
|
65
|
+
export { default as Card, CardImage, CardContent, CardActions, } from './organisms/Card';
|
|
66
|
+
export type { CardProps, CardImageProps, CardContentProps, CardActionsProps, } from './organisms/Card';
|
|
63
67
|
export { default as useSlider } from './hooks/useSlider';
|
|
64
68
|
export type { UseSliderArgs, SliderState, SliderDispatch, SlideDirection, } from './hooks/useSlider';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export interface BannerContentProps extends
|
|
3
|
+
export interface BannerContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
6
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Card;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface CardActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CardActions: React.ForwardRefExoticComponent<CardActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default CardActions;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, AriaAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Defines a string value that labels the current element.
|
|
10
|
+
*/
|
|
11
|
+
'aria-label'?: AriaAttributes['aria-label'];
|
|
12
|
+
}
|
|
13
|
+
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export default CardContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CardImageProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CardImage: React.ForwardRefExoticComponent<CardImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default CardImage;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default } from './Card';
|
|
2
|
+
export type { CardProps } from './Card';
|
|
3
|
+
export { default as CardImage } from './CardImage';
|
|
4
|
+
export type { CardImageProps } from './CardImage';
|
|
5
|
+
export { default as CardContent } from './CardContent';
|
|
6
|
+
export type { CardContentProps } from './CardContent';
|
|
7
|
+
export { default as CardActions } from './CardActions';
|
|
8
|
+
export type { CardActionsProps } from './CardActions';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CardProps } from '../Card';
|
|
2
|
+
export declare const Card: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, CardProps>;
|
|
3
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
@@ -24,4 +24,5 @@ export declare type PolymorphicComponentProps<C extends ElementType, Props = Rec
|
|
|
24
24
|
export declare type PolymorphicComponentPropsWithRef<C extends ElementType, P = Record<string, never>> = PolymorphicComponentProps<C, P> & {
|
|
25
25
|
ref?: ComponentPropsWithRef<C>['ref'];
|
|
26
26
|
};
|
|
27
|
+
export declare type PolymorphicRef<C extends ElementType> = PolymorphicComponentPropsWithRef<C>['ref'];
|
|
27
28
|
export {};
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { PolymorphicComponentProps, PolymorphicComponentPropsWithRef, } from './PolymorphicGenerics';
|
|
1
|
+
export type { PolymorphicComponentProps, PolymorphicComponentPropsWithRef, PolymorphicRef, } from './PolymorphicGenerics';
|
|
@@ -12,6 +12,20 @@ var reactSwipeable = require('react-swipeable');
|
|
|
12
12
|
var reactDom = require('react-dom');
|
|
13
13
|
var tabbable = require('tabbable');
|
|
14
14
|
|
|
15
|
+
const Link = /*#__PURE__*/React.forwardRef(function Link({
|
|
16
|
+
as,
|
|
17
|
+
children,
|
|
18
|
+
testId = 'store-link',
|
|
19
|
+
...otherProps
|
|
20
|
+
}, ref) {
|
|
21
|
+
const Component = as != null ? as : 'a';
|
|
22
|
+
return React__default.createElement(Component, Object.assign({
|
|
23
|
+
ref: ref,
|
|
24
|
+
"data-store-link": true,
|
|
25
|
+
"data-testid": testId
|
|
26
|
+
}, otherProps), children);
|
|
27
|
+
});
|
|
28
|
+
|
|
15
29
|
const Button = /*#__PURE__*/React.forwardRef(function Button({
|
|
16
30
|
children,
|
|
17
31
|
testId = 'store-button',
|
|
@@ -149,13 +163,14 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio({
|
|
|
149
163
|
|
|
150
164
|
const Badge = /*#__PURE__*/React.forwardRef(function Badge({
|
|
151
165
|
testId = 'store-badge',
|
|
152
|
-
children
|
|
166
|
+
children,
|
|
167
|
+
...otherProps
|
|
153
168
|
}, ref) {
|
|
154
|
-
return React__default.createElement("div", {
|
|
169
|
+
return React__default.createElement("div", Object.assign({
|
|
155
170
|
ref: ref,
|
|
156
|
-
"data-
|
|
157
|
-
"data-
|
|
158
|
-
}, children);
|
|
171
|
+
"data-store-badge": true,
|
|
172
|
+
"data-testid": testId
|
|
173
|
+
}, otherProps), children);
|
|
159
174
|
});
|
|
160
175
|
|
|
161
176
|
/**
|
|
@@ -391,13 +406,14 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
|
|
|
391
406
|
ref: ref,
|
|
392
407
|
"data-store-search-input": true,
|
|
393
408
|
"data-testid": testId,
|
|
394
|
-
onSubmit: handleSubmit
|
|
409
|
+
onSubmit: handleSubmit,
|
|
410
|
+
role: "search"
|
|
395
411
|
}, React__default.createElement(Input, Object.assign({
|
|
396
412
|
ref: valueRef,
|
|
397
413
|
"aria-label": ariaLabel
|
|
398
414
|
}, otherProps)), React__default.createElement(Button, {
|
|
399
415
|
type: "submit",
|
|
400
|
-
"aria-label":
|
|
416
|
+
"aria-label": "Submit Search"
|
|
401
417
|
}, React__default.createElement(Icon, {
|
|
402
418
|
component: icon != null ? icon : React__default.createElement(SearchIcon, null)
|
|
403
419
|
})));
|
|
@@ -1031,7 +1047,6 @@ const BannerContent = /*#__PURE__*/React.forwardRef(function BannerContent({
|
|
|
1031
1047
|
}, ref) {
|
|
1032
1048
|
return React__default.createElement("div", Object.assign({
|
|
1033
1049
|
ref: ref,
|
|
1034
|
-
role: "region",
|
|
1035
1050
|
"data-store-banner-content": true,
|
|
1036
1051
|
"data-testid": testId
|
|
1037
1052
|
}, otherProps), children);
|
|
@@ -1493,6 +1508,57 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert({
|
|
|
1493
1508
|
}, otherProps), children);
|
|
1494
1509
|
});
|
|
1495
1510
|
|
|
1511
|
+
const Card = /*#__PURE__*/React.forwardRef(function Card({
|
|
1512
|
+
testId = 'store-card',
|
|
1513
|
+
children,
|
|
1514
|
+
...otherProps
|
|
1515
|
+
}, ref) {
|
|
1516
|
+
return React__default.createElement("article", Object.assign({
|
|
1517
|
+
ref: ref,
|
|
1518
|
+
"data-store-card": true,
|
|
1519
|
+
"data-testid": testId
|
|
1520
|
+
}, otherProps), children);
|
|
1521
|
+
});
|
|
1522
|
+
|
|
1523
|
+
const CardImage = /*#__PURE__*/React.forwardRef(function CardImage({
|
|
1524
|
+
testId = 'store-card-image',
|
|
1525
|
+
children,
|
|
1526
|
+
...otherProps
|
|
1527
|
+
}, ref) {
|
|
1528
|
+
return React__default.createElement("div", Object.assign({
|
|
1529
|
+
ref: ref,
|
|
1530
|
+
"data-store-card-image": true,
|
|
1531
|
+
"data-testid": testId
|
|
1532
|
+
}, otherProps), children);
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1535
|
+
const CardContent = /*#__PURE__*/React.forwardRef(function CardContent({
|
|
1536
|
+
testId = 'store-card-content',
|
|
1537
|
+
'aria-label': ariaLabel = 'Card content',
|
|
1538
|
+
children,
|
|
1539
|
+
...otherProps
|
|
1540
|
+
}, ref) {
|
|
1541
|
+
return React__default.createElement("div", Object.assign({
|
|
1542
|
+
ref: ref,
|
|
1543
|
+
role: "region",
|
|
1544
|
+
"aria-label": ariaLabel,
|
|
1545
|
+
"data-store-card-content": true,
|
|
1546
|
+
"data-testid": testId
|
|
1547
|
+
}, otherProps), children);
|
|
1548
|
+
});
|
|
1549
|
+
|
|
1550
|
+
const CardActions = /*#__PURE__*/React.forwardRef(function CardActions({
|
|
1551
|
+
testId = 'store-card-actions',
|
|
1552
|
+
children,
|
|
1553
|
+
...otherProps
|
|
1554
|
+
}, ref) {
|
|
1555
|
+
return React__default.createElement("div", Object.assign({
|
|
1556
|
+
ref: ref,
|
|
1557
|
+
"data-store-card-actions": true,
|
|
1558
|
+
"data-testid": testId
|
|
1559
|
+
}, otherProps), children);
|
|
1560
|
+
});
|
|
1561
|
+
|
|
1496
1562
|
exports.Accordion = Accordion;
|
|
1497
1563
|
exports.AccordionButton = AccordionButton;
|
|
1498
1564
|
exports.AccordionItem = AccordionItem;
|
|
@@ -1506,6 +1572,10 @@ exports.BannerLink = BannerLink;
|
|
|
1506
1572
|
exports.Breadcrumb = Breadcrumb;
|
|
1507
1573
|
exports.Bullets = Bullets;
|
|
1508
1574
|
exports.Button = Button;
|
|
1575
|
+
exports.Card = Card;
|
|
1576
|
+
exports.CardActions = CardActions;
|
|
1577
|
+
exports.CardContent = CardContent;
|
|
1578
|
+
exports.CardImage = CardImage;
|
|
1509
1579
|
exports.Carousel = Carousel;
|
|
1510
1580
|
exports.Checkbox = Checkbox;
|
|
1511
1581
|
exports.Form = Form;
|
|
@@ -1513,6 +1583,7 @@ exports.Icon = Icon;
|
|
|
1513
1583
|
exports.IconButton = IconButton;
|
|
1514
1584
|
exports.Input = Input;
|
|
1515
1585
|
exports.Label = Label;
|
|
1586
|
+
exports.Link = Link;
|
|
1516
1587
|
exports.List = List;
|
|
1517
1588
|
exports.LoadingButton = LoadingButton;
|
|
1518
1589
|
exports.Modal = Modal;
|