@stackone/malachite 2.5.1 → 2.7.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.d.ts CHANGED
@@ -489,6 +489,56 @@ export declare interface ConfettiProps {
489
489
  className?: string;
490
490
  }
491
491
 
492
+ export declare const ConfirmationDialog: default_2.FC<ConfirmationDialogProps>;
493
+
494
+ export declare interface ConfirmationDialogProps {
495
+ open: boolean;
496
+ /** Dismiss handler — cancel, close button, ESC or scrim. `loading` suppresses every
497
+ * route except ESC, which always reaches this so a keyboard user is never stranded. */
498
+ onClose: () => void;
499
+ /** Runs when the confirm action is taken. Closing is left to the consumer. */
500
+ onConfirm: () => void;
501
+ title: default_2.ReactNode;
502
+ titleAdornment?: default_2.ReactNode;
503
+ badgeIcon?: default_2.ReactNode;
504
+ /** The sentence saying what is about to happen. */
505
+ description?: default_2.ReactNode;
506
+ variant?: ConfirmationDialogVariant;
507
+ /** Coloured callout below the body. Defaults to the variant's own type. */
508
+ callout?: {
509
+ type?: AlertType;
510
+ message: string;
511
+ };
512
+ /**
513
+ * Requires this exact phrase to be typed before the confirm action enables — for a
514
+ * consequence severe enough that a single click should not be able to cause it.
515
+ */
516
+ confirmPhrase?: string;
517
+ /** Label above the type-to-confirm field. Default names the phrase. */
518
+ confirmPhraseLabel?: string;
519
+ confirmPhrasePlaceholder?: string;
520
+ confirmLabel?: string;
521
+ cancelLabel?: string;
522
+ /**
523
+ * Disables the actions, spins the confirm button and suppresses the pointer dismissal
524
+ * routes — but never ESC, which always reaches `onClose`.
525
+ */
526
+ loading?: boolean;
527
+ tip?: {
528
+ label?: string;
529
+ message: string;
530
+ };
531
+ size?: ModalSize;
532
+ /** Accessible dialog name; required when `title` isn't a plain string. */
533
+ 'aria-label'?: string;
534
+ /** ID of a visible element naming the dialog (alternative to `aria-label`). */
535
+ 'aria-labelledby'?: string;
536
+ /** Extra body content between the description and the callout, e.g. an entity chip. */
537
+ children?: default_2.ReactNode;
538
+ }
539
+
540
+ export declare type ConfirmationDialogVariant = 'default' | 'warning' | 'destructive' | 'success';
541
+
492
542
  export declare interface ConnectionEndpoint {
493
543
  /** Icon/glyph shown in the tile (coloured white when a `background` is set). */
494
544
  icon: default_2.ReactNode;
@@ -1126,6 +1176,8 @@ export declare interface MalachiteTheme {
1126
1176
  lg: string;
1127
1177
  xl: string;
1128
1178
  default: string;
1179
+ glow?: string;
1180
+ glowLg?: string;
1129
1181
  /** Optional so adding a shadow never breaks a consumer building a full theme literal. */
1130
1182
  accent?: string;
1131
1183
  success: string;
@@ -1147,6 +1199,11 @@ export declare interface MalachiteTheme {
1147
1199
  footerBackground: string;
1148
1200
  /** @deprecated No longer read by any component — glass surfaces derive from `sunkenBackground` (see `glassSurface.ts`). */
1149
1201
  footerGlassBackground: string;
1202
+ trayNeutral?: string;
1203
+ trayWarning?: string;
1204
+ trayError?: string;
1205
+ traySuccess?: string;
1206
+ subtleDivider?: string;
1150
1207
  };
1151
1208
  overlay: {
1152
1209
  /** Dimming layer drawn behind modal overlays (e.g. SidePanel). */
@@ -1479,6 +1536,62 @@ export declare interface MarkdownProps {
1479
1536
 
1480
1537
  export declare type MarkdownVariant = 'block' | 'flow';
1481
1538
 
1539
+ export declare const Modal: default_2.FC<ModalProps>;
1540
+
1541
+ export declare interface ModalProps {
1542
+ open: boolean;
1543
+ /** Dismiss handler — close button, ESC, or overlay click. */
1544
+ onClose: () => void;
1545
+ title: default_2.ReactNode;
1546
+ /** Secondary line beneath the title. */
1547
+ subtitle?: default_2.ReactNode;
1548
+ /** Leading header slot, typically an icon or logo. */
1549
+ icon?: default_2.ReactNode;
1550
+ /** Content pinned right in the header, before the close button. */
1551
+ headerExtra?: default_2.ReactNode;
1552
+ titleAdornment?: default_2.ReactNode;
1553
+ tray?: {
1554
+ tone?: ModalTrayTone;
1555
+ caption?: {
1556
+ label?: string;
1557
+ message: string;
1558
+ };
1559
+ };
1560
+ /** Divider under the header. Default: false. */
1561
+ headerDivider?: boolean;
1562
+ /** Pinned action row below the scrolling body. */
1563
+ footer?: default_2.ReactNode;
1564
+ size?: ModalSize;
1565
+ /** Default: true. */
1566
+ showCloseButton?: boolean;
1567
+ /** Default: true. Turn off for a dialog whose choice must be made deliberately. */
1568
+ closeOnOverlayClick?: boolean;
1569
+ /** Whether the body gets default padding. Default: true. */
1570
+ bodyPadding?: boolean;
1571
+ /**
1572
+ * `alertdialog` for a dialog interrupting the user over a consequential choice — it
1573
+ * tells assistive tech to announce the body, not just the name.
1574
+ */
1575
+ role?: 'dialog' | 'alertdialog';
1576
+ /** Accessible dialog name; required when `title` isn't a plain string. */
1577
+ 'aria-label'?: string;
1578
+ /** ID of a visible element naming the dialog (alternative to `aria-label`). */
1579
+ 'aria-labelledby'?: string;
1580
+ /** ID of the element describing what the dialog is asking. */
1581
+ 'aria-describedby'?: string;
1582
+ /**
1583
+ * Work is in flight: suppresses the pointer dismissal routes and announces the busy
1584
+ * state. Never ESC — that is the only guaranteed keyboard exit from a focus trap, so it
1585
+ * always reaches `onClose` and whether to abort is left to the caller.
1586
+ */
1587
+ busy?: boolean;
1588
+ children: default_2.ReactNode;
1589
+ }
1590
+
1591
+ export declare type ModalSize = 'small' | 'medium' | 'large';
1592
+
1593
+ export declare type ModalTrayTone = 'neutral' | 'warning' | 'error' | 'success';
1594
+
1482
1595
  export declare const MultiSelect: default_2.FC<MultiSelectProps>;
1483
1596
 
1484
1597
  declare interface MultiSelectBaseProps {
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as s, c as t, d as o, e as i, f as r, g as n, B as l, h as p, i as d, j as c, k as S, l as m, m as T, n as u, o as g, p as h, q as C, r as F, s as B, D as y, t as w, u as x, v as A, F as L, w as b, x as f, y as P, z as k, E as v, G as D, H as z, I, J as R, K as M, L as G, M as H, N, O as V, P as E, Q as J, R as K, S as j, T as q, U as O, V as W, W as Q, X as U, Y as X, Z as Y, $ as Z, a0 as $, a1 as _, a2 as aa, a3 as ea, a4 as sa, a5 as ta, a6 as oa, a7 as ia, a8 as ra, a9 as na, aa as la, ab as pa, ac as da, ad as ca, ae as Sa, af as ma, ag as Ta, ah as ua, ai as ga, aj as ha, ak as Ca, al as Fa, am as Ba, an as ya, ao as wa, ap as xa, aq as Aa, ar as La, as as ba, at as fa, au as Pa, av as ka, aw as va, ax as Da, ay as za, az as Ia, aA as Ra, aB as Ma, aC as Ga, aD as Ha, aE as Na, aF as Va, aG as Ea, aH as Ja, aI as Ka, aJ as ja, aK as qa, aL as Oa } from "./index-COY1hH1S.js";
1
+ import { A as s, c as o, d as t, e as i, f as r, g as n, B as l, h as p, i as d, j as c, k as m, l as S, m as T, n as u, o as g, p as h, q as C, r as F, s as B, t as y, D as w, u as f, v as x, w as A, F as L, x as b, y as P, z as k, E as v, G as D, H as M, I as z, J as I, K as R, L as N, M as G, N as H, O as V, P as E, Q as J, R as K, S as j, T as q, U as O, V as W, W as Q, X as U, Y as X, Z as Y, $ as Z, a0 as $, a1 as _, a2 as aa, a3 as ea, a4 as sa, a5 as oa, a6 as ta, a7 as ia, a8 as ra, a9 as na, aa as la, ab as pa, ac as da, ad as ca, ae as ma, af as Sa, ag as Ta, ah as ua, ai as ga, aj as ha, ak as Ca, al as Fa, am as Ba, an as ya, ao as wa, ap as fa, aq as xa, ar as Aa, as as La, at as ba, au as Pa, av as ka, aw as va, ax as Da, ay as Ma, az as za, aA as Ia, aB as Ra, aC as Na, aD as Ga, aE as Ha, aF as Va, aG as Ea, aH as Ja, aI as Ka, aJ as ja, aK as qa, aL as Oa, aM as Wa, aN as Qa } from "./index-Bm6125Uh.js";
2
2
  export {
3
3
  s as Accordion,
4
- t as ActionBar,
5
- o as ActionMenu,
4
+ o as ActionBar,
5
+ t as ActionMenu,
6
6
  i as Alert,
7
7
  r as AppLogo,
8
8
  n as Avatar,
@@ -10,93 +10,95 @@ export {
10
10
  p as Breadcrumbs,
11
11
  d as Button,
12
12
  c as ButtonList,
13
- S as Card,
14
- m as CardStrip,
13
+ m as Card,
14
+ S as CardStrip,
15
15
  T as Checkbox,
16
16
  u as ClampText,
17
17
  g as CodeBlock,
18
18
  h as CollapsibleSection,
19
19
  C as Confetti,
20
- F as ConnectionHeader,
21
- B as CustomIcons,
22
- y as DefinitionRow,
23
- w as Divider,
20
+ F as ConfirmationDialog,
21
+ B as ConnectionHeader,
22
+ y as CustomIcons,
23
+ w as DefinitionRow,
24
+ f as Divider,
24
25
  x as DividerVariant,
25
26
  A as Dropdown,
26
27
  L as FieldBlock,
27
28
  b as FieldGroup,
28
- f as Flex,
29
- P as FlexAlign,
30
- k as FlexDirection,
31
- v as FlexGapSize,
32
- D as FlexJustify,
29
+ P as Flex,
30
+ k as FlexAlign,
31
+ v as FlexDirection,
32
+ D as FlexGapSize,
33
+ M as FlexJustify,
33
34
  z as FooterLinks,
34
35
  I as FooterNav,
35
36
  R as Form,
36
- M as FormItem,
37
+ N as FormItem,
37
38
  G as FormSectionHeading,
38
39
  H as InlineConfirm,
39
- N as Input,
40
- V as KeyValueList,
41
- E as Link,
42
- J as LoadingBar,
43
- K as MalachiteContext,
44
- j as MultiSelect,
45
- q as NumberTag,
46
- O as OverflowRow,
47
- W as Padded,
48
- Q as PaddingSize,
49
- U as PageActions,
50
- X as PageLayout,
51
- Y as PillButton,
52
- Z as PreviewTree,
53
- $ as PreviewTreeRow,
54
- _ as Progress,
55
- aa as Radio,
56
- ea as Search,
57
- sa as SegmentedControl,
58
- ta as SelectableCard,
59
- oa as SelectionBar,
60
- ia as SettingRow,
61
- ra as ShadowEscape,
62
- na as SidePanel,
63
- la as SidePanelNavFooter,
64
- pa as Skeleton,
65
- da as Spacer,
66
- ca as SpacingSize,
67
- Sa as Spinner,
68
- ma as SplitScreenLayout,
69
- Ta as StatBadge,
70
- ua as Statistic,
71
- ga as StatusBadge,
72
- ha as StepTabs,
73
- Ca as Stepper,
74
- Fa as Surface,
75
- Ba as SurfaceRow,
76
- ya as Swatch,
77
- wa as Table,
78
- xa as Tabs,
79
- Aa as Tag,
80
- La as TextArea,
81
- ba as ThemeScope,
82
- fa as Toggle,
83
- Pa as Toolbar,
84
- ka as Tooltip,
85
- va as TruncatedTooltip,
86
- Da as Typography,
87
- za as WizardLayout,
88
- Ia as applyCustomTheme,
89
- Ra as applyDarkTheme,
90
- Ma as applyLightTheme,
91
- Ga as applyTheme,
92
- Ha as applyThemeVars,
93
- Na as buildActionBarMenuItems,
94
- Va as darkTheme,
95
- Ea as defaultTheme,
96
- Ja as getCurrentTheme,
97
- Ka as getCurrentThemeMode,
98
- ja as initializeTheme,
99
- qa as resetTheme,
100
- Oa as toggleTheme
40
+ V as Input,
41
+ E as KeyValueList,
42
+ J as Link,
43
+ K as LoadingBar,
44
+ j as MalachiteContext,
45
+ q as Modal,
46
+ O as MultiSelect,
47
+ W as NumberTag,
48
+ Q as OverflowRow,
49
+ U as Padded,
50
+ X as PaddingSize,
51
+ Y as PageActions,
52
+ Z as PageLayout,
53
+ $ as PillButton,
54
+ _ as PreviewTree,
55
+ aa as PreviewTreeRow,
56
+ ea as Progress,
57
+ sa as Radio,
58
+ oa as Search,
59
+ ta as SegmentedControl,
60
+ ia as SelectableCard,
61
+ ra as SelectionBar,
62
+ na as SettingRow,
63
+ la as ShadowEscape,
64
+ pa as SidePanel,
65
+ da as SidePanelNavFooter,
66
+ ca as Skeleton,
67
+ ma as Spacer,
68
+ Sa as SpacingSize,
69
+ Ta as Spinner,
70
+ ua as SplitScreenLayout,
71
+ ga as StatBadge,
72
+ ha as Statistic,
73
+ Ca as StatusBadge,
74
+ Fa as StepTabs,
75
+ Ba as Stepper,
76
+ ya as Surface,
77
+ wa as SurfaceRow,
78
+ fa as Swatch,
79
+ xa as Table,
80
+ Aa as Tabs,
81
+ La as Tag,
82
+ ba as TextArea,
83
+ Pa as ThemeScope,
84
+ ka as Toggle,
85
+ va as Toolbar,
86
+ Da as Tooltip,
87
+ Ma as TruncatedTooltip,
88
+ za as Typography,
89
+ Ia as WizardLayout,
90
+ Ra as applyCustomTheme,
91
+ Na as applyDarkTheme,
92
+ Ga as applyLightTheme,
93
+ Ha as applyTheme,
94
+ Va as applyThemeVars,
95
+ Ea as buildActionBarMenuItems,
96
+ Ja as darkTheme,
97
+ Ka as defaultTheme,
98
+ ja as getCurrentTheme,
99
+ qa as getCurrentThemeMode,
100
+ Oa as initializeTheme,
101
+ Wa as resetTheme,
102
+ Qa as toggleTheme
101
103
  };
102
104
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackone/malachite",
3
- "version": "2.5.1",
3
+ "version": "2.7.0",
4
4
  "description": "StackOne's themeable React component library — Shadow DOM isolated, scoped Tailwind, theme-token driven.",
5
5
  "license": "MIT",
6
6
  "author": "StackOne",