@ni/spright-components 6.0.2 → 6.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.
@@ -11489,6 +11489,9 @@
11489
11489
  validate() {
11490
11490
  super.validate(this.control);
11491
11491
  }
11492
+ limitPrecision(value) {
11493
+ return parseFloat(value.toPrecision(15));
11494
+ }
11492
11495
  /**
11493
11496
  * Sets the internal value to a valid number between the min and max properties
11494
11497
  * @param value - user input
@@ -11496,16 +11499,17 @@
11496
11499
  * @internal
11497
11500
  */
11498
11501
  getValidValue(value) {
11499
- var _a, _b;
11500
- let validValue = parseFloat(parseFloat(value).toPrecision(15));
11502
+ let validValue = this.limitPrecision(parseFloat(value));
11501
11503
  if (isNaN(validValue)) {
11502
- validValue = "";
11504
+ return "";
11503
11505
  }
11504
- else {
11505
- validValue = Math.min(validValue, (_a = this.max) !== null && _a !== void 0 ? _a : validValue);
11506
- validValue = Math.max(validValue, (_b = this.min) !== null && _b !== void 0 ? _b : validValue).toString();
11506
+ if (this.max !== undefined) {
11507
+ validValue = Math.min(validValue, this.limitPrecision(this.max));
11508
+ }
11509
+ if (this.min !== undefined) {
11510
+ validValue = Math.max(validValue, this.limitPrecision(this.min));
11507
11511
  }
11508
- return validValue;
11512
+ return validValue.toString();
11509
11513
  }
11510
11514
  /**
11511
11515
  * Increments the value using the step value
@@ -17707,6 +17711,10 @@
17707
17711
  name: 'arrow_down_right_and_arrow_up_left_16_x_16',
17708
17712
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m13.171 13.933-2.276-2.247-.447 2.284-1.732-5.246 5.217 1.753-2.284.456 2.291 2.26ZM2 2.746l2.29 2.261-2.283.456 5.217 1.753L5.492 1.97l-.447 2.284-2.276-2.247Z" class="cls-1"/></svg>`,
17709
17713
  };
17714
+ const arrowDownTwoRectangles = {
17715
+ name: 'arrow_down_two_rectangles',
17716
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 7v7h12V2H2zm8.5.5-2.5 5-2.5-5 2.59 1zM13 3v3H3V3z" class="cls-1"/></svg>`,
17717
+ };
17710
17718
  const arrowExpanderDown16X16 = {
17711
17719
  name: 'arrow_expander_down_16_x_16',
17712
17720
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m3.5 4.737 1.11-.732 3.357 5.472L11.397 4l1.103.743L7.955 12z" class="cls-1"/></svg>`,
@@ -17731,6 +17739,10 @@
17731
17739
  name: 'arrow_left_from_line_16_x_16',
17732
17740
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12 14h2V2h-2ZM2 7.982 7.9 5 6.588 7.004 11 7v2H6.613L7.9 11Z" class="cls-1"/></svg>`,
17733
17741
  };
17742
+ const arrowLeftTwoRectangles = {
17743
+ name: 'arrow_left_two_rectangles',
17744
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M9 2H2v12h12V2zm-.5 8.5L3.5 8l5-2.5-1 2.59zM13 13h-3V3h3z" class="cls-1"/></svg>`,
17745
+ };
17734
17746
  const arrowOutCircle16X16 = {
17735
17747
  name: 'arrow_out_circle_16_x_16',
17736
17748
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m9 6 1 2H7v1h3l-1 2 5-2.5z" class="cls-1"/><path d="M6 10V7h2.367A3.24 3.24 0 0 0 5.5 5.25a3.25 3.25 0 0 0 0 6.5c1.25 0 2.324-.714 2.867-1.75z" class="cls-1"/></svg>`,
@@ -17747,6 +17759,10 @@
17747
17759
  name: 'arrow_right_to_line_16_x_16',
17748
17760
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12 14h2V2h-2Zm-6.9-3 1.287-2H2V7l4.412.004L5.1 5 11 7.982Z" class="cls-1"/></svg>`,
17749
17761
  };
17762
+ const arrowRightTwoRectangles = {
17763
+ name: 'arrow_right_two_rectangles',
17764
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M9 2H2v12h12V2zM3.5 5.5l5 2.5-5 2.5 1-2.59zM13 13h-3V3h3z" class="cls-1"/></svg>`,
17765
+ };
17750
17766
  const arrowRotateRight16X16 = {
17751
17767
  name: 'arrow_rotate_right_16_x_16',
17752
17768
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8.9 2.773v1.715a3.366 3.366 0 0 1 3.3 3.428 3.366 3.366 0 0 1-3.3 3.429 3.36 3.36 0 0 1-3.293-3.366h.095l2.255.901-3.05-6.107L1.85 8.88l2.108-.808A5.04 5.04 0 0 0 8.9 13.059a5.05 5.05 0 0 0 4.95-5.143A5.05 5.05 0 0 0 8.9 2.773" class="cls-1"/></svg>`,
@@ -17783,6 +17799,10 @@
17783
17799
  name: 'arrow_up_right_from_square_16_x_16',
17784
17800
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10.436 10h1v3h-9V4h3v1h-2v7h7zm-3.42-6.173.298 1.296 2.92-.748L5.068 9.53l.925.926L11.13 5.33l-.52 2.532 1.31.225 1.2-5.839z" class="cls-1"/></svg>`,
17785
17801
  };
17802
+ const arrowUpTwoRectangles = {
17803
+ name: 'arrow_up_two_rectangles',
17804
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 7v7h12V2H2zm3.5 5.5 2.5-5 2.5 5-2.59-1zM13 3v3H3V3z" class="cls-1"/></svg>`,
17805
+ };
17786
17806
  const arrowsMaximize16X16 = {
17787
17807
  name: 'arrows_maximize_16_x_16',
17788
17808
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12.26 8.735 14 14l-5.25-1.763 2.295-.457-3.03-3.022L8 8.742l-.015.016.015.014-3.023 3.023 2.296.45L2 13.985l1.762-5.243.458 2.295 3.015-3.015.007-.007L7.258 8l-.016-.015L7.227 8l-3.03-3.03-.457 2.295L2 2l5.25 1.762-2.295.458 3.03 3.022.015.016.015-.016L8 7.227l3.023-3.022-2.296-.45L14 2.015l-1.762 5.243-.458-2.295L8.742 8l.016.015L8.773 8l3.03 3.03z" class="cls-1"/></svg>`,
@@ -18327,6 +18347,10 @@
18327
18347
  name: 'pencil_16_x_16',
18328
18348
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10.118 2.793 4.84 8.076 2.5 13.5l5.43-2.335 5.278-5.284a1 1 0 0 0-.001-1.414l-1.675-1.674a1 1 0 0 0-1.414 0m-5.76 9.154-.31-.309 1.427-3.296.53 1.652 1.648.543z" class="cls-1"/></svg>`,
18329
18349
  };
18350
+ const pencilToRectangle = {
18351
+ name: 'pencil_to_rectangle',
18352
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12.17 7.5V13H3.83V3h5.51l1-1H3v12h10V6.66z" class="cls-1"/><path d="M11.5 2.26 7.66 6.1l-1.7 3.94 3.95-1.7 3.84-3.84c.28-.28.28-.74 0-1.03l-1.22-1.22a.736.736 0 0 0-1.03 0ZM7.31 8.91l-.22-.22 1.04-2.4.39 1.2 1.2.4-2.4 1.03Z" class="cls-1"/></svg>`,
18353
+ };
18330
18354
  const play = {
18331
18355
  name: 'play',
18332
18356
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2.05 2v12l11.4-6z" class="cls-1"/></svg>`,
@@ -18497,7 +18521,7 @@
18497
18521
  };
18498
18522
  const triangleTwoLinesHorizontal = {
18499
18523
  name: 'triangle_two_lines_horizontal',
18500
- data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3.625 8 8 2l4.375 6zM14 12H2v2h12zm0-3H2v2h12z" class="cls-1"/></svg>`,
18524
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 11h12v2H2zm0-3v2h12V8zM10.04 7l-2-4-2 4 1.93-.8z" class="cls-1"/></svg>`,
18501
18525
  };
18502
18526
  const trueFalseRectangle16X16 = {
18503
18527
  name: 'true_false_rectangle_16_x_16',
@@ -22428,6 +22452,18 @@ so this becomes the fallback color for the slot */ ''}
22428
22452
  }
