@elliemae/ds-pills 2.3.0-next.9 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
7
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
8
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
8
9
|
require('core-js/modules/esnext.iterator.map.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
9
15
|
var React = require('react');
|
|
10
|
-
var reactDesc = require('react-desc');
|
|
11
16
|
var uid = require('uid');
|
|
12
17
|
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
13
18
|
var props = require('../props.js');
|
|
@@ -17,8 +22,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
17
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
23
|
|
|
19
24
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
25
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
20
26
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
27
|
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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__default["default"](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; }
|
|
22
31
|
const DSPillGroupV2Context = /*#__PURE__*/React.createContext({
|
|
23
32
|
onKeyboardRemove: () => null,
|
|
24
33
|
onKeyboardNavigation: () => null
|
|
@@ -27,6 +36,7 @@ const DSPillGroupV2Context = /*#__PURE__*/React.createContext({
|
|
|
27
36
|
const DSPillGroupV2 = props$1 => {
|
|
28
37
|
const propsWithDefaults = dsPropsHelpers.useMemoMergePropsWithDefault(props$1, props.DSPillGroupDefaultProps);
|
|
29
38
|
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefaults, props.DSPillGroupPropTypes);
|
|
39
|
+
const globalAttrs = dsPropsHelpers.useGetGlobalAttributes(propsWithDefaults);
|
|
30
40
|
const pillGroupUid = React.useMemo(() => "ds-pill-group-".concat(uid.uid()), []);
|
|
31
41
|
const {
|
|
32
42
|
children,
|
|
@@ -59,17 +69,17 @@ const DSPillGroupV2 = props$1 => {
|
|
|
59
69
|
onKeyboardRemove,
|
|
60
70
|
onKeyboardNavigation
|
|
61
71
|
}
|
|
62
|
-
}, void 0, /*#__PURE__*/jsxRuntime.jsx(styled.StyledPillGroup, {
|
|
72
|
+
}, void 0, /*#__PURE__*/jsxRuntime.jsx(styled.StyledPillGroup, _objectSpread(_objectSpread({}, globalAttrs), {}, {
|
|
63
73
|
width: width,
|
|
64
74
|
id: pillGroupUid,
|
|
65
75
|
cols: React__default["default"].Children.map(children, () => 'auto'),
|
|
66
76
|
gutter: "2px",
|
|
67
77
|
ref: innerRef,
|
|
68
78
|
children: children
|
|
69
|
-
}));
|
|
79
|
+
})));
|
|
70
80
|
};
|
|
71
81
|
|
|
72
|
-
const DSPillGroupV2WithSchema =
|
|
82
|
+
const DSPillGroupV2WithSchema = dsPropsHelpers.describe(DSPillGroupV2);
|
|
73
83
|
DSPillGroupV2WithSchema.propTypes = props.DSPillGroupPropTypes;
|
|
74
84
|
|
|
75
85
|
exports.DSPillGroupV2 = DSPillGroupV2;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
4
5
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
5
11
|
import React, { createContext, useMemo, useCallback } from 'react';
|
|
6
|
-
import { describe } from 'react-desc';
|
|
7
12
|
import { uid } from 'uid';
|
|
8
|
-
import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
13
|
+
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
|
|
9
14
|
import { DSPillGroupPropTypes, DSPillGroupDefaultProps } from '../props.js';
|
|
10
15
|
import { StyledPillGroup } from './styled.js';
|
|
11
16
|
import { jsx } from 'react/jsx-runtime';
|
|
12
17
|
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
13
21
|
const DSPillGroupV2Context = /*#__PURE__*/createContext({
|
|
14
22
|
onKeyboardRemove: () => null,
|
|
15
23
|
onKeyboardNavigation: () => null
|
|
@@ -18,6 +26,7 @@ const DSPillGroupV2Context = /*#__PURE__*/createContext({
|
|
|
18
26
|
const DSPillGroupV2 = props => {
|
|
19
27
|
const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);
|
|
20
28
|
useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes);
|
|
29
|
+
const globalAttrs = useGetGlobalAttributes(propsWithDefaults);
|
|
21
30
|
const pillGroupUid = useMemo(() => "ds-pill-group-".concat(uid()), []);
|
|
22
31
|
const {
|
|
23
32
|
children,
|
|
@@ -50,14 +59,14 @@ const DSPillGroupV2 = props => {
|
|
|
50
59
|
onKeyboardRemove,
|
|
51
60
|
onKeyboardNavigation
|
|
52
61
|
}
|
|
53
|
-
}, void 0, /*#__PURE__*/jsx(StyledPillGroup, {
|
|
62
|
+
}, void 0, /*#__PURE__*/jsx(StyledPillGroup, _objectSpread(_objectSpread({}, globalAttrs), {}, {
|
|
54
63
|
width: width,
|
|
55
64
|
id: pillGroupUid,
|
|
56
65
|
cols: React.Children.map(children, () => 'auto'),
|
|
57
66
|
gutter: "2px",
|
|
58
67
|
ref: innerRef,
|
|
59
68
|
children: children
|
|
60
|
-
}));
|
|
69
|
+
})));
|
|
61
70
|
};
|
|
62
71
|
|
|
63
72
|
const DSPillGroupV2WithSchema = describe(DSPillGroupV2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pills",
|
|
3
|
-
"version": "2.3.0
|
|
3
|
+
"version": "2.3.0",
|
|
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.3.0
|
|
148
|
-
"@elliemae/ds-classnames": "2.3.0
|
|
149
|
-
"@elliemae/ds-dropdownmenu": "2.3.0
|
|
150
|
-
"@elliemae/ds-form": "2.3.0
|
|
151
|
-
"@elliemae/ds-grid": "2.3.0
|
|
152
|
-
"@elliemae/ds-icons": "2.3.0
|
|
153
|
-
"@elliemae/ds-modal": "2.3.0
|
|
154
|
-
"@elliemae/ds-popover": "2.3.0
|
|
155
|
-
"@elliemae/ds-props-helpers": "2.3.0
|
|
156
|
-
"@elliemae/ds-shared": "2.3.0
|
|
157
|
-
"@elliemae/ds-system": "2.3.0
|
|
158
|
-
"@elliemae/ds-tooltip": "2.3.0
|
|
159
|
-
"@elliemae/ds-truncated-tooltip-text": "2.3.0
|
|
160
|
-
"@elliemae/ds-utilities": "2.3.0
|
|
147
|
+
"@elliemae/ds-button": "2.3.0",
|
|
148
|
+
"@elliemae/ds-classnames": "2.3.0",
|
|
149
|
+
"@elliemae/ds-dropdownmenu": "2.3.0",
|
|
150
|
+
"@elliemae/ds-form": "2.3.0",
|
|
151
|
+
"@elliemae/ds-grid": "2.3.0",
|
|
152
|
+
"@elliemae/ds-icons": "2.3.0",
|
|
153
|
+
"@elliemae/ds-modal": "2.3.0",
|
|
154
|
+
"@elliemae/ds-popover": "2.3.0",
|
|
155
|
+
"@elliemae/ds-props-helpers": "2.3.0",
|
|
156
|
+
"@elliemae/ds-shared": "2.3.0",
|
|
157
|
+
"@elliemae/ds-system": "2.3.0",
|
|
158
|
+
"@elliemae/ds-tooltip": "2.3.0",
|
|
159
|
+
"@elliemae/ds-truncated-tooltip-text": "2.3.0",
|
|
160
|
+
"@elliemae/ds-utilities": "2.3.0",
|
|
161
161
|
"prop-types": "~15.7.2",
|
|
162
162
|
"react-desc": "~4.1.3",
|
|
163
163
|
"uid": "~2.0.0"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { DSPillGroupProps } from '../index.d';
|
|
4
3
|
export declare const DSPillGroupV2Context: React.Context<{
|
|
@@ -6,9 +5,5 @@ export declare const DSPillGroupV2Context: React.Context<{
|
|
|
6
5
|
onKeyboardNavigation: (pillUid: string, step: number, e: KeyboardEvent) => void;
|
|
7
6
|
}>;
|
|
8
7
|
declare const DSPillGroupV2: React.ComponentType<DSPillGroupProps>;
|
|
9
|
-
declare const DSPillGroupV2WithSchema:
|
|
10
|
-
(props?: unknown): JSX.Element;
|
|
11
|
-
propTypes: unknown;
|
|
12
|
-
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
13
|
-
};
|
|
8
|
+
declare const DSPillGroupV2WithSchema: import("@elliemae/ds-props-helpers/types/propTypes/types").DocumentedReactComponent<DSPillGroupProps>;
|
|
14
9
|
export { DSPillGroupV2, DSPillGroupV2WithSchema };
|