oolib 2.110.1 → 2.111.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/UIContent/index.d.ts +17 -17
- package/dist/components/Accordion/index.d.ts +56 -13
- package/dist/components/Accordion/index.js +23 -31
- package/dist/components/Accordion/styled.d.ts +7 -7
- package/dist/components/Accordion/styled.js +7 -8
- package/dist/components/ActionMenu/index.js +2 -9
- package/dist/components/AudioInput/comps/AudioAction.d.ts +1 -1
- package/dist/components/AudioInput/comps/AudioPlayer.d.ts +1 -1
- package/dist/components/AudioInput/index.js +1 -1
- package/dist/components/Breadcrumbs/index.styled.d.ts +1 -1
- package/dist/components/Buttons/index.d.ts +32 -42
- package/dist/components/Buttons/index.js +3 -3
- package/dist/components/Coachmark/comps/MovingCoachmark/index.d.ts +3 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/index.js +68 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/styled.d.ts +2 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/styled.js +45 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/utils/index.d.ts +1 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/utils/index.js +57 -0
- package/dist/components/Coachmark/config.d.ts +31 -0
- package/dist/components/Coachmark/config.js +61 -0
- package/dist/components/Coachmark/index.d.ts +4 -0
- package/dist/components/Coachmark/index.js +74 -0
- package/dist/components/Coachmark/styled.d.ts +1 -0
- package/dist/components/Coachmark/styled.js +37 -0
- package/dist/components/Coachmark/utils/index.d.ts +13 -0
- package/dist/components/Coachmark/utils/index.js +70 -0
- package/dist/components/DateRangePicker/index.d.ts +1 -1
- package/dist/components/DateTimePicker/index.styled.d.ts +0 -0
- package/dist/components/DateTimePicker/index.styled.js +0 -0
- package/dist/components/Dropdowns/DropdownMulti/index.js +4 -28
- package/dist/components/Dropdowns/DropdownSingle/index.js +4 -28
- package/dist/components/Dropdowns/comps/OptionsMulti/index.js +3 -30
- package/dist/components/Dropdowns/comps/OptionsShell/index.js +1 -11
- package/dist/components/Dropdowns/comps/OptionsSingle/index.js +2 -34
- package/dist/components/Dropdowns/comps/SelectDropdown/index.js +1 -12
- package/dist/components/Dropdowns/comps/VirtualizedWrapper/index.d.ts +1 -1
- package/dist/components/Dropdowns/utils/isDynamicOtherOption.d.ts +0 -0
- package/dist/components/Dropdowns/utils/isDynamicOtherOption.js +0 -0
- package/dist/components/EmptyStates/index.js +1 -12
- package/dist/components/FileUploadWrapper/comps/FileUploadShell.d.ts +1 -1
- package/dist/components/FileUploadWrapper/index.d.ts +1 -1
- package/dist/components/FileUploadWrapper/index.js +1 -12
- package/dist/components/IFrameInput/comps/Embed.d.ts +1 -1
- package/dist/components/IFrameInput/index.js +2 -2
- package/dist/components/IFrameInput/utils/DisplayCoachmark.d.ts +7 -0
- package/dist/components/IFrameInput/utils/DisplayCoachmark.js +83 -0
- package/dist/components/ImageInput/comps/GallerySlider/index.js +1 -16
- package/dist/components/ImageInput/comps/ImageEditor/comps/ConfirmDeleteModal/index.d.ts +1 -1
- package/dist/components/ImageInput/comps/ImageEditor/index.js +9 -65
- package/dist/components/ImageInput/comps/Placeholder/index.js +1 -17
- package/dist/components/ImageInput/comps/Placeholder/styled.d.ts +3 -0
- package/dist/components/ImageInput/comps/Placeholder/styled.js +39 -0
- package/dist/components/ImageInput/comps/SingleImageInput/index.js +1 -32
- package/dist/components/ImageInput/derivedComps/ImageDisplayInMask/index.js +1 -1
- package/dist/components/ImageInput/index.js +3 -25
- package/dist/components/InlineAlert/index.d.ts +25 -8
- package/dist/components/InlineAlert/index.js +16 -1
- package/dist/components/LegendRadioCheckList/LegendButton/index.d.ts +10 -0
- package/dist/components/LegendRadioCheckList/LegendButton/index.js +18 -0
- package/dist/components/LegendRadioCheckList/LegendButton/styled.d.ts +3 -0
- package/dist/components/LegendRadioCheckList/LegendButton/styled.js +22 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/index.d.ts +8 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/index.js +49 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/styled.d.ts +0 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/styled.js +0 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/index.d.ts +8 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/index.js +34 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/styled.d.ts +1 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/styled.js +13 -0
- package/dist/components/Lexical/Plugins/TableCellResizer/index.js +1 -26
- package/dist/components/LoadersAndProgress/LoaderCircle/index.js +2 -2
- package/dist/components/LoadersAndProgress/SkeletonLoader/index.d.ts +1 -1
- package/dist/components/Margins/index.d.ts +1 -1
- package/dist/components/Modals/Modal/styled.d.ts +2 -2
- package/dist/components/Modals/ModalConfirm/styled.d.ts +2 -2
- package/dist/components/OKELink/comps/AvatarDisplay/index.d.ts +8 -0
- package/dist/components/OKELink/comps/AvatarDisplay/index.js +19 -0
- package/dist/components/OKELink/comps/AvatarDisplay/styled.d.ts +2 -0
- package/dist/components/OKELink/comps/AvatarDisplay/styled.js +48 -0
- package/dist/components/OKELink/index.d.ts +1 -1
- package/dist/components/OKELink/index.js +2 -5
- package/dist/components/OKELink/utils/index.d.ts +6 -0
- package/dist/components/OKELink/utils/index.js +20 -0
- package/dist/components/PDFInput/comps/PDFActions.d.ts +1 -1
- package/dist/components/PDFInput/index.js +1 -1
- package/dist/components/Paddings/index.d.ts +1 -1
- package/dist/components/PercentCompletedPie/index.d.ts +19 -5
- package/dist/components/PercentCompletedPie/index.js +15 -5
- package/dist/components/PercentCompletedPie/styled.d.ts +17 -5
- package/dist/components/PercentCompletedPie/styled.js +26 -6
- package/dist/components/Playground/index.d.ts +4 -0
- package/dist/components/Playground/index.js +17 -0
- package/dist/components/Playground/styled.d.ts +1 -0
- package/dist/components/Playground/styled.js +14 -0
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.d.ts +1 -1
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.js +1 -12
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.d.ts +1 -1
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.js +3 -20
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/index.js +11 -7
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.js +4 -25
- package/dist/components/RadioAndCheckbox/comps/RadioList/index.js +6 -6
- package/dist/components/ResourceInput/comp/ResourceDisplayBlock.d.ts +1 -1
- package/dist/components/ResourceInput/index.d.ts +1 -1
- package/dist/components/SimpleTable/index.js +5 -22
- package/dist/components/SimpleTable/utils/convertColHeaderConfigToRowData.js +1 -1
- package/dist/components/SimpleTable/utils/convertRowHeaderConfigToCellData.js +1 -1
- package/dist/components/SimpleTable/utils/prepInitValueFromConfigIfNoValue.js +2 -2
- package/dist/components/Switches/index.js +5 -11
- package/dist/components/Tags/index.d.ts +1 -1
- package/dist/components/Tags/index.styled.d.ts +1 -1
- package/dist/components/TimePicker/styled.d.ts +1 -1
- package/dist/components/TimeRangePicker/index.styled.d.ts +0 -0
- package/dist/components/TimeRangePicker/index.styled.js +0 -0
- package/dist/components/Tooltip/index.d.ts +2 -3
- package/dist/components/Typo/index.js +1 -1
- package/dist/components/VideoInput/comps/VideoActionMenu.d.ts +1 -1
- package/dist/components/VideoInput/index.d.ts +1 -1
- package/dist/components/VideoInput/index.js +2 -21
- package/dist/components/Wrappers/WrapperCardGrid.d.ts +2 -0
- package/dist/components/Wrappers/WrapperCardGrid.js +19 -0
- package/dist/components/Wrappers/index.d.ts +1 -1
- package/dist/components/Wrappers/index.js +1 -1
- package/dist/components/cards/ListProfile/styled.d.ts +7 -0
- package/dist/components/cards/ListProfile/styled.js +23 -0
- package/dist/components/cards/utils/parseCardConfig.js +1 -1
- package/dist/d3Modules/index.d.ts +1 -0
- package/dist/d3Modules/index.js +1 -1
- package/dist/icons/custom/index.d.ts +1 -0
- package/dist/icons/custom/index.js +6 -1
- package/dist/icons/index.d.ts +112 -110
- package/dist/icons/index.js +2 -1
- package/dist/stories/Accordion.stories.d.ts +78 -0
- package/dist/stories/Accordion.stories.js +93 -0
- package/dist/stories/ActionMenu.stories.d.ts +166 -0
- package/dist/stories/ActionMenu.stories.js +140 -0
- package/dist/stories/AudioInput.stories.d.ts +20 -0
- package/dist/stories/AudioInput.stories.js +67 -0
- package/dist/stories/Banner.stories.d.ts +97 -0
- package/dist/stories/Banner.stories.js +126 -0
- package/dist/stories/BarChart.stories.d.ts +13 -0
- package/dist/stories/BarChart.stories.js +61 -0
- package/dist/stories/BlockLabel.stories.d.ts +71 -0
- package/dist/stories/BlockLabel.stories.js +106 -0
- package/dist/stories/Breadcrumbs.stories.d.ts +13 -0
- package/dist/stories/Breadcrumbs.stories.js +34 -0
- package/dist/stories/Button.stories.d.ts +209 -0
- package/dist/stories/Button.stories.js +164 -0
- package/dist/stories/Checkbox.stories.d.ts +248 -0
- package/dist/stories/Checkbox.stories.js +249 -0
- package/dist/stories/Colors.stories.d.ts +6 -0
- package/dist/stories/Colors.stories.js +66 -0
- package/dist/stories/DatePicker.stories.d.ts +239 -0
- package/dist/stories/DatePicker.stories.js +267 -0
- package/dist/stories/Divider.stories.d.ts +8 -0
- package/dist/stories/Divider.stories.js +28 -0
- package/dist/stories/Dropdowns.stories.d.ts +114 -0
- package/dist/stories/Dropdowns.stories.js +280 -0
- package/dist/stories/EmptyStates.stories.d.ts +63 -0
- package/dist/stories/EmptyStates.stories.js +69 -0
- package/dist/stories/HomeCover.stories.d.ts +55 -0
- package/dist/stories/HomeCover.stories.js +68 -0
- package/dist/stories/IFrameInput.stories.d.ts +32 -0
- package/dist/stories/IFrameInput.stories.js +51 -0
- package/dist/stories/ImageInput/ImageInput.stories.d.ts +263 -0
- package/dist/stories/ImageInput/ImageInput.stories.js +167 -0
- package/dist/stories/ImageInput/imageInputArgTypes.d.ts +121 -0
- package/dist/stories/ImageInput/imageInputArgTypes.js +78 -0
- package/dist/stories/ImageInput/imageInputParseArgTypes.d.ts +17 -0
- package/dist/stories/ImageInput/imageInputParseArgTypes.js +31 -0
- package/dist/stories/InlineAlert.stories.d.ts +62 -0
- package/dist/stories/InlineAlert.stories.js +62 -0
- package/dist/stories/Layout.stories.d.ts +161 -0
- package/dist/stories/Layout.stories.js +183 -0
- package/dist/stories/LegendRadioList.stories.d.ts +15 -0
- package/dist/stories/LegendRadioList.stories.js +73 -0
- package/dist/stories/Loaders.stories.d.ts +77 -0
- package/dist/stories/Loaders.stories.js +74 -0
- package/dist/stories/Modal.stories.d.ts +135 -0
- package/dist/stories/Modal.stories.js +146 -0
- package/dist/stories/ModalConfirmAction.stories.d.ts +13 -0
- package/dist/stories/ModalConfirmAction.stories.js +47 -0
- package/dist/stories/OKELink.stories.d.ts +72 -0
- package/dist/stories/OKELink.stories.js +110 -0
- package/dist/stories/PDFInput.stories.d.ts +20 -0
- package/dist/stories/PDFInput.stories.js +45 -0
- package/dist/stories/PageScrollIndicator.stories.d.ts +15 -0
- package/dist/stories/PageScrollIndicator.stories.js +26 -0
- package/dist/stories/PercentCompletedPi.stories.d.ts +55 -0
- package/dist/stories/PercentCompletedPi.stories.js +49 -0
- package/dist/stories/Playground.stories.d.ts +22 -0
- package/dist/stories/Playground.stories.js +26 -0
- package/dist/stories/Progress.stories.d.ts +45 -0
- package/dist/stories/Progress.stories.js +50 -0
- package/dist/stories/RadioButton.stories.d.ts +260 -0
- package/dist/stories/RadioButton.stories.js +264 -0
- package/dist/stories/ResourceInput.stories.d.ts +9 -0
- package/dist/stories/ResourceInput.stories.js +53 -0
- package/dist/stories/SimpleTable.stories.d.ts +65 -0
- package/dist/stories/SimpleTable.stories.js +111 -0
- package/dist/stories/SkeletonLoader.stories.d.ts +81 -0
- package/dist/stories/SkeletonLoader.stories.js +82 -0
- package/dist/stories/Switches.stories.d.ts +106 -0
- package/dist/stories/Switches.stories.js +136 -0
- package/dist/stories/TabBar.stories.d.ts +73 -0
- package/dist/stories/TabBar.stories.js +103 -0
- package/dist/stories/TagClear.stories.d.ts +57 -0
- package/dist/stories/TagClear.stories.js +76 -0
- package/dist/stories/TagDisplay.stories.d.ts +73 -0
- package/dist/stories/TagDisplay.stories.js +154 -0
- package/dist/stories/TagLink.stories.d.ts +59 -0
- package/dist/stories/TagLink.stories.js +65 -0
- package/dist/stories/TagSelect.stories.d.ts +41 -0
- package/dist/stories/TagSelect.stories.js +54 -0
- package/dist/stories/TagsInput.stories.d.ts +90 -0
- package/dist/stories/TagsInput.stories.js +168 -0
- package/dist/stories/TextInputs.stories.d.ts +124 -0
- package/dist/stories/TextInputs.stories.js +178 -0
- package/dist/stories/Tooltip.stories.d.ts +41 -0
- package/dist/stories/Tooltip.stories.js +78 -0
- package/dist/stories/Typo.stories.d.ts +304 -0
- package/dist/stories/Typo.stories.js +357 -0
- package/dist/stories/UserRoleBadge.stories.d.ts +19 -0
- package/dist/stories/UserRoleBadge.stories.js +46 -0
- package/dist/stories/Utilities.stories.d.ts +5 -0
- package/dist/stories/Utilities.stories.js +110 -0
- package/dist/stories/VideoInput.stories.d.ts +46 -0
- package/dist/stories/VideoInput.stories.js +49 -0
- package/dist/stories/cards/CardContent.stories.d.ts +67 -0
- package/dist/stories/cards/CardContent.stories.js +47 -0
- package/dist/stories/cards/CardEmbed.stories.d.ts +65 -0
- package/dist/stories/cards/CardEmbed.stories.js +46 -0
- package/dist/stories/cards/CardProfile.stories.d.ts +46 -0
- package/dist/stories/cards/CardProfile.stories.js +48 -0
- package/dist/stories/cards/ListContent.stories.d.ts +81 -0
- package/dist/stories/cards/ListContent.stories.js +50 -0
- package/dist/stories/cards/ListProfile.stories.d.ts +41 -0
- package/dist/stories/cards/ListProfile.stories.js +46 -0
- package/dist/stories/cards/utils/cardArgTypes.d.ts +182 -0
- package/dist/stories/cards/utils/cardArgTypes.js +114 -0
- package/dist/stories/cards/utils/parseCardArgs.d.ts +46 -0
- package/dist/stories/cards/utils/parseCardArgs.js +57 -0
- package/dist/themes/colors.d.ts +51 -0
- package/dist/utils/comps/DisplayIcon/index.d.ts +1 -1
- package/dist/utils/getBlockLabelProps.js +1 -1
- package/dist/utils/getterSetterDeleter/getVal_caseExamples.d.ts +60 -0
- package/dist/utils/getterSetterDeleter/getVal_caseExamples.js +91 -0
- package/dist/utilsOolib/StorybookBannersWrapper.d.ts +2 -0
- package/dist/utilsOolib/StorybookBannersWrapper.js +16 -0
- package/dist/utilsOolib/excludeKeys.d.ts +8 -0
- package/dist/utilsOolib/excludeKeys.js +31 -0
- package/dist/utilsOolib/genRandomHash.d.ts +7 -0
- package/dist/utilsOolib/genRandomHash.js +19 -0
- package/dist/utilsOolib/index.d.ts +12 -5
- package/dist/utilsOolib/index.js +11 -3
- package/dist/utilsOolib/renderRTEPlaceholderForOolibPreview.d.ts +8 -1
- package/dist/utilsOolib/renderRTEPlaceholderForOolibPreview.js +1 -2
- package/package.json +4 -3
- /package/dist/components/Buttons/{index.styled.d.ts → styled.d.ts} +0 -0
- /package/dist/components/Buttons/{index.styled.js → styled.js} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
}
|
|
4
|
+
export default _default;
|
|
5
|
+
export namespace ImageInput {
|
|
6
|
+
let argTypes: Omit<{
|
|
7
|
+
containerShape: {
|
|
8
|
+
name: string;
|
|
9
|
+
control: string;
|
|
10
|
+
options: string[];
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
name: string;
|
|
14
|
+
control: string;
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
17
|
+
aspectRatio: {
|
|
18
|
+
name: string;
|
|
19
|
+
control: string;
|
|
20
|
+
};
|
|
21
|
+
defaultImageSpread: {
|
|
22
|
+
name: string;
|
|
23
|
+
control: string;
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
invert: {
|
|
27
|
+
name: string;
|
|
28
|
+
control: string;
|
|
29
|
+
};
|
|
30
|
+
dropzoneLabel: {
|
|
31
|
+
name: string;
|
|
32
|
+
control: string;
|
|
33
|
+
};
|
|
34
|
+
dropzoneLabelMultiple: {
|
|
35
|
+
name: string;
|
|
36
|
+
control: string;
|
|
37
|
+
};
|
|
38
|
+
dropzoneSublabel: {
|
|
39
|
+
name: string;
|
|
40
|
+
control: string;
|
|
41
|
+
if: {
|
|
42
|
+
arg: string;
|
|
43
|
+
neq: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readOnly: {
|
|
47
|
+
name: string;
|
|
48
|
+
control: string;
|
|
49
|
+
};
|
|
50
|
+
sizeProfile: {
|
|
51
|
+
name: string;
|
|
52
|
+
control: {
|
|
53
|
+
type: string;
|
|
54
|
+
min: number;
|
|
55
|
+
max: number;
|
|
56
|
+
step: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
imageTitle: {
|
|
60
|
+
name: string;
|
|
61
|
+
control: string;
|
|
62
|
+
};
|
|
63
|
+
optionalLabel: {
|
|
64
|
+
name: string;
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
enableCaptions: {
|
|
68
|
+
name: string;
|
|
69
|
+
type: string;
|
|
70
|
+
};
|
|
71
|
+
}, "imageTitle" | "dropzoneLabelMultiple" | "sizeProfile">;
|
|
72
|
+
let args: Omit<{
|
|
73
|
+
containerShape: string;
|
|
74
|
+
size: string;
|
|
75
|
+
optionalLabel: boolean;
|
|
76
|
+
enableCaptions: boolean;
|
|
77
|
+
aspectRatio: string;
|
|
78
|
+
defaultImageSpread: string;
|
|
79
|
+
dropzoneLabel: string;
|
|
80
|
+
dropzoneSublabel: string;
|
|
81
|
+
dropzoneLabelMultiple: string;
|
|
82
|
+
sizeProfile: number;
|
|
83
|
+
imageTitle: string;
|
|
84
|
+
readOnly: boolean;
|
|
85
|
+
invert: boolean;
|
|
86
|
+
}, "imageTitle" | "dropzoneLabelMultiple" | "sizeProfile">;
|
|
87
|
+
function render(args: any): React.JSX.Element;
|
|
88
|
+
}
|
|
89
|
+
export namespace ImageGallery {
|
|
90
|
+
let argTypes_1: Omit<{
|
|
91
|
+
containerShape: {
|
|
92
|
+
name: string;
|
|
93
|
+
control: string;
|
|
94
|
+
options: string[];
|
|
95
|
+
};
|
|
96
|
+
size: {
|
|
97
|
+
name: string;
|
|
98
|
+
control: string;
|
|
99
|
+
options: string[];
|
|
100
|
+
};
|
|
101
|
+
aspectRatio: {
|
|
102
|
+
name: string;
|
|
103
|
+
control: string;
|
|
104
|
+
};
|
|
105
|
+
defaultImageSpread: {
|
|
106
|
+
name: string;
|
|
107
|
+
control: string;
|
|
108
|
+
options: string[];
|
|
109
|
+
};
|
|
110
|
+
invert: {
|
|
111
|
+
name: string;
|
|
112
|
+
control: string;
|
|
113
|
+
};
|
|
114
|
+
dropzoneLabel: {
|
|
115
|
+
name: string;
|
|
116
|
+
control: string;
|
|
117
|
+
};
|
|
118
|
+
dropzoneLabelMultiple: {
|
|
119
|
+
name: string;
|
|
120
|
+
control: string;
|
|
121
|
+
};
|
|
122
|
+
dropzoneSublabel: {
|
|
123
|
+
name: string;
|
|
124
|
+
control: string;
|
|
125
|
+
if: {
|
|
126
|
+
arg: string;
|
|
127
|
+
neq: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
readOnly: {
|
|
131
|
+
name: string;
|
|
132
|
+
control: string;
|
|
133
|
+
};
|
|
134
|
+
sizeProfile: {
|
|
135
|
+
name: string;
|
|
136
|
+
control: {
|
|
137
|
+
type: string;
|
|
138
|
+
min: number;
|
|
139
|
+
max: number;
|
|
140
|
+
step: number;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
imageTitle: {
|
|
144
|
+
name: string;
|
|
145
|
+
control: string;
|
|
146
|
+
};
|
|
147
|
+
optionalLabel: {
|
|
148
|
+
name: string;
|
|
149
|
+
type: string;
|
|
150
|
+
};
|
|
151
|
+
enableCaptions: {
|
|
152
|
+
name: string;
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
}, "dropzoneLabel" | "imageTitle" | "sizeProfile">;
|
|
156
|
+
export { argTypes_1 as argTypes };
|
|
157
|
+
let args_1: Omit<{
|
|
158
|
+
containerShape: string;
|
|
159
|
+
size: string;
|
|
160
|
+
optionalLabel: boolean;
|
|
161
|
+
enableCaptions: boolean;
|
|
162
|
+
aspectRatio: string;
|
|
163
|
+
defaultImageSpread: string;
|
|
164
|
+
dropzoneLabel: string;
|
|
165
|
+
dropzoneSublabel: string;
|
|
166
|
+
dropzoneLabelMultiple: string;
|
|
167
|
+
sizeProfile: number;
|
|
168
|
+
imageTitle: string;
|
|
169
|
+
readOnly: boolean;
|
|
170
|
+
invert: boolean;
|
|
171
|
+
}, "dropzoneLabel" | "imageTitle" | "sizeProfile">;
|
|
172
|
+
export { args_1 as args };
|
|
173
|
+
export function render_1(args: any): React.JSX.Element;
|
|
174
|
+
export { render_1 as render };
|
|
175
|
+
}
|
|
176
|
+
export namespace ProfileImageInput {
|
|
177
|
+
let argTypes_2: Omit<{
|
|
178
|
+
containerShape: {
|
|
179
|
+
name: string;
|
|
180
|
+
control: string;
|
|
181
|
+
options: string[];
|
|
182
|
+
};
|
|
183
|
+
size: {
|
|
184
|
+
name: string;
|
|
185
|
+
control: string;
|
|
186
|
+
options: string[];
|
|
187
|
+
};
|
|
188
|
+
aspectRatio: {
|
|
189
|
+
name: string;
|
|
190
|
+
control: string;
|
|
191
|
+
};
|
|
192
|
+
defaultImageSpread: {
|
|
193
|
+
name: string;
|
|
194
|
+
control: string;
|
|
195
|
+
options: string[];
|
|
196
|
+
};
|
|
197
|
+
invert: {
|
|
198
|
+
name: string;
|
|
199
|
+
control: string;
|
|
200
|
+
};
|
|
201
|
+
dropzoneLabel: {
|
|
202
|
+
name: string;
|
|
203
|
+
control: string;
|
|
204
|
+
};
|
|
205
|
+
dropzoneLabelMultiple: {
|
|
206
|
+
name: string;
|
|
207
|
+
control: string;
|
|
208
|
+
};
|
|
209
|
+
dropzoneSublabel: {
|
|
210
|
+
name: string;
|
|
211
|
+
control: string;
|
|
212
|
+
if: {
|
|
213
|
+
arg: string;
|
|
214
|
+
neq: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
readOnly: {
|
|
218
|
+
name: string;
|
|
219
|
+
control: string;
|
|
220
|
+
};
|
|
221
|
+
sizeProfile: {
|
|
222
|
+
name: string;
|
|
223
|
+
control: {
|
|
224
|
+
type: string;
|
|
225
|
+
min: number;
|
|
226
|
+
max: number;
|
|
227
|
+
step: number;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
imageTitle: {
|
|
231
|
+
name: string;
|
|
232
|
+
control: string;
|
|
233
|
+
};
|
|
234
|
+
optionalLabel: {
|
|
235
|
+
name: string;
|
|
236
|
+
type: string;
|
|
237
|
+
};
|
|
238
|
+
enableCaptions: {
|
|
239
|
+
name: string;
|
|
240
|
+
type: string;
|
|
241
|
+
};
|
|
242
|
+
}, "size" | "aspectRatio" | "enableCaptions" | "defaultImageSpread" | "containerShape" | "dropzoneLabel" | "dropzoneSublabel" | "dropzoneLabelMultiple" | "optionalLabel">;
|
|
243
|
+
export { argTypes_2 as argTypes };
|
|
244
|
+
let args_2: Omit<{
|
|
245
|
+
containerShape: string;
|
|
246
|
+
size: string;
|
|
247
|
+
optionalLabel: boolean;
|
|
248
|
+
enableCaptions: boolean;
|
|
249
|
+
aspectRatio: string;
|
|
250
|
+
defaultImageSpread: string;
|
|
251
|
+
dropzoneLabel: string;
|
|
252
|
+
dropzoneSublabel: string;
|
|
253
|
+
dropzoneLabelMultiple: string;
|
|
254
|
+
sizeProfile: number;
|
|
255
|
+
imageTitle: string;
|
|
256
|
+
readOnly: boolean;
|
|
257
|
+
invert: boolean;
|
|
258
|
+
}, "size" | "aspectRatio" | "enableCaptions" | "defaultImageSpread" | "containerShape" | "dropzoneLabel" | "dropzoneSublabel" | "dropzoneLabelMultiple" | "optionalLabel">;
|
|
259
|
+
export { args_2 as args };
|
|
260
|
+
export function render_2(args: any): React.JSX.Element;
|
|
261
|
+
export { render_2 as render };
|
|
262
|
+
}
|
|
263
|
+
import React from "react";
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ProfileImageInput = exports.ImageGallery = exports.ImageInput = void 0;
|
|
38
|
+
var react_1 = __importStar(require("react"));
|
|
39
|
+
var Container_1 = require("../../components/Container");
|
|
40
|
+
var Paddings_1 = require("../../components/Paddings");
|
|
41
|
+
var ImageInput_1 = require("../../components/ImageInput");
|
|
42
|
+
var ProfileImageInput_1 = require("../../components/ImageInput/derivedComps/ProfileImageInput");
|
|
43
|
+
var themes_1 = require("../../themes");
|
|
44
|
+
var imageInputArgTypes_1 = require("./imageInputArgTypes");
|
|
45
|
+
var imageInputParseArgTypes_1 = require("./imageInputParseArgTypes");
|
|
46
|
+
var genRandomHash_1 = require("../../utilsOolib/genRandomHash");
|
|
47
|
+
var excludeKeys_1 = require("../../utilsOolib/excludeKeys");
|
|
48
|
+
exports.default = {
|
|
49
|
+
title: "Components/ImageInput",
|
|
50
|
+
};
|
|
51
|
+
var ImageInput_ = function (args) {
|
|
52
|
+
var _a = (0, react_1.useState)(undefined), val = _a[0], setVal = _a[1];
|
|
53
|
+
var props = __assign(__assign({}, (0, imageInputParseArgTypes_1.imageInputParseArgTypes)({
|
|
54
|
+
args: args,
|
|
55
|
+
})), { value: val, onChange: function (k, v) { return setVal(v); } });
|
|
56
|
+
console.log({ value: val });
|
|
57
|
+
/**
|
|
58
|
+
* very important, in order to force the component to rerender
|
|
59
|
+
* when things like aspect ratio are changed.
|
|
60
|
+
* cuz natively, its not possible to modify the aspect ratio of
|
|
61
|
+
* an image input after it has rerendered.
|
|
62
|
+
* Hence this hack
|
|
63
|
+
*/
|
|
64
|
+
var key = (0, genRandomHash_1.genRandomHash)(10);
|
|
65
|
+
return (react_1.default.createElement("div", { style: {
|
|
66
|
+
backgroundColor: props.invert ? themes_1.colors.greyColor100 : themes_1.colors.white,
|
|
67
|
+
} },
|
|
68
|
+
react_1.default.createElement(Container_1.Container, null,
|
|
69
|
+
react_1.default.createElement(Paddings_1.PaddingTopBottom30, null,
|
|
70
|
+
react_1.default.createElement("div", { style: { width: props.size } },
|
|
71
|
+
react_1.default.createElement(ImageInput_1.ImageInput, __assign({ key: key }, props)))))));
|
|
72
|
+
};
|
|
73
|
+
exports.ImageInput = {
|
|
74
|
+
argTypes: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgTypes, [
|
|
75
|
+
"dropzoneLabelMultiple",
|
|
76
|
+
"sizeProfile",
|
|
77
|
+
"imageTitle",
|
|
78
|
+
]),
|
|
79
|
+
args: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgs, [
|
|
80
|
+
"dropzoneLabelMultiple",
|
|
81
|
+
"sizeProfile",
|
|
82
|
+
"imageTitle",
|
|
83
|
+
]),
|
|
84
|
+
render: function (args) { return react_1.default.createElement(ImageInput_, __assign({}, args)); },
|
|
85
|
+
};
|
|
86
|
+
var ImageGallery_ = function (args) {
|
|
87
|
+
var _a = (0, react_1.useState)(undefined), val = _a[0], setVal = _a[1];
|
|
88
|
+
var props = __assign(__assign({}, (0, imageInputParseArgTypes_1.imageInputParseArgTypes)({
|
|
89
|
+
args: args,
|
|
90
|
+
isImageSlider: true,
|
|
91
|
+
})), { value: val, onChange: function (k, v) { return setVal(v); } });
|
|
92
|
+
/**
|
|
93
|
+
* very important, in order to force the component to rerender
|
|
94
|
+
* when things like aspect ratio are changed.
|
|
95
|
+
* cuz natively, its not possible to modify the aspect ratio of
|
|
96
|
+
* an image input after it has rerendered.
|
|
97
|
+
* Hence this hack
|
|
98
|
+
*/
|
|
99
|
+
var key = (0, genRandomHash_1.genRandomHash)(10);
|
|
100
|
+
return (react_1.default.createElement("div", { style: {
|
|
101
|
+
backgroundColor: props.invert ? themes_1.colors.greyColor100 : themes_1.colors.white,
|
|
102
|
+
} },
|
|
103
|
+
react_1.default.createElement(Container_1.Container, null,
|
|
104
|
+
react_1.default.createElement(Paddings_1.PaddingTopBottom30, null,
|
|
105
|
+
react_1.default.createElement("div", { style: { width: props.size } },
|
|
106
|
+
react_1.default.createElement(ImageInput_1.ImageInput, __assign({ key: key }, props, { multiple: true })))))));
|
|
107
|
+
};
|
|
108
|
+
exports.ImageGallery = {
|
|
109
|
+
argTypes: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgTypes, [
|
|
110
|
+
"dropzoneLabel",
|
|
111
|
+
"sizeProfile",
|
|
112
|
+
"imageTitle",
|
|
113
|
+
]),
|
|
114
|
+
args: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgs, [
|
|
115
|
+
"dropzoneLabel",
|
|
116
|
+
"sizeProfile",
|
|
117
|
+
"imageTitle",
|
|
118
|
+
]),
|
|
119
|
+
render: function (args) { return react_1.default.createElement(ImageGallery_, __assign({}, args)); },
|
|
120
|
+
};
|
|
121
|
+
var ProfileImageInput_ = function (args) {
|
|
122
|
+
var _a = (0, react_1.useState)(undefined), val = _a[0], setVal = _a[1];
|
|
123
|
+
var props = __assign(__assign({}, (0, imageInputParseArgTypes_1.imageInputParseArgTypes)({
|
|
124
|
+
args: args,
|
|
125
|
+
isProfileImageInput: true,
|
|
126
|
+
})), { value: val, onChange: function (k, v) { return setVal(v); } });
|
|
127
|
+
/**
|
|
128
|
+
* very important, in order to force the component to rerender
|
|
129
|
+
* when things like aspect ratio are changed.
|
|
130
|
+
* cuz natively, its not possible to modify the aspect ratio of
|
|
131
|
+
* an image input after it has rerendered.
|
|
132
|
+
* Hence this hack
|
|
133
|
+
*/
|
|
134
|
+
var key = (0, genRandomHash_1.genRandomHash)(10);
|
|
135
|
+
return (react_1.default.createElement("div", { style: {
|
|
136
|
+
backgroundColor: props.invert ? themes_1.colors.greyColor100 : themes_1.colors.white,
|
|
137
|
+
} },
|
|
138
|
+
react_1.default.createElement(Container_1.Container, null,
|
|
139
|
+
react_1.default.createElement(Paddings_1.PaddingTopBottom30, null,
|
|
140
|
+
react_1.default.createElement("div", null,
|
|
141
|
+
react_1.default.createElement(ProfileImageInput_1.ProfileImageInput, __assign({ key: key }, props)))))));
|
|
142
|
+
};
|
|
143
|
+
exports.ProfileImageInput = {
|
|
144
|
+
argTypes: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgTypes, [
|
|
145
|
+
"containerShape",
|
|
146
|
+
"defaultImageSpread",
|
|
147
|
+
"aspectRatio",
|
|
148
|
+
"dropzoneLabel",
|
|
149
|
+
"dropzoneLabelMultiple",
|
|
150
|
+
"dropzoneSublabel",
|
|
151
|
+
"size",
|
|
152
|
+
"optionalLabel",
|
|
153
|
+
"enableCaptions"
|
|
154
|
+
]),
|
|
155
|
+
args: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgs, [
|
|
156
|
+
"containerShape",
|
|
157
|
+
"defaultImageSpread",
|
|
158
|
+
"aspectRatio",
|
|
159
|
+
"dropzoneLabel",
|
|
160
|
+
"dropzoneLabelMultiple",
|
|
161
|
+
"dropzoneSublabel",
|
|
162
|
+
"size",
|
|
163
|
+
"optionalLabel",
|
|
164
|
+
"enableCaptions"
|
|
165
|
+
]),
|
|
166
|
+
render: function (args) { return react_1.default.createElement(ProfileImageInput_, __assign({}, args)); },
|
|
167
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export namespace imageInputArgTypes {
|
|
2
|
+
namespace containerShape {
|
|
3
|
+
let name: string;
|
|
4
|
+
let control: string;
|
|
5
|
+
let options: string[];
|
|
6
|
+
}
|
|
7
|
+
namespace size {
|
|
8
|
+
let name_1: string;
|
|
9
|
+
export { name_1 as name };
|
|
10
|
+
let control_1: string;
|
|
11
|
+
export { control_1 as control };
|
|
12
|
+
let options_1: string[];
|
|
13
|
+
export { options_1 as options };
|
|
14
|
+
}
|
|
15
|
+
namespace aspectRatio {
|
|
16
|
+
let name_2: string;
|
|
17
|
+
export { name_2 as name };
|
|
18
|
+
let control_2: string;
|
|
19
|
+
export { control_2 as control };
|
|
20
|
+
}
|
|
21
|
+
namespace defaultImageSpread {
|
|
22
|
+
let name_3: string;
|
|
23
|
+
export { name_3 as name };
|
|
24
|
+
let control_3: string;
|
|
25
|
+
export { control_3 as control };
|
|
26
|
+
let options_2: string[];
|
|
27
|
+
export { options_2 as options };
|
|
28
|
+
}
|
|
29
|
+
namespace invert {
|
|
30
|
+
let name_4: string;
|
|
31
|
+
export { name_4 as name };
|
|
32
|
+
let control_4: string;
|
|
33
|
+
export { control_4 as control };
|
|
34
|
+
}
|
|
35
|
+
namespace dropzoneLabel {
|
|
36
|
+
let name_5: string;
|
|
37
|
+
export { name_5 as name };
|
|
38
|
+
let control_5: string;
|
|
39
|
+
export { control_5 as control };
|
|
40
|
+
}
|
|
41
|
+
namespace dropzoneLabelMultiple {
|
|
42
|
+
let name_6: string;
|
|
43
|
+
export { name_6 as name };
|
|
44
|
+
let control_6: string;
|
|
45
|
+
export { control_6 as control };
|
|
46
|
+
}
|
|
47
|
+
namespace dropzoneSublabel {
|
|
48
|
+
let name_7: string;
|
|
49
|
+
export { name_7 as name };
|
|
50
|
+
let control_7: string;
|
|
51
|
+
export { control_7 as control };
|
|
52
|
+
export namespace _if {
|
|
53
|
+
let arg: string;
|
|
54
|
+
let neq: string;
|
|
55
|
+
}
|
|
56
|
+
export { _if as if };
|
|
57
|
+
}
|
|
58
|
+
namespace readOnly {
|
|
59
|
+
let name_8: string;
|
|
60
|
+
export { name_8 as name };
|
|
61
|
+
let control_8: string;
|
|
62
|
+
export { control_8 as control };
|
|
63
|
+
}
|
|
64
|
+
namespace sizeProfile {
|
|
65
|
+
let name_9: string;
|
|
66
|
+
export { name_9 as name };
|
|
67
|
+
export namespace control_9 {
|
|
68
|
+
let type: string;
|
|
69
|
+
let min: number;
|
|
70
|
+
let max: number;
|
|
71
|
+
let step: number;
|
|
72
|
+
}
|
|
73
|
+
export { control_9 as control };
|
|
74
|
+
}
|
|
75
|
+
namespace imageTitle {
|
|
76
|
+
let name_10: string;
|
|
77
|
+
export { name_10 as name };
|
|
78
|
+
let control_10: string;
|
|
79
|
+
export { control_10 as control };
|
|
80
|
+
}
|
|
81
|
+
namespace optionalLabel {
|
|
82
|
+
let name_11: string;
|
|
83
|
+
export { name_11 as name };
|
|
84
|
+
let type_1: string;
|
|
85
|
+
export { type_1 as type };
|
|
86
|
+
}
|
|
87
|
+
namespace enableCaptions {
|
|
88
|
+
let name_12: string;
|
|
89
|
+
export { name_12 as name };
|
|
90
|
+
let type_2: string;
|
|
91
|
+
export { type_2 as type };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export namespace imageInputArgs {
|
|
95
|
+
let containerShape_1: string;
|
|
96
|
+
export { containerShape_1 as containerShape };
|
|
97
|
+
let size_1: string;
|
|
98
|
+
export { size_1 as size };
|
|
99
|
+
let optionalLabel_1: boolean;
|
|
100
|
+
export { optionalLabel_1 as optionalLabel };
|
|
101
|
+
let enableCaptions_1: boolean;
|
|
102
|
+
export { enableCaptions_1 as enableCaptions };
|
|
103
|
+
let aspectRatio_1: string;
|
|
104
|
+
export { aspectRatio_1 as aspectRatio };
|
|
105
|
+
let defaultImageSpread_1: string;
|
|
106
|
+
export { defaultImageSpread_1 as defaultImageSpread };
|
|
107
|
+
let dropzoneLabel_1: string;
|
|
108
|
+
export { dropzoneLabel_1 as dropzoneLabel };
|
|
109
|
+
let dropzoneSublabel_1: string;
|
|
110
|
+
export { dropzoneSublabel_1 as dropzoneSublabel };
|
|
111
|
+
let dropzoneLabelMultiple_1: string;
|
|
112
|
+
export { dropzoneLabelMultiple_1 as dropzoneLabelMultiple };
|
|
113
|
+
let sizeProfile_1: number;
|
|
114
|
+
export { sizeProfile_1 as sizeProfile };
|
|
115
|
+
let imageTitle_1: string;
|
|
116
|
+
export { imageTitle_1 as imageTitle };
|
|
117
|
+
let readOnly_1: boolean;
|
|
118
|
+
export { readOnly_1 as readOnly };
|
|
119
|
+
let invert_1: boolean;
|
|
120
|
+
export { invert_1 as invert };
|
|
121
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.imageInputArgs = exports.imageInputArgTypes = void 0;
|
|
4
|
+
exports.imageInputArgTypes = {
|
|
5
|
+
containerShape: {
|
|
6
|
+
name: ' Input Shape',
|
|
7
|
+
control: 'select',
|
|
8
|
+
options: ['Rectangle', 'Circle']
|
|
9
|
+
},
|
|
10
|
+
size: {
|
|
11
|
+
name: 'Size',
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['Large', 'Small']
|
|
14
|
+
},
|
|
15
|
+
aspectRatio: {
|
|
16
|
+
name: 'Aspect Ratio',
|
|
17
|
+
control: 'text',
|
|
18
|
+
},
|
|
19
|
+
defaultImageSpread: {
|
|
20
|
+
name: 'Default Image Spread',
|
|
21
|
+
control: 'select',
|
|
22
|
+
options: ['Cover', 'Contain']
|
|
23
|
+
},
|
|
24
|
+
invert: {
|
|
25
|
+
name: 'Invert',
|
|
26
|
+
control: 'boolean'
|
|
27
|
+
},
|
|
28
|
+
dropzoneLabel: {
|
|
29
|
+
name: 'Dropzone Label',
|
|
30
|
+
control: 'text',
|
|
31
|
+
},
|
|
32
|
+
dropzoneLabelMultiple: {
|
|
33
|
+
name: 'Dropzone Label',
|
|
34
|
+
control: 'text',
|
|
35
|
+
},
|
|
36
|
+
dropzoneSublabel: {
|
|
37
|
+
name: 'Dropzone Sub-Label',
|
|
38
|
+
control: 'text',
|
|
39
|
+
if: { arg: 'size', neq: 'Small' }
|
|
40
|
+
},
|
|
41
|
+
readOnly: {
|
|
42
|
+
name: 'Read Only',
|
|
43
|
+
control: 'boolean'
|
|
44
|
+
},
|
|
45
|
+
//profile image input related
|
|
46
|
+
sizeProfile: {
|
|
47
|
+
name: 'Size',
|
|
48
|
+
control: { type: 'range', min: 0, max: 1000, step: 10 },
|
|
49
|
+
},
|
|
50
|
+
imageTitle: {
|
|
51
|
+
name: 'Profile Image Title',
|
|
52
|
+
control: 'text'
|
|
53
|
+
},
|
|
54
|
+
optionalLabel: {
|
|
55
|
+
name: 'Optional Label',
|
|
56
|
+
type: 'boolean'
|
|
57
|
+
},
|
|
58
|
+
enableCaptions: {
|
|
59
|
+
name: 'Captions',
|
|
60
|
+
type: 'boolean'
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
exports.imageInputArgs = {
|
|
64
|
+
containerShape: 'Rectangle',
|
|
65
|
+
size: 'Large',
|
|
66
|
+
optionalLabel: false,
|
|
67
|
+
enableCaptions: true,
|
|
68
|
+
aspectRatio: '5:3',
|
|
69
|
+
defaultImageSpread: 'Cover',
|
|
70
|
+
dropzoneLabel: 'Add Image',
|
|
71
|
+
dropzoneSublabel: 'Supports: <allowed formats>',
|
|
72
|
+
dropzoneLabelMultiple: 'Add Images ( max 10 )',
|
|
73
|
+
//profile image input related
|
|
74
|
+
sizeProfile: 200,
|
|
75
|
+
imageTitle: 'Placeholder Title',
|
|
76
|
+
readOnly: false,
|
|
77
|
+
invert: false,
|
|
78
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function imageInputParseArgTypes({ args, isImageSlider, isProfileImageInput }: {
|
|
2
|
+
args: any;
|
|
3
|
+
isImageSlider?: boolean;
|
|
4
|
+
isProfileImageInput?: boolean;
|
|
5
|
+
}): {
|
|
6
|
+
containerShape: any;
|
|
7
|
+
size: any;
|
|
8
|
+
aspectRatio: any;
|
|
9
|
+
defaultImageSpread: any;
|
|
10
|
+
invert: any;
|
|
11
|
+
dropzoneLabel: any;
|
|
12
|
+
dropzoneSublabel: any;
|
|
13
|
+
readOnly: any;
|
|
14
|
+
imageTitle: any;
|
|
15
|
+
isRequired: boolean;
|
|
16
|
+
enableCaptions: any;
|
|
17
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.imageInputParseArgTypes = void 0;
|
|
4
|
+
function isNumeric(str) {
|
|
5
|
+
return /^\d+$/.test(str);
|
|
6
|
+
}
|
|
7
|
+
var imageInputParseArgTypes = function (_a) {
|
|
8
|
+
var args = _a.args, _b = _a.isImageSlider, isImageSlider = _b === void 0 ? false : _b, _c = _a.isProfileImageInput, isProfileImageInput = _c === void 0 ? false : _c;
|
|
9
|
+
var _containerShape = args.containerShape, _size = args.size, _aspectRatio = args.aspectRatio, _defaultImageSpread = args.defaultImageSpread, invert = args.invert, _dropzoneLabel = args.dropzoneLabel, _dropzoneLabelMultiple = args.dropzoneLabelMultiple, dropzoneSublabel = args.dropzoneSublabel, readOnly = args.readOnly,
|
|
10
|
+
//profile image input related
|
|
11
|
+
sizeProfile = args.sizeProfile, imageTitle = args.imageTitle, optionalLabel = args.optionalLabel, enableCaptions = args.enableCaptions;
|
|
12
|
+
return ({
|
|
13
|
+
containerShape: _containerShape === null || _containerShape === void 0 ? void 0 : _containerShape.toLowerCase(),
|
|
14
|
+
size: isProfileImageInput
|
|
15
|
+
? sizeProfile
|
|
16
|
+
: _size === 'Small' ? '299px' : '650px',
|
|
17
|
+
aspectRatio: _aspectRatio && (isNumeric(_aspectRatio[0]) &&
|
|
18
|
+
_aspectRatio[1] === ':' &&
|
|
19
|
+
isNumeric(_aspectRatio[0])) ? _aspectRatio.replace(':', '/') : undefined,
|
|
20
|
+
defaultImageSpread: _defaultImageSpread === null || _defaultImageSpread === void 0 ? void 0 : _defaultImageSpread.toLowerCase(),
|
|
21
|
+
invert: invert,
|
|
22
|
+
dropzoneLabel: isImageSlider ? _dropzoneLabelMultiple : _dropzoneLabel,
|
|
23
|
+
dropzoneSublabel: dropzoneSublabel,
|
|
24
|
+
readOnly: readOnly,
|
|
25
|
+
//profile image input related
|
|
26
|
+
imageTitle: imageTitle,
|
|
27
|
+
isRequired: !optionalLabel,
|
|
28
|
+
enableCaptions: enableCaptions
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
exports.imageInputParseArgTypes = imageInputParseArgTypes;
|