@elliemae/ds-form-combobox 3.70.0-next.2 → 3.70.0-next.4

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 (125) hide show
  1. package/dist/cjs/DSComboboxMultiT.js +2 -0
  2. package/dist/cjs/DSComboboxMultiT.js.map +2 -2
  3. package/dist/cjs/DSComboboxSingleT.js +2 -0
  4. package/dist/cjs/DSComboboxSingleT.js.map +2 -2
  5. package/dist/cjs/TruncatedTooltipText.js +94 -0
  6. package/dist/cjs/TruncatedTooltipText.js.map +7 -0
  7. package/dist/cjs/constants/index.js +32 -4
  8. package/dist/cjs/constants/index.js.map +2 -2
  9. package/dist/cjs/parts/Section.js +3 -6
  10. package/dist/cjs/parts/Section.js.map +2 -2
  11. package/dist/cjs/parts/container/Container.js +12 -2
  12. package/dist/cjs/parts/container/Container.js.map +2 -2
  13. package/dist/cjs/parts/container/styled.js +7 -4
  14. package/dist/cjs/parts/container/styled.js.map +2 -2
  15. package/dist/cjs/parts/controls/Controls.js +22 -12
  16. package/dist/cjs/parts/controls/Controls.js.map +2 -2
  17. package/dist/cjs/parts/controls/styled.js +19 -7
  18. package/dist/cjs/parts/controls/styled.js.map +2 -2
  19. package/dist/cjs/parts/controls-input/ControlsInput.js +7 -7
  20. package/dist/cjs/parts/controls-input/ControlsInput.js.map +2 -2
  21. package/dist/cjs/parts/controls-input/styled.js +11 -5
  22. package/dist/cjs/parts/controls-input/styled.js.map +2 -2
  23. package/dist/cjs/parts/controls-input/useKeyboardNavigation.js +10 -2
  24. package/dist/cjs/parts/controls-input/useKeyboardNavigation.js.map +2 -2
  25. package/dist/cjs/parts/controls-input/useMaskedOnChange.js +1 -1
  26. package/dist/cjs/parts/controls-input/useMaskedOnChange.js.map +2 -2
  27. package/dist/cjs/parts/menu-list/LoadingContainer.js +5 -2
  28. package/dist/cjs/parts/menu-list/LoadingContainer.js.map +2 -2
  29. package/dist/cjs/parts/menu-list/MenuList.js +9 -2
  30. package/dist/cjs/parts/menu-list/MenuList.js.map +2 -2
  31. package/dist/cjs/parts/menu-list/styled.js +31 -5
  32. package/dist/cjs/parts/menu-list/styled.js.map +2 -2
  33. package/dist/cjs/parts/menu-list/useItemRenderer.js +30 -41
  34. package/dist/cjs/parts/menu-list/useItemRenderer.js.map +3 -3
  35. package/dist/cjs/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  36. package/dist/cjs/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map +2 -2
  37. package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js +5 -1
  38. package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
  39. package/dist/cjs/parts/styled.js +4 -1
  40. package/dist/cjs/parts/styled.js.map +2 -2
  41. package/dist/cjs/react-desc-prop-types.js +2 -0
  42. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  43. package/dist/cjs/typescript-testing/slot-props.js +82 -0
  44. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  45. package/dist/cjs/typescript-testing/typescript-combobox-multi-valid.js +158 -0
  46. package/dist/cjs/typescript-testing/typescript-combobox-multi-valid.js.map +7 -0
  47. package/dist/cjs/typescript-testing/typescript-combobox-single-valid.js +158 -0
  48. package/dist/cjs/typescript-testing/typescript-combobox-single-valid.js.map +7 -0
  49. package/dist/cjs/utils/listHelper.js.map +2 -2
  50. package/dist/esm/DSComboboxMultiT.js +8 -1
  51. package/dist/esm/DSComboboxMultiT.js.map +2 -2
  52. package/dist/esm/DSComboboxSingleT.js +8 -1
  53. package/dist/esm/DSComboboxSingleT.js.map +2 -2
  54. package/dist/esm/TruncatedTooltipText.js +68 -0
  55. package/dist/esm/TruncatedTooltipText.js.map +7 -0
  56. package/dist/esm/constants/index.js +32 -4
  57. package/dist/esm/constants/index.js.map +2 -2
  58. package/dist/esm/parts/Section.js +4 -7
  59. package/dist/esm/parts/Section.js.map +2 -2
  60. package/dist/esm/parts/container/Container.js +12 -2
  61. package/dist/esm/parts/container/Container.js.map +2 -2
  62. package/dist/esm/parts/container/styled.js +7 -4
  63. package/dist/esm/parts/container/styled.js.map +2 -2
  64. package/dist/esm/parts/controls/Controls.js +22 -12
  65. package/dist/esm/parts/controls/Controls.js.map +2 -2
  66. package/dist/esm/parts/controls/styled.js +19 -7
  67. package/dist/esm/parts/controls/styled.js.map +2 -2
  68. package/dist/esm/parts/controls-input/ControlsInput.js +7 -7
  69. package/dist/esm/parts/controls-input/ControlsInput.js.map +2 -2
  70. package/dist/esm/parts/controls-input/styled.js +11 -5
  71. package/dist/esm/parts/controls-input/styled.js.map +2 -2
  72. package/dist/esm/parts/controls-input/useKeyboardNavigation.js +10 -2
  73. package/dist/esm/parts/controls-input/useKeyboardNavigation.js.map +2 -2
  74. package/dist/esm/parts/controls-input/useMaskedOnChange.js +1 -1
  75. package/dist/esm/parts/controls-input/useMaskedOnChange.js.map +2 -2
  76. package/dist/esm/parts/menu-list/LoadingContainer.js +5 -2
  77. package/dist/esm/parts/menu-list/LoadingContainer.js.map +2 -2
  78. package/dist/esm/parts/menu-list/MenuList.js +9 -2
  79. package/dist/esm/parts/menu-list/MenuList.js.map +2 -2
  80. package/dist/esm/parts/menu-list/styled.js +31 -5
  81. package/dist/esm/parts/menu-list/styled.js.map +2 -2
  82. package/dist/esm/parts/menu-list/useItemRenderer.js +30 -41
  83. package/dist/esm/parts/menu-list/useItemRenderer.js.map +2 -2
  84. package/dist/esm/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  85. package/dist/esm/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map +2 -2
  86. package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js +5 -1
  87. package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
  88. package/dist/esm/parts/styled.js +4 -1
  89. package/dist/esm/parts/styled.js.map +2 -2
  90. package/dist/esm/react-desc-prop-types.js +8 -1
  91. package/dist/esm/react-desc-prop-types.js.map +2 -2
  92. package/dist/esm/typescript-testing/slot-props.js +59 -0
  93. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  94. package/dist/esm/typescript-testing/typescript-combobox-multi-valid.js +135 -0
  95. package/dist/esm/typescript-testing/typescript-combobox-multi-valid.js.map +7 -0
  96. package/dist/esm/typescript-testing/typescript-combobox-single-valid.js +135 -0
  97. package/dist/esm/typescript-testing/typescript-combobox-single-valid.js.map +7 -0
  98. package/dist/esm/utils/listHelper.js.map +2 -2
  99. package/dist/types/DSComboboxMultiT.d.ts +3 -1
  100. package/dist/types/DSComboboxSingleT.d.ts +3 -1
  101. package/dist/types/TruncatedTooltipText.d.ts +8 -0
  102. package/dist/types/constants/index.d.ts +80 -2
  103. package/dist/types/parts/Section.d.ts +4 -4
  104. package/dist/types/parts/menu-list/styled.d.ts +2 -0
  105. package/dist/types/parts/menu-list/useItemRenderer.d.ts +2 -1
  106. package/dist/types/parts/multi-selected-values-container/RemovableSelectedValuePill.d.ts +1 -1
  107. package/dist/types/react-desc-prop-types.d.ts +28 -0
  108. package/dist/types/tests/DSCombobox.read-only.test.d.ts +1 -0
  109. package/dist/types/tests/DSCombobox.single-select.test.d.ts +1 -0
  110. package/dist/types/tests/DSCombobox.usemask.test.d.ts +1 -0
  111. package/dist/types/typescript-testing/slot-props.d.ts +1 -0
  112. package/dist/types/typescript-testing/typescript-combobox-multi-valid.d.ts +1 -0
  113. package/dist/types/typescript-testing/typescript-combobox-single-valid.d.ts +1 -0
  114. package/dist/types/utils/listHelper.d.ts +1 -1
  115. package/package.json +15 -16
  116. /package/dist/types/tests/{a11y.test.d.ts → DSCombobox.a11y.test.d.ts} +0 -0
  117. /package/dist/types/tests/{creatable.test.d.ts → DSCombobox.api.test.d.ts} +0 -0
  118. /package/dist/types/tests/{disabled.test.d.ts → DSCombobox.creatable.test.d.ts} +0 -0
  119. /package/dist/types/tests/{force-focus-first-option-on-type.test.d.ts → DSCombobox.data-testid.test.d.ts} +0 -0
  120. /package/dist/types/tests/{general.test.d.ts → DSCombobox.disabled.test.d.ts} +0 -0
  121. /package/dist/types/tests/{multi-select.test.d.ts → DSCombobox.events.test.d.ts} +0 -0
  122. /package/dist/types/tests/{onlyselectable.test.d.ts → DSCombobox.force-focus-first-option-on-type.test.d.ts} +0 -0
  123. /package/dist/types/tests/{read-only.test.d.ts → DSCombobox.keyboard.test.d.ts} +0 -0
  124. /package/dist/types/tests/{single-select.test.d.ts → DSCombobox.multi-select.test.d.ts} +0 -0
  125. /package/dist/types/tests/{usemask.test.d.ts → DSCombobox.onlyselectable.test.d.ts} +0 -0
