@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
@@ -1,8 +1,8 @@
1
1
  import { FlexProps } from './Flex';
2
2
  import { StackStyleProps } from './utils/stack';
3
3
  export declare type StackProps = FlexProps & StackStyleProps;
4
- export declare const Stack: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").FlexStyleProps & StackStyleProps> & {
5
- Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
4
+ export declare const Stack: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps & import("..").FlexStyleProps & StackStyleProps> & {
5
+ Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps>;
6
6
  };
7
7
  export interface HStackProps extends StackProps {
8
8
  /**
@@ -12,7 +12,7 @@ export interface HStackProps extends StackProps {
12
12
  flexDirection?: 'row' | 'row-reverse';
13
13
  }
14
14
  export declare const HStack: import("../../common").ElementComponent<"div", HStackProps> & {
15
- Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
15
+ Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps>;
16
16
  };
17
17
  export interface VStackProps extends StackProps {
18
18
  /**
@@ -22,6 +22,6 @@ export interface VStackProps extends StackProps {
22
22
  flexDirection?: 'column' | 'column-reverse';
23
23
  }
24
24
  export declare const VStack: import("../../common").ElementComponent<"div", VStackProps> & {
25
- Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
25
+ Item: import("../../common").ElementComponent<"div", import("..").BorderShorthandStyleProps & import("..").BorderColorStyleProps & import("..").BorderRadiusStyleProps & import("..").BorderLineStyleProps & import("..").BorderWidthStyleProps & import("..").BorderLogicalStyleProps & import("..").ColorStyleProps & import("..").DepthStyleProps & import("..").FlexItemStyleProps & import("..").FontStyleProps & import("..").LayoutStyleProps & import("./utils/other").OtherStyleProps & import("..").PositionStandardProps & import("..").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps & import("..").TextStyleProps>;
26
26
  };
27
27
  //# sourceMappingURL=Stack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,IAAI,WAAW,EAAE,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAEpF,oBAAY,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,0CAA0C;AAC1C,oBAAY,eAAe,GAAG;IAC5B,iCAAiC;IACjC,UAAU,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACzC,uCAAuC;IACvC,eAAe,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACrC,CAAC;AAyBF;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,MAWxD"}
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/color.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,IAAI,WAAW,EACrB,WAAW,EAEZ,MAAM,kCAAkC,CAAC;AAE1C,oBAAY,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,0CAA0C;AAC1C,oBAAY,eAAe,GAAG;IAC5B,iCAAiC;IACjC,UAAU,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACzC,uCAAuC;IACvC,eAAe,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACrC,CAAC;AAyBF;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,MAWxD"}
@@ -9,7 +9,8 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { colors as colorTokens } from '@workday/canvas-kit-react/tokens';
12
+ // type changes no need
13
+ import { colors as colorTokens, } from '@workday/canvas-kit-react/tokens';
13
14
  var getBackground = function (value) { return ({
14
15
  background: colorTokens[value] || value,
15
16
  }); };
@@ -0,0 +1,29 @@
1
+ import { Property } from 'csstype';
2
+ import { CanvasTypeProperties } from '@workday/canvas-kit-react/tokens';
3
+ export declare type FontFamilyTokens = keyof CanvasTypeProperties['fontFamilies'];
4
+ export declare type FontSizeTokens = keyof CanvasTypeProperties['fontSizes'];
5
+ export declare type FontWeightTokens = keyof CanvasTypeProperties['fontWeights'];
6
+ /** style props to for color properties */
7
+ export declare type FontStyleProps = {
8
+ /** sets `font-family` property */
9
+ fontFamily?: Property.FontFamily | FontFamilyTokens;
10
+ /** sets `font-size` property */
11
+ fontSize?: Property.FontSize | FontSizeTokens;
12
+ /** sets `font-style` property */
13
+ fontStyle?: Property.FontStyle;
14
+ /** sets `font-weight` property */
15
+ fontWeight?: Property.FontWeight | FontWeightTokens;
16
+ };
17
+ /**
18
+ * A style prop function that takes components props and returns font styles from canvas token values.
19
+ * If no `FontStyleProps` are found, it returns an empty object.
20
+ *
21
+ * @example
22
+ * // You'll most likely use `font` with low-level, styled components
23
+ * const BoxExample = () => (
24
+ * <Box fontFamily="monospace" fontWeight="medium">Hello, fonts!</Box>
25
+ * );
26
+ *
27
+ */
28
+ export declare function font<P extends FontStyleProps>(props: P): {};
29
+ //# sourceMappingURL=font.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/font.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACjC,OAAO,EAAO,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAE5E,oBAAY,gBAAgB,GAAG,MAAM,oBAAoB,CAAC,cAAc,CAAC,CAAC;AAC1E,oBAAY,cAAc,GAAG,MAAM,oBAAoB,CAAC,WAAW,CAAC,CAAC;AACrE,oBAAY,gBAAgB,GAAG,MAAM,oBAAoB,CAAC,aAAa,CAAC,CAAC;AAGzE,0CAA0C;AAC1C,oBAAY,cAAc,GAAG;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,gBAAgB,CAAC;IACpD,gCAAgC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,GAAG,cAAc,CAAC;IAC9C,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,gBAAgB,CAAC;CACrD,CAAC;AAyBF;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,CAAC,MAYtD"}
@@ -0,0 +1,53 @@
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
+ import { type } from '@workday/canvas-kit-react/tokens';
13
+ var getFontFamily = function (value) { return ({
14
+ fontFamily: type.properties.fontFamilies[value] || value,
15
+ }); };
16
+ var getFontSize = function (value) { return ({
17
+ fontSize: type.properties.fontSizes[value] || value,
18
+ }); };
19
+ var getFontStyle = function (value) { return ({
20
+ fontStyle: value,
21
+ }); };
22
+ var getFontWeight = function (value) { return ({
23
+ fontWeight: type.properties.fontWeights[value] || value,
24
+ }); };
25
+ var fontProps = {
26
+ fontFamily: getFontFamily,
27
+ fontSize: getFontSize,
28
+ fontWeight: getFontWeight,
29
+ fontStyle: getFontStyle,
30
+ };
31
+ /**
32
+ * A style prop function that takes components props and returns font styles from canvas token values.
33
+ * If no `FontStyleProps` are found, it returns an empty object.
34
+ *
35
+ * @example
36
+ * // You'll most likely use `font` with low-level, styled components
37
+ * const BoxExample = () => (
38
+ * <Box fontFamily="monospace" fontWeight="medium">Hello, fonts!</Box>
39
+ * );
40
+ *
41
+ */
42
+ export function font(props) {
43
+ var styles = {};
44
+ for (var key in props) {
45
+ if (key in fontProps) {
46
+ var value = props[key];
47
+ var fontFn = fontProps[key];
48
+ var style = fontFn(value);
49
+ styles = __assign(__assign({}, styles), style);
50
+ }
51
+ }
52
+ return styles;
53
+ }
@@ -0,0 +1,35 @@
1
+ import { Property } from 'csstype';
2
+ /** style props to for text properties */
3
+ export declare type TextStyleProps = {
4
+ /** sets `line-height` property */
5
+ lineHeight?: Property.LineHeight;
6
+ /** sets `letter-spacing` property */
7
+ letterSpacing?: Property.LetterSpacing;
8
+ /** sets `text-align` property */
9
+ textAlign?: Property.TextAlign;
10
+ /** sets `text-decoration` property */
11
+ textDecoration?: Property.TextDecoration;
12
+ /** sets `text-overflow` property */
13
+ textOverflow?: Property.TextOverflow;
14
+ /** sets `text-transform` property */
15
+ textTransform?: Property.TextTransform;
16
+ /** sets `text-shadow` property */
17
+ textShadow?: Property.TextShadow;
18
+ /** sets `white-space` property */
19
+ whiteSpace?: Property.WhiteSpace;
20
+ /** sets `word-break` property */
21
+ wordBreak?: Property.WordBreak;
22
+ };
23
+ /**
24
+ * A style prop function that takes components props and returns text styles.
25
+ * If no `TextStyleProps` are found, it returns an empty object.
26
+ *
27
+ * @example
28
+ * // You'll most likely use `text-align` with low-level, styled components
29
+ * const BoxExample = () => (
30
+ * <Box textAlign="center">Hello, alignment!</Box>
31
+ * );
32
+ *
33
+ */
34
+ export declare function text<P extends TextStyleProps>(props: P): {};
35
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,yCAAyC;AACzC,oBAAY,cAAc,GAAG;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,qCAAqC;IACrC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IACvC,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,sCAAsC;IACtC,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC;IACzC,oCAAoC;IACpC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC,qCAAqC;IACrC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IACvC,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,kCAAkC;IAClC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,iCAAiC;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;CAChC,CAAC;AAcF;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,CAAC,MAStD"}
@@ -0,0 +1,44 @@
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 textProps = [
13
+ 'lineHeight',
14
+ 'letterSpacing',
15
+ 'textAlign',
16
+ 'textDecoration',
17
+ 'textOverflow',
18
+ 'textTransform',
19
+ 'textShadow',
20
+ 'whiteSpace',
21
+ 'wordBreak',
22
+ ];
23
+ /**
24
+ * A style prop function that takes components props and returns text styles.
25
+ * If no `TextStyleProps` are found, it returns an empty object.
26
+ *
27
+ * @example
28
+ * // You'll most likely use `text-align` with low-level, styled components
29
+ * const BoxExample = () => (
30
+ * <Box textAlign="center">Hello, alignment!</Box>
31
+ * );
32
+ *
33
+ */
34
+ export function text(props) {
35
+ var _a;
36
+ var styles = {};
37
+ for (var key in props) {
38
+ if (textProps.includes(key)) {
39
+ var value = props[key];
40
+ styles = __assign(__assign({}, styles), (_a = {}, _a[key] = value, _a));
41
+ }
42
+ }
43
+ return styles;
44
+ }
@@ -99,7 +99,7 @@ export declare const Modal: import("../../common").ComponentM<import("../../dial
99
99
  hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
100
100
  };
101
101
  }> & {
102
- Body: import("../../common").ElementComponentM<"div", import("../..").BorderShorthandStyleProps & import("../..").BorderColorStyleProps & import("../..").BorderRadiusStyleProps & import("../..").BorderLineStyleProps & import("../..").BorderWidthStyleProps & import("../..").BorderLogicalStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../..").PositionStandardProps & import("../..").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps & React.HTMLAttributes<HTMLDivElement>, {
102
+ Body: import("../../common").ElementComponentM<"div", import("../..").BorderShorthandStyleProps & import("../..").BorderColorStyleProps & import("../..").BorderRadiusStyleProps & import("../..").BorderLineStyleProps & import("../..").BorderWidthStyleProps & import("../..").BorderLogicalStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").FontStyleProps & import("../..").LayoutStyleProps & import("../../layout/lib/utils/other").OtherStyleProps & import("../..").PositionStandardProps & import("../..").PositionLogicalProps & import("../../layout/lib/utils/space").SpaceStandardProps & import("../../layout/lib/utils/space").SpaceLogicalProps & import("../..").TextStyleProps & React.HTMLAttributes<HTMLDivElement>, {
103
103
  state: {
104
104
  stackRef: React.RefObject<HTMLDivElement>;
105
105
  targetRef: React.RefObject<HTMLButtonElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"AdditionalDetails.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/AdditionalDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AACxC,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAGjE,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACxE,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAuBD,eAAO,MAAM,iBAAiB,oEAK3B,sBAAsB,gBAQxB,CAAC"}
1
+ {"version":3,"file":"AdditionalDetails.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/AdditionalDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AACxC,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAGjE,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACxE,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAiBD,eAAO,MAAM,iBAAiB,oEAK3B,sBAAsB,gBAaxB,CAAC"}
@@ -21,22 +21,23 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import * as React from 'react';
24
- import { type, typeColors, space } from '@workday/canvas-kit-react/tokens';
24
+ import { type, space, typeColors } from '@workday/canvas-kit-react/tokens';
25
25
  import { accessibleHide, styled } from '@workday/canvas-kit-react/common';
26
26
  import { Flex } from '@workday/canvas-kit-react/layout';
27
27
  import { useLiveRegion } from './common/useLiveRegion';
28
28
  var StyledAdditionalDetails = styled(Flex)(function (_a) {
29
29
  var shouldHideDetails = _a.shouldHideDetails;
30
- var styles = __assign(__assign({}, type.levels.subtext.medium), { color: typeColors.hint });
31
30
  if (shouldHideDetails) {
32
- return __assign(__assign(__assign({}, styles), accessibleHide), { marginTop: space.zero });
31
+ return __assign(__assign({}, accessibleHide), { marginTop: space.zero });
33
32
  }
34
33
  else {
35
- return __assign(__assign({}, styles), { marginTop: space.xs });
34
+ return {
35
+ marginTop: space.xs,
36
+ };
36
37
  }
37
38
  });
38
39
  export var AdditionalDetails = function (_a) {
39
40
  var model = _a.model, children = _a.children, shouldAnnounceToScreenReader = _a.shouldAnnounceToScreenReader, elemProps = __rest(_a, ["model", "children", "shouldAnnounceToScreenReader"]);
40
41
  var liveRegionProps = useLiveRegion({ shouldAnnounceToScreenReader: shouldAnnounceToScreenReader });
41
- return (React.createElement(StyledAdditionalDetails, __assign({}, liveRegionProps, elemProps), typeof children === 'function' ? children(model) : children));
42
+ return (React.createElement(StyledAdditionalDetails, __assign({}, type.levels.subtext.medium, { color: typeColors.hint }, liveRegionProps, elemProps), typeof children === 'function' ? children(model) : children));
42
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../pagination/lib/Pagination/GoTo/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAGzC,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACrE,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;CAC1E;AAQD,eAAO,MAAM,SAAS,sCAAqC,cAAc,gBAMxE,CAAC"}
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../pagination/lib/Pagination/GoTo/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAGzC,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACrE,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;CAC1E;AAED,eAAO,MAAM,SAAS,sCAAqC,cAAc,gBAMxE,CAAC"}
@@ -21,10 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import * as React from 'react';
24
- import { type, typeColors } from '@workday/canvas-kit-react/tokens';
25
- import { styled } from '@workday/canvas-kit-react/common';
26
- var StyledLabel = styled('label')(__assign(__assign({}, type.levels.subtext.medium), { color: typeColors.hint, whiteSpace: 'nowrap' }));
24
+ import { LabelText } from '@workday/canvas-kit-react/text';
27
25
  export var GoToLabel = function (_a) {
28
26
  var model = _a.model, children = _a.children, elemProps = __rest(_a, ["model", "children"]);
29
- return (React.createElement(StyledLabel, __assign({}, elemProps), typeof children === 'function' ? children(model) : children));
27
+ return (React.createElement(LabelText, __assign({ typeLevel: "subtext.medium", variant: "hint", whiteSpace: "nowrap" }, elemProps), typeof children === 'function' ? children(model) : children));
30
28
  };
@@ -106,7 +106,7 @@ export declare const Popup: import("../../common").ComponentM<PopupProps & Parti
106
106
  hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
107
107
  };
108
108
  }>;
