@workday/canvas-kit-react 8.0.0-alpha.150-next.2 → 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.
Files changed (144) hide show
  1. package/banner/lib/Banner.tsx +3 -6
  2. package/card/lib/CardBody.tsx +3 -6
  3. package/card/lib/CardHeading.tsx +13 -10
  4. package/checkbox/lib/Checkbox.tsx +9 -24
  5. package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
  6. package/dist/commonjs/banner/lib/Banner.js +2 -4
  7. package/dist/commonjs/card/lib/Card.d.ts +1 -1
  8. package/dist/commonjs/card/lib/CardBody.d.ts +1 -1
  9. package/dist/commonjs/card/lib/CardBody.d.ts.map +1 -1
  10. package/dist/commonjs/card/lib/CardBody.js +1 -6
  11. package/dist/commonjs/card/lib/CardHeading.d.ts.map +1 -1
  12. package/dist/commonjs/card/lib/CardHeading.js +2 -10
  13. package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
  14. package/dist/commonjs/checkbox/lib/Checkbox.js +2 -13
  15. package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
  16. package/dist/commonjs/form-field/lib/Hint.d.ts.map +1 -1
  17. package/dist/commonjs/form-field/lib/Hint.js +5 -13
  18. package/dist/commonjs/index.d.ts +1 -0
  19. package/dist/commonjs/index.d.ts.map +1 -1
  20. package/dist/commonjs/index.js +1 -0
  21. package/dist/commonjs/layout/index.d.ts +2 -0
  22. package/dist/commonjs/layout/index.d.ts.map +1 -1
  23. package/dist/commonjs/layout/index.js +2 -0
  24. package/dist/commonjs/layout/lib/Box.d.ts +4 -2
  25. package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
  26. package/dist/commonjs/layout/lib/Box.js +27 -3
  27. package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
  28. package/dist/commonjs/layout/lib/Flex.d.ts.map +1 -1
  29. package/dist/commonjs/layout/lib/Grid.d.ts +2 -2
  30. package/dist/commonjs/layout/lib/Stack.d.ts +4 -4
  31. package/dist/commonjs/layout/lib/utils/color.d.ts.map +1 -1
  32. package/dist/commonjs/layout/lib/utils/color.js +1 -0
  33. package/dist/commonjs/layout/lib/utils/font.d.ts +29 -0
  34. package/dist/commonjs/layout/lib/utils/font.d.ts.map +1 -0
  35. package/dist/commonjs/layout/lib/utils/font.js +57 -0
  36. package/dist/commonjs/layout/lib/utils/text.d.ts +35 -0
  37. package/dist/commonjs/layout/lib/utils/text.d.ts.map +1 -0
  38. package/dist/commonjs/layout/lib/utils/text.js +48 -0
  39. package/dist/commonjs/modal/lib/Modal.d.ts +1 -1
  40. package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
  41. package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +5 -4
  42. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
  43. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +2 -4
  44. package/dist/commonjs/popup/lib/Popup.d.ts +1 -1
  45. package/dist/commonjs/popup/lib/PopupBody.d.ts +1 -1
  46. package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
  47. package/dist/commonjs/popup/lib/PopupCard.js +2 -2
  48. package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
  49. package/dist/commonjs/radio/lib/Radio.js +2 -13
  50. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  51. package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
  52. package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
  53. package/dist/commonjs/text/index.d.ts +4 -0
  54. package/dist/commonjs/text/index.d.ts.map +1 -0
  55. package/dist/commonjs/text/index.js +15 -0
  56. package/dist/commonjs/text/lib/LabelText.d.ts +8 -0
  57. package/dist/commonjs/text/lib/LabelText.d.ts.map +1 -0
  58. package/dist/commonjs/text/lib/LabelText.js +51 -0
  59. package/dist/commonjs/text/lib/Text.d.ts +14 -0
  60. package/dist/commonjs/text/lib/Text.d.ts.map +1 -0
  61. package/dist/commonjs/text/lib/Text.js +90 -0
  62. package/dist/commonjs/text/lib/TypeLevelComponents.d.ts +13 -0
  63. package/dist/commonjs/text/lib/TypeLevelComponents.d.ts.map +1 -0
  64. package/dist/commonjs/text/lib/TypeLevelComponents.js +79 -0
  65. package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
  66. package/dist/es6/banner/lib/Banner.js +2 -4
  67. package/dist/es6/card/lib/Card.d.ts +1 -1
  68. package/dist/es6/card/lib/CardBody.d.ts +1 -1
  69. package/dist/es6/card/lib/CardBody.d.ts.map +1 -1
  70. package/dist/es6/card/lib/CardBody.js +1 -3
  71. package/dist/es6/card/lib/CardHeading.d.ts.map +1 -1
  72. package/dist/es6/card/lib/CardHeading.js +2 -7
  73. package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
  74. package/dist/es6/checkbox/lib/Checkbox.js +3 -14
  75. package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
  76. package/dist/es6/form-field/lib/Hint.d.ts.map +1 -1
  77. package/dist/es6/form-field/lib/Hint.js +6 -14
  78. package/dist/es6/index.d.ts +1 -0
  79. package/dist/es6/index.d.ts.map +1 -1
  80. package/dist/es6/index.js +1 -0
  81. package/dist/es6/layout/index.d.ts +2 -0
  82. package/dist/es6/layout/index.d.ts.map +1 -1
  83. package/dist/es6/layout/index.js +2 -0
  84. package/dist/es6/layout/lib/Box.d.ts +4 -2
  85. package/dist/es6/layout/lib/Box.d.ts.map +1 -1
  86. package/dist/es6/layout/lib/Box.js +27 -3
  87. package/dist/es6/layout/lib/Flex.d.ts +1 -1
  88. package/dist/es6/layout/lib/Flex.d.ts.map +1 -1
  89. package/dist/es6/layout/lib/Grid.d.ts +2 -2
  90. package/dist/es6/layout/lib/Stack.d.ts +4 -4
  91. package/dist/es6/layout/lib/utils/color.d.ts.map +1 -1
  92. package/dist/es6/layout/lib/utils/color.js +2 -1
  93. package/dist/es6/layout/lib/utils/font.d.ts +29 -0
  94. package/dist/es6/layout/lib/utils/font.d.ts.map +1 -0
  95. package/dist/es6/layout/lib/utils/font.js +53 -0
  96. package/dist/es6/layout/lib/utils/text.d.ts +35 -0
  97. package/dist/es6/layout/lib/utils/text.d.ts.map +1 -0
  98. package/dist/es6/layout/lib/utils/text.js +44 -0
  99. package/dist/es6/modal/lib/Modal.d.ts +1 -1
  100. package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
  101. package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +6 -5
  102. package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
  103. package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +2 -4
  104. package/dist/es6/popup/lib/Popup.d.ts +1 -1
  105. package/dist/es6/popup/lib/PopupBody.d.ts +1 -1
  106. package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
  107. package/dist/es6/popup/lib/PopupCard.js +2 -2
  108. package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
  109. package/dist/es6/radio/lib/Radio.js +3 -14
  110. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  111. package/dist/es6/side-panel/lib/SidePanel.js +3 -3
  112. package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
  113. package/dist/es6/text/index.d.ts +4 -0
  114. package/dist/es6/text/index.d.ts.map +1 -0
  115. package/dist/es6/text/index.js +3 -0
  116. package/dist/es6/text/lib/LabelText.d.ts +8 -0
  117. package/dist/es6/text/lib/LabelText.d.ts.map +1 -0
  118. package/dist/es6/text/lib/LabelText.js +29 -0
  119. package/dist/es6/text/lib/Text.d.ts +14 -0
  120. package/dist/es6/text/lib/Text.d.ts.map +1 -0
  121. package/dist/es6/text/lib/Text.js +68 -0
  122. package/dist/es6/text/lib/TypeLevelComponents.d.ts +13 -0
  123. package/dist/es6/text/lib/TypeLevelComponents.d.ts.map +1 -0
  124. package/dist/es6/text/lib/TypeLevelComponents.js +57 -0
  125. package/form-field/lib/Hint.tsx +8 -19
  126. package/index.ts +1 -0
  127. package/layout/index.ts +2 -0
  128. package/layout/lib/Box.tsx +34 -4
  129. package/layout/lib/utils/color.ts +7 -2
  130. package/layout/lib/utils/font.ts +67 -0
  131. package/layout/lib/utils/text.ts +57 -0
  132. package/package.json +5 -5
  133. package/pagination/lib/Pagination/AdditionalDetails.tsx +7 -8
  134. package/pagination/lib/Pagination/GoTo/Label.tsx +3 -11
  135. package/popup/lib/PopupCard.tsx +2 -1
  136. package/radio/lib/Radio.tsx +9 -24
  137. package/side-panel/lib/SidePanel.tsx +7 -7
  138. package/text/LICENSE +52 -0
  139. package/text/README.md +5 -0
  140. package/text/index.ts +3 -0
  141. package/text/lib/LabelText.tsx +25 -0
  142. package/text/lib/Text.tsx +66 -0
  143. package/text/lib/TypeLevelComponents.tsx +43 -0
  144. package/text/package.json +6 -0
