@petnow/ui 3.0.4 → 4.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 (73) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/index.d.ts +23 -12
  3. package/dist/index.es.js +4068 -15074
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.umd.js +57 -48
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/jest.setup.d.ts +0 -0
  8. package/dist/src/components/ui/button.d.ts +9 -0
  9. package/dist/src/components/ui/dialog.d.ts +13 -0
  10. package/dist/src/components/{mobile → v0}/tabs/Tabs.d.ts +1 -1
  11. package/dist/src/components/v1/badge/Badge.d.ts +15 -0
  12. package/dist/src/components/v1/badge/Badge.stories.d.ts +10 -0
  13. package/dist/src/components/v1/chip/Chip.d.ts +11 -0
  14. package/dist/src/components/v1/chip/Chip.stories.d.ts +10 -0
  15. package/dist/src/components/v1/cta-button/CTAButton.d.ts +15 -0
  16. package/dist/src/components/v1/cta-button/CTAButton.stories.d.ts +11 -0
  17. package/dist/src/components/v1/icons/action/CancelFilledIcon.d.ts +3 -0
  18. package/dist/src/components/v1/icons/action/CancelIcon.d.ts +3 -0
  19. package/dist/src/components/v1/icons/action/ChevronDownIcon.d.ts +3 -0
  20. package/dist/src/components/v1/icons/action/ChevronLeftIcon.d.ts +3 -0
  21. package/dist/src/components/v1/icons/action/ChevronRightIcon.d.ts +3 -0
  22. package/dist/src/components/v1/icons/action/ChevronUpIcon.d.ts +3 -0
  23. package/dist/src/components/v1/icons/action/FilterIcon.d.ts +3 -0
  24. package/dist/src/components/v1/icons/action/RetryIcon.d.ts +3 -0
  25. package/dist/src/components/v1/icons/action/SortingIcon.d.ts +3 -0
  26. package/dist/src/components/v1/icons/static/CloseIcon.d.ts +3 -0
  27. package/dist/src/components/v1/icons/static/DeleteIcon.d.ts +3 -0
  28. package/dist/src/components/v1/icons/static/RecentIcon.d.ts +3 -0
  29. package/dist/src/components/v1/icons/static/ReportIcon.d.ts +3 -0
  30. package/dist/src/components/v1/icons/static/ShieldDoneIcon.d.ts +3 -0
  31. package/dist/src/components/v1/popup/Popup.d.ts +21 -0
  32. package/dist/src/components/{mobile → v1}/popup/Popup.stories.d.ts +4 -5
  33. package/dist/src/components/v1/text-field/TextField.d.ts +50 -0
  34. package/dist/src/components/v1/text-field/TextField.stories.d.ts +11 -0
  35. package/package.json +18 -8
  36. package/tailwind.css +131 -0
  37. package/dist/src/components/mobile/chip/Chip.d.ts +0 -9
  38. package/dist/src/components/mobile/chip/Chip.stories.d.ts +0 -6
  39. package/dist/src/components/mobile/popup/Popup.d.ts +0 -33
  40. package/dist/src/components/pc/autocomplete/LabeledAutocomplete.d.ts +0 -17
  41. package/dist/src/components/pc/autocomplete/LabeledAutocomplete.stories.d.ts +0 -8
  42. package/dist/src/components/pc/card/AccordionCard.d.ts +0 -9
  43. package/dist/src/components/pc/card/AccordionCard.stories.d.ts +0 -7
  44. package/dist/src/components/pc/checkbox/LabeledCheckbox.d.ts +0 -8
  45. package/dist/src/components/pc/checkbox/LabeledCheckbox.stories.d.ts +0 -6
  46. package/dist/src/components/pc/datepicker/LabeledDatepicker.d.ts +0 -9
  47. package/dist/src/components/pc/datepicker/LabeledDatepicker.stories.d.ts +0 -6
  48. package/dist/src/components/pc/input/LabeledAddressInput.d.ts +0 -13
  49. package/dist/src/components/pc/input/LabeledAddressInput.stories.d.ts +0 -6
  50. package/dist/src/components/pc/input/LabeledInput.d.ts +0 -15
  51. package/dist/src/components/pc/input/LabeledInput.stories.d.ts +0 -6
  52. package/dist/src/components/pc/select/LabeledSelect.d.ts +0 -19
  53. package/dist/src/components/pc/select/LabeledSelect.stories.d.ts +0 -7
  54. package/dist/test/LabeledCheckbox.test.d.ts +0 -1
  55. package/dist/test/LabeledDatepicker.test.d.ts +0 -1
  56. package/dist/test/LabeledInput.test.d.ts +0 -1
  57. package/dist/test/LabeledSelect.test.d.ts +0 -1
  58. /package/dist/src/components/{mobile → v0}/checkbox/Checkbox.d.ts +0 -0
  59. /package/dist/src/components/{mobile → v0}/checkbox/Checkbox.stories.d.ts +0 -0
  60. /package/dist/src/components/{mobile → v0}/radio/Radio.d.ts +0 -0
  61. /package/dist/src/components/{mobile → v0}/radio/Radio.stories.d.ts +0 -0
  62. /package/dist/src/components/{mobile → v0}/tabs/Tabs.stories.d.ts +0 -0
  63. /package/dist/src/components/{mobile → v0}/toggle/Toggle.d.ts +0 -0
  64. /package/dist/src/components/{mobile → v0}/toggle/Toggle.stories.d.ts +0 -0
  65. /package/dist/test/{Checkbox.test.d.ts → v0/Checkbox.test.d.ts} +0 -0
  66. /package/dist/test/{Radio.test.d.ts → v0/Radio.test.d.ts} +0 -0
  67. /package/dist/test/{Tabs.test.d.ts → v0/Tabs.test.d.ts} +0 -0
  68. /package/dist/test/{Toggle.test.d.ts → v0/Toggle.test.d.ts} +0 -0
  69. /package/dist/test/{AccordionCard.test.d.ts → v1/Badge.test.d.ts} +0 -0
  70. /package/dist/test/{Chip.test.d.ts → v1/CTAButton.test.d.ts} +0 -0
  71. /package/dist/test/{LabeledAddressInput.test.d.ts → v1/Chip.test.d.ts} +0 -0
  72. /package/dist/test/{Popup.test.d.ts → v1/Popup.test.d.ts} +0 -0
  73. /package/dist/test/{LabeledAutocomplete.test.d.ts → v1/TextField.test.d.ts} +0 -0