109
- 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>, {
109
+ 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>, {
110
110
  state: {
111
111
  stackRef: React.RefObject<HTMLDivElement>;
112
112
  targetRef: React.RefObject<HTMLButtonElement>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const PopupBody: 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>, {
2
+ export declare const PopupBody: 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>, {
3
3
  state: {
4
4
  stackRef: React.RefObject<HTMLDivElement>;
5
5
  targetRef: React.RefObject<HTMLButtonElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"PopupCard.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AAEpD,OAAO,EAKL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAQ,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAKxE,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAChG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAmCD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAgCpB,CAAC"}
1
+ {"version":3,"file":"PopupCard.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AAEpD,OAAO,EAKL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAQ,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAKxE,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAChG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAmCD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAiCpB,CAAC"}
@@ -36,7 +36,7 @@ var popupAnimation = function (transformOrigin) {
36
36
  var translate = getTranslateFromOrigin(transformOrigin, space.xxs);
37
37
  return keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n opacity: 0;\n transform: translate(", "px, ", "px);\n }\n 100% {\n opacity: 1;\n transform: translate(0);\n }\n "], ["\n 0% {\n opacity: 0;\n transform: translate(", "px, ", "px);\n }\n 100% {\n opacity: 1;\n transform: translate(0);\n }\n "])), translate.x, translate.y);
38
38
  };
39
- var StyledPopupCard = styled(Card)(type.levels.subtext.large, function (_a) {
39
+ var StyledPopupCard = styled(Card)(function (_a) {
40
40
  var transformOrigin = _a.transformOrigin;
41
41
  if (transformOrigin == null) {
42
42
  return {};
@@ -64,6 +64,6 @@ export var PopupCard = createSubcomponent('div')({
64
64
  // As is a Stack that will render an element of `Element`
65
65
  var As = useConstant(function () { return Stack.as(Element); });
66
66
  return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth: 5, maxWidth: "calc(100vw - " + space.l + ")", spacing: 0, flexDirection: "column", minHeight: 0, maxHeight: "calc(100vh - " + (elemProps.margin ? space[elemProps.margin] || elemProps.margin : space.xl) + " * 2)", overflowY: "auto" // force IE11 to limit the flex size of the card. Without this, the body isn't allowed to overflow properly: https://github.com/philipwalton/flexbugs/issues/216#issuecomment-453053557
67
- }, elemProps), children));
67
+ }, type.levels.subtext.large, elemProps), children));
68
68
  });
69
69
  var templateObject_1;
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../radio/lib/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAML,SAAS,EAEV,MAAM,kCAAkC,CAAC;AAS1C,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAkPD,eAAO,MAAM,KAAK,8DAgDhB,CAAC"}
1
+ {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../radio/lib/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAML,SAAS,EAEV,MAAM,kCAAkC,CAAC;AAI1C,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAmOD,eAAO,MAAM,KAAK,8DAqDhB,CAAC"}
@@ -22,7 +22,8 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import * as React from 'react';
24
24
  import { createComponent, focusRing, mouseFocusBehavior, styled, useUniqueId, } 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
+ import { LabelText } from '@workday/canvas-kit-react/text';
26
27
  var radioBorderRadius = 9;
27
28
  var radioDot = 8;
28
29
  var radioHeight = 18;
@@ -201,18 +202,6 @@ var RadioCheck = styled('div')({
201
202
  transform: checked ? 'scale(1)' : 'scale(0.5)',
202
203
  });
203
204
  });
