@ni/spright-components 1.0.20 → 1.0.22

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.
@@ -16280,7 +16280,7 @@
16280
16280
 
16281
16281
  /**
16282
16282
  * Do not edit directly
16283
- * Generated on Thu, 13 Jun 2024 16:48:33 GMT
16283
+ * Generated on Mon, 17 Jun 2024 16:25:28 GMT
16284
16284
  */
16285
16285
 
16286
16286
  const Information100DarkUi = "#a46eff";
@@ -19800,7 +19800,8 @@
19800
19800
  popupIconWarningLabel: 'Warning',
19801
19801
  popupIconInformationLabel: 'Information',
19802
19802
  filterSearchLabel: 'Search',
19803
- filterNoResultsLabel: 'No items found'
19803
+ filterNoResultsLabel: 'No items found',
19804
+ loadingLabel: 'Loading…'
19804
19805
  };
19805
19806
 
19806
19807
  const popupDismissLabel = DesignToken.create({
@@ -19835,6 +19836,10 @@
19835
19836
  name: 'filter-no-results-label',
19836
19837
  cssCustomPropertyName: null
19837
19838
  }).withDefault(coreLabelDefaults.filterNoResultsLabel);
19839
+ const loadingLabel = DesignToken.create({
19840
+ name: 'loading-label',
19841
+ cssCustomPropertyName: null
19842
+ }).withDefault(coreLabelDefaults.loadingLabel);
19838
19843
 
19839
19844
  // prettier-ignore
19840
19845
  const template$A = html `
@@ -20907,7 +20912,8 @@
20907
20912
  */
20908
20913
  const FilterMode = {
20909
20914
  none: undefined,
20910
- standard: 'standard'
20915
+ standard: 'standard',
20916
+ manual: 'manual'
20911
20917
  };
20912
20918
 
20913
20919
  const styles$I = css `
@@ -24657,7 +24663,8 @@
24657
24663
  popupIconWarning: popupIconWarningLabel,
24658
24664
  popupIconInformation: popupIconInformationLabel,
24659
24665
  filterSearch: filterSearchLabel,
24660
- filterNoResults: filterNoResultsLabel
24666
+ filterNoResults: filterNoResultsLabel,
24667
+ loading: loadingLabel
24661
24668
  };
24662
24669
  /**
24663
24670
  * Core label provider for Nimble
@@ -24692,6 +24699,9 @@
24692
24699
  __decorate$1([
24693
24700
  attr({ attribute: 'filter-no-results' })
24694
24701
  ], LabelProviderCore.prototype, "filterNoResults", void 0);
24702
+ __decorate$1([
24703
+ attr({ attribute: 'loading' })
24704
+ ], LabelProviderCore.prototype, "loading", void 0);
24695
24705
  const nimbleLabelProviderCore = LabelProviderCore.compose({
24696
24706
  baseName: 'label-provider-core',
24697
24707
  styles: styles$F
@@ -51839,38 +51849,35 @@ img.ProseMirror-separator {
51839
51849
  LinkifyIt.prototype.onCompile = function onCompile () {
51840
51850
  };
51841
51851
 
51842
- /*! https://mths.be/punycode v1.4.1 by @mathias */
51843
-
51844
-
51845
51852
  /** Highest positive signed 32-bit float value */
51846
- var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
51853
+ const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
51847
51854
 
51848
51855
  /** Bootstring parameters */
51849
- var base = 36;
51850
- var tMin = 1;
51851
- var tMax = 26;
51852
- var skew = 38;
51853
- var damp = 700;
51854
- var initialBias = 72;
51855
- var initialN = 128; // 0x80
51856
- var delimiter = '-'; // '\x2D'
51856
+ const base = 36;
51857
+ const tMin = 1;
51858
+ const tMax = 26;
51859
+ const skew = 38;
51860
+ const damp = 700;
51861
+ const initialBias = 72;
51862
+ const initialN = 128; // 0x80
51863
+ const delimiter = '-'; // '\x2D'
51857
51864
 
51858
51865
  /** Regular expressions */
51859
- var regexPunycode = /^xn--/;
51860
- var regexNonASCII = /[^\x20-\x7E]/; // unprintable ASCII chars + non-ASCII chars
51861
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
51866
+ const regexPunycode = /^xn--/;
51867
+ const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
51868
+ const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
51862
51869
 
51863
51870
  /** Error messages */