@@ -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,
@@ -74,7 +62,7 @@ const ItemRenderer = ({ index, extraItemProps }) => {
74
62
  );
75
63
  const option = extraItemProps?.itemList?.[index];
76
64
  const multiple = Array.isArray(selectedValues);
77
- const CBItem = multiple ? StyledMultiMenuItem : StyledSingleMenuItem;
65
+ const CBItem = multiple ? import_styled.StyledMultiMenuItem : import_styled.StyledSingleMenuItem;
78
66
  const handleOnCreateClick = (0, import_react.useCallback)(() => {
79
67
  if (inputValue && onCreate) {
80
68
  onCreate(inputValue);
@@ -92,7 +80,11 @@ const ItemRenderer = ({ index, extraItemProps }) => {
92
80
  if (!multiple) {
93
81
  setMenuState(false, "selectOption", e);
94
82
  }
95
- onChange((0, import_listHelper.getSuggestedValueOnChange)(currentOption, selectedValues, isNonClearable), currentOption, e);
83
+ onChange(
84
+ (0, import_listHelper.getSuggestedValueOnChange)(currentOption, selectedValues, isNonClearable),
85
+ currentOption,
86
+ e
87
+ );
96
88
  }
97
89
  }
98
90
  e.stopPropagation();
@@ -113,7 +105,7 @@ const ItemRenderer = ({ index, extraItemProps }) => {
113
105
  dsId: dsId.toString(),
114
106
  ...rest
115
107
  };
116
- if (type === import_constants.MENU_OPTION_TYPES.SECTION) {
108
+ if (option.type === import_constants.MENU_OPTION_TYPES.SECTION) {
117
109
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
118
110
  import_Section.Section,
119
111
  {
@@ -133,34 +125,31 @@ const ItemRenderer = ({ index, extraItemProps }) => {
133
125
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items.Separator, { ...generalProps, render: void 0 });
134
126
  }
135
127
  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
- )
128
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
+ CBItem,
130
+ {
131
+ ...generalProps,
132
+ value: option.value,
133
+ label: option.label,
134
+ dataTestid: import_ComboboxDataTestids.ComboboxDataTestid.OPTION,
135
+ disabled,
136
+ applyAriaDisabled: applyAriaDisabled || itemReadOnly,
137
+ onClick: (e) => {
138
+ if (applyAriaDisabled) return;
139
+ handleClick(option, e);
140
+ },
141
+ onMouseDown: handleOnMouseDown,
142
+ isActive: dsId === focusOptionIdx,
143
+ tabIndex: -1,
144
+ isSelected: (0, import_listHelper.isSelected)(selectedValues, option),
145
+ getOwnerProps,
146
+ getOwnerPropsArguments
147
+ }
159
148
  );
160
149
  }
161
150
  if (type === import_constants.INTERNAL_MENU_OPTION_TYPES.CREATABLE) {
162
151
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
163
- StyledSingleMenuItem,
152
+ import_styled.StyledSingleMenuItem,
164
153
  {
165
154
  getOwnerProps,
166
155
  getOwnerPropsArguments,
@@ -168,8 +157,8 @@ const ItemRenderer = ({ index, extraItemProps }) => {
168
157
  isActive: dsId === focusOptionIdx,
169
158
  ...generalProps,
170
159
  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}"` })
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCreatableLabel, { getOwnerProps, children: "Add:" }),
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCreatableValue, { getOwnerProps, children: `"${labelCreatable}"` })
173
162
  ] }),
