@epilot/spark-ui 0.31.0 → 0.31.1
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 +2 -2
- package/dist/components/accordion.js +2 -2
- 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.d.cts +1 -1
- package/dist/components/attachment.d.ts +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/avatar.js +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/box.cjs +1 -1
- package/dist/components/box.js +1 -1
- package/dist/components/bubble.cjs +1 -1
- package/dist/components/bubble.d.cts +2 -2
- package/dist/components/bubble.d.ts +2 -2
- package/dist/components/bubble.js +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.cjs +39 -5
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +13 -5
- package/dist/components/button.d.ts +13 -5
- package/dist/components/button.js +40 -7
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.cjs +2 -2
- package/dist/components/calendar.js +2 -2
- 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/checkbox-card.cjs +85 -0
- package/dist/components/checkbox-card.cjs.map +1 -0
- package/dist/components/checkbox-card.d.cts +27 -0
- package/dist/components/checkbox-card.d.ts +27 -0
- package/dist/components/checkbox-card.js +81 -0
- package/dist/components/checkbox-card.js.map +1 -0
- package/dist/components/checkbox-group.cjs +1 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/combobox.cjs +3 -3
- package/dist/components/combobox.js +3 -3
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown-menu.cjs +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/field.cjs +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/input-date-time.cjs +4 -4
- package/dist/components/input-date-time.js +4 -4
- 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.d.cts +1 -1
- package/dist/components/input-group.d.ts +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/line-chart.cjs +1 -1
- package/dist/components/line-chart.js +1 -1
- package/dist/components/link.cjs +31 -0
- package/dist/components/link.cjs.map +1 -0
- package/dist/components/link.d.cts +16 -0
- package/dist/components/link.d.ts +16 -0
- package/dist/components/link.js +28 -0
- package/dist/components/link.js.map +1 -0
- 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 +2 -2
- package/dist/components/marker.d.ts +2 -2
- 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 +2 -2
- package/dist/components/power-history-chart.cjs +1 -1
- package/dist/components/power-history-chart.js +1 -1
- package/dist/components/power-network.cjs +1 -1
- package/dist/components/power-network.js +1 -1
- package/dist/components/radio.cjs +1 -1
- package/dist/components/radio.js +2 -2
- package/dist/components/schedule-list.cjs +1 -1
- package/dist/components/schedule-list.js +1 -1
- package/dist/components/select.cjs +2 -2
- package/dist/components/select.js +2 -2
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/stepper.cjs +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch-group.cjs +1 -1
- package/dist/components/switch-group.js +2 -2
- package/dist/components/switch.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.js +1 -1
- package/dist/components/toast.cjs +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.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-lists.cjs +1 -1
- package/dist/lib/calendar-lists.js +1 -1
- package/package.json +2 -2
|
@@ -1,12 +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
|
-
import { ScrollFreeDayButton } from "../lib/calendar-day-button.js";
|
|
5
5
|
import { CalendarListsProvider, ListMonthCaption as MonthCaption, ListMonthGrid as MonthGrid$1 } from "../lib/calendar-lists.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { ChevronLeft, ChevronRight } from "@epilot/spark-icons";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
import { DayPicker } from "@daypicker/react";
|
|
9
|
+
import { ChevronLeft, ChevronRight } from "@epilot/spark-icons";
|
|
10
10
|
//#region src/components/calendar.tsx
|
|
11
11
|
const LIST_LABELS = {
|
|
12
12
|
nextYear: "Next year",
|
|
@@ -4,8 +4,8 @@ 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 _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 class_variance_authority = require("class-variance-authority");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/callout.tsx
|
|
@@ -2,8 +2,8 @@
|
|
|
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 { Cancel, CheckCircle, Info, Warning } from "@epilot/spark-icons";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Cancel, CheckCircle, Info, Warning } from "@epilot/spark-icons";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
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", {
|
package/dist/components/card.cjs
CHANGED
|
@@ -5,8 +5,8 @@ const require_lib_container_chrome = require("../lib/container-chrome.cjs");
|
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let class_variance_authority = require("class-variance-authority");
|
|
9
8
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
9
|
+
let class_variance_authority = require("class-variance-authority");
|
|
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
|
@@ -3,8 +3,8 @@ 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
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { cva } from "class-variance-authority";
|
|
7
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
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: {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_chunk.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let cn = require("cn");
|
|
9
|
+
//#region src/components/checkbox-card.tsx
|
|
10
|
+
/** Lays out Checkbox Cards as one named group; each card keeps its own state. */
|
|
11
|
+
const CheckboxCardGroup = react.forwardRef(({ gap = 2, className, style, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12
|
+
ref,
|
|
13
|
+
role: "group",
|
|
14
|
+
"data-slot": "checkbox-card-group",
|
|
15
|
+
className: (0, cn.cn)("flex flex-col gap-[calc(var(--spark-layout-gap)*var(--checkbox-card-group-gap-steps,2))]", className),
|
|
16
|
+
style: {
|
|
17
|
+
"--checkbox-card-group-gap-steps": gap,
|
|
18
|
+
...style
|
|
19
|
+
},
|
|
20
|
+
...props
|
|
21
|
+
}));
|
|
22
|
+
CheckboxCardGroup.displayName = "CheckboxCardGroup";
|
|
23
|
+
/**
|
|
24
|
+
* A card that is one checkbox: Radio Card Group's look with Checkbox's box
|
|
25
|
+
* before the label, for picking several options. The card holds a label, a
|
|
26
|
+
* description and media, which an `<input>` can't.
|
|
27
|
+
*/
|
|
28
|
+
const CheckboxCard = react.forwardRef(({ checked: checkedProp, defaultChecked = false, onCheckedChange, media, className, children, onClick, disabled, ...props }, ref) => {
|
|
29
|
+
const [internalChecked, setInternalChecked] = react.useState(defaultChecked);
|
|
30
|
+
const checked = checkedProp ?? internalChecked;
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
32
|
+
ref,
|
|
33
|
+
type: "button",
|
|
34
|
+
role: "checkbox",
|
|
35
|
+
"aria-checked": checked,
|
|
36
|
+
"data-slot": "checkbox-card",
|
|
37
|
+
"data-state": checked ? "checked" : "unchecked",
|
|
38
|
+
disabled,
|
|
39
|
+
onClick: (event) => {
|
|
40
|
+
onClick?.(event);
|
|
41
|
+
if (event.defaultPrevented) return;
|
|
42
|
+
if (checkedProp === void 0) setInternalChecked(!checked);
|
|
43
|
+
onCheckedChange?.(!checked);
|
|
44
|
+
},
|
|
45
|
+
className: (0, cn.cn)("flex min-h-12 w-full cursor-pointer flex-col items-stretch gap-3 rounded-lg border px-4 py-3 text-start text-base font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none", checked ? "border-accent bg-base-accent-soft text-accent" : "border-transparent bg-base-gray-soft text-gray enabled:hover:bg-gray-a3", className),
|
|
46
|
+
...props,
|
|
47
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
48
|
+
className: "flex w-full items-start gap-3",
|
|
49
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50
|
+
"aria-hidden": "true",
|
|
51
|
+
className: "flex h-6 shrink-0 items-center",
|
|
52
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
53
|
+
"data-slot": "checkbox-card-indicator",
|
|
54
|
+
className: (0, cn.cn)("inline-flex size-5 items-center justify-center rounded-[min(var(--spark-rounded-md),40%)] border-2 transition-colors motion-reduce:transition-none", checked ? "border-(--spark-style-border,var(--color-primary)) bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--spark-on-solid))" : "border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft"),
|
|
55
|
+
children: checked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
56
|
+
className: "size-4",
|
|
57
|
+
fill: "none",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
60
|
+
className: "animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none",
|
|
61
|
+
d: "M5.5 12.5 L10 17 L18.5 7.5",
|
|
62
|
+
pathLength: 1,
|
|
63
|
+
stroke: "currentColor",
|
|
64
|
+
strokeLinecap: "round",
|
|
65
|
+
strokeLinejoin: "round",
|
|
66
|
+
strokeWidth: 2.5
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
71
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
72
|
+
children
|
|
73
|
+
})]
|
|
74
|
+
}), media && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
75
|
+
className: "flex w-full justify-center",
|
|
76
|
+
children: media
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
CheckboxCard.displayName = "CheckboxCard";
|
|
81
|
+
//#endregion
|
|
82
|
+
exports.CheckboxCard = CheckboxCard;
|
|
83
|
+
exports.CheckboxCardGroup = CheckboxCardGroup;
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=checkbox-card.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-card.cjs","names":["React"],"sources":["../../src/components/checkbox-card.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\ninterface CheckboxCardGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n /** How many `--spark-layout-gap` units apart each card sits. */\n gap?: number\n}\n\n/** Lays out Checkbox Cards as one named group; each card keeps its own state. */\nconst CheckboxCardGroup = React.forwardRef<\n HTMLDivElement,\n CheckboxCardGroupProps\n>(({ gap = 2, className, style, ...props }, ref) => (\n <div\n ref={ref}\n role=\"group\"\n data-slot=\"checkbox-card-group\"\n className={cn(\n 'flex flex-col gap-[calc(var(--spark-layout-gap)*var(--checkbox-card-group-gap-steps,2))]',\n className,\n )}\n style={\n {\n '--checkbox-card-group-gap-steps': gap,\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n))\n\nCheckboxCardGroup.displayName = 'CheckboxCardGroup'\n\ninterface CheckboxCardProps extends Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n 'onChange' | 'role' | 'type' | 'value' | 'defaultChecked'\n> {\n checked?: boolean\n defaultChecked?: boolean\n onCheckedChange?: (checked: boolean) => void\n /** Shown under the label, centred, such as an image of the option. */\n media?: React.ReactNode\n}\n\n/**\n * A card that is one checkbox: Radio Card Group's look with Checkbox's box\n * before the label, for picking several options. The card holds a label, a\n * description and media, which an `<input>` can't.\n */\nconst CheckboxCard = React.forwardRef<HTMLButtonElement, CheckboxCardProps>(\n (\n {\n checked: checkedProp,\n defaultChecked = false,\n onCheckedChange,\n media,\n className,\n children,\n onClick,\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internalChecked, setInternalChecked] = React.useState(defaultChecked)\n const checked = checkedProp ?? internalChecked\n\n return (\n <button\n ref={ref}\n type=\"button\"\n // a card, as an <input> can't hold a label, description and media\n role=\"checkbox\"\n aria-checked={checked}\n data-slot=\"checkbox-card\"\n data-state={checked ? 'checked' : 'unchecked'}\n disabled={disabled}\n onClick={(event) => {\n onClick?.(event)\n if (event.defaultPrevented) return\n if (checkedProp === undefined) setInternalChecked(!checked)\n onCheckedChange?.(!checked)\n }}\n className={cn(\n 'flex min-h-12 w-full cursor-pointer flex-col items-stretch gap-3 rounded-lg border px-4 py-3 text-start text-base font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none',\n checked\n ? 'border-accent bg-base-accent-soft text-accent'\n : 'border-transparent bg-base-gray-soft text-gray enabled:hover:bg-gray-a3',\n className,\n )}\n {...props}\n >\n <span className=\"flex w-full items-start gap-3\">\n <span aria-hidden=\"true\" className=\"flex h-6 shrink-0 items-center\">\n <span\n data-slot=\"checkbox-card-indicator\"\n className={cn(\n 'inline-flex size-5 items-center justify-center rounded-[min(var(--spark-rounded-md),40%)] border-2 transition-colors motion-reduce:transition-none',\n checked\n ? 'border-(--spark-style-border,var(--color-primary)) bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--spark-on-solid))'\n : 'border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft',\n )}\n >\n {checked && (\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path\n className=\"animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none\"\n d=\"M5.5 12.5 L10 17 L18.5 7.5\"\n pathLength={1}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2.5}\n />\n </svg>\n )}\n </span>\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {children}\n </span>\n </span>\n {media && <span className=\"flex w-full justify-center\">{media}</span>}\n </button>\n )\n },\n)\n\nCheckboxCard.displayName = 'CheckboxCard'\n\nexport { CheckboxCard, CheckboxCardGroup }\nexport type { CheckboxCardGroupProps, CheckboxCardProps }\n"],"mappings":";;;;;;;;;;AAWA,MAAM,oBAAoBA,MAAM,YAG7B,EAAE,MAAM,GAAG,WAAW,OAAO,GAAG,SAAS,QAC1C,iBAAA,GAAA,kBAAA,KAAC,OAAD;CACO;CACL,MAAK;CACL,aAAU;CACV,YAAA,GAAA,GAAA,IACE,4FACA,SACF;CACA,OACE;EACE,mCAAmC;EACnC,GAAG;CACL;CAEF,GAAI;AACL,CAAA,CACF;AAED,kBAAkB,cAAc;;;;;;AAkBhC,MAAM,eAAeA,MAAM,YAEvB,EACE,SAAS,aACT,iBAAiB,OACjB,iBACA,OACA,WACA,UACA,SACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,CAAC,iBAAiB,sBAAsBA,MAAM,SAAS,cAAc;CAC3E,MAAM,UAAU,eAAe;CAE/B,OACE,iBAAA,GAAA,kBAAA,MAAC,UAAD;EACO;EACL,MAAK;EAEL,MAAK;EACL,gBAAc;EACd,aAAU;EACV,cAAY,UAAU,YAAY;EACxB;EACV,UAAU,UAAU;GAClB,UAAU,KAAK;GACf,IAAI,MAAM,kBAAkB;GAC5B,IAAI,gBAAgB,KAAA,GAAW,mBAAmB,CAAC,OAAO;GAC1D,kBAAkB,CAAC,OAAO;EAC5B;EACA,YAAA,GAAA,GAAA,IACE,iOACA,UACI,kDACA,2EACJ,SACF;EACA,GAAI;YAtBN,CAwBE,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,WAAU;aAAhB,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,eAAY;IAAO,WAAU;cACjC,iBAAA,GAAA,kBAAA,KAAC,QAAD;KACE,aAAU;KACV,YAAA,GAAA,GAAA,IACE,sJACA,UACI,gJACA,+EACN;eAEC,WACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;MAAK,WAAU;MAAS,MAAK;MAAO,SAAQ;gBAC1C,iBAAA,GAAA,kBAAA,KAAC,QAAD;OACE,WAAU;OACV,GAAE;OACF,YAAY;OACZ,QAAO;OACP,eAAc;OACd,gBAAe;OACf,aAAa;MACd,CAAA;KACE,CAAA;IAEH,CAAA;GACF,CAAA,GACN,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;IACb;GACG,CAAA,CACF;MACL,SAAS,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAA8B;EAAY,CAAA,CAC9D;;AAEZ,CACF;AAEA,aAAa,cAAc"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/checkbox-card.d.ts
|
|
6
|
+
interface CheckboxCardGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** How many `--spark-layout-gap` units apart each card sits. */
|
|
8
|
+
gap?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Lays out Checkbox Cards as one named group; each card keeps its own state. */
|
|
11
|
+
declare const CheckboxCardGroup: React$1.ForwardRefExoticComponent<CheckboxCardGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
interface CheckboxCardProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'role' | 'type' | 'value' | 'defaultChecked'> {
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
defaultChecked?: boolean;
|
|
15
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
16
|
+
/** Shown under the label, centred, such as an image of the option. */
|
|
17
|
+
media?: React$1.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A card that is one checkbox: Radio Card Group's look with Checkbox's box
|
|
21
|
+
* before the label, for picking several options. The card holds a label, a
|
|
22
|
+
* description and media, which an `<input>` can't.
|
|
23
|
+
*/
|
|
24
|
+
declare const CheckboxCard: React$1.ForwardRefExoticComponent<CheckboxCardProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { CheckboxCard, CheckboxCardGroup, type CheckboxCardGroupProps, type CheckboxCardProps };
|
|
27
|
+
//# sourceMappingURL=checkbox-card.d.cts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/checkbox-card.d.ts
|
|
6
|
+
interface CheckboxCardGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** How many `--spark-layout-gap` units apart each card sits. */
|
|
8
|
+
gap?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Lays out Checkbox Cards as one named group; each card keeps its own state. */
|
|
11
|
+
declare const CheckboxCardGroup: React$1.ForwardRefExoticComponent<CheckboxCardGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
interface CheckboxCardProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'role' | 'type' | 'value' | 'defaultChecked'> {
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
defaultChecked?: boolean;
|
|
15
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
16
|
+
/** Shown under the label, centred, such as an image of the option. */
|
|
17
|
+
media?: React$1.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A card that is one checkbox: Radio Card Group's look with Checkbox's box
|
|
21
|
+
* before the label, for picking several options. The card holds a label, a
|
|
22
|
+
* description and media, which an `<input>` can't.
|
|
23
|
+
*/
|
|
24
|
+
declare const CheckboxCard: React$1.ForwardRefExoticComponent<CheckboxCardProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { CheckboxCard, CheckboxCardGroup, type CheckboxCardGroupProps, type CheckboxCardProps };
|
|
27
|
+
//# sourceMappingURL=checkbox-card.d.ts.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/checkbox-card.tsx
|
|
7
|
+
/** Lays out Checkbox Cards as one named group; each card keeps its own state. */
|
|
8
|
+
const CheckboxCardGroup = React$1.forwardRef(({ gap = 2, className, style, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
9
|
+
ref,
|
|
10
|
+
role: "group",
|
|
11
|
+
"data-slot": "checkbox-card-group",
|
|
12
|
+
className: cn("flex flex-col gap-[calc(var(--spark-layout-gap)*var(--checkbox-card-group-gap-steps,2))]", className),
|
|
13
|
+
style: {
|
|
14
|
+
"--checkbox-card-group-gap-steps": gap,
|
|
15
|
+
...style
|
|
16
|
+
},
|
|
17
|
+
...props
|
|
18
|
+
}));
|
|
19
|
+
CheckboxCardGroup.displayName = "CheckboxCardGroup";
|
|
20
|
+
/**
|
|
21
|
+
* A card that is one checkbox: Radio Card Group's look with Checkbox's box
|
|
22
|
+
* before the label, for picking several options. The card holds a label, a
|
|
23
|
+
* description and media, which an `<input>` can't.
|
|
24
|
+
*/
|
|
25
|
+
const CheckboxCard = React$1.forwardRef(({ checked: checkedProp, defaultChecked = false, onCheckedChange, media, className, children, onClick, disabled, ...props }, ref) => {
|
|
26
|
+
const [internalChecked, setInternalChecked] = React$1.useState(defaultChecked);
|
|
27
|
+
const checked = checkedProp ?? internalChecked;
|
|
28
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
29
|
+
ref,
|
|
30
|
+
type: "button",
|
|
31
|
+
role: "checkbox",
|
|
32
|
+
"aria-checked": checked,
|
|
33
|
+
"data-slot": "checkbox-card",
|
|
34
|
+
"data-state": checked ? "checked" : "unchecked",
|
|
35
|
+
disabled,
|
|
36
|
+
onClick: (event) => {
|
|
37
|
+
onClick?.(event);
|
|
38
|
+
if (event.defaultPrevented) return;
|
|
39
|
+
if (checkedProp === void 0) setInternalChecked(!checked);
|
|
40
|
+
onCheckedChange?.(!checked);
|
|
41
|
+
},
|
|
42
|
+
className: cn("flex min-h-12 w-full cursor-pointer flex-col items-stretch gap-3 rounded-lg border px-4 py-3 text-start text-base font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none", checked ? "border-accent bg-base-accent-soft text-accent" : "border-transparent bg-base-gray-soft text-gray enabled:hover:bg-gray-a3", className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
45
|
+
className: "flex w-full items-start gap-3",
|
|
46
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
className: "flex h-6 shrink-0 items-center",
|
|
49
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
50
|
+
"data-slot": "checkbox-card-indicator",
|
|
51
|
+
className: cn("inline-flex size-5 items-center justify-center rounded-[min(var(--spark-rounded-md),40%)] border-2 transition-colors motion-reduce:transition-none", checked ? "border-(--spark-style-border,var(--color-primary)) bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--spark-on-solid))" : "border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft"),
|
|
52
|
+
children: checked && /* @__PURE__ */ jsx("svg", {
|
|
53
|
+
className: "size-4",
|
|
54
|
+
fill: "none",
|
|
55
|
+
viewBox: "0 0 24 24",
|
|
56
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
57
|
+
className: "animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none",
|
|
58
|
+
d: "M5.5 12.5 L10 17 L18.5 7.5",
|
|
59
|
+
pathLength: 1,
|
|
60
|
+
stroke: "currentColor",
|
|
61
|
+
strokeLinecap: "round",
|
|
62
|
+
strokeLinejoin: "round",
|
|
63
|
+
strokeWidth: 2.5
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
69
|
+
children
|
|
70
|
+
})]
|
|
71
|
+
}), media && /* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "flex w-full justify-center",
|
|
73
|
+
children: media
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
CheckboxCard.displayName = "CheckboxCard";
|
|
78
|
+
//#endregion
|
|
79
|
+
export { CheckboxCard, CheckboxCardGroup };
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=checkbox-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-card.js","names":["React"],"sources":["../../src/components/checkbox-card.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\ninterface CheckboxCardGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n /** How many `--spark-layout-gap` units apart each card sits. */\n gap?: number\n}\n\n/** Lays out Checkbox Cards as one named group; each card keeps its own state. */\nconst CheckboxCardGroup = React.forwardRef<\n HTMLDivElement,\n CheckboxCardGroupProps\n>(({ gap = 2, className, style, ...props }, ref) => (\n <div\n ref={ref}\n role=\"group\"\n data-slot=\"checkbox-card-group\"\n className={cn(\n 'flex flex-col gap-[calc(var(--spark-layout-gap)*var(--checkbox-card-group-gap-steps,2))]',\n className,\n )}\n style={\n {\n '--checkbox-card-group-gap-steps': gap,\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n))\n\nCheckboxCardGroup.displayName = 'CheckboxCardGroup'\n\ninterface CheckboxCardProps extends Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n 'onChange' | 'role' | 'type' | 'value' | 'defaultChecked'\n> {\n checked?: boolean\n defaultChecked?: boolean\n onCheckedChange?: (checked: boolean) => void\n /** Shown under the label, centred, such as an image of the option. */\n media?: React.ReactNode\n}\n\n/**\n * A card that is one checkbox: Radio Card Group's look with Checkbox's box\n * before the label, for picking several options. The card holds a label, a\n * description and media, which an `<input>` can't.\n */\nconst CheckboxCard = React.forwardRef<HTMLButtonElement, CheckboxCardProps>(\n (\n {\n checked: checkedProp,\n defaultChecked = false,\n onCheckedChange,\n media,\n className,\n children,\n onClick,\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internalChecked, setInternalChecked] = React.useState(defaultChecked)\n const checked = checkedProp ?? internalChecked\n\n return (\n <button\n ref={ref}\n type=\"button\"\n // a card, as an <input> can't hold a label, description and media\n role=\"checkbox\"\n aria-checked={checked}\n data-slot=\"checkbox-card\"\n data-state={checked ? 'checked' : 'unchecked'}\n disabled={disabled}\n onClick={(event) => {\n onClick?.(event)\n if (event.defaultPrevented) return\n if (checkedProp === undefined) setInternalChecked(!checked)\n onCheckedChange?.(!checked)\n }}\n className={cn(\n 'flex min-h-12 w-full cursor-pointer flex-col items-stretch gap-3 rounded-lg border px-4 py-3 text-start text-base font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none',\n checked\n ? 'border-accent bg-base-accent-soft text-accent'\n : 'border-transparent bg-base-gray-soft text-gray enabled:hover:bg-gray-a3',\n className,\n )}\n {...props}\n >\n <span className=\"flex w-full items-start gap-3\">\n <span aria-hidden=\"true\" className=\"flex h-6 shrink-0 items-center\">\n <span\n data-slot=\"checkbox-card-indicator\"\n className={cn(\n 'inline-flex size-5 items-center justify-center rounded-[min(var(--spark-rounded-md),40%)] border-2 transition-colors motion-reduce:transition-none',\n checked\n ? 'border-(--spark-style-border,var(--color-primary)) bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--spark-on-solid))'\n : 'border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft',\n )}\n >\n {checked && (\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path\n className=\"animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none\"\n d=\"M5.5 12.5 L10 17 L18.5 7.5\"\n pathLength={1}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2.5}\n />\n </svg>\n )}\n </span>\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {children}\n </span>\n </span>\n {media && <span className=\"flex w-full justify-center\">{media}</span>}\n </button>\n )\n },\n)\n\nCheckboxCard.displayName = 'CheckboxCard'\n\nexport { CheckboxCard, CheckboxCardGroup }\nexport type { CheckboxCardGroupProps, CheckboxCardProps }\n"],"mappings":";;;;;;;AAWA,MAAM,oBAAoBA,QAAM,YAG7B,EAAE,MAAM,GAAG,WAAW,OAAO,GAAG,SAAS,QAC1C,oBAAC,OAAD;CACO;CACL,MAAK;CACL,aAAU;CACV,WAAW,GACT,4FACA,SACF;CACA,OACE;EACE,mCAAmC;EACnC,GAAG;CACL;CAEF,GAAI;AACL,CAAA,CACF;AAED,kBAAkB,cAAc;;;;;;AAkBhC,MAAM,eAAeA,QAAM,YAEvB,EACE,SAAS,aACT,iBAAiB,OACjB,iBACA,OACA,WACA,UACA,SACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,CAAC,iBAAiB,sBAAsBA,QAAM,SAAS,cAAc;CAC3E,MAAM,UAAU,eAAe;CAE/B,OACE,qBAAC,UAAD;EACO;EACL,MAAK;EAEL,MAAK;EACL,gBAAc;EACd,aAAU;EACV,cAAY,UAAU,YAAY;EACxB;EACV,UAAU,UAAU;GAClB,UAAU,KAAK;GACf,IAAI,MAAM,kBAAkB;GAC5B,IAAI,gBAAgB,KAAA,GAAW,mBAAmB,CAAC,OAAO;GAC1D,kBAAkB,CAAC,OAAO;EAC5B;EACA,WAAW,GACT,iOACA,UACI,kDACA,2EACJ,SACF;EACA,GAAI;YAtBN,CAwBE,qBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAU;cACjC,oBAAC,QAAD;KACE,aAAU;KACV,WAAW,GACT,sJACA,UACI,gJACA,+EACN;eAEC,WACC,oBAAC,OAAD;MAAK,WAAU;MAAS,MAAK;MAAO,SAAQ;gBAC1C,oBAAC,QAAD;OACE,WAAU;OACV,GAAE;OACF,YAAY;OACZ,QAAO;OACP,eAAc;OACd,gBAAe;OACf,aAAa;MACd,CAAA;KACE,CAAA;IAEH,CAAA;GACF,CAAA,GACN,oBAAC,QAAD;IAAM,WAAU;IACb;GACG,CAAA,CACF;MACL,SAAS,oBAAC,QAAD;GAAM,WAAU;aAA8B;EAAY,CAAA,CAC9D;;AAEZ,CACF;AAEA,aAAa,cAAc"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
4
|
const require_lib_accent_colors = require("../lib/accent-colors.cjs");
|
|
5
|
-
const require_components_field = require("./field.cjs");
|
|
6
5
|
const require_lib_selection_list = require("../lib/selection-list.cjs");
|
|
6
|
+
const require_components_field = require("./field.cjs");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_chunk.__toESM(react);
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../utils/cn.js";
|
|
3
2
|
import { accentByColor } from "../lib/accent-colors.js";
|
|
4
|
-
import {
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
5
4
|
import { selectionListClasses } from "../lib/selection-list.js";
|
|
5
|
+
import { useFieldSetInvalid } from "./field.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../utils/cn.js";
|
|
3
2
|
import { accentByColor } from "../lib/accent-colors.js";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
5
|
const require_components_theme = require("./theme.cjs");
|
|
6
6
|
const require_components_button = require("./button.cjs");
|
|
7
|
-
const
|
|
7
|
+
const require_lib_control_glyphs = require("../lib/control-glyphs.cjs");
|
|
8
8
|
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
9
|
+
const require_components_field = require("./field.cjs");
|
|
9
10
|
const require_components_checkbox = require("./checkbox.cjs");
|
|
10
|
-
const require_lib_control_glyphs = require("../lib/control-glyphs.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
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
4
|
import { PortalTheme } from "./theme.js";
|
|
5
5
|
import { buttonVariants } from "./button.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ChevronDownGlyph, ClearGlyph } from "../lib/control-glyphs.js";
|
|
7
7
|
import { boxChrome, floatingChrome } from "../lib/input-box-variants.js";
|
|
8
|
+
import { useFieldControl } from "./field.js";
|
|
8
9
|
import { Checkbox } from "./checkbox.js";
|
|
9
|
-
import { ChevronDownGlyph, ClearGlyph } from "../lib/control-glyphs.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 _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 }) {
|
|
@@ -9,8 +9,8 @@ const require_components_skeleton = require("./skeleton.cjs");
|
|
|
9
9
|
let react = require("react");
|
|
10
10
|
react = require_chunk.__toESM(react);
|
|
11
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
-
let class_variance_authority = require("class-variance-authority");
|
|
13
12
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
13
|
+
let class_variance_authority = require("class-variance-authority");
|
|
14
14
|
let cn = require("cn");
|
|
15
15
|
//#region src/components/field.tsx
|
|
16
16
|
const FieldContext = react.createContext(null);
|
package/dist/components/field.js
CHANGED
|
@@ -8,8 +8,8 @@ import { Skeleton } from "./skeleton.js";
|
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { useId } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { cva } from "class-variance-authority";
|
|
12
11
|
import { useRender } from "@base-ui/react/use-render";
|
|
12
|
+
import { cva } from "class-variance-authority";
|
|
13
13
|
//#region src/components/field.tsx
|
|
14
14
|
const FieldContext = React$1.createContext(null);
|
|
15
15
|
function useFieldContext() {
|
package/dist/components/icon.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
|
-
const require_components_button = require("./button.cjs");
|
|
6
|
-
const require_components_input_group = require("./input-group.cjs");
|
|
7
5
|
const require_lib_calendar_day_button = require("../lib/calendar-day-button.cjs");
|
|
8
|
-
const
|
|
6
|
+
const require_components_button = require("./button.cjs");
|
|
9
7
|
const require_lib_date_time_mask = require("../lib/date-time-mask.cjs");
|
|
10
8
|
const require_lib_input_date_parts = require("../lib/input-date-parts.cjs");
|
|
9
|
+
const require_components_input_group = require("./input-group.cjs");
|
|
10
|
+
const require_components_calendar = require("./calendar.cjs");
|
|
11
11
|
const require_components_popover = require("./popover.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 ictus_time = require("ictus/time");
|
|
17
17
|
let cn = require("cn");
|
|
18
18
|
//#region src/components/input-date-time.tsx
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
+
import { ScrollFreeDayButton } from "../lib/calendar-day-button.js";
|
|
3
4
|
import { cn } from "../utils/cn.js";
|
|
4
5
|
import { Button } from "./button.js";
|
|
5
|
-
import { InputGroup, InputGroupAddon, InputGroupInput } from "./input-group.js";
|
|
6
|
-
import { ScrollFreeDayButton } from "../lib/calendar-day-button.js";
|
|
7
|
-
import { Calendar } from "./calendar.js";
|
|
8
6
|
import { dateTimeStatus, formatDateTime, formatTime, parseDatePart, parseDateTime } from "../lib/date-time-mask.js";
|
|
9
7
|
import { TimeList, timesOf, useAnnouncement, useMaskHandlers } from "../lib/input-date-parts.js";
|
|
8
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "./input-group.js";
|
|
9
|
+
import { Calendar } from "./calendar.js";
|
|
10
10
|
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
11
11
|
import * as React$1 from "react";
|
|
12
|
-
import { CalendarMonth } from "@epilot/spark-icons";
|
|
13
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { CalendarMonth } from "@epilot/spark-icons";
|
|
14
14
|
//#region src/components/input-date-time.tsx
|
|
15
15
|
function useControllableState({ defaultProp, onChange, prop }) {
|
|
16
16
|
const [uncontrolled, setUncontrolled] = React$1.useState(defaultProp);
|
|
@@ -9,8 +9,8 @@ const require_components_calendar = require("./calendar.cjs");
|
|
|
9
9
|
const require_components_popover = require("./popover.cjs");
|
|
10
10
|
let react = require("react");
|
|
11
11
|
react = require_chunk.__toESM(react);
|
|
12
|
-
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
13
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
14
14
|
let ictus = require("ictus");
|
|
15
15
|
let cn = require("cn");
|
|
16
16
|
//#region src/components/input-date.tsx
|
|
@@ -7,8 +7,8 @@ import { InputGroup, InputGroupAddon, InputGroupInput } from "./input-group.js";
|
|
|
7
7
|
import { Calendar } from "./calendar.js";
|
|
8
8
|
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
|
-
import { CalendarMonth } from "@epilot/spark-icons";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { CalendarMonth } from "@epilot/spark-icons";
|
|
12
12
|
import { apply, formatDate, isDateMaskKey, parseDate } from "ictus";
|
|
13
13
|
//#region src/components/input-date.tsx
|
|
14
14
|
function useControllableState({ defaultProp, onChange, prop }) {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
5
|
const require_components_theme = require("./theme.cjs");
|
|
6
|
-
const require_components_field = require("./field.cjs");
|
|
7
6
|
require("../lib/input-box-variants.cjs");
|
|
7
|
+
const require_components_field = require("./field.cjs");
|
|
8
8
|
const require_components_input = require("./input.cjs");
|
|
9
9
|
let react = require("react");
|
|
10
10
|
react = require_chunk.__toESM(react);
|
|
@@ -10,7 +10,7 @@ declare function InputGroup({
|
|
|
10
10
|
...props
|
|
11
11
|
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const inputGroupAddonVariants: (props?: ({
|
|
13
|
-
align?: "inline-
|
|
13
|
+
align?: "inline-start" | "inline-end" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare function InputGroupAddon({
|
|
16
16
|
className,
|
|
@@ -10,7 +10,7 @@ declare function InputGroup({
|
|
|
10
10
|
...props
|
|
11
11
|
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const inputGroupAddonVariants: (props?: ({
|
|
13
|
-
align?: "inline-
|
|
13
|
+
align?: "inline-start" | "inline-end" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare function InputGroupAddon({
|
|
16
16
|
className,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
4
|
import { useTheme } from "./theme.js";
|
|
5
|
-
import { useFieldContext } from "./field.js";
|
|
6
5
|
import "../lib/input-box-variants.js";
|
|
6
|
+
import { useFieldContext } from "./field.js";
|
|
7
7
|
import { Input } from "./input.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_components_field = require("./field.cjs");
|
|
4
3
|
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
4
|
+
const require_components_field = require("./field.cjs");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
let class_variance_authority = require("class-variance-authority");
|
|
7
7
|
let _base_ui_react_otp_field = require("@base-ui/react/otp-field");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { useFieldControl, useKeepLabelOutset } from "./field.js";
|
|
4
3
|
import { INSET_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
|
|
4
|
+
import { useFieldControl, useKeepLabelOutset } from "./field.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { OTPField } from "@base-ui/react/otp-field";
|
|
@@ -1,8 +1,8 @@
|
|
|
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_components_field = require("./field.cjs");
|
|
5
4
|
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
5
|
+
const require_components_field = require("./field.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/components/input.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { useFieldControl } from "./field.js";
|
|
4
3
|
import { INSET_UNDERLINE, boxChrome, floatingChrome } from "../lib/input-box-variants.js";
|
|
4
|
+
import { useFieldControl } from "./field.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|