@altinn/altinn-components 0.14.2 → 0.14.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.
@@ -1 +1 @@
1
- ._flex_m0l5u_1{display:flex}._flex_m0l5u_1[data-direction=col]{flex-direction:column}._flex_m0l5u_1[data-direction=row]{flex-direction:row}._flex_m0l5u_1[data-align=center]{align-items:center}._flex_m0l5u_1[data-align=start]{align-items:flex-start}._flex_m0l5u_1[data-align=end]{align-items:flex-end}._flex_m0l5u_1[data-justify=start]{justify-content:flex-start}._flex_m0l5u_1[data-justify=end]{justify-content:flex-end}._flex_m0l5u_1[data-justify=center]{justify-content:center}._flex_m0l5u_1[data-justify=between]{justify-content:space-between}@media (max-width: 1024px){._flex_m0l5u_1[data-bleed=true]{margin-left:-1rem;margin-right:-1rem}}._flex_m0l5u_1[data-padding=page]{padding:var(--ds-spacing-6)}@media (max-width: 1024px){._flex_m0l5u_1[data-padding=page]{padding-left:var(--ds-spacing-4);padding-right:var(--ds-spacing-4)}}._flex_m0l5u_1[data-spacing=xs]{gap:.125rem}._flex_m0l5u_1[data-margin=section]{margin:.625rem 0}._flex_m0l5u_1[data-margin=page]{margin:1.125rem 0}
1
+ ._flex_yqbrl_1{display:flex}._flex_yqbrl_1[data-direction=col]{flex-direction:column}._flex_yqbrl_1[data-direction=row]{flex-direction:row}._flex_yqbrl_1[data-align=center]{align-items:center}._flex_yqbrl_1[data-align=start]{align-items:flex-start}._flex_yqbrl_1[data-align=end]{align-items:flex-end}._flex_yqbrl_1[data-justify=start]{justify-content:flex-start}._flex_yqbrl_1[data-justify=end]{justify-content:flex-end}._flex_yqbrl_1[data-justify=center]{justify-content:center}._flex_yqbrl_1[data-justify=between]{justify-content:space-between}@media (max-width: 1023px){._flex_yqbrl_1[data-bleed=true]{margin-left:-1rem;margin-right:-1rem}}._flex_yqbrl_1[data-padding=page]{padding:var(--ds-spacing-6)}@media (max-width: 1023px){._flex_yqbrl_1[data-padding=page]{padding-left:var(--ds-spacing-4);padding-right:var(--ds-spacing-4)}}._flex_yqbrl_1[data-spacing=xs]{gap:.125rem}._flex_yqbrl_1[data-margin=section]{margin:.625rem 0}._flex_yqbrl_1[data-margin=page]{margin:1.125rem 0}
@@ -1 +1 @@
1
- ._grid_bzro4_1{display:grid}._grid_bzro4_1[data-cols="1-2-3"]{grid-template-columns:repeat(1,minmax(0,1fr))}@media (min-width: 640px){._grid_bzro4_1[data-cols="1-2-3"]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){._grid_bzro4_1[data-cols="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}._grid_bzro4_1[data-cols="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}._grid_bzro4_1[data-cols="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}._grid_bzro4_1[data-cols="1-2-3"]{grid-template-columns:repeat(3,minmax(0,1fr))}}._grid_bzro4_1[data-padding=page]{padding:var(--ds-spacing-6)}@media (max-width: 1024px){._grid_bzro4_1[data-padding=page]{padding-left:var(--ds-spacing-4);padding-right:var(--ds-spacing-4)}}._grid_bzro4_1[data-spacing=xs]{gap:.125rem}._grid_bzro4_1[data-margin=section]{margin:.625rem 0}._grid_bzro4_1[data-margin=page]{margin:1.125rem 0}
1
+ ._grid_5zqvf_1{display:grid}._grid_5zqvf_1[data-cols="1-2-3"]{grid-template-columns:repeat(1,minmax(0,1fr))}@media (min-width: 640px){._grid_5zqvf_1[data-cols="1-2-3"]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){._grid_5zqvf_1[data-cols="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}._grid_5zqvf_1[data-cols="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}._grid_5zqvf_1[data-cols="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}._grid_5zqvf_1[data-cols="1-2-3"]{grid-template-columns:repeat(3,minmax(0,1fr))}}._grid_5zqvf_1[data-padding=page]{padding:var(--ds-spacing-6)}@media (max-width: 1023px){._grid_5zqvf_1[data-padding=page]{padding-left:var(--ds-spacing-4);padding-right:var(--ds-spacing-4)}}._grid_5zqvf_1[data-spacing=xs]{gap:.125rem}._grid_5zqvf_1[data-margin=section]{margin:.625rem 0}._grid_5zqvf_1[data-margin=page]{margin:1.125rem 0}
@@ -1 +1 @@
1
- ._body_1oj0m_1{flex-grow:1;width:100%;max-width:1280px;margin:0 auto;padding:0 1rem;display:flex;column-gap:2em}@media (min-width: 1024px){._body_1oj0m_1{padding:0 1rem}}@media (max-width: 1024px){._body_1oj0m_1[data-current-id=menu]{display:none}}
1
+ ._body_18zk9_1{flex-grow:1;width:100%;max-width:1280px;margin:0 auto;padding:0 1rem;display:flex;column-gap:2em}@media (min-width: 1024px){._body_18zk9_1{padding:0 1rem}}@media (max-width: 1023px){._body_18zk9_1[data-current-id=menu]{display:none}}
@@ -1,15 +1,15 @@
1
- import { jsx as o, jsxs as x } from "react/jsx-runtime";
2
- import { c as u } from "../../index-L8X2o7IH.js";
1
+ import { jsx as s, jsxs as _ } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
3
  import { ButtonBase as d } from "./ButtonBase.js";
4
- import { ButtonIcon as _ } from "./ButtonIcon.js";
5
- import { ButtonLabel as B } from "./ButtonLabel.js";
6
- import '../../assets/Button.css';const h = "_button_1ysmx_1", N = "_reverse_1ysmx_8", t = {
7
- button: h,
4
+ import { ButtonIcon as B } from "./ButtonIcon.js";
5
+ import { ButtonLabel as h } from "./ButtonLabel.js";
6
+ import '../../assets/Button.css';const y = "_button_1ysmx_1", N = "_reverse_1ysmx_8", t = {
7
+ button: y,
8
8
  reverse: N
9
- }, I = ({
10
- variant: r = "solid",
11
- color: e,
12
- size: s = "md",
9
+ }, k = ({
10
+ variant: e = "solid",
11
+ color: o,
12
+ size: r = "md",
13
13
  reverse: n = !1,
14
14
  selected: a = !1,
15
15
  icon: m,
@@ -18,36 +18,38 @@ import '../../assets/Button.css';const h = "_button_1ysmx_1", N = "_reverse_1ysm
18
18
  children: b,
19
19
  className: p,
20
20
  loading: f,
21
- ...c
22
- }) => f ? /* @__PURE__ */ o(
21
+ loadingText: x = "Loading ...",
22
+ ...u
23
+ }) => f ? /* @__PURE__ */ s(
23
24
  d,
24
25
  {
25
- variant: r,
26
- color: e,
27
- size: s,
26
+ variant: e,
27
+ "aria-busy": !0,
28
+ color: o,
29
+ size: r,
28
30
  selected: a,
29
31
  href: l,
30
- className: u(t.button, { [t.reverse]: n }, p),
31
- ...c,
32
+ className: c(t.button, { [t.reverse]: n }, p),
33
+ ...u,
32
34
  disabled: !0,
33
- children: /* @__PURE__ */ o("span", { className: t.label, "data-size": s, children: /* @__PURE__ */ o("span", { className: t.loading, children: "Loading...." }) })
35
+ children: /* @__PURE__ */ s("span", { className: t.label, "data-size": r, children: /* @__PURE__ */ s("span", { className: t.loading, children: x }) })
34
36
  }
35
- ) : /* @__PURE__ */ x(
37
+ ) : /* @__PURE__ */ _(
36
38
  d,
37
39
  {
38
- variant: r,
39
- color: e,
40
- size: s,
40
+ variant: e,
41
+ color: o,
42
+ size: r,
41
43
  selected: a,
42
44
  href: l,
43
- className: u(t.button, { [t.reverse]: n }),
44
- ...c,
45
+ className: c(t.button, { [t.reverse]: n }),
46
+ ...u,
45
47
  children: [
46
- m && /* @__PURE__ */ o(_, { size: s, icon: m }),
47
- /* @__PURE__ */ o(B, { size: s, children: b || i })
48
+ m && /* @__PURE__ */ s(B, { size: r, icon: m }),
49
+ /* @__PURE__ */ s(h, { size: r, children: b || i })
48
50
  ]
49
51
  }
50
52
  );
51
53
  export {
52
- I as Button
54
+ k as Button
53
55
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import '../../assets/LayoutBody.css';const s = "_body_1oj0m_1", r = {
2
+ import '../../assets/LayoutBody.css';const s = "_body_18zk9_1", r = {
3
3
  body: s
4
4
  }, a = ({ currentId: o, children: t }) => /* @__PURE__ */ d("div", { className: r.body, "data-current-id": o, children: t });
5
5
  export {
@@ -1,8 +1,8 @@
1
- import { jsx as u } from "react/jsx-runtime";
1
+ import { jsx as y } from "react/jsx-runtime";
2
2
  import { c as _ } from "../../index-L8X2o7IH.js";
3
- import '../../assets/Flex.css';const h = "_flex_m0l5u_1", j = {
4
- flex: h
5
- }, C = ({
3
+ import '../../assets/Flex.css';const b = "_flex_yqbrl_1", h = {
4
+ flex: b
5
+ }, w = ({
6
6
  as: a = "div",
7
7
  color: t,
8
8
  theme: e = "transparent",
@@ -11,18 +11,18 @@ import '../../assets/Flex.css';const h = "_flex_m0l5u_1", j = {
11
11
  reverse: d = !1,
12
12
  align: s = "initial",
13
13
  justify: i = "initial",
14
- spacing: l,
15
- padding: r,
14
+ spacing: r,
15
+ padding: l,
16
16
  margin: c,
17
- bleed: m = !1,
18
- className: f,
17
+ bleed: f = !1,
18
+ className: m,
19
19
  style: p,
20
20
  children: x,
21
21
  ...g
22
- }) => /* @__PURE__ */ u(
22
+ }) => /* @__PURE__ */ y(
23
23
  a,
24
24
  {
25
- className: _(j.flex, f),
25
+ className: _(h.flex, m),
26
26
  style: p,
27
27
  "data-color": t,
28
28
  "data-theme": e,
@@ -31,14 +31,14 @@ import '../../assets/Flex.css';const h = "_flex_m0l5u_1", j = {
31
31
  "data-reverse": d,
32
32
  "data-align": s,
33
33
  "data-justify": i,
34
- "data-spacing": l,
35
- "data-padding": r,
34
+ "data-spacing": r,
35
+ "data-padding": l,
36
36
  "data-margin": c,
37
- "data-bleed": m,
37
+ "data-bleed": f,
38
38
  ...g,
39
39
  children: x
40
40
  }
41
41
  );
42
42
  export {
43
- C as Flex
43
+ w as Flex
44
44
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { c as p } from "../../index-L8X2o7IH.js";
3
- import '../../assets/Grid.css';const l = "_grid_bzro4_1", f = {
3
+ import '../../assets/Grid.css';const l = "_grid_5zqvf_1", f = {
4
4
  grid: l
5
5
  }, C = ({
6
6
  as: a = "div",
@@ -4,6 +4,7 @@ export interface ButtonProps extends Partial<ButtonBaseProps> {
4
4
  icon?: IconName;
5
5
  reverse?: boolean;
6
6
  loading?: boolean;
7
+ loadingText?: string;
7
8
  label?: string;
8
9
  }
9
- export declare const Button: ({ variant, color, size, reverse, selected, icon, href, label, children, className, loading, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Button: ({ variant, color, size, reverse, selected, icon, href, label, children, className, loading, loadingText, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ variant, color, size, reverse, selected, icon, href, label, children, className, loading, ...rest }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ variant, color, size, reverse, selected, icon, href, label, children, className, loading, loadingText, ...rest }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {};
7
7
  args: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",