@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
@@ -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": "AAAA,YAAY,WAAW;ACOvB,MAAM,iBAA6C;AAAA,EACjD,gBAAgB,EAAE,cAAc,yBAAyB;AAAA,EACzD,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,iBAAiB,EAAE,cAAc,yBAAyB;AAAA,EAC1D,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,oBAAoB,EAAE,cAAc,yBAAyB;AAAA,EAC7D,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,yBAAyB,EAAE,cAAc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OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChE,qBAAqB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,qBAAqB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrE,8BAA8B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9E,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,kCAAkC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClF,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC7E,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,qBAAqB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrE,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAC5E;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,135 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import React2 from "react";
4
+ import { DSComboBox } from "../index.js";
5
+ const noop = (..._args) => {
6
+ };
7
+ const inputRef = React2.createRef();
8
+ const testRequiredProps = {
9
+ allOptions: [],
10
+ selectedValues: [],
11
+ onChange: noop
12
+ };
13
+ const testOptionalProps = {
14
+ placeholder: "Select options",
15
+ autoFocus: false,
16
+ filteredOptions: [],
17
+ isMenuOpen: false,
18
+ onMenuChange: noop,
19
+ onCreate: noop,
20
+ onFilter: noop,
21
+ onCancel: noop,
22
+ onSelectAll: noop,
23
+ onKeyDown: noop,
24
+ isLoading: false,
25
+ menuMinWidth: 200
26
+ // popperProps omitted — DSFloatingWrapperT.Props requires children/innerRef/isOpen/floatingStyles
27
+ };
28
+ const testPartialDefaults = {
29
+ hasError: false,
30
+ inline: false,
31
+ disabled: false,
32
+ applyAriaDisabled: false,
33
+ readOnly: false,
34
+ isNonClearable: false,
35
+ onlySelectable: false
36
+ };
37
+ const testCompleteDefaults = {
38
+ startPlacementPreference: "bottom-start",
39
+ placementOrderPreference: ["bottom-start", "top-start"],
40
+ hasError: false,
41
+ inline: false,
42
+ withoutPortal: false,
43
+ isNonClearable: false,
44
+ disabled: false,
45
+ noOptionsMessage: "No Matches Found",
46
+ innerRef: inputRef,
47
+ useMask: noop,
48
+ onlySelectable: false,
49
+ isSkeleton: false,
50
+ applyAriaDisabled: false,
51
+ readOnly: false,
52
+ isMenuOpenableWithReadOnly: false,
53
+ forceFocusFirstOptionOnType: false,
54
+ menuMaxHeight: 300
55
+ };
56
+ const testInternalProps = {
57
+ ...testRequiredProps,
58
+ ...testCompleteDefaults
59
+ };
60
+ const testInternalPropsAsSyntax = {
61
+ ...testRequiredProps,
62
+ ...testCompleteDefaults
63
+ };
64
+ const testProps = {
65
+ allOptions: [],
66
+ selectedValues: [],
67
+ onChange: noop,
68
+ ...testOptionalProps,
69
+ ...testPartialDefaults
70
+ };
71
+ const testPropsAsSyntax = {
72
+ allOptions: [],
73
+ selectedValues: [],
74
+ onChange: noop,
75
+ ...testOptionalProps,
76
+ ...testPartialDefaults
77
+ };
78
+ const testExplicitDefinition = {
79
+ allOptions: [],
80
+ selectedValues: [],
81
+ onChange: noop,
82
+ placeholder: "Select options",
83
+ autoFocus: false,
84
+ hasError: false,
85
+ inline: false,
86
+ disabled: false,
87
+ applyAriaDisabled: false,
88
+ readOnly: false,
89
+ isNonClearable: false,
90
+ onlySelectable: false,
91
+ noOptionsMessage: "No Matches Found",
92
+ withoutPortal: false,
93
+ isSkeleton: false,
94
+ isMenuOpenableWithReadOnly: false,
95
+ forceFocusFirstOptionOnType: false,
96
+ menuMaxHeight: 300,
97
+ innerRef: inputRef,
98
+ useMask: noop,
99
+ startPlacementPreference: "bottom-start",
100
+ placementOrderPreference: ["bottom-start", "top-start"],
101
+ menuMinWidth: 200,
102
+ isLoading: false,
103
+ onFilter: noop,
104
+ onCancel: noop
105
+ };
106
+ const testInferredTypeCompatibility = {
107
+ allOptions: [],
108
+ selectedValues: [],
109
+ onChange: noop,
110
+ hasError: false,
111
+ disabled: false,
112
+ placeholder: "Select options",
113
+ menuMaxHeight: 300
114
+ };
115
+ const ExampleUsageMulti = () => /* @__PURE__ */ jsxs(Fragment, { children: [
116
+ /* @__PURE__ */ jsx(DSComboBox, { allOptions: [], selectedValues: [], onChange: noop }),
117
+ /* @__PURE__ */ jsx(
118
+ DSComboBox,
119
+ {
120
+ allOptions: [],
121
+ selectedValues: [],
122
+ onChange: noop,
123
+ placeholder: "Select options",
124
+ hasError: false,
125
+ disabled: false,
126
+ applyAriaDisabled: false,
127
+ readOnly: false,
128
+ isNonClearable: false,
129
+ onlySelectable: false,
130
+ noOptionsMessage: "No Matches Found"
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx(DSComboBox, { allOptions: [], selectedValues: [], onChange: noop, ...testOptionalProps, ...testPartialDefaults })
134
+ ] });
135
+ //# sourceMappingURL=typescript-combobox-multi-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-combobox-multi-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\nimport { DSComboBox } from '../index.js';\nimport type { DSComboboxMultiT } from '../index.js';\n\n// Verify namespace exports are correctly shaped\ntype ComponentProps = DSComboboxMultiT.Props;\ntype ComponentInternalProps = DSComboboxMultiT.InternalProps;\ntype ComponentDefaultProps = DSComboboxMultiT.DefaultProps;\ntype ComponentOptionalProps = DSComboboxMultiT.OptionalProps;\ntype ComponentRequiredProps = DSComboboxMultiT.RequiredProps;\n\nconst noop = (..._args: unknown[]): void => {};\nconst inputRef = React.createRef() as React.MutableRefObject<HTMLInputElement | null>;\n\n// \u2500\u2500\u2500 Required props \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testRequiredProps: ComponentRequiredProps = {\n allOptions: [],\n selectedValues: [],\n onChange: noop,\n};\n\n// \u2500\u2500\u2500 Optional props \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testOptionalProps: ComponentOptionalProps = {\n placeholder: 'Select options',\n autoFocus: false,\n filteredOptions: [],\n isMenuOpen: false,\n onMenuChange: noop,\n onCreate: noop,\n onFilter: noop,\n onCancel: noop,\n onSelectAll: noop,\n onKeyDown: noop,\n isLoading: false,\n menuMinWidth: 200,\n // popperProps omitted \u2014 DSFloatingWrapperT.Props requires children/innerRef/isOpen/floatingStyles\n};\n\n// \u2500\u2500\u2500 Partial defaults (consumer usage simulation) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testPartialDefaults: Partial<ComponentDefaultProps> = {\n hasError: false,\n inline: false,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n isNonClearable: false,\n onlySelectable: false,\n};\n\n// \u2500\u2500\u2500 Complete defaults (all defaults required) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testCompleteDefaults: Required<ComponentDefaultProps> = {\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start'],\n hasError: false,\n inline: false,\n withoutPortal: false,\n isNonClearable: false,\n disabled: false,\n noOptionsMessage: 'No Matches Found',\n innerRef: inputRef,\n useMask: noop,\n onlySelectable: false,\n isSkeleton: false,\n applyAriaDisabled: false,\n readOnly: false,\n isMenuOpenableWithReadOnly: false,\n forceFocusFirstOptionOnType: false,\n menuMaxHeight: 300,\n};\n\n// \u2500\u2500\u2500 Internal props (all defaults filled in) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testInternalProps: ComponentInternalProps = {\n ...testRequiredProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testCompleteDefaults,\n} as ComponentInternalProps;\n\n// \u2500\u2500\u2500 Public Props (defaults optional) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testProps: ComponentProps = {\n allOptions: [],\n selectedValues: [],\n onChange: noop,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n allOptions: [],\n selectedValues: [],\n onChange: noop,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentProps;\n\n// \u2500\u2500\u2500 Explicit full definition (error pinpoints the wrong key) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testExplicitDefinition: ComponentProps = {\n allOptions: [],\n selectedValues: [],\n onChange: noop,\n placeholder: 'Select options',\n autoFocus: false,\n hasError: false,\n inline: false,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n isNonClearable: false,\n onlySelectable: false,\n noOptionsMessage: 'No Matches Found',\n withoutPortal: false,\n isSkeleton: false,\n isMenuOpenableWithReadOnly: false,\n forceFocusFirstOptionOnType: false,\n menuMaxHeight: 300,\n innerRef: inputRef,\n useMask: noop,\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start'],\n menuMinWidth: 200,\n isLoading: false,\n onFilter: noop,\n onCancel: noop,\n};\n\n// \u2500\u2500\u2500 As-syntax (error marks whole object) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testInferredTypeCompatibility = {\n allOptions: [],\n selectedValues: [],\n onChange: noop,\n hasError: false,\n disabled: false,\n placeholder: 'Select options',\n menuMaxHeight: 300,\n} as ComponentProps;\n\n// \u2500\u2500\u2500 JSX usage \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst ExampleUsageMulti = () => (\n <>\n {/* minimum required props */}\n <DSComboBox allOptions={[]} selectedValues={[]} onChange={noop} />\n {/* with optional props */}\n <DSComboBox\n allOptions={[]}\n selectedValues={[]}\n onChange={noop}\n placeholder=\"Select options\"\n hasError={false}\n disabled={false}\n applyAriaDisabled={false}\n readOnly={false}\n isNonClearable={false}\n onlySelectable={false}\n noOptionsMessage=\"No Matches Found\"\n />\n {/* with spread optional + partial defaults */}\n <DSComboBox allOptions={[]} selectedValues={[]} onChange={noop} {...testOptionalProps} {...testPartialDefaults} />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8IrB,mBAEE,KAFF;AA7IF,OAAOA,YAAW;AAClB,SAAS,kBAAkB;AAU3B,MAAM,OAAO,IAAI,UAA2B;AAAC;AAC7C,MAAM,WAAWA,OAAM,UAAU;AAGjC,MAAM,oBAA4C;AAAA,EAChD,YAAY,CAAC;AAAA,EACb,gBAAgB,CAAC;AAAA,EACjB,UAAU;AACZ;AAGA,MAAM,oBAA4C;AAAA,EAChD,aAAa;AAAA,EACb,WAAW;AAAA,EACX,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AAAA,EACX,WAAW;AAAA,EACX,cAAc;AAAA;AAEhB;AAGA,MAAM,sBAAsD;AAAA,EAC1D,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAClB;AAGA,MAAM,uBAAwD;AAAA,EA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A,EACV,UAAU;AACZ;AAGA,MAAM,gCAAgC;AAAA,EACpC,YAAY,CAAC;AAAA,EACb,gBAAgB,CAAC;AAAA,EACjB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AACjB;AAGA,MAAM,oBAAoB,MACxB,iCAEE;AAAA,sBAAC,cAAW,YAAY,CAAC,GAAG,gBAAgB,CAAC,GAAG,UAAU,MAAM;AAAA,EAEhE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY,CAAC;AAAA,MACb,gBAAgB,CAAC;AAAA,MACjB,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,UAAU;AAAA,MACV,mBAAmB;AAAA,MACnB,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,kBAAiB;AAAA;AAAA,EACnB;AAAA,EAEA,oBAAC,cAAW,YAAY,CAAC,GAAG,gBAAgB,CAAC,GAAG,UAAU,MAAO,GAAG,mBAAoB,GAAG,qBAAqB;AAAA,GAClH;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,135 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import React2 from "react";
4
+ import { DSComboBox } from "../index.js";
5
+ const noop = (..._args) => {
6
+ };
7
+ const inputRef = React2.createRef();
8
+ const testRequiredProps = {
9
+ allOptions: [],
10
+ selectedValue: null,
11
+ onChange: noop
12
+ };
13
+ const testOptionalProps = {
14
+ placeholder: "Select an option",
15
+ autoFocus: false,
16
+ filteredOptions: [],
17
+ isMenuOpen: false,
18
+ onMenuChange: noop,
19
+ onCreate: noop,
20
+ onFilter: noop,
21
+ onCancel: noop,
22
+ onSelectAll: noop,
23
+ onKeyDown: noop,
24
+ isLoading: false,
25
+ menuMinWidth: 200
26
+ // popperProps omitted — DSFloatingWrapperT.Props requires children/innerRef/isOpen/floatingStyles
27
+ };
28
+ const testPartialDefaults = {
29
+ hasError: false,
30
+ inline: false,
31
+ disabled: false,
32
+ applyAriaDisabled: false,
33
+ readOnly: false,
34
+ isNonClearable: false,
35
+ onlySelectable: false
36
+ };
37
+ const testCompleteDefaults = {
38
+ startPlacementPreference: "bottom-start",
39
+ placementOrderPreference: ["bottom-start", "top-start"],
40
+ hasError: false,
41
+ inline: false,
42
+ withoutPortal: false,
43
+ isNonClearable: false,
44
+ disabled: false,
45
+ noOptionsMessage: "No Matches Found",
46
+ innerRef: inputRef,
47
+ useMask: noop,
48
+ onlySelectable: false,
49
+ isSkeleton: false,
50
+ applyAriaDisabled: false,
51
+ readOnly: false,
52
+ isMenuOpenableWithReadOnly: false,
53
+ forceFocusFirstOptionOnType: false,
54
+ menuMaxHeight: 300
55
+ };
56
+ const testInternalProps = {
57
+ ...testRequiredProps,
58
+ ...testCompleteDefaults
59
+ };
60
+ const testInternalPropsAsSyntax = {
61
+ ...testRequiredProps,
62
+ ...testCompleteDefaults
63
+ };
64
+ const testProps = {
65
+ allOptions: [],
66
+ selectedValue: null,
67
+ onChange: noop,
68
+ ...testOptionalProps,
69
+ ...testPartialDefaults
70
+ };
71
+ const testPropsAsSyntax = {
72
+ allOptions: [],
73
+ selectedValue: null,
74
+ onChange: noop,
75
+ ...testOptionalProps,
76
+ ...testPartialDefaults
77
+ };
78
+ const testExplicitDefinition = {
79
+ allOptions: [],
80
+ selectedValue: null,
81
+ onChange: noop,
82
+ placeholder: "Select an option",
83
+ autoFocus: false,
84
+ hasError: false,
85
+ inline: false,
86
+ disabled: false,
87
+ applyAriaDisabled: false,
88
+ readOnly: false,
89
+ isNonClearable: false,
90
+ onlySelectable: false,
91
+ noOptionsMessage: "No Matches Found",
92
+ withoutPortal: false,
93
+ isSkeleton: false,
94
+ isMenuOpenableWithReadOnly: false,
95
+ forceFocusFirstOptionOnType: false,
96
+ menuMaxHeight: 300,
97
+ innerRef: inputRef,
98
+ useMask: noop,
99
+ startPlacementPreference: "bottom-start",
100
+ placementOrderPreference: ["bottom-start", "top-start"],
101
+ menuMinWidth: 200,
102
+ isLoading: false,
103
+ onFilter: noop,
104
+ onCancel: noop
105
+ };
106
+ const testInferredTypeCompatibility = {
107
+ allOptions: [],
108
+ selectedValue: null,
109
+ onChange: noop,
110
+ hasError: false,
111
+ disabled: false,
112
+ placeholder: "Select an option",
113
+ menuMaxHeight: 300
114
+ };
115
+ const ExampleUsageSingle = () => /* @__PURE__ */ jsxs(Fragment, { children: [
116
+ /* @__PURE__ */ jsx(DSComboBox, { allOptions: [], selectedValues: null, onChange: noop }),
117
+ /* @__PURE__ */ jsx(
118
+ DSComboBox,
119
+ {
120
+ allOptions: [],
121
+ selectedValues: null,
122
+ onChange: noop,
123
+ placeholder: "Select...",
124
+ hasError: false,
125
+ disabled: false,
126
+ applyAriaDisabled: false,
127
+ readOnly: false,
128
+ isNonClearable: false,
129
+ onlySelectable: false,
130
+ noOptionsMessage: "No Matches Found"
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx(DSComboBox, { allOptions: [], selectedValues: null, onChange: noop, ...testOptionalProps, ...testPartialDefaults })
134
+ ] });
135
+ //# sourceMappingURL=typescript-combobox-single-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-combobox-single-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\nimport { DSComboBox } from '../index.js';\nimport type { DSComboboxSingleT } from '../index.js';\n\n// Verify namespace exports are correctly shaped\ntype ComponentProps = DSComboboxSingleT.Props;\ntype ComponentInternalProps = DSComboboxSingleT.InternalProps;\ntype ComponentDefaultProps = DSComboboxSingleT.DefaultProps;\ntype ComponentOptionalProps = DSComboboxSingleT.OptionalProps;\ntype ComponentRequiredProps = DSComboboxSingleT.RequiredProps;\n\nconst noop = (..._args: unknown[]): void => {};\nconst inputRef = React.createRef() as React.MutableRefObject<HTMLInputElement | null>;\n\n// \u2500\u2500\u2500 Required props \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testRequiredProps: ComponentRequiredProps = {\n allOptions: [],\n selectedValue: null,\n onChange: noop,\n};\n\n// \u2500\u2500\u2500 Optional props \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testOptionalProps: ComponentOptionalProps = {\n placeholder: 'Select an option',\n autoFocus: false,\n filteredOptions: [],\n isMenuOpen: false,\n onMenuChange: noop,\n onCreate: noop,\n onFilter: noop,\n onCancel: noop,\n onSelectAll: noop,\n onKeyDown: noop,\n isLoading: false,\n menuMinWidth: 200,\n // popperProps omitted \u2014 DSFloatingWrapperT.Props requires children/innerRef/isOpen/floatingStyles\n};\n\n// \u2500\u2500\u2500 Partial defaults (consumer usage simulation) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testPartialDefaults: Partial<ComponentDefaultProps> = {\n hasError: false,\n inline: false,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n isNonClearable: false,\n onlySelectable: false,\n};\n\n// \u2500\u2500\u2500 Complete defaults (all defaults required) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testCompleteDefaults: Required<ComponentDefaultProps> = {\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start'],\n hasError: false,\n inline: false,\n withoutPortal: false,\n isNonClearable: false,\n disabled: false,\n noOptionsMessage: 'No Matches Found',\n innerRef: inputRef,\n useMask: noop,\n onlySelectable: false,\n isSkeleton: false,\n applyAriaDisabled: false,\n readOnly: false,\n isMenuOpenableWithReadOnly: false,\n forceFocusFirstOptionOnType: false,\n menuMaxHeight: 300,\n};\n\n// \u2500\u2500\u2500 Internal props (all defaults filled in) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testInternalProps: ComponentInternalProps = {\n ...testRequiredProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testCompleteDefaults,\n} as ComponentInternalProps;\n\n// \u2500\u2500\u2500 Public Props (defaults optional) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testProps: ComponentProps = {\n allOptions: [],\n selectedValue: null,\n onChange: noop,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n allOptions: [],\n selectedValue: null,\n onChange: noop,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentProps;\n\n// \u2500\u2500\u2500 Explicit full definition (error pinpoints the wrong key) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testExplicitDefinition: ComponentProps = {\n allOptions: [],\n selectedValue: null,\n onChange: noop,\n placeholder: 'Select an option',\n autoFocus: false,\n hasError: false,\n inline: false,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n isNonClearable: false,\n onlySelectable: false,\n noOptionsMessage: 'No Matches Found',\n withoutPortal: false,\n isSkeleton: false,\n isMenuOpenableWithReadOnly: false,\n forceFocusFirstOptionOnType: false,\n menuMaxHeight: 300,\n innerRef: inputRef,\n useMask: noop,\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start'],\n menuMinWidth: 200,\n isLoading: false,\n onFilter: noop,\n onCancel: noop,\n};\n\n// \u2500\u2500\u2500 As-syntax (error marks whole object) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst testInferredTypeCompatibility = {\n allOptions: [],\n selectedValue: null,\n onChange: noop,\n hasError: false,\n disabled: false,\n placeholder: 'Select an option',\n menuMaxHeight: 300,\n} as ComponentProps;\n\n// \u2500\u2500\u2500 JSX usage \u2014 DSComboBox with single-select explicit generic \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Note: DSComboBox is the underlying polymorphic component; consumers use DSSingleComboBox from\n// ds-form-single-combobox which accepts DSComboboxSingleT.Props (selectedValue).\n// Here we verify DSComboBox accepts single-select props via explicit generic.\nconst ExampleUsageSingle = () => (\n <>\n {/* minimum required props */}\n <DSComboBox allOptions={[]} selectedValues={null} onChange={noop} />\n {/* with optional props */}\n <DSComboBox\n allOptions={[]}\n selectedValues={null}\n onChange={noop}\n placeholder=\"Select...\"\n hasError={false}\n disabled={false}\n applyAriaDisabled={false}\n readOnly={false}\n isNonClearable={false}\n onlySelectable={false}\n noOptionsMessage=\"No Matches Found\"\n />\n {/* with spread testExplicitDefinition (using unified selectedValues API) */}\n <DSComboBox allOptions={[]} selectedValues={null} onChange={noop} {...testOptionalProps} {...testPartialDefaults} />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACiJrB,mBAEE,KAFF;AAhJF,OAAOA,YAAW;AAClB,SAAS,kBAAkB;AAU3B,MAAM,OAAO,IAAI,UAA2B;AAAC;AAC7C,MAAM,WAAWA,OAAM,UAAU;AAGjC,MAAM,oBAA4C;AAAA,EAChD,YAAY,CAAC;AAAA,EACb,eAAe;AAAA,EACf,UAAU;AACZ;AAGA,MAAM,oBAA4C;AAAA,EAChD,aAAa;AAAA,EACb,WAAW;AAAA,EACX,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AAAA,EACX,WAAW;AAAA,EACX,cAAc;AAAA;AAEhB;AAGA,MAAM,sBAAsD;AAAA,EAC1D,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAClB;AAGA,MAAM,uBAAwD;AAAA,EAC5D,0BAA0B;AAAA,EAC1B,0BAA0B,CAAC,gBAAgB,WAAW;AAAA,EACtD,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,kBAAkB;AAAA,E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EE;AAAA,sBAAC,cAAW,YAAY,CAAC,GAAG,gBAAgB,MAAM,UAAU,MAAM;AAAA,EAElE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY,CAAC;AAAA,MACb,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,UAAU;AAAA,MACV,mBAAmB;AAAA,MACnB,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,kBAAiB;AAAA;AAAA,EACnB;AAAA,EAEA,oBAAC,cAAW,YAAY,CAAC,GAAG,gBAAgB,MAAM,UAAU,MAAO,GAAG,mBAAoB,GAAG,qBAAqB;AAAA,GACpH;",
6
+ "names": ["React"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/listHelper.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\nimport type { DSComboboxT } from '../react-desc-prop-types.js';\nimport { MENU_OPTION_TYPES } from '../constants.js';\nexport const getSelectableOptions = (options: Array<DSComboboxT.OptionTypes>): Array<DSComboboxT.OptionTypes> =>\n options.filter((option) => option.type === MENU_OPTION_TYPES.OPTION && !option.disabled);\n\nexport const getOptions = (options: Array<DSComboboxT.OptionTypes>): Array<DSComboboxT.OptionTypes> =>\n options.filter((option) => option.type === MENU_OPTION_TYPES.OPTION);\n\nexport const isSelectedValueEmpty = (value: DSComboboxT.SelectedOptionsT): boolean =>\n Array.isArray(value) ? value.length === 0 : !value;\n\nexport const isSelectedValueMultiple = (value: DSComboboxT.SelectedOptionsT): boolean => Array.isArray(value);\n\nexport const isSelected = (value: DSComboboxT.SelectedOptionsT, activeOption: DSComboboxT.ItemOption): boolean => {\n if (isSelectedValueMultiple(value)) {\n const multiValue = value as DSComboboxT.ItemOption[];\n return multiValue.some((item) => item?.value === activeOption?.value);\n }\n const singleValue = value as DSComboboxT.ItemOption;\n return singleValue?.value === activeOption.value;\n};\n\nexport function isArrayOfItems(value: DSComboboxT.SelectedOptionsT): value is DSComboboxT.ItemOption[] {\n return Array.isArray(value) && value.length > 0;\n}\n\nexport const isItem = (value: DSComboboxT.SelectedOptionsT): value is DSComboboxT.ItemOption =>\n !Array.isArray(value) && value !== null && typeof value === 'object';\n\nexport const findInCircularList = (\n list: DSComboboxT.OptionTypes[],\n from: number,\n criteria: (item: DSComboboxT.OptionTypes) => boolean,\n step = 1,\n): number => {\n if (list.length === 0) return from;\n\n let i = (from + step + list.length) % list.length;\n let iterations = 0;\n\n while (iterations < list.length) {\n if (criteria(list[i])) return i;\n\n i = (i + step + list.length) % list.length;\n iterations += 1;\n }\n\n return from; // Return the original index if no match is found\n};\nexport const getLastValueSelected = (selectedValues: DSComboboxT.SelectedOptionsT) => {\n if (Array.isArray(selectedValues)) {\n return selectedValues[selectedValues.length - 1];\n }\n return selectedValues;\n};\n\nexport const getFirstOption = (\n options: DSComboboxT.OptionTypes[],\n selectedValues?: DSComboboxT.SelectedOptionsT,\n): string => {\n if (selectedValues) {\n const lastValue = getLastValueSelected(selectedValues);\n if (lastValue) return lastValue.dsId;\n }\n for (let i = 0; i < options.length; i += 1)\n if (!['section', 'separator'].includes(options[i].type) && !options[i].disabled) {\n return options[i].dsId;\n }\n // list of disabled item results return ''\n return '';\n};\n\nexport const getSuggestedValueOnChange = (\n selectedOption: DSComboboxT.ItemOption,\n selectedValues: DSComboboxT.SelectedOptionsT,\n isNonClearable?: boolean,\n): Parameters<DSComboboxT.InternalProps['onChange']>[0] => {\n if (Array.isArray(selectedValues)) {\n const isFound = selectedValues.find((item) => item.type === 'option' && item.value === selectedOption.value);\n if (isFound) {\n if (isNonClearable) return selectedValues;\n return selectedValues.filter((item) => item.type === 'option' && item.value !== selectedOption.value);\n }\n return [...selectedValues, selectedOption];\n }\n if (selectedValues && selectedValues.dsId === selectedOption.dsId) {\n if (isNonClearable) return selectedOption;\n return null;\n }\n return selectedOption;\n};\n\nexport const filterOptions = (inputValue: string, options: DSComboboxT.OptionTypes[]) => {\n if (!inputValue) return options;\n return options.filter(\n (option) =>\n option.type === MENU_OPTION_TYPES.OPTION && option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n};\n\nexport const getFilteredOptionsSelected = (\n filteredOption: DSComboboxT.OptionTypes[],\n selectedValues: DSComboboxT.ItemOption[],\n) => filteredOption.filter((option) => option.type === MENU_OPTION_TYPES.OPTION && isSelected(selectedValues, option));\n\nexport const scrollIfNeeded = (\n elem: HTMLElement,\n options = { behavior: 'smooth', block: 'end', inline: 'nearest' } as ScrollIntoViewOptions | undefined,\n) => {\n const bounding = elem.getBoundingClientRect();\n if (\n !(\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\n )\n )\n elem.scrollIntoView(options);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,yBAAyB;AAC3B,MAAM,uBAAuB,CAAC,YACnC,QAAQ,OAAO,CAAC,WAAW,OAAO,SAAS,kBAAkB,UAAU,CAAC,OAAO,QAAQ;AAElF,MAAM,aAAa,CAAC,YACzB,QAAQ,OAAO,CAAC,WAAW,OAAO,SAAS,kBAAkB,MAAM;AAE9D,MAAM,uBAAuB,CAAC,UACnC,MAAM,QAAQ,KAAK,IAAI,MAAM,WAAW,IAAI,CAAC;AAExC,MAAM,0BAA0B,CAAC,UAAiD,MAAM,QAAQ,KAAK;AAErG,MAAM,aAAa,CAAC,OAAqC,iBAAkD;AAChH,MAAI,wBAAwB,KAAK,GAAG;AAClC,UAAM,aAAa;AACnB,WAAO,WAAW,KAAK,CAAC,SAAS,MAAM,UAAU,cAAc,KAAK;AAAA,EACtE;AACA,QAAM,cAAc;AACpB,SAAO,aAAa,UAAU,aAAa;AAC7C;AAEO,SAAS,eAAe,OAAwE;AACrG,SAAO,MAAM,QAAQ,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ACA,WAAO,CAAC,GAAG,gBAAgB,cAAc;AAAA,EAC3C;AACA,MAAI,kBAAkB,eAAe,SAAS,eAAe,MAAM;AACjE,QAAI,eAAgB,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,MAAM,gBAAgB,CAAC,YAAoB,YAAuC;AACvF,MAAI,CAAC,WAAY,QAAO;AACxB,SAAO,QAAQ;AAAA,IACb,CAAC,WACC,OAAO,SAAS,kBAAkB,UAAU,OAAO,MAAM,YAAY,EAAE,SAAS,WAAW,YAAY,CAAC;AAAA,EAC5G;AACF;AAEO,MAAM,6BAA6B,CACxC,gBACA,mBACG,eAAe,OAAO,CAAC,WAAW,OAAO,SAAS,kBAAkB,UAAU,WAAW,gBAAgB,MAAM,CAAC;AAE9G,MAAM,iBAAiB,CAC5B,MACA,UAAU,EAAE,UAAU,UAAU,OAAO,OAAO,QAAQ,UAAU,MAC7D;AACH,QAAM,WAAW,KAAK,sBAAsB;AAC5C,MACE,EACE,SAAS,OAAO,KAChB,SAAS,QAAQ,KACjB,SAAS,WAAW,OAAO,eAAe,SAAS,gBAAgB,iBACnE,SAAS,UAAU,OAAO,cAAc,SAAS,gBAAgB;AAGnE,SAAK,eAAe,OAAO;AAC/B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\nimport type { DSComboboxT } from '../react-desc-prop-types.js';\nimport { MENU_OPTION_TYPES } from '../constants.js';\nexport const getSelectableOptions = (options: Array<DSComboboxT.OptionTypes>): Array<DSComboboxT.OptionTypes> =>\n options.filter((option) => option.type === MENU_OPTION_TYPES.OPTION && !option.disabled);\n\nexport const getOptions = (options: Array<DSComboboxT.OptionTypes>): Array<DSComboboxT.OptionTypes> =>\n options.filter((option) => option.type === MENU_OPTION_TYPES.OPTION);\n\nexport const isSelectedValueEmpty = (value: DSComboboxT.SelectedOptionsT): boolean =>\n Array.isArray(value) ? value.length === 0 : !value;\n\nexport const isSelectedValueMultiple = (value: DSComboboxT.SelectedOptionsT): boolean => Array.isArray(value);\n\nexport const isSelected = (value: DSComboboxT.SelectedOptionsT, activeOption: DSComboboxT.ItemOption): boolean => {\n if (isSelectedValueMultiple(value)) {\n const multiValue = value as DSComboboxT.ItemOption[];\n return multiValue.some((item) => item?.value === activeOption?.value);\n }\n const singleValue = value as DSComboboxT.ItemOption;\n return singleValue?.value === activeOption.value;\n};\n\nexport function isArrayOfItems(value: DSComboboxT.SelectedOptionsT): value is DSComboboxT.ItemOption[] {\n return Array.isArray(value) && value.length > 0;\n}\n\nexport const isItem = (value: DSComboboxT.SelectedOptionsT): value is DSComboboxT.ItemOption =>\n !Array.isArray(value) && value !== null && typeof value === 'object';\n\nexport const findInCircularList = (\n list: DSComboboxT.OptionTypes[],\n from: number,\n criteria: (item: DSComboboxT.OptionTypes) => boolean,\n step = 1,\n): number => {\n if (list.length === 0) return from;\n\n let i = (from + step + list.length) % list.length;\n let iterations = 0;\n\n while (iterations < list.length) {\n if (criteria(list[i])) return i;\n\n i = (i + step + list.length) % list.length;\n iterations += 1;\n }\n\n return from; // Return the original index if no match is found\n};\nexport const getLastValueSelected = (selectedValues: DSComboboxT.SelectedOptionsT) => {\n if (Array.isArray(selectedValues)) {\n return selectedValues[selectedValues.length - 1];\n }\n return selectedValues;\n};\n\nexport const getFirstOption = (\n options: DSComboboxT.OptionTypes[],\n selectedValues?: DSComboboxT.SelectedOptionsT,\n): string => {\n if (selectedValues) {\n const lastValue = getLastValueSelected(selectedValues);\n if (lastValue) return lastValue.dsId;\n }\n for (let i = 0; i < options.length; i += 1)\n if (!['section', 'separator'].includes(options[i].type) && !options[i].disabled) {\n return options[i].dsId;\n }\n // list of disabled item results return ''\n return '';\n};\n\nexport const getSuggestedValueOnChange = (\n selectedOption: DSComboboxT.ItemOption,\n selectedValues: DSComboboxT.SelectedOptionsT,\n isNonClearable?: boolean,\n): DSComboboxT.SelectedOptionsT => {\n if (Array.isArray(selectedValues)) {\n const isFound = selectedValues.find((item) => item.type === 'option' && item.value === selectedOption.value);\n if (isFound) {\n if (isNonClearable) return selectedValues;\n return selectedValues.filter((item) => item.type === 'option' && item.value !== selectedOption.value);\n }\n return [...selectedValues, selectedOption];\n }\n if (selectedValues && selectedValues.dsId === selectedOption.dsId) {\n if (isNonClearable) return selectedOption;\n return null;\n }\n return selectedOption;\n};\n\nexport const filterOptions = (inputValue: string, options: DSComboboxT.OptionTypes[]) => {\n if (!inputValue) return options;\n return options.filter(\n (option) =>\n option.type === MENU_OPTION_TYPES.OPTION && option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n};\n\nexport const getFilteredOptionsSelected = (\n filteredOption: DSComboboxT.OptionTypes[],\n selectedValues: DSComboboxT.ItemOption[],\n) => filteredOption.filter((option) => option.type === MENU_OPTION_TYPES.OPTION && isSelected(selectedValues, option));\n\nexport const scrollIfNeeded = (\n elem: HTMLElement,\n options = { behavior: 'smooth', block: 'end', inline: 'nearest' } as ScrollIntoViewOptions | undefined,\n) => {\n const bounding = elem.getBoundingClientRect();\n if (\n !(\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\n )\n )\n elem.scrollIntoView(options);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,yBAAyB;AAC3B,MAAM,uBAAuB,CAAC,YACnC,QAAQ,OAAO,CAAC,WAAW,OAAO,SAAS,kBAAkB,UAAU,CAAC,OAAO,QAAQ;AAElF,MAAM,aAAa,CAAC,YACzB,QAAQ,OAAO,CAAC,WAAW,OAAO,SAAS,kBAAkB,MAAM;AAE9D,MAAM,uBAAuB,CAAC,UACnC,MAAM,QAAQ,KAAK,IAAI,MAAM,WAAW,IAAI,CAAC;AAExC,MAAM,0BAA0B,CAAC,UAAiD,MAAM,QAAQ,KAAK;AAErG,MAAM,aAAa,CAAC,OAAqC,iBAAkD;AAChH,MAAI,wBAAwB,KAAK,GAAG;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AAK,CAAC,SAAS,KAAK,SAAS,YAAY,KAAK,UAAU,eAAe,KAAK;AAC3G,QAAI,SAAS;AACX,UAAI,eAAgB,QAAO;AAC3B,aAAO,eAAe,OAAO,CAAC,SAAS,KAAK,SAAS,YAAY,KAAK,UAAU,eAAe,KAAK;AAAA,IACtG;AACA,WAAO,CAAC,GAAG,gBAAgB,cAAc;AAAA,EAC3C;AACA,MAAI,kBAAkB,eAAe,SAAS,eAAe,MAAM;AACjE,QAAI,eAAgB,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,MAAM,gBAAgB,CAAC,YAAoB,YAAuC;AACvF,MAAI,CAAC,WAAY,QAAO;AACxB,SAAO,QAAQ;AAAA,IACb,CAAC,WACC,OAAO,SAAS,kBAAkB,UAAU,OAAO,MAAM,YAAY,EAAE,SAAS,WAAW,YAAY,CAAC;AAAA,EAC5G;AACF;AAEO,MAAM,6BAA6B,CACxC,gBACA,mBACG,eAAe,OAAO,CAAC,WAAW,OAAO,SAAS,kBAAkB,UAAU,WAAW,gBAAgB,MAAM,CAAC;AAE9G,MAAM,iBAAiB,CAC5B,MACA,UAAU,EAAE,UAAU,UAAU,OAAO,OAAO,QAAQ,UAAU,MAC7D;AACH,QAAM,WAAW,KAAK,sBAAsB;AAC5C,MACE,EACE,SAAS,OAAO,KAChB,SAAS,QAAQ,KACjB,SAAS,WAAW,OAAO,eAAe,SAAS,gBAAgB,iBACnE,SAAS,UAAU,OAAO,cAAc,SAAS,gBAAgB;AAGnE,SAAK,eAAe,OAAO;AAC/B;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,8 @@
1
1
  import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';
2
+ import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
2
3
  import type React from 'react';
3
4
  import { type DSCommonComboboxPropsT } from './DSCommonComboboxPropsT.js';
5
+ import { DSFormComboboxName, FORM_COMBOBOX_MULTI_SLOTS } from './constants/index.js';
4
6
  export declare namespace DSComboboxMultiT {
5
7
  type CommonItemOptions = DSCommonComboboxPropsT.CommonItemOptions;
6
8
  type ItemSeparatorOptions = DSCommonComboboxPropsT.ItemSeparatorOptions;
@@ -16,7 +18,7 @@ export declare namespace DSComboboxMultiT {
16
18
  }
17
19
  interface DefaultProps extends DSCommonComboboxPropsT.DefaultProps {
18
20
  }
19
- interface OptionalProps extends DSCommonComboboxPropsT.OptionalProps {
21
+ interface OptionalProps extends DSCommonComboboxPropsT.OptionalProps, TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFormComboboxName, typeof FORM_COMBOBOX_MULTI_SLOTS> {
20
22
  }
21
23
  interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
22
24
  }
@@ -1,6 +1,8 @@
1
1
  import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';
2
+ import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
2
3
  import type React from 'react';
3
4
  import { type DSCommonComboboxPropsT } from './DSCommonComboboxPropsT.js';
5
+ import { DSFormComboboxName, FORM_COMBOBOX_SINGLE_SLOTS } from './constants/index.js';
4
6
  export declare namespace DSComboboxSingleT {
5
7
  type CommonItemOptions = DSCommonComboboxPropsT.CommonItemOptions;
6
8
  type ItemSeparatorOptions = DSCommonComboboxPropsT.ItemSeparatorOptions;
@@ -16,7 +18,7 @@ export declare namespace DSComboboxSingleT {
16
18
  }
17
19
  interface DefaultProps extends DSCommonComboboxPropsT.DefaultProps {
18
20
  }
19
- interface OptionalProps extends DSCommonComboboxPropsT.OptionalProps {
21
+ interface OptionalProps extends DSCommonComboboxPropsT.OptionalProps, TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFormComboboxName, typeof FORM_COMBOBOX_SINGLE_SLOTS> {
20
22
  }
21
23
  interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
22
24
  }
@@ -0,0 +1,8 @@
1
+ import { type DSHookFloatingContextT } from '@elliemae/ds-floating-context';
2
+ interface TruncatedTooltipTextProps {
3
+ value?: string;
4
+ placement?: DSHookFloatingContextT.PopperPlacementsT;
5
+ }
6
+ declare const TruncatedTooltipText: ({ value, placement }: TruncatedTooltipTextProps) => import("react/jsx-runtime").JSX.Element;
7
+ export { TruncatedTooltipText };
8
+ export default TruncatedTooltipText;
@@ -1,5 +1,6 @@
1
1
  export declare const DSFormComboboxName = "DSCombobox";
2
- export declare const FORM_COMBOBOX_SLOTS: {
2
+ export declare const FORM_COMBOBOX_SINGLE_SLOTS: {
3
+ readonly SELECTED_VALUES: "single-value-wrapper";
3
4
  readonly ROOT: "root";
4
5
  readonly INPUT_WRAPPER: "input-wrapper";
5
6
  readonly INPUT: "input";
@@ -8,10 +9,75 @@ export declare const FORM_COMBOBOX_SLOTS: {
8
9
  readonly SECTION_WRAPPER: "section-wrapper";
9
10
  readonly SECTION_LABEL: "section-label";
10
11
  readonly SINGLE_MENU_ITEM: "single-menu-item";
12
+ readonly LOADING_INDICATOR: "loading-indicator";
13
+ readonly SKELETON_MENU_ITEM: "skeleton-menu-item";
14
+ readonly POPPER_WRAPPER: "popper-wrapper";
15
+ readonly SELECTION: "selection";
16
+ readonly HEADER_ACTIONS: "header-actions";
17
+ readonly HEADER_ACTIONS_SEPARATOR: "header-actions-separator";
18
+ readonly INPUT_PLACEHOLDER: "input-placeholder";
19
+ readonly INPUT_FIELD_WRAPPER: "input-field-wrapper";
20
+ readonly LIST_WRAPPER: "list-wrapper";
21
+ readonly NO_MATCHES_FOUND: "no-results";
22
+ readonly CREATABLE_LABEL: "creatable-label";
23
+ readonly CREATABLE_VALUE: "creatable-value";
24
+ readonly MENU_ITEMS_WRAPPER: "menu-items-wrapper";
25
+ readonly LOADING_WRAPPER: "loading-wrapper";
26
+ };
27
+ export declare const FORM_COMBOBOX_MULTI_SLOTS: {
28
+ readonly PILL: "pill";
29
+ readonly PILL_GROUP: "pill-group";
11
30
  readonly MULTI_MENU_ITEM: "multi-menu-item";
31
+ readonly ROOT: "root";
32
+ readonly INPUT_WRAPPER: "input-wrapper";
33
+ readonly INPUT: "input";
34
+ readonly DROPDOWN_BUTTON: "dropdown-button";
35
+ readonly FAST_LIST: "fast-list";
36
+ readonly SECTION_WRAPPER: "section-wrapper";
37
+ readonly SECTION_LABEL: "section-label";
38
+ readonly SINGLE_MENU_ITEM: "single-menu-item";
12
39
  readonly LOADING_INDICATOR: "loading-indicator";
13
40
  readonly SKELETON_MENU_ITEM: "skeleton-menu-item";
41
+ readonly POPPER_WRAPPER: "popper-wrapper";
42
+ readonly SELECTION: "selection";
43
+ readonly HEADER_ACTIONS: "header-actions";
44
+ readonly HEADER_ACTIONS_SEPARATOR: "header-actions-separator";
45
+ readonly INPUT_PLACEHOLDER: "input-placeholder";
46
+ readonly INPUT_FIELD_WRAPPER: "input-field-wrapper";
47
+ readonly LIST_WRAPPER: "list-wrapper";
48
+ readonly NO_MATCHES_FOUND: "no-results";
49
+ readonly CREATABLE_LABEL: "creatable-label";
50
+ readonly CREATABLE_VALUE: "creatable-value";
51
+ readonly MENU_ITEMS_WRAPPER: "menu-items-wrapper";
52
+ readonly LOADING_WRAPPER: "loading-wrapper";
53
+ };
54
+ export declare const FORM_COMBOBOX_SLOTS: {
14
55
  readonly PILL: "pill";
56
+ readonly PILL_GROUP: "pill-group";
57
+ readonly MULTI_MENU_ITEM: "multi-menu-item";
58
+ readonly ROOT: "root";
59
+ readonly INPUT_WRAPPER: "input-wrapper";
60
+ readonly INPUT: "input";
61
+ readonly DROPDOWN_BUTTON: "dropdown-button";
62
+ readonly FAST_LIST: "fast-list";
63
+ readonly SECTION_WRAPPER: "section-wrapper";
64
+ readonly SECTION_LABEL: "section-label";
65
+ readonly SINGLE_MENU_ITEM: "single-menu-item";
66
+ readonly LOADING_INDICATOR: "loading-indicator";
67
+ readonly SKELETON_MENU_ITEM: "skeleton-menu-item";
68
+ readonly POPPER_WRAPPER: "popper-wrapper";
69
+ readonly SELECTION: "selection";
70
+ readonly HEADER_ACTIONS: "header-actions";
71
+ readonly HEADER_ACTIONS_SEPARATOR: "header-actions-separator";
72
+ readonly INPUT_PLACEHOLDER: "input-placeholder";
73
+ readonly INPUT_FIELD_WRAPPER: "input-field-wrapper";
74
+ readonly LIST_WRAPPER: "list-wrapper";
75
+ readonly NO_MATCHES_FOUND: "no-results";
76
+ readonly CREATABLE_LABEL: "creatable-label";
77
+ readonly CREATABLE_VALUE: "creatable-value";
78
+ readonly MENU_ITEMS_WRAPPER: "menu-items-wrapper";
79
+ readonly LOADING_WRAPPER: "loading-wrapper";
80
+ readonly SELECTED_VALUES: "single-value-wrapper";
15
81
  };
16
82
  export declare const FORM_COMBOBOX_DATA_TESTID: {
17
83
  CONTROLS_WRAPPER: string;
@@ -24,6 +90,8 @@ export declare const FORM_COMBOBOX_DATA_TESTID: {
24
90
  OPTION: string;
25
91
  ALLY_SELECTED_VALUES: string;
26
92
  PILL: string;
93
+ PILL_GROUP: "ds-combobox-pill-group";
94
+ MULTI_MENU_ITEM: "ds-combobox-multi-menu-item";
27
95
  ROOT: "ds-combobox-root";
28
96
  INPUT_WRAPPER: "ds-combobox-input-wrapper";
29
97
  DROPDOWN_BUTTON: "ds-combobox-dropdown-button";
@@ -31,7 +99,17 @@ export declare const FORM_COMBOBOX_DATA_TESTID: {
31
99
  SECTION_WRAPPER: "ds-combobox-section-wrapper";
32
100
  SECTION_LABEL: "ds-combobox-section-label";
33
101
  SINGLE_MENU_ITEM: "ds-combobox-single-menu-item";
34
- MULTI_MENU_ITEM: "ds-combobox-multi-menu-item";
35
102
  LOADING_INDICATOR: "ds-combobox-loading-indicator";
36
103
  SKELETON_MENU_ITEM: "ds-combobox-skeleton-menu-item";
104
+ POPPER_WRAPPER: "ds-combobox-popper-wrapper";
105
+ SELECTION: "ds-combobox-selection";
106
+ HEADER_ACTIONS: "ds-combobox-header-actions";
107
+ HEADER_ACTIONS_SEPARATOR: "ds-combobox-header-actions-separator";
108
+ INPUT_PLACEHOLDER: "ds-combobox-input-placeholder";
109
+ INPUT_FIELD_WRAPPER: "ds-combobox-input-field-wrapper";
110
+ LIST_WRAPPER: "ds-combobox-list-wrapper";
111
+ CREATABLE_LABEL: "ds-combobox-creatable-label";
112
+ CREATABLE_VALUE: "ds-combobox-creatable-value";
113
+ MENU_ITEMS_WRAPPER: "ds-combobox-menu-items-wrapper";
114
+ LOADING_WRAPPER: "ds-combobox-loading-wrapper";
37
115
  };
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  import type { DSComboboxT } from '../react-desc-prop-types.js';
3
3
  interface SectionProps {
4
4
  label: string;
5
- wrapperStyles: React.CSSProperties;
6
- innerRef: (instance: HTMLDivElement | null) => void;
7
- options: DSComboboxT.ItemOption[] | DSComboboxT.ItemSeparatorOptions[];
8
- handleClick: (option: DSComboboxT.ItemOption, e: React.MouseEvent<HTMLInputElement>) => void;
5
+ wrapperStyles?: React.CSSProperties;
6
+ innerRef?: (instance: HTMLDivElement | null) => void;
7
+ options: DSComboboxT.OptionTypes[];
8
+ handleClick: (option: DSComboboxT.OptionTypes, e: React.MouseEvent<HTMLInputElement>) => void;
9
9
  handleOnMouseDown: (e: React.MouseEvent<HTMLLIElement>) => void;
10
10
  focusOptionIdx: string;
11
11
  selectedValues: DSComboboxT.SelectedOptionsT;
@@ -9,4 +9,6 @@ export declare const StyledListWrapper: import("styled-components").StyledCompon
9
9
  export declare const StyledCreatableLabel: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
10
10
  export declare const StyledCreatableValue: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
11
11
  export declare const StyledNoResultsWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
12
+ export declare const StyledSingleMenuItem: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsSingleT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsSingleT.Props>>, never>;
13
+ export declare const StyledMultiMenuItem: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsMultiT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsMultiT.Props>>, never>;
12
14
  export {};
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { DSComboboxT } from '../../react-desc-prop-types.js';
2
3
  interface ItemRendererT {
3
4
  extraItemProps?: {
@@ -5,5 +6,5 @@ interface ItemRendererT {
5
6
  };
6
7
  index: number;
7
8
  }
8
- export declare const ItemRenderer: ({ index, extraItemProps }: ItemRendererT) => JSX.Element;
9
+ export declare const ItemRenderer: ({ index, extraItemProps }: ItemRendererT) => React.ReactElement | null;
9
10
  export {};
@@ -5,7 +5,7 @@ export declare const RemovableSelectedValuePill: React.ComponentType<{
5
5
  applyAriaDisabled?: boolean;
6
6
  trailingComma?: boolean;
7
7
  ownerProps?: {
8
- getOwnerProps: () => DSComboboxT.InternalProps;
8
+ getOwnerProps: () => object;
9
9
  getOwnerPropsArguments: () => object;
10
10
  };
11
11
  }>;
@@ -3,6 +3,34 @@ import type { DSComboboxMultiT } from './DSComboboxMultiT.js';
3
3
  import type { DSComboboxSingleT } from './DSComboboxSingleT.js';
4
4
  import { type DSCommonComboboxPropsT } from './DSCommonComboboxPropsT.js';
5
5
  export declare namespace DSComboboxT {
6
+ type SlotFunctionArguments = {
7
+ dsComboboxRoot: () => object;
8
+ dsComboboxInputWrapper: () => object;
9
+ dsComboboxInput: () => object;
10
+ dsComboboxDropdownButton: () => object;
11
+ dsComboboxFastList: () => object;
12
+ dsComboboxSectionWrapper: () => object;
13
+ dsComboboxSectionLabel: () => object;
14
+ dsComboboxSingleMenuItem: () => object;
15
+ dsComboboxMultiMenuItem: () => object;
16
+ dsComboboxLoadingIndicator: () => object;
17
+ dsComboboxSkeletonMenuItem: () => object;
18
+ dsComboboxPill: () => object;
19
+ dsComboboxPillGroup: () => object;
20
+ dsComboboxPopperWrapper: () => object;
21
+ dsComboboxSelection: () => object;
22
+ dsComboboxSingleValueWrapper: () => object;
23
+ dsComboboxHeaderActions: () => object;
24
+ dsComboboxHeaderActionsSeparator: () => object;
25
+ dsComboboxInputPlaceholder: () => object;
26
+ dsComboboxInputFieldWrapper: () => object;
27
+ dsComboboxListWrapper: () => object;
28
+ dsComboboxNoResults: () => object;
29
+ dsComboboxCreatableLabel: () => object;
30
+ dsComboboxCreatableValue: () => object;
31
+ dsComboboxMenuItemsWrapper: () => object;
32
+ dsComboboxLoadingWrapper: () => object;
33
+ };
6
34
  type CommonItemOptions = DSCommonComboboxPropsT.CommonItemOptions;
7
35
  type ItemSeparatorOptions = DSCommonComboboxPropsT.ItemSeparatorOptions;
8
36
  type ItemSectionOptions = DSCommonComboboxPropsT.ItemSectionOptions;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};