@threadlabs/looma 0.26.15 → 0.26.17

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,8 +1,10 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
2
  import { a as vPropValidity, n as checkedProp } from "./props.js";
3
- import { computed, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, mergeProps, normalizeStyle, openBlock, unref, watchSyncEffect, withDirectives } from "vue";
3
+ import { Fragment, computed, createCommentVNode, createElementBlock, defineComponent, getCurrentInstance, mergeProps, normalizeStyle, openBlock, renderList, unref, watchSyncEffect, withDirectives } from "vue";
4
4
  //#region .build/vue/UiMeter.vue?vue&type=script&setup=true&lang.ts
5
5
  var _hoisted_1 = [
6
+ "role",
7
+ "aria-valuemin",
6
8
  "aria-valuemax",
7
9
  "aria-valuenow",
8
10
  "aria-valuetext",
@@ -10,11 +12,13 @@ var _hoisted_1 = [
10
12
  "data-ui-meter-segments",
11
13
  "data-label",
12
14
  "data-max",
15
+ "data-parts",
13
16
  "data-segments",
14
17
  "data-size",
15
18
  "data-tone",
16
19
  "data-value",
17
20
  "data-value-text",
21
+ "data-variant",
18
22
  "data-ui-meter-state"
19
23
  ];
20
24
  function createFormatValue() {
@@ -252,6 +256,10 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
252
256
  type: null,
253
257
  default: 1
254
258
  },
259
+ parts: {
260
+ type: null,
261
+ default: () => []
262
+ },
255
263
  segments: {
256
264
  type: null,
257
265
  default: 0
@@ -271,6 +279,10 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
271
279
  valueText: {
272
280
  type: null,
273
281
  default: ""
282
+ },
283
+ variant: {
284
+ type: null,
285
+ default: "progress"
274
286
  }
275
287
  },
276
288
  setup(__props) {
@@ -292,10 +304,38 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
292
304
  name: "number"
293
305
  },
294
306
  required: false,
295
- target: { attribute: "aria-valuemax" },
307
+ target: { attribute: "max" },
296
308
  description: "The value of a full bar, as on a native meter: 1 for a fraction, or the whole amount (a total, a count of items) with value as the part of it. Must be\n above 0; otherwise the bar is empty.",
297
309
  default: 1
298
310
  },
311
+ parts: {
312
+ type: {
313
+ kind: "list",
314
+ item: {
315
+ kind: "object",
316
+ fields: [{
317
+ name: "value",
318
+ type: {
319
+ kind: "terminal",
320
+ name: "number"
321
+ },
322
+ optional: false
323
+ }, {
324
+ name: "color",
325
+ type: {
326
+ kind: "terminal",
327
+ name: "string"
328
+ },
329
+ optional: false
330
+ }],
331
+ open: false
332
+ }
333
+ },
334
+ required: false,
335
+ target: { attribute: "parts" },
336
+ description: "Categories in display order for distribution. Positive finite values determine each share without rounding; zero\n and negative values draw nothing. Supply label and valueText to describe every category, and a visible text legend so colour is never the only\n explanation.",
337
+ default: []
338
+ },
299
339
  segments: {
300
340
  type: {
301
341
  kind: "terminal",
@@ -354,17 +394,30 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
354
394
  target: { attribute: "valuetext" },
355
395
  description: "The value as assistive technology reads it (\"$750 of $1,240 collected\", \"3 of 5 done, overdue\"). Empty reads the whole percentage in the current\n locale.",
356
396
  default: ""
397
+ },
398
+ variant: {
399
+ type: {
400
+ kind: "terminal",
401
+ name: "keyword"
402
+ },
403
+ required: false,
404
+ target: { attribute: "variant" },
405
+ description: "progress measures one value against max. distribution shows mutually exclusive parts of a whole as a full-width proportional bar; it uses parts rather than\n value/max and is an image, not a progress reading.",
406
+ values: ["progress", "distribution"],
407
+ default: "progress"
357
408
  }
358
409
  } };
