@redsift/pickers 11.5.0 → 11.6.0-muiv5-alpha.0

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 (93) hide show
  1. package/_virtual/_rollupPluginBabelHelpers.js +93 -0
  2. package/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  3. package/components/combobox/Combobox.d.ts +29 -0
  4. package/components/combobox/Combobox.js +151 -0
  5. package/components/combobox/Combobox.js.map +1 -0
  6. package/components/combobox/context.js +6 -0
  7. package/components/combobox/context.js.map +1 -0
  8. package/components/combobox/intl/en-US.json.js +13 -0
  9. package/components/combobox/intl/en-US.json.js.map +1 -0
  10. package/components/combobox/intl/fr-FR.json.js +13 -0
  11. package/components/combobox/intl/fr-FR.json.js.map +1 -0
  12. package/components/combobox/intl/index.js +10 -0
  13. package/components/combobox/intl/index.js.map +1 -0
  14. package/components/combobox/types.d.ts +107 -0
  15. package/components/combobox/types.js +22 -0
  16. package/components/combobox/types.js.map +1 -0
  17. package/components/combobox-content/ComboboxContent.d.ts +17 -0
  18. package/components/combobox-content/ComboboxContent.js +70 -0
  19. package/components/combobox-content/ComboboxContent.js.map +1 -0
  20. package/components/combobox-content/types.d.ts +11 -0
  21. package/components/combobox-content-footer/ComboboxContentFooter.d.ts +9 -0
  22. package/components/combobox-content-footer/ComboboxContentFooter.js +28 -0
  23. package/components/combobox-content-footer/ComboboxContentFooter.js.map +1 -0
  24. package/components/combobox-content-footer/styles.js +12 -0
  25. package/components/combobox-content-footer/styles.js.map +1 -0
  26. package/components/combobox-content-footer/types.d.ts +11 -0
  27. package/components/combobox-content-header/ComboboxContentHeader.d.ts +9 -0
  28. package/components/combobox-content-header/ComboboxContentHeader.js +28 -0
  29. package/components/combobox-content-header/ComboboxContentHeader.js.map +1 -0
  30. package/components/combobox-content-header/styles.js +12 -0
  31. package/components/combobox-content-header/styles.js.map +1 -0
  32. package/components/combobox-content-header/types.d.ts +11 -0
  33. package/components/combobox-content-listbox/ComboboxContentListbox.d.ts +9 -0
  34. package/components/combobox-content-listbox/ComboboxContentListbox.js +124 -0
  35. package/components/combobox-content-listbox/ComboboxContentListbox.js.map +1 -0
  36. package/components/combobox-content-listbox/types.d.ts +12 -0
  37. package/components/combobox-trigger/ComboboxTrigger.d.ts +9 -0
  38. package/components/combobox-trigger/ComboboxTrigger.js +352 -0
  39. package/components/combobox-trigger/ComboboxTrigger.js.map +1 -0
  40. package/components/combobox-trigger/types.d.ts +27 -0
  41. package/components/item/Item.d.ts +8 -0
  42. package/components/item/Item.js +137 -0
  43. package/components/item/Item.js.map +1 -0
  44. package/components/item/useMenuItem.js +69 -0
  45. package/components/item/useMenuItem.js.map +1 -0
  46. package/components/menu-button/MenuButton.d.ts +29 -0
  47. package/components/menu-button/MenuButton.js +76 -0
  48. package/components/menu-button/MenuButton.js.map +1 -0
  49. package/components/menu-button/context.js +6 -0
  50. package/components/menu-button/context.js.map +1 -0
  51. package/components/menu-button/types.d.ts +45 -0
  52. package/components/menu-button-content/MenuButtonContent.d.ts +17 -0
  53. package/components/menu-button-content/MenuButtonContent.js +68 -0
  54. package/components/menu-button-content/MenuButtonContent.js.map +1 -0
  55. package/components/menu-button-content/types.d.ts +9 -0
  56. package/components/menu-button-content-footer/MenuButtonContentFooter.d.ts +9 -0
  57. package/components/menu-button-content-footer/MenuButtonContentFooter.js +28 -0
  58. package/components/menu-button-content-footer/MenuButtonContentFooter.js.map +1 -0
  59. package/components/menu-button-content-footer/styles.js +12 -0
  60. package/components/menu-button-content-footer/styles.js.map +1 -0
  61. package/components/menu-button-content-footer/types.d.ts +11 -0
  62. package/components/menu-button-content-header/MenuButtonContentHeader.d.ts +9 -0
  63. package/components/menu-button-content-header/MenuButtonContentHeader.js +28 -0
  64. package/components/menu-button-content-header/MenuButtonContentHeader.js.map +1 -0
  65. package/components/menu-button-content-header/styles.js +12 -0
  66. package/components/menu-button-content-header/styles.js.map +1 -0
  67. package/components/menu-button-content-header/types.d.ts +11 -0
  68. package/components/menu-button-content-menu/MenuButtonContentMenu.d.ts +9 -0
  69. package/components/menu-button-content-menu/MenuButtonContentMenu.js +41 -0
  70. package/components/menu-button-content-menu/MenuButtonContentMenu.js.map +1 -0
  71. package/components/menu-button-content-menu/types.d.ts +9 -0
  72. package/components/menu-button-trigger/MenuButtonTrigger.d.ts +9 -0
  73. package/components/menu-button-trigger/MenuButtonTrigger.js +167 -0
  74. package/components/menu-button-trigger/MenuButtonTrigger.js.map +1 -0
  75. package/components/menu-button-trigger/types.d.ts +15 -0
  76. package/components/select/Select.d.ts +22 -0
  77. package/components/select/Select.js +116 -0
  78. package/components/select/Select.js.map +1 -0
  79. package/components/select/context.js +6 -0
  80. package/components/select/context.js.map +1 -0
  81. package/components/select/types.d.ts +61 -0
  82. package/components/select-content/SelectContent.d.ts +9 -0
  83. package/components/select-content/SelectContent.js +62 -0
  84. package/components/select-content/SelectContent.js.map +1 -0
  85. package/components/select-content/types.d.ts +9 -0
  86. package/components/select-trigger/SelectTrigger.d.ts +9 -0
  87. package/components/select-trigger/SelectTrigger.js +249 -0
  88. package/components/select-trigger/SelectTrigger.js.map +1 -0
  89. package/components/select-trigger/types.d.ts +17 -0
  90. package/index.d.ts +31 -438
  91. package/index.js +17 -1822
  92. package/index.js.map +1 -1
  93. package/package.json +8 -8