174
163
  label: option.label,
175
164
  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": 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8CAAmB;AAAA,cAC/B;AAAA,cACA,mBAAmB,qBAAqB;AAAA,cACxC,SAAS,CAAC,MAAwB;AAChC,oBAAI,kBAAmB;AACvB,4BAAY,QAAQ,CAAC;AAAA,cACvB;AAAA,cACA,aAAa;AAAA,cACb,UAAU,SAAS;AAAA,cACnB,UAAU;AAAA,cACV,gBAAY,8BAAW,gBAAgB,MAAM;AAAA,cAC7C;AAAA,cACA;AAAA;AAAA,UACF;AAAA;AAAA,MAEJ;AACA,UAAI,SAAS,4CAA2B,WAAW;AACjD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,YAAY,8CAAmB;AAAA,YAC/B,UAAU,SAAS;AAAA,YAClB,GAAG;AAAA,YACJ,QAAQ,CAAC,EAAE,OAAO,eAAe,MAC/B,6CAAC,uBAAK,GAAE,OAAM,MAAM,CAAC,eAAe,MAAM,GAAG,QAAO,OAAM,YAAW,UACnE;AAAA,0DAAC,sCAAqB,kBAAI;AAAA,cAC1B,4CAAC,sCAAsB,cAAI,cAAc,KAAI;AAAA,eAC/C;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": ["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 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 setInputValue('');\n if (onFilter) onFilter(allOptions, inputValue);\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);\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 p=\"8px\" cols={['min-content', 'auto']} gutter=\"xxs\" alignItems=\"center\">\n <StyledCreatableLabel getOwnerProps={getOwnerProps}>Add:</StyledCreatableLabel>\n <StyledCreatableValue getOwnerProps={getOwnerProps}>{`\"${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;ADiGb;AA9FV,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,EACF,QAAI,yBAAW,kCAAe;AAE9B,QAAM,EAAE,cAAc,QAAI,uCAAc,KAAK;AAC7C,QAAM,6BAAyB;AAAA,IAC7B,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,CAAC,KAAK;AAAA,EACR;AAEA,QAAM,SAAS,gBAAgB,WAAW,KAAK;AAE/C,QAAM,WAAW,MAAM,QAAQ,cAAc;AAC7C,QAAM,SAAiF,WACnF,oCACA;AAEJ,QAAM,0BAAsB,0BAAY,MAAM;AAC5C,QAAI,cAAc,UAAU;AAC1B,eAAS,UAAU;AACnB,oBAAc,EAAE;AAChB,UAAI,SAAU,UAAS,YAAY,UAAU;AAAA,IAC/C;AAAA,EACF,GAAG,CAAC,UAAU,UAAU,YAAY,YAAY,aAAa,CAAC;AAE9D,QAAM,kBAAc;AAAA,IAClB,CAAC,eAAwC,MAAwB;AAC/D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AY,8CAAmB;AAAA,YAC/B;AAAA,YACA,mBAAmB,qBAAqB;AAAA,YACxC,SAAS,CAAC,MAAwB;AAChC,kBAAI,kBAAmB;AACvB,0BAAY,QAAQ,CAAC;AAAA,YACvB;AAAA,YACA,aAAa;AAAA,YACb,UAAU,SAAS;AAAA,YACnB,UAAU;AAAA,YACV,gBAAY,8BAAW,gBAAgB,MAAM;AAAA,YAC7C;AAAA,YACA;AAAA;AAAA,QACF;AAAA,MAEJ;AACA,UAAI,SAAS,4CAA2B,WAAW;AACjD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,YAAY,8CAAmB;AAAA,YAC/B,UAAU,SAAS;AAAA,YAClB,GAAG;AAAA,YACJ,QAAQ,CAAC,EAAE,OAAO,eAAe,MAC/B,6CAAC,uBAAK,GAAE,OAAM,MAAM,CAAC,eAAe,MAAM,GAAG,QAAO,OAAM,YAAW,UACnE;AAAA,0DAAC,sCAAqB,eAA8B,kBAAI;AAAA,cACxD,4CAAC,sCAAqB,eAA+B,cAAI,cAAc,KAAI;AAAA,eAC7E;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
  }
