@instructure/ui-breadcrumb 11.6.0 → 11.6.1-pr-snapshot-1779894247159

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [11.6.1-pr-snapshot-1779894247159](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-pr-snapshot-1779894247159) (2026-05-27)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-breadcrumb
9
+
10
+
11
+
12
+
13
+
6
14
  # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-breadcrumb
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,4 +22,16 @@ exports.allowedProps = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- const allowedProps = exports.allowedProps = ['children', 'href', 'iconPlacement', 'onClick', 'onMouseEnter', 'renderIcon', 'size', 'isCurrentPage'];
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ coverage: Boolean(process.env.COVERAGE),
31
+ esModules: Boolean(process.env.ES_MODULES),
32
+ removeConsole: process.env.NODE_ENV === 'production',
33
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
34
+ }
35
+ ]
36
+ ]
37
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-breadcrumb",
3
- "version": "11.6.0",
3
+ "version": "11.6.1-pr-snapshot-1779894247159",
4
+ "type": "module",
4
5
  "description": "A breadcrumb component",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,24 +15,24 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/shared-types": "11.6.0",
19
- "@instructure/ui-icons": "11.6.0",
20
- "@instructure/emotion": "11.6.0",
21
- "@instructure/ui-link": "11.6.0",
22
- "@instructure/ui-react-utils": "11.6.0",
23
- "@instructure/ui-tooltip": "11.6.0",
24
- "@instructure/ui-utils": "11.6.0",
25
- "@instructure/ui-truncate-text": "11.6.0",
26
- "@instructure/ui-view": "11.6.0"
18
+ "@instructure/emotion": "11.6.1-pr-snapshot-1779894247159",
19
+ "@instructure/ui-icons": "11.6.1-pr-snapshot-1779894247159",
20
+ "@instructure/ui-link": "11.6.1-pr-snapshot-1779894247159",
21
+ "@instructure/shared-types": "11.6.1-pr-snapshot-1779894247159",
22
+ "@instructure/ui-react-utils": "11.6.1-pr-snapshot-1779894247159",
23
+ "@instructure/ui-tooltip": "11.6.1-pr-snapshot-1779894247159",
24
+ "@instructure/ui-utils": "11.6.1-pr-snapshot-1779894247159",
25
+ "@instructure/ui-truncate-text": "11.6.1-pr-snapshot-1779894247159",
26
+ "@instructure/ui-view": "11.6.1-pr-snapshot-1779894247159"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
30
  "@testing-library/react": "15.0.7",
31
31
  "vitest": "^3.2.2",
32
- "@instructure/ui-babel-preset": "11.6.0",
33
- "@instructure/ui-axe-check": "11.6.0",
34
- "@instructure/ui-scripts": "11.6.0",
35
- "@instructure/ui-themes": "11.6.0"
32
+ "@instructure/ui-babel-preset": "11.6.1-pr-snapshot-1779894247159",
33
+ "@instructure/ui-themes": "11.6.1-pr-snapshot-1779894247159",
34
+ "@instructure/ui-scripts": "11.6.1-pr-snapshot-1779894247159",
35
+ "@instructure/ui-axe-check": "11.6.1-pr-snapshot-1779894247159"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": ">=18 <=19"
@@ -45,10 +45,8 @@
45
45
  ".": {
46
46
  "types": "./types/index.d.ts",
47
47
  "import": "./es/index.js",
48
- "require": "./lib/index.js",
49
48
  "default": "./es/index.js"
50
49
  },
51
- "./lib/*": "./lib/*",
52
50
  "./es/*": "./es/*",
53
51
  "./types/*": "./types/*",
54
52
  "./package.json": "./package.json",
@@ -58,7 +56,7 @@
58
56
  "lint": "ui-scripts lint",
59
57
  "lint:fix": "ui-scripts lint --fix",
60
58
  "clean": "ui-scripts clean",
61
- "build": "ui-scripts build --modules es,cjs",
59
+ "build": "ui-scripts build",
62
60
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
63
61
  "build:types": "tsc -p tsconfig.build.json",