51864
- var errors = {
51865
- 'overflow': 'Overflow: input needs wider integers to process',
51866
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
51867
- 'invalid-input': 'Invalid input'
51871
+ const errors = {
51872
+ 'overflow': 'Overflow: input needs wider integers to process',
51873
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
51874
+ 'invalid-input': 'Invalid input'
51868
51875
  };
51869
51876
 
51870
51877
  /** Convenience shortcuts */
51871
- var baseMinusTMin = base - tMin;
51872
- var floor = Math.floor;
51873
- var stringFromCharCode = String.fromCharCode;
51878
+ const baseMinusTMin = base - tMin;
51879
+ const floor = Math.floor;
51880
+ const stringFromCharCode = String.fromCharCode;
51874
51881
 
51875
51882
  /*--------------------------------------------------------------------------*/
51876
51883
 
@@ -51881,7 +51888,7 @@ img.ProseMirror-separator {
51881
51888
  * @returns {Error} Throws a `RangeError` with the applicable error message.
51882
51889
  */
51883
51890
  function error(type) {
51884
- throw new RangeError(errors[type]);
51891
+ throw new RangeError(errors[type]);
51885
51892
  }
51886
51893
 
51887
51894
  /**
@@ -51892,13 +51899,13 @@ img.ProseMirror-separator {
51892
51899
  * item.
51893
51900
  * @returns {Array} A new array of values returned by the callback function.
51894
51901
  */
51895
- function map$1(array, fn) {
51896
- var length = array.length;
51897
- var result = [];
51898
- while (length--) {
51899
- result[length] = fn(array[length]);
51900
- }
51901
- return result;
51902
+ function map$1(array, callback) {
51903
+ const result = [];
51904
+ let length = array.length;
51905
+ while (length--) {
51906
+ result[length] = callback(array[length]);
51907
+ }
51908
+ return result;
51902
51909
  }
51903
51910
 
51904
51911
  /**
@@ -51908,23 +51915,23 @@ img.ProseMirror-separator {
51908
51915
  * @param {String} domain The domain name or email address.
51909
51916
  * @param {Function} callback The function that gets called for every
51910
51917
  * character.
51911
- * @returns {Array} A new string of characters returned by the callback
51918
+ * @returns {String} A new string of characters returned by the callback
51912
51919
  * function.
51913
51920
  */
51914
- function mapDomain(string, fn) {
51915
- var parts = string.split('@');
51916
- var result = '';
51917
- if (parts.length > 1) {
51918
- // In email addresses, only the domain name should be punycoded. Leave
51919
- // the local part (i.e. everything up to `@`) intact.
51920
- result = parts[0] + '@';
51921
- string = parts[1];
51922
- }
51923
- // Avoid `split(regex)` for IE8 compatibility. See #17.
51924
- string = string.replace(regexSeparators, '\x2E');
51925
- var labels = string.split('.');
51926
- var encoded = map$1(labels, fn).join('.');
51927
- return result + encoded;
51921
+ function mapDomain(domain, callback) {
51922
+ const parts = domain.split('@');
51923
+ let result = '';
51924
+ if (parts.length > 1) {
51925
+ // In email addresses, only the domain name should be punycoded. Leave
51926
+ // the local part (i.e. everything up to `@`) intact.
51927
+ result = parts[0] + '@';
51928
+ domain = parts[1];
51929
+ }
51930
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
51931
+ domain = domain.replace(regexSeparators, '\x2E');
51932
+ const labels = domain.split('.');
51933
+ const encoded = map$1(labels, callback).join('.');
51934
+ return result + encoded;
51928
51935
  }
51929
51936
 
51930
51937
  /**
@@ -51941,29 +51948,27 @@ img.ProseMirror-separator {
51941
51948
  * @returns {Array} The new array of code points.
51942
51949
  */
51943
51950
  function ucs2decode(string) {
51944
- var output = [],
51945
- counter = 0,
51946
- length = string.length,
51947
- value,
51948
- extra;
51949
- while (counter < length) {
51950
- value = string.charCodeAt(counter++);
51951
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
51952
- // high surrogate, and there is a next character
51953
- extra = string.charCodeAt(counter++);
51954
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
51955
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
51956
- } else {
51957
- // unmatched surrogate; only append this code unit, in case the next
51958
- // code unit is the high surrogate of a surrogate pair
51959
- output.push(value);
51960
- counter--;
51961
- }
51962
- } else {
51963
- output.push(value);
51964
- }
51965
- }
51966
- return output;
51951
+ const output = [];
51952
+ let counter = 0;
51953
+ const length = string.length;
51954
+ while (counter < length) {
51955
+ const value = string.charCodeAt(counter++);
51956
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
51957
+ // It's a high surrogate, and there is a next character.
51958
+ const extra = string.charCodeAt(counter++);
51959
+ if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
51960
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
51961
+ } else {
51962
+ // It's an unmatched surrogate; only append this code unit, in case the
51963
+ // next code unit is the high surrogate of a surrogate pair.
51964
+ output.push(value);
51965
+ counter--;
51966
+ }
51967
+ } else {
51968
+ output.push(value);
51969
+ }
51970
+ }
51971
+ return output;
51967
51972
  }
51968
51973
 
51969
51974
  /**
@@ -51974,18 +51979,7 @@ img.ProseMirror-separator {
51974
51979
  * @param {Array} codePoints The array of numeric code points.
51975
51980
  * @returns {String} The new Unicode string (UCS-2).
51976
51981
  */
51977
- function ucs2encode(array) {
51978
- return map$1(array, function(value) {
51979
- var output = '';
51980
- if (value > 0xFFFF) {
51981
- value -= 0x10000;
51982
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
51983
- value = 0xDC00 | value & 0x3FF;
51984
- }
51985
- output += stringFromCharCode(value);
51986
- return output;
51987
- }).join('');
51988
- }
51982
+ const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
51989
51983
 
51990
51984
  /**
51991
51985
  * Converts a basic code point into a digit/integer.
@@ -51996,18 +51990,18 @@ img.ProseMirror-separator {
51996
51990
  * representing integers) in the range `0` to `base - 1`, or `base` if
51997
51991
  * the code point does not represent a value.
51998
51992
  */
51999
- function basicToDigit(codePoint) {
52000
- if (codePoint - 48 < 10) {
52001
- return codePoint - 22;
52002
- }
52003
- if (codePoint - 65 < 26) {
52004
- return codePoint - 65;
52005
- }
52006
- if (codePoint - 97 < 26) {
52007
- return codePoint - 97;
52008
- }
52009
- return base;
52010
- }
51993
+ const basicToDigit = function(codePoint) {
51994
+ if (codePoint >= 0x30 && codePoint < 0x3A) {
51995
+ return 26 + (codePoint - 0x30);
51996
+ }
51997
+ if (codePoint >= 0x41 && codePoint < 0x5B) {
51998
+ return codePoint - 0x41;
51999
+ }
52000
+ if (codePoint >= 0x61 && codePoint < 0x7B) {
52001
+ return codePoint - 0x61;
52002
+ }
52003
+ return base;
52004
+ };
52011
52005
 
52012
52006
  /**
52013
52007
  * Converts a digit/integer into a basic code point.
@@ -52020,26 +52014,26 @@ img.ProseMirror-separator {
52020
52014
  * used; else, the lowercase form is used. The behavior is undefined
52021
52015
  * if `flag` is non-zero and `digit` has no uppercase form.
52022
52016
  */
52023
- function digitToBasic(digit, flag) {
52024
- // 0..25 map to ASCII a..z or A..Z
52025
- // 26..35 map to ASCII 0..9
52026
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
52027
- }
52017
+ const digitToBasic = function(digit, flag) {
52018
+ // 0..25 map to ASCII a..z or A..Z
52019
+ // 26..35 map to ASCII 0..9
52020
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
52021
+ };
52028
52022
 
52029
52023
  /**
52030
52024
  * Bias adaptation function as per section 3.4 of RFC 3492.
52031
52025
  * https://tools.ietf.org/html/rfc3492#section-3.4
52032
52026
  * @private
52033
52027
  */
52034
- function adapt(delta, numPoints, firstTime) {
52035
- var k = 0;
52036
- delta = firstTime ? floor(delta / damp) : delta >> 1;
52037
- delta += floor(delta / numPoints);
52038
- for ( /* no initialization */ ; delta > baseMinusTMin * tMax >> 1; k += base) {
52039
- delta = floor(delta / baseMinusTMin);
52040
- }
52041
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
52042
- }
52028
+ const adapt = function(delta, numPoints, firstTime) {
52029
+ let k = 0;
52030
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
52031
+ delta += floor(delta / numPoints);
52032
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
52033
+ delta = floor(delta / baseMinusTMin);
52034
+ }
52035
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
52036
+ };
52043
52037
 
52044
52038
  /**
52045
52039
  * Converts a Punycode string of ASCII-only symbols to a string of Unicode
@@ -52048,213 +52042,187 @@ img.ProseMirror-separator {
52048
52042
  * @param {String} input The Punycode string of ASCII-only symbols.
52049
52043
  * @returns {String} The resulting string of Unicode symbols.
52050
52044
  */
