@altinn/altinn-components 0.29.2 → 0.29.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.
@@ -1 +1 @@
1
- ._item_1dbl6_1{border:none;color:inherit;font:inherit;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-user-select:none;user-select:none;border-radius:.5rem;box-shadow:var(--ds-shadow-xs)}._item_1dbl6_1{position:relative;display:flex;align-items:center;text-decoration:none;color:inherit;padding:.625rem}._media_1dbl6_23{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem}._icon_1dbl6_32{font-size:1.5rem}._content_1dbl6_36{flex-grow:1;display:flex;align-items:center;margin-left:.625rem;margin-right:1.25rem}._action_1dbl6_44{flex-shrink:0;display:flex;align-items:center;justify-content:center}._item_1dbl6_1{background-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._item_1dbl6_1[data-color=neutral]{background-color:var(--ds-color-background-default);color:var(--ds-color-text-default)}
1
+ ._item_1a13i_1{border:none;color:inherit;font:inherit;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-user-select:none;user-select:none;border-radius:.5rem;box-shadow:var(--ds-shadow-xs)}._item_1a13i_1{position:relative;display:flex;align-items:center;text-decoration:none;color:inherit;padding:.625rem}._icon_1a13i_23{flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:1.5rem;width:2.75rem;height:2.75rem}._content_1a13i_33{flex-grow:1;display:flex;align-items:center;margin-left:.625rem;margin-right:1.25rem}._action_1a13i_41{flex-shrink:0;display:flex;align-items:center;justify-content:center}._item_1a13i_1{background-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}
@@ -1 +1 @@
1
- ._button_15kp4_1{display:inline-flex;align-items:center;column-gap:.125em;align-items:flex-start}._icon_15kp4_8{flex-shrink:0;flex-grow:0;font-size:1.25rem;width:1.5rem;height:1.5rem}._label_15kp4_16{flex-shrink:1;font-size:14px;font-weight:400;line-height:1.125rem;padding:.1875rem 0;white-space:inherit}
1
+ ._button_87kyt_1{display:inline-flex;column-gap:.25em;align-items:center;justify-content:flex-start;font-size:.875rem;min-height:auto}._label_87kyt_10{flex-shrink:1;font-weight:400;white-space:inherit;padding:.3125rem}._button_87kyt_1 a{color:inherit}
@@ -1,4 +1,4 @@
1
- import { jsxs as l, jsx as e, Fragment as E } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as e, Fragment as E } from "react/jsx-runtime";
2
2
  import { c as g } from "../../index-L8X2o7IH.js";
3
3
  import { useId as w, isValidElement as z } from "react";
4
4
  import { Icon as D } from "../Icon/Icon.js";
@@ -42,9 +42,9 @@ import '../../assets/ListItemHeader.css';const K = "_header_s4ghf_1", M = "_labe
42
42
  children: y,
43
43
  ariaLabel: C
