@elliemae/ds-pills 3.22.0-next.1 → 3.22.0-next.16

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.
Files changed (91) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +2 -2
  3. package/dist/esm/index.js +1 -1
  4. package/dist/esm/index.js.map +2 -2
  5. package/dist/types/index.d.ts +1 -1
  6. package/package.json +22 -18
  7. package/dist/cjs/DSPillDefinitions.js +0 -40
  8. package/dist/cjs/DSPillDefinitions.js.map +0 -7
  9. package/dist/cjs/components/Pill.js +0 -60
  10. package/dist/cjs/components/Pill.js.map +0 -7
  11. package/dist/cjs/components/PillButton.js +0 -67
  12. package/dist/cjs/components/PillButton.js.map +0 -7
  13. package/dist/cjs/components/PillGroup.js +0 -96
  14. package/dist/cjs/components/PillGroup.js.map +0 -7
  15. package/dist/cjs/components/index.js +0 -32
  16. package/dist/cjs/components/index.js.map +0 -7
  17. package/dist/cjs/components/styled.js +0 -242
  18. package/dist/cjs/components/styled.js.map +0 -7
  19. package/dist/cjs/components/types/DropdownPill.js +0 -101
  20. package/dist/cjs/components/types/DropdownPill.js.map +0 -7
  21. package/dist/cjs/components/types/InputPill.js +0 -113
  22. package/dist/cjs/components/types/InputPill.js.map +0 -7
  23. package/dist/cjs/components/types/LabelPill.js +0 -59
  24. package/dist/cjs/components/types/LabelPill.js.map +0 -7
  25. package/dist/cjs/components/types/ReadOnlyPill.js +0 -65
  26. package/dist/cjs/components/types/ReadOnlyPill.js.map +0 -7
  27. package/dist/cjs/components/types/RemovablePill.js +0 -108
  28. package/dist/cjs/components/types/RemovablePill.js.map +0 -7
  29. package/dist/cjs/components/types/ValuePill.js +0 -63
  30. package/dist/cjs/components/types/ValuePill.js.map +0 -7
  31. package/dist/cjs/components/types/index.js +0 -35
  32. package/dist/cjs/components/types/index.js.map +0 -7
  33. package/dist/cjs/index.d.js +0 -28
  34. package/dist/cjs/index.d.js.map +0 -7
  35. package/dist/cjs/props.js +0 -102
  36. package/dist/cjs/props.js.map +0 -7
  37. package/dist/cjs/utils.js +0 -47
  38. package/dist/cjs/utils.js.map +0 -7
  39. package/dist/esm/DSPillDefinitions.js +0 -10
  40. package/dist/esm/DSPillDefinitions.js.map +0 -7
  41. package/dist/esm/components/Pill.js +0 -30
  42. package/dist/esm/components/Pill.js.map +0 -7
  43. package/dist/esm/components/PillButton.js +0 -42
  44. package/dist/esm/components/PillButton.js.map +0 -7
  45. package/dist/esm/components/PillGroup.js +0 -71
  46. package/dist/esm/components/PillGroup.js.map +0 -7
  47. package/dist/esm/components/index.js +0 -5
  48. package/dist/esm/components/index.js.map +0 -7
  49. package/dist/esm/components/styled.js +0 -212
  50. package/dist/esm/components/styled.js.map +0 -7
  51. package/dist/esm/components/types/DropdownPill.js +0 -71
  52. package/dist/esm/components/types/DropdownPill.js.map +0 -7
  53. package/dist/esm/components/types/InputPill.js +0 -83
  54. package/dist/esm/components/types/InputPill.js.map +0 -7
  55. package/dist/esm/components/types/LabelPill.js +0 -29
  56. package/dist/esm/components/types/LabelPill.js.map +0 -7
  57. package/dist/esm/components/types/ReadOnlyPill.js +0 -35
  58. package/dist/esm/components/types/ReadOnlyPill.js.map +0 -7
  59. package/dist/esm/components/types/RemovablePill.js +0 -78
  60. package/dist/esm/components/types/RemovablePill.js.map +0 -7
  61. package/dist/esm/components/types/ValuePill.js +0 -33
  62. package/dist/esm/components/types/ValuePill.js.map +0 -7
  63. package/dist/esm/components/types/index.js +0 -8
  64. package/dist/esm/components/types/index.js.map +0 -7
  65. package/dist/esm/index.d.js +0 -2
  66. package/dist/esm/index.d.js.map +0 -7
  67. package/dist/esm/props.js +0 -72
  68. package/dist/esm/props.js.map +0 -7
  69. package/dist/esm/utils.js +0 -17
  70. package/dist/esm/utils.js.map +0 -7
  71. package/dist/types/DSPillDefinitions.d.ts +0 -3
  72. package/dist/types/components/Pill.d.ts +0 -5
  73. package/dist/types/components/PillButton.d.ts +0 -5
  74. package/dist/types/components/PillGroup.d.ts +0 -9
  75. package/dist/types/components/index.d.ts +0 -3
  76. package/dist/types/components/styled.d.ts +0 -31
  77. package/dist/types/components/types/DropdownPill.d.ts +0 -3
  78. package/dist/types/components/types/InputPill.d.ts +0 -3
  79. package/dist/types/components/types/LabelPill.d.ts +0 -3
  80. package/dist/types/components/types/ReadOnlyPill.d.ts +0 -3
  81. package/dist/types/components/types/RemovablePill.d.ts +0 -3
  82. package/dist/types/components/types/ValuePill.d.ts +0 -3
  83. package/dist/types/components/types/index.d.ts +0 -6
  84. package/dist/types/props.d.ts +0 -59
  85. package/dist/types/tests/DSPill.test.d.ts +0 -1
  86. package/dist/types/tests/DSPillGroup.test.d.ts +0 -1
  87. package/dist/types/tests/events/DSPill.events.keyboard.test.d.ts +0 -1
  88. package/dist/types/tests/events/DSPill.events.test.d.ts +0 -1
  89. package/dist/types/tests/events/DSPillGroup.events.keyboard.test.d.ts +0 -1
  90. package/dist/types/tests/events/DSPillGroup.events.test.d.ts +0 -1
  91. package/dist/types/utils.d.ts +0 -4
