@gryt/ui 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,KAAK,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC3E,KAAK,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAyB1D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,EAAE,WAAW,CAAC;IACtE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,2GA6ClB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,KAAK,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC3E,KAAK,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAyB1D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,EAAE,WAAW,CAAC;IACtE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,2GAmDlB,CAAC"}
@@ -6,6 +6,15 @@ import { ComponentPropsWithoutRef } from 'react';
6
6
  * Menu's item.
7
7
  */
8
8
  export declare const listboxItemClass: string;
9
+ /**
10
+ * The typeahead input on both Combobox and Autocomplete.
11
+ *
12
+ * This is TextField's control, through the same shared constant, so the three
13
+ * places you can type in this library are the same shape. It used to be its own
14
+ * class list asking for `rounded-(--gryt-radius-input)` — a token that has never
15
+ * existed — so it rendered with square corners next to a fully rounded
16
+ * TextField.
17
+ */
9
18
  export declare const listboxInputClass: string;
10
19
  export type ComboboxPopupProps = ComponentPropsWithoutRef<typeof BaseCombobox.Popup>;
11
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAQlB,CAAC;AAEZ,eAAO,MAAM,iBAAiB,QAInB,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CACvD,OAAO,YAAY,CAAC,KAAK,CAC1B,CAAC;AA2EF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAqBpB,CAAC"}
1
+ {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAUtD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAQlB,CAAC;AAEZ;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,QAKnB,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CACvD,OAAO,YAAY,CAAC,KAAK,CAC1B,CAAC;AA2EF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAqBpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,KAAK,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC/E,KAAK,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAsB9D,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,EAAE,WAAW,CAAC;IACtE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,+GA0BtB,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,KAAK,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC/E,KAAK,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAsB9D,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,EAAE,WAAW,CAAC;IACtE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,+GAgCtB,CAAC"}
@@ -18,9 +18,14 @@ export interface MeterProps extends Omit<ComponentPropsWithoutRef<typeof BaseMet
18
18
  * 100% is often the bad case rather than the finished one. They also announce
19
19
  * differently to a screen reader, which is the part that actually matters.
20
20
  *
21
- * No transition on the indicator: the common caller is a mic level updating
22
- * every animation frame, and easing a value that already changes 60 times a
23
- * second only makes it lag behind the sound.
21
+ * The indicator moves rather than snapping, but only just 120ms and ease-out,
22
+ * no spring. This used to have no transition at all, on the grounds that the
23
+ * common caller is a mic level updating every animation frame and easing a
24
+ * value that changes 60 times a second only makes it lag behind the sound.
25
+ * That reasoning holds for the mic and nothing else: disk used, server
26
+ * capacity, a level polled a few times a second all read as broken when they
27
+ * teleport. 120ms is shorter than the gap between polls at 4Hz, so a fast feed
28
+ * still lands on every value it is handed.
24
29
  */
25
30
  export declare function Meter({ className, value, label, showValue, tone, ...props }: MeterProps): import("react").JSX.Element;
26
31
  //# sourceMappingURL=Meter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Meter.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AASrE,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EAC/C,WAAW,GAAG,OAAO,CACtB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAiB,EACjB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,UAAU,+BA+BZ"}
1
+ {"version":3,"file":"Meter.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AASrE,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EAC/C,WAAW,GAAG,OAAO,CACtB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAiB,EACjB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,UAAU,+BAwCZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAClD,WAAW,GAAG,OAAO,CACtB;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAY,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAc5E;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,IAAS,EACT,YAAY,EAAE,SAAqB,EACpC,EAAE,YAAY,+BAad"}
1
+ {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAClD,WAAW,GAAG,OAAO,CACtB;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAY,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAmB5E;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,IAAS,EACT,YAAY,EAAE,SAAqB,EACpC,EAAE,YAAY,+BAad"}
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AAS9E,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,MAAM,EACN,KAAK,EACL,OAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,+BAmBf"}
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AAS9E,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,MAAM,EACN,KAAK,EACL,OAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,+BAyBf"}
@@ -6,5 +6,25 @@ export interface SliderProps extends Omit<ComponentPropsWithoutRef<typeof BaseSl
6
6
  className?: string;
7
7
  "aria-label"?: string;
8
8
  }
9
+ /**
10
+ * The travel is animated, on the spring.
11
+ *
12
+ * Two things about that are worth reading before changing it.
13
+ *
14
+ * It uses --ease-spring-tight rather than --ease-spring. The overshoot in the
15
+ * standard spring is a percentage of the travel, which is texture on a control
16
+ * that scales in place and a problem on one whose travel is its own width: a
17
+ * full-track jump measured 110% along a 919px track, putting the thumb 96px
18
+ * outside the slider before it came back. The thumb still scales on the
19
+ * standard spring, where the overshoot belongs.
20
+ *
21
+ * And it animates on a click or an arrow key but not under a dragging pointer,
22
+ * where a transition means the thumb lags behind the cursor. Base UI's
23
+ * data-dragging is not the right signal for that: it appears on pointerdown,
24
+ * which is also how you click the track, so keying off it would kill the
25
+ * animation for the most common interaction there is. What matters is whether
26
+ * the pointer has actually moved, so that is what is tracked here — with a few
27
+ * pixels of slop, because a mouse rarely stays perfectly still through a click.
28
+ */
9
29
  export declare function Slider({ className, tone, "aria-label": ariaLabel, ...props }: SliderProps): import("react").JSX.Element;
10
30
  //# sourceMappingURL=Slider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC3E,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,IAAgB,EAChB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,WAAW,+BA2Bb"}
1
+ {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAqC,MAAM,OAAO,CAAC;AAGzF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC3E,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,IAAgB,EAChB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,WAAW,+BAmGb"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvE,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3E,MAAM,MAAM,QAAQ,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AA+B7E,QAAA,MAAM,GAAG,4MAsBP,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CACvD,OAAO,QAAQ,CAAC,SAAS,CAC1B,CAAC;AAuCF,eAAO,MAAM,IAAI;;;;;CAAuD,CAAC;AACzE,OAAO,EAAE,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvE,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3E,MAAM,MAAM,QAAQ,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AAwD7E,QAAA,MAAM,GAAG,4MA2BP,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CACvD,OAAO,QAAQ,CAAC,SAAS,CAC1B,CAAC;AA2DF,eAAO,MAAM,IAAI;;;;;CAAuD,CAAC;AACzE,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAO/C,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,EAC9C,WAAW,GAAG,MAAM,CACrB;IACD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,6GA+DrB,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMjE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE/C,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,EAC9C,WAAW,GAAG,MAAM,CACrB;IACD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,6GA4DrB,CAAC"}
@@ -1,12 +1,16 @@
1
1
  import { Toast as BaseToast } from '@base-ui/react/toast';
2
2
  import { ComponentPropsWithoutRef } from 'react';
3
- export type ToastRootProps = ComponentPropsWithoutRef<typeof BaseToast.Root>;
3
+ export type ToastSeverity = "neutral" | "info" | "success" | "warning" | "danger";
4
+ export interface ToastRootProps extends Omit<ComponentPropsWithoutRef<typeof BaseToast.Root>, "className"> {
5
+ severity?: ToastSeverity;
6
+ className?: string;
7
+ }
4
8
  export type ToastViewportProps = ComponentPropsWithoutRef<typeof BaseToast.Viewport>;
5
9
  export declare const Toast: {
6
10
  Provider: import('react').FC<import('@base-ui/react').ToastProviderProps>;
7
11
  Portal: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ToastPortalProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
8
12
  Viewport: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ToastViewportProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
9
- Root: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ToastRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
13
+ Root: import('react').ForwardRefExoticComponent<ToastRootProps & import('react').RefAttributes<HTMLDivElement>>;
10
14
  Title: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ToastTitleProps, "ref"> & import('react').RefAttributes<HTMLHeadingElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
11
15
  Description: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ToastDescriptionProps, "ref"> & import('react').RefAttributes<HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
12
16
  Close: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ToastCloseProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,MAAM,cAAc,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC7E,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CACvD,OAAO,SAAS,CAAC,QAAQ,CAC1B,CAAC;AA0HF,eAAO,MAAM,KAAK;;;;;;;;;CASjB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,kCAA4B,CAAC"}
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAmBb,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC1E,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CACvD,OAAO,SAAS,CAAC,QAAQ,CAC1B,CAAC;AAgIF,eAAO,MAAM,KAAK;;;;;;;;;CASjB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,kCAA4B,CAAC"}
@@ -1,4 +1,26 @@
1
1
  export declare const focusRing = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light";
2
+ export declare const focusRingWithin = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light";
3
+ /**
4
+ * What a text input looks like: TextField, and the typeahead inputs on
5
+ * Combobox and Autocomplete.
6
+ *
7
+ * Shared because they had already drifted. The listbox inputs asked for
8
+ * `rounded-(--gryt-radius-input)`, a token that does not exist — the library
9
+ * ships sm, md, lg, xl and full — so the declaration was invalid and both
10
+ * rendered with square corners in a library where every other control is
11
+ * rounded. That is the kind of thing a shared constant makes impossible rather
12
+ * than merely unlikely.
13
+ *
14
+ * The border *colour* is left to the caller: TextField swaps it for danger when
15
+ * the field is invalid, and baking one in here would mean fighting it back off.
16
+ */
17
+ export declare const fieldControl: string;
18
+ /** Matching heights and padding for the two sizes a field comes in. */
19
+ export declare const fieldSizes: {
20
+ readonly small: "min-h-9 px-3 py-1.5 text-sm";
21
+ readonly medium: "min-h-11 px-4 py-2.5 text-sm";
22
+ };
23
+ export type FieldSize = keyof typeof fieldSizes;
2
24
  export declare const popupSurface = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text";
3
25
  export declare const popupMotion: string;
4
26
  export declare const disabledState = "data-disabled:cursor-not-allowed data-disabled:opacity-50";
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/utils/styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,mGAC4E,CAAC;AAInG,eAAO,MAAM,YAAY,wFAC8D,CAAC;AAIxF,eAAO,MAAM,WAAW,QAOb,CAAC;AAEZ,eAAO,MAAM,aAAa,8DACmC,CAAC;AAK9D,MAAM,MAAM,IAAI,GACZ,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAO3C,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAOzC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAO3C,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAQhD,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAOvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAOlD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAO9C,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/utils/styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,mGAC4E,CAAC;AAMnG,eAAO,MAAM,eAAe,wHAC2F,CAAC;AAExH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,QAMd,CAAC;AAEZ,uEAAuE;AACvE,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,UAAU,CAAC;AAIhD,eAAO,MAAM,YAAY,wFAC8D,CAAC;AAIxF,eAAO,MAAM,WAAW,QAOb,CAAC;AAEZ,eAAO,MAAM,aAAa,8DACmC,CAAC;AAK9D,MAAM,MAAM,IAAI,GACZ,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAO3C,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAOzC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAO3C,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAQhD,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAOvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAOlD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAO9C,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),S=require("@base-ui/react/tooltip"),re=require("@base-ui/react/button"),s=require("react"),pe=require("clsx"),fe=require("tailwind-merge"),V=require("@base-ui/react/field"),h=require("@phosphor-icons/react"),X=require("@base-ui/react/avatar"),J=require("@base-ui/react/checkbox"),K=require("@base-ui/react/radio"),me=require("@base-ui/react/radio-group"),Z=require("@base-ui/react/switch"),L=require("@base-ui/react/slider"),m=require("@base-ui/react/select"),be=require("@base-ui/react/separator"),Y=require("@base-ui/react/progress"),R=require("@base-ui/react/dialog"),x=require("@base-ui/react/drawer"),A=require("@base-ui/react/menu"),z=require("@base-ui/react/tabs"),B=require("@base-ui/react/accordion"),N=require("@base-ui/react/context-menu"),w=require("@base-ui/react/popover"),v=require("@base-ui/react/toast"),$=require("@base-ui/react/scroll-area"),xe=require("@base-ui/react/toggle"),he=require("@base-ui/react/toggle-group"),q=require("@base-ui/react/meter"),P=require("@base-ui/react/alert-dialog"),g=require("@base-ui/react/autocomplete"),l=require("@base-ui/react/combobox"),we=require("@base-ui/react/checkbox-group"),U=require("@base-ui/react/collapsible"),ve=require("@base-ui/react/form"),oe=require("@base-ui/react/fieldset"),je=require("@base-ui/react/menubar"),b=require("@base-ui/react/navigation-menu"),k=require("@base-ui/react/number-field"),ee=require("@base-ui/react/otp-field"),D=require("@base-ui/react/preview-card"),I=require("@base-ui/react/toolbar"),Q={color:{bg:"#111318",surface:"#1a1d24",surfaceRaised:"#1e2028",surfaceHover:"#334155",border:"#2b303d",text:"#e0e0e6",muted:"#888888",accent:"#968FF8",accentLight:"#b4afff",secondary:"#7dd3fc",secondaryLight:"#bae6fd",success:"#4ade80",danger:"#f87171",dangerLight:"#fca5a5",warning:"#fbbf24",onAccent:"#141126",onSecondary:"#07131c",onDanger:"#250b0b"},radius:{sm:8,md:12,lg:20,xl:28,full:999}};function ae(a={}){const e={...Q.color,...a.color},t={...Q.radius,...a.radius};return{"--gryt-bg":e.bg,"--gryt-surface":e.surface,"--gryt-surface-raised":e.surfaceRaised,"--gryt-surface-hover":e.surfaceHover,"--gryt-border":e.border,"--gryt-text":e.text,"--gryt-muted":e.muted,"--gryt-accent":e.accent,"--gryt-accent-light":e.accentLight,"--gryt-secondary":e.secondary,"--gryt-secondary-light":e.secondaryLight,"--gryt-success":e.success,"--gryt-danger":e.danger,"--gryt-danger-light":e.dangerLight,"--gryt-warning":e.warning,"--gryt-on-accent":e.onAccent,"--gryt-on-secondary":e.onSecondary,"--gryt-on-danger":e.onDanger,"--color-gryt-bg":e.bg,"--color-gryt-surface":e.surface,"--color-gryt-surface-raised":e.surfaceRaised,"--color-gryt-surface-hover":e.surfaceHover,"--color-gryt-border":e.border,"--color-gryt-text":e.text,"--color-gryt-muted":e.muted,"--color-gryt-accent":e.accent,"--color-gryt-accent-light":e.accentLight,"--color-gryt-secondary":e.secondary,"--color-gryt-secondary-light":e.secondaryLight,"--color-gryt-success":e.success,"--color-gryt-danger":e.danger,"--color-gryt-danger-light":e.dangerLight,"--color-gryt-warning":e.warning,"--color-gryt-on-accent":e.onAccent,"--color-gryt-on-secondary":e.onSecondary,"--color-gryt-on-danger":e.onDanger,"--gryt-radius-sm":`${t.sm}px`,"--gryt-radius-md":`${t.md}px`,"--gryt-radius-lg":`${t.lg}px`,"--gryt-radius-xl":`${t.xl}px`,"--gryt-radius-full":`${t.full}px`}}function Ne(a){return Object.keys(a).some(e=>e.startsWith("--"))}function Re({children:a,className:e,theme:t,tooltipDelay:r=400}){const i=t&&Ne(t)?t:ae(t??{});return o.jsx("div",{className:e,style:i,children:o.jsx(S.Tooltip.Provider,{delay:r,children:a})})}function n(...a){return fe.twMerge(pe.clsx(a))}const Pe={primary:"bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light",secondary:"bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light",neutral:"bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover",danger:"bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light",ghost:"bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},Ce={xsmall:"min-h-8 px-3 text-xs",small:"min-h-9 px-4 text-sm",medium:"min-h-10 px-5 text-sm",large:"min-h-12 px-6 text-base"},ne=s.forwardRef(function({children:e,className:t,endIcon:r,size:i="medium",startIcon:c,tone:d="primary",...p},y){return o.jsxs(re.Button,{ref:y,className:n("gryt-button","inline-flex items-center justify-center gap-2 border-0 shadow-none","rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none","transition-[scale,background-color,color]","duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:not-data-disabled:scale-[1.03]","motion-safe:active:not-data-disabled:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-50",Ce[i],Pe[d],t),...p,children:[c,e,r]})}),u="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",C="rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",T=["transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0"].join(" "),F="data-disabled:cursor-not-allowed data-disabled:opacity-50",Te={primary:"data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",secondary:"data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",neutral:"data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",danger:"data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",success:"data-checked:bg-gryt-success data-checked:text-gryt-on-accent",warning:"data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"},se={primary:"bg-gryt-accent",secondary:"bg-gryt-secondary",neutral:"bg-gryt-surface-hover",danger:"bg-gryt-danger",success:"bg-gryt-success",warning:"bg-gryt-warning"},ke={primary:"data-checked:border-gryt-accent",secondary:"data-checked:border-gryt-secondary",neutral:"data-checked:border-gryt-muted",danger:"data-checked:border-gryt-danger",success:"data-checked:border-gryt-success",warning:"data-checked:border-gryt-warning"},Se={primary:"data-checked:bg-gryt-accent",secondary:"data-checked:bg-gryt-secondary",neutral:"data-checked:bg-gryt-surface-hover",danger:"data-checked:bg-gryt-danger",success:"data-checked:bg-gryt-success",warning:"data-checked:bg-gryt-warning"},Ae={primary:"text-gryt-accent hover:not-data-disabled:bg-gryt-accent/10",secondary:"text-gryt-secondary hover:not-data-disabled:bg-gryt-secondary/10",neutral:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",danger:"text-gryt-danger hover:not-data-disabled:bg-gryt-danger/10",ghost:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},Me={xsmall:"h-8 w-8",small:"h-9 w-9",medium:"h-10 w-10",large:"h-12 w-12"},De=s.forwardRef(function({className:e,size:t="medium",tone:r="neutral",...i},c){return o.jsx(re.Button,{ref:c,className:n("gryt-icon-button","inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0","rounded-(--gryt-radius-full) select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:not-data-disabled:scale-[1.06]","motion-safe:active:not-data-disabled:scale-[0.94]",u,F,Me[t],Ae[r],e),...i})}),Ie=s.forwardRef(function({className:e,elevated:t=!1,...r},i){return o.jsx("div",{ref:i,className:n("gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",t?"bg-gryt-surface-raised":"bg-gryt-surface",e),...r})}),$e=s.forwardRef(function({children:e,className:t,from:r="assistant",...i},c){return o.jsx("div",{ref:c,className:n("gryt-message-bubble",r==="user"&&"ml-auto bg-gryt-accent text-gryt-on-accent",r==="assistant"&&"mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",r==="system"&&"mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",t),...i,children:e})}),Fe={small:"min-h-9 px-3 py-1.5 text-sm",medium:"min-h-11 px-4 py-2.5 text-sm"},Ge=s.forwardRef(function({className:e,error:t=!1,fieldClassName:r,helperText:i,label:c,minRows:d=3,multiline:p=!1,size:y="medium",...j},M){const G=o.jsx(V.Field.Control,{ref:M,render:p?o.jsx("textarea",{rows:d}):void 0,className:n("gryt-text-field-control w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised","text-gryt-text outline-none placeholder:text-gryt-muted","transition-colors duration-150","hover:border-gryt-accent-light focus:border-gryt-accent","disabled:cursor-not-allowed disabled:opacity-60",p&&"resize-y leading-6",t?"border-gryt-danger":"border-gryt-border",Fe[y],e),...j});return o.jsxs(V.Field.Root,{className:n("gryt-text-field flex w-full flex-col gap-1.5",r),children:[c?o.jsx(V.Field.Label,{className:"text-xs font-medium text-gryt-muted",children:c}):null,G,i?o.jsx(V.Field.Description,{className:n("text-xs",t?"text-gryt-danger":"text-gryt-muted"),children:i}):null]})}),Le=s.forwardRef(function({className:e,disabled:t=!1,maxRows:r=8,minRows:i=1,onSubmit:c,placeholder:d="Message Gryt",submitLabel:p="Send",...y},j){const M=s.useRef(null),G=s.useCallback(()=>{const f=M.current;if(!f)return;const O=window.getComputedStyle(f),_=parseFloat(O.lineHeight)||24,W=parseFloat(O.paddingTop)+parseFloat(O.paddingBottom);f.style.height="auto",f.style.height=`${Math.min(Math.max(f.scrollHeight,_*i+W),_*r+W)}px`},[r,i]);s.useLayoutEffect(G,[G,y.value]);function ye(f){if(!c){f.preventDefault();return}c(f)}return o.jsxs("form",{className:n("gryt-composer",e),onSubmit:ye,children:[o.jsx("textarea",{ref:f=>{M.current=f,typeof j=="function"?j(f):j&&(j.current=f)},rows:i,disabled:t,placeholder:d,onInput:G,className:"gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",...y}),o.jsx(ne,{type:"submit",disabled:t,size:"small",endIcon:o.jsx(h.PaperPlaneTilt,{size:14,weight:"fill"}),children:p})]})}),qe={small:"h-8 w-8 text-xs",medium:"h-10 w-10 text-sm",large:"h-12 w-12 text-base"},ie=s.forwardRef(function({alt:e,children:t,className:r,fallback:i,size:c="medium",src:d,...p},y){return o.jsxs(X.Avatar.Root,{ref:y,className:n("gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none","rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",qe[c],r),...p,children:[d?o.jsx(X.Avatar.Image,{src:d,alt:e,className:"h-full w-full object-cover"}):null,o.jsx(X.Avatar.Fallback,{className:"flex h-full w-full items-center justify-center",children:i??t})]})}),Be=s.forwardRef(function({active:e=!1,avatar:t,className:r,subtitle:i,title:c,...d},p){return o.jsxs("button",{ref:p,type:"button",className:n("gryt-conversation-item",e?"bg-gryt-accent text-gryt-on-accent":"text-gryt-text hover:bg-white/5",r),...d,children:[t??o.jsx(ie,{size:"small",className:n(e?"bg-gryt-on-accent text-gryt-accent ring-transparent":"bg-gryt-surface-raised text-gryt-text"),children:c.slice(0,1).toUpperCase()}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-semibold",children:c}),i?o.jsx("span",{className:n("block truncate text-xs",e?"text-gryt-on-accent/70":"text-gryt-muted"),children:i}):null]})]})}),ze=s.forwardRef(function({badgeContent:e,children:t,className:r,max:i=99,showZero:c=!1,...d},p){const y=typeof e=="number"?e:null,j=y!==null&&y===0&&!c,M=y!==null&&y>i?`${i}+`:e;return o.jsxs("span",{ref:p,className:n("gryt-badge relative inline-flex",r),...d,children:[t,e!==void 0&&!j?o.jsx("span",{className:n("gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center","min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5","bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent","ring-2 ring-gryt-bg"),children:M}):null]})}),Ve={neutral:"border-gryt-border bg-gryt-surface-raised text-gryt-text",primary:"border-gryt-accent/40 bg-gryt-accent/12 text-gryt-accent",secondary:"border-gryt-secondary/40 bg-gryt-secondary/12 text-gryt-secondary",success:"border-gryt-success/40 bg-gryt-success/12 text-gryt-success",warning:"border-gryt-warning/40 bg-gryt-warning/12 text-gryt-warning",danger:"border-gryt-danger/40 bg-gryt-danger/12 text-gryt-danger"},Ee=s.forwardRef(function({children:e,className:t,icon:r,label:i,onDelete:c,tone:d="neutral",...p},y){return o.jsxs("span",{ref:y,className:n("gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",Ve[d],t),...p,children:[r,i??e,c?o.jsx("button",{type:"button","aria-label":"Remove",onClick:c,className:n("-mr-1 inline-flex h-4 w-4 items-center justify-center rounded-(--gryt-radius-full)","opacity-70 transition-opacity hover:opacity-100",u),children:o.jsx(h.X,{size:10,weight:"bold","aria-hidden":"true"})}):null]})}),He=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(J.Checkbox.Root,{ref:i,className:n("gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",u,F,Te[t],e),...r,children:o.jsx(J.Checkbox.Indicator,{keepMounted:!0,className:n("flex origin-center","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none"),children:o.jsx(h.Check,{size:12,weight:"bold"})})})}),Oe=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(K.Radio.Root,{ref:i,className:n("gryt-radio flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",u,F,ke[t],e),...r,children:o.jsx(K.Radio.Indicator,{keepMounted:!0,className:n("h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none",se[t])})})}),Xe=s.forwardRef(function({className:e,...t},r){return o.jsx(me.RadioGroup,{ref:r,className:n("gryt-radio-group flex flex-col gap-2",e),...t})}),Ye=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(Z.Switch.Root,{ref:i,className:n("gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.05]","motion-safe:active:not-data-disabled:scale-[0.95]",u,F,Se[t],e),...r,children:o.jsx(Z.Switch.Thumb,{className:n("h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text","transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-checked:translate-x-4 data-checked:bg-gryt-bg")})})});function Qe({className:a,tone:e="primary","aria-label":t,...r}){return o.jsx(L.Slider.Root,{className:n("gryt-slider w-full",a),...r,children:o.jsx(L.Slider.Control,{className:"flex w-full touch-none items-center py-2 select-none",children:o.jsxs(L.Slider.Track,{className:"h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none",children:[o.jsx(L.Slider.Indicator,{className:n("h-full rounded-(--gryt-radius-full) select-none",se[e])}),o.jsx(L.Slider.Thumb,{"aria-label":t,className:n("h-4 w-4 rounded-(--gryt-radius-full) bg-gryt-text select-none","transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","motion-safe:hover:scale-[1.12] motion-safe:active:scale-[0.94]",u)})]})})})}const Ue={small:"min-h-9 px-3 text-sm",medium:"min-h-11 px-4 text-sm"};function _e({className:a,label:e,options:t=[],placeholder:r="Select",size:i="medium",...c}){return o.jsxs(m.Select.Root,{items:t,...c,children:[o.jsxs("div",{className:n("gryt-select flex w-full flex-col gap-1.5",a),children:[e?o.jsx(m.Select.Label,{className:"text-xs font-medium text-gryt-muted",children:e}):null,o.jsxs(m.Select.Trigger,{className:n("flex w-full items-center justify-between gap-2","rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised","text-gryt-text select-none","transition-colors duration-150 hover:border-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-60",u,Ue[i]),children:[o.jsx(m.Select.Value,{placeholder:r}),o.jsx(m.Select.Icon,{className:"shrink-0 text-gryt-muted",children:o.jsx(h.CaretUpDown,{size:16})})]})]}),o.jsx(m.Select.Portal,{children:o.jsx(m.Select.Positioner,{sideOffset:6,className:"outline-none",children:o.jsx(m.Select.Popup,{className:n("min-w-(--anchor-width) p-1",C,T),children:o.jsx(m.Select.List,{children:t.map(d=>o.jsxs(m.Select.Item,{value:d.value,disabled:d.disabled,className:n("flex cursor-default items-center justify-between gap-2","rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text","outline-none select-none data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50"),children:[o.jsx(m.Select.ItemText,{children:d.label}),o.jsx(m.Select.ItemIndicator,{className:"text-gryt-accent",children:o.jsx(h.Check,{size:14,weight:"bold"})})]},String(d.value)))})})})})]})}function We({children:a,className:e,side:t="top",sideOffset:r=8,title:i}){return o.jsxs(S.Tooltip.Root,{children:[o.jsx(S.Tooltip.Trigger,{render:a}),o.jsx(S.Tooltip.Portal,{children:o.jsx(S.Tooltip.Positioner,{side:t,sideOffset:r,children:o.jsx(S.Tooltip.Popup,{className:n("gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised","px-2.5 py-1.5 text-xs text-gryt-text",T,e),children:i})})})]})}const Je=S.Tooltip.Provider,Ke=s.forwardRef(function({className:e,orientation:t="horizontal",...r},i){return o.jsx(be.Separator,{ref:i,orientation:t,className:n("gryt-divider bg-gryt-border",t==="vertical"?"h-full w-px":"h-px w-full",e),...r})}),Ze=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",e),...t})});function et({children:a,className:e,subheader:t,title:r,...i}){return o.jsxs("div",{className:n("gryt-card-header flex flex-col gap-1 p-4",e),...i,children:[r?o.jsx("span",{className:"text-base font-semibold text-gryt-text",children:r}):null,t?o.jsx("span",{className:"text-sm text-gryt-muted",children:t}):null,a]})}function tt({className:a,...e}){return o.jsx("div",{className:n("gryt-card-content px-4 pb-4 text-sm text-gryt-muted",a),...e})}function rt({className:a,...e}){return o.jsx("div",{className:n("gryt-card-actions flex items-center gap-2 px-4 pb-4",a),...e})}const ot={info:"border-gryt-secondary/40 bg-gryt-secondary/10 text-gryt-secondary",success:"border-gryt-success/40 bg-gryt-success/10 text-gryt-success",warning:"border-gryt-warning/40 bg-gryt-warning/10 text-gryt-warning",error:"border-gryt-danger/40 bg-gryt-danger/10 text-gryt-danger"},at=s.forwardRef(function({className:e,severity:t="info",...r},i){return o.jsx("div",{ref:i,role:"alert",className:n("gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",ot[t],e),...r})});function nt({className:a,value:e=null,...t}){return o.jsx(Y.Progress.Root,{value:e,className:n("gryt-progress w-full",a),...t,children:o.jsx(Y.Progress.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(Y.Progress.Indicator,{className:"h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-(--gryt-dur-spring-soft) ease-spring motion-reduce:transition-none"})})})}function st({className:a,size:e=24,"aria-label":t="Loading"}){return o.jsx(h.CircleNotch,{role:"status","aria-label":t,size:e,weight:"bold",className:n("gryt-spinner text-gryt-accent motion-safe:animate-spin",a)})}const it={text:"h-4 rounded-(--gryt-radius-sm)",rounded:"rounded-(--gryt-radius-lg)",circular:"rounded-(--gryt-radius-full)",rectangular:"rounded-none"};function ct({className:a,height:e,style:t,variant:r="text",width:i,...c}){const d={width:i,height:e,...t};return o.jsx("div",{"aria-hidden":"true",className:n("gryt-skeleton bg-gryt-surface-raised motion-safe:animate-pulse",it[r],a),style:d,...c})}const ce="transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",dt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Dialog.Backdrop,{ref:r,className:n("gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)",ce,"data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}),lt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Dialog.Popup,{ref:r,className:n("gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","flex w-96 max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",ce,"data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",e),...t})}),gt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Dialog.Title,{ref:r,className:n("gryt-dialog-title text-base font-semibold text-gryt-text",e),...t})}),ut=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Dialog.Description,{ref:r,className:n("gryt-dialog-description text-sm text-gryt-muted",e),...t})}),yt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-dialog-footer flex justify-end gap-3",e),...t})}),pt={Root:R.Dialog.Root,Trigger:R.Dialog.Trigger,Portal:R.Dialog.Portal,Close:R.Dialog.Close,Backdrop:dt,Popup:lt,Title:gt,Description:ut,Footer:yt},ft=()=>()=>{};function de(a){const e=s.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return ft();const i=window.matchMedia(a);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[a]),t=s.useCallback(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(a).matches,[a]);return s.useSyncExternalStore(e,t,()=>!1)}const mt={left:"left",right:"right",top:"up",bottom:"down"},H=s.createContext("right"),bt={left:"items-stretch justify-start",right:"items-stretch justify-end",top:"items-start justify-center",bottom:"items-end justify-center"},xt={left:"rounded-r-(--gryt-radius-xl)",right:"rounded-l-(--gryt-radius-xl)",top:"rounded-b-(--gryt-radius-xl)",bottom:"rounded-t-(--gryt-radius-xl)"},ht={left:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),right:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-mr-(--gryt-drawer-bleed) border-l py-5 pl-5 pr-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]"].join(" "),top:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mt-(--gryt-drawer-bleed) border-b px-5 pb-5 pt-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),bottom:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mb-(--gryt-drawer-bleed) border-t px-5 pt-5 pb-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"].join(" ")};function wt({side:a="right",sheetOnMobile:e=!0,children:t,...r}){const i=de("(max-width: 767px)"),c=e&&i?"bottom":a;return o.jsx(H.Provider,{value:c,children:o.jsx(x.Drawer.Root,{swipeDirection:mt[c],...r,children:t})})}const vt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(H);return o.jsx(x.Drawer.Viewport,{ref:r,className:n("gryt-drawer-viewport fixed inset-0 z-50 flex",bt[i],e),...t})}),jt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(H);return o.jsx(x.Drawer.Popup,{ref:r,className:n("gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text","overflow-y-auto overscroll-contain outline-none","transition-transform duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0 data-swiping:select-none","motion-reduce:transition-none",ht[i],xt[i],e),...t})}),Nt=s.forwardRef(function({className:e,...t},r){return o.jsx(x.Drawer.Backdrop,{ref:r,className:n("gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","[opacity:calc(1-var(--drawer-swipe-progress,0))]","transition-opacity duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0","data-starting-style:opacity-0 data-ending-style:opacity-0","motion-reduce:transition-none",e),...t})});function Rt({className:a}){const e=s.useContext(H);return e!=="bottom"&&e!=="top"?null:o.jsx("div",{"aria-hidden":!0,className:n("gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",e==="top"&&"order-last",a)})}const Pt={Root:wt,Trigger:x.Drawer.Trigger,Portal:x.Drawer.Portal,Backdrop:Nt,Viewport:vt,Popup:jt,Content:x.Drawer.Content,Grabber:Rt,Close:x.Drawer.Close,Title:x.Drawer.Title,Description:x.Drawer.Description},Ct=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(A.Menu.Positioner,{ref:i,sideOffset:t,className:n("gryt-menu-positioner outline-none",e),...r})}),Tt=s.forwardRef(function({className:e,...t},r){return o.jsx(A.Menu.Popup,{ref:r,className:n("gryt-menu min-w-44 p-1 outline-none",C,T,e),...t})}),kt=s.forwardRef(function({className:e,...t},r){return o.jsx(A.Menu.Item,{ref:r,className:n("gryt-menu-item flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...t})}),St=s.forwardRef(function({className:e,...t},r){return o.jsx(A.Menu.Separator,{ref:r,className:n("gryt-menu-separator my-1 h-px bg-gryt-border",e),...t})}),E={Root:A.Menu.Root,Trigger:A.Menu.Trigger,Portal:A.Menu.Portal,Positioner:Ct,Popup:Tt,Item:kt,Separator:St},At=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Root,{ref:r,className:n("gryt-tabs",e),...t})}),Mt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.List,{ref:r,className:n("gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",e),...t})}),le=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Tab,{ref:r,className:n("gryt-tab inline-flex min-h-8 items-center justify-center whitespace-nowrap","rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5","text-sm font-medium text-gryt-muted select-none","relative z-10 transition-colors duration-150 hover:text-gryt-text","data-active:text-gryt-on-accent",u,e),...t})}),Dt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Indicator,{ref:r,renderBeforeHydration:!0,className:n("gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]","w-(--active-tab-width) translate-x-(--active-tab-left)","rounded-(--gryt-radius-full) bg-gryt-accent","transition-[translate,width] duration-(--gryt-dur-spring) ease-spring","motion-reduce:transition-none",e),...t})}),It=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Panel,{ref:r,className:n("gryt-tabs-panel pt-3 text-sm text-gryt-text",e),...t})}),$t=Object.assign(At,{List:Mt,Tab:le,Panel:It,Indicator:Dt}),Ft=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Root,{ref:r,className:n("gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",e),...t})}),Gt=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Item,{ref:r,className:n("gryt-accordion-item",e),...t})}),Lt=s.forwardRef(function({children:e,className:t,expandIcon:r,...i},c){return o.jsx(B.Accordion.Header,{className:"gryt-accordion-header m-0",children:o.jsxs(B.Accordion.Trigger,{ref:c,className:n("gryt-accordion-trigger flex w-full items-center justify-between gap-3","rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5","text-left text-sm font-medium text-gryt-text select-none","transition-colors duration-150 hover:bg-gryt-surface-raised",u,t),...i,children:[e,r===void 0?o.jsx(h.CaretDown,{size:16,className:"shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"}):r]})})}),qt=s.forwardRef(function({children:e,className:t,...r},i){return o.jsx(B.Accordion.Panel,{ref:i,className:n("gryt-accordion-panel overflow-hidden text-sm text-gryt-muted","h-[var(--accordion-panel-height)] transition-[height] duration-(--gryt-dur-spring-soft) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",t),...r,children:o.jsx("div",{className:"px-3 pt-1 pb-3",children:e})})}),Bt=Object.assign(Ft,{Item:Gt,Trigger:Lt,Panel:qt}),zt=s.forwardRef(function({className:e,sideOffset:t=2,...r},i){return o.jsx(N.ContextMenu.Positioner,{ref:i,sideOffset:t,className:n("gryt-context-menu-positioner outline-none",e),...r})}),Vt={Root:N.ContextMenu.Root,Trigger:N.ContextMenu.Trigger,Portal:N.ContextMenu.Portal,Positioner:zt,Popup:E.Popup,Item:E.Item,Separator:E.Separator,Group:N.ContextMenu.Group,GroupLabel:N.ContextMenu.GroupLabel,SubmenuRoot:N.ContextMenu.SubmenuRoot,SubmenuTrigger:N.ContextMenu.SubmenuTrigger},Et=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(w.Popover.Positioner,{ref:i,sideOffset:t,className:n("gryt-popover-positioner outline-none",e),...r})}),Ht=s.forwardRef(function({className:e,...t},r){return o.jsx(w.Popover.Popup,{ref:r,className:n("gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",C,T,e),...t})}),Ot=s.forwardRef(function({className:e,...t},r){return o.jsx(w.Popover.Title,{ref:r,className:n("gryt-popover-title text-sm font-semibold text-gryt-text",e),...t})}),Xt=s.forwardRef(function({className:e,...t},r){return o.jsx(w.Popover.Description,{ref:r,className:n("gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",e),...t})}),Yt={Root:w.Popover.Root,Trigger:w.Popover.Trigger,Portal:w.Popover.Portal,Positioner:Et,Popup:Ht,Title:Ot,Description:Xt,Close:w.Popover.Close,Arrow:w.Popover.Arrow},Qt=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Toast.Viewport,{ref:r,className:n("gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]","flex-col gap-2 outline-none",e),...t})}),Ut=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Toast.Root,{ref:r,className:n("gryt-toast relative flex flex-col p-3 pr-9",C,"transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring","data-starting-style:translate-y-2 data-starting-style:opacity-0","data-ending-style:translate-y-2 data-ending-style:opacity-0","motion-reduce:transition-none",e),...t})}),_t=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Toast.Title,{ref:r,className:n("gryt-toast-title text-sm font-semibold text-gryt-text",e),...t})}),Wt=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Toast.Description,{ref:r,className:n("gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",e),...t})}),Jt=s.forwardRef(function({className:e,children:t,...r},i){return o.jsx(v.Toast.Close,{ref:i,"aria-label":"Close",className:n("gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center","rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted","transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",e),...r,children:t??o.jsx(h.X,{size:14,weight:"bold"})})}),Kt=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Toast.Action,{ref:r,className:n("gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0","bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:scale-[1.04] motion-safe:active:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",e),...t})}),Zt={Provider:v.Toast.Provider,Portal:v.Toast.Portal,Viewport:Qt,Root:Ut,Title:_t,Description:Wt,Close:Jt,Action:Kt},er=v.Toast.useToastManager,tr=s.forwardRef(function({className:e,...t},r){return o.jsx($.ScrollArea.Root,{ref:r,className:n("gryt-scroll-area relative",e),...t})}),rr=s.forwardRef(function({className:e,...t},r){return o.jsx($.ScrollArea.Viewport,{ref:r,className:n("gryt-scroll-area-viewport h-full w-full overscroll-contain","focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",e),...t})}),or=s.forwardRef(function({className:e,orientation:t,...r},i){return o.jsx($.ScrollArea.Scrollbar,{ref:i,orientation:t,className:n("gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none","opacity-0 transition-opacity duration-(--gryt-dur-fast)","data-hovering:opacity-100 data-scrolling:opacity-100","motion-reduce:transition-none",t==="horizontal"?"h-2 flex-col":"w-2",e),...r,children:o.jsx($.ScrollArea.Thumb,{className:"flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none"})})}),ar={Root:tr,Viewport:rr,Scrollbar:or,Content:$.ScrollArea.Content,Corner:$.ScrollArea.Corner},nr={primary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent","data-pressed:hover:not-data-disabled:bg-gryt-accent"].join(" "),secondary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-secondary data-pressed:text-gryt-on-secondary","data-pressed:hover:not-data-disabled:bg-gryt-secondary"].join(" "),neutral:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-surface-hover data-pressed:text-gryt-text"].join(" "),danger:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger","data-pressed:hover:not-data-disabled:bg-gryt-danger"].join(" ")},sr={xsmall:"h-8 min-w-8 px-2 text-xs",small:"h-9 min-w-9 px-2.5 text-sm",medium:"h-10 min-w-10 px-3 text-sm",large:"h-12 min-w-12 px-4 text-base"},ir=s.forwardRef(function({className:e,size:t="medium",tone:r="primary",...i},c){return o.jsx(xe.Toggle,{ref:c,className:n("gryt-toggle","inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent","rounded-(--gryt-radius-full) font-medium select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:not-data-disabled:scale-[1.06]","motion-safe:active:not-data-disabled:scale-[0.94]",u,F,sr[t],nr[r],e),...i})}),cr=s.forwardRef(function({className:e,...t},r){return o.jsx(he.ToggleGroup,{ref:r,className:n("gryt-toggle-group inline-flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),dr={primary:"bg-gryt-accent",success:"bg-gryt-success",warning:"bg-gryt-warning",danger:"bg-gryt-danger"};function lr({className:a,value:e,label:t,showValue:r=!1,tone:i="primary",...c}){return o.jsxs(q.Meter.Root,{value:e,className:n("gryt-meter flex w-full flex-col gap-1.5",a),...c,children:[(t||r)&&o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t?o.jsx(q.Meter.Label,{className:"text-sm text-gryt-muted",children:t}):o.jsx("span",{}),r&&o.jsx(q.Meter.Value,{className:"font-mono text-xs text-gryt-muted tabular-nums"})]}),o.jsx(q.Meter.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(q.Meter.Indicator,{className:n("h-full rounded-(--gryt-radius-full)",dr[i])})})]})}const gr=s.forwardRef(function({className:e,...t},r){return o.jsx(P.AlertDialog.Popup,{ref:r,className:n("gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","flex w-96 max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text","outline-none","transition-[opacity,scale] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",e),...t})}),ur=s.forwardRef(function({className:e,...t},r){return o.jsx(P.AlertDialog.Backdrop,{ref:r,className:n("gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}),yr=s.forwardRef(function({className:e,...t},r){return o.jsx(P.AlertDialog.Title,{ref:r,className:n("gryt-alert-dialog-title text-lg font-semibold text-gryt-text",e),...t})}),pr=s.forwardRef(function({className:e,...t},r){return o.jsx(P.AlertDialog.Description,{ref:r,className:n("gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",e),...t})}),fr={Root:P.AlertDialog.Root,Trigger:P.AlertDialog.Trigger,Portal:P.AlertDialog.Portal,Backdrop:ur,Popup:gr,Title:yr,Description:pr,Close:P.AlertDialog.Close},ge=["flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-selected:text-gryt-accent","data-disabled:cursor-not-allowed data-disabled:opacity-50"].join(" "),ue=["w-full rounded-(--gryt-radius-input) border border-gryt-border bg-gryt-surface-raised","px-3 py-2 text-sm text-gryt-text outline-none placeholder:text-gryt-muted",u].join(" "),mr=s.forwardRef(function({className:e,...t},r){return o.jsx(l.Combobox.Input,{ref:r,className:n("gryt-combobox-input",ue,e),...t})}),br=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(l.Combobox.Positioner,{ref:i,sideOffset:t,className:n("gryt-combobox-positioner outline-none",e),...r})}),xr=s.forwardRef(function({className:e,...t},r){return o.jsx(l.Combobox.Popup,{ref:r,className:n("gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",C,T,e),...t})}),hr=s.forwardRef(function({className:e,...t},r){return o.jsx(l.Combobox.Item,{ref:r,className:n("gryt-combobox-item",ge,e),...t})}),wr=s.forwardRef(function({className:e,...t},r){return o.jsx(l.Combobox.Empty,{ref:r,className:n("gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),vr={Root:l.Combobox.Root,Input:mr,InputGroup:l.Combobox.InputGroup,Trigger:l.Combobox.Trigger,Icon:l.Combobox.Icon,Clear:l.Combobox.Clear,Value:l.Combobox.Value,Chips:l.Combobox.Chips,Chip:l.Combobox.Chip,ChipRemove:l.Combobox.ChipRemove,Portal:l.Combobox.Portal,Positioner:br,Popup:xr,List:l.Combobox.List,Item:hr,ItemIndicator:l.Combobox.ItemIndicator,Group:l.Combobox.Group,GroupLabel:l.Combobox.GroupLabel,Empty:wr,Separator:l.Combobox.Separator},jr=s.forwardRef(function({className:e,...t},r){return o.jsx(g.Autocomplete.Input,{ref:r,className:n("gryt-autocomplete-input",ue,e),...t})}),Nr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(g.Autocomplete.Positioner,{ref:i,sideOffset:t,className:n("gryt-autocomplete-positioner outline-none",e),...r})}),Rr=s.forwardRef(function({className:e,...t},r){return o.jsx(g.Autocomplete.Popup,{ref:r,className:n("gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",C,T,e),...t})}),Pr=s.forwardRef(function({className:e,...t},r){return o.jsx(g.Autocomplete.Item,{ref:r,className:n("gryt-autocomplete-item",ge,e),...t})}),Cr=s.forwardRef(function({className:e,...t},r){return o.jsx(g.Autocomplete.Empty,{ref:r,className:n("gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Tr={Root:g.Autocomplete.Root,Input:jr,InputGroup:g.Autocomplete.InputGroup,Trigger:g.Autocomplete.Trigger,Icon:g.Autocomplete.Icon,Clear:g.Autocomplete.Clear,Value:g.Autocomplete.Value,Portal:g.Autocomplete.Portal,Positioner:Nr,Popup:Rr,List:g.Autocomplete.List,Item:Pr,Group:g.Autocomplete.Group,GroupLabel:g.Autocomplete.GroupLabel,Empty:Cr,Separator:g.Autocomplete.Separator},kr=s.forwardRef(function({className:e,...t},r){return o.jsx(we.CheckboxGroup,{ref:r,className:n("gryt-checkbox-group flex flex-col gap-2",e),...t})}),Sr=s.forwardRef(function({className:e,...t},r){return o.jsx(U.Collapsible.Trigger,{ref:r,className:n("gryt-collapsible-trigger flex w-full items-center justify-between gap-2","rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left","text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",u,e),...t})}),Ar=s.forwardRef(function({className:e,...t},r){return o.jsx(U.Collapsible.Panel,{ref:r,className:n("gryt-collapsible-panel overflow-hidden","h-(--collapsible-panel-height) transition-[height] duration-(--gryt-dur-spring) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",e),...t})}),Mr={Root:U.Collapsible.Root,Trigger:Sr,Panel:Ar},Dr=s.forwardRef(function({className:e,...t},r){return o.jsx(ve.Form,{ref:r,className:n("gryt-form flex flex-col gap-(--gryt-space-lg)",e),...t})}),Ir=s.forwardRef(function({className:e,...t},r){return o.jsx(oe.Fieldset.Root,{ref:r,className:n("gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",e),...t})}),$r=s.forwardRef(function({className:e,...t},r){return o.jsx(oe.Fieldset.Legend,{ref:r,className:n("gryt-fieldset-legend text-sm font-semibold text-gryt-text",e),...t})}),Fr={Root:Ir,Legend:$r},Gr=s.forwardRef(function({className:e,...t},r){return o.jsx(je.Menubar,{ref:r,className:n("gryt-menubar flex items-center gap-1","rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Lr=s.forwardRef(function({className:e,...t},r){return o.jsx(b.NavigationMenu.Trigger,{ref:r,className:n("gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)","border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none","data-popup-open:bg-gryt-surface-raised",u,e),...t})}),qr=s.forwardRef(function({className:e,...t},r){return o.jsx(b.NavigationMenu.Popup,{ref:r,className:n("gryt-navigation-menu-popup outline-none",C,T,e),...t})}),Br=s.forwardRef(function({className:e,...t},r){return o.jsx(b.NavigationMenu.Viewport,{ref:r,className:n("gryt-navigation-menu-viewport relative overflow-hidden",e),...t})}),zr=s.forwardRef(function({className:e,...t},r){return o.jsx(b.NavigationMenu.Link,{ref:r,className:n("gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2","text-sm text-gryt-text no-underline outline-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",u,e),...t})}),Vr={Root:b.NavigationMenu.Root,List:b.NavigationMenu.List,Item:b.NavigationMenu.Item,Trigger:Lr,Content:b.NavigationMenu.Content,Portal:b.NavigationMenu.Portal,Positioner:b.NavigationMenu.Positioner,Viewport:Br,Popup:qr,Link:zr,Icon:b.NavigationMenu.Icon,Arrow:b.NavigationMenu.Arrow},te="flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50",Er=s.forwardRef(function({className:e,label:t,scrubbable:r=!1,...i},c){return o.jsxs(k.NumberField.Root,{ref:c,className:n("gryt-number-field flex flex-col gap-1.5",e),...i,children:[t&&(r?o.jsxs(k.NumberField.ScrubArea,{className:"cursor-ew-resize text-sm text-gryt-muted select-none",children:[t,o.jsx(k.NumberField.ScrubAreaCursor,{})]}):o.jsx("span",{className:"text-sm text-gryt-muted",children:t})),o.jsxs(k.NumberField.Group,{className:n("flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)","border border-gryt-border bg-gryt-surface-raised","focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",F),children:[o.jsx(k.NumberField.Decrement,{"aria-label":"Decrease",className:n(te,"rounded-l-(--gryt-radius-full)"),children:o.jsx(h.Minus,{size:14,weight:"bold"})}),o.jsx(k.NumberField.Input,{className:n("w-16 border-0 bg-transparent px-1 py-2 text-center","font-mono text-sm text-gryt-text tabular-nums outline-none",u)}),o.jsx(k.NumberField.Increment,{"aria-label":"Increase",className:n(te,"rounded-r-(--gryt-radius-full)"),children:o.jsx(h.Plus,{size:14,weight:"bold"})})]})]})}),Hr=s.forwardRef(function({className:e,length:t=6,...r},i){return o.jsx(ee.OTPField.Root,{ref:i,length:t,className:n("gryt-otp-field flex gap-2",e),...r,children:Array.from({length:t},(c,d)=>o.jsx(ee.OTPField.Input,{className:n("gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center","border border-gryt-border bg-gryt-surface-raised","font-mono text-lg text-gryt-text tabular-nums outline-none","transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none","data-filled:border-gryt-accent",u)},d))})}),Or=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(D.PreviewCard.Positioner,{ref:i,sideOffset:t,className:n("gryt-preview-card-positioner outline-none",e),...r})}),Xr=s.forwardRef(function({className:e,...t},r){return o.jsx(D.PreviewCard.Popup,{ref:r,className:n("gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",C,T,e),...t})}),Yr={Root:D.PreviewCard.Root,Trigger:D.PreviewCard.Trigger,Portal:D.PreviewCard.Portal,Positioner:Or,Popup:Xr,Arrow:D.PreviewCard.Arrow},Qr=s.forwardRef(function({className:e,...t},r){return o.jsx(I.Toolbar.Root,{ref:r,className:n("gryt-toolbar flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Ur=s.forwardRef(function({className:e,...t},r){return o.jsx(I.Toolbar.Separator,{ref:r,className:n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border",e),...t})}),_r={Root:Qr,Group:I.Toolbar.Group,Button:I.Toolbar.Button,Link:I.Toolbar.Link,Input:I.Toolbar.Input,Separator:Ur};exports.Accordion=Bt;exports.Alert=at;exports.AlertDialog=fr;exports.Autocomplete=Tr;exports.Avatar=ie;exports.Badge=ze;exports.Button=ne;exports.Card=Ze;exports.CardActions=rt;exports.CardContent=tt;exports.CardHeader=et;exports.Checkbox=He;exports.CheckboxGroup=kr;exports.Chip=Ee;exports.Collapsible=Mr;exports.Combobox=vr;exports.Composer=Le;exports.ContextMenu=Vt;exports.ConversationItem=Be;exports.Dialog=pt;exports.Divider=Ke;exports.Drawer=Pt;exports.Fieldset=Fr;exports.Form=Dr;exports.GrytProvider=Re;exports.IconButton=De;exports.Menu=E;exports.Menubar=Gr;exports.MessageBubble=$e;exports.Meter=lr;exports.NavigationMenu=Vr;exports.NumberField=Er;exports.OtpField=Hr;exports.Popover=Yt;exports.PreviewCard=Yr;exports.Progress=nt;exports.Radio=Oe;exports.RadioGroup=Xe;exports.ScrollArea=ar;exports.Select=_e;exports.Skeleton=ct;exports.Slider=Qe;exports.Spinner=st;exports.Surface=Ie;exports.Switch=Ye;exports.Tab=le;exports.Tabs=$t;exports.TextField=Ge;exports.Toast=Zt;exports.Toggle=ir;exports.ToggleGroup=cr;exports.Toolbar=_r;exports.Tooltip=We;exports.TooltipProvider=Je;exports.cn=n;exports.createGrytTheme=ae;exports.grytTokens=Q;exports.useMediaQuery=de;exports.useToastManager=er;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),A=require("@base-ui/react/tooltip"),ae=require("@base-ui/react/button"),s=require("react"),be=require("clsx"),xe=require("tailwind-merge"),V=require("@base-ui/react/field"),v=require("@phosphor-icons/react"),H=require("@base-ui/react/avatar"),K=require("@base-ui/react/checkbox"),Z=require("@base-ui/react/radio"),he=require("@base-ui/react/radio-group"),ee=require("@base-ui/react/switch"),G=require("@base-ui/react/slider"),b=require("@base-ui/react/select"),we=require("@base-ui/react/separator"),X=require("@base-ui/react/progress"),C=require("@base-ui/react/dialog"),w=require("@base-ui/react/drawer"),M=require("@base-ui/react/menu"),z=require("@base-ui/react/tabs"),B=require("@base-ui/react/accordion"),P=require("@base-ui/react/context-menu"),N=require("@base-ui/react/popover"),R=require("@base-ui/react/toast"),F=require("@base-ui/react/scroll-area"),ve=require("@base-ui/react/toggle"),je=require("@base-ui/react/toggle-group"),q=require("@base-ui/react/meter"),T=require("@base-ui/react/alert-dialog"),p=require("@base-ui/react/autocomplete"),d=require("@base-ui/react/combobox"),Ne=require("@base-ui/react/checkbox-group"),Q=require("@base-ui/react/collapsible"),Re=require("@base-ui/react/form"),ne=require("@base-ui/react/fieldset"),Pe=require("@base-ui/react/menubar"),x=require("@base-ui/react/navigation-menu"),S=require("@base-ui/react/number-field"),te=require("@base-ui/react/otp-field"),I=require("@base-ui/react/preview-card"),$=require("@base-ui/react/toolbar"),Y={color:{bg:"#111318",surface:"#1a1d24",surfaceRaised:"#1e2028",surfaceHover:"#334155",border:"#2b303d",text:"#e0e0e6",muted:"#888888",accent:"#968FF8",accentLight:"#b4afff",secondary:"#7dd3fc",secondaryLight:"#bae6fd",success:"#4ade80",danger:"#f87171",dangerLight:"#fca5a5",warning:"#fbbf24",onAccent:"#141126",onSecondary:"#07131c",onDanger:"#250b0b"},radius:{sm:8,md:12,lg:20,xl:28,full:999}};function se(a={}){const e={...Y.color,...a.color},t={...Y.radius,...a.radius};return{"--gryt-bg":e.bg,"--gryt-surface":e.surface,"--gryt-surface-raised":e.surfaceRaised,"--gryt-surface-hover":e.surfaceHover,"--gryt-border":e.border,"--gryt-text":e.text,"--gryt-muted":e.muted,"--gryt-accent":e.accent,"--gryt-accent-light":e.accentLight,"--gryt-secondary":e.secondary,"--gryt-secondary-light":e.secondaryLight,"--gryt-success":e.success,"--gryt-danger":e.danger,"--gryt-danger-light":e.dangerLight,"--gryt-warning":e.warning,"--gryt-on-accent":e.onAccent,"--gryt-on-secondary":e.onSecondary,"--gryt-on-danger":e.onDanger,"--color-gryt-bg":e.bg,"--color-gryt-surface":e.surface,"--color-gryt-surface-raised":e.surfaceRaised,"--color-gryt-surface-hover":e.surfaceHover,"--color-gryt-border":e.border,"--color-gryt-text":e.text,"--color-gryt-muted":e.muted,"--color-gryt-accent":e.accent,"--color-gryt-accent-light":e.accentLight,"--color-gryt-secondary":e.secondary,"--color-gryt-secondary-light":e.secondaryLight,"--color-gryt-success":e.success,"--color-gryt-danger":e.danger,"--color-gryt-danger-light":e.dangerLight,"--color-gryt-warning":e.warning,"--color-gryt-on-accent":e.onAccent,"--color-gryt-on-secondary":e.onSecondary,"--color-gryt-on-danger":e.onDanger,"--gryt-radius-sm":`${t.sm}px`,"--gryt-radius-md":`${t.md}px`,"--gryt-radius-lg":`${t.lg}px`,"--gryt-radius-xl":`${t.xl}px`,"--gryt-radius-full":`${t.full}px`}}function Ce(a){return Object.keys(a).some(e=>e.startsWith("--"))}function Te({children:a,className:e,theme:t,tooltipDelay:r=400}){const i=t&&Ce(t)?t:se(t??{});return o.jsx("div",{className:e,style:i,children:o.jsx(A.Tooltip.Provider,{delay:r,children:a})})}function n(...a){return xe.twMerge(be.clsx(a))}const ke={primary:"bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light",secondary:"bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light",neutral:"bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover",danger:"bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light",ghost:"bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},Se={xsmall:"min-h-8 px-3 text-xs",small:"min-h-9 px-4 text-sm",medium:"min-h-10 px-5 text-sm",large:"min-h-12 px-6 text-base"},ie=s.forwardRef(function({children:e,className:t,endIcon:r,size:i="medium",startIcon:c,tone:l="primary",...y},u){return o.jsxs(ae.Button,{ref:u,className:n("gryt-button","inline-flex items-center justify-center gap-2 border-0 shadow-none","rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none","transition-[scale,background-color,color]","duration-(--gryt-dur-spring) ease-spring","motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.03]","motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-50",Se[i],ke[l],t),...y,children:[c,e,r]})}),f="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",Ae="has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light",ce=["w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised","text-gryt-text outline-none placeholder:text-gryt-muted","transition-colors duration-150 motion-reduce:transition-none","hover:border-gryt-accent-light focus:border-gryt-accent","disabled:cursor-not-allowed disabled:opacity-60"].join(" "),le={small:"min-h-9 px-3 py-1.5 text-sm",medium:"min-h-11 px-4 py-2.5 text-sm"},D="rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",k=["transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0"].join(" "),L="data-disabled:cursor-not-allowed data-disabled:opacity-50",Me={primary:"data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",secondary:"data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",neutral:"data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",danger:"data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",success:"data-checked:bg-gryt-success data-checked:text-gryt-on-accent",warning:"data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"},de={primary:"bg-gryt-accent",secondary:"bg-gryt-secondary",neutral:"bg-gryt-surface-hover",danger:"bg-gryt-danger",success:"bg-gryt-success",warning:"bg-gryt-warning"},De={primary:"data-checked:border-gryt-accent",secondary:"data-checked:border-gryt-secondary",neutral:"data-checked:border-gryt-muted",danger:"data-checked:border-gryt-danger",success:"data-checked:border-gryt-success",warning:"data-checked:border-gryt-warning"},Ie={primary:"data-checked:bg-gryt-accent",secondary:"data-checked:bg-gryt-secondary",neutral:"data-checked:bg-gryt-surface-hover",danger:"data-checked:bg-gryt-danger",success:"data-checked:bg-gryt-success",warning:"data-checked:bg-gryt-warning"},$e={primary:"text-gryt-accent hover:not-data-disabled:bg-gryt-accent/10",secondary:"text-gryt-secondary hover:not-data-disabled:bg-gryt-secondary/10",neutral:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",danger:"text-gryt-danger hover:not-data-disabled:bg-gryt-danger/10",ghost:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},Fe={xsmall:"h-8 w-8",small:"h-9 w-9",medium:"h-10 w-10",large:"h-12 w-12"},Le=s.forwardRef(function({className:e,size:t="medium",tone:r="neutral",...i},c){return o.jsx(ae.Button,{ref:c,className:n("gryt-icon-button","inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0","rounded-(--gryt-radius-full) select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.06]","motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.94]",f,L,Fe[t],$e[r],e),...i})}),Ge=s.forwardRef(function({className:e,elevated:t=!1,...r},i){return o.jsx("div",{ref:i,className:n("gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",t?"bg-gryt-surface-raised":"bg-gryt-surface",e),...r})}),qe=s.forwardRef(function({children:e,className:t,from:r="assistant",...i},c){return o.jsx("div",{ref:c,className:n("gryt-message-bubble",r==="user"&&"ml-auto bg-gryt-accent text-gryt-on-accent",r==="assistant"&&"mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",r==="system"&&"mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",t),...i,children:e})}),Be=s.forwardRef(function({className:e,error:t=!1,fieldClassName:r,helperText:i,label:c,minRows:l=3,multiline:y=!1,size:u="medium",...h},g){const j=o.jsx(V.Field.Control,{ref:g,render:y?o.jsx("textarea",{rows:l}):void 0,className:n("gryt-text-field-control",ce,y&&"resize-y leading-6",t?"border-gryt-danger":"border-gryt-border",le[u],e),...h});return o.jsxs(V.Field.Root,{className:n("gryt-text-field flex w-full flex-col gap-1.5",r),children:[c?o.jsx(V.Field.Label,{className:"text-xs font-medium text-gryt-muted",children:c}):null,j,i?o.jsx(V.Field.Description,{className:n("text-xs",t?"text-gryt-danger":"text-gryt-muted"),children:i}):null]})}),ze=s.forwardRef(function({className:e,disabled:t=!1,maxRows:r=8,minRows:i=1,onSubmit:c,placeholder:l="Message Gryt",submitLabel:y="Send",...u},h){const g=s.useRef(null),j=s.useCallback(()=>{const m=g.current;if(!m)return;const _=window.getComputedStyle(m),W=parseFloat(_.lineHeight)||24,J=parseFloat(_.paddingTop)+parseFloat(_.paddingBottom);m.style.height="auto",m.style.height=`${Math.min(Math.max(m.scrollHeight,W*i+J),W*r+J)}px`},[r,i]);s.useLayoutEffect(j,[j,u.value]);function U(m){if(!c){m.preventDefault();return}c(m)}return o.jsxs("form",{className:n("gryt-composer",e),onSubmit:U,children:[o.jsx("textarea",{ref:m=>{g.current=m,typeof h=="function"?h(m):h&&(h.current=m)},rows:i,disabled:t,placeholder:l,onInput:j,className:"gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",...u}),o.jsx(ie,{type:"submit",disabled:t,size:"small",endIcon:o.jsx(v.PaperPlaneTilt,{size:14,weight:"fill"}),children:y})]})}),Ve={small:"h-8 w-8 text-xs",medium:"h-10 w-10 text-sm",large:"h-12 w-12 text-base"},ue=s.forwardRef(function({alt:e,children:t,className:r,fallback:i,size:c="medium",src:l,...y},u){return o.jsxs(H.Avatar.Root,{ref:u,className:n("gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none","rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",Ve[c],r),...y,children:[l?o.jsx(H.Avatar.Image,{src:l,alt:e,className:"h-full w-full object-cover"}):null,o.jsx(H.Avatar.Fallback,{className:"flex h-full w-full items-center justify-center",children:i??t})]})}),Ee=s.forwardRef(function({active:e=!1,avatar:t,className:r,subtitle:i,title:c,...l},y){return o.jsxs("button",{ref:y,type:"button",className:n("gryt-conversation-item",e?"bg-gryt-accent text-gryt-on-accent":"text-gryt-text hover:bg-white/5",r),...l,children:[t??o.jsx(ue,{size:"small",className:n(e?"bg-gryt-on-accent text-gryt-accent ring-transparent":"bg-gryt-surface-raised text-gryt-text"),children:c.slice(0,1).toUpperCase()}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-semibold",children:c}),i?o.jsx("span",{className:n("block truncate text-xs",e?"text-gryt-on-accent/70":"text-gryt-muted"),children:i}):null]})]})}),Oe=s.forwardRef(function({badgeContent:e,children:t,className:r,max:i=99,showZero:c=!1,...l},y){const u=typeof e=="number"?e:null,h=u!==null&&u===0&&!c,g=u!==null&&u>i?`${i}+`:e;return o.jsxs("span",{ref:y,className:n("gryt-badge relative inline-flex",r),...l,children:[t,e!==void 0&&!h?o.jsx("span",{className:n("gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center","min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5","bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent","ring-2 ring-gryt-bg"),children:g}):null]})}),_e={neutral:"border-gryt-border bg-gryt-surface-raised text-gryt-text",primary:"border-gryt-accent/40 bg-gryt-accent/12 text-gryt-accent",secondary:"border-gryt-secondary/40 bg-gryt-secondary/12 text-gryt-secondary",success:"border-gryt-success/40 bg-gryt-success/12 text-gryt-success",warning:"border-gryt-warning/40 bg-gryt-warning/12 text-gryt-warning",danger:"border-gryt-danger/40 bg-gryt-danger/12 text-gryt-danger"},He=s.forwardRef(function({children:e,className:t,icon:r,label:i,onDelete:c,tone:l="neutral",...y},u){return o.jsxs("span",{ref:u,className:n("gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",_e[l],t),...y,children:[r,i??e,c?o.jsx("button",{type:"button","aria-label":"Remove",onClick:c,className:n("-mr-1 inline-flex h-4 w-4 items-center justify-center rounded-(--gryt-radius-full)","opacity-70 transition-opacity hover:opacity-100",f),children:o.jsx(v.X,{size:10,weight:"bold","aria-hidden":"true"})}):null]})}),Xe=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(K.Checkbox.Root,{ref:i,className:n("gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",f,L,Me[t],e),...r,children:o.jsx(K.Checkbox.Indicator,{keepMounted:!0,className:n("flex origin-center","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none"),children:o.jsx(v.Check,{size:12,weight:"bold"})})})}),Ye=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(Z.Radio.Root,{ref:i,className:n("gryt-radio flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",f,L,De[t],e),...r,children:o.jsx(Z.Radio.Indicator,{keepMounted:!0,className:n("h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none",de[t])})})}),Qe=s.forwardRef(function({className:e,...t},r){return o.jsx(he.RadioGroup,{ref:r,className:n("gryt-radio-group flex flex-col gap-2",e),...t})}),Ue=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(ee.Switch.Root,{ref:i,className:n("gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.05]","motion-safe:active:not-data-disabled:scale-[0.95]",f,L,Ie[t],e),...r,children:o.jsx(ee.Switch.Thumb,{className:n("h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text","transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-checked:translate-x-4 data-checked:bg-gryt-bg")})})}),re=3;function We({className:a,tone:e="primary","aria-label":t,...r}){const[i,c]=s.useState(!1),l=s.useRef(null);s.useEffect(()=>{if(!i&&l.current===null)return;const g=()=>{l.current=null,c(!1)};return window.addEventListener("pointerup",g),window.addEventListener("pointercancel",g),()=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g)}},[i]);function y(g){l.current={x:g.clientX,y:g.clientY}}function u(g){const j=l.current;if(j===null||i)return;(Math.abs(g.clientX-j.x)>re||Math.abs(g.clientY-j.y)>re)&&c(!0)}const h=i?"transition-none":"duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";return o.jsx(G.Slider.Root,{className:n("gryt-slider w-full",a),...r,children:o.jsx(G.Slider.Control,{className:"flex w-full touch-none items-center py-2 select-none",onPointerDown:y,onPointerMove:u,children:o.jsxs(G.Slider.Track,{className:"h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none",children:[o.jsx(G.Slider.Indicator,{className:n("h-full rounded-(--gryt-radius-full) select-none","transition-[width]",h,de[e])}),o.jsx(G.Slider.Thumb,{"aria-label":t,className:n("group h-4 w-4 rounded-(--gryt-radius-full) select-none","transition-[inset-inline-start]",h,Ae),children:o.jsx("span",{className:n("block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]","motion-reduce:transition-none")})})]})})})}const Je={small:"min-h-9 px-3 text-sm",medium:"min-h-11 px-4 text-sm"};function Ke({className:a,label:e,options:t=[],placeholder:r="Select",size:i="medium",...c}){return o.jsxs(b.Select.Root,{items:t,...c,children:[o.jsxs("div",{className:n("gryt-select flex w-full flex-col gap-1.5",a),children:[e?o.jsx(b.Select.Label,{className:"text-xs font-medium text-gryt-muted",children:e}):null,o.jsxs(b.Select.Trigger,{className:n("flex w-full items-center justify-between gap-2","rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised","text-gryt-text select-none","transition-colors duration-150 hover:border-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-60",f,Je[i]),children:[o.jsx(b.Select.Value,{placeholder:r}),o.jsx(b.Select.Icon,{className:"shrink-0 text-gryt-muted",children:o.jsx(v.CaretUpDown,{size:16})})]})]}),o.jsx(b.Select.Portal,{children:o.jsx(b.Select.Positioner,{sideOffset:6,className:"outline-none",children:o.jsx(b.Select.Popup,{className:n("min-w-(--anchor-width) p-1",D,k),children:o.jsx(b.Select.List,{children:t.map(l=>o.jsxs(b.Select.Item,{value:l.value,disabled:l.disabled,className:n("flex cursor-default items-center justify-between gap-2","rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text","outline-none select-none data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50"),children:[o.jsx(b.Select.ItemText,{children:l.label}),o.jsx(b.Select.ItemIndicator,{className:"text-gryt-accent",children:o.jsx(v.Check,{size:14,weight:"bold"})})]},String(l.value)))})})})})]})}function Ze({children:a,className:e,side:t="top",sideOffset:r=8,title:i}){return o.jsxs(A.Tooltip.Root,{children:[o.jsx(A.Tooltip.Trigger,{render:a}),o.jsx(A.Tooltip.Portal,{children:o.jsx(A.Tooltip.Positioner,{side:t,sideOffset:r,children:o.jsx(A.Tooltip.Popup,{className:n("gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised","px-2.5 py-1.5 text-xs text-gryt-text",k,e),children:i})})})]})}const et=A.Tooltip.Provider,tt=s.forwardRef(function({className:e,orientation:t="horizontal",...r},i){return o.jsx(we.Separator,{ref:i,orientation:t,className:n("gryt-divider bg-gryt-border",t==="vertical"?"h-full w-px":"h-px w-full",e),...r})}),rt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",e),...t})});function ot({children:a,className:e,subheader:t,title:r,...i}){return o.jsxs("div",{className:n("gryt-card-header flex flex-col gap-1 p-4",e),...i,children:[r?o.jsx("span",{className:"text-base font-semibold text-gryt-text",children:r}):null,t?o.jsx("span",{className:"text-sm text-gryt-muted",children:t}):null,a]})}function at({className:a,...e}){return o.jsx("div",{className:n("gryt-card-content px-4 pb-4 text-sm text-gryt-muted",a),...e})}function nt({className:a,...e}){return o.jsx("div",{className:n("gryt-card-actions flex items-center gap-2 px-4 pb-4",a),...e})}const st={info:"border-gryt-secondary/40 bg-gryt-secondary/10 text-gryt-secondary",success:"border-gryt-success/40 bg-gryt-success/10 text-gryt-success",warning:"border-gryt-warning/40 bg-gryt-warning/10 text-gryt-warning",error:"border-gryt-danger/40 bg-gryt-danger/10 text-gryt-danger"},it=s.forwardRef(function({className:e,severity:t="info",...r},i){return o.jsx("div",{ref:i,role:"alert",className:n("gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",st[t],e),...r})});function ct({className:a,value:e=null,...t}){return o.jsx(X.Progress.Root,{value:e,className:n("gryt-progress w-full",a),...t,children:o.jsx(X.Progress.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(X.Progress.Indicator,{className:"h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-300 ease-out motion-reduce:transition-none"})})})}function lt({className:a,size:e=24,"aria-label":t="Loading"}){return o.jsx(v.CircleNotch,{role:"status","aria-label":t,size:e,weight:"bold",className:n("gryt-spinner text-gryt-accent motion-safe:animate-spin",a)})}const dt={text:"h-4 rounded-(--gryt-radius-sm)",rounded:"rounded-(--gryt-radius-lg)",circular:"rounded-(--gryt-radius-full)",rectangular:"rounded-none"};function ut({className:a,height:e,style:t,variant:r="text",width:i,...c}){const l={width:i,height:e,...t};return o.jsx("div",{"aria-hidden":"true",className:n("gryt-skeleton bg-white/9 motion-safe:animate-pulse",dt[r],a),style:l,...c})}const ge="transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",gt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Backdrop,{ref:r,className:n("gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)",ge,"data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}),yt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Popup,{ref:r,className:n("gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","flex w-96 max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",ge,"data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",e),...t})}),pt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Title,{ref:r,className:n("gryt-dialog-title text-base font-semibold text-gryt-text",e),...t})}),ft=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Description,{ref:r,className:n("gryt-dialog-description text-sm text-gryt-muted",e),...t})}),mt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-dialog-footer flex justify-end gap-3",e),...t})}),bt={Root:C.Dialog.Root,Trigger:C.Dialog.Trigger,Portal:C.Dialog.Portal,Close:C.Dialog.Close,Backdrop:gt,Popup:yt,Title:pt,Description:ft,Footer:mt},xt=()=>()=>{};function ye(a){const e=s.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return xt();const i=window.matchMedia(a);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[a]),t=s.useCallback(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(a).matches,[a]);return s.useSyncExternalStore(e,t,()=>!1)}const ht={left:"left",right:"right",top:"up",bottom:"down"},O=s.createContext("right"),wt={left:"items-stretch justify-start",right:"items-stretch justify-end",top:"items-start justify-center",bottom:"items-end justify-center"},vt={left:"rounded-r-(--gryt-radius-xl)",right:"rounded-l-(--gryt-radius-xl)",top:"rounded-b-(--gryt-radius-xl)",bottom:"rounded-t-(--gryt-radius-xl)"},jt={left:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),right:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-mr-(--gryt-drawer-bleed) border-l py-5 pl-5 pr-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]"].join(" "),top:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mt-(--gryt-drawer-bleed) border-b px-5 pb-5 pt-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),bottom:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mb-(--gryt-drawer-bleed) border-t px-5 pt-5 pb-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"].join(" ")};function Nt({side:a="right",sheetOnMobile:e=!0,children:t,...r}){const i=ye("(max-width: 767px)"),c=e&&i?"bottom":a;return o.jsx(O.Provider,{value:c,children:o.jsx(w.Drawer.Root,{swipeDirection:ht[c],...r,children:t})})}const Rt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(O);return o.jsx(w.Drawer.Viewport,{ref:r,className:n("gryt-drawer-viewport fixed inset-0 z-50 flex",wt[i],e),...t})}),Pt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(O);return o.jsx(w.Drawer.Popup,{ref:r,className:n("gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text","overflow-y-auto overscroll-contain outline-none","transition-transform duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0 data-swiping:select-none","motion-reduce:transition-none",jt[i],vt[i],e),...t})}),Ct=s.forwardRef(function({className:e,...t},r){return o.jsx(w.Drawer.Backdrop,{ref:r,className:n("gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","[opacity:calc(1-var(--drawer-swipe-progress,0))]","transition-opacity duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0","data-starting-style:opacity-0 data-ending-style:opacity-0","motion-reduce:transition-none",e),...t})});function Tt({className:a}){const e=s.useContext(O);return e!=="bottom"&&e!=="top"?null:o.jsx("div",{"aria-hidden":!0,className:n("gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",e==="top"&&"order-last",a)})}const kt={Root:Nt,Trigger:w.Drawer.Trigger,Portal:w.Drawer.Portal,Backdrop:Ct,Viewport:Rt,Popup:Pt,Content:w.Drawer.Content,Grabber:Tt,Close:w.Drawer.Close,Title:w.Drawer.Title,Description:w.Drawer.Description},St=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(M.Menu.Positioner,{ref:i,sideOffset:t,className:n("gryt-menu-positioner outline-none",e),...r})}),At=s.forwardRef(function({className:e,...t},r){return o.jsx(M.Menu.Popup,{ref:r,className:n("gryt-menu min-w-44 p-1 outline-none",D,k,e),...t})}),Mt=s.forwardRef(function({className:e,...t},r){return o.jsx(M.Menu.Item,{ref:r,className:n("gryt-menu-item flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...t})}),Dt=s.forwardRef(function({className:e,...t},r){return o.jsx(M.Menu.Separator,{ref:r,className:n("gryt-menu-separator my-1 h-px bg-gryt-border",e),...t})}),E={Root:M.Menu.Root,Trigger:M.Menu.Trigger,Portal:M.Menu.Portal,Positioner:St,Popup:At,Item:Mt,Separator:Dt},It=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Root,{ref:r,className:n("gryt-tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",e),...t})}),$t=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.List,{ref:r,className:n("gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1","data-[orientation=vertical]:flex data-[orientation=vertical]:shrink-0","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch","data-[orientation=vertical]:rounded-(--gryt-radius-lg)",e),...t})}),pe=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Tab,{ref:r,className:n("gryt-tab inline-flex min-h-8 items-center justify-center whitespace-nowrap","rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5","text-sm font-medium text-gryt-muted select-none","relative z-10 transition-colors duration-150 hover:text-gryt-text","data-active:text-gryt-on-accent","data-[orientation=vertical]:min-h-9 data-[orientation=vertical]:justify-start","data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3","data-[orientation=vertical]:rounded-(--gryt-radius-md)",f,e),...t})}),Ft=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Indicator,{ref:r,renderBeforeHydration:!0,className:n("gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]","w-(--active-tab-width) translate-x-(--active-tab-left)","rounded-(--gryt-radius-full) bg-gryt-accent","transition-[translate,width] duration-(--gryt-dur-spring) ease-spring","motion-reduce:transition-none","[[data-orientation=vertical]_&]:top-0 [[data-orientation=vertical]_&]:left-1","[[data-orientation=vertical]_&]:h-(--active-tab-height)","[[data-orientation=vertical]_&]:w-[calc(100%-0.5rem)]","[[data-orientation=vertical]_&]:translate-x-0","[[data-orientation=vertical]_&]:translate-y-(--active-tab-top)","[[data-orientation=vertical]_&]:rounded-(--gryt-radius-md)","[[data-orientation=vertical]_&]:transition-[translate,height]",e),...t})}),Lt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Panel,{ref:r,className:n("gryt-tabs-panel pt-3 text-sm text-gryt-text","data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:flex-1","data-[orientation=vertical]:pt-0 data-[orientation=vertical]:pl-4",e),...t})}),Gt=Object.assign(It,{List:$t,Tab:pe,Panel:Lt,Indicator:Ft}),qt=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Root,{ref:r,className:n("gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",e),...t})}),Bt=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Item,{ref:r,className:n("gryt-accordion-item",e),...t})}),zt=s.forwardRef(function({children:e,className:t,expandIcon:r,...i},c){return o.jsx(B.Accordion.Header,{className:"gryt-accordion-header m-0",children:o.jsxs(B.Accordion.Trigger,{ref:c,className:n("gryt-accordion-trigger flex w-full items-center justify-between gap-3","rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5","text-left text-sm font-medium text-gryt-text select-none","transition-colors duration-150 hover:bg-gryt-surface-raised",f,t),...i,children:[e,r===void 0?o.jsx(v.CaretDown,{size:16,className:"shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"}):r]})})}),Vt=s.forwardRef(function({children:e,className:t,...r},i){return o.jsx(B.Accordion.Panel,{ref:i,className:n("gryt-accordion-panel overflow-hidden text-sm text-gryt-muted","h-[var(--accordion-panel-height)] transition-[height] duration-(--gryt-dur-spring-soft) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",t),...r,children:o.jsx("div",{className:"px-3 pt-1 pb-3",children:e})})}),Et=Object.assign(qt,{Item:Bt,Trigger:zt,Panel:Vt}),Ot=s.forwardRef(function({className:e,sideOffset:t=2,...r},i){return o.jsx(P.ContextMenu.Positioner,{ref:i,sideOffset:t,className:n("gryt-context-menu-positioner outline-none",e),...r})}),_t={Root:P.ContextMenu.Root,Trigger:P.ContextMenu.Trigger,Portal:P.ContextMenu.Portal,Positioner:Ot,Popup:E.Popup,Item:E.Item,Separator:E.Separator,Group:P.ContextMenu.Group,GroupLabel:P.ContextMenu.GroupLabel,SubmenuRoot:P.ContextMenu.SubmenuRoot,SubmenuTrigger:P.ContextMenu.SubmenuTrigger},Ht=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(N.Popover.Positioner,{ref:i,sideOffset:t,className:n("gryt-popover-positioner outline-none",e),...r})}),Xt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Popup,{ref:r,className:n("gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",D,k,e),...t})}),Yt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Title,{ref:r,className:n("gryt-popover-title text-sm font-semibold text-gryt-text",e),...t})}),Qt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Description,{ref:r,className:n("gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",e),...t})}),Ut={Root:N.Popover.Root,Trigger:N.Popover.Trigger,Portal:N.Popover.Portal,Positioner:Ht,Popup:Xt,Title:Yt,Description:Qt,Close:N.Popover.Close,Arrow:N.Popover.Arrow},Wt={neutral:"border-white/8 bg-gryt-surface",info:"border-gryt-secondary/30 bg-gryt-secondary/8",success:"border-gryt-success/30 bg-gryt-success/8",warning:"border-gryt-warning/30 bg-gryt-warning/8",danger:"border-gryt-danger/30 bg-gryt-danger/8"},Jt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Viewport,{ref:r,className:n("gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]","flex-col gap-2 outline-none",e),...t})}),Kt=s.forwardRef(function({className:e,severity:t="neutral",...r},i){return o.jsx(R.Toast.Root,{ref:i,className:n("gryt-toast relative flex flex-col p-3 pr-9","rounded-(--gryt-radius-xl) border text-gryt-text",Wt[t],"transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring","data-starting-style:translate-y-2 data-starting-style:opacity-0","data-ending-style:translate-y-2 data-ending-style:opacity-0","motion-reduce:transition-none",e),...r})}),Zt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Title,{ref:r,className:n("gryt-toast-title text-sm font-semibold text-gryt-text",e),...t})}),er=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Description,{ref:r,className:n("gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",e),...t})}),tr=s.forwardRef(function({className:e,children:t,...r},i){return o.jsx(R.Toast.Close,{ref:i,"aria-label":"Close",className:n("gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center","rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted","transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",e),...r,children:t??o.jsx(v.X,{size:14,weight:"bold"})})}),rr=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Action,{ref:r,className:n("gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0","bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:scale-[1.04] motion-safe:active:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",e),...t})}),or={Provider:R.Toast.Provider,Portal:R.Toast.Portal,Viewport:Jt,Root:Kt,Title:Zt,Description:er,Close:tr,Action:rr},ar=R.Toast.useToastManager,nr=s.forwardRef(function({className:e,...t},r){return o.jsx(F.ScrollArea.Root,{ref:r,className:n("gryt-scroll-area relative",e),...t})}),sr=s.forwardRef(function({className:e,...t},r){return o.jsx(F.ScrollArea.Viewport,{ref:r,className:n("gryt-scroll-area-viewport h-full w-full overscroll-contain","focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",e),...t})}),ir=s.forwardRef(function({className:e,orientation:t,...r},i){return o.jsx(F.ScrollArea.Scrollbar,{ref:i,orientation:t,className:n("gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none","opacity-0 transition-opacity duration-(--gryt-dur-fast)","data-hovering:opacity-100 data-scrolling:opacity-100","motion-reduce:transition-none",t==="horizontal"?"h-2 flex-col":"w-2",e),...r,children:o.jsx(F.ScrollArea.Thumb,{className:"flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none"})})}),cr={Root:nr,Viewport:sr,Scrollbar:ir,Content:F.ScrollArea.Content,Corner:F.ScrollArea.Corner},lr={primary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent","data-pressed:hover:not-data-disabled:bg-gryt-accent"].join(" "),secondary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-secondary data-pressed:text-gryt-on-secondary","data-pressed:hover:not-data-disabled:bg-gryt-secondary"].join(" "),neutral:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-surface-hover data-pressed:text-gryt-text"].join(" "),danger:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger","data-pressed:hover:not-data-disabled:bg-gryt-danger"].join(" ")},dr={xsmall:"h-8 min-w-8 px-2 text-xs",small:"h-9 min-w-9 px-2.5 text-sm",medium:"h-10 min-w-10 px-3 text-sm",large:"h-12 min-w-12 px-4 text-base"},ur=s.forwardRef(function({className:e,size:t="medium",tone:r="primary",...i},c){return o.jsx(ve.Toggle,{ref:c,className:n("gryt-toggle","inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent","rounded-(--gryt-radius-full) font-medium select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:not-data-disabled:scale-[1.06]","motion-safe:active:not-data-disabled:scale-[0.94]",f,L,dr[t],lr[r],e),...i})}),gr=s.forwardRef(function({className:e,...t},r){return o.jsx(je.ToggleGroup,{ref:r,className:n("gryt-toggle-group inline-flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),yr={primary:"bg-gryt-accent",success:"bg-gryt-success",warning:"bg-gryt-warning",danger:"bg-gryt-danger"};function pr({className:a,value:e,label:t,showValue:r=!1,tone:i="primary",...c}){return o.jsxs(q.Meter.Root,{value:e,className:n("gryt-meter flex w-full flex-col gap-1.5",a),...c,children:[(t||r)&&o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t?o.jsx(q.Meter.Label,{className:"text-sm text-gryt-muted",children:t}):o.jsx("span",{}),r&&o.jsx(q.Meter.Value,{className:"font-mono text-xs text-gryt-muted tabular-nums"})]}),o.jsx(q.Meter.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(q.Meter.Indicator,{className:n("h-full rounded-(--gryt-radius-full)","transition-[width] duration-120 ease-out motion-reduce:transition-none",yr[i])})})]})}const fr=s.forwardRef(function({className:e,...t},r){return o.jsx(T.AlertDialog.Popup,{ref:r,className:n("gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","flex w-96 max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text","outline-none","transition-[opacity,scale] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",e),...t})}),mr=s.forwardRef(function({className:e,...t},r){return o.jsx(T.AlertDialog.Backdrop,{ref:r,className:n("gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}),br=s.forwardRef(function({className:e,...t},r){return o.jsx(T.AlertDialog.Title,{ref:r,className:n("gryt-alert-dialog-title text-lg font-semibold text-gryt-text",e),...t})}),xr=s.forwardRef(function({className:e,...t},r){return o.jsx(T.AlertDialog.Description,{ref:r,className:n("gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",e),...t})}),hr={Root:T.AlertDialog.Root,Trigger:T.AlertDialog.Trigger,Portal:T.AlertDialog.Portal,Backdrop:mr,Popup:fr,Title:br,Description:xr,Close:T.AlertDialog.Close},fe=["flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-selected:text-gryt-accent","data-disabled:cursor-not-allowed data-disabled:opacity-50"].join(" "),me=[ce,le.medium,"border-gryt-border",f].join(" "),wr=s.forwardRef(function({className:e,...t},r){return o.jsx(d.Combobox.Input,{ref:r,className:n("gryt-combobox-input",me,e),...t})}),vr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(d.Combobox.Positioner,{ref:i,sideOffset:t,className:n("gryt-combobox-positioner outline-none",e),...r})}),jr=s.forwardRef(function({className:e,...t},r){return o.jsx(d.Combobox.Popup,{ref:r,className:n("gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",D,k,e),...t})}),Nr=s.forwardRef(function({className:e,...t},r){return o.jsx(d.Combobox.Item,{ref:r,className:n("gryt-combobox-item",fe,e),...t})}),Rr=s.forwardRef(function({className:e,...t},r){return o.jsx(d.Combobox.Empty,{ref:r,className:n("gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Pr={Root:d.Combobox.Root,Input:wr,InputGroup:d.Combobox.InputGroup,Trigger:d.Combobox.Trigger,Icon:d.Combobox.Icon,Clear:d.Combobox.Clear,Value:d.Combobox.Value,Chips:d.Combobox.Chips,Chip:d.Combobox.Chip,ChipRemove:d.Combobox.ChipRemove,Portal:d.Combobox.Portal,Positioner:vr,Popup:jr,List:d.Combobox.List,Item:Nr,ItemIndicator:d.Combobox.ItemIndicator,Group:d.Combobox.Group,GroupLabel:d.Combobox.GroupLabel,Empty:Rr,Separator:d.Combobox.Separator},Cr=s.forwardRef(function({className:e,...t},r){return o.jsx(p.Autocomplete.Input,{ref:r,className:n("gryt-autocomplete-input",me,e),...t})}),Tr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(p.Autocomplete.Positioner,{ref:i,sideOffset:t,className:n("gryt-autocomplete-positioner outline-none",e),...r})}),kr=s.forwardRef(function({className:e,...t},r){return o.jsx(p.Autocomplete.Popup,{ref:r,className:n("gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",D,k,e),...t})}),Sr=s.forwardRef(function({className:e,...t},r){return o.jsx(p.Autocomplete.Item,{ref:r,className:n("gryt-autocomplete-item",fe,e),...t})}),Ar=s.forwardRef(function({className:e,...t},r){return o.jsx(p.Autocomplete.Empty,{ref:r,className:n("gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Mr={Root:p.Autocomplete.Root,Input:Cr,InputGroup:p.Autocomplete.InputGroup,Trigger:p.Autocomplete.Trigger,Icon:p.Autocomplete.Icon,Clear:p.Autocomplete.Clear,Value:p.Autocomplete.Value,Portal:p.Autocomplete.Portal,Positioner:Tr,Popup:kr,List:p.Autocomplete.List,Item:Sr,Group:p.Autocomplete.Group,GroupLabel:p.Autocomplete.GroupLabel,Empty:Ar,Separator:p.Autocomplete.Separator},Dr=s.forwardRef(function({className:e,...t},r){return o.jsx(Ne.CheckboxGroup,{ref:r,className:n("gryt-checkbox-group flex flex-col gap-2",e),...t})}),Ir=s.forwardRef(function({className:e,...t},r){return o.jsx(Q.Collapsible.Trigger,{ref:r,className:n("gryt-collapsible-trigger flex w-full items-center justify-between gap-2","rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left","text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",f,e),...t})}),$r=s.forwardRef(function({className:e,...t},r){return o.jsx(Q.Collapsible.Panel,{ref:r,className:n("gryt-collapsible-panel overflow-hidden","h-(--collapsible-panel-height) transition-[height] duration-(--gryt-dur-spring) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",e),...t})}),Fr={Root:Q.Collapsible.Root,Trigger:Ir,Panel:$r},Lr=s.forwardRef(function({className:e,...t},r){return o.jsx(Re.Form,{ref:r,className:n("gryt-form flex flex-col gap-(--gryt-space-lg)",e),...t})}),Gr=s.forwardRef(function({className:e,...t},r){return o.jsx(ne.Fieldset.Root,{ref:r,className:n("gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",e),...t})}),qr=s.forwardRef(function({className:e,...t},r){return o.jsx(ne.Fieldset.Legend,{ref:r,className:n("gryt-fieldset-legend text-sm font-semibold text-gryt-text",e),...t})}),Br={Root:Gr,Legend:qr},zr=s.forwardRef(function({className:e,...t},r){return o.jsx(Pe.Menubar,{ref:r,className:n("gryt-menubar flex items-center gap-1","rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Vr=s.forwardRef(function({className:e,...t},r){return o.jsx(x.NavigationMenu.Trigger,{ref:r,className:n("gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)","border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none","data-popup-open:bg-gryt-surface-raised",f,e),...t})}),Er=s.forwardRef(function({className:e,...t},r){return o.jsx(x.NavigationMenu.Popup,{ref:r,className:n("gryt-navigation-menu-popup outline-none",D,k,e),...t})}),Or=s.forwardRef(function({className:e,...t},r){return o.jsx(x.NavigationMenu.Viewport,{ref:r,className:n("gryt-navigation-menu-viewport relative overflow-hidden",e),...t})}),_r=s.forwardRef(function({className:e,...t},r){return o.jsx(x.NavigationMenu.Link,{ref:r,className:n("gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2","text-sm text-gryt-text no-underline outline-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",f,e),...t})}),Hr={Root:x.NavigationMenu.Root,List:x.NavigationMenu.List,Item:x.NavigationMenu.Item,Trigger:Vr,Content:x.NavigationMenu.Content,Portal:x.NavigationMenu.Portal,Positioner:x.NavigationMenu.Positioner,Viewport:Or,Popup:Er,Link:_r,Icon:x.NavigationMenu.Icon,Arrow:x.NavigationMenu.Arrow},oe="flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50",Xr=s.forwardRef(function({className:e,label:t,scrubbable:r=!1,...i},c){return o.jsxs(S.NumberField.Root,{ref:c,className:n("gryt-number-field flex flex-col gap-1.5",e),...i,children:[t&&(r?o.jsxs(S.NumberField.ScrubArea,{className:"cursor-ew-resize text-sm text-gryt-muted select-none",children:[t,o.jsx(S.NumberField.ScrubAreaCursor,{})]}):o.jsx("span",{className:"text-sm text-gryt-muted",children:t})),o.jsxs(S.NumberField.Group,{className:n("flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)","border border-gryt-border bg-gryt-surface-raised","focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",L),children:[o.jsx(S.NumberField.Decrement,{"aria-label":"Decrease",className:n(oe,"rounded-l-(--gryt-radius-full)"),children:o.jsx(v.Minus,{size:14,weight:"bold"})}),o.jsx(S.NumberField.Input,{className:n("w-16 border-0 bg-transparent px-1 py-2 text-center","font-mono text-sm text-gryt-text tabular-nums outline-none",f)}),o.jsx(S.NumberField.Increment,{"aria-label":"Increase",className:n(oe,"rounded-r-(--gryt-radius-full)"),children:o.jsx(v.Plus,{size:14,weight:"bold"})})]})]})}),Yr=s.forwardRef(function({className:e,length:t=6,...r},i){return o.jsx(te.OTPField.Root,{ref:i,length:t,className:n("gryt-otp-field flex gap-2",e),...r,children:Array.from({length:t},(c,l)=>o.jsx(te.OTPField.Input,{className:n("gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center","border border-gryt-border bg-gryt-surface-raised","font-mono text-lg text-gryt-text tabular-nums outline-none","transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none","data-filled:border-gryt-accent",f)},l))})}),Qr=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(I.PreviewCard.Positioner,{ref:i,sideOffset:t,className:n("gryt-preview-card-positioner outline-none",e),...r})}),Ur=s.forwardRef(function({className:e,...t},r){return o.jsx(I.PreviewCard.Popup,{ref:r,className:n("gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",D,k,e),...t})}),Wr={Root:I.PreviewCard.Root,Trigger:I.PreviewCard.Trigger,Portal:I.PreviewCard.Portal,Positioner:Qr,Popup:Ur,Arrow:I.PreviewCard.Arrow},Jr=s.forwardRef(function({className:e,...t},r){return o.jsx($.Toolbar.Root,{ref:r,className:n("gryt-toolbar flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Kr=s.forwardRef(function({className:e,...t},r){return o.jsx($.Toolbar.Separator,{ref:r,className:n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border",e),...t})}),Zr={Root:Jr,Group:$.Toolbar.Group,Button:$.Toolbar.Button,Link:$.Toolbar.Link,Input:$.Toolbar.Input,Separator:Kr};exports.Accordion=Et;exports.Alert=it;exports.AlertDialog=hr;exports.Autocomplete=Mr;exports.Avatar=ue;exports.Badge=Oe;exports.Button=ie;exports.Card=rt;exports.CardActions=nt;exports.CardContent=at;exports.CardHeader=ot;exports.Checkbox=Xe;exports.CheckboxGroup=Dr;exports.Chip=He;exports.Collapsible=Fr;exports.Combobox=Pr;exports.Composer=ze;exports.ContextMenu=_t;exports.ConversationItem=Ee;exports.Dialog=bt;exports.Divider=tt;exports.Drawer=kt;exports.Fieldset=Br;exports.Form=Lr;exports.GrytProvider=Te;exports.IconButton=Le;exports.Menu=E;exports.Menubar=zr;exports.MessageBubble=qe;exports.Meter=pr;exports.NavigationMenu=Hr;exports.NumberField=Xr;exports.OtpField=Yr;exports.Popover=Ut;exports.PreviewCard=Wr;exports.Progress=ct;exports.Radio=Ye;exports.RadioGroup=Qe;exports.ScrollArea=cr;exports.Select=Ke;exports.Skeleton=ut;exports.Slider=We;exports.Spinner=lt;exports.Surface=Ge;exports.Switch=Ue;exports.Tab=pe;exports.Tabs=Gt;exports.TextField=Be;exports.Toast=or;exports.Toggle=ur;exports.ToggleGroup=gr;exports.Toolbar=Zr;exports.Tooltip=Ze;exports.TooltipProvider=et;exports.cn=n;exports.createGrytTheme=se;exports.grytTokens=Y;exports.useMediaQuery=ye;exports.useToastManager=ar;
2
2
  //# sourceMappingURL=index.cjs.map