@orbit_ui_toolkit/orbitui-kit 0.1.24 → 0.1.26
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.
- package/dist/components/Dialog/BaseDialog.d.ts +1 -0
- package/dist/components/Grid/Grid.d.ts +14 -7
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.stories.d.ts +7 -4
- package/dist/components/calendar/Calendar.d.ts +7 -0
- package/dist/components/calendar/Calendar.stories.d.ts +8 -0
- package/dist/components/calendar/CalendarGrid.d.ts +10 -0
- package/dist/components/calendar/CalendarHeader.d.ts +14 -0
- package/dist/components/calendar/EventListSidebar.d.ts +12 -0
- package/dist/components/calendar/EventModal.d.ts +17 -0
- package/dist/components/calendar/types.d.ts +29 -0
- package/dist/components/calendar/utils.d.ts +14 -0
- package/dist/index.d.ts +4 -1
- package/dist/orbitui.cjs.js +73 -67
- package/dist/orbitui.es.js +4538 -1018
- package/package.json +2 -1
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
type ResponsiveValue<T> = T | {
|
|
3
|
+
sm?: T;
|
|
4
|
+
md?: T;
|
|
5
|
+
lg?: T;
|
|
6
|
+
xl?: T;
|
|
7
|
+
'2xl'?: T;
|
|
8
|
+
};
|
|
2
9
|
export interface GridItemProps {
|
|
3
10
|
children?: React.ReactNode;
|
|
4
11
|
/** How many columns to span across. 1-12 or 'full' */
|
|
5
|
-
colSpan?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'full'
|
|
12
|
+
colSpan?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'full'>;
|
|
6
13
|
/** How many rows to span across. */
|
|
7
|
-
rowSpan?: 1 | 2 | 3 | 4 | 5 | 6
|
|
14
|
+
rowSpan?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6>;
|
|
8
15
|
/** Start position in grid */
|
|
9
|
-
colStart?: number | string
|
|
16
|
+
colStart?: ResponsiveValue<number | string>;
|
|
10
17
|
/** Additional classes */
|
|
11
18
|
className?: string;
|
|
12
19
|
}
|
|
@@ -14,13 +21,13 @@ declare const GridItem: React.FC<GridItemProps>;
|
|
|
14
21
|
export interface GridProps {
|
|
15
22
|
children: React.ReactNode;
|
|
16
23
|
/** Number of columns. 1-12 */
|
|
17
|
-
cols?: 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12
|
|
24
|
+
cols?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12>;
|
|
18
25
|
/** Gap size (tailwind spacing scale) */
|
|
19
|
-
gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12
|
|
26
|
+
gap?: ResponsiveValue<0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12>;
|
|
20
27
|
/** Vertical Gap */
|
|
21
|
-
gapY?: number
|
|
28
|
+
gapY?: ResponsiveValue<number>;
|
|
22
29
|
/** Horizontal Gap */
|
|
23
|
-
gapX?: number
|
|
30
|
+
gapX?: ResponsiveValue<number>;
|
|
24
31
|
/** CSS Grid flow direction */
|
|
25
32
|
flow?: 'row' | 'col' | 'row-dense' | 'col-dense';
|
|
26
33
|
/** Align items */
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
2
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
3
|
label?: string;
|
|
4
4
|
error?: string;
|
|
5
|
+
helperText?: string;
|
|
5
6
|
leftIcon?: React.ReactNode;
|
|
6
7
|
rightIcon?: React.ReactNode;
|
|
7
8
|
variant?: 'default' | 'glass' | 'dark';
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
10
|
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
9
11
|
shadow?: boolean;
|
|
10
12
|
focusRing?: boolean;
|
|
11
13
|
focusRingColor?: string;
|
|
14
|
+
containerClassName?: string;
|
|
12
15
|
}
|
|
13
16
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,8 +4,11 @@ declare const meta: Meta<typeof Input>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Input>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const Small: Story;
|
|
8
|
+
export declare const Large: Story;
|
|
9
|
+
export declare const Glass: Story;
|
|
10
|
+
export declare const Dark: Story;
|
|
8
11
|
export declare const WithError: Story;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
+
export declare const WithHelperText: Story;
|
|
13
|
+
export declare const Disabled: Story;
|
|
14
|
+
export declare const Required: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CalendarProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Reusable Calendar component mimicking Microsoft Teams UI.
|
|
5
|
+
* Supports Month and Week views, event management (CRUD), accessibility, and dark mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Calendar: React.FC<CalendarProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Calendar } from './Calendar';
|
|
3
|
+
declare const meta: Meta<typeof Calendar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Calendar>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Empty: Story;
|
|
8
|
+
export declare const LargeModal: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CalendarView, DayInfo, CalendarEvent } from './types';
|
|
3
|
+
interface CalendarGridProps {
|
|
4
|
+
view: CalendarView;
|
|
5
|
+
days: DayInfo[];
|
|
6
|
+
onDateClick: (date: Date) => void;
|
|
7
|
+
onEventClick: (event: CalendarEvent) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CalendarGrid: React.FC<CalendarGridProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CalendarView } from './types';
|
|
2
|
+
interface CalendarHeaderProps {
|
|
3
|
+
currentDate: Date;
|
|
4
|
+
view: CalendarView;
|
|
5
|
+
onPrev: () => void;
|
|
6
|
+
onNext: () => void;
|
|
7
|
+
onToday: () => void;
|
|
8
|
+
onViewChange: (view: CalendarView) => void;
|
|
9
|
+
searchQuery: string;
|
|
10
|
+
onSearchChange: (query: string) => void;
|
|
11
|
+
onScheduleClick: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const CalendarHeader: React.FC<CalendarHeaderProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CalendarEvent } from './types';
|
|
3
|
+
interface EventListSidebarProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
date: Date;
|
|
7
|
+
events: CalendarEvent[];
|
|
8
|
+
onEventClick: (event: CalendarEvent) => void;
|
|
9
|
+
onScheduleClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const EventListSidebar: React.FC<EventListSidebarProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CalendarEvent } from './types';
|
|
3
|
+
interface EventModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
event?: CalendarEvent | null;
|
|
7
|
+
selectedDate: Date;
|
|
8
|
+
onSave: (event: Omit<CalendarEvent, 'id'> & {
|
|
9
|
+
id?: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
onDelete?: (id: string) => void;
|
|
12
|
+
defaultSize?: 'sm' | 'md' | 'lg' | 'xl';
|
|
13
|
+
lockDate?: boolean;
|
|
14
|
+
theme?: 'light' | 'dark' | 'system';
|
|
15
|
+
}
|
|
16
|
+
export declare const EventModal: React.FC<EventModalProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type CalendarView = 'month' | 'week' | 'day';
|
|
2
|
+
export interface CalendarEvent {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
start: Date;
|
|
6
|
+
end: Date;
|
|
7
|
+
description?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CalendarProps {
|
|
11
|
+
events?: CalendarEvent[];
|
|
12
|
+
onAddEvent?: (event: Omit<CalendarEvent, 'id'>) => void;
|
|
13
|
+
onUpdateEvent?: (event: CalendarEvent) => void;
|
|
14
|
+
onDeleteEvent?: (id: string) => void;
|
|
15
|
+
modalSize?: 'sm' | 'md' | 'lg' | 'xl';
|
|
16
|
+
className?: string;
|
|
17
|
+
theme?: 'light' | 'dark' | 'system';
|
|
18
|
+
}
|
|
19
|
+
export interface DayInfo {
|
|
20
|
+
date: Date;
|
|
21
|
+
isCurrentMonth: boolean;
|
|
22
|
+
isToday: boolean;
|
|
23
|
+
isCurrentDay: boolean;
|
|
24
|
+
events: CalendarEvent[];
|
|
25
|
+
}
|
|
26
|
+
export interface TimeSlot {
|
|
27
|
+
time: Date;
|
|
28
|
+
events: CalendarEvent[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CalendarEvent, DayInfo } from './types';
|
|
2
|
+
export declare const getMonthDays: (currentDate: Date, events: CalendarEvent[]) => DayInfo[];
|
|
3
|
+
/**
|
|
4
|
+
* Generates an array of days for a week view
|
|
5
|
+
*/
|
|
6
|
+
export declare const getWeekDays: (currentDate: Date, events: CalendarEvent[]) => DayInfo[];
|
|
7
|
+
/**
|
|
8
|
+
* Formats a time range for display
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatTimeRange: (start: Date, end: Date) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Helper to get status color based on event
|
|
13
|
+
*/
|
|
14
|
+
export declare const getEventColorClasses: (color?: string) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,4 +19,7 @@ export * from './components/Stack';
|
|
|
19
19
|
export * from './components/Dialog/BaseDialog';
|
|
20
20
|
export * from './components/DataTable/DataTable';
|
|
21
21
|
export * from './components/MovieTicket/MovieTicket';
|
|
22
|
-
export
|
|
22
|
+
export { Badge } from './components/Badge/Badge';
|
|
23
|
+
export type { BadgeProps } from './components/Badge/Badge';
|
|
24
|
+
export * from './components/calendar/Calendar';
|
|
25
|
+
export * from './components/calendar/types';
|