@syscore/ui-library 2.0.0-beta-publish-workflow-beta.18 → 2.0.0-beta-publish-workflow-beta.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2
|
+
import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
3
|
import { DayPicker } from "react-day-picker";
|
|
4
4
|
|
|
5
5
|
import { cn } from "@/lib/utils";
|
|
@@ -20,31 +20,38 @@ function Calendar({
|
|
|
20
20
|
classNames={{
|
|
21
21
|
months: "calendar-months",
|
|
22
22
|
month: "calendar-month",
|
|
23
|
-
|
|
23
|
+
month_caption: "calendar-caption",
|
|
24
24
|
caption_label: "calendar-caption-label",
|
|
25
25
|
nav: "calendar-nav",
|
|
26
|
-
|
|
26
|
+
button_previous: cn(
|
|
27
27
|
buttonVariants({ variant: "general-secondary" }),
|
|
28
28
|
"calendar-nav-button",
|
|
29
|
+
"calendar-nav-button-previous",
|
|
29
30
|
),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
button_next: cn(
|
|
32
|
+
buttonVariants({ variant: "general-secondary" }),
|
|
33
|
+
"calendar-nav-button",
|
|
34
|
+
"calendar-nav-button-next",
|
|
35
|
+
),
|
|
36
|
+
month_grid: "calendar-table",
|
|
37
|
+
weekdays: "calendar-head-row",
|
|
38
|
+
weekday: "calendar-head-cell",
|
|
39
|
+
week: "calendar-row",
|
|
40
|
+
day: "calendar-cell",
|
|
41
|
+
day_button: cn(
|
|
38
42
|
buttonVariants({ variant: "general-tertiary" }),
|
|
39
43
|
"calendar-day",
|
|
40
44
|
),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
range_end: "calendar-day-range-end",
|
|
46
|
+
selected: "calendar-day-selected",
|
|
47
|
+
today: "calendar-day-today",
|
|
48
|
+
outside: "calendar-day-outside",
|
|
49
|
+
disabled: "calendar-day-disabled",
|
|
50
|
+
range_middle: "calendar-day-range-middle",
|
|
51
|
+
hidden: "calendar-day-hidden",
|
|
52
|
+
dropdowns: "calendar-dropdowns",
|
|
53
|
+
dropdown_root: "calendar-dropdown-root",
|
|
54
|
+
dropdown: "calendar-dropdown",
|
|
48
55
|
...classNames,
|
|
49
56
|
}}
|
|
50
57
|
components={{
|
|
@@ -52,7 +59,10 @@ function Calendar({
|
|
|
52
59
|
if (props.orientation === "left") {
|
|
53
60
|
return <ChevronLeft className="icon-4" />;
|
|
54
61
|
}
|
|
55
|
-
|
|
62
|
+
if (props.orientation === "right") {
|
|
63
|
+
return <ChevronRight className="icon-4" />;
|
|
64
|
+
}
|
|
65
|
+
return <ChevronDown className="icon-3" />;
|
|
56
66
|
},
|
|
57
67
|
}}
|
|
58
68
|
{...props}
|
|
@@ -37,7 +37,7 @@ const SelectScrollUpButton = React.forwardRef<
|
|
|
37
37
|
>(({ className, ...props }, ref) => (
|
|
38
38
|
<SelectPrimitive.ScrollUpButton
|
|
39
39
|
ref={ref}
|
|
40
|
-
className={cn("select-scroll-button", className)}
|
|
40
|
+
className={cn("select-scroll-button select-scroll-up", className)}
|
|
41
41
|
{...props}
|
|
42
42
|
>
|
|
43
43
|
<UtilityChevronDown />
|
package/client/global.css
CHANGED
|
@@ -6098,6 +6098,10 @@ body {
|
|
|
6098
6098
|
padding-bottom: 0.25rem;
|
|
6099
6099
|
}
|
|
6100
6100
|
|
|
6101
|
+
.select-scroll-up svg {
|
|
6102
|
+
transform: rotate(180deg);
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6101
6105
|
.select-content {
|
|
6102
6106
|
position: relative;
|
|
6103
6107
|
z-index: 50;
|
|
@@ -9232,6 +9236,7 @@ body {
|
|
|
9232
9236
|
|
|
9233
9237
|
/* Calendar Styles */
|
|
9234
9238
|
.calendar {
|
|
9239
|
+
position: relative;
|
|
9235
9240
|
padding: 0.75rem;
|
|
9236
9241
|
}
|
|
9237
9242
|
|
|
@@ -9268,10 +9273,63 @@ body {
|
|
|
9268
9273
|
font-weight: 500;
|
|
9269
9274
|
}
|
|
9270
9275
|
|
|
9276
|
+
/* Month/year pickers (captionLayout="dropdown"): v9 lays a real <select> over a visible label. */
|
|
9277
|
+
.calendar-dropdowns {
|
|
9278
|
+
display: flex;
|
|
9279
|
+
align-items: center;
|
|
9280
|
+
gap: 0.5rem;
|
|
9281
|
+
}
|
|
9282
|
+
|
|
9283
|
+
.calendar-dropdowns .calendar-dropdown-root {
|
|
9284
|
+
position: relative;
|
|
9285
|
+
display: inline-flex;
|
|
9286
|
+
align-items: center;
|
|
9287
|
+
gap: 0.125rem;
|
|
9288
|
+
padding: 0.125rem 0.25rem;
|
|
9289
|
+
border-radius: calc(var(--radius-md, 8px));
|
|
9290
|
+
}
|
|
9291
|
+
|
|
9292
|
+
.calendar-dropdowns .calendar-dropdown-root:hover {
|
|
9293
|
+
background-color: var(--color-gray-50, #f9f9fa);
|
|
9294
|
+
}
|
|
9295
|
+
|
|
9296
|
+
.calendar-dropdowns .calendar-dropdown {
|
|
9297
|
+
position: absolute;
|
|
9298
|
+
inset: 0;
|
|
9299
|
+
width: 100%;
|
|
9300
|
+
height: 100%;
|
|
9301
|
+
margin: 0;
|
|
9302
|
+
padding: 0;
|
|
9303
|
+
border: 0;
|
|
9304
|
+
opacity: 0;
|
|
9305
|
+
cursor: pointer;
|
|
9306
|
+
appearance: none;
|
|
9307
|
+
}
|
|
9308
|
+
|
|
9309
|
+
.calendar-dropdowns .calendar-dropdown:focus-visible + .calendar-caption-label {
|
|
9310
|
+
outline: 2px solid var(--color-blue-600, #2e74ad);
|
|
9311
|
+
outline-offset: 2px;
|
|
9312
|
+
border-radius: calc(var(--radius-sm, 4px));
|
|
9313
|
+
}
|
|
9314
|
+
|
|
9315
|
+
.calendar-dropdowns .calendar-caption-label {
|
|
9316
|
+
display: inline-flex;
|
|
9317
|
+
align-items: center;
|
|
9318
|
+
gap: 0.125rem;
|
|
9319
|
+
white-space: nowrap;
|
|
9320
|
+
pointer-events: none;
|
|
9321
|
+
}
|
|
9322
|
+
|
|
9323
|
+
/* react-day-picker v9: the nav is a sibling of the months, so anchor it to the calendar root. */
|
|
9271
9324
|
.calendar-nav {
|
|
9325
|
+
position: absolute;
|
|
9326
|
+
top: 0.25rem;
|
|
9327
|
+
left: 0.25rem;
|
|
9328
|
+
right: 0.25rem;
|
|
9272
9329
|
display: flex;
|
|
9273
9330
|
gap: 0.25rem;
|
|
9274
9331
|
align-items: center;
|
|
9332
|
+
justify-content: space-between;
|
|
9275
9333
|
}
|
|
9276
9334
|
|
|
9277
9335
|
.calendar-nav-button {
|
|
@@ -9287,14 +9345,9 @@ body {
|
|
|
9287
9345
|
opacity: 1;
|
|
9288
9346
|
}
|
|
9289
9347
|
|
|
9290
|
-
.calendar-nav-button-previous
|
|
9291
|
-
position: absolute;
|
|
9292
|
-
left: 0.25rem;
|
|
9293
|
-
}
|
|
9294
|
-
|
|
9348
|
+
.calendar-nav-button-previous,
|
|
9295
9349
|
.calendar-nav-button-next {
|
|
9296
|
-
position:
|
|
9297
|
-
right: 0.25rem;
|
|
9350
|
+
position: static;
|
|
9298
9351
|
}
|
|
9299
9352
|
|
|
9300
9353
|
.calendar-table {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2
|
+
import { ChevronLeft, ChevronRight, ChevronDown } from "lucide-react";
|
|
3
3
|
import { DayPicker } from "react-day-picker";
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { buttonVariants } from "./button.js";
|
|
@@ -17,31 +17,38 @@ function Calendar({
|
|
|
17
17
|
classNames: {
|
|
18
18
|
months: "calendar-months",
|
|
19
19
|
month: "calendar-month",
|
|
20
|
-
|
|
20
|
+
month_caption: "calendar-caption",
|
|
21
21
|
caption_label: "calendar-caption-label",
|
|
22
22
|
nav: "calendar-nav",
|
|
23
|
-
|
|
23
|
+
button_previous: cn(
|
|
24
24
|
buttonVariants({ variant: "general-secondary" }),
|
|
25
|
-
"calendar-nav-button"
|
|
25
|
+
"calendar-nav-button",
|
|
26
|
+
"calendar-nav-button-previous"
|
|
26
27
|
),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
button_next: cn(
|
|
29
|
+
buttonVariants({ variant: "general-secondary" }),
|
|
30
|
+
"calendar-nav-button",
|
|
31
|
+
"calendar-nav-button-next"
|
|
32
|
+
),
|
|
33
|
+
month_grid: "calendar-table",
|
|
34
|
+
weekdays: "calendar-head-row",
|
|
35
|
+
weekday: "calendar-head-cell",
|
|
36
|
+
week: "calendar-row",
|
|
37
|
+
day: "calendar-cell",
|
|
38
|
+
day_button: cn(
|
|
35
39
|
buttonVariants({ variant: "general-tertiary" }),
|
|
36
40
|
"calendar-day"
|
|
37
41
|
),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
range_end: "calendar-day-range-end",
|
|
43
|
+
selected: "calendar-day-selected",
|
|
44
|
+
today: "calendar-day-today",
|
|
45
|
+
outside: "calendar-day-outside",
|
|
46
|
+
disabled: "calendar-day-disabled",
|
|
47
|
+
range_middle: "calendar-day-range-middle",
|
|
48
|
+
hidden: "calendar-day-hidden",
|
|
49
|
+
dropdowns: "calendar-dropdowns",
|
|
50
|
+
dropdown_root: "calendar-dropdown-root",
|
|
51
|
+
dropdown: "calendar-dropdown",
|
|
45
52
|
...classNames
|
|
46
53
|
},
|
|
47
54
|
components: {
|
|
@@ -49,7 +56,10 @@ function Calendar({
|
|
|
49
56
|
if (props2.orientation === "left") {
|
|
50
57
|
return /* @__PURE__ */ jsx(ChevronLeft, { className: "icon-4" });
|
|
51
58
|
}
|
|
52
|
-
|
|
59
|
+
if (props2.orientation === "right") {
|
|
60
|
+
return /* @__PURE__ */ jsx(ChevronRight, { className: "icon-4" });
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ jsx(ChevronDown, { className: "icon-3" });
|
|
53
63
|
}
|
|
54
64
|
},
|
|
55
65
|
...props
|
|
@@ -23,7 +23,7 @@ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) =>
|
|
|
23
23
|
SelectPrimitive.ScrollUpButton,
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
|
-
className: cn("select-scroll-button", className),
|
|
26
|
+
className: cn("select-scroll-button select-scroll-up", className),
|
|
27
27
|
...props,
|
|
28
28
|
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
29
29
|
}
|