22429
22453
  registerIcon('icon-arrow-down-right-and-arrow-up-left', IconArrowDownRightAndArrowUpLeft);
22430
22454
 
22455
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22456
+ // See generation source in nimble-components/build/generate-icons
22457
+ /**
22458
+ * The icon component for the 'arrowDownTwoRectangles' icon
22459
+ */
22460
+ class IconArrowDownTwoRectangles extends Icon {
22461
+ constructor() {
22462
+ super(arrowDownTwoRectangles);
22463
+ }
22464
+ }
22465
+ registerIcon('icon-arrow-down-two-rectangles', IconArrowDownTwoRectangles);
22466
+
22431
22467
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22432
22468
  // See generation source in nimble-components/build/generate-icons
22433
22469
  /**
@@ -22464,6 +22500,18 @@ so this becomes the fallback color for the slot */ ''}
22464
22500
  }
22465
22501
  registerIcon('icon-arrow-left-from-line', IconArrowLeftFromLine);
22466
22502
 
22503
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22504
+ // See generation source in nimble-components/build/generate-icons
22505
+ /**
22506
+ * The icon component for the 'arrowLeftTwoRectangles' icon
22507
+ */
22508
+ class IconArrowLeftTwoRectangles extends Icon {
22509
+ constructor() {
22510
+ super(arrowLeftTwoRectangles);
22511
+ }
22512
+ }
22513
+ registerIcon('icon-arrow-left-two-rectangles', IconArrowLeftTwoRectangles);
22514
+
22467
22515
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22468
22516
  // See generation source in nimble-components/build/generate-icons
