@workday/canvas-kit-react 8.0.0-alpha.208-next.1 → 8.0.0-alpha.222-next.6
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/common/lib/theming/index.ts +1 -1
- package/common/lib/theming/styled.ts +6 -3
- package/common/lib/utils/elements.ts +4 -4
- package/common/lib/utils/index.ts +0 -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/common/lib/theming/index.d.ts +1 -1
- package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/styled.d.ts +2 -0
- package/dist/commonjs/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/styled.js +1 -2
- package/dist/commonjs/common/lib/utils/elements.d.ts +1 -1
- package/dist/commonjs/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/elements.js +3 -3
- package/dist/commonjs/common/lib/utils/index.d.ts +0 -1
- package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.js +0 -1
- package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/layout/index.d.ts +8 -4
- package/dist/commonjs/layout/index.d.ts.map +1 -1
- package/dist/commonjs/layout/index.js +10 -2
- package/dist/commonjs/layout/lib/Box.d.ts +6 -4
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +8 -9
- package/dist/commonjs/layout/lib/Flex.d.ts +5 -2
- package/dist/commonjs/layout/lib/Flex.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Flex.js +5 -1
- package/dist/commonjs/layout/lib/Grid.d.ts +5 -6
- package/dist/commonjs/layout/lib/Grid.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Grid.js +2 -2
- package/dist/commonjs/layout/lib/Stack.d.ts +4 -4
- package/dist/commonjs/layout/lib/utils/background.d.ts +44 -0
- package/dist/commonjs/layout/lib/utils/background.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/background.js +57 -0
- package/dist/commonjs/layout/lib/utils/border/color.d.ts +47 -0
- package/dist/commonjs/layout/lib/utils/border/color.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/color.js +42 -0
- package/dist/commonjs/layout/lib/utils/border/index.d.ts +26 -0
- package/dist/commonjs/layout/lib/utils/border/index.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/index.js +46 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts +38 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.js +52 -0
- package/dist/commonjs/layout/lib/utils/border/radius.d.ts +33 -0
- package/dist/commonjs/layout/lib/utils/border/radius.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/radius.js +32 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts +34 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.js +42 -0
- package/dist/commonjs/layout/lib/utils/border/width.d.ts +34 -0
- package/dist/commonjs/layout/lib/utils/border/width.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/width.js +42 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts +12 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.js +90 -0
- package/dist/commonjs/layout/lib/utils/color.d.ts +23 -16
- package/dist/commonjs/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/color.js +25 -49
- package/dist/commonjs/layout/lib/utils/depth.d.ts +17 -11
- package/dist/commonjs/layout/lib/utils/depth.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/depth.js +20 -20
- package/dist/commonjs/layout/lib/utils/flex.d.ts +31 -12
- package/dist/commonjs/layout/lib/utils/flex.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/flex.js +58 -25
- package/dist/commonjs/layout/lib/utils/flexItem.d.ts +18 -15
- package/dist/commonjs/layout/lib/utils/flexItem.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/flexItem.js +43 -26
- package/dist/commonjs/layout/lib/utils/grid.d.ts +40 -35
- package/dist/commonjs/layout/lib/utils/grid.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/grid.js +99 -72
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts +17 -14
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/gridItem.js +58 -30
- package/dist/commonjs/layout/lib/utils/layout.d.ts +47 -25
- package/dist/commonjs/layout/lib/utils/layout.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/layout.js +71 -33
- package/dist/commonjs/layout/lib/utils/other.d.ts +44 -2
- package/dist/commonjs/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/other.js +101 -17
- package/dist/commonjs/layout/lib/utils/position.d.ts +37 -20
- package/dist/commonjs/layout/lib/utils/position.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/position.js +49 -66
- package/dist/commonjs/layout/lib/utils/space.d.ts +107 -51
- package/dist/commonjs/layout/lib/utils/space.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/space.js +98 -148
- package/dist/commonjs/layout/lib/utils/stack.d.ts +3 -6
- package/dist/commonjs/layout/lib/utils/stack.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/stack.js +13 -39
- package/dist/commonjs/layout/lib/utils/systemProps.d.ts +31 -0
- package/dist/commonjs/layout/lib/utils/systemProps.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/systemProps.js +2 -0
- package/dist/commonjs/layout/lib/utils/text.d.ts +33 -15
- package/dist/commonjs/layout/lib/utils/text.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/text.js +74 -38
- package/dist/commonjs/modal/lib/Modal.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/hooks/useReturnFocus.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useReturnFocus.js +72 -7
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/testing/index.d.ts +5 -0
- package/dist/commonjs/testing/index.d.ts.map +1 -0
- package/dist/commonjs/testing/index.js +16 -0
- package/dist/commonjs/testing/lib/ComponentStatesTable.d.ts +26 -0
- package/dist/commonjs/testing/lib/ComponentStatesTable.d.ts.map +1 -0
- package/dist/commonjs/testing/lib/ComponentStatesTable.js +48 -0
- package/dist/commonjs/testing/lib/StaticStates.d.ts +7 -0
- package/dist/commonjs/testing/lib/StaticStates.d.ts.map +1 -0
- package/dist/commonjs/{common/lib/utils → testing/lib}/StaticStates.js +1 -1
- package/dist/commonjs/testing/lib/permutateProps.d.ts +5 -0
- package/dist/commonjs/testing/lib/permutateProps.d.ts.map +1 -0
- package/dist/commonjs/testing/lib/permutateProps.js +47 -0
- package/dist/commonjs/testing/lib/propTypes.d.ts +15 -0
- package/dist/commonjs/testing/lib/propTypes.d.ts.map +1 -0
- package/dist/commonjs/testing/lib/propTypes.js +2 -0
- package/dist/commonjs/tokens/lib/colors.types.d.ts +4 -6
- package/dist/commonjs/tokens/lib/colors.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/common/lib/theming/index.d.ts +1 -1
- package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/styled.d.ts +2 -0
- package/dist/es6/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/styled.js +1 -2
- package/dist/es6/common/lib/utils/elements.d.ts +1 -1
- package/dist/es6/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/elements.js +3 -3
- package/dist/es6/common/lib/utils/index.d.ts +0 -1
- package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.js +0 -1
- package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
- package/dist/es6/icon/lib/SystemIcon.d.ts +1 -1
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/index.d.ts +1 -0
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +1 -0
- package/dist/es6/layout/index.d.ts +8 -4
- package/dist/es6/layout/index.d.ts.map +1 -1
- package/dist/es6/layout/index.js +7 -1
- package/dist/es6/layout/lib/Box.d.ts +6 -4
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +8 -9
- package/dist/es6/layout/lib/Flex.d.ts +5 -2
- package/dist/es6/layout/lib/Flex.d.ts.map +1 -1
- package/dist/es6/layout/lib/Flex.js +5 -1
- package/dist/es6/layout/lib/Grid.d.ts +5 -6
- package/dist/es6/layout/lib/Grid.d.ts.map +1 -1
- package/dist/es6/layout/lib/Grid.js +2 -2
- package/dist/es6/layout/lib/Stack.d.ts +4 -4
- package/dist/es6/layout/lib/utils/background.d.ts +44 -0
- package/dist/es6/layout/lib/utils/background.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/background.js +54 -0
- package/dist/es6/layout/lib/utils/border/color.d.ts +47 -0
- package/dist/es6/layout/lib/utils/border/color.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/color.js +39 -0
- package/dist/es6/layout/lib/utils/border/index.d.ts +26 -0
- package/dist/es6/layout/lib/utils/border/index.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/index.js +43 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.d.ts +38 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.js +49 -0
- package/dist/es6/layout/lib/utils/border/radius.d.ts +33 -0
- package/dist/es6/layout/lib/utils/border/radius.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/radius.js +29 -0
- package/dist/es6/layout/lib/utils/border/shorthand.d.ts +34 -0
- package/dist/es6/layout/lib/utils/border/shorthand.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/shorthand.js +39 -0
- package/dist/es6/layout/lib/utils/border/width.d.ts +34 -0
- package/dist/es6/layout/lib/utils/border/width.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/width.js +39 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.d.ts +12 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.js +85 -0
- package/dist/es6/layout/lib/utils/color.d.ts +23 -16
- package/dist/es6/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/color.js +24 -47
- package/dist/es6/layout/lib/utils/depth.d.ts +17 -11
- package/dist/es6/layout/lib/utils/depth.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/depth.js +19 -18
- package/dist/es6/layout/lib/utils/flex.d.ts +31 -12
- package/dist/es6/layout/lib/utils/flex.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/flex.js +57 -23
- package/dist/es6/layout/lib/utils/flexItem.d.ts +18 -15
- package/dist/es6/layout/lib/utils/flexItem.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/flexItem.js +42 -24
- package/dist/es6/layout/lib/utils/grid.d.ts +40 -35
- package/dist/es6/layout/lib/utils/grid.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/grid.js +98 -70
- package/dist/es6/layout/lib/utils/gridItem.d.ts +17 -14
- package/dist/es6/layout/lib/utils/gridItem.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/gridItem.js +57 -28
- package/dist/es6/layout/lib/utils/layout.d.ts +47 -25
- package/dist/es6/layout/lib/utils/layout.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/layout.js +70 -31
- package/dist/es6/layout/lib/utils/other.d.ts +44 -2
- package/dist/es6/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/other.js +100 -15
- package/dist/es6/layout/lib/utils/position.d.ts +37 -20
- package/dist/es6/layout/lib/utils/position.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/position.js +48 -64
- package/dist/es6/layout/lib/utils/space.d.ts +107 -51
- package/dist/es6/layout/lib/utils/space.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/space.js +97 -146
- package/dist/es6/layout/lib/utils/stack.d.ts +3 -6
- package/dist/es6/layout/lib/utils/stack.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/stack.js +13 -39
- package/dist/es6/layout/lib/utils/systemProps.d.ts +31 -0
- package/dist/es6/layout/lib/utils/systemProps.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/systemProps.js +1 -0
- package/dist/es6/layout/lib/utils/text.d.ts +33 -15
- package/dist/es6/layout/lib/utils/text.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/text.js +73 -36
- package/dist/es6/modal/lib/Modal.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/hooks/useReturnFocus.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useReturnFocus.js +73 -8
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/testing/index.d.ts +5 -0
- package/dist/es6/testing/index.d.ts.map +1 -0
- package/dist/es6/testing/index.js +4 -0
- package/dist/es6/testing/lib/ComponentStatesTable.d.ts +26 -0
- package/dist/es6/testing/lib/ComponentStatesTable.d.ts.map +1 -0
- package/dist/es6/testing/lib/ComponentStatesTable.js +41 -0
- package/dist/es6/testing/lib/StaticStates.d.ts +7 -0
- package/dist/es6/testing/lib/StaticStates.d.ts.map +1 -0
- package/dist/es6/{common/lib/utils → testing/lib}/StaticStates.js +1 -1
- package/dist/es6/testing/lib/permutateProps.d.ts +5 -0
- package/dist/es6/testing/lib/permutateProps.d.ts.map +1 -0
- package/dist/es6/testing/lib/permutateProps.js +43 -0
- package/dist/es6/testing/lib/propTypes.d.ts +15 -0
- package/dist/es6/testing/lib/propTypes.d.ts.map +1 -0
- package/dist/es6/testing/lib/propTypes.js +1 -0
- package/dist/es6/tokens/lib/colors.types.d.ts +4 -6
- package/dist/es6/tokens/lib/colors.types.d.ts.map +1 -1
- package/icon/lib/SystemIcon.tsx +1 -1
- package/index.ts +1 -0
- package/layout/index.ts +8 -4
- package/layout/lib/Box.tsx +10 -36
- package/layout/lib/Flex.tsx +5 -1
- package/layout/lib/Grid.tsx +3 -4
- package/layout/lib/utils/background.ts +83 -0
- package/layout/lib/utils/border/color.ts +85 -0
- package/layout/lib/utils/border/index.ts +49 -0
- package/layout/lib/utils/border/lineStyle.ts +87 -0
- package/layout/lib/utils/border/radius.ts +61 -0
- package/layout/lib/utils/border/shorthand.ts +73 -0
- package/layout/lib/utils/border/width.ts +73 -0
- package/layout/lib/utils/buildStyleFns.ts +117 -0
- package/layout/lib/utils/color.ts +40 -55
- package/layout/lib/utils/depth.ts +28 -24
- package/layout/lib/utils/flex.ts +83 -32
- package/layout/lib/utils/flexItem.ts +54 -36
- package/layout/lib/utils/grid.ts +131 -94
- package/layout/lib/utils/gridItem.ts +69 -41
- package/layout/lib/utils/layout.ts +109 -50
- package/layout/lib/utils/other.ts +142 -15
- package/layout/lib/utils/position.ts +79 -73
- package/layout/lib/utils/space.ts +202 -196
- package/layout/lib/utils/stack.ts +19 -45
- package/layout/lib/utils/systemProps.ts +46 -0
- package/layout/lib/utils/text.ts +99 -34
- package/package.json +3 -3
- package/popup/lib/hooks/useReturnFocus.tsx +83 -9
- package/testing/LICENSE +52 -0
- package/testing/README.md +6 -0
- package/testing/index.ts +4 -0
- package/testing/lib/ComponentStatesTable.tsx +80 -0
- package/{common/lib/utils → testing/lib}/StaticStates.tsx +5 -4
- package/testing/lib/permutateProps.ts +47 -0
- package/testing/lib/propTypes.ts +15 -0
- package/testing/package.json +6 -0
- package/tokens/lib/colors.types.ts +4 -7
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts +0 -8
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/border.d.ts +0 -103
- package/dist/commonjs/layout/lib/utils/border.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/border.js +0 -153
- package/dist/commonjs/layout/lib/utils/font.d.ts +0 -29
- package/dist/commonjs/layout/lib/utils/font.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/font.js +0 -57
- package/dist/es6/common/lib/utils/StaticStates.d.ts +0 -8
- package/dist/es6/common/lib/utils/StaticStates.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/border.d.ts +0 -103
- package/dist/es6/layout/lib/utils/border.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/border.js +0 -149
- package/dist/es6/layout/lib/utils/font.d.ts +0 -29
- package/dist/es6/layout/lib/utils/font.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/font.js +0 -53
- package/layout/lib/utils/border.ts +0 -263
- package/layout/lib/utils/font.ts +0 -67
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './breakpoints';
|
|
2
2
|
export {createCanvasTheme} from './createCanvasTheme';
|
|
3
3
|
export * from './types';
|
|
4
|
-
export {default as styled} from './styled';
|
|
4
|
+
export {default as styled, StyleRewriteFn} from './styled';
|
|
5
5
|
export * from './theme';
|
|
6
6
|
export * from './useTheme';
|
|
7
7
|
export * from './useIsRTL';
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import {default as emotionStyled, CreateStyled, Interpolation, CSSObject} from '@emotion/styled';
|
|
2
|
+
import {CSSProperties} from '@workday/canvas-kit-react/tokens';
|
|
2
3
|
|
|
3
4
|
import {useTheme, EmotionCanvasTheme, ContentDirection} from './index';
|
|
4
5
|
import rtlCSSJS from 'rtl-css-js';
|
|
5
|
-
import {convertToStaticStates} from '../utils/StaticStates';
|
|
6
6
|
|
|
7
7
|
const noop = (styles: any) => styles;
|
|
8
8
|
|
|
9
9
|
// Pulled from https://github.com/emotion-js/emotion/blob/master/packages/styled-base/src/utils.js#L6 (not exported)
|
|
10
10
|
type Interpolations = Array<any>;
|
|
11
|
+
export type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
|
|
11
12
|
|
|
12
13
|
function styled<Props>(node: any) {
|
|
13
14
|
return (...args: Interpolation<Props>[]) => {
|
|
14
15
|
const newArgs: Interpolations = args.map(
|
|
15
|
-
interpolation => (
|
|
16
|
+
interpolation => (
|
|
17
|
+
props: Props & {theme: EmotionCanvasTheme & {_styleRewriteFn?: StyleRewriteFn}}
|
|
18
|
+
) => {
|
|
16
19
|
props.theme = useTheme(props.theme);
|
|
17
20
|
const direction = props.theme.canvas.direction;
|
|
18
21
|
const maybeFlip = direction === ContentDirection.RTL ? rtlCSSJS : noop;
|
|
19
|
-
const maybeConvert = props.theme.
|
|
22
|
+
const maybeConvert = props.theme._styleRewriteFn || noop;
|
|
20
23
|
try {
|
|
21
24
|
if (typeof interpolation === 'function') {
|
|
22
25
|
return maybeFlip(maybeConvert(interpolation(props)) as CSSObject);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Is an element focusable? This function performs various tests to see if the element in question
|
|
3
3
|
* can receive focus. Should skip disabled elements as they are not focusable.
|
|
4
4
|
*/
|
|
5
|
-
export const isFocusable = (element:
|
|
5
|
+
export const isFocusable = (element: Element): boolean => {
|
|
6
6
|
if (element.hasAttribute('disabled')) {
|
|
7
|
-
return
|
|
7
|
+
return false;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const nodeName = element.nodeName.toLowerCase();
|
|
@@ -35,7 +35,7 @@ export const getFirstFocusableElement = (container: HTMLElement): HTMLElement |
|
|
|
35
35
|
|
|
36
36
|
for (let i = 0; i < elements.length; i++) {
|
|
37
37
|
const element = elements.item(i);
|
|
38
|
-
if (element && isFocusable(element
|
|
38
|
+
if (element && isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
39
39
|
return element as HTMLElement;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -51,7 +51,7 @@ export const getLastFocusableElement = (container: HTMLElement): HTMLElement | n
|
|
|
51
51
|
|
|
52
52
|
for (let i = elements.length - 1; i >= 0; i--) {
|
|
53
53
|
const element = elements.item(i);
|
|
54
|
-
if (element && isFocusable(element
|
|
54
|
+
if (element && isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
55
55
|
return element as HTMLElement;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -8,6 +8,6 @@ export interface CardProps extends BoxProps {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const Card: import("../../common").ElementComponent<"div", CardProps> & {
|
|
10
10
|
Heading: import("../../common").ElementComponent<"h3", import("./CardHeading").CardHeadingProps>;
|
|
11
|
-
Body: import("../../common").ElementComponent<"div", import("../../layout").
|
|
11
|
+
Body: import("../../common").ElementComponent<"div", import("../../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("../../layout").ColorStyleProps & import("../../layout").DepthStyleProps & import("../../layout").FlexItemStyleProps & import("../../layout").GridItemStyleProps & import("../../layout").LayoutStyleProps & import("../../layout").OtherStyleProps & import("../../layout").PositionStyleProps & import("../../layout").SpaceStyleProps & import("../../layout").TextStyleProps>;
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CardBody: import("../../common").ElementComponent<"div", import("../../layout").
|
|
1
|
+
export declare const CardBody: import("../../common").ElementComponent<"div", import("../../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("../../layout").ColorStyleProps & import("../../layout").DepthStyleProps & import("../../layout").FlexItemStyleProps & import("../../layout").GridItemStyleProps & import("../../layout").LayoutStyleProps & import("../../layout").OtherStyleProps & import("../../layout").PositionStyleProps & import("../../layout").SpaceStyleProps & import("../../layout").TextStyleProps>;
|
|
2
2
|
//# sourceMappingURL=CardBody.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardBody.d.ts","sourceRoot":"","sources":["../../../../card/lib/CardBody.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"CardBody.d.ts","sourceRoot":"","sources":["../../../../card/lib/CardBody.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,k0BASnB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './breakpoints';
|
|
2
2
|
export { createCanvasTheme } from './createCanvasTheme';
|
|
3
3
|
export * from './types';
|
|
4
|
-
export { default as styled } from './styled';
|
|
4
|
+
export { default as styled, StyleRewriteFn } from './styled';
|
|
5
5
|
export * from './theme';
|
|
6
6
|
export * from './useTheme';
|
|
7
7
|
export * from './useIsRTL';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3D,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CreateStyled } from '@emotion/styled';
|
|
2
|
+
import { CSSProperties } from '@workday/canvas-kit-react/tokens';
|
|
3
|
+
export declare type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
|
|
2
4
|
declare const _default: CreateStyled;
|
|
3
5
|
export default _default;
|
|
4
6
|
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;;
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAS/D,oBAAY,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;;AA2BhF,wBAAsC"}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
7
|
var index_1 = require("./index");
|
|
8
8
|
var rtl_css_js_1 = __importDefault(require("rtl-css-js"));
|
|
9
|
-
var StaticStates_1 = require("../utils/StaticStates");
|
|
10
9
|
var noop = function (styles) { return styles; };
|
|
11
10
|
function styled(node) {
|
|
12
11
|
return function () {
|
|
@@ -18,7 +17,7 @@ function styled(node) {
|
|
|
18
17
|
props.theme = index_1.useTheme(props.theme);
|
|
19
18
|
var direction = props.theme.canvas.direction;
|
|
20
19
|
var maybeFlip = direction === index_1.ContentDirection.RTL ? rtl_css_js_1.default : noop;
|
|
21
|
-
var maybeConvert = props.theme.
|
|
20
|
+
var maybeConvert = props.theme._styleRewriteFn || noop;
|
|
22
21
|
try {
|
|
23
22
|
if (typeof interpolation === 'function') {
|
|
24
23
|
return maybeFlip(maybeConvert(interpolation(props)));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Is an element focusable? This function performs various tests to see if the element in question
|
|
3
3
|
* can receive focus. Should skip disabled elements as they are not focusable.
|
|
4
4
|
*/
|
|
5
|
-
export declare const isFocusable: (element:
|
|
5
|
+
export declare const isFocusable: (element: Element) => boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Get the first focusable element in a container.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,OAuB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW9E,CAAC"}
|
|
@@ -7,7 +7,7 @@ exports.getLastFocusableElement = exports.getFirstFocusableElement = exports.isF
|
|
|
7
7
|
*/
|
|
8
8
|
var isFocusable = function (element) {
|
|
9
9
|
if (element.hasAttribute('disabled')) {
|
|
10
|
-
return
|
|
10
|
+
return false;
|
|
11
11
|
}
|
|
12
12
|
var nodeName = element.nodeName.toLowerCase();
|
|
13
13
|
var validInput = nodeName === 'input' && element.getAttribute('type') !== 'hidden';
|
|
@@ -32,7 +32,7 @@ var getFirstFocusableElement = function (container) {
|
|
|
32
32
|
var elements = container.querySelectorAll('*');
|
|
33
33
|
for (var i = 0; i < elements.length; i++) {
|
|
34
34
|
var element = elements.item(i);
|
|
35
|
-
if (element && exports.isFocusable(element)) {
|
|
35
|
+
if (element && exports.isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
36
36
|
return element;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -46,7 +46,7 @@ var getLastFocusableElement = function (container) {
|
|
|
46
46
|
var elements = container.querySelectorAll('*');
|
|
47
47
|
for (var i = elements.length - 1; i >= 0; i--) {
|
|
48
48
|
var element = elements.item(i);
|
|
49
|
-
if (element && exports.isFocusable(element)) {
|
|
49
|
+
if (element && exports.isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
50
50
|
return element;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -27,4 +27,3 @@ __exportStar(require("./useIsFullscreen"), exports);
|
|
|
27
27
|
__exportStar(require("./useModalityType"), exports);
|
|
28
28
|
__exportStar(require("./useWindowSize"), exports);
|
|
29
29
|
__exportStar(require("./useResizeObserver"), exports);
|
|
30
|
-
__exportStar(require("./StaticStates"), exports);
|
|
@@ -88,7 +88,7 @@ export declare const Dialog: import("../../common").ComponentM<DialogProps & Par
|
|
|
88
88
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
89
89
|
};
|
|
90
90
|
}> & {
|
|
91
|
-
Body: import("../../common").ElementComponentM<"div", import("../..").
|
|
91
|
+
Body: import("../../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>, {
|
|
92
92
|
state: {
|
|
93
93
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
94
94
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -39,7 +39,7 @@ export interface SystemIconStyles {
|
|
|
39
39
|
*/
|
|
40
40
|
fillHover?: string;
|
|
41
41
|
}
|
|
42
|
-
export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src' | 'color' | 'type' | 'background'> {
|
|
42
|
+
export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src' | 'color' | 'fill' | 'type' | 'background'> {
|
|
43
43
|
/**
|
|
44
44
|
* The icon to display from `@workday/canvas-system-icons-web`.
|
|
45
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;IACnE;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,eAAO,MAAM,UAAU,kEA4CrB,CAAC"}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __exportStar(require("./status-indicator"), exports);
|
|
|
40
40
|
__exportStar(require("./switch"), exports);
|
|
41
41
|
__exportStar(require("./table"), exports);
|
|
42
42
|
__exportStar(require("./tabs"), exports);
|
|
43
|
+
__exportStar(require("./testing"), exports);
|
|
43
44
|
__exportStar(require("./text"), exports);
|
|
44
45
|
__exportStar(require("./text-area"), exports);
|
|
45
46
|
__exportStar(require("./text-input"), exports);
|
|
@@ -2,20 +2,24 @@ import { DeprecatedLayout } from './lib/Layout';
|
|
|
2
2
|
import { DeprecatedColumn } from './lib/Column';
|
|
3
3
|
export { DeprecatedLayout, DeprecatedColumn };
|
|
4
4
|
export * from './lib/Box';
|
|
5
|
+
export * from './lib/utils/background';
|
|
5
6
|
export * from './lib/utils/border';
|
|
6
7
|
export * from './lib/utils/color';
|
|
7
|
-
export { DepthStyleProps } from './lib/utils/depth';
|
|
8
|
+
export { DepthStyleProps, depthStyleFnConfigs } from './lib/utils/depth';
|
|
9
|
+
export * from './lib/utils/flex';
|
|
8
10
|
export * from './lib/utils/flexItem';
|
|
9
|
-
export * from './lib/utils/
|
|
11
|
+
export * from './lib/utils/grid';
|
|
12
|
+
export * from './lib/utils/gridItem';
|
|
10
13
|
export * from './lib/utils/layout';
|
|
14
|
+
export * from './lib/utils/other';
|
|
11
15
|
export * from './lib/utils/position';
|
|
12
|
-
export { SpaceStyleProps } from './lib/utils/space';
|
|
16
|
+
export { SpaceStyleProps, spaceStyleFnConfigs } from './lib/utils/space';
|
|
13
17
|
export * from './lib/utils/text';
|
|
14
18
|
export * from './lib/Flex';
|
|
15
19
|
export * from './lib/Grid';
|
|
16
20
|
export * from './lib/Stack';
|
|
17
21
|
export type { FlexStyleProps } from './lib/utils/flex';
|
|
18
22
|
export type { GridStyleProps } from './lib/utils/grid';
|
|
19
|
-
export type { GridItemStyleProps } from './lib/utils/gridItem';
|
|
23
|
+
export type { GridItemStyleProps, gridItemStyleFnConfigs } from './lib/utils/gridItem';
|
|
20
24
|
export type { StackSpacing, StackDirection, StackStyleProps } from './lib/utils/stack';
|
|
21
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAC,CAAC;AAC7C,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAC,CAAC;AAC7C,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AACvE,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AACvE,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -10,18 +10,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.DeprecatedColumn = exports.DeprecatedLayout = void 0;
|
|
13
|
+
exports.spaceStyleFnConfigs = exports.depthStyleFnConfigs = exports.DeprecatedColumn = exports.DeprecatedLayout = void 0;
|
|
14
14
|
var Layout_1 = require("./lib/Layout");
|
|
15
15
|
Object.defineProperty(exports, "DeprecatedLayout", { enumerable: true, get: function () { return Layout_1.DeprecatedLayout; } });
|
|
16
16
|
var Column_1 = require("./lib/Column");
|
|
17
17
|
Object.defineProperty(exports, "DeprecatedColumn", { enumerable: true, get: function () { return Column_1.DeprecatedColumn; } });
|
|
18
18
|
__exportStar(require("./lib/Box"), exports);
|
|
19
|
+
__exportStar(require("./lib/utils/background"), exports);
|
|
19
20
|
__exportStar(require("./lib/utils/border"), exports);
|
|
20
21
|
__exportStar(require("./lib/utils/color"), exports);
|
|
22
|
+
var depth_1 = require("./lib/utils/depth");
|
|
23
|
+
Object.defineProperty(exports, "depthStyleFnConfigs", { enumerable: true, get: function () { return depth_1.depthStyleFnConfigs; } });
|
|
24
|
+
__exportStar(require("./lib/utils/flex"), exports);
|
|
21
25
|
__exportStar(require("./lib/utils/flexItem"), exports);
|
|
22
|
-
__exportStar(require("./lib/utils/
|
|
26
|
+
__exportStar(require("./lib/utils/grid"), exports);
|
|
27
|
+
__exportStar(require("./lib/utils/gridItem"), exports);
|
|
23
28
|
__exportStar(require("./lib/utils/layout"), exports);
|
|
29
|
+
__exportStar(require("./lib/utils/other"), exports);
|
|
24
30
|
__exportStar(require("./lib/utils/position"), exports);
|
|
31
|
+
var space_1 = require("./lib/utils/space");
|
|
32
|
+
Object.defineProperty(exports, "spaceStyleFnConfigs", { enumerable: true, get: function () { return space_1.spaceStyleFnConfigs; } });
|
|
25
33
|
__exportStar(require("./lib/utils/text"), exports);
|
|
26
34
|
__exportStar(require("./lib/Flex"), exports);
|
|
27
35
|
__exportStar(require("./lib/Grid"), exports);
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { BackgroundStyleProps } from './utils/background';
|
|
2
3
|
import { BorderStyleProps } from './utils/border';
|
|
3
4
|
import { ColorStyleProps } from './utils/color';
|
|
4
5
|
import { DepthStyleProps } from './utils/depth';
|
|
5
6
|
import { FlexItemStyleProps } from './utils/flexItem';
|
|
6
7
|
import { GridItemStyleProps } from './utils/gridItem';
|
|
7
|
-
import { FontStyleProps } from './utils/font';
|
|
8
8
|
import { LayoutStyleProps } from './utils/layout';
|
|
9
9
|
import { OtherStyleProps } from './utils/other';
|
|
10
10
|
import { PositionStyleProps } from './utils/position';
|
|
11
11
|
import { SpaceStyleProps } from './utils/space';
|
|
12
12
|
import { TextStyleProps } from './utils/text';
|
|
13
|
-
export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & GridItemStyleProps &
|
|
13
|
+
export declare type BoxProps = BackgroundStyleProps & BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & GridItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & TextStyleProps & {
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
|
|
18
18
|
* Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
|
|
19
19
|
* @example
|
|
20
|
+
* ```
|
|
20
21
|
* import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
21
22
|
* const StyledHeader = styled('h1')(
|
|
22
23
|
* boxStyleFn,
|
|
@@ -25,9 +26,10 @@ export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStylePr
|
|
|
25
26
|
* }
|
|
26
27
|
* )
|
|
27
28
|
*
|
|
28
|
-
*
|
|
29
|
+
* ...
|
|
29
30
|
*
|
|
30
31
|
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
32
|
+
* ```
|
|
31
33
|
*/
|
|
32
34
|
export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
33
35
|
/**
|
|
@@ -47,5 +49,5 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
|
47
49
|
* );
|
|
48
50
|
*
|
|
49
51
|
*/
|
|
50
|
-
export declare const Box: import("../../common").ElementComponent<"div",
|
|
52
|
+
export declare const Box: import("../../common").ElementComponent<"div", 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 & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & GridItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & TextStyleProps>;
|
|
51
53
|
//# 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;AAM/B,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAa,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,QAAQ,GAAG,oBAAoB,GACzC,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,cAAc,GAAG;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA4BJ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU,sCA0BtB,CAAC;AAQF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,ihBAad,CAAC"}
|
|
@@ -50,12 +50,12 @@ var styled_1 = __importDefault(require("@emotion/styled"));
|
|
|
50
50
|
var is_prop_valid_1 = __importDefault(require("@emotion/is-prop-valid"));
|
|
51
51
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
52
52
|
// style props
|
|
53
|
+
var background_1 = require("./utils/background");
|
|
53
54
|
var border_1 = require("./utils/border");
|
|
54
55
|
var color_1 = require("./utils/color");
|
|
55
56
|
var depth_1 = require("./utils/depth");
|
|
56
57
|
var flexItem_1 = require("./utils/flexItem");
|
|
57
58
|
var gridItem_1 = require("./utils/gridItem");
|
|
58
|
-
var font_1 = require("./utils/font");
|
|
59
59
|
var layout_1 = require("./utils/layout");
|
|
60
60
|
var other_1 = require("./utils/other");
|
|
61
61
|
var position_1 = require("./utils/position");
|
|
@@ -89,6 +89,7 @@ var shouldForwardProp = function (prop) {
|
|
|
89
89
|
* A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
|
|
90
90
|
* Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
|
|
91
91
|
* @example
|
|
92
|
+
* ```
|
|
92
93
|
* import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
93
94
|
* const StyledHeader = styled('h1')(
|
|
94
95
|
* boxStyleFn,
|
|
@@ -97,22 +98,24 @@ var shouldForwardProp = function (prop) {
|
|
|
97
98
|
* }
|
|
98
99
|
* )
|
|
99
100
|
*
|
|
100
|
-
*
|
|
101
|
+
* ...
|
|
101
102
|
*
|
|
102
103
|
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
104
|
+
* ```
|
|
103
105
|
*/
|
|
104
106
|
var boxStyleFn = function (props) {
|
|
105
107
|
return [
|
|
106
108
|
{
|
|
107
109
|
boxSizing: 'border-box',
|
|
108
110
|
},
|
|
111
|
+
background_1.background,
|
|
109
112
|
border_1.border,
|
|
110
113
|
color_1.color,
|
|
111
114
|
depth_1.depth,
|
|
112
115
|
flexItem_1.flexItem,
|
|
113
116
|
gridItem_1.gridItem,
|
|
114
|
-
font_1.font,
|
|
115
117
|
layout_1.layout,
|
|
118
|
+
other_1.other,
|
|
116
119
|
position_1.position,
|
|
117
120
|
space_1.space,
|
|
118
121
|
text_1.text,
|
|
@@ -129,13 +132,9 @@ var boxStyleFn = function (props) {
|
|
|
129
132
|
};
|
|
130
133
|
exports.boxStyleFn = boxStyleFn;
|
|
131
134
|
// Meant to be used with elements. The `shouldForwardProps` will remove all style props
|
|
132
|
-
var StyledBoxElement = styled_1.default('div', { shouldForwardProp: shouldForwardProp })(
|
|
133
|
-
boxSizing: 'border-box',
|
|
134
|
-
}, border_1.border, color_1.color, depth_1.depth, flexItem_1.flexItem, gridItem_1.gridItem, font_1.font, layout_1.layout, position_1.position, space_1.space, text_1.text);
|
|
135
|
+
var StyledBoxElement = styled_1.default('div', { shouldForwardProp: shouldForwardProp })(exports.boxStyleFn);
|
|
135
136
|
// Meant to be used with components. There is no `shouldForwardProps` - all props will be forwarded to the component
|
|
136
|
-
var StyledBoxComponent = styled_1.default('div')(
|
|
137
|
-
boxSizing: 'border-box',
|
|
138
|
-
}, border_1.border, color_1.color, depth_1.depth, flexItem_1.flexItem, gridItem_1.gridItem, font_1.font, layout_1.layout, other_1.other, position_1.position, space_1.space, text_1.text);
|
|
137
|
+
var StyledBoxComponent = styled_1.default('div')(exports.boxStyleFn);
|
|
139
138
|
/**
|
|
140
139
|
* `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
|
|
141
140
|
* It is highly flexible, and its primary purpose is to build other components.
|
|
@@ -7,6 +7,7 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
7
7
|
* `Flex` is built on top of `Box` and has access to all `BoxProps`.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
|
+
* ```tsx
|
|
10
11
|
* import { Flex, FlexProps } from '@workday/canvas-kit-react/layout';
|
|
11
12
|
*
|
|
12
13
|
* interface CardProps extends FlexProps {
|
|
@@ -20,7 +21,9 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
20
21
|
* <p>This card uses flexbox to set its layout.</p>
|
|
21
22
|
* </Flex>
|
|
22
23
|
* );
|
|
23
|
-
*
|
|
24
|
+
* ```
|
|
24
25
|
*/
|
|
25
|
-
export declare const Flex: import("../../common").ElementComponent<"div", import("..").
|
|
26
|
+
export declare const Flex: import("../../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 & FlexStyleProps> & {
|
|
27
|
+
Item: import("../../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>;
|
|
28
|
+
};
|
|
26
29
|
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Flex.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AASlD
|
|
1
|
+
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Flex.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AASlD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI;;CAYf,CAAC"}
|
|
@@ -59,6 +59,7 @@ var StyledFlex = styled_1.default(Box_1.Box)({
|
|
|
59
59
|
* `Flex` is built on top of `Box` and has access to all `BoxProps`.
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
|
+
* ```tsx
|
|
62
63
|
* import { Flex, FlexProps } from '@workday/canvas-kit-react/layout';
|
|
63
64
|
*
|
|
64
65
|
* interface CardProps extends FlexProps {
|
|
@@ -72,7 +73,7 @@ var StyledFlex = styled_1.default(Box_1.Box)({
|
|
|
72
73
|
* <p>This card uses flexbox to set its layout.</p>
|
|
73
74
|
* </Flex>
|
|
74
75
|
* );
|
|
75
|
-
*
|
|
76
|
+
* ```
|
|
76
77
|
*/
|
|
77
78
|
exports.Flex = common_1.createComponent('div')({
|
|
78
79
|
displayName: 'Flex',
|
|
@@ -80,4 +81,7 @@ exports.Flex = common_1.createComponent('div')({
|
|
|
80
81
|
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
81
82
|
return (React.createElement(StyledFlex, __assign({ as: Element, ref: ref }, elemProps), children));
|
|
82
83
|
},
|
|
84
|
+
subComponents: {
|
|
85
|
+
Item: Box_1.Box,
|
|
86
|
+
},
|
|
83
87
|
});
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { BoxProps } from './Box';
|
|
2
2
|
import { GridStyleProps } from './utils/grid';
|
|
3
|
-
import { GridItemStyleProps } from './utils/gridItem';
|
|
4
3
|
export declare type GridProps = BoxProps & GridStyleProps;
|
|
5
|
-
export declare type GridItemProps = BoxProps
|
|
4
|
+
export declare type GridItemProps = BoxProps;
|
|
6
5
|
/**
|
|
7
6
|
* `Grid` is a two-dimensional layout system for the web. It lets you lay content out in rows and columns.
|
|
8
7
|
* It is highly flexible, and can be used on its own or to build other components.
|
|
8
|
+
* `Grid` is built on top of `Box` and has access to all `BoxProps`.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* ```
|
|
11
|
+
* ```tsx
|
|
12
12
|
* import { Grid } from '@workday/canvas-kit-react/layout';
|
|
13
|
-
* `Grid` is built on top of `Box` and has access to all `BoxProps`.
|
|
14
13
|
*
|
|
15
14
|
* interface CardProps extends GridProps {
|
|
16
15
|
* // card-specific props
|
|
@@ -25,7 +24,7 @@ export declare type GridItemProps = BoxProps & GridItemStyleProps;
|
|
|
25
24
|
* );
|
|
26
25
|
*```
|
|
27
26
|
*/
|
|
28
|
-
export declare const Grid: import("../../common").ElementComponent<"div", import("..").
|
|
27
|
+
export declare const Grid: import("../../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 & GridStyleProps> & {
|
|
29
28
|
/**
|
|
30
29
|
* `<Grid.Item />` is the child specific sub-component to `<Grid/>`. `<Grid.Item />` gets child specific props, whereas `<Grid./>` gets parent container props.
|
|
31
30
|
*
|
|
@@ -47,6 +46,6 @@ export declare const Grid: import("../../common").ElementComponent<"div", import
|
|
|
47
46
|
* );
|
|
48
47
|
*```
|
|
49
48
|
*/
|
|
50
|
-
Item: import("../../common").ElementComponent<"div", import("..").
|
|
49
|
+
Item: import("../../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>;
|
|
51
50
|
};
|
|
52
51
|
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Grid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Grid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AAClD,oBAAY,aAAa,GAAG,QAAQ,CAAC;AAoBrC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI;IAUb;;;;;;;;;;;;;;;;;;;;OAoBG;;CAIL,CAAC"}
|
|
@@ -63,11 +63,11 @@ var GridItem = common_1.createComponent('div')({
|
|
|
63
63
|
/**
|
|
64
64
|
* `Grid` is a two-dimensional layout system for the web. It lets you lay content out in rows and columns.
|
|
65
65
|
* It is highly flexible, and can be used on its own or to build other components.
|
|
66
|
+
* `Grid` is built on top of `Box` and has access to all `BoxProps`.
|
|
66
67
|
*
|
|
67
68
|
* @example
|
|
68
|
-
* ```
|
|
69
|
+
* ```tsx
|
|
69
70
|
* import { Grid } from '@workday/canvas-kit-react/layout';
|
|
70
|
-
* `Grid` is built on top of `Box` and has access to all `BoxProps`.
|
|
71
71
|
*
|
|
72
72
|
* interface CardProps extends GridProps {
|
|
73
73
|
* // card-specific props
|