@saleor/macaw-ui 0.4.0 → 0.5.2

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 (264) hide show
  1. package/dist/ActionBar/ActionBar.d.ts +8 -0
  2. package/dist/ActionBar/ActionBar.stories.d.ts +4 -0
  3. package/dist/ActionBar/context.d.ts +9 -0
  4. package/dist/ActionBar/index.d.ts +2 -0
  5. package/dist/ActionBar/styles.d.ts +2 -0
  6. package/dist/Alert/Alert.d.ts +8 -0
  7. package/dist/Alert/Alert.stories.d.ts +12 -0
  8. package/dist/Alert/AlertBase.d.ts +8 -0
  9. package/dist/Alert/index.d.ts +2 -0
  10. package/dist/Alert/styles.d.ts +2 -0
  11. package/dist/Backlink/Backlink.d.ts +8 -0
  12. package/dist/Backlink/Backlink.stories.d.ts +5 -0
  13. package/dist/Backlink/context.d.ts +5 -0
  14. package/dist/Backlink/index.d.ts +2 -0
  15. package/dist/Backlink/styles.d.ts +2 -0
  16. package/dist/BaseList/BaseList.d.ts +26 -0
  17. package/dist/BaseList/context.d.ts +7 -0
  18. package/dist/BaseList/index.d.ts +1 -0
  19. package/dist/BaseList/styles.d.ts +5 -0
  20. package/dist/Button/Button.d.ts +16 -0
  21. package/dist/Button/index.d.ts +1 -0
  22. package/dist/Button/styles.d.ts +2 -0
  23. package/dist/ConfirmButton/ConfirmButton.d.ts +11 -0
  24. package/dist/ConfirmButton/ConfirmButton.stories.d.ts +8 -0
  25. package/dist/ConfirmButton/index.d.ts +1 -0
  26. package/dist/ConfirmButton/styles.d.ts +2 -0
  27. package/dist/DialogHeader/DialogHeader.d.ts +6 -0
  28. package/dist/DialogHeader/index.d.ts +1 -0
  29. package/dist/DialogHeader/styles.d.ts +1 -0
  30. package/dist/DialogTable/DialogTable.d.ts +6 -0
  31. package/dist/DialogTable/index.d.ts +1 -0
  32. package/dist/DialogTable/styles.d.ts +1 -0
  33. package/dist/Filter/Filter.d.ts +10 -0
  34. package/dist/Filter/Filter.stories.d.ts +5 -0
  35. package/dist/Filter/FilterBar.d.ts +11 -0
  36. package/dist/Filter/FilterContent.d.ts +7 -0
  37. package/dist/Filter/FilterField/MultipleSelectFilterField.d.ts +6 -0
  38. package/dist/Filter/FilterField/RangeFilterField.d.ts +7 -0
  39. package/dist/Filter/FilterField/SelectFilterField.d.ts +6 -0
  40. package/dist/Filter/FilterField/TextFilterField.d.ts +6 -0
  41. package/dist/Filter/FilterMenu.d.ts +9 -0
  42. package/dist/Filter/context.d.ts +4 -0
  43. package/dist/Filter/index.d.ts +4 -0
  44. package/dist/Filter/styles.d.ts +2 -0
  45. package/dist/Filter/types.d.ts +49 -0
  46. package/dist/Filter/utils.d.ts +8 -0
  47. package/dist/IconButton/IconButton.d.ts +8 -0
  48. package/dist/IconButton/index.d.ts +1 -0
  49. package/dist/IconButton/partials.d.ts +14 -0
  50. package/dist/IconButton/styles.d.ts +2 -0
  51. package/dist/LayoutButton/LayoutButton.d.ts +7 -0
  52. package/dist/LayoutButton/index.d.ts +1 -0
  53. package/dist/LayoutButton/styles.d.ts +2 -0
  54. package/dist/List/List.d.ts +13 -0
  55. package/dist/List/List.stories.d.ts +5 -0
  56. package/dist/List/context.d.ts +8 -0
  57. package/dist/List/index.d.ts +1 -0
  58. package/dist/List/styles.d.ts +1 -0
  59. package/dist/Notification/Notification.d.ts +3 -0
  60. package/dist/Notification/Notification.stories.d.ts +10 -0
  61. package/dist/Notification/index.d.ts +2 -0
  62. package/dist/Notification/styles.d.ts +2 -0
  63. package/dist/Notification/types.d.ts +16 -0
  64. package/dist/OffsettedList/OffsettedList.d.ts +12 -0
  65. package/dist/OffsettedList/OffsettedList.stories.d.ts +5 -0
  66. package/dist/OffsettedList/index.d.ts +1 -0
  67. package/dist/OffsettedList/styles.d.ts +2 -0
  68. package/dist/PageTabs/PageTab.d.ts +3 -0
  69. package/dist/PageTabs/PageTab.stories.d.ts +4 -0
  70. package/dist/PageTabs/PageTabPanel.d.ts +4 -0
  71. package/dist/PageTabs/PageTabs.d.ts +5 -0
  72. package/dist/PageTabs/index.d.ts +3 -0
  73. package/dist/PageTabs/styles.d.ts +2 -0
  74. package/dist/Pagination/Pagination.d.ts +10 -0
  75. package/dist/Pagination/PaginationActions.d.ts +11 -0
  76. package/dist/Pagination/PaginationRowNumberSelect.d.ts +11 -0
  77. package/dist/Pagination/TablePagination.d.ts +6 -0
  78. package/dist/Pagination/index.d.ts +4 -0
  79. package/dist/Pagination/styles.d.ts +2 -0
  80. package/dist/PillLink/PillLink.d.ts +15 -0
  81. package/dist/PillLink/index.d.ts +1 -0
  82. package/dist/PillLink/styles.d.ts +2 -0
  83. package/dist/ResponsiveTable/ResponsiveTable.d.ts +8 -0
  84. package/dist/ResponsiveTable/index.d.ts +1 -0
  85. package/dist/ResponsiveTable/styles.d.ts +2 -0
  86. package/dist/Savebar/ButtonTooltipDecorator.d.ts +6 -0
  87. package/dist/Savebar/Savebar.d.ts +14 -0
  88. package/dist/Savebar/Savebar.stories.d.ts +6 -0
  89. package/dist/Savebar/index.d.ts +1 -0
  90. package/dist/Savebar/styles.d.ts +2 -0
  91. package/dist/ScrollShadow/ScrollShadow.d.ts +6 -0
  92. package/dist/ScrollShadow/index.d.ts +1 -0
  93. package/dist/ScrollShadow/styles.d.ts +1 -0
  94. package/dist/Sidebar/ExpandButton.d.ts +6 -0
  95. package/dist/Sidebar/MenuItem.d.ts +11 -0
  96. package/dist/Sidebar/Sidebar.d.ts +6 -0
  97. package/dist/Sidebar/Sidebar.stories.d.ts +6 -0
  98. package/dist/Sidebar/fixtures.d.ts +2 -0
  99. package/dist/Sidebar/index.d.ts +4 -0
  100. package/dist/Sidebar/types.d.ts +16 -0
  101. package/dist/SidebarDrawer/MenuItemBtn.d.ts +7 -0
  102. package/dist/SidebarDrawer/SidebarDrawer.d.ts +4 -0
  103. package/dist/SidebarDrawer/SidebarDrawer.stories.d.ts +4 -0
  104. package/dist/SidebarDrawer/index.d.ts +2 -0
  105. package/dist/SidebarDrawer/styles.d.ts +2 -0
  106. package/dist/SquareButton/SquareButton.d.ts +3 -0
  107. package/dist/SquareButton/SquareButton.stories.d.ts +5 -0
  108. package/dist/SquareButton/index.d.ts +1 -0
  109. package/dist/StatusChip/StatusChip.d.ts +3 -0
  110. package/dist/StatusChip/StatusChip.stories.d.ts +8 -0
  111. package/dist/StatusChip/index.d.ts +2 -0
  112. package/dist/StatusChip/styles.d.ts +3 -0
  113. package/dist/StatusChip/types.d.ts +8 -0
  114. package/dist/Tooltip/Tooltip.d.ts +6 -0
  115. package/dist/Tooltip/Tooltip.stories.d.ts +7 -0
  116. package/dist/Tooltip/index.d.ts +1 -0
  117. package/dist/Tooltip/styles.d.ts +3 -0
  118. package/dist/UserChipMenu/UserChipMenu.d.ts +9 -0
  119. package/dist/UserChipMenu/UserChipMenu.stories.d.ts +6 -0
  120. package/dist/UserChipMenu/UserChipMenuItem.d.ts +6 -0
  121. package/dist/UserChipMenu/context.d.ts +4 -0
  122. package/dist/UserChipMenu/index.d.ts +2 -0
  123. package/dist/UserChipMenu/styles.d.ts +2 -0
  124. package/dist/cjs/index.js +2 -2
  125. package/dist/cjs/index.js.map +3 -3
  126. package/dist/esm/index.js +2 -2
  127. package/dist/esm/index.js.map +3 -3
  128. package/dist/extensions/index.d.ts +3 -0
  129. package/dist/extensions/sendMessage.d.ts +3 -0
  130. package/dist/extensions/types.d.ts +22 -0
  131. package/dist/extensions/useExtensionMessage.d.ts +2 -0
  132. package/dist/icons/ArrowDropdownIcon.d.ts +2 -0
  133. package/dist/icons/ArrowRightIcon.d.ts +1 -0
  134. package/dist/icons/CheckboxCheckedIcon.d.ts +1 -0
  135. package/dist/icons/CheckboxIcon.d.ts +1 -0
  136. package/dist/icons/CheckboxIndeterminateIcon.d.ts +1 -0
  137. package/dist/icons/CloseIcon.d.ts +1 -0
  138. package/dist/icons/CompleteIcon.d.ts +2 -0
  139. package/dist/icons/DeleteIcon.d.ts +1 -0
  140. package/dist/icons/EditIcon.d.ts +1 -0
  141. package/dist/icons/FilteringIcon.d.ts +1 -0
  142. package/dist/icons/ImageIcon.d.ts +1 -0
  143. package/dist/icons/InfoIcon.d.ts +2 -0
  144. package/dist/icons/Logo.d.ts +2 -0
  145. package/dist/icons/LogoLight.d.ts +2 -0
  146. package/dist/icons/MoreIcon.d.ts +1 -0
  147. package/dist/icons/NavigatorIcon.d.ts +1 -0
  148. package/dist/icons/NotAllowedIcon.d.ts +2 -0
  149. package/dist/icons/NotAllowedInvertedIcon.d.ts +2 -0
  150. package/dist/icons/PlusIcon.d.ts +1 -0
  151. package/dist/icons/RadioCheckedIcon.d.ts +1 -0
  152. package/dist/icons/RadioIcon.d.ts +1 -0
  153. package/dist/icons/SearchIcon.d.ts +1 -0
  154. package/dist/icons/WarningIcon.d.ts +2 -0
  155. package/dist/icons/index.d.ts +18 -0
  156. package/dist/index.d.ts +29 -0
  157. package/dist/index.js +2 -0
  158. package/dist/index.js.map +7 -0
  159. package/dist/localStorageKeys.d.ts +4 -0
  160. package/dist/mjs/index.js +5 -0
  161. package/dist/mjs/index.js.map +7 -0
  162. package/dist/theme/Baseline.d.ts +2 -0
  163. package/dist/theme/ThemeProvider.d.ts +17 -0
  164. package/dist/theme/context.d.ts +3 -0
  165. package/dist/theme/createSaleorTheme/createSaleorTheme.d.ts +3 -0
  166. package/dist/theme/createSaleorTheme/index.d.ts +2 -0
  167. package/dist/theme/createSaleorTheme/overrides/buttons.d.ts +3 -0
  168. package/dist/theme/createSaleorTheme/overrides/controls.d.ts +3 -0
  169. package/dist/theme/createSaleorTheme/overrides/index.d.ts +3 -0
  170. package/dist/theme/createSaleorTheme/overrides/inputs.d.ts +3 -0
  171. package/dist/theme/createSaleorTheme/overrides/tables.d.ts +3 -0
  172. package/dist/theme/createSaleorTheme/palette.d.ts +2 -0
  173. package/dist/theme/createSaleorTheme/shadows.d.ts +2 -0
  174. package/dist/theme/createSaleorTheme/types.d.ts +51 -0
  175. package/dist/theme/index.d.ts +4 -0
  176. package/dist/theme/styles.d.ts +5 -0
  177. package/dist/theme/themes.d.ts +3 -0
  178. package/dist/theme/types.d.ts +6 -0
  179. package/dist/theme/utils.d.ts +1 -0
  180. package/dist/theme/utils.test.d.ts +1 -0
  181. package/dist/tools/index.d.ts +2 -0
  182. package/dist/tools/useElementScroll.d.ts +12 -0
  183. package/dist/tools/useLocalStorage.d.ts +5 -0
  184. package/dist/tools/useWindowScroll.d.ts +4 -0
  185. package/dist/types/Autocomplete/Autocomplete.d.ts +23 -0
  186. package/dist/types/Autocomplete/Autocomplete.stories.d.ts +5 -0
  187. package/dist/types/Autocomplete/fixtures.d.ts +4 -0
  188. package/dist/types/Autocomplete/index.d.ts +1 -0
  189. package/dist/types/Autocomplete/styles.d.ts +2 -0
  190. package/dist/types/Backlink/Backlink.d.ts +6 -4
  191. package/dist/types/Filter/FilterField/AutocompleteFilterField.d.ts +6 -0
  192. package/dist/types/Filter/FilterField/MultipleValueAutocompleteFilterField.d.ts +6 -0
  193. package/dist/types/Filter/stories/Filter.stories.d.ts +5 -0
  194. package/dist/types/Filter/stories/FilterInteractive.stories.d.ts +4 -0
  195. package/dist/types/Filter/stories/labels.d.ts +8 -0
  196. package/dist/types/Filter/styles.d.ts +1 -1
  197. package/dist/types/Filter/types.d.ts +8 -2
  198. package/dist/types/Filter/utils.d.ts +4 -1
  199. package/dist/types/IconButton/IconButton.d.ts +44 -2
  200. package/dist/types/LayoutButton/LayoutButton.d.ts +29 -2
  201. package/dist/types/MultipleValueAutocomplete/MultipleValueAutocomplete.d.ts +26 -0
  202. package/dist/types/MultipleValueAutocomplete/MultipleValueAutocomplete.stories.d.ts +6 -0
  203. package/dist/types/MultipleValueAutocomplete/fixtures.d.ts +4 -0
  204. package/dist/types/MultipleValueAutocomplete/index.d.ts +1 -0
  205. package/dist/types/MultipleValueAutocomplete/styles.d.ts +2 -0
  206. package/dist/types/MultipleValueAutocomplete/useMultipleValueAutocomplete.d.ts +32 -0
  207. package/dist/types/StatusChip/styles.d.ts +3 -0
  208. package/dist/types/SwitchSelector/SwitchSelector.d.ts +2 -0
  209. package/dist/types/SwitchSelector/SwitchSelector.stories.d.ts +4 -0
  210. package/dist/types/SwitchSelector/SwitchSelectorButton.d.ts +8 -0
  211. package/dist/types/SwitchSelector/index.d.ts +2 -0
  212. package/dist/types/consts.d.ts +4 -0
  213. package/dist/types/index.d.ts +3 -0
  214. package/dist/types/tools/useTextWidth.d.ts +2 -0
  215. package/dist/types/utils/mergeRefs.d.ts +2 -0
  216. package/dist/types/utils/useMockAutocomplete.d.ts +10 -0
  217. package/dist/utils/Decorator.d.ts +4 -0
  218. package/dist/utils/useListStory.d.ts +21 -0
  219. package/package.json +10 -6
  220. package/src/Autocomplete/Autocomplete.stories.tsx +43 -0
  221. package/src/Autocomplete/Autocomplete.tsx +188 -0
  222. package/src/Autocomplete/fixtures.ts +122 -0
  223. package/src/Autocomplete/index.ts +1 -0
  224. package/src/Autocomplete/styles.ts +22 -0
  225. package/src/Backlink/Backlink.tsx +7 -7
  226. package/src/Backlink/styles.ts +1 -1
  227. package/src/Chip/styles.ts +2 -1
  228. package/src/Filter/Filter.tsx +88 -44
  229. package/src/Filter/FilterBar.tsx +15 -9
  230. package/src/Filter/FilterContent.tsx +8 -1
  231. package/src/Filter/FilterField/AutocompleteFilterField.tsx +61 -0
  232. package/src/Filter/FilterField/MultipleSelectFilterField.tsx +6 -2
  233. package/src/Filter/FilterField/MultipleValueAutocompleteFilterField.tsx +60 -0
  234. package/src/Filter/context.tsx +1 -1
  235. package/src/Filter/{Filter.stories.tsx → stories/Filter.stories.tsx} +47 -13
  236. package/src/Filter/stories/FilterInteractive.stories.tsx +97 -0
  237. package/src/Filter/stories/labels.ts +8 -0
  238. package/src/Filter/styles.ts +37 -6
  239. package/src/Filter/types.ts +8 -1
  240. package/src/Filter/utils.ts +71 -5
  241. package/src/IconButton/IconButton.tsx +29 -7
  242. package/src/LayoutButton/LayoutButton.tsx +39 -23
  243. package/src/MultipleValueAutocomplete/MultipleValueAutocomplete.stories.tsx +76 -0
  244. package/src/MultipleValueAutocomplete/MultipleValueAutocomplete.tsx +185 -0
  245. package/src/MultipleValueAutocomplete/fixtures.ts +122 -0
  246. package/src/MultipleValueAutocomplete/index.ts +1 -0
  247. package/src/MultipleValueAutocomplete/styles.ts +41 -0
  248. package/src/MultipleValueAutocomplete/useMultipleValueAutocomplete.ts +172 -0
  249. package/src/SwitchSelector/SwitchSelector.stories.tsx +63 -0
  250. package/src/SwitchSelector/SwitchSelector.tsx +20 -0
  251. package/src/SwitchSelector/SwitchSelectorButton.tsx +60 -0
  252. package/src/SwitchSelector/index.ts +2 -0
  253. package/src/consts.ts +4 -0
  254. package/src/index.tsx +3 -0
  255. package/src/theme/createSaleorTheme/createSaleorTheme.tsx +1 -1
  256. package/src/tools/useTextWidth.ts +20 -0
  257. package/src/utils/mergeRefs.ts +14 -0
  258. package/src/utils/useMockAutocomplete.ts +37 -0
  259. package/dist/types/Chip/ColorSwatch.d.ts +0 -6
  260. package/dist/types/Chip/common/ChipMovable.d.ts +0 -5
  261. package/dist/types/Chip/common/ChipRemovable.d.ts +0 -6
  262. package/dist/types/Chip/common/ChipSwatch.d.ts +0 -7
  263. package/dist/types/Chip/common/index.d.ts +0 -3
  264. package/src/Chip/.DS_Store +0 -0