22469
22517
  /**
@@ -22512,6 +22560,18 @@ so this becomes the fallback color for the slot */ ''}
22512
22560
  }
22513
22561
  registerIcon('icon-arrow-right-to-line', IconArrowRightToLine);
22514
22562
 
22563
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22564
+ // See generation source in nimble-components/build/generate-icons
22565
+ /**
22566
+ * The icon component for the 'arrowRightTwoRectangles' icon
22567
+ */
22568
+ class IconArrowRightTwoRectangles extends Icon {
22569
+ constructor() {
22570
+ super(arrowRightTwoRectangles);
22571
+ }
22572
+ }
22573
+ registerIcon('icon-arrow-right-two-rectangles', IconArrowRightTwoRectangles);
22574
+
22515
22575
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22516
22576
  // See generation source in nimble-components/build/generate-icons
22517
22577
  /**
@@ -22621,6 +22681,18 @@ so this becomes the fallback color for the slot */ ''}
22621
22681
  }
22622
22682
  registerIcon('icon-arrow-up-right-from-square', IconArrowUpRightFromSquare);
22623
22683
 
22684
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22685
+ // See generation source in nimble-components/build/generate-icons
22686
+ /**
22687
+ * The icon component for the 'arrowUpTwoRectangles' icon
22688
+ */
22689
+ class IconArrowUpTwoRectangles extends Icon {
22690
+ constructor() {
22691
+ super(arrowUpTwoRectangles);
22692
+ }
22693
+ }
22694
+ registerIcon('icon-arrow-up-two-rectangles', IconArrowUpTwoRectangles);
22695
+
22624
22696
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22625
22697
  // See generation source in nimble-components/build/generate-icons
22626
22698
  /**
@@ -24224,6 +24296,18 @@ so this becomes the fallback color for the slot */ ''}
24224
24296
  }
24225
24297
  registerIcon('icon-pencil', IconPencil);
24226
24298
 
24299
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24300
+ // See generation source in nimble-components/build/generate-icons
24301
+ /**
24302
+ * The icon component for the 'pencilToRectangle' icon
24303
+ */
24304
+ class IconPencilToRectangle extends Icon {
24305
+ constructor() {
24306
+ super(pencilToRectangle);
24307
+ }
24308
+ }
24309
+ registerIcon('icon-pencil-to-rectangle', IconPencilToRectangle);
24310
+
24227
24311
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24228
24312
  // See generation source in nimble-components/build/generate-icons
24229
24313
  /**
@@ -28015,9 +28099,11 @@ so this becomes the fallback color for the slot */ ''}
28015
28099
  function insertInto(content, dist, insert, parent) {
28016
28100
  let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);
28017
28101
  if (offset == dist || child.isText) {
28102
+ if (parent && !parent.canReplace(index, index, insert))
28103
+ return null;
28018
28104
  return content.cut(0, dist).append(insert).append(content.cut(dist));
28019
28105
  }
28020
- let inner = insertInto(child.content, dist - offset - 1, insert);
28106
+ let inner = insertInto(child.content, dist - offset - 1, insert, child);
28021
28107
  return inner && content.replaceChild(index, child.copy(inner));
28022
28108
  }
28023
28109
  function replace$1($from, $to, slice) {