vira 28.19.4 → 28.19.6
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/package.json +13 -13
- package/src/elements/define-vira-element.ts +29 -0
- package/src/elements/form/vira-form-fields.ts +140 -0
- package/src/elements/form/vira-form.element.ts +204 -0
- package/src/elements/pop-up/pop-up-helpers.ts +85 -0
- package/{dist/elements/pop-up/pop-up-menu-item.d.ts → src/elements/pop-up/pop-up-menu-item.ts} +4 -3
- package/{dist/elements/pop-up/vira-menu-item.element.js → src/elements/pop-up/vira-menu-item.element.ts} +28 -11
- package/src/elements/pop-up/vira-menu-trigger.element.ts +158 -0
- package/{dist/elements/pop-up/vira-menu.element.js → src/elements/pop-up/vira-menu.element.ts} +76 -49
- package/{dist/elements/pop-up/vira-pop-up-menu.element.js → src/elements/pop-up/vira-pop-up-menu.element.ts} +34 -22
- package/{dist/elements/pop-up/vira-pop-up-trigger.element.js → src/elements/pop-up/vira-pop-up-trigger.element.ts} +200 -91
- package/src/elements/shared-text-input-logic.ts +173 -0
- package/{dist/elements/vira-bold-text.element.js → src/elements/vira-bold-text.element.ts} +8 -7
- package/{dist/elements/vira-button.element.js → src/elements/vira-button.element.ts} +64 -33
- package/{dist/elements/vira-card.element.js → src/elements/vira-card.element.ts} +16 -13
- package/{dist/elements/vira-checkbox.element.js → src/elements/vira-checkbox.element.ts} +71 -28
- package/{dist/elements/vira-collapsible-wrapper.element.js → src/elements/vira-collapsible-wrapper.element.ts} +18 -16
- package/{dist/elements/vira-dropdown.element.js → src/elements/vira-dropdown.element.ts} +94 -48
- package/{dist/elements/vira-error.element.js → src/elements/vira-error.element.ts} +6 -5
- package/{dist/elements/vira-icon.element.js → src/elements/vira-icon.element.ts} +13 -6
- package/{dist/elements/vira-image.element.js → src/elements/vira-image.element.ts} +63 -43
- package/{dist/elements/vira-input.element.js → src/elements/vira-input.element.ts} +151 -85
- package/{dist/elements/vira-link.element.js → src/elements/vira-link.element.ts} +62 -11
- package/{dist/elements/vira-modal.element.js → src/elements/vira-modal.element.ts} +89 -50
- package/src/elements/vira-overflow-switch.element.ts +137 -0
- package/{dist/elements/vira-progress.element.js → src/elements/vira-progress.element.ts} +26 -11
- package/{dist/elements/vira-select.element.js → src/elements/vira-select.element.ts} +96 -41
- package/src/icons/icon-color.test-helper.ts +9 -0
- package/{dist/icons/icon-css-vars.js → src/icons/icon-css-vars.ts} +2 -1
- package/src/icons/icon-svg.ts +71 -0
- package/{dist/icons/icon-svgs/bell-24.icon.js → src/icons/icon-svgs/bell-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/chat-24.icon.js → src/icons/icon-svgs/chat-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/check-24.icon.js → src/icons/icon-svgs/check-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/chevron-down-24.icon.js → src/icons/icon-svgs/chevron-down-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/chevron-up-24.icon.js → src/icons/icon-svgs/chevron-up-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/close-x-24.icon.js → src/icons/icon-svgs/close-x-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/commit-24.icon.js → src/icons/icon-svgs/commit-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/copy-24.icon.js → src/icons/icon-svgs/copy-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/document-24.icon.js → src/icons/icon-svgs/document-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/document-search-24.icon.js → src/icons/icon-svgs/document-search-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/double-chevron-24.icon.js → src/icons/icon-svgs/double-chevron-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/element-16.icon.js → src/icons/icon-svgs/element-16.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/element-24.icon.js → src/icons/icon-svgs/element-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/external-link-24.icon.js → src/icons/icon-svgs/external-link-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/eye-closed-24.icon.js → src/icons/icon-svgs/eye-closed-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/eye-open-24.icon.js → src/icons/icon-svgs/eye-open-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/filter-24.icon.js → src/icons/icon-svgs/filter-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/link-24.icon.js → src/icons/icon-svgs/link-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/loader-24.icon.js → src/icons/icon-svgs/loader-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/loader-animated-24.icon.js → src/icons/icon-svgs/loader-animated-24.icon.ts} +8 -6
- package/{dist/icons/icon-svgs/lock-24.icon.js → src/icons/icon-svgs/lock-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/options-24.icon.js → src/icons/icon-svgs/options-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/pencil-24.icon.js → src/icons/icon-svgs/pencil-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/shield-24.icon.js → src/icons/icon-svgs/shield-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/sort-ascending-24.icon.js → src/icons/icon-svgs/sort-ascending-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/sort-descending-24.icon.js → src/icons/icon-svgs/sort-descending-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/speaker-loud-24.icon.js → src/icons/icon-svgs/speaker-loud-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/speaker-medium-24.icon.js → src/icons/icon-svgs/speaker-medium-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/speaker-muted-24.icon.js → src/icons/icon-svgs/speaker-muted-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/speaker-quiet-24.icon.js → src/icons/icon-svgs/speaker-quiet-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/star-24.icon.js → src/icons/icon-svgs/star-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/status-failure-24.icon.js → src/icons/icon-svgs/status-failure-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/status-in-progress-24.icon.js → src/icons/icon-svgs/status-in-progress-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/status-success-24.icon.js → src/icons/icon-svgs/status-success-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/status-unknown-24.icon.js → src/icons/icon-svgs/status-unknown-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/status-warning-24.icon.js → src/icons/icon-svgs/status-warning-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/upload-24.icon.js → src/icons/icon-svgs/upload-24.icon.ts} +5 -4
- package/{dist/icons/icon-svgs/x-24.icon.js → src/icons/icon-svgs/x-24.icon.ts} +5 -4
- package/{dist/icons/index.js → src/icons/index.ts} +43 -39
- package/{dist/styles/border.js → src/styles/border.ts} +2 -1
- package/{dist/styles/disabled.js → src/styles/disabled.ts} +3 -2
- package/{dist/styles/durations.js → src/styles/durations.ts} +2 -1
- package/{dist/styles/focus.js → src/styles/focus.ts} +32 -8
- package/{dist/styles/font.js → src/styles/font.ts} +2 -1
- package/{dist/styles/form-styles.js → src/styles/form-styles.ts} +6 -1
- package/{dist/styles/index.js → src/styles/index.ts} +1 -0
- package/{dist/styles/native-styles.js → src/styles/native-styles.ts} +5 -3
- package/{dist/styles/scrollbar.js → src/styles/scrollbar.ts} +4 -3
- package/{dist/styles/shadows.js → src/styles/shadows.ts} +8 -6
- package/{dist/styles/user-select.js → src/styles/user-select.ts} +3 -2
- package/{dist/styles/vira-color-palette.js → src/styles/vira-color-palette.ts} +11 -1
- package/src/styles/vira-color-theme.ts +1142 -0
- package/src/util/define-table.ts +279 -0
- package/src/util/dynamic-element.ts +129 -0
- package/src/util/pop-up-manager.ts +380 -0
- package/dist/elements/define-vira-element.d.ts +0 -18
- package/dist/elements/define-vira-element.js +0 -19
- package/dist/elements/form/vira-form-fields.d.ts +0 -100
- package/dist/elements/form/vira-form-fields.js +0 -60
- package/dist/elements/form/vira-form.element.d.ts +0 -35
- package/dist/elements/form/vira-form.element.js +0 -151
- package/dist/elements/index.js +0 -25
- package/dist/elements/pop-up/pop-up-helpers.d.ts +0 -33
- package/dist/elements/pop-up/pop-up-helpers.js +0 -58
- package/dist/elements/pop-up/pop-up-menu-item.js +0 -1
- package/dist/elements/pop-up/vira-menu-item.element.d.ts +0 -19
- package/dist/elements/pop-up/vira-menu-trigger.element.d.ts +0 -41
- package/dist/elements/pop-up/vira-menu-trigger.element.js +0 -121
- package/dist/elements/pop-up/vira-menu.element.d.ts +0 -38
- package/dist/elements/pop-up/vira-pop-up-menu.element.d.ts +0 -35
- package/dist/elements/pop-up/vira-pop-up-trigger.element.d.ts +0 -105
- package/dist/elements/shared-text-input-logic.d.ts +0 -63
- package/dist/elements/shared-text-input-logic.js +0 -101
- package/dist/elements/vira-bold-text.element.d.ts +0 -9
- package/dist/elements/vira-button.element.d.ts +0 -31
- package/dist/elements/vira-card.element.d.ts +0 -18
- package/dist/elements/vira-checkbox.element.d.ts +0 -34
- package/dist/elements/vira-collapsible-wrapper.element.d.ts +0 -14
- package/dist/elements/vira-dropdown.element.d.ts +0 -46
- package/dist/elements/vira-error.element.d.ts +0 -7
- package/dist/elements/vira-icon.element.d.ts +0 -13
- package/dist/elements/vira-image.element.d.ts +0 -45
- package/dist/elements/vira-input.element.d.ts +0 -62
- package/dist/elements/vira-link.element.d.ts +0 -73
- package/dist/elements/vira-modal.element.d.ts +0 -39
- package/dist/elements/vira-overflow-switch.element.d.ts +0 -21
- package/dist/elements/vira-overflow-switch.element.js +0 -110
- package/dist/elements/vira-progress.element.d.ts +0 -18
- package/dist/elements/vira-select.element.d.ts +0 -48
- package/dist/icons/icon-color.test-helper.d.ts +0 -6
- package/dist/icons/icon-color.test-helper.js +0 -9
- package/dist/icons/icon-css-vars.d.ts +0 -14
- package/dist/icons/icon-svg.d.ts +0 -27
- package/dist/icons/icon-svg.js +0 -48
- package/dist/icons/icon-svgs/bell-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/chat-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/check-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/chevron-down-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/chevron-up-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/close-x-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/commit-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/copy-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/document-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/document-search-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/double-chevron-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/element-16.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/element-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/external-link-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/eye-closed-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/eye-open-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/filter-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/link-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/loader-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/loader-animated-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/lock-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/options-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/pencil-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/shield-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/sort-ascending-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/sort-descending-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/speaker-loud-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/speaker-medium-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/speaker-muted-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/speaker-quiet-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/star-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/status-failure-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/status-in-progress-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/status-success-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/status-unknown-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/status-warning-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/upload-24.icon.d.ts +0 -8
- package/dist/icons/icon-svgs/x-24.icon.d.ts +0 -8
- package/dist/icons/index.d.ts +0 -86
- package/dist/index.js +0 -4
- package/dist/styles/border.d.ts +0 -9
- package/dist/styles/disabled.d.ts +0 -6
- package/dist/styles/durations.d.ts +0 -22
- package/dist/styles/focus.d.ts +0 -31
- package/dist/styles/font.d.ts +0 -9
- package/dist/styles/form-styles.d.ts +0 -20
- package/dist/styles/index.d.ts +0 -13
- package/dist/styles/native-styles.d.ts +0 -13
- package/dist/styles/scrollbar.d.ts +0 -6
- package/dist/styles/shadows.d.ts +0 -20
- package/dist/styles/user-select.d.ts +0 -6
- package/dist/styles/vira-color-palette.d.ts +0 -95
- package/dist/styles/vira-color-theme.d.ts +0 -1184
- package/dist/styles/vira-color-theme.js +0 -1137
- package/dist/util/define-table.d.ts +0 -110
- package/dist/util/define-table.js +0 -115
- package/dist/util/dynamic-element.d.ts +0 -63
- package/dist/util/dynamic-element.js +0 -61
- package/dist/util/index.js +0 -3
- package/dist/util/pop-up-manager.d.ts +0 -180
- package/dist/util/pop-up-manager.js +0 -203
- /package/{dist/elements/index.d.ts → src/elements/index.ts} +0 -0
- /package/{dist/index.d.ts → src/index.ts} +0 -0
- /package/{dist/util/index.d.ts → src/util/index.ts} +0 -0
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
import { type AttributeValues } from 'element-vir';
|
|
3
|
-
/**
|
|
4
|
-
* Inputs shared between the multiple input elements.
|
|
5
|
-
*
|
|
6
|
-
* @category Internal
|
|
7
|
-
*/
|
|
8
|
-
export type SharedTextInputElementInputs = {
|
|
9
|
-
value: string;
|
|
10
|
-
} & PartialWithUndefined<{
|
|
11
|
-
/** Shown when no other text is present. Input restrictions do not apply to this property. */
|
|
12
|
-
placeholder: string;
|
|
13
|
-
/** Set to true to trigger disabled styles and to block all user input. */
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Only letters in the given string or matches to the given RegExp will be allowed.
|
|
17
|
-
* blockedInputs takes precedence over this input.
|
|
18
|
-
*
|
|
19
|
-
* For example: if allowedInputs is set to "abcd" and blockedInputs is set to "d", only "a",
|
|
20
|
-
* "b", or "c" letters will be allowed.
|
|
21
|
-
*/
|
|
22
|
-
allowedInputs: string | RegExp;
|
|
23
|
-
/** Any letters in the given string or matches to the given RegExp will be blocked. */
|
|
24
|
-
blockedInputs: string | RegExp;
|
|
25
|
-
/** Disable all browser helps like spellchecking, autocomplete, etc. */
|
|
26
|
-
disableBrowserHelps: boolean;
|
|
27
|
-
/** Set this to true to make the whole element size to only fit the input text. */
|
|
28
|
-
fitText: boolean;
|
|
29
|
-
/** A set of attributes that will be applied to the inner native text element. */
|
|
30
|
-
attributePassthrough: AttributeValues;
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Inputs used to check if the current input element value is allowed.
|
|
34
|
-
*
|
|
35
|
-
* @category Internal
|
|
36
|
-
*/
|
|
37
|
-
export type IsAllowedInputs = {
|
|
38
|
-
value: string;
|
|
39
|
-
allowed: string | RegExp | undefined;
|
|
40
|
-
blocked: string | RegExp | undefined;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Filters out blocked text from an input element's value.
|
|
44
|
-
*
|
|
45
|
-
* @category Internal
|
|
46
|
-
*/
|
|
47
|
-
export declare function filterTextInputValue(inputs: IsAllowedInputs): {
|
|
48
|
-
filtered: string;
|
|
49
|
-
blocked: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* A function to be called when an input element's value changes.
|
|
53
|
-
*
|
|
54
|
-
* @category Internal
|
|
55
|
-
*/
|
|
56
|
-
export declare function textInputListener({ inputs, previousValue, event, inputBlockedCallback, newValueCallback, }: {
|
|
57
|
-
inputs: SharedTextInputElementInputs;
|
|
58
|
-
/** The value of the input element before this listener fired. */
|
|
59
|
-
previousValue: string;
|
|
60
|
-
event: Event;
|
|
61
|
-
inputBlockedCallback: (blockedInput: string) => void;
|
|
62
|
-
newValueCallback: (newValue: string) => void;
|
|
63
|
-
}): void;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { check, checkWrap } from '@augment-vir/assert';
|
|
2
|
-
import { extractEventTarget } from '@augment-vir/web';
|
|
3
|
-
function doesMatch({ input, matcher }) {
|
|
4
|
-
if (!input || !matcher) {
|
|
5
|
-
return true;
|
|
6
|
-
}
|
|
7
|
-
if (input.length > 1) {
|
|
8
|
-
return input.split('').every((singleInput) => doesMatch({ input: singleInput, matcher }));
|
|
9
|
-
}
|
|
10
|
-
if (matcher instanceof RegExp) {
|
|
11
|
-
return !!input.match(matcher);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return matcher.includes(input);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function isAllowed({ value, allowed, blocked }) {
|
|
18
|
-
const isAllowedCharacter = allowed
|
|
19
|
-
? doesMatch({
|
|
20
|
-
input: value,
|
|
21
|
-
matcher: allowed,
|
|
22
|
-
})
|
|
23
|
-
: true;
|
|
24
|
-
const isBlockedCharacter = blocked
|
|
25
|
-
? doesMatch({
|
|
26
|
-
input: value,
|
|
27
|
-
matcher: blocked,
|
|
28
|
-
})
|
|
29
|
-
: false;
|
|
30
|
-
return isAllowedCharacter && !isBlockedCharacter;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Filters out blocked text from an input element's value.
|
|
34
|
-
*
|
|
35
|
-
* @category Internal
|
|
36
|
-
*/
|
|
37
|
-
export function filterTextInputValue(inputs) {
|
|
38
|
-
if (!inputs.value) {
|
|
39
|
-
return { filtered: inputs.value, blocked: '' };
|
|
40
|
-
}
|
|
41
|
-
const { filtered, blocked } = inputs.value.split('').reduce((accum, letter) => {
|
|
42
|
-
const allowed = isAllowed({ ...inputs, value: letter });
|
|
43
|
-
if (allowed) {
|
|
44
|
-
accum.filtered.push(letter);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
accum.blocked.push(letter);
|
|
48
|
-
}
|
|
49
|
-
return accum;
|
|
50
|
-
}, {
|
|
51
|
-
filtered: [],
|
|
52
|
-
blocked: [],
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
filtered: filtered.join(''),
|
|
56
|
-
blocked: blocked.join(''),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* A function to be called when an input element's value changes.
|
|
61
|
-
*
|
|
62
|
-
* @category Internal
|
|
63
|
-
*/
|
|
64
|
-
export function textInputListener({ inputs, previousValue, event, inputBlockedCallback, newValueCallback, }) {
|
|
65
|
-
const inputElement = extractEventTarget(event, HTMLInputElement);
|
|
66
|
-
/**
|
|
67
|
-
* This is usually a single character, but can be a bunch of characters in some circumstances.
|
|
68
|
-
* For example, when a bunch of characters are pasted, this will be the entire pasted contents.
|
|
69
|
-
*
|
|
70
|
-
* When a password manager auto fills the password, at least for Safari + iCloud Keychain, it'll
|
|
71
|
-
* fire a `CustomEvent` (rather than the typical `InputEvent`) and `event.data` won't be
|
|
72
|
-
* populated.
|
|
73
|
-
*/
|
|
74
|
-
const changedText = (check.hasKey(event, 'data') && checkWrap.isString(event.data)) || '';
|
|
75
|
-
/**
|
|
76
|
-
* When changedText is falsy, that means an operation other than inserting characters happened.
|
|
77
|
-
* Such as: deleting, cutting the text, etc.
|
|
78
|
-
*/
|
|
79
|
-
if (changedText) {
|
|
80
|
-
const { blocked } = filterTextInputValue({
|
|
81
|
-
value: changedText,
|
|
82
|
-
allowed: inputs.allowedInputs,
|
|
83
|
-
blocked: inputs.blockedInputs,
|
|
84
|
-
});
|
|
85
|
-
if (blocked.length) {
|
|
86
|
-
inputBlockedCallback(blocked);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const finalValue = filterTextInputValue({
|
|
90
|
-
value: inputElement.value,
|
|
91
|
-
allowed: inputs.allowedInputs,
|
|
92
|
-
blocked: inputs.blockedInputs,
|
|
93
|
-
}).filtered;
|
|
94
|
-
if (inputElement.value !== finalValue) {
|
|
95
|
-
// this prevents blocked inputs by simply overwriting them
|
|
96
|
-
inputElement.value = finalValue;
|
|
97
|
-
}
|
|
98
|
-
if (previousValue !== finalValue) {
|
|
99
|
-
newValueCallback(finalValue);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use this element to reserve space for bolded text, even if it isn't bold yet.
|
|
3
|
-
*
|
|
4
|
-
* @category Elements
|
|
5
|
-
*/
|
|
6
|
-
export declare const ViraBoldText: import("element-vir").DeclarativeElementDefinition<"vira-bold", {
|
|
7
|
-
bold: boolean;
|
|
8
|
-
text: string;
|
|
9
|
-
}, {}, {}, "vira-bold-bold", "vira-bold-bold-weight", readonly [], readonly []>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
import { type ViraIconSvg } from '../icons/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Button styles available for {@link ViraButton}.
|
|
5
|
-
*
|
|
6
|
-
* @category Button
|
|
7
|
-
*/
|
|
8
|
-
export declare enum ViraButtonStyle {
|
|
9
|
-
Default = "vira-button-default",
|
|
10
|
-
Outline = "vira-button-outline"
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A custom button with default styling.
|
|
14
|
-
*
|
|
15
|
-
* @category Button
|
|
16
|
-
* @category Elements
|
|
17
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-button
|
|
18
|
-
*/
|
|
19
|
-
export declare const ViraButton: import("element-vir").DeclarativeElementDefinition<"vira-button", PartialWithUndefined<{
|
|
20
|
-
text: string;
|
|
21
|
-
icon: Pick<ViraIconSvg, "svgTemplate">;
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
buttonStyle: ViraButtonStyle;
|
|
24
|
-
/**
|
|
25
|
-
* When set to `true`, the given icon (if any) will take up its full dimensions, potentially
|
|
26
|
-
* increasing the button's size.
|
|
27
|
-
*
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
30
|
-
expandToFitIcon: boolean;
|
|
31
|
-
}>, {}, {}, "vira-button-outline-style" | "vira-button-disabled" | "vira-button-expand-to-fit-icon", "vira-button-primary-color" | "vira-button-primary-hover-color" | "vira-button-primary-active-color" | "vira-button-secondary-color" | "vira-button-padding" | "vira-button-internal-foreground-color" | "vira-button-internal-background-color", readonly [], readonly []>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* State options for {@link ViraCard}.
|
|
3
|
-
*
|
|
4
|
-
* @category Internal
|
|
5
|
-
*/
|
|
6
|
-
export declare enum ViraCardState {
|
|
7
|
-
Error = "error",
|
|
8
|
-
Success = "success"
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* A simple wrapper "card" element that is just a `<slot>` with some styles.
|
|
12
|
-
*
|
|
13
|
-
* @category Elements
|
|
14
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-card
|
|
15
|
-
*/
|
|
16
|
-
export declare const ViraCard: import("element-vir").DeclarativeElementDefinition<"vira-card", {
|
|
17
|
-
cardState?: ViraCardState | undefined;
|
|
18
|
-
}, {}, {}, "vira-card-error" | "vira-card-success", "vira-card-border" | "vira-card-border-radius" | "vira-card-padding", readonly [], readonly []>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
import { type AttributeValues, type CSSResult } from 'element-vir';
|
|
3
|
-
import { ViraIcon } from './vira-icon.element.js';
|
|
4
|
-
/**
|
|
5
|
-
* All inner elements supported by {@link ViraCheckbox}.
|
|
6
|
-
*
|
|
7
|
-
* @category Internals
|
|
8
|
-
*/
|
|
9
|
-
export type ViraCheckboxInnerElements = 'label' | 'custom-checkbox' | 'text' | typeof ViraIcon.tagName;
|
|
10
|
-
/**
|
|
11
|
-
* Inputs for {@link ViraCheckbox}.
|
|
12
|
-
*
|
|
13
|
-
* @category Internal
|
|
14
|
-
*/
|
|
15
|
-
export type ViraCheckboxInputs = PartialWithUndefined<{
|
|
16
|
-
stylePassthrough: Partial<Record<ViraCheckboxInnerElements, CSSResult>>;
|
|
17
|
-
attributePassthrough: Partial<Record<ViraCheckboxInnerElements, AttributeValues>>;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
label: string;
|
|
20
|
-
hasError: boolean;
|
|
21
|
-
horizontal: boolean;
|
|
22
|
-
}> & {
|
|
23
|
-
value: boolean;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* A custom checkbox.
|
|
27
|
-
*
|
|
28
|
-
* @category Input
|
|
29
|
-
* @category Elements
|
|
30
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-checkbox
|
|
31
|
-
*/
|
|
32
|
-
export declare const ViraCheckbox: import("element-vir").DeclarativeElementDefinition<"vira-checkbox", Readonly<ViraCheckboxInputs>, {}, {
|
|
33
|
-
valueChange: import("element-vir").DefineEvent<boolean>;
|
|
34
|
-
}, "vira-checkbox-horizontal", "vira-checkbox-", readonly [], readonly []>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A wrapper element that can collapse and expand to fit its content dynamically and efficiently.
|
|
3
|
-
*
|
|
4
|
-
* @category Collapsible
|
|
5
|
-
* @category Elements
|
|
6
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-collapsible-wrapper
|
|
7
|
-
*/
|
|
8
|
-
export declare const ViraCollapsibleWrapper: import("element-vir").DeclarativeElementDefinition<"vira-collapsible-wrapper", {
|
|
9
|
-
expanded: boolean;
|
|
10
|
-
}, {
|
|
11
|
-
contentHeight: number;
|
|
12
|
-
}, {
|
|
13
|
-
expandChange: import("element-vir").DefineEvent<boolean>;
|
|
14
|
-
}, "vira-collapsible-wrapper-expanded", "vira-collapsible-wrapper-", readonly ["header"], readonly []>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
import { type ViraIconSvg } from '../icons/icon-svg.js';
|
|
3
|
-
import { type ShowPopUpResult } from '../util/pop-up-manager.js';
|
|
4
|
-
import { type MenuItem } from './pop-up/pop-up-menu-item.js';
|
|
5
|
-
import { type PopUpTriggerPosition } from './pop-up/vira-pop-up-trigger.element.js';
|
|
6
|
-
/**
|
|
7
|
-
* Test ids for {@link ViraDropdown}.
|
|
8
|
-
*
|
|
9
|
-
* @category Internal
|
|
10
|
-
*/
|
|
11
|
-
export declare const viraDropdownTestIds: {
|
|
12
|
-
trigger: string;
|
|
13
|
-
icon: string;
|
|
14
|
-
prefix: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* A dropdown element that uses pop-up menus.
|
|
18
|
-
*
|
|
19
|
-
* @category Dropdown
|
|
20
|
-
* @category Elements
|
|
21
|
-
* @see https://electrovir.github.io/vira/book/elements/dropdown/vira-dropdown
|
|
22
|
-
*/
|
|
23
|
-
export declare const ViraDropdown: import("element-vir").DeclarativeElementDefinition<"vira-dropdown", {
|
|
24
|
-
options: ReadonlyArray<Readonly<MenuItem>>;
|
|
25
|
-
/** The selected id from the given options. */
|
|
26
|
-
selected: ReadonlyArray<PropertyKey>;
|
|
27
|
-
} & PartialWithUndefined<{
|
|
28
|
-
/** Text to show if nothing is selected. */
|
|
29
|
-
placeholder: string;
|
|
30
|
-
/**
|
|
31
|
-
* If false, this will behave like a single select dropdown, otherwise you can select
|
|
32
|
-
* multiple.
|
|
33
|
-
*/
|
|
34
|
-
isMultiSelect: boolean;
|
|
35
|
-
icon: ViraIconSvg;
|
|
36
|
-
selectionPrefix: string;
|
|
37
|
-
isDisabled: boolean;
|
|
38
|
-
/** For debugging purposes only. Very bad for actual production code use. */
|
|
39
|
-
z_debug_forceOpenState: boolean;
|
|
40
|
-
} & PopUpTriggerPosition>, {
|
|
41
|
-
/** `undefined` means the pop up is not currently showing. */
|
|
42
|
-
showPopUpResult: ShowPopUpResult | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
selectedChange: import("element-vir").DefineEvent<PropertyKey[]>;
|
|
45
|
-
openChange: import("element-vir").DefineEvent<ShowPopUpResult | undefined>;
|
|
46
|
-
}, "vira-dropdown-", "vira-dropdown-", readonly [], readonly []>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An error wrapper that applies error coloring (red, by default).
|
|
3
|
-
*
|
|
4
|
-
* @category Elements
|
|
5
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-error
|
|
6
|
-
*/
|
|
7
|
-
export declare const ViraError: import("element-vir").DeclarativeElementDefinition<"vira-error", {}, {}, {}, "vira-error-", "vira-error-font-weight", readonly [], readonly []>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ViraIconSvg } from '../icons/icon-svg.js';
|
|
2
|
-
/**
|
|
3
|
-
* An element that renders a single {@link ViraIconSvg}.
|
|
4
|
-
*
|
|
5
|
-
* @category Icon
|
|
6
|
-
* @category Elements
|
|
7
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-icon
|
|
8
|
-
*/
|
|
9
|
-
export declare const ViraIcon: import("element-vir").DeclarativeElementDefinition<"vira-icon", {
|
|
10
|
-
icon: Pick<ViraIconSvg, "svgTemplate"> | undefined;
|
|
11
|
-
/** Ignores the given icon's embedded size and causes the <svg> element to fill its parent. */
|
|
12
|
-
fitContainer?: boolean | undefined;
|
|
13
|
-
}, {}, {}, "vira-icon-fit-container", "vira-icon-", readonly [], readonly []>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type Dimensions } from '@augment-vir/common';
|
|
2
|
-
import { type Duration, type DurationUnit } from 'date-vir';
|
|
3
|
-
/**
|
|
4
|
-
* An `<img>` element wrapper that handles size constraints and includes slots for loading and error
|
|
5
|
-
* indicators.
|
|
6
|
-
*
|
|
7
|
-
* Use CSS properties to constrain the image. In particular, set `min-height` and `min-width` on
|
|
8
|
-
* this to control the size of the loader and error slots.
|
|
9
|
-
*
|
|
10
|
-
* @category Image
|
|
11
|
-
* @category Elements
|
|
12
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-image
|
|
13
|
-
*/
|
|
14
|
-
export declare const ViraImage: import("element-vir").DeclarativeElementDefinition<"vira-image", {
|
|
15
|
-
/** The URL of the image to load. This is passed directly to the `<img>` element. */
|
|
16
|
-
imageUrl: string;
|
|
17
|
-
/**
|
|
18
|
-
* The dimension which should dominantly constrain the image size. Whichever dimension this is
|
|
19
|
-
* set to is the dimension that the image will grow to match. This is only relevant if you apply
|
|
20
|
-
* size constraints on ViraImage via CSS in its parent.
|
|
21
|
-
*
|
|
22
|
-
* @default 'width'
|
|
23
|
-
*/
|
|
24
|
-
dominantDimension?: keyof Dimensions | undefined;
|
|
25
|
-
/** For debugging only: artificially set a delay for the image loading so you can see the loader. */
|
|
26
|
-
_debugLoadDelay?: Duration<DurationUnit.Milliseconds> | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
/**
|
|
29
|
-
* To avoid race conditions between `<img>` element events and potential input changing,
|
|
30
|
-
* save the loaded state of an URL's image by the image's URL.
|
|
31
|
-
*/
|
|
32
|
-
loadedUrls: Readonly<{
|
|
33
|
-
[url: string]: true;
|
|
34
|
-
}>;
|
|
35
|
-
/**
|
|
36
|
-
* To avoid race conditions between `<img>` element events and potential input changing,
|
|
37
|
-
* save the errored state of an URL's image by the image's URL.
|
|
38
|
-
*/
|
|
39
|
-
erroredUrls: Readonly<{
|
|
40
|
-
[url: string]: true;
|
|
41
|
-
}>;
|
|
42
|
-
}, {
|
|
43
|
-
imageLoad: import("element-vir").DefineEvent<void>;
|
|
44
|
-
imageError: import("element-vir").DefineEvent<unknown>;
|
|
45
|
-
}, "vira-image-height-constrained", "vira-image-", readonly ["loading", "error"], readonly []>;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
import { type ViraIconSvg } from '../icons/index.js';
|
|
3
|
-
export * from './shared-text-input-logic.js';
|
|
4
|
-
/**
|
|
5
|
-
* Input types for {@link ViraInput}.
|
|
6
|
-
*
|
|
7
|
-
* @category Internal
|
|
8
|
-
*/
|
|
9
|
-
export declare enum ViraInputType {
|
|
10
|
-
Default = "text",
|
|
11
|
-
Password = "password",
|
|
12
|
-
Email = "email"
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* A single line input element with all listeners properly attached. Multiple types are allowed with
|
|
16
|
-
* {@link ViraInputType}.
|
|
17
|
-
*
|
|
18
|
-
* @category Input
|
|
19
|
-
* @category Elements
|
|
20
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-input
|
|
21
|
-
*/
|
|
22
|
-
export declare const ViraInput: import("element-vir").DeclarativeElementDefinition<"vira-input", Readonly<PartialWithUndefined<{
|
|
23
|
-
icon: Pick<ViraIconSvg, "svgTemplate">;
|
|
24
|
-
/** A suffix that, if provided, is shown following the input field. */
|
|
25
|
-
suffix: string;
|
|
26
|
-
/** A label that is shown above the input, if provided. */
|
|
27
|
-
label: string;
|
|
28
|
-
/** If true, applies error styling. */
|
|
29
|
-
hasError: boolean;
|
|
30
|
-
showClearButton: boolean;
|
|
31
|
-
type: ViraInputType;
|
|
32
|
-
}> & {
|
|
33
|
-
value: string;
|
|
34
|
-
} & PartialWithUndefined<{
|
|
35
|
-
placeholder: string;
|
|
36
|
-
disabled: boolean;
|
|
37
|
-
allowedInputs: string | RegExp;
|
|
38
|
-
blockedInputs: string | RegExp;
|
|
39
|
-
disableBrowserHelps: boolean;
|
|
40
|
-
fitText: boolean;
|
|
41
|
-
attributePassthrough: import("element-vir").AttributeValues;
|
|
42
|
-
}>>, {
|
|
43
|
-
forcedInputWidth: number;
|
|
44
|
-
showPassword: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Used to couple the label and input together. This is not applied if no label is
|
|
47
|
-
* provided.
|
|
48
|
-
*/
|
|
49
|
-
randomId: string;
|
|
50
|
-
}, {
|
|
51
|
-
/**
|
|
52
|
-
* Fires whenever a user input created a new value. Does not fire if all input letters are
|
|
53
|
-
* filtered out due to input restrictions.
|
|
54
|
-
*/
|
|
55
|
-
valueChange: import("element-vir").DefineEvent<string>;
|
|
56
|
-
/**
|
|
57
|
-
* Fires when inputs are blocked. Useful for showing warnings or error messages to inform
|
|
58
|
-
* the user why their input did not propagate if it was blocked. This does not fire for text
|
|
59
|
-
* that was blocked out of programmatic "value" property assignments.
|
|
60
|
-
*/
|
|
61
|
-
inputBlocked: import("element-vir").DefineEvent<string>;
|
|
62
|
-
}, "vira-input-disabled" | "vira-input-fit-text" | "vira-input-clear-button-shown" | "vira-input-error", "vira-input-action-button-color" | "vira-input-clear-button-hover-color" | "vira-input-clear-button-active-color" | "vira-input-show-password-button-hover-color" | "vira-input-show-password-button-active-color" | "vira-input-padding-horizontal" | "vira-input-padding-vertical", readonly [], readonly []>;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
import { type AttributeValues, type CSSResult } from 'element-vir';
|
|
3
|
-
import { type SpaRoute, type SpaRouter } from 'spa-router-vir';
|
|
4
|
-
/**
|
|
5
|
-
* The route properties required for using {@link ViraLink} with a route.
|
|
6
|
-
*
|
|
7
|
-
* @category Internal
|
|
8
|
-
*/
|
|
9
|
-
export type ViraLinkRoute = Readonly<{
|
|
10
|
-
route: SpaRoute<any, any, any>;
|
|
11
|
-
router: Pick<SpaRouter<any, any, any>, 'createRouteUrl' | 'setRouteOnDirectNavigation'>;
|
|
12
|
-
scrollToTop?: boolean;
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
* A hyperlink wrapper element that can be configured to emit route change events rather than just
|
|
16
|
-
* being a raw link.
|
|
17
|
-
*
|
|
18
|
-
* @category Link
|
|
19
|
-
* @category Elements
|
|
20
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-link
|
|
21
|
-
*/
|
|
22
|
-
export declare const ViraLink: import("element-vir").DeclarativeElementDefinition<"vira-link", (((Required<Pick<{
|
|
23
|
-
/**
|
|
24
|
-
* A full raw URL link that will navigate the current window away or open a new tab. If this
|
|
25
|
-
* property is provided for the inputs, don't provide a route property.
|
|
26
|
-
*/
|
|
27
|
-
link: {
|
|
28
|
-
url: string;
|
|
29
|
-
newTab: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* A route that'll change that current page without navigating the window. If this property
|
|
33
|
-
* is provided for the inputs, don't provide a link property.
|
|
34
|
-
*/
|
|
35
|
-
route: ViraLinkRoute;
|
|
36
|
-
}, "link">> & Partial<Record<"route", never>>) | (Required<Pick<{
|
|
37
|
-
/**
|
|
38
|
-
* A full raw URL link that will navigate the current window away or open a new tab. If this
|
|
39
|
-
* property is provided for the inputs, don't provide a route property.
|
|
40
|
-
*/
|
|
41
|
-
link: {
|
|
42
|
-
url: string;
|
|
43
|
-
newTab: boolean;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* A route that'll change that current page without navigating the window. If this property
|
|
47
|
-
* is provided for the inputs, don't provide a link property.
|
|
48
|
-
*/
|
|
49
|
-
route: ViraLinkRoute;
|
|
50
|
-
}, "route">> & Partial<Record<"link", never>>)) & Omit<{
|
|
51
|
-
/**
|
|
52
|
-
* A full raw URL link that will navigate the current window away or open a new tab. If this
|
|
53
|
-
* property is provided for the inputs, don't provide a route property.
|
|
54
|
-
*/
|
|
55
|
-
link: {
|
|
56
|
-
url: string;
|
|
57
|
-
newTab: boolean;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* A route that'll change that current page without navigating the window. If this property
|
|
61
|
-
* is provided for the inputs, don't provide a link property.
|
|
62
|
-
*/
|
|
63
|
-
route: ViraLinkRoute;
|
|
64
|
-
}, "link" | "route">) & PartialWithUndefined<{
|
|
65
|
-
/** Styles that will be applied directly to the inner elements. */
|
|
66
|
-
stylePassthrough: Readonly<PartialWithUndefined<{
|
|
67
|
-
a: CSSResult;
|
|
68
|
-
}>>;
|
|
69
|
-
/** Attributes that will be applied directly to the inner elements. */
|
|
70
|
-
attributePassthrough: Readonly<PartialWithUndefined<{
|
|
71
|
-
a: AttributeValues;
|
|
72
|
-
}>>;
|
|
73
|
-
}>, {}, {}, "vira-link-", "vira-link-hover-color", readonly [], readonly []>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
-
/**
|
|
3
|
-
* A modal element that uses the built-in `dialog` element.
|
|
4
|
-
*
|
|
5
|
-
* @category Elements
|
|
6
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-modal
|
|
7
|
-
*/
|
|
8
|
-
export declare const ViraModal: import("element-vir").DeclarativeElementDefinition<"vira-modal", Readonly<{
|
|
9
|
-
open: boolean;
|
|
10
|
-
} & PartialWithUndefined<{
|
|
11
|
-
/** If this isn't set, make sure to use the modal title slot to fill it in. */
|
|
12
|
-
modalTitle: string;
|
|
13
|
-
/**
|
|
14
|
-
* If `true`, the following conditions trigger the modal to close:
|
|
15
|
-
*
|
|
16
|
-
* - The user clicks the "x" close button
|
|
17
|
-
* - The `open` input is set to `false`
|
|
18
|
-
*
|
|
19
|
-
* If set to `false` (the default), the following conditions trigger the modal to close:
|
|
20
|
-
*
|
|
21
|
-
* - The user clicks outside of the modal
|
|
22
|
-
* - The user presses the "Escape" key
|
|
23
|
-
* - The user clicks the "x" close button
|
|
24
|
-
* - The `open` input is set to `false`
|
|
25
|
-
*
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
blockLightDismissal: boolean;
|
|
29
|
-
modalSubtitle: string;
|
|
30
|
-
isMobileSize: boolean;
|
|
31
|
-
}>>, {
|
|
32
|
-
dialogElement: HTMLDialogElement | undefined;
|
|
33
|
-
contentElement: HTMLDivElement | undefined;
|
|
34
|
-
previousOpenValue: undefined | boolean;
|
|
35
|
-
/** Remove listeners. */
|
|
36
|
-
cleanup: undefined | (() => void);
|
|
37
|
-
}, {
|
|
38
|
-
modalClose: import("element-vir").DefineEvent<void>;
|
|
39
|
-
}, "vira-modal-phone-size", "vira-modal-backdrop-color" | "vira-modal-backdrop-filter" | "vira-modal-subtitle-color" | "vira-modal-close-button-hover-radius" | "vira-modal-close-button-hover-background-color", readonly ["modalTitle"], readonly []>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An element switches between two slots based on their overflow.
|
|
3
|
-
*
|
|
4
|
-
* @category Elements
|
|
5
|
-
* @see https://electrovir.github.io/vira/book/elements/vira-overflow-switch
|
|
6
|
-
*/
|
|
7
|
-
export declare const ViraOverflowSwitch: import("element-vir").DeclarativeElementDefinition<"vira-overflow-switch", Readonly<((Required<Pick<{
|
|
8
|
-
automaticallySwitch: boolean;
|
|
9
|
-
useSmall: boolean;
|
|
10
|
-
}, "automaticallySwitch">> & Partial<Record<"useSmall", never>>) | (Required<Pick<{
|
|
11
|
-
automaticallySwitch: boolean;
|
|
12
|
-
useSmall: boolean;
|
|
13
|
-
}, "useSmall">> & Partial<Record<"automaticallySwitch", never>>)) & Omit<{
|
|
14
|
-
automaticallySwitch: boolean;
|
|
15
|
-
useSmall: boolean;
|
|
16
|
-
}, "automaticallySwitch" | "useSmall">>, {
|
|
17
|
-
isOverflowing: boolean;
|
|
18
|
-
resizeObserver: undefined | ResizeObserver;
|
|
19
|
-
/** Called on cleanup to clear all listeners. */
|
|
20
|
-
cleanup: undefined | (() => void);
|
|
21
|
-
}, {}, "vira-overflow-switch-show-small", "vira-overflow-switch-", readonly ["large", "small"], readonly []>;
|