@blenx-dev/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/LICENSE +21 -0
  3. package/package.json +49 -0
  4. package/src/DataTable/data-table-column-toggle.tsx +73 -0
  5. package/src/DataTable/data-table-empty.tsx +27 -0
  6. package/src/DataTable/data-table-error.tsx +25 -0
  7. package/src/DataTable/data-table-infinite-loader.tsx +73 -0
  8. package/src/DataTable/data-table-loading.tsx +67 -0
  9. package/src/DataTable/data-table-pagination.tsx +80 -0
  10. package/src/DataTable/data-table-toolbar.tsx +62 -0
  11. package/src/DataTable/data-table.css.ts +420 -0
  12. package/src/DataTable/data-table.tsx +507 -0
  13. package/src/DataTable/index.ts +24 -0
  14. package/src/DataTable/types.ts +169 -0
  15. package/src/DataTable/use-infinite-scroll.ts +67 -0
  16. package/src/components/Accordion/accordion.css.ts +84 -0
  17. package/src/components/Accordion/accordion.tsx +87 -0
  18. package/src/components/Accordion/index.ts +8 -0
  19. package/src/components/Alert/alert.css.ts +29 -0
  20. package/src/components/Alert/alert.tsx +40 -0
  21. package/src/components/Alert/index.ts +1 -0
  22. package/src/components/AlertDialog/alert-dialog.css.ts +62 -0
  23. package/src/components/AlertDialog/alert-dialog.tsx +199 -0
  24. package/src/components/AlertDialog/index.ts +1 -0
  25. package/src/components/AspectRatio/aspect-ratio.css.ts +7 -0
  26. package/src/components/AspectRatio/aspect-ratio.tsx +20 -0
  27. package/src/components/AspectRatio/index.ts +1 -0
  28. package/src/components/Autocomplete/autocomplete.css.ts +167 -0
  29. package/src/components/Autocomplete/autocomplete.tsx +226 -0
  30. package/src/components/Autocomplete/index.ts +1 -0
  31. package/src/components/Avatar/avatar.css.ts +65 -0
  32. package/src/components/Avatar/avatar.tsx +44 -0
  33. package/src/components/Avatar/index.ts +1 -0
  34. package/src/components/Badge/badge.css.ts +180 -0
  35. package/src/components/Badge/badge.tsx +47 -0
  36. package/src/components/Badge/index.ts +1 -0
  37. package/src/components/Box/box.css.ts +5 -0
  38. package/src/components/Box/box.tsx +21 -0
  39. package/src/components/Box/index.ts +1 -0
  40. package/src/components/Breadcrumbs/breadcrumbs.css.ts +72 -0
  41. package/src/components/Breadcrumbs/breadcrumbs.tsx +79 -0
  42. package/src/components/Breadcrumbs/index.ts +9 -0
  43. package/src/components/Button/button.css.ts +200 -0
  44. package/src/components/Button/button.tsx +55 -0
  45. package/src/components/Button/index.ts +1 -0
  46. package/src/components/Calendar/calendar.css.ts +187 -0
  47. package/src/components/Calendar/calendar.tsx +143 -0
  48. package/src/components/Calendar/index.ts +1 -0
  49. package/src/components/Card/card.tsx +32 -0
  50. package/src/components/Card/index.ts +1 -0
  51. package/src/components/Checkbox/checkbox.css.ts +76 -0
  52. package/src/components/Checkbox/checkbox.tsx +94 -0
  53. package/src/components/Checkbox/index.ts +1 -0
  54. package/src/components/CloseButton/close-button.css.ts +11 -0
  55. package/src/components/CloseButton/close-button.tsx +15 -0
  56. package/src/components/CloseButton/index.ts +2 -0
  57. package/src/components/ColorPicker/color-picker.tsx +123 -0
  58. package/src/components/ColorPicker/index.ts +1 -0
  59. package/src/components/ColorSwatch/color-swatch.tsx +21 -0
  60. package/src/components/ColorSwatch/index.ts +1 -0
  61. package/src/components/Combobox/combobox.css.ts +333 -0
  62. package/src/components/Combobox/combobox.tsx +350 -0
  63. package/src/components/Combobox/index.ts +1 -0
  64. package/src/components/Command/command.css.ts +130 -0
  65. package/src/components/Command/command.tsx +413 -0
  66. package/src/components/Command/index.ts +7 -0
  67. package/src/components/Container/container.css.ts +41 -0
  68. package/src/components/Container/container.tsx +25 -0
  69. package/src/components/Container/index.ts +1 -0
  70. package/src/components/CopyButton/copy-button.css.ts +11 -0
  71. package/src/components/CopyButton/copy-button.tsx +45 -0
  72. package/src/components/CopyButton/index.ts +2 -0
  73. package/src/components/DatePicker/date-picker.tsx +75 -0
  74. package/src/components/DatePicker/index.ts +1 -0
  75. package/src/components/Dialog/dialog.css.ts +57 -0
  76. package/src/components/Dialog/dialog.tsx +181 -0
  77. package/src/components/Dialog/index.ts +1 -0
  78. package/src/components/Drawer/drawer.css.ts +404 -0
  79. package/src/components/Drawer/drawer.tsx +573 -0
  80. package/src/components/Drawer/index.ts +1 -0
  81. package/src/components/Field/field.css.ts +35 -0
  82. package/src/components/Field/field.tsx +101 -0
  83. package/src/components/Field/index.ts +1 -0
  84. package/src/components/Grid/grid.css.ts +12 -0
  85. package/src/components/Grid/grid.tsx +32 -0
  86. package/src/components/Grid/index.ts +1 -0
  87. package/src/components/Icon/icon.css.ts +10 -0
  88. package/src/components/Icon/icon.tsx +15 -0
  89. package/src/components/Icon/index.ts +1 -0
  90. package/src/components/IconButton/icon-button.css.ts +6 -0
  91. package/src/components/IconButton/icon-button.tsx +11 -0
  92. package/src/components/IconButton/index.ts +2 -0
  93. package/src/components/Input/index.ts +1 -0
  94. package/src/components/Input/input.css.ts +72 -0
  95. package/src/components/Input/input.tsx +50 -0
  96. package/src/components/InputGroup/index.ts +1 -0
  97. package/src/components/InputGroup/input-group.css.ts +156 -0
  98. package/src/components/InputGroup/input-group.tsx +133 -0
  99. package/src/components/Menu/index.ts +1 -0
  100. package/src/components/Menu/menu.css.ts +121 -0
  101. package/src/components/Menu/menu.tsx +115 -0
  102. package/src/components/OTPField/index.ts +1 -0
  103. package/src/components/OTPField/otp-field.css.ts +54 -0
  104. package/src/components/OTPField/otp-field.tsx +46 -0
  105. package/src/components/Popover/index.ts +1 -0
  106. package/src/components/Popover/popover.css.ts +81 -0
  107. package/src/components/Popover/popover.tsx +113 -0
  108. package/src/components/Progress/index.ts +7 -0
  109. package/src/components/Progress/progress.css.ts +37 -0
  110. package/src/components/Progress/progress.tsx +62 -0
  111. package/src/components/Radio/index.ts +1 -0
  112. package/src/components/Radio/radio.css.ts +72 -0
  113. package/src/components/Radio/radio.tsx +49 -0
  114. package/src/components/ScrollArea/index.ts +1 -0
  115. package/src/components/ScrollArea/scroll-area.css.ts +79 -0
  116. package/src/components/ScrollArea/scroll-area.tsx +96 -0
  117. package/src/components/SegmentedControl/index.ts +1 -0
  118. package/src/components/SegmentedControl/segmented-control.tsx +42 -0
  119. package/src/components/Select/index.ts +1 -0
  120. package/src/components/Select/select.css.ts +182 -0
  121. package/src/components/Select/select.tsx +165 -0
  122. package/src/components/Separator/index.ts +1 -0
  123. package/src/components/Separator/separator.css.ts +59 -0
  124. package/src/components/Separator/separator.tsx +34 -0
  125. package/src/components/Sheet/index.ts +1 -0
  126. package/src/components/Sheet/sheet.css.ts +184 -0
  127. package/src/components/Sheet/sheet.tsx +215 -0
  128. package/src/components/Slider/index.ts +1 -0
  129. package/src/components/Slider/slider.css.ts +81 -0
  130. package/src/components/Slider/slider.tsx +100 -0
  131. package/src/components/Spinner/index.ts +1 -0
  132. package/src/components/Spinner/spinner.css.ts +17 -0
  133. package/src/components/Spinner/spinner.tsx +15 -0
  134. package/src/components/Splitter/index.ts +1 -0
  135. package/src/components/Splitter/splitter.css.ts +69 -0
  136. package/src/components/Splitter/splitter.tsx +521 -0
  137. package/src/components/Stack/index.ts +1 -0
  138. package/src/components/Stack/stack.css.ts +42 -0
  139. package/src/components/Stack/stack.tsx +32 -0
  140. package/src/components/Surface/index.ts +1 -0
  141. package/src/components/Surface/surface.css.ts +40 -0
  142. package/src/components/Surface/surface.tsx +19 -0
  143. package/src/components/Switch/index.ts +1 -0
  144. package/src/components/Switch/switch.css.ts +46 -0
  145. package/src/components/Switch/switch.tsx +25 -0
  146. package/src/components/Table/index.ts +2 -0
  147. package/src/components/Table/table.css.ts +71 -0
  148. package/src/components/Table/table.tsx +117 -0
  149. package/src/components/Tabs/index.ts +1 -0
  150. package/src/components/Tabs/tabs.css.ts +250 -0
  151. package/src/components/Tabs/tabs.tsx +119 -0
  152. package/src/components/Text/index.ts +2 -0
  153. package/src/components/Text/text.css.ts +118 -0
  154. package/src/components/Text/text.tsx +66 -0
  155. package/src/components/Textarea/index.ts +1 -0
  156. package/src/components/Textarea/textarea.css.ts +66 -0
  157. package/src/components/Textarea/textarea.tsx +48 -0
  158. package/src/components/Toggle/index.ts +1 -0
  159. package/src/components/Toggle/toggle.css.ts +91 -0
  160. package/src/components/Toggle/toggle.tsx +44 -0
  161. package/src/components/ToggleGroup/index.ts +1 -0
  162. package/src/components/ToggleGroup/toggle-group.css.ts +77 -0
  163. package/src/components/ToggleGroup/toggle-group.tsx +131 -0
  164. package/src/components/index.ts +54 -0
  165. package/src/index.ts +3 -0
  166. package/src/utils/drawer-styles.css.ts +85 -0
  167. package/src/utils/heights.ts +16 -0
  168. package/src/utils/sprinkles.css.ts +197 -0
  169. package/src/utils/sprinkles.tokens.ts +74 -0
  170. package/src/utils/types.ts +10 -0
  171. package/src/utils/ve-style.utils.ts +51 -0
  172. package/tsconfig.json +10 -0
