react-beauty-calendar 1.0.8 → 1.1.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.
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import type * as React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  declare const buttonVariants: (props?: ({
3
3
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
4
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
4
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
7
  asChild?: boolean;
@@ -4,7 +4,8 @@ interface BookingCardProps {
4
4
  slotData: BookingDateAndTime;
5
5
  customClasses?: string;
6
6
  heightStyleTransformer?: string;
7
+ layerCount?: number;
7
8
  onClick?: () => void;
8
9
  }
9
- declare const BookingCard: ({ booking, slotData, onClick, heightStyleTransformer, customClasses, }: BookingCardProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const BookingCard: ({ booking, slotData, layerCount, onClick, heightStyleTransformer, customClasses, }: BookingCardProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export default BookingCard;
@@ -4,7 +4,6 @@ export interface HourWithActionsProps {
4
4
  ref: Ref<HourWithActionsRef>;
5
5
  }
6
6
  export interface HourWithActionsRef {
7
- setDisabledHour: () => void;
8
7
  setActivateHour: () => void;
9
8
  }
10
9
  declare const HourWithActions: ({ hour, ref }: HourWithActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -9,7 +9,6 @@ interface SlotTriggerProps {
9
9
  slotPosition: TimesBlock;
10
10
  disabledCss: string;
11
11
  events: SlotEvents;
12
- border?: boolean;
13
12
  children?: ReactNode;
14
13
  actualTimerIndicatorChildren?: ReactNode;
15
14
  ref: Ref<SlotTriggerForwardRef>;
@@ -19,5 +18,5 @@ export interface SlotTriggerForwardRef {
19
18
  closeEvent: () => void;
20
19
  onOpenCloseChange: (status: boolean) => void;
21
20
  }
22
- declare const SlotTrigger: ({ slotData, slotPosition, disabledCss, events, border, actualTimerIndicatorChildren, children, ref, }: SlotTriggerProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const SlotTrigger: ({ slotData, slotPosition, disabledCss, events, actualTimerIndicatorChildren, children, ref, }: SlotTriggerProps) => import("react/jsx-runtime").JSX.Element;
23
22
  export default SlotTrigger;
@@ -1,6 +1,5 @@
1
1
  interface HeaderTodayActionProps {
2
- mobileLayout: boolean;
3
2
  onClick: () => void;
4
3
  }
5
- declare const HeaderTodayAction: ({ mobileLayout, onClick, }: HeaderTodayActionProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const HeaderTodayAction: ({ onClick }: HeaderTodayActionProps) => import("react/jsx-runtime").JSX.Element;
6
5
  export default HeaderTodayAction;
@@ -5,8 +5,6 @@ interface CardProps {
5
5
  slotData: BookingDateAndTime;
6
6
  ref?: Ref<CardRef>;
7
7
  }
8
- export declare const INITIAL_HEIGHT = 600;
9
- export declare const MIN_DIFF_TIME_THRESHOLD = 15;
10
8
  export interface CardRef {
11
9
  bookingId: string;
12
10
  }
@@ -1,8 +1,8 @@
1
1
  import { BlocksTimeStructure } from '../EmptySlot';
2
2
  interface ActualTimerIndicatorProps {
3
- tailwindColor: string;
3
+ color?: string;
4
4
  isFirstDay: boolean;
5
5
  slotData: BlocksTimeStructure;
6
6
  }
7
- export declare const ActualTimerIndicator: ({ tailwindColor, isFirstDay, slotData, }: ActualTimerIndicatorProps) => import("react/jsx-runtime").JSX.Element | undefined;
7
+ export declare const ActualTimerIndicator: ({ color, isFirstDay, slotData, }: ActualTimerIndicatorProps) => import("react/jsx-runtime").JSX.Element | undefined;
8
8
  export default ActualTimerIndicator;
@@ -0,0 +1,6 @@
1
+ interface FirstDaySlotProps {
2
+ dateToRender: string;
3
+ isFirstDay: boolean;
4
+ }
5
+ declare const FirstDaySlot: ({ dateToRender, isFirstDay }: FirstDaySlotProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default FirstDaySlot;
@@ -1,7 +1,5 @@
1
- import { HourWithActionsRef } from '../../calendar/HourWithActions';
2
1
  declare class TimeIndicatorPosition {
3
- positionBasedOnSeconds: (slotDataTime: string, dateToRender: string, timesRendered: Map<string, HourWithActionsRef>) => number;
4
- toggleTimeVisibility: (slotDataTime: string, dateToRenderHour: string, minutes: number, timesRendered: Map<string, HourWithActionsRef>) => void;
2
+ positionBasedOnSeconds: (dateToRender: string) => number;
5
3
  normalizingMinutes: (minutes: number) => number;
6
4
  isInitialMinute: (minutes: number) => boolean;
7
5
  isSameHour: (dateToRenderHour: string, slotDataTime: string) => boolean;
@@ -0,0 +1,5 @@
1
+ import { Booking } from '../../../@types';
2
+ declare const InnerCardsHandle: {
3
+ calculateOverlappingBookings: (currentBooking: Booking, allBookings: Booking[]) => number;
4
+ };
5
+ export { InnerCardsHandle };
@@ -8,6 +8,8 @@ interface useResizableCardHookProps {
8
8
  onSubTime?: (datetime: Date) => void;
9
9
  starter?: boolean;
10
10
  }
11
+ export declare const INITIAL_HEIGHT = 600;
12
+ export declare const MIN_DIFF_TIME_THRESHOLD = 15;
11
13
  declare const useResizableCardHook: ({ booking, onAddTime, onAddStartTime, onSubTime, starter, }: useResizableCardHookProps) => {
12
14
  state: {
13
15
  height: number;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "license": "MIT",
13
13
  "private": false,
14
- "version": "1.0.8",
14
+ "version": "1.1.0",
15
15
  "keywords": [
16
16
  "react",
17
17
  "component",
@@ -60,6 +60,7 @@
60
60
  "dayjs": "^1.11.13",
61
61
  "react-resizable": "^3.0.5",
62
62
  "react-router": "^7.4.0",
63
+ "react-spinners": "^0.16.1",
63
64
  "tailwindcss": "^4.0.15",
64
65
  "tw-animate-css": "^1.2.4",
65
66
  "vite-plugin-lib-inject-css": "^2.2.1",
@@ -72,6 +73,16 @@
72
73
  "@commitlint/cli": "^19.8.0",
73
74
  "@commitlint/config-conventional": "^19.8.0",
74
75
  "@eslint/js": "^9.21.0",
76
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
77
+ "@radix-ui/react-icons": "^1.3.2",
78
+ "@radix-ui/react-label": "^2.1.2",
79
+ "@radix-ui/react-popover": "^1.1.6",
80
+ "@radix-ui/react-select": "^2.1.6",
81
+ "@radix-ui/react-separator": "^1.1.2",
82
+ "@radix-ui/react-slot": "^1.1.2",
83
+ "@radix-ui/react-tabs": "^1.1.3",
84
+ "@radix-ui/react-toggle": "^1.1.2",
85
+ "@radix-ui/react-tooltip": "^1.1.8",
75
86
  "@storybook/addon-essentials": "^8.6.8",
76
87
  "@storybook/addon-mdx-gfm": "^8.6.8",
77
88
  "@storybook/addon-onboarding": "^8.6.8",
@@ -96,6 +107,7 @@
96
107
  "eslint-plugin-storybook": "^0.11.6",
97
108
  "globals": "^15.15.0",
98
109
  "husky": "^9.1.7",
110
+ "lucide-react": "^0.483.0",
99
111
  "playwright": "^1.51.1",
100
112
  "react": "^19.0.0",
101
113
  "react-dom": "^19.0.0",
@@ -105,17 +117,7 @@
105
117
  "typescript-eslint": "^8.24.1",
106
118
  "vite": "^6.2.0",
107
119
  "vite-plugin-dts": "^4.5.3",
108
- "vitest": "^3.0.9",
109
- "@radix-ui/react-dropdown-menu": "^2.1.6",
110
- "@radix-ui/react-icons": "^1.3.2",
111
- "@radix-ui/react-label": "^2.1.2",
112
- "@radix-ui/react-popover": "^1.1.6",
113
- "@radix-ui/react-select": "^2.1.6",
114
- "@radix-ui/react-separator": "^1.1.2",
115
- "@radix-ui/react-slot": "^1.1.2",
116
- "@radix-ui/react-tabs": "^1.1.3",
117
- "@radix-ui/react-toggle": "^1.1.2",
118
- "@radix-ui/react-tooltip": "^1.1.8"
120
+ "vitest": "^3.0.9"
119
121
  },
120
122
  "eslintConfig": {
121
123
  "extends": [
@@ -126,7 +128,6 @@
126
128
  "**/*.css"
127
129
  ],
128
130
  "peerDependencies": {
129
- "lucide-react": "^0.483.0",
130
131
  "react": ">=18.0.0 <20.0.0",
131
132
  "react-dom": ">=18.0.0 <20.0.0"
132
133
  }