@elliemae/ds-pills 2.4.2-rc.9 → 2.4.3-rc.1
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/PillButton.js +1 -1
- package/cjs/components/PillGroup.js +3 -4
- package/cjs/components/styled.js +53 -15
- package/cjs/components/types/DropdownPill.js +1 -1
- package/cjs/components/types/InputPill.js +6 -4
- package/cjs/components/types/RemovablePill.js +2 -2
- package/cjs/deprecated/DropdownPill.js +3 -4
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +0 -1
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +1 -2
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +2 -3
- package/cjs/deprecated/OverflowPill.js +2 -3
- package/cjs/deprecated/ReadOnlyPill.js +0 -1
- package/cjs/props.js +5 -1
- package/esm/components/PillButton.js +1 -1
- package/esm/components/PillGroup.js +3 -4
- package/esm/components/styled.js +53 -14
- package/esm/components/types/DropdownPill.js +1 -1
- package/esm/components/types/InputPill.js +6 -4
- package/esm/components/types/RemovablePill.js +2 -2
- package/esm/deprecated/DropdownPill.js +3 -4
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +0 -1
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +1 -2
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +2 -3
- package/esm/deprecated/OverflowPill.js +2 -3
- package/esm/deprecated/ReadOnlyPill.js +0 -1
- package/esm/props.js +5 -1
- package/package.json +15 -15
- package/types/components/styled.d.ts +7 -4
- package/types/props.d.ts +10 -0
|
@@ -44,7 +44,7 @@ const DSPillButton = props$1 => {
|
|
|
44
44
|
|
|
45
45
|
return /*#__PURE__*/jsxRuntime.jsx(styled.StyledPillButton, _objectSpread(_objectSpread({}, rest), {}, {
|
|
46
46
|
buttonType: "raw",
|
|
47
|
-
className:
|
|
47
|
+
className: `${typeToClassName[type]} ${rest.className}`,
|
|
48
48
|
children: children
|
|
49
49
|
}));
|
|
50
50
|
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
7
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
9
8
|
require('core-js/modules/esnext.iterator.map.js');
|
|
10
9
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
@@ -37,14 +36,14 @@ const DSPillGroupV2 = props$1 => {
|
|
|
37
36
|
const propsWithDefaults = dsPropsHelpers.useMemoMergePropsWithDefault(props$1, props.DSPillGroupDefaultProps);
|
|
38
37
|
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefaults, props.DSPillGroupPropTypes);
|
|
39
38
|
const globalAttrs = dsPropsHelpers.useGetGlobalAttributes(propsWithDefaults);
|
|
40
|
-
const pillGroupUid = React.useMemo(() =>
|
|
39
|
+
const pillGroupUid = React.useMemo(() => `ds-pill-group-${uid.uid()}`, []);
|
|
41
40
|
const {
|
|
42
41
|
children,
|
|
43
42
|
width,
|
|
44
43
|
innerRef
|
|
45
44
|
} = propsWithDefaults;
|
|
46
45
|
const onKeyboardRemove = React.useCallback(pillUid => {
|
|
47
|
-
const elems = [...document.querySelectorAll(
|
|
46
|
+
const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
|
|
48
47
|
const pillIndex = elems.findIndex(elem => elem.id === pillUid);
|
|
49
48
|
|
|
50
49
|
if (pillIndex > 0) {
|
|
@@ -54,7 +53,7 @@ const DSPillGroupV2 = props$1 => {
|
|
|
54
53
|
}
|
|
55
54
|
}, [pillGroupUid]);
|
|
56
55
|
const onKeyboardNavigation = React.useCallback((pillUid, step, e) => {
|
|
57
|
-
const elems = [...document.querySelectorAll(
|
|
56
|
+
const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
|
|
58
57
|
const pillIndex = elems.findIndex(elem => elem.id === pillUid);
|
|
59
58
|
|
|
60
59
|
if (pillIndex >= 0) {
|
package/cjs/components/styled.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var styled = require('styled-components');
|
|
7
6
|
var dsSystem = require('@elliemae/ds-system');
|
|
8
7
|
var Grid = require('@elliemae/ds-grid');
|
|
@@ -10,50 +9,88 @@ var dsButton = require('@elliemae/ds-button');
|
|
|
10
9
|
|
|
11
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
11
|
|
|
13
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
14
12
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
13
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
/* eslint-disable max-lines */
|
|
16
|
+
|
|
17
|
+
// =============================================================================
|
|
18
18
|
// Common CSS
|
|
19
19
|
// =============================================================================
|
|
20
|
-
|
|
21
20
|
const borderOutside = function (color) {
|
|
22
21
|
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
23
22
|
let zIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2;
|
|
24
23
|
let borderRadius = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '12px';
|
|
25
|
-
return dsSystem.css
|
|
24
|
+
return dsSystem.css`
|
|
25
|
+
:after {
|
|
26
|
+
content: ' ';
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0px;
|
|
29
|
+
left: 0px;
|
|
30
|
+
right: 0px;
|
|
31
|
+
bottom: 0px;
|
|
32
|
+
border: ${size}px solid ${_ref => {
|
|
26
33
|
let {
|
|
27
34
|
disabled,
|
|
28
35
|
theme
|
|
29
36
|
} = _ref;
|
|
30
37
|
return disabled ? theme.colors.neutral[400] : color;
|
|
31
|
-
}
|
|
38
|
+
}};
|
|
39
|
+
border-top-left-radius: ${borderRadius};
|
|
40
|
+
border-top-right-radius: ${borderRadius};
|
|
41
|
+
border-bottom-left-radius: ${borderRadius};
|
|
42
|
+
border-bottom-right-radius: ${borderRadius};
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
z-index: ${zIndex};
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
32
47
|
};
|
|
33
48
|
|
|
34
|
-
const commonPillWrapperCss = dsSystem.css
|
|
49
|
+
const commonPillWrapperCss = dsSystem.css`
|
|
50
|
+
height: ${props => props?.size === 'm' ? '24px' : '18px'};
|
|
51
|
+
|
|
52
|
+
position: relative;
|
|
53
|
+
|
|
54
|
+
width: fit-content;
|
|
55
|
+
|
|
56
|
+
background-color: ${_ref2 => {
|
|
35
57
|
let {
|
|
36
58
|
theme,
|
|
37
59
|
disabled
|
|
38
60
|
} = _ref2;
|
|
39
61
|
return disabled ? theme.colors.neutral['080'] : theme.colors.brand[200];
|
|
40
|
-
}
|
|
62
|
+
}};
|
|
63
|
+
|
|
64
|
+
outline: none;
|
|
65
|
+
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
|
|
68
|
+
padding: 0px 12px 0 12px;
|
|
69
|
+
border-radius: 12px;
|
|
70
|
+
|
|
71
|
+
font-size: 13px;
|
|
72
|
+
line-height: 1;
|
|
73
|
+
user-select: ${_ref3 => {
|
|
41
74
|
let {
|
|
42
75
|
disabled
|
|
43
76
|
} = _ref3;
|
|
44
77
|
return disabled ? 'none' : 'auto';
|
|
45
|
-
}
|
|
78
|
+
}};
|
|
79
|
+
cursor: ${_ref4 => {
|
|
46
80
|
let {
|
|
47
81
|
disabled
|
|
48
82
|
} = _ref4;
|
|
49
83
|
return disabled ? 'not-allowed' : 'default';
|
|
50
|
-
}
|
|
84
|
+
}};
|
|
85
|
+
color: ${_ref5 => {
|
|
51
86
|
let {
|
|
52
87
|
theme,
|
|
53
88
|
disabled
|
|
54
89
|
} = _ref5;
|
|
55
90
|
return disabled ? theme.colors.neutral['400'] : theme.colors.brand['800'];
|
|
56
|
-
}
|
|
91
|
+
}};
|
|
92
|
+
${props => borderOutside(props.theme.colors.brand[300])};
|
|
93
|
+
`; // =============================================================================
|
|
57
94
|
// Pills wrappers
|
|
58
95
|
// =============================================================================
|
|
59
96
|
|
|
@@ -67,11 +104,12 @@ const StyledInputPillWrapper = /*#__PURE__*/styled__default["default"](Grid__def
|
|
|
67
104
|
componentId: "sc-j0tlch-2"
|
|
68
105
|
})(["", " background:", ";padding:0;", ":focus-within{", "}:active{", "}& .em-ds-input{outline:none !important;border:none !important;box-shadow:none !important;border-radius:0 !important;height:100%;background:transparent;width:", ";padding:0;margin:0 0 0 8px;}& .em-ds-input__tooltip-ref{height:100%;}"], commonPillWrapperCss, props => props.theme.colors.neutral['000'], _ref6 => {
|
|
69
106
|
let {
|
|
70
|
-
|
|
71
|
-
|
|
107
|
+
theme,
|
|
108
|
+
hasError
|
|
72
109
|
} = _ref6;
|
|
73
|
-
return borderOutside(
|
|
74
|
-
|
|
110
|
+
if (hasError) return borderOutside(theme.colors.danger[900]);
|
|
111
|
+
return borderOutside(theme.colors.brand[500]);
|
|
112
|
+
}, props => props.inputHasFocus ? borderOutside(props.theme.colors.brand[700], 2) : '', props => props.inputHasFocus ? borderOutside(props.theme.colors.brand[500]) : '', props => `${props.inputWidth + (props.value === '' ? 24 : 0)}px`);
|
|
75
113
|
const StyledDropdownPillWrapper = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
76
114
|
componentId: "sc-j0tlch-3"
|
|
77
115
|
})(["", " font-weight:", ";padding:0 0 0 12px;"], commonPillWrapperCss, props => props.theme.fontWeights.semibold);
|
|
@@ -39,7 +39,7 @@ const DropdownPill = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
39
39
|
onDropdownClick
|
|
40
40
|
} = _ref;
|
|
41
41
|
const chevronRef = React.useRef(null);
|
|
42
|
-
const pillUid = React.useMemo(() =>
|
|
42
|
+
const pillUid = React.useMemo(() => `ds-pill-${uid.uid()}`, []);
|
|
43
43
|
const TextComponent = labelTruncated ? _ref2 => {
|
|
44
44
|
let {
|
|
45
45
|
children
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var uid = require('uid');
|
|
9
8
|
var dsIcons = require('@elliemae/ds-icons');
|
|
@@ -25,11 +24,13 @@ const InputPill = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
25
24
|
inputRender,
|
|
26
25
|
onInputChange,
|
|
27
26
|
onInputClear,
|
|
28
|
-
innerRef
|
|
27
|
+
innerRef,
|
|
28
|
+
hasError,
|
|
29
|
+
inputId
|
|
29
30
|
} = _ref;
|
|
30
31
|
const ref = React.useRef(null);
|
|
31
32
|
const InputComponent = React.useMemo(() => inputRender, [inputRender]);
|
|
32
|
-
const pillUid = React.useMemo(() =>
|
|
33
|
+
const pillUid = React.useMemo(() => inputId ?? `ds-pill-${uid.uid()}`, []);
|
|
33
34
|
const onCloseIconClick = React.useCallback(e => {
|
|
34
35
|
if ([undefined, 'Enter', 'Space'].includes(e.code)) {
|
|
35
36
|
e.preventDefault();
|
|
@@ -45,7 +46,8 @@ const InputPill = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
45
46
|
cols: label === '' ? ['auto'] : ['auto', '24px'],
|
|
46
47
|
inputWidth: inputWidth,
|
|
47
48
|
value: label,
|
|
48
|
-
inputHasFocus: inputHasFocus
|
|
49
|
+
inputHasFocus: inputHasFocus,
|
|
50
|
+
hasError: hasError
|
|
49
51
|
}, void 0, /*#__PURE__*/_jsx__default["default"](InputComponent, {
|
|
50
52
|
id: pillUid,
|
|
51
53
|
className: "ds-pill-focus-point",
|
|
@@ -32,7 +32,7 @@ const RemovablePill = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
32
32
|
onKeyboardRemove,
|
|
33
33
|
onKeyboardNavigation
|
|
34
34
|
} = React.useContext(PillGroup.DSPillGroupV2Context);
|
|
35
|
-
const pillUid = React.useMemo(() =>
|
|
35
|
+
const pillUid = React.useMemo(() => `ds-pill-${uid.uid()}`, []);
|
|
36
36
|
const TextComponent = labelTruncated ? _ref2 => {
|
|
37
37
|
let {
|
|
38
38
|
children
|
|
@@ -75,7 +75,7 @@ const RemovablePill = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
75
75
|
innerRef: innerRef,
|
|
76
76
|
onClick: onRemove,
|
|
77
77
|
onKeyDown: onKeyDown,
|
|
78
|
-
"aria-label":
|
|
78
|
+
"aria-label": `Remove ${label}`,
|
|
79
79
|
type: "right",
|
|
80
80
|
tabIndex: tabIndex
|
|
81
81
|
}, void 0, /*#__PURE__*/_jsx__default["default"](dsIcons.CloseXsmall, {
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
9
5
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
7
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
8
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
9
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
11
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
12
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
14
13
|
var React = require('react');
|
|
15
14
|
var reactDesc = require('react-desc');
|
|
16
15
|
var DSDropdownMenu = require('@elliemae/ds-dropdownmenu');
|
|
@@ -5,7 +5,6 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
7
|
require('core-js/modules/esnext.iterator.map.js');
|
|
8
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
9
8
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
9
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
10
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
5
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
6
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
7
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
8
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
@@ -144,7 +143,7 @@ function LabeledDropdownMultiPills(_ref) {
|
|
|
144
143
|
|
|
145
144
|
return null;
|
|
146
145
|
}), selectedOptions && selectedOptions.length > overflowQuantity && /*#__PURE__*/_jsx__default["default"](OverflowPill.OverflowPill, {
|
|
147
|
-
label:
|
|
146
|
+
label: `+ ${selectedOptions.length - overflowQuantity}`,
|
|
148
147
|
options: overflowOptions
|
|
149
148
|
})]
|
|
150
149
|
});
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
5
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
6
|
require('core-js/modules/esnext.async-iterator.find.js');
|
|
8
7
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
8
|
require('core-js/modules/esnext.iterator.find.js');
|
|
@@ -140,7 +139,7 @@ function LabeledDropdownSinglePill(_ref) {
|
|
|
140
139
|
|
|
141
140
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
142
141
|
children: [/*#__PURE__*/jsxRuntime.jsx(DropdownPill.DropdownPill, _objectSpread(_objectSpread({}, menuProps), {}, {
|
|
143
|
-
label: !labelIsValue ? label : optionValue
|
|
142
|
+
label: !labelIsValue ? label : optionValue?.label,
|
|
144
143
|
maxWidth: maxWidth,
|
|
145
144
|
minWidth: minWidth,
|
|
146
145
|
onSelectMenuItem: selectOption,
|
|
@@ -152,7 +151,7 @@ function LabeledDropdownSinglePill(_ref) {
|
|
|
152
151
|
closeOnClick: true
|
|
153
152
|
})],
|
|
154
153
|
selection: {
|
|
155
|
-
'multi-selection-views': optionValue ? [optionValue
|
|
154
|
+
'multi-selection-views': optionValue ? [optionValue?.id] : ''
|
|
156
155
|
},
|
|
157
156
|
variant: "title"
|
|
158
157
|
})), renderSelection()]
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
6
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
8
7
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
8
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
@@ -32,9 +31,9 @@ function OverflowPill(_ref) {
|
|
|
32
31
|
let text = '';
|
|
33
32
|
options.forEach(option => {
|
|
34
33
|
if (!tooltipText || option === options[0]) {
|
|
35
|
-
text =
|
|
34
|
+
text = `${option.label}`;
|
|
36
35
|
} else {
|
|
37
|
-
text = text.concat(
|
|
36
|
+
text = text.concat(`, ${option.label}`);
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
setTooltipText(text);
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var reactDesc = require('react-desc');
|
|
9
8
|
var dsIcons = require('@elliemae/ds-icons');
|
package/cjs/props.js
CHANGED
|
@@ -22,8 +22,11 @@ const DSPillV2PropTypes = {
|
|
|
22
22
|
onInputChange: reactDesc.PropTypes.func.description('Callback triggered when user provides input to the input pill').defaultValue(() => null),
|
|
23
23
|
onInputClear: reactDesc.PropTypes.func.description('Callback triggered when the user clears an input pill').defaultValue(() => null),
|
|
24
24
|
inputWidth: reactDesc.PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),
|
|
25
|
+
inputId: reactDesc.PropTypes.string.description('ID for the input pill').defaultValue(undefined),
|
|
25
26
|
dropdownProps: reactDesc.PropTypes.object.description('Properties that will be used for the dropdown-menu').defaultValue({}),
|
|
26
|
-
onDropdownClick: reactDesc.PropTypes.func.description('Callback when dropdown button is clicked or pressed').defaultValue(() => null)
|
|
27
|
+
onDropdownClick: reactDesc.PropTypes.func.description('Callback when dropdown button is clicked or pressed').defaultValue(() => null),
|
|
28
|
+
disabled: reactDesc.PropTypes.bool.description('Whether the pill should be disabled. Only for value and removable pill').defaultValue(false),
|
|
29
|
+
hasError: reactDesc.PropTypes.bool.description('Whether the pill should be in an error state. Only for input pill').defaultValue(false)
|
|
27
30
|
};
|
|
28
31
|
const DSPillButtonPropTypes = {
|
|
29
32
|
type: reactDesc.PropTypes.oneOf(['only', 'left', 'right']).description('The position in which this button will be placed. Only used for css styling internally').defaultValue('right'),
|
|
@@ -37,6 +40,7 @@ const DSPillGroupPropTypes = {
|
|
|
37
40
|
const DSPillV2DefaultProps = {
|
|
38
41
|
innerRef: () => null,
|
|
39
42
|
disabled: false,
|
|
43
|
+
hasError: false,
|
|
40
44
|
ariaLabel: '',
|
|
41
45
|
size: 'm',
|
|
42
46
|
labelTruncated: true,
|
|
@@ -35,7 +35,7 @@ const DSPillButton = props => {
|
|
|
35
35
|
|
|
36
36
|
return /*#__PURE__*/jsx(StyledPillButton, _objectSpread(_objectSpread({}, rest), {}, {
|
|
37
37
|
buttonType: "raw",
|
|
38
|
-
className:
|
|
38
|
+
className: `${typeToClassName[type]} ${rest.className}`,
|
|
39
39
|
children: children
|
|
40
40
|
}));
|
|
41
41
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
3
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
5
4
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
6
5
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
@@ -27,14 +26,14 @@ const DSPillGroupV2 = props => {
|
|
|
27
26
|
const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);
|
|
28
27
|
useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes);
|
|
29
28
|
const globalAttrs = useGetGlobalAttributes(propsWithDefaults);
|
|
30
|
-
const pillGroupUid = useMemo(() =>
|
|
29
|
+
const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);
|
|
31
30
|
const {
|
|
32
31
|
children,
|
|
33
32
|
width,
|
|
34
33
|
innerRef
|
|
35
34
|
} = propsWithDefaults;
|
|
36
35
|
const onKeyboardRemove = useCallback(pillUid => {
|
|
37
|
-
const elems = [...document.querySelectorAll(
|
|
36
|
+
const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
|
|
38
37
|
const pillIndex = elems.findIndex(elem => elem.id === pillUid);
|
|
39
38
|
|
|
40
39
|
if (pillIndex > 0) {
|
|
@@ -44,7 +43,7 @@ const DSPillGroupV2 = props => {
|
|
|
44
43
|
}
|
|
45
44
|
}, [pillGroupUid]);
|
|
46
45
|
const onKeyboardNavigation = useCallback((pillUid, step, e) => {
|
|
47
|
-
const elems = [...document.querySelectorAll(
|
|
46
|
+
const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
|
|
48
47
|
const pillIndex = elems.findIndex(elem => elem.id === pillUid);
|
|
49
48
|
|
|
50
49
|
if (pillIndex >= 0) {
|
package/esm/components/styled.js
CHANGED
|
@@ -1,49 +1,87 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
1
|
import styled from 'styled-components';
|
|
3
2
|
import { css } from '@elliemae/ds-system';
|
|
4
3
|
import Grid from '@elliemae/ds-grid';
|
|
5
4
|
import { DSButtonV2 } from '@elliemae/ds-button';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
/* eslint-disable max-lines */
|
|
7
|
+
|
|
8
|
+
// =============================================================================
|
|
8
9
|
// Common CSS
|
|
9
10
|
// =============================================================================
|
|
10
|
-
|
|
11
11
|
const borderOutside = function (color) {
|
|
12
12
|
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
13
13
|
let zIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2;
|
|
14
14
|
let borderRadius = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '12px';
|
|
15
|
-
return css
|
|
15
|
+
return css`
|
|
16
|
+
:after {
|
|
17
|
+
content: ' ';
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0px;
|
|
20
|
+
left: 0px;
|
|
21
|
+
right: 0px;
|
|
22
|
+
bottom: 0px;
|
|
23
|
+
border: ${size}px solid ${_ref => {
|
|
16
24
|
let {
|
|
17
25
|
disabled,
|
|
18
26
|
theme
|
|
19
27
|
} = _ref;
|
|
20
28
|
return disabled ? theme.colors.neutral[400] : color;
|
|
21
|
-
}
|
|
29
|
+
}};
|
|
30
|
+
border-top-left-radius: ${borderRadius};
|
|
31
|
+
border-top-right-radius: ${borderRadius};
|
|
32
|
+
border-bottom-left-radius: ${borderRadius};
|
|
33
|
+
border-bottom-right-radius: ${borderRadius};
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
z-index: ${zIndex};
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
22
38
|
};
|
|
23
39
|
|
|
24
|
-
const commonPillWrapperCss = css
|
|
40
|
+
const commonPillWrapperCss = css`
|
|
41
|
+
height: ${props => props?.size === 'm' ? '24px' : '18px'};
|
|
42
|
+
|
|
43
|
+
position: relative;
|
|
44
|
+
|
|
45
|
+
width: fit-content;
|
|
46
|
+
|
|
47
|
+
background-color: ${_ref2 => {
|
|
25
48
|
let {
|
|
26
49
|
theme,
|
|
27
50
|
disabled
|
|
28
51
|
} = _ref2;
|
|
29
52
|
return disabled ? theme.colors.neutral['080'] : theme.colors.brand[200];
|
|
30
|
-
}
|
|
53
|
+
}};
|
|
54
|
+
|
|
55
|
+
outline: none;
|
|
56
|
+
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
|
|
59
|
+
padding: 0px 12px 0 12px;
|
|
60
|
+
border-radius: 12px;
|
|
61
|
+
|
|
62
|
+
font-size: 13px;
|
|
63
|
+
line-height: 1;
|
|
64
|
+
user-select: ${_ref3 => {
|
|
31
65
|
let {
|
|
32
66
|
disabled
|
|
33
67
|
} = _ref3;
|
|
34
68
|
return disabled ? 'none' : 'auto';
|
|
35
|
-
}
|
|
69
|
+
}};
|
|
70
|
+
cursor: ${_ref4 => {
|
|
36
71
|
let {
|
|
37
72
|
disabled
|
|
38
73
|
} = _ref4;
|
|
39
74
|
return disabled ? 'not-allowed' : 'default';
|
|
40
|
-
}
|
|
75
|
+
}};
|
|
76
|
+
color: ${_ref5 => {
|
|
41
77
|
let {
|
|
42
78
|
theme,
|
|
43
79
|
disabled
|
|
44
80
|
} = _ref5;
|
|
45
81
|
return disabled ? theme.colors.neutral['400'] : theme.colors.brand['800'];
|
|
46
|
-
}
|
|
82
|
+
}};
|
|
83
|
+
${props => borderOutside(props.theme.colors.brand[300])};
|
|
84
|
+
`; // =============================================================================
|
|
47
85
|
// Pills wrappers
|
|
48
86
|
// =============================================================================
|
|
49
87
|
|
|
@@ -57,11 +95,12 @@ const StyledInputPillWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
|
57
95
|
componentId: "sc-j0tlch-2"
|
|
58
96
|
})(["", " background:", ";padding:0;", ":focus-within{", "}:active{", "}& .em-ds-input{outline:none !important;border:none !important;box-shadow:none !important;border-radius:0 !important;height:100%;background:transparent;width:", ";padding:0;margin:0 0 0 8px;}& .em-ds-input__tooltip-ref{height:100%;}"], commonPillWrapperCss, props => props.theme.colors.neutral['000'], _ref6 => {
|
|
59
97
|
let {
|
|
60
|
-
|
|
61
|
-
|
|
98
|
+
theme,
|
|
99
|
+
hasError
|
|
62
100
|
} = _ref6;
|
|
63
|
-
return borderOutside(
|
|
64
|
-
|
|
101
|
+
if (hasError) return borderOutside(theme.colors.danger[900]);
|
|
102
|
+
return borderOutside(theme.colors.brand[500]);
|
|
103
|
+
}, props => props.inputHasFocus ? borderOutside(props.theme.colors.brand[700], 2) : '', props => props.inputHasFocus ? borderOutside(props.theme.colors.brand[500]) : '', props => `${props.inputWidth + (props.value === '' ? 24 : 0)}px`);
|
|
65
104
|
const StyledDropdownPillWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
66
105
|
componentId: "sc-j0tlch-3"
|
|
67
106
|
})(["", " font-weight:", ";padding:0 0 0 12px;"], commonPillWrapperCss, props => props.theme.fontWeights.semibold);
|
|
@@ -29,7 +29,7 @@ const DropdownPill = /*#__PURE__*/React.memo(_ref => {
|
|
|
29
29
|
onDropdownClick
|
|
30
30
|
} = _ref;
|
|
31
31
|
const chevronRef = useRef(null);
|
|
32
|
-
const pillUid = useMemo(() =>
|
|
32
|
+
const pillUid = useMemo(() => `ds-pill-${uid()}`, []);
|
|
33
33
|
const TextComponent = labelTruncated ? _ref2 => {
|
|
34
34
|
let {
|
|
35
35
|
children
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import React, { useRef, useMemo, useCallback, useState } from 'react';
|
|
4
3
|
import { uid } from 'uid';
|
|
5
4
|
import { CloseXsmall } from '@elliemae/ds-icons';
|
|
@@ -16,11 +15,13 @@ const InputPill = /*#__PURE__*/React.memo(_ref => {
|
|
|
16
15
|
inputRender,
|
|
17
16
|
onInputChange,
|
|
18
17
|
onInputClear,
|
|
19
|
-
innerRef
|
|
18
|
+
innerRef,
|
|
19
|
+
hasError,
|
|
20
|
+
inputId
|
|
20
21
|
} = _ref;
|
|
21
22
|
const ref = useRef(null);
|
|
22
23
|
const InputComponent = useMemo(() => inputRender, [inputRender]);
|
|
23
|
-
const pillUid = useMemo(() =>
|
|
24
|
+
const pillUid = useMemo(() => inputId ?? `ds-pill-${uid()}`, []);
|
|
24
25
|
const onCloseIconClick = useCallback(e => {
|
|
25
26
|
if ([undefined, 'Enter', 'Space'].includes(e.code)) {
|
|
26
27
|
e.preventDefault();
|
|
@@ -36,7 +37,8 @@ const InputPill = /*#__PURE__*/React.memo(_ref => {
|
|
|
36
37
|
cols: label === '' ? ['auto'] : ['auto', '24px'],
|
|
37
38
|
inputWidth: inputWidth,
|
|
38
39
|
value: label,
|
|
39
|
-
inputHasFocus: inputHasFocus
|
|
40
|
+
inputHasFocus: inputHasFocus,
|
|
41
|
+
hasError: hasError
|
|
40
42
|
}, void 0, /*#__PURE__*/_jsx(InputComponent, {
|
|
41
43
|
id: pillUid,
|
|
42
44
|
className: "ds-pill-focus-point",
|
|
@@ -23,7 +23,7 @@ const RemovablePill = /*#__PURE__*/React.memo(_ref => {
|
|
|
23
23
|
onKeyboardRemove,
|
|
24
24
|
onKeyboardNavigation
|
|
25
25
|
} = useContext(DSPillGroupV2Context);
|
|
26
|
-
const pillUid = useMemo(() =>
|
|
26
|
+
const pillUid = useMemo(() => `ds-pill-${uid()}`, []);
|
|
27
27
|
const TextComponent = labelTruncated ? _ref2 => {
|
|
28
28
|
let {
|
|
29
29
|
children
|
|
@@ -66,7 +66,7 @@ const RemovablePill = /*#__PURE__*/React.memo(_ref => {
|
|
|
66
66
|
innerRef: innerRef,
|
|
67
67
|
onClick: onRemove,
|
|
68
68
|
onKeyDown: onKeyDown,
|
|
69
|
-
"aria-label":
|
|
69
|
+
"aria-label": `Remove ${label}`,
|
|
70
70
|
type: "right",
|
|
71
71
|
tabIndex: tabIndex
|
|
72
72
|
}, void 0, /*#__PURE__*/_jsx(CloseXsmall, {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
1
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
4
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
10
9
|
import { useRef, useState } from 'react';
|
|
11
10
|
import { PropTypes, describe } from 'react-desc';
|
|
12
11
|
import DSDropdownMenu from '@elliemae/ds-dropdownmenu';
|
|
@@ -5,7 +5,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
6
6
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
7
7
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
10
9
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
11
10
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
5
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
6
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
@@ -136,7 +135,7 @@ function LabeledDropdownMultiPills(_ref) {
|
|
|
136
135
|
|
|
137
136
|
return null;
|
|
138
137
|
}), selectedOptions && selectedOptions.length > overflowQuantity && /*#__PURE__*/_jsx(OverflowPill, {
|
|
139
|
-
label:
|
|
138
|
+
label: `+ ${selectedOptions.length - overflowQuantity}`,
|
|
140
139
|
options: overflowOptions
|
|
141
140
|
})]
|
|
142
141
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
6
5
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
6
|
import 'core-js/modules/esnext.iterator.find.js';
|
|
@@ -132,7 +131,7 @@ function LabeledDropdownSinglePill(_ref) {
|
|
|
132
131
|
|
|
133
132
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
134
133
|
children: [/*#__PURE__*/jsx(DropdownPill, _objectSpread(_objectSpread({}, menuProps), {}, {
|
|
135
|
-
label: !labelIsValue ? label : optionValue
|
|
134
|
+
label: !labelIsValue ? label : optionValue?.label,
|
|
136
135
|
maxWidth: maxWidth,
|
|
137
136
|
minWidth: minWidth,
|
|
138
137
|
onSelectMenuItem: selectOption,
|
|
@@ -144,7 +143,7 @@ function LabeledDropdownSinglePill(_ref) {
|
|
|
144
143
|
closeOnClick: true
|
|
145
144
|
})],
|
|
146
145
|
selection: {
|
|
147
|
-
'multi-selection-views': optionValue ? [optionValue
|
|
146
|
+
'multi-selection-views': optionValue ? [optionValue?.id] : ''
|
|
148
147
|
},
|
|
149
148
|
variant: "title"
|
|
150
149
|
})), renderSelection()]
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
4
3
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
4
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
@@ -22,9 +21,9 @@ function OverflowPill(_ref) {
|
|
|
22
21
|
let text = '';
|
|
23
22
|
options.forEach(option => {
|
|
24
23
|
if (!tooltipText || option === options[0]) {
|
|
25
|
-
text =
|
|
24
|
+
text = `${option.label}`;
|
|
26
25
|
} else {
|
|
27
|
-
text = text.concat(
|
|
26
|
+
text = text.concat(`, ${option.label}`);
|
|
28
27
|
}
|
|
29
28
|
});
|
|
30
29
|
setTooltipText(text);
|
package/esm/props.js
CHANGED
|
@@ -18,8 +18,11 @@ const DSPillV2PropTypes = {
|
|
|
18
18
|
onInputChange: PropTypes.func.description('Callback triggered when user provides input to the input pill').defaultValue(() => null),
|
|
19
19
|
onInputClear: PropTypes.func.description('Callback triggered when the user clears an input pill').defaultValue(() => null),
|
|
20
20
|
inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),
|
|
21
|
+
inputId: PropTypes.string.description('ID for the input pill').defaultValue(undefined),
|
|
21
22
|
dropdownProps: PropTypes.object.description('Properties that will be used for the dropdown-menu').defaultValue({}),
|
|
22
|
-
onDropdownClick: PropTypes.func.description('Callback when dropdown button is clicked or pressed').defaultValue(() => null)
|
|
23
|
+
onDropdownClick: PropTypes.func.description('Callback when dropdown button is clicked or pressed').defaultValue(() => null),
|
|
24
|
+
disabled: PropTypes.bool.description('Whether the pill should be disabled. Only for value and removable pill').defaultValue(false),
|
|
25
|
+
hasError: PropTypes.bool.description('Whether the pill should be in an error state. Only for input pill').defaultValue(false)
|
|
23
26
|
};
|
|
24
27
|
const DSPillButtonPropTypes = {
|
|
25
28
|
type: PropTypes.oneOf(['only', 'left', 'right']).description('The position in which this button will be placed. Only used for css styling internally').defaultValue('right'),
|
|
@@ -33,6 +36,7 @@ const DSPillGroupPropTypes = {
|
|
|
33
36
|
const DSPillV2DefaultProps = {
|
|
34
37
|
innerRef: () => null,
|
|
35
38
|
disabled: false,
|
|
39
|
+
hasError: false,
|
|
36
40
|
ariaLabel: '',
|
|
37
41
|
size: 'm',
|
|
38
42
|
labelTruncated: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pills",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Pills",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -144,20 +144,20 @@
|
|
|
144
144
|
"build": "node ../../scripts/build/build.js"
|
|
145
145
|
},
|
|
146
146
|
"dependencies": {
|
|
147
|
-
"@elliemae/ds-button": "2.4.
|
|
148
|
-
"@elliemae/ds-classnames": "2.4.
|
|
149
|
-
"@elliemae/ds-dropdownmenu": "2.4.
|
|
150
|
-
"@elliemae/ds-form": "2.4.
|
|
151
|
-
"@elliemae/ds-grid": "2.4.
|
|
152
|
-
"@elliemae/ds-icons": "2.4.
|
|
153
|
-
"@elliemae/ds-modal": "2.4.
|
|
154
|
-
"@elliemae/ds-popover": "2.4.
|
|
155
|
-
"@elliemae/ds-props-helpers": "2.4.
|
|
156
|
-
"@elliemae/ds-shared": "2.4.
|
|
157
|
-
"@elliemae/ds-system": "2.4.
|
|
158
|
-
"@elliemae/ds-tooltip": "2.4.
|
|
159
|
-
"@elliemae/ds-truncated-tooltip-text": "2.4.
|
|
160
|
-
"@elliemae/ds-utilities": "2.4.
|
|
147
|
+
"@elliemae/ds-button": "2.4.3-rc.1",
|
|
148
|
+
"@elliemae/ds-classnames": "2.4.3-rc.1",
|
|
149
|
+
"@elliemae/ds-dropdownmenu": "2.4.3-rc.1",
|
|
150
|
+
"@elliemae/ds-form": "2.4.3-rc.1",
|
|
151
|
+
"@elliemae/ds-grid": "2.4.3-rc.1",
|
|
152
|
+
"@elliemae/ds-icons": "2.4.3-rc.1",
|
|
153
|
+
"@elliemae/ds-modal": "2.4.3-rc.1",
|
|
154
|
+
"@elliemae/ds-popover": "2.4.3-rc.1",
|
|
155
|
+
"@elliemae/ds-props-helpers": "2.4.3-rc.1",
|
|
156
|
+
"@elliemae/ds-shared": "2.4.3-rc.1",
|
|
157
|
+
"@elliemae/ds-system": "2.4.3-rc.1",
|
|
158
|
+
"@elliemae/ds-tooltip": "2.4.3-rc.1",
|
|
159
|
+
"@elliemae/ds-truncated-tooltip-text": "2.4.3-rc.1",
|
|
160
|
+
"@elliemae/ds-utilities": "2.4.3-rc.1",
|
|
161
161
|
"prop-types": "~15.7.2",
|
|
162
162
|
"react-desc": "~4.1.3",
|
|
163
163
|
"uid": "~2.0.0"
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
export declare const StyledValuePillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const StyledInputPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
2
|
+
interface InputPillWrapperProps {
|
|
5
3
|
value: string;
|
|
6
4
|
inputWidth: number;
|
|
7
5
|
inputHasFocus: boolean;
|
|
8
|
-
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const StyledLabelPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const StyledValuePillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const StyledInputPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, InputPillWrapperProps, never>;
|
|
9
11
|
export declare const StyledDropdownPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
10
12
|
export declare const StyledReadonlyPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
11
13
|
hasIconRight: boolean;
|
|
@@ -18,3 +20,4 @@ export declare const StyledPillButton: import("styled-components").StyledCompone
|
|
|
18
20
|
width: string;
|
|
19
21
|
height: string;
|
|
20
22
|
}, never>;
|
|
23
|
+
export {};
|
package/types/props.d.ts
CHANGED
|
@@ -38,12 +38,21 @@ export declare const DSPillV2PropTypes: {
|
|
|
38
38
|
inputWidth: {
|
|
39
39
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
40
|
};
|
|
41
|
+
inputId: {
|
|
42
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
43
|
+
};
|
|
41
44
|
dropdownProps: {
|
|
42
45
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
43
46
|
};
|
|
44
47
|
onDropdownClick: {
|
|
45
48
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
46
49
|
};
|
|
50
|
+
disabled: {
|
|
51
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
52
|
+
};
|
|
53
|
+
hasError: {
|
|
54
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
55
|
+
};
|
|
47
56
|
};
|
|
48
57
|
export declare const DSPillButtonPropTypes: {
|
|
49
58
|
type: {
|
|
@@ -67,6 +76,7 @@ export declare const DSPillGroupPropTypes: {
|
|
|
67
76
|
export declare const DSPillV2DefaultProps: {
|
|
68
77
|
innerRef: () => null;
|
|
69
78
|
disabled: boolean;
|
|
79
|
+
hasError: boolean;
|
|
70
80
|
ariaLabel: string;
|
|
71
81
|
size: string;
|
|
72
82
|
labelTruncated: boolean;
|