@workday/canvas-kit-labs-react 7.0.0-alpha.0-next.6 → 7.0.0-alpha.101-next.26
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/combobox/README.md +1 -1
- package/combobox/lib/Combobox.tsx +7 -11
- package/common/index.ts +0 -8
- package/dist/commonjs/combobox/lib/Combobox.d.ts +3 -4
- package/dist/commonjs/combobox/lib/Combobox.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/Combobox.js +4 -7
- package/dist/commonjs/common/index.d.ts +0 -8
- package/dist/commonjs/common/index.d.ts.map +1 -1
- package/dist/commonjs/common/index.js +0 -1
- package/dist/commonjs/drawer/lib/DrawerHeader.js +2 -2
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/commonjs/search-form/lib/SearchForm.d.ts +7 -2
- package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/commonjs/search-form/lib/SearchForm.js +16 -22
- package/dist/es6/combobox/lib/Combobox.d.ts +3 -4
- package/dist/es6/combobox/lib/Combobox.d.ts.map +1 -1
- package/dist/es6/combobox/lib/Combobox.js +5 -8
- package/dist/es6/common/index.d.ts +0 -8
- package/dist/es6/common/index.d.ts.map +1 -1
- package/dist/es6/common/index.js +0 -1
- package/dist/es6/drawer/lib/DrawerHeader.js +3 -3
- package/dist/es6/index.d.ts +0 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -1
- package/dist/es6/search-form/lib/SearchForm.d.ts +7 -2
- package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/es6/search-form/lib/SearchForm.js +17 -23
- package/drawer/lib/DrawerHeader.tsx +3 -3
- package/index.ts +0 -1
- package/package.json +8 -19
- package/search-form/lib/SearchForm.tsx +25 -37
- package/common/lib/Box.tsx +0 -92
- package/common/lib/utils/border.ts +0 -263
- package/common/lib/utils/color.ts +0 -62
- package/common/lib/utils/depth.ts +0 -37
- package/common/lib/utils/flexItem.ts +0 -56
- package/common/lib/utils/layout.ts +0 -77
- package/common/lib/utils/other.ts +0 -20
- package/common/lib/utils/position.ts +0 -96
- package/common/lib/utils/space.ts +0 -207
- package/common/lib/utils/types.ts +0 -105
- package/dist/commonjs/common/lib/Box.d.ts +0 -31
- package/dist/commonjs/common/lib/Box.d.ts.map +0 -1
- package/dist/commonjs/common/lib/Box.js +0 -99
- package/dist/commonjs/common/lib/utils/border.d.ts +0 -103
- package/dist/commonjs/common/lib/utils/border.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/border.js +0 -153
- package/dist/commonjs/common/lib/utils/color.d.ts +0 -26
- package/dist/commonjs/common/lib/utils/color.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/color.js +0 -57
- package/dist/commonjs/common/lib/utils/depth.d.ts +0 -22
- package/dist/commonjs/common/lib/utils/depth.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/depth.js +0 -29
- package/dist/commonjs/common/lib/utils/flexItem.d.ts +0 -33
- package/dist/commonjs/common/lib/utils/flexItem.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/flexItem.js +0 -39
- package/dist/commonjs/common/lib/utils/layout.d.ts +0 -43
- package/dist/commonjs/common/lib/utils/layout.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/layout.js +0 -43
- package/dist/commonjs/common/lib/utils/other.d.ts +0 -5
- package/dist/commonjs/common/lib/utils/other.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/other.js +0 -19
- package/dist/commonjs/common/lib/utils/position.d.ts +0 -41
- package/dist/commonjs/common/lib/utils/position.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/position.js +0 -78
- package/dist/commonjs/common/lib/utils/space.d.ts +0 -64
- package/dist/commonjs/common/lib/utils/space.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/space.js +0 -161
- package/dist/commonjs/common/lib/utils/types.d.ts +0 -14
- package/dist/commonjs/common/lib/utils/types.d.ts.map +0 -1
- package/dist/commonjs/common/lib/utils/types.js +0 -2
- package/dist/commonjs/layout/index.d.ts +0 -5
- package/dist/commonjs/layout/index.d.ts.map +0 -1
- package/dist/commonjs/layout/index.js +0 -14
- package/dist/commonjs/layout/lib/Flex.d.ts +0 -26
- package/dist/commonjs/layout/lib/Flex.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/Flex.js +0 -83
- package/dist/commonjs/layout/lib/Stack.d.ts +0 -27
- package/dist/commonjs/layout/lib/Stack.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/Stack.js +0 -99
- package/dist/commonjs/layout/lib/utils/flex.d.ts +0 -36
- package/dist/commonjs/layout/lib/utils/flex.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/flex.js +0 -38
- package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +0 -3
- package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/getValidChildren.js +0 -29
- package/dist/commonjs/layout/lib/utils/stack.d.ts +0 -26
- package/dist/commonjs/layout/lib/utils/stack.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/stack.js +0 -55
- package/dist/commonjs/layout/lib/utils/types.d.ts +0 -8
- package/dist/commonjs/layout/lib/utils/types.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/types.js +0 -2
- package/dist/es6/common/lib/Box.d.ts +0 -31
- package/dist/es6/common/lib/Box.d.ts.map +0 -1
- package/dist/es6/common/lib/Box.js +0 -74
- package/dist/es6/common/lib/utils/border.d.ts +0 -103
- package/dist/es6/common/lib/utils/border.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/border.js +0 -149
- package/dist/es6/common/lib/utils/color.d.ts +0 -26
- package/dist/es6/common/lib/utils/color.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/color.js +0 -53
- package/dist/es6/common/lib/utils/depth.d.ts +0 -22
- package/dist/es6/common/lib/utils/depth.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/depth.js +0 -25
- package/dist/es6/common/lib/utils/flexItem.d.ts +0 -33
- package/dist/es6/common/lib/utils/flexItem.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/flexItem.js +0 -35
- package/dist/es6/common/lib/utils/layout.d.ts +0 -43
- package/dist/es6/common/lib/utils/layout.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/layout.js +0 -39
- package/dist/es6/common/lib/utils/other.d.ts +0 -5
- package/dist/es6/common/lib/utils/other.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/other.js +0 -15
- package/dist/es6/common/lib/utils/position.d.ts +0 -41
- package/dist/es6/common/lib/utils/position.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/position.js +0 -74
- package/dist/es6/common/lib/utils/space.d.ts +0 -64
- package/dist/es6/common/lib/utils/space.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/space.js +0 -157
- package/dist/es6/common/lib/utils/types.d.ts +0 -14
- package/dist/es6/common/lib/utils/types.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/types.js +0 -1
- package/dist/es6/layout/index.d.ts +0 -5
- package/dist/es6/layout/index.d.ts.map +0 -1
- package/dist/es6/layout/index.js +0 -2
- package/dist/es6/layout/lib/Flex.d.ts +0 -26
- package/dist/es6/layout/lib/Flex.d.ts.map +0 -1
- package/dist/es6/layout/lib/Flex.js +0 -58
- package/dist/es6/layout/lib/Stack.d.ts +0 -27
- package/dist/es6/layout/lib/Stack.d.ts.map +0 -1
- package/dist/es6/layout/lib/Stack.js +0 -74
- package/dist/es6/layout/lib/utils/flex.d.ts +0 -36
- package/dist/es6/layout/lib/utils/flex.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/flex.js +0 -34
- package/dist/es6/layout/lib/utils/getValidChildren.d.ts +0 -3
- package/dist/es6/layout/lib/utils/getValidChildren.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/getValidChildren.js +0 -6
- package/dist/es6/layout/lib/utils/stack.d.ts +0 -26
- package/dist/es6/layout/lib/utils/stack.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/stack.js +0 -51
- package/dist/es6/layout/lib/utils/types.d.ts +0 -8
- package/dist/es6/layout/lib/utils/types.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/types.js +0 -1
- package/layout/LICENSE +0 -52
- package/layout/README.md +0 -16
- package/layout/index.ts +0 -4
- package/layout/lib/Flex.tsx +0 -47
- package/layout/lib/Stack.tsx +0 -95
- package/layout/lib/utils/flex.ts +0 -65
- package/layout/lib/utils/getValidChildren.ts +0 -7
- package/layout/lib/utils/stack.ts +0 -78
- package/layout/lib/utils/types.ts +0 -45
- package/layout/package.json +0 -5
- package/ts3.5/dist/commonjs/combobox/index.d.ts +0 -5
- package/ts3.5/dist/commonjs/combobox/lib/AutocompleteList.d.ts +0 -32
- package/ts3.5/dist/commonjs/combobox/lib/Combobox.d.ts +0 -64
- package/ts3.5/dist/commonjs/combobox/lib/Status.d.ts +0 -11
- package/ts3.5/dist/commonjs/common/index.d.ts +0 -12
- package/ts3.5/dist/commonjs/common/lib/Box.d.ts +0 -31
- package/ts3.5/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.d.ts +0 -26
- package/ts3.5/dist/commonjs/common/lib/storybook-utils/permutateProps.d.ts +0 -5
- package/ts3.5/dist/commonjs/common/lib/storybook-utils/propTypes.d.ts +0 -15
- package/ts3.5/dist/commonjs/common/lib/theming/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/common/lib/theming/useThemeRTL.d.ts +0 -36
- package/ts3.5/dist/commonjs/common/lib/theming/useThemedRing.d.ts +0 -11
- package/ts3.5/dist/commonjs/common/lib/utils/border.d.ts +0 -103
- package/ts3.5/dist/commonjs/common/lib/utils/color.d.ts +0 -26
- package/ts3.5/dist/commonjs/common/lib/utils/depth.d.ts +0 -22
- package/ts3.5/dist/commonjs/common/lib/utils/flexItem.d.ts +0 -33
- package/ts3.5/dist/commonjs/common/lib/utils/layout.d.ts +0 -43
- package/ts3.5/dist/commonjs/common/lib/utils/other.d.ts +0 -5
- package/ts3.5/dist/commonjs/common/lib/utils/position.d.ts +0 -41
- package/ts3.5/dist/commonjs/common/lib/utils/space.d.ts +0 -64
- package/ts3.5/dist/commonjs/common/lib/utils/types.d.ts +0 -14
- package/ts3.5/dist/commonjs/drawer/index.d.ts +0 -6
- package/ts3.5/dist/commonjs/drawer/lib/Drawer.d.ts +0 -49
- package/ts3.5/dist/commonjs/drawer/lib/DrawerHeader.d.ts +0 -38
- package/ts3.5/dist/commonjs/index.d.ts +0 -6
- package/ts3.5/dist/commonjs/layout/index.d.ts +0 -5
- package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +0 -26
- package/ts3.5/dist/commonjs/layout/lib/Stack.d.ts +0 -27
- package/ts3.5/dist/commonjs/layout/lib/utils/flex.d.ts +0 -36
- package/ts3.5/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +0 -3
- package/ts3.5/dist/commonjs/layout/lib/utils/stack.d.ts +0 -26
- package/ts3.5/dist/commonjs/layout/lib/utils/types.d.ts +0 -8
- package/ts3.5/dist/commonjs/search-form/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/search-form/lib/SearchForm.d.ts +0 -103
- package/ts3.5/dist/commonjs/search-form/lib/themes.d.ts +0 -21
- package/ts3.5/dist/es6/combobox/index.d.ts +0 -5
- package/ts3.5/dist/es6/combobox/lib/AutocompleteList.d.ts +0 -32
- package/ts3.5/dist/es6/combobox/lib/Combobox.d.ts +0 -64
- package/ts3.5/dist/es6/combobox/lib/Status.d.ts +0 -11
- package/ts3.5/dist/es6/common/index.d.ts +0 -12
- package/ts3.5/dist/es6/common/lib/Box.d.ts +0 -31
- package/ts3.5/dist/es6/common/lib/storybook-utils/ComponentStatesTable.d.ts +0 -26
- package/ts3.5/dist/es6/common/lib/storybook-utils/permutateProps.d.ts +0 -5
- package/ts3.5/dist/es6/common/lib/storybook-utils/propTypes.d.ts +0 -15
- package/ts3.5/dist/es6/common/lib/theming/index.d.ts +0 -3
- package/ts3.5/dist/es6/common/lib/theming/useThemeRTL.d.ts +0 -36
- package/ts3.5/dist/es6/common/lib/theming/useThemedRing.d.ts +0 -11
- package/ts3.5/dist/es6/common/lib/utils/border.d.ts +0 -103
- package/ts3.5/dist/es6/common/lib/utils/color.d.ts +0 -26
- package/ts3.5/dist/es6/common/lib/utils/depth.d.ts +0 -22
- package/ts3.5/dist/es6/common/lib/utils/flexItem.d.ts +0 -33
- package/ts3.5/dist/es6/common/lib/utils/layout.d.ts +0 -43
- package/ts3.5/dist/es6/common/lib/utils/other.d.ts +0 -5
- package/ts3.5/dist/es6/common/lib/utils/position.d.ts +0 -41
- package/ts3.5/dist/es6/common/lib/utils/space.d.ts +0 -64
- package/ts3.5/dist/es6/common/lib/utils/types.d.ts +0 -14
- package/ts3.5/dist/es6/drawer/index.d.ts +0 -6
- package/ts3.5/dist/es6/drawer/lib/Drawer.d.ts +0 -49
- package/ts3.5/dist/es6/drawer/lib/DrawerHeader.d.ts +0 -38
- package/ts3.5/dist/es6/index.d.ts +0 -6
- package/ts3.5/dist/es6/layout/index.d.ts +0 -5
- package/ts3.5/dist/es6/layout/lib/Flex.d.ts +0 -26
- package/ts3.5/dist/es6/layout/lib/Stack.d.ts +0 -27
- package/ts3.5/dist/es6/layout/lib/utils/flex.d.ts +0 -36
- package/ts3.5/dist/es6/layout/lib/utils/getValidChildren.d.ts +0 -3
- package/ts3.5/dist/es6/layout/lib/utils/stack.d.ts +0 -26
- package/ts3.5/dist/es6/layout/lib/utils/types.d.ts +0 -8
- package/ts3.5/dist/es6/search-form/index.d.ts +0 -3
- package/ts3.5/dist/es6/search-form/lib/SearchForm.d.ts +0 -103
- package/ts3.5/dist/es6/search-form/lib/themes.d.ts +0 -21
|
@@ -1,99 +0,0 @@
|
|
|
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.VStack = exports.HStack = exports.Stack = 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 common_2 = require("@workday/canvas-kit-labs-react/common");
|
|
52
|
-
var Flex_1 = require("./Flex");
|
|
53
|
-
var getValidChildren_1 = require("./utils/getValidChildren");
|
|
54
|
-
var stack_1 = require("./utils/stack");
|
|
55
|
-
var StackItem = common_1.createComponent('div')({
|
|
56
|
-
displayName: 'Stack.Item',
|
|
57
|
-
Component: function (_a, ref, Element) {
|
|
58
|
-
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
59
|
-
return (React.createElement(common_2.Box, __assign({ as: Element, ref: ref, display: "inline-block", flex: "0 0 auto", minWidth: 0 }, elemProps), children));
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
// prevent `spacing` prop from being passed through to the HTML element
|
|
63
|
-
var shouldForwardProp = function (prop) {
|
|
64
|
-
return prop !== 'spacing';
|
|
65
|
-
};
|
|
66
|
-
var StyledStack = styled_1.default(Flex_1.Flex, { shouldForwardProp: shouldForwardProp })(stack_1.stack);
|
|
67
|
-
exports.Stack = common_1.createComponent('div')({
|
|
68
|
-
displayName: 'Stack',
|
|
69
|
-
Component: function (_a, ref, Element) {
|
|
70
|
-
var children = _a.children, _b = _a.shouldWrapChildren, shouldWrapChildren = _b === void 0 ? false : _b, elemProps = __rest(_a, ["children", "shouldWrapChildren"]);
|
|
71
|
-
var validChildren = getValidChildren_1.getValidChildren(children);
|
|
72
|
-
return (React.createElement(StyledStack, __assign({ as: Element, ref: ref, flexDirection: "row" }, elemProps), shouldWrapChildren
|
|
73
|
-
? validChildren.map(function (child) { return React.createElement(StackItem, null, child); })
|
|
74
|
-
: validChildren));
|
|
75
|
-
},
|
|
76
|
-
subComponents: {
|
|
77
|
-
Item: StackItem,
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
exports.HStack = common_1.createComponent('div')({
|
|
81
|
-
displayName: 'HStack',
|
|
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: "row" }, elemProps), children));
|
|
85
|
-
},
|
|
86
|
-
subComponents: {
|
|
87
|
-
Item: StackItem,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
exports.VStack = common_1.createComponent('div')({
|
|
91
|
-
displayName: 'VStack',
|
|
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: "column" }, elemProps), children));
|
|
95
|
-
},
|
|
96
|
-
subComponents: {
|
|
97
|
-
Item: StackItem,
|
|
98
|
-
},
|
|
99
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { PropertyAlignItems, PropertyAlignContent, PropertyJustifyItems, PropertyJustifyContent, PropertyFlexWrap, PropertyFlexDirection } from './types';
|
|
2
|
-
/** style props to for flexbox container properties */
|
|
3
|
-
export declare type FlexStyleProps = {
|
|
4
|
-
/** sets `align-items` property */
|
|
5
|
-
alignItems?: PropertyAlignItems;
|
|
6
|
-
/** sets `align-content` property */
|
|
7
|
-
alignContent?: PropertyAlignContent;
|
|
8
|
-
/**
|
|
9
|
-
* sets `display` property
|
|
10
|
-
* @default 'flex'
|
|
11
|
-
* */
|
|
12
|
-
display?: 'flex' | 'inline-flex';
|
|
13
|
-
/** sets `justify-items` property */
|
|
14
|
-
justifyItems?: PropertyJustifyItems;
|
|
15
|
-
/** sets `justify-content` property */
|
|
16
|
-
justifyContent?: PropertyJustifyContent;
|
|
17
|
-
/** sets `flex-wrap` property */
|
|
18
|
-
flexWrap?: PropertyFlexWrap;
|
|
19
|
-
/** sets `flex-direction` property */
|
|
20
|
-
flexDirection?: PropertyFlexDirection;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* A style prop function that takes component props and returns flexbox styles.
|
|
24
|
-
* If no `FlexStyleProps` are found, it returns an empty object.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* // You'll most likely use `flex` with low-level, styled components
|
|
28
|
-
* const FlexExample = () => (
|
|
29
|
-
* <Flex justifyContent="center" alignItems="center">
|
|
30
|
-
* Hello, flex!
|
|
31
|
-
* </Flex>
|
|
32
|
-
* );
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
export declare function flex<P extends FlexStyleProps>(props: P): {};
|
|
36
|
-
//# sourceMappingURL=flex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flex.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/flex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,sDAAsD;AACtD,oBAAY,cAAc,GAAG;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,oCAAoC;IACpC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC;;;SAGK;IACL,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IACjC,oCAAoC;IACpC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,sCAAsC;IACtC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,qCAAqC;IACrC,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAYF;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,CAAC,MAWtD"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flex = void 0;
|
|
4
|
-
var flexProps = {
|
|
5
|
-
alignContent: 'alignContent',
|
|
6
|
-
alignItems: 'alignItems',
|
|
7
|
-
display: 'display',
|
|
8
|
-
flexDirection: 'flexDirection',
|
|
9
|
-
flexWrap: 'flexWrap',
|
|
10
|
-
justifyContent: 'justifyContent',
|
|
11
|
-
justifyItems: 'justifyItems',
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* A style prop function that takes component props and returns flexbox styles.
|
|
15
|
-
* If no `FlexStyleProps` are found, it returns an empty object.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // You'll most likely use `flex` with low-level, styled components
|
|
19
|
-
* const FlexExample = () => (
|
|
20
|
-
* <Flex justifyContent="center" alignItems="center">
|
|
21
|
-
* Hello, flex!
|
|
22
|
-
* </Flex>
|
|
23
|
-
* );
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
function flex(props) {
|
|
27
|
-
var styles = {};
|
|
28
|
-
for (var key in props) {
|
|
29
|
-
if (key in flexProps) {
|
|
30
|
-
var attr = flexProps[key];
|
|
31
|
-
var value = props[key];
|
|
32
|
-
// @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
|
|
33
|
-
styles[attr] = value;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return styles;
|
|
37
|
-
}
|
|
38
|
-
exports.flex = flex;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare function getValidChildren(children: React.ReactNode): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>[];
|
|
3
|
-
//# sourceMappingURL=getValidChildren.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getValidChildren.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/getValidChildren.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,oJAIzD"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.getValidChildren = void 0;
|
|
23
|
-
var React = __importStar(require("react"));
|
|
24
|
-
function getValidChildren(children) {
|
|
25
|
-
return React.Children.toArray(children).filter(function (child) {
|
|
26
|
-
return React.isValidElement(child);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
exports.getValidChildren = getValidChildren;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { PartialEmotionCanvasTheme } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { CanvasSpaceKeys } from '@workday/canvas-kit-react/tokens';
|
|
3
|
-
export declare type StackDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
4
|
-
declare const selector = "& > *:not(style) ~ *:not(style)";
|
|
5
|
-
export declare type StackSpacing = CanvasSpaceKeys | number | (string & {});
|
|
6
|
-
export declare type StackStyleProps = {
|
|
7
|
-
/** sets space values between child elements (bidirectional support) */
|
|
8
|
-
spacing: StackSpacing;
|
|
9
|
-
/**
|
|
10
|
-
* sets the direction for the stack
|
|
11
|
-
* @default "row"
|
|
12
|
-
* */
|
|
13
|
-
flexDirection?: StackDirection;
|
|
14
|
-
/**
|
|
15
|
-
* when `true` wraps each child element in a `Stack.Item`
|
|
16
|
-
* @default false
|
|
17
|
-
* */
|
|
18
|
-
shouldWrapChildren?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare function stack<P extends StackStyleProps & {
|
|
21
|
-
theme?: PartialEmotionCanvasTheme;
|
|
22
|
-
}>(props: P): {
|
|
23
|
-
"& > *:not(style) ~ *:not(style)": {};
|
|
24
|
-
};
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,EAE1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAuB,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAEvF,oBAAY,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAEjF,QAAA,MAAM,QAAQ,oCAAoC,CAAC;AAEnD,oBAAY,YAAY,GAAG,eAAe,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEpE,oBAAY,eAAe,GAAG;IAC5B,uEAAuE;IACvE,OAAO,EAAE,YAAY,CAAC;IACtB;;;SAGK;IACL,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B;;;SAGK;IACL,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA+BF,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,GAAG;IAAC,KAAK,CAAC,EAAE,yBAAyB,CAAA;CAAC,EAAE,KAAK,EAAE,CAAC;;EAoB9F"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stack = void 0;
|
|
4
|
-
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
-
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
6
|
-
var selector = '& > *:not(style) ~ *:not(style)';
|
|
7
|
-
var column = function (value) { return ({
|
|
8
|
-
marginTop: tokens_1.space[value] || value,
|
|
9
|
-
}); };
|
|
10
|
-
var columnReverse = function (value) { return ({
|
|
11
|
-
marginBottom: tokens_1.space[value] || value,
|
|
12
|
-
}); };
|
|
13
|
-
var row = function (value, isRTL) {
|
|
14
|
-
var _a;
|
|
15
|
-
if (isRTL === void 0) { isRTL = false; }
|
|
16
|
-
var attr = isRTL ? 'marginRight' : 'marginLeft';
|
|
17
|
-
return _a = {},
|
|
18
|
-
_a[attr] = tokens_1.space[value] || value,
|
|
19
|
-
_a;
|
|
20
|
-
};
|
|
21
|
-
var rowReverse = function (value, isRTL) {
|
|
22
|
-
var _a;
|
|
23
|
-
if (isRTL === void 0) { isRTL = false; }
|
|
24
|
-
var attr = isRTL ? 'marginLeft' : 'marginRight';
|
|
25
|
-
return _a = {},
|
|
26
|
-
_a[attr] = tokens_1.space[value] || value,
|
|
27
|
-
_a;
|
|
28
|
-
};
|
|
29
|
-
var stackDirectionProps = {
|
|
30
|
-
column: column,
|
|
31
|
-
'column-reverse': columnReverse,
|
|
32
|
-
row: row,
|
|
33
|
-
'row-reverse': rowReverse,
|
|
34
|
-
};
|
|
35
|
-
function stack(props) {
|
|
36
|
-
var _a;
|
|
37
|
-
var styles = {};
|
|
38
|
-
var _b = props.flexDirection, flexDirection = _b === void 0 ? 'row' : _b, spacing = props.spacing;
|
|
39
|
-
if (flexDirection === 'column' || flexDirection === 'column-reverse') {
|
|
40
|
-
var stackFn = stackDirectionProps[flexDirection];
|
|
41
|
-
styles = stackFn(spacing);
|
|
42
|
-
}
|
|
43
|
-
if (flexDirection === 'row' || flexDirection === 'row-reverse') {
|
|
44
|
-
// stack will always be used within the context of a component, but eslint doesn't know that
|
|
45
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
46
|
-
var canvas = common_1.useTheme(props.theme).canvas;
|
|
47
|
-
var stackFn = stackDirectionProps[flexDirection];
|
|
48
|
-
var isRTL = canvas.direction === common_1.ContentDirection.RTL;
|
|
49
|
-
styles = stackFn(spacing, isRTL);
|
|
50
|
-
}
|
|
51
|
-
return _a = {},
|
|
52
|
-
_a[selector] = styles,
|
|
53
|
-
_a;
|
|
54
|
-
}
|
|
55
|
-
exports.stack = stack;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Globals, SelfPosition, ContentDistribution, ContentPosition } from 'csstype';
|
|
2
|
-
export declare type PropertyAlignItems = Globals | SelfPosition | 'baseline' | 'normal' | 'stretch' | (string & {});
|
|
3
|
-
export declare type PropertyAlignContent = Globals | ContentDistribution | ContentPosition | 'baseline' | 'normal' | (string & {});
|
|
4
|
-
export declare type PropertyJustifyItems = Globals | SelfPosition | 'baseline' | 'left' | 'legacy' | 'normal' | 'right' | 'stretch' | (string & {});
|
|
5
|
-
export declare type PropertyJustifyContent = Globals | ContentDistribution | ContentPosition | 'left' | 'normal' | 'right' | (string & {});
|
|
6
|
-
export declare type PropertyFlexWrap = Globals | 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
7
|
-
export declare type PropertyFlexDirection = Globals | 'column' | 'column-reverse' | 'row' | 'row-reverse';
|
|
8
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,SAAS,CAAC;AAMpF,oBAAY,kBAAkB,GAC1B,OAAO,GACP,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,SAAS,GACT,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,oBAAY,oBAAoB,GAC5B,OAAO,GACP,mBAAmB,GACnB,eAAe,GACf,UAAU,GACV,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,oBAAY,oBAAoB,GAC5B,OAAO,GACP,YAAY,GACZ,UAAU,GACV,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,SAAS,GACT,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,oBAAY,sBAAsB,GAC9B,OAAO,GACP,mBAAmB,GACnB,eAAe,GACf,MAAM,GACN,QAAQ,GACR,OAAO,GACP,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,oBAAY,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC;AAE5E,oBAAY,qBAAqB,GAAG,OAAO,GAAG,QAAQ,GAAG,gBAAgB,GAAG,KAAK,GAAG,aAAa,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BorderStyleProps } from './utils/border';
|
|
3
|
-
import { ColorStyleProps } from './utils/color';
|
|
4
|
-
import { DepthStyleProps } from './utils/depth';
|
|
5
|
-
import { FlexItemStyleProps } from './utils/flexItem';
|
|
6
|
-
import { LayoutStyleProps } from './utils/layout';
|
|
7
|
-
import { OtherStyleProps } from './utils/other';
|
|
8
|
-
import { PositionStyleProps } from './utils/position';
|
|
9
|
-
import { SpaceStyleProps } from './utils/space';
|
|
10
|
-
export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
|
|
15
|
-
* It is highly flexible, and its primary purpose is to build other components.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* import { Box, BoxProps } from '@workday/canvas-kit-labs-react/common';
|
|
19
|
-
*
|
|
20
|
-
* interface CardProps extends BoxProps {
|
|
21
|
-
* // card-specific props
|
|
22
|
-
* }
|
|
23
|
-
*
|
|
24
|
-
* // `Card`'s default values are set using `BoxProps`
|
|
25
|
-
* const Card = (props: CardProps) => (
|
|
26
|
-
* <Box depth={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
27
|
-
* );
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export declare const Box: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./utils/border").BorderShorthandStyleProps & import("./utils/border").BorderColorStyleProps & import("./utils/border").BorderRadiusStyleProps & import("./utils/border").BorderLineStyleProps & import("./utils/border").BorderWidthStyleProps & import("./utils/border").BorderLogicalStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & import("./utils/position").PositionStandardProps & import("./utils/position").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
|
|
31
|
-
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../common/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,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;AAErD,oBAAY,QAAQ,GAAG,gBAAgB,GACrC,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GAAG;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAqCJ;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,2oBAad,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import * as React from 'react';
|
|
24
|
-
import styled from '@emotion/styled';
|
|
25
|
-
import isPropValid from '@emotion/is-prop-valid';
|
|
26
|
-
import { createComponent, useConstant } from '@workday/canvas-kit-react/common';
|
|
27
|
-
// style props
|
|
28
|
-
import { border } from './utils/border';
|
|
29
|
-
import { color } from './utils/color';
|
|
30
|
-
import { depth } from './utils/depth';
|
|
31
|
-
import { flexItem } from './utils/flexItem';
|
|
32
|
-
import { layout } from './utils/layout';
|
|
33
|
-
import { other } from './utils/other';
|
|
34
|
-
import { position } from './utils/position';
|
|
35
|
-
import { space } from './utils/space';
|
|
36
|
-
var omittedProps = ['display', 'color', 'height', 'overflow', 'width', 'border', 'background'];
|
|
37
|
-
var shouldForwardProp = function (prop) {
|
|
38
|
-
return isPropValid(prop) && !omittedProps.includes(prop);
|
|
39
|
-
};
|
|
40
|
-
// Meant to be used with elements. The `shouldForwardProps` will remove all style props
|
|
41
|
-
var StyledBoxElement = styled('div', { shouldForwardProp: shouldForwardProp })({
|
|
42
|
-
boxSizing: 'border-box',
|
|
43
|
-
}, border, color, depth, flexItem, layout, position, space);
|
|
44
|
-
// Meant to be used with components. There is no `shouldForwardProps` - all props will be forwarded to the component
|
|
45
|
-
var StyledBoxComponent = styled('div')({
|
|
46
|
-
boxSizing: 'border-box',
|
|
47
|
-
}, border, color, depth, flexItem, layout, other, position, space);
|
|
48
|
-
/**
|
|
49
|
-
* `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
|
|
50
|
-
* It is highly flexible, and its primary purpose is to build other components.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* import { Box, BoxProps } from '@workday/canvas-kit-labs-react/common';
|
|
54
|
-
*
|
|
55
|
-
* interface CardProps extends BoxProps {
|
|
56
|
-
* // card-specific props
|
|
57
|
-
* }
|
|
58
|
-
*
|
|
59
|
-
* // `Card`'s default values are set using `BoxProps`
|
|
60
|
-
* const Card = (props: CardProps) => (
|
|
61
|
-
* <Box depth={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
62
|
-
* );
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
export var Box = createComponent('div')({
|
|
66
|
-
displayName: 'Box',
|
|
67
|
-
Component: function (_a, ref, Element) {
|
|
68
|
-
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
69
|
-
var BoxComponent = useConstant(function () {
|
|
70
|
-
return typeof Element === 'string' ? StyledBoxElement : StyledBoxComponent;
|
|
71
|
-
});
|
|
72
|
-
return (React.createElement(BoxComponent, __assign({ as: Element, ref: ref }, elemProps), children));
|
|
73
|
-
},
|
|
74
|
-
});
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { CanvasBorderRadiusKeys, CanvasColor } from '@workday/canvas-kit-react/tokens';
|
|
2
|
-
import { PartialEmotionCanvasTheme } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { PropertyBorder } from './types';
|
|
4
|
-
/** style props to set the border properties */
|
|
5
|
-
export declare type BorderShorthandStyleProps = {
|
|
6
|
-
/** sets `border` property */
|
|
7
|
-
border?: string;
|
|
8
|
-
/** sets `border-top` property */
|
|
9
|
-
borderTop?: string;
|
|
10
|
-
/** sets `border-right` property (no bidirectional support) */
|
|
11
|
-
borderRight?: string;
|
|
12
|
-
/** sets `border-bottom` property */
|
|
13
|
-
borderBottom?: string;
|
|
14
|
-
/** sets `border-left` property (no bidirectional support) */
|
|
15
|
-
borderLeft?: string;
|
|
16
|
-
};
|
|
17
|
-
/** style props to set the border color properties */
|
|
18
|
-
export declare type BorderColorStyleProps = {
|
|
19
|
-
/** sets `border-color` property */
|
|
20
|
-
borderColor?: CanvasColor | (string & {});
|
|
21
|
-
/** sets `border-top-color` property */
|
|
22
|
-
borderTopColor?: CanvasColor | (string & {});
|
|
23
|
-
/** sets `border-right-color` property (no bidirectional support) */
|
|
24
|
-
borderRightColor?: CanvasColor | (string & {});
|
|
25
|
-
/** sets `border-bottom-color` property */
|
|
26
|
-
borderBottomColor?: CanvasColor | (string & {});
|
|
27
|
-
/** sets `border-left-color` property (no bidirectional support) */
|
|
28
|
-
borderLeftColor?: CanvasColor | (string & {});
|
|
29
|
-
};
|
|
30
|
-
/** style props to set the border radius properties */
|
|
31
|
-
export declare type BorderRadiusStyleProps = {
|
|
32
|
-
/** sets `border-radius` property */
|
|
33
|
-
borderRadius?: CanvasBorderRadiusKeys | number | (string & {});
|
|
34
|
-
/** sets `border-top-left-radius` property */
|
|
35
|
-
borderTopLeftRadius?: CanvasBorderRadiusKeys | number | (string & {});
|
|
36
|
-
/** sets `border-top-right-radius` property */
|
|
37
|
-
borderTopRightRadius?: CanvasBorderRadiusKeys | number | (string & {});
|
|
38
|
-
/** sets `border-bottom-left-radius` property */
|
|
39
|
-
borderBottomLeftRadius?: CanvasBorderRadiusKeys | number | (string & {});
|
|
40
|
-
/** sets `border-bottom-right-radius` property */
|
|
41
|
-
borderBottomRightRadius?: CanvasBorderRadiusKeys | number | (string & {});
|
|
42
|
-
};
|
|
43
|
-
/** style props to set the border style properties */
|
|
44
|
-
export declare type BorderLineStyleProps = {
|
|
45
|
-
/** sets `border-style` property */
|
|
46
|
-
borderStyle?: PropertyBorder;
|
|
47
|
-
/** sets `border-top-style` property */
|
|
48
|
-
borderTopStyle?: PropertyBorder;
|
|
49
|
-
/** sets `border-right-style` property (no bidirectional support) */
|
|
50
|
-
borderRightStyle?: PropertyBorder;
|
|
51
|
-
/** sets `border-bottom-style` property */
|
|
52
|
-
borderBottomStyle?: PropertyBorder;
|
|
53
|
-
/** sets `border-left-style` property (no bidirectional support) */
|
|
54
|
-
borderLeftStyle?: PropertyBorder;
|
|
55
|
-
};
|
|
56
|
-
/** style props to set the border width properties */
|
|
57
|
-
export declare type BorderWidthStyleProps = {
|
|
58
|
-
/** sets `border-width` property */
|
|
59
|
-
borderWidth?: string | number;
|
|
60
|
-
/** sets `border-top-width` property */
|
|
61
|
-
borderTopWidth?: string | number;
|
|
62
|
-
/** sets `border-right-width` property (no bidirectional support) */
|
|
63
|
-
borderRightWidth?: string | number;
|
|
64
|
-
/** sets `border-bottom-width` property */
|
|
65
|
-
borderBottomWidth?: string | number;
|
|
66
|
-
/** sets `border-left-width` property (no bidirectional support) */
|
|
67
|
-
borderLeftWidth?: string | number;
|
|
68
|
-
};
|
|
69
|
-
export declare type BorderLogicalStyleProps = {
|
|
70
|
-
/** sets `border-left` property (bidirectional support) */
|
|
71
|
-
borderInlineStart?: string;
|
|
72
|
-
/** sets `border-left-color` property (bidirectional support) */
|
|
73
|
-
borderInlineStartColor?: CanvasColor | (string & {});
|
|
74
|
-
/** sets `border-left-style` property (bidirectional support) */
|
|
75
|
-
borderInlineStartStyle?: PropertyBorder;
|
|
76
|
-
/** sets `border-left-width` property (bidirectional support) */
|
|
77
|
-
borderInlineStartWidth?: string | number;
|
|
78
|
-
/** sets `border-right` property (bidirectional support) */
|
|
79
|
-
borderInlineEnd?: string;
|
|
80
|
-
/** sets `border-right-color` property (bidirectional support) */
|
|
81
|
-
borderInlineEndColor?: CanvasColor | (string & {});
|
|
82
|
-
/** sets `border-right-style` property (bidirectional support) */
|
|
83
|
-
borderInlineEndStyle?: PropertyBorder;
|
|
84
|
-
/** sets `border-right-width` property (bidirectional support) */
|
|
85
|
-
borderInlineEndWidth?: string | number;
|
|
86
|
-
};
|
|
87
|
-
/** a collection style props for border properties */
|
|
88
|
-
export declare type BorderStyleProps = BorderShorthandStyleProps & BorderColorStyleProps & BorderRadiusStyleProps & BorderLineStyleProps & BorderWidthStyleProps & BorderLogicalStyleProps;
|
|
89
|
-
/**
|
|
90
|
-
* A style prop function that takes components props and returns border styles. Some props, such as borderRadius and borderColor, are connected to our design tokens.
|
|
91
|
-
* If no `BorderStyleProps` are found, it returns an empty object.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* // You'll most likely use `border` with low-level, styled components
|
|
95
|
-
* const BoxExample = () => (
|
|
96
|
-
* <Box border={`solid 1px #333333 ${colors.blackPepper400}`}>Hello, border styles!</Box>
|
|
97
|
-
* );
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
export declare function border<P extends BorderStyleProps & {
|
|
101
|
-
theme?: PartialEmotionCanvasTheme;
|
|
102
|
-
}>(props: P): {};
|
|
103
|
-
//# sourceMappingURL=border.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/border.ts"],"names":[],"mappings":"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"}
|