@oaknational/oak-components 3.20.2 → 3.21.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/dist/npm/cjs/index.js +2 -2
- package/dist/npm/cjs/types.d.ts +1 -0
- package/dist/npm/es/components/internal-components/InternalLink/InternalLink.js +1 -1
- package/dist/npm/es/components/navigation/OakBreadcrumbs/OakBreadcrumbs.js +1 -1
- package/dist/npm/es/types.d.ts +1 -0
- package/package.json +15 -16
package/dist/npm/cjs/index.js
CHANGED
|
@@ -1817,7 +1817,7 @@ var variantConfig = {
|
|
|
1817
1817
|
|
|
1818
1818
|
var StyledOakIcon$3 = styled__default.default(OakIcon)(templateObject_1$1x || (templateObject_1$1x = tslib.__makeTemplateObject(["\n width: 1.25em;\n min-width: 1.25em;\n height: 1.25em;\n min-height: 1.25em;\n"], ["\n width: 1.25em;\n min-width: 1.25em;\n height: 1.25em;\n min-height: 1.25em;\n"])));
|
|
1819
1819
|
var StyledOakLoadingSpinner = styled__default.default(OakLoadingSpinner)(templateObject_2$I || (templateObject_2$I = tslib.__makeTemplateObject(["\n --width: 1.25em;\n"], ["\n --width: 1.25em;\n"])));
|
|
1820
|
-
var StyledLink$1 = styled__default.default.a(templateObject_3$t || (templateObject_3$t = tslib.__makeTemplateObject(["\n display: inline;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"], ["\n display: inline;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"])), parseSpacing("spacing-4"), parseBorderRadius("border-radius-m"), parseSpacing("spacing-4"), parseSpacing("spacing-4"), function (props) { return (props.$font ? typographyStyle : "font: inherit;"); }, function (props) { return props.$textDecoration; }, function (props) { return parseColor(props.$color); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$color); }, parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), function (props) { return parseColor(props.$visitedColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$visitedColor); }, function (props) { return parseColor(props.$hoverColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$hoverColor); }, function (props) { return parseColor(props.$activeColor); }, function (props) { return parseColor(props.$activeColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$activeColor); }, function (props) { return parseColor(props.$disabledColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$disabledColor); });
|
|
1820
|
+
var StyledLink$1 = styled__default.default.a(templateObject_3$t || (templateObject_3$t = tslib.__makeTemplateObject(["\n display: inline;\n text-align: left;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"], ["\n display: inline;\n text-align: left;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"])), parseSpacing("spacing-4"), parseBorderRadius("border-radius-m"), parseSpacing("spacing-4"), parseSpacing("spacing-4"), function (props) { return (props.$font ? typographyStyle : "font: inherit;"); }, function (props) { return props.$textDecoration; }, function (props) { return parseColor(props.$color); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$color); }, parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), function (props) { return parseColor(props.$visitedColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$visitedColor); }, function (props) { return parseColor(props.$hoverColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$hoverColor); }, function (props) { return parseColor(props.$activeColor); }, function (props) { return parseColor(props.$activeColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$activeColor); }, function (props) { return parseColor(props.$disabledColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$disabledColor); });
|
|
1821
1821
|
/**
|
|
1822
1822
|
* A link with an optional icon and loading state.
|
|
1823
1823
|
*
|
|
@@ -4521,7 +4521,7 @@ var OakBreadcrumbs = function (_a) {
|
|
|
4521
4521
|
return (React__default.default.createElement(BreadcrumbsLi, { key: "".concat(breadcrumb.text) },
|
|
4522
4522
|
breadcrumbIndex > 0 && (React__default.default.createElement(OakIcon, { "$height": "spacing-20", "$width": "spacing-20", iconName: "chevron-right" })),
|
|
4523
4523
|
isLast && (React__default.default.createElement(OakBreadcrumbText, { "aria-current": "page" }, breadcrumb.text)),
|
|
4524
|
-
!isLast && (React__default.default.createElement(OakLink, { variant: "secondary", href: breadcrumb.href, style: { overflow: "hidden" } },
|
|
4524
|
+
!isLast && (React__default.default.createElement(OakLink, { variant: "secondary", href: breadcrumb.href, style: { overflow: "hidden" }, onClick: breadcrumb.onClick },
|
|
4525
4525
|
React__default.default.createElement(OakBreadcrumbText, null, breadcrumb.text)))));
|
|
4526
4526
|
}))));
|
|
4527
4527
|
};
|
package/dist/npm/cjs/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
|
14
14
|
|
|
15
15
|
var StyledOakIcon = styled(OakIcon)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 1.25em;\n min-width: 1.25em;\n height: 1.25em;\n min-height: 1.25em;\n"], ["\n width: 1.25em;\n min-width: 1.25em;\n height: 1.25em;\n min-height: 1.25em;\n"])));
|
|
16
16
|
var StyledOakLoadingSpinner = styled(OakLoadingSpinner)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n --width: 1.25em;\n"], ["\n --width: 1.25em;\n"])));
|
|
17
|
-
var StyledLink = styled.a(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"], ["\n display: inline;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"])), parseSpacing("spacing-4"), parseBorderRadius("border-radius-m"), parseSpacing("spacing-4"), parseSpacing("spacing-4"), function (props) { return (props.$font ? typographyStyle : "font: inherit;"); }, function (props) { return props.$textDecoration; }, function (props) { return parseColor(props.$color); }, StyledOakIcon, function (props) { return parseColorFilter(props.$color); }, parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), function (props) { return parseColor(props.$visitedColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$visitedColor); }, function (props) { return parseColor(props.$hoverColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$hoverColor); }, function (props) { return parseColor(props.$activeColor); }, function (props) { return parseColor(props.$activeColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$activeColor); }, function (props) { return parseColor(props.$disabledColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$disabledColor); });
|
|
17
|
+
var StyledLink = styled.a(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline;\n text-align: left;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"], ["\n display: inline;\n text-align: left;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"])), parseSpacing("spacing-4"), parseBorderRadius("border-radius-m"), parseSpacing("spacing-4"), parseSpacing("spacing-4"), function (props) { return (props.$font ? typographyStyle : "font: inherit;"); }, function (props) { return props.$textDecoration; }, function (props) { return parseColor(props.$color); }, StyledOakIcon, function (props) { return parseColorFilter(props.$color); }, parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), function (props) { return parseColor(props.$visitedColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$visitedColor); }, function (props) { return parseColor(props.$hoverColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$hoverColor); }, function (props) { return parseColor(props.$activeColor); }, function (props) { return parseColor(props.$activeColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$activeColor); }, function (props) { return parseColor(props.$disabledColor); }, StyledOakIcon, function (props) { return parseColorFilter(props.$disabledColor); });
|
|
18
18
|
/**
|
|
19
19
|
* A link with an optional icon and loading state.
|
|
20
20
|
*
|
|
@@ -37,7 +37,7 @@ var OakBreadcrumbs = function (_a) {
|
|
|
37
37
|
return (React.createElement(BreadcrumbsLi, { key: "".concat(breadcrumb.text) },
|
|
38
38
|
breadcrumbIndex > 0 && (React.createElement(OakIcon, { "$height": "spacing-20", "$width": "spacing-20", iconName: "chevron-right" })),
|
|
39
39
|
isLast && (React.createElement(OakBreadcrumbText, { "aria-current": "page" }, breadcrumb.text)),
|
|
40
|
-
!isLast && (React.createElement(OakLink, { variant: "secondary", href: breadcrumb.href, style: { overflow: "hidden" } },
|
|
40
|
+
!isLast && (React.createElement(OakLink, { variant: "secondary", href: breadcrumb.href, style: { overflow: "hidden" }, onClick: breadcrumb.onClick },
|
|
41
41
|
React.createElement(OakBreadcrumbText, null, breadcrumb.text)))));
|
|
42
42
|
}))));
|
|
43
43
|
};
|
package/dist/npm/es/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oaknational/oak-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"licence": "MIT",
|
|
5
5
|
"packageManager": "pnpm@11.2.0",
|
|
6
6
|
"description": "Shared components for Oak applications",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"url": "^0.11.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@babel/plugin-transform-runtime": "^
|
|
71
|
-
"@babel/preset-env": "^
|
|
72
|
-
"@babel/preset-react": "^
|
|
73
|
-
"@babel/preset-typescript": "^
|
|
74
|
-
"@babel/runtime": "^
|
|
70
|
+
"@babel/plugin-transform-runtime": "^7.28.3",
|
|
71
|
+
"@babel/preset-env": "^7.28.3",
|
|
72
|
+
"@babel/preset-react": "^7.27.1",
|
|
73
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
74
|
+
"@babel/runtime": "^7.28.4",
|
|
75
75
|
"@commitlint/cli": "^18.4.4",
|
|
76
76
|
"@commitlint/config-conventional": "^18.4.4",
|
|
77
77
|
"@rollup/plugin-commonjs": "^29.0.2",
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
82
82
|
"@semantic-release/git": "^10.0.1",
|
|
83
83
|
"@semantic-release/npm": "^13.1.5",
|
|
84
|
-
"@storybook/addon-a11y": "
|
|
85
|
-
"@storybook/addon-docs": "
|
|
86
|
-
"@storybook/addon-links": "
|
|
87
|
-
"@storybook/addon-onboarding": "
|
|
88
|
-
"@storybook/addon-themes": "
|
|
89
|
-
"@storybook/nextjs": "
|
|
90
|
-
"@storybook/test-runner": "^0.24.
|
|
84
|
+
"@storybook/addon-a11y": "10.6.0",
|
|
85
|
+
"@storybook/addon-docs": "10.6.0",
|
|
86
|
+
"@storybook/addon-links": "10.6.0",
|
|
87
|
+
"@storybook/addon-onboarding": "10.6.0",
|
|
88
|
+
"@storybook/addon-themes": "10.6.0",
|
|
89
|
+
"@storybook/nextjs": "10.6.0",
|
|
90
|
+
"@storybook/test-runner": "^0.24.5",
|
|
91
91
|
"@testing-library/jest-dom": "^6.9.1",
|
|
92
92
|
"@testing-library/react": "^16.3.2",
|
|
93
93
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
|
116
116
|
"eslint-plugin-react": "^7.37.5",
|
|
117
117
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
118
|
-
"eslint-plugin-storybook": "
|
|
118
|
+
"eslint-plugin-storybook": "10.6.0",
|
|
119
119
|
"glob": "^12.0.0",
|
|
120
120
|
"husky": "^8.0.3",
|
|
121
121
|
"jest": "^30.3.0",
|
|
@@ -134,8 +134,7 @@
|
|
|
134
134
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
135
135
|
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
136
136
|
"semantic-release": "^25.0.3",
|
|
137
|
-
"storybook": "
|
|
138
|
-
"storybook-react-context": "^0.8.0",
|
|
137
|
+
"storybook": "10.6.0",
|
|
139
138
|
"ts-jest": "^29.4.9",
|
|
140
139
|
"tsx": "^4.21.0",
|
|
141
140
|
"typescript": "^5.9.3",
|