oolib 2.208.0 → 2.208.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/DateRangePicker/index.js +2 -2
- package/dist/components/GroupQuestionsInputSingle/index.js +2 -2
- package/dist/components/IFrameInput/index.js +1 -1
- package/dist/components/ImageInput/comps/Placeholder/index.js +1 -1
- package/dist/components/SimpleTable/index.js +2 -2
- package/dist/components/VideoInput/comps/EmbedLinkModal.js +1 -1
- package/dist/components/cards/ListProfile/index.js +1 -1
- package/dist/index.d.ts +8 -9
- package/dist/index.js +25 -33
- package/dist/stories/Oolib/components/Modal.stories.js +2 -2
- package/dist/stories/Oolib/components/TagsInput.stories.js +1 -1
- package/dist/v2/components/DateRangePicker/index.js +1 -2
- package/dist/v2/components/TabBar/index.js +3 -3
- package/dist/v2/components/TextInputs/index.js +0 -7
- package/dist/v2/components/TextInputs/index.styled.js +1 -1
- package/package.json +1 -1
- package/dist/components/BlockLabel/index.d.ts +0 -2
- package/dist/components/BlockLabel/index.js +0 -75
- package/dist/components/BlockLabel/index.styled.d.ts +0 -2
- package/dist/components/BlockLabel/index.styled.js +0 -14
- package/dist/components/Dropdowns/DropdownMulti/index.d.ts +0 -38
- package/dist/components/Dropdowns/DropdownMulti/index.js +0 -179
- package/dist/components/Dropdowns/DropdownSingle/index.d.ts +0 -40
- package/dist/components/Dropdowns/DropdownSingle/index.js +0 -163
- package/dist/components/Dropdowns/comps/Caret/index.d.ts +0 -6
- package/dist/components/Dropdowns/comps/Caret/index.js +0 -19
- package/dist/components/Dropdowns/comps/Caret/styled.d.ts +0 -2
- package/dist/components/Dropdowns/comps/Caret/styled.js +0 -14
- package/dist/components/Dropdowns/comps/DisplayCompSingle/index.d.ts +0 -7
- package/dist/components/Dropdowns/comps/DisplayCompSingle/index.js +0 -39
- package/dist/components/Dropdowns/comps/NoOptionResultsComp/index.d.ts +0 -4
- package/dist/components/Dropdowns/comps/NoOptionResultsComp/index.js +0 -15
- package/dist/components/Dropdowns/comps/OptionContent/index.d.ts +0 -8
- package/dist/components/Dropdowns/comps/OptionContent/index.js +0 -34
- package/dist/components/Dropdowns/comps/OptionsMulti/index.d.ts +0 -28
- package/dist/components/Dropdowns/comps/OptionsMulti/index.js +0 -159
- package/dist/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/index.d.ts +0 -14
- package/dist/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/index.js +0 -81
- package/dist/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/styled.d.ts +0 -2
- package/dist/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/styled.js +0 -25
- package/dist/components/Dropdowns/comps/OptionsShell/index.d.ts +0 -2
- package/dist/components/Dropdowns/comps/OptionsShell/index.js +0 -101
- package/dist/components/Dropdowns/comps/OptionsShell/styled.d.ts +0 -5
- package/dist/components/Dropdowns/comps/OptionsShell/styled.js +0 -45
- package/dist/components/Dropdowns/comps/OptionsSingle/index.d.ts +0 -28
- package/dist/components/Dropdowns/comps/OptionsSingle/index.js +0 -105
- package/dist/components/Dropdowns/comps/OptionsSingle/styled.d.ts +0 -1
- package/dist/components/Dropdowns/comps/OptionsSingle/styled.js +0 -61
- package/dist/components/Dropdowns/comps/SelectDropdown/index.d.ts +0 -13
- package/dist/components/Dropdowns/comps/SelectDropdown/index.js +0 -54
- package/dist/components/Dropdowns/comps/SelectDropdown/styled.d.ts +0 -1
- package/dist/components/Dropdowns/comps/SelectDropdown/styled.js +0 -71
- package/dist/components/Dropdowns/comps/SelectTagsInput/index.d.ts +0 -18
- package/dist/components/Dropdowns/comps/SelectTagsInput/index.js +0 -124
- package/dist/components/Dropdowns/comps/SelectTagsInput/styled.d.ts +0 -2
- package/dist/components/Dropdowns/comps/SelectTagsInput/styled.js +0 -54
- package/dist/components/Dropdowns/handlers/index.d.ts +0 -14
- package/dist/components/Dropdowns/handlers/index.js +0 -52
- package/dist/components/Dropdowns/styled.d.ts +0 -2
- package/dist/components/Dropdowns/styled.js +0 -49
- package/dist/components/Dropdowns/utils/genColor.d.ts +0 -4
- package/dist/components/Dropdowns/utils/genColor.js +0 -15
- package/dist/components/Dropdowns/utils/genIcon.d.ts +0 -6
- package/dist/components/Dropdowns/utils/genIcon.js +0 -18
- package/dist/components/Dropdowns/utils/genLinkOrText.d.ts +0 -1
- package/dist/components/Dropdowns/utils/genLinkOrText.js +0 -48
- package/dist/components/Dropdowns/utils/genProfileImg.d.ts +0 -6
- package/dist/components/Dropdowns/utils/genProfileImg.js +0 -14
- package/dist/components/Dropdowns/utils/genTagComp.d.ts +0 -2
- package/dist/components/Dropdowns/utils/genTagComp.js +0 -27
- package/dist/components/Dropdowns/utils/generateOptions.d.ts +0 -5
- package/dist/components/Dropdowns/utils/generateOptions.js +0 -20
- package/dist/components/Dropdowns/utils/getAllOptionsFns/genMonthsArray.d.ts +0 -1
- package/dist/components/Dropdowns/utils/getAllOptionsFns/genMonthsArray.js +0 -40
- package/dist/components/Dropdowns/utils/getAllOptionsFns/genYearsArray.d.ts +0 -4
- package/dist/components/Dropdowns/utils/getAllOptionsFns/genYearsArray.js +0 -11
- package/dist/components/Dropdowns/utils/getAllOptionsFns/getLanguagesArray.d.ts +0 -4
- package/dist/components/Dropdowns/utils/getAllOptionsFns/getLanguagesArray.js +0 -62
- package/dist/components/Dropdowns/utils/getAllOptionsFns/index.d.ts +0 -1
- package/dist/components/Dropdowns/utils/getAllOptionsFns/index.js +0 -19
- package/dist/components/Dropdowns/utils/getValue.d.ts +0 -14
- package/dist/components/Dropdowns/utils/getValue.js +0 -32
- package/dist/components/Dropdowns/utils/isDynamicOtherOption.d.ts +0 -0
- package/dist/components/Dropdowns/utils/isDynamicOtherOption.js +0 -0
- package/dist/components/Dropdowns/utils/keywordSearchOptions.d.ts +0 -6
- package/dist/components/Dropdowns/utils/keywordSearchOptions.js +0 -18
- package/dist/components/Dropdowns/utils/setDropdownSelectText.d.ts +0 -12
- package/dist/components/Dropdowns/utils/setDropdownSelectText.js +0 -19
- package/dist/components/Dropdowns/utils/useCreateDropdownRefs.d.ts +0 -5
- package/dist/components/Dropdowns/utils/useCreateDropdownRefs.js +0 -15
- package/dist/components/Dropdowns/utils/useHideShowOptions.d.ts +0 -5
- package/dist/components/Dropdowns/utils/useHideShowOptions.js +0 -20
- package/dist/components/Dropdowns/utils/useKeyboardControl.d.ts +0 -12
- package/dist/components/Dropdowns/utils/useKeyboardControl.js +0 -73
- package/dist/components/Dropdowns/utils/useSearchString.d.ts +0 -4
- package/dist/components/Dropdowns/utils/useSearchString.js +0 -20
- package/dist/components/Dropdowns/utils/useSetYOrientation.d.ts +0 -9
- package/dist/components/Dropdowns/utils/useSetYOrientation.js +0 -46
- package/dist/components/Hints/contextApi.d.ts +0 -6
- package/dist/components/Hints/contextApi.js +0 -48
- package/dist/components/Hints/index.d.ts +0 -9
- package/dist/components/Hints/index.js +0 -127
- package/dist/components/Hints/styled.d.ts +0 -6
- package/dist/components/Hints/styled.js +0 -54
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.d.ts +0 -11
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.js +0 -30
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/styled.d.ts +0 -1
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/styled.js +0 -70
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.d.ts +0 -11
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.js +0 -50
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/index.d.ts +0 -20
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/index.js +0 -124
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/styled.d.ts +0 -2
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/styled.js +0 -17
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.d.ts +0 -18
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.js +0 -53
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/styled.d.ts +0 -2
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/styled.js +0 -84
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/index.d.ts +0 -1
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/index.js +0 -6
- package/dist/components/RadioAndCheckbox/comps/RadioList/index.d.ts +0 -17
- package/dist/components/RadioAndCheckbox/comps/RadioList/index.js +0 -109
- package/dist/components/RadioAndCheckbox/index.d.ts +0 -5
- package/dist/components/RadioAndCheckbox/index.js +0 -14
- package/dist/components/RadioAndCheckbox/styled.d.ts +0 -5
- package/dist/components/RadioAndCheckbox/styled.js +0 -84
- package/dist/components/RadioAndCheckbox/utils.d.ts +0 -22
- package/dist/components/RadioAndCheckbox/utils.js +0 -49
- package/dist/components/Switches/index.d.ts +0 -21
- package/dist/components/Switches/index.js +0 -102
- package/dist/components/Switches/styled.d.ts +0 -5
- package/dist/components/Switches/styled.js +0 -63
- package/dist/components/TextInputs/index.d.ts +0 -24
- package/dist/components/TextInputs/index.js +0 -367
- package/dist/components/TextInputs/index.styled.d.ts +0 -3
- package/dist/components/TextInputs/index.styled.js +0 -77
- package/dist/components/cards/CardContent/index.d.ts +0 -11
- package/dist/components/cards/CardContent/index.js +0 -76
- package/dist/components/cards/CardContent/styled.d.ts +0 -7
- package/dist/components/cards/CardContent/styled.js +0 -63
- package/dist/components/cards/ListContent/index.d.ts +0 -12
- package/dist/components/cards/ListContent/index.js +0 -87
- package/dist/components/cards/ListContent/styled.d.ts +0 -7
- package/dist/components/cards/ListContent/styled.js +0 -26
- package/dist/stories/Oolib/components/BlockLabel.stories.d.ts +0 -71
- package/dist/stories/Oolib/components/BlockLabel.stories.js +0 -106
- package/dist/stories/Oolib/components/Checkbox.stories.d.ts +0 -248
- package/dist/stories/Oolib/components/Checkbox.stories.js +0 -249
- package/dist/stories/Oolib/components/Dropdowns.stories.d.ts +0 -127
- package/dist/stories/Oolib/components/Dropdowns.stories.js +0 -298
- package/dist/stories/Oolib/components/RadioButton.stories.d.ts +0 -260
- package/dist/stories/Oolib/components/RadioButton.stories.js +0 -264
- package/dist/stories/Oolib/components/Switches.stories.d.ts +0 -106
- package/dist/stories/Oolib/components/Switches.stories.js +0 -146
- package/dist/stories/Oolib/components/TextInputs.stories.d.ts +0 -124
- package/dist/stories/Oolib/components/TextInputs.stories.js +0 -188
|
@@ -1,249 +0,0 @@
|
|
|
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
-
};
|
|
25
|
-
var _a, _b;
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.CheckboxButton = exports.CheckboxInput = exports.CheckboxList = void 0;
|
|
28
|
-
var react_1 = require("react");
|
|
29
|
-
var RadioAndCheckbox_1 = require("../../../components/RadioAndCheckbox");
|
|
30
|
-
var react_json_view_1 = __importDefault(require("react-json-view"));
|
|
31
|
-
var Divider_1 = require("../../../components/Divider");
|
|
32
|
-
var themes_1 = require("../../../themes");
|
|
33
|
-
var greyColor100 = themes_1.colors.greyColor100;
|
|
34
|
-
var ops = [
|
|
35
|
-
{ value: "op1", display: "Squidward" },
|
|
36
|
-
{ value: "op2", display: "Mohammed Ali" },
|
|
37
|
-
{ value: "op3", display: "Patric" },
|
|
38
|
-
{ value: "op4", display: "Mr krabs" },
|
|
39
|
-
{ value: "op5", display: "Bob Marley" },
|
|
40
|
-
//{ value: 'other', display: "Other"},
|
|
41
|
-
];
|
|
42
|
-
exports.default = {
|
|
43
|
-
title: "Components/Checkbox",
|
|
44
|
-
};
|
|
45
|
-
var CheckboxList = function (args) {
|
|
46
|
-
var _a = (0, react_1.useState)([]), selectedOptions = _a[0], setSelectedOptions = _a[1];
|
|
47
|
-
var _b = (0, react_1.useState)(ops), options = _b[0], setOptions = _b[1];
|
|
48
|
-
(0, react_1.useEffect)(function () {
|
|
49
|
-
setOptions(options.map(function (op, idx) {
|
|
50
|
-
var argsText = args["option".concat(idx + 1)];
|
|
51
|
-
return argsText !== op.display ? __assign(__assign({}, op), { display: argsText }) : op;
|
|
52
|
-
}));
|
|
53
|
-
}, [args.option1, args.option2, args.option3, args.option4, args.option5]);
|
|
54
|
-
(0, react_1.useEffect)(function () {
|
|
55
|
-
setOptions(options.map(function (op) {
|
|
56
|
-
var userIncluded = args.correctOptions.includes(op.value);
|
|
57
|
-
if (op.isCorrect) {
|
|
58
|
-
return userIncluded ? op : __assign(__assign({}, op), { isCorrect: false });
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return userIncluded ? __assign(__assign({}, op), { isCorrect: true }) : op;
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
}, [args.correctOptions]);
|
|
65
|
-
return (React.createElement("div", { style: { backgroundColor: args.invert && greyColor100, padding: '4rem' } },
|
|
66
|
-
React.createElement(RadioAndCheckbox_1.CheckboxList, { options: options, value: selectedOptions, onChange: function (id, val) { return setSelectedOptions(val); }, rightWrongResult: args.markOptions, listType: args.listingStyle, injectOtherOption: args.addOther, commonIsCorrectDesc: args.feedbackMessage, S: args.size == "S", readOnly: args.readOnly, label: args.label, disabled: args.disabled, invert: args.invert, inputStyle: args.inputStyle, optionsLimit: args.optionsLimit }),
|
|
67
|
-
React.createElement("br", null),
|
|
68
|
-
" ",
|
|
69
|
-
React.createElement(Divider_1.Divider, null),
|
|
70
|
-
" ",
|
|
71
|
-
React.createElement("br", null),
|
|
72
|
-
React.createElement("details", { style: { margin: "2rem 0" } },
|
|
73
|
-
React.createElement("summary", { style: { fontSize: "1.4rem", marginBottom: 10 } }, "Dev only area"),
|
|
74
|
-
React.createElement(react_json_view_1.default, { theme: "monokai", displayDataTypes: false, style: { fontSize: "1.3rem" }, name: "Value", src: selectedOptions }))));
|
|
75
|
-
};
|
|
76
|
-
exports.CheckboxList = CheckboxList;
|
|
77
|
-
exports.CheckboxList.args = {
|
|
78
|
-
inputStyle: "Checkbox",
|
|
79
|
-
size: "Medium",
|
|
80
|
-
listingStyle: "horizontal",
|
|
81
|
-
addOther: false,
|
|
82
|
-
optionsLimit: ops.length,
|
|
83
|
-
option1: ops[0].display,
|
|
84
|
-
option2: ops[1].display,
|
|
85
|
-
option3: ops[2].display,
|
|
86
|
-
option4: ops[3].display,
|
|
87
|
-
option5: ops[4].display,
|
|
88
|
-
markOptions: false,
|
|
89
|
-
correctOptions: ops[3].value,
|
|
90
|
-
feedbackMessage: "Answer is shown, have a look",
|
|
91
|
-
disabled: false,
|
|
92
|
-
readOnly: false,
|
|
93
|
-
invert: false,
|
|
94
|
-
};
|
|
95
|
-
exports.CheckboxList.argTypes = {
|
|
96
|
-
correctOptions: {
|
|
97
|
-
name: "Correct Options",
|
|
98
|
-
control: { type: "inline-check" },
|
|
99
|
-
options: ops.map(function (op) { return op.value; }),
|
|
100
|
-
},
|
|
101
|
-
inputStyle: {
|
|
102
|
-
name: "Checkbox Type",
|
|
103
|
-
control: { type: "select" },
|
|
104
|
-
options: ["Checkbox", "Tag select"],
|
|
105
|
-
mapping: (_a = {},
|
|
106
|
-
_a["Tag select"] = "tagSelect",
|
|
107
|
-
_a.Checkbox = "checkbox",
|
|
108
|
-
_a),
|
|
109
|
-
},
|
|
110
|
-
addOther: {
|
|
111
|
-
name: "Add Other Option",
|
|
112
|
-
},
|
|
113
|
-
size: {
|
|
114
|
-
name: "Checkbox Size",
|
|
115
|
-
control: { type: "inline-radio" },
|
|
116
|
-
options: ["Small", "Medium"],
|
|
117
|
-
mapping: {
|
|
118
|
-
Small: "S",
|
|
119
|
-
Medium: "M",
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
listingStyle: {
|
|
123
|
-
name: "Listing Style",
|
|
124
|
-
control: { type: "select" },
|
|
125
|
-
options: ["horizontal", "vertical"],
|
|
126
|
-
},
|
|
127
|
-
optionsLimit: {
|
|
128
|
-
name: "Options Limit",
|
|
129
|
-
control: { type: "select" },
|
|
130
|
-
options: Array.from({ length: ops.length + 1 }, function (_, index) { return index; }),
|
|
131
|
-
},
|
|
132
|
-
feedbackMessage: {
|
|
133
|
-
name: "Feedback Message",
|
|
134
|
-
control: { type: "text" },
|
|
135
|
-
},
|
|
136
|
-
// label: {
|
|
137
|
-
// control: { type: "text" },
|
|
138
|
-
// },
|
|
139
|
-
option1: {
|
|
140
|
-
name: "Option 1",
|
|
141
|
-
control: { type: "text" },
|
|
142
|
-
},
|
|
143
|
-
option2: {
|
|
144
|
-
name: "Option 2",
|
|
145
|
-
control: { type: "text" },
|
|
146
|
-
},
|
|
147
|
-
option3: {
|
|
148
|
-
name: "Option 3",
|
|
149
|
-
control: { type: "text" },
|
|
150
|
-
},
|
|
151
|
-
option4: {
|
|
152
|
-
name: "Option 4",
|
|
153
|
-
control: { type: "text" },
|
|
154
|
-
},
|
|
155
|
-
option5: {
|
|
156
|
-
name: "Option 5",
|
|
157
|
-
control: { type: "text" },
|
|
158
|
-
},
|
|
159
|
-
markOptions: {
|
|
160
|
-
name: "Mark Options",
|
|
161
|
-
},
|
|
162
|
-
disabled: {
|
|
163
|
-
name: "Disabled",
|
|
164
|
-
},
|
|
165
|
-
readOnly: {
|
|
166
|
-
name: "ReadOnly",
|
|
167
|
-
},
|
|
168
|
-
invert: {
|
|
169
|
-
name: "Invert",
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
var CheckboxInput = function (args) {
|
|
173
|
-
var _a = (0, react_1.useState)([]), value = _a[0], setValue = _a[1];
|
|
174
|
-
var _b = (0, react_1.useState)({ value: "smth", display: "Squidward" }), option = _b[0], setOption = _b[1];
|
|
175
|
-
(0, react_1.useEffect)(function () {
|
|
176
|
-
setOption(__assign(__assign({}, option), { display: args.option1 }));
|
|
177
|
-
}, [args.option1]);
|
|
178
|
-
(0, react_1.useEffect)(function () {
|
|
179
|
-
setOption(__assign(__assign({}, option), { isCorrect: args.optionIsCorrect }));
|
|
180
|
-
}, [args.optionIsCorrect]);
|
|
181
|
-
return (React.createElement("div", { style: {
|
|
182
|
-
padding: "4rem",
|
|
183
|
-
backgroundColor: args.invert ? greyColor100 : "unset",
|
|
184
|
-
} },
|
|
185
|
-
React.createElement(RadioAndCheckbox_1.CheckboxInput, __assign({}, args, { value: value, option: option, S: args.size == "S",
|
|
186
|
-
rightWrongResult: args.markOptions,
|
|
187
|
-
onClick: function (isSelected, option) { return setValue(isSelected ? [] : [option]); } }))));
|
|
188
|
-
};
|
|
189
|
-
exports.CheckboxInput = CheckboxInput;
|
|
190
|
-
var CheckboxButton = function (args) {
|
|
191
|
-
var _a = (0, react_1.useState)(false), chosen = _a[0], setChosen = _a[1];
|
|
192
|
-
return (React.createElement("div", { style: {
|
|
193
|
-
padding: "4rem",
|
|
194
|
-
backgroundColor: args.invert ? greyColor100 : "unset",
|
|
195
|
-
} },
|
|
196
|
-
React.createElement(RadioAndCheckbox_1.CheckboxButton, __assign({}, args, { isSelected: chosen, onChange: function (k, v) { return setChosen(v); }, S: args.size === "S" }))));
|
|
197
|
-
};
|
|
198
|
-
exports.CheckboxButton = CheckboxButton;
|
|
199
|
-
var commonExcluded = [
|
|
200
|
-
"option2",
|
|
201
|
-
"option3",
|
|
202
|
-
"option4",
|
|
203
|
-
"option5",
|
|
204
|
-
"correctOptions",
|
|
205
|
-
"listingStyle",
|
|
206
|
-
"label",
|
|
207
|
-
"feedbackMessage",
|
|
208
|
-
"optionsLimit",
|
|
209
|
-
"addOther",
|
|
210
|
-
"readOnly",
|
|
211
|
-
];
|
|
212
|
-
exports.CheckboxInput.args = {
|
|
213
|
-
inputStyle: 'Checkbox',
|
|
214
|
-
option1: ops[0].display,
|
|
215
|
-
markOptions: false,
|
|
216
|
-
optionIsCorrect: false,
|
|
217
|
-
invert: false
|
|
218
|
-
};
|
|
219
|
-
exports.CheckboxInput.argTypes = {
|
|
220
|
-
optionIsCorrect: {
|
|
221
|
-
name: 'Option is Correct'
|
|
222
|
-
},
|
|
223
|
-
option1: {
|
|
224
|
-
name: 'Option 1'
|
|
225
|
-
},
|
|
226
|
-
markOptions: {
|
|
227
|
-
name: "Mark Options"
|
|
228
|
-
},
|
|
229
|
-
inputStyle: {
|
|
230
|
-
name: "Checkbox Type",
|
|
231
|
-
control: { type: "select" },
|
|
232
|
-
options: ["Checkbox", "Tag select"],
|
|
233
|
-
mapping: (_b = {},
|
|
234
|
-
_b["Tag select"] = "tagSelect",
|
|
235
|
-
_b.Checkbox = "checkbox",
|
|
236
|
-
_b),
|
|
237
|
-
},
|
|
238
|
-
invert: {
|
|
239
|
-
name: "Invert",
|
|
240
|
-
},
|
|
241
|
-
};
|
|
242
|
-
exports.CheckboxInput.parameters = {
|
|
243
|
-
controls: { exclude: commonExcluded },
|
|
244
|
-
};
|
|
245
|
-
exports.CheckboxButton.parameters = {
|
|
246
|
-
controls: {
|
|
247
|
-
exclude: __spreadArray(__spreadArray([], commonExcluded, true), ["option1", "markOptions", "inputStyle"], false),
|
|
248
|
-
},
|
|
249
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
let title: string;
|
|
3
|
-
namespace argTypes {
|
|
4
|
-
namespace placeholder {
|
|
5
|
-
let name: string;
|
|
6
|
-
}
|
|
7
|
-
namespace optionIcon {
|
|
8
|
-
export { availableIcons as options };
|
|
9
|
-
export namespace control {
|
|
10
|
-
let type: string;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
namespace selection {
|
|
14
|
-
let name_1: string;
|
|
15
|
-
export { name_1 as name };
|
|
16
|
-
export let options: string[];
|
|
17
|
-
export namespace control_1 {
|
|
18
|
-
let type_1: string;
|
|
19
|
-
export { type_1 as type };
|
|
20
|
-
}
|
|
21
|
-
export { control_1 as control };
|
|
22
|
-
}
|
|
23
|
-
namespace size {
|
|
24
|
-
let name_2: string;
|
|
25
|
-
export { name_2 as name };
|
|
26
|
-
export namespace control_2 {
|
|
27
|
-
let type_2: string;
|
|
28
|
-
export { type_2 as type };
|
|
29
|
-
}
|
|
30
|
-
export { control_2 as control };
|
|
31
|
-
let options_1: string[];
|
|
32
|
-
export { options_1 as options };
|
|
33
|
-
export namespace mapping {
|
|
34
|
-
let Small: string;
|
|
35
|
-
let Medium: string;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
namespace isSearchable {
|
|
39
|
-
let name_3: string;
|
|
40
|
-
export { name_3 as name };
|
|
41
|
-
}
|
|
42
|
-
namespace showIconInSelectArea {
|
|
43
|
-
let name_4: string;
|
|
44
|
-
export { name_4 as name };
|
|
45
|
-
}
|
|
46
|
-
namespace optionImage {
|
|
47
|
-
let name_5: string;
|
|
48
|
-
export { name_5 as name };
|
|
49
|
-
}
|
|
50
|
-
namespace optionDescription {
|
|
51
|
-
let name_6: string;
|
|
52
|
-
export { name_6 as name };
|
|
53
|
-
}
|
|
54
|
-
namespace colors {
|
|
55
|
-
let name_7: string;
|
|
56
|
-
export { name_7 as name };
|
|
57
|
-
}
|
|
58
|
-
namespace disabled {
|
|
59
|
-
let name_8: string;
|
|
60
|
-
export { name_8 as name };
|
|
61
|
-
}
|
|
62
|
-
namespace readOnly {
|
|
63
|
-
let name_9: string;
|
|
64
|
-
export { name_9 as name };
|
|
65
|
-
}
|
|
66
|
-
namespace invert {
|
|
67
|
-
let name_10: string;
|
|
68
|
-
export { name_10 as name };
|
|
69
|
-
}
|
|
70
|
-
namespace showColorInSelectArea {
|
|
71
|
-
let name_11: string;
|
|
72
|
-
export { name_11 as name };
|
|
73
|
-
}
|
|
74
|
-
namespace alignDropdown {
|
|
75
|
-
let name_12: string;
|
|
76
|
-
export { name_12 as name };
|
|
77
|
-
let options_2: string[];
|
|
78
|
-
export { options_2 as options };
|
|
79
|
-
export namespace control_3 {
|
|
80
|
-
let type_3: string;
|
|
81
|
-
export { type_3 as type };
|
|
82
|
-
}
|
|
83
|
-
export { control_3 as control };
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
namespace args {
|
|
87
|
-
let placeholder_1: string;
|
|
88
|
-
export { placeholder_1 as placeholder };
|
|
89
|
-
let size_1: string;
|
|
90
|
-
export { size_1 as size };
|
|
91
|
-
let selection_1: string;
|
|
92
|
-
export { selection_1 as selection };
|
|
93
|
-
let isSearchable_1: boolean;
|
|
94
|
-
export { isSearchable_1 as isSearchable };
|
|
95
|
-
let optionDescription_1: string;
|
|
96
|
-
export { optionDescription_1 as optionDescription };
|
|
97
|
-
let optionImage_1: string;
|
|
98
|
-
export { optionImage_1 as optionImage };
|
|
99
|
-
let optionIcon_1: any;
|
|
100
|
-
export { optionIcon_1 as optionIcon };
|
|
101
|
-
let showIconInSelectArea_1: boolean;
|
|
102
|
-
export { showIconInSelectArea_1 as showIconInSelectArea };
|
|
103
|
-
let colors_1: boolean;
|
|
104
|
-
export { colors_1 as colors };
|
|
105
|
-
let showColorInSelectArea_1: boolean;
|
|
106
|
-
export { showColorInSelectArea_1 as showColorInSelectArea };
|
|
107
|
-
let disabled_1: boolean;
|
|
108
|
-
export { disabled_1 as disabled };
|
|
109
|
-
let readOnly_1: boolean;
|
|
110
|
-
export { readOnly_1 as readOnly };
|
|
111
|
-
let invert_1: boolean;
|
|
112
|
-
export { invert_1 as invert };
|
|
113
|
-
export let popOutOfOverflowHiddenParent: boolean;
|
|
114
|
-
let alignDropdown_1: string;
|
|
115
|
-
export { alignDropdown_1 as alignDropdown };
|
|
116
|
-
}
|
|
117
|
-
namespace parameters {
|
|
118
|
-
namespace docs {
|
|
119
|
-
export { DropdownDocs as page };
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
export default _default;
|
|
124
|
-
export function Dropdowns(args: any): React.JSX.Element;
|
|
125
|
-
declare const availableIcons: string[];
|
|
126
|
-
import DropdownDocs from "./Dropdowns.mdx";
|
|
127
|
-
import React from "react";
|
|
@@ -1,298 +0,0 @@
|
|
|
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 () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
47
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
48
|
-
if (ar || !(i in from)) {
|
|
49
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
50
|
-
ar[i] = from[i];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
54
|
-
};
|
|
55
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
56
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
57
|
-
};
|
|
58
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.Dropdowns = void 0;
|
|
60
|
-
var react_1 = __importStar(require("react"));
|
|
61
|
-
var Container_1 = require("../../../components/Container");
|
|
62
|
-
var DropdownMulti_1 = require("../../../components/Dropdowns/DropdownMulti");
|
|
63
|
-
var DropdownSingle_1 = require("../../../components/Dropdowns/DropdownSingle");
|
|
64
|
-
var Paddings_1 = require("../../../components/Paddings");
|
|
65
|
-
var themes_1 = require("../../../themes");
|
|
66
|
-
var Dropdowns_mdx_1 = __importDefault(require("./Dropdowns.mdx"));
|
|
67
|
-
var icons_1 = require("../../../icons");
|
|
68
|
-
// import { faker } from '@faker-js/faker';
|
|
69
|
-
// const generateRandomCountry = () => ({
|
|
70
|
-
// display: faker.address.country(),
|
|
71
|
-
// value: faker.address.countryCode().toLowerCase(),
|
|
72
|
-
// });
|
|
73
|
-
// const generateDropdownOptions = (length) => {
|
|
74
|
-
// const dropdownOptions = [];
|
|
75
|
-
// for (let i = 0; i < length; i++) {
|
|
76
|
-
// dropdownOptions.push(generateRandomCountry());
|
|
77
|
-
// }
|
|
78
|
-
// return dropdownOptions;
|
|
79
|
-
// };
|
|
80
|
-
// const dropdownOptions2 = generateDropdownOptions(200);
|
|
81
|
-
var availableIcons = __spreadArray([undefined], Object.keys(icons_1.icons).sort(), true);
|
|
82
|
-
exports.default = {
|
|
83
|
-
title: "Components/Dropdowns",
|
|
84
|
-
argTypes: {
|
|
85
|
-
// label: {
|
|
86
|
-
// name: "Label",
|
|
87
|
-
// },
|
|
88
|
-
// sublabel: {
|
|
89
|
-
// name: "Sub Label",
|
|
90
|
-
// },
|
|
91
|
-
placeholder: {
|
|
92
|
-
name: "Placeholder Text",
|
|
93
|
-
},
|
|
94
|
-
optionIcon: {
|
|
95
|
-
options: availableIcons,
|
|
96
|
-
control: { type: "select" },
|
|
97
|
-
},
|
|
98
|
-
selection: {
|
|
99
|
-
options: ["single", "multi"],
|
|
100
|
-
control: { type: "inline-radio" },
|
|
101
|
-
},
|
|
102
|
-
size: {
|
|
103
|
-
name: "Size",
|
|
104
|
-
control: { type: "inline-radio" },
|
|
105
|
-
options: ["Small", "Medium"],
|
|
106
|
-
mapping: {
|
|
107
|
-
Small: "S",
|
|
108
|
-
Medium: "M",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
selection: {
|
|
112
|
-
name: "Selection Type",
|
|
113
|
-
options: ["single", "multi"],
|
|
114
|
-
control: { type: "select" },
|
|
115
|
-
},
|
|
116
|
-
isSearchable: {
|
|
117
|
-
name: "Searchable",
|
|
118
|
-
},
|
|
119
|
-
showIconInSelectArea: {
|
|
120
|
-
name: "Show Icon in Select Area",
|
|
121
|
-
},
|
|
122
|
-
optionImage: {
|
|
123
|
-
name: "Option Image",
|
|
124
|
-
},
|
|
125
|
-
optionDescription: {
|
|
126
|
-
name: "Option Description",
|
|
127
|
-
},
|
|
128
|
-
colors: {
|
|
129
|
-
name: 'Show Colors'
|
|
130
|
-
},
|
|
131
|
-
disabled: {
|
|
132
|
-
name: "Disabled",
|
|
133
|
-
},
|
|
134
|
-
readOnly: {
|
|
135
|
-
name: "Read Only",
|
|
136
|
-
},
|
|
137
|
-
invert: {
|
|
138
|
-
name: "Invert",
|
|
139
|
-
},
|
|
140
|
-
showColorInSelectArea: {
|
|
141
|
-
name: "Show Color in Select Area"
|
|
142
|
-
},
|
|
143
|
-
alignDropdown: {
|
|
144
|
-
name: "Align Dropdown",
|
|
145
|
-
options: ["left", "right"],
|
|
146
|
-
control: { type: "select" }
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
args: {
|
|
150
|
-
// label: "This is a label",
|
|
151
|
-
// sublabel: "This is a sub label",
|
|
152
|
-
placeholder: "",
|
|
153
|
-
size: "Medium",
|
|
154
|
-
selection: "single",
|
|
155
|
-
isSearchable: false,
|
|
156
|
-
optionDescription: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
157
|
-
optionImage: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVSkmNOQ6abMCc5e6R2r7VwRZDkBHFTyzAg&usqp=CAU",
|
|
158
|
-
optionIcon: undefined,
|
|
159
|
-
showIconInSelectArea: false,
|
|
160
|
-
colors: false,
|
|
161
|
-
showColorInSelectArea: false,
|
|
162
|
-
disabled: false,
|
|
163
|
-
readOnly: false,
|
|
164
|
-
invert: false,
|
|
165
|
-
popOutOfOverflowHiddenParent: false,
|
|
166
|
-
alignDropdown: "left",
|
|
167
|
-
},
|
|
168
|
-
parameters: {
|
|
169
|
-
docs: {
|
|
170
|
-
page: Dropdowns_mdx_1.default,
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
var dropdownOptions = [
|
|
175
|
-
{
|
|
176
|
-
display: "Option ",
|
|
177
|
-
value: "india",
|
|
178
|
-
color: themes_1.colors.lightRed,
|
|
179
|
-
// image: "xyz",
|
|
180
|
-
// icon: "Trash",
|
|
181
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
display: "Sri Lanka",
|
|
185
|
-
value: "sriLanka",
|
|
186
|
-
color: themes_1.colors.invertRed,
|
|
187
|
-
// image: "xyz",
|
|
188
|
-
// icon: "Trash",
|
|
189
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
display: "Japan",
|
|
193
|
-
value: "japan",
|
|
194
|
-
color: themes_1.colors.lightBlue
|
|
195
|
-
// image: "xyz",
|
|
196
|
-
// icon: "Trash",
|
|
197
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
display: "Germany",
|
|
201
|
-
value: "germany",
|
|
202
|
-
color: themes_1.colors.primaryColor100
|
|
203
|
-
// image: "xyz",
|
|
204
|
-
// icon: "Trash",
|
|
205
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
display: "USA",
|
|
209
|
-
value: "usa",
|
|
210
|
-
color: themes_1.colors.greyColor100
|
|
211
|
-
// image: "xyz",
|
|
212
|
-
// icon: "Trash",
|
|
213
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
display: "Columbia",
|
|
217
|
-
value: "columbia",
|
|
218
|
-
color: themes_1.colors.lightRed,
|
|
219
|
-
// image: "xyz",
|
|
220
|
-
// icon: "Trash",
|
|
221
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
display: "Brazil",
|
|
225
|
-
value: "brazil",
|
|
226
|
-
color: themes_1.colors.invertRed,
|
|
227
|
-
// image: "xyz",
|
|
228
|
-
// icon: "Trash",
|
|
229
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
display: "Australia",
|
|
233
|
-
value: "australia",
|
|
234
|
-
color: themes_1.colors.lightBlue
|
|
235
|
-
// image: "xyz",
|
|
236
|
-
// icon: "Trash",
|
|
237
|
-
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
238
|
-
},
|
|
239
|
-
];
|
|
240
|
-
var Dropdowns = function (args) {
|
|
241
|
-
var _a = (0, react_1.useState)({
|
|
242
|
-
single: undefined,
|
|
243
|
-
multi: undefined,
|
|
244
|
-
}), val = _a[0], setVal = _a[1];
|
|
245
|
-
var _b = (0, react_1.useState)([]), options = _b[0], setOptions = _b[1];
|
|
246
|
-
(0, react_1.useEffect)(function () {
|
|
247
|
-
var delayOptions = setTimeout(function () {
|
|
248
|
-
var newOptions = dropdownOptions.map(function (op) { return (__assign(__assign({}, op), { desc: args.optionDescription, icon: !args.optionImage && args.optionIcon, image: args.optionImage && [{ publicUrl: args.optionImage }], color: args.colors && op.color })); });
|
|
249
|
-
setOptions(newOptions);
|
|
250
|
-
}, 2000);
|
|
251
|
-
// Cleanup the timeout on component unmount
|
|
252
|
-
return function () { return clearTimeout(delayOptions); };
|
|
253
|
-
}, [args.optionDescription, args.optionImage, args.optionIcon, args.colors]);
|
|
254
|
-
var Comp = args.selection === "single" ? DropdownSingle_1.DropdownSingle : DropdownMulti_1.DropdownMulti;
|
|
255
|
-
return (react_1.default.createElement("div", { style: { background: args.invert && themes_1.colors.greyColor100 } },
|
|
256
|
-
react_1.default.createElement(Container_1.Container, null,
|
|
257
|
-
react_1.default.createElement(Paddings_1.PaddingTopBottom40, null,
|
|
258
|
-
react_1.default.createElement(Comp, __assign({ key: args.selection }, args, { S: args.size == "S", options: dropdownOptions.map(function (op) { return (__assign(__assign({}, op), { desc: args.optionDescription, icon: !args.optionImage && args.optionIcon, image: args.optionImage && [{ publicUrl: args.optionImage }], color: args.colors && op.color })); }), value: val[args.selection], onChange: function (k, v) {
|
|
259
|
-
return setVal(function (prev) {
|
|
260
|
-
var _a;
|
|
261
|
-
return (__assign(__assign({}, prev), (_a = {}, _a[args.selection] = v, _a)));
|
|
262
|
-
});
|
|
263
|
-
}, selectConfig: args.showIconInSelectArea ? ["display", "icon"] : args.showColorInSelectArea ? ["display", "color"] : ["display"], label: "Dropdown Component", sublabel: "Select single or multiple options in dropdown based on Selection Type", popOutOfOverflowHiddenParent: args.popOutOfOverflowHiddenParent }))),
|
|
264
|
-
react_1.default.createElement("div", { style: { height: '1000px', background: 'red' } }))));
|
|
265
|
-
};
|
|
266
|
-
exports.Dropdowns = Dropdowns;
|
|
267
|
-
// export const Button_Primary = (args) => (
|
|
268
|
-
// <GenButtonStory args={args} Comp={ButtonPrimary} />
|
|
269
|
-
// )
|
|
270
|
-
// Button_Primary.parameters = { controls: { exclude: ['variant', 'color'] } }
|
|
271
|
-
// export const Button_Secondary = (args) => (
|
|
272
|
-
// <GenButtonStory args={args} Comp={ButtonSecondary} />
|
|
273
|
-
// )
|
|
274
|
-
// Button_Secondary.parameters = { controls: { exclude: ['variant', 'color'] } }
|
|
275
|
-
// Button_Secondary.args = {
|
|
276
|
-
// active: false,
|
|
277
|
-
// }
|
|
278
|
-
// export const Button_Ghost = (args) => (
|
|
279
|
-
// <GenButtonStory args={args} Comp={ButtonGhost} />
|
|
280
|
-
// )
|
|
281
|
-
// Button_Ghost.args = {
|
|
282
|
-
// active: false,
|
|
283
|
-
// }
|
|
284
|
-
// Button_Ghost.parameters = { controls: { exclude: ['variant'] } }
|
|
285
|
-
// export const Button_Custom = (args) => (
|
|
286
|
-
// <GenButtonStory args={args} Comp={ButtonCustom} />
|
|
287
|
-
// )
|
|
288
|
-
// Button_Custom.parameters = { controls: { exclude: ['variant', 'color'] } }
|
|
289
|
-
// export const Google_Login = (args) => (
|
|
290
|
-
// <GenButtonStory args={args} Comp={GoogleLogin} />
|
|
291
|
-
// )
|
|
292
|
-
// Google_Login.parameters = {
|
|
293
|
-
// controls: { exclude: ['variant', 'color', 'iconOnly', 'icon + text'] },
|
|
294
|
-
// }
|
|
295
|
-
// export const Upload_Button = (args) => (
|
|
296
|
-
// <GenButtonStory args={{ ...args, children: 'Upload' }} Comp={UploadButton} />
|
|
297
|
-
// )
|
|
298
|
-
// Upload_Button.parameters = { controls: { exclude: ['color'] } }
|