oolib 2.170.4 → 2.170.5

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.
@@ -1,6 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { DayPicker } from "react-day-picker";
3
- export type CalendarProps = React.ComponentProps<typeof DayPicker>;
3
+ export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
4
+ className?: string;
5
+ classNames?: Record<string, string>;
6
+ showOutsideDays?: boolean;
7
+ };
4
8
  declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
5
9
  declare namespace Calendar {
6
10
  var displayName: string;
@@ -61,18 +61,21 @@ var icons_1 = require("../../icons");
61
61
  var react_day_picker_1 = require("react-day-picker");
62
62
  var twmerge_1 = require("../../utils/twmerge");
63
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
+ }
64
67
  function Calendar(_a) {
65
68
  var className = _a.className, classNames = _a.classNames, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, props = __rest(_a, ["className", "classNames", "showOutsideDays"]);
66
- return (React.createElement(react_day_picker_1.DayPicker, __assign({ showOutsideDays: showOutsideDays, className: (0, twmerge_1.cn)("p-3", 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.mode === "range"
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"
67
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"
68
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: {
69
72
  IconLeft: function (_a) {
70
73
  var className = _a.className, props = __rest(_a, ["className"]);
71
- return (React.createElement(CaretLeft, __assign({ className: (0, twmerge_1.cn)("h-4 w-4", className) }, props)));
74
+ return (React.createElement(CaretLeft, __assign({ className: (0, twmerge_1.cn)("h-4 w-4", className !== null && className !== void 0 ? className : '') }, props)));
72
75
  },
73
76
  IconRight: function (_a) {
74
77
  var className = _a.className, props = __rest(_a, ["className"]);
75
- return (React.createElement(CaretRight, __assign({ className: (0, twmerge_1.cn)("h-4 w-4", className) }, props)));
78
+ return (React.createElement(CaretRight, __assign({ className: (0, twmerge_1.cn)("h-4 w-4", className !== null && className !== void 0 ? className : '') }, props)));
76
79
  },
77
80
  } }, props)));
78
81
  }
@@ -71,4 +71,4 @@ var PopoverContent = React.forwardRef(function (_a, ref) {
71
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
72
  });
73
73
  exports.PopoverContent = PopoverContent;
74
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
74
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName || 'PopoverContent';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.170.4",
3
+ "version": "2.170.5",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",