h2o-library 1.3.9 → 1.4.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.
- package/dist/components/index.d.ts +1 -0
- package/dist/components/src/calendar.d.ts +7 -1
- package/dist/components/src/date-range-picker.d.ts +10 -0
- package/dist/components/src/dropdown.d.ts +1 -0
- package/dist/css/index.css +1 -1
- package/dist/css/src/calendar.css +7 -0
- package/dist/css/src/date-range-picker.css +73 -0
- package/dist/css/src/index.css +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/src/calendar.d.ts +7 -1
- package/dist/esm/components/src/date-range-picker.d.ts +10 -0
- package/dist/esm/components/src/dropdown.d.ts +1 -0
- package/dist/esm/css/index.css +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/icon.d.ts +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/types/src/icon.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,12 @@ interface CalendarProps {
|
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
forceWeek?: boolean;
|
|
10
10
|
disabledDates?: Date[];
|
|
11
|
+
month?: Date;
|
|
12
|
+
hideHeader?: boolean;
|
|
13
|
+
hideOutsideDays?: boolean;
|
|
14
|
+
hoverDate?: Date | null;
|
|
15
|
+
onDayMouseEnter?: (date: Date) => void;
|
|
16
|
+
onDayMouseLeave?: () => void;
|
|
11
17
|
}
|
|
12
|
-
declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, }: CalendarProps) => JSX.Element | null;
|
|
18
|
+
declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, month, hideHeader, hideOutsideDays, hoverDate: externalHoverDate, onDayMouseEnter, onDayMouseLeave, }: CalendarProps) => JSX.Element | null;
|
|
13
19
|
export { Calendar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DateRangePickerProps {
|
|
3
|
+
value?: [Date | null, Date | null];
|
|
4
|
+
onChange?: (value: [Date | null, Date | null]) => void;
|
|
5
|
+
minDate?: Date;
|
|
6
|
+
maxDate?: Date;
|
|
7
|
+
disabledDates?: Date[];
|
|
8
|
+
}
|
|
9
|
+
export declare const DateRangePicker: ({ value, onChange, ...calendarProps }: DateRangePickerProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -16,5 +16,6 @@ export interface DropdownProps extends Omit<React.ButtonHTMLAttributes<HTMLButto
|
|
|
16
16
|
value?: string;
|
|
17
17
|
onChange?: (value: string) => void;
|
|
18
18
|
enableSearch?: boolean;
|
|
19
|
+
direction?: "top" | "bottom" | "auto";
|
|
19
20
|
}
|
|
20
21
|
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";
|
|
1
|
+
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/date-range-picker.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.date-range-picker {
|
|
2
|
+
display: flex;
|
|
3
|
+
background-color: hsl(var(--background));
|
|
4
|
+
border-radius: 0.5rem;
|
|
5
|
+
box-shadow: var(--primary-shadow);
|
|
6
|
+
border: 1px solid hsl(var(--primary-muted));
|
|
7
|
+
font-family: sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.date-range-picker__presets {
|
|
11
|
+
padding: 1rem;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 0.5rem;
|
|
15
|
+
border-right: 1px solid hsl(var(--muted) / 50%);
|
|
16
|
+
width: 14rem;
|
|
17
|
+
font-size: 0.875rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.date-range-picker__presets .radio-label {
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.date-range-picker__main {
|
|
25
|
+
padding: 1rem;
|
|
26
|
+
flex-grow: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.date-range-picker__display {
|
|
30
|
+
font-size: 1rem;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
margin-bottom: 1rem;
|
|
33
|
+
padding: 0 0.5rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.date-range-picker__calendars {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: 1fr 1fr;
|
|
39
|
+
gap: 1.5rem;
|
|
40
|
+
grid-template-areas:
|
|
41
|
+
"header1 header2"
|
|
42
|
+
"cal1 cal2";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.date-range-picker__calendars .calendar-container {
|
|
46
|
+
border: none;
|
|
47
|
+
box-shadow: none;
|
|
48
|
+
padding: 0;
|
|
49
|
+
max-width: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.date-range-picker__header {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
padding: 0 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.date-range-picker__header:nth-of-type(1) {
|
|
60
|
+
grid-area: header1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.date-range-picker__header:nth-of-type(2) {
|
|
64
|
+
grid-area: header2;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.date-range-picker__calendars .calendar-container:nth-of-type(1) {
|
|
68
|
+
grid-area: cal1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.date-range-picker__calendars .calendar-container:nth-of-type(2) {
|
|
72
|
+
grid-area: cal2;
|
|
73
|
+
}
|
package/dist/css/src/index.css
CHANGED
|
@@ -8,6 +8,12 @@ interface CalendarProps {
|
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
forceWeek?: boolean;
|
|
10
10
|
disabledDates?: Date[];
|
|
11
|
+
month?: Date;
|
|
12
|
+
hideHeader?: boolean;
|
|
13
|
+
hideOutsideDays?: boolean;
|
|
14
|
+
hoverDate?: Date | null;
|
|
15
|
+
onDayMouseEnter?: (date: Date) => void;
|
|
16
|
+
onDayMouseLeave?: () => void;
|
|
11
17
|
}
|
|
12
|
-
declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, }: CalendarProps) => JSX.Element | null;
|
|
18
|
+
declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, month, hideHeader, hideOutsideDays, hoverDate: externalHoverDate, onDayMouseEnter, onDayMouseLeave, }: CalendarProps) => JSX.Element | null;
|
|
13
19
|
export { Calendar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DateRangePickerProps {
|
|
3
|
+
value?: [Date | null, Date | null];
|
|
4
|
+
onChange?: (value: [Date | null, Date | null]) => void;
|
|
5
|
+
minDate?: Date;
|
|
6
|
+
maxDate?: Date;
|
|
7
|
+
disabledDates?: Date[];
|
|
8
|
+
}
|
|
9
|
+
export declare const DateRangePicker: ({ value, onChange, ...calendarProps }: DateRangePickerProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -16,5 +16,6 @@ export interface DropdownProps extends Omit<React.ButtonHTMLAttributes<HTMLButto
|
|
|
16
16
|
value?: string;
|
|
17
17
|
onChange?: (value: string) => void;
|
|
18
18
|
enableSearch?: boolean;
|
|
19
|
+
direction?: "top" | "bottom" | "auto";
|
|
19
20
|
}
|
|
20
21
|
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/esm/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";
|
|
1
|
+
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/date-range-picker.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";
|