@stokr/components-library 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AddressItem/AddressItem.d.ts +38 -0
- package/dist/components/AddressItem/AddressItem.js +51 -0
- package/dist/components/AddressItem/AddressItem.styles.d.ts +31 -0
- package/dist/components/AddressItem/AddressItem.styles.js +71 -0
- package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts +10 -4
- package/dist/components/Collapsible/Collapsible.js +6 -14
- package/dist/components/Collapsible/Collapsible.styles.d.ts +3 -1
- package/dist/components/Collapsible/Collapsible.styles.js +26 -9
- package/dist/components/Country/CountrySelect.js +9 -14
- package/dist/components/Country/FlagFor.d.ts +9 -0
- package/dist/components/Country/FlagFor.js +25 -0
- package/dist/components/Country/flagLoaders.d.ts +5 -0
- package/dist/components/Country/flagLoaders.js +270 -0
- package/dist/components/Country/flagStore.d.ts +6 -0
- package/dist/components/Country/flagStore.js +29 -0
- package/dist/components/FAQ/FAQ.d.ts +29 -0
- package/dist/components/FAQ/FAQ.js +18 -18
- package/dist/components/FAQ/FAQ.styles.d.ts +11 -3
- package/dist/components/FAQ/FAQ.styles.js +55 -1
- package/dist/components/IdentityInfo/IdentityInfo.js +2 -1
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +3 -1
- package/dist/components/InfoBox/InfoBox.d.ts +13 -11
- package/dist/components/InfoBox/InfoBox.js +27 -12
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +5 -2
- package/dist/components/Input/Input.styles.d.ts +4 -0
- package/dist/components/Input/Input.styles.js +56 -0
- package/dist/components/Input/Select.d.ts +57 -0
- package/dist/components/Input/Select.js +89 -99
- package/dist/components/Input/Select.styles.d.ts +89 -0
- package/dist/components/Input/Select.styles.js +102 -2
- package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
- package/dist/components/MaterialIcon/requiredIcons.js +2 -0
- package/dist/components/PanelCard/PanelCard.d.ts +51 -0
- package/dist/components/PanelCard/PanelCard.js +35 -0
- package/dist/components/PanelCard/PanelCard.styles.d.ts +29 -0
- package/dist/components/PanelCard/PanelCard.styles.js +84 -0
- package/dist/components/Radio/Radio.styles.d.ts +1 -0
- package/dist/components/StepSidebar/MobileStepProgress.d.ts +12 -0
- package/dist/components/StepSidebar/MobileStepProgress.js +14 -0
- package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +15 -0
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +41 -0
- package/dist/components/StepSidebar/StepProgress.d.ts +14 -0
- package/dist/components/StepSidebar/StepProgress.js +14 -0
- package/dist/components/StepSidebar/StepProgress.styles.d.ts +30 -0
- package/dist/components/StepSidebar/StepProgress.styles.js +106 -0
- package/dist/components/StepSidebar/StepSidebar.d.ts +36 -0
- package/dist/components/StepSidebar/StepSidebar.js +58 -0
- package/dist/components/StepSidebar/StepSidebar.styles.d.ts +55 -0
- package/dist/components/StepSidebar/StepSidebar.styles.js +174 -0
- package/dist/components/StokrLoader/StokrLoader.d.ts +16 -2
- package/dist/components/StokrLoader/StokrLoader.js +140 -26
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +26 -11
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +29 -12
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +85 -7
- package/dist/constants/chainLogos.d.ts +9 -0
- package/dist/constants/chainLogos.js +17 -0
- package/dist/index.d.ts +73 -6
- package/dist/index.js +21 -4
- package/dist/static/images/chains/avalanche.svg +7 -0
- package/dist/static/images/chains/avalanche.svg.js +4 -0
- package/dist/static/images/chains/ethereum.svg +14 -0
- package/dist/static/images/chains/ethereum.svg.js +4 -0
- package/dist/static/images/chains/liquid.svg +7 -0
- package/dist/static/images/chains/liquid.svg.js +4 -0
- package/dist/static/images/chains/solana.svg +29 -0
- package/dist/static/images/chains/solana.svg.js +4 -0
- package/dist/static/images/chains/stellar.svg +17 -0
- package/dist/static/images/chains/stellar.svg.js +4 -0
- package/dist/static/images/chains/tempo.svg +11 -0
- package/dist/static/images/chains/tempo.svg.js +4 -0
- package/dist/styles/borderedField.d.ts +11 -0
- package/dist/styles/borderedField.js +53 -0
- package/package.json +1 -1
- package/dist/static/images/globe.svg.js +0 -5
- package/dist/static/images/trash.svg +0 -17
- package/dist/static/images/trash.svg.js +0 -5
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { FieldVariant } from '../../styles/borderedField';
|
|
2
|
+
export declare const SelectControl: import('styled-components').RuleSet<object>;
|
|
3
|
+
/** A one-string array: emotion (react-select) rejects a bare string and would join a longer array with `;`. */
|
|
4
|
+
export declare const borderedControlCss: ({ focused, invalid, disabled, }: {
|
|
5
|
+
focused: boolean;
|
|
6
|
+
invalid: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
}) => string[];
|
|
9
|
+
export declare const SelectMenu: import('styled-components').RuleSet<object>;
|
|
10
|
+
export declare const SelectMenuList: import('styled-components/dist/types').IStyledComponentBase<"web", any> & string & Omit<{
|
|
11
|
+
(props: any): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
propTypes: {
|
|
13
|
+
children: any;
|
|
14
|
+
className: any;
|
|
15
|
+
noMobileScroll: any;
|
|
16
|
+
autoHeight: any;
|
|
17
|
+
autoHeightMax: any;
|
|
18
|
+
autoHeightMin: any;
|
|
19
|
+
barPadding: any;
|
|
20
|
+
topPadding: any;
|
|
21
|
+
offset: any;
|
|
22
|
+
handleScroll: any;
|
|
23
|
+
};
|
|
24
|
+
}, keyof import('react').Component<any, {}, any>>;
|
|
25
|
+
export declare const SelectOption: import('styled-components').RuleSet<object>;
|
|
26
|
+
export declare const SelectContainer: import('styled-components').RuleSet<NoInfer<{
|
|
27
|
+
selectProps: {
|
|
28
|
+
menuIsOpen?: boolean;
|
|
29
|
+
};
|
|
30
|
+
}>>;
|
|
31
|
+
export declare const SelectValueContainer: import('styled-components').RuleSet<object>;
|
|
32
|
+
export declare const SelectIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
33
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
34
|
+
}, {
|
|
35
|
+
isMenuOpen?: boolean;
|
|
36
|
+
$variant?: FieldVariant;
|
|
37
|
+
}>, "children"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
38
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
39
|
+
}, {
|
|
40
|
+
isMenuOpen?: boolean;
|
|
41
|
+
$variant?: FieldVariant;
|
|
42
|
+
}>, "children">>> & string;
|
|
43
|
+
export declare const OptionRow: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
44
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
45
|
+
}> & string;
|
|
46
|
+
export declare const OptionIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
47
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
48
|
+
}, {
|
|
49
|
+
$variant?: FieldVariant;
|
|
50
|
+
}>> & string;
|
|
51
|
+
export declare const OptionLabel: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
52
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
53
|
+
}> & string;
|
|
54
|
+
export declare const SelectedChipsWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
55
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
56
|
+
}, {
|
|
57
|
+
$variant?: FieldVariant;
|
|
58
|
+
}>> & string;
|
|
59
|
+
export declare const SelectedChipsTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
60
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
61
|
+
}, {
|
|
62
|
+
$variant?: FieldVariant;
|
|
63
|
+
}>> & string;
|
|
64
|
+
export declare const SelectedChipsList: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
65
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
66
|
+
}> & string;
|
|
67
|
+
export declare const SelectedChip: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
68
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
69
|
+
}, {
|
|
70
|
+
$variant?: FieldVariant;
|
|
71
|
+
}>> & string;
|
|
72
|
+
export declare const SelectedChipLabel: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
73
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
74
|
+
}> & string;
|
|
75
|
+
export declare const SelectedChipRemove: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
76
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
77
|
+
}, {
|
|
78
|
+
$variant?: FieldVariant;
|
|
79
|
+
}>, "name" | "hidden" | "color" | "content" | "style" | "disabled" | "form" | "slot" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "value" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
80
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
81
|
+
}, {
|
|
82
|
+
$variant?: FieldVariant;
|
|
83
|
+
}>, "name" | "hidden" | "color" | "content" | "style" | "disabled" | "form" | "slot" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "value" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget">>> & string;
|
|
84
|
+
export declare const SelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
85
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
86
|
+
}, {
|
|
87
|
+
minWidth?: string;
|
|
88
|
+
noMargin?: boolean;
|
|
89
|
+
}>> & string;
|
|
@@ -2,6 +2,8 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import { TrackV } from "../ComponentScroll/ComponentScroll.styles.js";
|
|
3
3
|
import stdin_default from "../ComponentScroll/ComponentScroll.js";
|
|
4
4
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
5
|
+
import { borderedFieldBox, borderedFieldText, borderedFieldFocus, borderedFieldError, borderedFieldDisabled } from "../../styles/borderedField.js";
|
|
6
|
+
import { text } from "../../design-system/styled/text.js";
|
|
5
7
|
const SelectControl = css`
|
|
6
8
|
&&& {
|
|
7
9
|
z-index: 10 !important;
|
|
@@ -36,6 +38,62 @@ const SelectControl = css`
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
`;
|
|
41
|
+
const SelectBorderedControl = css`
|
|
42
|
+
&&& {
|
|
43
|
+
z-index: 10 !important;
|
|
44
|
+
position: relative;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
width: 100%;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
${borderedFieldBox}
|
|
51
|
+
${borderedFieldText}
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
box-shadow: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.active {
|
|
58
|
+
z-index: 12 !important;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
const SelectBorderedFocus = css`
|
|
63
|
+
&&& {
|
|
64
|
+
${borderedFieldFocus}
|
|
65
|
+
|
|
66
|
+
&:hover {
|
|
67
|
+
${borderedFieldFocus}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
const SelectBorderedError = css`
|
|
72
|
+
&&& {
|
|
73
|
+
${borderedFieldError}
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
${borderedFieldError}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
const SelectBorderedDisabled = css`
|
|
81
|
+
&&& {
|
|
82
|
+
${borderedFieldDisabled}
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
const borderedControlCss = ({
|
|
86
|
+
focused,
|
|
87
|
+
invalid,
|
|
88
|
+
disabled
|
|
89
|
+
}) => [
|
|
90
|
+
[
|
|
91
|
+
SelectBorderedControl,
|
|
92
|
+
focused && SelectBorderedFocus,
|
|
93
|
+
invalid && SelectBorderedError,
|
|
94
|
+
disabled && SelectBorderedDisabled
|
|
95
|
+
].flat(2).filter(Boolean).join("")
|
|
96
|
+
];
|
|
39
97
|
const SelectMenu = css`
|
|
40
98
|
margin-top: -1px;
|
|
41
99
|
border-radius: 0;
|
|
@@ -97,6 +155,10 @@ const SelectIcon = styled.span.withConfig({
|
|
|
97
155
|
${(props) => props.isMenuOpen && `
|
|
98
156
|
transform: rotate(180deg);
|
|
99
157
|
`}
|
|
158
|
+
|
|
159
|
+
${(props) => props.$variant === "bordered" && `
|
|
160
|
+
font-size: 20px;
|
|
161
|
+
`}
|
|
100
162
|
}
|
|
101
163
|
`;
|
|
102
164
|
const OptionRow = styled.div`
|
|
@@ -122,6 +184,11 @@ const OptionIcon = styled.span`
|
|
|
122
184
|
object-fit: cover;
|
|
123
185
|
display: block;
|
|
124
186
|
}
|
|
187
|
+
|
|
188
|
+
${(props) => props.$variant === "bordered" && `
|
|
189
|
+
width: 24px;
|
|
190
|
+
height: 20px;
|
|
191
|
+
`}
|
|
125
192
|
`;
|
|
126
193
|
const OptionLabel = styled.span`
|
|
127
194
|
flex: 1;
|
|
@@ -131,7 +198,7 @@ const OptionLabel = styled.span`
|
|
|
131
198
|
text-overflow: ellipsis;
|
|
132
199
|
`;
|
|
133
200
|
const SelectedChipsWrapper = styled.div`
|
|
134
|
-
margin-top: 18px;
|
|
201
|
+
margin-top: ${(props) => props.$variant === "bordered" ? "var(--stokr-space-4)" : "18px"};
|
|
135
202
|
`;
|
|
136
203
|
const SelectedChipsTitle = styled.div`
|
|
137
204
|
font-size: 11px;
|
|
@@ -139,6 +206,13 @@ const SelectedChipsTitle = styled.div`
|
|
|
139
206
|
text-transform: uppercase;
|
|
140
207
|
color: var(--stokr-text-secondary);
|
|
141
208
|
margin-bottom: 8px;
|
|
209
|
+
|
|
210
|
+
${(props) => props.$variant === "bordered" && css`
|
|
211
|
+
margin-bottom: var(--stokr-space-1);
|
|
212
|
+
line-height: 16px;
|
|
213
|
+
letter-spacing: 2px;
|
|
214
|
+
color: var(--stokr-text-secondary);
|
|
215
|
+
`}
|
|
142
216
|
`;
|
|
143
217
|
const SelectedChipsList = styled.div`
|
|
144
218
|
display: flex;
|
|
@@ -156,6 +230,15 @@ const SelectedChip = styled.div`
|
|
|
156
230
|
font-size: 12px;
|
|
157
231
|
line-height: 16px;
|
|
158
232
|
color: var(--stokr-text-primary);
|
|
233
|
+
|
|
234
|
+
${(props) => props.$variant === "bordered" && css`
|
|
235
|
+
gap: 6px;
|
|
236
|
+
padding: var(--stokr-space-1) var(--stokr-space-2) var(--stokr-space-1) var(--stokr-space-3);
|
|
237
|
+
border-color: var(--stokr-border-subtle);
|
|
238
|
+
border-radius: 48px;
|
|
239
|
+
${text("buttonLabel")}
|
|
240
|
+
color: var(--stokr-text-primary);
|
|
241
|
+
`}
|
|
159
242
|
`;
|
|
160
243
|
const SelectedChipLabel = styled.span`
|
|
161
244
|
white-space: nowrap;
|
|
@@ -178,6 +261,22 @@ const SelectedChipRemove = styled.button.attrs({ type: "button" })`
|
|
|
178
261
|
&:hover {
|
|
179
262
|
color: var(--stokr-text-primary);
|
|
180
263
|
}
|
|
264
|
+
|
|
265
|
+
${(props) => props.$variant === "bordered" && css`
|
|
266
|
+
width: 16px;
|
|
267
|
+
height: 16px;
|
|
268
|
+
margin: 0;
|
|
269
|
+
color: var(--stokr-text-primary);
|
|
270
|
+
|
|
271
|
+
&:hover {
|
|
272
|
+
color: var(--stokr-text-primary);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
&:disabled {
|
|
276
|
+
cursor: not-allowed;
|
|
277
|
+
opacity: 0.4;
|
|
278
|
+
}
|
|
279
|
+
`}
|
|
181
280
|
`;
|
|
182
281
|
const SelectWrapper = styled.div.withConfig({
|
|
183
282
|
shouldForwardProp: (props) => !["minWidth", "noMargin"].includes(props)
|
|
@@ -236,5 +335,6 @@ export {
|
|
|
236
335
|
SelectedChipRemove,
|
|
237
336
|
SelectedChipsList,
|
|
238
337
|
SelectedChipsTitle,
|
|
239
|
-
SelectedChipsWrapper
|
|
338
|
+
SelectedChipsWrapper,
|
|
339
|
+
borderedControlCss
|
|
240
340
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* The Material Symbols (`<variant>/<name>[-fill]`) the library's own components draw. The host registers them with
|
|
3
3
|
* `registerMaterialIcons`; a component whose icon is not registered renders it empty.
|
|
4
4
|
*/
|
|
5
|
-
export declare const requiredMaterialIcons: readonly ["outlined/add_circle", "outlined/cancel-fill", "outlined/check", "outlined/check@600", "outlined/check_circle-fill", "outlined/chevron_left", "outlined/chevron_right", "outlined/close", "outlined/content_copy", "outlined/edit", "outlined/info", "outlined/info-fill", "outlined/keyboard_arrow_down", "outlined/search_activity", "outlined/visibility", "outlined/visibility_off", "outlined/warning"];
|
|
5
|
+
export declare const requiredMaterialIcons: readonly ["outlined/add_circle", "outlined/cancel-fill", "outlined/check", "outlined/check@600", "outlined/check_circle-fill", "outlined/chevron_left", "outlined/chevron_right", "outlined/close", "outlined/content_copy", "outlined/delete", "outlined/edit", "outlined/info", "outlined/info-fill", "outlined/keyboard_arrow_down", "outlined/language", "outlined/search_activity", "outlined/visibility", "outlined/visibility_off", "outlined/warning"];
|
|
@@ -8,10 +8,12 @@ const requiredMaterialIcons = [
|
|
|
8
8
|
"outlined/chevron_right",
|
|
9
9
|
"outlined/close",
|
|
10
10
|
"outlined/content_copy",
|
|
11
|
+
"outlined/delete",
|
|
11
12
|
"outlined/edit",
|
|
12
13
|
"outlined/info",
|
|
13
14
|
"outlined/info-fill",
|
|
14
15
|
"outlined/keyboard_arrow_down",
|
|
16
|
+
"outlined/language",
|
|
15
17
|
"outlined/search_activity",
|
|
16
18
|
"outlined/visibility",
|
|
17
19
|
"outlined/visibility_off",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface PanelCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Blue border and a raised shadow: the "added" state. */
|
|
4
|
+
highlighted?: boolean;
|
|
5
|
+
/** Element or component to render as. Default `div`. */
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A bordered card whose children (header, sections, footer) are separated by 1px dividers. Extra props and the ref go
|
|
10
|
+
* to the root element, so `styled(PanelCard)` works.
|
|
11
|
+
*
|
|
12
|
+
* CSS custom properties (set on the card or any ancestor):
|
|
13
|
+
* - `--panel-card-background` (`#fff`), `--panel-card-border-color` (`#e1e1e1`), `--panel-card-radius` (`8px`)
|
|
14
|
+
* - `--panel-card-highlight-color` (`#0050ca`), `--panel-card-highlight-shadow` (`elevation.md`)
|
|
15
|
+
* - `--panel-card-divider` (`1px solid #e1e1e1`)
|
|
16
|
+
*/
|
|
17
|
+
export declare const PanelCard: import('react').ForwardRefExoticComponent<PanelCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export interface PanelCardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
19
|
+
/** Slot before the text, e.g. an icon or logo. */
|
|
20
|
+
leading?: ReactNode;
|
|
21
|
+
title?: ReactNode;
|
|
22
|
+
subtitle?: ReactNode;
|
|
23
|
+
/** Slot after the text: below it on mobile, at the right edge from 992px. */
|
|
24
|
+
trailing?: ReactNode;
|
|
25
|
+
/** Element for the title. Default `div`; use `h2` etc. for a real heading. */
|
|
26
|
+
titleAs?: ElementType;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Card header: leading slot, title and subtitle, trailing slot. `children` render in place of the title block when no
|
|
30
|
+
* `title` or `subtitle` is given.
|
|
31
|
+
*
|
|
32
|
+
* CSS custom properties: `--panel-card-header-padding` (`16px`, `24px` from 992px), `--panel-card-header-gap`
|
|
33
|
+
* (`20px`, between text and trailing), `--panel-card-header-leading-gap` (`12px`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const PanelCardHeader: import('react').ForwardRefExoticComponent<PanelCardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export type PanelCardSectionProps = HTMLAttributes<HTMLDivElement>;
|
|
37
|
+
/**
|
|
38
|
+
* Plain padded block, e.g. one row. Use one section per row: the card draws full-width dividers between its children.
|
|
39
|
+
*
|
|
40
|
+
* CSS custom properties: `--panel-card-section-padding` (`16px`, `16px 24px` from 992px),
|
|
41
|
+
* `--panel-card-section-background` (`#fff`).
|
|
42
|
+
*/
|
|
43
|
+
export declare const PanelCardSection: import('react').ForwardRefExoticComponent<PanelCardSectionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
44
|
+
export type PanelCardFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
45
|
+
/**
|
|
46
|
+
* Footer on a grey surface.
|
|
47
|
+
*
|
|
48
|
+
* CSS custom properties: `--panel-card-footer-padding` (`12px 16px`, `12px 24px` from 992px),
|
|
49
|
+
* `--panel-card-footer-background` (`#f8f8f8`).
|
|
50
|
+
*/
|
|
51
|
+
export declare const PanelCardFooter: import('react').ForwardRefExoticComponent<PanelCardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Root, Footer, Header, HeaderMain, HeaderText, HeaderTitle, HeaderSubtitle, HeaderTrailing, Section } from "./PanelCard.styles.js";
|
|
4
|
+
const PanelCard = forwardRef(function PanelCardBase({ highlighted = false, as, ...rest }, ref) {
|
|
5
|
+
return /* @__PURE__ */ jsx(Root, { ...rest, ref, as, $highlighted: highlighted });
|
|
6
|
+
});
|
|
7
|
+
const PanelCardHeader = forwardRef(function PanelCardHeaderBase({ leading, title, subtitle, trailing, titleAs, children, ...rest }, ref) {
|
|
8
|
+
const hasText = title != null || subtitle != null;
|
|
9
|
+
return /* @__PURE__ */ jsxs(Header, { ...rest, ref, children: [
|
|
10
|
+
/* @__PURE__ */ jsxs(HeaderMain, { children: [
|
|
11
|
+
leading,
|
|
12
|
+
hasText ? /* @__PURE__ */ jsxs(HeaderText, { children: [
|
|
13
|
+
title != null && /* @__PURE__ */ jsx(HeaderTitle, { as: titleAs, children: title }),
|
|
14
|
+
subtitle != null && /* @__PURE__ */ jsx(HeaderSubtitle, { children: subtitle })
|
|
15
|
+
] }) : children
|
|
16
|
+
] }),
|
|
17
|
+
trailing != null && /* @__PURE__ */ jsx(HeaderTrailing, { children: trailing })
|
|
18
|
+
] });
|
|
19
|
+
});
|
|
20
|
+
const PanelCardSection = forwardRef(
|
|
21
|
+
function PanelCardSectionBase(props, ref) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Section, { ...props, ref });
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
const PanelCardFooter = forwardRef(
|
|
26
|
+
function PanelCardFooterBase(props, ref) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Footer, { ...props, ref });
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
export {
|
|
31
|
+
PanelCard,
|
|
32
|
+
PanelCardFooter,
|
|
33
|
+
PanelCardHeader,
|
|
34
|
+
PanelCardSection
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const Root: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}, {
|
|
4
|
+
$highlighted: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const Header: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
7
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
8
|
+
}> & string;
|
|
9
|
+
export declare const HeaderMain: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
10
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
11
|
+
}> & string;
|
|
12
|
+
export declare const HeaderText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
13
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
14
|
+
}> & string;
|
|
15
|
+
export declare const HeaderTitle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
16
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
17
|
+
}> & string;
|
|
18
|
+
export declare const HeaderSubtitle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
19
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
20
|
+
}> & string;
|
|
21
|
+
export declare const HeaderTrailing: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
22
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
23
|
+
}> & string;
|
|
24
|
+
export declare const Section: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
25
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
26
|
+
}> & string;
|
|
27
|
+
export declare const Footer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
28
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
29
|
+
}> & string;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
3
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
|
+
const divider = `var(--panel-card-divider, 1px solid var(--stokr-border-subtle))`;
|
|
5
|
+
const Root = styled.div`
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
background: var(--panel-card-background, var(--stokr-background-default));
|
|
9
|
+
border: 1px solid
|
|
10
|
+
${({ $highlighted }) => $highlighted ? `var(--panel-card-highlight-color, var(--stokr-border-focus))` : `var(--panel-card-border-color, var(--stokr-border-subtle))`};
|
|
11
|
+
border-radius: var(--panel-card-radius, var(--stokr-radius-lg));
|
|
12
|
+
box-shadow: ${({ $highlighted }) => $highlighted ? `var(--panel-card-highlight-shadow, var(--stokr-elevation-md))` : "none"};
|
|
13
|
+
|
|
14
|
+
> * + * {
|
|
15
|
+
border-top: ${divider};
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
const Header = styled.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
gap: var(--panel-card-header-gap, var(--stokr-space-5));
|
|
23
|
+
padding: var(--panel-card-header-padding, var(--stokr-space-4));
|
|
24
|
+
|
|
25
|
+
${breakpoint.MLarge`
|
|
26
|
+
flex-direction: row;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
padding: var(--panel-card-header-padding, var(--stokr-space-6));
|
|
30
|
+
`}
|
|
31
|
+
`;
|
|
32
|
+
const HeaderMain = styled.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: var(--panel-card-header-leading-gap, var(--stokr-space-3));
|
|
36
|
+
min-width: 0;
|
|
37
|
+
`;
|
|
38
|
+
const HeaderText = styled.div`
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
`;
|
|
43
|
+
const HeaderTitle = styled.div`
|
|
44
|
+
${text("subtitleM")};
|
|
45
|
+
color: var(--stokr-text-primary);
|
|
46
|
+
`;
|
|
47
|
+
const HeaderSubtitle = styled.div`
|
|
48
|
+
${text("bodyS")};
|
|
49
|
+
color: var(--stokr-text-secondary);
|
|
50
|
+
`;
|
|
51
|
+
const HeaderTrailing = styled.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
flex: 0 0 auto;
|
|
55
|
+
`;
|
|
56
|
+
const Section = styled.div`
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
padding: var(--panel-card-section-padding, var(--stokr-space-4));
|
|
59
|
+
background: var(--panel-card-section-background, var(--stokr-background-default));
|
|
60
|
+
|
|
61
|
+
${breakpoint.MLarge`
|
|
62
|
+
padding: var(--panel-card-section-padding, var(--stokr-space-4) var(--stokr-space-6));
|
|
63
|
+
`}
|
|
64
|
+
`;
|
|
65
|
+
const Footer = styled.div`
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
padding: var(--panel-card-footer-padding, var(--stokr-space-3) var(--stokr-space-4));
|
|
68
|
+
background: var(--panel-card-footer-background, var(--stokr-background-surface));
|
|
69
|
+
|
|
70
|
+
${breakpoint.MLarge`
|
|
71
|
+
padding: var(--panel-card-footer-padding, var(--stokr-space-3) var(--stokr-space-6));
|
|
72
|
+
`}
|
|
73
|
+
`;
|
|
74
|
+
export {
|
|
75
|
+
Footer,
|
|
76
|
+
Header,
|
|
77
|
+
HeaderMain,
|
|
78
|
+
HeaderSubtitle,
|
|
79
|
+
HeaderText,
|
|
80
|
+
HeaderTitle,
|
|
81
|
+
HeaderTrailing,
|
|
82
|
+
Root,
|
|
83
|
+
Section
|
|
84
|
+
};
|
|
@@ -8,6 +8,7 @@ export declare const Label: import('styled-components/dist/types').IStyledCompon
|
|
|
8
8
|
isUp?: boolean;
|
|
9
9
|
active?: boolean;
|
|
10
10
|
error?: boolean;
|
|
11
|
+
$variant?: import('../..').FieldVariant;
|
|
11
12
|
}>, "as" | "forwardedAs"> & {
|
|
12
13
|
as?: import('styled-components').WebTarget;
|
|
13
14
|
forwardedAs?: import('styled-components').WebTarget;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StepProgressProps } from './StepProgress';
|
|
2
|
+
export interface StepCaptionInfo {
|
|
3
|
+
number: number;
|
|
4
|
+
total: number;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MobileStepProgressProps extends StepProgressProps {
|
|
8
|
+
/** Builds the "Step 2 of 5 — Title" caption (copy lives in the app). */
|
|
9
|
+
formatCaption: (info: StepCaptionInfo) => string;
|
|
10
|
+
}
|
|
11
|
+
/** Horizontal segment strip with a caption for the current step, for narrow screens. */
|
|
12
|
+
export declare const MobileStepProgress: ({ steps, formatCaption, className }: MobileStepProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Strip, Segments, Segment, Caption } from "./MobileStepProgress.styles.js";
|
|
3
|
+
const MobileStepProgress = ({ steps, formatCaption, className }) => {
|
|
4
|
+
const active = steps.find((step) => step.status === "active");
|
|
5
|
+
const last = steps[steps.length - 1];
|
|
6
|
+
const current = active ?? (last?.status === "done" ? last : void 0);
|
|
7
|
+
return /* @__PURE__ */ jsxs(Strip, { className, children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Segments, { children: steps.map((step) => /* @__PURE__ */ jsx(Segment, { $status: step.status }, step.id)) }),
|
|
9
|
+
current && /* @__PURE__ */ jsx(Caption, { children: formatCaption({ number: current.number, total: steps.length, title: current.title }) })
|
|
10
|
+
] });
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
MobileStepProgress
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StepStatus } from './StepProgress';
|
|
2
|
+
export declare const Strip: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
|
+
}> & string;
|
|
5
|
+
export declare const Segments: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
6
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
7
|
+
}> & string;
|
|
8
|
+
export declare const Segment: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
9
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
10
|
+
}, {
|
|
11
|
+
$status: StepStatus;
|
|
12
|
+
}>> & string;
|
|
13
|
+
export declare const Caption: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
|
|
14
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
15
|
+
}> & string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const SEGMENT_COLOR = {
|
|
3
|
+
done: "var(--stokr-action-accent-bg)",
|
|
4
|
+
active: "var(--stokr-text-primary)",
|
|
5
|
+
upcoming: "var(--stokr-border-default)"
|
|
6
|
+
};
|
|
7
|
+
const Strip = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
padding: 0 22px 12px;
|
|
12
|
+
`;
|
|
13
|
+
const Segments = styled.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: 12px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
`;
|
|
18
|
+
const Segment = styled.span`
|
|
19
|
+
flex: 1 0 0;
|
|
20
|
+
min-width: 1px;
|
|
21
|
+
height: 4px;
|
|
22
|
+
border-radius: 2px;
|
|
23
|
+
background: ${({ $status }) => SEGMENT_COLOR[$status]};
|
|
24
|
+
`;
|
|
25
|
+
const Caption = styled.p`
|
|
26
|
+
margin: 0;
|
|
27
|
+
font-size: 10px;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
letter-spacing: 1.2px;
|
|
30
|
+
text-transform: uppercase;
|
|
31
|
+
color: var(--stokr-text-secondary);
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
`;
|
|
36
|
+
export {
|
|
37
|
+
Caption,
|
|
38
|
+
Segment,
|
|
39
|
+
Segments,
|
|
40
|
+
Strip
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type StepStatus = 'done' | 'active' | 'upcoming';
|
|
2
|
+
export interface StepProgressItem {
|
|
3
|
+
id: string;
|
|
4
|
+
number: number;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
status: StepStatus;
|
|
8
|
+
}
|
|
9
|
+
export interface StepProgressProps {
|
|
10
|
+
steps: readonly StepProgressItem[];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Vertical step timeline for dark sidebars. */
|
|
14
|
+
export declare const StepProgress: ({ steps, className }: StepProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
|
|
3
|
+
import { List, Item, Marker, Line, ItemText, ItemTitle, ItemSubtitle } from "./StepProgress.styles.js";
|
|
4
|
+
const StepProgress = ({ steps, className }) => /* @__PURE__ */ jsx(List, { className, children: steps.map((step, index) => /* @__PURE__ */ jsxs(Item, { "data-status": step.status, "aria-current": step.status === "active" ? "step" : void 0, children: [
|
|
5
|
+
/* @__PURE__ */ jsx(Marker, { $status: step.status, children: step.status === "done" ? /* @__PURE__ */ jsx(MaterialIcon, { name: "check", weight: 600, size: "md" }) : step.number }),
|
|
6
|
+
index < steps.length - 1 && /* @__PURE__ */ jsx(Line, { $status: step.status }),
|
|
7
|
+
/* @__PURE__ */ jsxs(ItemText, { children: [
|
|
8
|
+
/* @__PURE__ */ jsx(ItemTitle, { $status: step.status, children: step.title }),
|
|
9
|
+
step.subtitle && /* @__PURE__ */ jsx(ItemSubtitle, { $status: step.status, children: step.subtitle })
|
|
10
|
+
] })
|
|
11
|
+
] }, step.id)) });
|
|
12
|
+
export {
|
|
13
|
+
StepProgress
|
|
14
|
+
};
|