@elliemae/ds-form-combobox 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 (160) hide show
  1. package/dist/cjs/ComboBox.js +9 -1
  2. package/dist/cjs/ComboBox.js.map +2 -2
  3. package/dist/cjs/DSComboboxMultiT.js +3 -1
  4. package/dist/cjs/DSComboboxMultiT.js.map +2 -2
  5. package/dist/cjs/DSComboboxSingleT.js +2 -0
  6. package/dist/cjs/DSComboboxSingleT.js.map +2 -2
  7. package/dist/cjs/DSCommonComboboxPropsT.js.map +1 -1
  8. package/dist/cjs/{config/useClickOutside.js → TruncatedText.js} +17 -22
  9. package/dist/cjs/TruncatedText.js.map +7 -0
  10. package/dist/cjs/config/useComboBox.js.map +2 -2
  11. package/dist/cjs/constants/index.js +32 -4
  12. package/dist/cjs/constants/index.js.map +2 -2
  13. package/dist/cjs/parts/DropdownIndicator.js +2 -2
  14. package/dist/cjs/parts/DropdownIndicator.js.map +2 -2
  15. package/dist/cjs/parts/LiveRegion.js +13 -1
  16. package/dist/cjs/parts/LiveRegion.js.map +2 -2
  17. package/dist/cjs/parts/Section.js +8 -12
  18. package/dist/cjs/parts/Section.js.map +2 -2
  19. package/dist/cjs/parts/container/Container.js +21 -15
  20. package/dist/cjs/parts/container/Container.js.map +2 -2
  21. package/dist/cjs/parts/container/styled.js +7 -4
  22. package/dist/cjs/parts/container/styled.js.map +2 -2
  23. package/dist/cjs/parts/controls/Controls.js +35 -15
  24. package/dist/cjs/parts/controls/Controls.js.map +2 -2
  25. package/dist/cjs/parts/controls/styled.js +36 -14
  26. package/dist/cjs/parts/controls/styled.js.map +2 -2
  27. package/dist/cjs/parts/controls-input/ControlsInput.js +22 -9
  28. package/dist/cjs/parts/controls-input/ControlsInput.js.map +2 -2
  29. package/dist/cjs/parts/controls-input/styled.js +33 -13
  30. package/dist/cjs/parts/controls-input/styled.js.map +2 -2
  31. package/dist/cjs/parts/controls-input/useKeyboardNavigation.js +13 -3
  32. package/dist/cjs/parts/controls-input/useKeyboardNavigation.js.map +2 -2
  33. package/dist/cjs/parts/controls-input/useMaskedOnChange.js +1 -1
  34. package/dist/cjs/parts/controls-input/useMaskedOnChange.js.map +2 -2
  35. package/dist/cjs/parts/menu-list/LoadingContainer.js +28 -2
  36. package/dist/cjs/parts/menu-list/LoadingContainer.js.map +2 -2
  37. package/dist/cjs/parts/menu-list/MenuList.js +12 -4
  38. package/dist/cjs/parts/menu-list/MenuList.js.map +2 -2
  39. package/dist/cjs/parts/menu-list/SkeletonContainer.js +20 -1
  40. package/dist/cjs/parts/menu-list/SkeletonContainer.js.map +2 -2
  41. package/dist/cjs/parts/menu-list/styled.js +35 -5
  42. package/dist/cjs/parts/menu-list/styled.js.map +2 -2
  43. package/dist/cjs/parts/menu-list/useItemRenderer.js +35 -44
  44. package/dist/cjs/parts/menu-list/useItemRenderer.js.map +3 -3
  45. package/dist/cjs/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  46. package/dist/cjs/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map +2 -2
  47. package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js +6 -1
  48. package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
  49. package/dist/cjs/parts/styled.js +9 -2
  50. package/dist/cjs/parts/styled.js.map +2 -2
  51. package/dist/cjs/react-desc-prop-types.js +2 -0
  52. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  53. package/dist/cjs/typescript-testing/slot-props.js +82 -0
  54. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  55. package/dist/cjs/typescript-testing/typescript-combobox-multi-valid.js +158 -0
  56. package/dist/cjs/typescript-testing/typescript-combobox-multi-valid.js.map +7 -0
  57. package/dist/cjs/typescript-testing/typescript-combobox-single-valid.js +158 -0
  58. package/dist/cjs/typescript-testing/typescript-combobox-single-valid.js.map +7 -0
  59. package/dist/cjs/utils/listHelper.js +2 -1
  60. package/dist/cjs/utils/listHelper.js.map +2 -2
  61. package/dist/cjs/utils/typeGuards.js +36 -0
  62. package/dist/cjs/utils/typeGuards.js.map +7 -0
  63. package/dist/esm/ComboBox.js +10 -2
  64. package/dist/esm/ComboBox.js.map +2 -2
  65. package/dist/esm/DSComboboxMultiT.js +9 -2
  66. package/dist/esm/DSComboboxMultiT.js.map +2 -2
  67. package/dist/esm/DSComboboxSingleT.js +8 -1
  68. package/dist/esm/DSComboboxSingleT.js.map +2 -2
  69. package/dist/esm/DSCommonComboboxPropsT.js.map +1 -1
  70. package/dist/esm/TruncatedText.js +17 -0
  71. package/dist/esm/TruncatedText.js.map +7 -0
  72. package/dist/esm/config/useComboBox.js.map +2 -2
  73. package/dist/esm/constants/index.js +32 -4
  74. package/dist/esm/constants/index.js.map +2 -2
  75. package/dist/esm/parts/DropdownIndicator.js +3 -3
  76. package/dist/esm/parts/DropdownIndicator.js.map +2 -2
  77. package/dist/esm/parts/LiveRegion.js +13 -1
  78. package/dist/esm/parts/LiveRegion.js.map +2 -2
  79. package/dist/esm/parts/Section.js +9 -13
  80. package/dist/esm/parts/Section.js.map +2 -2
  81. package/dist/esm/parts/container/Container.js +21 -15
  82. package/dist/esm/parts/container/Container.js.map +2 -2
  83. package/dist/esm/parts/container/styled.js +7 -4
  84. package/dist/esm/parts/container/styled.js.map +2 -2
  85. package/dist/esm/parts/controls/Controls.js +35 -15
  86. package/dist/esm/parts/controls/Controls.js.map +2 -2
  87. package/dist/esm/parts/controls/styled.js +37 -15
  88. package/dist/esm/parts/controls/styled.js.map +2 -2
  89. package/dist/esm/parts/controls-input/ControlsInput.js +22 -9
  90. package/dist/esm/parts/controls-input/ControlsInput.js.map +2 -2
  91. package/dist/esm/parts/controls-input/styled.js +34 -14
  92. package/dist/esm/parts/controls-input/styled.js.map +2 -2
  93. package/dist/esm/parts/controls-input/useKeyboardNavigation.js +13 -3
  94. package/dist/esm/parts/controls-input/useKeyboardNavigation.js.map +2 -2
  95. package/dist/esm/parts/controls-input/useMaskedOnChange.js +1 -1
  96. package/dist/esm/parts/controls-input/useMaskedOnChange.js.map +2 -2
  97. package/dist/esm/parts/menu-list/LoadingContainer.js +28 -2
  98. package/dist/esm/parts/menu-list/LoadingContainer.js.map +2 -2
  99. package/dist/esm/parts/menu-list/MenuList.js +12 -4
  100. package/dist/esm/parts/menu-list/MenuList.js.map +2 -2
  101. package/dist/esm/parts/menu-list/SkeletonContainer.js +20 -1
  102. package/dist/esm/parts/menu-list/SkeletonContainer.js.map +2 -2
  103. package/dist/esm/parts/menu-list/styled.js +35 -5
  104. package/dist/esm/parts/menu-list/styled.js.map +2 -2
  105. package/dist/esm/parts/menu-list/useItemRenderer.js +35 -44
  106. package/dist/esm/parts/menu-list/useItemRenderer.js.map +2 -2
  107. package/dist/esm/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  108. package/dist/esm/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map +2 -2
  109. package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js +6 -1
  110. package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
  111. package/dist/esm/parts/styled.js +9 -2
  112. package/dist/esm/parts/styled.js.map +2 -2
  113. package/dist/esm/react-desc-prop-types.js +8 -1
  114. package/dist/esm/react-desc-prop-types.js.map +2 -2
  115. package/dist/esm/typescript-testing/slot-props.js +59 -0
  116. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  117. package/dist/esm/typescript-testing/typescript-combobox-multi-valid.js +135 -0
  118. package/dist/esm/typescript-testing/typescript-combobox-multi-valid.js.map +7 -0
  119. package/dist/esm/typescript-testing/typescript-combobox-single-valid.js +135 -0
  120. package/dist/esm/typescript-testing/typescript-combobox-single-valid.js.map +7 -0
  121. package/dist/esm/utils/listHelper.js +2 -1
  122. package/dist/esm/utils/listHelper.js.map +2 -2
  123. package/dist/esm/utils/typeGuards.js +6 -0
  124. package/dist/esm/utils/typeGuards.js.map +7 -0
  125. package/dist/types/ComboBox.d.ts +1 -1
  126. package/dist/types/DSComboboxMultiT.d.ts +5 -3
  127. package/dist/types/DSComboboxSingleT.d.ts +5 -3
  128. package/dist/types/DSCommonComboboxPropsT.d.ts +1 -1
  129. package/dist/types/TruncatedText.d.ts +13 -0
  130. package/dist/types/constants/index.d.ts +80 -2
  131. package/dist/types/parts/LiveRegion.d.ts +22 -1
  132. package/dist/types/parts/Section.d.ts +5 -5
  133. package/dist/types/parts/controls/styled.d.ts +1 -1
  134. package/dist/types/parts/controls-input/styled.d.ts +4 -2
  135. package/dist/types/parts/menu-list/LoadingContainer.d.ts +5 -2
  136. package/dist/types/parts/menu-list/SkeletonContainer.d.ts +2 -1
  137. package/dist/types/parts/menu-list/styled.d.ts +21 -2
  138. package/dist/types/parts/menu-list/useItemRenderer.d.ts +2 -1
  139. package/dist/types/parts/multi-selected-values-container/RemovableSelectedValuePill.d.ts +1 -1
  140. package/dist/types/react-desc-prop-types.d.ts +29 -1
  141. package/dist/types/utils/listHelper.d.ts +2 -2
  142. package/dist/types/utils/typeGuards.d.ts +2 -0
  143. package/package.json +19 -19
  144. package/dist/cjs/config/useClickOutside.js.map +0 -7
  145. package/dist/esm/config/useClickOutside.js +0 -22
  146. package/dist/esm/config/useClickOutside.js.map +0 -7
  147. package/dist/types/config/useClickOutside.d.ts +0 -1
  148. package/dist/types/tests/DSCombobox.exports.test.d.ts +0 -1
  149. package/dist/types/tests/DSCombobox.get-owner-props.test.d.ts +0 -1
  150. package/dist/types/tests/a11y.test.d.ts +0 -1
  151. package/dist/types/tests/creatable.test.d.ts +0 -1
  152. package/dist/types/tests/disabled.test.d.ts +0 -1
  153. package/dist/types/tests/force-focus-first-option-on-type.test.d.ts +0 -1
  154. package/dist/types/tests/general.test.d.ts +0 -1
  155. package/dist/types/tests/multi-select.test.d.ts +0 -1
  156. package/dist/types/tests/onlyselectable.test.d.ts +0 -1
  157. package/dist/types/tests/read-only.test.d.ts +0 -1
  158. package/dist/types/tests/single-select.test.d.ts +0 -1
  159. package/dist/types/tests/usemask.test.d.ts +0 -1
  160. package/dist/types/tests/utils.d.ts +0 -30