@@ -76,7 +76,11 @@ const RemovableSelectedValuePill = (props) => {
76
76
  onRemove: (e) => {
77
77
  if (readOnly) return;
78
78
  e.stopPropagation();
79
- onChange((0, import_listHelper.getSuggestedValueOnChange)(pill, selectedValues), pill, e);
79
+ onChange(
80
+ (0, import_listHelper.getSuggestedValueOnChange)(pill, selectedValues),
81
+ pill,
82
+ e
83
+ );
80
84
  internalRef.current?.focus();
81
85
  },
82
86
  ...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 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,MACd,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,IArBC,KAAK;AAAA,EAsBZ;AAEJ;",
6
6
  "names": ["ComboBoxContext", "React"]
7
7
  }
@@ -62,7 +62,10 @@ const StyledDSPillV2 = (0, import_ds_system.styled)(import_ds_pills_v2.DSPillV2,
62
62
 
63
63
  color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => disabled || applyAriaDisabled || readOnly ? "#616b7f" : theme.colors.brand["800"]};
64
64
  `;
65
- const StyledDSPillGroupV2 = (0, import_ds_system.styled)(import_ds_pills_v2.DSPillGroupV2)`
65
+ const StyledDSPillGroupV2 = (0, import_ds_system.styled)(import_ds_pills_v2.DSPillGroupV2, {
66
+ name: import_constants.DSFormComboboxName,
67
+ slot: import_constants.FORM_COMBOBOX_SLOTS.PILL_GROUP
68
+ })`
66
69
  display: grid;
67
70
  `;
