@rovula/ui 0.0.17 → 0.0.19
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/cjs/bundle.css +424 -9
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/AlertDialog/Alert.stories.d.ts +1 -1
- package/dist/cjs/types/components/Calendar/Calendar.d.ts +9 -0
- package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +724 -0
- package/dist/cjs/types/components/Calendar/index.d.ts +1 -0
- package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +21 -0
- package/dist/cjs/types/components/Popover/Popover.d.ts +6 -0
- package/dist/cjs/types/components/Popover/Popover.stories.d.ts +21 -0
- package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +7 -0
- package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +5 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/components/Calendar/Calendar.js +34 -0
- package/dist/components/Calendar/Calendar.stories.js +38 -0
- package/dist/components/Calendar/index.js +1 -0
- package/dist/components/DatePicker/DatePicker.js +21 -0
- package/dist/components/DatePicker/DatePicker.stories.js +36 -0
- package/dist/components/Popover/Popover.js +35 -0
- package/dist/components/Popover/Popover.stories.js +33 -0
- package/dist/components/TextInput/TextInput.js +9 -3
- package/dist/components/TextInput/TextInput.stories.js +13 -1
- package/dist/components/TextInput/TextInput.styles.js +42 -1
- package/dist/esm/bundle.css +424 -9
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/AlertDialog/Alert.stories.d.ts +1 -1
- package/dist/esm/types/components/Calendar/Calendar.d.ts +9 -0
- package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +724 -0
- package/dist/esm/types/components/Calendar/index.d.ts +1 -0
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +21 -0
- package/dist/esm/types/components/Popover/Popover.d.ts +6 -0
- package/dist/esm/types/components/Popover/Popover.stories.d.ts +21 -0
- package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +7 -0
- package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +5 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.js +3 -0
- package/dist/src/theme/global.css +146 -8
- package/dist/theme/global.css +8 -4
- package/dist/theme/presets/colors.js +2 -2
- package/package.json +5 -2
- package/src/components/Calendar/Calendar.stories.tsx +49 -0
- package/src/components/Calendar/Calendar.tsx +49 -0
- package/src/components/Calendar/index.ts +1 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +40 -0
- package/src/components/DatePicker/DatePicker.tsx +57 -0
- package/src/components/Popover/Popover.stories.tsx +40 -0
- package/src/components/Popover/Popover.tsx +31 -0
- package/src/components/TextInput/TextInput.stories.tsx +37 -1
- package/src/components/TextInput/TextInput.styles.ts +46 -1
- package/src/components/TextInput/TextInput.tsx +13 -3
- package/src/index.ts +7 -0
- package/src/theme/global.css +8 -4
- package/src/theme/presets/colors.js +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Calendar } from "./Calendar";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { Modifiers } from "react-day-picker";
|
|
3
|
+
type DatePickerProps = {
|
|
4
|
+
date: Date | undefined;
|
|
5
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: Modifiers, e: React.MouseEvent | React.KeyboardEvent) => void | undefined;
|
|
6
|
+
};
|
|
7
|
+
declare const DatePicker: FC<DatePickerProps>;
|
|
8
|
+
export default DatePicker;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<{
|
|
5
|
+
date: Date | undefined;
|
|
6
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: import("react-day-picker").Modifiers, e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
tags: string[];
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
13
|
+
date: Date | undefined;
|
|
14
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: import("react-day-picker").Modifiers, e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void | undefined;
|
|
15
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
export declare const Default: {
|
|
19
|
+
args: {};
|
|
20
|
+
render: (args: {}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("@radix-ui/react-popover").PopoverProps>;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
open?: boolean | undefined;
|
|
12
|
+
defaultOpen?: boolean | undefined;
|
|
13
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
14
|
+
modal?: boolean | undefined;
|
|
15
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
export declare const Default: {
|
|
19
|
+
args: {};
|
|
20
|
+
render: (args: {}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
};
|
|
@@ -349,3 +349,10 @@ export declare const CustomLabel: {
|
|
|
349
349
|
};
|
|
350
350
|
render: (args: {}) => import("react/jsx-runtime").JSX.Element;
|
|
351
351
|
};
|
|
352
|
+
export declare const FuctionInput: {
|
|
353
|
+
args: {
|
|
354
|
+
label: string;
|
|
355
|
+
disabled: boolean;
|
|
356
|
+
};
|
|
357
|
+
render: (args: {}) => import("react/jsx-runtime").JSX.Element;
|
|
358
|
+
};
|
|
@@ -6,6 +6,7 @@ export declare const inputVariant: (props?: ({
|
|
|
6
6
|
disabled?: boolean | null | undefined;
|
|
7
7
|
error?: boolean | null | undefined;
|
|
8
8
|
hasClearIcon?: boolean | null | undefined;
|
|
9
|
+
rightSectionIcon?: boolean | null | undefined;
|
|
9
10
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
11
|
export declare const labelVariant: (props?: ({
|
|
11
12
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -23,3 +24,7 @@ export declare const iconWrapperVariant: (props?: ({
|
|
|
23
24
|
export declare const iconVariant: (props?: ({
|
|
24
25
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
25
26
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
27
|
+
export declare const sectionIconWrapperVariant: (props?: ({
|
|
28
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
29
|
+
rounded?: "none" | "normal" | "full" | null | undefined;
|
|
30
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -11,6 +11,9 @@ export { Navbar } from "./components/Navbar";
|
|
|
11
11
|
export { default as ActionButton } from "./components/ActionButton/ActionButton";
|
|
12
12
|
export { Avatar, AvatarGroup } from "./components/Avatar";
|
|
13
13
|
export { Collapsible } from "./components/Collapsible";
|
|
14
|
+
export { Calendar } from "./components/Calendar";
|
|
15
|
+
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
16
|
+
export { Popover, PopoverTrigger, PopoverContent, } from "./components/Popover/Popover";
|
|
14
17
|
export * from "./components/Table/Table";
|
|
15
18
|
export * from "./components/DataTable/DataTable";
|
|
16
19
|
export * from "./components/Dialog/Dialog";
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
|
|
|
5
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
+
import { DayPicker, Modifiers } from 'react-day-picker';
|
|
9
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
8
10
|
import { ColumnDef, SortingState } from '@tanstack/react-table';
|
|
9
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
12
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
@@ -247,6 +249,22 @@ interface CollapsibleProps {
|
|
|
247
249
|
}
|
|
248
250
|
declare const Collapsible: CollapsibleComponent;
|
|
249
251
|
|
|
252
|
+
type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
253
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
254
|
+
declare namespace Calendar {
|
|
255
|
+
var displayName: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
type DatePickerProps = {
|
|
259
|
+
date: Date | undefined;
|
|
260
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: Modifiers, e: React__default.MouseEvent | React__default.KeyboardEvent) => void | undefined;
|
|
261
|
+
};
|
|
262
|
+
declare const DatePicker: FC<DatePickerProps>;
|
|
263
|
+
|
|
264
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
265
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
266
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
267
|
+
|
|
250
268
|
declare const Table: React.ForwardRefExoticComponent<{
|
|
251
269
|
rootRef?: React.LegacyRef<HTMLDivElement> | undefined;
|
|
252
270
|
} & React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
@@ -313,4 +331,4 @@ declare const getTimestampUTC: (date: Date) => number;
|
|
|
313
331
|
|
|
314
332
|
declare function cn(...inputs: ClassValue[]): string;
|
|
315
333
|
|
|
316
|
-
export { ActionButton, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Checkbox, Collapsible, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownProps, Input, type InputProps, Label, Navbar, type NavbarProps, type Options, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
|
|
334
|
+
export { ActionButton, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Calendar, Checkbox, Collapsible, DataTable, type DataTableProps, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownProps, Input, type InputProps, Label, Navbar, type NavbarProps, type Options, Popover, PopoverContent, PopoverTrigger, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,9 @@ export { Navbar } from "./components/Navbar";
|
|
|
13
13
|
export { default as ActionButton } from "./components/ActionButton/ActionButton";
|
|
14
14
|
export { Avatar, AvatarGroup } from "./components/Avatar";
|
|
15
15
|
export { Collapsible } from "./components/Collapsible";
|
|
16
|
+
export { Calendar } from "./components/Calendar";
|
|
17
|
+
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
18
|
+
export { Popover, PopoverTrigger, PopoverContent, } from "./components/Popover/Popover";
|
|
16
19
|
export * from "./components/Table/Table";
|
|
17
20
|
export * from "./components/DataTable/DataTable";
|
|
18
21
|
export * from "./components/Dialog/Dialog";
|
|
@@ -692,6 +692,9 @@ video {
|
|
|
692
692
|
--text-grey-medium: 117 121 128;
|
|
693
693
|
--text-grey-light: 164 169 178;
|
|
694
694
|
--text-white: 255 255 255;
|
|
695
|
+
/* Other */
|
|
696
|
+
--other-bg: var(--white);
|
|
697
|
+
--other-bg-2: var(--white);
|
|
695
698
|
/* Other/Popup */
|
|
696
699
|
--popup-background: 249 251 255;
|
|
697
700
|
/* Other/Popup Curtain */
|
|
@@ -706,16 +709,16 @@ video {
|
|
|
706
709
|
--navbar-gap: 16px;
|
|
707
710
|
/* TODO for shadcn, wait for refactor */
|
|
708
711
|
/* --background: 0 0% 100%; */
|
|
709
|
-
--background:
|
|
710
|
-
--foreground:
|
|
712
|
+
--background: var(--brand-background);
|
|
713
|
+
--foreground: var(--text-white:);
|
|
711
714
|
--muted: 210 40% 96.1%;
|
|
712
715
|
--muted-foreground: 215.4 16.3% 46.9%;
|
|
713
716
|
--popover: 0 0% 100%;
|
|
714
717
|
--popover-foreground: 222.2 47.4% 11.2%;
|
|
715
718
|
--border: 214.3 31.8% 91.4%;
|
|
716
719
|
--input: 214.3 31.8% 91.4%;
|
|
717
|
-
--card:
|
|
718
|
-
--card-foreground:
|
|
720
|
+
--card: var(--white);
|
|
721
|
+
--card-foreground: var(--primary);
|
|
719
722
|
--primary: var(--primary-default);
|
|
720
723
|
--secondary: var(--secondary-default);
|
|
721
724
|
--accent: 210 40% 96.1%;
|
|
@@ -731,8 +734,10 @@ video {
|
|
|
731
734
|
}
|
|
732
735
|
|
|
733
736
|
body {
|
|
734
|
-
|
|
735
|
-
color:
|
|
737
|
+
--tw-bg-opacity: 1;
|
|
738
|
+
background-color: rgb(var(--background) / var(--tw-bg-opacity));
|
|
739
|
+
--tw-text-opacity: 1;
|
|
740
|
+
color: rgb(var(--foreground) / var(--tw-text-opacity));
|
|
736
741
|
}
|
|
737
742
|
|
|
738
743
|
*, ::before, ::after {
|
|
@@ -1032,6 +1037,11 @@ body {
|
|
|
1032
1037
|
aspect-ratio: 1 / 1;
|
|
1033
1038
|
}
|
|
1034
1039
|
|
|
1040
|
+
.size-14 {
|
|
1041
|
+
width: 3.5rem;
|
|
1042
|
+
height: 3.5rem;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1035
1045
|
.size-2 {
|
|
1036
1046
|
width: 0.5rem;
|
|
1037
1047
|
height: 0.5rem;
|
|
@@ -1067,11 +1077,26 @@ body {
|
|
|
1067
1077
|
height: 1.75rem;
|
|
1068
1078
|
}
|
|
1069
1079
|
|
|
1080
|
+
.size-9 {
|
|
1081
|
+
width: 2.25rem;
|
|
1082
|
+
height: 2.25rem;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1070
1085
|
.size-\[14px\] {
|
|
1071
1086
|
width: 14px;
|
|
1072
1087
|
height: 14px;
|
|
1073
1088
|
}
|
|
1074
1089
|
|
|
1090
|
+
.size-\[30px\] {
|
|
1091
|
+
width: 30px;
|
|
1092
|
+
height: 30px;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.size-\[38px\] {
|
|
1096
|
+
width: 38px;
|
|
1097
|
+
height: 38px;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1075
1100
|
.size-full {
|
|
1076
1101
|
width: 100%;
|
|
1077
1102
|
height: 100%;
|
|
@@ -1230,6 +1255,10 @@ body {
|
|
|
1230
1255
|
width: 100%;
|
|
1231
1256
|
}
|
|
1232
1257
|
|
|
1258
|
+
.min-w-72 {
|
|
1259
|
+
min-width: 18rem;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1233
1262
|
.max-w-3xl {
|
|
1234
1263
|
max-width: 48rem;
|
|
1235
1264
|
}
|
|
@@ -1473,6 +1502,21 @@ body {
|
|
|
1473
1502
|
border-radius: 0.75rem;
|
|
1474
1503
|
}
|
|
1475
1504
|
|
|
1505
|
+
.rounded-r-full {
|
|
1506
|
+
border-top-right-radius: 9999px;
|
|
1507
|
+
border-bottom-right-radius: 9999px;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.rounded-r-none {
|
|
1511
|
+
border-top-right-radius: 0px;
|
|
1512
|
+
border-bottom-right-radius: 0px;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
.rounded-r-xl {
|
|
1516
|
+
border-top-right-radius: 0.75rem;
|
|
1517
|
+
border-bottom-right-radius: 0.75rem;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1476
1520
|
.border {
|
|
1477
1521
|
border-width: 1px;
|
|
1478
1522
|
}
|
|
@@ -1493,6 +1537,10 @@ body {
|
|
|
1493
1537
|
border-bottom-width: 3px;
|
|
1494
1538
|
}
|
|
1495
1539
|
|
|
1540
|
+
.border-l {
|
|
1541
|
+
border-left-width: 1px;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1496
1544
|
.border-t {
|
|
1497
1545
|
border-top-width: 1px;
|
|
1498
1546
|
}
|
|
@@ -1501,6 +1549,14 @@ body {
|
|
|
1501
1549
|
border-style: solid;
|
|
1502
1550
|
}
|
|
1503
1551
|
|
|
1552
|
+
.border-none {
|
|
1553
|
+
border-style: none;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
.border-\[rgb\(var\(--card\)\)\] {
|
|
1557
|
+
border-color: rgb(var(--card));
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1504
1560
|
.border-error {
|
|
1505
1561
|
--tw-border-opacity: 1;
|
|
1506
1562
|
border-color: rgb(var(--error-100) / var(--tw-border-opacity));
|
|
@@ -1586,12 +1642,26 @@ body {
|
|
|
1586
1642
|
border-bottom-color: rgb(var(--navbar-border-color));
|
|
1587
1643
|
}
|
|
1588
1644
|
|
|
1645
|
+
.border-l-input-stroke {
|
|
1646
|
+
--tw-border-opacity: 1;
|
|
1647
|
+
border-left-color: rgb(var(--input-default-stroke-color) / var(--tw-border-opacity));
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.bg-\[rgb\(var\(--card\)\)\] {
|
|
1651
|
+
background-color: rgb(var(--card));
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1589
1654
|
.bg-\[rgb\(var\(--navbar-bg-color\)\)\] {
|
|
1590
1655
|
background-color: rgb(var(--navbar-bg-color));
|
|
1591
1656
|
}
|
|
1592
1657
|
|
|
1658
|
+
.bg-\[rgb\(var\(--other-bg-2\)\)\] {
|
|
1659
|
+
background-color: rgb(var(--other-bg-2));
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1593
1662
|
.bg-background {
|
|
1594
|
-
|
|
1663
|
+
--tw-bg-opacity: 1;
|
|
1664
|
+
background-color: rgb(var(--background) / var(--tw-bg-opacity));
|
|
1595
1665
|
}
|
|
1596
1666
|
|
|
1597
1667
|
.bg-black {
|
|
@@ -1726,6 +1796,10 @@ body {
|
|
|
1726
1796
|
fill: rgb(var(--input-disabled-text-color) / 1);
|
|
1727
1797
|
}
|
|
1728
1798
|
|
|
1799
|
+
.fill-primary {
|
|
1800
|
+
fill: rgb(var(--primary-default) / 1);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1729
1803
|
.fill-red-500 {
|
|
1730
1804
|
fill: #ef4444;
|
|
1731
1805
|
}
|
|
@@ -1746,6 +1820,10 @@ body {
|
|
|
1746
1820
|
fill: rgb(var(--text-default-medium) / 1);
|
|
1747
1821
|
}
|
|
1748
1822
|
|
|
1823
|
+
.p-0 {
|
|
1824
|
+
padding: 0px;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1749
1827
|
.p-1 {
|
|
1750
1828
|
padding: 0.25rem;
|
|
1751
1829
|
}
|
|
@@ -1758,6 +1836,10 @@ body {
|
|
|
1758
1836
|
padding: 5rem;
|
|
1759
1837
|
}
|
|
1760
1838
|
|
|
1839
|
+
.p-3 {
|
|
1840
|
+
padding: 0.75rem;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1761
1843
|
.p-4 {
|
|
1762
1844
|
padding: 1rem;
|
|
1763
1845
|
}
|
|
@@ -1852,14 +1934,26 @@ body {
|
|
|
1852
1934
|
padding-inline-end: 30px;
|
|
1853
1935
|
}
|
|
1854
1936
|
|
|
1937
|
+
.pe-\[38px\] {
|
|
1938
|
+
padding-inline-end: 38px;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1855
1941
|
.pe-\[40px\] {
|
|
1856
1942
|
padding-inline-end: 40px;
|
|
1857
1943
|
}
|
|
1858
1944
|
|
|
1945
|
+
.pe-\[46px\] {
|
|
1946
|
+
padding-inline-end: 46px;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1859
1949
|
.pe-\[48px\] {
|
|
1860
1950
|
padding-inline-end: 48px;
|
|
1861
1951
|
}
|
|
1862
1952
|
|
|
1953
|
+
.pe-\[72px\] {
|
|
1954
|
+
padding-inline-end: 72px;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1863
1957
|
.text-left {
|
|
1864
1958
|
text-align: left;
|
|
1865
1959
|
}
|
|
@@ -2045,6 +2139,10 @@ body {
|
|
|
2045
2139
|
letter-spacing: -0.025em;
|
|
2046
2140
|
}
|
|
2047
2141
|
|
|
2142
|
+
.text-\[rgb\(var\(--card-foreground\)\)\] {
|
|
2143
|
+
color: rgb(var(--card-foreground));
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2048
2146
|
.text-\[rgb\(var\(--navbar-text-color\)\)\] {
|
|
2049
2147
|
color: rgb(var(--navbar-text-color));
|
|
2050
2148
|
}
|
|
@@ -2073,6 +2171,11 @@ body {
|
|
|
2073
2171
|
color: rgb(243 244 246 / var(--tw-text-opacity));
|
|
2074
2172
|
}
|
|
2075
2173
|
|
|
2174
|
+
.text-gray-400 {
|
|
2175
|
+
--tw-text-opacity: 1;
|
|
2176
|
+
color: rgb(156 163 175 / var(--tw-text-opacity));
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2076
2179
|
.text-grey2-500\/\[\.32\] {
|
|
2077
2180
|
color: rgb(var(--grey2-500) / .32);
|
|
2078
2181
|
}
|
|
@@ -2204,6 +2307,10 @@ body {
|
|
|
2204
2307
|
text-underline-offset: 4px;
|
|
2205
2308
|
}
|
|
2206
2309
|
|
|
2310
|
+
.caret-primary {
|
|
2311
|
+
caret-color: rgb(var(--primary-default) / 1);
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2207
2314
|
.opacity-70 {
|
|
2208
2315
|
opacity: 0.7;
|
|
2209
2316
|
}
|
|
@@ -2261,7 +2368,7 @@ body {
|
|
|
2261
2368
|
}
|
|
2262
2369
|
|
|
2263
2370
|
.ring-offset-background {
|
|
2264
|
-
--tw-ring-offset-color:
|
|
2371
|
+
--tw-ring-offset-color: rgb(var(--background) / 1);
|
|
2265
2372
|
}
|
|
2266
2373
|
|
|
2267
2374
|
.blur {
|
|
@@ -2757,6 +2864,10 @@ body {
|
|
|
2757
2864
|
font-weight: 400;
|
|
2758
2865
|
}
|
|
2759
2866
|
|
|
2867
|
+
.peer:hover ~ .peer-hover\:fill-input-text-active {
|
|
2868
|
+
fill: rgb(var(--input-active-text-color) / 1);
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2760
2871
|
.peer:focus ~ .peer-focus\:-top-1 {
|
|
2761
2872
|
top: -0.25rem;
|
|
2762
2873
|
}
|
|
@@ -2769,6 +2880,11 @@ body {
|
|
|
2769
2880
|
display: flex;
|
|
2770
2881
|
}
|
|
2771
2882
|
|
|
2883
|
+
.peer:focus ~ .peer-focus\:border-l-input-stroke-active {
|
|
2884
|
+
--tw-border-opacity: 1;
|
|
2885
|
+
border-left-color: rgb(var(--input-active-stroke-color) / var(--tw-border-opacity));
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2772
2888
|
.peer:focus ~ .peer-focus\:bg-input-label-background {
|
|
2773
2889
|
--tw-bg-opacity: 1;
|
|
2774
2890
|
background-color: rgb(var(--input-label-background-color) / var(--tw-bg-opacity));
|
|
@@ -2779,6 +2895,10 @@ body {
|
|
|
2779
2895
|
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
|
|
2780
2896
|
}
|
|
2781
2897
|
|
|
2898
|
+
.peer:focus ~ .peer-focus\:fill-input-text-active {
|
|
2899
|
+
fill: rgb(var(--input-active-text-color) / 1);
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2782
2902
|
.peer:focus ~ .peer-focus\:text-input-text-active {
|
|
2783
2903
|
--tw-text-opacity: 1;
|
|
2784
2904
|
color: rgb(var(--input-active-text-color) / var(--tw-text-opacity));
|
|
@@ -2800,6 +2920,11 @@ body {
|
|
|
2800
2920
|
cursor: not-allowed;
|
|
2801
2921
|
}
|
|
2802
2922
|
|
|
2923
|
+
.peer:disabled ~ .peer-disabled\:border-l-input-stroke-disabled {
|
|
2924
|
+
--tw-border-opacity: 1;
|
|
2925
|
+
border-left-color: rgb(var(--input-disabled-stroke-color) / var(--tw-border-opacity));
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2803
2928
|
.peer:disabled ~ .peer-disabled\:opacity-70 {
|
|
2804
2929
|
opacity: 0.7;
|
|
2805
2930
|
}
|
|
@@ -2880,6 +3005,19 @@ body {
|
|
|
2880
3005
|
border-bottom-width: 0px;
|
|
2881
3006
|
}
|
|
2882
3007
|
|
|
3008
|
+
.\[\&_button\]\:\!border button {
|
|
3009
|
+
border-width: 1px !important;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
.\[\&_button\]\:\!border-solid button {
|
|
3013
|
+
border-style: solid !important;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
.\[\&_button\]\:\!border-primary button {
|
|
3017
|
+
--tw-border-opacity: 1 !important;
|
|
3018
|
+
border-color: rgb(var(--primary-default) / var(--tw-border-opacity)) !important;
|
|
3019
|
+
}
|
|
3020
|
+
|
|
2883
3021
|
.\[\&_tr\:last-child\]\:border-0 tr:last-child {
|
|
2884
3022
|
border-width: 0px;
|
|
2885
3023
|
}
|
package/dist/theme/global.css
CHANGED
|
@@ -176,6 +176,10 @@
|
|
|
176
176
|
--text-grey-light: 164 169 178;
|
|
177
177
|
--text-white: 255 255 255;
|
|
178
178
|
|
|
179
|
+
/* Other */
|
|
180
|
+
--other-bg: var(--white);
|
|
181
|
+
--other-bg-2: var(--white);
|
|
182
|
+
|
|
179
183
|
/* Other/Popup */
|
|
180
184
|
--popup-background: 249 251 255;
|
|
181
185
|
/* Other/Popup Curtain */
|
|
@@ -192,8 +196,8 @@
|
|
|
192
196
|
|
|
193
197
|
/* TODO for shadcn, wait for refactor */
|
|
194
198
|
/* --background: 0 0% 100%; */
|
|
195
|
-
--background:
|
|
196
|
-
--foreground:
|
|
199
|
+
--background: var(--brand-background);
|
|
200
|
+
--foreground: var(--text-white:);
|
|
197
201
|
|
|
198
202
|
--muted: 210 40% 96.1%;
|
|
199
203
|
--muted-foreground: 215.4 16.3% 46.9%;
|
|
@@ -204,8 +208,8 @@
|
|
|
204
208
|
--border: 214.3 31.8% 91.4%;
|
|
205
209
|
--input: 214.3 31.8% 91.4%;
|
|
206
210
|
|
|
207
|
-
--card:
|
|
208
|
-
--card-foreground:
|
|
211
|
+
--card: var(--white);
|
|
212
|
+
--card-foreground: var(--primary);
|
|
209
213
|
|
|
210
214
|
--primary: var(--primary-default);
|
|
211
215
|
|
|
@@ -7,8 +7,8 @@ module.exports = {
|
|
|
7
7
|
colors: {
|
|
8
8
|
border: "hsl(var(--border))",
|
|
9
9
|
ring: "hsl(var(--ring))",
|
|
10
|
-
background: "
|
|
11
|
-
foreground: "
|
|
10
|
+
background: "rgb(var(--background) / <alpha-value>)",
|
|
11
|
+
foreground: "rgb(var(--foreground) / <alpha-value>)",
|
|
12
12
|
// Palette colors
|
|
13
13
|
themes: {
|
|
14
14
|
50: "rgb(var(--themes-50) / <alpha-value>)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rovula/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"main": "dist/cjs/bundle.js",
|
|
5
5
|
"module": "dist/esm/bundle.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -73,15 +73,18 @@
|
|
|
73
73
|
"@radix-ui/react-checkbox": "^1.0.4",
|
|
74
74
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
75
75
|
"@radix-ui/react-label": "^2.0.2",
|
|
76
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
76
77
|
"@radix-ui/react-radio-group": "^1.1.3",
|
|
77
|
-
"@radix-ui/react-slot": "^1.0
|
|
78
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
78
79
|
"@tanstack/react-table": "^8.17.3",
|
|
79
80
|
"@tanstack/react-virtual": "^3.5.0",
|
|
80
81
|
"@types/react": "^18.3.2",
|
|
81
82
|
"axios": "^1.6.4",
|
|
82
83
|
"class-variance-authority": "^0.7.0",
|
|
83
84
|
"clsx": "^2.1.1",
|
|
85
|
+
"date-fns": "^3.6.0",
|
|
84
86
|
"react": "^17.0.0 || ^18.0.0",
|
|
87
|
+
"react-day-picker": "^9.0.7",
|
|
85
88
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
86
89
|
"tailwind-merge": "^2.3.0",
|
|
87
90
|
"tailwindcss-animate": "^1.0.7",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import Calendar from "./Calendar";
|
|
4
|
+
import ThemeToggle from "../ThemeToggle";
|
|
5
|
+
import Button from "../Button/Button";
|
|
6
|
+
|
|
7
|
+
// import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: "Components/Calendar",
|
|
11
|
+
component: Calendar,
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: "fullscreen",
|
|
15
|
+
},
|
|
16
|
+
decorators: [
|
|
17
|
+
(Story) => (
|
|
18
|
+
<div className="p-5 flex w-full">
|
|
19
|
+
<Story />
|
|
20
|
+
</div>
|
|
21
|
+
),
|
|
22
|
+
],
|
|
23
|
+
} satisfies Meta<typeof Calendar>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
export const Default = {
|
|
28
|
+
args: {},
|
|
29
|
+
render: (args) => {
|
|
30
|
+
console.log("args ", args);
|
|
31
|
+
const props: typeof args = {
|
|
32
|
+
...args,
|
|
33
|
+
};
|
|
34
|
+
const [date, setDate] = React.useState<Date | undefined>(new Date());
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div className="flex flex-row gap-4 w-full">
|
|
38
|
+
<ThemeToggle />
|
|
39
|
+
<Button>Text</Button>
|
|
40
|
+
<Calendar
|
|
41
|
+
mode="single"
|
|
42
|
+
selected={date}
|
|
43
|
+
onSelect={setDate}
|
|
44
|
+
className="rounded-md border"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
} satisfies StoryObj;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
5
|
+
|
|
6
|
+
import "react-day-picker/dist/style.css";
|
|
7
|
+
import { cn } from "@/utils/cn";
|
|
8
|
+
|
|
9
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
10
|
+
|
|
11
|
+
function Calendar({
|
|
12
|
+
className,
|
|
13
|
+
classNames,
|
|
14
|
+
showOutsideDays = true,
|
|
15
|
+
...props
|
|
16
|
+
}: CalendarProps) {
|
|
17
|
+
const defaultClassNames = getDefaultClassNames();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<DayPicker
|
|
21
|
+
showOutsideDays={showOutsideDays}
|
|
22
|
+
captionLayout="dropdown-years"
|
|
23
|
+
{...props}
|
|
24
|
+
className={cn(
|
|
25
|
+
"bg-[rgb(var(--card))] text-[rgb(var(--card-foreground))] border-[rgb(var(--card))]",
|
|
26
|
+
className
|
|
27
|
+
)}
|
|
28
|
+
classNames={{
|
|
29
|
+
...defaultClassNames,
|
|
30
|
+
day_button: cn(defaultClassNames.day_button, "size-9 "),
|
|
31
|
+
day: "typography-subtitile1 ",
|
|
32
|
+
today:
|
|
33
|
+
"text-bold rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",
|
|
34
|
+
selected: "bg-primary text-primary-foreground rounded-full ",
|
|
35
|
+
weekdays: "text-gray-400",
|
|
36
|
+
month_caption: cn(defaultClassNames.month_caption, "h-[54px]"),
|
|
37
|
+
outside: "text-gray-400",
|
|
38
|
+
nav: cn(defaultClassNames.nav, "gap-6"),
|
|
39
|
+
chevron: "fill-primary",
|
|
40
|
+
root: cn(defaultClassNames.root, "px-6 py-4 "),
|
|
41
|
+
caption_label: cn(defaultClassNames.caption_label, "gap-2"),
|
|
42
|
+
...classNames,
|
|
43
|
+
}}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
Calendar.displayName = "Calendar";
|
|
48
|
+
|
|
49
|
+
export default Calendar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Calendar } from "./Calendar";
|