loseta 0.17.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/code-block.css +19 -0
- package/registry/examples/alert-dialog.html +21 -21
- package/registry/examples/button-group.html +3 -3
- 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/select.html +7 -0
- package/registry/examples/sheet.html +23 -23
- package/registry/examples/sidebar.html +11 -11
- package/registry/examples/toast.html +11 -0
- package/registry/primitives/dialog-shell.css +5 -0
- package/registry/registry.json +196 -1
- package/registry/schema.json +17 -0
|
@@ -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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- Default -->
|
|
2
|
-
<button type="button" class="btn">Open dialog</button>
|
|
2
|
+
<button type="button" class="btn" data-open-dialog="demo-dialog-default">Open dialog</button>
|
|
3
3
|
|
|
4
4
|
<dialog class="dialog" id="demo-dialog-default" aria-labelledby="dialog-default-title" aria-describedby="dialog-default-description">
|
|
5
5
|
<div>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
</header>
|
|
12
12
|
<footer>
|
|
13
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
14
|
-
<button type="button" class="btn">Continue</button>
|
|
13
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
14
|
+
<button type="button" class="btn" data-close-dialog>Continue</button>
|
|
15
15
|
</footer>
|
|
16
16
|
<form method="dialog">
|
|
17
17
|
<button class="btn" data-variant="ghost" data-size="icon-sm" aria-label="Close"><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="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</dialog>
|
|
21
21
|
|
|
22
22
|
<!-- Edit profile -->
|
|
23
|
-
<button type="button" class="btn">Open profile dialog</button>
|
|
23
|
+
<button type="button" class="btn" data-open-dialog="demo-dialog">Open profile dialog</button>
|
|
24
24
|
|
|
25
25
|
<dialog class="dialog" id="demo-dialog" aria-labelledby="dialog-title" aria-describedby="dialog-description">
|
|
26
26
|
<div>
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
</div>
|
|
44
44
|
</section>
|
|
45
45
|
<footer>
|
|
46
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
47
|
-
<button type="button" class="btn">Save changes</button>
|
|
46
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
47
|
+
<button type="button" class="btn" data-close-dialog>Save changes</button>
|
|
48
48
|
</footer>
|
|
49
49
|
<form method="dialog">
|
|
50
50
|
<button class="btn" data-variant="ghost" data-size="icon-sm" aria-label="Close"><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="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</dialog>
|
|
54
54
|
|
|
55
55
|
<!-- Custom close button -->
|
|
56
|
-
<button type="button" class="btn" data-variant="outline">
|
|
56
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-dialog-close-button">
|
|
57
57
|
Open share dialog
|
|
58
58
|
</button>
|
|
59
59
|
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
</div>
|
|
73
73
|
</section>
|
|
74
74
|
<footer data-align="start">
|
|
75
|
-
<button type="button" class="btn" data-variant="outline">Close</button>
|
|
75
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Close</button>
|
|
76
76
|
</footer>
|
|
77
77
|
</div>
|
|
78
78
|
</dialog>
|
|
79
79
|
|
|
80
80
|
<!-- No close button -->
|
|
81
|
-
<button type="button" class="btn" data-variant="outline">
|
|
81
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-dialog-no-close">
|
|
82
82
|
Open dialog without close
|
|
83
83
|
</button>
|
|
84
84
|
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
</dialog>
|
|
95
95
|
|
|
96
96
|
<!-- Scrollable content -->
|
|
97
|
-
<button type="button" class="btn" data-variant="outline">
|
|
97
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-dialog-scrollable">
|
|
98
98
|
Open scrollable dialog
|
|
99
99
|
</button>
|
|
100
100
|
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
</dialog>
|
|
124
124
|
|
|
125
125
|
<!-- Sticky footer -->
|
|
126
|
-
<button type="button" class="btn" data-variant="outline">
|
|
126
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-dialog-sticky-footer">
|
|
127
127
|
Open sticky footer dialog
|
|
128
128
|
</button>
|
|
129
129
|
|
|
@@ -146,14 +146,14 @@
|
|
|
146
146
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
|
147
147
|
</section>
|
|
148
148
|
<footer>
|
|
149
|
-
<button type="button" class="btn" data-variant="outline">Close</button>
|
|
149
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Close</button>
|
|
150
150
|
</footer>
|
|
151
151
|
</div>
|
|
152
152
|
</dialog>
|
|
153
153
|
|
|
154
154
|
<!-- Right-to-left -->
|
|
155
155
|
<div dir="rtl" lang="ar" style="display: flex; flex-wrap: wrap; gap: 0.5rem">
|
|
156
|
-
<button type="button" class="btn">فتح الحوار</button>
|
|
156
|
+
<button type="button" class="btn" data-open-dialog="demo-dialog-rtl">فتح الحوار</button>
|
|
157
157
|
|
|
158
158
|
<dialog class="dialog" id="demo-dialog-rtl" aria-labelledby="dialog-rtl-title" aria-describedby="dialog-rtl-description">
|
|
159
159
|
<div>
|
|
@@ -176,8 +176,8 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
</section>
|
|
178
178
|
<footer>
|
|
179
|
-
<button type="button" class="btn" data-variant="outline">إلغاء</button>
|
|
180
|
-
<button type="button" class="btn">حفظ التغييرات</button>
|
|
179
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>إلغاء</button>
|
|
180
|
+
<button type="button" class="btn" data-close-dialog>حفظ التغييرات</button>
|
|
181
181
|
</footer>
|
|
182
182
|
<form method="dialog">
|
|
183
183
|
<button class="btn" data-variant="ghost" data-size="icon-sm" aria-label="إغلاق"><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="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- Default -->
|
|
2
|
-
<button type="button" class="btn" data-variant="outline">
|
|
2
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-default">
|
|
3
3
|
Open drawer
|
|
4
4
|
</button>
|
|
5
5
|
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</section>
|
|
25
25
|
<footer>
|
|
26
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
27
|
-
<button type="button" class="btn">Save changes</button>
|
|
26
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
27
|
+
<button type="button" class="btn" data-close-dialog>Save changes</button>
|
|
28
28
|
</footer>
|
|
29
29
|
</div>
|
|
30
30
|
</dialog>
|
|
31
31
|
|
|
32
32
|
<!-- Large -->
|
|
33
|
-
<button type="button" class="btn" data-variant="outline">
|
|
33
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-large">
|
|
34
34
|
Open large drawer
|
|
35
35
|
</button>
|
|
36
36
|
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
</section>
|
|
50
50
|
<footer>
|
|
51
|
-
<button type="button" class="btn" data-variant="outline">Reset</button>
|
|
52
|
-
<button type="button" class="btn">Apply</button>
|
|
51
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Reset</button>
|
|
52
|
+
<button type="button" class="btn" data-close-dialog>Apply</button>
|
|
53
53
|
</footer>
|
|
54
54
|
</div>
|
|
55
55
|
</dialog>
|
|
56
56
|
|
|
57
57
|
<!-- Small -->
|
|
58
|
-
<button type="button" class="btn" data-variant="outline">
|
|
58
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-small">
|
|
59
59
|
Open small drawer
|
|
60
60
|
</button>
|
|
61
61
|
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
<p>The small size keeps a short confirmation within reach.</p>
|
|
71
71
|
</section>
|
|
72
72
|
<footer>
|
|
73
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
74
|
-
<button type="button" class="btn">Confirm</button>
|
|
73
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
74
|
+
<button type="button" class="btn" data-close-dialog>Confirm</button>
|
|
75
75
|
</footer>
|
|
76
76
|
</div>
|
|
77
77
|
</dialog>
|
|
78
78
|
|
|
79
79
|
<!-- Top -->
|
|
80
|
-
<button type="button" class="btn" data-variant="outline">
|
|
80
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-top">
|
|
81
81
|
Open top drawer
|
|
82
82
|
</button>
|
|
83
83
|
|
|
@@ -91,14 +91,14 @@
|
|
|
91
91
|
<p>Use a top drawer for a short announcement or a wide filter bar.</p>
|
|
92
92
|
</section>
|
|
93
93
|
<footer>
|
|
94
|
-
<button type="button" class="btn" data-variant="outline">Close</button>
|
|
94
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Close</button>
|
|
95
95
|
</footer>
|
|
96
96
|
<span data-slot="handle" aria-hidden="true"></span>
|
|
97
97
|
</div>
|
|
98
98
|
</dialog>
|
|
99
99
|
|
|
100
100
|
<!-- Scrollable content -->
|
|
101
|
-
<button type="button" class="btn" data-variant="outline">
|
|
101
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-scrollable">
|
|
102
102
|
Open scrollable drawer
|
|
103
103
|
</button>
|
|
104
104
|
|
|
@@ -144,13 +144,13 @@
|
|
|
144
144
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
|
145
145
|
</section>
|
|
146
146
|
<footer>
|
|
147
|
-
<button type="button" class="btn" data-variant="outline">Close</button>
|
|
147
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Close</button>
|
|
148
148
|
</footer>
|
|
149
149
|
</div>
|
|
150
150
|
</dialog>
|
|
151
151
|
|
|
152
152
|
<!-- Nested -->
|
|
153
|
-
<button type="button" class="btn" data-variant="outline">
|
|
153
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-nested">
|
|
154
154
|
Open drawer
|
|
155
155
|
</button>
|
|
156
156
|
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
<p>The parent drawer stays mounted behind the nested drawer.</p>
|
|
166
166
|
</section>
|
|
167
167
|
<footer>
|
|
168
|
-
<button type="button" class="btn" data-variant="outline">Open nested drawer</button>
|
|
169
|
-
<button type="button" class="btn">Close</button>
|
|
168
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-nested-child">Open nested drawer</button>
|
|
169
|
+
<button type="button" class="btn" data-close-dialog>Close</button>
|
|
170
170
|
</footer>
|
|
171
171
|
<dialog class="drawer" id="demo-drawer-nested-child" data-side="block-end" aria-labelledby="drawer-nested-child-title" aria-describedby="drawer-nested-child-description">
|
|
172
172
|
<div>
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
<p>Close this drawer to return to the parent.</p>
|
|
180
180
|
</section>
|
|
181
181
|
<footer>
|
|
182
|
-
<button type="button" class="btn">Close</button>
|
|
182
|
+
<button type="button" class="btn" data-close-dialog>Close</button>
|
|
183
183
|
</footer>
|
|
184
184
|
</div>
|
|
185
185
|
</dialog>
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
</dialog>
|
|
188
188
|
|
|
189
189
|
<!-- Without handle -->
|
|
190
|
-
<button type="button" class="btn" data-variant="outline">
|
|
190
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-no-handle">
|
|
191
191
|
Open drawer without handle
|
|
192
192
|
</button>
|
|
193
193
|
|
|
@@ -201,14 +201,14 @@
|
|
|
201
201
|
<p>Use the footer actions or Escape to dismiss the drawer.</p>
|
|
202
202
|
</section>
|
|
203
203
|
<footer>
|
|
204
|
-
<button type="button" class="btn">Close</button>
|
|
204
|
+
<button type="button" class="btn" data-close-dialog>Close</button>
|
|
205
205
|
</footer>
|
|
206
206
|
</div>
|
|
207
207
|
</dialog>
|
|
208
208
|
|
|
209
209
|
<!-- Right-to-left -->
|
|
210
210
|
<div dir="rtl" lang="ar">
|
|
211
|
-
<button type="button" class="btn" data-variant="outline">
|
|
211
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-drawer-rtl">
|
|
212
212
|
فتح الدرج
|
|
213
213
|
</button>
|
|
214
214
|
|
|
@@ -226,8 +226,8 @@
|
|
|
226
226
|
</div>
|
|
227
227
|
</section>
|
|
228
228
|
<footer>
|
|
229
|
-
<button type="button" class="btn" data-variant="outline">إلغاء</button>
|
|
230
|
-
<button type="button" class="btn">حفظ التغييرات</button>
|
|
229
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>إلغاء</button>
|
|
230
|
+
<button type="button" class="btn" data-close-dialog>حفظ التغييرات</button>
|
|
231
231
|
</footer>
|
|
232
232
|
</div>
|
|
233
233
|
</dialog>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<!-- Default -->
|
|
2
2
|
<div class="select" style="max-width: 12rem">
|
|
3
|
+
<input type="hidden" data-slot="input" name="value">
|
|
3
4
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-default-panel" aria-label="Fruit">
|
|
4
5
|
<span data-slot="value" data-placeholder>Select a fruit</span>
|
|
5
6
|
<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>
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
|
|
28
29
|
<!-- Small, selected -->
|
|
29
30
|
<div class="select" data-size="sm" style="max-width: 12rem">
|
|
31
|
+
<input type="hidden" data-slot="input" name="value">
|
|
30
32
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-small-panel" aria-label="Fruit">
|
|
31
33
|
<span data-slot="value">Apple</span>
|
|
32
34
|
<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>
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
<div class="field" style="max-width: 20rem">
|
|
54
56
|
<label class="label" for="demo-select-groups-trigger">Food</label>
|
|
55
57
|
<div class="select" style="max-width: 12rem">
|
|
58
|
+
<input type="hidden" data-slot="input" name="value">
|
|
56
59
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-groups-panel" id="demo-select-groups-trigger">
|
|
57
60
|
<span data-slot="value" data-placeholder>Select a food</span>
|
|
58
61
|
<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>
|
|
@@ -99,6 +102,7 @@
|
|
|
99
102
|
<div class="field" style="max-width: 20rem">
|
|
100
103
|
<label class="label" for="demo-select-disabled-trigger">Fruit</label>
|
|
101
104
|
<div class="select" style="max-width: 12rem">
|
|
105
|
+
<input type="hidden" data-slot="input" name="value">
|
|
102
106
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-disabled-panel" id="demo-select-disabled-trigger" disabled>
|
|
103
107
|
<span data-slot="value">Apple</span>
|
|
104
108
|
<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>
|
|
@@ -127,6 +131,7 @@
|
|
|
127
131
|
<div class="field" style="max-width: 20rem">
|
|
128
132
|
<label class="label" for="demo-select-invalid-trigger">Fruit</label>
|
|
129
133
|
<div class="select" style="max-width: 12rem">
|
|
134
|
+
<input type="hidden" data-slot="input" name="value">
|
|
130
135
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-invalid-panel" aria-invalid="true" aria-describedby="demo-select-invalid-error" id="demo-select-invalid-trigger">
|
|
131
136
|
<span data-slot="value" data-placeholder>Select a fruit</span>
|
|
132
137
|
<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>
|
|
@@ -155,6 +160,7 @@
|
|
|
155
160
|
<div class="field" style="max-width: 16rem">
|
|
156
161
|
<label class="label" for="demo-select-scrollable-trigger">Timezone</label>
|
|
157
162
|
<div class="select">
|
|
163
|
+
<input type="hidden" data-slot="input" name="value">
|
|
158
164
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-scrollable-panel" id="demo-select-scrollable-trigger">
|
|
159
165
|
<span data-slot="value" data-placeholder>Select a timezone</span>
|
|
160
166
|
<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>
|
|
@@ -214,6 +220,7 @@
|
|
|
214
220
|
<div class="field" dir="rtl" lang="ar" style="max-width: 20rem">
|
|
215
221
|
<label class="label" for="demo-select-rtl-trigger">الفاكهة</label>
|
|
216
222
|
<div class="select" style="max-width: 12rem">
|
|
223
|
+
<input type="hidden" data-slot="input" name="value">
|
|
217
224
|
<button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="demo-select-rtl-panel" id="demo-select-rtl-trigger">
|
|
218
225
|
<span data-slot="value" data-placeholder>اختر فاكهة</span>
|
|
219
226
|
<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>
|