vira 33.8.0 → 33.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.
@@ -29,6 +29,12 @@ export type ViraCheckboxInputs = {
29
29
  fillWhenChecked: boolean;
30
30
  /** The checkbox will be filled with a form error color when it is unchecked. */
31
31
  fillWhenUnchecked: boolean;
32
+ /**
33
+ * Renders the checkbox in its checked colors with a dash instead of a check mark, and sets
34
+ * `aria-checked` to `mixed`. Takes precedence over `value` for rendering only: clicking still
35
+ * dispatches the negation of `value`.
36
+ */
37
+ isIndeterminate: boolean;
32
38
  }>;
33
39
  /**
34
40
  * A custom checkbox.
@@ -170,6 +170,7 @@ export const ViraCheckbox = defineViraElement()({
170
170
  }
171
171
  }
172
172
  const hasLabel = !!inputs.label || state.hasSlottedLabel;
173
+ const isIndeterminate = !!inputs.isIndeterminate;
173
174
  const labelTemplate = html `
174
175
  <span
175
176
  class="label-text ${classMap({
@@ -203,13 +204,13 @@ export const ViraCheckbox = defineViraElement()({
203
204
  ${labelTemplate}
204
205
  <span
205
206
  class="custom-checkbox ${classMap({
206
- checked: inputs.value,
207
+ checked: inputs.value || isIndeterminate,
207
208
  disabled: !!inputs.isDisabled,
208
209
  error: !!inputs.hasError,
209
210
  })}"
210
211
  role="checkbox"
211
212
  aria-label=${ifDefined((check.isString(inputs.label) && inputs.label) || undefined)}
212
- aria-checked=${inputs.value ? 'true' : 'false'}
213
+ aria-checked=${isIndeterminate ? 'mixed' : inputs.value ? 'true' : 'false'}
213
214
  aria-disabled=${inputs.isDisabled ? 'true' : 'false'}
214
215
  tabindex=${inputs.isDisabled ? '-1' : '0'}
215
216
  ${attributes(inputs.attributePassthrough?.['custom-checkbox'])}
@@ -217,7 +218,9 @@ export const ViraCheckbox = defineViraElement()({
217
218
  ${listenToActivate(updateValue)}
218
219
  >
219
220
  <${ViraIcon.assign({
220
- icon: internalLucideIcons.Check16,
221
+ icon: isIndeterminate
222
+ ? internalLucideIcons.Minus16
223
+ : internalLucideIcons.Check16,
221
224
  fitContainer: true,
222
225
  })}
223
226
  ${attributes(inputs.attributePassthrough?.[ViraIcon.tagName])}
@@ -13,6 +13,7 @@ export declare const internalLucideIcons: {
13
13
  Eye16: import("./icon-svg.js").ViraIconSvg<"Eye">;
14
14
  EyeOff16: import("./icon-svg.js").ViraIconSvg<"EyeOff">;
15
15
  GripVertical16: import("./icon-svg.js").ViraIconSvg<"GripVertical">;
16
+ Minus16: import("./icon-svg.js").ViraIconSvg<"Minus">;
16
17
  Plus16: import("./icon-svg.js").ViraIconSvg<"Plus">;
17
18
  X16: import("./icon-svg.js").ViraIconSvg<"X">;
18
19
  X24: import("./icon-svg.js").ViraIconSvg<"X">;
@@ -7,6 +7,7 @@ import { LucideCopyIcon } from './lucide/copy.icon.js';
7
7
  import { LucideEyeOffIcon } from './lucide/eye-off.icon.js';
8
8
  import { LucideEyeIcon } from './lucide/eye.icon.js';
9
9
  import { LucideGripVerticalIcon } from './lucide/grip-vertical.icon.js';
10
+ import { LucideMinusIcon } from './lucide/minus.icon.js';
10
11
  import { LucidePlusIcon } from './lucide/plus.icon.js';
11
12
  import { LucideXIcon } from './lucide/x.icon.js';
12
13
  import { createSizedIcon } from './sized-icon.js';
@@ -25,6 +26,7 @@ export const internalLucideIcons = {
25
26
  Eye16: LucideEyeIcon,
26
27
  EyeOff16: LucideEyeOffIcon,
27
28
  GripVertical16: LucideGripVerticalIcon,
29
+ Minus16: LucideMinusIcon,
28
30
  Plus16: LucidePlusIcon,
29
31
  X16: LucideXIcon,
30
32
  X24: createSizedIcon(LucideXIcon, 24),
@@ -0,0 +1,8 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ /**
3
+ * Lucide's `Certificate` icon, rendered at 16px.
4
+ *
5
+ * @category Lucide Icon
6
+ * @see https://lucide.dev/icons/certificate
7
+ */
8
+ export declare const LucideCertificateIcon: import("../icon-svg.js").ViraIconSvg<"Certificate">;
@@ -0,0 +1,13 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ import { Certificate as svg } from 'lucide-static';
3
+ import { createLucideIcon } from '../lucide-icon.js';
4
+ /**
5
+ * Lucide's `Certificate` icon, rendered at 16px.
6
+ *
7
+ * @category Lucide Icon
8
+ * @see https://lucide.dev/icons/certificate
9
+ */
10
+ export const LucideCertificateIcon = createLucideIcon({
11
+ name: 'Certificate',
12
+ svg,
13
+ });
@@ -0,0 +1,8 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ /**
3
+ * Lucide's `EighthNote` icon, rendered at 16px.
4
+ *
5
+ * @category Lucide Icon
6
+ * @see https://lucide.dev/icons/eighth-note
7
+ */
8
+ export declare const LucideEighthNoteIcon: import("../icon-svg.js").ViraIconSvg<"EighthNote">;
@@ -0,0 +1,13 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ import { EighthNote as svg } from 'lucide-static';
3
+ import { createLucideIcon } from '../lucide-icon.js';
4
+ /**
5
+ * Lucide's `EighthNote` icon, rendered at 16px.
6
+ *
7
+ * @category Lucide Icon
8
+ * @see https://lucide.dev/icons/eighth-note
9
+ */
10
+ export const LucideEighthNoteIcon = createLucideIcon({
11
+ name: 'EighthNote',
12
+ svg,
13
+ });
@@ -0,0 +1,8 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ /**
3
+ * Lucide's `EighthNotes` icon, rendered at 16px.
4
+ *
5
+ * @category Lucide Icon
6
+ * @see https://lucide.dev/icons/eighth-notes
7
+ */
8
+ export declare const LucideEighthNotesIcon: import("../icon-svg.js").ViraIconSvg<"EighthNotes">;
@@ -0,0 +1,13 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ import { EighthNotes as svg } from 'lucide-static';
3
+ import { createLucideIcon } from '../lucide-icon.js';
4
+ /**
5
+ * Lucide's `EighthNotes` icon, rendered at 16px.
6
+ *
7
+ * @category Lucide Icon
8
+ * @see https://lucide.dev/icons/eighth-notes
9
+ */
10
+ export const LucideEighthNotesIcon = createLucideIcon({
11
+ name: 'EighthNotes',
12
+ svg,
13
+ });
@@ -0,0 +1,8 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ /**
3
+ * Lucide's `HalfNote` icon, rendered at 16px.
4
+ *
5
+ * @category Lucide Icon
6
+ * @see https://lucide.dev/icons/half-note
7
+ */
8
+ export declare const LucideHalfNoteIcon: import("../icon-svg.js").ViraIconSvg<"HalfNote">;
@@ -0,0 +1,13 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ import { HalfNote as svg } from 'lucide-static';
3
+ import { createLucideIcon } from '../lucide-icon.js';
4
+ /**
5
+ * Lucide's `HalfNote` icon, rendered at 16px.
6
+ *
7
+ * @category Lucide Icon
8
+ * @see https://lucide.dev/icons/half-note
9
+ */
10
+ export const LucideHalfNoteIcon = createLucideIcon({
11
+ name: 'HalfNote',
12
+ svg,
13
+ });
@@ -318,6 +318,7 @@ export * from './castle.icon.js';
318
318
  export * from './cat.icon.js';
