@neut/ui 0.0.5 → 0.0.6

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 (140) hide show
  1. package/dist/components/alert/Alert/Alert.d.ts +2 -0
  2. package/dist/components/alert/Alert/Alert.js +22 -0
  3. package/dist/components/alert/Alert/Alert.js.map +1 -0
  4. package/dist/components/alert/Alert/Alert.styles.d.ts +3 -0
  5. package/dist/components/alert/Alert/Alert.styles.js +13 -0
  6. package/dist/components/alert/Alert/Alert.styles.js.map +1 -0
  7. package/dist/components/alert/Alert/Alert.types.d.ts +4 -0
  8. package/dist/components/alert/Alert/index.d.ts +1 -0
  9. package/dist/components/alert/AlertAction/AlertAction.d.ts +2 -0
  10. package/dist/components/alert/AlertAction/AlertAction.js +18 -0
  11. package/dist/components/alert/AlertAction/AlertAction.js.map +1 -0
  12. package/dist/components/alert/AlertAction/AlertAction.styles.d.ts +1 -0
  13. package/dist/components/alert/AlertAction/AlertAction.styles.js +6 -0
  14. package/dist/components/alert/AlertAction/AlertAction.styles.js.map +1 -0
  15. package/dist/components/alert/AlertAction/AlertAction.types.d.ts +2 -0
  16. package/dist/components/alert/AlertAction/index.d.ts +1 -0
  17. package/dist/components/alert/AlertDescription/AlertDescription.d.ts +2 -0
  18. package/dist/components/alert/AlertDescription/AlertDescription.js +18 -0
  19. package/dist/components/alert/AlertDescription/AlertDescription.js.map +1 -0
  20. package/dist/components/alert/AlertDescription/AlertDescription.styles.d.ts +1 -0
  21. package/dist/components/alert/AlertDescription/AlertDescription.styles.js +6 -0
  22. package/dist/components/alert/AlertDescription/AlertDescription.styles.js.map +1 -0
  23. package/dist/components/alert/AlertDescription/AlertDescription.types.d.ts +2 -0
  24. package/dist/components/alert/AlertDescription/index.d.ts +1 -0
  25. package/dist/components/alert/AlertTitle/AlertTitle.d.ts +2 -0
  26. package/dist/components/alert/AlertTitle/AlertTitle.js +18 -0
  27. package/dist/components/alert/AlertTitle/AlertTitle.js.map +1 -0
  28. package/dist/components/alert/AlertTitle/AlertTitle.styles.d.ts +1 -0
  29. package/dist/components/alert/AlertTitle/AlertTitle.styles.js +6 -0
  30. package/dist/components/alert/AlertTitle/AlertTitle.styles.js.map +1 -0
  31. package/dist/components/alert/AlertTitle/AlertTitle.types.d.ts +2 -0
  32. package/dist/components/alert/AlertTitle/index.d.ts +1 -0
  33. package/dist/components/alert/index.d.ts +4 -0
  34. package/dist/components/alert/index.js +5 -0
  35. package/dist/components/alert-dialog/AlertDialog/AlertDialog.context.d.ts +10 -0
  36. package/dist/components/alert-dialog/AlertDialog/AlertDialog.context.js +11 -0
  37. package/dist/components/alert-dialog/AlertDialog/AlertDialog.context.js.map +1 -0
  38. package/dist/components/alert-dialog/AlertDialog/AlertDialog.d.ts +2 -0
  39. package/dist/components/alert-dialog/AlertDialog/AlertDialog.js +23 -0
  40. package/dist/components/alert-dialog/AlertDialog/AlertDialog.js.map +1 -0
  41. package/dist/components/alert-dialog/AlertDialog/AlertDialog.styles.d.ts +0 -0
  42. package/dist/components/alert-dialog/AlertDialog/AlertDialog.types.d.ts +2 -0
  43. package/dist/components/alert-dialog/AlertDialog/index.d.ts +2 -0
  44. package/dist/components/alert-dialog/AlertDialogAction/AlertDialogAction.d.ts +2 -0
  45. package/dist/components/alert-dialog/AlertDialogAction/AlertDialogAction.js +8 -0
  46. package/dist/components/alert-dialog/AlertDialogAction/AlertDialogAction.js.map +1 -0
  47. package/dist/components/alert-dialog/AlertDialogAction/AlertDialogAction.types.d.ts +2 -0
  48. package/dist/components/alert-dialog/AlertDialogAction/index.d.ts +1 -0
  49. package/dist/components/alert-dialog/AlertDialogCancel/AlertDialogCancel.d.ts +2 -0
  50. package/dist/components/alert-dialog/AlertDialogCancel/AlertDialogCancel.js +16 -0
  51. package/dist/components/alert-dialog/AlertDialogCancel/AlertDialogCancel.js.map +1 -0
  52. package/dist/components/alert-dialog/AlertDialogCancel/AlertDialogCancel.types.d.ts +2 -0
  53. package/dist/components/alert-dialog/AlertDialogCancel/index.d.ts +1 -0
  54. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.context.d.ts +8 -0
  55. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.context.js +11 -0
  56. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.context.js.map +1 -0
  57. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.d.ts +2 -0
  58. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.js +65 -0
  59. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.js.map +1 -0
  60. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.styles.d.ts +1 -0
  61. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.styles.js +6 -0
  62. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.styles.js.map +1 -0
  63. package/dist/components/alert-dialog/AlertDialogContent/AlertDialogContent.types.d.ts +4 -0
  64. package/dist/components/alert-dialog/AlertDialogContent/index.d.ts +2 -0
  65. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.d.ts +2 -0
  66. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.js +21 -0
  67. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.js.map +1 -0
  68. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.styles.d.ts +1 -0
  69. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.styles.js +6 -0
  70. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.styles.js.map +1 -0
  71. package/dist/components/alert-dialog/AlertDialogDescription/AlertDialogDescription.types.d.ts +2 -0
  72. package/dist/components/alert-dialog/AlertDialogDescription/index.d.ts +1 -0
  73. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.d.ts +2 -0
  74. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.js +18 -0
  75. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.js.map +1 -0
  76. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.styles.d.ts +1 -0
  77. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.styles.js +6 -0
  78. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.styles.js.map +1 -0
  79. package/dist/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.types.d.ts +2 -0
  80. package/dist/components/alert-dialog/AlertDialogFooter/index.d.ts +1 -0
  81. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.d.ts +2 -0
  82. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.js +18 -0
  83. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.js.map +1 -0
  84. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.styles.d.ts +1 -0
  85. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.styles.js +6 -0
  86. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.styles.js.map +1 -0
  87. package/dist/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.types.d.ts +2 -0
  88. package/dist/components/alert-dialog/AlertDialogHeader/index.d.ts +1 -0
  89. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.d.ts +2 -0
  90. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.js +18 -0
  91. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.js.map +1 -0
  92. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.styles.d.ts +1 -0
  93. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.styles.js +6 -0
  94. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.styles.js.map +1 -0
  95. package/dist/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.types.d.ts +2 -0
  96. package/dist/components/alert-dialog/AlertDialogMedia/index.d.ts +1 -0
  97. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.d.ts +2 -0
  98. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.js +26 -0
  99. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.js.map +1 -0
  100. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.styles.d.ts +1 -0
  101. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.styles.js +6 -0
  102. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.styles.js.map +1 -0
  103. package/dist/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.types.d.ts +2 -0
  104. package/dist/components/alert-dialog/AlertDialogOverlay/index.d.ts +1 -0
  105. package/dist/components/alert-dialog/AlertDialogPortal/AlertDialogPortal.d.ts +2 -0
  106. package/dist/components/alert-dialog/AlertDialogPortal/AlertDialogPortal.js +10 -0
  107. package/dist/components/alert-dialog/AlertDialogPortal/AlertDialogPortal.js.map +1 -0
  108. package/dist/components/alert-dialog/AlertDialogPortal/AlertDialogPortal.types.d.ts +2 -0
  109. package/dist/components/alert-dialog/AlertDialogPortal/index.d.ts +1 -0
  110. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.d.ts +2 -0
  111. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.js +21 -0
  112. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.js.map +1 -0
  113. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.styles.d.ts +1 -0
  114. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.styles.js +6 -0
  115. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.styles.js.map +1 -0
  116. package/dist/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.types.d.ts +2 -0
  117. package/dist/components/alert-dialog/AlertDialogTitle/index.d.ts +1 -0
  118. package/dist/components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.d.ts +2 -0
  119. package/dist/components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.js +11 -0
  120. package/dist/components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.js.map +1 -0
  121. package/dist/components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.types.d.ts +0 -0
  122. package/dist/components/alert-dialog/AlertDialogTrigger/index.d.ts +1 -0
  123. package/dist/components/alert-dialog/AlertDialogTrigger/useAlertDialogTrigger.d.ts +2 -0
  124. package/dist/components/alert-dialog/AlertDialogTrigger/useAlertDialogTrigger.js +26 -0
  125. package/dist/components/alert-dialog/AlertDialogTrigger/useAlertDialogTrigger.js.map +1 -0
  126. package/dist/components/alert-dialog/index.d.ts +12 -0
  127. package/dist/components/alert-dialog/index.js +15 -0
  128. package/dist/components/badge/Badge.styles.d.ts +1 -1
  129. package/dist/components/button/Button.styles.d.ts +3 -3
  130. package/dist/components/input-group/InputGroupAddon/InputGroupAddon.styles.d.ts +1 -1
  131. package/dist/components/input-group/InputGroupButton/InputGroupButton.styles.d.ts +2 -2
  132. package/dist/components/item/Item/Item.styles.d.ts +1 -1
  133. package/dist/components/item/ItemMedia/ItemMedia.styles.d.ts +1 -1
  134. package/dist/components/scroll-area/ScrollArea/ScrollArea.js.map +1 -1
  135. package/dist/components/tooltip/TooltipContent/TooltipContent.utils.d.ts +1 -1
  136. package/dist/components/tooltip/TooltipContent/useTooltipContent.d.ts +1 -1
  137. package/dist/index.d.ts +2 -0
  138. package/dist/index.js +124 -106
  139. package/dist/ui.css +1 -1
  140. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogFooter.js","names":["splitProps","AlertDialogFooterProps","clsx","classes","AlertDialogFooter","props","local","others","_el$","_tmpl$","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.tsx"],"sourcesContent":["import { splitProps } from \"solid-js\";\nimport type { AlertDialogFooterProps } from \"./AlertDialogFooter.types\";\nimport { clsx } from \"~/utils\";\nimport { classes } from \"./AlertDialogFooter.styles\";\n\nexport const AlertDialogFooter = (props: AlertDialogFooterProps) => {\n const [local, others] = splitProps(props, [\"class\", \"classList\"]);\n\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n class={clsx(classes, local.class)}\n {...others}\n />\n );\n};\n"],"mappings":";;;;;kEAKaI,KAAqBC,MAAkC;CAClE,IAAM,CAACC,GAAOC,KAAUP,EAAWK,GAAO,CAAC,SAAS,YAAY,CAAC;AAEjE,eAAA;EAAA,IAAAG,IAAAC,GAAA;AAIc,SAJdC,EAAAF,GAAAG,EAAA,EAAA,IAAA,QAAA;AAAA,UAGWT,EAAKC,GAASG,EAAMM,MAAM;KAAA,EAC7BL,EAAM,EAAA,IAAA,GAAA,EAAAC;KAAA"}
