ownui-system 0.1.10 → 1.0.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 (110) hide show
  1. package/README.md +49 -67
  2. package/dist/components/Accordion/Accordion.stories.d.ts +3 -2
  3. package/dist/components/Accordion/accordion-body.d.ts +0 -1
  4. package/dist/components/Accordion/accordion-context.d.ts +2 -3
  5. package/dist/components/Accordion/accordion-header.d.ts +0 -1
  6. package/dist/components/Accordion/accordion-item.d.ts +0 -1
  7. package/dist/components/Accordion/accordion.d.ts +4 -4
  8. package/dist/components/Accordion/index.d.ts +2 -1
  9. package/dist/components/Badge/Badge.stories.d.ts +3 -2
  10. package/dist/components/Badge/Badge.style.d.ts +7 -26
  11. package/dist/components/Badge/index.d.ts +3 -4
  12. package/dist/components/BottomSheet/BottomSheet.stories.d.ts +2 -1
  13. package/dist/components/BottomSheet/bottomsheet-body.d.ts +0 -1
  14. package/dist/components/BottomSheet/bottomsheet-contents.d.ts +2 -1
  15. package/dist/components/BottomSheet/bottomsheet-context.d.ts +2 -3
  16. package/dist/components/BottomSheet/bottomsheet-header.d.ts +2 -1
  17. package/dist/components/BottomSheet/bottomsheet.d.ts +0 -1
  18. package/dist/components/BottomSheet/index.d.ts +1 -1
  19. package/dist/components/Button/Button.stories.d.ts +36 -41
  20. package/dist/components/Button/Button.style.d.ts +8 -26
  21. package/dist/components/Button/index.d.ts +6 -6
  22. package/dist/components/Checkbox/Checkbox.stories.d.ts +13 -27
  23. package/dist/components/Checkbox/index.d.ts +1 -2
  24. package/dist/components/Dimmed/index.d.ts +2 -1
  25. package/dist/components/Divider/Divider.stories.d.ts +3 -2
  26. package/dist/components/Drawer/Drawer.stories.d.ts +3 -2
  27. package/dist/components/Drawer/drawer-content.d.ts +0 -1
  28. package/dist/components/Drawer/drawer-context.d.ts +7 -6
  29. package/dist/components/Drawer/drawer.d.ts +4 -4
  30. package/dist/components/Drawer/hook/useDrawer.d.ts +3 -2
  31. package/dist/components/Drawer/index.d.ts +2 -1
  32. package/dist/components/Dropdown/Dropdown.stories.d.ts +3 -2
  33. package/dist/components/Dropdown/dropdown-body.d.ts +0 -1
  34. package/dist/components/Dropdown/dropdown-content.d.ts +0 -1
  35. package/dist/components/Dropdown/dropdown-context.d.ts +4 -4
  36. package/dist/components/Dropdown/dropdown-header.d.ts +2 -1
  37. package/dist/components/Dropdown/dropdown-item.d.ts +0 -1
  38. package/dist/components/Dropdown/dropdown-trigger.d.ts +0 -1
  39. package/dist/components/Dropdown/dropdown.d.ts +12 -8
  40. package/dist/components/Dropdown/index.d.ts +4 -1
  41. package/dist/components/InfiniteSlider/InfiniteSlider-item.d.ts +2 -1
  42. package/dist/components/InfiniteSlider/InfiniteSlider.d.ts +3 -3
  43. package/dist/components/InfiniteSlider/InfiniteSlider.stories.d.ts +3 -2
  44. package/dist/components/InfiniteSlider/index.d.ts +2 -1
  45. package/dist/components/Input/Input.stories.d.ts +28 -35
  46. package/dist/components/Input/Input.style.d.ts +8 -7
  47. package/dist/components/Input/index.d.ts +5 -4
  48. package/dist/components/Modal/Modal.stories.d.ts +2 -1
  49. package/dist/components/Modal/hook/useModal.d.ts +4 -4
  50. package/dist/components/Modal/index.d.ts +8 -5
  51. package/dist/components/Modal/modal-body.d.ts +2 -1
  52. package/dist/components/Modal/modal-content.d.ts +0 -1
  53. package/dist/components/Modal/modal-context.d.ts +6 -5
  54. package/dist/components/Modal/modal-footer.d.ts +2 -1
  55. package/dist/components/Modal/modal-header.d.ts +2 -1
  56. package/dist/components/Modal/modal.d.ts +12 -2
  57. package/dist/components/Pagination/Pagination.stories.d.ts +3 -2
  58. package/dist/components/Popover/Popover.stories.d.ts +2 -1
  59. package/dist/components/Popover/hook/usePopover.d.ts +4 -3
  60. package/dist/components/Popover/index.d.ts +3 -3
  61. package/dist/components/Popover/popover-content.d.ts +0 -1
  62. package/dist/components/Popover/popover-context.d.ts +7 -6
  63. package/dist/components/Popover/popover-trigger.d.ts +3 -2
  64. package/dist/components/Popover/popover.d.ts +4 -3
  65. package/dist/components/Radio/Radio.stories.d.ts +28 -12
  66. package/dist/components/Radio/index.d.ts +2 -4
  67. package/dist/components/Radio/radio-context.d.ts +10 -8
  68. package/dist/components/Radio/radio-group.d.ts +8 -3
  69. package/dist/components/Radio/radio-item.d.ts +6 -7
  70. package/dist/components/Radio/radio-style.d.ts +4 -4
  71. package/dist/components/Skeleton/index.d.ts +2 -1
  72. package/dist/components/SnackBar/SnackBar.stories.d.ts +3 -2
  73. package/dist/components/SnackBar/index.d.ts +3 -3
  74. package/dist/components/SnackBar/snackbar-context.d.ts +2 -3
  75. package/dist/components/SnackBar/snackbar-provider.d.ts +2 -1
  76. package/dist/components/SnackBar/snackbar.d.ts +2 -1
  77. package/dist/components/Switch/Switch.stories.d.ts +3 -2
  78. package/dist/components/Switch/index.d.ts +0 -1
  79. package/dist/components/Tab/Tab.stories.d.ts +12 -15
  80. package/dist/components/Tab/index.d.ts +3 -3
  81. package/dist/components/Tab/tab-context.d.ts +3 -3
  82. package/dist/components/Tab/tab-group.d.ts +3 -3
  83. package/dist/components/Tab/tab-item.d.ts +2 -3
  84. package/dist/components/Text/Text.stories.d.ts +16 -0
  85. package/dist/components/Text/index.d.ts +2 -1
  86. package/dist/components/TextArea/TextArea.stories.d.ts +24 -31
  87. package/dist/components/TextArea/TextArea.style.d.ts +8 -6
  88. package/dist/components/TextArea/index.d.ts +5 -4
  89. package/dist/components/TextField/TextField.stories.d.ts +15 -27
  90. package/dist/components/TextField/index.d.ts +3 -2
  91. package/dist/components/Tooltip/Tooltip.stories.d.ts +3 -2
  92. package/dist/components/Tooltip/index.d.ts +3 -2
  93. package/dist/components/index.d.ts +26 -24
  94. package/dist/components/shared/Flex.d.ts +2 -1
  95. package/dist/components/shared/Icon/Icon.stories.d.ts +20 -0
  96. package/dist/components/shared/Icon/index.d.ts +11 -0
  97. package/dist/components/shared/Portal.d.ts +0 -1
  98. package/dist/components/shared/SwitchCase.d.ts +0 -1
  99. package/dist/hooks/index.d.ts +4 -4
  100. package/dist/hooks/useDomRef.d.ts +2 -2
  101. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -2
  102. package/dist/hooks/useTimeout.d.ts +2 -1
  103. package/dist/index.d.ts +5 -5
  104. package/dist/ownui-system.js +30515 -6299
  105. package/dist/ownui-system.js.map +1 -1
  106. package/dist/ownui-system.umd.cjs +7756 -28
  107. package/dist/ownui-system.umd.cjs.map +1 -1
  108. package/dist/styles/util.d.ts +2 -1
  109. package/dist/types/index.d.ts +1 -0
  110. package/package.json +21 -13
