@oaknational/oak-components 3.20.1 → 3.20.3
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
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
|
*
|
|
@@ -1828,10 +1828,10 @@ var InternalLink = React.forwardRef(function (props, ref) {
|
|
|
1828
1828
|
var icon = (function () {
|
|
1829
1829
|
switch (true) {
|
|
1830
1830
|
case isLoading:
|
|
1831
|
-
return (React__default.default.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline
|
|
1831
|
+
return (React__default.default.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline" },
|
|
1832
1832
|
React__default.default.createElement(StyledOakLoadingSpinner, { "$color": "icon-primary" })));
|
|
1833
1833
|
case !!iconName:
|
|
1834
|
-
return (React__default.default.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline
|
|
1834
|
+
return (React__default.default.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline" },
|
|
1835
1835
|
React__default.default.createElement(StyledOakIcon$3, { iconName: iconName })));
|
|
1836
1836
|
default:
|
|
1837
1837
|
return null;
|
|
@@ -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
|
*
|
|
@@ -25,10 +25,10 @@ var InternalLink = forwardRef(function (props, ref) {
|
|
|
25
25
|
var icon = (function () {
|
|
26
26
|
switch (true) {
|
|
27
27
|
case isLoading:
|
|
28
|
-
return (React.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline
|
|
28
|
+
return (React.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline" },
|
|
29
29
|
React.createElement(StyledOakLoadingSpinner, { "$color": "icon-primary" })));
|
|
30
30
|
case !!iconName:
|
|
31
|
-
return (React.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline
|
|
31
|
+
return (React.createElement(OakBox, { "$pl": isTrailingIcon ? "spacing-4" : undefined, "$pr": isTrailingIcon ? undefined : "spacing-4", "$display": "inline" },
|
|
32
32
|
React.createElement(StyledOakIcon, { iconName: iconName })));
|
|
33
33
|
default:
|
|
34
34
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oaknational/oak-components",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.3",
|
|
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",
|