204
- var RadioLabel = styled('label')(__assign(__assign({}, canvas.type.levels.subtext.large), { paddingLeft: radioLabelDistance }), function (_a) {
205
- var variant = _a.variant;
206
- return (variant === 'inverse' ? { color: colors.frenchVanilla100 } : undefined);
207
- }, function (_a) {
208
- var disabled = _a.disabled, variant = _a.variant;
209
- return disabled
210
- ? {
211
- color: variant === 'inverse' ? colors.frenchVanilla100 : inputColors.disabled.text,
212
- opacity: variant === 'inverse' ? '.4' : '1',
213
- }
214
- : { cursor: 'pointer' };
215
- });
216
205
  export var Radio = createComponent('input')({
217
206
  displayName: 'Radio',
218
207
  Component: function (_a, ref, Element) {
@@ -224,6 +213,6 @@ export var Radio = createComponent('input')({
224
213
  React.createElement(RadioRipple, { variant: variant }),
225
214
  React.createElement(RadioBackground, { checked: checked, disabled: disabled, variant: variant },
226
215
  React.createElement(RadioCheck, { checked: checked, variant: variant }))),
227
- label && (React.createElement(RadioLabel, { htmlFor: inputId, disabled: disabled, variant: variant }, label))));
216
+ label && (React.createElement(LabelText, { paddingLeft: radioLabelDistance, htmlFor: inputId, disabled: disabled, variant: variant }, label))));
228
217
  },
