@cascivo/react 0.16.0 → 0.17.0
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/README.md +6 -1
- package/dist/accordion/accordion.js +5 -4
- package/dist/app-shell/app-shell.css +1 -1
- package/dist/app-shell/app-shell.js +28 -26
- package/dist/app-shell/app-shell.module.js +8 -8
- package/dist/badge/badge.js +1 -1
- package/dist/button/button.css +1 -1
- package/dist/button/button.js +4 -1
- package/dist/button/button.module.js +4 -1
- package/dist/calendar/calendar.js +67 -63
- package/dist/card/card.css +1 -1
- package/dist/card/card.module.js +8 -8
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.module.js +4 -4
- package/dist/combobox/combobox.js +55 -54
- package/dist/context-menu/context-menu.js +42 -38
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +155 -160
- package/dist/data-table/data-table.module.js +29 -29
- package/dist/date-picker/date-picker.js +90 -89
- package/dist/field/field.css +1 -1
- package/dist/field/field.module.js +3 -3
- package/dist/index.d.ts +307 -145
- package/dist/infinite-scroll/infinite-scroll.css +1 -0
- package/dist/infinite-scroll/infinite-scroll.js +49 -0
- package/dist/infinite-scroll/infinite-scroll.module.js +8 -0
- package/dist/large-title-header/large-title-header.css +1 -0
- package/dist/large-title-header/large-title-header.js +38 -0
- package/dist/large-title-header/large-title-header.module.js +13 -0
- package/dist/layouts/src/grid/grid.css +1 -1
- package/dist/layouts/src/grid/grid.module.js +3 -3
- package/dist/link/link.css +1 -1
- package/dist/link/link.module.js +1 -1
- package/dist/menu/menu.js +47 -43
- package/dist/node/accordion/accordion.js +5 -4
- package/dist/node/app-shell/app-shell.js +28 -26
- package/dist/node/app-shell/app-shell.module.js +8 -8
- package/dist/node/badge/badge.js +1 -1
- package/dist/node/button/button.js +4 -1
- package/dist/node/button/button.module.js +4 -1
- package/dist/node/calendar/calendar.js +67 -63
- package/dist/node/card/card.module.js +8 -8
- package/dist/node/checkbox/checkbox.module.js +4 -4
- package/dist/node/combobox/combobox.js +55 -54
- package/dist/node/context-menu/context-menu.js +42 -38
- package/dist/node/data-table/data-table.js +155 -160
- package/dist/node/data-table/data-table.module.js +29 -29
- package/dist/node/date-picker/date-picker.js +90 -89
- package/dist/node/field/field.module.js +3 -3
- package/dist/node/infinite-scroll/infinite-scroll.js +49 -0
- package/dist/node/infinite-scroll/infinite-scroll.module.js +7 -0
- package/dist/node/large-title-header/large-title-header.js +38 -0
- package/dist/node/large-title-header/large-title-header.module.js +12 -0
- package/dist/node/layouts/src/grid/grid.module.js +3 -3
- package/dist/node/link/link.module.js +1 -1
- package/dist/node/menu/menu.js +47 -43
- package/dist/node/react/src/index.js +27 -23
- package/dist/node/reorder-list/reorder-list.js +143 -0
- package/dist/node/reorder-list/reorder-list.module.js +11 -0
- package/dist/node/search/search.js +5 -4
- package/dist/node/side-nav/side-nav.js +90 -89
- package/dist/node/skip-nav/skip-nav.js +1 -0
- package/dist/node/swap/swap.js +2 -3
- package/dist/node/switcher/switcher.js +1 -1
- package/dist/node/tabs/tabs.js +41 -40
- package/dist/node/tag/tag.module.js +2 -2
- package/dist/node/toc/toc.js +5 -4
- package/dist/node/virtual-list/virtual-list.js +40 -0
- package/dist/node/virtual-list/virtual-list.module.js +7 -0
- package/dist/node/wheel-picker/wheel-picker.js +84 -0
- package/dist/node/wheel-picker/wheel-picker.module.js +8 -0
- package/dist/react/src/index.js +27 -23
- package/dist/reorder-list/reorder-list.css +1 -0
- package/dist/reorder-list/reorder-list.js +143 -0
- package/dist/reorder-list/reorder-list.module.js +12 -0
- package/dist/search/search.js +5 -4
- package/dist/side-nav/side-nav.js +90 -89
- package/dist/skip-nav/skip-nav.js +1 -0
- package/dist/styles.css +48 -11
- package/dist/swap/swap.js +2 -3
- package/dist/switcher/switcher.js +1 -1
- package/dist/tabs/tabs.js +41 -40
- package/dist/tag/tag.css +1 -1
- package/dist/tag/tag.module.js +2 -2
- package/dist/toc/toc.js +5 -4
- package/dist/virtual-list/virtual-list.css +1 -0
- package/dist/virtual-list/virtual-list.js +40 -0
- package/dist/virtual-list/virtual-list.module.js +8 -0
- package/dist/wheel-picker/wheel-picker.css +1 -0
- package/dist/wheel-picker/wheel-picker.js +84 -0
- package/dist/wheel-picker/wheel-picker.module.js +9 -0
- package/package.json +4 -4
- package/readme.body.md +6 -1
- package/dist/node/react/src/theme.js +0 -78
- package/dist/node/storage/src/drivers.js +0 -34
- package/dist/node/storage/src/persisted-signal.js +0 -41
- package/dist/react/src/theme.js +0 -78
- package/dist/storage/src/drivers.js +0 -34
- package/dist/storage/src/persisted-signal.js +0 -41
package/dist/index.d.ts
CHANGED
|
@@ -22,8 +22,18 @@
|
|
|
22
22
|
* npx -y @cascivo/docs (index; `npx @cascivo/docs <component>` for one doc)
|
|
23
23
|
*/
|
|
24
24
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, FormHTMLAttributes, HTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, MouseEvent, ReactElement, ReactNode, RefObject, SelectHTMLAttributes, TextareaHTMLAttributes, TimeHTMLAttributes } from "react";
|
|
25
|
-
import { DismissableLayer, DismissableLayerProps, ErrorBoundary, FocusScope, LinkComponent, LinkComponentProps, Machine, MachineConfig, Portal, Presence, ProgressInput, RovingOrientation, Signal, Slot, SlotProps, SpaceStep, SuspenseBoundary, ToneInput, UseClipboardOptions, UseClipboardReturn, UseControllableSignalOptions, UseDisclosureOptions, UseDisclosureReturn, VisuallyHidden, VisuallyHiddenProps, batch, cn, composeRefs, computePosition, computed, createMachine, createScope, createStreamBuffer, effect, getLinkComponent, mergeProps, setLinkComponent, signal, useAnchorPosition, useClipboard, useComputed, useControllableSignal, useDisclosure, useEffectPropSignal, useId, useMachine, useMediaQuery, useRovingFocus, useScope, useScrollLock, useSignal, useSignalEffect, useSignals, useStreamBuffer, useTypeahead } from "@cascivo/core";
|
|
25
|
+
import { DismissableLayer, DismissableLayerProps, ErrorBoundary, FocusScope, LinkComponent, LinkComponentProps, Machine, MachineConfig, Portal, Presence, ProgressInput, RovingOrientation, Signal, Slot, SlotProps, SpaceStep, SuspenseBoundary, ThemeProvider, ThemeProviderProps, ToneInput, UseClipboardOptions, UseClipboardReturn, UseControllableSignalOptions, UseDisclosureOptions, UseDisclosureReturn, VisuallyHidden, VisuallyHiddenProps, applyTheme, batch, cn, composeRefs, computePosition, computed, createMachine, createScope, createStreamBuffer, effect, getLinkComponent, mergeProps, setLinkComponent, setTheme, signal, themePreloadScript, themeSignal, useAnchorPosition, useClipboard, useComputed, useControllableSignal, useDisclosure, useEffectPropSignal, useId, useMachine, useMediaQuery, useRovingFocus, useScope, useScrollLock, useSignal, useSignalEffect, useSignals, useStreamBuffer, useTheme, useTypeahead } from "@cascivo/core";
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Button.
|
|
29
|
+
*
|
|
30
|
+
* ⚠ **DOM shape:** children are wrapped in an inner `<span>` so the loading `Spinner` can be
|
|
31
|
+
* a sibling rather than being nested inside the label. Layout CSS written against
|
|
32
|
+
* `.my-button > span` therefore targets that wrapper, not your content — one adopter's
|
|
33
|
+
* `> span { display: flex }` hit the wrapper and collapsed the spacing inside it. The wrapper
|
|
34
|
+
* is already a flex row that inherits the button's `gap`, so composing an icon with a label
|
|
35
|
+
* needs no CSS of your own.
|
|
36
|
+
*/
|
|
27
37
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
28
38
|
/**
|
|
29
39
|
* Selects the visual style variant.
|
|
@@ -78,7 +88,12 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
78
88
|
*/
|
|
79
89
|
variant?: 'default' | 'outlined' | 'elevated';
|
|
80
90
|
/**
|
|
81
|
-
* Inner padding of the
|
|
91
|
+
* Inner padding of the CARD BOX. ⚠ `padding="none"` deliberately does NOT strip the
|
|
92
|
+
* padding from CardHeader/CardContent/CardFooter — those keep their own. It means "let a
|
|
93
|
+
* flush child (a LogViewer, an image, an edge-to-edge table) reach the card's edge";
|
|
94
|
+
* zeroing both put the title flush against the border and made the mode unusable with the
|
|
95
|
+
* composition it exists for. For an edge-to-edge table, skip CardContent and pass the
|
|
96
|
+
* table as a direct child.
|
|
82
97
|
*
|
|
83
98
|
* @defaultValue `md`
|
|
84
99
|
* @see the component manifest
|
|
@@ -128,8 +143,16 @@ declare function CardFooter({
|
|
|
128
143
|
children,
|
|
129
144
|
...props
|
|
130
145
|
}: CardFooterProps): import("react").JSX.Element;
|
|
131
|
-
/**
|
|
132
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Badge-only looks that aren't a severity tone.
|
|
148
|
+
*
|
|
149
|
+
* Named for the PROP it types, not for a prop that does not exist. As `BadgeShape` it sat
|
|
150
|
+
* directly above `BadgeProps` in the generated `.d.ts` and read as the type of a `shape`
|
|
151
|
+
* prop, so an adopter wrote `<Badge shape="outline">` in four files before the compiler
|
|
152
|
+
* disagreed (2026-08-08 report A). A type named after a prop the component does not have is
|
|
153
|
+
* a trap of our own making.
|
|
154
|
+
*/
|
|
155
|
+
type BadgeVariant = 'secondary' | 'outline' | 'primary';
|
|
133
156
|
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
134
157
|
/**
|
|
135
158
|
* Severity tone or badge-specific look. Accepts the catalog-wide `Tone` vocabulary
|
|
@@ -137,7 +160,7 @@ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
137
160
|
* (`default`, `destructive`, `error`) — they are aliases of the same tones, so one domain
|
|
138
161
|
* enum can drive `Badge`, `Tag`, `Status` and `Notification` with no lookup table.
|
|
139
162
|
*/
|
|
140
|
-
variant?: ToneInput |
|
|
163
|
+
variant?: ToneInput | BadgeVariant;
|
|
141
164
|
size?: 'sm' | 'md';
|
|
142
165
|
}
|
|
143
166
|
declare function Badge({
|
|
@@ -668,6 +691,26 @@ declare function TabsList({
|
|
|
668
691
|
interface TabsTriggerProps extends HTMLAttributes<HTMLButtonElement> {
|
|
669
692
|
value: string;
|
|
670
693
|
disabled?: boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Render your own element instead of the `<button>`, keeping every tab behaviour
|
|
696
|
+
* (`role="tab"`, `aria-selected`, `aria-controls`, the roving `tabIndex`, `data-state`)
|
|
697
|
+
* and the tab styling.
|
|
698
|
+
*
|
|
699
|
+
* This exists for **URL-driven tabs**, the canonical dashboard shape: one route per tab.
|
|
700
|
+
* Navigating from `onValueChange` instead loses middle-click, cmd-click, open-in-new-tab
|
|
701
|
+
* and a crawlable `href` — a real anchor gives you all four for free.
|
|
702
|
+
*
|
|
703
|
+
* ```tsx
|
|
704
|
+
* <TabsTrigger value="overview" asChild>
|
|
705
|
+
* <Link to="/projects/$id/overview">Overview</Link>
|
|
706
|
+
* </TabsTrigger>
|
|
707
|
+
* ```
|
|
708
|
+
*
|
|
709
|
+
* With `asChild`, `disabled` becomes `aria-disabled`: it is not a valid attribute on an
|
|
710
|
+
* anchor, and a slotted element gets no `type` either. See
|
|
711
|
+
* [USING-WITH-A-ROUTER.md](../../../../docs/USING-WITH-A-ROUTER.md) for the full recipe.
|
|
712
|
+
*/
|
|
713
|
+
asChild?: boolean;
|
|
671
714
|
}
|
|
672
715
|
/**
|
|
673
716
|
* `forwardRef` so `ref` reaches the tab `<button>` — see `textarea.tsx` for the full
|
|
@@ -1441,6 +1484,14 @@ interface Column<Row> {
|
|
|
1441
1484
|
* can exceed its container — the extra columns are reachable by horizontal scroll, not
|
|
1442
1485
|
* dropped. Leave at least one free-form column unsized unless you specifically want
|
|
1443
1486
|
* page-stable widths.
|
|
1487
|
+
*
|
|
1488
|
+
* ⚠ **"Leave one unsized" is necessary, not sufficient.** The leftover width is split
|
|
1489
|
+
* between the unsized columns by `table-layout: auto`, which weighs them by content — so
|
|
1490
|
+
* if the sized columns nearly fill the table, what remains can be narrower than the
|
|
1491
|
+
* content needs and long tokens wrap mid-word (`acme-` / `storefront`). Reported at
|
|
1492
|
+
* 6-of-8 columns sized. Rules of thumb: leave the widest free-form column unsized, keep
|
|
1493
|
+
* the sized columns to roughly two thirds of the table, and give the free-form one a
|
|
1494
|
+
* `minWidth` when the data has long unbreakable tokens like slugs or IDs.
|
|
1444
1495
|
*/
|
|
1445
1496
|
width?: string;
|
|
1446
1497
|
/**
|
|
@@ -1495,6 +1546,18 @@ interface DataTableProps<Row> {
|
|
|
1495
1546
|
onClick: (selectedIds: string[]) => void;
|
|
1496
1547
|
}[];
|
|
1497
1548
|
renderExpandedRow?: (row: Row) => ReactNode;
|
|
1549
|
+
/**
|
|
1550
|
+
* Row height preset.
|
|
1551
|
+
*
|
|
1552
|
+
* ⚠ It sets a row **height floor** (`--_row-height`), so it is invisible whenever the cell
|
|
1553
|
+
* content is already taller — a two-line cell or a cell containing a `Badge` stack looks
|
|
1554
|
+
* identical at every density. Reported as "barely distinguishable"; the prop is working,
|
|
1555
|
+
* the content is simply winning. Shrink the cell content, or set
|
|
1556
|
+
* `--cascivo-data-table-cell-gap` to tighten the horizontal rhythm too.
|
|
1557
|
+
*
|
|
1558
|
+
* @defaultValue `normal`
|
|
1559
|
+
* @see the component manifest
|
|
1560
|
+
*/
|
|
1498
1561
|
density?: 'compact' | 'normal' | 'relaxed';
|
|
1499
1562
|
/**
|
|
1500
1563
|
* When true, applies alternating row striping.
|
|
@@ -2630,6 +2693,16 @@ declare function HeaderPanel({
|
|
|
2630
2693
|
className
|
|
2631
2694
|
}: HeaderPanelProps): import("react").JSX.Element;
|
|
2632
2695
|
interface SwitcherLink {
|
|
2696
|
+
/**
|
|
2697
|
+
* Stable React key. Provide when `label`/`href` may repeat (e.g. placeholder `#` links).
|
|
2698
|
+
*
|
|
2699
|
+
* Without it the rows key on `href`, so three sibling teams that all link to `/` produce
|
|
2700
|
+
* duplicate-key warnings on every render and the adopter has to make the hrefs artificially
|
|
2701
|
+
* distinct (2026-08-08 report A). `SideNavItem`, `ShellHeaderNavLink`,
|
|
2702
|
+
* `ShellHeaderNavMenuItem`, `HeaderLink` and `CommandItem` all carry this field already;
|
|
2703
|
+
* `Switcher` was missed by that sweep.
|
|
2704
|
+
*/
|
|
2705
|
+
id?: string;
|
|
2633
2706
|
label: string;
|
|
2634
2707
|
href: string;
|
|
2635
2708
|
active?: boolean;
|
|
@@ -4126,6 +4199,219 @@ declare function Dock({
|
|
|
4126
4199
|
className,
|
|
4127
4200
|
ariaLabel
|
|
4128
4201
|
}: DockProps): import("react").JSX.Element;
|
|
4202
|
+
interface LargeTitleHeaderProps {
|
|
4203
|
+
/** The page title. Rendered as the large heading and mirrored in the collapsed bar. */
|
|
4204
|
+
title: string;
|
|
4205
|
+
/** Content of the scrolling region, rendered below the title. */
|
|
4206
|
+
children: ReactNode;
|
|
4207
|
+
/** Leading slot of the compact bar — typically a back control. */
|
|
4208
|
+
leading?: ReactNode;
|
|
4209
|
+
/** Trailing slot of the compact bar — typically icon buttons. */
|
|
4210
|
+
actions?: ReactNode;
|
|
4211
|
+
/**
|
|
4212
|
+
* Heading level for the title, mapping to h1–h3.
|
|
4213
|
+
*
|
|
4214
|
+
* @defaultValue `1`
|
|
4215
|
+
* @see the component manifest
|
|
4216
|
+
*/
|
|
4217
|
+
level?: 1 | 2 | 3;
|
|
4218
|
+
/**
|
|
4219
|
+
* Scroll distance (px) over which the large title collapses into the bar.
|
|
4220
|
+
*
|
|
4221
|
+
* @defaultValue `48`
|
|
4222
|
+
* @see the component manifest
|
|
4223
|
+
*/
|
|
4224
|
+
collapseDistance?: number;
|
|
4225
|
+
className?: string;
|
|
4226
|
+
}
|
|
4227
|
+
/**
|
|
4228
|
+
* Scrolling region with an iOS-style page header: the large title scrolls away and a
|
|
4229
|
+
* compact sticky bar reveals the same title in its place.
|
|
4230
|
+
*
|
|
4231
|
+
* The collapse is a CSS scroll-driven animation — no scroll listener, no
|
|
4232
|
+
* IntersectionObserver, no client JavaScript of any kind, so this renders complete from
|
|
4233
|
+
* the server and never hydrates. Where `animation-timeline` is unsupported the mirrored
|
|
4234
|
+
* title stays hidden and the region degrades to a plain sticky bar above a heading; the
|
|
4235
|
+
* heading itself is always present, so no content depends on the enhancement.
|
|
4236
|
+
*
|
|
4237
|
+
* The component owns the scroll container so the sticky bar and the scroll timeline
|
|
4238
|
+
* cannot be broken by the surrounding markup. Give it a parent with a resolved height.
|
|
4239
|
+
*/
|
|
4240
|
+
declare function LargeTitleHeader({
|
|
4241
|
+
title,
|
|
4242
|
+
children,
|
|
4243
|
+
leading,
|
|
4244
|
+
actions,
|
|
4245
|
+
level,
|
|
4246
|
+
collapseDistance,
|
|
4247
|
+
className
|
|
4248
|
+
}: LargeTitleHeaderProps): import("react").JSX.Element;
|
|
4249
|
+
interface InfiniteScrollProps {
|
|
4250
|
+
/** Called when the sentinel comes into view, or the button is activated. */
|
|
4251
|
+
onLoadMore: () => Promise<unknown> | unknown;
|
|
4252
|
+
/**
|
|
4253
|
+
* When true, stops observing and renders nothing — there are no more pages.
|
|
4254
|
+
*
|
|
4255
|
+
* @defaultValue `false`
|
|
4256
|
+
* @see the component manifest
|
|
4257
|
+
*/
|
|
4258
|
+
disabled?: boolean;
|
|
4259
|
+
/**
|
|
4260
|
+
* How far ahead of the end to start loading, as an IntersectionObserver root margin.
|
|
4261
|
+
*
|
|
4262
|
+
* @defaultValue `'200px'`
|
|
4263
|
+
* @see the component manifest
|
|
4264
|
+
*/
|
|
4265
|
+
rootMargin?: string;
|
|
4266
|
+
labels?: {
|
|
4267
|
+
loadMore?: string;
|
|
4268
|
+
loading?: string;
|
|
4269
|
+
};
|
|
4270
|
+
className?: string;
|
|
4271
|
+
}
|
|
4272
|
+
/**
|
|
4273
|
+
* Loads the next page when the end of a list comes into view.
|
|
4274
|
+
*
|
|
4275
|
+
* Place it as the last child of the scrolling region, after the list. It renders a real
|
|
4276
|
+
* "Load more" button and auto-activates it via an `IntersectionObserver` — so the next
|
|
4277
|
+
* page is reachable by keyboard and by screen reader, not only by scrolling, which is the
|
|
4278
|
+
* standing accessibility complaint against scroll-only infinite lists. Re-entry is
|
|
4279
|
+
* guarded, so a sentinel that stays visible after a short page cannot loop.
|
|
4280
|
+
*/
|
|
4281
|
+
declare function InfiniteScroll({
|
|
4282
|
+
onLoadMore,
|
|
4283
|
+
disabled,
|
|
4284
|
+
rootMargin,
|
|
4285
|
+
labels,
|
|
4286
|
+
className
|
|
4287
|
+
}: InfiniteScrollProps): import("react").JSX.Element | null;
|
|
4288
|
+
interface ReorderItem {
|
|
4289
|
+
id: string;
|
|
4290
|
+
label: ReactNode;
|
|
4291
|
+
/** Plain-text name used in announcements when `label` is not a string. */
|
|
4292
|
+
name?: string;
|
|
4293
|
+
}
|
|
4294
|
+
interface ReorderListProps {
|
|
4295
|
+
value: ReorderItem[];
|
|
4296
|
+
onValueChange: (value: ReorderItem[]) => void;
|
|
4297
|
+
/**
|
|
4298
|
+
* When true, disables the control and removes it from the tab order.
|
|
4299
|
+
*
|
|
4300
|
+
* @defaultValue `false`
|
|
4301
|
+
* @see the component manifest
|
|
4302
|
+
*/
|
|
4303
|
+
disabled?: boolean;
|
|
4304
|
+
labels?: {
|
|
4305
|
+
handle?: string;
|
|
4306
|
+
grabbed?: string;
|
|
4307
|
+
moved?: string;
|
|
4308
|
+
dropped?: string;
|
|
4309
|
+
cancelled?: string;
|
|
4310
|
+
};
|
|
4311
|
+
className?: string;
|
|
4312
|
+
}
|
|
4313
|
+
/**
|
|
4314
|
+
* A list whose rows can be reordered by pointer drag or entirely by keyboard.
|
|
4315
|
+
*
|
|
4316
|
+
* Each row carries a drag handle. Space or Enter picks the row up, Arrow keys move it,
|
|
4317
|
+
* Space or Enter drops it, and Escape restores the order it had before the pick-up — the
|
|
4318
|
+
* keyboard path Ionic's pointer-only `ion-reorder` has no equivalent for. Every transition
|
|
4319
|
+
* is announced through a polite live region.
|
|
4320
|
+
*/
|
|
4321
|
+
declare function ReorderList({
|
|
4322
|
+
value,
|
|
4323
|
+
onValueChange,
|
|
4324
|
+
disabled,
|
|
4325
|
+
labels,
|
|
4326
|
+
className
|
|
4327
|
+
}: ReorderListProps): import("react").JSX.Element;
|
|
4328
|
+
interface VirtualListProps<Item> {
|
|
4329
|
+
items: Item[];
|
|
4330
|
+
/** Fixed row height in px. Rows must all be this tall for positions to be correct. */
|
|
4331
|
+
itemHeight: number;
|
|
4332
|
+
/**
|
|
4333
|
+
* Height of the scrolling viewport, in px.
|
|
4334
|
+
*
|
|
4335
|
+
* Deliberately not a CSS length: the visible row count is computed from this number, and
|
|
4336
|
+
* a relative length like `100%` cannot be resolved without measuring. Wrap the list and
|
|
4337
|
+
* pass a measured px value if the height has to be fluid.
|
|
4338
|
+
*/
|
|
4339
|
+
height: number;
|
|
4340
|
+
renderItem: (item: Item, index: number) => ReactNode;
|
|
4341
|
+
/**
|
|
4342
|
+
* Extra rows rendered above and below the visible window, to cover fast scrolling.
|
|
4343
|
+
*
|
|
4344
|
+
* @defaultValue `3`
|
|
4345
|
+
* @see the component manifest
|
|
4346
|
+
*/
|
|
4347
|
+
overscan?: number;
|
|
4348
|
+
/** Accessible label for the list; defaults to none, so label it when standalone. */
|
|
4349
|
+
ariaLabel?: string;
|
|
4350
|
+
className?: string;
|
|
4351
|
+
}
|
|
4352
|
+
/**
|
|
4353
|
+
* Renders only the rows inside the scrolled viewport, so a list of any length costs a
|
|
4354
|
+
* constant number of DOM nodes.
|
|
4355
|
+
*
|
|
4356
|
+
* Row height is fixed: positions are arithmetic rather than measured, which keeps scrolling
|
|
4357
|
+
* on the compositor and avoids a layout pass per frame. Each rendered row carries
|
|
4358
|
+
* `aria-setsize` and `aria-posinset` for the **full** collection, so assistive technology
|
|
4359
|
+
* reports "3 of 10000" rather than the size of the rendered window.
|
|
4360
|
+
*/
|
|
4361
|
+
declare function VirtualList<Item>({
|
|
4362
|
+
items,
|
|
4363
|
+
itemHeight,
|
|
4364
|
+
height,
|
|
4365
|
+
renderItem,
|
|
4366
|
+
overscan,
|
|
4367
|
+
ariaLabel,
|
|
4368
|
+
className
|
|
4369
|
+
}: VirtualListProps<Item>): import("react").JSX.Element;
|
|
4370
|
+
interface WheelPickerOption {
|
|
4371
|
+
value: string;
|
|
4372
|
+
label: string;
|
|
4373
|
+
}
|
|
4374
|
+
interface WheelPickerProps {
|
|
4375
|
+
options: WheelPickerOption[];
|
|
4376
|
+
value: string;
|
|
4377
|
+
onValueChange: (value: string) => void;
|
|
4378
|
+
/**
|
|
4379
|
+
* How many rows are visible. Odd numbers keep the selection centred.
|
|
4380
|
+
*
|
|
4381
|
+
* @defaultValue `5`
|
|
4382
|
+
* @see the component manifest
|
|
4383
|
+
*/
|
|
4384
|
+
visibleCount?: number;
|
|
4385
|
+
/**
|
|
4386
|
+
* Row height in px.
|
|
4387
|
+
*
|
|
4388
|
+
* @defaultValue `36`
|
|
4389
|
+
* @see the component manifest
|
|
4390
|
+
*/
|
|
4391
|
+
itemHeight?: number;
|
|
4392
|
+
ariaLabel?: string;
|
|
4393
|
+
className?: string;
|
|
4394
|
+
}
|
|
4395
|
+
/**
|
|
4396
|
+
* iOS-style drum picker: a column of options that scrolls and snaps to a centred selection.
|
|
4397
|
+
*
|
|
4398
|
+
* The wheel is CSS scroll-snap, not a JavaScript gesture engine — momentum, rubber-banding
|
|
4399
|
+
* and snapping are the platform's, so the whole gesture runs on the compositor and behaves
|
|
4400
|
+
* natively on every device. JavaScript only reads which row settled and moves the column
|
|
4401
|
+
* when the value changes from outside.
|
|
4402
|
+
*
|
|
4403
|
+
* Semantically a single-select listbox whose selection follows focus: Arrow keys, Home and
|
|
4404
|
+
* End move the selection and scroll to match, so there is nothing to confirm.
|
|
4405
|
+
*/
|
|
4406
|
+
declare function WheelPicker({
|
|
4407
|
+
options,
|
|
4408
|
+
value,
|
|
4409
|
+
onValueChange,
|
|
4410
|
+
visibleCount,
|
|
4411
|
+
itemHeight,
|
|
4412
|
+
ariaLabel,
|
|
4413
|
+
className
|
|
4414
|
+
}: WheelPickerProps): import("react").JSX.Element;
|
|
4129
4415
|
interface DrawerProps {
|
|
4130
4416
|
/** Controlled open state. */
|
|
4131
4417
|
open?: boolean;
|
|
@@ -4412,6 +4698,20 @@ interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4412
4698
|
defaultOpen?: boolean;
|
|
4413
4699
|
/** Fired when the nav requests open/close (burger, Escape, scrim). */
|
|
4414
4700
|
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
4701
|
+
/**
|
|
4702
|
+
* Inset around the main content area, as a space-scale step.
|
|
4703
|
+
*
|
|
4704
|
+
* ⚠ It **defaults to `6`**, not to none. `<main>` shipped with `padding: 0` for three
|
|
4705
|
+
* releases, so every adopter wrote the same wrapper `<div style={{ padding: … }}>` and
|
|
4706
|
+
* every app's first screenshot had its buttons clipped against the viewport edge — the CLI's
|
|
4707
|
+
* own generated dashboard modelled the workaround with an inline style its sibling
|
|
4708
|
+
* AGENTS.md forbids. Reported three times (2026-07-24, 2026-08-06, 2026-08-08).
|
|
4709
|
+
*
|
|
4710
|
+
* Pass `'none'` for a full-bleed layout that owns its own insets (a map, a split pane).
|
|
4711
|
+
*
|
|
4712
|
+
* @defaultValue `6`
|
|
4713
|
+
*/
|
|
4714
|
+
padding?: SpaceStep | 'none';
|
|
4415
4715
|
className?: string | undefined;
|
|
4416
4716
|
}
|
|
4417
4717
|
/**
|
|
@@ -4440,6 +4740,7 @@ declare function AppShell({
|
|
|
4440
4740
|
open,
|
|
4441
4741
|
defaultOpen,
|
|
4442
4742
|
onOpenChange,
|
|
4743
|
+
padding,
|
|
4443
4744
|
className,
|
|
4444
4745
|
...props
|
|
4445
4746
|
}: AppShellProps): import("react").JSX.Element;
|
|
@@ -4749,143 +5050,4 @@ declare function PageHeader({
|
|
|
4749
5050
|
actions,
|
|
4750
5051
|
className
|
|
4751
5052
|
}: PageHeaderProps): import("react").JSX.Element;
|
|
4752
|
-
|
|
4753
|
-
* Set the active theme imperatively, from anywhere. Persists the choice and
|
|
4754
|
-
* drives the `data-theme` attribute through the mounted {@link ThemeProvider}.
|
|
4755
|
-
*
|
|
4756
|
-
* Requires a mounted {@link ThemeProvider} — this writes the signal, the provider writes
|
|
4757
|
-
* the DOM. Without one, nothing restyles (dev builds warn). To write the attribute
|
|
4758
|
-
* directly, with no provider and no React, use {@link applyTheme}.
|
|
4759
|
-
*/
|
|
4760
|
-
declare function setTheme(next: string): void;
|
|
4761
|
-
/**
|
|
4762
|
-
* Write a theme onto an element directly, with no provider and no React.
|
|
4763
|
-
*
|
|
4764
|
-
* The escape hatch for imperative setups: a theme toggle in a non-React shell, a
|
|
4765
|
-
* pre-hydration inline script, a Storybook decorator, an e2e test. Also updates the theme
|
|
4766
|
-
* signal, so a React tree reading {@link useTheme} stays in sync.
|
|
4767
|
-
*
|
|
4768
|
-
* `setTheme` deliberately does **not** do this itself: it is SSR-callable, and
|
|
4769
|
-
* `ThemeProvider` can scope a theme to any subtree via its `target` ref. A direct document
|
|
4770
|
-
* write inside `setTheme` would break scoped theming and touch `document` on the server.
|
|
4771
|
-
*
|
|
4772
|
-
* ```ts
|
|
4773
|
-
* applyTheme('midnight') // <html data-theme="midnight">
|
|
4774
|
-
* applyTheme('warm', panelRef.current) // scope to a subtree
|
|
4775
|
-
* ```
|
|
4776
|
-
*
|
|
4777
|
-
* No-op on the server (no `document`).
|
|
4778
|
-
*/
|
|
4779
|
-
declare function applyTheme(next: string, target?: HTMLElement | null): void;
|
|
4780
|
-
/**
|
|
4781
|
-
* Read and set the active theme. Returns the current theme **name** (a plain
|
|
4782
|
-
* string) and a setter — the component re-renders when the theme changes with no
|
|
4783
|
-
* signal handling on your part (this hook calls `useSignals()` for you, so it
|
|
4784
|
-
* works in React apps with no Babel transform). This is the React-idiomatic shape;
|
|
4785
|
-
* for signal-native code (`computed()`, `effect()`, Preact) use {@link themeSignal}.
|
|
4786
|
-
*
|
|
4787
|
-
* ```tsx
|
|
4788
|
-
* const [theme, setTheme] = useTheme()
|
|
4789
|
-
* return <button onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}>
|
|
4790
|
-
* {theme}
|
|
4791
|
-
* </button>
|
|
4792
|
-
* ```
|
|
4793
|
-
*/
|
|
4794
|
-
declare function useTheme(): readonly [string, (next: string) => void];
|
|
4795
|
-
/**
|
|
4796
|
-
* The underlying theme signal, for signal-native code — `computed()`, `effect()`,
|
|
4797
|
-
* or a Preact app where signals are natively reactive. Most React apps want
|
|
4798
|
-
* {@link useTheme}, which hands back a plain string and handles subscription.
|
|
4799
|
-
*/
|
|
4800
|
-
declare function themeSignal(): Signal<string>;
|
|
4801
|
-
interface ThemeProviderProps {
|
|
4802
|
-
/**
|
|
4803
|
-
* Theme to use when nothing is persisted yet. When set, it **wins over** the
|
|
4804
|
-
* visitor's OS `prefers-color-scheme` — pass it for a "dark by default" or
|
|
4805
|
-
* custom-theme (`'midnight'`, …) app. Omit it to follow the OS (light/dark),
|
|
4806
|
-
* falling back to `'light'`. Precedence: persisted value > `defaultTheme` (if
|
|
4807
|
-
* set) > OS preference > `'light'`.
|
|
4808
|
-
*/
|
|
4809
|
-
defaultTheme?: string;
|
|
4810
|
-
/**
|
|
4811
|
-
* Controlled theme. When set, the provider mirrors it on every render and the
|
|
4812
|
-
* persisted value is ignored — the parent owns the state (React semantics).
|
|
4813
|
-
*/
|
|
4814
|
-
value?: string;
|
|
4815
|
-
/** localStorage key for the persisted choice. Defaults to `cascivo-theme`. */
|
|
4816
|
-
storageKey?: string;
|
|
4817
|
-
/** Attribute written to the target element. Defaults to `data-theme`. */
|
|
4818
|
-
attribute?: string;
|
|
4819
|
-
/**
|
|
4820
|
-
* Element to theme. Omit to theme the whole document (`<html>`). Pass a ref to
|
|
4821
|
-
* a container to scope the theme to a subtree — cascivo themes resolve against
|
|
4822
|
-
* the nearest `data-theme`, so a scoped subtree can differ from the page.
|
|
4823
|
-
*/
|
|
4824
|
-
target?: RefObject<HTMLElement | null>;
|
|
4825
|
-
/** Called whenever the active theme changes. */
|
|
4826
|
-
onChange?: (theme: string) => void;
|
|
4827
|
-
/**
|
|
4828
|
-
* CSP nonce forwarded to the inline attribute-setter script emitted for the
|
|
4829
|
-
* controlled ({@link ThemeProviderProps.value}) SSR flow. Set it to match your
|
|
4830
|
-
* Content-Security-Policy `script-src 'nonce-…'`.
|
|
4831
|
-
*/
|
|
4832
|
-
nonce?: string;
|
|
4833
|
-
children?: ReactNode;
|
|
4834
|
-
}
|
|
4835
|
-
/**
|
|
4836
|
-
* Binds the active theme signal to a `data-theme` attribute and persists the
|
|
4837
|
-
* choice — the reusable, SSR-safe form of the wiring apps otherwise hand-roll.
|
|
4838
|
-
*
|
|
4839
|
-
* - No flash of the wrong theme: pair with {@link themePreloadScript} in your
|
|
4840
|
-
* document `<head>` so the correct theme paints on first byte.
|
|
4841
|
-
* - No banned React hooks: the DOM write happens in `useSignalEffect`, not
|
|
4842
|
-
* `useEffect`; there is no `useState`/`useContext`.
|
|
4843
|
-
* - Uncontrolled by default (persists to localStorage); pass `value` to control.
|
|
4844
|
-
* - SSR-safe when controlled: with a `value` (and no scoped `target`), the
|
|
4845
|
-
* provider renders a tiny inline script that sets `data-theme` during HTML
|
|
4846
|
-
* parsing, so the server-rendered first paint is themed — no flash, no
|
|
4847
|
-
* hydration mismatch (the same markup renders on both sides; the client effect
|
|
4848
|
-
* owns every update after hydration). For the uncontrolled/persisted flow, pair
|
|
4849
|
-
* with {@link themePreloadScript} in `<head>` instead.
|
|
4850
|
-
*/
|
|
4851
|
-
declare function ThemeProvider({
|
|
4852
|
-
defaultTheme,
|
|
4853
|
-
value,
|
|
4854
|
-
storageKey,
|
|
4855
|
-
attribute,
|
|
4856
|
-
target,
|
|
4857
|
-
onChange,
|
|
4858
|
-
nonce,
|
|
4859
|
-
children
|
|
4860
|
-
}: ThemeProviderProps): ReactNode;
|
|
4861
|
-
/**
|
|
4862
|
-
* A tiny script to inline in your document `<head>` (before the app bundle) so
|
|
4863
|
-
* the persisted theme paints on the first byte — no flash of the wrong theme on
|
|
4864
|
-
* SSR or a hard reload. Pass the same `storageKey`/`attribute`/`defaultTheme`
|
|
4865
|
-
* you give {@link ThemeProvider}.
|
|
4866
|
-
*
|
|
4867
|
-
* Precedence matches {@link ThemeProvider}: persisted value > `defaultTheme`
|
|
4868
|
-
* (if set) > OS `prefers-color-scheme` > `'light'`. Passing `defaultTheme`
|
|
4869
|
-
* suppresses the OS check, so a "dark by default" app stays dark on a light-OS
|
|
4870
|
-
* visitor.
|
|
4871
|
-
*
|
|
4872
|
-
* The script sets `data-theme` **before** React hydrates, so add
|
|
4873
|
-
* `suppressHydrationWarning` to the element that carries the attribute (usually
|
|
4874
|
-
* `<html>`) — the mutation is intentional, and without the flag React 19 logs a
|
|
4875
|
-
* hydration mismatch.
|
|
4876
|
-
*
|
|
4877
|
-
* ```tsx
|
|
4878
|
-
* // Next.js app/layout.tsx
|
|
4879
|
-
* <html suppressHydrationWarning>
|
|
4880
|
-
* <head>
|
|
4881
|
-
* <script dangerouslySetInnerHTML={{ __html: themePreloadScript({ defaultTheme: 'dark' }) }} />
|
|
4882
|
-
* </head>
|
|
4883
|
-
* </html>
|
|
4884
|
-
* ```
|
|
4885
|
-
*/
|
|
4886
|
-
declare function themePreloadScript(options?: {
|
|
4887
|
-
storageKey?: string;
|
|
4888
|
-
attribute?: string;
|
|
4889
|
-
defaultTheme?: string;
|
|
4890
|
-
}): string;
|
|
4891
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, ActionSheet, ActionSheetAction, ActionSheetProps, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, AutoGrid, AutoGridProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, BottomSheet, BottomSheetProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarLabels, CalendarProps, Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselLabels, CarouselProps, Center, CenterProps, ChatBubble, ChatBubbleProps, ChatBubbleSide, Checkbox, CheckboxCard, CheckboxCardProps, CheckboxProps, Code, type CodeLang, CodeProps, CodeSnippet, CodeSnippetProps, Collapsible, CollapsibleProps, ColorPicker, ColorPickerLabels, ColorPickerProps, Column, Columns, ColumnsProps, Combobox, ComboboxLabels, ComboboxOption, ComboboxProps, CommandAction, CommandGroup, CommandItem, CommandMenu, CommandMenuProps, CommandPage, CommandScope, CommandStatus, Comparison, ComparisonProps, ContainedList, ContainedListItem, ContainedListItemProps, ContainedListProps, ContextMenu, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, CopyButton, CopyButtonProps, DataList, DataListItem, DataListProps, DataTable, DataTableLabels, DataTableProps, DatePicker, DatePickerLabels, DatePickerProps, DateRange, DateRangePicker, DateRangePickerLabels, DateRangePickerProps, DateRangePreset, DismissableLayer, type DismissableLayerProps, Dock, DockItem, DockProps, Drawer, DrawerProps, Dropdown, DropdownItem, DropdownProps, Editable, EditableProps, EmptyState, EmptyStateProps, ErrorBoundary, Fab, FabAction, FabProps, Field, FieldProps, FileUploader, FileUploaderLabels, FileUploaderProps, Filter, FilterOption, FilterProps, FilterVariant, Flex, FlexProps, FocusScope, Form, FormConfig, FormProps, FormStore, FuzzyMatch, Grid, GridAlign, GridItem, GridItemProps, GridProps, Header, HeaderLabels, HeaderLink, HeaderPanel, HeaderPanelLabels, HeaderPanelProps, HeaderProps, Heading, HeadingLevel, HeadingProps, HeadingSize, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, IconButton, IconButtonProps, Image, ImageProps, Indicator, IndicatorPlacement, IndicatorProps, InlineLoading, InlineLoadingProps, InlineLoadingStatus, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, InputProps, Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemMedia, ItemMediaProps, ItemProps, ItemTitle, ItemTitleProps, Join, JoinOrientation, JoinProps, Kbd, KbdProps, Label, LabelProps, Link, type LinkComponent, type LinkComponentProps, LinkProps, List, ListItem, ListItemProps, ListProps, LogLevel, LogLine, LogViewer, LogViewerLabels, LogViewerProps, type Machine, type MachineConfig, Menu, MenuButton, MenuButtonItem, MenuButtonProps, MenuItem, MenuItemProps, MenuProps, MenuSeparator, MenuTrigger, MenuTriggerProps, Menubar, MenubarBaseProps, MenubarItem, MenubarMenu, MenubarProps, Modal, ModalProps, MultiSelect, MultiSelectLabels, MultiSelectOption, MultiSelectProps, NativeSelect, NativeSelectOption, NativeSelectProps, NavigationMenu, NavigationMenuItem, NavigationMenuProps, Notification, NotificationProps, NotificationVariant, NumberInput, NumberInputProps, OtpInput, OtpInputProps, OverflowMenu, OverflowMenuItem, OverflowMenuProps, PageHeader, PageHeaderProps, Pagination, PaginationLabels, PaginationProps, PasswordInput, PasswordInputLabels, PasswordInputProps, Popover, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps, Portal, Presence, Progress, ProgressBar, ProgressBarProps, ProgressCircle, ProgressCircleProps, ProgressIndicator, ProgressIndicatorProps, ProgressProps, ProgressSize, ProgressStep, ProgressVariant, Prose, ProseProps, PullToRefresh, PullToRefreshProps, QrCode, QrCodeProps, RadialProgress, RadialProgressProps, RadialProgressSize, RadialProgressVariant, Radio, RadioCard, RadioCardGroup, RadioCardGroupProps, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, RatingGroup, RatingGroupLabels, RatingGroupProps, RelativeTime, RelativeTimeProps, Resizable, ResizableProps, Responsive, ScrollArea, ScrollAreaProps, Search, SearchProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, ShellHeader, ShellHeaderAction, ShellHeaderBrand, ShellHeaderLabels, ShellHeaderNavItem, ShellHeaderNavLink, ShellHeaderNavMenu, ShellHeaderNavMenuItem, ShellHeaderProps, SideNav, SideNavGroup, SideNavItem, SideNavLinkProps, SideNavLinkSubItem, SideNavProps, SideNavSubItem, SideNavTone, Skeleton, SkeletonProps, SkipNavLink, SkipNavLinkProps, SkipNavTarget, SkipNavTargetProps, Slider, SliderProps, Slot, type SlotProps, SortDirection, SortState, Spacer, SpacerProps, Spinner, SpinnerProps, Stack, StackProps, type StandardSchemaV1, Stat, StatProps, Status, StatusProps, Step, StepState, Steps, StepsProps, StructuredList, StructuredListItem, StructuredListProps, SuspenseBoundary, Swap, SwapMode, SwapProps, SwipeAction, SwipeItem, SwipeItemProps, Switcher, SwitcherEntry, SwitcherLink, SwitcherProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsProps, TabsTrigger, TabsTriggerProps, Tag, TagProps, TagsInput, TagsInputProps, Text, TextProps, Textarea, TextareaProps, ThemeProvider, type ThemeProviderProps, Tile, TileProps, TimePicker, TimePickerProps, Timeline, TimelineItem, TimelineProps, ToastOptions, ToastProvider, ToastVariant, Toc, TocItem, TocProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, Toggletip, ToggletipPlacement, ToggletipProps, Tooltip, TooltipProps, TreeNode, TreeView, TreeViewProps, UploaderFile, type UseClipboardOptions, type UseClipboardReturn, type UseControllableSignalOptions, type UseDisclosureOptions, type UseDisclosureReturn, type UsePopoverOptions, type UsePopoverReturn, type UseTocFromRegionOptions, User, UserProps, VisuallyHidden, VisuallyHiddenProps, applyTheme, batch, cn, composeRefs, computePosition, computed, createForm, createMachine, createScope, createStreamBuffer, dismissAllToasts, effect, fuzzyMatch, fuzzyScore, getLinkComponent, mergeProps, setLinkComponent, setTheme, signal, themePreloadScript, themeSignal, treeViewMessages, useAnchorPosition, useClipboard, useComputed, useControllableSignal, useDisclosure, useEffectPropSignal, useForm, useId, useMachine, useMediaQuery, usePopover, useRovingFocus, useScope, useScrollLock, useSignal, useSignalEffect, useSignals, useStreamBuffer, useTheme, useToast, useTocFromRegion, useTypeahead };
|
|
5053
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, ActionSheet, ActionSheetAction, ActionSheetProps, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, AutoGrid, AutoGridProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, BottomSheet, BottomSheetProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarLabels, CalendarProps, Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselLabels, CarouselProps, Center, CenterProps, ChatBubble, ChatBubbleProps, ChatBubbleSide, Checkbox, CheckboxCard, CheckboxCardProps, CheckboxProps, Code, type CodeLang, CodeProps, CodeSnippet, CodeSnippetProps, Collapsible, CollapsibleProps, ColorPicker, ColorPickerLabels, ColorPickerProps, Column, Columns, ColumnsProps, Combobox, ComboboxLabels, ComboboxOption, ComboboxProps, CommandAction, CommandGroup, CommandItem, CommandMenu, CommandMenuProps, CommandPage, CommandScope, CommandStatus, Comparison, ComparisonProps, ContainedList, ContainedListItem, ContainedListItemProps, ContainedListProps, ContextMenu, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, CopyButton, CopyButtonProps, DataList, DataListItem, DataListProps, DataTable, DataTableLabels, DataTableProps, DatePicker, DatePickerLabels, DatePickerProps, DateRange, DateRangePicker, DateRangePickerLabels, DateRangePickerProps, DateRangePreset, DismissableLayer, type DismissableLayerProps, Dock, DockItem, DockProps, Drawer, DrawerProps, Dropdown, DropdownItem, DropdownProps, Editable, EditableProps, EmptyState, EmptyStateProps, ErrorBoundary, Fab, FabAction, FabProps, Field, FieldProps, FileUploader, FileUploaderLabels, FileUploaderProps, Filter, FilterOption, FilterProps, FilterVariant, Flex, FlexProps, FocusScope, Form, FormConfig, FormProps, FormStore, FuzzyMatch, Grid, GridAlign, GridItem, GridItemProps, GridProps, Header, HeaderLabels, HeaderLink, HeaderPanel, HeaderPanelLabels, HeaderPanelProps, HeaderProps, Heading, HeadingLevel, HeadingProps, HeadingSize, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, IconButton, IconButtonProps, Image, ImageProps, Indicator, IndicatorPlacement, IndicatorProps, InfiniteScroll, InfiniteScrollProps, InlineLoading, InlineLoadingProps, InlineLoadingStatus, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, InputProps, Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemMedia, ItemMediaProps, ItemProps, ItemTitle, ItemTitleProps, Join, JoinOrientation, JoinProps, Kbd, KbdProps, Label, LabelProps, LargeTitleHeader, LargeTitleHeaderProps, Link, type LinkComponent, type LinkComponentProps, LinkProps, List, ListItem, ListItemProps, ListProps, LogLevel, LogLine, LogViewer, LogViewerLabels, LogViewerProps, type Machine, type MachineConfig, Menu, MenuButton, MenuButtonItem, MenuButtonProps, MenuItem, MenuItemProps, MenuProps, MenuSeparator, MenuTrigger, MenuTriggerProps, Menubar, MenubarBaseProps, MenubarItem, MenubarMenu, MenubarProps, Modal, ModalProps, MultiSelect, MultiSelectLabels, MultiSelectOption, MultiSelectProps, NativeSelect, NativeSelectOption, NativeSelectProps, NavigationMenu, NavigationMenuItem, NavigationMenuProps, Notification, NotificationProps, NotificationVariant, NumberInput, NumberInputProps, OtpInput, OtpInputProps, OverflowMenu, OverflowMenuItem, OverflowMenuProps, PageHeader, PageHeaderProps, Pagination, PaginationLabels, PaginationProps, PasswordInput, PasswordInputLabels, PasswordInputProps, Popover, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps, Portal, Presence, Progress, ProgressBar, ProgressBarProps, ProgressCircle, ProgressCircleProps, ProgressIndicator, ProgressIndicatorProps, ProgressProps, ProgressSize, ProgressStep, ProgressVariant, Prose, ProseProps, PullToRefresh, PullToRefreshProps, QrCode, QrCodeProps, RadialProgress, RadialProgressProps, RadialProgressSize, RadialProgressVariant, Radio, RadioCard, RadioCardGroup, RadioCardGroupProps, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, RatingGroup, RatingGroupLabels, RatingGroupProps, RelativeTime, RelativeTimeProps, ReorderItem, ReorderList, ReorderListProps, Resizable, ResizableProps, Responsive, ScrollArea, ScrollAreaProps, Search, SearchProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, ShellHeader, ShellHeaderAction, ShellHeaderBrand, ShellHeaderLabels, ShellHeaderNavItem, ShellHeaderNavLink, ShellHeaderNavMenu, ShellHeaderNavMenuItem, ShellHeaderProps, SideNav, SideNavGroup, SideNavItem, SideNavLinkProps, SideNavLinkSubItem, SideNavProps, SideNavSubItem, SideNavTone, Skeleton, SkeletonProps, SkipNavLink, SkipNavLinkProps, SkipNavTarget, SkipNavTargetProps, Slider, SliderProps, Slot, type SlotProps, SortDirection, SortState, Spacer, SpacerProps, Spinner, SpinnerProps, Stack, StackProps, type StandardSchemaV1, Stat, StatProps, Status, StatusProps, Step, StepState, Steps, StepsProps, StructuredList, StructuredListItem, StructuredListProps, SuspenseBoundary, Swap, SwapMode, SwapProps, SwipeAction, SwipeItem, SwipeItemProps, Switcher, SwitcherEntry, SwitcherLink, SwitcherProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsProps, TabsTrigger, TabsTriggerProps, Tag, TagProps, TagsInput, TagsInputProps, Text, TextProps, Textarea, TextareaProps, ThemeProvider, type ThemeProviderProps, Tile, TileProps, TimePicker, TimePickerProps, Timeline, TimelineItem, TimelineProps, ToastOptions, ToastProvider, ToastVariant, Toc, TocItem, TocProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, Toggletip, ToggletipPlacement, ToggletipProps, Tooltip, TooltipProps, TreeNode, TreeView, TreeViewProps, UploaderFile, type UseClipboardOptions, type UseClipboardReturn, type UseControllableSignalOptions, type UseDisclosureOptions, type UseDisclosureReturn, type UsePopoverOptions, type UsePopoverReturn, type UseTocFromRegionOptions, User, UserProps, VirtualList, VirtualListProps, VisuallyHidden, VisuallyHiddenProps, WheelPicker, WheelPickerOption, WheelPickerProps, applyTheme, batch, cn, composeRefs, computePosition, computed, createForm, createMachine, createScope, createStreamBuffer, dismissAllToasts, effect, fuzzyMatch, fuzzyScore, getLinkComponent, mergeProps, setLinkComponent, setTheme, signal, themePreloadScript, themeSignal, treeViewMessages, useAnchorPosition, useClipboard, useComputed, useControllableSignal, useDisclosure, useEffectPropSignal, useForm, useId, useMachine, useMediaQuery, usePopover, useRovingFocus, useScope, useScrollLock, useSignal, useSignalEffect, useSignals, useStreamBuffer, useTheme, useToast, useTocFromRegion, useTypeahead };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._root_50go8_2{padding-block:var(--cascivo-space-4);justify-content:center;align-items:center;display:flex}._status_50go8_9{align-items:center;gap:var(--cascivo-space-2);color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-ui);display:inline-flex}._button_50go8_17{padding-inline:var(--cascivo-space-4);padding-block:var(--cascivo-space-2);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-md);color:var(--cascivo-color-foreground);font:inherit;font-size:var(--cascivo-text-ui);cursor:pointer;background:0 0;justify-content:center;align-items:center;display:inline-flex}._button_50go8_17:hover{background:var(--cascivo-color-surface-2)}._button_50go8_17:focus-visible{outline:var(--cascivo-ring-width) solid var(--cascivo-ring-color);outline-offset:2px}@media (pointer:coarse){._button_50go8_17{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Spinner as e } from "../spinner/spinner.js";
|
|
4
|
+
import t from "./infinite-scroll.module.js";
|
|
5
|
+
import { useRef as n } from "react";
|
|
6
|
+
import { cn as r, useSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
|
|
7
|
+
import { builtin as s, t as c } from "@cascivo/i18n";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
//#region ../components/src/infinite-scroll/infinite-scroll.tsx
|
|
10
|
+
function d({ onLoadMore: d, disabled: f = !1, rootMargin: p = "200px", labels: m, className: h }) {
|
|
11
|
+
o();
|
|
12
|
+
let g = n(null), _ = i(!1), v = n(d);
|
|
13
|
+
v.current = d;
|
|
14
|
+
let y = n(f);
|
|
15
|
+
y.current = f;
|
|
16
|
+
let b = () => {
|
|
17
|
+
_.value || y.current || (_.value = !0, Promise.resolve(v.current()).then(() => {
|
|
18
|
+
_.value = !1;
|
|
19
|
+
}, () => {
|
|
20
|
+
_.value = !1;
|
|
21
|
+
}));
|
|
22
|
+
}, x = n(b);
|
|
23
|
+
return x.current = b, a(() => {
|
|
24
|
+
let e = g.current;
|
|
25
|
+
if (!e || f || typeof IntersectionObserver > "u") return;
|
|
26
|
+
let t = new IntersectionObserver((e) => {
|
|
27
|
+
e.some((e) => e.isIntersecting) && x.current();
|
|
28
|
+
}, { rootMargin: p });
|
|
29
|
+
return t.observe(e), () => t.disconnect();
|
|
30
|
+
}), f ? null : /* @__PURE__ */ l("div", {
|
|
31
|
+
ref: g,
|
|
32
|
+
className: r(t.root, h),
|
|
33
|
+
children: _.value ? /* @__PURE__ */ u("span", {
|
|
34
|
+
className: t.status,
|
|
35
|
+
role: "status",
|
|
36
|
+
children: [/* @__PURE__ */ l(e, {
|
|
37
|
+
size: "sm",
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
}), m?.loading ?? c(s.infiniteScroll.loading)]
|
|
40
|
+
}) : /* @__PURE__ */ l("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
className: t.button,
|
|
43
|
+
onClick: b,
|
|
44
|
+
children: m?.loadMore ?? c(s.infiniteScroll.loadMore)
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { d as InfiniteScroll };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._root_1fozn_6{background:var(--cascivo-color-surface);block-size:100%;overflow-y:auto}._bar_1fozn_12{z-index:var(--cascivo-z-raised);align-items:center;gap:var(--cascivo-space-2);min-block-size:var(--cascivo-target-min-coarse,2.75rem);padding-inline:var(--cascivo-space-4);background:var(--cascivo-color-surface);border-block-end:1px solid #0000;padding-block-start:env(safe-area-inset-top,0px);display:flex;position:sticky;inset-block-start:0}._slot_1fozn_29{align-items:center;gap:var(--cascivo-space-1);flex:1 0 0;min-inline-size:0;display:flex}._slotEnd_1fozn_37{justify-content:flex-end}._compactTitle_1fozn_41{min-inline-size:0;font-size:var(--cascivo-text-ui);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-foreground);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;display:none;overflow:hidden}._largeTitle_1fozn_56{padding-inline:var(--cascivo-space-4);padding-block:var(--cascivo-space-2) var(--cascivo-space-4);font-size:var(--cascivo-text-heading-lg);font-weight:var(--cascivo-font-bold);line-height:var(--cascivo-leading-tight);color:var(--cascivo-color-foreground);letter-spacing:-.02em;margin:0}@supports (animation-timeline:scroll()){._compactTitle_1fozn_41{opacity:0;animation:linear both _cascivo-large-title-reveal_1fozn_1;animation-timeline:scroll();animation-range:0 var(--_collapse,48px);display:block}._bar_1fozn_12{animation:linear both _cascivo-large-title-hairline_1fozn_1;animation-timeline:scroll();animation-range:0 var(--_collapse,48px)}@media (prefers-reduced-motion:reduce){._compactTitle_1fozn_41,._bar_1fozn_12{animation-timing-function:step-end}}}@keyframes _cascivo-large-title-reveal_1fozn_1{to{opacity:1}}@keyframes _cascivo-large-title-hairline_1fozn_1{to{border-block-end-color:var(--cascivo-border-subtle)}}}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import e from "./large-title-header.module.js";
|
|
2
|
+
import { cn as t } from "@cascivo/core";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region ../components/src/large-title-header/large-title-header.tsx
|
|
5
|
+
function i({ title: i, children: a, leading: o, actions: s, level: c = 1, collapseDistance: l = 48, className: u }) {
|
|
6
|
+
let d = `h${c}`, f = { "--_collapse": `${l}px` };
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: t(e.root, u),
|
|
9
|
+
style: f,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ r("div", {
|
|
12
|
+
className: e.bar,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ n("div", {
|
|
15
|
+
className: e.slot,
|
|
16
|
+
children: o
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ n("span", {
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
className: e.compactTitle,
|
|
21
|
+
children: i
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ n("div", {
|
|
24
|
+
className: t(e.slot, e.slotEnd),
|
|
25
|
+
children: s
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ n(d, {
|
|
30
|
+
className: e.largeTitle,
|
|
31
|
+
children: i
|
|
32
|
+
}),
|
|
33
|
+
a
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { i as LargeTitleHeader };
|