@@ -0,0 +1 @@
1
+ export declare const classes = "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-neutral-100/50 dark:bg-neutral-800/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";
@@ -0,0 +1,6 @@
1
+ //#region src/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.styles.ts
2
+ var e = "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-neutral-100/50 dark:bg-neutral-800/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";
3
+ //#endregion
4
+ export { e as classes };
5
+
6
+ //# sourceMappingURL=AlertDialogFooter.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogFooter.styles.js","names":[],"sources":["../../../../src/components/alert-dialog/AlertDialogFooter/AlertDialogFooter.styles.ts"],"sourcesContent":["export const classes =\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-neutral-100/50 dark:bg-neutral-800/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\";\n"],"mappings":";AAAA,IAAa,IACX"}
@@ -0,0 +1,2 @@
1
+ import { BaseProps, PolymorphicProps } from '../../../types';
2
+ export type AlertDialogFooterProps = PolymorphicProps<"div", BaseProps, false>;
@@ -0,0 +1 @@
1
+ export { AlertDialogFooter } from './AlertDialogFooter';
@@ -0,0 +1,2 @@
1
+ import { AlertDialogHeaderProps } from './AlertDialogHeader.types';
2
+ export declare const AlertDialogHeader: (props: AlertDialogHeaderProps) => import("solid-js").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { clsx as e } from "../../../utils/clsx.js";
2
+ import { classes as t } from "./AlertDialogHeader.styles.js";
3
+ import { mergeProps as n, spread as r, template as i } from "solid-js/web";
4
+ import { splitProps as a } from "solid-js";
5
+ //#region src/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.tsx
6
+ var o = /* @__PURE__ */ i("<div data-slot=alert-dialog-header>"), s = (i) => {
7
+ let [s, c] = a(i, ["class", "classList"]);
8
+ return (() => {
9
+ var i = o();
10
+ return r(i, n({ get class() {
11
+ return e(t, s.class);
12
+ } }, c), !1, !1), i;
13
+ })();
14
+ };
15
+ //#endregion
16
+ export { s as AlertDialogHeader };
17
+
18
+ //# sourceMappingURL=AlertDialogHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogHeader.js","names":["splitProps","AlertDialogHeaderProps","clsx","classes","AlertDialogHeader","props","local","others","_el$","_tmpl$","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.tsx"],"sourcesContent":["import { splitProps } from \"solid-js\";\nimport type { AlertDialogHeaderProps } from \"./AlertDialogHeader.types\";\nimport { clsx } from \"~/utils\";\nimport { classes } from \"./AlertDialogHeader.styles\";\n\nexport const AlertDialogHeader = (props: AlertDialogHeaderProps) => {\n const [local, others] = splitProps(props, [\"class\", \"classList\"]);\n\n return (\n <div\n data-slot=\"alert-dialog-header\"\n class={clsx(classes, local.class)}\n {...others}\n />\n );\n};\n"],"mappings":";;;;;kEAKaI,KAAqBC,MAAkC;CAClE,IAAM,CAACC,GAAOC,KAAUP,EAAWK,GAAO,CAAC,SAAS,YAAY,CAAC;AAEjE,eAAA;EAAA,IAAAG,IAAAC,GAAA;AAIc,SAJdC,EAAAF,GAAAG,EAAA,EAAA,IAAA,QAAA;AAAA,UAGWT,EAAKC,GAASG,EAAMM,MAAM;KAAA,EAC7BL,EAAM,EAAA,IAAA,GAAA,EAAAC;KAAA"}
@@ -0,0 +1 @@
1
+ export declare const classes = "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=md]/alert-dialog-content:place-items-start sm:group-data-[size=md]/alert-dialog-content:text-left sm:group-data-[size=md]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]";
@@ -0,0 +1,6 @@
1
+ //#region src/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.styles.ts
2
+ var e = "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=md]/alert-dialog-content:place-items-start sm:group-data-[size=md]/alert-dialog-content:text-left sm:group-data-[size=md]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]";
3
+ //#endregion
4
+ export { e as classes };
5
+
6
+ //# sourceMappingURL=AlertDialogHeader.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogHeader.styles.js","names":[],"sources":["../../../../src/components/alert-dialog/AlertDialogHeader/AlertDialogHeader.styles.ts"],"sourcesContent":["export const classes =\n \"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=md]/alert-dialog-content:place-items-start sm:group-data-[size=md]/alert-dialog-content:text-left sm:group-data-[size=md]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\";\n"],"mappings":";AAAA,IAAa,IACX"}
@@ -0,0 +1,2 @@
1
+ import { BaseProps, PolymorphicProps } from '../../../types';
2
+ export type AlertDialogHeaderProps = PolymorphicProps<"div", BaseProps, false>;
@@ -0,0 +1 @@
1
+ export { AlertDialogHeader } from './AlertDialogHeader';
@@ -0,0 +1,2 @@
1
+ import { AlertDialogMediaProps } from './AlertDialogMedia.types';
2
+ export declare const AlertDialogMedia: (props: AlertDialogMediaProps) => import("solid-js").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { clsx as e } from "../../../utils/clsx.js";
2
+ import { classes as t } from "./AlertDialogMedia.styles.js";
3
+ import { mergeProps as n, spread as r, template as i } from "solid-js/web";
4
+ import { splitProps as a } from "solid-js";
5
+ //#region src/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.tsx
6
+ var o = /* @__PURE__ */ i("<div data-slot=alert-dialog-media>"), s = (i) => {
7
+ let [s, c] = a(i, ["class", "classList"]);
8
+ return (() => {
9
+ var i = o();
10
+ return r(i, n({ get class() {
11
+ return e(t, s.class);
12
+ } }, c), !1, !1), i;
13
+ })();
14
+ };
15
+ //#endregion
16
+ export { s as AlertDialogMedia };
17
+
18
+ //# sourceMappingURL=AlertDialogMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogMedia.js","names":["splitProps","AlertDialogMediaProps","clsx","classes","AlertDialogMedia","props","local","others","_el$","_tmpl$","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.tsx"],"sourcesContent":["import { splitProps } from \"solid-js\";\nimport type { AlertDialogMediaProps } from \"./AlertDialogMedia.types\";\nimport { clsx } from \"~/utils\";\nimport { classes } from \"./AlertDialogMedia.styles\";\n\nexport const AlertDialogMedia = (props: AlertDialogMediaProps) => {\n const [local, others] = splitProps(props, [\"class\", \"classList\"]);\n\n return (\n <div\n data-slot=\"alert-dialog-media\"\n class={clsx(classes, local.class)}\n {...others}\n />\n );\n};\n"],"mappings":";;;;;iEAKaI,KAAoBC,MAAiC;CAChE,IAAM,CAACC,GAAOC,KAAUP,EAAWK,GAAO,CAAC,SAAS,YAAY,CAAC;AAEjE,eAAA;EAAA,IAAAG,IAAAC,GAAA;AAIc,SAJdC,EAAAF,GAAAG,EAAA,EAAA,IAAA,QAAA;AAAA,UAGWT,EAAKC,GAASG,EAAMM,MAAM;KAAA,EAC7BL,EAAM,EAAA,IAAA,GAAA,EAAAC;KAAA"}
@@ -0,0 +1 @@
1
+ export declare const classes = "mb-2 inline-flex size-10 items-center justify-center rounded-md bg-neutral-100 dark:bg-neutral-800 sm:group-data-[size=md]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6";
@@ -0,0 +1,6 @@
1
+ //#region src/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.styles.ts
2
+ var e = "mb-2 inline-flex size-10 items-center justify-center rounded-md bg-neutral-100 dark:bg-neutral-800 sm:group-data-[size=md]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6";
3
+ //#endregion
4
+ export { e as classes };
5
+
6
+ //# sourceMappingURL=AlertDialogMedia.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogMedia.styles.js","names":[],"sources":["../../../../src/components/alert-dialog/AlertDialogMedia/AlertDialogMedia.styles.ts"],"sourcesContent":["export const classes =\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-neutral-100 dark:bg-neutral-800 sm:group-data-[size=md]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\";\n"],"mappings":";AAAA,IAAa,IACX"}
@@ -0,0 +1,2 @@
1
+ import { BaseProps, PolymorphicProps } from '../../../types';
2
+ export type AlertDialogMediaProps = PolymorphicProps<"div", BaseProps, false>;
@@ -0,0 +1 @@
1
+ export { AlertDialogMedia } from './AlertDialogMedia';
@@ -0,0 +1,2 @@
1
+ import { AlertDialogOverlayProps } from './AlertDialogOverlay.types';
2
+ export declare const AlertDialogOverlay: (props: AlertDialogOverlayProps) => import("solid-js").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { clsx as e } from "../../../utils/clsx.js";
2
+ import { useAlertDialogContext as t } from "../AlertDialog/AlertDialog.context.js";
3
+ import { classes as n } from "./AlertDialogOverlay.styles.js";
4
+ import { mergeProps as r, spread as i, template as a } from "solid-js/web";
5
+ import { splitProps as o } from "solid-js";
6
+ //#region src/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.tsx
7
+ var s = /* @__PURE__ */ a("<div data-slot=alert-dialog-overlay role=presentation aria-hidden=true>"), c = (a) => {
8
+ let { open: c, setShow: l } = t(), [u, d] = o(a, ["class", "classList"]);
9
+ return (() => {
10
+ var t = s();
11
+ return t.addEventListener("animationend", () => {
12
+ c() || l(!1);
13
+ }), i(t, r({
14
+ get "data-open"() {
15
+ return c();
16
+ },
17
+ get class() {
18
+ return e(n, u.class);
19
+ }
20
+ }, d), !1, !1), t;
21
+ })();
22
+ };
23
+ //#endregion
24
+ export { c as AlertDialogOverlay };
25
+
26
+ //# sourceMappingURL=AlertDialogOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogOverlay.js","names":["splitProps","AlertDialogOverlayProps","clsx","classes","useAlertDialogContext","AlertDialogOverlay","props","open","setShow","local","others","_el$","_tmpl$","addEventListener","_$spread","_$mergeProps","data-open","class"],"sources":["../../../../src/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.tsx"],"sourcesContent":["import { splitProps } from \"solid-js\";\nimport type { AlertDialogOverlayProps } from \"./AlertDialogOverlay.types\";\nimport { clsx } from \"~/utils\";\nimport { classes } from \"./AlertDialogOverlay.styles\";\nimport { useAlertDialogContext } from \"../AlertDialog\";\n\nexport const AlertDialogOverlay = (props: AlertDialogOverlayProps) => {\n const { open, setShow } = useAlertDialogContext();\n\n const [local, others] = splitProps(props, [\"class\", \"classList\"]);\n\n return (\n <div\n data-slot=\"alert-dialog-overlay\"\n role=\"presentation\"\n aria-hidden=\"true\"\n data-open={open()}\n class={clsx(classes, local.class)}\n onAnimationEnd={() => {\n if (open()) return;\n setShow(false);\n }}\n {...others}\n />\n );\n};\n"],"mappings":";;;;;;sGAMaK,KAAsBC,MAAmC;CACpE,IAAM,EAAEC,SAAMC,eAAYJ,GAAuB,EAE3C,CAACK,GAAOC,KAAUV,EAAWM,GAAO,CAAC,SAAS,YAAY,CAAC;AAEjE,eAAA;EAAA,IAAAK,IAAAC,GAAA;AAWc,SAXdD,EAAAE,iBAAA,sBAO0B;AAChBN,MAAM,IACVC,EAAQ,GAAM;IACf,EAAAM,EAAAH,GAAAI,EAAA;GAAA,IAAA,cAAA;AAAA,WALUR,GAAM;;GAAA,IAAA,QAAA;AAAA,WACVL,EAAKC,GAASM,EAAMQ,MAAM;;GAAA,EAK7BP,EAAM,EAAA,IAAA,GAAA,EAAAC;KAAA"}
@@ -0,0 +1 @@
1
+ export declare const classes = "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[open=true]:animate-in data-[open=true]:fade-in-0 data-[open=false]:animate-out data-[open=false]:fade-out-0 select-none";
@@ -0,0 +1,6 @@
1
+ //#region src/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.styles.ts
2
+ var e = "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[open=true]:animate-in data-[open=true]:fade-in-0 data-[open=false]:animate-out data-[open=false]:fade-out-0 select-none";
3
+ //#endregion
4
+ export { e as classes };
5
+
6
+ //# sourceMappingURL=AlertDialogOverlay.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogOverlay.styles.js","names":[],"sources":["../../../../src/components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.styles.ts"],"sourcesContent":["export const classes =\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[open=true]:animate-in data-[open=true]:fade-in-0 data-[open=false]:animate-out data-[open=false]:fade-out-0 select-none\";\n"],"mappings":";AAAA,IAAa,IACX"}
@@ -0,0 +1,2 @@
1
+ import { BaseProps, PolymorphicProps } from '../../../types';
2
+ export type AlertDialogOverlayProps = PolymorphicProps<"div", BaseProps, false>;
@@ -0,0 +1 @@
1
+ export { AlertDialogOverlay } from './AlertDialogOverlay';
@@ -0,0 +1,2 @@
1
+ import { AlertDialogPortalProps } from './AlertDialogPortal.types';
2
+ export declare const AlertDialogPortal: (props: AlertDialogPortalProps) => import("solid-js").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { Portal as e, createComponent as t, spread as n, template as r } from "solid-js/web";
2
+ //#region src/components/alert-dialog/AlertDialogPortal/AlertDialogPortal.tsx
3
+ var i = /* @__PURE__ */ r("<div data-slot=alert-dialog-portal>"), a = (r) => t(e, { get children() {
4
+ var e = i();
5
+ return n(e, r, !1, !1), e;
6
+ } });
7
+ //#endregion
8
+ export { a as AlertDialogPortal };
9
+
10
+ //# sourceMappingURL=AlertDialogPortal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogPortal.js","names":["AlertDialogPortalProps","Portal","AlertDialogPortal","props","_$createComponent","children","_el$","_tmpl$","_$spread"],"sources":["../../../../src/components/alert-dialog/AlertDialogPortal/AlertDialogPortal.tsx"],"sourcesContent":["import type { AlertDialogPortalProps } from \"./AlertDialogPortal.types\";\nimport { Portal } from \"solid-js/web\";\n\nexport const AlertDialogPortal = (props: AlertDialogPortalProps) => {\n return (\n <Portal>\n <div data-slot=\"alert-dialog-portal\" {...props} />\n </Portal>\n );\n};\n"],"mappings":";;kEAGaE,KAAqBC,MAChCC,EACGH,GAAM,EAAA,IAAAI,WAAA;CAAA,IAAAC,IAAAC,GAAA;AACyC,QADzCC,EAAAF,GACoCH,GAAK,IAAA,GAAA,EAAAG;GAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { BaseProps, PolymorphicProps } from '../../../types';
2
+ export type AlertDialogPortalProps = PolymorphicProps<"div", BaseProps, false>;
@@ -0,0 +1 @@
1
+ export { AlertDialogPortal } from './AlertDialogPortal';
@@ -0,0 +1,2 @@
1
+ import { AlertDialogTitleProps } from './AlertDialogTitle.types';
2
+ export declare const AlertDialogTitle: (props: AlertDialogTitleProps) => import("solid-js").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { clsx as e } from "../../../utils/clsx.js";
2
+ import { useAlertDialogContentContext as t } from "../AlertDialogContent/AlertDialogContent.context.js";
3
+ import { classes as n } from "./AlertDialogTitle.styles.js";
4
+ import { mergeProps as r, setAttribute as i, spread as a, template as o } from "solid-js/web";
5
+ import { createUniqueId as s, onMount as c, splitProps as l } from "solid-js";
6
+ //#region src/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.tsx
7
+ var u = /* @__PURE__ */ o("<h2 data-slot=alert-dialog-title>"), d = (o) => {
8
+ let { setTitleID: d } = t(), [f, p] = l(o, ["class", "classList"]), m = s();
9
+ return c(() => {
10
+ d(m);
11
+ }), (() => {
12
+ var t = u();
13
+ return i(t, "id", m), a(t, r({ get class() {
14
+ return e(n, f.class);
15
+ } }, p), !1, !1), t;
16
+ })();
17
+ };
18
+ //#endregion
19
+ export { d as AlertDialogTitle };
20
+
21
+ //# sourceMappingURL=AlertDialogTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogTitle.js","names":["createUniqueId","onMount","splitProps","AlertDialogTitleProps","clsx","classes","useAlertDialogContentContext","AlertDialogTitle","props","setTitleID","local","others","id","_el$","_tmpl$","_$setAttribute","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.tsx"],"sourcesContent":["import { createUniqueId, onMount, splitProps } from \"solid-js\";\nimport type { AlertDialogTitleProps } from \"./AlertDialogTitle.types\";\nimport { clsx } from \"~/utils\";\nimport { classes } from \"./AlertDialogTitle.styles\";\nimport { useAlertDialogContentContext } from \"../AlertDialogContent\";\n\nexport const AlertDialogTitle = (props: AlertDialogTitleProps) => {\n const { setTitleID } = useAlertDialogContentContext();\n\n const [local, others] = splitProps(props, [\"class\", \"classList\"]);\n\n const id = createUniqueId();\n\n onMount(() => {\n setTitleID(id);\n });\n\n return (\n <h2\n id={id}\n data-slot=\"alert-dialog-title\"\n class={clsx(classes, local.class)}\n {...others}\n />\n );\n};\n"],"mappings":";;;;;;gEAMaO,KAAoBC,MAAiC;CAChE,IAAM,EAAEC,kBAAeH,GAA8B,EAE/C,CAACI,GAAOC,KAAUT,EAAWM,GAAO,CAAC,SAAS,YAAY,CAAC,EAE3DI,IAAKZ,GAAgB;AAM3B,QAJAC,QAAc;AACZQ,IAAWG,EAAG;GACd,SAEF;EAAA,IAAAC,IAAAC,GAAA;AAKc,SALdC,EAAAF,GAAA,MAEQD,EAAE,EAAAI,EAAAH,GAAAI,EAAA,EAAA,IAAA,QAAA;AAAA,UAECb,EAAKC,GAASK,EAAMQ,MAAM;KAAA,EAC7BP,EAAM,EAAA,IAAA,GAAA,EAAAE;KAAA"}
@@ -0,0 +1 @@
1
+ export declare const classes = "cn-font-heading text-base font-medium sm:group-data-[size=md]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2";
@@ -0,0 +1,6 @@
1
+ //#region src/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.styles.ts
2
+ var e = "cn-font-heading text-base font-medium sm:group-data-[size=md]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2";
3
+ //#endregion
4
+ export { e as classes };
5
+
6
+ //# sourceMappingURL=AlertDialogTitle.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogTitle.styles.js","names":[],"sources":["../../../../src/components/alert-dialog/AlertDialogTitle/AlertDialogTitle.styles.ts"],"sourcesContent":["export const classes =\n \"cn-font-heading text-base font-medium sm:group-data-[size=md]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\";\n"],"mappings":";AAAA,IAAa,IACX"}
@@ -0,0 +1,2 @@
1
+ import { BaseProps, PolymorphicProps } from '../../../types';
2
+ export type AlertDialogTitleProps = PolymorphicProps<"h2", BaseProps, false>;
@@ -0,0 +1 @@
1
+ export { AlertDialogTitle } from './AlertDialogTitle';
@@ -0,0 +1,2 @@
1
+ import { JSXElement, ParentProps } from 'solid-js';
2
+ export declare const AlertDialogTrigger: (props: ParentProps) => JSXElement;
@@ -0,0 +1,11 @@
1
+ import { useAlertDialogTrigger as e } from "./useAlertDialogTrigger.js";
2
+ import { children as t, untrack as n } from "solid-js";
3
+ //#region src/components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.tsx
4
+ var r = (r) => {
5
+ let i = t(() => n(() => r.children));
6
+ return e(i), i;
7
+ };
8
+ //#endregion
9
+ export { r as AlertDialogTrigger };
10
+
11
+ //# sourceMappingURL=AlertDialogTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialogTrigger.js","names":["children","untrack","JSXElement","ParentProps","useAlertDialogTrigger","AlertDialogTrigger","props","resolved"],"sources":["../../../../src/components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.tsx"],"sourcesContent":["import { children, untrack, type JSXElement, type ParentProps } from \"solid-js\";\nimport { useAlertDialogTrigger } from \"./useAlertDialogTrigger\";\n\nexport const AlertDialogTrigger = (props: ParentProps) => {\n const resolved = children(() => untrack(() => props.children));\n useAlertDialogTrigger(resolved);\n\n return resolved as unknown as JSXElement;\n};\n"],"mappings":";;;AAGA,IAAaK,KAAsBC,MAAuB;CACxD,IAAMC,IAAWP,QAAeC,QAAcK,EAAMN,SAAS,CAAC;AAG9D,QAFAI,EAAsBG,EAAS,EAExBA"}
@@ -0,0 +1 @@
1
+ export { AlertDialogTrigger } from './AlertDialogTrigger';
@@ -0,0 +1,2 @@
1
+ import { ChildrenReturn } from 'solid-js';
2
+ export declare const useAlertDialogTrigger: (resolved: ChildrenReturn) => void;
@@ -0,0 +1,26 @@
1
+ import { useAlertDialogContext as e } from "../AlertDialog/AlertDialog.context.js";
2
+ import { onCleanup as t, onMount as n } from "solid-js";
3
+ //#region src/components/alert-dialog/AlertDialogTrigger/useAlertDialogTrigger.ts
4
+ var r = (r) => {
5
+ let { setShow: i, setOpen: a } = e(), o = (e) => {
6
+ console.log("点击", e.type), a(!0), i(!0);
7
+ };
8
+ n(() => {
9
+ let e = r.toArray();
10
+ e.length !== 1 && console.warn("[AlertDialog] AlertDialogTrigger should have exactly one child");
11
+ let n = e[0];
12
+ if (n) {
13
+ if (!(n instanceof HTMLElement)) {
14
+ console.error("[AlertDialog] AlertDialogTrigger child should be an HTMLElement");
15
+ return;
16
+ }
17
+ n.addEventListener("click", o), t(() => {
18
+ n && n.removeEventListener("click", o);
19
+ });
20
+ }
21
+ });
22
+ };
23
+ //#endregion
24
+ export { r as useAlertDialogTrigger };
25
+
26
+ //# sourceMappingURL=useAlertDialogTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertDialogTrigger.js","names":[],"sources":["../../../../src/components/alert-dialog/AlertDialogTrigger/useAlertDialogTrigger.ts"],"sourcesContent":["import { onCleanup, onMount, type ChildrenReturn } from \"solid-js\";\nimport { useAlertDialogContext } from \"../AlertDialog\";\n\nexport const useAlertDialogTrigger = (resolved: ChildrenReturn) => {\n const { setShow, setOpen } = useAlertDialogContext();\n\n const handleClick = (ev: PointerEvent) => {\n console.log(\"点击\", ev.type);\n setOpen(true);\n setShow(true);\n };\n\n onMount(() => {\n const trigger = resolved.toArray();\n if (trigger.length !== 1) {\n console.warn(\n \"[AlertDialog] AlertDialogTrigger should have exactly one child\",\n );\n }\n\n const el = trigger[0] as HTMLElement | undefined;\n\n if (!el) return;\n\n if (!(el instanceof HTMLElement)) {\n console.error(\n \"[AlertDialog] AlertDialogTrigger child should be an HTMLElement\",\n );\n return;\n }\n\n el.addEventListener(\"click\", handleClick);\n\n onCleanup(() => {\n if (!el) return;\n el.removeEventListener(\"click\", handleClick);\n });\n });\n};\n"],"mappings":";;;AAGA,IAAa,KAAyB,MAA6B;CACjE,IAAM,EAAE,YAAS,eAAY,GAAuB,EAE9C,KAAe,MAAqB;AAGxC,EAFA,QAAQ,IAAI,MAAM,EAAG,KAAK,EAC1B,EAAQ,GAAK,EACb,EAAQ,GAAK;;AAGf,SAAc;EACZ,IAAM,IAAU,EAAS,SAAS;AAClC,EAAI,EAAQ,WAAW,KACrB,QAAQ,KACN,iEACD;EAGH,IAAM,IAAK,EAAQ;AAEd,SAEL;OAAI,EAAE,aAAc,cAAc;AAChC,YAAQ,MACN,kEACD;AACD;;AAKF,GAFA,EAAG,iBAAiB,SAAS,EAAY,EAEzC,QAAgB;AACT,SACL,EAAG,oBAAoB,SAAS,EAAY;KAC5C;;GACF"}
@@ -0,0 +1,12 @@
1
+ export * from './AlertDialog';
2
+ export * from './AlertDialogAction';
3
+ export * from './AlertDialogCancel';
4
+ export * from './AlertDialogContent';
5
+ export * from './AlertDialogDescription';
6
+ export * from './AlertDialogFooter';
7
+ export * from './AlertDialogHeader';
8
+ export * from './AlertDialogMedia';
9
+ export * from './AlertDialogOverlay';
10
+ export * from './AlertDialogPortal';
11
+ export * from './AlertDialogTitle';
12
+ export * from './AlertDialogTrigger';
@@ -0,0 +1,15 @@
1
+ import { useAlertDialogContext as e } from "./AlertDialog/AlertDialog.context.js";
2
+ import { AlertDialog as t } from "./AlertDialog/AlertDialog.js";
3
+ import { AlertDialogAction as n } from "./AlertDialogAction/AlertDialogAction.js";
4
+ import { AlertDialogCancel as r } from "./AlertDialogCancel/AlertDialogCancel.js";
5
+ import { AlertDialogPortal as i } from "./AlertDialogPortal/AlertDialogPortal.js";
6
+ import { AlertDialogOverlay as a } from "./AlertDialogOverlay/AlertDialogOverlay.js";
7
+ import { useAlertDialogContentContext as o } from "./AlertDialogContent/AlertDialogContent.context.js";
8
+ import { AlertDialogContent as s } from "./AlertDialogContent/AlertDialogContent.js";
9
+ import { AlertDialogDescription as c } from "./AlertDialogDescription/AlertDialogDescription.js";
10
+ import { AlertDialogFooter as l } from "./AlertDialogFooter/AlertDialogFooter.js";
11
+ import { AlertDialogHeader as u } from "./AlertDialogHeader/AlertDialogHeader.js";
12
+ import { AlertDialogMedia as d } from "./AlertDialogMedia/AlertDialogMedia.js";
13
+ import { AlertDialogTitle as f } from "./AlertDialogTitle/AlertDialogTitle.js";
14
+ import { AlertDialogTrigger as p } from "./AlertDialogTrigger/AlertDialogTrigger.js";
15
+ export { t as AlertDialog, n as AlertDialogAction, r as AlertDialogCancel, s as AlertDialogContent, c as AlertDialogDescription, l as AlertDialogFooter, u as AlertDialogHeader, d as AlertDialogMedia, a as AlertDialogOverlay, i as AlertDialogPortal, f as AlertDialogTitle, p as AlertDialogTrigger, o as useAlertDialogContentContext, e as useAlertDialogContext };
@@ -1,3 +1,3 @@
1
1
  export declare const badgeVariants: (props?: ({
2
- variant?: "link" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
2
+ variant?: "link" | "outline" | "destructive" | "primary" | "secondary" | "ghost" | null | undefined;
3
3
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,7 +1,7 @@
1
1
  export declare const base = "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-neutral-400 focus-visible:ring-3 focus-visible:ring-neutral-400/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-red-600 aria-invalid:ring-3 aria-invalid:ring-red-600/20 dark:aria-invalid:border-red-600/50 dark:aria-invalid:ring-red-600/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
2
2
  declare const _default: (props?: ({
3
- variant?: "link" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
4
- size?: "md" | "sm" | "lg" | "xs" | null | undefined;
5
- iconSize?: "md" | "sm" | "lg" | "xs" | null | undefined;
3
+ variant?: "link" | "outline" | "destructive" | "primary" | "secondary" | "ghost" | null | undefined;
4
+ size?: "md" | "xs" | "sm" | "lg" | null | undefined;
5
+ iconSize?: "md" | "xs" | "sm" | "lg" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export default _default;
@@ -1,3 +1,3 @@
1
1
  export declare const inputGroupAddonVariants: (props?: ({
2
- align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
2
+ align?: "inline-start" | "inline-end" | "block-end" | "block-start" | null | undefined;
3
3
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,4 +1,4 @@
1
1
  export declare const inputGroupButtonVariants: (props?: ({
2
- size?: "sm" | "xs" | null | undefined;
3
- iconSize?: "sm" | "xs" | null | undefined;
2
+ size?: "xs" | "sm" | null | undefined;
3
+ iconSize?: "xs" | "sm" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,4 +1,4 @@
1
1
  export declare const itemVariants: (props?: ({
2
2
  variant?: "outline" | "ghost" | "muted" | null | undefined;
3
- size?: "sm" | "xs" | null | undefined;
3
+ size?: "xs" | "sm" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,3 +1,3 @@
1
1
  export declare const itemMediaVariants: (props?: ({
2
- variant?: "image" | "icon" | "ghost" | null | undefined;
2
+ variant?: "image" | "ghost" | "icon" | null | undefined;
3
3
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollArea.js","names":["createEffect","createSignal","onCleanup","splitProps","ScrollAreaProps","ScrollMetrics","clsx","ScrollBar","ScrollAreaContext","computeMetrics","ScrollArea","props","viewportRef","HTMLDivElement","local","others","hovering","setHovering","dragging","setDragging","verticalMetrics","setVerticalMetrics","thumbRatio","thumbOffset","scrollable","horizontalMetrics","setHorizontalMetrics","updateMetrics","el","HTMLElement","clientHeight","scrollTop","scrollHeight","clientWidth","scrollLeft","scrollWidth","setup","update","ro","ResizeObserver","observe","firstElementChild","addEventListener","passive","disconnect","removeEventListener","_el$","_tmpl$2","_$spread","_$mergeProps","class","_$insert","_$createComponent","Provider","value","vertical","horizontal","children","_el$2","_tmpl$","_ref$","_$use","_$effect","_p$","_v$","_v$2","orientation","e","_$setAttribute","t","_$className","undefined"],"sources":["../../../../src/components/scroll-area/ScrollArea/ScrollArea.tsx"],"sourcesContent":["import { createEffect, createSignal, onCleanup, splitProps } from \"solid-js\";\nimport type { ScrollAreaProps, ScrollMetrics } from \"./ScrollArea.types\";\nimport { clsx } from \"~/utils\";\nimport { ScrollBar } from \"../ScrollBar\";\nimport { ScrollAreaContext } from \"./ScrollArea.context\";\nimport { computeMetrics } from \"./ScrollArea.utils\";\n\nexport const ScrollArea = (props: ScrollAreaProps) => {\n let viewportRef: HTMLDivElement | undefined;\n\n const [local, others] = splitProps(props, [\n \"orientation\",\n \"class\",\n \"classList\",\n \"children\",\n \"aria-label\",\n ]);\n\n const [hovering, setHovering] = createSignal(false);\n const [dragging, setDragging] = createSignal<\n \"vertical\" | \"horizontal\" | null\n >(null);\n\n const [verticalMetrics, setVerticalMetrics] = createSignal<ScrollMetrics>({\n thumbRatio: 1,\n thumbOffset: 0,\n scrollable: false,\n });\n const [horizontalMetrics, setHorizontalMetrics] = createSignal<ScrollMetrics>(\n {\n thumbRatio: 1,\n thumbOffset: 0,\n scrollable: false,\n },\n );\n\n function updateMetrics(el: HTMLElement) {\n setVerticalMetrics(\n computeMetrics(el.clientHeight, el.scrollTop, el.scrollHeight),\n );\n setHorizontalMetrics(\n computeMetrics(el.clientWidth, el.scrollLeft, el.scrollWidth),\n );\n }\n\n function setup(el: HTMLDivElement) {\n viewportRef = el; // ref 赋值\n\n updateMetrics(el);\n\n const update = () => updateMetrics(el);\n\n const ro = new ResizeObserver(update);\n ro.observe(el);\n\n if (el.firstElementChild) {\n ro.observe(el.firstElementChild);\n }\n\n el.addEventListener(\"scroll\", update, { passive: true });\n\n onCleanup(() => {\n ro.disconnect();\n el.removeEventListener(\"scroll\", update);\n });\n }\n\n return (\n <div\n data-slot=\"scroll-area\"\n class={clsx(\"relative\", local.class)}\n onMouseEnter={() => setHovering(true)}\n onMouseLeave={() => setHovering(false)}\n {...others}\n >\n <ScrollAreaContext.Provider\n value={{\n hovering,\n viewportRef: () => viewportRef,\n dragging,\n setDragging,\n vertical: verticalMetrics,\n horizontal: horizontalMetrics,\n }}\n >\n <div\n ref={setup}\n data-slot=\"scroll-area-viewport\"\n role=\"region\"\n aria-label={local[\"aria-label\"] ?? \"Scrollable content\"}\n class={clsx(\n // \"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-neutral-400/50 dark:focus-visible:ring-neutral-500/50 focus-visible:outline-1\",\n // \"overflow-scroll\",\n // \"[scrollbar-width:none]\",\n \"size-full rounded-[inherit] outline-none\",\n // Native scrollbars hidden via CSS; custom ones provided below\n \"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden\",\n // Focus ring — meets WCAG 2.4.7\n \"focus-visible:ring-2 focus-visible:ring-offset-1\",\n \"focus-visible:ring-neutral-400/70 dark:focus-visible:ring-neutral-500/70\",\n // Overflow based on which scrollbars are active\n local.orientation === \"vertical\"\n ? \"overflow-y-scroll overflow-x-hidden\"\n : local.orientation === \"horizontal\"\n ? \"overflow-x-scroll overflow-y-hidden\"\n : \"overflow-scroll\",\n )}\n >\n {local.children}\n </div>\n <ScrollBar orientation={local.orientation} />\n </ScrollAreaContext.Provider>\n </div>\n );\n};\n"],"mappings":";;;;;;;qIAOaU,KAAcC,MAA2B;CACpD,IAAIC,GAEE,CAACE,GAAOC,KAAUZ,EAAWQ,GAAO;EACxC;EACA;EACA;EACA;EACA;EACD,CAAC,EAEI,CAACK,GAAUC,KAAehB,EAAa,GAAM,EAC7C,CAACiB,GAAUC,KAAelB,EAE9B,KAAK,EAED,CAACmB,GAAiBC,KAAsBpB,EAA4B;EACxEqB,YAAY;EACZC,aAAa;EACbC,YAAY;EACb,CAAC,EACI,CAACC,GAAmBC,KAAwBzB,EAChD;EACEqB,YAAY;EACZC,aAAa;EACbC,YAAY;EAEhB,CAAC;CAED,SAASG,EAAcC,GAAiB;AAItCF,EAHAL,EACEZ,EAAemB,EAAGE,cAAcF,EAAGG,WAAWH,EAAGI,aACnD,CAAC,EACDN,EACEjB,EAAemB,EAAGK,aAAaL,EAAGM,YAAYN,EAAGO,YACnD,CAAC;;CAGH,SAASC,EAAMR,GAAoB;AAGjCD,EAFAf,IAAcgB,GAEdD,EAAcC,EAAG;EAEjB,IAAMS,UAAeV,EAAcC,EAAG,EAEhCU,IAAK,IAAIC,eAAeF,EAAO;AASrCnC,EARAoC,EAAGE,QAAQZ,EAAG,EAEVA,EAAGa,qBACLH,EAAGE,QAAQZ,EAAGa,kBAAkB,EAGlCb,EAAGc,iBAAiB,UAAUL,GAAQ,EAAEM,SAAS,IAAM,CAAC,EAExDzC,QAAgB;AAEd0B,GADAU,EAAGM,YAAY,EACfhB,EAAGiB,oBAAoB,UAAUR,EAAO;IACxC;;AAGJ,eAAA;EAAA,IAAAS,IAAAC,GAAA;AA2C+C,SA3C/CD,EAAAJ,iBAAA,oBAKwBzB,EAAY,GAAM,CAAA,EAAA6B,EAAAJ,iBAAA,oBADlBzB,EAAY,GAAK,CAAA,EAAA+B,EAAAF,GAAAG,EAAA,EAAA,IAAA,QAAA;AAAA,UAD9B3C,EAAK,YAAYQ,EAAMoC,MAAM;KAAA,EAGhCnC,EAAM,EAAA,IAAA,GAAA,EAAAoC,EAAAL,GAAAM,EAET5C,EAAkB6C,UAAQ;GACzBC,OAAO;IACLtC;IACAJ,mBAAmBA;IACnBM;IACAC;IACAoC,UAAUnC;IACVoC,YAAY/B;IACb;GAAA,IAAAgC,WAAA;AAAA,WAAA,QAAA;KAAA,IAAAC,IAAAC,GAAA,EAAAC,IAGMxB;AAoBJ,YApBS,OAAAwB,KAAA,aAAAC,EAAAD,GAAAF,EAAA,GAALtB,IAAKsB,GAAAP,EAAAO,SAsBT5C,EAAM2C,SAAQ,EAAAK,GAAAC,MAAA;MAAA,IAAAC,IAnBHlD,EAAM,iBAAiB,sBAAoBmD,IAChD3D,EAIL,4CAEA,wDAEA,oDACA,4EAEAQ,EAAMoD,gBAAgB,aAClB,wCACApD,EAAMoD,gBAAgB,eACpB,wCACA,kBACP;AAAA,aAAAF,MAAAD,EAAAI,KAAAC,EAAAV,GAAA,cAAAK,EAAAI,IAAAH,EAAA,EAAAC,MAAAF,EAAAM,KAAAC,EAAAZ,GAAAK,EAAAM,IAAAJ,EAAA,EAAAF;QAAA;MAAAI,GAAAI,KAAAA;MAAAF,GAAAE,KAAAA;MAAA,CAAA,EAAAb;QAAA,EAAAN,EAIF7C,GAAS,EAAA,IAAC2D,cAAW;AAAA,YAAEpD,EAAMoD;OAAW,CAAA,CAAA;;GAAA,CAAA,CAAA,EAAApB;KAAA"}
1
+ {"version":3,"file":"ScrollArea.js","names":["createSignal","onCleanup","splitProps","ScrollAreaProps","ScrollMetrics","clsx","ScrollBar","ScrollAreaContext","computeMetrics","ScrollArea","props","viewportRef","HTMLDivElement","local","others","hovering","setHovering","dragging","setDragging","verticalMetrics","setVerticalMetrics","thumbRatio","thumbOffset","scrollable","horizontalMetrics","setHorizontalMetrics","updateMetrics","el","HTMLElement","clientHeight","scrollTop","scrollHeight","clientWidth","scrollLeft","scrollWidth","setup","update","ro","ResizeObserver","observe","firstElementChild","addEventListener","passive","disconnect","removeEventListener","_el$","_tmpl$2","_$spread","_$mergeProps","class","_$insert","_$createComponent","Provider","value","vertical","horizontal","children","_el$2","_tmpl$","_ref$","_$use","_$effect","_p$","_v$","_v$2","orientation","e","_$setAttribute","t","_$className","undefined"],"sources":["../../../../src/components/scroll-area/ScrollArea/ScrollArea.tsx"],"sourcesContent":["import { createSignal, onCleanup, splitProps } from \"solid-js\";\nimport type { ScrollAreaProps, ScrollMetrics } from \"./ScrollArea.types\";\nimport { clsx } from \"~/utils\";\nimport { ScrollBar } from \"../ScrollBar\";\nimport { ScrollAreaContext } from \"./ScrollArea.context\";\nimport { computeMetrics } from \"./ScrollArea.utils\";\n\nexport const ScrollArea = (props: ScrollAreaProps) => {\n let viewportRef: HTMLDivElement | undefined;\n\n const [local, others] = splitProps(props, [\n \"orientation\",\n \"class\",\n \"classList\",\n \"children\",\n \"aria-label\",\n ]);\n\n const [hovering, setHovering] = createSignal(false);\n const [dragging, setDragging] = createSignal<\n \"vertical\" | \"horizontal\" | null\n >(null);\n\n const [verticalMetrics, setVerticalMetrics] = createSignal<ScrollMetrics>({\n thumbRatio: 1,\n thumbOffset: 0,\n scrollable: false,\n });\n const [horizontalMetrics, setHorizontalMetrics] = createSignal<ScrollMetrics>(\n {\n thumbRatio: 1,\n thumbOffset: 0,\n scrollable: false,\n },\n );\n\n function updateMetrics(el: HTMLElement) {\n setVerticalMetrics(\n computeMetrics(el.clientHeight, el.scrollTop, el.scrollHeight),\n );\n setHorizontalMetrics(\n computeMetrics(el.clientWidth, el.scrollLeft, el.scrollWidth),\n );\n }\n\n function setup(el: HTMLDivElement) {\n viewportRef = el; // ref 赋值\n\n updateMetrics(el);\n\n const update = () => updateMetrics(el);\n\n const ro = new ResizeObserver(update);\n ro.observe(el);\n\n if (el.firstElementChild) {\n ro.observe(el.firstElementChild);\n }\n\n el.addEventListener(\"scroll\", update, { passive: true });\n\n onCleanup(() => {\n ro.disconnect();\n el.removeEventListener(\"scroll\", update);\n });\n }\n\n return (\n <div\n data-slot=\"scroll-area\"\n class={clsx(\"relative\", local.class)}\n onMouseEnter={() => setHovering(true)}\n onMouseLeave={() => setHovering(false)}\n {...others}\n >\n <ScrollAreaContext.Provider\n value={{\n hovering,\n viewportRef: () => viewportRef,\n dragging,\n setDragging,\n vertical: verticalMetrics,\n horizontal: horizontalMetrics,\n }}\n >\n <div\n ref={setup}\n data-slot=\"scroll-area-viewport\"\n role=\"region\"\n aria-label={local[\"aria-label\"] ?? \"Scrollable content\"}\n class={clsx(\n // \"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-neutral-400/50 dark:focus-visible:ring-neutral-500/50 focus-visible:outline-1\",\n // \"overflow-scroll\",\n // \"[scrollbar-width:none]\",\n \"size-full rounded-[inherit] outline-none\",\n // Native scrollbars hidden via CSS; custom ones provided below\n \"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden\",\n // Focus ring — meets WCAG 2.4.7\n \"focus-visible:ring-2 focus-visible:ring-offset-1\",\n \"focus-visible:ring-neutral-400/70 dark:focus-visible:ring-neutral-500/70\",\n // Overflow based on which scrollbars are active\n local.orientation === \"vertical\"\n ? \"overflow-y-scroll overflow-x-hidden\"\n : local.orientation === \"horizontal\"\n ? \"overflow-x-scroll overflow-y-hidden\"\n : \"overflow-scroll\",\n )}\n >\n {local.children}\n </div>\n <ScrollBar orientation={local.orientation} />\n </ScrollAreaContext.Provider>\n </div>\n );\n};\n"],"mappings":";;;;;;;qIAOaS,KAAcC,MAA2B;CACpD,IAAIC,GAEE,CAACE,GAAOC,KAAUZ,EAAWQ,GAAO;EACxC;EACA;EACA;EACA;EACA;EACD,CAAC,EAEI,CAACK,GAAUC,KAAehB,EAAa,GAAM,EAC7C,CAACiB,GAAUC,KAAelB,EAE9B,KAAK,EAED,CAACmB,GAAiBC,KAAsBpB,EAA4B;EACxEqB,YAAY;EACZC,aAAa;EACbC,YAAY;EACb,CAAC,EACI,CAACC,GAAmBC,KAAwBzB,EAChD;EACEqB,YAAY;EACZC,aAAa;EACbC,YAAY;EAEhB,CAAC;CAED,SAASG,EAAcC,GAAiB;AAItCF,EAHAL,EACEZ,EAAemB,EAAGE,cAAcF,EAAGG,WAAWH,EAAGI,aACnD,CAAC,EACDN,EACEjB,EAAemB,EAAGK,aAAaL,EAAGM,YAAYN,EAAGO,YACnD,CAAC;;CAGH,SAASC,EAAMR,GAAoB;AAGjCD,EAFAf,IAAcgB,GAEdD,EAAcC,EAAG;EAEjB,IAAMS,UAAeV,EAAcC,EAAG,EAEhCU,IAAK,IAAIC,eAAeF,EAAO;AASrCnC,EARAoC,EAAGE,QAAQZ,EAAG,EAEVA,EAAGa,qBACLH,EAAGE,QAAQZ,EAAGa,kBAAkB,EAGlCb,EAAGc,iBAAiB,UAAUL,GAAQ,EAAEM,SAAS,IAAM,CAAC,EAExDzC,QAAgB;AAEd0B,GADAU,EAAGM,YAAY,EACfhB,EAAGiB,oBAAoB,UAAUR,EAAO;IACxC;;AAGJ,eAAA;EAAA,IAAAS,IAAAC,GAAA;AA2C+C,SA3C/CD,EAAAJ,iBAAA,oBAKwBzB,EAAY,GAAM,CAAA,EAAA6B,EAAAJ,iBAAA,oBADlBzB,EAAY,GAAK,CAAA,EAAA+B,EAAAF,GAAAG,EAAA,EAAA,IAAA,QAAA;AAAA,UAD9B3C,EAAK,YAAYQ,EAAMoC,MAAM;KAAA,EAGhCnC,EAAM,EAAA,IAAA,GAAA,EAAAoC,EAAAL,GAAAM,EAET5C,EAAkB6C,UAAQ;GACzBC,OAAO;IACLtC;IACAJ,mBAAmBA;IACnBM;IACAC;IACAoC,UAAUnC;IACVoC,YAAY/B;IACb;GAAA,IAAAgC,WAAA;AAAA,WAAA,QAAA;KAAA,IAAAC,IAAAC,GAAA,EAAAC,IAGMxB;AAoBJ,YApBS,OAAAwB,KAAA,aAAAC,EAAAD,GAAAF,EAAA,GAALtB,IAAKsB,GAAAP,EAAAO,SAsBT5C,EAAM2C,SAAQ,EAAAK,GAAAC,MAAA;MAAA,IAAAC,IAnBHlD,EAAM,iBAAiB,sBAAoBmD,IAChD3D,EAIL,4CAEA,wDAEA,oDACA,4EAEAQ,EAAMoD,gBAAgB,aAClB,wCACApD,EAAMoD,gBAAgB,eACpB,wCACA,kBACP;AAAA,aAAAF,MAAAD,EAAAI,KAAAC,EAAAV,GAAA,cAAAK,EAAAI,IAAAH,EAAA,EAAAC,MAAAF,EAAAM,KAAAC,EAAAZ,GAAAK,EAAAM,IAAAJ,EAAA,EAAAF;QAAA;MAAAI,GAAAI,KAAAA;MAAAF,GAAAE,KAAAA;MAAA,CAAA,EAAAb;QAAA,EAAAN,EAIF7C,GAAS,EAAA,IAAC2D,cAAW;AAAA,YAAEpD,EAAMoD;OAAW,CAAA,CAAA;;GAAA,CAAA,CAAA,EAAApB;KAAA"}
@@ -2,5 +2,5 @@ export declare function computePosition(trigger: HTMLElement, content: HTMLEleme
2
2
  top: number;
3
3
  left: number;
4
4
  side: "left" | "right" | "bottom" | "top";
5
- align: "center" | "end" | "start";
5
+ align: "center" | "start" | "end";
6
6
  };
@@ -5,6 +5,6 @@ export declare const useTooltipContent: (ref: () => HTMLDivElement | undefined,
5
5
  top: number;
6
6
  left: number;
7
7
  side: "left" | "right" | "bottom" | "top";
8
- align: "center" | "end" | "start";
8
+ align: "center" | "start" | "end";
9
9
  };
10
10
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './components/accordion';
2
+ export * from './components/alert';
3
+ export * from './components/alert-dialog';
2
4
  export * from './components/aspect-ratio';
3
5
  export * from './components/avatar';
4
6
  export * from './components/badge';