@epilot/spark-ui 0.30.1 → 0.30.3
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/accordion.cjs +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.cjs +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/attachment.cjs +1 -1
- package/dist/components/attachment.js +1 -1
- package/dist/components/autocomplete.cjs +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.cjs +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.cjs +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/bubble.cjs +1 -1
- package/dist/components/bubble.d.cts +1 -1
- package/dist/components/bubble.d.ts +1 -1
- package/dist/components/bubble.js +1 -1
- package/dist/components/button-group.cjs +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.cjs +3 -1
- package/dist/components/calendar.cjs.map +1 -1
- package/dist/components/calendar.js +3 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/callout.cjs +1 -1
- package/dist/components/callout.js +1 -1
- package/dist/components/card.cjs +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.cjs +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/empty-state.cjs +1 -1
- package/dist/components/empty-state.js +1 -1
- package/dist/components/entity-card.cjs +1 -1
- package/dist/components/entity-card.js +1 -1
- package/dist/components/field.cjs +8 -5
- package/dist/components/field.cjs.map +1 -1
- package/dist/components/field.js +8 -5
- package/dist/components/field.js.map +1 -1
- package/dist/components/hero-metric.cjs +1 -1
- package/dist/components/hero-metric.js +1 -1
- package/dist/components/info-block.cjs +1 -1
- package/dist/components/info-block.d.cts +1 -1
- package/dist/components/info-block.d.ts +1 -1
- package/dist/components/info-block.js +1 -1
- package/dist/components/input-date-time.cjs +7 -2
- package/dist/components/input-date-time.cjs.map +1 -1
- package/dist/components/input-date-time.js +7 -2
- package/dist/components/input-date-time.js.map +1 -1
- package/dist/components/input-date.cjs +1 -1
- package/dist/components/input-date.js +1 -1
- package/dist/components/input-group.cjs +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-otp.cjs +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/list.cjs +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/marker.cjs +1 -1
- package/dist/components/marker.d.cts +1 -1
- package/dist/components/marker.d.ts +1 -1
- package/dist/components/marker.js +1 -1
- package/dist/components/message-scroller.cjs +1 -1
- package/dist/components/message-scroller.js +1 -1
- package/dist/components/page-header.cjs +1 -1
- package/dist/components/page-header.d.cts +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/period-tabs.cjs +1 -1
- package/dist/components/period-tabs.js +1 -1
- package/dist/components/pill.cjs +1 -1
- package/dist/components/pill.js +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/power-network.cjs +1 -1
- package/dist/components/power-network.js +1 -1
- package/dist/components/schedule-list.cjs +1 -1
- package/dist/components/schedule-list.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton.cjs +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/stepper.cjs +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/table.cjs +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/theme.cjs +1 -1
- package/dist/components/theme.js +1 -1
- package/dist/components/toast.cjs +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/tooltip.cjs +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/trace.cjs +1 -1
- package/dist/components/trace.js +1 -1
- package/dist/lib/calendar-day-button.cjs +23 -0
- package/dist/lib/calendar-day-button.cjs.map +1 -0
- package/dist/lib/calendar-day-button.d.cts +14 -0
- package/dist/lib/calendar-day-button.d.ts +14 -0
- package/dist/lib/calendar-day-button.js +20 -0
- package/dist/lib/calendar-day-button.js.map +1 -0
- package/dist/lib/calendar-lists.cjs +6 -5
- package/dist/lib/calendar-lists.cjs.map +1 -1
- package/dist/lib/calendar-lists.js +6 -5
- package/dist/lib/calendar-lists.js.map +1 -1
- package/dist/lib/input-date-parts.cjs +3 -2
- package/dist/lib/input-date-parts.cjs.map +1 -1
- package/dist/lib/input-date-parts.js +3 -2
- package/dist/lib/input-date-parts.js.map +1 -1
- package/dist/lib/scroll-within.cjs +27 -0
- package/dist/lib/scroll-within.cjs.map +1 -0
- package/dist/lib/scroll-within.d.cts +14 -0
- package/dist/lib/scroll-within.d.ts +14 -0
- package/dist/lib/scroll-within.js +25 -0
- package/dist/lib/scroll-within.js.map +1 -0
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
7
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
8
8
|
let _base_ui_react_accordion = require("@base-ui/react/accordion");
|
|
9
9
|
let cn = require("cn");
|
|
10
10
|
//#region src/components/accordion.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { KeyboardArrowDown } from "@epilot/spark-icons";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { KeyboardArrowDown } from "@epilot/spark-icons";
|
|
6
6
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
7
7
|
//#region src/components/accordion.tsx
|
|
8
8
|
function Accordion({ className, variant = "soft", ...props }) {
|
|
@@ -5,8 +5,8 @@ const require_components_theme = require("./theme.cjs");
|
|
|
5
5
|
const require_components_button = require("./button.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
8
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
9
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
10
10
|
let _base_ui_react_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
11
11
|
let cn = require("cn");
|
|
12
12
|
//#region src/components/alert-dialog.tsx
|
|
@@ -3,8 +3,8 @@ import { cn } from "../utils/cn.js";
|
|
|
3
3
|
import { PortalTheme } from "./theme.js";
|
|
4
4
|
import { Button, buttonVariants } from "./button.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { Close } from "@epilot/spark-icons";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Close } from "@epilot/spark-icons";
|
|
8
8
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
9
9
|
//#region src/components/alert-dialog.tsx
|
|
10
10
|
function AlertDialog(props) {
|
|
@@ -4,10 +4,10 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_components_button = require("./button.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let class_variance_authority = require("class-variance-authority");
|
|
8
9
|
let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
|
|
9
10
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
10
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
11
|
let cn = require("cn");
|
|
12
12
|
//#region src/components/attachment.tsx
|
|
13
13
|
const attachmentVariants = (0, class_variance_authority.cva)("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-lg border bg-gray-2 text-gray-a12 transition-colors has-[[data-slot=attachment-trigger]:focus-visible]:focus-outline has-[>a,>button]:hover:bg-gray-a2 data-[state=error]:border-red-a6 data-[state=idle]:border-dashed", { variants: {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
4
|
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/attachment.tsx
|
|
10
10
|
const attachmentVariants = cva("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-lg border bg-gray-2 text-gray-a12 transition-colors has-[[data-slot=attachment-trigger]:focus-visible]:focus-outline has-[>a,>button]:hover:bg-gray-a2 data-[state=error]:border-red-a6 data-[state=idle]:border-dashed", { variants: {
|
|
11
11
|
size: {
|
|
@@ -8,8 +8,8 @@ const require_components_input = require("./input.cjs");
|
|
|
8
8
|
const require_components_input_group = require("./input-group.cjs");
|
|
9
9
|
let react = require("react");
|
|
10
10
|
react = require_chunk.__toESM(react);
|
|
11
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
12
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
13
13
|
let _base_ui_react_autocomplete = require("@base-ui/react/autocomplete");
|
|
14
14
|
let cn = require("cn");
|
|
15
15
|
//#region src/components/autocomplete.tsx
|
|
@@ -6,8 +6,8 @@ import { useFieldContext, useFieldControl } from "./field.js";
|
|
|
6
6
|
import { Input } from "./input.js";
|
|
7
7
|
import { InputGroup } from "./input-group.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
|
-
import { Close, KeyboardArrowDown } from "@epilot/spark-icons";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Close, KeyboardArrowDown } from "@epilot/spark-icons";
|
|
11
11
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
12
12
|
//#region src/components/autocomplete.tsx
|
|
13
13
|
const Autocomplete = Autocomplete$1.Root;
|
|
@@ -4,8 +4,8 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_lib_accent_colors = require("../lib/accent-colors.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
-
let class_variance_authority = require("class-variance-authority");
|
|
8
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let class_variance_authority = require("class-variance-authority");
|
|
9
9
|
let cn = require("cn");
|
|
10
10
|
//#region src/components/badge.tsx
|
|
11
11
|
const badgeVariants = (0, class_variance_authority.cva)("inline-flex min-w-5 items-center justify-center gap-1 rounded-md text-center font-normal tabular-nums", {
|
package/dist/components/badge.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { accentByColor } from "../lib/accent-colors.js";
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
7
|
//#region src/components/badge.tsx
|
|
8
8
|
const badgeVariants = cva("inline-flex min-w-5 items-center justify-center gap-1 rounded-md text-center font-normal tabular-nums", {
|
|
9
9
|
variants: { size: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_components_button = require("./button.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
5
|
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
5
6
|
let class_variance_authority = require("class-variance-authority");
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let cn = require("cn");
|
|
8
8
|
//#region src/components/banner.tsx
|
|
9
9
|
const bannerVariants = (0, class_variance_authority.cva)("flex w-full items-start gap-2 border-b px-4 py-3 text-sm", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { buttonVariants } from "./button.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Cancel, CheckCircle, Close, Info, Warning } from "@epilot/spark-icons";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/banner.tsx
|
|
8
8
|
const bannerVariants = cva("flex w-full items-start gap-2 border-b px-4 py-3 text-sm", {
|
|
9
9
|
variants: { variant: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
4
|
let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
|
|
4
5
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
let cn = require("cn");
|
|
7
7
|
//#region src/components/breadcrumbs.tsx
|
|
8
8
|
const Breadcrumbs = ({ className, "aria-label": ariaLabel = "Breadcrumb", ...rest }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/breadcrumbs.tsx
|
|
7
7
|
const Breadcrumbs = ({ className, "aria-label": ariaLabel = "Breadcrumb", ...rest }) => {
|
|
8
8
|
return /* @__PURE__ */ jsx("nav", {
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
let class_variance_authority = require("class-variance-authority");
|
|
7
8
|
let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
|
|
8
9
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/bubble.tsx
|
|
12
12
|
function BubbleGroup({ className, ...props }) {
|
|
@@ -10,7 +10,7 @@ declare function BubbleGroup({
|
|
|
10
10
|
...props
|
|
11
11
|
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const bubbleVariants: (props?: ({
|
|
13
|
-
variant?: "
|
|
13
|
+
variant?: "ghost" | "outline" | "destructive" | "secondary" | "default" | "muted" | "tinted" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare function Bubble({
|
|
16
16
|
variant,
|
|
@@ -10,7 +10,7 @@ declare function BubbleGroup({
|
|
|
10
10
|
...props
|
|
11
11
|
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const bubbleVariants: (props?: ({
|
|
13
|
-
variant?: "
|
|
13
|
+
variant?: "ghost" | "outline" | "destructive" | "secondary" | "default" | "muted" | "tinted" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare function Bubble({
|
|
16
16
|
variant,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { cva } from "class-variance-authority";
|
|
5
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/bubble.tsx
|
|
9
9
|
function BubbleGroup({ className, ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -5,8 +5,8 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
5
5
|
const require_lib_accent_colors = require("../lib/accent-colors.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
8
|
-
let _base_ui_react_button = require("@base-ui/react/button");
|
|
9
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _base_ui_react_button = require("@base-ui/react/button");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/button-group.tsx
|
|
12
12
|
const buttonGroupRecipe = "bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--color-primary-foreground)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { accentByColor } from "../lib/accent-colors.js";
|
|
4
4
|
import { cn } from "../utils/cn.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
|
-
import { Button } from "@base-ui/react/button";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Button } from "@base-ui/react/button";
|
|
8
8
|
//#region src/components/button-group.tsx
|
|
9
9
|
const buttonGroupRecipe = "bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--color-primary-foreground)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
|
|
10
10
|
function buttonGroupSizeClasses(size) {
|
|
@@ -6,9 +6,9 @@ const require_lib_accent_colors = require("../lib/accent-colors.cjs");
|
|
|
6
6
|
const require_components_theme = require("./theme.cjs");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_chunk.__toESM(react);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
let _base_ui_react_button = require("@base-ui/react/button");
|
|
10
11
|
let class_variance_authority = require("class-variance-authority");
|
|
11
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
let cn = require("cn");
|
|
13
13
|
//#region src/components/button.tsx
|
|
14
14
|
const buttonVariants = (0, class_variance_authority.cva)("group/button touch-target inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_[data-slot=spinner]]:text-current [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
@@ -8,8 +8,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
8
8
|
//#region src/components/button.d.ts
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
10
|
variant?: "primary" | "destructive" | "secondary" | "tertiary" | "bare" | null | undefined;
|
|
11
|
-
color?: "accent" | "primary" | "neutral" | "
|
|
12
|
-
size?: "
|
|
11
|
+
color?: "accent" | "primary" | "neutral" | "destructive" | "danger" | null | undefined;
|
|
12
|
+
size?: "small" | "default" | "medium" | "icon-small" | "icon" | "icon-medium" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
interface ButtonProps extends Omit<React$1.ComponentProps<typeof Button$1>, 'ref'>, Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {
|
|
15
15
|
/**
|
|
@@ -8,8 +8,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
8
8
|
//#region src/components/button.d.ts
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
10
|
variant?: "primary" | "destructive" | "secondary" | "tertiary" | "bare" | null | undefined;
|
|
11
|
-
color?: "accent" | "primary" | "neutral" | "
|
|
12
|
-
size?: "
|
|
11
|
+
color?: "accent" | "primary" | "neutral" | "destructive" | "danger" | null | undefined;
|
|
12
|
+
size?: "small" | "default" | "medium" | "icon-small" | "icon" | "icon-medium" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
interface ButtonProps extends Omit<React$1.ComponentProps<typeof Button$1>, 'ref'>, Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {
|
|
15
15
|
/**
|
|
@@ -4,9 +4,9 @@ import { accentByColor } from "../lib/accent-colors.js";
|
|
|
4
4
|
import { cn } from "../utils/cn.js";
|
|
5
5
|
import { isDesignColor, useTheme } from "./theme.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
8
9
|
import { cva } from "class-variance-authority";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/button.tsx
|
|
11
11
|
const buttonVariants = cva("group/button touch-target inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_[data-slot=spinner]]:text-current [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
12
12
|
variants: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
|
+
const require_lib_calendar_day_button = require("../lib/calendar-day-button.cjs");
|
|
4
5
|
const require_components_button = require("./button.cjs");
|
|
5
6
|
const require_lib_calendar_lists = require("../lib/calendar-lists.cjs");
|
|
6
7
|
let react = require("react");
|
|
7
8
|
react = require_chunk.__toESM(react);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
10
|
let _daypicker_react = require("@daypicker/react");
|
|
9
11
|
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
10
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
12
|
let cn = require("cn");
|
|
12
13
|
//#region src/components/calendar.tsx
|
|
13
14
|
const LIST_LABELS = {
|
|
@@ -57,6 +58,7 @@ function Calendar({ captionLayout, className, classNames, components, fixedWeeks
|
|
|
57
58
|
components: {
|
|
58
59
|
Chevron: CalendarChevron,
|
|
59
60
|
...lists && {
|
|
61
|
+
DayButton: require_lib_calendar_day_button.ScrollFreeDayButton,
|
|
60
62
|
MonthCaption: require_lib_calendar_lists.ListMonthCaption,
|
|
61
63
|
MonthGrid: require_lib_calendar_lists.ListMonthGrid
|
|
62
64
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.cjs","names":["ChevronRight","ChevronLeft","DayPicker","buttonVariants","ListMonthCaption","ListMonthGrid","CalendarListsProvider"],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport {\n type CalendarListLabels,\n CalendarListsProvider,\n ListMonthCaption,\n ListMonthGrid,\n} from '../lib/calendar-lists'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype DayPickerProps = React.ComponentProps<typeof DayPicker>\n\n// keeps the union on `mode`, which a plain Omit would flatten\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown\n ? Omit<T, K>\n : never\n\ntype CalendarProps = DistributiveOmit<DayPickerProps, 'captionLayout'> & {\n /** `lists`: month and year each step with arrows and open a list in place of the days. */\n captionLayout?: DayPickerProps['captionLayout'] | 'lists'\n /** Names the year arrows of `captionLayout=\"lists\"`. */\n listLabels?: CalendarListLabels\n showTodayDot?: boolean\n}\n\nconst LIST_LABELS: CalendarListLabels = {\n nextYear: 'Next year',\n previousYear: 'Previous year',\n}\n\nfunction CalendarChevron({\n orientation,\n}: {\n orientation?: 'up' | 'down' | 'left' | 'right'\n}) {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n captionLayout,\n className,\n classNames,\n components,\n fixedWeeks = true,\n hideNavigation,\n listLabels = LIST_LABELS,\n showOutsideDays = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n const lists = captionLayout === 'lists'\n const picker = (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray focus-visible:focus-outline in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n captionLayout={lists ? 'label' : captionLayout}\n components={{\n Chevron: CalendarChevron,\n ...(lists && {\n MonthCaption: ListMonthCaption,\n MonthGrid: ListMonthGrid,\n }),\n ...components,\n }}\n fixedWeeks={fixedWeeks}\n hideNavigation={lists || hideNavigation}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n return lists ? (\n <CalendarListsProvider labels={listLabels}>{picker}</CalendarListsProvider>\n ) : (\n picker\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"calendar.cjs","names":["ChevronRight","ChevronLeft","DayPicker","buttonVariants","ScrollFreeDayButton","ListMonthCaption","ListMonthGrid","CalendarListsProvider"],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { ScrollFreeDayButton } from '../lib/calendar-day-button'\nimport {\n type CalendarListLabels,\n CalendarListsProvider,\n ListMonthCaption,\n ListMonthGrid,\n} from '../lib/calendar-lists'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype DayPickerProps = React.ComponentProps<typeof DayPicker>\n\n// keeps the union on `mode`, which a plain Omit would flatten\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown\n ? Omit<T, K>\n : never\n\ntype CalendarProps = DistributiveOmit<DayPickerProps, 'captionLayout'> & {\n /** `lists`: month and year each step with arrows and open a list in place of the days. */\n captionLayout?: DayPickerProps['captionLayout'] | 'lists'\n /** Names the year arrows of `captionLayout=\"lists\"`. */\n listLabels?: CalendarListLabels\n showTodayDot?: boolean\n}\n\nconst LIST_LABELS: CalendarListLabels = {\n nextYear: 'Next year',\n previousYear: 'Previous year',\n}\n\nfunction CalendarChevron({\n orientation,\n}: {\n orientation?: 'up' | 'down' | 'left' | 'right'\n}) {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n captionLayout,\n className,\n classNames,\n components,\n fixedWeeks = true,\n hideNavigation,\n listLabels = LIST_LABELS,\n showOutsideDays = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n const lists = captionLayout === 'lists'\n const picker = (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray focus-visible:focus-outline in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n captionLayout={lists ? 'label' : captionLayout}\n components={{\n Chevron: CalendarChevron,\n ...(lists && {\n // focus moves between the days and the lists without scrolling the page\n DayButton: ScrollFreeDayButton,\n MonthCaption: ListMonthCaption,\n MonthGrid: ListMonthGrid,\n }),\n ...components,\n }}\n fixedWeeks={fixedWeeks}\n hideNavigation={lists || hideNavigation}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n return lists ? (\n <CalendarListsProvider labels={listLabels}>{picker}</CalendarListsProvider>\n ) : (\n picker\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,cAAkC;CACtC,UAAU;CACV,cAAc;AAChB;AAEA,SAAS,gBAAgB,EACvB,eAGC;CAED,OACE,iBAAA,GAAA,kBAAA,KAFY,gBAAgB,UAAUA,oBAAAA,eAAeC,oBAAAA,aAErD,EACE,YAAA,GAAA,GAAA,IACE,4BACA,gBAAgB,QAAQ,aACxB,gBAAgB,UAAU,YAC5B,EACD,CAAA;AAEL;AAIA,SAAS,SAAS,EAChB,eACA,WACA,YACA,YACA,aAAa,MACb,gBACA,aAAa,aACb,kBAAkB,MAClB,eAAe,MACf,GAAG,SACa;CAChB,MAAM,QAAQ,kBAAkB;CAChC,MAAM,SACJ,iBAAA,GAAA,kBAAA,KAACC,iBAAAA,WAAD;EACE,YAAA,GAAA,GAAA,IAAc,OAAO,SAAS;EAC9B,YAAY;GACV,QAAQ;GACR,OAAO;GACP,eAAe;GACf,eAAe;GACf,kBAAA,GAAA,GAAA,IACEC,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,+HACF;GACA,cAAA,GAAA,GAAA,IACEA,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,gIACF;GACA,YAAY;GACZ,UAAU;GACV,SACE;GACF,MAAM;GACN,MAAA,GAAA,GAAA,IACE,2IACA,MAAM,SAAS,UACX,yKACA,uCACN;GACA,aAAA,GAAA,GAAA,IACEA,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GAGpD,ycACF;GACA,aAAa;GACb,WAAW;GACX,UAAU;GACV,QAAA,GAAA,GAAA,IACE,wCACA,gBACE,uMACJ;GACA,SACE;GACF,UAAU;GACV,cAAc;GACd,QAAQ;GACR,GAAG;EACL;EACA,eAAe,QAAQ,UAAU;EACjC,YAAY;GACV,SAAS;GACT,GAAI,SAAS;IAEX,WAAWC,gCAAAA;IACX,cAAcC,2BAAAA;IACd,WAAWC,2BAAAA;GACb;GACA,GAAG;EACL;EACY;EACZ,gBAAgB,SAAS;EACR;EACjB,GAAI;CACL,CAAA;CAEH,OAAO,QACL,iBAAA,GAAA,kBAAA,KAACC,2BAAAA,uBAAD;EAAuB,QAAQ;YAAa;CAA8B,CAAA,IAE1E;AAEJ"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { ScrollFreeDayButton } from "../lib/calendar-day-button.js";
|
|
2
3
|
import { cn } from "../utils/cn.js";
|
|
3
4
|
import { buttonVariants } from "./button.js";
|
|
4
5
|
import { CalendarListsProvider, ListMonthCaption as MonthCaption, ListMonthGrid as MonthGrid$1 } from "../lib/calendar-lists.js";
|
|
5
6
|
import "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
8
|
import { DayPicker } from "@daypicker/react";
|
|
7
9
|
import { ChevronLeft, ChevronRight } from "@epilot/spark-icons";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/calendar.tsx
|
|
10
11
|
const LIST_LABELS = {
|
|
11
12
|
nextYear: "Next year",
|
|
@@ -54,6 +55,7 @@ function Calendar({ captionLayout, className, classNames, components, fixedWeeks
|
|
|
54
55
|
components: {
|
|
55
56
|
Chevron: CalendarChevron,
|
|
56
57
|
...lists && {
|
|
58
|
+
DayButton: ScrollFreeDayButton,
|
|
57
59
|
MonthCaption,
|
|
58
60
|
MonthGrid: MonthGrid$1
|
|
59
61
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","names":["ListMonthCaption","ListMonthGrid"],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport {\n type CalendarListLabels,\n CalendarListsProvider,\n ListMonthCaption,\n ListMonthGrid,\n} from '../lib/calendar-lists'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype DayPickerProps = React.ComponentProps<typeof DayPicker>\n\n// keeps the union on `mode`, which a plain Omit would flatten\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown\n ? Omit<T, K>\n : never\n\ntype CalendarProps = DistributiveOmit<DayPickerProps, 'captionLayout'> & {\n /** `lists`: month and year each step with arrows and open a list in place of the days. */\n captionLayout?: DayPickerProps['captionLayout'] | 'lists'\n /** Names the year arrows of `captionLayout=\"lists\"`. */\n listLabels?: CalendarListLabels\n showTodayDot?: boolean\n}\n\nconst LIST_LABELS: CalendarListLabels = {\n nextYear: 'Next year',\n previousYear: 'Previous year',\n}\n\nfunction CalendarChevron({\n orientation,\n}: {\n orientation?: 'up' | 'down' | 'left' | 'right'\n}) {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n captionLayout,\n className,\n classNames,\n components,\n fixedWeeks = true,\n hideNavigation,\n listLabels = LIST_LABELS,\n showOutsideDays = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n const lists = captionLayout === 'lists'\n const picker = (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray focus-visible:focus-outline in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n captionLayout={lists ? 'label' : captionLayout}\n components={{\n Chevron: CalendarChevron,\n ...(lists && {\n MonthCaption: ListMonthCaption,\n MonthGrid: ListMonthGrid,\n }),\n ...components,\n }}\n fixedWeeks={fixedWeeks}\n hideNavigation={lists || hideNavigation}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n return lists ? (\n <CalendarListsProvider labels={listLabels}>{picker}</CalendarListsProvider>\n ) : (\n picker\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"calendar.js","names":["ListMonthCaption","ListMonthGrid"],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { ScrollFreeDayButton } from '../lib/calendar-day-button'\nimport {\n type CalendarListLabels,\n CalendarListsProvider,\n ListMonthCaption,\n ListMonthGrid,\n} from '../lib/calendar-lists'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype DayPickerProps = React.ComponentProps<typeof DayPicker>\n\n// keeps the union on `mode`, which a plain Omit would flatten\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown\n ? Omit<T, K>\n : never\n\ntype CalendarProps = DistributiveOmit<DayPickerProps, 'captionLayout'> & {\n /** `lists`: month and year each step with arrows and open a list in place of the days. */\n captionLayout?: DayPickerProps['captionLayout'] | 'lists'\n /** Names the year arrows of `captionLayout=\"lists\"`. */\n listLabels?: CalendarListLabels\n showTodayDot?: boolean\n}\n\nconst LIST_LABELS: CalendarListLabels = {\n nextYear: 'Next year',\n previousYear: 'Previous year',\n}\n\nfunction CalendarChevron({\n orientation,\n}: {\n orientation?: 'up' | 'down' | 'left' | 'right'\n}) {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n captionLayout,\n className,\n classNames,\n components,\n fixedWeeks = true,\n hideNavigation,\n listLabels = LIST_LABELS,\n showOutsideDays = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n const lists = captionLayout === 'lists'\n const picker = (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray focus-visible:focus-outline [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray focus-visible:focus-outline in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n captionLayout={lists ? 'label' : captionLayout}\n components={{\n Chevron: CalendarChevron,\n ...(lists && {\n // focus moves between the days and the lists without scrolling the page\n DayButton: ScrollFreeDayButton,\n MonthCaption: ListMonthCaption,\n MonthGrid: ListMonthGrid,\n }),\n ...components,\n }}\n fixedWeeks={fixedWeeks}\n hideNavigation={lists || hideNavigation}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n return lists ? (\n <CalendarListsProvider labels={listLabels}>{picker}</CalendarListsProvider>\n ) : (\n picker\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":";;;;;;;;;;AA4BA,MAAM,cAAkC;CACtC,UAAU;CACV,cAAc;AAChB;AAEA,SAAS,gBAAgB,EACvB,eAGC;CAED,OACE,oBAFY,gBAAgB,UAAU,eAAe,aAErD,EACE,WAAW,GACT,4BACA,gBAAgB,QAAQ,aACxB,gBAAgB,UAAU,YAC5B,EACD,CAAA;AAEL;AAIA,SAAS,SAAS,EAChB,eACA,WACA,YACA,YACA,aAAa,MACb,gBACA,aAAa,aACb,kBAAkB,MAClB,eAAe,MACf,GAAG,SACa;CAChB,MAAM,QAAQ,kBAAkB;CAChC,MAAM,SACJ,oBAAC,WAAD;EACE,WAAW,GAAG,OAAO,SAAS;EAC9B,YAAY;GACV,QAAQ;GACR,OAAO;GACP,eAAe;GACf,eAAe;GACf,iBAAiB,GACf,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,+HACF;GACA,aAAa,GACX,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,gIACF;GACA,YAAY;GACZ,UAAU;GACV,SACE;GACF,MAAM;GACN,KAAK,GACH,2IACA,MAAM,SAAS,UACX,yKACA,uCACN;GACA,YAAY,GACV,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GAGpD,ycACF;GACA,aAAa;GACb,WAAW;GACX,UAAU;GACV,OAAO,GACL,wCACA,gBACE,uMACJ;GACA,SACE;GACF,UAAU;GACV,cAAc;GACd,QAAQ;GACR,GAAG;EACL;EACA,eAAe,QAAQ,UAAU;EACjC,YAAY;GACV,SAAS;GACT,GAAI,SAAS;IAEX,WAAW;IACGA;IACd,WAAWC;GACb;GACA,GAAG;EACL;EACY;EACZ,gBAAgB,SAAS;EACR;EACjB,GAAI;CACL,CAAA;CAEH,OAAO,QACL,oBAAC,uBAAD;EAAuB,QAAQ;YAAa;CAA8B,CAAA,IAE1E;AAEJ"}
|
|
@@ -4,9 +4,9 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_components_button = require("./button.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
8
9
|
let class_variance_authority = require("class-variance-authority");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/callout.tsx
|
|
12
12
|
const calloutVariants = (0, class_variance_authority.cva)("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none", {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Cancel, CheckCircle, Info, Warning } from "@epilot/spark-icons";
|
|
6
7
|
import { cva } from "class-variance-authority";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/callout.tsx
|
|
9
9
|
const calloutVariants = cva("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none", {
|
|
10
10
|
variants: { variant: {
|
package/dist/components/card.cjs
CHANGED
|
@@ -4,9 +4,9 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_lib_container_chrome = require("../lib/container-chrome.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let class_variance_authority = require("class-variance-authority");
|
|
8
9
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/card.tsx
|
|
12
12
|
const cardVariants = (0, class_variance_authority.cva)("relative flex w-full flex-col gap-1 py-3", {
|
package/dist/components/card.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { containerChrome, containerInteractiveClasses, containerPaddingX, radiusClasses } from "../lib/container-chrome.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/card.tsx
|
|
9
9
|
const cardVariants = cva("relative flex w-full flex-col gap-1 py-3", {
|
|
10
10
|
variants: { variant: {
|
|
@@ -11,8 +11,8 @@ const require_components_checkbox = require("./checkbox.cjs");
|
|
|
11
11
|
const require_components_pill = require("./pill.cjs");
|
|
12
12
|
let react = require("react");
|
|
13
13
|
react = require_chunk.__toESM(react);
|
|
14
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
15
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
16
16
|
let _base_ui_react_combobox = require("@base-ui/react/combobox");
|
|
17
17
|
let cn = require("cn");
|
|
18
18
|
//#region src/components/combobox.tsx
|
|
@@ -9,8 +9,8 @@ import { useFieldControl } from "./field.js";
|
|
|
9
9
|
import { Checkbox } from "./checkbox.js";
|
|
10
10
|
import { Pill } from "./pill.js";
|
|
11
11
|
import * as React$1 from "react";
|
|
12
|
-
import { Add, Check, Search } from "@epilot/spark-icons";
|
|
13
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Add, Check, Search } from "@epilot/spark-icons";
|
|
14
14
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
15
15
|
//#region src/components/combobox.tsx
|
|
16
16
|
const Combobox = Combobox$1.Root;
|
|
@@ -5,8 +5,8 @@ const require_components_theme = require("./theme.cjs");
|
|
|
5
5
|
const require_components_button = require("./button.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
8
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
9
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
10
10
|
let _base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
11
11
|
let cn = require("cn");
|
|
12
12
|
//#region src/components/dialog.tsx
|
|
@@ -3,8 +3,8 @@ import { cn } from "../utils/cn.js";
|
|
|
3
3
|
import { PortalTheme } from "./theme.js";
|
|
4
4
|
import { buttonVariants } from "./button.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { Close } from "@epilot/spark-icons";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Close } from "@epilot/spark-icons";
|
|
8
8
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
9
9
|
//#region src/components/dialog.tsx
|
|
10
10
|
function isBackdropPress(event) {
|
|
@@ -4,8 +4,8 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_components_theme = require("./theme.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
-
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
8
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
9
9
|
let vaul = require("vaul");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/drawer.tsx
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { PortalTheme } from "./theme.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
import { Drawer as Drawer$1 } from "vaul";
|
|
8
8
|
//#region src/components/drawer.tsx
|
|
9
9
|
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
@@ -4,8 +4,8 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_components_theme = require("./theme.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
8
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
9
9
|
let _base_ui_react_menu = require("@base-ui/react/menu");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/dropdown-menu.tsx
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { PortalTheme } from "./theme.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { Check, ChevronRight } from "@epilot/spark-icons";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Check, ChevronRight } from "@epilot/spark-icons";
|
|
7
7
|
import { Menu } from "@base-ui/react/menu";
|
|
8
8
|
//#region src/components/dropdown-menu.tsx
|
|
9
9
|
function DropdownMenu({ ...props }) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_components_icon = require("./icon.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
|
-
let class_variance_authority = require("class-variance-authority");
|
|
6
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let class_variance_authority = require("class-variance-authority");
|
|
7
7
|
let cn = require("cn");
|
|
8
8
|
//#region src/components/empty-state.tsx
|
|
9
9
|
const emptyStateVariants = (0, class_variance_authority.cva)("flex", {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { Icon } from "./icon.js";
|
|
4
4
|
import { createContext, useContext } from "react";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
7
|
//#region src/components/empty-state.tsx
|
|
8
8
|
const emptyStateVariants = cva("flex", {
|
|
9
9
|
variants: {
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
|
-
let class_variance_authority = require("class-variance-authority");
|
|
7
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let class_variance_authority = require("class-variance-authority");
|
|
8
8
|
let cn = require("cn");
|
|
9
9
|
//#region src/components/entity-card.tsx
|
|
10
10
|
const EntityCard = ({ className, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
6
|
//#region src/components/entity-card.tsx
|
|
7
7
|
const EntityCard = ({ className, ...rest }) => /* @__PURE__ */ jsx("div", {
|
|
8
8
|
className: cn("flex flex-col overflow-hidden rounded-lg border border-gray bg-(--spark-background)", className),
|