@nusameta/design-system 0.0.6 → 1.0.0-beta.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 (26) hide show
  1. package/dist/components/{Atoms/Button → button}/Button.d.ts +1 -1
  2. package/dist/components/button/Button.stories.d.ts +15 -0
  3. package/dist/components/{Atoms/checkbox → checkbox}/Checkbox.d.ts +4 -4
  4. package/dist/components/checkbox/Checkbox.stories.d.ts +12 -0
  5. package/dist/components/list-box/List-box.d.ts +7 -0
  6. package/dist/components/list-box/List-box.stories.d.ts +12 -0
  7. package/dist/components/{Atoms/searchfield → searchfield}/Searchfield.d.ts +4 -4
  8. package/dist/components/{Atoms/searchfield → searchfield}/Searchfield.stories.d.ts +2 -2
  9. package/dist/components/select/Select.d.ts +21 -0
  10. package/dist/components/select/Select.stories.d.ts +12 -0
  11. package/dist/components/table/Table.d.ts +12 -0
  12. package/dist/components/table/Table.stories.d.ts +9 -0
  13. package/dist/index.cjs.js +38 -12
  14. package/dist/index.cjs.js.map +1 -1
  15. package/dist/index.css +1 -1
  16. package/dist/index.d.ts +14 -8
  17. package/dist/index.es.js +12261 -4203
  18. package/dist/index.es.js.map +1 -1
  19. package/dist/reset.css +1 -1
  20. package/package.json +14 -8
  21. package/dist/components/Atoms/Button/Button.stories.d.ts +0 -41
  22. /package/dist/components/{molecules/popover → popover}/Popover.d.ts +0 -0
  23. /package/dist/components/{molecules/popover → popover}/Popover.stories.d.ts +0 -0
  24. /package/dist/components/{Atoms/textfield → textfield}/Field.d.ts +0 -0
  25. /package/dist/components/{Atoms/textfield → textfield}/Textfield.d.ts +0 -0
  26. /package/dist/components/{Atoms/textfield → textfield}/Textfield.stories.d.ts +0 -0
@@ -3,7 +3,7 @@ import { ButtonProps as AriaButtonProps } from 'react-aria-components';
3
3
  import * as React from "react";