@@ -36,7 +36,6 @@ var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_ds_grid = require("@elliemae/ds-grid");
38
38
  var import_ds_menu_items = require("@elliemae/ds-menu-items");
39
- var import_ds_system = require("@elliemae/ds-system");
40
39
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
41
40
  var import_Section = require("../Section.js");
42
41
  var import_ComboBoxCTX = require("../../ComboBoxCTX.js");
@@ -44,17 +43,6 @@ var import_styled = require("./styled.js");
44
43
  var import_listHelper = require("../../utils/listHelper.js");
45
44
  var import_ComboboxDataTestids = require("../../ComboboxDataTestids.js");
46
45
  var import_constants = require("../../constants.js");
47
- var import_constants2 = require("../../constants/index.js");
48
- const StyledSingleMenuItem = (0, import_ds_system.styled)(import_ds_menu_items.SingleMenuItem, {
49
- name: import_constants2.DSFormComboboxName,
50
- slot: import_constants2.FORM_COMBOBOX_SLOTS.SINGLE_MENU_ITEM,
51
- preserveLegacyDataTestId: true
52
- })``;
53
- const StyledMultiMenuItem = (0, import_ds_system.styled)(import_ds_menu_items.MultiMenuItem, {
54
- name: import_constants2.DSFormComboboxName,
55
- slot: import_constants2.FORM_COMBOBOX_SLOTS.MULTI_MENU_ITEM,
56
- preserveLegacyDataTestId: true
57
- })``;
58
46
  const ItemRenderer = ({ index, extraItemProps }) => {
59
47
  const {
60
48
  props,
@@ -63,6 +51,7 @@ const ItemRenderer = ({ index, extraItemProps }) => {
63
51
  inputValue,
64
52
  focusOptionIdx,
65
53
  setInputValue,
54
+ setFocusOptionIdx,
66
55
  optionsPerSection
67
56
  } = (0, import_react.useContext)(import_ComboBoxCTX.ComboBoxContext);
68
57
  const { getOwnerProps } = (0, import_ds_props_helpers.useOwnerProps)(props);
@@ -74,14 +63,15 @@ const ItemRenderer = ({ index, extraItemProps }) => {
74
63
  );
75
64
  const option = extraItemProps?.itemList?.[index];
76
65
  const multiple = Array.isArray(selectedValues);
77
- const CBItem = multiple ? StyledMultiMenuItem : StyledSingleMenuItem;
66
+ const CBItem = multiple ? import_styled.StyledMultiMenuItem : import_styled.StyledSingleMenuItem;
78
67
  const handleOnCreateClick = (0, import_react.useCallback)(() => {
79
68
  if (inputValue && onCreate) {
80
69
  onCreate(inputValue);
70
+ setFocusOptionIdx("");
81
71
  setInputValue("");
82
- if (onFilter) onFilter(allOptions, inputValue);
72
+ if (onFilter) onFilter(allOptions, "");
83
73
  }
84
- }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);
74
+ }, [onFilter, onCreate, inputValue, allOptions, setInputValue, setFocusOptionIdx]);
85
75
  const handleClick = (0, import_react.useCallback)(
86
76
  (currentOption, e) => {
87
77
  if (readOnly) return;
@@ -92,7 +82,11 @@ const ItemRenderer = ({ index, extraItemProps }) => {
92
82
  if (!multiple) {
93
83
  setMenuState(false, "selectOption", e);
94
84
  }
95
- onChange((0, import_listHelper.getSuggestedValueOnChange)(currentOption, selectedValues, isNonClearable), currentOption, e);
85
+ onChange(
86
+ (0, import_listHelper.getSuggestedValueOnChange)(currentOption, selectedValues, isNonClearable),
87
+ currentOption,
88
+ e
89
+ );
96
90
  }
97
91
  }
98
92
  e.stopPropagation();
@@ -113,7 +107,7 @@ const ItemRenderer = ({ index, extraItemProps }) => {
113
107
  dsId: dsId.toString(),
114
108
  ...rest
115
109
  };
116
- if (type === import_constants.MENU_OPTION_TYPES.SECTION) {
110
+ if (option.type === import_constants.MENU_OPTION_TYPES.SECTION) {
117
111
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
118
112
  import_Section.Section,
119
113
  {
@@ -133,43 +127,40 @@ const ItemRenderer = ({ index, extraItemProps }) => {
133
127
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items.Separator, { ...generalProps, render: void 0 });
134
128
  }
135
129
  if (option.type === import_constants.MENU_OPTION_TYPES.OPTION) {
136
- return (
137
- // @ts-expect-error - this needs to be rewritten, this should not be a custom hook returning JSX, this should be a component.
138
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
- CBItem,
140
- {
141
- ...generalProps,
142
- value: option.value,
143
- label: option.label,
144
- dataTestid: import_ComboboxDataTestids.ComboboxDataTestid.OPTION,
145
- disabled,
146
- applyAriaDisabled: applyAriaDisabled || itemReadOnly,
147
- onClick: (e) => {
148
- if (applyAriaDisabled) return;
149
- handleClick(option, e);
150
- },
151
- onMouseDown: handleOnMouseDown,
152
- isActive: dsId === focusOptionIdx,
153
- tabIndex: -1,
154
- isSelected: (0, import_listHelper.isSelected)(selectedValues, option),
155
- getOwnerProps,
156
- getOwnerPropsArguments
157
- }
158
- )
130
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
131
+ CBItem,
132
+ {
133
+ ...generalProps,
134
+ value: option.value,
135
+ label: option.label,
136
+ dataTestid: import_ComboboxDataTestids.ComboboxDataTestid.OPTION,
137
+ disabled,
138
+ applyAriaDisabled: applyAriaDisabled || itemReadOnly,
139
+ onClick: (e) => {
140
+ if (applyAriaDisabled) return;
141
+ handleClick(option, e);
142
+ },
143
+ onMouseDown: handleOnMouseDown,
144
+ isActive: dsId === focusOptionIdx,
145
+ tabIndex: -1,
146
+ isSelected: (0, import_listHelper.isSelected)(selectedValues, option),
147
+ getOwnerProps,
148
+ getOwnerPropsArguments
149
+ }
159
150
  );
160
151
  }
161
152
  if (type === import_constants.INTERNAL_MENU_OPTION_TYPES.CREATABLE) {
162
153
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
163
- StyledSingleMenuItem,
154
+ import_styled.StyledSingleMenuItem,
164
155
  {
165
156
  getOwnerProps,
166
157
  getOwnerPropsArguments,
167
158
  dataTestid: import_ComboboxDataTestids.ComboboxDataTestid.OPTION,
168
159
  isActive: dsId === focusOptionIdx,
169
160
  ...generalProps,
170
- render: ({ label: labelCreatable }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { p: "8px", cols: ["min-content", "auto"], gutter: "xxs", alignItems: "center", children: [
171
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCreatableLabel, { children: "Add:" }),
172
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCreatableValue, { children: `"${labelCreatable}"` })
161
+ render: ({ label: labelCreatable }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { py: "8px", cols: ["min-content", "auto"], gutter: "xxs", alignItems: "center", children: [
162
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCreatableLabel, { variant: "b2", component: "span", getOwnerProps, children: "Add:" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCreatableValue, { variant: "b2", component: "span", getOwnerProps, children: `"${labelCreatable}"` })
173
164
  ] }),
174
165
  label: option.label,
175
166
  onClick: handleOnCreateClick,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/menu-list/useItemRenderer.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { SingleMenuItem, MultiMenuItem, Separator } from '@elliemae/ds-menu-items';\nimport { styled } from '@elliemae/ds-system';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { Section } from '../Section.js';\nimport { ComboBoxContext } from '../../ComboBoxCTX.js';\nimport { StyledCreatableLabel, StyledCreatableValue } from './styled.js';\nimport { isSelected, getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { MENU_OPTION_TYPES, INTERNAL_MENU_OPTION_TYPES } from '../../constants.js';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\ninterface ItemRendererT {\n extraItemProps?: {\n itemList?: DSComboboxT.OptionTypes[];\n };\n index: number;\n}\n\nconst StyledSingleMenuItem = styled(SingleMenuItem, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.SINGLE_MENU_ITEM,\n preserveLegacyDataTestId: true,\n})``;\n\nconst StyledMultiMenuItem = styled(MultiMenuItem, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.MULTI_MENU_ITEM,\n preserveLegacyDataTestId: true,\n})``;\n\nexport const ItemRenderer = ({ index, extraItemProps }: ItemRendererT): JSX.Element => {\n const {\n props,\n props: { onCreate, onChange, isNonClearable, selectedValues, onFilter, allOptions, readOnly },\n setMenuState,\n inputValue,\n focusOptionIdx,\n setInputValue,\n optionsPerSection,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const getOwnerPropsArguments = useCallback(\n () => ({\n index,\n }),\n [index],\n );\n\n const option = extraItemProps?.itemList?.[index];\n\n const multiple = Array.isArray(selectedValues);\n const CBItem = multiple ? StyledMultiMenuItem : StyledSingleMenuItem;\n\n const handleOnCreateClick = useCallback(() => {\n if (inputValue && onCreate) {\n onCreate(inputValue);\n setInputValue('');\n if (onFilter) onFilter(allOptions, inputValue);\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);\n\n const handleClick = useCallback(\n (currentOption: DSComboboxT.ItemOption, e: React.MouseEvent) => {\n if (readOnly) return;\n if (currentOption.type === MENU_OPTION_TYPES.OPTION) {\n if (!currentOption.disabled) {\n if (onFilter) onFilter(allOptions, inputValue);\n setInputValue('');\n if (!multiple) {\n setMenuState(false, 'selectOption', e);\n }\n onChange(getSuggestedValueOnChange(currentOption, selectedValues, isNonClearable), currentOption, e);\n }\n }\n // prevent for loosing focus on input control\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, selectedValues, allOptions, onChange, setMenuState, multiple],\n );\n\n // prevent blur from controls input\n const handleOnMouseDown = useCallback((e: React.MouseEvent<HTMLLIElement>) => {\n e.preventDefault();\n }, []);\n\n // @ts-expect-error - this needs to be rewritten, this should not be a custom hook returning JSX, this should be a component.\n return useMemo(() => {\n if (option) {\n const { dsId, type, disabled, applyAriaDisabled, readOnly: itemReadOnly, ...rest } = option;\n const generalProps = {\n // 'aria-setsize': `${allOptions.length}`,\n // 'aria-posinset': `${vItem.index + 1}`,\n key: `${dsId}`,\n dsId: dsId.toString(),\n ...rest,\n };\n if (type === MENU_OPTION_TYPES.SECTION) {\n return (\n <Section\n label={option.label}\n {...generalProps}\n // @ts-expect-error - this needs to be rewritten, broken typescript typings?\n options={option.options}\n handleClick={handleClick}\n focusOptionIdx={focusOptionIdx}\n handleOnMouseDown={handleOnMouseDown}\n selectedValues={selectedValues}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === MENU_OPTION_TYPES.SEPARATOR) {\n return <Separator {...generalProps} render={undefined} />;\n }\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n return (\n // @ts-expect-error - this needs to be rewritten, this should not be a custom hook returning JSX, this should be a component.\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled || itemReadOnly}\n onClick={(e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n handleClick(option, e);\n }}\n onMouseDown={handleOnMouseDown}\n isActive={dsId === focusOptionIdx}\n tabIndex={-1}\n isSelected={isSelected(selectedValues, option)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {\n return (\n <StyledSingleMenuItem\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n dataTestid={ComboboxDataTestid.OPTION}\n isActive={dsId === focusOptionIdx}\n {...generalProps}\n render={({ label: labelCreatable }: { label?: string }) => (\n <Grid p=\"8px\" cols={['min-content', 'auto']} gutter=\"xxs\" alignItems=\"center\">\n <StyledCreatableLabel>Add:</StyledCreatableLabel>\n <StyledCreatableValue>{`\"${labelCreatable}\"`}</StyledCreatableValue>\n </Grid>\n )}\n label={option.label}\n onClick={handleOnCreateClick}\n tabIndex={-1}\n />\n );\n }\n return null;\n }\n return null;\n }, [optionsPerSection, focusOptionIdx, selectedValues, allOptions, onCreate, inputValue, readOnly]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Gb;AAvGV,mBAAwD;AACxD,qBAAqB;AACrB,2BAAyD;AACzD,uBAAuB;AACvB,8BAA8B;AAC9B,qBAAwB;AACxB,yBAAgC;AAChC,oBAA2D;AAC3D,wBAAsD;AACtD,iCAAmC;AAEnC,uBAA8D;AAC9D,IAAAA,oBAAwD;AASxD,MAAM,2BAAuB,yBAAO,qCAAgB;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,sCAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAED,MAAM,0BAAsB,yBAAO,oCAAe;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,sCAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAEM,MAAM,eAAe,CAAC,EAAE,OAAO,eAAe,MAAkC;AACrF,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,UAAU,UAAU,gBAAgB,gBAAgB,UAAU,YAAY,SAAS;AAAA,IAC5F;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kCAAe;AAE9B,QAAM,EAAE,cAAc,QAAI,uCAAc,KAAK;AAC7C,QAAM,6BAAyB;AAAA,IAC7B,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,CAA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YAAY,QAAQ,CAAC;AACpG;",
6
- "names": ["import_constants"]
4
+ "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Separator } from '@elliemae/ds-menu-items';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { Section } from '../Section.js';\nimport { ComboBoxContext } from '../../ComboBoxCTX.js';\nimport { StyledCreatableLabel, StyledCreatableValue, StyledSingleMenuItem, StyledMultiMenuItem } from './styled.js';\nimport { isSelected, getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { MENU_OPTION_TYPES, INTERNAL_MENU_OPTION_TYPES } from '../../constants.js';\n\ninterface ItemRendererT {\n extraItemProps?: {\n itemList?: DSComboboxT.OptionTypes[];\n };\n index: number;\n}\n\nexport const ItemRenderer = ({ index, extraItemProps }: ItemRendererT): React.ReactElement | null => {\n const {\n props,\n props: { onCreate, onChange, isNonClearable, selectedValues, onFilter, allOptions, readOnly },\n setMenuState,\n inputValue,\n focusOptionIdx,\n setInputValue,\n setFocusOptionIdx,\n optionsPerSection,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const getOwnerPropsArguments = useCallback(\n () => ({\n index,\n }),\n [index],\n );\n\n const option = extraItemProps?.itemList?.[index];\n\n const multiple = Array.isArray(selectedValues);\n const CBItem: React.ComponentType<React.ComponentProps<typeof StyledSingleMenuItem>> = multiple\n ? StyledMultiMenuItem\n : StyledSingleMenuItem;\n\n const handleOnCreateClick = useCallback(() => {\n if (inputValue && onCreate) {\n onCreate(inputValue);\n // blank active item to force search last one\n setFocusOptionIdx('');\n setInputValue('');\n if (onFilter) onFilter(allOptions, '');\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue, setFocusOptionIdx]);\n\n const handleClick = useCallback(\n (currentOption: DSComboboxT.OptionTypes, e: React.MouseEvent) => {\n if (readOnly) return;\n if (currentOption.type === MENU_OPTION_TYPES.OPTION) {\n if (!currentOption.disabled) {\n if (onFilter) onFilter(allOptions, inputValue);\n setInputValue('');\n if (!multiple) {\n setMenuState(false, 'selectOption', e);\n }\n (onChange as (v: DSComboboxT.SelectedOptionsT, ...args: unknown[]) => void)(\n getSuggestedValueOnChange(currentOption, selectedValues, isNonClearable),\n currentOption,\n e,\n );\n }\n }\n // prevent for loosing focus on input control\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, selectedValues, allOptions, onChange, setMenuState, multiple],\n );\n\n // prevent blur from controls input\n const handleOnMouseDown = useCallback((e: React.MouseEvent<HTMLLIElement>) => {\n e.preventDefault();\n }, []);\n\n return useMemo(() => {\n if (option) {\n const { dsId, type, disabled, applyAriaDisabled, readOnly: itemReadOnly, ...rest } = option;\n const generalProps = {\n // 'aria-setsize': `${allOptions.length}`,\n // 'aria-posinset': `${vItem.index + 1}`,\n key: `${dsId}`,\n dsId: dsId.toString(),\n ...rest,\n };\n if (option.type === MENU_OPTION_TYPES.SECTION) {\n return (\n <Section\n label={option.label}\n {...generalProps}\n options={option.options}\n handleClick={handleClick}\n focusOptionIdx={focusOptionIdx}\n handleOnMouseDown={handleOnMouseDown}\n selectedValues={selectedValues}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === MENU_OPTION_TYPES.SEPARATOR) {\n return <Separator {...generalProps} render={undefined} />;\n }\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled || itemReadOnly}\n onClick={(e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n handleClick(option, e);\n }}\n onMouseDown={handleOnMouseDown}\n isActive={dsId === focusOptionIdx}\n tabIndex={-1}\n isSelected={isSelected(selectedValues, option)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {\n return (\n <StyledSingleMenuItem\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n dataTestid={ComboboxDataTestid.OPTION}\n isActive={dsId === focusOptionIdx}\n {...generalProps}\n render={({ label: labelCreatable }: { label?: string }) => (\n <Grid py=\"8px\" cols={['min-content', 'auto']} gutter=\"xxs\" alignItems=\"center\">\n <StyledCreatableLabel variant=\"b2\" component=\"span\" getOwnerProps={getOwnerProps}>\n Add:\n </StyledCreatableLabel>\n <StyledCreatableValue variant=\"b2\" component=\"span\" getOwnerProps={getOwnerProps}>\n {`\"${labelCreatable}\"`}\n </StyledCreatableValue>\n </Grid>\n )}\n label={option.label}\n onClick={handleOnCreateClick}\n tabIndex={-1}\n />\n );\n }\n return null;\n }\n return null;\n }, [optionsPerSection, focusOptionIdx, selectedValues, allOptions, onCreate, inputValue, readOnly]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoGb;AAjGV,mBAAwD;AACxD,qBAAqB;AACrB,2BAA0B;AAC1B,8BAA8B;AAC9B,qBAAwB;AACxB,yBAAgC;AAChC,oBAAsG;AACtG,wBAAsD;AACtD,iCAAmC;AAEnC,uBAA8D;AASvD,MAAM,eAAe,CAAC,EAAE,OAAO,eAAe,MAAgD;AACnG,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,UAAU,UAAU,gBAAgB,gBAAgB,UAAU,YAAY,SAAS;AAAA,IAC5F;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kCAAe;AAE9B,QAAM,EAAE,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c,KACrB;AAAA,eACF;AAAA,YAEF,OAAO,OAAO;AAAA,YACd,SAAS;AAAA,YACT,UAAU;AAAA;AAAA,QACZ;AAAA,MAEJ;AACA,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,gBAAgB,gBAAgB,YAAY,UAAU,YAAY,QAAQ,CAAC;AACpG;",
6
+ "names": []
7
7
  }
@@ -55,7 +55,7 @@ const MultiSelectedValuesContainer = () => {
55
55
  {
56
56
  style: { width: multiSelectedValue.length > 0 ? "max-content" : "0px" },
57
57
  "data-testid": import_ComboboxDataTestids.ComboboxDataTestid.SELECTED_VALUES,
58
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledDSPillGroupV2, { innerRef: pillGroupRef, children: [
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledDSPillGroupV2, { innerRef: pillGroupRef, getOwnerProps: ownerProps.getOwnerProps, children: [
59
59
  multiSelectedValue.length > 0 && multiSelectedValue.slice(0, correctPillsToShow).map((pill, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
60
  import_RemovableSelectedValuePill.RemovableSelectedValuePill,
61
61
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/multi-selected-values-container/MultiSelectedValuesContainer.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { useContext, useMemo } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { StyledDSPillGroupV2, StyledDSPillV2 } from '../styled.js';\nimport { RemovableSelectedValuePill } from './RemovableSelectedValuePill.js';\nimport { useGroupPills } from './useGroupPills.js';\n\nexport const MultiSelectedValuesContainer = (): JSX.Element => {\n const {\n props,\n props: { selectedValues, disabled, applyAriaDisabled: applyAriaDisabledToContainer, readOnly },\n pillGroupRef,\n } = useContext(ComboBoxContext);\n\n // this is always an array because logic in controls component\n const multiSelectedValue = selectedValues as DSComboboxT.ItemOption[];\n const correctPillsToShow = useGroupPills();\n const ownerProps = useOwnerProps(props);\n\n return useMemo(\n () => (\n <div\n style={{ width: multiSelectedValue.length > 0 ? 'max-content' : '0px' }}\n data-testid={ComboboxDataTestid.SELECTED_VALUES}\n >\n <StyledDSPillGroupV2 innerRef={pillGroupRef}>\n {multiSelectedValue.length > 0 &&\n multiSelectedValue\n .slice(0, correctPillsToShow)\n .map((pill, idx) => (\n <RemovableSelectedValuePill\n key={pill.dsId}\n pill={pill}\n trailingComma={\n ((disabled || applyAriaDisabledToContainer || readOnly) && idx + 1 < correctPillsToShow) ||\n (multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length)\n }\n ownerProps={ownerProps}\n />\n ))}\n {multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && (\n <StyledDSPillV2\n size=\"s\"\n labelTruncated={false}\n key=\"grouped\"\n label={`+${multiSelectedValue.length - correctPillsToShow}`}\n type=\"value\"\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabledToContainer}\n readOnly={readOnly}\n className=\"ds-pill-wrapper ds-pill-wrapper-value\"\n {...ownerProps}\n />\n )}\n </StyledDSPillGroupV2>\n </div>\n ),\n\n [\n pillGroupRef,\n multiSelectedValue,\n correctPillsToShow,\n disabled,\n applyAriaDisabledToContainer,\n readOnly,\n ownerProps,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2Bf;AA3BR,8BAA8B;AAC9B,mBAAoC;AACpC,yBAA4B;AAC5B,iCAAmC;AAEnC,oBAAoD;AACpD,wCAA2C;AAC3C,2BAA8B;AAEvB,MAAM,+BAA+B,MAAmB;AAC7D,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,gBAAgB,UAAU,mBAAmB,8BAA8B,SAAS;AAAA,IAC7F;AAAA,EACF,QAAI,yBAAW,mBAAAA,OAAe;AAG9B,QAAM,qBAAqB;AAC3B,QAAM,yBAAqB,oCAAc;AACzC,QAAM,iBAAa,uCAAc,KAAK;AAEtC,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,EAAE,OAAO,mBAAmB,SAAS,IAAI,gBAAgB,MAAM;AAAA,QACtE,eAAa,8CAAmB;AAAA,QAEhC,uDAAC,qCAAoB,UAAU,cAC5B;AAAA,6BAAmB,SAAS,KAC3B,mBACG,MAAM,GAAG,kBAAkB,EAC3B,IAAI,CAAC,MAAM,QACV;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,gBACI,YAAY,gCAAgC,aAAa,MAAM,IAAI,sBACpE,mBAAmB,SAAS,KAAK,uBAAuB,mBAAmB;AAAA,cAE9E;AAAA;AAAA,YANK,KAAK;AAAA,UAOZ,CACD;AAAA,UACJ,mBAAmB,SAAS,KAAK,uBAAuB,mBAAmB,UAC1E;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,gBAAgB;AAAA,cAEhB,OAAO,IAAI,mBAAmB,SAAS,kBAAkB;AAAA,cACzD,MAAK;AAAA,cACL;AAAA,cACA,mBAAmB;AAAA,cACnB;AAAA,cACA,WAAU;AAAA,cACT,GAAG;AAAA;AAAA,YAPA;AAAA,UAQN;AAAA,WAEJ;AAAA;AAAA,IACF;AAAA,IAGF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { useContext, useMemo } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { StyledDSPillGroupV2, StyledDSPillV2 } from '../styled.js';\nimport { RemovableSelectedValuePill } from './RemovableSelectedValuePill.js';\nimport { useGroupPills } from './useGroupPills.js';\n\nexport const MultiSelectedValuesContainer = (): JSX.Element => {\n const {\n props,\n props: { selectedValues, disabled, applyAriaDisabled: applyAriaDisabledToContainer, readOnly },\n pillGroupRef,\n } = useContext(ComboBoxContext);\n\n // this is always an array because logic in controls component\n const multiSelectedValue = selectedValues as DSComboboxT.ItemOption[];\n const correctPillsToShow = useGroupPills();\n // useOwnerProps returns () => {} for getOwnerPropsArguments, but OwnerInterface expects () => object.\n // The cast is safe \u2014 the actual return is always a plain object at runtime.\n const ownerProps = useOwnerProps(props) as {\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n };\n\n return useMemo(\n () => (\n <div\n style={{ width: multiSelectedValue.length > 0 ? 'max-content' : '0px' }}\n data-testid={ComboboxDataTestid.SELECTED_VALUES}\n >\n <StyledDSPillGroupV2 innerRef={pillGroupRef} getOwnerProps={ownerProps.getOwnerProps}>\n {multiSelectedValue.length > 0 &&\n multiSelectedValue\n .slice(0, correctPillsToShow)\n .map((pill, idx) => (\n <RemovableSelectedValuePill\n key={pill.dsId}\n pill={pill}\n trailingComma={\n ((disabled || applyAriaDisabledToContainer || readOnly) && idx + 1 < correctPillsToShow) ||\n (multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length)\n }\n ownerProps={ownerProps}\n />\n ))}\n {multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && (\n <StyledDSPillV2\n size=\"s\"\n labelTruncated={false}\n key=\"grouped\"\n label={`+${multiSelectedValue.length - correctPillsToShow}`}\n type=\"value\"\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabledToContainer}\n readOnly={readOnly}\n className=\"ds-pill-wrapper ds-pill-wrapper-value\"\n {...ownerProps}\n />\n )}\n </StyledDSPillGroupV2>\n </div>\n ),\n\n [\n pillGroupRef,\n multiSelectedValue,\n correctPillsToShow,\n disabled,\n applyAriaDisabledToContainer,\n readOnly,\n ownerProps,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCf;AAhCR,8BAA8B;AAC9B,mBAAoC;AACpC,yBAA4B;AAC5B,iCAAmC;AAEnC,oBAAoD;AACpD,wCAA2C;AAC3C,2BAA8B;AAEvB,MAAM,+BAA+B,MAAmB;AAC7D,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,gBAAgB,UAAU,mBAAmB,8BAA8B,SAAS;AAAA,IAC7F;AAAA,EACF,QAAI,yBAAW,mBAAAA,OAAe;AAG9B,QAAM,qBAAqB;AAC3B,QAAM,yBAAqB,oCAAc;AAGzC,QAAM,iBAAa,uCAAc,KAAK;AAKtC,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,EAAE,OAAO,mBAAmB,SAAS,IAAI,gBAAgB,MAAM;AAAA,QACtE,eAAa,8CAAmB;AAAA,QAEhC,uDAAC,qCAAoB,UAAU,cAAc,eAAe,WAAW,eACpE;AAAA,6BAAmB,SAAS,KAC3B,mBACG,MAAM,GAAG,kBAAkB,EAC3B,IAAI,CAAC,MAAM,QACV;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,gBACI,YAAY,gCAAgC,aAAa,MAAM,IAAI,sBACpE,mBAAmB,SAAS,KAAK,uBAAuB,mBAAmB;AAAA,cAE9E;AAAA;AAAA,YANK,KAAK;AAAA,UAOZ,CACD;AAAA,UACJ,mBAAmB,SAAS,KAAK,uBAAuB,mBAAmB,UAC1E;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,gBAAgB;AAAA,cAEhB,OAAO,IAAI,mBAAmB,SAAS,kBAAkB;AAAA,cACzD,MAAK;AAAA,cACL;AAAA,cACA,mBAAmB;AAAA,cACnB;AAAA,cACA,WAAU;AAAA,cACT,GAAG;AAAA;AAAA,YAPA;AAAA,UAQN;AAAA,WAEJ;AAAA;AAAA,IACF;AAAA,IAGF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": ["ComboBoxContext"]
7
7
  }
@@ -73,10 +73,15 @@ const RemovableSelectedValuePill = (props) => {
73
73
  trailingComma,
74
74
  tabIndex: -1,
75
75
  labelTruncated: true,
76
+ disableTruncationTooltip: true,
76
77
  onRemove: (e) => {
77
78
  if (readOnly) return;
78
79
  e.stopPropagation();
79
- onChange((0, import_listHelper.getSuggestedValueOnChange)(pill, selectedValues), pill, e);
80
+ onChange(
81
+ (0, import_listHelper.getSuggestedValueOnChange)(pill, selectedValues),
82
+ pill,
83
+ e
84
+ );
80
85
  internalRef.current?.focus();
81
86
  },
82
87
  ...ownerProps
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/multi-selected-values-container/RemovableSelectedValuePill.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { StyledDSPillV2 } from '../styled.js';\n\nexport const RemovableSelectedValuePill: React.ComponentType<{\n pill: DSComboboxT.ItemOption;\n applyAriaDisabled?: boolean;\n trailingComma?: boolean;\n ownerProps?: {\n getOwnerProps: () => DSComboboxT.InternalProps;\n getOwnerPropsArguments: () => object;\n };\n}> = (props) => {\n const { pill, trailingComma, ownerProps } = props;\n const {\n props: {\n onChange,\n isNonClearable,\n disabled,\n selectedValues,\n applyAriaDisabled: applyAriaDisabledToContainer,\n readOnly,\n },\n internalRef,\n } = useContext(ComboBoxContext);\n\n const type = React.useMemo(() => {\n if (disabled || isNonClearable) return 'value';\n if (applyAriaDisabledToContainer || readOnly) return 'labelOnly';\n return 'removable';\n }, [disabled, isNonClearable, applyAriaDisabledToContainer, readOnly]);\n /**\n * WORKAROUND: Manual className management\n *\n * StyledDSPillV2 is a styled-component wrapping DSPillV2.\n * When using the slot system (ownerProps), the internal component's className\n * is overridden by the styled-component's generated className, causing\n * DSPillV2's variant-specific classes to be lost.\n *\n * These classes are required for correct styling of different pill types:\n * - ds-pill-wrapper-removable: Interactive pills with remove button\n * - ds-pill-wrapper-label: Read-only pills (aria-disabled state)\n * - ds-pill-wrapper-value: Non-interactive pills (disabled/non-clearable)\n *\n * TODO: Fix in ds-system's generateClassName to preserve inner component classNames\n * when styled(InnerComponent) is used. Current implementation overwrites className\n * instead of merging it.\n *\n * Or instead of defining the className manually, trust on the ones generated by styled-components and remove the manual ones from DSPillV2,\n * but this would require a refactor in ds-pills-v2 to have a slot definition per variant.\n *\n *\n * Related: packages/agregators/ds-system/src/styled/generated-attributes/generateAttributes.ts\n */\n const className = React.useMemo(() => {\n if (type === 'removable') return 'ds-pill-wrapper ds-pill-wrapper-removable';\n if (type === 'labelOnly') return 'ds-pill-wrapper ds-pill-wrapper-label';\n return 'ds-pill-wrapper ds-pill-wrapper-value';\n }, [type]);\n\n return (\n <StyledDSPillV2\n size=\"s\"\n key={pill.value}\n label={pill.label}\n disabled={disabled || pill.disabled}\n type={type}\n className={className}\n applyAriaDisabled={applyAriaDisabledToContainer || pill.applyAriaDisabled}\n readOnly={readOnly}\n trailingComma={trailingComma}\n tabIndex={-1}\n labelTruncated\n onRemove={(e: React.KeyboardEvent | React.MouseEvent) => {\n if (readOnly) return;\n // preventing the menu to be opened\n e.stopPropagation();\n onChange(getSuggestedValueOnChange(pill, selectedValues), pill, e);\n internalRef.current?.focus();\n }}\n {...ownerProps}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DnB;AA/DJ,mBAAkC;AAClC,yBAA4B;AAE5B,wBAA0C;AAC1C,oBAA+B;AAExB,MAAM,6BAQR,CAAC,UAAU;AACd,QAAM,EAAE,MAAM,eAAe,WAAW,IAAI;AAC5C,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,mBAAmB;AAAA,MACnB;AAAA,IACF;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,mBAAAA,OAAe;AAE9B,QAAM,OAAO,aAAAC,QAAM,QAAQ,MAAM;AAC/B,QAAI,YAAY,eAAgB,QAAO;AACvC,QAAI,gCAAgC,SAAU,QAAO;AACrD,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,gBAAgB,8BAA8B,QAAQ,CAAC;AAwBrE,QAAM,YAAY,aAAAA,QAAM,QAAQ,MAAM;AACpC,QAAI,SAAS,YAAa,QAAO;AACjC,QAAI,SAAS,YAAa,QAAO;AACjC,WAAO;AAAA,EACT,GAAG,CAAC,IAAI,CAAC;AAET,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MAEL,OAAO,KAAK;AAAA,MACZ,UAAU,YAAY,KAAK;AAAA,MAC3B;AAAA,MACA;AAAA,MACA,mBAAmB,gCAAgC,KAAK;AAAA,MACxD;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,gBAAc;AAAA,MACd,UAAU,CAAC,MAA8C;AACvD,YAAI,SAAU;AAEd,UAAE,gBAAgB;AAClB,qBAAS,6CAA0B,MAAM,cAAc,GAAG,MAAM,CAAC;AACjE,oBAAY,SAAS,MAAM;AAAA,MAC7B;AAAA,MACC,GAAG;AAAA;AAAA,IAjBC,KAAK;AAAA,EAkBZ;AAEJ;",
4
+ "sourcesContent": ["import React, { useContext } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { StyledDSPillV2 } from '../styled.js';\n\nexport const RemovableSelectedValuePill: React.ComponentType<{\n pill: DSComboboxT.ItemOption;\n applyAriaDisabled?: boolean;\n trailingComma?: boolean;\n ownerProps?: {\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n };\n}> = (props) => {\n const { pill, trailingComma, ownerProps } = props;\n const {\n props: {\n onChange,\n isNonClearable,\n disabled,\n selectedValues,\n applyAriaDisabled: applyAriaDisabledToContainer,\n readOnly,\n },\n internalRef,\n } = useContext(ComboBoxContext);\n\n const type = React.useMemo(() => {\n if (disabled || isNonClearable) return 'value';\n if (applyAriaDisabledToContainer || readOnly) return 'labelOnly';\n return 'removable';\n }, [disabled, isNonClearable, applyAriaDisabledToContainer, readOnly]);\n /**\n * WORKAROUND: Manual className management\n *\n * StyledDSPillV2 is a styled-component wrapping DSPillV2.\n * When using the slot system (ownerProps), the internal component's className\n * is overridden by the styled-component's generated className, causing\n * DSPillV2's variant-specific classes to be lost.\n *\n * These classes are required for correct styling of different pill types:\n * - ds-pill-wrapper-removable: Interactive pills with remove button\n * - ds-pill-wrapper-label: Read-only pills (aria-disabled state)\n * - ds-pill-wrapper-value: Non-interactive pills (disabled/non-clearable)\n *\n * TODO: Fix in ds-system's generateClassName to preserve inner component classNames\n * when styled(InnerComponent) is used. Current implementation overwrites className\n * instead of merging it.\n *\n * Or instead of defining the className manually, trust on the ones generated by styled-components and remove the manual ones from DSPillV2,\n * but this would require a refactor in ds-pills-v2 to have a slot definition per variant.\n *\n *\n * Related: packages/agregators/ds-system/src/styled/generated-attributes/generateAttributes.ts\n */\n const className = React.useMemo(() => {\n if (type === 'removable') return 'ds-pill-wrapper ds-pill-wrapper-removable';\n if (type === 'labelOnly') return 'ds-pill-wrapper ds-pill-wrapper-label';\n return 'ds-pill-wrapper ds-pill-wrapper-value';\n }, [type]);\n\n return (\n <StyledDSPillV2\n size=\"s\"\n key={pill.value}\n label={pill.label}\n disabled={disabled || pill.disabled}\n type={type}\n className={className}\n applyAriaDisabled={applyAriaDisabledToContainer || pill.applyAriaDisabled}\n readOnly={readOnly}\n trailingComma={trailingComma}\n tabIndex={-1}\n labelTruncated\n /**\n * PUI-18660: intentionally unconditional for every pill type (removable/labelOnly/value),\n * not a bug. The pill never shows its own hover tooltip on truncation here \u2014 consumers who\n * need the full value in readOnly/aria-disabled states (where the menu can't be opened)\n * are expected to wrap the combobox itself in DSTooltipV3. See the Heads Up entry in the\n * v27.1 Incoming Changes release notes and the \"WithTooltip\" example in ds-form-multi-combobox.\n */\n disableTruncationTooltip\n onRemove={(e: React.KeyboardEvent | React.MouseEvent) => {\n if (readOnly) return;\n // preventing the menu to be opened\n e.stopPropagation();\n (onChange as (v: DSComboboxT.SelectedOptionsT, ...args: unknown[]) => void)(\n getSuggestedValueOnChange(pill, selectedValues),\n pill,\n e,\n );\n internalRef.current?.focus();\n }}\n {...ownerProps}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DnB;AA/DJ,mBAAkC;AAClC,yBAA4B;AAE5B,wBAA0C;AAC1C,oBAA+B;AAExB,MAAM,6BAQR,CAAC,UAAU;AACd,QAAM,EAAE,MAAM,eAAe,WAAW,IAAI;AAC5C,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,mBAAmB;AAAA,MACnB;AAAA,IACF;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,mBAAAA,OAAe;AAE9B,QAAM,OAAO,aAAAC,QAAM,QAAQ,MAAM;AAC/B,QAAI,YAAY,eAAgB,QAAO;AACvC,QAAI,gCAAgC,SAAU,QAAO;AACrD,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,gBAAgB,8BAA8B,QAAQ,CAAC;AAwBrE,QAAM,YAAY,aAAAA,QAAM,QAAQ,MAAM;AACpC,QAAI,SAAS,YAAa,QAAO;AACjC,QAAI,SAAS,YAAa,QAAO;AACjC,WAAO;AAAA,EACT,GAAG,CAAC,IAAI,CAAC;AAET,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MAEL,OAAO,KAAK;AAAA,MACZ,UAAU,YAAY,KAAK;AAAA,MAC3B;AAAA,MACA;AAAA,MACA,mBAAmB,gCAAgC,KAAK;AAAA,MACxD;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,gBAAc;AAAA,MAQd,0BAAwB;AAAA,MACxB,UAAU,CAAC,MAA8C;AACvD,YAAI,SAAU;AAEd,UAAE,gBAAgB;AAClB,QAAC;AAAA,cACC,6CAA0B,MAAM,cAAc;AAAA,UAC9C;AAAA,UACA;AAAA,QACF;AACA,oBAAY,SAAS,MAAM;AAAA,MAC7B;AAAA,MACC,GAAG;AAAA;AAAA,IA7BC,KAAK;AAAA,EA8BZ;AAEJ;",
6
6
  "names": ["ComboBoxContext", "React"]
7
7
  }
@@ -60,9 +60,16 @@ const StyledDSPillV2 = (0, import_ds_system.styled)(import_ds_pills_v2.DSPillV2,
60
60
  return theme.colors.brand[250];
61
61
  }};
62
62
 
63
- color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => disabled || applyAriaDisabled || readOnly ? "#616b7f" : theme.colors.brand["800"]};
63
+ color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {
64
+ if (disabled) return theme.colors.neutral["600"];
65
+ if (applyAriaDisabled || readOnly) return theme.colors.neutral["700"];
66
+ return theme.colors.brand["800"];
67
+ }};
64
68
  `;
65
- const StyledDSPillGroupV2 = (0, import_ds_system.styled)(import_ds_pills_v2.DSPillGroupV2)`
69
+ const StyledDSPillGroupV2 = (0, import_ds_system.styled)(import_ds_pills_v2.DSPillGroupV2, {
70
+ name: import_constants.DSFormComboboxName,
71
+ slot: import_constants.FORM_COMBOBOX_SLOTS.PILL_GROUP
72
+ })`
66
73
  display: grid;
67
74
  `;
68
75
  //# sourceMappingURL=styled.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { DSPillV2, DSPillGroupV2 } from '@elliemae/ds-pills-v2';\nimport { styled } from '@elliemae/ds-system';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../constants/index.js';\nexport const StyledA11yNotVisible = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n`;\n\n/**\n * Combobox-specific pill styling with stateful behavior\n *\n * DSPillV2 is stateless by design, but Combobox requires pills to visually\n * reflect container state (disabled/aria-disabled/readOnly). This wrapper\n * applies context-aware colors based on Combobox's interaction state.\n *\n * These styles were previously part of the Pills component but have been\n * moved here as Pills were refactored to be stateless. Combobox maintains\n * this stateful behavior as a specific use case requirement.\n */\nexport const StyledDSPillV2 = styled(DSPillV2, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.PILL,\n preserveLegacyDataTestId: true,\n})`\n background-color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {\n if (disabled) return theme.colors.neutral['080'];\n if (applyAriaDisabled || readOnly) return theme.colors.neutral['050'];\n return theme.colors.brand[250];\n }};\n\n color: ${({ theme, disabled, applyAriaDisabled, readOnly }) =>\n disabled || applyAriaDisabled || readOnly ? '#616b7f' : theme.colors.brand['800']};\n`;\n\n/*\n * PUI-17945: https://jira.elliemae.io/browse/PUI-17945\n * By new Pills designs, pills should wrap to new lines when there is not enough horizontal space,\n * but for Combobox we want to keep them in one line and show a \"+X\" pill when there are more selected values than the max pills to show,\n * so we are changing its display property to grid instead of flex.\n *\n * Not adding the slot, because this a regression.\n */\n\nexport const StyledDSPillGroupV2 = styled(DSPillGroupV2)`\n display: grid;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAwC;AACxC,uBAAuB;AACvB,uBAAwD;AACjD,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpC,MAAM,qBAAiB,yBAAO,6BAAU;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,qCAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAAA,sBACqB,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAAM;AACxE,MAAI,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AAC/C,MAAI,qBAAqB,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AACpE,SAAO,MAAM,OAAO,MAAM,GAAG;AAC/B,CAAC;AAAA;AAAA,WAEQ,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MACvD,YAAY,qBAAqB,WAAW,YAAY,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA;AAY9E,MAAM,0BAAsB,yBAAO,gCAAa;AAAA;AAAA;",
4
+ "sourcesContent": ["import { DSPillV2, DSPillGroupV2 } from '@elliemae/ds-pills-v2';\nimport { styled } from '@elliemae/ds-system';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../constants/index.js';\nexport const StyledA11yNotVisible = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n`;\n\n/**\n * Combobox-specific pill styling with stateful behavior\n *\n * DSPillV2 is stateless by design, but Combobox requires pills to visually\n * reflect container state (disabled/aria-disabled/readOnly). This wrapper\n * applies context-aware colors based on Combobox's interaction state.\n *\n * These styles were previously part of the Pills component but have been\n * moved here as Pills were refactored to be stateless. Combobox maintains\n * this stateful behavior as a specific use case requirement.\n */\nexport const StyledDSPillV2 = styled(DSPillV2, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.PILL,\n preserveLegacyDataTestId: true,\n})`\n background-color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {\n if (disabled) return theme.colors.neutral['080'];\n if (applyAriaDisabled || readOnly) return theme.colors.neutral['050'];\n return theme.colors.brand[250];\n }};\n\n color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {\n if (disabled) return theme.colors.neutral['600'];\n if (applyAriaDisabled || readOnly) return theme.colors.neutral['700'];\n return theme.colors.brand['800'];\n }};\n`;\n\n/*\n * PUI-17945: https://jira.elliemae.io/browse/PUI-17945\n * By new Pills designs, pills should wrap to new lines when there is not enough horizontal space,\n * but for Combobox we want to keep them in one line and show a \"+X\" pill when there are more selected values than the max pills to show,\n * so we are changing its display property to grid instead of flex.\n */\n\nexport const StyledDSPillGroupV2 = styled(DSPillGroupV2, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.PILL_GROUP,\n})`\n display: grid;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAwC;AACxC,uBAAuB;AACvB,uBAAwD;AACjD,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpC,MAAM,qBAAiB,yBAAO,6BAAU;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,qCAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAAA,sBACqB,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAAM;AACxE,MAAI,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AAC/C,MAAI,qBAAqB,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AACpE,SAAO,MAAM,OAAO,MAAM,GAAG;AAC/B,CAAC;AAAA;AAAA,WAEQ,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAAM;AAC7D,MAAI,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AAC/C,MAAI,qBAAqB,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AACpE,SAAO,MAAM,OAAO,MAAM,KAAK;AACjC,CAAC;AAAA;AAUI,MAAM,0BAAsB,yBAAO,kCAAe;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,qCAAoB;AAC5B,CAAC;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -37,6 +37,7 @@ var React = __toESM(require("react"));
37
37
  var import_react = require("react");
38
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
39
  var import_DSCommonComboboxPropsT = require("./DSCommonComboboxPropsT.js");
40
+ var import_constants = require("./constants/index.js");
40
41
  const defaultProps = {
41
42
  hasError: false,
42
43
  inline: false,
@@ -59,6 +60,7 @@ const defaultProps = {
59
60
  menuMaxHeight: 300
60
61
  };
61
62
  const ComboboxPropTypes = {
63
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSFormComboboxName, import_constants.FORM_COMBOBOX_SLOTS),
62
64
  ...import_ds_props_helpers.globalAttributesPropTypes,
63
65
  ...import_ds_props_helpers.xstyledPropTypes,
64
66
  ...import_DSCommonComboboxPropsT.commonComboboxPropTypes,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { createRef } from 'react';\nimport type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSComboboxMultiT } from './DSComboboxMultiT.js';\nimport type { DSComboboxSingleT } from './DSComboboxSingleT.js';\nimport { commonComboboxPropTypes, type DSCommonComboboxPropsT } from './DSCommonComboboxPropsT.js';\n\nexport declare namespace DSComboboxT {\n export type CommonItemOptions = DSCommonComboboxPropsT.CommonItemOptions;\n export type ItemSeparatorOptions = DSCommonComboboxPropsT.ItemSeparatorOptions;\n export type ItemSectionOptions = DSCommonComboboxPropsT.ItemSectionOptions;\n export type ItemOption = DSCommonComboboxPropsT.ItemOption;\n export type ItemCreatableOption = DSCommonComboboxPropsT.ItemCreatableOption;\n\n export type SelectionableOptions = DSCommonComboboxPropsT.SelectionableOptions;\n export type LayoutOptions = DSCommonComboboxPropsT.LayoutOptions;\n export type OptionTypes = DSCommonComboboxPropsT.OptionTypes;\n\n export type SelectedOptionsT = ItemOption[] | ItemOption | null;\n\n type SingleComboboxRequirePropsRenameInterface = Omit<DSComboboxSingleT.RequiredProps, 'selectedValue'> & {\n selectedValues: DSComboboxSingleT.RequiredProps['selectedValue'];\n };\n\n export type RequiredProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n | DSCommonComboboxPropsT.ItemOption\n | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[]\n ? DSComboboxMultiT.RequiredProps\n : SingleComboboxRequirePropsRenameInterface;\n\n export type DefaultProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n | DSCommonComboboxPropsT.ItemOption\n | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[] ? DSComboboxMultiT.DefaultProps : DSComboboxSingleT.DefaultProps;\n export type OptionalProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n | DSCommonComboboxPropsT.ItemOption\n | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[] ? DSComboboxMultiT.OptionalProps : DSComboboxSingleT.OptionalProps;\n export type PropsOptional = OptionalProps; // alias for backwards compatibility\n\n export type Props<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n | DSCommonComboboxPropsT.ItemOption\n | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[]\n ? DSComboboxMultiT.Props\n : Omit<DSComboboxSingleT.Props, 'selectedValue'> & { selectedValues: DSComboboxSingleT.Props['selectedValue'] };\n export type InternalProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n | DSCommonComboboxPropsT.ItemOption\n | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[]\n ? DSComboboxMultiT.InternalProps\n : Omit<DSComboboxSingleT.InternalProps, 'selectedValue'> & {\n selectedValues: DSComboboxSingleT.InternalProps['selectedValue'];\n };\n}\n\nexport const defaultProps: DSComboboxT.DefaultProps = {\n hasError: false,\n inline: false,\n withoutPortal: false,\n disabled: false,\n useMask: () => {},\n innerRef: createRef(),\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start'],\n noOptionsMessage: 'No Matches Found',\n isNonClearable: false,\n onlySelectable: false,\n isSkeleton: false,\n // override in useCombobox to avoid ref duplications when more than one cb is used\n applyAriaDisabled: false,\n readOnly: false,\n isMenuOpenableWithReadOnly: false,\n forceFocusFirstOptionOnType: false,\n menuMaxHeight: 300,\n};\n\n/**\n * Unified public schema used by polymorphic combobox consumption.\n *\n * `selectedValues` shape determines effective usage mode:\n * - object or null => single-select contract\n * - array => multi-select contract\n */\nexport const ComboboxPropTypes: DSPropTypesSchema<DSComboboxT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n ...commonComboboxPropTypes,\n onChange: PropTypes.func.isRequired\n .description(\n 'Polymorphic change callback. For single-select, suggestedValue is ItemOption | null; for multi-select, suggestedValue is ItemOption[].',\n )\n .signature(\n '(suggestedValue: ItemOption | ItemOption[] | null, selectedOption: SelectionableOptions, event: React.MouseEvent | React.KeyboardEvent) => void',\n ),\n selectedValues: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object])),\n PropTypes.object,\n PropTypes.oneOf([null]),\n ]).isRequired.description(\n 'Either a single selectable option or an array of selectable options. This shape determines single vs multi selection behavior. Null is valid only for single-select with no selection; an empty array is valid only for multi-select with no selection.',\n ),\n};\n\nexport const ComboboxPropTypesSchema = ComboboxPropTypes as unknown as ValidationMap<DSComboboxT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA0B;AAE1B,8BAAuE;AAGvE,oCAAqE;AAyD9D,MAAM,eAAyC;AAAA,EACpD,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,cAAU,wBAAU;AAAA,EACpB,0BAA0B;AAAA,EAC1B,0BAA0B,CAAC,gBAAgB,WAAW;AAAA,EACtD,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,YAAY;AAAA;AAAA,EAEZ,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,eAAe;AACjB;AASO,MAAM,oBAA0D;AAAA,EACrE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,kCAAU,KAAK,WACtB;AAAA,IACC;AAAA,EACF,EACC;AAAA,IACC;AAAA,EACF;AAAA,EACF,gBAAgB,kCAAU,UAAU;AAAA,IAClC,kCAAU,QAAQ,kCAAU,UAAU,CAAC,kCAAU,MAAM,CAAC,CAAC;AAAA,IACzD,kCAAU;AAAA,IACV,kCAAU,MAAM,CAAC,IAAI,CAAC;AAAA,EACxB,CAAC,EAAE,WAAW;AAAA,IACZ;AAAA,EACF;AACF;AAEO,MAAM,0BAA0B;",
4
+ "sourcesContent": ["import { createRef } from 'react';\nimport type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n PropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { DSComboboxMultiT } from './DSComboboxMultiT.js';\nimport type { DSComboboxSingleT } from './DSComboboxSingleT.js';\nimport { commonComboboxPropTypes, type DSCommonComboboxPropsT } from './DSCommonComboboxPropsT.js';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from './constants/index.js';\n\nexport declare namespace DSComboboxT {\n export type SlotFunctionArguments = {\n dsComboboxRoot: () => object;\n dsComboboxInputWrapper: () => object;\n dsComboboxInput: () => object;\n dsComboboxDropdownButton: () => object;\n dsComboboxFastList: () => object;\n dsComboboxSectionWrapper: () => object;\n dsComboboxSectionLabel: () => object;\n dsComboboxSingleMenuItem: () => object;\n dsComboboxMultiMenuItem: () => object;\n dsComboboxLoadingIndicator: () => object;\n dsComboboxSkeletonMenuItem: () => object;\n dsComboboxPill: () => object;\n dsComboboxPillGroup: () => object;\n dsComboboxPopperWrapper: () => object;\n dsComboboxSelection: () => object;\n dsComboboxSingleValueWrapper: () => object;\n dsComboboxHeaderActions: () => object;\n dsComboboxHeaderActionsSeparator: () => object;\n dsComboboxInputPlaceholder: () => object;\n dsComboboxInputFieldWrapper: () => object;\n dsComboboxListWrapper: () => object;\n dsComboboxNoResults: () => object;\n dsComboboxCreatableLabel: () => object;\n dsComboboxCreatableValue: () => object;\n dsComboboxMenuItemsWrapper: () => object;\n dsComboboxLoadingWrapper: () => object;\n };\n\n export type CommonItemOptions = DSCommonComboboxPropsT.CommonItemOptions;\n export type ItemSeparatorOptions = DSCommonComboboxPropsT.ItemSeparatorOptions;\n export type ItemSectionOptions = DSCommonComboboxPropsT.ItemSectionOptions;\n export type ItemOption = DSCommonComboboxPropsT.ItemOption;\n export type ItemCreatableOption = DSCommonComboboxPropsT.ItemCreatableOption;\n\n export type SelectionableOptions = DSCommonComboboxPropsT.SelectionableOptions;\n export type LayoutOptions = DSCommonComboboxPropsT.LayoutOptions;\n export type OptionTypes = DSCommonComboboxPropsT.OptionTypes;\n\n export type SelectedOptionsT = SelectionableOptions[] | SelectionableOptions | null;\n\n type SingleComboboxRequirePropsRenameInterface = Omit<DSComboboxSingleT.RequiredProps, 'selectedValue'> & {\n selectedValues: DSComboboxSingleT.RequiredProps['selectedValue'];\n };\n\n export type RequiredProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[]\n ? DSComboboxMultiT.RequiredProps\n : SingleComboboxRequirePropsRenameInterface;\n\n export type DefaultProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[] ? DSComboboxMultiT.DefaultProps : DSComboboxSingleT.DefaultProps;\n export type OptionalProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[] ? DSComboboxMultiT.OptionalProps : DSComboboxSingleT.OptionalProps;\n export type PropsOptional = OptionalProps; // alias for backwards compatibility\n\n export type Props<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[]\n ? DSComboboxMultiT.Props\n : Omit<DSComboboxSingleT.Props, 'selectedValue'> & { selectedValues: DSComboboxSingleT.Props['selectedValue'] };\n export type InternalProps<\n T extends DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[] | null =\n DSCommonComboboxPropsT.ItemOption | DSCommonComboboxPropsT.ItemOption[],\n > = T extends DSCommonComboboxPropsT.ItemOption[]\n ? DSComboboxMultiT.InternalProps\n : Omit<DSComboboxSingleT.InternalProps, 'selectedValue'> & {\n selectedValues: DSComboboxSingleT.InternalProps['selectedValue'];\n };\n}\n\nexport const defaultProps: DSComboboxT.DefaultProps = {\n hasError: false,\n inline: false,\n withoutPortal: false,\n disabled: false,\n useMask: () => {},\n innerRef: createRef(),\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start'],\n noOptionsMessage: 'No Matches Found',\n isNonClearable: false,\n onlySelectable: false,\n isSkeleton: false,\n // override in useCombobox to avoid ref duplications when more than one cb is used\n applyAriaDisabled: false,\n readOnly: false,\n isMenuOpenableWithReadOnly: false,\n forceFocusFirstOptionOnType: false,\n menuMaxHeight: 300,\n};\n\n/**\n * Unified public schema used by polymorphic combobox consumption.\n *\n * `selectedValues` shape determines effective usage mode:\n * - object or null => single-select contract\n * - array => multi-select contract\n */\nexport const ComboboxPropTypes: DSPropTypesSchema<DSComboboxT.Props> = {\n ...getPropsPerSlotPropTypes(DSFormComboboxName, FORM_COMBOBOX_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n ...commonComboboxPropTypes,\n onChange: PropTypes.func.isRequired\n .description(\n 'Polymorphic change callback. For single-select, suggestedValue is ItemOption | null; for multi-select, suggestedValue is ItemOption[].',\n )\n .signature(\n '(suggestedValue: ItemOption | ItemOption[] | null, selectedOption: SelectionableOptions, event: React.MouseEvent | React.KeyboardEvent) => void',\n ),\n selectedValues: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object])),\n PropTypes.object,\n PropTypes.oneOf([null]),\n ]).isRequired.description(\n 'Either a single selectable option or an array of selectable options. This shape determines single vs multi selection behavior. Null is valid only for single-select with no selection; an empty array is valid only for multi-select with no selection.',\n ),\n};\n\nexport const ComboboxPropTypesSchema = ComboboxPropTypes as unknown as ValidationMap<DSComboboxT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA0B;AAE1B,8BAKO;AAGP,oCAAqE;AACrE,uBAAwD;AAiFjD,MAAM,eAAyC;AAAA,EACpD,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,cAAU,wBAAU;AAAA,EACpB,0BAA0B;AAAA,EAC1B,0BAA0B,CAAC,gBAAgB,WAAW;AAAA,EACtD,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,YAAY;AAAA;AAAA,EAEZ,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,eAAe;AACjB;AASO,MAAM,oBAA0D;AAAA,EACrE,OAAG,kDAAyB,qCAAoB,oCAAmB;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,kCAAU,KAAK,WACtB;AAAA,IACC;AAAA,EACF,EACC;AAAA,IACC;AAAA,EACF;AAAA,EACF,gBAAgB,kCAAU,UAAU;AAAA,IAClC,kCAAU,QAAQ,kCAAU,UAAU,CAAC,kCAAU,MAAM,CAAC,CAAC;AAAA,IACzD,kCAAU;AAAA,IACV,kCAAU,MAAM,CAAC,IAAI,CAAC;AAAA,EACxB,CAAC,EAAE,WAAW;AAAA,IACZ;AAAA,EACF;AACF;AAEO,MAAM,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,82 @@
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
+ dsComboboxRoot: { "aria-label": "just a typescript test" },
27
+ dsComboboxInputWrapper: { "aria-label": "just a typescript test" },
28
+ dsComboboxInput: { "aria-label": "just a typescript test" },
29
+ dsComboboxDropdownButton: { "aria-label": "just a typescript test" },
30
+ dsComboboxFastList: { "aria-label": "just a typescript test" },
31
+ dsComboboxSectionWrapper: { "aria-label": "just a typescript test" },
32
+ dsComboboxSectionLabel: { "aria-label": "just a typescript test" },
33
+ dsComboboxSingleMenuItem: { "aria-label": "just a typescript test" },
34
+ dsComboboxMultiMenuItem: { "aria-label": "just a typescript test" },
35
+ dsComboboxLoadingIndicator: { "aria-label": "just a typescript test" },
36
+ dsComboboxSkeletonMenuItem: { "aria-label": "just a typescript test" },
37
+ dsComboboxPill: { "aria-label": "just a typescript test" },
38
+ dsComboboxPillGroup: { "aria-label": "just a typescript test" },
39
+ dsComboboxPopperWrapper: { "aria-label": "just a typescript test" },
40
+ dsComboboxSelection: { "aria-label": "just a typescript test" },
41
+ dsComboboxSingleValueWrapper: { "aria-label": "just a typescript test" },
42
+ dsComboboxHeaderActions: { "aria-label": "just a typescript test" },
43
+ dsComboboxHeaderActionsSeparator: { "aria-label": "just a typescript test" },
44
+ dsComboboxInputPlaceholder: { "aria-label": "just a typescript test" },
45
+ dsComboboxInputFieldWrapper: { "aria-label": "just a typescript test" },
46
+ dsComboboxListWrapper: { "aria-label": "just a typescript test" },
47
+ dsComboboxNoResults: { "aria-label": "just a typescript test" },
48
+ dsComboboxCreatableLabel: { "aria-label": "just a typescript test" },
49
+ dsComboboxCreatableValue: { "aria-label": "just a typescript test" },
50
+ dsComboboxMenuItemsWrapper: { "aria-label": "just a typescript test" },
51
+ dsComboboxLoadingWrapper: { "aria-label": "just a typescript test" }
52
+ };
53
+ const SlotPropsAsFunctions = {
54
+ dsComboboxRoot: () => ({ "aria-label": "just a typescript test" }),
55
+ dsComboboxInputWrapper: () => ({ "aria-label": "just a typescript test" }),
56
+ dsComboboxInput: () => ({ "aria-label": "just a typescript test" }),
57
+ dsComboboxDropdownButton: () => ({ "aria-label": "just a typescript test" }),
58
+ dsComboboxFastList: () => ({ "aria-label": "just a typescript test" }),
59
+ dsComboboxSectionWrapper: () => ({ "aria-label": "just a typescript test" }),
60
+ dsComboboxSectionLabel: () => ({ "aria-label": "just a typescript test" }),
61
+ dsComboboxSingleMenuItem: () => ({ "aria-label": "just a typescript test" }),
62
+ dsComboboxMultiMenuItem: () => ({ "aria-label": "just a typescript test" }),
63
+ dsComboboxLoadingIndicator: () => ({ "aria-label": "just a typescript test" }),
64
+ dsComboboxSkeletonMenuItem: () => ({ "aria-label": "just a typescript test" }),
65
+ dsComboboxPill: () => ({ "aria-label": "just a typescript test" }),
66
+ dsComboboxPillGroup: () => ({ "aria-label": "just a typescript test" }),
67
+ dsComboboxPopperWrapper: () => ({ "aria-label": "just a typescript test" }),
68
+ dsComboboxSelection: () => ({ "aria-label": "just a typescript test" }),
69
+ dsComboboxSingleValueWrapper: () => ({ "aria-label": "just a typescript test" }),
70
+ dsComboboxHeaderActions: () => ({ "aria-label": "just a typescript test" }),
71
+ dsComboboxHeaderActionsSeparator: () => ({ "aria-label": "just a typescript test" }),
72
+ dsComboboxInputPlaceholder: () => ({ "aria-label": "just a typescript test" }),
73
+ dsComboboxInputFieldWrapper: () => ({ "aria-label": "just a typescript test" }),
74
+ dsComboboxListWrapper: () => ({ "aria-label": "just a typescript test" }),
75
+ dsComboboxNoResults: () => ({ "aria-label": "just a typescript test" }),
76
+ dsComboboxCreatableLabel: () => ({ "aria-label": "just a typescript test" }),
77
+ dsComboboxCreatableValue: () => ({ "aria-label": "just a typescript test" }),
78
+ dsComboboxMenuItemsWrapper: () => ({ "aria-label": "just a typescript test" }),
79
+ dsComboboxLoadingWrapper: () => ({ "aria-label": "just a typescript test" })
80
+ };
81
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
82
+ //# 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 { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../constants/index.js';\nimport type { DSComboboxT } from '../react-desc-prop-types.js';\n\n// Object form \u2014 static slot props (validates slot keys exist on Props)\nconst SlotPropsAsObj: Partial<DSComboboxT.Props> = {\n dsComboboxRoot: { 'aria-label': 'just a typescript test' },\n dsComboboxInputWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxInput: { 'aria-label': 'just a typescript test' },\n dsComboboxDropdownButton: { 'aria-label': 'just a typescript test' },\n dsComboboxFastList: { 'aria-label': 'just a typescript test' },\n dsComboboxSectionWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxSectionLabel: { 'aria-label': 'just a typescript test' },\n dsComboboxSingleMenuItem: { 'aria-label': 'just a typescript test' },\n dsComboboxMultiMenuItem: { 'aria-label': 'just a typescript test' },\n dsComboboxLoadingIndicator: { 'aria-label': 'just a typescript test' },\n dsComboboxSkeletonMenuItem: { 'aria-label': 'just a typescript test' },\n dsComboboxPill: { 'aria-label': 'just a typescript test' },\n dsComboboxPillGroup: { 'aria-label': 'just a typescript test' },\n dsComboboxPopperWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxSelection: { 'aria-label': 'just a typescript test' },\n dsComboboxSingleValueWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxHeaderActions: { 'aria-label': 'just a typescript test' },\n dsComboboxHeaderActionsSeparator: { 'aria-label': 'just a typescript test' },\n dsComboboxInputPlaceholder: { 'aria-label': 'just a typescript test' },\n dsComboboxInputFieldWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxListWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxNoResults: { 'aria-label': 'just a typescript test' },\n dsComboboxCreatableLabel: { 'aria-label': 'just a typescript test' },\n dsComboboxCreatableValue: { 'aria-label': 'just a typescript test' },\n dsComboboxMenuItemsWrapper: { 'aria-label': 'just a typescript test' },\n dsComboboxLoadingWrapper: { 'aria-label': 'just a typescript test' },\n};\n\n// Function form \u2014 dynamic slot props (validates SlotFunctionArguments is complete)\nconst SlotPropsAsFunctions: DSComboboxT.SlotFunctionArguments = {\n dsComboboxRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxInputWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxInput: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxDropdownButton: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxFastList: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxSectionWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxSectionLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxSingleMenuItem: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxMultiMenuItem: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxLoadingIndicator: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxSkeletonMenuItem: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxPill: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxPillGroup: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxPopperWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxSelection: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxSingleValueWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxHeaderActions: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxHeaderActionsSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxInputPlaceholder: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxInputFieldWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxListWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxNoResults: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxCreatableLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxCreatableValue: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxMenuItemsWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsComboboxLoadingWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if any slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSFormComboboxName, typeof FORM_COMBOBOX_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;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