319
319
  export * from './cctv-off.icon.js';
320
320
  export * from './cctv.icon.js';
321
+ export * from './certificate.icon.js';
321
322
  export * from './chart-area.icon.js';
322
323
  export * from './chart-bar-big.icon.js';
323
324
  export * from './chart-bar-decreasing.icon.js';
@@ -606,6 +607,8 @@ export * from './eclipse.icon.js';
606
607
  export * from './egg-fried.icon.js';
607
608
  export * from './egg-off.icon.js';
608
609
  export * from './egg.icon.js';
610
+ export * from './eighth-note.icon.js';
611
+ export * from './eighth-notes.icon.js';
609
612
  export * from './eject.icon.js';
610
613
  export * from './ellipse.icon.js';
611
614
  export * from './ellipsis-vertical.icon.js';
@@ -825,6 +828,7 @@ export * from './groceries.icon.js';
825
828
  export * from './group.icon.js';
826
829
  export * from './guitar-electric.icon.js';
827
830
  export * from './guitar.icon.js';
831
+ export * from './half-note.icon.js';
828
832
  export * from './ham.icon.js';
829
833
  export * from './hamburger.icon.js';
830
834
  export * from './hammer.icon.js';
@@ -1156,10 +1160,6 @@ export * from './move-up-right.icon.js';
1156
1160
  export * from './move-up.icon.js';
