@workday/canvas-kit-react 8.0.0-alpha.144-next.0 → 8.0.0-alpha.151-next.3
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/banner/lib/Banner.tsx +3 -6
- package/card/lib/CardBody.tsx +3 -6
- package/card/lib/CardHeading.tsx +13 -10
- package/checkbox/index.ts +0 -1
- package/checkbox/lib/Checkbox.tsx +9 -24
- package/color-picker/index.ts +0 -1
- package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
- package/dist/commonjs/banner/lib/Banner.js +2 -4
- 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/card/lib/CardBody.js +1 -6
- package/dist/commonjs/card/lib/CardHeading.d.ts.map +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +2 -10
- package/dist/commonjs/checkbox/index.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.js +2 -13
- package/dist/commonjs/color-picker/index.d.ts.map +1 -1
- package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
- package/dist/commonjs/form-field/index.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Hint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Hint.js +5 -13
- 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 +4 -0
- package/dist/commonjs/layout/index.d.ts.map +1 -1
- package/dist/commonjs/layout/index.js +3 -0
- package/dist/commonjs/layout/lib/Box.d.ts +4 -2
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +27 -3
- package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/dist/commonjs/layout/lib/Flex.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Grid.d.ts +52 -0
- package/dist/commonjs/layout/lib/Grid.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/Grid.js +117 -0
- package/dist/commonjs/layout/lib/Stack.d.ts +4 -4
- package/dist/commonjs/layout/lib/Stack.js +4 -4
- package/dist/commonjs/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/color.js +1 -0
- package/dist/commonjs/layout/lib/utils/font.d.ts +29 -0
- package/dist/commonjs/layout/lib/utils/font.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/font.js +57 -0
- package/dist/commonjs/layout/lib/utils/grid.d.ts +58 -0
- package/dist/commonjs/layout/lib/utils/grid.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/grid.js +49 -0
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts +39 -0
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/gridItem.js +43 -0
- package/dist/commonjs/layout/lib/utils/text.d.ts +35 -0
- package/dist/commonjs/layout/lib/utils/text.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/text.js +48 -0
- package/dist/commonjs/modal/lib/Modal.d.ts +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +5 -4
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +2 -4
- 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/PopupCard.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +2 -2
- package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/Radio.js +2 -13
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/text/index.d.ts +4 -0
- package/dist/commonjs/text/index.d.ts.map +1 -0
- package/dist/commonjs/text/index.js +15 -0
- package/dist/commonjs/text/lib/LabelText.d.ts +8 -0
- package/dist/commonjs/text/lib/LabelText.d.ts.map +1 -0
- package/dist/commonjs/text/lib/LabelText.js +51 -0
- package/dist/commonjs/text/lib/Text.d.ts +14 -0
- package/dist/commonjs/text/lib/Text.d.ts.map +1 -0
- package/dist/commonjs/text/lib/Text.js +90 -0
- package/dist/commonjs/text/lib/TypeLevelComponents.d.ts +13 -0
- package/dist/commonjs/text/lib/TypeLevelComponents.d.ts.map +1 -0
- package/dist/commonjs/text/lib/TypeLevelComponents.js +79 -0
- package/dist/commonjs/text-input/index.d.ts.map +1 -1
- package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
- package/dist/es6/banner/lib/Banner.js +2 -4
- 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/card/lib/CardBody.js +1 -3
- package/dist/es6/card/lib/CardHeading.d.ts.map +1 -1
- package/dist/es6/card/lib/CardHeading.js +2 -7
- package/dist/es6/checkbox/index.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.js +3 -14
- package/dist/es6/color-picker/index.d.ts.map +1 -1
- package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
- package/dist/es6/form-field/index.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Hint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Hint.js +6 -14
- 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 +4 -0
- package/dist/es6/layout/index.d.ts.map +1 -1
- package/dist/es6/layout/index.js +3 -0
- package/dist/es6/layout/lib/Box.d.ts +4 -2
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +27 -3
- package/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/dist/es6/layout/lib/Flex.d.ts.map +1 -1
- package/dist/es6/layout/lib/Grid.d.ts +52 -0
- package/dist/es6/layout/lib/Grid.d.ts.map +1 -0
- package/dist/es6/layout/lib/Grid.js +92 -0
- package/dist/es6/layout/lib/Stack.d.ts +4 -4
- package/dist/es6/layout/lib/Stack.js +4 -4
- package/dist/es6/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/color.js +2 -1
- package/dist/es6/layout/lib/utils/font.d.ts +29 -0
- package/dist/es6/layout/lib/utils/font.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/font.js +53 -0
- package/dist/es6/layout/lib/utils/grid.d.ts +58 -0
- package/dist/es6/layout/lib/utils/grid.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/grid.js +45 -0
- package/dist/es6/layout/lib/utils/gridItem.d.ts +39 -0
- package/dist/es6/layout/lib/utils/gridItem.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/gridItem.js +39 -0
- package/dist/es6/layout/lib/utils/text.d.ts +35 -0
- package/dist/es6/layout/lib/utils/text.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/text.js +44 -0
- package/dist/es6/modal/lib/Modal.d.ts +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +6 -5
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +2 -4
- 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/PopupCard.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCard.js +2 -2
- package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
- package/dist/es6/radio/lib/Radio.js +3 -14
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +3 -3
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/text/index.d.ts +4 -0
- package/dist/es6/text/index.d.ts.map +1 -0
- package/dist/es6/text/index.js +3 -0
- package/dist/es6/text/lib/LabelText.d.ts +8 -0
- package/dist/es6/text/lib/LabelText.d.ts.map +1 -0
- package/dist/es6/text/lib/LabelText.js +29 -0
- package/dist/es6/text/lib/Text.d.ts +14 -0
- package/dist/es6/text/lib/Text.d.ts.map +1 -0
- package/dist/es6/text/lib/Text.js +68 -0
- package/dist/es6/text/lib/TypeLevelComponents.d.ts +13 -0
- package/dist/es6/text/lib/TypeLevelComponents.d.ts.map +1 -0
- package/dist/es6/text/lib/TypeLevelComponents.js +57 -0
- package/dist/es6/text-input/index.d.ts.map +1 -1
- package/form-field/index.ts +0 -1
- package/form-field/lib/Hint.tsx +8 -19
- package/index.ts +1 -0
- package/layout/index.ts +4 -0
- package/layout/lib/Box.tsx +34 -4
- package/layout/lib/Grid.tsx +88 -0
- package/layout/lib/Stack.tsx +4 -4
- package/layout/lib/utils/color.ts +7 -2
- package/layout/lib/utils/font.ts +67 -0
- package/layout/lib/utils/grid.ts +93 -0
- package/layout/lib/utils/gridItem.ts +68 -0
- package/layout/lib/utils/text.ts +57 -0
- package/package.json +5 -5
- package/pagination/lib/Pagination/AdditionalDetails.tsx +7 -8
- package/pagination/lib/Pagination/GoTo/Label.tsx +3 -11
- package/popup/lib/PopupCard.tsx +2 -1
- package/radio/lib/Radio.tsx +9 -24
- package/side-panel/lib/SidePanel.tsx +7 -7
- package/text/LICENSE +52 -0
- package/text/README.md +5 -0
- package/text/index.ts +3 -0
- package/text/lib/LabelText.tsx +25 -0
- package/text/lib/Text.tsx +66 -0
- package/text/lib/TypeLevelComponents.tsx +43 -0
- package/text/package.json +6 -0
- package/text-input/index.ts +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.Grid = void 0;
|
|
48
|
+
var React = __importStar(require("react"));
|
|
49
|
+
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
50
|
+
var common_1 = require("@workday/canvas-kit-react/common");
|
|
51
|
+
var Box_1 = require("./Box");
|
|
52
|
+
var grid_1 = require("./utils/grid");
|
|
53
|
+
var gridItem_1 = require("./utils/gridItem");
|
|
54
|
+
var StyledGrid = styled_1.default(Box_1.Box)({
|
|
55
|
+
display: 'grid',
|
|
56
|
+
}, grid_1.grid);
|
|
57
|
+
var StyledGridItem = styled_1.default(Box_1.Box)(gridItem_1.gridItem);
|
|
58
|
+
var GridItem = common_1.createComponent('div')({
|
|
59
|
+
displayName: 'Grid.Item',
|
|
60
|
+
Component: function (_a, ref, Element) {
|
|
61
|
+
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
62
|
+
return (React.createElement(StyledGridItem, __assign({ as: Element, ref: ref }, elemProps), children));
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* `Grid` is a two-dimensional layout system for the web. It lets you lay content out in rows and columns.
|
|
67
|
+
* It is highly flexible, and can be used on its own or to build other components.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```
|
|
71
|
+
* import { Grid } from '@workday/canvas-kit-react/layout';
|
|
72
|
+
* `Grid` is built on top of `Box` and has access to all `BoxProps`.
|
|
73
|
+
*
|
|
74
|
+
* interface CardProps extends GridProps {
|
|
75
|
+
* // card-specific props
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* // `Card`'s default values are set using `GridProps`
|
|
79
|
+
* const Card = (props: CardProps) => (
|
|
80
|
+
* <Grid gridAutoFlow="row" alignItems="start" depth={1} space="m" {...props}>
|
|
81
|
+
* <h1>Hello, Card!</h1>
|
|
82
|
+
* <p>This card uses grid to set its layout.</p>
|
|
83
|
+
* </Grid>
|
|
84
|
+
* );
|
|
85
|
+
*```
|
|
86
|
+
*/
|
|
87
|
+
exports.Grid = common_1.createComponent('div')({
|
|
88
|
+
displayName: 'Grid',
|
|
89
|
+
Component: function (_a, ref, Element) {
|
|
90
|
+
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
91
|
+
return (React.createElement(StyledGrid, __assign({ as: Element, ref: ref }, elemProps), children));
|
|
92
|
+
},
|
|
93
|
+
subComponents: {
|
|
94
|
+
/**
|
|
95
|
+
* `<Grid.Item />` is the child specific sub-component to `<Grid/>`. `<Grid.Item />` gets child specific props, whereas `<Grid./>` gets parent container props.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```
|
|
99
|
+
* import { Grid } from '@workday/canvas-kit-react/layout';
|
|
100
|
+
* `Grid` is built on top of `Box` so `<Grid.Item />` gets all `BoxProps` as well.
|
|
101
|
+
*
|
|
102
|
+
* interface CardProps extends GridItemStyleProps {
|
|
103
|
+
* // card-specific props
|
|
104
|
+
* }
|
|
105
|
+
*
|
|
106
|
+
* // `Card`'s default values are set using `GridItemStyleProps`
|
|
107
|
+
* const Card = (props: CardProps) => (
|
|
108
|
+
* <Grid.Item gridRowStart="1" gridArea="Card" {...props}>
|
|
109
|
+
* <h1>Hello, Card!</h1>
|
|
110
|
+
* <p>This card uses grid child specific props to set its layout.</p>
|
|
111
|
+
* </Grid.Item>
|
|
112
|
+
* );
|
|
113
|
+
*```
|
|
114
|
+
*/
|
|
115
|
+
Item: GridItem,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlexProps } from './Flex';
|
|
2
2
|
import { StackStyleProps } from './utils/stack';
|
|
3
3
|
export declare type StackProps = FlexProps & StackStyleProps;
|
|
4
|
-
export declare const Stack: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").FlexStyleProps & StackStyleProps> & {
|
|
5
|
-
Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
|
|
4
|
+
export declare const Stack: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps & import("..").FlexStyleProps & StackStyleProps> & {
|
|
5
|
+
Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps>;
|
|
6
6
|
};
|
|
7
7
|
export interface HStackProps extends StackProps {
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export interface HStackProps extends StackProps {
|
|
|
12
12
|
flexDirection?: 'row' | 'row-reverse';
|
|
13
13
|
}
|
|
14
14
|
export declare const HStack: import("../../common").ElementComponent<"div", HStackProps> & {
|
|
15
|
-
Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
|
|
15
|
+
Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps>;
|
|
16
16
|
};
|
|
17
17
|
export interface VStackProps extends StackProps {
|
|
18
18
|
/**
|
|
@@ -22,6 +22,6 @@ export interface VStackProps extends StackProps {
|
|
|
22
22
|
flexDirection?: 'column' | 'column-reverse';
|
|
23
23
|
}
|
|
24
24
|
export declare const VStack: import("../../common").ElementComponent<"div", VStackProps> & {
|
|
25
|
-
Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
|
|
25
|
+
Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps>;
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -80,8 +80,8 @@ exports.Stack = common_1.createComponent('div')({
|
|
|
80
80
|
exports.HStack = common_1.createComponent('div')({
|
|
81
81
|
displayName: 'HStack',
|
|
82
82
|
Component: function (_a, ref, Element) {
|
|
83
|
-
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
84
|
-
return (React.createElement(exports.Stack, __assign({ as: Element, ref: ref, flexDirection:
|
|
83
|
+
var children = _a.children, _b = _a.flexDirection, flexDirection = _b === void 0 ? 'row' : _b, elemProps = __rest(_a, ["children", "flexDirection"]);
|
|
84
|
+
return (React.createElement(exports.Stack, __assign({ as: Element, ref: ref, flexDirection: flexDirection }, elemProps), children));
|
|
85
85
|
},
|
|
86
86
|
subComponents: {
|
|
87
87
|
Item: StackItem,
|
|
@@ -90,8 +90,8 @@ exports.HStack = common_1.createComponent('div')({
|
|
|
90
90
|
exports.VStack = common_1.createComponent('div')({
|
|
91
91
|
displayName: 'VStack',
|
|
92
92
|
Component: function (_a, ref, Element) {
|
|
93
|
-
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
94
|
-
return (React.createElement(exports.Stack, __assign({ as: Element, ref: ref, flexDirection:
|
|
93
|
+
var children = _a.children, _b = _a.flexDirection, flexDirection = _b === void 0 ? 'column' : _b, elemProps = __rest(_a, ["children", "flexDirection"]);
|
|
94
|
+
return (React.createElement(exports.Stack, __assign({ as: Element, ref: ref, flexDirection: flexDirection }, elemProps), children));
|
|
95
95
|
},
|
|
96
96
|
subComponents: {
|
|
97
97
|
Item: StackItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/color.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/color.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,IAAI,WAAW,EACrB,WAAW,EAEZ,MAAM,kCAAkC,CAAC;AAE1C,oBAAY,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,0CAA0C;AAC1C,oBAAY,eAAe,GAAG;IAC5B,iCAAiC;IACjC,UAAU,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACzC,uCAAuC;IACvC,eAAe,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACrC,CAAC;AAyBF;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,MAWxD"}
|
|
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.color = void 0;
|
|
15
|
+
// type changes no need
|
|
15
16
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
16
17
|
var getBackground = function (value) { return ({
|
|
17
18
|
background: tokens_1.colors[value] || value,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
import { CanvasTypeProperties } from '@workday/canvas-kit-react/tokens';
|
|
3
|
+
export declare type FontFamilyTokens = keyof CanvasTypeProperties['fontFamilies'];
|
|
4
|
+
export declare type FontSizeTokens = keyof CanvasTypeProperties['fontSizes'];
|
|
5
|
+
export declare type FontWeightTokens = keyof CanvasTypeProperties['fontWeights'];
|
|
6
|
+
/** style props to for color properties */
|
|
7
|
+
export declare type FontStyleProps = {
|
|
8
|
+
/** sets `font-family` property */
|
|
9
|
+
fontFamily?: Property.FontFamily | FontFamilyTokens;
|
|
10
|
+
/** sets `font-size` property */
|
|
11
|
+
fontSize?: Property.FontSize | FontSizeTokens;
|
|
12
|
+
/** sets `font-style` property */
|
|
13
|
+
fontStyle?: Property.FontStyle;
|
|
14
|
+
/** sets `font-weight` property */
|
|
15
|
+
fontWeight?: Property.FontWeight | FontWeightTokens;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A style prop function that takes components props and returns font styles from canvas token values.
|
|
19
|
+
* If no `FontStyleProps` are found, it returns an empty object.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // You'll most likely use `font` with low-level, styled components
|
|
23
|
+
* const BoxExample = () => (
|
|
24
|
+
* <Box fontFamily="monospace" fontWeight="medium">Hello, fonts!</Box>
|
|
25
|
+
* );
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare function font<P extends FontStyleProps>(props: P): {};
|
|
29
|
+
//# sourceMappingURL=font.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/font.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACjC,OAAO,EAAO,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAE5E,oBAAY,gBAAgB,GAAG,MAAM,oBAAoB,CAAC,cAAc,CAAC,CAAC;AAC1E,oBAAY,cAAc,GAAG,MAAM,oBAAoB,CAAC,WAAW,CAAC,CAAC;AACrE,oBAAY,gBAAgB,GAAG,MAAM,oBAAoB,CAAC,aAAa,CAAC,CAAC;AAGzE,0CAA0C;AAC1C,oBAAY,cAAc,GAAG;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,gBAAgB,CAAC;IACpD,gCAAgC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,GAAG,cAAc,CAAC;IAC9C,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,gBAAgB,CAAC;CACrD,CAAC;AAyBF;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,CAAC,MAYtD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.font = void 0;
|
|
15
|
+
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
16
|
+
var getFontFamily = function (value) { return ({
|
|
17
|
+
fontFamily: tokens_1.type.properties.fontFamilies[value] || value,
|
|
18
|
+
}); };
|
|
19
|
+
var getFontSize = function (value) { return ({
|
|
20
|
+
fontSize: tokens_1.type.properties.fontSizes[value] || value,
|
|
21
|
+
}); };
|
|
22
|
+
var getFontStyle = function (value) { return ({
|
|
23
|
+
fontStyle: value,
|
|
24
|
+
}); };
|
|
25
|
+
var getFontWeight = function (value) { return ({
|
|
26
|
+
fontWeight: tokens_1.type.properties.fontWeights[value] || value,
|
|
27
|
+
}); };
|
|
28
|
+
var fontProps = {
|
|
29
|
+
fontFamily: getFontFamily,
|
|
30
|
+
fontSize: getFontSize,
|
|
31
|
+
fontWeight: getFontWeight,
|
|
32
|
+
fontStyle: getFontStyle,
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A style prop function that takes components props and returns font styles from canvas token values.
|
|
36
|
+
* If no `FontStyleProps` are found, it returns an empty object.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* // You'll most likely use `font` with low-level, styled components
|
|
40
|
+
* const BoxExample = () => (
|
|
41
|
+
* <Box fontFamily="monospace" fontWeight="medium">Hello, fonts!</Box>
|
|
42
|
+
* );
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
function font(props) {
|
|
46
|
+
var styles = {};
|
|
47
|
+
for (var key in props) {
|
|
48
|
+
if (key in fontProps) {
|
|
49
|
+
var value = props[key];
|
|
50
|
+
var fontFn = fontProps[key];
|
|
51
|
+
var style = fontFn(value);
|
|
52
|
+
styles = __assign(__assign({}, styles), style);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return styles;
|
|
56
|
+
}
|
|
57
|
+
exports.font = font;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
/** style props to for grid container properties */
|
|
3
|
+
export declare type GridStyleProps = {
|
|
4
|
+
/** sets `align-items` property */
|
|
5
|
+
alignItems?: Property.AlignItems;
|
|
6
|
+
/** sets `align-content` property */
|
|
7
|
+
alignContent?: Property.AlignContent;
|
|
8
|
+
/**
|
|
9
|
+
* sets `display` property
|
|
10
|
+
* @default 'grid'
|
|
11
|
+
* */
|
|
12
|
+
display?: 'grid' | 'inline-grid';
|
|
13
|
+
/** sets `justify-items` property */
|
|
14
|
+
justifyItems?: Property.JustifyItems;
|
|
15
|
+
/** sets `justify-content` property */
|
|
16
|
+
justifyContent?: Property.JustifyContent;
|
|
17
|
+
/** sets `grid-template` property */
|
|
18
|
+
gridTemplate?: Property.GridTemplate;
|
|
19
|
+
/** sets `grid-template-area` property */
|
|
20
|
+
gridTemplateAreas?: Property.GridTemplateAreas;
|
|
21
|
+
/** sets `grid-template-columns` property */
|
|
22
|
+
gridTemplateColumns?: Property.GridTemplateColumns;
|
|
23
|
+
/** sets `grid-template-rows` property */
|
|
24
|
+
gridTemplateRows?: Property.GridTemplateRows;
|
|
25
|
+
/** sets `gap` property */
|
|
26
|
+
gridGap?: Property.GridGap;
|
|
27
|
+
/** sets `column-gap` property */
|
|
28
|
+
gridColumnGap?: Property.GridColumnGap;
|
|
29
|
+
/** sets `row-gap` property */
|
|
30
|
+
gridRowGap?: Property.GridRowGap;
|
|
31
|
+
/** sets `place-items` property */
|
|
32
|
+
gridPlaceItems?: Property.PlaceItems;
|
|
33
|
+
/** sets `grid-auto-columns` property */
|
|
34
|
+
gridAutoColumns?: Property.GridAutoColumns;
|
|
35
|
+
/** sets `grid-auto-rows` property */
|
|
36
|
+
gridAutoRows?: Property.GridAutoRows;
|
|
37
|
+
/** sets `grid-area` property */
|
|
38
|
+
gridArea?: Property.GridArea;
|
|
39
|
+
/** sets `grid-auto-flow` property */
|
|
40
|
+
gridAutoFlow?: Property.GridAutoFlow;
|
|
41
|
+
/** sets `grid` property */
|
|
42
|
+
grid?: Property.Grid;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A style prop function that takes component props and returns grid styles.
|
|
46
|
+
* If no `GridStyleProps` are found, it returns an empty object.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* // You'll most likely use `grid` with low-level, styled components
|
|
50
|
+
* const GridExample = () => (
|
|
51
|
+
* <Grid gridAutoFlow="row" justifyContent="center" alignItems="center">
|
|
52
|
+
* Hello, Grid!
|
|
53
|
+
* </Grid>
|
|
54
|
+
* );
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
export declare function grid<P extends GridStyleProps>(props: P): {};
|
|
58
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,mDAAmD;AACnD,oBAAY,cAAc,GAAG;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,oCAAoC;IACpC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC;;;SAGK;IACL,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IACjC,oCAAoC;IACpC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,sCAAsC;IACtC,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC;IAGzC,oCAAoC;IACpC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC;IAC/C,4CAA4C;IAC5C,mBAAmB,CAAC,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IACnD,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC;IAC7C,0BAA0B;IAC1B,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B,iCAAiC;IACjC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IACvC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,kCAAkC;IAClC,cAAc,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACrC,wCAAwC;IACxC,eAAe,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC;IAC3C,qCAAqC;IACrC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B,qCAAqC;IACrC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,2BAA2B;IAC3B,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;CACtB,CAAC;AAuBF;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,CAAC,MAWtD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.grid = void 0;
|
|
4
|
+
var gridProps = {
|
|
5
|
+
alignContent: 'alignContent',
|
|
6
|
+
alignItems: 'alignItems',
|
|
7
|
+
display: 'display',
|
|
8
|
+
justifyContent: 'justifyContent',
|
|
9
|
+
justifyItems: 'justifyItems',
|
|
10
|
+
gridTemplateAreas: 'gridTemplateAreas',
|
|
11
|
+
gridTemplate: 'gridTemplate',
|
|
12
|
+
gridTemplateColumns: 'gridTemplateColumns',
|
|
13
|
+
gridTemplateRows: 'gridTemplateRows',
|
|
14
|
+
gridGap: 'gridGap',
|
|
15
|
+
gridColumnGap: 'gridColumnGap',
|
|
16
|
+
gridRowGap: 'gridRowGap',
|
|
17
|
+
gridPlaceItems: 'gridPlaceItems',
|
|
18
|
+
gridAutoColumns: 'gridAutoColumns',
|
|
19
|
+
gridAutoRows: 'gridAutoRows',
|
|
20
|
+
gridAutoFlow: 'gridAutoFlow',
|
|
21
|
+
gridArea: 'gridArea',
|
|
22
|
+
grid: 'grid',
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A style prop function that takes component props and returns grid styles.
|
|
26
|
+
* If no `GridStyleProps` are found, it returns an empty object.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // You'll most likely use `grid` with low-level, styled components
|
|
30
|
+
* const GridExample = () => (
|
|
31
|
+
* <Grid gridAutoFlow="row" justifyContent="center" alignItems="center">
|
|
32
|
+
* Hello, Grid!
|
|
33
|
+
* </Grid>
|
|
34
|
+
* );
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
function grid(props) {
|
|
38
|
+
var styles = {};
|
|
39
|
+
for (var key in props) {
|
|
40
|
+
if (key in gridProps) {
|
|
41
|
+
var attr = gridProps[key];
|
|
42
|
+
var value = props[key];
|
|
43
|
+
// @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
|
|
44
|
+
styles[attr] = value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return styles;
|
|
48
|
+
}
|
|
49
|
+
exports.grid = grid;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
/** style props to for grid item properties */
|
|
3
|
+
export declare type GridItemStyleProps = {
|
|
4
|
+
/** sets `grid-column-start` property */
|
|
5
|
+
gridColumnStart?: Property.GridColumnStart;
|
|
6
|
+
/** sets `grid-column-end` property */
|
|
7
|
+
gridColumnEnd?: Property.GridColumnEnd;
|
|
8
|
+
/** sets `grid-row-start` property */
|
|
9
|
+
gridRowStart?: Property.GridRowStart;
|
|
10
|
+
/** sets `grid-row-end` property */
|
|
11
|
+
gridRowEnd?: Property.GridRowEnd;
|
|
12
|
+
/** sets `grid-column` property */
|
|
13
|
+
gridColumn?: Property.GridColumn;
|
|
14
|
+
/** sets `grid-row` property */
|
|
15
|
+
gridRow?: Property.GridRow;
|
|
16
|
+
/** sets `grid-area` property */
|
|
17
|
+
gridArea?: Property.GridArea;
|
|
18
|
+
/** sets `justify-self` property */
|
|
19
|
+
justifySelf?: Property.JustifySelf;
|
|
20
|
+
/** sets `align-self` property */
|
|
21
|
+
alignSelf?: Property.AlignSelf;
|
|
22
|
+
/** sets `place-self` property */
|
|
23
|
+
placeSelf?: Property.PlaceSelf;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A style prop function that takes component props and returns grid styles.
|
|
27
|
+
* If no `GridItemStyleProps` are found, it returns an empty object.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // You'll most likely use `grid item` with low-level, styled components
|
|
31
|
+
* const GridItemExample = () => (
|
|
32
|
+
* <Grid.Item gridRowStart="1" justifySelf="center" gridArea="Card">
|
|
33
|
+
* Hello, Grid Item!
|
|
34
|
+
* </Grid.Item>
|
|
35
|
+
* );
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare function gridItem<P extends GridItemStyleProps>(props: P): {};
|
|
39
|
+
//# sourceMappingURL=gridItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridItem.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/gridItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,8CAA8C;AAC9C,oBAAY,kBAAkB,GAAG;IAE/B,wCAAwC;IACxC,eAAe,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC;IAC3C,sCAAsC;IACtC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IACvC,qCAAqC;IACrC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,mCAAmC;IACnC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,+BAA+B;IAC/B,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B,mCAAmC;IACnC,WAAW,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;IACnC,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;CAChC,CAAC;AAiBF;;;;;;;;;;;;GAYG;AAEH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,kBAAkB,EAAE,KAAK,EAAE,CAAC,MAW9D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gridItem = void 0;
|
|
4
|
+
/** style props to for grid item properties */
|
|
5
|
+
var gridItemProps = {
|
|
6
|
+
//Child Props
|
|
7
|
+
gridColumnStart: 'gridColumnStart',
|
|
8
|
+
gridColumnEnd: 'gridColumnEnd',
|
|
9
|
+
gridRowStart: 'gridRowStart',
|
|
10
|
+
gridRowEnd: 'gridRowEnd',
|
|
11
|
+
gridColumn: 'gridColumn',
|
|
12
|
+
gridRow: 'gridRow',
|
|
13
|
+
gridArea: 'gridArea',
|
|
14
|
+
justifySelf: 'justifySelf',
|
|
15
|
+
alignSelf: 'alignSelf',
|
|
16
|
+
placeSelf: 'placeSelf',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A style prop function that takes component props and returns grid styles.
|
|
20
|
+
* If no `GridItemStyleProps` are found, it returns an empty object.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // You'll most likely use `grid item` with low-level, styled components
|
|
24
|
+
* const GridItemExample = () => (
|
|
25
|
+
* <Grid.Item gridRowStart="1" justifySelf="center" gridArea="Card">
|
|
26
|
+
* Hello, Grid Item!
|
|
27
|
+
* </Grid.Item>
|
|
28
|
+
* );
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
function gridItem(props) {
|
|
32
|
+
var styles = {};
|
|
33
|
+
for (var key in props) {
|
|
34
|
+
if (key in gridItemProps) {
|
|
35
|
+
var attr = gridItemProps[key];
|
|
36
|
+
var value = props[key];
|
|
37
|
+
// @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
|
|
38
|
+
styles[attr] = value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return styles;
|
|
42
|
+
}
|
|
43
|
+
exports.gridItem = gridItem;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
/** style props to for text properties */
|
|
3
|
+
export declare type TextStyleProps = {
|
|
4
|
+
/** sets `line-height` property */
|
|
5
|
+
lineHeight?: Property.LineHeight;
|
|
6
|
+
/** sets `letter-spacing` property */
|
|
7
|
+
letterSpacing?: Property.LetterSpacing;
|
|
8
|
+
/** sets `text-align` property */
|
|
9
|
+
textAlign?: Property.TextAlign;
|
|
10
|
+
/** sets `text-decoration` property */
|
|
11
|
+
textDecoration?: Property.TextDecoration;
|
|
12
|
+
/** sets `text-overflow` property */
|
|
13
|
+
textOverflow?: Property.TextOverflow;
|
|
14
|
+
/** sets `text-transform` property */
|
|
15
|
+
textTransform?: Property.TextTransform;
|
|
16
|
+
/** sets `text-shadow` property */
|
|
17
|
+
textShadow?: Property.TextShadow;
|
|
18
|
+
/** sets `white-space` property */
|
|
19
|
+
whiteSpace?: Property.WhiteSpace;
|
|
20
|
+
/** sets `word-break` property */
|
|
21
|
+
wordBreak?: Property.WordBreak;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A style prop function that takes components props and returns text styles.
|
|
25
|
+
* If no `TextStyleProps` are found, it returns an empty object.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // You'll most likely use `text-align` with low-level, styled components
|
|
29
|
+
* const BoxExample = () => (
|
|
30
|
+
* <Box textAlign="center">Hello, alignment!</Box>
|
|
31
|
+
* );
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare function text<P extends TextStyleProps>(props: P): {};
|
|
35
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,yCAAyC;AACzC,oBAAY,cAAc,GAAG;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,qCAAqC;IACrC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IACvC,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,sCAAsC;IACtC,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC;IACzC,oCAAoC;IACpC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,qCAAqC;IACrC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IACvC,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;CAChC,CAAC;AAcF;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,CAAC,MAStD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.text = void 0;
|
|
15
|
+
var textProps = [
|
|
16
|
+
'lineHeight',
|
|
17
|
+
'letterSpacing',
|
|
18
|
+
'textAlign',
|
|
19
|
+
'textDecoration',
|
|
20
|
+
'textOverflow',
|
|
21
|
+
'textTransform',
|
|
22
|
+
'textShadow',
|
|
23
|
+
'whiteSpace',
|
|
24
|
+
'wordBreak',
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* A style prop function that takes components props and returns text styles.
|
|
28
|
+
* If no `TextStyleProps` are found, it returns an empty object.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // You'll most likely use `text-align` with low-level, styled components
|
|
32
|
+
* const BoxExample = () => (
|
|
33
|
+
* <Box textAlign="center">Hello, alignment!</Box>
|
|
34
|
+
* );
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
function text(props) {
|
|
38
|
+
var _a;
|
|
39
|
+
var styles = {};
|
|
40
|
+
for (var key in props) {
|
|
41
|
+
if (textProps.includes(key)) {
|
|
42
|
+
var value = props[key];
|
|
43
|
+
styles = __assign(__assign({}, styles), (_a = {}, _a[key] = value, _a));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return styles;
|
|
47
|
+
}
|
|
48
|
+
exports.text = text;
|
|
@@ -99,7 +99,7 @@ export declare const Modal: import("../../common").ComponentM<import("../../dial
|
|
|
99
99
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
100
100
|
};
|
|
101
101
|
}> & {
|
|
102
|
-
Body: import("../../common").ElementComponentM<"div", import("../..").BorderShorthandStyleProps & import("../..").BorderColorStyleProps & import("../..").BorderRadiusStyleProps & import("../..").BorderLineStyleProps & import("../..").BorderWidthStyleProps & import("../..").BorderLogicalStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../..").PositionStandardProps & import("../..").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
102
|
+
Body: import("../../common").ElementComponentM<"div", import("../..").BorderShorthandStyleProps & import("../..").BorderColorStyleProps & import("../..").BorderRadiusStyleProps & import("../..").BorderLineStyleProps & import("../..").BorderWidthStyleProps & import("../..").BorderLogicalStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").FontStyleProps & import("../..").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../..").PositionStandardProps & import("../..").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps & import("../..").TextStyleProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
103
103
|
state: {
|
|
104
104
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
105
105
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalDetails.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/AdditionalDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AACxC,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAGjE,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACxE,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"AdditionalDetails.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/AdditionalDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AACxC,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAGjE,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACxE,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAiBD,eAAO,MAAM,iBAAiB,oEAK3B,sBAAsB,gBAaxB,CAAC"}
|
|
@@ -49,17 +49,18 @@ var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
49
49
|
var useLiveRegion_1 = require("./common/useLiveRegion");
|
|
50
50
|
var StyledAdditionalDetails = common_1.styled(layout_1.Flex)(function (_a) {
|
|
51
51
|
var shouldHideDetails = _a.shouldHideDetails;
|
|
52
|
-
var styles = __assign(__assign({}, tokens_1.type.levels.subtext.medium), { color: tokens_1.typeColors.hint });
|
|
53
52
|
if (shouldHideDetails) {
|
|
54
|
-
return __assign(__assign(
|
|
53
|
+
return __assign(__assign({}, common_1.accessibleHide), { marginTop: tokens_1.space.zero });
|
|
55
54
|
}
|
|
56
55
|
else {
|
|
57
|
-
return
|
|
56
|
+
return {
|
|
57
|
+
marginTop: tokens_1.space.xs,
|
|
58
|
+
};
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
var AdditionalDetails = function (_a) {
|
|
61
62
|
var model = _a.model, children = _a.children, shouldAnnounceToScreenReader = _a.shouldAnnounceToScreenReader, elemProps = __rest(_a, ["model", "children", "shouldAnnounceToScreenReader"]);
|
|
62
63
|
var liveRegionProps = useLiveRegion_1.useLiveRegion({ shouldAnnounceToScreenReader: shouldAnnounceToScreenReader });
|
|
63
|
-
return (React.createElement(StyledAdditionalDetails, __assign({}, liveRegionProps, elemProps), typeof children === 'function' ? children(model) : children));
|
|
64
|
+
return (React.createElement(StyledAdditionalDetails, __assign({}, tokens_1.type.levels.subtext.medium, { color: tokens_1.typeColors.hint }, liveRegionProps, elemProps), typeof children === 'function' ? children(model) : children));
|
|
64
65
|
};
|
|
65
66
|
exports.AdditionalDetails = AdditionalDetails;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../pagination/lib/Pagination/GoTo/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../pagination/lib/Pagination/GoTo/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAGzC,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACrE,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;CAC1E;AAED,eAAO,MAAM,SAAS,sCAAqC,cAAc,gBAMxE,CAAC"}
|
|
@@ -43,11 +43,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
43
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
44
|
exports.GoToLabel = void 0;
|
|
45
45
|
var React = __importStar(require("react"));
|
|
46
|
-
var
|
|
47
|
-
var common_1 = require("@workday/canvas-kit-react/common");
|
|
48
|
-
var StyledLabel = common_1.styled('label')(__assign(__assign({}, tokens_1.type.levels.subtext.medium), { color: tokens_1.typeColors.hint, whiteSpace: 'nowrap' }));
|
|
46
|
+
var text_1 = require("@workday/canvas-kit-react/text");
|
|
49
47
|
var GoToLabel = function (_a) {
|
|
50
48
|
var model = _a.model, children = _a.children, elemProps = __rest(_a, ["model", "children"]);
|
|
51
|
-
return (React.createElement(
|
|
49
|
+
return (React.createElement(text_1.LabelText, __assign({ typeLevel: "subtext.medium", variant: "hint", whiteSpace: "nowrap" }, elemProps), typeof children === 'function' ? children(model) : children));
|
|
52
50
|
};
|
|
53
51
|
exports.GoToLabel = GoToLabel;
|