package/README.md CHANGED
@@ -1,113 +1,95 @@
1
- # ownui-design-system
1
+ # ownui-system
2
2
 
3
- - react, tailwindcss
3
+ A React-based UI component library built with Tailwind CSS and Framer Motion.
4
4
 
5
- ## Getting stated
5
+ ## Getting Started
6
6
 
7
- ### setup tailwind css
7
+ ### 1. Install the package
8
8
 
9
- - install tailwind css
9
+ Install the `ownui-system` package along with its peer dependencies.
10
10
 
11
+ ```bash
12
+ npm install ownui-system
13
+ # or
14
+ yarn add ownui-system
15
+ # or
16
+ pnpm add ownui-system
11
17
  ```
12
- # or yarn or pnpm
13
- npm i autoprefixer postcss tailwindcss
18
+
19
+ ### 2. Setup Tailwind CSS
20
+
21
+ If your project doesn't have Tailwind CSS set up yet, install the necessary dependencies:
22
+
23
+ ```bash
24
+ npm install -D autoprefixer postcss tailwindcss
14
25
  npx tailwindcss init -p
15
26
  ```
16
27
 
17
- - configure tailwind.config
28
+ ### 3. Configure `tailwind.config.js`
18
29
 
19
- ```
30
+ You need to include the library's paths in your `content` array so Tailwind can process the styles. Also, include the `colors` and `twTypographyMap` plugins provided by `ownui-system`.
31
+
32
+ ```javascript
20
33
  const plugin = require("tailwindcss/plugin");