52051
- function decode(input) {
52052
- // Don't use UCS-2
52053
- var output = [],
52054
- inputLength = input.length,
52055
- out,
52056
- i = 0,
52057
- n = initialN,
52058
- bias = initialBias,
52059
- basic,
52060
- j,
52061
- index,
52062
- oldi,
52063
- w,
52064
- k,
52065
- digit,
52066
- t,
52067
- /** Cached calculation results */
52068
- baseMinusT;
52069
-
52070
- // Handle the basic code points: let `basic` be the number of input code
52071
- // points before the last delimiter, or `0` if there is none, then copy
52072
- // the first basic code points to the output.
52073
-
52074
- basic = input.lastIndexOf(delimiter);
52075
- if (basic < 0) {
52076
- basic = 0;
52077
- }
52078
-
52079
- for (j = 0; j < basic; ++j) {
52080
- // if it's not a basic code point
52081
- if (input.charCodeAt(j) >= 0x80) {
52082
- error('not-basic');
52083
- }
52084
- output.push(input.charCodeAt(j));
52085
- }
52086
-
52087
- // Main decoding loop: start just after the last delimiter if any basic code
52088
- // points were copied; start at the beginning otherwise.
52089
-
52090
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */ ) {
52091
-
52092
- // `index` is the index of the next character to be consumed.
52093
- // Decode a generalized variable-length integer into `delta`,
52094
- // which gets added to `i`. The overflow checking is easier
52095
- // if we increase `i` as we go, then subtract off its starting
52096
- // value at the end to obtain `delta`.
52097
- for (oldi = i, w = 1, k = base; /* no condition */ ; k += base) {
52098
-
52099
- if (index >= inputLength) {
52100
- error('invalid-input');
52101
- }
52045
+ const decode = function(input) {
52046
+ // Don't use UCS-2.
52047
+ const output = [];
52048
+ const inputLength = input.length;
52049
+ let i = 0;
52050
+ let n = initialN;
52051
+ let bias = initialBias;
52102
52052
 
52103
- digit = basicToDigit(input.charCodeAt(index++));
52053
+ // Handle the basic code points: let `basic` be the number of input code
52054
+ // points before the last delimiter, or `0` if there is none, then copy
52055
+ // the first basic code points to the output.
52104
52056
 
52105
- if (digit >= base || digit > floor((maxInt - i) / w)) {
52106
- error('overflow');
52107
- }
52108
-
52109
- i += digit * w;
52110
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
52057
+ let basic = input.lastIndexOf(delimiter);
52058
+ if (basic < 0) {
52059
+ basic = 0;
52060
+ }
52111
52061
 
52112
- if (digit < t) {
52113
- break;
52114
- }
52062
+ for (let j = 0; j < basic; ++j) {
52063
+ // if it's not a basic code point
52064
+ if (input.charCodeAt(j) >= 0x80) {
52065
+ error('not-basic');
52066
+ }
52067
+ output.push(input.charCodeAt(j));
52068
+ }
52115
52069
 
52116
- baseMinusT = base - t;
52117
- if (w > floor(maxInt / baseMinusT)) {
52118
- error('overflow');
52119
- }
52070
+ // Main decoding loop: start just after the last delimiter if any basic code
52071
+ // points were copied; start at the beginning otherwise.
52120
52072
 
52121
- w *= baseMinusT;
52073
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
52122
52074
 
52123
- }
52075
+ // `index` is the index of the next character to be consumed.
52076
+ // Decode a generalized variable-length integer into `delta`,
52077
+ // which gets added to `i`. The overflow checking is easier
52078
+ // if we increase `i` as we go, then subtract off its starting
52079
+ // value at the end to obtain `delta`.
52080
+ const oldi = i;
52081
+ for (let w = 1, k = base; /* no condition */; k += base) {
52124
52082
 
52125
- out = output.length + 1;
52126
- bias = adapt(i - oldi, out, oldi == 0);
52083
+ if (index >= inputLength) {
52084
+ error('invalid-input');
52085
+ }
52127
52086
 
52128
- // `i` was supposed to wrap around from `out` to `0`,
52129
- // incrementing `n` each time, so we'll fix that now:
52130
- if (floor(i / out) > maxInt - n) {
52131
- error('overflow');
52132
- }
52087
+ const digit = basicToDigit(input.charCodeAt(index++));
52133
52088
 
52134
- n += floor(i / out);
52135
- i %= out;
52089
+ if (digit >= base) {
52090
+ error('invalid-input');
52091
+ }
52092
+ if (digit > floor((maxInt - i) / w)) {
52093
+ error('overflow');
52094
+ }
52136
52095
 
52137
- // Insert `n` at position `i` of the output
52138
- output.splice(i++, 0, n);
52096
+ i += digit * w;
52097
+ const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
52139
52098
 
52140
- }
52099
+ if (digit < t) {
52100
+ break;
52101
+ }
52141
52102
 
52142
- return ucs2encode(output);
52143
- }
52103
+ const baseMinusT = base - t;
52104
+ if (w > floor(maxInt / baseMinusT)) {
52105
+ error('overflow');
52106
+ }
52144
52107
 
52145
- /**
52146
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
52147
- * Punycode string of ASCII-only symbols.
52148
- * @memberOf punycode
52149
- * @param {String} input The string of Unicode symbols.
52150
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
52151
- */
52152
- function encode(input) {
52153
- var n,
52154
- delta,
52155
- handledCPCount,
52156
- basicLength,
52157
- bias,
52158
- j,
52159
- m,
52160
- q,
52161
- k,
52162
- t,
52163
- currentValue,
52164
- output = [],
52165
- /** `inputLength` will hold the number of code points in `input`. */
52166
- inputLength,
52167
- /** Cached calculation results */
52168
- handledCPCountPlusOne,
52169
- baseMinusT,
52170
- qMinusT;
52171
-
52172
- // Convert the input in UCS-2 to Unicode
52173
- input = ucs2decode(input);
52174
-
52175
- // Cache the length
52176
- inputLength = input.length;
52177
-
52178
- // Initialize the state
52179
- n = initialN;
52180
- delta = 0;
52181
- bias = initialBias;
52182
-
52183
- // Handle the basic code points
52184
- for (j = 0; j < inputLength; ++j) {
52185
- currentValue = input[j];
52186
- if (currentValue < 0x80) {
52187
- output.push(stringFromCharCode(currentValue));
52188
- }
52189
- }
52190
-
52191
- handledCPCount = basicLength = output.length;
52192
-
52193
- // `handledCPCount` is the number of code points that have been handled;
52194
- // `basicLength` is the number of basic code points.
52195
-
52196
- // Finish the basic string - if it is not empty - with a delimiter
52197
- if (basicLength) {
52198
- output.push(delimiter);
52199
- }
52200
-
52201
- // Main encoding loop:
52202
- while (handledCPCount < inputLength) {
52203
-
52204
- // All non-basic code points < n have been handled already. Find the next
52205
- // larger one:
52206
- for (m = maxInt, j = 0; j < inputLength; ++j) {
52207
- currentValue = input[j];
52208
- if (currentValue >= n && currentValue < m) {
52209
- m = currentValue;
52210
- }
52211
- }
52108
+ w *= baseMinusT;
52212
52109
 
52213
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
52214
- // but guard against overflow
52215
- handledCPCountPlusOne = handledCPCount + 1;
52216
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
52217
- error('overflow');
52218
- }
52110
+ }
52219
52111
 
52220
- delta += (m - n) * handledCPCountPlusOne;
52221
- n = m;
52112
+ const out = output.length + 1;
52113
+ bias = adapt(i - oldi, out, oldi == 0);
52222
52114
 
52223
- for (j = 0; j < inputLength; ++j) {
52224
- currentValue = input[j];
52115
+ // `i` was supposed to wrap around from `out` to `0`,
52116
+ // incrementing `n` each time, so we'll fix that now:
52117
+ if (floor(i / out) > maxInt - n) {
52118
+ error('overflow');
52119
+ }
52225
52120
 
52226
- if (currentValue < n && ++delta > maxInt) {
52227
- error('overflow');
52228
- }
52121
+ n += floor(i / out);
52122
+ i %= out;
52229
52123
 
52230
- if (currentValue == n) {
52231
- // Represent delta as a generalized variable-length integer
52232
- for (q = delta, k = base; /* no condition */ ; k += base) {
52233
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
52234
- if (q < t) {
52235
- break;
52236
- }
52237
- qMinusT = q - t;
52238
- baseMinusT = base - t;
52239
- output.push(
52240
- stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
52241
- );
52242
- q = floor(qMinusT / baseMinusT);
52243
- }
52124
+ // Insert `n` at position `i` of the output.
52125
+ output.splice(i++, 0, n);
52244
52126
 
52245
- output.push(stringFromCharCode(digitToBasic(q, 0)));
52246
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
52247
- delta = 0;
52248
- ++handledCPCount;
52249
- }
52250
- }
52127
+ }
52251
52128
 
