orbital-ds 0.7.0 → 0.9.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 (109) hide show
  1. package/AGENTS.md +145 -80
  2. package/README.md +87 -73
  3. package/components.manifest.json +1326 -1267
  4. package/contract.json +226 -168
  5. package/dist/hooks/use-ds-messages.d.ts +36 -0
  6. package/dist/hooks/use-ds-messages.js +12 -0
  7. package/dist/hooks/use-ds-motion.d.ts +17 -0
  8. package/dist/hooks/use-ds-motion.js +50 -0
  9. package/dist/lib/i18n.d.ts +46 -0
  10. package/dist/lib/i18n.js +109 -0
  11. package/dist/lib/motion.d.ts +74 -0
  12. package/dist/lib/motion.js +97 -0
  13. package/dist/styles.css +876 -528
  14. package/dist/themes/friendly.css +362 -318
  15. package/dist/themes/friendly.meta.json +75 -14
  16. package/dist/themes/friendly.scoped.css +362 -318
  17. package/dist/themes/qratia.meta.json +42 -12
  18. package/dist/themes/tactile.css +575 -429
  19. package/dist/themes/tactile.fonts.css +3 -2
  20. package/dist/themes/tactile.guide.md +82 -49
  21. package/dist/themes/tactile.meta.json +175 -16
  22. package/dist/themes/tactile.scoped.css +575 -429
  23. package/dist/themes/twitter.css +354 -298
  24. package/dist/themes/twitter.meta.json +83 -61
  25. package/dist/themes/twitter.scoped.css +354 -298
  26. package/dist/themes/zyro.css +443 -389
  27. package/dist/themes/zyro.meta.json +67 -14
  28. package/dist/themes/zyro.scoped.css +443 -389
  29. package/dist/ui/accordion.js +5 -5
  30. package/dist/ui/alert-dialog.js +3 -3
  31. package/dist/ui/alert.d.ts +1 -1
  32. package/dist/ui/alert.js +9 -3
  33. package/dist/ui/attachment.d.ts +1 -1
  34. package/dist/ui/attachment.js +4 -4
  35. package/dist/ui/avatar.js +6 -6
  36. package/dist/ui/ayuda.js +3 -2
  37. package/dist/ui/badge.d.ts +1 -1
  38. package/dist/ui/badge.js +9 -3
  39. package/dist/ui/banner.d.ts +14 -0
  40. package/dist/ui/banner.js +88 -0
  41. package/dist/ui/breadcrumb.js +7 -3
  42. package/dist/ui/bubble.js +6 -6
  43. package/dist/ui/button-group.js +4 -4
  44. package/dist/ui/button.d.ts +1 -1
  45. package/dist/ui/button.js +5 -5
  46. package/dist/ui/calendar.js +33 -6
  47. package/dist/ui/card.js +4 -4
  48. package/dist/ui/carousel.js +15 -8
  49. package/dist/ui/chart.js +7 -3
  50. package/dist/ui/checkbox.js +1 -1
  51. package/dist/ui/combobox.js +7 -7
  52. package/dist/ui/command.js +13 -11
  53. package/dist/ui/context-menu.js +8 -8
  54. package/dist/ui/dialog.js +10 -6
  55. package/dist/ui/drawer.js +9 -9
  56. package/dist/ui/dropdown-menu.js +8 -8
  57. package/dist/ui/empty.js +3 -3
  58. package/dist/ui/field.js +2 -2
  59. package/dist/ui/hover-card.js +1 -1
  60. package/dist/ui/i18n-provider.d.ts +11 -0
  61. package/dist/ui/i18n-provider.js +18 -0
  62. package/dist/ui/icon-tile.d.ts +1 -1
  63. package/dist/ui/input-group.d.ts +1 -1
  64. package/dist/ui/input-group.js +11 -9
  65. package/dist/ui/input-otp.js +3 -3
  66. package/dist/ui/input.js +1 -1
  67. package/dist/ui/item.d.ts +1 -1
  68. package/dist/ui/item.js +3 -3
  69. package/dist/ui/kbd.js +1 -1
  70. package/dist/ui/label.js +1 -1
  71. package/dist/ui/marker.d.ts +1 -1
  72. package/dist/ui/marker.js +2 -2
  73. package/dist/ui/menubar.js +9 -9
  74. package/dist/ui/message-scroller.js +5 -2
  75. package/dist/ui/message.js +2 -2
  76. package/dist/ui/motion-provider.d.ts +11 -0
  77. package/dist/ui/motion-provider.js +16 -0
  78. package/dist/ui/native-select.js +4 -4
  79. package/dist/ui/navigation-menu.js +7 -6
  80. package/dist/ui/pagination.js +19 -11
  81. package/dist/ui/popover.js +2 -2
  82. package/dist/ui/progress.js +2 -2
  83. package/dist/ui/questionnaire.js +20 -15
  84. package/dist/ui/radio-group.js +2 -2
  85. package/dist/ui/resizable.js +2 -2
  86. package/dist/ui/scroll-area.js +3 -3
  87. package/dist/ui/select.js +6 -6
  88. package/dist/ui/separator.js +1 -1
  89. package/dist/ui/sheet.js +6 -4
  90. package/dist/ui/sidebar.js +42 -30
  91. package/dist/ui/skeleton.js +1 -1
  92. package/dist/ui/slider.js +6 -6
  93. package/dist/ui/sonner.js +25 -8
  94. package/dist/ui/spinner.js +4 -1
  95. package/dist/ui/switch.js +2 -2
  96. package/dist/ui/table.js +3 -3
  97. package/dist/ui/tabs.js +5 -5
  98. package/dist/ui/textarea.js +1 -1
  99. package/dist/ui/toast.js +15 -12
  100. package/dist/ui/toggle-group.js +2 -2
  101. package/dist/ui/toggle.js +6 -4
  102. package/dist/ui/tooltip.js +2 -2
  103. package/docs/CONTRACT.md +183 -153
  104. package/package.json +160 -142
  105. package/scripts/brand-core.mjs +153 -0
  106. package/scripts/doctor.mjs +128 -7
  107. package/scripts/i18n.mjs +111 -0
  108. package/scripts/init.mjs +294 -57
  109. package/scripts/setup.mjs +99 -0
