@20minutes/hela 0.1.55 → 0.1.57
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/dist/assets/scripts/navigation.d.ts +10 -2
- package/dist/components/atoms/Button/Button.d.ts +6 -5
- package/dist/components/atoms/Divider/Divider.d.ts +4 -3
- package/dist/components/atoms/Icon/Icon.d.ts +3 -3
- package/dist/components/atoms/Input/Input.d.ts +4 -5
- package/dist/components/atoms/Layout/Box/Box.d.ts +3 -4
- package/dist/components/atoms/Layout/Flex/Flex.d.ts +3 -5
- package/dist/components/atoms/Layout/Flex/FlexItem/FlexItem.d.ts +2 -5
- package/dist/components/atoms/Link/Link.d.ts +3 -4
- package/dist/components/atoms/ScrollProgressBar/ScrollProgressBar.d.ts +4 -3
- package/dist/components/atoms/Slider/Slider.d.ts +7 -5
- package/dist/components/atoms/Switch/Switch.d.ts +4 -5
- package/dist/components/atoms/Tag/Tag.d.ts +4 -5
- package/dist/components/atoms/Typography/Heading/Heading.d.ts +5 -5
- package/dist/components/atoms/Typography/Text/Text.d.ts +5 -5
- package/dist/components/atoms/Typography/Typography.d.ts +3 -3
- package/dist/components/molecules/Card/Card/Card.d.ts +4 -4
- package/dist/components/molecules/Card/CardSmall/CardSmall.d.ts +2 -0
- package/dist/components/molecules/Collapse/Collapse.d.ts +4 -4
- package/dist/components/molecules/Horoscope/HoroscopeTopicCard/HoroscopeTopicCard.d.ts +3 -3
- package/dist/components/molecules/PartnerCards/PartnerCards.d.ts +3 -1
- package/dist/components/molecules/RubricCards/RubricCards.d.ts +10 -0
- package/dist/components/molecules/RubricCards/index.d.ts +1 -0
- package/dist/components/molecules/TagBar/TagBar.d.ts +2 -2
- package/dist/components/molecules/index.d.ts +1 -1
- package/dist/helpers/forwardRef.d.ts +4 -0
- package/dist/index.es.js +8057 -7003
- package/dist/index.umd.js +90 -50
- package/dist/js/main.min.js +1 -1
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/scss/abstracts/variables/_variables.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/types/AsProps.d.ts +4 -0
- package/dist/types/ComponentWithAs.d.ts +13 -0
- package/dist/types/index.d.ts +2 -2
- package/package.json +9 -9
- package/dist/components/molecules/CategoryCards/CategoryCards.d.ts +0 -9
- package/dist/components/molecules/CategoryCards/index.d.ts +0 -1
- package/dist/types/PolymorphicProps.d.ts +0 -5
- package/dist/types/PolymorphicRef.d.ts +0 -1
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { SliderType } from '../../components';
|
|
2
|
+
type NavigationElementOptions = {
|
|
3
|
+
navigatedList: HTMLDivElement;
|
|
4
|
+
nextBtn: HTMLDivElement;
|
|
5
|
+
prevBtn: HTMLDivElement;
|
|
6
|
+
sliderVariant?: SliderType;
|
|
7
|
+
};
|
|
8
|
+
export declare const onListenContainerSize: (navigationContainerElement?: null | HTMLDivElement, sliderVariant?: NavigationElementOptions['sliderVariant']) => void;
|
|
9
|
+
export declare const onListenResize: (navigationContainerElement?: null | HTMLDivElement, sliderVariant?: NavigationElementOptions['sliderVariant']) => void;
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { IconProps } from '../../../components';
|
|
3
|
-
import {
|
|
3
|
+
import { As, AsProps, ColorSystemProps, SpacingSystemProps } from '../../../types';
|
|
4
4
|
export declare const buttonVariant: readonly ["primary", "secondary", "tertiary", "ghost", "round"];
|
|
5
5
|
export type ButtonVariantType = (typeof buttonVariant)[number];
|
|
6
|
-
export
|
|
6
|
+
export interface ButtonOptions {
|
|
7
7
|
variant?: ButtonVariantType;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
iconProps?: IconProps;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
10
|
+
}
|
|
11
|
+
export type ButtonProps<T extends As = 'button'> = ButtonOptions & SpacingSystemProps & ColorSystemProps & AsProps<T>;
|
|
12
|
+
export declare const Button: import('../../../types').ComponentWithAs<"button", ButtonProps<"button">>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { FlexProps } from '../../../components';
|
|
3
|
-
export interface
|
|
2
|
+
export interface DividerOptions {
|
|
4
3
|
text?: string;
|
|
4
|
+
thickness?: 'thin' | 'thick';
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type DividerProps = DividerOptions & FlexProps;
|
|
7
|
+
export declare const Divider: import("../../..").ComponentWithAs<"div", DividerProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { BoxProps } from '../../../components';
|
|
3
2
|
export type IconName = '20mn-pub' | 'apple' | 'arrow' | 'bookmark' | 'chevron' | 'close' | 'clover' | 'comment' | 'connect' | 'connected' | 'dailymotion' | 'darkmode' | 'diaporama' | 'diode-rubric-entertainment' | 'diode-leaning' | 'diode-rubric-planet' | 'diode-rubric-sport' | 'diode' | 'error' | 'facebook' | 'flipboard' | 'googleplay' | 'health' | 'heart' | 'horoscope' | 'home' | 'instagram' | 'jeux' | 'journal' | 'local' | 'logo' | 'menu' | 'mood' | 'newsletters' | 'not-found' | 'notification' | 'podcast' | 'report' | 'search' | 'server-error' | 'share' | 'signin-facebook' | 'signin-google' | 'snapchat' | 'star' | 'tiktok' | 'twitter' | 'valide' | 'video' | 'view' | 'youtube' | 'work';
|
|
4
3
|
export type IconHoroscopeName = 'horoscope-belier' | 'horoscope-taureau' | 'horoscope-gemeaux' | 'horoscope-cancer' | 'horoscope-lion' | 'horoscope-vierge' | 'horoscope-balance' | 'horoscope-scorpion' | 'horoscope-sagittaire' | 'horoscope-capricorne' | 'horoscope-verseau' | 'horoscope-poissons' | 'horoscope-buffle' | 'horoscope-cheval' | 'horoscope-chevre' | 'horoscope-chien' | 'horoscope-cochon' | 'horoscope-coq' | 'horoscope-dragon' | 'horoscope-lapin' | 'horoscope-rat' | 'horoscope-serpent' | 'horoscope-singe' | 'horoscope-tigre';
|
|
5
|
-
export interface
|
|
4
|
+
export interface IconOptions {
|
|
6
5
|
name: IconName | IconHoroscopeName;
|
|
7
6
|
size?: number | number[];
|
|
8
7
|
withBorder?: boolean;
|
|
9
8
|
isRounded?: boolean;
|
|
10
9
|
}
|
|
11
|
-
export
|
|
10
|
+
export type IconProps = IconOptions & BoxProps;
|
|
11
|
+
export declare const Icon: import("../../..").ComponentWithAs<"div", IconProps>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { ButtonProps, IconName, TextProps } from '../../../components';
|
|
3
|
-
import
|
|
4
|
-
export interface
|
|
2
|
+
import { AsProps, ColorSystemProps } from '../../../types';
|
|
3
|
+
export interface InputOptions {
|
|
5
4
|
label?: string;
|
|
6
5
|
icon?: IconName;
|
|
7
6
|
positionIcon?: 'left' | 'right';
|
|
@@ -10,6 +9,6 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
10
9
|
variant?: 'success' | 'error';
|
|
11
10
|
msg?: string;
|
|
12
11
|
msgProps?: TextProps;
|
|
13
|
-
color?: ColorType;
|
|
14
12
|
}
|
|
15
|
-
export
|
|
13
|
+
export type InputProps = InputOptions & Pick<ColorSystemProps, 'color'> & AsProps<'input'>;
|
|
14
|
+
export declare const Input: import('../../../types').ComponentWithAs<"input", InputProps>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare const Box: React.ForwardRefExoticComponent<Pick<BoxProps<React.ElementType<any>>, string | number | symbol> & React.RefAttributes<unknown>>;
|
|
1
|
+
import { As, AsProps, SystemProps } from '../../../../types';
|
|
2
|
+
export type BoxProps<T extends As = 'div'> = SystemProps & AsProps<T>;
|
|
3
|
+
export declare const Box: import('../../../../types').ComponentWithAs<"div", BoxProps<"div">>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { BoxProps } from '../../../../components';
|
|
3
2
|
import type { FlexBoxSystemProps } from '../../../../types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const Flex: <C extends React.ElementType<any> = "div">({ as, children, ...props }: FlexProps<C>) => React.ReactElement<any, any> | null;
|
|
3
|
+
import { As } from '../../../../types';
|
|
4
|
+
export type FlexProps<T extends As = 'div'> = FlexBoxSystemProps & BoxProps<T>;
|
|
5
|
+
export declare const Flex: import('../../../../types').ComponentWithAs<"div", FlexProps<"div">>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { BoxProps } from '../../../../../components';
|
|
3
2
|
import type { FlexBoxItemSystemProps } from '../../../../../types';
|
|
4
|
-
export type FlexItemProps
|
|
5
|
-
|
|
6
|
-
} & BoxProps<C> & FlexBoxItemSystemProps;
|
|
7
|
-
export declare const FlexItem: <C extends React.ElementType<any> = "div">({ children, as, ...props }: FlexItemProps<C>) => React.ReactElement<any, any> | null;
|
|
3
|
+
export type FlexItemProps = FlexBoxItemSystemProps & BoxProps;
|
|
4
|
+
export declare const FlexItem: import('../../../../../types').ComponentWithAs<"div", FlexItemProps>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { PolymorphicProps, SpacingSystemProps } from '../../../types';
|
|
1
|
+
import { As, ColorSystemProps, SpacingSystemProps } from '../../../types';
|
|
3
2
|
import { ButtonProps } from '../../../components';
|
|
4
|
-
export type LinkProps<
|
|
5
|
-
export declare const Link:
|
|
3
|
+
export type LinkProps<T extends As = 'a'> = SpacingSystemProps & Pick<ColorSystemProps, 'color'> & ButtonProps<T>;
|
|
4
|
+
export declare const Link: import('../../../types').ComponentWithAs<"a", LinkProps<"a">>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ColorType } from '../../../types';
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../../../components';
|
|
3
|
+
export interface ScrollProgressBarOptions {
|
|
4
4
|
color?: ColorType;
|
|
5
5
|
hasLimit?: boolean;
|
|
6
6
|
variant?: 'article-mobile';
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type ScrollProgressBarProps = ScrollProgressBarOptions & BoxProps;
|
|
9
|
+
export declare const ScrollProgressBar: import('../../../types').ComponentWithAs<"div", ScrollProgressBarProps>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { LayoutType, SpacingType } from '../../../types';
|
|
3
2
|
import { BoxProps } from '../../../components';
|
|
4
|
-
export
|
|
3
|
+
export type SliderType = 'default' | 'partners' | 'rubrics';
|
|
4
|
+
export interface SliderOptions {
|
|
5
5
|
layout: LayoutType;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
itemsGap?: SpacingType;
|
|
7
|
+
buttonsBackground?: 'primary' | 'secondary';
|
|
8
|
+
sliderVariant?: SliderType;
|
|
8
9
|
}
|
|
9
|
-
export
|
|
10
|
+
export type SliderProps = SliderOptions & BoxProps;
|
|
11
|
+
export declare const Slider: import('../../../types').ComponentWithAs<"div", SliderProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface
|
|
3
|
-
id?: string;
|
|
4
|
-
className?: string;
|
|
1
|
+
import { AsProps } from '../../../types';
|
|
2
|
+
export interface SwitchOptions {
|
|
5
3
|
label?: string;
|
|
6
4
|
isChecked?: boolean;
|
|
7
5
|
}
|
|
8
|
-
export
|
|
6
|
+
export type SwitchProps = SwitchOptions & AsProps<'button'>;
|
|
7
|
+
export declare const Switch: import('../../../types').ComponentWithAs<"button", SwitchProps>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ColorType } from '../../../types';
|
|
1
|
+
import { As } from '../../../types';
|
|
3
2
|
import { BoxProps } from '../../../components';
|
|
4
|
-
export interface
|
|
3
|
+
export interface TaxOptions {
|
|
5
4
|
link?: string;
|
|
6
5
|
variant?: 'primary' | 'secondary' | 'breadcrumb';
|
|
7
|
-
color?: ColorType;
|
|
8
6
|
}
|
|
9
|
-
export
|
|
7
|
+
export type TagProps<T extends As = 'a'> = TaxOptions & BoxProps<T>;
|
|
8
|
+
export declare const Tag: import('../../../types').ComponentWithAs<"div", TagProps<"a">>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { HeadingSizeType, TypeWithMediaQueriesType } from '../../../../types';
|
|
1
|
+
import { As, HeadingSizeType, TypeWithMediaQueriesType } from '../../../../types';
|
|
3
2
|
import { TypographyProps } from '../Typography';
|
|
4
|
-
export
|
|
3
|
+
export interface HeadingOptions {
|
|
5
4
|
size?: HeadingSizeType | TypeWithMediaQueriesType<HeadingSizeType>;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
5
|
+
}
|
|
6
|
+
export type HeadingProps<T extends As = 'h1'> = HeadingOptions & TypographyProps<T>;
|
|
7
|
+
export declare const Heading: import('../../../../types').ComponentWithAs<"h1", HeadingProps<"h1">>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextSizeType, TypeWithMediaQueriesType } from '../../../../types';
|
|
1
|
+
import { As, TextSizeType, TypeWithMediaQueriesType } from '../../../../types';
|
|
3
2
|
import { TypographyProps } from '../Typography';
|
|
4
|
-
export
|
|
3
|
+
export interface TextOptions {
|
|
5
4
|
size?: TextSizeType | TypeWithMediaQueriesType<TextSizeType>;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
5
|
+
}
|
|
6
|
+
export type TextProps<T extends As = 'p'> = TextOptions & TypographyProps<T>;
|
|
7
|
+
export declare const Text: import('../../../../types').ComponentWithAs<"p", TextProps<"p">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BoxProps } from '../../../components';
|
|
3
2
|
import type { TypographySystemProps } from '../../../types';
|
|
4
|
-
|
|
5
|
-
export
|
|
3
|
+
import { As } from '../../../types';
|
|
4
|
+
export type TypographyProps<T extends As = 'p'> = TypographySystemProps & BoxProps<T>;
|
|
5
|
+
export declare const Typography: import('../../../types').ComponentWithAs<"p", TypographyProps<"p">>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FlexProps } from '../../../../components/atoms';
|
|
2
|
-
import
|
|
3
|
-
export interface
|
|
2
|
+
import { As } from '../../../../types';
|
|
3
|
+
export interface CardOptions {
|
|
4
4
|
link: string;
|
|
5
|
-
children: React.ReactNode;
|
|
6
5
|
}
|
|
7
|
-
export
|
|
6
|
+
export type CardProps<T extends As = 'a'> = CardOptions & FlexProps<T>;
|
|
7
|
+
export declare const Card: import('../../../../types').ComponentWithAs<"a", CardProps<"a">>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { HeadingProps } from '../../../../components';
|
|
2
3
|
import { CardType, SpacingSystemProps } from '../../../../types';
|
|
3
4
|
export interface CardSmallProps extends CardType, SpacingSystemProps {
|
|
5
|
+
headingProps?: Pick<HeadingProps, 'color' | 'weight'>;
|
|
4
6
|
}
|
|
5
7
|
export declare const CardSmall: React.FC<CardSmallProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { BoxProps, IconProps } from '../../../components';
|
|
3
|
-
|
|
2
|
+
import { AsProps, ColorSystemProps } from '../../../types';
|
|
3
|
+
export interface CollapseOptions {
|
|
4
4
|
title: string;
|
|
5
5
|
index: number;
|
|
6
6
|
isOpen?: boolean;
|
|
7
7
|
iconProps?: Partial<IconProps>;
|
|
8
8
|
btnProps?: Partial<BoxProps>;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
9
|
}
|
|
11
|
-
export
|
|
10
|
+
export type CollapseProps = CollapseOptions & ColorSystemProps & AsProps<'div'>;
|
|
11
|
+
export declare const Collapse: import('../../../types').ComponentWithAs<"div", CollapseProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { BoxProps, IconName } from '../../../../components';
|
|
3
|
-
export interface
|
|
2
|
+
export interface HoroscopeTopicCardOptions {
|
|
4
3
|
icon: IconName;
|
|
5
4
|
title: string;
|
|
6
5
|
content: string;
|
|
7
6
|
}
|
|
8
|
-
export
|
|
7
|
+
export type HoroscopeTopicCardProps = HoroscopeTopicCardOptions & BoxProps;
|
|
8
|
+
export declare const HoroscopeTopicCard: import("../../../..").ComponentWithAs<"div", HoroscopeTopicCardProps>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CardExtraSmallProps, CardMediumProps } from '../../../components';
|
|
3
|
+
import { LayoutType } from '../../../types';
|
|
3
4
|
export interface PartnerCardsProps {
|
|
4
5
|
columns: {
|
|
5
6
|
label: string;
|
|
6
7
|
articles: CardMediumProps[] | CardExtraSmallProps[];
|
|
7
8
|
}[];
|
|
9
|
+
layout?: LayoutType;
|
|
8
10
|
}
|
|
9
11
|
export declare const PartnerCards: React.FC<PartnerCardsProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CardSmallProps } from '../../../components';
|
|
3
|
+
import { LayoutType, RubricColorType } from '../../../types';
|
|
4
|
+
export interface RubricCardsProps {
|
|
5
|
+
articles: CardSmallProps[];
|
|
6
|
+
label: string;
|
|
7
|
+
rubricColor?: RubricColorType;
|
|
8
|
+
layout?: LayoutType;
|
|
9
|
+
}
|
|
10
|
+
export declare const RubricCards: React.FC<RubricCardsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RubricCards';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TagProps } from '../../../components';
|
|
2
|
+
import { BoxProps, TagProps } from '../../../components';
|
|
3
3
|
import { LayoutType } from '../../../types';
|
|
4
|
-
export interface TagBarProps extends
|
|
4
|
+
export interface TagBarProps extends BoxProps {
|
|
5
5
|
tags: TagProps[];
|
|
6
6
|
layout: LayoutType;
|
|
7
7
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './Article';
|
|
2
2
|
export * from './Breadcrumb';
|
|
3
3
|
export * from './Card';
|
|
4
|
-
export * from './CategoryCards';
|
|
5
4
|
export * from './Collapse';
|
|
6
5
|
export * from './Comment';
|
|
7
6
|
export * from './ErrorContent';
|
|
@@ -17,6 +16,7 @@ export * from './MostReadArticles';
|
|
|
17
16
|
export * from './Newsletter';
|
|
18
17
|
export * from './OverviewBar';
|
|
19
18
|
export * from './PartnerCards';
|
|
19
|
+
export * from './RubricCards';
|
|
20
20
|
export * from './SearchForm';
|
|
21
21
|
export * from './Signature';
|
|
22
22
|
export * from './SmartBanner';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { As, ComponentWithAs, PropsOf, RightJoinProps } from '../types';
|
|
2
|
+
export declare function forwardRef<Props extends object, Component extends As>(component: React.ForwardRefRenderFunction<any, RightJoinProps<PropsOf<Component>, Props> & {
|
|
3
|
+
as?: As;
|
|
4
|
+
}>): ComponentWithAs<Component, Props>;
|