52252
- ++delta;
52253
- ++n;
52129
+ return String.fromCodePoint(...output);
52130
+ };
52254
52131
 
52255
- }
52256
- return output.join('');
52257
- }
52132
+ /**
52133
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
52134
+ * Punycode string of ASCII-only symbols.
52135
+ * @memberOf punycode
52136
+ * @param {String} input The string of Unicode symbols.
52137
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
52138
+ */
52139
+ const encode = function(input) {
52140
+ const output = [];
52141
+
52142
+ // Convert the input in UCS-2 to an array of Unicode code points.
52143
+ input = ucs2decode(input);
52144
+
52145
+ // Cache the length.
52146
+ const inputLength = input.length;
52147
+
52148
+ // Initialize the state.
52149
+ let n = initialN;
52150
+ let delta = 0;
52151
+ let bias = initialBias;
52152
+
52153
+ // Handle the basic code points.
52154
+ for (const currentValue of input) {
52155
+ if (currentValue < 0x80) {
52156
+ output.push(stringFromCharCode(currentValue));
52157
+ }
52158
+ }
52159
+
52160
+ const basicLength = output.length;
52161
+ let handledCPCount = basicLength;
52162
+
52163
+ // `handledCPCount` is the number of code points that have been handled;
52164
+ // `basicLength` is the number of basic code points.
52165
+
52166
+ // Finish the basic string with a delimiter unless it's empty.
52167
+ if (basicLength) {
52168
+ output.push(delimiter);
52169
+ }
52170
+
52171
+ // Main encoding loop:
52172
+ while (handledCPCount < inputLength) {
52173
+
52174
+ // All non-basic code points < n have been handled already. Find the next
52175
+ // larger one:
52176
+ let m = maxInt;
52177
+ for (const currentValue of input) {
52178
+ if (currentValue >= n && currentValue < m) {
52179
+ m = currentValue;
52180
+ }
52181
+ }
52182
+
52183
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
52184
+ // but guard against overflow.
52185
+ const handledCPCountPlusOne = handledCPCount + 1;
52186
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
52187
+ error('overflow');
52188
+ }
52189
+
52190
+ delta += (m - n) * handledCPCountPlusOne;
52191
+ n = m;
52192
+
52193
+ for (const currentValue of input) {
52194
+ if (currentValue < n && ++delta > maxInt) {
52195
+ error('overflow');
52196
+ }
52197
+ if (currentValue === n) {
52198
+ // Represent delta as a generalized variable-length integer.
52199
+ let q = delta;
52200
+ for (let k = base; /* no condition */; k += base) {
52201
+ const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
52202
+ if (q < t) {
52203
+ break;
52204
+ }
52205
+ const qMinusT = q - t;
52206
+ const baseMinusT = base - t;
52207
+ output.push(
52208
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
52209
+ );
52210
+ q = floor(qMinusT / baseMinusT);
52211
+ }
52212
+
52213
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
52214
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
52215
+ delta = 0;
52216
+ ++handledCPCount;
52217
+ }
52218
+ }
52219
+
52220
+ ++delta;
52221
+ ++n;
52222
+
52223
+ }
52224
+ return output.join('');
52225
+ };
52258
52226
 
52259
52227
  /**
52260
52228
  * Converts a Punycode string representing a domain name or an email address
@@ -52267,13 +52235,13 @@ img.ProseMirror-separator {
52267
52235
  * @returns {String} The Unicode representation of the given Punycode
52268
52236
  * string.
52269
52237
  */
52270
- function toUnicode(input) {
52271
- return mapDomain(input, function(string) {
52272
- return regexPunycode.test(string) ?
52273
- decode(string.slice(4).toLowerCase()) :
52274
- string;
52275
- });
52276
- }
52238
+ const toUnicode = function(input) {
52239
+ return mapDomain(input, function(string) {
52240
+ return regexPunycode.test(string)
52241
+ ? decode(string.slice(4).toLowerCase())
52242
+ : string;
52243
+ });
52244
+ };
52277
52245
 
52278
52246
  /**
52279
52247
  * Converts a Unicode string representing a domain name or an email address to
@@ -52286,33 +52254,39 @@ img.ProseMirror-separator {
52286
52254
  * @returns {String} The Punycode representation of the given domain name or
52287
52255
  * email address.
52288
52256
  */
