@tomny-dev/uzi 0.9.0 → 0.10.0-pr.93.306.1.e9674fb

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/README.md CHANGED
@@ -2,210 +2,80 @@
2
2
 
3
3
  Rapid-fire React UI components. Ship faster, build more.
4
4
 
5
+ Uzi is a reusable React component library for app interfaces, with design tokens, accessible interaction primitives, application layouts, and AI chat components.
6
+
5
7
  ## Install
6
8
 
7
9
  ```bash
8
10
  pnpm add @tomny-dev/uzi
9
11
  ```
10
12
 
11
- ## Usage
13
+ Uzi supports React 18 and 19 and uses CSS modules internally; Tailwind is not required.
12
14
 
13
- ```tsx
14
- import { Button, Card, Modal, ThemeProvider, useToast } from "@tomny-dev/uzi";
15
- ```
15
+ ## Quick start
16
16
 
17
- If you want the packaged component styles, import the exported stylesheet once in your app:
17
+ Import the component stylesheet **once** in your application's global CSS:
18
18
 
19
19
  ```css
20
20
  @import "@tomny-dev/uzi/styles.css";
21
21
  ```
22
22
 
23
- ## Storybook
24
-
25
- Uzi includes Storybook as the interactive component catalog for exploring components, variants, states, and composition patterns.
26
-
27
- To run Storybook locally:
28
-
29
- ```bash
30
- pnpm install
31
- pnpm storybook
32
- ```
33
-
34
- Then open `http://localhost:6006`.
35
-
36
- To verify the production Storybook build:
37
-
38
- ```bash
39
- pnpm build-storybook
40
- ```
41
-
42
- The static output is written to `storybook-static/`. Story files live beside their components under `src/components/**` using the `*.stories.tsx` naming convention.
43
-
44
- The **Components / AIChat** stories demonstrate streaming, custom renderers, scoped requests, message limits, error recovery, and an externally controlled runtime with mock approvals; no external AI credentials are needed.
45
-
46
- CI builds Storybook on every pull request and push to `main`. After changes land on `main`, the Storybook deployment workflow publishes `storybook-static/` to the `uzi-storybook` Cloudflare Pages project. The deployment workflow requires these repository secrets:
47
-
48
- - `CLOUDFLARE_API_TOKEN` — API token with Pages Write permission.
49
- - `CLOUDFLARE_ACCOUNT_ID` — Cloudflare account identifier.
50
-
51
- The Cloudflare Pages project should use `main` as its production branch. A custom domain such as `uzi.tomny.dev` can be attached to that Pages project after the project exists.
52
-
53
- ## Using With Coding Agents
54
-
55
- Installing `@tomny-dev/uzi` in an app does not by itself cause Claude Code, Codex, or similar agents to prefer `uzi` components. You should add that policy to the consumer repo's agent guidance.
56
-
57
- Recommended snippet for the consumer repo's `CLAUDE.md`, `AGENTS.md`, or equivalent:
58
-
59
- ```md
60
- ## UI Components
61
-
62
- - Prefer `@tomny-dev/uzi` for shared UI primitives and layout components.
63
- - Check `uzi` before creating new local primitives such as buttons, inputs, labels, cards, modals, selects, dropdown menus, alerts, shells, navigation, and theme controls.
64
- - Only introduce a repo-local primitive when `uzi` lacks the required behavior or when the local file is intentionally app-specific composition.
65
- - Keep imports consistent with the surrounding area of the codebase. If the repo already uses thin wrappers around `uzi`, follow that local pattern.
66
- ```
67
-
68
- If you want agents to discover props and examples directly, also configure the `uzi` MCP server. See [`mcp/README.md`](./mcp/README.md).
69
-
70
- ## Themes
71
-
72
- `uzi` ships with built-in light/dark tokens and a small accent palette layer.
23
+ Then use components in your app:
73
24
 
74
25
  ```tsx
75
26
  "use client";
76
27
 
77
- import { Button, ThemeProvider, useTheme } from "@tomny-dev/uzi";
78
-
79
- function ThemeToggle() {
80
- const { resolvedTheme, toggleTheme, accent, setAccent } = useTheme();
81
-
82
- return (
83
- <div>
84
- <Button onClick={toggleTheme}>
85
- {resolvedTheme === "dark" ? "Switch to light" : "Switch to dark"}
86
- </Button>
87
- <Button variant="outline" onClick={() => setAccent(accent === "violet" ? "blue" : "violet")}>
88
- Toggle accent
89
- </Button>
90
- </div>
91
- );
92
- }
28
+ import { Button, Card, ThemeProvider } from "@tomny-dev/uzi";
93
29
 
94
30
  export function App() {
95
31
  return (
96
32
  <ThemeProvider defaultTheme="system" defaultAccent="blue">
97
- <ThemeToggle />
33
+ <Card padding="md">
34
+ <h2>Welcome to Uzi</h2>
35
+ <Button onClick={() => alert("Hello!")}>Get started</Button>
36
+ </Card>
98
37
  </ThemeProvider>
99
38
  );
100
39
  }
101
40
  ```
102
41
 
103
- Supported themes:
104
-
105
- - `light`
106
- - `dark`
107
- - `system`
108
-
109
- Supported accent palettes:
110
-
111
- - `blue`
112
- - `cyan`
113
- - `violet`
114
- - `emerald`
115
- - `amber`
116
- - `rose`
42
+ For installation variants and a longer walkthrough, see [Getting Started](docs/getting-started.md).
117
43
 
118
- ## Component Philosophy
44
+ ## What's included
119
45
 
120
- `uzi` is not meant to be a from-scratch accessibility framework.
121
-
122
- - Use native HTML for simple form controls when the platform already gives the right behavior.
123
- - Use Radix for interaction-heavy primitives such as menus, dialogs, popovers, toasts, and custom selects.
124
- - Use `uzi` for the public component API, styling, tokens, and higher-level templates like `TopBar`, `SidebarNav`, and `AppShell`.
125
-
126
- In practice, `uzi` should spend its complexity budget on reusable app scaffolding and cohesive design, not on rebuilding low-level widget behavior that Radix or the browser already solves.
127
-
128
- ## Components
129
-
130
- | Component | Description |
46
+ | Area | Examples |
131
47
  |---|---|
132
- | `Avatar` | Profile image with fallback states |
133
- | `AIChat` | Plug-and-play AI SDK streaming chat with scoped context and customizable renderers |
134
- | `AIChatView` | Controlled chat presentation for external runtimes, tool approvals, attachment adapters and persisted history |
135
- | `AIChatDock` | Shared floating chat launcher, responsive panel and expand/close controls |
136
- | `Button` | Primary, secondary, outline, ghost variants |
137
- | `Card` | Discrete object container with tone/padding control |
138
- | `Surface` | Semantic visual grouping with base/subtle/raised/selected hierarchy |
139
- | `Checkbox` | Checkbox form primitive |
140
- | `Input` | Text input primitive |
141
- | `Label` | Form label primitive |
142
- | `MultiSelect` | Custom multi-option picker with checkbox-style menu |
143
- | `Pill` | Inline badge/tag |
144
- | `Modal` | Radix-backed overlay dialog |
145
- | `Select` | Styled Radix-based single-select field |
146
- | `Dropdown` | Deprecated compatibility alias for Select |
147
- | `DropdownMenu` | Radix-based action menu primitives |
148
- | `AppShell` | Responsive layout with collapsible sidebar |
149
- | `SidebarNav` | Sidebar navigation list |
150
- | `TopBar` | Composable header shell for brand, nav triggers, and actions |
151
- | `PageContainer` | Centered responsive page wrapper with standard horizontal and vertical gutters |
152
- | `PageHeader` | Page title, eyebrow, description, and action composition |
153
- | `SectionHeader` | Reusable section title, description, and actions |
154
- | `EmptyState` | Empty-result/resource state with visual and action slots |
155
- | `Stack` / `Inline` | Small gap/alignment layout helpers for common composition |
156
- | `Stat` / `StatGroup` | Domain-agnostic summary value and responsive stat grouping |
157
- | `Toolbar` / `ToolbarGroup` | Responsive compact filter/action workspace |
158
- | `ThemeToggleButton` | Reusable light/dark toggle wired to `ThemeProvider` |
159
- | `ThemeProvider` / `useTheme` | Light/dark + accent palette theming |
160
- | `ToastProvider` / `useToast` | Radix-backed toast notification system |
161
-
162
- `TopBar` supports:
163
-
164
- - `brandingLocation="left" | "center"`
165
- - `isSticky={true | false}`
166
- - `showThemeToggle`
167
- - `themeToggleProps`
168
-
169
- ## Documentation
48
+ | UI primitives | `Button`, `Card`, `Surface`, `Input`, `Label`, `Checkbox`, `Select`, `MultiSelect`, `Modal`, `DropdownMenu` |
49
+ | App layout | `AppShell`, `SidebarNav`, `TopBar`, `PageContainer`, `PageHeader`, `SectionHeader`, `Stack`, `Inline` |
50
+ | Common patterns | `Toolbar`, `ToolbarGroup`, `EmptyState`, `Avatar`, `Pill`, `Stat`, `StatGroup` |
51
+ | Theming and feedback | `ThemeProvider`, `useTheme`, `ThemeToggleButton`, `ToastProvider`, `useToast` |
52
+ | AI experiences | `AIChat`, `AIChatView`, `AIChatDock`, `FloatingActionStack`, `FloatingActionButton` |
170
53
 
