@mattilsynet/design 3.3.10 → 3.4.1
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/_virtual/_rolldown/runtime.js +17 -0
- package/mtds/ai/card.stories.tsx +54 -77
- package/mtds/ai/layout.mdx +37 -1
- package/mtds/ai/layout.stories.tsx +126 -1
- package/mtds/ai/print.mdx +1 -1
- package/mtds/ai/print.stories.tsx +1 -2
- package/mtds/alert/alert.js +16 -11
- package/mtds/alert/alert.js.map +1 -1
- package/mtds/analytics/analytics.js +118 -118
- package/mtds/analytics/analytics.js.map +1 -1
- package/mtds/app/app-observer.js +31 -36
- package/mtds/app/app-observer.js.map +1 -1
- package/mtds/app/app-toggle.js +12 -26
- package/mtds/app/app-toggle.js.map +1 -1
- package/mtds/app/app-toggle2.js +6 -11
- package/mtds/app/app-toggle2.js.map +1 -1
- package/mtds/app/app.js +66 -60
- package/mtds/app/app.js.map +1 -1
- package/mtds/atlas/atlas-element.js +83 -93
- package/mtds/atlas/atlas-element.js.map +1 -1
- package/mtds/atlas/atlas-marker.js +63 -52
- package/mtds/atlas/atlas-marker.js.map +1 -1
- package/mtds/atlas/atlas-matgeo.js +67 -61
- package/mtds/atlas/atlas-matgeo.js.map +1 -1
- package/mtds/atlas/atlas-wms.js +33 -28
- package/mtds/atlas/atlas-wms.js.map +1 -1
- package/mtds/atlas/atlas.js +6 -38
- package/mtds/atlas/atlas.js.map +1 -1
- package/mtds/atlas/atlas2.js +39 -0
- package/mtds/atlas/atlas2.js.map +1 -0
- package/mtds/atlas/cluster.js +759 -1149
- package/mtds/atlas/cluster.js.map +1 -1
- package/mtds/atlas.iife.js +3 -4
- package/mtds/atlas.js +6 -14
- package/mtds/avatar/avatar.js +14 -10
- package/mtds/avatar/avatar.js.map +1 -1
- package/mtds/badge/badge.js +15 -10
- package/mtds/badge/badge.js.map +1 -1
- package/mtds/breadcrumbs/breadcrumbs.js +15 -19
- package/mtds/breadcrumbs/breadcrumbs.js.map +1 -1
- package/mtds/button/button.js +18 -20
- package/mtds/button/button.js.map +1 -1
- package/mtds/card/card.js +22 -15
- package/mtds/card/card.js.map +1 -1
- package/mtds/chart/chart-axis.js +33 -21
- package/mtds/chart/chart-axis.js.map +1 -1
- package/mtds/chart/chart-bars.js +23 -21
- package/mtds/chart/chart-bars.js.map +1 -1
- package/mtds/chart/chart-element.js +94 -88
- package/mtds/chart/chart-element.js.map +1 -1
- package/mtds/chart/chart-lines.js +35 -37
- package/mtds/chart/chart-lines.js.map +1 -1
- package/mtds/chart/chart-pies.js +17 -17
- package/mtds/chart/chart-pies.js.map +1 -1
- package/mtds/chart/chart.js +6 -52
- package/mtds/chart/chart.js.map +1 -1
- package/mtds/chart/chart2.js +21 -0
- package/mtds/chart/chart2.js.map +1 -0
- package/mtds/chip/chip.js +15 -11
- package/mtds/chip/chip.js.map +1 -1
- package/mtds/deprecations.js +76 -158
- package/mtds/deprecations.js.map +1 -1
- package/mtds/details/details.js +21 -24
- package/mtds/details/details.js.map +1 -1
- package/mtds/dialog/dialog.js +17 -21
- package/mtds/dialog/dialog.js.map +1 -1
- package/mtds/divider/divider.js +15 -20
- package/mtds/divider/divider.js.map +1 -1
- package/mtds/errorsummary/errorsummary.js +14 -16
- package/mtds/errorsummary/errorsummary.js.map +1 -1
- package/mtds/external/@turf/boolean-point-in-polygon/dist/esm/index.js +22 -25
- package/mtds/external/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
- package/mtds/external/@turf/helpers/dist/esm/index.js +21 -24
- package/mtds/external/@turf/helpers/dist/esm/index.js.map +1 -1
- package/mtds/external/@turf/invariant/dist/esm/index.js +15 -19
- package/mtds/external/@turf/invariant/dist/esm/index.js.map +1 -1
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +270 -297
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
- package/mtds/external/@u-elements/u-details/dist/u-details.js +75 -101
- package/mtds/external/@u-elements/u-details/dist/u-details.js.map +1 -1
- package/mtds/external/leaflet/dist/leaflet-src.js +4257 -6151
- package/mtds/external/leaflet/dist/leaflet-src.js.map +1 -1
- package/mtds/external/leaflet/dist/leaflet.css.js +5 -606
- package/mtds/external/leaflet/dist/leaflet.css.js.map +1 -1
- package/mtds/external/point-in-polygon-hao/dist/esm/index.js +24 -25
- package/mtds/external/point-in-polygon-hao/dist/esm/index.js.map +1 -1
- package/mtds/external/robust-predicates/esm/incircle.js +5 -0
- package/mtds/external/robust-predicates/esm/incircle.js.map +1 -0
- package/mtds/external/robust-predicates/esm/insphere.js +5 -0
- package/mtds/external/robust-predicates/esm/insphere.js.map +1 -0
- package/mtds/external/robust-predicates/esm/orient2d.js +20 -22
- package/mtds/external/robust-predicates/esm/orient2d.js.map +1 -1
- package/mtds/external/robust-predicates/esm/orient3d.js +5 -0
- package/mtds/external/robust-predicates/esm/orient3d.js.map +1 -0
- package/mtds/external/robust-predicates/esm/util.js +20 -28
- package/mtds/external/robust-predicates/esm/util.js.map +1 -1
- package/mtds/external/robust-predicates/index.js +5 -0
- package/mtds/field/field.js +167 -214
- package/mtds/field/field.js.map +1 -1
- package/mtds/fieldset/fieldset.js +32 -30
- package/mtds/fieldset/fieldset.js.map +1 -1
- package/mtds/fileupload/fileupload.js +16 -13
- package/mtds/fileupload/fileupload.js.map +1 -1
- package/mtds/helptext/helptext.js +25 -27
- package/mtds/helptext/helptext.js.map +1 -1
- package/mtds/identitet/illustrasjons-generator/illustrasjons-generator.d.ts +1 -0
- package/mtds/identitet/illustrasjons-generator/index-old-1.d.ts +1 -0
- package/mtds/identitet/infografikk-generator/infografikk-generator.d.ts +1 -0
- package/mtds/index.iife.js +21 -21
- package/mtds/index.js +38 -31
- package/mtds/index.js.map +1 -1
- package/mtds/input/input.js +33 -47
- package/mtds/input/input.js.map +1 -1
- package/mtds/law/law-helper.js +106 -95
- package/mtds/law/law-helper.js.map +1 -1
- package/mtds/law/law.js +15 -10
- package/mtds/law/law.js.map +1 -1
- package/mtds/layout/layout.js +21 -13
- package/mtds/layout/layout.js.map +1 -1
- package/mtds/layout/layout.stories.d.ts +1 -0
- package/mtds/link/link.js +15 -10
- package/mtds/link/link.js.map +1 -1
- package/mtds/logo/logo-observer.js +18 -18
- package/mtds/logo/logo-observer.js.map +1 -1
- package/mtds/logo/logo.js +18 -18
- package/mtds/logo/logo.js.map +1 -1
- package/mtds/package.js +6 -0
- package/mtds/package.js.map +1 -0
- package/mtds/package.json.d.ts +112 -0
- package/mtds/pagination/pagination.js +46 -60
- package/mtds/pagination/pagination.js.map +1 -1
- package/mtds/popover/popover-observer.js +15 -15
- package/mtds/popover/popover-observer.js.map +1 -1
- package/mtds/popover/popover.js +18 -20
- package/mtds/popover/popover.js.map +1 -1
- package/mtds/print/print.js +15 -10
- package/mtds/print/print.js.map +1 -1
- package/mtds/print/print.stories.d.ts +0 -1
- package/mtds/profilering/epost.d.ts +1 -0
- package/mtds/progress/progress.js +15 -13
- package/mtds/progress/progress.js.map +1 -1
- package/mtds/react-atlas.js +7 -16
- package/mtds/react.js +36 -84
- package/mtds/skeleton/skeleton.js +15 -11
- package/mtds/skeleton/skeleton.js.map +1 -1
- package/mtds/spinner/spinner.js +16 -13
- package/mtds/spinner/spinner.js.map +1 -1
- package/mtds/steps/steps.js +15 -10
- package/mtds/steps/steps.js.map +1 -1
- package/mtds/styles.css +2 -1
- package/mtds/styles.module.js +122 -0
- package/mtds/styles.module.js.map +1 -0
- package/mtds/table/table-observer.js +23 -28
- package/mtds/table/table-observer.js.map +1 -1
- package/mtds/table/table.js +88 -60
- package/mtds/table/table.js.map +1 -1
- package/mtds/tabs/tabs.js +32 -27
- package/mtds/tabs/tabs.js.map +1 -1
- package/mtds/tag/tag.js +16 -19
- package/mtds/tag/tag.js.map +1 -1
- package/mtds/tailwind.css +0 -4
- package/mtds/toast/toast-helper.js +45 -25
- package/mtds/toast/toast-helper.js.map +1 -1
- package/mtds/toast/toast-observer.js +18 -18
- package/mtds/toast/toast-observer.js.map +1 -1
- package/mtds/toast/toast.js +67 -54
- package/mtds/toast/toast.js.map +1 -1
- package/mtds/togglegroup/togglegroup.js +31 -40
- package/mtds/togglegroup/togglegroup.js.map +1 -1
- package/mtds/tooltip/tooltip-element.js +12 -25
- package/mtds/tooltip/tooltip-element.js.map +1 -1
- package/mtds/typography/typography.js +38 -21
- package/mtds/typography/typography.js.map +1 -1
- package/mtds/utils.js +53 -70
- package/mtds/utils.js.map +1 -1
- package/mtds/validation/validation-observer.js +40 -47
- package/mtds/validation/validation-observer.js.map +1 -1
- package/mtds/validation/validation.js +17 -21
- package/mtds/validation/validation.js.map +1 -1
- package/package.json +9 -9
- package/mtds/atlas/atlas.css.js +0 -138
- package/mtds/atlas/atlas.css.js.map +0 -1
- package/mtds/atlas.js.map +0 -1
- package/mtds/chart/chart.css.js +0 -187
- package/mtds/chart/chart.css.js.map +0 -1
- package/mtds/package.json.js +0 -5
- package/mtds/package.json.js.map +0 -1
- package/mtds/react-atlas.js.map +0 -1
- package/mtds/react.js.map +0 -1
- package/mtds/styles.module.css.js +0 -118
- package/mtds/styles.module.css.js.map +0 -1
package/mtds/link/link.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region designsystem/link/link.tsx
|
|
6
|
+
var i = n(function({ as: n, className: i, ...a }, o) {
|
|
7
|
+
return /* @__PURE__ */ r(n || "a", {
|
|
8
|
+
className: t(e.link, i),
|
|
9
|
+
...a,
|
|
10
|
+
ref: o
|
|
11
|
+
});
|
|
7
12
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=link.js.map
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as Link };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=link.js.map
|
package/mtds/link/link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sources":["../../designsystem/link/link.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type LinkProps<As extends React.ElementType = \"a\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype LinkComponent = <As extends React.ElementType = \"a\">(\n\tprops: LinkProps<As>,\n) => React.ReactElement | null;\n\nexport const Link: LinkComponent = forwardRef<null>(function Link<\n\tAs extends React.ElementType = \"a\",\n>({ as, className, ...rest }: LinkProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"a\";\n\treturn <Tag className={clsx(styles.link, className)} {...rest} ref={ref} />;\n}) as LinkComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"
|
|
1
|
+
{"version":3,"file":"link.js","names":[],"sources":["../../designsystem/link/link.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type LinkProps<As extends React.ElementType = \"a\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype LinkComponent = <As extends React.ElementType = \"a\">(\n\tprops: LinkProps<As>,\n) => React.ReactElement | null;\n\nexport const Link: LinkComponent = forwardRef<null>(function Link<\n\tAs extends React.ElementType = \"a\",\n>({ as, className, ...rest }: LinkProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"a\";\n\treturn <Tag className={clsx(styles.link, className)} {...rest} ref={ref} />;\n}) as LinkComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"mappings":";;;;;AAeA,IAAa,IAAsB,EAAiB,SAElD,EAAE,OAAI,cAAW,GAAG,KAAuB,GAA0B;CAEtE,OAAO,kBADK,KAAM,KACX;EAAK,WAAW,EAAK,EAAO,MAAM,CAAS;EAAG,GAAI;EAAW;CAAM,CAAA;AAC3E,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
);
|
|
16
|
-
}
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import { debounce as t, on as n, onHotReload as r, tag as i } from "../utils.js";
|
|
3
|
+
//#region designsystem/logo/logo-observer.ts
|
|
4
|
+
var a = t((t) => {
|
|
5
|
+
if (t.animationName !== e._logo) return;
|
|
6
|
+
let n = t.target.closest?.(`.${e.logo.split(" ")[0]}`), r = n?.firstElementChild;
|
|
7
|
+
if (r instanceof SVGSVGElement) {
|
|
8
|
+
for (let e of document.head.querySelectorAll("link[rel~='icon']")) e.setAttribute("rel", "disabled");
|
|
9
|
+
let e = n?.hasAttribute("data-env"), t = window.getComputedStyle(r), a = t.getPropertyValue("color"), o = t.getPropertyValue("--mtdsc-logo-background"), s = r.outerHTML.replace(/\n+/g, " ").replace(/(fill|width|height|xmlns)="[^"]+"/gi, "").replace("<svg", `<svg width="40" height="40" fill="${a}"`);
|
|
10
|
+
document.head.appendChild(i("link", {
|
|
11
|
+
href: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${e ? "none" : o}' width='51' height='51' x='2' y='2' stroke='${a}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${e ? .6 : 0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${s}</g></svg>`)}`,
|
|
12
|
+
rel: "icon"
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
17
15
|
}, 200);
|
|
18
|
-
|
|
19
|
-
//#
|
|
16
|
+
r("logo", () => [n(document, "animationend", a)]);
|
|
17
|
+
//#endregion
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=logo-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-observer.js","sources":["../../designsystem/logo/logo-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { debounce, on, onHotReload, tag } from \"../utils\";\n\nconst handleFavicon = debounce((e: Partial<AnimationEvent>) => {\n\tif (e.animationName !== styles._logo) return;\n\tconst logo = (e.target as Element).closest?.(`.${styles.logo.split(\" \")[0]}`);\n\tconst svg = logo?.firstElementChild;\n\n\tif (svg instanceof SVGSVGElement) {\n\t\tfor (const icon of document.head.querySelectorAll(\"link[rel~='icon']\"))\n\t\t\ticon.setAttribute(\"rel\", \"disabled\"); // Disable previous icon (but not remove is as this makes Next.js sad)\n\n\t\tconst isDot = logo?.hasAttribute(\"data-env\");\n\t\tconst style = window.getComputedStyle(svg);\n\t\tconst text = style.getPropertyValue(\"color\");\n\t\tconst back = style.getPropertyValue(\"--mtdsc-logo-background\");\n\t\tconst icon = svg.outerHTML\n\t\t\t.replace(/\\n+/g, \" \") // Prevent line breaks\n\t\t\t.replace(/(fill|width|height|xmlns)=\"[^\"]+\"/gi, \"\")\n\t\t\t.replace(\"<svg\", `<svg width=\"40\" height=\"40\" fill=\"${text}\"`);\n\n\t\tdocument.head.appendChild(\n\t\t\ttag(\"link\", {\n\t\t\t\thref: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${isDot ? \"none\" : back}' width='51' height='51' x='2' y='2' stroke='${text}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${isDot ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform=\"translate(7.5 7.5)\">${icon}</g></svg>`)}`,\n\t\t\t\trel: \"icon\",\n\t\t\t}),\n\t\t);\n\t}\n}, 200);\n\nonHotReload(\"logo\", () => [on(document, \"animationend\", handleFavicon)]);\n"],"
|
|
1
|
+
{"version":3,"file":"logo-observer.js","names":[],"sources":["../../designsystem/logo/logo-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { debounce, on, onHotReload, tag } from \"../utils\";\n\nconst handleFavicon = debounce((e: Partial<AnimationEvent>) => {\n\tif (e.animationName !== styles._logo) return;\n\tconst logo = (e.target as Element).closest?.(`.${styles.logo.split(\" \")[0]}`);\n\tconst svg = logo?.firstElementChild;\n\n\tif (svg instanceof SVGSVGElement) {\n\t\tfor (const icon of document.head.querySelectorAll(\"link[rel~='icon']\"))\n\t\t\ticon.setAttribute(\"rel\", \"disabled\"); // Disable previous icon (but not remove is as this makes Next.js sad)\n\n\t\tconst isDot = logo?.hasAttribute(\"data-env\");\n\t\tconst style = window.getComputedStyle(svg);\n\t\tconst text = style.getPropertyValue(\"color\");\n\t\tconst back = style.getPropertyValue(\"--mtdsc-logo-background\");\n\t\tconst icon = svg.outerHTML\n\t\t\t.replace(/\\n+/g, \" \") // Prevent line breaks\n\t\t\t.replace(/(fill|width|height|xmlns)=\"[^\"]+\"/gi, \"\")\n\t\t\t.replace(\"<svg\", `<svg width=\"40\" height=\"40\" fill=\"${text}\"`);\n\n\t\tdocument.head.appendChild(\n\t\t\ttag(\"link\", {\n\t\t\t\thref: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${isDot ? \"none\" : back}' width='51' height='51' x='2' y='2' stroke='${text}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${isDot ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform=\"translate(7.5 7.5)\">${icon}</g></svg>`)}`,\n\t\t\t\trel: \"icon\",\n\t\t\t}),\n\t\t);\n\t}\n}, 200);\n\nonHotReload(\"logo\", () => [on(document, \"animationend\", handleFavicon)]);\n"],"mappings":";;;AAGA,IAAM,IAAgB,GAAU,MAA+B;CAC9D,IAAI,EAAE,kBAAkB,EAAO,OAAO;CACtC,IAAM,IAAQ,EAAE,OAAmB,UAAU,IAAI,EAAO,KAAK,MAAM,GAAG,CAAC,CAAC,IAAI,GACtE,IAAM,GAAM;CAElB,IAAI,aAAe,eAAe;EACjC,KAAK,IAAM,KAAQ,SAAS,KAAK,iBAAiB,mBAAmB,GACpE,EAAK,aAAa,OAAO,UAAU;EAEpC,IAAM,IAAQ,GAAM,aAAa,UAAU,GACrC,IAAQ,OAAO,iBAAiB,CAAG,GACnC,IAAO,EAAM,iBAAiB,OAAO,GACrC,IAAO,EAAM,iBAAiB,yBAAyB,GACvD,IAAO,EAAI,UACf,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,uCAAuC,EAAE,CAAC,CAClD,QAAQ,QAAQ,qCAAqC,EAAK,EAAE;EAE9D,SAAS,KAAK,YACb,EAAI,QAAQ;GACX,MAAM,sBAAsB,mBAAmB,2EAA2E,IAAQ,SAAS,EAAK,+CAA+C,EAAK,wEAAwE,IAAQ,KAAM,EAAE,oEAAoE,EAAK,WAAW;GAChX,KAAK;EACN,CAAC,CACF;CACD;AACD,GAAG,GAAG;AAEN,EAAY,cAAc,CAAC,EAAG,UAAU,gBAAgB,CAAa,CAAC,CAAC"}
|
package/mtds/logo/logo.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import t from "clsx";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region designsystem/logo/logo.tsx
|
|
6
|
+
var i = n(function({ as: n, className: i, style: a, ...o }, s) {
|
|
7
|
+
return /* @__PURE__ */ r(n || (o.href ? "a" : "span"), {
|
|
8
|
+
className: t(e.logo, i),
|
|
9
|
+
style: {
|
|
10
|
+
WebkitMaskBoxImage: "none",
|
|
11
|
+
...a
|
|
12
|
+
},
|
|
13
|
+
ref: s,
|
|
14
|
+
...o
|
|
15
|
+
});
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=logo.js.map
|
|
17
|
+
//#endregion
|
|
18
|
+
export { i as Logo };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=logo.js.map
|
package/mtds/logo/logo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.js","sources":["../../designsystem/logo/logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype LogoBaseProps<Href> = {\n\t\"data-color\"?: \"danger\" | \"info\";\n\t\"data-env\"?: string | null;\n\thref?: Href;\n};\n\nexport type LogoProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As, LogoBaseProps<Href>>;\n\ntype LogoComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: LogoProps<Href, As>,\n) => JSX.Element;\n\nexport const Logo: LogoComponent = forwardRef<null>(function Logo<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\t{ as, className, style, ...rest }: LogoProps<Href, As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn (\n\t\t<Tag\n\t\t\tclassName={clsx(styles.logo, className)}\n\t\t\tstyle={{ WebkitMaskBoxImage: \"none\", ...style }} // Overwrite Autoprefixer\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}) as LogoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"
|
|
1
|
+
{"version":3,"file":"logo.js","names":[],"sources":["../../designsystem/logo/logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype LogoBaseProps<Href> = {\n\t\"data-color\"?: \"danger\" | \"info\";\n\t\"data-env\"?: string | null;\n\thref?: Href;\n};\n\nexport type LogoProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As, LogoBaseProps<Href>>;\n\ntype LogoComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: LogoProps<Href, As>,\n) => JSX.Element;\n\nexport const Logo: LogoComponent = forwardRef<null>(function Logo<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\t{ as, className, style, ...rest }: LogoProps<Href, As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn (\n\t\t<Tag\n\t\t\tclassName={clsx(styles.logo, className)}\n\t\t\tstyle={{ WebkitMaskBoxImage: \"none\", ...style }} // Overwrite Autoprefixer\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}) as LogoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"mappings":";;;;;AA0BA,IAAa,IAAsB,EAAiB,SAInD,EAAE,OAAI,cAAW,UAAO,GAAG,KAC3B,GACC;CAGD,OACC,kBAHW,MAAO,EAAK,OAAO,MAAM,SAGpC;EACC,WAAW,EAAK,EAAO,MAAM,CAAS;EACtC,OAAO;GAAE,oBAAoB;GAAQ,GAAG;EAAM;EACzC;EACL,GAAI;CACJ,CAAA;AAEH,CAAC"}
|
package/mtds/package.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n\t\"name\": \"@mattilsynet/design\",\n\t\"version\": \"3.4.1\",\n\t\"type\": \"module\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+ssh://git@github.com/Mattilsynet/design.git\"\n\t},\n\t\"main\": \"./mtds/index.js\",\n\t\"types\": \"./mtds/index.d.ts\",\n\t\"files\": [\n\t\t\"mtds\"\n\t],\n\t\"engines\": {\n\t\t\"npm\": \">=10.0.0\",\n\t\t\"node\": \">=20.0.0\"\n\t},\n\t\"exports\": {\n\t\t\".\": {\n\t\t\t\"import\": \"./mtds/index.js\",\n\t\t\t\"types\": \"./mtds/index.d.ts\"\n\t\t},\n\t\t\"./react\": {\n\t\t\t\"import\": \"./mtds/react.js\",\n\t\t\t\"types\": \"./mtds/react.d.ts\"\n\t\t},\n\t\t\"./atlas\": {\n\t\t\t\"import\": \"./mtds/atlas.js\",\n\t\t\t\"types\": \"./mtds/atlas.d.ts\"\n\t\t},\n\t\t\"./atlas/react\": {\n\t\t\t\"import\": \"./mtds/react-atlas.js\",\n\t\t\t\"types\": \"./mtds/react-atlas.d.ts\"\n\t\t},\n\t\t\"./*.svg\": \"./mtds/*.svg\",\n\t\t\"./*.ico\": \"./mtds/*.ico\",\n\t\t\"./ai/*\": \"./mtds/ai/*\",\n\t\t\"./icons/*\": \"./mtds/icons/*\",\n\t\t\"./illustrations/*\": \"./mtds/illustrations/*\",\n\t\t\"./index.iife.js\": \"./mtds/index.iife.js\",\n\t\t\"./atlas.iife.js\": \"./mtds/atlas.iife.js\",\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./styles.css\": \"./mtds/styles.css\",\n\t\t\"./styles.json\": \"./mtds/styles.json\",\n\t\t\"./tailwind.css\": \"./mtds/tailwind.css\"\n\t},\n\t\"scripts\": {\n\t\t\"build\": \"vite build --mode iife && vite build --mode iife-atlas && vite build && rm -rf mtds/docs/ && rm -rf mtds/iife.css\",\n\t\t\"build:tokens\": \"npx @digdir/designsystemet@latest tokens build --config designsystemet.config.json\",\n\t\t\"format\": \"npx @biomejs/biome format\",\n\t\t\"lint\": \"npx @biomejs/biome lint\",\n\t\t\"publish:clojure\": \"npm run build && cd ./clojure && ./publish.sh\",\n\t\t\"start\": \"vite\",\n\t\t\"storybook\": \"storybook dev -p 6006\",\n\t\t\"storybook:build\": \"npm run build && storybook build\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@biomejs/biome\": \"2.5.3\",\n\t\t\"@digdir/designsystemet-css\": \"^1.18.0\",\n\t\t\"@digdir/designsystemet-types\": \"^1.18.0\",\n\t\t\"@handsontable/react-wrapper\": \"18.0.0\",\n\t\t\"@phosphor-icons/core\": \"^2.1.1\",\n\t\t\"@phosphor-icons/react\": \"^2.1.10\",\n\t\t\"@storybook/addon-docs\": \"^10.4.6\",\n\t\t\"@storybook/addon-themes\": \"^10.4.6\",\n\t\t\"@storybook/react-vite\": \"^10.4.6\",\n\t\t\"@tanstack/react-table\": \"^8.21.3\",\n\t\t\"@turf/boolean-point-in-polygon\": \"^7.3.5\",\n\t\t\"@turf/helpers\": \"^7.3.5\",\n\t\t\"@types/leaflet\": \"^1.9.21\",\n\t\t\"@types/leaflet.markercluster\": \"^1.5.6\",\n\t\t\"@types/node\": \"^26.1.1\",\n\t\t\"@types/react\": \"^19.2.17\",\n\t\t\"@types/react-dom\": \"^19.2.3\",\n\t\t\"@vitejs/plugin-react\": \"^6.0.3\",\n\t\t\"fast-glob\": \"^3.3.3\",\n\t\t\"handsontable\": \"18.0.0\",\n\t\t\"leaflet\": \"^2.0.0-alpha.1\",\n\t\t\"postcss\": \"^8.5.16\",\n\t\t\"postcss-nesting\": \"^14.0.0\",\n\t\t\"react\": \"^19.2.7\",\n\t\t\"react-dom\": \"^19.2.7\",\n\t\t\"react-moveable\": \"^0.56.0\",\n\t\t\"storybook\": \"^10.4.6\",\n\t\t\"typescript\": \"^6.0.3\",\n\t\t\"unplugin-dts\": \"^1.0.3\",\n\t\t\"vite\": \"^8.1.3\",\n\t\t\"vite-plugin-static-copy\": \"^4.1.1\"\n\t},\n\t\"dependencies\": {\n\t\t\"@digdir/designsystemet-web\": \"^1.18.0\",\n\t\t\"@u-elements/u-progress\": \"1.0.1\",\n\t\t\"clsx\": \"^2.1.1\"\n\t},\n\t\"overrides\": {\n\t\t\"ajv\": \"^8.18.0\",\n\t\t\"ansi-regex\": \"^6.2.2\",\n\t\t\"ansi-styles\": \"^6.2.3\",\n\t\t\"chalk\": \"^5.6.2\",\n\t\t\"debug\": \"^4.4.3\",\n\t\t\"esbuild\": \"^0.28.1\",\n\t\t\"lodash\": \"^4.18.1\",\n\t\t\"minimatch\": \"^10.2.2\",\n\t\t\"strip-ansi\": \"^7.1.2\",\n\t\t\"supports-color\": \"^10.2.2\",\n\t\t\"tmp\": \"0.2.5\",\n\t\t\"wrap-ansi\": \"^9.0.1\"\n\t}\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "@mattilsynet/design",
|
|
3
|
+
"version": "3.4.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+ssh://git@github.com/Mattilsynet/design.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "./mtds/index.js",
|
|
10
|
+
"types": "./mtds/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"mtds"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"npm": ">=10.0.0",
|
|
16
|
+
"node": ">=20.0.0"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./mtds/index.js",
|
|
21
|
+
"types": "./mtds/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./react": {
|
|
24
|
+
"import": "./mtds/react.js",
|
|
25
|
+
"types": "./mtds/react.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./atlas": {
|
|
28
|
+
"import": "./mtds/atlas.js",
|
|
29
|
+
"types": "./mtds/atlas.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./atlas/react": {
|
|
32
|
+
"import": "./mtds/react-atlas.js",
|
|
33
|
+
"types": "./mtds/react-atlas.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./*.svg": "./mtds/*.svg",
|
|
36
|
+
"./*.ico": "./mtds/*.ico",
|
|
37
|
+
"./ai/*": "./mtds/ai/*",
|
|
38
|
+
"./icons/*": "./mtds/icons/*",
|
|
39
|
+
"./illustrations/*": "./mtds/illustrations/*",
|
|
40
|
+
"./index.iife.js": "./mtds/index.iife.js",
|
|
41
|
+
"./atlas.iife.js": "./mtds/atlas.iife.js",
|
|
42
|
+
"./package.json": "./package.json",
|
|
43
|
+
"./styles.css": "./mtds/styles.css",
|
|
44
|
+
"./styles.json": "./mtds/styles.json",
|
|
45
|
+
"./tailwind.css": "./mtds/tailwind.css"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vite build --mode iife && vite build --mode iife-atlas && vite build && rm -rf mtds/docs/ && rm -rf mtds/iife.css",
|
|
49
|
+
"build:tokens": "npx @digdir/designsystemet@latest tokens build --config designsystemet.config.json",
|
|
50
|
+
"format": "npx @biomejs/biome format",
|
|
51
|
+
"lint": "npx @biomejs/biome lint",
|
|
52
|
+
"publish:clojure": "npm run build && cd ./clojure && ./publish.sh",
|
|
53
|
+
"start": "vite",
|
|
54
|
+
"storybook": "storybook dev -p 6006",
|
|
55
|
+
"storybook:build": "npm run build && storybook build"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@biomejs/biome": "2.5.3",
|
|
59
|
+
"@digdir/designsystemet-css": "^1.18.0",
|
|
60
|
+
"@digdir/designsystemet-types": "^1.18.0",
|
|
61
|
+
"@handsontable/react-wrapper": "18.0.0",
|
|
62
|
+
"@phosphor-icons/core": "^2.1.1",
|
|
63
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
64
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
65
|
+
"@storybook/addon-themes": "^10.4.6",
|
|
66
|
+
"@storybook/react-vite": "^10.4.6",
|
|
67
|
+
"@tanstack/react-table": "^8.21.3",
|
|
68
|
+
"@turf/boolean-point-in-polygon": "^7.3.5",
|
|
69
|
+
"@turf/helpers": "^7.3.5",
|
|
70
|
+
"@types/leaflet": "^1.9.21",
|
|
71
|
+
"@types/leaflet.markercluster": "^1.5.6",
|
|
72
|
+
"@types/node": "^26.1.1",
|
|
73
|
+
"@types/react": "^19.2.17",
|
|
74
|
+
"@types/react-dom": "^19.2.3",
|
|
75
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
76
|
+
"fast-glob": "^3.3.3",
|
|
77
|
+
"handsontable": "18.0.0",
|
|
78
|
+
"leaflet": "^2.0.0-alpha.1",
|
|
79
|
+
"postcss": "^8.5.16",
|
|
80
|
+
"postcss-nesting": "^14.0.0",
|
|
81
|
+
"react": "^19.2.7",
|
|
82
|
+
"react-dom": "^19.2.7",
|
|
83
|
+
"react-moveable": "^0.56.0",
|
|
84
|
+
"storybook": "^10.4.6",
|
|
85
|
+
"typescript": "^6.0.3",
|
|
86
|
+
"unplugin-dts": "^1.0.3",
|
|
87
|
+
"vite": "^8.1.3",
|
|
88
|
+
"vite-plugin-static-copy": "^4.1.1"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@digdir/designsystemet-web": "^1.18.0",
|
|
92
|
+
"@u-elements/u-progress": "1.0.1",
|
|
93
|
+
"clsx": "^2.1.1"
|
|
94
|
+
},
|
|
95
|
+
"overrides": {
|
|
96
|
+
"ajv": "^8.18.0",
|
|
97
|
+
"ansi-regex": "^6.2.2",
|
|
98
|
+
"ansi-styles": "^6.2.3",
|
|
99
|
+
"chalk": "^5.6.2",
|
|
100
|
+
"debug": "^4.4.3",
|
|
101
|
+
"esbuild": "^0.28.1",
|
|
102
|
+
"lodash": "^4.18.1",
|
|
103
|
+
"minimatch": "^10.2.2",
|
|
104
|
+
"strip-ansi": "^7.1.2",
|
|
105
|
+
"supports-color": "^10.2.2",
|
|
106
|
+
"tmp": "0.2.5",
|
|
107
|
+
"wrap-ansi": "^9.0.1"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
;
|
|
111
|
+
|
|
112
|
+
export default _default;
|
|
@@ -1,60 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
"aria-disabled": !m,
|
|
49
|
-
...r?.({ page: m, type: "next" })
|
|
50
|
-
}
|
|
51
|
-
) })
|
|
52
|
-
] })
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
export {
|
|
58
|
-
N as Pagination
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=pagination.js.map
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import { toCustomElementProps as t } from "../utils.js";
|
|
3
|
+
import { designsystem_exports as n } from "../index.js";
|
|
4
|
+
import { Button as r } from "../button/button.js";
|
|
5
|
+
import { forwardRef as i } from "react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region designsystem/pagination/pagination.tsx
|
|
8
|
+
var s = i(function({ children: i, current: s, total: c, show: l = 7, props: u, ...d }, f) {
|
|
9
|
+
let { pages: p, next: m, prev: h } = (0, n.pagination)({
|
|
10
|
+
current: s,
|
|
11
|
+
total: c,
|
|
12
|
+
show: l
|
|
13
|
+
});
|
|
14
|
+
return /* @__PURE__ */ a("ds-pagination", {
|
|
15
|
+
ref: f,
|
|
16
|
+
...t(d, e.pagination),
|
|
17
|
+
children: i || /* @__PURE__ */ o("ul", { children: [
|
|
18
|
+
/* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(r, {
|
|
19
|
+
"aria-disabled": !h,
|
|
20
|
+
...u?.({
|
|
21
|
+
page: h,
|
|
22
|
+
type: "prev"
|
|
23
|
+
})
|
|
24
|
+
}) }),
|
|
25
|
+
p.map(({ key: e, page: t, current: n }) => /* @__PURE__ */ a("li", { children: !!t && /* @__PURE__ */ a(r, {
|
|
26
|
+
"aria-current": n,
|
|
27
|
+
children: t,
|
|
28
|
+
...u?.({
|
|
29
|
+
page: t,
|
|
30
|
+
type: "page"
|
|
31
|
+
})
|
|
32
|
+
}) }, e)),
|
|
33
|
+
/* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(r, {
|
|
34
|
+
"aria-disabled": !m,
|
|
35
|
+
...u?.({
|
|
36
|
+
page: m,
|
|
37
|
+
type: "next"
|
|
38
|
+
})
|
|
39
|
+
}) })
|
|
40
|
+
] })
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { s as Pagination };
|
|
45
|
+
|
|
46
|
+
//# 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"],"
|
|
1
|
+
{"version":3,"file":"pagination.js","names":[],"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"],"mappings":";;;;;;;AAiCA,IAAa,IAAa,EACzB,SACC,EAAE,aAAU,YAAS,UAAO,UAAO,GAAG,UAAO,GAAG,KAChD,GACC;CACD,IAAM,EAAE,UAAO,SAAM,aAAA,GAAA,EAAA,WAAA,CAAoB;EAAE;EAAS;EAAO;CAAK,CAAC;CAEjE,OACC,kBAAC,iBAAD;EACM;EACL,GAAI,EAAqB,GAAM,EAAO,UAAU;YAE/C,KACA,kBAAC,MAAD,EAAA,UAAA;GACC,kBAAC,MAAD,EAAA,UACC,kBAAC,GAAD;IACC,iBAAe,CAAC;IAChB,GAAI,IAAQ;KAAE,MAAM;KAAM,MAAM;IAAO,CAAC;GACxC,CAAA,EACE,CAAA;GACH,EAAM,KAAK,EAAE,QAAK,SAAM,iBACxB,kBAAC,MAAD,EAAA,UACE,CAAC,CAAC,KACF,kBAAC,GAAD;IACC,gBAAc;IACR,UAAU;IAChB,GAAI,IAAQ;KAAE;KAAM,MAAM;IAAO,CAAC;GAClC,CAAA,EAEC,GARK,CAQL,CACJ;GACD,kBAAC,MAAD,EAAA,UACC,kBAAC,GAAD;IACC,iBAAe,CAAC;IAChB,GAAI,IAAQ;KAAE,MAAM;KAAM,MAAM;IAAO,CAAC;GACxC,CAAA,EACE,CAAA;EACD,EAAA,CAAA;CAES,CAAA;AAEjB,CACD"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import { attr as t, on as n, onHotReload as r } from "../utils.js";
|
|
3
|
+
//#region designsystem/popover/popover-observer.ts
|
|
4
|
+
var i = e.popover.split(" ")[0];
|
|
5
|
+
function a({ target: e }) {
|
|
6
|
+
let n = e?.closest?.("a,button,[role=\"button\"]"), r = n instanceof HTMLButtonElement, a = n && t(n, "popovertarget"), o = a ? document.getElementById(a) : n?.closest("[popover]");
|
|
7
|
+
if (!(a && r) && o?.classList.contains(i) && n) {
|
|
8
|
+
let e = t(n, "popovertargetaction"), i = e === "show" || (e === "hide" ? !1 : void 0);
|
|
9
|
+
if (r && !e && o.contains(n)) return;
|
|
10
|
+
o instanceof HTMLElement && o.popover && o.togglePopover(i);
|
|
11
|
+
}
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=popover-observer.js.map
|
|
13
|
+
r("popover", () => [n(document, "click", a)]);
|
|
14
|
+
//#endregion
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=popover-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-observer.js","sources":["../../designsystem/popover/popover-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { attr, on, onHotReload } from \"../utils\";\n\nconst CSS_POPOVER = styles.popover.split(\" \")[0];\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handlePopoverClick({ target }: Event) {\n\tconst trigger = (target as Element)?.closest?.(`a,button,[role=\"button\"]`);\n\tconst isButton = trigger instanceof HTMLButtonElement;\n\tconst id = trigger && attr(trigger, \"popovertarget\");\n\tconst pop = id ? document.getElementById(id) : trigger?.closest(\"[popover]\");\n\n\tif (id && isButton) return; // Native support for buttons with popovertarget, only polyfill for <a> or missing \"popovertarget\"\n\tif (pop?.classList.contains(CSS_POPOVER) && trigger) {\n\t\tconst action = attr(trigger, \"popovertargetaction\");\n\t\tconst open = action === \"show\" || (action === \"hide\" ? false : undefined);\n\n\t\t// Popover can be disconneted by click handler deeper down in the DOM three before reaching document\n\t\tif (isButton && !action && pop.contains(trigger)) return; // Require \"popovertargetaction\" attribute to make buttons inside popover toggle\n\t\tif (pop instanceof HTMLElement && pop.popover) pop.togglePopover(open);\n\t}\n}\n\nonHotReload(\"popover\", () => [\n\ton(document, \"click\", handlePopoverClick), // Allow `<a>` to use `popovertarget` as well\n]);\n"],"
|
|
1
|
+
{"version":3,"file":"popover-observer.js","names":[],"sources":["../../designsystem/popover/popover-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { attr, on, onHotReload } from \"../utils\";\n\nconst CSS_POPOVER = styles.popover.split(\" \")[0];\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handlePopoverClick({ target }: Event) {\n\tconst trigger = (target as Element)?.closest?.(`a,button,[role=\"button\"]`);\n\tconst isButton = trigger instanceof HTMLButtonElement;\n\tconst id = trigger && attr(trigger, \"popovertarget\");\n\tconst pop = id ? document.getElementById(id) : trigger?.closest(\"[popover]\");\n\n\tif (id && isButton) return; // Native support for buttons with popovertarget, only polyfill for <a> or missing \"popovertarget\"\n\tif (pop?.classList.contains(CSS_POPOVER) && trigger) {\n\t\tconst action = attr(trigger, \"popovertargetaction\");\n\t\tconst open = action === \"show\" || (action === \"hide\" ? false : undefined);\n\n\t\t// Popover can be disconneted by click handler deeper down in the DOM three before reaching document\n\t\tif (isButton && !action && pop.contains(trigger)) return; // Require \"popovertargetaction\" attribute to make buttons inside popover toggle\n\t\tif (pop instanceof HTMLElement && pop.popover) pop.togglePopover(open);\n\t}\n}\n\nonHotReload(\"popover\", () => [\n\ton(document, \"click\", handlePopoverClick), // Allow `<a>` to use `popovertarget` as well\n]);\n"],"mappings":";;;AAGA,IAAM,IAAc,EAAO,QAAQ,MAAM,GAAG,CAAC,CAAC;AAK9C,SAAS,EAAmB,EAAE,aAAiB;CAC9C,IAAM,IAAW,GAAoB,UAAU,4BAA0B,GACnE,IAAW,aAAmB,mBAC9B,IAAK,KAAW,EAAK,GAAS,eAAe,GAC7C,IAAM,IAAK,SAAS,eAAe,CAAE,IAAI,GAAS,QAAQ,WAAW;CAEvE,WAAM,MACN,GAAK,UAAU,SAAS,CAAW,KAAK,GAAS;EACpD,IAAM,IAAS,EAAK,GAAS,qBAAqB,GAC5C,IAAO,MAAW,WAAW,MAAW,SAAS,KAAQ,KAAA;EAG/D,IAAI,KAAY,CAAC,KAAU,EAAI,SAAS,CAAO,GAAG;EAClD,AAAI,aAAe,eAAe,EAAI,WAAS,EAAI,cAAc,CAAI;CACtE;AACD;AAEA,EAAY,iBAAiB,CAC5B,EAAG,UAAU,SAAS,CAAkB,CACzC,CAAC"}
|
package/mtds/popover/popover.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
);
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region designsystem/popover/popover.tsx
|
|
6
|
+
var i = n(function({ as: n, "data-position": i, className: a, ...o }, s) {
|
|
7
|
+
return /* @__PURE__ */ r(n || "div", {
|
|
8
|
+
className: t(e.popover, a),
|
|
9
|
+
"data-placement": i,
|
|
10
|
+
suppressHydrationWarning: !0,
|
|
11
|
+
popover: "auto",
|
|
12
|
+
ref: s,
|
|
13
|
+
...o
|
|
14
|
+
});
|
|
17
15
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=popover.js.map
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as Popover };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sources":["../../designsystem/popover/popover.tsx"],"sourcesContent":["import type { Placement } from \"@floating-ui/dom\";\nimport clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type PopoverProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t/**\n\t\t\t * @deprecated Use `data-placement` instead.\n\t\t\t */\n\t\t\t\"data-position\"?: Placement;\n\t\t\t\"data-placement\"?: Placement;\n\t\t\t\"data-overscroll\"?: \"contain\";\n\t\t\tpopover?: React.HTMLAttributes<HTMLElement>[\"popover\"];\n\t\t}\n\t>;\n\ntype PopoverComponent = <As extends React.ElementType = \"div\">(\n\tprops: PopoverProps<As>,\n) => JSX.Element;\n\nexport const Popover: PopoverComponent = forwardRef<null>(function Popover<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{ as, \"data-position\": placement, className, ...rest }: PopoverProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\n\treturn (\n\t\t<Tag\n\t\t\tclassName={clsx(styles.popover, className)}\n\t\t\tdata-placement={placement} // Backward compatibility\n\t\t\tsuppressHydrationWarning // Client side attributes changes when positioning is calculated\n\t\t\tpopover=\"auto\"\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}) as PopoverComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"
|
|
1
|
+
{"version":3,"file":"popover.js","names":[],"sources":["../../designsystem/popover/popover.tsx"],"sourcesContent":["import type { Placement } from \"@floating-ui/dom\";\nimport clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type PopoverProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t/**\n\t\t\t * @deprecated Use `data-placement` instead.\n\t\t\t */\n\t\t\t\"data-position\"?: Placement;\n\t\t\t\"data-placement\"?: Placement;\n\t\t\t\"data-overscroll\"?: \"contain\";\n\t\t\tpopover?: React.HTMLAttributes<HTMLElement>[\"popover\"];\n\t\t}\n\t>;\n\ntype PopoverComponent = <As extends React.ElementType = \"div\">(\n\tprops: PopoverProps<As>,\n) => JSX.Element;\n\nexport const Popover: PopoverComponent = forwardRef<null>(function Popover<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{ as, \"data-position\": placement, className, ...rest }: PopoverProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\n\treturn (\n\t\t<Tag\n\t\t\tclassName={clsx(styles.popover, className)}\n\t\t\tdata-placement={placement} // Backward compatibility\n\t\t\tsuppressHydrationWarning // Client side attributes changes when positioning is calculated\n\t\t\tpopover=\"auto\"\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}) as PopoverComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"mappings":";;;;;AA2BA,IAAa,IAA4B,EAAiB,SAGzD,EAAE,OAAI,iBAAiB,GAAW,cAAW,GAAG,KAChD,GACC;CAGD,OACC,kBAHW,KAAM,OAGjB;EACC,WAAW,EAAK,EAAO,SAAS,CAAS;EACzC,kBAAgB;EAChB,0BAAA;EACA,SAAQ;EACH;EACL,GAAI;CACJ,CAAA;AAEH,CAAC"}
|
package/mtds/print/print.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region designsystem/print/print.tsx
|
|
6
|
+
var i = n(function({ as: n, className: i, ...a }, o) {
|
|
7
|
+
return /* @__PURE__ */ r(n || "section", {
|
|
8
|
+
className: t(e.print, i),
|
|
9
|
+
ref: o,
|
|
10
|
+
...a
|
|
11
|
+
});
|
|
7
12
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=print.js.map
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as Print };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=print.js.map
|
package/mtds/print/print.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print.js","sources":["../../designsystem/print/print.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type PrintProps<As extends React.ElementType = \"section\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-variant\"?: \"front\" | \"back\";\n\t\t}\n\t>;\n\ntype PrintComponent = <As extends React.ElementType = \"section\">(\n\tprops: PrintProps<As>,\n) => JSX.Element;\n\nexport const Print: PrintComponent = forwardRef<null>(function Print<\n\tAs extends React.ElementType = \"section\",\n>({ as, className, ...rest }: PrintProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"section\";\n\n\treturn <Tag className={clsx(styles.print, className)} ref={ref} {...rest} />;\n}) as PrintComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"
|
|
1
|
+
{"version":3,"file":"print.js","names":[],"sources":["../../designsystem/print/print.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type PrintProps<As extends React.ElementType = \"section\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-variant\"?: \"front\" | \"back\";\n\t\t}\n\t>;\n\ntype PrintComponent = <As extends React.ElementType = \"section\">(\n\tprops: PrintProps<As>,\n) => JSX.Element;\n\nexport const Print: PrintComponent = forwardRef<null>(function Print<\n\tAs extends React.ElementType = \"section\",\n>({ as, className, ...rest }: PrintProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"section\";\n\n\treturn <Tag className={clsx(styles.print, className)} ref={ref} {...rest} />;\n}) as PrintComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"mappings":";;;;;AAoBA,IAAa,IAAwB,EAAiB,SAEpD,EAAE,OAAI,cAAW,GAAG,KAAwB,GAA0B;CAGvE,OAAO,kBAFK,KAAM,WAEX;EAAK,WAAW,EAAK,EAAO,OAAO,CAAS;EAAQ;EAAK,GAAI;CAAO,CAAA;AAC5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Epost(): import("react").JSX.Element;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import e from "../styles.module.js";
|
|
2
|
+
import { toCustomElementProps as t } from "../utils.js";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region designsystem/progress/progress.tsx
|
|
6
|
+
var i = n(function(n, i) {
|
|
7
|
+
return /* @__PURE__ */ r("u-progress", {
|
|
8
|
+
ref: i,
|
|
9
|
+
...t(n, e.progress)
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as Progress };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=progress.js.map
|