@geomak/ui 5.0.2 → 5.1.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/dist/index.cjs +637 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +359 -69
- package/dist/index.d.ts +359 -69
- package/dist/index.js +632 -113
- package/dist/index.js.map +1 -1
- package/dist/styles.css +262 -24
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-CvyV3YPI.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import React$1
|
|
3
|
+
import React$1 from 'react';
|
|
4
4
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
5
5
|
|
|
6
6
|
declare const Icon: {
|
|
@@ -339,6 +339,268 @@ interface PortalProps {
|
|
|
339
339
|
*/
|
|
340
340
|
declare function Portal({ children, target }: PortalProps): React$1.ReactPortal;
|
|
341
341
|
|
|
342
|
+
type Spacing = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
343
|
+
type BoxBackground = 'none' | 'background' | 'surface' | 'surface-raised' | 'accent';
|
|
344
|
+
type BoxBorder = 'none' | 'border' | 'border-strong' | 'accent' | 'status-error';
|
|
345
|
+
type BoxRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
346
|
+
type BoxShadow = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
347
|
+
interface BoxProps {
|
|
348
|
+
as?: keyof React$1.JSX.IntrinsicElements;
|
|
349
|
+
/** Padding shorthand — applies to all sides. */
|
|
350
|
+
p?: Spacing;
|
|
351
|
+
/** Horizontal padding (left + right). */
|
|
352
|
+
px?: Spacing;
|
|
353
|
+
/** Vertical padding (top + bottom). */
|
|
354
|
+
py?: Spacing;
|
|
355
|
+
pt?: Spacing;
|
|
356
|
+
pr?: Spacing;
|
|
357
|
+
pb?: Spacing;
|
|
358
|
+
pl?: Spacing;
|
|
359
|
+
/** Margin shorthand. */
|
|
360
|
+
m?: Spacing;
|
|
361
|
+
mx?: Spacing;
|
|
362
|
+
my?: Spacing;
|
|
363
|
+
mt?: Spacing;
|
|
364
|
+
mr?: Spacing;
|
|
365
|
+
mb?: Spacing;
|
|
366
|
+
ml?: Spacing;
|
|
367
|
+
background?: BoxBackground;
|
|
368
|
+
border?: BoxBorder;
|
|
369
|
+
radius?: BoxRadius;
|
|
370
|
+
shadow?: BoxShadow;
|
|
371
|
+
/** Width via Tailwind class or CSS value. */
|
|
372
|
+
width?: string | number;
|
|
373
|
+
/** Height via Tailwind class or CSS value. */
|
|
374
|
+
height?: string | number;
|
|
375
|
+
/** Click handler — accepts any element-typed handler. */
|
|
376
|
+
onClick?: React$1.MouseEventHandler<HTMLElement>;
|
|
377
|
+
className?: string;
|
|
378
|
+
style?: React$1.CSSProperties;
|
|
379
|
+
children?: React$1.ReactNode;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* A polymorphic layout primitive — a `<div>` (by default) styled via prop
|
|
383
|
+
* shortcuts to the design system's tokenised spacing, surface, border,
|
|
384
|
+
* radius, and shadow scales. Use it when you'd otherwise reach for a
|
|
385
|
+
* className-only `<div>` with `p-4 bg-surface border border-border rounded-lg`.
|
|
386
|
+
*
|
|
387
|
+
* The token shortcuts map straight to Tailwind classes under the hood, so
|
|
388
|
+
* Tailwind's content scanner sees the classes and JIT-emits the CSS. There
|
|
389
|
+
* is no runtime style cost beyond the className concatenation.
|
|
390
|
+
*
|
|
391
|
+
* Use `as` when the semantic element should differ (`<section>`, `<article>`).
|
|
392
|
+
*
|
|
393
|
+
* @example Padded card surface
|
|
394
|
+
* ```tsx
|
|
395
|
+
* <Box p="lg" background="surface" border="border" radius="lg" shadow="sm">
|
|
396
|
+
* <Typography variant="h3">Card title</Typography>
|
|
397
|
+
* </Box>
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* @example Semantic section
|
|
401
|
+
* ```tsx
|
|
402
|
+
* <Box as="section" px="md" py="lg" background="background">
|
|
403
|
+
* <PageContent />
|
|
404
|
+
* </Box>
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
declare function Box({ as, p, px, py, pt, pr, pb, pl, m, mx, my, mt, mr, mb, ml, background, border, radius, shadow, width, height, onClick, className, style, children, }: BoxProps): react_jsx_runtime.JSX.Element;
|
|
408
|
+
|
|
409
|
+
type FlexDirection = 'row' | 'row-reverse' | 'col' | 'col-reverse';
|
|
410
|
+
type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
411
|
+
type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
412
|
+
type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
413
|
+
interface FlexProps extends BoxProps {
|
|
414
|
+
direction?: FlexDirection;
|
|
415
|
+
align?: FlexAlign;
|
|
416
|
+
justify?: FlexJustify;
|
|
417
|
+
wrap?: FlexWrap;
|
|
418
|
+
/** Gap between children — uses the same spacing token scale as Box. */
|
|
419
|
+
gap?: Spacing;
|
|
420
|
+
inline?: boolean;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* `Box` with `display: flex` baked in. All Box props are accepted (padding,
|
|
424
|
+
* margin, background, border, etc.) plus flex-specific controls.
|
|
425
|
+
*
|
|
426
|
+
* @example Horizontal row, centred, with gap
|
|
427
|
+
* ```tsx
|
|
428
|
+
* <Flex direction="row" align="center" gap="md">
|
|
429
|
+
* <Avatar src={user.photo} alt={user.name} />
|
|
430
|
+
* <Typography variant="body">{user.name}</Typography>
|
|
431
|
+
* </Flex>
|
|
432
|
+
* ```
|
|
433
|
+
*
|
|
434
|
+
* @example Vertical stack
|
|
435
|
+
* ```tsx
|
|
436
|
+
* <Flex direction="col" gap="sm">
|
|
437
|
+
* <Typography variant="h3">Title</Typography>
|
|
438
|
+
* <Typography variant="body">Body text</Typography>
|
|
439
|
+
* </Flex>
|
|
440
|
+
* ```
|
|
441
|
+
*/
|
|
442
|
+
declare function Flex({ direction, align, justify, wrap, gap, inline, className, ...boxProps }: FlexProps): react_jsx_runtime.JSX.Element;
|
|
443
|
+
|
|
444
|
+
interface GridProps extends BoxProps {
|
|
445
|
+
/**
|
|
446
|
+
* Number of columns (1–12) for the most common case, OR an explicit
|
|
447
|
+
* CSS grid-template-columns string for arbitrary layouts
|
|
448
|
+
* (e.g. `"200px 1fr"` or `"repeat(auto-fit, minmax(180px, 1fr))"`).
|
|
449
|
+
*/
|
|
450
|
+
cols?: number | string;
|
|
451
|
+
/** Same as `cols` but for rows. */
|
|
452
|
+
rows?: number | string;
|
|
453
|
+
/** Uniform gap. Token scale, like Box's padding. */
|
|
454
|
+
gap?: Spacing;
|
|
455
|
+
/** Horizontal-only gap (overrides `gap`). */
|
|
456
|
+
gapX?: Spacing;
|
|
457
|
+
/** Vertical-only gap (overrides `gap`). */
|
|
458
|
+
gapY?: Spacing;
|
|
459
|
+
/** Cross-axis alignment of items within their cell. */
|
|
460
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
461
|
+
/** Main-axis alignment of items within their cell. */
|
|
462
|
+
justify?: 'start' | 'center' | 'end' | 'stretch';
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* `Box` with `display: grid` baked in. Use `cols` / `rows` as numbers for
|
|
466
|
+
* the common "N equal tracks" case, or pass any CSS grid-template-* string
|
|
467
|
+
* for arbitrary layouts (auto-fit grids, fixed-width sidebars, etc.).
|
|
468
|
+
*
|
|
469
|
+
* @example 3-column grid with medium gap
|
|
470
|
+
* ```tsx
|
|
471
|
+
* <Grid cols={3} gap="md">
|
|
472
|
+
* <Card />
|
|
473
|
+
* <Card />
|
|
474
|
+
* <Card />
|
|
475
|
+
* </Grid>
|
|
476
|
+
* ```
|
|
477
|
+
*
|
|
478
|
+
* @example Auto-fit responsive grid
|
|
479
|
+
* ```tsx
|
|
480
|
+
* <Grid cols="repeat(auto-fit, minmax(220px, 1fr))" gap="lg">
|
|
481
|
+
* {items.map((it) => <Card key={it.id} {...it} />)}
|
|
482
|
+
* </Grid>
|
|
483
|
+
* ```
|
|
484
|
+
*/
|
|
485
|
+
declare function Grid({ cols, rows, gap, gapX, gapY, align, justify, className, style, ...boxProps }: GridProps): react_jsx_runtime.JSX.Element;
|
|
486
|
+
|
|
487
|
+
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
488
|
+
type AvatarShape = 'circle' | 'square';
|
|
489
|
+
type AvatarStatus = 'online' | 'offline' | 'away' | 'busy';
|
|
490
|
+
interface AvatarProps {
|
|
491
|
+
/** Image URL. If missing or fails to load, `fallback` renders instead. */
|
|
492
|
+
src?: string;
|
|
493
|
+
/** Alt text — required when `src` is provided for screen readers. */
|
|
494
|
+
alt?: string;
|
|
495
|
+
/**
|
|
496
|
+
* Fallback rendered when the image is unavailable. Pass either:
|
|
497
|
+
* - a string (e.g. user initials like "JD") — rendered with semi-bold weight
|
|
498
|
+
* - any ReactNode (icon, emoji)
|
|
499
|
+
* - omit entirely — a generic "person" silhouette is used
|
|
500
|
+
*/
|
|
501
|
+
fallback?: React$1.ReactNode;
|
|
502
|
+
/** Size preset. Default `'md'`. */
|
|
503
|
+
size?: AvatarSize;
|
|
504
|
+
/** Circle (default) or rounded square. */
|
|
505
|
+
shape?: AvatarShape;
|
|
506
|
+
/**
|
|
507
|
+
* Optional presence indicator dot in the bottom-right corner.
|
|
508
|
+
* `'online' | 'offline' | 'away' | 'busy'`.
|
|
509
|
+
*/
|
|
510
|
+
status?: AvatarStatus;
|
|
511
|
+
className?: string;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Circular (or rounded-square) user avatar built on `@radix-ui/react-avatar`.
|
|
515
|
+
* Radix handles the image-load lifecycle: it tries to load `src`, falls back
|
|
516
|
+
* to the `fallback` slot after a short delay if the image is missing or fails
|
|
517
|
+
* to decode, and re-attempts on `src` change.
|
|
518
|
+
*
|
|
519
|
+
* **Fallback strategy** (in order):
|
|
520
|
+
* 1. `fallback` prop if provided (string or ReactNode)
|
|
521
|
+
* 2. Two-character initials extracted from `alt` if `alt` is provided
|
|
522
|
+
* 3. A generic "person" silhouette SVG
|
|
523
|
+
*
|
|
524
|
+
* **Status dot** is an optional presence indicator in the bottom-right —
|
|
525
|
+
* online (green), away (amber), busy (red), offline (grey).
|
|
526
|
+
*
|
|
527
|
+
* @example Basic with image
|
|
528
|
+
* ```tsx
|
|
529
|
+
* <Avatar src="/users/jd.jpg" alt="Jane Doe" />
|
|
530
|
+
* ```
|
|
531
|
+
*
|
|
532
|
+
* @example Fallback to initials
|
|
533
|
+
* ```tsx
|
|
534
|
+
* <Avatar alt="Jane Doe" size="lg" />
|
|
535
|
+
* ```
|
|
536
|
+
*
|
|
537
|
+
* @example Online presence + square shape
|
|
538
|
+
* ```tsx
|
|
539
|
+
* <Avatar src={user.photo} alt={user.name} status="online" shape="square" />
|
|
540
|
+
* ```
|
|
541
|
+
*/
|
|
542
|
+
declare function Avatar({ src, alt, fallback, size, shape, status, className, }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
543
|
+
|
|
544
|
+
type TypographyVariant = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'subtitle' | 'body' | 'caption' | 'overline' | 'code';
|
|
545
|
+
type TypographyColor = 'foreground' | 'foreground-secondary' | 'foreground-muted' | 'accent' | 'status-error' | 'status-warning' | 'status-success' | 'status-info' | 'inherit';
|
|
546
|
+
type TypographyWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
547
|
+
type TypographyAlign = 'left' | 'center' | 'right' | 'justify';
|
|
548
|
+
interface TypographyProps {
|
|
549
|
+
/** Visual scale variant. */
|
|
550
|
+
variant?: TypographyVariant;
|
|
551
|
+
/**
|
|
552
|
+
* Element to render. Defaults are sensible per variant
|
|
553
|
+
* (e.g. h1 → `<h1>`, body → `<p>`, code → `<code>`). Override
|
|
554
|
+
* with `as` when the semantic element should differ from the visual
|
|
555
|
+
* style (e.g. a styled-as-h1 product card heading rendered as `<div>`).
|
|
556
|
+
*/
|
|
557
|
+
as?: keyof React$1.JSX.IntrinsicElements;
|
|
558
|
+
color?: TypographyColor;
|
|
559
|
+
weight?: TypographyWeight;
|
|
560
|
+
align?: TypographyAlign;
|
|
561
|
+
/** Truncate to one line with ellipsis. */
|
|
562
|
+
truncate?: boolean;
|
|
563
|
+
/** Render the text with reduced opacity (useful for disabled states). */
|
|
564
|
+
muted?: boolean;
|
|
565
|
+
className?: string;
|
|
566
|
+
style?: React$1.CSSProperties;
|
|
567
|
+
children?: React$1.ReactNode;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Polymorphic typography primitive. `variant` picks a visual scale; `as`
|
|
571
|
+
* controls the rendered element when it should differ from the default
|
|
572
|
+
* for that variant (e.g. a styled-as-h2 card title rendered as `<div>`).
|
|
573
|
+
*
|
|
574
|
+
* **Variants** map to the design-system text scale:
|
|
575
|
+
* - `display`: hero headlines
|
|
576
|
+
* - `h1` – `h4`: section / subsection headings
|
|
577
|
+
* - `subtitle`: emphasised lead text
|
|
578
|
+
* - `body` (default): paragraph text
|
|
579
|
+
* - `caption`: small label / hint text
|
|
580
|
+
* - `overline`: uppercase eyebrow text
|
|
581
|
+
* - `code`: inline code samples
|
|
582
|
+
*
|
|
583
|
+
* **Colour** accepts any semantic token; defaults to `inherit` so the
|
|
584
|
+
* parent's text colour flows through (useful when nesting Typography
|
|
585
|
+
* inside a coloured surface like an accent badge).
|
|
586
|
+
*
|
|
587
|
+
* @example Section heading
|
|
588
|
+
* ```tsx
|
|
589
|
+
* <Typography variant="h2">Vessel performance</Typography>
|
|
590
|
+
* ```
|
|
591
|
+
*
|
|
592
|
+
* @example Styled as h1 but rendered as div (for SEO-neutral cards)
|
|
593
|
+
* ```tsx
|
|
594
|
+
* <Typography variant="h1" as="div">Card title</Typography>
|
|
595
|
+
* ```
|
|
596
|
+
*
|
|
597
|
+
* @example Error message
|
|
598
|
+
* ```tsx
|
|
599
|
+
* <Typography variant="caption" color="status-error">{errorText}</Typography>
|
|
600
|
+
* ```
|
|
601
|
+
*/
|
|
602
|
+
declare function Typography({ variant, as, color, weight, align, truncate, muted, className, style, children, }: TypographyProps): react_jsx_runtime.JSX.Element;
|
|
603
|
+
|
|
342
604
|
type IconButtonVariant = 'primary' | 'bordered';
|
|
343
605
|
interface IconButtonProps {
|
|
344
606
|
icon?: React.ReactNode;
|
|
@@ -599,7 +861,7 @@ declare function useNotification(): {
|
|
|
599
861
|
danger: (props: Omit<NotificationPayload, "type">) => void;
|
|
600
862
|
};
|
|
601
863
|
|
|
602
|
-
type LoadingSpinnerSize = 'sm' | 'md' | 'lg';
|
|
864
|
+
type LoadingSpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
603
865
|
interface LoadingSpinnerProps {
|
|
604
866
|
/**
|
|
605
867
|
* Text revealed letter-by-letter beneath the spinner. Optional — pass
|
|
@@ -699,43 +961,117 @@ interface FadingBaseProps {
|
|
|
699
961
|
declare function FadingBase({ className, isMounted, children, }: FadingBaseProps): react_jsx_runtime.JSX.Element;
|
|
700
962
|
|
|
701
963
|
interface ListItem {
|
|
964
|
+
/** Stable key for React reconciliation + active-key matching. */
|
|
702
965
|
key: string | number;
|
|
966
|
+
/** Main item text (title). Required. */
|
|
703
967
|
label: React$1.ReactNode;
|
|
968
|
+
/** Optional description rendered below the label, in foreground-secondary. */
|
|
969
|
+
description?: React$1.ReactNode;
|
|
970
|
+
/**
|
|
971
|
+
* Optional leading slot, typically an Avatar. Anything React-renderable
|
|
972
|
+
* is accepted (icon, image, status badge…).
|
|
973
|
+
*/
|
|
974
|
+
avatar?: React$1.ReactNode;
|
|
975
|
+
/** Optional trailing slot, e.g. a badge, count, or action icon. */
|
|
976
|
+
trailing?: React$1.ReactNode;
|
|
977
|
+
/** Disable interaction for this item only. */
|
|
978
|
+
disabled?: boolean;
|
|
704
979
|
}
|
|
705
980
|
interface ListProps {
|
|
706
981
|
items: ListItem[];
|
|
707
982
|
onItemClick: (item: ListItem) => void;
|
|
708
983
|
activeKey?: string | number;
|
|
984
|
+
/**
|
|
985
|
+
* Visual density. `'compact'` for dense reference lists,
|
|
986
|
+
* `'comfortable'` (default) for typical UI, `'spacious'` for hero rows.
|
|
987
|
+
*/
|
|
988
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
709
989
|
}
|
|
710
990
|
/**
|
|
711
|
-
* Vertical clickable list with
|
|
991
|
+
* Vertical clickable list with optional avatar / description / trailing
|
|
992
|
+
* slots per item. Built on `role="listbox"` + `role="option"` so screen
|
|
993
|
+
* readers announce it as a selectable list. Keyboard activation works on
|
|
994
|
+
* Enter and Space.
|
|
712
995
|
*
|
|
713
|
-
*
|
|
996
|
+
* **When to use this** over a Table:
|
|
997
|
+
* - When the dataset is a simple sequence of records that the user
|
|
998
|
+
* browses + picks one of (sidebar nav, contact list, vessel chooser).
|
|
999
|
+
* - When each row's primary signal is a 1–2-line summary, not a tabular
|
|
1000
|
+
* breakdown.
|
|
1001
|
+
*
|
|
1002
|
+
* Use Table when comparing rows across multiple columns matters more than
|
|
1003
|
+
* picking one.
|
|
1004
|
+
*
|
|
1005
|
+
* @example Plain
|
|
1006
|
+
* ```tsx
|
|
714
1007
|
* <List
|
|
715
|
-
* items={
|
|
716
|
-
* activeKey={
|
|
717
|
-
* onItemClick={(
|
|
1008
|
+
* items={[{ key: 1, label: 'Aurora' }, { key: 2, label: 'Beacon' }]}
|
|
1009
|
+
* activeKey={2}
|
|
1010
|
+
* onItemClick={(it) => setSelected(it.key)}
|
|
718
1011
|
* />
|
|
1012
|
+
* ```
|
|
1013
|
+
*
|
|
1014
|
+
* @example With avatars + descriptions
|
|
1015
|
+
* ```tsx
|
|
1016
|
+
* <List
|
|
1017
|
+
* items={crew.map((c) => ({
|
|
1018
|
+
* key: c.id,
|
|
1019
|
+
* label: c.name,
|
|
1020
|
+
* description: c.rank,
|
|
1021
|
+
* avatar: <Avatar src={c.photo} alt={c.name} status={c.status} />,
|
|
1022
|
+
* trailing: <Badge count={c.unread} />,
|
|
1023
|
+
* }))}
|
|
1024
|
+
* onItemClick={(it) => navigate(`/crew/${it.key}`)}
|
|
1025
|
+
* />
|
|
1026
|
+
* ```
|
|
719
1027
|
*/
|
|
720
|
-
declare function List({ items, onItemClick, activeKey }: ListProps): react_jsx_runtime.JSX.Element;
|
|
1028
|
+
declare function List({ items, onItemClick, activeKey, density, }: ListProps): react_jsx_runtime.JSX.Element;
|
|
721
1029
|
|
|
722
1030
|
interface ScalableContainerProps {
|
|
1031
|
+
/** Resting width. Any CSS length / percent. Default `'100%'`. */
|
|
723
1032
|
width?: React$1.CSSProperties['width'];
|
|
1033
|
+
/** Resting height. Any CSS length / percent. Default `'auto'`. */
|
|
724
1034
|
height?: React$1.CSSProperties['height'];
|
|
1035
|
+
/** Content to render inside. */
|
|
725
1036
|
children?: React$1.ReactNode;
|
|
726
|
-
/** CSS class
|
|
1037
|
+
/** CSS class appended to the expanded children wrapper. */
|
|
727
1038
|
assignClassOnClick?: string;
|
|
1039
|
+
/** Override the expand-button icon. */
|
|
1040
|
+
expandIcon?: React$1.ReactNode;
|
|
1041
|
+
/** Override the collapse-button icon. */
|
|
1042
|
+
collapseIcon?: React$1.ReactNode;
|
|
1043
|
+
/**
|
|
1044
|
+
* Position of the toggle button inside the container.
|
|
1045
|
+
* Default `'top-right'` — matches the OS-window convention.
|
|
1046
|
+
*/
|
|
1047
|
+
togglePosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
728
1048
|
}
|
|
729
1049
|
/**
|
|
730
|
-
* Container that
|
|
731
|
-
*
|
|
1050
|
+
* Container that smoothly expands to fill its parent on click and
|
|
1051
|
+
* collapses back to its resting size. Reads like a macOS / Windows
|
|
1052
|
+
* window resizing — subtle elevation shift, smooth scale, no flash
|
|
1053
|
+
* of colour or harsh background change.
|
|
1054
|
+
*
|
|
1055
|
+
* **What's different from the previous version**
|
|
1056
|
+
* - Animates BOTH width and height (was width-only).
|
|
1057
|
+
* - No baked-in background — the container is transparent by default,
|
|
1058
|
+
* so it overlays whatever surface the consumer puts behind it.
|
|
1059
|
+
* - Shadow lifts on expand (`shadow-md` → `shadow-2xl`) like a window
|
|
1060
|
+
* being raised. No colour change.
|
|
1061
|
+
* - The toggle button is a plain rounded chip with the chevron icon,
|
|
1062
|
+
* not the old `IconButton` with the heavy background. Floats over
|
|
1063
|
+
* the content via absolute positioning so it doesn't push layout.
|
|
1064
|
+
* - Configurable toggle position (default top-right, matching OS
|
|
1065
|
+
* close-button convention).
|
|
732
1066
|
*
|
|
733
1067
|
* @example
|
|
734
|
-
*
|
|
735
|
-
*
|
|
1068
|
+
* ```tsx
|
|
1069
|
+
* <ScalableContainer width={480} height={300}>
|
|
1070
|
+
* <Chart data={metrics} />
|
|
736
1071
|
* </ScalableContainer>
|
|
1072
|
+
* ```
|
|
737
1073
|
*/
|
|
738
|
-
declare function ScalableContainer({ width, height, children, assignClassOnClick, }: ScalableContainerProps): react_jsx_runtime.JSX.Element;
|
|
1074
|
+
declare function ScalableContainer({ width, height, children, assignClassOnClick, expandIcon, collapseIcon, togglePosition, }: ScalableContainerProps): react_jsx_runtime.JSX.Element;
|
|
739
1075
|
|
|
740
1076
|
interface GridCardItem {
|
|
741
1077
|
key: string | number;
|
|
@@ -821,50 +1157,6 @@ interface CatalogProps {
|
|
|
821
1157
|
*/
|
|
822
1158
|
declare function Catalog({ display, items, buttonText, onOpen }: CatalogProps): react_jsx_runtime.JSX.Element;
|
|
823
1159
|
|
|
824
|
-
interface MenuBarItemProps {
|
|
825
|
-
icon: React$1.ReactNode;
|
|
826
|
-
isActive: boolean;
|
|
827
|
-
title: string;
|
|
828
|
-
/** Called when the item is clicked (navigation or logout etc.) */
|
|
829
|
-
onClick?: () => void;
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Single item in the MenuBar sidebar.
|
|
833
|
-
*
|
|
834
|
-
* Decoupled from React Router and context — navigation is delegated to `onClick`.
|
|
835
|
-
* The Tooltip is powered by Radix (same as the standalone Tooltip component).
|
|
836
|
-
*
|
|
837
|
-
* @example
|
|
838
|
-
* <MenuBarItem
|
|
839
|
-
* icon={<Icon.Dashboard />}
|
|
840
|
-
* title="Dashboard"
|
|
841
|
-
* isActive={pathname === '/dashboard'}
|
|
842
|
-
* onClick={() => navigate('/dashboard')}
|
|
843
|
-
* />
|
|
844
|
-
*/
|
|
845
|
-
declare function MenuBarItem({ icon, isActive, title, onClick }: MenuBarItemProps): react_jsx_runtime.JSX.Element;
|
|
846
|
-
|
|
847
|
-
interface MenuBarItemConfig extends MenuBarItemProps {
|
|
848
|
-
key: string;
|
|
849
|
-
}
|
|
850
|
-
interface MenuBarProps {
|
|
851
|
-
items: MenuBarItemConfig[];
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
* Vertical icon sidebar (left edge of the app).
|
|
855
|
-
*
|
|
856
|
-
* Decoupled from React Router, useAuth, and useData.
|
|
857
|
-
* The app composes the items array (with `onClick` handlers) and passes it in.
|
|
858
|
-
*
|
|
859
|
-
* @example
|
|
860
|
-
* const items: MenuBarItemConfig[] = [
|
|
861
|
-
* { key: 'dash', icon: <Icon.Dashboard />, title: 'Dashboard', isActive: pathname === '/dashboard', onClick: () => navigate('/dashboard') },
|
|
862
|
-
* { key: 'logout', icon: <Icon.PowerOff />, title: 'Sign Out', isActive: false, onClick: logOut },
|
|
863
|
-
* ]
|
|
864
|
-
* <MenuBar items={items} />
|
|
865
|
-
*/
|
|
866
|
-
declare function MenuBar({ items }: MenuBarProps): react_jsx_runtime.JSX.Element;
|
|
867
|
-
|
|
868
1160
|
/**
|
|
869
1161
|
* A single action in the context menu.
|
|
870
1162
|
*
|
|
@@ -1662,15 +1954,6 @@ interface SearchInputProps {
|
|
|
1662
1954
|
*/
|
|
1663
1955
|
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1664
1956
|
|
|
1665
|
-
interface DropdownPillProps {
|
|
1666
|
-
value?: ReactNode;
|
|
1667
|
-
hasSiblings?: boolean;
|
|
1668
|
-
}
|
|
1669
|
-
/**
|
|
1670
|
-
* Pill chip used inside Dropdown to display selected values.
|
|
1671
|
-
*/
|
|
1672
|
-
declare function DropdownPill({ value, hasSiblings }: DropdownPillProps): react_jsx_runtime.JSX.Element;
|
|
1673
|
-
|
|
1674
1957
|
interface CheckboxProps {
|
|
1675
1958
|
/** Controlled checked state */
|
|
1676
1959
|
checked?: boolean;
|
|
@@ -1765,6 +2048,13 @@ interface DropdownProps {
|
|
|
1765
2048
|
disabled?: boolean;
|
|
1766
2049
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
1767
2050
|
layout?: 'horizontal' | 'vertical';
|
|
2051
|
+
/**
|
|
2052
|
+
* Show a "+N more" pill alongside the first selected item in multiselect
|
|
2053
|
+
* mode. Defaults to `false` — a single pill is shown with the first
|
|
2054
|
+
* selection and consumers typically open the dropdown to see the rest.
|
|
2055
|
+
* Set `true` if you want the count visible on the trigger.
|
|
2056
|
+
*/
|
|
2057
|
+
showSelectedCount?: boolean;
|
|
1768
2058
|
errorMessage?: React$1.ReactNode;
|
|
1769
2059
|
style?: React$1.CSSProperties;
|
|
1770
2060
|
htmlFor?: string;
|
|
@@ -1787,7 +2077,7 @@ interface DropdownProps {
|
|
|
1787
2077
|
* // Multi-select
|
|
1788
2078
|
* <Dropdown isMultiselect label="Fuels" items={fuels} value={form.fuels} onChange={handleChange} />
|
|
1789
2079
|
*/
|
|
1790
|
-
declare function Dropdown({ isMultiselect, hasSearch, label, name, value, onChange, disabled, layout, errorMessage, style, htmlFor, items, labelStyle, placeholder, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
2080
|
+
declare function Dropdown({ isMultiselect, hasSearch, label, name, value, onChange, disabled, layout, errorMessage, style, htmlFor, items, labelStyle, placeholder, showSelectedCount, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
1791
2081
|
|
|
1792
2082
|
interface AutoCompleteItem {
|
|
1793
2083
|
key: string;
|
|
@@ -1998,4 +2288,4 @@ type TemporalPickerProps = DatePickerProps;
|
|
|
1998
2288
|
*/
|
|
1999
2289
|
declare function DatePicker({ value, onChange, label, placeholder, htmlFor, name: _name, layout, disabled, errorMessage, min, max, style, format, weekStartsOn, clearable, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
2000
2290
|
|
|
2001
|
-
export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem,
|
|
2291
|
+
export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Grid, GridCard, type GridCardItem, type GridCardProps, type GridProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, Portal, type PortalProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, type Spacing, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, DatePicker as Temporal, type TemporalPickerProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type TypographyWeight, Wizard, type WizardProps, type WizardStep, useNotification };
|