@popsure/dirty-swan 0.45.0-alpha → 0.47.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/cjs/index.js +421 -362
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/button/index.d.ts +4 -9
- package/dist/cjs/lib/components/button/index.stories.d.ts +2 -10
- package/dist/cjs/lib/components/dateSelector/components/Calendar.d.ts +16 -0
- package/dist/cjs/lib/components/dateSelector/index.d.ts +5 -7
- package/dist/cjs/lib/components/dateSelector/index.stories.d.ts +1 -1
- package/dist/cjs/lib/components/input/currency/input.stories.d.ts +7 -0
- package/dist/cjs/lib/components/input/index.d.ts +5 -3
- package/dist/cjs/lib/components/input/input.stories.d.ts +11 -3
- package/dist/cjs/lib/components/input/stories/config.d.ts +7 -0
- package/dist/esm/{index-f0e3bc9a.js → Calendar-62c6cf21.js} +24 -150
- package/dist/esm/Calendar-62c6cf21.js.map +1 -0
- package/dist/esm/components/button/index.js +2 -3
- package/dist/esm/components/button/index.js.map +1 -1
- package/dist/esm/components/button/index.stories.js +3 -16
- package/dist/esm/components/button/index.stories.js.map +1 -1
- package/dist/esm/components/card/index.js.map +1 -1
- package/dist/esm/components/card/index.stories.js +2 -2
- package/dist/esm/components/card/index.stories.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +7 -10
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/index.js +2 -0
- package/dist/esm/components/comparisonTable/index.js.map +1 -1
- package/dist/esm/components/dateSelector/components/Calendar.js +11 -0
- package/dist/esm/components/dateSelector/components/Calendar.js.map +1 -0
- package/dist/esm/components/dateSelector/index.js +203 -7
- package/dist/esm/components/dateSelector/index.js.map +1 -1
- package/dist/esm/components/dateSelector/index.stories.js +14 -5
- package/dist/esm/components/dateSelector/index.stories.js.map +1 -1
- package/dist/esm/components/dateSelector/index.test.js +177 -23
- package/dist/esm/components/dateSelector/index.test.js.map +1 -1
- package/dist/esm/components/icon/icons/Info.js +2 -2
- package/dist/esm/components/icon/icons/Info.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +1 -1
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/input/currency/input.stories.js +1 -1
- package/dist/esm/components/input/iban/index.js +1 -1
- package/dist/esm/components/input/iban/index.js.map +1 -1
- package/dist/esm/components/input/index.js +10 -7
- package/dist/esm/components/input/index.js.map +1 -1
- package/dist/esm/components/input/input.stories.js +3 -3
- package/dist/esm/components/input/input.stories.js.map +1 -1
- package/dist/esm/{config-56f12c98.js → config-1d276a9d.js} +7 -2
- package/dist/esm/config-1d276a9d.js.map +1 -0
- package/dist/esm/{index-03b0133a.js → index-e506c4ca.js} +3 -3
- package/dist/esm/{index-03b0133a.js.map → index-e506c4ca.js.map} +1 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/components/button/index.d.ts +4 -9
- package/dist/esm/lib/components/button/index.stories.d.ts +2 -10
- package/dist/esm/lib/components/dateSelector/components/Calendar.d.ts +16 -0
- package/dist/esm/lib/components/dateSelector/index.d.ts +5 -7
- package/dist/esm/lib/components/dateSelector/index.stories.d.ts +1 -1
- package/dist/esm/lib/components/input/currency/input.stories.d.ts +7 -0
- package/dist/esm/lib/components/input/index.d.ts +5 -3
- package/dist/esm/lib/components/input/input.stories.d.ts +11 -3
- package/dist/esm/lib/components/input/stories/config.d.ts +7 -0
- package/package.json +1 -1
- package/src/lib/components/button/index.stories.tsx +1 -26
- package/src/lib/components/button/index.tsx +10 -21
- package/src/lib/components/card/index.tsx +1 -1
- package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +5 -30
- package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +6 -2
- package/src/lib/components/dateSelector/components/Calendar.tsx +112 -0
- package/src/lib/components/dateSelector/{datepicker.scss → components/datepicker.scss} +4 -4
- package/src/lib/components/dateSelector/components/style.module.scss +3 -0
- package/src/lib/components/dateSelector/index.stories.tsx +18 -8
- package/src/lib/components/dateSelector/index.test.tsx +118 -20
- package/src/lib/components/dateSelector/index.tsx +196 -227
- package/src/lib/components/dateSelector/style.module.scss +6 -79
- package/src/lib/components/input/iban/index.tsx +1 -1
- package/src/lib/components/input/index.tsx +13 -7
- package/src/lib/components/input/input.stories.tsx +2 -0
- package/src/lib/components/input/stories/config.ts +6 -1
- package/src/lib/components/input/style.module.scss +8 -1
- package/dist/esm/config-56f12c98.js.map +0 -1
- package/dist/esm/index-f0e3bc9a.js.map +0 -1
- package/src/lib/components/dateSelector/icons/chevron-left.svg +0 -3
- package/src/lib/components/dateSelector/icons/chevron-right.svg +0 -3
- package/src/lib/components/dateSelector/index.test.ts +0 -33
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import React, { ReactElement,
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
2
|
declare type ButtonVariant = 'filledColor' | 'filledGray' | 'filledWhite' | 'textColor' | 'textWhite' | 'outlineWhite' | 'filledSuccess' | 'filledError';
|
|
3
|
-
declare
|
|
4
|
-
declare type ButtonDefaultAsType = typeof buttonDefaultAs;
|
|
5
|
-
declare type ButtonOwnProps<E> = {
|
|
6
|
-
as?: E;
|
|
3
|
+
declare type ButtonProps = {
|
|
7
4
|
children: ReactNode;
|
|
8
5
|
variant?: ButtonVariant;
|
|
9
6
|
leftIcon?: ReactElement;
|
|
@@ -11,15 +8,13 @@ declare type ButtonOwnProps<E> = {
|
|
|
11
8
|
loading?: boolean;
|
|
12
9
|
hideLabel?: boolean;
|
|
13
10
|
} & Omit<JSX.IntrinsicElements['button'], 'children'>;
|
|
14
|
-
export declare type ButtonProps<E extends ElementType = ButtonDefaultAsType> = ButtonOwnProps<E> & Omit<ComponentProps<E>, keyof ButtonOwnProps<E>>;
|
|
15
11
|
declare const Button: React.ForwardRefExoticComponent<Pick<{
|
|
16
|
-
as?: React.ElementType<any> | undefined;
|
|
17
12
|
children: ReactNode;
|
|
18
13
|
variant?: ButtonVariant | undefined;
|
|
19
14
|
leftIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
20
15
|
rightIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
21
16
|
loading?: boolean | undefined;
|
|
22
17
|
hideLabel?: boolean | undefined;
|
|
23
|
-
} & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children"
|
|
18
|
+
} & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children">, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "placeholder" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "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" | "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" | "hideLabel" | "loading" | "variant" | "leftIcon" | "rightIcon"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
19
|
export { Button };
|
|
25
|
-
export type { ButtonVariant };
|
|
20
|
+
export type { ButtonProps, ButtonVariant };
|
|
@@ -3,21 +3,14 @@ import { ButtonProps, ButtonVariant } from '.';
|
|
|
3
3
|
declare const story: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import("react").ForwardRefExoticComponent<Pick<{
|
|
6
|
-
as?: import("react").ElementType<any> | undefined;
|
|
7
6
|
children: import("react").ReactNode;
|
|
8
7
|
variant?: ButtonVariant | undefined;
|
|
9
8
|
leftIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
10
9
|
rightIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
11
10
|
loading?: boolean | undefined;
|
|
12
11
|
hideLabel?: boolean | undefined;
|
|
13
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children"
|
|
12
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children">, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "placeholder" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "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" | "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" | "hideLabel" | "loading" | "variant" | "leftIcon" | "rightIcon"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
13
|
argTypes: {
|
|
15
|
-
as: {
|
|
16
|
-
control: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
description: string;
|
|
20
|
-
};
|
|
21
14
|
children: {
|
|
22
15
|
control: {
|
|
23
16
|
type: string;
|
|
@@ -57,7 +50,7 @@ declare const story: {
|
|
|
57
50
|
};
|
|
58
51
|
};
|
|
59
52
|
export declare const ButtonStory: {
|
|
60
|
-
({
|
|
53
|
+
({ className, loading, children, variant, hideLabel }: ButtonProps): JSX.Element;
|
|
61
54
|
storyName: string;
|
|
62
55
|
};
|
|
63
56
|
export declare const ButtonVariants: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
@@ -66,5 +59,4 @@ export declare const ButtonWithIcons: ({ children, onClick }: ButtonProps) => JS
|
|
|
66
59
|
export declare const ButtonWithIconOnly: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
67
60
|
export declare const ButtonLoading: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
68
61
|
export declare const ButtonDisabled: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
69
|
-
export declare const ButtonAsOtherComponents: ({ children, as, onClick }: ButtonProps) => JSX.Element;
|
|
70
62
|
export default story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './datepicker.scss';
|
|
2
|
+
export interface CalendarProps {
|
|
3
|
+
dateFormat: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange: (date: string) => void;
|
|
6
|
+
yearBoundaries: {
|
|
7
|
+
min: number;
|
|
8
|
+
max: number;
|
|
9
|
+
};
|
|
10
|
+
displayCalendar?: boolean;
|
|
11
|
+
dayjsLocale?: ILocale;
|
|
12
|
+
firstDayOfWeek?: number;
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
setCalendarOpen: (isOpen: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const Calendar: ({ dateFormat, value, onChange, yearBoundaries, displayCalendar, dayjsLocale, firstDayOfWeek, setCalendarOpen, isOpen }: CalendarProps) => JSX.Element | null;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import './datepicker.scss';
|
|
2
|
-
export declare const fillArray: (from: number, to: number) => number[];
|
|
3
|
-
export declare const daysInMonthOfYear: ({ month, year, }: {
|
|
4
|
-
month: number;
|
|
5
|
-
year: number;
|
|
6
|
-
}) => number;
|
|
7
1
|
export interface DateSelectorProps {
|
|
8
2
|
value?: string;
|
|
9
3
|
onChange: (date: string) => void;
|
|
@@ -15,9 +9,13 @@ export interface DateSelectorProps {
|
|
|
15
9
|
dayjsLocale?: ILocale;
|
|
16
10
|
placeholders?: {
|
|
17
11
|
day?: string;
|
|
12
|
+
dayFormat?: string;
|
|
18
13
|
month?: string;
|
|
14
|
+
monthFormat?: string;
|
|
19
15
|
year?: string;
|
|
16
|
+
yearFormat?: string;
|
|
17
|
+
error?: string;
|
|
20
18
|
};
|
|
21
19
|
firstDayOfWeek?: number;
|
|
22
20
|
}
|
|
23
|
-
export declare const DateSelector: ({ value, onChange, yearBoundaries, displayCalendar,
|
|
21
|
+
export declare const DateSelector: ({ value, onChange, placeholders: placeholdersProps, yearBoundaries, displayCalendar, dayjsLocale, firstDayOfWeek, }: DateSelectorProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DateSelectorProps } from '.';
|
|
2
2
|
declare const story: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ value, onChange, yearBoundaries, displayCalendar,
|
|
4
|
+
component: ({ value, onChange, placeholders: placeholdersProps, yearBoundaries, displayCalendar, dayjsLocale, firstDayOfWeek, }: DateSelectorProps) => JSX.Element;
|
|
5
5
|
decorators: ((Story: any) => JSX.Element)[];
|
|
6
6
|
argTypes: {
|
|
7
7
|
yearBoundaries: {
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type InputProps = Omit<JSX.IntrinsicElements['input'], 'enterKeyHint'> & Partial<Pick<JSX.IntrinsicElements['input'], 'enterKeyHint'>> & {
|
|
3
|
-
error?: string;
|
|
3
|
+
error?: string | boolean;
|
|
4
4
|
prefix?: string;
|
|
5
5
|
label?: string;
|
|
6
6
|
id?: string;
|
|
7
7
|
hideLabel?: boolean;
|
|
8
|
+
labelInsideInput?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare const Input: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint"> & Partial<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint">> & {
|
|
10
|
-
error?: string | undefined;
|
|
11
|
+
error?: string | boolean | undefined;
|
|
11
12
|
prefix?: string | undefined;
|
|
12
13
|
label?: string | undefined;
|
|
13
14
|
id?: string | undefined;
|
|
14
15
|
hideLabel?: boolean | undefined;
|
|
15
|
-
|
|
16
|
+
labelInsideInput?: boolean | undefined;
|
|
17
|
+
}, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "size" | "color" | "hidden" | "type" | "list" | "enterKeyHint" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "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" | "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" | "hideLabel" | "labelInsideInput"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,12 +3,13 @@ import { InputProps } from '.';
|
|
|
3
3
|
declare const story: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint"> & Partial<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint">> & {
|
|
6
|
-
error?: string | undefined;
|
|
6
|
+
error?: string | boolean | undefined;
|
|
7
7
|
prefix?: string | undefined;
|
|
8
8
|
label?: string | undefined;
|
|
9
9
|
id?: string | undefined;
|
|
10
10
|
hideLabel?: boolean | undefined;
|
|
11
|
-
|
|
11
|
+
labelInsideInput?: boolean | undefined;
|
|
12
|
+
}, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "size" | "color" | "hidden" | "type" | "list" | "enterKeyHint" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "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" | "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" | "hideLabel" | "labelInsideInput"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
13
|
argTypes: {
|
|
13
14
|
value: {
|
|
14
15
|
defaultValue: string;
|
|
@@ -45,6 +46,13 @@ declare const story: {
|
|
|
45
46
|
type: string;
|
|
46
47
|
};
|
|
47
48
|
};
|
|
49
|
+
labelInsideInput: {
|
|
50
|
+
description: string;
|
|
51
|
+
defaultValue: boolean;
|
|
52
|
+
control: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
48
56
|
prefix: {
|
|
49
57
|
description: string;
|
|
50
58
|
defaultValue: string;
|
|
@@ -84,7 +92,7 @@ declare const story: {
|
|
|
84
92
|
};
|
|
85
93
|
};
|
|
86
94
|
export declare const InputStory: {
|
|
87
|
-
({ onChange, className, placeholder, value, label, hideLabel, prefix, error }: InputProps): JSX.Element;
|
|
95
|
+
({ onChange, className, placeholder, value, label, hideLabel, labelInsideInput, prefix, error }: InputProps): JSX.Element;
|
|
88
96
|
storyName: string;
|
|
89
97
|
};
|
|
90
98
|
export default story;
|
package/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { Button, ButtonProps, ButtonVariant } from '.';
|
|
2
|
-
import {
|
|
2
|
+
import { PlusIcon, SendIcon } from '../icon';
|
|
3
3
|
|
|
4
4
|
const story = {
|
|
5
5
|
title: 'JSX/Button',
|
|
6
6
|
component: Button,
|
|
7
7
|
argTypes: {
|
|
8
|
-
as: {
|
|
9
|
-
control: { type: 'text' },
|
|
10
|
-
description: 'Allow wrapper element type to be custom defined'
|
|
11
|
-
},
|
|
12
8
|
children: {
|
|
13
9
|
control: { type: 'text' },
|
|
14
10
|
defaultValue: 'Click me',
|
|
@@ -47,7 +43,6 @@ const story = {
|
|
|
47
43
|
};
|
|
48
44
|
|
|
49
45
|
export const ButtonStory = ({
|
|
50
|
-
as,
|
|
51
46
|
className,
|
|
52
47
|
loading = false,
|
|
53
48
|
children,
|
|
@@ -56,7 +51,6 @@ export const ButtonStory = ({
|
|
|
56
51
|
}: ButtonProps) => (
|
|
57
52
|
<div className='wmx6'>
|
|
58
53
|
<Button
|
|
59
|
-
as={as}
|
|
60
54
|
className={className}
|
|
61
55
|
loading={loading}
|
|
62
56
|
variant={variant}
|
|
@@ -197,23 +191,4 @@ export const ButtonDisabled = ({ children, onClick }: ButtonProps) => (
|
|
|
197
191
|
</Button>
|
|
198
192
|
);
|
|
199
193
|
|
|
200
|
-
export const ButtonAsOtherComponents = ({ children, as, onClick }: ButtonProps) => (
|
|
201
|
-
<div className='d-flex fd-column gap16 p24 bg-grey-200'>
|
|
202
|
-
<h3 className='p-h3'>As an anchor:</h3>
|
|
203
|
-
<Button as="a" href="https://feather-insurance.com" target="_blank">
|
|
204
|
-
{children}
|
|
205
|
-
</Button>
|
|
206
|
-
|
|
207
|
-
<h3 className='p-h3'>As a button:</h3>
|
|
208
|
-
<Button as="button" onClick={onClick}>
|
|
209
|
-
{children}
|
|
210
|
-
</Button>
|
|
211
|
-
|
|
212
|
-
<p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>
|
|
213
|
-
<InfoIcon />
|
|
214
|
-
Inspect elements to see the different HTML tags being rendered.
|
|
215
|
-
</p>
|
|
216
|
-
</div>
|
|
217
|
-
);
|
|
218
|
-
|
|
219
194
|
export default story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import React, { ReactElement,
|
|
2
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type ButtonVariant =
|
|
5
5
|
| 'filledColor'
|
|
@@ -22,11 +22,7 @@ const buttonTypeClassNameMap: { [K in ButtonVariant]: string } = {
|
|
|
22
22
|
filledError: 'p-btn--danger',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
type ButtonDefaultAsType = typeof buttonDefaultAs;
|
|
27
|
-
|
|
28
|
-
type ButtonOwnProps<E> = {
|
|
29
|
-
as?: E;
|
|
25
|
+
type ButtonProps = {
|
|
30
26
|
children: ReactNode;
|
|
31
27
|
variant?: ButtonVariant;
|
|
32
28
|
leftIcon?: ReactElement;
|
|
@@ -35,12 +31,8 @@ type ButtonOwnProps<E> = {
|
|
|
35
31
|
hideLabel?: boolean;
|
|
36
32
|
} & Omit<JSX.IntrinsicElements['button'], 'children'>;
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
Omit<ComponentProps<E>, keyof ButtonOwnProps<E>>;
|
|
40
|
-
|
|
41
|
-
const Button = React.forwardRef(<E extends ElementType = ButtonDefaultAsType>(
|
|
34
|
+
const Button = React.forwardRef((
|
|
42
35
|
{
|
|
43
|
-
as,
|
|
44
36
|
className,
|
|
45
37
|
loading = false,
|
|
46
38
|
children,
|
|
@@ -49,13 +41,10 @@ const Button = React.forwardRef(<E extends ElementType = ButtonDefaultAsType>(
|
|
|
49
41
|
rightIcon,
|
|
50
42
|
hideLabel,
|
|
51
43
|
...props
|
|
52
|
-
}: ButtonProps
|
|
53
|
-
ref?: React.ForwardedRef<
|
|
54
|
-
) =>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<ButtonTag
|
|
44
|
+
}: ButtonProps,
|
|
45
|
+
ref?: React.ForwardedRef<HTMLButtonElement>
|
|
46
|
+
) => (
|
|
47
|
+
<button
|
|
59
48
|
ref={ref}
|
|
60
49
|
className={classNames(
|
|
61
50
|
buttonTypeClassNameMap[variant],
|
|
@@ -103,9 +92,9 @@ const Button = React.forwardRef(<E extends ElementType = ButtonDefaultAsType>(
|
|
|
103
92
|
)}
|
|
104
93
|
</div>
|
|
105
94
|
) : children}
|
|
106
|
-
</
|
|
95
|
+
</button>
|
|
107
96
|
)
|
|
108
|
-
|
|
97
|
+
);
|
|
109
98
|
|
|
110
99
|
export { Button };
|
|
111
|
-
export type { ButtonVariant };
|
|
100
|
+
export type { ButtonProps, ButtonVariant };
|
|
@@ -36,7 +36,7 @@ type CardOwnProps<E extends ElementType = CardDefaultAsType> = {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export type CardProps<E extends ElementType = CardDefaultAsType> = CardOwnProps<E> &
|
|
39
|
-
Omit<ComponentProps<E>, keyof CardOwnProps<E
|
|
39
|
+
Omit<ComponentProps<E>, keyof CardOwnProps<E>>
|
|
40
40
|
|
|
41
41
|
const Card = <E extends ElementType = CardDefaultAsType>({
|
|
42
42
|
as,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Info from '../../../icon/icons/Info';
|
|
1
2
|
import styles from './style.module.scss';
|
|
2
3
|
|
|
3
4
|
const TableInfoButton = ({
|
|
@@ -7,39 +8,13 @@ const TableInfoButton = ({
|
|
|
7
8
|
onClick: () => void;
|
|
8
9
|
className?: string;
|
|
9
10
|
}) => (
|
|
10
|
-
<
|
|
11
|
-
role="button"
|
|
11
|
+
<button
|
|
12
12
|
className={`p-btn--secondary ${styles.button} ${className}`}
|
|
13
|
+
type="button"
|
|
13
14
|
onClick={onClick}
|
|
14
|
-
onKeyDown={(e) => {
|
|
15
|
-
e.stopPropagation();
|
|
16
|
-
|
|
17
|
-
if (e.key === 'Enter' || e.key === " ") {
|
|
18
|
-
onClick();
|
|
19
|
-
}
|
|
20
|
-
}}
|
|
21
|
-
tabIndex={0}
|
|
22
15
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
height="20"
|
|
26
|
-
viewBox="0 0 20 20"
|
|
27
|
-
fill="none"
|
|
28
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
29
|
-
>
|
|
30
|
-
<path
|
|
31
|
-
fillRule="evenodd"
|
|
32
|
-
clipRule="evenodd"
|
|
33
|
-
d="M10 2.66667C5.94991 2.66667 2.66667 5.94991 2.66667 10C2.66667 14.0501 5.94991 17.3333 10 17.3333C14.0501 17.3333 17.3333 14.0501 17.3333 10C17.3333 5.94991 14.0501 2.66667 10 2.66667ZM0.666667 10C0.666667 4.84534 4.84534 0.666667 10 0.666667C15.1547 0.666667 19.3333 4.84534 19.3333 10C19.3333 15.1547 15.1547 19.3333 10 19.3333C4.84534 19.3333 0.666667 15.1547 0.666667 10Z"
|
|
34
|
-
/>
|
|
35
|
-
<path
|
|
36
|
-
fillRule="evenodd"
|
|
37
|
-
clipRule="evenodd"
|
|
38
|
-
d="M10 9C10.5523 9 11 9.44772 11 10V13.3333C11 13.8856 10.5523 14.3333 10 14.3333C9.44772 14.3333 9 13.8856 9 13.3333V10C9 9.44772 9.44772 9 10 9Z"
|
|
39
|
-
/>
|
|
40
|
-
<path d="M10.8333 6.66667C10.8333 7.1269 10.4602 7.5 10 7.5C9.53976 7.5 9.16667 7.1269 9.16667 6.66667C9.16667 6.20643 9.53976 5.83333 10 5.83333C10.4602 5.83333 10.8333 6.20643 10.8333 6.66667Z" />
|
|
41
|
-
</svg>
|
|
42
|
-
</span>
|
|
16
|
+
<Info size={20} />
|
|
17
|
+
</button>
|
|
43
18
|
);
|
|
44
19
|
|
|
45
20
|
export default TableInfoButton;
|
|
@@ -20,12 +20,16 @@
|
|
|
20
20
|
background-color: $ds-primary-50;
|
|
21
21
|
|
|
22
22
|
svg {
|
|
23
|
-
|
|
23
|
+
path {
|
|
24
|
+
fill: $ds-primary-300;
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
svg {
|
|
28
|
-
|
|
30
|
+
path {
|
|
31
|
+
fill: $ds-grey-400;
|
|
32
|
+
}
|
|
29
33
|
transition: all 0.3s ease;
|
|
30
34
|
}
|
|
31
35
|
|