@hyalo/angular 0.0.0-stage → 0.1.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/CHANGELOG.md +41 -0
- package/LICENSE +21 -0
- package/README.md +32 -3
- package/fesm2022/hyalo-angular-accordion.mjs +230 -0
- package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
- package/fesm2022/hyalo-angular-button.mjs +203 -0
- package/fesm2022/hyalo-angular-button.mjs.map +1 -0
- package/fesm2022/hyalo-angular-card.mjs +221 -0
- package/fesm2022/hyalo-angular-card.mjs.map +1 -0
- package/fesm2022/hyalo-angular-choice.mjs +788 -0
- package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
- package/fesm2022/hyalo-angular-dialog.mjs +571 -0
- package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
- package/fesm2022/hyalo-angular-field.mjs +312 -0
- package/fesm2022/hyalo-angular-field.mjs.map +1 -0
- package/fesm2022/hyalo-angular-icon.mjs +343 -0
- package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
- package/fesm2022/hyalo-angular-interaction.mjs +455 -0
- package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
- package/fesm2022/hyalo-angular-navbar.mjs +343 -0
- package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
- package/fesm2022/hyalo-angular-overlay.mjs +94 -0
- package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
- package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
- package/fesm2022/hyalo-angular-popover.mjs +487 -0
- package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
- package/fesm2022/hyalo-angular-segmented.mjs +223 -0
- package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
- package/fesm2022/hyalo-angular-select.mjs +464 -0
- package/fesm2022/hyalo-angular-select.mjs.map +1 -0
- package/fesm2022/hyalo-angular-tabs.mjs +324 -0
- package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
- package/fesm2022/hyalo-angular-theme.mjs +94 -0
- package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
- package/fesm2022/hyalo-angular-toast.mjs +322 -0
- package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
- package/fesm2022/hyalo-angular.mjs +473 -0
- package/fesm2022/hyalo-angular.mjs.map +1 -0
- package/package.json +133 -3
- package/styles/hyalo-core.css +25 -0
- package/styles/hyalo.css +17 -0
- package/styles/overlays/dialog.css +9 -0
- package/styles/overlays/popover.css +9 -0
- package/styles/overlays/select.css +9 -0
- package/styles/overlays/toast.css +8 -0
- package/styles/palettes/aurora.css +47 -0
- package/styles/palettes/ember.css +47 -0
- package/styles/palettes/graphite.css +47 -0
- package/styles/palettes/ocean.css +47 -0
- package/styles/palettes/orchid.css +47 -0
- package/styles/palettes/rose.css +47 -0
- package/styles/parts/card.css +49 -0
- package/styles/parts/dialog.css +116 -0
- package/styles/parts/drawer.css +124 -0
- package/styles/parts/field.css +36 -0
- package/styles/parts/glass.css +137 -0
- package/styles/parts/motion.css +82 -0
- package/styles/parts/navbar.css +55 -0
- package/styles/parts/popover.css +27 -0
- package/styles/parts/presence.css +55 -0
- package/styles/parts/reset.css +42 -0
- package/styles/parts/select.css +46 -0
- package/styles/parts/themes.css +105 -0
- package/styles/parts/toast.css +128 -0
- package/styles/parts/tokens.css +151 -0
- package/styles/parts/typography.css +64 -0
- package/types/hyalo-angular-accordion.d.ts +74 -0
- package/types/hyalo-angular-button.d.ts +88 -0
- package/types/hyalo-angular-card.d.ts +61 -0
- package/types/hyalo-angular-choice.d.ts +259 -0
- package/types/hyalo-angular-dialog.d.ts +170 -0
- package/types/hyalo-angular-field.d.ts +135 -0
- package/types/hyalo-angular-icon.d.ts +122 -0
- package/types/hyalo-angular-interaction.d.ts +131 -0
- package/types/hyalo-angular-navbar.d.ts +110 -0
- package/types/hyalo-angular-overlay.d.ts +31 -0
- package/types/hyalo-angular-popover.d.ts +142 -0
- package/types/hyalo-angular-segmented.d.ts +79 -0
- package/types/hyalo-angular-select.d.ts +130 -0
- package/types/hyalo-angular-tabs.d.ts +102 -0
- package/types/hyalo-angular-theme.d.ts +46 -0
- package/types/hyalo-angular-toast.d.ts +79 -0
- package/types/hyalo-angular.d.ts +345 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, input, model, output, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import { injectId, ɵtrackIndicator } from "@hyalo/angular";
|
|
4
|
+
import { HyIcon } from "@hyalo/angular/icon";
|
|
5
|
+
var HySegmented = class HySegmented {
|
|
6
|
+
groupName = injectId("segmented");
|
|
7
|
+
row = viewChild("row", ...ngDevMode ? [{ debugName: "row" }] : /* istanbul ignore next */ []);
|
|
8
|
+
items = viewChildren("item", {
|
|
9
|
+
...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
|
|
10
|
+
read: ElementRef
|
|
11
|
+
});
|
|
12
|
+
options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
13
|
+
value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
14
|
+
label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
|
|
15
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
16
|
+
disabled = input(false, {
|
|
17
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
18
|
+
transform: booleanAttribute
|
|
19
|
+
});
|
|
20
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
21
|
+
touch = output();
|
|
22
|
+
ready = ɵtrackIndicator(this.row, () => {
|
|
23
|
+
const index = this.options().findIndex((o) => o.value === this.value());
|
|
24
|
+
return this.items()[index]?.nativeElement ?? null;
|
|
25
|
+
});
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
27
|
+
minVersion: "12.0.0",
|
|
28
|
+
version: "22.2.3",
|
|
29
|
+
ngImport: i0,
|
|
30
|
+
type: HySegmented,
|
|
31
|
+
deps: [],
|
|
32
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
33
|
+
});
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
35
|
+
minVersion: "17.0.0",
|
|
36
|
+
version: "22.2.3",
|
|
37
|
+
type: HySegmented,
|
|
38
|
+
isStandalone: true,
|
|
39
|
+
selector: "hy-segmented",
|
|
40
|
+
inputs: {
|
|
41
|
+
options: {
|
|
42
|
+
classPropertyName: "options",
|
|
43
|
+
publicName: "options",
|
|
44
|
+
isSignal: true,
|
|
45
|
+
isRequired: true,
|
|
46
|
+
transformFunction: null
|
|
47
|
+
},
|
|
48
|
+
value: {
|
|
49
|
+
classPropertyName: "value",
|
|
50
|
+
publicName: "value",
|
|
51
|
+
isSignal: true,
|
|
52
|
+
isRequired: false,
|
|
53
|
+
transformFunction: null
|
|
54
|
+
},
|
|
55
|
+
label: {
|
|
56
|
+
classPropertyName: "label",
|
|
57
|
+
publicName: "label",
|
|
58
|
+
isSignal: true,
|
|
59
|
+
isRequired: false,
|
|
60
|
+
transformFunction: null
|
|
61
|
+
},
|
|
62
|
+
name: {
|
|
63
|
+
classPropertyName: "name",
|
|
64
|
+
publicName: "name",
|
|
65
|
+
isSignal: true,
|
|
66
|
+
isRequired: false,
|
|
67
|
+
transformFunction: null
|
|
68
|
+
},
|
|
69
|
+
disabled: {
|
|
70
|
+
classPropertyName: "disabled",
|
|
71
|
+
publicName: "disabled",
|
|
72
|
+
isSignal: true,
|
|
73
|
+
isRequired: false,
|
|
74
|
+
transformFunction: null
|
|
75
|
+
},
|
|
76
|
+
size: {
|
|
77
|
+
classPropertyName: "size",
|
|
78
|
+
publicName: "size",
|
|
79
|
+
isSignal: true,
|
|
80
|
+
isRequired: false,
|
|
81
|
+
transformFunction: null
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
outputs: {
|
|
85
|
+
value: "valueChange",
|
|
86
|
+
touch: "touch"
|
|
87
|
+
},
|
|
88
|
+
host: {
|
|
89
|
+
attributes: { "role": "radiogroup" },
|
|
90
|
+
properties: {
|
|
91
|
+
"attr.aria-label": "label() || null",
|
|
92
|
+
"attr.aria-disabled": "disabled() || null",
|
|
93
|
+
"attr.data-size": "size()",
|
|
94
|
+
"attr.data-ready": "ready() || null"
|
|
95
|
+
},
|
|
96
|
+
classAttribute: "hy-segmented"
|
|
97
|
+
},
|
|
98
|
+
viewQueries: [{
|
|
99
|
+
propertyName: "row",
|
|
100
|
+
first: true,
|
|
101
|
+
predicate: ["row"],
|
|
102
|
+
descendants: true,
|
|
103
|
+
isSignal: true
|
|
104
|
+
}, {
|
|
105
|
+
propertyName: "items",
|
|
106
|
+
predicate: ["item"],
|
|
107
|
+
descendants: true,
|
|
108
|
+
read: ElementRef,
|
|
109
|
+
isSignal: true
|
|
110
|
+
}],
|
|
111
|
+
ngImport: i0,
|
|
112
|
+
template: "<div #row class=\"hy-segmented__row\">\r\n <span class=\"hy-segmented__indicator\" aria-hidden=\"true\"></span>\r\n @for (option of options(); track option.value) {\r\n <label\r\n #item\r\n class=\"hy-segmented__item\"\r\n [attr.data-checked]=\"option.value === value() || null\"\r\n >\r\n <input\r\n type=\"radio\"\r\n class=\"hy-segmented__input\"\r\n [name]=\"name() || groupName\"\r\n [checked]=\"option.value === value()\"\r\n [disabled]=\"disabled() || !!option.disabled\"\r\n (change)=\"value.set(option.value)\"\r\n (blur)=\"touch.emit()\"\r\n />\r\n @if (option.icon; as icon) {\r\n <hy-icon [name]=\"icon\" />\r\n }\r\n <span>{{ option.label }}</span>\r\n </label>\r\n }\r\n</div>\r\n",
|
|
113
|
+
styles: [":host{display:inline-block;max-inline-size:100%}.hy-segmented__row{position:relative;display:flex;gap:var(--hy-space-1);padding:var(--hy-space-1);border-radius:var(--hy-segmented-radius, var(--hy-radius-pill));background:var(--hy-segmented-track, color-mix(in srgb, var(--hy-ink) 6%, transparent));isolation:isolate;overflow-x:auto;scrollbar-width:none}.hy-segmented__indicator{position:absolute;inset-block:var(--hy-space-1);left:0;inline-size:var(--hy-ind-size, 0px);translate:var(--hy-ind-x, 0px) 0;border-radius:var(--hy-segmented-radius, var(--hy-radius-pill));background:var(--hy-glass-reflection),var(--hy-segmented-indicator, var(--hy-surface-1));box-shadow:var(--hy-glass-edge),0 2px 8px -2px #0f1a242e;z-index:-1}:host([data-ready]) .hy-segmented__indicator{transition:translate var(--hy-dur-settle) var(--hy-ease-out),inline-size var(--hy-dur-settle) var(--hy-ease-out)}.hy-segmented__item{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--hy-space-2);flex:1;min-block-size:2.25rem;padding-inline:var(--hy-space-4);border-radius:var(--hy-segmented-radius, var(--hy-radius-pill));color:var(--hy-ink-2);font-weight:540;white-space:nowrap;cursor:pointer;transition:color var(--hy-dur-quick) var(--hy-ease-out)}:host([data-size=\"sm\"]) .hy-segmented__item{min-block-size:1.75rem;padding-inline:var(--hy-space-3);font-size:var(--hy-step--1);letter-spacing:var(--hy-tracking-small)}:host([data-size=\"lg\"]) .hy-segmented__item{min-block-size:2.75rem;padding-inline:var(--hy-space-5)}.hy-segmented__item:hover,.hy-segmented__item[data-checked]{color:var(--hy-ink)}.hy-segmented__item:has(:disabled){opacity:.45;cursor:not-allowed}.hy-segmented__item:has(:focus-visible){box-shadow:var(--hy-focus-ring)}.hy-segmented__input{position:absolute;inset:0;margin:0;opacity:0;cursor:inherit}@media(forced-colors:active){.hy-segmented__item[data-checked]{outline:2px solid Highlight}}\n"],
|
|
114
|
+
dependencies: [{
|
|
115
|
+
kind: "component",
|
|
116
|
+
type: HyIcon,
|
|
117
|
+
selector: "hy-icon",
|
|
118
|
+
inputs: [
|
|
119
|
+
"name",
|
|
120
|
+
"icon",
|
|
121
|
+
"label",
|
|
122
|
+
"size",
|
|
123
|
+
"strokeWidth"
|
|
124
|
+
]
|
|
125
|
+
}],
|
|
126
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
130
|
+
minVersion: "12.0.0",
|
|
131
|
+
version: "22.2.3",
|
|
132
|
+
ngImport: i0,
|
|
133
|
+
type: HySegmented,
|
|
134
|
+
decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{
|
|
137
|
+
selector: "hy-segmented",
|
|
138
|
+
imports: [HyIcon],
|
|
139
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
140
|
+
host: {
|
|
141
|
+
class: "hy-segmented",
|
|
142
|
+
role: "radiogroup",
|
|
143
|
+
"[attr.aria-label]": "label() || null",
|
|
144
|
+
"[attr.aria-disabled]": "disabled() || null",
|
|
145
|
+
"[attr.data-size]": "size()",
|
|
146
|
+
"[attr.data-ready]": "ready() || null"
|
|
147
|
+
},
|
|
148
|
+
template: "<div #row class=\"hy-segmented__row\">\r\n <span class=\"hy-segmented__indicator\" aria-hidden=\"true\"></span>\r\n @for (option of options(); track option.value) {\r\n <label\r\n #item\r\n class=\"hy-segmented__item\"\r\n [attr.data-checked]=\"option.value === value() || null\"\r\n >\r\n <input\r\n type=\"radio\"\r\n class=\"hy-segmented__input\"\r\n [name]=\"name() || groupName\"\r\n [checked]=\"option.value === value()\"\r\n [disabled]=\"disabled() || !!option.disabled\"\r\n (change)=\"value.set(option.value)\"\r\n (blur)=\"touch.emit()\"\r\n />\r\n @if (option.icon; as icon) {\r\n <hy-icon [name]=\"icon\" />\r\n }\r\n <span>{{ option.label }}</span>\r\n </label>\r\n }\r\n</div>\r\n",
|
|
149
|
+
styles: [":host{display:inline-block;max-inline-size:100%}.hy-segmented__row{position:relative;display:flex;gap:var(--hy-space-1);padding:var(--hy-space-1);border-radius:var(--hy-segmented-radius, var(--hy-radius-pill));background:var(--hy-segmented-track, color-mix(in srgb, var(--hy-ink) 6%, transparent));isolation:isolate;overflow-x:auto;scrollbar-width:none}.hy-segmented__indicator{position:absolute;inset-block:var(--hy-space-1);left:0;inline-size:var(--hy-ind-size, 0px);translate:var(--hy-ind-x, 0px) 0;border-radius:var(--hy-segmented-radius, var(--hy-radius-pill));background:var(--hy-glass-reflection),var(--hy-segmented-indicator, var(--hy-surface-1));box-shadow:var(--hy-glass-edge),0 2px 8px -2px #0f1a242e;z-index:-1}:host([data-ready]) .hy-segmented__indicator{transition:translate var(--hy-dur-settle) var(--hy-ease-out),inline-size var(--hy-dur-settle) var(--hy-ease-out)}.hy-segmented__item{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--hy-space-2);flex:1;min-block-size:2.25rem;padding-inline:var(--hy-space-4);border-radius:var(--hy-segmented-radius, var(--hy-radius-pill));color:var(--hy-ink-2);font-weight:540;white-space:nowrap;cursor:pointer;transition:color var(--hy-dur-quick) var(--hy-ease-out)}:host([data-size=\"sm\"]) .hy-segmented__item{min-block-size:1.75rem;padding-inline:var(--hy-space-3);font-size:var(--hy-step--1);letter-spacing:var(--hy-tracking-small)}:host([data-size=\"lg\"]) .hy-segmented__item{min-block-size:2.75rem;padding-inline:var(--hy-space-5)}.hy-segmented__item:hover,.hy-segmented__item[data-checked]{color:var(--hy-ink)}.hy-segmented__item:has(:disabled){opacity:.45;cursor:not-allowed}.hy-segmented__item:has(:focus-visible){box-shadow:var(--hy-focus-ring)}.hy-segmented__input{position:absolute;inset:0;margin:0;opacity:0;cursor:inherit}@media(forced-colors:active){.hy-segmented__item[data-checked]{outline:2px solid Highlight}}\n"]
|
|
150
|
+
}]
|
|
151
|
+
}],
|
|
152
|
+
propDecorators: {
|
|
153
|
+
row: [{
|
|
154
|
+
type: i0.ViewChild,
|
|
155
|
+
args: ["row", { isSignal: true }]
|
|
156
|
+
}],
|
|
157
|
+
items: [{
|
|
158
|
+
type: i0.ViewChildren,
|
|
159
|
+
args: ["item", {
|
|
160
|
+
read: ElementRef,
|
|
161
|
+
isSignal: true
|
|
162
|
+
}]
|
|
163
|
+
}],
|
|
164
|
+
options: [{
|
|
165
|
+
type: i0.Input,
|
|
166
|
+
args: [{
|
|
167
|
+
isSignal: true,
|
|
168
|
+
alias: "options",
|
|
169
|
+
required: true
|
|
170
|
+
}]
|
|
171
|
+
}],
|
|
172
|
+
value: [{
|
|
173
|
+
type: i0.Input,
|
|
174
|
+
args: [{
|
|
175
|
+
isSignal: true,
|
|
176
|
+
alias: "value",
|
|
177
|
+
required: false
|
|
178
|
+
}]
|
|
179
|
+
}, {
|
|
180
|
+
type: i0.Output,
|
|
181
|
+
args: ["valueChange"]
|
|
182
|
+
}],
|
|
183
|
+
label: [{
|
|
184
|
+
type: i0.Input,
|
|
185
|
+
args: [{
|
|
186
|
+
isSignal: true,
|
|
187
|
+
alias: "label",
|
|
188
|
+
required: false
|
|
189
|
+
}]
|
|
190
|
+
}],
|
|
191
|
+
name: [{
|
|
192
|
+
type: i0.Input,
|
|
193
|
+
args: [{
|
|
194
|
+
isSignal: true,
|
|
195
|
+
alias: "name",
|
|
196
|
+
required: false
|
|
197
|
+
}]
|
|
198
|
+
}],
|
|
199
|
+
disabled: [{
|
|
200
|
+
type: i0.Input,
|
|
201
|
+
args: [{
|
|
202
|
+
isSignal: true,
|
|
203
|
+
alias: "disabled",
|
|
204
|
+
required: false
|
|
205
|
+
}]
|
|
206
|
+
}],
|
|
207
|
+
size: [{
|
|
208
|
+
type: i0.Input,
|
|
209
|
+
args: [{
|
|
210
|
+
isSignal: true,
|
|
211
|
+
alias: "size",
|
|
212
|
+
required: false
|
|
213
|
+
}]
|
|
214
|
+
}],
|
|
215
|
+
touch: [{
|
|
216
|
+
type: i0.Output,
|
|
217
|
+
args: ["touch"]
|
|
218
|
+
}]
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
export { HySegmented };
|
|
222
|
+
|
|
223
|
+
//# sourceMappingURL=hyalo-angular-segmented.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyalo-angular-segmented.mjs","names":["trackIndicator"],"sources":["../../../projects/hyalo/segmented/segmented.ts","../../../projects/hyalo/segmented/segmented.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n booleanAttribute,\r\n input,\r\n model,\r\n output,\r\n viewChild,\r\n viewChildren,\r\n} from '@angular/core';\r\nimport type { FormValueControl } from '@angular/forms/signals';\r\nimport { type HySize, injectId, ɵtrackIndicator as trackIndicator } from '@hyalo/angular';\r\n\r\nimport { HyIcon } from '@hyalo/angular/icon';\r\n\r\n/** One choice in a segmented control. */\r\nexport interface HySegmentedOption<T> {\r\n readonly value: T;\r\n readonly label: string;\r\n readonly icon?: string;\r\n readonly disabled?: boolean;\r\n}\r\n\r\n/**\r\n * A segmented control: a small set of mutually exclusive choices with the\r\n * same sliding indicator as tabs. Use it to pick a value (billing period, a\r\n * view mode). Use tabs when each choice shows a different panel.\r\n *\r\n * It is a group of native radio buttons, so arrow keys, form submission and\r\n * screen readers behave as users expect. Works with Signal Forms through\r\n * `[formField]`, or with `[(value)]`.\r\n *\r\n * ```html\r\n * <hy-segmented label=\"Billing\" [options]=\"periods\" [(value)]=\"period\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'hy-segmented',\r\n imports: [HyIcon],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'hy-segmented',\r\n role: 'radiogroup',\r\n '[attr.aria-label]': 'label() || null',\r\n '[attr.aria-disabled]': 'disabled() || null',\r\n '[attr.data-size]': 'size()',\r\n '[attr.data-ready]': 'ready() || null',\r\n },\r\n templateUrl: './segmented.html',\r\n styleUrl: './segmented.css',\r\n})\r\nexport class HySegmented<T> implements FormValueControl<T | undefined> {\r\n protected readonly groupName = injectId('segmented');\r\n private readonly row = viewChild<ElementRef<HTMLElement>>('row');\r\n private readonly items = viewChildren('item', { read: ElementRef<HTMLElement> });\r\n\r\n /** The choices. */\r\n readonly options = input.required<readonly HySegmentedOption<T>[]>();\r\n /** Selected value. Two-way bindable. */\r\n readonly value = model<T | undefined>(undefined);\r\n /** Accessible name of the group. */\r\n readonly label = input<string>();\r\n /** Name shared by the radio inputs. Generated when not set. */\r\n readonly name = input<string>('');\r\n /** Disables every option. */\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Control size. */\r\n readonly size = input<HySize>('md');\r\n /** Emits when focus leaves an option, so forms can mark the field touched. */\r\n readonly touch = output<void>();\r\n\r\n protected readonly ready = trackIndicator(this.row, () => {\r\n const index = this.options().findIndex((o) => o.value === this.value());\r\n return this.items()[index]?.nativeElement ?? null;\r\n });\r\n}\r\n","<div #row class=\"hy-segmented__row\">\r\n <span class=\"hy-segmented__indicator\" aria-hidden=\"true\"></span>\r\n @for (option of options(); track option.value) {\r\n <label\r\n #item\r\n class=\"hy-segmented__item\"\r\n [attr.data-checked]=\"option.value === value() || null\"\r\n >\r\n <input\r\n type=\"radio\"\r\n class=\"hy-segmented__input\"\r\n [name]=\"name() || groupName\"\r\n [checked]=\"option.value === value()\"\r\n [disabled]=\"disabled() || !!option.disabled\"\r\n (change)=\"value.set(option.value)\"\r\n (blur)=\"touch.emit()\"\r\n />\r\n @if (option.icon; as icon) {\r\n <hy-icon [name]=\"icon\" />\r\n }\r\n <span>{{ option.label }}</span>\r\n </label>\r\n }\r\n</div>\r\n"],"mappings":";;;;AAoDA,IAAa,cAAb,MAAa,YAAW;CACH,YAAY,SAAS,WAAW;CAClC,MAAM,UAAmC,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C,QAAQ,aAAa,QAAM;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,MAAM;CAAuB,CAAA;CAGpE,UAAU,MAAM,SAA2C,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE3D,QAAQ,MAAqB,QAAU,GAAA,YAAA,CAA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