64
62
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
@@ -1,122 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.BreadcrumbLink = void 0;
7
- var _react = require("react");
8
- var _TruncateText = require("@instructure/ui-truncate-text/lib/TruncateText");
9
- var _Link = require("@instructure/ui-link/lib/Link");
10
- var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
11
- var _Tooltip = require("@instructure/ui-tooltip/lib/Tooltip");
12
- var _props = require("./props");
13
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
14
- /*
15
- * The MIT License (MIT)
16
- *
17
- * Copyright (c) 2015 - present Instructure, Inc.
18
- *
19
- * Permission is hereby granted, free of charge, to any person obtaining a copy
20
- * of this software and associated documentation files (the "Software"), to deal
21
- * in the Software without restriction, including without limitation the rights
22
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
- * copies of the Software, and to permit persons to whom the Software is
24
- * furnished to do so, subject to the following conditions:
25
- *
26
- * The above copyright notice and this permission notice shall be included in all
27
- * copies or substantial portions of the Software.
28
- *
29
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
- * SOFTWARE.
36
- */
37
-
38
- /**
39
- ---
40
- parent: Breadcrumb
41
- id: Breadcrumb.Link
42
- ---
43
- **/
44
-
45
- class BreadcrumbLink extends _react.Component {
46
- constructor(props) {
47
- super(props);
48
- this.ref = null;
49
- this.handleRef = el => {
50
- this.ref = el;
51
- };
52
- this.state = {
53
- isTruncated: false
54
- };
55
- }
56
- handleTruncation(isTruncated) {
57
- if (isTruncated !== this.state.isTruncated) {
58
- this.setState({
59
- isTruncated
60
- });
61
- }
62
- }
63
- render() {
64
- const _this$props = this.props,
65
- children = _this$props.children,
66
- href = _this$props.href,
67
- renderIcon = _this$props.renderIcon,
68
- iconPlacement = _this$props.iconPlacement,
69
- onClick = _this$props.onClick,
70
- onMouseEnter = _this$props.onMouseEnter,
71
- isCurrentPage = _this$props.isCurrentPage;
72
- const isTruncated = this.state.isTruncated;
73
- const props = (0, _omitProps.omitProps)(this.props, BreadcrumbLink.allowedProps);
74
- const isInteractive = onClick || href;
75
- return (0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
76
- renderTip: children,
77
- preventTooltip: !isTruncated
78
- // this wraps the achor/button tag in a span and puts the aria-describedby on that instead of the anchor/button tag
79
- // to avoid SRs reading the text twice when there is already an aria-label
80
- ,
81
- ...(isInteractive && {
82
- as: 'span'
83
- }),
84
- children: (0, _jsxRuntime.jsx)(_Link.Link, {
85
- ...props,
86
- href: href,
87
- renderIcon: renderIcon,
88
- iconPlacement: iconPlacement,
89
- onClick: onClick,
90
- onMouseEnter: onMouseEnter,
91
- isWithinText: false,
92
- elementRef: this.handleRef,
93
- forceButtonRole: false,
94
- ...(isCurrentPage && {
95
- 'aria-current': 'page'
96
- }),
97
- ...(isTruncated && {
98
- ...(typeof children === 'string' && {
99
- 'aria-label': children
100
- }),
101
- ...(!isInteractive && {
102
- role: 'text'
103
- })
104
- }),
105
- "data-cid": "BreadcrumbLink",
106
- children: (0, _jsxRuntime.jsx)(_TruncateText.TruncateText, {
107
- onUpdate: isTruncated => this.handleTruncation(isTruncated),
108
- children: (0, _jsxRuntime.jsx)("span", {
109
- "aria-hidden": isTruncated,
110
- children: children
111
- })
112
- })
113
- })
114
- });
115
- }
116
- }
117
- exports.BreadcrumbLink = BreadcrumbLink;
118
- BreadcrumbLink.displayName = "BreadcrumbLink";
119
- BreadcrumbLink.componentId = 'Breadcrumb.Link';
120
- BreadcrumbLink.allowedProps = _props.allowedProps;
121
- BreadcrumbLink.defaultProps = {};
122
- var _default = exports.default = BreadcrumbLink;
@@ -1,122 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Breadcrumb = void 0;
8
- Object.defineProperty(exports, "BreadcrumbLink", {
9
- enumerable: true,
10
- get: function () {
11
- return _BreadcrumbLink.BreadcrumbLink;
12
- }
13
- });
14
- exports.default = void 0;
15
- var _react = require("react");
16
- var _View = require("@instructure/ui-view/lib/View");
17
- var _emotion = require("@instructure/emotion");
18
- var _IconArrowOpenEndSolid = require("@instructure/ui-icons/lib/IconArrowOpenEndSolid.js");
19
- var _BreadcrumbLink = require("./BreadcrumbLink");
20
- var _styles = _interopRequireDefault(require("./styles"));
21
- var _theme = _interopRequireDefault(require("./theme"));
22
- var _props = require("./props");
23
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
24
- var _dec, _class, _Breadcrumb;
25
- /*
26
- * The MIT License (MIT)
27
- *
28
- * Copyright (c) 2015 - present Instructure, Inc.
29
- *
30
- * Permission is hereby granted, free of charge, to any person obtaining a copy
31
- * of this software and associated documentation files (the "Software"), to deal
32
- * in the Software without restriction, including without limitation the rights
33
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
- * copies of the Software, and to permit persons to whom the Software is
35
- * furnished to do so, subject to the following conditions:
36
- *
37
- * The above copyright notice and this permission notice shall be included in all
38
- * copies or substantial portions of the Software.
39
- *
40
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46
- * SOFTWARE.
47
- */
48
- /**
49
- ---
50
- category: components
51
- ---
52
- **/
53
- let Breadcrumb = exports.Breadcrumb = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_Breadcrumb = class Breadcrumb extends _react.Component {
54
- constructor(...args) {
55
- super(...args);
56
- this.ref = null;
57
- this.handleRef = el => {
58
- this.ref = el;
59
- };
60
- this.addAriaCurrent = child => {
61
- const updatedChild = /*#__PURE__*/(0, _react.cloneElement)(child, {
62
- 'aria-current': 'page'
63
- });
64
- return updatedChild;
65
- };
66
- }
67
- componentDidMount() {
68
- var _this$props$makeStyle, _this$props;
69
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
70
- }
71
- componentDidUpdate() {
72
- var _this$props$makeStyle2, _this$props2;
73
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
74
- }
75
- renderChildren() {
76
- const _this$props3 = this.props,
77
- styles = _this$props3.styles,
78
- children = _this$props3.children;
79
- const numChildren = _react.Children.count(children);
80
- const inlineStyle = {
81
- maxWidth: `${Math.floor(100 / numChildren)}%`
82
- };
83
- let isAriaCurrentSet = false;
84
- return _react.Children.map(children, (child, index) => {
85
- const isLastElement = index === numChildren - 1;
86
- if (/*#__PURE__*/(0, _react.isValidElement)(child)) {
87
- const isCurrentPage = child.props.isCurrentPage || false;
88
- if (isAriaCurrentSet && isCurrentPage) {}
89
- if (isCurrentPage) {
90
- isAriaCurrentSet = true;
91
- }
92
- }
93
- return (0, _jsxRuntime.jsxs)("li", {
94
- css: styles === null || styles === void 0 ? void 0 : styles.crumb,
95
- style: inlineStyle,
96
- children: [!isAriaCurrentSet && isLastElement && child.props.isCurrentPage !== false ? this.addAriaCurrent(child) : child, index < numChildren - 1 && (0, _jsxRuntime.jsx)(_IconArrowOpenEndSolid.IconArrowOpenEndSolid, {
97
- color: "auto",
98
- css: styles === null || styles === void 0 ? void 0 : styles.separator
99
- })]
100
- });
101
- });
102
- }
103
- render() {
104
- const styles = this.props.styles;
105
- return (0, _jsxRuntime.jsx)(_View.View, {
106
- role: "navigation",
107
- as: "div",
108
- margin: this.props.margin,
109
- "aria-label": this.props.label,
110
- elementRef: this.handleRef,
111
- "data-cid": "Breadcrumb",
112
- children: (0, _jsxRuntime.jsx)("ol", {
113
- css: styles === null || styles === void 0 ? void 0 : styles.breadcrumb,
114
- children: this.renderChildren()
115
- })
116
- });
117
- }
118
- }, _Breadcrumb.displayName = "Breadcrumb", _Breadcrumb.componentId = 'Breadcrumb', _Breadcrumb.allowedProps = _props.allowedProps, _Breadcrumb.defaultProps = {
119
- size: 'medium',
120
- children: null
121
- }, _Breadcrumb.Link = _BreadcrumbLink.BreadcrumbLink, _Breadcrumb)) || _class);
122
- var _default = exports.default = Breadcrumb;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const allowedProps = exports.allowedProps = ['children', 'label', 'margin', 'size'];
@@ -1,110 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * ---
33
- * private: true
34
- * ---
35
- * Generates the style object from the theme and provided additional information
36
- * @param {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @param {Object} state the state of the component, the style is applied to
39
- * @return {Object} The final style object, which will be used in the component
40
- */
41
- const generateStyle = (componentTheme, props) => {
42
- const size = props.size;
43
- const crumbSizeVariants = {
44
- small: {
45
- fontSize: componentTheme.smallFontSize,
46
- paddingInlineEnd: `calc(${componentTheme.smallSeparatorFontSize} * 2)`,
47
- paddingInlineStart: 0
48
- },
49
- medium: {
50
- fontSize: componentTheme.mediumFontSize,
51
- paddingInlineEnd: `calc(${componentTheme.mediumSeparatorFontSize} * 2)`,
52
- paddingInlineStart: 0
53
- },
54
- large: {
55
- fontSize: componentTheme.largeFontSize,
56
- paddingInlineEnd: `calc(${componentTheme.largeSeparatorFontSize} * 2)`,
57
- paddingInlineStart: 0
58
- }
59
- };
60
- const separatorSizeVariants = {
61
- small: {
62
- fontSize: componentTheme.smallSeparatorFontSize,
63
- insetInlineEnd: `calc(${componentTheme.smallSeparatorFontSize} / 2)`,
64
- insetInlineStart: 'auto',
65
- marginTop: `calc(-1 * (${componentTheme.smallSeparatorFontSize} / 2))`
66
- },
67
- medium: {
68
- fontSize: componentTheme.mediumSeparatorFontSize,
69
- insetInlineEnd: `calc(${componentTheme.mediumSeparatorFontSize} / 2)`,
70
- insetInlineStart: 'auto',
71
- marginTop: `calc(-1 * (${componentTheme.mediumSeparatorFontSize} / 2))`
72
- },
73
- large: {
74
- fontSize: componentTheme.largeSeparatorFontSize,
75
- insetInlineEnd: `calc(${componentTheme.largeSeparatorFontSize} / 2)`,
76
- insetInlineStart: 'auto',
77
- marginTop: `calc(-1 * (${componentTheme.largeSeparatorFontSize} / 2))`
78
- }
79
- };
80
- return {
81
- breadcrumb: {
82
- label: 'breadcrumb',
83
- fontFamily: componentTheme.fontFamily,
84
- margin: 0,
85
- padding: 0,
86
- listStyleType: 'none',
87
- overflow: 'visible',
88
- display: 'flex',
89
- alignItems: 'center'
90
- },
91
- crumb: {
92
- label: 'breadcrumb__crumb',
93
- boxSizing: 'border-box',
94
- position: 'relative',
95
- ...crumbSizeVariants[size],
96
- '&:last-child': {
97
- paddingInlineEnd: 0
98
- }
99
- },
100
- separator: {
101
- label: 'breadcrumb__separator',
102
- boxSizing: 'border-box',
103
- position: 'absolute',
104
- top: '50%',
105
- color: componentTheme.separatorColor,
106
- ...separatorSizeVariants[size]
107
- }
108
- };
109
- };
110
- var _default = exports.default = generateStyle;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- var _colors$contrasts;
38
- const colors = theme.colors,
39
- typography = theme.typography;
40
- const componentVariables = {
41
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
42
- separatorColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey4570,
43
- smallSeparatorFontSize: '0.5rem',
44
- smallFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
45
- mediumSeparatorFontSize: '0.75rem',
46
- mediumFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
47
- largeSeparatorFontSize: '1rem',
48
- largeFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge
49
- };
50
- return {
51
- ...componentVariables
52
- };
53
- };
54
- var _default = exports.default = generateComponentTheme;
package/lib/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Breadcrumb", {
7
- enumerable: true,
8
- get: function () {
9
- return _Breadcrumb.Breadcrumb;
10
- }
11
- });
12
- Object.defineProperty(exports, "BreadcrumbLink", {
13
- enumerable: true,
14
- get: function () {
15
- return _Breadcrumb.BreadcrumbLink;
16
- }
17
- });
18
- var _Breadcrumb = require("./Breadcrumb");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}