loseta 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -8
- package/dist/commands/add.d.ts +8 -0
- package/dist/commands/add.js +60 -15
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/init.js +2 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/imports.d.ts +4 -0
- package/dist/imports.js +30 -2
- package/dist/imports.js.map +1 -1
- package/dist/install.d.ts +23 -3
- package/dist/install.js +84 -5
- package/dist/install.js.map +1 -1
- package/dist/style-switch.js +2 -1
- package/dist/style-switch.js.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/ui.js +4 -1
- package/dist/ui.js.map +1 -1
- package/package.json +4 -3
- package/registry/behaviors/code-block.js +106 -0
- package/registry/behaviors/combobox.js +237 -0
- package/registry/behaviors/command.js +105 -0
- package/registry/behaviors/core.js +302 -0
- package/registry/behaviors/dialog.js +97 -0
- package/registry/behaviors/listbox.js +135 -0
- package/registry/behaviors/menu.js +586 -0
- package/registry/behaviors/popover.js +127 -0
- package/registry/behaviors/select.js +196 -0
- package/registry/behaviors/tabs.js +95 -0
- package/registry/behaviors/toast.js +137 -0
- package/registry/components/badge.css +4 -7
- package/registry/components/breadcrumb.css +9 -1
- package/registry/components/calendar.css +39 -0
- package/registry/components/card.css +5 -0
- package/registry/components/code-block.css +19 -0
- package/registry/components/input-otp.css +103 -10
- package/registry/components/kbd.css +8 -0
- package/registry/components/native-select.css +6 -0
- package/registry/components/select.css +3 -0
- package/registry/components/tooltip.css +295 -144
- package/registry/examples/alert-dialog.html +21 -21
- package/registry/examples/badge.html +37 -0
- package/registry/examples/breadcrumb.html +86 -6
- package/registry/examples/button-group.html +3 -3
- package/registry/examples/calendar.html +687 -51
- package/registry/examples/card.html +190 -4
- package/registry/examples/code-block.html +10 -4
- package/registry/examples/combobox.html +2 -0
- package/registry/examples/command.html +17 -17
- package/registry/examples/context-menu.html +18 -18
- package/registry/examples/dialog.html +15 -15
- package/registry/examples/drawer.html +22 -22
- package/registry/examples/input-otp.html +116 -11
- package/registry/examples/kbd.html +90 -2
- package/registry/examples/native-select.html +83 -2
- package/registry/examples/select.html +206 -6
- package/registry/examples/sheet.html +23 -23
- package/registry/examples/sidebar.html +11 -11
- package/registry/examples/toast.html +11 -0
- package/registry/examples/tooltip.html +75 -70
- package/registry/primitives/dialog-shell.css +5 -0
- package/registry/primitives/menu.css +15 -3
- package/registry/registry.json +231 -9
- package/registry/schema.json +17 -0
- package/registry/styles/luma/badge.css +28 -0
- package/registry/styles/luma/breadcrumb.css +2 -1
- package/registry/styles/luma/calendar.css +62 -0
- package/registry/styles/luma/card.css +9 -27
- package/registry/styles/luma/input-otp.css +79 -36
- package/registry/styles/luma/native-select.css +9 -2
- package/registry/styles/luma/primitives/listbox.css +8 -0
- package/registry/styles/luma/select.css +7 -2
- package/registry/styles/luma/tooltip.css +29 -16
- package/registry/styles/lyra/badge.css +28 -0
- package/registry/styles/lyra/breadcrumb.css +2 -1
- package/registry/styles/lyra/calendar.css +62 -0
- package/registry/styles/lyra/card.css +9 -27
- package/registry/styles/lyra/input-otp.css +79 -36
- package/registry/styles/lyra/native-select.css +6 -1
- package/registry/styles/lyra/primitives/listbox.css +8 -0
- package/registry/styles/lyra/select.css +6 -1
- package/registry/styles/lyra/tooltip.css +29 -16
- package/registry/styles/maia/badge.css +29 -0
- package/registry/styles/maia/breadcrumb.css +2 -1
- package/registry/styles/maia/calendar.css +62 -0
- package/registry/styles/maia/card.css +9 -27
- package/registry/styles/maia/input-otp.css +79 -36
- package/registry/styles/maia/native-select.css +9 -2
- package/registry/styles/maia/primitives/listbox.css +8 -0
- package/registry/styles/maia/select.css +7 -2
- package/registry/styles/maia/tooltip.css +29 -16
- package/registry/styles/mira/badge.css +32 -0
- package/registry/styles/mira/breadcrumb.css +2 -1
- package/registry/styles/mira/calendar.css +62 -0
- package/registry/styles/mira/card.css +9 -27
- package/registry/styles/mira/input-otp.css +79 -36
- package/registry/styles/mira/native-select.css +7 -2
- package/registry/styles/mira/primitives/listbox.css +8 -0
- package/registry/styles/mira/select.css +7 -2
- package/registry/styles/mira/tooltip.css +29 -16
- package/registry/styles/nova/badge.css +28 -0
- package/registry/styles/nova/breadcrumb.css +2 -1
- package/registry/styles/nova/calendar.css +62 -0
- package/registry/styles/nova/card.css +9 -27
- package/registry/styles/nova/input-otp.css +79 -36
- package/registry/styles/nova/native-select.css +9 -2
- package/registry/styles/nova/primitives/listbox.css +8 -0
- package/registry/styles/nova/select.css +7 -2
- package/registry/styles/nova/tooltip.css +29 -16
- package/registry/styles/rhea/badge.css +28 -0
- package/registry/styles/rhea/breadcrumb.css +2 -1
- package/registry/styles/rhea/calendar.css +62 -0
- package/registry/styles/rhea/card.css +9 -27
- package/registry/styles/rhea/input-otp.css +79 -36
- package/registry/styles/rhea/native-select.css +9 -2
- package/registry/styles/rhea/primitives/listbox.css +8 -0
- package/registry/styles/rhea/select.css +7 -2
- package/registry/styles/rhea/tooltip.css +29 -16
- package/registry/styles/sera/badge.css +29 -1
- package/registry/styles/sera/breadcrumb.css +2 -1
- package/registry/styles/sera/calendar.css +66 -0
- package/registry/styles/sera/card.css +9 -27
- package/registry/styles/sera/input-otp.css +80 -37
- package/registry/styles/sera/native-select.css +9 -2
- package/registry/styles/sera/primitives/listbox.css +8 -0
- package/registry/styles/sera/select.css +7 -2
- package/registry/styles/sera/tooltip.css +29 -16
- package/registry/styles/vega/badge.css +28 -0
- package/registry/styles/vega/breadcrumb.css +2 -1
- package/registry/styles/vega/calendar.css +62 -0
- package/registry/styles/vega/card.css +9 -27
- package/registry/styles/vega/input-otp.css +79 -36
- package/registry/styles/vega/native-select.css +9 -2
- package/registry/styles/vega/primitives/listbox.css +8 -0
- package/registry/styles/vega/select.css +7 -2
- package/registry/styles/vega/tooltip.css +29 -16
|
@@ -3,16 +3,202 @@
|
|
|
3
3
|
<header data-separator="bottom">
|
|
4
4
|
<h3 data-slot="title">Create project</h3>
|
|
5
5
|
<p data-slot="description">Deploy your new project in one click.</p>
|
|
6
|
-
<a
|
|
6
|
+
<a data-slot="action" href="#">Docs</a>
|
|
7
7
|
</header>
|
|
8
8
|
<section>
|
|
9
9
|
<div class="field">
|
|
10
|
-
<label class="label" for="card-name">Name</label>
|
|
11
|
-
<input class="input" id="card-name" placeholder="My project">
|
|
10
|
+
<label class="label" for="demo-card-name">Name</label>
|
|
11
|
+
<input class="input" id="demo-card-name" placeholder="My project">
|
|
12
12
|
</div>
|
|
13
13
|
</section>
|
|
14
|
-
<footer style="
|
|
14
|
+
<footer style="justify-content: flex-end; gap: 0.5rem">
|
|
15
15
|
<button class="btn" data-variant="outline">Cancel</button>
|
|
16
16
|
<button class="btn">Create</button>
|
|
17
17
|
</footer>
|
|
18
18
|
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Login -->
|
|
21
|
+
<div class="card" style="max-width: 24rem">
|
|
22
|
+
<header>
|
|
23
|
+
<h3 data-slot="title">Login to your account</h3>
|
|
24
|
+
<p data-slot="description">Enter your email below to login to your account.</p>
|
|
25
|
+
<a data-slot="action" href="#">Sign up</a>
|
|
26
|
+
</header>
|
|
27
|
+
<section>
|
|
28
|
+
<div class="fieldset">
|
|
29
|
+
<div class="field">
|
|
30
|
+
<label class="label" for="demo-card-login-email">Email</label>
|
|
31
|
+
<input class="input" id="demo-card-login-email" type="email" autocomplete="email" placeholder="m@example.com" required>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="field">
|
|
34
|
+
<div style="display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem">
|
|
35
|
+
<label class="label" for="demo-card-login-password">Password</label>
|
|
36
|
+
<a href="#">Forgot your password?</a>
|
|
37
|
+
</div>
|
|
38
|
+
<input class="input" id="demo-card-login-password" type="password" autocomplete="current-password" required>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</section>
|
|
42
|
+
<footer style="flex-direction: column; align-items: stretch; gap: 0.5rem">
|
|
43
|
+
<button class="btn" type="button">Login</button>
|
|
44
|
+
<button class="btn" data-variant="outline" type="button">Login with Google</button>
|
|
45
|
+
</footer>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<!-- Small -->
|
|
49
|
+
<div class="card" data-size="sm" style="max-width: 20rem">
|
|
50
|
+
<header>
|
|
51
|
+
<h3 data-slot="title">Scheduled reports</h3>
|
|
52
|
+
<p data-slot="description">Weekly snapshots. No more manual exports.</p>
|
|
53
|
+
</header>
|
|
54
|
+
<section>
|
|
55
|
+
<ul style="display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none">
|
|
56
|
+
<li style="display: flex; align-items: flex-start; gap: 0.5rem">
|
|
57
|
+
<span style="flex-shrink: 0; color: var(--muted-foreground); padding-block-start: 0.125rem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="inline-size: 1rem; block-size: 1rem"><path d="m9 18 6-6-6-6"/></svg></span>
|
|
58
|
+
<span>Choose a schedule (daily or weekly).</span>
|
|
59
|
+
</li>
|
|
60
|
+
<li style="display: flex; align-items: flex-start; gap: 0.5rem">
|
|
61
|
+
<span style="flex-shrink: 0; color: var(--muted-foreground); padding-block-start: 0.125rem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="inline-size: 1rem; block-size: 1rem"><path d="m9 18 6-6-6-6"/></svg></span>
|
|
62
|
+
<span>Send to channels or specific teammates.</span>
|
|
63
|
+
</li>
|
|
64
|
+
<li style="display: flex; align-items: flex-start; gap: 0.5rem">
|
|
65
|
+
<span style="flex-shrink: 0; color: var(--muted-foreground); padding-block-start: 0.125rem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="inline-size: 1rem; block-size: 1rem"><path d="m9 18 6-6-6-6"/></svg></span>
|
|
66
|
+
<span>Include charts, tables, and key metrics.</span>
|
|
67
|
+
</li>
|
|
68
|
+
</ul>
|
|
69
|
+
</section>
|
|
70
|
+
<footer style="flex-direction: column; align-items: stretch; gap: 0.5rem">
|
|
71
|
+
<button class="btn" data-size="sm" type="button">Set up scheduled reports</button>
|
|
72
|
+
<button class="btn" data-variant="outline" data-size="sm" type="button">See what's new</button>
|
|
73
|
+
</footer>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- Image -->
|
|
77
|
+
<div class="card" style="max-width: 24rem">
|
|
78
|
+
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%23a5b4fc'/%3E%3Cstop offset='1' stop-color='%23f0abfc'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='320' height='180' fill='url(%23c)'/%3E%3Ccircle cx='256' cy='42' r='26' fill='%23ffffff' opacity='.65'/%3E%3Cpath d='M0 180 92 96l48 42 44-28 136 70z' fill='%236366f1' opacity='.35'/%3E%3Cpath d='M0 180 74 124l58 34 66-20 122 42z' fill='%234338ca' opacity='.35'/%3E%3C/svg%3E" alt="Abstract gradient cover with layered shapes" style="aspect-ratio: 16 / 9; object-fit: cover">
|
|
79
|
+
<header>
|
|
80
|
+
<span class="badge" data-variant="secondary" data-slot="action">Featured</span>
|
|
81
|
+
<h3 data-slot="title">Design systems meetup</h3>
|
|
82
|
+
<p data-slot="description">A practical talk on component APIs, accessibility, and shipping faster.</p>
|
|
83
|
+
</header>
|
|
84
|
+
<footer>
|
|
85
|
+
<button class="btn" type="button" style="inline-size: 100%">View event</button>
|
|
86
|
+
</footer>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<!-- Edge to edge -->
|
|
90
|
+
<div class="card" style="max-width: 24rem">
|
|
91
|
+
<header>
|
|
92
|
+
<h3 data-slot="title" id="demo-card-terms-title">Terms of service</h3>
|
|
93
|
+
<p data-slot="description">Review the terms before accepting the agreement.</p>
|
|
94
|
+
</header>
|
|
95
|
+
<section>
|
|
96
|
+
<div role="region" aria-labelledby="demo-card-terms-title" tabindex="0" style="max-height: 11rem; overflow-y: auto; margin-inline: calc(-1 * var(--card-spacing)); margin-block-end: calc(-1 * var(--card-spacing)); border-block-start: 1px solid var(--border); background-color: color-mix(in oklab, var(--muted) 50%, transparent); padding-block: 1rem; padding-inline: var(--card-spacing); line-height: 1.625">
|
|
97
|
+
<p>These terms govern your use of the workspace, including access to shared documents, project files, and collaboration tools.</p>
|
|
98
|
+
<p>You are responsible for the content you upload and for ensuring that your team has the appropriate permissions to view or edit it.</p>
|
|
99
|
+
<p>We may update features or limits as the service evolves. When those changes materially affect your workflow, we will notify your workspace administrators.</p>
|
|
100
|
+
<p>By continuing, you agree to keep your account credentials secure and to follow your organization's acceptable use policies.</p>
|
|
101
|
+
</div>
|
|
102
|
+
</section>
|
|
103
|
+
<footer style="justify-content: flex-end; gap: 0.5rem">
|
|
104
|
+
<button class="btn" data-variant="outline">Decline</button>
|
|
105
|
+
<button class="btn">Accept</button>
|
|
106
|
+
</footer>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!-- Spacing -->
|
|
110
|
+
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: start; gap: 1rem">
|
|
111
|
+
<div class="card" style="--card-spacing: 1rem">
|
|
112
|
+
<header>
|
|
113
|
+
<h3 data-slot="title">16px</h3>
|
|
114
|
+
<p data-slot="description">Compact spacing.</p>
|
|
115
|
+
</header>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="card" style="--card-spacing: 1.5rem">
|
|
118
|
+
<header>
|
|
119
|
+
<h3 data-slot="title">24px</h3>
|
|
120
|
+
<p data-slot="description">Comfortable spacing.</p>
|
|
121
|
+
</header>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="card" style="--card-spacing: 2rem">
|
|
124
|
+
<header>
|
|
125
|
+
<h3 data-slot="title">32px</h3>
|
|
126
|
+
<p data-slot="description">Roomy spacing.</p>
|
|
127
|
+
</header>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<!-- Accordion -->
|
|
132
|
+
<div class="card" style="max-width: 24rem">
|
|
133
|
+
<header>
|
|
134
|
+
<h3 data-slot="title">Subscription & billing</h3>
|
|
135
|
+
<p data-slot="description">Common questions about your account, plans, payments and cancellations.</p>
|
|
136
|
+
</header>
|
|
137
|
+
<section>
|
|
138
|
+
<div class="accordion">
|
|
139
|
+
<details open>
|
|
140
|
+
<summary>
|
|
141
|
+
What subscription plans do you offer?
|
|
142
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
|
|
143
|
+
</summary>
|
|
144
|
+
<div>
|
|
145
|
+
<p>We offer three tiers: Starter, Professional and Enterprise. Each plan includes increasing storage limits, API access, priority support and team collaboration features.</p>
|
|
146
|
+
</div>
|
|
147
|
+
</details>
|
|
148
|
+
<details>
|
|
149
|
+
<summary>
|
|
150
|
+
How does billing work?
|
|
151
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
|
|
152
|
+
</summary>
|
|
153
|
+
<div>
|
|
154
|
+
<p>Billing occurs automatically at the start of each cycle. You receive an invoice by email after each payment.</p>
|
|
155
|
+
</div>
|
|
156
|
+
</details>
|
|
157
|
+
<details>
|
|
158
|
+
<summary>
|
|
159
|
+
How do I cancel my subscription?
|
|
160
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
|
|
161
|
+
</summary>
|
|
162
|
+
<div>
|
|
163
|
+
<p>Cancel any time from your account settings. Access continues until the end of the current billing period.</p>
|
|
164
|
+
</div>
|
|
165
|
+
</details>
|
|
166
|
+
</div>
|
|
167
|
+
</section>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<!-- Skeleton -->
|
|
171
|
+
<div class="card" aria-busy="true" style="inline-size: 100%; max-width: 20rem">
|
|
172
|
+
<span class="sr-only">Loading project</span>
|
|
173
|
+
<header>
|
|
174
|
+
<div class="skeleton" style="block-size: 1rem; inline-size: 66%"></div>
|
|
175
|
+
<div class="skeleton" style="block-size: 1rem; inline-size: 50%"></div>
|
|
176
|
+
</header>
|
|
177
|
+
<section>
|
|
178
|
+
<div class="skeleton" style="aspect-ratio: 16 / 9; inline-size: 100%"></div>
|
|
179
|
+
</section>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
<!-- Right-to-left -->
|
|
183
|
+
<div class="card" dir="rtl" lang="ar" style="max-width: 24rem">
|
|
184
|
+
<header>
|
|
185
|
+
<h3 data-slot="title">تسجيل الدخول إلى حسابك</h3>
|
|
186
|
+
<p data-slot="description">أدخل بريدك الإلكتروني أدناه لتسجيل الدخول إلى حسابك.</p>
|
|
187
|
+
<a data-slot="action" href="#">إنشاء حساب</a>
|
|
188
|
+
</header>
|
|
189
|
+
<section>
|
|
190
|
+
<div class="fieldset">
|
|
191
|
+
<div class="field">
|
|
192
|
+
<label class="label" for="demo-card-rtl-email">البريد الإلكتروني</label>
|
|
193
|
+
<input class="input" id="demo-card-rtl-email" type="email" dir="ltr" placeholder="m@example.com">
|
|
194
|
+
</div>
|
|
195
|
+
<div class="field">
|
|
196
|
+
<label class="label" for="demo-card-rtl-password">كلمة المرور</label>
|
|
197
|
+
<input class="input" id="demo-card-rtl-password" type="password" dir="ltr">
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</section>
|
|
201
|
+
<footer>
|
|
202
|
+
<button class="btn" type="button" style="inline-size: 100%">تسجيل الدخول</button>
|
|
203
|
+
</footer>
|
|
204
|
+
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<header>
|
|
9
9
|
<span data-slot="title">app/api/chat/route.ts</span>
|
|
10
10
|
<div data-slot="actions">
|
|
11
|
-
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></button>
|
|
11
|
+
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" data-slot="copy" aria-label="Copy code"><span data-slot="copy-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></span><span data-slot="check-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span></button>
|
|
12
12
|
</div>
|
|
13
13
|
</header>
|
|
14
14
|
<pre dir="ltr" tabindex="0"><code>import { streamText } from "ai";
|
|
@@ -28,6 +28,9 @@ export async function POST(request: Request) {
|
|
|
28
28
|
<div class="code-block">
|
|
29
29
|
<header>
|
|
30
30
|
<span data-slot="title">app/dashboard/page.tsx</span>
|
|
31
|
+
<div data-slot="actions">
|
|
32
|
+
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" data-slot="copy" aria-label="Copy code"><span data-slot="copy-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></span><span data-slot="check-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span></button>
|
|
33
|
+
</div>
|
|
31
34
|
</header>
|
|
32
35
|
<pre data-line-numbers style="--line-start: 12" dir="ltr" tabindex="0"><code><span data-slot="line"><span data-slot="line-content"> if (!session) {</span></span>
|
|
33
36
|
<span data-slot="line"><span data-slot="line-content"> redirect("/login");</span></span>
|
|
@@ -45,6 +48,9 @@ export async function POST(request: Request) {
|
|
|
45
48
|
<div class="code-block">
|
|
46
49
|
<header>
|
|
47
50
|
<span data-slot="title">components/greeting.tsx</span>
|
|
51
|
+
<div data-slot="actions">
|
|
52
|
+
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" data-slot="copy" aria-label="Copy code"><span data-slot="copy-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></span><span data-slot="check-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span></button>
|
|
53
|
+
</div>
|
|
48
54
|
</header>
|
|
49
55
|
<pre dir="ltr" tabindex="0"><code><span data-slot="line"><span data-slot="line-content">export function Greeting({ name }: { name: string }) {</span></span>
|
|
50
56
|
<span data-slot="line"><span data-slot="line-content"> return <p>Hello, {name}</p>;</span></span>
|
|
@@ -59,8 +65,8 @@ export async function POST(request: Request) {
|
|
|
59
65
|
<header>
|
|
60
66
|
<span data-slot="title">Error</span>
|
|
61
67
|
<div data-slot="actions">
|
|
62
|
-
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" aria-label="Wrap lines" aria-pressed="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" x2="21" y1="6" y2="6"/><path d="M3 12h15a3 3 0 1 1 0 6h-4"/><polyline points="16 16 14 18 16 20"/><line x1="3" x2="10" y1="18" y2="18"/></svg></button>
|
|
63
|
-
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" aria-label="Copy output"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></button>
|
|
68
|
+
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" data-slot="wrap" aria-label="Wrap lines" aria-pressed="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" x2="21" y1="6" y2="6"/><path d="M3 12h15a3 3 0 1 1 0 6h-4"/><polyline points="16 16 14 18 16 20"/><line x1="3" x2="10" y1="18" y2="18"/></svg></button>
|
|
69
|
+
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" data-slot="copy" aria-label="Copy output"><span data-slot="copy-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></span><span data-slot="check-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span></button>
|
|
64
70
|
</div>
|
|
65
71
|
</header>
|
|
66
72
|
<pre data-wrap dir="ltr" tabindex="0"><code>TypeError: The model "anthropic/claude-sonnet-4.5" returned an error: Request too large. The prompt is 212,431 tokens but the context window is 200,000 tokens.</code></pre>
|
|
@@ -69,7 +75,7 @@ export async function POST(request: Request) {
|
|
|
69
75
|
<!-- Floating actions -->
|
|
70
76
|
<div class="code-block">
|
|
71
77
|
<div data-slot="actions">
|
|
72
|
-
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" aria-label="Copy output"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></button>
|
|
78
|
+
<button class="btn" data-variant="ghost" data-size="icon-xs" type="button" data-slot="copy" aria-label="Copy output"><span data-slot="copy-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg></span><span data-slot="check-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span></button>
|
|
73
79
|
</div>
|
|
74
80
|
<pre dir="ltr" tabindex="0"><code>$ pnpm add ai @ai-sdk/react zod
|
|
75
81
|
Packages: +14
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!-- Default -->
|
|
2
2
|
<div class="combobox">
|
|
3
3
|
<input role="combobox" aria-expanded="false" aria-controls="combobox-default-panel" aria-autocomplete="list" placeholder="Select a framework..." aria-label="Select a framework">
|
|
4
|
+
<input type="hidden" data-slot="input" name="value">
|
|
4
5
|
<div data-popover data-side="bottom" aria-hidden="true" id="combobox-default-panel">
|
|
5
6
|
<div role="listbox" aria-label="Frameworks">
|
|
6
7
|
<div role="option" aria-selected="false"><span data-slot="text">React</span></div>
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
<!-- Single -->
|
|
15
16
|
<div class="combobox">
|
|
16
17
|
<input role="combobox" aria-expanded="false" aria-controls="combobox-fruit-panel" aria-autocomplete="list" placeholder="Search fruit..." aria-label="Search fruit">
|
|
18
|
+
<input type="hidden" data-slot="input" name="value">
|
|
17
19
|
<button type="button" class="btn" data-variant="ghost" data-size="icon-xs" data-slot="clear" aria-label="Clear">×</button>
|
|
18
20
|
<div data-popover data-side="bottom" aria-hidden="true" id="combobox-fruit-panel">
|
|
19
21
|
<div role="listbox" aria-label="Fruit">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Default -->
|
|
2
2
|
<div class="command" style="width: 100%; max-width: 24rem">
|
|
3
3
|
<div class="input-group" role="group" aria-label="Search commands">
|
|
4
|
-
<input class="input" type="text" placeholder="Type a command..." aria-label="Search commands">
|
|
4
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-1" aria-expanded="true" aria-autocomplete="list" placeholder="Type a command..." aria-label="Search commands">
|
|
5
5
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
6
6
|
</div>
|
|
7
|
-
<div role="listbox" aria-label="Commands">
|
|
7
|
+
<div role="listbox" id="demo-command-listbox-1" aria-label="Commands">
|
|
8
8
|
<div role="group" aria-labelledby="demo-command-default-suggestions">
|
|
9
9
|
<div data-slot="label" id="demo-command-default-suggestions">Suggestions</div>
|
|
10
10
|
<div role="option">
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
47
|
<!-- Dialog -->
|
|
48
|
-
<button type="button" class="btn" data-variant="outline">
|
|
48
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-command">
|
|
49
49
|
Open command
|
|
50
50
|
</button>
|
|
51
51
|
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
<section>
|
|
59
59
|
<div class="command">
|
|
60
60
|
<div class="input-group" role="group" aria-label="Search commands">
|
|
61
|
-
<input class="input" type="text" placeholder="Type a command..." aria-label="Search commands" autofocus>
|
|
61
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-2" aria-expanded="true" aria-autocomplete="list" placeholder="Type a command..." aria-label="Search commands" autofocus>
|
|
62
62
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
63
63
|
</div>
|
|
64
|
-
<div role="listbox" aria-label="Commands">
|
|
64
|
+
<div role="listbox" id="demo-command-listbox-2" aria-label="Commands">
|
|
65
65
|
<div role="group" aria-labelledby="command-group-navigation">
|
|
66
66
|
<div data-slot="label" id="command-group-navigation">Navigation</div>
|
|
67
67
|
<div role="option">
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
</dialog>
|
|
120
120
|
|
|
121
121
|
<!-- Shortcuts -->
|
|
122
|
-
<button type="button" class="btn" data-variant="outline">
|
|
122
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-command-shortcuts">
|
|
123
123
|
Open shortcuts
|
|
124
124
|
</button>
|
|
125
125
|
|
|
@@ -132,10 +132,10 @@
|
|
|
132
132
|
<section>
|
|
133
133
|
<div class="command">
|
|
134
134
|
<div class="input-group" role="group" aria-label="Search shortcuts">
|
|
135
|
-
<input class="input" type="text" placeholder="Search shortcuts..." aria-label="Search shortcuts" autofocus>
|
|
135
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-3" aria-expanded="true" aria-autocomplete="list" placeholder="Search shortcuts..." aria-label="Search shortcuts" autofocus>
|
|
136
136
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
137
137
|
</div>
|
|
138
|
-
<div role="listbox" aria-label="Shortcuts">
|
|
138
|
+
<div role="listbox" id="demo-command-listbox-3" aria-label="Shortcuts">
|
|
139
139
|
<div role="group" aria-labelledby="command-shortcuts-navigation">
|
|
140
140
|
<div data-slot="label" id="command-shortcuts-navigation">Navigation</div>
|
|
141
141
|
<div role="option">
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
</dialog>
|
|
180
180
|
|
|
181
181
|
<!-- Scrollable -->
|
|
182
|
-
<button type="button" class="btn" data-variant="outline">
|
|
182
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-command-scrollable">
|
|
183
183
|
Open all commands
|
|
184
184
|
</button>
|
|
185
185
|
|
|
@@ -192,10 +192,10 @@
|
|
|
192
192
|
<section>
|
|
193
193
|
<div class="command">
|
|
194
194
|
<div class="input-group" role="group" aria-label="Search commands">
|
|
195
|
-
<input class="input" type="text" placeholder="Type a command..." aria-label="Search commands" autofocus>
|
|
195
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-4" aria-expanded="true" aria-autocomplete="list" placeholder="Type a command..." aria-label="Search commands" autofocus>
|
|
196
196
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
197
197
|
</div>
|
|
198
|
-
<div role="listbox" aria-label="Commands">
|
|
198
|
+
<div role="listbox" id="demo-command-listbox-4" aria-label="Commands">
|
|
199
199
|
<div role="group" aria-labelledby="command-scrollable-navigation">
|
|
200
200
|
<div data-slot="label" id="command-scrollable-navigation">Navigation</div>
|
|
201
201
|
<div role="option"><span data-slot="text">Go home</span><span data-slot="shortcut">⌘H</span></div>
|
|
@@ -246,10 +246,10 @@
|
|
|
246
246
|
<section>
|
|
247
247
|
<div class="command">
|
|
248
248
|
<div class="input-group" role="group" aria-label="Search commands">
|
|
249
|
-
<input class="input" type="text" placeholder="Type a command..." aria-label="Search commands">
|
|
249
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-5" aria-expanded="true" aria-autocomplete="list" placeholder="Type a command..." aria-label="Search commands">
|
|
250
250
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
251
251
|
</div>
|
|
252
|
-
<div role="listbox" aria-label="Commands">
|
|
252
|
+
<div role="listbox" id="demo-command-listbox-5" aria-label="Commands">
|
|
253
253
|
<div role="group" aria-labelledby="command-card-files">
|
|
254
254
|
<div data-slot="label" id="command-card-files">Files</div>
|
|
255
255
|
<div role="option">
|
|
@@ -294,10 +294,10 @@
|
|
|
294
294
|
</header>
|
|
295
295
|
<div class="command">
|
|
296
296
|
<div class="input-group" role="group" aria-label="Search commands">
|
|
297
|
-
<input class="input" type="text" placeholder="Type a command..." aria-label="Search commands">
|
|
297
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-6" aria-expanded="true" aria-autocomplete="list" placeholder="Type a command..." aria-label="Search commands">
|
|
298
298
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
299
299
|
</div>
|
|
300
|
-
<div role="listbox" aria-label="Commands">
|
|
300
|
+
<div role="listbox" id="demo-command-listbox-6" aria-label="Commands">
|
|
301
301
|
<div role="group" aria-labelledby="command-popover-files">
|
|
302
302
|
<div data-slot="label" id="command-popover-files">Files</div>
|
|
303
303
|
<div role="option">
|
|
@@ -329,10 +329,10 @@
|
|
|
329
329
|
<div dir="rtl" lang="ar" style="width: 100%; max-width: 24rem">
|
|
330
330
|
<div class="command">
|
|
331
331
|
<div class="input-group" role="group" aria-label="ابحث عن الأوامر">
|
|
332
|
-
<input class="input" type="text" placeholder="اكتب أمرًا..." aria-label="ابحث عن الأوامر">
|
|
332
|
+
<input class="input" type="text" role="combobox" aria-controls="demo-command-listbox-7" aria-expanded="true" aria-autocomplete="list" placeholder="اكتب أمرًا..." aria-label="ابحث عن الأوامر">
|
|
333
333
|
<span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
|
|
334
334
|
</div>
|
|
335
|
-
<div role="listbox" aria-label="الأوامر">
|
|
335
|
+
<div role="listbox" id="demo-command-listbox-7" aria-label="الأوامر">
|
|
336
336
|
<div role="group" aria-labelledby="command-rtl-suggestions">
|
|
337
337
|
<div data-slot="label" id="command-rtl-suggestions">اقتراحات</div>
|
|
338
338
|
<div role="option">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Default -->
|
|
2
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
2
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-1" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
3
3
|
<p>Right-click anywhere in this area.</p>
|
|
4
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
4
|
+
<div class="context-menu" id="demo-context-1" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
5
5
|
<button type="button" role="menuitem">Profile</button>
|
|
6
6
|
<button type="button" role="menuitem">Billing</button>
|
|
7
7
|
<button type="button" role="menuitem">Team</button>
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
12
|
<!-- Submenu -->
|
|
13
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
13
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-2" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
14
14
|
<p>Right-click anywhere in this area.</p>
|
|
15
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
15
|
+
<div class="context-menu" id="demo-context-2" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
16
16
|
<button type="button" role="menuitem">Copy <span data-slot="shortcut">⌘C</span></button>
|
|
17
17
|
<button type="button" role="menuitem">Cut <span data-slot="shortcut">⌘X</span></button>
|
|
18
18
|
<div role="none">
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<!-- Shortcuts -->
|
|
39
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
39
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-3" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
40
40
|
<p>Right-click anywhere in this area.</p>
|
|
41
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
41
|
+
<div class="context-menu" id="demo-context-3" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
42
42
|
<button type="button" role="menuitem">Back <span data-slot="shortcut">⌘[</span></button>
|
|
43
43
|
<button type="button" role="menuitem" disabled>Forward <span data-slot="shortcut">⌘]</span></button>
|
|
44
44
|
<button type="button" role="menuitem">Reload <span data-slot="shortcut">⌘R</span></button>
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
51
|
<!-- Groups -->
|
|
52
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
52
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-4" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
53
53
|
<p>Right-click anywhere in this area.</p>
|
|
54
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
54
|
+
<div class="context-menu" id="demo-context-4" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
55
55
|
<div role="group" aria-label="File">
|
|
56
56
|
<div role="heading" aria-level="2">File</div>
|
|
57
57
|
<button type="button" role="menuitem">New file <span data-slot="shortcut">⌘N</span></button>
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
</div>
|
|
77
77
|
|
|
78
78
|
<!-- Icons -->
|
|
79
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
79
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-5" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
80
80
|
<p>Right-click anywhere in this area.</p>
|
|
81
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
81
|
+
<div class="context-menu" id="demo-context-5" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
82
82
|
<button type="button" role="menuitem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg> Copy</button>
|
|
83
83
|
<button type="button" role="menuitem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/></svg> Cut</button>
|
|
84
84
|
<button type="button" role="menuitem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 11h4"/><path d="M12 16h4"/><path d="M8 11h.01"/><path d="M8 16h.01"/></svg> Paste</button>
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
</div>
|
|
89
89
|
|
|
90
90
|
<!-- Checkboxes -->
|
|
91
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
91
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-6" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
92
92
|
<p>Right-click anywhere in this area.</p>
|
|
93
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
93
|
+
<div class="context-menu" id="demo-context-6" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
94
94
|
<button type="button" role="menuitemcheckbox" aria-checked="true">
|
|
95
95
|
Show bookmarks bar
|
|
96
96
|
<span data-slot="indicator" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span>
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
109
|
<!-- Radio -->
|
|
110
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
110
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-7" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
111
111
|
<p>Right-click anywhere in this area.</p>
|
|
112
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
112
|
+
<div class="context-menu" id="demo-context-7" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
113
113
|
<div role="group" aria-label="People">
|
|
114
114
|
<div role="heading" aria-level="2">People</div>
|
|
115
115
|
<button type="button" role="menuitemradio" aria-checked="true">
|
|
@@ -141,9 +141,9 @@
|
|
|
141
141
|
</div>
|
|
142
142
|
|
|
143
143
|
<!-- Destructive -->
|
|
144
|
-
<div style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
144
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-8" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
145
145
|
<p>Right-click anywhere in this area.</p>
|
|
146
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
146
|
+
<div class="context-menu" id="demo-context-8" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
147
147
|
<button type="button" role="menuitem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></svg> Edit</button>
|
|
148
148
|
<button type="button" role="menuitem"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><polyline points="16 6 12 2 8 6"/><line x1="12" x2="12" y1="2" y2="15"/></svg> Share</button>
|
|
149
149
|
<div role="separator"></div>
|
|
@@ -152,9 +152,9 @@
|
|
|
152
152
|
</div>
|
|
153
153
|
|
|
154
154
|
<!-- Right-to-left -->
|
|
155
|
-
<div dir="rtl" lang="ar" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
155
|
+
<div tabindex="0" aria-haspopup="menu" aria-controls="demo-context-9" dir="rtl" lang="ar" style="display: grid; place-items: center; min-height: 10rem; border: 1px dashed var(--border); border-radius: var(--radius-lg)">
|
|
156
156
|
<p>انقر بزر الماوس الأيمن هنا.</p>
|
|
157
|
-
<div class="context-menu" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
157
|
+
<div class="context-menu" id="demo-context-9" role="menu" aria-hidden="true" style="--context-x: 0px; --context-y: 0px">
|
|
158
158
|
<button type="button" role="menuitem">رجوع <span data-slot="shortcut">⌘[</span></button>
|
|
159
159
|
<button type="button" role="menuitem" disabled>تقدم <span data-slot="shortcut">⌘]</span></button>
|
|
160
160
|
<button type="button" role="menuitem">إعادة تحميل <span data-slot="shortcut">⌘R</span></button>
|