@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
|
@@ -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>;
|
|
@@ -3287,7 +3285,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
|
|
|
3287
3285
|
Icon: import("../../common").ElementComponent<"span", import("../..").SystemIconProps>;
|
|
3288
3286
|
Text: import("@emotion/styled").StyledComponent<{
|
|
3289
3287
|
theme?: import("@emotion/react").Theme | undefined;
|
|
3290
|
-
as?: "symbol" | "object" | "
|
|
3288
|
+
as?: "symbol" | "object" | "s" | "big" | "link" | "small" | "sub" | "sup" | "circle" | "stop" | "path" | "style" | "map" | "filter" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "main" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "samp" | "slot" | "script" | "section" | "select" | "source" | "span" | "strong" | "summary" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
|
3291
3289
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3292
3290
|
};
|
|
3293
3291
|
Divider: import("../../common").ElementComponent<"hr", unknown>;
|
|
@@ -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;CAC3B;AAED,eAAO,MAAM,SAAS
|
|
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;CAC3B;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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"}
|
|
@@ -10,8 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
import { composeHooks,
|
|
14
|
-
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
13
|
+
import { composeHooks, createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
15
14
|
import { SecondaryButton } from '@workday/canvas-kit-react/button';
|
|
16
15
|
import { useListItemRegister, useListItemRovingFocus, useOverflowListItemMeasure, } from '@workday/canvas-kit-react/collection';
|
|
17
16
|
import { useActionBarModel } from './useActionBarModel';
|
|
@@ -20,10 +19,6 @@ export var ActionBarItem = createSubcomponent(SecondaryButton)({
|
|
|
20
19
|
displayName: 'ActionBar.Item',
|
|
21
20
|
modelHook: useActionBarModel,
|
|
22
21
|
elemPropsHook: useActionBarItem,
|
|
23
|
-
subComponents: {
|
|
24
|
-
Icon: SystemIcon,
|
|
25
|
-
Text: EllipsisText,
|
|
26
|
-
},
|
|
27
22
|
})(function (elemProps, Element) {
|
|
28
23
|
return React.createElement(Element, __assign({}, elemProps));
|
|
29
24
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { HStack } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
export interface ActionBarListProps<T =
|
|
4
|
+
export interface ActionBarListProps<T = any> extends Omit<Partial<ExtractProps<typeof HStack, never>>, 'children'> {
|
|
5
5
|
/**
|
|
6
6
|
* If items are passed to a `ActionBarModel`, the child of `ActionBar.List` should be a render prop. The
|
|
7
7
|
* List will determine how and when the item will be rendered.
|
|
@@ -11,7 +11,7 @@ export interface ActionBarListProps<T = unknown> extends Partial<ExtractProps<ty
|
|
|
11
11
|
* {(item) => <ActionBar.Item key={item.id} name={item.name}>{item.text}</ActionBar.Item>}
|
|
12
12
|
* </ActionBar.List>
|
|
13
13
|
*/
|
|
14
|
-
children: ((item: T) => React.ReactNode) | React.ReactNode;
|
|
14
|
+
children: ((item: T, index: number) => React.ReactNode) | React.ReactNode;
|
|
15
15
|
}
|
|
16
16
|
export declare const useActionBarList: <P extends {}, R>(model: {
|
|
17
17
|
state: {
|
|
@@ -71,7 +71,7 @@ export declare const useActionBarList: <P extends {}, R>(model: {
|
|
|
71
71
|
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | React.RefObject<R> | null | undefined) => {} & P & (R extends HTMLOrSVGElement ? {
|
|
72
72
|
ref: React.Ref<R>;
|
|
73
73
|
} : {});
|
|
74
|
-
export declare const ActionBarList: import("../../common").ElementComponentM<"div", ActionBarListProps<
|
|
74
|
+
export declare const ActionBarList: import("../../common").ElementComponentM<"div", ActionBarListProps<any>, {
|
|
75
75
|
state: {
|
|
76
76
|
hiddenIds: string[];
|
|
77
77
|
nonInteractiveIds: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarList.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAGL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAWxD,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"ActionBarList.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAGL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAWxD,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,GAAG,CACzC,SAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;IACrE;;;;;;;;OAQG;IACH,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;CAC3E;AAWD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAiE,CAAC;AAE/F,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBxB,CAAC"}
|
|
@@ -33,6 +33,7 @@ export declare const useActionBarModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
33
33
|
}>;
|
|
34
34
|
initialHiddenIds: string[];
|
|
35
35
|
containerWidth: number;
|
|
36
|
+
shouldCalculateOverflow: boolean;
|
|
36
37
|
initialSelectedIds: import("../../collection/lib/useSelectionListModel").SelectedIds;
|
|
37
38
|
initialUnselectedIds: string[];
|
|
38
39
|
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
@@ -1425,6 +1426,7 @@ export declare const useActionBarModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
1425
1426
|
}>;
|
|
1426
1427
|
initialHiddenIds: string[];
|
|
1427
1428
|
containerWidth: number;
|
|
1429
|
+
shouldCalculateOverflow: boolean;
|
|
1428
1430
|
initialSelectedIds: import("../../collection/lib/useSelectionListModel").SelectedIds;
|
|
1429
1431
|
initialUnselectedIds: string[];
|
|
1430
1432
|
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useAct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export declare const getMinWidthStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes) => "
|
|
25
|
+
export declare const getMinWidthStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes) => "24px" | "32px" | "40px" | "80px" | "auto" | "48px" | "112px" | "96px";
|
|
26
26
|
export declare const getPaddingStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes, icon: CanvasSystemIcon | undefined, iconPosition: IconPositions | undefined) => string | 0;
|
|
27
27
|
export declare const BaseButton: import("../../common").ElementComponent<"button", ButtonContainerProps> & {
|
|
28
28
|
Icon: import("../../common").ElementComponent<"span", import("./parts/ButtonLabelIcon").ButtonLabelIconProps>;
|
|
@@ -38,6 +38,10 @@ export interface CheckboxProps extends Themeable {
|
|
|
38
38
|
* @default false
|
|
39
39
|
*/
|
|
40
40
|
indeterminate?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The variant for the checkbox
|
|
43
|
+
*/
|
|
44
|
+
variant?: 'inverse' | undefined;
|
|
41
45
|
}
|
|
42
46
|
export declare const Checkbox: import("../../common").ElementComponent<"input", CheckboxProps> & {
|
|
43
47
|
ErrorType: typeof ErrorType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAOT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAU1C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAOT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAU1C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAoQD,eAAO,MAAM,QAAQ;;CAoEnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -57,55 +57,70 @@ var CheckboxRipple = styled('span')({
|
|
|
57
57
|
width: checkboxWidth,
|
|
58
58
|
position: 'absolute',
|
|
59
59
|
pointerEvents: 'none',
|
|
60
|
-
|
|
60
|
+
}, function (_a) {
|
|
61
|
+
var variant = _a.variant;
|
|
62
|
+
return ({
|
|
63
|
+
opacity: variant === 'inverse' ? '0.4' : '1',
|
|
64
|
+
});
|
|
61
65
|
});
|
|
62
66
|
/**
|
|
63
67
|
* Note: `~ div:first-of-type` refers to `CheckboxBackground`
|
|
64
68
|
* and was easier to use than a component selector in this case.
|
|
65
69
|
*/
|
|
66
70
|
var CheckboxInput = styled('input')(function (_a) {
|
|
67
|
-
var _b = _a.theme.canvas.palette, themePrimary = _b.primary, themeFocusOutline = _b.common.focusOutline;
|
|
71
|
+
var _b = _a.theme.canvas.palette, themePrimary = _b.primary, themeFocusOutline = _b.common.focusOutline, variant = _a.variant;
|
|
68
72
|
return (__assign({ borderRadius: borderRadius.s, width: checkboxTapArea, height: checkboxTapArea, margin: 0, marginTop: '-3px', marginLeft: '-3px', position: 'absolute', opacity: 0, '&:not(:disabled)': {
|
|
69
73
|
cursor: 'pointer',
|
|
70
74
|
},
|
|
71
75
|
// States
|
|
72
76
|
'&:not(:checked):not(:disabled):not(:focus):hover, &:not(:checked):not(:disabled):active': {
|
|
73
77
|
'~ div:first-of-type': {
|
|
74
|
-
borderColor: inputColors.hoverBorder,
|
|
78
|
+
borderColor: variant === 'inverse' ? colors.soap300 : inputColors.hoverBorder,
|
|
75
79
|
},
|
|
76
80
|
}, '&:checked ~ div:first-of-type': {
|
|
77
|
-
borderColor: themePrimary.main,
|
|
78
|
-
backgroundColor: themePrimary.main,
|
|
81
|
+
borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.main,
|
|
82
|
+
backgroundColor: variant === 'inverse' ? colors.frenchVanilla100 : themePrimary.main,
|
|
79
83
|
}, '&:disabled ~ div:first-of-type': {
|
|
80
84
|
borderColor: inputColors.disabled.border,
|
|
81
|
-
backgroundColor: inputColors.disabled.background,
|
|
85
|
+
backgroundColor: variant === 'inverse' ? colors.soap300 : inputColors.disabled.background,
|
|
86
|
+
opacity: variant === 'inverse' ? '.4' : '1',
|
|
82
87
|
}, '&:disabled:checked ~ div:first-of-type': {
|
|
83
|
-
borderColor: themePrimary.light,
|
|
84
|
-
backgroundColor: themePrimary.light,
|
|
88
|
+
borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
|
|
89
|
+
backgroundColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
|
|
85
90
|
},
|
|
86
91
|
// Focus
|
|
87
92
|
'&:focus, &:active': {
|
|
88
93
|
outline: 'none',
|
|
89
|
-
}, '&:focus ~ div:first-of-type': {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
}, '&:focus ~ div:first-of-type': __assign({ borderColor: variant === 'inverse' ? colors.blackPepper400 : themePrimary.main, borderWidth: '2px', boxShadow: 'none' }, focusRing({
|
|
95
|
+
width: variant === 'inverse' ? 2 : 0,
|
|
96
|
+
separation: 0,
|
|
97
|
+
animate: false,
|
|
98
|
+
innerColor: variant === 'inverse' ? colors.blackPepper400 : undefined,
|
|
99
|
+
outerColor: variant === 'inverse' ? colors.frenchVanilla100 : undefined,
|
|
100
|
+
})), '&:checked:focus ~ div:first-of-type': __assign(__assign({}, focusRing({
|
|
101
|
+
width: 2,
|
|
102
|
+
separation: 2,
|
|
103
|
+
animate: false,
|
|
104
|
+
innerColor: variant === 'inverse' ? colors.blackPepper400 : undefined,
|
|
105
|
+
outerColor: variant === 'inverse' ? colors.frenchVanilla100 : themeFocusOutline,
|
|
106
|
+
})), { borderColor: variant === 'inverse' ? colors.frenchVanilla100 : themePrimary.main, borderWidth: '2px', '& span': {
|
|
94
107
|
marginLeft: '-7px',
|
|
95
108
|
} }) }, mouseFocusBehavior({
|
|
96
109
|
'&:focus ~ div:first-of-type': {
|
|
97
|
-
border:
|
|
110
|
+
border: variant === 'inverse'
|
|
111
|
+
? "1px solid " + colors.soap300
|
|
112
|
+
: "1px solid " + inputColors.hoverBorder,
|
|
98
113
|
boxShadow: 'none',
|
|
99
114
|
'& span': {
|
|
100
115
|
marginLeft: '-6px',
|
|
101
116
|
},
|
|
102
117
|
},
|
|
103
118
|
'&:checked ~ div:first-of-type': {
|
|
104
|
-
borderColor: themePrimary.main,
|
|
119
|
+
borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.main,
|
|
105
120
|
},
|
|
106
121
|
'&:disabled:checked ~ div:first-of-type': {
|
|
107
122
|
borderColor: themePrimary.light,
|
|
108
|
-
backgroundColor: themePrimary.light,
|
|
123
|
+
backgroundColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
|
|
109
124
|
},
|
|
110
125
|
})));
|
|
111
126
|
}, function (_a) {
|
|
@@ -116,36 +131,35 @@ var CheckboxInput = styled('input')(function (_a) {
|
|
|
116
131
|
},
|
|
117
132
|
});
|
|
118
133
|
}, function (_a) {
|
|
119
|
-
var theme = _a.theme, error = _a.error;
|
|
134
|
+
var theme = _a.theme, error = _a.error, variant = _a.variant;
|
|
120
135
|
var errorColors = getErrorColors(error, theme);
|
|
121
136
|
if (errorColors.outer === errorColors.inner) {
|
|
122
137
|
errorColors.outer = 'transparent';
|
|
123
138
|
}
|
|
124
139
|
var errorStyles = {
|
|
125
140
|
'& ~ div:first-of-type': {
|
|
126
|
-
border: "1px solid " + errorColors.inner,
|
|
141
|
+
border: variant === 'inverse' ? "1px solid " + colors.soap300 : "1px solid " + errorColors.inner,
|
|
127
142
|
boxShadow: "0 0 0 1px " + errorColors.inner + ", 0 0 0 2px " + errorColors.outer,
|
|
128
143
|
},
|
|
129
144
|
'&:not(:checked):not(:disabled):not(:focus):hover, &:not(:checked):not(:disabled):active': {
|
|
130
145
|
'~ div:first-of-type': {
|
|
131
|
-
borderColor: errorColors.inner,
|
|
146
|
+
borderColor: variant === 'inverse' ? "1px solid " + colors.soap300 : errorColors.inner,
|
|
132
147
|
},
|
|
133
148
|
},
|
|
134
149
|
'&:checked ~ div:first-of-type': {
|
|
135
|
-
borderColor: theme.canvas.palette.primary.main,
|
|
136
|
-
boxShadow: "\n
|
|
150
|
+
borderColor: variant === 'inverse' ? colors.soap300 : theme.canvas.palette.primary.main,
|
|
151
|
+
boxShadow: "\n 0 0 0 2px " + colors.frenchVanilla100 + ",\n 0 0 0 4px " + errorColors.inner + ",\n 0 0 0 5px " + errorColors.outer,
|
|
137
152
|
},
|
|
138
153
|
};
|
|
139
|
-
return __assign(__assign({},
|
|
154
|
+
return __assign(__assign({}, mouseFocusBehavior(__assign(__assign({}, errorStyles), { '&:not(:checked):focus ~ div:first-of-type': {
|
|
140
155
|
border: "1px solid " + errorColors.inner,
|
|
141
156
|
boxShadow: "0 0 0 1px " + errorColors.inner + ", 0 0 0 2px " + errorColors.outer,
|
|
142
|
-
} })));
|
|
157
|
+
} }))), errorStyles);
|
|
143
158
|
});
|
|
144
159
|
var CheckboxBackground = styled('div')({
|
|
145
160
|
alignItems: 'center',
|
|
146
161
|
backgroundColor: colors.frenchVanilla100,
|
|
147
162
|
borderRadius: borderRadius.s,
|
|
148
|
-
border: '1px solid ' + inputColors.border,
|
|
149
163
|
boxSizing: 'border-box',
|
|
150
164
|
display: 'flex',
|
|
151
165
|
height: checkboxHeight,
|
|
@@ -155,6 +169,11 @@ var CheckboxBackground = styled('div')({
|
|
|
155
169
|
position: 'absolute',
|
|
156
170
|
transition: 'border 200ms ease, background 200ms',
|
|
157
171
|
width: checkboxWidth,
|
|
172
|
+
}, function (_a) {
|
|
173
|
+
var variant = _a.variant;
|
|
174
|
+
return ({
|
|
175
|
+
border: "1px solid " + (variant === 'inverse' ? colors.soap300 : inputColors.border),
|
|
176
|
+
});
|
|
158
177
|
});
|
|
159
178
|
var CheckboxCheck = styled('div')({
|
|
160
179
|
display: 'flex',
|
|
@@ -183,14 +202,24 @@ var IndeterminateBox = styled('div')({
|
|
|
183
202
|
width: '10px',
|
|
184
203
|
height: '2px',
|
|
185
204
|
}, function (_a) {
|
|
186
|
-
var theme = _a.theme;
|
|
205
|
+
var theme = _a.theme, variant = _a.variant;
|
|
187
206
|
return ({
|
|
188
|
-
backgroundColor:
|
|
207
|
+
backgroundColor: variant === 'inverse'
|
|
208
|
+
? theme.canvas.palette.primary.main
|
|
209
|
+
: theme.canvas.palette.primary.contrast,
|
|
189
210
|
});
|
|
190
211
|
});
|
|
191
212
|
var CheckboxLabel = styled('label')(__assign(__assign({}, canvas.type.levels.subtext.large), { paddingLeft: checkboxLabelDistance }), function (_a) {
|
|
192
|
-
var
|
|
193
|
-
return (
|
|
213
|
+
var variant = _a.variant;
|
|
214
|
+
return (variant === 'inverse' ? { color: colors.frenchVanilla100 } : undefined);
|
|
215
|
+
}, function (_a) {
|
|
216
|
+
var disabled = _a.disabled, variant = _a.variant;
|
|
217
|
+
return disabled
|
|
218
|
+
? {
|
|
219
|
+
color: variant === 'inverse' ? colors.frenchVanilla100 : inputColors.disabled.text,
|
|
220
|
+
opacity: variant === 'inverse' ? '.4' : '1',
|
|
221
|
+
}
|
|
222
|
+
: { cursor: 'pointer' };
|
|
194
223
|
});
|
|
195
224
|
export var Checkbox = createComponent('input')({
|
|
196
225
|
displayName: 'Checkbox',
|
|
@@ -201,15 +230,17 @@ export var Checkbox = createComponent('input')({
|
|
|
201
230
|
_d = _a.theme,
|
|
202
231
|
// TODO: Fix useTheme and make it a real hook
|
|
203
232
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
204
|
-
theme = _d === void 0 ? useTheme() : _d, id = _a.id, disabled = _a.disabled, onChange = _a.onChange, value = _a.value, error = _a.error, indeterminate = _a.indeterminate, elemProps = __rest(_a, ["checked", "label", "theme", "id", "disabled", "onChange", "value", "error", "indeterminate"]);
|
|
233
|
+
theme = _d === void 0 ? useTheme() : _d, id = _a.id, disabled = _a.disabled, onChange = _a.onChange, value = _a.value, error = _a.error, indeterminate = _a.indeterminate, variant = _a.variant, elemProps = __rest(_a, ["checked", "label", "theme", "id", "disabled", "onChange", "value", "error", "indeterminate", "variant"]);
|
|
205
234
|
var inputId = useUniqueId(id);
|
|
206
235
|
return (React.createElement(CheckboxContainer, null,
|
|
207
236
|
React.createElement(CheckboxInputWrapper, { disabled: disabled },
|
|
208
|
-
React.createElement(CheckboxInput, __assign({ as: Element, checked: checked, disabled: disabled, id: inputId, ref: ref, onChange: onChange, type: "checkbox", value: value, error: error, "aria-checked": indeterminate ? 'mixed' : checked }, elemProps)),
|
|
209
|
-
React.createElement(CheckboxRipple,
|
|
210
|
-
React.createElement(CheckboxBackground, { checked: checked, disabled: disabled },
|
|
211
|
-
React.createElement(CheckboxCheck, { checked: checked }, indeterminate ? (React.createElement(IndeterminateBox,
|
|
212
|
-
|
|
237
|
+
React.createElement(CheckboxInput, __assign({ as: Element, checked: checked, disabled: disabled, id: inputId, ref: ref, onChange: onChange, type: "checkbox", value: value, error: error, variant: variant, "aria-checked": indeterminate ? 'mixed' : checked }, elemProps)),
|
|
238
|
+
React.createElement(CheckboxRipple, { variant: variant }),
|
|
239
|
+
React.createElement(CheckboxBackground, { variant: variant, checked: checked, disabled: disabled },
|
|
240
|
+
React.createElement(CheckboxCheck, { checked: checked }, indeterminate ? (React.createElement(IndeterminateBox, { variant: variant })) : (React.createElement(SystemIcon, { icon: checkSmallIcon, color: variant === 'inverse'
|
|
241
|
+
? theme.canvas.palette.primary.main
|
|
242
|
+
: theme.canvas.palette.primary.contrast }))))),
|
|
243
|
+
label && (React.createElement(CheckboxLabel, { variant: variant, htmlFor: inputId, disabled: disabled }, label))));
|
|
213
244
|
},
|
|
214
245
|
subComponents: {
|
|
215
246
|
ErrorType: ErrorType,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '@workday/canvas-kit-react/layout';
|
|
3
|
-
export interface ListBoxProps extends BoxProps {
|
|
3
|
+
export interface ListBoxProps extends Omit<BoxProps, 'children'> {
|
|
4
4
|
children?: React.ReactNode | ((item: any) => React.ReactNode);
|
|
5
5
|
}
|
|
6
6
|
export declare const ListBoxItem: import("../../common").ElementComponentM<"li", BoxProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../../../../collection/lib/ListBox.tsx"],"names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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhB;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Generic } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { useBaseListModel } from './useBaseListModel';
|
|
4
|
-
export declare function useListRenderItems<T>(model: ReturnType<typeof useBaseListModel>, children: ((item: Generic, index: number) => React.ReactNode) | React.ReactNode):
|
|
4
|
+
export declare function useListRenderItems<T>(model: ReturnType<typeof useBaseListModel>, children: ((item: Generic, index: number) => React.ReactNode) | React.ReactNode): React.ReactNode;
|
|
5
5
|
//# sourceMappingURL=useListRenderItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useListRenderItem.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListRenderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EAC1C,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"useListRenderItem.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListRenderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EAC1C,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,GAC9E,KAAK,CAAC,SAAS,CAgCjB"}
|
|
@@ -5,18 +5,28 @@ export function useListRenderItems(model, children) {
|
|
|
5
5
|
? model.state.UNSTABLE_virtual.virtualItems.map(function (virtual) {
|
|
6
6
|
var item = model.state.items[virtual.index];
|
|
7
7
|
var child = children(item.value, virtual.index);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
if (React.isValidElement(child)) {
|
|
9
|
+
return React.cloneElement(child, {
|
|
10
|
+
// We call this `virtual` instead of `virtualItem` to avoid a React render warning
|
|
11
|
+
// about capital letters in attributes. React thinks this will be applied to the DOM
|
|
12
|
+
// element even though we remove it later...
|
|
13
|
+
virtual: virtual,
|
|
14
|
+
key: item.id,
|
|
15
|
+
item: item,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return child;
|
|
16
19
|
})
|
|
17
20
|
: model.state.items.map(function (item) {
|
|
18
|
-
|
|
21
|
+
var child = children(item.value, item.index);
|
|
22
|
+
if (React.isValidElement(child)) {
|
|
23
|
+
return React.cloneElement(child, {
|
|
24
|
+
key: item.id,
|
|
25
|
+
item: item.value,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return child;
|
|
19
29
|
})
|
|
20
|
-
:
|
|
21
|
-
return items
|
|
30
|
+
: children;
|
|
31
|
+
return items;
|
|
22
32
|
}
|
|
@@ -3,6 +3,11 @@ export declare function getHiddenIds(containerWidth: number, overflowTargetWidth
|
|
|
3
3
|
export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
4
4
|
initialHiddenIds: string[];
|
|
5
5
|
containerWidth: number;
|
|
6
|
+
/**
|
|
7
|
+
* Determines if overflow should actually occur. For example, touch devices are better at
|
|
8
|
+
* side-scrolling than mouse devices. In these cases, it makes sense to disable overflowing.
|
|
9
|
+
* @default true
|
|
10
|
+
*/ shouldCalculateOverflow: boolean;
|
|
6
11
|
initialSelectedIds: import("./useSelectionListModel").SelectedIds;
|
|
7
12
|
initialUnselectedIds: string[];
|
|
8
13
|
selection: import("./useSelectionListModel").SelectionManager;
|
|
@@ -1298,6 +1303,11 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1298
1303
|
}) & import("../../common").ModelExtras<{
|
|
1299
1304
|
initialHiddenIds: string[];
|
|
1300
1305
|
containerWidth: number;
|
|
1306
|
+
/**
|
|
1307
|
+
* Determines if overflow should actually occur. For example, touch devices are better at
|
|
1308
|
+
* side-scrolling than mouse devices. In these cases, it makes sense to disable overflowing.
|
|
1309
|
+
* @default true
|
|
1310
|
+
*/ shouldCalculateOverflow: boolean;
|
|
1301
1311
|
initialSelectedIds: import("./useSelectionListModel").SelectedIds;
|
|
1302
1312
|
initialUnselectedIds: string[];
|
|
1303
1313
|
selection: import("./useSelectionListModel").SelectionManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOverflowListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAgB,YAAY,CAC1B,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,MAAM,EAC3B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,GAC5B,MAAM,EAAE,CAwCV;AAED,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"useOverflowListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAgB,YAAY,CAC1B,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,MAAM,EAC3B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,GAC5B,MAAM,EAAE,CAwCV;AAED,eAAO,MAAM,oBAAoB;;;IAK7B;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6DkC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;YAInB,MAAM;eAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiBlB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiBT,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;YAGH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC;8BAiBxB;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;2BAiBf;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;8BAGT;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA1GlC;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAgDqB;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC;iCAaX;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;uBAIzB;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;0BAiBxB;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC;uBAiBf;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC;0BAGT;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAtDV;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAC;qCAaX;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC;2BAIzB;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC;8BAiBxB;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;2BAiBf;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;8BAGT;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMpC,CAAC"}
|
|
@@ -51,10 +51,16 @@ export function getHiddenIds(containerWidth, overflowTargetWidth, itemWidthCache
|
|
|
51
51
|
return hiddenIds;
|
|
52
52
|
}
|
|
53
53
|
export var useOverflowListModel = createModelHook({
|
|
54
|
-
defaultConfig: __assign(__assign({}, useSelectionListModel.defaultConfig), { initialHiddenIds: [], containerWidth: 0
|
|
54
|
+
defaultConfig: __assign(__assign({}, useSelectionListModel.defaultConfig), { initialHiddenIds: [], containerWidth: 0,
|
|
55
|
+
/**
|
|
56
|
+
* Determines if overflow should actually occur. For example, touch devices are better at
|
|
57
|
+
* side-scrolling than mouse devices. In these cases, it makes sense to disable overflowing.
|
|
58
|
+
* @default true
|
|
59
|
+
*/ shouldCalculateOverflow: true }),
|
|
55
60
|
requiredConfig: useSelectionListModel.requiredConfig,
|
|
56
61
|
contextOverride: useSelectionListModel.Context,
|
|
57
62
|
})(function (config) {
|
|
63
|
+
var shouldCalculateOverflow = config.shouldCalculateOverflow === undefined ? true : config.shouldCalculateOverflow;
|
|
58
64
|
var _a = React.useState(config.initialHiddenIds), hiddenIds = _a[0], setHiddenIds = _a[1];
|
|
59
65
|
var _b = React.useState({}), itemWidthCache = _b[0], setItemWidthCache = _b[1];
|
|
60
66
|
var _c = React.useState(0), containerWidth = _c[0], setContainerWidth = _c[1];
|
|
@@ -62,12 +68,12 @@ export var useOverflowListModel = createModelHook({
|
|
|
62
68
|
var itemWidthCacheRef = React.useRef(itemWidthCache);
|
|
63
69
|
var _d = React.useState(0), overflowTargetWidth = _d[0], setOverflowTargetWidth = _d[1];
|
|
64
70
|
var overflowTargetWidthRef = React.useRef(0);
|
|
71
|
+
var internalHiddenIds = shouldCalculateOverflow ? hiddenIds : [];
|
|
65
72
|
// Cursors skip over disabled ids, but know nothing of hidden ids. We'll go ahead and disable
|
|
66
73
|
// hidden ids as well
|
|
67
|
-
var nonInteractiveIds = (config.nonInteractiveIds || []).concat(
|
|
74
|
+
var nonInteractiveIds = (config.nonInteractiveIds || []).concat(internalHiddenIds);
|
|
68
75
|
var model = useSelectionListModel(__assign(__assign({}, config), { nonInteractiveIds: nonInteractiveIds }));
|
|
69
|
-
var state = __assign(__assign({}, model.state), { hiddenIds:
|
|
70
|
-
itemWidthCache: itemWidthCache,
|
|
76
|
+
var state = __assign(__assign({}, model.state), { hiddenIds: internalHiddenIds, itemWidthCache: itemWidthCache,
|
|
71
77
|
containerWidth: containerWidth,
|
|
72
78
|
overflowTargetWidth: overflowTargetWidth });
|
|
73
79
|
var events = __assign(__assign({}, model.events), { select: function (data) {
|
|
@@ -36,7 +36,7 @@ export declare const inputEventMap: {
|
|
|
36
36
|
/**
|
|
37
37
|
* This component takes heavy inspiration from what-input (https://github.com/ten1seven/what-input)
|
|
38
38
|
*/
|
|
39
|
-
export declare class InputProvider extends React.Component<InputProviderProps
|
|
39
|
+
export declare class InputProvider extends React.Component<React.PropsWithChildren<InputProviderProps>> {
|
|
40
40
|
private eventTimer;
|
|
41
41
|
private currentInput;
|
|
42
42
|
private currentIntent;
|
|
@@ -57,7 +57,7 @@ export declare class InputProvider extends React.Component<InputProviderProps> {
|
|
|
57
57
|
setIntent(event: InputEvent): void;
|
|
58
58
|
eventBuffer(event: Event): void;
|
|
59
59
|
detectScrolling(event: React.MouseEvent): void;
|
|
60
|
-
render():
|
|
60
|
+
render(): number | true | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactFragment | null;
|
|
61
61
|
}
|
|
62
62
|
export default InputProvider;
|
|
63
63
|
//# sourceMappingURL=InputProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/InputProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CACxD;AAED,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAED,aAAK,UAAU,GACX,KAAK,GACL,KAAK,CAAC,aAAa,GACnB,KAAK,CAAC,UAAU,GAChB,KAAK,CAAC,UAAU,GAChB,KAAK,CAAC,YAAY,CAAC;AAUvB,eAAO,MAAM,aAAa;;;;;;;;;;CAUzB,CAAC;AA8DF;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"InputProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/InputProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CACxD;AAED,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAED,aAAK,UAAU,GACX,KAAK,GACL,KAAK,CAAC,aAAa,GACnB,KAAK,CAAC,UAAU,GAChB,KAAK,CAAC,UAAU,GAChB,KAAK,CAAC,YAAY,CAAC;AAUvB,eAAO,MAAM,aAAa;;;;;;;;;;CAUzB,CAAC;AA8DF;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAC7F,OAAO,CAAC,UAAU,CAAqB;IAEvC,OAAO,CAAC,YAAY,CAAY;IAChC,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,eAAe,CAAW;IAClC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,kBAAkB,CAAS;gBAEvB,KAAK,EAAE,GAAG;IAuBtB,aAAa,sBAA4B;IAEzC,YAAY,CAAC,SAAS,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,WAAW;IAgBjF,iBAAiB;IAejB,gBAAgB;IAgBhB,oBAAoB;IAWpB,eAAe,CAAC,MAAM,EAAE,OAAO;IA6C/B,QAAQ,CAAC,KAAK,EAAE,UAAU;IA4C1B,SAAS,CAAC,KAAK,EAAE,UAAU;IAoB3B,WAAW,CAAC,KAAK,EAAE,KAAK;IAcxB,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU;IAUvC,MAAM;CAGP;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { PartialEmotionCanvasTheme } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { CSSProperties } from '@workday/canvas-kit-react/tokens';
|
|
4
4
|
export declare const convertToStaticStates: (obj?: CSSProperties | undefined) => CSSProperties | undefined;
|
|
5
|
-
export declare const StaticStates: React.FC<{
|
|
5
|
+
export declare const StaticStates: React.FC<React.PropsWithChildren<{
|
|
6
6
|
theme?: PartialEmotionCanvasTheme;
|
|
7
|
-
} & React.HTMLAttributes<HTMLElement
|
|
7
|
+
} & React.HTMLAttributes<HTMLElement>>>;
|
|
8
8
|
//# sourceMappingURL=StaticStates.d.ts.map
|