229
218
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanel.d.ts","sourceRoot":"","sources":["../../../../side-panel/lib/SidePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAsB,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAIxF,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,sBAAsB;IAChC,IAAI,IAAA;IACJ,KAAK,IAAA;CACN;AAED,oBAAY,wBAAwB;IAClC,KAAK,IAAA;IACL,WAAW,IAAA;IACX,IAAI,IAAA;CACL;AA6FD,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC5E,MAAM,CAAC,aAAa,gCAA0B;IAC9C,MAAM,CAAC,eAAe,kCAA4B;gBAEtC,KAAK,EAAE,cAAc;IAKjC,KAAK;;MAEH;IAEK,iBAAiB;IAGjB,oBAAoB;IAIpB,MAAM;IA4Cb,OAAO,CAAC,YAAY,CAWlB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,qBAAqB,CAS3B;CACH"}
1
+ {"version":3,"file":"SidePanel.d.ts","sourceRoot":"","sources":["../../../../side-panel/lib/SidePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAgB,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAKlF,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,sBAAsB;IAChC,IAAI,IAAA;IACJ,KAAK,IAAA;CACN;AAED,oBAAY,wBAAwB;IAClC,KAAK,IAAA;IACL,WAAW,IAAA;IACX,IAAI,IAAA;CACL;AAwFD,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC5E,MAAM,CAAC,aAAa,gCAA0B;IAC9C,MAAM,CAAC,eAAe,kCAA4B;gBAEtC,KAAK,EAAE,cAAc;IAKjC,KAAK;;MAEH;IAEK,iBAAiB;IAGjB,oBAAoB;IAIpB,MAAM;IAgDb,OAAO,CAAC,YAAY,CAWlB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,qBAAqB,CAS3B;CACH"}
@@ -36,9 +36,10 @@ var __rest = (this && this.__rest) || function (s, e) {
36
36
  import * as React from 'react';
37
37
  import styled from '@emotion/styled';
38
38
  import throttle from 'lodash/throttle';
39
- import { colors, space, type } from '@workday/canvas-kit-react/tokens';
39
+ import { colors, space } from '@workday/canvas-kit-react/tokens';
40
40
  import { TertiaryButton } from '@workday/canvas-kit-react/button';
41
41
  import { chevronLeftIcon, chevronRightIcon } from '@workday/canvas-system-icons-web';
42
+ import { Heading } from '@workday/canvas-kit-react/text';
42
43
  export var SidePanelOpenDirection;
43
44
  (function (SidePanelOpenDirection) {
44
45
  SidePanelOpenDirection[SidePanelOpenDirection["Left"] = 0] = "Left";
@@ -51,7 +52,6 @@ export var SidePanelBackgroundColor;
51
52
  SidePanelBackgroundColor[SidePanelBackgroundColor["Gray"] = 2] = "Gray";
52
53
  })(SidePanelBackgroundColor || (SidePanelBackgroundColor = {}));
53
54
  var closedWidth = space.xxl;
54
- var Header = styled('h2')(__assign(__assign({}, type.levels.heading.small), { marginTop: space.zero }));
55
55
  var SidePanelContainer = styled('div')({
56
56
  overflow: 'hidden',
57
57
  height: '100%',
@@ -176,7 +176,7 @@ var SidePanel = /** @class */ (function (_super) {
176
176
  var _a = this.props, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? SidePanelBackgroundColor.White : _b, _c = _a.openNavigationAriaLabel, openNavigationAriaLabel = _c === void 0 ? 'open navigation' : _c, _d = _a.closeNavigationAriaLabel, closeNavigationAriaLabel = _d === void 0 ? 'close navigation' : _d, _e = _a.openDirection, openDirection = _e === void 0 ? SidePanelOpenDirection.Left : _e, _f = _a.breakpoint, breakpoint = _f === void 0 ? 768 : _f, _g = _a.openWidth, openWidth = _g === void 0 ? 300 : _g, header = _a.header, onToggleClick = _a.onToggleClick, open = _a.open, padding = _a.padding, onBreakpointChange = _a.onBreakpointChange, elemProps = __rest(_a, ["backgroundColor", "openNavigationAriaLabel", "closeNavigationAriaLabel", "openDirection", "breakpoint", "openWidth", "header", "onToggleClick", "open", "padding", "onBreakpointChange"]);
177
177
  return (React.createElement(SidePanelContainer, __assign({ role: "region", padding: padding, openDirection: openDirection, openWidth: openWidth, backgroundColor: backgroundColor, open: open }, elemProps),
178
178
  React.createElement(ChildrenContainer, { open: open, openWidth: openWidth },
179
- header && open ? React.createElement(Header, null, header) : null,
179
+ header && open ? (React.createElement(Heading, { as: "h2", size: "small", marginTop: "zero" }, header)) : null,
180
180
  this.props.children),
181
181
  React.createElement(SidePanelFooter, { openWidth: openWidth, open: open }, onToggleClick && (React.createElement(ToggleButton, { openDirection: openDirection, "aria-label": open ? closeNavigationAriaLabel : openNavigationAriaLabel, onClick: this.onToggleClick, icon: this.toggleButtonDirection(open, openDirection) })))));
182
182
  };
@@ -53,7 +53,7 @@ export interface TabsItemProps extends ExtractProps<typeof Box, never>, Partial<
53
53
  */
54
54
  tabIndex?: number;
55
55
  }
56
- export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("../../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 & Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "name" | "style" | "ref" | "form" | "slot" | "title" | "dir" | "value" | "children" | "hidden" | "type" | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & {
56
+ export declare const StyledTabItem: import("@emotion/styled").StyledComponent<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 & Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "name" | "style" | "ref" | "form" | "slot" | "title" | "dir" | "value" | "children" | "hidden" | "type" | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & {
57
57
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
58
58
  } & {
59
59
  theme?: import("@emotion/react").Theme | undefined;
@@ -0,0 +1,4 @@
1
+ export * from './lib/Text';
2
+ export * from './lib/TypeLevelComponents';
3
+ export * from './lib/LabelText';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './lib/Text';
2
+ export * from './lib/TypeLevelComponents';
3
+ export * from './lib/LabelText';
@@ -0,0 +1,8 @@
1
+ import { Property } from 'csstype';
2
+ import { TextProps } from '@workday/canvas-kit-react/text';
3
+ export interface TypeLabelProps extends TextProps {
4
+ cursor?: Property.Cursor;
5
+ disabled?: boolean;
6
+ }
7
+ export declare const LabelText: import("../../common").ElementComponent<"label", TypeLabelProps>;
8
+ //# sourceMappingURL=LabelText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LabelText.d.ts","sourceRoot":"","sources":["../../../../text/lib/LabelText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAO,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAG/D,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAUD,eAAO,MAAM,SAAS,kEAKpB,CAAC"}
@@ -0,0 +1,29 @@
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
+ import * as React from 'react';
13
+ import { createComponent, styled } from '@workday/canvas-kit-react/common';
14
+ import { Text } from '@workday/canvas-kit-react/text';
15
+ import { inputColors } from '@workday/canvas-kit-react/tokens';
16
+ var StyledLabel = styled(Text.as('label'))(function (_a) {
17
+ var cursor = _a.cursor, disabled = _a.disabled, variant = _a.variant;
18
+ return ({
19
+ color: disabled && variant !== 'inverse' ? inputColors.disabled.text : undefined,
20
+ cursor: cursor && !disabled ? cursor : 'default',
21
+ opacity: disabled && variant === 'inverse' ? '.4' : '1',
22
+ });
23
+ });
24
+ export var LabelText = createComponent('label')({
25
+ displayName: 'Label',
26
+ Component: function (elemProps, ref, Element) {
27
+ return React.createElement(StyledLabel, __assign({ ref: ref, as: Element, typeLevel: "subtext.large" }, elemProps));
28
+ },
29
+ });
@@ -0,0 +1,14 @@
1
+ import { CanvasTypeHierarchy, CanvasTypeVariants } from '@workday/canvas-kit-react/tokens';
2
+ import { BoxProps } from '@workday/canvas-kit-react/layout';
3
+ export interface TextProps extends BoxProps {
4
+ /**
5
+ * Type token as string with level and size separated by dot.
6
+ */
7
+ typeLevel?: `${keyof CanvasTypeHierarchy}.${'large' | 'medium' | 'small'}`;
8
+ /**
9
+ * Type variant token names: `error`, `hint` or `inverse`.
10
+ */
11
+ variant?: keyof CanvasTypeVariants;
12
+ }
13
+ export declare const Text: import("../../common").ElementComponent<"span", TextProps>;
14
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../text/lib/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAC/F,OAAO,EAAM,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAE/D,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;OAEG;IACF,SAAS,CAAC,EAAE,GAAG,MAAM,mBAAmB,IAAI,OAAO,GAAC,QAAQ,GAAC,OAAO,EAAE,CAAC;IACxE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,kBAAkB,CAAC;CACpC;AA2CD,eAAO,MAAM,IAAI,4DAOf,CAAC"}