171
- - [Getting Started](docs/getting-started.md) — Installation, setup, and first component
172
- - [Theming](docs/theming.md) — ThemeProvider, useTheme, accent palettes, CSS overrides
173
- - [Layout Patterns](docs/guides/layout-patterns.md) — Dashboard, full-width header, center-branded
174
- - [Application Scaffolding](docs/guides/application-scaffolding.md) — Page containers, headers, empty states, stats, and layout composition
175
- - [Visual Hierarchy](docs/guides/visual-hierarchy.md) — Surface levels, typography, borders, shadows, and toolbar conventions
176
- - [Form Patterns](docs/guides/form-patterns.md) — Input, Select, MultiSelect, SegmentedToggle patterns
177
- - [AI Chat](docs/guides/ai-chat.md) — Streaming endpoint contract, authentication, scope authorization, renderers and local Storybook demos
54
+ These are representative exports, not an exhaustive API reference. Use the guides below for configuration and composition examples.
178
55
 
179
- ## SSR Notes
180
-
181
- This package bundles CSS inline into the JavaScript output via `vite-plugin-css-injected-by-js`.
182
- At runtime, a `<style>` tag is injected into the document head so consumers do **not** need
183
- to import `./styles.css` for client-side rendering.
56
+ ## Documentation
184
57
 
185
- If your app uses SSR (Next.js, Remix, etc.), the injected `<style>` tag won't run on the
186
- server, so there may be a brief flash of unstyled content on the first client render.
187
- Consumers who need SSR-safe styles should continue importing the separate stylesheet:
58
+ - [Getting Started](docs/getting-started.md) — Installation, styles, and first components
59
+ - [Theming](docs/theming.md) — Light/dark mode, accent palettes, theme APIs, and CSS overrides
60
+ - [Layout Patterns](docs/guides/layout-patterns.md) — Dashboard and header compositions
61
+ - [Application Scaffolding](docs/guides/application-scaffolding.md) — Page structure, empty states, and stats
62
+ - [Visual Hierarchy](docs/guides/visual-hierarchy.md) — Surface, typography, border, and toolbar conventions
63
+ - [Form Patterns](docs/guides/form-patterns.md) — Input, Select, MultiSelect, and SegmentedToggle
64
+ - [AI Chat](docs/guides/ai-chat.md) — Streaming API contracts, scope authorization, and renderers
65
+ - [SSR and Next.js](docs/ssr.md) — Server rendering, stylesheet imports, and server-safe exports
188
66
 
189
- ```css
190
- @import "@tomny-dev/uzi/styles.css";
191
- ```
67
+ ## Using Uzi with coding agents
192
68
 
193
- ### Next.js App Router
69
+ Installing the package does not automatically tell Claude Code, Codex, or other agents to prefer Uzi components. Add a rule to your consuming application's `AGENTS.md`, `CLAUDE.md`, or equivalent instructing agents to check Uzi before creating new shared UI primitives.
194
70
 
195
- The main `@tomny-dev/uzi` entry is a client entry because it exports interactive components
196
- and React context providers. Next.js Server Components can import and render these exports;
197
- Next.js will preserve the client boundary without requiring a local wrapper.
71
+ For component discovery, usage examples, and agent configuration, see the [Uzi MCP server guide](mcp/README.md). The MCP server is not bundled in the main npm package.
198
72
 
199
- The application-scaffolding components themselves do not use hooks or browser-only APIs, but they remain exposed through the main client entry in this release. A separate server-safe layout entry can be considered later if consumer measurements justify the added package surface.
73
+ ## SSR and Next.js
200
74
 
201
- Use `@tomny-dev/uzi/server` for the server-safe `getThemeScript` export.
202
- Use `@tomny-dev/uzi/utils` for environment-neutral utilities such as `cx`, including
203
- calls made directly from Server Components.
75
+ For SSR frameworks, keep the stylesheet import shown above to prevent a flash of unstyled components. The main package entry is a client entry; `@tomny-dev/uzi/server` exposes the server-safe `getThemeScript`, while `@tomny-dev/uzi/utils` exposes environment-neutral helpers such as `cx`.
204
76
 
205
- ## Notes
77
+ See [SSR and Next.js](docs/ssr.md) for details.
206
78
 
207
- - No Tailwind — components use CSS modules internally
208
- - `"use client"` is handled by the bundle — no need to wrap imports
209
- - `react` and `react-dom` are peer dependencies, provided by your app
79
+ ## Contributing
210
80
 
