@aotter/mantle-ui 0.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +163 -0
  3. package/dist/admin/assets/developer-workspace-D6ZBl-hH.js +27 -0
  4. package/dist/admin/assets/developer-workspace-DLioOiRN.css +1 -0
  5. package/dist/admin/assets/html-editor-aFwAzRmq.js +129 -0
  6. package/dist/admin/assets/index-C0Ini5Qc.css +2 -0
  7. package/dist/admin/assets/index-DQemY7Xp.js +71 -0
  8. package/dist/admin/assets/markdown-editor-rSCtXCtH.js +29 -0
  9. package/dist/admin/assets/with-selector-BnwVHY9y.js +1 -0
  10. package/dist/admin/favicon.png +0 -0
  11. package/dist/admin/favicon.svg +20 -0
  12. package/dist/admin/index.html +18 -0
  13. package/dist/admin/preview.html +18 -0
  14. package/dist/admin/theme.js +64 -0
  15. package/dist/app/bridge.d.ts +75 -0
  16. package/dist/app/bridge.d.ts.map +1 -0
  17. package/dist/app/bridge.js +96 -0
  18. package/dist/app/bridge.js.map +1 -0
  19. package/dist/controller/index.d.ts +142 -0
  20. package/dist/controller/index.d.ts.map +1 -0
  21. package/dist/controller/index.js +279 -0
  22. package/dist/controller/index.js.map +1 -0
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +8 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/kit/components/auth-card.d.ts +15 -0
  28. package/dist/kit/components/auth-card.d.ts.map +1 -0
  29. package/dist/kit/components/auth-card.js +12 -0
  30. package/dist/kit/components/auth-card.js.map +1 -0
  31. package/dist/kit/components/one-time-code-input.d.ts +4 -0
  32. package/dist/kit/components/one-time-code-input.d.ts.map +1 -0
  33. package/dist/kit/components/one-time-code-input.js +7 -0
  34. package/dist/kit/components/one-time-code-input.js.map +1 -0
  35. package/dist/kit/components/sign-in-flow.d.ts +94 -0
  36. package/dist/kit/components/sign-in-flow.d.ts.map +1 -0
  37. package/dist/kit/components/sign-in-flow.js +108 -0
  38. package/dist/kit/components/sign-in-flow.js.map +1 -0
  39. package/dist/kit/components/ui/alert-dialog.d.ts +19 -0
  40. package/dist/kit/components/ui/alert-dialog.d.ts.map +1 -0
  41. package/dist/kit/components/ui/alert-dialog.js +43 -0
  42. package/dist/kit/components/ui/alert-dialog.js.map +1 -0
  43. package/dist/kit/components/ui/avatar.d.ts +12 -0
  44. package/dist/kit/components/ui/avatar.d.ts.map +1 -0
  45. package/dist/kit/components/ui/avatar.js +24 -0
  46. package/dist/kit/components/ui/avatar.js.map +1 -0
  47. package/dist/kit/components/ui/badge.d.ts +10 -0
  48. package/dist/kit/components/ui/badge.d.ts.map +1 -0
  49. package/dist/kit/components/ui/badge.js +25 -0
  50. package/dist/kit/components/ui/badge.js.map +1 -0
  51. package/dist/kit/components/ui/breadcrumb.d.ts +13 -0
  52. package/dist/kit/components/ui/breadcrumb.d.ts.map +1 -0
  53. package/dist/kit/components/ui/breadcrumb.js +25 -0
  54. package/dist/kit/components/ui/breadcrumb.js.map +1 -0
  55. package/dist/kit/components/ui/button.d.ts +11 -0
  56. package/dist/kit/components/ui/button.d.ts.map +1 -0
  57. package/dist/kit/components/ui/button.js +36 -0
  58. package/dist/kit/components/ui/button.js.map +1 -0
  59. package/dist/kit/components/ui/calendar.d.ts +11 -0
  60. package/dist/kit/components/ui/calendar.d.ts.map +1 -0
  61. package/dist/kit/components/ui/calendar.js +77 -0
  62. package/dist/kit/components/ui/calendar.js.map +1 -0
  63. package/dist/kit/components/ui/card.d.ts +12 -0
  64. package/dist/kit/components/ui/card.d.ts.map +1 -0
  65. package/dist/kit/components/ui/card.js +25 -0
  66. package/dist/kit/components/ui/card.js.map +1 -0
  67. package/dist/kit/components/ui/checkbox.d.ts +5 -0
  68. package/dist/kit/components/ui/checkbox.d.ts.map +1 -0
  69. package/dist/kit/components/ui/checkbox.js +9 -0
  70. package/dist/kit/components/ui/checkbox.js.map +1 -0
  71. package/dist/kit/components/ui/collapsible.d.ts +6 -0
  72. package/dist/kit/components/ui/collapsible.d.ts.map +1 -0
  73. package/dist/kit/components/ui/collapsible.js +14 -0
  74. package/dist/kit/components/ui/collapsible.js.map +1 -0
  75. package/dist/kit/components/ui/dialog.d.ts +17 -0
  76. package/dist/kit/components/ui/dialog.d.ts.map +1 -0
  77. package/dist/kit/components/ui/dialog.js +37 -0
  78. package/dist/kit/components/ui/dialog.js.map +1 -0
  79. package/dist/kit/components/ui/dropdown-menu.d.ts +30 -0
  80. package/dist/kit/components/ui/dropdown-menu.d.ts.map +1 -0
  81. package/dist/kit/components/ui/dropdown-menu.js +51 -0
  82. package/dist/kit/components/ui/dropdown-menu.js.map +1 -0
  83. package/dist/kit/components/ui/input-otp.d.ts +11 -0
  84. package/dist/kit/components/ui/input-otp.d.ts.map +1 -0
  85. package/dist/kit/components/ui/input-otp.js +17 -0
  86. package/dist/kit/components/ui/input-otp.js.map +1 -0
  87. package/dist/kit/components/ui/input.d.ts +4 -0
  88. package/dist/kit/components/ui/input.d.ts.map +1 -0
  89. package/dist/kit/components/ui/input.js +7 -0
  90. package/dist/kit/components/ui/input.js.map +1 -0
  91. package/dist/kit/components/ui/label.d.ts +5 -0
  92. package/dist/kit/components/ui/label.d.ts.map +1 -0
  93. package/dist/kit/components/ui/label.js +8 -0
  94. package/dist/kit/components/ui/label.js.map +1 -0
  95. package/dist/kit/components/ui/pagination.d.ts +19 -0
  96. package/dist/kit/components/ui/pagination.d.ts.map +1 -0
  97. package/dist/kit/components/ui/pagination.js +24 -0
  98. package/dist/kit/components/ui/pagination.js.map +1 -0
  99. package/dist/kit/components/ui/popover.d.ts +11 -0
  100. package/dist/kit/components/ui/popover.d.ts.map +1 -0
  101. package/dist/kit/components/ui/popover.js +26 -0
  102. package/dist/kit/components/ui/popover.js.map +1 -0
  103. package/dist/kit/components/ui/select.d.ts +16 -0
  104. package/dist/kit/components/ui/select.d.ts.map +1 -0
  105. package/dist/kit/components/ui/select.js +37 -0
  106. package/dist/kit/components/ui/select.js.map +1 -0
  107. package/dist/kit/components/ui/separator.d.ts +5 -0
  108. package/dist/kit/components/ui/separator.d.ts.map +1 -0
  109. package/dist/kit/components/ui/separator.js +8 -0
  110. package/dist/kit/components/ui/separator.js.map +1 -0
  111. package/dist/kit/components/ui/sheet.d.ts +16 -0
  112. package/dist/kit/components/ui/sheet.d.ts.map +1 -0
  113. package/dist/kit/components/ui/sheet.js +37 -0
  114. package/dist/kit/components/ui/sheet.js.map +1 -0
  115. package/dist/kit/components/ui/sidebar.d.ts +77 -0
  116. package/dist/kit/components/ui/sidebar.d.ts.map +1 -0
  117. package/dist/kit/components/ui/sidebar.js +207 -0
  118. package/dist/kit/components/ui/sidebar.js.map +1 -0
  119. package/dist/kit/components/ui/skeleton.d.ts +3 -0
  120. package/dist/kit/components/ui/skeleton.d.ts.map +1 -0
  121. package/dist/kit/components/ui/skeleton.js +7 -0
  122. package/dist/kit/components/ui/skeleton.js.map +1 -0
  123. package/dist/kit/components/ui/sonner.d.ts +4 -0
  124. package/dist/kit/components/ui/sonner.d.ts.map +1 -0
  125. package/dist/kit/components/ui/sonner.js +23 -0
  126. package/dist/kit/components/ui/sonner.js.map +1 -0
  127. package/dist/kit/components/ui/table.d.ts +11 -0
  128. package/dist/kit/components/ui/table.d.ts.map +1 -0
  129. package/dist/kit/components/ui/table.js +28 -0
  130. package/dist/kit/components/ui/table.js.map +1 -0
  131. package/dist/kit/components/ui/tabs.d.ts +12 -0
  132. package/dist/kit/components/ui/tabs.d.ts.map +1 -0
  133. package/dist/kit/components/ui/tabs.js +28 -0
  134. package/dist/kit/components/ui/tabs.js.map +1 -0
  135. package/dist/kit/components/ui/textarea.d.ts +4 -0
  136. package/dist/kit/components/ui/textarea.d.ts.map +1 -0
  137. package/dist/kit/components/ui/textarea.js +7 -0
  138. package/dist/kit/components/ui/textarea.js.map +1 -0
  139. package/dist/kit/components/ui/tooltip.d.ts +8 -0
  140. package/dist/kit/components/ui/tooltip.d.ts.map +1 -0
  141. package/dist/kit/components/ui/tooltip.js +18 -0
  142. package/dist/kit/components/ui/tooltip.js.map +1 -0
  143. package/dist/kit/hooks/use-mobile.d.ts +2 -0
  144. package/dist/kit/hooks/use-mobile.d.ts.map +1 -0
  145. package/dist/kit/hooks/use-mobile.js +16 -0
  146. package/dist/kit/hooks/use-mobile.js.map +1 -0
  147. package/dist/kit/index.d.ts +37 -0
  148. package/dist/kit/index.d.ts.map +1 -0
  149. package/dist/kit/index.js +37 -0
  150. package/dist/kit/index.js.map +1 -0
  151. package/dist/kit/kit.css +2 -0
  152. package/dist/kit/lib/utils.d.ts +3 -0
  153. package/dist/kit/lib/utils.d.ts.map +1 -0
  154. package/dist/kit/lib/utils.js +6 -0
  155. package/dist/kit/lib/utils.js.map +1 -0
  156. package/dist/kit/tokens.css +88 -0
  157. package/dist/mcp-app/index.d.ts +6 -0
  158. package/dist/mcp-app/index.js +6 -0
  159. package/dist/mcp-app/interaction.html +183 -0
  160. package/dist/react/components.d.ts +59 -0
  161. package/dist/react/components.d.ts.map +1 -0
  162. package/dist/react/components.js +102 -0
  163. package/dist/react/components.js.map +1 -0
  164. package/dist/react/fields.d.ts +62 -0
  165. package/dist/react/fields.d.ts.map +1 -0
  166. package/dist/react/fields.js +225 -0
  167. package/dist/react/fields.js.map +1 -0
  168. package/dist/react/labels.d.ts +33 -0
  169. package/dist/react/labels.d.ts.map +1 -0
  170. package/dist/react/labels.js +30 -0
  171. package/dist/react/labels.js.map +1 -0
  172. package/dist/react/schema-form.d.ts +34 -0
  173. package/dist/react/schema-form.d.ts.map +1 -0
  174. package/dist/react/schema-form.js +79 -0
  175. package/dist/react/schema-form.js.map +1 -0
  176. package/dist/react/use-interaction.d.ts +4 -0
  177. package/dist/react/use-interaction.d.ts.map +1 -0
  178. package/dist/react/use-interaction.js +6 -0
  179. package/dist/react/use-interaction.js.map +1 -0
  180. package/dist/react/values.d.ts +64 -0
  181. package/dist/react/values.d.ts.map +1 -0
  182. package/dist/react/values.js +123 -0
  183. package/dist/react/values.js.map +1 -0
  184. package/package.json +130 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,KAAK,eAAe,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,MAAM,EACN,MAAM,EACN,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export { ChangeDiff, EntityPreview, OperationOutcome, OperationPanel, OperationStatus, } from "./react/components.js";
