@elliemae/ds-pills 2.3.1 → 3.0.0-alpha.3
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/dist/cjs/components/Pill.js +72 -0
- package/dist/cjs/components/Pill.js.map +7 -0
- package/dist/cjs/components/PillButton.js +86 -0
- package/dist/cjs/components/PillButton.js.map +7 -0
- package/dist/cjs/components/PillGroup.js +100 -0
- package/dist/cjs/components/PillGroup.js.map +7 -0
- package/dist/cjs/components/index.js +30 -0
- package/dist/cjs/components/index.js.map +7 -0
- package/dist/cjs/components/styled.js +235 -0
- package/dist/cjs/components/styled.js.map +7 -0
- package/dist/cjs/components/types/DropdownPill.js +105 -0
- package/dist/cjs/components/types/DropdownPill.js.map +7 -0
- package/dist/cjs/components/types/InputPill.js +84 -0
- package/dist/cjs/components/types/InputPill.js.map +7 -0
- package/dist/cjs/components/types/LabelPill.js +52 -0
- package/dist/cjs/components/types/LabelPill.js.map +7 -0
- package/dist/cjs/components/types/ReadOnlyPill.js +55 -0
- package/dist/cjs/components/types/ReadOnlyPill.js.map +7 -0
- package/dist/cjs/components/types/RemovablePill.js +90 -0
- package/dist/cjs/components/types/RemovablePill.js.map +7 -0
- package/dist/cjs/components/types/ValuePill.js +59 -0
- package/dist/cjs/components/types/ValuePill.js.map +7 -0
- package/dist/cjs/components/types/index.js +33 -0
- package/dist/cjs/components/types/index.js.map +7 -0
- package/dist/cjs/deprecated/DropdownPill.js +128 -0
- package/dist/cjs/deprecated/DropdownPill.js.map +7 -0
- package/dist/cjs/deprecated/InputPill.js +114 -0
- package/dist/cjs/deprecated/InputPill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPills.js +140 -0
- package/dist/cjs/deprecated/LabeledDropdownPills.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +169 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +181 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +190 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js +44 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
- package/dist/cjs/deprecated/LabeledPills.js +75 -0
- package/dist/cjs/deprecated/LabeledPills.js.map +7 -0
- package/dist/cjs/deprecated/OverflowPill.js +79 -0
- package/dist/cjs/deprecated/OverflowPill.js.map +7 -0
- package/dist/cjs/deprecated/Pill.js +107 -0
- package/dist/cjs/deprecated/Pill.js.map +7 -0
- package/dist/cjs/deprecated/PillGroup.js +84 -0
- package/dist/cjs/deprecated/PillGroup.js.map +7 -0
- package/dist/cjs/deprecated/ReadOnlyPill.js +100 -0
- package/dist/cjs/deprecated/ReadOnlyPill.js.map +7 -0
- package/dist/cjs/deprecated/RemovablePill.js +78 -0
- package/dist/cjs/deprecated/RemovablePill.js.map +7 -0
- package/dist/cjs/deprecated/index.js +43 -0
- package/dist/cjs/deprecated/index.js.map +7 -0
- package/dist/cjs/index.d.js +27 -0
- package/dist/cjs/index.d.js.map +7 -0
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/props.js +96 -0
- package/dist/cjs/props.js.map +7 -0
- package/dist/cjs/utils.js +46 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/esm/components/Pill.js +45 -0
- package/dist/esm/components/Pill.js.map +7 -0
- package/dist/esm/components/PillButton.js +59 -0
- package/dist/esm/components/PillButton.js.map +7 -0
- package/dist/esm/components/PillGroup.js +78 -0
- package/dist/esm/components/PillGroup.js.map +7 -0
- package/dist/esm/components/index.js +5 -0
- package/dist/esm/components/index.js.map +7 -0
- package/dist/esm/components/styled.js +206 -0
- package/dist/esm/components/styled.js.map +7 -0
- package/dist/esm/components/types/DropdownPill.js +78 -0
- package/dist/esm/components/types/DropdownPill.js.map +7 -0
- package/dist/esm/components/types/InputPill.js +55 -0
- package/dist/esm/components/types/InputPill.js.map +7 -0
- package/dist/esm/components/types/LabelPill.js +23 -0
- package/dist/esm/components/types/LabelPill.js.map +7 -0
- package/dist/esm/components/types/ReadOnlyPill.js +26 -0
- package/dist/esm/components/types/ReadOnlyPill.js.map +7 -0
- package/dist/esm/components/types/RemovablePill.js +61 -0
- package/dist/esm/components/types/RemovablePill.js.map +7 -0
- package/dist/esm/components/types/ValuePill.js +30 -0
- package/dist/esm/components/types/ValuePill.js.map +7 -0
- package/dist/esm/components/types/index.js +8 -0
- package/dist/esm/components/types/index.js.map +7 -0
- package/dist/esm/deprecated/DropdownPill.js +101 -0
- package/dist/esm/deprecated/DropdownPill.js.map +7 -0
- package/dist/esm/deprecated/InputPill.js +87 -0
- package/dist/esm/deprecated/InputPill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPills.js +113 -0
- package/dist/esm/deprecated/LabeledDropdownPills.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +142 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +154 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +163 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js +15 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
- package/dist/esm/deprecated/LabeledPills.js +46 -0
- package/dist/esm/deprecated/LabeledPills.js.map +7 -0
- package/dist/esm/deprecated/OverflowPill.js +50 -0
- package/dist/esm/deprecated/OverflowPill.js.map +7 -0
- package/dist/esm/deprecated/Pill.js +80 -0
- package/dist/esm/deprecated/Pill.js.map +7 -0
- package/dist/esm/deprecated/PillGroup.js +57 -0
- package/dist/esm/deprecated/PillGroup.js.map +7 -0
- package/dist/esm/deprecated/ReadOnlyPill.js +71 -0
- package/dist/esm/deprecated/ReadOnlyPill.js.map +7 -0
- package/dist/esm/deprecated/RemovablePill.js +49 -0
- package/dist/esm/deprecated/RemovablePill.js.map +7 -0
- package/dist/esm/deprecated/index.js +14 -0
- package/dist/esm/deprecated/index.js.map +7 -0
- package/dist/esm/index.d.js +2 -0
- package/dist/esm/index.d.js.map +7 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/props.js +67 -0
- package/dist/esm/props.js.map +7 -0
- package/dist/esm/utils.js +17 -0
- package/dist/esm/utils.js.map +7 -0
- package/package.json +94 -85
- package/cjs/components/Pill.js +0 -53
- package/cjs/components/PillButton.js +0 -56
- package/cjs/components/PillGroup.js +0 -87
- package/cjs/components/index.js +0 -17
- package/cjs/components/styled.js +0 -85
- package/cjs/components/types/DropdownPill.js +0 -86
- package/cjs/components/types/InputPill.js +0 -74
- package/cjs/components/types/LabelPill.js +0 -46
- package/cjs/components/types/ReadOnlyPill.js +0 -50
- package/cjs/components/types/RemovablePill.js +0 -85
- package/cjs/components/types/ValuePill.js +0 -54
- package/cjs/components/types/index.js +0 -19
- package/cjs/deprecated/DropdownPill.js +0 -113
- package/cjs/deprecated/InputPill.js +0 -84
- package/cjs/deprecated/LabeledDropdownPills.js +0 -106
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +0 -134
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +0 -153
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +0 -162
- package/cjs/deprecated/LabeledDropdownPillsTypes/utils.js +0 -20
- package/cjs/deprecated/LabeledPills.js +0 -62
- package/cjs/deprecated/OverflowPill.js +0 -73
- package/cjs/deprecated/Pill.js +0 -88
- package/cjs/deprecated/PillGroup.js +0 -72
- package/cjs/deprecated/ReadOnlyPill.js +0 -101
- package/cjs/deprecated/RemovablePill.js +0 -74
- package/cjs/deprecated/index.js +0 -33
- package/cjs/index.d.js +0 -2
- package/cjs/index.js +0 -43
- package/cjs/props.js +0 -70
- package/cjs/utils.js +0 -28
- package/esm/components/Pill.js +0 -44
- package/esm/components/PillButton.js +0 -46
- package/esm/components/PillGroup.js +0 -75
- package/esm/components/index.js +0 -3
- package/esm/components/styled.js +0 -67
- package/esm/components/types/DropdownPill.js +0 -76
- package/esm/components/types/InputPill.js +0 -65
- package/esm/components/types/LabelPill.js +0 -37
- package/esm/components/types/ReadOnlyPill.js +0 -41
- package/esm/components/types/RemovablePill.js +0 -76
- package/esm/components/types/ValuePill.js +0 -45
- package/esm/components/types/index.js +0 -6
- package/esm/deprecated/DropdownPill.js +0 -100
- package/esm/deprecated/InputPill.js +0 -74
- package/esm/deprecated/LabeledDropdownPills.js +0 -95
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +0 -126
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +0 -145
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +0 -154
- package/esm/deprecated/LabeledDropdownPillsTypes/utils.js +0 -16
- package/esm/deprecated/LabeledPills.js +0 -53
- package/esm/deprecated/OverflowPill.js +0 -62
- package/esm/deprecated/Pill.js +0 -76
- package/esm/deprecated/PillGroup.js +0 -60
- package/esm/deprecated/ReadOnlyPill.js +0 -90
- package/esm/deprecated/RemovablePill.js +0 -64
- package/esm/deprecated/index.js +0 -8
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -11
- package/esm/props.js +0 -61
- package/esm/utils.js +0 -24
- package/types/components/Pill.d.ts +0 -5
- package/types/components/PillButton.d.ts +0 -5
- package/types/components/PillGroup.d.ts +0 -9
- package/types/components/index.d.ts +0 -3
- package/types/components/styled.d.ts +0 -20
- package/types/components/types/DropdownPill.d.ts +0 -3
- package/types/components/types/InputPill.d.ts +0 -3
- package/types/components/types/LabelPill.d.ts +0 -3
- package/types/components/types/ReadOnlyPill.d.ts +0 -3
- package/types/components/types/RemovablePill.d.ts +0 -3
- package/types/components/types/ValuePill.d.ts +0 -3
- package/types/components/types/index.d.ts +0 -6
- package/types/deprecated/DropdownPill.d.ts +0 -66
- package/types/deprecated/InputPill.d.ts +0 -10
- package/types/deprecated/LabeledDropdownPills.d.ts +0 -82
- package/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.d.ts +0 -15
- package/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.d.ts +0 -13
- package/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.d.ts +0 -28
- package/types/deprecated/LabeledDropdownPillsTypes/utils.d.ts +0 -1
- package/types/deprecated/LabeledPills.d.ts +0 -52
- package/types/deprecated/OverflowPill.d.ts +0 -33
- package/types/deprecated/Pill.d.ts +0 -59
- package/types/deprecated/PillGroup.d.ts +0 -50
- package/types/deprecated/ReadOnlyPill.d.ts +0 -56
- package/types/deprecated/RemovablePill.d.ts +0 -49
- package/types/deprecated/index.d.ts +0 -9
- package/types/index.d.ts +0 -3
- package/types/props.d.ts +0 -93
- package/types/tests/DSPill.test.d.ts +0 -1
- package/types/tests/DSPillGroup.test.d.ts +0 -1
- package/types/tests/events/DSPill.events.keyboard.test.d.ts +0 -1
- package/types/tests/events/DSPill.events.test.d.ts +0 -1
- package/types/tests/events/DSPillGroup.events.keyboard.test.d.ts +0 -1
- package/types/tests/events/DSPillGroup.events.test.d.ts +0 -1
- package/types/utils.d.ts +0 -4
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
4
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import { useRef, useState, useEffect } from 'react';
|
|
7
|
-
import { PropTypes, describe } from 'react-desc';
|
|
8
|
-
import useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';
|
|
9
|
-
import DSTooltip from '@elliemae/ds-tooltip';
|
|
10
|
-
import { Pill } from './Pill.js';
|
|
11
|
-
|
|
12
|
-
function OverflowPill(_ref) {
|
|
13
|
-
let {
|
|
14
|
-
containerProps = {},
|
|
15
|
-
label = '',
|
|
16
|
-
options = []
|
|
17
|
-
} = _ref;
|
|
18
|
-
const ref = useRef(null);
|
|
19
|
-
const [tooltipIsOpen, setTooltipIsOpen] = useState(false);
|
|
20
|
-
const [tooltipText, setTooltipText] = useState('');
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
let text = '';
|
|
23
|
-
options.forEach(option => {
|
|
24
|
-
if (!tooltipText || option === options[0]) {
|
|
25
|
-
text = "".concat(option.label);
|
|
26
|
-
} else {
|
|
27
|
-
text = text.concat(", ".concat(option.label));
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
setTooltipText(text);
|
|
31
|
-
}, [options]);
|
|
32
|
-
useFocusGroupItem(ref);
|
|
33
|
-
return /*#__PURE__*/_jsx(DSTooltip, {
|
|
34
|
-
isOpen: tooltipIsOpen,
|
|
35
|
-
title: tooltipText,
|
|
36
|
-
zIndex: 11,
|
|
37
|
-
triggerComponent: /*#__PURE__*/_jsx(Pill, {
|
|
38
|
-
className: "overflow-pill",
|
|
39
|
-
containerProps: containerProps,
|
|
40
|
-
innerRef: ref,
|
|
41
|
-
label: label,
|
|
42
|
-
tabIndex: -1,
|
|
43
|
-
onMouseEnter: () => setTooltipIsOpen(true),
|
|
44
|
-
onMouseLeave: () => setTooltipIsOpen(false)
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const props = {
|
|
50
|
-
/** props to inject to pill wrapper */
|
|
51
|
-
containerProps: PropTypes.object.description('props to inject to pill wrapper'),
|
|
52
|
-
|
|
53
|
-
/** pill text label */
|
|
54
|
-
label: PropTypes.string.isRequired.description('pill text label'),
|
|
55
|
-
|
|
56
|
-
/** overflow pills options */
|
|
57
|
-
options: PropTypes.array.description('overflow pills options')
|
|
58
|
-
};
|
|
59
|
-
const DSOverflowPillWithSchema = describe(OverflowPill);
|
|
60
|
-
DSOverflowPillWithSchema.propTypes = props;
|
|
61
|
-
|
|
62
|
-
export { DSOverflowPillWithSchema, OverflowPill };
|
package/esm/deprecated/Pill.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
-
import 'react';
|
|
10
|
-
import { PropTypes, describe } from 'react-desc';
|
|
11
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
12
|
-
import { jsxs } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
const _excluded = ["containerProps", "label", "leftAddon", "rightAddon", "variant", "size"];
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
-
const pillBlockName = 'pill';
|
|
20
|
-
const PillWrapper = aggregatedClasses('div')(pillBlockName, null, _ref => {
|
|
21
|
-
let {
|
|
22
|
-
size,
|
|
23
|
-
variant
|
|
24
|
-
} = _ref;
|
|
25
|
-
return {
|
|
26
|
-
[variant]: !!variant,
|
|
27
|
-
[size]: !!size
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
const PillLabel = aggregatedClasses('span')(pillBlockName, 'label');
|
|
31
|
-
const PillAddon = aggregatedClasses('div')(pillBlockName, 'addon');
|
|
32
|
-
|
|
33
|
-
function Pill(_ref2) {
|
|
34
|
-
let {
|
|
35
|
-
containerProps = {},
|
|
36
|
-
label = '',
|
|
37
|
-
leftAddon,
|
|
38
|
-
rightAddon,
|
|
39
|
-
variant = 'value',
|
|
40
|
-
size = 'm'
|
|
41
|
-
} = _ref2,
|
|
42
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded);
|
|
43
|
-
|
|
44
|
-
return /*#__PURE__*/jsxs(PillWrapper, _objectSpread(_objectSpread(_objectSpread({}, containerProps), {}, {
|
|
45
|
-
classProps: {
|
|
46
|
-
variant,
|
|
47
|
-
size
|
|
48
|
-
}
|
|
49
|
-
}, otherProps), {}, {
|
|
50
|
-
children: [leftAddon && /*#__PURE__*/_jsx(PillAddon, {}, void 0, leftAddon), /*#__PURE__*/_jsx(PillLabel, {}, void 0, label), rightAddon && /*#__PURE__*/_jsx(PillAddon, {}, void 0, rightAddon)]
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const props = {
|
|
55
|
-
/** props to inject to pill wrapper */
|
|
56
|
-
containerProps: PropTypes.object.description('props to inject to pill wrapper'),
|
|
57
|
-
|
|
58
|
-
/** pill text label */
|
|
59
|
-
label: PropTypes.string.isRequired.description('pill text label'),
|
|
60
|
-
|
|
61
|
-
/** pill size */
|
|
62
|
-
size: PropTypes.oneOf(['m', 'l']).description('pill size'),
|
|
63
|
-
|
|
64
|
-
/** pill variant */
|
|
65
|
-
variant: PropTypes.oneOf(['value', 'title']).description('pill variant'),
|
|
66
|
-
|
|
67
|
-
/** addon component to left */
|
|
68
|
-
leftAddon: PropTypes.node.description('addon component to left'),
|
|
69
|
-
|
|
70
|
-
/** addon component to right */
|
|
71
|
-
rightAddon: PropTypes.node.description('addon component to right')
|
|
72
|
-
};
|
|
73
|
-
const DSPillWithSchema = describe(Pill);
|
|
74
|
-
DSPillWithSchema.propTypes = props;
|
|
75
|
-
|
|
76
|
-
export { DSPillWithSchema, Pill, Pill as default };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
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 'react';
|
|
9
|
-
import { PropTypes, describe } from 'react-desc';
|
|
10
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
11
|
-
import FocusGroupProvider from '@elliemae/ds-shared/FocusGroup/FocusGroupManager';
|
|
12
|
-
import { jsx } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
const pillGroupBlockName = 'pill-group';
|
|
18
|
-
const Container = aggregatedClasses('div')(pillGroupBlockName);
|
|
19
|
-
|
|
20
|
-
const PillGroup = _ref => {
|
|
21
|
-
let {
|
|
22
|
-
containerProps = {},
|
|
23
|
-
onFocusNextGroup,
|
|
24
|
-
onFocusPreviousGroup,
|
|
25
|
-
onFocusGroupSet,
|
|
26
|
-
children
|
|
27
|
-
} = _ref;
|
|
28
|
-
return /*#__PURE__*/_jsx(FocusGroupProvider, {
|
|
29
|
-
keyBindings: {
|
|
30
|
-
Tab: 'next'
|
|
31
|
-
},
|
|
32
|
-
onFocusGroupSet: onFocusGroupSet,
|
|
33
|
-
onFocusNextGroup: onFocusNextGroup,
|
|
34
|
-
onFocusPreviousGroup: onFocusPreviousGroup,
|
|
35
|
-
orientation: "horizontal"
|
|
36
|
-
}, void 0, /*#__PURE__*/jsx(Container, _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
37
|
-
children: children
|
|
38
|
-
})));
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const props = {
|
|
42
|
-
/** props injected to component wrapper */
|
|
43
|
-
containerProps: PropTypes.object.description('props injected to component wrapper'),
|
|
44
|
-
|
|
45
|
-
/** focus next group callback */
|
|
46
|
-
onFocusNextGroup: PropTypes.func.description('focus next group callback'),
|
|
47
|
-
|
|
48
|
-
/** focus prev group callback */
|
|
49
|
-
onFocusPreviousGroup: PropTypes.func.description('focus prev group callback'),
|
|
50
|
-
|
|
51
|
-
/** focus group set callback */
|
|
52
|
-
onFocusGroupSet: PropTypes.func.description('focus group set callback'),
|
|
53
|
-
|
|
54
|
-
/** pill components */
|
|
55
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired.description('pill components')
|
|
56
|
-
};
|
|
57
|
-
const DSPillGroupWithSchema = describe(PillGroup);
|
|
58
|
-
DSPillGroupWithSchema.propTypes = props;
|
|
59
|
-
|
|
60
|
-
export { Container, DSPillGroupWithSchema, PillGroup };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
-
import { useRef, useState } from 'react';
|
|
4
|
-
import { PropTypes, describe } from 'react-desc';
|
|
5
|
-
import { InfoCircleSmall } from '@elliemae/ds-icons';
|
|
6
|
-
import DSModal, { MODAL_TYPE_V2 } from '@elliemae/ds-modal';
|
|
7
|
-
import Popover from '@elliemae/ds-popover';
|
|
8
|
-
import { Pill } from './Pill.js';
|
|
9
|
-
import { jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
const ReadOnlyPill = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
containerProps = {},
|
|
14
|
-
modalContent = '',
|
|
15
|
-
label = '',
|
|
16
|
-
leftAddon,
|
|
17
|
-
modalTitle = '',
|
|
18
|
-
tooltipText = ''
|
|
19
|
-
} = _ref;
|
|
20
|
-
const ref = useRef(null);
|
|
21
|
-
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
22
|
-
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
|
|
23
|
-
|
|
24
|
-
const toggle = () => {
|
|
25
|
-
setIsModalOpen(!isModalOpen);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
29
|
-
children: [/*#__PURE__*/_jsx(Pill, {
|
|
30
|
-
"data-testid": "read-only-pill",
|
|
31
|
-
className: "removable-pill",
|
|
32
|
-
containerProps: containerProps,
|
|
33
|
-
innerRef: ref,
|
|
34
|
-
label: label,
|
|
35
|
-
leftAddon: leftAddon,
|
|
36
|
-
rightAddon: /*#__PURE__*/_jsx(Popover, {
|
|
37
|
-
isOpen: tooltipText && isTooltipOpen,
|
|
38
|
-
content: tooltipText,
|
|
39
|
-
placement: "top",
|
|
40
|
-
showArrow: true,
|
|
41
|
-
renderTrigger: _ref2 => {
|
|
42
|
-
let {
|
|
43
|
-
ref
|
|
44
|
-
} = _ref2;
|
|
45
|
-
return /*#__PURE__*/_jsx(InfoCircleSmall, {
|
|
46
|
-
role: "button",
|
|
47
|
-
"data-testid": "read-only-info-btn",
|
|
48
|
-
className: "remove-pill-button",
|
|
49
|
-
onClick: toggle,
|
|
50
|
-
onMouseEnter: () => setIsTooltipOpen(true),
|
|
51
|
-
onMouseLeave: () => setIsTooltipOpen(false),
|
|
52
|
-
color: ['brand-primary', '600'],
|
|
53
|
-
innerRef: ref
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}),
|
|
57
|
-
tabIndex: -1
|
|
58
|
-
}), /*#__PURE__*/_jsx(DSModal, {
|
|
59
|
-
isOpen: isModalOpen,
|
|
60
|
-
showClose: true,
|
|
61
|
-
shouldCloseOnOverlayClick: true,
|
|
62
|
-
modalTitle: modalTitle,
|
|
63
|
-
modalType: MODAL_TYPE_V2.INFORMATION,
|
|
64
|
-
onClose: toggle,
|
|
65
|
-
version: 2
|
|
66
|
-
}, void 0, modalContent)]
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const props = {
|
|
71
|
-
/** props injected to component wrapper */
|
|
72
|
-
containerProps: PropTypes.object.description('props injected to component wrapper'),
|
|
73
|
-
|
|
74
|
-
/** labeled pill text label */
|
|
75
|
-
label: PropTypes.string.isRequired.description('pill text label'),
|
|
76
|
-
|
|
77
|
-
/** addon component to left */
|
|
78
|
-
leftAddon: PropTypes.node.description('addon component to left'),
|
|
79
|
-
|
|
80
|
-
/** read only pill modal content */
|
|
81
|
-
modalContent: PropTypes.string.description('read only pill modal content'),
|
|
82
|
-
|
|
83
|
-
/** read only pill modal title */
|
|
84
|
-
modalTitle: PropTypes.string.description('read only pill modal title'),
|
|
85
|
-
tooltipText: PropTypes.string.description('text to display in tooltip')
|
|
86
|
-
};
|
|
87
|
-
const DSReadOnlyPillWithSchema = describe(ReadOnlyPill);
|
|
88
|
-
DSReadOnlyPillWithSchema.propTypes = props;
|
|
89
|
-
|
|
90
|
-
export { DSReadOnlyPillWithSchema, ReadOnlyPill };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
import { PropTypes, describe } from 'react-desc';
|
|
4
|
-
import { isFunction } from '@elliemae/ds-utilities';
|
|
5
|
-
import { CloseXsmall } from '@elliemae/ds-icons';
|
|
6
|
-
import useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';
|
|
7
|
-
import { Pill } from './Pill.js';
|
|
8
|
-
|
|
9
|
-
function RemovablePill(_ref) {
|
|
10
|
-
let {
|
|
11
|
-
containerProps = {},
|
|
12
|
-
label = '',
|
|
13
|
-
onRemove,
|
|
14
|
-
size = 'm',
|
|
15
|
-
leftAddon
|
|
16
|
-
} = _ref;
|
|
17
|
-
const ref = useRef(null);
|
|
18
|
-
const {
|
|
19
|
-
focusPrevious
|
|
20
|
-
} = useFocusGroupItem(ref);
|
|
21
|
-
return /*#__PURE__*/_jsx(Pill, {
|
|
22
|
-
className: "removable-pill",
|
|
23
|
-
"data-testid": "removable-pill",
|
|
24
|
-
containerProps: containerProps,
|
|
25
|
-
innerRef: ref,
|
|
26
|
-
size: size,
|
|
27
|
-
label: label,
|
|
28
|
-
leftAddon: leftAddon,
|
|
29
|
-
onKeyDown: e => {
|
|
30
|
-
if (e.key === 'Backspace' && isFunction(onRemove)) {
|
|
31
|
-
onRemove();
|
|
32
|
-
if (isFunction(focusPrevious)) focusPrevious();
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
rightAddon: /*#__PURE__*/_jsx(CloseXsmall, {
|
|
36
|
-
role: "button",
|
|
37
|
-
"data-testid": "remove-pill-button",
|
|
38
|
-
className: "remove-pill-button",
|
|
39
|
-
onClick: onRemove
|
|
40
|
-
}),
|
|
41
|
-
tabIndex: -1
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const props = {
|
|
46
|
-
/** props injected to component wrapper */
|
|
47
|
-
containerProps: PropTypes.object.description('props injected to component wrapper'),
|
|
48
|
-
|
|
49
|
-
/** labeled pill text label */
|
|
50
|
-
label: PropTypes.string.isRequired.description('pill text label'),
|
|
51
|
-
|
|
52
|
-
/** remove click callback */
|
|
53
|
-
onRemove: PropTypes.func.description('remove click callback'),
|
|
54
|
-
|
|
55
|
-
/** pill size */
|
|
56
|
-
size: PropTypes.oneOf(['m', 'l']).description('pill size'),
|
|
57
|
-
|
|
58
|
-
/** addon component to left */
|
|
59
|
-
leftAddon: PropTypes.node.description('addon component to left')
|
|
60
|
-
};
|
|
61
|
-
const DSRemovablePillWithSchema = describe(RemovablePill);
|
|
62
|
-
DSRemovablePillWithSchema.propTypes = props;
|
|
63
|
-
|
|
64
|
-
export { DSRemovablePillWithSchema, RemovablePill };
|
package/esm/deprecated/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { DSPillWithSchema, Pill, Pill as default } from './Pill.js';
|
|
2
|
-
export { Container, DSPillGroupWithSchema, PillGroup } from './PillGroup.js';
|
|
3
|
-
export { DSLabeledDropdownPillsWithSchema, LabeledDropdownPills } from './LabeledDropdownPills.js';
|
|
4
|
-
export { DSLabeledPillsWithSchema, LabeledPills } from './LabeledPills.js';
|
|
5
|
-
export { DSDropdownPillWithSchema, DropdownPill } from './DropdownPill.js';
|
|
6
|
-
export { DSRemovablePillWithSchema, RemovablePill } from './RemovablePill.js';
|
|
7
|
-
export { DSReadOnlyPillWithSchema, ReadOnlyPill } from './ReadOnlyPill.js';
|
|
8
|
-
export { DSOverflowPillWithSchema, OverflowPill } from './OverflowPill.js';
|
package/esm/index.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/esm/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { DSPillWithSchema, Pill, Pill as default } from './deprecated/Pill.js';
|
|
2
|
-
export { Container, DSPillGroupWithSchema, PillGroup } from './deprecated/PillGroup.js';
|
|
3
|
-
export { DSLabeledDropdownPillsWithSchema, LabeledDropdownPills } from './deprecated/LabeledDropdownPills.js';
|
|
4
|
-
export { DSLabeledPillsWithSchema, LabeledPills } from './deprecated/LabeledPills.js';
|
|
5
|
-
export { DSDropdownPillWithSchema, DropdownPill } from './deprecated/DropdownPill.js';
|
|
6
|
-
export { DSRemovablePillWithSchema, RemovablePill } from './deprecated/RemovablePill.js';
|
|
7
|
-
export { DSReadOnlyPillWithSchema, ReadOnlyPill } from './deprecated/ReadOnlyPill.js';
|
|
8
|
-
export { DSOverflowPillWithSchema, OverflowPill } from './deprecated/OverflowPill.js';
|
|
9
|
-
export { DSPillV2, DSPillV2WithSchema } from './components/Pill.js';
|
|
10
|
-
export { DSPillGroupV2, DSPillGroupV2Context, DSPillGroupV2WithSchema } from './components/PillGroup.js';
|
|
11
|
-
export { DSPillButton, DSPillButtonWithSchema } from './components/PillButton.js';
|
package/esm/props.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { PropTypes } from 'react-desc';
|
|
2
|
-
import { DSInput } from '@elliemae/ds-form';
|
|
3
|
-
|
|
4
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
5
|
-
const pillTypes = PropTypes.oneOf(['label', 'value', 'input', 'dropdown', 'removable', 'readonly']);
|
|
6
|
-
const DSPillV2PropTypes = {
|
|
7
|
-
label: PropTypes.string.description('Label to show in the pill').isRequired,
|
|
8
|
-
type: pillTypes.description('The type of pill that you want to render').isRequired,
|
|
9
|
-
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)').defaultValue(() => null),
|
|
10
|
-
size: PropTypes.oneOf(['s', 'm']).description('Vertical pill size').defaultValue('m'),
|
|
11
|
-
ariaLabel: PropTypes.string.description('Aria label for the pill. If not provided we will use the label').defaultValue(''),
|
|
12
|
-
labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(true),
|
|
13
|
-
tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),
|
|
14
|
-
iconLeft: PropTypes.node.description('A component to show int the left of a readonly pill').defaultValue(null),
|
|
15
|
-
iconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),
|
|
16
|
-
onRemove: PropTypes.func.description('Callback triggered when removing a pill with the close icon').defaultValue(() => null),
|
|
17
|
-
inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),
|
|
18
|
-
onInputChange: PropTypes.func.description('Callback triggered when user provides input to the input pill').defaultValue(() => null),
|
|
19
|
-
onInputClear: PropTypes.func.description('Callback triggered when the user clears an input pill').defaultValue(() => null),
|
|
20
|
-
inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),
|
|
21
|
-
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
|
-
};
|
|
24
|
-
const DSPillButtonPropTypes = {
|
|
25
|
-
type: PropTypes.oneOf(['only', 'left', 'right']).description('The position in which this button will be placed. Only used for css styling internally').defaultValue('right'),
|
|
26
|
-
width: PropTypes.string.description('Width of the button').defaultValue('100%'),
|
|
27
|
-
height: PropTypes.string.description('Height of the button').defaultValue('100%')
|
|
28
|
-
};
|
|
29
|
-
const DSPillGroupPropTypes = {
|
|
30
|
-
width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),
|
|
31
|
-
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Reference to the pill group wrapper').defaultValue(() => null)
|
|
32
|
-
};
|
|
33
|
-
const DSPillV2DefaultProps = {
|
|
34
|
-
innerRef: () => null,
|
|
35
|
-
ariaLabel: '',
|
|
36
|
-
size: 'm',
|
|
37
|
-
labelTruncated: true,
|
|
38
|
-
tooltipValue: '',
|
|
39
|
-
iconLeft: null,
|
|
40
|
-
iconRight: null,
|
|
41
|
-
onRemove: () => null,
|
|
42
|
-
inputPlaceholder: '',
|
|
43
|
-
onInputChange: () => null,
|
|
44
|
-
onInputClear: () => null,
|
|
45
|
-
inputWidth: 72,
|
|
46
|
-
inputRender: DSInput,
|
|
47
|
-
dropdownProps: {},
|
|
48
|
-
onDropdownClick: () => null,
|
|
49
|
-
tabIndex: 0
|
|
50
|
-
};
|
|
51
|
-
const DSPillButtonDefaultProps = {
|
|
52
|
-
type: 'right',
|
|
53
|
-
width: '100%',
|
|
54
|
-
height: '100%'
|
|
55
|
-
};
|
|
56
|
-
const DSPillGroupDefaultProps = {
|
|
57
|
-
width: 'fit-content',
|
|
58
|
-
innerRef: () => null
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export { DSPillButtonDefaultProps, DSPillButtonPropTypes, DSPillGroupDefaultProps, DSPillGroupPropTypes, DSPillV2DefaultProps, DSPillV2PropTypes };
|
package/esm/utils.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
|
-
|
|
5
|
-
const setMultipleRefs = function () {
|
|
6
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7
|
-
refs[_key] = arguments[_key];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return _ref => {
|
|
11
|
-
refs.forEach(ref => {
|
|
12
|
-
if (!ref || !_ref) return;
|
|
13
|
-
|
|
14
|
-
if (typeof ref === 'function') {
|
|
15
|
-
ref(_ref);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (ref) ref.current = _ref;
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { setMultipleRefs };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DSPillGroupProps } from '../index.d';
|
|
3
|
-
export declare const DSPillGroupV2Context: React.Context<{
|
|
4
|
-
onKeyboardRemove: (pillUid: string) => void;
|
|
5
|
-
onKeyboardNavigation: (pillUid: string, step: number, e: KeyboardEvent) => void;
|
|
6
|
-
}>;
|
|
7
|
-
declare const DSPillGroupV2: React.ComponentType<DSPillGroupProps>;
|
|
8
|
-
declare const DSPillGroupV2WithSchema: import("@elliemae/ds-props-helpers/types/propTypes/types").DocumentedReactComponent<DSPillGroupProps>;
|
|
9
|
-
export { DSPillGroupV2, DSPillGroupV2WithSchema };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabelPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const StyledValuePillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & 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/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
5
|
-
value: string;
|
|
6
|
-
inputWidth: number;
|
|
7
|
-
inputHasFocus: boolean;
|
|
8
|
-
}, never>;
|
|
9
|
-
export declare const StyledDropdownPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
-
export declare const StyledReadonlyPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
11
|
-
hasIconRight: boolean;
|
|
12
|
-
hasIconLeft: boolean;
|
|
13
|
-
}, never>;
|
|
14
|
-
export declare const StyledRemovablePillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
-
export declare const StyledPillGroup: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
-
export declare const StyledSpanWithTooltip: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
-
export declare const StyledPillButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button/types/v2/propTypes").DSButtonT.Props>, import("styled-components").DefaultTheme, {
|
|
18
|
-
width: string;
|
|
19
|
-
height: string;
|
|
20
|
-
}, never>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
declare function DropdownPill({ containerProps, label, variant, tabIndex, closeMenuOnItemSelection, maxWidth, minWidth, ...dropdownProps }: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
containerProps?: {} | undefined;
|
|
6
|
-
label?: string | undefined;
|
|
7
|
-
variant: any;
|
|
8
|
-
tabIndex?: number | undefined;
|
|
9
|
-
closeMenuOnItemSelection?: boolean | undefined;
|
|
10
|
-
maxWidth: any;
|
|
11
|
-
minWidth: any;
|
|
12
|
-
}): JSX.Element;
|
|
13
|
-
declare namespace DropdownPill {
|
|
14
|
-
var propTypes: {
|
|
15
|
-
/** props injected to component wrapper */
|
|
16
|
-
containerProps: {
|
|
17
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
18
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
19
|
-
};
|
|
20
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
21
|
-
};
|
|
22
|
-
/** labeled pill text label */
|
|
23
|
-
label: any;
|
|
24
|
-
/** pill variant */
|
|
25
|
-
variant: {
|
|
26
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
-
};
|
|
29
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
|
-
};
|
|
31
|
-
/** html focus border */
|
|
32
|
-
tabIndex: {
|
|
33
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
34
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
-
};
|
|
36
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
37
|
-
};
|
|
38
|
-
/** close menu on item selection */
|
|
39
|
-
closeMenuOnItemSelection: {
|
|
40
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
41
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
42
|
-
};
|
|
43
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
44
|
-
};
|
|
45
|
-
/** pill max width */
|
|
46
|
-
maxWidth: {
|
|
47
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
48
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
49
|
-
};
|
|
50
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
51
|
-
};
|
|
52
|
-
/** pill min width */
|
|
53
|
-
minWidth: {
|
|
54
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
55
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
56
|
-
};
|
|
57
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
declare const DSDropdownPillWithSchema: {
|
|
62
|
-
(props?: unknown): JSX.Element;
|
|
63
|
-
propTypes: unknown;
|
|
64
|
-
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
65
|
-
};
|
|
66
|
-
export { DropdownPill, DSDropdownPillWithSchema };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare function InputPill({ containerProps, placeholder, onChange, onRemove, value, type, ...otherProps }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
containerProps?: {} | undefined;
|
|
5
|
-
placeholder?: string | undefined;
|
|
6
|
-
onChange?: (() => void) | undefined;
|
|
7
|
-
onRemove: any;
|
|
8
|
-
value: any;
|
|
9
|
-
type: any;
|
|
10
|
-
}): JSX.Element;
|