359
410
  const props = __props;
360
411
  const acceptedProps = {
361
412
  label: "",
362
413
  max: 1,
414
+ parts: () => [],
363
415
  segments: 0,
364
416
  size: "md",
365
417
  tone: "neutral",
366
418
  value: 0,
367
- valueText: ""
419
+ valueText: "",
420
+ variant: "progress"
368
421
  };
369
422
  const checkedProps = computed(() => ({
370
423
  label: checkedProp(props["label"], {
@@ -375,6 +428,28 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
375
428
  kind: "terminal",
376
429
  name: "number"
377
430
  }, false, "max", acceptedProps),
431
+ parts: checkedProp(props["parts"], {
432
+ kind: "list",
433
+ item: {
434
+ kind: "object",
435
+ fields: [{
436
+ name: "value",
437
+ type: {
438
+ kind: "terminal",
439
+ name: "number"
440
+ },
441
+ optional: false
442
+ }, {
443
+ name: "color",
444
+ type: {
445
+ kind: "terminal",
446
+ name: "string"
447
+ },
448
+ optional: false
449
+ }],
450
+ open: false
451
+ }
452
+ }, false, "parts", acceptedProps),
378
453
  segments: checkedProp(props["segments"], {
379
454
  kind: "terminal",
380
455
  name: "number"
@@ -394,7 +469,11 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
394
469
  valueText: checkedProp(props["valueText"], {
395
470
  kind: "terminal",
396
471
  name: "string"
397
- }, false, "valueText", acceptedProps)
472
+ }, false, "valueText", acceptedProps),
473
+ variant: checkedProp(props["variant"], {
474
+ kind: "terminal",
475
+ name: "keyword"
476
+ }, false, "variant", acceptedProps)
398
477
  }));
399
478
  checkedProps.value;
400
479
  watchSyncEffect(() => {
@@ -461,66 +540,188 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
461
540
  });
462
541
  let guardedPrevious = null;
463
542
  const guarded = computed(() => {
543
+ if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
544
+ true: "img",
545
+ false: "meter"
546
+ }, concat(checkedProps.value.variant === "distribution")) === Symbol.for("html-next.invalid-result")) return guardedPrevious;
547
+ return guardedPrevious = attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
548
+ true: "img",
549
+ false: "meter"
550
+ }, concat(checkedProps.value.variant === "distribution")));
551
+ });
552
+ let guardedBindingPrevious = null;
553
+ const guardedBinding = computed(() => {
554
+ if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
555
+ true: null,
556
+ false: 0
557
+ }, concat(checkedProps.value.variant === "distribution")) === Symbol.for("html-next.invalid-result")) return guardedBindingPrevious;
558
+ return guardedBindingPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
559
+ true: null,
560
+ false: 0
561
+ }, concat(checkedProps.value.variant === "distribution")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
562
+ true: null,
563
+ false: 0
564
+ }, concat(checkedProps.value.variant === "distribution"))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
565
+ true: null,
566
+ false: 0
567
+ }, concat(checkedProps.value.variant === "distribution")));
568
+ });
569
+ let guardedBinding2Previous = null;
570
+ const guardedBinding2 = computed(() => {
571
+ if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
572
+ true: null,
573
+ false: checkedProps.value.max
574
+ }, concat(checkedProps.value.variant === "distribution")) === Symbol.for("html-next.invalid-result")) return guardedBinding2Previous;
575
+ return guardedBinding2Previous = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
576
+ true: null,
577
+ false: checkedProps.value.max
578
+ }, concat(checkedProps.value.variant === "distribution")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
579
+ true: null,
580
+ false: checkedProps.value.max
581
+ }, concat(checkedProps.value.variant === "distribution"))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
582
+ true: null,
583
+ false: checkedProps.value.max
584
+ }, concat(checkedProps.value.variant === "distribution")));
585
+ });
586
+ let guardedBinding3Previous = null;
587
+ const guardedBinding3 = computed(() => {
588
+ if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
589
+ true: null,
590
+ false: amount.value
591
+ }, concat(checkedProps.value.variant === "distribution")) === Symbol.for("html-next.invalid-result")) return guardedBinding3Previous;
592
+ return guardedBinding3Previous = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
593
+ true: null,
594
+ false: amount.value
595
+ }, concat(checkedProps.value.variant === "distribution")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
596
+ true: null,
597
+ false: amount.value
598
+ }, concat(checkedProps.value.variant === "distribution"))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
599
+ true: null,
600
+ false: amount.value
601
+ }, concat(checkedProps.value.variant === "distribution")));
602
+ });
603
+ let guardedBinding4Previous = null;
604
+ const guardedBinding4 = computed(() => {
464
605
  if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
465
606
  const value = {
466
- true: checkedProps.value.valueText,
467
- false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
607
+ true: null,
608
+ false: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
609
+ const value = {
610
+ true: checkedProps.value.valueText,
611
+ false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
612
+ };
613
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
614
+ })(), concat(checkedProps.value.valueText !== ""))
468
615
  };