2
+ export { defaultInteractionLabels } from "./react/labels.js";
3
+ export { SchemaForm } from "./react/schema-form.js";
4
+ export { useInteraction } from "./react/use-interaction.js";
5
+ export * from "./controller/index.js";
6
+ export { NATIVE_TIMESTAMP, dateFromFieldValue, enumOptions, fieldLabel, formatMoneyMinor, formatTimestampMs, nativeTimestamp, moneyMinorHint, optionLabel, propertyDescription, propertyLabel, renderDataValue, resolveLocalizedText, timestampHint, withNativeSchema, } from "./react/values.js";
7
+ export { APP_CATALOG_ID, APP_TOOL_META_KEY, BARE_VIEW, actionsFor, diagnosticsOf, hiddenInputs, idempotencyInputs, invokeTool, outputOf, readCatalog, rowsOf, toolOf, } from "./app/bridge.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAA0B,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAmB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,MAAM,EACN,MAAM,GAMP,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export type AuthLegalLinks = {
3
+ privacy?: string;
4
+ terms?: string;
5
+ };
6
+ export declare function AuthCard({ action, children, className, wide, }: {
7
+ action?: React.ReactNode;
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ wide?: boolean;
11
+ }): React.JSX.Element;
12
+ export declare function AuthLegalNotice({ legal }: {
13
+ legal?: AuthLegalLinks;
14
+ }): React.JSX.Element | null;
15
+ //# sourceMappingURL=auth-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-card.d.ts","sourceRoot":"","sources":["../../../src/kit/components/auth-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,IAAY,GACb,EAAE;IACD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,qBASA;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,cAAc,CAAA;CAAE,4BAWpE"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ import { Card } from "./ui/card.js";
4
+ export function AuthCard({ action, children, className, wide = false, }) {
5
+ return (_jsx("main", { className: "flex min-h-svh items-center justify-center p-6", children: _jsxs(Card, { className: cn(wide ? "w-full max-w-md" : "w-full max-w-sm", "relative", action && "[&>[data-slot=card-header]]:pe-14", className), children: [action ? _jsx("div", { className: "absolute top-2 end-2 z-10", children: action }) : null, children] }) }));
6
+ }
7
+ export function AuthLegalNotice({ legal }) {
8
+ if (!legal?.privacy && !legal?.terms)
9
+ return null;
10
+ return (_jsxs("p", { className: "text-xs leading-5 text-muted-foreground", children: ["By continuing, an account may be created. ", legal.terms ? _jsxs(_Fragment, { children: ["You agree to the ", _jsx("a", { className: "underline underline-offset-2", href: legal.terms, target: "_blank", rel: "noreferrer", children: "Terms of Use" })] }) : null, legal.terms && legal.privacy ? " and " : null, legal.privacy ? _jsxs(_Fragment, { children: [legal.terms ? "you" : "You", " acknowledge the ", _jsx("a", { className: "underline underline-offset-2", href: legal.privacy, target: "_blank", rel: "noreferrer", children: "Privacy Policy" })] }) : null, "."] }));
11
+ }
12
+ //# sourceMappingURL=auth-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-card.js","sourceRoot":"","sources":["../../../src/kit/components/auth-card.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOpC,MAAM,UAAU,QAAQ,CAAC,EACvB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,KAAK,GAMb;IACC,OAAO,CACL,eAAM,SAAS,EAAC,gDAAgD,YAC9D,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,EAAE,UAAU,EAAE,MAAM,IAAI,mCAAmC,EAAE,SAAS,CAAC,aACpI,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,2BAA2B,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,EACzE,QAAQ,IACJ,GACF,CACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,KAAK,EAA8B;IACnE,IAAI,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,KAAK,EAAE,KAAK;QAAE,OAAO,IAAI,CAAC;IAClD,OAAO,CACL,aAAG,SAAS,EAAC,yCAAyC,2DACT,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,mDACtC,YAAG,SAAS,EAAC,8BAA8B,EAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,6BAAiB,IAChI,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BACxE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,uBAAkB,YAAG,SAAS,EAAC,8BAA8B,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,+BAAmB,IACjK,CAAC,CAAC,CAAC,IAAI,SACR,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ComponentProps } from "react";
2
+ import { InputOTP } from "./ui/input-otp.js";
3
+ export declare function OneTimeCodeInput(props: Omit<ComponentProps<typeof InputOTP>, "children" | "maxLength" | "minLength" | "pattern" | "render">): import("react").JSX.Element;
4
+ //# sourceMappingURL=one-time-code-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"one-time-code-input.d.ts","sourceRoot":"","sources":["../../../src/kit/components/one-time-code-input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAA+B,MAAM,mBAAmB,CAAC;AAE1E,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,IAAI,CACT,cAAc,CAAC,OAAO,QAAQ,CAAC,EAC/B,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAC9D,+BAqBF"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { REGEXP_ONLY_DIGITS } from "input-otp";
3
+ import { InputOTP, InputOTPGroup, InputOTPSlot } from "./ui/input-otp.js";
4
+ export function OneTimeCodeInput(props) {
5
+ return (_jsx(InputOTP, { "aria-label": "One-time code", containerClassName: "justify-center", maxLength: 6, minLength: 6, pattern: REGEXP_ONLY_DIGITS, ...props, children: _jsxs(InputOTPGroup, { children: [_jsx(InputOTPSlot, { index: 0 }), _jsx(InputOTPSlot, { index: 1 }), _jsx(InputOTPSlot, { index: 2 }), _jsx(InputOTPSlot, { index: 3 }), _jsx(InputOTPSlot, { index: 4 }), _jsx(InputOTPSlot, { index: 5 })] }) }));
6
+ }
7
+ //# sourceMappingURL=one-time-code-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"one-time-code-input.js","sourceRoot":"","sources":["../../../src/kit/components/one-time-code-input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1E,MAAM,UAAU,gBAAgB,CAC9B,KAGC;IAED,OAAO,CACL,KAAC,QAAQ,kBACI,eAAe,EAC1B,kBAAkB,EAAC,gBAAgB,EACnC,SAAS,EAAE,CAAC,EACZ,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,kBAAkB,KACvB,KAAK,YAET,MAAC,aAAa,eACZ,KAAC,YAAY,IAAC,KAAK,EAAE,CAAC,GAAI,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAE,CAAC,GAAI,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAE,CAAC,GAAI,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAE,CAAC,GAAI,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAE,CAAC,GAAI,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAE,CAAC,GAAI,IACZ,GACP,CACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,94 @@
1
+ import * as React from "react";
2
+ import { Button } from "./ui/button.js";
3
+ /**
4
+ * Same-tick in-flight lock. React `busy` updates are async, so OTP
5
+ * autocomplete `onComplete` and form Enter can both call verify before
6
+ * the next render. Claiming the ref here is visible immediately.
7
+ */
8
+ export declare function claimInFlight(lock: {
9
+ current: boolean;
10
+ }): boolean;
11
+ export declare function SignInButton({ busy, children, disabled, ...props }: React.ComponentProps<typeof Button> & {
12
+ busy: boolean;
13
+ }): React.ReactElement;
14
+ /**
15
+ * Outcome of a caller-supplied step. Resolving with `{ error }` shows
16
+ * that message and stays on the step; resolving with nothing advances.
17
+ * The two are distinct from a rejection, which shows `labels.requestFailed`
18
+ * — hosts can tell "the server said no" apart from "the request never
19
+ * completed" without the flow knowing anything about transport.
20
+ */
21
+ export type SignInFlowStepResult = void | {
22
+ error: string;
23
+ };
24
+ /** Every string the flow renders, so hosts need no particular i18n bundle. */
25
+ export type SignInFlowLabels = {
26
+ description: string;
27
+ emailLabel: string;
28
+ emailPlaceholder?: string;
29
+ sendButton: string;
30
+ sentTo: (email: string) => string;
31
+ otpLabel: string;
32
+ verifyButton: string;
33
+ useAnotherEmail: string;
34
+ requestFailed: string;
35
+ };
36
+ export type SignInFlowProps = {
37
+ labels: SignInFlowLabels;
38
+ onSendCode: (email: string) => Promise<SignInFlowStepResult>;
39
+ /**
40
+ * Resolving without an error is terminal: the flow stays busy and locked so
41
+ * the consumed code cannot be resubmitted. The host must then navigate or
42
+ * unmount the flow (Admin does `window.location.assign`). Resolve with
43
+ * `{ error }` to stay on the code screen instead.
44
+ */
45
+ onVerifyCode: (email: string, code: string) => Promise<SignInFlowStepResult>;
46
+ className?: string;
47
+ /** Namespaces the field ids and their labels when a page mounts more than one flow. */
48
+ idPrefix?: string;
49
+ };
50
+ export type SignInFlowState = {
51
+ step: "email" | "otp";
52
+ email: string;
53
+ otp: string;
54
+ busy: boolean;
55
+ error: string | null;
56
+ };
57
+ export type SignInFlowEvent = {
58
+ type: "email";
59
+ value: string;
60
+ } | {
61
+ type: "otp";
62
+ value: string;
63
+ } | {
64
+ type: "start";
65
+ } | {
66
+ type: "sent";
67
+ error?: string;
68
+ } | {
69
+ type: "verified";
70
+ error?: string;
71
+ } | {
72
+ type: "failed";
73
+ error: string;
74
+ } | {
75
+ type: "back";
76
+ };
77
+ export declare const SIGN_IN_FLOW_INITIAL: SignInFlowState;
78
+ /**
79
+ * Pure step machine behind `SignInFlow`, exported so the transitions are
80
+ * testable without a DOM. A verify that succeeds keeps `busy` — the host
81
+ * navigates away next, and re-enabling the form in the meantime would let
82
+ * a second submit spend the already-consumed code.
83
+ */
84
+ export declare function signInFlowReducer(state: SignInFlowState, event: SignInFlowEvent): SignInFlowState;
85
+ /**
86
+ * Two-step email-OTP sign-in: an email screen that swaps for a
87
+ * six-digit code screen once a code is on its way. Owns the step, busy
88
+ * and error state only — the caller supplies transport (`onSendCode`,
89
+ * `onVerifyCode`), whatever navigation follows a successful verify, and
90
+ * all copy. Mantle Admin renders this same component, so a host gets
91
+ * Admin's behaviour rather than a snapshot of it.
92
+ */
93
+ export declare function SignInFlow({ labels, onSendCode, onVerifyCode, className, idPrefix, }: SignInFlowProps): React.ReactElement;
94
+ //# sourceMappingURL=sign-in-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-in-flow.d.ts","sourceRoot":"","sources":["../../../src/kit/components/sign-in-flow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIxC;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAIjE;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,O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,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErB,eAAO,MAAM,oBAAoB,EAAE,eAMjC,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,GAAG,eAAe,CAmBjG;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,UAAU,EACV,YAAY,EACZ,SAAS,EACT,QAAmB,GACpB,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAsGtC"}
@@ -0,0 +1,108 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Loader2Icon } from "lucide-react";
4
+ import { Button } from "./ui/button.js";
5
+ import { Input } from "./ui/input.js";
6
+ import { OneTimeCodeInput } from "./one-time-code-input.js";
7
+ /**
8
+ * Same-tick in-flight lock. React `busy` updates are async, so OTP
9
+ * autocomplete `onComplete` and form Enter can both call verify before
10
+ * the next render. Claiming the ref here is visible immediately.
11
+ */
12
+ export function claimInFlight(lock) {
13
+ if (lock.current)
14
+ return false;
15
+ lock.current = true;
16
+ return true;
17
+ }
18
+ export function SignInButton({ busy, children, disabled, ...props }) {
19
+ return (_jsxs(Button, { ...props, disabled: busy || disabled, "aria-busy": busy || undefined, children: [busy ? _jsx(Loader2Icon, { className: "animate-spin", "aria-hidden": true }) : null, children] }));
20
+ }
21
+ export const SIGN_IN_FLOW_INITIAL = Object.freeze({
22
+ step: "email",
23
+ email: "",
24
+ otp: "",
25
+ busy: false,
26
+ error: null,
27
+ });
28
+ /**
29
+ * Pure step machine behind `SignInFlow`, exported so the transitions are
30
+ * testable without a DOM. A verify that succeeds keeps `busy` — the host
31
+ * navigates away next, and re-enabling the form in the meantime would let
32
+ * a second submit spend the already-consumed code.
33
+ */
34
+ export function signInFlowReducer(state, event) {
35
+ switch (event.type) {
36
+ case "email":
37
+ return { ...state, email: event.value };
38
+ case "otp":
39
+ return { ...state, otp: event.value };
40
+ case "start":
41
+ return { ...state, busy: true, error: null };
42
+ case "sent":
43
+ return event.error
44
+ ? { ...state, busy: false, error: event.error }
45
+ : { ...state, busy: false, step: "otp" };
46
+ case "verified":
47
+ return event.error ? { ...state, busy: false, error: event.error } : state;
48
+ case "failed":
49
+ return { ...state, busy: false, error: event.error };
50
+ case "back":
51
+ return { ...state, step: "email", otp: "", error: null, busy: false };
52
+ }
53
+ }
54
+ /**
55
+ * Two-step email-OTP sign-in: an email screen that swaps for a
56
+ * six-digit code screen once a code is on its way. Owns the step, busy
57
+ * and error state only — the caller supplies transport (`onSendCode`,
58
+ * `onVerifyCode`), whatever navigation follows a successful verify, and
59
+ * all copy. Mantle Admin renders this same component, so a host gets
60
+ * Admin's behaviour rather than a snapshot of it.
61
+ */
62
+ export function SignInFlow({ labels, onSendCode, onVerifyCode, className, idPrefix = "signin", }) {
63
+ const [state, dispatch] = React.useReducer(signInFlowReducer, SIGN_IN_FLOW_INITIAL);
64
+ const { step, email, otp, busy, error } = state;
65
+ // One lock for both steps: a double-click or autocomplete + Enter in the
66
+ // same tick must not dispatch two sends or two verifies.
67
+ const inFlight = React.useRef(false);
68
+ const run = (request, done) => {
69
+ if (busy || !claimInFlight(inFlight))
70
+ return;
71
+ dispatch({ type: "start" });
72
+ // Promise.resolve().then(request) turns a synchronous throw from the host
73
+ // callback into a rejection; otherwise busy and the lock would stick.
74
+ void Promise.resolve()
75
+ .then(request)
76
+ .then((result) => {
77
+ dispatch(result?.error ? { type: done, error: result.error } : { type: done });
78
+ // A successful verify hands off to host navigation; keep the lock so
79
+ // the consumed code cannot be resubmitted while the page unloads.
80
+ if (done === "verified" && !result?.error)
81
+ return;
82
+ inFlight.current = false;
83
+ })
84
+ .catch(() => {
85
+ dispatch({ type: "failed", error: labels.requestFailed });
86
+ inFlight.current = false;
87
+ });
88
+ };
89
+ const sendCode = (e) => {
90
+ e.preventDefault();
91
+ if (!email)
92
+ return;
93
+ run(() => onSendCode(email), "sent");
94
+ };
95
+ const verifyCode = (code) => {
96
+ if (code.length !== 6)
97
+ return;
98
+ run(() => onVerifyCode(email, code), "verified");
99
+ };
100
+ return (_jsxs("div", { className: className, children: [_jsx("p", { className: "mb-2 text-sm text-muted-foreground", children: labels.description }), step === "email" ? (_jsxs("form", { onSubmit: sendCode, className: "space-y-2", children: [_jsx("label", { htmlFor: `${idPrefix}-email`, className: "sr-only", children: labels.emailLabel }), _jsx(Input, { id: `${idPrefix}-email`, type: "email", value: email, onChange: (e) => dispatch({ type: "email", value: e.currentTarget.value }), placeholder: labels.emailPlaceholder, required: true, autoComplete: "email" }), _jsx(SignInButton, { type: "submit", className: "w-full", busy: busy, disabled: !email, children: labels.sendButton })] })) : (_jsxs("form", { onSubmit: (e) => {
101
+ e.preventDefault();
102
+ verifyCode(otp);
103
+ }, className: "space-y-2", children: [_jsx("p", { className: "text-xs text-muted-foreground", children: labels.sentTo(email) }), _jsx(OneTimeCodeInput, { id: `${idPrefix}-otp`, "aria-label": labels.otpLabel, autoComplete: "one-time-code", autoFocus: true, disabled: busy, value: otp, onChange: (value) => dispatch({ type: "otp", value }), onComplete: verifyCode, required: true }), _jsx(SignInButton, { type: "submit", className: "w-full", busy: busy, disabled: otp.length !== 6, children: labels.verifyButton }), _jsx("button", { type: "button", onClick: () => {
104
+ inFlight.current = false;
105
+ dispatch({ type: "back" });
106
+ }, className: "text-xs text-muted-foreground underline-offset-2 hover:underline", children: labels.useAnotherEmail })] })), error ? (_jsx("p", { className: "mt-2 text-xs text-destructive", role: "alert", children: error })) : null] }));
107
+ }
108
+ //# sourceMappingURL=sign-in-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-in-flow.js","sourceRoot":"","sources":["../../../src/kit/components/sign-in-flow.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAA0B;IACtD,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACgD;IACxD,OAAO,CACL,MAAC,MAAM,OAAK,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,QAAQ,eAAa,IAAI,IAAI,SAAS,aACxE,IAAI,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,SAAS,EAAC,cAAc,wBAAe,CAAC,CAAC,CAAC,IAAI,EAClE,QAAQ,IACF,CACV,CAAC;AACJ,CAAC;AAwDD,MAAM,CAAC,MAAM,oBAAoB,GAAoB,MAAM,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE;IACT,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,IAAI;CACZ,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAsB,EAAE,KAAsB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E;oBACd,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,UAAU,CAAC,GAAG,CAAC,CAAC;gBAClB,CAAC,EACD,SAAS,EAAC,WAAW,aAErB,YAAG,SAAS,EAAC,+BAA+B,YAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAK,EACvE,KAAC,gBAAgB,IACf,EAAE,EAAE,GAAG,QAAQ,MAAM,gBACT,MAAM,CAAC,QAAQ,EAC3B,YAAY,EAAC,eAAe,EAC5B,SAAS,QACT,QAAQ,EAAE,IAAI,EACd,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EACrD,UAAU,EAAE,UAAU,EACtB,QAAQ,SACR,EACF,KAAC,YAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,KAAK,CAAC,YAClF,MAAM,CAAC,YAAY,GACP,EACf,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE;4BACZ,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;4BACzB,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;wBAC7B,CAAC,EACD,SAAS,EAAC,kEAAkE,YAE3E,MAAM,CAAC,eAAe,GAChB,IACJ,CACR,EACA,KAAK,CAAC,CAAC,CAAC,CACP,YAAG,SAAS,EAAC,+BAA+B,EAAC,IAAI,EAAC,OAAO,YAAE,KAAK,GAAK,CACtE,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
3
+ import { Button } from "./button.js";
4
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
5
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
6
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.JSX.Element;
7
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
8
+ declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
9
+ size?: "default" | "sm";
10
+ }): React.JSX.Element;
11
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
+ declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
15
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
16
+ declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
17
+ declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
18
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
19
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/kit/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA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AAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,qBAWzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,qBAW/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,GACzD,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,qBAU9D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,GACzD,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,qBAU9D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAA"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Button } from "./button.js";
6
+ function AlertDialog({ ...props }) {
7
+ return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
8
+ }
9
+ function AlertDialogTrigger({ ...props }) {
10
+ return (_jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props }));
11
+ }
12
+ function AlertDialogPortal({ ...props }) {
13
+ return (_jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props }));
14
+ }
15
+ function AlertDialogOverlay({ className, ...props }) {
16
+ return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
17
+ }
18
+ function AlertDialogContent({ className, size = "default", ...props }) {
19
+ return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("group/alert-dialog-content fixed top-1/2 start-1/2 z-50 grid w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props })] }));
20
+ }
21
+ function AlertDialogHeader({ className, ...props }) {
22
+ return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className), ...props }));
23
+ }
24
+ function AlertDialogFooter({ className, ...props }) {
25
+ return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className), ...props }));
26
+ }
27
+ function AlertDialogMedia({ className, ...props }) {
28
+ return (_jsx("div", { "data-slot": "alert-dialog-media", className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className), ...props }));
29
+ }
30
+ function AlertDialogTitle({ className, ...props }) {
31
+ return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className), ...props }));
32
+ }
33
+ function AlertDialogDescription({ className, ...props }) {
34
+ return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm text-balance text-muted-foreground dark:text-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
35
+ }
36
+ function AlertDialogAction({ className, variant = "default", size = "default", ...props }) {
37
+ return (_jsx(Button, { variant: variant, size: size, asChild: true, children: _jsx(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", className: cn(className), ...props }) }));
38
+ }
39
+ function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
40
+ return (_jsx(Button, { variant: variant, size: size, asChild: true, children: _jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(className), ...props }) }));
41
+ }
42
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
43
+ //# sourceMappingURL=alert-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../../../src/kit/components/ui/alert-dialog.tsx"],"names":[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AAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,GAAG,KAAK,EAEqD;IAC7D,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,kBAC3C,KAAC,oBAAoB,CAAC,MAAM,iBAChB,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KACpB,KAAK,GACT,GACK,CACV,CAAA;AACH,CAAC;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { Avatar as AvatarPrimitive } from "radix-ui";
3
+ declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
4
+ size?: "default" | "sm" | "lg";
5
+ }): React.JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
8
+ declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
9
+ declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
12
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/kit/components/ui/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AAIpD,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAA;CAC/B,qBAYA;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAWpD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,qBAWvD;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAczE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,WAAW,GACZ,CAAA"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Avatar as AvatarPrimitive } from "radix-ui";
4
+ import { cn } from "../../lib/utils.js";
5
+ function Avatar({ className, size = "default", ...props }) {
6
+ return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", className), ...props }));
7
+ }
8
+ function AvatarImage({ className, ...props }) {
9
+ return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn("aspect-square size-full rounded-full object-cover", className), ...props }));
10
+ }
11
+ function AvatarFallback({ className, ...props }) {
12
+ return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", className), ...props }));
13
+ }
14
+ function AvatarBadge({ className, ...props }) {
15
+ return (_jsx("span", { "data-slot": "avatar-badge", className: cn("absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className), ...props }));
16
+ }
17
+ function AvatarGroup({ className, ...props }) {
18
+ return (_jsx("div", { "data-slot": "avatar-group", className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className), ...props }));
19
+ }
20
+ function AvatarGroupCount({ className, ...props }) {
21
+ return (_jsx("div", { "data-slot": "avatar-group-count", className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className), ...props }));
22
+ }
23
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
24
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../../src/kit/components/ui/avatar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,SAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,GAAG,KAAK,EAGT;IACC,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,iBACT,QAAQ,eACP,IAAI,EACf,SAAS,EAAE,EAAE,CACX,uPAAuP,EACvP,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EAC8C;IACtD,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,iBACb,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACX,oIAAoI,EACpI,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgC;IACxE,OAAO,CACL,4BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,wKAAwK,EACxK,+EAA+E,EAC/E,2FAA2F,EAC3F,+EAA+E,EAC/E,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,qGAAqG,EACrG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACoB;IAC5B,OAAO,CACL,2BACY,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,0VAA0V,EAC1V,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,WAAW,GACZ,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): React.JSX.Element;
9
+ export { Badge, badgeVariants };
10
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/kit/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,aAAa;;8EAqBlB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAC7B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAW3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { Slot } from "radix-ui";
4
+ import { cn } from "../../lib/utils.js";
5
+ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
9
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
10
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
11
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
12
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
13
+ link: "text-primary underline-offset-4 hover:underline",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
18
+ },
19
+ });
20
+ function Badge({ className, variant = "default", asChild = false, ...props }) {
21
+ const Comp = asChild ? Slot.Root : "span";
22
+ return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
23
+ }
24
+ export { Badge, badgeVariants };
25
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/kit/components/ui/badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,MAAM,aAAa,GAAG,GAAG,CACvB,4eAA4e,EAC5e;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4DAA4D;YACrE,SAAS,EACP,kEAAkE;YACpE,WAAW,EACT,gKAAgK;YAClK,OAAO,EACL,kFAAkF;YACpF,KAAK,EACH,mEAAmE;YACrE,IAAI,EAAE,iDAAiD;SACxD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAEkD;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAEzC,OAAO,CACL,KAAC,IAAI,iBACO,OAAO,kBACH,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ declare function Breadcrumb({ className, ...props }: React.ComponentProps<"nav"> & {
3
+ "aria-label": string;
4
+ }): React.JSX.Element;
5
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
6
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
7
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
8
+ asChild?: boolean;
9
+ }): React.JSX.Element;
10
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
11
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
12
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, };
13
+ //# sourceMappingURL=breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/kit/components/ui/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,qBAQlG;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW1E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ1E;AAED,iBAAS,cAAc,CAAC,EACtB,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,qBAUA;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW5E;AAED,iBAAS,mBAAmB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAc5B;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from "radix-ui";
3
+ import { cn } from "../../lib/utils.js";
4
+ import { ChevronRightIcon } from "lucide-react";
5
+ function Breadcrumb({ className, ...props }) {
6
+ return (_jsx("nav", { "data-slot": "breadcrumb", className: cn(className), ...props }));
7
+ }
8
+ function BreadcrumbList({ className, ...props }) {
9
+ return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", className), ...props }));
10
+ }
11
+ function BreadcrumbItem({ className, ...props }) {
12
+ return (_jsx("li", { "data-slot": "breadcrumb-item", className: cn("inline-flex items-center gap-1", className), ...props }));
13
+ }
14
+ function BreadcrumbLink({ asChild, className, ...props }) {
15
+ const Comp = asChild ? Slot.Root : "a";
16
+ return (_jsx(Comp, { "data-slot": "breadcrumb-link", className: cn("transition-colors hover:text-foreground", className), ...props }));
17
+ }
18
+ function BreadcrumbPage({ className, ...props }) {
19
+ return (_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className), ...props }));
20
+ }
21
+ function BreadcrumbSeparator({ children, className, ...props }) {
22
+ return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? (_jsx(ChevronRightIcon, { className: "rtl:rotate-180" })) }));
23
+ }
24
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, };
25
+ //# sourceMappingURL=breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../../../src/kit/components/ui/breadcrumb.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA0D;IACjG,OAA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AQ,IAAI,CACX,KAAC,gBAAgB,IAAC,SAAS,EAAC,gBAAgB,GAAG,CAChD,GACE,CACN,CAAA;AACH,CAAC;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,CAAA"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
5
+ size?: "default" | "sm" | "xs" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): React.JSX.Element;
10
+ export { Button, buttonVariants };
11
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/kit/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,cAAc;;;8EAmCnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,qBAYF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { Slot } from "radix-ui";
4
+ import { cn } from "../../lib/utils.js";
5
+ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
9
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
10
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
11
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
12
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
13
+ link: "text-primary underline-offset-4 hover:underline",
14
+ },
15
+ size: {
16
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
17
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",
18
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",
19
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
20
+ icon: "size-8",
21
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
22
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
23
+ "icon-lg": "size-9",
24
+ },
25
+ },
26
+ defaultVariants: {
27
+ variant: "default",
28
+ size: "default",
29
+ },
30
+ });
31
+ function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
32
+ const Comp = asChild ? Slot.Root : "button";
33
+ return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
34
+ }
35
+ export { Button, buttonVariants };
36
+ //# sourceMappingURL=button.js.map