@mattilsynet/design 3.1.14 → 3.1.16
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/card/card.d.ts +5 -5
- package/mtds/card/card.js.map +1 -1
- package/mtds/index.iife.js +8 -8
- package/mtds/package.json.js +1 -1
- package/mtds/popover/popover-observer.js +11 -8
- package/mtds/popover/popover-observer.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/validation/validation-observer.js +9 -9
- package/mtds/validation/validation-observer.js.map +1 -1
- package/package.json +5 -5
|
@@ -20,7 +20,7 @@ class c extends C {
|
|
|
20
20
|
}
|
|
21
21
|
constructor() {
|
|
22
22
|
super(), this.attachShadow({ mode: "open" }).append(p("figure")), v(this, `@layer leaflet{${f}}
|
|
23
|
-
@layer mt.v3-1-
|
|
23
|
+
@layer mt.v3-1-16design{${k}`);
|
|
24
24
|
}
|
|
25
25
|
connectedCallback() {
|
|
26
26
|
const t = this.shadowRoot?.lastElementChild, o = a(this, "data-cluster") ?? "false", e = new i.TileLayer(S, {
|
package/mtds/card/card.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { PolymorphicComponentPropWithRef, Sizes } from '../react-types';
|
|
3
|
-
type
|
|
4
|
-
"data-pad"?: Sizes
|
|
3
|
+
export type CardProps<Href, As extends React.ElementType = Href extends string ? "a" : "div"> = PolymorphicComponentPropWithRef<As, {
|
|
4
|
+
"data-pad"?: Sizes | `${Sizes}-${Sizes}`;
|
|
5
5
|
"data-radius"?: "sm" | "md" | "lg" | "xl";
|
|
6
6
|
"data-clickdelegatefor"?: string;
|
|
7
7
|
href?: Href;
|
|
8
|
-
}
|
|
9
|
-
export type CardProps<Href, As extends React.ElementType = Href extends string ? "a" : "div"> = PolymorphicComponentPropWithRef<As, CardBaseProps<Href>>;
|
|
8
|
+
}>;
|
|
10
9
|
type CardComponent = <Href, As extends React.ElementType = Href extends string ? "a" : "div">(props: CardProps<Href, As>) => JSX.Element;
|
|
11
10
|
export declare const Card: CardComponent;
|
|
12
11
|
export type GroupProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As, {
|
|
13
|
-
"data-pad"?: Sizes
|
|
12
|
+
"data-pad"?: Sizes | `${Sizes}-${Sizes}`;
|
|
13
|
+
"data-radius"?: "sm" | "md" | "lg" | "xl";
|
|
14
14
|
}>;
|
|
15
15
|
type GroupComponent = <As extends React.ElementType = "div">(props: GroupProps<As>) => JSX.Element;
|
|
16
16
|
export declare const Group: GroupComponent;
|
package/mtds/card/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../designsystem/card/card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../designsystem/card/card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type CardProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n> = PolymorphicComponentPropWithRef<\n\tAs,\n\t{\n\t\t\"data-pad\"?: Sizes | `${Sizes}-${Sizes}`;\n\t\t\"data-radius\"?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n\t\t\"data-clickdelegatefor\"?: string;\n\t\thref?: Href;\n\t}\n>;\n\ntype CardComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>(\n\tprops: CardProps<Href, As>,\n) => JSX.Element;\n\nexport const Card: CardComponent = forwardRef<null>(function Card<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>({ as, className, ...rest }: CardProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"div\");\n\n\treturn <Tag className={clsx(styles.card, className)} ref={ref} {...rest} />;\n}) as CardComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type GroupProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-pad\"?: Sizes | `${Sizes}-${Sizes}`;\n\t\t\t\"data-radius\"?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n\t\t}\n\t>;\n\ntype GroupComponent = <As extends React.ElementType = \"div\">(\n\tprops: GroupProps<As>,\n) => JSX.Element;\n\nexport const Group: GroupComponent = forwardRef<null>(function Group<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GroupProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\tif (Tag === \"button\" && !rest.type) Object.assign(rest, { type: \"button\" }); // Default type for button to avoid accidental submits\n\treturn <Tag className={clsx(styles.group, className)} ref={ref} {...rest} />;\n}) as GroupComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Card","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles","Group"],"mappings":";;;;AA6BO,MAAMA,IAAsBC,EAAiB,SAGlD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA6BC,GAA0B;AAC5E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,MAAMN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC,GAeYM,IAAwBT,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AACvE,QAAMC,IAAMJ,KAAM;AAClB,SAAII,MAAQ,YAAY,CAACF,EAAK,QAAM,OAAO,OAAOA,GAAM,EAAE,MAAM,SAAA,CAAU,GACnE,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
|