469
616
  return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
470
- })(), concat(checkedProps.value.valueText !== "")) === Symbol.for("html-next.invalid-result")) return guardedPrevious;
471
- return guardedPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
617
+ })(), concat(checkedProps.value.variant === "distribution")) === Symbol.for("html-next.invalid-result")) return guardedBinding4Previous;
618
+ return guardedBinding4Previous = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
472
619
  const value = {
473
- true: checkedProps.value.valueText,
474
- false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
620
+ true: null,
621
+ false: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
622
+ const value = {
623
+ true: checkedProps.value.valueText,
624
+ false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
625
+ };
626
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
627
+ })(), concat(checkedProps.value.valueText !== ""))
475
628
  };
476
629
  return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
477
- })(), concat(checkedProps.value.valueText !== "")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
630
+ })(), concat(checkedProps.value.variant === "distribution")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
478
631
  const value = {
479
- true: checkedProps.value.valueText,
480
- false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
632
+ true: null,
633
+ false: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
634
+ const value = {
635
+ true: checkedProps.value.valueText,
636
+ false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
637
+ };
638
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
639
+ })(), concat(checkedProps.value.valueText !== ""))
481
640
  };
482
641
  return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
483
- })(), concat(checkedProps.value.valueText !== ""))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
642
+ })(), concat(checkedProps.value.variant === "distribution"))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
484
643
  const value = {
485
- true: checkedProps.value.valueText,
486
- false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
644
+ true: null,
645
+ false: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
646
+ const value = {
647
+ true: checkedProps.value.valueText,
648
+ false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
649
+ };
650
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
651
+ })(), concat(checkedProps.value.valueText !== ""))
487
652
  };
488
653
  return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
489
- })(), concat(checkedProps.value.valueText !== "")));
654
+ })(), concat(checkedProps.value.variant === "distribution")));
490
655
  });
