vira 0.7.2 → 1.0.1
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/common/shared-text-input-logic.d.ts +38 -0
- package/dist/elements/common/shared-text-input-logic.js +100 -0
- package/dist/elements/vira-button/vira-button.element.js +2 -2
- package/dist/elements/vira-collapsible/vira-collapsible-wrapper.element.js +2 -2
- package/dist/elements/vira-icon/vira-icon.element.js +4 -4
- package/dist/elements/vira-input/vira-input.element.d.ts +3 -21
- package/dist/elements/vira-input/vira-input.element.js +21 -117
- package/dist/icons/{icon-color-css-vars.d.ts → icon-css-vars.d.ts} +2 -1
- package/dist/icons/{icon-color-css-vars.js → icon-css-vars.js} +5 -1
- package/dist/icons/icon-svgs/element-16.icon.js +2 -1
- package/dist/icons/icon-svgs/element-24.icon.js +7 -3
- package/dist/icons/icon-svgs/loader-24.icon.d.ts +1 -0
- package/dist/icons/icon-svgs/loader-24.icon.js +20 -0
- package/dist/icons/icon-svgs/loader-animated-24.icon.d.ts +1 -0
- package/dist/icons/icon-svgs/loader-animated-24.icon.js +41 -0
- package/dist/icons/icon-svgs/options-24.icon.js +3 -3
- package/dist/icons/icon-svgs/status-failure-24.icon.js +3 -3
- package/dist/icons/icon-svgs/status-in-progress-24.icon.js +5 -5
- package/dist/icons/icon-svgs/status-success-24.icon.js +3 -3
- package/dist/icons/index.d.ts +5 -1
- package/dist/icons/index.js +7 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/styles/durations.d.ts +2 -0
- package/dist/styles/durations.js +2 -0
- package/dist/styles/focus.js +2 -2
- package/dist/styles/native-styles.d.ts +2 -1
- package/dist/styles/native-styles.js +5 -2
- package/package.json +9 -8
- package/dist/util/index.d.ts +0 -2
- package/dist/util/index.js +0 -2
- package/dist/util/native-styles.d.ts +0 -2
- package/dist/util/native-styles.js +0 -16
- package/dist/util/number.d.ts +0 -2
- package/dist/util/number.js +0 -6
- package/www-static/index.css +0 -7
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type SharedTextInputElementInputs = {
|
|
2
|
+
value: string;
|
|
3
|
+
/** Shown when no other text is present. Input restrictions do not apply to this property. */
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
/** Set to true to trigger disabled styles and to block all user input. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Only letters in the given string or matches to the given RegExp will be allowed.
|
|
9
|
+
* blockedInputs takes precedence over this input.
|
|
10
|
+
*
|
|
11
|
+
* For example: if allowedInputs is set to "abcd" and blockedInputs is set to "d", only "a",
|
|
12
|
+
* "b", or "c" letters will be allowed.
|
|
13
|
+
*/
|
|
14
|
+
allowedInputs?: string | RegExp;
|
|
15
|
+
/** Any letters in the given string or matches to the given RegExp will be blocked. */
|
|
16
|
+
blockedInputs?: string | RegExp;
|
|
17
|
+
/** Disable all browser helps like spellchecking, autocomplete, etc. */
|
|
18
|
+
disableBrowserHelps?: boolean;
|
|
19
|
+
/** Set this to true to make the whole element size to only fit the input text. */
|
|
20
|
+
fitText?: boolean;
|
|
21
|
+
};
|
|
22
|
+
type IsAllowedInputs = {
|
|
23
|
+
value: string;
|
|
24
|
+
allowed: string | RegExp | undefined;
|
|
25
|
+
blocked: string | RegExp | undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare function filterTextInputValue(inputs: IsAllowedInputs): {
|
|
28
|
+
filtered: string;
|
|
29
|
+
blocked: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function textInputListener({ inputs, filteredValue, event, inputBlockedCallback, newValueCallback, }: {
|
|
32
|
+
inputs: SharedTextInputElementInputs;
|
|
33
|
+
filteredValue: string;
|
|
34
|
+
event: Event;
|
|
35
|
+
inputBlockedCallback: (blockedInput: string) => void;
|
|
36
|
+
newValueCallback: (newValue: string) => void;
|
|
37
|
+
}): void;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { extractEventTarget } from '@augment-vir/browser';
|
|
2
|
+
function doesMatch({ input, matcher }) {
|
|
3
|
+
if (!input || !matcher) {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
if (input.length > 1) {
|
|
7
|
+
return !!input.split('').every((singleInput) => doesMatch({ input: singleInput, matcher }));
|
|
8
|
+
}
|
|
9
|
+
if (matcher instanceof RegExp) {
|
|
10
|
+
return !!input.match(matcher);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
return matcher.includes(input);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function isAllowed({ value, allowed, blocked }) {
|
|
17
|
+
const isAllowedCharacter = allowed
|
|
18
|
+
? doesMatch({
|
|
19
|
+
input: value,
|
|
20
|
+
matcher: allowed,
|
|
21
|
+
})
|
|
22
|
+
: true;
|
|
23
|
+
const isBlockedCharacter = blocked
|
|
24
|
+
? doesMatch({
|
|
25
|
+
input: value,
|
|
26
|
+
matcher: blocked,
|
|
27
|
+
})
|
|
28
|
+
: false;
|
|
29
|
+
return isAllowedCharacter && !isBlockedCharacter;
|
|
30
|
+
}
|
|
31
|
+
export function filterTextInputValue(inputs) {
|
|
32
|
+
if (!inputs.value) {
|
|
33
|
+
return { filtered: inputs.value, blocked: '' };
|
|
34
|
+
}
|
|
35
|
+
const { filtered, blocked } = inputs.value.split('').reduce((accum, letter) => {
|
|
36
|
+
const allowed = isAllowed({ ...inputs, value: letter });
|
|
37
|
+
if (allowed) {
|
|
38
|
+
accum.filtered.push(letter);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
accum.blocked.push(letter);
|
|
42
|
+
}
|
|
43
|
+
return accum;
|
|
44
|
+
}, {
|
|
45
|
+
filtered: [],
|
|
46
|
+
blocked: [],
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
filtered: filtered.join(''),
|
|
50
|
+
blocked: blocked.join(''),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export function textInputListener({ inputs, filteredValue, event, inputBlockedCallback, newValueCallback, }) {
|
|
54
|
+
if (!(event instanceof InputEvent)) {
|
|
55
|
+
throw new Error('Text input event was not an InputEvent.');
|
|
56
|
+
}
|
|
57
|
+
const inputElement = extractEventTarget(event, HTMLInputElement);
|
|
58
|
+
/**
|
|
59
|
+
* This is usually a single character, but can be a bunch of characters in some circumstances.
|
|
60
|
+
* For example, when a bunch of characters are pasted, this will be the entire pasted contents.
|
|
61
|
+
*/
|
|
62
|
+
const changedText = event.data;
|
|
63
|
+
const beforeChangeText = filteredValue;
|
|
64
|
+
// this will be overwritten below if blocked characters are encountered
|
|
65
|
+
let finalText = inputElement.value ?? '';
|
|
66
|
+
/**
|
|
67
|
+
* When changedText is falsy, that means an operation other than inserting characters happened.
|
|
68
|
+
* Such as: deleting, cutting the text, etc.
|
|
69
|
+
*/
|
|
70
|
+
if (changedText) {
|
|
71
|
+
if (changedText.length === 1) {
|
|
72
|
+
if (!isAllowed({
|
|
73
|
+
value: changedText,
|
|
74
|
+
allowed: inputs.allowedInputs,
|
|
75
|
+
blocked: inputs.blockedInputs,
|
|
76
|
+
})) {
|
|
77
|
+
// prevent the change from happening
|
|
78
|
+
finalText = beforeChangeText;
|
|
79
|
+
inputBlockedCallback(changedText);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// filters out blocked pasted letters
|
|
83
|
+
else {
|
|
84
|
+
const { filtered, blocked } = filterTextInputValue({
|
|
85
|
+
value: changedText,
|
|
86
|
+
allowed: inputs.allowedInputs,
|
|
87
|
+
blocked: inputs.blockedInputs,
|
|
88
|
+
});
|
|
89
|
+
finalText = filtered;
|
|
90
|
+
inputBlockedCallback(blocked);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (inputElement.value !== finalText) {
|
|
94
|
+
// this prevents blocked inputs by simply overwriting them
|
|
95
|
+
inputElement.value = finalText;
|
|
96
|
+
}
|
|
97
|
+
if (beforeChangeText !== finalText) {
|
|
98
|
+
newValueCallback(finalText);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -3,7 +3,7 @@ import { noUserSelect } from '../../styles';
|
|
|
3
3
|
import { viraDisabledStyles } from '../../styles/disabled';
|
|
4
4
|
import { viraAnimationDurations } from '../../styles/durations';
|
|
5
5
|
import { createFocusStyles, viraFocusCssVars } from '../../styles/focus';
|
|
6
|
-
import {
|
|
6
|
+
import { noNativeFormStyles } from '../../styles/native-styles';
|
|
7
7
|
import { viraCssVars } from '../../styles/vira-css-vars';
|
|
8
8
|
import { defineViraElement } from '../define-vira-element';
|
|
9
9
|
import { ViraIcon } from '../vira-icon/vira-icon.element';
|
|
@@ -65,7 +65,7 @@ export const ViraButton = defineViraElement()({
|
|
|
65
65
|
|
|
66
66
|
button {
|
|
67
67
|
cursor: pointer;
|
|
68
|
-
${
|
|
68
|
+
${noNativeFormStyles};
|
|
69
69
|
position: relative;
|
|
70
70
|
width: 100%;
|
|
71
71
|
height: 100%;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, defineElementEvent, html, listen, onResize } from 'element-vir';
|
|
2
|
-
import {
|
|
2
|
+
import { noNativeFormStyles, viraAnimationDurations } from '../../styles';
|
|
3
3
|
import { defineViraElement } from '../define-vira-element';
|
|
4
4
|
export var ViraCollapsibleSlotNameEnum;
|
|
5
5
|
(function (ViraCollapsibleSlotNameEnum) {
|
|
@@ -17,7 +17,7 @@ export const ViraCollapsibleWrapper = defineViraElement()({
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.header-wrapper {
|
|
20
|
-
${
|
|
20
|
+
${noNativeFormStyles};
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from 'element-vir';
|
|
2
|
-
import {
|
|
2
|
+
import { viraIconCssVars } from '../../icons/icon-css-vars';
|
|
3
3
|
import { defineViraElement } from '../define-vira-element';
|
|
4
4
|
export const ViraIcon = defineViraElement()({
|
|
5
5
|
tagName: 'vira-icon',
|
|
@@ -10,9 +10,9 @@ export const ViraIcon = defineViraElement()({
|
|
|
10
10
|
styles: ({ hostClasses }) => css `
|
|
11
11
|
:host {
|
|
12
12
|
display: inline-block;
|
|
13
|
-
color: ${
|
|
14
|
-
fill: ${
|
|
15
|
-
stroke: ${
|
|
13
|
+
color: ${viraIconCssVars['vira-icon-color'].value};
|
|
14
|
+
fill: ${viraIconCssVars['vira-icon-fill-color'].value};
|
|
15
|
+
stroke: ${viraIconCssVars['vira-icon-stroke-color'].value};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
svg {
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import { ViraIconSvg } from '../../icons';
|
|
2
|
+
import { SharedTextInputElementInputs } from '../common/shared-text-input-logic';
|
|
2
3
|
export declare const ViraInput: import("element-vir").DeclarativeElementDefinition<"vira-input", {
|
|
3
4
|
icon?: undefined | Pick<ViraIconSvg, 'svgTemplate'>;
|
|
4
|
-
value: string;
|
|
5
|
-
/** Shown when no other text is present. Input restrictions do not apply to this property. */
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
/** Set to true to trigger disabled styles and to block all user input. */
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Only letters in the given string or matches to the given RegExp will be allowed.
|
|
11
|
-
* blockedInputs takes precedence over this input.
|
|
12
|
-
*
|
|
13
|
-
* For example: if allowedInputs is set to "abcd" and blockedInputs is set to "d", only "a",
|
|
14
|
-
* "b", or "c" letters will be allowed.
|
|
15
|
-
*/
|
|
16
|
-
allowedInputs?: string | RegExp;
|
|
17
|
-
/** Any letters in the given string or matches to the given RegExp will be blocked. */
|
|
18
|
-
blockedInputs?: string | RegExp;
|
|
19
|
-
/** Disable all browser helps like spellchecking, autocomplete, etc. */
|
|
20
|
-
disableBrowserHelps?: boolean;
|
|
21
5
|
/** A suffix that, if provided, is shown following the user input field. */
|
|
22
6
|
suffix?: string;
|
|
23
|
-
|
|
24
|
-
fitText?: boolean;
|
|
25
|
-
}, {
|
|
7
|
+
} & SharedTextInputElementInputs, {
|
|
26
8
|
forcedInputWidth: number;
|
|
27
9
|
}, {
|
|
28
10
|
/**
|
|
@@ -36,4 +18,4 @@ export declare const ViraInput: import("element-vir").DeclarativeElementDefiniti
|
|
|
36
18
|
* that was blocked out of programmatic "value" property assignments.
|
|
37
19
|
*/
|
|
38
20
|
inputBlocked: import("element-vir").DefinedTypedEventNameDefinition<string>;
|
|
39
|
-
}, "vira-input-disabled" | "vira-input-
|
|
21
|
+
}, "vira-input-disabled" | "vira-input-fit-text", "vira-input-placeholder-color" | "vira-input-text-color" | "vira-input-border-color" | "vira-input-focus-border-color" | "vira-input-text-selection-color" | "vira-input-padding-horizontal" | "vira-input-padding-vertical", import("lit-html").HTMLTemplateResult>;
|
|
@@ -1,66 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { css, defineElementEvent, html, listen, onResize, renderIf } from 'element-vir';
|
|
2
2
|
import { noUserSelect, viraAnimationDurations, viraDisabledStyles } from '../../styles';
|
|
3
3
|
import { createFocusStyles, viraFocusCssVars } from '../../styles/focus';
|
|
4
|
-
import {
|
|
4
|
+
import { noNativeFormStyles } from '../../styles/native-styles';
|
|
5
5
|
import { viraCssVars } from '../../styles/vira-css-vars';
|
|
6
|
+
import { filterTextInputValue, textInputListener, } from '../common/shared-text-input-logic';
|
|
6
7
|
import { defineViraElement } from '../define-vira-element';
|
|
7
8
|
import { ViraIcon } from '../vira-icon/vira-icon.element';
|
|
8
|
-
function doesMatch({ input, matcher }) {
|
|
9
|
-
if (!input || !matcher) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
if (input.length > 1) {
|
|
13
|
-
return !!input.split('').every((singleInput) => doesMatch({ input: singleInput, matcher }));
|
|
14
|
-
}
|
|
15
|
-
if (matcher instanceof RegExp) {
|
|
16
|
-
return !!input.match(matcher);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return matcher.includes(input);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
function isAllowed({ value, allowed, blocked }) {
|
|
23
|
-
const isAllowedCharacter = allowed
|
|
24
|
-
? doesMatch({
|
|
25
|
-
input: value,
|
|
26
|
-
matcher: allowed,
|
|
27
|
-
})
|
|
28
|
-
: true;
|
|
29
|
-
const isBlockedCharacter = blocked
|
|
30
|
-
? doesMatch({
|
|
31
|
-
input: value,
|
|
32
|
-
matcher: blocked,
|
|
33
|
-
})
|
|
34
|
-
: false;
|
|
35
|
-
return isAllowedCharacter && !isBlockedCharacter;
|
|
36
|
-
}
|
|
37
|
-
function filterToAllowedCharactersOnly(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
9
|
export const ViraInput = defineViraElement()({
|
|
60
10
|
tagName: 'vira-input',
|
|
61
11
|
hostClasses: {
|
|
62
12
|
'vira-input-disabled': ({ inputs }) => !!inputs.disabled,
|
|
63
|
-
'vira-input-has-value': ({ inputs }) => !!inputs.value,
|
|
64
13
|
'vira-input-fit-text': ({ inputs }) => !!inputs.fitText,
|
|
65
14
|
},
|
|
66
15
|
cssVars: {
|
|
@@ -117,7 +66,7 @@ export const ViraInput = defineViraElement()({
|
|
|
117
66
|
text-align: center;
|
|
118
67
|
}
|
|
119
68
|
${hostClasses['vira-input-fit-text'].selector} .size-span {
|
|
120
|
-
${
|
|
69
|
+
${noNativeFormStyles};
|
|
121
70
|
font-family: inherit;
|
|
122
71
|
display: inline-block;
|
|
123
72
|
font-size: inherit;
|
|
@@ -135,7 +84,7 @@ export const ViraInput = defineViraElement()({
|
|
|
135
84
|
}
|
|
136
85
|
|
|
137
86
|
pre {
|
|
138
|
-
${
|
|
87
|
+
${noNativeFormStyles};
|
|
139
88
|
font: inherit;
|
|
140
89
|
/*
|
|
141
90
|
Leave at least a few pixels for the cursor bar when there is no text at all.
|
|
@@ -166,10 +115,10 @@ export const ViraInput = defineViraElement()({
|
|
|
166
115
|
}
|
|
167
116
|
|
|
168
117
|
label {
|
|
169
|
-
${
|
|
118
|
+
${noNativeFormStyles};
|
|
170
119
|
max-width: 100%;
|
|
171
120
|
flex-grow: 1;
|
|
172
|
-
cursor:
|
|
121
|
+
cursor: text;
|
|
173
122
|
display: inline-flex;
|
|
174
123
|
box-sizing: border-box;
|
|
175
124
|
align-items: center;
|
|
@@ -195,7 +144,7 @@ export const ViraInput = defineViraElement()({
|
|
|
195
144
|
}
|
|
196
145
|
|
|
197
146
|
input {
|
|
198
|
-
${
|
|
147
|
+
${noNativeFormStyles};
|
|
199
148
|
cursor: text;
|
|
200
149
|
margin: ${cssVars['vira-input-padding-vertical'].value} 0;
|
|
201
150
|
flex-grow: 1;
|
|
@@ -231,6 +180,7 @@ export const ViraInput = defineViraElement()({
|
|
|
231
180
|
|
|
232
181
|
.suffix {
|
|
233
182
|
font-weight: bold;
|
|
183
|
+
${noUserSelect};
|
|
234
184
|
}
|
|
235
185
|
`;
|
|
236
186
|
},
|
|
@@ -238,7 +188,7 @@ export const ViraInput = defineViraElement()({
|
|
|
238
188
|
forcedInputWidth: 0,
|
|
239
189
|
},
|
|
240
190
|
renderCallback: ({ inputs, dispatch, state, updateState, events }) => {
|
|
241
|
-
const { filtered: filteredValue } =
|
|
191
|
+
const { filtered: filteredValue } = filterTextInputValue({
|
|
242
192
|
value: inputs.value ?? '',
|
|
243
193
|
allowed: inputs.allowedInputs,
|
|
244
194
|
blocked: inputs.blockedInputs,
|
|
@@ -267,9 +217,6 @@ export const ViraInput = defineViraElement()({
|
|
|
267
217
|
</span>
|
|
268
218
|
`)}
|
|
269
219
|
<input
|
|
270
|
-
class=${classMap({
|
|
271
|
-
'have-value': !!filteredValue,
|
|
272
|
-
})}
|
|
273
220
|
style=${forcedInputWidthStyles}
|
|
274
221
|
autocomplete=${inputs.disableBrowserHelps ? 'off' : ''}
|
|
275
222
|
autocorrect=${inputs.disableBrowserHelps ? 'off' : ''}
|
|
@@ -278,60 +225,17 @@ export const ViraInput = defineViraElement()({
|
|
|
278
225
|
?disabled=${inputs.disabled}
|
|
279
226
|
.value=${filteredValue}
|
|
280
227
|
${listen('input', (event) => {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* This is usually a single character, but can be a bunch of characters in
|
|
294
|
-
* some circumstances. For example, when a bunch of characters are pasted,
|
|
295
|
-
* this will be the entire pasted contents.
|
|
296
|
-
*/
|
|
297
|
-
const changedText = event.data;
|
|
298
|
-
const beforeChangeText = filteredValue;
|
|
299
|
-
// this will be overwritten below if blocked characters are encountered
|
|
300
|
-
let finalText = inputElement.value ?? '';
|
|
301
|
-
/**
|
|
302
|
-
* When changedText is falsy, that means an operation other than inserting
|
|
303
|
-
* characters happened. Such as: deleting, cutting the text, etc.
|
|
304
|
-
*/
|
|
305
|
-
if (changedText) {
|
|
306
|
-
if (changedText.length === 1) {
|
|
307
|
-
if (!isAllowed({
|
|
308
|
-
value: changedText,
|
|
309
|
-
allowed: inputs.allowedInputs,
|
|
310
|
-
blocked: inputs.blockedInputs,
|
|
311
|
-
})) {
|
|
312
|
-
// prevent the change from happening
|
|
313
|
-
finalText = beforeChangeText;
|
|
314
|
-
dispatch(new events.inputBlocked(changedText));
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
// filters out blocked pasted letters
|
|
318
|
-
else {
|
|
319
|
-
const { filtered, blocked } = filterToAllowedCharactersOnly({
|
|
320
|
-
value: changedText,
|
|
321
|
-
allowed: inputs.allowedInputs,
|
|
322
|
-
blocked: inputs.blockedInputs,
|
|
323
|
-
});
|
|
324
|
-
finalText = filtered;
|
|
325
|
-
dispatch(new events.inputBlocked(blocked));
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
if (inputElement.value !== finalText) {
|
|
329
|
-
// this prevents blocked inputs by simply overwriting them
|
|
330
|
-
inputElement.value = finalText;
|
|
331
|
-
}
|
|
332
|
-
if (beforeChangeText !== finalText) {
|
|
333
|
-
dispatch(new events.valueChange(finalText));
|
|
334
|
-
}
|
|
228
|
+
textInputListener({
|
|
229
|
+
inputs,
|
|
230
|
+
filteredValue,
|
|
231
|
+
event,
|
|
232
|
+
inputBlockedCallback(blockedInput) {
|
|
233
|
+
dispatch(new events.inputBlocked(blockedInput));
|
|
234
|
+
},
|
|
235
|
+
newValueCallback(newValue) {
|
|
236
|
+
dispatch(new events.valueChange(newValue));
|
|
237
|
+
},
|
|
238
|
+
});
|
|
335
239
|
})}
|
|
336
240
|
placeholder=${inputs.placeholder}
|
|
337
241
|
/>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const viraIconCssVars: {
|
|
2
2
|
'vira-icon-stroke-color': import("lit-css-vars").SingleCssVarDefinition;
|
|
3
3
|
'vira-icon-fill-color': import("lit-css-vars").SingleCssVarDefinition;
|
|
4
|
+
'vira-icon-stroke-width': import("lit-css-vars").SingleCssVarDefinition;
|
|
4
5
|
'vira-icon-color': import("lit-css-vars").SingleCssVarDefinition;
|
|
5
6
|
};
|
|
@@ -13,5 +13,9 @@ const specificIconCssVars = defineCssVars({
|
|
|
13
13
|
'vira-icon-stroke-color': genericIconColorCssVar['vira-icon-color'].value,
|
|
14
14
|
/** To be used for coloring an icon's fill. */
|
|
15
15
|
'vira-icon-fill-color': genericIconColorCssVar['vira-icon-color'].value,
|
|
16
|
+
'vira-icon-stroke-width': '1px',
|
|
16
17
|
});
|
|
17
|
-
export const
|
|
18
|
+
export const viraIconCssVars = {
|
|
19
|
+
...genericIconColorCssVar,
|
|
20
|
+
...specificIconCssVars,
|
|
21
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
2
3
|
import { defineIcon } from '../icon-svg';
|
|
3
4
|
export const Element16Icon = defineIcon({
|
|
4
5
|
name: 'Element16Icon',
|
|
@@ -11,7 +12,7 @@ export const Element16Icon = defineIcon({
|
|
|
11
12
|
viewBox="0 0 16 16"
|
|
12
13
|
>
|
|
13
14
|
<path
|
|
14
|
-
stroke-width
|
|
15
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
15
16
|
vector-effect="non-scaling-stroke"
|
|
16
17
|
d="M4 5 1 8l3 3m8-6 3 3-3 3m-5 0 2-6"
|
|
17
18
|
/>
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
2
3
|
import { defineIcon } from '../icon-svg';
|
|
3
4
|
export const Element24Icon = defineIcon({
|
|
4
5
|
name: 'Element24Icon',
|
|
5
6
|
svgTemplate: html `
|
|
6
7
|
<svg
|
|
7
8
|
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
viewBox="0 0 24 24"
|
|
9
9
|
fill="none"
|
|
10
|
-
width="24"
|
|
11
10
|
height="24"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
width="24"
|
|
12
13
|
>
|
|
13
|
-
<path
|
|
14
|
+
<path
|
|
15
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
16
|
+
d="m7 7-5 5 5 5M17 7l5 5-5 5m-6 0 2-10"
|
|
17
|
+
/>
|
|
14
18
|
</svg>
|
|
15
19
|
`,
|
|
16
20
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Loader24Icon: import("../icon-svg").ViraIconSvg;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
3
|
+
import { defineIcon } from '../icon-svg';
|
|
4
|
+
export const Loader24Icon = defineIcon({
|
|
5
|
+
name: 'Loader24Icon',
|
|
6
|
+
svgTemplate: html `
|
|
7
|
+
<svg
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
fill="none"
|
|
10
|
+
height="24"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
width="24"
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d="M12 8V2M16 12h6M12 16v6M8 12H2M9.17 9.17 4.93 4.93M14.83 9.17l4.24-4.24M14.83 14.83l4.24 4.24M9.17 14.83l-4.24 4.24"
|
|
16
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
`,
|
|
20
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LoaderAnimated24Icon: import("../icon-svg").ViraIconSvg;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { css, html } from 'element-vir';
|
|
2
|
+
import { viraAnimationDurations } from '../../styles/durations';
|
|
3
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
4
|
+
import { defineIcon } from '../icon-svg';
|
|
5
|
+
const animatedLoaderStyles = css `
|
|
6
|
+
@keyframes loader-animated-spin {
|
|
7
|
+
from {
|
|
8
|
+
transform: rotate(0deg);
|
|
9
|
+
}
|
|
10
|
+
to {
|
|
11
|
+
transform: rotate(360deg);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
svg.loader-animated-24-icon {
|
|
16
|
+
animation: ${viraAnimationDurations['vira-extended-animation-duration'].value} linear
|
|
17
|
+
loader-animated-spin infinite;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
export const LoaderAnimated24Icon = defineIcon({
|
|
21
|
+
name: 'LoaderAnimated24Icon',
|
|
22
|
+
svgTemplate: html `
|
|
23
|
+
<style>
|
|
24
|
+
${animatedLoaderStyles}
|
|
25
|
+
</style>
|
|
26
|
+
<svg
|
|
27
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
28
|
+
class="loader-animated-24-icon"
|
|
29
|
+
fill="none"
|
|
30
|
+
height="24"
|
|
31
|
+
viewBox="0 0 24 24"
|
|
32
|
+
width="24"
|
|
33
|
+
style=${animatedLoaderStyles}
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M12 8V2M16 12h6M12 16v6M8 12H2M9.17 9.17 4.93 4.93M14.83 9.17l4.24-4.24M14.83 14.83l4.24 4.24M9.17 14.83l-4.24 4.24"
|
|
37
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
38
|
+
/>
|
|
39
|
+
</svg>
|
|
40
|
+
`,
|
|
41
|
+
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { html } from 'element-vir';
|
|
2
|
-
import {
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
3
3
|
import { defineIcon } from '../icon-svg';
|
|
4
4
|
export const Options24Icon = defineIcon({
|
|
5
5
|
name: 'Options24Icon',
|
|
6
6
|
svgTemplate: html `
|
|
7
7
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
|
8
|
-
<g fill="none" stroke-width
|
|
8
|
+
<g fill="none" stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}>
|
|
9
9
|
<circle cx="9.5" cy="5.5" r="2.5" />
|
|
10
10
|
<circle cx="16.5" cy="12.5" r="2.5" />
|
|
11
11
|
<circle cx="8.5" cy="18.5" r="2.5" />
|
|
12
12
|
</g>
|
|
13
13
|
<path
|
|
14
14
|
stroke="none"
|
|
15
|
-
fill="${
|
|
15
|
+
fill="${viraIconCssVars['vira-icon-stroke-color'].value}"
|
|
16
16
|
d="M6 18a3 3 0 0 0 0 1H3v-1h3Zm5 1a3 3 0 0 0 0-1h10v1H11Zm3-7a3 3 0 0 0 0 1H3v-1h11Zm5 1a3 3 0 0 0 0-1h2v1h-2ZM7 5a3 3 0 0 0 0 1H3V5h4Zm5 1a3 3 0 0 0 0-1h9v1h-9Z"
|
|
17
17
|
/>
|
|
18
18
|
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'element-vir';
|
|
2
|
-
import {
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
3
3
|
import { defineIcon } from '../icon-svg';
|
|
4
4
|
export const StatusFailure24Icon = defineIcon({
|
|
5
5
|
name: 'StatusFailure24Icon',
|
|
@@ -16,12 +16,12 @@ export const StatusFailure24Icon = defineIcon({
|
|
|
16
16
|
cx="12"
|
|
17
17
|
cy="12"
|
|
18
18
|
r="9"
|
|
19
|
-
stroke=${
|
|
19
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
20
|
fill="none"
|
|
21
21
|
/>
|
|
22
22
|
<path
|
|
23
23
|
stroke="none"
|
|
24
|
-
fill=${
|
|
24
|
+
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
25
25
|
d="m11.33 12-3.7-4.17.74-.66L12 11.25l3.63-4.08.74.66-3.7 4.17 3.7 4.17-.74.66L12 12.75l-3.63 4.08-.74-.66 3.7-4.17Z"
|
|
26
26
|
/>
|
|
27
27
|
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'element-vir';
|
|
2
|
-
import {
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
3
3
|
import { defineIcon } from '../icon-svg';
|
|
4
4
|
export const StatusInProgress24Icon = defineIcon({
|
|
5
5
|
name: 'StatusInProgress24Icon',
|
|
@@ -9,28 +9,28 @@ export const StatusInProgress24Icon = defineIcon({
|
|
|
9
9
|
cx="12"
|
|
10
10
|
cy="12"
|
|
11
11
|
r="9"
|
|
12
|
-
stroke=${
|
|
12
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
13
13
|
fill="none"
|
|
14
14
|
/>
|
|
15
15
|
<circle
|
|
16
16
|
cx="7"
|
|
17
17
|
cy="12"
|
|
18
18
|
r="1"
|
|
19
|
-
fill=${
|
|
19
|
+
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
20
|
stroke="none"
|
|
21
21
|
/>
|
|
22
22
|
<circle
|
|
23
23
|
cx="12"
|
|
24
24
|
cy="12"
|
|
25
25
|
r="1"
|
|
26
|
-
fill=${
|
|
26
|
+
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
27
27
|
stroke="none"
|
|
28
28
|
/>
|
|
29
29
|
<circle
|
|
30
30
|
cx="17"
|
|
31
31
|
cy="12"
|
|
32
32
|
r="1"
|
|
33
|
-
fill=${
|
|
33
|
+
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
34
34
|
stroke="none"
|
|
35
35
|
/>
|
|
36
36
|
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'element-vir';
|
|
2
|
-
import {
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
3
3
|
import { defineIcon } from '../icon-svg';
|
|
4
4
|
export const StatusSuccess24Icon = defineIcon({
|
|
5
5
|
name: 'StatusSuccess24Icon',
|
|
@@ -9,12 +9,12 @@ export const StatusSuccess24Icon = defineIcon({
|
|
|
9
9
|
cx="12"
|
|
10
10
|
cy="12"
|
|
11
11
|
r="9"
|
|
12
|
-
stroke=${
|
|
12
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
13
13
|
fill="none"
|
|
14
14
|
/>
|
|
15
15
|
<path
|
|
16
16
|
d="m6.64 13.81.7-.7 2.63 2.62 6.65-7.6.74.66-7.35 8.4-3.37-3.38Z"
|
|
17
|
-
fill=${
|
|
17
|
+
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
18
|
stroke="none"
|
|
19
19
|
/>
|
|
20
20
|
</svg>
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/** This file is automatically updated by update-icon-exports.ts */
|
|
2
|
-
export * from './icon-
|
|
2
|
+
export * from './icon-css-vars';
|
|
3
3
|
export * from './icon-svg';
|
|
4
4
|
export * from './icon-svgs/element-16.icon';
|
|
5
5
|
export * from './icon-svgs/element-24.icon';
|
|
6
|
+
export * from './icon-svgs/loader-24.icon';
|
|
7
|
+
export * from './icon-svgs/loader-animated-24.icon';
|
|
6
8
|
export * from './icon-svgs/options-24.icon';
|
|
7
9
|
export * from './icon-svgs/status-failure-24.icon';
|
|
8
10
|
export * from './icon-svgs/status-in-progress-24.icon';
|
|
@@ -10,6 +12,8 @@ export * from './icon-svgs/status-success-24.icon';
|
|
|
10
12
|
export declare const allIconsByName: {
|
|
11
13
|
readonly Element16Icon: import("./icon-svg").ViraIconSvg;
|
|
12
14
|
readonly Element24Icon: import("./icon-svg").ViraIconSvg;
|
|
15
|
+
readonly Loader24Icon: import("./icon-svg").ViraIconSvg;
|
|
16
|
+
readonly LoaderAnimated24Icon: import("./icon-svg").ViraIconSvg;
|
|
13
17
|
readonly Options24Icon: import("./icon-svg").ViraIconSvg;
|
|
14
18
|
readonly StatusFailure24Icon: import("./icon-svg").ViraIconSvg;
|
|
15
19
|
readonly StatusInProgress24Icon: import("./icon-svg").ViraIconSvg;
|
package/dist/icons/index.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/** This file is automatically updated by update-icon-exports.ts */
|
|
2
2
|
import { Element16Icon } from './icon-svgs/element-16.icon';
|
|
3
3
|
import { Element24Icon } from './icon-svgs/element-24.icon';
|
|
4
|
+
import { Loader24Icon } from './icon-svgs/loader-24.icon';
|
|
5
|
+
import { LoaderAnimated24Icon } from './icon-svgs/loader-animated-24.icon';
|
|
4
6
|
import { Options24Icon } from './icon-svgs/options-24.icon';
|
|
5
7
|
import { StatusFailure24Icon } from './icon-svgs/status-failure-24.icon';
|
|
6
8
|
import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon';
|
|
7
9
|
import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon';
|
|
8
|
-
export * from './icon-
|
|
10
|
+
export * from './icon-css-vars';
|
|
9
11
|
export * from './icon-svg';
|
|
10
12
|
export * from './icon-svgs/element-16.icon';
|
|
11
13
|
export * from './icon-svgs/element-24.icon';
|
|
14
|
+
export * from './icon-svgs/loader-24.icon';
|
|
15
|
+
export * from './icon-svgs/loader-animated-24.icon';
|
|
12
16
|
export * from './icon-svgs/options-24.icon';
|
|
13
17
|
export * from './icon-svgs/status-failure-24.icon';
|
|
14
18
|
export * from './icon-svgs/status-in-progress-24.icon';
|
|
@@ -16,6 +20,8 @@ export * from './icon-svgs/status-success-24.icon';
|
|
|
16
20
|
export const allIconsByName = {
|
|
17
21
|
Element16Icon,
|
|
18
22
|
Element24Icon,
|
|
23
|
+
Loader24Icon,
|
|
24
|
+
LoaderAnimated24Icon,
|
|
19
25
|
Options24Icon,
|
|
20
26
|
StatusFailure24Icon,
|
|
21
27
|
StatusInProgress24Icon,
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const viraAnimationDurations: import("lit-css-vars").CssVarDefinitions<{
|
|
2
|
+
/** A longer duration show a full animation. */
|
|
3
|
+
'vira-extended-animation-duration': string;
|
|
2
4
|
/** A longer duration to emphasize the animation. */
|
|
3
5
|
'vira-pretty-animation-duration': string;
|
|
4
6
|
/**
|
package/dist/styles/durations.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineCssVars } from 'lit-css-vars';
|
|
2
2
|
export const viraAnimationDurations = defineCssVars({
|
|
3
|
+
/** A longer duration show a full animation. */
|
|
4
|
+
'vira-extended-animation-duration': '1s',
|
|
3
5
|
/** A longer duration to emphasize the animation. */
|
|
4
6
|
'vira-pretty-animation-duration': '300ms',
|
|
5
7
|
/**
|
package/dist/styles/focus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { addPx } from '@augment-vir/common';
|
|
1
2
|
import { css } from 'element-vir';
|
|
2
3
|
import { unsafeCSS } from 'lit';
|
|
3
4
|
import { defineCssVars } from 'lit-css-vars';
|
|
4
|
-
import { toPixel } from '../util/number';
|
|
5
5
|
import { viraCssVars } from './vira-css-vars';
|
|
6
6
|
export const viraFocusCssVars = defineCssVars({
|
|
7
7
|
'vira-focus-outline-color': 'blue',
|
|
@@ -14,7 +14,7 @@ export const viraFocusCssVars = defineCssVars({
|
|
|
14
14
|
* clicking from creating focus styles in Chrome.
|
|
15
15
|
*/
|
|
16
16
|
export function createFocusStyles({ mainSelector, elementBorderSize, outlineGap = 2, outlineWidth = 3, }) {
|
|
17
|
-
const outlineSpacing = unsafeCSS(
|
|
17
|
+
const outlineSpacing = unsafeCSS(addPx(outlineWidth + outlineGap + elementBorderSize));
|
|
18
18
|
return css `
|
|
19
19
|
${unsafeCSS(mainSelector)}::after {
|
|
20
20
|
content: '';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const noNativeSpacing: import("element-vir").CSSResult;
|
|
2
|
+
export declare const noNativeFormStyles: import("element-vir").CSSResult;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { css } from 'element-vir';
|
|
2
|
-
export const
|
|
3
|
-
background: none;
|
|
2
|
+
export const noNativeSpacing = css `
|
|
4
3
|
padding: 0;
|
|
5
4
|
margin: 0;
|
|
5
|
+
`;
|
|
6
|
+
export const noNativeFormStyles = css `
|
|
7
|
+
${noNativeSpacing};
|
|
8
|
+
background: none;
|
|
6
9
|
border: none;
|
|
7
10
|
font: inherit;
|
|
8
11
|
color: inherit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vira",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A simple and highly versatile design system using element-vir.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -40,14 +40,15 @@
|
|
|
40
40
|
"test:docs": "virmator code-in-markdown check"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"
|
|
43
|
+
"@augment-vir/common": "^16.4.0",
|
|
44
|
+
"element-vir": "^16.3.1",
|
|
44
45
|
"lit-css-vars": "^3.0.0",
|
|
45
46
|
"spa-router-vir": "^2.1.1",
|
|
46
|
-
"type-fest": "^4.
|
|
47
|
+
"type-fest": "^4.2.0"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@augment-vir/browser-testing": "^16.
|
|
50
|
-
"@augment-vir/node-js": "^16.
|
|
50
|
+
"@augment-vir/browser-testing": "^16.4.0",
|
|
51
|
+
"@augment-vir/node-js": "^16.4.0",
|
|
51
52
|
"@open-wc/testing": "^3.2.0",
|
|
52
53
|
"@types/chai": "^4.3.5",
|
|
53
54
|
"@types/mocha": "^10.0.1",
|
|
@@ -56,11 +57,11 @@
|
|
|
56
57
|
"@web/test-runner-commands": "^0.8.0",
|
|
57
58
|
"@web/test-runner-playwright": "^0.10.1",
|
|
58
59
|
"@web/test-runner-visual-regression": "^0.8.2",
|
|
59
|
-
"esbuild": "^0.
|
|
60
|
+
"esbuild": "^0.19.2",
|
|
60
61
|
"istanbul-smart-text-reporter": "^1.1.2",
|
|
61
|
-
"npm-check-updates": "^16.
|
|
62
|
+
"npm-check-updates": "^16.11.1",
|
|
62
63
|
"typescript": "^5.1.6",
|
|
63
|
-
"vite": "^4.4.
|
|
64
|
+
"vite": "^4.4.9",
|
|
64
65
|
"vite-tsconfig-paths": "^4.2.0"
|
|
65
66
|
}
|
|
66
67
|
}
|
package/dist/util/index.d.ts
DELETED
package/dist/util/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { css } from 'element-vir';
|
|
2
|
-
export const noNativeSpacing = css `
|
|
3
|
-
padding: 0;
|
|
4
|
-
margin: 0;
|
|
5
|
-
`;
|
|
6
|
-
export const noNativeFormStyles = css `
|
|
7
|
-
${noNativeSpacing}
|
|
8
|
-
background: none;
|
|
9
|
-
border: none;
|
|
10
|
-
font: inherit;
|
|
11
|
-
color: inherit;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
text-transform: inherit;
|
|
14
|
-
text-decoration: inherit;
|
|
15
|
-
-webkit-tap-highlight-color: transparent;
|
|
16
|
-
`;
|
package/dist/util/number.d.ts
DELETED
package/dist/util/number.js
DELETED