@kroo-web/design-system 1.20.1 → 1.21.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/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Heading/Heading.stories.d.ts +13 -0
- package/dist/components/Heading/index.d.ts +19 -0
- package/dist/components/Popover/index.d.ts +3 -3
- package/dist/components/RadioGroup/index.d.ts +5 -5
- package/dist/components/Text/Text.stories.d.ts +8 -0
- package/dist/components/Text/index.d.ts +22 -0
- package/dist/components/Typography/index.d.ts +8 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/index.js +4107 -3985
- package/dist/index.umd.cjs +21 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -18,9 +18,9 @@ type TButtonVisualTypes = {
|
|
|
18
18
|
type TButtonOwnProps = {
|
|
19
19
|
as?: 'button' | 'span';
|
|
20
20
|
className?: string;
|
|
21
|
+
fullWidth?: [boolean, boolean?, boolean?] | boolean;
|
|
21
22
|
onlyIcon?: boolean;
|
|
22
|
-
fullWidth?: boolean | [boolean, boolean?, boolean?];
|
|
23
23
|
} & PropsWithChildren & React.ButtonHTMLAttributes<HTMLButtonElement> & TButtonVisualTypes;
|
|
24
24
|
export type TButtonProps<T extends React.ElementType = typeof defaultElement> = PolymorphicPropsWithoutRef<TButtonOwnProps, T>;
|
|
25
|
-
export declare function Button<T extends React.ElementType = typeof defaultElement>({ as, children, className, onlyIcon, variant, visualType,
|
|
25
|
+
export declare function Button<T extends React.ElementType = typeof defaultElement>({ as, children, className, fullWidth, onlyIcon, variant, visualType, ...rest }: TButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Heading } from './index';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Heading>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Heading>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const AllLevels: Story;
|
|
9
|
+
export declare const AllSizes: Story;
|
|
10
|
+
export declare const AllWeights: Story;
|
|
11
|
+
export declare const AllFonts: Story;
|
|
12
|
+
export declare const CustomSize: Story;
|
|
13
|
+
export declare const SemanticVsVisual: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
type HeadingSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxl';
|
|
4
|
+
type HeadingWeight = 'bold' | 'medium' | 'regular';
|
|
5
|
+
interface BaseHeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
6
|
+
size?: HeadingSize;
|
|
7
|
+
weight?: HeadingWeight;
|
|
8
|
+
}
|
|
9
|
+
interface HeadingDisplayProps extends BaseHeadingProps {
|
|
10
|
+
font?: 'brygada' | 'inter';
|
|
11
|
+
level: 1 | 2;
|
|
12
|
+
}
|
|
13
|
+
interface HeadingStandardProps extends BaseHeadingProps {
|
|
14
|
+
font?: 'inter';
|
|
15
|
+
level: 3 | 4 | 5 | 6;
|
|
16
|
+
}
|
|
17
|
+
type HeadingProps = HeadingDisplayProps | HeadingStandardProps;
|
|
18
|
+
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
2
2
|
export type TPopoverRootProps = React.ComponentPropsWithoutRef<typeof RadixPopover.Root>;
|
|
3
|
-
export type TPopoverTriggerProps =
|
|
4
|
-
variant?: '
|
|
5
|
-
}
|
|
3
|
+
export type TPopoverTriggerProps = {
|
|
4
|
+
variant?: 'dark' | 'light';
|
|
5
|
+
} & React.ComponentPropsWithoutRef<typeof RadixPopover.Trigger>;
|
|
6
6
|
export type TPopoverContentProps = React.ComponentPropsWithoutRef<typeof RadixPopover.Content>;
|
|
7
7
|
export declare const Popover: {
|
|
8
8
|
Content: ({ children, ...rest }: TPopoverContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,13 +10,13 @@ export type TNativeRadioGroupRootProps = {
|
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
label: string;
|
|
14
|
-
name: string;
|
|
15
|
-
variant?: 'cards' | 'circle';
|
|
16
13
|
error?: {
|
|
17
14
|
message?: string;
|
|
18
15
|
};
|
|
16
|
+
label: string;
|
|
17
|
+
name: string;
|
|
19
18
|
onChange: (value: string) => void;
|
|
19
|
+
variant?: 'cards' | 'circle';
|
|
20
20
|
} & RadixRadioGroup.RadioGroupProps;
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
@@ -31,9 +31,9 @@ export declare const RadioGroup: {
|
|
|
31
31
|
Root: <T extends FieldValues>({ children, className, disabled, label, name, variant, ...props }: TRadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
};
|
|
33
33
|
export declare const NativeRadioGroup: {
|
|
34
|
-
|
|
34
|
+
Indicator: ({ className, ...props }: RadixRadioGroup.RadioGroupIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
Item: ({ children, className, variant, ...props }: {
|
|
36
36
|
variant?: "cards" | "circle";
|
|
37
37
|
} & RadixRadioGroup.RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
|
|
38
|
+
Root: ({ children, className, disabled, error, label, name, onChange, variant, ...props }: TNativeRadioGroupRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Text } from '.';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Text>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Text>;
|
|
7
|
+
export declare const Playground: Story;
|
|
8
|
+
export declare const KitchenSink: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type BodyVariant = 'body-lg' | 'body-md' | 'body-sm' | 'body-xl' | 'body-xs';
|
|
4
|
+
export type FunctionalVariant = 'button-md' | 'button-sm' | 'helper' | 'input-regular' | 'input-semi-bold' | 'label' | 'overline' | 'tag';
|
|
5
|
+
export type TextVariant = BodyVariant | FunctionalVariant;
|
|
6
|
+
export type TextWeight = 'bold' | 'medium' | 'regular';
|
|
7
|
+
type BaseTextProps<C extends React.ElementType> = {
|
|
8
|
+
as?: C;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
} & React.ComponentPropsWithoutRef<C>;
|
|
12
|
+
type BodyProps<C extends React.ElementType> = {
|
|
13
|
+
variant?: BodyVariant;
|
|
14
|
+
weight?: TextWeight;
|
|
15
|
+
} & BaseTextProps<C>;
|
|
16
|
+
type FunctionalProps<C extends React.ElementType> = {
|
|
17
|
+
variant: FunctionalVariant;
|
|
18
|
+
weight?: never;
|
|
19
|
+
} & BaseTextProps<C>;
|
|
20
|
+
type TextProps<C extends React.ElementType> = BodyProps<C> | FunctionalProps<C>;
|
|
21
|
+
export declare const Text: <C extends React.ElementType = "p">(props: TextProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
1
3
|
export type TLegacyMarketingText = 'marketing-large-light' | 'marketing-large-regular' | 'marketing-large-semi-bold' | 'marketing-medium-light' | 'marketing-medium-regular' | 'marketing-medium-semi-bold' | 'marketing-quote-light' | 'marketing-quote-regular' | 'marketing-quote-semi-bold' | 'marketing-small-light' | 'marketing-small-regular' | 'marketing-small-semi-bold' | 'marketing-tag-light' | 'marketing-tag-regular' | 'marketing-tag-semi-bold' | 'marketing-text-light' | 'marketing-text-regular' | 'marketing-text-semi-bold';
|
|
2
4
|
export type TLegacyMarketingHeading = 'marketing-heading-1' | 'marketing-heading-2' | 'marketing-heading-3' | 'marketing-heading-4' | 'marketing-heading-5' | 'marketing-heading-6' | 'marketing-heading-7';
|
|
3
5
|
export type TLegacyMarketingFooter = 'footer-regular' | 'footer-semi-bold';
|
|
@@ -9,4 +11,10 @@ export type TTypographyProps<C extends React.ElementType = 'p'> = {
|
|
|
9
11
|
className?: string;
|
|
10
12
|
variant?: TTypographyVariants;
|
|
11
13
|
} & React.ComponentPropsWithoutRef<C>;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated This component is being retired in favor of strictly typed primitives.
|
|
16
|
+
*
|
|
17
|
+
* - For Headings (H1-H6), please use `<Heading />`.
|
|
18
|
+
* - For body text, labels, or spans, please use `<Text />`.
|
|
19
|
+
*/
|
|
12
20
|
export declare const Typography: <C extends React.ElementType = "p">({ as, children, className, variant, ...rest }: TTypographyProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,8 @@ export * from './ComboBox';
|
|
|
9
9
|
export * from './DatePicker';
|
|
10
10
|
export * from './Disclosure';
|
|
11
11
|
export * from './Form';
|
|
12
|
+
export * from './Heading';
|
|
13
|
+
export * from './HorizontalRule';
|
|
12
14
|
export * from './Icon';
|
|
13
15
|
export * from './Link';
|
|
14
16
|
export * from './Loading';
|
|
@@ -25,10 +27,10 @@ export * from './Skeleton';
|
|
|
25
27
|
export * from './Table';
|
|
26
28
|
export * from './Tabs';
|
|
27
29
|
export * from './Tag';
|
|
30
|
+
export * from './Text';
|
|
28
31
|
export * from './TextField';
|
|
29
32
|
export * from './Toast';
|
|
30
33
|
export * from './Toggle';
|
|
31
34
|
export * from './Tooltip';
|
|
32
35
|
export * from './Typography';
|
|
33
36
|
export * from './Wrapper';
|
|
34
|
-
export * from './HorizontalRule';
|