@workday/canvas-kit-react 14.0.0-alpha.1254-next.0 → 14.0.0-alpha.1256-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/BaseButton.tsx +0 -6
- package/button/lib/Button.tsx +27 -2
- package/button/lib/ToolbarDropdownButton.tsx +21 -2
- package/button/lib/ToolbarIconButton.tsx +11 -1
- package/button/lib/parts/ButtonLabelIcon.tsx +21 -3
- package/collection/lib/keyUtils.ts +4 -2
- package/collection/lib/useListItemRemoveable.ts +2 -3
- package/collection/lib/useListItemRovingFocus.tsx +2 -3
- package/collection/lib/useListKeyboardHandler.ts +2 -4
- package/combobox/lib/hooks/useComboboxListKeyboardHandler.ts +2 -4
- package/common/lib/theming/README.md +3 -48
- package/common/lib/theming/useIsRTL.ts +5 -1
- package/common/lib/utils/index.ts +1 -0
- package/common/lib/utils/isElementRTL.ts +27 -0
- package/dist/commonjs/avatar/lib/Avatar.js +7 -7
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
- package/dist/commonjs/button/lib/BaseButton.d.ts +0 -5
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/BaseButton.js +28 -28
- package/dist/commonjs/button/lib/Button.d.ts +14 -0
- package/dist/commonjs/button/lib/Button.d.ts.map +1 -1
- package/dist/commonjs/button/lib/Button.js +2 -2
- package/dist/commonjs/button/lib/DeleteButton.js +1 -1
- package/dist/commonjs/button/lib/ExternalHyperlink.js +1 -1
- 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 +3 -3
- package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts +11 -0
- package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarDropdownButton.js +6 -3
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts +1 -0
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarIconButton.js +4 -4
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +10 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.js +2 -2
- package/dist/commonjs/collection/lib/keyUtils.d.ts +1 -1
- package/dist/commonjs/collection/lib/keyUtils.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/keyUtils.js +3 -1
- package/dist/commonjs/collection/lib/useListItemRemoveable.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRemoveable.js +1 -2
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRovingFocus.js +1 -2
- package/dist/commonjs/collection/lib/useListKeyboardHandler.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListKeyboardHandler.js +1 -2
- package/dist/commonjs/combobox/lib/hooks/useComboboxListKeyboardHandler.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/hooks/useComboboxListKeyboardHandler.js +1 -2
- package/dist/commonjs/common/lib/theming/useIsRTL.d.ts +5 -1
- package/dist/commonjs/common/lib/theming/useIsRTL.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/useIsRTL.js +5 -1
- package/dist/commonjs/common/lib/utils/index.d.ts +1 -0
- package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.js +1 -0
- package/dist/commonjs/common/lib/utils/isElementRTL.d.ts +25 -0
- package/dist/commonjs/common/lib/utils/isElementRTL.d.ts.map +1 -0
- package/dist/commonjs/common/lib/utils/isElementRTL.js +31 -0
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts +8 -4
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AccentIcon.d.ts +8 -4
- package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AccentIcon.js +3 -2
- package/dist/commonjs/icon/lib/AppletIcon.d.ts +8 -5
- package/dist/commonjs/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AppletIcon.js +2 -2
- package/dist/commonjs/icon/lib/Graphic.d.ts +8 -3
- package/dist/commonjs/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +1 -1
- package/dist/commonjs/icon/lib/Svg.d.ts +17 -1
- package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Svg.js +8 -5
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +7 -0
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.d.ts +10 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +4 -4
- package/dist/commonjs/modal/lib/ModalOverlay.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageButton.js +2 -2
- package/dist/commonjs/popup/lib/hooks/usePopupStack.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/usePopupStack.js +10 -7
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -5
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.js +1 -1
- package/dist/es6/avatar/lib/Avatar.js +7 -7
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
- package/dist/es6/button/lib/BaseButton.d.ts +0 -5
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/es6/button/lib/BaseButton.js +28 -28
- package/dist/es6/button/lib/Button.d.ts +14 -0
- package/dist/es6/button/lib/Button.d.ts.map +1 -1
- package/dist/es6/button/lib/Button.js +2 -2
- package/dist/es6/button/lib/DeleteButton.js +1 -1
- package/dist/es6/button/lib/ExternalHyperlink.js +1 -1
- 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 +3 -3
- package/dist/es6/button/lib/ToolbarDropdownButton.d.ts +11 -0
- package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarDropdownButton.js +6 -3
- package/dist/es6/button/lib/ToolbarIconButton.d.ts +1 -0
- package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarIconButton.js +4 -4
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +10 -1
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/ButtonLabelIcon.js +2 -2
- package/dist/es6/collection/lib/keyUtils.d.ts +1 -1
- package/dist/es6/collection/lib/keyUtils.d.ts.map +1 -1
- package/dist/es6/collection/lib/keyUtils.js +3 -1
- package/dist/es6/collection/lib/useListItemRemoveable.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRemoveable.js +2 -3
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRovingFocus.js +2 -3
- package/dist/es6/collection/lib/useListKeyboardHandler.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListKeyboardHandler.js +2 -3
- package/dist/es6/combobox/lib/hooks/useComboboxListKeyboardHandler.d.ts.map +1 -1
- package/dist/es6/combobox/lib/hooks/useComboboxListKeyboardHandler.js +2 -3
- package/dist/es6/common/lib/theming/useIsRTL.d.ts +5 -1
- package/dist/es6/common/lib/theming/useIsRTL.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/useIsRTL.js +5 -1
- package/dist/es6/common/lib/utils/index.d.ts +1 -0
- package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.js +1 -0
- package/dist/es6/common/lib/utils/isElementRTL.d.ts +25 -0
- package/dist/es6/common/lib/utils/isElementRTL.d.ts.map +1 -0
- package/dist/es6/common/lib/utils/isElementRTL.js +27 -0
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts +8 -4
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AccentIcon.d.ts +8 -4
- package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AccentIcon.js +3 -2
- package/dist/es6/icon/lib/AppletIcon.d.ts +8 -5
- package/dist/es6/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AppletIcon.js +2 -2
- package/dist/es6/icon/lib/Graphic.d.ts +8 -3
- package/dist/es6/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/es6/icon/lib/Graphic.js +1 -1
- package/dist/es6/icon/lib/Svg.d.ts +17 -1
- package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
- package/dist/es6/icon/lib/Svg.js +8 -5
- package/dist/es6/icon/lib/SystemIcon.d.ts +7 -0
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIcon.js +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.d.ts +10 -1
- package/dist/es6/icon/lib/SystemIconCircle.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +4 -4
- package/dist/es6/modal/lib/ModalOverlay.js +1 -1
- package/dist/es6/pagination/lib/Pagination/PageButton.js +2 -2
- package/dist/es6/popup/lib/hooks/usePopupStack.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/usePopupStack.js +11 -8
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -5
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.js +1 -1
- package/icon/lib/AccentIcon.tsx +10 -1
- package/icon/lib/AppletIcon.tsx +3 -1
- package/icon/lib/Svg.tsx +23 -3
- package/icon/lib/SystemIconCircle.tsx +26 -3
- package/modal/lib/ModalOverlay.tsx +1 -1
- package/package.json +4 -4
- package/popup/lib/hooks/usePopupStack.ts +10 -7
|
@@ -2,8 +2,12 @@ import { PartialEmotionCanvasTheme } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* This is a small hook to support right-to-left logic.
|
|
4
4
|
* It returns a boolean
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
6
7
|
* const isRTL = useIsRTL();
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Use isElementRTL instead.
|
|
7
11
|
*/
|
|
8
12
|
export declare const useIsRTL: (partialTheme?: PartialEmotionCanvasTheme) => boolean;
|
|
9
13
|
//# sourceMappingURL=useIsRTL.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsRTL.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useIsRTL.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuC,yBAAyB,EAAC,MAAM,SAAS,CAAC;AAMxF
|
|
1
|
+
{"version":3,"file":"useIsRTL.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useIsRTL.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuC,yBAAyB,EAAC,MAAM,SAAS,CAAC;AAMxF;;;;;;;;;GASG;AAEH,eAAO,MAAM,QAAQ,kBAAmB,yBAAyB,YAIhE,CAAC"}
|
|
@@ -33,8 +33,12 @@ function useDefaultTheme(theme, config, fn) {
|
|
|
33
33
|
/**
|
|
34
34
|
* This is a small hook to support right-to-left logic.
|
|
35
35
|
* It returns a boolean
|
|
36
|
-
*
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
37
38
|
* const isRTL = useIsRTL();
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @deprecated Use isElementRTL instead.
|
|
38
42
|
*/
|
|
39
43
|
const useIsRTL = (partialTheme) => {
|
|
40
44
|
const theme = useDefaultTheme(partialTheme, react_1.ThemeContext, React.useContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./colorUtils"), exports);
|
|
18
18
|
__exportStar(require("./getTranslateFromOrigin"), exports);
|
|
19
|
+
__exportStar(require("./isElementRTL"), exports);
|
|
19
20
|
__exportStar(require("./dispatchInputEvent"), exports);
|
|
20
21
|
__exportStar(require("./changeFocus"), exports);
|
|
21
22
|
__exportStar(require("./makeMq"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if element has a right-to-left content direction. This is most useful to get
|
|
3
|
+
* direction from a JavaScript event. If you desire to get a direction for styling, use [CSS Logical
|
|
4
|
+
* Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
|
|
5
|
+
*
|
|
6
|
+
* The performance cost of getting the direction from an element is negligible, but it is intended
|
|
7
|
+
* to be used in event handlers and not a part of render functions.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* onKeyDown(e) {
|
|
11
|
+
* const isRTL = isElementRTL(e.currentTarget);
|
|
12
|
+
*
|
|
13
|
+
* if (e.key === 'ArrowRight') {
|
|
14
|
+
* if (isRTL) {
|
|
15
|
+
* // Right arrow moves to the right even on RTL languages, but "right" doesn't mean
|
|
16
|
+
* //"advance" in RTL. Previous is to the right of the current in RTL.
|
|
17
|
+
* model.events.goToPreviousRow();
|
|
18
|
+
* } else {
|
|
19
|
+
* model.events.goToNextRow();
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const isElementRTL: (element: Element) => boolean;
|
|
25
|
+
//# sourceMappingURL=isElementRTL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isElementRTL.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/isElementRTL.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,YAAa,OAAO,KAAG,OAG/C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isElementRTL = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns true if element has a right-to-left content direction. This is most useful to get
|
|
6
|
+
* direction from a JavaScript event. If you desire to get a direction for styling, use [CSS Logical
|
|
7
|
+
* Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
|
|
8
|
+
*
|
|
9
|
+
* The performance cost of getting the direction from an element is negligible, but it is intended
|
|
10
|
+
* to be used in event handlers and not a part of render functions.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* onKeyDown(e) {
|
|
14
|
+
* const isRTL = isElementRTL(e.currentTarget);
|
|
15
|
+
*
|
|
16
|
+
* if (e.key === 'ArrowRight') {
|
|
17
|
+
* if (isRTL) {
|
|
18
|
+
* // Right arrow moves to the right even on RTL languages, but "right" doesn't mean
|
|
19
|
+
* //"advance" in RTL. Previous is to the right of the current in RTL.
|
|
20
|
+
* model.events.goToPreviousRow();
|
|
21
|
+
* } else {
|
|
22
|
+
* model.events.goToNextRow();
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
const isElementRTL = (element) => {
|
|
28
|
+
const direction = getComputedStyle(element).direction;
|
|
29
|
+
return direction === 'rtl';
|
|
30
|
+
};
|
|
31
|
+
exports.isElementRTL = isElementRTL;
|
|
@@ -35,12 +35,16 @@ export declare const expandableIconStencil: import("@workday/canvas-kit-styling"
|
|
|
35
35
|
transform: string;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
+
shouldMirrorInRTL: {
|
|
39
|
+
true: {
|
|
40
|
+
'&:dir(rtl)': {
|
|
41
|
+
transform: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
38
45
|
}, {}, {
|
|
39
46
|
width: string;
|
|
40
|
-
height: string;
|
|
41
|
-
* Icon to display from `@workday/canvas-accent-icons-web`
|
|
42
|
-
* @default chevronUpIcon
|
|
43
|
-
*/
|
|
47
|
+
height: string;
|
|
44
48
|
size: string;
|
|
45
49
|
}, never, never>, never>, never>;
|
|
46
50
|
export declare const ExpandableIcon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", ExpandableIconProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAoB,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAM/D,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/F;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"ExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAoB,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAM/D,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/F;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAkDhC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;EAczB,CAAC"}
|
|
@@ -49,13 +49,17 @@ export declare const accentIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
49
49
|
transform: string;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
+
shouldMirrorInRTL: {
|
|
53
|
+
true: {
|
|
54
|
+
'&:dir(rtl)': {
|
|
55
|
+
transform: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
52
59
|
}, {}, {
|
|
53
60
|
width: string;
|
|
54
61
|
height: string;
|
|
55
|
-
size: string;
|
|
56
|
-
* The fill color of the AccentIcon.
|
|
57
|
-
* @default system.color.bg.primary.strong
|
|
58
|
-
*/
|
|
62
|
+
size: string;
|
|
59
63
|
}, never, never>, never>;
|
|
60
64
|
export declare const AccentIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccentIconProps>;
|
|
61
65
|
//# sourceMappingURL=AccentIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.ts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AAK,GAAG,MAAM,CAAC;IACvF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuB5B,CAAC;AAEH,eAAO,MAAM,UAAU,sFAiCrB,CAAC"}
|
|
@@ -25,7 +25,7 @@ exports.accentIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
25
25
|
vars: {
|
|
26
26
|
color: '',
|
|
27
27
|
},
|
|
28
|
-
base: { name: "8918a", styles: "box-sizing:border-box;--size-svg-
|
|
28
|
+
base: { name: "8918a", styles: "box-sizing:border-box;--size-svg-8fcab8:3.5rem;& .color-500{fill:var(--color-accent-icon-05e3c8, var(--cnvs-sys-color-bg-primary-strong));}& .french-vanilla-100{fill:var(--cnvs-sys-color-bg-default);}" },
|
|
29
29
|
modifiers: {
|
|
30
30
|
transparent: {
|
|
31
31
|
true: { name: "239han", styles: "& .french-vanilla-100{fill:transparent;}" }
|
|
@@ -34,12 +34,13 @@ exports.accentIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
34
34
|
}, "accent-icon-05e3c8");
|
|
35
35
|
exports.AccentIcon = (0, common_1.createComponent)('span')({
|
|
36
36
|
displayName: 'AccentIcon',
|
|
37
|
-
Component: ({ transparent, size, icon, color, shouldMirror, ...elemProps }, ref, Element) => {
|
|
37
|
+
Component: ({ transparent, size, icon, color, shouldMirror, shouldMirrorInRTL, ...elemProps }, ref, Element) => {
|
|
38
38
|
return ((0, jsx_runtime_1.jsx)(Svg_1.Svg, { src: icon, type: design_assets_types_1.CanvasIconTypes.Accent, as: Element, ref: ref, ...(0, canvas_kit_styling_1.handleCsProp)(elemProps, [
|
|
39
39
|
(0, exports.accentIconStencil)({
|
|
40
40
|
color: (0, Svg_1.transformColorNameToToken)(color),
|
|
41
41
|
size: typeof size === 'number' ? (0, canvas_kit_styling_1.px2rem)(size) : undefined,
|
|
42
42
|
shouldMirror,
|
|
43
|
+
shouldMirrorInRTL,
|
|
43
44
|
transparent,
|
|
44
45
|
}),
|
|
45
46
|
]) }));
|
|
@@ -16,7 +16,7 @@ export interface AppletIconStyles {
|
|
|
16
16
|
* @deprecated `appletIconStyles` will be removed in in a future version as a part of implementation of stencils and new tokens. Consider to use `appletIconStencil` instead.
|
|
17
17
|
*/
|
|
18
18
|
export declare const appletIconStyles: ({ color, }: AppletIconStyles) => CSSObject;
|
|
19
|
-
export interface AppletIconProps extends AppletIconStyles, Pick<SvgProps, 'shouldMirror' | 'cs'> {
|
|
19
|
+
export interface AppletIconProps extends AppletIconStyles, Pick<SvgProps, 'shouldMirror' | 'shouldMirrorInRTL' | 'cs'> {
|
|
20
20
|
/**
|
|
21
21
|
* The icon to display from `@workday/canvas-applet-icons-web`.
|
|
22
22
|
*/
|
|
@@ -43,11 +43,14 @@ export declare const appletIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
43
43
|
transform: string;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
shouldMirrorInRTL: {
|
|
47
|
+
true: {
|
|
48
|
+
'&:dir(rtl)': {
|
|
49
|
+
transform: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
46
53
|
}, {}, {
|
|
47
|
-
/**
|
|
48
|
-
* The icon color hue. Must use a member of the `AppletIcon.Colors` static enum.
|
|
49
|
-
* @default AppletIcon.Colors.Blueberry
|
|
50
|
-
*/
|
|
51
54
|
width: string;
|
|
52
55
|
height: string;
|
|
53
56
|
size: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAE1B,gBAAgB,KAAG,SAsCrB,CAAC;AAEF,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAE1B,gBAAgB,KAAG,SAsCrB,CAAC;AAEF,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,mBAAmB,GAAG,IAAI,CAAC;IAC7D;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6B5B,CAAC;AAEH,eAAO,MAAM,UAAU;;CAyBrB,CAAC"}
|
|
@@ -55,8 +55,8 @@ exports.appletIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
55
55
|
color400: '',
|
|
56
56
|
color500: '',
|
|
57
57
|
},
|
|
58
|
-
base: { name: "
|
|
59
|
-
}, "applet-icon-
|
|
58
|
+
base: { name: "46fqck", styles: "box-sizing:border-box;--size-svg-8fcab8:5.75rem;& .color-100{fill:var(--cnvs-sys-color-fg-inverse);}& .color-200{fill:var(--color200-applet-icon-c96fac, var(--cnvs-base-palette-blue-200));}& .color-300{fill:var(--color300-applet-icon-c96fac, var(--cnvs-base-palette-blue-400));}& .color-400{fill:var(--color400-applet-icon-c96fac, var(--cnvs-base-palette-blue-600));}& .color-400-alpha-20{fill:var(--color400-applet-icon-c96fac, var(--cnvs-base-palette-blue-600));}& .color-500{fill:var(--color500-applet-icon-c96fac, var(--cnvs-base-palette-blue-700));}" }
|
|
59
|
+
}, "applet-icon-c96fac");
|
|
60
60
|
exports.AppletIcon = (0, common_1.createComponent)('span')({
|
|
61
61
|
displayName: 'AppletIcon',
|
|
62
62
|
Component: ({ size, icon, color, ...elemProps }, ref, Element) => {
|
|
@@ -74,9 +74,14 @@ export declare const graphicStencil: import("@workday/canvas-kit-styling").Stenc
|
|
|
74
74
|
true: {
|
|
75
75
|
transform: string;
|
|
76
76
|
};
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
};
|
|
78
|
+
shouldMirrorInRTL: {
|
|
79
|
+
true: {
|
|
80
|
+
'&:dir(rtl)': {
|
|
81
|
+
transform: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
80
85
|
}, {}, {
|
|
81
86
|
width: string;
|
|
82
87
|
height: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Graphic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAG1C,OAAO,EAAgB,OAAO,EAAuB,MAAM,6BAA6B,CAAC;AAEzF;;GAEG;AACH,M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AAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,OAAO;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,GAAG,EAAE;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC7D;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,CAAC;IACvD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC;CAC5D;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,4BAA2B,aAAa,KAAG,SA4BpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;wBAWzB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;gBA0B9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAAS,MAAM,WAKxC,CAAC;AAEF,eAAO,MAAM,OAAO,mFA6BlB,CAAC"}
|
|
@@ -45,7 +45,7 @@ exports.graphicStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
45
45
|
base: { name: "j55a7", styles: "box-sizing:border-box;" },
|
|
46
46
|
modifiers: {
|
|
47
47
|
grow: {
|
|
48
|
-
true: { name: "pgjct", styles: "width:100%;--width-svg-
|
|
48
|
+
true: { name: "pgjct", styles: "width:100%;--width-svg-8fcab8:100%;" }
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}, "graphic-385fe4");
|
|
@@ -4,10 +4,19 @@ export interface SvgProps extends BoxProps {
|
|
|
4
4
|
src: CanvasIcon;
|
|
5
5
|
type: CanvasIconTypes;
|
|
6
6
|
/**
|
|
7
|
-
* If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
7
|
+
* If set to `true`, transform the SVG's x-axis to mirror the graphic. Use this if you want to
|
|
8
|
+
* always mirror the icon regardless of the content direction. If the SVG should mirror only when
|
|
9
|
+
* in an right-to-left language, use `shouldMirrorInRTL` instead.
|
|
8
10
|
* @default false
|
|
9
11
|
*/
|
|
10
12
|
shouldMirror?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If set to `true`, transform the SVG's x-axis to mirror the graphic when the content direction
|
|
15
|
+
* is `rtl`. Icons don't have enough context to know if they should be mirrored in all cases.
|
|
16
|
+
* Setting this to `true` indicates the icon should be mirrored in right-to-left languages.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
shouldMirrorInRTL?: boolean;
|
|
11
20
|
}
|
|
12
21
|
export declare const svgStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
13
22
|
shouldMirror: {
|
|
@@ -15,6 +24,13 @@ export declare const svgStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
|
15
24
|
transform: string;
|
|
16
25
|
};
|
|
17
26
|
};
|
|
27
|
+
shouldMirrorInRTL: {
|
|
28
|
+
true: {
|
|
29
|
+
'&:dir(rtl)': {
|
|
30
|
+
transform: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
18
34
|
}, {}, {
|
|
19
35
|
/** sets width of svg element */
|
|
20
36
|
width: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAC,QAAQ,EAAc,MAAM,kCAAkC,CAAC;AAIvE,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAC,QAAQ,EAAc,MAAM,kCAAkC,CAAC;AAIvE,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;IAEnB,gCAAgC;;IAEhC,iCAAiC;;IAEjC,2CAA2C;;gBAyB7C,CAAC;AAEH,kBAAkB;AAClB,eAAO,MAAM,yBAAyB,WAAY,MAAM,uBAUvD,CAAC;AAEF,eAAO,MAAM,GAAG,+EAsBd,CAAC"}
|
|
@@ -16,13 +16,16 @@ exports.svgStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
16
16
|
/** sets width and height of svg element */
|
|
17
17
|
size: '',
|
|
18
18
|
},
|
|
19
|
-
base: { name: "
|
|
19
|
+
base: { name: "1cfgff", styles: "box-sizing:border-box;display:inline-block;> svg{display:block;width:var(--width-svg-8fcab8, var(--size-svg-8fcab8));height:var(--height-svg-8fcab8, var(--size-svg-8fcab8));}" },
|
|
20
20
|
modifiers: {
|
|
21
21
|
shouldMirror: {
|
|
22
|
-
true: { name: "
|
|
22
|
+
true: { name: "3v0dfr", styles: "transform:scaleX(-1);" }
|
|
23
|
+
},
|
|
24
|
+
shouldMirrorInRTL: {
|
|
25
|
+
true: { name: "nmprx", styles: "&:dir(rtl){transform:scaleX(-1);}" }
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
|
-
}, "svg-
|
|
28
|
+
}, "svg-8fcab8");
|
|
26
29
|
/** @deprecated */
|
|
27
30
|
const transformColorNameToToken = (color) => {
|
|
28
31
|
if (color && color in canvas_tokens_web_1.base) {
|
|
@@ -36,7 +39,7 @@ const transformColorNameToToken = (color) => {
|
|
|
36
39
|
exports.transformColorNameToToken = transformColorNameToToken;
|
|
37
40
|
exports.Svg = (0, common_1.createComponent)('span')({
|
|
38
41
|
displayName: 'Svg',
|
|
39
|
-
Component: ({ shouldMirror, src, type, ...elemProps }, ref, Element) => {
|
|
42
|
+
Component: ({ shouldMirror, shouldMirrorInRTL, src, type, ...elemProps }, ref, Element) => {
|
|
40
43
|
try {
|
|
41
44
|
(0, utils_1.validateIconType)(src, type);
|
|
42
45
|
}
|
|
@@ -44,6 +47,6 @@ exports.Svg = (0, common_1.createComponent)('span')({
|
|
|
44
47
|
console.error(e);
|
|
45
48
|
return null;
|
|
46
49
|
}
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(Element, { ref: ref, dangerouslySetInnerHTML: { __html: src.svg }, ...(0, layout_1.mergeStyles)(elemProps, (0, exports.svgStencil)({ shouldMirror })) }));
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(Element, { ref: ref, dangerouslySetInnerHTML: { __html: src.svg }, ...(0, layout_1.mergeStyles)(elemProps, (0, exports.svgStencil)({ shouldMirror, shouldMirrorInRTL })) }));
|
|
48
51
|
},
|
|
49
52
|
});
|
|
@@ -103,6 +103,13 @@ export declare const systemIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
103
103
|
transform: string;
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
+
shouldMirrorInRTL: {
|
|
107
|
+
true: {
|
|
108
|
+
'&:dir(rtl)': {
|
|
109
|
+
transform: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
106
113
|
}, {}, {
|
|
107
114
|
width: string;
|
|
108
115
|
height: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAI1C,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAiBH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Stencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
59
59
|
accentColor: '',
|
|
60
60
|
backgroundColor: '',
|
|
61
61
|
},
|
|
62
|
-
base: { name: "2s986p", styles: "box-sizing:border-box;& svg{width:var(--width-svg-
|
|
62
|
+
base: { name: "2s986p", styles: "box-sizing:border-box;& svg{width:var(--width-svg-8fcab8, var(--size-svg-8fcab8, var(--cnvs-sys-space-x6)));height:var(--height-svg-8fcab8, var(--size-svg-8fcab8, var(--cnvs-sys-space-x6)));}& .wd-icon-fill{fill:var(--color-system-icon-3a4847, var(--cnvs-sys-color-icon-default));}& .wd-icon-accent, & .wd-icon-accent2{fill:var(--accentColor-system-icon-3a4847, var(--color-system-icon-3a4847, var(--cnvs-sys-color-fg-default)));}& .wd-icon-background{fill:var(--backgroundColor-system-icon-3a4847, transparent);}&:where(:hover, .hover) .wd-icon-fill{fill:var(--fillHover-02493f, var(--colorHover-02493f, var(--color-system-icon-3a4847, var(--cnvs-sys-color-fg-default))));}&:where(:hover, .hover) .wd-icon-accent, & .wd-icon-accent2{fill:var(--accentHover-02493f, var(--colorHover-02493f, var(--accentColor-system-icon-3a4847, var(--color-system-icon-3a4847, var(--cnvs-sys-color-fg-default)))));}&:where(:hover, .hover) .wd-icon-background{fill:var(--backgroundHover-02493f, var(--backgroundColor-system-icon-3a4847, transparent));}@media (prefers-contrast: more){.wd-icon-fill, .wd-icon-accent{color:currentColor;fill:currentColor;}}" },
|
|
63
63
|
modifiers: {}
|
|
64
64
|
}, "system-icon-3a4847");
|
|
65
65
|
exports.SystemIcon = (0, common_1.createComponent)('span')({
|
|
@@ -30,10 +30,19 @@ export interface SystemIconCircleProps extends CSProps {
|
|
|
30
30
|
*/
|
|
31
31
|
size?: SystemIconCircleSize | number;
|
|
32
32
|
/**
|
|
33
|
-
* If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
33
|
+
* If set to `true`, transform the SVG's x-axis to mirror the graphic. Use this if you want to
|
|
34
|
+
* always mirror the icon regardless of the content direction. If the SVG should mirror only when
|
|
35
|
+
* in an right-to-left language, use `shouldMirrorInRTL` instead.
|
|
34
36
|
* @default false
|
|
35
37
|
*/
|
|
36
38
|
shouldMirror?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* If set to `true`, transform the SVG's x-axis to mirror the graphic when the content direction
|
|
41
|
+
* is `rtl`. Icons don't have enough context to know if they should be mirrored in all cases.
|
|
42
|
+
* Setting this to `true` indicates the icon should be mirrored in right-to-left languages.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
shouldMirrorInRTL?: boolean;
|
|
37
46
|
}
|
|
38
47
|
export declare const systemIconCircleStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
39
48
|
containerSize: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,OAAO,EAAsC,OAAO,EAAC,MAAM,6BAA6B,CAAC;AAIzF,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,OAAO;IACpD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACrC
|
|
1
|
+
{"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,OAAO,EAAsC,OAAO,EAAC,MAAM,6BAA6B,CAAC;AAIzF,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,OAAO;IACpD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,uBAAuB;;;;;;;;gBAwBlC,CAAC;AAEH,eAAO,MAAM,gBAAgB,4FA8C3B,CAAC"}
|
|
@@ -24,11 +24,11 @@ exports.systemIconCircleStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
24
24
|
background: '',
|
|
25
25
|
color: '',
|
|
26
26
|
},
|
|
27
|
-
base: { name: "
|
|
28
|
-
}, "system-icon-circle-
|
|
27
|
+
base: { name: "3mr210", styles: "box-sizing:border-box;background:var(--background-system-icon-circle-308b31, var(--cnvs-sys-color-bg-alt-soft));display:flex;align-items:center;justify-content:center;padding:var(--cnvs-sys-space-zero);border:none;border-radius:var(--cnvs-sys-shape-round);overflow:hidden;width:var(--containerSize-system-icon-circle-308b31, var(--cnvs-sys-space-x10));height:var(--containerSize-system-icon-circle-308b31, var(--cnvs-sys-space-x10));--size-svg-8fcab8:calc(var(--containerSize-system-icon-circle-308b31, var(--cnvs-sys-space-x10)) * 0.625);--color-system-icon-3a4847:var(--color-system-icon-circle-308b31);& img{width:100%;height:100%;}" }
|
|
28
|
+
}, "system-icon-circle-308b31");
|
|
29
29
|
exports.SystemIconCircle = (0, common_1.createComponent)('span')({
|
|
30
30
|
displayName: 'SystemIconCircle',
|
|
31
|
-
Component: ({ background, color, size, icon, shouldMirror, ...elemProps }, ref, Element) => {
|
|
31
|
+
Component: ({ background, color, size, icon, shouldMirror, shouldMirrorInRTL, ...elemProps }, ref, Element) => {
|
|
32
32
|
// `pickForegroundColor` hasn't support to use css variables to generate foregroundColor
|
|
33
33
|
const backgroundFallback = background && !background.startsWith('--') ? background : tokens_1.colors.soap200;
|
|
34
34
|
const iconColor = (0, common_1.pickForegroundColor)(backgroundFallback, 'rgba(0,0,0,0.65)', tokens_1.colors.frenchVanilla100);
|
|
@@ -36,6 +36,6 @@ exports.SystemIconCircle = (0, common_1.createComponent)('span')({
|
|
|
36
36
|
containerSize: typeof size === 'number' ? (0, canvas_kit_styling_1.px2rem)(size) : size,
|
|
37
37
|
background: (0, Svg_1.transformColorNameToToken)(background),
|
|
38
38
|
color: color || iconColor,
|
|
39
|
-
})), children: (0, jsx_runtime_1.jsx)(SystemIcon_1.SystemIcon, { as: Element, ref: ref, icon: icon, shouldMirror: shouldMirror }) }));
|
|
39
|
+
})), children: (0, jsx_runtime_1.jsx)(SystemIcon_1.SystemIcon, { as: Element, ref: ref, icon: icon, shouldMirror: shouldMirror, shouldMirrorInRTL: shouldMirrorInRTL }) }));
|
|
40
40
|
},
|
|
41
41
|
});
|
|
@@ -21,7 +21,7 @@ exports.modalOverlayContainerStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
21
21
|
}, "modal-overlay-container-bd009b");
|
|
22
22
|
exports.useModalOverlay = (0, common_1.createElemPropsHook)(popup_1.usePopupModel)(({ state }, ref) => {
|
|
23
23
|
const elementRef = (0, common_1.useForkRef)(ref, state.stackRef);
|
|
24
|
-
(0, popup_1.usePopupStack)(elementRef);
|
|
24
|
+
(0, popup_1.usePopupStack)(elementRef, state.targetRef);
|
|
25
25
|
return {
|
|
26
26
|
// The ref should not be applied to an element. The passed ref will apply to the stackRef instead
|
|
27
27
|
ref: undefined,
|
|
@@ -33,10 +33,10 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
33
33
|
const usePaginationModel_1 = require("./usePaginationModel");
|
|
34
34
|
exports.paginationPageButtonStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
35
35
|
extends: button_1.buttonStencil,
|
|
36
|
-
base: { name: "23ov13", styles: "box-sizing:border-box;min-width:var(--cnvs-sys-space-x8);padding:var(--cnvs-sys-space-zero);font-weight:var(--cnvs-sys-font-weight-normal);--label-button-
|
|
36
|
+
base: { name: "23ov13", styles: "box-sizing:border-box;min-width:var(--cnvs-sys-space-x8);padding:var(--cnvs-sys-space-zero);font-weight:var(--cnvs-sys-font-weight-normal);--label-button-85bf0e:var(--cnvs-sys-color-fg-default);&:hover, &.hover{--background-button-85bf0e:var(--cnvs-sys-color-bg-alt-soft);--label-button-85bf0e:var(--cnvs-sys-color-fg-strong);}&:active, &.active, &:focus-visible, &.focus{--label-button-85bf0e:var(--cnvs-sys-color-fg-strong);}&:disabled, &.disabled{--background-button-85bf0e:var(--cnvs-sys-color-fg-disabled);}" },
|
|
37
37
|
modifiers: {
|
|
38
38
|
toggled: {
|
|
39
|
-
true: { name: "140272", styles: "font-weight:var(--cnvs-sys-font-weight-bold);--background-button-
|
|
39
|
+
true: { name: "140272", styles: "font-weight:var(--cnvs-sys-font-weight-bold);--background-button-85bf0e:var(--cnvs-brand-primary-base);--label-button-85bf0e:var(--cnvs-sys-color-fg-inverse);&:hover, &.hover, &:active, &.active, &:focus-visible, &.focus{--background-button-85bf0e:var(--cnvs-brand-primary-base);--label-button-85bf0e:var(--cnvs-sys-color-fg-inverse);}&:disabled, &.disabled{--background-button-85bf0e:var(--cnvs-sys-color-fg-disabled);}" }
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}, "pagination-page-button-88d20c");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopupStack.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/usePopupStack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,aAAa,mEAEf,WAAW,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAClD,MAAM,SAAS,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"usePopupStack.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/usePopupStack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,aAAa,mEAEf,WAAW,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAClD,MAAM,SAAS,CAAC,WAAW,CAyF7B,CAAC"}
|
|
@@ -52,7 +52,6 @@ const react_2 = require("@emotion/react");
|
|
|
52
52
|
*/
|
|
53
53
|
const usePopupStack = (ref, target) => {
|
|
54
54
|
const { elementRef, localRef } = (0, common_1.useLocalRef)(ref);
|
|
55
|
-
const isRTL = (0, common_1.useIsRTL)();
|
|
56
55
|
// Pulls the theme from the context so that we can pass it to `useCanvasThemeToCssVars`
|
|
57
56
|
const theme = react_1.default.useContext(react_2.ThemeContext);
|
|
58
57
|
const { className, style } = (0, common_1.useCanvasThemeToCssVars)(theme, {});
|
|
@@ -89,13 +88,17 @@ const usePopupStack = (ref, target) => {
|
|
|
89
88
|
// hierarchy, so we'll add it back here.
|
|
90
89
|
react_1.default.useLayoutEffect(() => {
|
|
91
90
|
var _a, _b;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
const targetEl = target ? ('current' in target ? target.current : target) : undefined;
|
|
92
|
+
if (targetEl) {
|
|
93
|
+
const isRTL = (0, common_1.isElementRTL)(targetEl);
|
|
94
|
+
if (isRTL) {
|
|
95
|
+
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute('dir', 'rtl');
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
(_b = localRef.current) === null || _b === void 0 ? void 0 : _b.setAttribute('dir', 'ltr');
|
|
99
|
+
}
|
|
97
100
|
}
|
|
98
|
-
}, [localRef,
|
|
101
|
+
}, [localRef, target]);
|
|
99
102
|
/**
|
|
100
103
|
* This pulls the className that gets generated by `useCanvasThemeToCssVars` and adds it to the Popup element to ensure
|
|
101
104
|
* theming is applied. Popups get portaled to the DOM and therefore don't "live" inside the CanvasProvider.
|
|
@@ -9,7 +9,7 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
9
9
|
const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
10
10
|
const segmentedControlButtonStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
11
11
|
extends: button_1.buttonStencil,
|
|
12
|
-
base: { name: "1lnc1a", styles: "box-sizing:border-box;border-inline-start:none;min-width:auto;--background-button-
|
|
12
|
+
base: { name: "1lnc1a", styles: "box-sizing:border-box;border-inline-start:none;min-width:auto;--background-button-85bf0e:var(--cnvs-sys-color-bg-alt-soft);--border-button-85bf0e:var(--cnvs-sys-color-border-container);--borderRadius-button-85bf0e:var(--cnvs-sys-shape-zero);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-soft);&:hover, &.hover{--background-button-85bf0e:var(--cnvs-sys-color-bg-alt-default);--color-system-icon-3a4847:var(--cnvs-sys-color-icon-strong);}&:active, &.active{--background-button-85bf0e:var(--cnvs-sys-color-bg-alt-stronger);}&:disabled, &.disabled{--background-button-85bf0e:var(--cnvs-sys-color-bg-alt-softer);--border-button-85bf0e:var(--cnvs-sys-color-border-container);--color-system-icon-3a4847:var(--cnvs-sys-color-icon-soft);}&:first-of-type{border-radius:var(--cnvs-sys-shape-x1) 0 0 var(--cnvs-sys-shape-x1);border-inline-start:0.0625rem solid var(--cnvs-sys-color-border-container);}&:last-of-type{border-radius:0 var(--cnvs-sys-shape-x1) var(--cnvs-sys-shape-x1) 0;}&[aria-pressed=\"true\"]{--background-button-85bf0e:var(--cnvs-brand-primary-base);--border-button-85bf0e:var(--cnvs-brand-primary-base);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-inverse);&:first-of-type{border-inline-start-color:var(--cnvs-brand-primary-base);}&:disabled, &.disabled{--background-button-85bf0e:var(--cnvs-sys-color-bg-alt-softer);--border-button-85bf0e:var(--cnvs-sys-color-border-container);--color-system-icon-3a4847:var(--cnvs-sys-color-icon-soft);}}&:focus-visible, &.focus{border-radius:var(--cnvs-sys-shape-x1);z-index:1;animation:none;transition:all 120ms border-radius 1ms;}" },
|
|
13
13
|
modifiers: {
|
|
14
14
|
segmentedControlButtonSize: {
|
|
15
15
|
small: { name: "151b63", styles: "width:var(--cnvs-sys-space-x8);height:var(--cnvs-sys-space-x8);" },
|
|
@@ -377,11 +377,7 @@ export declare const useTabsItem: import("@workday/canvas-kit-react/common").Beh
|
|
|
377
377
|
readonly style: {};
|
|
378
378
|
readonly inert: boolean | "" | undefined;
|
|
379
379
|
}, import("@workday/canvas-kit-react/common").MergeProps<{
|
|
380
|
-
readonly onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
381
|
-
* Part of the ARIA specification for tabs. Lets screen readers know which tab is active. This
|
|
382
|
-
* should either be `true` or `undefined` and never `false`. This is automatically set by the
|
|
383
|
-
* component and should only be used in advanced cases.
|
|
384
|
-
*/
|
|
380
|
+
readonly onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
385
381
|
readonly onClick: () => void;
|
|
386
382
|
readonly 'data-focus-id': string;
|
|
387
383
|
readonly tabIndex: 0 | -1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsItem.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAA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|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
14
14
|
const tabItemStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
15
|
-
base: { name: "43htft", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default), Helvetica Neue, Helvetica, Arial, sans-serif;font-weight:var(--cnvs-sys-font-weight-medium);line-height:var(--cnvs-sys-line-height-subtext-large);font-size:var(--cnvs-sys-font-size-subtext-large);letter-spacing:var(--cnvs-base-letter-spacing-150);border:none;background-color:transparent;flex:0 0 auto;min-width:var(--cnvs-sys-space-zero);align-items:center;padding:var(--cnvs-sys-space-x3) var(--cnvs-sys-space-x4);height:3.25rem;cursor:pointer;color:var(--cnvs-sys-color-fg-muted-default);position:relative;border-radius:var(--cnvs-sys-space-x1) var(--cnvs-sys-space-x1) var(--cnvs-sys-space-zero) var(--cnvs-sys-space-zero);transition:background 150ms ease, color 150ms ease;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;--color-system-icon-3a4847:currentColor;&:has(span){display:flex;gap:var(--cnvs-sys-space-x2);}&:hover, &.hover, &:focus-visible, &.focus{background-color:var(--cnvs-sys-color-bg-alt-default);color:var(--cnvs-sys-color-fg-contrast-default);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-contrast-default);}&:focus-visible, &.focus{outline:0.125rem solid transparent;box-shadow:inset 0 0 0 2px var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1)), inset 0 0 0 2px var(--cnvs-sys-color-border-inverse, rgba(255,255,255,1));--boxShadowInner-button-
|
|
15
|
+
base: { name: "43htft", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default), Helvetica Neue, Helvetica, Arial, sans-serif;font-weight:var(--cnvs-sys-font-weight-medium);line-height:var(--cnvs-sys-line-height-subtext-large);font-size:var(--cnvs-sys-font-size-subtext-large);letter-spacing:var(--cnvs-base-letter-spacing-150);border:none;background-color:transparent;flex:0 0 auto;min-width:var(--cnvs-sys-space-zero);align-items:center;padding:var(--cnvs-sys-space-x3) var(--cnvs-sys-space-x4);height:3.25rem;cursor:pointer;color:var(--cnvs-sys-color-fg-muted-default);position:relative;border-radius:var(--cnvs-sys-space-x1) var(--cnvs-sys-space-x1) var(--cnvs-sys-space-zero) var(--cnvs-sys-space-zero);transition:background 150ms ease, color 150ms ease;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;--color-system-icon-3a4847:currentColor;&:has(span){display:flex;gap:var(--cnvs-sys-space-x2);}&:hover, &.hover, &:focus-visible, &.focus{background-color:var(--cnvs-sys-color-bg-alt-default);color:var(--cnvs-sys-color-fg-contrast-default);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-contrast-default);}&:focus-visible, &.focus{outline:0.125rem solid transparent;box-shadow:inset 0 0 0 2px var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1)), inset 0 0 0 2px var(--cnvs-sys-color-border-inverse, rgba(255,255,255,1));--boxShadowInner-button-85bf0e:var(--cnvs-sys-color-border-inverse);--boxShadowOuter-button-85bf0e:var(--cnvs-brand-common-focus-outline);--color-system-icon-3a4847:var(--cnvs-sys-color-icon-strong);}&:disabled, &.disabled, &[aria-disabled]{color:var(--cnvs-sys-color-text-disabled);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-disabled);&:hover{cursor:auto;background-color:var(--cnvs-sys-color-bg-transparent-default);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-disabled);}}&[aria-selected=true]{color:var(--cnvs-brand-primary-base);cursor:default;--color-system-icon-3a4847:var(--cnvs-brand-primary-base);&:after{position:absolute;border-bottom:var(--cnvs-sys-space-x1) solid transparent;border-radius:var(--cnvs-sys-shape-x1) var(--cnvs-sys-shape-x1) var(--cnvs-sys-shape-zero) var(--cnvs-sys-shape-zero);background-color:var(--cnvs-brand-primary-base);bottom:var(--cnvs-sys-space-zero);content:'';left:var(--cnvs-sys-space-zero);margin-block-start:calc(calc(var(--cnvs-sys-space-x2) / var(--cnvs-sys-space-x1)) * -1);width:100%;}&:hover, &.hover, &:focus-visible, &.focus{background-color:var(--cnvs-sys-color-bg-transparent-default);color:var(--cnvs-brand-primary-base);}}" }
|
|
16
16
|
}, "tab-item-116136");
|
|
17
17
|
exports.StyledTabItem = (0, common_1.createComponent)('button')({
|
|
18
18
|
displayName: 'StyledTabItem',
|