@postenbring/hedwig-react 0.0.3 → 0.0.4

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.
@@ -0,0 +1,43 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues,
5
+ warnForStyleOverrides
6
+ } from "./chunk-BTCTQCPO.mjs";
7
+
8
+ // src/link/link.tsx
9
+ import { clsx } from "clsx";
10
+ import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
11
+ import { jsx } from "react/jsx-runtime";
12
+ function Link(_a) {
13
+ var _b = _a, {
14
+ children,
15
+ variant = "underline",
16
+ size = "medium",
17
+ anchorRef
18
+ } = _b, rest = __objRest(_b, [
19
+ "children",
20
+ "variant",
21
+ "size",
22
+ "anchorRef"
23
+ ]);
24
+ warnForStyleOverrides(rest);
25
+ return /* @__PURE__ */ jsx(
26
+ "a",
27
+ __spreadProps(__spreadValues({
28
+ className: clsx(
29
+ t("hds-link"),
30
+ variant !== "underline" && t(`hds-link--${variant}`),
31
+ size !== "medium" && t(`hds-link--${size}`)
32
+ ),
33
+ ref: anchorRef
34
+ }, rest), {
35
+ children
36
+ })
37
+ );
38
+ }
39
+ Link.displayName = "Link";
40
+
41
+ export {
42
+ Link
43
+ };
@@ -0,0 +1,4 @@
1
+ // src/button/index.tsx
2
+ import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
3
+ import "@postenbring/hedwig-css/dist/base.css";
4
+ import "@postenbring/hedwig-css/dist/button/button.css";
@@ -0,0 +1,48 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/utils.ts
34
+ function warnForStyleOverrides(props) {
35
+ if (props.className) {
36
+ console.warn("Overriding styles are not premited");
37
+ }
38
+ if (props.styles) {
39
+ console.warn("Overriding styles are not premited");
40
+ }
41
+ }
42
+
43
+ export {
44
+ __spreadValues,
45
+ __spreadProps,
46
+ __objRest,
47
+ warnForStyleOverrides
48
+ };
@@ -0,0 +1,4 @@
1
+ // src/badge/index.tsx
2
+ import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
3
+ import "@postenbring/hedwig-css/dist/base.css";
4
+ import "@postenbring/hedwig-css/dist/badge/badge.css";
@@ -0,0 +1,4 @@
1
+ // src/link/index.tsx
2
+ import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
3
+ import "@postenbring/hedwig-css/dist/base.css";
4
+ import "@postenbring/hedwig-css/dist/link/link.css";
@@ -0,0 +1,57 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues,
5
+ warnForStyleOverrides
6
+ } from "./chunk-BTCTQCPO.mjs";
7
+
8
+ // src/button/button.tsx
9
+ import { clsx } from "clsx";
10
+ import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
11
+ import { jsx } from "react/jsx-runtime";
12
+ function BaseButton(_a) {
13
+ var _b = _a, {
14
+ children,
15
+ variant,
16
+ size = "medium",
17
+ fullWidth = false,
18
+ fill = "contained",
19
+ buttonRef
20
+ } = _b, rest = __objRest(_b, [
21
+ "children",
22
+ "variant",
23
+ "size",
24
+ "fullWidth",
25
+ "fill",
26
+ "buttonRef"
27
+ ]);
28
+ warnForStyleOverrides(rest);
29
+ return /* @__PURE__ */ jsx(
30
+ "button",
31
+ __spreadProps(__spreadValues({
32
+ className: clsx(t("hds-button"), t(`hds-button--${size}`), {
33
+ [t(`hds-button--${variant}`)]: fill === "contained",
34
+ [t(`hds-button--outline-${variant}`)]: fill === "outlined",
35
+ [t("hds-button--full")]: fullWidth === true,
36
+ [t("hds-button--mobile-full")]: fullWidth === "mobile"
37
+ }),
38
+ ref: buttonRef
39
+ }, rest), {
40
+ children
41
+ })
42
+ );
43
+ }
44
+ BaseButton.displayName = "BaseButton";
45
+ function PrimaryButton(props) {
46
+ return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
47
+ }
48
+ PrimaryButton.displayName = "PrimaryButton";
49
+ function SecondaryButton(props) {
50
+ return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "secondary" }));
51
+ }
52
+ SecondaryButton.displayName = "SecondaryButton";
53
+
54
+ export {
55
+ PrimaryButton,
56
+ SecondaryButton
57
+ };
@@ -0,0 +1,48 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues,
5
+ warnForStyleOverrides
6
+ } from "./chunk-BTCTQCPO.mjs";
7
+
8
+ // src/badge/badge.tsx
9
+ import { clsx } from "clsx";
10
+ import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
11
+ import { jsx } from "react/jsx-runtime";
12
+ function BaseBadge(_a) {
13
+ var _b = _a, {
14
+ children,
15
+ variant,
16
+ size = "small"
17
+ } = _b, rest = __objRest(_b, [
18
+ "children",
19
+ "variant",
20
+ "size"
21
+ ]);
22
+ warnForStyleOverrides(rest);
23
+ return /* @__PURE__ */ jsx("span", { className: clsx(t("hds-badge"), t(`hds-badge--${size}`), t(`hds-badge--${variant}`)), children });
24
+ }
25
+ BaseBadge.displayName = "BaseBadge";
26
+ function Badge(props) {
27
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
28
+ }
29
+ Badge.displayName = "Badge";
30
+ function DarkBadge(props) {
31
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
32
+ }
33
+ DarkBadge.displayName = "DarkBadge";
34
+ function WhiteBadge(props) {
35
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
36
+ }
37
+ WhiteBadge.displayName = "WhiteBadge";
38
+ function WarningBadge(props) {
39
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
40
+ }
41
+ WarningBadge.displayName = "WarningBadge";
42
+
43
+ export {
44
+ Badge,
45
+ DarkBadge,
46
+ WhiteBadge,
47
+ WarningBadge
48
+ };
package/dist/index.d.mts CHANGED
@@ -1,27 +1,5 @@
1
- export { PrimaryButton, SecondaryButton } from './button/index.mjs';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as React from 'react';
4
-
5
- interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style"> {
6
- /**
7
- * The visual style of the link
8
- */
9
- variant?: "underline" | "solid" | "inverted" | "no-underline";
10
- /**
11
- * Font size of the link
12
- */
13
- size?: "small" | "medium" | "large";
14
- children: React.ReactNode;
15
- anchorRef?: React.ForwardedRef<HTMLAnchorElement>;
16
- }
17
- /**
18
- * ## TODO
19
- *
20
- * - [ ] Handle button styling
21
- */
22
- declare function Link({ children, variant, size, anchorRef, ...rest }: LinkProps): react_jsx_runtime.JSX.Element;
23
- declare namespace Link {
24
- var displayName: string;
25
- }
26
-
27
- export { Link };
1
+ export { ButtonProps, PrimaryButton, SecondaryButton } from './button/button.mjs';
2
+ export { Link, LinkProps } from './link/link.mjs';
3
+ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.mjs';
4
+ import 'react/jsx-runtime';
5
+ import 'react';
package/dist/index.d.ts CHANGED
@@ -1,27 +1,5 @@
1
- export { PrimaryButton, SecondaryButton } from './button/index.js';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as React from 'react';
4
-
5
- interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style"> {
6
- /**
7
- * The visual style of the link
8
- */
9
- variant?: "underline" | "solid" | "inverted" | "no-underline";
10
- /**
11
- * Font size of the link
12
- */
13
- size?: "small" | "medium" | "large";
14
- children: React.ReactNode;
15
- anchorRef?: React.ForwardedRef<HTMLAnchorElement>;
16
- }
17
- /**
18
- * ## TODO
19
- *
20
- * - [ ] Handle button styling
21
- */
22
- declare function Link({ children, variant, size, anchorRef, ...rest }: LinkProps): react_jsx_runtime.JSX.Element;
23
- declare namespace Link {
24
- var displayName: string;
25
- }
26
-
27
- export { Link };
1
+ export { ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js';
2
+ export { Link, LinkProps } from './link/link.js';
3
+ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.js';
4
+ import 'react/jsx-runtime';
5
+ import 'react';
package/dist/index.js CHANGED
@@ -49,19 +49,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
49
49
  // src/index.tsx
50
50
  var src_exports = {};
51
51
  __export(src_exports, {
52
+ Badge: () => Badge,
53
+ DarkBadge: () => DarkBadge,
52
54
  Link: () => Link,
53
55
  PrimaryButton: () => PrimaryButton,
54
- SecondaryButton: () => SecondaryButton
56
+ SecondaryButton: () => SecondaryButton,
57
+ WarningBadge: () => WarningBadge,
58
+ WhiteBadge: () => WhiteBadge
55
59
  });
56
60
  module.exports = __toCommonJS(src_exports);
57
61
 
58
- // src/button/index.tsx
59
- var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
60
- var import_base = require("@postenbring/hedwig-css/dist/base.css");
61
- var import_button = require("@postenbring/hedwig-css/dist/button/button.css");
62
-
63
62
  // src/button/button.tsx
64
63
  var import_clsx = require("clsx");
64
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
65
65
 
66
66
  // src/utils.ts
67
67
  function warnForStyleOverrides(props) {
@@ -95,14 +95,13 @@ function BaseButton(_a) {
95
95
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
96
  "button",
97
97
  __spreadProps(__spreadValues({
98
- className: (0, import_clsx.clsx)("hds-button", `hds-button--${size}`, {
99
- [`hds-button--${variant}`]: fill === "contained",
100
- [`hds-button--outline-${variant}`]: fill === "outlined",
101
- "hds-button--full": fullWidth === true,
102
- "hds-button--mobile-full": fullWidth === "mobile"
98
+ className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`hds-button--${size}`), {
99
+ [(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained",
100
+ [(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined",
101
+ [(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true,
102
+ [(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile"
103
103
  }),
104
- ref: buttonRef,
105
- type: "button"
104
+ ref: buttonRef
106
105
  }, rest), {
107
106
  children
108
107
  })
@@ -118,13 +117,9 @@ function SecondaryButton(props) {
118
117
  }
119
118
  SecondaryButton.displayName = "SecondaryButton";
120
119
 
121
- // src/link/index.tsx
122
- var import_tokens2 = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
123
- var import_base2 = require("@postenbring/hedwig-css/dist/base.css");
124
- var import_link = require("@postenbring/hedwig-css/dist/link/link.css");
125
-
126
120
  // src/link/link.tsx
127
121
  var import_clsx2 = require("clsx");
122
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
128
123
  var import_jsx_runtime2 = require("react/jsx-runtime");
129
124
  function Link(_a) {
130
125
  var _b = _a, {
@@ -142,10 +137,11 @@ function Link(_a) {
142
137
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
143
138
  "a",
144
139
  __spreadProps(__spreadValues({
145
- className: (0, import_clsx2.clsx)("hds-link", {
146
- [`hds-link--${variant}`]: variant !== "underline",
147
- [`hds-link--${size}`]: size !== "medium"
148
- }),
140
+ className: (0, import_clsx2.clsx)(
141
+ (0, import_typed_classname2.t)("hds-link"),
142
+ variant !== "underline" && (0, import_typed_classname2.t)(`hds-link--${variant}`),
143
+ size !== "medium" && (0, import_typed_classname2.t)(`hds-link--${size}`)
144
+ ),
149
145
  ref: anchorRef
150
146
  }, rest), {
151
147
  children
@@ -153,9 +149,48 @@ function Link(_a) {
153
149
  );
154
150
  }
155
151
  Link.displayName = "Link";
152
+
153
+ // src/badge/badge.tsx
154
+ var import_clsx3 = require("clsx");
155
+ var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
156
+ var import_jsx_runtime3 = require("react/jsx-runtime");
157
+ function BaseBadge(_a) {
158
+ var _b = _a, {
159
+ children,
160
+ variant,
161
+ size = "small"
162
+ } = _b, rest = __objRest(_b, [
163
+ "children",
164
+ "variant",
165
+ "size"
166
+ ]);
167
+ warnForStyleOverrides(rest);
168
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx3.clsx)((0, import_typed_classname3.t)("hds-badge"), (0, import_typed_classname3.t)(`hds-badge--${size}`), (0, import_typed_classname3.t)(`hds-badge--${variant}`)), children });
169
+ }
170
+ BaseBadge.displayName = "BaseBadge";
171
+ function Badge(props) {
172
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
173
+ }
174
+ Badge.displayName = "Badge";
175
+ function DarkBadge(props) {
176
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
177
+ }
178
+ DarkBadge.displayName = "DarkBadge";
179
+ function WhiteBadge(props) {
180
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
181
+ }
182
+ WhiteBadge.displayName = "WhiteBadge";
183
+ function WarningBadge(props) {
184
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
185
+ }
186
+ WarningBadge.displayName = "WarningBadge";
156
187
  // Annotate the CommonJS export names for ESM import in node:
157
188
  0 && (module.exports = {
189
+ Badge,
190
+ DarkBadge,
158
191
  Link,
159
192
  PrimaryButton,
160
- SecondaryButton
193
+ SecondaryButton,
194
+ WarningBadge,
195
+ WhiteBadge
161
196
  });
package/dist/index.mjs CHANGED
@@ -1,49 +1,26 @@
1
+ import "./chunk-AHYBSRCR.mjs";
1
2
  import {
2
3
  PrimaryButton,
3
- SecondaryButton,
4
- __objRest,
5
- __spreadProps,
6
- __spreadValues,
7
- warnForStyleOverrides
8
- } from "./chunk-ZPSTPWVB.mjs";
9
-
10
- // src/link/index.tsx
11
- import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
12
- import "@postenbring/hedwig-css/dist/base.css";
13
- import "@postenbring/hedwig-css/dist/link/link.css";
14
-
15
- // src/link/link.tsx
16
- import { clsx } from "clsx";
17
- import { jsx } from "react/jsx-runtime";
18
- function Link(_a) {
19
- var _b = _a, {
20
- children,
21
- variant = "underline",
22
- size = "medium",
23
- anchorRef
24
- } = _b, rest = __objRest(_b, [
25
- "children",
26
- "variant",
27
- "size",
28
- "anchorRef"
29
- ]);
30
- warnForStyleOverrides(rest);
31
- return /* @__PURE__ */ jsx(
32
- "a",
33
- __spreadProps(__spreadValues({
34
- className: clsx("hds-link", {
35
- [`hds-link--${variant}`]: variant !== "underline",
36
- [`hds-link--${size}`]: size !== "medium"
37
- }),
38
- ref: anchorRef
39
- }, rest), {
40
- children
41
- })
42
- );
43
- }
44
- Link.displayName = "Link";
4
+ SecondaryButton
5
+ } from "./chunk-SF42ETS4.mjs";
6
+ import "./chunk-H5SSXV32.mjs";
7
+ import {
8
+ Badge,
9
+ DarkBadge,
10
+ WarningBadge,
11
+ WhiteBadge
12
+ } from "./chunk-YH2NWXPK.mjs";
13
+ import "./chunk-NSNVKFU3.mjs";
14
+ import {
15
+ Link
16
+ } from "./chunk-7FQ4XFS7.mjs";
17
+ import "./chunk-BTCTQCPO.mjs";
45
18
  export {
19
+ Badge,
20
+ DarkBadge,
46
21
  Link,
47
22
  PrimaryButton,
48
- SecondaryButton
23
+ SecondaryButton,
24
+ WarningBadge,
25
+ WhiteBadge
49
26
  };
@@ -0,0 +1,3 @@
1
+ export { Link, LinkProps } from './link.mjs';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,3 @@
1
+ export { Link, LinkProps } from './link.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/link/index.tsx
50
+ var link_exports = {};
51
+ __export(link_exports, {
52
+ Link: () => Link
53
+ });
54
+ module.exports = __toCommonJS(link_exports);
55
+ var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
56
+ var import_base = require("@postenbring/hedwig-css/dist/base.css");
57
+ var import_link = require("@postenbring/hedwig-css/dist/link/link.css");
58
+
59
+ // src/link/link.tsx
60
+ var import_clsx = require("clsx");
61
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
62
+
63
+ // src/utils.ts
64
+ function warnForStyleOverrides(props) {
65
+ if (props.className) {
66
+ console.warn("Overriding styles are not premited");
67
+ }
68
+ if (props.styles) {
69
+ console.warn("Overriding styles are not premited");
70
+ }
71
+ }
72
+
73
+ // src/link/link.tsx
74
+ var import_jsx_runtime = require("react/jsx-runtime");
75
+ function Link(_a) {
76
+ var _b = _a, {
77
+ children,
78
+ variant = "underline",
79
+ size = "medium",
80
+ anchorRef
81
+ } = _b, rest = __objRest(_b, [
82
+ "children",
83
+ "variant",
84
+ "size",
85
+ "anchorRef"
86
+ ]);
87
+ warnForStyleOverrides(rest);
88
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
+ "a",
90
+ __spreadProps(__spreadValues({
91
+ className: (0, import_clsx.clsx)(
92
+ (0, import_typed_classname.t)("hds-link"),
93
+ variant !== "underline" && (0, import_typed_classname.t)(`hds-link--${variant}`),
94
+ size !== "medium" && (0, import_typed_classname.t)(`hds-link--${size}`)
95
+ ),
96
+ ref: anchorRef
97
+ }, rest), {
98
+ children
99
+ })
100
+ );
101
+ }
102
+ Link.displayName = "Link";
103
+ // Annotate the CommonJS export names for ESM import in node:
104
+ 0 && (module.exports = {
105
+ Link
106
+ });
@@ -0,0 +1,8 @@
1
+ import "../chunk-NSNVKFU3.mjs";
2
+ import {
3
+ Link
4
+ } from "../chunk-7FQ4XFS7.mjs";
5
+ import "../chunk-BTCTQCPO.mjs";
6
+ export {
7
+ Link
8
+ };
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style"> {
5
+ /**
6
+ * The visual style of the link
7
+ */
8
+ variant?: "underline" | "solid" | "inverted" | "no-underline";
9
+ /**
10
+ * Font size of the link
11
+ */
12
+ size?: "small" | "medium" | "large";
13
+ children: React.ReactNode;
14
+ anchorRef?: React.ForwardedRef<HTMLAnchorElement>;
15
+ }
16
+ /**
17
+ * ## TODO
18
+ *
19
+ * - [ ] Handle button styling
20
+ */
21
+ declare function Link({ children, variant, size, anchorRef, ...rest }: LinkProps): react_jsx_runtime.JSX.Element;
22
+ declare namespace Link {
23
+ var displayName: string;
24
+ }
25
+
26
+ export { Link, LinkProps };
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style"> {
5
+ /**
6
+ * The visual style of the link
7
+ */
8
+ variant?: "underline" | "solid" | "inverted" | "no-underline";
9
+ /**
10
+ * Font size of the link
11
+ */
12
+ size?: "small" | "medium" | "large";
13
+ children: React.ReactNode;
14
+ anchorRef?: React.ForwardedRef<HTMLAnchorElement>;
15
+ }
16
+ /**
17
+ * ## TODO
18
+ *
19
+ * - [ ] Handle button styling
20
+ */
21
+ declare function Link({ children, variant, size, anchorRef, ...rest }: LinkProps): react_jsx_runtime.JSX.Element;
22
+ declare namespace Link {
23
+ var displayName: string;
24
+ }
25
+
26
+ export { Link, LinkProps };