4
4
  declare const buttonVariants: (props?: ({
5
5
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
6
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ size?: "default" | "sm" | "md" | "lg" | "icon" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  interface ButtonProps extends AriaButtonProps, VariantProps<typeof buttonVariants> {
9
9
  }
@@ -0,0 +1,15 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Button } from './Button';
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Button>;
6
+ export declare const Default: Story;
7
+ export declare const Destructive: Story;
8
+ export declare const Outline: Story;
9
+ export declare const Secondary: Story;
10
+ export declare const Ghost: Story;
11
+ export declare const Link: Story;
12
+ export declare const Small: Story;
13
+ export declare const Large: Story;
14
+ export declare const Disabled: Story;
15
+ export declare const AllVariants: Story;
@@ -2,11 +2,11 @@ import { CheckboxGroupProps as AriaCheckboxGroupProps, ValidationResult as AriaV
2
2
  import * as React from "react";
3
3
  declare const CheckboxGroup: (props: AriaCheckboxGroupProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
4
4
  declare const Checkbox: ({ className, children, ...props }: AriaCheckboxProps) => import("react/jsx-runtime").JSX.Element;
5
- interface JollyCheckboxGroupProps extends AriaCheckboxGroupProps {
5
+ interface ComposedCheckboxGroupProps extends AriaCheckboxGroupProps {
6
6
  label?: string;
7
7
  description?: string;
8
8
  errorMessage?: string | ((validation: AriaValidationResult) => string);
9
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 };
10
+ declare function ComposedCheckboxGroup({ label, description, errorMessage, className, children, ...props }: ComposedCheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
11
+ export { Checkbox, CheckboxGroup, ComposedCheckboxGroup };
12
+ export type { ComposedCheckboxGroupProps };
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Checkbox } from './Checkbox';
3
+ declare const meta: Meta<typeof Checkbox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Checkbox>;
6
+ export declare const Default: Story;
7
+ export declare const Checked: Story;
8
+ export declare const Disabled: Story;
9
+ export declare const DisabledChecked: Story;
10
+ export declare const Indeterminate: Story;
11
+ export declare const WithoutLabel: Story;
12
+ export declare const AllStates: Story;
@@ -0,0 +1,7 @@
1
+ import { Collection as AriaCollection, Header as AriaHeader, ListBoxItemProps as AriaListBoxItemProps, ListBoxProps as AriaListBoxProps } from 'react-aria-components';
2
+ declare const ListBoxSection: <T extends object>(props: import('react-aria-components').SectionProps<T> & React.RefAttributes<HTMLElement>) => import('react').ReactElement | null;
3
+ declare const ListBoxCollection: typeof AriaCollection;
4
+ declare function ListBox<T extends object>({ className, ...props }: AriaListBoxProps<T>): import("react/jsx-runtime").JSX.Element;
5
+ declare const ListBoxItem: <T extends object>({ className, children, ...props }: AriaListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
6
+ declare function ListBoxHeader({ className, ...props }: React.ComponentProps<typeof AriaHeader>): import("react/jsx-runtime").JSX.Element;
7
+ export { ListBox, ListBoxItem, ListBoxHeader, ListBoxSection, ListBoxCollection, };
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ListBox } from './List-box';
3
+ declare const meta: Meta<typeof ListBox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ListBox>;
6
+ export declare const Default: Story;
7
+ export declare const WithSections: Story;
8
+ export declare const SingleSelection: Story;
9
+ export declare const MultipleSelection: Story;
10
+ export declare const DisabledItems: Story;
11
+ export declare const Empty: Story;
12
+ export declare const Dynamic: Story;
@@ -3,11 +3,11 @@ declare function SearchField({ className, ...props }: AriaSearchFieldProps): imp
3
3
  declare function SearchFieldInput({ className, ...props }: AriaInputProps): import("react/jsx-runtime").JSX.Element;
4
4
  declare function SearchFieldGroup({ className, ...props }: AriaGroupProps): import("react/jsx-runtime").JSX.Element;
5
5
  declare function SearchFieldClear({ className, ...props }: AriaButtonProps): import("react/jsx-runtime").JSX.Element;
6
- interface JollySearchFieldProps extends AriaSearchFieldProps {
6
+ interface ComposedSearchFieldProps extends AriaSearchFieldProps {
7
7
  label?: string;
8
8
  description?: string;
9
9
  errorMessage?: string | ((validation: AriaValidationResult) => string);
10
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 };
11
+ declare function ComposedSearchField({ label, description, className, errorMessage, ...props }: ComposedSearchFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ export { SearchField, SearchFieldGroup, SearchFieldInput, SearchFieldClear, ComposedSearchField, };
13
+ export type { ComposedSearchFieldProps };
@@ -1,8 +1,8 @@
1
1
  import { StoryObj } from '@storybook/react';
2
- import { JollySearchField } from './Searchfield';
2
+ import { ComposedSearchField } from './Searchfield';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: typeof JollySearchField;
5
+ component: typeof ComposedSearchField;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
@@ -0,0 +1,21 @@
1
+ import { ButtonProps as AriaButtonProps, ListBoxProps as AriaListBoxProps, PopoverProps as AriaPopoverProps, SelectProps as AriaSelectProps, SelectValueProps as AriaSelectValueProps, ValidationResult as AriaValidationResult } from 'react-aria-components';
2
+ import { ListBoxHeader } from '../list-box/List-box';
3
+ declare const Select: <T extends object = {}, M extends "multiple" | "single" = "single">(props: AriaSelectProps<T, M> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
4
+ declare const SelectItem: <T extends object>({ className, children, ...props }: import('react-aria-components').ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const SelectHeader: typeof ListBoxHeader;
6
+ declare const SelectSection: <T extends object>(props: import('react-aria-components').SectionProps<T> & React.RefAttributes<HTMLElement>) => import('react').ReactElement | null;
7
+ declare const SelectCollection: typeof import('react-aria-components').Collection;
8
+ declare const SelectValue: <T extends object>({ className, ...props }: AriaSelectValueProps<T>) => import("react/jsx-runtime").JSX.Element;
9
+ declare const SelectTrigger: ({ className, children, ...props }: AriaButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const SelectPopover: ({ className, ...props }: AriaPopoverProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const SelectListBox: <T extends object>({ className, ...props }: AriaListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
12
+ interface ComposedSelectProps<T extends object> extends Omit<AriaSelectProps<T>, "children"> {
13
+ label?: string;
14
+ description?: string;
15
+ errorMessage?: string | ((validation: AriaValidationResult) => string);
16
+ items?: Iterable<T>;
17
+ children: React.ReactNode | ((item: T) => React.ReactNode);
18
+ }
19
+ declare function ComposedSelect<T extends object>({ label, description, errorMessage, children, className, items, ...props }: ComposedSelectProps<T>): import("react/jsx-runtime").JSX.Element;
20
+ export { Select, SelectValue, SelectTrigger, SelectItem, SelectPopover, SelectHeader, SelectListBox, SelectSection, SelectCollection, ComposedSelect, };
21
+ export type { ComposedSelectProps };
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Select } from './Select';
3
+ declare const meta: Meta<typeof Select>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Select>;
6
+ export declare const Default: Story;
7
+ export declare const WithDefaultValue: Story;
8
+ export declare const Disabled: Story;
9
+ export declare const WithDisabledItems: Story;
10
+ export declare const Controlled: Story;
11
+ export declare const ComposedSelectExample: Story;
12
+ export declare const WithValidation: Story;
@@ -0,0 +1,12 @@
1
+ import { ColumnProps as AriaColumnProps, CellProps, ResizableTableContainerProps, RowProps, TableBodyProps, TableHeaderProps, TableProps } from 'react-aria-components';
2
+ declare const ResizableTableContainer: import('react').ForwardRefExoticComponent<ResizableTableContainerProps & import('react').RefAttributes<HTMLDivElement>>;
3
+ declare const Table: ({ className, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const TableHeader: <T extends object>({ className, ...props }: TableHeaderProps<T>) => import("react/jsx-runtime").JSX.Element;
5
+ export interface ColumnProps extends AriaColumnProps {
6
+ isResizable?: boolean;
7
+ }
8
+ declare const Column: ({ className, children, ...props }: ColumnProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const TableBody: <T extends object>({ className, ...props }: TableBodyProps<T>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const Row: <T extends object>({ className, ...props }: RowProps<T>) => import("react/jsx-runtime").JSX.Element;
11
+ declare const Cell: ({ className, ...props }: CellProps) => import("react/jsx-runtime").JSX.Element;
12
+ export { Table, TableHeader, Column, TableBody, Row, Cell, ResizableTableContainer, };
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Table } from './Table';
3
+ declare const meta: Meta<typeof Table>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Table>;
6
+ export declare const Default: Story;
7
+ export declare const Sortable: Story;
8
+ export declare const Selection: Story;
9
+ export declare const Resizable: Story;