@bysages/react 0.4.1 → 0.4.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/{ai-response-nhDOlELQ.mjs → ai-response-CjjjprMY.mjs} +10 -3
- package/dist/{chevron-a2nIZKN4.mjs → chevron-BA7kV9m7.mjs} +1 -1
- package/dist/components/accordion/index.mjs +1 -1
- package/dist/components/ai/index.mjs +1 -1
- package/dist/components/ai-attachments/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.mjs +3 -12
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/alert/index.mjs +1 -1
- package/dist/components/back-top/index.mjs +1 -1
- package/dist/components/banner/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +18 -7
- package/dist/components/calendar/index.mjs +79 -43
- package/dist/components/carousel/index.mjs +1 -1
- package/dist/components/cascade-select/index.mjs +1 -1
- package/dist/components/checkbox/index.mjs +1 -1
- package/dist/components/checkbox-group/index.mjs +1 -1
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/clipboard/index.mjs +1 -1
- package/dist/components/collapsible/index.mjs +1 -1
- package/dist/components/color-picker/index.mjs +1 -1
- package/dist/components/combobox/index.mjs +1 -1
- package/dist/components/date-picker/index.mjs +1 -1
- package/dist/components/dialog/index.mjs +1 -1
- package/dist/components/drawer/index.mjs +1 -1
- package/dist/components/dynamic-input/index.mjs +1 -1
- package/dist/components/editable/index.mjs +1 -1
- package/dist/components/file-upload/index.mjs +1 -1
- package/dist/components/floating-panel/index.mjs +1 -1
- package/dist/components/form/index.d.mts +48 -2
- package/dist/components/image/index.mjs +1 -1
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/json-tree-view/index.mjs +1 -1
- package/dist/components/listbox/index.mjs +1 -1
- package/dist/components/media-player/index.mjs +1 -1
- package/dist/components/menu/index.mjs +1 -1
- package/dist/components/number-input/index.mjs +1 -1
- package/dist/components/order-list/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +2 -0
- package/dist/components/pagination/index.mjs +31 -6
- package/dist/components/password-input/index.mjs +1 -1
- package/dist/components/popover/index.mjs +1 -1
- package/dist/components/progress/index.d.mts +2 -2
- package/dist/components/progress/index.mjs +20 -4
- package/dist/components/rating-group/index.mjs +1 -1
- package/dist/components/result/index.mjs +2 -1
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/signature-pad/index.mjs +1 -1
- package/dist/components/split-button/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +5 -1
- package/dist/components/steps/index.mjs +6 -4
- package/dist/components/swap/index.mjs +1 -1
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.mjs +3 -2
- package/dist/components/tag/index.d.mts +33 -0
- package/dist/components/tag/index.mjs +75 -0
- package/dist/components/tags-input/index.mjs +1 -1
- package/dist/components/toggle-group/index.mjs +1 -1
- package/dist/components/transfer/index.mjs +1 -1
- package/dist/components/tree-select/index.mjs +1 -1
- package/dist/components/tree-view/index.mjs +1 -1
- package/dist/generative/index.d.mts +53 -0
- package/dist/generative/index.mjs +670 -0
- package/dist/icon-Cri0-7-x.mjs +38 -0
- package/dist/{image-viewer-B-hKFkEw.mjs → image-viewer-D4FuYrk6.mjs} +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +6 -5
- package/dist/{media-player-DjVvo1_7.mjs → media-player-C0WcjVI-.mjs} +2 -2
- package/dist/{select-i9UZsQCU.mjs → select-D_soVdWK.mjs} +1 -1
- package/package.json +2 -2
- package/dist/icon-BALgGtNK.mjs +0 -18
- package/dist/index-PsgGWW3m.d.mts +0 -1819
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as iconHtml } from "./icon-Cri0-7-x.mjs";
|
|
1
2
|
import { t as withSelfRoot } from "./family-DE_GQeeM.mjs";
|
|
2
3
|
import { n as useComponentMessages } from "./messages-1jJWtaYU.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
@@ -5,11 +6,17 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
6
|
import { useEffect, useRef } from "react";
|
|
6
7
|
import { renderHtml } from "@tanstack/markdown/html";
|
|
7
8
|
//#region src/components/ai-response/code-copy.ts
|
|
8
|
-
/** The two
|
|
9
|
+
/** The two curated icons a copy affordance needs: the stamp and its
|
|
9
10
|
* confirmation. Inline SVG keeps the enhancement framework-agnostic —
|
|
10
11
|
* it lives beside the renderer's generated code HTML. */
|
|
11
|
-
const COPY_CODE_ICON =
|
|
12
|
-
|
|
12
|
+
const COPY_CODE_ICON = iconHtml("copy", {
|
|
13
|
+
width: "14",
|
|
14
|
+
height: "14"
|
|
15
|
+
});
|
|
16
|
+
const COPIED_CODE_ICON = iconHtml("check", {
|
|
17
|
+
width: "14",
|
|
18
|
+
height: "14"
|
|
19
|
+
});
|
|
13
20
|
/** How long the confirmation stays before the stamp returns. */
|
|
14
21
|
const REVERT_MS = 1500;
|
|
15
22
|
/** Make sure every fenced block under `host` carries its copy stamp.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { Accordion as Accordion$1 } from "@ark-ui/react/accordion";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
@@ -4,7 +4,7 @@ import { Action } from "../ai-action/index.mjs";
|
|
|
4
4
|
import { AiMessage as Message } from "../ai-message/index.mjs";
|
|
5
5
|
import { AiPromptInput as PromptInput } from "../ai-prompt-input/index.mjs";
|
|
6
6
|
import { AiReasoning as Reasoning } from "../ai-reasoning/index.mjs";
|
|
7
|
-
import { t as Response } from "../../ai-response-
|
|
7
|
+
import { t as Response } from "../../ai-response-CjjjprMY.mjs";
|
|
8
8
|
import { AiSource as Source, AiSources as Sources } from "../ai-source/index.mjs";
|
|
9
9
|
import { AiSuggestion as Suggestion } from "../ai-suggestion/index.mjs";
|
|
10
10
|
import { AiTool as Tool } from "../ai-tool/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
3
|
import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
3
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
4
4
|
import { Button } from "../button/index.mjs";
|
|
@@ -12,18 +12,9 @@ const arrowUpIcon = iconNode("arrow-up", {
|
|
|
12
12
|
width: 14,
|
|
13
13
|
height: 14
|
|
14
14
|
});
|
|
15
|
-
const stopIcon =
|
|
16
|
-
viewBox: "0 0 16 16",
|
|
15
|
+
const stopIcon = iconNode("square", {
|
|
17
16
|
width: 14,
|
|
18
|
-
height: 14
|
|
19
|
-
"aria-hidden": "true",
|
|
20
|
-
children: /* @__PURE__ */ jsx("rect", {
|
|
21
|
-
x: 4.5,
|
|
22
|
-
y: 4.5,
|
|
23
|
-
width: 7,
|
|
24
|
-
height: 7,
|
|
25
|
-
fill: "currentColor"
|
|
26
|
-
})
|
|
17
|
+
height: 14
|
|
27
18
|
});
|
|
28
19
|
/** An empty slot leaves no part in the anatomy — the bare vessel keeps
|
|
29
20
|
* its single-line posture. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
-
import { t as chevron } from "../../chevron-
|
|
2
|
+
import { t as chevron } from "../../chevron-BA7kV9m7.mjs";
|
|
3
3
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Response } from "../../ai-response-
|
|
1
|
+
import { t as Response } from "../../ai-response-CjjjprMY.mjs";
|
|
2
2
|
export { Response as AiResponse, Response };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
-
import { t as chevron } from "../../chevron-
|
|
2
|
+
import { t as chevron } from "../../chevron-BA7kV9m7.mjs";
|
|
3
3
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { createContext, useContext } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
3
|
import { Button } from "../button/index.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -2,18 +2,29 @@ import { DatePicker as DatePicker$1 } from "../date-picker/index.mjs";
|
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
3
|
import { DatePickerRootProps } from "@ark-ui/react/date-picker";
|
|
4
4
|
//#region src/components/calendar/index.d.ts
|
|
5
|
-
export interface CalendarProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
export interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
6
6
|
/** Selected date(s) — an array, as the machine speaks in ranges. */
|
|
7
7
|
value?: DatePickerRootProps["value"];
|
|
8
|
+
defaultValue?: DatePickerRootProps["defaultValue"];
|
|
8
9
|
min?: DatePickerRootProps["min"];
|
|
9
10
|
max?: DatePickerRootProps["max"];
|
|
11
|
+
/** compact keeps the popup's measure; full gives cells room for content. */
|
|
12
|
+
variant?: "compact" | "full";
|
|
13
|
+
/** month is the day grid; year starts on a month overview. */
|
|
14
|
+
mode?: "month" | "year";
|
|
15
|
+
selectionMode?: DatePickerRootProps["selectionMode"];
|
|
16
|
+
startOfWeek?: number;
|
|
17
|
+
fixedWeeks?: boolean;
|
|
18
|
+
showWeekNumbers?: boolean;
|
|
19
|
+
outsideDaySelectable?: boolean;
|
|
20
|
+
closeOnSelect?: boolean;
|
|
21
|
+
minView?: DatePickerRootProps["minView"];
|
|
22
|
+
maxView?: DatePickerRootProps["maxView"];
|
|
10
23
|
onValueChange?: (value: NonNullable<DatePickerRootProps["value"]>) => void;
|
|
11
24
|
}
|
|
12
|
-
/** The date-picker's
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
* Ark's own contract. */
|
|
17
|
-
declare function CalendarImpl({ value, min, max, onValueChange, children, ...rest }: CalendarProps): import("react").JSX.Element;
|
|
25
|
+
/** The date-picker's grid standing on the page. Compact is the popup's
|
|
26
|
+
* quiet card; full opens it into a dashboard calendar. Year mode starts
|
|
27
|
+
* on a month overview; choosing a month drills into its day grid. */
|
|
28
|
+
declare function CalendarImpl({ value, defaultValue, min, max, variant, mode, selectionMode, startOfWeek, fixedWeeks, showWeekNumbers, outsideDaySelectable, closeOnSelect, minView, maxView, onValueChange, children, ...rest }: CalendarProps): import("react").JSX.Element;
|
|
18
29
|
export declare const Calendar: typeof CalendarImpl & typeof DatePicker$1;
|
|
19
30
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { DatePicker as DatePicker$1 } from "../date-picker/index.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { DatePicker } from "@ark-ui/react/date-picker";
|
|
7
7
|
//#region src/components/calendar/index.tsx
|
|
8
8
|
function chevron(dir) {
|
|
@@ -11,81 +11,117 @@ function chevron(dir) {
|
|
|
11
11
|
height: 16
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
/** The date-picker's
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
* Ark's own contract. */
|
|
19
|
-
function CalendarImpl({ value, min, max, onValueChange, children, ...rest }) {
|
|
14
|
+
/** The date-picker's grid standing on the page. Compact is the popup's
|
|
15
|
+
* quiet card; full opens it into a dashboard calendar. Year mode starts
|
|
16
|
+
* on a month overview; choosing a month drills into its day grid. */
|
|
17
|
+
function CalendarImpl({ value, defaultValue, min, max, variant = "compact", mode = "month", selectionMode, startOfWeek, fixedWeeks = false, showWeekNumbers = false, outsideDaySelectable = true, closeOnSelect = true, minView, maxView, onValueChange, children, ...rest }) {
|
|
20
18
|
injectComponentStyle("calendar");
|
|
21
19
|
injectComponentStyle("date-picker");
|
|
22
20
|
const hostId = useElementId("calendar", rest);
|
|
23
21
|
const title = (dp) => {
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
if (dp.view === "
|
|
22
|
+
const date = dp.focusedValue;
|
|
23
|
+
if (!date) return "";
|
|
24
|
+
if (dp.view === "month") return dp.format(date, { year: "numeric" });
|
|
25
|
+
if (dp.view === "day") return dp.format(date, {
|
|
27
26
|
month: "long",
|
|
28
27
|
year: "numeric"
|
|
29
28
|
});
|
|
30
|
-
|
|
31
|
-
const decade = Math.floor(d.year / 10) * 10;
|
|
29
|
+
const decade = Math.floor(date.year / 10) * 10;
|
|
32
30
|
return `${decade} - ${decade + 9}`;
|
|
33
31
|
};
|
|
34
|
-
const header = /* @__PURE__ */ jsx("div", {
|
|
32
|
+
const header = (dp) => /* @__PURE__ */ jsx("div", {
|
|
35
33
|
"data-scope": "calendar",
|
|
36
34
|
"data-part": "header",
|
|
37
35
|
children: /* @__PURE__ */ jsxs(DatePicker.ViewControl, { children: [
|
|
38
36
|
/* @__PURE__ */ jsx(DatePicker.PrevTrigger, { children: chevron("left") }),
|
|
39
|
-
/* @__PURE__ */ jsx(DatePicker.Context, { children: (
|
|
37
|
+
/* @__PURE__ */ jsx(DatePicker.Context, { children: (context) => /* @__PURE__ */ jsx(DatePicker.ViewTrigger, { children: title(context) }) }),
|
|
38
|
+
variant === "full" && dp ? todayTrigger(dp) : null,
|
|
40
39
|
/* @__PURE__ */ jsx(DatePicker.NextTrigger, { children: chevron("right") })
|
|
41
40
|
] })
|
|
42
41
|
});
|
|
42
|
+
const todayTrigger = (dp) => /* @__PURE__ */ jsx("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
"data-scope": "calendar",
|
|
45
|
+
"data-part": "today-trigger",
|
|
46
|
+
onClick: () => {
|
|
47
|
+
dp.selectToday();
|
|
48
|
+
if (mode === "year" && dp.view === "month") dp.setView("day");
|
|
49
|
+
},
|
|
50
|
+
children: "Today"
|
|
51
|
+
});
|
|
52
|
+
const dayTable = (dp) => {
|
|
53
|
+
const weeks = dp.weeks;
|
|
54
|
+
return /* @__PURE__ */ jsxs(DatePicker.Table, { children: [/* @__PURE__ */ jsx(DatePicker.TableHead, { children: /* @__PURE__ */ jsxs(DatePicker.TableRow, { children: [showWeekNumbers ? /* @__PURE__ */ jsx(DatePicker.WeekNumberHeaderCell, { children: "Wk" }) : null, dp.weekDays.map((day, id) => /* @__PURE__ */ jsx(DatePicker.TableHeader, {
|
|
55
|
+
"aria-label": day.long,
|
|
56
|
+
children: day.narrow
|
|
57
|
+
}, id))] }) }), /* @__PURE__ */ jsx(DatePicker.TableBody, { children: weeks.map((week, id) => /* @__PURE__ */ jsxs(DatePicker.TableRow, { children: [showWeekNumbers ? /* @__PURE__ */ jsx(DatePicker.WeekNumberCell, {
|
|
58
|
+
weekIndex: id,
|
|
59
|
+
week,
|
|
60
|
+
children: dp.getWeekNumber(week)
|
|
61
|
+
}, "week") : null, week.map((day, cellId) => /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
62
|
+
value: day,
|
|
63
|
+
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, { children: day.day })
|
|
64
|
+
}, cellId))] }, id)) })] });
|
|
65
|
+
};
|
|
66
|
+
const monthGrid = (dp, columns) => /* @__PURE__ */ jsx(DatePicker.Table, {
|
|
67
|
+
columns,
|
|
68
|
+
children: /* @__PURE__ */ jsx(DatePicker.TableBody, { children: dp.getMonthsGrid({
|
|
69
|
+
columns,
|
|
70
|
+
format: columns === 4 ? "short" : "long"
|
|
71
|
+
}).map((months, id) => /* @__PURE__ */ jsx(DatePicker.TableRow, { children: months.map((month, monthId) => /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
72
|
+
value: month.value,
|
|
73
|
+
columns,
|
|
74
|
+
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, { children: month.label })
|
|
75
|
+
}, monthId)) }, id)) })
|
|
76
|
+
});
|
|
77
|
+
const yearGrid = (dp) => /* @__PURE__ */ jsx(DatePicker.Table, {
|
|
78
|
+
columns: 3,
|
|
79
|
+
children: /* @__PURE__ */ jsx(DatePicker.TableBody, { children: dp.getYearsGrid({ columns: 3 }).map((years, id) => /* @__PURE__ */ jsx(DatePicker.TableRow, { children: years.map((year, yearId) => /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
80
|
+
value: year.value,
|
|
81
|
+
columns: 3,
|
|
82
|
+
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, { children: year.label })
|
|
83
|
+
}, yearId)) }, id)) })
|
|
84
|
+
});
|
|
43
85
|
return /* @__PURE__ */ jsxs("div", {
|
|
44
86
|
...rest,
|
|
45
87
|
"data-scope": "calendar",
|
|
46
88
|
"data-part": "root",
|
|
89
|
+
"data-variant": variant,
|
|
90
|
+
"data-mode": mode,
|
|
47
91
|
children: [/* @__PURE__ */ jsxs(DatePicker.Root, {
|
|
48
92
|
id: `${hostId}:date-picker`,
|
|
49
93
|
open: true,
|
|
50
|
-
closeOnSelect: true,
|
|
51
94
|
inline: true,
|
|
95
|
+
closeOnSelect,
|
|
96
|
+
outsideDaySelectable,
|
|
52
97
|
...value !== void 0 ? { value } : {},
|
|
98
|
+
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
53
99
|
...min !== void 0 ? { min } : {},
|
|
54
100
|
...max !== void 0 ? { max } : {},
|
|
101
|
+
...selectionMode !== void 0 ? { selectionMode } : {},
|
|
102
|
+
...startOfWeek !== void 0 ? { startOfWeek } : {},
|
|
103
|
+
fixedWeeks: fixedWeeks || variant === "full",
|
|
104
|
+
showWeekNumbers,
|
|
105
|
+
...minView !== void 0 ? { minView } : {},
|
|
106
|
+
...maxView !== void 0 ? { maxView } : {},
|
|
107
|
+
...mode === "year" ? {
|
|
108
|
+
defaultView: "month",
|
|
109
|
+
maxView: "month"
|
|
110
|
+
} : {},
|
|
55
111
|
onValueChange: (details) => onValueChange?.(details.value),
|
|
56
112
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ jsx(DatePicker.View, {
|
|
58
114
|
view: "day",
|
|
59
|
-
children:
|
|
60
|
-
"aria-label": day.long,
|
|
61
|
-
children: day.narrow
|
|
62
|
-
}, id)) }) }) }), /* @__PURE__ */ jsx(DatePicker.TableBody, { children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (dp) => dp.weeks.map((week, id) => /* @__PURE__ */ jsx(DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
63
|
-
value: day,
|
|
64
|
-
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, { children: day.day })
|
|
65
|
-
}, id2)) }, id)) }) })] })]
|
|
115
|
+
children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (dp) => /* @__PURE__ */ jsxs(Fragment, { children: [header(dp), dayTable(dp)] }) })
|
|
66
116
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ jsx(DatePicker.View, {
|
|
68
118
|
view: "month",
|
|
69
|
-
children:
|
|
70
|
-
columns: 3,
|
|
71
|
-
children: /* @__PURE__ */ jsx(DatePicker.TableBody, { children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (dp) => dp.getMonthsGrid({ columns: 3 }).map((months, id) => /* @__PURE__ */ jsx(DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
72
|
-
value: month.value,
|
|
73
|
-
columns: 3,
|
|
74
|
-
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, { children: month.label })
|
|
75
|
-
}, id2)) }, id)) }) })
|
|
76
|
-
})]
|
|
119
|
+
children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (dp) => /* @__PURE__ */ jsxs(Fragment, { children: [header(dp), monthGrid(dp, mode === "year" ? 4 : 3)] }) })
|
|
77
120
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
121
|
+
mode === "month" ? /* @__PURE__ */ jsx(DatePicker.View, {
|
|
79
122
|
view: "year",
|
|
80
|
-
children:
|
|
81
|
-
|
|
82
|
-
children: /* @__PURE__ */ jsx(DatePicker.TableBody, { children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (dp) => dp.getYearsGrid({ columns: 3 }).map((years, id) => /* @__PURE__ */ jsx(DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
83
|
-
value: year.value,
|
|
84
|
-
columns: 3,
|
|
85
|
-
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, { children: year.label })
|
|
86
|
-
}, id2)) }, id)) }) })
|
|
87
|
-
})]
|
|
88
|
-
})
|
|
123
|
+
children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (dp) => /* @__PURE__ */ jsxs(Fragment, { children: [header(), yearGrid(dp)] }) })
|
|
124
|
+
}) : null
|
|
89
125
|
]
|
|
90
126
|
}), children]
|
|
91
127
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
4
4
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { Checkbox as Checkbox$1 } from "../checkbox/index.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
@@ -5,7 +5,7 @@ import { HTMLAttributes } from "react";
|
|
|
5
5
|
export interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
6
|
value: number;
|
|
7
7
|
max?: number;
|
|
8
|
-
tone?: "ink" | "
|
|
8
|
+
tone?: "ink" | "primary" | "success" | "warning" | "danger" | "info";
|
|
9
9
|
variant?: "solid" | "subtle" | "outline";
|
|
10
10
|
}
|
|
11
11
|
declare function ChipImpl({ value, max, tone, variant, ...rest }: ChipProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
3
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
4
4
|
import { Button } from "../button/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ComponentType, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { FieldApi, FormApi, useField, useForm } from "@tanstack/react-form";
|
|
3
|
+
//#region src/components/form/index.d.ts
|
|
4
|
+
/** The seam this family passes the engine through — the members the
|
|
5
|
+
* components drive, with the engine's field-name generics opened to
|
|
6
|
+
* `any`. The engine ships no "any form" alias: its loosest, `FormLikeAPI`,
|
|
7
|
+
* still pins names to `string`, which a concrete form's literal names
|
|
8
|
+
* cannot satisfy. */
|
|
9
|
+
interface AnyFormApi {
|
|
10
|
+
handleSubmit(): Promise<unknown>;
|
|
11
|
+
setFieldMeta(field: any, updater: (prev: any) => any): void;
|
|
12
|
+
Field: ComponentType<any>;
|
|
13
|
+
}
|
|
14
|
+
/** The form element itself: native submit interception handing the event
|
|
15
|
+
* to the engine, one grid, one spacing voice. */
|
|
16
|
+
export interface FormProps extends HTMLAttributes<HTMLFormElement> {
|
|
17
|
+
form: AnyFormApi;
|
|
18
|
+
}
|
|
19
|
+
declare function FormImpl({ form, children, ...rest }: FormProps): import("react").JSX.Element;
|
|
20
|
+
export declare const Form: typeof FormImpl & {
|
|
21
|
+
Root: typeof FormImpl;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The named slot in the grid: label, control, hint — and the engine's
|
|
25
|
+
* errors for this name, shown through the same parts the standalone
|
|
26
|
+
* Field family styles. The children may be a render receiving the live
|
|
27
|
+
* TanStack field (value, handleChange, handleBlur, full state), so every
|
|
28
|
+
* capability the engine has is right there where the control is wired.
|
|
29
|
+
* Without a Form above it degrades to a plain labelled field.
|
|
30
|
+
*/
|
|
31
|
+
export interface FormFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
32
|
+
form?: AnyFormApi;
|
|
33
|
+
name: string;
|
|
34
|
+
/** The engine's validator slots for this name (onChange, onBlur, ...). */
|
|
35
|
+
validators?: any;
|
|
36
|
+
label?: string;
|
|
37
|
+
hint?: string;
|
|
38
|
+
required?: boolean;
|
|
39
|
+
invalid?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
children?: ReactNode | ((field: any) => ReactNode);
|
|
42
|
+
}
|
|
43
|
+
declare function FormFieldImpl({ form: formProp, name, label, hint, required, invalid, disabled, children, ...rest }: FormFieldProps): import("react").JSX.Element;
|
|
44
|
+
export declare const FormField: typeof FormFieldImpl & {
|
|
45
|
+
Root: typeof FormFieldImpl;
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { type FieldApi, type FormApi, useField, useForm };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Video, r as formatMediaTime, t as Audio } from "../../media-player-
|
|
1
|
+
import { n as Video, r as formatMediaTime, t as Audio } from "../../media-player-C0WcjVI-.mjs";
|
|
2
2
|
export { Audio, Video, formatMediaTime };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
3
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
@@ -21,6 +21,8 @@ type PaginationFacadeProps = {
|
|
|
21
21
|
siblingCount?: number;
|
|
22
22
|
label?: string;
|
|
23
23
|
size?: "sm" | "md" | "lg";
|
|
24
|
+
/** full is the page-seal ladder; simple keeps prev, the count, next. */
|
|
25
|
+
variant?: "default" | "simple";
|
|
24
26
|
className?: string;
|
|
25
27
|
style?: CSSProperties;
|
|
26
28
|
onValueChange?: (page: number) => void;
|