@mattilsynet/design 0.5.2 → 0.5.3

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.
@@ -15,7 +15,7 @@ export declare const Nowrap: Story;
15
15
  export declare const Pressed: Story;
16
16
  export declare const WithArrows: Story;
17
17
  export declare const WithIcons: Story;
18
- export declare const WithLoading: Story;
18
+ export declare const WithSpinner: Story;
19
19
  export declare const WithMenu: Story;
20
20
  export declare const WithTooltip: Story;
21
21
  export declare const InMenu: Story;
@@ -17,4 +17,5 @@ export declare const Switch: Story;
17
17
  export declare const Sizes: Story;
18
18
  export declare const ReadOnly: Story;
19
19
  export declare const Disabled: Story;
20
- export declare const Search: Story;
20
+ export declare const TypeSearch: Story;
21
+ export declare const TypeDate: Story;
@@ -3,7 +3,7 @@ import { PolymorphicComponentPropWithRef } from '../react-types';
3
3
  type SharedProps = {
4
4
  "data-align"?: "stretch" | "start" | "center" | "end";
5
5
  "data-center"?: "sm" | "md" | "lg" | "xl" | "2xl";
6
- "data-gap"?: "none" | "xs" | "sm" | "md" | "lg" | false;
6
+ "data-gap"?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | false;
7
7
  "data-justify"?: "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
8
8
  "data-justify-content"?: "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sources":["../../designsystem/layout/layout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype SharedProps = {\n\t\"data-align\"?: \"stretch\" | \"start\" | \"center\" | \"end\";\n\t\"data-center\"?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\t\"data-gap\"?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | false;\n\t\"data-justify\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-justify-content\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n};\n\nexport type FlexProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, SharedProps>;\n\nexport type GridProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\tSharedProps & {\n\t\t\t\"data-grid\"?:\n\t\t\t\t| \"1\"\n\t\t\t\t| \"2\"\n\t\t\t\t| \"3\"\n\t\t\t\t| \"4\"\n\t\t\t\t| \"5\"\n\t\t\t\t| \"6\"\n\t\t\t\t| \"7\"\n\t\t\t\t| \"8\"\n\t\t\t\t| \"9\"\n\t\t\t\t| \"10\"\n\t\t\t\t| \"11\"\n\t\t\t\t| \"12\"\n\t\t\t\t| \"fit\"\n\t\t\t\t| \"fit-lg\"\n\t\t\t\t| \"fit-md\"\n\t\t\t\t| \"fit-sm\"\n\t\t\t\t| \"fit-xs\"\n\t\t\t\t| \"lg\"\n\t\t\t\t| \"md\"\n\t\t\t\t| \"sm\"\n\t\t\t\t| \"xs\"\n\t\t\t\t| 1\n\t\t\t\t| 2\n\t\t\t\t| 3\n\t\t\t\t| 4\n\t\t\t\t| 5\n\t\t\t\t| 6\n\t\t\t\t| 7\n\t\t\t\t| 8\n\t\t\t\t| 9\n\t\t\t\t| 10\n\t\t\t\t| 11\n\t\t\t\t| 12;\n\t\t}\n\t>;\n\ntype FlexComponent = <As extends React.ElementType = \"div\">(\n\tprops: FlexProps<As>,\n) => JSX.Element;\n\ntype GridComponent = <As extends React.ElementType = \"div\">(\n\tprops: GridProps<As>,\n) => JSX.Element;\n\nexport const Flex: FlexComponent = forwardRef<null>(function Flex<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: FlexProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.flex, className)} ref={ref} {...rest} />;\n}) as FlexComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport const Grid: GridComponent = forwardRef<null>(function Grid<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GridProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.grid, className)} ref={ref} {...rest} />;\n}) as GridComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Flex","forwardRef","as","className","rest","ref","jsx","clsx","styles","Grid"],"mappings":";;;;AAgFa,MAAAA,IAAsBC,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC,GAEYK,IAAsBR,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC;"}
1
+ {"version":3,"file":"layout.js","sources":["../../designsystem/layout/layout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype SharedProps = {\n\t\"data-align\"?: \"stretch\" | \"start\" | \"center\" | \"end\";\n\t\"data-center\"?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\t\"data-gap\"?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | false;\n\t\"data-justify\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-justify-content\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n};\n\nexport type FlexProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, SharedProps>;\n\nexport type GridProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\tSharedProps & {\n\t\t\t\"data-grid\"?:\n\t\t\t\t| \"1\"\n\t\t\t\t| \"2\"\n\t\t\t\t| \"3\"\n\t\t\t\t| \"4\"\n\t\t\t\t| \"5\"\n\t\t\t\t| \"6\"\n\t\t\t\t| \"7\"\n\t\t\t\t| \"8\"\n\t\t\t\t| \"9\"\n\t\t\t\t| \"10\"\n\t\t\t\t| \"11\"\n\t\t\t\t| \"12\"\n\t\t\t\t| \"fit\"\n\t\t\t\t| \"fit-lg\"\n\t\t\t\t| \"fit-md\"\n\t\t\t\t| \"fit-sm\"\n\t\t\t\t| \"fit-xs\"\n\t\t\t\t| \"lg\"\n\t\t\t\t| \"md\"\n\t\t\t\t| \"sm\"\n\t\t\t\t| \"xs\"\n\t\t\t\t| 1\n\t\t\t\t| 2\n\t\t\t\t| 3\n\t\t\t\t| 4\n\t\t\t\t| 5\n\t\t\t\t| 6\n\t\t\t\t| 7\n\t\t\t\t| 8\n\t\t\t\t| 9\n\t\t\t\t| 10\n\t\t\t\t| 11\n\t\t\t\t| 12;\n\t\t}\n\t>;\n\ntype FlexComponent = <As extends React.ElementType = \"div\">(\n\tprops: FlexProps<As>,\n) => JSX.Element;\n\ntype GridComponent = <As extends React.ElementType = \"div\">(\n\tprops: GridProps<As>,\n) => JSX.Element;\n\nexport const Flex: FlexComponent = forwardRef<null>(function Flex<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: FlexProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.flex, className)} ref={ref} {...rest} />;\n}) as FlexComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport const Grid: GridComponent = forwardRef<null>(function Grid<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GridProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.grid, className)} ref={ref} {...rest} />;\n}) as GridComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Flex","forwardRef","as","className","rest","ref","jsx","clsx","styles","Grid"],"mappings":";;;;AAgFa,MAAAA,IAAsBC,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC,GAEYK,IAAsBR,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC;"}