@neut/ui 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/select/Select/Select.context.d.ts +3 -0
- package/dist/components/select/Select/Select.context.js +12 -0
- package/dist/components/select/Select/Select.context.js.map +1 -0
- package/dist/components/select/Select/Select.d.ts +19 -0
- package/dist/components/select/Select/Select.js +48 -0
- package/dist/components/select/Select/Select.js.map +1 -0
- package/dist/components/select/Select/Select.types.d.ts +41 -0
- package/dist/components/select/Select/index.d.ts +3 -0
- package/dist/components/select/SelectContent/SelectContent.d.ts +2 -0
- package/dist/components/select/SelectContent/SelectContent.js +80 -0
- package/dist/components/select/SelectContent/SelectContent.js.map +1 -0
- package/dist/components/select/SelectContent/SelectContent.types.d.ts +22 -0
- package/dist/components/select/SelectContent/SelectContent.utils.d.ts +35 -0
- package/dist/components/select/SelectContent/SelectContent.utils.js +66 -0
- package/dist/components/select/SelectContent/SelectContent.utils.js.map +1 -0
- package/dist/components/select/SelectContent/index.d.ts +6 -0
- package/dist/components/select/SelectContent/useSelectContent.d.ts +28 -0
- package/dist/components/select/SelectContent/useSelectContent.js +46 -0
- package/dist/components/select/SelectContent/useSelectContent.js.map +1 -0
- package/dist/components/select/SelectGroup/SelectGroup.d.ts +2 -0
- package/dist/components/select/SelectGroup/SelectGroup.js +13 -0
- package/dist/components/select/SelectGroup/SelectGroup.js.map +1 -0
- package/dist/components/select/SelectGroup/index.d.ts +1 -0
- package/dist/components/select/SelectItem/SelectItem.d.ts +2 -0
- package/dist/components/select/SelectItem/SelectItem.js +52 -0
- package/dist/components/select/SelectItem/SelectItem.js.map +1 -0
- package/dist/components/select/SelectItem/SelectItem.types.d.ts +9 -0
- package/dist/components/select/SelectItem/index.d.ts +4 -0
- package/dist/components/select/SelectItem/useSelectItem.d.ts +11 -0
- package/dist/components/select/SelectItem/useSelectItem.js +32 -0
- package/dist/components/select/SelectItem/useSelectItem.js.map +1 -0
- package/dist/components/select/SelectLabel/SelectLabel.d.ts +2 -0
- package/dist/components/select/SelectLabel/SelectLabel.js +13 -0
- package/dist/components/select/SelectLabel/SelectLabel.js.map +1 -0
- package/dist/components/select/SelectLabel/index.d.ts +1 -0
- package/dist/components/select/SelectSeparator/SelectSeparator.d.ts +2 -0
- package/dist/components/select/SelectSeparator/SelectSeparator.js +13 -0
- package/dist/components/select/SelectSeparator/SelectSeparator.js.map +1 -0
- package/dist/components/select/SelectSeparator/index.d.ts +1 -0
- package/dist/components/select/SelectTrigger/SelectTrigger.d.ts +4 -0
- package/dist/components/select/SelectTrigger/SelectTrigger.js +50 -0
- package/dist/components/select/SelectTrigger/SelectTrigger.js.map +1 -0
- package/dist/components/select/SelectTrigger/SelectTrigger.types.d.ts +3 -0
- package/dist/components/select/SelectTrigger/index.d.ts +4 -0
- package/dist/components/select/SelectTrigger/useSelectTrigger.d.ts +15 -0
- package/dist/components/select/SelectTrigger/useSelectTrigger.js +37 -0
- package/dist/components/select/SelectTrigger/useSelectTrigger.js.map +1 -0
- package/dist/components/select/SelectValue/SelectValue.d.ts +2 -0
- package/dist/components/select/SelectValue/SelectValue.js +20 -0
- package/dist/components/select/SelectValue/SelectValue.js.map +1 -0
- package/dist/components/select/SelectValue/SelectValue.types.d.ts +4 -0
- package/dist/components/select/SelectValue/index.d.ts +2 -0
- package/dist/components/select/index.d.ts +13 -0
- package/dist/components/select/index.js +9 -0
- package/dist/components/switch/Switch.styles.js +1 -1
- package/dist/components/switch/Switch.styles.js.map +1 -1
- package/dist/components/tabs/Tabs/Tabs.context.d.ts +47 -0
- package/dist/components/tabs/Tabs/Tabs.context.js +54 -0
- package/dist/components/tabs/Tabs/Tabs.context.js.map +1 -0
- package/dist/components/tabs/Tabs/Tabs.d.ts +2 -0
- package/dist/components/tabs/Tabs/Tabs.js +71 -0
- package/dist/components/tabs/Tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/Tabs/Tabs.types.d.ts +16 -0
- package/dist/components/tabs/Tabs/call-event-handler.d.ts +5 -0
- package/dist/components/tabs/Tabs/call-event-handler.js +9 -0
- package/dist/components/tabs/Tabs/call-event-handler.js.map +1 -0
- package/dist/components/tabs/Tabs/index.d.ts +2 -0
- package/dist/components/tabs/Tabs/useTabsKeyboard.d.ts +18 -0
- package/dist/components/tabs/Tabs/useTabsKeyboard.js +49 -0
- package/dist/components/tabs/Tabs/useTabsKeyboard.js.map +1 -0
- package/dist/components/tabs/TabsContent/TabsContent.d.ts +3 -0
- package/dist/components/tabs/TabsContent/TabsContent.js +52 -0
- package/dist/components/tabs/TabsContent/TabsContent.js.map +1 -0
- package/dist/components/tabs/TabsContent/TabsContent.types.d.ts +6 -0
- package/dist/components/tabs/TabsContent/index.d.ts +2 -0
- package/dist/components/tabs/TabsList/TabsList.context.d.ts +7 -0
- package/dist/components/tabs/TabsList/TabsList.context.js +11 -0
- package/dist/components/tabs/TabsList/TabsList.context.js.map +1 -0
- package/dist/components/tabs/TabsList/TabsList.d.ts +2 -0
- package/dist/components/tabs/TabsList/TabsList.js +48 -0
- package/dist/components/tabs/TabsList/TabsList.js.map +1 -0
- package/dist/components/tabs/TabsList/TabsList.styles.d.ts +3 -0
- package/dist/components/tabs/TabsList/TabsList.styles.js +13 -0
- package/dist/components/tabs/TabsList/TabsList.styles.js.map +1 -0
- package/dist/components/tabs/TabsList/TabsList.types.d.ts +7 -0
- package/dist/components/tabs/TabsList/index.d.ts +2 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.d.ts +2 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.js +71 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.js.map +1 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.styles.d.ts +1 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.styles.js +7 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.styles.js.map +1 -0
- package/dist/components/tabs/TabsTrigger/TabsTrigger.types.d.ts +6 -0
- package/dist/components/tabs/TabsTrigger/index.d.ts +2 -0
- package/dist/components/tabs/index.d.ts +4 -0
- package/dist/components/tabs/index.js +5 -0
- package/dist/components/tooltip/TooltipContent/TooltipContent.js +25 -27
- package/dist/components/tooltip/TooltipContent/TooltipContent.js.map +1 -1
- package/dist/components/tooltip/TooltipContent/useTooltipContent.js +3 -3
- package/dist/components/tooltip/TooltipTrigger/TooltipTrigger.js +11 -15
- package/dist/components/tooltip/TooltipTrigger/TooltipTrigger.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +167 -154
- package/dist/lib/positioner/middleware/size.js +21 -0
- package/dist/lib/positioner/middleware/size.js.map +1 -0
- package/dist/ui.css +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +3 -2
- package/dist/utils/ref.d.ts +11 -0
- package/dist/utils/ref.js +10 -0
- package/dist/utils/ref.js.map +1 -0
- package/package.json +5 -5
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { mergeRefs as e } from "../../../utils/ref.js";
|
|
2
|
+
import { Button as t } from "../../button/Button.js";
|
|
3
|
+
import { useTooltipTrigger as n } from "./useTooltipTrigger.js";
|
|
4
|
+
import { Dynamic as r, createComponent as i, memo as a, mergeProps as o } from "solid-js/web";
|
|
4
5
|
//#region src/components/tooltip/TooltipTrigger/TooltipTrigger.tsx
|
|
5
|
-
function o(...e) {
|
|
6
|
-
return (t) => {
|
|
7
|
-
for (let n of e) typeof n == "function" && n(t);
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
6
|
var s = (s) => {
|
|
11
|
-
let { ctx: c, attachListeners: l } =
|
|
12
|
-
return r
|
|
7
|
+
let { ctx: c, attachListeners: l } = n();
|
|
8
|
+
return i(r, o(s, {
|
|
13
9
|
get component() {
|
|
14
|
-
return s.component ??
|
|
10
|
+
return s.component ?? t;
|
|
15
11
|
},
|
|
16
|
-
ref(
|
|
17
|
-
var
|
|
18
|
-
typeof
|
|
12
|
+
ref(t) {
|
|
13
|
+
var n = e(c.setReference, s.ref, l);
|
|
14
|
+
typeof n == "function" && n(t);
|
|
19
15
|
},
|
|
20
16
|
get "aria-describedby"() {
|
|
21
|
-
return
|
|
17
|
+
return a(() => !!c.open())() ? c.contentId : void 0;
|
|
22
18
|
},
|
|
23
19
|
get "data-state"() {
|
|
24
20
|
return c.open() ? "open" : "closed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipTrigger.js","names":["ValidComponent","Dynamic","useTooltipTrigger","TooltipTriggerProps","Button","mergeRefs","
|
|
1
|
+
{"version":3,"file":"TooltipTrigger.js","names":["ValidComponent","Dynamic","useTooltipTrigger","TooltipTriggerProps","Button","mergeRefs","TooltipTrigger","props","T","ctx","attachListeners","_$createComponent","_$mergeProps","component","ref","r$","_ref$","setReference","aria-describedby","_$memo","open","contentId","undefined","data-state"],"sources":["../../../../src/components/tooltip/TooltipTrigger/TooltipTrigger.tsx"],"sourcesContent":["import type { ValidComponent } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\n\nimport { useTooltipTrigger } from \"./useTooltipTrigger\";\nimport type { TooltipTriggerProps } from \"./TooltipTrigger.types\";\n\nimport { Button } from \"~/components/button\";\nimport { mergeRefs } from \"~/utils\";\n\nexport const TooltipTrigger = <\n T extends ValidComponent = typeof Button<\"button\">,\n>(\n props: TooltipTriggerProps<T>,\n) => {\n const { ctx, attachListeners } = useTooltipTrigger();\n\n return (\n <Dynamic\n {...props}\n component={(props.component as ValidComponent) ?? Button<\"button\">}\n ref={mergeRefs(ctx.setReference, props.ref, attachListeners)}\n aria-describedby={ctx.open() ? ctx.contentId : undefined}\n data-state={ctx.open() ? \"open\" : \"closed\"}\n // data-disabled={props.disabled ? \"\" : undefined}\n />\n );\n};\n"],"mappings":";;;;;AASA,IAAaM,KAGXC,MACG;CACH,IAAM,EAAEE,QAAKC,uBAAoBR,EAAkB;CAEnD,OAAAS,EACGV,GAAOW,EACFL,GAAK;EAAA,IACTM,YAAS;GAAA,OAAGN,EAAMM,aAAgCT;EAAgB;EAAAU,IAAAC,GAAA;GAAA,IAAAC,IAC7DX,EAAUI,EAAIQ,cAAcV,EAAMO,KAAKJ,CAAe;GAAC,OAAAM,KAAA,cAAAA,EAAAD,CAAA;EAAA;EAAA,IAAA,qBAAA;GAAA,OAC1CI,QAAA,CAAA,CAAAV,EAAIW,KAAK,CAAC,CAAA,CAAA,IAAGX,EAAIY,YAAYC,KAAAA;EAAS;EAAA,IAAA,eAAA;GAAA,OAC5Cb,EAAIW,KAAK,IAAI,SAAS;EAAQ;CAAA,CAAA,CAAA;AAIhD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,12 +22,14 @@ export * from './components/label';
|
|
|
22
22
|
export * from './components/pagination';
|
|
23
23
|
export * from './components/progress';
|
|
24
24
|
export * from './components/scroll-area';
|
|
25
|
+
export * from './components/select';
|
|
25
26
|
export * from './components/separator';
|
|
26
27
|
export * from './components/sidebar';
|
|
27
28
|
export * from './components/skeleton';
|
|
28
29
|
export * from './components/slider';
|
|
29
30
|
export * from './components/spinner';
|
|
30
31
|
export * from './components/switch';
|
|
32
|
+
export * from './components/tabs';
|
|
31
33
|
export * from './components/textarea';
|
|
32
34
|
export * from './components/toast';
|
|
33
35
|
export * from './components/tooltip';
|
package/dist/index.js
CHANGED
|
@@ -1,157 +1,170 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { clsx as e } from "./utils/clsx.js";
|
|
3
3
|
import { Logger as t, logger as n } from "./utils/logger.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import {
|
|
145
|
-
import {
|
|
146
|
-
import {
|
|
147
|
-
import {
|
|
148
|
-
import {
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
import {
|
|
153
|
-
import {
|
|
154
|
-
import {
|
|
155
|
-
import {
|
|
156
|
-
import {
|
|
157
|
-
|
|
4
|
+
import { mergeRefs as r } from "./utils/ref.js";
|
|
5
|
+
import { warnOnce as i } from "./utils/warn-once.js";
|
|
6
|
+
import { AccordionProvider as a, useAccordionContext as o } from "./components/accordion/Accordion/Accordion.context.js";
|
|
7
|
+
import { Accordion as s } from "./components/accordion/Accordion/Accordion.js";
|
|
8
|
+
import { AccordionContent as c } from "./components/accordion/AccordionContent/AccordionContent.js";
|
|
9
|
+
import { AccordionItem as l } from "./components/accordion/AccordionItem/AccordionItem.js";
|
|
10
|
+
import { AccordionTrigger as u } from "./components/accordion/AccordionTrigger/AccordionTrigger.js";
|
|
11
|
+
import { Alert as d } from "./components/alert/Alert/Alert.js";
|
|
12
|
+
import { AlertAction as f } from "./components/alert/AlertAction/AlertAction.js";
|
|
13
|
+
import { AlertTitle as p } from "./components/alert/AlertTitle/AlertTitle.js";
|
|
14
|
+
import { AlertDescription as m } from "./components/alert/AlertDescription/AlertDescription.js";
|
|
15
|
+
import { useAlertDialogContext as h } from "./components/alert-dialog/AlertDialog/AlertDialog.context.js";
|
|
16
|
+
import { AlertDialog as g } from "./components/alert-dialog/AlertDialog/AlertDialog.js";
|
|
17
|
+
import { Button as _ } from "./components/button/Button.js";
|
|
18
|
+
import { AlertDialogAction as v } from "./components/alert-dialog/AlertDialogAction/AlertDialogAction.js";
|
|
19
|
+
import { AlertDialogCancel as y } from "./components/alert-dialog/AlertDialogCancel/AlertDialogCancel.js";
|
|
20
|
+
import { AlertDialogPortal as b } from "./components/alert-dialog/AlertDialogPortal/AlertDialogPortal.js";
|
|
21
|
+
import { AlertDialogOverlay as x } from "./components/alert-dialog/AlertDialogOverlay/AlertDialogOverlay.js";
|
|
22
|
+
import { useAlertDialogContentContext as S } from "./components/alert-dialog/AlertDialogContent/AlertDialogContent.context.js";
|
|
23
|
+
import { AlertDialogContent as C } from "./components/alert-dialog/AlertDialogContent/AlertDialogContent.js";
|
|
24
|
+
import { AlertDialogDescription as w } from "./components/alert-dialog/AlertDialogDescription/AlertDialogDescription.js";
|
|
25
|
+
import { AlertDialogFooter as T } from "./components/alert-dialog/AlertDialogFooter/AlertDialogFooter.js";
|
|
26
|
+
import { AlertDialogHeader as E } from "./components/alert-dialog/AlertDialogHeader/AlertDialogHeader.js";
|
|
27
|
+
import { AlertDialogMedia as D } from "./components/alert-dialog/AlertDialogMedia/AlertDialogMedia.js";
|
|
28
|
+
import { AlertDialogTitle as O } from "./components/alert-dialog/AlertDialogTitle/AlertDialogTitle.js";
|
|
29
|
+
import { AlertDialogTrigger as k } from "./components/alert-dialog/AlertDialogTrigger/AlertDialogTrigger.js";
|
|
30
|
+
import { AspectRatio as A } from "./components/aspect-ratio/AspectRatio.js";
|
|
31
|
+
import { Avatar as j } from "./components/avatar/Avatar/Avatar.js";
|
|
32
|
+
import { AvatarImage as M } from "./components/avatar/AvatarImage/AvatarImage.js";
|
|
33
|
+
import { AvatarFallback as N } from "./components/avatar/AvatarFallback/AvatarFallback.js";
|
|
34
|
+
import { AvatarBadge as P } from "./components/avatar/AvatarBadge/AvatarBadge.js";
|
|
35
|
+
import { AvatarGroup as F } from "./components/avatar/AvatarGroup/AvatarGroup.js";
|
|
36
|
+
import { AvatarGroupCount as I } from "./components/avatar/AvatarGroupCount/AvatarGroupCount.js";
|
|
37
|
+
import { Badge as L } from "./components/badge/Badge.js";
|
|
38
|
+
import { Breadcrumb as R } from "./components/breadcrumb/Breadcrumb/Breadcrumb.js";
|
|
39
|
+
import { BreadcrumbList as z } from "./components/breadcrumb/BreadcrumbList/BreadcrumbList.js";
|
|
40
|
+
import { BreadcrumbItem as B } from "./components/breadcrumb/BreadcrumbItem/BreadcrumbItem.js";
|
|
41
|
+
import { BreadcrumbLink as V } from "./components/breadcrumb/BreadcrumbLink/BreadcrumbLink.js";
|
|
42
|
+
import { BreadcrumbPage as H } from "./components/breadcrumb/BreadcrumbPage/BreadcrumbPage.js";
|
|
43
|
+
import { BreadcrumbSeparator as U } from "./components/breadcrumb/BreadcrumbSeparator/BreadcrumbSeparator.js";
|
|
44
|
+
import { BreadcrumbEllipsis as W } from "./components/breadcrumb/BreadcrumbEllipsis/BreadcrumbEllipsis.js";
|
|
45
|
+
import { ButtonGroup as G } from "./components/button-group/ButtonGroup/ButtonGroup.js";
|
|
46
|
+
import { Separator as K } from "./components/separator/Separator.js";
|
|
47
|
+
import { ButtonGroupSeparator as q } from "./components/button-group/ButtonGroupSeparator/ButtonGroupSeparator.js";
|
|
48
|
+
import { ButtonGroupText as J } from "./components/button-group/ButtonGroupText/ButtonGroupText.js";
|
|
49
|
+
import { Card as Y } from "./components/card/Card/Card.js";
|
|
50
|
+
import { CardAction as X } from "./components/card/CardAction/CardAction.js";
|
|
51
|
+
import { CardContent as Z } from "./components/card/CardContent/CardContent.js";
|
|
52
|
+
import { CardDescription as Q } from "./components/card/CardDescription/CardDescription.js";
|
|
53
|
+
import { CardFooter as $ } from "./components/card/CardFooter/CardFooter.js";
|
|
54
|
+
import { CardHeader as ee } from "./components/card/CardHeader/CardHeader.js";
|
|
55
|
+
import { CardTitle as te } from "./components/card/CardTitle/CardTitle.js";
|
|
56
|
+
import { Carousel as ne } from "./components/carousel/Carousel/Carousel.js";
|
|
57
|
+
import { CarouselContent as re } from "./components/carousel/CarouselContent/CarouselContent.js";
|
|
58
|
+
import { CarouselDots as ie } from "./components/carousel/CarouselDots/CarouselDots.js";
|
|
59
|
+
import { CarouselItem as ae } from "./components/carousel/CarouselItem/CarouselItem.js";
|
|
60
|
+
import { CarouselNext as oe } from "./components/carousel/CarouselNext/CarouselNext.js";
|
|
61
|
+
import { CarouselPrevious as se } from "./components/carousel/CarouselPrevious/CarouselPrevious.js";
|
|
62
|
+
import { Checkbox as ce } from "./components/checkbox/Checkbox/Checkbox.js";
|
|
63
|
+
import { Collapsible as le } from "./components/collapsible/Collapsible/Collapsible.js";
|
|
64
|
+
import { CollapsibleTrigger as ue } from "./components/collapsible/CollapsibleTrigger/CollapsibleTrigger.js";
|
|
65
|
+
import { CollapsibleContent as de } from "./components/collapsible/CollapsibleContent/CollapsibleContent.js";
|
|
66
|
+
import { useDialogContext as fe } from "./components/dialog/Dialog/Dialog.context.js";
|
|
67
|
+
import { Dialog as pe } from "./components/dialog/Dialog/Dialog.js";
|
|
68
|
+
import { DialogClose as me } from "./components/dialog/DialogClose/DialogClose.js";
|
|
69
|
+
import { DialogPortal as he } from "./components/dialog/DialogPortal/DialogPortal.js";
|
|
70
|
+
import { DialogOverlay as ge } from "./components/dialog/DialogOverlay/DialogOverlay.js";
|
|
71
|
+
import { useDialogContentContext as _e } from "./components/dialog/DialogContent/DialogContent.context.js";
|
|
72
|
+
import { DialogContent as ve } from "./components/dialog/DialogContent/DialogContent.js";
|
|
73
|
+
import { DialogDescription as ye } from "./components/dialog/DialogDescription/DialogDescription.js";
|
|
74
|
+
import { DialogFooter as be } from "./components/dialog/DialogFooter/DialogFooter.js";
|
|
75
|
+
import { DialogHeader as xe } from "./components/dialog/DialogHeader/DialogHeader.js";
|
|
76
|
+
import { DialogTitle as Se } from "./components/dialog/DialogTitle/DialogTitle.js";
|
|
77
|
+
import { DialogTrigger as Ce } from "./components/dialog/DialogTrigger/DialogTrigger.js";
|
|
78
|
+
import { FieldSet as we } from "./components/field/FieldSet/FieldSet.js";
|
|
79
|
+
import { FieldLegend as Te } from "./components/field/FieldLegend/FieldLegend.js";
|
|
80
|
+
import { FieldGroup as Ee } from "./components/field/FieldGroup/FieldGroup.js";
|
|
81
|
+
import { Field as De } from "./components/field/Field/Field.js";
|
|
82
|
+
import { FieldContent as Oe } from "./components/field/FieldContent/FieldContent.js";
|
|
83
|
+
import { Label as ke } from "./components/label/Label.js";
|
|
84
|
+
import { FieldLabel as Ae } from "./components/field/FieldLabel/FieldLabel.js";
|
|
85
|
+
import { FieldTitle as je } from "./components/field/FieldTitle/FieldTitle.js";
|
|
86
|
+
import { FieldError as Me } from "./components/field/FieldError/FieldError.js";
|
|
87
|
+
import { FieldDescription as Ne } from "./components/field/FieldDescription/FieldDescription.js";
|
|
88
|
+
import { FieldSeparator as Pe } from "./components/field/FieldSeparator/FieldSeparator.js";
|
|
89
|
+
import { Image as Fe } from "./components/image/Image.js";
|
|
90
|
+
import { Input as Ie } from "./components/input/Input.js";
|
|
91
|
+
import { InputGroup as Le } from "./components/input-group/InputGroup/InputGroup.js";
|
|
92
|
+
import { InputGroupAddon as Re } from "./components/input-group/InputGroupAddon/InputGroupAddon.js";
|
|
93
|
+
import { InputGroupButton as ze } from "./components/input-group/InputGroupButton/InputGroupButton.js";
|
|
94
|
+
import { InputGroupText as Be } from "./components/input-group/InputGroupText/InputGroupText.js";
|
|
95
|
+
import { InputGroupInput as Ve } from "./components/input-group/InputGroupInput/InputGroupInput.js";
|
|
96
|
+
import { Textarea as He } from "./components/textarea/Textarea.js";
|
|
97
|
+
import { InputGroupTextarea as Ue } from "./components/input-group/InputGroupTextarea/InputGroupTextarea.js";
|
|
98
|
+
import { ItemGroup as We } from "./components/item/ItemGroup/ItemGroup.js";
|
|
99
|
+
import { ItemSeparator as Ge } from "./components/item/ItemSeparator/ItemSeparator.js";
|
|
100
|
+
import { Item as Ke } from "./components/item/Item/Item.js";
|
|
101
|
+
import { ItemMedia as qe } from "./components/item/ItemMedia/ItemMedia.js";
|
|
102
|
+
import { ItemContent as Je } from "./components/item/ItemContent/ItemContent.js";
|
|
103
|
+
import { ItemTitle as Ye } from "./components/item/ItemTitle/ItemTitle.js";
|
|
104
|
+
import { ItemDescription as Xe } from "./components/item/ItemDescription/ItemDescription.js";
|
|
105
|
+
import { ItemActions as Ze } from "./components/item/ItemActions/ItemActions.js";
|
|
106
|
+
import { ItemHeader as Qe } from "./components/item/ItemHeader/ItemHeader.js";
|
|
107
|
+
import { ItemFooter as $e } from "./components/item/ItemFooter/ItemFooter.js";
|
|
108
|
+
import { Kbd as et, KbdGroup as tt } from "./components/kbd/Kbd.js";
|
|
109
|
+
import { Pagination as nt } from "./components/pagination/Pagination/Pagination.js";
|
|
110
|
+
import { PaginationContent as rt } from "./components/pagination/PaginationContent/PaginationContent.js";
|
|
111
|
+
import { PaginationItem as it } from "./components/pagination/PaginationItem/PaginationItem.js";
|
|
112
|
+
import { PaginationLink as at } from "./components/pagination/PaginationLink/PaginationLink.js";
|
|
113
|
+
import { PaginationPrevious as ot } from "./components/pagination/PaginationPrevious/PaginationPrevious.js";
|
|
114
|
+
import { PaginationNext as st } from "./components/pagination/PaginationNext/PaginationNext.js";
|
|
115
|
+
import { PaginationEllipsis as ct } from "./components/pagination/PaginationEllipsis/PaginationEllipsis.js";
|
|
116
|
+
import { Progress as lt } from "./components/progress/Progress/Progress.js";
|
|
117
|
+
import { ProgressLabel as ut } from "./components/progress/ProgressLabel/ProgressLabel.js";
|
|
118
|
+
import { ProgressValue as dt } from "./components/progress/ProgressValue/ProgressValue.js";
|
|
119
|
+
import { ScrollBar as ft } from "./components/scroll-area/ScrollBar/ScrollBar.js";
|
|
120
|
+
import { ScrollArea as pt } from "./components/scroll-area/ScrollArea/ScrollArea.js";
|
|
121
|
+
import { Select as mt } from "./components/select/Select/Select.js";
|
|
122
|
+
import { SelectTrigger as ht } from "./components/select/SelectTrigger/SelectTrigger.js";
|
|
123
|
+
import { SelectValue as gt } from "./components/select/SelectValue/SelectValue.js";
|
|
124
|
+
import { SelectContent as _t } from "./components/select/SelectContent/SelectContent.js";
|
|
125
|
+
import { SelectItem as vt } from "./components/select/SelectItem/SelectItem.js";
|
|
126
|
+
import { SelectGroup as yt } from "./components/select/SelectGroup/SelectGroup.js";
|
|
127
|
+
import { SelectLabel as bt } from "./components/select/SelectLabel/SelectLabel.js";
|
|
128
|
+
import { SelectSeparator as xt } from "./components/select/SelectSeparator/SelectSeparator.js";
|
|
129
|
+
import { SidebarProvider as St } from "./components/sidebar/SidebarProvider/SidebarProvider.js";
|
|
130
|
+
import { Sidebar as Ct } from "./components/sidebar/Sidebar/Sidebar.js";
|
|
131
|
+
import { SidebarTrigger as wt } from "./components/sidebar/SidebarTrigger/SidebarTrigger.js";
|
|
132
|
+
import { SidebarRail as Tt } from "./components/sidebar/SidebarRail/SidebarRail.js";
|
|
133
|
+
import { SidebarInset as Et } from "./components/sidebar/SidebarInset/SidebarInset.js";
|
|
134
|
+
import { SidebarInput as Dt } from "./components/sidebar/SidebarInput/SidebarInput.js";
|
|
135
|
+
import { SidebarHeader as Ot } from "./components/sidebar/SidebarHeader/SidebarHeader.js";
|
|
136
|
+
import { SidebarFooter as kt } from "./components/sidebar/SidebarFooter/SidebarFooter.js";
|
|
137
|
+
import { SidebarSeparator as At } from "./components/sidebar/SidebarSeparator/SidebarSeparator.js";
|
|
138
|
+
import { SidebarContent as jt } from "./components/sidebar/SidebarContent/SidebarContent.js";
|
|
139
|
+
import { SidebarGroup as Mt } from "./components/sidebar/SidebarGroup/SidebarGroup.js";
|
|
140
|
+
import { SidebarGroupLabel as Nt } from "./components/sidebar/SidebarGroupLabel/SidebarGroupLabel.js";
|
|
141
|
+
import { SidebarGroupAction as Pt } from "./components/sidebar/SidebarGroupAction/SidebarGroupAction.js";
|
|
142
|
+
import { SidebarGroupContent as Ft } from "./components/sidebar/SidebarGroupContent/SidebarGroupContent.js";
|
|
143
|
+
import { SidebarMenu as It } from "./components/sidebar/SidebarMenu/SidebarMenu.js";
|
|
144
|
+
import { SidebarMenuItem as Lt } from "./components/sidebar/SidebarMenuItem/SidebarMenuItem.js";
|
|
145
|
+
import { Tooltip as Rt } from "./components/tooltip/Tooltip/Tooltip.js";
|
|
146
|
+
import { TooltipTrigger as zt } from "./components/tooltip/TooltipTrigger/TooltipTrigger.js";
|
|
147
|
+
import { TooltipContent as Bt } from "./components/tooltip/TooltipContent/TooltipContent.js";
|
|
148
|
+
import { TooltipArrow as Vt } from "./components/tooltip/TooltipArrow/TooltipArrow.js";
|
|
149
|
+
import { TooltipGroup as Ht } from "./components/tooltip/TooltipGroup/TooltipGroup.js";
|
|
150
|
+
import { SidebarMenuButton as Ut } from "./components/sidebar/SidebarMenuButton/SidebarMenuButton.js";
|
|
151
|
+
import { SidebarMenuBadge as Wt } from "./components/sidebar/SidebarMenuBadge/SidebarMenuBadge.js";
|
|
152
|
+
import { Skeleton as Gt } from "./components/skeleton/Skeleton.js";
|
|
153
|
+
import { SidebarMenuSkeleton as Kt } from "./components/sidebar/SidebarMenuSkeleton/SidebarMenuSkeleton.js";
|
|
154
|
+
import { SidebarMenuSub as qt } from "./components/sidebar/SidebarMenuSub/SidebarMenuSub.js";
|
|
155
|
+
import { SidebarMenuSubItem as Jt } from "./components/sidebar/SidebarMenuSubItem/SidebarMenuSubItem.js";
|
|
156
|
+
import { SidebarMenuSubButton as Yt } from "./components/sidebar/SidebarMenuSubButton/SidebarMenuSubButton.js";
|
|
157
|
+
import { useSliderContext as Xt } from "./components/slider/Slider/Slider.context.js";
|
|
158
|
+
import { Slider as Zt } from "./components/slider/Slider/Slider.js";
|
|
159
|
+
import { Spinner as Qt } from "./components/spinner/Spinner.js";
|
|
160
|
+
import { Switch as $t } from "./components/switch/Switch.js";
|
|
161
|
+
import { Tabs as en } from "./components/tabs/Tabs/Tabs.js";
|
|
162
|
+
import { TabsList as tn } from "./components/tabs/TabsList/TabsList.js";
|
|
163
|
+
import { TabsTrigger as nn } from "./components/tabs/TabsTrigger/TabsTrigger.js";
|
|
164
|
+
import { TabsContent as rn } from "./components/tabs/TabsContent/TabsContent.js";
|
|
165
|
+
import { toast as an } from "./components/toast/state.js";
|
|
166
|
+
import { useSonner as on } from "./components/toast/hooks.js";
|
|
167
|
+
import { Toast as sn } from "./components/toast/components/Toast.js";
|
|
168
|
+
import { Toaster as cn } from "./components/toast/components/Toaster.js";
|
|
169
|
+
import { useFontLoader as ln } from "./hooks/useFontLoader.js";
|
|
170
|
+
export { s as Accordion, c as AccordionContent, l as AccordionItem, a as AccordionProvider, u as AccordionTrigger, d as Alert, f as AlertAction, m as AlertDescription, g as AlertDialog, v as AlertDialogAction, y as AlertDialogCancel, C as AlertDialogContent, w as AlertDialogDescription, T as AlertDialogFooter, E as AlertDialogHeader, D as AlertDialogMedia, x as AlertDialogOverlay, b as AlertDialogPortal, O as AlertDialogTitle, k as AlertDialogTrigger, p as AlertTitle, A as AspectRatio, j as Avatar, P as AvatarBadge, N as AvatarFallback, F as AvatarGroup, I as AvatarGroupCount, M as AvatarImage, L as Badge, R as Breadcrumb, W as BreadcrumbEllipsis, B as BreadcrumbItem, V as BreadcrumbLink, z as BreadcrumbList, H as BreadcrumbPage, U as BreadcrumbSeparator, _ as Button, G as ButtonGroup, q as ButtonGroupSeparator, J as ButtonGroupText, Y as Card, X as CardAction, Z as CardContent, Q as CardDescription, $ as CardFooter, ee as CardHeader, te as CardTitle, ne as Carousel, re as CarouselContent, ie as CarouselDots, ae as CarouselItem, oe as CarouselNext, se as CarouselPrevious, ce as Checkbox, le as Collapsible, de as CollapsibleContent, ue as CollapsibleTrigger, pe as Dialog, me as DialogClose, ve as DialogContent, ye as DialogDescription, be as DialogFooter, xe as DialogHeader, ge as DialogOverlay, he as DialogPortal, Se as DialogTitle, Ce as DialogTrigger, De as Field, Oe as FieldContent, Ne as FieldDescription, Me as FieldError, Ee as FieldGroup, Ae as FieldLabel, Te as FieldLegend, Pe as FieldSeparator, we as FieldSet, je as FieldTitle, Fe as Image, Ie as Input, Le as InputGroup, Re as InputGroupAddon, ze as InputGroupButton, Ve as InputGroupInput, Be as InputGroupText, Ue as InputGroupTextarea, Ke as Item, Ze as ItemActions, Je as ItemContent, Xe as ItemDescription, $e as ItemFooter, We as ItemGroup, Qe as ItemHeader, qe as ItemMedia, Ge as ItemSeparator, Ye as ItemTitle, et as Kbd, tt as KbdGroup, ke as Label, t as Logger, nt as Pagination, rt as PaginationContent, ct as PaginationEllipsis, it as PaginationItem, at as PaginationLink, st as PaginationNext, ot as PaginationPrevious, lt as Progress, ut as ProgressLabel, dt as ProgressValue, pt as ScrollArea, ft as ScrollBar, mt as Select, _t as SelectContent, yt as SelectGroup, vt as SelectItem, bt as SelectLabel, xt as SelectSeparator, ht as SelectTrigger, gt as SelectValue, K as Separator, Ct as Sidebar, jt as SidebarContent, kt as SidebarFooter, Mt as SidebarGroup, Pt as SidebarGroupAction, Ft as SidebarGroupContent, Nt as SidebarGroupLabel, Ot as SidebarHeader, Dt as SidebarInput, Et as SidebarInset, It as SidebarMenu, Wt as SidebarMenuBadge, Ut as SidebarMenuButton, Lt as SidebarMenuItem, Kt as SidebarMenuSkeleton, qt as SidebarMenuSub, Yt as SidebarMenuSubButton, Jt as SidebarMenuSubItem, St as SidebarProvider, Tt as SidebarRail, At as SidebarSeparator, wt as SidebarTrigger, Gt as Skeleton, Zt as Slider, Qt as Spinner, $t as Switch, en as Tabs, rn as TabsContent, tn as TabsList, nn as TabsTrigger, He as Textarea, sn as Toast, cn as Toaster, Rt as Tooltip, Vt as TooltipArrow, Bt as TooltipContent, Ht as TooltipGroup, zt as TooltipTrigger, e as clsx, n as logger, r as mergeRefs, an as toast, o as useAccordionContext, S as useAlertDialogContentContext, h as useAlertDialogContext, _e as useDialogContentContext, fe as useDialogContext, ln as useFontLoader, Xt as useSliderContext, on as useSonner, i as warnOnce };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getViewportBoundary as e } from "../utils/dom.js";
|
|
2
|
+
//#region src/lib/positioner/middleware/size.ts
|
|
3
|
+
function t(t = {}) {
|
|
4
|
+
return {
|
|
5
|
+
name: "size",
|
|
6
|
+
fn(n) {
|
|
7
|
+
let { x: r, y: i, strategy: a } = n, { padding: o = 0 } = t, s = t.boundary ?? e(a, o), c = s.x + s.width - r, l = s.y + s.height - i;
|
|
8
|
+
return t.apply?.({
|
|
9
|
+
availableWidth: c,
|
|
10
|
+
availableHeight: l
|
|
11
|
+
}, n), { data: {
|
|
12
|
+
availableWidth: c,
|
|
13
|
+
availableHeight: l
|
|
14
|
+
} };
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { t as size };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.js","names":[],"sources":["../../../../src/lib/positioner/middleware/size.ts"],"sourcesContent":["import type { Boundary, Middleware, MiddlewareState } from \"../types\";\nimport { getViewportBoundary } from \"../utils/dom\";\n\nexport interface SizeAvailableSpace {\n availableWidth: number;\n availableHeight: number;\n}\n\nexport interface SizeOptions {\n padding?: number;\n boundary?: Boundary;\n /** 拿到可用空间后自行处理,比如设置 floating 的 maxHeight */\n apply?: (space: SizeAvailableSpace, state: MiddlewareState) => void;\n}\n\n/** 计算 floating 在当前边界内的可用宽高,交给 apply 回调去应用(如设置 max-height 实现滚动) */\nexport function size(options: SizeOptions = {}): Middleware {\n return {\n name: \"size\",\n fn(state) {\n const { x, y, strategy } = state;\n const { padding = 0 } = options;\n const boundary =\n options.boundary ?? getViewportBoundary(strategy, padding);\n\n const availableWidth = boundary.x + boundary.width - x;\n const availableHeight = boundary.y + boundary.height - y;\n\n options.apply?.({ availableWidth, availableHeight }, state);\n\n return { data: { availableWidth, availableHeight } };\n },\n };\n}\n"],"mappings":";;AAgBA,SAAgB,EAAK,IAAuB,CAAC,GAAe;CAC1D,OAAO;EACL,MAAM;EACN,GAAG,GAAO;GACR,IAAM,EAAE,MAAG,MAAG,gBAAa,GACrB,EAAE,aAAU,MAAM,GAClB,IACJ,EAAQ,YAAY,EAAoB,GAAU,CAAO,GAErD,IAAiB,EAAS,IAAI,EAAS,QAAQ,GAC/C,IAAkB,EAAS,IAAI,EAAS,SAAS;GAIvD,OAFA,EAAQ,QAAQ;IAAE;IAAgB;GAAgB,GAAG,CAAK,GAEnD,EAAE,MAAM;IAAE;IAAgB;GAAgB,EAAE;EACrD;CACF;AACF"}
|