@mattilsynet/design 3.3.3 → 3.3.5
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/mtds/atlas/atlas-element.js +1 -1
- package/mtds/deprecations.js +50 -36
- package/mtds/deprecations.js.map +1 -1
- package/mtds/external/@u-elements/u-details/dist/u-details.js +105 -0
- package/mtds/external/@u-elements/u-details/dist/u-details.js.map +1 -0
- package/mtds/field/field.js +14 -13
- package/mtds/field/field.js.map +1 -1
- package/mtds/index.d.ts +1 -0
- package/mtds/index.iife.js +15 -10
- package/mtds/index.js +23 -29
- package/mtds/index.js.map +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/pagination/pagination.js +30 -17
- package/mtds/pagination/pagination.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/table/table-observer.js +7 -10
- package/mtds/table/table-observer.js.map +1 -1
- package/mtds/tooltip/tooltip-element.js +17 -5
- package/mtds/tooltip/tooltip-element.js.map +1 -1
- package/package.json +1 -1
package/mtds/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "@u-elements/u-progress";
|
|
2
2
|
export * from "@digdir/designsystemet-web";
|
|
3
|
-
import { UHTMLComboboxElement as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
3
|
+
import { UHTMLComboboxElement as d, UHTMLComboboxShadowRoot as w, UHTMLComboboxStyle as H } from "./external/@u-elements/u-combobox/dist/u-combobox.js";
|
|
4
|
+
import { UHTMLDetailsElement as T, UHTMLDetailsShadowRoot as U, UHTMLDetailsStyle as b, UHTMLSummaryElement as n } from "./external/@u-elements/u-details/dist/u-details.js";
|
|
5
|
+
import { version as C } from "./package.json.js";
|
|
6
|
+
import { analytics as h } from "./analytics/analytics.js";
|
|
7
|
+
import { toggleAppExpanded as c } from "./app/app-observer.js";
|
|
8
|
+
import { fixLawHtml as k, getLawChecked as D, parseLawIds as u, parseLawMeta as R, setLawChecked as v, toggleLawChecked as A } from "./law/law-helper.js";
|
|
9
|
+
import * as t from "./styles.module.css.js";
|
|
9
10
|
import { toast as _ } from "./toast/toast-helper.js";
|
|
10
11
|
import "./chart/chart-element.js";
|
|
11
12
|
import "./deprecations.js";
|
|
@@ -15,31 +16,24 @@ import "./table/table-observer.js";
|
|
|
15
16
|
import "./toast/toast-observer.js";
|
|
16
17
|
import "./tooltip/tooltip-element.js";
|
|
17
18
|
import "./validation/validation-observer.js";
|
|
18
|
-
import { isBrowser as e, onHotReload as r, onMutation as s } from "./utils.js";
|
|
19
|
-
const a = e() ? document.getElementsByTagName("u-datalist") : [], t = /* @__PURE__ */ new WeakSet(), m = () => {
|
|
20
|
-
for (const o of a)
|
|
21
|
-
t.has(o) || (o.closest("ds-suggestion")?.connectedCallback(), t.add(o));
|
|
22
|
-
};
|
|
23
|
-
r("deprecations", () => [
|
|
24
|
-
s(document, m, {
|
|
25
|
-
childList: !0,
|
|
26
|
-
subtree: !0
|
|
27
|
-
})
|
|
28
|
-
]);
|
|
29
19
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
d as UHTMLComboboxElement,
|
|
21
|
+
w as UHTMLComboboxShadowRoot,
|
|
22
|
+
H as UHTMLComboboxStyle,
|
|
23
|
+
T as UHTMLDetailsElement,
|
|
24
|
+
U as UHTMLDetailsShadowRoot,
|
|
25
|
+
b as UHTMLDetailsStyle,
|
|
26
|
+
n as UHTMLSummaryElement,
|
|
27
|
+
h as analytics,
|
|
28
|
+
k as fixLawHtml,
|
|
35
29
|
D as getLawChecked,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
u as parseLawIds,
|
|
31
|
+
R as parseLawMeta,
|
|
32
|
+
v as setLawChecked,
|
|
33
|
+
t as styles,
|
|
40
34
|
_ as toast,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
c as toggleAppExpanded,
|
|
36
|
+
A as toggleLawChecked,
|
|
37
|
+
C as version
|
|
44
38
|
};
|
|
45
39
|
//# sourceMappingURL=index.js.map
|
package/mtds/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
package/mtds/package.json.js
CHANGED
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
import { jsx as i, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as h } from "react";
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
3
|
+
import "@u-elements/u-progress";
|
|
4
|
+
import { pagination as x } from "@digdir/designsystemet-web";
|
|
5
|
+
import "../external/@u-elements/u-combobox/dist/u-combobox.js";
|
|
6
|
+
import "../external/@u-elements/u-details/dist/u-details.js";
|
|
7
|
+
import "../analytics/analytics.js";
|
|
8
|
+
import "../app/app-observer.js";
|
|
6
9
|
import { toCustomElementProps as y } from "../utils.js";
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
import P from "../styles.module.css.js";
|
|
11
|
+
import "../toast/toast-helper.js";
|
|
12
|
+
import "../chart/chart-element.js";
|
|
13
|
+
import "../deprecations.js";
|
|
14
|
+
import "../logo/logo-observer.js";
|
|
15
|
+
import "../popover/popover-observer.js";
|
|
16
|
+
import "../table/table-observer.js";
|
|
17
|
+
import "../toast/toast-observer.js";
|
|
18
|
+
import "../tooltip/tooltip-element.js";
|
|
19
|
+
import "../validation/validation-observer.js";
|
|
20
|
+
import { Button as o } from "../button/button.js";
|
|
21
|
+
const N = h(
|
|
22
|
+
function({ children: n, current: e, total: a, show: l = 7, props: r, ...d }, c) {
|
|
23
|
+
const { pages: s, next: m, prev: p } = x({ current: e, total: a, show: l });
|
|
11
24
|
return /* @__PURE__ */ i(
|
|
12
25
|
"ds-pagination",
|
|
13
26
|
{
|
|
14
27
|
ref: c,
|
|
15
|
-
...y(d,
|
|
16
|
-
children:
|
|
28
|
+
...y(d, P.pagination),
|
|
29
|
+
children: n || /* @__PURE__ */ u("ul", { children: [
|
|
17
30
|
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
18
|
-
|
|
31
|
+
o,
|
|
19
32
|
{
|
|
20
|
-
"aria-disabled": !
|
|
21
|
-
...r?.({ page:
|
|
33
|
+
"aria-disabled": !p,
|
|
34
|
+
...r?.({ page: p, type: "prev" })
|
|
22
35
|
}
|
|
23
36
|
) }),
|
|
24
37
|
s.map(({ key: f, page: t, current: g }) => /* @__PURE__ */ i("li", { children: !!t && /* @__PURE__ */ i(
|
|
25
|
-
|
|
38
|
+
o,
|
|
26
39
|
{
|
|
27
40
|
"aria-current": g,
|
|
28
41
|
children: t,
|
|
@@ -30,10 +43,10 @@ const k = h(
|
|
|
30
43
|
}
|
|
31
44
|
) }, f)),
|
|
32
45
|
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
33
|
-
|
|
46
|
+
o,
|
|
34
47
|
{
|
|
35
|
-
"aria-disabled": !
|
|
36
|
-
...r?.({ page:
|
|
48
|
+
"aria-disabled": !m,
|
|
49
|
+
...r?.({ page: m, type: "next" })
|
|
37
50
|
}
|
|
38
51
|
) })
|
|
39
52
|
] })
|
|
@@ -42,6 +55,6 @@ const k = h(
|
|
|
42
55
|
}
|
|
43
56
|
);
|
|
44
57
|
export {
|
|
45
|
-
|
|
58
|
+
N as Pagination
|
|
46
59
|
};
|
|
47
60
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../../designsystem/pagination/pagination.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { pagination } from \"..\";\nimport type { DSPaginationElement } from \"../\";\nimport { Button } from \"../button/button\";\nimport type { CustomReactElementProps } from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\nexport type PaginationProps = Omit<\n\tCustomReactElementProps<DSPaginationElement>,\n\t\"children\"\n> & {\n\t\"data-variant\"?: \"primary\" | \"secondary\";\n} & (\n\t\t| {\n\t\t\t\tchildren?: never;\n\t\t\t\tcurrent: number;\n\t\t\t\tshow?: number;\n\t\t\t\ttotal: number;\n\t\t\t\tprops: (props: {\n\t\t\t\t\tpage: number;\n\t\t\t\t\ttype: \"prev\" | \"next\" | \"page\";\n\t\t\t\t}) => Parameters<typeof Button>[0];\n\t\t }\n\t\t| {\n\t\t\t\tchildren: React.ReactNode;\n\t\t\t\tcurrent?: never;\n\t\t\t\tshow?: never;\n\t\t\t\ttotal?: never;\n\t\t\t\tprops?: never;\n\t\t }\n\t);\n\nexport const Pagination = forwardRef<DSPaginationElement, PaginationProps>(\n\tfunction Pagination(\n\t\t{ children, current, total, show = 7, props, ...rest },\n\t\tref,\n\t) {\n\t\tconst { pages, next, prev } = pagination({ current, total, show });\n\n\t\treturn (\n\t\t\t<ds-pagination\n\t\t\t\tref={ref}\n\t\t\t\t{...toCustomElementProps(rest, styles.pagination)}\n\t\t\t>\n\t\t\t\t{children || (\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\taria-disabled={!prev}\n\t\t\t\t\t\t\t\t{...props?.({ page: prev, type: \"prev\" })}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t{pages.map(({ key, page, current }) => (\n\t\t\t\t\t\t\t<li key={key}>\n\t\t\t\t\t\t\t\t{!!page && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\taria-current={current}\n\t\t\t\t\t\t\t\t\t\t{...{ children: page }}\n\t\t\t\t\t\t\t\t\t\t{...props?.({ page, type: \"page\" })}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\taria-disabled={!next}\n\t\t\t\t\t\t\t\t{...props?.({ page: next, type: \"next\" })}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t)}\n\t\t\t</ds-pagination>\n\t\t);\n\t},\n);\n"],"names":["Pagination","forwardRef","children","current","total","show","props","rest","ref","pages","next","prev","pagination","jsx","toCustomElementProps","styles","Button","key","page"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../../designsystem/pagination/pagination.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { pagination } from \"..\";\nimport type { DSPaginationElement } from \"../\";\nimport { Button } from \"../button/button\";\nimport type { CustomReactElementProps } from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\nexport type PaginationProps = Omit<\n\tCustomReactElementProps<DSPaginationElement>,\n\t\"children\"\n> & {\n\t\"data-variant\"?: \"primary\" | \"secondary\";\n} & (\n\t\t| {\n\t\t\t\tchildren?: never;\n\t\t\t\tcurrent: number;\n\t\t\t\tshow?: number;\n\t\t\t\ttotal: number;\n\t\t\t\tprops: (props: {\n\t\t\t\t\tpage: number;\n\t\t\t\t\ttype: \"prev\" | \"next\" | \"page\";\n\t\t\t\t}) => Parameters<typeof Button>[0];\n\t\t }\n\t\t| {\n\t\t\t\tchildren: React.ReactNode;\n\t\t\t\tcurrent?: never;\n\t\t\t\tshow?: never;\n\t\t\t\ttotal?: never;\n\t\t\t\tprops?: never;\n\t\t }\n\t);\n\nexport const Pagination = forwardRef<DSPaginationElement, PaginationProps>(\n\tfunction Pagination(\n\t\t{ children, current, total, show = 7, props, ...rest },\n\t\tref,\n\t) {\n\t\tconst { pages, next, prev } = pagination({ current, total, show });\n\n\t\treturn (\n\t\t\t<ds-pagination\n\t\t\t\tref={ref}\n\t\t\t\t{...toCustomElementProps(rest, styles.pagination)}\n\t\t\t>\n\t\t\t\t{children || (\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\taria-disabled={!prev}\n\t\t\t\t\t\t\t\t{...props?.({ page: prev, type: \"prev\" })}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t{pages.map(({ key, page, current }) => (\n\t\t\t\t\t\t\t<li key={key}>\n\t\t\t\t\t\t\t\t{!!page && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\taria-current={current}\n\t\t\t\t\t\t\t\t\t\t{...{ children: page }}\n\t\t\t\t\t\t\t\t\t\t{...props?.({ page, type: \"page\" })}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\taria-disabled={!next}\n\t\t\t\t\t\t\t\t{...props?.({ page: next, type: \"next\" })}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t)}\n\t\t\t</ds-pagination>\n\t\t);\n\t},\n);\n"],"names":["Pagination","forwardRef","children","current","total","show","props","rest","ref","pages","next","prev","pagination","jsx","toCustomElementProps","styles","Button","key","page"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiCO,MAAMA,IAAaC;AAAA,EACzB,SACC,EAAE,UAAAC,GAAU,SAAAC,GAAS,OAAAC,GAAO,MAAAC,IAAO,GAAG,OAAAC,GAAO,GAAGC,EAAA,GAChDC,GACC;AACD,UAAM,EAAE,OAAAC,GAAO,MAAAC,GAAM,MAAAC,EAAA,IAASC,EAAW,EAAE,SAAAT,GAAS,OAAAC,GAAO,MAAAC,GAAM;AAEjE,WACC,gBAAAQ;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,KAAAL;AAAA,QACC,GAAGM,EAAqBP,GAAMQ,EAAO,UAAU;AAAA,QAE/C,UAAAb,uBACC,MAAA,EACA,UAAA;AAAA,UAAA,gBAAAW,EAAC,MAAA,EACA,UAAA,gBAAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACA,iBAAe,CAACL;AAAA,cACf,GAAGL,IAAQ,EAAE,MAAMK,GAAM,MAAM,QAAQ;AAAA,YAAA;AAAA,UAAA,GAE1C;AAAA,UACCF,EAAM,IAAI,CAAC,EAAE,KAAAQ,GAAK,MAAAC,GAAM,SAAAf,QACxB,gBAAAU,EAAC,MAAA,EACC,UAAA,CAAC,CAACK,KACF,gBAAAL;AAAA,YAACG;AAAA,YAAA;AAAA,cACA,gBAAcb;AAAAA,cACR,UAAUe;AAAA,cACf,GAAGZ,IAAQ,EAAE,MAAAY,GAAM,MAAM,QAAQ;AAAA,YAAA;AAAA,UAAA,EACnC,GANOD,CAQT,CACA;AAAA,4BACA,MAAA,EACA,UAAA,gBAAAJ;AAAA,YAACG;AAAA,YAAA;AAAA,cACA,iBAAe,CAACN;AAAA,cACf,GAAGJ,IAAQ,EAAE,MAAMI,GAAM,MAAM,QAAQ;AAAA,YAAA;AAAA,UAAA,EACzC,CACD;AAAA,QAAA,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAIJ;AACD;"}
|