vira 1.0.1 → 2.0.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 +2 -1
- package/dist/elements/vira-input/vira-input.element.js +35 -8
- 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 +30 -0
- package/dist/icons/icon-svgs/element-16.icon.js +3 -2
- package/dist/icons/icon-svgs/element-24.icon.js +2 -0
- package/dist/icons/icon-svgs/loader-24.icon.js +3 -0
- package/dist/icons/icon-svgs/loader-animated-24.icon.js +3 -16
- package/dist/icons/icon-svgs/options-24.icon.js +9 -4
- package/dist/icons/icon-svgs/status-failure-24.icon.js +7 -6
- package/dist/icons/icon-svgs/status-in-progress-24.icon.js +9 -5
- package/dist/icons/icon-svgs/status-success-24.icon.js +7 -5
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +3 -0
- package/dist/styles/durations.js +1 -1
- 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
|
}, {
|
|
@@ -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';
|
|
@@ -13,11 +14,11 @@ export const ViraInput = defineViraElement()({
|
|
|
13
14
|
'vira-input-fit-text': ({ inputs }) => !!inputs.fitText,
|
|
14
15
|
},
|
|
15
16
|
cssVars: {
|
|
16
|
-
'vira-input-placeholder-color': '#
|
|
17
|
-
'vira-input-text-color': '
|
|
18
|
-
'vira-input-border-color': '#
|
|
19
|
-
'vira-input-focus-border-color': '#
|
|
20
|
-
'vira-input-text-selection-color': '#
|
|
17
|
+
'vira-input-placeholder-color': '#cccccc',
|
|
18
|
+
'vira-input-text-color': '#000000',
|
|
19
|
+
'vira-input-border-color': '#cccccc',
|
|
20
|
+
'vira-input-focus-border-color': '#59b1ff',
|
|
21
|
+
'vira-input-text-selection-color': '#cfe9ff',
|
|
21
22
|
'vira-input-padding-horizontal': '10px',
|
|
22
23
|
'vira-input-padding-vertical': '6px',
|
|
23
24
|
},
|
|
@@ -118,7 +119,6 @@ export const ViraInput = defineViraElement()({
|
|
|
118
119
|
${noNativeFormStyles};
|
|
119
120
|
max-width: 100%;
|
|
120
121
|
flex-grow: 1;
|
|
121
|
-
cursor: text;
|
|
122
122
|
display: inline-flex;
|
|
123
123
|
box-sizing: border-box;
|
|
124
124
|
align-items: center;
|
|
@@ -132,6 +132,7 @@ export const ViraInput = defineViraElement()({
|
|
|
132
132
|
*/
|
|
133
133
|
border: 1px solid transparent;
|
|
134
134
|
gap: 4px;
|
|
135
|
+
cursor: text;
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
${createFocusStyles({
|
|
@@ -139,7 +140,7 @@ export const ViraInput = defineViraElement()({
|
|
|
139
140
|
elementBorderSize: 0,
|
|
140
141
|
})}
|
|
141
142
|
|
|
142
|
-
|
|
143
|
+
.left-side-icon {
|
|
143
144
|
margin-right: calc(${cssVars['vira-input-padding-horizontal'].value} - 4px);
|
|
144
145
|
}
|
|
145
146
|
|
|
@@ -182,6 +183,18 @@ export const ViraInput = defineViraElement()({
|
|
|
182
183
|
font-weight: bold;
|
|
183
184
|
${noUserSelect};
|
|
184
185
|
}
|
|
186
|
+
|
|
187
|
+
.close-x-button {
|
|
188
|
+
color: ${cssVars['vira-input-text-color'].value};
|
|
189
|
+
${noNativeFormStyles};
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
display: flex;
|
|
192
|
+
transition: ${viraAnimationDurations['vira-interaction-animation-duration'].value};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.close-x-button:hover {
|
|
196
|
+
color: red;
|
|
197
|
+
}
|
|
185
198
|
`;
|
|
186
199
|
},
|
|
187
200
|
stateInitStatic: {
|
|
@@ -195,7 +208,7 @@ export const ViraInput = defineViraElement()({
|
|
|
195
208
|
});
|
|
196
209
|
const iconTemplate = inputs.icon
|
|
197
210
|
? html `
|
|
198
|
-
<${ViraIcon.assign({ icon: inputs.icon })}></${ViraIcon}>
|
|
211
|
+
<${ViraIcon.assign({ icon: inputs.icon })} class="left-side-icon"></${ViraIcon}>
|
|
199
212
|
`
|
|
200
213
|
: '';
|
|
201
214
|
const forcedInputWidthStyles = inputs.fitText
|
|
@@ -239,6 +252,20 @@ export const ViraInput = defineViraElement()({
|
|
|
239
252
|
})}
|
|
240
253
|
placeholder=${inputs.placeholder}
|
|
241
254
|
/>
|
|
255
|
+
${renderIf(!!(inputs.showClearButton && inputs.value), html `
|
|
256
|
+
<button
|
|
257
|
+
class="close-x-button"
|
|
258
|
+
title="clear input"
|
|
259
|
+
${listen('click', (event) => {
|
|
260
|
+
/** Prevent focus of the input. */
|
|
261
|
+
event.stopImmediatePropagation();
|
|
262
|
+
event.preventDefault();
|
|
263
|
+
dispatch(new events.valueChange(''));
|
|
264
|
+
})}
|
|
265
|
+
>
|
|
266
|
+
<${ViraIcon.assign({ icon: CloseX24Icon })}></${ViraIcon}>
|
|
267
|
+
</button>
|
|
268
|
+
`)}
|
|
242
269
|
${renderIf(!!inputs.suffix, html `
|
|
243
270
|
<div class="suffix">${inputs.suffix}</div>
|
|
244
271
|
`)}
|
|
@@ -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,30 @@
|
|
|
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
|
|
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
|
+
>
|
|
14
|
+
<circle
|
|
15
|
+
cx="12"
|
|
16
|
+
cy="12"
|
|
17
|
+
r="8"
|
|
18
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
19
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
fill="none"
|
|
24
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
25
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
26
|
+
d="M9 8.5l6 7m0 -7l-6 7"
|
|
27
|
+
/>
|
|
28
|
+
</svg>
|
|
29
|
+
`,
|
|
30
|
+
});
|
|
@@ -12,9 +12,10 @@ export const Element16Icon = defineIcon({
|
|
|
12
12
|
viewBox="0 0 16 16"
|
|
13
13
|
>
|
|
14
14
|
<path
|
|
15
|
-
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
16
|
-
vector-effect="non-scaling-stroke"
|
|
17
15
|
d="M4 5 1 8l3 3m8-6 3 3-3 3m-5 0 2-6"
|
|
16
|
+
fill="none"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
18
19
|
/>
|
|
19
20
|
</svg>
|
|
20
21
|
`,
|
|
@@ -12,6 +12,8 @@ export const Element24Icon = defineIcon({
|
|
|
12
12
|
width="24"
|
|
13
13
|
>
|
|
14
14
|
<path
|
|
15
|
+
fill="none"
|
|
16
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
15
17
|
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
16
18
|
d="m7 7-5 5 5 5M17 7l5 5-5 5m-6 0 2-10"
|
|
17
19
|
/>
|
|
@@ -10,9 +10,12 @@ export const Loader24Icon = defineIcon({
|
|
|
10
10
|
height="24"
|
|
11
11
|
viewBox="0 0 24 24"
|
|
12
12
|
width="24"
|
|
13
|
+
class="loader-animated-24-icon"
|
|
13
14
|
>
|
|
14
15
|
<path
|
|
15
16
|
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"
|
|
17
|
+
fill="none"
|
|
18
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
16
19
|
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
17
20
|
/>
|
|
18
21
|
</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
|
});
|
|
@@ -5,15 +5,20 @@ 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
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke="${viraIconCssVars['vira-icon-stroke-color'].value}"
|
|
20
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
21
|
+
d="M3 5.5h3.5m5 0h8.5M3 12.5h11m5 0h2M3 18.5h3m5 0h10"
|
|
17
22
|
/>
|
|
18
23
|
</svg>
|
|
19
24
|
`,
|
|
@@ -7,7 +7,6 @@ export const StatusFailure24Icon = defineIcon({
|
|
|
7
7
|
<svg
|
|
8
8
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
9
|
xml:space="preserve"
|
|
10
|
-
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
|
|
11
10
|
width="24"
|
|
12
11
|
height="24"
|
|
13
12
|
viewBox="0 0 24 24"
|
|
@@ -15,14 +14,16 @@ export const StatusFailure24Icon = defineIcon({
|
|
|
15
14
|
<circle
|
|
16
15
|
cx="12"
|
|
17
16
|
cy="12"
|
|
18
|
-
r="
|
|
17
|
+
r="10"
|
|
18
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
19
19
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
|
-
|
|
20
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
21
21
|
/>
|
|
22
22
|
<path
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
fill="none"
|
|
24
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
25
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
26
|
+
d="M8 16.5 L16 7.5 M8 7.5 L16 16.5"
|
|
26
27
|
/>
|
|
27
28
|
</svg>
|
|
28
29
|
`,
|
|
@@ -8,30 +8,34 @@ export const StatusInProgress24Icon = defineIcon({
|
|
|
8
8
|
<circle
|
|
9
9
|
cx="12"
|
|
10
10
|
cy="12"
|
|
11
|
-
r="
|
|
11
|
+
r="10"
|
|
12
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
12
13
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
13
|
-
|
|
14
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
14
15
|
/>
|
|
15
16
|
<circle
|
|
16
17
|
cx="7"
|
|
17
18
|
cy="12"
|
|
18
19
|
r="1"
|
|
19
20
|
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
|
-
stroke
|
|
21
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
22
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
21
23
|
/>
|
|
22
24
|
<circle
|
|
23
25
|
cx="12"
|
|
24
26
|
cy="12"
|
|
25
27
|
r="1"
|
|
26
28
|
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
27
|
-
stroke
|
|
29
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
30
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
28
31
|
/>
|
|
29
32
|
<circle
|
|
30
33
|
cx="17"
|
|
31
34
|
cy="12"
|
|
32
35
|
r="1"
|
|
33
36
|
fill=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
34
|
-
stroke
|
|
37
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
38
|
+
stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
|
|
35
39
|
/>
|
|
36
40
|
</svg>
|
|
37
41
|
`,
|
|
@@ -8,14 +8,16 @@ export const StatusSuccess24Icon = defineIcon({
|
|
|
8
8
|
<circle
|
|
9
9
|
cx="12"
|
|
10
10
|
cy="12"
|
|
11
|
-
r="
|
|
11
|
+
r="10"
|
|
12
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
12
13
|
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
13
|
-
|
|
14
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
14
15
|
/>
|
|
15
16
|
<path
|
|
16
|
-
d="
|
|
17
|
-
fill
|
|
18
|
-
stroke
|
|
17
|
+
d="m17 8.5-7 8-3-3"
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
20
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
19
21
|
/>
|
|
20
22
|
</svg>
|
|
21
23
|
`,
|
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/dist/styles/durations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineCssVars } from 'lit-css-vars';
|
|
2
2
|
export const viraAnimationDurations = defineCssVars({
|
|
3
3
|
/** A longer duration show a full animation. */
|
|
4
|
-
'vira-extended-animation-duration': '
|
|
4
|
+
'vira-extended-animation-duration': '1.2s',
|
|
5
5
|
/** A longer duration to emphasize the animation. */
|
|
6
6
|
'vira-pretty-animation-duration': '300ms',
|
|
7
7
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vira",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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",
|