@midas-ds/layout 0.0.7 → 0.0.9
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.
- package/CHANGELOG.md +21 -0
- package/assets/Button.css +1 -0
- package/assets/Header.css +1 -0
- package/assets/NavigationSubMenu.css +1 -0
- package/assets/Panel.css +1 -1
- package/chunks/Button-7IYEsEeT.js +192 -0
- package/chunks/Header-DjegZbd1.js +101 -0
- package/chunks/NavigationSubMenu-CpS-A3-h.js +208 -0
- package/chunks/Panel-BsVbn7nx.js +156 -0
- package/chunks/PanelContext-D6WQ7_yb.js +11 -0
- package/chunks/Text-B18MZHuN.js +56 -0
- package/chunks/useIsMobileDevice-D0iMVFPx.js +25 -0
- package/header/header-action/HeaderAction.d.ts +6 -0
- package/header/header-action/index.d.ts +1 -0
- package/header/header-actions/HeaderActions.d.ts +3 -10
- package/header/header-actions/HeaderActions.stories.d.ts +284 -10
- package/header/index.d.ts +2 -1
- package/header/index.js +7 -6
- package/header/mobile-menu/MobileMenu.d.ts +2 -1
- package/index.js +27 -21
- package/navigation/Navigation.d.ts +1 -6
- package/navigation/Navigation.stories.d.ts +1 -4
- package/navigation/index.d.ts +5 -1
- package/navigation/index.js +1 -1
- package/navigation/{components/header → navigation-header}/NavigationHeader.d.ts +1 -1
- package/navigation/{components/link → navigation-link}/NavigationLink.d.ts +1 -1
- package/navigation/{components/sub-menu → navigation-sub-menu}/NavigationSubMenu.d.ts +3 -2
- package/package.json +2 -2
- package/panel/Panel.d.ts +5 -2
- package/panel/Panel.stories.d.ts +1 -1
- package/panel/PanelContext.d.ts +0 -2
- package/panel/{components/collapse-panel → collapse-panel}/CollapsePanel.d.ts +1 -1
- package/panel/collapse-panel/CollapsePanelContext.d.ts +3 -0
- package/panel/collapse-panel/index.d.ts +2 -0
- package/panel/{components/dismiss-panel → dismiss-panel}/DismissPanel.d.ts +1 -1
- package/panel/index.d.ts +5 -0
- package/panel/index.js +10 -5
- package/panel/{components/panel-title → panel-title}/PanelTitle.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +4 -0
- package/assets/MobileMenu.css +0 -1
- package/assets/Navigation.css +0 -1
- package/assets/useIsMobileDevice.css +0 -1
- package/chunks/MobileMenu-DcQpdykm.js +0 -86
- package/chunks/Navigation-Cq0h2Nt9.js +0 -212
- package/chunks/Panel-C1MEWSWX.js +0 -147
- package/chunks/PanelContext-D2ADxgo6.js +0 -44
- package/chunks/clsx-AexbMWKp.js +0 -24
- package/chunks/useIsMobileDevice-DhQB0ae2.js +0 -213
- package/navigation/components/index.d.ts +0 -5
- package/panel/components/collapse-panel/index.d.ts +0 -1
- package/panel/components/index.d.ts +0 -5
- /package/assets/{PanelContext.css → Text.css} +0 -0
- /package/navigation/{components/header → navigation-header}/index.d.ts +0 -0
- /package/navigation/{components/item → navigation-item}/NavigationItem.d.ts +0 -0
- /package/navigation/{components/item → navigation-item}/index.d.ts +0 -0
- /package/navigation/{components/link → navigation-link}/NavigationLink.stories.d.ts +0 -0
- /package/navigation/{components/link → navigation-link}/index.d.ts +0 -0
- /package/navigation/{components/section → navigation-section}/NavigationSection.d.ts +0 -0
- /package/navigation/{components/section → navigation-section}/index.d.ts +0 -0
- /package/navigation/{components/sub-menu → navigation-sub-menu}/index.d.ts +0 -0
- /package/panel/{components/dismiss-panel → dismiss-panel}/index.d.ts +0 -0
- /package/panel/{components/panel-body → panel-body}/PanelBody.d.ts +0 -0
- /package/panel/{components/panel-body → panel-body}/index.d.ts +0 -0
- /package/panel/{components/panel-header → panel-header}/PanelHeader.d.ts +0 -0
- /package/panel/{components/panel-header → panel-header}/index.d.ts +0 -0
- /package/panel/{components/panel-title → panel-title}/index.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 0.0.9 (2026-03-12)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated components to 17.7.7
|
|
6
|
+
|
|
7
|
+
## 0.0.8 (2026-03-11)
|
|
8
|
+
|
|
9
|
+
### 🩹 Fixes
|
|
10
|
+
|
|
11
|
+
- **layout, mobile-menu:** adjust css styles ([cbf9917399](https://github.com/migrationsverket/midas/commit/cbf9917399))
|
|
12
|
+
|
|
13
|
+
### 🏭 Refactoring
|
|
14
|
+
|
|
15
|
+
- **layout:** rename folders and adjust module boundaries ([d403b2d226](https://github.com/migrationsverket/midas/commit/d403b2d226))
|
|
16
|
+
- **layout, panel:** flatten folder structure ([1d9f8feaf4](https://github.com/migrationsverket/midas/commit/1d9f8feaf4))
|
|
17
|
+
|
|
18
|
+
### 🧱 Updated Dependencies
|
|
19
|
+
|
|
20
|
+
- Updated components to 17.7.6
|
|
21
|
+
|
|
1
22
|
## 0.0.7 (2026-03-11)
|
|
2
23
|
|
|
3
24
|
### 🧱 Updated Dependencies
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1qexx_1{display:inline-flex}._spinner_1qexx_5{animation:_rotating_1qexx_1 1s linear infinite;stroke-linecap:square}@media(prefers-reduced-motion){._spinner_1qexx_5{animation-duration:2s}}@media(forced-colors:active){._spinner_1qexx_5{color:CanvasText}}._large_1qexx_18{color:var(--midas-icon-tertiary)}@keyframes _rotating_1qexx_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._button_7n7qm_1{--border-width: 1px;font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-30);font-weight:500;padding:calc(var(--midas-space-70) - var(--border-width)) calc(var(--midas-space-large) - var(--border-width));line-height:var(--midas-typography-line-height-30);background-color:var(--midas-button-background-primary-base);border:solid var(--border-width) transparent;color:var(--midas-text-on-color);cursor:pointer;opacity:1;outline:none;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:.5rem}._button_7n7qm_1[data-focus-visible],._button_7n7qm_1:focus-visible{box-shadow:var(--midas-state-focus)}@media(forced-colors:active){._button_7n7qm_1[data-focus-visible],._button_7n7qm_1:focus-visible{outline:3px solid highlight;outline-offset:2px}}._button_7n7qm_1[data-hovered]{background-color:var(--midas-button-background-primary-hover)}._button_7n7qm_1[data-pressed]:not([aria-expanded=true],[aria-haspopup=true]){background-color:var(--midas-button-background-primary-active);outline:none}._button_7n7qm_1[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed;background-color:var(--midas-button-background-disabled)}._secondary_7n7qm_48{color:var(--midas-text-tertiary);background-color:var(--midas-button-background-secondary-base);border-color:var(--midas-button-border-secondary);opacity:1}._secondary_7n7qm_48[data-hovered]{background-color:var(--midas-button-background-secondary-hover)}._secondary_7n7qm_48[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed;background-color:var(--midas-button-background-disabled);border-color:var(--midas-border-color-disabled)}._secondary_7n7qm_48[data-pressed]:not([aria-expanded=true],[aria-haspopup=true]){background-color:var(--midas-button-background-secondary-active);border-color:var(--midas-text-tertiary)}._tertiary_7n7qm_71{color:var(--midas-text-tertiary);background-color:transparent;opacity:1}._tertiary_7n7qm_71[data-hovered]{background-color:var(--midas-button-background-tertiary-hover)}._tertiary_7n7qm_71[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed;background-color:#fff}._tertiary_7n7qm_71[data-pressed]:not([aria-expanded=true],[aria-haspopup=true]){background-color:var(--midas-button-background-tertiary-active)}._iconBtn_7n7qm_91{background-color:transparent;padding:calc(var(--midas-space-70) - var(--border-width));color:var(--midas-icon-primary);display:flex;align-items:center}._iconBtn_7n7qm_91[data-hovered]{background-color:var(--midas-button-icon-hover)}._iconBtn_7n7qm_91[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed}._iconBtn_7n7qm_91[data-pressed]:not([aria-expanded=true],[aria-haspopup=true]){background-color:var(--midas-button-icon-active)}._iconBtn_7n7qm_91._medium_7n7qm_111{padding:calc(var(--midas-space-50) - var(--border-width))}._danger_7n7qm_116{color:var(--midas-color-white-base);background-color:var(--midas-button-background-danger-base);opacity:1}._danger_7n7qm_116[data-hovered]{color:var(--midas-color-white-base);background-color:var(--midas-button-background-danger-hover)}._danger_7n7qm_116[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed;background-color:var(--midas-button-background-disabled)}._danger_7n7qm_116[data-pressed]:not([aria-expanded=true],[aria-haspopup=true]){background-color:var(--midas-button-background-danger-active);outline:none}._iconRight_7n7qm_138{flex-direction:row-reverse}._fullwidth_7n7qm_142{width:100%}._medium_7n7qm_111{padding:calc(var(--midas-space-50) - var(--border-width)) calc(var(--midas-space-medium) - var(--border-width))}@media(forced-colors:active){._primary_7n7qm_152{border-width:2px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._headerActions_1rka5_1{display:flex;gap:.25rem;align-items:center;margin-inline-start:auto}@media(max-width:640px){._label_1191f_1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}}._overlay_12sw8_1{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:#0000004d;height:var(--page-height);left:0;position:absolute;top:0;width:100%}._overlay_12sw8_1[data-entering]{animation:_drawer-blur_12sw8_1 var(--midas-transition-duration-fast)}._overlay_12sw8_1[data-exiting]{animation:_drawer-blur_12sw8_1 var(--midas-transition-duration-fast) reverse ease-in}._drawer_12sw8_19{background-color:var(--midas-background-base);left:0;position:sticky;width:clamp(10rem,15rem,90%);border-right:1px solid var(--midas-border-color-subtle);box-shadow:-8px 0 20px #0000001a;height:calc(100dvh + 200px);margin-right:auto;outline:none;overflow-y:auto;top:-100px}._drawer_12sw8_19[data-entering]{animation:_drawer-slide_12sw8_1 var(--midas-transition-duration-fast)}._drawer_12sw8_19[data-exiting]{animation:_drawer-slide_12sw8_1 var(--midas-transition-duration-fast) reverse ease-in}._header_12sw8_44{background-color:var(--midas-background-base);display:block;margin-bottom:var(--midas-space-medium);padding:var(--midas-space-medium);position:sticky;top:0}@keyframes _drawer-blur_12sw8_1{0%{background:#0000;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{background:#0000004d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}}@keyframes _drawer-slide_12sw8_1{0%{transform:translate(-100%)}to{transform:translate(0)}}._header_105ne_1{background-color:var(--midas-background-base);display:flex;flex:1 0 auto;padding:1rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tooltip_2gvxu_1{font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-20);padding:var(--midas-space-xsmall) var(--midas-space-small);color:var(--midas-text-inverse);background-color:var(--midas-background-inverse);max-width:150px;outline:none;transform:translateZ(0);transition:transform var(--midas-transition-duration-fast),opacity var(--midas-transition-duration-fast)}@media(forced-colors:active){._tooltip_2gvxu_1{border:1px solid}}._tooltip_2gvxu_1 ._arrow_2gvxu_18 svg{display:block;fill:var(--midas-background-inverse)}@media(forced-colors:active){._tooltip_2gvxu_1 ._arrow_2gvxu_18 svg{fill:currentColor}}._tooltip_2gvxu_1[data-entering],._tooltip_2gvxu_1[data-exiting]{transform:var(--origin);opacity:0}._tooltip_2gvxu_1[data-placement=top]{margin-bottom:8px;--origin: translateY(4px)}._tooltip_2gvxu_1[data-placement=bottom]{margin-top:8px;--origin: translateY(-4px)}._tooltip_2gvxu_1[data-placement=bottom] ._arrow_2gvxu_18 svg{transform:rotate(180deg)}._tooltip_2gvxu_1[data-placement=right]{margin-left:8px;--origin: translateX(-4px)}._tooltip_2gvxu_1[data-placement=right] ._arrow_2gvxu_18 svg{transform:rotate(90deg)}._tooltip_2gvxu_1[data-placement=left]{margin-right:8px;--origin: translateX(4px)}._tooltip_2gvxu_1[data-placement=left] ._arrow_2gvxu_18 svg{transform:rotate(-90deg)}@media(prefers-reduced-motion){._tooltip_2gvxu_1{transition:none}}._rootList_l3v98_1{margin:0;padding:0}._navigationHeader_j94pq_1{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-20);padding:var(--midas-spacing-30)}._navigationHeader_j94pq_1._collapsed_j94pq_6{display:none}._navigationItem_1jt2l_1{list-style:none}._navigationLink_tfdcf_1{align-items:center;align-self:stretch;border-left:var(--midas-size-10) solid transparent;color:var(--midas-text-primary);display:flex;flex-direction:column;flex:1 0 0%;font-family:var(--midas-typography-font-family);gap:var(--midas-spacing-30);justify-content:flex-end;padding:var(--midas-spacing-50);text-decoration:none}._navigationLink_tfdcf_1[data-hovered],._navigationLink_tfdcf_1:hover,._navigationLink_tfdcf_1[data-active]{background-color:var(--midas-menu-item-background-hover)}._navigationLink_tfdcf_1._collapse_tfdcf_21{flex-direction:row;justify-content:flex-start;padding:.625rem var(--midas-spacing-30)}._navigationLink_tfdcf_1._collapse_tfdcf_21[data-active]{border-color:var(--midas-border-color-tertiary);font-weight:var(--midas-typography-weight-bold)}._navigationLink_tfdcf_1 svg{height:var(--midas-size-90);width:var(--midas-size-90)}._navigationLink_tfdcf_1._collapsed_tfdcf_37{justify-content:center}._navigationLink_tfdcf_1._collapsed_tfdcf_37 ._title_tfdcf_40{display:none}._navigationSection_1ae77_1{padding:0;margin:0 0 1rem}._navigationSection_1ae77_1._collapsed_1ae77_5{margin-bottom:0}._navigationSubMenu_vfyl6_1{padding:0;margin:0 0 1rem 1rem}._navigationSubMenu_vfyl6_1._collapsed_vfyl6_5{margin-left:0}
|
package/assets/Panel.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._collapsePanel_1uy7t_1{width:15rem}._collapsePanel_1uy7t_1._collapsed_1uy7t_4{width:80px}@media(max-width:640px){._collapsePanel_1uy7t_1{display:none}}._panelHeader_1uy7t_13{gap:0}._panelTitle_1uy7t_17{font-size:var(--midas-typography-font-size-20);display:block}._panelBody_1rrgz_1{background-color:var(--midas-background-base);box-sizing:border-box;padding:1rem;transition:width var(--midas-transition-duration-fast) ease-out;width:100%}._panelHeader_11qv1_1{align-items:center;display:flex;justify-content:space-between}._panelTitle_w7y4m_1{display:block}._dismissPanel_dpjsv_1{position:absolute!important;top:0;right:0;width:320px;height:100%}@media not (min-width:800px){._dismissPanel_dpjsv_1{bottom:0;width:100%;height:25%;left:0;top:unset}}._panelTitle_dpjsv_18{font-size:var(--midas-typography-font-size-20);display:block}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs as L, jsx as c, Fragment as q } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f, createElement as _, useMemo as k } from "react";
|
|
4
|
+
import { useLocale as v, useContextProps as A, ButtonContext as N, Button as P, composeRenderProps as z } from "react-aria-components";
|
|
5
|
+
import { c as h } from "./Text-B18MZHuN.js";
|
|
6
|
+
import { VisuallyHidden as S } from "react-aria";
|
|
7
|
+
import { LocalizedStringFormatter as W, LocalizedStringDictionary as R } from "@internationalized/string";
|
|
8
|
+
import '../assets/Button.css';const $ = "_container_1qexx_1", j = "_spinner_1qexx_5", D = "_large_1qexx_18", g = {
|
|
9
|
+
container: $,
|
|
10
|
+
spinner: j,
|
|
11
|
+
large: D
|
|
12
|
+
};
|
|
13
|
+
const x = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
|
|
14
|
+
const F = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
15
|
+
const E = (e) => e.replace(
|
|
16
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
17
|
+
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
18
|
+
);
|
|
19
|
+
const w = (e) => {
|
|
20
|
+
const t = E(e);
|
|
21
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
22
|
+
};
|
|
23
|
+
var U = {
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
width: 24,
|
|
26
|
+
height: 24,
|
|
27
|
+
viewBox: "0 0 24 24",
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: 2,
|
|
31
|
+
strokeLinecap: "round",
|
|
32
|
+
strokeLinejoin: "round"
|
|
33
|
+
};
|
|
34
|
+
const I = (e) => {
|
|
35
|
+
for (const t in e)
|
|
36
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
37
|
+
return !0;
|
|
38
|
+
return !1;
|
|
39
|
+
};
|
|
40
|
+
const M = f(
|
|
41
|
+
({
|
|
42
|
+
color: e = "currentColor",
|
|
43
|
+
size: t = 24,
|
|
44
|
+
strokeWidth: n = 2,
|
|
45
|
+
absoluteStrokeWidth: r,
|
|
46
|
+
className: i = "",
|
|
47
|
+
children: a,
|
|
48
|
+
iconNode: l,
|
|
49
|
+
...d
|
|
50
|
+
}, u) => _(
|
|
51
|
+
"svg",
|
|
52
|
+
{
|
|
53
|
+
ref: u,
|
|
54
|
+
...U,
|
|
55
|
+
width: t,
|
|
56
|
+
height: t,
|
|
57
|
+
stroke: e,
|
|
58
|
+
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
59
|
+
className: x("lucide", i),
|
|
60
|
+
...!a && !I(d) && { "aria-hidden": "true" },
|
|
61
|
+
...d
|
|
62
|
+
},
|
|
63
|
+
[
|
|
64
|
+
...l.map(([m, p]) => _(m, p)),
|
|
65
|
+
...Array.isArray(a) ? a : [a]
|
|
66
|
+
]
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
const G = (e, t) => {
|
|
70
|
+
const n = f(
|
|
71
|
+
({ className: r, ...i }, a) => _(M, {
|
|
72
|
+
ref: a,
|
|
73
|
+
iconNode: t,
|
|
74
|
+
className: x(
|
|
75
|
+
`lucide-${F(w(e))}`,
|
|
76
|
+
`lucide-${e}`,
|
|
77
|
+
r
|
|
78
|
+
),
|
|
79
|
+
...i
|
|
80
|
+
})
|
|
81
|
+
);
|
|
82
|
+
return n.displayName = w(e), n;
|
|
83
|
+
};
|
|
84
|
+
const Z = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], H = G("loader-circle", Z), y = "sv", C = /* @__PURE__ */ new WeakMap();
|
|
85
|
+
function K(e) {
|
|
86
|
+
let t = C.get(e);
|
|
87
|
+
return t || (t = new R(e, y), C.set(e, t)), t;
|
|
88
|
+
}
|
|
89
|
+
function O(e, t) {
|
|
90
|
+
return K(e);
|
|
91
|
+
}
|
|
92
|
+
function T(e, t) {
|
|
93
|
+
if (!e || typeof e != "object" || !(y in e))
|
|
94
|
+
throw new Error(
|
|
95
|
+
`useLocalizedStringFormatter: Default language "${y}" must be defined in dictionary.`
|
|
96
|
+
);
|
|
97
|
+
const { locale: n } = v(), r = O(e);
|
|
98
|
+
return k(
|
|
99
|
+
() => new W(n, r),
|
|
100
|
+
[r, n]
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
const V = { loadingPleaseWait: "Loading, please wait..." }, J = { loadingPleaseWait: "Laddar, vänligen vänta..." }, Q = {
|
|
104
|
+
en: V,
|
|
105
|
+
sv: J
|
|
106
|
+
}, X = ({
|
|
107
|
+
small: e,
|
|
108
|
+
color: t,
|
|
109
|
+
className: n
|
|
110
|
+
}) => {
|
|
111
|
+
const r = T(Q);
|
|
112
|
+
return /* @__PURE__ */ L(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
className: h(g.container, n),
|
|
116
|
+
role: "status",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ c(
|
|
119
|
+
H,
|
|
120
|
+
{
|
|
121
|
+
className: h(g.spinner, !e && g.large),
|
|
122
|
+
size: e ? 20 : 96,
|
|
123
|
+
strokeWidth: e ? 2 : 8,
|
|
124
|
+
absoluteStrokeWidth: !0,
|
|
125
|
+
color: t
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ c(S, { children: r.format("loadingPleaseWait") })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}, Y = "_button_7n7qm_1", ee = "_secondary_7n7qm_48", te = "_tertiary_7n7qm_71", ne = "_iconBtn_7n7qm_91", re = "_medium_7n7qm_111", oe = "_danger_7n7qm_116", ae = "_iconRight_7n7qm_138", ie = "_fullwidth_7n7qm_142", se = "_primary_7n7qm_152", o = {
|
|
133
|
+
button: Y,
|
|
134
|
+
secondary: ee,
|
|
135
|
+
tertiary: te,
|
|
136
|
+
iconBtn: ne,
|
|
137
|
+
medium: re,
|
|
138
|
+
danger: oe,
|
|
139
|
+
iconRight: ae,
|
|
140
|
+
fullwidth: ie,
|
|
141
|
+
primary: se
|
|
142
|
+
}, ce = f(
|
|
143
|
+
(e, t) => {
|
|
144
|
+
const [n, r] = A(e, t, N), {
|
|
145
|
+
className: i,
|
|
146
|
+
fullwidth: a,
|
|
147
|
+
icon: l,
|
|
148
|
+
iconPlacement: d,
|
|
149
|
+
iconSize: u,
|
|
150
|
+
isPending: m,
|
|
151
|
+
size: p = "large",
|
|
152
|
+
variant: s = "primary",
|
|
153
|
+
...B
|
|
154
|
+
} = n;
|
|
155
|
+
return /* @__PURE__ */ c(
|
|
156
|
+
P,
|
|
157
|
+
{
|
|
158
|
+
className: h(
|
|
159
|
+
o.button,
|
|
160
|
+
s === "primary" && o.primary,
|
|
161
|
+
s === "secondary" && o.secondary,
|
|
162
|
+
s === "tertiary" && o.tertiary,
|
|
163
|
+
s === "danger" && o.danger,
|
|
164
|
+
s === "icon" && o.iconBtn,
|
|
165
|
+
a && o.fullwidth,
|
|
166
|
+
p === "medium" && o.medium,
|
|
167
|
+
d === "right" && o.iconRight,
|
|
168
|
+
i
|
|
169
|
+
),
|
|
170
|
+
ref: r,
|
|
171
|
+
...B,
|
|
172
|
+
children: z(n.children, (b) => /* @__PURE__ */ L(q, { children: [
|
|
173
|
+
l && !m && /* @__PURE__ */ c(
|
|
174
|
+
l,
|
|
175
|
+
{
|
|
176
|
+
"aria-hidden": !0,
|
|
177
|
+
size: u ?? 20
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
m && /* @__PURE__ */ c(X, { small: !0 }),
|
|
181
|
+
b
|
|
182
|
+
] }))
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
ce.displayName = "Button";
|
|
188
|
+
export {
|
|
189
|
+
ce as B,
|
|
190
|
+
G as c,
|
|
191
|
+
T as u
|
|
192
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as e, jsxs as l, Fragment as v } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as f, forwardRef as b } from "react";
|
|
4
|
+
import { composeRenderProps as d, DialogTrigger as y, ModalOverlay as M, Modal as w, Dialog as N } from "react-aria-components";
|
|
5
|
+
import { c as g, B as h } from "./Button-7IYEsEeT.js";
|
|
6
|
+
import { useControlledState as x } from "@react-stately/utils";
|
|
7
|
+
import { u as m } from "./useIsMobileDevice-D0iMVFPx.js";
|
|
8
|
+
import { M as A } from "./MobileMenuContext-Coj0sJ0N.js";
|
|
9
|
+
import { T as D, c as O } from "./Text-B18MZHuN.js";
|
|
10
|
+
import '../assets/Header.css';const H = "_headerActions_1rka5_1", P = {
|
|
11
|
+
headerActions: H
|
|
12
|
+
}, U = ({ className: a, ...r }) => /* @__PURE__ */ e(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: `${a} ${P.headerActions}`,
|
|
16
|
+
...r
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
const $ = [
|
|
20
|
+
["path", { d: "M4 5h16", key: "1tepv9" }],
|
|
21
|
+
["path", { d: "M4 12h16", key: "1lakjw" }],
|
|
22
|
+
["path", { d: "M4 19h16", key: "1djgab" }]
|
|
23
|
+
], k = g("menu", $), C = f({
|
|
24
|
+
size: void 0
|
|
25
|
+
}), j = "_label_1191f_1", z = {
|
|
26
|
+
label: j
|
|
27
|
+
}, I = b(
|
|
28
|
+
({ children: a, icon: r, ...s }, n) => (!a && !s["aria-label"] && process.env.NODE_ENV !== "production" && console.warn(
|
|
29
|
+
"Please provide an 'aria-label' for HeaderAction components that doesnt have a visible label (children)"
|
|
30
|
+
), /* @__PURE__ */ e(
|
|
31
|
+
h,
|
|
32
|
+
{
|
|
33
|
+
ref: n,
|
|
34
|
+
size: "medium",
|
|
35
|
+
variant: "tertiary",
|
|
36
|
+
...s,
|
|
37
|
+
children: d(a, (o) => /* @__PURE__ */ l(v, { children: [
|
|
38
|
+
r,
|
|
39
|
+
typeof o < "u" && /* @__PURE__ */ e("span", { className: z.label, children: o })
|
|
40
|
+
] }))
|
|
41
|
+
}
|
|
42
|
+
))
|
|
43
|
+
);
|
|
44
|
+
I.displayName = "HeaderAction";
|
|
45
|
+
const T = "_overlay_12sw8_1", B = "_drawer_12sw8_19", E = "_header_12sw8_44", i = {
|
|
46
|
+
overlay: T,
|
|
47
|
+
drawer: B,
|
|
48
|
+
header: E
|
|
49
|
+
}, W = ({
|
|
50
|
+
children: a,
|
|
51
|
+
title: r,
|
|
52
|
+
isDrawerOpen: s,
|
|
53
|
+
defaultDrawerOpen: n = !1,
|
|
54
|
+
onDrawerOpenChange: o
|
|
55
|
+
}) => {
|
|
56
|
+
const p = m(), [_, c] = x(
|
|
57
|
+
s,
|
|
58
|
+
n,
|
|
59
|
+
o
|
|
60
|
+
), u = () => c((t) => !t);
|
|
61
|
+
return p ? /* @__PURE__ */ e(A.Provider, { value: {}, children: /* @__PURE__ */ l(y, { children: [
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
h,
|
|
64
|
+
{
|
|
65
|
+
icon: k,
|
|
66
|
+
variant: "icon",
|
|
67
|
+
onPress: u
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
M,
|
|
72
|
+
{
|
|
73
|
+
className: i.overlay,
|
|
74
|
+
isDismissable: !0,
|
|
75
|
+
isOpen: _,
|
|
76
|
+
onOpenChange: c,
|
|
77
|
+
children: d(a, (t) => /* @__PURE__ */ e(w, { className: i.drawer, children: /* @__PURE__ */ l(N, { children: [
|
|
78
|
+
r && /* @__PURE__ */ e(D, { className: i.header, children: r }),
|
|
79
|
+
t
|
|
80
|
+
] }) }))
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] }) }) : null;
|
|
84
|
+
}, L = "_header_105ne_1", R = {
|
|
85
|
+
header: L
|
|
86
|
+
}, X = ({ className: a, ...r }) => {
|
|
87
|
+
const s = m();
|
|
88
|
+
return /* @__PURE__ */ e(C.Provider, { value: { size: s ? "x-small" : "large" }, children: /* @__PURE__ */ e(
|
|
89
|
+
"header",
|
|
90
|
+
{
|
|
91
|
+
className: O(a, R.header),
|
|
92
|
+
...r
|
|
93
|
+
}
|
|
94
|
+
) });
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
X as H,
|
|
98
|
+
W as M,
|
|
99
|
+
I as a,
|
|
100
|
+
U as b
|
|
101
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as t, jsxs as g, Fragment as $ } from "react/jsx-runtime";
|
|
3
|
+
import { TooltipTrigger as S, Tooltip as M, OverlayArrow as k, Collection as w, OverlayTriggerStateContext as j, Focusable as H, Link as I } from "react-aria-components";
|
|
4
|
+
import { useContext as i } from "react";
|
|
5
|
+
import { c, T as P } from "./Text-B18MZHuN.js";
|
|
6
|
+
import { C as d, P as O } from "./PanelContext-D6WQ7_yb.js";
|
|
7
|
+
import { M as D } from "./MobileMenuContext-Coj0sJ0N.js";
|
|
8
|
+
import { Collection as L } from "@react-aria/collections";
|
|
9
|
+
import '../assets/NavigationSubMenu.css';const q = "_tooltip_2gvxu_1", F = "_arrow_2gvxu_18", C = {
|
|
10
|
+
tooltip: q,
|
|
11
|
+
arrow: F
|
|
12
|
+
};
|
|
13
|
+
function A({ children: o, className: n, ...a }) {
|
|
14
|
+
return /* @__PURE__ */ t(
|
|
15
|
+
M,
|
|
16
|
+
{
|
|
17
|
+
className: c(C.tooltip, n),
|
|
18
|
+
...a,
|
|
19
|
+
children: (e) => /* @__PURE__ */ g($, { children: [
|
|
20
|
+
/* @__PURE__ */ t(k, { className: C.arrow, children: /* @__PURE__ */ t(
|
|
21
|
+
"svg",
|
|
22
|
+
{
|
|
23
|
+
width: 8,
|
|
24
|
+
height: 8,
|
|
25
|
+
viewBox: "0 0 8 8",
|
|
26
|
+
children: /* @__PURE__ */ t("path", { d: "M0 0 L4 4 L8 0" })
|
|
27
|
+
}
|
|
28
|
+
) }),
|
|
29
|
+
typeof o == "function" ? o(e) : o
|
|
30
|
+
] })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function B({
|
|
35
|
+
delay: o = 0,
|
|
36
|
+
...n
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ t(
|
|
39
|
+
S,
|
|
40
|
+
{
|
|
41
|
+
delay: o,
|
|
42
|
+
...n
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
const z = "_rootList_l3v98_1", E = {
|
|
47
|
+
rootList: z
|
|
48
|
+
}, ro = ({
|
|
49
|
+
className: o,
|
|
50
|
+
items: n,
|
|
51
|
+
children: a,
|
|
52
|
+
dependencies: e,
|
|
53
|
+
idScope: s,
|
|
54
|
+
addIdAndValue: r,
|
|
55
|
+
...l
|
|
56
|
+
}) => /* @__PURE__ */ t(
|
|
57
|
+
"nav",
|
|
58
|
+
{
|
|
59
|
+
className: o,
|
|
60
|
+
...l,
|
|
61
|
+
children: /* @__PURE__ */ t("ul", { className: E.rootList, children: /* @__PURE__ */ t(
|
|
62
|
+
w,
|
|
63
|
+
{
|
|
64
|
+
items: n,
|
|
65
|
+
children: a,
|
|
66
|
+
dependencies: e,
|
|
67
|
+
idScope: s,
|
|
68
|
+
addIdAndValue: r
|
|
69
|
+
}
|
|
70
|
+
) })
|
|
71
|
+
}
|
|
72
|
+
), G = "_navigationHeader_j94pq_1", J = "_collapsed_j94pq_6", h = {
|
|
73
|
+
navigationHeader: G,
|
|
74
|
+
collapsed: J
|
|
75
|
+
}, K = ({
|
|
76
|
+
className: o,
|
|
77
|
+
...n
|
|
78
|
+
}) => {
|
|
79
|
+
const { isCollapsed: a } = i(d);
|
|
80
|
+
return /* @__PURE__ */ t(
|
|
81
|
+
P,
|
|
82
|
+
{
|
|
83
|
+
className: c(o, h.navigationHeader, {
|
|
84
|
+
[h.collapsed]: a
|
|
85
|
+
}),
|
|
86
|
+
...n
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}, Q = "_navigationItem_1jt2l_1", y = {
|
|
90
|
+
navigationItem: Q
|
|
91
|
+
}, R = ({ className: o, ...n }) => {
|
|
92
|
+
const { isCollapsed: a } = i(d);
|
|
93
|
+
return /* @__PURE__ */ t(
|
|
94
|
+
"li",
|
|
95
|
+
{
|
|
96
|
+
className: c(o, y.navigationItem, {
|
|
97
|
+
[y.collapsed]: a
|
|
98
|
+
}),
|
|
99
|
+
...n
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}, U = "_navigationLink_tfdcf_1", V = "_collapse_tfdcf_21", W = "_collapsed_tfdcf_37", X = "_title_tfdcf_40", p = {
|
|
103
|
+
navigationLink: U,
|
|
104
|
+
collapse: V,
|
|
105
|
+
collapsed: W,
|
|
106
|
+
title: X
|
|
107
|
+
}, po = ({
|
|
108
|
+
as: o,
|
|
109
|
+
children: n,
|
|
110
|
+
className: a,
|
|
111
|
+
isActive: e,
|
|
112
|
+
title: s,
|
|
113
|
+
"aria-label": r,
|
|
114
|
+
...l
|
|
115
|
+
}) => {
|
|
116
|
+
const { variant: m } = i(O), b = i(D), { isCollapsed: _ } = i(d), u = i(j), T = o || I, f = () => {
|
|
117
|
+
u?.isOpen && u?.setOpen(!1);
|
|
118
|
+
};
|
|
119
|
+
return /* @__PURE__ */ g(B, { isDisabled: !_, children: [
|
|
120
|
+
/* @__PURE__ */ t(H, { children: /* @__PURE__ */ g(
|
|
121
|
+
T,
|
|
122
|
+
{
|
|
123
|
+
"aria-current": e && "page",
|
|
124
|
+
"aria-label": r || (_ ? s : void 0),
|
|
125
|
+
className: c(
|
|
126
|
+
a,
|
|
127
|
+
p.navigationLink,
|
|
128
|
+
m && p[m],
|
|
129
|
+
b && p.collapse,
|
|
130
|
+
{
|
|
131
|
+
[p.collapsed]: _
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
"data-active": e || void 0,
|
|
135
|
+
...o ? {
|
|
136
|
+
onClick: (v) => {
|
|
137
|
+
f(), l.onClick?.(v);
|
|
138
|
+
}
|
|
139
|
+
} : {
|
|
140
|
+
onPress: (v) => {
|
|
141
|
+
f(), l.onPress?.(v);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
...l,
|
|
145
|
+
children: [
|
|
146
|
+
n,
|
|
147
|
+
/* @__PURE__ */ t("span", { className: p.title, children: s })
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
) }),
|
|
151
|
+
/* @__PURE__ */ t(A, { placement: "right", children: s })
|
|
152
|
+
] });
|
|
153
|
+
}, Y = "_navigationSection_1ae77_1", Z = "_collapsed_1ae77_5", N = {
|
|
154
|
+
navigationSection: Y,
|
|
155
|
+
collapsed: Z
|
|
156
|
+
}, go = ({
|
|
157
|
+
className: o,
|
|
158
|
+
title: n,
|
|
159
|
+
...a
|
|
160
|
+
}) => {
|
|
161
|
+
const { isCollapsed: e } = i(d);
|
|
162
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ g(
|
|
163
|
+
"ul",
|
|
164
|
+
{
|
|
165
|
+
className: c(o, N.navigationSection, {
|
|
166
|
+
[N.collapsed]: e
|
|
167
|
+
}),
|
|
168
|
+
children: [
|
|
169
|
+
n && /* @__PURE__ */ t(K, { children: n }),
|
|
170
|
+
/* @__PURE__ */ t(L, { ...a })
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
) });
|
|
174
|
+
}, oo = "_navigationSubMenu_vfyl6_1", to = "_collapsed_vfyl6_5", x = {
|
|
175
|
+
navigationSubMenu: oo,
|
|
176
|
+
collapsed: to
|
|
177
|
+
}, _o = ({
|
|
178
|
+
className: o,
|
|
179
|
+
children: n,
|
|
180
|
+
items: a,
|
|
181
|
+
...e
|
|
182
|
+
}) => {
|
|
183
|
+
const { isCollapsed: s } = i(d), { length: r } = Array.from(a || []);
|
|
184
|
+
return typeof n == "function" && r === 0 ? null : /* @__PURE__ */ t(
|
|
185
|
+
"ul",
|
|
186
|
+
{
|
|
187
|
+
className: c(o, x.navigationSubMenu, {
|
|
188
|
+
[x.collapsed]: s
|
|
189
|
+
}),
|
|
190
|
+
children: /* @__PURE__ */ t(
|
|
191
|
+
L,
|
|
192
|
+
{
|
|
193
|
+
items: a,
|
|
194
|
+
...e,
|
|
195
|
+
children: n
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
export {
|
|
202
|
+
ro as N,
|
|
203
|
+
K as a,
|
|
204
|
+
R as b,
|
|
205
|
+
po as c,
|
|
206
|
+
go as d,
|
|
207
|
+
_o as e
|
|
208
|
+
};
|