@agentero/design-system 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "A React component library built with Tailwind CSS v4 and Radix UI primitives",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -37,6 +37,10 @@
37
37
  "types": "./src/divider/index.d.ts",
38
38
  "import": "./src/divider/index.js"
39
39
  },
40
+ "./dropdown-menu": {
41
+ "types": "./src/dropdown-menu/index.d.ts",
42
+ "import": "./src/dropdown-menu/index.js"
43
+ },
40
44
  "./loading": {
41
45
  "types": "./src/loading/index.d.ts",
42
46
  "import": "./src/loading/index.js"
@@ -67,6 +71,7 @@
67
71
  },
68
72
  "dependencies": {
69
73
  "@radix-ui/react-avatar": "^1.1.11",
74
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
70
75
  "@radix-ui/react-separator": "^1.1.8",
71
76
  "@radix-ui/react-slot": "^1.2.4",
72
77
  "clsx": "^2.1.1",
@@ -0,0 +1,276 @@
1
+ import { ComponentProps } from 'react';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
+ /**
5
+ * Props for the DropdownMenu Root component.
6
+ *
7
+ * @property {boolean} [defaultOpen] - The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state.
8
+ * @property {boolean} [open] - The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange.
9
+ * @property {(open: boolean) => void} [onOpenChange] - Event handler called when the open state of the dropdown menu changes.
10
+ * @property {boolean} [modal=true] - The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
11
+ * @property {'ltr' | 'rtl'} [dir] - The reading direction of the dropdown menu when applicable. If omitted, inherits globally from DirectionProvider or assumes LTR (left-to-right) reading mode.
12
+ */
13
+ type RootProps = ComponentProps<typeof DropdownMenuPrimitive.Root>;
14
+ /**
15
+ * Props for the DropdownMenu Trigger component.
16
+ *
17
+ * @property {boolean} [asChild=false] - Change the default rendered element for the one passed as a child, merging their props and behavior.
18
+ * @property {string} [className] - Additional CSS classes to apply to the trigger.
19
+ *
20
+ * @dataAttribute {string} data-state - "open" | "closed"
21
+ * @dataAttribute {string} data-disabled - Present when disabled
22
+ */
23
+ type TriggerProps = ComponentProps<typeof DropdownMenuPrimitive.Trigger>;
24
+ /**
25
+ * Tailwind variant styles for the dropdown menu content.
26
+ * Includes animations for slide-in/out based on the side from which the menu appears.
27
+ */
28
+ declare const contentStyles: import('tailwind-variants').TVReturnType<{
29
+ hasTriggerWidth: {
30
+ true: string;
31
+ };
32
+ }, undefined, string[], {
33
+ hasTriggerWidth: {
34
+ true: string;
35
+ };
36
+ }, undefined, import('tailwind-variants').TVReturnType<{
37
+ hasTriggerWidth: {
38
+ true: string;
39
+ };
40
+ }, undefined, string[], unknown, unknown, undefined>>;
41
+ /**
42
+ * Props for the DropdownMenu Content component.
43
+ *
44
+ * @property {boolean} [loop=false] - When true, keyboard navigation will loop from last item to first, and vice versa.
45
+ * @property {'ltr' | 'rtl'} [dir] - The reading direction. If omitted, inherits from DirectionProvider or assumes LTR.
46
+ * @property {'top' | 'right' | 'bottom' | 'left'} [side='bottom'] - The preferred side of the trigger to render against when open.
47
+ * @property {number} [sideOffset=8] - The distance in pixels from the trigger.
48
+ * @property {'start' | 'center' | 'end'} [align='center'] - The preferred alignment against the trigger.
49
+ * @property {number} [alignOffset=0] - An offset in pixels from the "start" or "end" alignment options.
50
+ * @property {boolean} [avoidCollisions=true] - When true, overrides side and align to prevent collisions with boundary edges.
51
+ * @property {Element | null} [collisionBoundary] - The element used as the collision boundary.
52
+ * @property {number} [collisionPadding=0] - The distance in pixels from the boundary edges where collision detection should occur.
53
+ * @property {boolean} [hasTriggerWidth=false] - When true, sets the content width to match the trigger width using CSS variable.
54
+ * @property {string} [className] - Additional CSS classes to apply.
55
+ *
56
+ * @dataAttribute {string} data-state - "open" | "closed"
57
+ * @dataAttribute {string} data-side - "top" | "right" | "bottom" | "left"
58
+ * @dataAttribute {string} data-align - "start" | "end" | "center"
59
+ *
60
+ * @cssVariable --radix-dropdown-menu-content-transform-origin - The transform origin based on content side
61
+ * @cssVariable --radix-dropdown-menu-trigger-width - The width of the trigger element
62
+ * @cssVariable --radix-dropdown-menu-content-available-width - The available width before overflow
63
+ * @cssVariable --radix-dropdown-menu-content-available-height - The available height before overflow
64
+ */
65
+ type ContentProps = ComponentProps<typeof DropdownMenuPrimitive.Content> & VariantProps<typeof contentStyles>;
66
+ /**
67
+ * Props for the DropdownMenu Item component.
68
+ *
69
+ * @property {boolean} [disabled] - When true, prevents the user from interacting with the item.
70
+ * @property {(event: Event) => void} [onSelect] - Event handler called when the user selects an item (via mouse or keyboard).
71
+ * @property {string} [textValue] - Optional text used for typeahead purposes. By default, the typeahead behavior will use the .textContent of the item.
72
+ * @property {string} [className] - Additional CSS classes to apply.
73
+ *
74
+ * @dataAttribute {string} data-highlighted - Present when highlighted via keyboard navigation or hover
75
+ * @dataAttribute {string} data-disabled - Present when disabled
76
+ */
77
+ type ItemProps = ComponentProps<typeof DropdownMenuPrimitive.Item>;
78
+ /**
79
+ * Props for the DropdownMenu Separator component.
80
+ *
81
+ * @property {string} [className] - Additional CSS classes to apply.
82
+ */
83
+ type SeparatorProps = ComponentProps<typeof DropdownMenuPrimitive.Separator>;
84
+ /**
85
+ * Props for the DropdownMenu Label component.
86
+ *
87
+ * @property {string} [className] - Additional CSS classes to apply.
88
+ */
89
+ type LabelProps = ComponentProps<typeof DropdownMenuPrimitive.Label>;
90
+ /**
91
+ * Props for the DropdownMenu Sub component.
92
+ *
93
+ * @property {boolean} [defaultOpen] - The open state of the submenu when it is initially rendered. Use when you do not need to control its open state.
94
+ * @property {boolean} [open] - The controlled open state of the submenu. Must be used in conjunction with onOpenChange.
95
+ * @property {(open: boolean) => void} [onOpenChange] - Event handler called when the open state of the submenu changes.
96
+ */
97
+ type SubProps = ComponentProps<typeof DropdownMenuPrimitive.Sub>;
98
+ /**
99
+ * Props for the DropdownMenu SubTrigger component.
100
+ *
101
+ * @property {boolean} [disabled] - When true, prevents the user from interacting with the item.
102
+ * @property {string} [textValue] - Optional text used for typeahead purposes. By default, the typeahead behavior will use the .textContent of the item.
103
+ * @property {string} [className] - Additional CSS classes to apply.
104
+ *
105
+ * @dataAttribute {string} data-state - "open" | "closed"
106
+ * @dataAttribute {string} data-highlighted - Present when highlighted via keyboard navigation or hover
107
+ * @dataAttribute {string} data-disabled - Present when disabled
108
+ */
109
+ type SubTriggerProps = ComponentProps<typeof DropdownMenuPrimitive.SubTrigger>;
110
+ /**
111
+ * Props for the DropdownMenu SubContent component.
112
+ *
113
+ * @property {boolean} [loop=false] - When true, keyboard navigation will loop from last item to first, and vice versa.
114
+ * @property {number} [sideOffset=2] - The distance in pixels from the trigger.
115
+ * @property {number} [alignOffset=-5] - An offset in pixels from the "start" or "end" alignment options.
116
+ * @property {boolean} [avoidCollisions=true] - When true, overrides side and align to prevent collisions with boundary edges.
117
+ * @property {Element | null} [collisionBoundary] - The element used as the collision boundary.
118
+ * @property {number} [collisionPadding=0] - The distance in pixels from the boundary edges where collision detection should occur.
119
+ * @property {string} [className] - Additional CSS classes to apply.
120
+ *
121
+ * @dataAttribute {string} data-state - "open" | "closed"
122
+ * @dataAttribute {string} data-side - "top" | "right" | "bottom" | "left"
123
+ * @dataAttribute {string} data-align - "start" | "end" | "center"
124
+ *
125
+ * @cssVariable --radix-dropdown-menu-content-transform-origin - The transform origin based on content side
126
+ * @cssVariable --radix-dropdown-menu-content-available-width - The available width before overflow
127
+ * @cssVariable --radix-dropdown-menu-content-available-height - The available height before overflow
128
+ */
129
+ type SubContentProps = ComponentProps<typeof DropdownMenuPrimitive.SubContent>;
130
+ /**
131
+ * DropdownMenu is the compound component for attaching a menu of secondary
132
+ * actions to a button or icon trigger — edit/duplicate/delete rows, account
133
+ * menus, overflow affordances, and nested submenus. Built on Radix UI's
134
+ * DropdownMenu primitive, so keyboard navigation, focus trapping, typeahead,
135
+ * and viewport-collision detection come for free.
136
+ *
137
+ * Compose it from `Root` / `Trigger` / `Portal` / `Content` and fill the
138
+ * menu with `Item`, `Separator`, `Label`, and — for nested flows — `Sub` /
139
+ * `SubTrigger` / `SubContent`. Wrap content in `Portal` so the menu escapes
140
+ * ancestor `overflow:hidden` and z-index stacking contexts.
141
+ *
142
+ * Do **not** use DropdownMenu for primary navigation (use a real nav menu),
143
+ * for single-choice form input (use a `Select`), or for command palettes
144
+ * (use a dedicated command component). For radio/checkbox-style toggles,
145
+ * use Radix's `CheckboxItem` / `RadioItem` primitives directly — those
146
+ * parts are not exposed here yet.
147
+ *
148
+ * @summary Compound overlay menu for secondary actions, grouped items, and submenus
149
+ *
150
+ * @see {@link https://www.radix-ui.com/primitives/docs/components/dropdown-menu|Radix UI DropdownMenu}
151
+ *
152
+ * @example
153
+ * ```tsx
154
+ * import { DropdownMenu } from '@agentero/design-system/dropdown-menu';
155
+ *
156
+ * <DropdownMenu.Root>
157
+ * <DropdownMenu.Trigger>
158
+ * <IconMoreVert />
159
+ * </DropdownMenu.Trigger>
160
+ *
161
+ * <DropdownMenu.Portal>
162
+ * <DropdownMenu.Content side="bottom" align="end">
163
+ * <DropdownMenu.Label>Actions</DropdownMenu.Label>
164
+ *
165
+ * <DropdownMenu.Item onSelect={() => handleEdit()}>
166
+ * <IconEdit />
167
+ * Edit
168
+ * </DropdownMenu.Item>
169
+ *
170
+ * <DropdownMenu.Sub>
171
+ * <DropdownMenu.SubTrigger>Share</DropdownMenu.SubTrigger>
172
+ * <DropdownMenu.Portal>
173
+ * <DropdownMenu.SubContent>
174
+ * <DropdownMenu.Item>Email</DropdownMenu.Item>
175
+ * <DropdownMenu.Item>Slack</DropdownMenu.Item>
176
+ * </DropdownMenu.SubContent>
177
+ * </DropdownMenu.Portal>
178
+ * </DropdownMenu.Sub>
179
+ *
180
+ * <DropdownMenu.Separator />
181
+ *
182
+ * <DropdownMenu.Item
183
+ * onSelect={() => handleDelete()}
184
+ * disabled={!canDelete}
185
+ * >
186
+ * <IconDelete />
187
+ * Delete
188
+ * </DropdownMenu.Item>
189
+ * </DropdownMenu.Content>
190
+ * </DropdownMenu.Portal>
191
+ * </DropdownMenu.Root>
192
+ * ```
193
+ *
194
+ * @component
195
+ * @namespace DropdownMenu
196
+ */
197
+ export declare const DropdownMenu: {
198
+ /**
199
+ * The root container component for the dropdown menu.
200
+ * @see {@link Root}
201
+ */
202
+ Root: {
203
+ (props: RootProps): import("react/jsx-runtime").JSX.Element;
204
+ displayName: string;
205
+ };
206
+ /**
207
+ * The button that toggles the dropdown menu.
208
+ * @see {@link Trigger}
209
+ */
210
+ Trigger: {
211
+ ({ className, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
212
+ displayName: string;
213
+ };
214
+ /**
215
+ * Portals the content to the body element.
216
+ * @see {@link Portal}
217
+ */
218
+ Portal: import('react').FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
219
+ /**
220
+ * The popup component containing menu items.
221
+ * @see {@link Content}
222
+ */
223
+ Content: {
224
+ ({ className, hasTriggerWidth, sideOffset, ...props }: ContentProps): import("react/jsx-runtime").JSX.Element;
225
+ displayName: string;
226
+ };
227
+ /**
228
+ * An individual menu item.
229
+ * @see {@link Item}
230
+ */
231
+ Item: {
232
+ ({ className, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
233
+ displayName: string;
234
+ };
235
+ /**
236
+ * A visual divider between menu items.
237
+ * @see {@link Separator}
238
+ */
239
+ Separator: {
240
+ ({ className, ...props }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
241
+ displayName: string;
242
+ };
243
+ /**
244
+ * A non-interactive label for menu sections.
245
+ * @see {@link Label}
246
+ */
247
+ Label: {
248
+ ({ className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
249
+ displayName: string;
250
+ };
251
+ /**
252
+ * Container for submenu parts.
253
+ * @see {@link Sub}
254
+ */
255
+ Sub: {
256
+ (props: SubProps): import("react/jsx-runtime").JSX.Element;
257
+ displayName: string;
258
+ };
259
+ /**
260
+ * An item that opens a submenu.
261
+ * @see {@link SubTrigger}
262
+ */
263
+ SubTrigger: {
264
+ ({ className, children, ...props }: SubTriggerProps): import("react/jsx-runtime").JSX.Element;
265
+ displayName: string;
266
+ };
267
+ /**
268
+ * The popup component for submenu items.
269
+ * @see {@link SubContent}
270
+ */
271
+ SubContent: {
272
+ ({ className, sideOffset, alignOffset, ...props }: SubContentProps): import("react/jsx-runtime").JSX.Element;
273
+ displayName: string;
274
+ };
275
+ };
276
+ export {};
@@ -0,0 +1,111 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { IconArrowRight as t } from "./icons.js";
4
+ import { tv as n } from "tailwind-variants";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ import * as a from "@radix-ui/react-dropdown-menu";
7
+ //#region src/dropdown-menu/dropdown-menu.tsx
8
+ var o = (e) => /* @__PURE__ */ r(a.Root, {
9
+ "data-slot": "dropdown-menu-root",
10
+ ...e
11
+ });
12
+ o.displayName = "DropdownMenu.Root";
13
+ var s = ({ className: t, ...n }) => /* @__PURE__ */ r(a.Trigger, {
14
+ "data-slot": "dropdown-menu-trigger",
15
+ className: e("cursor-pointer outline-none focus:outline-none", t),
16
+ ...n
17
+ });
18
+ s.displayName = "DropdownMenu.Trigger";
19
+ var c = a.Portal, l = n({
20
+ base: [
21
+ "z-[1000] flex flex-col rounded-lg bg-bg-default-base-primary p-1 shadow-xl",
22
+ "border border-border-default-base-primary",
23
+ "will-change-[transform,opacity]",
24
+ "data-[state=open]:animate-[dropdownSlideIn_200ms_ease-out]",
25
+ "data-[state=closed]:animate-[dropdownSlideOut_150ms_ease-in]",
26
+ "data-[side=bottom]:origin-top",
27
+ "data-[side=left]:origin-right",
28
+ "data-[side=right]:origin-left",
29
+ "data-[side=top]:origin-bottom",
30
+ "data-[side=bottom]:animate-[dropdownSlideInFromTop_200ms_ease-out]",
31
+ "data-[side=left]:animate-[dropdownSlideInFromRight_200ms_ease-out]",
32
+ "data-[side=right]:animate-[dropdownSlideInFromLeft_200ms_ease-out]",
33
+ "data-[side=top]:animate-[dropdownSlideInFromBottom_200ms_ease-out]"
34
+ ],
35
+ variants: { hasTriggerWidth: { true: "w-[var(--radix-dropdown-menu-trigger-width)]" } }
36
+ }), u = ({ className: e, hasTriggerWidth: t = !1, sideOffset: n = 8, ...i }) => /* @__PURE__ */ r(a.Content, {
37
+ "data-slot": "dropdown-menu-content",
38
+ sideOffset: n,
39
+ className: l({
40
+ hasTriggerWidth: t,
41
+ className: e
42
+ }),
43
+ ...i
44
+ });
45
+ u.displayName = "DropdownMenu.Content";
46
+ var d = ({ className: t, ...n }) => /* @__PURE__ */ r(a.Item, {
47
+ "data-slot": "dropdown-menu-item",
48
+ className: e("flex items-center gap-2 bg-bg-default-base-primary px-3 py-1.75 text-sm text-text-default-base-primary", "cursor-pointer rounded-md no-underline transition-colors outline-none", "min-w-40", "data-highlighted:bg-bg-default-base-primary-hover", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed", "data-disabled:text-text-default-disable-primary", "data-disabled:active:bg-bg-default-base-primary", "[&>svg]:h-6", "[&_path]:fill-icon-default-base-tertiary", t),
49
+ ...n
50
+ });
51
+ d.displayName = "DropdownMenu.Item";
52
+ var f = ({ className: t, ...n }) => /* @__PURE__ */ r(a.Separator, {
53
+ "data-slot": "dropdown-menu-divider",
54
+ className: e("-mx-1 my-1 w-[calc(100%+0.5rem)] border-t border-border-menu-divider", t),
55
+ ...n
56
+ });
57
+ f.displayName = "DropdownMenu.Separator";
58
+ var p = ({ className: t, ...n }) => /* @__PURE__ */ r(a.Label, {
59
+ "data-slot": "dropdown-menu-label",
60
+ className: e("px-3 py-1 text-xs text-text-default-base-tertiary", t),
61
+ ...n
62
+ });
63
+ p.displayName = "DropdownMenu.Label";
64
+ var m = (e) => /* @__PURE__ */ r(a.Sub, {
65
+ "data-slot": "dropdown-menu-sub",
66
+ ...e
67
+ });
68
+ m.displayName = "DropdownMenu.Sub";
69
+ var h = ({ className: n, children: o, ...s }) => /* @__PURE__ */ i(a.SubTrigger, {
70
+ "data-slot": "dropdown-menu-sub-trigger",
71
+ className: e("flex items-center gap-2 bg-bg-default-base-primary px-3 py-1.75 text-sm text-text-default-base-primary", "cursor-pointer rounded-md no-underline transition-colors outline-none", "min-w-40", "data-highlighted:bg-bg-default-base-primary-hover", "data-[state=open]:bg-bg-default-base-primary-hover", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed", "data-disabled:text-text-default-disable-primary", "[&>svg]:h-6", "[&_path]:fill-icon-default-base-tertiary", n),
72
+ ...s,
73
+ children: [o, /* @__PURE__ */ r(t, { className: "ml-auto h-4 w-4 [&>path]:fill-icon-default-base-tertiary" })]
74
+ });
75
+ h.displayName = "DropdownMenu.SubTrigger";
76
+ var g = n({ base: [
77
+ "z-[1000] flex flex-col rounded-lg bg-bg-default-base-primary p-1 shadow-xl",
78
+ "border border-border-default-base-primary",
79
+ "will-change-[transform,opacity]",
80
+ "data-[state=open]:animate-[dropdownSlideIn_200ms_ease-out]",
81
+ "data-[state=closed]:animate-[dropdownSlideOut_150ms_ease-in]",
82
+ "data-[side=bottom]:origin-top",
83
+ "data-[side=left]:origin-right",
84
+ "data-[side=right]:origin-left",
85
+ "data-[side=top]:origin-bottom",
86
+ "data-[side=bottom]:animate-[dropdownSlideInFromTop_200ms_ease-out]",
87
+ "data-[side=left]:animate-[dropdownSlideInFromRight_200ms_ease-out]",
88
+ "data-[side=right]:animate-[dropdownSlideInFromLeft_200ms_ease-out]",
89
+ "data-[side=top]:animate-[dropdownSlideInFromBottom_200ms_ease-out]"
90
+ ] }), _ = ({ className: e, sideOffset: t = 2, alignOffset: n = -5, ...i }) => /* @__PURE__ */ r(a.SubContent, {
91
+ "data-slot": "dropdown-menu-sub-content",
92
+ sideOffset: t,
93
+ alignOffset: n,
94
+ className: g({ className: e }),
95
+ ...i
96
+ });
97
+ _.displayName = "DropdownMenu.SubContent";
98
+ var v = {
99
+ Root: o,
100
+ Trigger: s,
101
+ Portal: c,
102
+ Content: u,
103
+ Item: d,
104
+ Separator: f,
105
+ Label: p,
106
+ Sub: m,
107
+ SubTrigger: h,
108
+ SubContent: _
109
+ };
110
+ //#endregion
111
+ export { v as DropdownMenu };
@@ -0,0 +1,9 @@
1
+ import { SVGProps } from 'react';
2
+ /**
3
+ * Right-arrow indicator rendered inside `DropdownMenu.SubTrigger` to signal
4
+ * that a submenu will open. Fill color is supplied by the surrounding class
5
+ * (`[&>path]:fill-...`) so the icon inherits the trigger's color token.
6
+ *
7
+ * @summary 24px arrow-right icon used as the submenu affordance
8
+ */
9
+ export declare const IconArrowRight: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/dropdown-menu/icons.tsx
3
+ var t = (t) => /* @__PURE__ */ e("svg", {
4
+ width: "24",
5
+ height: "24",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ ...t,
10
+ children: /* @__PURE__ */ e("path", { d: "M10.25 9.92397C10.25 9.51885 10.4349 9.23841 10.8048 9.08264C11.1747 8.92688 11.5019 8.9913 11.7865 9.27592L14.0211 11.5105C14.1147 11.6041 14.1833 11.7028 14.2269 11.8066C14.2705 11.9105 14.2922 12.0227 14.2922 12.1432C14.2922 12.2637 14.2705 12.3759 14.2269 12.4797C14.1833 12.5836 14.1147 12.6823 14.0211 12.7759L11.7865 15.0105C11.5019 15.2951 11.1747 15.3595 10.8048 15.2037C10.4349 15.048 10.25 14.7675 10.25 14.3624L10.25 9.92397Z" })
11
+ });
12
+ //#endregion
13
+ export { t as IconArrowRight };
@@ -0,0 +1 @@
1
+ export { DropdownMenu } from './dropdown-menu';
@@ -0,0 +1,2 @@
1
+ import { DropdownMenu as e } from "./dropdown-menu.js";
2
+ export { e as DropdownMenu };
package/theme/base.css CHANGED
@@ -385,6 +385,8 @@
385
385
 
386
386
  --color-border-default-disable-primary: var(--color-slate-100);
387
387
 
388
+ --color-border-menu-divider: #ebebef;
389
+
388
390
  /* Text Tokens */
389
391
  --color-text-input-normal: var(--color-slate-800);
390
392
  --color-text-input-disable: var(--color-slate-300);
@@ -659,21 +661,21 @@
659
661
  --color-icon-alert-ghost-dynamic: var(--color-orange-700);
660
662
  --color-icon-alert-ghost-playful: var(--color-pink-600);
661
663
 
662
- /* ========================================
664
+ /* ========================================
663
665
  * TOAST
664
666
  * ======================================== */
665
667
 
666
- /* Rail — colored left strip painted on expanded-layout toasts */
667
- --color-rail-neutral: var(--color-neutrals-200);
668
- --color-rail-success: var(--color-positive-500);
669
- --color-rail-danger: var(--color-danger-500);
670
- --color-rail-warning: var(--color-warning-500);
671
- --color-rail-info: var(--color-blue-600);
672
-
673
- /* Focus Ring */
674
- --color-focus-ring-button-primary: var(--color-slate-800);
675
- --color-focus-ring-button-destructive: var(--color-danger-500);
676
-
668
+ /* Rail — colored left strip painted on expanded-layout toasts */
669
+ --color-rail-neutral: var(--color-neutrals-200);
670
+ --color-rail-success: var(--color-positive-500);
671
+ --color-rail-danger: var(--color-danger-500);
672
+ --color-rail-warning: var(--color-warning-500);
673
+ --color-rail-info: var(--color-blue-600);
674
+
675
+ /* Focus Ring */
676
+ --color-focus-ring-button-primary: var(--color-slate-800);
677
+ --color-focus-ring-button-destructive: var(--color-danger-500);
678
+
677
679
  /* ========================================
678
680
  * STATUS BALL
679
681
  * ======================================== */
@@ -758,12 +760,29 @@
758
760
  --animate-cmd-content-in: cmd-content-in 200ms cubic-bezier(0.23, 1, 0.32, 1);
759
761
  --animate-cmd-content-out: cmd-content-out 150ms ease-in forwards;
760
762
  --animate-fade-in: fadeIn 0.3s forwards;
763
+ --animate-dropdown-slide-in: dropdownSlideIn 200ms ease-out;
764
+ --animate-dropdown-slide-out: dropdownSlideOut 150ms ease-in;
765
+ --animate-dropdown-slide-in-from-top: dropdownSlideInFromTop 200ms ease-out;
766
+ --animate-dropdown-slide-in-from-bottom: dropdownSlideInFromBottom 200ms ease-out;
767
+ --animate-dropdown-slide-in-from-left: dropdownSlideInFromLeft 200ms ease-out;
768
+ --animate-dropdown-slide-in-from-right: dropdownSlideInFromRight 200ms ease-out;
761
769
 
762
770
  /* ========================================
763
771
  * Z-INDEX
764
772
  * ======================================== */
765
773
 
766
- --z-index-modal: 1005;
774
+ --z-index-hide: -1;
775
+ --z-index-base: 0;
776
+ --z-index-docked: 10;
777
+ --z-index-floating: 1000;
778
+ --z-index-sticky: 1100;
779
+ --z-index-banner: 1200;
780
+ --z-index-overlay: 1300;
781
+ --z-index-modal: 1400;
782
+ --z-index-flyover: 1500;
783
+ --z-index-skip-nav: 1600;
784
+ --z-index-toast: 1700;
785
+ --z-index-tooltip: 1800;
767
786
 
768
787
  /* ========================================
769
788
  * BREAKPOINTS
@@ -873,6 +892,72 @@
873
892
  }
874
893
  }
875
894
 
895
+ @keyframes dropdownSlideIn {
896
+ 0% {
897
+ opacity: 0;
898
+ transform: scale(0.9);
899
+ }
900
+ 100% {
901
+ opacity: 1;
902
+ transform: scale(1);
903
+ }
904
+ }
905
+
906
+ @keyframes dropdownSlideOut {
907
+ 0% {
908
+ opacity: 1;
909
+ transform: scale(1);
910
+ }
911
+ 100% {
912
+ opacity: 0;
913
+ transform: scale(0.9);
914
+ }
915
+ }
916
+
917
+ @keyframes dropdownSlideInFromTop {
918
+ 0% {
919
+ opacity: 0;
920
+ transform: translateY(-0.5rem) scale(0.9);
921
+ }
922
+ 100% {
923
+ opacity: 1;
924
+ transform: translateY(0) scale(1);
925
+ }
926
+ }
927
+
928
+ @keyframes dropdownSlideInFromBottom {
929
+ 0% {
930
+ opacity: 0;
931
+ transform: translateY(0.5rem) scale(0.9);
932
+ }
933
+ 100% {
934
+ opacity: 1;
935
+ transform: translateY(0) scale(1);
936
+ }
937
+ }
938
+
939
+ @keyframes dropdownSlideInFromLeft {
940
+ 0% {
941
+ opacity: 0;
942
+ transform: translateX(-0.5rem) scale(0.9);
943
+ }
944
+ 100% {
945
+ opacity: 1;
946
+ transform: translateX(0) scale(1);
947
+ }
948
+ }
949
+
950
+ @keyframes dropdownSlideInFromRight {
951
+ 0% {
952
+ opacity: 0;
953
+ transform: translateX(0.5rem) scale(0.9);
954
+ }
955
+ 100% {
956
+ opacity: 1;
957
+ transform: translateX(0) scale(1);
958
+ }
959
+ }
960
+
876
961
  html {
877
962
  /* body.md textStyle from Panda → text-base */
878
963
  font-size: var(--text-base);