vira 1.0.2 → 2.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/vira-button/vira-button.element.d.ts +1 -1
- package/dist/elements/vira-button/vira-button.element.js +5 -5
- package/dist/elements/vira-icon/vira-icon.element.js +0 -4
- package/dist/elements/vira-input/vira-input.element.d.ts +3 -2
- package/dist/elements/vira-input/vira-input.element.js +45 -6
- package/dist/icons/icon-css-vars.d.ts +7 -6
- package/dist/icons/icon-css-vars.js +3 -16
- package/dist/icons/icon-svgs/close-x-24.icon.d.ts +1 -0
- package/dist/icons/icon-svgs/close-x-24.icon.js +24 -0
- package/dist/icons/icon-svgs/element-16.icon.js +4 -9
- package/dist/icons/icon-svgs/element-24.icon.js +4 -8
- package/dist/icons/icon-svgs/loader-24.icon.js +4 -2
- package/dist/icons/icon-svgs/loader-animated-24.icon.js +3 -16
- package/dist/icons/icon-svgs/options-24.icon.js +9 -5
- package/dist/icons/icon-svgs/status-failure-24.icon.js +6 -12
- package/dist/icons/icon-svgs/status-in-progress-24.icon.js +6 -6
- package/dist/icons/icon-svgs/status-success-24.icon.js +3 -3
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +3 -0
- package/dist/styles/native-styles.js +1 -0
- package/package.json +4 -4
|
@@ -8,4 +8,4 @@ export declare const ViraButton: import("element-vir").DeclarativeElementDefinit
|
|
|
8
8
|
icon?: undefined | Pick<ViraIconSvg, 'svgTemplate'>;
|
|
9
9
|
disabled?: boolean | undefined;
|
|
10
10
|
buttonStyle?: ViraButtonStyleEnum | undefined;
|
|
11
|
-
}, {}, {}, "vira-button-outline-style" | "vira-button-disabled", "vira-button-primary-color" | "vira-button-primary-hover-color" | "vira-button-primary-active-color" | "vira-button-secondary-color" | "vira-button-
|
|
11
|
+
}, {}, {}, "vira-button-outline-style" | "vira-button-disabled", "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", import("lit-html").HTMLTemplateResult>;
|
|
@@ -20,14 +20,14 @@ export const ViraButton = defineViraElement()({
|
|
|
20
20
|
},
|
|
21
21
|
cssVars: {
|
|
22
22
|
/** On the default button style this is the background color. */
|
|
23
|
-
'vira-button-primary-color': '#
|
|
24
|
-
'vira-button-primary-hover-color': '#
|
|
25
|
-
'vira-button-primary-active-color': '#
|
|
23
|
+
'vira-button-primary-color': '#0a89ff',
|
|
24
|
+
'vira-button-primary-hover-color': '#59b1ff',
|
|
25
|
+
'vira-button-primary-active-color': '#007ff6',
|
|
26
26
|
/** On the default button style this is the text color. */
|
|
27
|
-
'vira-button-secondary-color': '
|
|
27
|
+
'vira-button-secondary-color': '#ffffff',
|
|
28
|
+
'vira-button-padding': '5px 10px',
|
|
28
29
|
'vira-button-internal-foreground-color': '',
|
|
29
30
|
'vira-button-internal-background-color': '',
|
|
30
|
-
'vira-button-padding': '5px 10px',
|
|
31
31
|
},
|
|
32
32
|
styles: ({ hostClasses, cssVars }) => css `
|
|
33
33
|
:host {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { css } from 'element-vir';
|
|
2
|
-
import { viraIconCssVars } from '../../icons/icon-css-vars';
|
|
3
2
|
import { defineViraElement } from '../define-vira-element';
|
|
4
3
|
export const ViraIcon = defineViraElement()({
|
|
5
4
|
tagName: 'vira-icon',
|
|
@@ -10,9 +9,6 @@ export const ViraIcon = defineViraElement()({
|
|
|
10
9
|
styles: ({ hostClasses }) => css `
|
|
11
10
|
:host {
|
|
12
11
|
display: inline-block;
|
|
13
|
-
color: ${viraIconCssVars['vira-icon-color'].value};
|
|
14
|
-
fill: ${viraIconCssVars['vira-icon-fill-color'].value};
|
|
15
|
-
stroke: ${viraIconCssVars['vira-icon-stroke-color'].value};
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
svg {
|
|
@@ -3,7 +3,8 @@ import { SharedTextInputElementInputs } from '../common/shared-text-input-logic'
|
|
|
3
3
|
export declare const ViraInput: import("element-vir").DeclarativeElementDefinition<"vira-input", {
|
|
4
4
|
icon?: undefined | Pick<ViraIconSvg, 'svgTemplate'>;
|
|
5
5
|
/** A suffix that, if provided, is shown following the user input field. */
|
|
6
|
-
suffix?: string;
|
|
6
|
+
suffix?: string | undefined;
|
|
7
|
+
showClearButton?: boolean | undefined;
|
|
7
8
|
} & SharedTextInputElementInputs, {
|
|
8
9
|
forcedInputWidth: number;
|
|
9
10
|
}, {
|
|
@@ -18,4 +19,4 @@ export declare const ViraInput: import("element-vir").DeclarativeElementDefiniti
|
|
|
18
19
|
* that was blocked out of programmatic "value" property assignments.
|
|
19
20
|
*/
|
|
20
21
|
inputBlocked: import("element-vir").DefinedTypedEventNameDefinition<string>;
|
|
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>;
|
|
22
|
+
}, "vira-input-disabled" | "vira-input-fit-text" | "vira-input-clear-button-shown", "vira-input-placeholder-color" | "vira-input-text-color" | "vira-input-border-color" | "vira-input-focus-border-color" | "vira-input-text-selection-color" | "vira-input-clear-button-color" | "vira-input-clear-button-hover-color" | "vira-input-clear-button-active-color" | "vira-input-padding-horizontal" | "vira-input-padding-vertical", import("lit-html").HTMLTemplateResult>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css, defineElementEvent, html, listen, onResize, renderIf } from 'element-vir';
|
|
2
|
+
import { CloseX24Icon } from '../../icons/icon-svgs/close-x-24.icon';
|
|
2
3
|
import { noUserSelect, viraAnimationDurations, viraDisabledStyles } from '../../styles';
|
|
3
4
|
import { createFocusStyles, viraFocusCssVars } from '../../styles/focus';
|
|
4
5
|
import { noNativeFormStyles } from '../../styles/native-styles';
|
|
@@ -11,13 +12,17 @@ export const ViraInput = defineViraElement()({
|
|
|
11
12
|
hostClasses: {
|
|
12
13
|
'vira-input-disabled': ({ inputs }) => !!inputs.disabled,
|
|
13
14
|
'vira-input-fit-text': ({ inputs }) => !!inputs.fitText,
|
|
15
|
+
'vira-input-clear-button-shown': ({ inputs }) => !!inputs.showClearButton,
|
|
14
16
|
},
|
|
15
17
|
cssVars: {
|
|
16
|
-
'vira-input-placeholder-color': '#
|
|
17
|
-
'vira-input-text-color': '
|
|
18
|
-
'vira-input-border-color': '#
|
|
18
|
+
'vira-input-placeholder-color': '#cccccc',
|
|
19
|
+
'vira-input-text-color': '#000000',
|
|
20
|
+
'vira-input-border-color': '#cccccc',
|
|
19
21
|
'vira-input-focus-border-color': '#59b1ff',
|
|
20
22
|
'vira-input-text-selection-color': '#cfe9ff',
|
|
23
|
+
'vira-input-clear-button-color': '#aaaaaa',
|
|
24
|
+
'vira-input-clear-button-hover-color': '#ff0000',
|
|
25
|
+
'vira-input-clear-button-active-color': '#b30000',
|
|
21
26
|
'vira-input-padding-horizontal': '10px',
|
|
22
27
|
'vira-input-padding-vertical': '6px',
|
|
23
28
|
},
|
|
@@ -83,6 +88,10 @@ export const ViraInput = defineViraElement()({
|
|
|
83
88
|
max-height: 100%;
|
|
84
89
|
}
|
|
85
90
|
|
|
91
|
+
${hostClasses['vira-input-clear-button-shown'].selector} label {
|
|
92
|
+
padding-right: 4px;
|
|
93
|
+
}
|
|
94
|
+
|
|
86
95
|
pre {
|
|
87
96
|
${noNativeFormStyles};
|
|
88
97
|
font: inherit;
|
|
@@ -118,7 +127,6 @@ export const ViraInput = defineViraElement()({
|
|
|
118
127
|
${noNativeFormStyles};
|
|
119
128
|
max-width: 100%;
|
|
120
129
|
flex-grow: 1;
|
|
121
|
-
cursor: text;
|
|
122
130
|
display: inline-flex;
|
|
123
131
|
box-sizing: border-box;
|
|
124
132
|
align-items: center;
|
|
@@ -132,6 +140,7 @@ export const ViraInput = defineViraElement()({
|
|
|
132
140
|
*/
|
|
133
141
|
border: 1px solid transparent;
|
|
134
142
|
gap: 4px;
|
|
143
|
+
cursor: text;
|
|
135
144
|
}
|
|
136
145
|
|
|
137
146
|
${createFocusStyles({
|
|
@@ -139,7 +148,7 @@ export const ViraInput = defineViraElement()({
|
|
|
139
148
|
elementBorderSize: 0,
|
|
140
149
|
})}
|
|
141
150
|
|
|
142
|
-
|
|
151
|
+
.left-side-icon {
|
|
143
152
|
margin-right: calc(${cssVars['vira-input-padding-horizontal'].value} - 4px);
|
|
144
153
|
}
|
|
145
154
|
|
|
@@ -182,6 +191,22 @@ export const ViraInput = defineViraElement()({
|
|
|
182
191
|
font-weight: bold;
|
|
183
192
|
${noUserSelect};
|
|
184
193
|
}
|
|
194
|
+
|
|
195
|
+
.close-x-button {
|
|
196
|
+
${noNativeFormStyles};
|
|
197
|
+
color: ${cssVars['vira-input-clear-button-color'].value};
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
display: flex;
|
|
200
|
+
transition: ${viraAnimationDurations['vira-interaction-animation-duration'].value};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.close-x-button:hover {
|
|
204
|
+
color: ${cssVars['vira-input-clear-button-hover-color'].value};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.close-x-button:active {
|
|
208
|
+
color: ${cssVars['vira-input-clear-button-active-color'].value};
|
|
209
|
+
}
|
|
185
210
|
`;
|
|
186
211
|
},
|
|
187
212
|
stateInitStatic: {
|
|
@@ -195,7 +220,7 @@ export const ViraInput = defineViraElement()({
|
|
|
195
220
|
});
|
|
196
221
|
const iconTemplate = inputs.icon
|
|
197
222
|
? html `
|
|
198
|
-
<${ViraIcon.assign({ icon: inputs.icon })}></${ViraIcon}>
|
|
223
|
+
<${ViraIcon.assign({ icon: inputs.icon })} class="left-side-icon"></${ViraIcon}>
|
|
199
224
|
`
|
|
200
225
|
: '';
|
|
201
226
|
const forcedInputWidthStyles = inputs.fitText
|
|
@@ -239,6 +264,20 @@ export const ViraInput = defineViraElement()({
|
|
|
239
264
|
})}
|
|
240
265
|
placeholder=${inputs.placeholder}
|
|
241
266
|
/>
|
|
267
|
+
${renderIf(!!(inputs.showClearButton && inputs.value), html `
|
|
268
|
+
<button
|
|
269
|
+
class="close-x-button"
|
|
270
|
+
title="clear input"
|
|
271
|
+
${listen('click', (event) => {
|
|
272
|
+
/** Prevent focus of the input. */
|
|
273
|
+
event.stopImmediatePropagation();
|
|
274
|
+
event.preventDefault();
|
|
275
|
+
dispatch(new events.valueChange(''));
|
|
276
|
+
})}
|
|
277
|
+
>
|
|
278
|
+
<${ViraIcon.assign({ icon: CloseX24Icon })}></${ViraIcon}>
|
|
279
|
+
</button>
|
|
280
|
+
`)}
|
|
242
281
|
${renderIf(!!inputs.suffix, html `
|
|
243
282
|
<div class="suffix">${inputs.suffix}</div>
|
|
244
283
|
`)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const viraIconCssVars: {
|
|
2
|
-
|
|
3
|
-
'vira-icon-
|
|
4
|
-
|
|
5
|
-
'vira-icon-color':
|
|
6
|
-
|
|
1
|
+
export declare const viraIconCssVars: import("lit-css-vars").CssVarDefinitions<{
|
|
2
|
+
/** To be used for coloring an icon's stroke. */
|
|
3
|
+
'vira-icon-stroke-color': string;
|
|
4
|
+
/** To be used for coloring an icon's fill. */
|
|
5
|
+
'vira-icon-fill-color': string;
|
|
6
|
+
'vira-icon-stroke-width': string;
|
|
7
|
+
}>;
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import { defineCssVars } from 'lit-css-vars';
|
|
2
|
-
const
|
|
3
|
-
/**
|
|
4
|
-
* Specifies the icon color as a whole. This will color both the icon stroke and icon fill
|
|
5
|
-
* colors unless those respective CSS vars are specifically overridden. This CSS var value
|
|
6
|
-
* defaults to "currentColor", so in most cases you don't even need to override this variable,
|
|
7
|
-
* you just need to change the icon's "color" property.
|
|
8
|
-
*/
|
|
9
|
-
'vira-icon-color': 'currentColor',
|
|
10
|
-
});
|
|
11
|
-
const specificIconCssVars = defineCssVars({
|
|
2
|
+
export const viraIconCssVars = defineCssVars({
|
|
12
3
|
/** To be used for coloring an icon's stroke. */
|
|
13
|
-
'vira-icon-stroke-color':
|
|
4
|
+
'vira-icon-stroke-color': 'currentColor',
|
|
14
5
|
/** To be used for coloring an icon's fill. */
|
|
15
|
-
'vira-icon-fill-color':
|
|
6
|
+
'vira-icon-fill-color': 'none',
|
|
16
7
|
'vira-icon-stroke-width': '1px',
|
|
17
8
|
});
|
|
18
|
-
export const viraIconCssVars = {
|
|
19
|
-
...genericIconColorCssVar,
|
|
20
|
-
...specificIconCssVars,
|
|
21
|
-
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CloseX24Icon: import("../icon-svg").ViraIconSvg;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars';
|
|
3
|
+
import { defineIcon } from '../icon-svg';
|
|
4
|
+
export const CloseX24Icon = defineIcon({
|
|
5
|
+
name: 'CloseX24Icon',
|
|
6
|
+
svgTemplate: html `
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
8
|
+
<circle
|
|
9
|
+
cx="12"
|
|
10
|
+
cy="12"
|
|
11
|
+
r="8"
|
|
12
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
13
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
14
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M9 8.5l6 7m0 -7l-6 7"
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
`,
|
|
24
|
+
});
|
|
@@ -4,17 +4,12 @@ import { defineIcon } from '../icon-svg';
|
|
|
4
4
|
export const Element16Icon = defineIcon({
|
|
5
5
|
name: 'Element16Icon',
|
|
6
6
|
svgTemplate: html `
|
|
7
|
-
<svg
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
fill="none"
|
|
10
|
-
width="16"
|
|
11
|
-
height="16"
|
|
12
|
-
viewBox="0 0 16 16"
|
|
13
|
-
>
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
14
8
|
<path
|
|
15
|
-
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
16
|
-
vector-effect="non-scaling-stroke"
|
|
17
9
|
d="M4 5 1 8l3 3m8-6 3 3-3 3m-5 0 2-6"
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
12
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
18
13
|
/>
|
|
19
14
|
</svg>
|
|
20
15
|
`,
|
|
@@ -4,16 +4,12 @@ import { defineIcon } from '../icon-svg';
|
|
|
4
4
|
export const Element24Icon = defineIcon({
|
|
5
5
|
name: 'Element24Icon',
|
|
6
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
|
-
>
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
14
8
|
<path
|
|
15
|
-
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
16
9
|
d="m7 7-5 5 5 5M17 7l5 5-5 5m-6 0 2-10"
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
12
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
17
13
|
/>
|
|
18
14
|
</svg>
|
|
19
15
|
`,
|
|
@@ -6,13 +6,15 @@ export const Loader24Icon = defineIcon({
|
|
|
6
6
|
svgTemplate: html `
|
|
7
7
|
<svg
|
|
8
8
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
|
|
9
|
+
width="24"
|
|
10
10
|
height="24"
|
|
11
11
|
viewBox="0 0 24 24"
|
|
12
|
-
|
|
12
|
+
class="loader-animated-24-icon"
|
|
13
13
|
>
|
|
14
14
|
<path
|
|
15
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
|
+
fill="none"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
16
18
|
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
17
19
|
/>
|
|
18
20
|
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, html } from 'element-vir';
|
|
2
2
|
import { viraAnimationDurations } from '../../styles/durations';
|
|
3
|
-
import { viraIconCssVars } from '../icon-css-vars';
|
|
4
3
|
import { defineIcon } from '../icon-svg';
|
|
4
|
+
import { Loader24Icon } from './loader-24.icon';
|
|
5
5
|
const animatedLoaderStyles = css `
|
|
6
6
|
@keyframes loader-animated-spin {
|
|
7
7
|
from {
|
|
@@ -12,7 +12,7 @@ const animatedLoaderStyles = css `
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
svg
|
|
15
|
+
svg {
|
|
16
16
|
animation: ${viraAnimationDurations['vira-extended-animation-duration'].value} linear
|
|
17
17
|
loader-animated-spin infinite;
|
|
18
18
|
}
|
|
@@ -23,19 +23,6 @@ export const LoaderAnimated24Icon = defineIcon({
|
|
|
23
23
|
<style>
|
|
24
24
|
${animatedLoaderStyles}
|
|
25
25
|
</style>
|
|
26
|
-
|
|
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>
|
|
26
|
+
${Loader24Icon.svgTemplate}
|
|
40
27
|
`,
|
|
41
28
|
});
|
|
@@ -4,17 +4,21 @@ import { defineIcon } from '../icon-svg';
|
|
|
4
4
|
export const Options24Icon = defineIcon({
|
|
5
5
|
name: 'Options24Icon',
|
|
6
6
|
svgTemplate: html `
|
|
7
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
<g
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
8
|
+
<g
|
|
9
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
10
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
11
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
12
|
+
>
|
|
9
13
|
<circle cx="9.5" cy="5.5" r="2.5" />
|
|
10
14
|
<circle cx="16.5" cy="12.5" r="2.5" />
|
|
11
15
|
<circle cx="8.5" cy="18.5" r="2.5" />
|
|
12
16
|
</g>
|
|
13
17
|
<path
|
|
14
|
-
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
15
|
-
stroke="${viraIconCssVars['vira-icon-stroke-color'].value}"
|
|
16
|
-
fill="none"
|
|
17
18
|
d="M3 5.5h3.5m5 0h8.5M3 12.5h11m5 0h2M3 18.5h3m5 0h10"
|
|
19
|
+
fill="none"
|
|
20
|
+
stroke="${viraIconCssVars['vira-icon-stroke-color'].value}"
|
|
21
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
18
22
|
/>
|
|
19
23
|
</svg>
|
|
20
24
|
`,
|
|
@@ -4,26 +4,20 @@ import { defineIcon } from '../icon-svg';
|
|
|
4
4
|
export const StatusFailure24Icon = defineIcon({
|
|
5
5
|
name: 'StatusFailure24Icon',
|
|
6
6
|
svgTemplate: html `
|
|
7
|
-
<svg
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
xml:space="preserve"
|
|
10
|
-
width="24"
|
|
11
|
-
height="24"
|
|
12
|
-
viewBox="0 0 24 24"
|
|
13
|
-
>
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
14
8
|
<circle
|
|
15
9
|
cx="12"
|
|
16
10
|
cy="12"
|
|
17
|
-
r="
|
|
18
|
-
|
|
11
|
+
r="10"
|
|
12
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
19
13
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
|
-
|
|
14
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
21
15
|
/>
|
|
22
16
|
<path
|
|
17
|
+
d="M8 16.5 L16 7.5 M8 7.5 L16 16.5"
|
|
18
|
+
fill="none"
|
|
23
19
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
24
20
|
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
25
|
-
fill="none"
|
|
26
|
-
d="M8 16.5 L16 7.5 M8 7.5 L16 16.5"
|
|
27
21
|
/>
|
|
28
22
|
</svg>
|
|
29
23
|
`,
|
|
@@ -8,34 +8,34 @@ export const StatusInProgress24Icon = defineIcon({
|
|
|
8
8
|
<circle
|
|
9
9
|
cx="12"
|
|
10
10
|
cy="12"
|
|
11
|
-
r="
|
|
12
|
-
|
|
11
|
+
r="10"
|
|
12
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
13
13
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
14
|
-
|
|
14
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
15
15
|
/>
|
|
16
16
|
<circle
|
|
17
17
|
cx="7"
|
|
18
18
|
cy="12"
|
|
19
19
|
r="1"
|
|
20
20
|
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
21
|
-
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
22
21
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
22
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
23
23
|
/>
|
|
24
24
|
<circle
|
|
25
25
|
cx="12"
|
|
26
26
|
cy="12"
|
|
27
27
|
r="1"
|
|
28
28
|
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
29
|
-
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
30
29
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
30
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
31
31
|
/>
|
|
32
32
|
<circle
|
|
33
33
|
cx="17"
|
|
34
34
|
cy="12"
|
|
35
35
|
r="1"
|
|
36
36
|
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
37
|
-
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
38
37
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
38
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
`,
|
|
@@ -8,10 +8,10 @@ export const StatusSuccess24Icon = defineIcon({
|
|
|
8
8
|
<circle
|
|
9
9
|
cx="12"
|
|
10
10
|
cy="12"
|
|
11
|
-
r="
|
|
12
|
-
|
|
11
|
+
r="10"
|
|
12
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
13
13
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
14
|
-
|
|
14
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
15
15
|
/>
|
|
16
16
|
<path
|
|
17
17
|
d="m17 8.5-7 8-3-3"
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** This file is automatically updated by update-icon-exports.ts */
|
|
2
2
|
export * from './icon-css-vars';
|
|
3
3
|
export * from './icon-svg';
|
|
4
|
+
export * from './icon-svgs/close-x-24.icon';
|
|
4
5
|
export * from './icon-svgs/element-16.icon';
|
|
5
6
|
export * from './icon-svgs/element-24.icon';
|
|
6
7
|
export * from './icon-svgs/loader-24.icon';
|
|
@@ -10,6 +11,7 @@ export * from './icon-svgs/status-failure-24.icon';
|
|
|
10
11
|
export * from './icon-svgs/status-in-progress-24.icon';
|
|
11
12
|
export * from './icon-svgs/status-success-24.icon';
|
|
12
13
|
export declare const allIconsByName: {
|
|
14
|
+
readonly CloseX24Icon: import("./icon-svg").ViraIconSvg;
|
|
13
15
|
readonly Element16Icon: import("./icon-svg").ViraIconSvg;
|
|
14
16
|
readonly Element24Icon: import("./icon-svg").ViraIconSvg;
|
|
15
17
|
readonly Loader24Icon: import("./icon-svg").ViraIconSvg;
|
package/dist/icons/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** This file is automatically updated by update-icon-exports.ts */
|
|
2
|
+
import { CloseX24Icon } from './icon-svgs/close-x-24.icon';
|
|
2
3
|
import { Element16Icon } from './icon-svgs/element-16.icon';
|
|
3
4
|
import { Element24Icon } from './icon-svgs/element-24.icon';
|
|
4
5
|
import { Loader24Icon } from './icon-svgs/loader-24.icon';
|
|
@@ -9,6 +10,7 @@ import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon';
|
|
|
9
10
|
import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon';
|
|
10
11
|
export * from './icon-css-vars';
|
|
11
12
|
export * from './icon-svg';
|
|
13
|
+
export * from './icon-svgs/close-x-24.icon';
|
|
12
14
|
export * from './icon-svgs/element-16.icon';
|
|
13
15
|
export * from './icon-svgs/element-24.icon';
|
|
14
16
|
export * from './icon-svgs/loader-24.icon';
|
|
@@ -18,6 +20,7 @@ export * from './icon-svgs/status-failure-24.icon';
|
|
|
18
20
|
export * from './icon-svgs/status-in-progress-24.icon';
|
|
19
21
|
export * from './icon-svgs/status-success-24.icon';
|
|
20
22
|
export const allIconsByName = {
|
|
23
|
+
CloseX24Icon,
|
|
21
24
|
Element16Icon,
|
|
22
25
|
Element24Icon,
|
|
23
26
|
Loader24Icon,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vira",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "A simple and highly versatile design system using element-vir.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"types": "dist/index.d.ts",
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "npm run compile && virmator frontend build",
|
|
32
|
-
"compile": "virmator compile",
|
|
32
|
+
"compile": "virmator compile && rm -rf ../../node_modules/element-book/node_modules/vira",
|
|
33
33
|
"prepublishOnly": "cd ../scripts && npm run publish:pre",
|
|
34
|
-
"preview": "virmator frontend preview",
|
|
34
|
+
"preview": "npm run compile && virmator frontend preview --outDir ./book-dist",
|
|
35
35
|
"postpublish": "cd ../scripts && npm run publish:post",
|
|
36
|
-
"start": "virmator frontend",
|
|
36
|
+
"start": "npm run compile && virmator frontend",
|
|
37
37
|
"test": "virmator test-web",
|
|
38
38
|
"test:all": "npm test",
|
|
39
39
|
"test:coverage": "npm run test",
|