vira 25.8.0 → 25.9.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.
@@ -1,3 +1,4 @@
1
+ import { type PartialWithUndefined } from '@augment-vir/common';
1
2
  import { type MenuItem } from './pop-up-menu-item.js';
2
3
  /**
3
4
  * An element for an individual menu item.
@@ -6,10 +7,13 @@ import { type MenuItem } from './pop-up-menu-item.js';
6
7
  * @category Elements
7
8
  */
8
9
  export declare const ViraMenuItem: import("element-vir").DeclarativeElementDefinition<"vira-menu-item", Readonly<{
10
+ selected: boolean;
11
+ } & PartialWithUndefined<{
9
12
  /**
10
- * The text to show in the menu item. If this is not provided, it is expected that you will
11
- * instead utilize this element's `<slot>`.
13
+ * The text to show in the menu item. If this is not provided, it is expected that you
14
+ * will instead utilize this element's `<slot>`.
12
15
  */
13
- label?: MenuItem["label"] | undefined;
14
- selected: boolean;
15
- }>, {}, {}, "vira-menu-item-selected", "vira-menu-item-", readonly []>;
16
+ label: MenuItem["label"];
17
+ /** If `true`, does not render the selected check icon. */
18
+ hideCheckIcon: boolean;
19
+ }>>, {}, {}, "vira-menu-item-selected", "vira-menu-item-", readonly []>;
@@ -1,4 +1,4 @@
1
- import { css, html } from 'element-vir';
1
+ import { 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';
@@ -48,7 +48,9 @@ export const ViraMenuItem = defineViraElement()({
48
48
  render({ inputs }) {
49
49
  return html `
50
50
  <div class="item">
51
- <${ViraIcon.assign({ icon: Check24Icon })}></${ViraIcon}>
51
+ ${renderIf(!inputs.hideCheckIcon, html `
52
+ <${ViraIcon.assign({ icon: Check24Icon })}></${ViraIcon}>
53
+ `)}
52
54
  <slot>${inputs.label}</slot>
53
55
  </div>
54
56
  `;
@@ -26,6 +26,8 @@ export declare const ViraMenuTrigger: import("element-vir").DeclarativeElementDe
26
26
  isMultiSelect: boolean;
27
27
  z_debug_forceOpenState: boolean;
28
28
  popUpOffset: PopUpOffset;
29
+ /** Hide menu item check mark icons. */
30
+ hideCheckIcons: boolean;
29
31
  }>, {
30
32
  navController: undefined | NavController;
31
33
  popUpManager: undefined | PopUpManager;
@@ -95,6 +95,7 @@ export const ViraMenuTrigger = defineViraElement()({
95
95
  selected: inputs.selected,
96
96
  navController: state.navController,
97
97
  isMultiSelect: !!inputs.isMultiSelect,
98
+ hideCheckIcons: inputs.hideCheckIcons,
98
99
  })}
99
100
  ${testId(viraMenuTriggerTestIds.menu)}
100
101
  ></${ViraMenu}>
@@ -31,6 +31,8 @@ export declare const ViraMenu: import("element-vir").DeclarativeElementDefinitio
31
31
  /** The ids of the currently selected menu items. */
32
32
  selected: ReadonlyArray<PropertyKey>;
33
33
  isMultiSelect: boolean;
34
+ /** Hide menu item check mark icons. */
35
+ hideCheckIcons: boolean;
34
36
  }>>, {
35
37
  internalNavController: NavController;
36
38
  }, {}, "vira-menu-multiselect", "vira-menu-", readonly []>;
@@ -104,6 +104,7 @@ export const ViraMenu = defineViraElement()({
104
104
  <${ViraMenuItem.assign({
105
105
  label: item.label,
106
106
  selected,
107
+ hideCheckIcon: inputs.hideCheckIcons,
107
108
  })}></${ViraMenuItem}>
108
109
  `;
109
110
  const disabled = item.disabled || (!inputs.isMultiSelect && selected);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "25.8.0",
3
+ "version": "25.9.0",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",
@@ -67,7 +67,7 @@
67
67
  "vite-tsconfig-paths": "^5.1.4"
68
68
  },
69
69
  "peerDependencies": {
70
- "element-vir": "^25.8.0"
70
+ "element-vir": "^25.9.0"
71
71
  },
72
72
  "engines": {
73
73
  "node": ">=22"