@sableui/react 0.5.0 → 0.6.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/AGENTS.md +2 -2
- package/CHANGELOG.md +135 -0
- package/CONTRIBUTING.md +1 -1
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/bin/sable-lint.mjs +2 -1
- package/bin/sable.mjs +3 -2
- package/dist/{_contract-Cn3lUpih.d.ts → _contract-C2M1SjBf.d.ts} +20 -2
- package/dist/blocks/index.js +19 -51
- package/dist/{chunk-RCLKXF2N.js → chunk-7QSDYBXO.js} +610 -30
- package/dist/{chunk-GU3T7SBA.js → chunk-EDXLM7YL.js} +1 -1
- package/dist/chunk-FKZXAFIY.js +12 -0
- package/dist/{chunk-OQACYT2D.js → chunk-NETUFI34.js} +23 -1
- package/dist/{chunk-ZBZMKOO7.js → chunk-VVW4UCDI.js} +3 -3
- package/dist/foundations/index.js +6 -0
- package/dist/index.d.ts +127 -11
- package/dist/index.js +23 -13
- package/dist/ios/index.d.ts +6 -1
- package/dist/ios/index.js +4 -3
- package/dist/ios/styles.css +9 -0
- package/dist/patterns/index.js +22 -28
- package/dist/presets/index.d.ts +108 -5
- package/dist/presets/index.js +239 -6
- package/dist/styles.css +50 -0
- package/dist/{theme-provider-CGeiusgu.d.ts → theme-provider-kQszHYji.d.ts} +1 -1
- package/dist/themes/atelier/atelier.css +31 -3
- package/dist/themes/atelier/index.d.ts +1 -1
- package/dist/themes/ember/ember.css +38 -7
- package/dist/themes/ember/index.d.ts +1 -1
- package/dist/themes/index.d.ts +2 -2
- package/dist/themes/meridian/index.d.ts +1 -1
- package/dist/themes/meridian/meridian.css +33 -4
- package/dist/themes/poppy/index.d.ts +1 -1
- package/dist/themes/poppy/poppy.css +28 -0
- package/dist/themes/prism/index.d.ts +1 -1
- package/dist/themes/prism/prism.css +26 -0
- package/dist/themes/sable/index.d.ts +1 -1
- package/dist/themes/sable/sable.css +24 -11
- package/dist/themes/verdant/index.d.ts +1 -1
- package/dist/themes/verdant/verdant.css +34 -4
- package/llms/blocks/danger-zone-block.md +1 -1
- package/llms/blocks/event-card-block.md +1 -1
- package/llms/blocks/feedback-form-block.md +1 -1
- package/llms/blocks/invite-team-block.md +1 -1
- package/llms/blocks/media-player-block.md +3 -16
- package/llms/blocks/notification-list-block.md +3 -3
- package/llms/blocks/product-card-block.md +3 -17
- package/llms/blocks/profile-card-block.md +4 -17
- package/llms/blocks/profile-form-block.md +2 -2
- package/llms/blocks/team-members-block.md +1 -1
- package/llms/blocks/testimonial-block.md +1 -1
- package/llms/components/avatar.md +13 -1
- package/llms/components/card.md +1 -1
- package/llms/components/gradient-art.md +80 -0
- package/llms/components/sheet.md +1 -1
- package/llms/foundations/accessibility.md +1 -0
- package/llms/patterns/auth-page.md +5 -19
- package/llms/patterns/brand-landing-page.md +1 -1
- package/llms/patterns/chat-panel.md +1 -1
- package/llms/patterns/dashboard-page.md +4 -4
- package/llms/patterns/feed-page.md +4 -4
- package/llms/patterns/landing-page.md +1 -1
- package/llms/patterns/list-detail-page.md +3 -2
- package/llms/patterns/settings-page.md +3 -3
- package/llms/reference/token-intent.md +9 -1
- package/llms/tasks/auditing-an-app.md +6 -0
- package/llms/tasks/building-an-ios-prototype.md +3 -1
- package/llms/tasks/converting-an-app.md +1 -1
- package/llms/tasks/creating-a-preset.md +24 -0
- package/llms/tasks/reviewing-a-design.md +9 -0
- package/llms/tasks/using-presets.md +6 -1
- package/llms-full.txt +201 -104
- package/llms.txt +3 -2
- package/package.json +9 -7
- package/registry.json +279 -30
- package/scripts/design-presets.mjs +27 -4
- package/scripts/grade.mjs +2 -1
- package/scripts/label-contrast.mjs +138 -0
- package/scripts/lint-rules.mjs +23 -2
- package/skills/sable/SKILL.md +3 -1
- package/targets/ios.json +18 -2
- package/third-party/paper-shaders-LICENSE.txt +201 -0
- package/third-party/paper-shaders-NOTICE.txt +5 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FIELD_SHELL, FIELD_INVALID, useMotion, useTypeTier, useScrollActivity, setRef, useEdgeFade, useAnchoredDensity, Dialog, DialogContent, DialogTitle, DialogDescription, useIsomorphicLayoutEffect } from './chunk-
|
|
1
|
+
import { FIELD_SHELL, FIELD_INVALID, useMotion, useTypeTier, useScrollActivity, setRef, useEdgeFade, useAnchoredDensity, Dialog, DialogContent, DialogTitle, DialogDescription, useIsomorphicLayoutEffect } from './chunk-7QSDYBXO.js';
|
|
2
2
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
3
3
|
import { Icon } from './chunk-QJ6FWTUG.js';
|
|
4
4
|
import * as OtpParts from '@base-ui/react/otp-field';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/lib/presentation.tsx
|
|
4
|
+
var PresentationContext = createContext("page");
|
|
5
|
+
var PresentationProvider = PresentationContext.Provider;
|
|
6
|
+
function usePresentation() {
|
|
7
|
+
return useContext(PresentationContext);
|
|
8
|
+
}
|
|
9
|
+
var CardDepthContext = createContext(0);
|
|
10
|
+
var StackedActionsContext = createContext(false);
|
|
11
|
+
|
|
12
|
+
export { CardDepthContext, PresentationProvider, StackedActionsContext, usePresentation };
|
|
@@ -54,6 +54,16 @@ var SEMANTIC_TOKENS = [
|
|
|
54
54
|
"tone-info-foreground",
|
|
55
55
|
"tone-warning-foreground",
|
|
56
56
|
"highlight-foreground",
|
|
57
|
+
// Status text — a status colour drawn ON a surface: text, icons, borders,
|
|
58
|
+
// rings. Separate from the fill because the two want different lightness in
|
|
59
|
+
// dark mode: a solid fill sits low enough for a white label, while text and
|
|
60
|
+
// marks must stay light enough to read on a dark card. `text-destructive`,
|
|
61
|
+
// `border-destructive` and `ring-destructive` read these through Tailwind's
|
|
62
|
+
// per-property colour namespaces (styles.css); only `bg-*` reads the fill.
|
|
63
|
+
"destructive-text",
|
|
64
|
+
"success-text",
|
|
65
|
+
"tone-warning-text",
|
|
66
|
+
"tone-info-text",
|
|
57
67
|
// Overlay — a fixed, theme-independent dark surface for things that sit OVER
|
|
58
68
|
// content rather than on a theme surface: modal/sheet scrims, media letterbox,
|
|
59
69
|
// pills on imagery. `overlay-foreground` is its always-legible light ink.
|
|
@@ -278,6 +288,18 @@ var WORKSPACE_SURFACE_TOKENS = [
|
|
|
278
288
|
"hairline",
|
|
279
289
|
"hairline-strong"
|
|
280
290
|
];
|
|
291
|
+
var ART_TOKENS = [
|
|
292
|
+
"art-1",
|
|
293
|
+
"art-2",
|
|
294
|
+
"art-3",
|
|
295
|
+
"art-4",
|
|
296
|
+
"art-5",
|
|
297
|
+
"art-6",
|
|
298
|
+
"art-ground",
|
|
299
|
+
"art-warp",
|
|
300
|
+
"art-softness",
|
|
301
|
+
"art-grain"
|
|
302
|
+
];
|
|
281
303
|
var DERIVED_EDGE_TOKENS = ["border-floating"];
|
|
282
304
|
var TYPE_UI_TOKENS = [
|
|
283
305
|
"type-ui-md-size",
|
|
@@ -290,4 +312,4 @@ var TYPE_UI_TOKENS = [
|
|
|
290
312
|
"type-ui-micro-weight"
|
|
291
313
|
];
|
|
292
314
|
|
|
293
|
-
export { DENSITY_TOKENS, DERIVED_EDGE_TOKENS, LAYERING_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVERLINE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_SCALE_TOKENS, TYPE_UI_TOKENS, WORKSPACE_SURFACE_TOKENS };
|
|
315
|
+
export { ART_TOKENS, DENSITY_TOKENS, DERIVED_EDGE_TOKENS, LAYERING_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVERLINE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_SCALE_TOKENS, TYPE_UI_TOKENS, WORKSPACE_SURFACE_TOKENS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMotion, useIsomorphicLayoutEffect, mergeRefs, trimLabel, useTypeTier, buttonVariants, Input, Table, TableCaption, TableHeader, TableRow, TableHead, Button, TableBody, TableCell, Card, SimpleTooltip, useDensity, FIELD_SHELL, FIELD_INVALID, MOBILE_FIELD_TIER, Tooltip, TooltipTrigger, TooltipContent, useScrollActivity, setRef, Textarea, Menu, MenuTrigger, MenuContent, MenuSubmenu, MenuSubmenuTrigger, Separator } from './chunk-
|
|
1
|
+
import { useMotion, useIsomorphicLayoutEffect, mergeRefs, trimLabel, useTypeTier, buttonVariants, Input, Table, TableCaption, TableHeader, TableRow, TableHead, Button, TableBody, TableCell, Card, SimpleTooltip, useDensity, FIELD_SHELL, FIELD_INVALID, MOBILE_FIELD_TIER, Tooltip, TooltipTrigger, TooltipContent, useScrollActivity, setRef, Textarea, Menu, MenuTrigger, MenuContent, MenuSubmenu, MenuSubmenuTrigger, Separator } from './chunk-7QSDYBXO.js';
|
|
2
2
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
3
3
|
import { Icon } from './chunk-QJ6FWTUG.js';
|
|
4
4
|
import { createContext, useRef, useState, useEffect, isValidElement, cloneElement, useContext, useMemo, useCallback, useImperativeHandle } from 'react';
|
|
@@ -286,8 +286,8 @@ function TabsTrigger({ className, children, ...props }) {
|
|
|
286
286
|
variant === "underline" ? (
|
|
287
287
|
// On the control ladder like the pill variant (it was py-2 plus
|
|
288
288
|
// the label's line, ~36px — no rung).
|
|
289
|
-
"-mb-px inline-flex h-(--control-md) items-center border-b-2 border-transparent px-3 data-[active]:border-foreground"
|
|
290
|
-
) : "inline-flex h-(--control-sm) items-center rounded-[var(--button-radius,9999px)] px-3 data-[active]:bg-muted",
|
|
289
|
+
"-mb-px inline-flex h-(--control-md) items-center gap-(--control-gap) border-b-2 border-transparent px-3 data-[active]:border-foreground"
|
|
290
|
+
) : "inline-flex h-(--control-sm) items-center gap-(--control-gap) rounded-[var(--button-radius,9999px)] px-3 data-[active]:bg-muted",
|
|
291
291
|
className
|
|
292
292
|
),
|
|
293
293
|
...props,
|
|
@@ -63,6 +63,12 @@ var accessibility = {
|
|
|
63
63
|
why: "A faded ring loses the contrast the theme tested.",
|
|
64
64
|
enforcedBy: "sable-lint: faded-focus-ring"
|
|
65
65
|
},
|
|
66
|
+
{
|
|
67
|
+
never: "A brand or status fill retuned under its old label \u2014 dark ink on a bright red that passes 4.5:1 at APCA Lc 42.",
|
|
68
|
+
instead: "A label that clears 4.5:1 and APCA Lc 60 in both modes. Move the fill's lightness, not its hue, keeping the ink its colour takes. A status colour on a surface is its own token (`--destructive-text`), so the fill can move freely.",
|
|
69
|
+
why: "The ratio alone passes labels that read muddy. A deliberate brand pair is allowed with a recorded reason (lint disable or preset exceptions).",
|
|
70
|
+
enforcedBy: "sable-lint: label-contrast"
|
|
71
|
+
},
|
|
66
72
|
{
|
|
67
73
|
never: 'Blocking paste, or type="number" for codes and card numbers.',
|
|
68
74
|
instead: 'type="text" inputMode="numeric" with the right autocomplete.',
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import { C as ComponentMeta } from './meta-CcE_SeFu.js';
|
|
3
3
|
export { A as AnatomyMeta, a as BestPracticeMeta, E as ExampleMeta, M as MotionMeta, b as MotionSlot, c as PropMeta, R as RelatedMeta, S as SubcomponentMeta, U as UsageMeta } from './meta-CcE_SeFu.js';
|
|
4
|
-
import { T as ThemeManifest, a as ThemeMode$1 } from './_contract-
|
|
5
|
-
export { D as DENSITY_TOKENS, b as DensityToken, M as MOTION_TOKENS, c as MotionToken, R as RADIUS_TOKENS, d as RadiusToken, S as SEMANTIC_TOKENS, e as SemanticToken, f as TYPE_OVERLINE_TOKENS, g as TYPE_REFINEMENT_TOKENS, h as TYPE_SCALE_TOKENS, i as TYPE_UI_TOKENS, j as TypeOverlineToken, k as TypeRefinementToken, l as TypeScaleToken, m as TypeUiToken, W as WORKSPACE_SURFACE_TOKENS, n as WorkspaceSurfaceToken } from './_contract-
|
|
6
|
-
import { T as ThemeId } from './theme-provider-
|
|
7
|
-
export { D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, h as applySableColorMode, i as applySableTheme, k as defaultThemeId, m as getThemeManifest, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from './theme-provider-
|
|
4
|
+
import { T as ThemeManifest, a as ThemeMode$1 } from './_contract-C2M1SjBf.js';
|
|
5
|
+
export { A as ART_TOKENS, D as DENSITY_TOKENS, b as DensityToken, M as MOTION_TOKENS, c as MotionToken, R as RADIUS_TOKENS, d as RadiusToken, S as SEMANTIC_TOKENS, e as SemanticToken, f as TYPE_OVERLINE_TOKENS, g as TYPE_REFINEMENT_TOKENS, h as TYPE_SCALE_TOKENS, i as TYPE_UI_TOKENS, j as TypeOverlineToken, k as TypeRefinementToken, l as TypeScaleToken, m as TypeUiToken, W as WORKSPACE_SURFACE_TOKENS, n as WorkspaceSurfaceToken } from './_contract-C2M1SjBf.js';
|
|
6
|
+
import { T as ThemeId } from './theme-provider-kQszHYji.js';
|
|
7
|
+
export { D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, h as applySableColorMode, i as applySableTheme, k as defaultThemeId, m as getThemeManifest, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from './theme-provider-kQszHYji.js';
|
|
8
8
|
export { AspectBox, AspectBoxProps, Bleed, BleedProps, Breakpoint, Center, CenterProps, Col, ColProps, Columns, ColumnsProps, Grid, GridOverlay, GridOverlayProps, GridProps, Page, PageProps, Region, RegionMax, RegionProps, Responsive, Row, RowProps, SafeArea, SafeAreaProps, Spacer, SpacerProps, SplitPane, SplitPaneProps, Stack, StackProps } from './layout/index.js';
|
|
9
9
|
export { Icon, IconContextValue, IconProps, IconProvider, IconProviderProps, composeIconSets, useIconSet } from './icon/index.js';
|
|
10
10
|
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from './icon-sets/reicon.js';
|
|
@@ -417,7 +417,7 @@ interface CardProps extends ComponentPropsWithRef<"div"> {
|
|
|
417
417
|
*/
|
|
418
418
|
render?: useRender.RenderProp;
|
|
419
419
|
}
|
|
420
|
-
declare function Card({ variant, density, className, style, render, ref, ...props }: CardProps): react.
|
|
420
|
+
declare function Card({ variant, density, className, style, render, ref, ...props }: CardProps): react.JSX.Element;
|
|
421
421
|
declare namespace Card {
|
|
422
422
|
var displayName: string;
|
|
423
423
|
}
|
|
@@ -479,6 +479,16 @@ declare function CardContent({ className, flush, ...props }: CardContentProps):
|
|
|
479
479
|
* </Card>
|
|
480
480
|
*/
|
|
481
481
|
declare function CardList({ className, ...props }: ComponentPropsWithRef<"div">): react.JSX.Element;
|
|
482
|
+
interface CardFooterProps extends ComponentPropsWithRef<"div"> {
|
|
483
|
+
/**
|
|
484
|
+
* The footer is the card's action row — its buttons and nothing else. On a
|
|
485
|
+
* page that changes nothing. In a sheet (`IosSheet`, a bottom `SheetContent`)
|
|
486
|
+
* the sheet owns the actions: the row becomes a full-width stack pinned to
|
|
487
|
+
* the bottom, the primary on top, every button at the cta height. Leave it
|
|
488
|
+
* off a footer that holds a caption, a price or a lone list affordance.
|
|
489
|
+
*/
|
|
490
|
+
actions?: boolean;
|
|
491
|
+
}
|
|
482
492
|
/**
|
|
483
493
|
* The card's closing band. Its top padding is zero because the part above
|
|
484
494
|
* normally owns the seam (CardContent's own bottom padding) — so the two cases
|
|
@@ -491,7 +501,7 @@ declare function CardList({ className, ...props }: ComponentPropsWithRef<"div">)
|
|
|
491
501
|
* mirror of the hairline CardList draws under a CardHeader. Without it the
|
|
492
502
|
* footer read as one more row of the table or list above it.
|
|
493
503
|
*/
|
|
494
|
-
declare function CardFooter({ className, ...props }:
|
|
504
|
+
declare function CardFooter({ actions, className, children, ...props }: CardFooterProps): react.JSX.Element;
|
|
495
505
|
|
|
496
506
|
declare const cardMeta: ComponentMeta;
|
|
497
507
|
|
|
@@ -1098,6 +1108,8 @@ type TriggerProps$3 = Omit<ComponentProps<typeof Tabs$1.Tab>, "className"> & {
|
|
|
1098
1108
|
* to the cap height so it centres optically in the short pill. A pill tab is a
|
|
1099
1109
|
* button-shaped control, so it takes the theme's button shape (`--button-radius`,
|
|
1100
1110
|
* as Button does): a pill in Sable, rounded in Poppy, square in Meridian.
|
|
1111
|
+
* A badge or icon beside the label is spaced like Button's (`--control-gap`):
|
|
1112
|
+
* the label is its own trimmed span, so a typed space after it collapses.
|
|
1101
1113
|
*/
|
|
1102
1114
|
declare function TabsTrigger({ className, children, ...props }: TriggerProps$3): react.JSX.Element;
|
|
1103
1115
|
type PanelProps$3 = Omit<ComponentProps<typeof Tabs$1.Panel>, "className"> & {
|
|
@@ -1254,12 +1266,25 @@ interface AvatarProps extends RootProps$4 {
|
|
|
1254
1266
|
* so it reads as a cut-out, not a sticker.
|
|
1255
1267
|
*/
|
|
1256
1268
|
status?: ReactNode;
|
|
1269
|
+
/**
|
|
1270
|
+
* What shows when there is no image. `neutral` (default): initials on the
|
|
1271
|
+
* muted surface. `art`: initials over GradientArt seeded by the person, so
|
|
1272
|
+
* everyone without a photo still gets their own, stable colour from the theme.
|
|
1273
|
+
*/
|
|
1274
|
+
variant?: "neutral" | "art";
|
|
1275
|
+
/**
|
|
1276
|
+
* The art's seed. Defaults to the fallback text, then `alt`: the initials are
|
|
1277
|
+
* on every appearance of a person, where `alt` is often empty on a decorative
|
|
1278
|
+
* repeat, and a person must not change colour between two places on a page.
|
|
1279
|
+
* Pass a user id to tell apart two people who share initials.
|
|
1280
|
+
*/
|
|
1281
|
+
seed?: string | number;
|
|
1257
1282
|
}
|
|
1258
1283
|
/**
|
|
1259
1284
|
* The ergonomic, all-in-one avatar. Composes Root + Image + Fallback from simple
|
|
1260
1285
|
* props. Pass `src`/`alt` for the picture and `fallback` for the resting state.
|
|
1261
1286
|
*/
|
|
1262
|
-
declare function Avatar({ src, alt, fallback, fallbackDelay, size, status, className, ...props }: AvatarProps): react.JSX.Element;
|
|
1287
|
+
declare function Avatar({ src, alt, fallback, fallbackDelay, size, status, variant, seed, className, ...props }: AvatarProps): react.JSX.Element;
|
|
1263
1288
|
declare namespace Avatar {
|
|
1264
1289
|
var displayName: string;
|
|
1265
1290
|
}
|
|
@@ -2792,8 +2817,12 @@ type DescriptionProps$1 = Omit<ComponentProps<typeof Drawer.Description>, "class
|
|
|
2792
2817
|
declare function SheetDescription({ className, ...props }: DescriptionProps$1): react.JSX.Element;
|
|
2793
2818
|
/** Stacked title + description block, pinned to the top of the sheet. */
|
|
2794
2819
|
declare function SheetHeader({ className, ...props }: ComponentProps<"div">): react.JSX.Element;
|
|
2795
|
-
/**
|
|
2796
|
-
|
|
2820
|
+
/**
|
|
2821
|
+
* Action row, pushed to the bottom edge of the sheet via mt-auto. In a bottom
|
|
2822
|
+
* sheet it stacks: full width, the primary (last, on a page) on top, capped at
|
|
2823
|
+
* a phone's width so a wide screen does not stretch two buttons across it.
|
|
2824
|
+
*/
|
|
2825
|
+
declare function SheetFooter({ className, children, ...props }: ComponentProps<"div">): react.JSX.Element;
|
|
2797
2826
|
|
|
2798
2827
|
declare const sheetMeta: ComponentMeta;
|
|
2799
2828
|
|
|
@@ -6697,6 +6726,66 @@ declare namespace Carousel {
|
|
|
6697
6726
|
|
|
6698
6727
|
declare const carouselMeta: ComponentMeta;
|
|
6699
6728
|
|
|
6729
|
+
/**
|
|
6730
|
+
* One WebGL2 context for every GradientArt on the page.
|
|
6731
|
+
*
|
|
6732
|
+
* Paper's own ShaderMount creates a context per mount. Browsers cap live WebGL
|
|
6733
|
+
* contexts at roughly sixteen and drop the oldest past that, so a list of
|
|
6734
|
+
* avatars, or the Blocks page, would lose art as it scrolled. Here one hidden
|
|
6735
|
+
* canvas renders each piece once, at its size, and the frame is copied into that
|
|
6736
|
+
* instance's own 2D canvas. The art is static, so nothing runs between paints:
|
|
6737
|
+
* a paint happens on mount, on resize and when the theme changes.
|
|
6738
|
+
*
|
|
6739
|
+
* The fragment shaders are Paper's (Apache-2.0, see THIRD_PARTY_NOTICES.md);
|
|
6740
|
+
* the package does not export its vertex shader, so VERTEX below is adapted
|
|
6741
|
+
* from Paper Shaders 0.0.81 `vertex-shader.js`, cut down to the outputs the two
|
|
6742
|
+
* fragment shaders read.
|
|
6743
|
+
*/
|
|
6744
|
+
type ArtVariant = "mesh" | "grain";
|
|
6745
|
+
|
|
6746
|
+
/** The decorative tones art can be painted from — the palette's `--tone-*` family. */
|
|
6747
|
+
type ArtTone = "info" | "standard" | "collectible" | "edition" | "warning";
|
|
6748
|
+
interface GradientArtProps extends ComponentProps<"div"> {
|
|
6749
|
+
/**
|
|
6750
|
+
* `mesh` (default) — soft spots of colour pulled together by gentle waves
|
|
6751
|
+
* (Paper's static mesh gradient). `grain` — glowing light over deep corners
|
|
6752
|
+
* with a printed, grainy texture (Paper's grain gradient).
|
|
6753
|
+
*/
|
|
6754
|
+
variant?: ArtVariant;
|
|
6755
|
+
/**
|
|
6756
|
+
* Paint these `--tone-*` colours instead of the theme's art palette. Leave it
|
|
6757
|
+
* unset to follow the preset's own art direction (the --art-* tokens).
|
|
6758
|
+
*/
|
|
6759
|
+
tones?: readonly ArtTone[];
|
|
6760
|
+
/**
|
|
6761
|
+
* Fixes the composition: the same seed paints the same art in every theme.
|
|
6762
|
+
* Pass a stable id — a name for an avatar, a title for a cover — so each
|
|
6763
|
+
* item keeps its own look across renders and reloads.
|
|
6764
|
+
*/
|
|
6765
|
+
seed?: string | number;
|
|
6766
|
+
}
|
|
6767
|
+
/**
|
|
6768
|
+
* GradientArt — placeholder artwork painted from the theme's art direction:
|
|
6769
|
+
* the --art-* tokens (colours, ground, warp, softness, grain), which each
|
|
6770
|
+
* preset sets for itself and which default to the decorative tones over the
|
|
6771
|
+
* brand. It follows every preset, mode and live edit, the way a CSS gradient
|
|
6772
|
+
* would, with a shader's depth.
|
|
6773
|
+
*
|
|
6774
|
+
* It renders a CSS gradient first (prerendered HTML, no WebGL2, the first
|
|
6775
|
+
* frame) and fades the shader in over it once painted. The shader is static:
|
|
6776
|
+
* it paints on mount, on resize and when the theme changes, through one WebGL
|
|
6777
|
+
* context shared by every instance, so a page of avatars costs one context.
|
|
6778
|
+
* Off-screen instances wait until they are near the viewport.
|
|
6779
|
+
*
|
|
6780
|
+
* Children render above the art: initials, a play glyph, a caption.
|
|
6781
|
+
*/
|
|
6782
|
+
declare function GradientArt({ variant, tones, seed, className, style, children, ...props }: GradientArtProps): react.JSX.Element;
|
|
6783
|
+
declare namespace GradientArt {
|
|
6784
|
+
var displayName: string;
|
|
6785
|
+
}
|
|
6786
|
+
|
|
6787
|
+
declare const gradientArtMeta: ComponentMeta;
|
|
6788
|
+
|
|
6700
6789
|
/**
|
|
6701
6790
|
* Conversation rhythm. The class also publishes the gap as `--message-gap` so
|
|
6702
6791
|
* `<Message grouped>` can close it without knowing which step is in play. The
|
|
@@ -7466,6 +7555,33 @@ declare function useTypeTier(): {
|
|
|
7466
7555
|
heading: string;
|
|
7467
7556
|
};
|
|
7468
7557
|
|
|
7558
|
+
/**
|
|
7559
|
+
* Presentation: what a piece of content is shown IN — a page, or a sheet that
|
|
7560
|
+
* slid up over one. The content is the same either way; who owns its actions
|
|
7561
|
+
* is not.
|
|
7562
|
+
*
|
|
7563
|
+
* On a page, a card's actions belong to the card: a short row at its trailing
|
|
7564
|
+
* edge, sized by the call site. In a sheet, the sheet is the surface, and its
|
|
7565
|
+
* actions belong to the sheet: full width, the primary on top, pinned to the
|
|
7566
|
+
* bottom where a thumb reaches them. A right-aligned pair of small buttons
|
|
7567
|
+
* floating mid-sheet reads as a web card dropped into a phone, which is what
|
|
7568
|
+
* the iOS canvas's Feedback sheet looked like.
|
|
7569
|
+
*
|
|
7570
|
+
* A `platform` or `variant` prop on every block would have pushed that
|
|
7571
|
+
* knowledge into each one, and been forgotten at the next. The container
|
|
7572
|
+
* already knows what it is, so it says so once: `IosSheet` and a bottom
|
|
7573
|
+
* `SheetContent` provide "sheet", and an action row (`CardFooter actions`,
|
|
7574
|
+
* `SheetFooter`) lays itself out from it. Nothing else reads it.
|
|
7575
|
+
*
|
|
7576
|
+
* React context crosses portals, so every surface that presents its own
|
|
7577
|
+
* content — a Dialog, a Popover, a side Sheet — declares "page" again. A
|
|
7578
|
+
* dialog opened from a bottom sheet is not a sheet, and its footer is a row.
|
|
7579
|
+
*/
|
|
7580
|
+
type Presentation = "page" | "sheet";
|
|
7581
|
+
/** Declares what its subtree is presented in. Sheets provide it; a page needs nothing. */
|
|
7582
|
+
declare const PresentationProvider: react.Provider<Presentation>;
|
|
7583
|
+
declare function usePresentation(): Presentation;
|
|
7584
|
+
|
|
7469
7585
|
/**
|
|
7470
7586
|
* Mark a scroll region as actively scrolling.
|
|
7471
7587
|
*
|
|
@@ -7524,6 +7640,6 @@ interface UseCopyResult {
|
|
|
7524
7640
|
*/
|
|
7525
7641
|
declare function useCopy(text: string, { timeout }?: UseCopyOptions): UseCopyResult;
|
|
7526
7642
|
|
|
7527
|
-
declare const SABLE_UI_VERSION: "0.
|
|
7643
|
+
declare const SABLE_UI_VERSION: "0.6.0";
|
|
7528
7644
|
|
|
7529
|
-
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, AppHeader, type AppHeaderProps, AppShell, type AppShellProps, AreaChart, type AreaChartProps, Attachment, type AttachmentProps, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, type AvatarGroupCountProps, type AvatarGroupProps, AvatarImage, type AvatarProps, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, type BadgeAppearance, type BadgeProps, type BadgeTone, Banner, type BannerProps, BarChart, type BarChartProps, BottomNav, BottomNavItem, type BottomNavItemProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Browser, type BrowserProps, Bubble, type BubbleProps, BubbleReaction, type BubbleReactionProps, BubbleReactions, type BubbleReactionsProps, Button, type ButtonProps, CHART_SERIES_COUNT, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, type CalendarProps, Card, CardAction, CardContent, type CardContentProps, CardDescription, CardFooter, CardHeader, CardList, type CardProps, CardTitle, type CardTitleProps, Carousel, type CarouselProps, type CarouselSlidesToShow, type ChartCategories, type ChartCenterLabel, type ChartCurve, type ChartDatum, type ChartSeries, type ChartTone, type ChartTooltipIndicator, type ChartTooltipOptions, type ChartValueFormatter, ChatComposer, type ChatComposerProps, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxCardTone, CheckboxGroup, type CheckboxGroupProps, Code, CodeBlock, type CodeBlockProps, CodeHighlightProvider, type CodeHighlighter, type CodeProps, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger, ColorField, type ColorFieldProps, Combobox, ComboboxChips, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, type ComboboxItemGroup, ComboboxItemIndicator, ComboboxList, ComboboxPortal, type ComboboxProps, ComboboxValue, ComboboxVirtualList, type ComboboxVirtualListProps, type CommandFilter, type CommandItem, CommandMenu, CommandMenuGroup, type CommandMenuGroupProps, CommandMenuItem, type CommandMenuItemProps, CommandMenuPanel, type CommandMenuPanelProps, type CommandMenuProps, CommandMenuTrigger, type CommandMenuTriggerProps, type ComponentGroup, type ComponentGuidance, ComponentMeta, type ComponentRegister, ContextCard, ContextCardArrow, ContextCardContent, ContextCardPortal, ContextCardTrigger, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTile, type DateTileProps, Density, DensityProvider, Density as DensityValue, DestructiveActionModal, type DestructiveActionModalProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogSize, DialogTitle, DialogTrigger, EmptyState, type EmptyStateProps, Entity, type EntityProps, Feedback, type FeedbackData, type FeedbackProps, type FeedbackRating, Field, type FieldProps, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend, FileDropzone, type FileDropzoneProps, type FileRejection, type FileRejectionCode, Form, type FormProps, GlidingHighlight, type GlidingHighlightProps, type Hsv, InlineStatus, type InlineStatusProps, type StatusTone as InlineTone, Input, type InputProps$1 as InputProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps$2 as LabelProps, LineChart, type LineChartProps, Marker, type MarkerProps, Marquee, type MarqueeProps, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, type MessageProps, MessageScroller, type MessageScrollerHandle, type MessageScrollerProps, Meter, MeterIndicator, MeterLabel, type MeterSize, type MeterTone, MeterTrack, MeterValue, MiddleTruncate, type MiddleTruncateProps, type MotionPolicy, MotionProvider, type MotionProviderProps, Note, type NoteAction, type NoteProps, NotificationBadge, type NotificationBadgeProps, NumberField, type NumberFieldProps, type OrbMode, type OrbSize, OtpField, type OtpFieldProps, OverflowMenu, type OverflowMenuProps, PageHeader, type PageHeaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Panel, PanelGroup, PanelResizer, type PanelResizerProps, PanelSection, type PanelWidthBounds, Phone, type PhoneProps, PieChart, type PieChartProps, Pill, type PillProps, Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Presence, type PresenceProps, Progress, ProgressIndicator, ProgressLabel, type ProgressSize, ProgressTrack, ProgressValue, PropertyPair, PropertyRow, RadarChart, type RadarChartProps, RadialChart, type RadialChartProps, Radio, RadioCard, type RadioCardProps, type RadioCardTone, RadioGroup, RelativeTime, type RelativeTimeProps, Reveal, type RevealProps, type Rgb, SABLE_UI_VERSION, SEGMENTED_BAR_TONES, STATUS_TONES, STATUS_TONE_ICON, type ScrollCommandOptions, Scroller, type ScrollerProps, ScrubField, type ScrubFieldProps, SearchInput, type SearchInputProps, SegmentedBar, type SegmentedBarProps, type SegmentedBarSegment, type SegmentedBarTone, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps$3 as SeparatorProps, SettingsMenu, type SettingsMenuProps, SettingsRow, type SettingsRowProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, SideNav, type SideNavActiveVariant, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, type SideNavSize, Sidebar, SidebarFooter, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarProps, SimpleTooltip, Skeleton, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, StatusBar, StatusBarGroup, StatusBarSeparator, StatusDot, type StatusDotProps, type StatusTone, type StepStatus, Stepper, StepperItem, type StepperItemProps, type StepperOrientation, type StepperProps, StreamingText, type StreamingTextProps, Switch, TRANSPARENT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, type TextRevealProps, Textarea, type TextareaProps, ThemeId, ThemeManifest, ThemeMode$1 as ThemeManifestMode, type ThemeMode, ThemeSelector, type ThemeSelectorProps, ThemeSwitcher, type ThemeSwitcherProps, ThinkingOrb, type ThinkingOrbProps, ToastAction, type ToastApi, ToastClose, ToastContent, ToastDescription, type ToastManagerApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, ToastRoot, ToastTitle, type ToastType, ToastViewport, Toggle, ToggleGroup, type ToggleGroupAppearance, Toggle as ToggleGroupItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarInput, type ToolbarInputProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, type UseCopyOptions, type UseCopyResult, type UseInViewOptions, type UsePanelWidthOptions, Video, type VideoProps, ViewTransitionName, type ViewTransitionNameProps, Workspace, WorkspaceBar, WorkspaceCanvas, accordionMeta, appHeaderMeta, appShellMeta, areaChartMeta, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bannerMeta, bannerVariants, barChartMeta, bottomNavMeta, breadcrumbsMeta, browserMeta, bubbleMeta, buttonMeta, buttonVariants, calendarMeta, cardMeta, carouselMeta, chartColor, toneColor as chartToneColor, chatComposerMeta, checkboxCardMeta, checkboxMeta, cn, codeBlockMeta, codeMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, commandMenuMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, dataTableMeta, datePickerMeta, dateTileMeta, destructiveActionModalMeta, dialogMeta, emptyStateMeta, entityMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, formMeta, formatFileSize, formatHex, glidingHighlightMeta, hsvToRgb, hueColor, inlineStatusMeta, inputMeta, isTransparent, kbdMeta, labelMeta, lineChartMeta, markerMeta, marqueeMeta, menuMeta, messageMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, middleTruncateMeta, noteMeta, noteVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, numberFieldMeta, otpFieldMeta, overflowMenuMeta, pageHeaderMeta, pageLoaderMeta, paginationMeta, panelGroupMeta, panelSectionMeta, parseHex, phoneMeta, pieChartMeta, pillMeta, pillVariants, popoverMeta, progressMeta, progressTrackVariants, radarChartMeta, radialChartMeta, radioCardMeta, radioMeta, relativeTimeMeta, rgbToHsv, scrollerMeta, scrubFieldMeta, searchInputMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, selectMeta, separatorMeta, settingsMenuMeta, sheetMeta, sheetVariants, showMoreMeta, sideNavMeta, sidebarMeta, skeletonMeta, sliderMeta, sparklineMeta, spinnerMeta, startViewTransition, statusBarMeta, statusDotMeta, statusDotVariants, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, streamingTextMeta, supportsViewTransitions, switchMeta, tableMeta, tabsMeta, textareaMeta, themeSelectorMeta, themeSwitcherMeta, thinkingOrbMeta, toast, toastMeta, toggleMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, tooltipMeta, treeIndent, treeMeta, useAnchoredDensity, useComboboxFilteredItems, useCommandMenuShortcut, useCopy, useDensity, useInView, useMotion, usePanelWidth, useReducedMotion, useScrollActivity, useSidebar, useToast, useToastManager, useTypeTier, videoMeta, workspaceMeta };
|
|
7645
|
+
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, AppHeader, type AppHeaderProps, AppShell, type AppShellProps, AreaChart, type AreaChartProps, type ArtTone, Attachment, type AttachmentProps, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, type AvatarGroupCountProps, type AvatarGroupProps, AvatarImage, type AvatarProps, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, type BadgeAppearance, type BadgeProps, type BadgeTone, Banner, type BannerProps, BarChart, type BarChartProps, BottomNav, BottomNavItem, type BottomNavItemProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Browser, type BrowserProps, Bubble, type BubbleProps, BubbleReaction, type BubbleReactionProps, BubbleReactions, type BubbleReactionsProps, Button, type ButtonProps, CHART_SERIES_COUNT, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, type CalendarProps, Card, CardAction, CardContent, type CardContentProps, CardDescription, CardFooter, type CardFooterProps, CardHeader, CardList, type CardProps, CardTitle, type CardTitleProps, Carousel, type CarouselProps, type CarouselSlidesToShow, type ChartCategories, type ChartCenterLabel, type ChartCurve, type ChartDatum, type ChartSeries, type ChartTone, type ChartTooltipIndicator, type ChartTooltipOptions, type ChartValueFormatter, ChatComposer, type ChatComposerProps, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxCardTone, CheckboxGroup, type CheckboxGroupProps, Code, CodeBlock, type CodeBlockProps, CodeHighlightProvider, type CodeHighlighter, type CodeProps, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger, ColorField, type ColorFieldProps, Combobox, ComboboxChips, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, type ComboboxItemGroup, ComboboxItemIndicator, ComboboxList, ComboboxPortal, type ComboboxProps, ComboboxValue, ComboboxVirtualList, type ComboboxVirtualListProps, type CommandFilter, type CommandItem, CommandMenu, CommandMenuGroup, type CommandMenuGroupProps, CommandMenuItem, type CommandMenuItemProps, CommandMenuPanel, type CommandMenuPanelProps, type CommandMenuProps, CommandMenuTrigger, type CommandMenuTriggerProps, type ComponentGroup, type ComponentGuidance, ComponentMeta, type ComponentRegister, ContextCard, ContextCardArrow, ContextCardContent, ContextCardPortal, ContextCardTrigger, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTile, type DateTileProps, Density, DensityProvider, Density as DensityValue, DestructiveActionModal, type DestructiveActionModalProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogSize, DialogTitle, DialogTrigger, EmptyState, type EmptyStateProps, Entity, type EntityProps, Feedback, type FeedbackData, type FeedbackProps, type FeedbackRating, Field, type FieldProps, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend, FileDropzone, type FileDropzoneProps, type FileRejection, type FileRejectionCode, Form, type FormProps, GlidingHighlight, type GlidingHighlightProps, GradientArt, type GradientArtProps, type Hsv, InlineStatus, type InlineStatusProps, type StatusTone as InlineTone, Input, type InputProps$1 as InputProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps$2 as LabelProps, LineChart, type LineChartProps, Marker, type MarkerProps, Marquee, type MarqueeProps, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, type MessageProps, MessageScroller, type MessageScrollerHandle, type MessageScrollerProps, Meter, MeterIndicator, MeterLabel, type MeterSize, type MeterTone, MeterTrack, MeterValue, MiddleTruncate, type MiddleTruncateProps, type MotionPolicy, MotionProvider, type MotionProviderProps, Note, type NoteAction, type NoteProps, NotificationBadge, type NotificationBadgeProps, NumberField, type NumberFieldProps, type OrbMode, type OrbSize, OtpField, type OtpFieldProps, OverflowMenu, type OverflowMenuProps, PageHeader, type PageHeaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Panel, PanelGroup, PanelResizer, type PanelResizerProps, PanelSection, type PanelWidthBounds, Phone, type PhoneProps, PieChart, type PieChartProps, Pill, type PillProps, Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Presence, type PresenceProps, type Presentation, PresentationProvider, Progress, ProgressIndicator, ProgressLabel, type ProgressSize, ProgressTrack, ProgressValue, PropertyPair, PropertyRow, RadarChart, type RadarChartProps, RadialChart, type RadialChartProps, Radio, RadioCard, type RadioCardProps, type RadioCardTone, RadioGroup, RelativeTime, type RelativeTimeProps, Reveal, type RevealProps, type Rgb, SABLE_UI_VERSION, SEGMENTED_BAR_TONES, STATUS_TONES, STATUS_TONE_ICON, type ScrollCommandOptions, Scroller, type ScrollerProps, ScrubField, type ScrubFieldProps, SearchInput, type SearchInputProps, SegmentedBar, type SegmentedBarProps, type SegmentedBarSegment, type SegmentedBarTone, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps$3 as SeparatorProps, SettingsMenu, type SettingsMenuProps, SettingsRow, type SettingsRowProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, SideNav, type SideNavActiveVariant, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, type SideNavSize, Sidebar, SidebarFooter, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarProps, SimpleTooltip, Skeleton, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, StatusBar, StatusBarGroup, StatusBarSeparator, StatusDot, type StatusDotProps, type StatusTone, type StepStatus, Stepper, StepperItem, type StepperItemProps, type StepperOrientation, type StepperProps, StreamingText, type StreamingTextProps, Switch, TRANSPARENT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, type TextRevealProps, Textarea, type TextareaProps, ThemeId, ThemeManifest, ThemeMode$1 as ThemeManifestMode, type ThemeMode, ThemeSelector, type ThemeSelectorProps, ThemeSwitcher, type ThemeSwitcherProps, ThinkingOrb, type ThinkingOrbProps, ToastAction, type ToastApi, ToastClose, ToastContent, ToastDescription, type ToastManagerApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, ToastRoot, ToastTitle, type ToastType, ToastViewport, Toggle, ToggleGroup, type ToggleGroupAppearance, Toggle as ToggleGroupItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarInput, type ToolbarInputProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, type UseCopyOptions, type UseCopyResult, type UseInViewOptions, type UsePanelWidthOptions, Video, type VideoProps, ViewTransitionName, type ViewTransitionNameProps, Workspace, WorkspaceBar, WorkspaceCanvas, accordionMeta, appHeaderMeta, appShellMeta, areaChartMeta, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bannerMeta, bannerVariants, barChartMeta, bottomNavMeta, breadcrumbsMeta, browserMeta, bubbleMeta, buttonMeta, buttonVariants, calendarMeta, cardMeta, carouselMeta, chartColor, toneColor as chartToneColor, chatComposerMeta, checkboxCardMeta, checkboxMeta, cn, codeBlockMeta, codeMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, commandMenuMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, dataTableMeta, datePickerMeta, dateTileMeta, destructiveActionModalMeta, dialogMeta, emptyStateMeta, entityMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, formMeta, formatFileSize, formatHex, glidingHighlightMeta, gradientArtMeta, hsvToRgb, hueColor, inlineStatusMeta, inputMeta, isTransparent, kbdMeta, labelMeta, lineChartMeta, markerMeta, marqueeMeta, menuMeta, messageMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, middleTruncateMeta, noteMeta, noteVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, numberFieldMeta, otpFieldMeta, overflowMenuMeta, pageHeaderMeta, pageLoaderMeta, paginationMeta, panelGroupMeta, panelSectionMeta, parseHex, phoneMeta, pieChartMeta, pillMeta, pillVariants, popoverMeta, progressMeta, progressTrackVariants, radarChartMeta, radialChartMeta, radioCardMeta, radioMeta, relativeTimeMeta, rgbToHsv, scrollerMeta, scrubFieldMeta, searchInputMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, selectMeta, separatorMeta, settingsMenuMeta, sheetMeta, sheetVariants, showMoreMeta, sideNavMeta, sidebarMeta, skeletonMeta, sliderMeta, sparklineMeta, spinnerMeta, startViewTransition, statusBarMeta, statusDotMeta, statusDotVariants, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, streamingTextMeta, supportsViewTransitions, switchMeta, tableMeta, tabsMeta, textareaMeta, themeSelectorMeta, themeSwitcherMeta, thinkingOrbMeta, toast, toastMeta, toggleMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, tooltipMeta, treeIndent, treeMeta, useAnchoredDensity, useComboboxFilteredItems, useCommandMenuShortcut, useCopy, useDensity, useInView, useMotion, usePanelWidth, usePresentation, useReducedMotion, useScrollActivity, useSidebar, useToast, useToastManager, useTypeTier, videoMeta, workspaceMeta };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export { DENSITY_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVERLINE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_SCALE_TOKENS, TYPE_UI_TOKENS, WORKSPACE_SURFACE_TOKENS } from './chunk-
|
|
1
|
+
export { ART_TOKENS, DENSITY_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVERLINE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_SCALE_TOKENS, TYPE_UI_TOKENS, WORKSPACE_SURFACE_TOKENS } from './chunk-NETUFI34.js';
|
|
2
2
|
export { Phone, phoneMeta } from './chunk-KFZ43RKU.js';
|
|
3
3
|
import './chunk-NEQNXI2G.js';
|
|
4
|
-
export { AppHeader, AppShell, BottomNav, BottomNavItem, Browser, ChatComposer, DataTable, EmptyState, Marker, MessageScroller, Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue, NotificationBadge, PageHeader, Presence, RelativeTime, Reveal, SearchInput, SettingsMenu, SettingsRow, SideNav, SideNavGroup, SideNavItem, Sidebar, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav, Skeleton, StreamingText, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarSeparator, ViewTransitionName, appHeaderMeta, appShellMeta, bottomNavMeta, browserMeta, chatComposerMeta, dataTableMeta, emptyStateMeta, markerMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, pageHeaderMeta, relativeTimeMeta, searchInputMeta, settingsMenuMeta, sideNavMeta, sidebarMeta, skeletonMeta, startViewTransition, streamingTextMeta, supportsViewTransitions, tabsMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, useInView, useSidebar } from './chunk-
|
|
5
|
-
import { SELECTION_CARD_CHECKED, CartesianChart, resolveSeries, chartFormatters, categoryText, numberValue, niceTicks, ChartFrame, polar, riseTransition, stagger, pathStyle, morphTransition, ChartLegend, RADIO_DOT, RADIO_RING, SELECTION_CARD_TILE_HEAD, SELECTION_CARD_GLYPH, SELECTION_CARD_SHELL, SELECTION_CARD_LAYOUT, CheckboxMark, CHECK_BOX, SEGMENTED_STEP, SEGMENTED_ITEM, SEGMENTED_TRACK, ToggleGroup, Toggle, approxTextWidth, ChartTooltipContent } from './chunk-
|
|
6
|
-
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AreaChart, BarChart, CHART_SERIES_COUNT, Checkbox, CommandMenu, CommandMenuGroup, CommandMenuItem, CommandMenuPanel, CommandMenuTrigger, DateTile, Kbd, KbdGroup, OtpField, PieChart, RadialChart, SEGMENTED_BAR_TONES, Scroller, SegmentedBar, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, Stepper, StepperItem, Toggle, ToggleGroup, Toggle as ToggleGroupItem, accordionMeta, areaChartMeta, barChartMeta, chartColor, toneColor as chartToneColor, checkboxMeta, commandMenuMeta, dateTileMeta, kbdMeta, otpFieldMeta, pieChartMeta, radialChartMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, sliderMeta, sparklineMeta, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, toggleMeta, useCommandMenuShortcut } from './chunk-
|
|
7
|
-
import { withPortalThemeScope, FIELD_SHELL_XS, useTypeTier, useDensity, FIELD_SHELL, MOBILE_FIELD_TIER, useMotion, HighlightGlide, useAnchoredDensity, anchoredScroll, useIsomorphicLayoutEffect, mergeRefs, buttonVariants, FIELD_INVALID, Select, SelectTrigger, SelectContent, SelectItem, Button, Spinner, Badge, anchoredListScroll, useResizeObserver, MENU_ITEM_DESTRUCTIVE, DensityProvider, Input, Textarea, Progress } from './chunk-
|
|
8
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, Attachment, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, Bubble, BubbleReaction, BubbleReactions, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, Code, CodeBlock, CodeHighlightProvider, Density, DensityProvider, DestructiveActionModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Entity, Field, Form, Input, Label, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, MotionProvider, OverflowMenu, Pill, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, SimpleTooltip, Spinner, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bubbleMeta, buttonMeta, buttonVariants, cardMeta, codeBlockMeta, codeMeta, destructiveActionModalMeta, dialogMeta, entityMeta, formMeta, inputMeta, labelMeta, menuMeta, messageMeta, overflowMenuMeta, pillVariants, progressMeta, progressTrackVariants, selectMeta, separatorMeta, spinnerMeta, statusDotMeta, statusDotVariants, switchMeta, tableMeta, textareaMeta, tooltipMeta, useAnchoredDensity, useCopy, useDensity, useMotion, useReducedMotion, useScrollActivity, useTypeTier } from './chunk-
|
|
4
|
+
export { AppHeader, AppShell, BottomNav, BottomNavItem, Browser, ChatComposer, DataTable, EmptyState, Marker, MessageScroller, Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue, NotificationBadge, PageHeader, Presence, RelativeTime, Reveal, SearchInput, SettingsMenu, SettingsRow, SideNav, SideNavGroup, SideNavItem, Sidebar, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav, Skeleton, StreamingText, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarSeparator, ViewTransitionName, appHeaderMeta, appShellMeta, bottomNavMeta, browserMeta, chatComposerMeta, dataTableMeta, emptyStateMeta, markerMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, pageHeaderMeta, relativeTimeMeta, searchInputMeta, settingsMenuMeta, sideNavMeta, sidebarMeta, skeletonMeta, startViewTransition, streamingTextMeta, supportsViewTransitions, tabsMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, useInView, useSidebar } from './chunk-VVW4UCDI.js';
|
|
5
|
+
import { SELECTION_CARD_CHECKED, CartesianChart, resolveSeries, chartFormatters, categoryText, numberValue, niceTicks, ChartFrame, polar, riseTransition, stagger, pathStyle, morphTransition, ChartLegend, RADIO_DOT, RADIO_RING, SELECTION_CARD_TILE_HEAD, SELECTION_CARD_GLYPH, SELECTION_CARD_SHELL, SELECTION_CARD_LAYOUT, CheckboxMark, CHECK_BOX, SEGMENTED_STEP, SEGMENTED_ITEM, SEGMENTED_TRACK, ToggleGroup, Toggle, approxTextWidth, ChartTooltipContent } from './chunk-EDXLM7YL.js';
|
|
6
|
+
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AreaChart, BarChart, CHART_SERIES_COUNT, Checkbox, CommandMenu, CommandMenuGroup, CommandMenuItem, CommandMenuPanel, CommandMenuTrigger, DateTile, Kbd, KbdGroup, OtpField, PieChart, RadialChart, SEGMENTED_BAR_TONES, Scroller, SegmentedBar, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, Stepper, StepperItem, Toggle, ToggleGroup, Toggle as ToggleGroupItem, accordionMeta, areaChartMeta, barChartMeta, chartColor, toneColor as chartToneColor, checkboxMeta, commandMenuMeta, dateTileMeta, kbdMeta, otpFieldMeta, pieChartMeta, radialChartMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, sliderMeta, sparklineMeta, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, toggleMeta, useCommandMenuShortcut } from './chunk-EDXLM7YL.js';
|
|
7
|
+
import { withPortalThemeScope, FIELD_SHELL_XS, useTypeTier, useDensity, FIELD_SHELL, MOBILE_FIELD_TIER, useMotion, HighlightGlide, useAnchoredDensity, anchoredScroll, useIsomorphicLayoutEffect, mergeRefs, buttonVariants, FIELD_INVALID, Select, SelectTrigger, SelectContent, SelectItem, Button, Spinner, Badge, anchoredListScroll, useResizeObserver, MENU_ITEM_DESTRUCTIVE, DensityProvider, Input, Textarea, Progress } from './chunk-7QSDYBXO.js';
|
|
8
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, Attachment, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, Bubble, BubbleReaction, BubbleReactions, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, Code, CodeBlock, CodeHighlightProvider, Density, DensityProvider, DestructiveActionModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Entity, Field, Form, GradientArt, Input, Label, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, MotionProvider, OverflowMenu, Pill, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, SimpleTooltip, Spinner, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bubbleMeta, buttonMeta, buttonVariants, cardMeta, codeBlockMeta, codeMeta, destructiveActionModalMeta, dialogMeta, entityMeta, formMeta, gradientArtMeta, inputMeta, labelMeta, menuMeta, messageMeta, overflowMenuMeta, pillVariants, progressMeta, progressTrackVariants, selectMeta, separatorMeta, spinnerMeta, statusDotMeta, statusDotVariants, switchMeta, tableMeta, textareaMeta, tooltipMeta, useAnchoredDensity, useCopy, useDensity, useMotion, useReducedMotion, useScrollActivity, useTypeTier } from './chunk-7QSDYBXO.js';
|
|
9
|
+
import { PresentationProvider, usePresentation, StackedActionsContext } from './chunk-FKZXAFIY.js';
|
|
10
|
+
export { PresentationProvider, usePresentation } from './chunk-FKZXAFIY.js';
|
|
9
11
|
export { AspectBox, Bleed, Center, Col, Columns, Grid, GridOverlay, Page, Region, Row, SafeArea, Spacer, SplitPane, Stack } from './chunk-3IWZYBGH.js';
|
|
10
12
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
11
13
|
export { cn } from './chunk-SRQWQUTW.js';
|
|
@@ -429,6 +431,7 @@ var COMPONENT_TAXONOMY = {
|
|
|
429
431
|
a player, and it sits with the other media now. */
|
|
430
432
|
Browser: ["Media & mockups", "page"],
|
|
431
433
|
Carousel: ["Media & mockups", "page"],
|
|
434
|
+
GradientArt: ["Media & mockups", "either"],
|
|
432
435
|
Marquee: ["Media & mockups", "page"],
|
|
433
436
|
Phone: ["Media & mockups", "page"],
|
|
434
437
|
Video: ["Media & mockups", "page"]
|
|
@@ -2427,7 +2430,7 @@ function PopoverContent({
|
|
|
2427
2430
|
className
|
|
2428
2431
|
),
|
|
2429
2432
|
...props,
|
|
2430
|
-
children
|
|
2433
|
+
children: /* @__PURE__ */ jsx(PresentationProvider, { value: "page", children })
|
|
2431
2434
|
}
|
|
2432
2435
|
)
|
|
2433
2436
|
}
|
|
@@ -2660,7 +2663,7 @@ function SheetContent({
|
|
|
2660
2663
|
initialFocus: initialFocus === void 0 ? (type) => type === "touch" ? popupRef.current : true : initialFocus,
|
|
2661
2664
|
className: cn(sheetVariants({ side }), className),
|
|
2662
2665
|
...props,
|
|
2663
|
-
children: /* @__PURE__ */ jsx(Drawer.Content, { className: "contents", children })
|
|
2666
|
+
children: /* @__PURE__ */ jsx(Drawer.Content, { className: "contents", children: /* @__PURE__ */ jsx(PresentationProvider, { value: resolvedSide === "bottom" ? "sheet" : "page", children }) })
|
|
2664
2667
|
}
|
|
2665
2668
|
) })
|
|
2666
2669
|
] });
|
|
@@ -2686,12 +2689,19 @@ function SheetDescription({ className, ...props }) {
|
|
|
2686
2689
|
function SheetHeader({ className, ...props }) {
|
|
2687
2690
|
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
2688
2691
|
}
|
|
2689
|
-
function SheetFooter({ className, ...props }) {
|
|
2692
|
+
function SheetFooter({ className, children, ...props }) {
|
|
2693
|
+
const stacked = usePresentation() === "sheet";
|
|
2690
2694
|
return /* @__PURE__ */ jsx(
|
|
2691
2695
|
"div",
|
|
2692
2696
|
{
|
|
2693
|
-
|
|
2694
|
-
|
|
2697
|
+
"data-actions": stacked ? "stack" : "row",
|
|
2698
|
+
className: cn(
|
|
2699
|
+
"mt-auto flex items-center justify-end gap-2",
|
|
2700
|
+
className,
|
|
2701
|
+
stacked && "w-full max-w-sm flex-col-reverse items-stretch justify-start self-center"
|
|
2702
|
+
),
|
|
2703
|
+
...props,
|
|
2704
|
+
children: stacked ? /* @__PURE__ */ jsx(StackedActionsContext.Provider, { value: true, children }) : children
|
|
2695
2705
|
}
|
|
2696
2706
|
);
|
|
2697
2707
|
}
|
|
@@ -2814,7 +2824,7 @@ var sheetMeta = {
|
|
|
2814
2824
|
{
|
|
2815
2825
|
name: "SheetFooter",
|
|
2816
2826
|
type: 'ComponentProps<"div">',
|
|
2817
|
-
description: "Bottom row for actions, pinned after the scrollable body."
|
|
2827
|
+
description: "Bottom row for actions, pinned after the scrollable body. In a bottom sheet it stacks: full width, the primary on top, every button at the cta height."
|
|
2818
2828
|
}
|
|
2819
2829
|
],
|
|
2820
2830
|
variants: {
|
|
@@ -11337,6 +11347,6 @@ var carouselMeta = {
|
|
|
11337
11347
|
};
|
|
11338
11348
|
|
|
11339
11349
|
// src/index.ts
|
|
11340
|
-
var SABLE_UI_VERSION = "0.
|
|
11350
|
+
var SABLE_UI_VERSION = "0.6.0";
|
|
11341
11351
|
|
|
11342
11352
|
export { Banner, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, Carousel, CheckboxCard, CheckboxGroup, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger, ColorField, Combobox, ComboboxChips, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList, ComboboxPortal, ComboboxValue, ComboboxVirtualList, ContextCard, ContextCardArrow, ContextCardContent, ContextCardPortal, ContextCardTrigger, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DatePicker, Feedback, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend, FileDropzone, GlidingHighlight, InlineStatus, LineChart, Marquee, MiddleTruncate, Note, NumberField, PageLoader, Pagination, Panel, PanelGroup, PanelResizer, PanelSection, Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, PropertyPair, PropertyRow, RadarChart, Radio, RadioCard, RadioGroup, SABLE_UI_VERSION, STATUS_TONES, STATUS_TONE_ICON, ScrubField, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, ShowMore, StatusBar, StatusBarGroup, StatusBarSeparator, TRANSPARENT, ThemeSelector, ThemeSwitcher, ThinkingOrb, ToastAction, ToastClose, ToastContent, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, Video, Workspace, WorkspaceBar, WorkspaceCanvas, bannerMeta, bannerVariants, breadcrumbsMeta, calendarMeta, carouselMeta, checkboxCardMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, datePickerMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, formatFileSize, formatHex, glidingHighlightMeta, hsvToRgb, hueColor, inlineStatusMeta, isTransparent, lineChartMeta, marqueeMeta, middleTruncateMeta, noteMeta, noteVariants, numberFieldMeta, pageLoaderMeta, paginationMeta, panelGroupMeta, panelSectionMeta, parseHex, pillMeta, popoverMeta, radarChartMeta, radioCardMeta, radioMeta, rgbToHsv, scrollerMeta, scrubFieldMeta, sheetMeta, sheetVariants, showMoreMeta, statusBarMeta, themeSelectorMeta, themeSwitcherMeta, thinkingOrbMeta, toast, toastMeta, treeIndent, treeMeta, useComboboxFilteredItems, usePanelWidth, useToast, useToastManager, videoMeta, workspaceMeta };
|
package/dist/ios/index.d.ts
CHANGED
|
@@ -56,14 +56,19 @@ declare function NavigationStack({ children, active, label }: {
|
|
|
56
56
|
* An iOS 26 sheet. At the medium detent it floats inset from the screen edges in
|
|
57
57
|
* Liquid Glass; at the large detent it is opaque and meets the bottom edge. The
|
|
58
58
|
* header is a glass close button and a centered inline title.
|
|
59
|
+
*
|
|
60
|
+
* `background="opaque"` keeps the medium sheet's floating shape but fills it
|
|
61
|
+
* solid, like SwiftUI's `.presentationBackground`: for a form, whose fields
|
|
62
|
+
* would otherwise sit on whatever the glass is blurring.
|
|
59
63
|
* Browser dialog owns focus trapping, Escape, inert background, and restoration.
|
|
60
64
|
*/
|
|
61
|
-
declare function IosSheet({ open, onOpenChange, title, children, detent }: {
|
|
65
|
+
declare function IosSheet({ open, onOpenChange, title, children, detent, background }: {
|
|
62
66
|
open: boolean;
|
|
63
67
|
onOpenChange: (open: boolean) => void;
|
|
64
68
|
title: string;
|
|
65
69
|
children: ReactNode;
|
|
66
70
|
detent?: 'medium' | 'large';
|
|
71
|
+
background?: 'glass' | 'opaque';
|
|
67
72
|
}): react.JSX.Element;
|
|
68
73
|
|
|
69
74
|
/** A screen: the scrolling page under the navigation bar. Its content is Sable. */
|
package/dist/ios/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StatusIcons } from '../chunk-NEQNXI2G.js';
|
|
2
|
+
import { PresentationProvider } from '../chunk-FKZXAFIY.js';
|
|
2
3
|
import { App, Sheet, Button, Glass, Page, NavbarBackLink, TabbarLink, Navbar, Tabbar } from 'konsta/react';
|
|
3
4
|
import { createContext, useEffect, useContext, useState, useRef, useId } from 'react';
|
|
4
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -209,7 +210,7 @@ function NavigationStack({ children, active = true, label }) {
|
|
|
209
210
|
}
|
|
210
211
|
) });
|
|
211
212
|
}
|
|
212
|
-
function IosSheet({ open, onOpenChange, title, children, detent = "medium" }) {
|
|
213
|
+
function IosSheet({ open, onOpenChange, title, children, detent = "medium", background = "glass" }) {
|
|
213
214
|
const dialog = useRef(null);
|
|
214
215
|
const titleId = useId();
|
|
215
216
|
const [shown, setShown] = useState(false);
|
|
@@ -246,7 +247,7 @@ function IosSheet({ open, onOpenChange, title, children, detent = "medium" }) {
|
|
|
246
247
|
onClick: (event) => {
|
|
247
248
|
if (event.target === event.currentTarget) onOpenChange(false);
|
|
248
249
|
},
|
|
249
|
-
children: /* @__PURE__ */ jsxs(Sheet, { opened: shown, backdrop: false, className: "ios-sheet", "data-detent": expanded ? "large" : "medium", style: { height: expanded ? "90%" : "56%" }, children: [
|
|
250
|
+
children: /* @__PURE__ */ jsxs(Sheet, { opened: shown, backdrop: false, className: "ios-sheet", "data-detent": expanded ? "large" : "medium", "data-background": background, style: { height: expanded ? "90%" : "56%" }, children: [
|
|
250
251
|
/* @__PURE__ */ jsx(
|
|
251
252
|
Button,
|
|
252
253
|
{
|
|
@@ -280,7 +281,7 @@ function IosSheet({ open, onOpenChange, title, children, detent = "medium" }) {
|
|
|
280
281
|
/* @__PURE__ */ jsx(Glass, { className: "ios-sheet-close", children: /* @__PURE__ */ jsx(Button, { inline: true, rounded: true, clear: true, className: "ios-icon-action", "aria-label": "Close", onClick: () => onOpenChange(false), children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M3.5 3.5l9 9m0-9l-9 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", fill: "none" }) }) }) }),
|
|
281
282
|
/* @__PURE__ */ jsx("h2", { id: titleId, tabIndex: -1, children: title })
|
|
282
283
|
] }),
|
|
283
|
-
/* @__PURE__ */ jsx("div", { className: "ios-sheet-content", children })
|
|
284
|
+
/* @__PURE__ */ jsx("div", { className: "ios-sheet-content", children: /* @__PURE__ */ jsx(PresentationProvider, { value: "sheet", children }) })
|
|
284
285
|
] })
|
|
285
286
|
}
|
|
286
287
|
);
|
package/dist/ios/styles.css
CHANGED
|
@@ -87,6 +87,8 @@
|
|
|
87
87
|
box-shadow: inset 0 .75px .5px rgb(255 255 255 / .6), 0 8px 40px color-mix(in srgb, var(--ios-ink) 14%, transparent);
|
|
88
88
|
}
|
|
89
89
|
.ios-prototype.dark .ios-sheet[data-detent='medium'], .dark .ios-sheet[data-detent='medium'] { box-shadow: inset 0 .75px .5px rgb(255 255 255 / .25), 0 8px 40px rgb(0 0 0 / .4); }
|
|
90
|
+
/* Opaque: the same floating shape, filled solid (presentationBackground). */
|
|
91
|
+
.ios-sheet[data-detent='medium'][data-background='opaque'] { background: var(--ios-canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
|
|
90
92
|
.ios-sheet-grabber { display: flex; margin-inline: auto; width: 80px; touch-action: none; }
|
|
91
93
|
.ios-grabber-mark { width: 36px; height: 5px; border-radius: 4px; background: var(--ios-secondary); }
|
|
92
94
|
/* A glass close button, a centered inline title, and an empty column that keeps it centered. */
|
|
@@ -97,6 +99,13 @@
|
|
|
97
99
|
flat surface only smears pale patches into the rim. Keep the fill and highlights. */
|
|
98
100
|
.ios-prototype .ios-sheet .k-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
|
|
99
101
|
.ios-sheet-content { height: calc(100% - 88px); overflow-y: auto; scrollbar-width: none; padding: 16px 20px; }
|
|
102
|
+
/* A stacked action bar sits at the sheet's bottom: every plain box between the content
|
|
103
|
+
and the bar becomes a column that fills the height, so the bar's margin-top: auto has
|
|
104
|
+
room to push into. A <form> or a grid keeps its own layout (a form's fields are often
|
|
105
|
+
a grid), and the bar inside it follows the content, as it would in a tall form anyway. */
|
|
106
|
+
.ios-sheet-content:has([data-actions='stack']),
|
|
107
|
+
.ios-sheet-content :has([data-actions='stack']):not(form, .grid, [role='group']) { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
|
|
108
|
+
.ios-sheet-content :has([data-actions='stack']):not(form, .grid, [role='group']) { flex: 1 0 auto; }
|
|
100
109
|
.ios-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
101
110
|
@keyframes ios-route-enter { from { opacity: .7; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
|
|
102
111
|
@keyframes ios-route-back { from { opacity: .7; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
|