File without changes
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const buttonVariants: (props?: ({
3
+ variant?: "link" | "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
4
+ size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Button, buttonVariants };
@@ -0,0 +1,13 @@
1
+ import { Dialog as DialogPrimitive } from 'radix-ui';
2
+ import * as React from "react";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
12
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
13
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -7,7 +7,7 @@ interface TabItem {
7
7
  interface Props<T extends TabItem> {
8
8
  tabList: Readonly<T[]>;
9
9
  isCuratedcontent?: true;
10
- unswipeableContent?: JSX.Element;
10
+ unswipeableContent?: ReactNode;
11
11
  defaultIndex?: number;
12
12
  onTabChange?: (index: number) => void;
13
13
  disabled?: boolean;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ type BadgeType = "filled" | "outlined" | "tinted";
3
+ type BadgeColor = "orange" | "blue" | "red" | "green" | "neutral";
4
+ type BadgeSize = "small" | "large";
5
+ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
6
+ label: string;
7
+ icon?: React.ComponentType<{
8
+ className?: string;
9
+ }>;
10
+ type?: BadgeType;
11
+ color?: BadgeColor;
12
+ size?: BadgeSize;
13
+ }
14
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
15
+ export { Badge };
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Badge } from './Badge';
3
+ declare const meta: Meta<typeof Badge>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Badge>;
6
+ export declare const Default: Story;
7
+ export declare const TintedWithIcon: Story;
8
+ export declare const OutlinedSmall: Story;
9
+ export declare const TypeColorShowcase: Story;
10
+ export declare const SizeShowcase: Story;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ export interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
3
+ label: string;
4
+ icon?: React.ComponentType<{
5
+ className?: string;
6
+ }>;
7
+ selected?: boolean;
8
+ onPress?: () => void;
9
+ }
10
+ declare const Chip: ({ className, label, icon: Icon, selected, disabled, onPress, onClick, type, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
11
+ export { Chip };
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Chip } from './Chip';
3
+ declare const meta: Meta<typeof Chip>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Chip>;
6
+ export declare const Default: Story;
7
+ export declare const Selected: Story;
8
+ export declare const WithIcon: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const SelectableGroup: Story;
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const ctaButtonVariants: (props?: ({
4
+ hierarchy?: "primary" | "secondary" | "tertiary" | null | undefined;
5
+ size?: "small" | "large" | "medium" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface CTAButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, VariantProps<typeof ctaButtonVariants> {
8
+ label: string | React.ReactNode;
9
+ icon?: React.ComponentType<{
10
+ className?: string;
11
+ }>;
12
+ className?: string;
13
+ }
14
+ declare const CTAButton: React.ForwardRefExoticComponent<CTAButtonProps & React.RefAttributes<HTMLButtonElement>>;
15
+ export { CTAButton };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CTAButton } from './CTAButton';
3
+ declare const meta: Meta<typeof CTAButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CTAButton>;
6
+ export declare const Default: Story;
7
+ export declare const SecondaryMedium: Story;
8
+ export declare const TertiarySmallWithIcon: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const HierarchyShowcase: Story;
11
+ export declare const SizeShowcase: Story;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const CancelFilledIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { CancelFilledIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const CancelIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { CancelIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const ChevronDownIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { ChevronDownIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const ChevronLeftIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { ChevronLeftIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const ChevronRightIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { ChevronRightIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const ChevronUpIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { ChevronUpIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const FilterIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { FilterIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const RetryIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { RetryIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const SortingIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { SortingIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const CloseIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { CloseIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const DeleteIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { DeleteIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const RecentIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { RecentIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const ReportIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { ReportIcon };
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+ declare const ShieldDoneIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export { ShieldDoneIcon };
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ type PopupAction = {
3
+ label: string | React.ReactNode;
4
+ icon?: React.ComponentType<{
5
+ className?: string;
6
+ }>;
7
+ onClick?: () => void;
8
+ };
9
+ export interface PopupProps {
10
+ isOpen: boolean;
11
+ setIsOpen: (isOpen: boolean) => void;
12
+ title?: string | React.ReactNode;
13
+ description?: string | React.ReactNode;
14
+ content?: React.ReactNode;
15
+ confirm?: PopupAction;
16
+ cancel?: PopupAction;
17
+ preventEasyClose?: boolean;
18
+ className?: string;
19
+ }
20
+ declare const Popup: ({ isOpen, setIsOpen, title, description, content, confirm, cancel, preventEasyClose, className, }: PopupProps) => import("react/jsx-runtime").JSX.Element;
21
+ export { Popup };
@@ -1,12 +1,11 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
- import { default as Popup } from './Popup';
2
+ import { Popup } from './Popup';
3
3
  declare const meta: Meta<typeof Popup>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Popup>;
6
6
  export declare const Default: Story;
7
7
  export declare const OnlyTitle: Story;
8
8
  export declare const OnlyConfirm: Story;
9
- export declare const OnlyTitleAndConfirm: Story;
10
- export declare const OnlyImage: Story;
11
- export declare const DisableOutsideClick: Story;
12
- export declare const DisableConfirmAndCancelBtn: Story;
9
+ export declare const WithCustomContent: Story;
10
+ export declare const PreventEasyClose: Story;
11
+ export declare const DescriptionOnly: Story;
@@ -0,0 +1,50 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ interface TextFieldNormalProps extends Omit<React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, "size"> {
4
+ subtitle?: string;
5
+ isRequired?: boolean;
6
+ assistiveText?: string | React.ReactNode;
7
+ errorText?: string;
8
+ disabled?: boolean;
9
+ multiLine?: boolean;
10
+ className?: string;
11
+ rightElement?: React.ReactNode;
12
+ showCounter?: boolean;
13
+ size?: "large" | "small";
14
+ }
15
+ declare const TextFieldNormal: React.ForwardRefExoticComponent<TextFieldNormalProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
16
+ declare const textFieldSelectVariants: (props?: ({
17
+ size?: "small" | "large" | null | undefined;
18
+ hasError?: boolean | null | undefined;
19
+ disabled?: boolean | null | undefined;
20
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
21
+ interface TextFieldSelectProps extends VariantProps<typeof textFieldSelectVariants> {
22
+ label?: string;
23
+ placeholder: string;
24
+ value?: string;
25
+ isRequired?: boolean;
26
+ disabled?: boolean;
27
+ assistiveText?: string | React.ReactNode;
28
+ errorText?: string;
29
+ onPress?: () => void;
30
+ className?: string;
31
+ size?: "large" | "small";
32
+ }
33
+ declare const TextFieldSelect: ({ label, placeholder, value, isRequired, disabled, assistiveText, errorText, onPress, className, size, }: TextFieldSelectProps) => import("react/jsx-runtime").JSX.Element;
34
+ interface TextFieldWithButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, "size"> {
35
+ subtitle?: string;
36
+ isRequired?: boolean;
37
+ assistiveText?: string | React.ReactNode;
38
+ errorText?: string;
39
+ disabled?: boolean;
40
+ multiLine?: boolean;
41
+ className?: string;
42
+ showCounter?: boolean;
43
+ size?: "large" | "small";
44
+ fieldRightElement?: React.ReactNode;
45
+ buttonText: string;
46
+ onButtonClick: () => void;
47
+ buttonDisabled?: boolean;
48
+ }
49
+ declare const TextFieldWithButton: React.ForwardRefExoticComponent<TextFieldWithButtonProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
50
+ export { TextFieldNormal, TextFieldSelect, TextFieldWithButton };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { TextFieldNormal } from './TextField';
3
+ declare const meta: Meta<typeof TextFieldNormal>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TextFieldNormal>;
6
+ export declare const Normal: Story;
7
+ export declare const NormalWithErrorAndCounter: Story;
8
+ export declare const Multiline: Story;
9
+ export declare const SelectField: Story;
10
+ export declare const SelectFieldSmallError: Story;
11
+ export declare const WithButton: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petnow/ui",
3
- "version": "3.0.4",
3
+ "version": "4.0.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -15,18 +15,22 @@
15
15
  "format:fix": "prettier . --write"
16
16
  },
17
17
  "dependencies": {
18
+ "@fontsource-variable/geist": "^5.2.8",
18
19
  "@headlessui/react": "^2.2.9",
19
20
  "@types/react-swipeable-views": "^0.13.6",
21
+ "class-variance-authority": "^0.7.1",
20
22
  "clsx": "^2.1.1",
21
23
  "date-fns": "^4.1.0",
22
24
  "keen-slider": "^6.8.6",
23
- "react": "^18.2.0",
25
+ "lucide-react": "^0.577.0",
26
+ "radix-ui": "^1.4.3",
24
27
  "react-datepicker": "^8.3.0",
25
28
  "react-daum-postcode": "^3.2.0",
26
- "react-dom": "^18.2.0",
27
29
  "react-icons": "^5.5.0",
28
30
  "react-swipeable-views": "^0.14.1",
29
- "tailwind-merge": "^3.3.1"
31
+ "shadcn": "^4.0.8",
32
+ "tailwind-merge": "^3.3.1",
33
+ "tw-animate-css": "^1.4.0"
30
34
  },
31
35
  "devDependencies": {
32
36
  "@chromatic-com/storybook": "^3.2.7",
@@ -44,8 +48,8 @@
44
48
  "@testing-library/user-event": "^14.6.1",
45
49
  "@types/jest": "^30.0.0",
46
50
  "@types/node": "^24.6.2",
47
- "@types/react": "^18.3.12",
48
- "@types/react-dom": "^18.3.1",
51
+ "@types/react": "^19.0.0",
52
+ "@types/react-dom": "^19.0.0",
49
53
  "@typescript-eslint/eslint-plugin": "^7.18.0",
50
54
  "@typescript-eslint/parser": "^7.18.0",
51
55
  "@vitejs/plugin-react": "^5.0.4",
@@ -61,6 +65,8 @@
61
65
  "postcss": "^8.5.6",
62
66
  "prettier": "^3.6.2",
63
67
  "prettier-plugin-tailwindcss": "^0.6.14",
68
+ "react": "^19.0.0",
69
+ "react-dom": "^19.0.0",
64
70
  "storybook": "^8.5.3",
65
71
  "tailwindcss": "^4.1.14",
66
72
  "ts-jest": "^29.4.4",
@@ -69,13 +75,17 @@
69
75
  "vite": "^6.2.4",
70
76
  "vite-plugin-dts": "^4.5.3"
71
77
  },
78
+ "peerDependencies": {
79
+ "react": "^19.0.0",
80
+ "react-dom": "^19.0.0"
81
+ },
72
82
  "main": "dist/index.es.js",
73
83
  "types": "dist/index.d.ts",
74
84
  "exports": {
75
85
  ".": {
86
+ "types": "./dist/index.d.ts",
76
87
  "import": "./dist/index.es.js",
77
- "require": "./dist/index.umd.js",
78
- "types": "./dist/index.d.ts"
88
+ "require": "./dist/index.umd.js"
79
89
  },
80
90
  "./package.json": "./package.json",
81
91
  "./dist/*": "./dist/*",
package/tailwind.css CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  @import "./petnow-design-system-v1.css";
4
4
 
5
+ @import "tw-animate-css";
6
+
7
+ @import "shadcn/tailwind.css";
8
+
9
+ @import "@fontsource-variable/geist";
10
+
11
+ @custom-variant dark (&:is(.dark *));
12
+
5
13
  @theme {
6
14
  --background-image-gradient-radial: radial-gradient(var(--tw-gradient-stops));
7
15
  --background-image-gradient-conic: conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops));
@@ -154,3 +162,126 @@
154
162
  @apply text-[11px] leading-[16px] font-medium tracking-normal;
155
163
  }
156
164
  }
165
+
166
+ :root {
167
+ --background: oklch(1 0 0);
168
+ --foreground: oklch(0.145 0 0);
169
+ --card: oklch(1 0 0);
170
+ --card-foreground: oklch(0.145 0 0);
171
+ --popover: oklch(1 0 0);
172
+ --popover-foreground: oklch(0.145 0 0);
173
+ --primary: oklch(0.205 0 0);
174
+ --primary-foreground: oklch(0.985 0 0);
175
+ --secondary: oklch(0.97 0 0);
176
+ --secondary-foreground: oklch(0.205 0 0);
177
+ --muted: oklch(0.97 0 0);
178
+ --muted-foreground: oklch(0.556 0 0);
179
+ --accent: oklch(0.97 0 0);
180
+ --accent-foreground: oklch(0.205 0 0);
181
+ --destructive: oklch(0.577 0.245 27.325);
182
+ --border: oklch(0.922 0 0);
183
+ --input: oklch(0.922 0 0);
184
+ --ring: oklch(0.708 0 0);
185
+ --chart-1: oklch(0.809 0.105 251.813);
186
+ --chart-2: oklch(0.623 0.214 259.815);
187
+ --chart-3: oklch(0.546 0.245 262.881);
188
+ --chart-4: oklch(0.488 0.243 264.376);
189
+ --chart-5: oklch(0.424 0.199 265.638);
190
+ --radius: 0.625rem;
191
+ --sidebar: oklch(0.985 0 0);
192
+ --sidebar-foreground: oklch(0.145 0 0);
193
+ --sidebar-primary: oklch(0.205 0 0);
194
+ --sidebar-primary-foreground: oklch(0.985 0 0);
195
+ --sidebar-accent: oklch(0.97 0 0);
196
+ --sidebar-accent-foreground: oklch(0.205 0 0);
197
+ --sidebar-border: oklch(0.922 0 0);
198
+ --sidebar-ring: oklch(0.708 0 0);
199
+ }
200
+
201
+ .dark {
202
+ --background: oklch(0.145 0 0);
203
+ --foreground: oklch(0.985 0 0);
204
+ --card: oklch(0.205 0 0);
205
+ --card-foreground: oklch(0.985 0 0);
206
+ --popover: oklch(0.205 0 0);
207
+ --popover-foreground: oklch(0.985 0 0);
208
+ --primary: oklch(0.922 0 0);
209
+ --primary-foreground: oklch(0.205 0 0);
210
+ --secondary: oklch(0.269 0 0);
211
+ --secondary-foreground: oklch(0.985 0 0);
212
+ --muted: oklch(0.269 0 0);
213
+ --muted-foreground: oklch(0.708 0 0);
214
+ --accent: oklch(0.269 0 0);
215
+ --accent-foreground: oklch(0.985 0 0);
216
+ --destructive: oklch(0.704 0.191 22.216);
217
+ --border: oklch(1 0 0 / 10%);
218
+ --input: oklch(1 0 0 / 15%);
219
+ --ring: oklch(0.556 0 0);
220
+ --chart-1: oklch(0.809 0.105 251.813);
221
+ --chart-2: oklch(0.623 0.214 259.815);
222
+ --chart-3: oklch(0.546 0.245 262.881);
223
+ --chart-4: oklch(0.488 0.243 264.376);
224
+ --chart-5: oklch(0.424 0.199 265.638);
225
+ --sidebar: oklch(0.205 0 0);
226
+ --sidebar-foreground: oklch(0.985 0 0);
227
+ --sidebar-primary: oklch(0.488 0.243 264.376);
228
+ --sidebar-primary-foreground: oklch(0.985 0 0);
229
+ --sidebar-accent: oklch(0.269 0 0);
230
+ --sidebar-accent-foreground: oklch(0.985 0 0);
231
+ --sidebar-border: oklch(1 0 0 / 10%);
232
+ --sidebar-ring: oklch(0.556 0 0);
233
+ }
234
+
235
+ @theme inline {
236
+ --font-sans: "Geist Variable", sans-serif;
237
+ --color-sidebar-ring: var(--sidebar-ring);
238
+ --color-sidebar-border: var(--sidebar-border);
239
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
240
+ --color-sidebar-accent: var(--sidebar-accent);
241
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
242
+ --color-sidebar-primary: var(--sidebar-primary);
243
+ --color-sidebar-foreground: var(--sidebar-foreground);
244
+ --color-sidebar: var(--sidebar);
245
+ --color-chart-5: var(--chart-5);
246
+ --color-chart-4: var(--chart-4);
247
+ --color-chart-3: var(--chart-3);
248
+ --color-chart-2: var(--chart-2);
249
+ --color-chart-1: var(--chart-1);
250
+ --color-ring: var(--ring);
251
+ --color-input: var(--input);
252
+ --color-border: var(--border);
253
+ --color-destructive: var(--destructive);
254
+ --color-accent-foreground: var(--accent-foreground);
255
+ --color-accent: var(--accent);
256
+ --color-muted-foreground: var(--muted-foreground);
257
+ --color-muted: var(--muted);
258
+ --color-secondary-foreground: var(--secondary-foreground);
259
+ --color-secondary: var(--secondary);
260
+ --color-primary-foreground: var(--primary-foreground);
261
+ --color-primary: var(--primary);
262
+ --color-popover-foreground: var(--popover-foreground);
263
+ --color-popover: var(--popover);
264
+ --color-card-foreground: var(--card-foreground);
265
+ --color-card: var(--card);
266
+ --color-foreground: var(--foreground);
267
+ --color-background: var(--background);
268
+ --radius-sm: calc(var(--radius) * 0.6);
269
+ --radius-md: calc(var(--radius) * 0.8);
270
+ --radius-lg: var(--radius);
271
+ --radius-xl: calc(var(--radius) * 1.4);
272
+ --radius-2xl: calc(var(--radius) * 1.8);
273
+ --radius-3xl: calc(var(--radius) * 2.2);
274
+ --radius-4xl: calc(var(--radius) * 2.6);
275
+ }
276
+
277
+ @layer base {
278
+ * {
279
+ @apply border-border outline-ring/50;
280
+ }
281
+ body {
282
+ @apply bg-background text-foreground;
283
+ }
284
+ html {
285
+ @apply font-sans;
286
+ }
287
+ }
@@ -1,9 +0,0 @@
1
- interface Props {
2
- className?: string;
3
- text: string;
4
- isSelected: boolean;
5
- onClick: () => void;
6
- disabled?: boolean;
7
- }
8
- declare const Chip: ({ className, text, isSelected, onClick, disabled }: Props) => import("react/jsx-runtime").JSX.Element;
9
- export default Chip;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { default as Chip } from './Chip';
3
- declare const meta: Meta<typeof Chip>;
4
- export default meta;
5
- type Story = StoryObj<typeof Chip>;
6
- export declare const Default: Story;
@@ -1,33 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface Props {
3
- isOpen: boolean;
4
- setIsOpen: (newState: boolean) => void;
5
- onClose?: () => void;
6
- title?: string | ReactNode;
7
- image?: Image;
8
- description?: string | ReactNode;
9
- confirm?: Confirm;
10
- cancel?: Cancel;
11
- disableOutsideClick?: boolean;
12
- className?: {
13
- popup?: string;
14
- image?: string;
15
- title?: string;
16
- description?: string;
17
- };
18
- }
19
- interface Image {
20
- url: string;
21
- alt: string;
22
- }
23
- interface Confirm {
24
- text: string;
25
- onClick: () => void;
26
- disabled?: boolean;
27
- }
28
- interface Cancel {
29
- text: string;
30
- disabled?: boolean;
31
- }
32
- declare const Popup: (props: Props) => import("react/jsx-runtime").JSX.Element;
33
- export default Popup;
@@ -1,17 +0,0 @@
1
- interface AutocompleteOption {
2
- name: string | undefined;
3
- value: string | boolean | number | undefined;
4
- [key: string]: unknown;
5
- }
6
- interface Props {
7
- label: string;
8
- placeholder: string;
9
- value: string | undefined;
10
- options: AutocompleteOption[];
11
- onChange: (value: AutocompleteOption) => void;
12
- disabled?: boolean;
13
- helperText?: string;
14
- disableDebounce?: true;
15
- }
16
- declare const LabeledAutocomplete: ({ label, placeholder, value, options, onChange, disabled, helperText, disableDebounce, }: Props) => import("react/jsx-runtime").JSX.Element;
17
- export default LabeledAutocomplete;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { default as LabeledAutocomplete } from './LabeledAutocomplete.tsx';
3
- declare const meta: Meta<typeof LabeledAutocomplete>;
4
- export default meta;
5
- type Story = StoryObj<typeof LabeledAutocomplete>;
6
- export declare const Default: Story;
7
- export declare const DisableDebounce: Story;
8
- export declare const Disabled: Story;
@@ -1,9 +0,0 @@
1
- import { JSXElementConstructor, ReactElement, ReactNode } from 'react';
2
- interface Props {
3
- title: string;
4
- description: string | ReactElement<string | JSXElementConstructor<unknown>> | ReactNode;
5
- titleTextClassName?: string;
6
- descriptionTextClassName?: string;
7
- }
8
- declare const AccordionCard: ({ title, description, titleTextClassName, descriptionTextClassName }: Props) => import("react/jsx-runtime").JSX.Element;
9
- export default AccordionCard;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { default as AccordionCard } from './AccordionCard.tsx';
3
- declare const meta: Meta<typeof AccordionCard>;
4
- export default meta;
5
- type Story = StoryObj<typeof AccordionCard>;
6
- export declare const Default: Story;
7
- export declare const AdditionalClassName: Story;
@@ -1,8 +0,0 @@
1
- interface Props {
2
- checked?: boolean;
3
- label?: string;
4
- onChange: (newValue: boolean) => void;
5
- termImageUrl: string;
6
- }
7
- declare const LabeledCheckbox: ({ checked, label, onChange, termImageUrl }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export default LabeledCheckbox;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { default as Checkbox } from './LabeledCheckbox.tsx';
3
- declare const meta: Meta<typeof Checkbox>;
4
- export default meta;
5
- type Story = StoryObj<typeof Checkbox>;
6
- export declare const Default: Story;
@@ -1,9 +0,0 @@
1
- interface Props {
2
- label: string;
3
- placeholder: string;
4
- value: string;
5
- onChange: (date: Date) => void;
6
- helperText?: string;
7
- }
8
- declare const LabeledDatepicker: ({ label, placeholder, value, onChange, helperText }: Props) => import("react/jsx-runtime").JSX.Element;
9
- export default LabeledDatepicker;