44
44
  }) => {
45
- const a = d ? v ? A : G : I ? J : void 0, j = () => r && !t && typeof r == "object" && "label" in r ? /* @__PURE__ */ e(F, { ...r }) : z(r) ? r : null, B = w();
46
- return /* @__PURE__ */ l(
47
- "header",
45
+ const l = d ? v ? A : G : I ? J : void 0, j = () => r && !t && typeof r == "object" && "label" in r ? /* @__PURE__ */ e(F, { ...r }) : z(r) ? r : null, B = w();
46
+ return /* @__PURE__ */ a(
47
+ "div",
48
48
  {
49
49
  className: g(o.header, x),
50
50
  "data-color": f,
@@ -80,12 +80,12 @@ import '../../assets/ListItemHeader.css';const K = "_header_s4ghf_1", M = "_labe
80
80
  children: y
81
81
  }
82
82
  ),
83
- /* @__PURE__ */ e(V, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */ l(E, { children: [
83
+ /* @__PURE__ */ e(V, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */ a(E, { children: [
84
84
  j(),
85
- a && /* @__PURE__ */ e("span", { className: o.linkIcon, children: /* @__PURE__ */ e(
85
+ l && /* @__PURE__ */ e("span", { className: o.linkIcon, children: /* @__PURE__ */ e(
86
86
  D,
87
87
  {
88
- svgElement: a,
88
+ svgElement: l,
89
89
  style: {
90
90
  fontSize: "1.5rem"
91
91
  }
@@ -1,65 +1,64 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { jsxs as f, jsx as l } from "react/jsx-runtime";
3
3
  import { c as p } from "../../index-L8X2o7IH.js";
4
4
  import { Icon as v } from "../Icon/Icon.js";
5
5
  import * as a from "react";
6
6
  import { forwardRef as u } from "react";
7
- import { IconButton as _ } from "../Button/IconButton.js";
7
+ import { IconButton as g } from "../Button/IconButton.js";
8
8
  import "../RootProvider/RootProvider.js";
9
9
  import "../Searchbar/AutocompleteBase.js";
10
10
  import "./useSnackbar.js";
11
- import { u as g } from "../../useId-BVFxCjkq.js";
11
+ import { u as _ } from "../../useId-BVFxCjkq.js";
12
12
  import { S as h } from "../../XMark-DIqxCTTQ.js";
13
- import '../../assets/SnackbarItem.css';var w = function(e, o) {
14
- var i = {};
15
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (i[t] = e[t]);
13
+ import '../../assets/SnackbarItem.css';var w = function(e, i) {
14
+ var o = {};
15
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (o[t] = e[t]);
16
16
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
17
17
  for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
18
- o.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (i[t[n]] = e[t[n]]);
19
- return i;
18
+ i.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
19
+ return o;
20
20
  };
21
- const b = u((e, o) => {
22
- var { title: i, titleId: t } = e, n = w(e, ["title", "titleId"]);
23
- let c = g();
24
- return c = i ? t || "title-" + c : void 0, a.createElement(
21
+ const y = u((e, i) => {
22
+ var { title: o, titleId: t } = e, n = w(e, ["title", "titleId"]);
23
+ let r = _();
24
+ return r = o ? t || "title-" + r : void 0, a.createElement(
25
25
  "svg",
26
- Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": c }, n),
27
- i ? a.createElement("title", { id: c }, i) : null,
26
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: i, "aria-labelledby": r }, n),
27
+ o ? a.createElement("title", { id: r }, o) : null,
28
28
  a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.75 2.5a.75.75 0 0 0-1.5 0v1.273c-2.222.14-3.655.92-4.499 2.186-.887 1.33-1.001 3.04-1.001 4.541v3c0 .809-.424 1.92-.92 2.915a18 18 0 0 1-.936 1.641l-.014.022-.004.006A.75.75 0 0 0 4.5 19.25h4.338a3.25 3.25 0 0 0 6.324 0H19.5a.75.75 0 0 0 .624-1.166l-.004-.006-.014-.022-.06-.091c-.05-.081-.125-.2-.215-.35-.18-.301-.42-.722-.66-1.2-.497-.994-.921-2.106-.921-2.915v-3c0-1.501-.114-3.21-1.001-4.541-.844-1.266-2.277-2.046-4.499-2.186zm-1.987 17.237a1.8 1.8 0 0 1-.344-.487h3.162a1.75 1.75 0 0 1-1.581 1 1.75 1.75 0 0 1-1.237-.513", clipRule: "evenodd" })
29
29
  );
30
- }), y = "_item_1dbl6_1", x = "_media_1dbl6_23", O = "_icon_1dbl6_32", I = "_content_1dbl6_36", j = "_action_1dbl6_44", l = {
31
- item: y,
32
- media: x,
30
+ }), x = "_item_1a13i_1", O = "_icon_1a13i_23", I = "_content_1a13i_33", b = "_action_1a13i_41", c = {
31
+ item: x,
33
32
  icon: O,
34
33
  content: I,
35
- action: j
34
+ action: b
36
35
  };
37
- var N = /* @__PURE__ */ ((e) => (e.accent = "accent", e.neutral = "neutral", e.alert = "alert", e.success = "success", e.warning = "warning", e.danger = "danger", e.info = "info", e))(N || {});
38
- const D = ({
36
+ var j = /* @__PURE__ */ ((e) => (e.accent = "accent", e.success = "success", e.warning = "warning", e.danger = "danger", e.info = "info", e))(j || {});
37
+ const H = ({
39
38
  as: e,
40
- message: o,
41
- className: i,
42
- color: t = "accent",
43
- icon: n = b,
44
- iconAltText: c = "Bell icon",
39
+ message: i,
40
+ className: o,
41
+ color: t,
42
+ icon: n = y,
43
+ iconAltText: r = "Bell icon",
45
44
  dismissable: s = !0,
46
- onDismiss: d,
47
- ...m
48
- }) => /* @__PURE__ */ f(e || "div", { className: p(l.item, i), "data-color": t, ...m, children: [
49
- /* @__PURE__ */ r("div", { className: l.media, children: /* @__PURE__ */ r(v, { svgElement: n, className: l.icon }) }),
50
- /* @__PURE__ */ r("div", { className: l.content, children: o }),
51
- s && /* @__PURE__ */ r("div", { className: l.action, children: /* @__PURE__ */ r(
52
- _,
45
+ onDismiss: m,
46
+ ...d
47
+ }) => /* @__PURE__ */ f(e || "div", { className: p(c.item, o), "data-color": t, ...d, children: [
48
+ /* @__PURE__ */ l(v, { svgElement: n, className: c.icon }),
49
+ /* @__PURE__ */ l("div", { className: c.content, children: i }),
50
+ s && /* @__PURE__ */ l("div", { className: c.action, children: /* @__PURE__ */ l(
51
+ g,
53
52
  {
54
53
  icon: h,
55
- variant: "outline",
56
- onClick: d,
57
- className: l.dismiss,
54
+ variant: "solid",
55
+ onClick: m,
56
+ className: c.dismiss,
58
57
  iconAltText: "close"
59
58
  }
60
59
  ) })
61
60
  ] });
62
61
  export {
63
- N as SnackbarColorEnum,
64
- D as SnackbarItem
62
+ j as SnackbarColorEnum,
63
+ H as SnackbarItem
65
64
  };
@@ -1,5 +1,5 @@
1
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { c as a } from "../../index-L8X2o7IH.js";
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import { ButtonBase as p } from "../Button/ButtonBase.js";
5
5
  import { ButtonLabel as b } from "../Button/ButtonLabel.js";
@@ -7,32 +7,31 @@ import { ButtonIcon as u } from "../Button/ButtonIcon.js";
7
7
  import "../RootProvider/RootProvider.js";
8
8
  import "../Searchbar/AutocompleteBase.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import '../../assets/TimelineLink.css';const _ = "_button_15kp4_1", f = "_icon_15kp4_8", k = "_label_15kp4_16", o = {
10
+ import '../../assets/TimelineLink.css';const _ = "_button_87kyt_1", f = "_label_87kyt_10", t = {
11
11
  button: _,
12
- icon: f,
13
- label: k
14
- }, I = ({
15
- size: t = "custom",
12
+ label: f
13
+ }, L = ({
14
+ size: o = "xs",
16
15
  color: m = "company",
17
- icon: n,
18
- reverse: c,
19
- label: s,
20
- children: e,
21
- ...i
22
- }) => /* @__PURE__ */ l(
16
+ icon: r,
17
+ reverse: e,
18
+ label: l,
19
+ children: s,
20
+ ...a
21
+ }) => /* @__PURE__ */ i(
23
22
  p,
24
23
  {
25
24
  color: m,
26
25
  variant: "link",
27
- size: t,
28
- className: a(o.button, { [o.reverse]: c }),
29
- ...i,
26
+ size: o,
27
+ className: c(t.button, { [t.reverse]: e }),
28
+ ...a,
30
29
  children: [
31
- n && /* @__PURE__ */ r(u, { className: o.icon, size: t, icon: n }),
32
- /* @__PURE__ */ r(b, { className: o.label, size: t, children: e || s })
30
+ r && /* @__PURE__ */ n(u, { className: t.icon, size: o, icon: r }),
31
+ /* @__PURE__ */ n(b, { className: t.label, size: o, children: s || l })
33
32
  ]
34
33
  }
35
34
  );
36
35
  export {
37
- I as TimelineLink
36
+ L as TimelineLink
38
37
  };
@@ -1,11 +1,11 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { MenuItemProps, MenuProps, MenuSearchProps } from '../';
3
- import { MenuItemsVirtualProps } from '../Menu/MenuItems';
4
- interface AccountSearchProps extends MenuSearchProps {
3
+ import { MenuItemsVirtualProps } from '../Menu';
4
+ export interface AccountSearchProps extends MenuSearchProps {
5
5
  getResultsLabel?: (hits: number) => string;
6
6
  hidden?: boolean;
7
7
  }
8
- interface AccountMenuItemProps extends MenuItemProps {
8
+ export interface AccountMenuItemProps extends MenuItemProps {
9
9
  id: string;
10
10
  type: 'person' | 'company' | 'group';
11
11
  name: string;
@@ -19,4 +19,3 @@ export interface AccountMenuProps extends MenuProps {
19
19
  scrollRefStyles?: CSSProperties;
20
20
  }
21
21
  export declare const AccountMenu: ({ items, groups, search, onSelectAccount, currentAccount, menuItemsVirtual, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -2,8 +2,6 @@ import { ElementType, ReactNode } from 'react';
2
2
  import { SvgElement } from '..';
3
3
  export declare enum SnackbarColorEnum {
4
4
  accent = "accent",
5
- neutral = "neutral",
6
- alert = "alert",
7
5
  success = "success",
8
6
  warning = "warning",
9
7
  danger = "danger",
@@ -34,14 +34,14 @@ declare const meta: {
34
34
  href?: string | undefined;
35
35
  controls?: React.ReactNode;
36
36
  selected?: boolean | undefined;
37
- tabIndex?: number | undefined;
38
- onKeyPress?: React.KeyboardEventHandler | undefined;
39
- onClick?: (() => void) | undefined;
40
- onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
41
37
  interactive?: boolean | undefined;
42
- collapsible?: boolean | undefined;
38
+ onClick?: (() => void) | undefined;
39
+ onKeyPress?: React.KeyboardEventHandler | undefined;
40
+ tabIndex?: number | undefined;
43
41
  description?: React.ReactNode | import('..').HeadingProps;
42
+ collapsible?: boolean | undefined;
44
43
  linkIcon?: boolean | undefined;
44
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
45
45
  ariaLabel?: string | undefined;
46
46
  shadow?: import('..').Shadow | undefined;
47
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.29.2",
3
+ "version": "0.29.4",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",