vira 25.10.0 → 25.11.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.
|
@@ -16,9 +16,3 @@ export type ViraTagName = `${typeof ViraTagNamePrefix}${string}`;
|
|
|
16
16
|
* @category Internal
|
|
17
17
|
*/
|
|
18
18
|
export declare const defineViraElement: <Inputs extends {}>(...errorParams: import("element-vir").DeclarativeElementInputErrorParams<Inputs>) => <const TagName extends `vira-${string}`, State extends {}, EventsInit extends {}, const HostClassKeys extends `${TagName}-${string}` = `${TagName}-`, const CssVarKeys extends `${TagName}-${string}` = `${TagName}-`, const SlotNames extends ReadonlyArray<string> = readonly []>(inputs: import("element-vir").DeclarativeElementInit<TagName, Inputs, State, EventsInit, HostClassKeys, CssVarKeys, SlotNames>) => import("element-vir").DeclarativeElementDefinition<TagName, Inputs, State, EventsInit, HostClassKeys, CssVarKeys, SlotNames>;
|
|
19
|
-
/**
|
|
20
|
-
* Define a vira element with custom requirements (like the `vira-` element tag prefix).
|
|
21
|
-
*
|
|
22
|
-
* @category Internal
|
|
23
|
-
*/
|
|
24
|
-
export declare const defineViraElementNoInputs: <const TagName extends `vira-${string}`, Inputs extends {}, State extends {}, EventsInit extends {}, const HostClassKeys extends `${TagName}-${string}` = `${TagName}-`, const CssVarKeys extends `${TagName}-${string}` = `${TagName}-`, const SlotNames extends ReadonlyArray<string> = readonly []>(inputs: import("element-vir").DeclarativeElementInit<TagName, Inputs, State, EventsInit, HostClassKeys, CssVarKeys, SlotNames>) => import("element-vir").DeclarativeElementDefinition<TagName, Inputs, State, EventsInit, HostClassKeys, CssVarKeys, SlotNames>;
|
|
@@ -5,7 +5,7 @@ import { wrapDefineElement } from 'element-vir';
|
|
|
5
5
|
* @category Internal
|
|
6
6
|
*/
|
|
7
7
|
export const ViraTagNamePrefix = `vira-`;
|
|
8
|
-
const { defineElement
|
|
8
|
+
const { defineElement } = wrapDefineElement({
|
|
9
9
|
assertInputs: (inputs) => {
|
|
10
10
|
if (!inputs.tagName.startsWith(ViraTagNamePrefix)) {
|
|
11
11
|
throw new Error(`Tag name should start with '${ViraTagNamePrefix}' but got '${inputs.tagName}'`);
|
|
@@ -18,9 +18,3 @@ const { defineElement, defineElementNoInputs } = wrapDefineElement({
|
|
|
18
18
|
* @category Internal
|
|
19
19
|
*/
|
|
20
20
|
export const defineViraElement = defineElement;
|
|
21
|
-
/**
|
|
22
|
-
* Define a vira element with custom requirements (like the `vira-` element tag prefix).
|
|
23
|
-
*
|
|
24
|
-
* @category Internal
|
|
25
|
-
*/
|
|
26
|
-
export const defineViraElementNoInputs = defineElementNoInputs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, renderIf } from 'element-vir';
|
|
1
|
+
import { classMap, css, html, renderIf } from 'element-vir';
|
|
2
2
|
import { Check24Icon } from '../../icons/icon-svgs/check-24.icon.js';
|
|
3
3
|
import { noUserSelect } from '../../styles/index.js';
|
|
4
4
|
import { defineViraElement } from '../define-vira-element.js';
|
|
@@ -44,10 +44,14 @@ export const ViraMenuItem = defineViraElement()({
|
|
|
44
44
|
margin-right: -2px;
|
|
45
45
|
margin-left: 2px;
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
.include-left-spacing {
|
|
49
|
+
padding-left: 12px;
|
|
50
|
+
}
|
|
47
51
|
`,
|
|
48
52
|
render({ inputs }) {
|
|
49
53
|
return html `
|
|
50
|
-
<div class="item">
|
|
54
|
+
<div class="item ${classMap({ 'include-left-spacing': !!inputs.hideCheckIcon })}">
|
|
51
55
|
${renderIf(!inputs.hideCheckIcon, html `
|
|
52
56
|
<${ViraIcon.assign({ icon: Check24Icon })}></${ViraIcon}>
|
|
53
57
|
`)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vira",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.11.0",
|
|
4
4
|
"description": "A simple and highly versatile design system using element-vir.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"test:docs": "virmator docs check"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@augment-vir/assert": "^31.21.
|
|
42
|
-
"@augment-vir/common": "^31.21.
|
|
43
|
-
"@augment-vir/web": "^31.21.
|
|
41
|
+
"@augment-vir/assert": "^31.21.1",
|
|
42
|
+
"@augment-vir/common": "^31.21.1",
|
|
43
|
+
"@augment-vir/web": "^31.21.1",
|
|
44
44
|
"colorjs.io": "^0.5.2",
|
|
45
45
|
"date-vir": "^7.3.1",
|
|
46
46
|
"device-navigation": "^4.5.5",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"typed-event-target": "^4.1.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@augment-vir/test": "^31.21.
|
|
55
|
+
"@augment-vir/test": "^31.21.1",
|
|
56
56
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
57
57
|
"@web/test-runner": "^0.20.2",
|
|
58
58
|
"@web/test-runner-commands": "^0.9.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"vite-tsconfig-paths": "^5.1.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"element-vir": "^25.
|
|
70
|
+
"element-vir": "^25.11.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=22"
|