vira 27.0.0 → 28.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/dist/elements/index.d.ts +7 -7
- package/dist/elements/index.js +7 -7
- package/dist/elements/{popover/popover-helpers.d.ts → pop-up/pop-up-helpers.d.ts} +6 -6
- package/dist/elements/{popover/popover-helpers.js → pop-up/pop-up-helpers.js} +5 -5
- package/dist/elements/{popover → pop-up}/vira-menu-item.element.d.ts +2 -2
- package/dist/elements/{popover → pop-up}/vira-menu-item.element.js +1 -1
- package/dist/elements/pop-up/vira-menu-trigger.element.d.ts +55 -0
- package/dist/elements/{popover → pop-up}/vira-menu-trigger.element.js +33 -29
- package/dist/elements/{popover → pop-up}/vira-menu.element.d.ts +2 -2
- package/dist/elements/{popover → pop-up}/vira-menu.element.js +2 -2
- package/dist/elements/pop-up/vira-pop-up-menu.element.d.ts +35 -0
- package/dist/elements/{popover/vira-popover-menu.element.js → pop-up/vira-pop-up-menu.element.js} +23 -23
- package/dist/elements/pop-up/vira-pop-up-trigger.element.d.ts +81 -0
- package/dist/elements/pop-up/vira-pop-up-trigger.element.js +282 -0
- package/dist/elements/vira-dropdown.element.d.ts +18 -6
- package/dist/elements/vira-dropdown.element.js +10 -8
- package/dist/icons/icon-svgs/status-failure-24.icon.js +8 -1
- package/dist/icons/icon-svgs/status-unknown-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/status-unknown-24.icon.js +47 -0
- package/dist/icons/icon-svgs/status-warning-24.icon.js +15 -9
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +3 -0
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/{popover-manager.d.ts → pop-up-manager.d.ts} +39 -60
- package/dist/util/{popover-manager.js → pop-up-manager.js} +45 -42
- package/package.json +7 -7
- package/dist/elements/popover/vira-menu-trigger.element.d.ts +0 -41
- package/dist/elements/popover/vira-popover-menu.element.d.ts +0 -35
- package/dist/elements/popover/vira-popover-trigger.element.d.ts +0 -67
- package/dist/elements/popover/vira-popover-trigger.element.js +0 -301
- /package/dist/elements/{popover/popover-menu-item.d.ts → pop-up/pop-up-menu-item.d.ts} +0 -0
- /package/dist/elements/{popover/popover-menu-item.js → pop-up/pop-up-menu-item.js} +0 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { assert } from '@augment-vir/assert';
|
|
2
|
+
import { NavController } from 'device-navigation';
|
|
3
|
+
import { classMap, css, defineElementEvent, html, listen, renderIf } from 'element-vir';
|
|
4
|
+
import { createFocusStyles } from '../../styles/focus.js';
|
|
5
|
+
import { noNativeFormStyles, noUserSelect, viraDisabledStyles } from '../../styles/index.js';
|
|
6
|
+
import { HidePopUpEvent, NavSelectEvent, PopUpManager, } from '../../util/pop-up-manager.js';
|
|
7
|
+
import { defineViraElement } from '../define-vira-element.js';
|
|
8
|
+
import { triggerPopUpState } from './pop-up-helpers.js';
|
|
9
|
+
/**
|
|
10
|
+
* Anchor options for pop-ups.
|
|
11
|
+
*
|
|
12
|
+
* @category Internal
|
|
13
|
+
*/
|
|
14
|
+
export var HorizontalAnchor;
|
|
15
|
+
(function (HorizontalAnchor) {
|
|
16
|
+
/**
|
|
17
|
+
* The left side of the pop-up will be anchored to the left side of the trigger, allowing the
|
|
18
|
+
* pop-up to grow on the right side of the trigger.
|
|
19
|
+
*/
|
|
20
|
+
HorizontalAnchor["Left"] = "left";
|
|
21
|
+
/**
|
|
22
|
+
* The Right side of the pop-up will be anchored to the right side of the trigger, allowing the
|
|
23
|
+
* pop-up to grow on the left side of the trigger.
|
|
24
|
+
*/
|
|
25
|
+
HorizontalAnchor["Right"] = "right";
|
|
26
|
+
/**
|
|
27
|
+
* Restrict the pop-up on both sides.
|
|
28
|
+
*
|
|
29
|
+
* This is the default anchor for {@link ViraPopUpTrigger}.
|
|
30
|
+
*/
|
|
31
|
+
HorizontalAnchor["Both"] = "both";
|
|
32
|
+
})(HorizontalAnchor || (HorizontalAnchor = {}));
|
|
33
|
+
/**
|
|
34
|
+
* An element with slots for a pop-up trigger and pop-up contents.
|
|
35
|
+
*
|
|
36
|
+
* @category PopUp
|
|
37
|
+
* @category Elements
|
|
38
|
+
* @see https://electrovir.github.io/vira/book/elements/vira-pop-up-trigger
|
|
39
|
+
*/
|
|
40
|
+
export const ViraPopUpTrigger = defineViraElement()({
|
|
41
|
+
tagName: 'vira-pop-up-trigger',
|
|
42
|
+
state({ host }) {
|
|
43
|
+
return {
|
|
44
|
+
/** `undefined` means the pop up is not currently showing. */
|
|
45
|
+
showPopUpResult: undefined,
|
|
46
|
+
popUpManager: new PopUpManager(new NavController(host, { activateOnMouseUp: true })),
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
slotNames: [
|
|
50
|
+
'trigger',
|
|
51
|
+
'popUp',
|
|
52
|
+
],
|
|
53
|
+
hostClasses: {
|
|
54
|
+
'vira-pop-up-trigger-disabled': ({ inputs }) => !!inputs.isDisabled,
|
|
55
|
+
},
|
|
56
|
+
styles: ({ hostClasses }) => css `
|
|
57
|
+
:host {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
vertical-align: middle;
|
|
61
|
+
position: relative;
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dropdown-wrapper {
|
|
66
|
+
${noNativeFormStyles};
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
max-width: 100%;
|
|
69
|
+
position: relative;
|
|
70
|
+
flex-grow: 1;
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
|
|
73
|
+
${createFocusStyles({
|
|
74
|
+
elementBorderSize: 1,
|
|
75
|
+
})}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dropdown-trigger {
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
${noUserSelect};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
${hostClasses['vira-pop-up-trigger-disabled'].selector} {
|
|
84
|
+
${viraDisabledStyles}
|
|
85
|
+
pointer-events: auto;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
${hostClasses['vira-pop-up-trigger-disabled'].selector} .dropdown-wrapper {
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pop-up-positioner {
|
|
93
|
+
position: absolute;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
display: flex;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
align-items: flex-start;
|
|
99
|
+
|
|
100
|
+
/* highest possible z-index */
|
|
101
|
+
z-index: 2147483647;
|
|
102
|
+
|
|
103
|
+
& > * {
|
|
104
|
+
pointer-events: auto;
|
|
105
|
+
max-width: 100%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.right-aligned {
|
|
109
|
+
align-items: flex-end;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.open-upwards .pop-up-positioner {
|
|
114
|
+
flex-direction: column-reverse;
|
|
115
|
+
}
|
|
116
|
+
`,
|
|
117
|
+
events: {
|
|
118
|
+
navSelect: defineElementEvent(),
|
|
119
|
+
/**
|
|
120
|
+
* - `undefined` indicates that the pop-up just closed.
|
|
121
|
+
* - {@link ShowPopUpResult} indicates that the pop-up just opened.
|
|
122
|
+
*/
|
|
123
|
+
openChange: defineElementEvent(),
|
|
124
|
+
init: defineElementEvent(),
|
|
125
|
+
},
|
|
126
|
+
cleanup({ state, updateState }) {
|
|
127
|
+
updateState({ showPopUpResult: undefined });
|
|
128
|
+
state.popUpManager.destroy();
|
|
129
|
+
},
|
|
130
|
+
init({ state, updateState, host, inputs, dispatch, events }) {
|
|
131
|
+
/** Refocus the trigger and set the result to `undefined` when the pop up closes. */
|
|
132
|
+
state.popUpManager.listen(HidePopUpEvent, () => {
|
|
133
|
+
updateState({ showPopUpResult: undefined });
|
|
134
|
+
dispatch(new events.openChange(undefined));
|
|
135
|
+
if (!inputs.isDisabled) {
|
|
136
|
+
const dropdownWrapper = host.shadowRoot.querySelector('.dropdown-wrapper');
|
|
137
|
+
assert.instanceOf(dropdownWrapper, HTMLButtonElement, 'failed to find dropdown wrapper child');
|
|
138
|
+
dropdownWrapper.focus();
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
state.popUpManager.listen(NavSelectEvent, (event) => {
|
|
142
|
+
if (!inputs.keepOpenAfterInteraction) {
|
|
143
|
+
triggerPopUpState({
|
|
144
|
+
open: false,
|
|
145
|
+
callback(showPopUpResult) {
|
|
146
|
+
updateState({
|
|
147
|
+
showPopUpResult,
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
host,
|
|
151
|
+
popUpManager: state.popUpManager,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
dispatch(new events.navSelect(event.detail));
|
|
155
|
+
});
|
|
156
|
+
dispatch(new events.init({
|
|
157
|
+
navController: state.popUpManager.navController,
|
|
158
|
+
popUpManager: state.popUpManager,
|
|
159
|
+
}));
|
|
160
|
+
},
|
|
161
|
+
render({ dispatch, events, state, inputs, updateState, host, slotNames }) {
|
|
162
|
+
function triggerPopUp({ emitEvent, open }, event) {
|
|
163
|
+
if (state.showPopUpResult && inputs.keepOpenAfterInteraction && event) {
|
|
164
|
+
const dropdownTrigger = host.shadowRoot.querySelector('.dropdown-trigger');
|
|
165
|
+
if (dropdownTrigger && !event.composedPath().includes(dropdownTrigger)) {
|
|
166
|
+
/**
|
|
167
|
+
* Prevent closing the pop-up when `keepOpenAfterInteraction` is turned on and
|
|
168
|
+
* the pop-up was interacted with.
|
|
169
|
+
*/
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
triggerPopUpState({
|
|
174
|
+
open,
|
|
175
|
+
callback(showPopUpResult) {
|
|
176
|
+
updateState({ showPopUpResult });
|
|
177
|
+
if (emitEvent) {
|
|
178
|
+
dispatch(new events.openChange(showPopUpResult));
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
host,
|
|
182
|
+
popUpManager: state.popUpManager,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
if (inputs.isDisabled) {
|
|
186
|
+
triggerPopUp({ open: false, emitEvent: false }, undefined);
|
|
187
|
+
}
|
|
188
|
+
else if (inputs.z_debug_forceOpenState != undefined) {
|
|
189
|
+
if (!inputs.z_debug_forceOpenState && state.showPopUpResult) {
|
|
190
|
+
triggerPopUp({ emitEvent: false, open: false }, undefined);
|
|
191
|
+
}
|
|
192
|
+
else if (inputs.z_debug_forceOpenState && !state.showPopUpResult) {
|
|
193
|
+
triggerPopUp({ emitEvent: false, open: true }, undefined);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
const leftCss = inputs.horizontalAnchor === HorizontalAnchor.Right && state.showPopUpResult
|
|
197
|
+
? css `
|
|
198
|
+
left: -${state.showPopUpResult.positions.diff.left}px;
|
|
199
|
+
`
|
|
200
|
+
: css `
|
|
201
|
+
left: ${inputs.popUpOffset?.left || 0}px;
|
|
202
|
+
`;
|
|
203
|
+
const rightCss = state.showPopUpResult && inputs.horizontalAnchor === HorizontalAnchor.Left
|
|
204
|
+
? css `
|
|
205
|
+
right: -${state.showPopUpResult.positions.diff.right}px;
|
|
206
|
+
`
|
|
207
|
+
: css `
|
|
208
|
+
right: ${inputs.popUpOffset?.right || 0}px;
|
|
209
|
+
`;
|
|
210
|
+
const horizontalPositionStyle = css `
|
|
211
|
+
${leftCss}
|
|
212
|
+
${rightCss}
|
|
213
|
+
`;
|
|
214
|
+
/**
|
|
215
|
+
* These styles do _not_ account for window resizing while the menu is open. I decided this
|
|
216
|
+
* was not a major enough problem to tackle. If it becomes major enough in the future,
|
|
217
|
+
* you'll need to hook into a window _or_ container resize listener inside `PopUpManager`
|
|
218
|
+
* and emit a new `ShowPopUpResult` instance when it changes.
|
|
219
|
+
*/
|
|
220
|
+
const positionerStyles = state.showPopUpResult
|
|
221
|
+
? state.showPopUpResult.popDown
|
|
222
|
+
? /** Dropdown going down position. */
|
|
223
|
+
css `
|
|
224
|
+
bottom: -${state.showPopUpResult.positions.diff.bottom}px;
|
|
225
|
+
top: calc(100% + ${inputs.popUpOffset?.vertical || 0}px);
|
|
226
|
+
${horizontalPositionStyle}
|
|
227
|
+
`
|
|
228
|
+
: /** Dropdown going up position. */
|
|
229
|
+
css `
|
|
230
|
+
top: -${state.showPopUpResult.positions.diff.top}px;
|
|
231
|
+
bottom: calc(100% + ${inputs.popUpOffset?.vertical || 0}px);
|
|
232
|
+
${horizontalPositionStyle}
|
|
233
|
+
`
|
|
234
|
+
: undefined;
|
|
235
|
+
function respondToClick(event) {
|
|
236
|
+
triggerPopUp({ emitEvent: true, open: !state.showPopUpResult }, event);
|
|
237
|
+
}
|
|
238
|
+
return html `
|
|
239
|
+
<button
|
|
240
|
+
?disabled=${!!inputs.isDisabled}
|
|
241
|
+
class="dropdown-wrapper ${classMap({
|
|
242
|
+
open: !!state.showPopUpResult,
|
|
243
|
+
'open-upwards': !state.showPopUpResult?.popDown,
|
|
244
|
+
})}"
|
|
245
|
+
role="listbox"
|
|
246
|
+
aria-expanded=${!!state.showPopUpResult}
|
|
247
|
+
${listen('keydown', (event) => {
|
|
248
|
+
if (!state.showPopUpResult && event.code.startsWith('Arrow')) {
|
|
249
|
+
triggerPopUp({ emitEvent: true, open: true }, event);
|
|
250
|
+
}
|
|
251
|
+
})}
|
|
252
|
+
${listen('click', (event) => {
|
|
253
|
+
/** Detail is 0 if it was a keyboard key (like Enter) that triggered this click. */
|
|
254
|
+
if (event.detail === 0) {
|
|
255
|
+
respondToClick(event);
|
|
256
|
+
}
|
|
257
|
+
})}
|
|
258
|
+
${listen('mousedown', (event) => {
|
|
259
|
+
/** Ignore any clicks that aren't the main button. */
|
|
260
|
+
if (event.button === 0) {
|
|
261
|
+
respondToClick(event);
|
|
262
|
+
}
|
|
263
|
+
})}
|
|
264
|
+
>
|
|
265
|
+
<div class="dropdown-trigger">
|
|
266
|
+
<slot name=${slotNames.trigger}></slot>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
<div
|
|
270
|
+
class="pop-up-positioner ${classMap({
|
|
271
|
+
'right-aligned': inputs.horizontalAnchor === HorizontalAnchor.Right,
|
|
272
|
+
})}"
|
|
273
|
+
style=${positionerStyles}
|
|
274
|
+
>
|
|
275
|
+
${renderIf(!!state.showPopUpResult, html `
|
|
276
|
+
<slot name=${slotNames.popUp}></slot>
|
|
277
|
+
`)}
|
|
278
|
+
</div>
|
|
279
|
+
</button>
|
|
280
|
+
`;
|
|
281
|
+
},
|
|
282
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
2
|
import { type ViraIconSvg } from '../icons/icon-svg.js';
|
|
3
|
-
import { type
|
|
4
|
-
import { type MenuItem } from './
|
|
3
|
+
import { type ShowPopUpResult } from '../util/pop-up-manager.js';
|
|
4
|
+
import { type MenuItem } from './pop-up/pop-up-menu-item.js';
|
|
5
|
+
import { HorizontalAnchor } from './pop-up/vira-pop-up-trigger.element.js';
|
|
5
6
|
/**
|
|
6
7
|
* Test ids for {@link ViraDropdown}.
|
|
7
8
|
*
|
|
@@ -13,7 +14,7 @@ export declare const viraDropdownTestIds: {
|
|
|
13
14
|
prefix: string;
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
|
-
* A dropdown element that uses
|
|
17
|
+
* A dropdown element that uses pop-up menus.
|
|
17
18
|
*
|
|
18
19
|
* @category Dropdown
|
|
19
20
|
* @category Elements
|
|
@@ -36,10 +37,21 @@ export declare const ViraDropdown: import("element-vir").DeclarativeElementDefin
|
|
|
36
37
|
isDisabled: boolean;
|
|
37
38
|
/** For debugging purposes only. Very bad for actual production code use. */
|
|
38
39
|
z_debug_forceOpenState: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* - `HorizontalAnchor.Left`: dropdown is anchored to the left side of the trigger and the
|
|
42
|
+
* dropdown can grow to the right.
|
|
43
|
+
* - `HorizontalAnchor.Right`: dropdown is anchored to the right side of the trigger and the
|
|
44
|
+
* dropdown can grow to the left.
|
|
45
|
+
* - `HorizontalAnchor.Both`: dropdown is anchored on both sides of the trigger and cannot
|
|
46
|
+
* grow beyond it. (This is the default experience.)
|
|
47
|
+
*
|
|
48
|
+
* @default HorizontalAnchor.Both
|
|
49
|
+
*/
|
|
50
|
+
horizontalAnchor: HorizontalAnchor;
|
|
39
51
|
}>, {
|
|
40
|
-
/** `undefined` means the
|
|
41
|
-
|
|
52
|
+
/** `undefined` means the pop up is not currently showing. */
|
|
53
|
+
showPopUpResult: ShowPopUpResult | undefined;
|
|
42
54
|
}, {
|
|
43
55
|
selectedChange: import("element-vir").DefineEvent<PropertyKey[]>;
|
|
44
|
-
openChange: import("element-vir").DefineEvent<
|
|
56
|
+
openChange: import("element-vir").DefineEvent<ShowPopUpResult | undefined>;
|
|
45
57
|
}, "vira-dropdown-", "vira-dropdown-", readonly [], readonly []>;
|
|
@@ -6,7 +6,8 @@ import { viraBorders } from '../styles/border.js';
|
|
|
6
6
|
import { viraFormCssVars } from '../styles/form-styles.js';
|
|
7
7
|
import { noUserSelect, viraAnimationDurations } from '../styles/index.js';
|
|
8
8
|
import { defineViraElement } from './define-vira-element.js';
|
|
9
|
-
import { ViraMenuTrigger } from './
|
|
9
|
+
import { ViraMenuTrigger } from './pop-up/vira-menu-trigger.element.js';
|
|
10
|
+
import { HorizontalAnchor } from './pop-up/vira-pop-up-trigger.element.js';
|
|
10
11
|
import { ViraIcon } from './vira-icon.element.js';
|
|
11
12
|
/**
|
|
12
13
|
* Test ids for {@link ViraDropdown}.
|
|
@@ -19,7 +20,7 @@ export const viraDropdownTestIds = {
|
|
|
19
20
|
prefix: 'dropdown-prefix',
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
|
-
* A dropdown element that uses
|
|
23
|
+
* A dropdown element that uses pop-up menus.
|
|
23
24
|
*
|
|
24
25
|
* @category Dropdown
|
|
25
26
|
* @category Elements
|
|
@@ -101,8 +102,8 @@ export const ViraDropdown = defineViraElement()({
|
|
|
101
102
|
},
|
|
102
103
|
state() {
|
|
103
104
|
return {
|
|
104
|
-
/** `undefined` means the
|
|
105
|
-
|
|
105
|
+
/** `undefined` means the pop up is not currently showing. */
|
|
106
|
+
showPopUpResult: undefined,
|
|
106
107
|
};
|
|
107
108
|
},
|
|
108
109
|
render({ state, inputs, dispatch, events, updateState }) {
|
|
@@ -136,13 +137,14 @@ export const ViraDropdown = defineViraElement()({
|
|
|
136
137
|
isDisabled: inputs.isDisabled,
|
|
137
138
|
isMultiSelect: inputs.isMultiSelect,
|
|
138
139
|
z_debug_forceOpenState: inputs.z_debug_forceOpenState,
|
|
139
|
-
|
|
140
|
+
popUpOffset: {
|
|
140
141
|
vertical: -1,
|
|
141
142
|
right: 24,
|
|
142
143
|
},
|
|
144
|
+
horizontalAnchor: inputs.horizontalAnchor || HorizontalAnchor.Both,
|
|
143
145
|
})}
|
|
144
146
|
${listen(ViraMenuTrigger.events.openChange, (event) => {
|
|
145
|
-
updateState({
|
|
147
|
+
updateState({ showPopUpResult: event.detail });
|
|
146
148
|
dispatch(new events.openChange(event.detail));
|
|
147
149
|
})}
|
|
148
150
|
${listen(ViraMenuTrigger.events.itemActivate, (event) => {
|
|
@@ -151,8 +153,8 @@ export const ViraDropdown = defineViraElement()({
|
|
|
151
153
|
>
|
|
152
154
|
<div
|
|
153
155
|
class="dropdown-trigger ${classMap({
|
|
154
|
-
open: !!state.
|
|
155
|
-
'open-upwards': !state.
|
|
156
|
+
open: !!state.showPopUpResult,
|
|
157
|
+
'open-upwards': !state.showPopUpResult?.popDown,
|
|
156
158
|
})}"
|
|
157
159
|
${testId(viraDropdownTestIds.trigger)}
|
|
158
160
|
>
|
|
@@ -11,7 +11,13 @@ import { defineIcon } from '../icon-svg.js';
|
|
|
11
11
|
export const StatusFailure24Icon = defineIcon({
|
|
12
12
|
name: 'StatusFailure24Icon',
|
|
13
13
|
svgTemplate: html `
|
|
14
|
-
<svg
|
|
14
|
+
<svg
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
width="24"
|
|
17
|
+
height="24"
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5"
|
|
20
|
+
>
|
|
15
21
|
<circle
|
|
16
22
|
cx="12"
|
|
17
23
|
cy="12"
|
|
@@ -26,6 +32,7 @@ export const StatusFailure24Icon = defineIcon({
|
|
|
26
32
|
fill="none"
|
|
27
33
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
28
34
|
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
35
|
+
style="stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2"
|
|
29
36
|
/>
|
|
30
37
|
</svg>
|
|
31
38
|
`,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A status icon with a ? that indicates the status is unknown.
|
|
3
|
+
*
|
|
4
|
+
* @category Icon
|
|
5
|
+
* @category SVG
|
|
6
|
+
* @see https://electrovir.github.io/vira/book/icons/statusunknown24icon
|
|
7
|
+
*/
|
|
8
|
+
export declare const StatusUnknown24Icon: import("../icon-svg.js").ViraIconSvg;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* A status icon with a ? that indicates the status is unknown.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/vira/book/icons/statusunknown24icon
|
|
10
|
+
*/
|
|
11
|
+
export const StatusUnknown24Icon = defineIcon({
|
|
12
|
+
name: 'StatusUnknown24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
xml:space="preserve"
|
|
17
|
+
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5"
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
width="24"
|
|
20
|
+
height="24"
|
|
21
|
+
>
|
|
22
|
+
<circle
|
|
23
|
+
cx="12"
|
|
24
|
+
cy="12"
|
|
25
|
+
r="9"
|
|
26
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
27
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
28
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
29
|
+
/>
|
|
30
|
+
<circle
|
|
31
|
+
cx="12"
|
|
32
|
+
cy="16"
|
|
33
|
+
r="1"
|
|
34
|
+
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
35
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
36
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
d="M12 14c0-.5.09-.87.14-1q.13-.38.37-.7c.19-.24 1.3-1.46 1.46-1.65a3 3 0 0 0 .44-.73q.17-.42.17-.94 0-1.07-.7-1.65a2.7 2.7 0 0 0-1.8-.56q-1.12 0-1.83.7c-.3.29-.66.86-.66 1.53"
|
|
40
|
+
fill="none"
|
|
41
|
+
style="stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2"
|
|
42
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
43
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
`,
|
|
47
|
+
});
|
|
@@ -11,7 +11,14 @@ import { defineIcon } from '../icon-svg.js';
|
|
|
11
11
|
export const StatusWarning24Icon = defineIcon({
|
|
12
12
|
name: 'StatusWarning24Icon',
|
|
13
13
|
svgTemplate: html `
|
|
14
|
-
<svg
|
|
14
|
+
<svg
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
xml:space="preserve"
|
|
17
|
+
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5"
|
|
18
|
+
width="24"
|
|
19
|
+
height="24"
|
|
20
|
+
viewBox="0 0 24 24"
|
|
21
|
+
>
|
|
15
22
|
<circle
|
|
16
23
|
cx="12"
|
|
17
24
|
cy="12"
|
|
@@ -20,14 +27,6 @@ export const StatusWarning24Icon = defineIcon({
|
|
|
20
27
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
21
28
|
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
22
29
|
/>
|
|
23
|
-
|
|
24
|
-
<path
|
|
25
|
-
d="m12 14 .2-7h-.4l.2 7Z"
|
|
26
|
-
fill="none"
|
|
27
|
-
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
28
|
-
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
29
|
-
/>
|
|
30
|
-
|
|
31
30
|
<circle
|
|
32
31
|
cx="12"
|
|
33
32
|
cy="16"
|
|
@@ -36,6 +35,13 @@ export const StatusWarning24Icon = defineIcon({
|
|
|
36
35
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
37
36
|
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
38
37
|
/>
|
|
38
|
+
<path
|
|
39
|
+
d="m12 14 .2-7h-.4l.2 7Z"
|
|
40
|
+
fill="none"
|
|
41
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
42
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
43
|
+
style="stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2"
|
|
44
|
+
/>
|
|
39
45
|
</svg>
|
|
40
46
|
`,
|
|
41
47
|
});
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './icon-svgs/star-24.icon.js';
|
|
|
28
28
|
export * from './icon-svgs/status-failure-24.icon.js';
|
|
29
29
|
export * from './icon-svgs/status-in-progress-24.icon.js';
|
|
30
30
|
export * from './icon-svgs/status-success-24.icon.js';
|
|
31
|
+
export * from './icon-svgs/status-unknown-24.icon.js';
|
|
31
32
|
export * from './icon-svgs/status-warning-24.icon.js';
|
|
32
33
|
export * from './icon-svgs/upload-24.icon.js';
|
|
33
34
|
/**
|
|
@@ -63,6 +64,7 @@ export declare const allIconsByName: {
|
|
|
63
64
|
readonly StatusFailure24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
64
65
|
readonly StatusInProgress24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
65
66
|
readonly StatusSuccess24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
67
|
+
readonly StatusUnknown24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
66
68
|
readonly StatusWarning24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
67
69
|
readonly Upload24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
68
70
|
};
|
package/dist/icons/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import { Star24Icon } from './icon-svgs/star-24.icon.js';
|
|
|
26
26
|
import { StatusFailure24Icon } from './icon-svgs/status-failure-24.icon.js';
|
|
27
27
|
import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon.js';
|
|
28
28
|
import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon.js';
|
|
29
|
+
import { StatusUnknown24Icon } from './icon-svgs/status-unknown-24.icon.js';
|
|
29
30
|
import { StatusWarning24Icon } from './icon-svgs/status-warning-24.icon.js';
|
|
30
31
|
import { Upload24Icon } from './icon-svgs/upload-24.icon.js';
|
|
31
32
|
export * from './icon-css-vars.js';
|
|
@@ -57,6 +58,7 @@ export * from './icon-svgs/star-24.icon.js';
|
|
|
57
58
|
export * from './icon-svgs/status-failure-24.icon.js';
|
|
58
59
|
export * from './icon-svgs/status-in-progress-24.icon.js';
|
|
59
60
|
export * from './icon-svgs/status-success-24.icon.js';
|
|
61
|
+
export * from './icon-svgs/status-unknown-24.icon.js';
|
|
60
62
|
export * from './icon-svgs/status-warning-24.icon.js';
|
|
61
63
|
export * from './icon-svgs/upload-24.icon.js';
|
|
62
64
|
/**
|
|
@@ -92,6 +94,7 @@ export const allIconsByName = {
|
|
|
92
94
|
StatusFailure24Icon,
|
|
93
95
|
StatusInProgress24Icon,
|
|
94
96
|
StatusSuccess24Icon,
|
|
97
|
+
StatusUnknown24Icon,
|
|
95
98
|
StatusWarning24Icon,
|
|
96
99
|
Upload24Icon,
|
|
97
100
|
};
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './define-table.js';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './pop-up-manager.js';
|
package/dist/util/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './define-table.js';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './pop-up-manager.js';
|