@glyphui/ui 0.3.0 → 0.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.
Files changed (63) hide show
  1. package/README.md +65 -12
  2. package/dist/chart.d.ts +1 -1
  3. package/dist/chart.js +28 -19
  4. package/dist/color-mode-script-Bf7LYkOj.js +13 -0
  5. package/dist/color-mode-script-KdwItKN2.d.ts +16 -0
  6. package/dist/data-table.js +3 -3
  7. package/dist/{field-CWZ_FdkD.js → field-CVbywksE.js} +21 -6
  8. package/dist/{field-context-anGPYXbW.js → field-context-7I-cWvvS.js} +2 -2
  9. package/dist/form.d.ts +11 -4
  10. package/dist/form.js +34 -9
  11. package/dist/glyph-context-DxGJrdvr.d.ts +50 -0
  12. package/dist/{index-BWK4czIG.d.ts → index-Bi7rZ6ba.d.ts} +11 -0
  13. package/dist/index.d.ts +87 -80
  14. package/dist/index.js +155 -82
  15. package/dist/react-router.d.ts +18 -0
  16. package/dist/react-router.js +44 -0
  17. package/dist/{states-DR-OoDT-.js → states-IvhjBgna.js} +2 -2
  18. package/dist/{tv-DBAGlgXJ.js → tv-DLbT66dC.js} +13 -1
  19. package/dist/vite.d.ts +27 -0
  20. package/dist/vite.js +29 -0
  21. package/fonts.css +10 -0
  22. package/package.json +32 -5
  23. package/src/components/badge/badge.styles.ts +11 -16
  24. package/src/components/banner/banner.styles.ts +4 -4
  25. package/src/components/button/button.styles.ts +3 -1
  26. package/src/components/calendar/calendar.styles.ts +3 -2
  27. package/src/components/dropdown-menu/dropdown-menu.styles.ts +2 -2
  28. package/src/components/eyebrow/eyebrow.styles.ts +1 -1
  29. package/src/components/field/field-context.ts +2 -0
  30. package/src/components/field/field.styles.ts +4 -2
  31. package/src/components/field/field.tsx +25 -4
  32. package/src/components/file-upload/file-upload.styles.ts +3 -3
  33. package/src/components/link/link.styles.ts +1 -1
  34. package/src/components/modal/modal.styles.ts +2 -0
  35. package/src/components/modal/modal.tsx +30 -5
  36. package/src/components/navigation-menu/navigation-menu.tsx +14 -4
  37. package/src/components/password-input/password-input.styles.ts +3 -3
  38. package/src/components/prose/prose.tsx +1 -1
  39. package/src/components/scroll-area/scroll-area.tsx +23 -1
  40. package/src/components/segmented-control/segmented-control.tsx +17 -2
  41. package/src/components/slider/slider.tsx +9 -2
  42. package/src/components/stepper/stepper.styles.ts +2 -2
  43. package/src/components/tag-input/tag-input.styles.ts +1 -1
  44. package/src/components/text/text.styles.ts +4 -4
  45. package/src/integrations/react-router.tsx +39 -0
  46. package/src/integrations/vite.test-d.ts +6 -0
  47. package/src/integrations/vite.test.ts +28 -0
  48. package/src/integrations/vite.ts +33 -0
  49. package/src/internal/dev.ts +12 -0
  50. package/src/patterns/app-shell/app-shell.styles.ts +1 -1
  51. package/src/patterns/app-shell/navbar.tsx +34 -16
  52. package/src/patterns/app-shell/sidebar.tsx +7 -2
  53. package/src/patterns/chart/chart-parts.tsx +10 -2
  54. package/src/patterns/chart/chart.tsx +22 -5
  55. package/src/patterns/form/form.tsx +48 -6
  56. package/src/patterns/form/index.ts +1 -0
  57. package/src/provider/color-mode-script.ts +28 -0
  58. package/src/provider/color-mode.tsx +14 -20
  59. package/src/provider/glyph-context.ts +38 -0
  60. package/src/provider/glyph-provider.tsx +16 -4
  61. package/src/provider/index.ts +4 -0
  62. package/src/provider/theme-scope.tsx +7 -3
  63. package/styles.css +72 -0
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { n as tv, t as VariantProps } from "./tv-DuMh7UH2.js";
2
- import { a as IconButton, c as fieldStyles, i as ButtonProps, l as ButtonVariants, n as FieldProps, o as IconButtonProps, r as Button, s as FieldVariants, t as Field, u as buttonStyles } from "./index-BWK4czIG.js";
2
+ import { a as IconButton, c as fieldStyles, i as ButtonProps, l as ButtonVariants, n as FieldProps, o as IconButtonProps, r as Button, s as FieldVariants, t as Field, u as buttonStyles } from "./index-Bi7rZ6ba.js";
3
3
  import { t as StylesEntry } from "./registry-BGSJoiLq.js";
4
+ import { n as ColorModePreference, r as getColorModeScript, t as ColorModeOptions } from "./color-mode-script-KdwItKN2.js";
5
+ import { a as LinkComponentProps, c as useIsActive, i as LinkComponent, l as useLinkComponent, n as GlyphRouter, o as UseIsActive, r as IsActiveOptions, s as useGlyph, t as GlyphContextValue } from "./glyph-context-DxGJrdvr.js";
4
6
  import { ColorMode, ColorMode as ColorMode$1, ColorToken, ComponentName, ComponentOverrides, GlyphComponentRegistry, RadiusToken, ShadowToken, TextToken, Theme, Theme as Theme$1, ThemeInput, Tone, defineTheme, themeToCss, tokenVar } from "@glyphui/tokens";
5
7
  import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, ContextMenu as ContextMenu$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, HoverCard as HoverCard$1, Label as Label$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Switch as Switch$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, Tooltip as Tooltip$1, VisuallyHidden as VisuallyHidden$1 } from "radix-ui";