491
- let guardedBindingPrevious = null;
492
- const guardedBinding = computed(() => {
493
- if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
494
- true: checkedProps.value.label,
495
- false: null
496
- }, concat(checkedProps.value.label !== "")) === Symbol.for("html-next.invalid-result")) return guardedBindingPrevious;
497
- return guardedBindingPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
498
- true: checkedProps.value.label,
499
- false: null
500
- }, concat(checkedProps.value.label !== "")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
501
- true: checkedProps.value.label,
502
- false: null
503
- }, concat(checkedProps.value.label !== ""))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
504
- true: checkedProps.value.label,
505
- false: null
506
- }, concat(checkedProps.value.label !== "")));
656
+ let guardedBinding5Previous = null;
657
+ const guardedBinding5 = computed(() => {
658
+ if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
659
+ const value = {
660
+ true: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
661
+ const value = {
662
+ true: concat(checkedProps.value.label, ": ", checkedProps.value.valueText),
663
+ false: checkedProps.value.label
664
+ };
665
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
666
+ })(), concat(checkedProps.value.variant === "distribution" && checkedProps.value.valueText !== "")),
667
+ false: null
668
+ };
669
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
670
+ })(), concat(checkedProps.value.label !== "")) === Symbol.for("html-next.invalid-result")) return guardedBinding5Previous;
671
+ return guardedBinding5Previous = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
672
+ const value = {
673
+ true: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
674
+ const value = {
675
+ true: concat(checkedProps.value.label, ": ", checkedProps.value.valueText),
676
+ false: checkedProps.value.label
677
+ };
678
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
679
+ })(), concat(checkedProps.value.variant === "distribution" && checkedProps.value.valueText !== "")),
680
+ false: null
681
+ };
682
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
683
+ })(), concat(checkedProps.value.label !== "")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
684
+ const value = {
685
+ true: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
686
+ const value = {
687
+ true: concat(checkedProps.value.label, ": ", checkedProps.value.valueText),
688
+ false: checkedProps.value.label
689
+ };
690
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
691
+ })(), concat(checkedProps.value.variant === "distribution" && checkedProps.value.valueText !== "")),
692
+ false: null
693
+ };
694
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
695
+ })(), concat(checkedProps.value.label !== ""))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
696
+ const value = {
697
+ true: ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
698
+ const value = {
699
+ true: concat(checkedProps.value.label, ": ", checkedProps.value.valueText),
700
+ false: checkedProps.value.label
701
+ };
702
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
703
+ })(), concat(checkedProps.value.variant === "distribution" && checkedProps.value.valueText !== "")),
704
+ false: null
705
+ };
706
+ return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
707
+ })(), concat(checkedProps.value.label !== "")));
507
708
  });
508
- let guardedBinding2Previous = null;
509
- const guardedBinding2 = computed(() => {
709
+ let guardedBinding6Previous = null;
710
+ const guardedBinding6 = computed(() => {
510
711
  if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
511
712
  true: checkedProps.value.segments,
512
713
  false: null
513
- }, concat(number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1))) === Symbol.for("html-next.invalid-result")) return guardedBinding2Previous;
514
- return guardedBinding2Previous = attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
714
+ }, concat(checkedProps.value.variant === "progress" && (number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1)))) === Symbol.for("html-next.invalid-result")) return guardedBinding6Previous;
715
+ return guardedBinding6Previous = attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
515
716
  true: checkedProps.value.segments,
516
717
  false: null
517
- }, concat(number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1))));
718
+ }, concat(checkedProps.value.variant === "progress" && (number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1)))));
518
719
  });
