@slotted/angular 0.1.0-beta.12 → 0.1.0-beta.13
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/docs/action-bar.json +1 -0
- package/docs/action-bar.md +1 -1
- package/docs/action-sheet.json +391 -64
- package/docs/action-sheet.md +259 -0
- package/docs/alert.json +1 -1
- package/docs/alert.md +1 -1
- package/docs/combobox.json +1 -0
- package/docs/combobox.md +1 -1
- package/docs/data-grid.json +1 -1
- package/docs/date-picker.json +1 -0
- package/docs/date-picker.md +1 -1
- package/docs/drawer.json +1 -0
- package/docs/drawer.md +1 -1
- package/docs/entity-picker.json +1 -0
- package/docs/entity-picker.md +1 -1
- package/docs/inline-message.json +1 -1
- package/docs/inline-message.md +1 -1
- package/docs/kbd.json +3 -0
- package/docs/kbd.md +1 -1
- package/docs/menu.json +1 -0
- package/docs/menu.md +1 -1
- package/docs/popover.json +1 -0
- package/docs/popover.md +1 -1
- package/docs/scroll-area.json +266 -64
- package/docs/scroll-area.md +188 -0
- package/docs/section.json +11 -1
- package/docs/section.md +13 -12
- package/docs/select.json +1 -0
- package/docs/select.md +1 -1
- package/docs/skills/theme-app/SKILL.md +18 -4
- package/docs/splitter.json +279 -64
- package/docs/splitter.md +215 -0
- package/docs/status-indicator.json +16 -5
- package/docs/status-indicator.md +3 -1
- package/docs/table-of-contents.json +2 -1
- package/docs/table-of-contents.md +2 -2
- package/docs/tooltip.json +1 -0
- package/docs/tooltip.md +1 -1
- package/fesm2022/slotted-angular-action-bar.mjs +2 -2
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-alert.mjs +7 -7
- package/fesm2022/slotted-angular-alert.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +2 -2
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +2 -2
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +2 -2
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-dialog.mjs +8 -8
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +166 -50
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +2 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-icon.mjs +185 -87
- package/fesm2022/slotted-angular-icon.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +7 -7
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-kbd.mjs +4 -4
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
- package/fesm2022/slotted-angular-menu.mjs +2 -2
- package/fesm2022/slotted-angular-menu.mjs.map +1 -1
- package/fesm2022/slotted-angular-multi-select.mjs +2 -2
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +2 -2
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +30 -3
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +2 -2
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +30 -13
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-table-of-contents.mjs +2 -2
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -1
- package/fesm2022/slotted-angular-theme.mjs +6 -3
- package/fesm2022/slotted-angular-theme.mjs.map +1 -1
- package/fesm2022/slotted-angular-toast.mjs +8 -8
- package/fesm2022/slotted-angular-toast.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +2 -2
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-alert.d.ts +2 -1
- package/types/slotted-angular-alert.d.ts.map +1 -1
- package/types/slotted-angular-attachment.d.ts +2 -1
- package/types/slotted-angular-attachment.d.ts.map +1 -1
- package/types/slotted-angular-code-block.d.ts +2 -1
- package/types/slotted-angular-code-block.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +2 -1
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-combobox.d.ts +2 -1
- package/types/slotted-angular-combobox.d.ts.map +1 -1
- package/types/slotted-angular-dialog.d.ts +2 -1
- package/types/slotted-angular-dialog.d.ts.map +1 -1
- package/types/slotted-angular-drawer.d.ts +17 -0
- package/types/slotted-angular-drawer.d.ts.map +1 -1
- package/types/slotted-angular-icon.d.ts +12 -2
- package/types/slotted-angular-icon.d.ts.map +1 -1
- package/types/slotted-angular-inline-message.d.ts +3 -2
- package/types/slotted-angular-inline-message.d.ts.map +1 -1
- package/types/slotted-angular-multi-select.d.ts +2 -1
- package/types/slotted-angular-multi-select.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +3 -1
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +2 -1
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-status-indicator.d.ts +13 -3
- package/types/slotted-angular-status-indicator.d.ts.map +1 -1
- package/types/slotted-angular-stepper.d.ts +2 -1
- package/types/slotted-angular-stepper.d.ts.map +1 -1
- package/types/slotted-angular-theme.d.ts +6 -4
- package/types/slotted-angular-theme.d.ts.map +1 -1
- package/types/slotted-angular-toast.d.ts +4 -2
- package/types/slotted-angular-toast.d.ts.map +1 -1
- package/types/slotted-angular-upload.d.ts +4 -2
- package/types/slotted-angular-upload.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component, inject, HostAttributeToken, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { GLYPH_VIEW_BOX, GLYPHS } from '@slotted/core/glyph';
|
|
3
|
+
import { GLYPH_VIEW_BOX, isStatusGlyph, STATUS_GLYPH_GRIDS, STATUS_GLYPHS, GLYPHS } from '@slotted/core/glyph';
|
|
4
4
|
|
|
5
5
|
let sequence = 0;
|
|
6
6
|
/**
|
|
@@ -15,6 +15,9 @@ let sequence = 0;
|
|
|
15
15
|
* shape filled, and the symbol inside it cut out of the fill by an SVG
|
|
16
16
|
* `<mask>`, so whatever lies behind shows through the symbol on any ground.
|
|
17
17
|
*
|
|
18
|
+
* A status mark (`status-*`) is always solid, and is drawn once per grid it
|
|
19
|
+
* was drawn on; `icon.css` shows the grid the icon box is sized for.
|
|
20
|
+
*
|
|
18
21
|
* The children carry the `svg:` namespace because the template is parsed apart
|
|
19
22
|
* from its host: an unprefixed `<path>` would be created as an HTML element.
|
|
20
23
|
*/
|
|
@@ -30,7 +33,22 @@ class SlGlyph {
|
|
|
30
33
|
solid = input(false, { ...(ngDevMode ? { debugName: "solid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
31
34
|
maskId = `sl-glyph-${String((sequence += 1))}`;
|
|
32
35
|
viewBox = GLYPH_VIEW_BOX;
|
|
33
|
-
drawing
|
|
36
|
+
/** A status mark's drawing on each of its grids; `null` for a Lucide glyph. */
|
|
37
|
+
grids = computed(() => {
|
|
38
|
+
const name = this.name();
|
|
39
|
+
return isStatusGlyph(name)
|
|
40
|
+
? STATUS_GLYPH_GRIDS.map((size) => ({ size, drawing: STATUS_GLYPHS[name][size] }))
|
|
41
|
+
: null;
|
|
42
|
+
}, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "grids" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/** Painted by the root's own fill or stroke rather than by a solid shape. */
|
|
45
|
+
painted = computed(() => !this.solid() && this.grids() === null, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "painted" }] : /* istanbul ignore next */ []));
|
|
47
|
+
/* A status mark has no Lucide drawing, and reads none: `dot` only keeps the signal typed. */
|
|
48
|
+
drawing = computed(() => {
|
|
49
|
+
const name = this.name();
|
|
50
|
+
return isStatusGlyph(name) ? GLYPHS.dot : GLYPHS[name];
|
|
51
|
+
}, /* @ts-ignore */
|
|
34
52
|
...(ngDevMode ? [{ debugName: "drawing" }] : /* istanbul ignore next */ []));
|
|
35
53
|
symbol = computed(() => this.drawing().paths.slice(1), /* @ts-ignore */
|
|
36
54
|
...(ngDevMode ? [{ debugName: "symbol" }] : /* istanbul ignore next */ []));
|
|
@@ -42,96 +60,176 @@ class SlGlyph {
|
|
|
42
60
|
}, /* @ts-ignore */
|
|
43
61
|
...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
44
62
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlGlyph, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlGlyph, isStandalone: true, selector: "svg[slGlyph]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, solid: { classPropertyName: "solid", publicName: "solid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "focusable": "false", "data-part": "glyph", "data-part-glyph": "" }, properties: { "attr.data-glyph": "name()", "attr.viewBox": "viewBox", "attr.data-solid": "
|
|
46
|
-
|
|
47
|
-
<svg:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlGlyph, isStandalone: true, selector: "svg[slGlyph]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, solid: { classPropertyName: "solid", publicName: "solid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "focusable": "false", "data-part": "glyph", "data-part-glyph": "" }, properties: { "attr.data-glyph": "name()", "attr.viewBox": "grids() ? '0 0 16 16' : viewBox", "attr.data-solid": "painted() ? null : ''", "attr.fill": "painted() ? (stroked() ? 'none' : 'currentColor') : null", "attr.stroke": "painted() && stroked() ? 'currentColor' : null", "attr.stroke-width": "painted() && stroked() ? drawing().strokeWidth : null", "attr.stroke-linecap": "painted() && stroked() ? 'round' : null", "attr.stroke-linejoin": "painted() && stroked() ? 'round' : null" } }, ngImport: i0, template: `@if (grids(); as grids) {
|
|
64
|
+
@for (grid of grids; track grid.size) {
|
|
65
|
+
<svg:svg [attr.data-grid]="grid.size" [attr.viewBox]="'0 0 ' + grid.size + ' ' + grid.size">
|
|
66
|
+
<svg:defs>
|
|
67
|
+
<svg:mask
|
|
68
|
+
[attr.id]="maskId + '-' + grid.size"
|
|
69
|
+
maskUnits="userSpaceOnUse"
|
|
70
|
+
x="0"
|
|
71
|
+
y="0"
|
|
72
|
+
[attr.width]="grid.size"
|
|
73
|
+
[attr.height]="grid.size"
|
|
74
|
+
>
|
|
75
|
+
<svg:rect fill="#fff" [attr.width]="grid.size" [attr.height]="grid.size" />
|
|
76
|
+
@for (d of grid.drawing.holes; track $index) {
|
|
77
|
+
<svg:path [attr.d]="d" fill="#000" />
|
|
78
|
+
}
|
|
79
|
+
@for (d of grid.drawing.strokes; track $index) {
|
|
80
|
+
<svg:path
|
|
81
|
+
[attr.d]="d"
|
|
82
|
+
fill="none"
|
|
83
|
+
stroke="#000"
|
|
84
|
+
stroke-linecap="round"
|
|
85
|
+
stroke-linejoin="round"
|
|
86
|
+
stroke-width="2"
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
</svg:mask>
|
|
90
|
+
</svg:defs>
|
|
91
|
+
<svg:path
|
|
92
|
+
[attr.d]="grid.drawing.shape"
|
|
93
|
+
fill="currentColor"
|
|
94
|
+
[attr.mask]="'url(#' + maskId + '-' + grid.size + ')'"
|
|
95
|
+
[attr.stroke]="grid.drawing.shapeStroke === 0 ? null : 'currentColor'"
|
|
96
|
+
[attr.stroke-linejoin]="grid.drawing.shapeStroke === 0 ? null : 'round'"
|
|
97
|
+
[attr.stroke-width]="grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke"
|
|
98
|
+
/>
|
|
99
|
+
</svg:svg>
|
|
100
|
+
}
|
|
101
|
+
} @else {
|
|
102
|
+
@if (solid()) {
|
|
103
|
+
<svg:defs>
|
|
104
|
+
<svg:mask
|
|
105
|
+
[attr.id]="maskId"
|
|
106
|
+
maskUnits="userSpaceOnUse"
|
|
107
|
+
x="-2"
|
|
108
|
+
y="-2"
|
|
109
|
+
width="28"
|
|
110
|
+
height="28"
|
|
111
|
+
>
|
|
112
|
+
<svg:rect x="-2" y="-2" width="28" height="28" fill="#fff" />
|
|
113
|
+
<svg:g
|
|
114
|
+
fill="none"
|
|
115
|
+
stroke="#000"
|
|
116
|
+
stroke-linecap="round"
|
|
117
|
+
stroke-linejoin="round"
|
|
118
|
+
[attr.stroke-width]="drawing().strokeWidth"
|
|
119
|
+
>
|
|
120
|
+
@for (d of symbol(); track $index) {
|
|
121
|
+
<svg:path [attr.d]="d" />
|
|
122
|
+
}
|
|
123
|
+
</svg:g>
|
|
124
|
+
</svg:mask>
|
|
125
|
+
</svg:defs>
|
|
126
|
+
}
|
|
127
|
+
<svg:g [attr.transform]="transform()">
|
|
128
|
+
@if (solid()) {
|
|
129
|
+
<svg:path
|
|
130
|
+
[attr.d]="drawing().paths[0]"
|
|
131
|
+
fill="currentColor"
|
|
132
|
+
stroke="currentColor"
|
|
59
133
|
stroke-linecap="round"
|
|
60
134
|
stroke-linejoin="round"
|
|
61
135
|
[attr.stroke-width]="drawing().strokeWidth"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</svg:defs>
|
|
69
|
-
}
|
|
70
|
-
<svg:g [attr.transform]="transform()">
|
|
71
|
-
@if (solid()) {
|
|
72
|
-
<svg:path
|
|
73
|
-
[attr.d]="drawing().paths[0]"
|
|
74
|
-
fill="currentColor"
|
|
75
|
-
stroke="currentColor"
|
|
76
|
-
stroke-linecap="round"
|
|
77
|
-
stroke-linejoin="round"
|
|
78
|
-
[attr.stroke-width]="drawing().strokeWidth"
|
|
79
|
-
[attr.mask]="'url(#' + maskId + ')'"
|
|
80
|
-
/>
|
|
81
|
-
} @else {
|
|
82
|
-
@for (d of drawing().paths; track $index) {
|
|
83
|
-
<svg:path [attr.d]="d" />
|
|
136
|
+
[attr.mask]="'url(#' + maskId + ')'"
|
|
137
|
+
/>
|
|
138
|
+
} @else {
|
|
139
|
+
@for (d of drawing().paths; track $index) {
|
|
140
|
+
<svg:path [attr.d]="d" />
|
|
141
|
+
}
|
|
84
142
|
}
|
|
85
|
-
|
|
86
|
-
|
|
143
|
+
</svg:g>
|
|
144
|
+
}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
87
145
|
}
|
|
88
146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlGlyph, decorators: [{
|
|
89
147
|
type: Component,
|
|
90
148
|
args: [{
|
|
91
149
|
selector: 'svg[slGlyph]',
|
|
92
150
|
standalone: true,
|
|
93
|
-
template: `@if (
|
|
94
|
-
|
|
95
|
-
<svg:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
151
|
+
template: `@if (grids(); as grids) {
|
|
152
|
+
@for (grid of grids; track grid.size) {
|
|
153
|
+
<svg:svg [attr.data-grid]="grid.size" [attr.viewBox]="'0 0 ' + grid.size + ' ' + grid.size">
|
|
154
|
+
<svg:defs>
|
|
155
|
+
<svg:mask
|
|
156
|
+
[attr.id]="maskId + '-' + grid.size"
|
|
157
|
+
maskUnits="userSpaceOnUse"
|
|
158
|
+
x="0"
|
|
159
|
+
y="0"
|
|
160
|
+
[attr.width]="grid.size"
|
|
161
|
+
[attr.height]="grid.size"
|
|
162
|
+
>
|
|
163
|
+
<svg:rect fill="#fff" [attr.width]="grid.size" [attr.height]="grid.size" />
|
|
164
|
+
@for (d of grid.drawing.holes; track $index) {
|
|
165
|
+
<svg:path [attr.d]="d" fill="#000" />
|
|
166
|
+
}
|
|
167
|
+
@for (d of grid.drawing.strokes; track $index) {
|
|
168
|
+
<svg:path
|
|
169
|
+
[attr.d]="d"
|
|
170
|
+
fill="none"
|
|
171
|
+
stroke="#000"
|
|
172
|
+
stroke-linecap="round"
|
|
173
|
+
stroke-linejoin="round"
|
|
174
|
+
stroke-width="2"
|
|
175
|
+
/>
|
|
176
|
+
}
|
|
177
|
+
</svg:mask>
|
|
178
|
+
</svg:defs>
|
|
179
|
+
<svg:path
|
|
180
|
+
[attr.d]="grid.drawing.shape"
|
|
181
|
+
fill="currentColor"
|
|
182
|
+
[attr.mask]="'url(#' + maskId + '-' + grid.size + ')'"
|
|
183
|
+
[attr.stroke]="grid.drawing.shapeStroke === 0 ? null : 'currentColor'"
|
|
184
|
+
[attr.stroke-linejoin]="grid.drawing.shapeStroke === 0 ? null : 'round'"
|
|
185
|
+
[attr.stroke-width]="grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke"
|
|
186
|
+
/>
|
|
187
|
+
</svg:svg>
|
|
188
|
+
}
|
|
189
|
+
} @else {
|
|
190
|
+
@if (solid()) {
|
|
191
|
+
<svg:defs>
|
|
192
|
+
<svg:mask
|
|
193
|
+
[attr.id]="maskId"
|
|
194
|
+
maskUnits="userSpaceOnUse"
|
|
195
|
+
x="-2"
|
|
196
|
+
y="-2"
|
|
197
|
+
width="28"
|
|
198
|
+
height="28"
|
|
199
|
+
>
|
|
200
|
+
<svg:rect x="-2" y="-2" width="28" height="28" fill="#fff" />
|
|
201
|
+
<svg:g
|
|
202
|
+
fill="none"
|
|
203
|
+
stroke="#000"
|
|
204
|
+
stroke-linecap="round"
|
|
205
|
+
stroke-linejoin="round"
|
|
206
|
+
[attr.stroke-width]="drawing().strokeWidth"
|
|
207
|
+
>
|
|
208
|
+
@for (d of symbol(); track $index) {
|
|
209
|
+
<svg:path [attr.d]="d" />
|
|
210
|
+
}
|
|
211
|
+
</svg:g>
|
|
212
|
+
</svg:mask>
|
|
213
|
+
</svg:defs>
|
|
214
|
+
}
|
|
215
|
+
<svg:g [attr.transform]="transform()">
|
|
216
|
+
@if (solid()) {
|
|
217
|
+
<svg:path
|
|
218
|
+
[attr.d]="drawing().paths[0]"
|
|
219
|
+
fill="currentColor"
|
|
220
|
+
stroke="currentColor"
|
|
107
221
|
stroke-linecap="round"
|
|
108
222
|
stroke-linejoin="round"
|
|
109
223
|
[attr.stroke-width]="drawing().strokeWidth"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</svg:defs>
|
|
117
|
-
}
|
|
118
|
-
<svg:g [attr.transform]="transform()">
|
|
119
|
-
@if (solid()) {
|
|
120
|
-
<svg:path
|
|
121
|
-
[attr.d]="drawing().paths[0]"
|
|
122
|
-
fill="currentColor"
|
|
123
|
-
stroke="currentColor"
|
|
124
|
-
stroke-linecap="round"
|
|
125
|
-
stroke-linejoin="round"
|
|
126
|
-
[attr.stroke-width]="drawing().strokeWidth"
|
|
127
|
-
[attr.mask]="'url(#' + maskId + ')'"
|
|
128
|
-
/>
|
|
129
|
-
} @else {
|
|
130
|
-
@for (d of drawing().paths; track $index) {
|
|
131
|
-
<svg:path [attr.d]="d" />
|
|
224
|
+
[attr.mask]="'url(#' + maskId + ')'"
|
|
225
|
+
/>
|
|
226
|
+
} @else {
|
|
227
|
+
@for (d of drawing().paths; track $index) {
|
|
228
|
+
<svg:path [attr.d]="d" />
|
|
229
|
+
}
|
|
132
230
|
}
|
|
133
|
-
|
|
134
|
-
|
|
231
|
+
</svg:g>
|
|
232
|
+
}`,
|
|
135
233
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
136
234
|
host: {
|
|
137
235
|
'aria-hidden': 'true',
|
|
@@ -139,13 +237,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
139
237
|
'data-part': 'glyph',
|
|
140
238
|
'data-part-glyph': '',
|
|
141
239
|
'[attr.data-glyph]': 'name()',
|
|
142
|
-
'[attr.viewBox]': 'viewBox
|
|
143
|
-
'[attr.data-solid]': "
|
|
144
|
-
'[attr.fill]': "
|
|
145
|
-
'[attr.stroke]': "
|
|
146
|
-
'[attr.stroke-width]': '
|
|
147
|
-
'[attr.stroke-linecap]': "
|
|
148
|
-
'[attr.stroke-linejoin]': "
|
|
240
|
+
'[attr.viewBox]': "grids() ? '0 0 16 16' : viewBox",
|
|
241
|
+
'[attr.data-solid]': "painted() ? null : ''",
|
|
242
|
+
'[attr.fill]': "painted() ? (stroked() ? 'none' : 'currentColor') : null",
|
|
243
|
+
'[attr.stroke]': "painted() && stroked() ? 'currentColor' : null",
|
|
244
|
+
'[attr.stroke-width]': 'painted() && stroked() ? drawing().strokeWidth : null',
|
|
245
|
+
'[attr.stroke-linecap]': "painted() && stroked() ? 'round' : null",
|
|
246
|
+
'[attr.stroke-linejoin]': "painted() && stroked() ? 'round' : null",
|
|
149
247
|
},
|
|
150
248
|
}]
|
|
151
249
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], solid: [{ type: i0.Input, args: [{ isSignal: true, alias: "solid", required: false }] }] } });
|
|
@@ -209,7 +307,7 @@ class SlIcon {
|
|
|
209
307
|
toneAttribute = computed(() => toneAttribute(this.tone()), /* @ts-ignore */
|
|
210
308
|
...(ngDevMode ? [{ debugName: "toneAttribute" }] : /* istanbul ignore next */ []));
|
|
211
309
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
212
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlIcon, isStandalone: true, selector: "[slIcon]", inputs: { directional: { classPropertyName: "directional", publicName: "directional", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-ui": "icon", "data-ui-icon": "", "data-part": "root", "data-part-root": "" }, properties: { "attr.data-size": "size() ?? null", "attr.data-tone": "toneAttribute()", "attr.data-directional": "directional() ? \"\" : null", "attr.role": "role()", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "named() ? null : \"true\"" } }, exportAs: ["slIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@layer slotted.components{[data-ui-icon]{--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));align-items:center;block-size:var(--_size);display:inline-flex;flex:none;inline-size:var(--_size);justify-content:center;line-height:1;vertical-align:var(--slotted-icon-baseline-shift, calc(.5cap - .5 * var(--_size)))}[data-ui-icon]>*,[data-ui-icon] svg{block-size:100%;display:block;font-size:var(--_size);inline-size:100%}[data-ui-icon][data-size=text]{--slotted-icon-size: 1em}[data-ui-icon][data-size=sm]{--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px)}[data-ui-icon][data-size=md]{--slotted-icon-size: var(--slotted-control-icon-size-md, 16px)}[data-ui-icon][data-size=lg]{--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px)}[data-ui-icon][data-tone=default]{color:var(--slotted-text, CanvasText)}[data-ui-icon][data-tone=muted]{color:var(--slotted-text-muted, GrayText)}[data-ui-icon][data-tone=accent]{color:var(--slotted-tone-accent-text, LinkText)}[data-ui-icon][data-tone=success]{color:var(--slotted-tone-success-text, CanvasText)}[data-ui-icon][data-tone=info]{color:var(--slotted-tone-info-text, CanvasText)}[data-ui-icon][data-tone=warning]{color:var(--slotted-tone-warning-text, CanvasText)}[data-ui-icon][data-tone=danger]{color:var(--slotted-tone-danger-text, CanvasText)}[data-ui-icon][data-tone=inverse]{color:var(--slotted-text-inverse, Canvas)}[data-ui-icon][data-directional]:dir(rtl){scale:-1 1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlIcon, isStandalone: true, selector: "[slIcon]", inputs: { directional: { classPropertyName: "directional", publicName: "directional", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-ui": "icon", "data-ui-icon": "", "data-part": "root", "data-part-root": "" }, properties: { "attr.data-size": "size() ?? null", "attr.data-tone": "toneAttribute()", "attr.data-directional": "directional() ? \"\" : null", "attr.role": "role()", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "named() ? null : \"true\"" } }, exportAs: ["slIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@layer slotted.components{[data-ui-icon]{--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));align-items:center;block-size:var(--_size);display:inline-flex;flex:none;inline-size:var(--_size);justify-content:center;line-height:1;vertical-align:var(--slotted-icon-baseline-shift, calc(.5cap - .5 * var(--_size)))}[data-ui-icon]>*,[data-ui-icon] svg{block-size:100%;display:block;font-size:var(--_size);inline-size:100%}[data-ui-icon]:has(>svg>svg[data-grid]){container-type:size}[data-ui-icon] svg[data-grid]{display:none}@container (width < 13px){[data-ui-icon] svg[data-grid=\"12\"]{display:block}}@container (13px <= width < 15px){[data-ui-icon] svg[data-grid=\"14\"]{display:block}}@container (width >= 15px){[data-ui-icon] svg[data-grid=\"16\"]{display:block}}@media(max-resolution:.99dppx){[data-ui-icon] svg[data-grid]{display:none}[data-ui-icon] svg[data-grid=\"12\"]{display:block}}[data-ui-icon][data-size=text]{--slotted-icon-size: 1em}[data-ui-icon][data-size=sm]{--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px)}[data-ui-icon][data-size=md]{--slotted-icon-size: var(--slotted-control-icon-size-md, 16px)}[data-ui-icon][data-size=lg]{--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px)}[data-ui-icon][data-tone=default]{color:var(--slotted-text, CanvasText)}[data-ui-icon][data-tone=muted]{color:var(--slotted-text-muted, GrayText)}[data-ui-icon][data-tone=accent]{color:var(--slotted-tone-accent-text, LinkText)}[data-ui-icon][data-tone=success]{color:var(--slotted-tone-success-text, CanvasText)}[data-ui-icon][data-tone=info]{color:var(--slotted-tone-info-text, CanvasText)}[data-ui-icon][data-tone=warning]{color:var(--slotted-tone-warning-text, CanvasText)}[data-ui-icon][data-tone=danger]{color:var(--slotted-tone-danger-text, CanvasText)}[data-ui-icon][data-tone=inverse]{color:var(--slotted-text-inverse, Canvas)}[data-ui-icon][data-directional]:dir(rtl){scale:-1 1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
213
311
|
}
|
|
214
312
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlIcon, decorators: [{
|
|
215
313
|
type: Component,
|
|
@@ -224,7 +322,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
224
322
|
'[attr.role]': 'role()',
|
|
225
323
|
'[attr.aria-label]': 'ariaLabel()',
|
|
226
324
|
'[attr.aria-hidden]': 'named() ? null : "true"',
|
|
227
|
-
}, styles: ["@layer slotted.components{[data-ui-icon]{--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));align-items:center;block-size:var(--_size);display:inline-flex;flex:none;inline-size:var(--_size);justify-content:center;line-height:1;vertical-align:var(--slotted-icon-baseline-shift, calc(.5cap - .5 * var(--_size)))}[data-ui-icon]>*,[data-ui-icon] svg{block-size:100%;display:block;font-size:var(--_size);inline-size:100%}[data-ui-icon][data-size=text]{--slotted-icon-size: 1em}[data-ui-icon][data-size=sm]{--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px)}[data-ui-icon][data-size=md]{--slotted-icon-size: var(--slotted-control-icon-size-md, 16px)}[data-ui-icon][data-size=lg]{--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px)}[data-ui-icon][data-tone=default]{color:var(--slotted-text, CanvasText)}[data-ui-icon][data-tone=muted]{color:var(--slotted-text-muted, GrayText)}[data-ui-icon][data-tone=accent]{color:var(--slotted-tone-accent-text, LinkText)}[data-ui-icon][data-tone=success]{color:var(--slotted-tone-success-text, CanvasText)}[data-ui-icon][data-tone=info]{color:var(--slotted-tone-info-text, CanvasText)}[data-ui-icon][data-tone=warning]{color:var(--slotted-tone-warning-text, CanvasText)}[data-ui-icon][data-tone=danger]{color:var(--slotted-tone-danger-text, CanvasText)}[data-ui-icon][data-tone=inverse]{color:var(--slotted-text-inverse, Canvas)}[data-ui-icon][data-directional]:dir(rtl){scale:-1 1}}\n"] }]
|
|
325
|
+
}, styles: ["@layer slotted.components{[data-ui-icon]{--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));align-items:center;block-size:var(--_size);display:inline-flex;flex:none;inline-size:var(--_size);justify-content:center;line-height:1;vertical-align:var(--slotted-icon-baseline-shift, calc(.5cap - .5 * var(--_size)))}[data-ui-icon]>*,[data-ui-icon] svg{block-size:100%;display:block;font-size:var(--_size);inline-size:100%}[data-ui-icon]:has(>svg>svg[data-grid]){container-type:size}[data-ui-icon] svg[data-grid]{display:none}@container (width < 13px){[data-ui-icon] svg[data-grid=\"12\"]{display:block}}@container (13px <= width < 15px){[data-ui-icon] svg[data-grid=\"14\"]{display:block}}@container (width >= 15px){[data-ui-icon] svg[data-grid=\"16\"]{display:block}}@media(max-resolution:.99dppx){[data-ui-icon] svg[data-grid]{display:none}[data-ui-icon] svg[data-grid=\"12\"]{display:block}}[data-ui-icon][data-size=text]{--slotted-icon-size: 1em}[data-ui-icon][data-size=sm]{--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px)}[data-ui-icon][data-size=md]{--slotted-icon-size: var(--slotted-control-icon-size-md, 16px)}[data-ui-icon][data-size=lg]{--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px)}[data-ui-icon][data-tone=default]{color:var(--slotted-text, CanvasText)}[data-ui-icon][data-tone=muted]{color:var(--slotted-text-muted, GrayText)}[data-ui-icon][data-tone=accent]{color:var(--slotted-tone-accent-text, LinkText)}[data-ui-icon][data-tone=success]{color:var(--slotted-tone-success-text, CanvasText)}[data-ui-icon][data-tone=info]{color:var(--slotted-tone-info-text, CanvasText)}[data-ui-icon][data-tone=warning]{color:var(--slotted-tone-warning-text, CanvasText)}[data-ui-icon][data-tone=danger]{color:var(--slotted-tone-danger-text, CanvasText)}[data-ui-icon][data-tone=inverse]{color:var(--slotted-text-inverse, Canvas)}[data-ui-icon][data-directional]:dir(rtl){scale:-1 1}}\n"] }]
|
|
228
326
|
}], propDecorators: { directional: [{ type: i0.Input, args: [{ isSignal: true, alias: "directional", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }] } });
|
|
229
327
|
|
|
230
328
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotted-angular-icon.mjs","sources":["../../icon/src/glyph.ts","../../icon/src/icon.types.ts","../../icon/src/icon.ts","../../icon/src/slotted-angular-icon.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { GLYPH_VIEW_BOX, GLYPHS } from '@slotted/core/glyph';\nimport type { GlyphDrawing, GlyphName } from '@slotted/core/glyph';\n\nlet sequence = 0;\n\n/**\n * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide\n * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.\n * It goes inside a `slIcon` box, which owns the size, the colour, the\n * alignment and the name; the glyph owns only the drawing. Every family draws\n * its own icons — a close button's cross, a pager's chevrons — with this\n * element, and never with a pseudo-element or a mask of its own.\n *\n * `solid` draws a status mark the way a tone's badge reads: the glyph's first\n * shape filled, and the symbol inside it cut out of the fill by an SVG\n * `<mask>`, so whatever lies behind shows through the symbol on any ground.\n *\n * The children carry the `svg:` namespace because the template is parsed apart\n * from its host: an unprefixed `<path>` would be created as an HTML element.\n */\n@Component({\n selector: 'svg[slGlyph]',\n standalone: true,\n template: `@if (solid()) {\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId\"\n maskUnits=\"userSpaceOnUse\"\n x=\"-2\"\n y=\"-2\"\n width=\"28\"\n height=\"28\"\n >\n <svg:rect x=\"-2\" y=\"-2\" width=\"28\" height=\"28\" fill=\"#fff\" />\n <svg:g\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n >\n @for (d of symbol(); track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n </svg:g>\n </svg:mask>\n </svg:defs>\n }\n <svg:g [attr.transform]=\"transform()\">\n @if (solid()) {\n <svg:path\n [attr.d]=\"drawing().paths[0]\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n [attr.mask]=\"'url(#' + maskId + ')'\"\n />\n } @else {\n @for (d of drawing().paths; track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n }\n </svg:g>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'aria-hidden': 'true',\n focusable: 'false',\n 'data-part': 'glyph',\n 'data-part-glyph': '',\n '[attr.data-glyph]': 'name()',\n '[attr.viewBox]': 'viewBox',\n '[attr.data-solid]': \"solid() ? '' : null\",\n '[attr.fill]': \"solid() ? null : stroked() ? 'none' : 'currentColor'\",\n '[attr.stroke]': \"!solid() && stroked() ? 'currentColor' : null\",\n '[attr.stroke-width]': '!solid() && stroked() ? drawing().strokeWidth : null',\n '[attr.stroke-linecap]': \"!solid() && stroked() ? 'round' : null\",\n '[attr.stroke-linejoin]': \"!solid() && stroked() ? 'round' : null\",\n },\n})\nexport class SlGlyph {\n /** One of the library's own icons: its glyph token without `--slotted-icon-`. */\n readonly name = input.required<GlyphName>();\n /**\n * The first shape filled and the symbol cut out of it — a tone's status\n * mark. For glyphs whose first shape encloses the rest (`circle-*`,\n * `triangle-alert`).\n */\n readonly solid = input(false, { transform: booleanAttribute });\n\n protected readonly maskId = `sl-glyph-${String((sequence += 1))}`;\n\n protected readonly viewBox = GLYPH_VIEW_BOX;\n protected readonly drawing = computed<GlyphDrawing>(() => GLYPHS[this.name()]);\n protected readonly symbol = computed(() => this.drawing().paths.slice(1));\n protected readonly stroked = computed(() => this.drawing().paint === 'stroke');\n protected readonly transform = computed(() => {\n const [dx, dy] = this.drawing().offset;\n return dx === 0 && dy === 0 ? null : `translate(${dx} ${dy})`;\n });\n}\n","/**\n * Three steps read the control icon scale, which the theme restates per\n * density. `text` follows the type the icon sits in, because a control-sized\n * glyph inside a display heading is not an icon.\n */\nexport type IconSize = 'text' | 'sm' | 'md' | 'lg';\n\nexport type IconTone =\n | 'inherit'\n | 'default'\n | 'muted'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inverse';\n\n/**\n * `inherit` is the absence of a colour rather than a colour of its own, so it\n * removes the attribute and lets the surface decide.\n */\nexport function toneAttribute(tone: IconTone | undefined): string | null {\n return tone === undefined || tone === 'inherit' ? null : tone;\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { toneAttribute } from './icon.types';\nimport type { IconSize, IconTone } from './icon.types';\n\n/**\n * Icon is the box a glyph is drawn in, not the glyph. The library ships no\n * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,\n * anything that renders one — and this family owns the size it is drawn at,\n * the colour it inherits, where it sits against a line of text, and whether it\n * mirrors where reading runs the other way.\n *\n * The selector is the bare attribute, so the consumer writes the element. It\n * is a component rather than a directive only because a directive carries no\n * `styleUrl`, and that also means it cannot sit on `<ng-icon>` itself: Angular\n * refuses two components on one element, so the box is always written.\n */\n@Component({\n selector: '[slIcon]',\n standalone: true,\n exportAs: 'slIcon',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/icon/icon.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'icon',\n 'data-ui-icon': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'size() ?? null',\n '[attr.data-tone]': 'toneAttribute()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'named() ? null : \"true\"',\n },\n})\nexport class SlIcon {\n readonly directional = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly size = input<IconSize>();\n readonly tone = input<IconTone>();\n\n /**\n * A name the consumer wrote on the element counts as much as the input, and\n * has to be read rather than assumed absent: a host binding that wrote\n * `null` would delete the consumer's own `aria-label` and hide the icon it\n * named, which is a silent defect in the likeliest mistake. `aria-labelledby`\n * is read and never written, so the attribute the consumer put there stays\n * exactly as written.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.writtenLabel);\n\n /**\n * The icon is decorative when it has no name and meaningful when it has one,\n * which is why there is no `decorative` input: named and hidden cannot both\n * be true.\n */\n protected readonly named = computed(\n () => this.ariaLabel() !== null || this.writtenLabelledBy !== null,\n );\n\n /**\n * `role=\"img\"` requires a name, so it appears only once there is one, and a\n * role the consumer chose is left alone.\n */\n protected readonly role = computed(() =>\n this.writtenRole === null ? (this.named() ? 'img' : null) : this.writtenRole,\n );\n\n protected readonly toneAttribute = computed(() => toneAttribute(this.tone()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAUA,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;AAcG;MA8DU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAa;AAC3C;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3C,MAAM,GAAG,CAAA,SAAA,EAAY,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAA,CAAE;IAE9C,OAAO,GAAG,cAAc;AACxB,IAAA,OAAO,GAAG,QAAQ,CAAe,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gFAAC;AAC3D,IAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;+EAAC;AACtD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,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AA,MAAM,y7BAjBP,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,27CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAiB1B,MAAM,EAAA,UAAA,EAAA,CAAA;kBArBlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,UAAA,EACR,IAAI,EAAA,QAAA,EACN,QAAQ,YACR,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,MAAM;AACjB,wBAAA,cAAc,EAAE,EAAE;AAClB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,gBAAgB,EAAE,EAAE;AACpB,wBAAA,kBAAkB,EAAE,gBAAgB;AACpC,wBAAA,kBAAkB,EAAE,iBAAiB;AACrC,wBAAA,yBAAyB,EAAE,2BAA2B;AACtD,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,oBAAoB,EAAE,yBAAyB;AAChD,qBAAA,EAAA,MAAA,EAAA,CAAA,27CAAA,CAAA,EAAA;;;AC7CH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"slotted-angular-icon.mjs","sources":["../../icon/src/glyph.ts","../../icon/src/icon.types.ts","../../icon/src/icon.ts","../../icon/src/slotted-angular-icon.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport {\n GLYPH_VIEW_BOX,\n GLYPHS,\n isStatusGlyph,\n STATUS_GLYPH_GRIDS,\n STATUS_GLYPHS,\n} from '@slotted/core/glyph';\nimport type { GlyphDrawing, GlyphName, StatusGlyphGrid } from '@slotted/core/glyph';\n\nlet sequence = 0;\n\n/**\n * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide\n * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.\n * It goes inside a `slIcon` box, which owns the size, the colour, the\n * alignment and the name; the glyph owns only the drawing. Every family draws\n * its own icons — a close button's cross, a pager's chevrons — with this\n * element, and never with a pseudo-element or a mask of its own.\n *\n * `solid` draws a status mark the way a tone's badge reads: the glyph's first\n * shape filled, and the symbol inside it cut out of the fill by an SVG\n * `<mask>`, so whatever lies behind shows through the symbol on any ground.\n *\n * A status mark (`status-*`) is always solid, and is drawn once per grid it\n * was drawn on; `icon.css` shows the grid the icon box is sized for.\n *\n * The children carry the `svg:` namespace because the template is parsed apart\n * from its host: an unprefixed `<path>` would be created as an HTML element.\n */\n@Component({\n selector: 'svg[slGlyph]',\n standalone: true,\n template: `@if (grids(); as grids) {\n @for (grid of grids; track grid.size) {\n <svg:svg [attr.data-grid]=\"grid.size\" [attr.viewBox]=\"'0 0 ' + grid.size + ' ' + grid.size\">\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId + '-' + grid.size\"\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"grid.size\"\n [attr.height]=\"grid.size\"\n >\n <svg:rect fill=\"#fff\" [attr.width]=\"grid.size\" [attr.height]=\"grid.size\" />\n @for (d of grid.drawing.holes; track $index) {\n <svg:path [attr.d]=\"d\" fill=\"#000\" />\n }\n @for (d of grid.drawing.strokes; track $index) {\n <svg:path\n [attr.d]=\"d\"\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n />\n }\n </svg:mask>\n </svg:defs>\n <svg:path\n [attr.d]=\"grid.drawing.shape\"\n fill=\"currentColor\"\n [attr.mask]=\"'url(#' + maskId + '-' + grid.size + ')'\"\n [attr.stroke]=\"grid.drawing.shapeStroke === 0 ? null : 'currentColor'\"\n [attr.stroke-linejoin]=\"grid.drawing.shapeStroke === 0 ? null : 'round'\"\n [attr.stroke-width]=\"grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke\"\n />\n </svg:svg>\n }\n } @else {\n @if (solid()) {\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId\"\n maskUnits=\"userSpaceOnUse\"\n x=\"-2\"\n y=\"-2\"\n width=\"28\"\n height=\"28\"\n >\n <svg:rect x=\"-2\" y=\"-2\" width=\"28\" height=\"28\" fill=\"#fff\" />\n <svg:g\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n >\n @for (d of symbol(); track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n </svg:g>\n </svg:mask>\n </svg:defs>\n }\n <svg:g [attr.transform]=\"transform()\">\n @if (solid()) {\n <svg:path\n [attr.d]=\"drawing().paths[0]\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n [attr.mask]=\"'url(#' + maskId + ')'\"\n />\n } @else {\n @for (d of drawing().paths; track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n }\n </svg:g>\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'aria-hidden': 'true',\n focusable: 'false',\n 'data-part': 'glyph',\n 'data-part-glyph': '',\n '[attr.data-glyph]': 'name()',\n '[attr.viewBox]': \"grids() ? '0 0 16 16' : viewBox\",\n '[attr.data-solid]': \"painted() ? null : ''\",\n '[attr.fill]': \"painted() ? (stroked() ? 'none' : 'currentColor') : null\",\n '[attr.stroke]': \"painted() && stroked() ? 'currentColor' : null\",\n '[attr.stroke-width]': 'painted() && stroked() ? drawing().strokeWidth : null',\n '[attr.stroke-linecap]': \"painted() && stroked() ? 'round' : null\",\n '[attr.stroke-linejoin]': \"painted() && stroked() ? 'round' : null\",\n },\n})\nexport class SlGlyph {\n /** One of the library's own icons: its glyph token without `--slotted-icon-`. */\n readonly name = input.required<GlyphName>();\n /**\n * The first shape filled and the symbol cut out of it — a tone's status\n * mark. For glyphs whose first shape encloses the rest (`circle-*`,\n * `triangle-alert`).\n */\n readonly solid = input(false, { transform: booleanAttribute });\n\n protected readonly maskId = `sl-glyph-${String((sequence += 1))}`;\n\n protected readonly viewBox = GLYPH_VIEW_BOX;\n /** A status mark's drawing on each of its grids; `null` for a Lucide glyph. */\n protected readonly grids = computed<readonly { size: number; drawing: StatusGlyphGrid }[] | null>(\n () => {\n const name = this.name();\n return isStatusGlyph(name)\n ? STATUS_GLYPH_GRIDS.map((size) => ({ size, drawing: STATUS_GLYPHS[name][size] }))\n : null;\n },\n );\n /** Painted by the root's own fill or stroke rather than by a solid shape. */\n protected readonly painted = computed(() => !this.solid() && this.grids() === null);\n /* A status mark has no Lucide drawing, and reads none: `dot` only keeps the signal typed. */\n protected readonly drawing = computed<GlyphDrawing>(() => {\n const name = this.name();\n return isStatusGlyph(name) ? GLYPHS.dot : GLYPHS[name];\n });\n protected readonly symbol = computed(() => this.drawing().paths.slice(1));\n protected readonly stroked = computed(() => this.drawing().paint === 'stroke');\n protected readonly transform = computed(() => {\n const [dx, dy] = this.drawing().offset;\n return dx === 0 && dy === 0 ? null : `translate(${dx} ${dy})`;\n });\n}\n","/**\n * Three steps read the control icon scale, which the theme restates per\n * density. `text` follows the type the icon sits in, because a control-sized\n * glyph inside a display heading is not an icon.\n */\nexport type IconSize = 'text' | 'sm' | 'md' | 'lg';\n\nexport type IconTone =\n | 'inherit'\n | 'default'\n | 'muted'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inverse';\n\n/**\n * `inherit` is the absence of a colour rather than a colour of its own, so it\n * removes the attribute and lets the surface decide.\n */\nexport function toneAttribute(tone: IconTone | undefined): string | null {\n return tone === undefined || tone === 'inherit' ? null : tone;\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { toneAttribute } from './icon.types';\nimport type { IconSize, IconTone } from './icon.types';\n\n/**\n * Icon is the box a glyph is drawn in, not the glyph. The library ships no\n * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,\n * anything that renders one — and this family owns the size it is drawn at,\n * the colour it inherits, where it sits against a line of text, and whether it\n * mirrors where reading runs the other way.\n *\n * The selector is the bare attribute, so the consumer writes the element. It\n * is a component rather than a directive only because a directive carries no\n * `styleUrl`, and that also means it cannot sit on `<ng-icon>` itself: Angular\n * refuses two components on one element, so the box is always written.\n */\n@Component({\n selector: '[slIcon]',\n standalone: true,\n exportAs: 'slIcon',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/icon/icon.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'icon',\n 'data-ui-icon': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'size() ?? null',\n '[attr.data-tone]': 'toneAttribute()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'named() ? null : \"true\"',\n },\n})\nexport class SlIcon {\n readonly directional = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly size = input<IconSize>();\n readonly tone = input<IconTone>();\n\n /**\n * A name the consumer wrote on the element counts as much as the input, and\n * has to be read rather than assumed absent: a host binding that wrote\n * `null` would delete the consumer's own `aria-label` and hide the icon it\n * named, which is a silent defect in the likeliest mistake. `aria-labelledby`\n * is read and never written, so the attribute the consumer put there stays\n * exactly as written.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.writtenLabel);\n\n /**\n * The icon is decorative when it has no name and meaningful when it has one,\n * which is why there is no `decorative` input: named and hidden cannot both\n * be true.\n */\n protected readonly named = computed(\n () => this.ariaLabel() !== null || this.writtenLabelledBy !== null,\n );\n\n /**\n * `role=\"img\"` requires a name, so it appears only once there is one, and a\n * role the consumer chose is left alone.\n */\n protected readonly role = computed(() =>\n this.writtenRole === null ? (this.named() ? 'img' : null) : this.writtenRole,\n );\n\n protected readonly toneAttribute = computed(() => toneAttribute(this.tone()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAgBA,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;AAiBG;MAsGU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAa;AAC3C;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3C,MAAM,GAAG,CAAA,SAAA,EAAY,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAA,CAAE;IAE9C,OAAO,GAAG,cAAc;;AAExB,IAAA,KAAK,GAAG,QAAQ,CACjC,MAAK;AACH,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;QACxB,OAAO,aAAa,CAAC,IAAI;cACrB,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;cAC/E,IAAI;IACV,CAAC;8EACF;;AAEkB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,IAAI;gFAAC;;AAEhE,IAAA,OAAO,GAAG,QAAQ,CAAe,MAAK;AACvD,QAAA,MAAM,IAAI,GA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AE,yBAAyB;AAChD,qBAAA,EAAA,MAAA,EAAA,CAAA,m5DAAA,CAAA,EAAA;;;AC7CH;;AAEG;;"}
|
|
@@ -79,12 +79,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
79
79
|
* holds the map. Help is not a severity and draws none.
|
|
80
80
|
*/
|
|
81
81
|
const TONE_GLYPH = {
|
|
82
|
-
accent: '
|
|
82
|
+
accent: 'status-info',
|
|
83
83
|
secondary: null,
|
|
84
|
-
info: '
|
|
85
|
-
success: '
|
|
86
|
-
warning: '
|
|
87
|
-
danger: '
|
|
84
|
+
info: 'status-info',
|
|
85
|
+
success: 'status-success',
|
|
86
|
+
warning: 'status-warning',
|
|
87
|
+
danger: 'status-danger',
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* The two roles that announce, and the value that does not. Both roles imply
|
|
@@ -249,7 +249,7 @@ class SlInlineMessage {
|
|
|
249
249
|
[attr.role]="grouped() ? liveRole() : null"
|
|
250
250
|
><ng-content
|
|
251
251
|
/></span>
|
|
252
|
-
<ng-content select="[slInlineMessageActions]" />`, isInline: true, styles: ["@layer slotted.components{[data-ui-inline-message][data-part-root]{--_text: var(--slotted-text-muted);--_font-size: var(--slotted-control-font-size-sm, 12px);--_mark-size: 1em;--_column-gap: var(--slotted-inline-message-column-gap, var(--slotted-space-4, .5rem));color:var(--_text);display:
|
|
252
|
+
<ng-content select="[slInlineMessageActions]" />`, isInline: true, styles: ["@layer slotted.components{[data-ui-inline-message][data-part-root]{--_text: var(--slotted-text-muted);--_font-size: var(--slotted-control-font-size-sm, 12px);--_mark-size: round(nearest, 1em, 2px);--_column-gap: var(--slotted-inline-message-column-gap, var(--slotted-space-4, .5rem));--_indent: calc(var(--_mark-size) + var(--_column-gap));color:var(--_text);display:block;font-family:var( --slotted-inline-message-font-family, var(--slotted-control-font-family, sans-serif) );font-size:var(--_font-size);line-height:round(up,1em * var(--slotted-inline-message-line-height, var(--slotted-line-height-md, 1.5)),2px);margin:0;max-inline-size:68ch;padding-inline-start:var(--_indent);position:relative;text-indent:calc(-1 * var(--_indent));text-box:trim-both cap alphabetic;text-wrap:pretty}[data-ui-inline-message][data-part-root][data-tone=accent]{--_text: var(--slotted-tone-accent-text)}[data-ui-inline-message][data-part-root][data-tone=secondary]{--_text: var(--slotted-text-muted)}[data-ui-inline-message][data-part-root][data-tone=success]{--_text: var(--slotted-tone-success-text)}[data-ui-inline-message][data-part-root][data-tone=info]{--_text: var(--slotted-tone-info-text)}[data-ui-inline-message][data-part-root][data-tone=warning]{--_text: var(--slotted-tone-warning-text)}[data-ui-inline-message][data-part-root][data-tone=danger]{--_text: var(--slotted-tone-danger-text)}[data-ui-inline-message][data-part-root][data-size=sm]{--_font-size: var(--slotted-control-font-size-sm, 12px)}[data-ui-inline-message][data-part-root][data-size=md]{--_font-size: var(--slotted-control-font-size-md, 13px)}[data-ui-inline-message][data-part-root][data-reserve]{min-block-size:1lh}@supports (text-box: trim-both cap alphabetic){[data-ui-inline-message][data-part-root][data-reserve]{min-block-size:1cap}}[data-ui-inline-message]>[data-part-prefix]{block-size:1px;border:0;clip-path:inset(50%);inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap}[data-ui-inline-message]>[data-part-icon]{--slotted-icon-size: var(--_mark-size);align-items:center;block-size:var(--_mark-size);box-sizing:border-box;contain:layout;display:inline-flex;inline-size:var(--_mark-size);justify-content:center;margin-inline-end:var(--_column-gap);text-indent:0;vertical-align:round(nearest,calc(.5cap - var(--_mark-size) / 2),.5px)}@media(max-resolution:1.49dppx){[data-ui-inline-message]>[data-part-icon]{vertical-align:round(nearest,calc(.5cap - var(--_mark-size) / 2),1px)}}[data-ui-inline-message][data-part-root][data-mark=dot]{--_dot-size: round(nearest, var(--_mark-size) / 3, 2px)}[data-ui-inline-message][data-part-root][data-mark=dot]:has(>[data-part-icon]>[data-ui-icon]>[data-glyph=dot]){--_indent: calc(var(--_dot-size) + var(--_column-gap))}[data-ui-inline-message][data-mark=dot]>[data-part-icon]:has(>[data-ui-icon]>[data-glyph=dot]){--slotted-icon-size: calc(var(--_dot-size) * 2);inline-size:var(--_dot-size)}[data-ui-inline-message][data-tone=secondary]:not([data-loading]):not([data-mark=dot])>[data-part-icon]:empty{display:none}[data-ui-inline-message][data-part-root]:not(:has(>[data-part-icon])),[data-ui-inline-message][data-part-root][data-tone=secondary]:not([data-loading]):not([data-mark=dot]):has(>[data-part-icon]:empty),[data-ui-inline-message][data-part-root][data-mark=none]:not([data-loading]):has(>[data-part-icon]:empty),[data-ui-inline-message][data-part-root]:has([data-part-text]:empty){--_indent: 0px}[data-ui-inline-message][data-mark=none]:not([data-loading])>[data-part-icon]:empty{display:none}[data-ui-inline-message]>[data-part-text]{overflow-wrap:anywhere;text-indent:0}[data-ui-inline-message]>[data-part-actions]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--slotted-inline-message-actions-gap, var(--_column-gap));margin-block-start:var( --slotted-inline-message-actions-offset, var(--slotted-space-2, .25rem) );text-indent:0}[data-ui-inline-message]:has([data-part-text]:empty)>[data-part-icon],[data-ui-inline-message]:has([data-part-text]:empty)>[data-part-prefix]{display:none}[data-ui-inline-message][data-loading]>[data-part-icon]{animation:slotted-inline-message-spin var(--slotted-duration-loop-fast) linear infinite;block-size:var(--_mark-size);border:max(var(--slotted-border-width-thin, 1px),calc(var(--_mark-size) / 8)) solid currentcolor;border-inline-end-color:transparent;border-radius:var(--slotted-radius-full, 9999px);inline-size:var(--_mark-size)}[data-ui-inline-message][data-loading]>[data-part-icon]>*{display:none}[data-ui-inline-message][data-part-root][data-disabled]{color:var(--slotted-disabled-foreground)}[data-ui-inline-message][data-disabled]>[data-part-icon]{animation:none}@media(prefers-reduced-motion:reduce){[data-ui-inline-message][data-loading]>[data-part-icon]{animation:none}}@media(forced-colors:active){[data-ui-inline-message]>[data-part-icon]{color:CanvasText}[data-ui-inline-message][data-part-root][data-disabled]>[data-part-icon]{color:GrayText}[data-ui-inline-message][data-loading]>[data-part-icon]{border-color:CanvasText;border-inline-end-color:Canvas}}}@keyframes slotted-inline-message-spin{to{transform:rotate(1turn)}}\n"], dependencies: [{ kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
253
253
|
}
|
|
254
254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlInlineMessage, decorators: [{
|
|
255
255
|
type: Component,
|
|
@@ -286,7 +286,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
286
286
|
'[attr.role]': 'role()',
|
|
287
287
|
'[attr.aria-labelledby]': 'grouped() ? textId : null',
|
|
288
288
|
'[attr.id]': 'messageId',
|
|
289
|
-
}, styles: ["@layer slotted.components{[data-ui-inline-message][data-part-root]{--_text: var(--slotted-text-muted);--_font-size: var(--slotted-control-font-size-sm, 12px);--_mark-size: 1em;--_column-gap: var(--slotted-inline-message-column-gap, var(--slotted-space-4, .5rem));color:var(--_text);display:
|
|
289
|
+
}, styles: ["@layer slotted.components{[data-ui-inline-message][data-part-root]{--_text: var(--slotted-text-muted);--_font-size: var(--slotted-control-font-size-sm, 12px);--_mark-size: round(nearest, 1em, 2px);--_column-gap: var(--slotted-inline-message-column-gap, var(--slotted-space-4, .5rem));--_indent: calc(var(--_mark-size) + var(--_column-gap));color:var(--_text);display:block;font-family:var( --slotted-inline-message-font-family, var(--slotted-control-font-family, sans-serif) );font-size:var(--_font-size);line-height:round(up,1em * var(--slotted-inline-message-line-height, var(--slotted-line-height-md, 1.5)),2px);margin:0;max-inline-size:68ch;padding-inline-start:var(--_indent);position:relative;text-indent:calc(-1 * var(--_indent));text-box:trim-both cap alphabetic;text-wrap:pretty}[data-ui-inline-message][data-part-root][data-tone=accent]{--_text: var(--slotted-tone-accent-text)}[data-ui-inline-message][data-part-root][data-tone=secondary]{--_text: var(--slotted-text-muted)}[data-ui-inline-message][data-part-root][data-tone=success]{--_text: var(--slotted-tone-success-text)}[data-ui-inline-message][data-part-root][data-tone=info]{--_text: var(--slotted-tone-info-text)}[data-ui-inline-message][data-part-root][data-tone=warning]{--_text: var(--slotted-tone-warning-text)}[data-ui-inline-message][data-part-root][data-tone=danger]{--_text: var(--slotted-tone-danger-text)}[data-ui-inline-message][data-part-root][data-size=sm]{--_font-size: var(--slotted-control-font-size-sm, 12px)}[data-ui-inline-message][data-part-root][data-size=md]{--_font-size: var(--slotted-control-font-size-md, 13px)}[data-ui-inline-message][data-part-root][data-reserve]{min-block-size:1lh}@supports (text-box: trim-both cap alphabetic){[data-ui-inline-message][data-part-root][data-reserve]{min-block-size:1cap}}[data-ui-inline-message]>[data-part-prefix]{block-size:1px;border:0;clip-path:inset(50%);inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap}[data-ui-inline-message]>[data-part-icon]{--slotted-icon-size: var(--_mark-size);align-items:center;block-size:var(--_mark-size);box-sizing:border-box;contain:layout;display:inline-flex;inline-size:var(--_mark-size);justify-content:center;margin-inline-end:var(--_column-gap);text-indent:0;vertical-align:round(nearest,calc(.5cap - var(--_mark-size) / 2),.5px)}@media(max-resolution:1.49dppx){[data-ui-inline-message]>[data-part-icon]{vertical-align:round(nearest,calc(.5cap - var(--_mark-size) / 2),1px)}}[data-ui-inline-message][data-part-root][data-mark=dot]{--_dot-size: round(nearest, var(--_mark-size) / 3, 2px)}[data-ui-inline-message][data-part-root][data-mark=dot]:has(>[data-part-icon]>[data-ui-icon]>[data-glyph=dot]){--_indent: calc(var(--_dot-size) + var(--_column-gap))}[data-ui-inline-message][data-mark=dot]>[data-part-icon]:has(>[data-ui-icon]>[data-glyph=dot]){--slotted-icon-size: calc(var(--_dot-size) * 2);inline-size:var(--_dot-size)}[data-ui-inline-message][data-tone=secondary]:not([data-loading]):not([data-mark=dot])>[data-part-icon]:empty{display:none}[data-ui-inline-message][data-part-root]:not(:has(>[data-part-icon])),[data-ui-inline-message][data-part-root][data-tone=secondary]:not([data-loading]):not([data-mark=dot]):has(>[data-part-icon]:empty),[data-ui-inline-message][data-part-root][data-mark=none]:not([data-loading]):has(>[data-part-icon]:empty),[data-ui-inline-message][data-part-root]:has([data-part-text]:empty){--_indent: 0px}[data-ui-inline-message][data-mark=none]:not([data-loading])>[data-part-icon]:empty{display:none}[data-ui-inline-message]>[data-part-text]{overflow-wrap:anywhere;text-indent:0}[data-ui-inline-message]>[data-part-actions]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--slotted-inline-message-actions-gap, var(--_column-gap));margin-block-start:var( --slotted-inline-message-actions-offset, var(--slotted-space-2, .25rem) );text-indent:0}[data-ui-inline-message]:has([data-part-text]:empty)>[data-part-icon],[data-ui-inline-message]:has([data-part-text]:empty)>[data-part-prefix]{display:none}[data-ui-inline-message][data-loading]>[data-part-icon]{animation:slotted-inline-message-spin var(--slotted-duration-loop-fast) linear infinite;block-size:var(--_mark-size);border:max(var(--slotted-border-width-thin, 1px),calc(var(--_mark-size) / 8)) solid currentcolor;border-inline-end-color:transparent;border-radius:var(--slotted-radius-full, 9999px);inline-size:var(--_mark-size)}[data-ui-inline-message][data-loading]>[data-part-icon]>*{display:none}[data-ui-inline-message][data-part-root][data-disabled]{color:var(--slotted-disabled-foreground)}[data-ui-inline-message][data-disabled]>[data-part-icon]{animation:none}@media(prefers-reduced-motion:reduce){[data-ui-inline-message][data-loading]>[data-part-icon]{animation:none}}@media(forced-colors:active){[data-ui-inline-message]>[data-part-icon]{color:CanvasText}[data-ui-inline-message][data-part-root][data-disabled]>[data-part-icon]{color:GrayText}[data-ui-inline-message][data-loading]>[data-part-icon]{border-color:CanvasText;border-inline-end-color:Canvas}}}@keyframes slotted-inline-message-spin{to{transform:rotate(1turn)}}\n"] }]
|
|
290
290
|
}], propDecorators: { tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], live: [{ type: i0.Input, args: [{ isSignal: true, alias: "live", required: false }] }], mark: [{ type: i0.Input, args: [{ isSignal: true, alias: "mark", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], hideIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideIcon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], reserve: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserve", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], actions: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SlInlineMessageActionsRef), { isSignal: true }] }] } });
|
|
291
291
|
/**
|
|
292
292
|
* The answers a message offers, after its sentence: two amounts the reader
|