211
- - `FloatingActionStack` and `FloatingActionButton` provide a single, accessible floating-action rail with mobile safe-area spacing. An `AIChatDock` can opt out of its built-in FAB via `showLauncher={false}`.
81
+ Working on Uzi itself? See [CONTRIBUTING.md](CONTRIBUTING.md) for local development, Storybook, testing, and design conventions. Infrastructure maintainers can find the Cloudflare Pages setup in [Storybook Deployment](docs/deployment.md).
@@ -23,6 +23,8 @@ export interface AIChatProps {
23
23
  readonly inputAriaLabel?: string;
24
24
  readonly inputMaxLength?: number;
25
25
  readonly components?: AIChatComponents;
26
+ /** Actions displayed beside the native New chat control in one shared toolbar. */
27
+ readonly toolbarActions?: ReactNode;
26
28
  /** Opt-in files, restricted to images/text accepted by the application API. */
27
29
  readonly attachments?: AIChatAttachmentOptions;
28
30
  /** Optional persistence; implementations must scope storage by user AND resource. */
@@ -153,7 +155,7 @@ export interface AIChatMessageBubbleProps {
153
155
  readonly className?: string;
154
156
  }
155
157
  export declare function AIChatMessageBubble({ role, label, children, className }: AIChatMessageBubbleProps): import("react/jsx-runtime").JSX.Element;
156
- export declare function AIChat({ api, scope, scopeLabel, fetch: requestFetch, headers, credentials, prepareSendMessagesRequest, sessionKey, messageLimit, inputPlaceholder, inputAriaLabel, inputMaxLength, components, attachments, history, sendAutomaticallyWhen, onClose, className, style, }: AIChatProps): import("react/jsx-runtime").JSX.Element;
158
+ export declare function AIChat({ api, scope, scopeLabel, fetch: requestFetch, headers, credentials, prepareSendMessagesRequest, sessionKey, messageLimit, inputPlaceholder, inputAriaLabel, inputMaxLength, components, toolbarActions, attachments, history, sendAutomaticallyWhen, onClose, className, style, }: AIChatProps): import("react/jsx-runtime").JSX.Element;
157
159
  /**
158
160
  * Controlled chat presentation for apps with their own AI SDK/assistant-ui
159
161
  * runtime. It does not create providers, transports or chat state. Callbacks
@@ -1 +1 @@
1
- {"version":3,"file":"AIChat.d.ts","sourceRoot":"","sources":["../../../src/components/ai-chat/AIChat.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/F,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAgB,MAAM,sBAAsB,CAAC;AAIvF,KAAK,sBAAsB,GAAG,WAAW,CAAC,qBAAqB,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnG,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EA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CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CAQjG;AAyJD,wBAAgB,MAAM,CAAC,EACrB,GAAG,EACH,KAAK,EACL,UAAU,EACV,KAAK,EAAE,YAAY,EACnB,OAAO,EACP,WAAW,EACX,0BAA0B,EAC1B,UAAU,EACV,YAAoC,EACpC,gBAAsC,EACtC,cAA0B,EAC1B,cAAqB,EACrB,UAAU,EACV,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,WAAW,2CAkDb;AAiMD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,MAAgB,EAChB,KAAK,EACL,KAAU,EACV,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,YAAY,EACZ,gBAAsC,EACtC,cAA0B,EAC1B,cAAqB,EACrB,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,GACN,EAAE,eAAe,2CAsLjB"}
1
+ {"version":3,"file":"AIChat.d.ts","sourceRoot":"","sources":["../../../src/components/ai-chat/AIChat.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/F,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAgB,MAAM,sBAAsB,CAAC;AAIvF,KAAK,sBAAsB,GAAG,WAAW,CAAC,qBAAqB,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnG,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,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EF,eAAO,MAAM,WAAW,4FAiPvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index26.js","names":[],"sources":["../src/components/multi-select/multi-select.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n}\n\n.wrapperFullWidth {\n width: 100%;\n}\n\n.trigger {\n width: 100%;\n min-width: 0;\n min-height: var(--uzi-control-min-height);\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.625rem;\n border-radius: var(--uzi-control-radius);\n border: 1px solid var(--ts-dropdown-border, var(--border));\n background: var(--ts-dropdown-bg, var(--uzi-surface-2, var(--secondary)));\n color: var(--ts-dropdown-text, var(--foreground));\n padding:\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x-compact)\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x);\n font-size: var(--uzi-control-font-size);\n line-height: var(--uzi-control-line-height);\n font-family: inherit;\n box-shadow: var(--uzi-control-shadow);\n transition:\n border-color 0.15s ease,\n background 0.15s ease,\n color 0.15s ease,\n box-shadow 0.15s ease;\n cursor: pointer;\n text-align: left;\n}\n\n.trigger:hover:not(:disabled) {\n border-color: var(--ts-dropdown-accent, var(--accent));\n box-shadow: var(--uzi-control-shadow-hover);\n}\n\n.trigger:focus-visible,\n.trigger[data-state=\"open\"] {\n border-color: var(--ts-dropdown-accent, var(--primary));\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n box-shadow: none;\n}\n\n.value {\n min-width: 0;\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 0.375rem;\n align-items: center;\n}\n\n.placeholder {\n color: var(--muted-foreground);\n}\n\n.summary {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 2px 8px;\n border-radius: 999px;\n border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);\n background: color-mix(in srgb, var(--primary) 10%, transparent);\n color: var(--ts-dropdown-text, var(--foreground));\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1.2;\n white-space: nowrap;\n}\n\n.chipSummary {\n color: var(--primary);\n}\n\n.chevron {\n width: 10px;\n height: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--muted-foreground);\n flex-shrink: 0;\n transition: transform 0.15s ease, color 0.15s ease;\n}\n\n.trigger:hover:not(:disabled) .chevron,\n.trigger[data-state=\"open\"] .chevron {\n color: var(--ts-dropdown-text, var(--foreground));\n}\n\n.trigger[data-state=\"open\"] .chevron {\n transform: rotate(180deg);\n}\n\n.menu {\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: var(--uzi-popover-z-index, 1100);\n min-width: var(--radix-dropdown-menu-trigger-width);\n width: max(var(--radix-dropdown-menu-trigger-width), var(--uzi-multiselect-content-min-width, 0px));\n max-width: min(calc(100vw - 1rem), var(--radix-dropdown-menu-content-available-width));\n max-height: min(28rem, var(--radix-dropdown-menu-content-available-height, calc(100dvh - 1rem)));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-radius);\n background: var(--ts-menu-bg, var(--popover));\n color: var(--ts-menu-fg, var(--popover-foreground));\n padding: var(--uzi-menu-padding);\n box-shadow: var(--uzi-menu-shadow);\n animation: menuFadeIn 140ms ease;\n}\n\n.bulkAction {\n width: 100%;\n display: flex;\n align-items: center;\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n outline: none;\n}\n\n.bulkAction[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n}\n\n.bulkAction[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.separator {\n height: 1px;\n margin: var(--uzi-menu-padding) 0;\n background: var(--ts-menu-border, var(--border));\n}\n\n.option {\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--uzi-menu-item-gap);\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n cursor: pointer;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.option:hover:not(:disabled),\n.option:focus-visible,\n.option[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n outline: none;\n}\n\n.optionDisabled,\n.option[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.optionSelected .optionLabel {\n color: var(--primary);\n}\n\n.indicator {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 0.3125rem;\n border: 1px solid var(--border);\n color: transparent;\n background: transparent;\n transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;\n}\n\n.indicatorSelected {\n border-color: color-mix(in srgb, var(--primary) 55%, transparent);\n background: color-mix(in srgb, var(--primary) 12%, transparent);\n color: var(--primary);\n}\n\n.indicatorDisabled {\n opacity: 0.65;\n}\n\n.optionLabel {\n min-width: 0;\n flex: 1;\n display: inline-flex;\n align-items: center;\n gap: var(--uzi-menu-item-gap);\n}\n\n.optionIcon {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.optionIcon > * {\n max-width: 100%;\n max-height: 100%;\n}\n\n@keyframes menuFadeIn {\n from {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n.draftActions {\n display: flex;\n flex-shrink: 0;\n gap: 0.5rem;\n padding: 0.5rem 0.25rem 0.125rem;\n border-top: 1px solid var(--ts-menu-border, var(--border));\n}\n.draftButton {\n flex: 1;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: 0.4rem 0.75rem;\n font: inherit;\n cursor: pointer;\n}\n.draftButton:last-child {\n background: var(--primary);\n color: var(--primary-foreground);\n border-color: var(--primary);\n}\n.draftButton:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-ring-offset); }\n.draftButton:disabled { opacity: 0.5; cursor: not-allowed; }\n\n.optionsViewport {\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1 1 auto;\n scrollbar-gutter: stable;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"index26.js","names":[],"sources":["../src/components/multi-select/multi-select.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n}\n\n.wrapperFullWidth {\n width: 100%;\n}\n\n.trigger {\n width: 100%;\n min-width: 0;\n min-height: var(--uzi-control-min-height);\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.625rem;\n border-radius: var(--uzi-control-radius);\n border: 1px solid var(--ts-dropdown-border, var(--border));\n background: var(--ts-dropdown-bg, var(--uzi-surface-2, var(--secondary)));\n color: var(--ts-dropdown-text, var(--foreground));\n padding:\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x-compact)\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x);\n font-size: var(--uzi-control-font-size);\n line-height: var(--uzi-control-line-height);\n font-family: inherit;\n box-shadow: var(--uzi-control-shadow);\n transition:\n border-color 0.15s ease,\n background 0.15s ease,\n color 0.15s ease,\n box-shadow 0.15s ease;\n cursor: pointer;\n text-align: left;\n}\n\n.trigger:hover:not(:disabled) {\n border-color: var(--ts-dropdown-accent, var(--accent));\n box-shadow: var(--uzi-control-shadow-hover);\n}\n\n.trigger:focus-visible,\n.trigger[data-state=\"open\"] {\n border-color: var(--ts-dropdown-accent, var(--primary));\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n box-shadow: none;\n}\n\n.value {\n min-width: 0;\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 0.375rem;\n align-items: center;\n}\n\n.placeholder {\n color: var(--muted-foreground);\n}\n\n.summary {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 2px 8px;\n border-radius: 999px;\n border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);\n background: color-mix(in srgb, var(--primary) 10%, transparent);\n color: var(--ts-dropdown-text, var(--foreground));\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1.2;\n white-space: nowrap;\n}\n\n.chipSummary {\n color: var(--primary);\n}\n\n.chevron {\n width: 10px;\n height: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--muted-foreground);\n flex-shrink: 0;\n transition: transform 0.15s ease, color 0.15s ease;\n}\n\n.trigger:hover:not(:disabled) .chevron,\n.trigger[data-state=\"open\"] .chevron {\n color: var(--ts-dropdown-text, var(--foreground));\n}\n\n.trigger[data-state=\"open\"] .chevron {\n transform: rotate(180deg);\n}\n\n.menu {\n /* Keep the menu in Radix Popper's layout so collision detection measures its real size. */\n z-index: var(--uzi-popover-z-index, 1100);\n box-sizing: border-box;\n min-width: 0;\n width: max(var(--radix-dropdown-menu-trigger-width), var(--uzi-multiselect-content-min-width, 0px));\n max-width: min(calc(100vw - 1rem), var(--radix-dropdown-menu-content-available-width, calc(100vw - 1rem)));\n max-height: min(28rem, var(--radix-dropdown-menu-content-available-height, calc(100dvh - 1rem)));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-radius);\n background: var(--ts-menu-bg, var(--popover));\n color: var(--ts-menu-fg, var(--popover-foreground));\n padding: var(--uzi-menu-padding);\n box-shadow: var(--uzi-menu-shadow);\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n animation: menuFadeIn 140ms ease;\n}\n\n.bulkAction {\n width: 100%;\n display: flex;\n align-items: center;\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n outline: none;\n}\n\n.bulkAction[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n}\n\n.bulkAction[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.separator {\n height: 1px;\n margin: var(--uzi-menu-padding) 0;\n background: var(--ts-menu-border, var(--border));\n}\n\n.option {\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--uzi-menu-item-gap);\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n cursor: pointer;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.option:hover:not(:disabled),\n.option:focus-visible,\n.option[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n outline: none;\n}\n\n.optionDisabled,\n.option[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.optionSelected .optionLabel {\n color: var(--primary);\n}\n\n.indicator {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 0.3125rem;\n border: 1px solid var(--border);\n color: transparent;\n background: transparent;\n transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;\n}\n\n.indicatorSelected {\n border-color: color-mix(in srgb, var(--primary) 55%, transparent);\n background: color-mix(in srgb, var(--primary) 12%, transparent);\n color: var(--primary);\n}\n\n.indicatorDisabled {\n opacity: 0.65;\n}\n\n.optionLabel {\n min-width: 0;\n flex: 1;\n overflow-wrap: anywhere;\n}\n\n.optionLabel > .optionIcon {\n margin-right: var(--uzi-menu-item-gap);\n vertical-align: middle;\n}\n\n.optionIcon {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.optionIcon > * {\n max-width: 100%;\n max-height: 100%;\n}\n\n@keyframes menuFadeIn {\n from {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n.draftActions {\n display: flex;\n flex-shrink: 0;\n gap: 0.5rem;\n padding: 0.5rem 0.25rem 0.125rem;\n border-top: 1px solid var(--ts-menu-border, var(--border));\n}\n.draftButton {\n flex: 1;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: 0.4rem 0.75rem;\n font: inherit;\n cursor: pointer;\n}\n.draftButton:last-child {\n background: var(--primary);\n color: var(--primary-foreground);\n border-color: var(--primary);\n}\n.draftButton:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-ring-offset); }\n.draftButton:disabled { opacity: 0.5; cursor: not-allowed; }\n\n.optionsViewport {\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1 1 auto;\n scrollbar-gutter: stable;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index27.cjs","names":[],"sources":["../src/components/multi-select/multi-select.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n}\n\n.wrapperFullWidth {\n width: 100%;\n}\n\n.trigger {\n width: 100%;\n min-width: 0;\n min-height: var(--uzi-control-min-height);\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.625rem;\n border-radius: var(--uzi-control-radius);\n border: 1px solid var(--ts-dropdown-border, var(--border));\n background: var(--ts-dropdown-bg, var(--uzi-surface-2, var(--secondary)));\n color: var(--ts-dropdown-text, var(--foreground));\n padding:\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x-compact)\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x);\n font-size: var(--uzi-control-font-size);\n line-height: var(--uzi-control-line-height);\n font-family: inherit;\n box-shadow: var(--uzi-control-shadow);\n transition:\n border-color 0.15s ease,\n background 0.15s ease,\n color 0.15s ease,\n box-shadow 0.15s ease;\n cursor: pointer;\n text-align: left;\n}\n\n.trigger:hover:not(:disabled) {\n border-color: var(--ts-dropdown-accent, var(--accent));\n box-shadow: var(--uzi-control-shadow-hover);\n}\n\n.trigger:focus-visible,\n.trigger[data-state=\"open\"] {\n border-color: var(--ts-dropdown-accent, var(--primary));\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n box-shadow: none;\n}\n\n.value {\n min-width: 0;\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 0.375rem;\n align-items: center;\n}\n\n.placeholder {\n color: var(--muted-foreground);\n}\n\n.summary {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 2px 8px;\n border-radius: 999px;\n border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);\n background: color-mix(in srgb, var(--primary) 10%, transparent);\n color: var(--ts-dropdown-text, var(--foreground));\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1.2;\n white-space: nowrap;\n}\n\n.chipSummary {\n color: var(--primary);\n}\n\n.chevron {\n width: 10px;\n height: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--muted-foreground);\n flex-shrink: 0;\n transition: transform 0.15s ease, color 0.15s ease;\n}\n\n.trigger:hover:not(:disabled) .chevron,\n.trigger[data-state=\"open\"] .chevron {\n color: var(--ts-dropdown-text, var(--foreground));\n}\n\n.trigger[data-state=\"open\"] .chevron {\n transform: rotate(180deg);\n}\n\n.menu {\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: var(--uzi-popover-z-index, 1100);\n min-width: var(--radix-dropdown-menu-trigger-width);\n width: max(var(--radix-dropdown-menu-trigger-width), var(--uzi-multiselect-content-min-width, 0px));\n max-width: min(calc(100vw - 1rem), var(--radix-dropdown-menu-content-available-width));\n max-height: min(28rem, var(--radix-dropdown-menu-content-available-height, calc(100dvh - 1rem)));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-radius);\n background: var(--ts-menu-bg, var(--popover));\n color: var(--ts-menu-fg, var(--popover-foreground));\n padding: var(--uzi-menu-padding);\n box-shadow: var(--uzi-menu-shadow);\n animation: menuFadeIn 140ms ease;\n}\n\n.bulkAction {\n width: 100%;\n display: flex;\n align-items: center;\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n outline: none;\n}\n\n.bulkAction[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n}\n\n.bulkAction[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.separator {\n height: 1px;\n margin: var(--uzi-menu-padding) 0;\n background: var(--ts-menu-border, var(--border));\n}\n\n.option {\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--uzi-menu-item-gap);\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n cursor: pointer;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.option:hover:not(:disabled),\n.option:focus-visible,\n.option[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n outline: none;\n}\n\n.optionDisabled,\n.option[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.optionSelected .optionLabel {\n color: var(--primary);\n}\n\n.indicator {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 0.3125rem;\n border: 1px solid var(--border);\n color: transparent;\n background: transparent;\n transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;\n}\n\n.indicatorSelected {\n border-color: color-mix(in srgb, var(--primary) 55%, transparent);\n background: color-mix(in srgb, var(--primary) 12%, transparent);\n color: var(--primary);\n}\n\n.indicatorDisabled {\n opacity: 0.65;\n}\n\n.optionLabel {\n min-width: 0;\n flex: 1;\n display: inline-flex;\n align-items: center;\n gap: var(--uzi-menu-item-gap);\n}\n\n.optionIcon {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.optionIcon > * {\n max-width: 100%;\n max-height: 100%;\n}\n\n@keyframes menuFadeIn {\n from {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n.draftActions {\n display: flex;\n flex-shrink: 0;\n gap: 0.5rem;\n padding: 0.5rem 0.25rem 0.125rem;\n border-top: 1px solid var(--ts-menu-border, var(--border));\n}\n.draftButton {\n flex: 1;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: 0.4rem 0.75rem;\n font: inherit;\n cursor: pointer;\n}\n.draftButton:last-child {\n background: var(--primary);\n color: var(--primary-foreground);\n border-color: var(--primary);\n}\n.draftButton:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-ring-offset); }\n.draftButton:disabled { opacity: 0.5; cursor: not-allowed; }\n\n.optionsViewport {\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1 1 auto;\n scrollbar-gutter: stable;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"index27.cjs","names":[],"sources":["../src/components/multi-select/multi-select.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n}\n\n.wrapperFullWidth {\n width: 100%;\n}\n\n.trigger {\n width: 100%;\n min-width: 0;\n min-height: var(--uzi-control-min-height);\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.625rem;\n border-radius: var(--uzi-control-radius);\n border: 1px solid var(--ts-dropdown-border, var(--border));\n background: var(--ts-dropdown-bg, var(--uzi-surface-2, var(--secondary)));\n color: var(--ts-dropdown-text, var(--foreground));\n padding:\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x-compact)\n var(--uzi-control-padding-y)\n var(--uzi-control-padding-x);\n font-size: var(--uzi-control-font-size);\n line-height: var(--uzi-control-line-height);\n font-family: inherit;\n box-shadow: var(--uzi-control-shadow);\n transition:\n border-color 0.15s ease,\n background 0.15s ease,\n color 0.15s ease,\n box-shadow 0.15s ease;\n cursor: pointer;\n text-align: left;\n}\n\n.trigger:hover:not(:disabled) {\n border-color: var(--ts-dropdown-accent, var(--accent));\n box-shadow: var(--uzi-control-shadow-hover);\n}\n\n.trigger:focus-visible,\n.trigger[data-state=\"open\"] {\n border-color: var(--ts-dropdown-accent, var(--primary));\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n box-shadow: none;\n}\n\n.value {\n min-width: 0;\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 0.375rem;\n align-items: center;\n}\n\n.placeholder {\n color: var(--muted-foreground);\n}\n\n.summary {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 2px 8px;\n border-radius: 999px;\n border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);\n background: color-mix(in srgb, var(--primary) 10%, transparent);\n color: var(--ts-dropdown-text, var(--foreground));\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1.2;\n white-space: nowrap;\n}\n\n.chipSummary {\n color: var(--primary);\n}\n\n.chevron {\n width: 10px;\n height: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--muted-foreground);\n flex-shrink: 0;\n transition: transform 0.15s ease, color 0.15s ease;\n}\n\n.trigger:hover:not(:disabled) .chevron,\n.trigger[data-state=\"open\"] .chevron {\n color: var(--ts-dropdown-text, var(--foreground));\n}\n\n.trigger[data-state=\"open\"] .chevron {\n transform: rotate(180deg);\n}\n\n.menu {\n /* Keep the menu in Radix Popper's layout so collision detection measures its real size. */\n z-index: var(--uzi-popover-z-index, 1100);\n box-sizing: border-box;\n min-width: 0;\n width: max(var(--radix-dropdown-menu-trigger-width), var(--uzi-multiselect-content-min-width, 0px));\n max-width: min(calc(100vw - 1rem), var(--radix-dropdown-menu-content-available-width, calc(100vw - 1rem)));\n max-height: min(28rem, var(--radix-dropdown-menu-content-available-height, calc(100dvh - 1rem)));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-radius);\n background: var(--ts-menu-bg, var(--popover));\n color: var(--ts-menu-fg, var(--popover-foreground));\n padding: var(--uzi-menu-padding);\n box-shadow: var(--uzi-menu-shadow);\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n animation: menuFadeIn 140ms ease;\n}\n\n.bulkAction {\n width: 100%;\n display: flex;\n align-items: center;\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n outline: none;\n}\n\n.bulkAction[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n}\n\n.bulkAction[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.separator {\n height: 1px;\n margin: var(--uzi-menu-padding) 0;\n background: var(--ts-menu-border, var(--border));\n}\n\n.option {\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--uzi-menu-item-gap);\n border: none;\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: var(--uzi-menu-item-padding-y) var(--uzi-menu-item-padding-x);\n font: inherit;\n cursor: pointer;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.option:hover:not(:disabled),\n.option:focus-visible,\n.option[data-highlighted] {\n background: var(--ts-menu-hover-bg, var(--accent));\n color: var(--ts-menu-hover-fg, var(--accent-foreground));\n outline: none;\n}\n\n.optionDisabled,\n.option[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.optionSelected .optionLabel {\n color: var(--primary);\n}\n\n.indicator {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 0.3125rem;\n border: 1px solid var(--border);\n color: transparent;\n background: transparent;\n transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;\n}\n\n.indicatorSelected {\n border-color: color-mix(in srgb, var(--primary) 55%, transparent);\n background: color-mix(in srgb, var(--primary) 12%, transparent);\n color: var(--primary);\n}\n\n.indicatorDisabled {\n opacity: 0.65;\n}\n\n.optionLabel {\n min-width: 0;\n flex: 1;\n overflow-wrap: anywhere;\n}\n\n.optionLabel > .optionIcon {\n margin-right: var(--uzi-menu-item-gap);\n vertical-align: middle;\n}\n\n.optionIcon {\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.optionIcon > * {\n max-width: 100%;\n max-height: 100%;\n}\n\n@keyframes menuFadeIn {\n from {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n.draftActions {\n display: flex;\n flex-shrink: 0;\n gap: 0.5rem;\n padding: 0.5rem 0.25rem 0.125rem;\n border-top: 1px solid var(--ts-menu-border, var(--border));\n}\n.draftButton {\n flex: 1;\n border: 1px solid var(--ts-menu-border, var(--border));\n border-radius: var(--uzi-menu-item-radius);\n background: transparent;\n color: inherit;\n padding: 0.4rem 0.75rem;\n font: inherit;\n cursor: pointer;\n}\n.draftButton:last-child {\n background: var(--primary);\n color: var(--primary-foreground);\n border-color: var(--primary);\n}\n.draftButton:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-ring-offset); }\n.draftButton:disabled { opacity: 0.5; cursor: not-allowed; }\n\n.optionsViewport {\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1 1 auto;\n scrollbar-gutter: stable;\n}\n"],"mappings":""}
package/dist/index27.js CHANGED
@@ -101,6 +101,7 @@ var MultiSelect = React.forwardRef(({ options, value, onChange, placeholder = "S
101
101
  className: multi_select_module_default.menu,
102
102
  style: contentMinWidth ? { "--uzi-multiselect-content-min-width": contentMinWidth } : void 0,
103
103
  sideOffset: 4,
104
+ collisionPadding: 8,
104
105
  align: "start",
105
106
  children: [
106
107
  bulkActions && enabledValues.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
@@ -1 +1 @@
1
- {"version":3,"file":"index27.js","names":[],"sources":["../src/components/multi-select/MultiSelect.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./multi-select.module.css\";\n\nexport type MultiSelectOption = {\n label: string;\n value: string;\n disabled?: boolean;\n /** Optional decorative leading visual. The label remains the accessible option name. */\n icon?: React.ReactElement;\n};\n\nexport type MultiSelectProps = {\n options: MultiSelectOption[];\n value: string[];\n onChange: (value: string[]) => void;\n placeholder?: string;\n fullWidth?: boolean;\n maxVisibleValues?: number;\n /** Minimum popup width, independent of the trigger (e.g. '24rem'). */\n contentMinWidth?: string;\n /** Formats the closed trigger text from the selected options, including an empty selection. */\n formatValue?: (selected: MultiSelectOption[]) => string;\n /** Shows Select all and Clear all actions. Bulk actions modify enabled options only. */\n bulkActions?: boolean;\n /** Stage changes until Apply. Cancel/dismiss discards the draft. */\n draftMode?: boolean;\n /** Minimum number of selected values required to apply; immediate mode blocks changes below this count. */\n minSelected?: number;\n selectAllLabel?: string;\n /** Label for clearing all enabled selections. Disabled selected options remain selected. */\n clearAllLabel?: string;\n className?: string;\n disabled?: boolean;\n name?: string;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n};\n\nexport const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(\n (\n {\n options,\n value,\n onChange,\n placeholder = \"Select options\",\n fullWidth = true,\n maxVisibleValues = 2,\n contentMinWidth,\n formatValue,\n bulkActions = false,\n draftMode = false,\n minSelected = 0,\n selectAllLabel = \"Select all\",\n clearAllLabel,\n className,\n disabled = false,\n name,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const [draft, setDraft] = React.useState<string[]>(value);\n const editValue = draftMode && open ? draft : value;\n const updateSelection = (next: string[]) => {\n if (draftMode) setDraft(next);\n else if (next.length >= minSelected) onChange(next);\n };\n const selectedSet = React.useMemo(() => new Set(editValue), [editValue]);\n const selectedOptions = React.useMemo(\n () => options.filter((opt) => value.includes(opt.value)),\n [options, value],\n );\n\n const enabledValues = React.useMemo(\n () => options.filter((option) => !option.disabled).map((option) => option.value),\n [options],\n );\n const allEnabledSelected =\n enabledValues.length > 0 && enabledValues.every((entry) => selectedSet.has(entry));\n const hasDisabledOptions = options.some((option) => option.disabled);\n const resolvedClearAllLabel =\n clearAllLabel ?? (hasDisabledOptions ? \"Clear enabled\" : \"Clear all\");\n\n const formattedValue = React.useMemo(\n () => formatValue?.(selectedOptions),\n [formatValue, selectedOptions],\n );\n\n const toggleValue = React.useCallback(\n (nextValue: string) => {\n if (selectedSet.has(nextValue)) {\n updateSelection(editValue.filter((entry) => entry !== nextValue));\n return;\n }\n\n updateSelection([...editValue, nextValue]);\n },\n [updateSelection, selectedSet, editValue],\n );\n\n const visibleCount = Math.max(1, maxVisibleValues);\n const visibleOptions = selectedOptions.slice(0, visibleCount);\n const overflowCount = Math.max(\n 0,\n selectedOptions.length - visibleOptions.length,\n );\n\n return (\n <DropdownMenuPrimitive.Root modal={false} open={open} onOpenChange={(next) => {\n setDraft([...value]);\n setOpen(next);\n }}>\n <div\n className={cx(\n styles.wrapper,\n fullWidth && styles.wrapperFullWidth,\n className,\n )}\n >\n <DropdownMenuPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n className={styles.trigger}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n disabled={disabled}\n >\n <span className={styles.value}>\n {formatValue ? (\n <span className={styles.summary}>{formattedValue}</span>\n ) : selectedOptions.length === 0 ? (\n <span className={styles.placeholder}>{placeholder}</span>\n ) : (\n <>\n {visibleOptions.map((option) => (\n <span key={option.value} className={styles.chip}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n ))}\n {overflowCount > 0 ? (\n <span className={cx(styles.chip, styles.chipSummary)}>\n +{overflowCount}\n </span>\n ) : null}\n </>\n )}\n </span>\n <span className={styles.chevron} aria-hidden=\"true\">\n <svg\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n >\n <path\n d=\"M2 3.5L5 6.5L8 3.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n </button>\n </DropdownMenuPrimitive.Trigger>\n\n {name\n ? value.map((entry) => (\n <input key={entry} type=\"hidden\" name={name} value={entry} />\n ))\n : null}\n\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n className={styles.menu}\n style={contentMinWidth ? { '--uzi-multiselect-content-min-width': contentMinWidth } as React.CSSProperties : undefined}\n sideOffset={4}\n align=\"start\"\n >\n {bulkActions && enabledValues.length > 0 ? (\n <>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={allEnabledSelected}\n onSelect={(event) => {\n event.preventDefault();\n updateSelection([...editValue, ...enabledValues.filter((entry) => !selectedSet.has(entry))]);\n }}\n >\n {selectAllLabel}\n </DropdownMenuPrimitive.Item>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={!enabledValues.some((entry) => selectedSet.has(entry))}\n onSelect={(event) => {\n event.preventDefault();\n const enabledSet = new Set(enabledValues);\n updateSelection(editValue.filter((entry) => !enabledSet.has(entry)));\n }}\n >\n {resolvedClearAllLabel}\n </DropdownMenuPrimitive.Item>\n </>\n ) : null}\n {bulkActions && enabledValues.length > 0 ? (\n <DropdownMenuPrimitive.Separator className={styles.separator} />\n ) : null}\n <div className={styles.optionsViewport}>\n {options.map((option) => {\n const selected = selectedSet.has(option.value);\n\n return (\n <DropdownMenuPrimitive.CheckboxItem\n key={option.value}\n className={cx(\n styles.option,\n selected && styles.optionSelected,\n option.disabled && styles.optionDisabled,\n )}\n checked={selected}\n disabled={option.disabled}\n onCheckedChange={() => toggleValue(option.value)}\n onSelect={(event) => event.preventDefault()}\n >\n <span\n className={cx(\n styles.indicator,\n selected && styles.indicatorSelected,\n option.disabled && styles.indicatorDisabled,\n )}\n aria-hidden=\"true\"\n >\n <DropdownMenuPrimitive.ItemIndicator forceMount>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 8.5 6.5 11.5 12.5 4.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n <span className={styles.optionLabel}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n </DropdownMenuPrimitive.CheckboxItem>\n );\n })}\n </div>\n {draftMode ? (\n <div className={styles.draftActions}>\n <button type=\"button\" className={styles.draftButton} onClick={() => { setDraft([...value]); setOpen(false); }}>Cancel</button>\n <button type=\"button\" className={styles.draftButton} disabled={editValue.length < minSelected} onClick={() => {\n onChange(editValue);\n setOpen(false);\n }}>Apply</button>\n </div>\n ) : null}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n </div>\n </DropdownMenuPrimitive.Root>\n );\n },\n);\n\nMultiSelect.displayName = \"MultiSelect\";\n"],"mappings":";;;;;;;AA0CA,IAAa,cAAc,MAAM,YAE7B,EACE,SACA,OACA,UACA,cAAc,kBACd,YAAY,MACZ,mBAAmB,GACnB,iBACA,aACA,cAAc,OACd,YAAY,OACZ,cAAc,GACd,iBAAiB,cACjB,eACA,WACA,WAAW,OACX,MACA,cAAc,WACd,mBAAmB,kBAErB,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,KAAK;CAC5C,MAAM,CAAC,OAAO,YAAY,MAAM,SAAmB,KAAK;CACxD,MAAM,YAAY,aAAa,OAAO,QAAQ;CAC9C,MAAM,mBAAmB,SAAmB;EAC1C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AE;aACF,QAAO;aACP,aAAY;aACZ,eAAc;aACd,gBAAe;YAChB,CAAA;WACE,CAAA;UAC8B,CAAA;SACjC,CAAA,GACN,qBAAC,QAAD;UAAM,WAAW,4BAAO;oBAAxB,CACO,OAAO,OAAO,oBAAC,QAAD;WAAM,WAAW,4BAAO;WAAY,eAAY;qBAAQ,OAAO;UAAW,CAAA,IAAI,MAC5F,OAAO,KACJ;WACwB;WAzC7B,OAAO,KAyCsB;OAEtC,CAAC;MACE,CAAA;MACJ,YACC,qBAAC,OAAD;OAAK,WAAW,4BAAO;iBAAvB,CACE,oBAAC,UAAD;QAAQ,MAAK;QAAS,WAAW,4BAAO;QAAa,eAAe;SAAE,SAAS,CAAC,GAAG,KAAK,CAAC;SAAG,QAAQ,KAAK;QAAG;kBAAG;OAAc,CAAA,GAC7H,oBAAC,UAAD;QAAQ,MAAK;QAAS,WAAW,4BAAO;QAAa,UAAU,UAAU,SAAS;QAAa,eAAe;SAC5G,SAAS,SAAS;SAClB,QAAQ,KAAK;QACf;kBAAG;OAAa,CAAA,CACb;WACH;KACyB;OACH,CAAA;GAC3B;;CACqB,CAAA;AAEhC,CACF;AAEA,YAAY,cAAc"}
1
+ {"version":3,"file":"index27.js","names":[],"sources":["../src/components/multi-select/MultiSelect.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./multi-select.module.css\";\n\nexport type MultiSelectOption = {\n label: string;\n value: string;\n disabled?: boolean;\n /** Optional decorative leading visual. The label remains the accessible option name. */\n icon?: React.ReactElement;\n};\n\nexport type MultiSelectProps = {\n options: MultiSelectOption[];\n value: string[];\n onChange: (value: string[]) => void;\n placeholder?: string;\n fullWidth?: boolean;\n maxVisibleValues?: number;\n /** Minimum popup width, independent of the trigger (e.g. '24rem'). */\n contentMinWidth?: string;\n /** Formats the closed trigger text from the selected options, including an empty selection. */\n formatValue?: (selected: MultiSelectOption[]) => string;\n /** Shows Select all and Clear all actions. Bulk actions modify enabled options only. */\n bulkActions?: boolean;\n /** Stage changes until Apply. Cancel/dismiss discards the draft. */\n draftMode?: boolean;\n /** Minimum number of selected values required to apply; immediate mode blocks changes below this count. */\n minSelected?: number;\n selectAllLabel?: string;\n /** Label for clearing all enabled selections. Disabled selected options remain selected. */\n clearAllLabel?: string;\n className?: string;\n disabled?: boolean;\n name?: string;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n};\n\nexport const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(\n (\n {\n options,\n value,\n onChange,\n placeholder = \"Select options\",\n fullWidth = true,\n maxVisibleValues = 2,\n contentMinWidth,\n formatValue,\n bulkActions = false,\n draftMode = false,\n minSelected = 0,\n selectAllLabel = \"Select all\",\n clearAllLabel,\n className,\n disabled = false,\n name,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const [draft, setDraft] = React.useState<string[]>(value);\n const editValue = draftMode && open ? draft : value;\n const updateSelection = (next: string[]) => {\n if (draftMode) setDraft(next);\n else if (next.length >= minSelected) onChange(next);\n };\n const selectedSet = React.useMemo(() => new Set(editValue), [editValue]);\n const selectedOptions = React.useMemo(\n () => options.filter((opt) => value.includes(opt.value)),\n [options, value],\n );\n\n const enabledValues = React.useMemo(\n () => options.filter((option) => !option.disabled).map((option) => option.value),\n [options],\n );\n const allEnabledSelected =\n enabledValues.length > 0 && enabledValues.every((entry) => selectedSet.has(entry));\n const hasDisabledOptions = options.some((option) => option.disabled);\n const resolvedClearAllLabel =\n clearAllLabel ?? (hasDisabledOptions ? \"Clear enabled\" : \"Clear all\");\n\n const formattedValue = React.useMemo(\n () => formatValue?.(selectedOptions),\n [formatValue, selectedOptions],\n );\n\n const toggleValue = React.useCallback(\n (nextValue: string) => {\n if (selectedSet.has(nextValue)) {\n updateSelection(editValue.filter((entry) => entry !== nextValue));\n return;\n }\n\n updateSelection([...editValue, nextValue]);\n },\n [updateSelection, selectedSet, editValue],\n );\n\n const visibleCount = Math.max(1, maxVisibleValues);\n const visibleOptions = selectedOptions.slice(0, visibleCount);\n const overflowCount = Math.max(\n 0,\n selectedOptions.length - visibleOptions.length,\n );\n\n return (\n <DropdownMenuPrimitive.Root modal={false} open={open} onOpenChange={(next) => {\n setDraft([...value]);\n setOpen(next);\n }}>\n <div\n className={cx(\n styles.wrapper,\n fullWidth && styles.wrapperFullWidth,\n className,\n )}\n >\n <DropdownMenuPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n className={styles.trigger}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n disabled={disabled}\n >\n <span className={styles.value}>\n {formatValue ? (\n <span className={styles.summary}>{formattedValue}</span>\n ) : selectedOptions.length === 0 ? (\n <span className={styles.placeholder}>{placeholder}</span>\n ) : (\n <>\n {visibleOptions.map((option) => (\n <span key={option.value} className={styles.chip}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n ))}\n {overflowCount > 0 ? (\n <span className={cx(styles.chip, styles.chipSummary)}>\n +{overflowCount}\n </span>\n ) : null}\n </>\n )}\n </span>\n <span className={styles.chevron} aria-hidden=\"true\">\n <svg\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n >\n <path\n d=\"M2 3.5L5 6.5L8 3.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n </button>\n </DropdownMenuPrimitive.Trigger>\n\n {name\n ? value.map((entry) => (\n <input key={entry} type=\"hidden\" name={name} value={entry} />\n ))\n : null}\n\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n className={styles.menu}\n style={contentMinWidth ? { '--uzi-multiselect-content-min-width': contentMinWidth } as React.CSSProperties : undefined}\n sideOffset={4}\n collisionPadding={8}\n align=\"start\"\n >\n {bulkActions && enabledValues.length > 0 ? (\n <>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={allEnabledSelected}\n onSelect={(event) => {\n event.preventDefault();\n updateSelection([...editValue, ...enabledValues.filter((entry) => !selectedSet.has(entry))]);\n }}\n >\n {selectAllLabel}\n </DropdownMenuPrimitive.Item>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={!enabledValues.some((entry) => selectedSet.has(entry))}\n onSelect={(event) => {\n event.preventDefault();\n const enabledSet = new Set(enabledValues);\n updateSelection(editValue.filter((entry) => !enabledSet.has(entry)));\n }}\n >\n {resolvedClearAllLabel}\n </DropdownMenuPrimitive.Item>\n </>\n ) : null}\n {bulkActions && enabledValues.length > 0 ? (\n <DropdownMenuPrimitive.Separator className={styles.separator} />\n ) : null}\n <div className={styles.optionsViewport}>\n {options.map((option) => {\n const selected = selectedSet.has(option.value);\n\n return (\n <DropdownMenuPrimitive.CheckboxItem\n key={option.value}\n className={cx(\n styles.option,\n selected && styles.optionSelected,\n option.disabled && styles.optionDisabled,\n )}\n checked={selected}\n disabled={option.disabled}\n onCheckedChange={() => toggleValue(option.value)}\n onSelect={(event) => event.preventDefault()}\n >\n <span\n className={cx(\n styles.indicator,\n selected && styles.indicatorSelected,\n option.disabled && styles.indicatorDisabled,\n )}\n aria-hidden=\"true\"\n >\n <DropdownMenuPrimitive.ItemIndicator forceMount>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 8.5 6.5 11.5 12.5 4.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n <span className={styles.optionLabel}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n </DropdownMenuPrimitive.CheckboxItem>\n );\n })}\n </div>\n {draftMode ? (\n <div className={styles.draftActions}>\n <button type=\"button\" className={styles.draftButton} onClick={() => { setDraft([...value]); setOpen(false); }}>Cancel</button>\n <button type=\"button\" className={styles.draftButton} disabled={editValue.length < minSelected} onClick={() => {\n onChange(editValue);\n setOpen(false);\n }}>Apply</button>\n </div>\n ) : null}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n </div>\n </DropdownMenuPrimitive.Root>\n );\n },\n);\n\nMultiSelect.displayName = \"MultiSelect\";\n"],"mappings":";;;;;;;AA0CA,IAAa,cAAc,MAAM,YAE7B,EACE,SACA,OACA,UACA,cAAc,kBACd,YAAY,MACZ,mBAAmB,GACnB,iBACA,aACA,cAAc,OACd,YAAY,OACZ,cAAc,GACd,iBAAiB,cACjB,eACA,WACA,WAAW,OACX,MACA,cAAc,WACd,mBAAmB,kBAErB,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,KAAK;CAC5C,MAAM,CAAC,OAAO,YAAY,MAAM,SAAmB,KAAK;CACxD,MAAM,YAAY,aAAa,OAAO,QAAQ;CAC9C,MAAM,mBAAmB,SAAmB;EAC1C,IAAI,WAAW,SAAS,IAAI;OACvB,IAAI,KAAK,UAAU,aAAa,SAAS,IAAI;CACpD;CACA,MAAM,cAAc,MAAM,cAAc,IAAI,IAAI,SAAS,GAAG,CAAC,SAAS,CAAC;CACvE,MAAM,kBAAkB,MAAM,cACtB,QAAQ,QAAQ,QAAQ,MAAM,SAAS,IAAI,KAAK,CAAC,GACvD,CAAC,SAAS,KAAK,CACjB;CAEA,MAAM,gBAAgB,MAAM,cACpB,QAAQ,QAAQ,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,KAAK,WAAW,OAAO,KAAK,GAC/E,CAAC,OAAO,CACV;CACA,MAAM,qBACJ,cAAc,SAAS,KAA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QAAa,eAAe;SAAE,SAAS,CAAC,GAAG,KAAK,CAAC;SAAG,QAAQ,KAAK;QAAG;kBAAG;OAAc,CAAA,GAC7H,oBAAC,UAAD;QAAQ,MAAK;QAAS,WAAW,4BAAO;QAAa,UAAU,UAAU,SAAS;QAAa,eAAe;SAC5G,SAAS,SAAS;SAClB,QAAQ,KAAK;QACf;kBAAG;OAAa,CAAA,CACb;WACH;KACyB;OACH,CAAA;GAC3B;;CACqB,CAAA;AAEhC,CACF;AAEA,YAAY,cAAc"}
package/dist/index28.cjs CHANGED
@@ -104,6 +104,7 @@ var MultiSelect = react.forwardRef(({ options, value, onChange, placeholder = "S
104
104
  className: require_multi_select_module.default.menu,
105
105
  style: contentMinWidth ? { "--uzi-multiselect-content-min-width": contentMinWidth } : void 0,
106
106
  sideOffset: 4,
107
+ collisionPadding: 8,
107
108
  align: "start",
108
109
  children: [
109
110
  bulkActions && enabledValues.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Item, {
@@ -1 +1 @@
1
- {"version":3,"file":"index28.cjs","names":[],"sources":["../src/components/multi-select/MultiSelect.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./multi-select.module.css\";\n\nexport type MultiSelectOption = {\n label: string;\n value: string;\n disabled?: boolean;\n /** Optional decorative leading visual. The label remains the accessible option name. */\n icon?: React.ReactElement;\n};\n\nexport type MultiSelectProps = {\n options: MultiSelectOption[];\n value: string[];\n onChange: (value: string[]) => void;\n placeholder?: string;\n fullWidth?: boolean;\n maxVisibleValues?: number;\n /** Minimum popup width, independent of the trigger (e.g. '24rem'). */\n contentMinWidth?: string;\n /** Formats the closed trigger text from the selected options, including an empty selection. */\n formatValue?: (selected: MultiSelectOption[]) => string;\n /** Shows Select all and Clear all actions. Bulk actions modify enabled options only. */\n bulkActions?: boolean;\n /** Stage changes until Apply. Cancel/dismiss discards the draft. */\n draftMode?: boolean;\n /** Minimum number of selected values required to apply; immediate mode blocks changes below this count. */\n minSelected?: number;\n selectAllLabel?: string;\n /** Label for clearing all enabled selections. Disabled selected options remain selected. */\n clearAllLabel?: string;\n className?: string;\n disabled?: boolean;\n name?: string;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n};\n\nexport const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(\n (\n {\n options,\n value,\n onChange,\n placeholder = \"Select options\",\n fullWidth = true,\n maxVisibleValues = 2,\n contentMinWidth,\n formatValue,\n bulkActions = false,\n draftMode = false,\n minSelected = 0,\n selectAllLabel = \"Select all\",\n clearAllLabel,\n className,\n disabled = false,\n name,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const [draft, setDraft] = React.useState<string[]>(value);\n const editValue = draftMode && open ? draft : value;\n const updateSelection = (next: string[]) => {\n if (draftMode) setDraft(next);\n else if (next.length >= minSelected) onChange(next);\n };\n const selectedSet = React.useMemo(() => new Set(editValue), [editValue]);\n const selectedOptions = React.useMemo(\n () => options.filter((opt) => value.includes(opt.value)),\n [options, value],\n );\n\n const enabledValues = React.useMemo(\n () => options.filter((option) => !option.disabled).map((option) => option.value),\n [options],\n );\n const allEnabledSelected =\n enabledValues.length > 0 && enabledValues.every((entry) => selectedSet.has(entry));\n const hasDisabledOptions = options.some((option) => option.disabled);\n const resolvedClearAllLabel =\n clearAllLabel ?? (hasDisabledOptions ? \"Clear enabled\" : \"Clear all\");\n\n const formattedValue = React.useMemo(\n () => formatValue?.(selectedOptions),\n [formatValue, selectedOptions],\n );\n\n const toggleValue = React.useCallback(\n (nextValue: string) => {\n if (selectedSet.has(nextValue)) {\n updateSelection(editValue.filter((entry) => entry !== nextValue));\n return;\n }\n\n updateSelection([...editValue, nextValue]);\n },\n [updateSelection, selectedSet, editValue],\n );\n\n const visibleCount = Math.max(1, maxVisibleValues);\n const visibleOptions = selectedOptions.slice(0, visibleCount);\n const overflowCount = Math.max(\n 0,\n selectedOptions.length - visibleOptions.length,\n );\n\n return (\n <DropdownMenuPrimitive.Root modal={false} open={open} onOpenChange={(next) => {\n setDraft([...value]);\n setOpen(next);\n }}>\n <div\n className={cx(\n styles.wrapper,\n fullWidth && styles.wrapperFullWidth,\n className,\n )}\n >\n <DropdownMenuPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n className={styles.trigger}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n disabled={disabled}\n >\n <span className={styles.value}>\n {formatValue ? (\n <span className={styles.summary}>{formattedValue}</span>\n ) : selectedOptions.length === 0 ? (\n <span className={styles.placeholder}>{placeholder}</span>\n ) : (\n <>\n {visibleOptions.map((option) => (\n <span key={option.value} className={styles.chip}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n ))}\n {overflowCount > 0 ? (\n <span className={cx(styles.chip, styles.chipSummary)}>\n +{overflowCount}\n </span>\n ) : null}\n </>\n )}\n </span>\n <span className={styles.chevron} aria-hidden=\"true\">\n <svg\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n >\n <path\n d=\"M2 3.5L5 6.5L8 3.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n </button>\n </DropdownMenuPrimitive.Trigger>\n\n {name\n ? value.map((entry) => (\n <input key={entry} type=\"hidden\" name={name} value={entry} />\n ))\n : null}\n\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n className={styles.menu}\n style={contentMinWidth ? { '--uzi-multiselect-content-min-width': contentMinWidth } as React.CSSProperties : undefined}\n sideOffset={4}\n align=\"start\"\n >\n {bulkActions && enabledValues.length > 0 ? (\n <>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={allEnabledSelected}\n onSelect={(event) => {\n event.preventDefault();\n updateSelection([...editValue, ...enabledValues.filter((entry) => !selectedSet.has(entry))]);\n }}\n >\n {selectAllLabel}\n </DropdownMenuPrimitive.Item>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={!enabledValues.some((entry) => selectedSet.has(entry))}\n onSelect={(event) => {\n event.preventDefault();\n const enabledSet = new Set(enabledValues);\n updateSelection(editValue.filter((entry) => !enabledSet.has(entry)));\n }}\n >\n {resolvedClearAllLabel}\n </DropdownMenuPrimitive.Item>\n </>\n ) : null}\n {bulkActions && enabledValues.length > 0 ? (\n <DropdownMenuPrimitive.Separator className={styles.separator} />\n ) : null}\n <div className={styles.optionsViewport}>\n {options.map((option) => {\n const selected = selectedSet.has(option.value);\n\n return (\n <DropdownMenuPrimitive.CheckboxItem\n key={option.value}\n className={cx(\n styles.option,\n selected && styles.optionSelected,\n option.disabled && styles.optionDisabled,\n )}\n checked={selected}\n disabled={option.disabled}\n onCheckedChange={() => toggleValue(option.value)}\n onSelect={(event) => event.preventDefault()}\n >\n <span\n className={cx(\n styles.indicator,\n selected && styles.indicatorSelected,\n option.disabled && styles.indicatorDisabled,\n )}\n aria-hidden=\"true\"\n >\n <DropdownMenuPrimitive.ItemIndicator forceMount>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 8.5 6.5 11.5 12.5 4.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n <span className={styles.optionLabel}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n </DropdownMenuPrimitive.CheckboxItem>\n );\n })}\n </div>\n {draftMode ? (\n <div className={styles.draftActions}>\n <button type=\"button\" className={styles.draftButton} onClick={() => { setDraft([...value]); setOpen(false); }}>Cancel</button>\n <button type=\"button\" className={styles.draftButton} disabled={editValue.length < minSelected} onClick={() => {\n onChange(editValue);\n setOpen(false);\n }}>Apply</button>\n </div>\n ) : null}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n </div>\n </DropdownMenuPrimitive.Root>\n );\n },\n);\n\nMultiSelect.displayName = \"MultiSelect\";\n"],"mappings":";;;;;;;;;;AA0CA,IAAa,cAAc,MAAM,YAE7B,EACE,SACA,OACA,UACA,cAAc,kBACd,YAAY,MACZ,mBAAmB,GACnB,iBACA,aACA,cAAc,OACd,YAAY,OACZ,cAAc,GACd,iBAAiB,cACjB,eACA,WACA,WAAW,OACX,MACA,cAAc,WACd,mBAAmB,kBAErB,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,KAAK;CAC5C,MAAM,CAAC,OAAO,YAAY,MAAM,SAAmB,KAAK;CACxD,MAAM,YAAY,aAAa,OAAO,QAAQ;CAC9C,MAAM,mBAAmB,SAAmB;EAC1C,IAAI,WAAW,SAAS,IAAI;OACvB,IAAI,KAAK,UAAU,aAAa,SAAS,IAAI;CACpD;CACA,MAAM,cAAc,MAAM,cAAc,IAAI,IAAI,SAAS,GAAG,CAAC,SAAS,CAAC;CACvE,MAAM,kBAAkB,MAAM,cACtB,QAAQ,QAAQ,QAAQ,MAAM,SAAS,IAAI,KAAK,CAAC,GACvD,CAAC,SAAS,KAAK,CACjB;CAEA,MAAM,gBAAgB,MAAM,cACpB,QAAQ,QAAQ,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,KAAK,WAAW,OAAO,KAAK,GAC/E,CAAC,OAAO,CACV;CACA,MAAM,qBACJ,cAAc,SAAS,KAAK,cAAc,OAAO,UAAU,YAAY,IAAI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AA;GAC3B;;CACqB,CAAA;AAEhC,CACF;AAEA,YAAY,cAAc"}
1
+ {"version":3,"file":"index28.cjs","names":[],"sources":["../src/components/multi-select/MultiSelect.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./multi-select.module.css\";\n\nexport type MultiSelectOption = {\n label: string;\n value: string;\n disabled?: boolean;\n /** Optional decorative leading visual. The label remains the accessible option name. */\n icon?: React.ReactElement;\n};\n\nexport type MultiSelectProps = {\n options: MultiSelectOption[];\n value: string[];\n onChange: (value: string[]) => void;\n placeholder?: string;\n fullWidth?: boolean;\n maxVisibleValues?: number;\n /** Minimum popup width, independent of the trigger (e.g. '24rem'). */\n contentMinWidth?: string;\n /** Formats the closed trigger text from the selected options, including an empty selection. */\n formatValue?: (selected: MultiSelectOption[]) => string;\n /** Shows Select all and Clear all actions. Bulk actions modify enabled options only. */\n bulkActions?: boolean;\n /** Stage changes until Apply. Cancel/dismiss discards the draft. */\n draftMode?: boolean;\n /** Minimum number of selected values required to apply; immediate mode blocks changes below this count. */\n minSelected?: number;\n selectAllLabel?: string;\n /** Label for clearing all enabled selections. Disabled selected options remain selected. */\n clearAllLabel?: string;\n className?: string;\n disabled?: boolean;\n name?: string;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n};\n\nexport const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(\n (\n {\n options,\n value,\n onChange,\n placeholder = \"Select options\",\n fullWidth = true,\n maxVisibleValues = 2,\n contentMinWidth,\n formatValue,\n bulkActions = false,\n draftMode = false,\n minSelected = 0,\n selectAllLabel = \"Select all\",\n clearAllLabel,\n className,\n disabled = false,\n name,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const [draft, setDraft] = React.useState<string[]>(value);\n const editValue = draftMode && open ? draft : value;\n const updateSelection = (next: string[]) => {\n if (draftMode) setDraft(next);\n else if (next.length >= minSelected) onChange(next);\n };\n const selectedSet = React.useMemo(() => new Set(editValue), [editValue]);\n const selectedOptions = React.useMemo(\n () => options.filter((opt) => value.includes(opt.value)),\n [options, value],\n );\n\n const enabledValues = React.useMemo(\n () => options.filter((option) => !option.disabled).map((option) => option.value),\n [options],\n );\n const allEnabledSelected =\n enabledValues.length > 0 && enabledValues.every((entry) => selectedSet.has(entry));\n const hasDisabledOptions = options.some((option) => option.disabled);\n const resolvedClearAllLabel =\n clearAllLabel ?? (hasDisabledOptions ? \"Clear enabled\" : \"Clear all\");\n\n const formattedValue = React.useMemo(\n () => formatValue?.(selectedOptions),\n [formatValue, selectedOptions],\n );\n\n const toggleValue = React.useCallback(\n (nextValue: string) => {\n if (selectedSet.has(nextValue)) {\n updateSelection(editValue.filter((entry) => entry !== nextValue));\n return;\n }\n\n updateSelection([...editValue, nextValue]);\n },\n [updateSelection, selectedSet, editValue],\n );\n\n const visibleCount = Math.max(1, maxVisibleValues);\n const visibleOptions = selectedOptions.slice(0, visibleCount);\n const overflowCount = Math.max(\n 0,\n selectedOptions.length - visibleOptions.length,\n );\n\n return (\n <DropdownMenuPrimitive.Root modal={false} open={open} onOpenChange={(next) => {\n setDraft([...value]);\n setOpen(next);\n }}>\n <div\n className={cx(\n styles.wrapper,\n fullWidth && styles.wrapperFullWidth,\n className,\n )}\n >\n <DropdownMenuPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n className={styles.trigger}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n disabled={disabled}\n >\n <span className={styles.value}>\n {formatValue ? (\n <span className={styles.summary}>{formattedValue}</span>\n ) : selectedOptions.length === 0 ? (\n <span className={styles.placeholder}>{placeholder}</span>\n ) : (\n <>\n {visibleOptions.map((option) => (\n <span key={option.value} className={styles.chip}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n ))}\n {overflowCount > 0 ? (\n <span className={cx(styles.chip, styles.chipSummary)}>\n +{overflowCount}\n </span>\n ) : null}\n </>\n )}\n </span>\n <span className={styles.chevron} aria-hidden=\"true\">\n <svg\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n >\n <path\n d=\"M2 3.5L5 6.5L8 3.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n </button>\n </DropdownMenuPrimitive.Trigger>\n\n {name\n ? value.map((entry) => (\n <input key={entry} type=\"hidden\" name={name} value={entry} />\n ))\n : null}\n\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n className={styles.menu}\n style={contentMinWidth ? { '--uzi-multiselect-content-min-width': contentMinWidth } as React.CSSProperties : undefined}\n sideOffset={4}\n collisionPadding={8}\n align=\"start\"\n >\n {bulkActions && enabledValues.length > 0 ? (\n <>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={allEnabledSelected}\n onSelect={(event) => {\n event.preventDefault();\n updateSelection([...editValue, ...enabledValues.filter((entry) => !selectedSet.has(entry))]);\n }}\n >\n {selectAllLabel}\n </DropdownMenuPrimitive.Item>\n <DropdownMenuPrimitive.Item\n className={styles.bulkAction}\n disabled={!enabledValues.some((entry) => selectedSet.has(entry))}\n onSelect={(event) => {\n event.preventDefault();\n const enabledSet = new Set(enabledValues);\n updateSelection(editValue.filter((entry) => !enabledSet.has(entry)));\n }}\n >\n {resolvedClearAllLabel}\n </DropdownMenuPrimitive.Item>\n </>\n ) : null}\n {bulkActions && enabledValues.length > 0 ? (\n <DropdownMenuPrimitive.Separator className={styles.separator} />\n ) : null}\n <div className={styles.optionsViewport}>\n {options.map((option) => {\n const selected = selectedSet.has(option.value);\n\n return (\n <DropdownMenuPrimitive.CheckboxItem\n key={option.value}\n className={cx(\n styles.option,\n selected && styles.optionSelected,\n option.disabled && styles.optionDisabled,\n )}\n checked={selected}\n disabled={option.disabled}\n onCheckedChange={() => toggleValue(option.value)}\n onSelect={(event) => event.preventDefault()}\n >\n <span\n className={cx(\n styles.indicator,\n selected && styles.indicatorSelected,\n option.disabled && styles.indicatorDisabled,\n )}\n aria-hidden=\"true\"\n >\n <DropdownMenuPrimitive.ItemIndicator forceMount>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 8.5 6.5 11.5 12.5 4.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n <span className={styles.optionLabel}>\n {option.icon ? <span className={styles.optionIcon} aria-hidden=\"true\">{option.icon}</span> : null}\n {option.label}\n </span>\n </DropdownMenuPrimitive.CheckboxItem>\n );\n })}\n </div>\n {draftMode ? (\n <div className={styles.draftActions}>\n <button type=\"button\" className={styles.draftButton} onClick={() => { setDraft([...value]); setOpen(false); }}>Cancel</button>\n <button type=\"button\" className={styles.draftButton} disabled={editValue.length < minSelected} onClick={() => {\n onChange(editValue);\n setOpen(false);\n }}>Apply</button>\n </div>\n ) : null}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n </div>\n </DropdownMenuPrimitive.Root>\n );\n },\n);\n\nMultiSelect.displayName = \"MultiSelect\";\n"],"mappings":";;;;;;;;;;AA0CA,IAAa,cAAc,MAAM,YAE7B,EACE,SACA,OACA,UACA,cAAc,kBACd,YAAY,MACZ,mBAAmB,GACnB,iBACA,aACA,cAAc,OACd,YAAY,OACZ,cAAc,GACd,iBAAiB,cACjB,eACA,WACA,WAAW,OACX,MACA,cAAc,WACd,mBAAmB,kBAErB,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,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