@norges-domstoler/dds-components 0.0.0-dev-20240307131621 → 0.0.0-dev-20240307142535
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/index.js +14 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +198 -204
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2691,11 +2691,6 @@ var import_styled_components9 = __toESM(require("styled-components"));
|
|
|
2691
2691
|
// src/components/Typography/Typography/Typography.styles.ts
|
|
2692
2692
|
var import_dds_design_tokens15 = require("@norges-domstoler/dds-design-tokens");
|
|
2693
2693
|
var import_styled_components8 = require("styled-components");
|
|
2694
|
-
|
|
2695
|
-
// src/components/Typography/Typography/openExternal.svg
|
|
2696
|
-
var openExternal_default = 'data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path d="M19 19H5V5H12V3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C20.1 21 21 20.1 21 19V12H19V19ZM14 3V5H17.59L7.76 14.83L9.17 16.24L19 6.41V10H21V3H14Z" fill="%230B0D0E"/>%0A</svg>%0A';
|
|
2697
|
-
|
|
2698
|
-
// src/components/Typography/Typography/Typography.styles.ts
|
|
2699
2694
|
var { border: border4, colors: colors7 } = import_dds_design_tokens15.ddsBaseTokens;
|
|
2700
2695
|
var focusVisibleLink = {
|
|
2701
2696
|
outline: "none",
|
|
@@ -2750,18 +2745,11 @@ var getAnchorStyling = (external, interactionStyling, typographyType7, withMargi
|
|
|
2750
2745
|
transition: ${focusVisibleLinkTransitionValue};
|
|
2751
2746
|
}
|
|
2752
2747
|
${external && import_styled_components8.css`
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
background-color: currentColor;
|
|
2759
|
-
width: 1em;
|
|
2760
|
-
height: 1em;
|
|
2761
|
-
content: '';
|
|
2762
|
-
position: absolute;
|
|
2763
|
-
margin-top: ${typographyTokens.typographyType.a.icon.marginTop};
|
|
2764
|
-
margin-left: ${typographyTokens.typographyType.a.icon.marginLeft};
|
|
2748
|
+
& > svg {
|
|
2749
|
+
display: inline;
|
|
2750
|
+
margin: 0.1em 0.1em -0.1em;
|
|
2751
|
+
transform: translateY(0.05em);
|
|
2752
|
+
vertical-align: baseline;
|
|
2765
2753
|
}
|
|
2766
2754
|
`}
|
|
2767
2755
|
&:hover {
|
|
@@ -2861,7 +2849,10 @@ var Typography = (0, import_react2.forwardRef)(
|
|
|
2861
2849
|
target: targetProp,
|
|
2862
2850
|
externalLink: externalLinkProp
|
|
2863
2851
|
};
|
|
2864
|
-
return /* @__PURE__ */ (0, import_jsx_runtime159.
|
|
2852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(StyledTypography, { ref, ...typographyProps, children: [
|
|
2853
|
+
children,
|
|
2854
|
+
externalLinkProp && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(Icon, { icon: OpenExternalIcon, iconSize: "inherit" })
|
|
2855
|
+
] });
|
|
2865
2856
|
}
|
|
2866
2857
|
);
|
|
2867
2858
|
Typography.displayName = "Typography";
|
|
@@ -3923,7 +3914,7 @@ var Link = (0, import_react17.forwardRef)((props, ref) => {
|
|
|
3923
3914
|
target,
|
|
3924
3915
|
...rest
|
|
3925
3916
|
} = props;
|
|
3926
|
-
return /* @__PURE__ */ (0, import_jsx_runtime169.
|
|
3917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(
|
|
3927
3918
|
StyledLink,
|
|
3928
3919
|
{
|
|
3929
3920
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -3933,7 +3924,10 @@ var Link = (0, import_react17.forwardRef)((props, ref) => {
|
|
|
3933
3924
|
ref,
|
|
3934
3925
|
rel: "noopener noreferer",
|
|
3935
3926
|
target: external ? "_blank" : target,
|
|
3936
|
-
children
|
|
3927
|
+
children: [
|
|
3928
|
+
children,
|
|
3929
|
+
external && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(Icon, { iconSize: "inherit", icon: OpenExternalIcon })
|
|
3930
|
+
]
|
|
3937
3931
|
}
|
|
3938
3932
|
);
|
|
3939
3933
|
});
|