oolib 2.170.5 → 2.170.7
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/index.d.ts +0 -3
- package/dist/index.js +2 -5
- package/dist/stories/Oolib/components/Playground.stories.js +1 -3
- package/dist/stories/v2/components/Date.stories.js +2 -3
- package/package.json +2 -15
- package/dist/components/shadcn/calendar.d.ts +0 -12
- package/dist/components/shadcn/calendar.js +0 -82
- package/dist/components/shadcn/index.d.ts +0 -2
- package/dist/components/shadcn/index.js +0 -10
- package/dist/components/shadcn/popover.d.ts +0 -7
- package/dist/components/shadcn/popover.js +0 -74
- package/dist/utils/twmerge.d.ts +0 -2
- package/dist/utils/twmerge.js +0 -12
- package/dist/v2/components/DatePickerShadCN/index.d.ts +0 -17
- package/dist/v2/components/DatePickerShadCN/index.js +0 -313
- package/postcss.config.js +0 -6
- package/tailwind.config.js +0 -60
package/dist/index.d.ts
CHANGED
|
@@ -20,8 +20,6 @@ export * from "./v2/components/cards/CardContent";
|
|
|
20
20
|
export * from "./v2/components/cards/ListContent";
|
|
21
21
|
export * from "./v2/components/Tags";
|
|
22
22
|
export * from "./v2/components/ImagePlaceholder";
|
|
23
|
-
export * from "./v2/components/Buttons";
|
|
24
|
-
export * from "./components/shadcn";
|
|
25
23
|
export { colors } from "./themes";
|
|
26
24
|
export { icons } from "./icons";
|
|
27
25
|
export { Section } from "./components/Section";
|
|
@@ -76,7 +74,6 @@ export { colors as colors2 } from "./v2/themes";
|
|
|
76
74
|
export { default as MetaBlockV2 } from "./v2/components/MetaBlock";
|
|
77
75
|
export { HintsProvider } from "./v2/components/Hints/contextApi";
|
|
78
76
|
export { DateRangePicker as DateRangePickerV2 } from "./v2/components/DateRangePicker";
|
|
79
|
-
export { DatePickerWithRangeV3 } from "./v2/components/DatePickerShadCN";
|
|
80
77
|
export { LoaderCircle, ProgressBar, LoaderCircle as Loader, LoaderOverlay } from "./components/LoadersAndProgress";
|
|
81
78
|
export { TagClear, TagLink, TagSelect } from "./components/Tags";
|
|
82
79
|
export { BannerAlert, BannerInfo } from "./components/Banners";
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.PDFInput = exports.AudioInput = exports.VideoInput = exports.ProfileImageInput = exports.ImageInput = exports.MetaBlock = exports.genTagComp = exports.generateOptions = exports.OptionsSingle = exports.DropdownMulti = exports.DropdownSingle = exports.parseCardConfig = exports.ListProfile = exports.CardProfile = exports.CardEmbed = exports.DataVizAccordion = exports.BarChart = exports.DateTimeRangePicker = exports.DateTimePicker = exports.TimeRangePicker = exports.TimePicker = exports.DateRangePicker = exports.DatePicker = exports.TextLoader = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.Modal = exports.ModalForms = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.TagSelect = exports.TagLink = exports.TagClear = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
|
|
21
|
-
exports.
|
|
21
|
+
exports.DateRangePickerV2 = exports.HintsProvider = exports.MetaBlockV2 = exports.colors2 = exports.TabBarV2 = exports.TableCellResizerPlugin = exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = exports.BannerAlert = exports.GroupQuestionsInputSingle = exports.ResourceInput = exports.IFrameInput = void 0;
|
|
22
22
|
//css and styling related ( styled-components )
|
|
23
23
|
var globalStyles_1 = require("./globalStyles");
|
|
24
24
|
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
|
|
@@ -182,7 +182,7 @@ __exportStar(require("./v2/components/cards/ListContent"), exports);
|
|
|
182
182
|
__exportStar(require("./v2/components/Tags"), exports);
|
|
183
183
|
__exportStar(require("./v2/components/ImagePlaceholder"), exports);
|
|
184
184
|
// 2 imports available
|
|
185
|
-
|
|
185
|
+
// export * from './v2/components/Buttons';
|
|
186
186
|
var TabBar_1 = require("./v2/components/TabBar");
|
|
187
187
|
Object.defineProperty(exports, "TabBarV2", { enumerable: true, get: function () { return TabBar_1.TabBarStyle1; } });
|
|
188
188
|
var themes_2 = require("./v2/themes");
|
|
@@ -196,6 +196,3 @@ var DateRangePicker_2 = require("./v2/components/DateRangePicker");
|
|
|
196
196
|
Object.defineProperty(exports, "DateRangePickerV2", { enumerable: true, get: function () { return DateRangePicker_2.DateRangePicker; } });
|
|
197
197
|
// V2 new ready components
|
|
198
198
|
// export * from './v2/components/TextInputs';
|
|
199
|
-
var DatePickerShadCN_1 = require("./v2/components/DatePickerShadCN");
|
|
200
|
-
Object.defineProperty(exports, "DatePickerWithRangeV3", { enumerable: true, get: function () { return DatePickerShadCN_1.DatePickerWithRangeV3; } });
|
|
201
|
-
__exportStar(require("./components/shadcn"), exports);
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Playground = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var Playground_1 = require("../../../components/Playground");
|
|
9
|
-
var DatePickerShadCN_1 = require("../../../v2/components/DatePickerShadCN");
|
|
10
9
|
exports.default = {
|
|
11
10
|
title: "Components/Playground",
|
|
12
11
|
// argTypes:{
|
|
@@ -16,7 +15,6 @@ exports.default = {
|
|
|
16
15
|
};
|
|
17
16
|
var Playground = function (args) {
|
|
18
17
|
return (react_1.default.createElement("div", null,
|
|
19
|
-
react_1.default.createElement("button", { className: "bg-red-100 h-10 w-10" }, "Tag button")
|
|
20
|
-
react_1.default.createElement(DatePickerShadCN_1.DatePickerWithRangeV3, null)));
|
|
18
|
+
react_1.default.createElement("button", { className: "bg-red-100 h-10 w-10" }, "Tag button")));
|
|
21
19
|
};
|
|
22
20
|
exports.Playground = Playground;
|
|
@@ -16,9 +16,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DatePicker_ = exports.DateRangePicker_ = void 0;
|
|
18
18
|
var react_1 = require("react");
|
|
19
|
-
// import { DateRangePicker } from "../../../v2/components/DateRangePicker";
|
|
20
19
|
var DatePicker_1 = __importDefault(require("../../../v2/components/DatePicker"));
|
|
21
|
-
var
|
|
20
|
+
var index_1 = require("../../../v2/components/DateRangePicker/index");
|
|
22
21
|
exports.default = {
|
|
23
22
|
title: 'Oolib V 2.0/components/Date',
|
|
24
23
|
};
|
|
@@ -35,7 +34,7 @@ var DateRangePicker_ = function (args) {
|
|
|
35
34
|
backgroundColor: args.invert && greyColor100,
|
|
36
35
|
padding: '1rem',
|
|
37
36
|
} },
|
|
38
|
-
React.createElement(
|
|
37
|
+
React.createElement(index_1.DateRangePicker, __assign({}, args, { id: "my-date-range-picker", value: dateRange, onChange: handleDateRangeChange, label: "Date Range Picker", sublabel: "Calendar pickers default to showing today’s date when opened and only one month is shown at a time. Calendar pickers allow users to navigate through months and years, however they work best when used for recent or near future dates." }))));
|
|
39
38
|
};
|
|
40
39
|
exports.DateRangePicker_ = DateRangePicker_;
|
|
41
40
|
exports.DateRangePicker_.argTypes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oolib",
|
|
3
|
-
"version": "2.170.
|
|
3
|
+
"version": "2.170.7",
|
|
4
4
|
"description": " OKE Component Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,18 +51,13 @@
|
|
|
51
51
|
"@storybook/addon-docs": "^7.2.1",
|
|
52
52
|
"@storybook/addon-essentials": "^7.2.1",
|
|
53
53
|
"@storybook/addon-links": "^7.2.1",
|
|
54
|
-
"@storybook/addon-postcss": "^2.0.0",
|
|
55
|
-
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
56
|
-
"@storybook/addon-themes": "^7.6.20",
|
|
57
54
|
"@storybook/mdx2-csf": "^1.1.0",
|
|
58
55
|
"@storybook/react": "^7.2.1",
|
|
59
56
|
"@storybook/react-webpack5": "^7.2.1",
|
|
60
57
|
"@types/styled-components": "^5.1.26",
|
|
61
|
-
"autoprefixer": "^10.4.20",
|
|
62
58
|
"babel-loader": "^8.2.2",
|
|
63
59
|
"babel-plugin-styled-components": "^1.13.2",
|
|
64
60
|
"chromatic": "^6.1.0",
|
|
65
|
-
"postcss": "^8.5.1",
|
|
66
61
|
"copyfiles": "^2.4.1",
|
|
67
62
|
"cz-conventional-changelog": "^3.3.0",
|
|
68
63
|
"localtunnel": "^2.0.2",
|
|
@@ -73,7 +68,6 @@
|
|
|
73
68
|
"react-router-dom": "^6.28.0",
|
|
74
69
|
"semantic-release": "^18.0.0",
|
|
75
70
|
"storybook": "^7.2.1",
|
|
76
|
-
"tailwindcss": "^3.4.0",
|
|
77
71
|
"typescript": "^5.4.3"
|
|
78
72
|
},
|
|
79
73
|
"peerDependencies": {
|
|
@@ -95,8 +89,6 @@
|
|
|
95
89
|
"@lexical/react": "^0.13.1",
|
|
96
90
|
"@lexical/table": "^0.13.1",
|
|
97
91
|
"@material/material-color-utilities": "^0.3.0",
|
|
98
|
-
"@radix-ui/react-popover": "^1.1.0",
|
|
99
|
-
"@radix-ui/react-slot": "^1.1.1",
|
|
100
92
|
"@react-hook/resize-observer": "^1.2.6",
|
|
101
93
|
"babel-polyfill": "^6.26.0",
|
|
102
94
|
"d3": "^7.8.5",
|
|
@@ -114,11 +106,6 @@
|
|
|
114
106
|
"phosphor-react": "^1.4.1",
|
|
115
107
|
"react-datepicker": "^7.6.0",
|
|
116
108
|
"react-player": "^2.12.0",
|
|
117
|
-
"recharts": "^2.12.7"
|
|
118
|
-
"react-day-picker": "^8.10.1",
|
|
119
|
-
"clsx": "^2.1.1",
|
|
120
|
-
"date-fns": "^2.0.0",
|
|
121
|
-
"tailwind-merge": "^2.6.0",
|
|
122
|
-
"tailwindcss-animate": "^1.0.7"
|
|
109
|
+
"recharts": "^2.12.7"
|
|
123
110
|
}
|
|
124
111
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { DayPicker } from "react-day-picker";
|
|
3
|
-
export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
|
|
4
|
-
className?: string;
|
|
5
|
-
classNames?: Record<string, string>;
|
|
6
|
-
showOutsideDays?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
|
|
9
|
-
declare namespace Calendar {
|
|
10
|
-
var displayName: string;
|
|
11
|
-
}
|
|
12
|
-
export { Calendar };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
-
var t = {};
|
|
48
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
-
t[p] = s[p];
|
|
50
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
-
t[p[i]] = s[p[i]];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
};
|
|
57
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.Calendar = Calendar;
|
|
59
|
-
var React = __importStar(require("react"));
|
|
60
|
-
var icons_1 = require("../../icons");
|
|
61
|
-
var react_day_picker_1 = require("react-day-picker");
|
|
62
|
-
var twmerge_1 = require("../../utils/twmerge");
|
|
63
|
-
var CaretLeft = icons_1.icons.CaretLeft, CaretRight = icons_1.icons.CaretRight;
|
|
64
|
-
if (!CaretLeft || !CaretRight) {
|
|
65
|
-
console.error('Required icons are not available calender carets');
|
|
66
|
-
}
|
|
67
|
-
function Calendar(_a) {
|
|
68
|
-
var className = _a.className, classNames = _a.classNames, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, props = __rest(_a, ["className", "classNames", "showOutsideDays"]);
|
|
69
|
-
return (React.createElement(react_day_picker_1.DayPicker, __assign({ showOutsideDays: showOutsideDays, className: (0, twmerge_1.cn)("p-3", className !== null && className !== void 0 ? className : ''), classNames: __assign({ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0", month: "space-y-4", caption: "flex justify-center pt-1 relative items-center", caption_label: "text-sm font-medium", nav: "space-x-1 flex items-center", nav_button: "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", nav_button_previous: "absolute left-1", nav_button_next: "absolute right-1", table: "w-full border-collapse space-y-1", head_row: "flex", head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]", row: "flex w-full mt-2", cell: (0, twmerge_1.cn)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md", (props === null || props === void 0 ? void 0 : props.mode) === "range"
|
|
70
|
-
? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
|
|
71
|
-
: "[&:has([aria-selected])]:rounded-md"), day: "h-8 w-8 p-0 font-normal aria-selected:opacity-100", day_range_start: "day-range-start", day_range_end: "day-range-end", day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground", day_today: "bg-accent text-accent-foreground", day_outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground", day_disabled: "text-muted-foreground opacity-50", day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground", day_hidden: "invisible" }, classNames), components: {
|
|
72
|
-
IconLeft: function (_a) {
|
|
73
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
74
|
-
return (React.createElement(CaretLeft, __assign({ className: (0, twmerge_1.cn)("h-4 w-4", className !== null && className !== void 0 ? className : '') }, props)));
|
|
75
|
-
},
|
|
76
|
-
IconRight: function (_a) {
|
|
77
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
78
|
-
return (React.createElement(CaretRight, __assign({ className: (0, twmerge_1.cn)("h-4 w-4", className !== null && className !== void 0 ? className : '') }, props)));
|
|
79
|
-
},
|
|
80
|
-
} }, props)));
|
|
81
|
-
}
|
|
82
|
-
Calendar.displayName = "Calendar";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Calendar = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = void 0;
|
|
4
|
-
var popover_1 = require("./popover");
|
|
5
|
-
Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
|
|
6
|
-
Object.defineProperty(exports, "PopoverTrigger", { enumerable: true, get: function () { return popover_1.PopoverTrigger; } });
|
|
7
|
-
Object.defineProperty(exports, "PopoverContent", { enumerable: true, get: function () { return popover_1.PopoverContent; } });
|
|
8
|
-
Object.defineProperty(exports, "PopoverAnchor", { enumerable: true, get: function () { return popover_1.PopoverAnchor; } });
|
|
9
|
-
var calendar_1 = require("./calendar");
|
|
10
|
-
Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return calendar_1.Calendar; } });
|
|
@@ -1,7 +0,0 @@
|
|
|
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 PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
-
var t = {};
|
|
48
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
-
t[p] = s[p];
|
|
50
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
-
t[p[i]] = s[p[i]];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
};
|
|
57
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = void 0;
|
|
59
|
-
var React = __importStar(require("react"));
|
|
60
|
-
var PopoverPrimitive = __importStar(require("@radix-ui/react-popover"));
|
|
61
|
-
var twmerge_1 = require("../../utils/twmerge");
|
|
62
|
-
var Popover = PopoverPrimitive.Root;
|
|
63
|
-
exports.Popover = Popover;
|
|
64
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
65
|
-
exports.PopoverTrigger = PopoverTrigger;
|
|
66
|
-
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
67
|
-
exports.PopoverAnchor = PopoverAnchor;
|
|
68
|
-
var PopoverContent = React.forwardRef(function (_a, ref) {
|
|
69
|
-
var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
70
|
-
return (React.createElement(PopoverPrimitive.Portal, null,
|
|
71
|
-
React.createElement(PopoverPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: (0, twmerge_1.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props))));
|
|
72
|
-
});
|
|
73
|
-
exports.PopoverContent = PopoverContent;
|
|
74
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName || 'PopoverContent';
|
package/dist/utils/twmerge.d.ts
DELETED
package/dist/utils/twmerge.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cn = cn;
|
|
4
|
-
var clsx_1 = require("clsx");
|
|
5
|
-
var tailwind_merge_1 = require("tailwind-merge");
|
|
6
|
-
function cn() {
|
|
7
|
-
var inputs = [];
|
|
8
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9
|
-
inputs[_i] = arguments[_i];
|
|
10
|
-
}
|
|
11
|
-
return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export function DatePickerWithRangeV3({ className, value, onChange, id, readOnly, futureDateOnly, previousDateOnly, allowPresentlyOngoing, invert, disabled, debug, startDateLabel, endDateLabel, withPortal, }: {
|
|
2
|
-
className: any;
|
|
3
|
-
value?: any[];
|
|
4
|
-
onChange: any;
|
|
5
|
-
id: any;
|
|
6
|
-
readOnly?: boolean;
|
|
7
|
-
futureDateOnly?: boolean;
|
|
8
|
-
previousDateOnly?: boolean;
|
|
9
|
-
allowPresentlyOngoing?: boolean;
|
|
10
|
-
invert?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
debug?: boolean;
|
|
13
|
-
startDateLabel?: string;
|
|
14
|
-
endDateLabel?: string;
|
|
15
|
-
withPortal?: boolean;
|
|
16
|
-
}): React.JSX.Element;
|
|
17
|
-
import React from "react";
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.DatePickerWithRangeV3 = DatePickerWithRangeV3;
|
|
37
|
-
var react_1 = __importStar(require("react"));
|
|
38
|
-
var popover_1 = require("../../../components/shadcn/popover");
|
|
39
|
-
var TextInputs_1 = require("../TextInputs");
|
|
40
|
-
var calendar_1 = require("../../../components/shadcn/calendar");
|
|
41
|
-
var date_fns_1 = require("date-fns");
|
|
42
|
-
var twmerge_1 = require("../../../utils/twmerge");
|
|
43
|
-
function DatePickerWithRangeV3(_a) {
|
|
44
|
-
var className = _a.className, _b = _a.value, value = _b === void 0 ? [null, null] : _b, onChange = _a.onChange, id = _a.id, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.futureDateOnly, futureDateOnly = _d === void 0 ? false : _d, _e = _a.previousDateOnly, previousDateOnly = _e === void 0 ? false : _e, _f = _a.allowPresentlyOngoing, allowPresentlyOngoing = _f === void 0 ? false : _f, _g = _a.invert, invert = _g === void 0 ? false : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.debug, debug = _j === void 0 ? false : _j, _k = _a.startDateLabel, startDateLabel = _k === void 0 ? "Start Date" : _k, _l = _a.endDateLabel, endDateLabel = _l === void 0 ? "End Date" : _l, _m = _a.withPortal, withPortal = _m === void 0 ? false : _m;
|
|
45
|
-
var _o = (0, react_1.useState)(""), inputValue = _o[0], setInputValue = _o[1];
|
|
46
|
-
var _p = (0, react_1.useState)(false), isOpen = _p[0], setIsOpen = _p[1];
|
|
47
|
-
var currentDate = new Date();
|
|
48
|
-
currentDate.setHours(0, 0, 0, 0);
|
|
49
|
-
var yesterday = new Date(currentDate);
|
|
50
|
-
yesterday.setDate(currentDate.getDate() - 1);
|
|
51
|
-
// Update input value when controlled value changes
|
|
52
|
-
(0, react_1.useEffect)(function () {
|
|
53
|
-
if (value[0]) {
|
|
54
|
-
if (value[1] === null) {
|
|
55
|
-
setInputValue("".concat((0, date_fns_1.format)(value[0], "PP"), " - Ongoing"));
|
|
56
|
-
}
|
|
57
|
-
else if (value[1]) {
|
|
58
|
-
setInputValue("".concat((0, date_fns_1.format)(value[0], "PP"), " - ").concat((0, date_fns_1.format)(value[1], "PP")));
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
setInputValue((0, date_fns_1.format)(value[0], "PP"));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
setInputValue("");
|
|
66
|
-
}
|
|
67
|
-
}, [value]);
|
|
68
|
-
var handleInputChange = function (inputVal) {
|
|
69
|
-
setInputValue(inputVal);
|
|
70
|
-
if (readOnly)
|
|
71
|
-
return;
|
|
72
|
-
var dates = inputVal.split("-").map(function (d) { return d.trim(); });
|
|
73
|
-
if (dates.length === 2) {
|
|
74
|
-
var fromDate = (0, date_fns_1.parse)(dates[0], "PP", new Date());
|
|
75
|
-
var toDate = dates[1].toLowerCase() === "ongoing" ? null :
|
|
76
|
-
(0, date_fns_1.parse)(dates[1], "PP", new Date());
|
|
77
|
-
if ((0, date_fns_1.isValid)(fromDate) && (toDate === null || (0, date_fns_1.isValid)(toDate))) {
|
|
78
|
-
if (isDateValid(fromDate) && (toDate === null || isDateValid(toDate))) {
|
|
79
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(id, [fromDate, toDate]);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else if (dates.length === 1) {
|
|
84
|
-
var singleDate = (0, date_fns_1.parse)(dates[0], "PP", new Date());
|
|
85
|
-
if ((0, date_fns_1.isValid)(singleDate) && isDateValid(singleDate)) {
|
|
86
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(id, [singleDate, undefined]);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
var isDateValid = function (date) {
|
|
91
|
-
if (!date)
|
|
92
|
-
return true;
|
|
93
|
-
if (futureDateOnly && !invert) {
|
|
94
|
-
return isFuture(date) || (allowPresentlyOngoing && isToday(date));
|
|
95
|
-
}
|
|
96
|
-
if (previousDateOnly && !invert) {
|
|
97
|
-
return isPast(date) || isToday(date);
|
|
98
|
-
}
|
|
99
|
-
return true;
|
|
100
|
-
};
|
|
101
|
-
var getMinDate = function (isEndDate) {
|
|
102
|
-
if (futureDateOnly && !invert) {
|
|
103
|
-
return currentDate;
|
|
104
|
-
}
|
|
105
|
-
if (isEndDate && value[0]) {
|
|
106
|
-
return value[0];
|
|
107
|
-
}
|
|
108
|
-
return undefined;
|
|
109
|
-
};
|
|
110
|
-
var getMaxDate = function () {
|
|
111
|
-
if (previousDateOnly && !invert) {
|
|
112
|
-
return yesterday;
|
|
113
|
-
}
|
|
114
|
-
return undefined;
|
|
115
|
-
};
|
|
116
|
-
var handleCalendarSelect = function (dates) {
|
|
117
|
-
if (readOnly)
|
|
118
|
-
return;
|
|
119
|
-
if (!dates) {
|
|
120
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(id, [null, null]);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
var from = dates.from, to = dates.to;
|
|
124
|
-
if (from && isDateValid(from)) {
|
|
125
|
-
if (to && isDateValid(to)) {
|
|
126
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(id, [from, to]);
|
|
127
|
-
setIsOpen(false);
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(id, [from, undefined]);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
var handleOngoingToggle = function (checked) {
|
|
135
|
-
if (value[0]) {
|
|
136
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(id, [value[0], checked ? null : undefined]);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
if (debug) {
|
|
140
|
-
console.log({
|
|
141
|
-
id: id,
|
|
142
|
-
value: value,
|
|
143
|
-
inputValue: inputValue,
|
|
144
|
-
isOpen: isOpen,
|
|
145
|
-
readOnly: readOnly,
|
|
146
|
-
futureDateOnly: futureDateOnly,
|
|
147
|
-
previousDateOnly: previousDateOnly,
|
|
148
|
-
allowPresentlyOngoing: allowPresentlyOngoing,
|
|
149
|
-
invert: invert,
|
|
150
|
-
disabled: disabled
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
return (react_1.default.createElement("div", { className: (0, twmerge_1.cn)("grid gap-2", className) },
|
|
154
|
-
react_1.default.createElement("div", { className: "flex flex-col gap-1" },
|
|
155
|
-
react_1.default.createElement(popover_1.Popover, { open: isOpen && !disabled && !readOnly, onOpenChange: setIsOpen },
|
|
156
|
-
react_1.default.createElement(popover_1.PopoverTrigger, { asChild: true },
|
|
157
|
-
react_1.default.createElement("div", { className: "relative" },
|
|
158
|
-
react_1.default.createElement(TextInputs_1.TextInput, { id: id, placeholder: "Pick a date range", value: inputValue, onChange: function (id, value) { return handleInputChange(value); }, className: "w-[225px]", icon: "CalendarBlank", disabled: disabled, readOnly: readOnly }))),
|
|
159
|
-
react_1.default.createElement(popover_1.PopoverContent, { className: "w-auto p-0", align: "start" },
|
|
160
|
-
react_1.default.createElement(calendar_1.Calendar, { initialFocus: true, mode: "range", defaultMonth: value[0] || undefined, selected: value[1] === null ? { from: value[0], to: undefined } :
|
|
161
|
-
{ from: value[0], to: value[1] }, onSelect: function (range) { return handleCalendarSelect(range); }, numberOfMonths: 2, disabled: function (date) {
|
|
162
|
-
if (disabled)
|
|
163
|
-
return true;
|
|
164
|
-
if (readOnly)
|
|
165
|
-
return true;
|
|
166
|
-
var minDate = getMinDate(false);
|
|
167
|
-
var maxDate = getMaxDate();
|
|
168
|
-
if (minDate && date < minDate)
|
|
169
|
-
return true;
|
|
170
|
-
if (maxDate && date > maxDate)
|
|
171
|
-
return true;
|
|
172
|
-
return false;
|
|
173
|
-
} }))),
|
|
174
|
-
debug && (react_1.default.createElement("pre", { className: "mt-4 p-4 bg-gray-100 rounded" }, JSON.stringify({ value: value, inputValue: inputValue }, null, 2))))));
|
|
175
|
-
}
|
|
176
|
-
// DatePickerWithRangeV3
|
|
177
|
-
// function DatePickerDemo() {
|
|
178
|
-
// const [date, setDate] = React.useState();
|
|
179
|
-
// return (
|
|
180
|
-
// <Popover>
|
|
181
|
-
// <PopoverTrigger asChild>
|
|
182
|
-
// <Button
|
|
183
|
-
// variant={"outline"}
|
|
184
|
-
// className={cn(
|
|
185
|
-
// "w-[280px] justify-start text-left font-normal",
|
|
186
|
-
// !date && "text-muted-foreground"
|
|
187
|
-
// )}
|
|
188
|
-
// >
|
|
189
|
-
// <CalendarIcon />
|
|
190
|
-
// {date ? format(date, "PPP") : <span>Pick a date</span>}
|
|
191
|
-
// </Button>
|
|
192
|
-
// </PopoverTrigger>
|
|
193
|
-
// <PopoverContent className="w-auto p-0">
|
|
194
|
-
// <Calendar
|
|
195
|
-
// mode="single"
|
|
196
|
-
// selected={date}
|
|
197
|
-
// onSelect={setDate}
|
|
198
|
-
// initialFocus
|
|
199
|
-
// />
|
|
200
|
-
// </PopoverContent>
|
|
201
|
-
// </Popover>
|
|
202
|
-
// );
|
|
203
|
-
// }
|
|
204
|
-
// function DatePickerWithRange({ className }) {
|
|
205
|
-
// const [date, setDate] = React.useState({
|
|
206
|
-
// from: new Date(2022, 0, 20),
|
|
207
|
-
// to: addDays(new Date(2022, 0, 20), 20),
|
|
208
|
-
// });
|
|
209
|
-
// return (
|
|
210
|
-
// <div className={cn("grid gap-2", className)}>
|
|
211
|
-
// <Popover>
|
|
212
|
-
// <PopoverTrigger asChild>
|
|
213
|
-
// <Button
|
|
214
|
-
// id="date"
|
|
215
|
-
// variant={"outline"}
|
|
216
|
-
// className={cn(
|
|
217
|
-
// "w-[300px] justify-start text-left font-normal",
|
|
218
|
-
// !date && "text-muted-foreground"
|
|
219
|
-
// )}
|
|
220
|
-
// >
|
|
221
|
-
// <CalendarIcon />
|
|
222
|
-
// {date?.from ? (
|
|
223
|
-
// date.to ? (
|
|
224
|
-
// <>
|
|
225
|
-
// {format(date.from, "LLL dd, y")} -{" "}
|
|
226
|
-
// {format(date.to, "LLL dd, y")}
|
|
227
|
-
// </>
|
|
228
|
-
// ) : (
|
|
229
|
-
// format(date.from, "LLL dd, y")
|
|
230
|
-
// )
|
|
231
|
-
// ) : (
|
|
232
|
-
// <span>Pick a date</span>
|
|
233
|
-
// )}
|
|
234
|
-
// </Button>
|
|
235
|
-
// </PopoverTrigger>
|
|
236
|
-
// <PopoverContent className="w-auto p-0" align="start">
|
|
237
|
-
// <Calendar
|
|
238
|
-
// initialFocus
|
|
239
|
-
// mode="range"
|
|
240
|
-
// defaultMonth={date?.from}
|
|
241
|
-
// selected={date}
|
|
242
|
-
// onSelect={setDate}
|
|
243
|
-
// numberOfMonths={2}
|
|
244
|
-
// />
|
|
245
|
-
// </PopoverContent>
|
|
246
|
-
// </Popover>
|
|
247
|
-
// </div>
|
|
248
|
-
// );
|
|
249
|
-
// }
|
|
250
|
-
// function DatePickerWithRange2({ className }) {
|
|
251
|
-
// const [date, setDate] = React.useState();
|
|
252
|
-
// const [inputValue, setInputValue] = React.useState("");
|
|
253
|
-
// const [isOpen, setIsOpen] = React.useState(false);
|
|
254
|
-
// const handleInputChange = (value) => {
|
|
255
|
-
// // const value = event.target.value;
|
|
256
|
-
// setInputValue(value);
|
|
257
|
-
// const dates = value.split("-").map((d) => d.trim());
|
|
258
|
-
// if (dates.length === 2) {
|
|
259
|
-
// const fromDate = parse(dates[0], "PP", new Date());
|
|
260
|
-
// const toDate = parse(dates[1], "PP", new Date());
|
|
261
|
-
// if (isValid(fromDate) && isValid(toDate)) {
|
|
262
|
-
// setDate({ from: fromDate, to: toDate });
|
|
263
|
-
// }
|
|
264
|
-
// } else if (dates.length === 1) {
|
|
265
|
-
// const singleDate = parse(dates[0], "PP", new Date());
|
|
266
|
-
// if (isValid(singleDate)) {
|
|
267
|
-
// setDate({ from: singleDate, to: undefined });
|
|
268
|
-
// }
|
|
269
|
-
// }
|
|
270
|
-
// };
|
|
271
|
-
// React.useEffect(() => {
|
|
272
|
-
// if (date?.from) {
|
|
273
|
-
// if (date.to) {
|
|
274
|
-
// setInputValue(`${format(date.from, "PP")} - ${format(date.to, "PP")}`);
|
|
275
|
-
// } else {
|
|
276
|
-
// setInputValue(format(date.from, "PP"));
|
|
277
|
-
// }
|
|
278
|
-
// }
|
|
279
|
-
// }, [date]);
|
|
280
|
-
// return (
|
|
281
|
-
// <div className={cn("grid gap-2", className)}>
|
|
282
|
-
// <Popover open={isOpen} onOpenChange={setIsOpen}>
|
|
283
|
-
// <PopoverTrigger asChild>
|
|
284
|
-
// <div className="relative">
|
|
285
|
-
// <TextInput
|
|
286
|
-
// id="date"
|
|
287
|
-
// placeholder="Pick a date range"
|
|
288
|
-
// value={inputValue}
|
|
289
|
-
// onChange={(id, value) => handleInputChange(value)}
|
|
290
|
-
// className="w-max"
|
|
291
|
-
// icon={"CalendarBlank"}
|
|
292
|
-
// />
|
|
293
|
-
// </div>
|
|
294
|
-
// </PopoverTrigger>
|
|
295
|
-
// <PopoverContent className="w-auto p-0" align="start">
|
|
296
|
-
// <Calendar
|
|
297
|
-
// initialFocus
|
|
298
|
-
// mode="range"
|
|
299
|
-
// defaultMonth={date?.from}
|
|
300
|
-
// selected={date}
|
|
301
|
-
// onSelect={(newDate) => {
|
|
302
|
-
// setDate(newDate);
|
|
303
|
-
// if (newDate?.to) {
|
|
304
|
-
// setIsOpen(false);
|
|
305
|
-
// }
|
|
306
|
-
// }}
|
|
307
|
-
// numberOfMonths={2}
|
|
308
|
-
// />
|
|
309
|
-
// </PopoverContent>
|
|
310
|
-
// </Popover>
|
|
311
|
-
// </div>
|
|
312
|
-
// );
|
|
313
|
-
// }
|
package/postcss.config.js
DELETED
package/tailwind.config.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
content: [
|
|
4
|
-
"./src/**/*.{js,jsx,ts,tsx}",
|
|
5
|
-
],
|
|
6
|
-
darkMode: ['class', '[data-mode="dark"]'],
|
|
7
|
-
theme: {
|
|
8
|
-
extend: {
|
|
9
|
-
colors: {
|
|
10
|
-
background: 'hsl(var(--background))',
|
|
11
|
-
foreground: 'hsl(var(--foreground))',
|
|
12
|
-
card: {
|
|
13
|
-
DEFAULT: 'hsl(var(--card))',
|
|
14
|
-
foreground: 'hsl(var(--card-foreground))'
|
|
15
|
-
},
|
|
16
|
-
popover: {
|
|
17
|
-
DEFAULT: 'hsl(var(--popover))',
|
|
18
|
-
foreground: 'hsl(var(--popover-foreground))'
|
|
19
|
-
},
|
|
20
|
-
primary: {
|
|
21
|
-
DEFAULT: 'hsl(var(--primary))',
|
|
22
|
-
foreground: 'hsl(var(--primary-foreground))'
|
|
23
|
-
},
|
|
24
|
-
secondary: {
|
|
25
|
-
DEFAULT: 'hsl(var(--secondary))',
|
|
26
|
-
foreground: 'hsl(var(--secondary-foreground))'
|
|
27
|
-
},
|
|
28
|
-
muted: {
|
|
29
|
-
DEFAULT: 'hsl(var(--muted))',
|
|
30
|
-
foreground: 'hsl(var(--muted-foreground))'
|
|
31
|
-
},
|
|
32
|
-
accent: {
|
|
33
|
-
DEFAULT: 'hsl(var(--accent))',
|
|
34
|
-
foreground: 'hsl(var(--accent-foreground))'
|
|
35
|
-
},
|
|
36
|
-
destructive: {
|
|
37
|
-
DEFAULT: 'hsl(var(--destructive))',
|
|
38
|
-
foreground: 'hsl(var(--destructive-foreground))'
|
|
39
|
-
},
|
|
40
|
-
border: 'hsl(var(--border))',
|
|
41
|
-
input: 'hsl(var(--input))',
|
|
42
|
-
ring: 'hsl(var(--ring))',
|
|
43
|
-
chart: {
|
|
44
|
-
'1': 'hsl(var(--chart-1))',
|
|
45
|
-
'2': 'hsl(var(--chart-2))',
|
|
46
|
-
'3': 'hsl(var(--chart-3))',
|
|
47
|
-
'4': 'hsl(var(--chart-4))',
|
|
48
|
-
'5': 'hsl(var(--chart-5))'
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
borderRadius: {
|
|
52
|
-
lg: 'var(--radius)',
|
|
53
|
-
md: 'calc(var(--radius) - 2px)',
|
|
54
|
-
sm: 'calc(var(--radius) - 4px)'
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
plugins: [require("tailwindcss-animate")],
|
|
59
|
-
}
|
|
60
|
-
|