52289
- function toASCII(input) {
52290
- return mapDomain(input, function(string) {
52291
- return regexNonASCII.test(string) ?
52292
- 'xn--' + encode(string) :
52293
- string;
52294
- });
52295
- }
52296
- var version = '1.4.1';
52297
- /**
52298
- * An object of methods to convert from JavaScript's internal character
52299
- * representation (UCS-2) to Unicode code points, and back.
52300
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
52301
- * @memberOf punycode
52302
- * @type Object
52303
- */
52304
-
52305
- var ucs2 = {
52306
- decode: ucs2decode,
52307
- encode: ucs2encode
52257
+ const toASCII = function(input) {
52258
+ return mapDomain(input, function(string) {
52259
+ return regexNonASCII.test(string)
52260
+ ? 'xn--' + encode(string)
52261
+ : string;
52262
+ });
52308
52263
  };
52309
- var punycode = {
52310
- version: version,
52311
- ucs2: ucs2,
52312
- toASCII: toASCII,
52313
- toUnicode: toUnicode,
52314
- encode: encode,
52315
- decode: decode
52264
+
52265
+ /*--------------------------------------------------------------------------*/
52266
+
52267
+ /** Define the public API */
52268
+ const punycode = {
52269
+ /**
52270
+ * A string representing the current Punycode.js version number.
52271
+ * @memberOf punycode
52272
+ * @type String
52273
+ */
52274
+ 'version': '2.3.1',
52275
+ /**
52276
+ * An object of methods to convert from JavaScript's internal character
52277
+ * representation (UCS-2) to Unicode code points, and back.
52278
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
52279
+ * @memberOf punycode
52280
+ * @type Object
52281
+ */
52282
+ 'ucs2': {
52283
+ 'decode': ucs2decode,
52284
+ 'encode': ucs2encode
52285
+ },
52286
+ 'decode': decode,
52287
+ 'encode': encode,
52288
+ 'toASCII': toASCII,
52289
+ 'toUnicode': toUnicode
52316
52290
  };
52317
52291
 
52318
52292
  // markdown-it default options
@@ -59435,6 +59409,37 @@ img.ProseMirror-separator {
59435
59409
  align-items: center;
59436
59410
  padding: ${smallPadding} ${mediumPadding};
59437
59411
  }
59412
+
59413
+ .loading-container {
59414
+ padding-left: ${mediumPadding};
59415
+ padding-right: ${mediumPadding};
59416
+ display: flex;
59417
+ height: ${controlHeight};
59418
+ flex: 1 0 auto;
59419
+ }
59420
+
59421
+ .loading-container.above {
59422
+ align-items: end;
59423
+ padding-bottom: ${smallPadding};
59424
+ }
59425
+
59426
+ .loading-container.below {
59427
+ align-items: normal;
59428
+ padding-top: ${smallPadding};
59429
+ }
59430
+
59431
+ .loading-container.empty {
59432
+ padding: ${smallPadding} ${mediumPadding};
59433
+ align-items: center;
59434
+ }
59435
+
59436
+ .loading-label {
59437
+ color: ${placeholderFontColor};
59438
+ }
59439
+
59440
+ .loading-spinner {
59441
+ margin-left: auto;
59442
+ }
59438
59443
  `.withBehaviors(appearanceBehavior(DropdownAppearance.block, css `
59439
59444
  :host([error-visible]) .control {
59440
59445
  border-bottom-width: ${borderWidth};
@@ -59442,11 +59447,235 @@ img.ProseMirror-separator {
59442
59447
  }
59443
59448
  `), themeBehavior(Theme.color, css `
59444
59449
  .filter-field,
59445
- .no-results-label {
59450
+ .no-results-label,
59451
+ .loading-container {
59446
59452
  background: ${hexToRgbaCssColor(White, 0.15)};
59447
59453
  }
59448
59454
  `));
59449
59455
 
59456
+ const styles$q = css `
59457
+ ${display$1('inline-grid')}
59458
+
59459
+ :host {
59460
+ height: ${spinnerSmallHeight};
59461
+ aspect-ratio: 1 / 1;
59462
+ }
59463
+
59464
+ div.overlay {
59465
+ z-index: ${ZIndexLevels.zIndex1};
59466
+ margin: max(2px, 6.25%);
59467
+ grid-area: 1/1;
59468
+ }
59469
+
59470
+ div.container {
59471
+ margin: max(2px, 6.25%);
59472
+ grid-area: 1/1;
59473
+ ${
59474
+ /**
59475
+ * At some spinner sizes / browser zoom levels, the spinner bits/squares appear to slightly overlap visually.
59476
+ * If we set a color with transparency on each bit, it'll look wrong in the overlapping region (since the opacity
59477
+ * combines and affects the color at the overlapping spot).
59478
+ * Currently all 3 themes use a color with opacity = 0.6, so that's applied here on the parent element instead,
59479
+ * which avoids that issue.
59480
+ */
59481
+ ''}
59482
+ opacity: 0.6;
59483
+ }
59484
+
59485
+ :host([appearance='accent']) div.container {
59486
+ opacity: 1;
59487
+ }
59488
+
59489
+ div.bit1,
59490
+ div.bit2 {
59491
+ background: var(--ni-private-spinner-bits-background-color);
59492
+ width: 50%;
59493
+ height: 50%;
59494
+ margin: auto;
59495
+ animation-duration: 1600ms;
59496
+ animation-iteration-count: infinite;
59497
+ animation-play-state: var(
59498
+ --ni-private-spinner-animation-play-state,
59499
+ running
59500
+ );
59501
+ animation-timing-function: cubic-bezier(0.65, 0, 0.35, 0);
59502
+ }
59503
+
59504
+ div.bit1 {
59505
+ animation-name: ni-private-spinner-keyframes-1;
59506
+ }
59507
+
59508
+ div.bit2 {
59509
+ animation-name: ni-private-spinner-keyframes-2;
59510
+ }
59511
+
59512
+ @media (prefers-reduced-motion) {
59513
+ div.bit1,
59514
+ div.bit2 {
59515
+ animation-timing-function: ease-in-out, steps(1);
59516
+ animation-duration: 3200ms;
59517
+ }
59518
+
59519
+ div.bit1 {
59520
+ animation-name: ni-private-spinner-no-motion-opacity-keyframes,
59521
+ ni-private-spinner-no-motion-transform-keyframes-1;
59522
+ }
59523
+
59524
+ div.bit2 {
59525
+ animation-name: ni-private-spinner-no-motion-opacity-keyframes,
59526
+ ni-private-spinner-no-motion-transform-keyframes-2;
59527
+ }
59528
+ }
59529
+
59530
+ @keyframes ni-private-spinner-keyframes-1 {
59531
+ 0%,
59532
+ 100% {
59533
+ transform: translate(-50%, 0);
59534
+ }
59535
+
59536
+ 25% {
59537
+ transform: translate(50%, 0);
59538
+ }
59539
+
59540
+ 50% {
59541
+ transform: translate(50%, 100%);
59542
+ }
59543
+
59544
+ 75% {
59545
+ transform: translate(-50%, 100%);
59546
+ }
59547
+ }
59548
+
59549
+ @keyframes ni-private-spinner-keyframes-2 {
59550
+ 0%,
59551
+ 100% {
59552
+ transform: translate(50%, 0);
59553
+ }
59554
+
59555
+ 25% {
59556
+ transform: translate(-50%, 0);
59557
+ }
59558
+
59559
+ 50% {
59560
+ transform: translate(-50%, -100%);
59561
+ }
59562
+
59563
+ 75% {
59564
+ transform: translate(50%, -100%);
59565
+ }
59566
+ }
59567
+
59568
+ @keyframes ni-private-spinner-no-motion-opacity-keyframes {
59569
+ 0%,
59570
+ 50%,
59571
+ 100% {
59572
+ opacity: 0;
59573
+ }
59574
+
59575
+ 25%,
59576
+ 75% {
59577
+ opacity: 1;
59578
+ }
59579
+ }
59580
+
59581
+ @keyframes ni-private-spinner-no-motion-transform-keyframes-1 {
59582
+ 0%,
59583
+ 100% {
59584
+ transform: translate(-50%, 0);
59585
+ }
59586
+ 50% {
59587
+ transform: translate(50%, 0);
59588
+ }
59589
+ }
59590
+
59591
+ @keyframes ni-private-spinner-no-motion-transform-keyframes-2 {
59592
+ 0%,
59593
+ 100% {
59594
+ transform: translate(50%, 0);
59595
+ }
59596
+
59597
+ 50% {
59598
+ transform: translate(-50%, 0);
59599
+ }
59600
+ }
59601
+ `.withBehaviors(themeBehavior(Theme.light, css `
59602
+ :host {
59603
+ --ni-private-spinner-bits-background-color: ${Black91};
59604
+ }
59605
+ :host([appearance='accent']) {
59606
+ --ni-private-spinner-bits-background-color: ${DigitalGreenLight};
59607
+ }
59608
+ `), themeBehavior(Theme.dark, css `
59609
+ :host {
59610
+ --ni-private-spinner-bits-background-color: ${Black15};
59611
+ }
59612
+ :host([appearance='accent']) {
59613
+ --ni-private-spinner-bits-background-color: ${PowerGreen};
59614
+ }
59615
+ `), themeBehavior(Theme.color, css `
59616
+ :host {
59617
+ --ni-private-spinner-bits-background-color: ${White};
59618
+ }
59619
+ :host([appearance='accent']) {
59620
+ --ni-private-spinner-bits-background-color: ${PowerGreen};
59621
+ }
59622
+ `));
59623
+
59624
+ /* eslint-disable @typescript-eslint/indent */
59625
+ // prettier-ignore
59626
+ const template$m = html `
59627
+ <template role="progressbar">
59628
+ ${''
59629
+ /**
59630
+ * In Firefox, the 'title' set on the spinner is very finicky when
59631
+ * the spinner is animating. Therefore, put a transparent overlay on
59632
+ * top of the spinning bits so that the title displays as expected.
59633
+ */
59634
+ }
59635
+ <div class="overlay"></div>
59636
+
59637
+ <div class="container">
59638
+ <div class="bit1"></div>
59639
+ <div class="bit2"></div>
59640
+ </div>
59641
+ </template>
59642
+ `;
59643
+
59644
+ /**
59645
+ * Types of spinner appearance.
59646
+ * @public
59647
+ */
59648
+ const SpinnerAppearance = {
59649
+ default: undefined,
59650
+ accent: 'accent'
59651
+ };
59652
+
59653
+ /**
59654
+ * A Nimble-styled spinner component.
59655
+ * A spinner is an animating indicator that can be placed in a particular region of a page to represent loading progress, or an ongoing operation, of an indeterminate / unknown duration.
59656
+ */
59657
+ class Spinner extends FoundationElement {
59658
+ constructor() {
59659
+ super(...arguments);
59660
+ /**
59661
+ * @public
59662
+ * @description
59663
+ * The appearance the spinner area should have.
59664
+ */
59665
+ this.appearance = SpinnerAppearance.default;
59666
+ }
59667
+ }
59668
+ __decorate$1([
59669
+ attr
59670
+ ], Spinner.prototype, "appearance", void 0);
59671
+ const nimbleSpinner = Spinner.compose({
59672
+ baseName: 'spinner',
59673
+ template: template$m,
59674
+ styles: styles$q
59675
+ });
59676
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
59677
+ const spinnerTag = 'nimble-spinner';
59678
+
59450
59679
  const isListOption = (el) => {
59451
59680
  return el instanceof ListOption;
59452
59681
  };
@@ -59455,7 +59684,7 @@ img.ProseMirror-separator {
59455
59684
  };
59456
59685
  /* eslint-disable @typescript-eslint/indent */
59457
59686
  // prettier-ignore
59458
- const template$m = (context, definition) => html `
59687
+ const template$l = (context, definition) => html `
59459
59688
  <template
59460
59689
  class="${x => [
59461
59690
  x.collapsible && 'collapsible',
@@ -59545,7 +59774,7 @@ img.ProseMirror-separator {
59545
59774
  aria-controls="${x => x.ariaControls}"
59546
59775
  aria-activedescendant="${x => x.ariaActiveDescendant}"
59547
59776
  @input="${(x, c) => x.inputHandler(c.event)}"
59548
- @click="${(x, c) => x.inputClickHandler(c.event)}"
59777
+ @click="${(x, c) => x.ignoreClickHandler(c.event)}"
59549
59778
  placeholder="${x => filterSearchLabel.getValueFor(x)}"
59550
59779
  value="${x => x.filter}"
59551
59780
  />
@@ -59562,11 +59791,20 @@ img.ProseMirror-separator {
59562
59791
  })}
59563
59792
  ></slot>
59564
59793
  </div>
59565
- ${when(x => (x.filterMode !== FilterMode.none && x.filteredOptions.length === 0), html `
59794
+ ${when(x => (x.filterMode !== FilterMode.none && x.filteredOptions.length === 0 && !x.loadingVisible), html `
59566
59795
  <span class="no-results-label ${x => x.positionAttribute}">
59567
59796
  ${x => filterNoResultsLabel.getValueFor(x)}
59568
59797
  </span>
59569
59798
  `)}
59799
+ ${when(x => x.loadingVisible, html `
59800
+ <div class="loading-container ${x => x.positionAttribute} ${x => (x.filteredOptions.length === 0 ? 'empty' : '')}"
59801
+ @click="${(x, c) => x.ignoreClickHandler(c.event)}">
59802
+ <span class="loading-label">
59803
+ ${x => loadingLabel.getValueFor(x)}
59804
+ </span>
59805
+ <${spinnerTag} class="loading-spinner" appearance="accent"></${spinnerTag}>
59806
+ </div>
59807
+ `)}
59570
59808
  </div>
59571
59809
  </div>
59572
59810
  </${anchoredRegionTag}>
@@ -59610,6 +59848,7 @@ img.ProseMirror-separator {
59610
59848
  this.errorVisible = false;
59611
59849
  this.filterMode = FilterMode.none;
59612
59850
  this.clearable = false;
59851
+ this.loadingVisible = false;
59613
59852
  /**
59614
59853
  * @internal
59615
59854
  */
@@ -59869,8 +60108,8 @@ img.ProseMirror-separator {
59869
60108
  /**
59870
60109
  * @internal
59871
60110
  */
59872
- inputClickHandler(e) {
59873
- e.stopPropagation(); // clicking in filter input shouldn't close dropdown
60111
+ ignoreClickHandler(e) {
60112
+ e.stopPropagation();
59874
60113
  }
59875
60114
  /**
59876
60115
  * @internal
@@ -59903,19 +60142,24 @@ img.ProseMirror-separator {
59903
60142
  */
59904
60143
  inputHandler(e) {
59905
60144
  this.filter = this.filterInput?.value ?? '';
59906
- this.filterOptions();
59907
- const enabledOptions = this.filteredOptions.filter(o => !o.disabled);
59908
- let activeOptionIndex = this.filter !== ''
59909
- ? this.openActiveIndex ?? this.selectedIndex
59910
- : this.selectedIndex;
59911
- if (enabledOptions.length > 0
59912
- && !enabledOptions.find(o => o === this.options[activeOptionIndex])) {
59913
- activeOptionIndex = this.options.indexOf(enabledOptions[0]);
60145
+ if (this.filterMode === FilterMode.standard) {
60146
+ this.filterOptions();
60147
+ const enabledOptions = this.filteredOptions.filter(o => !o.disabled);
60148
+ let activeOptionIndex = this.filter !== ''
60149
+ ? this.openActiveIndex ?? this.selectedIndex
60150
+ : this.selectedIndex;
60151
+ if (enabledOptions.length > 0
60152
+ && !enabledOptions.find(o => o === this.options[activeOptionIndex])) {
60153
+ activeOptionIndex = this.options.indexOf(enabledOptions[0]);
60154
+ }
60155
+ else if (enabledOptions.length === 0) {
60156
+ activeOptionIndex = -1;
60157
+ }
60158
+ this.setActiveOption(activeOptionIndex);
59914
60159
  }
59915
- else if (enabledOptions.length === 0) {
59916
- activeOptionIndex = -1;
60160
+ if (this.filterMode !== FilterMode.none) {
60161
+ this.emitFilterInputEvent();
59917
60162
  }
59918
- this.setActiveOption(activeOptionIndex);
59919
60163
  if (e.inputType.includes('deleteContent') || !this.filter.length) {
59920
60164
  return true;
59921
60165
  }
@@ -60188,6 +60432,9 @@ img.ProseMirror-separator {
60188
60432
  if (this.filterInput) {
60189
60433
  this.filterInput.value = '';
60190
60434
  }
60435
+ if (this.filterMode !== FilterMode.none) {
60436
+ this.emitFilterInputEvent();
60437
+ }
60191
60438
  this.ariaControls = '';
60192
60439
  this.ariaExpanded = 'false';
60193
60440
  }
@@ -60386,7 +60633,9 @@ img.ProseMirror-separator {
60386
60633
  if (option.hidden) {
60387
60634
  return true;
60388
60635
  }
60389
- return !this.filterMatchesText(option.text);
60636
+ return this.filterMode === FilterMode.standard
60637
+ ? !this.filterMatchesText(option.text)
60638
+ : false;
60390
60639
  }
60391
60640
  filterMatchesText(text) {
60392
60641
  const filter = this.filter.toLowerCase();
@@ -60485,6 +60734,12 @@ img.ProseMirror-separator {
60485
60734
  filterChanged() {
60486
60735
  this.filterOptions();
60487
60736
  }
60737
+ emitFilterInputEvent() {
60738
+ const eventDetail = {
60739
+ filterText: this.filter
60740
+ };
60741
+ this.$emit('filter-input', eventDetail, { bubbles: true });
60742
+ }
60488
60743
  maxHeightChanged() {
60489
60744
  this.updateListboxMaxHeightCssVariable();
60490
60745
  }
@@ -60519,6 +60774,9 @@ img.ProseMirror-separator {
60519
60774
  __decorate$1([
60520
60775
  attr({ attribute: 'clearable', mode: 'boolean' })
60521
60776
  ], Select.prototype, "clearable", void 0);
60777
+ __decorate$1([
60778
+ attr({ attribute: 'loading-visible', mode: 'boolean' })
60779
+ ], Select.prototype, "loadingVisible", void 0);
60522
60780
  __decorate$1([
60523
60781
  observable
60524
60782
  ], Select.prototype, "displayPlaceholder", void 0);
@@ -60561,7 +60819,7 @@ img.ProseMirror-separator {
60561
60819
  const nimbleSelect = Select.compose({
60562
60820
  baseName: 'select',
60563
60821
  baseClass: Select$2,
60564
- template: template$m,
60822
+ template: template$l,
60565
60823
  styles: styles$r,
60566
60824
  indicator: arrowExpanderDown16X16.data,
60567
60825
  end: html `
@@ -60575,229 +60833,6 @@ img.ProseMirror-separator {
60575
60833
  applyMixins(Select, StartEnd, DelegatesARIASelect);
60576
60834
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
60577
60835
 
60578
- const styles$q = css `
60579
- ${display$1('inline-grid')}
60580
-
60581
- :host {
60582
- height: ${spinnerSmallHeight};
60583
- aspect-ratio: 1 / 1;
60584
- }
60585
-
60586
- div.overlay {
60587
- z-index: ${ZIndexLevels.zIndex1};
60588
- margin: max(2px, 6.25%);
60589
- grid-area: 1/1;
60590
- }
60591
-
60592
- div.container {
60593
- margin: max(2px, 6.25%);
60594
- grid-area: 1/1;
60595
- ${
60596
- /**
60597
- * At some spinner sizes / browser zoom levels, the spinner bits/squares appear to slightly overlap visually.
60598
- * If we set a color with transparency on each bit, it'll look wrong in the overlapping region (since the opacity
60599
- * combines and affects the color at the overlapping spot).
60600
- * Currently all 3 themes use a color with opacity = 0.6, so that's applied here on the parent element instead,
60601
- * which avoids that issue.
60602
- */
60603
- ''}
60604
- opacity: 0.6;
60605
- }
60606
-
60607
- :host([appearance='accent']) div.container {
60608
- opacity: 1;
60609
- }
60610
-
60611
- div.bit1,
60612
- div.bit2 {
60613
- background: var(--ni-private-spinner-bits-background-color);
60614
- width: 50%;
60615
- height: 50%;
60616
- margin: auto;
60617
- animation-duration: 1600ms;
60618
- animation-iteration-count: infinite;
60619
- animation-play-state: var(
60620
- --ni-private-spinner-animation-play-state,
60621
- running
60622
- );
60623
- animation-timing-function: cubic-bezier(0.65, 0, 0.35, 0);
60624
- }
60625
-
60626
- div.bit1 {
60627
- animation-name: ni-private-spinner-keyframes-1;
60628
- }
60629
-
60630
- div.bit2 {
60631
- animation-name: ni-private-spinner-keyframes-2;
60632
- }
60633
-
60634
- @media (prefers-reduced-motion) {
60635
- div.bit1,
60636
- div.bit2 {
60637
- animation-timing-function: ease-in-out, steps(1);
60638
- animation-duration: 3200ms;
60639
- }
60640
-
60641
- div.bit1 {
60642
- animation-name: ni-private-spinner-no-motion-opacity-keyframes,
60643
- ni-private-spinner-no-motion-transform-keyframes-1;
60644
- }
60645
-
60646
- div.bit2 {
60647
- animation-name: ni-private-spinner-no-motion-opacity-keyframes,
60648
- ni-private-spinner-no-motion-transform-keyframes-2;
60649
- }
60650
- }
60651
-
60652
- @keyframes ni-private-spinner-keyframes-1 {
60653
- 0%,
60654
- 100% {
60655
- transform: translate(-50%, 0);
60656
- }
60657
-
60658
- 25% {
60659
- transform: translate(50%, 0);
60660
- }
60661
-
60662
- 50% {
60663
- transform: translate(50%, 100%);
60664
- }
60665
-
60666
- 75% {
60667
- transform: translate(-50%, 100%);
60668
- }
60669
- }
60670
-
60671
- @keyframes ni-private-spinner-keyframes-2 {
60672
- 0%,
60673
- 100% {
60674
- transform: translate(50%, 0);
60675
- }
60676
-
60677
- 25% {
60678
- transform: translate(-50%, 0);
60679
- }
60680
-
60681
- 50% {
60682
- transform: translate(-50%, -100%);
60683
- }
60684
-
60685
- 75% {
60686
- transform: translate(50%, -100%);
60687
- }
60688
- }
60689
-
60690
- @keyframes ni-private-spinner-no-motion-opacity-keyframes {
60691
- 0%,
60692
- 50%,
60693
- 100% {
60694
- opacity: 0;
60695
- }
60696
-
60697
- 25%,
60698
- 75% {
60699
- opacity: 1;
60700
- }
60701
- }
60702
-
60703
- @keyframes ni-private-spinner-no-motion-transform-keyframes-1 {
60704
- 0%,
60705
- 100% {
60706
- transform: translate(-50%, 0);
60707
- }
60708
- 50% {
60709
- transform: translate(50%, 0);
60710
- }
60711
- }
60712
-
60713
- @keyframes ni-private-spinner-no-motion-transform-keyframes-2 {
60714
- 0%,
60715
- 100% {
60716
- transform: translate(50%, 0);
60717
- }
60718
-
60719
- 50% {
60720
- transform: translate(-50%, 0);
60721
- }
60722
- }
60723
- `.withBehaviors(themeBehavior(Theme.light, css `
60724
- :host {
60725
- --ni-private-spinner-bits-background-color: ${Black91};
60726
- }
60727
- :host([appearance='accent']) {
60728
- --ni-private-spinner-bits-background-color: ${DigitalGreenLight};
60729
- }
60730
- `), themeBehavior(Theme.dark, css `
60731
- :host {
60732
- --ni-private-spinner-bits-background-color: ${Black15};
60733
- }
60734
- :host([appearance='accent']) {
60735
- --ni-private-spinner-bits-background-color: ${PowerGreen};
60736
- }
60737
- `), themeBehavior(Theme.color, css `
60738
- :host {
60739
- --ni-private-spinner-bits-background-color: ${White};
60740
- }
60741
- :host([appearance='accent']) {
60742
- --ni-private-spinner-bits-background-color: ${PowerGreen};
60743
- }
60744
- `));
60745
-
60746
- /* eslint-disable @typescript-eslint/indent */
60747
- // prettier-ignore
60748
- const template$l = html `
60749
- <template role="progressbar">
60750
- ${''
60751
- /**
60752
- * In Firefox, the 'title' set on the spinner is very finicky when
60753
- * the spinner is animating. Therefore, put a transparent overlay on
60754
- * top of the spinning bits so that the title displays as expected.
60755
- */
60756
- }
60757
- <div class="overlay"></div>
60758
-
60759
- <div class="container">
60760
- <div class="bit1"></div>
60761
- <div class="bit2"></div>
60762
- </div>
60763
- </template>
60764
- `;
60765
-
60766
- /**
60767
- * Types of spinner appearance.
60768
- * @public
60769
- */
60770
- const SpinnerAppearance = {
60771
- default: undefined,
60772
- accent: 'accent'
60773
- };
60774
-
60775
- /**
60776
- * A Nimble-styled spinner component.
60777
- * A spinner is an animating indicator that can be placed in a particular region of a page to represent loading progress, or an ongoing operation, of an indeterminate / unknown duration.
60778
- */
60779
- class Spinner extends FoundationElement {
60780
- constructor() {
60781
- super(...arguments);
60782
- /**
60783
- * @public
60784
- * @description
60785
- * The appearance the spinner area should have.
60786
- */
60787
- this.appearance = SpinnerAppearance.default;
60788
- }
60789
- }
60790
- __decorate$1([
60791
- attr
60792
- ], Spinner.prototype, "appearance", void 0);
60793
- const nimbleSpinner = Spinner.compose({
60794
- baseName: 'spinner',
60795
- template: template$l,
60796
- styles: styles$q
60797
- });
60798
- DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
60799
- const spinnerTag = 'nimble-spinner';
60800
-
60801
60836
  const styles$p = css `
60802
60837
  ${display$1('inline-flex')}
60803
60838