1157
1161
  export * from './move-vertical.icon.js';
1158
1162
  export * from './move.icon.js';
1159
- export * from './music-2.icon.js';
1160
- export * from './music-3.icon.js';
1161
- export * from './music-4.icon.js';
1162
- export * from './music.icon.js';
1163
1163
  export * from './navigation-2-off.icon.js';
1164
1164
  export * from './navigation-2.icon.js';
1165
1165
  export * from './navigation-off.icon.js';
@@ -1483,6 +1483,7 @@ export * from './signature.icon.js';
1483
1483
  export * from './signpost-big.icon.js';
1484
1484
  export * from './signpost.icon.js';
1485
1485
  export * from './siren.icon.js';
1486
+ export * from './sixteenth-notes.icon.js';
1486
1487
  export * from './skip-back.icon.js';
1487
1488
  export * from './skip-forward.icon.js';
1488
1489
  export * from './skull.icon.js';
@@ -318,6 +318,7 @@ export * from './castle.icon.js';
318
318
  export * from './cat.icon.js';
319
319
  export * from './cctv-off.icon.js';
320
320
  export * from './cctv.icon.js';
321
+ export * from './certificate.icon.js';
321
322
  export * from './chart-area.icon.js';
322
323
  export * from './chart-bar-big.icon.js';
323
324
  export * from './chart-bar-decreasing.icon.js';
@@ -606,6 +607,8 @@ export * from './eclipse.icon.js';
606
607
  export * from './egg-fried.icon.js';
607
608
  export * from './egg-off.icon.js';
608
609
  export * from './egg.icon.js';
610
+ export * from './eighth-note.icon.js';
611
+ export * from './eighth-notes.icon.js';
609
612
  export * from './eject.icon.js';
610
613
  export * from './ellipse.icon.js';
611
614
  export * from './ellipsis-vertical.icon.js';
@@ -825,6 +828,7 @@ export * from './groceries.icon.js';
825
828
  export * from './group.icon.js';
826
829
  export * from './guitar-electric.icon.js';
827
830
  export * from './guitar.icon.js';
831
+ export * from './half-note.icon.js';
828
832
  export * from './ham.icon.js';
829
833
  export * from './hamburger.icon.js';
830
834
  export * from './hammer.icon.js';
@@ -1156,10 +1160,6 @@ export * from './move-up-right.icon.js';
1156
1160
  export * from './move-up.icon.js';
1157
1161
  export * from './move-vertical.icon.js';
1158
1162
  export * from './move.icon.js';
1159
- export * from './music-2.icon.js';
1160
- export * from './music-3.icon.js';
1161
- export * from './music-4.icon.js';
1162
- export * from './music.icon.js';
1163
1163
  export * from './navigation-2-off.icon.js';
1164
1164
  export * from './navigation-2.icon.js';
1165
1165
  export * from './navigation-off.icon.js';
@@ -1483,6 +1483,7 @@ export * from './signature.icon.js';
1483
1483
  export * from './signpost-big.icon.js';
1484
1484
  export * from './signpost.icon.js';
1485
1485
  export * from './siren.icon.js';
1486
+ export * from './sixteenth-notes.icon.js';
1486
1487
  export * from './skip-back.icon.js';
1487
1488
  export * from './skip-forward.icon.js';
1488
1489
  export * from './skull.icon.js';
