@workday/canvas-kit-react 10.0.0-alpha.538-next.0 → 10.0.0-alpha.540-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/index.ts +8 -11
- package/button/lib/BaseButton.tsx +274 -256
- package/button/lib/Button.tsx +67 -0
- package/button/lib/DeleteButton.tsx +42 -58
- package/button/lib/PrimaryButton.tsx +82 -149
- package/button/lib/SecondaryButton.tsx +87 -173
- package/button/lib/TertiaryButton.tsx +158 -223
- package/button/lib/ToolbarDropdownButton.tsx +11 -2
- package/button/lib/ToolbarIconButton.tsx +10 -2
- package/button/lib/parts/ButtonLabelIcon.tsx +1 -7
- package/button/lib/types.ts +6 -8
- package/checkbox/lib/Checkbox.tsx +24 -33
- package/common/lib/CanvasProvider.tsx +50 -24
- package/dist/commonjs/button/index.d.ts +8 -5
- package/dist/commonjs/button/index.d.ts.map +1 -1
- package/dist/commonjs/button/index.js +9 -13
- package/dist/commonjs/button/lib/BaseButton.d.ts +69 -5
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/BaseButton.js +199 -192
- package/dist/commonjs/button/lib/Button.d.ts +17 -0
- package/dist/commonjs/button/lib/Button.d.ts.map +1 -0
- package/dist/commonjs/button/lib/Button.js +42 -0
- package/dist/commonjs/button/lib/DeleteButton.d.ts +7 -9
- package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/DeleteButton.js +29 -19
- package/dist/commonjs/button/lib/PrimaryButton.d.ts +15 -36
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +67 -79
- package/dist/commonjs/button/lib/SecondaryButton.d.ts +16 -43
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.js +71 -96
- package/dist/commonjs/button/lib/TertiaryButton.d.ts +35 -47
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +136 -134
- package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarDropdownButton.js +11 -2
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarIconButton.js +10 -2
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +1 -7
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/commonjs/button/lib/types.d.ts +6 -7
- package/dist/commonjs/button/lib/types.d.ts.map +1 -1
- package/dist/commonjs/card/lib/Card.d.ts +1 -1
- package/dist/commonjs/card/lib/CardBody.d.ts +1 -1
- package/dist/commonjs/card/lib/CardBody.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.js +13 -17
- package/dist/commonjs/common/lib/CanvasProvider.d.ts +1 -8
- package/dist/commonjs/common/lib/CanvasProvider.d.ts.map +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +31 -13
- package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
- package/dist/commonjs/layout/lib/Box.d.ts +3 -2
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +2 -1
- package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/dist/commonjs/layout/lib/Grid.d.ts +1 -1
- package/dist/commonjs/menu/lib/MenuItem.d.ts +1 -1
- package/dist/commonjs/popup/lib/Popup.d.ts +1 -1
- package/dist/commonjs/popup/lib/PopupBody.d.ts +1 -1
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/Radio.js +17 -22
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +3 -1
- package/dist/commonjs/table/lib/Table.d.ts +1 -2
- package/dist/commonjs/table/lib/Table.d.ts.map +1 -1
- package/dist/commonjs/table/lib/Table.js +1 -2
- package/dist/commonjs/table/lib/TableRow.d.ts +3 -6
- package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableRow.js +3 -5
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextArea.js +1 -1
- package/dist/commonjs/text-input/lib/TextInput.js +1 -1
- package/dist/commonjs/tokens/lib/space.d.ts +44 -31
- package/dist/commonjs/tokens/lib/space.d.ts.map +1 -1
- package/dist/commonjs/tokens/lib/space.js +22 -29
- package/dist/commonjs/tooltip/lib/TooltipContainer.js +2 -2
- package/dist/es6/button/index.d.ts +8 -5
- package/dist/es6/button/index.d.ts.map +1 -1
- package/dist/es6/button/index.js +8 -5
- package/dist/es6/button/lib/BaseButton.d.ts +69 -5
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/es6/button/lib/BaseButton.js +199 -192
- package/dist/es6/button/lib/Button.d.ts +17 -0
- package/dist/es6/button/lib/Button.d.ts.map +1 -0
- package/dist/es6/button/lib/Button.js +20 -0
- package/dist/es6/button/lib/DeleteButton.d.ts +7 -9
- package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/es6/button/lib/DeleteButton.js +31 -21
- package/dist/es6/button/lib/PrimaryButton.d.ts +15 -36
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +67 -79
- package/dist/es6/button/lib/SecondaryButton.d.ts +16 -43
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.js +71 -95
- package/dist/es6/button/lib/TertiaryButton.d.ts +35 -47
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +137 -135
- package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarDropdownButton.js +11 -2
- package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarIconButton.js +10 -2
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +1 -7
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/es6/button/lib/types.d.ts +6 -7
- package/dist/es6/button/lib/types.d.ts.map +1 -1
- package/dist/es6/card/lib/Card.d.ts +1 -1
- package/dist/es6/card/lib/CardBody.d.ts +1 -1
- package/dist/es6/card/lib/CardBody.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.js +14 -18
- package/dist/es6/common/lib/CanvasProvider.d.ts +1 -8
- package/dist/es6/common/lib/CanvasProvider.d.ts.map +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +31 -13
- package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
- package/dist/es6/layout/lib/Box.d.ts +3 -2
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +2 -1
- package/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/dist/es6/layout/lib/Grid.d.ts +1 -1
- package/dist/es6/menu/lib/MenuItem.d.ts +1 -1
- package/dist/es6/popup/lib/Popup.d.ts +1 -1
- package/dist/es6/popup/lib/PopupBody.d.ts +1 -1
- package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
- package/dist/es6/radio/lib/Radio.js +18 -23
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +3 -1
- package/dist/es6/table/lib/Table.d.ts +1 -2
- package/dist/es6/table/lib/Table.d.ts.map +1 -1
- package/dist/es6/table/lib/Table.js +1 -2
- package/dist/es6/table/lib/TableRow.d.ts +3 -6
- package/dist/es6/table/lib/TableRow.d.ts.map +1 -1
- package/dist/es6/table/lib/TableRow.js +4 -6
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextArea.js +2 -2
- package/dist/es6/text-input/lib/TextInput.js +2 -2
- package/dist/es6/tokens/lib/space.d.ts +44 -31
- package/dist/es6/tokens/lib/space.d.ts.map +1 -1
- package/dist/es6/tokens/lib/space.js +22 -29
- package/dist/es6/tooltip/lib/TooltipContainer.js +3 -3
- package/layout/lib/Box.tsx +6 -4
- package/package.json +5 -3
- package/popup/lib/PopupCloseIcon.tsx +1 -1
- package/radio/lib/Radio.tsx +18 -34
- package/segmented-control/lib/SegmentedControlButton.tsx +3 -1
- package/table/lib/Table.tsx +1 -2
- package/table/lib/TableRow.tsx +5 -8
- package/text-area/lib/TextArea.tsx +2 -8
- package/text-input/lib/TextInput.tsx +2 -2
- package/tokens/README.md +25 -28
- package/tokens/lib/space.ts +53 -40
- package/tooltip/lib/TooltipContainer.tsx +3 -3
|
@@ -99,7 +99,7 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
99
99
|
* A `Dialog.Body` is a thin wrapper around {@link CardBody Card.Body} and doesn't actually take
|
|
100
100
|
* a model. It adds `body` styling and nothing else.
|
|
101
101
|
*/
|
|
102
|
-
Body: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
102
|
+
Body: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & import("@workday/canvas-kit-styling").CSProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
103
103
|
state: {
|
|
104
104
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
105
105
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CSProps } from '@workday/canvas-kit-styling';
|
|
2
3
|
import { CommonStyleProps } from './utils/styleProps';
|
|
3
4
|
/**
|
|
4
5
|
* Box Props
|
|
@@ -17,7 +18,7 @@ import { CommonStyleProps } from './utils/styleProps';
|
|
|
17
18
|
* - space
|
|
18
19
|
* - text
|
|
19
20
|
*/
|
|
20
|
-
export declare type BoxProps = CommonStyleProps & {
|
|
21
|
+
export declare type BoxProps = CommonStyleProps & CSProps & {
|
|
21
22
|
children?: React.ReactNode;
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
@@ -56,5 +57,5 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
|
56
57
|
* );
|
|
57
58
|
*
|
|
58
59
|
*/
|
|
59
|
-
export declare const Box: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./utils/background").BackgroundStyleProps & import("./utils/border/color").BorderColorStyleProps & import("./utils/border/lineStyle").BorderLineStyleProps & import("./utils/border/radius").BorderRadiusStyleProps & import("./utils/border/shorthand").BorderShorthandStyleProps & import("./utils/border/width").BorderWidthStyleProps & import("./utils/color").ColorStyleProps & import("./utils/depth").DepthStyleProps & import("./utils/flexItem").FlexItemStyleProps & import("./utils/gridItem").GridItemStyleProps & import("./utils/layout").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("./utils/position").PositionStyleProps & import("./utils/space").SpaceStyleProps & import("./utils/text").TextStyleProps>;
|
|
60
|
+
export declare const Box: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./utils/background").BackgroundStyleProps & import("./utils/border/color").BorderColorStyleProps & import("./utils/border/lineStyle").BorderLineStyleProps & import("./utils/border/radius").BorderRadiusStyleProps & import("./utils/border/shorthand").BorderShorthandStyleProps & import("./utils/border/width").BorderWidthStyleProps & import("./utils/color").ColorStyleProps & import("./utils/depth").DepthStyleProps & import("./utils/flexItem").FlexItemStyleProps & import("./utils/gridItem").GridItemStyleProps & import("./utils/layout").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("./utils/position").PositionStyleProps & import("./utils/space").SpaceStyleProps & import("./utils/text").TextStyleProps & CSProps>;
|
|
60
61
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,OAAO,EAAe,MAAM,6BAA6B,CAAC;AAclE,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,QAAQ,GAAG,gBAAgB,GACrC,OAAO,GAAG;IACR,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA6BJ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU,sCA0BtB,CAAC;AAQF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,6yBAad,CAAC"}
|
|
@@ -27,6 +27,7 @@ const React = __importStar(require("react"));
|
|
|
27
27
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
28
28
|
const is_prop_valid_1 = __importDefault(require("@emotion/is-prop-valid"));
|
|
29
29
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
30
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
30
31
|
// style props
|
|
31
32
|
const background_1 = require("./utils/background");
|
|
32
33
|
const border_1 = require("./utils/border");
|
|
@@ -135,6 +136,6 @@ exports.Box = common_1.createComponent('div')({
|
|
|
135
136
|
displayName: 'Box',
|
|
136
137
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
137
138
|
const BoxComponent = common_1.useConstant(() => typeof Element === 'string' ? StyledBoxElement : StyledBoxComponent);
|
|
138
|
-
return (React.createElement(BoxComponent, Object.assign({ as: Element, ref: ref }, elemProps), children));
|
|
139
|
+
return (React.createElement(BoxComponent, Object.assign({ as: Element, ref: ref }, canvas_kit_styling_1.handleCsProp(elemProps)), children));
|
|
139
140
|
},
|
|
140
141
|
});
|
|
@@ -24,6 +24,6 @@ export declare type FlexProps = Omit<BoxProps, 'display'> & FlexStyleProps;
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
export declare const Flex: import("@workday/canvas-kit-react/common").ElementComponent<"div", Omit<BoxProps, "display"> & FlexStyleProps> & {
|
|
27
|
-
Item: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("..").BackgroundStyleProps & import("./utils/border/color").BorderColorStyleProps & import("./utils/border/lineStyle").BorderLineStyleProps & import("./utils/border/radius").BorderRadiusStyleProps & import("./utils/border/shorthand").BorderShorthandStyleProps & import("./utils/border/width").BorderWidthStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").GridItemStyleProps & import("..").LayoutStyleProps & import("..").OtherStyleProps & import("..").PositionStyleProps & import("..").SpaceStyleProps & import("..").TextStyleProps>;
|
|
27
|
+
Item: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("..").BackgroundStyleProps & import("./utils/border/color").BorderColorStyleProps & import("./utils/border/lineStyle").BorderLineStyleProps & import("./utils/border/radius").BorderRadiusStyleProps & import("./utils/border/shorthand").BorderShorthandStyleProps & import("./utils/border/width").BorderWidthStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").GridItemStyleProps & import("..").LayoutStyleProps & import("..").OtherStyleProps & import("..").PositionStyleProps & import("..").SpaceStyleProps & import("..").TextStyleProps & import("@workday/canvas-kit-styling").CSProps>;
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -46,6 +46,6 @@ export declare const Grid: import("@workday/canvas-kit-react/common").ElementCom
|
|
|
46
46
|
* );
|
|
47
47
|
*```
|
|
48
48
|
*/
|
|
49
|
-
Item: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("..").BackgroundStyleProps & import("./utils/border/color").BorderColorStyleProps & import("./utils/border/lineStyle").BorderLineStyleProps & import("./utils/border/radius").BorderRadiusStyleProps & import("./utils/border/shorthand").BorderShorthandStyleProps & import("./utils/border/width").BorderWidthStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").GridItemStyleProps & import("..").LayoutStyleProps & import("..").OtherStyleProps & import("..").PositionStyleProps & import("..").SpaceStyleProps & import("..").TextStyleProps>;
|
|
49
|
+
Item: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("..").BackgroundStyleProps & import("./utils/border/color").BorderColorStyleProps & import("./utils/border/lineStyle").BorderLineStyleProps & import("./utils/border/radius").BorderRadiusStyleProps & import("./utils/border/shorthand").BorderShorthandStyleProps & import("./utils/border/width").BorderWidthStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").GridItemStyleProps & import("..").LayoutStyleProps & import("..").OtherStyleProps & import("..").PositionStyleProps & import("..").SpaceStyleProps & import("..").TextStyleProps & import("@workday/canvas-kit-styling").CSProps>;
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -26,7 +26,7 @@ interface StyledMenuProps {
|
|
|
26
26
|
*/
|
|
27
27
|
isDisabled?: boolean;
|
|
28
28
|
}
|
|
29
|
-
export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
29
|
+
export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & import("@workday/canvas-kit-styling").CSProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY" | "cs"> & {
|
|
30
30
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
31
31
|
} & {
|
|
32
32
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -253,7 +253,7 @@ export declare const Popup: import("@workday/canvas-kit-react/common").Component
|
|
|
253
253
|
* A `Popup.Body` is a thin wrapper around {@link CardBody Card.Body} and doesn't actually take
|
|
254
254
|
* a model. It adds `body` styling and nothing else.
|
|
255
255
|
*/
|
|
256
|
-
Body: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
256
|
+
Body: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & import("@workday/canvas-kit-styling").CSProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
257
257
|
state: {
|
|
258
258
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
259
259
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const PopupBody: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
2
|
+
export declare const PopupBody: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & import("@workday/canvas-kit-styling").CSProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
3
3
|
state: {
|
|
4
4
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
5
5
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -15,5 +15,5 @@ exports.PopupCloseIcon = common_1.createSubcomponent('button')({
|
|
|
15
15
|
modelHook: hooks_1.usePopupModel,
|
|
16
16
|
elemPropsHook: hooks_1.usePopupCloseButton,
|
|
17
17
|
})(({ children, ...elemProps }, Element) => {
|
|
18
|
-
return (react_1.default.createElement(button_1.TertiaryButton, Object.assign({ as: Element, size: "medium", icon: canvas_system_icons_web_1.xIcon, type: "button", position: "absolute",
|
|
18
|
+
return (react_1.default.createElement(button_1.TertiaryButton, Object.assign({ as: Element, size: "medium", icon: canvas_system_icons_web_1.xIcon, type: "button", position: "absolute", insetInlineEnd: tokens_1.space.xxxs, top: tokens_1.space.xxxs }, elemProps)));
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../radio/lib/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAML,SAAS,EAEV,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../radio/lib/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAML,SAAS,EAEV,MAAM,kCAAkC,CAAC;AAI1C,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C;;;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,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;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,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AA8ND,eAAO,MAAM,KAAK,kFAgDhB,CAAC"}
|
|
@@ -24,18 +24,11 @@ const React = __importStar(require("react"));
|
|
|
24
24
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
25
25
|
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
26
26
|
const text_1 = require("@workday/canvas-kit-react/text");
|
|
27
|
-
const radioBorderRadius =
|
|
28
|
-
const radioDot = tokens_1.space.xxs;
|
|
29
|
-
const radioHeight = (tokens_1.spaceNumbers.xl - tokens_1.spaceNumbers.xxxs) / 2;
|
|
30
|
-
const radioTapArea = tokens_1.space.m;
|
|
31
|
-
const radioContainerHeight = radioTapArea;
|
|
32
|
-
const radioLabelDistance = tokens_1.space.xs;
|
|
33
|
-
const radioWidth = radioHeight;
|
|
34
|
-
const rippleRadius = (tokens_1.spaceNumbers.l - radioWidth) / 2;
|
|
27
|
+
const radioBorderRadius = 9;
|
|
35
28
|
const RadioContainer = common_1.styled('div')({
|
|
36
29
|
display: 'flex',
|
|
37
30
|
alignItems: 'center',
|
|
38
|
-
minHeight:
|
|
31
|
+
minHeight: tokens_1.space.m,
|
|
39
32
|
position: 'relative',
|
|
40
33
|
});
|
|
41
34
|
/**
|
|
@@ -45,24 +38,24 @@ const RadioContainer = common_1.styled('div')({
|
|
|
45
38
|
*/
|
|
46
39
|
const RadioInputWrapper = common_1.styled('div')({
|
|
47
40
|
display: 'flex',
|
|
48
|
-
height:
|
|
49
|
-
width:
|
|
41
|
+
height: `calc(${tokens_1.space.s} + 2px)`,
|
|
42
|
+
width: `calc(${tokens_1.space.s} + 2px)`,
|
|
50
43
|
});
|
|
51
44
|
const RadioRipple = common_1.styled('span')({
|
|
52
45
|
borderRadius: tokens_1.borderRadius.circle,
|
|
53
46
|
boxShadow: `0 0 0 0 ${tokens_1.colors.soap200}`,
|
|
54
|
-
height:
|
|
47
|
+
height: `calc(${tokens_1.space.s} + 2px)`,
|
|
55
48
|
transition: 'box-shadow 150ms ease-out',
|
|
56
|
-
width:
|
|
49
|
+
width: `calc(${tokens_1.space.s} + 2px)`,
|
|
57
50
|
position: 'absolute',
|
|
58
51
|
pointerEvents: 'none', // This is a decorative element we don't want it to block clicks to input
|
|
59
52
|
}, ({ variant }) => ({
|
|
60
53
|
opacity: variant === 'inverse' ? '0.4' : '1',
|
|
61
54
|
}));
|
|
62
55
|
const RadioInput = common_1.styled('input')({
|
|
63
|
-
borderRadius:
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
56
|
+
borderRadius: `calc(${tokens_1.space.xxs} + 1px)`,
|
|
57
|
+
width: tokens_1.space.m,
|
|
58
|
+
height: tokens_1.space.m,
|
|
66
59
|
margin: 0,
|
|
67
60
|
marginTop: '-3px',
|
|
68
61
|
marginLeft: '-3px',
|
|
@@ -84,7 +77,9 @@ const RadioInput = common_1.styled('input')({
|
|
|
84
77
|
// `span:first-of-type` refers to `RadioRipple`, the light grey
|
|
85
78
|
// element that animates around the component on hover
|
|
86
79
|
'&:hover ~ span:first-of-type': {
|
|
87
|
-
boxShadow: disabled
|
|
80
|
+
boxShadow: disabled
|
|
81
|
+
? undefined
|
|
82
|
+
: `0 0 0 calc((${tokens_1.space.l} - (${tokens_1.space.s} + 2px)) / 2) ${tokens_1.colors.soap200}`,
|
|
88
83
|
},
|
|
89
84
|
// `div:first-of-type` refers to the `RadioBackground`, the visual facade of the
|
|
90
85
|
// input (which is visually hidden)
|
|
@@ -163,13 +158,13 @@ const RadioBackground = common_1.styled('div')({
|
|
|
163
158
|
borderWidth: '1px',
|
|
164
159
|
boxSizing: 'border-box',
|
|
165
160
|
display: 'flex',
|
|
166
|
-
height:
|
|
161
|
+
height: `calc(${tokens_1.space.s} + 2px)`,
|
|
167
162
|
justifyContent: 'center',
|
|
168
163
|
padding: '0px 2px',
|
|
169
164
|
pointerEvents: 'none',
|
|
170
165
|
position: 'absolute',
|
|
171
166
|
transition: 'border 200ms ease, background 200ms',
|
|
172
|
-
width:
|
|
167
|
+
width: `calc(${tokens_1.space.s} + 2px)`,
|
|
173
168
|
}, ({ checked, disabled, variant, theme: { canvas: { palette: { primary: themePrimary }, }, }, }) => ({
|
|
174
169
|
borderColor: checked
|
|
175
170
|
? variant === 'inverse'
|
|
@@ -193,10 +188,10 @@ const RadioCheck = common_1.styled('div')({
|
|
|
193
188
|
borderRadius: radioBorderRadius,
|
|
194
189
|
display: 'flex',
|
|
195
190
|
flexDirection: 'column',
|
|
196
|
-
height:
|
|
191
|
+
height: tokens_1.space.xxs,
|
|
197
192
|
pointerEvents: 'none',
|
|
198
193
|
transition: 'transform 200ms ease, opacity 200ms ease',
|
|
199
|
-
width:
|
|
194
|
+
width: tokens_1.space.xxs,
|
|
200
195
|
}, ({ theme, variant }) => ({
|
|
201
196
|
backgroundColor: variant === 'inverse'
|
|
202
197
|
? theme.canvas.palette.primary.main
|
|
@@ -215,6 +210,6 @@ exports.Radio = common_1.createComponent('input')({
|
|
|
215
210
|
React.createElement(RadioRipple, { variant: variant }),
|
|
216
211
|
React.createElement(RadioBackground, { checked: checked, disabled: disabled, variant: variant },
|
|
217
212
|
React.createElement(RadioCheck, { checked: checked, variant: variant }))),
|
|
218
|
-
label && (React.createElement(text_1.LabelText, { paddingLeft:
|
|
213
|
+
label && (React.createElement(text_1.LabelText, { paddingLeft: tokens_1.space.xs, htmlFor: inputId, disabled: disabled, variant: variant }, label))));
|
|
219
214
|
},
|
|
220
215
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,oBAAoB,EACrB,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,oBAAoB,EACrB,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AA2F9D,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,oGAiBjC,CAAC"}
|
|
@@ -23,11 +23,13 @@ const getIconButtonColors = (toggled) => {
|
|
|
23
23
|
icon: toggled ? tokens_1.colors.frenchVanilla100 : tokens_1.colors.licorice500,
|
|
24
24
|
},
|
|
25
25
|
focus: {
|
|
26
|
-
background: toggled ? tokens_1.colors.blueberry400 :
|
|
26
|
+
background: toggled ? tokens_1.colors.blueberry400 : tokens_1.colors.soap200,
|
|
27
27
|
icon: toggled ? tokens_1.colors.frenchVanilla100 : tokens_1.colors.licorice500,
|
|
28
|
+
border: toggled ? 'transparent' : tokens_1.colors.soap500,
|
|
28
29
|
},
|
|
29
30
|
disabled: {
|
|
30
31
|
background: toggled ? tokens_1.colors.soap100 : tokens_1.colors.soap100,
|
|
32
|
+
border: tokens_1.colors.soap500,
|
|
31
33
|
icon: tokens_1.colors.soap600,
|
|
32
34
|
opacity: '1',
|
|
33
35
|
},
|
|
@@ -3,8 +3,7 @@ export declare const borderWidth = 1;
|
|
|
3
3
|
export declare const borderColor: string;
|
|
4
4
|
export declare const cellBorder: string;
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
7
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
6
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
8
7
|
*/
|
|
9
8
|
export declare class Table extends React.Component<React.TableHTMLAttributes<HTMLTableElement>> {
|
|
10
9
|
render(): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,WAAW,QAAiB,CAAC;AAC1C,eAAO,MAAM,UAAU,QAA0C,CAAC;AAYlE
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,WAAW,QAAiB,CAAC;AAC1C,eAAO,MAAM,UAAU,QAA0C,CAAC;AAYlE;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC9E,MAAM;CAKd"}
|
|
@@ -39,8 +39,7 @@ const TableComponent = styled_1.default('table')(tokens_1.type.levels.subtext.la
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
/**
|
|
42
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
43
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
42
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
44
43
|
*/
|
|
45
44
|
class Table extends React.Component {
|
|
46
45
|
render() {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyledType } from '@workday/canvas-kit-react/common';
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
5
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
4
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
6
5
|
*/
|
|
7
6
|
export declare enum TableRowState {
|
|
8
7
|
Error = 0,
|
|
@@ -13,8 +12,7 @@ export declare enum TableRowState {
|
|
|
13
12
|
Selected = 5
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
17
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
15
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
18
16
|
*/
|
|
19
17
|
export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
20
18
|
/**
|
|
@@ -28,8 +26,7 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
|
|
|
28
26
|
header?: boolean;
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
32
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
29
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
33
30
|
*/
|
|
34
31
|
export declare const TableRow: import("@workday/canvas-kit-react/common").ElementComponent<"tr", TableRowProps & StyledType> & {
|
|
35
32
|
State: typeof TableRowState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAkB,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAG7E
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAkB,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAG7E;;GAEG;AACH,oBAAY,aAAa;IACvB,KAAK,IAAA;IACL,KAAK,IAAA;IACL,UAAU,IAAA;IACV,UAAU,IAAA;IACV,KAAK,IAAA;IACL,QAAQ,IAAA;CACT;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC;IAC9E;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAuKD;;GAEG;AACH,eAAO,MAAM,QAAQ;;CAgBnB,CAAC"}
|
|
@@ -30,8 +30,7 @@ const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
|
30
30
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
31
31
|
const Table_1 = require("./Table");
|
|
32
32
|
/**
|
|
33
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
34
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
33
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
35
34
|
*/
|
|
36
35
|
var TableRowState;
|
|
37
36
|
(function (TableRowState) {
|
|
@@ -106,7 +105,7 @@ const StyledTableRow = styled_1.default('tr')({
|
|
|
106
105
|
fontSize: 13,
|
|
107
106
|
borderRight: Table_1.cellBorder,
|
|
108
107
|
borderBottom: Table_1.cellBorder,
|
|
109
|
-
height:
|
|
108
|
+
height: `calc(${tokens_1.space.xl} + ${tokens_1.space.xxs})`,
|
|
110
109
|
boxSizing: 'border-box',
|
|
111
110
|
transition: 'background-color 0.2s',
|
|
112
111
|
},
|
|
@@ -194,8 +193,7 @@ const StyledTableRow = styled_1.default('tr')({
|
|
|
194
193
|
}
|
|
195
194
|
});
|
|
196
195
|
/**
|
|
197
|
-
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
|
|
198
|
-
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
|
|
196
|
+
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version. Please use [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview instead.
|
|
199
197
|
*/
|
|
200
198
|
exports.TableRow = common_1.createComponent('tr')({
|
|
201
199
|
displayName: 'TableRow',
|
|
@@ -53,7 +53,7 @@ export interface TabsItemProps extends ExtractProps<typeof Box, never>, Partial<
|
|
|
53
53
|
*/
|
|
54
54
|
tabIndex?: number;
|
|
55
55
|
}
|
|
56
|
-
export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
56
|
+
export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & import("@workday/canvas-kit-styling").CSProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY" | "cs"> & {
|
|
57
57
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
58
58
|
} & {
|
|
59
59
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,cAAc,EACd,SAAS,EAGT,SAAS,EACV,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,cAAc,EACd,SAAS,EAGT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,cAAc;IAC9D;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC/D;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,oBAAY,uBAAuB;IACjC,IAAI,SAAS;IACb,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AA8CD,eAAO,MAAM,QAAQ;;;CAWnB,CAAC"}
|
|
@@ -38,7 +38,7 @@ const StyledTextArea = common_1.styled('textarea')(({ theme, error }) => ({
|
|
|
38
38
|
borderRadius: tokens_1.borderRadius.m,
|
|
39
39
|
boxSizing: 'border-box',
|
|
40
40
|
minHeight: tokens_1.space.xxl,
|
|
41
|
-
minWidth:
|
|
41
|
+
minWidth: `calc((${tokens_1.space.xxxl} * 3) + ${tokens_1.space.xl})`,
|
|
42
42
|
transition: '0.2s box-shadow, 0.2s border-color',
|
|
43
43
|
padding: tokens_1.space.xxs,
|
|
44
44
|
margin: 0,
|
|
@@ -32,7 +32,7 @@ const StyledTextInput = common_1.styled('input')({
|
|
|
32
32
|
boxSizing: 'border-box',
|
|
33
33
|
height: 40,
|
|
34
34
|
transition: '0.2s box-shadow, 0.2s border-color',
|
|
35
|
-
padding:
|
|
35
|
+
padding: tokens_1.space.xxs,
|
|
36
36
|
margin: 0,
|
|
37
37
|
'&::placeholder': {
|
|
38
38
|
color: tokens_1.inputColors.placeholder,
|
|
@@ -37,46 +37,59 @@ export declare type CanvasSpaceValues = ValueOf<CanvasSpace>;
|
|
|
37
37
|
*
|
|
38
38
|
* */
|
|
39
39
|
export declare const space: CanvasSpace;
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Example using `space` with calc instead of deprecated `spaceNumbers`.
|
|
42
|
+
*
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // With deprecated `spaceNumbers`
|
|
45
|
+
* {
|
|
46
|
+
* paddingLeft: spaceNumbers.xl + 2 // 42px
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* // With `rem` based `space` tokens
|
|
52
|
+
* {
|
|
53
|
+
* padding: `calc(${space.xl} + 2px)` // 42px
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @deprecated ⚠️ `spaceNumbers` has been deprecated in a future major version. Please use our `rem` based [`space`](https://workday.github.io/canvas-kit/?path=/docs/tokens--space) tokens. In the case where you need to calculate a value, use [CSS calc()](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).
|
|
58
|
+
*/
|
|
41
59
|
export declare type CanvasSpaceNumbers = {
|
|
42
60
|
zero: 0;
|
|
43
|
-
xxxs:
|
|
44
|
-
xxs:
|
|
45
|
-
xs:
|
|
46
|
-
s:
|
|
47
|
-
m:
|
|
48
|
-
l:
|
|
49
|
-
xl:
|
|
50
|
-
xxl:
|
|
51
|
-
xxxl:
|
|
61
|
+
xxxs: 4;
|
|
62
|
+
xxs: 8;
|
|
63
|
+
xs: 12;
|
|
64
|
+
s: 16;
|
|
65
|
+
m: 24;
|
|
66
|
+
l: 32;
|
|
67
|
+
xl: 40;
|
|
68
|
+
xxl: 64;
|
|
69
|
+
xxxl: 80;
|
|
52
70
|
};
|
|
53
|
-
/** The numeric rem values for CanvasSpaceNumbers (numbers)
|
|
71
|
+
/** The numeric rem values for CanvasSpaceNumbers (numbers)
|
|
72
|
+
* @deprecated ⚠️ `CanvasSpaceNumberValues` has been deprecated in a future major version. Please use our `rem` based [`space`](https://workday.github.io/canvas-kit/?path=/docs/tokens--space) tokens. In the case where you need to calculate a value, use [CSS calc()](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).
|
|
73
|
+
*/
|
|
54
74
|
export declare type CanvasSpaceNumberValues = ValueOf<CanvasSpaceNumbers>;
|
|
55
75
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* - Here's an example usage to perform calculations:
|
|
59
|
-
* @example
|
|
76
|
+
* Example using `space` with calc instead of deprecated `spaceNumbers`.
|
|
77
|
+
*
|
|
60
78
|
* ```tsx
|
|
61
|
-
*
|
|
79
|
+
* // With deprecated `spaceNumbers`
|
|
80
|
+
* {
|
|
81
|
+
* paddingLeft: spaceNumbers.xl + 2 // 42px
|
|
82
|
+
* }
|
|
62
83
|
* ```
|
|
63
84
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* | 4px | 0.25rem | xxxs |
|
|
71
|
-
* | 8px | 0.5rem | xxs |
|
|
72
|
-
* | 12px | 0.75rem | xs |
|
|
73
|
-
* | 16px | 1rem | s |
|
|
74
|
-
* | 24px | 1.5rem | m |
|
|
75
|
-
* | 32px | 2rem | l |
|
|
76
|
-
* | 40px | 2.5rem | xl |
|
|
77
|
-
* | 64px | 4rem | xxl |
|
|
78
|
-
* | 80px | 5rem | xxxl |
|
|
85
|
+
* ```tsx
|
|
86
|
+
* // With `rem` based `space` tokens
|
|
87
|
+
* {
|
|
88
|
+
* padding: `calc(${space.xl} + 2px)` // 42px
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
79
91
|
*
|
|
92
|
+
* @deprecated ⚠️ `spaceNumbers` has been deprecated in a future major version. Please use our `rem` based [`space`](https://workday.github.io/canvas-kit/?path=/docs/tokens--space) tokens. In the case where you need to calculate a value, use [CSS calc()](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).
|
|
80
93
|
*/
|
|
81
94
|
export declare const spaceNumbers: CanvasSpaceNumbers;
|
|
82
95
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/space.ts"],"names":[],"mappings":"AAAA,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAO7B,qEAAqE;AACrE,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd,EAAE,EAAE,SAAS,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,QAAQ,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,kCAAkC;AAClC,oBAAY,eAAe,GAAG,MAAM,WAAW,CAAC;AAEhD,+CAA+C;AAC/C,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;KAmBK;AACL,eAAO,MAAM,KAAK,EAAE,WAWnB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/space.ts"],"names":[],"mappings":"AAAA,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAO7B,qEAAqE;AACrE,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd,EAAE,EAAE,SAAS,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,QAAQ,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,kCAAkC;AAClC,oBAAY,eAAe,GAAG,MAAM,WAAW,CAAC;AAEhD,+CAA+C;AAC/C,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;KAmBK;AACL,eAAO,MAAM,KAAK,EAAE,WAWnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,CAAC,CAAC;IACP,EAAE,EAAE,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC;IACN,EAAE,EAAE,EAAE,CAAC;IACP,GAAG,EAAE,EAAE,CAAC;IACR,IAAI,EAAE,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,oBAAY,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY,EAAE,kBAW1B,CAAC"}
|
|
@@ -34,40 +34,33 @@ exports.space = {
|
|
|
34
34
|
xxxl: '5rem',
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* - Here's an example usage to perform calculations:
|
|
40
|
-
* @example
|
|
37
|
+
* Example using `space` with calc instead of deprecated `spaceNumbers`.
|
|
38
|
+
*
|
|
41
39
|
* ```tsx
|
|
42
|
-
*
|
|
40
|
+
* // With deprecated `spaceNumbers`
|
|
41
|
+
* {
|
|
42
|
+
* paddingLeft: spaceNumbers.xl + 2 // 42px
|
|
43
|
+
* }
|
|
43
44
|
* ```
|
|
44
45
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* | 4px | 0.25rem | xxxs |
|
|
52
|
-
* | 8px | 0.5rem | xxs |
|
|
53
|
-
* | 12px | 0.75rem | xs |
|
|
54
|
-
* | 16px | 1rem | s |
|
|
55
|
-
* | 24px | 1.5rem | m |
|
|
56
|
-
* | 32px | 2rem | l |
|
|
57
|
-
* | 40px | 2.5rem | xl |
|
|
58
|
-
* | 64px | 4rem | xxl |
|
|
59
|
-
* | 80px | 5rem | xxxl |
|
|
46
|
+
* ```tsx
|
|
47
|
+
* // With `rem` based `space` tokens
|
|
48
|
+
* {
|
|
49
|
+
* padding: `calc(${space.xl} + 2px)` // 42px
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
60
52
|
*
|
|
53
|
+
* @deprecated ⚠️ `spaceNumbers` has been deprecated in a future major version. Please use our `rem` based [`space`](https://workday.github.io/canvas-kit/?path=/docs/tokens--space) tokens. In the case where you need to calculate a value, use [CSS calc()](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).
|
|
61
54
|
*/
|
|
62
55
|
exports.spaceNumbers = {
|
|
63
56
|
zero: 0,
|
|
64
|
-
xxxs:
|
|
65
|
-
xxs:
|
|
66
|
-
xs:
|
|
67
|
-
s:
|
|
68
|
-
m:
|
|
69
|
-
l:
|
|
70
|
-
xl:
|
|
71
|
-
xxl:
|
|
72
|
-
xxxl:
|
|
57
|
+
xxxs: 4,
|
|
58
|
+
xxs: 8,
|
|
59
|
+
xs: 12,
|
|
60
|
+
s: 16,
|
|
61
|
+
m: 24,
|
|
62
|
+
l: 32,
|
|
63
|
+
xl: 40,
|
|
64
|
+
xxl: 64,
|
|
65
|
+
xxxl: 80,
|
|
73
66
|
};
|