@salutejs/sdds-insol 0.326.0-canary.2357.19712161711.0 → 0.326.0-canary.2358.19737252394.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.
@@ -1,41 +1,16 @@
1
- function _define_property(obj, key, value) {
2
- if (key in obj) {
3
- Object.defineProperty(obj, key, {
4
- value: value,
5
- enumerable: true,
6
- configurable: true,
7
- writable: true
8
- });
9
- } else {
10
- obj[key] = value;
11
- }
12
- return obj;
13
- }
14
- function _object_spread(target) {
15
- for(var i = 1; i < arguments.length; i++){
16
- var source = arguments[i] != null ? arguments[i] : {};
17
- var ownKeys = Object.keys(source);
18
- if (typeof Object.getOwnPropertySymbols === "function") {
19
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
- }));
22
- }
23
- ownKeys.forEach(function(key) {
24
- _define_property(target, key, source[key]);
25
- });
26
- }
27
- return target;
28
- }
29
- import React from 'react';
30
- import { textFieldConfig, component, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/styled-components';
1
+ import { textFieldConfig, component, mergeConfig, createConditionalComponent } from '@salutejs/plasma-new-hope/styled-components';
31
2
  import { config } from './TextField.config';
32
- var mergedConfig = mergeConfig(textFieldConfig, config);
33
- var TextFieldComponent = component(mergedConfig);
34
- var TexFieldWithTypes = function(props, ref) {
35
- return /*#__PURE__*/ React.createElement(TextFieldComponent, _object_spread({
36
- ref: ref
37
- }, props));
38
- };
39
- /**
40
- * Поле ввода текста.
41
- */ export var TextField = fixedForwardRef(TexFieldWithTypes);
3
+ import { config as clearConfig } from './TextField.clear.config';
4
+ var mergedConfigDefault = mergeConfig(textFieldConfig, config);
5
+ export var TextFieldDefault = component(mergedConfigDefault);
6
+ var mergedConfigClear = mergeConfig(textFieldConfig, clearConfig);
7
+ export var TextFieldClear = component(mergedConfigClear);
8
+ export var TextField = createConditionalComponent(TextFieldDefault, [
9
+ {
10
+ conditions: {
11
+ prop: 'appearance',
12
+ value: 'clear'
13
+ },
14
+ component: TextFieldClear
15
+ }
16
+ ]);