@popsure/dirty-swan 0.33.5 → 0.34.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 +15 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/cards/cardButton/index.d.ts +8 -8
- package/dist/cjs/lib/components/cards/cardButton/index.stories.d.ts +39 -0
- package/dist/cjs/lib/components/cards/cardWithLeftIcon/index.d.ts +6 -12
- package/dist/cjs/lib/components/cards/cardWithLeftIcon/index.stories.d.ts +55 -0
- package/dist/cjs/lib/components/cards/cardWithTopIcon/index.d.ts +5 -11
- package/dist/cjs/lib/components/cards/cardWithTopIcon/index.stories.d.ts +59 -0
- package/dist/cjs/lib/components/cards/cardWithTopLeftIcon/index.d.ts +6 -12
- package/dist/cjs/lib/components/cards/cardWithTopLeftIcon/index.stories.d.ts +49 -0
- package/dist/cjs/lib/components/cards/index.d.ts +5 -5
- package/dist/cjs/lib/components/cards/infoCard/index.d.ts +4 -10
- package/dist/cjs/lib/components/cards/infoCard/index.stories.d.ts +47 -0
- package/dist/cjs/lib/components/input/index.d.ts +4 -5
- package/dist/cjs/lib/components/input/input.stories.d.ts +90 -0
- package/dist/cjs/lib/components/input/stories/config.d.ts +71 -0
- package/dist/cjs/lib/index.d.ts +1 -1
- package/dist/esm/components/autocompleteAddress/index.js +1 -1
- package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
- package/dist/esm/components/cards/cardButton/index.js +1 -1
- package/dist/esm/components/cards/cardButton/index.stories.js +49 -0
- package/dist/esm/components/cards/cardButton/index.stories.js.map +1 -0
- package/dist/esm/components/cards/cardWithLeftIcon/index.js +1 -1
- package/dist/esm/components/cards/cardWithLeftIcon/index.stories.js +64 -0
- package/dist/esm/components/cards/cardWithLeftIcon/index.stories.js.map +1 -0
- package/dist/esm/components/cards/cardWithTopIcon/index.js +1 -1
- package/dist/esm/components/cards/cardWithTopIcon/index.stories.js +68 -0
- package/dist/esm/components/cards/cardWithTopIcon/index.stories.js.map +1 -0
- package/dist/esm/components/cards/cardWithTopLeftIcon/index.js +1 -1
- package/dist/esm/components/cards/cardWithTopLeftIcon/index.stories.js +57 -0
- package/dist/esm/components/cards/cardWithTopLeftIcon/index.stories.js.map +1 -0
- package/dist/esm/components/cards/index.js +9 -9
- package/dist/esm/components/cards/index.js.map +1 -1
- package/dist/esm/components/cards/infoCard/index.js +1 -1
- package/dist/esm/components/cards/infoCard/index.stories.js +58 -0
- package/dist/esm/components/cards/infoCard/index.stories.js.map +1 -0
- package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableArrows/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
- package/dist/esm/components/input/currency/index.js +1 -1
- package/dist/esm/components/input/currency/index.js.map +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 +1 -1
- package/dist/esm/components/input/index.js.map +1 -1
- package/dist/esm/components/input/input.stories.js +85 -0
- package/dist/esm/components/input/input.stories.js.map +1 -0
- package/dist/esm/index-47663d39.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/cards/cardButton/index.d.ts +8 -8
- package/dist/esm/lib/components/cards/cardButton/index.stories.d.ts +39 -0
- package/dist/esm/lib/components/cards/cardWithLeftIcon/index.d.ts +6 -12
- package/dist/esm/lib/components/cards/cardWithLeftIcon/index.stories.d.ts +55 -0
- package/dist/esm/lib/components/cards/cardWithTopIcon/index.d.ts +5 -11
- package/dist/esm/lib/components/cards/cardWithTopIcon/index.stories.d.ts +59 -0
- package/dist/esm/lib/components/cards/cardWithTopLeftIcon/index.d.ts +6 -12
- package/dist/esm/lib/components/cards/cardWithTopLeftIcon/index.stories.d.ts +49 -0
- package/dist/esm/lib/components/cards/index.d.ts +5 -5
- package/dist/esm/lib/components/cards/infoCard/index.d.ts +4 -10
- package/dist/esm/lib/components/cards/infoCard/index.stories.d.ts +47 -0
- package/dist/esm/lib/components/input/index.d.ts +4 -5
- package/dist/esm/lib/components/input/input.stories.d.ts +90 -0
- package/dist/esm/lib/components/input/stories/config.d.ts +71 -0
- package/dist/esm/lib/index.d.ts +1 -1
- package/dist/esm/scss/public/demo.js +1 -1
- package/dist/esm/scss/public/demo.js.map +1 -1
- package/dist/index.css +10 -10
- package/dist/lib/scss/public/colors/default.scss +2 -2
- package/dist/lib/scss/public/demo.tsx +1 -1
- package/package.json +1 -1
- package/src/lib/components/autocompleteAddress/index.tsx +1 -1
- package/src/lib/components/cards/cardButton/index.stories.tsx +61 -0
- package/src/lib/components/cards/cardButton/index.tsx +9 -10
- package/src/lib/components/cards/cardWithLeftIcon/index.stories.tsx +79 -0
- package/src/lib/components/cards/cardWithLeftIcon/index.tsx +8 -6
- package/src/lib/components/cards/cardWithTopIcon/index.stories.tsx +85 -0
- package/src/lib/components/cards/cardWithTopIcon/index.tsx +9 -7
- package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.tsx +73 -0
- package/src/lib/components/cards/cardWithTopLeftIcon/index.tsx +8 -6
- package/src/lib/components/cards/index.tsx +5 -5
- package/src/lib/components/cards/infoCard/index.stories.tsx +71 -0
- package/src/lib/components/cards/infoCard/index.tsx +7 -5
- package/src/lib/components/input/a.stories.mdx +2 -2
- package/src/lib/components/input/autoSuggestInput/index.tsx +1 -1
- package/src/lib/components/input/currency/index.tsx +1 -1
- package/src/lib/components/input/iban/index.tsx +1 -1
- package/src/lib/components/input/index.tsx +4 -4
- package/src/lib/components/input/input.stories.tsx +48 -0
- package/src/lib/components/input/stories/config.ts +56 -0
- package/src/lib/index.tsx +1 -1
- package/src/lib/scss/public/colors/default.scss +2 -2
- package/src/lib/scss/public/demo.tsx +1 -1
- package/src/lib/components/cards/cardButton/index.stories.mdx +0 -47
- package/src/lib/components/cards/cardWithLeftIcon/index.stories.mdx +0 -103
- package/src/lib/components/cards/cardWithTopIcon/index.stories.mdx +0 -105
- package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.mdx +0 -101
- package/src/lib/components/cards/infoCard/index.stories.mdx +0 -61
- package/src/lib/components/input/index.stories.mdx +0 -108
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare type InputProps = {
|
|
2
|
+
export declare type InputProps = Omit<JSX.IntrinsicElements['input'], 'enterKeyHint'> & Partial<Pick<JSX.IntrinsicElements['input'], 'enterKeyHint'>> & {
|
|
3
3
|
error?: string;
|
|
4
4
|
prefix?: string;
|
|
5
5
|
label?: string;
|
|
6
6
|
id?: string;
|
|
7
7
|
hideLabel?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const
|
|
8
|
+
};
|
|
9
|
+
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
10
|
error?: string | undefined;
|
|
11
11
|
prefix?: string | undefined;
|
|
12
12
|
label?: string | undefined;
|
|
13
13
|
id?: string | undefined;
|
|
14
14
|
hideLabel?: boolean | undefined;
|
|
15
|
-
}
|
|
16
|
-
export default _default;
|
|
15
|
+
}, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "hidden" | "type" | "list" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "step" | "disabled" | "enterKeyHint" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "size" | "src" | "width" | "hideLabel"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputProps } from '.';
|
|
3
|
+
declare const story: {
|
|
4
|
+
title: string;
|
|
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;
|
|
7
|
+
prefix?: string | undefined;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
id?: string | undefined;
|
|
10
|
+
hideLabel?: boolean | undefined;
|
|
11
|
+
}, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "hidden" | "type" | "list" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "step" | "disabled" | "enterKeyHint" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "size" | "src" | "width" | "hideLabel"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
value: {
|
|
14
|
+
defaultValue: string;
|
|
15
|
+
description: string;
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
className: {
|
|
21
|
+
description: string;
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
placeholder: {
|
|
28
|
+
description: string;
|
|
29
|
+
defaultValue: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
label: {
|
|
35
|
+
description: string;
|
|
36
|
+
defaultValue: string;
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
hideLabel: {
|
|
42
|
+
description: string;
|
|
43
|
+
defaultValue: boolean;
|
|
44
|
+
control: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
prefix: {
|
|
49
|
+
description: string;
|
|
50
|
+
defaultValue: string;
|
|
51
|
+
control: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
id: {
|
|
56
|
+
description: string;
|
|
57
|
+
defaultValue: string;
|
|
58
|
+
control: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
error: {
|
|
63
|
+
description: string;
|
|
64
|
+
defaultValue: string;
|
|
65
|
+
control: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
table: {
|
|
69
|
+
type: {
|
|
70
|
+
summary: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
onChange: {
|
|
75
|
+
description: string;
|
|
76
|
+
action: boolean;
|
|
77
|
+
table: {
|
|
78
|
+
category: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
parameters: {
|
|
83
|
+
componentSubtitle: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export declare const InputStory: {
|
|
87
|
+
({ onChange, className, placeholder, value, label, hideLabel, prefix, error }: InputProps): JSX.Element;
|
|
88
|
+
storyName: string;
|
|
89
|
+
};
|
|
90
|
+
export default story;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const sharedConfig: {
|
|
2
|
+
value: {
|
|
3
|
+
defaultValue: string;
|
|
4
|
+
description: string;
|
|
5
|
+
control: {
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
className: {
|
|
10
|
+
description: string;
|
|
11
|
+
defaultValue: string;
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
placeholder: {
|
|
17
|
+
description: string;
|
|
18
|
+
defaultValue: string;
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
label: {
|
|
24
|
+
description: string;
|
|
25
|
+
defaultValue: string;
|
|
26
|
+
control: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
hideLabel: {
|
|
31
|
+
description: string;
|
|
32
|
+
defaultValue: boolean;
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
prefix: {
|
|
38
|
+
description: string;
|
|
39
|
+
defaultValue: string;
|
|
40
|
+
control: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
id: {
|
|
45
|
+
description: string;
|
|
46
|
+
defaultValue: string;
|
|
47
|
+
control: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
error: {
|
|
52
|
+
description: string;
|
|
53
|
+
defaultValue: string;
|
|
54
|
+
control: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
table: {
|
|
58
|
+
type: {
|
|
59
|
+
summary: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
onChange: {
|
|
64
|
+
description: string;
|
|
65
|
+
action: boolean;
|
|
66
|
+
table: {
|
|
67
|
+
category: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export default sharedConfig;
|
package/dist/esm/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DateSelector } from './components/dateSelector';
|
|
2
2
|
import { SignaturePad } from './components/signaturePad';
|
|
3
3
|
import { AutocompleteAddress } from './components/autocompleteAddress';
|
|
4
|
-
import Input from './components/input';
|
|
4
|
+
import { Input } from './components/input';
|
|
5
5
|
import { MultiDropzone, FileType, MultiDropzoneProps, UploadedFile, UploadStatus } from './components/multiDropzone';
|
|
6
6
|
import { DownloadButton } from './components/downloadButton';
|
|
7
7
|
import IbanInput from './components/input/iban';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.js","sources":["../../../../../src/lib/scss/public/demo.tsx"],"sourcesContent":["import React from 'react';\n\nconst colors = [\n {\n name: 'Transparent',\n code: 'transparent',\n hex: 'transparent',\n },\n {\n name: 'White',\n code: 'white',\n hex: '#fff',\n },\n {\n name: 'Primary 25',\n code: 'primary-25',\n hex: '#fcfcff',\n },\n {\n name: 'Primary 50',\n code: 'primary-50',\n hex: '#f7f7ff',\n },\n {\n name: 'Primary 100',\n code: 'primary-100',\n hex: '#e6e5ff',\n },\n {\n name: 'Primary 300',\n code: 'primary-300',\n hex: '#b1b0f5',\n },\n {\n name: 'Primary 500',\n code: 'primary-500',\n hex: '#8e8cee',\n },\n {\n name: 'Primary 700',\n code: 'primary-700',\n hex: '#6160a2',\n },\n {\n name: 'Primary 900',\n code: 'primary-900',\n hex: '#2e2e4c',\n },\n {\n name: 'Blue 100',\n code: 'blue-100',\n hex: '#e5f0ff',\n },\n {\n name: 'Blue 300',\n code: 'blue-300',\n hex: '#b0cdf3',\n },\n {\n name: 'Blue 500',\n code: 'blue-500',\n hex: '#8bb4ea',\n },\n {\n name: 'Blue 700',\n code: 'blue-700',\n hex: '#5f7ba0',\n },\n {\n name: 'Blue 900',\n code: 'blue-900',\n hex: '#2d394a',\n },\n {\n name: 'Glacier 100',\n code: 'glacier-100',\n hex: '#e0f7fe',\n },\n {\n name: 'Glacier 300',\n code: 'glacier-300',\n hex: '#aeddec',\n },\n {\n name: 'Glacier 500',\n code: 'glacier-500',\n hex: '#8bcbdf',\n },\n {\n name: 'Glacier 700',\n code: 'glacier-700',\n hex: '#5d8896',\n },\n {\n name: 'Glacier 900',\n code: 'glacier-900',\n hex: '#2d4148',\n },\n {\n name: 'Red 100',\n code: 'red-100',\n hex: '#fedede',\n },\n {\n name: 'Red 300',\n code: 'red-300',\n hex: '#faa0a0',\n },\n {\n name: 'Red 500',\n code: 'red-500',\n hex: '#e55454',\n },\n {\n name: 'Red 700',\n code: 'red-700',\n hex: '#c64848',\n },\n {\n name: 'Red 900',\n code: 'red-900',\n hex: '#4b2525',\n },\n {\n name: 'Pink 100',\n code: 'pink-100',\n hex: '#ffebf1',\n },\n {\n name: 'Pink 300',\n code: 'pink-300',\n hex: '#ffb1cb',\n },\n {\n name: 'Pink 500',\n code: 'pink-500',\n hex: '#f96092',\n },\n {\n name: 'Pink 700',\n code: 'pink-700',\n hex: '#c0305f',\n },\n {\n name: 'Pink 900',\n code: 'pink-900',\n hex: '#700024',\n },\n {\n name: 'Grey 100',\n code: 'grey-100',\n hex: '#fafaff',\n },\n {\n name: 'Grey 200',\n code: 'grey-200',\n hex: '#f5f6fb',\n },\n {\n name: 'Grey 300',\n code: 'grey-300',\n hex: '#d2d2d8',\n },\n {\n name: 'Grey 500',\n code: 'grey-500',\n hex: '#91919c',\n },\n {\n name: 'Grey 600',\n code: 'grey-600',\n hex: '#696970',\n },\n {\n name: 'Grey 700',\n code: 'grey-700',\n hex: '#4c4c53',\n },\n {\n name: 'Grey 900',\n code: 'grey-900',\n hex: '#26262e',\n },\n {\n name: 'Green 100',\n code: 'green-100',\n hex: '#e4ffe6',\n },\n {\n name: 'Green 300',\n code: 'green-300',\n hex: '#c4f5c8',\n },\n {\n name: 'Green 500',\n code: 'green-500',\n hex: '#84de8a',\n },\n {\n name: 'Green 700',\n code: 'green-700',\n hex: '#5b985f',\n },\n {\n name: 'Green 900',\n code: 'green-900',\n hex: '#354a2d',\n },\n {\n name: 'Spearmint 100',\n code: 'spearmint-100',\n hex: '#e3fff2',\n },\n {\n name: 'Spearmint 300',\n code: 'spearmint-300',\n hex: '#aaeacc',\n },\n {\n name: 'Spearmint 500',\n code: 'spearmint-500',\n hex: '#85dcb4',\n },\n {\n name: 'Spearmint 700',\n code: 'spearmint-700',\n hex: '#599278',\n },\n {\n name: 'Spearmint 900',\n code: 'spearmint-900',\n hex: '#2b4639',\n },\n {\n name: 'Yellow 100',\n code: 'yellow-100',\n hex: '#fff8e3',\n },\n {\n name: 'Yellow 300',\n code: 'yellow-300',\n hex: '#fae3a5',\n },\n {\n name: 'Yellow 500',\n code: 'yellow-500',\n hex: '#f7ce5c',\n },\n {\n name: 'Yellow 700',\n code: 'yellow-700',\n hex: '#cc9e21',\n },\n {\n name: 'Yellow 900',\n code: 'yellow-900',\n hex: '#4a3d10',\n },\n];\n\nexport const Colors = () => (\n <table style={{ width: '100%' }}>\n <tr\n style={{\n height: '40px',\n lineHeight: '40px',\n textAlign: 'left',\n }}\n >\n <th style={{ fontWeight: 'bold' }}>Color</th>\n <th style={{ fontWeight: 'bold' }}>Name</th>\n <th style={{ fontWeight: 'bold' }}>Sass</th>\n <th style={{ fontWeight: 'bold' }}>Text color class</th>\n <th style={{ fontWeight: 'bold' }}>BG color class</th>\n <th style={{ fontWeight: 'bold' }}>Hex</th>\n </tr>\n {colors.map((color) => (\n <tr style={{ height: '40px', lineHeight: '40px' }}>\n <td>\n <div\n style={{\n width: '24px',\n height: '24px',\n borderRadius: '4px',\n backgroundColor: color.hex,\n }}\n />\n </td>\n <td>{color.name}</td>\n <td>{`$ds-${color.code}`}</td>\n <td>{`tc-${color.code}`}</td>\n <td>{`bg-${color.code}`}</td>\n <td>{color.hex}</td>\n </tr>\n ))}\n </table>\n);\n\nexport const BoxShadows = () => {\n return (\n <div className=\"d-flex fd-row f-wrap gap16\">\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-xs p-p\"\n style={{ height: '136px' }}\n >\n .bx-xs\n </div>\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-sm p-p\"\n style={{ height: '136px' }}\n >\n .bx-sm\n </div>\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-md p-p\"\n style={{ height: '136px' }}\n >\n .bx-md\n </div>\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-lg p-p\"\n style={{ height: '136px' }}\n >\n .bx-lg\n </div>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAEA,IAAM,MAAM,GAAG;IACb;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,aAAa;KACnB;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,MAAM;KACZ;IACD;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,E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,iBACzCC,sBACE,SAAS,EAAC,qDAAqD,EAC/D,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,oCAGtB;YACNA,sBACE,SAAS,EAAC,qDAAqD,EAC/D,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,oCAGtB;YACNA,sBACE,SAAS,EAAC,qDAAqD,EAC/D,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,oCAGtB;YACNA,sBACE,SAAS,EAAC,qDAAqD,EAC/D,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,oCAGtB,aACF,EACN;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"demo.js","sources":["../../../../../src/lib/scss/public/demo.tsx"],"sourcesContent":["import React from 'react';\n\nconst colors = [\n {\n name: 'Transparent',\n code: 'transparent',\n hex: 'transparent',\n },\n {\n name: 'White',\n code: 'white',\n hex: '#fff',\n },\n {\n name: 'Primary 25',\n code: 'primary-25',\n hex: '#fcfcff',\n },\n {\n name: 'Primary 50',\n code: 'primary-50',\n hex: '#f7f7ff',\n },\n {\n name: 'Primary 100',\n code: 'primary-100',\n hex: '#ebebff',\n },\n {\n name: 'Primary 300',\n code: 'primary-300',\n hex: '#b1b0f5',\n },\n {\n name: 'Primary 500',\n code: 'primary-500',\n hex: '#8e8cee',\n },\n {\n name: 'Primary 700',\n code: 'primary-700',\n hex: '#6160a2',\n },\n {\n name: 'Primary 900',\n code: 'primary-900',\n hex: '#2e2e4c',\n },\n {\n name: 'Blue 100',\n code: 'blue-100',\n hex: '#e5f0ff',\n },\n {\n name: 'Blue 300',\n code: 'blue-300',\n hex: '#b0cdf3',\n },\n {\n name: 'Blue 500',\n code: 'blue-500',\n hex: '#8bb4ea',\n },\n {\n name: 'Blue 700',\n code: 'blue-700',\n hex: '#5f7ba0',\n },\n {\n name: 'Blue 900',\n code: 'blue-900',\n hex: '#2d394a',\n },\n {\n name: 'Glacier 100',\n code: 'glacier-100',\n hex: '#e0f7fe',\n },\n {\n name: 'Glacier 300',\n code: 'glacier-300',\n hex: '#aeddec',\n },\n {\n name: 'Glacier 500',\n code: 'glacier-500',\n hex: '#8bcbdf',\n },\n {\n name: 'Glacier 700',\n code: 'glacier-700',\n hex: '#5d8896',\n },\n {\n name: 'Glacier 900',\n code: 'glacier-900',\n hex: '#2d4148',\n },\n {\n name: 'Red 100',\n code: 'red-100',\n hex: '#fedede',\n },\n {\n name: 'Red 300',\n code: 'red-300',\n hex: '#faa0a0',\n },\n {\n name: 'Red 500',\n code: 'red-500',\n hex: '#e55454',\n },\n {\n name: 'Red 700',\n code: 'red-700',\n hex: '#c64848',\n },\n {\n name: 'Red 900',\n code: 'red-900',\n hex: '#4b2525',\n },\n {\n name: 'Pink 100',\n code: 'pink-100',\n hex: '#ffebf1',\n },\n {\n name: 'Pink 300',\n code: 'pink-300',\n hex: '#ffb1cb',\n },\n {\n name: 'Pink 500',\n code: 'pink-500',\n hex: '#f96092',\n },\n {\n name: 'Pink 700',\n code: 'pink-700',\n hex: '#c0305f',\n },\n {\n name: 'Pink 900',\n code: 'pink-900',\n hex: '#700024',\n },\n {\n name: 'Grey 100',\n code: 'grey-100',\n hex: '#fafaff',\n },\n {\n name: 'Grey 200',\n code: 'grey-200',\n hex: '#f5f6fb',\n },\n {\n name: 'Grey 300',\n code: 'grey-300',\n hex: '#d2d2d8',\n },\n {\n name: 'Grey 500',\n code: 'grey-500',\n hex: '#91919c',\n },\n {\n name: 'Grey 600',\n code: 'grey-600',\n hex: '#696970',\n },\n {\n name: 'Grey 700',\n code: 'grey-700',\n hex: '#4c4c53',\n },\n {\n name: 'Grey 900',\n code: 'grey-900',\n hex: '#26262e',\n },\n {\n name: 'Green 100',\n code: 'green-100',\n hex: '#e4ffe6',\n },\n {\n name: 'Green 300',\n code: 'green-300',\n hex: '#c4f5c8',\n },\n {\n name: 'Green 500',\n code: 'green-500',\n hex: '#84de8a',\n },\n {\n name: 'Green 700',\n code: 'green-700',\n hex: '#5b985f',\n },\n {\n name: 'Green 900',\n code: 'green-900',\n hex: '#354a2d',\n },\n {\n name: 'Spearmint 100',\n code: 'spearmint-100',\n hex: '#e3fff2',\n },\n {\n name: 'Spearmint 300',\n code: 'spearmint-300',\n hex: '#aaeacc',\n },\n {\n name: 'Spearmint 500',\n code: 'spearmint-500',\n hex: '#85dcb4',\n },\n {\n name: 'Spearmint 700',\n code: 'spearmint-700',\n hex: '#599278',\n },\n {\n name: 'Spearmint 900',\n code: 'spearmint-900',\n hex: '#2b4639',\n },\n {\n name: 'Yellow 100',\n code: 'yellow-100',\n hex: '#fff8e3',\n },\n {\n name: 'Yellow 300',\n code: 'yellow-300',\n hex: '#fae3a5',\n },\n {\n name: 'Yellow 500',\n code: 'yellow-500',\n hex: '#f7ce5c',\n },\n {\n name: 'Yellow 700',\n code: 'yellow-700',\n hex: '#cc9e21',\n },\n {\n name: 'Yellow 900',\n code: 'yellow-900',\n hex: '#4a3d10',\n },\n];\n\nexport const Colors = () => (\n <table style={{ width: '100%' }}>\n <tr\n style={{\n height: '40px',\n lineHeight: '40px',\n textAlign: 'left',\n }}\n >\n <th style={{ fontWeight: 'bold' }}>Color</th>\n <th style={{ fontWeight: 'bold' }}>Name</th>\n <th style={{ fontWeight: 'bold' }}>Sass</th>\n <th style={{ fontWeight: 'bold' }}>Text color class</th>\n <th style={{ fontWeight: 'bold' }}>BG color class</th>\n <th style={{ fontWeight: 'bold' }}>Hex</th>\n </tr>\n {colors.map((color) => (\n <tr style={{ height: '40px', lineHeight: '40px' }}>\n <td>\n <div\n style={{\n width: '24px',\n height: '24px',\n borderRadius: '4px',\n backgroundColor: color.hex,\n }}\n />\n </td>\n <td>{color.name}</td>\n <td>{`$ds-${color.code}`}</td>\n <td>{`tc-${color.code}`}</td>\n <td>{`bg-${color.code}`}</td>\n <td>{color.hex}</td>\n </tr>\n ))}\n </table>\n);\n\nexport const BoxShadows = () => {\n return (\n <div className=\"d-flex fd-row f-wrap gap16\">\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-xs p-p\"\n style={{ height: '136px' }}\n >\n .bx-xs\n </div>\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-sm p-p\"\n style={{ height: '136px' }}\n >\n .bx-sm\n </div>\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-md p-p\"\n style={{ height: '136px' }}\n >\n .bx-md\n </div>\n <div\n className=\"d-flex ai-center jc-center ws2 border br8 bs-lg p-p\"\n style={{ height: '136px' }}\n >\n .bx-lg\n </div>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAEA,IAAM,MAAM,GAAG;IACb;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,aAAa;KACnB;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,MAAM;KACZ;IACD;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,SAAS;KACf;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU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-purple-100 {
|
|
1474
|
-
color: #
|
|
1474
|
+
color: #ebebff !important;
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
1477
|
.tc-purple-300 {
|
|
@@ -1499,7 +1499,7 @@ input[type=number] {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
|
|
1501
1501
|
.tc-primary-100 {
|
|
1502
|
-
color: #
|
|
1502
|
+
color: #ebebff !important;
|
|
1503
1503
|
}
|
|
1504
1504
|
|
|
1505
1505
|
.tc-primary-300 {
|
|
@@ -1707,7 +1707,7 @@ input[type=number] {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
1709
|
.bg-purple-100 {
|
|
1710
|
-
background-color: #
|
|
1710
|
+
background-color: #ebebff !important;
|
|
1711
1711
|
}
|
|
1712
1712
|
|
|
1713
1713
|
.bg-purple-300 {
|
|
@@ -1735,7 +1735,7 @@ input[type=number] {
|
|
|
1735
1735
|
}
|
|
1736
1736
|
|
|
1737
1737
|
.bg-primary-100 {
|
|
1738
|
-
background-color: #
|
|
1738
|
+
background-color: #ebebff !important;
|
|
1739
1739
|
}
|
|
1740
1740
|
|
|
1741
1741
|
.bg-primary-300 {
|
|
@@ -1916,14 +1916,14 @@ input[type=number] {
|
|
|
1916
1916
|
--ds-blue-900: #2d394a;
|
|
1917
1917
|
--ds-purple-25: #fcfcff;
|
|
1918
1918
|
--ds-purple-50: #f7f7ff;
|
|
1919
|
-
--ds-purple-100: #
|
|
1919
|
+
--ds-purple-100: #ebebff;
|
|
1920
1920
|
--ds-purple-300: #b1b0f5;
|
|
1921
1921
|
--ds-purple-500: #8e8cee;
|
|
1922
1922
|
--ds-purple-700: #6160a2;
|
|
1923
1923
|
--ds-purple-900: #2e2e4c;
|
|
1924
1924
|
--ds-primary-25: #fcfcff;
|
|
1925
1925
|
--ds-primary-50: #f7f7ff;
|
|
1926
|
-
--ds-primary-100: #
|
|
1926
|
+
--ds-primary-100: #ebebff;
|
|
1927
1927
|
--ds-primary-300: #b1b0f5;
|
|
1928
1928
|
--ds-primary-500: #8e8cee;
|
|
1929
1929
|
--ds-primary-700: #6160a2;
|
|
@@ -2295,7 +2295,7 @@ body {
|
|
|
2295
2295
|
color: #8e8cee;
|
|
2296
2296
|
}
|
|
2297
2297
|
.p-btn--secondary:hover, .p-btn--secondary-grey:hover {
|
|
2298
|
-
background-color: #
|
|
2298
|
+
background-color: #ebebff;
|
|
2299
2299
|
}
|
|
2300
2300
|
@media (max-width: 34rem) {
|
|
2301
2301
|
.p-btn--secondary:hover, .p-btn--secondary-grey:hover {
|
|
@@ -2527,7 +2527,7 @@ body {
|
|
|
2527
2527
|
input:checked[type=radio] + .p-label--bordered,
|
|
2528
2528
|
input:checked[type=checkbox] + .p-label--bordered {
|
|
2529
2529
|
border-color: #8e8cee;
|
|
2530
|
-
background-color: #
|
|
2530
|
+
background-color: #ebebff;
|
|
2531
2531
|
}
|
|
2532
2532
|
|
|
2533
2533
|
.p-label-container {
|
|
@@ -2579,7 +2579,7 @@ input:checked[type=checkbox] + .p-label--bordered {
|
|
|
2579
2579
|
border-radius: 8px;
|
|
2580
2580
|
}
|
|
2581
2581
|
.p-notice--primary {
|
|
2582
|
-
background-color: #
|
|
2582
|
+
background-color: #ebebff;
|
|
2583
2583
|
border-color: #8e8cee;
|
|
2584
2584
|
color: #26262e;
|
|
2585
2585
|
}
|
|
@@ -2627,7 +2627,7 @@ input:checked[type=checkbox] + .p-label--bordered {
|
|
|
2627
2627
|
background-color: #b0cdf3;
|
|
2628
2628
|
}
|
|
2629
2629
|
.p-badge--default {
|
|
2630
|
-
background-color: #
|
|
2630
|
+
background-color: #ebebff;
|
|
2631
2631
|
}
|
|
2632
2632
|
|
|
2633
2633
|
.ds-spinner {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// TODO: Reference colors
|
|
2
2
|
$ds-primary-25: #fcfcff !default;
|
|
3
3
|
$ds-primary-50: #f7f7ff !default;
|
|
4
|
-
$ds-primary-100: #
|
|
4
|
+
$ds-primary-100: #ebebff !default;
|
|
5
5
|
$ds-primary-300: #b1b0f5 !default;
|
|
6
6
|
$ds-primary-500: #8e8cee !default;
|
|
7
7
|
$ds-primary-700: #6160a2 !default;
|
|
@@ -9,7 +9,7 @@ $ds-primary-900: #2e2e4c !default;
|
|
|
9
9
|
|
|
10
10
|
$ds-purple-25: #fcfcff;
|
|
11
11
|
$ds-purple-50: #f7f7ff;
|
|
12
|
-
$ds-purple-100: #
|
|
12
|
+
$ds-purple-100: #ebebff;
|
|
13
13
|
$ds-purple-300: #b1b0f5;
|
|
14
14
|
$ds-purple-500: #8e8cee;
|
|
15
15
|
$ds-purple-700: #6160a2;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import debounce from 'lodash.debounce';
|
|
4
4
|
import isEqual from 'lodash.isequal';
|
|
5
|
-
import Input from '../input';
|
|
5
|
+
import { Input } from '../input';
|
|
6
6
|
import {
|
|
7
7
|
Address,
|
|
8
8
|
countryNameFromAlphaCode,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FormEvent } from 'react';
|
|
2
|
+
import { CardButton, CardButtonProps } from '.';
|
|
3
|
+
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'JSX/Cards/CardButton',
|
|
6
|
+
component: CardButton,
|
|
7
|
+
argTypes: {
|
|
8
|
+
title: {
|
|
9
|
+
defaultValue: 'Risky Sports',
|
|
10
|
+
description: 'Title text that needs to be displayed',
|
|
11
|
+
},
|
|
12
|
+
description: {
|
|
13
|
+
defaultValue: 'Mountain or rock climbing, Bouldering, Martial arts, Extreme sports, Scuba diving, Sky diving, Bungee jumping, Mountain or rock climbing, Bouldering, Martial arts,',
|
|
14
|
+
description: 'Description text that is displayed under title',
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
defaultValue: false,
|
|
18
|
+
description: 'Disabled state of the button',
|
|
19
|
+
},
|
|
20
|
+
className: {
|
|
21
|
+
defaultValue: '',
|
|
22
|
+
description: 'Class name for most top parent element',
|
|
23
|
+
},
|
|
24
|
+
onClick: {
|
|
25
|
+
description: 'Function that runs on click of the button',
|
|
26
|
+
action: true,
|
|
27
|
+
table: {
|
|
28
|
+
category: 'Callbacks',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
href: {
|
|
32
|
+
defaultValue: '',
|
|
33
|
+
description: 'Redirect URL on click of the button',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const CardButtonStory = ({
|
|
39
|
+
title,
|
|
40
|
+
description,
|
|
41
|
+
disabled,
|
|
42
|
+
className,
|
|
43
|
+
href,
|
|
44
|
+
onClick,
|
|
45
|
+
}: CardButtonProps) => {
|
|
46
|
+
const handleOnClick = (e: FormEvent) => onClick?.(e);
|
|
47
|
+
return (
|
|
48
|
+
<CardButton
|
|
49
|
+
title={title}
|
|
50
|
+
description={description}
|
|
51
|
+
disabled={disabled}
|
|
52
|
+
className={className}
|
|
53
|
+
href={href}
|
|
54
|
+
onClick={handleOnClick}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
CardButtonStory.storyName = "CardButton";
|
|
60
|
+
|
|
61
|
+
export default story;
|
|
@@ -3,17 +3,18 @@ import { FormEvent, createElement, ReactNode } from 'react';
|
|
|
3
3
|
import styles from './style.module.scss';
|
|
4
4
|
import { chevronRight } from '../icons';
|
|
5
5
|
|
|
6
|
-
interface Props {
|
|
7
|
-
title: string;
|
|
8
|
-
description: string | ReactNode;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
6
|
|
|
13
7
|
type ActionProps =
|
|
14
8
|
| { href: string; onClick?: (e: FormEvent) => void }
|
|
15
9
|
| { href?: string; onClick: (e: FormEvent) => void };
|
|
16
10
|
|
|
11
|
+
export type CardButtonProps = {
|
|
12
|
+
title: string;
|
|
13
|
+
description: string | ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
} & ActionProps;
|
|
17
|
+
|
|
17
18
|
const CardContent = ({
|
|
18
19
|
title,
|
|
19
20
|
description,
|
|
@@ -34,14 +35,14 @@ const CardContent = ({
|
|
|
34
35
|
</>
|
|
35
36
|
);
|
|
36
37
|
|
|
37
|
-
const CardButton = ({
|
|
38
|
+
export const CardButton = ({
|
|
38
39
|
title,
|
|
39
40
|
description,
|
|
40
41
|
disabled = false,
|
|
41
42
|
onClick,
|
|
42
43
|
href,
|
|
43
44
|
className,
|
|
44
|
-
}:
|
|
45
|
+
}: CardButtonProps) => {
|
|
45
46
|
const component = href ? 'a' : 'button';
|
|
46
47
|
return (
|
|
47
48
|
<>
|
|
@@ -57,5 +58,3 @@ const CardButton = ({
|
|
|
57
58
|
</>
|
|
58
59
|
);
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
-
export default CardButton;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CardWithLeftIcon, CardWithLeftIconProps } from '.';
|
|
2
|
+
import { images } from '../../../util/images';
|
|
3
|
+
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'JSX/Cards/CardWithLeftIcon',
|
|
6
|
+
component: CardWithLeftIcon,
|
|
7
|
+
argTypes: {
|
|
8
|
+
title: {
|
|
9
|
+
defaultValue: 'Lorem Ipsum',
|
|
10
|
+
description: 'Title text that needs to be displayed',
|
|
11
|
+
},
|
|
12
|
+
children: {
|
|
13
|
+
type: 'text',
|
|
14
|
+
defaultValue: 'Mountain or rock climbing, Bouldering, Martial arts, Extreme sports, Scuba diving, Sky diving, Bungee jumping, Mountain or rock climbing, Bouldering, Martial arts,',
|
|
15
|
+
description: 'Content that is displayed inside the card',
|
|
16
|
+
},
|
|
17
|
+
state: {
|
|
18
|
+
defaultValue: 'actionable',
|
|
19
|
+
description: 'State that describe the interation with the card',
|
|
20
|
+
},
|
|
21
|
+
leftIcon: {
|
|
22
|
+
defaultValue: {
|
|
23
|
+
src: images.mortgage,
|
|
24
|
+
alt: 'Image alt'
|
|
25
|
+
},
|
|
26
|
+
description: 'Icon displayed on the left of the card.',
|
|
27
|
+
},
|
|
28
|
+
rightIcon: {
|
|
29
|
+
defaultValue: {
|
|
30
|
+
src: images.washingMachine,
|
|
31
|
+
alt: 'Icon alt'
|
|
32
|
+
},
|
|
33
|
+
description: 'Icon displayed on the top right corner of the card',
|
|
34
|
+
},
|
|
35
|
+
cardSize: {
|
|
36
|
+
control: { type: 'select' },
|
|
37
|
+
defaultValue: 'medium',
|
|
38
|
+
description: 'Size of the card'
|
|
39
|
+
},
|
|
40
|
+
dropshadow: {
|
|
41
|
+
defaultValue: true,
|
|
42
|
+
description: 'If the card should have a box-shadow or not',
|
|
43
|
+
},
|
|
44
|
+
className: {
|
|
45
|
+
defaultValue: '',
|
|
46
|
+
type: 'text',
|
|
47
|
+
description: 'Class name for most top parent element',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const CardWithLeftIconStory = ({
|
|
53
|
+
title,
|
|
54
|
+
dropshadow,
|
|
55
|
+
children,
|
|
56
|
+
className,
|
|
57
|
+
cardSize,
|
|
58
|
+
leftIcon,
|
|
59
|
+
rightIcon,
|
|
60
|
+
state,
|
|
61
|
+
}: CardWithLeftIconProps) => {
|
|
62
|
+
return (
|
|
63
|
+
<CardWithLeftIcon
|
|
64
|
+
cardSize={cardSize}
|
|
65
|
+
className={className}
|
|
66
|
+
dropshadow={dropshadow}
|
|
67
|
+
state={state}
|
|
68
|
+
leftIcon={leftIcon}
|
|
69
|
+
rightIcon={rightIcon}
|
|
70
|
+
title={title}
|
|
71
|
+
>
|
|
72
|
+
{children}
|
|
73
|
+
</CardWithLeftIcon>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
CardWithLeftIconStory.storyName = "CardWithLeftIcon";
|
|
78
|
+
|
|
79
|
+
export default story;
|
|
@@ -30,7 +30,13 @@ const cardTextStyleFromCardSize = (
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export
|
|
33
|
+
export type CardWithLeftIconProps = CardProps & {
|
|
34
|
+
cardSize?: 'xsmall' | 'small' | 'medium' | 'big';
|
|
35
|
+
leftIcon?: Icon;
|
|
36
|
+
rightIcon?: 'arrow' | Icon;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const CardWithLeftIcon = ({
|
|
34
40
|
className = '',
|
|
35
41
|
title,
|
|
36
42
|
cardSize = 'medium',
|
|
@@ -40,11 +46,7 @@ export default ({
|
|
|
40
46
|
state = 'actionable',
|
|
41
47
|
dropshadow = true,
|
|
42
48
|
...props
|
|
43
|
-
}:
|
|
44
|
-
cardSize?: 'xsmall' | 'small' | 'medium' | 'big';
|
|
45
|
-
leftIcon?: Icon;
|
|
46
|
-
rightIcon?: 'arrow' | Icon;
|
|
47
|
-
}) => {
|
|
49
|
+
}: CardWithLeftIconProps) => {
|
|
48
50
|
const cardStyle = `d-flex ai-center ${className} ${associatedClassForCardState(
|
|
49
51
|
state,
|
|
50
52
|
dropshadow
|