package/dist/ui/card.js CHANGED
@@ -11,7 +11,7 @@ function Card({
11
11
  "data-slot": "card",
12
12
  "data-size": size,
13
13
  className: cn(
14
- "group/card flex flex-col gap-(--ds-card-spacing) overflow-hidden rounded-xl border bg-card py-(--ds-card-spacing) text-sm text-card-foreground shadow-card transition-shadow hover:shadow-card-hover has-[>img:first-child]:pt-0 data-[size=sm]:[--ds-card-spacing:var(--ds-card-spacing-sm)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
14
+ "group/card flex flex-col gap-(--ds-card-spacing) overflow-hidden rounded-card border bg-card py-(--ds-card-spacing) text-sm text-card-foreground shadow-card transition-shadow duration-(--ds-motion-snap) hover:shadow-card-hover has-[>img:first-child]:pt-0 data-[size=sm]:[--ds-card-spacing:var(--ds-card-spacing-sm)] *:[img:first-child]:rounded-t-card *:[img:last-child]:rounded-b-card",
15
15
  className
16
16
  ),
17
17
  ...props
@@ -24,7 +24,7 @@ function CardHeader({ className, ...props }) {
24
24
  {
25
25
  "data-slot": "card-header",
26
26
  className: cn(
27
- "group/card-header @container/card-header grid auto-rows-min items-start gap-2 rounded-t-xl px-(--ds-card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--ds-card-spacing)",
27
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-2 rounded-t-card px-(--ds-card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--ds-card-spacing)",
28
28
  className
29
29
  ),
30
30
  ...props
@@ -36,7 +36,7 @@ function CardTitle({ className, ...props }) {
36
36
  "div",
37
37
  {
38
38
  "data-slot": "card-title",
39
- className: cn("text-base font-semibold", className),
39
+ className: cn("text-base font-(--ds-title-weight)", className),
40
40
  ...props
41
41
  }
42
42
  );
@@ -80,7 +80,7 @@ function CardFooter({ className, ...props }) {
80
80
  {
81
81
  "data-slot": "card-footer",
82
82
  className: cn(
83
- "flex items-center rounded-b-xl px-(--ds-card-spacing) [.border-t]:pt-(--ds-card-spacing)",
83
+ "flex items-center rounded-b-card px-(--ds-card-spacing) [.border-t]:pt-(--ds-card-spacing)",
84
84
  className
85
85
  ),
86
86
  ...props
@@ -1,9 +1,11 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import { cn } from "../lib/utils";
4
5
  import useEmblaCarousel from "embla-carousel-react";
5
6
  import { Button } from "./button";
6
7
  import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
8
+ import { useDsMessages } from "../hooks/use-ds-messages";
7
9
  const CarouselContext = React.createContext(null);
8
10
  function useCarousel() {
9
11
  const context = React.useContext(CarouselContext);
@@ -21,6 +23,7 @@ function Carousel({
21
23
  children,
22
24
  ...props
23
25
  }) {
26
+ const t = useDsMessages();
24
27
  const [carouselRef, api] = useEmblaCarousel(
25
28
  {
26
29
  ...opts,
@@ -85,8 +88,9 @@ function Carousel({
85
88
  onKeyDownCapture: handleKeyDown,
86
89
  className: cn("relative", className),
87
90
  role: "region",
88
- "aria-roledescription": "carousel",
91
+ "aria-roledescription": t.carousel,
89
92
  "data-slot": "carousel",
93
+ "data-orientation": orientation,
90
94
  ...props,
91
95
  children
92
96
  }
@@ -107,7 +111,7 @@ function CarouselContent({ className, ...props }) {
107
111
  {
108
112
  className: cn(
109
113
  "flex",
110
- orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
114
+ orientation === "horizontal" ? "-ml-(--ds-carousel-gap)" : "-mt-(--ds-carousel-gap) flex-col",
111
115
  className
112
116
  ),
113
117
  ...props
@@ -118,15 +122,16 @@ function CarouselContent({ className, ...props }) {
118
122
  }
119
123
  function CarouselItem({ className, ...props }) {
120
124
  const { orientation } = useCarousel();
125
+ const t = useDsMessages();
121
126
  return /* @__PURE__ */ jsx(
122
127
  "div",
123
128
  {
124
129
  role: "group",
125
- "aria-roledescription": "slide",
130
+ "aria-roledescription": t.carouselSlide,
126
131
  "data-slot": "carousel-item",
127
132
  className: cn(
128
133
  "min-w-0 shrink-0 grow-0 basis-full",
129
- orientation === "horizontal" ? "pl-4" : "pt-4",
134
+ orientation === "horizontal" ? "pl-(--ds-carousel-gap)" : "pt-(--ds-carousel-gap)",
130
135
  className
131
136
  ),
132
137
  ...props
@@ -140,6 +145,7 @@ function CarouselPrevious({
140
145
  ...props
141
146
  }) {
142
147
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
148
+ const t = useDsMessages();
143
149
  return /* @__PURE__ */ jsxs(
144
150
  Button,
145
151
  {
@@ -147,7 +153,7 @@ function CarouselPrevious({
147
153
  variant,
148
154
  size,
149
155
  className: cn(
150
- "absolute touch-manipulation rounded-full",
156
+ "absolute touch-manipulation rounded-(--ds-radius-pill)",
151
157
  orientation === "horizontal" ? "inset-y-0 -left-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
152
158
  className
153
159
  ),
@@ -156,7 +162,7 @@ function CarouselPrevious({
156
162
  ...props,
157
163
  children: [
158
164
  /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
159
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
165
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.carouselPrevious })
160
166
  ]
161
167
  }
162
168
  );
@@ -168,6 +174,7 @@ function CarouselNext({
168
174
  ...props
169
175
  }) {
170
176
  const { orientation, scrollNext, canScrollNext } = useCarousel();
177
+ const t = useDsMessages();
171
178
  return /* @__PURE__ */ jsxs(
172
179
  Button,
173
180
  {
@@ -175,7 +182,7 @@ function CarouselNext({
175
182
  variant,
176
183
  size,
177
184
  className: cn(
178
- "absolute touch-manipulation rounded-full",
185
+ "absolute touch-manipulation rounded-(--ds-radius-pill)",
179
186
  orientation === "horizontal" ? "inset-y-0 -right-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
180
187
  className
181
188
  ),
@@ -184,7 +191,7 @@ function CarouselNext({
184
191
  ...props,
185
192
  children: [
186
193
  /* @__PURE__ */ jsx(ChevronRightIcon, {}),
187
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
194
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.carouselNext })
188
195
  ]
189
196
  }
190
197
  );
package/dist/ui/chart.js CHANGED
@@ -118,8 +118,9 @@ function ChartTooltipContent({
118
118
  return /* @__PURE__ */ jsxs(
119
119
  "div",
120
120
  {
121
+ "data-slot": "chart-tooltip",
121
122
  className: cn(
122
- "grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-overlay",
123
+ "grid min-w-32 items-start gap-1.5 rounded-popover bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-overlay ring-(length:--ds-layer-ring-w) ring-(--ds-layer-ring)",
123
124
  className
124
125
  ),
125
126
  children: [
@@ -131,6 +132,7 @@ function ChartTooltipContent({
131
132
  return /* @__PURE__ */ jsx(
132
133
  "div",
133
134
  {
135
+ "data-slot": "chart-tooltip-item",
134
136
  className: cn(
135
137
  "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
136
138
  indicator === "dot" && "items-center"
@@ -140,7 +142,7 @@ function ChartTooltipContent({
140
142
  "div",
141
143
  {
142
144
  className: cn(
143
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
145
+ "shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)",
144
146
  {
145
147
  "h-2.5 w-2.5": indicator === "dot",
146
148
  "w-1": indicator === "line",
@@ -194,6 +196,7 @@ function ChartLegendContent({
194
196
  return /* @__PURE__ */ jsx(
195
197
  "div",
196
198
  {
199
+ "data-slot": "chart-legend",
197
200
  className: cn(
198
201
  "flex items-center justify-center gap-4",
199
202
  verticalAlign === "top" ? "pb-3" : "pt-3",
@@ -205,6 +208,7 @@ function ChartLegendContent({
205
208
  return /* @__PURE__ */ jsxs(
206
209
  "div",
207
210
  {
211
+ "data-slot": "chart-legend-item",
208
212
  className: cn(
209
213
  "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
210
214
  ),
@@ -212,7 +216,7 @@ function ChartLegendContent({
212
216
  itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
213
217
  "div",
214
218
  {
215
- className: "h-2 w-2 shrink-0 rounded-[2px]",
219
+ className: "h-2 w-2 shrink-0 rounded-xs",
216
220
  style: {
217
221
  backgroundColor: item.color
218
222
  }
@@ -9,7 +9,7 @@ function Checkbox({ className, ...props }) {
9
9
  {
10
10
  "data-slot": "checkbox",
11
11
  className: cn(
12
- "peer relative flex size-4 shrink-0 items-center justify-center rounded-[6px] border border-input transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-(length:--ds-ring-width) aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
12
+ "peer relative flex size-(--ds-check-size) shrink-0 items-center justify-center rounded-check border border-input bg-(--ds-check-bg) transition-shadow duration-(--ds-motion-snap) outline-none group-has-disabled/field:opacity-(--ds-disabled-opacity) after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) disabled:cursor-not-allowed disabled:opacity-(--ds-disabled-opacity) aria-invalid:border-(--ds-invalid-border) aria-invalid:ring-(length:--ds-ring-width) aria-invalid:ring-(--ds-invalid-ring) aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
13
13
  className
14
14
  ),
15
15
  ...props,
@@ -100,7 +100,7 @@ function ComboboxContent({
100
100
  {
101
101
  "data-slot": "combobox-content",
102
102
  "data-chips": !!anchor,
103
- className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
103
+ className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-popover bg-popover text-popover-foreground shadow-popover ring-(length:--ds-layer-ring-w) ring-(--ds-layer-ring) duration-(--ds-motion-fast) data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-(--ds-control-h-md) *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-(--ds-field-bg) *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
104
104
  ...props
105
105
  }
106
106
  )
@@ -113,7 +113,7 @@ function ComboboxList({ className, ...props }) {
113
113
  {
114
114
  "data-slot": "combobox-list",
115
115
  className: cn(
116
- "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",
116
+ "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-(--ds-menu-p) data-empty:p-0",
117
117
  className
118
118
  ),
119
119
  ...props
@@ -130,7 +130,7 @@ function ComboboxItem({
130
130
  {
131
131
  "data-slot": "combobox-item",
132
132
  className: cn(
133
- "relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
133
+ "relative flex w-full cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py) pr-8 pl-(--ds-menu-item-px) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
134
134
  className
135
135
  ),
136
136
  ...props,
@@ -165,7 +165,7 @@ function ComboboxLabel({
165
165
  ComboboxPrimitive.GroupLabel,
166
166
  {
167
167
  "data-slot": "combobox-label",
168
- className: cn("px-3.5 py-2.5 text-xs text-muted-foreground", className),
168
+ className: cn("px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-xs text-muted-foreground", className),
169
169
  ...props
170
170
  }
171
171
  );
@@ -194,7 +194,7 @@ function ComboboxSeparator({
194
194
  ComboboxPrimitive.Separator,
195
195
  {
196
196
  "data-slot": "combobox-separator",
197
- className: cn("-mx-1 my-1 h-px bg-border/50", className),
197
+ className: cn("-mx-1 my-1 h-px bg-(--ds-separator)", className),
198
198
  ...props
199
199
  }
200
200
  );
@@ -208,7 +208,7 @@ function ComboboxChips({
208
208
  {
209
209
  "data-slot": "combobox-chips",
210
210
  className: cn(
211
- "flex min-h-9 flex-wrap items-center gap-1.5 rounded-control border border-input bg-input/30 bg-clip-padding px-2.5 py-1.5 text-sm transition-colors focus-within:border-ring focus-within:ring-(length:--ds-ring-width) focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-(length:--ds-ring-width) has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
211
+ "flex min-h-(--ds-control-h-md) flex-wrap items-center gap-1.5 rounded-control border border-input bg-(--ds-field-bg) bg-clip-padding px-(--ds-field-px) py-1.5 text-sm transition-colors duration-(--ds-motion-snap) focus-within:border-ring focus-within:ring-(length:--ds-ring-width) focus-within:ring-(--ds-ring-color) has-aria-invalid:border-(--ds-invalid-border) has-aria-invalid:ring-(length:--ds-ring-width) has-aria-invalid:ring-(--ds-invalid-ring) has-data-[slot=combobox-chip]:px-1.5",
212
212
  className
213
213
  ),
214
214
  ...props
@@ -226,7 +226,7 @@ function ComboboxChip({
226
226
  {
227
227
  "data-slot": "combobox-chip",
228
228
  className: cn(
229
- "flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-control bg-muted-foreground/10 px-2 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
229
+ "flex h-(--ds-chip-h) w-fit items-center justify-center gap-1 rounded-control bg-muted-foreground/10 px-2 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-(--ds-disabled-opacity) has-data-[slot=combobox-chip-remove]:pr-0",
230
230
  className
231
231
  ),
232
232
  ...props,
@@ -14,6 +14,7 @@ import {
14
14
  InputGroupAddon
15
15
  } from "./input-group";
16
16
  import { SearchIcon, CheckIcon } from "lucide-react";
17
+ import { useDsMessages } from "../hooks/use-ds-messages";
17
18
  function Command({
18
19
  className,
19
20
  ...props
@@ -23,7 +24,7 @@ function Command({
23
24
  {
24
25
  "data-slot": "command",
25
26
  className: cn(
26
- "flex size-full flex-col overflow-hidden rounded-control bg-popover p-1 text-popover-foreground",
27
+ "flex size-full flex-col overflow-hidden rounded-popover bg-popover p-(--ds-menu-p) text-popover-foreground",
27
28
  className
28
29
  ),
29
30
  ...props
@@ -31,23 +32,24 @@ function Command({
31
32
  );
32
33
  }
33
34
  function CommandDialog({
34
- title = "Command Palette",
35
- description = "Search for a command to run...",
35
+ title,
36
+ description,
36
37
  children,
37
38
  className,
38
39
  showCloseButton = false,
39
40
  ...props
40
41
  }) {
42
+ const t = useDsMessages();
41
43
  return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
42
44
  /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
43
- /* @__PURE__ */ jsx(DialogTitle, { children: title }),
44
- /* @__PURE__ */ jsx(DialogDescription, { children: description })
45
+ /* @__PURE__ */ jsx(DialogTitle, { children: title ?? t.commandTitle }),
46
+ /* @__PURE__ */ jsx(DialogDescription, { children: description ?? t.commandDescription })
45
47
  ] }),
46
48
  /* @__PURE__ */ jsx(
47
49
  DialogContent,
48
50
  {
49
51
  className: cn(
50
- "top-1/3 translate-y-0 overflow-hidden rounded-control! p-0",
52
+ "top-1/3 translate-y-0 overflow-hidden rounded-overlay p-0",
51
53
  className
52
54
  ),
53
55
  showCloseButton,
@@ -60,13 +62,13 @@ function CommandInput({
60
62
  className,
61
63
  ...props
62
64
  }) {
63
- return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs(InputGroup, { className: "h-9 bg-input/30", children: [
65
+ return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-(--ds-menu-p) pb-0", children: /* @__PURE__ */ jsxs(InputGroup, { className: "h-(--ds-control-h-md) bg-(--ds-field-bg)", children: [
64
66
  /* @__PURE__ */ jsx(
65
67
  CommandPrimitive.Input,
66
68
  {
67
69
  "data-slot": "command-input",
68
70
  className: cn(
69
- "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
71
+ "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-(--ds-disabled-opacity)",
70
72
  className
71
73
  ),
72
74
  ...props
@@ -113,7 +115,7 @@ function CommandGroup({
113
115
  {
114
116
  "data-slot": "command-group",
115
117
  className: cn(
116
- "overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
118
+ "overflow-hidden p-(--ds-menu-p) text-foreground **:[[cmdk-group-heading]]:px-(--ds-menu-item-px) **:[[cmdk-group-heading]]:py-(--ds-menu-item-py) **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
117
119
  className
118
120
  ),
119
121
  ...props
@@ -128,7 +130,7 @@ function CommandSeparator({
128
130
  CommandPrimitive.Separator,
129
131
  {
130
132
  "data-slot": "command-separator",
131
- className: cn("my-1 h-px bg-border/50", className),
133
+ className: cn("my-1 h-px bg-(--ds-separator)", className),
132
134
  ...props
133
135
  }
134
136
  );
@@ -143,7 +145,7 @@ function CommandItem({
143
145
  {
144
146
  "data-slot": "command-item",
145
147
  className: cn(
146
- "group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
148
+ "group/command-item relative flex cursor-default items-center gap-2 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-(--ds-disabled-opacity) data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
147
149
  className
148
150
  ),
149
151
  ...props,
@@ -42,7 +42,7 @@ function ContextMenuContent({
42
42
  ContextMenuPrimitive.Popup,
43
43
  {
44
44
  "data-slot": "context-menu-content",
45
- className: cn("z-(--ds-z-overlay) max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
45
+ className: cn("z-(--ds-z-overlay) max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-popover bg-popover p-(--ds-menu-p) text-popover-foreground shadow-popover ring-(length:--ds-layer-ring-w) ring-(--ds-layer-ring) duration-(--ds-motion-fast) outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
46
46
  ...props
47
47
  }
48
48
  )
@@ -63,7 +63,7 @@ function ContextMenuLabel({
63
63
  "data-slot": "context-menu-label",
64
64
  "data-inset": inset,
65
65
  className: cn(
66
- "px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
66
+ "px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-xs text-muted-foreground data-inset:pl-9.5",
67
67
  className
68
68
  ),
69
69
  ...props
@@ -83,7 +83,7 @@ function ContextMenuItem({
83
83
  "data-inset": inset,
84
84
  "data-variant": variant,
85
85
  className: cn(
86
- "group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
86
+ "group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
87
87
  className
88
88
  ),
89
89
  ...props
@@ -105,7 +105,7 @@ function ContextMenuSubTrigger({
105
105
  "data-slot": "context-menu-sub-trigger",
106
106
  "data-inset": inset,
107
107
  className: cn(
108
- "flex cursor-default items-center rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
108
+ "flex cursor-default items-center rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
109
109
  className
110
110
  ),
111
111
  ...props,
@@ -123,7 +123,7 @@ function ContextMenuSubContent({
123
123
  ContextMenuContent,
124
124
  {
125
125
  "data-slot": "context-menu-sub-content",
126
- className: "shadow-overlay",
126
+ className: "shadow-popover",
127
127
  side: "right",
128
128
  ...props
129
129
  }
@@ -142,7 +142,7 @@ function ContextMenuCheckboxItem({
142
142
  "data-slot": "context-menu-checkbox-item",
143
143
  "data-inset": inset,
144
144
  className: cn(
145
- "relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
145
+ "relative flex cursor-default items-center gap-2 rounded-item py-(--ds-menu-item-py) pr-8 pl-(--ds-menu-item-px) text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
146
146
  className
147
147
  ),
148
148
  checked,
@@ -180,7 +180,7 @@ function ContextMenuRadioItem({
180
180
  "data-slot": "context-menu-radio-item",
181
181
  "data-inset": inset,
182
182
  className: cn(
183
- "relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
183
+ "relative flex cursor-default items-center gap-2 rounded-item py-(--ds-menu-item-py) pr-8 pl-(--ds-menu-item-px) text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
184
184
  className
185
185
  ),
186
186
  ...props,
@@ -202,7 +202,7 @@ function ContextMenuSeparator({
202
202
  ContextMenuPrimitive.Separator,
203
203
  {
204
204
  "data-slot": "context-menu-separator",
205
- className: cn("-mx-1 my-1 h-px bg-border/50", className),
205
+ className: cn("-mx-1 my-1 h-px bg-(--ds-separator)", className),
206
206
  ...props
207
207
  }
208
208
  );
package/dist/ui/dialog.js CHANGED
@@ -1,8 +1,10 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
3
4
  import { cn } from "../lib/utils";
4
5
  import { Button } from "./button";
5
6
  import { XIcon } from "lucide-react";
7
+ import { useDsMessages } from "../hooks/use-ds-messages";
6
8
  function Dialog({ ...props }) {
7
9
  return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
8
10
  }
@@ -24,7 +26,7 @@ function DialogOverlay({
24
26
  {
25
27
  "data-slot": "dialog-overlay",
26
28
  className: cn(
27
- "fixed inset-0 isolate z-(--ds-z-overlay) bg-scrim duration-(--ds-motion-fast) supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
29
+ "fixed inset-0 isolate z-(--ds-z-overlay) bg-scrim duration-(--ds-motion-fast) supports-backdrop-filter:backdrop-blur-(--ds-scrim-blur) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
28
30
  className
29
31
  ),
30
32
  ...props
@@ -37,6 +39,7 @@ function DialogContent({
37
39
  showCloseButton = true,
38
40
  ...props
39
41
  }) {
42
+ const t = useDsMessages();
40
43
  return /* @__PURE__ */ jsxs(DialogPortal, { children: [
41
44
  /* @__PURE__ */ jsx(DialogOverlay, {}),
42
45
  /* @__PURE__ */ jsxs(
@@ -44,7 +47,7 @@ function DialogContent({
44
47
  {
45
48
  "data-slot": "dialog-content",
46
49
  className: cn(
47
- "fixed top-1/2 left-1/2 z-(--ds-z-overlay) grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-(--ds-overlay-gap) rounded-overlay bg-popover p-(--ds-overlay-p) text-sm text-popover-foreground ring-1 ring-foreground/5 duration-(--ds-motion-fast) outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
50
+ "fixed top-1/2 left-1/2 z-(--ds-z-overlay) grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-(--ds-overlay-gap) rounded-overlay bg-popover p-(--ds-overlay-p) text-sm text-popover-foreground shadow-dialog ring-(length:--ds-layer-ring-w) ring-(--ds-layer-ring) duration-(--ds-motion-fast) outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
48
51
  className
49
52
  ),
50
53
  ...props,
@@ -58,13 +61,13 @@ function DialogContent({
58
61
  Button,
59
62
  {
60
63
  variant: "ghost",
61
- className: "absolute top-4 right-4",
64
+ className: "absolute top-(--ds-overlay-close-inset) right-(--ds-overlay-close-inset)",
62
65
  size: "icon-sm"
63
66
  }
64
67
  ),
65
68
  children: [
66
69
  /* @__PURE__ */ jsx(XIcon, {}),
67
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
70
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.close })
68
71
  ]
69
72
  }
70
73
  )
@@ -89,6 +92,7 @@ function DialogFooter({
89
92
  children,
90
93
  ...props
91
94
  }) {
95
+ const t = useDsMessages();
92
96
  return /* @__PURE__ */ jsxs(
93
97
  "div",
94
98
  {
@@ -100,7 +104,7 @@ function DialogFooter({
100
104
  ...props,
101
105
  children: [
102
106
  children,
103
- showCloseButton && /* @__PURE__ */ jsx(DialogPrimitive.Close, { render: /* @__PURE__ */ jsx(Button, { variant: "outline" }), children: "Close" })
107
+ showCloseButton && /* @__PURE__ */ jsx(DialogPrimitive.Close, { render: /* @__PURE__ */ jsx(Button, { variant: "outline" }), children: t.close })
104
108
  ]
105
109
  }
106
110
  );
@@ -110,7 +114,7 @@ function DialogTitle({ className, ...props }) {
110
114
  DialogPrimitive.Title,
111
115
  {
112
116
  "data-slot": "dialog-title",
113
- className: cn("text-base leading-none font-medium", className),
117
+ className: cn("text-base leading-none font-(--ds-overlay-title-weight)", className),
114
118
  ...props
115
119
  }
116
120
  );
package/dist/ui/drawer.js CHANGED
@@ -52,7 +52,7 @@ function DrawerOverlay({
52
52
  {
53
53
  "data-slot": "drawer-overlay",
54
54
  className: cn(
55
- "fixed inset-0 z-(--ds-z-overlay) min-h-dvh bg-scrim opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-(--ds-motion-slow) ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute",
55
+ "fixed inset-0 z-(--ds-z-overlay) min-h-dvh bg-scrim opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-(--ds-motion-slow) ease-(--ds-ease-emphasized) select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*var(--ds-motion-swipe))] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-(--ds-scrim-blur) supports-[-webkit-touch-callout:none]:absolute",
56
56
  className
57
57
  ),
58
58
  ...props
@@ -69,7 +69,7 @@ function DrawerSwipeHandle({
69
69
  "data-slot": "drawer-swipe-handle",
70
70
  "aria-hidden": "true",
71
71
  className: cn(
72
- "relative z-(--ds-z-raised) flex shrink-0 cursor-grab transition-opacity duration-(--ds-motion-base) group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-[100px] group-data-[swipe-axis=x]/drawer-popup:after:w-1.5 group-data-[swipe-axis=y]/drawer-popup:after:h-1.5 group-data-[swipe-axis=y]/drawer-popup:after:w-[100px] active:cursor-grabbing",
72
+ "relative z-(--ds-z-raised) flex shrink-0 cursor-grab transition-opacity duration-(--ds-motion-base) group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-(--ds-radius-pill) after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-(--ds-drawer-handle) group-data-[swipe-axis=x]/drawer-popup:after:w-1.5 group-data-[swipe-axis=y]/drawer-popup:after:h-1.5 group-data-[swipe-axis=y]/drawer-popup:after:w-(--ds-drawer-handle) active:cursor-grabbing",
73
73
  className
74
74
  ),
75
75
  ...props
@@ -99,17 +99,17 @@ function DrawerContent({
99
99
  "data-snap-points": hasSnapPoints ? "" : void 0,
100
100
  className: cn(
101
101
  // Base.
102
- "group/drawer-popup pointer-events-auto fixed z-(--ds-z-overlay) m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col rounded-control border border-popover bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-(--ds-motion-slow) ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [--drawer-bleed-background:transparent] [--drawer-inset:--spacing(2)] [interpolate-size:allow-keywords] dark:border-border",
102
+ "group/drawer-popup pointer-events-auto fixed z-(--ds-z-overlay) m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col rounded-overlay border border-(--ds-drawer-edge) bg-popover shadow-dialog text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-(--ds-motion-slow) ease-(--ds-ease-standard) will-change-transform outline-none select-none [--drawer-bleed-background:transparent] [--drawer-inset:var(--ds-drawer-inset)] [interpolate-size:allow-keywords]",
103
103
  // Nested.
104
104
  "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
105
105
  // Bleed.
106
106
  "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
107
107
  // Sizing.
108
- "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
108
+ "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:var(--ds-drawer-w)]",
109
109
  // Stack.
110
110
  "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]",
111
111
  // Transitions.
112
- "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
112
+ "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*var(--ds-motion-swipe))] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*var(--ds-motion-swipe))] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*var(--ds-motion-swipe))]",
113
113
  // Axis: y.
114
114
  "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
115
115
  // Axis: x.
@@ -132,7 +132,7 @@ function DrawerContent({
132
132
  {
133
133
  "data-slot": "drawer-content",
134
134
  className: cn(
135
- "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-(--ds-motion-slow) ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"
135
+ "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-(--ds-motion-slow) ease-(--ds-ease-overshoot) select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"
136
136
  ),
137
137
  children
138
138
  }
@@ -150,7 +150,7 @@ function DrawerHeader({ className, ...props }) {
150
150
  {
151
151
  "data-slot": "drawer-header",
152
152
  className: cn(
153
- "flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-1.5 md:text-left",
153
+ "flex shrink-0 flex-col gap-0.5 p-(--ds-overlay-p) pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-1.5 md:text-left",
154
154
  className
155
155
  ),
156
156
  ...props
@@ -162,7 +162,7 @@ function DrawerFooter({ className, ...props }) {
162
162
  "div",
163
163
  {
164
164
  "data-slot": "drawer-footer",
165
- className: cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className),
165
+ className: cn("mt-auto flex shrink-0 flex-col gap-2 p-(--ds-overlay-p) pt-0", className),
166
166
  ...props
167
167
  }
168
168
  );
@@ -173,7 +173,7 @@ function DrawerTitle({ className, ...props }) {
173
173
  {
174
174
  "data-slot": "drawer-title",
175
175
  className: cn(
176
- "text-base font-medium text-foreground",
176
+ "text-base font-(--ds-overlay-title-weight) text-foreground",
177
177
  className
178
178
  ),
179
179
  ...props