@workday/canvas-kit-react 12.4.0-1015-next.0 → 13.0.0-alpha.1009-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/lib/ExternalHyperlink.tsx +37 -32
- package/button/lib/Hyperlink.tsx +1 -1
- package/combobox/lib/hooks/useComboboxInputConstrained.ts +1 -0
- package/dist/commonjs/avatar/lib/Avatar.js +21 -21
- package/dist/commonjs/badge/lib/CountBadge.js +3 -3
- package/dist/commonjs/button/lib/BaseButton.js +21 -21
- package/dist/commonjs/button/lib/DeleteButton.js +1 -1
- package/dist/commonjs/button/lib/ExternalHyperlink.d.ts +19 -2
- package/dist/commonjs/button/lib/ExternalHyperlink.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ExternalHyperlink.js +10 -21
- package/dist/commonjs/button/lib/Hyperlink.d.ts +18 -0
- package/dist/commonjs/button/lib/Hyperlink.d.ts.map +1 -1
- package/dist/commonjs/button/lib/Hyperlink.js +6 -6
- package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
- package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.js +18 -18
- package/dist/commonjs/card/lib/Card.js +1 -1
- package/dist/commonjs/card/lib/CardBody.js +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.js +3 -3
- package/dist/commonjs/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/commonjs/collection/lib/ListBox.js +3 -3
- package/dist/commonjs/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/commonjs/combobox/lib/hooks/useComboboxInputConstrained.d.ts.map +1 -1
- package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldField.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/commonjs/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldHint.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +6 -6
- package/dist/commonjs/form-field/lib/formFieldStencil.js +8 -8
- package/dist/commonjs/icon/lib/AccentIcon.js +2 -2
- package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +2 -2
- package/dist/commonjs/icon/lib/Svg.js +2 -2
- package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
- package/dist/commonjs/loading-dots/lib/LoadingDots.js +2 -2
- package/dist/commonjs/menu/lib/MenuCard.js +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +1 -1
- package/dist/commonjs/menu/lib/MenuList.js +3 -3
- package/dist/commonjs/menu/lib/MenuOption.js +1 -1
- package/dist/commonjs/modal/lib/ModalBody.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/modal/lib/ModalHeading.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.js +2 -2
- package/dist/commonjs/popup/lib/PopupBody.js +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +2 -2
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
- package/dist/commonjs/select/lib/SelectCard.js +1 -1
- package/dist/commonjs/select/lib/SelectInput.js +3 -3
- package/dist/commonjs/skeleton/index.d.ts +4 -1
- package/dist/commonjs/skeleton/index.d.ts.map +1 -1
- package/dist/commonjs/skeleton/index.js +22 -3
- package/dist/{es6/skeleton/lib/skeleton.d.ts → commonjs/skeleton/lib/Skeleton.d.ts} +5 -4
- package/dist/commonjs/skeleton/lib/Skeleton.d.ts.map +1 -0
- package/dist/commonjs/skeleton/lib/{skeleton.js → Skeleton.js} +14 -27
- package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.d.ts +29 -0
- package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.d.ts.map +1 -0
- package/dist/commonjs/skeleton/lib/parts/{skeletonHeader.js → SkeletonHeader.js} +17 -4
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.d.ts +36 -0
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.d.ts.map +1 -0
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.js +50 -0
- package/dist/{es6/skeleton/lib/parts/skeletonText.d.ts → commonjs/skeleton/lib/parts/SkeletonText.d.ts} +7 -2
- package/dist/commonjs/skeleton/lib/parts/SkeletonText.d.ts.map +1 -0
- package/dist/commonjs/skeleton/lib/parts/{skeletonText.js → SkeletonText.js} +15 -25
- package/dist/commonjs/switch/lib/Switch.js +7 -7
- package/dist/commonjs/table/lib/Table.js +1 -1
- package/dist/commonjs/table/lib/TableBody.js +1 -1
- package/dist/commonjs/table/lib/TableCaption.js +1 -1
- package/dist/commonjs/table/lib/TableCell.js +1 -1
- package/dist/commonjs/table/lib/TableFooter.js +1 -1
- package/dist/commonjs/table/lib/TableHead.js +1 -1
- package/dist/commonjs/table/lib/TableHeader.js +1 -1
- package/dist/commonjs/table/lib/TableRow.js +1 -1
- package/dist/commonjs/text/lib/LabelText.js +6 -6
- package/dist/commonjs/text/lib/Text.js +16 -16
- package/dist/commonjs/text/lib/TypeLevelComponents.js +4 -4
- package/dist/commonjs/text-area/lib/TextArea.js +5 -5
- package/dist/commonjs/text-input/lib/InputGroup.js +6 -6
- package/dist/commonjs/text-input/lib/TextInput.js +5 -5
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/toast/lib/ToastBody.js +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastMessage.js +1 -1
- package/dist/commonjs/tooltip/lib/Tooltip.d.ts +2 -13
- package/dist/commonjs/tooltip/lib/Tooltip.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/useTooltip.d.ts +3 -4
- package/dist/commonjs/tooltip/lib/useTooltip.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/useTooltip.js +0 -1
- package/dist/es6/avatar/lib/Avatar.js +21 -21
- package/dist/es6/badge/lib/CountBadge.js +3 -3
- package/dist/es6/button/lib/BaseButton.js +21 -21
- package/dist/es6/button/lib/DeleteButton.js +1 -1
- package/dist/es6/button/lib/ExternalHyperlink.d.ts +19 -2
- package/dist/es6/button/lib/ExternalHyperlink.d.ts.map +1 -1
- package/dist/es6/button/lib/ExternalHyperlink.js +12 -23
- package/dist/es6/button/lib/Hyperlink.d.ts +18 -0
- package/dist/es6/button/lib/Hyperlink.d.ts.map +1 -1
- package/dist/es6/button/lib/Hyperlink.js +4 -4
- package/dist/es6/button/lib/PrimaryButton.js +2 -2
- package/dist/es6/button/lib/SecondaryButton.js +2 -2
- package/dist/es6/button/lib/TertiaryButton.js +18 -18
- package/dist/es6/card/lib/Card.js +1 -1
- package/dist/es6/card/lib/CardBody.js +1 -1
- package/dist/es6/card/lib/CardHeading.js +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.js +3 -3
- package/dist/es6/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/es6/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/es6/collection/lib/ListBox.js +3 -3
- package/dist/es6/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/es6/combobox/lib/hooks/useComboboxInputConstrained.d.ts.map +1 -1
- package/dist/es6/common/lib/AccessibleHide.js +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +1 -1
- package/dist/es6/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/es6/form-field/lib/FormFieldField.js +1 -1
- package/dist/es6/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/es6/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/es6/form-field/lib/FormFieldHint.js +3 -3
- package/dist/es6/form-field/lib/FormFieldLabel.js +6 -6
- package/dist/es6/form-field/lib/formFieldStencil.js +8 -8
- package/dist/es6/icon/lib/AccentIcon.js +2 -2
- package/dist/es6/icon/lib/AppletIcon.js +1 -1
- package/dist/es6/icon/lib/Graphic.js +2 -2
- package/dist/es6/icon/lib/Svg.js +2 -2
- package/dist/es6/icon/lib/SystemIcon.js +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
- package/dist/es6/loading-dots/lib/LoadingDots.js +2 -2
- package/dist/es6/menu/lib/MenuCard.js +1 -1
- package/dist/es6/menu/lib/MenuItem.js +1 -1
- package/dist/es6/menu/lib/MenuList.js +3 -3
- package/dist/es6/menu/lib/MenuOption.js +1 -1
- package/dist/es6/modal/lib/ModalBody.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/modal/lib/ModalHeading.js +1 -1
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/es6/modal/lib/ModalOverlay.js +2 -2
- package/dist/es6/popup/lib/PopupBody.js +1 -1
- package/dist/es6/popup/lib/PopupCard.js +2 -2
- package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/es6/popup/lib/PopupHeading.js +1 -1
- package/dist/es6/select/lib/SelectCard.js +1 -1
- package/dist/es6/select/lib/SelectInput.js +3 -3
- package/dist/es6/skeleton/index.d.ts +4 -1
- package/dist/es6/skeleton/index.d.ts.map +1 -1
- package/dist/es6/skeleton/index.js +4 -1
- package/dist/{commonjs/skeleton/lib/skeleton.d.ts → es6/skeleton/lib/Skeleton.d.ts} +5 -4
- package/dist/es6/skeleton/lib/Skeleton.d.ts.map +1 -0
- package/dist/es6/skeleton/lib/{skeleton.js → Skeleton.js} +10 -20
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.d.ts +29 -0
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.d.ts.map +1 -0
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.js +21 -0
- package/dist/es6/skeleton/lib/parts/SkeletonShape.d.ts +36 -0
- package/dist/es6/skeleton/lib/parts/SkeletonShape.d.ts.map +1 -0
- package/dist/es6/skeleton/lib/parts/SkeletonShape.js +24 -0
- package/dist/{commonjs/skeleton/lib/parts/skeletonText.d.ts → es6/skeleton/lib/parts/SkeletonText.d.ts} +7 -2
- package/dist/es6/skeleton/lib/parts/SkeletonText.d.ts.map +1 -0
- package/dist/es6/skeleton/lib/parts/SkeletonText.js +19 -0
- package/dist/es6/switch/lib/Switch.js +7 -7
- package/dist/es6/table/lib/Table.js +1 -1
- package/dist/es6/table/lib/TableBody.js +1 -1
- package/dist/es6/table/lib/TableCaption.js +1 -1
- package/dist/es6/table/lib/TableCell.js +1 -1
- package/dist/es6/table/lib/TableFooter.js +1 -1
- package/dist/es6/table/lib/TableHead.js +1 -1
- package/dist/es6/table/lib/TableHeader.js +1 -1
- package/dist/es6/table/lib/TableRow.js +1 -1
- package/dist/es6/text/lib/LabelText.js +6 -6
- package/dist/es6/text/lib/Text.js +16 -16
- package/dist/es6/text/lib/TypeLevelComponents.js +4 -4
- package/dist/es6/text-area/lib/TextArea.js +5 -5
- package/dist/es6/text-input/lib/InputGroup.js +6 -6
- package/dist/es6/text-input/lib/TextInput.js +5 -5
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/toast/lib/ToastBody.js +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/es6/toast/lib/ToastIcon.js +1 -1
- package/dist/es6/toast/lib/ToastMessage.js +1 -1
- package/dist/es6/tooltip/lib/Tooltip.d.ts +2 -13
- package/dist/es6/tooltip/lib/Tooltip.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/useTooltip.d.ts +3 -4
- package/dist/es6/tooltip/lib/useTooltip.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/useTooltip.js +0 -1
- package/package.json +4 -4
- package/skeleton/index.ts +4 -1
- package/skeleton/lib/{skeleton.tsx → Skeleton.tsx} +19 -20
- package/skeleton/lib/parts/SkeletonHeader.tsx +68 -0
- package/skeleton/lib/parts/SkeletonShape.tsx +68 -0
- package/skeleton/lib/parts/SkeletonText.tsx +59 -0
- package/tooltip/lib/Tooltip.tsx +2 -13
- package/tooltip/lib/useTooltip.tsx +3 -4
- package/dist/commonjs/skeleton/lib/parts/skeletonHeader.d.ts +0 -19
- package/dist/commonjs/skeleton/lib/parts/skeletonHeader.d.ts.map +0 -1
- package/dist/commonjs/skeleton/lib/parts/skeletonShape.d.ts +0 -24
- package/dist/commonjs/skeleton/lib/parts/skeletonShape.d.ts.map +0 -1
- package/dist/commonjs/skeleton/lib/parts/skeletonShape.js +0 -44
- package/dist/commonjs/skeleton/lib/parts/skeletonText.d.ts.map +0 -1
- package/dist/commonjs/skeleton/lib/skeleton.d.ts.map +0 -1
- package/dist/es6/skeleton/lib/parts/skeletonHeader.d.ts +0 -19
- package/dist/es6/skeleton/lib/parts/skeletonHeader.d.ts.map +0 -1
- package/dist/es6/skeleton/lib/parts/skeletonHeader.js +0 -8
- package/dist/es6/skeleton/lib/parts/skeletonShape.d.ts +0 -24
- package/dist/es6/skeleton/lib/parts/skeletonShape.d.ts.map +0 -1
- package/dist/es6/skeleton/lib/parts/skeletonShape.js +0 -15
- package/dist/es6/skeleton/lib/parts/skeletonText.d.ts.map +0 -1
- package/dist/es6/skeleton/lib/parts/skeletonText.js +0 -26
- package/dist/es6/skeleton/lib/skeleton.d.ts.map +0 -1
- package/skeleton/lib/parts/skeletonHeader.tsx +0 -48
- package/skeleton/lib/parts/skeletonShape.tsx +0 -63
- package/skeleton/lib/parts/skeletonText.tsx +0 -65
|
@@ -4,17 +4,6 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
4
4
|
/**
|
|
5
5
|
* This should be a string in most cases. HTML is supported, but only text is understood
|
|
6
6
|
* by assistive technology. This is true for both `label` and `describe` modes.
|
|
7
|
-
*
|
|
8
|
-
* **Note:** If you use `description` type and want to pass `jsx`, it **must* be inline and **not** a component to ensure the inner text is properly translated.
|
|
9
|
-
*
|
|
10
|
-
* ```jsx
|
|
11
|
-
* // The text will be understood as: You must accept terms and conditions
|
|
12
|
-
* <Tooltip type="description" title={<span>You<i>must</i> accept terms and conditions</span>}/>
|
|
13
|
-
*
|
|
14
|
-
* // This will render a string including the html and will not be properly understood by voice over.
|
|
15
|
-
* const MyComponent = () => <span>You<i>must</i> accept terms and conditions</span>
|
|
16
|
-
* <Tooltip type="description" title={MyComponent/>
|
|
17
|
-
* ```
|
|
18
7
|
*/
|
|
19
8
|
title: React.ReactNode;
|
|
20
9
|
/**
|
|
@@ -44,7 +33,7 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
44
33
|
* - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
|
|
45
34
|
* `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButtons that render an icon or
|
|
46
35
|
* Ellipsis tooltips.
|
|
47
|
-
* -
|
|
36
|
+
* - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
|
|
48
37
|
* information about the target.
|
|
49
38
|
* - `muted`: No effort is made to make the tooltip accessible to screen readers. Use if the
|
|
50
39
|
* tooltip contents are not useful to a screen reader or if you have handled accessibility of
|
|
@@ -54,7 +43,7 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
54
43
|
* Consider an alternate way to inform a user of additional important information.
|
|
55
44
|
* @default 'label'
|
|
56
45
|
*/
|
|
57
|
-
type?: 'label' | 'describe' | 'muted'
|
|
46
|
+
type?: 'label' | 'describe' | 'muted';
|
|
58
47
|
/**
|
|
59
48
|
* Amount of time (in ms) to delay before showing the tooltip
|
|
60
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACvF
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACvF;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;IACjC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiBD,eAAO,MAAM,OAAO,kFA0ClB,CAAC"}
|
|
@@ -10,17 +10,17 @@ export declare function useTooltip<T extends Element = Element>({ type, titleTex
|
|
|
10
10
|
* - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
|
|
11
11
|
* `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButton that renders an icon or
|
|
12
12
|
* Ellipsis tooltips.
|
|
13
|
-
* -
|
|
13
|
+
* - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
|
|
14
|
+
* information about the target.
|
|
14
15
|
* - `muted`: No effort is made to make the tooltip accessible to screen readers. Use if the
|
|
15
16
|
* tooltip contents are not useful to a screen reader or if you have handled accessibility of
|
|
16
17
|
* the tooltip yourself.
|
|
17
|
-
* - `description`: Sets `aria-description` strings for the wrapped element. Use if the tooltip has additional about the target
|
|
18
18
|
*
|
|
19
19
|
* **Note**: Assistive technology may ignore `describe` techniques based on verbosity settings.
|
|
20
20
|
* Consider an alternate way to inform a user of additional important information.
|
|
21
21
|
* @default 'label'
|
|
22
22
|
*/
|
|
23
|
-
type?: 'label' | 'describe' | 'muted'
|
|
23
|
+
type?: 'label' | 'describe' | 'muted';
|
|
24
24
|
/**
|
|
25
25
|
* The content of the `aria-label` if `type` is `label.
|
|
26
26
|
*/
|
|
@@ -37,7 +37,6 @@ export declare function useTooltip<T extends Element = Element>({ type, titleTex
|
|
|
37
37
|
/** Mix these properties into the target element. **Must be an Element** */
|
|
38
38
|
targetProps: {
|
|
39
39
|
'aria-describedby': string | undefined;
|
|
40
|
-
'aria-description': string | undefined;
|
|
41
40
|
'aria-label': string | undefined;
|
|
42
41
|
onMouseEnter: (event: React.SyntheticEvent) => void;
|
|
43
42
|
onMouseLeave: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EACtD,IAAc,EACd,SAAc,EACd,SAAe,EACf,SAAe,GAChB,GAAE;IACD;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EACtD,IAAc,EACd,SAAc,EACd,SAAe,EACf,SAAe,GAChB,GAAE;IACD;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACf;IA+DF,2EAA2E;;;;8BA7C5C,MAAM,cAAc;;6BAazB,gBAAgB;yBARpB,gBAAgB;;;IA0CtC,uDAAuD;;;;;;IAMvD,iEAAiE;;;;;;;EAQpE"}
|
|
@@ -78,7 +78,6 @@ export function useTooltip({ type = 'label', titleText = '', showDelay = 300, hi
|
|
|
78
78
|
const targetProps = {
|
|
79
79
|
// extra description of the target element for assistive technology
|
|
80
80
|
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
81
|
-
'aria-description': type === 'description' ? titleText : undefined,
|
|
82
81
|
// This will replace the accessible name of the target element
|
|
83
82
|
'aria-label': type === 'label' ? titleText : undefined,
|
|
84
83
|
onMouseEnter: onOpenFromTarget,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0-alpha.1009-next.0",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@emotion/styled": "^11.6.0",
|
|
50
50
|
"@popperjs/core": "^2.5.4",
|
|
51
51
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^
|
|
53
|
-
"@workday/canvas-kit-styling": "^
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^13.0.0-alpha.1009-next.0",
|
|
53
|
+
"@workday/canvas-kit-styling": "^13.0.0-alpha.1009-next.0",
|
|
54
54
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
55
55
|
"@workday/canvas-tokens-web": "^2.1.0",
|
|
56
56
|
"@workday/design-assets-types": "^0.2.8",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
67
67
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "86905802e45baf8c7c06c3f673597dc2792c6dc5"
|
|
70
70
|
}
|
package/skeleton/index.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {keyframes} from '@emotion/react';
|
|
3
|
-
import styled from '@emotion/styled';
|
|
4
2
|
|
|
5
|
-
import {accessibleHide, createComponent
|
|
3
|
+
import {accessibleHide, createComponent} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {createStencil, handleCsProp, keyframes} from '@workday/canvas-kit-styling';
|
|
6
5
|
|
|
7
|
-
import {SkeletonHeader} from './parts/
|
|
8
|
-
import {SkeletonShape} from './parts/
|
|
9
|
-
import {SkeletonText} from './parts/
|
|
6
|
+
import {SkeletonHeader} from './parts/SkeletonHeader';
|
|
7
|
+
import {SkeletonShape} from './parts/SkeletonShape';
|
|
8
|
+
import {SkeletonText} from './parts/SkeletonText';
|
|
10
9
|
|
|
11
10
|
export interface SkeletonProps {
|
|
12
11
|
/**
|
|
@@ -22,21 +21,22 @@ export interface SkeletonProps {
|
|
|
22
21
|
children?: React.ReactNode;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
const AccessibleHide = styled('div')(accessibleHide);
|
|
26
|
-
|
|
27
24
|
const fade = keyframes({
|
|
28
25
|
from: {opacity: 0.4},
|
|
29
26
|
to: {opacity: 1},
|
|
30
27
|
});
|
|
31
28
|
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
export const skeletonStencil = createStencil({
|
|
30
|
+
base: () => ({
|
|
31
|
+
animation: `${fade} 0.8s linear infinite alternate`,
|
|
32
|
+
position: 'relative',
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
height: '100%',
|
|
35
|
+
width: '100%',
|
|
36
|
+
'& [data-part="skeleton-accessible-hide"]': {
|
|
37
|
+
...accessibleHide,
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -59,11 +59,10 @@ export const Skeleton = createComponent('div')({
|
|
|
59
59
|
ref,
|
|
60
60
|
Element
|
|
61
61
|
) => (
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
62
|
+
<Element ref={ref} {...handleCsProp(elemProps, skeletonStencil())}>
|
|
63
|
+
<div data-part="skeleton-accessible-hide">{loadingAriaLabel}</div>
|
|
65
64
|
<div aria-hidden={true}>{children}</div>
|
|
66
|
-
</
|
|
65
|
+
</Element>
|
|
67
66
|
),
|
|
68
67
|
subComponents: {
|
|
69
68
|
/**
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {
|
|
5
|
+
createStencil,
|
|
6
|
+
handleCsProp,
|
|
7
|
+
px2rem,
|
|
8
|
+
cssVar,
|
|
9
|
+
calc,
|
|
10
|
+
CSProps,
|
|
11
|
+
} from '@workday/canvas-kit-styling';
|
|
12
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
13
|
+
import {SkeletonShape} from './SkeletonShape';
|
|
14
|
+
|
|
15
|
+
export interface SkeletonHeaderProps extends CSProps {
|
|
16
|
+
/**
|
|
17
|
+
* The background color of the skeleton
|
|
18
|
+
* @default `system.color.bg.alt.strong`
|
|
19
|
+
*/
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The height of the shape in `px` or `%`.
|
|
23
|
+
* @default 28px
|
|
24
|
+
*/
|
|
25
|
+
height?: number | string;
|
|
26
|
+
/**
|
|
27
|
+
* The width of the shape in `px` or `%`.
|
|
28
|
+
* @default 100%
|
|
29
|
+
*/
|
|
30
|
+
width?: number | string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const skeletonHeaderStencil = createStencil({
|
|
34
|
+
vars: {
|
|
35
|
+
width: '',
|
|
36
|
+
height: '',
|
|
37
|
+
backgroundColor: '',
|
|
38
|
+
},
|
|
39
|
+
base: ({width, backgroundColor, height}) => ({
|
|
40
|
+
backgroundColor: cssVar(backgroundColor, system.color.bg.alt.strong),
|
|
41
|
+
borderRadius: 0,
|
|
42
|
+
height: cssVar(height, calc.multiply(system.space.x1, 7)),
|
|
43
|
+
width: width,
|
|
44
|
+
marginBottom: system.space.x4,
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const SkeletonHeader = createComponent('div')<SkeletonHeaderProps>({
|
|
49
|
+
displayName: 'Skeleton.Header',
|
|
50
|
+
Component: (
|
|
51
|
+
{width = '100%', backgroundColor, height, ...elemProps}: SkeletonHeaderProps,
|
|
52
|
+
ref,
|
|
53
|
+
Element
|
|
54
|
+
) => (
|
|
55
|
+
<SkeletonShape
|
|
56
|
+
ref={ref}
|
|
57
|
+
as={Element}
|
|
58
|
+
{...handleCsProp(
|
|
59
|
+
elemProps,
|
|
60
|
+
skeletonHeaderStencil({
|
|
61
|
+
width: typeof width === 'number' ? px2rem(width) : width,
|
|
62
|
+
backgroundColor: backgroundColor,
|
|
63
|
+
height: typeof height === 'number' ? px2rem(height) : height,
|
|
64
|
+
})
|
|
65
|
+
)}
|
|
66
|
+
/>
|
|
67
|
+
),
|
|
68
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {createStencil, CSProps, cssVar, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
+
|
|
7
|
+
export interface SkeletonShapeProps extends CSProps {
|
|
8
|
+
/**
|
|
9
|
+
* The width of the shape in `px` or `%`.
|
|
10
|
+
* @default 100%
|
|
11
|
+
*/
|
|
12
|
+
width?: number | string;
|
|
13
|
+
/**
|
|
14
|
+
* The height of the shape in `px` or `%`.
|
|
15
|
+
* @default 100%
|
|
16
|
+
*/
|
|
17
|
+
height?: number | string;
|
|
18
|
+
/**
|
|
19
|
+
* The borderRadius of the shape in `px` or `%`.
|
|
20
|
+
* @default 0
|
|
21
|
+
*/
|
|
22
|
+
borderRadius?: number | string;
|
|
23
|
+
/**
|
|
24
|
+
* The background color of the skeleton
|
|
25
|
+
* @default `system.color.bg.alt.strong`
|
|
26
|
+
*/
|
|
27
|
+
backgroundColor?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const skeletonShapeStencil = createStencil({
|
|
31
|
+
vars: {
|
|
32
|
+
width: '',
|
|
33
|
+
height: '',
|
|
34
|
+
borderRadius: '',
|
|
35
|
+
backgroundColor: '',
|
|
36
|
+
},
|
|
37
|
+
base: ({width, height, borderRadius, backgroundColor}) => ({
|
|
38
|
+
backgroundColor: cssVar(backgroundColor, system.color.bg.alt.strong),
|
|
39
|
+
borderRadius: cssVar(borderRadius, system.space.zero),
|
|
40
|
+
height: cssVar(height, '100%'),
|
|
41
|
+
width: width,
|
|
42
|
+
marginBottom: system.space.x4,
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const SkeletonShape = createComponent('div')({
|
|
47
|
+
displayName: 'Skeleton.Shape',
|
|
48
|
+
Component: (
|
|
49
|
+
{width = '100%', height, backgroundColor, borderRadius, ...elemProps}: SkeletonShapeProps,
|
|
50
|
+
ref,
|
|
51
|
+
Element
|
|
52
|
+
) => {
|
|
53
|
+
return (
|
|
54
|
+
<Element
|
|
55
|
+
ref={ref}
|
|
56
|
+
{...handleCsProp(
|
|
57
|
+
elemProps,
|
|
58
|
+
skeletonShapeStencil({
|
|
59
|
+
width: typeof width === 'number' ? px2rem(width) : width,
|
|
60
|
+
height: typeof height === 'number' ? px2rem(height) : height,
|
|
61
|
+
backgroundColor,
|
|
62
|
+
borderRadius: typeof borderRadius === 'number' ? px2rem(borderRadius) : borderRadius,
|
|
63
|
+
})
|
|
64
|
+
)}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
},
|
|
68
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {createStencil, cssVar, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
+
|
|
7
|
+
export interface SkeletonTextProps {
|
|
8
|
+
/**
|
|
9
|
+
* The number of "lines" that SkeletonText will display. If there is more than one line, the last line will have a width of `60%`.
|
|
10
|
+
* @default 2
|
|
11
|
+
*/
|
|
12
|
+
lineCount?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The background color of the skeleton
|
|
15
|
+
* @default `system.color.bg.alt.strong`
|
|
16
|
+
*/
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const skeletonTextStencil = createStencil({
|
|
21
|
+
vars: {
|
|
22
|
+
backgroundColor: '',
|
|
23
|
+
},
|
|
24
|
+
base: ({backgroundColor}) => ({
|
|
25
|
+
marginBottom: system.space.x6,
|
|
26
|
+
'& [data-part="skeleton-text-lines"]': {
|
|
27
|
+
backgroundColor: cssVar(backgroundColor, system.color.bg.alt.strong),
|
|
28
|
+
height: px2rem(21),
|
|
29
|
+
marginBlockEnd: system.space.x3,
|
|
30
|
+
borderRadius: system.shape.half,
|
|
31
|
+
width: '100%',
|
|
32
|
+
},
|
|
33
|
+
'& [data-part="skeleton-text-lines"]:last-child': {
|
|
34
|
+
width: '60%',
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const SkeletonText = createComponent('div')({
|
|
40
|
+
displayName: 'Skeleton.Text',
|
|
41
|
+
Component: ({backgroundColor, lineCount = 2, ...elemProps}: SkeletonTextProps, ref, Element) => {
|
|
42
|
+
const lines = new Array(lineCount).fill(null);
|
|
43
|
+
return lineCount <= 0 ? null : (
|
|
44
|
+
<Element
|
|
45
|
+
ref={ref}
|
|
46
|
+
{...handleCsProp(
|
|
47
|
+
elemProps,
|
|
48
|
+
skeletonTextStencil({
|
|
49
|
+
backgroundColor,
|
|
50
|
+
})
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
{lines.map((_value, index) => (
|
|
54
|
+
<div data-part={'skeleton-text-lines'} key={index}></div>
|
|
55
|
+
))}
|
|
56
|
+
</Element>
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
});
|
package/tooltip/lib/Tooltip.tsx
CHANGED
|
@@ -16,17 +16,6 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
16
16
|
/**
|
|
17
17
|
* This should be a string in most cases. HTML is supported, but only text is understood
|
|
18
18
|
* by assistive technology. This is true for both `label` and `describe` modes.
|
|
19
|
-
*
|
|
20
|
-
* **Note:** If you use `description` type and want to pass `jsx`, it **must* be inline and **not** a component to ensure the inner text is properly translated.
|
|
21
|
-
*
|
|
22
|
-
* ```jsx
|
|
23
|
-
* // The text will be understood as: You must accept terms and conditions
|
|
24
|
-
* <Tooltip type="description" title={<span>You<i>must</i> accept terms and conditions</span>}/>
|
|
25
|
-
*
|
|
26
|
-
* // This will render a string including the html and will not be properly understood by voice over.
|
|
27
|
-
* const MyComponent = () => <span>You<i>must</i> accept terms and conditions</span>
|
|
28
|
-
* <Tooltip type="description" title={MyComponent/>
|
|
29
|
-
* ```
|
|
30
19
|
*/
|
|
31
20
|
title: React.ReactNode;
|
|
32
21
|
/**
|
|
@@ -56,7 +45,7 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
56
45
|
* - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
|
|
57
46
|
* `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButtons that render an icon or
|
|
58
47
|
* Ellipsis tooltips.
|
|
59
|
-
* -
|
|
48
|
+
* - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
|
|
60
49
|
* information about the target.
|
|
61
50
|
* - `muted`: No effort is made to make the tooltip accessible to screen readers. Use if the
|
|
62
51
|
* tooltip contents are not useful to a screen reader or if you have handled accessibility of
|
|
@@ -66,7 +55,7 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
66
55
|
* Consider an alternate way to inform a user of additional important information.
|
|
67
56
|
* @default 'label'
|
|
68
57
|
*/
|
|
69
|
-
type?: 'label' | 'describe' | 'muted'
|
|
58
|
+
type?: 'label' | 'describe' | 'muted';
|
|
70
59
|
/**
|
|
71
60
|
* Amount of time (in ms) to delay before showing the tooltip
|
|
72
61
|
*/
|
|
@@ -65,17 +65,17 @@ export function useTooltip<T extends Element = Element>({
|
|
|
65
65
|
* - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
|
|
66
66
|
* `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButton that renders an icon or
|
|
67
67
|
* Ellipsis tooltips.
|
|
68
|
-
* -
|
|
68
|
+
* - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
|
|
69
|
+
* information about the target.
|
|
69
70
|
* - `muted`: No effort is made to make the tooltip accessible to screen readers. Use if the
|
|
70
71
|
* tooltip contents are not useful to a screen reader or if you have handled accessibility of
|
|
71
72
|
* the tooltip yourself.
|
|
72
|
-
* - `description`: Sets `aria-description` strings for the wrapped element. Use if the tooltip has additional about the target
|
|
73
73
|
*
|
|
74
74
|
* **Note**: Assistive technology may ignore `describe` techniques based on verbosity settings.
|
|
75
75
|
* Consider an alternate way to inform a user of additional important information.
|
|
76
76
|
* @default 'label'
|
|
77
77
|
*/
|
|
78
|
-
type?: 'label' | 'describe' | 'muted'
|
|
78
|
+
type?: 'label' | 'describe' | 'muted';
|
|
79
79
|
/**
|
|
80
80
|
* The content of the `aria-label` if `type` is `label.
|
|
81
81
|
*/
|
|
@@ -136,7 +136,6 @@ export function useTooltip<T extends Element = Element>({
|
|
|
136
136
|
const targetProps = {
|
|
137
137
|
// extra description of the target element for assistive technology
|
|
138
138
|
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
139
|
-
'aria-description': type === 'description' ? titleText : undefined,
|
|
140
139
|
// This will replace the accessible name of the target element
|
|
141
140
|
'aria-label': type === 'label' ? titleText : undefined,
|
|
142
141
|
onMouseEnter: onOpenFromTarget,
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface SkeletonHeaderProps {
|
|
2
|
-
/**
|
|
3
|
-
* The background color of the skeleton
|
|
4
|
-
* @default soap200
|
|
5
|
-
*/
|
|
6
|
-
backgroundColor?: string;
|
|
7
|
-
/**
|
|
8
|
-
* The height of the shape in `px` or `%`.
|
|
9
|
-
* @default 28px
|
|
10
|
-
*/
|
|
11
|
-
height?: number | string;
|
|
12
|
-
/**
|
|
13
|
-
* The width of the shape in `px` or `%`.
|
|
14
|
-
* @default 100%
|
|
15
|
-
*/
|
|
16
|
-
width?: number | string;
|
|
17
|
-
}
|
|
18
|
-
export declare const SkeletonHeader: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonHeaderProps>;
|
|
19
|
-
//# sourceMappingURL=skeletonHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonHeader.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonHeader.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,yFAsBzB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface SkeletonShapeProps {
|
|
2
|
-
/**
|
|
3
|
-
* The width of the shape in `px` or `%`.
|
|
4
|
-
* @default 100%
|
|
5
|
-
*/
|
|
6
|
-
width?: number | string;
|
|
7
|
-
/**
|
|
8
|
-
* The height of the shape in `px` or `%`.
|
|
9
|
-
* @default 100%
|
|
10
|
-
*/
|
|
11
|
-
height?: number | string;
|
|
12
|
-
/**
|
|
13
|
-
* The borderRadius of the shape in `px` or `%`.
|
|
14
|
-
* @default 0
|
|
15
|
-
*/
|
|
16
|
-
borderRadius?: number | string;
|
|
17
|
-
/**
|
|
18
|
-
* The background color of the skeleton
|
|
19
|
-
* @default soap200
|
|
20
|
-
*/
|
|
21
|
-
backgroundColor?: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const SkeletonShape: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonShapeProps>;
|
|
24
|
-
//# sourceMappingURL=skeletonShape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonShape.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonShape.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAYD,eAAO,MAAM,aAAa,wFAuBxB,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.SkeletonShape = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
32
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
33
|
-
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
34
|
-
const Shape = (0, styled_1.default)('div')(({ backgroundColor, borderRadius, height, width }) => ({
|
|
35
|
-
backgroundColor,
|
|
36
|
-
borderRadius,
|
|
37
|
-
height,
|
|
38
|
-
width,
|
|
39
|
-
marginBottom: tokens_1.space.s,
|
|
40
|
-
}));
|
|
41
|
-
exports.SkeletonShape = (0, common_1.createComponent)('div')({
|
|
42
|
-
displayName: 'Skeleton.Shape',
|
|
43
|
-
Component: ({ backgroundColor = tokens_1.colors.soap200, borderRadius = 0, height = '100%', width = '100%', ...elemProps }, ref, Element) => (React.createElement(Shape, { ref: ref, as: Element, backgroundColor: backgroundColor, borderRadius: borderRadius, height: height, width: width, ...elemProps })),
|
|
44
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonText.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA+BD,eAAO,MAAM,YAAY,uFAYvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../../skeleton/lib/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,aAAa;IAC5B;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAmBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ;IAcjB;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;CAGL,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface SkeletonHeaderProps {
|
|
2
|
-
/**
|
|
3
|
-
* The background color of the skeleton
|
|
4
|
-
* @default soap200
|
|
5
|
-
*/
|
|
6
|
-
backgroundColor?: string;
|
|
7
|
-
/**
|
|
8
|
-
* The height of the shape in `px` or `%`.
|
|
9
|
-
* @default 28px
|
|
10
|
-
*/
|
|
11
|
-
height?: number | string;
|
|
12
|
-
/**
|
|
13
|
-
* The width of the shape in `px` or `%`.
|
|
14
|
-
* @default 100%
|
|
15
|
-
*/
|
|
16
|
-
width?: number | string;
|
|
17
|
-
}
|
|
18
|
-
export declare const SkeletonHeader: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonHeaderProps>;
|
|
19
|
-
//# sourceMappingURL=skeletonHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonHeader.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonHeader.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,yFAsBzB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { borderRadius, colors } from '@workday/canvas-kit-react/tokens';
|
|
4
|
-
import { SkeletonShape } from './skeletonShape';
|
|
5
|
-
export const SkeletonHeader = createComponent('div')({
|
|
6
|
-
displayName: 'Skeleton.Header',
|
|
7
|
-
Component: ({ backgroundColor = colors.soap200, height = '28px', width = '100%', ...elemProps }, ref, Element) => (React.createElement(SkeletonShape, { ref: ref, as: Element, backgroundColor: backgroundColor, borderRadius: borderRadius.s, height: height, width: width, ...elemProps })),
|
|
8
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface SkeletonShapeProps {
|
|
2
|
-
/**
|
|
3
|
-
* The width of the shape in `px` or `%`.
|
|
4
|
-
* @default 100%
|
|
5
|
-
*/
|
|
6
|
-
width?: number | string;
|
|
7
|
-
/**
|
|
8
|
-
* The height of the shape in `px` or `%`.
|
|
9
|
-
* @default 100%
|
|
10
|
-
*/
|
|
11
|
-
height?: number | string;
|
|
12
|
-
/**
|
|
13
|
-
* The borderRadius of the shape in `px` or `%`.
|
|
14
|
-
* @default 0
|
|
15
|
-
*/
|
|
16
|
-
borderRadius?: number | string;
|
|
17
|
-
/**
|
|
18
|
-
* The background color of the skeleton
|
|
19
|
-
* @default soap200
|
|
20
|
-
*/
|
|
21
|
-
backgroundColor?: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const SkeletonShape: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonShapeProps>;
|
|
24
|
-
//# sourceMappingURL=skeletonShape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonShape.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonShape.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAYD,eAAO,MAAM,aAAa,wFAuBxB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
|
-
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
4
|
-
import { colors, space } from '@workday/canvas-kit-react/tokens';
|
|
5
|
-
const Shape = styled('div')(({ backgroundColor, borderRadius, height, width }) => ({
|
|
6
|
-
backgroundColor,
|
|
7
|
-
borderRadius,
|
|
8
|
-
height,
|
|
9
|
-
width,
|
|
10
|
-
marginBottom: space.s,
|
|
11
|
-
}));
|
|
12
|
-
export const SkeletonShape = createComponent('div')({
|
|
13
|
-
displayName: 'Skeleton.Shape',
|
|
14
|
-
Component: ({ backgroundColor = colors.soap200, borderRadius = 0, height = '100%', width = '100%', ...elemProps }, ref, Element) => (React.createElement(Shape, { ref: ref, as: Element, backgroundColor: backgroundColor, borderRadius: borderRadius, height: height, width: width, ...elemProps })),
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonText.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA+BD,eAAO,MAAM,YAAY,uFAYvB,CAAC"}
|