@marwes-ui/react 1.3.0 → 1.4.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
@@ -1,12 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ThemeInput, ThemePreference, ThemeMode, FontLoadingConfig, ThemeVariableStrategy, ResolvedTheme, ButtonOptions, InputOptions, SelectOptions, SelectAppearance as SelectAppearance$1, SelectOption as SelectOption$1, TextareaOptions, RichTextOptions, InputOtpOptions, CurrencyCode, iconRegistry, IconSize, IconStrokeWidth, AvatarOptions, CheckboxProps as CheckboxProps$1, DividerOptions, DividerSize, DividerOrientation, SpinnerOptions, SkeletonOptions, SpacingOptions, SpacingSize, HeadingOptions, HeadingSize, ParagraphOptions, ParagraphSize, StatTileOptions, StatTileTrendDirection, StatTileTone, DatePickerOptions, DatePickerDevice, DatePickerDay, ToastOptions, ToastVariant, ToastIntent, ToastPlacement, TooltipOptions, IconNameType, RadioOptions, BadgeOptions, SwitchOptions, SliderOptions, TabOptions, DialogOptions } from '@marwes-ui/core';
3
- export { AvatarSize, AvatarType, BadgeVariant, ButtonAction, ButtonSize, ButtonVariant, Density, FontLoadingConfig, FontLoadingMode, FontLoadingOptions, IconName, MarwesThemeScriptOptions, MarwesThemeStyleOptions, MwAvailableFont, MwFontFallback, MwGoogleFontFamily, MwStyledTheme, MwThemeVarName, MwThemeVarNames, MwThemeVarReference, MwThemeVars, ResolvedTheme, SpacingSize, Spacings, SwitchSize, Theme, ThemeInput, ThemeMode, ThemeModeAttribute, ThemeModeRootTarget, ThemePreference, ThemeVariableStrategy, ToneName, createFontStack, mwAvailableFonts, mwFontFallbacks, mwGoogleFontFamilies, mwStyledTheme, mwThemeVarNames, mwThemeVars, mwVar } from '@marwes-ui/core';
2
+ import { ThemeInput, ThemePreference, ThemeMode, FontLoadingConfig, ThemeVariableStrategy, MwTheme, ResolvedTheme, ButtonOptions, IconName as IconName$1, SelectOptions, SelectAppearance as SelectAppearance$1, SelectOption as SelectOption$1, InputOptions, InputOtpOptions, TextareaOptions, RichTextOptions, CurrencyCode, iconRegistry, IconSize, IconStrokeWidth, AvatarOptions, DividerOptions, DividerSize, DividerOrientation, ContextMenuOptions, ContextMenuEntry, ContextMenuActionItem, BreadcrumbOptions, BreadcrumbItem, SpinnerOptions, SkeletonOptions, ProgressBarOptions, SpacingOptions, SpacingSize, HeadingOptions, HeadingSize, ParagraphOptions, ParagraphSize, TextOptions, TextVariant, TextAs, StatTileOptions, StatTileTrendDirection, StatTileTone, DatePickerOptions, DatePickerDevice, DatePickerDay, DrawerOptions, ToastOptions, ToastVariant, ToastIntent, ToastPlacement, TooltipOptions, IconNameType, BadgeOptions, BannerOptions, SwitchOptions, SliderOptions, TabOptions, SegmentedControlVariant, SegmentedControlSize, PaginationControlDisplay, PaginationGetItemAriaLabel, DialogOptions, CheckboxProps as CheckboxProps$1 } from '@marwes-ui/core';
3
+ export { AvatarSize, AvatarType, BadgeVariant, BannerVariant, BreadcrumbItem, ButtonAction, ButtonSize, ButtonVariant, ContextMenuActionItem, ContextMenuDividerItem, ContextMenuEntry, Density, DrawerPlacement, DrawerSize, FontLoadingConfig, FontLoadingMode, FontLoadingOptions, IconName, MarwesThemeScriptOptions, MarwesThemeStyleOptions, MwAvailableFont, MwFontFallback, MwGoogleFontFamily, MwStyledTheme, MwTheme, MwThemeMedia, MwThemeVarName, MwThemeVarNames, MwThemeVarReference, MwThemeVars, PersonalityName, ResolvedTheme, SpacingSize, Spacings, SwitchSize, TextAs, TextVariant, Theme, ThemeBreakpointName, ThemeBreakpoints, ThemeInput, ThemeMode, ThemeModeAttribute, ThemeModeRootTarget, ThemePreference, ThemeVariableStrategy, ToneName, createFontStack, createMwTheme, createMwThemeMedia, mwAvailableFonts, mwFontFallbacks, mwGoogleFontFamilies, mwStyledTheme, mwTheme, mwThemeVarNames, mwThemeVars, mwVar } from '@marwes-ui/core';
4
4
  import * as React from 'react';
5
5
  export { MarwesThemeScript, MarwesThemeScriptProps, MarwesThemeStyle, MarwesThemeStyleProps, createMarwesThemeScript, createMarwesThemeStyle } from './ssr.js';
6
6
 
7
7
  type ThemeTarget = "provider" | "html" | "body";
8
8
  type ThemeAttribute = "class" | "data-theme" | "data-mode";
9
9
 
