@salutejs/plasma-new-hope 0.175.3-canary.1512.11555735717.0 → 0.176.0-canary.1513.11556365294.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
- package/cjs/components/Popover/Popover.js +1 -2
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/emotion/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -6
- package/emotion/cjs/components/Popover/Popover.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/emotion/es/components/Popover/Popover.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
- package/es/components/Popover/Popover.js +1 -2
- package/es/components/Popover/Popover.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -6
- package/styled-components/cjs/components/Popover/Popover.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/styled-components/es/components/Popover/Popover.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/types/components/Dropdown/ui/DropdownDivider/DropdownDivider.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownFooter/DropdownFooter.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownGroup/DropdownGroup.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownHeader/DropdownHeader.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx
CHANGED
@@ -95,43 +95,44 @@ const meta: Meta<typeof TextField> = {
|
|
95
95
|
},
|
96
96
|
hintText: {
|
97
97
|
control: { type: 'text' },
|
98
|
+
if: { arg: 'hasHint', thruthy: true },
|
98
99
|
},
|
99
100
|
hintView: {
|
100
101
|
options: hintViews,
|
101
102
|
control: {
|
102
103
|
type: 'select',
|
103
104
|
},
|
104
|
-
if: { arg: '
|
105
|
+
if: { arg: 'hasHint', thruthy: true },
|
105
106
|
},
|
106
107
|
hintSize: {
|
107
108
|
options: hintSizes,
|
108
109
|
control: {
|
109
110
|
type: 'select',
|
110
111
|
},
|
111
|
-
if: { arg: '
|
112
|
+
if: { arg: 'hasHint', thruthy: true },
|
112
113
|
},
|
113
114
|
hintTrigger: {
|
114
115
|
options: hintTriggers,
|
115
116
|
control: {
|
116
117
|
type: 'inline-radio',
|
117
118
|
},
|
118
|
-
if: { arg: '
|
119
|
+
if: { arg: 'hasHint', thruthy: true },
|
119
120
|
},
|
120
121
|
hintPlacement: {
|
121
122
|
options: placements,
|
122
123
|
control: {
|
123
124
|
type: 'select',
|
124
125
|
},
|
125
|
-
if: { arg: '
|
126
|
+
if: { arg: 'hasHint', thruthy: true },
|
126
127
|
mappers: placements,
|
127
128
|
},
|
128
129
|
hintHasArrow: {
|
129
130
|
control: { type: 'boolean' },
|
130
|
-
if: { arg: '
|
131
|
+
if: { arg: 'hasHint', thruthy: true },
|
131
132
|
},
|
132
133
|
hintWidth: {
|
133
134
|
control: { type: 'text' },
|
134
|
-
if: { arg: '
|
135
|
+
if: { arg: 'hasHint', thruthy: true },
|
135
136
|
},
|
136
137
|
},
|
137
138
|
};
|
@@ -158,6 +159,7 @@ type StoryPropsDefault = Omit<
|
|
158
159
|
| 'chips'
|
159
160
|
| 'onChangeChips'
|
160
161
|
> & {
|
162
|
+
hasHint: boolean;
|
161
163
|
enableContentLeft: boolean;
|
162
164
|
enableContentRight: boolean;
|
163
165
|
};
|
@@ -222,6 +224,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
222
224
|
requiredPlacement: 'right',
|
223
225
|
clear: false,
|
224
226
|
hasDivider: false,
|
227
|
+
hasHint: true,
|
225
228
|
hintText: 'Текст подсказки',
|
226
229
|
hintTrigger: 'hover',
|
227
230
|
hintView: 'default',
|
@@ -251,6 +254,7 @@ type StoryPropsChips = Omit<
|
|
251
254
|
| 'minLength'
|
252
255
|
| 'enumerationType'
|
253
256
|
> & {
|
257
|
+
hasHint: boolean;
|
254
258
|
enableContentLeft: boolean;
|
255
259
|
enableContentRight: boolean;
|
256
260
|
};
|
@@ -37,6 +37,7 @@ const placements: Array<PopoverPlacement> = [
|
|
37
37
|
];
|
38
38
|
|
39
39
|
type StoryTextAreaPropsCustom = {
|
40
|
+
hasHint?: boolean;
|
40
41
|
enableContentRight?: boolean;
|
41
42
|
};
|
42
43
|
|
@@ -92,43 +93,44 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
92
93
|
},
|
93
94
|
hintText: {
|
94
95
|
control: { type: 'text' },
|
96
|
+
if: { arg: 'hasHint', thruthy: true },
|
95
97
|
},
|
96
98
|
hintView: {
|
97
99
|
options: hintViews,
|
98
100
|
control: {
|
99
101
|
type: 'select',
|
100
102
|
},
|
101
|
-
if: { arg: '
|
103
|
+
if: { arg: 'hasHint', thruthy: true },
|
102
104
|
},
|
103
105
|
hintSize: {
|
104
106
|
options: hintSizes,
|
105
107
|
control: {
|
106
108
|
type: 'select',
|
107
109
|
},
|
108
|
-
if: { arg: '
|
110
|
+
if: { arg: 'hasHint', thruthy: true },
|
109
111
|
},
|
110
112
|
hintTrigger: {
|
111
113
|
options: hintTriggers,
|
112
114
|
control: {
|
113
115
|
type: 'inline-radio',
|
114
116
|
},
|
115
|
-
if: { arg: '
|
117
|
+
if: { arg: 'hasHint', thruthy: true },
|
116
118
|
},
|
117
119
|
hintPlacement: {
|
118
120
|
options: placements,
|
119
121
|
control: {
|
120
122
|
type: 'select',
|
121
123
|
},
|
122
|
-
if: { arg: '
|
124
|
+
if: { arg: 'hasHint', thruthy: true },
|
123
125
|
mappers: placements,
|
124
126
|
},
|
125
127
|
hintHasArrow: {
|
126
128
|
control: { type: 'boolean' },
|
127
|
-
if: { arg: '
|
129
|
+
if: { arg: 'hasHint', thruthy: true },
|
128
130
|
},
|
129
131
|
hintWidth: {
|
130
132
|
control: { type: 'text' },
|
131
|
-
if: { arg: '
|
133
|
+
if: { arg: 'hasHint', thruthy: true },
|
132
134
|
},
|
133
135
|
},
|
134
136
|
args: {
|
@@ -152,6 +154,7 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
152
154
|
requiredPlacement: 'right',
|
153
155
|
clear: false,
|
154
156
|
hasDivider: false,
|
157
|
+
hasHint: true,
|
155
158
|
hintText: 'Текст подсказки',
|
156
159
|
hintTrigger: 'hover',
|
157
160
|
hintView: 'default',
|
package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx
CHANGED
@@ -95,43 +95,44 @@ const meta: Meta<typeof TextField> = {
|
|
95
95
|
},
|
96
96
|
hintText: {
|
97
97
|
control: { type: 'text' },
|
98
|
+
if: { arg: 'hasHint', thruthy: true },
|
98
99
|
},
|
99
100
|
hintView: {
|
100
101
|
options: hintViews,
|
101
102
|
control: {
|
102
103
|
type: 'select',
|
103
104
|
},
|
104
|
-
if: { arg: '
|
105
|
+
if: { arg: 'hasHint', thruthy: true },
|
105
106
|
},
|
106
107
|
hintSize: {
|
107
108
|
options: hintSizes,
|
108
109
|
control: {
|
109
110
|
type: 'select',
|
110
111
|
},
|
111
|
-
if: { arg: '
|
112
|
+
if: { arg: 'hasHint', thruthy: true },
|
112
113
|
},
|
113
114
|
hintTrigger: {
|
114
115
|
options: hintTriggers,
|
115
116
|
control: {
|
116
117
|
type: 'inline-radio',
|
117
118
|
},
|
118
|
-
if: { arg: '
|
119
|
+
if: { arg: 'hasHint', thruthy: true },
|
119
120
|
},
|
120
121
|
hintPlacement: {
|
121
122
|
options: placements,
|
122
123
|
control: {
|
123
124
|
type: 'select',
|
124
125
|
},
|
125
|
-
if: { arg: '
|
126
|
+
if: { arg: 'hasHint', thruthy: true },
|
126
127
|
mappers: placements,
|
127
128
|
},
|
128
129
|
hintHasArrow: {
|
129
130
|
control: { type: 'boolean' },
|
130
|
-
if: { arg: '
|
131
|
+
if: { arg: 'hasHint', thruthy: true },
|
131
132
|
},
|
132
133
|
hintWidth: {
|
133
134
|
control: { type: 'text' },
|
134
|
-
if: { arg: '
|
135
|
+
if: { arg: 'hasHint', thruthy: true },
|
135
136
|
},
|
136
137
|
},
|
137
138
|
};
|
@@ -158,6 +159,7 @@ type StoryPropsDefault = Omit<
|
|
158
159
|
| 'chips'
|
159
160
|
| 'onChangeChips'
|
160
161
|
> & {
|
162
|
+
hasHint: boolean;
|
161
163
|
enableContentLeft: boolean;
|
162
164
|
enableContentRight: boolean;
|
163
165
|
};
|
@@ -222,6 +224,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
222
224
|
optional: false,
|
223
225
|
required: false,
|
224
226
|
requiredPlacement: 'right',
|
227
|
+
hasHint: true,
|
225
228
|
hintText: 'Текст подсказки',
|
226
229
|
hintTrigger: 'hover',
|
227
230
|
hintView: 'default',
|
@@ -251,6 +254,7 @@ type StoryPropsChips = Omit<
|
|
251
254
|
| 'minLength'
|
252
255
|
| 'enumerationType'
|
253
256
|
> & {
|
257
|
+
hasHint: boolean;
|
254
258
|
enableContentLeft: boolean;
|
255
259
|
enableContentRight: boolean;
|
256
260
|
};
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
3
3
|
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; }
|
4
4
|
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; }
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { useUniqId } from '@salutejs/plasma-core';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownDivider } from './DropdownDivider.styles';
|
@@ -17,7 +17,7 @@ export var dropdownDividerRoot = function dropdownDividerRoot(Root) {
|
|
17
17
|
view = _ref.view,
|
18
18
|
size = _ref.size,
|
19
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
20
|
-
var uniqId =
|
20
|
+
var uniqId = useUniqId();
|
21
21
|
var innerId = id || uniqId;
|
22
22
|
return /*#__PURE__*/React.createElement(Root, {
|
23
23
|
id: innerId,
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
3
3
|
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; }
|
4
4
|
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; }
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { useUniqId } from '@salutejs/plasma-core';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownFooter } from './DropdownFooter.styles';
|
@@ -18,7 +18,7 @@ export var dropdownFooterRoot = function dropdownFooterRoot(Root) {
|
|
18
18
|
view = _ref.view,
|
19
19
|
size = _ref.size,
|
20
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
21
|
-
var uniqId =
|
21
|
+
var uniqId = useUniqId();
|
22
22
|
var innerId = id || uniqId;
|
23
23
|
return /*#__PURE__*/React.createElement(Root, {
|
24
24
|
id: innerId,
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
3
3
|
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; }
|
4
4
|
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; }
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { useUniqId } from '@salutejs/plasma-core';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownGroup, StyledDropdownLabel } from './DropdownGroup.styles';
|
@@ -21,7 +21,7 @@ export var dropdownGroupRoot = function dropdownGroupRoot(Root) {
|
|
21
21
|
view = _ref.view,
|
22
22
|
size = _ref.size,
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
24
|
-
var uniqId =
|
24
|
+
var uniqId = useUniqId();
|
25
25
|
var innerId = id || uniqId;
|
26
26
|
return /*#__PURE__*/React.createElement(Root, {
|
27
27
|
id: innerId,
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
3
3
|
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; }
|
4
4
|
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; }
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import {
|
6
|
+
import { useUniqId } from '@salutejs/plasma-core';
|
7
7
|
import { base as viewCSS } from './variations/_view/base';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { StyledDropdownHeader } from './DropdownHeader.styles';
|
@@ -18,7 +18,7 @@ export var dropdownHeaderRoot = function dropdownHeaderRoot(Root) {
|
|
18
18
|
size = _ref.size,
|
19
19
|
children = _ref.children,
|
20
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
21
|
-
var uniqId =
|
21
|
+
var uniqId = useUniqId();
|
22
22
|
var innerId = id || uniqId;
|
23
23
|
return /*#__PURE__*/React.createElement(Root, {
|
24
24
|
id: innerId,
|
@@ -3,9 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
3
3
|
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; }
|
4
4
|
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; }
|
5
5
|
import React, { forwardRef, useRef } from 'react';
|
6
|
-
import { useForkRef } from '@salutejs/plasma-core';
|
7
|
-
import { useFocusTrap } from '../../../../hooks';
|
8
|
-
import { safeUseId } from '../../../../utils';
|
6
|
+
import { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';
|
9
7
|
import { base as viewCSS } from './variations/_view/base';
|
10
8
|
import { base as sizeCSS } from './variations/_size/base';
|
11
9
|
import { StyledDropdown, StyledPopover } from './Dropdown.styles';
|
@@ -44,7 +42,7 @@ export var dropdownOldRoot = function dropdownOldRoot(Root) {
|
|
44
42
|
closeOnEsc = _ref$closeOnEsc === void 0 ? false : _ref$closeOnEsc,
|
45
43
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
44
|
var innerIsOpen = Boolean(isOpen || opened);
|
47
|
-
var uniqId =
|
45
|
+
var uniqId = useUniqId();
|
48
46
|
var innerId = id || uniqId;
|
49
47
|
var rootRef = useRef(null);
|
50
48
|
var dropdownRef = useRef(null);
|
@@ -16,8 +16,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
16
16
|
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; }
|
17
17
|
import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';
|
18
18
|
import { usePopper } from 'react-popper';
|
19
|
-
import { useForkRef } from '@salutejs/plasma-core';
|
20
|
-
import { useFocusTrap } from '../../hooks';
|
19
|
+
import { useFocusTrap, useForkRef } from '@salutejs/plasma-core';
|
21
20
|
import { cx } from '../../utils';
|
22
21
|
import { Portal } from '../Portal';
|
23
22
|
import { base as viewCSS } from './variations/_view/base';
|
@@ -37,6 +37,7 @@ const placements: Array<PopoverPlacement> = [
|
|
37
37
|
];
|
38
38
|
|
39
39
|
type StoryTextAreaPropsCustom = {
|
40
|
+
hasHint?: boolean;
|
40
41
|
enableContentRight?: boolean;
|
41
42
|
};
|
42
43
|
|
@@ -92,43 +93,44 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
92
93
|
},
|
93
94
|
hintText: {
|
94
95
|
control: { type: 'text' },
|
96
|
+
if: { arg: 'hasHint', thruthy: true },
|
95
97
|
},
|
96
98
|
hintView: {
|
97
99
|
options: hintViews,
|
98
100
|
control: {
|
99
101
|
type: 'select',
|
100
102
|
},
|
101
|
-
if: { arg: '
|
103
|
+
if: { arg: 'hasHint', thruthy: true },
|
102
104
|
},
|
103
105
|
hintSize: {
|
104
106
|
options: hintSizes,
|
105
107
|
control: {
|
106
108
|
type: 'select',
|
107
109
|
},
|
108
|
-
if: { arg: '
|
110
|
+
if: { arg: 'hasHint', thruthy: true },
|
109
111
|
},
|
110
112
|
hintTrigger: {
|
111
113
|
options: hintTriggers,
|
112
114
|
control: {
|
113
115
|
type: 'inline-radio',
|
114
116
|
},
|
115
|
-
if: { arg: '
|
117
|
+
if: { arg: 'hasHint', thruthy: true },
|
116
118
|
},
|
117
119
|
hintPlacement: {
|
118
120
|
options: placements,
|
119
121
|
control: {
|
120
122
|
type: 'select',
|
121
123
|
},
|
122
|
-
if: { arg: '
|
124
|
+
if: { arg: 'hasHint', thruthy: true },
|
123
125
|
mappers: placements,
|
124
126
|
},
|
125
127
|
hintHasArrow: {
|
126
128
|
control: { type: 'boolean' },
|
127
|
-
if: { arg: '
|
129
|
+
if: { arg: 'hasHint', thruthy: true },
|
128
130
|
},
|
129
131
|
hintWidth: {
|
130
132
|
control: { type: 'text' },
|
131
|
-
if: { arg: '
|
133
|
+
if: { arg: 'hasHint', thruthy: true },
|
132
134
|
},
|
133
135
|
},
|
134
136
|
args: {
|
@@ -152,6 +154,7 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
152
154
|
requiredPlacement: 'right',
|
153
155
|
clear: false,
|
154
156
|
hasDivider: false,
|
157
|
+
hasHint: true,
|
155
158
|
hintText: 'Текст подсказки',
|
156
159
|
hintTrigger: 'hover',
|
157
160
|
hintView: 'default',
|
@@ -95,43 +95,44 @@ const meta: Meta<typeof TextField> = {
|
|
95
95
|
},
|
96
96
|
hintText: {
|
97
97
|
control: { type: 'text' },
|
98
|
+
if: { arg: 'hasHint', thruthy: true },
|
98
99
|
},
|
99
100
|
hintView: {
|
100
101
|
options: hintViews,
|
101
102
|
control: {
|
102
103
|
type: 'select',
|
103
104
|
},
|
104
|
-
if: { arg: '
|
105
|
+
if: { arg: 'hasHint', thruthy: true },
|
105
106
|
},
|
106
107
|
hintSize: {
|
107
108
|
options: hintSizes,
|
108
109
|
control: {
|
109
110
|
type: 'select',
|
110
111
|
},
|
111
|
-
if: { arg: '
|
112
|
+
if: { arg: 'hasHint', thruthy: true },
|
112
113
|
},
|
113
114
|
hintTrigger: {
|
114
115
|
options: hintTriggers,
|
115
116
|
control: {
|
116
117
|
type: 'inline-radio',
|
117
118
|
},
|
118
|
-
if: { arg: '
|
119
|
+
if: { arg: 'hasHint', thruthy: true },
|
119
120
|
},
|
120
121
|
hintPlacement: {
|
121
122
|
options: placements,
|
122
123
|
control: {
|
123
124
|
type: 'select',
|
124
125
|
},
|
125
|
-
if: { arg: '
|
126
|
+
if: { arg: 'hasHint', thruthy: true },
|
126
127
|
mappers: placements,
|
127
128
|
},
|
128
129
|
hintHasArrow: {
|
129
130
|
control: { type: 'boolean' },
|
130
|
-
if: { arg: '
|
131
|
+
if: { arg: 'hasHint', thruthy: true },
|
131
132
|
},
|
132
133
|
hintWidth: {
|
133
134
|
control: { type: 'text' },
|
134
|
-
if: { arg: '
|
135
|
+
if: { arg: 'hasHint', thruthy: true },
|
135
136
|
},
|
136
137
|
},
|
137
138
|
};
|
@@ -158,6 +159,7 @@ type StoryPropsDefault = Omit<
|
|
158
159
|
| 'chips'
|
159
160
|
| 'onChangeChips'
|
160
161
|
> & {
|
162
|
+
hasHint: boolean;
|
161
163
|
enableContentLeft: boolean;
|
162
164
|
enableContentRight: boolean;
|
163
165
|
};
|
@@ -222,6 +224,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
222
224
|
requiredPlacement: 'right',
|
223
225
|
clear: false,
|
224
226
|
hasDivider: false,
|
227
|
+
hasHint: true,
|
225
228
|
hintText: 'Текст подсказки',
|
226
229
|
hintTrigger: 'hover',
|
227
230
|
hintView: 'default',
|
@@ -251,6 +254,7 @@ type StoryPropsChips = Omit<
|
|
251
254
|
| 'minLength'
|
252
255
|
| 'enumerationType'
|
253
256
|
> & {
|
257
|
+
hasHint: boolean;
|
254
258
|
enableContentLeft: boolean;
|
255
259
|
enableContentRight: boolean;
|
256
260
|
};
|
@@ -37,6 +37,7 @@ const placements: Array<PopoverPlacement> = [
|
|
37
37
|
];
|
38
38
|
|
39
39
|
type StoryTextAreaPropsCustom = {
|
40
|
+
hasHint?: boolean;
|
40
41
|
enableContentRight?: boolean;
|
41
42
|
};
|
42
43
|
|
@@ -92,43 +93,44 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
92
93
|
},
|
93
94
|
hintText: {
|
94
95
|
control: { type: 'text' },
|
96
|
+
if: { arg: 'hasHint', thruthy: true },
|
95
97
|
},
|
96
98
|
hintView: {
|
97
99
|
options: hintViews,
|
98
100
|
control: {
|
99
101
|
type: 'select',
|
100
102
|
},
|
101
|
-
if: { arg: '
|
103
|
+
if: { arg: 'hasHint', thruthy: true },
|
102
104
|
},
|
103
105
|
hintSize: {
|
104
106
|
options: hintSizes,
|
105
107
|
control: {
|
106
108
|
type: 'select',
|
107
109
|
},
|
108
|
-
if: { arg: '
|
110
|
+
if: { arg: 'hasHint', thruthy: true },
|
109
111
|
},
|
110
112
|
hintTrigger: {
|
111
113
|
options: hintTriggers,
|
112
114
|
control: {
|
113
115
|
type: 'inline-radio',
|
114
116
|
},
|
115
|
-
if: { arg: '
|
117
|
+
if: { arg: 'hasHint', thruthy: true },
|
116
118
|
},
|
117
119
|
hintPlacement: {
|
118
120
|
options: placements,
|
119
121
|
control: {
|
120
122
|
type: 'select',
|
121
123
|
},
|
122
|
-
if: { arg: '
|
124
|
+
if: { arg: 'hasHint', thruthy: true },
|
123
125
|
mappers: placements,
|
124
126
|
},
|
125
127
|
hintHasArrow: {
|
126
128
|
control: { type: 'boolean' },
|
127
|
-
if: { arg: '
|
129
|
+
if: { arg: 'hasHint', thruthy: true },
|
128
130
|
},
|
129
131
|
hintWidth: {
|
130
132
|
control: { type: 'text' },
|
131
|
-
if: { arg: '
|
133
|
+
if: { arg: 'hasHint', thruthy: true },
|
132
134
|
},
|
133
135
|
},
|
134
136
|
args: {
|
@@ -152,6 +154,7 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
152
154
|
requiredPlacement: 'right',
|
153
155
|
clear: false,
|
154
156
|
hasDivider: false,
|
157
|
+
hasHint: true,
|
155
158
|
hintText: 'Текст подсказки',
|
156
159
|
hintTrigger: 'hover',
|
157
160
|
hintView: 'default',
|
@@ -95,43 +95,44 @@ const meta: Meta<typeof TextField> = {
|
|
95
95
|
},
|
96
96
|
hintText: {
|
97
97
|
control: { type: 'text' },
|
98
|
+
if: { arg: 'hasHint', thruthy: true },
|
98
99
|
},
|
99
100
|
hintView: {
|
100
101
|
options: hintViews,
|
101
102
|
control: {
|
102
103
|
type: 'select',
|
103
104
|
},
|
104
|
-
if: { arg: '
|
105
|
+
if: { arg: 'hasHint', thruthy: true },
|
105
106
|
},
|
106
107
|
hintSize: {
|
107
108
|
options: hintSizes,
|
108
109
|
control: {
|
109
110
|
type: 'select',
|
110
111
|
},
|
111
|
-
if: { arg: '
|
112
|
+
if: { arg: 'hasHint', thruthy: true },
|
112
113
|
},
|
113
114
|
hintTrigger: {
|
114
115
|
options: hintTriggers,
|
115
116
|
control: {
|
116
117
|
type: 'inline-radio',
|
117
118
|
},
|
118
|
-
if: { arg: '
|
119
|
+
if: { arg: 'hasHint', thruthy: true },
|
119
120
|
},
|
120
121
|
hintPlacement: {
|
121
122
|
options: placements,
|
122
123
|
control: {
|
123
124
|
type: 'select',
|
124
125
|
},
|
125
|
-
if: { arg: '
|
126
|
+
if: { arg: 'hasHint', thruthy: true },
|
126
127
|
mappers: placements,
|
127
128
|
},
|
128
129
|
hintHasArrow: {
|
129
130
|
control: { type: 'boolean' },
|
130
|
-
if: { arg: '
|
131
|
+
if: { arg: 'hasHint', thruthy: true },
|
131
132
|
},
|
132
133
|
hintWidth: {
|
133
134
|
control: { type: 'text' },
|
134
|
-
if: { arg: '
|
135
|
+
if: { arg: 'hasHint', thruthy: true },
|
135
136
|
},
|
136
137
|
},
|
137
138
|
};
|
@@ -158,6 +159,7 @@ type StoryPropsDefault = Omit<
|
|
158
159
|
| 'chips'
|
159
160
|
| 'onChangeChips'
|
160
161
|
> & {
|
162
|
+
hasHint: boolean;
|
161
163
|
enableContentLeft: boolean;
|
162
164
|
enableContentRight: boolean;
|
163
165
|
};
|
@@ -222,6 +224,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
222
224
|
optional: false,
|
223
225
|
required: false,
|
224
226
|
requiredPlacement: 'right',
|
227
|
+
hasHint: true,
|
225
228
|
hintText: 'Текст подсказки',
|
226
229
|
hintTrigger: 'hover',
|
227
230
|
hintView: 'default',
|
@@ -251,6 +254,7 @@ type StoryPropsChips = Omit<
|
|
251
254
|
| 'minLength'
|
252
255
|
| 'enumerationType'
|
253
256
|
> & {
|
257
|
+
hasHint: boolean;
|
254
258
|
enableContentLeft: boolean;
|
255
259
|
enableContentRight: boolean;
|
256
260
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownDivider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownDivider/DropdownDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"DropdownDivider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownDivider/DropdownDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,mBAAmB,SAAU,UAAU,cAAc,EAAE,oBAAoB,CAAC;;;;wCAUnF,CAAC;AAEP,eAAO,MAAM,qBAAqB;;;mBAZQ,UAAU,cAAc,EAAE,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;CA6BxF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownFooter/DropdownFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"DropdownFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownFooter/DropdownFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,kBAAkB,SAAU,UAAU,cAAc,EAAE,mBAAmB,CAAC;;;;wCAclF,CAAC;AAEN,eAAO,MAAM,oBAAoB;;;mBAhBQ,UAAU,cAAc,EAAE,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;CAiCtF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownGroup/DropdownGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"DropdownGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownGroup/DropdownGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,iBAAiB,SAAU,UAAU,cAAc,EAAE,kBAAkB,CAAC;;;;;;;;wCAehF,CAAC;AAEN,eAAO,MAAM,mBAAmB;;;mBAjBQ,UAAU,cAAc,EAAE,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;CAkCpF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownHeader/DropdownHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"DropdownHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownHeader/DropdownHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,kBAAkB,SAAU,UAAU,cAAc,EAAE,mBAAmB,CAAC;;;;wCAclF,CAAC;AAEN,eAAO,MAAM,oBAAoB;;;mBAhBQ,UAAU,cAAc,EAAE,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;CAiCtF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownOld.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownOld/DropdownOld.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"DropdownOld.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownOld/DropdownOld.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,eAAe,SAAU,UAAU,cAAc,EAAE,aAAa,CAAC,iKAgEzE,CAAC;AAEN,eAAO,MAAM,iBAAiB;;;mBAlEQ,UAAU,cAAc,EAAE,aAAa,CAAC;;;;;;;;;;;;;;CAmF7E,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAKpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAKpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAItE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC,+JA2PpE,CAAC;AAEN,eAAO,MAAM,aAAa;;;mBA7PQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;CA0QxE,CAAC"}
|