vira 23.0.0 → 23.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/dropdown/dropdown-helpers.js +0 -1
- package/dist/elements/vira-input.element.js +2 -2
- package/dist/icons/icon-svgs/chat-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/chat-24.icon.js +23 -0
- package/dist/icons/icon-svgs/commit-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/commit-24.icon.js +37 -0
- package/dist/icons/icon-svgs/document-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/document-24.icon.js +29 -0
- package/dist/icons/icon-svgs/pencil-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/pencil-24.icon.js +29 -0
- package/dist/icons/icon-svgs/shield-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/shield-24.icon.js +23 -0
- package/dist/icons/icon-svgs/star-24.icon.d.ts +8 -0
- package/dist/icons/icon-svgs/star-24.icon.js +23 -0
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons/index.js +12 -0
- package/dist/re-exports/colorjs-io.js +0 -1
- package/dist/styles/color.js +2 -6
- package/package.json +18 -18
|
@@ -48,7 +48,6 @@ export function assertUniqueIdProps(options) {
|
|
|
48
48
|
export function createNewSelection(
|
|
49
49
|
/** The id of the option that should be newly selected. */
|
|
50
50
|
id, currentSelection, isMultiSelect) {
|
|
51
|
-
// eslint-disable-next-line sonarjs/no-selector-parameter
|
|
52
51
|
if (isMultiSelect) {
|
|
53
52
|
return currentSelection.includes(id)
|
|
54
53
|
? currentSelection.filter((entry) => entry !== id)
|
|
@@ -44,9 +44,9 @@ export const ViraInput = defineViraElement()({
|
|
|
44
44
|
'vira-input-action-button-color': '#aaaaaa',
|
|
45
45
|
'vira-input-clear-button-hover-color': '#ff0000',
|
|
46
46
|
'vira-input-clear-button-active-color': '#b30000',
|
|
47
|
-
// eslint-disable-next-line sonarjs/no-hardcoded-
|
|
47
|
+
// eslint-disable-next-line sonarjs/no-hardcoded-passwords
|
|
48
48
|
'vira-input-show-password-button-hover-color': '#0a89ff',
|
|
49
|
-
// eslint-disable-next-line sonarjs/no-hardcoded-
|
|
49
|
+
// eslint-disable-next-line sonarjs/no-hardcoded-passwords
|
|
50
50
|
'vira-input-show-password-button-active-color': '#0261ba',
|
|
51
51
|
'vira-input-padding-horizontal': '10px',
|
|
52
52
|
'vira-input-padding-vertical': '6px',
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* A chat bubble icon.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/chat24icon
|
|
10
|
+
*/
|
|
11
|
+
export const Chat24Icon = defineIcon({
|
|
12
|
+
name: 'Chat24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
15
|
+
<path
|
|
16
|
+
d="M5 15.4c-1.6-1.2-2.6-2.7-2.6-4.4 0-3.5 4.3-6.3 9.6-6.3s9.6 2.8 9.6 6.3-4.3 6.4-9.6 6.4L9 17l-5 3.8 1-5.5Z"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
19
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
`,
|
|
23
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* An icon that represents a single commit in git.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/commit24icon
|
|
10
|
+
*/
|
|
11
|
+
export const Commit24Icon = defineIcon({
|
|
12
|
+
name: 'Commit24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
xml:space="preserve"
|
|
17
|
+
width="24"
|
|
18
|
+
height="24"
|
|
19
|
+
style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:1.5"
|
|
20
|
+
>
|
|
21
|
+
<circle
|
|
22
|
+
cx="12"
|
|
23
|
+
cy="12"
|
|
24
|
+
r="4"
|
|
25
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
26
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
27
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
d="M12 2v6m0 8v6"
|
|
31
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
32
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
33
|
+
fill="none"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
`,
|
|
37
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An icon that represents a single document file on a computer file system.
|
|
3
|
+
*
|
|
4
|
+
* @category Icon
|
|
5
|
+
* @category SVG
|
|
6
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/document24icon
|
|
7
|
+
*/
|
|
8
|
+
export declare const Document24Icon: import("../icon-svg.js").ViraIconSvg;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* An icon that represents a single document file on a computer file system.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/document24icon
|
|
10
|
+
*/
|
|
11
|
+
export const Document24Icon = defineIcon({
|
|
12
|
+
name: 'Document24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="24" height="24">
|
|
15
|
+
<path
|
|
16
|
+
d="m19 9-6-6H5v18h14V9Z"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
19
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
d="M13 3v6h6"
|
|
23
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
24
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
25
|
+
fill="none"
|
|
26
|
+
/>
|
|
27
|
+
</svg>
|
|
28
|
+
`,
|
|
29
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* A pencil icon.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/pencil24icon
|
|
10
|
+
*/
|
|
11
|
+
export const Pencil24Icon = defineIcon({
|
|
12
|
+
name: 'Pencil24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
15
|
+
<path
|
|
16
|
+
d="M20.041 4.966c.303-.418.097-1.085-.459-1.489l-1.771-1.285c-.557-.404-1.255-.393-1.558.025L5.12 17.561l-.167 4.215 3.955-1.467S19.965 5.071 20.041 4.966"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
19
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
d="m5.384 17.197 3.788 2.749m5.97-16.198 3.788 2.749"
|
|
23
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
24
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
25
|
+
fill="none"
|
|
26
|
+
/>
|
|
27
|
+
</svg>
|
|
28
|
+
`,
|
|
29
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* A shield icon.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/shield24icon
|
|
10
|
+
*/
|
|
11
|
+
export const Shield24Icon = defineIcon({
|
|
12
|
+
name: 'Shield24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="24" height="24">
|
|
15
|
+
<path
|
|
16
|
+
d="M12 21s-8-3.5-8-10V6s4.8-.1 8-3c3.2 2.9 8 3 8 3v5c0 6.5-8 10-8 10Z"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
19
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
`,
|
|
23
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'element-vir';
|
|
2
|
+
import { viraIconCssVars } from '../icon-css-vars.js';
|
|
3
|
+
import { defineIcon } from '../icon-svg.js';
|
|
4
|
+
/**
|
|
5
|
+
* A star icon.
|
|
6
|
+
*
|
|
7
|
+
* @category Icon
|
|
8
|
+
* @category SVG
|
|
9
|
+
* @see https://electrovir.github.io/element-vir/vira/book/icons/star24icon
|
|
10
|
+
*/
|
|
11
|
+
export const Star24Icon = defineIcon({
|
|
12
|
+
name: 'Star24Icon',
|
|
13
|
+
svgTemplate: html `
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" stroke-miterlimit="2">
|
|
15
|
+
<path
|
|
16
|
+
d="m12 2 2.25 6.91h7.26l-5.88 4.27 2.25 6.91L12 15.82l-5.88 4.27 2.25-6.91-5.88-4.27h7.27L12 2Z"
|
|
17
|
+
stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
|
|
18
|
+
stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
|
|
19
|
+
fill=${viraIconCssVars['vira-icon-fill-color'].value}
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
`,
|
|
23
|
+
});
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export * from './icon-svgs/status-success-24.icon.js';
|
|
|
20
20
|
* @category Icon
|
|
21
21
|
*/
|
|
22
22
|
export declare const allIconsByName: {
|
|
23
|
+
readonly Chat24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
23
24
|
readonly Check24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
24
25
|
readonly ChevronUp24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
25
26
|
readonly CloseX24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
27
|
+
readonly Commit24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
28
|
+
readonly Document24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
26
29
|
readonly Element16Icon: import("./icon-svg.js").ViraIconSvg;
|
|
27
30
|
readonly Element24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
28
31
|
readonly EyeClosed24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
@@ -30,6 +33,9 @@ export declare const allIconsByName: {
|
|
|
30
33
|
readonly Loader24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
31
34
|
readonly LoaderAnimated24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
32
35
|
readonly Options24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
36
|
+
readonly Pencil24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
37
|
+
readonly Shield24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
38
|
+
readonly Star24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
33
39
|
readonly StatusFailure24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
34
40
|
readonly StatusInProgress24Icon: import("./icon-svg.js").ViraIconSvg;
|
|
35
41
|
readonly StatusSuccess24Icon: import("./icon-svg.js").ViraIconSvg;
|
package/dist/icons/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/** This file is automatically updated by update-icon-exports.ts */
|
|
2
|
+
import { Chat24Icon } from './icon-svgs/chat-24.icon.js';
|
|
2
3
|
import { Check24Icon } from './icon-svgs/check-24.icon.js';
|
|
3
4
|
import { ChevronUp24Icon } from './icon-svgs/chevron-up-24.icon.js';
|
|
4
5
|
import { CloseX24Icon } from './icon-svgs/close-x-24.icon.js';
|
|
6
|
+
import { Commit24Icon } from './icon-svgs/commit-24.icon.js';
|
|
7
|
+
import { Document24Icon } from './icon-svgs/document-24.icon.js';
|
|
5
8
|
import { Element16Icon } from './icon-svgs/element-16.icon.js';
|
|
6
9
|
import { Element24Icon } from './icon-svgs/element-24.icon.js';
|
|
7
10
|
import { EyeClosed24Icon } from './icon-svgs/eye-closed-24.icon.js';
|
|
@@ -9,6 +12,9 @@ import { EyeOpen24Icon } from './icon-svgs/eye-open-24.icon.js';
|
|
|
9
12
|
import { Loader24Icon } from './icon-svgs/loader-24.icon.js';
|
|
10
13
|
import { LoaderAnimated24Icon } from './icon-svgs/loader-animated-24.icon.js';
|
|
11
14
|
import { Options24Icon } from './icon-svgs/options-24.icon.js';
|
|
15
|
+
import { Pencil24Icon } from './icon-svgs/pencil-24.icon.js';
|
|
16
|
+
import { Shield24Icon } from './icon-svgs/shield-24.icon.js';
|
|
17
|
+
import { Star24Icon } from './icon-svgs/star-24.icon.js';
|
|
12
18
|
import { StatusFailure24Icon } from './icon-svgs/status-failure-24.icon.js';
|
|
13
19
|
import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon.js';
|
|
14
20
|
import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon.js';
|
|
@@ -33,9 +39,12 @@ export * from './icon-svgs/status-success-24.icon.js';
|
|
|
33
39
|
* @category Icon
|
|
34
40
|
*/
|
|
35
41
|
export const allIconsByName = {
|
|
42
|
+
Chat24Icon,
|
|
36
43
|
Check24Icon,
|
|
37
44
|
ChevronUp24Icon,
|
|
38
45
|
CloseX24Icon,
|
|
46
|
+
Commit24Icon,
|
|
47
|
+
Document24Icon,
|
|
39
48
|
Element16Icon,
|
|
40
49
|
Element24Icon,
|
|
41
50
|
EyeClosed24Icon,
|
|
@@ -43,6 +52,9 @@ export const allIconsByName = {
|
|
|
43
52
|
Loader24Icon,
|
|
44
53
|
LoaderAnimated24Icon,
|
|
45
54
|
Options24Icon,
|
|
55
|
+
Pencil24Icon,
|
|
56
|
+
Shield24Icon,
|
|
57
|
+
Star24Icon,
|
|
46
58
|
StatusFailure24Icon,
|
|
47
59
|
StatusInProgress24Icon,
|
|
48
60
|
StatusSuccess24Icon,
|
package/dist/styles/color.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { stringify } from '@augment-vir/common';
|
|
2
2
|
import { Color } from '../re-exports/colorjs-io.js';
|
|
3
3
|
/**
|
|
4
4
|
* Asserts that the given color type is valid.
|
|
@@ -13,11 +13,7 @@ export function getAssertedValidColor(input) {
|
|
|
13
13
|
return new Color(input);
|
|
14
14
|
}
|
|
15
15
|
catch {
|
|
16
|
-
|
|
17
|
-
const inputForMessage = stringInput.toLowerCase().match(/\[\s*object\s+object\s*\]/)
|
|
18
|
-
? wrapInTry(() => JSON.stringify(input), { fallbackValue: stringInput })
|
|
19
|
-
: stringInput;
|
|
20
|
-
throw new Error(`Invalid color: ${inputForMessage}`);
|
|
16
|
+
throw new Error(`Invalid color: ${stringify(input)}`);
|
|
21
17
|
}
|
|
22
18
|
}
|
|
23
19
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vira",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.1.0",
|
|
4
4
|
"description": "A simple and highly versatile design system using element-vir.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -37,36 +37,36 @@
|
|
|
37
37
|
"test:docs": "virmator docs check"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@augment-vir/assert": "^
|
|
41
|
-
"@augment-vir/common": "^
|
|
42
|
-
"@augment-vir/web": "^
|
|
40
|
+
"@augment-vir/assert": "^31.0.1",
|
|
41
|
+
"@augment-vir/common": "^31.0.1",
|
|
42
|
+
"@augment-vir/web": "^31.0.1",
|
|
43
43
|
"colorjs.io": "^0.5.2",
|
|
44
|
-
"date-vir": "^
|
|
45
|
-
"device-navigation": "^3.0.
|
|
46
|
-
"lit-css-vars": "^3.0.
|
|
47
|
-
"observavir": "^2.0.
|
|
44
|
+
"date-vir": "^7.0.3",
|
|
45
|
+
"device-navigation": "^3.0.2",
|
|
46
|
+
"lit-css-vars": "^3.0.11",
|
|
47
|
+
"observavir": "^2.0.4",
|
|
48
48
|
"page-active": "^1.0.0",
|
|
49
49
|
"spa-router-vir": "^4.0.4",
|
|
50
|
-
"type-fest": "^4.
|
|
51
|
-
"typed-event-target": "^4.0.
|
|
50
|
+
"type-fest": "^4.30.0",
|
|
51
|
+
"typed-event-target": "^4.0.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@augment-vir/test": "^
|
|
55
|
-
"@web/dev-server-esbuild": "^1.0.
|
|
54
|
+
"@augment-vir/test": "^31.0.1",
|
|
55
|
+
"@web/dev-server-esbuild": "^1.0.3",
|
|
56
56
|
"@web/test-runner": "^0.19.0",
|
|
57
57
|
"@web/test-runner-commands": "^0.9.0",
|
|
58
58
|
"@web/test-runner-playwright": "^0.11.0",
|
|
59
59
|
"@web/test-runner-visual-regression": "^0.10.0",
|
|
60
60
|
"esbuild": "^0.24.0",
|
|
61
61
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
62
|
-
"markdown-code-example-inserter": "^3.0.
|
|
63
|
-
"typedoc": "^0.
|
|
64
|
-
"typescript": "5.
|
|
65
|
-
"vite": "^
|
|
66
|
-
"vite-tsconfig-paths": "^5.
|
|
62
|
+
"markdown-code-example-inserter": "^3.0.3",
|
|
63
|
+
"typedoc": "^0.27.4",
|
|
64
|
+
"typescript": "5.7.2",
|
|
65
|
+
"vite": "^6.0.3",
|
|
66
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"element-vir": "^23.
|
|
69
|
+
"element-vir": "^23.1.0"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": ">=22"
|