10
+ type MarwesProviderChildren = React.ReactNode | ((mwTheme: MwTheme) => React.ReactNode);
10
11
  type MarwesProviderProps = {
11
12
  theme?: ThemeInput;
12
13
  defaultPreference?: ThemePreference;
@@ -22,7 +23,7 @@ type MarwesProviderProps = {
22
23
  attribute?: ThemeAttribute;
23
24
  disableTransitionOnChange?: boolean;
24
25
  variableStrategy?: ThemeVariableStrategy;
25
- children: React.ReactNode;
26
+ children: MarwesProviderChildren;
26
27
  };
27
28
  declare function MarwesProvider({ theme, defaultPreference, preference: controlledPreference, defaultMode, mode: controlledMode, fontLoading, onPreferenceChange, onModeChange, storageKey, enableSystem, target, attribute, disableTransitionOnChange, variableStrategy, children, }: MarwesProviderProps): react_jsx_runtime.JSX.Element;
28
29
 
@@ -48,6 +49,14 @@ type ButtonProps = ButtonOptions & {
48
49
  };
49
50
  declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
50
51
 
52
+ type IconButtonProps = Omit<ButtonProps, "children" | "hasVisibleText" | "iconLeft" | "iconOnly" | "iconRight"> & {
53
+ icon: IconName$1;
54
+ /** Accessible name — required for icon-only buttons. Prefer `label`; `ariaLabel` also accepted. */
55
+ label?: string;
56
+ ariaLabel?: string;
57
+ };
58
+ declare function IconButton(props: IconButtonProps): react_jsx_runtime.JSX.Element;
59
+
51
60
  /**
52
61
  * Purpose Components — Button
53
62
  *
@@ -107,34 +116,17 @@ declare function TextButton(props: TextButtonProps): react_jsx_runtime.JSX.Eleme
107
116
  type SuccessButtonProps = Omit<ButtonProps, "variant" | "as"> & {};
108
117
  declare function SuccessButton(props: SuccessButtonProps): react_jsx_runtime.JSX.Element;
109
118
 
110
- type InputProps = InputOptions & {
111
- onValueChange?: (value: string) => void;
112
- className?: string;
113
- };
114
- declare function Input(props: InputProps): react_jsx_runtime.JSX.Element;
115
-
116
119
  type SelectAppearance = SelectAppearance$1;
117
120
  type SelectOption = SelectOption$1;
118
121
  type SelectProps = SelectOptions & {
119
122
  onValueChange?: (value: string) => void;
120
123
  className?: string;
121
124
  };
122
- declare function Select(props: SelectProps): react_jsx_runtime.JSX.Element;
123
-
124
- type TextareaProps = TextareaOptions & {
125
- onValueChange?: (value: string) => void;
126
- className?: string;
127
- };
128
- declare function Textarea(props: TextareaProps): react_jsx_runtime.JSX.Element;
129
125
 
130
- type RichTextProps = RichTextOptions & {
126
+ type InputProps = InputOptions & {
131
127
  onValueChange?: (value: string) => void;
132
128
  className?: string;
133
129
  };
134
- declare const RichText: React.ForwardRefExoticComponent<RichTextOptions & {
135
- onValueChange?: (value: string) => void;
136
- className?: string;
137
- } & React.RefAttributes<HTMLDivElement>>;
138
130
 
139
131
  type InputFieldProps = {
140
132
  /** Optional: if omitted, we generate one via useId(). */
@@ -243,15 +235,46 @@ type InputFieldProps = {
243
235
  */
244
236
  declare function InputField(props: InputFieldProps): React.ReactElement;
245
237
 
238
+ /**
239
+ * Props for the bare `InputOtp` atom.
240
+ *
241
+ * The atom renders only the OTP cells + hidden input — no label, helper,
242
+ * or error region. Use `InputOtpField` for labeled forms; reach for the
243
+ * atom directly only when you need a custom layout.
244
+ */
246
245
  type InputOtpProps = Omit<InputOtpOptions, "describedBy"> & {
246
+ onValueChange?: (value: string) => void;
247
+ className?: string;
248
+ /** ID(s) of elements that describe the input. Pre-merged by `InputOtpField`. */
249
+ describedBy?: string;
250
+ };
251
+
252
+ type InputOtpFieldProps = {
253
+ /** Optional: if omitted, a stable id is generated via useId(). */
254
+ id?: string;
255
+ /** Field label (required for accessibility). */
247
256
  label: string;
257
+ /** Optional helper text shown below the cells. */
248
258
  helperText?: string;
259
+ /** Optional error message. */
249
260
  error?: string;
261
+ /** Props forwarded to the bare `InputOtp` atom. */
262
+ inputOtp?: Omit<InputOtpProps, "id" | "ariaLabel" | "ariaLabelledBy" | "describedBy">;
263
+ /** Additional aria-describedby IDs to merge with internal helper/error IDs. */
250
264
  ariaDescribedBy?: string;
251
- onValueChange?: (value: string) => void;
252
265
  className?: string;
253
266
  };
254
- declare function InputOtp(props: InputOtpProps): React.ReactElement;
267
+ /**
268
+ * InputOtpField (Molecule)
269
+ *
270
+ * Labeled wrapper around the `InputOtp` atom. Renders the visible label,
271
+ * the OTP cells (via the atom), and optional helper/error regions.
272
+ * Auto-wires `aria-labelledby` and `aria-describedby`.
273
+ *
274
+ * Replaces the old self-contained `InputOtp` field — use this anywhere
275
+ * you previously used `<InputOtp label={...} />`.
276
+ */
277
+ declare function InputOtpField(props: InputOtpFieldProps): React.ReactElement;
255
278
 
256
279
  type SelectFieldVariant = "default" | "date";
257
280
  type SelectFieldProps = {
@@ -265,16 +288,27 @@ type SelectFieldProps = {
265
288
  };
266
289
  declare function SelectField(props: SelectFieldProps): React.ReactElement;
267
290
 
291
+ type TextareaProps = TextareaOptions & {
292
+ onValueChange?: (value: string) => void;
293
+ className?: string;
294
+ };
295
+
268
296
  type TextareaFieldProps = {
269
297
  id?: string;
270
298
  label: string;
271
299
  helperText?: string;
300
+ counterText?: string;
272
301
  error?: string;
273
302
  textarea: TextareaProps;
274
303
  ariaDescribedBy?: string;
275
304
  };
276
305
  declare function TextareaField(props: TextareaFieldProps): React.ReactElement;
277
306
 
307
+ type RichTextProps = RichTextOptions & {
308
+ onValueChange?: (value: string) => void;
309
+ className?: string;
310
+ };
311
+
278
312
  type RichTextFieldProps = {
279
313
  id?: string;
280
314
  label: string;
@@ -620,10 +654,10 @@ type IconProps = {
620
654
  * Common props
621
655
  */
622
656
  className?: string;
623
- "aria-label"?: string;
657
+ ariaLabel?: string;
624
658
  decorative?: boolean;
625
659
  };
626
- declare function Icon({ name, size, strokeWidth, className, "aria-label": ariaLabel, decorative, }: IconProps): react_jsx_runtime.JSX.Element;
660
+ declare function Icon({ name, size, strokeWidth, className, ariaLabel, decorative }: IconProps): react_jsx_runtime.JSX.Element;
627
661
 
628
662
  interface AvatarProps extends AvatarOptions, Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
629
663
  dataAttributes?: Record<string, string>;
@@ -654,217 +688,6 @@ declare function PresenceAvatar(props: PresenceAvatarProps): React.ReactElement;
654
688
  type TeamAvatarGroupProps = AvatarGroupProps;
655
689
  declare function TeamAvatarGroup(props: TeamAvatarGroupProps): React.ReactElement;
656
690
 
657
- /**
658
- * React adapter for Marwes Checkbox.
659
- * - Renders a native <input type="checkbox"> using the core render kit.
660
- * - Applies strict a11y fields and CSS vars.
661
- * - Sets `indeterminate` via DOM property (not an HTML attribute).
662
- */
663
-
664
- type CheckboxProps = CheckboxProps$1 & {
665
- /**
666
- * Called with the next checked value when the user toggles the checkbox.
667
- * For indeterminate state: browser toggling typically results in `checked=true` and `indeterminate=false`
668
- * unless you keep controlling it.
669
- */
670
- onCheckedChange?: (checked: boolean) => void;
671
- /**
672
- * Escape hatch for consumers that want raw event access.
673
- * (Optional – keep if you want parity with other components.)
674
- */
675
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
676
- };
677
- /**
678
- * Checkbox (Atom)
679
- *
680
- * Low-level checkbox control built on a native `<input type="checkbox">`.
681
- * Use this when you need custom layout or when the label/description is handled
682
- * elsewhere (e.g. inside a list item, table row, or custom field wrapper).
683
- *
684
- * For most forms, prefer `CheckboxField`, which composes `Checkbox` with
685
- * label/description/error wiring and consistent spacing.
686
- *
687
- * Accessibility
688
- * - Provide **either** `ariaLabel` **or** `ariaLabelledBy` (or use `CheckboxField` which wires a `<label>`).
689
- * - Use `ariaDescribedBy` to connect supporting text (help/error).
690
- * - `indeterminate` is applied via a DOM property, not an HTML attribute.
691
- *
692
- * @example Basic (uncontrolled)
693
- * ```tsx
694
- * <Checkbox ariaLabel="Subscribe to updates" defaultChecked />
695
- * ```
696
- *
697
- * @example Controlled
698
- * ```tsx
699
- * const [checked, setChecked] = React.useState(false);
700
- *
701
- * <Checkbox
702
- * ariaLabel="Accept terms"
703
- * checked={checked}
704
- * onCheckedChange={setChecked}
705
- * />
706
- * ```
707
- *
708
- * @example Indeterminate (mixed)
709
- * ```tsx
710
- * const [checked, setChecked] = React.useState(false);
711
- * const [mixed, setMixed] = React.useState(true);
712
- *
713
- * <Checkbox
714
- * ariaLabel="Select all"
715
- * checked={checked}
716
- * indeterminate={mixed}
717
- * onCheckedChange={(next) => {
718
- * setMixed(false); // first interaction clears mixed state
719
- * setChecked(next);
720
- * }}
721
- * />
722
- * ```
723
- *
724
- * @example With external label + description
725
- * ```tsx
726
- * const id = "terms";
727
- * const descId = "terms-desc";
728
- *
729
- * <>
730
- * <div style={{ display: "flex", alignItems: "center", gap: 10 }}>
731
- * <Checkbox id={id} ariaDescribedBy={descId} />
732
- * <label htmlFor={id}>I accept the terms</label>
733
- * </div>
734
- * <div id={descId}>Required to continue.</div>
735
- * </>
736
- * ```
737
- */
738
- declare function Checkbox(props: CheckboxProps): React.ReactElement;
739
-
740
- type CheckboxFieldProps = {
741
- /** Optional: if omitted, we generate one via useId(). */
742
- id?: string;
743
- /** Field content (rendered by adapter). */
744
- label: React.ReactNode;
745
- description?: React.ReactNode;
746
- error?: React.ReactNode;
747
- /** Props forwarded to the Checkbox atom. */
748
- checkbox: CheckboxProps;
749
- /** Additional aria-describedby IDs to merge with internal description/error IDs. */
750
- ariaDescribedBy?: string;
751
- };
752
- /**
753
- * CheckboxField (Molecule) — Recommended
754
- *
755
- * A convenient, accessible wrapper around `Checkbox` that provides:
756
- * - a clickable `<label>` wired via `htmlFor`/`id`
757
- * - optional `description` and `error` regions
758
- * - automatic `aria-describedby` wiring (description + error + any external ids)
759
- * - automatic invalid state when `error` is present
760
- *
761
- * Use `CheckboxField` for most forms. Use `Checkbox` directly only when you need
762
- * a highly custom layout (tables, list rows, compound list items, etc.).
763
- *
764
- * Accessibility
765
- * - Generates a stable `id` via `useId()` when `id` is not provided.
766
- * - Always renders a real `<label>` element connected to the checkbox control.
767
- * - When `description` and/or `error` are present, it sets `aria-describedby`
768
- * on the checkbox to reference their ids.
769
- * - When `error` is present, the checkbox is marked invalid (aria-invalid via core).
770
- *
771
- * @example Minimal (recommended)
772
- * ```tsx
773
- * <CheckboxField
774
- * label="Subscribe to updates"
775
- * checkbox={{ defaultChecked: true }}
776
- * />
777
- * ```
778
- *
779
- * @example With description
780
- * ```tsx
781
- * <CheckboxField
782
- * label="Subscribe to updates"
783
- * description="We'll only email you about important product changes."
784
- * checkbox={{}}
785
- * />
786
- * ```
787
- *
788
- * @example With error (invalid state)
789
- * ```tsx
790
- * <CheckboxField
791
- * label="Accept terms"
792
- * error="You must accept the terms to continue."
793
- * checkbox={{ required: true }}
794
- * />
795
- * ```
796
- *
797
- * @example Controlled
798
- * ```tsx
799
- * const [checked, setChecked] = React.useState(false);
800
- *
801
- * <CheckboxField
802
- * label="Accept terms"
803
- * checkbox={{
804
- * checked,
805
- * onCheckedChange: setChecked,
806
- * }}
807
- * />
808
- * ```
809
- *
810
- * @example Indeterminate (mixed)
811
- * ```tsx
812
- * const [checked, setChecked] = React.useState(false);
813
- * const [mixed, setMixed] = React.useState(true);
814
- *
815
- * <CheckboxField
816
- * label="Select all"
817
- * description="Applies to all items in the current view."
818
- * checkbox={{
819
- * checked,
820
- * indeterminate: mixed,
821
- * onCheckedChange: (next) => {
822
- * setMixed(false);
823
- * setChecked(next);
824
- * },
825
- * }}
826
- * />
827
- * ```
828
- *
829
- * @example Custom describedBy (merge with internal description/error)
830
- * ```tsx
831
- * <CheckboxField
832
- * ariaDescribedBy="my-extra-help"
833
- * label="Enable telemetry"
834
- * description="Helps us improve the product."
835
- * checkbox={{}}
836
- * />
837
- *
838
- * <div id="my-extra-help">This setting can be changed later.</div>
839
- * ```
840
- */
841
- declare function CheckboxField(props: CheckboxFieldProps): React.ReactElement;
842
-
843
- interface CheckboxGroupFieldOption {
844
- value: string;
845
- label: React.ReactNode;
846
- disabled?: boolean;
847
- indeterminate?: boolean;
848
- }
849
- type CheckboxGroupFieldCheckboxProps = Omit<CheckboxProps, "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "checked" | "defaultChecked" | "disabled" | "id" | "indeterminate" | "invalid" | "name" | "onChange" | "onCheckedChange" | "required" | "value">;
850
- interface CheckboxGroupFieldProps {
851
- label: React.ReactNode;
852
- options: CheckboxGroupFieldOption[];
853
- description?: React.ReactNode;
854
- error?: React.ReactNode;
855
- value?: string[];
856
- onChange?: (value: string[]) => void;
857
- defaultValue?: string[];
858
- checkbox?: CheckboxGroupFieldCheckboxProps;
859
- disabled?: boolean;
860
- required?: boolean;
861
- name?: string;
862
- id?: string;
863
- ariaDescribedBy?: string;
864
- dataAttributes?: Record<string, string>;
865
- }
866
- declare function CheckboxGroupField(props: CheckboxGroupFieldProps): React.ReactElement;
867
-
868
691
  /**
869
692
  * React adapter for Marwes Divider component.
870
693
  * - Renders semantic <hr> using the core divider recipe.
@@ -948,6 +771,19 @@ declare const Divider: React.ForwardRefExoticComponent<DividerOptions & Omit<Rea
948
771
  style?: React.CSSProperties;
949
772
  } & React.RefAttributes<HTMLHRElement>>;
950
773
 
774
+ interface ContextMenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onSelect">, ContextMenuOptions {
775
+ items: readonly ContextMenuEntry[];
776
+ onSelect?: (value: string, item: ContextMenuActionItem) => void;
777
+ }
778
+ declare function ContextMenu(props: ContextMenuProps): React.ReactElement;
779
+
780
+ interface BreadcrumbProps extends Omit<React.HTMLAttributes<HTMLElement>, "children">, BreadcrumbOptions {
781
+ items: readonly BreadcrumbItem[];
782
+ onItemSelect?: (value: string, item: BreadcrumbItem, event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
783
+ onHomeClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
784
+ }
785
+ declare function Breadcrumb(props: BreadcrumbProps): React.ReactElement;
786
+
951
787
  interface SpinnerProps extends SpinnerOptions, Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
952
788
  dataAttributes?: Record<string, string>;
953
789
  }
@@ -956,8 +792,23 @@ declare function Spinner(props: SpinnerProps): React.ReactElement;
956
792
  type ButtonSpinnerProps = SpinnerProps & {
957
793
  inverted?: boolean;
958
794
  };
795
+ /**
796
+ * ButtonSpinner — purpose variant of Spinner for in-button loading states.
797
+ *
798
+ * Defaults (`variant="classic"`, `size="xs"`, `decorative=true`) are
799
+ * intentionally overridable: the `Button` atom forwards
800
+ * `loading.spinnerVariant` through this prop. If you want a different
801
+ * loading look, just override the prop; use the base `Spinner` directly
802
+ * only when you need to escape the button-loading data-attributes.
803
+ */
959
804
  declare function ButtonSpinner(props: ButtonSpinnerProps): React.ReactElement;
960
805
  type EmptyStateSpinnerProps = SpinnerProps;
806
+ /**
807
+ * EmptyStateSpinner — purpose variant of Spinner for empty/loading-state regions.
808
+ *
809
+ * Defaults (`variant="dots-round"`, `size="lg"`, `decorative=true`) are
810
+ * intentionally overridable — same rationale as `ButtonSpinner`.
811
+ */
961
812
  declare function EmptyStateSpinner(props: EmptyStateSpinnerProps): React.ReactElement;
962
813
 
963
814
  interface SkeletonProps extends SkeletonOptions, Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
@@ -965,6 +816,11 @@ interface SkeletonProps extends SkeletonOptions, Omit<React.HTMLAttributes<HTMLS
965
816
  }
966
817
  declare function Skeleton(props: SkeletonProps): React.ReactElement;
967
818
 
819
+ interface ProgressBarProps extends ProgressBarOptions, Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
820
+ dataAttributes?: Record<string, string>;
821
+ }
822
+ declare function ProgressBar(props: ProgressBarProps): React.ReactElement;
823
+
968
824
  /**
969
825
  * React adapter for Marwes Spacing component.
970
826
  * - Renders a decorative, aria-hidden div using the core spacing recipe.
@@ -1106,6 +962,13 @@ type H1Props = Omit<HeadingOptions, "level"> & {
1106
962
  * Semantic top-level heading rendered as `<h1>`.
1107
963
  * Supports visual size override for cases where semantic and visual hierarchy differ.
1108
964
  *
965
+ * @remarks
966
+ * Marwes officially styles H1-H3 only. For semantic H4-H6 (deep section
967
+ * nesting, accessibility outlines), render `<Text headingLevel={4..6}
968
+ * variant="..." />` — it produces the correct heading tag while letting
969
+ * the consumer pick the visual variant. Type your wrappers against
970
+ * `SemanticHeadingLevel` from `@marwes-ui/core`.
971
+ *
1109
972
  * @example Basic usage
1110
973
  * ```tsx
1111
974
  * <H1>Page Title</H1>
@@ -1155,6 +1018,10 @@ type H2Props = Omit<HeadingOptions, "level"> & {
1155
1018
  * Semantic section heading rendered as `<h2>`.
1156
1019
  * Supports visual size override for cases where semantic and visual hierarchy differ.
1157
1020
  *
1021
+ * @remarks
1022
+ * Marwes officially styles H1-H3 only. For semantic H4-H6, use
1023
+ * `<Text headingLevel={4..6} variant="..." />`.
1024
+ *
1158
1025
  * @example Basic usage
1159
1026
  * ```tsx
1160
1027
  * <H2>Section Title</H2>
@@ -1199,6 +1066,10 @@ type H3Props = Omit<HeadingOptions, "level"> & {
1199
1066
  * Semantic subsection heading rendered as `<h3>`.
1200
1067
  * Supports visual size override for cases where semantic and visual hierarchy differ.
1201
1068
  *
1069
+ * @remarks
1070
+ * Marwes officially styles H1-H3 only — H3 is the deepest blessed rung.
1071
+ * For H4-H6, use `<Text headingLevel={4..6} variant="..." />`.
1072
+ *
1202
1073
  * @example Basic usage
1203
1074
  * ```tsx
1204
1075
  * <H3>Subsection Title</H3>
@@ -1260,27 +1131,98 @@ type ParagraphProps = ParagraphOptions & {
1260
1131
  */
1261
1132
  declare function Paragraph(props: ParagraphProps): React.ReactElement;
1262
1133
 
1263
- interface StatTileProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "title">, Pick<StatTileOptions, "dataAttributes"> {
1264
- label: React.ReactNode;
1265
- value: React.ReactNode;
1266
- subtitle?: React.ReactNode;
1267
- trendValue?: React.ReactNode;
1268
- trendDirection?: StatTileTrendDirection;
1269
- tone?: StatTileTone;
1270
- }
1271
- declare function StatTile(props: StatTileProps): React.ReactElement;
1134
+ /**
1135
+ * React adapter for Marwes Text component.
1136
+ * - Renders non-heading typography styles without creating document outline.
1137
+ */
1272
1138
 
1273
- interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "onSelect">, Pick<DatePickerOptions, "monthLabel" | "weekdayLabels" | "weeks" | "previousYearLabel" | "previousMonthLabel" | "nextMonthLabel" | "nextYearLabel" | "cancelLabel" | "applyLabel" | "calendarLabel" | "dataAttributes"> {
1274
- device?: DatePickerDevice;
1275
- onPreviousYear?: () => void;
1276
- onPreviousMonth?: () => void;
1277
- onNextMonth?: () => void;
1278
- onNextYear?: () => void;
1279
- onDaySelect?: (day: DatePickerDay) => void;
1139
+ type TextProps = TextOptions & {
1140
+ /**
1141
+ * Visual typography variant.
1142
+ * @default "caption"
1143
+ */
1144
+ variant?: TextVariant;
1145
+ /**
1146
+ * Rendered HTML element.
1147
+ * @default "span"
1148
+ */
1149
+ as?: TextAs;
1150
+ /**
1151
+ * Content of the text node.
1152
+ */
1153
+ children?: React.ReactNode;
1154
+ /**
1155
+ * Additional CSS class names.
1156
+ */
1157
+ className?: string;
1158
+ /**
1159
+ * Inline styles.
1160
+ */
1161
+ style?: React.CSSProperties;
1162
+ };
1163
+ declare function Text(props: TextProps): React.ReactElement;
1164
+ type TextComponent = typeof Text;
1165
+ declare const TypographyText: typeof Text;
1166
+
1167
+ interface StatTileProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "title">, Pick<StatTileOptions, "dataAttributes"> {
1168
+ label: React.ReactNode;
1169
+ value: React.ReactNode;
1170
+ subtitle?: React.ReactNode;
1171
+ trendValue?: React.ReactNode;
1172
+ trendDirection?: StatTileTrendDirection;
1173
+ tone?: StatTileTone;
1174
+ }
1175
+ declare function StatTile(props: StatTileProps): React.ReactElement;
1176
+
1177
+ interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "onSelect">, Pick<DatePickerOptions, "monthLabel" | "weekdayLabels" | "weeks" | "previousYearLabel" | "previousMonthLabel" | "nextMonthLabel" | "nextYearLabel" | "cancelLabel" | "applyLabel" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "calendarLabel" | "dataAttributes"> {
1178
+ device?: DatePickerDevice;
1179
+ onPreviousYear?: () => void;
1180
+ onPreviousMonth?: () => void;
1181
+ onNextMonth?: () => void;
1182
+ onNextYear?: () => void;
1183
+ onDaySelect?: (day: DatePickerDay) => void;
1280
1184
  onCancel?: () => void;
1281
1185
  onApply?: () => void;
1282
1186
  }
1283
- declare function DatePicker(props: DatePickerProps): React.ReactElement;
1187
+
1188
+ type DatePickerFieldProps = {
1189
+ /** Optional: if omitted, a stable id is generated via useId(). */
1190
+ id?: string;
1191
+ /** Field label (required for accessibility). */
1192
+ label: string;
1193
+ /** Optional helper text shown below the calendar. */
1194
+ helperText?: string;
1195
+ /** Optional error message. */
1196
+ error?: string;
1197
+ /** Props forwarded to the DatePicker atom. */
1198
+ datePicker?: Omit<DatePickerProps, "ariaLabel" | "ariaLabelledBy" | "calendarLabel">;
1199
+ /** Additional aria-describedby IDs to merge with internal helper/error IDs. */
1200
+ ariaDescribedBy?: string;
1201
+ className?: string;
1202
+ };
1203
+ /**
1204
+ * DatePickerField (Molecule)
1205
+ *
1206
+ * A labeled wrapper around `DatePicker` that:
1207
+ * - renders a visible `<label>` wired via `aria-labelledby`
1208
+ * - generates a stable id via `useId()` when one isn't provided
1209
+ * - optionally renders helper text and error messages
1210
+ * - threads `aria-describedby` to the calendar when helper/error are present
1211
+ */
1212
+ declare function DatePickerField(props: DatePickerFieldProps): React.ReactElement;
1213
+
1214
+ interface DrawerProps extends DrawerOptions {
1215
+ id?: string;
1216
+ title?: React.ReactNode;
1217
+ description?: React.ReactNode;
1218
+ footer?: React.ReactNode;
1219
+ children?: React.ReactNode;
1220
+ onClose?: () => void;
1221
+ className?: string;
1222
+ panelClassName?: string;
1223
+ dataAttributes?: Record<string, string>;
1224
+ }
1225
+ declare function Drawer(props: DrawerProps): React.ReactElement;
1284
1226
 
1285
1227
  interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
1286
1228
  /** Optional title rendered above the body content */
@@ -1382,27 +1324,6 @@ interface TooltipGroupProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
1382
1324
  }
1383
1325
  declare function TooltipGroup(props: TooltipGroupProps): React.ReactElement;
1384
1326
 
1385
- /**
1386
- * React adapter for Marwes Accordion.
1387
- * - Renders a compound structure: wrapper div > trigger button + panel div.
1388
- * - id is optional; falls back to React.useId() for aria wiring.
1389
- */
1390
-
1391
- interface AccordionProps {
1392
- /** Unique id for aria wiring. Defaults to React.useId() when omitted. */
1393
- id?: string;
1394
- open?: boolean;
1395
- disabled?: boolean;
1396
- /** Content of the trigger button header */
1397
- title: React.ReactNode;
1398
- /** Content shown in the collapsible panel */
1399
- children: React.ReactNode;
1400
- className?: string;
1401
- /** Called when the trigger is clicked */
1402
- onToggle?: () => void;
1403
- }
1404
- declare function Accordion(props: AccordionProps): React.ReactElement;
1405
-
1406
1327
  /**
1407
1328
  * AccordionField (Molecule) — Recommended
1408
1329
  *
@@ -1575,95 +1496,6 @@ type SectionsAccordionProps = AccordionFieldProps;
1575
1496
  */
1576
1497
  declare function SectionsAccordion(props: SectionsAccordionProps): React.ReactElement;
1577
1498
 
1578
- /**
1579
- * React adapter for Marwes Radio.
1580
- * - Renders a native <input type="radio"> using the core render kit.
1581
- * - Applies strict a11y fields and modifier classes.
1582
- */
1583
-
1584
- type RadioProps = RadioOptions & {
1585
- /**
1586
- * Called with the next checked value when the user selects this radio.
1587
- * In a group, only the newly selected radio fires `true`.
1588
- */
1589
- onCheckedChange?: (checked: boolean) => void;
1590
- /** Raw event access escape hatch. */
1591
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
1592
- };
1593
- /**
1594
- * Radio (Atom)
1595
- *
1596
- * Low-level radio control built on a native `<input type="radio">`.
1597
- * Use this when you need custom layout or when the label/grouping is handled
1598
- * elsewhere (e.g. inside a list item, table row, or custom field wrapper).
1599
- *
1600
- * For most forms, prefer `RadioGroupField`, which composes `Radio` with
1601
- * group label/description/error wiring, selection state, and consistent spacing.
1602
- *
1603
- * **AI Context:**
1604
- * - Renders a native `<input type="radio">` using the core `radioRecipe`
1605
- * - Applies strict a11y attributes: `aria-label`, `aria-labelledby`, `aria-describedby`, `aria-invalid`
1606
- * - Supports controlled (`checked` + `onCheckedChange`) and uncontrolled (`defaultChecked`) modes
1607
- * - Modifier classes: `mw-radio`, `mw-radio--disabled`, `mw-radio--invalid`
1608
- *
1609
- * Accessibility:
1610
- * - Provide **either** `ariaLabel` **or** `ariaLabelledBy` (or wrap with a `<label htmlFor>`).
1611
- * - Use the same `name` attribute on all radios in a group for native keyboard navigation.
1612
- * - Use `ariaDescribedBy` to connect supporting text (help/error).
1613
- *
1614
- * @example Basic (uncontrolled)
1615
- * ```tsx
1616
- * <Radio ariaLabel="Option A" name="preference" defaultChecked />
1617
- * ```
1618
- *
1619
- * @example Controlled
1620
- * ```tsx
1621
- * const [selected, setSelected] = React.useState("a");
1622
- *
1623
- * <Radio
1624
- * name="color"
1625
- * value="a"
1626
- * checked={selected === "a"}
1627
- * onCheckedChange={(checked) => { if (checked) setSelected("a"); }}
1628
- * ariaLabel="Red"
1629
- * />
1630
- * ```
1631
- *
1632
- * @example With external label
1633
- * ```tsx
1634
- * const id = "opt-1";
1635
- *
1636
- * <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
1637
- * <Radio id={id} name="group" value="a" />
1638
- * <label htmlFor={id}>Option A</label>
1639
- * </div>
1640
- * ```
1641
- *
1642
- * @example In a group (manual)
1643
- * ```tsx
1644
- * const [selected, setSelected] = React.useState("a");
1645
- * const options = [
1646
- * { value: "a", label: "Option A" },
1647
- * { value: "b", label: "Option B" },
1648
- * ];
1649
- *
1650
- * <div role="radiogroup" aria-label="Preference">
1651
- * {options.map(({ value, label }) => (
1652
- * <label key={value}>
1653
- * <Radio
1654
- * name="preference"
1655
- * value={value}
1656
- * checked={selected === value}
1657
- * onCheckedChange={(checked) => { if (checked) setSelected(value); }}
1658
- * />
1659
- * {label}
1660
- * </label>
1661
- * ))}
1662
- * </div>
1663
- * ```
1664
- */
1665
- declare function Radio(props: RadioProps): React.ReactElement;
1666
-
1667
1499
  /**
1668
1500
  * RadioGroupField (Molecule) — Recommended
1669
1501
  *
@@ -1734,6 +1566,7 @@ declare function Radio(props: RadioProps): React.ReactElement;
1734
1566
  interface RadioGroupFieldOption {
1735
1567
  value: string;
1736
1568
  label: React.ReactNode;
1569
+ description?: React.ReactNode;
1737
1570
  disabled?: boolean;
1738
1571
  }
1739
1572
  interface RadioGroupFieldProps {
@@ -1992,6 +1825,68 @@ type NotificationBadgeProps = BadgeProps;
1992
1825
  */
1993
1826
  declare function NotificationBadge(props: NotificationBadgeProps): React.ReactElement;
1994
1827
 
1828
+ type BannerProps = BannerOptions & {
1829
+ /** Banner message content. */
1830
+ children?: React.ReactNode;
1831
+ /** Optional CTA/action content rendered in the action slot. */
1832
+ action?: React.ReactNode;
1833
+ /** Custom icon element. If omitted, a default status icon is rendered when showIcon is true. */
1834
+ icon?: React.ReactNode;
1835
+ /** Callback when the dismiss button is clicked. */
1836
+ onDismiss?: () => void;
1837
+ className?: string;
1838
+ id?: string;
1839
+ };
1840
+ declare function Banner(props: BannerProps): React.ReactElement;
1841
+
1842
+ /**
1843
+ * Purpose Components — Banner
1844
+ *
1845
+ * Thin semantic wrappers that preset the `variant` prop and emit
1846
+ * canonical `data-purpose` and `data-intent` metadata.
1847
+ */
1848
+
1849
+ type InfoBannerProps = Omit<BannerProps, "variant">;
1850
+ /**
1851
+ * InfoBanner - Informational page-level messages.
1852
+ *
1853
+ * @example
1854
+ * ```tsx
1855
+ * <InfoBanner>Your profile has been updated.</InfoBanner>
1856
+ * ```
1857
+ */
1858
+ declare function InfoBanner(props: InfoBannerProps): React.ReactElement;
1859
+ type SuccessBannerProps = Omit<BannerProps, "variant">;
1860
+ /**
1861
+ * SuccessBanner - Positive confirmation messages.
1862
+ *
1863
+ * @example
1864
+ * ```tsx
1865
+ * <SuccessBanner>Payment processed successfully.</SuccessBanner>
1866
+ * ```
1867
+ */
1868
+ declare function SuccessBanner(props: SuccessBannerProps): React.ReactElement;
1869
+ type WarningBannerProps = Omit<BannerProps, "variant">;
1870
+ /**
1871
+ * WarningBanner - Caution or upcoming deadline messages.
1872
+ *
1873
+ * @example
1874
+ * ```tsx
1875
+ * <WarningBanner>Your subscription expires in 3 days.</WarningBanner>
1876
+ * ```
1877
+ */
1878
+ declare function WarningBanner(props: WarningBannerProps): React.ReactElement;
1879
+ type ErrorBannerProps = Omit<BannerProps, "variant">;
1880
+ /**
1881
+ * ErrorBanner - Error or critical issue messages.
1882
+ *
1883
+ * @example
1884
+ * ```tsx
1885
+ * <ErrorBanner>Failed to save changes. Please try again.</ErrorBanner>
1886
+ * ```
1887
+ */
1888
+ declare function ErrorBanner(props: ErrorBannerProps): React.ReactElement;
1889
+
1995
1890
  type SwitchProps = SwitchOptions & {
1996
1891
  /** Label text rendered next to the toggle */
1997
1892
  children?: React.ReactNode;
@@ -2000,7 +1895,6 @@ type SwitchProps = SwitchOptions & {
2000
1895
  onCheckedChange?: (checked: boolean) => void;
2001
1896
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
2002
1897
  };
2003
- declare function Switch(props: SwitchProps): React.ReactElement;
2004
1898
 
2005
1899
  type SwitchFieldProps = {
2006
1900
  id?: string;
@@ -2027,12 +1921,6 @@ type SliderProps = SliderOptions & NativeSliderProps & {
2027
1921
  onValueChange?: (value: number) => void;
2028
1922
  onChange?: React.ChangeEventHandler<HTMLInputElement>;
2029
1923
  };
2030
- declare const Slider: React.ForwardRefExoticComponent<SliderOptions & NativeSliderProps & {
2031
- className?: string;
2032
- style?: React.CSSProperties;
2033
- onValueChange?: (value: number) => void;
2034
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
2035
- } & React.RefAttributes<HTMLInputElement>>;
2036
1924
 
2037
1925
  type SliderFieldLabelPosition = "top" | "inline";
2038
1926
  type SliderFieldProps = {
@@ -2113,6 +2001,125 @@ declare function ContentTabs(props: ContentTabsProps): React.ReactElement;
2113
2001
  type SettingsTabsProps = TabGroupProps;
2114
2002
  declare function SettingsTabs(props: SettingsTabsProps): React.ReactElement;
2115
2003
 
2004
+ /**
2005
+ * React adapter for Marwes SegmentedControl.
2006
+ * Single-select segmented toggle using radiogroup semantics.
2007
+ */
2008
+
2009
+ interface SegmentedControlItem<T extends string = string> {
2010
+ value: T;
2011
+ label?: React.ReactNode;
2012
+ icon?: React.ReactNode;
2013
+ disabled?: boolean;
2014
+ ariaLabel?: string;
2015
+ }
2016
+ interface SegmentedControlProps<T extends string = string> {
2017
+ items: SegmentedControlItem<T>[];
2018
+ value?: T;
2019
+ defaultValue?: T;
2020
+ onValueChange?: (value: T) => void;
2021
+ variant?: SegmentedControlVariant;
2022
+ size?: SegmentedControlSize;
2023
+ disabled?: boolean;
2024
+ ariaLabel?: string;
2025
+ ariaLabelledBy?: string;
2026
+ ariaDescribedBy?: string;
2027
+ /** Stretch the control to fill its container. Defaults to inline width. */
2028
+ fullWidth?: boolean;
2029
+ className?: string;
2030
+ id?: string;
2031
+ style?: React.CSSProperties;
2032
+ }
2033
+
2034
+ type SegmentedControlFieldProps<T extends string = string> = {
2035
+ /** Optional: if omitted, a stable id is generated via useId(). */
2036
+ id?: string;
2037
+ /** Field label (required for accessibility). */
2038
+ label: React.ReactNode;
2039
+ /** Optional description text shown below the label. */
2040
+ description?: React.ReactNode;
2041
+ /** Optional error message. */
2042
+ error?: React.ReactNode;
2043
+ /** Props forwarded to the SegmentedControl atom. */
2044
+ segmentedControl: Omit<SegmentedControlProps<T>, "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy">;
2045
+ /** Additional aria-describedby IDs to merge with internal description/error IDs. */
2046
+ ariaDescribedBy?: string;
2047
+ className?: string;
2048
+ };
2049
+ /**
2050
+ * SegmentedControlField (Molecule)
2051
+ *
2052
+ * A labeled wrapper around `SegmentedControl` that:
2053
+ * - renders a visible label wired via aria-labelledby
2054
+ * - generates a stable id with useId() when one isn't supplied
2055
+ * - optionally renders description and error regions
2056
+ * - threads aria-describedby to the radiogroup
2057
+ */
2058
+ declare function SegmentedControlField<T extends string = string>(props: SegmentedControlFieldProps<T>): React.ReactElement;
2059
+
2060
+ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange" | "children"> {
2061
+ pageCount: number;
2062
+ page?: number;
2063
+ defaultPage?: number;
2064
+ onPageChange?: (page: number) => void;
2065
+ siblingCount?: number;
2066
+ boundaryCount?: number;
2067
+ maxVisibleItems?: number;
2068
+ controlDisplay?: PaginationControlDisplay;
2069
+ adaptive?: boolean;
2070
+ showPrevNext?: boolean;
2071
+ showFirstLast?: boolean;
2072
+ disabled?: boolean;
2073
+ firstLabel?: string;
2074
+ previousLabel?: string;
2075
+ nextLabel?: string;
2076
+ lastLabel?: string;
2077
+ ariaLabel?: string;
2078
+ ariaLabelledBy?: string;
2079
+ ariaDescribedBy?: string;
2080
+ getItemAriaLabel?: PaginationGetItemAriaLabel;
2081
+ }
2082
+
2083
+ type PaginationFieldProps = {
2084
+ /** Optional: if omitted, a stable id is generated via useId(). */
2085
+ id?: string;
2086
+ /** Field label (required for accessibility). */
2087
+ label: React.ReactNode;
2088
+ /** Optional description text shown below the label. */
2089
+ description?: React.ReactNode;
2090
+ /** Optional error message. */
2091
+ error?: React.ReactNode;
2092
+ /** Props forwarded to the Pagination atom. */
2093
+ pagination: Omit<PaginationProps, "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy">;
2094
+ /** Additional aria-describedby IDs to merge with internal description/error IDs. */
2095
+ ariaDescribedBy?: string;
2096
+ className?: string;
2097
+ };
2098
+ /**
2099
+ * PaginationField (Molecule)
2100
+ *
2101
+ * A labeled wrapper around `Pagination` that:
2102
+ * - renders a visible label wired via aria-labelledby
2103
+ * - generates a stable id with useId() when one isn't supplied
2104
+ * - optionally renders description and error regions
2105
+ * - threads aria-describedby to the pagination nav
2106
+ */
2107
+ declare function PaginationField(props: PaginationFieldProps): React.ReactElement;
2108
+
2109
+ /**
2110
+ * React adapter for Marwes SkipLink.
2111
+ * Visually hidden anchor that becomes visible on focus, lets keyboard
2112
+ * users jump to a target landmark (typically <main>).
2113
+ */
2114
+
2115
+ interface SkipLinkProps {
2116
+ /** Anchor href, typically a fragment like "#main". */
2117
+ href: string;
2118
+ children: React.ReactNode;
2119
+ className?: string;
2120
+ }
2121
+ declare function SkipLink(props: SkipLinkProps): React.ReactElement;
2122
+
2116
2123
  interface DialogProps extends DialogOptions {
2117
2124
  id?: string;
2118
2125
  title?: React.ReactNode;
@@ -2128,6 +2135,8 @@ declare function Dialog(props: DialogProps): React.ReactElement;
2128
2135
  interface DialogFooterControls {
2129
2136
  close: () => void;
2130
2137
  }
2138
+ type DialogModalTone = "default" | "calm";
2139
+ type DialogModalDivider = "visible" | "hidden";
2131
2140
  interface DialogModalProps extends Omit<DialogProps, "footer" | "onClose"> {
2132
2141
  open?: boolean;
2133
2142
  defaultOpen?: boolean;
@@ -2137,6 +2146,9 @@ interface DialogModalProps extends Omit<DialogProps, "footer" | "onClose"> {
2137
2146
  restoreFocus?: boolean;
2138
2147
  portalTarget?: HTMLElement | null;
2139
2148
  overlayClassName?: string;
2149
+ surfaceWidth?: string | number;
2150
+ tone?: DialogModalTone;
2151
+ divider?: DialogModalDivider;
2140
2152
  footer?: React.ReactNode | ((controls: DialogFooterControls) => React.ReactNode);
2141
2153
  }
2142
2154
  declare function DialogModal(props: DialogModalProps): React.ReactElement | null;
@@ -2161,4 +2173,154 @@ type InfoDialogProps = Omit<DialogModalProps, "footer"> & {
2161
2173
  };
2162
2174
  declare function InfoDialog(props: InfoDialogProps): React.ReactElement;
2163
2175
 
2164
- export { Accordion, AccordionField, type AccordionFieldItem, type AccordionFieldProps, type AccordionProps, Avatar, AvatarBadge, type AvatarBadgeProps, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarProps, Badge, BadgeGroup, type BadgeGroupProps, type BadgeProps, BrightnessSlider, type BrightnessSliderProps, Button, type ButtonProps, ButtonSpinner, type ButtonSpinnerProps, CancelButton, type CancelButtonProps, Card, type CardProps, Checkbox, CheckboxField, type CheckboxFieldProps, CheckboxGroupField, type CheckboxGroupFieldOption, type CheckboxGroupFieldProps, type CheckboxProps, CloseButton, type CloseButtonProps, ConfirmButton, type ConfirmButtonProps, ConfirmDialog, type ConfirmDialogProps, ContentTabs, type ContentTabsProps, CopyButton, type CopyButtonProps, CreateButton, type CreateButtonProps, CurrencyField, type CurrencyFieldProps, DateOfBirthField, type DateOfBirthFieldProps, DatePicker, type DatePickerProps, DestructiveButton, type DestructiveButtonProps, DestructiveDialog, type DestructiveDialogProps, Dialog, type DialogFooterControls, DialogModal, type DialogModalProps, type DialogProps, Divider, type DividerProps, DownloadButton, type DownloadButtonProps, DropdownButton, type DropdownButtonProps, DropdownField, type DropdownFieldProps, EditButton, type EditButtonProps, EmailField, type EmailFieldProps, EmptyStateSpinner, type EmptyStateSpinnerProps, ErrorToast, type ErrorToastProps, FAQAccordion, type FAQAccordionProps, FeatureToggle, type FeatureToggleProps, FilterButton, type FilterButtonProps, H1, type H1Props, H2, type H2Props, H3, type H3Props, Icon, type IconProps, InfoDialog, type InfoDialogProps, InfoToast, type InfoToastProps, Input, InputField, type InputFieldProps, InputOtp, type InputOtpProps, type InputProps, LinkButton, type LinkButtonProps, type ManagedToast, MarwesProvider, type MarwesProviderProps, NavigationTabs, type NavigationTabsProps, NotificationBadge, type NotificationBadgeProps, OptionRadioGroup, type OptionRadioGroupProps, Paragraph, type ParagraphProps, PasswordField, type PasswordFieldProps, PermissionSwitch, type PermissionSwitchProps, PhoneField, type PhoneFieldProps, PreferenceSwitch, type PreferenceSwitchProps, PresenceAvatar, type PresenceAvatarProps, PrimaryButton, type PrimaryButtonProps, PriorityBadge, type PriorityBadgeProps, ProductCard, type ProductCardProps, ProfileAvatar, type ProfileAvatarProps, ProfileCard, type ProfileCardProps, Radio, RadioGroupField, type RadioGroupFieldOption, type RadioGroupFieldProps, type RadioProps, RadiusSlider, type RadiusSliderProps, RatingRadioGroup, type RatingRadioGroupProps, RefreshButton, type RefreshButtonProps, RichText, RichTextField, type RichTextFieldProps, type RichTextProps, SaveButton, type SaveButtonProps, SearchButton, type SearchButtonProps, SearchField, type SearchFieldProps, SecondaryButton, type SecondaryButtonProps, SectionsAccordion, type SectionsAccordionProps, Select, type SelectAppearance, SelectField, type SelectFieldProps, type SelectOption, type SelectProps, SettingsAccordion, type SettingsAccordionProps, SettingsTabs, type SettingsTabsProps, type ShowToastOptions, Skeleton, type SkeletonProps, Slider, SliderField, type SliderFieldProps, type SliderProps, SortButton, type SortButtonProps, Spacer, type SpacerProps, Spacing, type SpacingProps, Spinner, type SpinnerProps, StatCard, type StatCardProps, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, SubmitButton, type SubmitButtonProps, SuccessButton, type SuccessButtonProps, SuccessToast, type SuccessToastProps, Switch, SwitchField, type SwitchFieldProps, type SwitchProps, Tab, TabGroup, type TabGroupItem, type TabGroupProps, TabPanel, type TabPanelProps, type TabProps, TeamAvatarGroup, type TeamAvatarGroupProps, TextButton, type TextButtonProps, Textarea, TextareaField, type TextareaFieldProps, type TextareaProps, type ThemeModeContextValue, Toast, ToastContainer, type ToastContainerProps, type ToastController, type ToastProps, ToastProvider, type ToastProviderProps, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipProps, URLField, type URLFieldProps, UploadButton, type UploadButtonProps, VerifyButton, type VerifyButtonProps, VolumeSlider, type VolumeSliderProps, WarningToast, type WarningToastProps, YesNoRadioGroup, type YesNoRadioGroupProps, ZipCodeField, type ZipCodeFieldProps, useTheme, useThemeMode, useToast };
2176
+ /**
2177
+ * React adapter for Marwes Checkbox.
2178
+ * - Renders a native <input type="checkbox"> using the core render kit.
2179
+ * - Applies strict a11y fields and CSS vars.
2180
+ * - Sets `indeterminate` via DOM property (not an HTML attribute).
2181
+ */
2182
+
2183
+ type CheckboxProps = CheckboxProps$1 & {
2184
+ /**
2185
+ * Called with the next checked value when the user toggles the checkbox.
2186
+ * For indeterminate state: browser toggling typically results in `checked=true` and `indeterminate=false`
2187
+ * unless you keep controlling it.
2188
+ */
2189
+ onCheckedChange?: (checked: boolean) => void;
2190
+ /**
2191
+ * Escape hatch for consumers that want raw event access.
2192
+ * (Optional – keep if you want parity with other components.)
2193
+ */
2194
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
2195
+ };
2196
+
2197
+ type CheckboxFieldProps = {
2198
+ /** Optional: if omitted, we generate one via useId(). */
2199
+ id?: string;
2200
+ /** Field content (rendered by adapter). */
2201
+ label: React.ReactNode;
2202
+ description?: React.ReactNode;
2203
+ error?: React.ReactNode;
2204
+ /** Props forwarded to the Checkbox atom. */
2205
+ checkbox: CheckboxProps;
2206
+ /** Additional aria-describedby IDs to merge with internal description/error IDs. */
2207
+ ariaDescribedBy?: string;
2208
+ };
2209
+ /**
2210
+ * CheckboxField (Molecule) — Recommended
2211
+ *
2212
+ * A convenient, accessible wrapper around `Checkbox` that provides:
2213
+ * - a clickable `<label>` wired via `htmlFor`/`id`
2214
+ * - optional `description` and `error` regions
2215
+ * - automatic `aria-describedby` wiring (description + error + any external ids)
2216
+ * - automatic invalid state when `error` is present
2217
+ *
2218
+ * Use `CheckboxField` for most forms. Use `Checkbox` directly only when you need
2219
+ * a highly custom layout (tables, list rows, compound list items, etc.).
2220
+ *
2221
+ * Accessibility
2222
+ * - Generates a stable `id` via `useId()` when `id` is not provided.
2223
+ * - Always renders a real `<label>` element connected to the checkbox control.
2224
+ * - When `description` and/or `error` are present, it sets `aria-describedby`
2225
+ * on the checkbox to reference their ids.
2226
+ * - When `error` is present, the checkbox is marked invalid (aria-invalid via core).
2227
+ *
2228
+ * @example Minimal (recommended)
2229
+ * ```tsx
2230
+ * <CheckboxField
2231
+ * label="Subscribe to updates"
2232
+ * checkbox={{ defaultChecked: true }}
2233
+ * />
2234
+ * ```
2235
+ *
2236
+ * @example With description
2237
+ * ```tsx
2238
+ * <CheckboxField
2239
+ * label="Subscribe to updates"
2240
+ * description="We'll only email you about important product changes."
2241
+ * checkbox={{}}
2242
+ * />
2243
+ * ```
2244
+ *
2245
+ * @example With error (invalid state)
2246
+ * ```tsx
2247
+ * <CheckboxField
2248
+ * label="Accept terms"
2249
+ * error="You must accept the terms to continue."
2250
+ * checkbox={{ required: true }}
2251
+ * />
2252
+ * ```
2253
+ *
2254
+ * @example Controlled
2255
+ * ```tsx
2256
+ * const [checked, setChecked] = React.useState(false);
2257
+ *
2258
+ * <CheckboxField
2259
+ * label="Accept terms"
2260
+ * checkbox={{
2261
+ * checked,
2262
+ * onCheckedChange: setChecked,
2263
+ * }}
2264
+ * />
2265
+ * ```
2266
+ *
2267
+ * @example Indeterminate (mixed)
2268
+ * ```tsx
2269
+ * const [checked, setChecked] = React.useState(false);
2270
+ * const [mixed, setMixed] = React.useState(true);
2271
+ *
2272
+ * <CheckboxField
2273
+ * label="Select all"
2274
+ * description="Applies to all items in the current view."
2275
+ * checkbox={{
2276
+ * checked,
2277
+ * indeterminate: mixed,
2278
+ * onCheckedChange: (next) => {
2279
+ * setMixed(false);
2280
+ * setChecked(next);
2281
+ * },
2282
+ * }}
2283
+ * />
2284
+ * ```
2285
+ *
2286
+ * @example Custom describedBy (merge with internal description/error)
2287
+ * ```tsx
2288
+ * <CheckboxField
2289
+ * ariaDescribedBy="my-extra-help"
2290
+ * label="Enable telemetry"
2291
+ * description="Helps us improve the product."
2292
+ * checkbox={{}}
2293
+ * />
2294
+ *
2295
+ * <div id="my-extra-help">This setting can be changed later.</div>
2296
+ * ```
2297
+ */
2298
+ declare function CheckboxField(props: CheckboxFieldProps): React.ReactElement;
2299
+
2300
+ interface CheckboxGroupFieldOption {
2301
+ value: string;
2302
+ label: React.ReactNode;
2303
+ description?: React.ReactNode;
2304
+ disabled?: boolean;
2305
+ indeterminate?: boolean;
2306
+ }
2307
+ type CheckboxGroupFieldCheckboxProps = Omit<CheckboxProps, "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "checked" | "defaultChecked" | "disabled" | "id" | "indeterminate" | "invalid" | "name" | "onChange" | "onCheckedChange" | "required" | "value">;
2308
+ interface CheckboxGroupFieldProps {
2309
+ label: React.ReactNode;
2310
+ options: CheckboxGroupFieldOption[];
2311
+ description?: React.ReactNode;
2312
+ error?: React.ReactNode;
2313
+ value?: string[];
2314
+ onChange?: (value: string[]) => void;
2315
+ defaultValue?: string[];
2316
+ checkbox?: CheckboxGroupFieldCheckboxProps;
2317
+ disabled?: boolean;
2318
+ required?: boolean;
2319
+ name?: string;
2320
+ id?: string;
2321
+ ariaDescribedBy?: string;
2322
+ dataAttributes?: Record<string, string>;
2323
+ }
2324
+ declare function CheckboxGroupField(props: CheckboxGroupFieldProps): React.ReactElement;
2325
+
2326
+ export { AccordionField, type AccordionFieldItem, type AccordionFieldProps, Avatar, AvatarBadge, type AvatarBadgeProps, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarProps, Badge, BadgeGroup, type BadgeGroupProps, type BadgeProps, Banner, type BannerProps, Breadcrumb, type BreadcrumbProps, BrightnessSlider, type BrightnessSliderProps, Button, type ButtonProps, ButtonSpinner, type ButtonSpinnerProps, CancelButton, type CancelButtonProps, Card, type CardProps, CheckboxField, type CheckboxFieldProps, CheckboxGroupField, type CheckboxGroupFieldOption, type CheckboxGroupFieldProps, CloseButton, type CloseButtonProps, ConfirmButton, type ConfirmButtonProps, ConfirmDialog, type ConfirmDialogProps, ContentTabs, type ContentTabsProps, ContextMenu, type ContextMenuProps, CopyButton, type CopyButtonProps, CreateButton, type CreateButtonProps, CurrencyField, type CurrencyFieldProps, DateOfBirthField, type DateOfBirthFieldProps, DatePickerField, type DatePickerFieldProps, DestructiveButton, type DestructiveButtonProps, DestructiveDialog, type DestructiveDialogProps, Dialog, type DialogFooterControls, DialogModal, type DialogModalProps, type DialogProps, Divider, type DividerProps, DownloadButton, type DownloadButtonProps, Drawer, type DrawerProps, DropdownButton, type DropdownButtonProps, DropdownField, type DropdownFieldProps, EditButton, type EditButtonProps, EmailField, type EmailFieldProps, EmptyStateSpinner, type EmptyStateSpinnerProps, ErrorBanner, type ErrorBannerProps, ErrorToast, type ErrorToastProps, FAQAccordion, type FAQAccordionProps, FeatureToggle, type FeatureToggleProps, FilterButton, type FilterButtonProps, H1, type H1Props, H2, type H2Props, H3, type H3Props, Icon, IconButton, type IconButtonProps, type IconProps, InfoBanner, type InfoBannerProps, InfoDialog, type InfoDialogProps, InfoToast, type InfoToastProps, InputField, type InputFieldProps, InputOtpField, type InputOtpFieldProps, LinkButton, type LinkButtonProps, type ManagedToast, MarwesProvider, type MarwesProviderChildren, type MarwesProviderProps, NavigationTabs, type NavigationTabsProps, NotificationBadge, type NotificationBadgeProps, OptionRadioGroup, type OptionRadioGroupProps, PaginationField, type PaginationFieldProps, Paragraph, type ParagraphProps, PasswordField, type PasswordFieldProps, PermissionSwitch, type PermissionSwitchProps, PhoneField, type PhoneFieldProps, PreferenceSwitch, type PreferenceSwitchProps, PresenceAvatar, type PresenceAvatarProps, PrimaryButton, type PrimaryButtonProps, PriorityBadge, type PriorityBadgeProps, ProductCard, type ProductCardProps, ProfileAvatar, type ProfileAvatarProps, ProfileCard, type ProfileCardProps, ProgressBar, type ProgressBarProps, RadioGroupField, type RadioGroupFieldOption, type RadioGroupFieldProps, RadiusSlider, type RadiusSliderProps, RatingRadioGroup, type RatingRadioGroupProps, RefreshButton, type RefreshButtonProps, RichTextField, type RichTextFieldProps, SaveButton, type SaveButtonProps, SearchButton, type SearchButtonProps, SearchField, type SearchFieldProps, SecondaryButton, type SecondaryButtonProps, SectionsAccordion, type SectionsAccordionProps, SegmentedControlField, type SegmentedControlFieldProps, type SegmentedControlItem, type SelectAppearance, SelectField, type SelectFieldProps, type SelectFieldVariant, type SelectOption, SettingsAccordion, type SettingsAccordionProps, SettingsTabs, type SettingsTabsProps, type ShowToastOptions, Skeleton, type SkeletonProps, SkipLink, type SkipLinkProps, SliderField, type SliderFieldProps, SortButton, type SortButtonProps, Spacer, type SpacerProps, Spacing, type SpacingProps, Spinner, type SpinnerProps, StatCard, type StatCardProps, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, SubmitButton, type SubmitButtonProps, SuccessBanner, type SuccessBannerProps, SuccessButton, type SuccessButtonProps, SuccessToast, type SuccessToastProps, SwitchField, type SwitchFieldProps, Tab, TabGroup, type TabGroupItem, type TabGroupProps, TabPanel, type TabPanelProps, type TabProps, TeamAvatarGroup, type TeamAvatarGroupProps, Text, TextButton, type TextButtonProps, type TextComponent, type TextProps, TextareaField, type TextareaFieldProps, type ThemeModeContextValue, Toast, ToastContainer, type ToastContainerProps, type ToastController, type ToastProps, ToastProvider, type ToastProviderProps, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipProps, TypographyText, URLField, type URLFieldProps, UploadButton, type UploadButtonProps, VerifyButton, type VerifyButtonProps, VolumeSlider, type VolumeSliderProps, WarningBanner, type WarningBannerProps, WarningToast, type WarningToastProps, YesNoRadioGroup, type YesNoRadioGroupProps, ZipCodeField, type ZipCodeFieldProps, useTheme, useThemeMode, useToast };