@@ -0,0 +1,172 @@
1
+ import {
2
+ useCombobox,
3
+ UseComboboxGetItemPropsOptions,
4
+ useMultipleSelection,
5
+ } from "downshift";
6
+ import { useCallback, useEffect, useMemo, useRef } from "react";
7
+
8
+ import { SyntheticChangeEvent } from "../../types/utils";
9
+ import { Choice } from "../Filter";
10
+ import { useTextWidth } from "../tools/useTextWidth";
11
+ import { mergeRefs } from "../utils/mergeRefs";
12
+
13
+ export interface UseMultipleValueAutocomplete {
14
+ choices: Choice[];
15
+ enableReinitialize?: boolean;
16
+ name?: string;
17
+ initialValue: Choice[];
18
+ onChange?: (event: SyntheticChangeEvent<string[]>) => void;
19
+ onInputChange?: (value: string) => void;
20
+ }
21
+
22
+ function useMultipleValueAutocomplete({
23
+ choices,
24
+ enableReinitialize,
25
+ initialValue,
26
+ name,
27
+ onChange,
28
+ onInputChange,
29
+ }: UseMultipleValueAutocomplete) {
30
+ const anchor = useRef<HTMLDivElement>();
31
+ const input = useRef<HTMLInputElement>();
32
+
33
+ const [inputWidth, setInputText] = useTextWidth(
34
+ window
35
+ .getComputedStyle(input.current ?? document.body, null)
36
+ .getPropertyValue("font")
37
+ );
38
+
39
+ const {
40
+ getSelectedItemProps,
41
+ getDropdownProps,
42
+ addSelectedItem,
43
+ removeSelectedItem,
44
+ selectedItems,
45
+ setSelectedItems,
46
+ } = useMultipleSelection({
47
+ initialSelectedItems: initialValue,
48
+ onSelectedItemsChange: ({ selectedItems }) => {
49
+ if (onChange) {
50
+ onChange({
51
+ target: {
52
+ name: name ?? "",
53
+ value: selectedItems!.map((choice) => choice.value),
54
+ },
55
+ });
56
+ }
57
+ },
58
+ });
59
+ const filteredChoices = useMemo(
60
+ () =>
61
+ choices.filter(
62
+ (choice) =>
63
+ !selectedItems.find(
64
+ (selectedChoice) => selectedChoice.value === choice.value
65
+ )
66
+ ),
67
+ [choices, selectedItems]
68
+ );
69
+
70
+ useEffect(() => {
71
+ if (enableReinitialize) setSelectedItems(initialValue);
72
+ }, [initialValue]);
73
+
74
+ const {
75
+ isOpen,
76
+ getToggleButtonProps,
77
+ getLabelProps,
78
+ getMenuProps,
79
+ getInputProps,
80
+ getComboboxProps,
81
+ highlightedIndex,
82
+ getItemProps: baseGetItemProps,
83
+ openMenu,
84
+ inputValue,
85
+ setInputValue,
86
+ selectItem,
87
+ } = useCombobox({
88
+ circularNavigation: false,
89
+ defaultHighlightedIndex: 0,
90
+ items: filteredChoices,
91
+ onInputValueChange: ({ inputValue }) => {
92
+ setInputText(inputValue || "");
93
+ if (onInputChange && inputValue) {
94
+ onInputChange(inputValue);
95
+ }
96
+ },
97
+ onSelectedItemChange: ({ selectedItem }) => {
98
+ if (selectedItem) {
99
+ addSelectedItem(selectedItem);
100
+ setInputValue("");
101
+ }
102
+ },
103
+ stateReducer: (_, actionAndChanges) => {
104
+ const { changes, type } = actionAndChanges;
105
+ switch (type) {
106
+ case useCombobox.stateChangeTypes.InputKeyDownEnter:
107
+ case useCombobox.stateChangeTypes.FunctionSelectItem:
108
+ const index = filteredChoices.findIndex(
109
+ (choice) => choice.value === changes.selectedItem?.value
110
+ );
111
+ return {
112
+ ...changes,
113
+ highlightedIndex: index > 0 ? index - 1 : 0,
114
+ isOpen: true,
115
+ };
116
+ }
117
+ return changes;
118
+ },
119
+ selectedItem: null,
120
+ itemToString: () => "",
121
+ });
122
+
123
+ // Downshift doesn't like portals like popper
124
+ // https://github.com/downshift-js/downshift/issues/287
125
+ const getItemProps = useCallback(
126
+ (options: UseComboboxGetItemPropsOptions<Choice>) => {
127
+ const baseProps = baseGetItemProps(options);
128
+
129
+ return {
130
+ ...baseProps,
131
+ onClick: () => selectItem(options.item),
132
+ selected: highlightedIndex === options.index,
133
+ };
134
+ },
135
+ [baseGetItemProps, highlightedIndex]
136
+ );
137
+
138
+ const labelProps = getLabelProps();
139
+ const { ref: comboboxDownshiftRef, ...comboboxProps } = getComboboxProps();
140
+ const { ref: downshiftRef, ...inputProps } = getInputProps({
141
+ ...getDropdownProps(),
142
+ onFocus: () => {
143
+ if (!isOpen) {
144
+ input.current?.select();
145
+ openMenu();
146
+ }
147
+ },
148
+ });
149
+ const menuProps = getMenuProps({}, { suppressRefError: true });
150
+
151
+ return {
152
+ anchor,
153
+ comboboxProps,
154
+ filteredChoices,
155
+ getItemProps,
156
+ getSelectedItemProps,
157
+ getToggleButtonProps,
158
+ highlightedIndex,
159
+ inputProps,
160
+ inputRef: mergeRefs(downshiftRef, input),
161
+ inputValue,
162
+ inputWidth,
163
+ isOpen,
164
+ labelProps,
165
+ menuProps,
166
+ ref: mergeRefs(comboboxDownshiftRef, anchor),
167
+ removeSelectedItem,
168
+ selectedItems,
169
+ };
170
+ }
171
+
172
+ export default useMultipleValueAutocomplete;
@@ -0,0 +1,63 @@
1
+ import { Typography } from "@material-ui/core";
2
+ import { Meta, Story } from "@storybook/react";
3
+ import React, { useState } from "react";
4
+
5
+ import useGuideStyles from "../utils/guideStyles";
6
+ import { SwitchSelector } from "./SwitchSelector";
7
+ import { SwitchSelectorButton } from "./SwitchSelectorButton";
8
+
9
+ type SwitchSelectorButtonOptions = {
10
+ label: string | React.ReactNode;
11
+ value: string;
12
+ };
13
+
14
+ const INITIAL_TAB = "op2";
15
+
16
+ const OPTIONS: SwitchSelectorButtonOptions[] = [
17
+ { label: "Option 1", value: "op1" },
18
+ { label: "Option 2", value: "op2" },
19
+ { label: "Option 3", value: "op3" },
20
+ { label: "Option 4", value: "op4" },
21
+ ];
22
+
23
+ const DefaultStory: React.FC = () => {
24
+ const guideClasses = useGuideStyles();
25
+ const [active, setActive] = useState(INITIAL_TAB);
26
+
27
+ const currentTab = OPTIONS.find((option) => option.value === active);
28
+
29
+ return (
30
+ <div>
31
+ <Typography className={guideClasses.headline} variant="h1">
32
+ Switch Selector
33
+ </Typography>
34
+ <Typography className={guideClasses.paragraph} component="p">
35
+ Switch Selector has the functionality of a radio button group. It is
36
+ used to change an active tab to toggle context.
37
+ </Typography>
38
+ <div>
39
+ <SwitchSelector>
40
+ {OPTIONS.map(({ label, value }) => (
41
+ <SwitchSelectorButton
42
+ value={value}
43
+ onClick={() => setActive(value)}
44
+ activeTab={active}
45
+ >
46
+ {label}
47
+ </SwitchSelectorButton>
48
+ ))}
49
+ </SwitchSelector>
50
+
51
+ <div style={{ marginTop: "2em" }}>
52
+ <Typography>{`You have selected ${currentTab?.label}`}</Typography>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ );
57
+ };
58
+
59
+ export const Default: Story = () => <DefaultStory />;
60
+
61
+ export default {
62
+ title: "Switch selector",
63
+ } as Meta;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+
3
+ import { makeStyles } from "..";
4
+
5
+ const useStyles = makeStyles((theme) => ({
6
+ switchSelector: {
7
+ border: `1px solid ${theme.palette.saleor.main[5]}`,
8
+ padding: "6px",
9
+ borderRadius: 4,
10
+ width: "fit-content",
11
+ },
12
+ }));
13
+
14
+ export const SwitchSelector: React.FC<{}> = ({ children }) => {
15
+ const classes = useStyles();
16
+
17
+ return <div className={classes.switchSelector}>{children}</div>;
18
+ };
19
+
20
+ SwitchSelector.displayName = "SwitchSelector";
@@ -0,0 +1,60 @@
1
+ import clsx from "clsx";
2
+ import React from "react";
3
+
4
+ import { Button, makeStyles } from "..";
5
+
6
+ interface SwitchSelectorButtonProps {
7
+ value: string;
8
+ activeTab?: string;
9
+ onClick: () => void;
10
+ }
11
+
12
+ const useSwitchSelectorButtonStyles = makeStyles((theme) => ({
13
+ root: {
14
+ color: "#77738C",
15
+ background: "none",
16
+ borderColor: "transparent",
17
+ cursor: "pointer",
18
+
19
+ "&:not(:first-child)": {
20
+ marginLeft: theme.spacing(1),
21
+ },
22
+
23
+ "&:hover": {
24
+ backgroundColor: theme.palette.common.white,
25
+ color: theme.palette.saleor.active[1],
26
+ border: `1px solid ${theme.palette.saleor.active[1]}`,
27
+ },
28
+
29
+ "&:active": {
30
+ backgroundColor: theme.palette.saleor.active[5],
31
+ },
32
+ },
33
+ buttonSelected: {
34
+ color: theme.palette.common.white,
35
+ backgroundColor: theme.palette.saleor.active[1],
36
+ },
37
+ }));
38
+
39
+ export const SwitchSelectorButton: React.FC<SwitchSelectorButtonProps> = ({
40
+ onClick,
41
+ value,
42
+ children,
43
+ activeTab,
44
+ }) => {
45
+ const classes = useSwitchSelectorButtonStyles();
46
+
47
+ return (
48
+ <Button
49
+ key={value}
50
+ onClick={onClick}
51
+ className={clsx(classes.root, {
52
+ [classes.buttonSelected]: value === activeTab,
53
+ })}
54
+ >
55
+ {children}
56
+ </Button>
57
+ );
58
+ };
59
+
60
+ SwitchSelectorButton.displayName = "SwitchSelectorButton";
@@ -0,0 +1,2 @@
1
+ export * from "./SwitchSelector";
2
+ export * from "./SwitchSelectorButton";
package/src/consts.ts CHANGED
@@ -1 +1,5 @@
1
1
  export const isWindowDefined = typeof window !== "undefined";