68
71
  //# 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 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\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,MACvD,YAAY,qBAAqB,WAAW,YAAY,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA;AAU9E,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 = 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 ...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;AAsFjD,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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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
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = __toESM(require("react"));
27
+ var import__ = require("../index.js");
28
+ const noop = (..._args) => {
29
+ };
30
+ const inputRef = import_react.default.createRef();
31
+ const testRequiredProps = {
32
+ allOptions: [],
33
+ selectedValues: [],
34
+ onChange: noop
35
+ };
36
+ const testOptionalProps = {
37
+ placeholder: "Select options",
38
+ autoFocus: false,
39
+ filteredOptions: [],
40
+ isMenuOpen: false,
41
+ onMenuChange: noop,
42
+ onCreate: noop,
43
+ onFilter: noop,
44
+ onCancel: noop,
45
+ onSelectAll: noop,
46
+ onKeyDown: noop,
47
+ isLoading: false,
48
+ menuMinWidth: 200
49
+ // popperProps omitted — DSFloatingWrapperT.Props requires children/innerRef/isOpen/floatingStyles
50
+ };
51
+ const testPartialDefaults = {
52
+ hasError: false,
53
+ inline: false,
54
+ disabled: false,
55
+ applyAriaDisabled: false,
56
+ readOnly: false,
57
+ isNonClearable: false,
58
+ onlySelectable: false
59
+ };
60
+ const testCompleteDefaults = {
61
+ startPlacementPreference: "bottom-start",
62
+ placementOrderPreference: ["bottom-start", "top-start"],
63
+ hasError: false,
64
+ inline: false,
65
+ withoutPortal: false,
66
+ isNonClearable: false,
67
+ disabled: false,
68
+ noOptionsMessage: "No Matches Found",
69
+ innerRef: inputRef,
70
+ useMask: noop,
71
+ onlySelectable: false,
72
+ isSkeleton: false,
73
+ applyAriaDisabled: false,
74
+ readOnly: false,
75
+ isMenuOpenableWithReadOnly: false,
76
+ forceFocusFirstOptionOnType: false,
77
+ menuMaxHeight: 300
78
+ };
79
+ const testInternalProps = {
80
+ ...testRequiredProps,
81
+ ...testCompleteDefaults
82
+ };
83
+ const testInternalPropsAsSyntax = {
84
+ ...testRequiredProps,
85
+ ...testCompleteDefaults
86
+ };
87
+ const testProps = {
88
+ allOptions: [],
89
+ selectedValues: [],
90
+ onChange: noop,
91
+ ...testOptionalProps,
92
+ ...testPartialDefaults
93
+ };
94
+ const testPropsAsSyntax = {
95
+ allOptions: [],
96
+ selectedValues: [],
97
+ onChange: noop,
98
+ ...testOptionalProps,
99
+ ...testPartialDefaults
100
+ };
101
+ const testExplicitDefinition = {
102
+ allOptions: [],
103
+ selectedValues: [],
104
+ onChange: noop,
105
+ placeholder: "Select options",
106
+ autoFocus: false,
107
+ hasError: false,
108
+ inline: false,
109
+ disabled: false,
110
+ applyAriaDisabled: false,
111
+ readOnly: false,
112
+ isNonClearable: false,
113
+ onlySelectable: false,
114
+ noOptionsMessage: "No Matches Found",
115
+ withoutPortal: false,
116
+ isSkeleton: false,
117
+ isMenuOpenableWithReadOnly: false,
118
+ forceFocusFirstOptionOnType: false,
119
+ menuMaxHeight: 300,
120
+ innerRef: inputRef,
121
+ useMask: noop,
122
+ startPlacementPreference: "bottom-start",
123
+ placementOrderPreference: ["bottom-start", "top-start"],
124
+ menuMinWidth: 200,
125
+ isLoading: false,
126
+ onFilter: noop,
127
+ onCancel: noop
128
+ };
129
+ const testInferredTypeCompatibility = {
130
+ allOptions: [],
131
+ selectedValues: [],
132
+ onChange: noop,
133
+ hasError: false,
134
+ disabled: false,
135
+ placeholder: "Select options",
136
+ menuMaxHeight: 300
137
+ };
138
+ const ExampleUsageMulti = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSComboBox, { allOptions: [], selectedValues: [], onChange: noop }),
140
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
141
+ import__.DSComboBox,
142
+ {
143
+ allOptions: [],
144
+ selectedValues: [],
145
+ onChange: noop,
146
+ placeholder: "Select options",
147
+ hasError: false,
148
+ disabled: false,
149
+ applyAriaDisabled: false,
150
+ readOnly: false,
151
+ isNonClearable: false,
152
+ onlySelectable: false,
153
+ noOptionsMessage: "No Matches Found"
154
+ }
155
+ ),
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSComboBox, { allOptions: [], selectedValues: [], onChange: noop, ...testOptionalProps, ...testPartialDefaults })
157
+ ] });
158
+ //# sourceMappingURL=typescript-combobox-multi-valid.js.map