package/dist/cjs/index.js CHANGED
@@ -34,6 +34,6 @@ __export(src_exports, {
34
34
  module.exports = __toCommonJS(src_exports);
35
35
  var React = __toESM(require("react"));
36
36
  __reExport(src_exports, require("./deprecated/index.js"), module.exports);
37
- __reExport(src_exports, require("./components/index.js"), module.exports);
38
37
  var import_deprecated = __toESM(require("./deprecated/index.js"));
38
+ __reExport(src_exports, require("@elliemae/ds-pills-v2"), module.exports);
39
39
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './deprecated/index.js';\nexport * from './components/index.js';\nexport { default } from './deprecated/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,kCAAd;AACA,wBAAc,kCADd;AAEA,wBAAwB;",
4
+ "sourcesContent": ["export * from './deprecated/index.js';\nexport { default } from './deprecated/index.js';\nexport * from '@elliemae/ds-pills-v2';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,kCAAd;AACA,wBAAwB;AACxB,wBAAc,kCAFd;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  export * from "./deprecated/index.js";
3
- export * from "./components/index.js";
4
3
  import { default as default2 } from "./deprecated/index.js";
4
+ export * from "@elliemae/ds-pills-v2";
5
5
  export {
6
6
  default2 as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './deprecated/index.js';\nexport * from './components/index.js';\nexport { default } from './deprecated/index.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,SAAS,WAAAA,gBAAe;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './deprecated/index.js';\nexport { default } from './deprecated/index.js';\nexport * from '@elliemae/ds-pills-v2';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;AACxB,cAAc;",
6
6
  "names": ["default"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  export * from './deprecated/index.js';
2
- export * from './components/index.js';
3
2
  export { default } from './deprecated/index.js';
3
+ export * from '@elliemae/ds-pills-v2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-pills",
3
- "version": "3.22.0-next.1",
3
+ "version": "3.22.0-next.16",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Pills",
6
6
  "files": [
@@ -149,26 +149,29 @@
149
149
  "dependencies": {
150
150
  "prop-types": "~15.8.1",
151
151
  "uid": "~2.0.1",
152
- "@elliemae/ds-button-v2": "3.22.0-next.1",
153
- "@elliemae/ds-classnames": "3.22.0-next.1",
154
- "@elliemae/ds-button": "3.22.0-next.1",
155
- "@elliemae/ds-dropdownmenu": "3.22.0-next.1",
156
- "@elliemae/ds-form": "3.22.0-next.1",
157
- "@elliemae/ds-grid": "3.22.0-next.1",
158
- "@elliemae/ds-icons": "3.22.0-next.1",
159
- "@elliemae/ds-modal": "3.22.0-next.1",
160
- "@elliemae/ds-popover": "3.22.0-next.1",
161
- "@elliemae/ds-props-helpers": "3.22.0-next.1",
162
- "@elliemae/ds-shared": "3.22.0-next.1",
163
- "@elliemae/ds-system": "3.22.0-next.1",
164
- "@elliemae/ds-truncated-tooltip-text": "3.22.0-next.1",
165
- "@elliemae/ds-tooltip": "3.22.0-next.1",
166
- "@elliemae/ds-utilities": "3.22.0-next.1"
152
+ "@elliemae/ds-button-v2": "3.22.0-next.16",
153
+ "@elliemae/ds-classnames": "3.22.0-next.16",
154
+ "@elliemae/ds-dropdownmenu": "3.22.0-next.16",
155
+ "@elliemae/ds-form": "3.22.0-next.16",
156
+ "@elliemae/ds-grid": "3.22.0-next.16",
157
+ "@elliemae/ds-icons": "3.22.0-next.16",
158
+ "@elliemae/ds-modal": "3.22.0-next.16",
159
+ "@elliemae/ds-pills-v2": "3.22.0-next.16",
160
+ "@elliemae/ds-popover": "3.22.0-next.16",
161
+ "@elliemae/ds-props-helpers": "3.22.0-next.16",
162
+ "@elliemae/ds-shared": "3.22.0-next.16",
163
+ "@elliemae/ds-system": "3.22.0-next.16",
164
+ "@elliemae/ds-tooltip": "3.22.0-next.16",
165
+ "@elliemae/ds-truncated-tooltip-text": "3.22.0-next.16",
166
+ "@elliemae/ds-utilities": "3.22.0-next.16",
167
+ "@elliemae/ds-button": "3.22.0-next.16"
167
168
  },
168
169
  "devDependencies": {
170
+ "@elliemae/pui-cli": "~9.0.0-next.22",
169
171
  "@testing-library/react": "~12.1.3",
170
172
  "@testing-library/user-event": "~13.5.0",
171
- "styled-components": "~5.3.9"
173
+ "styled-components": "~5.3.9",
174
+ "@elliemae/ds-monorepo-devops": "3.22.0-next.16"
172
175
  },
173
176
  "peerDependencies": {
174
177
  "lodash": "^4.17.21",
@@ -182,11 +185,12 @@
182
185
  },
183
186
  "scripts": {
184
187
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
185
- "test": "node ../../scripts/testing/test.mjs",
188
+ "test": "pui-cli test --passWithNoTests",
186
189
  "lint": "node ../../scripts/lint.mjs",
187
190
  "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
188
191
  "dts": "node ../../scripts/dts.mjs",
189
192
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
193
+ "versionx": "node ../../scripts/setup/switch-to-workspace-version.js",
190
194
  "dev:build": "pnpm --filter {.}... build",
191
195
  "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
192
196
  "checkDeps": "npm exec ../ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DSPillDefinitions_exports = {};
30
- __export(DSPillDefinitions_exports, {
31
- DSPillButtonName: () => DSPillButtonName,
32
- DSPillGroupName: () => DSPillGroupName,
33
- DSPillName: () => DSPillName
34
- });
35
- module.exports = __toCommonJS(DSPillDefinitions_exports);
36
- var React = __toESM(require("react"));
37
- const DSPillName = "DSPill";
38
- const DSPillButtonName = "DSPillButton";
39
- const DSPillGroupName = "DSPillGroup";
40
- //# sourceMappingURL=DSPillDefinitions.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSPillDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSPillName = 'DSPill';\n\nexport const DSPillButtonName = 'DSPillButton';\n\nexport const DSPillGroupName = 'DSPillGroup';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAEnB,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;",
6
- "names": []
7
- }
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var Pill_exports = {};
30
- __export(Pill_exports, {
31
- DSPillV2: () => DSPillV2,
32
- DSPillV2WithSchema: () => DSPillV2WithSchema
33
- });
34
- module.exports = __toCommonJS(Pill_exports);
35
- var React = __toESM(require("react"));
36
- var import_jsx_runtime = require("react/jsx-runtime");
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
- var import_props = require("../props.js");
39
- var import_types = require("./types/index.js");
40
- var import_DSPillDefinitions = require("../DSPillDefinitions.js");
41
- const pillComponentGetter = {
42
- dropdown: import_types.DropdownPill,
43
- input: import_types.InputPill,
44
- label: import_types.LabelPill,
45
- readonly: import_types.ReadOnlyPill,
46
- removable: import_types.RemovablePill,
47
- value: import_types.ValuePill
48
- };
49
- const DSPillV2 = (props) => {
50
- const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_props.DSPillV2DefaultProps);
51
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillV2PropTypes, import_DSPillDefinitions.DSPillName);
52
- const { type } = propsWithDefaults;
53
- const PillComponent = pillComponentGetter[type];
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PillComponent, { ...propsWithDefaults });
55
- };
56
- DSPillV2.propTypes = import_props.DSPillV2PropTypes;
57
- DSPillV2.displayName = import_DSPillDefinitions.DSPillName;
58
- const DSPillV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillV2).description("Pill");
59
- DSPillV2WithSchema.propTypes = import_props.DSPillV2PropTypes;
60
- //# sourceMappingURL=Pill.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/Pill.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSPillProps } from '../index.d';\nimport { DSPillV2DefaultProps, DSPillV2PropTypes } from '../props.js';\nimport { DropdownPill, LabelPill, ValuePill, InputPill, ReadOnlyPill, RemovablePill } from './types/index.js';\nimport { DSPillName } from '../DSPillDefinitions.js';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillProps>> = {\n dropdown: DropdownPill,\n input: InputPill,\n label: LabelPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillV2DefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypes, DSPillName);\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.propTypes = DSPillV2PropTypes;\nDSPillV2.displayName = DSPillName;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypes;\n\nexport { DSPillV2, DSPillV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBd;AArBT,8BAAuF;AAEvF,mBAAwD;AACxD,mBAA2F;AAC3F,+BAA2B;AAE3B,MAAM,sBAAwE;AAAA,EAC5E,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAA6C,CAAC,UAAU;AAC5D,QAAM,wBAAoB,sDAA6B,OAAO,iCAAoB;AAClF,8DAA+B,mBAAmB,gCAAmB,mCAAU;AAC/E,QAAM,EAAE,KAAK,IAAI;AACjB,QAAM,gBAAgB,oBAAoB,IAAI;AAE9C,SAAO,4CAAC,iBAAe,GAAG,mBAAmB;AAC/C;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
6
- "names": []
7
- }
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var PillButton_exports = {};
30
- __export(PillButton_exports, {
31
- DSPillButton: () => DSPillButton,
32
- DSPillButtonWithSchema: () => DSPillButtonWithSchema
33
- });
34
- module.exports = __toCommonJS(PillButton_exports);
35
- var React = __toESM(require("react"));
36
- var import_jsx_runtime = require("react/jsx-runtime");
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
- var import_styled = require("./styled.js");
39
- var import_props = require("../props.js");
40
- var import_DSPillDefinitions = require("../DSPillDefinitions.js");
41
- const typeToClassName = {
42
- only: "ds-pill-button-only",
43
- left: "ds-pill-button-left",
44
- right: "ds-pill-button-right"
45
- };
46
- const DSPillButton = (props) => {
47
- const { children, ...restProps } = props;
48
- const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(restProps, import_props.DSPillButtonDefaultProps);
49
- const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefaults);
50
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillButtonPropTypes, import_DSPillDefinitions.DSPillButtonName);
51
- const { type, ...rest } = propsWithDefaults;
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
- import_styled.StyledPillButton,
54
- {
55
- ...rest,
56
- buttonType: "raw",
57
- className: `${typeToClassName[type]} ${rest.className ?? ""}`,
58
- ...globalAttributes,
59
- children
60
- }
61
- );
62
- };
63
- DSPillButton.propTypes = import_props.DSPillButtonPropTypes;
64
- DSPillButton.displayName = import_DSPillDefinitions.DSPillButtonName;
65
- const DSPillButtonWithSchema = (0, import_ds_props_helpers.describe)(DSPillButton).description("Pill button");
66
- DSPillButtonWithSchema.propTypes = import_props.DSPillButtonPropTypes;
67
- //# sourceMappingURL=PillButton.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/PillButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport type { DSButtonPropsT } from '@elliemae/ds-button';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport { StyledPillButton } from './styled.js';\nimport { DSPillButtonDefaultProps, DSPillButtonPropTypes } from '../props.js';\nimport { DSPillButtonName } from '../DSPillDefinitions.js';\n\nconst typeToClassName = {\n only: 'ds-pill-button-only',\n left: 'ds-pill-button-left',\n right: 'ds-pill-button-right',\n};\n\nconst DSPillButton: React.ComponentType<DSButtonPropsT> = (props) => {\n const { children, ...restProps } = props;\n const propsWithDefaults = useMemoMergePropsWithDefault(restProps, DSPillButtonDefaultProps);\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonPropTypes, DSPillButtonName);\n\n const { type, ...rest } = propsWithDefaults;\n\n return (\n <StyledPillButton\n {...rest}\n buttonType=\"raw\"\n className={`${typeToClassName[type]} ${rest.className ?? ''}`}\n {...globalAttributes}\n >\n {children}\n </StyledPillButton>\n );\n};\n\nDSPillButton.propTypes = DSPillButtonPropTypes;\nDSPillButton.displayName = DSPillButtonName;\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BnB;AAzBJ,8BAKO;AACP,oBAAiC;AACjC,mBAAgE;AAChE,+BAAiC;AAEjC,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAoD,CAAC,UAAU;AACnE,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,QAAM,wBAAoB,sDAA6B,WAAW,qCAAwB;AAC1F,QAAM,uBAAmB,gDAAuB,iBAAiB;AACjE,8DAA+B,mBAAmB,oCAAuB,yCAAgB;AAEzF,QAAM,EAAE,MAAM,GAAG,KAAK,IAAI;AAE1B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,YAAW;AAAA,MACX,WAAW,GAAG,gBAAgB,IAAI,KAAK,KAAK,aAAa;AAAA,MACxD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY,EAAE,YAAY,aAAa;AAC/E,uBAAuB,YAAY;",
6
- "names": []
7
- }
@@ -1,96 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var PillGroup_exports = {};
30
- __export(PillGroup_exports, {
31
- DSPillGroupV2: () => DSPillGroupV2,
32
- DSPillGroupV2Context: () => DSPillGroupV2Context,
33
- DSPillGroupV2WithSchema: () => DSPillGroupV2WithSchema
34
- });
35
- module.exports = __toCommonJS(PillGroup_exports);
36
- var React = __toESM(require("react"));
37
- var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_react = __toESM(require("react"));
39
- var import_uid = require("uid");
40
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
41
- var import_props = require("../props.js");
42
- var import_styled = require("./styled.js");
43
- var import_DSPillDefinitions = require("../DSPillDefinitions.js");
44
- const DSPillGroupV2Context = (0, import_react.createContext)({
45
- onKeyboardRemove: () => null,
46
- onKeyboardNavigation: () => null
47
- });
48
- const DSPillGroupV2 = (props) => {
49
- const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_props.DSPillGroupDefaultProps);
50
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillGroupPropTypes, import_DSPillDefinitions.DSPillGroupName);
51
- const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefaults);
52
- const pillGroupUid = (0, import_react.useMemo)(() => `ds-pill-group-${(0, import_uid.uid)()}`, []);
53
- const { children, width, innerRef } = propsWithDefaults;
54
- const onKeyboardRemove = (0, import_react.useCallback)(
55
- (pillUid) => {
56
- const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
57
- const pillIndex = elems.findIndex((elem) => elem.id === pillUid);
58
- if (pillIndex > 0) {
59
- elems[pillIndex - 1].focus();
60
- } else if (pillIndex + 1 < elems.length) {
61
- elems[pillIndex + 1].focus();
62
- }
63
- },
64
- [pillGroupUid]
65
- );
66
- const onKeyboardNavigation = (0, import_react.useCallback)(
67
- (pillUid, step, e) => {
68
- const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
69
- const pillIndex = elems.findIndex((elem) => elem.id === pillUid);
70
- if (pillIndex >= 0) {
71
- if (elems[pillIndex + step]) {
72
- e.stopPropagation();
73
- elems[pillIndex + step].focus();
74
- }
75
- }
76
- },
77
- [pillGroupUid]
78
- );
79
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DSPillGroupV2Context.Provider, { value: { onKeyboardRemove, onKeyboardNavigation }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
- import_styled.StyledPillGroup,
81
- {
82
- ...globalAttrs,
83
- width,
84
- id: pillGroupUid,
85
- cols: import_react.default.Children.map(children, () => "auto"),
86
- gutter: "2px",
87
- ref: innerRef,
88
- children
89
- }
90
- ) });
91
- };
92
- DSPillGroupV2.propTypes = import_props.DSPillGroupPropTypes;
93
- DSPillGroupV2.displayName = import_DSPillDefinitions.DSPillGroupName;
94
- const DSPillGroupV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillGroupV2);
95
- DSPillGroupV2WithSchema.propTypes = import_props.DSPillGroupPropTypes;
96
- //# sourceMappingURL=PillGroup.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/PillGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable indent */\n/* eslint-disable react/prop-types */\nimport type { WeakValidationMap } from 'react';\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport type { DSPillGroupProps } from '../index.d';\nimport { DSPillGroupDefaultProps, DSPillGroupPropTypes } from '../props.js';\nimport { StyledPillGroup } from './styled.js';\nimport { DSPillGroupName } from '../DSPillDefinitions.js';\n\nexport const DSPillGroupV2Context = createContext<{\n onKeyboardRemove: (pillUid: string) => void;\n onKeyboardNavigation: (pillUid: string, step: number, e: KeyboardEvent) => void;\n}>({\n onKeyboardRemove: () => null,\n onKeyboardNavigation: () => null,\n});\n\nconst DSPillGroupV2: React.ComponentType<DSPillGroupProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes, DSPillGroupName);\n\n const globalAttrs = useGetGlobalAttributes(propsWithDefaults);\n const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);\n const { children, width, innerRef } = propsWithDefaults;\n const onKeyboardRemove = useCallback(\n (pillUid: string) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex > 0) {\n elems[pillIndex - 1].focus();\n } else if (pillIndex + 1 < elems.length) {\n elems[pillIndex + 1].focus();\n }\n },\n [pillGroupUid],\n );\n const onKeyboardNavigation = useCallback(\n (pillUid: string, step: number, e: KeyboardEvent) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex >= 0) {\n if (elems[pillIndex + step]) {\n e.stopPropagation();\n elems[pillIndex + step].focus();\n }\n }\n },\n [pillGroupUid],\n );\n\n return (\n <DSPillGroupV2Context.Provider value={{ onKeyboardRemove, onKeyboardNavigation }}>\n <StyledPillGroup\n {...globalAttrs}\n width={width}\n id={pillGroupUid}\n cols={React.Children.map(children, () => 'auto')}\n gutter=\"2px\"\n ref={innerRef}\n >\n {children}\n </StyledPillGroup>\n </DSPillGroupV2Context.Provider>\n );\n};\n\nDSPillGroupV2.propTypes = DSPillGroupPropTypes as WeakValidationMap<unknown>;\nDSPillGroupV2.displayName = DSPillGroupName;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes as WeakValidationMap<unknown>;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DjB;AA5DN,mBAA2D;AAC3D,iBAAoB;AACpB,8BAKO;AAEP,mBAA8D;AAC9D,oBAAgC;AAChC,+BAAgC;AAEzB,MAAM,2BAAuB,4BAGjC;AAAA,EACD,kBAAkB,MAAM;AAAA,EACxB,sBAAsB,MAAM;AAC9B,CAAC;AAED,MAAM,gBAAuD,CAAC,UAAU;AACtE,QAAM,wBAAoB,sDAA6B,OAAO,oCAAuB;AACrF,8DAA+B,mBAAmB,mCAAsB,wCAAe;AAEvF,QAAM,kBAAc,gDAAuB,iBAAiB;AAC5D,QAAM,mBAAe,sBAAQ,MAAM,qBAAiB,gBAAI,KAAK,CAAC,CAAC;AAC/D,QAAM,EAAE,UAAU,OAAO,SAAS,IAAI;AACtC,QAAM,uBAAmB;AAAA,IACvB,CAAC,YAAoB;AACnB,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,YAAY,GAAG;AACjB,cAAM,YAAY,CAAC,EAAE,MAAM;AAAA,MAC7B,WAAW,YAAY,IAAI,MAAM,QAAQ;AACvC,cAAM,YAAY,CAAC,EAAE,MAAM;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AACA,QAAM,2BAAuB;AAAA,IAC3B,CAAC,SAAiB,MAAc,MAAqB;AACnD,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,aAAa,GAAG;AAClB,YAAI,MAAM,YAAY,IAAI,GAAG;AAC3B,YAAE,gBAAgB;AAClB,gBAAM,YAAY,IAAI,EAAE,MAAM;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AAEA,SACE,4CAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,kBAAkB,qBAAqB,GAC7E;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,IAAI;AAAA,MACJ,MAAM,aAAAA,QAAM,SAAS,IAAI,UAAU,MAAM,MAAM;AAAA,MAC/C,QAAO;AAAA,MACP,KAAK;AAAA,MAEJ;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
- "names": ["React"]
7
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
- // If the importer is in node compatibility mode or this is not an ESM
19
- // file that has been converted to a CommonJS file using a Babel-
20
- // compatible transform (i.e. "__esModule" has not been set), then set
21
- // "default" to the CommonJS "module.exports" for node compatibility.
22
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
- mod
24
- ));
25
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
- var components_exports = {};
27
- module.exports = __toCommonJS(components_exports);
28
- var React = __toESM(require("react"));
29
- __reExport(components_exports, require("./Pill.js"), module.exports);
30
- __reExport(components_exports, require("./PillGroup.js"), module.exports);
31
- __reExport(components_exports, require("./PillButton.js"), module.exports);
32
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './Pill.js';\nexport * from './PillGroup.js';\nexport * from './PillButton.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,sBAAd;AACA,+BAAc,2BADd;AAEA,+BAAc,4BAFd;",
6
- "names": []
7
- }