@altinn/altinn-components 0.51.1 → 0.51.2
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
|
-
.
|
|
1
|
+
._item_ygbc3_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_ygbc3_1[data-size=md]{min-height:56px}._item_ygbc3_1[data-size=md]{min-height:44px}._item_ygbc3_1[data-size=sm]{min-height:40px}._content_ygbc3_40{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_ygbc3_1{background-color:transparent}._item_ygbc3_1{pointer-events:none}._item_ygbc3_1[data-interactive=true]{pointer-events:all}._item_ygbc3_1[data-interactive=true]:hover{background-color:var(--ds-color-surface-hover)}._item_ygbc3_1[data-active=true]{background-color:var(--ds-color-background-tinted)}._item_ygbc3_1[data-active=true]{outline:2px solid black}._item_ygbc3_1[data-selected=true],._item_ygbc3_1:active,[data-variant=subtle] ._item_ygbc3_1:hover{background-color:var(--ds-color-surface-hover)}[data-variant=subtle] ._item_ygbc3_1:active{background-color:var(--ds-color-surface-active)}[data-variant=subtle] ._item_ygbc3_1[data-selected=true]{background-color:var(--ds-color-background-default)}._content_ygbc3_40{display:flex;width:100%;align-items:center;column-gap:.5em}._item_ygbc3_1[aria-disabled=true]{opacity:.5;pointer-events:none;outline:none;box-shadow:none;background-color:transparent}._item_ygbc3_1:not([aria-disabled=true]):focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline))}._item_ygbc3_1:not([aria-disabled=true]):focus-visible *{--_ds--focus: }
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import '../../assets/MenuItemBase.css';const
|
|
5
|
-
item:
|
|
6
|
-
content:
|
|
7
|
-
},
|
|
8
|
-
interactive:
|
|
9
|
-
ariaLabel:
|
|
10
|
-
role:
|
|
2
|
+
import { c as y } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { useRef as z } from "react";
|
|
4
|
+
import '../../assets/MenuItemBase.css';const B = "_item_ygbc3_1", E = "_content_ygbc3_40", c = {
|
|
5
|
+
item: B,
|
|
6
|
+
content: E
|
|
7
|
+
}, w = ({
|
|
8
|
+
interactive: m = !0,
|
|
9
|
+
ariaLabel: o,
|
|
10
|
+
role: s,
|
|
11
11
|
as: i,
|
|
12
12
|
color: d,
|
|
13
|
-
variant:
|
|
14
|
-
size:
|
|
13
|
+
variant: f,
|
|
14
|
+
size: p,
|
|
15
15
|
className: u,
|
|
16
16
|
href: _,
|
|
17
17
|
onClick: t,
|
|
@@ -20,24 +20,24 @@ import '../../assets/MenuItemBase.css';const R = "_item_cs9p2_1", b = "_content_
|
|
|
20
20
|
hidden: x,
|
|
21
21
|
selected: v,
|
|
22
22
|
disabled: a = !1,
|
|
23
|
-
children:
|
|
24
|
-
active:
|
|
25
|
-
onMouseEnter:
|
|
26
|
-
dataTestId:
|
|
23
|
+
children: b,
|
|
24
|
+
active: g,
|
|
25
|
+
onMouseEnter: h,
|
|
26
|
+
dataTestId: I
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
28
|
+
const N = i || "a", j = z(null);
|
|
29
29
|
return /* @__PURE__ */ r(
|
|
30
|
-
|
|
30
|
+
N,
|
|
31
31
|
{
|
|
32
32
|
tabIndex: a ? "-1" : l ?? 0,
|
|
33
|
-
className:
|
|
34
|
-
role:
|
|
35
|
-
"aria-label":
|
|
36
|
-
"data-interactive": !a &&
|
|
37
|
-
"data-active":
|
|
38
|
-
"data-size":
|
|
33
|
+
className: y(c.item, u),
|
|
34
|
+
role: s,
|
|
35
|
+
"aria-label": o,
|
|
36
|
+
"data-interactive": !a && m,
|
|
37
|
+
"data-active": g,
|
|
38
|
+
"data-size": p,
|
|
39
39
|
"data-color": d,
|
|
40
|
-
"data-variant":
|
|
40
|
+
"data-variant": f,
|
|
41
41
|
"aria-hidden": x,
|
|
42
42
|
"aria-disabled": a,
|
|
43
43
|
"data-selected": v,
|
|
@@ -46,13 +46,13 @@ import '../../assets/MenuItemBase.css';const R = "_item_cs9p2_1", b = "_content_
|
|
|
46
46
|
a || (n.key === "Enter" && (t == null || t()), e == null || e(n));
|
|
47
47
|
},
|
|
48
48
|
onClick: t,
|
|
49
|
-
onMouseEnter:
|
|
50
|
-
"data-testid":
|
|
51
|
-
ref:
|
|
52
|
-
children: /* @__PURE__ */ r("span", { className: c.content, children:
|
|
49
|
+
onMouseEnter: h,
|
|
50
|
+
"data-testid": I,
|
|
51
|
+
ref: j,
|
|
52
|
+
children: /* @__PURE__ */ r("span", { className: c.content, children: b })
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
w as MenuItemBase
|
|
58
58
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ backButton, contextMenu, pageMenu, children }: import('./DialogLayout').DialogLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {};
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const WithAnchors: Story;
|
|
12
|
+
export declare const MixedButtonsAndAnchors: Story;
|
|
13
|
+
export declare const WithBaseTheme: Story;
|
|
14
|
+
export declare const WithContextMenu: Story;
|