@ogcio/design-system-react 1.29.0 → 1.31.0
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/README.md +11 -33
- package/dist/alert/variants.d.ts +78 -2
- package/dist/atoms/DsButton.d.ts +194 -0
- package/dist/atoms/DsButton.js +330 -0
- package/dist/atoms/InsetText.d.ts +14 -0
- package/dist/atoms/InsetText.js +17 -0
- package/dist/atoms/icons/Close.d.ts +3 -0
- package/dist/atoms/icons/Close.js +23 -0
- package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowDown.js +23 -0
- package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowUp.js +23 -0
- package/dist/atoms/icons/Visibility.d.ts +3 -0
- package/dist/atoms/icons/Visibility.js +23 -0
- package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
- package/dist/atoms/icons/VisibilityOff.js +23 -0
- package/dist/atoms/icons/index.d.ts +6 -0
- package/dist/atoms/icons/index.js +12 -0
- package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoBlack.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
- package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
- package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
- package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoWhite.js +327 -0
- package/dist/atoms/icons/logos/index.d.ts +6 -0
- package/dist/atoms/icons/logos/index.js +14 -0
- package/dist/atoms/icons/types.d.ts +10 -0
- package/dist/atoms/icons/types.js +1 -0
- package/dist/atoms/index.d.ts +3 -0
- package/dist/atoms/index.js +16 -0
- package/dist/autocomplete/autocomplete.js +131 -115
- package/dist/blockquote/blockquote.d.ts +4 -1
- package/dist/blockquote/blockquote.js +18 -4
- package/dist/breadcrumbs/breadcrumbs.js +54 -33
- package/dist/button-group/button-group.js +31 -28
- package/dist/character-count/character-count.js +5 -5
- package/dist/chip/chip.js +41 -19
- package/dist/combo-box/combo-box.js +6 -13
- package/dist/combo-box/dropdown-item.js +39 -40
- package/dist/cookie-banner/cookie-banner.js +28 -20
- package/dist/data-table/data-table-footer.js +57 -51
- package/dist/data-table/data-table-header.d.ts +7 -7
- package/dist/data-table/data-table-header.js +97 -110
- package/dist/data-table/data-table-selected-rows.d.ts +1 -0
- package/dist/data-table/data-table-selected-rows.js +15 -19
- package/dist/details/details.js +43 -23
- package/dist/drawer/drawer.js +35 -32
- package/dist/footer/footer.js +54 -46
- package/dist/forms/form-field/form-field.d.ts +2 -2
- package/dist/forms/form-field/form-field.js +40 -30
- package/dist/forms/form-field/types.d.ts +10 -3
- package/dist/header/components/header-slot.js +33 -32
- package/dist/header/header-legacy.js +8 -8
- package/dist/header/variants.d.ts +220 -20
- package/dist/heading/heading.d.ts +70 -2
- package/dist/hooks/use-aria-hider.d.ts +1 -1
- package/dist/hooks/use-aria-hider.js +14 -13
- package/dist/hooks/use-breakpoint.js +15 -12
- package/dist/hooks/use-focus-trap.d.ts +1 -1
- package/dist/hooks/use-focus-trap.js +179 -179
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +64 -52
- package/dist/icon/icons.d.ts +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +144 -142
- package/dist/input-file/input-file.js +15 -12
- package/dist/input-password/input-password.js +13 -12
- package/dist/input-text/input-text.js +18 -16
- package/dist/label/label.d.ts +43 -0
- package/dist/label/label.js +7 -6
- package/dist/logos/index.d.ts +1 -0
- package/dist/logos/index.js +14 -0
- package/dist/modal/modal.js +125 -127
- package/dist/popover/popover.js +67 -64
- package/dist/score-select/score-select.js +20 -20
- package/dist/select/select-next.js +45 -45
- package/dist/spinner/spinner.d.ts +30 -2
- package/dist/styles.css +12 -2
- package/dist/table/table-row.js +14 -7
- package/dist/table/table.d.ts +22 -2
- package/dist/tabs/tab-item.d.ts +2 -2
- package/dist/tabs/tab-panel.js +6 -6
- package/dist/tabs/tabs.js +19 -19
- package/dist/text-input/text-input.d.ts +1 -1
- package/dist/textarea/textarea.js +27 -28
- package/dist/toast/ds-toast.d.ts +78 -2
- package/fonts.css +10 -0
- package/package.json +17 -12
- package/dist/assets/logos/LogoBlack.d.ts +0 -3
- package/dist/assets/logos/LogoBlack.js +0 -322
- package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
- package/dist/assets/logos/LogoGoldGreen.js +0 -322
- package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
- package/dist/assets/logos/LogoGoldWhite.js +0 -82
- package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.js +0 -60
- package/dist/assets/logos/LogoWhite.d.ts +0 -3
- package/dist/assets/logos/LogoWhite.js +0 -322
- package/dist/assets/logos/index.d.ts +0 -6
- package/dist/assets/logos/index.js +0 -14
|
@@ -1,137 +1,124 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as A, Children as L, isValidElement as O } from "react";
|
|
3
|
+
import { c as P } from "../index-CB-zPpNk.js";
|
|
4
|
+
import { Button as w } from "../button/button.js";
|
|
5
|
+
import { Chip as S } from "../chip/chip.js";
|
|
6
|
+
import { cn as n } from "../cn.js";
|
|
7
|
+
import { translate as x } from "../i18n/utility.js";
|
|
8
|
+
const N = ({
|
|
8
9
|
children: e,
|
|
9
|
-
className:
|
|
10
|
-
showHeader:
|
|
11
|
-
showFilter:
|
|
12
|
-
...
|
|
10
|
+
className: t,
|
|
11
|
+
showHeader: a = !0,
|
|
12
|
+
showFilter: c = !0,
|
|
13
|
+
...p
|
|
13
14
|
}) => {
|
|
14
|
-
const { search:
|
|
15
|
-
let
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
}), { search:
|
|
15
|
+
const { search: s, filter: j, filterList: T, actions: C } = A(() => {
|
|
16
|
+
let b = null, y = null, H = null, D = null;
|
|
17
|
+
return L.forEach(e, (r) => {
|
|
18
|
+
o(r, f) ? b = r : o(r, g) ? y = r : o(r, u) ? H = r : o(r, m) && (D = r);
|
|
19
|
+
}), { search: b, filter: y, filterList: H, actions: D };
|
|
19
20
|
}, [e]);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
return /* @__PURE__ */ d("div", { ...p, className: n(l.root(), t), children: [
|
|
22
|
+
a && /* @__PURE__ */ d("div", { className: l.headerRow(), children: [
|
|
23
|
+
s,
|
|
23
24
|
j,
|
|
24
|
-
|
|
25
|
+
C
|
|
25
26
|
] }),
|
|
26
|
-
|
|
27
|
+
T && c && /* @__PURE__ */ i("div", { className: l.filterListWrapper(), children: T })
|
|
27
28
|
] });
|
|
28
|
-
},
|
|
29
|
+
}, f = ({
|
|
29
30
|
children: e,
|
|
30
|
-
className:
|
|
31
|
-
...
|
|
32
|
-
}) => /* @__PURE__ */
|
|
31
|
+
className: t,
|
|
32
|
+
...a
|
|
33
|
+
}) => /* @__PURE__ */ i("div", { className: n(l.search(), t), ...a, children: e }), m = ({
|
|
33
34
|
children: e,
|
|
34
|
-
className:
|
|
35
|
-
...
|
|
36
|
-
}) => /* @__PURE__ */
|
|
35
|
+
className: t,
|
|
36
|
+
...a
|
|
37
|
+
}) => /* @__PURE__ */ i("div", { className: n(l.actions(), t), ...a, children: e }), g = ({
|
|
37
38
|
children: e,
|
|
38
|
-
className:
|
|
39
|
-
...
|
|
40
|
-
}) => /* @__PURE__ */
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
n.id
|
|
78
|
-
)),
|
|
79
|
-
/* @__PURE__ */ l(
|
|
80
|
-
x,
|
|
81
|
-
{
|
|
82
|
-
appearance: "dark",
|
|
83
|
-
size: "medium",
|
|
84
|
-
variant: "flat",
|
|
85
|
-
onClick: () => {
|
|
86
|
-
t == null || t();
|
|
87
|
-
},
|
|
88
|
-
children: g("dataTableHeader.clearAllFilters", {
|
|
89
|
-
defaultValue: "Clear all filters"
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
h.displayName = "DataTableHeader";
|
|
97
|
-
p.displayName = "DataTableHeaderSearch";
|
|
98
|
-
b.displayName = "DataTableHeaderActions";
|
|
99
|
-
m.displayName = "DataTableHeaderFilter";
|
|
100
|
-
T.displayName = "DataTableHeaderFilterList";
|
|
101
|
-
N.displayName = "DataTableHeaderFilterContent";
|
|
102
|
-
F.displayName = "DataTableHeaderFilterContentTitle";
|
|
103
|
-
v.displayName = "DataTableHeaderFilterActions";
|
|
104
|
-
Object.defineProperty(h, "componentType", {
|
|
39
|
+
className: t,
|
|
40
|
+
...a
|
|
41
|
+
}) => /* @__PURE__ */ i("div", { className: n(l.filter(), t), ...a, children: e }), F = ({ children: e, className: t, ...a }) => /* @__PURE__ */ i("div", { className: n(l.filterContent(), t), ...a, children: e }), v = ({ children: e, className: t, ...a }) => /* @__PURE__ */ i("div", { className: n(l.filterContentTitle(), t), ...a, children: e }), h = ({ children: e, className: t, ...a }) => /* @__PURE__ */ i("div", { className: n(l.filterActions(), t), ...a, children: e }), u = ({ filters: e, onRemove: t, onClear: a, className: c, ...p }) => !e || e.length === 0 ? null : /* @__PURE__ */ d("div", { className: n(l.filterList(), c), ...p, children: [
|
|
42
|
+
/* @__PURE__ */ i("span", { className: "gi-text-sm", children: x("dataTableHeader.filtersApplied", {
|
|
43
|
+
length: e.length,
|
|
44
|
+
defaultValue: `Filters applied ${e.length}:`
|
|
45
|
+
}) }),
|
|
46
|
+
e.map((s) => /* @__PURE__ */ i(
|
|
47
|
+
S,
|
|
48
|
+
{
|
|
49
|
+
onClose: () => t == null ? void 0 : t(s.id),
|
|
50
|
+
label: s.label
|
|
51
|
+
},
|
|
52
|
+
s.id
|
|
53
|
+
)),
|
|
54
|
+
/* @__PURE__ */ i(
|
|
55
|
+
w,
|
|
56
|
+
{
|
|
57
|
+
appearance: "dark",
|
|
58
|
+
size: "medium",
|
|
59
|
+
variant: "flat",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
a == null || a();
|
|
62
|
+
},
|
|
63
|
+
children: x("dataTableHeader.clearAllFilters", {
|
|
64
|
+
defaultValue: "Clear all filters"
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
69
|
+
N.displayName = "DataTableHeader";
|
|
70
|
+
f.displayName = "DataTableHeaderSearch";
|
|
71
|
+
m.displayName = "DataTableHeaderActions";
|
|
72
|
+
g.displayName = "DataTableHeaderFilter";
|
|
73
|
+
u.displayName = "DataTableHeaderFilterList";
|
|
74
|
+
F.displayName = "DataTableHeaderFilterContent";
|
|
75
|
+
v.displayName = "DataTableHeaderFilterContentTitle";
|
|
76
|
+
h.displayName = "DataTableHeaderFilterActions";
|
|
77
|
+
Object.defineProperty(N, "componentType", {
|
|
105
78
|
value: "DataTableHeader"
|
|
106
79
|
});
|
|
107
|
-
Object.defineProperty(
|
|
80
|
+
Object.defineProperty(f, "componentType", {
|
|
108
81
|
value: "DataTableHeaderSearch"
|
|
109
82
|
});
|
|
110
|
-
Object.defineProperty(
|
|
83
|
+
Object.defineProperty(m, "componentType", {
|
|
111
84
|
value: "DataTableHeaderActions"
|
|
112
85
|
});
|
|
113
|
-
Object.defineProperty(
|
|
86
|
+
Object.defineProperty(g, "componentType", {
|
|
114
87
|
value: "DataTableHeaderFilter"
|
|
115
88
|
});
|
|
116
|
-
Object.defineProperty(
|
|
89
|
+
Object.defineProperty(u, "componentType", {
|
|
117
90
|
value: "DataTableHeaderFilterList"
|
|
118
91
|
});
|
|
119
|
-
Object.defineProperty(
|
|
92
|
+
Object.defineProperty(F, "componentType", {
|
|
120
93
|
value: "DataTableHeaderFilterContent"
|
|
121
94
|
});
|
|
122
|
-
Object.defineProperty(
|
|
95
|
+
Object.defineProperty(v, "componentType", {
|
|
123
96
|
value: "DataTableHeaderFilterContentTitle"
|
|
124
97
|
});
|
|
125
|
-
Object.defineProperty(
|
|
98
|
+
Object.defineProperty(h, "componentType", {
|
|
126
99
|
value: "DataTableHeaderFilterActions"
|
|
127
100
|
});
|
|
101
|
+
const l = P({
|
|
102
|
+
slots: {
|
|
103
|
+
root: "gi-flex gi-flex-wrap gi-items-center gi-w-full gi-gap-4 gi-mb-2",
|
|
104
|
+
headerRow: "gi-flex gi-flex-1 gi-gap-4 gi-items-center",
|
|
105
|
+
search: "gi-flex gi-flex-1",
|
|
106
|
+
filter: "gi-flex gi-items-center",
|
|
107
|
+
actions: "gi-flex gi-items-center gi-ml-auto gi-gap-4 gi-flex-shrink",
|
|
108
|
+
filterListWrapper: "gi-w-full",
|
|
109
|
+
filterList: "gi-flex gi-items-center gi-gap-2 gi-flex-wrap",
|
|
110
|
+
filterContentTitle: "gi-py-2 gi-font-medium",
|
|
111
|
+
filterContent: "gi-flex gi-flex-col gi-gap-2 gi-px-6 gi-py-4 gi-flex-1 gi-overflow-auto",
|
|
112
|
+
filterActions: "gi-flex gi-justify-end gi-gap-2 gi-p-6"
|
|
113
|
+
}
|
|
114
|
+
})(), o = (e, t) => O(e) && e.type === t;
|
|
128
115
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
116
|
+
N as DataTableHeader,
|
|
117
|
+
m as DataTableHeaderActions,
|
|
118
|
+
g as DataTableHeaderFilter,
|
|
119
|
+
h as DataTableHeaderFilterActions,
|
|
120
|
+
F as DataTableHeaderFilterContent,
|
|
121
|
+
v as DataTableHeaderFilterContentTitle,
|
|
122
|
+
u as DataTableHeaderFilterList,
|
|
123
|
+
f as DataTableHeaderSearch
|
|
137
124
|
};
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { jsxs as r, jsx as
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "../index-CB-zPpNk.js";
|
|
2
3
|
import { cn as g } from "../cn.js";
|
|
3
|
-
import { translate as
|
|
4
|
-
const
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
count: e,
|
|
15
|
-
defaultValue: ` (${e} Row${e === 1 ? "" : "s"} selected)`
|
|
16
|
-
}) }),
|
|
17
|
-
/* @__PURE__ */ i("div", { className: "gi-flex gi-gap-4", children: t })
|
|
18
|
-
]
|
|
4
|
+
import { translate as m } from "../i18n/utility.js";
|
|
5
|
+
const p = ({ selectedCount: e, actions: s, className: a, ...l }) => /* @__PURE__ */ r("div", { className: g(i.root(), a), ...l, children: [
|
|
6
|
+
/* @__PURE__ */ t("span", { className: i.label(), children: m("dataTable.selectedRows", {
|
|
7
|
+
count: e,
|
|
8
|
+
defaultValue: ` (${e} Row${e === 1 ? "" : "s"} selected)`
|
|
9
|
+
}) }),
|
|
10
|
+
/* @__PURE__ */ t("div", { className: "gi-flex gi-gap-4", children: s })
|
|
11
|
+
] }), i = o({
|
|
12
|
+
slots: {
|
|
13
|
+
root: "gi-w-full gi-flex gi-items-center gi-justify-between gi-px-3 gi-py-2 gi-bg-gray-900 gi-rounded-md",
|
|
14
|
+
label: "gi-text-sm gi-font-medium gi-text-white"
|
|
19
15
|
}
|
|
20
|
-
);
|
|
16
|
+
})();
|
|
21
17
|
export {
|
|
22
|
-
|
|
18
|
+
p as DataTableSelectedRowsBanner
|
|
23
19
|
};
|
package/dist/details/details.js
CHANGED
|
@@ -1,55 +1,75 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as g, useState as u, useEffect as f } from "react";
|
|
4
|
+
import { c as p } from "../index-CB-zPpNk.js";
|
|
5
|
+
import { Icon as m } from "../icon/icon.js";
|
|
6
|
+
const w = ({ label: n, name: l, children: d, ...c }) => {
|
|
7
|
+
const s = g(null), [e, a] = u(!1);
|
|
7
8
|
return f(() => {
|
|
8
|
-
var
|
|
9
|
-
((
|
|
10
|
-
}, []), /* @__PURE__ */
|
|
9
|
+
var i, r;
|
|
10
|
+
((i = s.current) == null ? void 0 : i.open) !== e && a(((r = s.current) == null ? void 0 : r.open) ?? !1);
|
|
11
|
+
}, []), /* @__PURE__ */ t(
|
|
11
12
|
"details",
|
|
12
13
|
{
|
|
13
|
-
ref:
|
|
14
|
+
ref: s,
|
|
14
15
|
onToggle: () => {
|
|
15
|
-
var
|
|
16
|
-
|
|
16
|
+
var i;
|
|
17
|
+
a(((i = s.current) == null ? void 0 : i.open) ?? !1);
|
|
17
18
|
},
|
|
18
19
|
"data-testid": "govie-details",
|
|
19
|
-
className: "gi-
|
|
20
|
+
className: "gi-block gi-text-md gi-text-gray-950",
|
|
20
21
|
"data-module": "gi-details",
|
|
21
|
-
name:
|
|
22
|
+
name: l,
|
|
22
23
|
"aria-expanded": e ? "true" : "false",
|
|
23
24
|
"aria-details": "details-content",
|
|
24
25
|
...c,
|
|
25
26
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ t(
|
|
27
28
|
"summary",
|
|
28
29
|
{
|
|
29
|
-
className:
|
|
30
|
-
"data-testid": "govie-details-summary",
|
|
30
|
+
className: _(),
|
|
31
31
|
role: "button",
|
|
32
|
+
"data-testid": "govie-details-summary",
|
|
32
33
|
"aria-controls": "details-content",
|
|
33
34
|
"aria-expanded": e ? "true" : "false",
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ o(m, { icon: e ? "keyboard_arrow_up" : "keyboard_arrow_down" }),
|
|
37
|
+
/* @__PURE__ */ o("span", { className: "gi-underline gi-underline-offset-[0.1rem]", children: n })
|
|
37
38
|
]
|
|
38
39
|
}
|
|
39
40
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o(
|
|
41
42
|
"div",
|
|
42
43
|
{
|
|
43
44
|
id: "details-content",
|
|
44
|
-
className: "gi-
|
|
45
|
+
className: "gi-py-4 gi-pl-5 gi-border-l-[5px] gi-border-solid gi-border-l-gray-200",
|
|
45
46
|
"aria-hidden": e ? "false" : "true",
|
|
46
|
-
children:
|
|
47
|
+
children: d
|
|
47
48
|
}
|
|
48
49
|
)
|
|
49
50
|
]
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
|
-
}
|
|
53
|
+
}, _ = p({
|
|
54
|
+
base: [
|
|
55
|
+
"gi-flex",
|
|
56
|
+
"gi-items-center",
|
|
57
|
+
"gi-relative",
|
|
58
|
+
"gi-mb-1",
|
|
59
|
+
"gi-w-fit",
|
|
60
|
+
"gi-list-none",
|
|
61
|
+
"focus:gi-rounded-sm",
|
|
62
|
+
"focus-visible:gi-rounded-sm",
|
|
63
|
+
"focus:gi-shadow-[0_0_0_2px_var(--gieds-color-gray-950),0_0_0_5px_var(--gieds-color-yellow-400)]",
|
|
64
|
+
"focus-visible:gi-shadow-[0_0_0_2px_var(--gieds-color-gray-950),0_0_0_5px_var(--gieds-color-yellow-400)]",
|
|
65
|
+
"focus-visible:gi-outline-none",
|
|
66
|
+
"[&:focus>span]:gi-no-underline",
|
|
67
|
+
"[&:focus>span]:gi-select-none",
|
|
68
|
+
"[&:hover>span]:gi-underline-offset-[0.1rem]",
|
|
69
|
+
"[&:hover>span]:[text-decoration-thickness:max(3px)]",
|
|
70
|
+
"[&:hover>span]:[text-decoration-skip-ink:none]"
|
|
71
|
+
]
|
|
72
|
+
});
|
|
53
73
|
export {
|
|
54
|
-
|
|
74
|
+
w as Details
|
|
55
75
|
};
|
package/dist/drawer/drawer.js
CHANGED
|
@@ -1,61 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsx as a, jsxs as x, Fragment as C } from "react/jsx-runtime";
|
|
3
|
+
import { useState as D, cloneElement as O } from "react";
|
|
4
4
|
import { cn as l } from "../cn.js";
|
|
5
|
-
import { ModalBody as u, ModalFooter as
|
|
6
|
-
const
|
|
5
|
+
import { ModalBody as u, ModalFooter as j, ModalWrapper as v } from "../modal/modal.js";
|
|
6
|
+
const h = ({
|
|
7
7
|
children: o,
|
|
8
8
|
className: e,
|
|
9
|
-
...
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
-
|
|
9
|
+
...r
|
|
10
|
+
}) => /* @__PURE__ */ a(
|
|
11
|
+
v,
|
|
12
12
|
{
|
|
13
|
-
className: l("gi-
|
|
13
|
+
className: l("gi-flex gi-flex-col", e),
|
|
14
14
|
closeButtonSize: "large",
|
|
15
|
-
...
|
|
15
|
+
...r,
|
|
16
16
|
children: o
|
|
17
17
|
}
|
|
18
|
-
),
|
|
18
|
+
), k = ({
|
|
19
19
|
children: o,
|
|
20
20
|
triggerButton: e,
|
|
21
|
-
startsOpen:
|
|
22
|
-
closeButtonLabel:
|
|
23
|
-
position:
|
|
24
|
-
className:
|
|
21
|
+
startsOpen: r,
|
|
22
|
+
closeButtonLabel: p,
|
|
23
|
+
position: t = "right",
|
|
24
|
+
className: f
|
|
25
25
|
}) => {
|
|
26
|
-
const [
|
|
26
|
+
const [d, s] = D(!!r), m = () => s(!0), w = () => s(!1), b = O(e, {
|
|
27
27
|
"data-testid": "drawer-trigger-button-container",
|
|
28
28
|
onClick: (y) => {
|
|
29
|
-
var c,
|
|
30
|
-
const
|
|
31
|
-
|
|
29
|
+
var c, i;
|
|
30
|
+
const n = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (i = e == null ? void 0 : e.props) == null ? void 0 : i.onClick : void 0;
|
|
31
|
+
n && n(y), m();
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
return /* @__PURE__ */ C
|
|
34
|
+
return /* @__PURE__ */ x(C, { children: [
|
|
35
35
|
b,
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
/* @__PURE__ */ a(
|
|
37
|
+
h,
|
|
38
38
|
{
|
|
39
39
|
children: o,
|
|
40
|
-
closeButtonLabel:
|
|
41
|
-
position:
|
|
42
|
-
className:
|
|
43
|
-
isOpen:
|
|
40
|
+
closeButtonLabel: p,
|
|
41
|
+
position: t,
|
|
42
|
+
className: f,
|
|
43
|
+
isOpen: d,
|
|
44
44
|
onClose: w
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
] });
|
|
48
48
|
};
|
|
49
|
-
Object.defineProperty(
|
|
49
|
+
Object.defineProperty(k, "componentType", {
|
|
50
50
|
value: "Drawer",
|
|
51
51
|
writable: !1,
|
|
52
52
|
enumerable: !1
|
|
53
53
|
});
|
|
54
|
-
const F = ({ children: o, className: e }) => /* @__PURE__ */
|
|
54
|
+
const F = ({ children: o, className: e }) => /* @__PURE__ */ a(
|
|
55
55
|
u,
|
|
56
56
|
{
|
|
57
57
|
includeModalClass: !1,
|
|
58
|
-
className: l(
|
|
58
|
+
className: l(
|
|
59
|
+
"gi-px-6 gi-pt-1 gi-flex-1 gi-border-t-xs gi-border-gray-100 gi-overflow-y-auto",
|
|
60
|
+
e
|
|
61
|
+
),
|
|
59
62
|
children: o
|
|
60
63
|
}
|
|
61
64
|
);
|
|
@@ -67,16 +70,16 @@ Object.defineProperty(F, "componentType", {
|
|
|
67
70
|
const M = ({
|
|
68
71
|
children: o,
|
|
69
72
|
className: e,
|
|
70
|
-
stacked:
|
|
71
|
-
}) => /* @__PURE__ */
|
|
73
|
+
stacked: r
|
|
74
|
+
}) => /* @__PURE__ */ a(j, { stacked: r, className: l("gi-drawer-footer", e), children: o });
|
|
72
75
|
Object.defineProperty(M, "componentType", {
|
|
73
76
|
value: "DrawerFooter",
|
|
74
77
|
writable: !1,
|
|
75
78
|
enumerable: !1
|
|
76
79
|
});
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
k as Drawer,
|
|
79
82
|
F as DrawerBody,
|
|
80
83
|
M as DrawerFooter,
|
|
81
|
-
|
|
84
|
+
h as DrawerWrapper
|
|
82
85
|
};
|