@@ -0,0 +1,249 @@
1
+ import { objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useContext, useRef, useEffect } from 'react';
3
+ import classNames from 'classnames';
4
+ import { FocusWithinGroupContext, ListboxContext, useTheme, isComponent, Icon, FocusWithinGroupActionType, EventKey, ListboxActionType } from '@redsift/design-system';
5
+ import { usePopoverContext, useMergeRefs } from '@redsift/popovers';
6
+ import { SelectContext } from '../select/context.js';
7
+ import { mdiChevronDown } from '@redsift/icons';
8
+
9
+ const COMPONENT_NAME = 'SelectTrigger';
10
+ const CLASSNAME = 'redsift-select-trigger';
11
+
12
+ /**
13
+ * The SelectTrigger component.
14
+ */
15
+ const SelectTrigger = /*#__PURE__*/forwardRef((props, ref) => {
16
+ var _renderedChildren$pro;
17
+ const {
18
+ children,
19
+ hideExpandButton
20
+ } = props;
21
+ const {
22
+ getReferenceProps,
23
+ isOpen,
24
+ handleOpen,
25
+ refs
26
+ } = usePopoverContext();
27
+ const childrenRef = children.ref;
28
+ const triggerRef = useMergeRefs([refs.setReference, ref, childrenRef]);
29
+ const focusContext = useContext(FocusWithinGroupContext);
30
+ const selectContext = useContext(SelectContext);
31
+ const listboxState = useContext(ListboxContext);
32
+ const theme = useTheme();
33
+ const renderedChildren = typeof children === 'function' ? children({
34
+ value: selectContext === null || selectContext === void 0 ? void 0 : selectContext.value,
35
+ isOpen
36
+ }) : children;
37
+ const _inputRef = useRef();
38
+ const inputRef = (_renderedChildren$pro = renderedChildren.props.inputRef) !== null && _renderedChildren$pro !== void 0 ? _renderedChildren$pro : _inputRef;
39
+ const handleKeyDown = event => {
40
+ const code = event.code;
41
+ if (code === 'Escape') {
42
+ if (isOpen) {
43
+ handleOpen(false);
44
+ }
45
+ } else if (code === 'ArrowDown') {
46
+ var _focusContext$state$a;
47
+ if (!isOpen) {
48
+ handleOpen(true);
49
+ }
50
+ if (focusContext.state.selectedId !== null) {
51
+ focusContext.dispatch({
52
+ type: FocusWithinGroupActionType.DELAY_ACTION,
53
+ payload: {
54
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,
55
+ payload: {
56
+ key: EventKey.ArrowDown,
57
+ ctrlKey: event.ctrlKey
58
+ }
59
+ }
60
+ });
61
+ } else if (!((_focusContext$state$a = focusContext.state.activedescendant) !== null && _focusContext$state$a !== void 0 && _focusContext$state$a[0])) {
62
+ focusContext.dispatch({
63
+ type: FocusWithinGroupActionType.DELAY_ACTION,
64
+ payload: {
65
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,
66
+ payload: {
67
+ key: EventKey.Home,
68
+ ctrlKey: event.ctrlKey
69
+ }
70
+ }
71
+ });
72
+ } else {
73
+ var _focusContext$state$a2, _focusContext$state$a3;
74
+ focusContext.dispatch({
75
+ type: FocusWithinGroupActionType.DELAY_ACTION,
76
+ payload: {
77
+ type: FocusWithinGroupActionType.FOCUS_ON_LIST,
78
+ payload: {
79
+ id: (_focusContext$state$a2 = (_focusContext$state$a3 = focusContext.state.activedescendant) === null || _focusContext$state$a3 === void 0 ? void 0 : _focusContext$state$a3[0]) !== null && _focusContext$state$a2 !== void 0 ? _focusContext$state$a2 : ''
80
+ }
81
+ }
82
+ });
83
+ }
84
+ event.preventDefault();
85
+ } else if (code === 'ArrowUp') {
86
+ if (!isOpen) {
87
+ handleOpen(true);
88
+ }
89
+ focusContext.dispatch({
90
+ type: FocusWithinGroupActionType.DELAY_ACTION,
91
+ payload: {
92
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,
93
+ payload: {
94
+ key: focusContext.state.selectedId !== null ? EventKey.ArrowUp : EventKey.Home,
95
+ ctrlKey: event.ctrlKey
96
+ }
97
+ }
98
+ });
99
+ event.preventDefault();
100
+ } else if (code === 'Home') {
101
+ if (!isOpen) {
102
+ handleOpen(true);
103
+ }
104
+ focusContext.dispatch({
105
+ type: FocusWithinGroupActionType.DELAY_ACTION,
106
+ payload: {
107
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,
108
+ payload: {
109
+ key: EventKey.Home,
110
+ ctrlKey: event.ctrlKey
111
+ }
112
+ }
113
+ });
114
+ event.preventDefault();
115
+ } else if (code === 'End') {
116
+ if (!isOpen) {
117
+ handleOpen(true);
118
+ }
119
+ focusContext.dispatch({
120
+ type: FocusWithinGroupActionType.DELAY_ACTION,
121
+ payload: {
122
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,
123
+ payload: {
124
+ key: EventKey.End,
125
+ ctrlKey: event.ctrlKey
126
+ }
127
+ }
128
+ });
129
+ event.preventDefault();
130
+ } else if (code === 'Enter') {
131
+ if (isOpen && focusContext.state.selectedId) {
132
+ var _focusContext$state$a4, _focusContext$state$a5;
133
+ listboxState.dispatch({
134
+ type: ListboxActionType.SET,
135
+ payload: {
136
+ values: [(_focusContext$state$a4 = (_focusContext$state$a5 = focusContext.state.activedescendant) === null || _focusContext$state$a5 === void 0 ? void 0 : _focusContext$state$a5[1]) !== null && _focusContext$state$a4 !== void 0 ? _focusContext$state$a4 : ''],
137
+ activedescendant: focusContext.state.activedescendant
138
+ }
139
+ });
140
+ }
141
+ }
142
+ };
143
+ const handleClick = event => {
144
+ event.preventDefault();
145
+ if (isOpen) {
146
+ handleOpen(false);
147
+ } else {
148
+ var _focusContext$state$a6, _focusContext$state$a7;
149
+ handleOpen(true);
150
+ focusContext.dispatch({
151
+ type: FocusWithinGroupActionType.DELAY_ACTION,
152
+ payload: {
153
+ type: FocusWithinGroupActionType.FOCUS_ON_LIST,
154
+ payload: {
155
+ id: (_focusContext$state$a6 = (_focusContext$state$a7 = focusContext.state.activedescendant) === null || _focusContext$state$a7 === void 0 ? void 0 : _focusContext$state$a7[0]) !== null && _focusContext$state$a6 !== void 0 ? _focusContext$state$a6 : ''
156
+ }
157
+ }
158
+ });
159
+ }
160
+ };
161
+ useEffect(() => {
162
+ selectContext === null || selectContext === void 0 ? void 0 : selectContext.setValue(listboxState.state.selectedValues[0]);
163
+ handleOpen(false);
164
+ }, [listboxState.state]);
165
+ if (isComponent('TextField')(renderedChildren)) {
166
+ var _props$children, _focusContext$state$a8, _selectContext$color, _selectContext$varian, _props$inputProps;
167
+ return /*#__PURE__*/React.cloneElement(renderedChildren, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getReferenceProps(_objectSpread2(_objectSpread2(_objectSpread2({
168
+ ref: triggerRef
169
+ }, props), renderedChildren.props), {}, {
170
+ children: (_props$children = renderedChildren.props.children) !== null && _props$children !== void 0 ? _props$children : ''
171
+ }))), {}, {
172
+ 'aria-activedescendant': isOpen ? (_focusContext$state$a8 = focusContext.state.activedescendant) === null || _focusContext$state$a8 === void 0 ? void 0 : _focusContext$state$a8[0] : undefined,
173
+ className: classNames(renderedChildren.props.className, selectContext === null || selectContext === void 0 ? void 0 : selectContext.triggerClassName),
174
+ color: (_selectContext$color = selectContext === null || selectContext === void 0 ? void 0 : selectContext.color) !== null && _selectContext$color !== void 0 ? _selectContext$color : renderedChildren.props.color,
175
+ inputRef,
176
+ internal: (value, isDisabled, isInvalid, isRequired) => {
177
+ return /*#__PURE__*/React.createElement(React.Fragment, null, typeof renderedChildren.props.internal === 'function' ? renderedChildren.props.internal(value, isDisabled, isInvalid, isRequired) : renderedChildren.props.internal, hideExpandButton ? null : /*#__PURE__*/React.createElement(Icon, {
178
+ color: isDisabled ? 'no-data' : 'question',
179
+ icon: mdiChevronDown,
180
+ style: {
181
+ transition: 'transform 300ms ease-out',
182
+ transform: `rotate(${isOpen ? '-180deg' : '0'})`,
183
+ cursor: 'pointer'
184
+ }
185
+ }));
186
+ },
187
+ isActive: isOpen,
188
+ isDisabled: selectContext === null || selectContext === void 0 ? void 0 : selectContext.isDisabled,
189
+ isReadOnly: true,
190
+ theme,
191
+ role: 'combobox',
192
+ onClick: handleClick,
193
+ onKeyDown: handleKeyDown,
194
+ style: _objectSpread2(_objectSpread2({}, renderedChildren.props.style), {}, {
195
+ caretColor: 'transparent',
196
+ cursor: 'pointer'
197
+ }),
198
+ variant: (_selectContext$varian = selectContext === null || selectContext === void 0 ? void 0 : selectContext.variant) !== null && _selectContext$varian !== void 0 ? _selectContext$varian : renderedChildren.props.variant
199
+ }, (selectContext === null || selectContext === void 0 ? void 0 : selectContext.isInvalid) === true && {
200
+ color: 'error'
201
+ }), typeof children !== 'function' && (selectContext === null || selectContext === void 0 ? void 0 : selectContext.value) && {
202
+ value: selectContext.value
203
+ }), {}, {
204
+ inputProps: _objectSpread2(_objectSpread2({}, renderedChildren.props.inputProps), {}, {
205
+ style: _objectSpread2(_objectSpread2({}, (_props$inputProps = renderedChildren.props.inputProps) === null || _props$inputProps === void 0 ? void 0 : _props$inputProps.style), {}, {
206
+ cursor: 'pointer'
207
+ })
208
+ })
209
+ }));
210
+ } else if (isComponent('Button')(renderedChildren)) {
211
+ var _props$children2, _focusContext$state$a9, _props$ariaLabel, _selectContext$color2, _props$rightIcon, _props$rightIconProps, _selectContext$varian2;
212
+ const children = renderedChildren.props.children;
213
+ const label = typeof children === 'string' ? children : children === null || children === void 0 ? void 0 : children.textContent;
214
+ return /*#__PURE__*/React.cloneElement(renderedChildren, _objectSpread2(_objectSpread2(_objectSpread2({}, getReferenceProps(_objectSpread2(_objectSpread2(_objectSpread2({
215
+ ref: triggerRef
216
+ }, props), renderedChildren.props), {}, {
217
+ children: (_props$children2 = renderedChildren.props.children) !== null && _props$children2 !== void 0 ? _props$children2 : ''
218
+ }))), {}, {
219
+ 'aria-activedescendant': isOpen ? (_focusContext$state$a9 = focusContext.state.activedescendant) === null || _focusContext$state$a9 === void 0 ? void 0 : _focusContext$state$a9[0] : undefined,
220
+ 'aria-label': (_props$ariaLabel = renderedChildren.props['aria-label']) !== null && _props$ariaLabel !== void 0 ? _props$ariaLabel : label,
221
+ className: classNames(renderedChildren.props.className, selectContext === null || selectContext === void 0 ? void 0 : selectContext.triggerClassName),
222
+ color: (_selectContext$color2 = selectContext === null || selectContext === void 0 ? void 0 : selectContext.color) !== null && _selectContext$color2 !== void 0 ? _selectContext$color2 : renderedChildren.props.color,
223
+ isActive: isOpen,
224
+ isDisabled: selectContext === null || selectContext === void 0 ? void 0 : selectContext.isDisabled,
225
+ onClick: handleClick,
226
+ onKeyDown: handleKeyDown,
227
+ rightIcon: (_props$rightIcon = renderedChildren.props.rightIcon) !== null && _props$rightIcon !== void 0 ? _props$rightIcon : mdiChevronDown,
228
+ rightIconProps: renderedChildren.props.rightIcon ? renderedChildren.props.rightIconProps : (_props$rightIconProps = renderedChildren.props.rightIconProps) !== null && _props$rightIconProps !== void 0 ? _props$rightIconProps : {
229
+ style: {
230
+ transition: 'transform 300ms ease-out',
231
+ transform: `rotate(${isOpen ? '-180deg' : '0'})`
232
+ }
233
+ },
234
+ role: 'combobox',
235
+ theme,
236
+ variant: (_selectContext$varian2 = selectContext === null || selectContext === void 0 ? void 0 : selectContext.variant) !== null && _selectContext$varian2 !== void 0 ? _selectContext$varian2 : renderedChildren.props.variant
237
+ }, (selectContext === null || selectContext === void 0 ? void 0 : selectContext.isInvalid) === true && {
238
+ color: 'error'
239
+ }), typeof children !== 'function' && (selectContext === null || selectContext === void 0 ? void 0 : selectContext.value) && {
240
+ children: selectContext.value
241
+ }));
242
+ }
243
+ return /*#__PURE__*/React.createElement(React.Fragment, null, renderedChildren);
244
+ });
245
+ SelectTrigger.className = CLASSNAME;
246
+ SelectTrigger.displayName = COMPONENT_NAME;
247
+
248
+ export { SelectTrigger };
249
+ //# sourceMappingURL=SelectTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectTrigger.js","sources":["../../../src/components/select-trigger/SelectTrigger.tsx"],"sourcesContent":["import React, { MouseEvent, ReactElement, forwardRef, useContext, useEffect, useRef } from 'react';\nimport classNames from 'classnames';\n\nimport {\n Comp,\n EventKey,\n FocusWithinGroupActionType,\n FocusWithinGroupContext,\n Icon,\n ListboxActionType,\n ListboxContext,\n isComponent,\n useTheme,\n} from '@redsift/design-system';\nimport { SelectTriggerProps } from './types';\nimport { useMergeRefs, usePopoverContext } from '@redsift/popovers';\nimport { SelectContext } from '../select/context';\nimport { mdiChevronDown } from '@redsift/icons';\n\nconst COMPONENT_NAME = 'SelectTrigger';\nconst CLASSNAME = 'redsift-select-trigger';\n\n/**\n * The SelectTrigger component.\n */\nexport const SelectTrigger: Comp<SelectTriggerProps, HTMLButtonElement> = forwardRef((props, ref) => {\n const { children, hideExpandButton } = props;\n\n const { getReferenceProps, isOpen, handleOpen, refs } = usePopoverContext();\n const childrenRef = (children as any).ref;\n const triggerRef = useMergeRefs([refs.setReference, ref, childrenRef]);\n\n const focusContext = useContext(FocusWithinGroupContext);\n const selectContext = useContext(SelectContext);\n const listboxState = useContext(ListboxContext);\n const theme = useTheme();\n\n const renderedChildren =\n typeof children === 'function' ? children({ value: selectContext?.value, isOpen }) : children;\n\n const _inputRef = useRef<HTMLInputElement>();\n const inputRef = renderedChildren.props.inputRef ?? _inputRef;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n const code = event.code;\n\n if (code === 'Escape') {\n if (isOpen) {\n handleOpen(false);\n }\n } else if (code === 'ArrowDown') {\n if (!isOpen) {\n handleOpen(true);\n }\n if (focusContext.state.selectedId !== null) {\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,\n payload: {\n key: EventKey.ArrowDown,\n ctrlKey: event.ctrlKey,\n },\n },\n });\n } else if (!focusContext.state.activedescendant?.[0]) {\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,\n payload: {\n key: EventKey.Home,\n ctrlKey: event.ctrlKey,\n },\n },\n });\n } else {\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.FOCUS_ON_LIST,\n payload: {\n id: focusContext.state.activedescendant?.[0] ?? '',\n },\n },\n });\n }\n event.preventDefault();\n } else if (code === 'ArrowUp') {\n if (!isOpen) {\n handleOpen(true);\n }\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,\n payload: {\n key: focusContext.state.selectedId !== null ? EventKey.ArrowUp : EventKey.Home,\n ctrlKey: event.ctrlKey,\n },\n },\n });\n event.preventDefault();\n } else if (code === 'Home') {\n if (!isOpen) {\n handleOpen(true);\n }\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,\n payload: {\n key: EventKey.Home,\n ctrlKey: event.ctrlKey,\n },\n },\n });\n event.preventDefault();\n } else if (code === 'End') {\n if (!isOpen) {\n handleOpen(true);\n }\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,\n payload: {\n key: EventKey.End,\n ctrlKey: event.ctrlKey,\n },\n },\n });\n event.preventDefault();\n } else if (code === 'Enter') {\n if (isOpen && focusContext.state.selectedId) {\n listboxState.dispatch({\n type: ListboxActionType.SET,\n payload: {\n values: [focusContext.state.activedescendant?.[1] ?? ''],\n activedescendant: focusContext.state.activedescendant,\n },\n });\n }\n }\n };\n\n const handleClick = (event: MouseEvent) => {\n event.preventDefault();\n if (isOpen) {\n handleOpen(false);\n } else {\n handleOpen(true);\n focusContext.dispatch({\n type: FocusWithinGroupActionType.DELAY_ACTION,\n payload: {\n type: FocusWithinGroupActionType.FOCUS_ON_LIST,\n payload: {\n id: focusContext.state.activedescendant?.[0] ?? '',\n },\n },\n });\n }\n };\n\n useEffect(() => {\n selectContext?.setValue(listboxState.state.selectedValues[0]);\n handleOpen(false);\n }, [listboxState.state]);\n\n if (isComponent('TextField')(renderedChildren)) {\n return React.cloneElement(renderedChildren, {\n ...getReferenceProps({\n ref: triggerRef,\n ...props,\n ...(renderedChildren as ReactElement).props,\n children: (renderedChildren as ReactElement).props.children ?? '',\n }),\n 'aria-activedescendant': isOpen ? focusContext.state.activedescendant?.[0] : undefined,\n className: classNames((renderedChildren as ReactElement).props.className, selectContext?.triggerClassName),\n color: selectContext?.color ?? (renderedChildren as ReactElement).props.color,\n inputRef,\n internal: (value?: string, isDisabled?: boolean, isInvalid?: boolean, isRequired?: boolean) => {\n return (\n <>\n {typeof (renderedChildren as ReactElement).props.internal === 'function'\n ? (renderedChildren as ReactElement).props.internal(value, isDisabled, isInvalid, isRequired)\n : (renderedChildren as ReactElement).props.internal}\n {hideExpandButton ? null : (\n <Icon\n color={isDisabled ? 'no-data' : 'question'}\n icon={mdiChevronDown}\n style={{\n transition: 'transform 300ms ease-out',\n transform: `rotate(${isOpen ? '-180deg' : '0'})`,\n cursor: 'pointer',\n }}\n />\n )}\n </>\n );\n },\n isActive: isOpen,\n isDisabled: selectContext?.isDisabled,\n isReadOnly: true,\n theme,\n role: 'combobox',\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n style: { ...(renderedChildren as ReactElement).props.style, caretColor: 'transparent', cursor: 'pointer' },\n variant: selectContext?.variant ?? (renderedChildren as ReactElement).props.variant,\n ...(selectContext?.isInvalid === true && { color: 'error' }),\n ...(typeof children !== 'function' &&\n selectContext?.value && {\n value: selectContext.value,\n }),\n inputProps: {\n ...(renderedChildren as ReactElement).props.inputProps,\n style: { ...(renderedChildren as ReactElement).props.inputProps?.style, cursor: 'pointer' },\n },\n });\n } else if (isComponent('Button')(renderedChildren)) {\n const children = (renderedChildren as ReactElement).props.children;\n const label = typeof children === 'string' ? children : children?.textContent;\n\n return React.cloneElement(renderedChildren, {\n ...getReferenceProps({\n ref: triggerRef,\n ...props,\n ...(renderedChildren as ReactElement).props,\n children: (renderedChildren as ReactElement).props.children ?? '',\n }),\n 'aria-activedescendant': isOpen ? focusContext.state.activedescendant?.[0] : undefined,\n 'aria-label': (renderedChildren as ReactElement).props['aria-label'] ?? label,\n className: classNames((renderedChildren as ReactElement).props.className, selectContext?.triggerClassName),\n color: selectContext?.color ?? (renderedChildren as ReactElement).props.color,\n isActive: isOpen,\n isDisabled: selectContext?.isDisabled,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n rightIcon: (renderedChildren as ReactElement).props.rightIcon ?? mdiChevronDown,\n rightIconProps: (renderedChildren as ReactElement).props.rightIcon\n ? (renderedChildren as ReactElement).props.rightIconProps\n : (renderedChildren as ReactElement).props.rightIconProps ?? {\n style: {\n transition: 'transform 300ms ease-out',\n transform: `rotate(${isOpen ? '-180deg' : '0'})`,\n },\n },\n role: 'combobox',\n theme,\n variant: selectContext?.variant ?? (renderedChildren as ReactElement).props.variant,\n ...(selectContext?.isInvalid === true && { color: 'error' }),\n ...(typeof children !== 'function' &&\n selectContext?.value && {\n children: selectContext.value,\n }),\n });\n }\n\n return <>{renderedChildren}</>;\n});\nSelectTrigger.className = CLASSNAME;\nSelectTrigger.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","SelectTrigger","forwardRef","props","ref","_renderedChildren$pro","children","hideExpandButton","getReferenceProps","isOpen","handleOpen","refs","usePopoverContext","childrenRef","triggerRef","useMergeRefs","setReference","focusContext","useContext","FocusWithinGroupContext","selectContext","SelectContext","listboxState","ListboxContext","theme","useTheme","renderedChildren","value","_inputRef","useRef","inputRef","handleKeyDown","event","code","_focusContext$state$a","state","selectedId","dispatch","type","FocusWithinGroupActionType","DELAY_ACTION","payload","KEY_DOWN_ON_LIST","key","EventKey","ArrowDown","ctrlKey","activedescendant","Home","_focusContext$state$a2","_focusContext$state$a3","FOCUS_ON_LIST","id","preventDefault","ArrowUp","End","_focusContext$state$a4","_focusContext$state$a5","ListboxActionType","SET","values","handleClick","_focusContext$state$a6","_focusContext$state$a7","useEffect","setValue","selectedValues","isComponent","_props$children","_focusContext$state$a8","_selectContext$color","_selectContext$varian","_props$inputProps","React","cloneElement","_objectSpread","undefined","className","classNames","triggerClassName","color","internal","isDisabled","isInvalid","isRequired","createElement","Fragment","Icon","icon","mdiChevronDown","style","transition","transform","cursor","isActive","isReadOnly","role","onClick","onKeyDown","caretColor","variant","inputProps","_props$children2","_focusContext$state$a9","_props$ariaLabel","_selectContext$color2","_props$rightIcon","_props$rightIconProps","_selectContext$varian2","label","textContent","rightIcon","rightIconProps","displayName"],"mappings":";;;;;;;;AAmBA,MAAMA,cAAc,GAAG,eAAe,CAAA;AACtC,MAAMC,SAAS,GAAG,wBAAwB,CAAA;;AAE1C;AACA;AACA;AACO,MAAMC,aAA0D,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;AAAA,EAAA,IAAAC,qBAAA,CAAA;EACnG,MAAM;IAAEC,QAAQ;AAAEC,IAAAA,gB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xE,KAAK;AACL4E,MAAAA,OAAO,GAAAQ,sBAAA,GAAExF,aAAa,KAAbA,IAAAA,IAAAA,aAAa,uBAAbA,aAAa,CAAEgF,OAAO,MAAA,IAAA,IAAAQ,sBAAA,KAAAA,KAAAA,CAAAA,GAAAA,sBAAA,GAAKlF,gBAAgB,CAAkBvB,KAAK,CAACiG,OAAAA;KACxE,EAAA,CAAAhF,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAbA,aAAa,CAAE+D,SAAS,MAAK,IAAI,IAAI;AAAEH,MAAAA,KAAK,EAAE,OAAA;AAAQ,KAAC,CACvD,EAAA,OAAO1E,QAAQ,KAAK,UAAU,KAChCc,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAbA,aAAa,CAAEO,KAAK,CAAI,IAAA;MACtBrB,QAAQ,EAAEc,aAAa,CAACO,KAAAA;AAC1B,KAAC,CACJ,CAAC,CAAA;AACJ,GAAA;EAEA,oBAAO8C,KAAA,CAAAY,aAAA,CAAAZ,KAAA,CAAAa,QAAA,EAAG5D,IAAAA,EAAAA,gBAAmB,CAAC,CAAA;AAChC,CAAC,EAAC;AACFzB,aAAa,CAAC4E,SAAS,GAAG7E,SAAS,CAAA;AACnCC,aAAa,CAACgH,WAAW,GAAGlH,cAAc;;;;"}
@@ -0,0 +1,17 @@
1
+ import { PopoverTriggerProps } from '@redsift/popovers';
2
+ import { ReactElement } from 'react';
3
+
4
+ /**
5
+ * Component props.
6
+ */
7
+ interface SelectTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
8
+ /** Children */
9
+ children: ReactElement | ((state: {
10
+ value?: string;
11
+ isOpen?: boolean;
12
+ }) => ReactElement);
13
+ /** Whether or not the expand/collapse icon button should be displayed or not. */
14
+ hideExpandButton?: boolean;
15
+ }
16
+
17
+ export { SelectTriggerProps };