@salutejs/plasma-new-hope 0.193.0-canary.1556.11815100174.0 → 0.193.0-canary.1559.11815272061.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Autocomplete/Autocomplete.css +17 -17
- package/cjs/components/Autocomplete/Autocomplete.js +1 -7
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -17
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -7
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +17 -17
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +17 -17
- package/cjs/components/DatePicker/SingleDate/SingleDate.js +4 -9
- package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +17 -17
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
- package/cjs/components/Range/Range.css +17 -17
- package/cjs/components/Select/Select.css +17 -17
- package/cjs/components/Select/ui/Inner/Inner.css +17 -17
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +17 -17
- package/cjs/components/Select/ui/Target/Target.css +17 -17
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
- package/cjs/components/Slider/Slider.css +17 -17
- package/cjs/components/Slider/components/Double/Double.css +17 -17
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
- package/cjs/components/TextField/TextField.js +4 -8
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +11 -20
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/{TextField.styles_ppcxpx.css → TextField.styles_j7dqpn.css} +1 -1
- package/cjs/components/TextField/TextField.tokens.js +0 -1
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
- package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
- package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
- package/cjs/index.css +17 -17
- package/emotion/cjs/components/Autocomplete/Autocomplete.js +1 -7
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -7
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +4 -9
- package/emotion/cjs/components/TextField/TextField.js +5 -9
- package/emotion/cjs/components/TextField/TextField.styles.js +26 -29
- package/emotion/cjs/components/TextField/TextField.tokens.js +0 -1
- package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
- package/emotion/es/components/Autocomplete/Autocomplete.js +1 -7
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -7
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +4 -9
- package/emotion/es/components/TextField/TextField.js +5 -9
- package/emotion/es/components/TextField/TextField.styles.js +26 -29
- package/emotion/es/components/TextField/TextField.tokens.js +0 -1
- package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
- package/es/components/Autocomplete/Autocomplete.css +17 -17
- package/es/components/Autocomplete/Autocomplete.js +1 -7
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +17 -17
- package/es/components/Combobox/ComboboxNew/Combobox.js +2 -7
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
- package/es/components/DatePicker/RangeDate/RangeDate.css +17 -17
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
- package/es/components/DatePicker/SingleDate/SingleDate.css +17 -17
- package/es/components/DatePicker/SingleDate/SingleDate.js +4 -9
- package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
- package/es/components/Pagination/Pagination.css +17 -17
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
- package/es/components/Range/Range.css +17 -17
- package/es/components/Select/Select.css +17 -17
- package/es/components/Select/ui/Inner/Inner.css +17 -17
- package/es/components/Select/ui/Inner/ui/Item/Item.css +17 -17
- package/es/components/Select/ui/Target/Target.css +17 -17
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
- package/es/components/Slider/Slider.css +17 -17
- package/es/components/Slider/components/Double/Double.css +17 -17
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
- package/es/components/TextField/TextField.js +4 -8
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +11 -20
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/{TextField.styles_ppcxpx.css → TextField.styles_j7dqpn.css} +1 -1
- package/es/components/TextField/TextField.tokens.js +0 -1
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.css +20 -20
- package/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
- package/es/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
- package/es/index.css +17 -17
- package/package.json +5 -5
- package/styled-components/cjs/components/Autocomplete/Autocomplete.js +1 -7
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -7
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +4 -9
- package/styled-components/cjs/components/TextField/TextField.js +4 -8
- package/styled-components/cjs/components/TextField/TextField.styles.js +6 -9
- package/styled-components/cjs/components/TextField/TextField.tokens.js +0 -1
- package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
- package/styled-components/es/components/Autocomplete/Autocomplete.js +1 -7
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -7
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +4 -9
- package/styled-components/es/components/TextField/TextField.js +4 -8
- package/styled-components/es/components/TextField/TextField.styles.js +6 -9
- package/styled-components/es/components/TextField/TextField.tokens.js +0 -1
- package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
- package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +59 -715
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +10 -30
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +59 -715
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
- package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +59 -715
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +9 -28
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
- package/types/components/Range/Range.styles.d.ts +59 -715
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +59 -715
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +59 -715
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +1 -3
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +0 -1
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +20 -43
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +4 -2
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +110 -1022
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +1 -47
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +62 -1246
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +59 -715
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +4 -2
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +110 -1022
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +1 -47
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Mask/Mask.d.ts +62 -1246
- package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +59 -715
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
- package/cjs/components/TextField/variations/_label-placement/base_y1lvvc.css +0 -1
- package/es/components/TextField/variations/_label-placement/base_y1lvvc.css +0 -1
package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx
CHANGED
@@ -87,12 +87,6 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
-
hasInnerLabelPlaceholder: {
|
91
|
-
control: {
|
92
|
-
type: 'boolean',
|
93
|
-
},
|
94
|
-
if: { arg: 'labelPlacement', equal: 'inner' },
|
95
|
-
},
|
96
90
|
size: {
|
97
91
|
options: sizes,
|
98
92
|
control: {
|
@@ -216,7 +210,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
216
210
|
view: 'default',
|
217
211
|
label: 'Лейбл',
|
218
212
|
labelPlacement: 'outer',
|
219
|
-
hasInnerLabelPlaceholder: false,
|
220
213
|
titleCaption: 'Подпись к полю',
|
221
214
|
textBefore: '',
|
222
215
|
textAfter: '',
|
@@ -226,11 +219,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
226
219
|
readOnly: false,
|
227
220
|
enableContentLeft: true,
|
228
221
|
enableContentRight: true,
|
222
|
+
clear: false,
|
223
|
+
hasDivider: false,
|
229
224
|
optional: false,
|
230
225
|
required: false,
|
231
226
|
requiredPlacement: 'right',
|
232
|
-
clear: false,
|
233
|
-
hasDivider: false,
|
234
227
|
hasHint: true,
|
235
228
|
hintText: 'Текст подсказки',
|
236
229
|
hintTrigger: 'hover',
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "
|
1
|
+
var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -28,7 +28,6 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
|
|
28
28
|
view = _ref.view,
|
29
29
|
size = _ref.size,
|
30
30
|
labelPlacement = _ref.labelPlacement,
|
31
|
-
hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder,
|
32
31
|
disabled = _ref.disabled,
|
33
32
|
readOnly = _ref.readOnly,
|
34
33
|
label = _ref.label,
|
@@ -148,11 +147,6 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
|
|
148
147
|
"aria-activedescendant": "".concat(listId, "/").concat(focused),
|
149
148
|
"aria-describedby": helperTextId,
|
150
149
|
hintText: String(hintText || '')
|
151
|
-
}, labelPlacement === 'inner' ? {
|
152
|
-
labelPlacement: labelPlacement,
|
153
|
-
hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
|
154
|
-
} : {
|
155
|
-
labelPlacement: labelPlacement
|
156
150
|
}, rest)),
|
157
151
|
preventOverflow: false,
|
158
152
|
ref: targetRef,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "
|
1
|
+
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -55,7 +55,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
55
55
|
view = props.view,
|
56
56
|
size = props.size,
|
57
57
|
labelPlacement = props.labelPlacement,
|
58
|
-
hasInnerLabelPlaceholder = props.hasInnerLabelPlaceholder,
|
59
58
|
_props$readOnly = props.readOnly,
|
60
59
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
61
60
|
_props$disabled = props.disabled,
|
@@ -369,6 +368,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
369
368
|
onChange: handleTextValueChange,
|
370
369
|
size: size,
|
371
370
|
view: view,
|
371
|
+
labelPlacement: labelPlacement,
|
372
372
|
disabled: disabled,
|
373
373
|
readOnly: readOnly,
|
374
374
|
label: label,
|
@@ -391,11 +391,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
391
391
|
"aria-controls": "".concat(treeId, "_tree_level_1"),
|
392
392
|
"aria-expanded": isCurrentListOpen,
|
393
393
|
"aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
|
394
|
-
}, labelPlacement === 'inner' ? {
|
395
|
-
labelPlacement: labelPlacement,
|
396
|
-
hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
|
397
|
-
} : {
|
398
|
-
labelPlacement: labelPlacement
|
399
394
|
}, multiple ? {
|
400
395
|
enumerationType: 'chip',
|
401
396
|
chips: getChips(),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["className", "opened", "label", "labelPlacement", "
|
1
|
+
var _excluded = ["className", "opened", "label", "labelPlacement", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -28,7 +28,6 @@ export var datePickerRoot = function datePickerRoot(Root) {
|
|
28
28
|
label = _ref.label,
|
29
29
|
_ref$labelPlacement = _ref.labelPlacement,
|
30
30
|
labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
|
31
|
-
hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder,
|
32
31
|
placeholder = _ref.placeholder,
|
33
32
|
leftHelper = _ref.leftHelper,
|
34
33
|
contentLeft = _ref.contentLeft,
|
@@ -165,14 +164,10 @@ export var datePickerRoot = function datePickerRoot(Root) {
|
|
165
164
|
},
|
166
165
|
onFocus: onFocus,
|
167
166
|
onBlur: onBlur,
|
168
|
-
onKeyDown: onKeyDown
|
169
|
-
|
170
|
-
}, labelPlacement === 'inner' ? {
|
167
|
+
onKeyDown: onKeyDown
|
168
|
+
}, innerLabelPlacement && {
|
171
169
|
label: label,
|
172
|
-
labelPlacement: labelPlacement
|
173
|
-
hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
|
174
|
-
} : {
|
175
|
-
labelPlacement: undefined
|
170
|
+
labelPlacement: labelPlacement
|
176
171
|
}));
|
177
172
|
useEffect(function () {
|
178
173
|
setIsInnerOpen(function (prevOpen) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "
|
1
|
+
var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -39,7 +39,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
39
39
|
contentRight = _ref.contentRight,
|
40
40
|
label = _ref.label,
|
41
41
|
labelPlacement = _ref.labelPlacement,
|
42
|
-
hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder,
|
43
42
|
textBefore = _ref.textBefore,
|
44
43
|
textAfter = _ref.textAfter,
|
45
44
|
placeholder = _ref.placeholder,
|
@@ -115,7 +114,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
115
114
|
var hasLabelValue = Boolean(label);
|
116
115
|
var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
|
117
116
|
var hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;
|
118
|
-
var hasPlaceholder = Boolean(placeholder) &&
|
117
|
+
var hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;
|
119
118
|
var innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;
|
120
119
|
var innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;
|
121
120
|
var innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;
|
@@ -126,7 +125,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
126
125
|
var requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;
|
127
126
|
var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
|
128
127
|
var hasValueClass = hasValue ? classes.hasValue : undefined;
|
129
|
-
var hasInnerLabelPlaceholderClass = hasInnerLabelPlaceholder && placeholderShown && classes.forcePlaceholder;
|
130
128
|
var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
|
131
129
|
var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
|
132
130
|
var hintRef = useOutsideClick(function () {
|
@@ -335,7 +333,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
335
333
|
"aria-labelledby": labelId,
|
336
334
|
"aria-describedby": helperTextId,
|
337
335
|
placeholder: innerPlaceholderValue,
|
338
|
-
className: cx(hasValueClass
|
336
|
+
className: cx(hasValueClass),
|
339
337
|
disabled: disabled,
|
340
338
|
readOnly: !disabled && readOnly,
|
341
339
|
onInput: handleInput,
|
@@ -344,9 +342,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
344
342
|
}, rest)), hasInnerLabel && /*#__PURE__*/React.createElement(Label, {
|
345
343
|
id: labelId,
|
346
344
|
htmlFor: innerId
|
347
|
-
}, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, {
|
348
|
-
hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
|
349
|
-
}, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
|
345
|
+
}, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, null, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
|
350
346
|
id: helperTextId
|
351
347
|
}, leftHelper));
|
352
348
|
});
|
@@ -24,14 +24,11 @@ export var InputContainer = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
})(["position:relative;flex:1;min-width:60%;"]);
|
25
25
|
export var InputPlaceholder = /*#__PURE__*/styled.div.withConfig({
|
26
26
|
componentId: "plasma-new-hope__sc-g4vxbb-6"
|
27
|
-
})(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");
|
28
|
-
var hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder;
|
29
|
-
return hasInnerLabelPlaceholder ? "var(".concat(tokens.contentLabelInnerPadding, ")") : '0';
|
30
|
-
});
|
27
|
+
})(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");"], tokens.placeholderColor);
|
31
28
|
export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
32
29
|
componentId: "plasma-new-hope__sc-g4vxbb-7"
|
33
|
-
})(["display:flex;align-items:center;margin-bottom:", ";"], function (
|
34
|
-
var isInnerLabel =
|
30
|
+
})(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
|
31
|
+
var isInnerLabel = _ref.isInnerLabel;
|
35
32
|
return isInnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
|
36
33
|
});
|
37
34
|
export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
|
@@ -45,9 +42,9 @@ export var Label = /*#__PURE__*/styled.label.withConfig({
|
|
45
42
|
})(["display:inline-flex;"]);
|
46
43
|
export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
|
47
44
|
componentId: "plasma-new-hope__sc-g4vxbb-11"
|
48
|
-
})(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (
|
49
|
-
var isDefaultView =
|
50
|
-
isClear =
|
45
|
+
})(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref2) {
|
46
|
+
var isDefaultView = _ref2.isDefaultView,
|
47
|
+
isClear = _ref2.isClear;
|
51
48
|
return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
|
52
49
|
});
|
53
50
|
export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { classes, tokens } from '../../TextField.tokens';
|
3
3
|
import { Input, InputContainer, Label, StyledTextAfter, StyledTextBefore } from '../../TextField.styles';
|
4
|
-
export var base = /*#__PURE__*/css(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", "
|
4
|
+
export var base = /*#__PURE__*/css(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], classes.outerLabelPlacement, Label, tokens.labelColor, classes.innerLabelPlacement, InputContainer, tokens.contentLabelInnerPadding, StyledTextAfter, StyledTextBefore, tokens.contentLabelInnerPadding, Input, Label, Input, classes.hasValue, Label, tokens.placeholderColor, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.labelLineHeight, tokens.height, tokens.labelLineHeight, classes.clear, Label, tokens.clearPlaceholderColor);
|
@@ -87,12 +87,6 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
-
hasInnerLabelPlaceholder: {
|
91
|
-
control: {
|
92
|
-
type: 'boolean',
|
93
|
-
},
|
94
|
-
if: { arg: 'labelPlacement', equal: 'inner' },
|
95
|
-
},
|
96
90
|
size: {
|
97
91
|
options: sizes,
|
98
92
|
control: {
|
@@ -216,7 +210,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
216
210
|
view: 'default',
|
217
211
|
label: 'Лейбл',
|
218
212
|
labelPlacement: 'outer',
|
219
|
-
hasInnerLabelPlaceholder: false,
|
220
213
|
titleCaption: 'Подпись к полю',
|
221
214
|
textBefore: '',
|
222
215
|
textAfter: '',
|
@@ -87,12 +87,6 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
-
hasInnerLabelPlaceholder: {
|
91
|
-
control: {
|
92
|
-
type: 'boolean',
|
93
|
-
},
|
94
|
-
if: { arg: 'labelPlacement', equal: 'inner' },
|
95
|
-
},
|
96
90
|
size: {
|
97
91
|
options: sizes,
|
98
92
|
control: {
|
@@ -216,7 +210,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
216
210
|
view: 'default',
|
217
211
|
label: 'Лейбл',
|
218
212
|
labelPlacement: 'outer',
|
219
|
-
hasInnerLabelPlaceholder: false,
|
220
213
|
titleCaption: 'Подпись к полю',
|
221
214
|
textBefore: '',
|
222
215
|
textAfter: '',
|
@@ -226,11 +219,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
226
219
|
readOnly: false,
|
227
220
|
enableContentLeft: true,
|
228
221
|
enableContentRight: true,
|
222
|
+
clear: false,
|
223
|
+
hasDivider: false,
|
229
224
|
optional: false,
|
230
225
|
required: false,
|
231
226
|
requiredPlacement: 'right',
|
232
|
-
clear: false,
|
233
|
-
hasDivider: false,
|
234
227
|
hasHint: true,
|
235
228
|
hintText: 'Текст подсказки',
|
236
229
|
hintTrigger: 'hover',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,gBAAgB,EAAE,iBAAiB,CAAC,+
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,gBAAgB,EAAE,iBAAiB,CAAC,+FAuLhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAzLQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CAwMpF,CAAC"}
|