@kaizen/components 0.0.0-canary-introduce-next-entrypoint-20250225031042 → 0.0.0-canary-react-19-peer-20250303022312
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/bin/codemod.sh +2 -0
- package/codemods/README.md +46 -0
- package/codemods/upgradeV1Buttons/index.ts +19 -0
- package/codemods/upgradeV1Buttons/transformV1ButtonAttributes.spec.ts +210 -0
- package/codemods/upgradeV1Buttons/transformV1ButtonAttributes.ts +146 -0
- package/codemods/upgradeV1Buttons/upgradeV1Buttons.spec.ts +658 -0
- package/codemods/upgradeV1Buttons/upgradeV1Buttons.ts +93 -0
- package/codemods/utils/createJsxElementWithChildren.spec.ts +119 -0
- package/codemods/utils/createJsxElementWithChildren.ts +55 -0
- package/codemods/utils/createProp.spec.ts +75 -19
- package/codemods/utils/createProp.ts +8 -1
- package/codemods/utils/getKaioTagName.ts +13 -5
- package/codemods/utils/index.ts +1 -0
- package/dist/cjs/Calendar/CalendarPopover/CalendarPopover.cjs +38 -25
- package/dist/cjs/Focusable/Focusable.module.scss.cjs +6 -0
- package/dist/cjs/Link/Link.cjs +45 -0
- package/dist/cjs/Link/Link.module.css.cjs +20 -0
- package/dist/cjs/Link/subcomponents/LinkContent.cjs +34 -0
- package/dist/cjs/future.cjs +1 -1
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/next.cjs +1 -1
- package/dist/cjs/overlaysV3.cjs +0 -2
- package/dist/cjs/utilitiesV3.cjs +4 -0
- package/dist/esm/Calendar/CalendarPopover/CalendarPopover.mjs +39 -26
- package/dist/esm/Focusable/Focusable.module.scss.mjs +4 -0
- package/dist/esm/Link/Link.mjs +40 -0
- package/dist/esm/Link/Link.module.css.mjs +18 -0
- package/dist/esm/Link/subcomponents/LinkContent.mjs +26 -0
- package/dist/esm/future.mjs +1 -1
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/next.mjs +1 -1
- package/dist/esm/overlaysV3.mjs +0 -1
- package/dist/esm/utilitiesV3.mjs +2 -0
- package/dist/styles.css +8905 -8782
- package/dist/types/Link/Link.d.ts +39 -0
- package/dist/types/Link/index.d.ts +1 -0
- package/dist/types/Link/subcomponents/LinkContent.d.ts +8 -0
- package/dist/types/__next__/Tooltip/index.d.ts +0 -1
- package/dist/types/__next__/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +3 -3
- package/src/Calendar/CalendarPopover/CalendarPopover.module.scss +8 -0
- package/src/Calendar/CalendarPopover/CalendarPopover.tsx +13 -2
- package/src/Calendar/CalendarPopover/_docs/CalendarPopover.stickersheet.stories.tsx +1 -55
- package/src/Calendar/CalendarRange/_docs/CalendarRange.stickersheet.stories.tsx +1 -1
- package/src/Calendar/CalendarRange/_docs/CalendarRange.stories.tsx +1 -1
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.stickersheet.stories.tsx +1 -1
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.stories.tsx +1 -1
- package/src/DatePicker/_docs/DatePicker.stickersheet.stories.tsx +1 -1
- package/src/DatePicker/_docs/DatePicker.stories.tsx +1 -1
- package/src/DatePicker/_docs/getLocale.stickersheet.stories.tsx +1 -1
- package/src/DateRangePicker/_docs/DateRangePicker.stickersheet.stories.tsx +1 -1
- package/src/DateRangePicker/_docs/DateRangePicker.stories.tsx +1 -1
- package/src/{__next__/Tooltip/subcomponents/Focusable → Focusable}/_docs/ApiSpecification.mdx +3 -3
- package/src/{__next__/Tooltip/subcomponents/Focusable → Focusable}/_docs/Focusable.stories.tsx +1 -1
- package/src/Icon/_docs/Icon.docs.stories.tsx +1 -1
- package/src/Icon/_docs/Icon.mdx +1 -1
- package/src/Icon/_docs/Icon.stickersheet.stories.tsx +1 -1
- package/src/Link/Link.module.css +119 -0
- package/src/Link/Link.tsx +90 -0
- package/src/Link/_docs/Link--api-specification.mdx +133 -0
- package/src/Link/_docs/Link--api-usage-guidelines.mdx +107 -0
- package/src/Link/_docs/Link.doc.stories.tsx +238 -0
- package/src/Link/_docs/Link.stickersheet.stories.tsx +191 -0
- package/src/Link/index.ts +1 -0
- package/src/Link/subcomponents/LinkContent.tsx +31 -0
- package/src/LinkButton/_docs/LinkButton--api-specification.mdx +1 -57
- package/src/Modal/GenericModal/_docs/GenericModal.spec.stories.tsx +1 -1
- package/src/Modal/GenericModal/_docs/GenericModal.stories.tsx +1 -1
- package/src/Tile/subcomponents/GenericTile/GenericTile.spec.stories.tsx +1 -1
- package/src/Tile/subcomponents/GenericTile/_docs/GenericTile.stickersheet.stories.tsx +1 -1
- package/src/TitleBlockZen/TitleBlockZen.module.scss +1 -6
- package/src/__next__/Button/_docs/Button--migration-guide.mdx +81 -0
- package/src/__next__/Icon/_docs/Icon--api-specification.mdx +1 -1
- package/src/__next__/Icon/_docs/Icon--usage-guidelines.mdx +1 -1
- package/src/__next__/Menu/_docs/Menu--api-specification.mdx +1 -1
- package/src/__next__/Menu/_docs/Menu--usage-guidelines.mdx +1 -1
- package/src/__next__/Select/_docs/Select.mdx +2 -2
- package/src/__next__/Select/_docs/Select.stickersheet.stories.tsx +1 -1
- package/src/__next__/Select/_docs/Select.stories.tsx +1 -1
- package/src/__next__/Tabs/_docs/Tabs--api-specification.mdx +1 -1
- package/src/__next__/Tag/RemovableTag/_docs/RemovableTag.mdx +1 -1
- package/src/__next__/Tooltip/_docs/ApiSpecification.mdx +1 -1
- package/src/__next__/Tooltip/_docs/Tooltip.docs.stories.tsx +2 -1
- package/src/__next__/Tooltip/_docs/Tooltip.mdx +1 -1
- package/src/__next__/Tooltip/_docs/Tooltip.spec.stories.tsx +2 -1
- package/src/__next__/Tooltip/_docs/Tooltip.stories.tsx +2 -1
- package/src/__next__/Tooltip/index.ts +0 -1
- package/src/__next__/index.ts +4 -0
- package/src/index.ts +2 -0
- package/dist/cjs/__next__/Tooltip/subcomponents/Focusable/Focusable.module.scss.cjs +0 -6
- package/dist/esm/__next__/Tooltip/subcomponents/Focusable/Focusable.module.scss.mjs +0 -4
- /package/dist/cjs/{__next__/Tooltip/subcomponents/Focusable → Focusable}/Focusable.cjs +0 -0
- /package/dist/esm/{__next__/Tooltip/subcomponents/Focusable → Focusable}/Focusable.mjs +0 -0
- /package/dist/types/{__next__/Tooltip/subcomponents/Focusable → Focusable}/Focusable.d.ts +0 -0
- /package/dist/types/{__next__/Tooltip/subcomponents/Focusable → Focusable}/index.d.ts +0 -0
- /package/src/{__next__/Tooltip/subcomponents/Focusable → Focusable}/Focusable.module.scss +0 -0
- /package/src/{__next__/Tooltip/subcomponents/Focusable → Focusable}/Focusable.tsx +0 -0
- /package/src/{__next__/Tooltip/subcomponents/Focusable → Focusable}/index.ts +0 -0
package/dist/cjs/index.cjs
CHANGED
|
@@ -63,6 +63,7 @@ var getTruncatedLabel = require('./Filter/FilterMultiSelect/utils/getTruncatedLa
|
|
|
63
63
|
var getSelectedOptionLabels = require('./Filter/FilterMultiSelect/utils/getSelectedOptionLabels.cjs');
|
|
64
64
|
var getSelectedOptionKeys = require('./Filter/FilterMultiSelect/utils/getSelectedOptionKeys.cjs');
|
|
65
65
|
var FilterSelect = require('./Filter/FilterSelect/FilterSelect.cjs');
|
|
66
|
+
var Focusable = require('./Focusable/Focusable.cjs');
|
|
66
67
|
var GuidanceBlock = require('./GuidanceBlock/GuidanceBlock.cjs');
|
|
67
68
|
var Heading = require('./Heading/Heading.cjs');
|
|
68
69
|
var AcademyIcon = require('./Icon/AcademyIcon.cjs');
|
|
@@ -317,6 +318,7 @@ var InputSearch = require('./Input/InputSearch/InputSearch.cjs');
|
|
|
317
318
|
var KaizenProvider = require('./KaizenProvider/KaizenProvider.cjs');
|
|
318
319
|
var Label = require('./Label/Label.cjs');
|
|
319
320
|
var LabelledMessage = require('./LabelledMessage/LabelledMessage.cjs');
|
|
321
|
+
var Link = require('./Link/Link.cjs');
|
|
320
322
|
var LikertScaleLegacy = require('./LikertScaleLegacy/LikertScaleLegacy.cjs');
|
|
321
323
|
var LinkButton = require('./LinkButton/LinkButton.cjs');
|
|
322
324
|
var LoadingGraphic = require('./Loading/LoadingGraphic/LoadingGraphic.cjs');
|
|
@@ -510,6 +512,7 @@ exports.getTruncatedLabels = getTruncatedLabel.getTruncatedLabels;
|
|
|
510
512
|
exports.getSelectedOptionLabels = getSelectedOptionLabels.getSelectedOptionLabels;
|
|
511
513
|
exports.getSelectedOptionKeys = getSelectedOptionKeys.getSelectedOptionKeys;
|
|
512
514
|
exports.FilterSelect = FilterSelect.FilterSelect;
|
|
515
|
+
exports.Focusable = Focusable.Focusable;
|
|
513
516
|
exports.GuidanceBlock = GuidanceBlock.GuidanceBlock;
|
|
514
517
|
exports.Heading = Heading.Heading;
|
|
515
518
|
exports.AcademyIcon = AcademyIcon.AcademyIcon;
|
|
@@ -939,6 +942,7 @@ exports.InputSearch = InputSearch.InputSearch;
|
|
|
939
942
|
exports.KaizenProvider = KaizenProvider.KaizenProvider;
|
|
940
943
|
exports.Label = Label.Label;
|
|
941
944
|
exports.LabelledMessage = LabelledMessage.LabelledMessage;
|
|
945
|
+
exports.Link = Link.Link;
|
|
942
946
|
exports.LikertScaleLegacy = LikertScaleLegacy.LikertScaleLegacy;
|
|
943
947
|
exports.LinkButton = LinkButton.LinkButton;
|
|
944
948
|
exports.LoadingGraphic = LoadingGraphic.LoadingGraphic;
|
package/dist/cjs/next.cjs
CHANGED
|
@@ -17,7 +17,7 @@ var TabList = require('./__next__/Tabs/subcomponents/TabList/TabList.cjs');
|
|
|
17
17
|
var TabPanel = require('./__next__/Tabs/subcomponents/TabPanel/TabPanel.cjs');
|
|
18
18
|
var Tooltip = require('./__next__/Tooltip/Tooltip.cjs');
|
|
19
19
|
var TooltipTrigger = require('./__next__/Tooltip/TooltipTrigger.cjs');
|
|
20
|
-
var Focusable = require('./
|
|
20
|
+
var Focusable = require('./Focusable/Focusable.cjs');
|
|
21
21
|
var reactAriaComponents = require('react-aria-components');
|
|
22
22
|
exports.Button = Button.Button;
|
|
23
23
|
exports.Icon = Icon.Icon;
|
package/dist/cjs/overlaysV3.cjs
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Tooltip = require('./__next__/Tooltip/Tooltip.cjs');
|
|
4
4
|
var TooltipTrigger = require('./__next__/Tooltip/TooltipTrigger.cjs');
|
|
5
|
-
var Focusable = require('./__next__/Tooltip/subcomponents/Focusable/Focusable.cjs');
|
|
6
5
|
var reactAriaComponents = require('react-aria-components');
|
|
7
6
|
exports.Tooltip = Tooltip.Tooltip;
|
|
8
7
|
exports.TooltipTrigger = TooltipTrigger.TooltipTrigger;
|
|
9
|
-
exports.Focusable = Focusable.Focusable;
|
|
10
8
|
Object.defineProperty(exports, "TooltipContext", {
|
|
11
9
|
enumerable: true,
|
|
12
10
|
get: function () {
|
package/dist/cjs/utilitiesV3.cjs
CHANGED
|
@@ -63,6 +63,7 @@ var getTruncatedLabel = require('./Filter/FilterMultiSelect/utils/getTruncatedLa
|
|
|
63
63
|
var getSelectedOptionLabels = require('./Filter/FilterMultiSelect/utils/getSelectedOptionLabels.cjs');
|
|
64
64
|
var getSelectedOptionKeys = require('./Filter/FilterMultiSelect/utils/getSelectedOptionKeys.cjs');
|
|
65
65
|
var FilterSelect = require('./Filter/FilterSelect/FilterSelect.cjs');
|
|
66
|
+
var Focusable = require('./Focusable/Focusable.cjs');
|
|
66
67
|
var GuidanceBlock = require('./GuidanceBlock/GuidanceBlock.cjs');
|
|
67
68
|
var Heading = require('./Heading/Heading.cjs');
|
|
68
69
|
var AcademyIcon = require('./Icon/AcademyIcon.cjs');
|
|
@@ -317,6 +318,7 @@ var InputSearch = require('./Input/InputSearch/InputSearch.cjs');
|
|
|
317
318
|
var KaizenProvider = require('./KaizenProvider/KaizenProvider.cjs');
|
|
318
319
|
var Label = require('./Label/Label.cjs');
|
|
319
320
|
var LabelledMessage = require('./LabelledMessage/LabelledMessage.cjs');
|
|
321
|
+
var Link = require('./Link/Link.cjs');
|
|
320
322
|
var LikertScaleLegacy = require('./LikertScaleLegacy/LikertScaleLegacy.cjs');
|
|
321
323
|
var LinkButton = require('./LinkButton/LinkButton.cjs');
|
|
322
324
|
var LoadingGraphic = require('./Loading/LoadingGraphic/LoadingGraphic.cjs');
|
|
@@ -510,6 +512,7 @@ exports.getTruncatedLabels = getTruncatedLabel.getTruncatedLabels;
|
|
|
510
512
|
exports.getSelectedOptionLabels = getSelectedOptionLabels.getSelectedOptionLabels;
|
|
511
513
|
exports.getSelectedOptionKeys = getSelectedOptionKeys.getSelectedOptionKeys;
|
|
512
514
|
exports.FilterSelect = FilterSelect.FilterSelect;
|
|
515
|
+
exports.Focusable = Focusable.Focusable;
|
|
513
516
|
exports.GuidanceBlock = GuidanceBlock.GuidanceBlock;
|
|
514
517
|
exports.Heading = Heading.Heading;
|
|
515
518
|
exports.AcademyIcon = AcademyIcon.AcademyIcon;
|
|
@@ -939,6 +942,7 @@ exports.InputSearch = InputSearch.InputSearch;
|
|
|
939
942
|
exports.KaizenProvider = KaizenProvider.KaizenProvider;
|
|
940
943
|
exports.Label = Label.Label;
|
|
941
944
|
exports.LabelledMessage = LabelledMessage.LabelledMessage;
|
|
945
|
+
exports.Link = Link.Link;
|
|
942
946
|
exports.LikertScaleLegacy = LikertScaleLegacy.LikertScaleLegacy;
|
|
943
947
|
exports.LinkButton = LinkButton.LinkButton;
|
|
944
948
|
exports.LoadingGraphic = LoadingGraphic.LoadingGraphic;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import React, { useState } from 'react';
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import { useFloating, size, offset, autoPlacement, autoUpdate } from '@floating-ui/react-dom';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import styles from './CalendarPopover.module.scss.mjs';
|
|
@@ -18,36 +18,49 @@ const CalendarPopover = /*#__PURE__*/function () {
|
|
|
18
18
|
var _b = useState(null),
|
|
19
19
|
floatingElement = _b[0],
|
|
20
20
|
setFloatingElement = _b[1];
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
var _c = useFloating(__assign({
|
|
22
|
+
placement: 'bottom-start',
|
|
23
|
+
elements: {
|
|
24
|
+
reference: referenceElement,
|
|
25
|
+
floating: floatingElement
|
|
26
|
+
},
|
|
27
|
+
strategy: 'fixed',
|
|
28
|
+
middleware: [size({
|
|
29
|
+
apply: function (_a) {
|
|
30
|
+
var availableHeight = _a.availableHeight,
|
|
31
|
+
availableWidth = _a.availableWidth,
|
|
32
|
+
elements = _a.elements;
|
|
33
|
+
Object.assign(elements.floating.style, {
|
|
34
|
+
// 155 is enough of a minimum to cut off half of the second row of dates.
|
|
35
|
+
// This indicates to users that there is more content that is scrollable
|
|
36
|
+
maxHeight: "".concat(Math.max(availableHeight - 25, 155), "px"),
|
|
37
|
+
maxWidth: "".concat(availableWidth, "px")
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}), offset(15), autoPlacement({
|
|
41
|
+
allowedPlacements: ['bottom-start', 'bottom', 'top-start', 'top']
|
|
42
|
+
})],
|
|
43
|
+
whileElementsMounted: autoUpdate
|
|
44
|
+
}, floatingOptions)),
|
|
45
|
+
floatingStyles = _c.floatingStyles,
|
|
46
|
+
update = _c.update;
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
var _a;
|
|
49
|
+
if (floatingElement && referenceElement) {
|
|
50
|
+
// @ts-expect-error this can be removed when we update to react 19
|
|
51
|
+
referenceElement.popoverTargetElement = floatingElement;
|
|
52
|
+
(_a = floatingElement.showPopover) === null || _a === undefined ? undefined : _a.call(floatingElement);
|
|
53
|
+
update();
|
|
54
|
+
}
|
|
55
|
+
}, [referenceElement, floatingElement, update]);
|
|
45
56
|
return /*#__PURE__*/React.createElement("div", __assign({
|
|
46
57
|
ref: setFloatingElement,
|
|
47
58
|
style: floatingStyles,
|
|
48
59
|
className: classnames(styles.calendarPopover, classNameOverride),
|
|
49
60
|
role: "dialog",
|
|
50
|
-
"aria-modal": "true"
|
|
61
|
+
"aria-modal": "true",
|
|
62
|
+
// @ts-expect-error this can be removed when we update to react 19
|
|
63
|
+
popover: "manual"
|
|
51
64
|
}, restProps), children);
|
|
52
65
|
};
|
|
53
66
|
CalendarPopover.displayName = 'CalendarPopover';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { Link as Link$1 } from 'react-aria-components';
|
|
4
|
+
import { mergeClassNames } from '../utils/mergeClassNames.mjs';
|
|
5
|
+
import { LinkContent } from './subcomponents/LinkContent.mjs';
|
|
6
|
+
import styles from './Link.module.css.mjs';
|
|
7
|
+
const Link = /*#__PURE__*/function () {
|
|
8
|
+
const Link = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
9
|
+
var children = _a.children,
|
|
10
|
+
_b = _a.variant,
|
|
11
|
+
variant = _b === undefined ? 'primary' : _b,
|
|
12
|
+
_c = _a.size,
|
|
13
|
+
size = _c === undefined ? 'body' : _c,
|
|
14
|
+
icon = _a.icon,
|
|
15
|
+
_d = _a.iconPosition,
|
|
16
|
+
iconPosition = _d === undefined ? 'end' : _d,
|
|
17
|
+
_e = _a.isInline,
|
|
18
|
+
isInline = _e === undefined ? false : _e,
|
|
19
|
+
isDisabled = _a.isDisabled,
|
|
20
|
+
className = _a.className,
|
|
21
|
+
_f = _a.isUnderlined,
|
|
22
|
+
isUnderlined = _f === undefined ? true : _f,
|
|
23
|
+
otherProps = __rest(_a, ["children", "variant", "size", "icon", "iconPosition", "isInline", "isDisabled", "className", "isUnderlined"]);
|
|
24
|
+
var childIsFunction = typeof children === 'function';
|
|
25
|
+
return /*#__PURE__*/React.createElement(Link$1, __assign({
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: mergeClassNames(styles.link, isDisabled && styles.isDisabled, isInline ? styles.isInline : styles[size], styles[variant], className),
|
|
28
|
+
isDisabled: isDisabled
|
|
29
|
+
}, otherProps), function (racStateProps) {
|
|
30
|
+
return /*#__PURE__*/React.createElement(LinkContent, {
|
|
31
|
+
icon: icon,
|
|
32
|
+
iconPosition: iconPosition,
|
|
33
|
+
isUnderlined: isUnderlined
|
|
34
|
+
}, childIsFunction ? children(racStateProps) : children);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
Link.displayName = 'Link';
|
|
38
|
+
return Link;
|
|
39
|
+
}();
|
|
40
|
+
export { Link };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"link": "Link-module_link__8oxip",
|
|
3
|
+
"isUnderlined": "Link-module_isUnderlined__qvbtS",
|
|
4
|
+
"icon": "Link-module_icon__CXh2J",
|
|
5
|
+
"iconStart": "Link-module_iconStart__ZysGR",
|
|
6
|
+
"iconEnd": "Link-module_iconEnd__-DTiD",
|
|
7
|
+
"primary": "Link-module_primary__bmhX0",
|
|
8
|
+
"secondary": "Link-module_secondary__pyYIV",
|
|
9
|
+
"isInline": "Link-module_isInline__sznAm",
|
|
10
|
+
"extra-small": "Link-module_extra-small__nScM0",
|
|
11
|
+
"body": "Link-module_body__H4Jgj",
|
|
12
|
+
"intro-lede": "Link-module_intro-lede__38Y6J",
|
|
13
|
+
"small": "Link-module_small__4kJcR",
|
|
14
|
+
"white": "Link-module_white__qQr6q",
|
|
15
|
+
"isDisabled": "Link-module_isDisabled__gvLNv",
|
|
16
|
+
"reversed": "Link-module_reversed__IqX8B"
|
|
17
|
+
};
|
|
18
|
+
export { styles as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mergeClassNames } from '../../utils/mergeClassNames.mjs';
|
|
3
|
+
import styles from '../Link.module.css.mjs';
|
|
4
|
+
var LinkIcon = function (_a) {
|
|
5
|
+
var icon = _a.icon;
|
|
6
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
7
|
+
className: styles.icon
|
|
8
|
+
}, icon);
|
|
9
|
+
};
|
|
10
|
+
var LinkContent = function (_a) {
|
|
11
|
+
var children = _a.children,
|
|
12
|
+
icon = _a.icon,
|
|
13
|
+
iconPosition = _a.iconPosition,
|
|
14
|
+
isUnderlined = _a.isUnderlined;
|
|
15
|
+
var iconPositionStyling = iconPosition === 'start' ? styles.iconStart : styles.iconEnd;
|
|
16
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
17
|
+
className: mergeClassNames(styles.linkContent, isUnderlined && styles.isUnderlined)
|
|
18
|
+
}, icon && iconPosition === 'start' && /*#__PURE__*/React.createElement(LinkIcon, {
|
|
19
|
+
icon: icon
|
|
20
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
21
|
+
className: mergeClassNames(icon && iconPositionStyling)
|
|
22
|
+
}, children), icon && iconPosition === 'end' && /*#__PURE__*/React.createElement(LinkIcon, {
|
|
23
|
+
icon: icon
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
export { LinkContent };
|
package/dist/esm/future.mjs
CHANGED
|
@@ -15,5 +15,5 @@ export { TabList } from './__next__/Tabs/subcomponents/TabList/TabList.mjs';
|
|
|
15
15
|
export { TabPanel } from './__next__/Tabs/subcomponents/TabPanel/TabPanel.mjs';
|
|
16
16
|
export { Tooltip } from './__next__/Tooltip/Tooltip.mjs';
|
|
17
17
|
export { TooltipTrigger } from './__next__/Tooltip/TooltipTrigger.mjs';
|
|
18
|
-
export { Focusable } from './
|
|
18
|
+
export { Focusable } from './Focusable/Focusable.mjs';
|
|
19
19
|
export { TooltipContext } from 'react-aria-components';
|
package/dist/esm/index.mjs
CHANGED
|
@@ -61,6 +61,7 @@ export { getTruncatedLabels } from './Filter/FilterMultiSelect/utils/getTruncate
|
|
|
61
61
|
export { getSelectedOptionLabels } from './Filter/FilterMultiSelect/utils/getSelectedOptionLabels.mjs';
|
|
62
62
|
export { getSelectedOptionKeys } from './Filter/FilterMultiSelect/utils/getSelectedOptionKeys.mjs';
|
|
63
63
|
export { FilterSelect } from './Filter/FilterSelect/FilterSelect.mjs';
|
|
64
|
+
export { Focusable } from './Focusable/Focusable.mjs';
|
|
64
65
|
export { GuidanceBlock } from './GuidanceBlock/GuidanceBlock.mjs';
|
|
65
66
|
export { Heading } from './Heading/Heading.mjs';
|
|
66
67
|
export { AcademyIcon } from './Icon/AcademyIcon.mjs';
|
|
@@ -315,6 +316,7 @@ export { InputSearch } from './Input/InputSearch/InputSearch.mjs';
|
|
|
315
316
|
export { KaizenProvider } from './KaizenProvider/KaizenProvider.mjs';
|
|
316
317
|
export { Label } from './Label/Label.mjs';
|
|
317
318
|
export { LabelledMessage } from './LabelledMessage/LabelledMessage.mjs';
|
|
319
|
+
export { Link } from './Link/Link.mjs';
|
|
318
320
|
export { LikertScaleLegacy } from './LikertScaleLegacy/LikertScaleLegacy.mjs';
|
|
319
321
|
export { LinkButton } from './LinkButton/LinkButton.mjs';
|
|
320
322
|
export { LoadingGraphic } from './Loading/LoadingGraphic/LoadingGraphic.mjs';
|
package/dist/esm/next.mjs
CHANGED
|
@@ -15,5 +15,5 @@ export { TabList } from './__next__/Tabs/subcomponents/TabList/TabList.mjs';
|
|
|
15
15
|
export { TabPanel } from './__next__/Tabs/subcomponents/TabPanel/TabPanel.mjs';
|
|
16
16
|
export { Tooltip } from './__next__/Tooltip/Tooltip.mjs';
|
|
17
17
|
export { TooltipTrigger } from './__next__/Tooltip/TooltipTrigger.mjs';
|
|
18
|
-
export { Focusable } from './
|
|
18
|
+
export { Focusable } from './Focusable/Focusable.mjs';
|
|
19
19
|
export { TooltipContext } from 'react-aria-components';
|
package/dist/esm/overlaysV3.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { Tooltip } from './__next__/Tooltip/Tooltip.mjs';
|
|
2
2
|
export { TooltipTrigger } from './__next__/Tooltip/TooltipTrigger.mjs';
|
|
3
|
-
export { Focusable } from './__next__/Tooltip/subcomponents/Focusable/Focusable.mjs';
|
|
4
3
|
export { TooltipContext } from 'react-aria-components';
|
package/dist/esm/utilitiesV3.mjs
CHANGED
|
@@ -61,6 +61,7 @@ export { getTruncatedLabels } from './Filter/FilterMultiSelect/utils/getTruncate
|
|
|
61
61
|
export { getSelectedOptionLabels } from './Filter/FilterMultiSelect/utils/getSelectedOptionLabels.mjs';
|
|
62
62
|
export { getSelectedOptionKeys } from './Filter/FilterMultiSelect/utils/getSelectedOptionKeys.mjs';
|
|
63
63
|
export { FilterSelect } from './Filter/FilterSelect/FilterSelect.mjs';
|
|
64
|
+
export { Focusable } from './Focusable/Focusable.mjs';
|
|
64
65
|
export { GuidanceBlock } from './GuidanceBlock/GuidanceBlock.mjs';
|
|
65
66
|
export { Heading } from './Heading/Heading.mjs';
|
|
66
67
|
export { AcademyIcon } from './Icon/AcademyIcon.mjs';
|
|
@@ -315,6 +316,7 @@ export { InputSearch } from './Input/InputSearch/InputSearch.mjs';
|
|
|
315
316
|
export { KaizenProvider } from './KaizenProvider/KaizenProvider.mjs';
|
|
316
317
|
export { Label } from './Label/Label.mjs';
|
|
317
318
|
export { LabelledMessage } from './LabelledMessage/LabelledMessage.mjs';
|
|
319
|
+
export { Link } from './Link/Link.mjs';
|
|
318
320
|
export { LikertScaleLegacy } from './LikertScaleLegacy/LikertScaleLegacy.mjs';
|
|
319
321
|
export { LinkButton } from './LinkButton/LinkButton.mjs';
|
|
320
322
|
export { LoadingGraphic } from './Loading/LoadingGraphic/LoadingGraphic.mjs';
|