@ni/nimble-components 20.5.2 → 20.5.4

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.
@@ -16288,7 +16288,7 @@
16288
16288
 
16289
16289
  /**
16290
16290
  * Do not edit directly
16291
- * Generated on Thu, 21 Sep 2023 23:36:37 GMT
16291
+ * Generated on Tue, 26 Sep 2023 20:58:04 GMT
16292
16292
  */
16293
16293
 
16294
16294
  const Information100DarkUi = "#a46eff";
@@ -17248,6 +17248,23 @@
17248
17248
  return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
17249
17249
  }
17250
17250
 
17251
+ /**
17252
+ * Hide content visually while keeping it screen reader-accessible.
17253
+ * Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
17254
+ * See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
17255
+ */
17256
+ const accessiblyHidden = cssPartial `
17257
+ display: inline-block;
17258
+ height: 1px;
17259
+ width: 1px;
17260
+ position: absolute;
17261
+ margin: -1px;
17262
+ clip: rect(1px, 1px, 1px, 1px);
17263
+ clip-path: inset(50%);
17264
+ overflow: hidden;
17265
+ padding: 0;
17266
+ `;
17267
+
17251
17268
  const styles$R = css `
17252
17269
  @layer base, hover, focusVisible, active, disabled, top;
17253
17270
 
@@ -17322,22 +17339,7 @@
17322
17339
  }
17323
17340
 
17324
17341
  :host([content-hidden]) .content {
17325
- ${
17326
- /**
17327
- * Hide content visually while keeping it screen reader-accessible.
17328
- * Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
17329
- * See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
17330
- */
17331
- ''}
17332
- display: inline-block;
17333
- height: 1px;
17334
- width: 1px;
17335
- position: absolute;
17336
- margin: -1px;
17337
- clip: rect(1px, 1px, 1px, 1px);
17338
- clip-path: inset(50%);
17339
- overflow: hidden;
17340
- padding: 0;
17342
+ ${accessiblyHidden}
17341
17343
  }
17342
17344
 
17343
17345
  [part='start'] {
@@ -18667,22 +18669,7 @@
18667
18669
  }
18668
18670
 
18669
18671
  :host([title-hidden]) slot[name='title'] {
18670
- ${
18671
- /**
18672
- * Hide content visually while keeping it screen reader-accessible.
18673
- * Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
18674
- * See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
18675
- */
18676
- ''}
18677
- display: inline-block;
18678
- height: 1px;
18679
- width: 1px;
18680
- position: absolute;
18681
- margin: -1px;
18682
- clip: rect(1px, 1px, 1px, 1px);
18683
- clip-path: inset(50%);
18684
- overflow: hidden;
18685
- padding: 0;
18672
+ ${accessiblyHidden}
18686
18673
  }
18687
18674
 
18688
18675
  .controls {
@@ -21086,22 +21073,7 @@
21086
21073
  }
21087
21074
 
21088
21075
  :host([header-hidden]) header {
21089
- ${
21090
- /**
21091
- * Hide content visually while keeping it screen reader-accessible.
21092
- * Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
21093
- * See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
21094
- */
21095
- ''}
21096
- display: inline-block;
21097
- height: 1px;
21098
- width: 1px;
21099
- position: absolute;
21100
- margin: -1px;
21101
- clip: rect(1px, 1px, 1px, 1px);
21102
- clip-path: inset(50%);
21103
- overflow: hidden;
21104
- padding: 0;
21076
+ ${accessiblyHidden}
21105
21077
  }
21106
21078
 
21107
21079
  .title {
@@ -63936,22 +63908,7 @@ img.ProseMirror-separator {
63936
63908
  }
63937
63909
 
63938
63910
  .accessibly-hidden {
63939
- ${
63940
- /**
63941
- * Hide content visually while keeping it screen reader-accessible.
63942
- * Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
63943
- * See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
63944
- */
63945
- ''}
63946
- display: inline-block;
63947
- height: 1px;
63948
- width: 1px;
63949
- position: absolute;
63950
- margin: -1px;
63951
- clip: rect(1px, 1px, 1px, 1px);
63952
- clip-path: inset(50%);
63953
- overflow: hidden;
63954
- padding: 0;
63911
+ ${accessiblyHidden}
63955
63912
  }
63956
63913
  `.withBehaviors(themeBehavior(Theme.color, css `
63957
63914
  .table-row-container::before {
@@ -65707,11 +65664,11 @@ img.ProseMirror-separator {
65707
65664
  function getTanStackSortingFunction(sortOperation) {
65708
65665
  switch (sortOperation) {
65709
65666
  case TableColumnSortOperation.basic:
65710
- return sortingFns.basic;
65667
+ return basicSortFunction;
65711
65668
  case TableColumnSortOperation.localeAwareCaseSensitive:
65712
65669
  return localeAwareCaseSensitiveSortFunction;
65713
65670
  default:
65714
- return sortingFns.basic;
65671
+ return basicSortFunction;
65715
65672
  }
65716
65673
  }
65717
65674
  /**
@@ -65733,6 +65690,40 @@ img.ProseMirror-separator {
65733
65690
  }
65734
65691
  return 1;
65735
65692
  }
65693
+ /**
65694
+ * A function to perform a basic sort of two rows from TanStack for a given column.
65695
+ * The function sorts `undefined` followed by `null` before all other values.
65696
+ */
65697
+ function basicSortFunction(rowA, rowB, columnId) {
65698
+ const valueA = rowA.getValue(columnId);
65699
+ const valueB = rowB.getValue(columnId);
65700
+ if (Object.is(valueA, valueB)) {
65701
+ return 0;
65702
+ }
65703
+ if (valueA === undefined) {
65704
+ return -1;
65705
+ }
65706
+ if (valueB === undefined) {
65707
+ return 1;
65708
+ }
65709
+ if (valueA === null) {
65710
+ return -1;
65711
+ }
65712
+ if (valueB === null) {
65713
+ return 1;
65714
+ }
65715
+ if (Number.isNaN(valueA)) {
65716
+ return -1;
65717
+ }
65718
+ if (Number.isNaN(valueB)) {
65719
+ return 1;
65720
+ }
65721
+ if (valueA === 0 && valueB === 0) {
65722
+ // Both values equal 0, but one is -0 and one is +0 because Object.is(valueA, valueB) returned false.
65723
+ return Object.is(valueA, -0) ? -1 : 1;
65724
+ }
65725
+ return valueA > valueB ? 1 : -1;
65726
+ }
65736
65727
 
65737
65728
  /**
65738
65729
  * This class manages the layout of columns within a Table.