@20minutes/hela 2.16.10 → 2.17.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.
Files changed (28) hide show
  1. package/dist/index.es.js +1062 -869
  2. package/dist/index.umd.cjs +1 -0
  3. package/dist/js/scripts.es.js +7 -4
  4. package/dist/js/{scripts.umd.js → scripts.umd.cjs} +1 -1
  5. package/dist/scss/abstracts/variables/_token-variables.scss +69 -69
  6. package/dist/scss/abstracts/variables/_variables.scss +45 -46
  7. package/dist/src/components/atoms/InlineSeparator/InlineSeparator.stories.d.ts +1 -1
  8. package/dist/src/components/atoms/Link/Link.d.ts +5 -3
  9. package/dist/src/components/atoms/Link/Link.stories.d.ts +3 -1
  10. package/dist/src/components/atoms/ScrollToTopButton/ScrollToTopButton.stories.d.ts +112 -112
  11. package/dist/src/components/atoms/SkipLink/SkipLink.stories.d.ts +1 -1
  12. package/dist/src/components/molecules/DiscoverList/DiscoverList.stories.d.ts +104 -104
  13. package/dist/src/components/molecules/Elections/SearchBanner/SearchBanner.stories.d.ts +69 -69
  14. package/dist/src/components/molecules/VerticalTimeline/VerticalTimeline.stories.d.ts +105 -105
  15. package/dist/src/components/organisms/Footer/Footer.stories.d.ts +2 -2
  16. package/dist/src/constants/cssProperties/typography.d.ts +5 -4
  17. package/dist/src/constants/tokenNameList.d.ts +5 -5
  18. package/dist/src/constants/tokenVariables.d.ts +364 -132
  19. package/dist/src/helpers/forwardRef.d.ts +2 -2
  20. package/dist/src/helpers/imgHelper.d.ts +1 -1
  21. package/dist/src/helpers/storybookHelper.d.ts +3 -3
  22. package/dist/src/helpers/systemPropsHelper/classNameWithModifier.d.ts +2 -2
  23. package/dist/src/helpers/systemPropsHelper/classNamesWithModifiers.d.ts +3 -3
  24. package/dist/src/helpers/systemPropsHelper/typographySystemClassName.d.ts +1 -1
  25. package/dist/src/types/ComponentWithAs.d.ts +3 -2
  26. package/dist/style.css +1 -1
  27. package/package.json +38 -40
  28. package/dist/index.umd.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { As, ComponentWithAs, PropsOf, RightJoinProps } from '../types';
3
- export declare function forwardRef<Props extends object, Component extends As>(component: React.ForwardRefRenderFunction<any, RightJoinProps<PropsOf<Component>, Props> & {
2
+ import { As, ComponentWithAs, PropsOf, PropsWithoutAs, RightJoinProps } from '../types';
3
+ export declare function forwardRef<Props extends object, Component extends As>(component: React.ForwardRefRenderFunction<any, RightJoinProps<PropsOf<Component>, PropsWithoutAs<Props>> & {
4
4
  as?: As;
5
5
  }>): ComponentWithAs<Component, Props>;
@@ -1,6 +1,6 @@
1
1
  export declare const getSrcSetFromFormats: ({ src, formats }: {
2
2
  src: string;
3
- formats?: string[] | undefined;
3
+ formats?: string[];
4
4
  }) => string | undefined;
5
5
  export declare const replaceSrcFormat: ({ src, format }: {
6
6
  src: string;
@@ -6,7 +6,7 @@ export declare const createDescription: (options: {
6
6
  export declare const createControls: (options: {
7
7
  category: string;
8
8
  props: Record<string, string[]>;
9
- subCategory?: string | undefined;
10
- controlType?: string | Record<string, string> | undefined;
11
- options?: readonly string[] | Record<string, readonly string[]> | undefined;
9
+ subCategory?: string;
10
+ controlType?: string | Record<string, string>;
11
+ options?: Record<string, readonly string[]> | readonly string[];
12
12
  }) => Partial<ArgTypes>;
@@ -1,5 +1,5 @@
1
1
  export declare const classNameWithModifier: <TPropValue extends string | number | boolean>(options: {
2
- className?: string | undefined;
2
+ className?: string;
3
3
  defaultModifier: string;
4
- propValue?: TPropValue | undefined;
4
+ propValue?: TPropValue;
5
5
  }) => string | undefined;
@@ -1,6 +1,6 @@
1
1
  import { TypeWithModifierType } from '../../types';
2
2
  export declare const classNamesWithModifiers: <TModifierType extends string, TPropValue extends string | number | boolean>(options: {
3
- className?: string | undefined;
4
- defaultModifier?: string | undefined;
5
- propValue?: TPropValue | Partial<Record<TModifierType, TPropValue>> | undefined;
3
+ className?: string;
4
+ defaultModifier?: string;
5
+ propValue?: TPropValue | TypeWithModifierType<TModifierType, TPropValue>;
6
6
  }) => string[];
@@ -1,4 +1,4 @@
1
1
  import { TypographySystemProps } from '../../types';
2
2
  export declare const typographySystemClassName: <TProps extends TypographySystemProps>({ textAlign, weight, textTransform, textDecoration, italic, fontFamily, whiteSpace, }: TProps & {
3
- isHeading?: boolean | undefined;
3
+ isHeading?: boolean;
4
4
  }) => string;
@@ -1,10 +1,11 @@
1
1
  export type As<Props = any> = React.ElementType<Props>;
2
2
  export type PropsOf<T extends As> = React.ComponentPropsWithoutRef<T> & {
3
- as?: As;
3
+ as?: React.ElementType | string;
4
4
  };
5
5
  export type OmitCommonProps<Target, OmitAdditionalProps extends keyof any = never> = Omit<Target, 'as' | 'color' | 'align' | OmitAdditionalProps>;
6
6
  export type RightJoinProps<SourceProps extends object = {}, OverrideProps extends object = {}> = OmitCommonProps<SourceProps, keyof OverrideProps> & OverrideProps;
7
- export type MergeWithAs<ComponentProps extends object, AsProps extends object, AdditionalProps extends object = {}, AsComponent extends As = As> = RightJoinProps<ComponentProps, AdditionalProps> & RightJoinProps<AsProps, AdditionalProps> & {
7
+ export type PropsWithoutAs<Props extends object = {}> = Omit<Props, 'as'>;
8
+ export type MergeWithAs<ComponentProps extends object, AsProps extends object, AdditionalProps extends object = {}, AsComponent extends As = As> = RightJoinProps<ComponentProps, PropsWithoutAs<AdditionalProps>> & RightJoinProps<AsProps, PropsWithoutAs<AdditionalProps>> & {
8
9
  as?: AsComponent;
9
10
  };
10
11
  export interface ComponentWithAs<Component extends As, Props extends object = {}> {