@workday/canvas-kit-react 8.0.0-alpha.111-next.0 → 8.0.0-alpha.121-next.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.
- package/action-bar/lib/ActionBarItem.tsx +1 -6
- package/action-bar/lib/ActionBarList.tsx +3 -3
- package/checkbox/lib/Checkbox.tsx +106 -54
- package/collection/lib/ListBox.tsx +1 -1
- package/collection/lib/useListRenderItem.tsx +24 -14
- package/collection/lib/useOverflowListModel.tsx +11 -2
- package/common/lib/InputProvider.tsx +1 -1
- package/common/lib/utils/StaticStates.tsx +2 -2
- package/common/lib/utils/components.ts +3 -3
- package/common/lib/utils/index.ts +1 -0
- package/common/lib/utils/useModalityType.ts +65 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +4 -6
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +1 -4
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.js +0 -5
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +3 -3
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +2 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.d.ts +4 -0
- package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.js +65 -34
- package/dist/commonjs/collection/lib/ListBox.d.ts +1 -1
- package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListRenderItem.d.ts +1 -1
- package/dist/commonjs/collection/lib/useListRenderItem.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListRenderItem.js +21 -11
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts +10 -0
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListModel.js +10 -4
- package/dist/commonjs/common/lib/InputProvider.d.ts +2 -2
- package/dist/commonjs/common/lib/InputProvider.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts +2 -2
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/components.d.ts +3 -3
- package/dist/commonjs/common/lib/utils/components.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.d.ts +1 -0
- package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.js +1 -0
- package/dist/commonjs/common/lib/utils/useModalityType.d.ts +17 -0
- package/dist/commonjs/common/lib/utils/useModalityType.d.ts.map +1 -0
- package/dist/commonjs/common/lib/utils/useModalityType.js +63 -0
- package/dist/commonjs/form-field/lib/FormField.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Label.d.ts +1 -1
- package/dist/commonjs/form-field/lib/Label.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/types.d.ts +11 -1
- package/dist/commonjs/layout/lib/utils/types.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/types.js +2 -0
- package/dist/commonjs/menu/lib/Menu.d.ts +1 -1
- package/dist/commonjs/menu/lib/MenuList.d.ts +3 -3
- package/dist/commonjs/menu/lib/MenuList.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.d.ts +0 -1
- package/dist/commonjs/modal/lib/ModalOverlay.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageButton.js +8 -6
- package/dist/commonjs/pagination/lib/Pagination/PageList.d.ts +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageList.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/Radio.d.ts +1 -0
- package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/Radio.js +74 -26
- package/dist/commonjs/tabs/lib/Tabs.d.ts +5 -4
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.js +4 -3
- package/dist/commonjs/tabs/lib/TabsList.d.ts +2 -2
- package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.js +17 -2
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts +2 -2
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts +2 -2
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts +55 -159
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/useTabsModel.js +2 -0
- package/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
- package/dist/commonjs/text-input/lib/InputIconContainer.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBar.d.ts +5 -7
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +1 -4
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.js +1 -6
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +3 -3
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts +2 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/es6/button/lib/BaseButton.d.ts +1 -1
- package/dist/es6/checkbox/lib/Checkbox.d.ts +4 -0
- package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.js +65 -34
- package/dist/es6/collection/lib/ListBox.d.ts +1 -1
- package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListRenderItem.d.ts +1 -1
- package/dist/es6/collection/lib/useListRenderItem.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListRenderItem.js +21 -11
- package/dist/es6/collection/lib/useOverflowListModel.d.ts +10 -0
- package/dist/es6/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListModel.js +10 -4
- package/dist/es6/common/lib/InputProvider.d.ts +2 -2
- package/dist/es6/common/lib/InputProvider.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/StaticStates.d.ts +2 -2
- package/dist/es6/common/lib/utils/StaticStates.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/components.d.ts +6 -6
- package/dist/es6/common/lib/utils/components.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.d.ts +1 -0
- package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.js +1 -0
- package/dist/es6/common/lib/utils/useModalityType.d.ts +17 -0
- package/dist/es6/common/lib/utils/useModalityType.d.ts.map +1 -0
- package/dist/es6/common/lib/utils/useModalityType.js +56 -0
- package/dist/es6/form-field/lib/FormField.d.ts +1 -1
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Label.d.ts +1 -1
- package/dist/es6/form-field/lib/Label.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/types.d.ts +11 -1
- package/dist/es6/layout/lib/utils/types.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/types.js +2 -0
- package/dist/es6/menu/lib/Menu.d.ts +2 -2
- package/dist/es6/menu/lib/MenuItem.d.ts +1 -1
- package/dist/es6/menu/lib/MenuList.d.ts +3 -3
- package/dist/es6/menu/lib/MenuList.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalOverlay.d.ts +0 -1
- package/dist/es6/modal/lib/ModalOverlay.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/PageButton.js +9 -7
- package/dist/es6/pagination/lib/Pagination/PageList.d.ts +1 -1
- package/dist/es6/pagination/lib/Pagination/PageList.d.ts.map +1 -1
- package/dist/es6/radio/lib/Radio.d.ts +1 -0
- package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
- package/dist/es6/radio/lib/Radio.js +74 -26
- package/dist/es6/tabs/lib/Tabs.d.ts +6 -5
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.js +5 -4
- package/dist/es6/tabs/lib/TabsList.d.ts +2 -2
- package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.js +18 -3
- package/dist/es6/tabs/lib/TabsPanel.d.ts +2 -2
- package/dist/es6/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanels.d.ts +2 -2
- package/dist/es6/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/es6/tabs/lib/useTabsModel.d.ts +55 -159
- package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/es6/tabs/lib/useTabsModel.js +3 -1
- package/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
- package/dist/es6/text-input/lib/InputIconContainer.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/TooltipContainer.d.ts +1 -1
- package/form-field/lib/FormField.tsx +1 -1
- package/form-field/lib/Label.tsx +1 -1
- package/layout/lib/utils/types.ts +64 -13
- package/menu/lib/MenuList.tsx +3 -2
- package/modal/lib/ModalOverlay.tsx +2 -4
- package/package.json +9 -9
- package/pagination/lib/Pagination/AdditionalDetails.tsx +1 -1
- package/pagination/lib/Pagination/GoTo/Label.tsx +2 -1
- package/pagination/lib/Pagination/PageButton.tsx +13 -7
- package/pagination/lib/Pagination/PageList.tsx +1 -1
- package/popup/lib/hooks/useCloseOnFullscreenExit.ts +1 -1
- package/popup/lib/hooks/useTransferOnFullscreenEnter.ts +1 -1
- package/popup/lib/hooks/useTransferOnFullscreenExit.ts +1 -1
- package/radio/lib/Radio.tsx +98 -29
- package/tabs/lib/TabsItem.tsx +4 -3
- package/tabs/lib/TabsList.tsx +25 -5
- package/tabs/lib/TabsPanel.tsx +1 -1
- package/tabs/lib/TabsPanels.tsx +1 -1
- package/tabs/lib/useTabsModel.tsx +3 -1
- package/text-input/lib/InputIconContainer.tsx +3 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {composeHooks,
|
|
3
|
-
import {SystemIcon} from '@workday/canvas-kit-react/icon';
|
|
2
|
+
import {composeHooks, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
4
3
|
import {SecondaryButton} from '@workday/canvas-kit-react/button';
|
|
5
4
|
import {
|
|
6
5
|
useListItemRegister,
|
|
@@ -37,10 +36,6 @@ export const ActionBarItem = createSubcomponent(SecondaryButton)({
|
|
|
37
36
|
displayName: 'ActionBar.Item',
|
|
38
37
|
modelHook: useActionBarModel,
|
|
39
38
|
elemPropsHook: useActionBarItem,
|
|
40
|
-
subComponents: {
|
|
41
|
-
Icon: SystemIcon,
|
|
42
|
-
Text: EllipsisText,
|
|
43
|
-
},
|
|
44
39
|
})<ActionBarItemProps>((elemProps, Element) => {
|
|
45
40
|
return <Element {...elemProps} />;
|
|
46
41
|
});
|
|
@@ -19,8 +19,8 @@ import {useActionBarModel} from './useActionBarModel';
|
|
|
19
19
|
import {ActionBar} from './ActionBar';
|
|
20
20
|
|
|
21
21
|
// Use `Partial` here to make `spacing` optional
|
|
22
|
-
export interface ActionBarListProps<T =
|
|
23
|
-
extends Partial<ExtractProps<typeof HStack, never
|
|
22
|
+
export interface ActionBarListProps<T = any>
|
|
23
|
+
extends Omit<Partial<ExtractProps<typeof HStack, never>>, 'children'> {
|
|
24
24
|
/**
|
|
25
25
|
* If items are passed to a `ActionBarModel`, the child of `ActionBar.List` should be a render prop. The
|
|
26
26
|
* List will determine how and when the item will be rendered.
|
|
@@ -30,7 +30,7 @@ export interface ActionBarListProps<T = unknown>
|
|
|
30
30
|
* {(item) => <ActionBar.Item key={item.id} name={item.name}>{item.text}</ActionBar.Item>}
|
|
31
31
|
* </ActionBar.List>
|
|
32
32
|
*/
|
|
33
|
-
children: ((item: T) => React.ReactNode) | React.ReactNode;
|
|
33
|
+
children: ((item: T, index: number) => React.ReactNode) | React.ReactNode;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const ResponsiveHStack = styled(HStack)<ActionBarListProps & StyledType>(({theme}) => ({
|
|
@@ -58,6 +58,10 @@ export interface CheckboxProps extends Themeable {
|
|
|
58
58
|
* @default false
|
|
59
59
|
*/
|
|
60
60
|
indeterminate?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The variant for the checkbox
|
|
63
|
+
*/
|
|
64
|
+
variant?: 'inverse' | undefined;
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
const checkboxHeight = 18;
|
|
@@ -87,16 +91,20 @@ const CheckboxInputWrapper = styled('div')<Pick<CheckboxProps, 'disabled'>>({
|
|
|
87
91
|
alignSelf: 'flex-start',
|
|
88
92
|
});
|
|
89
93
|
|
|
90
|
-
const CheckboxRipple = styled('span')<Pick<CheckboxProps, 'disabled'>>(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
94
|
+
const CheckboxRipple = styled('span')<Pick<CheckboxProps, 'disabled' | 'variant'>>(
|
|
95
|
+
{
|
|
96
|
+
borderRadius: borderRadius.circle,
|
|
97
|
+
boxShadow: `0 0 0 0 ${colors.soap200}`,
|
|
98
|
+
height: checkboxHeight,
|
|
99
|
+
transition: 'box-shadow 150ms ease-out',
|
|
100
|
+
width: checkboxWidth,
|
|
101
|
+
position: 'absolute',
|
|
102
|
+
pointerEvents: 'none', // This is a decorative element we don't want it to block clicks to input
|
|
103
|
+
},
|
|
104
|
+
({variant}) => ({
|
|
105
|
+
opacity: variant === 'inverse' ? '0.4' : '1',
|
|
106
|
+
})
|
|
107
|
+
);
|
|
100
108
|
|
|
101
109
|
/**
|
|
102
110
|
* Note: `~ div:first-of-type` refers to `CheckboxBackground`
|
|
@@ -112,6 +120,7 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
|
|
|
112
120
|
},
|
|
113
121
|
},
|
|
114
122
|
},
|
|
123
|
+
variant,
|
|
115
124
|
}) => ({
|
|
116
125
|
borderRadius: borderRadius.s,
|
|
117
126
|
width: checkboxTapArea,
|
|
@@ -129,20 +138,21 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
|
|
|
129
138
|
// States
|
|
130
139
|
'&:not(:checked):not(:disabled):not(:focus):hover, &:not(:checked):not(:disabled):active': {
|
|
131
140
|
'~ div:first-of-type': {
|
|
132
|
-
borderColor: inputColors.hoverBorder,
|
|
141
|
+
borderColor: variant === 'inverse' ? colors.soap300 : inputColors.hoverBorder,
|
|
133
142
|
},
|
|
134
143
|
},
|
|
135
144
|
'&:checked ~ div:first-of-type': {
|
|
136
|
-
borderColor: themePrimary.main,
|
|
137
|
-
backgroundColor: themePrimary.main,
|
|
145
|
+
borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.main,
|
|
146
|
+
backgroundColor: variant === 'inverse' ? colors.frenchVanilla100 : themePrimary.main,
|
|
138
147
|
},
|
|
139
148
|
'&:disabled ~ div:first-of-type': {
|
|
140
149
|
borderColor: inputColors.disabled.border,
|
|
141
|
-
backgroundColor: inputColors.disabled.background,
|
|
150
|
+
backgroundColor: variant === 'inverse' ? colors.soap300 : inputColors.disabled.background,
|
|
151
|
+
opacity: variant === 'inverse' ? '.4' : '1',
|
|
142
152
|
},
|
|
143
153
|
'&:disabled:checked ~ div:first-of-type': {
|
|
144
|
-
borderColor: themePrimary.light,
|
|
145
|
-
backgroundColor: themePrimary.light,
|
|
154
|
+
borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
|
|
155
|
+
backgroundColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
|
|
146
156
|
},
|
|
147
157
|
|
|
148
158
|
// Focus
|
|
@@ -150,30 +160,48 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
|
|
|
150
160
|
outline: 'none',
|
|
151
161
|
},
|
|
152
162
|
'&:focus ~ div:first-of-type': {
|
|
153
|
-
borderColor: themePrimary.main,
|
|
163
|
+
borderColor: variant === 'inverse' ? colors.blackPepper400 : themePrimary.main,
|
|
154
164
|
borderWidth: '2px',
|
|
155
165
|
boxShadow: 'none',
|
|
166
|
+
...focusRing({
|
|
167
|
+
width: variant === 'inverse' ? 2 : 0,
|
|
168
|
+
separation: 0,
|
|
169
|
+
animate: false,
|
|
170
|
+
innerColor: variant === 'inverse' ? colors.blackPepper400 : undefined,
|
|
171
|
+
outerColor: variant === 'inverse' ? colors.frenchVanilla100 : undefined,
|
|
172
|
+
}),
|
|
156
173
|
},
|
|
157
174
|
'&:checked:focus ~ div:first-of-type': {
|
|
158
|
-
...focusRing({
|
|
175
|
+
...focusRing({
|
|
176
|
+
width: 2,
|
|
177
|
+
separation: 2,
|
|
178
|
+
animate: false,
|
|
179
|
+
innerColor: variant === 'inverse' ? colors.blackPepper400 : undefined,
|
|
180
|
+
outerColor: variant === 'inverse' ? colors.frenchVanilla100 : themeFocusOutline,
|
|
181
|
+
}),
|
|
182
|
+
borderColor: variant === 'inverse' ? colors.frenchVanilla100 : themePrimary.main,
|
|
183
|
+
borderWidth: '2px',
|
|
159
184
|
'& span': {
|
|
160
185
|
marginLeft: '-7px',
|
|
161
186
|
},
|
|
162
187
|
},
|
|
163
188
|
...mouseFocusBehavior({
|
|
164
189
|
'&:focus ~ div:first-of-type': {
|
|
165
|
-
border:
|
|
190
|
+
border:
|
|
191
|
+
variant === 'inverse'
|
|
192
|
+
? `1px solid ${colors.soap300}`
|
|
193
|
+
: `1px solid ${inputColors.hoverBorder}`,
|
|
166
194
|
boxShadow: 'none',
|
|
167
195
|
'& span': {
|
|
168
196
|
marginLeft: '-6px',
|
|
169
197
|
},
|
|
170
198
|
},
|
|
171
199
|
'&:checked ~ div:first-of-type': {
|
|
172
|
-
borderColor: themePrimary.main,
|
|
200
|
+
borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.main,
|
|
173
201
|
},
|
|
174
202
|
'&:disabled:checked ~ div:first-of-type': {
|
|
175
203
|
borderColor: themePrimary.light,
|
|
176
|
-
backgroundColor: themePrimary.light,
|
|
204
|
+
backgroundColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
|
|
177
205
|
},
|
|
178
206
|
}),
|
|
179
207
|
}),
|
|
@@ -182,7 +210,7 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
|
|
|
182
210
|
boxShadow: disabled ? undefined : `0 0 0 ${rippleRadius}px ${colors.soap200}`,
|
|
183
211
|
},
|
|
184
212
|
}),
|
|
185
|
-
({theme, error}) => {
|
|
213
|
+
({theme, error, variant}) => {
|
|
186
214
|
const errorColors = getErrorColors(error, theme);
|
|
187
215
|
|
|
188
216
|
if (errorColors.outer === errorColors.inner) {
|
|
@@ -191,24 +219,24 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
|
|
|
191
219
|
|
|
192
220
|
const errorStyles = {
|
|
193
221
|
'& ~ div:first-of-type': {
|
|
194
|
-
border:
|
|
222
|
+
border:
|
|
223
|
+
variant === 'inverse' ? `1px solid ${colors.soap300}` : `1px solid ${errorColors.inner}`,
|
|
195
224
|
boxShadow: `0 0 0 1px ${errorColors.inner}, 0 0 0 2px ${errorColors.outer}`,
|
|
196
225
|
},
|
|
197
226
|
'&:not(:checked):not(:disabled):not(:focus):hover, &:not(:checked):not(:disabled):active': {
|
|
198
227
|
'~ div:first-of-type': {
|
|
199
|
-
borderColor: errorColors.inner,
|
|
228
|
+
borderColor: variant === 'inverse' ? `1px solid ${colors.soap300}` : errorColors.inner,
|
|
200
229
|
},
|
|
201
230
|
},
|
|
202
231
|
'&:checked ~ div:first-of-type': {
|
|
203
|
-
borderColor: theme.canvas.palette.primary.main,
|
|
232
|
+
borderColor: variant === 'inverse' ? colors.soap300 : theme.canvas.palette.primary.main,
|
|
204
233
|
boxShadow: `
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
234
|
+
0 0 0 2px ${colors.frenchVanilla100},
|
|
235
|
+
0 0 0 4px ${errorColors.inner},
|
|
236
|
+
0 0 0 5px ${errorColors.outer}`,
|
|
208
237
|
},
|
|
209
238
|
};
|
|
210
239
|
return {
|
|
211
|
-
...errorStyles,
|
|
212
240
|
// Error rings take precedence over focus
|
|
213
241
|
...mouseFocusBehavior({
|
|
214
242
|
...errorStyles,
|
|
@@ -217,25 +245,30 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
|
|
|
217
245
|
boxShadow: `0 0 0 1px ${errorColors.inner}, 0 0 0 2px ${errorColors.outer}`,
|
|
218
246
|
},
|
|
219
247
|
}),
|
|
248
|
+
...errorStyles,
|
|
220
249
|
};
|
|
221
250
|
}
|
|
222
251
|
);
|
|
223
252
|
|
|
224
|
-
const CheckboxBackground = styled('div')<CheckboxProps>(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
253
|
+
const CheckboxBackground = styled('div')<CheckboxProps>(
|
|
254
|
+
{
|
|
255
|
+
alignItems: 'center',
|
|
256
|
+
backgroundColor: colors.frenchVanilla100,
|
|
257
|
+
borderRadius: borderRadius.s,
|
|
258
|
+
boxSizing: 'border-box',
|
|
259
|
+
display: 'flex',
|
|
260
|
+
height: checkboxHeight,
|
|
261
|
+
justifyContent: 'center',
|
|
262
|
+
padding: '0px 2px',
|
|
263
|
+
pointerEvents: 'none',
|
|
264
|
+
position: 'absolute',
|
|
265
|
+
transition: 'border 200ms ease, background 200ms',
|
|
266
|
+
width: checkboxWidth,
|
|
267
|
+
},
|
|
268
|
+
({variant}) => ({
|
|
269
|
+
border: `1px solid ${variant === 'inverse' ? colors.soap300 : inputColors.border}`,
|
|
270
|
+
})
|
|
271
|
+
);
|
|
239
272
|
|
|
240
273
|
const CheckboxCheck = styled('div')<Pick<CheckboxProps, 'checked'>>(
|
|
241
274
|
{
|
|
@@ -261,22 +294,32 @@ const CheckboxCheck = styled('div')<Pick<CheckboxProps, 'checked'>>(
|
|
|
261
294
|
})
|
|
262
295
|
);
|
|
263
296
|
|
|
264
|
-
const IndeterminateBox = styled('div')(
|
|
297
|
+
const IndeterminateBox = styled('div')<CheckboxProps>(
|
|
265
298
|
{
|
|
266
299
|
width: '10px',
|
|
267
300
|
height: '2px',
|
|
268
301
|
},
|
|
269
|
-
({theme}) => ({
|
|
270
|
-
backgroundColor:
|
|
302
|
+
({theme, variant}) => ({
|
|
303
|
+
backgroundColor:
|
|
304
|
+
variant === 'inverse'
|
|
305
|
+
? theme.canvas.palette.primary.main
|
|
306
|
+
: theme.canvas.palette.primary.contrast,
|
|
271
307
|
})
|
|
272
308
|
);
|
|
273
309
|
|
|
274
|
-
const CheckboxLabel = styled('label')<{disabled?: boolean}>(
|
|
310
|
+
const CheckboxLabel = styled('label')<{disabled?: boolean; variant?: string}>(
|
|
275
311
|
{
|
|
276
312
|
...canvas.type.levels.subtext.large,
|
|
277
313
|
paddingLeft: checkboxLabelDistance,
|
|
278
314
|
},
|
|
279
|
-
({
|
|
315
|
+
({variant}) => (variant === 'inverse' ? {color: colors.frenchVanilla100} : undefined),
|
|
316
|
+
({disabled, variant}) =>
|
|
317
|
+
disabled
|
|
318
|
+
? {
|
|
319
|
+
color: variant === 'inverse' ? colors.frenchVanilla100 : inputColors.disabled.text,
|
|
320
|
+
opacity: variant === 'inverse' ? '.4' : '1',
|
|
321
|
+
}
|
|
322
|
+
: {cursor: 'pointer'}
|
|
280
323
|
);
|
|
281
324
|
|
|
282
325
|
export const Checkbox = createComponent('input')({
|
|
@@ -294,6 +337,7 @@ export const Checkbox = createComponent('input')({
|
|
|
294
337
|
value,
|
|
295
338
|
error,
|
|
296
339
|
indeterminate,
|
|
340
|
+
variant,
|
|
297
341
|
...elemProps
|
|
298
342
|
}: CheckboxProps,
|
|
299
343
|
ref,
|
|
@@ -313,22 +357,30 @@ export const Checkbox = createComponent('input')({
|
|
|
313
357
|
type="checkbox"
|
|
314
358
|
value={value}
|
|
315
359
|
error={error}
|
|
360
|
+
variant={variant}
|
|
316
361
|
aria-checked={indeterminate ? 'mixed' : checked}
|
|
317
362
|
{...elemProps}
|
|
318
363
|
/>
|
|
319
|
-
<CheckboxRipple />
|
|
320
|
-
<CheckboxBackground checked={checked} disabled={disabled}>
|
|
364
|
+
<CheckboxRipple variant={variant} />
|
|
365
|
+
<CheckboxBackground variant={variant} checked={checked} disabled={disabled}>
|
|
321
366
|
<CheckboxCheck checked={checked}>
|
|
322
367
|
{indeterminate ? (
|
|
323
|
-
<IndeterminateBox />
|
|
368
|
+
<IndeterminateBox variant={variant} />
|
|
324
369
|
) : (
|
|
325
|
-
<SystemIcon
|
|
370
|
+
<SystemIcon
|
|
371
|
+
icon={checkSmallIcon}
|
|
372
|
+
color={
|
|
373
|
+
variant === 'inverse'
|
|
374
|
+
? theme.canvas.palette.primary.main
|
|
375
|
+
: theme.canvas.palette.primary.contrast
|
|
376
|
+
}
|
|
377
|
+
/>
|
|
326
378
|
)}
|
|
327
379
|
</CheckboxCheck>
|
|
328
380
|
</CheckboxBackground>
|
|
329
381
|
</CheckboxInputWrapper>
|
|
330
382
|
{label && (
|
|
331
|
-
<CheckboxLabel htmlFor={inputId} disabled={disabled}>
|
|
383
|
+
<CheckboxLabel variant={variant} htmlFor={inputId} disabled={disabled}>
|
|
332
384
|
{label}
|
|
333
385
|
</CheckboxLabel>
|
|
334
386
|
)}
|
|
@@ -10,7 +10,7 @@ import {useListModel} from './useListModel';
|
|
|
10
10
|
import {useListRenderItems} from './useListRenderItem';
|
|
11
11
|
import {useListItemRegister} from './useListItemRegister';
|
|
12
12
|
|
|
13
|
-
export interface ListBoxProps extends BoxProps {
|
|
13
|
+
export interface ListBoxProps extends Omit<BoxProps, 'children'> {
|
|
14
14
|
children?: React.ReactNode | ((item: any) => React.ReactNode);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -7,26 +7,36 @@ import {useBaseListModel} from './useBaseListModel';
|
|
|
7
7
|
export function useListRenderItems<T>(
|
|
8
8
|
model: ReturnType<typeof useBaseListModel>,
|
|
9
9
|
children: ((item: Generic, index: number) => React.ReactNode) | React.ReactNode
|
|
10
|
-
) {
|
|
10
|
+
): React.ReactNode {
|
|
11
11
|
const items =
|
|
12
12
|
typeof children === 'function'
|
|
13
13
|
? model.state.isVirtualized
|
|
14
14
|
? model.state.UNSTABLE_virtual.virtualItems.map(virtual => {
|
|
15
15
|
const item = model.state.items[virtual.index];
|
|
16
16
|
const child = children(item.value, virtual.index);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
if (React.isValidElement(child)) {
|
|
18
|
+
return React.cloneElement(child, {
|
|
19
|
+
// We call this `virtual` instead of `virtualItem` to avoid a React render warning
|
|
20
|
+
// about capital letters in attributes. React thinks this will be applied to the DOM
|
|
21
|
+
// element even though we remove it later...
|
|
22
|
+
virtual,
|
|
23
|
+
key: item.id,
|
|
24
|
+
item,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return child;
|
|
25
28
|
})
|
|
26
|
-
: model.state.items.map(item =>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
: model.state.items.map(item => {
|
|
30
|
+
const child = children(item.value, item.index);
|
|
31
|
+
if (React.isValidElement(child)) {
|
|
32
|
+
return React.cloneElement(child, {
|
|
33
|
+
key: item.id,
|
|
34
|
+
item: item.value,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return child;
|
|
38
|
+
})
|
|
39
|
+
: children;
|
|
30
40
|
|
|
31
|
-
return items
|
|
41
|
+
return items;
|
|
32
42
|
}
|
|
@@ -55,10 +55,17 @@ export const useOverflowListModel = createModelHook({
|
|
|
55
55
|
...useSelectionListModel.defaultConfig,
|
|
56
56
|
initialHiddenIds: [] as string[],
|
|
57
57
|
containerWidth: 0,
|
|
58
|
+
/**
|
|
59
|
+
* Determines if overflow should actually occur. For example, touch devices are better at
|
|
60
|
+
* side-scrolling than mouse devices. In these cases, it makes sense to disable overflowing.
|
|
61
|
+
* @default true
|
|
62
|
+
*/ shouldCalculateOverflow: true,
|
|
58
63
|
},
|
|
59
64
|
requiredConfig: useSelectionListModel.requiredConfig,
|
|
60
65
|
contextOverride: useSelectionListModel.Context,
|
|
61
66
|
})(config => {
|
|
67
|
+
const shouldCalculateOverflow =
|
|
68
|
+
config.shouldCalculateOverflow === undefined ? true : config.shouldCalculateOverflow;
|
|
62
69
|
const [hiddenIds, setHiddenIds] = React.useState(config.initialHiddenIds);
|
|
63
70
|
const [itemWidthCache, setItemWidthCache] = React.useState<Record<string, number>>({});
|
|
64
71
|
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
@@ -67,9 +74,11 @@ export const useOverflowListModel = createModelHook({
|
|
|
67
74
|
const [overflowTargetWidth, setOverflowTargetWidth] = React.useState(0);
|
|
68
75
|
const overflowTargetWidthRef = React.useRef(0);
|
|
69
76
|
|
|
77
|
+
const internalHiddenIds = shouldCalculateOverflow ? hiddenIds : [];
|
|
78
|
+
|
|
70
79
|
// Cursors skip over disabled ids, but know nothing of hidden ids. We'll go ahead and disable
|
|
71
80
|
// hidden ids as well
|
|
72
|
-
const nonInteractiveIds = (config.nonInteractiveIds || []).concat(
|
|
81
|
+
const nonInteractiveIds = (config.nonInteractiveIds || []).concat(internalHiddenIds);
|
|
73
82
|
|
|
74
83
|
const model = useSelectionListModel({
|
|
75
84
|
...config,
|
|
@@ -78,7 +87,7 @@ export const useOverflowListModel = createModelHook({
|
|
|
78
87
|
|
|
79
88
|
const state = {
|
|
80
89
|
...model.state,
|
|
81
|
-
hiddenIds,
|
|
90
|
+
hiddenIds: internalHiddenIds,
|
|
82
91
|
itemWidthCache,
|
|
83
92
|
containerWidth,
|
|
84
93
|
overflowTargetWidth,
|
|
@@ -117,7 +117,7 @@ const supportsPassive = () => {
|
|
|
117
117
|
/**
|
|
118
118
|
* This component takes heavy inspiration from what-input (https://github.com/ten1seven/what-input)
|
|
119
119
|
*/
|
|
120
|
-
export class InputProvider extends React.Component<InputProviderProps
|
|
120
|
+
export class InputProvider extends React.Component<React.PropsWithChildren<InputProviderProps>> {
|
|
121
121
|
private eventTimer: number | undefined;
|
|
122
122
|
|
|
123
123
|
private currentInput: InputType;
|
|
@@ -29,8 +29,8 @@ export const convertToStaticStates = (obj?: CSSProperties): CSSProperties | unde
|
|
|
29
29
|
}, {});
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export const StaticStates: React.FC<
|
|
33
|
-
HTMLElement
|
|
32
|
+
export const StaticStates: React.FC<React.PropsWithChildren<
|
|
33
|
+
{theme?: PartialEmotionCanvasTheme} & React.HTMLAttributes<HTMLElement>
|
|
34
34
|
>> = ({children, theme, ...elemProps}) => {
|
|
35
35
|
const localTheme: EmotionCanvasTheme & {_staticStates?: boolean} = useTheme(theme);
|
|
36
36
|
localTheme._staticStates = true;
|
|
@@ -212,7 +212,7 @@ interface RefForwardingComponent<T, P = {}> {
|
|
|
212
212
|
* `never`
|
|
213
213
|
*/
|
|
214
214
|
Element: T extends undefined ? never : T
|
|
215
|
-
):
|
|
215
|
+
): JSX.Element | null;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
function defaultGetElemProps(input: any) {
|
|
@@ -256,7 +256,7 @@ export const createContainer = <
|
|
|
256
256
|
props: Props & RemoveNull<ReturnType<TElemPropsHook>> & {ref: ExtractRef<E>},
|
|
257
257
|
Element: E extends undefined ? never : E,
|
|
258
258
|
model: TModelHook extends (config: infer TConfig) => infer TModel ? TModel : never
|
|
259
|
-
) =>
|
|
259
|
+
) => JSX.Element | null
|
|
260
260
|
): (TModelHook extends (config: infer TConfig) => infer TModel
|
|
261
261
|
? E extends undefined
|
|
262
262
|
? ComponentM<Props & TConfig, TModel>
|
|
@@ -356,7 +356,7 @@ export const createSubcomponent = <
|
|
|
356
356
|
}),
|
|
357
357
|
Element: E extends undefined ? never : E,
|
|
358
358
|
model: TModelHook extends (...args: any[]) => infer TModel ? TModel : never
|
|
359
|
-
) =>
|
|
359
|
+
) => JSX.Element | null
|
|
360
360
|
): (TModelHook extends (...args: any[]) => infer TModel
|
|
361
361
|
? ElementComponentM<
|
|
362
362
|
// E is not `undefined` here, but Typescript thinks it could be, so we add another `undefined`
|
|
@@ -12,6 +12,7 @@ export * from './models';
|
|
|
12
12
|
export * from './elements';
|
|
13
13
|
export * from './useConstant';
|
|
14
14
|
export * from './useIsFullscreen';
|
|
15
|
+
export * from './useModalityType';
|
|
15
16
|
export * from './useWindowSize';
|
|
16
17
|
export * from './useResizeObserver';
|
|
17
18
|
export * from './StaticStates';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type Modality = 'mouse' | 'touch' | 'pen';
|
|
4
|
+
|
|
5
|
+
// Use this shared global value to reduce calls to localStorage which is a synchronous API to a
|
|
6
|
+
// drive which could be slow (spinning disks could be hundreds of ms). We read only once this way.
|
|
7
|
+
// The following initialization is very difficult to test via automation. Don't mess with it unless
|
|
8
|
+
// you plan to manually test.
|
|
9
|
+
//
|
|
10
|
+
// 1. Initialize modality to localStorage
|
|
11
|
+
// a. if localStorage isn't primed, use clientWidth of the browsers
|
|
12
|
+
// b. if < 768, default to 'touch'
|
|
13
|
+
// c. else default to 'mouse'
|
|
14
|
+
const localStorageValue = 'mouse' as Modality; //((typeof localStorage !== 'undefined'
|
|
15
|
+
// ? localStorage.getItem('modality')
|
|
16
|
+
// : '') ||
|
|
17
|
+
// (typeof document !== 'undefined'
|
|
18
|
+
// ? document.documentElement.clientWidth < 768
|
|
19
|
+
// ? 'touch'
|
|
20
|
+
// : ''
|
|
21
|
+
// : '') ||
|
|
22
|
+
// 'mouse') as Modality;
|
|
23
|
+
|
|
24
|
+
// Update the `localStorageValue`, but conditionally update localStorage only if the value has
|
|
25
|
+
// changed. This prevents too many calls to `localStorage` which can be costly on spinning disk
|
|
26
|
+
// drives
|
|
27
|
+
const updateLocalStorage = (value: Modality) => {
|
|
28
|
+
// if (localStorageValue !== value) {
|
|
29
|
+
// localStorage.setItem('modality', value);
|
|
30
|
+
// }
|
|
31
|
+
// localStorageValue = value;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Uses heuristics to determine if the user is on a touch device, uses a pen, or a mouse. This hook
|
|
36
|
+
* is useful if you have styles or behaviors that depend on the user's interaction type. For
|
|
37
|
+
* example, touch users can scroll horizontally easier than mouse users, so horizontal overflow
|
|
38
|
+
* might be more desired than overflow menus on touch devices. For devices that support multiple
|
|
39
|
+
* input types, the last used input type is saved. For these devices, consider the possibility this
|
|
40
|
+
* value could change after your component is rendered, so make sure you component rerenders
|
|
41
|
+
* properly in this case.
|
|
42
|
+
*
|
|
43
|
+
* Uses `PointerEvent.pointerType` to determine last used input.
|
|
44
|
+
*
|
|
45
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
|
|
46
|
+
*/
|
|
47
|
+
export const useModalityType = (): Modality => {
|
|
48
|
+
const [modality, setModality] = React.useState(localStorageValue);
|
|
49
|
+
|
|
50
|
+
React.useEffect(() => {
|
|
51
|
+
const handlePointerDown = (event: PointerEvent) => {
|
|
52
|
+
const value = event.pointerType as Modality;
|
|
53
|
+
setModality(value);
|
|
54
|
+
updateLocalStorage(value);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
document.addEventListener('pointerdown', handlePointerDown);
|
|
58
|
+
|
|
59
|
+
return () => {
|
|
60
|
+
document.removeEventListener('pointerdown', handlePointerDown);
|
|
61
|
+
};
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
return modality;
|
|
65
|
+
};
|
|
@@ -30,6 +30,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
|
|
|
30
30
|
}>;
|
|
31
31
|
initialHiddenIds: string[];
|
|
32
32
|
containerWidth: number;
|
|
33
|
+
shouldCalculateOverflow: boolean;
|
|
33
34
|
initialSelectedIds: import("../../collection/lib/useSelectionListModel").SelectedIds;
|
|
34
35
|
initialUnselectedIds: string[];
|
|
35
36
|
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
@@ -1389,7 +1390,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
|
|
|
1389
1390
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
1390
1391
|
getId: (item: any) => string;
|
|
1391
1392
|
}> & {
|
|
1392
|
-
List: import("../../common").ElementComponentM<"div", import("./ActionBarList").ActionBarListProps<
|
|
1393
|
+
List: import("../../common").ElementComponentM<"div", import("./ActionBarList").ActionBarListProps<any>, {
|
|
1393
1394
|
state: {
|
|
1394
1395
|
hiddenIds: string[];
|
|
1395
1396
|
nonInteractiveIds: string[];
|
|
@@ -1682,10 +1683,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
|
|
|
1682
1683
|
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
1683
1684
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
1684
1685
|
getId: (item: any) => string;
|
|
1685
|
-
}
|
|
1686
|
-
Icon: import("../../common").ElementComponent<"span", import("../..").SystemIconProps>;
|
|
1687
|
-
Text: import("../../common").ElementComponent<"span", {}>;
|
|
1688
|
-
};
|
|
1686
|
+
}>;
|
|
1689
1687
|
OverflowButton: import("../../common").ElementComponentM<"button", {}, {
|
|
1690
1688
|
state: {
|
|
1691
1689
|
hiddenIds: string[];
|
|
@@ -3148,7 +3146,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
|
|
|
3148
3146
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
3149
3147
|
getId: (item: any) => string;
|
|
3150
3148
|
}>;
|
|
3151
|
-
List: import("../../common").ElementComponentM<"div", import("../../menu/lib/MenuList").MenuListProps
|
|
3149
|
+
List: import("../../common").ElementComponentM<"div", import("../../menu/lib/MenuList").MenuListProps<any>, {
|
|
3152
3150
|
state: {
|
|
3153
3151
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
3154
3152
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -211,8 +211,5 @@ export declare const ActionBarItem: import("../../common").ElementComponentM<imp
|
|
|
211
211
|
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
212
212
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
213
213
|
getId: (item: any) => string;
|
|
214
|
-
}
|
|
215
|
-
Icon: import("../../common").ElementComponent<"span", import("../../icon").SystemIconProps>;
|
|
216
|
-
Text: import("../../common").ElementComponent<"span", {}>;
|
|
217
|
-
};
|
|
214
|
+
}>;
|
|
218
215
|
//# sourceMappingURL=ActionBarItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAI5B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC"}
|