@elliemae/ds-pills-v2 3.62.1 → 3.70.0-alpha.9

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 (95) hide show
  1. package/dist/cjs/TruncatedTooltipText.js +112 -0
  2. package/dist/cjs/TruncatedTooltipText.js.map +7 -0
  3. package/dist/cjs/components/Pill.js +2 -1
  4. package/dist/cjs/components/Pill.js.map +2 -2
  5. package/dist/cjs/components/TextComponent.js +2 -2
  6. package/dist/cjs/components/TextComponent.js.map +2 -2
  7. package/dist/cjs/components/styled.js +62 -20
  8. package/dist/cjs/components/styled.js.map +2 -2
  9. package/dist/cjs/components/types/DropdownPill.js +55 -53
  10. package/dist/cjs/components/types/DropdownPill.js.map +2 -2
  11. package/dist/cjs/components/types/InputPill.js +91 -61
  12. package/dist/cjs/components/types/InputPill.js.map +2 -2
  13. package/dist/cjs/components/types/LabelOnlyPill.js +22 -2
  14. package/dist/cjs/components/types/LabelOnlyPill.js.map +2 -2
  15. package/dist/cjs/components/types/LabelPill.js +11 -2
  16. package/dist/cjs/components/types/LabelPill.js.map +2 -2
  17. package/dist/cjs/components/types/MenuButtonPill.js +11 -2
  18. package/dist/cjs/components/types/MenuButtonPill.js.map +2 -2
  19. package/dist/cjs/components/types/ReadOnlyPill.js +11 -2
  20. package/dist/cjs/components/types/ReadOnlyPill.js.map +2 -2
  21. package/dist/cjs/components/types/RemovablePill.js +15 -5
  22. package/dist/cjs/components/types/RemovablePill.js.map +2 -2
  23. package/dist/cjs/components/types/ValuePill.js +22 -1
  24. package/dist/cjs/components/types/ValuePill.js.map +2 -2
  25. package/dist/cjs/config/useValidateProps.js +63 -0
  26. package/dist/cjs/config/useValidateProps.js.map +7 -0
  27. package/dist/cjs/constants/index.js +3 -1
  28. package/dist/cjs/constants/index.js.map +2 -2
  29. package/dist/cjs/parts/DSPillButton/react-desc-prop-types.js +8 -2
  30. package/dist/cjs/parts/DSPillButton/react-desc-prop-types.js.map +2 -2
  31. package/dist/cjs/parts/DSPillGroup/react-desc-prop-types.js.map +2 -2
  32. package/dist/cjs/react-desc-prop-types.js +19 -9
  33. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  34. package/dist/cjs/typescript-testing/slot-props.js +42 -0
  35. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  36. package/dist/cjs/typescript-testing/typescript-pills-v2-valid.js +1 -1
  37. package/dist/cjs/typescript-testing/typescript-pills-v2-valid.js.map +2 -2
  38. package/dist/esm/TruncatedTooltipText.js +86 -0
  39. package/dist/esm/TruncatedTooltipText.js.map +7 -0
  40. package/dist/esm/components/Pill.js +3 -2
  41. package/dist/esm/components/Pill.js.map +2 -2
  42. package/dist/esm/components/TextComponent.js +2 -2
  43. package/dist/esm/components/TextComponent.js.map +2 -2
  44. package/dist/esm/components/styled.js +62 -20
  45. package/dist/esm/components/styled.js.map +2 -2
  46. package/dist/esm/components/types/DropdownPill.js +55 -53
  47. package/dist/esm/components/types/DropdownPill.js.map +2 -2
  48. package/dist/esm/components/types/InputPill.js +92 -62
  49. package/dist/esm/components/types/InputPill.js.map +2 -2
  50. package/dist/esm/components/types/LabelOnlyPill.js +22 -2
  51. package/dist/esm/components/types/LabelOnlyPill.js.map +2 -2
  52. package/dist/esm/components/types/LabelPill.js +11 -2
  53. package/dist/esm/components/types/LabelPill.js.map +2 -2
  54. package/dist/esm/components/types/MenuButtonPill.js +11 -2
  55. package/dist/esm/components/types/MenuButtonPill.js.map +2 -2
  56. package/dist/esm/components/types/ReadOnlyPill.js +11 -2
  57. package/dist/esm/components/types/ReadOnlyPill.js.map +2 -2
  58. package/dist/esm/components/types/RemovablePill.js +15 -5
  59. package/dist/esm/components/types/RemovablePill.js.map +2 -2
  60. package/dist/esm/components/types/ValuePill.js +22 -1
  61. package/dist/esm/components/types/ValuePill.js.map +2 -2
  62. package/dist/esm/config/useValidateProps.js +33 -0
  63. package/dist/esm/config/useValidateProps.js.map +7 -0
  64. package/dist/esm/constants/index.js +3 -1
  65. package/dist/esm/constants/index.js.map +2 -2
  66. package/dist/esm/parts/DSPillButton/react-desc-prop-types.js +8 -2
  67. package/dist/esm/parts/DSPillButton/react-desc-prop-types.js.map +2 -2
  68. package/dist/esm/parts/DSPillGroup/react-desc-prop-types.js.map +2 -2
  69. package/dist/esm/react-desc-prop-types.js +20 -10
  70. package/dist/esm/react-desc-prop-types.js.map +2 -2
  71. package/dist/esm/typescript-testing/slot-props.js +19 -0
  72. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  73. package/dist/esm/typescript-testing/typescript-pills-v2-valid.js +1 -1
  74. package/dist/esm/typescript-testing/typescript-pills-v2-valid.js.map +2 -2
  75. package/dist/types/TruncatedTooltipText.d.ts +10 -0
  76. package/dist/types/components/TextComponent.d.ts +2 -0
  77. package/dist/types/components/styled.d.ts +5 -4
  78. package/dist/types/config/useValidateProps.d.ts +3 -0
  79. package/dist/types/constants/index.d.ts +3 -0
  80. package/dist/types/parts/DSPillGroup/config/usePillGroup.d.ts +91 -91
  81. package/dist/types/parts/DSPillGroup/react-desc-prop-types.d.ts +1 -1
  82. package/dist/types/react-desc-prop-types.d.ts +11 -2
  83. package/package.json +20 -18
  84. package/dist/types/parts/DSPillButton/tests/DSPillButton.test.d.ts +0 -1
  85. package/dist/types/parts/DSPillGroup/tests/DSPillGroup.test.d.ts +0 -1
  86. package/dist/types/tests/DSPill.a11y.test.d.ts +0 -1
  87. package/dist/types/tests/DSPill.exports.test.d.ts +0 -1
  88. package/dist/types/tests/DSPill.get-owner-props.test.d.ts +0 -1
  89. package/dist/types/tests/DSPill.test.d.ts +0 -1
  90. package/dist/types/tests/DSPillGroup.test.d.ts +0 -1
  91. package/dist/types/tests/events/DSPill.events.keyboard.test.d.ts +0 -1
  92. package/dist/types/tests/events/DSPill.events.test.d.ts +0 -1
  93. package/dist/types/tests/events/DSPillGroup.events.keyboard.test.d.ts +0 -1
  94. package/dist/types/tests/events/DSPillGroup.events.test.d.ts +0 -1
  95. package/dist/types/typescript-testing/typescript-pills-v2-valid.d.ts +0 -1