@@ -0,0 +1,8 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ /**
3
+ * Lucide's `SixteenthNotes` icon, rendered at 16px.
4
+ *
5
+ * @category Lucide Icon
6
+ * @see https://lucide.dev/icons/sixteenth-notes
7
+ */
8
+ export declare const LucideSixteenthNotesIcon: import("../icon-svg.js").ViraIconSvg<"SixteenthNotes">;
@@ -0,0 +1,13 @@
1
+ /** This file is automatically updated by generate-lucide-icons.ts */
2
+ import { SixteenthNotes as svg } from 'lucide-static';
3
+ import { createLucideIcon } from '../lucide-icon.js';
4
+ /**
5
+ * Lucide's `SixteenthNotes` icon, rendered at 16px.
6
+ *
7
+ * @category Lucide Icon
8
+ * @see https://lucide.dev/icons/sixteenth-notes
9
+ */
10
+ export const LucideSixteenthNotesIcon = createLucideIcon({
11
+ name: 'SixteenthNotes',
12
+ svg,
13
+ });
@@ -46,7 +46,13 @@ export function isTextInputActive() {
46
46
  */
47
47
  export function isMouseEventOnScrollbar(event) {
48
48
  const target = event.composedPath()[0];
49
- if (!(target instanceof Element)) {
49
+ if (!(target instanceof Element) ||
50
+ /**
51
+ * Inline boxes cannot have scrollbars. Firefox still reports a nonzero scroll size for them
52
+ * while their client size is always 0, so without this every click on inline content (such
53
+ * as a `<b>` in a dropdown label) looks like a scrollbar click.
54
+ */
55
+ globalThis.getComputedStyle(target).display === 'inline') {
50
56
  return false;
51
57
  }
52
58
  const rect = target.getBoundingClientRect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "33.8.0",
3
+ "version": "33.9.0",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",
@@ -48,7 +48,7 @@
48
48
  "json-schema-to-ts": "^3.1.1",
49
49
  "lit": "^3.3.3",
50
50
  "lit-css-vars": "^3.6.3",
51
- "lucide-static": "1.57.0",
51
+ "lucide-static": "1.59.0",
52
52
  "object-shape-tester": "^6.15.1",
53
53
  "observavir": "^2.4.2",
54
54
  "page-active": "^1.0.4",
@@ -1,8 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- /**
3
- * Lucide's `Music2` icon, rendered at 16px.
4
- *
5
- * @category Lucide Icon
6
- * @see https://lucide.dev/icons/music-2
7
- */
8
- export declare const LucideMusic2Icon: import("../icon-svg.js").ViraIconSvg<"Music2">;
@@ -1,13 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- import { Music2 as svg } from 'lucide-static';
3
- import { createLucideIcon } from '../lucide-icon.js';
4
- /**
5
- * Lucide's `Music2` icon, rendered at 16px.
6
- *
7
- * @category Lucide Icon
8
- * @see https://lucide.dev/icons/music-2
9
- */
10
- export const LucideMusic2Icon = createLucideIcon({
11
- name: 'Music2',
12
- svg,
13
- });
@@ -1,8 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- /**
3
- * Lucide's `Music3` icon, rendered at 16px.
4
- *
5
- * @category Lucide Icon
6
- * @see https://lucide.dev/icons/music-3
7
- */
8
- export declare const LucideMusic3Icon: import("../icon-svg.js").ViraIconSvg<"Music3">;
@@ -1,13 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- import { Music3 as svg } from 'lucide-static';
3
- import { createLucideIcon } from '../lucide-icon.js';
4
- /**
5
- * Lucide's `Music3` icon, rendered at 16px.
6
- *
7
- * @category Lucide Icon
8
- * @see https://lucide.dev/icons/music-3
9
- */
10
- export const LucideMusic3Icon = createLucideIcon({
11
- name: 'Music3',
12
- svg,
13
- });
@@ -1,8 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- /**
3
- * Lucide's `Music4` icon, rendered at 16px.
4
- *
5
- * @category Lucide Icon
6
- * @see https://lucide.dev/icons/music-4
7
- */
8
- export declare const LucideMusic4Icon: import("../icon-svg.js").ViraIconSvg<"Music4">;
@@ -1,13 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- import { Music4 as svg } from 'lucide-static';
3
- import { createLucideIcon } from '../lucide-icon.js';
4
- /**
5
- * Lucide's `Music4` icon, rendered at 16px.
6
- *
7
- * @category Lucide Icon
8
- * @see https://lucide.dev/icons/music-4
9
- */
10
- export const LucideMusic4Icon = createLucideIcon({
11
- name: 'Music4',
12
- svg,
13
- });
@@ -1,8 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- /**
3
- * Lucide's `Music` icon, rendered at 16px.
4
- *
5
- * @category Lucide Icon
6
- * @see https://lucide.dev/icons/music
7
- */
8
- export declare const LucideMusicIcon: import("../icon-svg.js").ViraIconSvg<"Music">;
@@ -1,13 +0,0 @@
1
- /** This file is automatically updated by generate-lucide-icons.ts */
2
- import { Music as svg } from 'lucide-static';
3
- import { createLucideIcon } from '../lucide-icon.js';
4
- /**
5
- * Lucide's `Music` icon, rendered at 16px.
6
- *
7
- * @category Lucide Icon
8
- * @see https://lucide.dev/icons/music
9
- */
10
- export const LucideMusicIcon = createLucideIcon({
11
- name: 'Music',
12
- svg,
13
- });