@nusameta/design-system 0.0.4 → 0.0.6

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.
@@ -1,11 +1,12 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { ButtonProps as AriaButtonProps } from 'react-aria-components';
3
+ import * as React from "react";
3
4
  declare const buttonVariants: (props?: ({
4
5
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
6
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
8
  interface ButtonProps extends AriaButtonProps, VariantProps<typeof buttonVariants> {
8
9
  }
9
- declare const Button: ({ className, variant, size, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
10
11
  export { Button, buttonVariants };
11
12
  export type { ButtonProps };
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ className, variant, size, ...props }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: import('react').ForwardRefExoticComponent<import('../Button/Button').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -0,0 +1,12 @@
1
+ import { CheckboxGroupProps as AriaCheckboxGroupProps, ValidationResult as AriaValidationResult, CheckboxProps as AriaCheckboxProps } from 'react-aria-components';
2
+ import * as React from "react";
3
+ declare const CheckboxGroup: (props: AriaCheckboxGroupProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
4
+ declare const Checkbox: ({ className, children, ...props }: AriaCheckboxProps) => import("react/jsx-runtime").JSX.Element;
5
+ interface JollyCheckboxGroupProps extends AriaCheckboxGroupProps {
6
+ label?: string;
7
+ description?: string;
8
+ errorMessage?: string | ((validation: AriaValidationResult) => string);
9
+ }
10
+ declare function JollyCheckboxGroup({ label, description, errorMessage, className, children, ...props }: JollyCheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
11
+ export { Checkbox, CheckboxGroup, JollyCheckboxGroup };
12
+ export type { JollyCheckboxGroupProps };
@@ -0,0 +1,13 @@
1
+ import { ButtonProps as AriaButtonProps, GroupProps as AriaGroupProps, InputProps as AriaInputProps, SearchFieldProps as AriaSearchFieldProps, ValidationResult as AriaValidationResult } from 'react-aria-components';
2
+ declare function SearchField({ className, ...props }: AriaSearchFieldProps): import("react/jsx-runtime").JSX.Element;
3
+ declare function SearchFieldInput({ className, ...props }: AriaInputProps): import("react/jsx-runtime").JSX.Element;
4
+ declare function SearchFieldGroup({ className, ...props }: AriaGroupProps): import("react/jsx-runtime").JSX.Element;
5
+ declare function SearchFieldClear({ className, ...props }: AriaButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ interface JollySearchFieldProps extends AriaSearchFieldProps {
7
+ label?: string;
8
+ description?: string;
9
+ errorMessage?: string | ((validation: AriaValidationResult) => string);
10
+ }
11
+ declare function JollySearchField({ label, description, className, errorMessage, ...props }: JollySearchFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ export { SearchField, SearchFieldGroup, SearchFieldInput, SearchFieldClear, JollySearchField, };
13
+ export type { JollySearchFieldProps };
@@ -0,0 +1,42 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { JollySearchField } from './Searchfield';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof JollySearchField;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ label: {
12
+ control: "text";
13
+ description: string;
14
+ };
15
+ description: {
16
+ control: "text";
17
+ description: string;
18
+ };
19
+ errorMessage: {
20
+ control: "text";
21
+ description: string;
22
+ };
23
+ isDisabled: {
24
+ control: "boolean";
25
+ description: string;
26
+ };
27
+ isRequired: {
28
+ control: "boolean";
29
+ description: string;
30
+ };
31
+ };
32
+ };
33
+ export default meta;
34
+ type Story = StoryObj<typeof meta>;
35
+ export declare const Default: Story;
36
+ export declare const WithPlaceholder: Story;
37
+ export declare const Disabled: Story;
38
+ export declare const Required: Story;
39
+ export declare const WithError: Story;
40
+ export declare const WithHelperText: Story;
41
+ export declare const CustomSearchField: Story;
42
+ export declare const Compact: Story;
@@ -0,0 +1,13 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { FieldErrorProps as AriaFieldErrorProps, GroupProps as AriaGroupProps, LabelProps as AriaLabelProps, TextProps as AriaTextProps } from 'react-aria-components';
3
+ declare const labelVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
4
+ declare const Label: ({ className, ...props }: AriaLabelProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare function FormDescription({ className, ...props }: AriaTextProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function FieldError({ className, ...props }: AriaFieldErrorProps): import("react/jsx-runtime").JSX.Element;
7
+ declare const fieldGroupVariants: (props?: ({
8
+ variant?: "default" | "ghost" | null | undefined;
9
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ interface GroupProps extends AriaGroupProps, VariantProps<typeof fieldGroupVariants> {
11
+ }
12
+ declare function FieldGroup({ className, variant, ...props }: GroupProps): import("react/jsx-runtime").JSX.Element;
13
+ export { Label, labelVariants, FieldGroup, fieldGroupVariants, FieldError, FormDescription, };
@@ -0,0 +1,18 @@
1
+ import { InputProps as AriaInputProps, TextAreaProps as AriaTextAreaProps, TextFieldProps as AriaTextFieldProps, ValidationResult as AriaValidationResult } from 'react-aria-components';
2
+ import * as React from "react";
3
+ declare const TextField: (props: AriaTextFieldProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
4
+ export interface InputProps extends AriaInputProps {
5
+ className?: AriaInputProps["className"];
6
+ }
7
+ declare const Input: ({ className, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const TextArea: ({ className, ...props }: AriaTextAreaProps) => import("react/jsx-runtime").JSX.Element;
9
+ interface WrappedFieldProps extends AriaTextFieldProps {
10
+ label?: string;
11
+ description?: string;
12
+ errorMessage?: string | ((validation: AriaValidationResult) => string);
13
+ textArea?: boolean;
14
+ placeholder?: string;
15
+ }
16
+ declare function WrappedField({ label, description, errorMessage, textArea, className, placeholder, ...props }: WrappedFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export { Input, TextField, WrappedField, TextArea };
18
+ export type { WrappedFieldProps };
@@ -0,0 +1,53 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { WrappedField } from './Textfield';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof WrappedField;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ label: {
12
+ control: "text";
13
+ description: string;
14
+ };
15
+ description: {
16
+ control: "text";
17
+ description: string;
18
+ };
19
+ errorMessage: {
20
+ control: "text";
21
+ description: string;
22
+ };
23
+ isDisabled: {
24
+ control: "boolean";
25
+ description: string;
26
+ };
27
+ isRequired: {
28
+ control: "boolean";
29
+ description: string;
30
+ };
31
+ type: {
32
+ control: "text";
33
+ description: string;
34
+ };
35
+ textArea: {
36
+ control: "boolean";
37
+ description: string;
38
+ };
39
+ };
40
+ };
41
+ export default meta;
42
+ type Story = StoryObj<typeof meta>;
43
+ export declare const Default: Story;
44
+ export declare const Email: Story;
45
+ export declare const Password: Story;
46
+ export declare const Disabled: Story;
47
+ export declare const Required: Story;
48
+ export declare const WithError: Story;
49
+ export declare const WithHelperText: Story;
50
+ export declare const WithTextArea: Story;
51
+ export declare const TextAreaDisabled: Story;
52
+ export declare const NumberInput: Story;
53
+ export declare const SearchInput: Story;
@@ -0,0 +1,5 @@
1
+ import { DialogProps as AriaDialogProps, DialogTrigger as AriaDialogTrigger, PopoverProps as AriaPopoverProps } from 'react-aria-components';
2
+ declare const PopoverTrigger: typeof AriaDialogTrigger;
3
+ declare const Popover: ({ className, offset, ...props }: AriaPopoverProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare function PopoverDialog({ className, ...props }: AriaDialogProps): import("react/jsx-runtime").JSX.Element;
5
+ export { Popover, PopoverTrigger, PopoverDialog };
@@ -0,0 +1,14 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Popover } from './Popover';
3
+ declare const meta: Meta<typeof Popover>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithTitle: Story;
8
+ export declare const WithActions: Story;
9
+ export declare const TopPlacement: Story;
10
+ export declare const BottomPlacement: Story;
11
+ export declare const LeftPlacement: Story;
12
+ export declare const RightPlacement: Story;
13
+ export declare const WithForm: Story;
14
+ export declare const CustomOffset: Story;