@apcrda/ui 0.4.4 → 0.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react-day-picker/style.css';
|
|
2
2
|
import type { CalendarProps } from './Calendar.types';
|
|
3
|
-
export declare function Calendar({ className, ...props }: CalendarProps): import("react").JSX.Element;
|
|
3
|
+
export declare function Calendar({ className, captionLayout, startMonth, endMonth, ...props }: CalendarProps): import("react").JSX.Element;
|
|
4
4
|
export declare namespace Calendar {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
package/dist/index.js
CHANGED
|
@@ -7138,18 +7138,27 @@ function Ap(e) {
|
|
|
7138
7138
|
}
|
|
7139
7139
|
//#endregion
|
|
7140
7140
|
//#region src/components/Calendar/Calendar.tsx
|
|
7141
|
-
function jp({ className: t,
|
|
7141
|
+
function jp({ className: t, captionLayout: n = "dropdown-years", startMonth: r, endMonth: i, ...a }) {
|
|
7142
|
+
let o = (/* @__PURE__ */ new Date()).getFullYear();
|
|
7142
7143
|
return /* @__PURE__ */ N(Ap, {
|
|
7143
7144
|
showOutsideDays: !0,
|
|
7145
|
+
captionLayout: n,
|
|
7146
|
+
startMonth: r ?? new Date(o - 100, 0),
|
|
7147
|
+
endMonth: i ?? new Date(o + 10, 11),
|
|
7144
7148
|
className: e("p-3", t),
|
|
7145
7149
|
classNames: {
|
|
7146
7150
|
months: "relative flex flex-col sm:flex-row gap-4",
|
|
7147
7151
|
month: "flex flex-col gap-4",
|
|
7148
7152
|
month_caption: "flex items-center justify-center h-9",
|
|
7149
|
-
caption_label: "text-sm font-medium text-[var(--apcrda-color-foreground)]",
|
|
7153
|
+
caption_label: "text-sm font-medium text-[var(--apcrda-color-foreground)] inline-flex items-center gap-1 select-none",
|
|
7150
7154
|
nav: "absolute top-0 left-0 right-0 flex items-center justify-between h-9 px-1",
|
|
7151
7155
|
button_previous: e("inline-flex h-7 w-7 items-center justify-center rounded-[var(--apcrda-radius-sm)] border border-[var(--apcrda-color-border)] bg-[var(--apcrda-color-surface)] opacity-50 hover:opacity-100 transition-opacity"),
|
|
7152
7156
|
button_next: e("inline-flex h-7 w-7 items-center justify-center rounded-[var(--apcrda-radius-sm)] border border-[var(--apcrda-color-border)] bg-[var(--apcrda-color-surface)] opacity-50 hover:opacity-100 transition-opacity"),
|
|
7157
|
+
dropdowns: "inline-flex items-center gap-2",
|
|
7158
|
+
dropdown_root: e("relative inline-flex items-center h-7 rounded-[var(--apcrda-radius-sm)]", "border border-[var(--apcrda-color-border)] bg-[var(--apcrda-color-surface)]", "px-2 cursor-pointer hover:border-[var(--apcrda-color-border-strong)] transition-colors"),
|
|
7159
|
+
dropdown: "absolute inset-0 opacity-0 cursor-pointer w-full z-10",
|
|
7160
|
+
years_dropdown: "",
|
|
7161
|
+
months_dropdown: "",
|
|
7153
7162
|
month_grid: "w-full border-collapse",
|
|
7154
7163
|
weekdays: "flex",
|
|
7155
7164
|
weekday: "text-[var(--apcrda-color-muted)] rounded-[var(--apcrda-radius-sm)] w-9 font-normal text-xs text-center",
|
|
@@ -7165,8 +7174,8 @@ function jp({ className: t, ...n }) {
|
|
|
7165
7174
|
range_middle: "[&>button]:rounded-none [&>button]:bg-[var(--apcrda-color-surface-muted)]",
|
|
7166
7175
|
hidden: "invisible"
|
|
7167
7176
|
},
|
|
7168
|
-
components: { Chevron: ({ orientation: e }) =>
|
|
7169
|
-
...
|
|
7177
|
+
components: { Chevron: ({ orientation: e }) => e === "left" ? /* @__PURE__ */ N(Rt, { className: "h-4 w-4" }) : e === "down" ? /* @__PURE__ */ N(Lt, { className: "h-3 w-3 opacity-60" }) : /* @__PURE__ */ N(zt, { className: "h-4 w-4" }) },
|
|
7178
|
+
...a
|
|
7170
7179
|
});
|
|
7171
7180
|
}
|
|
7172
7181
|
jp.displayName = "Calendar";
|