@salutejs/plasma-new-hope 0.194.0-canary.1552.11858023676.0 → 0.194.0-canary.1556.11879682469.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +17 -17
- package/cjs/components/Autocomplete/Autocomplete.js +7 -1
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -19
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +12 -39
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -19
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -19
- 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 +9 -4
- 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/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- 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 +9 -5
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +20 -11
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
- package/cjs/components/TextField/TextField.tokens.js +1 -0
- 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_y1lvvc.css +1 -0
- package/cjs/index.css +17 -19
- package/cjs/index.js +0 -2
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +13 -40
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/emotion/cjs/components/TextField/TextField.js +10 -6
- package/emotion/cjs/components/TextField/TextField.styles.js +29 -26
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/emotion/cjs/utils/index.js +1 -10
- package/emotion/es/components/Autocomplete/Autocomplete.js +7 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +13 -41
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/emotion/es/components/TextField/TextField.js +10 -6
- package/emotion/es/components/TextField/TextField.styles.js +29 -26
- package/emotion/es/components/TextField/TextField.tokens.js +1 -0
- package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/emotion/es/utils/index.js +0 -1
- package/es/components/Autocomplete/Autocomplete.css +17 -17
- package/es/components/Autocomplete/Autocomplete.js +7 -1
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +17 -19
- package/es/components/Combobox/ComboboxNew/Combobox.js +14 -41
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -19
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -19
- 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 +9 -4
- 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/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- 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 +9 -5
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +20 -11
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
- package/es/components/TextField/TextField.tokens.js +1 -0
- 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_y1lvvc.css +1 -0
- package/es/index.css +17 -19
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Autocomplete/Autocomplete.js +7 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +13 -40
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/styled-components/cjs/components/TextField/TextField.js +9 -5
- package/styled-components/cjs/components/TextField/TextField.styles.js +9 -6
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/styled-components/cjs/utils/index.js +1 -10
- package/styled-components/es/components/Autocomplete/Autocomplete.js +7 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +13 -41
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/styled-components/es/components/TextField/TextField.js +9 -5
- package/styled-components/es/components/TextField/TextField.styles.js +9 -6
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/styled-components/es/utils/index.js +0 -1
- package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +717 -61
- 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 +31 -33
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +717 -61
- 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 +717 -61
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +28 -9
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +176 -4
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Range/Range.styles.d.ts +717 -61
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +30 -10
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +717 -61
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +717 -61
- 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 +3 -1
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +43 -20
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +3 -5
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +452 -500
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +47 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +1246 -62
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.d.ts +176 -4
- package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +717 -61
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +3 -5
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +452 -500
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +47 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Mask/Mask.d.ts +1246 -62
- package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.d.ts +176 -4
- package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +717 -61
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
- package/types/utils/index.d.ts +0 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.css +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -39
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -15
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles_18yw2bf.css +0 -1
- package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
- package/cjs/utils/createEvent.js +0 -54
- package/cjs/utils/createEvent.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -40
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -13
- package/emotion/cjs/utils/createEvent.js +0 -53
- package/emotion/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -31
- package/emotion/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -6
- package/emotion/es/utils/createEvent.js +0 -47
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.css +0 -1
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -35
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -11
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles_18yw2bf.css +0 -1
- package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
- package/es/utils/createEvent.js +0 -50
- package/es/utils/createEvent.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -40
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -12
- package/styled-components/cjs/utils/createEvent.js +0 -53
- package/styled-components/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -31
- package/styled-components/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -5
- package/styled-components/es/utils/createEvent.js +0 -47
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts +0 -6
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.d.ts +0 -3
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.d.ts.map +0 -1
- package/types/utils/createEvent.d.ts +0 -3
- package/types/utils/createEvent.d.ts.map +0 -1
@@ -1,4 +1,4 @@
|
|
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"];
|
1
|
+
var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "hasPlaceholder", "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,6 +28,7 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
|
|
28
28
|
view = _ref.view,
|
29
29
|
size = _ref.size,
|
30
30
|
labelPlacement = _ref.labelPlacement,
|
31
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
31
32
|
disabled = _ref.disabled,
|
32
33
|
readOnly = _ref.readOnly,
|
33
34
|
label = _ref.label,
|
@@ -147,6 +148,11 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
|
|
147
148
|
"aria-activedescendant": "".concat(listId, "/").concat(focused),
|
148
149
|
"aria-describedby": helperTextId,
|
149
150
|
hintText: String(hintText || '')
|
151
|
+
}, labelPlacement === 'inner' ? {
|
152
|
+
labelPlacement: labelPlacement,
|
153
|
+
hasPlaceholder: hasPlaceholder
|
154
|
+
} : {
|
155
|
+
labelPlacement: labelPlacement
|
150
156
|
}, rest)),
|
151
157
|
preventOverflow: false,
|
152
158
|
ref: targetRef,
|
@@ -1,6 +1,5 @@
|
|
1
|
-
var _excluded = ["
|
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", "hasPlaceholder", "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
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
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."); }
|
6
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -9,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
9
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
10
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
11
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
|
-
import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef
|
11
|
+
import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';
|
13
12
|
import { safeUseId, useForkRef } from '@salutejs/plasma-core';
|
14
13
|
import { isEmpty } from '../../../utils';
|
15
14
|
import { useOutsideClick } from '../../../hooks';
|
@@ -24,21 +23,17 @@ import { getPathMap, getTreeMaps } from './hooks/getPathMaps';
|
|
24
23
|
import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';
|
25
24
|
import { base as viewCSS } from './variations/_view/base';
|
26
25
|
import { base as sizeCSS } from './variations/_size/base';
|
27
|
-
import { SelectNative } from './ui/SelectNative/SelectNative';
|
28
26
|
export var Context = /*#__PURE__*/createContext({});
|
29
27
|
|
30
28
|
/**
|
31
29
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
32
30
|
*/
|
33
|
-
|
34
31
|
export var comboboxRoot = function comboboxRoot(Root) {
|
35
32
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
36
33
|
var _valueToItemMap$get, _valueToItemMap$get2, _getItemByFocused;
|
37
|
-
var
|
38
|
-
multiple = props.multiple,
|
34
|
+
var multiple = props.multiple,
|
39
35
|
outerValue = props.value,
|
40
36
|
outerOnChange = props.onChange,
|
41
|
-
defaultValue = props.defaultValue,
|
42
37
|
isTargetAmount = props.isTargetAmount,
|
43
38
|
targetAmount = props.targetAmount,
|
44
39
|
items = props.items,
|
@@ -60,6 +55,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
60
55
|
view = props.view,
|
61
56
|
size = props.size,
|
62
57
|
labelPlacement = props.labelPlacement,
|
58
|
+
hasPlaceholder = props.hasPlaceholder,
|
63
59
|
_props$readOnly = props.readOnly,
|
64
60
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
65
61
|
_props$disabled = props.disabled,
|
@@ -70,7 +66,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
70
66
|
outerCloseAfterSelect = props.closeAfterSelect,
|
71
67
|
renderValue = props.renderValue,
|
72
68
|
rest = _objectWithoutProperties(props, _excluded);
|
73
|
-
console.log('render');
|
74
69
|
var transformedItems = useMemo(function () {
|
75
70
|
return initialItemsTransform(items || []);
|
76
71
|
}, [items]);
|
@@ -146,27 +141,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
146
141
|
}
|
147
142
|
}
|
148
143
|
}, floatingPopoverRef);
|
149
|
-
|
150
|
-
// Эта функция срабатывает при изменении Combobox и
|
151
|
-
// при изменении нативного Select для формы (срабатывает только после изменения internalValue и рендера).
|
152
144
|
var onChange = function onChange(newValue) {
|
153
|
-
// Условие для отправки изменений наружу
|
154
145
|
if (outerOnChange) {
|
155
|
-
|
156
|
-
if (!name && (typeof newValue === 'string' || Array.isArray(newValue))) {
|
157
|
-
outerOnChange(newValue);
|
158
|
-
}
|
159
|
-
|
160
|
-
// Условие для отправки если комбобокс используется с формой.
|
161
|
-
if (name && _typeof(newValue) === 'object' && !Array.isArray(newValue)) {
|
162
|
-
outerOnChange(newValue);
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
|
-
// Условие для изменения внутреннего значения (только если newValue строка или массив строк).
|
167
|
-
if (typeof newValue === 'string' || Array.isArray(newValue)) {
|
168
|
-
setInternalValue(newValue);
|
146
|
+
outerOnChange(newValue);
|
169
147
|
}
|
148
|
+
setInternalValue(newValue);
|
170
149
|
};
|
171
150
|
var handleClickArrow = function handleClickArrow() {
|
172
151
|
if (disabled || readOnly) {
|
@@ -354,24 +333,13 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
354
333
|
// Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
|
355
334
|
// А переменную, содержащую сложные типы данных, нельзя помещать в deps.
|
356
335
|
}, [outerValue, internalValue, items]);
|
357
|
-
useEffect(function () {
|
358
|
-
if (defaultValue) {
|
359
|
-
setInternalValue(defaultValue);
|
360
|
-
}
|
361
|
-
}, [defaultValue]);
|
362
336
|
return /*#__PURE__*/React.createElement(Root, {
|
363
337
|
size: size,
|
364
338
|
view: view,
|
365
339
|
labelPlacement: labelPlacement,
|
366
340
|
disabled: disabled,
|
367
341
|
readOnly: readOnly
|
368
|
-
},
|
369
|
-
name: name,
|
370
|
-
value: internalValue,
|
371
|
-
multiple: multiple,
|
372
|
-
onChange: onChange,
|
373
|
-
ref: ref
|
374
|
-
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
|
342
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
|
375
343
|
value: {
|
376
344
|
focusedPath: focusedPath,
|
377
345
|
checked: checked,
|
@@ -395,13 +363,12 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
395
363
|
listWidth: listWidth,
|
396
364
|
target: function target(referenceRef) {
|
397
365
|
return /*#__PURE__*/React.createElement(StyledTextField, _extends({
|
398
|
-
ref:
|
366
|
+
ref: inputForkRef,
|
399
367
|
inputWrapperRef: referenceRef,
|
400
368
|
value: textValue,
|
401
369
|
onChange: handleTextValueChange,
|
402
370
|
size: size,
|
403
371
|
view: view,
|
404
|
-
labelPlacement: labelPlacement,
|
405
372
|
disabled: disabled,
|
406
373
|
readOnly: readOnly,
|
407
374
|
label: label,
|
@@ -424,6 +391,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
424
391
|
"aria-controls": "".concat(treeId, "_tree_level_1"),
|
425
392
|
"aria-expanded": isCurrentListOpen,
|
426
393
|
"aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
|
394
|
+
}, labelPlacement === 'inner' ? {
|
395
|
+
labelPlacement: labelPlacement,
|
396
|
+
hasPlaceholder: hasPlaceholder
|
397
|
+
} : {
|
398
|
+
labelPlacement: labelPlacement
|
427
399
|
}, multiple ? {
|
428
400
|
enumerationType: 'chip',
|
429
401
|
chips: getChips(),
|
@@ -1,4 +1,4 @@
|
|
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"];
|
1
|
+
var _excluded = ["className", "opened", "label", "labelPlacement", "hasPlaceholder", "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,6 +28,7 @@ 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
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
31
32
|
placeholder = _ref.placeholder,
|
32
33
|
leftHelper = _ref.leftHelper,
|
33
34
|
contentLeft = _ref.contentLeft,
|
@@ -164,10 +165,14 @@ export var datePickerRoot = function datePickerRoot(Root) {
|
|
164
165
|
},
|
165
166
|
onFocus: onFocus,
|
166
167
|
onBlur: onBlur,
|
167
|
-
onKeyDown: onKeyDown
|
168
|
-
}, innerLabelPlacement && {
|
169
|
-
label: label,
|
168
|
+
onKeyDown: onKeyDown,
|
170
169
|
labelPlacement: labelPlacement
|
170
|
+
}, labelPlacement === 'inner' ? {
|
171
|
+
label: label,
|
172
|
+
labelPlacement: labelPlacement,
|
173
|
+
hasPlaceholder: hasPlaceholder
|
174
|
+
} : {
|
175
|
+
labelPlacement: undefined
|
171
176
|
}));
|
172
177
|
useEffect(function () {
|
173
178
|
setIsInnerOpen(function (prevOpen) {
|
@@ -10,9 +10,10 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
10
|
multiselect = _ref.multiselect,
|
11
11
|
value = _ref.value,
|
12
12
|
label = _ref.label,
|
13
|
+
labelPlacement = _ref.labelPlacement,
|
14
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
13
15
|
placeholder = _ref.placeholder,
|
14
16
|
onKeyDown = _ref.onKeyDown,
|
15
|
-
labelPlacement = _ref.labelPlacement,
|
16
17
|
size = _ref.size,
|
17
18
|
view = _ref.view,
|
18
19
|
handleClickArrow = _ref.handleClickArrow,
|
@@ -58,10 +59,16 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
58
59
|
value: multiselect ? undefined : ((_valueToItemMap$get = valueToItemMap.get(value.toString())) === null || _valueToItemMap$get === void 0 ? void 0 : _valueToItemMap$get.label) || '',
|
59
60
|
size: size,
|
60
61
|
view: view,
|
61
|
-
chipView: chipView
|
62
|
+
chipView: chipView
|
63
|
+
}, labelPlacement === 'inner' ? {
|
64
|
+
label: label,
|
62
65
|
labelPlacement: labelPlacement,
|
63
|
-
|
66
|
+
hasPlaceholder: hasPlaceholder
|
67
|
+
} : {
|
64
68
|
label: label,
|
69
|
+
labelPlacement: labelPlacement
|
70
|
+
}, {
|
71
|
+
disabled: disabled,
|
65
72
|
placeholder: value instanceof Array && value.length ? '' : placeholder,
|
66
73
|
contentLeft: contentLeft,
|
67
74
|
contentRight: /*#__PURE__*/React.createElement(IconArrowWrapper, {
|
@@ -1,4 +1,4 @@
|
|
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"];
|
1
|
+
var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "hasPlaceholder", "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,6 +39,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
39
39
|
contentRight = _ref.contentRight,
|
40
40
|
label = _ref.label,
|
41
41
|
labelPlacement = _ref.labelPlacement,
|
42
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
42
43
|
textBefore = _ref.textBefore,
|
43
44
|
textAfter = _ref.textAfter,
|
44
45
|
placeholder = _ref.placeholder,
|
@@ -114,10 +115,10 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
114
115
|
var hasLabelValue = Boolean(label);
|
115
116
|
var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
|
116
117
|
var hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;
|
117
|
-
var
|
118
|
+
var innerHasPlaceholder = Boolean(placeholder) && (hasPlaceholder || !hasInnerLabel);
|
118
119
|
var innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;
|
119
120
|
var innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;
|
120
|
-
var innerPlaceholderValue =
|
121
|
+
var innerPlaceholderValue = innerHasPlaceholder ? placeholder : undefined;
|
121
122
|
var placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;
|
122
123
|
var clearClass = clear ? classes.clear : undefined;
|
123
124
|
var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
|
@@ -125,6 +126,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
125
126
|
var requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;
|
126
127
|
var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
|
127
128
|
var hasValueClass = hasValue ? classes.hasValue : undefined;
|
129
|
+
var hasPlaceholderClass = innerHasPlaceholder && placeholderShown && classes.forcePlaceholder;
|
128
130
|
var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
|
129
131
|
var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
|
130
132
|
var hintRef = useOutsideClick(function () {
|
@@ -333,7 +335,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
333
335
|
"aria-labelledby": labelId,
|
334
336
|
"aria-describedby": helperTextId,
|
335
337
|
placeholder: innerPlaceholderValue,
|
336
|
-
className: cx(hasValueClass),
|
338
|
+
className: cx(hasValueClass, hasPlaceholderClass),
|
337
339
|
disabled: disabled,
|
338
340
|
readOnly: !disabled && readOnly,
|
339
341
|
onInput: handleInput,
|
@@ -342,7 +344,9 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
342
344
|
}, rest)), hasInnerLabel && /*#__PURE__*/React.createElement(Label, {
|
343
345
|
id: labelId,
|
344
346
|
htmlFor: innerId
|
345
|
-
}, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder,
|
347
|
+
}, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, {
|
348
|
+
hasPadding: hasPlaceholder && size !== 'xs'
|
349
|
+
}, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
|
346
350
|
id: helperTextId
|
347
351
|
}, leftHelper));
|
348
352
|
});
|
@@ -24,11 +24,14 @@ 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(", ");"], tokens.placeholderColor)
|
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(", ");padding:", ";"], tokens.placeholderColor, function (_ref) {
|
28
|
+
var hasPadding = _ref.hasPadding;
|
29
|
+
return hasPadding ? "var(".concat(tokens.contentLabelInnerPadding, ")") : '0';
|
30
|
+
});
|
28
31
|
export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
29
32
|
componentId: "plasma-new-hope__sc-g4vxbb-7"
|
30
|
-
})(["display:flex;align-items:center;margin-bottom:", ";"], function (
|
31
|
-
var isInnerLabel =
|
33
|
+
})(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref2) {
|
34
|
+
var isInnerLabel = _ref2.isInnerLabel;
|
32
35
|
return isInnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
|
33
36
|
});
|
34
37
|
export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
|
@@ -42,9 +45,9 @@ export var Label = /*#__PURE__*/styled.label.withConfig({
|
|
42
45
|
})(["display:inline-flex;"]);
|
43
46
|
export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
|
44
47
|
componentId: "plasma-new-hope__sc-g4vxbb-11"
|
45
|
-
})(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (
|
46
|
-
var isDefaultView =
|
47
|
-
isClear =
|
48
|
+
})(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref3) {
|
49
|
+
var isDefaultView = _ref3.isDefaultView,
|
50
|
+
isClear = _ref3.isClear;
|
48
51
|
return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
|
49
52
|
});
|
50
53
|
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 ~ ", ",", ".", " ~ ", "{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);
|
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, Input, classes.forcePlaceholder, 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);
|
@@ -353,11 +353,11 @@ const items = [
|
|
353
353
|
|
354
354
|
const SingleStory = (args: StorySelectProps) => {
|
355
355
|
const [value, setValue] = useState('');
|
356
|
+
|
356
357
|
return (
|
357
358
|
<div style={{ width: '400px' }}>
|
358
359
|
<Combobox
|
359
360
|
{...args}
|
360
|
-
name="mau"
|
361
361
|
items={items}
|
362
362
|
value={value}
|
363
363
|
onChange={setValue}
|
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
+
hasPlaceholder: {
|
91
|
+
control: {
|
92
|
+
type: 'boolean',
|
93
|
+
},
|
94
|
+
if: { arg: 'labelPlacement', eq: 'inner' },
|
95
|
+
},
|
90
96
|
size: {
|
91
97
|
options: sizes,
|
92
98
|
control: {
|
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
210
216
|
view: 'default',
|
211
217
|
label: 'Лейбл',
|
212
218
|
labelPlacement: 'outer',
|
219
|
+
hasPlaceholder: false,
|
213
220
|
titleCaption: 'Подпись к полю',
|
214
221
|
textBefore: '',
|
215
222
|
textAfter: '',
|
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
+
hasPlaceholder: {
|
91
|
+
control: {
|
92
|
+
type: 'boolean',
|
93
|
+
},
|
94
|
+
if: { arg: 'labelPlacement', eq: 'inner' },
|
95
|
+
},
|
90
96
|
size: {
|
91
97
|
options: sizes,
|
92
98
|
control: {
|
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
210
216
|
view: 'default',
|
211
217
|
label: 'Лейбл',
|
212
218
|
labelPlacement: 'outer',
|
219
|
+
hasPlaceholder: false,
|
213
220
|
titleCaption: 'Подпись к полю',
|
214
221
|
textBefore: '',
|
215
222
|
textAfter: '',
|
@@ -219,11 +226,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
219
226
|
readOnly: false,
|
220
227
|
enableContentLeft: true,
|
221
228
|
enableContentRight: true,
|
222
|
-
clear: false,
|
223
|
-
hasDivider: false,
|
224
229
|
optional: false,
|
225
230
|
required: false,
|
226
231
|
requiredPlacement: 'right',
|
232
|
+
clear: false,
|
233
|
+
hasDivider: false,
|
227
234
|
hasHint: true,
|
228
235
|
hintText: 'Текст подсказки',
|
229
236
|
hintTrigger: 'hover',
|
@@ -5,7 +5,6 @@ export { IS_REACT_18, safeUseId } from './react';
|
|
5
5
|
export { isNumber } from './isNumber';
|
6
6
|
export { mergeRefs, setRefList } from './setRefList';
|
7
7
|
export { isEmpty } from './isEmpty';
|
8
|
-
export { createEvent } from './createEvent';
|
9
8
|
import * as _constants from './constants';
|
10
9
|
export { _constants as constants };
|
11
10
|
export * from './getPopoverPlacement';
|
@@ -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,+FA8LhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAhMQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CA+MpF,CAAC"}
|