@itcase/ui 1.1.2 → 1.1.3
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/Cell.js +2 -0
- package/dist/components/Input.js +0 -7
- package/dist/components/InputMask.js +233 -0
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Label.js +3 -3
- package/dist/components/Response.js +10 -9
- package/dist/components/Search.js +19 -3
- package/dist/components/Tab.js +8 -8
- package/dist/components/Text.js +3 -3
- package/dist/css/components/InputMask/Input.css +77 -0
- package/dist/css/components/Loader/Loader.css +1 -1
- package/dist/css/components/Response/Response.css +8 -0
- package/dist/css/styles/align/align_vertical-reverse.css +6 -6
- package/dist/css/styles/align/align_vertical.css +8 -8
- package/dist/css/styles/border-color/border-color.css +1 -1
- package/dist/css/styles/border-color/border-color_focus.css +2 -2
- package/dist/css/styles/border-color/border-color_hover.css +1 -1
- package/dist/css/styles/caret-color/caret-color.css +1 -1
- package/dist/css/styles/fill/fill.css +2 -2
- package/dist/css/styles/fill/fill_active.css +2 -2
- package/dist/css/styles/fill/fill_active_hover.css +2 -2
- package/dist/css/styles/fill/fill_disabled.css +2 -2
- package/dist/css/styles/fill/fill_hover.css +2 -2
- package/dist/stories/NotFound.stories.js +3 -4
- package/package.json +1 -1
- package/dist/components/Empty.js +0 -229
- package/dist/css/components/Empty/Empty.css +0 -21
- package/dist/stories/Empty.stories.js +0 -115
package/dist/components/Cell.js
CHANGED
|
@@ -82,6 +82,7 @@ function Cell(props) {
|
|
|
82
82
|
title,
|
|
83
83
|
titleTextSize,
|
|
84
84
|
titleTextColor,
|
|
85
|
+
titleTextTruncate,
|
|
85
86
|
titleTextWeight,
|
|
86
87
|
titleTextWrap,
|
|
87
88
|
showTitleLabel,
|
|
@@ -166,6 +167,7 @@ function Cell(props) {
|
|
|
166
167
|
size: titleTextSize,
|
|
167
168
|
tag: titleTag,
|
|
168
169
|
textColor: titleTextColor,
|
|
170
|
+
textTruncate: titleTextTruncate,
|
|
169
171
|
textWeight: titleTextWeight,
|
|
170
172
|
textWrap: titleTextWrap
|
|
171
173
|
}, title), (titleIcon || titleIconSrc) && /*#__PURE__*/React__default.default.createElement(index$1.Icon, {
|
package/dist/components/Input.js
CHANGED
|
@@ -108,13 +108,6 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
108
108
|
prefix: 'width_',
|
|
109
109
|
propsKey: 'width'
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
// const disabledClasses = {
|
|
113
|
-
// 'borderColorClass': 'borderColorDisabledClass',
|
|
114
|
-
// 'placeholderTextColorClass': 'placeholderTextColorDisabledClass',
|
|
115
|
-
// 'textColorClass': 'textColorDisabledClass'
|
|
116
|
-
// }
|
|
117
|
-
|
|
118
111
|
return /*#__PURE__*/React__default.default.createElement("input", {
|
|
119
112
|
className: clsx__default.default(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || weightClass) && 'text', caretClass, !isDisabled ? fillClass : fillDisabledClass, shapeClass || inputConfig.appearance[appearance] && `input_shape_${inputConfig.appearance[appearance].shape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textSizeClass || inputConfig.appearance[appearance] && `text_size_${inputConfig.appearance[appearance].textSize}`.replace(/([A-Z])/g, '-$1').toLowerCase(), weightClass, widthClass, !isDisabled ? borderWidthClass : borderWidthDisabledClass, sizeClass || inputConfig.appearance[appearance] && `input_size_${inputConfig.appearance[appearance].size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderColorClass || inputConfig.appearance[appearance]?.borderColor && `border-color_${inputConfig.appearance[appearance].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), placeholderTextColorClass || inputConfig.appearance[appearance]?.placeholderTextColor && `placeholder-text-color_${inputConfig.appearance[appearance].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textColorClass || inputConfig.appearance[appearance]?.textColor && `text-color_${inputConfig.appearance[appearance].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? borderColorClass || inputConfig.state[state]?.borderColor && `border-color_${inputConfig.state[state].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : borderColorDisabledClass || inputConfig.state[state]?.borderColor && `border-color_disabled_${inputConfig.state[state].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? placeholderTextColorClass || inputConfig.state[state]?.placeholderTextColor && `placeholder-text-color_${inputConfig.state[state].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : placeholderTextColorDisabledClass || inputConfig.state[state]?.placeholderTextColor && `placeholder-text-color_${inputConfig.state[state].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? textColorClass || inputConfig.state[state]?.textColor && `text-color_${inputConfig.state[state].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : textColorDisabledClass || inputConfig.state[state]?.textColor && `text-color_${inputConfig.state[state].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
120
113
|
type: type,
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var PropTypes = require('prop-types');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
7
|
+
require('lodash/castArray');
|
|
8
|
+
require('lodash/camelCase');
|
|
9
|
+
require('../context/UIContext.js');
|
|
10
|
+
require('../hooks/useMediaQueries.js');
|
|
11
|
+
require('react-responsive');
|
|
12
|
+
|
|
13
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
16
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
17
|
+
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
18
|
+
|
|
19
|
+
const inputMaskConfig = {
|
|
20
|
+
state: {},
|
|
21
|
+
setState: newComponent => {
|
|
22
|
+
inputMaskConfig.state = newComponent;
|
|
23
|
+
},
|
|
24
|
+
appearance: {},
|
|
25
|
+
setAppearance: newComponent => {
|
|
26
|
+
inputMaskConfig.appearance = newComponent;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(props, ref) {
|
|
30
|
+
const {
|
|
31
|
+
appearance,
|
|
32
|
+
state,
|
|
33
|
+
id,
|
|
34
|
+
index,
|
|
35
|
+
dataTestId,
|
|
36
|
+
type,
|
|
37
|
+
className,
|
|
38
|
+
name,
|
|
39
|
+
placeholder,
|
|
40
|
+
isDisabled,
|
|
41
|
+
value,
|
|
42
|
+
onBlur,
|
|
43
|
+
onChange,
|
|
44
|
+
onFocus,
|
|
45
|
+
onKeyDown
|
|
46
|
+
} = props;
|
|
47
|
+
const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
48
|
+
prefix: 'fill_',
|
|
49
|
+
propsKey: 'fill'
|
|
50
|
+
});
|
|
51
|
+
const fillDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
52
|
+
prefix: 'fill_disabled_',
|
|
53
|
+
propsKey: 'fillDisabled'
|
|
54
|
+
});
|
|
55
|
+
const sizeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
56
|
+
prefix: 'input_size_',
|
|
57
|
+
propsKey: 'size'
|
|
58
|
+
});
|
|
59
|
+
const shapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
60
|
+
prefix: 'input_shape_',
|
|
61
|
+
propsKey: 'shape'
|
|
62
|
+
});
|
|
63
|
+
const textSizeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
64
|
+
prefix: 'text_size_',
|
|
65
|
+
propsKey: 'textSize'
|
|
66
|
+
});
|
|
67
|
+
const textColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
68
|
+
prefix: 'text-color_',
|
|
69
|
+
propsKey: 'textColor'
|
|
70
|
+
});
|
|
71
|
+
const textColorDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
72
|
+
prefix: 'text-color_disabled_',
|
|
73
|
+
propsKey: 'textColor'
|
|
74
|
+
});
|
|
75
|
+
const caretClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
76
|
+
prefix: 'caret-color_',
|
|
77
|
+
propsKey: 'caret'
|
|
78
|
+
});
|
|
79
|
+
const placeholderTextColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
80
|
+
prefix: 'placeholder-text-color_',
|
|
81
|
+
propsKey: 'placeholderTextColor'
|
|
82
|
+
});
|
|
83
|
+
const placeholderTextColorDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
84
|
+
prefix: 'placeholder-text-color_disabled_',
|
|
85
|
+
propsKey: 'placeholderTextColorDisabled'
|
|
86
|
+
});
|
|
87
|
+
const weightClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
88
|
+
prefix: 'text-weight_',
|
|
89
|
+
propsKey: 'textWeight'
|
|
90
|
+
});
|
|
91
|
+
const borderWidthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
92
|
+
prefix: 'border-width_',
|
|
93
|
+
propsKey: 'borderWidth'
|
|
94
|
+
});
|
|
95
|
+
const borderWidthDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
96
|
+
prefix: 'border-width_disabled_',
|
|
97
|
+
propsKey: 'borderWidthDisabled'
|
|
98
|
+
});
|
|
99
|
+
const borderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
100
|
+
prefix: 'border-color_',
|
|
101
|
+
propsKey: 'borderColor'
|
|
102
|
+
});
|
|
103
|
+
const borderColorDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
104
|
+
prefix: 'border-color_disabled_',
|
|
105
|
+
propsKey: 'borderColorDisabled'
|
|
106
|
+
});
|
|
107
|
+
const widthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
108
|
+
prefix: 'width_',
|
|
109
|
+
propsKey: 'width'
|
|
110
|
+
});
|
|
111
|
+
return /*#__PURE__*/React__default.default.createElement("input", {
|
|
112
|
+
className: clsx__default.default(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || weightClass) && 'text', caretClass, !isDisabled ? fillClass : fillDisabledClass, shapeClass || inputMaskConfig.appearance[appearance] && `input_shape_${inputMaskConfig.appearance[appearance].shape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textSizeClass || inputMaskConfig.appearance[appearance] && `text_size_${inputMaskConfig.appearance[appearance].textSize}`.replace(/([A-Z])/g, '-$1').toLowerCase(), weightClass, widthClass, !isDisabled ? borderWidthClass : borderWidthDisabledClass, sizeClass || inputMaskConfig.appearance[appearance] && `input_size_${inputMaskConfig.appearance[appearance].size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderColorClass || inputMaskConfig.appearance[appearance]?.borderColor && `border-color_${inputMaskConfig.appearance[appearance].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), placeholderTextColorClass || inputMaskConfig.appearance[appearance]?.placeholderTextColor && `placeholder-text-color_${inputMaskConfig.appearance[appearance].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textColorClass || inputMaskConfig.appearance[appearance]?.textColor && `text-color_${inputMaskConfig.appearance[appearance].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? borderColorClass || inputMaskConfig.state[state]?.borderColor && `border-color_${inputMaskConfig.state[state].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : borderColorDisabledClass || inputMaskConfig.state[state]?.borderColor && `border-color_disabled_${inputMaskConfig.state[state].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? placeholderTextColorClass || inputMaskConfig.state[state]?.placeholderTextColor && `placeholder-text-color_${inputMaskConfig.state[state].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : placeholderTextColorDisabledClass || inputMaskConfig.state[state]?.placeholderTextColor && `placeholder-text-color_${inputMaskConfig.state[state].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? textColorClass || inputMaskConfig.state[state]?.textColor && `text-color_${inputMaskConfig.state[state].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : textColorDisabledClass || inputMaskConfig.state[state]?.textColor && `text-color_${inputMaskConfig.state[state].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
113
|
+
type: type,
|
|
114
|
+
id: id,
|
|
115
|
+
index: index,
|
|
116
|
+
ref: ref,
|
|
117
|
+
disabled: isDisabled,
|
|
118
|
+
placeholder: placeholder,
|
|
119
|
+
"data-test-id": dataTestId || (name ? `${name}Input` : 'input'),
|
|
120
|
+
value: value,
|
|
121
|
+
onBlur: onBlur,
|
|
122
|
+
onChange: onChange,
|
|
123
|
+
onFocus: onFocus,
|
|
124
|
+
onKeyDown: onKeyDown
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
Input.propTypes = {
|
|
128
|
+
id: PropTypes__default.default.string,
|
|
129
|
+
className: PropTypes__default.default.string,
|
|
130
|
+
placeholder: PropTypes__default.default.string,
|
|
131
|
+
value: PropTypes__default.default.string,
|
|
132
|
+
checked: PropTypes__default.default.bool,
|
|
133
|
+
isDisabled: PropTypes__default.default.bool,
|
|
134
|
+
onBlur: PropTypes__default.default.func,
|
|
135
|
+
onChange: PropTypes__default.default.func,
|
|
136
|
+
onKeyDown: PropTypes__default.default.func,
|
|
137
|
+
type: PropTypes__default.default.string
|
|
138
|
+
};
|
|
139
|
+
Input.defaultProps = {
|
|
140
|
+
size: 'm',
|
|
141
|
+
type: 'text'
|
|
142
|
+
};
|
|
143
|
+
Input.__docgenInfo = {
|
|
144
|
+
"description": "",
|
|
145
|
+
"methods": [],
|
|
146
|
+
"displayName": "Input",
|
|
147
|
+
"props": {
|
|
148
|
+
"size": {
|
|
149
|
+
"defaultValue": {
|
|
150
|
+
"value": "'m'",
|
|
151
|
+
"computed": false
|
|
152
|
+
},
|
|
153
|
+
"required": false
|
|
154
|
+
},
|
|
155
|
+
"type": {
|
|
156
|
+
"defaultValue": {
|
|
157
|
+
"value": "'text'",
|
|
158
|
+
"computed": false
|
|
159
|
+
},
|
|
160
|
+
"description": "",
|
|
161
|
+
"type": {
|
|
162
|
+
"name": "string"
|
|
163
|
+
},
|
|
164
|
+
"required": false
|
|
165
|
+
},
|
|
166
|
+
"id": {
|
|
167
|
+
"description": "",
|
|
168
|
+
"type": {
|
|
169
|
+
"name": "string"
|
|
170
|
+
},
|
|
171
|
+
"required": false
|
|
172
|
+
},
|
|
173
|
+
"className": {
|
|
174
|
+
"description": "",
|
|
175
|
+
"type": {
|
|
176
|
+
"name": "string"
|
|
177
|
+
},
|
|
178
|
+
"required": false
|
|
179
|
+
},
|
|
180
|
+
"placeholder": {
|
|
181
|
+
"description": "",
|
|
182
|
+
"type": {
|
|
183
|
+
"name": "string"
|
|
184
|
+
},
|
|
185
|
+
"required": false
|
|
186
|
+
},
|
|
187
|
+
"value": {
|
|
188
|
+
"description": "",
|
|
189
|
+
"type": {
|
|
190
|
+
"name": "string"
|
|
191
|
+
},
|
|
192
|
+
"required": false
|
|
193
|
+
},
|
|
194
|
+
"checked": {
|
|
195
|
+
"description": "",
|
|
196
|
+
"type": {
|
|
197
|
+
"name": "bool"
|
|
198
|
+
},
|
|
199
|
+
"required": false
|
|
200
|
+
},
|
|
201
|
+
"isDisabled": {
|
|
202
|
+
"description": "",
|
|
203
|
+
"type": {
|
|
204
|
+
"name": "bool"
|
|
205
|
+
},
|
|
206
|
+
"required": false
|
|
207
|
+
},
|
|
208
|
+
"onBlur": {
|
|
209
|
+
"description": "",
|
|
210
|
+
"type": {
|
|
211
|
+
"name": "func"
|
|
212
|
+
},
|
|
213
|
+
"required": false
|
|
214
|
+
},
|
|
215
|
+
"onChange": {
|
|
216
|
+
"description": "",
|
|
217
|
+
"type": {
|
|
218
|
+
"name": "func"
|
|
219
|
+
},
|
|
220
|
+
"required": false
|
|
221
|
+
},
|
|
222
|
+
"onKeyDown": {
|
|
223
|
+
"description": "",
|
|
224
|
+
"type": {
|
|
225
|
+
"name": "func"
|
|
226
|
+
},
|
|
227
|
+
"required": false
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
exports.Input = Input;
|
|
233
|
+
exports.inputMaskConfig = inputMaskConfig;
|
|
@@ -55,7 +55,7 @@ const inputPasswordConfig = {
|
|
|
55
55
|
inputPasswordConfig.appearance = newComponent;
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function InputMask(props) {
|
|
59
59
|
const {
|
|
60
60
|
appearance,
|
|
61
61
|
state,
|
|
@@ -152,7 +152,7 @@ function InputPassword(props) {
|
|
|
152
152
|
onClick: revealeHandler
|
|
153
153
|
}));
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
InputMask.propTypes = {
|
|
156
156
|
id: PropTypes__default.default.string,
|
|
157
157
|
className: PropTypes__default.default.string,
|
|
158
158
|
placeholder: PropTypes__default.default.string,
|
|
@@ -164,14 +164,14 @@ InputPassword.propTypes = {
|
|
|
164
164
|
onKeyDown: PropTypes__default.default.func,
|
|
165
165
|
type: PropTypes__default.default.string
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
InputMask.defaultProps = {
|
|
168
168
|
size: 'm',
|
|
169
169
|
type: 'text'
|
|
170
170
|
};
|
|
171
|
-
|
|
171
|
+
InputMask.__docgenInfo = {
|
|
172
172
|
"description": "",
|
|
173
173
|
"methods": [],
|
|
174
|
-
"displayName": "
|
|
174
|
+
"displayName": "InputMask",
|
|
175
175
|
"props": {
|
|
176
176
|
"size": {
|
|
177
177
|
"defaultValue": {
|
|
@@ -257,5 +257,5 @@ InputPassword.__docgenInfo = {
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
|
|
260
|
-
exports.
|
|
260
|
+
exports.InputMask = InputMask;
|
|
261
261
|
exports.inputPasswordConfig = inputPasswordConfig;
|
package/dist/components/Label.js
CHANGED
|
@@ -136,7 +136,7 @@ function Label(props) {
|
|
|
136
136
|
// } = labelAppearanceItem
|
|
137
137
|
|
|
138
138
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
139
|
-
className: clsx__default.default(className, 'label', fillClass || labelAppearanceItem.fill && `fill_${labelAppearanceItem.fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || labelAppearanceItem.fillHover && `fill_hover_${labelAppearanceItem.fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, borderClass, borderTypeClass, sizeClass, wrapClass, widthClass, alignDirectionClass, alignClass, type && `label_type_${type}`, set && `label_set_${set}`, mode && `label_mode_${mode}`, onClick && (cursor || 'cursor_type_pointer')),
|
|
139
|
+
className: clsx__default.default(className, 'label', fillClass || labelAppearanceItem.fill && `fill_${labelAppearanceItem.fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || labelAppearanceItem.fillHover && `fill_hover_${labelAppearanceItem.fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass || labelAppearanceItem.shape && `label_shape_${labelAppearanceItem.shape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderClass, borderTypeClass, sizeClass || labelAppearanceItem.size && `label_size_${labelAppearanceItem.size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), wrapClass, widthClass, alignDirectionClass, alignClass, type && `label_type_${type}`, set && `label_set_${set}`, mode && `label_mode_${mode}`, onClick && (cursor || 'cursor_type_pointer')),
|
|
140
140
|
"data-tour": dataTour,
|
|
141
141
|
style: labelStyles,
|
|
142
142
|
onClick: onClick,
|
|
@@ -146,12 +146,12 @@ function Label(props) {
|
|
|
146
146
|
className: "label__inner"
|
|
147
147
|
}, typeof label === 'string' ? /*#__PURE__*/React__default.default.createElement(index.Text, {
|
|
148
148
|
className: "label__label",
|
|
149
|
-
size: labelTextSize,
|
|
149
|
+
size: labelTextSize || labelAppearanceItem.labelTextSize,
|
|
150
150
|
textColor: labelTextColor || labelAppearanceItem.labelTextColor,
|
|
151
151
|
textColorHover: labelTextColorHover || labelAppearanceItem.labelTextColorHover,
|
|
152
152
|
textWeight: labelTextWeight || labelAppearanceItem.labelTextWeight,
|
|
153
153
|
textWrap: labelTextWrap
|
|
154
|
-
}, label) : /*#__PURE__*/React__default.default.createElement("div", {
|
|
154
|
+
}, label || labelAppearanceItem.label) : /*#__PURE__*/React__default.default.createElement("div", {
|
|
155
155
|
className: "label__label"
|
|
156
156
|
}, label), children, showTooltip && /*#__PURE__*/React__default.default.createElement(index$1.Tooltip, {
|
|
157
157
|
alignment: tooltipAlignment,
|
|
@@ -98,6 +98,7 @@ function Response(props) {
|
|
|
98
98
|
secondaryButtonShape,
|
|
99
99
|
secondaryButtonSize,
|
|
100
100
|
secondaryButtonWidth,
|
|
101
|
+
set,
|
|
101
102
|
onClickPrimaryButton,
|
|
102
103
|
onClickSecondaryButton
|
|
103
104
|
} = props;
|
|
@@ -144,8 +145,8 @@ function Response(props) {
|
|
|
144
145
|
propsKey: 'borderType'
|
|
145
146
|
});
|
|
146
147
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
147
|
-
className: clsx__default.default(className, 'response', fillClass, fillHoverClass, shapeClass, borderColorClass, borderColorHoverClass, borderWidthClass, borderTypeClass)
|
|
148
|
-
}, before, ImageComponent, /*#__PURE__*/React__default.default.createElement(index.Group, {
|
|
148
|
+
className: clsx__default.default(className, 'response', fillClass, fillHoverClass, shapeClass, borderColorClass, borderColorHoverClass, borderWidthClass, borderTypeClass, set && `response_set_${set}`)
|
|
149
|
+
}, before, ImageComponent || responseConfig.appearance[appearance]?.imageSrc, /*#__PURE__*/React__default.default.createElement(index.Group, {
|
|
149
150
|
className: "response__desc",
|
|
150
151
|
width: "fill"
|
|
151
152
|
}, title && /*#__PURE__*/React__default.default.createElement(index$1.Title, {
|
|
@@ -157,31 +158,31 @@ function Response(props) {
|
|
|
157
158
|
className: "response__message",
|
|
158
159
|
size: messageTextSize || responseConfig.appearance[appearance]?.messageTextSize,
|
|
159
160
|
textColor: messageTextColor || responseConfig.appearance[appearance]?.messageTextColor
|
|
160
|
-
}, message)), (primaryButtonLabel || primaryButton || secondaryButtonLabel || secondaryButton) && /*#__PURE__*/React__default.default.createElement(index.Group, {
|
|
161
|
+
}, message)), (primaryButtonLabel || responseConfig.appearance[appearance]?.primaryButtonLabel || primaryButton || secondaryButtonLabel || responseConfig.appearance[appearance]?.secondaryButtonLabel || secondaryButton) && /*#__PURE__*/React__default.default.createElement(index.Group, {
|
|
161
162
|
className: "response__button",
|
|
162
163
|
width: "fill"
|
|
163
|
-
}, primaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(index$3.Button, {
|
|
164
|
+
}, primaryButtonLabel || responseConfig.appearance[appearance].primaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(index$3.Button, {
|
|
164
165
|
after: primaryButtonAfter,
|
|
165
|
-
appearance: primaryButtonAppearance || responseConfig.appearance[appearance]?.primaryButtonAppearance,
|
|
166
|
+
appearance: primaryButtonAppearance || responseConfig.appearance[appearance]?.primaryButtonAppearance || 'dev',
|
|
166
167
|
before: primaryButtonBefore,
|
|
167
168
|
className: "response__button-item",
|
|
168
169
|
fill: primaryButtonFill,
|
|
169
170
|
fillHover: primaryButtonFillHover,
|
|
170
|
-
label: primaryButtonLabel,
|
|
171
|
+
label: primaryButtonLabel || responseConfig.appearance[appearance].primaryButtonLabel,
|
|
171
172
|
labelTextColor: primaryButtonLabelTextColor,
|
|
172
173
|
labelTextSize: primaryButtonLabelTextSize || responseConfig.appearance[appearance]?.primaryButtonLabelTextSize,
|
|
173
174
|
shape: primaryButtonShape || responseConfig.appearance[appearance]?.primaryButtonShape,
|
|
174
175
|
size: primaryButtonSize || responseConfig.appearance[appearance]?.primaryButtonSize,
|
|
175
176
|
width: primaryButtonWidth || responseConfig.appearance[appearance]?.primaryButtonWidth,
|
|
176
177
|
onClick: onClickPrimaryButton
|
|
177
|
-
}) : primaryButton, secondaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(index$3.Button, {
|
|
178
|
+
}) : primaryButton, secondaryButtonLabel || responseConfig.appearance[appearance]?.secondaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(index$3.Button, {
|
|
178
179
|
after: secondaryButtonAfter,
|
|
179
|
-
appearance: secondaryButtonAppearance || responseConfig.appearance[appearance]?.secondaryButtonAppearance,
|
|
180
|
+
appearance: secondaryButtonAppearance || responseConfig.appearance[appearance]?.secondaryButtonAppearance || 'dev',
|
|
180
181
|
before: secondaryButtonBefore,
|
|
181
182
|
className: "response__button-item",
|
|
182
183
|
fill: secondaryButtonFill,
|
|
183
184
|
fillHover: secondaryButtonFillHover,
|
|
184
|
-
label: secondaryButtonLabel,
|
|
185
|
+
label: secondaryButtonLabel || responseConfig.appearance[appearance].secondaryButtonLabel,
|
|
185
186
|
labelTextColor: secondaryButtonLabelTextColor,
|
|
186
187
|
labelTextSize: secondaryButtonLabelTextSize || responseConfig.appearance[appearance]?.secondaryButtonLabelTextSize,
|
|
187
188
|
shape: secondaryButtonShape || responseConfig.appearance[appearance]?.secondaryButtonShape,
|
|
@@ -47,9 +47,16 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
47
47
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
48
48
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
49
49
|
|
|
50
|
+
const searchInputConfig = {
|
|
51
|
+
appearance: {},
|
|
52
|
+
setAppearance: newComponent => {
|
|
53
|
+
searchInputConfig.appearance = newComponent;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
50
56
|
const SearchInput = /*#__PURE__*/React__default.default.forwardRef(function SearchInput(props, ref) {
|
|
51
57
|
const {
|
|
52
58
|
after,
|
|
59
|
+
appearance,
|
|
53
60
|
before,
|
|
54
61
|
className,
|
|
55
62
|
size,
|
|
@@ -146,7 +153,7 @@ const SearchInput = /*#__PURE__*/React__default.default.forwardRef(function Sear
|
|
|
146
153
|
styles: searchInputStyles
|
|
147
154
|
} = useStyles.useStyles(props);
|
|
148
155
|
return /*#__PURE__*/React__default.default.createElement("label", {
|
|
149
|
-
className: clsx__default.default(className, 'search-input', shapeClass, fillClass, widthClass, borderColorClass, borderColorHoverClass, borderWidthClass, borderTypeClass, size && `search-input_size_${size}`, type && `search-input_type_${type}`),
|
|
156
|
+
className: clsx__default.default(className, 'search-input', shapeClass || searchInputConfig.appearance[appearance] && `search_shape_${searchInputConfig.appearance[appearance].shape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillClass || searchInputConfig.appearance[appearance] && `fill_${searchInputConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), widthClass, borderColorClass || searchInputConfig.appearance[appearance] && `border-color_${searchInputConfig.appearance[appearance].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderColorHoverClass || searchInputConfig.appearance[appearance] && `border-color_hover_${searchInputConfig.appearance[appearance].borderHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderWidthClass, borderTypeClass, size && `search-input_size_${size}`, type && `search-input_type_${type}`),
|
|
150
157
|
"data-tour": dataTour,
|
|
151
158
|
style: searchInputStyles
|
|
152
159
|
}, before, (iconBefore || iconBeforeSrc) && /*#__PURE__*/React__default.default.createElement(index.Icon, {
|
|
@@ -172,7 +179,7 @@ const SearchInput = /*#__PURE__*/React__default.default.forwardRef(function Sear
|
|
|
172
179
|
}, /*#__PURE__*/React__default.default.createElement(index$1.Text, {
|
|
173
180
|
className: clsx__default.default('search-input__placeholder-value'),
|
|
174
181
|
size: placeholderTextSize,
|
|
175
|
-
textColor: placeholderTextColor,
|
|
182
|
+
textColor: placeholderTextColor || searchInputConfig.appearance[appearance].placeholderTextColor,
|
|
176
183
|
textStyle: placeholderTextStyle,
|
|
177
184
|
textWeight: placeholderTextWeight
|
|
178
185
|
}, placeholder || 'Search')), value && /*#__PURE__*/React__default.default.createElement(index.Icon, {
|
|
@@ -229,7 +236,8 @@ SearchInput.propTypes = {
|
|
|
229
236
|
};
|
|
230
237
|
SearchInput.defaultProps = {
|
|
231
238
|
placeholderTextSize: 'm',
|
|
232
|
-
inputTextSize: 'm'
|
|
239
|
+
inputTextSize: 'm',
|
|
240
|
+
size: 'normal'
|
|
233
241
|
};
|
|
234
242
|
SearchInput.__docgenInfo = {
|
|
235
243
|
"description": "",
|
|
@@ -258,6 +266,13 @@ SearchInput.__docgenInfo = {
|
|
|
258
266
|
},
|
|
259
267
|
"required": false
|
|
260
268
|
},
|
|
269
|
+
"size": {
|
|
270
|
+
"defaultValue": {
|
|
271
|
+
"value": "'normal'",
|
|
272
|
+
"computed": false
|
|
273
|
+
},
|
|
274
|
+
"required": false
|
|
275
|
+
},
|
|
261
276
|
"after": {
|
|
262
277
|
"description": "",
|
|
263
278
|
"type": {
|
|
@@ -553,3 +568,4 @@ SearchResult.__docgenInfo = {
|
|
|
553
568
|
|
|
554
569
|
exports.SearchInput = SearchInput;
|
|
555
570
|
exports.SearchResult = SearchResult;
|
|
571
|
+
exports.searchInputConfig = searchInputConfig;
|
package/dist/components/Tab.js
CHANGED
|
@@ -141,7 +141,7 @@ function Tab(props) {
|
|
|
141
141
|
styles: tab
|
|
142
142
|
} = useStyles.useStyles(props);
|
|
143
143
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
144
|
-
className: clsx__default.default('tab', isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', isHover && 'tab_state_hover', fillClass || (isDisabled ? fillDisabledClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fillDisabled}`.replace(/([A-Z])/g, '-$1').toLowerCase() : fillClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase()), fillHoverClass || (isDisabled ? null : tabConfig.appearance[appearance] && `fill_hover_${tabConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase()), className, sizeClass, fillActiveClass, fillActiveHoverClass, shapeClass, typeClass, widthClass, reset && 'tab-reset', set && `tab_set_${set}`, justifyContentClass, onClick && 'cursor_type_pointer'),
|
|
144
|
+
className: clsx__default.default('tab', isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', isHover && 'tab_state_hover', fillClass || (isDisabled ? fillDisabledClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fillDisabled}`.replace(/([A-Z])/g, '-$1').toLowerCase() : fillClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase()), fillHoverClass || (isDisabled ? null : tabConfig.appearance[appearance] && `fill_hover_${tabConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase()), className, sizeClass || tabConfig.appearance[appearance] && `tab_size_${tabConfig.appearance[appearance]?.size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillActiveClass, fillActiveHoverClass, shapeClass, typeClass || tabConfig.appearance[appearance] && `tab_type_${tabConfig.appearance[appearance].type}`.replace(/([A-Z])/g, '-$1').toLowerCase(), widthClass, reset && 'tab-reset', set && `tab_set_${set}`, justifyContentClass, onClick && 'cursor_type_pointer'),
|
|
145
145
|
"data-tour": dataTour,
|
|
146
146
|
style: tab,
|
|
147
147
|
onClick: onClick,
|
|
@@ -154,9 +154,9 @@ function Tab(props) {
|
|
|
154
154
|
target: target
|
|
155
155
|
}, /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, before, children || /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, /*#__PURE__*/React__default.default.createElement("div", {
|
|
156
156
|
className: "tab__wrapper"
|
|
157
|
-
}, label && /*#__PURE__*/React__default.default.createElement(index$1.Text, {
|
|
157
|
+
}, (label || tabConfig.appearance[appearance].label) && /*#__PURE__*/React__default.default.createElement(index$1.Text, {
|
|
158
158
|
className: "tab__label",
|
|
159
|
-
size: labelTextSize,
|
|
159
|
+
size: labelTextSize || tabConfig.appearance[appearance].labelTextSize,
|
|
160
160
|
textColor: isDisabled ? labelColorDisabled || tabConfig.appearance[appearance].labelColorDisabled : labelColor || tabConfig.appearance[appearance].labelColor,
|
|
161
161
|
textColorActive: isActive && (labelColorActive || tabConfig.appearance[appearance].labelColorActive),
|
|
162
162
|
textColorGradient: labelTextGradient,
|
|
@@ -164,11 +164,11 @@ function Tab(props) {
|
|
|
164
164
|
textStyle: labelTextStyle,
|
|
165
165
|
textWeight: labelTextWeight,
|
|
166
166
|
textWrap: labelTextWrap
|
|
167
|
-
}, dividerFillActive, " ", label), badgeValue && /*#__PURE__*/React__default.default.createElement(index$2.Badge, {
|
|
168
|
-
appearance: badgeAppearance,
|
|
169
|
-
size: badgeSize,
|
|
170
|
-
textSize: badgeTextSize,
|
|
171
|
-
value: badgeValue
|
|
167
|
+
}, dividerFillActive, " ", label || tabConfig.appearance[appearance].label), (badgeValue || tabConfig.appearance[appearance].badgeValue) && /*#__PURE__*/React__default.default.createElement(index$2.Badge, {
|
|
168
|
+
appearance: badgeAppearance || tabConfig.appearance[appearance].badgeAppearance,
|
|
169
|
+
size: badgeSize || tabConfig.appearance[appearance].badgeSize,
|
|
170
|
+
textSize: badgeTextSize || tabConfig.appearance[appearance].badgeTextSize,
|
|
171
|
+
value: badgeValue || tabConfig.appearance[appearance].badgeValue
|
|
172
172
|
})), /*#__PURE__*/React__default.default.createElement(index$3.Divider, {
|
|
173
173
|
direction: dividerDirection,
|
|
174
174
|
fill: isDisabled ? dividerFillDisabled || tabConfig.appearance[appearance].dividerFillDisabled : dividerFill || tabConfig.appearance[appearance].dividerFill,
|
package/dist/components/Text.js
CHANGED
|
@@ -49,9 +49,6 @@ function Text(props) {
|
|
|
49
49
|
type,
|
|
50
50
|
onClick
|
|
51
51
|
} = props;
|
|
52
|
-
const {
|
|
53
|
-
styles: textStyles
|
|
54
|
-
} = useStyles.useStyles(props);
|
|
55
52
|
const cursorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
56
53
|
prefix: 'cursor_',
|
|
57
54
|
propsKey: 'cursor'
|
|
@@ -100,6 +97,9 @@ function Text(props) {
|
|
|
100
97
|
prefix: 'width_',
|
|
101
98
|
propsKey: 'width'
|
|
102
99
|
});
|
|
100
|
+
const {
|
|
101
|
+
styles: textStyles
|
|
102
|
+
} = useStyles.useStyles(props);
|
|
103
103
|
return /*#__PURE__*/React__default.default.createElement(Tag, {
|
|
104
104
|
className: clsx__default.default(className, 'text', sizeClass || textConfig.appearance[appearance] && `text_size_${textConfig.appearance[appearance].size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), weightClass, textAlignClass, textColorClass || textConfig.appearance[appearance] && `text-color_${textConfig.appearance[appearance].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textColorActiveClass, textColorHoverClass, textGradientClass, textStyleClass, textTruncateClass, textWrapClass, type && `text_type_${type}`, mode && `text_mode_${mode}`, widthClass, cursorClass, onClick && (cursor || 'cursor_type_pointer')),
|
|
105
105
|
"data-tour": dataTour,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.input {
|
|
2
|
+
min-width: unset;
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin: 0;
|
|
5
|
+
border: none;
|
|
6
|
+
position: relative;
|
|
7
|
+
box-shadow: none;
|
|
8
|
+
appearance: none;
|
|
9
|
+
outline: 0;
|
|
10
|
+
caret-color: var(--input-caret-color);
|
|
11
|
+
&:disabled {
|
|
12
|
+
background: var(--input-state-disabled-background, #ECECEC);
|
|
13
|
+
border: solid 1px var(--input-state-disabled-border, #747474);
|
|
14
|
+
&:hover {
|
|
15
|
+
background: var(--input-state-disabled-background, #ECECEC);
|
|
16
|
+
border: solid 1px var(--input-state-disabled-border, #747474);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
&:focus {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
&:hover {
|
|
23
|
+
background: var(--input-state-hover-background);
|
|
24
|
+
border: solid 1px var(--input-state-hover-border);
|
|
25
|
+
}
|
|
26
|
+
&&_state {
|
|
27
|
+
&_success {
|
|
28
|
+
background: var(--input-state-success-background);
|
|
29
|
+
border: solid 1px var(--input-state-success-border);
|
|
30
|
+
}
|
|
31
|
+
&_error {
|
|
32
|
+
background: var(--input-state-error-background);
|
|
33
|
+
border: solid 1px var(--input-state-error-border);
|
|
34
|
+
}
|
|
35
|
+
&_focus {
|
|
36
|
+
background: var(--input-state-focus-background);
|
|
37
|
+
border: solid 1px var(--input-state-focus-border);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.input {
|
|
42
|
+
&_shape {
|
|
43
|
+
&_rounded {
|
|
44
|
+
border-radius: var(--input-shape-rounded, 4px);
|
|
45
|
+
position: relative;
|
|
46
|
+
}
|
|
47
|
+
&_underline {
|
|
48
|
+
border-left: none !important;
|
|
49
|
+
border-top: none !important;
|
|
50
|
+
border-right: none !important;
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.input {
|
|
56
|
+
&&_size {
|
|
57
|
+
@each $size in xs, s, m, l, xl, xxl, normal, tiny, compact, large {
|
|
58
|
+
&_$(size) {
|
|
59
|
+
padding: var(--input-size-$(size)-padding);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.input {
|
|
65
|
+
&_type {
|
|
66
|
+
&_number {
|
|
67
|
+
appearance: none;
|
|
68
|
+
&[type='number'] {
|
|
69
|
+
appearance: textfield;
|
|
70
|
+
}
|
|
71
|
+
&::-webkit-outer-spin-button,
|
|
72
|
+
&::-webkit-inner-spin-button {
|
|
73
|
+
appearance: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
align-items: flex-start;
|
|
8
8
|
}
|
|
9
9
|
&-center {
|
|
10
|
-
align-items: center;
|
|
11
10
|
text-align: center;
|
|
11
|
+
align-items: center;
|
|
12
12
|
}
|
|
13
13
|
&-right {
|
|
14
|
-
align-items: flex-end;
|
|
15
14
|
text-align: right;
|
|
15
|
+
align-items: flex-end;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
&^&_left {
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
align-items: flex-start;
|
|
21
21
|
}
|
|
22
22
|
&^&_center {
|
|
23
|
+
text-align: center;
|
|
23
24
|
justify-content: center;
|
|
24
25
|
align-items: center;
|
|
25
|
-
text-align: center;
|
|
26
26
|
}
|
|
27
27
|
&^&_right {
|
|
28
|
+
text-align: right;
|
|
28
29
|
justify-content: center;
|
|
29
30
|
align-items: flex-end;
|
|
30
|
-
text-align: right;
|
|
31
31
|
}
|
|
32
32
|
&^&_bottom {
|
|
33
33
|
&-left {
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
align-items: flex-start;
|
|
36
36
|
}
|
|
37
37
|
&-center {
|
|
38
|
+
text-align: center;
|
|
38
39
|
justify-content: flex-end;
|
|
39
40
|
align-items: center;
|
|
40
|
-
text-align: center;
|
|
41
41
|
}
|
|
42
42
|
&-right {
|
|
43
|
+
text-align: right;
|
|
43
44
|
justify-content: flex-end;
|
|
44
45
|
align-items: flex-end;
|
|
45
|
-
text-align: right;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
align-items: flex-end;
|
|
16
16
|
}
|
|
17
17
|
&-auto {
|
|
18
|
-
justify-content: space-between;
|
|
19
18
|
text-align: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
20
|
align-items: center;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
align-items: flex-start;
|
|
26
26
|
}
|
|
27
27
|
&^&_center {
|
|
28
|
+
text-align: center;
|
|
28
29
|
justify-content: center;
|
|
29
30
|
align-items: center;
|
|
30
|
-
text-align: center;
|
|
31
31
|
&-auto {
|
|
32
|
-
|
|
33
|
-
text-align: center;
|
|
32
|
+
text-align: center;
|
|
34
33
|
justify-content: space-between;
|
|
34
|
+
align-items: center;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
&^&_right {
|
|
38
|
+
text-align: right;
|
|
38
39
|
justify-content: center;
|
|
39
40
|
align-items: flex-end;
|
|
40
|
-
text-align: right;
|
|
41
41
|
}
|
|
42
42
|
&^&_bottom {
|
|
43
43
|
&-left {
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
align-items: flex-start;
|
|
46
46
|
}
|
|
47
47
|
&-center {
|
|
48
|
+
text-align: center;
|
|
48
49
|
justify-content: flex-end;
|
|
49
50
|
align-items: center;
|
|
50
|
-
text-align: center;
|
|
51
51
|
}
|
|
52
52
|
&-right {
|
|
53
|
+
text-align: right;
|
|
53
54
|
justify-content: flex-end;
|
|
54
55
|
align-items: flex-end;
|
|
55
|
-
text-align: right;
|
|
56
56
|
}
|
|
57
57
|
&-auto {
|
|
58
|
-
align-items: center;
|
|
59
58
|
text-align: center;
|
|
60
59
|
justify-content: space-between;
|
|
60
|
+
align-items: center;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.border-color {
|
|
2
|
-
@each $type in accent, primary, secondary, tertiary, surface, success,
|
|
2
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
3
3
|
&_$(type) {
|
|
4
4
|
&-border {
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover, invert {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.border-color {
|
|
2
|
-
@each $type in accent, primary, secondary, tertiary, surface, success,
|
|
2
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
3
3
|
&_focus {
|
|
4
4
|
&_$(type) {
|
|
5
5
|
&-border {
|
|
6
|
-
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover
|
|
6
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover {
|
|
7
7
|
&-$(color) {
|
|
8
8
|
&:focus {
|
|
9
9
|
outline: 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.border-color {
|
|
2
2
|
&_hover {
|
|
3
|
-
@each $type in accent, primary, secondary, tertiary, surface, success,
|
|
3
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
4
4
|
&_$(type) {
|
|
5
5
|
&-border {
|
|
6
6
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.caret-color {
|
|
2
|
-
@each $type in accent, primary, secondary, tertiary, surface, success,
|
|
2
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
3
3
|
&_$(type) {
|
|
4
4
|
&-item {
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.fill {
|
|
2
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
2
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
3
3
|
&_$(type) {
|
|
4
4
|
&-item {
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
30
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
31
31
|
&_$(type) {
|
|
32
32
|
&-primary {
|
|
33
33
|
background: var(--color-$(type)-primary);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.fill {
|
|
2
2
|
&_active {
|
|
3
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
3
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
4
4
|
&_$(type) {
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active {
|
|
6
6
|
&-$(color) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
12
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
13
13
|
&_$(type) {
|
|
14
14
|
&-primary {
|
|
15
15
|
&-active {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.fill {
|
|
2
2
|
&_active {
|
|
3
3
|
&_hover {
|
|
4
|
-
@each $type in accent, primary, secondary, tertiary, surface, success,
|
|
4
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
5
5
|
&_$(type) {
|
|
6
6
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
7
7
|
&-$(color) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, surface, success,
|
|
15
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
16
16
|
&_$(type) {
|
|
17
17
|
&-primary {
|
|
18
18
|
background: var(--color-$(type)-primary);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.fill {
|
|
2
2
|
&_disabled {
|
|
3
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
3
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
4
4
|
&_$(type) {
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
6
6
|
&-$(color) {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
14
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
15
15
|
&_$(type) {
|
|
16
16
|
&-primary {
|
|
17
17
|
background: var(--color-$(type)-primary);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.fill {
|
|
2
2
|
&_hover {
|
|
3
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
3
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
4
4
|
&_$(type) {
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
6
6
|
&-$(color) {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success,
|
|
19
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
|
|
20
20
|
&_$(type) {
|
|
21
21
|
&-primary {
|
|
22
22
|
&:hover {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { buttonConfig } from '@itcase/ui/components/Button'
|
|
2
|
-
import {
|
|
3
|
-
import { Image } from '@itcase/ui/components/Image'
|
|
2
|
+
import { Response } from '@itcase/ui/components/Response'
|
|
4
3
|
import {
|
|
5
4
|
fillHoverProps,
|
|
6
5
|
fillProps,
|
|
@@ -17,7 +16,7 @@ buttonConfig.setAppearance(buttonAppearance)
|
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
18
|
title: 'Components / NotFound',
|
|
20
|
-
component:
|
|
19
|
+
component: Response,
|
|
21
20
|
argTypes: {
|
|
22
21
|
advancedProps: { control: 'boolean' },
|
|
23
22
|
buttonAfter: {
|
|
@@ -80,7 +79,7 @@ export default {
|
|
|
80
79
|
|
|
81
80
|
export const Default = {
|
|
82
81
|
args: {
|
|
83
|
-
|
|
82
|
+
imageSrc: 'assets/img/search.svg',
|
|
84
83
|
message: 'Nothing found',
|
|
85
84
|
messageTextColor: 'surfaceTextPrimary',
|
|
86
85
|
messageTextSize: 'l',
|
package/package.json
CHANGED
package/dist/components/Empty.js
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var PropTypes = require('prop-types');
|
|
5
|
-
var size = require('../constants/componentProps/size.js');
|
|
6
|
-
var fill = require('../constants/componentProps/fill.js');
|
|
7
|
-
var shape = require('../constants/componentProps/shape.js');
|
|
8
|
-
var width = require('../constants/componentProps/width.js');
|
|
9
|
-
var textColor = require('../constants/componentProps/textColor.js');
|
|
10
|
-
var index$1 = require('./Button.js');
|
|
11
|
-
var index = require('./Text.js');
|
|
12
|
-
require('clsx');
|
|
13
|
-
require('./Icon.js');
|
|
14
|
-
require('react-inlinesvg');
|
|
15
|
-
require('./Link.js');
|
|
16
|
-
require('../constants/componentProps/textGradient.js');
|
|
17
|
-
require('../constants/componentProps/textStyle.js');
|
|
18
|
-
require('../constants/componentProps/textWeight.js');
|
|
19
|
-
require('../constants/componentProps/type.js');
|
|
20
|
-
require('../constants/componentProps/underline.js');
|
|
21
|
-
require('../hooks/useStyles.js');
|
|
22
|
-
require('lodash/camelCase');
|
|
23
|
-
require('lodash/maxBy');
|
|
24
|
-
require('lodash/upperFirst');
|
|
25
|
-
require('../hooks/styleAttributes.js');
|
|
26
|
-
require('../context/UIContext.js');
|
|
27
|
-
require('../hooks/useMediaQueries.js');
|
|
28
|
-
require('react-responsive');
|
|
29
|
-
require('../hooks/useDeviceTargetClass.js');
|
|
30
|
-
require('lodash/castArray');
|
|
31
|
-
require('../constants/componentProps/borderColor.js');
|
|
32
|
-
require('../constants/componentProps/borderType.js');
|
|
33
|
-
require('../constants/componentProps/iconSize.js');
|
|
34
|
-
require('../constants/componentProps/strokeColor.js');
|
|
35
|
-
require('./Tooltip.js');
|
|
36
|
-
require('./Title.js');
|
|
37
|
-
require('../constants/componentProps/textAlign.js');
|
|
38
|
-
require('../constants/componentProps/titleSize.js');
|
|
39
|
-
require('../constants/componentProps/wrap.js');
|
|
40
|
-
require('../constants/componentProps/textSize.js');
|
|
41
|
-
require('./Loader.js');
|
|
42
|
-
require('../constants/componentProps/textColorActive.js');
|
|
43
|
-
require('../constants/componentProps/textColorHover.js');
|
|
44
|
-
|
|
45
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
46
|
-
|
|
47
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
48
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
49
|
-
|
|
50
|
-
function Empty(props) {
|
|
51
|
-
const {
|
|
52
|
-
before,
|
|
53
|
-
message,
|
|
54
|
-
messageTextColor,
|
|
55
|
-
messageTextSize,
|
|
56
|
-
buttonAfter,
|
|
57
|
-
buttonAppearance,
|
|
58
|
-
buttonBefore,
|
|
59
|
-
buttonFill,
|
|
60
|
-
buttonFillHover,
|
|
61
|
-
buttonLabel,
|
|
62
|
-
buttonLabelTextColor,
|
|
63
|
-
buttonLabelTextSize,
|
|
64
|
-
buttonShape,
|
|
65
|
-
buttonSize,
|
|
66
|
-
buttonWidth
|
|
67
|
-
} = props;
|
|
68
|
-
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
69
|
-
className: "empty"
|
|
70
|
-
}, before, message && /*#__PURE__*/React__default.default.createElement(index.Text, {
|
|
71
|
-
className: "empty__message",
|
|
72
|
-
size: messageTextSize,
|
|
73
|
-
textColor: messageTextColor
|
|
74
|
-
}, message), buttonLabel && /*#__PURE__*/React__default.default.createElement(index$1.Button, {
|
|
75
|
-
after: buttonAfter,
|
|
76
|
-
appearance: buttonAppearance,
|
|
77
|
-
before: buttonBefore,
|
|
78
|
-
className: "empty__button",
|
|
79
|
-
fill: buttonFill,
|
|
80
|
-
fillHover: buttonFillHover,
|
|
81
|
-
label: buttonLabel,
|
|
82
|
-
labelTextColor: buttonLabelTextColor,
|
|
83
|
-
labelTextSize: buttonLabelTextSize,
|
|
84
|
-
shape: buttonShape,
|
|
85
|
-
size: buttonSize,
|
|
86
|
-
width: buttonWidth
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
Empty.propTypes = {
|
|
90
|
-
before: PropTypes__default.default.any,
|
|
91
|
-
buttonAfter: PropTypes__default.default.any,
|
|
92
|
-
buttonBefore: PropTypes__default.default.any,
|
|
93
|
-
buttonFill: PropTypes__default.default.oneOf(fill.default),
|
|
94
|
-
buttonFillHover: PropTypes__default.default.oneOf(fill.default),
|
|
95
|
-
buttonLabel: PropTypes__default.default.string,
|
|
96
|
-
buttonLabelTextColor: PropTypes__default.default.oneOf(textColor.default),
|
|
97
|
-
buttonLabelTextSize: PropTypes__default.default.oneOf(size.default),
|
|
98
|
-
buttonShape: PropTypes__default.default.oneOf(shape.default),
|
|
99
|
-
buttonSize: PropTypes__default.default.oneOf(size.default),
|
|
100
|
-
buttonWidth: PropTypes__default.default.oneOf(width.default),
|
|
101
|
-
message: PropTypes__default.default.string,
|
|
102
|
-
messageTextColor: PropTypes__default.default.oneOf(textColor.default),
|
|
103
|
-
messageTextSize: PropTypes__default.default.oneOf(size.default)
|
|
104
|
-
};
|
|
105
|
-
Empty.__docgenInfo = {
|
|
106
|
-
"description": "",
|
|
107
|
-
"methods": [],
|
|
108
|
-
"displayName": "Empty",
|
|
109
|
-
"props": {
|
|
110
|
-
"before": {
|
|
111
|
-
"description": "",
|
|
112
|
-
"type": {
|
|
113
|
-
"name": "any"
|
|
114
|
-
},
|
|
115
|
-
"required": false
|
|
116
|
-
},
|
|
117
|
-
"buttonAfter": {
|
|
118
|
-
"description": "",
|
|
119
|
-
"type": {
|
|
120
|
-
"name": "any"
|
|
121
|
-
},
|
|
122
|
-
"required": false
|
|
123
|
-
},
|
|
124
|
-
"buttonBefore": {
|
|
125
|
-
"description": "",
|
|
126
|
-
"type": {
|
|
127
|
-
"name": "any"
|
|
128
|
-
},
|
|
129
|
-
"required": false
|
|
130
|
-
},
|
|
131
|
-
"buttonFill": {
|
|
132
|
-
"description": "",
|
|
133
|
-
"type": {
|
|
134
|
-
"name": "enum",
|
|
135
|
-
"computed": true,
|
|
136
|
-
"value": "fillProps"
|
|
137
|
-
},
|
|
138
|
-
"required": false
|
|
139
|
-
},
|
|
140
|
-
"buttonFillHover": {
|
|
141
|
-
"description": "",
|
|
142
|
-
"type": {
|
|
143
|
-
"name": "enum",
|
|
144
|
-
"computed": true,
|
|
145
|
-
"value": "fillProps"
|
|
146
|
-
},
|
|
147
|
-
"required": false
|
|
148
|
-
},
|
|
149
|
-
"buttonLabel": {
|
|
150
|
-
"description": "",
|
|
151
|
-
"type": {
|
|
152
|
-
"name": "string"
|
|
153
|
-
},
|
|
154
|
-
"required": false
|
|
155
|
-
},
|
|
156
|
-
"buttonLabelTextColor": {
|
|
157
|
-
"description": "",
|
|
158
|
-
"type": {
|
|
159
|
-
"name": "enum",
|
|
160
|
-
"computed": true,
|
|
161
|
-
"value": "textColorProps"
|
|
162
|
-
},
|
|
163
|
-
"required": false
|
|
164
|
-
},
|
|
165
|
-
"buttonLabelTextSize": {
|
|
166
|
-
"description": "",
|
|
167
|
-
"type": {
|
|
168
|
-
"name": "enum",
|
|
169
|
-
"computed": true,
|
|
170
|
-
"value": "sizeProps"
|
|
171
|
-
},
|
|
172
|
-
"required": false
|
|
173
|
-
},
|
|
174
|
-
"buttonShape": {
|
|
175
|
-
"description": "",
|
|
176
|
-
"type": {
|
|
177
|
-
"name": "enum",
|
|
178
|
-
"computed": true,
|
|
179
|
-
"value": "shapeProps"
|
|
180
|
-
},
|
|
181
|
-
"required": false
|
|
182
|
-
},
|
|
183
|
-
"buttonSize": {
|
|
184
|
-
"description": "",
|
|
185
|
-
"type": {
|
|
186
|
-
"name": "enum",
|
|
187
|
-
"computed": true,
|
|
188
|
-
"value": "sizeProps"
|
|
189
|
-
},
|
|
190
|
-
"required": false
|
|
191
|
-
},
|
|
192
|
-
"buttonWidth": {
|
|
193
|
-
"description": "",
|
|
194
|
-
"type": {
|
|
195
|
-
"name": "enum",
|
|
196
|
-
"computed": true,
|
|
197
|
-
"value": "widthProps"
|
|
198
|
-
},
|
|
199
|
-
"required": false
|
|
200
|
-
},
|
|
201
|
-
"message": {
|
|
202
|
-
"description": "",
|
|
203
|
-
"type": {
|
|
204
|
-
"name": "string"
|
|
205
|
-
},
|
|
206
|
-
"required": false
|
|
207
|
-
},
|
|
208
|
-
"messageTextColor": {
|
|
209
|
-
"description": "",
|
|
210
|
-
"type": {
|
|
211
|
-
"name": "enum",
|
|
212
|
-
"computed": true,
|
|
213
|
-
"value": "textColorProps"
|
|
214
|
-
},
|
|
215
|
-
"required": false
|
|
216
|
-
},
|
|
217
|
-
"messageTextSize": {
|
|
218
|
-
"description": "",
|
|
219
|
-
"type": {
|
|
220
|
-
"name": "enum",
|
|
221
|
-
"computed": true,
|
|
222
|
-
"value": "sizeProps"
|
|
223
|
-
},
|
|
224
|
-
"required": false
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
exports.Empty = Empty;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.empty {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-flow: column nowrap;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
align-items: center;
|
|
6
|
-
gap: 32px;
|
|
7
|
-
align-self: center;
|
|
8
|
-
margin-top: 200px;
|
|
9
|
-
&__message {
|
|
10
|
-
text-align: center;
|
|
11
|
-
}
|
|
12
|
-
&__button {
|
|
13
|
-
margin-top: auto;
|
|
14
|
-
}
|
|
15
|
-
& .image,
|
|
16
|
-
.image__wrapper,
|
|
17
|
-
.image__item {
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
user-select: none;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { buttonConfig } from '@itcase/ui/components/Button'
|
|
2
|
-
import { Empty } from '@itcase/ui/components/Empty'
|
|
3
|
-
import { Image } from '@itcase/ui/components/Image'
|
|
4
|
-
import {
|
|
5
|
-
fillHoverProps,
|
|
6
|
-
fillProps,
|
|
7
|
-
shapeProps,
|
|
8
|
-
sizeProps,
|
|
9
|
-
textColorProps,
|
|
10
|
-
textSizeProps,
|
|
11
|
-
widthProps,
|
|
12
|
-
} from '@itcase/ui/constants'
|
|
13
|
-
|
|
14
|
-
import buttonAppearance from 'src/components/Button/appearance.json'
|
|
15
|
-
|
|
16
|
-
buttonConfig.setAppearance(buttonAppearance)
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
title: 'Atoms / Empty',
|
|
20
|
-
component: Empty,
|
|
21
|
-
argTypes: {
|
|
22
|
-
advancedProps: { control: 'boolean' },
|
|
23
|
-
buttonAfter: {
|
|
24
|
-
if: { arg: 'advancedProps' },
|
|
25
|
-
},
|
|
26
|
-
buttonBefore: {
|
|
27
|
-
if: { arg: 'advancedProps' },
|
|
28
|
-
},
|
|
29
|
-
buttonFill: {
|
|
30
|
-
options: fillProps,
|
|
31
|
-
control: 'select',
|
|
32
|
-
},
|
|
33
|
-
buttonFillHover: {
|
|
34
|
-
options: fillHoverProps,
|
|
35
|
-
control: 'select',
|
|
36
|
-
},
|
|
37
|
-
buttonLabelTextColor: {
|
|
38
|
-
options: textColorProps,
|
|
39
|
-
control: 'select',
|
|
40
|
-
},
|
|
41
|
-
buttonLabelTextSize: {
|
|
42
|
-
options: textSizeProps,
|
|
43
|
-
control: 'inline-radio',
|
|
44
|
-
},
|
|
45
|
-
buttonShape: {
|
|
46
|
-
options: shapeProps,
|
|
47
|
-
control: 'inline-radio',
|
|
48
|
-
},
|
|
49
|
-
buttonSize: {
|
|
50
|
-
options: sizeProps,
|
|
51
|
-
control: 'inline-radio',
|
|
52
|
-
},
|
|
53
|
-
buttonWidth: {
|
|
54
|
-
options: widthProps,
|
|
55
|
-
control: 'inline-radio',
|
|
56
|
-
},
|
|
57
|
-
messageTextColor: {
|
|
58
|
-
options: textColorProps,
|
|
59
|
-
control: 'select',
|
|
60
|
-
},
|
|
61
|
-
messageTextSize: {
|
|
62
|
-
options: textSizeProps,
|
|
63
|
-
control: 'inline-radio',
|
|
64
|
-
},
|
|
65
|
-
buttonAppearance: {
|
|
66
|
-
options: [
|
|
67
|
-
null,
|
|
68
|
-
'accent',
|
|
69
|
-
'primary',
|
|
70
|
-
'secondary',
|
|
71
|
-
'surfacePrimary',
|
|
72
|
-
'surfaceSecondary',
|
|
73
|
-
'surfaceTertiary',
|
|
74
|
-
'surfaceDisabled',
|
|
75
|
-
],
|
|
76
|
-
control: 'inline-radio',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export const Default = {
|
|
82
|
-
args: {
|
|
83
|
-
// before: <Image alt="search_sign" src="assets/img/search.svg" />,
|
|
84
|
-
message: 'message',
|
|
85
|
-
messageTextColor: 'surfaceTextPrimary',
|
|
86
|
-
messageTextSize: 'l',
|
|
87
|
-
buttonLabel: 'Label',
|
|
88
|
-
buttonLabelTextSize: 'm',
|
|
89
|
-
buttonShape: 'rounded',
|
|
90
|
-
buttonSize: 'xxl',
|
|
91
|
-
buttonWidth: 'fixed',
|
|
92
|
-
buttonAppearance: 'surfaceDisabled',
|
|
93
|
-
},
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export const Accent = {
|
|
97
|
-
args: {
|
|
98
|
-
...Default.args,
|
|
99
|
-
buttonAppearance: 'accent',
|
|
100
|
-
},
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export const Primary = {
|
|
104
|
-
args: {
|
|
105
|
-
...Default.args,
|
|
106
|
-
buttonAppearance: 'primary',
|
|
107
|
-
},
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export const Secondary = {
|
|
111
|
-
args: {
|
|
112
|
-
...Default.args,
|
|
113
|
-
buttonAppearance: 'secondary',
|
|
114
|
-
},
|
|
115
|
-
}
|