@@ -0,0 +1,90 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.Text = void 0;
45
+ var React = __importStar(require("react"));
46
+ var common_1 = require("@workday/canvas-kit-react/common");
47
+ // type changes no need
48
+ var tokens_1 = require("@workday/canvas-kit-react/tokens");
49
+ var layout_1 = require("@workday/canvas-kit-react/layout");
50
+ /**
51
+ * Function returns updated props by token and variant values
52
+ */
53
+ var validateProps = function (_a) {
54
+ var typeLevel = _a.typeLevel, variant = _a.variant, props = __rest(_a, ["typeLevel", "variant"]);
55
+ var updatedProps = props;
56
+ var tokenPropNames = [
57
+ 'color',
58
+ 'fontFamily',
59
+ 'fontSize',
60
+ 'fontWeight',
61
+ 'letterSpacing',
62
+ 'lineHeight',
63
+ ];
64
+ /*
65
+ If token provided it updates undefined values of token styles:
66
+ `fontFamily`, `fontSize`, `lineHeight`, `fontWeight`, `color`
67
+ by replacing them by token value
68
+ */
69
+ if (typeLevel) {
70
+ var _b = typeLevel.split('.'), level = _b[0], size = _b[1];
71
+ var tokenProps_1 = tokens_1.type.levels[level][size];
72
+ tokenPropNames.forEach(function (item) {
73
+ if (!props[item]) {
74
+ updatedProps[item] = tokenProps_1[item];
75
+ }
76
+ });
77
+ }
78
+ // If variant provided it updates color value by variant color
79
+ if (variant) {
80
+ updatedProps = __assign(__assign({}, updatedProps), tokens_1.type.variants[variant]);
81
+ }
82
+ return updatedProps;
83
+ };
84
+ exports.Text = common_1.createComponent('span')({
85
+ displayName: 'Text',
86
+ Component: function (_a, ref, Element) {
87
+ var children = _a.children, elemProps = __rest(_a, ["children"]);
88
+ return (React.createElement(layout_1.Box, __assign({ ref: ref, as: Element }, validateProps(elemProps)), children));
89
+ },
90
+ });
@@ -0,0 +1,13 @@
1
+ import { TextProps } from '@workday/canvas-kit-react/text';
2
+ /**
3
+ * Props interface for type level specific component:
4
+ * Title, Heading, BodyText, Subtext.
5
+ */
6
+ export interface TypeLevelProps extends Omit<TextProps, 'typeLevel'> {
7
+ size: 'large' | 'medium' | 'small';
8
+ }
9
+ export declare const Subtext: import("../../common").ElementComponent<"p", TypeLevelProps>;
10
+ export declare const BodyText: import("../../common").ElementComponent<"p", TypeLevelProps>;
11
+ export declare const Heading: import("../../common").ElementComponent<"h2", TypeLevelProps>;
12
+ export declare const Title: import("../../common").ElementComponent<"h1", TypeLevelProps>;
13
+ //# sourceMappingURL=TypeLevelComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeLevelComponents.d.ts","sourceRoot":"","sources":["../../../../text/lib/TypeLevelComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC;IAClE,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,OAAO,8DAMlB,CAAC;AAEH,eAAO,MAAM,QAAQ,8DAMnB,CAAC;AAEH,eAAO,MAAM,OAAO,+DAMlB,CAAC;AAEH,eAAO,MAAM,KAAK,+DAMhB,CAAC"}
@@ -0,0 +1,79 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.Title = exports.Heading = exports.BodyText = exports.Subtext = void 0;
45
+ var React = __importStar(require("react"));
46
+ var common_1 = require("@workday/canvas-kit-react/common");
47
+ var text_1 = require("@workday/canvas-kit-react/text");
48
+ exports.Subtext = common_1.createComponent('p')({
49
+ displayName: 'Subtext',
50
+ Component: function (_a, ref, Element) {
51
+ var size = _a.size, elemProps = __rest(_a, ["size"]);
52
+ var typeLevel = "subtext." + size;
53
+ return React.createElement(text_1.Text, __assign({ ref: ref, as: Element, typeLevel: typeLevel }, elemProps));
54
+ },
55
+ });
56
+ exports.BodyText = common_1.createComponent('p')({
57
+ displayName: 'BodyText',
58
+ Component: function (_a, ref, Element) {
59
+ var size = _a.size, elemProps = __rest(_a, ["size"]);
60
+ var typeLevel = "body." + size;
61
+ return React.createElement(text_1.Text, __assign({ ref: ref, as: Element, typeLevel: typeLevel }, elemProps));
62
+ },
63
+ });
64
+ exports.Heading = common_1.createComponent('h2')({
65
+ displayName: 'Heading',
66
+ Component: function (_a, ref, Element) {
67
+ var size = _a.size, elemProps = __rest(_a, ["size"]);
68
+ var typeLevel = "heading." + size;
69
+ return React.createElement(text_1.Text, __assign({ ref: ref, as: Element, typeLevel: typeLevel }, elemProps));
70
+ },
71
+ });
72
+ exports.Title = common_1.createComponent('h1')({
73
+ displayName: 'Title',
74
+ Component: function (_a, ref, Element) {
75
+ var size = _a.size, elemProps = __rest(_a, ["size"]);
76
+ var typeLevel = "title." + size;
77
+ return React.createElement(text_1.Text, __assign({ ref: ref, as: Element, typeLevel: typeLevel }, elemProps));
78
+ },
79
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAQtD,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IACnE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAkBD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CjB,CAAC"}
1
+ {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAQtD,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IACnE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAYD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDjB,CAAC"}
@@ -30,9 +30,7 @@ import { useBanner, useBannerModel, useThemedPalette } from './hooks';
30
30
  import { BannerIcon } from './BannerIcon';
31
31
  import { BannerLabel } from './BannerLabel';
32
32
  import { BannerActionText } from './BannerActionText';
33
- // Remove color from our type since it is set on the Flex style attribute
34
- var _a = type.levels.subtext.large, _color = _a.color, typeLevelsSubtextLarge = __rest(_a, ["color"]);
35
- var styles = __assign(__assign(__assign({}, typeLevelsSubtextLarge), { cursor: 'pointer', fontWeight: type.properties.fontWeights.medium, textAlign: 'left', transition: 'background-color 120ms', '&:focus': __assign({ outline: 'none' }, focusRing({ separation: 2 })) }), hideMouseFocus);
33
+ var styles = __assign({ cursor: 'pointer', transition: 'background-color 120ms', '&:focus': __assign({ outline: 'none' }, focusRing({ separation: 2 })) }, hideMouseFocus);
36
34
  export var Banner = createContainer('button')({
37
35
  displayName: 'Banner',
38
36
  modelHook: useBannerModel,
@@ -62,5 +60,5 @@ export var Banner = createContainer('button')({
62
60
  _b[borderBottomRightRadius] = model.state.isSticky ? 0 : borderRadius.m,
63
61
  _b[borderTopRightRadius] = model.state.isSticky ? 0 : borderRadius.m,
64
62
  _b);
65
- return (jsx(Flex, __assign({ as: Element, width: model.state.isSticky ? '222px' : '328px', backgroundColor: palette.normal, color: palette.contrast, padding: space.xxs + " " + space.s, border: "0", display: "flex", alignItems: "center" }, borderStyleProps, { css: [styles, themedBackgroundStyles] }, elemProps), children));
63
+ return (jsx(Flex, __assign({ as: Element }, type.levels.subtext.large, { fontWeight: "medium", textAlign: "left", width: model.state.isSticky ? '222px' : '328px', backgroundColor: palette.normal, color: palette.contrast, padding: space.xxs + " " + space.s, border: "0", display: "flex", alignItems: "center" }, borderStyleProps, { css: [styles, themedBackgroundStyles] }, elemProps), children));
66
64
  });
@@ -8,6 +8,6 @@ export interface CardProps extends BoxProps {
8
8
  }
9
9
  export declare const Card: import("../../common").ElementComponent<"div", CardProps> & {
10
10
  Heading: import("../../common").ElementComponent<"h3", import("./CardHeading").CardHeadingProps>;
11
- Body: import("../../common").ElementComponent<"div", import("../../layout").BorderShorthandStyleProps & import("../../layout").BorderColorStyleProps & import("../../layout").BorderRadiusStyleProps & import("../../layout").BorderLineStyleProps & import("../../layout").BorderWidthStyleProps & import("../../layout").BorderLogicalStyleProps & import("../../layout").ColorStyleProps & import("../../layout").DepthStyleProps & import("../../layout").FlexItemStyleProps & import("../../layout").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../../layout").PositionStandardProps & import("../../layout").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps>;
11
+ Body: import("../../common").ElementComponent<"div", import("../../layout").BorderShorthandStyleProps & import("../../layout").BorderColorStyleProps & import("../../layout").BorderRadiusStyleProps & import("../../layout").BorderLineStyleProps & import("../../layout").BorderWidthStyleProps & import("../../layout").BorderLogicalStyleProps & import("../../layout").ColorStyleProps & import("../../layout").DepthStyleProps & import("../../layout").FlexItemStyleProps & import("../../layout").FontStyleProps & import("../../layout").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../../layout").PositionStandardProps & import("../../layout").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps & import("../../layout").TextStyleProps>;
12
12
  };
13
13
  //# sourceMappingURL=Card.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const CardBody: import("../../common").ElementComponent<"div", import("../../layout").BorderShorthandStyleProps & import("../../layout").BorderColorStyleProps & import("../../layout").BorderRadiusStyleProps & import("../../layout").BorderLineStyleProps & import("../../layout").BorderWidthStyleProps & import("../../layout").BorderLogicalStyleProps & import("../../layout").ColorStyleProps & import("../../layout").DepthStyleProps & import("../../layout").FlexItemStyleProps & import("../../layout").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../../layout").PositionStandardProps & import("../../layout").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps>;
1
+ export declare const CardBody: import("../../common").ElementComponent<"div", import("../../layout").BorderShorthandStyleProps & import("../../layout").BorderColorStyleProps & import("../../layout").BorderRadiusStyleProps & import("../../layout").BorderLineStyleProps & import("../../layout").BorderWidthStyleProps & import("../../layout").BorderLogicalStyleProps & import("../../layout").ColorStyleProps & import("../../layout").DepthStyleProps & import("../../layout").FlexItemStyleProps & import("../../layout").FontStyleProps & import("../../layout").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../../layout").PositionStandardProps & import("../../layout").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps & import("../../layout").TextStyleProps>;
2
2
  //# sourceMappingURL=CardBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardBody.d.ts","sourceRoot":"","sources":["../../../../card/lib/CardBody.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ,owBASnB,CAAC"}
1
+ {"version":3,"file":"CardBody.d.ts","sourceRoot":"","sources":["../../../../card/lib/CardBody.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,o1BASnB,CAAC"}
@@ -21,15 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import * as React from 'react';
24
- import styled from '@emotion/styled';
25
24
  import { type } from '@workday/canvas-kit-react/tokens';
26
25
  import { createComponent } from '@workday/canvas-kit-react/common';
27
26
  import { Box } from '@workday/canvas-kit-react/layout';
28
- var Body = styled(Box)(type.levels.subtext.large);
29
27
  export var CardBody = createComponent('div')({
30
28
  displayName: 'Card.Body',
31
29
  Component: function (_a, ref, Element) {
32
30
  var children = _a.children, elemProps = __rest(_a, ["children"]);
33
- return (React.createElement(Body, __assign({ ref: ref, as: Element }, elemProps), children));
31
+ return (React.createElement(Box, __assign({ ref: ref, as: Element }, type.levels.subtext.large, elemProps), children));
34
32
  },
35
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeading.d.ts","sourceRoot":"","sources":["../../../../card/lib/CardHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAM,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAMD,eAAO,MAAM,WAAW,iEAStB,CAAC"}
1
+ {"version":3,"file":"CardHeading.d.ts","sourceRoot":"","sources":["../../../../card/lib/CardHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAG1D,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,iEAiBtB,CAAC"}
@@ -21,17 +21,12 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import * as React from 'react';
24
- import styled from '@emotion/styled';
25
- import { type } from '@workday/canvas-kit-react/tokens';
26
24
  import { createComponent } from '@workday/canvas-kit-react/common';
27
- import { Box } from '@workday/canvas-kit-react/layout';
28
- var Heading = styled(Box.as('h3'))(type.levels.body.large, {
29
- fontWeight: type.properties.fontWeights.bold,
30
- });
25
+ import { Text } from '@workday/canvas-kit-react/text';
31
26
  export var CardHeading = createComponent('h3')({
32
27
  displayName: 'Card.Heading',
33
28
  Component: function (_a, ref, Element) {
34
29
  var children = _a.children, elemProps = __rest(_a, ["children"]);
35
- return (React.createElement(Heading, __assign({ ref: ref, marginBottom: "m", marginTop: 0, as: Element }, elemProps), children));
30
+ return (React.createElement(Text, __assign({ ref: ref, typeLevel: "body.large", fontWeight: "bold", marginBottom: "m", marginTop: 0, as: Element }, elemProps), children));
36
31
  },
37
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAOT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAW1C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAoQD,eAAO,MAAM,QAAQ;;CAoEnB,CAAC"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAOT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAM1C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAqPD,eAAO,MAAM,QAAQ;;CAyEnB,CAAC"}
@@ -22,9 +22,10 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import * as React from 'react';
24
24
  import { createComponent, ErrorType, useUniqueId, focusRing, mouseFocusBehavior, getErrorColors, styled, useTheme, } from '@workday/canvas-kit-react/common';
25
- import { canvas, borderRadius, colors, inputColors, spaceNumbers, } from '@workday/canvas-kit-react/tokens';
25
+ import { borderRadius, colors, inputColors, spaceNumbers } from '@workday/canvas-kit-react/tokens';
26
26
  import { SystemIcon } from '@workday/canvas-kit-react/icon';
27
27
  import { checkSmallIcon } from '@workday/canvas-system-icons-web';
28
+ import { LabelText } from '@workday/canvas-kit-react/text';
28
29
  var checkboxHeight = 18;
29
30
  var checkboxTapArea = spaceNumbers.m;
30
31
  var checkboxContainerHeight = checkboxTapArea;
@@ -209,18 +210,6 @@ var IndeterminateBox = styled('div')({
209
210
  : theme.canvas.palette.primary.contrast,
210
211
  });
211
212
  });
212
- var CheckboxLabel = styled('label')(__assign(__assign({}, canvas.type.levels.subtext.large), { paddingLeft: checkboxLabelDistance }), function (_a) {
213
- var variant = _a.variant;
214
- return (variant === 'inverse' ? { color: colors.frenchVanilla100 } : undefined);
215
- }, function (_a) {
216
- var disabled = _a.disabled, variant = _a.variant;
217
- return disabled
218
- ? {
219
- color: variant === 'inverse' ? colors.frenchVanilla100 : inputColors.disabled.text,
220
- opacity: variant === 'inverse' ? '.4' : '1',
221
- }
222
- : { cursor: 'pointer' };
223
- });
224
213
  export var Checkbox = createComponent('input')({
225
214
  displayName: 'Checkbox',
226
215
  Component: function (_a, ref, Element) {
@@ -240,7 +229,7 @@ export var Checkbox = createComponent('input')({
240
229
  React.createElement(CheckboxCheck, { checked: checked }, indeterminate ? (React.createElement(IndeterminateBox, { variant: variant })) : (React.createElement(SystemIcon, { icon: checkSmallIcon, color: variant === 'inverse'
241
230
  ? theme.canvas.palette.primary.main
242
231
  : theme.canvas.palette.primary.contrast }))))),
243
- label && (React.createElement(CheckboxLabel, { variant: variant, htmlFor: inputId, disabled: disabled }, label))));
232
+ label && (React.createElement(LabelText, { htmlFor: inputId, disabled: disabled, variant: variant, paddingLeft: checkboxLabelDistance }, label))));
244
233
  },
245
234
  subComponents: {
246
235
  ErrorType: ErrorType,
@@ -88,7 +88,7 @@ export declare const Dialog: import("../../common").ComponentM<DialogProps & Par
88
88
  hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
89
89
  };
90
90
  }> & {
91
- Body: import("../../common").ElementComponentM<"div", import("../..").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>, {
91
+ 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>, {
92
92
  state: {
93
93
  stackRef: React.RefObject<HTMLDivElement>;
94
94
  targetRef: React.RefObject<HTMLButtonElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"Hint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/Hint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,SAAS,EAAU,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAG9E,MAAM,WAAW,SAAU,SAAQ,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACtF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAmBD,cAAM,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,mBAAa;IAEtB,MAAM;CAqBd;AAID,OAAO,EAAC,IAAI,EAAC,CAAC"}
1
+ {"version":3,"file":"Hint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/Hint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,SAAS,EAAE,SAAS,EAAS,MAAM,kCAAkC,CAAC;AAI9E,MAAM,WAAW,SAAU,SAAQ,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACtF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD,cAAM,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,mBAAa;IAEtB,MAAM;CAsBd;AAID,OAAO,EAAC,IAAI,EAAC,CAAC"}
@@ -24,17 +24,9 @@ var __assign = (this && this.__assign) || function () {
24
24
  };
25
25
  import * as React from 'react';
26
26
  import { ErrorType, styled } from '@workday/canvas-kit-react/common';
27
- import { space, type } from '@workday/canvas-kit-react/tokens';
28
- var Label = styled('span')(type.levels.subtext.medium, {
29
- fontWeight: type.properties.fontWeights.medium,
30
- }, function (_a) {
31
- var error = _a.error, theme = _a.theme;
32
- return error === ErrorType.Error && { color: theme.canvas.palette.error.main };
33
- });
34
- var Message = styled('p')(type.levels.subtext.medium, {
35
- margin: space.xxs + " 0 0",
36
- width: '100%',
37
- }, function (_a) {
27
+ import { space } from '@workday/canvas-kit-react/tokens';
28
+ import { Subtext, Text } from '@workday/canvas-kit-react/text';
29
+ var Message = styled(Subtext)(function (_a) {
38
30
  var error = _a.error, theme = _a.theme;
39
31
  return error === ErrorType.Error && { color: theme.canvas.palette.error.main };
40
32
  });
@@ -55,10 +47,10 @@ var Hint = /** @class */ (function (_super) {
55
47
  break;
56
48
  default:
57
49
  }
58
- return (React.createElement(Message, __assign({}, this.props),
59
- typeof error !== 'undefined' && hintLabel && React.createElement(Label, { error: error },
50
+ return (React.createElement(Message, __assign({ size: "medium", margin: space.xxs + " 0 0", width: "100%" }, this.props),
51
+ typeof error !== 'undefined' && hintLabel && (React.createElement(Text, { fontWeight: "medium" },
60
52
  hintLabel,
61
- ": "),
53
+ ": ")),
62
54
  children));
63
55
  };
64
56
  Hint.ErrorType = ErrorType;
@@ -27,6 +27,7 @@ export * from './status-indicator';
27
27
  export * from './switch';
28
28
  export * from './table';
29
29
  export * from './tabs';
30
+ export * from './text';
30
31
  export * from './text-area';
31
32
  export * from './text-input';
32
33
  export * from './toast';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
package/dist/es6/index.js CHANGED
@@ -27,6 +27,7 @@ export * from './status-indicator';
27
27
  export * from './switch';
28
28
  export * from './table';
29
29
  export * from './tabs';
30
+ export * from './text';
30
31
  export * from './text-area';
31
32
  export * from './text-input';
32
33
  export * from './toast';
@@ -6,9 +6,11 @@ export * from './lib/utils/border';
6
6
  export * from './lib/utils/color';
7
7
  export { DepthStyleProps } from './lib/utils/depth';
8
8
  export * from './lib/utils/flexItem';
9
+ export * from './lib/utils/font';
9
10
  export * from './lib/utils/layout';
10
11
  export * from './lib/utils/position';
11
12
  export { SpaceStyleProps } from './lib/utils/space';
13
+ export * from './lib/utils/text';
12
14
  export * from './lib/Flex';
13
15
  export * from './lib/Grid';
14
16
  export * from './lib/Stack';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -5,8 +5,10 @@ export * from './lib/Box';
5
5
  export * from './lib/utils/border';
6
6
  export * from './lib/utils/color';
7
7
  export * from './lib/utils/flexItem';
8
+ export * from './lib/utils/font';
8
9
  export * from './lib/utils/layout';
9
10
  export * from './lib/utils/position';
11
+ export * from './lib/utils/text';
10
12
  export * from './lib/Flex';
11
13
  export * from './lib/Grid';
12
14
  export * from './lib/Stack';
@@ -3,11 +3,13 @@ import { BorderStyleProps } from './utils/border';
3
3
  import { ColorStyleProps } from './utils/color';
4
4
  import { DepthStyleProps } from './utils/depth';
5
5
  import { FlexItemStyleProps } from './utils/flexItem';
6
+ import { FontStyleProps } from './utils/font';
6
7
  import { LayoutStyleProps } from './utils/layout';
7
8
  import { OtherStyleProps } from './utils/other';
8
9
  import { PositionStyleProps } from './utils/position';
9
10
  import { SpaceStyleProps } from './utils/space';
10
- export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & {
11
+ import { TextStyleProps } from './utils/text';
12
+ export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & FontStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & TextStyleProps & {
11
13
  children?: React.ReactNode;
12
14
  };
13
15
  /**
@@ -44,5 +46,5 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
44
46
  * );
45
47
  *
46
48
  */
47
- export declare const Box: import("../../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>;
49
+ export declare const Box: import("../../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 & FontStyleProps & LayoutStyleProps & OtherStyleProps & import("./utils/position").PositionStandardProps & import("./utils/position").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & TextStyleProps>;
48
50
  //# sourceMappingURL=Box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,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;AAQJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,sCAsBtB,CAAC;AA+BF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,unBAad,CAAC"}
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,QAAQ,GAAG,gBAAgB,GACrC,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,cAAc,GAAG;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA4BJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,sCAwBtB,CAAC;AAmCF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,ypBAad,CAAC"}
@@ -29,11 +29,33 @@ import { border } from './utils/border';
29
29
  import { color } from './utils/color';
30
30
  import { depth } from './utils/depth';
31
31
  import { flexItem } from './utils/flexItem';
32
+ import { font } from './utils/font';
32
33
  import { layout } from './utils/layout';
33
34
  import { other } from './utils/other';
34
35
  import { position } from './utils/position';
35
36
  import { space } from './utils/space';
36
- var omittedProps = ['display', 'color', 'height', 'overflow', 'width', 'border', 'background'];
37
+ import { text } from './utils/text';
38
+ var omittedProps = [
39
+ 'display',
40
+ 'color',
41
+ 'height',
42
+ 'overflow',
43
+ 'width',
44
+ 'border',
45
+ 'background',
46
+ 'fontSize',
47
+ 'fontWeight',
48
+ 'fontFamily',
49
+ 'letterSpacing',
50
+ 'lineHeight',
51
+ 'textAlign',
52
+ 'textDecoration',
53
+ 'textOverflow',
54
+ 'textTransform',
55
+ 'textShadow',
56
+ 'whiteSpace',
57
+ 'wordBreak',
58
+ ];
37
59
  var shouldForwardProp = function (prop) {
38
60
  return isPropValid(prop) && !omittedProps.includes(prop);
39
61
  };
@@ -62,9 +84,11 @@ export var boxStyleFn = function (props) {
62
84
  color,
63
85
  depth,
64
86
  flexItem,
87
+ font,
65
88
  layout,
66
89
  position,
67
90
  space,
91
+ text,
68
92
  ].reduce(function (result, style) {
69
93
  // @ts-ignore
70
94
  var temp = typeof style === 'function' ? style(props) : style;
@@ -79,11 +103,11 @@ export var boxStyleFn = function (props) {
79
103
  // Meant to be used with elements. The `shouldForwardProps` will remove all style props
80
104
  var StyledBoxElement = styled('div', { shouldForwardProp: shouldForwardProp })({
81
105
  boxSizing: 'border-box',
82
- }, border, color, depth, flexItem, layout, position, space);
106
+ }, border, color, depth, flexItem, font, layout, position, space, text);
83
107
  // Meant to be used with components. There is no `shouldForwardProps` - all props will be forwarded to the component
84
108
  var StyledBoxComponent = styled('div')({
85
109
  boxSizing: 'border-box',
86
- }, border, color, depth, flexItem, layout, other, position, space);
110
+ }, border, color, depth, flexItem, font, layout, other, position, space, text);
87
111
  /**
88
112
  * `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
89
113
  * It is highly flexible, and its primary purpose is to build other components.
@@ -22,5 +22,5 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
22
22
  * );
23
23
  *
24
24
  */
25
- export declare const Flex: 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 & FlexStyleProps>;
25
+ export declare const Flex: 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 & FlexStyleProps>;
26
26
  //# sourceMappingURL=Flex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Flex.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AASlD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,gnBASf,CAAC"}
1
+ {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Flex.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAO,cAAc,EAAC,MAAM,cAAc,CAAC;AAElD,oBAAY,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AASlD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,4qBASf,CAAC"}
@@ -25,7 +25,7 @@ export declare type GridItemProps = BoxProps & GridItemStyleProps;
25
25
  * );
26
26
  *```
27
27
  */
28
- export declare const Grid: 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 & GridStyleProps> & {
28
+ export declare const Grid: 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 & GridStyleProps> & {
29
29
  /**
30
30
  * `<Grid.Item />` is the child specific sub-component to `<Grid/>`. `<Grid.Item />` gets child specific props, whereas `<Grid./>` gets parent container props.
31
31
  *
@@ -47,6 +47,6 @@ export declare const Grid: import("../../common").ElementComponent<"div", import
47
47
  * );
48
48
  *```
49
49
  */
50
- 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 & GridItemStyleProps>;
50
+ 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 & GridItemStyleProps>;
51
51
  };
52
52
  //# sourceMappingURL=Grid.d.ts.map