@@ -0,0 +1,63 @@
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 useValidateProps_exports = {};
30
+ __export(useValidateProps_exports, {
31
+ useValidateProps: () => useValidateProps
32
+ });
33
+ module.exports = __toCommonJS(useValidateProps_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_constants = require("../constants/index.js");
37
+ const TYPES_WITHOUT_AGNOSTIC_REGIONS = ["menubutton", "dropdown", "input"];
38
+ const TYPES_RENDERING = {
39
+ left: "value, readonly, label, labelOnly, removable",
40
+ right: "value, readonly"
41
+ };
42
+ const REGION_PROPS = [
43
+ { name: "IconLeft", side: "left" },
44
+ { name: "iconLeft", side: "left" },
45
+ { name: "IconRight", side: "right" },
46
+ { name: "iconRight", side: "right" }
47
+ ];
48
+ const useValidateProps = (props, propTypes) => {
49
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSPillName);
50
+ if (TYPES_WITHOUT_AGNOSTIC_REGIONS.includes(props.type)) {
51
+ ["left", "right"].forEach((side) => {
52
+ const provided = REGION_PROPS.filter((prop) => prop.side === side && Boolean(props[prop.name])).map(
53
+ (prop) => prop.name
54
+ );
55
+ if (!provided.length) return;
56
+ const plural = provided.length > 1;
57
+ console.warn(
58
+ `[${import_constants.DSPillName}] ${provided.join(", ")} ${plural ? "were" : "was"} passed to a pill of type "${props.type}", which renders no agnostic region, so ${plural ? "they" : "it"} will be ignored. Its regions are dictated by the type. Types rendering the ${side} agnostic region: ${TYPES_RENDERING[side]}.`
59
+ );
60
+ });
61
+ }
62
+ };
63
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable no-console */\nimport { useValidateTypescriptPropTypes, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { DSPillName } from '../constants/index.js';\nimport type { DSPillT } from '../react-desc-prop-types.js';\n\nconst TYPES_WITHOUT_AGNOSTIC_REGIONS = ['menubutton', 'dropdown', 'input'];\n\nconst TYPES_RENDERING = {\n left: 'value, readonly, label, labelOnly, removable',\n right: 'value, readonly',\n} as const;\n\nconst REGION_PROPS = [\n { name: 'IconLeft', side: 'left' },\n { name: 'iconLeft', side: 'left' },\n { name: 'IconRight', side: 'right' },\n { name: 'iconRight', side: 'right' },\n] as const;\n\nexport const useValidateProps = (props: DSPillT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSPillName);\n\n if (TYPES_WITHOUT_AGNOSTIC_REGIONS.includes(props.type)) {\n (['left', 'right'] as const).forEach((side) => {\n const provided = REGION_PROPS.filter((prop) => prop.side === side && Boolean(props[prop.name])).map(\n (prop) => prop.name,\n );\n if (!provided.length) return;\n const plural = provided.length > 1;\n console.warn(\n `[${DSPillName}] ${provided.join(', ')} ${plural ? 'were' : 'was'} passed to a pill of type \"${props.type}\", which renders no agnostic region, so ${plural ? 'they' : 'it'} will be ignored. Its regions are dictated by the type. Types rendering the ${side} agnostic region: ${TYPES_RENDERING[side]}.`,\n );\n });\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAmE;AACnE,uBAA2B;AAG3B,MAAM,iCAAiC,CAAC,cAAc,YAAY,OAAO;AAEzE,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAe;AAAA,EACnB,EAAE,MAAM,YAAY,MAAM,OAAO;AAAA,EACjC,EAAE,MAAM,YAAY,MAAM,OAAO;AAAA,EACjC,EAAE,MAAM,aAAa,MAAM,QAAQ;AAAA,EACnC,EAAE,MAAM,aAAa,MAAM,QAAQ;AACrC;AAEO,MAAM,mBAAmB,CAAC,OAA8B,cAA4C;AAEzG,8DAA+B,OAAO,WAAW,2BAAU;AAE3D,MAAI,+BAA+B,SAAS,MAAM,IAAI,GAAG;AACvD,IAAC,CAAC,QAAQ,OAAO,EAAY,QAAQ,CAAC,SAAS;AAC7C,YAAM,WAAW,aAAa,OAAO,CAAC,SAAS,KAAK,SAAS,QAAQ,QAAQ,MAAM,KAAK,IAAI,CAAC,CAAC,EAAE;AAAA,QAC9F,CAAC,SAAS,KAAK;AAAA,MACjB;AACA,UAAI,CAAC,SAAS,OAAQ;AACtB,YAAM,SAAS,SAAS,SAAS;AACjC,cAAQ;AAAA,QACN,IAAI,2BAAU,KAAK,SAAS,KAAK,IAAI,CAAC,IAAI,SAAS,SAAS,KAAK,8BAA8B,MAAM,IAAI,2CAA2C,SAAS,SAAS,IAAI,+EAA+E,IAAI,qBAAqB,gBAAgB,IAAI,CAAC;AAAA,MACzS;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
6
+ "names": []
7
+ }
@@ -40,9 +40,11 @@ const DSPillV2Name = "DSPill";
40
40
  const DSPillName = DSPillV2Name;
41
41
  const PILL_V2_SLOTS = {
42
42
  WRAPPER: "wrapper",
43
+ LABEL: "label",
43
44
  PILL_GROUP: "pill-group",
44
45
  PILL_BUTTON: "pill-button",
45
- PILL_MENU_BUTTON: "menu-button-chevron"
46
+ PILL_MENU_BUTTON: "menu-button-chevron",
47
+ PILL_INPUT: "input"
46
48
  };
47
49
  const legacyHardcodedDataTestIds = {
48
50
  // this is for the close icon button in the removable pill
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSPillV2Name = 'DSPill';\nexport const DSPillName = DSPillV2Name;\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PILL_V2_SLOTS = {\n WRAPPER: 'wrapper',\n PILL_GROUP: 'pill-group',\n PILL_BUTTON: 'pill-button',\n PILL_MENU_BUTTON: 'menu-button-chevron',\n} as const;\n\nconst legacyHardcodedDataTestIds = {\n // this is for the close icon button in the removable pill\n PILL_REMOVABLE_ICON: 'ds-pill-close-icon',\n // this is for the chevron button in the dropdown pill\n PILL_DROPDOWN_CHEVRON: 'ds-pill-dropdown-chevron',\n // this is for the clear icon button in the input pill\n PILL_CLEAR_ICON: 'ds-pill-clear-icon',\n // this is for the input element in the input pill\n PILL_INPUT: 'ds-pill-input',\n};\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PILL_V2_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSPillV2Name, PILL_V2_SLOTS),\n PILL_BUTTON: 'ds-button',\n ...legacyHardcodedDataTestIds,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AACrB,MAAM,aAAa;AAGnB,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB;AACpB;AAEA,MAAM,6BAA6B;AAAA;AAAA,EAEjC,qBAAqB;AAAA;AAAA,EAErB,uBAAuB;AAAA;AAAA,EAEvB,iBAAiB;AAAA;AAAA,EAEjB,YAAY;AACd;AAGO,MAAM,sBAAsB;AAAA,EACjC,OAAG,0CAAwB,cAAc,aAAa;AAAA,EACtD,aAAa;AAAA,EACb,GAAG;AACL;",
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSPillV2Name = 'DSPill';\nexport const DSPillName = DSPillV2Name;\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PILL_V2_SLOTS = {\n WRAPPER: 'wrapper',\n LABEL: 'label',\n PILL_GROUP: 'pill-group',\n PILL_BUTTON: 'pill-button',\n PILL_MENU_BUTTON: 'menu-button-chevron',\n PILL_INPUT: 'input',\n} as const;\n\nconst legacyHardcodedDataTestIds = {\n // this is for the close icon button in the removable pill\n PILL_REMOVABLE_ICON: 'ds-pill-close-icon',\n // this is for the chevron button in the dropdown pill\n PILL_DROPDOWN_CHEVRON: 'ds-pill-dropdown-chevron',\n // this is for the clear icon button in the input pill\n PILL_CLEAR_ICON: 'ds-pill-clear-icon',\n // this is for the input element in the input pill\n PILL_INPUT: 'ds-pill-input',\n};\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PILL_V2_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSPillV2Name, PILL_V2_SLOTS),\n PILL_BUTTON: 'ds-button',\n ...legacyHardcodedDataTestIds,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AACrB,MAAM,aAAa;AAGnB,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,YAAY;AACd;AAEA,MAAM,6BAA6B;AAAA;AAAA,EAEjC,qBAAqB;AAAA;AAAA,EAErB,uBAAuB;AAAA;AAAA,EAEvB,iBAAiB;AAAA;AAAA,EAEjB,YAAY;AACd;AAGO,MAAM,sBAAsB;AAAA,EACjC,OAAG,0CAAwB,cAAc,aAAa;AAAA,EACtD,aAAa;AAAA,EACb,GAAG;AACL;",
6
6
  "names": []
7
7
  }
@@ -38,8 +38,14 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_constants = require("./constants/index.js");
39
39
  const defaultProps = {
40
40
  type: "right",
41
- width: "21px",
42
- height: "21px"
41
+ /**
42
+ * 20px = medium pill fit-content target (24) minus the agnostic region's 2px top+bottom
43
+ * padding (×2). Was 21px, which forced the old 25px pill height and dominated the b2 label
44
+ * box (24). Small pills pass 14px explicitly (see RemovablePill). No spec value exists for the
45
+ * button size that yields the pill target — derived from pill height − region padding.
46
+ */
47
+ width: "20px",
48
+ height: "20px"
43
49
  };
44
50
  const DSPillButtonPropTypes = {
45
51
  ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSPillV2Name, import_constants.PILL_BUTTON_SLOTS),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/DSPillButton/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSButtonV3T, DSButtonName, DSButtonSlots } from '@elliemae/ds-button-v2';\nimport type { DSPropTypesSchema, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPillV2Name, PILL_BUTTON_SLOTS } from './constants/index.js';\n\nexport declare namespace DSPillButtonT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSPillV2Name, typeof PILL_BUTTON_SLOTS> {\n applyAriaDisabled?: boolean;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLButtonElement>;\n }\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n /**\n * Extends DSButtonV3T.Props, omitting the following because they are handled internally:\n *\n * - type: Set based on the button's position (left, right, or only).\n * - buttonType: Forced to \"raw\" to strip default styles for custom pill styling.\n * - shape: Determined by the button's position in the group; users should never ask to alter this, we don't support shape in this scenario\n * - width/height: Converted to RTS values internally before being passed to DSButtonV3.\n */\n Omit<\n DSButtonV3T.Props,\n | 'type'\n | 'width'\n | 'height'\n | 'buttonType'\n | keyof TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSButtonName, typeof DSButtonSlots>\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n DSButtonV3T.Props,\n | 'type'\n | 'width'\n | 'height'\n | 'buttonType'\n | keyof TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSButtonName, typeof DSButtonSlots>\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPillButtonT.DefaultProps = {\n type: 'right',\n width: '21px',\n height: '21px',\n};\n\nexport const DSPillButtonPropTypes: DSPropTypesSchema<DSPillButtonT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_BUTTON_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n 'data-testid': PropTypes.string.description('root element data-testid'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSPillButtonPropTypesSchema = DSPillButtonPropTypes as unknown as ValidationMap<DSPillButtonT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAAgD;AAqDzC,MAAM,eAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEO,MAAM,wBAAgE;AAAA,EAC3E,OAAG,kDAAyB,+BAAc,kCAAiB;AAAA,EAC3D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM,CAAC,QAAQ,QAAQ,OAAO,CAAC,EAC5C,YAAY,wFAAwF,EACpG,aAAa,OAAO;AAAA,EACvB,OAAO,kCAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,MAAM;AAAA,EAC9E,QAAQ,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,MAAM;AAAA,EAChF,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,eAAe,kCAAU,OAAO,YAAY,0BAA0B;AAAA,EACtE,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,8BAA8B;",
4
+ "sourcesContent": ["import type { DSButtonV3T, DSButtonName, DSButtonSlots } from '@elliemae/ds-button-v2';\nimport type { DSPropTypesSchema, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPillV2Name, PILL_BUTTON_SLOTS } from './constants/index.js';\n\nexport declare namespace DSPillButtonT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSPillV2Name,\n typeof PILL_BUTTON_SLOTS\n > {\n applyAriaDisabled?: boolean;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLButtonElement>;\n }\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n /**\n * Extends DSButtonV3T.Props, omitting the following because they are handled internally:\n *\n * - type: Set based on the button's position (left, right, or only).\n * - buttonType: Forced to \"raw\" to strip default styles for custom pill styling.\n * - shape: Determined by the button's position in the group; users should never ask to alter this, we don't support shape in this scenario\n * - width/height: Converted to RTS values internally before being passed to DSButtonV3.\n */\n Omit<\n DSButtonV3T.Props,\n | 'type'\n | 'width'\n | 'height'\n | 'buttonType'\n | keyof TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSButtonName, typeof DSButtonSlots>\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n DSButtonV3T.Props,\n | 'type'\n | 'width'\n | 'height'\n | 'buttonType'\n | keyof TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSButtonName, typeof DSButtonSlots>\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPillButtonT.DefaultProps = {\n type: 'right',\n /**\n * 20px = medium pill fit-content target (24) minus the agnostic region's 2px top+bottom\n * padding (\u00D72). Was 21px, which forced the old 25px pill height and dominated the b2 label\n * box (24). Small pills pass 14px explicitly (see RemovablePill). No spec value exists for the\n * button size that yields the pill target \u2014 derived from pill height \u2212 region padding.\n */\n width: '20px',\n height: '20px',\n};\n\nexport const DSPillButtonPropTypes: DSPropTypesSchema<DSPillButtonT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_BUTTON_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n 'data-testid': PropTypes.string.description('root element data-testid'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSPillButtonPropTypesSchema = DSPillButtonPropTypes as unknown as ValidationMap<DSPillButtonT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAAgD;AAyDzC,MAAM,eAA2C;AAAA,EACtD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAON,OAAO;AAAA,EACP,QAAQ;AACV;AAEO,MAAM,wBAAgE;AAAA,EAC3E,OAAG,kDAAyB,+BAAc,kCAAiB;AAAA,EAC3D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM,CAAC,QAAQ,QAAQ,OAAO,CAAC,EAC5C,YAAY,wFAAwF,EACpG,aAAa,OAAO;AAAA,EACvB,OAAO,kCAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,MAAM;AAAA,EAC9E,QAAQ,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,MAAM;AAAA,EAChF,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,eAAe,kCAAU,OAAO,YAAY,0BAA0B;AAAA,EACtE,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,8BAA8B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/DSPillGroup/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPillV2Name, PILL_GROUP_SLOTS } from './constants/index.js';\n\nexport declare namespace DSPillGroupT {\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {\n width: string;\n innerRef: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSPillV2Name, typeof PILL_GROUP_SLOTS> {}\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof RequiredProps | keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof RequiredProps | keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPillGroupT.DefaultProps = {\n width: 'fit-content',\n innerRef: () => null,\n};\n\nexport const DSPillGroupPropTypes: DSPropTypesSchema<DSPillGroupT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_GROUP_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n children: PropTypes.node.description('Pills to render in the group').isRequired,\n};\n\nexport const DSPillGroupPropTypesSchema = DSPillGroupPropTypes as unknown as ValidationMap<DSPillGroupT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAA+C;AA6BxC,MAAM,eAA0C;AAAA,EACrD,OAAO;AAAA,EACP,UAAU,MAAM;AAClB;AAEO,MAAM,uBAA8D;AAAA,EACzE,OAAG,kDAAyB,+BAAc,iCAAgB;AAAA,EAC1D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,aAAa;AAAA,EACpF,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAC7D,YAAY,qCAAqC,EACjD,aAAa,MAAM,IAAI;AAAA,EAC1B,UAAU,kCAAU,KAAK,YAAY,8BAA8B,EAAE;AACvE;AAEO,MAAM,6BAA6B;",
4
+ "sourcesContent": ["import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPillV2Name, PILL_GROUP_SLOTS } from './constants/index.js';\n\nexport declare namespace DSPillGroupT {\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {\n width: string;\n innerRef: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSPillV2Name,\n typeof PILL_GROUP_SLOTS\n > {}\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof RequiredProps | keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof RequiredProps | keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPillGroupT.DefaultProps = {\n width: 'fit-content',\n innerRef: () => null,\n};\n\nexport const DSPillGroupPropTypes: DSPropTypesSchema<DSPillGroupT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_GROUP_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n children: PropTypes.node.description('Pills to render in the group').isRequired,\n};\n\nexport const DSPillGroupPropTypesSchema = DSPillGroupPropTypes as unknown as ValidationMap<DSPillGroupT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AAEP,uBAA+C;AAiCxC,MAAM,eAA0C;AAAA,EACrD,OAAO;AAAA,EACP,UAAU,MAAM;AAClB;AAEO,MAAM,uBAA8D;AAAA,EACzE,OAAG,kDAAyB,+BAAc,iCAAgB;AAAA,EAC1D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,aAAa;AAAA,EACpF,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAC7D,YAAY,qCAAqC,EACjD,aAAa,MAAM,IAAI;AAAA,EAC1B,UAAU,kCAAU,KAAK,YAAY,8BAA8B,EAAE;AACvE;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -34,7 +34,6 @@ __export(react_desc_prop_types_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
36
36
  var React = __toESM(require("react"));
37
- var import_ds_legacy_form = require("@elliemae/ds-legacy-form");
38
37
  var import_ds_menu_button = require("@elliemae/ds-menu-button");
39
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
39
  var import_constants = require("./constants/index.js");
@@ -49,6 +48,7 @@ const DSPillV2DefaultProps = {
49
48
  ariaLabel: "",
50
49
  size: "m",
51
50
  labelTruncated: false,
51
+ disableTruncationTooltip: false,
52
52
  tooltipValue: "",
53
53
  iconLeft: null,
54
54
  IconLeft: null,
@@ -59,9 +59,6 @@ const DSPillV2DefaultProps = {
59
59
  onInputChange: () => null,
60
60
  onInputClear: () => null,
61
61
  inputWidth: 72,
62
- // TODO: remove DSInput in favor of V2
63
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
64
- inputRender: import_ds_legacy_form.DSInput,
65
62
  dropdownProps: {
66
63
  options: [],
67
64
  isSkeleton: false,
@@ -91,14 +88,25 @@ const DSPillV2PropTypes = {
91
88
  size: import_ds_props_helpers.PropTypes.oneOf(["s", "m"]).description("Vertical pill size").defaultValue("m"),
92
89
  ariaLabel: import_ds_props_helpers.PropTypes.string.description("Aria label for the pill. If not provided we will use the label").defaultValue(""),
93
90
  labelTruncated: import_ds_props_helpers.PropTypes.bool.description("Whether to truncate the pills label").defaultValue(false),
91
+ disableTruncationTooltip: import_ds_props_helpers.PropTypes.bool.description(
92
+ "When labelTruncated is true, suppresses the automatic overflow tooltip. Use in contexts where the tooltip is inaccessible (e.g. inside ComboboxMulti)."
93
+ ).defaultValue(false),
94
94
  tooltipValue: import_ds_props_helpers.PropTypes.string.description("String to show as a tooltip in the value pill").defaultValue(""),
95
- iconLeft: import_ds_props_helpers.PropTypes.node.description("A component to show int the left of a readonly pill").defaultValue(null).deprecated({
95
+ iconLeft: import_ds_props_helpers.PropTypes.node.description(
96
+ "Component rendered in the left agnostic region. Rendered by the value, readonly, label, labelOnly and removable types only."
97
+ ).defaultValue(null).deprecated({
96
98
  version: "4.x",
97
99
  message: "Use IconLeft instead for accessibility reasons"
98
100
  }),
99
- IconLeft: import_ds_props_helpers.PropTypes.node.description("A component to show int the left of a label pill").defaultValue(null),
100
- IconRight: import_ds_props_helpers.PropTypes.node.description("A component to show in the right of a readonly pill").defaultValue(null),
101
- iconRight: import_ds_props_helpers.PropTypes.node.description("A component to show in the right of a readonly pill").defaultValue(null).deprecated({
101
+ IconLeft: import_ds_props_helpers.PropTypes.node.description(
102
+ "Component rendered in the left agnostic region. Rendered by the value, readonly, label, labelOnly and removable types only."
103
+ ).defaultValue(null),
104
+ IconRight: import_ds_props_helpers.PropTypes.node.description(
105
+ "Component rendered in the right agnostic region. Rendered by the value and readonly types only; label, labelOnly and removable render a left region only, and their right side is dictated by the type."
106
+ ).defaultValue(null),
107
+ iconRight: import_ds_props_helpers.PropTypes.node.description(
108
+ "Component rendered in the right agnostic region. Rendered by the value and readonly types only; label, labelOnly and removable render a left region only, and their right side is dictated by the type."
109
+ ).defaultValue(null).deprecated({
102
110
  version: "4.x",
103
111
  message: "Use IconRight instead for accessibility reasons"
104
112
  }),
@@ -117,7 +125,9 @@ const DSPillV2PropTypes = {
117
125
  "when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap"
118
126
  ).defaultValue(false),
119
127
  hasError: import_ds_props_helpers.PropTypes.bool.description("Whether the pill should be in an error state. Only for input pill").defaultValue(false),
120
- inputRender: import_ds_props_helpers.PropTypes.func.description("Custom render function for the input pill").defaultValue(`DSInput`),
128
+ inputRender: import_ds_props_helpers.PropTypes.func.description(
129
+ "Custom render function for the input pill. When omitted, the pill renders its own slot-enabled default input, exposing the dsPillInput slot for consumer overrides."
130
+ ),
121
131
  menuButtonProps: import_ds_props_helpers.PropTypes.shape(menuButtonPropsPropTypes).description("Props for the menu button pill").isRequiredIf((props) => props.type === "menubutton"),
122
132
  trailingComma: import_ds_props_helpers.PropTypes.bool.description(
123
133
  "Whether the disabled/aria-disabled/readonly pill should include a trailing comma or not"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSInput } from '@elliemae/ds-legacy-form';\nimport { DSMenuButtonPropTypes, type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { PILL_V2_SLOTS, DSPillV2Name } from './constants/index.js';\n\nexport namespace DSPillT {\n export interface DefaultProps {\n innerRef: TypescriptHelpersT.AnyRef<HTMLElement>;\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n applyTooltipOverflowWrap: boolean;\n hasError: boolean;\n ariaLabel: string;\n size: 'm' | 's';\n labelTruncated: boolean;\n tooltipValue: string;\n iconLeft: JSX.Element | null;\n IconLeft: React.ComponentType<{ label: string }> | null;\n IconRight: React.ComponentType<{ label: string }> | null;\n iconRight: JSX.Element | null;\n onRemove: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputPlaceholder: string;\n onInputChange: (e: React.ChangeEvent<HTMLInputElement>, newValue: string) => void;\n onInputClear: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputWidth: number;\n inputRender: React.ComponentType<any>;\n dropdownProps: DSDropdownMenuT.Props;\n onDropdownClick: (e: React.KeyboardEvent | React.MouseEvent) => void;\n tabIndex: TypescriptHelpersT.WCAGTabIndex;\n }\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSPillV2Name, typeof PILL_V2_SLOTS> {\n inputId?: string;\n menuButtonProps?: Omit<DSMenuButtonT.Props, 'children'>;\n trailingComma?: boolean;\n }\n export interface RequiredProps {\n label: string;\n type: 'label' | 'labelOnly' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly' | 'menubutton';\n }\n\n export interface Props\n extends RequiredProps,\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps | 'shape'\n >,\n XstyledProps {}\n\n export interface InternalProps\n extends RequiredProps,\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps | 'shape'\n >,\n XstyledProps {}\n}\n\nexport const DSPillV2DefaultProps: DSPillT.DefaultProps = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n applyTooltipOverflowWrap: false, // turn on for > 25.1\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: false,\n tooltipValue: '',\n iconLeft: null,\n IconLeft: null,\n IconRight: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n // TODO: remove DSInput in favor of V2\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n inputRender: DSInput,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nconst pillTypes = PropTypes.oneOf([\n 'label',\n 'labelOnly',\n 'value',\n 'input',\n 'dropdown',\n 'removable',\n 'readonly',\n 'menubutton',\n]);\n\n// children is embedded by the pill itself, forced to be a chevron pointing down by design\nconst { children, ...menuButtonPropsPropTypes } = DSMenuButtonPropTypes;\n\nexport const DSPillV2PropTypes: DSPropTypesSchema<DSPillT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_V2_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n size: PropTypes.oneOf(['s', 'm']).description('Vertical pill size').defaultValue('m'),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(false),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node\n .description('A component to show int the left of a readonly pill')\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconLeft instead for accessibility reasons',\n }),\n IconLeft: PropTypes.node.description('A component to show int the left of a label pill').defaultValue(null),\n IconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),\n iconRight: PropTypes.node\n .description('A component to show in the right of a readonly pill')\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconRight instead for accessibility reasons',\n }),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n inputId: PropTypes.string.description('ID for the input pill').defaultValue(undefined),\n disabled: PropTypes.bool\n .description('Whether the pill should be disabled. Only for value and removable pill')\n .defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n readOnly: PropTypes.bool.description('Whether the Pill is in readonly state or not.').defaultValue(false),\n applyTooltipOverflowWrap: PropTypes.bool\n .description(\n 'when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap',\n )\n .defaultValue(false),\n hasError: PropTypes.bool\n .description('Whether the pill should be in an error state. Only for input pill')\n .defaultValue(false),\n inputRender: PropTypes.func.description('Custom render function for the input pill').defaultValue(`DSInput`),\n menuButtonProps: PropTypes.shape(menuButtonPropsPropTypes)\n .description('Props for the menu button pill')\n .isRequiredIf((props: DSPillT.Props) => props.type === 'menubutton'),\n trailingComma: PropTypes.bool.description(\n 'Whether the disabled/aria-disabled/readonly pill should include a trailing comma or not',\n ),\n dropdownProps: PropTypes.object\n .description(\n 'Properties that will be used for the dropdown-menu. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue({})\n .deprecated({ version: '25.3' }),\n onDropdownClick: PropTypes.func\n .description(\n 'Callback when dropdown button is clicked or pressed. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue(() => null)\n .deprecated({ version: '25.3' }),\n};\n\nexport const DSPillV2PropTypesSchema = DSPillV2PropTypes as unknown as ValidationMap<DSPillT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,4BAAwB;AACxB,4BAA0D;AAE1D,8BAKO;AAEP,uBAA4C;AA4DrC,MAAM,uBAA6C;AAAA,EACxD,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,0BAA0B;AAAA;AAAA,EAC1B,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU,MAAM;AAAA,EAChB,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,cAAc,MAAM;AAAA,EACpB,YAAY;AAAA;AAAA;AAAA,EAGZ,aAAa;AAAA,EACb,eAAe;AAAA,IACb,SAAS,CAAC;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA,iBAAiB,MAAM;AAAA,EACvB,UAAU;AACZ;AAEA,MAAM,YAAY,kCAAU,MAAM;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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E,aAAa,MAAM,IAAI;AAAA,EAC1B,cAAc,kCAAU,KACrB,YAAY,uDAAuD,EACnE,aAAa,MAAM,IAAI;AAAA,EAC1B,YAAY,kCAAU,OAAO,YAAY,qDAAqD,EAAE,aAAa,GAAG;AAAA,EAChH,SAAS,kCAAU,OAAO,YAAY,uBAAuB,EAAE,aAAa,MAAS;AAAA,EACrF,UAAU,kCAAU,KACjB,YAAY,wEAAwE,EACpF,aAAa,KAAK;AAAA,EACrB,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KAAK,YAAY,+CAA+C,EAAE,aAAa,KAAK;AAAA,EACxG,0BAA0B,kCAAU,KACjC;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KACjB,YAAY,mEAAmE,EAC/E,aAAa,KAAK;AAAA,EACrB,aAAa,kCAAU,KAAK,YAAY,2CAA2C,EAAE,aAAa,SAAS;AAAA,EAC3G,iBAAiB,kCAAU,MAAM,wBAAwB,EACtD,YAAY,gCAAgC,EAC5C,aAAa,CAAC,UAAyB,MAAM,SAAS,YAAY;AAAA,EACrE,eAAe,kCAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,eAAe,kCAAU,OACtB;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,CAAC,EACf,WAAW,EAAE,SAAS,OAAO,CAAC;AAAA,EACjC,iBAAiB,kCAAU,KACxB;AAAA,IACC;AAAA,EACF,EACC,aAAa,MAAM,IAAI,EACvB,WAAW,EAAE,SAAS,OAAO,CAAC;AACnC;AAEO,MAAM,0BAA0B;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSMenuButtonPropTypes, type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPillV2Name, PILL_V2_SLOTS } from './constants/index.js';\n\nexport namespace DSPillT {\n export interface DefaultProps {\n innerRef: TypescriptHelpersT.AnyRef<HTMLElement>;\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n applyTooltipOverflowWrap: boolean;\n hasError: boolean;\n ariaLabel: string;\n size: 'm' | 's';\n labelTruncated: boolean;\n disableTruncationTooltip: boolean;\n tooltipValue: string;\n iconLeft: JSX.Element | null;\n IconLeft: React.ComponentType<{ label: string }> | null;\n IconRight: React.ComponentType<{ label: string }> | null;\n iconRight: JSX.Element | null;\n onRemove: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputPlaceholder: string;\n onInputChange: (e: React.ChangeEvent<HTMLInputElement>, newValue: string) => void;\n onInputClear: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputWidth: number;\n dropdownProps: DSDropdownMenuT.Props;\n onDropdownClick: (e: React.KeyboardEvent | React.MouseEvent) => void;\n tabIndex: TypescriptHelpersT.WCAGTabIndex;\n }\n export type SlotFunctionArguments = {\n dsPillWrapper: () => object;\n dsPillLabel: () => object;\n dsPillPillGroup: () => object;\n dsPillPillButton: () => object;\n dsPillMenuButtonChevron: () => object;\n dsPillInput: () => object;\n };\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSPillV2Name,\n typeof PILL_V2_SLOTS\n > {\n inputId?: string;\n // Optional, not default-filled: when absent, InputPill renders its own slot-enabled DSInputText.\n // When present, InputPill still injects the core input wiring (id, value, onChange/onValueChange,\n // aria-invalid, placeholder, focus/blur handlers, innerRef, className, data-testid) so the provided\n // component works correctly whether it's a plain <input>-shaped or DSInputText-shaped component \u2014\n // it just doesn't force DSInputText-specific internal slot overrides (e.g. dsInputtextInput) onto it.\n inputRender?: React.ComponentType<any>;\n menuButtonProps?: Omit<DSMenuButtonT.Props, 'children'>;\n trailingComma?: boolean;\n }\n export interface RequiredProps {\n label: string;\n type: 'label' | 'labelOnly' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly' | 'menubutton';\n }\n\n export interface Props\n extends\n RequiredProps,\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps | 'shape'\n >,\n XstyledProps {}\n\n export interface InternalProps\n extends\n RequiredProps,\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps | 'shape'\n >,\n XstyledProps {}\n}\n\nexport const DSPillV2DefaultProps: DSPillT.DefaultProps = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n applyTooltipOverflowWrap: false, // turn on for > 25.1\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: false,\n disableTruncationTooltip: false,\n tooltipValue: '',\n iconLeft: null,\n IconLeft: null,\n IconRight: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nconst pillTypes = PropTypes.oneOf([\n 'label',\n 'labelOnly',\n 'value',\n 'input',\n 'dropdown',\n 'removable',\n 'readonly',\n 'menubutton',\n]);\n\n// children is embedded by the pill itself, forced to be a chevron pointing down by design\nconst { children, ...menuButtonPropsPropTypes } = DSMenuButtonPropTypes;\n\nexport const DSPillV2PropTypes: DSPropTypesSchema<DSPillT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_V2_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n size: PropTypes.oneOf(['s', 'm']).description('Vertical pill size').defaultValue('m'),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(false),\n disableTruncationTooltip: PropTypes.bool\n .description(\n 'When labelTruncated is true, suppresses the automatic overflow tooltip. Use in contexts where the tooltip is inaccessible (e.g. inside ComboboxMulti).',\n )\n .defaultValue(false),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node\n .description(\n 'Component rendered in the left agnostic region. Rendered by the value, readonly, label, labelOnly and removable types only.',\n )\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconLeft instead for accessibility reasons',\n }),\n IconLeft: PropTypes.node\n .description(\n 'Component rendered in the left agnostic region. Rendered by the value, readonly, label, labelOnly and removable types only.',\n )\n .defaultValue(null),\n IconRight: PropTypes.node\n .description(\n 'Component rendered in the right agnostic region. Rendered by the value and readonly types only; label, labelOnly and removable render a left region only, and their right side is dictated by the type.',\n )\n .defaultValue(null),\n iconRight: PropTypes.node\n .description(\n 'Component rendered in the right agnostic region. Rendered by the value and readonly types only; label, labelOnly and removable render a left region only, and their right side is dictated by the type.',\n )\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconRight instead for accessibility reasons',\n }),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n inputId: PropTypes.string.description('ID for the input pill').defaultValue(undefined),\n disabled: PropTypes.bool\n .description('Whether the pill should be disabled. Only for value and removable pill')\n .defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n readOnly: PropTypes.bool.description('Whether the Pill is in readonly state or not.').defaultValue(false),\n applyTooltipOverflowWrap: PropTypes.bool\n .description(\n 'when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap',\n )\n .defaultValue(false),\n hasError: PropTypes.bool\n .description('Whether the pill should be in an error state. Only for input pill')\n .defaultValue(false),\n inputRender: PropTypes.func.description(\n 'Custom render function for the input pill. When omitted, the pill renders its own slot-enabled default input, exposing the dsPillInput slot for consumer overrides.',\n ),\n menuButtonProps: PropTypes.shape(menuButtonPropsPropTypes)\n .description('Props for the menu button pill')\n .isRequiredIf((props: DSPillT.Props) => props.type === 'menubutton'),\n trailingComma: PropTypes.bool.description(\n 'Whether the disabled/aria-disabled/readonly pill should include a trailing comma or not',\n ),\n dropdownProps: PropTypes.object\n .description(\n 'Properties that will be used for the dropdown-menu. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue({})\n .deprecated({ version: '25.3' }),\n onDropdownClick: PropTypes.func\n .description(\n 'Callback when dropdown button is clicked or pressed. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue(() => null)\n .deprecated({ version: '25.3' }),\n};\n\nexport const DSPillV2PropTypesSchema = DSPillV2PropTypes as unknown as ValidationMap<DSPillT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;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AAU,kCAAU,KAAK,YAAY,+CAA+C,EAAE,aAAa,KAAK;AAAA,EACxG,0BAA0B,kCAAU,KACjC;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KACjB,YAAY,mEAAmE,EAC/E,aAAa,KAAK;AAAA,EACrB,aAAa,kCAAU,KAAK;AAAA,IAC1B;AAAA,EACF;AAAA,EACA,iBAAiB,kCAAU,MAAM,wBAAwB,EACtD,YAAY,gCAAgC,EAC5C,aAAa,CAAC,UAAyB,MAAM,SAAS,YAAY;AAAA,EACrE,eAAe,kCAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,eAAe,kCAAU,OACtB;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,CAAC,EACf,WAAW,EAAE,SAAS,OAAO,CAAC;AAAA,EACjC,iBAAiB,kCAAU,KACxB;AAAA,IACC;AAAA,EACF,EACC,aAAa,MAAM,IAAI,EACvB,WAAW,EAAE,SAAS,OAAO,CAAC;AACnC;AAEO,MAAM,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,42 @@
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ const SlotPropsAsObj = {
26
+ dsPillWrapper: { "aria-label": "just a typescript test" },
27
+ dsPillLabel: { "aria-label": "just a typescript test" },
28
+ dsPillPillGroup: { "aria-label": "just a typescript test" },
29
+ dsPillPillButton: { "aria-label": "just a typescript test" },
30
+ dsPillMenuButtonChevron: { "aria-label": "just a typescript test" },
31
+ dsPillInput: { "aria-label": "just a typescript test" }
32
+ };
33
+ const SlotPropsAsFunctions = {
34
+ dsPillWrapper: () => ({ "aria-label": "just a typescript test" }),
35
+ dsPillLabel: () => ({ "aria-label": "just a typescript test" }),
36
+ dsPillPillGroup: () => ({ "aria-label": "just a typescript test" }),
37
+ dsPillPillButton: () => ({ "aria-label": "just a typescript test" }),
38
+ dsPillMenuButtonChevron: () => ({ "aria-label": "just a typescript test" }),
39
+ dsPillInput: () => ({ "aria-label": "just a typescript test" })
40
+ };
41
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
42
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSPillV2Name, PILL_V2_SLOTS } from '../constants/index.js';\nimport type { DSPillT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSPillT.Props> = {\n dsPillWrapper: { 'aria-label': 'just a typescript test' },\n dsPillLabel: { 'aria-label': 'just a typescript test' },\n dsPillPillGroup: { 'aria-label': 'just a typescript test' },\n dsPillPillButton: { 'aria-label': 'just a typescript test' },\n dsPillMenuButtonChevron: { 'aria-label': 'just a typescript test' },\n dsPillInput: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSPillT.SlotFunctionArguments = {\n dsPillWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsPillLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsPillPillGroup: () => ({ 'aria-label': 'just a typescript test' }),\n dsPillPillButton: () => ({ 'aria-label': 'just a typescript test' }),\n dsPillMenuButtonChevron: () => ({ 'aria-label': 'just a typescript test' }),\n dsPillInput: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSPillV2Name, typeof PILL_V2_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,iBAAyC;AAAA,EAC7C,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,aAAa,EAAE,cAAc,yBAAyB;AAAA,EACtD,iBAAiB,EAAE,cAAc,yBAAyB;AAAA,EAC1D,kBAAkB,EAAE,cAAc,yBAAyB;AAAA,EAC3D,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,aAAa,EAAE,cAAc,yBAAyB;AACxD;AAEA,MAAM,uBAAsD;AAAA,EAC1D,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,aAAa,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC7D,iBAAiB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACjE,kBAAkB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,aAAa,OAAO,EAAE,cAAc,yBAAyB;AAC/D;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -73,6 +73,7 @@ const testCompleteDefaults = {
73
73
  ariaLabel: "",
74
74
  size: "m",
75
75
  labelTruncated: true,
76
+ disableTruncationTooltip: false,
76
77
  tooltipValue: "",
77
78
  iconLeft: null,
78
79
  iconRight: null,
@@ -83,7 +84,6 @@ const testCompleteDefaults = {
83
84
  onInputChange: () => null,
84
85
  onInputClear: () => null,
85
86
  inputWidth: 72,
86
- inputRender: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "text" }),
87
87
  dropdownProps: {
88
88
  options: [],
89
89
  isSkeleton: false,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-pills-v2-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSPillV2 } from '../index.js';\nimport type { DSPillT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSPillT.Props;\ntype ComponentPropsInternals = DSPillT.InternalProps;\ntype ComponentPropsDefaultProps = DSPillT.DefaultProps;\ntype ComponentPropsOptionalProps = DSPillT.OptionalProps;\ntype ComponentPropsRequiredProps = DSPillT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n type: 'value',\n label: 'label',\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n inputId: 'dsId',\n menuButtonProps: {\n options: [],\n selectedItems: [],\n onItemSelected: () => {},\n onActivateItem: () => {},\n },\n trailingComma: true,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n ariaLabel: '',\n size: 'm',\n tooltipValue: '',\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n inputWidth: 72,\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n IconLeft: () => null,\n IconRight: () => null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n applyTooltipOverflowWrap: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSPillV2 {...testExplicitDefinition} />\n <DSPillV2 {...testInferedTypeCompatibility} />\n <DSPillV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSPillV2\n type=\"value\"\n label=\"label\"\n inputId=\"dsId\"\n innerRef={() => null}\n disabled={false}\n applyAriaDisabled={false}\n readOnly={false}\n hasError={false}\n ariaLabel=\"\"\n size=\"m\"\n labelTruncated\n tooltipValue=\"\"\n iconLeft={null}\n iconRight={null}\n onRemove={() => null}\n inputPlaceholder=\"\"\n onInputChange={() => null}\n onInputClear={() => null}\n inputWidth={72}\n // inputRender={() => <input type=\"text\"></input>}\n dropdownProps={{\n options: [],\n isSkeleton: false,\n isOpened: false,\n }}\n trailingComma={false}\n onDropdownClick={() => null}\n tabIndex={0}\n >\n Button Label\n </DSPillV2>\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC4EF;AA1ErB,eAAyB;AAUzB,MAAM,oBAAiD;AAAA,EACrD,MAAM;AAAA,EACN,OAAO;AACT;AACA,MAAM,oBAAiD;AAAA,EACrD,SAAS;AAAA,EACT,iBAAiB;AAAA,IACf,SAAS,CAAC;AAAA,IACV,eAAe,CAAC;AAAA,IAChB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,gBAAgB,MAAM;AAAA,IAAC;AAAA,EACzB;AAAA,EACA,eAAe;AACjB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,cAAc;AAAA,EACd,UAAU,MAAM;AAAA,EAChB,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,YAAY;AAAA,EACZ,iBAAiB,MAAM;AAAA,EACvB,UAAU;AACZ;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU,MAAM;AAAA,EAChB,WAAW,M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;AAAA,MACR,UAAU,MAAM;AAAA,MAChB,UAAU;AAAA,MACV,mBAAmB;AAAA,MACnB,UAAU;AAAA,MACV,UAAU;AAAA,MACV,WAAU;AAAA,MACV,MAAK;AAAA,MACL,gBAAc;AAAA,MACd,cAAa;AAAA,MACb,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU,MAAM;AAAA,MAChB,kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MACrB,cAAc,MAAM;AAAA,MACpB,YAAY;AAAA,MAEZ,eAAe;AAAA,QACb,SAAS,CAAC;AAAA,QACV,YAAY;AAAA,QACZ,UAAU;AAAA,MACZ;AAAA,MACA,eAAe;AAAA,MACf,iBAAiB,MAAM;AAAA,MACvB,UAAU;AAAA,MACX;AAAA;AAAA,EAED;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSPillV2 } from '../index.js';\nimport type { DSPillT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSPillT.Props;\ntype ComponentPropsInternals = DSPillT.InternalProps;\ntype ComponentPropsDefaultProps = DSPillT.DefaultProps;\ntype ComponentPropsOptionalProps = DSPillT.OptionalProps;\ntype ComponentPropsRequiredProps = DSPillT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n type: 'value',\n label: 'label',\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n inputId: 'dsId',\n menuButtonProps: {\n options: [],\n selectedItems: [],\n onItemSelected: () => {},\n onActivateItem: () => {},\n },\n trailingComma: true,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n ariaLabel: '',\n size: 'm',\n tooltipValue: '',\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n inputWidth: 72,\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n disableTruncationTooltip: false,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n IconLeft: () => null,\n IconRight: () => null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n applyTooltipOverflowWrap: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSPillV2 {...testExplicitDefinition} />\n <DSPillV2 {...testInferedTypeCompatibility} />\n <DSPillV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSPillV2\n type=\"value\"\n label=\"label\"\n inputId=\"dsId\"\n innerRef={() => null}\n disabled={false}\n applyAriaDisabled={false}\n readOnly={false}\n hasError={false}\n ariaLabel=\"\"\n size=\"m\"\n labelTruncated\n tooltipValue=\"\"\n iconLeft={null}\n iconRight={null}\n onRemove={() => null}\n inputPlaceholder=\"\"\n onInputChange={() => null}\n onInputClear={() => null}\n inputWidth={72}\n // inputRender={() => <input type=\"text\"></input>}\n dropdownProps={{\n options: [],\n isSkeleton: false,\n isOpened: false,\n }}\n trailingComma={false}\n onDropdownClick={() => null}\n tabIndex={0}\n >\n Button Label\n </DSPillV2>\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACwHF;AAtHrB,eAAyB;AAUzB,MAAM,oBAAiD;AAAA,EACrD,MAAM;AAAA,EACN,OAAO;AACT;AACA,MAAM,oBAAiD;AAAA,EACrD,SAAS;AAAA,EACT,iBAAiB;AAAA,IACf,SAAS,CAAC;AAAA,IACV,eAAe,CAAC;AAAA,IAChB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,gBAAgB,MAAM;AAAA,IAAC;AAAA,EACzB;AAAA,EACA,eAAe;AACjB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,cAAc;AAAA,EACd,UAAU,MAAM;AAAA,EAChB,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,YAAY;AAAA,EACZ,iBAAiB,MAAM;AAAA,EACvB,UAAU;AACZ;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,cAAc;AAAA,EACd,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;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mBAAmB;AAAA,MACnB,UAAU;AAAA,MACV,UAAU;AAAA,MACV,WAAU;AAAA,MACV,MAAK;AAAA,MACL,gBAAc;AAAA,MACd,cAAa;AAAA,MACb,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU,MAAM;AAAA,MAChB,kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MACrB,cAAc,MAAM;AAAA,MACpB,YAAY;AAAA,MAEZ,eAAe;AAAA,QACb,SAAS,CAAC;AAAA,QACV,YAAY;AAAA,QACZ,UAAU;AAAA,MACZ;AAAA,MACA,eAAe;AAAA,MACf,iBAAiB,MAAM;AAAA,MACvB,UAAU;AAAA,MACX;AAAA;AAAA,EAED;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,86 @@
1
+ import * as React from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useState } from "react";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import {
6
+ useFloatingContext,
7
+ FloatingWrapper,
8
+ PopoverArrow
9
+ } from "@elliemae/ds-floating-context";
10
+ const TruncatedSpan = styled.span`
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ overflow: hidden;
14
+ display: inline-block;
15
+ max-width: 100%;
16
+ `;
17
+ const TooltipContainer = styled.div`
18
+ text-align: center;
19
+ min-width: ${({ theme }) => theme.space.l};
20
+ max-width: 250px;
21
+ overflow-wrap: break-word;
22
+ word-break: break-word;
23
+ min-height: 30px;
24
+ display: grid;
25
+ align-items: center;
26
+ padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};
27
+ position: relative;
28
+ background-color: white;
29
+ border-radius: 2px;
30
+ font-size: 13px;
31
+ color: ${({ theme }) => theme.colors.neutral[600]};
32
+ `;
33
+ const TruncatedTooltipDetectionBox = styled.div`
34
+ position: absolute;
35
+ top: -15px;
36
+ right: -15px;
37
+ width: calc(100% + 30px);
38
+ height: calc(100% + 30px);
39
+ z-index: -1;
40
+ `;
41
+ const TruncatedTooltipText = ({ value = "", placement = "top", disableTooltip = false }) => {
42
+ const [showTooltip, setShowTooltip] = useState(false);
43
+ const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({
44
+ placement,
45
+ externallyControlledIsOpen: showTooltip,
46
+ withoutAnimation: true
47
+ });
48
+ const handleMouseEnter = useCallback((e) => {
49
+ const el = e.currentTarget;
50
+ setShowTooltip(el.offsetWidth < el.scrollWidth);
51
+ }, []);
52
+ const handleMouseLeave = useCallback(() => {
53
+ setShowTooltip(false);
54
+ }, []);
55
+ return /* @__PURE__ */ jsxs(
56
+ TruncatedSpan,
57
+ {
58
+ innerRef: refs.setReference,
59
+ onMouseEnter: disableTooltip ? void 0 : handleMouseEnter,
60
+ onMouseLeave: disableTooltip ? void 0 : handleMouseLeave,
61
+ children: [
62
+ value,
63
+ !disableTooltip && /* @__PURE__ */ jsx(
64
+ FloatingWrapper,
65
+ {
66
+ innerRef: refs.setFloating,
67
+ isOpen: showTooltip,
68
+ floatingStyles,
69
+ context,
70
+ children: /* @__PURE__ */ jsxs(TooltipContainer, { children: [
71
+ value,
72
+ /* @__PURE__ */ jsx(TruncatedTooltipDetectionBox, {}),
73
+ /* @__PURE__ */ jsx(PopoverArrow, { ...arrowStyles })
74
+ ] })
75
+ }
76
+ )
77
+ ]
78
+ }
79
+ );
80
+ };
81
+ var TruncatedTooltipText_default = TruncatedTooltipText;
82
+ export {
83
+ TruncatedTooltipText,
84
+ TruncatedTooltipText_default as default
85
+ };
86
+ //# sourceMappingURL=TruncatedTooltipText.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/TruncatedTooltipText.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport {\n useFloatingContext,\n FloatingWrapper,\n PopoverArrow,\n type DSHookFloatingContextT,\n} from '@elliemae/ds-floating-context';\n\nconst TruncatedSpan = styled.span`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\n/** Matches DSTooltipV3's StyledTooltipContainer styles for visual consistency */\nconst TooltipContainer = styled.div`\n text-align: center;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n overflow-wrap: break-word;\n word-break: break-word;\n min-height: 30px;\n display: grid;\n align-items: center;\n padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n font-size: 13px;\n color: ${({ theme }) => theme.colors.neutral[600]};\n`;\n\n/**\n * Mirrors DSTooltipV3's StyledMouseOverDetectionBox \u2014 extends hover area 15px on all sides,\n * covering the 12px floating offset gap so the tooltip doesn't close while the mouse crosses it.\n */\nconst TruncatedTooltipDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n\ninterface TruncatedTooltipTextProps {\n value?: string;\n placement?: DSHookFloatingContextT.PopperPlacementsT;\n disableTooltip?: boolean;\n}\n\nconst TruncatedTooltipText = ({ value = '', placement = 'top', disableTooltip = false }: TruncatedTooltipTextProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n placement,\n externallyControlledIsOpen: showTooltip,\n withoutAnimation: true,\n });\n\n const handleMouseEnter = useCallback((e: React.MouseEvent<HTMLSpanElement>) => {\n const el = e.currentTarget;\n setShowTooltip(el.offsetWidth < el.scrollWidth);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setShowTooltip(false);\n }, []);\n\n return (\n <TruncatedSpan\n innerRef={refs.setReference}\n onMouseEnter={disableTooltip ? undefined : handleMouseEnter}\n onMouseLeave={disableTooltip ? undefined : handleMouseLeave}\n >\n {value}\n {!disableTooltip && (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={showTooltip}\n floatingStyles={floatingStyles}\n context={context}\n >\n <TooltipContainer>\n {value}\n <TruncatedTooltipDetectionBox />\n <PopoverArrow {...arrowStyles} />\n </TooltipContainer>\n </FloatingWrapper>\n )}\n </TruncatedSpan>\n );\n};\n\nexport { TruncatedTooltipText };\nexport default TruncatedTooltipText;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsFb,SAEE,KAFF;AAtFV,SAAgB,aAAa,gBAAgB;AAC7C,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,mBAAmB,OAAO;AAAA;AAAA,eAEjB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAO9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKvD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAOnD,MAAM,+BAA+B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe5C,MAAM,uBAAuB,CAAC,EAAE,QAAQ,IAAI,YAAY,OAAO,iBAAiB,MAAM,MAAiC;AACrH,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AAEpD,QAAM,EAAE,MAAM,gBAAgB,aAAa,QAAQ,IAAI,mBAAmB;AAAA,IACxE;AAAA,IACA,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,mBAAmB,YAAY,CAAC,MAAyC;AAC7E,UAAM,KAAK,EAAE;AACb,mBAAe,GAAG,cAAc,GAAG,WAAW;AAAA,EAChD,GAAG,CAAC,CAAC;AAEL,QAAM,mBAAmB,YAAY,MAAM;AACzC,mBAAe,KAAK;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,KAAK;AAAA,MACf,cAAc,iBAAiB,SAAY;AAAA,MAC3C,cAAc,iBAAiB,SAAY;AAAA,MAE1C;AAAA;AAAA,QACA,CAAC,kBACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf,QAAQ;AAAA,YACR;AAAA,YACA;AAAA,YAEA,+BAAC,oBACE;AAAA;AAAA,cACD,oBAAC,gCAA6B;AAAA,cAC9B,oBAAC,gBAAc,GAAG,aAAa;AAAA,eACjC;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAGA,IAAO,+BAAQ;",
6
+ "names": []
7
+ }
@@ -1,7 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
3
+ import { describe, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
4
4
  import { DSPillName } from "../constants/index.js";
5
+ import { useValidateProps } from "../config/useValidateProps.js";
5
6
  import { DSPillV2DefaultProps, DSPillV2PropTypesSchema } from "../react-desc-prop-types.js";
6
7
  import {
7
8
  DropdownPill,
@@ -25,7 +26,7 @@ const pillComponentGetter = {
25
26
  };
26
27
  const DSPillV2 = (props) => {
27
28
  const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillV2DefaultProps);
28
- useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypesSchema, DSPillName);
29
+ useValidateProps(propsWithDefaults, DSPillV2PropTypesSchema);
29
30
  const { type } = propsWithDefaults;
30
31
  const PillComponent = pillComponentGetter[type];
31
32
  return /* @__PURE__ */ jsx(PillComponent, { ...propsWithDefaults });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Pill.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { DSPillName } from '../constants/index.js';\nimport { DSPillV2DefaultProps, DSPillV2PropTypesSchema, type DSPillT } from '../react-desc-prop-types.js';\nimport {\n DropdownPill,\n InputPill,\n LabelPill,\n LabelOnlyPill,\n MenuButtonPill,\n ReadOnlyPill,\n RemovablePill,\n ValuePill,\n} from './types/index.js';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillT.InternalProps>> = {\n dropdown: DropdownPill,\n menubutton: MenuButtonPill,\n input: InputPill,\n label: LabelPill,\n labelOnly: LabelOnlyPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSPillT.InternalProps>(props, DSPillV2DefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypesSchema, DSPillName);\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.displayName = DSPillName;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypesSchema;\n\nexport { DSPillV2, DSPillV2WithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACgCd;AAhCT,SAAS,UAAU,8BAA8B,sCAAsC;AAEvF,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB,+BAA6C;AAC5E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,sBAAkF;AAAA,EACtF,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAA+C,CAAC,UAAU;AAC9D,QAAM,oBAAoB,6BAAoD,OAAO,oBAAoB;AACzG,iCAA+B,mBAAmB,yBAAyB,UAAU;AACrF,QAAM,EAAE,KAAK,IAAI;AACjB,QAAM,gBAAgB,oBAAoB,IAAI;AAE9C,SAAO,oBAAC,iBAAe,GAAG,mBAAmB;AAC/C;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { DSPillName } from '../constants/index.js';\nimport { useValidateProps } from '../config/useValidateProps.js';\nimport { DSPillV2DefaultProps, DSPillV2PropTypesSchema, type DSPillT } from '../react-desc-prop-types.js';\nimport {\n DropdownPill,\n InputPill,\n LabelPill,\n LabelOnlyPill,\n MenuButtonPill,\n ReadOnlyPill,\n RemovablePill,\n ValuePill,\n} from './types/index.js';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillT.InternalProps>> = {\n dropdown: DropdownPill,\n menubutton: MenuButtonPill,\n input: InputPill,\n label: LabelPill,\n labelOnly: LabelOnlyPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSPillT.InternalProps>(props, DSPillV2DefaultProps);\n useValidateProps(propsWithDefaults, DSPillV2PropTypesSchema);\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.displayName = DSPillName;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypesSchema;\n\nexport { DSPillV2, DSPillV2WithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACiCd;AAjCT,SAAS,UAAU,oCAAoC;AAEvD,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB,+BAA6C;AAC5E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,sBAAkF;AAAA,EACtF,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAA+C,CAAC,UAAU;AAC9D,QAAM,oBAAoB,6BAAoD,OAAO,oBAAoB;AACzG,mBAAiB,mBAAmB,uBAAuB;AAC3D,QAAM,EAAE,KAAK,IAAI;AACjB,QAAM,gBAAgB,oBAAoB,IAAI;AAE9C,SAAO,oBAAC,iBAAe,GAAG,mBAAmB;AAC/C;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
4
3
  import React2 from "react";
4
+ import { TruncatedTooltipText } from "../TruncatedTooltipText.js";
5
5
  import { StyledTextWrapper } from "./styled.js";
6
- const TextComponent = React2.memo(({ labelTruncated, label, pillSize }) => /* @__PURE__ */ jsx(StyledTextWrapper, { pillSize, children: labelTruncated ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { containerProps: { style: { display: "block" } }, value: label }) : label }));
6
+ const TextComponent = React2.memo(({ labelTruncated, disableTruncationTooltip, label, pillSize, getOwnerProps }) => /* @__PURE__ */ jsx(StyledTextWrapper, { pillSize, variant: "b2", component: "span", getOwnerProps, children: labelTruncated ? /* @__PURE__ */ jsx(TruncatedTooltipText, { value: label, disableTooltip: disableTruncationTooltip }) : label }));
7
7
  export {
8
8
  TextComponent
9
9
  };