@@ -0,0 +1,75 @@
1
+ "use client";
2
+
3
+ import { CalendarBlankIcon } from "@phosphor-icons/react";
4
+ import { useRef, useState } from "react";
5
+ import { Button } from "../Button/button";
6
+ import { Calendar } from "../Calendar/calendar";
7
+ import { Field, FieldError, FieldLabel } from "../Field/field";
8
+ import {
9
+ Popover,
10
+ PopoverCompound,
11
+ PopoverPopup,
12
+ PopoverPositioner,
13
+ PopoverTrigger,
14
+ } from "../Popover/popover";
15
+
16
+ type Props = {
17
+ value: Date | undefined;
18
+ onChange: (date: Date | undefined) => void;
19
+ format?: (date: Date | undefined) => string;
20
+ label?: string;
21
+ placeholder?: string;
22
+ error?: string;
23
+ disabled?: boolean;
24
+ };
25
+
26
+ export function DatePicker({
27
+ value,
28
+ onChange,
29
+ label,
30
+ format,
31
+ placeholder = "Pick a date",
32
+ error,
33
+ disabled,
34
+ }: Props) {
35
+ const [open, setOpen] = useState(false);
36
+ const triggerRef = useRef<HTMLButtonElement>(null);
37
+
38
+ const handleSelect = (date: Date | undefined) => {
39
+ onChange(date);
40
+ setOpen(false);
41
+ };
42
+
43
+ return (
44
+ <Field>
45
+ <Popover open={open} onOpenChange={setOpen}>
46
+ {label && (
47
+ <FieldLabel
48
+ onClick={() => {
49
+ triggerRef.current?.click();
50
+ triggerRef.current?.focus();
51
+ }}
52
+ >
53
+ {label}
54
+ </FieldLabel>
55
+ )}
56
+ <PopoverTrigger
57
+ ref={triggerRef}
58
+ disabled={disabled}
59
+ render={<Button type="button" variant="outline" fullWidth />}
60
+ >
61
+ <CalendarBlankIcon size={18} />
62
+ {value ? (format?.(value) ?? value.toString()) : placeholder}
63
+ </PopoverTrigger>
64
+ <PopoverCompound.Portal>
65
+ <PopoverPositioner sideOffset={6} side="bottom" align="start">
66
+ <PopoverPopup>
67
+ <Calendar mode="single" selected={value} onSelect={handleSelect} />
68
+ </PopoverPopup>
69
+ </PopoverPositioner>
70
+ </PopoverCompound.Portal>
71
+ </Popover>
72
+ {error && <FieldError>{error}</FieldError>}
73
+ </Field>
74
+ );
75
+ }
@@ -0,0 +1 @@
1
+ export * from "./date-picker";
@@ -0,0 +1,57 @@
1
+ import { style } from "@vanilla-extract/css";
2
+ import { semanticVars, tokenVars } from "@blenx-dev/theme/contract";
3
+
4
+ export const header = style({
5
+ display: "flex",
6
+ flexDirection: "column",
7
+ gap: tokenVars.spacing.sm,
8
+ padding: tokenVars.spacing.lg,
9
+ boxSizing: "border-box",
10
+ selectors: {
11
+ "[data-has-panel] &": {
12
+ paddingBottom: tokenVars.spacing.sm,
13
+ },
14
+ },
15
+ });
16
+
17
+ export const footer = style({
18
+ display: "flex",
19
+ flexDirection: "column-reverse",
20
+ gap: tokenVars.spacing.sm,
21
+ paddingLeft: tokenVars.spacing.lg,
22
+ paddingRight: tokenVars.spacing.lg,
23
+ boxSizing: "border-box",
24
+ paddingBottom: "env(safe-area-inset-bottom)",
25
+ });
26
+
27
+ export const footerDefault = style({
28
+ borderTopWidth: tokenVars.borderWidth.thin,
29
+ borderTopStyle: "solid",
30
+ borderTopColor: semanticVars.border.subtle,
31
+ backgroundColor: semanticVars.background.subtle,
32
+ paddingTop: tokenVars.spacing.md,
33
+ paddingBottom: tokenVars.spacing.md,
34
+ });
35
+
36
+ export const footerBare = style({
37
+ paddingTop: tokenVars.spacing.md,
38
+ paddingBottom: tokenVars.spacing.lg,
39
+ });
40
+
41
+ export const title = style({
42
+ fontSize: "20px",
43
+ lineHeight: 1,
44
+ fontWeight: 600,
45
+ color: semanticVars.text.primary,
46
+ });
47
+
48
+ export const description = style({
49
+ fontSize: "14px",
50
+ lineHeight: 1.4,
51
+ color: semanticVars.text.secondary,
52
+ });
53
+
54
+ export const panel = style({
55
+ boxSizing: "border-box",
56
+ padding: tokenVars.spacing.lg,
57
+ });
@@ -0,0 +1,181 @@
1
+ "use client";
2
+
3
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
4
+ import { useRender } from "@base-ui/react/use-render";
5
+ import clsx from "clsx";
6
+ import type React from "react";
7
+ import { ScrollArea } from "../ScrollArea/scroll-area";
8
+ import { header, footer, footerDefault, footerBare, title, description, panel } from "./dialog.css";
9
+ import { CloseButton } from "../CloseButton";
10
+ import type { _BaseDivProps } from "../../utils/types";
11
+ import {
12
+ backdrop,
13
+ popup,
14
+ viewport,
15
+ viewportShellBottomStickOnMobile,
16
+ popupBottomStickOnMobile,
17
+ } from "../../utils/drawer-styles.css";
18
+ import { Box } from "../Box";
19
+ const DialogCreateHandle: typeof DialogPrimitive.createHandle = DialogPrimitive.createHandle;
20
+
21
+ const Dialog: typeof DialogPrimitive.Root = DialogPrimitive.Root;
22
+
23
+ const DialogPortal: typeof DialogPrimitive.Portal = DialogPrimitive.Portal;
24
+
25
+ function DialogTrigger(props: DialogPrimitive.Trigger.Props): React.ReactElement {
26
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
27
+ }
28
+
29
+ export function DialogClose(props: DialogPrimitive.Close.Props): React.ReactElement {
30
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
31
+ }
32
+
33
+ export function DialogBackdrop(props: DialogPrimitive.Backdrop.Props): React.ReactElement {
34
+ return <DialogPrimitive.Backdrop className={backdrop} data-slot="dialog-backdrop" {...props} />;
35
+ }
36
+
37
+ type DialogViewportProps = DialogPrimitive.Viewport.Props & {
38
+ bottomStickOnMobile?: boolean;
39
+ };
40
+
41
+ export function DialogViewport({
42
+ bottomStickOnMobile,
43
+ className,
44
+ ...props
45
+ }: DialogViewportProps): React.ReactElement {
46
+ return (
47
+ <DialogPrimitive.Viewport
48
+ className={clsx(viewport, bottomStickOnMobile && viewportShellBottomStickOnMobile, className)}
49
+ data-slot="dialog-viewport"
50
+ {...props}
51
+ />
52
+ );
53
+ }
54
+
55
+ export function DialogPopup({
56
+ children,
57
+ showCloseButton = true,
58
+ bottomStickOnMobile = true,
59
+ closeProps,
60
+ portalProps,
61
+ className,
62
+ ...props
63
+ }: DialogPrimitive.Popup.Props & {
64
+ showCloseButton?: boolean;
65
+ bottomStickOnMobile?: boolean;
66
+ closeProps?: DialogPrimitive.Close.Props;
67
+ portalProps?: DialogPrimitive.Portal.Props;
68
+ }): React.ReactElement {
69
+ return (
70
+ <DialogPortal {...portalProps}>
71
+ <DialogBackdrop />
72
+ <DialogViewport bottomStickOnMobile={bottomStickOnMobile}>
73
+ <DialogPrimitive.Popup
74
+ className={clsx(popup, bottomStickOnMobile && popupBottomStickOnMobile, className)}
75
+ data-slot="dialog-popup"
76
+ {...props}
77
+ >
78
+ {children}
79
+ {showCloseButton && (
80
+ <Box position="absolute" top="xs" right="xs">
81
+ <DialogPrimitive.Close
82
+ aria-label="Close"
83
+ render={<CloseButton variant="ghost" />}
84
+ {...closeProps}
85
+ />
86
+ </Box>
87
+ )}
88
+ </DialogPrimitive.Popup>
89
+ </DialogViewport>
90
+ </DialogPortal>
91
+ );
92
+ }
93
+
94
+ type HeaderProps = _BaseDivProps;
95
+
96
+ export function DialogHeader({ className, render, ...props }: HeaderProps): React.ReactElement {
97
+ return useRender({
98
+ defaultTagName: "div",
99
+ props: {
100
+ className: clsx(header, className),
101
+ "data-slot": "dialog-header",
102
+ ...props,
103
+ } as never,
104
+ render,
105
+ });
106
+ }
107
+
108
+ type FooterProps = _BaseDivProps & {
109
+ variant?: "default" | "bare";
110
+ };
111
+
112
+ export function DialogFooter({
113
+ className,
114
+ variant = "default",
115
+ render,
116
+ ...props
117
+ }: FooterProps): React.ReactElement {
118
+ return useRender({
119
+ defaultTagName: "div",
120
+ props: {
121
+ className: clsx(
122
+ footer,
123
+ variant === "default" && footerDefault,
124
+ variant === "bare" && footerBare,
125
+ className,
126
+ ),
127
+ "data-slot": "dialog-footer",
128
+ ...props,
129
+ } as never,
130
+ render,
131
+ });
132
+ }
133
+
134
+ export function DialogTitle(props: DialogPrimitive.Title.Props): React.ReactElement {
135
+ return <DialogPrimitive.Title className={title} data-slot="dialog-title" {...props} />;
136
+ }
137
+
138
+ export function DialogDescription(props: DialogPrimitive.Description.Props): React.ReactElement {
139
+ return (
140
+ <DialogPrimitive.Description
141
+ className={description}
142
+ data-slot="dialog-description"
143
+ {...props}
144
+ />
145
+ );
146
+ }
147
+
148
+ function DialogPanel({
149
+ scrollFade = true,
150
+ render,
151
+ className,
152
+ ...props
153
+ }: _BaseDivProps & {
154
+ scrollFade?: boolean;
155
+ }): React.ReactElement {
156
+ return (
157
+ <ScrollArea scrollFade={scrollFade}>
158
+ {useRender({
159
+ defaultTagName: "div",
160
+ props: {
161
+ className: clsx(panel, className),
162
+ "data-slot": "dialog-panel",
163
+ ...props,
164
+ } as never,
165
+ render,
166
+ })}
167
+ </ScrollArea>
168
+ );
169
+ }
170
+
171
+ export type { DialogViewportProps };
172
+
173
+ export {
174
+ Dialog,
175
+ DialogBackdrop as DialogOverlay,
176
+ DialogCreateHandle,
177
+ DialogPanel,
178
+ DialogPopup as DialogContent,
179
+ DialogPortal,
180
+ DialogTrigger,
181
+ };
@@ -0,0 +1 @@
1
+ export * from "./dialog";
@@ -0,0 +1,404 @@
1
+ import { style } from "@vanilla-extract/css";
2
+ import { semanticVars, tokenVars } from "@blenx-dev/theme/contract";
3
+
4
+ export const swipeArea = style({
5
+ position: "fixed",
6
+ zIndex: 50,
7
+ touchAction: "none",
8
+ });
9
+
10
+ export const swipeAreaBottom = style({
11
+ left: 0,
12
+ right: 0,
13
+ bottom: 0,
14
+ height: "32px",
15
+ });
16
+
17
+ export const swipeAreaTop = style({
18
+ left: 0,
19
+ right: 0,
20
+ top: 0,
21
+ height: "32px",
22
+ });
23
+
24
+ export const swipeAreaLeft = style({
25
+ top: 0,
26
+ bottom: 0,
27
+ left: 0,
28
+ width: "32px",
29
+ });
30
+
31
+ export const swipeAreaRight = style({
32
+ top: 0,
33
+ bottom: 0,
34
+ right: 0,
35
+ width: "32px",
36
+ });
37
+
38
+ export const backdrop = style({
39
+ position: "fixed",
40
+ inset: 0,
41
+ backgroundColor: "rgba(0, 0, 0, 0.32)",
42
+ backdropFilter: "blur(4px)",
43
+ transitionProperty: "opacity",
44
+ transitionDuration: "450ms",
45
+ transitionTimingFunction: "cubic-bezier(0.32, 0.72, 0, 1)",
46
+ "@media": {
47
+ "(prefers-reduced-motion: reduce)": {
48
+ transitionProperty: "none",
49
+ transitionDuration: "0ms",
50
+ },
51
+ },
52
+ });
53
+
54
+ export const viewport = style({
55
+ position: "fixed",
56
+ inset: 0,
57
+ touchAction: "none",
58
+ boxSizing: "border-box",
59
+ });
60
+
61
+ export const viewportBottom = style({
62
+ display: "grid",
63
+ gridTemplateRows: "1fr auto",
64
+ paddingTop: "48px",
65
+ });
66
+
67
+ export const viewportTop = style({
68
+ display: "grid",
69
+ gridTemplateRows: "auto 1fr",
70
+ paddingBottom: "48px",
71
+ });
72
+
73
+ export const viewportLeft = style({
74
+ display: "flex",
75
+ justifyContent: "flex-start",
76
+ });
77
+
78
+ export const viewportRight = style({
79
+ display: "flex",
80
+ justifyContent: "flex-end",
81
+ });
82
+
83
+ export const viewportInset = style({
84
+ paddingLeft: tokenVars.spacing.md,
85
+ paddingRight: tokenVars.spacing.md,
86
+ });
87
+
88
+ export const popup = style({
89
+ position: "relative",
90
+ display: "flex",
91
+ flexDirection: "column",
92
+ maxHeight: "100%",
93
+ minHeight: 0,
94
+ minWidth: 0,
95
+ width: "100%",
96
+ boxSizing: "border-box",
97
+ backgroundColor: semanticVars.surface.default,
98
+ color: semanticVars.text.primary,
99
+ borderStyle: "solid",
100
+ borderColor: semanticVars.border.default,
101
+ outline: "none",
102
+ willChange: "transform",
103
+ transitionProperty: "transform, box-shadow, height, background-color, margin, padding",
104
+ transitionDuration: "450ms",
105
+ transitionTimingFunction: "cubic-bezier(0.32, 0.72, 0, 1)",
106
+ "@media": {
107
+ "(prefers-reduced-motion: reduce)": {
108
+ transitionProperty: "none",
109
+ transitionDuration: "0ms",
110
+ },
111
+ },
112
+ });
113
+
114
+ export const popupDefault = style({
115
+ boxShadow: tokenVars.shadow.lg,
116
+ });
117
+
118
+ export const popupStraight = style({
119
+ vars: {
120
+ "--stack-step": "0",
121
+ },
122
+ });
123
+
124
+ export const popupInset = style({
125
+ borderWidth: "none",
126
+ borderRadius: "none",
127
+ "@media": {
128
+ "(min-width: 640px)": {
129
+ borderWidth: tokenVars.borderWidth.thin,
130
+ borderRadius: tokenVars.borderRadius.xl,
131
+ },
132
+ },
133
+ });
134
+
135
+ export const popupBottom = style({
136
+ gridRowStart: 2,
137
+ borderTopWidth: tokenVars.borderWidth.thin,
138
+ borderTopLeftRadius: tokenVars.borderRadius.xl,
139
+ borderTopRightRadius: tokenVars.borderRadius.xl,
140
+ });
141
+
142
+ export const popupTop = style({
143
+ borderBottomWidth: tokenVars.borderWidth.thin,
144
+ borderBottomLeftRadius: tokenVars.borderRadius.xl,
145
+ borderBottomRightRadius: tokenVars.borderRadius.xl,
146
+ });
147
+
148
+ export const popupLeft = style({
149
+ width: "calc(100% - 48px)",
150
+ maxWidth: "28rem",
151
+ borderRightWidth: tokenVars.borderWidth.thin,
152
+ borderTopRightRadius: tokenVars.borderRadius.xl,
153
+ borderBottomRightRadius: tokenVars.borderRadius.xl,
154
+ });
155
+
156
+ export const popupRight = style({
157
+ width: "calc(100% - 48px)",
158
+ maxWidth: "28rem",
159
+ borderLeftWidth: tokenVars.borderWidth.thin,
160
+ borderTopLeftRadius: tokenVars.borderRadius.xl,
161
+ borderBottomLeftRadius: tokenVars.borderRadius.xl,
162
+ });
163
+
164
+ export const header = style({
165
+ display: "flex",
166
+ flexDirection: "column",
167
+ gap: tokenVars.spacing.sm,
168
+ paddingTop: tokenVars.spacing.lg,
169
+ paddingLeft: tokenVars.spacing.lg,
170
+ paddingRight: tokenVars.spacing.lg,
171
+ boxSizing: "border-box",
172
+ });
173
+
174
+ export const footer = style({
175
+ display: "flex",
176
+ flexDirection: "column-reverse",
177
+ gap: tokenVars.spacing.sm,
178
+ paddingLeft: tokenVars.spacing.lg,
179
+ paddingRight: tokenVars.spacing.lg,
180
+ boxSizing: "border-box",
181
+ "@media": {
182
+ "(min-width: 640px)": {
183
+ flexDirection: "row",
184
+ justifyContent: "flex-end",
185
+ },
186
+ },
187
+ });
188
+
189
+ export const footerDefault = style({
190
+ borderTopWidth: tokenVars.borderWidth.thin,
191
+ borderTopStyle: "solid",
192
+ borderTopColor: semanticVars.border.subtle,
193
+ backgroundColor: semanticVars.background.subtle,
194
+ paddingTop: tokenVars.spacing.md,
195
+ paddingBottom: tokenVars.spacing.md,
196
+ });
197
+
198
+ export const footerBare = style({
199
+ paddingTop: tokenVars.spacing.md,
200
+ paddingBottom: tokenVars.spacing.lg,
201
+ });
202
+
203
+ export const title = style({
204
+ fontSize: "20px",
205
+ lineHeight: 1,
206
+ fontWeight: tokenVars.fontWeight.semibold,
207
+ });
208
+
209
+ export const description = style({
210
+ fontSize: tokenVars.fontSize.sm,
211
+ lineHeight: 1.4,
212
+ color: semanticVars.text.secondary,
213
+ });
214
+
215
+ export const panel = style({
216
+ boxSizing: "border-box",
217
+ paddingTop: tokenVars.spacing.lg,
218
+ paddingLeft: tokenVars.spacing.lg,
219
+ paddingRight: tokenVars.spacing.lg,
220
+ paddingBottom: tokenVars.spacing.lg,
221
+ });
222
+
223
+ export const bar = style({
224
+ position: "absolute",
225
+ display: "flex",
226
+ alignItems: "center",
227
+ justifyContent: "center",
228
+ padding: tokenVars.spacing.sm,
229
+ touchAction: "none",
230
+ });
231
+
232
+ export const barHorizontal = style({
233
+ insetInline: 0,
234
+ height: "48px",
235
+ });
236
+
237
+ export const barVertical = style({
238
+ insetBlock: 0,
239
+ width: "48px",
240
+ });
241
+
242
+ export const barTop = style({
243
+ bottom: 0,
244
+ });
245
+
246
+ export const barBottom = style({
247
+ top: 0,
248
+ });
249
+
250
+ export const barLeft = style({
251
+ right: 0,
252
+ });
253
+
254
+ export const barRight = style({
255
+ left: 0,
256
+ });
257
+
258
+ export const menu = style({
259
+ display: "flex",
260
+ flexDirection: "column",
261
+ });
262
+
263
+ export const menuItem = style({
264
+ display: "flex",
265
+ alignItems: "center",
266
+ gap: tokenVars.spacing.sm,
267
+ minHeight: "36px",
268
+ paddingTop: tokenVars.spacing.xs,
269
+ paddingBottom: tokenVars.spacing.xs,
270
+ paddingLeft: tokenVars.spacing.sm,
271
+ paddingRight: tokenVars.spacing.sm,
272
+ borderRadius: tokenVars.borderRadius.sm,
273
+ border: "none",
274
+ backgroundColor: "transparent",
275
+ color: semanticVars.text.primary,
276
+ fontSize: tokenVars.fontSize.md,
277
+ textAlign: "left",
278
+ cursor: "default",
279
+ outline: "none",
280
+ });
281
+
282
+ export const menuItemDestructive = style({
283
+ color: semanticVars.status.danger.default,
284
+ });
285
+
286
+ export const separator = style({
287
+ height: "1px",
288
+ backgroundColor: semanticVars.border.subtle,
289
+ marginTop: tokenVars.spacing.xs,
290
+ marginBottom: tokenVars.spacing.xs,
291
+ });
292
+
293
+ export const menuGroup = style({
294
+ display: "flex",
295
+ flexDirection: "column",
296
+ });
297
+
298
+ export const menuGroupLabel = style({
299
+ paddingTop: tokenVars.spacing.xs,
300
+ paddingBottom: tokenVars.spacing.xs,
301
+ paddingLeft: tokenVars.spacing.sm,
302
+ paddingRight: tokenVars.spacing.sm,
303
+ fontSize: tokenVars.fontSize.xs,
304
+ fontWeight: tokenVars.fontWeight.medium,
305
+ color: semanticVars.text.secondary,
306
+ });
307
+
308
+ export const menuTrigger = style({
309
+ display: "flex",
310
+ alignItems: "center",
311
+ gap: tokenVars.spacing.sm,
312
+ minHeight: "36px",
313
+ paddingTop: tokenVars.spacing.xs,
314
+ paddingBottom: tokenVars.spacing.xs,
315
+ paddingLeft: tokenVars.spacing.sm,
316
+ paddingRight: tokenVars.spacing.sm,
317
+ borderRadius: tokenVars.borderRadius.sm,
318
+ backgroundColor: "transparent",
319
+ border: "none",
320
+ color: semanticVars.text.primary,
321
+ });
322
+
323
+ export const menuTriggerIcon = style({
324
+ marginLeft: "auto",
325
+ marginRight: "-2px",
326
+ opacity: 0.8,
327
+ });
328
+
329
+ export const menuCheckbox = style({
330
+ display: "grid",
331
+ alignItems: "center",
332
+ gap: tokenVars.spacing.sm,
333
+ minHeight: "36px",
334
+ paddingTop: tokenVars.spacing.xs,
335
+ paddingBottom: tokenVars.spacing.xs,
336
+ paddingLeft: tokenVars.spacing.sm,
337
+ paddingRight: tokenVars.spacing.sm,
338
+ borderRadius: tokenVars.borderRadius.sm,
339
+ backgroundColor: "transparent",
340
+ border: "none",
341
+ color: semanticVars.text.primary,
342
+ });
343
+
344
+ export const menuCheckboxDefault = style({
345
+ gridTemplateColumns: "1rem 1fr",
346
+ paddingRight: tokenVars.spacing.md,
347
+ });
348
+
349
+ export const menuCheckboxSwitch = style({
350
+ gridTemplateColumns: "1fr auto",
351
+ paddingRight: tokenVars.spacing.xs,
352
+ });
353
+
354
+ export const menuCheckboxSwitchLabel = style({
355
+ gridColumnStart: 1,
356
+ });
357
+
358
+ export const menuCheckboxSwitchIndicator = style({
359
+ gridColumnStart: 2,
360
+ display: "inline-flex",
361
+ alignItems: "center",
362
+ padding: "2px",
363
+ borderRadius: tokenVars.borderRadius.full,
364
+ backgroundColor: semanticVars.border.subtle,
365
+ });
366
+
367
+ export const menuCheckboxSwitchThumb = style({
368
+ width: "14px",
369
+ height: "14px",
370
+ borderRadius: tokenVars.borderRadius.full,
371
+ backgroundColor: semanticVars.background.default,
372
+ });
373
+
374
+ export const menuCheckboxIndicator = style({
375
+ gridColumnStart: 1,
376
+ });
377
+
378
+ export const menuCheckboxLabel = style({
379
+ gridColumnStart: 2,
380
+ });
381
+
382
+ export const menuRadio = style({
383
+ display: "grid",
384
+ alignItems: "center",
385
+ gap: tokenVars.spacing.sm,
386
+ minHeight: "36px",
387
+ paddingTop: tokenVars.spacing.xs,
388
+ paddingBottom: tokenVars.spacing.xs,
389
+ paddingLeft: tokenVars.spacing.sm,
390
+ paddingRight: tokenVars.spacing.md,
391
+ borderRadius: tokenVars.borderRadius.sm,
392
+ backgroundColor: "transparent",
393
+ border: "none",
394
+ color: semanticVars.text.primary,
395
+ gridTemplateColumns: "1rem 1fr",
396
+ });
397
+
398
+ export const menuRadioIndicator = style({
399
+ gridColumnStart: 1,
400
+ });
401
+
402
+ export const menuRadioLabel = style({
403
+ gridColumnStart: 2,
404
+ });