21
34
  const { colors, twTypographyMap } = require("ownui-system");
22
35
 
23
-
24
36
  /** @type {import('tailwindcss').Config} */
25
37
  export default {
26
38
  content: [
27
39
  "./index.html",
28
40
  "./src/**/*.{js,ts,jsx,tsx}",
41
+ // Important: Include ownui-system dist to purge classes correctly
42
+ "./node_modules/ownui-system/dist/**/*.{js,jsx,ts,tsx}"
29
43
  ],
30
44
  theme: {
31
- colors,
45
+ colors, // Injects ownui-system default colors
32
46
  extend: {},
33
47
  },
34
48
  plugins: [
35
49
  plugin(function ({ addUtilities }) {
36
- // Add your custom styles here
50
+ // Add custom typography utilities
37
51
  addUtilities(twTypographyMap, ["responsive", "hover"]);
38
52
  }),
39
53
  ],
40
54
  };
41
-
42
55
  ```
43
56
 
44
- - add tailwind css to css file
57
+ ### 4. Add Tailwind CSS Directives
45
58
 
46
- ```
59
+ Add the basic Tailwind directives to your global CSS file (e.g., `index.css` or `global.css`):
60
+
61
+ ```css
47
62
  @tailwind base;
48
63
  @tailwind components;
49
64
  @tailwind utilities;
50
65
  ```
51
66
 
52
- ### install package
53
-
54
- ```
55
- npm i ownui-system
56
- #
57
- yarn add ownui-system
58
- #
59
- pnpm add ownui-system
60
- ```
61
-
62
- - include "./node\*modules/ownui-system/dist/\*\*/\_.{js,jsx,ts,tsx}" to tailwind.config content
63
-
64
- ```
65
- /** @type {import('tailwindcss').Config} */
66
- export default {
67
- content: [
68
- "./index.html",
69
- "./src/**/*.{js,ts,jsx,tsx}",
70
- "./node_modules/ownui-system/dist/**/*.{js,jsx,ts,tsx}"
71
- ],
72
- theme: {
73
- colors,
74
- extend: {},
75
- },
76
- plugins: [
77
- plugin(function ({ addUtilities }) {
78
- // Add your custom styles here
79
- addUtilities(twTypographyMap, ["responsive", "hover"]);
80
- }),
81
- ],
82
- };
83
-
84
- ```
85
-
86
- ## UI Components
67
+ ## Available UI Components
87
68
 
69
+ - [x] Accordion
70
+ - [x] Badge
71
+ - [x] BottomSheet
88
72
  - [x] Button
89
- - [x] Input
90
- - [x] TextField
91
- - [x] Spacing
92
- - [x] Flex
93
- - [x] Skeleton
94
- - [x] TextArea
95
- - [x] Text
73
+ - [x] Checkbox
96
74
  - [x] Dimmed
97
- - [x] Modal
98
75
  - [x] Divider