6
- import { ComponentProps, DependencyList, Dispatch, ElementType, MouseEvent, MouseEventHandler, ReactNode, SetStateAction } from "react";
8
+ import { ComponentProps, DependencyList, Dispatch, FormEvent, MouseEvent, ReactNode, SetStateAction } from "react";
7
9
  import { DateRange, DateRange as DateRange$1, DayPickerProps, Matcher, Matcher as Matcher$1 } from "react-day-picker";
8
10
  import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
9
11
  import { ClassValue } from "clsx";
@@ -578,7 +580,9 @@ interface SegmentedControlProps<T extends string> extends VariantProps<typeof se
578
580
  value?: T;
579
581
  defaultValue?: T;
580
582
  onValueChange?: (value: T) => void;
581
- 'aria-label': string;
583
+ /** Required unless the control sits in a `<Field label>`, which labels it. */
584
+ 'aria-label'?: string;
585
+ 'aria-labelledby'?: string;
582
586
  className?: string;
583
587
  id?: string;
584
588
  }
@@ -841,11 +845,11 @@ export declare const tableStyles: import("tailwind-variants").TVReturnType<{
841
845
  caption?: import("tailwind-variants").ClassValue;
842
846
  header?: import("tailwind-variants").ClassValue;
843
847
  body?: import("tailwind-variants").ClassValue;
844
- wrapper?: import("tailwind-variants").ClassValue;
845
- table?: import("tailwind-variants").ClassValue;
846
- row?: import("tailwind-variants").ClassValue;
847
848
  head?: import("tailwind-variants").ClassValue;
849
+ table?: import("tailwind-variants").ClassValue;
848
850
  cell?: import("tailwind-variants").ClassValue;
851
+ row?: import("tailwind-variants").ClassValue;
852
+ wrapper?: import("tailwind-variants").ClassValue;
849
853
  };
850
854
  };
851
855
  } | {
@@ -854,11 +858,11 @@ export declare const tableStyles: import("tailwind-variants").TVReturnType<{
854
858
  caption?: import("tailwind-variants").ClassValue;
855
859
  header?: import("tailwind-variants").ClassValue;
856
860
  body?: import("tailwind-variants").ClassValue;
857
- wrapper?: import("tailwind-variants").ClassValue;
858
- table?: import("tailwind-variants").ClassValue;
859
- row?: import("tailwind-variants").ClassValue;
860
861
  head?: import("tailwind-variants").ClassValue;
862
+ table?: import("tailwind-variants").ClassValue;
861
863
  cell?: import("tailwind-variants").ClassValue;
864
+ row?: import("tailwind-variants").ClassValue;
865
+ wrapper?: import("tailwind-variants").ClassValue;
862
866
  };
863
867
  };
864
868
  } | {}, {
@@ -876,11 +880,11 @@ export declare const tableStyles: import("tailwind-variants").TVReturnType<{
876
880
  caption?: import("tailwind-variants").ClassValue;
877
881
  header?: import("tailwind-variants").ClassValue;
878
882
  body?: import("tailwind-variants").ClassValue;
879
- wrapper?: import("tailwind-variants").ClassValue;
880
- table?: import("tailwind-variants").ClassValue;
881
- row?: import("tailwind-variants").ClassValue;
882
883
  head?: import("tailwind-variants").ClassValue;
884
+ table?: import("tailwind-variants").ClassValue;
883
885
  cell?: import("tailwind-variants").ClassValue;
886
+ row?: import("tailwind-variants").ClassValue;
887
+ wrapper?: import("tailwind-variants").ClassValue;
884
888
  };
885
889
  };
