loseta 0.17.0 → 0.19.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 +37 -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/calendar.js +855 -0
- package/registry/behaviors/carousel.js +280 -0
- 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/hover-overlay.js +180 -0
- package/registry/behaviors/listbox.js +135 -0
- package/registry/behaviors/menu.js +586 -0
- package/registry/behaviors/message-scroller.js +147 -0
- package/registry/behaviors/popover.js +127 -0
- package/registry/behaviors/questionnaire.js +91 -0
- package/registry/behaviors/resizable.js +463 -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/carousel.css +1 -0
- package/registry/components/code-block.css +19 -0
- package/registry/components/hover-card.css +2 -2
- package/registry/components/resizable.css +49 -0
- package/registry/components/tooltip.css +4 -1
- package/registry/examples/alert-dialog.html +21 -21
- package/registry/examples/button-group.html +3 -3
- package/registry/examples/calendar.html +387 -326
- package/registry/examples/carousel.html +80 -2
- 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/questionnaire.html +2 -2
- package/registry/examples/resizable.html +88 -15
- 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 +280 -1
- package/registry/schema.json +17 -0
- package/registry/styles/luma/resizable.css +10 -0
- package/registry/styles/lyra/resizable.css +10 -0
- package/registry/styles/maia/resizable.css +10 -0
- package/registry/styles/mira/resizable.css +10 -0
- package/registry/styles/nova/resizable.css +10 -0
- package/registry/styles/rhea/resizable.css +10 -0
- package/registry/styles/sera/resizable.css +10 -0
- package/registry/styles/vega/resizable.css +10 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
emit,
|
|
5
|
+
firstEnabled,
|
|
6
|
+
init,
|
|
7
|
+
isDisabled,
|
|
8
|
+
lastEnabled,
|
|
9
|
+
nextEnabled,
|
|
10
|
+
on,
|
|
11
|
+
panelFor
|
|
12
|
+
} from "./core.js";
|
|
13
|
+
|
|
14
|
+
const TAB_SELECTOR = "[role='tab']";
|
|
15
|
+
|
|
16
|
+
/** @param {Element} tab */
|
|
17
|
+
function tablistOf(tab) {
|
|
18
|
+
const tablist = tab.closest("[role='tablist']");
|
|
19
|
+
return tablist instanceof HTMLElement ? tablist : null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** @param {Element} tablist */
|
|
23
|
+
function tabsOf(tablist) {
|
|
24
|
+
return [...tablist.querySelectorAll(TAB_SELECTOR)].filter(
|
|
25
|
+
(tab) => tab.closest("[role='tablist']") === tablist
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** @param {Element} tab */
|
|
30
|
+
function rootOf(tab) {
|
|
31
|
+
return tab.closest(".tabs") ?? tablistOf(tab) ?? tab;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @param {Element} tab
|
|
36
|
+
* @param {boolean} focus
|
|
37
|
+
*/
|
|
38
|
+
function selectTab(tab, focus) {
|
|
39
|
+
const tablist = tablistOf(tab);
|
|
40
|
+
if (!tablist) return;
|
|
41
|
+
|
|
42
|
+
const tabs = tabsOf(tablist);
|
|
43
|
+
for (const candidate of tabs) {
|
|
44
|
+
const selected = candidate === tab;
|
|
45
|
+
candidate.setAttribute("aria-selected", String(selected));
|
|
46
|
+
candidate.setAttribute("tabindex", selected ? "0" : "-1");
|
|
47
|
+
|
|
48
|
+
const panel = panelFor(candidate);
|
|
49
|
+
if (panel instanceof HTMLElement) {
|
|
50
|
+
panel.hidden = !selected;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
emit(rootOf(tab), "change", { value: tab.id });
|
|
55
|
+
if (focus && tab instanceof HTMLElement) tab.focus();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
on("click", ".tabs [role='tab']", (event, target) => {
|
|
59
|
+
if (!(target instanceof HTMLElement) || isDisabled(target)) return;
|
|
60
|
+
selectTab(target, false);
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
return true;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
on("keydown", ".tabs [role='tab']", (event, target) => {
|
|
66
|
+
if (!(event instanceof KeyboardEvent)) return;
|
|
67
|
+
if (!(target instanceof HTMLElement)) return;
|
|
68
|
+
const tablist = tablistOf(target);
|
|
69
|
+
if (!tablist) return;
|
|
70
|
+
|
|
71
|
+
const tabs = tabsOf(tablist);
|
|
72
|
+
const vertical = tablist.getAttribute("aria-orientation") === "vertical";
|
|
73
|
+
const nextKey = vertical ? "ArrowDown" : "ArrowRight";
|
|
74
|
+
const previousKey = vertical ? "ArrowUp" : "ArrowLeft";
|
|
75
|
+
|
|
76
|
+
if (event.key === nextKey || event.key === previousKey) {
|
|
77
|
+
const next = nextEnabled(
|
|
78
|
+
tabs,
|
|
79
|
+
target,
|
|
80
|
+
event.key === nextKey ? 1 : -1
|
|
81
|
+
);
|
|
82
|
+
if (next instanceof HTMLElement) selectTab(next, true);
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (event.key === "Home" || event.key === "End") {
|
|
88
|
+
const next = event.key === "Home" ? firstEnabled(tabs) : lastEnabled(tabs);
|
|
89
|
+
if (next instanceof HTMLElement) selectTab(next, true);
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
init();
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import { emit, init, on } from "./core.js";
|
|
4
|
+
|
|
5
|
+
const DEFAULT_DURATION = 5000;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {object} ToastState
|
|
9
|
+
* @property {number} duration
|
|
10
|
+
* @property {number} remaining
|
|
11
|
+
* @property {number} startedAt
|
|
12
|
+
* @property {number} timer
|
|
13
|
+
* @property {boolean} paused
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** @type {WeakMap<HTMLElement, ToastState>} */
|
|
17
|
+
const states = new WeakMap();
|
|
18
|
+
|
|
19
|
+
/** @param {Element} toast */
|
|
20
|
+
function durationOf(toast) {
|
|
21
|
+
const raw = toast.getAttribute("data-duration");
|
|
22
|
+
if (raw === null) return DEFAULT_DURATION;
|
|
23
|
+
const value = Number(raw);
|
|
24
|
+
return Number.isFinite(value) ? Math.max(0, value) : DEFAULT_DURATION;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** @param {HTMLElement} toast */
|
|
28
|
+
function startTimer(toast) {
|
|
29
|
+
const state = states.get(toast);
|
|
30
|
+
if (!state || state.duration === 0) return;
|
|
31
|
+
state.startedAt = Date.now();
|
|
32
|
+
state.paused = false;
|
|
33
|
+
state.timer = window.setTimeout(() => dismiss(toast, "timeout"), state.remaining);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** @param {HTMLElement} toast */
|
|
37
|
+
function arm(toast) {
|
|
38
|
+
if (states.has(toast) || toast.hasAttribute("hidden")) return;
|
|
39
|
+
const duration = durationOf(toast);
|
|
40
|
+
states.set(toast, {
|
|
41
|
+
duration,
|
|
42
|
+
remaining: duration,
|
|
43
|
+
startedAt: 0,
|
|
44
|
+
timer: 0,
|
|
45
|
+
paused: false
|
|
46
|
+
});
|
|
47
|
+
startTimer(toast);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @param {HTMLElement} toast */
|
|
51
|
+
function pause(toast) {
|
|
52
|
+
const state = states.get(toast);
|
|
53
|
+
if (!state || state.paused || state.duration === 0) return;
|
|
54
|
+
window.clearTimeout(state.timer);
|
|
55
|
+
state.remaining = Math.max(0, state.remaining - (Date.now() - state.startedAt));
|
|
56
|
+
state.paused = true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** @param {HTMLElement} toast */
|
|
60
|
+
function resume(toast) {
|
|
61
|
+
const state = states.get(toast);
|
|
62
|
+
if (!state || !state.paused || state.duration === 0) return;
|
|
63
|
+
startTimer(toast);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** @param {HTMLElement} toast @param {"timeout" | "close"} reason */
|
|
67
|
+
function dismiss(toast, reason) {
|
|
68
|
+
const state = states.get(toast);
|
|
69
|
+
if (state) {
|
|
70
|
+
window.clearTimeout(state.timer);
|
|
71
|
+
states.delete(toast);
|
|
72
|
+
}
|
|
73
|
+
toast.hidden = true;
|
|
74
|
+
emit(toast, "dismiss", { reason });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @param {ParentNode} root */
|
|
78
|
+
function armAll(root) {
|
|
79
|
+
for (const toast of root.querySelectorAll(".toast")) {
|
|
80
|
+
if (toast instanceof HTMLElement) arm(toast);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
on("click", ".toast [data-slot='close']", (event, target) => {
|
|
85
|
+
if (!(target instanceof HTMLElement)) return;
|
|
86
|
+
const toast = target.closest(".toast");
|
|
87
|
+
if (!(toast instanceof HTMLElement)) return;
|
|
88
|
+
dismiss(toast, "close");
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
return true;
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
on("pointerover", ".toast", (_event, target) => {
|
|
94
|
+
if (!(target instanceof HTMLElement)) return;
|
|
95
|
+
pause(target);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
on("pointerout", ".toast", (event, target) => {
|
|
99
|
+
if (!(target instanceof HTMLElement)) return;
|
|
100
|
+
const next = event instanceof PointerEvent ? event.relatedTarget : null;
|
|
101
|
+
if (next instanceof Node && target.contains(next)) return;
|
|
102
|
+
resume(target);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
on("focusin", ".toast", (_event, target) => {
|
|
106
|
+
if (!(target instanceof HTMLElement)) return;
|
|
107
|
+
pause(target);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
on("focusout", ".toast", (event, target) => {
|
|
111
|
+
if (!(target instanceof HTMLElement) || !(event instanceof FocusEvent)) return;
|
|
112
|
+
const next = event.relatedTarget;
|
|
113
|
+
if (next instanceof Node && target.contains(next)) return;
|
|
114
|
+
resume(target);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
init();
|
|
118
|
+
|
|
119
|
+
if (typeof document !== "undefined") {
|
|
120
|
+
const armExisting = () => armAll(document);
|
|
121
|
+
if (document.readyState === "loading") {
|
|
122
|
+
document.addEventListener("DOMContentLoaded", armExisting, { once: true });
|
|
123
|
+
} else {
|
|
124
|
+
armExisting();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const observer = new MutationObserver((records) => {
|
|
128
|
+
for (const record of records) {
|
|
129
|
+
for (const node of record.addedNodes) {
|
|
130
|
+
if (!(node instanceof Element)) continue;
|
|
131
|
+
if (node.matches(".toast")) arm(/** @type {HTMLElement} */ (node));
|
|
132
|
+
armAll(node);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
137
|
+
}
|
|
@@ -8,6 +8,25 @@
|
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
|
|
11
|
+
[data-slot='copy-icon'],
|
|
12
|
+
[data-slot='check-icon'] {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-slot='check-icon'] {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-slot='copy'][data-copied] {
|
|
21
|
+
[data-slot='copy-icon'] {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-slot='check-icon'] {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
11
30
|
> header {
|
|
12
31
|
display: flex;
|
|
13
32
|
min-width: 0;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
> [data-slot='handle'] {
|
|
21
21
|
position: relative;
|
|
22
|
+
z-index: 1;
|
|
22
23
|
display: flex;
|
|
23
24
|
flex: 0 0 0.5rem;
|
|
24
25
|
align-items: center;
|
|
@@ -37,6 +38,34 @@
|
|
|
37
38
|
height: 100%;
|
|
38
39
|
content: '';
|
|
39
40
|
}
|
|
41
|
+
|
|
42
|
+
/* Expand the pointer target without widening the visible separator. */
|
|
43
|
+
&::after {
|
|
44
|
+
position: absolute;
|
|
45
|
+
inset-block-start: 50%;
|
|
46
|
+
inset-inline-start: 50%;
|
|
47
|
+
inline-size: max(100%, 0.625rem);
|
|
48
|
+
block-size: 100%;
|
|
49
|
+
translate: -50% -50%;
|
|
50
|
+
content: '';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (pointer: coarse) {
|
|
54
|
+
&::after {
|
|
55
|
+
inline-size: max(100%, 1.25rem);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
> [data-slot='grip'] {
|
|
60
|
+
position: absolute;
|
|
61
|
+
inset-block: 0;
|
|
62
|
+
inset-inline: 0;
|
|
63
|
+
z-index: 1;
|
|
64
|
+
margin: auto;
|
|
65
|
+
block-size: 1.5rem;
|
|
66
|
+
inline-size: 0.25rem;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
40
69
|
}
|
|
41
70
|
|
|
42
71
|
&[data-orientation='vertical'] > [data-slot='handle'] {
|
|
@@ -46,6 +75,26 @@
|
|
|
46
75
|
width: 100%;
|
|
47
76
|
height: 1px;
|
|
48
77
|
}
|
|
78
|
+
|
|
79
|
+
&::after {
|
|
80
|
+
inline-size: 100%;
|
|
81
|
+
block-size: max(100%, 0.625rem);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (pointer: coarse) {
|
|
85
|
+
&::after {
|
|
86
|
+
block-size: max(100%, 1.25rem);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
> [data-slot='grip'] {
|
|
91
|
+
block-size: 0.25rem;
|
|
92
|
+
inline-size: 1.5rem;
|
|
93
|
+
}
|
|
49
94
|
}
|
|
50
95
|
}
|
|
96
|
+
|
|
97
|
+
.resizable .resizable {
|
|
98
|
+
--panel-size: initial;
|
|
99
|
+
}
|
|
51
100
|
}
|
|
@@ -53,7 +53,10 @@
|
|
|
53
53
|
&:is(
|
|
54
54
|
:has(> [data-slot='content']:not(:empty)),
|
|
55
55
|
:not(:has(> [data-slot='content']))[data-tooltip]:not([data-tooltip=''])
|
|
56
|
-
):
|
|
56
|
+
):not(:has(> [data-slot='content'][aria-hidden='true'])):is(
|
|
57
|
+
:hover,
|
|
58
|
+
:has(:focus-visible)
|
|
59
|
+
) {
|
|
57
60
|
&::before,
|
|
58
61
|
& > [data-slot='content'] {
|
|
59
62
|
visibility: visible;
|
|
@@ -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-alert-dialog-default">
|
|
3
3
|
Open alert dialog
|
|
4
4
|
</button>
|
|
5
5
|
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
</p>
|
|
13
13
|
</header>
|
|
14
14
|
<footer>
|
|
15
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
16
|
-
<button type="button" class="btn">Continue</button>
|
|
15
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
16
|
+
<button type="button" class="btn" data-close-dialog>Continue</button>
|
|
17
17
|
</footer>
|
|
18
18
|
</div>
|
|
19
19
|
</dialog>
|
|
20
20
|
|
|
21
21
|
<!-- Destructive -->
|
|
22
|
-
<button type="button" class="btn" data-variant="destructive">
|
|
22
|
+
<button type="button" class="btn" data-variant="destructive" data-open-dialog="demo-alert-dialog-destructive">
|
|
23
23
|
Delete chat
|
|
24
24
|
</button>
|
|
25
25
|
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
</p>
|
|
34
34
|
</header>
|
|
35
35
|
<footer>
|
|
36
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
37
|
-
<button type="button" class="btn" data-variant="destructive">Delete</button>
|
|
36
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
37
|
+
<button type="button" class="btn" data-variant="destructive" data-close-dialog>Delete</button>
|
|
38
38
|
</footer>
|
|
39
39
|
</div>
|
|
40
40
|
</dialog>
|
|
41
41
|
|
|
42
42
|
<!-- Small -->
|
|
43
|
-
<button type="button" class="btn" data-variant="outline">
|
|
43
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-alert-dialog-small">
|
|
44
44
|
Show small alert dialog
|
|
45
45
|
</button>
|
|
46
46
|
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
</p>
|
|
54
54
|
</header>
|
|
55
55
|
<footer>
|
|
56
|
-
<button type="button" class="btn" data-variant="outline">Don't allow</button>
|
|
57
|
-
<button type="button" class="btn">Allow</button>
|
|
56
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Don't allow</button>
|
|
57
|
+
<button type="button" class="btn" data-close-dialog>Allow</button>
|
|
58
58
|
</footer>
|
|
59
59
|
</div>
|
|
60
60
|
</dialog>
|
|
61
61
|
|
|
62
62
|
<!-- Media -->
|
|
63
|
-
<button type="button" class="btn" data-variant="outline">
|
|
63
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-alert-dialog-media">
|
|
64
64
|
Share project
|
|
65
65
|
</button>
|
|
66
66
|
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
</p>
|
|
75
75
|
</header>
|
|
76
76
|
<footer>
|
|
77
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
78
|
-
<button type="button" class="btn">Share</button>
|
|
77
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
78
|
+
<button type="button" class="btn" data-close-dialog>Share</button>
|
|
79
79
|
</footer>
|
|
80
80
|
</div>
|
|
81
81
|
</dialog>
|
|
82
82
|
|
|
83
83
|
<!-- Small with media -->
|
|
84
|
-
<button type="button" class="btn" data-variant="outline">
|
|
84
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-alert-dialog-small-media">
|
|
85
85
|
Show small media alert
|
|
86
86
|
</button>
|
|
87
87
|
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
</p>
|
|
96
96
|
</header>
|
|
97
97
|
<footer>
|
|
98
|
-
<button type="button" class="btn" data-variant="outline">Don't allow</button>
|
|
99
|
-
<button type="button" class="btn">Allow</button>
|
|
98
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Don't allow</button>
|
|
99
|
+
<button type="button" class="btn" data-close-dialog>Allow</button>
|
|
100
100
|
</footer>
|
|
101
101
|
</div>
|
|
102
102
|
</dialog>
|
|
103
103
|
|
|
104
104
|
<!-- With image -->
|
|
105
|
-
<button type="button" class="btn" data-variant="outline">
|
|
105
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-alert-dialog-image">
|
|
106
106
|
Remove teammate
|
|
107
107
|
</button>
|
|
108
108
|
|
|
@@ -116,15 +116,15 @@
|
|
|
116
116
|
</p>
|
|
117
117
|
</header>
|
|
118
118
|
<footer>
|
|
119
|
-
<button type="button" class="btn" data-variant="outline">Cancel</button>
|
|
120
|
-
<button type="button" class="btn" data-variant="destructive">Remove</button>
|
|
119
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>Cancel</button>
|
|
120
|
+
<button type="button" class="btn" data-variant="destructive" data-close-dialog>Remove</button>
|
|
121
121
|
</footer>
|
|
122
122
|
</div>
|
|
123
123
|
</dialog>
|
|
124
124
|
|
|
125
125
|
<!-- Right-to-left -->
|
|
126
126
|
<div dir="rtl" lang="ar" style="display: flex; flex-wrap: wrap; gap: 0.5rem">
|
|
127
|
-
<button type="button" class="btn" data-variant="outline">
|
|
127
|
+
<button type="button" class="btn" data-variant="outline" data-open-dialog="demo-alert-dialog-rtl">
|
|
128
128
|
إظهار الحوار
|
|
129
129
|
</button>
|
|
130
130
|
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
</p>
|
|
139
139
|
</header>
|
|
140
140
|
<footer>
|
|
141
|
-
<button type="button" class="btn" data-variant="outline">عدم السماح</button>
|
|
142
|
-
<button type="button" class="btn">السماح</button>
|
|
141
|
+
<button type="button" class="btn" data-variant="outline" data-close-dialog>عدم السماح</button>
|
|
142
|
+
<button type="button" class="btn" data-close-dialog>السماح</button>
|
|
143
143
|
</footer>
|
|
144
144
|
</div>
|
|
145
145
|
</dialog>
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
<div class="btn-group" role="group" aria-label="Copilot">
|
|
84
84
|
<button type="button" class="btn" data-variant="outline"><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" data-icon="inline-start"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>Copilot</button>
|
|
85
85
|
<div class="popover">
|
|
86
|
-
<button type="button" class="btn" data-variant="outline" data-size="icon" aria-expanded="false" aria-label="Start a new task"><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></button>
|
|
87
|
-
<div data-popover data-side="bottom" data-align="end" aria-hidden="true">
|
|
86
|
+
<button type="button" class="btn" data-variant="outline" data-size="icon" aria-haspopup="dialog" aria-expanded="false" aria-controls="demo-button-group-task-panel" aria-label="Start a new task"><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></button>
|
|
87
|
+
<div data-popover data-side="bottom" data-align="end" id="demo-button-group-task-panel" role="dialog" tabindex="-1" aria-hidden="true" aria-labelledby="demo-button-group-task-title">
|
|
88
88
|
<header>
|
|
89
|
-
<h3 data-slot="title">Start a new task</h3>
|
|
89
|
+
<h3 data-slot="title" id="demo-button-group-task-title">Start a new task</h3>
|
|
90
90
|
<p data-slot="description">Describe your task in natural language.</p>
|
|
91
91
|
</header>
|
|
92
92
|
<div class="field">
|