@arkitektbedriftene/fe-lib 5.6.0 → 5.6.1

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.
@@ -13,10 +13,11 @@ declare const colors: {
13
13
  info: string;
14
14
  };
15
15
  export type TagColors = keyof typeof colors;
16
- export declare function Tag({ children, size, color, className, ...props }: {
16
+ export declare function Tag({ children, size, color, icon, className, ...props }: {
17
17
  children: ReactNode;
18
18
  size?: keyof typeof sizes;
19
19
  color?: keyof typeof colors;
20
20
  className?: string;
21
+ icon?: ReactNode;
21
22
  } & React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
22
23
  export {};
@@ -1,9 +1,9 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import i from "clsx";
3
- const c = {
1
+ import { jsxs as a } from "react/jsx-runtime";
2
+ import c from "clsx";
3
+ const g = {
4
4
  sm: "px-2 py-0.5 text-xs",
5
5
  md: "px-2 py-0.5 text-sm"
6
- }, g = {
6
+ }, x = {
7
7
  primary: "bg-flask text-white",
8
8
  secondary: "bg-sand text-black",
9
9
  tertiary: "bg-clay text-black",
@@ -12,27 +12,32 @@ const c = {
12
12
  warning: "bg-warning-dark text-warning-light",
13
13
  info: "bg-info-dark text-info-light"
14
14
  };
15
- function d({
15
+ function l({
16
16
  children: t,
17
17
  size: e = "sm",
18
18
  color: s = "secondary",
19
- className: r,
20
- ...n
19
+ icon: r,
20
+ className: n,
21
+ ...i
21
22
  }) {
22
23
  return /* @__PURE__ */ a(
23
24
  "div",
24
25
  {
25
- className: i(
26
- "inline-flex items-center justify-center rounded-sm",
27
- c[e],
28
- g[s],
29
- r
26
+ className: c(
27
+ "inline-flex items-center justify-center rounded-sm gap-x-2",
28
+ "[&>svg]:shrink-0",
29
+ g[e],
30
+ x[s],
31
+ n
30
32
  ),
31
- ...n,
32
- children: t
33
+ ...i,
34
+ children: [
35
+ r,
36
+ t
37
+ ]
33
38
  }
34
39
  );
35
40
  }
36
41
  export {
37
- d as Tag
42
+ l as Tag
38
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkitektbedriftene/fe-lib",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./oidc": {