886
890
  } | {}, {
@@ -1288,9 +1292,9 @@ export declare const sidebarStyles: import("tailwind-variants").TVReturnType<{
1288
1292
  root?: import("tailwind-variants").ClassValue;
1289
1293
  footer?: import("tailwind-variants").ClassValue;
1290
1294
  header?: import("tailwind-variants").ClassValue;
1291
- item?: import("tailwind-variants").ClassValue;
1292
1295
  content?: import("tailwind-variants").ClassValue;
1293
1296
  section?: import("tailwind-variants").ClassValue;
1297
+ item?: import("tailwind-variants").ClassValue;
1294
1298
  sectionLabel?: import("tailwind-variants").ClassValue;
1295
1299
  itemIcon?: import("tailwind-variants").ClassValue;
1296
1300
  itemLabel?: import("tailwind-variants").ClassValue;
@@ -1303,9 +1307,9 @@ export declare const sidebarStyles: import("tailwind-variants").TVReturnType<{
1303
1307
  root?: import("tailwind-variants").ClassValue;
1304
1308
  footer?: import("tailwind-variants").ClassValue;
1305
1309
  header?: import("tailwind-variants").ClassValue;
1306
- item?: import("tailwind-variants").ClassValue;
1307
1310
  content?: import("tailwind-variants").ClassValue;
1308
1311
  section?: import("tailwind-variants").ClassValue;
1312
+ item?: import("tailwind-variants").ClassValue;
1309
1313
  sectionLabel?: import("tailwind-variants").ClassValue;
1310
1314
  itemIcon?: import("tailwind-variants").ClassValue;
1311
1315
  itemLabel?: import("tailwind-variants").ClassValue;
@@ -1329,9 +1333,9 @@ export declare const sidebarStyles: import("tailwind-variants").TVReturnType<{
1329
1333
  root?: import("tailwind-variants").ClassValue;
1330
1334
  footer?: import("tailwind-variants").ClassValue;
1331
1335
  header?: import("tailwind-variants").ClassValue;
1332
- item?: import("tailwind-variants").ClassValue;
1333
1336
  content?: import("tailwind-variants").ClassValue;
1334
1337
  section?: import("tailwind-variants").ClassValue;
1338
+ item?: import("tailwind-variants").ClassValue;
1335
1339
  sectionLabel?: import("tailwind-variants").ClassValue;
1336
1340
  itemIcon?: import("tailwind-variants").ClassValue;
1337
1341
  itemLabel?: import("tailwind-variants").ClassValue;
@@ -2202,9 +2206,9 @@ export declare const breadcrumbStyles: import("tailwind-variants").TVReturnType<
2202
2206
  [key: string]: import("tailwind-variants").ClassValue | {
2203
2207
  root?: import("tailwind-variants").ClassValue;
2204
2208
  link?: import("tailwind-variants").ClassValue;
2205
- item?: import("tailwind-variants").ClassValue;
2206
2209
  list?: import("tailwind-variants").ClassValue;
2207
2210
  separator?: import("tailwind-variants").ClassValue;
2211
+ item?: import("tailwind-variants").ClassValue;
2208
2212
  page?: import("tailwind-variants").ClassValue;
2209
2213
  };
2210
2214
  };
@@ -2213,9 +2217,9 @@ export declare const breadcrumbStyles: import("tailwind-variants").TVReturnType<
2213
2217
  [x: string]: import("tailwind-variants").ClassValue | {
2214
2218
  root?: import("tailwind-variants").ClassValue;
2215
2219
  link?: import("tailwind-variants").ClassValue;
2216
- item?: import("tailwind-variants").ClassValue;
2217
2220
  list?: import("tailwind-variants").ClassValue;
2218
2221
  separator?: import("tailwind-variants").ClassValue;
2222
+ item?: import("tailwind-variants").ClassValue;
2219
2223
  page?: import("tailwind-variants").ClassValue;
2220
2224
  };
2221
2225
  };
@@ -2231,9 +2235,9 @@ export declare const breadcrumbStyles: import("tailwind-variants").TVReturnType<
2231
2235
  [key: string]: import("tailwind-variants").ClassValue | {
2232
2236
  root?: import("tailwind-variants").ClassValue;
2233
2237
  link?: import("tailwind-variants").ClassValue;
2234
- item?: import("tailwind-variants").ClassValue;
2235
2238
  list?: import("tailwind-variants").ClassValue;
2236
2239
  separator?: import("tailwind-variants").ClassValue;
2240
+ item?: import("tailwind-variants").ClassValue;
2237
2241
  page?: import("tailwind-variants").ClassValue;
2238
2242
  };
2239
2243
  };
@@ -2650,16 +2654,16 @@ export declare const collapsibleStyles: import("tailwind-variants").TVReturnType
2650
2654
  [key: string]: {
2651
2655
  [key: string]: import("tailwind-variants").ClassValue | {
2652
2656
  root?: import("tailwind-variants").ClassValue;
2653
- trigger?: import("tailwind-variants").ClassValue;
2654
2657
  content?: import("tailwind-variants").ClassValue;
2658
+ trigger?: import("tailwind-variants").ClassValue;
2655
2659
  };
2656
2660
  };
2657
2661
  } | {
2658
2662
  [x: string]: {
2659
2663
  [x: string]: import("tailwind-variants").ClassValue | {
2660
2664
  root?: import("tailwind-variants").ClassValue;
2661
- trigger?: import("tailwind-variants").ClassValue;
2662
2665
  content?: import("tailwind-variants").ClassValue;
2666
+ trigger?: import("tailwind-variants").ClassValue;
2663
2667
  };
2664
2668
  };
2665
2669
  } | {}, {
@@ -2670,8 +2674,8 @@ export declare const collapsibleStyles: import("tailwind-variants").TVReturnType
2670
2674
  [key: string]: {
2671
2675
  [key: string]: import("tailwind-variants").ClassValue | {
2672
2676
  root?: import("tailwind-variants").ClassValue;
2673
- trigger?: import("tailwind-variants").ClassValue;
2674
2677
  content?: import("tailwind-variants").ClassValue;
2678
+ trigger?: import("tailwind-variants").ClassValue;
2675
2679
  };
2676
2680
  };
2677
2681
  } | {}, {
@@ -2897,12 +2901,12 @@ export declare const commandMenuStyles: import("tailwind-variants").TVReturnType
2897
2901
  [key: string]: import("tailwind-variants").ClassValue | {
2898
2902
  root?: import("tailwind-variants").ClassValue;
2899
2903
  search?: import("tailwind-variants").ClassValue;
2900
- group?: import("tailwind-variants").ClassValue;
2901
2904
  input?: import("tailwind-variants").ClassValue;
2902
- item?: import("tailwind-variants").ClassValue;
2905
+ group?: import("tailwind-variants").ClassValue;
2903
2906
  content?: import("tailwind-variants").ClassValue;
2904
2907
  list?: import("tailwind-variants").ClassValue;
2905
2908
  separator?: import("tailwind-variants").ClassValue;
2909
+ item?: import("tailwind-variants").ClassValue;
2906
2910
  overlay?: import("tailwind-variants").ClassValue;
2907
2911
  itemIcon?: import("tailwind-variants").ClassValue;
2908
2912
  itemLabel?: import("tailwind-variants").ClassValue;
@@ -2915,12 +2919,12 @@ export declare const commandMenuStyles: import("tailwind-variants").TVReturnType
2915
2919
  [x: string]: import("tailwind-variants").ClassValue | {
2916
2920
  root?: import("tailwind-variants").ClassValue;
2917
2921
  search?: import("tailwind-variants").ClassValue;
2918
- group?: import("tailwind-variants").ClassValue;
2919
2922
  input?: import("tailwind-variants").ClassValue;
2920
- item?: import("tailwind-variants").ClassValue;
2923
+ group?: import("tailwind-variants").ClassValue;
2921
2924
  content?: import("tailwind-variants").ClassValue;
2922
2925
  list?: import("tailwind-variants").ClassValue;
2923
2926
  separator?: import("tailwind-variants").ClassValue;
2927
+ item?: import("tailwind-variants").ClassValue;
2924
2928
  overlay?: import("tailwind-variants").ClassValue;
2925
2929
  itemIcon?: import("tailwind-variants").ClassValue;
2926
2930
  itemLabel?: import("tailwind-variants").ClassValue;
@@ -2947,12 +2951,12 @@ export declare const commandMenuStyles: import("tailwind-variants").TVReturnType
2947
2951
  [key: string]: import("tailwind-variants").ClassValue | {
2948
2952
  root?: import("tailwind-variants").ClassValue;
2949
2953
  search?: import("tailwind-variants").ClassValue;
2950
- group?: import("tailwind-variants").ClassValue;
2951
2954
  input?: import("tailwind-variants").ClassValue;
2952
- item?: import("tailwind-variants").ClassValue;
2955
+ group?: import("tailwind-variants").ClassValue;
2953
2956
  content?: import("tailwind-variants").ClassValue;
2954
2957
  list?: import("tailwind-variants").ClassValue;
2955
2958
  separator?: import("tailwind-variants").ClassValue;
2959
+ item?: import("tailwind-variants").ClassValue;
2956
2960
  overlay?: import("tailwind-variants").ClassValue;
2957
2961
  itemIcon?: import("tailwind-variants").ClassValue;
2958
2962
  itemLabel?: import("tailwind-variants").ClassValue;
@@ -3671,6 +3675,8 @@ export declare function Eyebrow(inProps: EyebrowProps): import("react").JSX.Elem
3671
3675
  //#region src/components/field/field-context.d.ts
3672
3676
  interface FieldContextValue {
3673
3677
  id: string;
3678
+ /** Id of the visible label, for controls labelled by reference (aria-labelledby). */
3679
+ labelId: string | undefined;
3674
3680
  descriptionId: string | undefined;
3675
3681
  errorId: string | undefined;
3676
3682
  invalid: boolean;
@@ -3749,10 +3755,10 @@ export declare const fileUploadStyles: import("tailwind-variants").TVReturnType<
3749
3755
  icon?: import("tailwind-variants").ClassValue;
3750
3756
  root?: import("tailwind-variants").ClassValue;
3751
3757
  title?: import("tailwind-variants").ClassValue;
3752
- item?: import("tailwind-variants").ClassValue;
3753
- list?: import("tailwind-variants").ClassValue;
3754
3758
  progress?: import("tailwind-variants").ClassValue;
3759
+ list?: import("tailwind-variants").ClassValue;
3755
3760
  hint?: import("tailwind-variants").ClassValue;
3761
+ item?: import("tailwind-variants").ClassValue;
3756
3762
  highlight?: import("tailwind-variants").ClassValue;
3757
3763
  rejections?: import("tailwind-variants").ClassValue;
3758
3764
  fileIcon?: import("tailwind-variants").ClassValue;
@@ -3770,10 +3776,10 @@ export declare const fileUploadStyles: import("tailwind-variants").TVReturnType<
3770
3776
  icon?: import("tailwind-variants").ClassValue;
3771
3777
  root?: import("tailwind-variants").ClassValue;
3772
3778
  title?: import("tailwind-variants").ClassValue;
3773
- item?: import("tailwind-variants").ClassValue;
3774
- list?: import("tailwind-variants").ClassValue;
3775
3779
  progress?: import("tailwind-variants").ClassValue;
3780
+ list?: import("tailwind-variants").ClassValue;
3776
3781
  hint?: import("tailwind-variants").ClassValue;
3782
+ item?: import("tailwind-variants").ClassValue;
3777
3783
  highlight?: import("tailwind-variants").ClassValue;
3778
3784
  rejections?: import("tailwind-variants").ClassValue;
3779
3785
  fileIcon?: import("tailwind-variants").ClassValue;
@@ -3808,10 +3814,10 @@ export declare const fileUploadStyles: import("tailwind-variants").TVReturnType<
3808
3814
  icon?: import("tailwind-variants").ClassValue;
3809
3815
  root?: import("tailwind-variants").ClassValue;
3810
3816
  title?: import("tailwind-variants").ClassValue;
3811
- item?: import("tailwind-variants").ClassValue;
3812
- list?: import("tailwind-variants").ClassValue;
3813
3817
  progress?: import("tailwind-variants").ClassValue;
3818
+ list?: import("tailwind-variants").ClassValue;
3814
3819
  hint?: import("tailwind-variants").ClassValue;
3820
+ item?: import("tailwind-variants").ClassValue;
3815
3821
  highlight?: import("tailwind-variants").ClassValue;
3816
3822
  rejections?: import("tailwind-variants").ClassValue;
3817
3823
  fileIcon?: import("tailwind-variants").ClassValue;
@@ -4278,7 +4284,7 @@ interface LinkProps extends Omit<ComponentProps<'a'>, 'href'>, LinkVariants {
4278
4284
  export declare function Link(inProps: LinkProps): import("react").JSX.Element;
4279
4285
  //#endregion
4280
4286
  //#region src/components/modal/modal.d.ts
4281
- interface ModalProps extends Omit<DialogContentProps, 'title' | 'children'> {
4287
+ interface ModalProps extends Omit<DialogContentProps, 'title' | 'children' | 'onSubmit'> {
4282
4288
  open?: boolean;
4283
4289
  defaultOpen?: boolean;
4284
4290
  onOpenChange?: (open: boolean) => void;
@@ -4291,6 +4297,12 @@ interface ModalProps extends Omit<DialogContentProps, 'title' | 'children'> {
4291
4297
  footer?: ReactNode;
4292
4298
  /** Close when the backdrop is clicked. Default true. */
4293
4299
  closeOnOverlayClick?: boolean;
4300
+ /**
4301
+ * Turns the body and footer into one `<form>`, so a `type="submit"` button in the footer
4302
+ * submits the fields in the body. The page does not reload. With `@glyphui/ui/form`, use
4303
+ * `<Form>` in the body and `<FormSubmit form={form}>` in the footer instead.
4304
+ */
4305
+ onSubmit?: (event: FormEvent<HTMLFormElement>) => void;
4294
4306
  children?: ReactNode;
4295
4307
  }
4296
4308
  /**
@@ -4310,6 +4322,7 @@ export declare const modalStyles: import("tailwind-variants").TVReturnType<{
4310
4322
  header?: import("tailwind-variants").ClassValue;
4311
4323
  body?: import("tailwind-variants").ClassValue;
4312
4324
  content?: import("tailwind-variants").ClassValue;
4325
+ form?: import("tailwind-variants").ClassValue;
4313
4326
  };
4314
4327
  };
4315
4328
  } | {
@@ -4319,6 +4332,7 @@ export declare const modalStyles: import("tailwind-variants").TVReturnType<{
4319
4332
  header?: import("tailwind-variants").ClassValue;
4320
4333
  body?: import("tailwind-variants").ClassValue;
4321
4334
  content?: import("tailwind-variants").ClassValue;
4335
+ form?: import("tailwind-variants").ClassValue;
4322
4336
  };
4323
4337
  };
4324
4338
  } | {}, {
@@ -4326,6 +4340,8 @@ export declare const modalStyles: import("tailwind-variants").TVReturnType<{
4326
4340
  header: string;
4327
4341
  body: string;
4328
4342
  footer: string;
4343
+ /** Wraps body and footer when `onSubmit` is set; `contents` keeps the dialog layout. */
4344
+ form: string;
4329
4345
  }, undefined, {
4330
4346
  [key: string]: {
4331
4347
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -4333,6 +4349,7 @@ export declare const modalStyles: import("tailwind-variants").TVReturnType<{
4333
4349
  header?: import("tailwind-variants").ClassValue;
4334
4350
  body?: import("tailwind-variants").ClassValue;
4335
4351
  content?: import("tailwind-variants").ClassValue;
4352
+ form?: import("tailwind-variants").ClassValue;
4336
4353
  };
4337
4354
  };
4338
4355
  } | {}, {
@@ -4340,11 +4357,15 @@ export declare const modalStyles: import("tailwind-variants").TVReturnType<{
4340
4357
  header: string;
4341
4358
  body: string;
4342
4359
  footer: string;
4360
+ /** Wraps body and footer when `onSubmit` is set; `contents` keeps the dialog layout. */
4361
+ form: string;
4343
4362
  }, import("tailwind-variants").TVReturnTypeLike<unknown, {
4344
4363
  content: string;
4345
4364
  header: string;
4346
4365
  body: string;
4347
4366
  footer: string;
4367
+ /** Wraps body and footer when `onSubmit` is set; `contents` keeps the dialog layout. */
4368
+ form: string;
4348
4369
  }>>;
4349
4370
  declare module '@glyphui/tokens' {
4350
4371
  interface GlyphComponentRegistry {
@@ -4371,8 +4392,11 @@ interface NavigationMenuLinkProps extends Omit<ComponentProps<typeof NavigationM
4371
4392
  /** Rendered through the provider's `linkComponent`, so it uses your router. */
4372
4393
  href?: string;
4373
4394
  }
4374
- /** A top-level link (no panel). Set `active` for the current page. */
4375
- export declare function NavigationMenuLink({ href, className, children, ...props }: NavigationMenuLinkProps): import("react").JSX.Element;
4395
+ /**
4396
+ * A top-level link (no panel). Marked active automatically from the provider's `router`;
4397
+ * set `active` to override.
4398
+ */
4399
+ export declare function NavigationMenuLink({ href, active: activeProp, className, children, ...props }: NavigationMenuLinkProps): import("react").JSX.Element;
4376
4400
  interface NavigationMenuCardProps {
4377
4401
  href: string;
4378
4402
  title: ReactNode;
@@ -4390,11 +4414,11 @@ export declare const navigationMenuStyles: import("tailwind-variants").TVReturnT
4390
4414
  root?: import("tailwind-variants").ClassValue;
4391
4415
  card?: import("tailwind-variants").ClassValue;
4392
4416
  link?: import("tailwind-variants").ClassValue;
4417
+ content?: import("tailwind-variants").ClassValue;
4418
+ list?: import("tailwind-variants").ClassValue;
4393
4419
  item?: import("tailwind-variants").ClassValue;
4394
4420
  viewport?: import("tailwind-variants").ClassValue;
4395
4421
  trigger?: import("tailwind-variants").ClassValue;
4396
- content?: import("tailwind-variants").ClassValue;
4397
- list?: import("tailwind-variants").ClassValue;
4398
4422
  chevron?: import("tailwind-variants").ClassValue;
4399
4423
  viewportWrapper?: import("tailwind-variants").ClassValue;
4400
4424
  cardIcon?: import("tailwind-variants").ClassValue;
@@ -4409,11 +4433,11 @@ export declare const navigationMenuStyles: import("tailwind-variants").TVReturnT
4409
4433
  root?: import("tailwind-variants").ClassValue;
4410
4434
  card?: import("tailwind-variants").ClassValue;
4411
4435
  link?: import("tailwind-variants").ClassValue;
4436
+ content?: import("tailwind-variants").ClassValue;
4437
+ list?: import("tailwind-variants").ClassValue;
4412
4438
  item?: import("tailwind-variants").ClassValue;
4413
4439
  viewport?: import("tailwind-variants").ClassValue;
4414
4440
  trigger?: import("tailwind-variants").ClassValue;
4415
- content?: import("tailwind-variants").ClassValue;
4416
- list?: import("tailwind-variants").ClassValue;
4417
4441
  chevron?: import("tailwind-variants").ClassValue;
4418
4442
  viewportWrapper?: import("tailwind-variants").ClassValue;
4419
4443
  cardIcon?: import("tailwind-variants").ClassValue;
@@ -4443,11 +4467,11 @@ export declare const navigationMenuStyles: import("tailwind-variants").TVReturnT
4443
4467
  root?: import("tailwind-variants").ClassValue;
4444
4468
  card?: import("tailwind-variants").ClassValue;
4445
4469
  link?: import("tailwind-variants").ClassValue;
4470
+ content?: import("tailwind-variants").ClassValue;
4471
+ list?: import("tailwind-variants").ClassValue;
4446
4472
  item?: import("tailwind-variants").ClassValue;
4447
4473
  viewport?: import("tailwind-variants").ClassValue;
4448
4474
  trigger?: import("tailwind-variants").ClassValue;
4449
- content?: import("tailwind-variants").ClassValue;
4450
- list?: import("tailwind-variants").ClassValue;
4451
4475
  chevron?: import("tailwind-variants").ClassValue;
4452
4476
  viewportWrapper?: import("tailwind-variants").ClassValue;
4453
4477
  cardIcon?: import("tailwind-variants").ClassValue;
@@ -5322,9 +5346,9 @@ export declare const scrollAreaStyles: import("tailwind-variants").TVReturnType<
5322
5346
  [key: string]: {
5323
5347
  [key: string]: import("tailwind-variants").ClassValue | {
5324
5348
  root?: import("tailwind-variants").ClassValue;
5325
- viewport?: import("tailwind-variants").ClassValue;
5326
5349
  thumb?: import("tailwind-variants").ClassValue;
5327
5350
  scrollbar?: import("tailwind-variants").ClassValue;
5351
+ viewport?: import("tailwind-variants").ClassValue;
5328
5352
  corner?: import("tailwind-variants").ClassValue;
5329
5353
  };
5330
5354
  };
@@ -5332,9 +5356,9 @@ export declare const scrollAreaStyles: import("tailwind-variants").TVReturnType<
5332
5356
  [x: string]: {
5333
5357
  [x: string]: import("tailwind-variants").ClassValue | {
5334
5358
  root?: import("tailwind-variants").ClassValue;
5335
- viewport?: import("tailwind-variants").ClassValue;
5336
5359
  thumb?: import("tailwind-variants").ClassValue;
5337
5360
  scrollbar?: import("tailwind-variants").ClassValue;
5361
+ viewport?: import("tailwind-variants").ClassValue;
5338
5362
  corner?: import("tailwind-variants").ClassValue;
5339
5363
  };
5340
5364
  };
@@ -5348,9 +5372,9 @@ export declare const scrollAreaStyles: import("tailwind-variants").TVReturnType<
5348
5372
  [key: string]: {
5349
5373
  [key: string]: import("tailwind-variants").ClassValue | {
5350
5374
  root?: import("tailwind-variants").ClassValue;
5351
- viewport?: import("tailwind-variants").ClassValue;
5352
5375
  thumb?: import("tailwind-variants").ClassValue;
5353
5376
  scrollbar?: import("tailwind-variants").ClassValue;
5377
+ viewport?: import("tailwind-variants").ClassValue;
5354
5378
  corner?: import("tailwind-variants").ClassValue;
5355
5379
  };
5356
5380
  };
@@ -5575,7 +5599,9 @@ interface SliderProps<V extends SliderValue> {
5575
5599
  name?: string;
5576
5600
  id?: string;
5577
5601
  className?: string;
5602
+ /** Accessible name. Inside a `Field`, the field's label is used when this is not set. */
5578
5603
  'aria-label'?: string;
5604
+ 'aria-labelledby'?: string;
5579
5605
  'aria-describedby'?: string;
5580
5606
  'aria-invalid'?: boolean;
5581
5607
  /** Accessible names for range thumbs. Default: "Minimum", "Maximum". */
@@ -6646,7 +6672,10 @@ export declare function useAppShell(): AppShellContextValue;
6646
6672
  interface NavLink {
6647
6673
  label: ReactNode;
6648
6674
  href: string;
6675
+ /** Marks the current page. Computed from the provider's `router` when not set. */
6649
6676
  active?: boolean;
6677
+ /** With automatic matching, only the exact path is active (not its children). */
6678
+ end?: boolean;
6650
6679
  }
6651
6680
  interface NavbarProps extends Omit<ComponentProps<'header'>, 'children'> {
6652
6681
  brand: ReactNode;
@@ -6691,12 +6720,15 @@ interface SidebarItemProps {
6691
6720
  icon?: ReactNode;
6692
6721
  /** Count or short status shown at the end. */
6693
6722
  badge?: ReactNode;
6723
+ /** Marks the current page. Computed from the provider's `router` when not set. */
6694
6724
  active?: boolean;
6725
+ /** With automatic matching, only the exact path is active (not its children). */
6726
+ end?: boolean;
6695
6727
  onClick?: (event: MouseEvent<HTMLElement>) => void;
6696
6728
  className?: string;
6697
6729
  children: ReactNode;
6698
6730
  }
6699
- export declare function SidebarItem({ href, icon, badge, active, onClick, className, children }: SidebarItemProps): import("react").JSX.Element;
6731
+ export declare function SidebarItem({ href, icon, badge, active: activeProp, end, onClick, className, children }: SidebarItemProps): import("react").JSX.Element;
6700
6732
  export declare function SidebarFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
6701
6733
  /** Collapses the sidebar on desktop; opens the navigation drawer on mobile. */
6702
6734
  export declare function SidebarTrigger(props: Partial<IconButtonProps>): import("react").JSX.Element | null;
@@ -6741,7 +6773,6 @@ export declare function Async<T>({ result, children, isEmpty, loading, empty, er
6741
6773
  export declare function useAsync<T>(fn: () => Promise<T>, deps: DependencyList): AsyncResult<T>;
6742
6774
  //#endregion
6743
6775
  //#region src/provider/color-mode.d.ts
6744
- type ColorModePreference = ColorMode$1 | 'system';
6745
6776
  interface ColorModeContextValue {
6746
6777
  /** What the user chose. */
6747
6778
  mode: ColorModePreference;
@@ -6749,12 +6780,6 @@ interface ColorModeContextValue {
6749
6780
  resolvedMode: ColorMode$1;
6750
6781
  setMode: (mode: ColorModePreference) => void;
6751
6782
  }
6752
- interface ColorModeOptions {
6753
- /** Used when nothing is stored yet. */
6754
- defaultMode?: ColorModePreference;
6755
- /** localStorage key. Set to `null` to disable persistence. */
6756
- storageKey?: string | null;
6757
- }
6758
6783
  export declare function ColorModeProvider({ children, defaultMode, storageKey }: ColorModeOptions & {
6759
6784
  children: ReactNode;
6760
6785
  }): import("react").JSX.Element;
@@ -6764,33 +6789,9 @@ export declare function useColorMode(): ColorModeContextValue;
6764
6789
  * Inline script that sets `data-mode` on `<html>` before first paint, so a dark-mode
6765
6790
  * visitor never sees a light flash. Put it in `<head>`.
6766
6791
  */
6767
- export declare function getColorModeScript({ defaultMode, storageKey }?: ColorModeOptions): string;
6768
6792
  /** `<script>` element version of `getColorModeScript` for SSR frameworks. */
6769
6793
  export declare function ColorModeScript(props: ColorModeOptions): import("react").JSX.Element;
6770
6794
  //#endregion
6771
- //#region src/provider/glyph-context.d.ts
6772
- /** Props Glyph passes to your router's link component. */
6773
- interface LinkComponentProps {
6774
- href: string;
6775
- className?: string;
6776
- children?: ReactNode;
6777
- onClick?: MouseEventHandler<HTMLAnchorElement>;
6778
- 'aria-current'?: 'page' | undefined;
6779
- }
6780
- /**
6781
- * Any component that renders a link from these props. Plain `'a'` by default.
6782
- * React Router: `({ href, ...props }) => <Link to={href} {...props} />`
6783
- */
6784
- type LinkComponent = ElementType<LinkComponentProps>;
6785
- interface GlyphContextValue {
6786
- theme: Theme$1;
6787
- linkComponent: LinkComponent;
6788
- }
6789
- /** The active theme and app-level settings. Must be used under `GlyphProvider`. */
6790
- export declare function useGlyph(): GlyphContextValue;
6791
- /** The router-aware link component configured on `GlyphProvider`. */
6792
- export declare function useLinkComponent(): LinkComponent;
6793
- //#endregion
6794
6795
  //#region src/provider/glyph-provider.d.ts
6795
6796
  interface GlyphProviderProps {
6796
6797
  children: ReactNode;
@@ -6800,7 +6801,13 @@ interface GlyphProviderProps {
6800
6801
  defaultMode?: ColorModePreference;
6801
6802
  /** localStorage key for the user's color mode. `null` disables persistence. */
6802
6803
  storageKey?: string | null;
6803
- /** Your router's link, used by Navbar, Sidebar and other navigation components. */
6804
+ /**
6805
+ * Your router: its link component, plus an optional `useIsActive` hook that marks the
6806
+ * current page in Sidebar, Navbar and NavigationMenu. React Router:
6807
+ * `import { reactRouter } from '@glyphui/ui/react-router'`.
6808
+ */
6809
+ router?: GlyphRouter;
6810
+ /** Your router's link only. Prefer `router`, which also handles active items. */
6804
6811
  linkComponent?: LinkComponent;
6805
6812
  /**
6806
6813
  * Mounts a themed `<Toaster />` so `toast()` works anywhere. `true` for defaults, or pass
@@ -6809,7 +6816,7 @@ interface GlyphProviderProps {
6809
6816
  toaster?: boolean | ToasterProps;
6810
6817
  }
6811
6818
  /** Provides the theme, color mode, tooltips, `useConfirm()` and (optionally) toasts. Render once at the root. */
6812
- export declare function GlyphProvider({ children, theme, defaultMode, storageKey, linkComponent, toaster }: GlyphProviderProps): import("react").JSX.Element;
6819
+ export declare function GlyphProvider({ children, theme, defaultMode, storageKey, router, linkComponent, toaster }: GlyphProviderProps): import("react").JSX.Element;
6813
6820
  //#endregion
6814
6821
  //#region src/provider/theme-scope.d.ts
6815
6822
  interface ThemeScopeProps extends ComponentProps<'div'> {
@@ -6846,4 +6853,4 @@ type PresetName = keyof typeof presets;
6846
6853
  /** Joins class names and resolves Tailwind conflicts (last one wins). */
6847
6854
  export declare function cn(...inputs: ClassValue[]): string;
6848
6855
  //#endregion
6849
- export { type AccordionProps, type AccordionVariants, type AlertDialogActionProps, type AlertDialogContentProps, type AlertProps, type AlertVariants, type AppShellContextValue, type AppShellProps, type AspectRatioProps, type AsyncProps, type AsyncResult, type AsyncStatus, type AvatarProps, type AvatarVariants, type BadgeProps, type BadgeVariants, type BannerProps, type BannerVariants, type BlockquoteProps, type BreadcrumbItemData, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariants, type CalendarProps, type CardProps, type CardTitleProps, type CardVariants, type CarouselApi, type CarouselOptions, type CarouselPlugin, type CarouselProps, type CarouselVariants, type ClassValue, type CodeBlockProps, type CodeBlockVariants, type ColorMode, type ColorModeContextValue, type ColorModeOptions, type ColorModePreference, type ColorToken, type ComboboxOption, type ComboboxProps, type ComboboxVariants, type CommandItemProps, type CommandMenuProps, type ComponentOverrides, type ConfirmFn, type ConfirmOptions, type ContainerProps, type ContextMenuItemProps, type ContextMenuSubTriggerProps, type ContextMenuVariants, type CopyButtonProps, type DatePickerProps, type DatePickerVariants, type DateRange, type DateRangePickerProps, type DateRangePreset, type DescriptionItemProps, type DescriptionListProps, type DescriptionListVariants, type DialogContentProps, type DialogVariants, type DropdownMenuItemProps, type DropdownMenuSubTriggerProps, type DropdownMenuVariants, type ErrorStateProps, type EyebrowProps, type EyebrowVariants, Field, type FieldContextValue, type FieldProps, type FieldVariants, type FileItem, type FileRejection, type FileRejectionReason, type FileUploadProps, type GlyphContextValue, type GlyphProviderProps, type GridCols, type GridProps, type HeadingProps, type HeadingVariants, IconButton, type IconButtonProps, type InputOTPProps, type InputOTPSlotProps, type InputOTPVariants, type InputProps, type InputVariants, type LinkComponent, type LinkComponentProps, type LinkProps, type LinkVariants, type LoadingStateProps, type Matcher, type ModalProps, type NavLink, type NavbarProps, type NavigationMenuCardProps, type NavigationMenuLinkProps, type NavigationMenuProps, type NumberInputProps, type NumberInputVariants, type PageHeaderProps, type PaginationItem, type PaginationProps, type PaginationVariants, type PasswordInputProps, type PasswordStrength, type PopoverContentProps, type PresetName, type ProgressCircleProps, type ProgressCircleVariants, type ProgressProps, type ProgressVariants, type ProseProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupVariants, type RadiusToken, type ResizableHandleProps, type ResizablePanelGroupProps, type ResizablePanelProps, type ResizableVariants, type ScrollAreaProps, type SectionProps, type SegmentedControlProps, type SegmentedOption, type SelectItemProps, type SelectProps, type ShadowToken, type SheetContentProps, type SheetVariants, type SidebarItemProps, type SidebarSectionProps, type SliderMark, type SliderProps, type SliderValue, type SliderVariants, type SlotClasses, type SpinnerProps, type SpinnerVariants, type StackProps, type StatCardProps, type StatCardVariants, type StateProps, type StepStatus, type StepperProps, type StepperStep, type StepperVariants, type SwitchProps, type TabsProps, type TagInputProps, type TagInputVariants, type TextProps, type TextToken, type TextVariants, type Theme, type ThemeInput, type ThemeScopeProps, type TimelineItemData, type TimelineItemProps, type TimelineProps, type TimelineVariants, type ToasterProps, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleVariants, type Tone, type TooltipProps, type TreeNode, type TreeViewProps, type TreeViewVariants, type VariantProps, buttonStyles, defineTheme, fieldStyles, themeToCss, toast, tokenVar, tv };
6856
+ export { type AccordionProps, type AccordionVariants, type AlertDialogActionProps, type AlertDialogContentProps, type AlertProps, type AlertVariants, type AppShellContextValue, type AppShellProps, type AspectRatioProps, type AsyncProps, type AsyncResult, type AsyncStatus, type AvatarProps, type AvatarVariants, type BadgeProps, type BadgeVariants, type BannerProps, type BannerVariants, type BlockquoteProps, type BreadcrumbItemData, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariants, type CalendarProps, type CardProps, type CardTitleProps, type CardVariants, type CarouselApi, type CarouselOptions, type CarouselPlugin, type CarouselProps, type CarouselVariants, type ClassValue, type CodeBlockProps, type CodeBlockVariants, type ColorMode, type ColorModeContextValue, type ColorModeOptions, type ColorModePreference, type ColorToken, type ComboboxOption, type ComboboxProps, type ComboboxVariants, type CommandItemProps, type CommandMenuProps, type ComponentOverrides, type ConfirmFn, type ConfirmOptions, type ContainerProps, type ContextMenuItemProps, type ContextMenuSubTriggerProps, type ContextMenuVariants, type CopyButtonProps, type DatePickerProps, type DatePickerVariants, type DateRange, type DateRangePickerProps, type DateRangePreset, type DescriptionItemProps, type DescriptionListProps, type DescriptionListVariants, type DialogContentProps, type DialogVariants, type DropdownMenuItemProps, type DropdownMenuSubTriggerProps, type DropdownMenuVariants, type ErrorStateProps, type EyebrowProps, type EyebrowVariants, Field, type FieldContextValue, type FieldProps, type FieldVariants, type FileItem, type FileRejection, type FileRejectionReason, type FileUploadProps, type GlyphContextValue, type GlyphProviderProps, type GlyphRouter, type GridCols, type GridProps, type HeadingProps, type HeadingVariants, IconButton, type IconButtonProps, type InputOTPProps, type InputOTPSlotProps, type InputOTPVariants, type InputProps, type InputVariants, type IsActiveOptions, type LinkComponent, type LinkComponentProps, type LinkProps, type LinkVariants, type LoadingStateProps, type Matcher, type ModalProps, type NavLink, type NavbarProps, type NavigationMenuCardProps, type NavigationMenuLinkProps, type NavigationMenuProps, type NumberInputProps, type NumberInputVariants, type PageHeaderProps, type PaginationItem, type PaginationProps, type PaginationVariants, type PasswordInputProps, type PasswordStrength, type PopoverContentProps, type PresetName, type ProgressCircleProps, type ProgressCircleVariants, type ProgressProps, type ProgressVariants, type ProseProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupVariants, type RadiusToken, type ResizableHandleProps, type ResizablePanelGroupProps, type ResizablePanelProps, type ResizableVariants, type ScrollAreaProps, type SectionProps, type SegmentedControlProps, type SegmentedOption, type SelectItemProps, type SelectProps, type ShadowToken, type SheetContentProps, type SheetVariants, type SidebarItemProps, type SidebarSectionProps, type SliderMark, type SliderProps, type SliderValue, type SliderVariants, type SlotClasses, type SpinnerProps, type SpinnerVariants, type StackProps, type StatCardProps, type StatCardVariants, type StateProps, type StepStatus, type StepperProps, type StepperStep, type StepperVariants, type SwitchProps, type TabsProps, type TagInputProps, type TagInputVariants, type TextProps, type TextToken, type TextVariants, type Theme, type ThemeInput, type ThemeScopeProps, type TimelineItemData, type TimelineItemProps, type TimelineProps, type TimelineVariants, type ToasterProps, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleVariants, type Tone, type TooltipProps, type TreeNode, type TreeViewProps, type TreeViewVariants, type UseIsActive, type VariantProps, buttonStyles, defineTheme, fieldStyles, getColorModeScript, themeToCss, toast, tokenVar, tv, useGlyph, useIsActive, useLinkComponent };