kanto-ds 1.3.0 → 1.4.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 +3 -3
- package/dist/chunks/{defaults-DKzFsNbv.js → defaults-BwgjMcww.js} +27 -26
- package/dist/chunks/{defaults-DKzFsNbv.js.map → defaults-BwgjMcww.js.map} +1 -1
- package/dist/chunks/{index-fzPIgxe2.js → index-DSSLJirw.js} +17 -12
- package/dist/chunks/index-DSSLJirw.js.map +1 -0
- package/dist/chunks/{kt-element-mdd5cXZX.js → kt-element-E-tfJpGQ.js} +2 -2
- package/dist/chunks/{kt-element-mdd5cXZX.js.map → kt-element-E-tfJpGQ.js.map} +1 -1
- package/dist/components/core/kt-avatar/kt-avatar.js +2 -2
- package/dist/components/core/kt-badge/kt-badge.js +2 -2
- package/dist/components/core/kt-button/kt-button.js +1 -1
- package/dist/components/core/kt-card/kt-card.js +1 -1
- package/dist/components/core/kt-code/kt-code.js +2 -2
- package/dist/components/core/kt-icon/kt-icon.js +2 -2
- package/dist/components/core/kt-kbd/kt-kbd.js +1 -1
- package/dist/components/core/kt-split-button/kt-split-button.js +2 -2
- package/dist/components/data/kt-chart/kt-chart.js +51 -51
- package/dist/components/data/kt-chart/kt-chart.js.map +1 -1
- package/dist/components/data/kt-meter/kt-meter.js +1 -1
- package/dist/components/data/kt-pagination/kt-pagination.js +2 -2
- package/dist/components/data/kt-stat/kt-stat.js +1 -1
- package/dist/components/data/kt-table/kt-table.js +2 -2
- package/dist/components/data/kt-timeline/kt-timeline.js +1 -1
- package/dist/components/feedback/kt-alert/kt-alert.js +2 -2
- package/dist/components/feedback/kt-empty-state/kt-empty-state.js +1 -1
- package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js +1 -1
- package/dist/components/feedback/kt-skeleton/kt-skeleton.js +1 -1
- package/dist/components/feedback/kt-toast/kt-toast.js +2 -2
- package/dist/components/feedback/kt-toast-container/kt-toast-container.js +1 -1
- package/dist/components/feedback/kt-tooltip/kt-tooltip.js +1 -1
- package/dist/components/forms/kt-checkbox/kt-checkbox.d.ts +66 -0
- package/dist/components/forms/kt-checkbox/kt-checkbox.js +198 -0
- package/dist/components/forms/kt-checkbox/kt-checkbox.js.map +1 -0
- package/dist/components/forms/kt-drag-drop/kt-drag-drop.js +2 -2
- package/dist/components/forms/kt-form/kt-form.js +11 -10
- package/dist/components/forms/kt-form/kt-form.js.map +1 -1
- package/dist/components/forms/kt-input/kt-input.js +2 -2
- package/dist/components/forms/kt-input-menu/kt-input-menu.js +2 -2
- package/dist/components/forms/kt-label-input/kt-label-input.js +1 -1
- package/dist/components/forms/kt-radio-group/kt-radio-group.d.ts +103 -0
- package/dist/components/forms/kt-radio-group/kt-radio-group.js +265 -0
- package/dist/components/forms/kt-radio-group/kt-radio-group.js.map +1 -0
- package/dist/components/forms/kt-select/kt-select.js +2 -2
- package/dist/components/forms/kt-textarea/kt-textarea.js +2 -2
- package/dist/components/forms/kt-toggle/kt-toggle.js +1 -1
- package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js +2 -2
- package/dist/components/navigation/kt-header/kt-header.js +2 -2
- package/dist/components/navigation/kt-page-header/kt-page-header.js +1 -1
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js +2 -2
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js +2 -2
- package/dist/components/navigation/kt-tabs/kt-tabs.js +1 -1
- package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js +1 -1
- package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js +12 -6
- package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js.map +1 -1
- package/dist/components/overlays/kt-collapsible/kt-collapsible.js +1 -1
- package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js +2 -2
- package/dist/components/overlays/kt-dropdown/kt-dropdown.js +2 -2
- package/dist/components/overlays/kt-modal/kt-modal.js +2 -2
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js +2 -2
- package/dist/custom-elements.json +1740 -941
- package/dist/icons/defaults.d.ts +1 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +95 -90
- package/dist/index.js.map +1 -1
- package/dist/internal/strings.d.ts +10 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +176 -157
- package/dist/react/index.js.map +1 -1
- package/dist/react/jsx.d.ts +12 -1
- package/dist/strings/index.js +1 -1
- package/dist/tokens/base.css +3 -0
- package/dist/vscode.css-custom-data.json +12 -0
- package/dist/vscode.html-custom-data.json +85 -0
- package/dist/vue/index.d.ts +6 -0
- package/dist/vue/index.js +9 -7
- package/dist/vue/index.js.map +1 -1
- package/dist/web-types.json +225 -1
- package/package.json +9 -1
- package/dist/chunks/index-fzPIgxe2.js.map +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
+
import { KtElement } from '#internal/kt-element';
|
|
3
|
+
export type KtRadioGroupOrientation = 'vertical' | 'horizontal';
|
|
4
|
+
/**
|
|
5
|
+
* One option of a `<kt-radio-group>`.
|
|
6
|
+
*
|
|
7
|
+
* It draws itself and carries `role="radio"`; the group owns the selection,
|
|
8
|
+
* the tab stop and the keyboard. A `<kt-radio>` outside a group does nothing
|
|
9
|
+
* useful.
|
|
10
|
+
*
|
|
11
|
+
* @element kt-radio
|
|
12
|
+
*
|
|
13
|
+
* @slot - The label.
|
|
14
|
+
*
|
|
15
|
+
* @csspart base - The `role="radio"` row.
|
|
16
|
+
* @csspart circle - The drawn circle.
|
|
17
|
+
*/
|
|
18
|
+
export declare class KtRadio extends KtElement {
|
|
19
|
+
static styles: import("lit").CSSResultGroup[];
|
|
20
|
+
/** Submitted by the group when this option is chosen. */
|
|
21
|
+
value: string;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** Set by the group. */
|
|
24
|
+
checked: boolean;
|
|
25
|
+
/** Set by the group: whether this option holds the group's one tab stop. */
|
|
26
|
+
tabbable: boolean;
|
|
27
|
+
/** Set by the group while it reports an error. */
|
|
28
|
+
invalid: boolean;
|
|
29
|
+
/** Set by the group while the whole group is disabled. */
|
|
30
|
+
groupDisabled: boolean;
|
|
31
|
+
private get inactive();
|
|
32
|
+
focus(options?: FocusOptions): void;
|
|
33
|
+
render(): TemplateResult;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One choice among a few, all visible at once.
|
|
37
|
+
*
|
|
38
|
+
* Reach for it over `<kt-select>` when there are few enough options to show
|
|
39
|
+
* them all — seeing every option is the point — and over
|
|
40
|
+
* `<kt-segmented-control>` when the options need a sentence each, or the
|
|
41
|
+
* choice belongs in a form rather than a toolbar.
|
|
42
|
+
*
|
|
43
|
+
* Native radios cannot form a group across shadow roots, so this is the ARIA
|
|
44
|
+
* radio group pattern: one tab stop for the whole group, arrow keys move and
|
|
45
|
+
* select, disabled options are skipped.
|
|
46
|
+
*
|
|
47
|
+
* @element kt-radio-group
|
|
48
|
+
*
|
|
49
|
+
* @slot - The `<kt-radio>` options.
|
|
50
|
+
*
|
|
51
|
+
* @csspart base - The `role="radiogroup"` container.
|
|
52
|
+
*
|
|
53
|
+
* @fires kt-change - An option was chosen. `detail: { value }`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```html
|
|
57
|
+
* <kt-radio-group label="Billing" name="billing" value="monthly">
|
|
58
|
+
* <kt-radio value="monthly">Monthly</kt-radio>
|
|
59
|
+
* <kt-radio value="yearly">Yearly — two months free</kt-radio>
|
|
60
|
+
* </kt-radio-group>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare class KtRadioGroup extends KtElement {
|
|
64
|
+
static readonly formAssociated = true;
|
|
65
|
+
static styles: import("lit").CSSResultGroup[];
|
|
66
|
+
private radios;
|
|
67
|
+
private internals;
|
|
68
|
+
private defaultValue;
|
|
69
|
+
/** The chosen option's value, or `null`. */
|
|
70
|
+
value: string | null;
|
|
71
|
+
name: string;
|
|
72
|
+
/** Accessible name of the group. */
|
|
73
|
+
label: string;
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
required: boolean;
|
|
76
|
+
orientation: KtRadioGroupOrientation;
|
|
77
|
+
/** Error message. A non-empty value puts the group in its error state. */
|
|
78
|
+
error: string;
|
|
79
|
+
connectedCallback(): void;
|
|
80
|
+
disconnectedCallback(): void;
|
|
81
|
+
willUpdate(changed: PropertyValues<this>): void;
|
|
82
|
+
updated(): void;
|
|
83
|
+
formResetCallback(): void;
|
|
84
|
+
formStateRestoreCallback(state: string | null): void;
|
|
85
|
+
focus(options?: FocusOptions): void;
|
|
86
|
+
private enabled;
|
|
87
|
+
/**
|
|
88
|
+
* Pushes the group's state down; the radios are the display, not the truth.
|
|
89
|
+
* The tab stop sits on the chosen option, or the first enabled one.
|
|
90
|
+
*/
|
|
91
|
+
private syncRadios;
|
|
92
|
+
private choose;
|
|
93
|
+
private onClick;
|
|
94
|
+
/** Arrows move and select, wrapping; Space selects the focused option. */
|
|
95
|
+
private onKeyDown;
|
|
96
|
+
render(): TemplateResult;
|
|
97
|
+
}
|
|
98
|
+
declare global {
|
|
99
|
+
interface HTMLElementTagNameMap {
|
|
100
|
+
'kt-radio': KtRadio;
|
|
101
|
+
'kt-radio-group': KtRadioGroup;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { css as b, nothing as d, html as p } from "lit";
|
|
2
|
+
import { property as a, queryAssignedElements as y } from "lit/decorators.js";
|
|
3
|
+
import { K as h, d as v } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
|
+
import { e as g } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
|
+
import { a as m, s as k, b as w } from "../../../chunks/form-control-CxjBTt1c.js";
|
|
6
|
+
import { s as f } from "../../../chunks/index-DSSLJirw.js";
|
|
7
|
+
var x = Object.defineProperty, i = (c, e, r, s) => {
|
|
8
|
+
for (var t = void 0, o = c.length - 1, u; o >= 0; o--)
|
|
9
|
+
(u = c[o]) && (t = u(e, r, t) || t);
|
|
10
|
+
return t && x(e, r, t), t;
|
|
11
|
+
};
|
|
12
|
+
class l extends h {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.value = "", this.disabled = !1, this.checked = !1, this.tabbable = !1, this.invalid = !1, this.groupDisabled = !1;
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.styles = [
|
|
18
|
+
h.styles,
|
|
19
|
+
b`
|
|
20
|
+
:host {
|
|
21
|
+
display: block;
|
|
22
|
+
--radio-size: calc(var(--button-height) * 0.45);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.radio {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
gap: var(--gap-button);
|
|
29
|
+
color: var(--text-body);
|
|
30
|
+
font: var(--font-normal-regular);
|
|
31
|
+
outline: none;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.circle {
|
|
36
|
+
position: relative;
|
|
37
|
+
flex: none;
|
|
38
|
+
width: var(--radio-size);
|
|
39
|
+
height: var(--radio-size);
|
|
40
|
+
margin-top: calc((1lh - var(--radio-size)) / 2);
|
|
41
|
+
background-color: var(--surface-field);
|
|
42
|
+
border: var(--border-width) solid var(--border-field);
|
|
43
|
+
border-radius: var(--radius-full);
|
|
44
|
+
transition: border-color var(--duration-instant);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* The dot: a fill inset by a third of the circle. */
|
|
48
|
+
.circle::after {
|
|
49
|
+
content: '';
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: 22%;
|
|
52
|
+
border-radius: var(--radius-full);
|
|
53
|
+
background-color: var(--color-primary-base);
|
|
54
|
+
transform: scale(0);
|
|
55
|
+
transition: transform var(--duration-fast);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.radio:hover .circle {
|
|
59
|
+
border-color: var(--text-muted);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.radio:focus-visible .circle {
|
|
63
|
+
outline: var(--outline-width) solid var(--color-primary-base);
|
|
64
|
+
outline-offset: 2px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.radio[aria-checked='true'] .circle {
|
|
68
|
+
border-color: var(--color-primary-base);
|
|
69
|
+
}
|
|
70
|
+
.radio[aria-checked='true'] .circle::after {
|
|
71
|
+
transform: scale(1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([invalid]) .circle {
|
|
75
|
+
border-color: var(--color-danger-base);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([disabled]) .radio,
|
|
79
|
+
:host([group-disabled]) .radio {
|
|
80
|
+
color: var(--text-disabled);
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
}
|
|
83
|
+
:host([disabled]) .circle,
|
|
84
|
+
:host([group-disabled]) .circle {
|
|
85
|
+
background-color: var(--color-dark-22);
|
|
86
|
+
border-color: var(--color-dark-24);
|
|
87
|
+
}
|
|
88
|
+
:host([disabled]) .circle::after,
|
|
89
|
+
:host([group-disabled]) .circle::after {
|
|
90
|
+
background-color: var(--text-disabled);
|
|
91
|
+
}
|
|
92
|
+
`
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
get inactive() {
|
|
96
|
+
return this.disabled || this.groupDisabled;
|
|
97
|
+
}
|
|
98
|
+
focus(e) {
|
|
99
|
+
this.shadowRoot?.querySelector(".radio")?.focus(e);
|
|
100
|
+
}
|
|
101
|
+
render() {
|
|
102
|
+
return p`<div
|
|
103
|
+
part="base"
|
|
104
|
+
class="radio"
|
|
105
|
+
role="radio"
|
|
106
|
+
aria-checked=${this.checked ? "true" : "false"}
|
|
107
|
+
aria-disabled=${this.inactive ? "true" : d}
|
|
108
|
+
tabindex=${this.tabbable && !this.inactive ? 0 : -1}
|
|
109
|
+
>
|
|
110
|
+
<span part="circle" class="circle"></span>
|
|
111
|
+
<span class="text"><slot></slot></span>
|
|
112
|
+
</div>`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
i([
|
|
116
|
+
a({ type: String, reflect: !0 })
|
|
117
|
+
], l.prototype, "value");
|
|
118
|
+
i([
|
|
119
|
+
a({ type: Boolean, reflect: !0 })
|
|
120
|
+
], l.prototype, "disabled");
|
|
121
|
+
i([
|
|
122
|
+
a({ type: Boolean, reflect: !0 })
|
|
123
|
+
], l.prototype, "checked");
|
|
124
|
+
i([
|
|
125
|
+
a({ type: Boolean, attribute: !1 })
|
|
126
|
+
], l.prototype, "tabbable");
|
|
127
|
+
i([
|
|
128
|
+
a({ type: Boolean, reflect: !0 })
|
|
129
|
+
], l.prototype, "invalid");
|
|
130
|
+
i([
|
|
131
|
+
a({ type: Boolean, reflect: !0, attribute: "group-disabled" })
|
|
132
|
+
], l.prototype, "groupDisabled");
|
|
133
|
+
class n extends h {
|
|
134
|
+
constructor() {
|
|
135
|
+
super(...arguments), this.internals = null, this.defaultValue = null, this.value = null, this.name = "", this.label = "", this.disabled = !1, this.required = !1, this.orientation = "vertical", this.error = "", this.syncRadios = () => {
|
|
136
|
+
const e = this.enabled(), s = e.find((t) => t.value === this.value) ?? e[0];
|
|
137
|
+
for (const t of this.radios)
|
|
138
|
+
t.checked = t.value === this.value, t.tabbable = t === s, t.invalid = !!this.error, t.groupDisabled = this.disabled;
|
|
139
|
+
}, this.onClick = (e) => {
|
|
140
|
+
const r = e.composedPath().find((s) => s instanceof l);
|
|
141
|
+
!r || !this.enabled().includes(r) || (this.choose(r), r.focus());
|
|
142
|
+
}, this.onKeyDown = (e) => {
|
|
143
|
+
const r = this.enabled();
|
|
144
|
+
if (r.length === 0) return;
|
|
145
|
+
const s = e.composedPath().find((u) => u instanceof l), t = s ? r.indexOf(s) : -1;
|
|
146
|
+
let o;
|
|
147
|
+
if (e.key === "ArrowDown" || e.key === "ArrowRight")
|
|
148
|
+
o = r[(t + 1) % r.length];
|
|
149
|
+
else if (e.key === "ArrowUp" || e.key === "ArrowLeft")
|
|
150
|
+
o = r[(t - 1 + r.length) % r.length];
|
|
151
|
+
else if (e.key === " " && s && t >= 0)
|
|
152
|
+
o = s;
|
|
153
|
+
else
|
|
154
|
+
return;
|
|
155
|
+
e.preventDefault(), o && (this.choose(o), this.updateComplete.then(() => o.focus()));
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
static {
|
|
159
|
+
this.formAssociated = !0;
|
|
160
|
+
}
|
|
161
|
+
static {
|
|
162
|
+
this.styles = [
|
|
163
|
+
h.styles,
|
|
164
|
+
b`
|
|
165
|
+
:host {
|
|
166
|
+
display: block;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.group {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
gap: var(--gap-element);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([orientation='horizontal']) .group {
|
|
176
|
+
flex-direction: row;
|
|
177
|
+
flex-wrap: wrap;
|
|
178
|
+
column-gap: var(--gap-card);
|
|
179
|
+
}
|
|
180
|
+
`
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
connectedCallback() {
|
|
184
|
+
super.connectedCallback(), this.internals ??= m(this), this.defaultValue = this.value, this.addEventListener("click", this.onClick), this.addEventListener("keydown", this.onKeyDown);
|
|
185
|
+
}
|
|
186
|
+
disconnectedCallback() {
|
|
187
|
+
super.disconnectedCallback(), this.removeEventListener("click", this.onClick), this.removeEventListener("keydown", this.onKeyDown);
|
|
188
|
+
}
|
|
189
|
+
willUpdate(e) {
|
|
190
|
+
if (e.has("value") || e.has("required") || e.has("error") || this.stringsChanged(e)) {
|
|
191
|
+
k(this.internals, this.value);
|
|
192
|
+
const r = this.required && this.value === null;
|
|
193
|
+
w(
|
|
194
|
+
this.internals,
|
|
195
|
+
{ valueMissing: r, customError: !!this.error },
|
|
196
|
+
this.error || (r ? f().selectOption : "")
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
updated() {
|
|
201
|
+
this.syncRadios();
|
|
202
|
+
}
|
|
203
|
+
formResetCallback() {
|
|
204
|
+
this.value = this.defaultValue;
|
|
205
|
+
}
|
|
206
|
+
formStateRestoreCallback(e) {
|
|
207
|
+
this.value = e;
|
|
208
|
+
}
|
|
209
|
+
focus(e) {
|
|
210
|
+
this.radios.find((r) => r.tabbable)?.focus(e);
|
|
211
|
+
}
|
|
212
|
+
enabled() {
|
|
213
|
+
return this.disabled ? [] : this.radios.filter((e) => !e.disabled);
|
|
214
|
+
}
|
|
215
|
+
choose(e) {
|
|
216
|
+
e.value !== this.value && (this.value = e.value, g(this, "kt-change", { value: this.value }));
|
|
217
|
+
}
|
|
218
|
+
render() {
|
|
219
|
+
return p`${this.error ? p`<span id="error-message" class="visually-hidden">${this.error}</span>` : d}
|
|
220
|
+
<div
|
|
221
|
+
part="base"
|
|
222
|
+
class="group"
|
|
223
|
+
role="radiogroup"
|
|
224
|
+
aria-label=${this.label || f().options}
|
|
225
|
+
aria-orientation=${this.orientation}
|
|
226
|
+
aria-required=${this.required ? "true" : d}
|
|
227
|
+
aria-invalid=${this.error ? "true" : d}
|
|
228
|
+
aria-disabled=${this.disabled ? "true" : d}
|
|
229
|
+
aria-describedby=${this.error ? "error-message" : d}
|
|
230
|
+
>
|
|
231
|
+
<slot @slotchange=${this.syncRadios}></slot>
|
|
232
|
+
</div>`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
i([
|
|
236
|
+
y({ selector: "kt-radio" })
|
|
237
|
+
], n.prototype, "radios");
|
|
238
|
+
i([
|
|
239
|
+
a({ type: String, reflect: !0 })
|
|
240
|
+
], n.prototype, "value");
|
|
241
|
+
i([
|
|
242
|
+
a({ type: String })
|
|
243
|
+
], n.prototype, "name");
|
|
244
|
+
i([
|
|
245
|
+
a({ type: String })
|
|
246
|
+
], n.prototype, "label");
|
|
247
|
+
i([
|
|
248
|
+
a({ type: Boolean, reflect: !0 })
|
|
249
|
+
], n.prototype, "disabled");
|
|
250
|
+
i([
|
|
251
|
+
a({ type: Boolean, reflect: !0 })
|
|
252
|
+
], n.prototype, "required");
|
|
253
|
+
i([
|
|
254
|
+
a({ type: String, reflect: !0 })
|
|
255
|
+
], n.prototype, "orientation");
|
|
256
|
+
i([
|
|
257
|
+
a({ type: String, reflect: !0 })
|
|
258
|
+
], n.prototype, "error");
|
|
259
|
+
v("kt-radio", l);
|
|
260
|
+
v("kt-radio-group", n);
|
|
261
|
+
export {
|
|
262
|
+
l as KtRadio,
|
|
263
|
+
n as KtRadioGroup
|
|
264
|
+
};
|
|
265
|
+
//# sourceMappingURL=kt-radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kt-radio-group.js","sources":["../../../../src/components/forms/kt-radio-group/kt-radio-group.ts"],"sourcesContent":["import { css, html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { KtElement, defineElement } from '#internal/kt-element';\nimport { emit } from '#internal/events';\nimport {\n attachFormInternals,\n setFormValue,\n setValidity,\n type UsableInternals,\n} from '#internal/form-control';\nimport { strings } from '#internal/strings';\n\nexport type KtRadioGroupOrientation = 'vertical' | 'horizontal';\n\n/**\n * One option of a `<kt-radio-group>`.\n *\n * It draws itself and carries `role=\"radio\"`; the group owns the selection,\n * the tab stop and the keyboard. A `<kt-radio>` outside a group does nothing\n * useful.\n *\n * @element kt-radio\n *\n * @slot - The label.\n *\n * @csspart base - The `role=\"radio\"` row.\n * @csspart circle - The drawn circle.\n */\nexport class KtRadio extends KtElement {\n static override styles = [\n KtElement.styles,\n css`\n :host {\n display: block;\n --radio-size: calc(var(--button-height) * 0.45);\n }\n\n .radio {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--gap-button);\n color: var(--text-body);\n font: var(--font-normal-regular);\n outline: none;\n cursor: pointer;\n }\n\n .circle {\n position: relative;\n flex: none;\n width: var(--radio-size);\n height: var(--radio-size);\n margin-top: calc((1lh - var(--radio-size)) / 2);\n background-color: var(--surface-field);\n border: var(--border-width) solid var(--border-field);\n border-radius: var(--radius-full);\n transition: border-color var(--duration-instant);\n }\n\n /* The dot: a fill inset by a third of the circle. */\n .circle::after {\n content: '';\n position: absolute;\n inset: 22%;\n border-radius: var(--radius-full);\n background-color: var(--color-primary-base);\n transform: scale(0);\n transition: transform var(--duration-fast);\n }\n\n .radio:hover .circle {\n border-color: var(--text-muted);\n }\n\n .radio:focus-visible .circle {\n outline: var(--outline-width) solid var(--color-primary-base);\n outline-offset: 2px;\n }\n\n .radio[aria-checked='true'] .circle {\n border-color: var(--color-primary-base);\n }\n .radio[aria-checked='true'] .circle::after {\n transform: scale(1);\n }\n\n :host([invalid]) .circle {\n border-color: var(--color-danger-base);\n }\n\n :host([disabled]) .radio,\n :host([group-disabled]) .radio {\n color: var(--text-disabled);\n cursor: not-allowed;\n }\n :host([disabled]) .circle,\n :host([group-disabled]) .circle {\n background-color: var(--color-dark-22);\n border-color: var(--color-dark-24);\n }\n :host([disabled]) .circle::after,\n :host([group-disabled]) .circle::after {\n background-color: var(--text-disabled);\n }\n `,\n ];\n\n /** Submitted by the group when this option is chosen. */\n @property({ type: String, reflect: true })\n value = '';\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Set by the group. */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /** Set by the group: whether this option holds the group's one tab stop. */\n @property({ type: Boolean, attribute: false })\n tabbable = false;\n\n /** Set by the group while it reports an error. */\n @property({ type: Boolean, reflect: true })\n invalid = false;\n\n /** Set by the group while the whole group is disabled. */\n @property({ type: Boolean, reflect: true, attribute: 'group-disabled' })\n groupDisabled = false;\n\n private get inactive(): boolean {\n return this.disabled || this.groupDisabled;\n }\n\n override focus(options?: FocusOptions): void {\n this.shadowRoot?.querySelector<HTMLElement>('.radio')?.focus(options);\n }\n\n override render(): TemplateResult {\n return html`<div\n part=\"base\"\n class=\"radio\"\n role=\"radio\"\n aria-checked=${this.checked ? 'true' : 'false'}\n aria-disabled=${this.inactive ? 'true' : nothing}\n tabindex=${this.tabbable && !this.inactive ? 0 : -1}\n >\n <span part=\"circle\" class=\"circle\"></span>\n <span class=\"text\"><slot></slot></span>\n </div>`;\n }\n}\n\n/**\n * One choice among a few, all visible at once.\n *\n * Reach for it over `<kt-select>` when there are few enough options to show\n * them all — seeing every option is the point — and over\n * `<kt-segmented-control>` when the options need a sentence each, or the\n * choice belongs in a form rather than a toolbar.\n *\n * Native radios cannot form a group across shadow roots, so this is the ARIA\n * radio group pattern: one tab stop for the whole group, arrow keys move and\n * select, disabled options are skipped.\n *\n * @element kt-radio-group\n *\n * @slot - The `<kt-radio>` options.\n *\n * @csspart base - The `role=\"radiogroup\"` container.\n *\n * @fires kt-change - An option was chosen. `detail: { value }`.\n *\n * @example\n * ```html\n * <kt-radio-group label=\"Billing\" name=\"billing\" value=\"monthly\">\n * <kt-radio value=\"monthly\">Monthly</kt-radio>\n * <kt-radio value=\"yearly\">Yearly — two months free</kt-radio>\n * </kt-radio-group>\n * ```\n */\nexport class KtRadioGroup extends KtElement {\n static readonly formAssociated = true;\n\n static override styles = [\n KtElement.styles,\n css`\n :host {\n display: block;\n }\n\n .group {\n display: flex;\n flex-direction: column;\n gap: var(--gap-element);\n }\n\n :host([orientation='horizontal']) .group {\n flex-direction: row;\n flex-wrap: wrap;\n column-gap: var(--gap-card);\n }\n `,\n ];\n\n @queryAssignedElements({ selector: 'kt-radio' })\n private radios!: KtRadio[];\n\n private internals: UsableInternals | null = null;\n private defaultValue: string | null = null;\n\n /** The chosen option's value, or `null`. */\n @property({ type: String, reflect: true })\n value: string | null = null;\n\n @property({ type: String })\n name = '';\n\n /** Accessible name of the group. */\n @property({ type: String })\n label = '';\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: Boolean, reflect: true })\n required = false;\n\n @property({ type: String, reflect: true })\n orientation: KtRadioGroupOrientation = 'vertical';\n\n /** Error message. A non-empty value puts the group in its error state. */\n @property({ type: String, reflect: true })\n error = '';\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.internals ??= attachFormInternals(this);\n this.defaultValue = this.value;\n // On the host: the radios are slotted light-DOM children.\n this.addEventListener('click', this.onClick);\n this.addEventListener('keydown', this.onKeyDown);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('click', this.onClick);\n this.removeEventListener('keydown', this.onKeyDown);\n }\n\n override willUpdate(changed: PropertyValues<this>): void {\n if (\n changed.has('value') ||\n changed.has('required') ||\n changed.has('error') ||\n this.stringsChanged(changed)\n ) {\n setFormValue(this.internals, this.value);\n\n const missing = this.required && this.value === null;\n setValidity(\n this.internals,\n { valueMissing: missing, customError: Boolean(this.error) },\n this.error || (missing ? strings().selectOption : ''),\n );\n }\n }\n\n override updated(): void {\n this.syncRadios();\n }\n\n formResetCallback(): void {\n this.value = this.defaultValue;\n }\n\n formStateRestoreCallback(state: string | null): void {\n this.value = state;\n }\n\n override focus(options?: FocusOptions): void {\n this.radios.find((radio) => radio.tabbable)?.focus(options);\n }\n\n private enabled(): KtRadio[] {\n return this.disabled ? [] : this.radios.filter((radio) => !radio.disabled);\n }\n\n /**\n * Pushes the group's state down; the radios are the display, not the truth.\n * The tab stop sits on the chosen option, or the first enabled one.\n */\n private syncRadios = (): void => {\n const enabled = this.enabled();\n const chosen = enabled.find((radio) => radio.value === this.value);\n const tabStop = chosen ?? enabled[0];\n\n for (const radio of this.radios) {\n radio.checked = radio.value === this.value;\n radio.tabbable = radio === tabStop;\n radio.invalid = Boolean(this.error);\n radio.groupDisabled = this.disabled;\n }\n };\n\n private choose(radio: KtRadio): void {\n if (radio.value === this.value) return;\n this.value = radio.value;\n emit(this, 'kt-change', { value: this.value });\n }\n\n private onClick = (event: Event): void => {\n const radio = event.composedPath().find((node): node is KtRadio => node instanceof KtRadio);\n if (!radio || !this.enabled().includes(radio)) return;\n this.choose(radio);\n radio.focus();\n };\n\n /** Arrows move and select, wrapping; Space selects the focused option. */\n private onKeyDown = (event: KeyboardEvent): void => {\n const enabled = this.enabled();\n if (enabled.length === 0) return;\n\n const focused = event.composedPath().find((node): node is KtRadio => node instanceof KtRadio);\n const from = focused ? enabled.indexOf(focused) : -1;\n\n let target: KtRadio | undefined;\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n target = enabled[(from + 1) % enabled.length];\n } else if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n target = enabled[(from - 1 + enabled.length) % enabled.length];\n } else if (event.key === ' ' && focused && from >= 0) {\n target = focused;\n } else {\n return;\n }\n\n event.preventDefault();\n if (!target) return;\n this.choose(target);\n void this.updateComplete.then(() => target.focus());\n };\n\n override render(): TemplateResult {\n return html`${\n this.error\n ? html`<span id=\"error-message\" class=\"visually-hidden\">${this.error}</span>`\n : nothing\n }\n <div\n part=\"base\"\n class=\"group\"\n role=\"radiogroup\"\n aria-label=${this.label || strings().options}\n aria-orientation=${this.orientation}\n aria-required=${this.required ? 'true' : nothing}\n aria-invalid=${this.error ? 'true' : nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-describedby=${this.error ? 'error-message' : nothing}\n >\n <slot @slotchange=${this.syncRadios}></slot>\n </div>`;\n }\n}\n\ndefineElement('kt-radio', KtRadio);\ndefineElement('kt-radio-group', KtRadioGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kt-radio': KtRadio;\n 'kt-radio-group': KtRadioGroup;\n }\n}\n"],"names":["KtRadio","KtElement","css","options","html","nothing","__decorateClass","property","KtRadioGroup","enabled","tabStop","radio","event","node","focused","from","target","attachFormInternals","changed","setFormValue","missing","setValidity","strings","state","emit","queryAssignedElements","defineElement"],"mappings":";;;;;;;;;;;AA4BO,MAAMA,UAAgBC,EAAU;AAAA,EAAhC,cAAA;AAAA,UAAA,GAAA,SAAA,GAiFL,KAAA,QAAQ,IAGR,KAAA,WAAW,IAIX,KAAA,UAAU,IAIV,KAAA,WAAW,IAIX,KAAA,UAAU,IAIV,KAAA,g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AxBpCjB,EAyBH,WAAA,QAAA;AAORF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA/B9BC,EAgCX,WAAA,OAAA;AAGAF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAlCfC,EAmCX,WAAA,MAAA;AAIAF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAtCfC,EAuCX,WAAA,OAAA;AAGAF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAzC/BC,EA0CX,WAAA,UAAA;AAGAF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA5C/BC,EA6CX,WAAA,UAAA;AAGAF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA/C9BC,EAgDX,WAAA,aAAA;AAIAF,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAnD9BC,EAoDX,WAAA,OAAA;AAoIFkB,EAAc,YAAY1B,CAAO;AACjC0B,EAAc,kBAAkBlB,CAAY;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { css as y, nothing as n, html as d } from "lit";
|
|
2
2
|
import { state as m, property as o } from "lit/decorators.js";
|
|
3
3
|
import { classMap as h } from "lit/directives/class-map.js";
|
|
4
|
-
import { K as v, d as x } from "../../../chunks/kt-element-
|
|
4
|
+
import { K as v, d as x } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
5
5
|
import { u as w, e as f } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
6
6
|
import { a as k, s as $, b as I } from "../../../chunks/form-control-CxjBTt1c.js";
|
|
7
7
|
import { a as D, f as b, l as L, n as S, o as g } from "../../../chunks/listbox-Sm3nvsC6.js";
|
|
8
|
-
import { s as l } from "../../../chunks/index-
|
|
8
|
+
import { s as l } from "../../../chunks/index-DSSLJirw.js";
|
|
9
9
|
import "../../core/kt-icon/kt-icon.js";
|
|
10
10
|
var E = Object.defineProperty, i = (c, e, s, a) => {
|
|
11
11
|
for (var r = void 0, p = c.length - 1, u; p >= 0; p--)
|
|
@@ -2,10 +2,10 @@ import { css as m, nothing as i, html as l } from "lit";
|
|
|
2
2
|
import { query as f, property as a } from "lit/decorators.js";
|
|
3
3
|
import { classMap as u } from "lit/directives/class-map.js";
|
|
4
4
|
import { live as g } from "lit/directives/live.js";
|
|
5
|
-
import { K as c, d as b } from "../../../chunks/kt-element-
|
|
5
|
+
import { K as c, d as b } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
6
6
|
import { e as p } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
7
7
|
import { a as y, s as v, b as x } from "../../../chunks/form-control-CxjBTt1c.js";
|
|
8
|
-
import { s as w } from "../../../chunks/index-
|
|
8
|
+
import { s as w } from "../../../chunks/index-DSSLJirw.js";
|
|
9
9
|
import "../../core/kt-icon/kt-icon.js";
|
|
10
10
|
var $ = Object.defineProperty, r = (n, e, o, k) => {
|
|
11
11
|
for (var s = void 0, h = n.length - 1, d; h >= 0; h--)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css as d, nothing as h, html as u } from "lit";
|
|
2
2
|
import { property as r } from "lit/decorators.js";
|
|
3
|
-
import { K as n, d as b } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as n, d as b } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
import { e as p } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
5
|
import { a as m, s as g } from "../../../chunks/form-control-CxjBTt1c.js";
|
|
6
6
|
var k = Object.defineProperty, s = (i, t, l, v) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css as d, nothing as f, html as s } from "lit";
|
|
2
2
|
import { property as c } from "lit/decorators.js";
|
|
3
|
-
import { K as p, d as u } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as p, d as u } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
import { e as h } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
|
-
import { s as b } from "../../../chunks/index-
|
|
5
|
+
import { s as b } from "../../../chunks/index-DSSLJirw.js";
|
|
6
6
|
import "../../core/kt-icon/kt-icon.js";
|
|
7
7
|
var v = Object.defineProperty, m = (o, t, e, a) => {
|
|
8
8
|
for (var r = void 0, i = o.length - 1, l; i >= 0; i--)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css as c, nothing as u, html as m } from "lit";
|
|
2
2
|
import { state as b, property as n } from "lit/decorators.js";
|
|
3
|
-
import { K as d, d as f } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as d, d as f } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
import { e as p } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
|
-
import { s as h } from "../../../chunks/index-
|
|
5
|
+
import { s as h } from "../../../chunks/index-DSSLJirw.js";
|
|
6
6
|
import "../../core/kt-button/kt-button.js";
|
|
7
7
|
var g = Object.defineProperty, a = (r, o, s, v) => {
|
|
8
8
|
for (var e = void 0, i = r.length - 1, l; i >= 0; i--)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css as c, html as t, nothing as l } from "lit";
|
|
2
2
|
import { property as s } from "lit/decorators.js";
|
|
3
|
-
import { K as h, d as g } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as h, d as g } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
var f = Object.defineProperty, o = (a, r, p, v) => {
|
|
5
5
|
for (var e = void 0, n = a.length - 1, d; n >= 0; n--)
|
|
6
6
|
(d = a[n]) && (e = d(r, p, e) || e);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { css as b, nothing as c, html as p } from "lit";
|
|
2
2
|
import { queryAll as v, property as n } from "lit/decorators.js";
|
|
3
3
|
import { classMap as h } from "lit/directives/class-map.js";
|
|
4
|
-
import { K as f, d as g } from "../../../chunks/kt-element-
|
|
4
|
+
import { K as f, d as g } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
5
5
|
import { e as m } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
6
6
|
import { a as x, s as y, b as k } from "../../../chunks/form-control-CxjBTt1c.js";
|
|
7
|
-
import { s as $ } from "../../../chunks/index-
|
|
7
|
+
import { s as $ } from "../../../chunks/index-DSSLJirw.js";
|
|
8
8
|
import "../../core/kt-icon/kt-icon.js";
|
|
9
9
|
var w = Object.defineProperty, s = (u, t, i, o) => {
|
|
10
10
|
for (var e = void 0, r = u.length - 1, l; r >= 0; r--)
|
|
@@ -2,9 +2,9 @@ import { css as y, html as a, nothing as n } from "lit";
|
|
|
2
2
|
import { property as c, state as x } from "lit/decorators.js";
|
|
3
3
|
import { classMap as f } from "lit/directives/class-map.js";
|
|
4
4
|
import { styleMap as $ } from "lit/directives/style-map.js";
|
|
5
|
-
import { K as b, d as k } from "../../../chunks/kt-element-
|
|
5
|
+
import { K as b, d as k } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
6
6
|
import { e as g } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
7
|
-
import { s as w } from "../../../chunks/index-
|
|
7
|
+
import { s as w } from "../../../chunks/index-DSSLJirw.js";
|
|
8
8
|
import "../../core/kt-icon/kt-icon.js";
|
|
9
9
|
import "../../core/kt-badge/kt-badge.js";
|
|
10
10
|
var A = Object.defineProperty, d = (p, e, t, o) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as u, html as l, nothing as p } from "lit";
|
|
2
2
|
import { queryAll as h, property as n } from "lit/decorators.js";
|
|
3
3
|
import { classMap as f } from "lit/directives/class-map.js";
|
|
4
|
-
import { K as c, d as v } from "../../../chunks/kt-element-
|
|
4
|
+
import { K as c, d as v } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
5
5
|
import { e as m } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
6
6
|
import "../../core/kt-icon/kt-icon.js";
|
|
7
7
|
import "../../feedback/kt-skeleton/kt-skeleton.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as p, html as c, nothing as n } from "lit";
|
|
2
2
|
import { property as o } from "lit/decorators.js";
|
|
3
3
|
import { classMap as b } from "lit/directives/class-map.js";
|
|
4
|
-
import { K as u, d as g } from "../../../chunks/kt-element-
|
|
4
|
+
import { K as u, d as g } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
5
5
|
import { e as v } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
6
6
|
import "../../core/kt-icon/kt-icon.js";
|
|
7
7
|
var m = Object.defineProperty, r = (l, e, i, s) => {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { css as c, html as h } from "lit";
|
|
2
2
|
import { queryAssignedElements as g, property as l } from "lit/decorators.js";
|
|
3
|
-
import { K as d, d as b } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as d, d as b } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
import { e as p } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { s as v } from "../../../chunks/index-DSSLJirw.js";
|
|
6
|
+
import { KtToggleButton as f } from "../kt-toggle-button/kt-toggle-button.js";
|
|
7
|
+
var m = Object.defineProperty, s = (n, t, e, r) => {
|
|
7
8
|
for (var o = void 0, a = n.length - 1, u; a >= 0; a--)
|
|
8
9
|
(u = n[a]) && (o = u(t, e, o) || o);
|
|
9
|
-
return o &&
|
|
10
|
+
return o && m(t, e, o), o;
|
|
10
11
|
};
|
|
11
12
|
class i extends d {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments), this.multiple = !1, this.orientation = "horizontal", this.label = "", this.value = null, this.onButtonClick = (t) => {
|
|
14
|
-
const e = t.composedPath().find((r) => r instanceof
|
|
15
|
+
const e = t.composedPath().find((r) => r instanceof f);
|
|
15
16
|
if (!(!e || e.disabled) && this.buttons?.includes(e)) {
|
|
16
17
|
if (this.multiple) {
|
|
17
18
|
const r = Array.isArray(this.value) ? this.value : [];
|
|
@@ -101,7 +102,12 @@ class i extends d {
|
|
|
101
102
|
t.managed = !0, t.selected = this.isSelected(t.value);
|
|
102
103
|
}
|
|
103
104
|
render() {
|
|
104
|
-
return h`<div
|
|
105
|
+
return h`<div
|
|
106
|
+
part="base"
|
|
107
|
+
class="group"
|
|
108
|
+
role="group"
|
|
109
|
+
aria-label=${this.label || v().options}
|
|
110
|
+
>
|
|
105
111
|
<slot @slotchange=${this.syncButtons}></slot>
|
|
106
112
|
</div>`;
|
|
107
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kt-toggle-button-group.js","sources":["../../../../src/components/navigation/kt-toggle-button-group/kt-toggle-button-group.ts"],"sourcesContent":["import { css, html, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { KtElement, defineElement } from '#internal/kt-element';\nimport { emit } from '#internal/events';\nimport { KtToggleButton } from '../kt-toggle-button/kt-toggle-button.js';\n\n/**\n * Joins `<kt-toggle-button>`s into one segmented bar and coordinates their\n * selection.\n *\n * Single mode behaves like a radio group with a deselect: clicking the active\n * button clears it. Multiple mode is a set of independent checkboxes that\n * happen to be drawn together.\n *\n * The buttons are slotted rather than described by an options array, so a\n * button can hold whatever its label needs — an icon, a count, a badge.\n *\n * @element kt-toggle-button-group\n *\n * @slot - The `<kt-toggle-button>` children.\n *\n * @csspart base - The group container.\n *\n * @fires kt-change - The selection changed.\n * `detail: { value }` — a single value or `null`, or an array in multiple mode.\n *\n * @example\n * ```html\n * <kt-toggle-button-group>\n * <kt-toggle-button value=\"list\" icon=\"list\" label=\"List\"></kt-toggle-button>\n * <kt-toggle-button value=\"grid\" icon=\"grid\" label=\"Grid\"></kt-toggle-button>\n * </kt-toggle-button-group>\n * ```\n */\nexport class KtToggleButtonGroup extends KtElement {\n static override styles = [\n KtElement.styles,\n css`\n :host {\n display: inline-flex;\n width: fit-content;\n }\n\n .group {\n display: inline-flex;\n gap: 0;\n }\n\n :host([orientation='vertical']) .group {\n flex-direction: column;\n }\n\n /* The buttons butt up against each other: square off the inner corners,\n pull them together by a border width, and lift the selected one so its\n border wins over its neighbour's. */\n ::slotted(kt-toggle-button) {\n position: relative;\n z-index: 1;\n --kt-toggle-button-radius: 0;\n }\n\n ::slotted(kt-toggle-button[selected]) {\n z-index: 3;\n }\n\n :host(:not([orientation='vertical'])) ::slotted(kt-toggle-button:not(:first-child)) {\n margin-left: calc(var(--border-width) * -1);\n }\n :host(:not([orientation='vertical'])) ::slotted(kt-toggle-button:first-child) {\n --kt-toggle-button-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n :host(:not([orientation='vertical'])) ::slotted(kt-toggle-button:last-child) {\n --kt-toggle-button-radius: 0 var(--border-radius) var(--border-radius) 0;\n }\n\n :host([orientation='vertical']) ::slotted(kt-toggle-button:not(:first-child)) {\n margin-top: calc(var(--border-width) * -1);\n }\n :host([orientation='vertical']) ::slotted(kt-toggle-button:first-child) {\n --kt-toggle-button-radius: var(--border-radius) var(--border-radius) 0 0;\n }\n :host([orientation='vertical']) ::slotted(kt-toggle-button:last-child) {\n --kt-toggle-button-radius: 0 0 var(--border-radius) var(--border-radius);\n }\n\n /* A lone button keeps all four corners. */\n ::slotted(kt-toggle-button:only-child) {\n --kt-toggle-button-radius: var(--border-radius);\n }\n `,\n ];\n\n @queryAssignedElements({ selector: 'kt-toggle-button' })\n private buttons!: KtToggleButton[];\n\n /** `false`: one selection at a time. `true`: any number. */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /** Accessible name for the group. */\n @property({ type: String })\n label = '';\n\n /** The selected value, or values in multiple mode. */\n @property({ attribute: false })\n value: string | string[] | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Listen on the host: the buttons are slotted light-DOM children, so a\n // listener inside the shadow root would see them through a retargeted\n // event.\n this.addEventListener('click', this.onButtonClick);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('click', this.onButtonClick);\n }\n\n override firstUpdated(): void {\n this.syncButtons();\n }\n\n override updated(changed: PropertyValues<this>): void {\n if (changed.has('value') || changed.has('multiple')) this.syncButtons();\n }\n\n private isSelected(candidate: string): boolean {\n if (this.multiple) return Array.isArray(this.value) && this.value.includes(candidate);\n return this.value === candidate;\n }\n\n /** Pushes the group's state down; the buttons are the display, not the truth. */\n private syncButtons(): void {\n for (const button of this.buttons ?? []) {\n button.managed = true;\n button.selected = this.isSelected(button.value);\n }\n }\n\n private onButtonClick = (event: Event): void => {\n // composedPath rather than target: the click starts on the <button> inside\n // the child's shadow root, and reading target relies on retargeting, which\n // browsers do and test DOMs do not.\n const button = event\n .composedPath()\n .find((node): node is KtToggleButton => node instanceof KtToggleButton);\n\n if (!button || button.disabled) return;\n if (!this.buttons?.includes(button)) return;\n\n if (this.multiple) {\n const current = Array.isArray(this.value) ? this.value : [];\n this.value = current.includes(button.value)\n ? current.filter((candidate) => candidate !== button.value)\n : [...current, button.value];\n } else {\n this.value = this.value === button.value ? null : button.value;\n }\n\n this.syncButtons();\n emit(this, 'kt-change', { value: this.value });\n };\n\n override render(): TemplateResult {\n return html`<div
|
|
1
|
+
{"version":3,"file":"kt-toggle-button-group.js","sources":["../../../../src/components/navigation/kt-toggle-button-group/kt-toggle-button-group.ts"],"sourcesContent":["import { css, html, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { KtElement, defineElement } from '#internal/kt-element';\nimport { emit } from '#internal/events';\nimport { strings } from '#internal/strings';\nimport { KtToggleButton } from '../kt-toggle-button/kt-toggle-button.js';\n\n/**\n * Joins `<kt-toggle-button>`s into one segmented bar and coordinates their\n * selection.\n *\n * Single mode behaves like a radio group with a deselect: clicking the active\n * button clears it. Multiple mode is a set of independent checkboxes that\n * happen to be drawn together.\n *\n * The buttons are slotted rather than described by an options array, so a\n * button can hold whatever its label needs — an icon, a count, a badge.\n *\n * @element kt-toggle-button-group\n *\n * @slot - The `<kt-toggle-button>` children.\n *\n * @csspart base - The group container.\n *\n * @fires kt-change - The selection changed.\n * `detail: { value }` — a single value or `null`, or an array in multiple mode.\n *\n * @example\n * ```html\n * <kt-toggle-button-group>\n * <kt-toggle-button value=\"list\" icon=\"list\" label=\"List\"></kt-toggle-button>\n * <kt-toggle-button value=\"grid\" icon=\"grid\" label=\"Grid\"></kt-toggle-button>\n * </kt-toggle-button-group>\n * ```\n */\nexport class KtToggleButtonGroup extends KtElement {\n static override styles = [\n KtElement.styles,\n css`\n :host {\n display: inline-flex;\n width: fit-content;\n }\n\n .group {\n display: inline-flex;\n gap: 0;\n }\n\n :host([orientation='vertical']) .group {\n flex-direction: column;\n }\n\n /* The buttons butt up against each other: square off the inner corners,\n pull them together by a border width, and lift the selected one so its\n border wins over its neighbour's. */\n ::slotted(kt-toggle-button) {\n position: relative;\n z-index: 1;\n --kt-toggle-button-radius: 0;\n }\n\n ::slotted(kt-toggle-button[selected]) {\n z-index: 3;\n }\n\n :host(:not([orientation='vertical'])) ::slotted(kt-toggle-button:not(:first-child)) {\n margin-left: calc(var(--border-width) * -1);\n }\n :host(:not([orientation='vertical'])) ::slotted(kt-toggle-button:first-child) {\n --kt-toggle-button-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n :host(:not([orientation='vertical'])) ::slotted(kt-toggle-button:last-child) {\n --kt-toggle-button-radius: 0 var(--border-radius) var(--border-radius) 0;\n }\n\n :host([orientation='vertical']) ::slotted(kt-toggle-button:not(:first-child)) {\n margin-top: calc(var(--border-width) * -1);\n }\n :host([orientation='vertical']) ::slotted(kt-toggle-button:first-child) {\n --kt-toggle-button-radius: var(--border-radius) var(--border-radius) 0 0;\n }\n :host([orientation='vertical']) ::slotted(kt-toggle-button:last-child) {\n --kt-toggle-button-radius: 0 0 var(--border-radius) var(--border-radius);\n }\n\n /* A lone button keeps all four corners. */\n ::slotted(kt-toggle-button:only-child) {\n --kt-toggle-button-radius: var(--border-radius);\n }\n `,\n ];\n\n @queryAssignedElements({ selector: 'kt-toggle-button' })\n private buttons!: KtToggleButton[];\n\n /** `false`: one selection at a time. `true`: any number. */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /** Accessible name for the group. */\n @property({ type: String })\n label = '';\n\n /** The selected value, or values in multiple mode. */\n @property({ attribute: false })\n value: string | string[] | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Listen on the host: the buttons are slotted light-DOM children, so a\n // listener inside the shadow root would see them through a retargeted\n // event.\n this.addEventListener('click', this.onButtonClick);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('click', this.onButtonClick);\n }\n\n override firstUpdated(): void {\n this.syncButtons();\n }\n\n override updated(changed: PropertyValues<this>): void {\n if (changed.has('value') || changed.has('multiple')) this.syncButtons();\n }\n\n private isSelected(candidate: string): boolean {\n if (this.multiple) return Array.isArray(this.value) && this.value.includes(candidate);\n return this.value === candidate;\n }\n\n /** Pushes the group's state down; the buttons are the display, not the truth. */\n private syncButtons(): void {\n for (const button of this.buttons ?? []) {\n button.managed = true;\n button.selected = this.isSelected(button.value);\n }\n }\n\n private onButtonClick = (event: Event): void => {\n // composedPath rather than target: the click starts on the <button> inside\n // the child's shadow root, and reading target relies on retargeting, which\n // browsers do and test DOMs do not.\n const button = event\n .composedPath()\n .find((node): node is KtToggleButton => node instanceof KtToggleButton);\n\n if (!button || button.disabled) return;\n if (!this.buttons?.includes(button)) return;\n\n if (this.multiple) {\n const current = Array.isArray(this.value) ? this.value : [];\n this.value = current.includes(button.value)\n ? current.filter((candidate) => candidate !== button.value)\n : [...current, button.value];\n } else {\n this.value = this.value === button.value ? null : button.value;\n }\n\n this.syncButtons();\n emit(this, 'kt-change', { value: this.value });\n };\n\n override render(): TemplateResult {\n return html`<div\n part=\"base\"\n class=\"group\"\n role=\"group\"\n aria-label=${this.label || strings().options}\n >\n <slot @slotchange=${this.syncButtons}></slot>\n </div>`;\n }\n}\n\ndefineElement('kt-toggle-button-group', KtToggleButtonGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kt-toggle-button-group': KtToggleButtonGroup;\n }\n}\n"],"names":["KtToggleButtonGroup","KtElement","event","button","node","KtToggleButton","current","candidate","emit","css","changed","html","strings","__decorateClass","queryAssignedElements","property","defineElement"],"mappings":";;;;;;;;;;;AAmCO,MAAMA,UAA4BC,EAAU;AAAA,EAA5C,cAAA;AAAA,UAAA,GAAA,SAAA,GA+DL,KAAA,WAAW,IAGX,KAAA,cAAyC,cAIzC,KAAA,QAAQ,IAIR,KAAA,QAAkC,MAoClC,KAAQ,gBAAgB,CAACC,MAAuB;AAI9C,YAAMC,IAASD,EACZ,aAAA,EACA,KAAK,CAACE,MAAiCA,aAAgBC,CAAc;AAExE,UAAI,GAACF,KAAUA,EAAO,aACjB,KAAK,SAAS,SAASA,CAAM,GAElC;AAAA,YAAI,KAAK,UAAU;AACjB,gBAAMG,IAAU,MAAM,QAAQ,KAAK,KAAK,IAAI,KAAK,QAAQ,CAAA;AACzD,eAAK,QAAQA,EAAQ,SAASH,EAAO,KAAK,IACtCG,EAAQ,OAAO,CAACC,MAAcA,MAAcJ,EAAO,KAAK,IACxD,CAAC,GAAGG,GAASH,EAAO,KAAK;AAAA,QAC/B;AACE,eAAK,QAAQ,KAAK,UAAUA,EAAO,QAAQ,OAAOA,EAAO;AAG3D,aAAK,YAAA,GACLK,EAAK,MAAM,aAAa,EAAE,OAAO,KAAK,OAAO;AAAA;AAAA,IAC/C;AAAA,EAAA;AAAA,EAnIA,OAAA;AAAA,SAAgB,SAAS;AAAA,MACvBP,EAAU;AAAA,MACVQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA,GA9D/Bf,EA+DX,WAAA,UAAA;AAGAa,EAAA;AAAA,EADCE,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAjE9Bf,EAkEX,WAAA,aAAA;AAIAa,EAAA;AAAA,EADCE,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GArEff,EAsEX,WAAA,OAAA;AAIAa,EAAA;AAAA,EADCE,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GAzEnBf,EA0EX,WAAA,OAAA;AAwEFgB,EAAc,0BAA0BhB,CAAmB;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css as d, nothing as m, html as c } from "lit";
|
|
2
2
|
import { property as n } from "lit/decorators.js";
|
|
3
|
-
import { K as p, d as u } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as p, d as u } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
import { e as f } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
5
|
import "../../core/kt-icon/kt-icon.js";
|
|
6
6
|
var h = Object.defineProperty, i = (a, o, t, y) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css as h, nothing as c, html as p } from "lit";
|
|
2
2
|
import { query as m, property as o } from "lit/decorators.js";
|
|
3
|
-
import { K as g, d as y } from "../../../chunks/kt-element-
|
|
3
|
+
import { K as g, d as y } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
4
4
|
import { e as f } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
5
5
|
import { o as u, c as b, i as v } from "../../../chunks/dialog-CPIfFIlF.js";
|
|
6
|
-
import { s as r } from "../../../chunks/index-
|
|
6
|
+
import { s as r } from "../../../chunks/index-DSSLJirw.js";
|
|
7
7
|
import "../../core/kt-button/kt-button.js";
|
|
8
8
|
var k = Object.defineProperty, a = (n, e, l, x) => {
|
|
9
9
|
for (var i = void 0, s = n.length - 1, d; s >= 0; s--)
|