519
- let guardedBinding3Previous = null;
520
- const guardedBinding3 = computed(() => {
720
+ let guardedBinding7Previous = null;
721
+ const guardedBinding7 = computed(() => {
521
722
  const candidate = concat(percent.value, "%");
522
- if (candidate === Symbol.for("html-next.invalid-result")) return guardedBinding3Previous;
523
- return guardedBinding3Previous = candidate;
723
+ if (candidate === Symbol.for("html-next.invalid-result")) return guardedBinding7Previous;
724
+ return guardedBinding7Previous = candidate;
524
725
  });
525
726
  const hydrationNode = hydrationInstance?.vnode.el;
526
727
  if (typeof window !== "undefined" && hydrationNode != null && (!(hydrationNode instanceof Element) || hydrationNode.localName !== "span")) throw Object.assign(/* @__PURE__ */ new Error("HR005: Server markup for <ui-meter> has an incompatible root."), {
@@ -535,7 +736,9 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
535
736
  checkedProps.value.size && "size",
536
737
  checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`,
537
738
  checkedProps.value.tone && "tone",
538
- checkedProps.value.tone != null && `tone=${encodeURIComponent(checkedProps.value.tone)}`
739
+ checkedProps.value.tone != null && `tone=${encodeURIComponent(checkedProps.value.tone)}`,
740
+ checkedProps.value.variant && "variant",
741
+ checkedProps.value.variant != null && `variant=${encodeURIComponent(checkedProps.value.variant)}`
539
742
  ].filter(Boolean).join(" "));
540
743
  function text(value) {
541
744
  if (Array.isArray(value)) return value.map(text).join(" ");
@@ -608,33 +811,44 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
608
811
  return !Number.isFinite(result) ? Symbol.for("html-next.invalid-result") : unit === void 0 ? result : String(result) + unit;
609
812
  }
610
813
  return (_ctx, _cache) => {
611
- return withDirectives((openBlock(), createElementBlock("span", mergeProps({
612
- "data-component": "ui-meter",
613
- role: "meter",
614
- "aria-valuemin": "0"
615
- }, nativeAttrs(_ctx.$attrs), {
616
- "aria-valuemax": checkedProps.value.max ?? void 0,
617
- "aria-valuenow": unref(amount),
618
- "aria-valuetext": guarded.value,
619
- "aria-label": guardedBinding.value,
620
- "data-ui-meter-segments": guardedBinding2.value,
814
+ return withDirectives((openBlock(), createElementBlock("span", mergeProps({ "data-component": "ui-meter" }, nativeAttrs(_ctx.$attrs), {
815
+ role: guarded.value,
816
+ "aria-valuemin": guardedBinding.value,
817
+ "aria-valuemax": guardedBinding2.value,
818
+ "aria-valuenow": guardedBinding3.value,
819
+ "aria-valuetext": guardedBinding4.value,
820
+ "aria-label": guardedBinding5.value,
821
+ "data-ui-meter-segments": guardedBinding6.value,
621
822
  "data-label": reflectedProp("label", "label", checkedProps.value.label, void 0, false),
622
823
  "data-max": reflectedProp("max", "max", checkedProps.value.max, void 0, false),
824
+ "data-parts": reflectedProp("parts", "parts", checkedProps.value.parts, void 0, false),
623
825
  "data-segments": reflectedProp("segments", "segments", checkedProps.value.segments, void 0, false),
624
826
  "data-size": reflectedProp("size", "size", checkedProps.value.size, void 0, false),
625
827
  "data-tone": reflectedProp("tone", "tone", checkedProps.value.tone, void 0, false),
626
828
  "data-value": reflectedProp("value", "value", checkedProps.value.value, void 0, false),
627
829
  "data-value-text": reflectedProp("valueText", "value-text", checkedProps.value.valueText, void 0, false),
830
+ "data-variant": reflectedProp("variant", "variant", checkedProps.value.variant, void 0, false),
628
831
  "data-ui-meter-state": hostState.value || void 0
629
- }), [createElementVNode("span", {
832
+ }), [checkedProps.value.variant === "progress" ? (openBlock(), createElementBlock("span", {
833
+ key: 0,
630
834
  class: "fill",
631
- style: normalizeStyle({ "inline-size": guardedBinding3.value })
632
- }, null, 4)], 16, _hoisted_1)), [[unref(vPropValidity), {
835
+ style: normalizeStyle({ "inline-size": guardedBinding7.value })
836
+ }, null, 4)) : createCommentVNode("v-if", true), checkedProps.value.variant === "distribution" ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(checkedProps.value.parts, (part, index) => {
837
+ return openBlock(), createElementBlock(Fragment, { key: index }, [part.value > 0 && part.value - part.value === 0 ? (openBlock(), createElementBlock("span", {
838
+ key: 0,
839
+ class: "part",
840
+ "aria-hidden": "true",
841
+ style: normalizeStyle({
842
+ "flex-grow": part.value,
843
+ "background-color": part.color
844
+ })
845
+ }, null, 4)) : createCommentVNode("v-if", true)], 64);
846
+ }), 128)) : createCommentVNode("v-if", true)], 16, _hoisted_1)), [[unref(vPropValidity), {
633
847
  contract: propValidityContract,
634
848
  values: { ...props }
635
849
  }]]);
636
850
  };
637
851
  }
638
- }), [["__scopeId", "data-v-76fefbc5"]]);
852
+ }), [["__scopeId", "data-v-c308c037"]]);
639
853
  //#endregion
640
854
  export { UiMeter_default as t };