2
+ export const zIndex = {
3
+ dialog: 1300,
4
+ popper: 1301,
5
+ };
package/src/index.tsx CHANGED
@@ -33,3 +33,6 @@ export * from "./List";
33
33
  export * from "./NavigationCard";
34
34
  export * from "./Pill";
35
35
  export * from "./CircleIndicator";
36
+ export * from "./SwitchSelector";
37
+ export * from "./Autocomplete";
38
+ export * from "./MultipleValueAutocomplete";
@@ -163,7 +163,6 @@ export const createTheme = (colors: SaleorThemeColors): SaleorTheme =>
163
163
  "&$selected, &$selected:focus, &$selected:hover": {
164
164
  backgroundColor: [colors.active[5], "!important"] as any,
165
165
  color: colors.active[1],
166
- fontWeight: 700,
167
166
  },
168
167
  "&:hover": {
169
168
  backgroundColor: [colors.active[5], "!important"] as any,
@@ -171,6 +170,7 @@ export const createTheme = (colors: SaleorThemeColors): SaleorTheme =>
171
170
  "@media(min-width: 600px)": {
172
171
  minHeight: 48,
173
172
  },
173
+ cursor: "pointer",
174
174
  },
175
175
  },
176
176
  MuiSelect: {
@@ -0,0 +1,20 @@
1
+ import { Dispatch, SetStateAction, useEffect, useState } from "react";
2
+
3
+ export function useTextWidth(
4
+ font: string
5
+ ): [number, Dispatch<SetStateAction<string>>] {
6
+ const [text, setText] = useState("");
7
+ const [width, setWidth] = useState(0);
8
+
9
+ useEffect(() => {
10
+ const canvas = document.createElement("canvas");
11
+ const context = canvas.getContext("2d")!;
12
+ context.font = font;
13
+ const { width: newWidth } = context.measureText(text);
14
+ canvas.remove();
15
+
16
+ setWidth(newWidth + 8);
17
+ }, [text, font]);
18
+
19
+ return [width, setText];
20
+ }
@@ -0,0 +1,14 @@
1
+ import type { Ref } from "react";
2
+
3
+ export function mergeRefs<T>(...refs: Ref<T>[]) {
4
+ return (node: T) => {
5
+ for (const ref of refs) {
6
+ if (typeof ref === "function") {
7
+ ref(node);
8
+ } else {
9
+ // ref.current is typed as readonly
10
+ (ref as any).current = node;
11
+ }
12
+ }
13
+ };
14
+ }
@@ -0,0 +1,37 @@
1
+ import { score } from "fuzzaldrin";
2
+ import { sortBy } from "lodash";
3
+ import { useEffect, useMemo, useState } from "react";
4
+
5
+ const pageSize = 10;
6
+
7
+ export function useMockAutocomplete(
8
+ choices: Array<Record<"label" | "value", string>>
9
+ ) {
10
+ const [query, setQuery] = useState("");
11
+ const [slice, setSlice] = useState(pageSize);
12
+ const results = useMemo(
13
+ () =>
14
+ sortBy(
15
+ choices.map((choice) => ({
16
+ ...choice,
17
+ score: -score(choice.label, query),
18
+ })),
19
+ "score"
20
+ ).slice(0, slice),
21
+ [query]
22
+ );
23
+
24
+ useEffect(() => {
25
+ setSlice(pageSize);
26
+ }, [query]);
27
+
28
+ const search = (query: string) => setTimeout(() => setQuery(query), 300);
29
+
30
+ const more = () => setSlice((s) => s + pageSize);
31
+
32
+ return {
33
+ search,
34
+ results,
35
+ more,
36
+ };
37
+ }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export interface ColorSwatchProps {
3
- color: string;
4
- className?: string;
5
- }
6
- export declare const ColorSwatch: ({ color, className }: ColorSwatchProps) => JSX.Element;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import { ChipProps } from "../Chip";
3
- export interface ChipMovableProps extends ChipProps {
4
- }
5
- export declare const ChipMovable: React.ForwardRefExoticComponent<Pick<ChipMovableProps, "children" | "slot" | "style" | "title" | "dir" | "color" | "translate" | "hidden" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "key" | "endAdornment" | "startAdornment"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { ChipProps } from "../Chip";
3
- export interface ChipRemovableProps extends ChipProps {
4
- onRemove?: () => void;
5
- }
6
- export declare const ChipRemovable: React.ForwardRefExoticComponent<Pick<ChipRemovableProps, "children" | "slot" | "style" | "title" | "dir" | "color" | "translate" | "hidden" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "key" | "endAdornment" | "startAdornment" | "onRemove"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import { ChipProps } from "../Chip";
3
- export interface ChipSwatchProps extends Omit<ChipProps, "startAdornment"> {
4
- onRemove?: () => void;
5
- color: string;
6
- }
7
- export declare const ChipSwatch: React.ForwardRefExoticComponent<Pick<ChipSwatchProps, "children" | "slot" | "style" | "title" | "dir" | "color" | "translate" | "hidden" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "key" | "endAdornment" | "onRemove"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +0,0 @@
1
- export * from "./ChipMovable";
2
- export * from "./ChipRemovable";
3
- export * from "./ChipSwatch";
Binary file