99
- - [x] PopOver
100
- - [x] Tab / TabGroup
101
- - [x] Badge
102
- - [x] Checkbox
103
76
  - [x] Drawer
104
77
  - [x] Dropdown
105
- - [x] Accordion
106
- - [x] BottomSheet
78
+ - [x] Flex
79
+ - [x] Icon
80
+ - [x] InfiniteSlider
81
+ - [x] Input
82
+ - [x] Modal
107
83
  - [x] Pagination
108
- - [x] Switch
84
+ - [x] PopOver
109
85
  - [x] Radio / RadioGroup
110
- - [x] InfiniteSlider
111
- - [x] Tooltip
86
+ - [x] Skeleton
112
87
  - [x] SnackBar
88
+ - [x] Spacing
89
+ - [x] Switch
90
+ - [x] Tab / TabGroup
91
+ - [x] Text
92
+ - [x] TextArea
93
+ - [x] TextField
94
+ - [x] Tooltip
113
95
  - [ ] Step
@@ -1,5 +1,6 @@
1
- import Accordion from '.';
2
- import type { StoryObj } from "@storybook/react";
1
+ import { default as Accordion } from '.';
2
+ import { StoryObj } from '@storybook/react';
3
+
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof Accordion;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AccordionBodyProps {
3
2
  children: React.ReactNode;
4
3
  isAfterOpen: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type AccordionContextValue = {
3
2
  selected?: string | number;
4
3
  defaultSelected?: string | number;
@@ -9,8 +8,8 @@ type AccordionContextValue = {
9
8
  };
10
9
  declare function useContext(): AccordionContextValue;
11
10
  export declare function useAccordionContext(): {
12
- AccordionProvider: import("react").Provider<AccordionContextValue | undefined>;
11
+ AccordionProvider: import('react').Provider<AccordionContextValue | undefined>;
13
12
  useContext: typeof useContext;
14
- Context: import("react").Context<AccordionContextValue | undefined>;
13
+ Context: import('react').Context<AccordionContextValue | undefined>;
15
14
  };
16
15
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AccordionHeaderProps {
3
2
  isOpen: boolean;
4
3
  children: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AccordionItemProps {
3
2
  header: React.ReactNode;
4
3
  headerIcon?: React.ReactNode;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- import AccordionBody from "./accordion-body";
3
- import AccordionHeader from "./accordion-header";
4
- import AccordionItem from "./accordion-item";
1
+ import { default as AccordionBody } from './accordion-body';
2
+ import { default as AccordionHeader } from './accordion-header';
3
+ import { default as AccordionItem } from './accordion-item';
4
+
5
5
  interface AccordionProps {
6
6
  defaultSelected?: string | number;
7
7
  type?: "single" | "multi";
@@ -1,2 +1,3 @@
1
- import Accordion from "./accordion";
1
+ import { default as Accordion } from './accordion';
2
+
2
3
  export default Accordion;
@@ -1,5 +1,6 @@
1
- import Badge from '.';
2
- import type { StoryObj } from "@storybook/react";
1
+ import { default as Badge } from '.';
2
+ import { StoryObj } from '@storybook/react';
3
+
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof Badge;
@@ -1,26 +1,7 @@
1
- export declare const baseStyle = "flex items-center justify-center absolute z-[1] text-center";
2
- export declare const badgeSizeMap: {
3
- small: string;
4
- medium: string;
5
- large: string;
6
- };
7
- export declare const badgePlacementMap: {
8
- small: {
9
- "top-left": string;
10
- "top-right": string;
11
- "bottom-left": string;
12
- "bottom-right": string;
13
- };
14
- medium: {
15
- "top-left": string;
16
- "top-right": string;
17
- "bottom-left": string;
18
- "bottom-right": string;
19
- };
20
- large: {
21
- "top-left": string;
22
- "top-right": string;
23
- "bottom-left": string;
24
- "bottom-right": string;
25
- };
26
- };
1
+ import { VariantProps } from 'class-variance-authority';
2
+
3
+ export declare const badgeVariants: (props?: ({
4
+ size?: "small" | "large" | "medium" | null | undefined;
5
+ placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export type BadgeVariants = VariantProps<typeof badgeVariants>;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
- interface BadgeProps {
1
+ import { BadgeVariants } from './Badge.style';
2
+
3
+ export interface BadgeProps extends BadgeVariants {
3
4
  content?: React.ReactNode;
4
5
  color: string;
5
6
  children?: React.ReactNode;
6
- size?: "large" | "medium" | "small";
7
- placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
8
7
  className?: string;
9
8
  radius?: string | number;
10
9
  isVisible?: boolean;
@@ -1,5 +1,6 @@
1
1
  import { BottomSheet } from '.';
2
- import type { StoryObj } from "@storybook/react";
2
+ import { StoryObj } from '@storybook/react';
3
+
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof BottomSheet;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface BottomSheetBodyProps {
3
2
  children: React.ReactNode;
4
3
  className?: string;
@@ -1,3 +1,4 @@
1
- import { PropsWithChildren } from "react";
1
+ import { PropsWithChildren } from 'react';
2
+
2
3
  declare function BottomSheetContents({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
3
4
  export default BottomSheetContents;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type BottomSheetContextValue = {
3
2
  isOpen: boolean;
4
3
  zIndex: number;
@@ -9,8 +8,8 @@ type BottomSheetContextValue = {
9
8
  };
10
9
  declare function useContext(): BottomSheetContextValue;
11
10
  export declare function useBottomSheetContext(): {
12
- BottomSheetProvider: import("react").Provider<BottomSheetContextValue | undefined>;
11
+ BottomSheetProvider: import('react').Provider<BottomSheetContextValue | undefined>;
13
12
  useContext: typeof useContext;
14
- Context: import("react").Context<BottomSheetContextValue | undefined>;
13
+ Context: import('react').Context<BottomSheetContextValue | undefined>;
15
14
  };
16
15
  export {};
@@ -1,3 +1,4 @@
1
- import { type ComponentProps } from "react";
1
+ import { ComponentProps } from 'react';
2
+
2
3
  declare function BottomSheetHeader({ onPointerDown }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
4
  export default BottomSheetHeader;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface BottomSheetProps {
3
2
  isOpen: boolean;
4
3
  removeDimmer?: boolean;
@@ -1 +1 @@
1
- export { default as BottomSheet } from "./bottomsheet";
1
+ export { default as BottomSheet } from './bottomsheet';
@@ -1,43 +1,38 @@
1
- /// <reference types="react" />
2
- import type { StoryObj } from "@storybook/react";
3
- declare const meta: {
4
- title: string;
5
- component: import("react").ForwardRefExoticComponent<Omit<import('.').ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
6
- parameters: {
7
- layout: string;
8
- };
9
- argTypes: {
10
- type: {
11
- if: {
12
- arg: string;
13
- exists: true;
14
- };
15
- };
16
- children: {
17
- control: {
18
- type: string;
19
- };
20
- };
21
- disabled: {
22
- control: {
23
- type: string;
24
- };
25
- };
26
- startContent: {
27
- if: {
28
- arg: string;
29
- exists: true;
30
- };
31
- };
32
- endContent: {
33
- if: {
34
- arg: string;
35
- exists: true;
36
- };
37
- };
38
- };
39
- tags: string[];
40
- };
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Button } from './index';
3
+
4
+ /**
5
+ * `Button` component is a flexible button component that supports various sizes, variants, and icon placements.
6
+ */
7
+ declare const meta: Meta<typeof Button>;
41
8
  export default meta;
42
- type Story = StoryObj<typeof meta>;
9
+ type Story = StoryObj<typeof Button>;
43
10
  export declare const Default: Story;
11
+ /**
12
+ * Various visual variants of the button.
13
+ */
14
+ export declare const Variants: Story;
15
+ /**
16
+ * All available sizes.
17
+ */
18
+ export declare const Sizes: Story;
19
+ /**
20
+ * Buttons with icons on the left or right.
21
+ */
22
+ export declare const WithIcons: Story;
23
+ /**
24
+ * Icon-only button variants.
25
+ */
26
+ export declare const OnlyIcon: Story;
27
+ /**
28
+ * The button in a disabled state.
29
+ */
30
+ export declare const Disabled: Story;
31
+ /**
32
+ * A full-width button.
33
+ */
34
+ export declare const FullWidth: Story;
35
+ /**
36
+ * Example of controlling typography externally via `className`.
37
+ */
38
+ export declare const ExternalTypography: Story;
@@ -1,29 +1,11 @@
1
- export type BUTTON_SIZE_TYPE = keyof typeof buttonSizeMap;
2
- export declare const baseStyle = "flex items-center justify-center h-fit transition-all duration-100 ease-linear w-[var(--width)] border-[1px] bg-[var(--bg-color)] border-[var(--border-color)] border-solid disabled:opacity-30";
3
- export declare const buttonSizeMap: {
4
- normal: {
5
- xsmall: string;
6
- small: string;
7
- medium: string;
8
- large: string;
9
- xlarge: string;
10
- };
11
- icon: {
12
- xsmall: string;
13
- small: string;
14
- medium: string;
15
- large: string;
16
- xlarge: string;
17
- };
18
- };
19
- export declare const buttonTextSize: {
20
- xsmall: string;
21
- small: string;
22
- medium: string;
23
- large: string;
24
- xlarge: string;
25
- };
26
- export declare function buttonHoverStyle(variant: "normal" | "line" | "text"): "hover:text-white hover:bg-[var(--border-color)] disabled:bg-[var(--bg-color)] disabled:text-current" | "hover:opacity-[0.9] hover:brightness-[0.9] disabled:bg-[var(--bg-color)]";
1
+ import { VariantProps } from 'class-variance-authority';
2
+
3
+ export declare const buttonVariants: (props?: ({
4
+ size?: "small" | "large" | "medium" | "xsmall" | "xlarge" | null | undefined;
5
+ variant?: "line" | "text" | "normal" | null | undefined;
6
+ isOnlyIcon?: boolean | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export type ButtonVariants = VariantProps<typeof buttonVariants>;
27
9
  export declare function buttonTypeMap(color: string): {
28
10
  normal: {
29
11
  "--bg-color": string;
@@ -1,12 +1,12 @@
1
- import { type ComponentProps, type ReactNode } from "react";
2
- export interface ButtonProps extends ComponentProps<"button"> {
3
- size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
4
- variant?: "normal" | "line" | "text";
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { ButtonVariants } from './Button.style';
3
+
4
+ export interface ButtonProps extends Omit<ComponentProps<"button">, "color">, ButtonVariants {
5
+ color?: string;
5
6
  width?: string;
6
7
  className?: string;
7
8
  startContent?: ReactNode;
8
9
  endContent?: ReactNode;
9
- isOnlyIcon?: boolean;
10
10
  }
11
- declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
+ declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
12
12
  export default Button;
@@ -1,30 +1,16 @@
1
- /// <reference types="react" />
2
- import type { StoryObj } from "@storybook/react";
3
- declare const meta: {
4
- title: string;
5
- component: import("react").ForwardRefExoticComponent<import('.').CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
6
- parameters: {
7
- layout: string;
8
- };
9
- argTypes: {
10
- isChecked: {
11
- if: {
12
- arg: string;
13
- exists: true;
14
- };
15
- };
16
- radius: {
17
- control: string;
18
- options: string[];
19
- };
20
- size: {
21
- control: string;
22
- options: string[];
23
- };
24
- };
25
- };
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Checkbox } from './index';
3
+
4
+ /**
5
+ * `Checkbox` component for multi-selection.
6
+ */
7
+ declare const meta: Meta<typeof Checkbox>;
26
8
  export default meta;
27
- type Story = StoryObj<typeof meta>;
9
+ type Story = StoryObj<typeof Checkbox>;
28
10
  export declare const Default: Story;
11
+ export declare const Sizes: Story;
12
+ export declare const Colors: Story;
13
+ export declare const Radius: Story;
14
+ export declare const States: Story;
15
+ export declare const CustomIcon: Story;
29
16
  export declare const Controlled: Story;
30
- export declare const Disabled: Story;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface CheckboxProps {
3
2
  size?: "small" | "medium" | "large";
4
3
  isChecked?: boolean;
@@ -13,5 +12,5 @@ export interface CheckboxProps {
13
12
  name?: string;
14
13
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
14
  }
16
- declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
15
+ declare const Checkbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
17
16
  export default Checkbox;
@@ -1,4 +1,5 @@
1
- import { type CSSProperties, type PropsWithChildren } from "react";
1
+ import { CSSProperties, PropsWithChildren } from 'react';
2
+
2
3
  interface DimmedProps extends PropsWithChildren {
3
4
  className?: string;
4
5
  opacity?: CSSProperties["opacity"];
@@ -1,5 +1,6 @@
1
- import Divider from '.';
2
- import type { StoryObj } from "@storybook/react";
1
+ import { default as Divider } from '.';
2
+ import { StoryObj } from '@storybook/react';
3
+
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof Divider;
@@ -1,5 +1,6 @@
1
- import type { StoryObj } from "@storybook/react";
2
- import Drawer from "./drawer";
1
+ import { StoryObj } from '@storybook/react';
2
+ import { default as Drawer } from './drawer';
3
+
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof Drawer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface DrawerContentProps {
3
2
  children: React.ReactNode | ((onClose: () => void) => React.ReactNode);
4
3
  className?: string;
@@ -1,7 +1,8 @@
1
- import type { ComponentPosition } from '../../types';
2
- import { HTMLMotionProps } from "framer-motion";
3
- import { ComponentProps } from "react";
4
- import Drawer from "./drawer";
1
+ import { ComponentPosition } from '../../types';
2
+ import { HTMLMotionProps } from 'framer-motion';
3
+ import { ComponentProps } from 'react';
4
+ import { default as Drawer } from './drawer';
5
+
5
6
  type DrawerProps = ComponentProps<typeof Drawer>;
6
7
  type DrawerContextValue = {
7
8
  isOpen: DrawerProps["isOpen"];
@@ -13,8 +14,8 @@ type DrawerContextValue = {
13
14
  };
14
15
  declare function useContext(): DrawerContextValue;
15
16
  export declare function useDrawerContext(): {
16
- DrawerProvider: import("react").Provider<DrawerContextValue | undefined>;
17
+ DrawerProvider: import('react').Provider<DrawerContextValue | undefined>;
17
18
  useContext: typeof useContext;
18
- Context: import("react").Context<DrawerContextValue | undefined>;
19
+ Context: import('react').Context<DrawerContextValue | undefined>;
19
20
  };
20
21
  export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- import type { ComponentPosition } from '../../types';
3
- import { type HTMLMotionProps } from "framer-motion";
4
- import DrawerContent from "./drawer-content";
1
+ import { ComponentPosition } from '../../types';
2
+ import { HTMLMotionProps } from 'framer-motion';
3
+ import { default as DrawerContent } from './drawer-content';
4
+
5
5
  export type DrawerProps = {
6
6
  onOpenChange: (isOpen: boolean) => void;
7
7
  isOpen: boolean;
@@ -1,4 +1,5 @@
1
- import { HTMLMotionProps } from "framer-motion";
1
+ import { HTMLMotionProps } from 'framer-motion';
2
+
2
3
  type UseDrawerProps = {
3
4
  isOpen: boolean;
4
5
  placement?: "top" | "bottom" | "left" | "right";
@@ -12,7 +13,7 @@ type UseDrawerProps = {
12
13
  declare function useDrawer({ isOpen, placement, motionVariant, zIndex, drawerId, onOpen, onClose, onOpenChange, }: UseDrawerProps): {
13
14
  isOpen: boolean;
14
15
  placement: "bottom" | "left" | "right" | "top" | undefined;
15
- motionVariant: import("framer-motion").Variants | undefined;
16
+ motionVariant: import('framer-motion').Variants | undefined;
16
17
  zIndex: number | undefined;
17
18
  drawerId: string;
18
19
  onOpenChange: (isOpen: boolean) => void;
@@ -1,2 +1,3 @@
1
- import Drawer from "./drawer";
1
+ import { default as Drawer } from './drawer';
2
+
2
3
  export default Drawer;
@@ -1,5 +1,6 @@
1
- import type { StoryObj } from "@storybook/react";
2
- import Dropdown from "./dropdown";
1
+ import { StoryObj } from '@storybook/react';
2
+ import { default as Dropdown } from './dropdown';
3
+
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: typeof Dropdown;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type DropdownBodyProps = {
3
2
  children: React.ReactNode;
4
3
  className?: string;