@nearform/quantum 1.4.4 → 1.4.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.
- package/dist/global.css +59 -44
- package/dist/global.css.map +1 -1
- package/dist/index.js +74 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -860,13 +860,38 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
|
860
860
|
var calendarVariants = (0, import_class_variance_authority4.cva)([], {
|
|
861
861
|
variants: {
|
|
862
862
|
component: {
|
|
863
|
-
months: ["flex", "flex-
|
|
864
|
-
month: ["flex", "flex-col", "gap-2"],
|
|
865
|
-
|
|
863
|
+
months: ["relative", "flex", "flex-row", "gap-4"],
|
|
864
|
+
month: ["flex", "w-full", "flex-col", "gap-2"],
|
|
865
|
+
month_caption: ["flex", "h-7", "items-center", "justify-center"],
|
|
866
866
|
caption_label: ["text-sm", "font-medium"],
|
|
867
|
-
nav
|
|
868
|
-
|
|
869
|
-
|
|
867
|
+
// v9 renders `nav` as a sibling of the months rather than inside the
|
|
868
|
+
// caption, so it is positioned over the caption row of `months` here.
|
|
869
|
+
nav: [
|
|
870
|
+
"absolute",
|
|
871
|
+
"inset-x-0",
|
|
872
|
+
"top-0",
|
|
873
|
+
"z-10",
|
|
874
|
+
"flex",
|
|
875
|
+
"h-7",
|
|
876
|
+
"items-center",
|
|
877
|
+
"justify-between",
|
|
878
|
+
"bg-transparent",
|
|
879
|
+
"dark:text-foreground-muted-dark"
|
|
880
|
+
],
|
|
881
|
+
nav_button: [
|
|
882
|
+
"flex",
|
|
883
|
+
"h-7",
|
|
884
|
+
"w-7",
|
|
885
|
+
"items-center",
|
|
886
|
+
"justify-center",
|
|
887
|
+
"rounded-lg",
|
|
888
|
+
"bg-transparent",
|
|
889
|
+
"p-0",
|
|
890
|
+
"outline-hidden",
|
|
891
|
+
"focus-visible:shadow-blue",
|
|
892
|
+
"aria-disabled:opacity-50"
|
|
893
|
+
],
|
|
894
|
+
weekday: [
|
|
870
895
|
"text-foreground-muted",
|
|
871
896
|
"dark:text-foreground-muted-dark",
|
|
872
897
|
"px-1",
|
|
@@ -876,9 +901,8 @@ var calendarVariants = (0, import_class_variance_authority4.cva)([], {
|
|
|
876
901
|
"text-xs",
|
|
877
902
|
"h-[34px]"
|
|
878
903
|
],
|
|
879
|
-
|
|
904
|
+
day: [
|
|
880
905
|
[
|
|
881
|
-
"overflow-none",
|
|
882
906
|
"w-9",
|
|
883
907
|
"p-0",
|
|
884
908
|
"flex",
|
|
@@ -887,41 +911,49 @@ var calendarVariants = (0, import_class_variance_authority4.cva)([], {
|
|
|
887
911
|
"text-center",
|
|
888
912
|
"gap-1",
|
|
889
913
|
"text-sm",
|
|
890
|
-
"relative"
|
|
914
|
+
"relative",
|
|
915
|
+
"rounded-lg"
|
|
891
916
|
],
|
|
892
|
-
[
|
|
893
|
-
"focus-within:relative",
|
|
894
|
-
"focus-within:z-20",
|
|
895
|
-
"focus-visible:shadow-blue"
|
|
896
|
-
]
|
|
917
|
+
["focus-within:relative", "focus-within:z-20"]
|
|
897
918
|
],
|
|
898
|
-
|
|
899
|
-
"aria-selected:bg-accent",
|
|
919
|
+
day_button: [
|
|
900
920
|
"rounded-lg",
|
|
901
|
-
"dark:aria-selected:bg-brandGreen-100",
|
|
902
921
|
"px-1",
|
|
903
922
|
"w-full",
|
|
904
923
|
"py-2",
|
|
905
924
|
"h-[34px]",
|
|
906
925
|
"flex",
|
|
907
926
|
"flex-col",
|
|
927
|
+
"justify-center",
|
|
908
928
|
"text-sm",
|
|
909
929
|
"font-bold",
|
|
910
|
-
"aria-selected:opacity-100",
|
|
911
930
|
"items-center",
|
|
912
931
|
"shrink-0",
|
|
913
932
|
"focus-visible:shadow-blue",
|
|
914
|
-
"outline-hidden"
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
"
|
|
919
|
-
"text-
|
|
920
|
-
"
|
|
933
|
+
"outline-hidden",
|
|
934
|
+
"disabled:cursor-not-allowed"
|
|
935
|
+
],
|
|
936
|
+
selected: [
|
|
937
|
+
"bg-accent",
|
|
938
|
+
"text-foreground-inverse",
|
|
939
|
+
"dark:bg-brandGreen-100",
|
|
940
|
+
"dark:text-foreground-inverse-dark"
|
|
941
|
+
],
|
|
942
|
+
outside: ["text-foreground-muted", "dark:text-foreground-muted-dark"],
|
|
943
|
+
disabled: [
|
|
944
|
+
"text-foreground-muted",
|
|
945
|
+
"dark:text-foreground-muted-dark",
|
|
946
|
+
"opacity-50"
|
|
921
947
|
]
|
|
922
948
|
}
|
|
923
949
|
}
|
|
924
950
|
});
|
|
951
|
+
var rangeEdge = [
|
|
952
|
+
"bg-accent!",
|
|
953
|
+
"text-foreground-inverse!",
|
|
954
|
+
"dark:bg-blue-400!",
|
|
955
|
+
"dark:text-foreground-inverse-dark!"
|
|
956
|
+
];
|
|
925
957
|
function Calendar(_a) {
|
|
926
958
|
var _b = _a, {
|
|
927
959
|
className,
|
|
@@ -937,31 +969,30 @@ function Calendar(_a) {
|
|
|
937
969
|
__spreadValues({
|
|
938
970
|
showOutsideDays,
|
|
939
971
|
className: cn(
|
|
940
|
-
"p-4 rounded-lg bg-background-alt dark:bg-background-alt-dark dark:text-foreground-inverse shadow-[0_4px_6px_0px_rgba(0,0,0,0.08)] flex
|
|
972
|
+
"p-4 rounded-lg bg-background-alt dark:bg-background-alt-dark dark:text-foreground-inverse shadow-[0_4px_6px_0px_rgba(0,0,0,0.08)] flex w-fit",
|
|
941
973
|
className
|
|
942
974
|
),
|
|
943
975
|
classNames: __spreadValues({
|
|
944
976
|
months: calendarVariants({ component: "months" }),
|
|
945
|
-
month: calendarVariants({ component: "
|
|
946
|
-
|
|
977
|
+
month: calendarVariants({ component: "month" }),
|
|
978
|
+
month_caption: calendarVariants({ component: "month_caption" }),
|
|
947
979
|
caption_label: calendarVariants({ component: "caption_label" }),
|
|
948
980
|
nav: calendarVariants({ component: "nav" }),
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
row: "flex w-full",
|
|
956
|
-
cell: calendarVariants({ component: "cell" }),
|
|
981
|
+
button_previous: calendarVariants({ component: "nav_button" }),
|
|
982
|
+
button_next: calendarVariants({ component: "nav_button" }),
|
|
983
|
+
month_grid: "w-full border-collapse",
|
|
984
|
+
weekdays: "flex",
|
|
985
|
+
weekday: calendarVariants({ component: "weekday" }),
|
|
986
|
+
week: "flex w-full",
|
|
957
987
|
day: calendarVariants({ component: "day" }),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
988
|
+
day_button: calendarVariants({ component: "day_button" }),
|
|
989
|
+
selected: calendarVariants({ component: "selected" }),
|
|
990
|
+
range_start: cn(rangeEdge, "rounded-l-full! rounded-r-none!"),
|
|
991
|
+
range_end: cn(rangeEdge, "rounded-r-full! rounded-l-none!"),
|
|
992
|
+
range_middle: "rounded-none! bg-grey-400! text-grey-900! dark:bg-accent-alt! dark:text-foreground-inverse!",
|
|
993
|
+
outside: calendarVariants({ component: "outside" }),
|
|
994
|
+
disabled: calendarVariants({ component: "disabled" }),
|
|
995
|
+
hidden: "invisible"
|
|
965
996
|
}, classNames),
|
|
966
997
|
components: {
|
|
967
998
|
Chevron: (props2) => {
|