@limetech/lime-elements 37.12.0 → 37.12.2

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/dom-ee8ee17d.js +244 -0
  3. package/dist/cjs/dom-ee8ee17d.js.map +1 -0
  4. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-chip_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/limel-input-field_3.cjs.entry.js +4 -210
  7. package/dist/cjs/limel-input-field_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/limel-picker.cjs.entry.js +23 -237
  9. package/dist/cjs/limel-picker.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/chip/chip.css +1 -1
  11. package/dist/collection/components/picker/picker.js +18 -21
  12. package/dist/collection/components/picker/picker.js.map +1 -1
  13. package/dist/esm/dom-ae531ebc.js +241 -0
  14. package/dist/esm/dom-ae531ebc.js.map +1 -0
  15. package/dist/esm/limel-chip_2.entry.js +1 -1
  16. package/dist/esm/limel-chip_2.entry.js.map +1 -1
  17. package/dist/esm/limel-input-field_3.entry.js +3 -209
  18. package/dist/esm/limel-input-field_3.entry.js.map +1 -1
  19. package/dist/esm/limel-picker.entry.js +23 -237
  20. package/dist/esm/limel-picker.entry.js.map +1 -1
  21. package/dist/lime-elements/lime-elements.esm.js +1 -1
  22. package/dist/lime-elements/p-714d6937.js +2 -0
  23. package/dist/lime-elements/p-714d6937.js.map +1 -0
  24. package/dist/lime-elements/p-92cee10d.entry.js +2 -0
  25. package/dist/lime-elements/p-92cee10d.entry.js.map +1 -0
  26. package/dist/lime-elements/p-9468b1b8.entry.js +2 -0
  27. package/dist/lime-elements/p-9468b1b8.entry.js.map +1 -0
  28. package/dist/lime-elements/p-c1f32a5b.entry.js +2 -0
  29. package/dist/lime-elements/p-c1f32a5b.entry.js.map +1 -0
  30. package/dist/types/components/picker/picker.d.ts +1 -1
  31. package/package.json +4 -5
  32. package/dist/cjs/dom-81eaa633.js +0 -34
  33. package/dist/cjs/dom-81eaa633.js.map +0 -1
  34. package/dist/esm/dom-0b0170a0.js +0 -32
  35. package/dist/esm/dom-0b0170a0.js.map +0 -1
  36. package/dist/lime-elements/p-042e5620.entry.js +0 -16
  37. package/dist/lime-elements/p-042e5620.entry.js.map +0 -1
  38. package/dist/lime-elements/p-4015e8e9.entry.js +0 -2
  39. package/dist/lime-elements/p-4015e8e9.entry.js.map +0 -1
  40. package/dist/lime-elements/p-5e7b7b03.js +0 -2
  41. package/dist/lime-elements/p-5e7b7b03.js.map +0 -1
  42. package/dist/lime-elements/p-6b4e5f5b.entry.js +0 -2
  43. package/dist/lime-elements/p-6b4e5f5b.entry.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [37.12.2](https://github.com/Lundalogik/lime-elements/compare/v37.12.1...v37.12.2) (2024-03-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **picker:** change search debounce time to 300 ms ([83f1f96](https://github.com/Lundalogik/lime-elements/commit/83f1f96d89e77a6bcf950debce687d44880e49e1))
8
+ * **picker:** improve debounced search behaviour ([a77051a](https://github.com/Lundalogik/lime-elements/commit/a77051adc8c70ec28ead5dae62c160f6603fe13f))
9
+
10
+ ## [37.12.1](https://github.com/Lundalogik/lime-elements/compare/v37.12.0...v37.12.1) (2024-03-20)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+
16
+ * **chip:** increase max-width of a chip ([c9fd4b5](https://github.com/Lundalogik/lime-elements/commit/c9fd4b5ef699e9eeec726b87f6ec9d5141daa1d2))
17
+
1
18
  ## [37.12.0](https://github.com/Lundalogik/lime-elements/compare/v37.11.5...v37.12.0) (2024-03-19)
2
19
 
3
20
 
@@ -0,0 +1,244 @@
1
+ 'use strict';
2
+
3
+ const isObject = require('./isObject-e28b7997.js');
4
+ const toNumber = require('./toNumber-062ea29c.js');
5
+
6
+ /**
7
+ * Gets the timestamp of the number of milliseconds that have elapsed since
8
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
9
+ *
10
+ * @static
11
+ * @memberOf _
12
+ * @since 2.4.0
13
+ * @category Date
14
+ * @returns {number} Returns the timestamp.
15
+ * @example
16
+ *
17
+ * _.defer(function(stamp) {
18
+ * console.log(_.now() - stamp);
19
+ * }, _.now());
20
+ * // => Logs the number of milliseconds it took for the deferred invocation.
21
+ */
22
+ var now = function() {
23
+ return isObject.root.Date.now();
24
+ };
25
+
26
+ /** Error message constants. */
27
+ var FUNC_ERROR_TEXT = 'Expected a function';
28
+
29
+ /* Built-in method references for those with the same name as other `lodash` methods. */
30
+ var nativeMax = Math.max,
31
+ nativeMin = Math.min;
32
+
33
+ /**
34
+ * Creates a debounced function that delays invoking `func` until after `wait`
35
+ * milliseconds have elapsed since the last time the debounced function was
36
+ * invoked. The debounced function comes with a `cancel` method to cancel
37
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
38
+ * Provide `options` to indicate whether `func` should be invoked on the
39
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
40
+ * with the last arguments provided to the debounced function. Subsequent
41
+ * calls to the debounced function return the result of the last `func`
42
+ * invocation.
43
+ *
44
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
45
+ * invoked on the trailing edge of the timeout only if the debounced function
46
+ * is invoked more than once during the `wait` timeout.
47
+ *
48
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
49
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
50
+ *
51
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
52
+ * for details over the differences between `_.debounce` and `_.throttle`.
53
+ *
54
+ * @static
55
+ * @memberOf _
56
+ * @since 0.1.0
57
+ * @category Function
58
+ * @param {Function} func The function to debounce.
59
+ * @param {number} [wait=0] The number of milliseconds to delay.
60
+ * @param {Object} [options={}] The options object.
61
+ * @param {boolean} [options.leading=false]
62
+ * Specify invoking on the leading edge of the timeout.
63
+ * @param {number} [options.maxWait]
64
+ * The maximum time `func` is allowed to be delayed before it's invoked.
65
+ * @param {boolean} [options.trailing=true]
66
+ * Specify invoking on the trailing edge of the timeout.
67
+ * @returns {Function} Returns the new debounced function.
68
+ * @example
69
+ *
70
+ * // Avoid costly calculations while the window size is in flux.
71
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
72
+ *
73
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
74
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
75
+ * 'leading': true,
76
+ * 'trailing': false
77
+ * }));
78
+ *
79
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
80
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
81
+ * var source = new EventSource('/stream');
82
+ * jQuery(source).on('message', debounced);
83
+ *
84
+ * // Cancel the trailing debounced invocation.
85
+ * jQuery(window).on('popstate', debounced.cancel);
86
+ */
87
+ function debounce(func, wait, options) {
88
+ var lastArgs,
89
+ lastThis,
90
+ maxWait,
91
+ result,
92
+ timerId,
93
+ lastCallTime,
94
+ lastInvokeTime = 0,
95
+ leading = false,
96
+ maxing = false,
97
+ trailing = true;
98
+
99
+ if (typeof func != 'function') {
100
+ throw new TypeError(FUNC_ERROR_TEXT);
101
+ }
102
+ wait = toNumber.toNumber(wait) || 0;
103
+ if (isObject.isObject(options)) {
104
+ leading = !!options.leading;
105
+ maxing = 'maxWait' in options;
106
+ maxWait = maxing ? nativeMax(toNumber.toNumber(options.maxWait) || 0, wait) : maxWait;
107
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
108
+ }
109
+
110
+ function invokeFunc(time) {
111
+ var args = lastArgs,
112
+ thisArg = lastThis;
113
+
114
+ lastArgs = lastThis = undefined;
115
+ lastInvokeTime = time;
116
+ result = func.apply(thisArg, args);
117
+ return result;
118
+ }
119
+
120
+ function leadingEdge(time) {
121
+ // Reset any `maxWait` timer.
122
+ lastInvokeTime = time;
123
+ // Start the timer for the trailing edge.
124
+ timerId = setTimeout(timerExpired, wait);
125
+ // Invoke the leading edge.
126
+ return leading ? invokeFunc(time) : result;
127
+ }
128
+
129
+ function remainingWait(time) {
130
+ var timeSinceLastCall = time - lastCallTime,
131
+ timeSinceLastInvoke = time - lastInvokeTime,
132
+ timeWaiting = wait - timeSinceLastCall;
133
+
134
+ return maxing
135
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
136
+ : timeWaiting;
137
+ }
138
+
139
+ function shouldInvoke(time) {
140
+ var timeSinceLastCall = time - lastCallTime,
141
+ timeSinceLastInvoke = time - lastInvokeTime;
142
+
143
+ // Either this is the first call, activity has stopped and we're at the
144
+ // trailing edge, the system time has gone backwards and we're treating
145
+ // it as the trailing edge, or we've hit the `maxWait` limit.
146
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
147
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
148
+ }
149
+
150
+ function timerExpired() {
151
+ var time = now();
152
+ if (shouldInvoke(time)) {
153
+ return trailingEdge(time);
154
+ }
155
+ // Restart the timer.
156
+ timerId = setTimeout(timerExpired, remainingWait(time));
157
+ }
158
+
159
+ function trailingEdge(time) {
160
+ timerId = undefined;
161
+
162
+ // Only invoke if we have `lastArgs` which means `func` has been
163
+ // debounced at least once.
164
+ if (trailing && lastArgs) {
165
+ return invokeFunc(time);
166
+ }
167
+ lastArgs = lastThis = undefined;
168
+ return result;
169
+ }
170
+
171
+ function cancel() {
172
+ if (timerId !== undefined) {
173
+ clearTimeout(timerId);
174
+ }
175
+ lastInvokeTime = 0;
176
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
177
+ }
178
+
179
+ function flush() {
180
+ return timerId === undefined ? result : trailingEdge(now());
181
+ }
182
+
183
+ function debounced() {
184
+ var time = now(),
185
+ isInvoking = shouldInvoke(time);
186
+
187
+ lastArgs = arguments;
188
+ lastThis = this;
189
+ lastCallTime = time;
190
+
191
+ if (isInvoking) {
192
+ if (timerId === undefined) {
193
+ return leadingEdge(lastCallTime);
194
+ }
195
+ if (maxing) {
196
+ // Handle invocations in a tight loop.
197
+ clearTimeout(timerId);
198
+ timerId = setTimeout(timerExpired, wait);
199
+ return invokeFunc(lastCallTime);
200
+ }
201
+ }
202
+ if (timerId === undefined) {
203
+ timerId = setTimeout(timerExpired, wait);
204
+ }
205
+ return result;
206
+ }
207
+ debounced.cancel = cancel;
208
+ debounced.flush = flush;
209
+ return debounced;
210
+ }
211
+
212
+ /**
213
+ * Check if an element is a descendant of another, even if it is located within a shadow root
214
+ *
215
+ * @param element - The element to check
216
+ * @param parent - The parent element
217
+ * @returns True if the element is a descendant of the parent element, false otherwise
218
+ */
219
+ function isDescendant(element, parent) {
220
+ if (!parent) {
221
+ return false;
222
+ }
223
+ if (parent.contains(element)) {
224
+ return true;
225
+ }
226
+ let currentNode = element;
227
+ let i = 0; // Just in case something weird happens, let's not crash the browser…
228
+ const DEPTH = 1000; // Max depth to search.
229
+ while (i < DEPTH &&
230
+ currentNode &&
231
+ currentNode.getRootNode().nodeName === '#document-fragment') {
232
+ currentNode = currentNode.getRootNode().host;
233
+ if (parent.contains(currentNode)) {
234
+ return true;
235
+ }
236
+ i += 1;
237
+ }
238
+ return parent.contains(currentNode);
239
+ }
240
+
241
+ exports.debounce = debounce;
242
+ exports.isDescendant = isDescendant;
243
+
244
+ //# sourceMappingURL=dom-ee8ee17d.js.map
@@ -0,0 +1 @@
1
+ {"file":"dom-ee8ee17d.js","mappings":";;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,GAAG,WAAW;AACrB,EAAE,OAAOA,aAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC;;AChBD;AACA,IAAI,eAAe,GAAG,qBAAqB,CAAC;AAC5C;AACA;AACA,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG;AACxB,IAAI,SAAS,GAAG,IAAI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AQ,CAAC,WAAW,CAAC,CAAC;AACxC;;;;;","names":["root","toNumber","isObject"],"sources":["./node_modules/lodash-es/now.js","./node_modules/lodash-es/debounce.js","./src/util/dom.ts"],"sourcesContent":["import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","/**\n * Check if an element is a descendant of another, even if it is located within a shadow root\n *\n * @param element - The element to check\n * @param parent - The parent element\n * @returns True if the element is a descendant of the parent element, false otherwise\n */\nexport function isDescendant(element: Node, parent: Node): boolean {\n if (!parent) {\n return false;\n }\n\n if (parent.contains(element)) {\n return true;\n }\n\n let currentNode: Node = element;\n let i = 0; // Just in case something weird happens, let's not crash the browser…\n const DEPTH = 1000; // Max depth to search.\n\n while (\n i < DEPTH &&\n currentNode &&\n currentNode.getRootNode().nodeName === '#document-fragment'\n ) {\n currentNode = (currentNode.getRootNode() as any).host;\n if (parent.contains(currentNode)) {\n return true;\n }\n\n i += 1;\n }\n\n return parent.contains(currentNode);\n}\n"],"version":3}
@@ -22,7 +22,7 @@ require('./isArray-d188a04f.js');
22
22
  require('./isObjectLike-3e3f0cba.js');
23
23
  require('./isArrayLike-ac53bdac.js');
24
24
 
25
- const chipCss = "@charset \"UTF-8\";:host(limel-chip){--limel-chip-height:1.75rem;--limel-chip-gap:0.5rem;isolation:isolate;display:inline-flex;align-items:center;min-width:0}*{box-sizing:border-box}.chip{all:unset;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:var(--chip-max-width, 10rem);height:var(--limel-chip-height);border-radius:var(--limel-chip-height);font-size:0.875rem;padding:0 0.125rem}.chip:has(limel-icon) .text{padding-left:0.25rem}.chip:not([disabled]){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.chip:not([disabled]):focus{outline:none}.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.chip:not([disabled]):hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.chip:not([disabled]):active{background-color:var(--mdc-theme-surface);box-shadow:var(--button-shadow-inset-pressed);transform:translate3d(0, 0.05rem, 0)}.chip:has(limel-badge){padding-right:0.375rem}.chip:has(limel-badge) .text{padding-right:0}.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}.chip:has(+.trailing-button){padding-right:calc(var(--limel-chip-height) + 0.125rem)}.chip:has(+.trailing-button) .text{padding-right:0}:host(limel-chip[disabled]) .chip{color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1);box-shadow:none}:host(limel-chip[readonly]) .chip{box-shadow:0 0 0 1px rgba(var(--contrast-800), 0.5)}:host(limel-chip[selected]) .chip{box-shadow:var(--button-shadow-inset)}:host(limel-chip[selected]) .chip:focus-visible{box-shadow:var(--button-shadow-inset), var(--shadow-depth-8-focused)}:host(limel-chip[selected]) .chip:active{box-shadow:var(--button-shadow-inset-pressed)}:host(limel-chip[selected]) .text{color:var(--mdc-theme-primary)}:host(limel-chip[type=filter]) .chip{border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem}:host(limel-chip[type=filter]) .chip:after{content:\"\";transition:background-color 0.4s ease 0.2s, box-shadow 0.6s ease 0.2s;box-sizing:border-box;position:absolute;bottom:0.125rem;left:0.125rem;width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--contrast-800), 0.8);box-shadow:0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[type=filter][selected]) .chip:after{background-color:rgb(var(--color-green-default));box-shadow:0 0 0.375rem 0 rgb(var(--color-green-light)), 0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[invalid]) .chip{background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limel-chip[invalid]) .text{color:rgb(var(--color-white))}limel-icon{flex-shrink:0;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);padding:0.0625rem}limel-badge{pointer-events:none}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem}.trailing-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;z-index:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--limel-chip-height) * -1 + 0.125rem);margin-right:0.125rem;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);border-radius:50%}.trailing-button:hover{color:rgb(var(--color-red-dark));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.trailing-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}.trailing-button:hover svg{transform:scale(0.8)}.text{transition:padding-left 0.4s ease}limel-linear-progress{position:absolute;z-index:1;margin:auto;left:0.25rem;width:1.25rem;border-radius:1rem;overflow:hidden}:host(limel-chip[loading]) .chip:before{content:\"\";position:absolute;left:0;width:var(--limel-chip-height);height:var(--limel-chip-height);border-radius:50%;scale:0.9;background-color:rgba(var(--contrast-600), 0.8)}:host(limel-chip[loading]) .chip:not(:has(limel-icon)) .text{padding-left:calc(var(--limel-chip-height) + 0.25rem)}div[role=progressbar]{--limel-chip-progressbar-offset:0.1875rem;--limel-chip-progressbar-stripe-color:rgb(var(--contrast-100), 0.3);--limel-chip-progressbar-stripe-size:1.5rem;pointer-events:none;position:absolute;display:flex;align-items:center;justify-content:end;inset:var(--limel-chip-progressbar-offset);max-width:calc(100% - var(--limel-chip-progressbar-offset) * 2);border-radius:inherit;background-color:var(--chip-progress-color, rgb(var(--contrast-700)));width:var(--limel-chip-progress-percentage);opacity:0.8;mix-blend-mode:var(--limel-chip-progress-mix-blend-mode)}div[role=progressbar]:after{content:\"\";transform:translate3d(0, 0, 0);position:absolute;inset:1px;background-image:linear-gradient(-45deg, var(--limel-chip-progressbar-stripe-color) 25%, transparent 25%, transparent 50%, var(--limel-chip-progressbar-stripe-color) 50%, var(--limel-chip-progressbar-stripe-color) 75%, transparent 75%, transparent);z-index:1;background-size:var(--limel-chip-progressbar-stripe-size) var(--limel-chip-progressbar-stripe-size);animation:move 2.5s linear infinite;border-radius:inherit}@media (prefers-reduced-motion){div[role=progressbar]:after{animation:none}}@keyframes move{0%{background-position:0 0}100%{background-position:calc(var(--limel-chip-progressbar-stripe-size) * -1) calc(var(--limel-chip-progressbar-stripe-size) * -1)}}";
25
+ const chipCss = "@charset \"UTF-8\";:host(limel-chip){--limel-chip-height:1.75rem;--limel-chip-gap:0.5rem;isolation:isolate;display:inline-flex;align-items:center;min-width:0}*{box-sizing:border-box}.chip{all:unset;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:min(var(--chip-max-width, 100%), 25rem);height:var(--limel-chip-height);border-radius:var(--limel-chip-height);font-size:0.875rem;padding:0 0.125rem}.chip:has(limel-icon) .text{padding-left:0.25rem}.chip:not([disabled]){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.chip:not([disabled]):focus{outline:none}.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.chip:not([disabled]):hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.chip:not([disabled]):active{background-color:var(--mdc-theme-surface);box-shadow:var(--button-shadow-inset-pressed);transform:translate3d(0, 0.05rem, 0)}.chip:has(limel-badge){padding-right:0.375rem}.chip:has(limel-badge) .text{padding-right:0}.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}.chip:has(+.trailing-button){padding-right:calc(var(--limel-chip-height) + 0.125rem)}.chip:has(+.trailing-button) .text{padding-right:0}:host(limel-chip[disabled]) .chip{color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1);box-shadow:none}:host(limel-chip[readonly]) .chip{box-shadow:0 0 0 1px rgba(var(--contrast-800), 0.5)}:host(limel-chip[selected]) .chip{box-shadow:var(--button-shadow-inset)}:host(limel-chip[selected]) .chip:focus-visible{box-shadow:var(--button-shadow-inset), var(--shadow-depth-8-focused)}:host(limel-chip[selected]) .chip:active{box-shadow:var(--button-shadow-inset-pressed)}:host(limel-chip[selected]) .text{color:var(--mdc-theme-primary)}:host(limel-chip[type=filter]) .chip{border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem}:host(limel-chip[type=filter]) .chip:after{content:\"\";transition:background-color 0.4s ease 0.2s, box-shadow 0.6s ease 0.2s;box-sizing:border-box;position:absolute;bottom:0.125rem;left:0.125rem;width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--contrast-800), 0.8);box-shadow:0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[type=filter][selected]) .chip:after{background-color:rgb(var(--color-green-default));box-shadow:0 0 0.375rem 0 rgb(var(--color-green-light)), 0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[invalid]) .chip{background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limel-chip[invalid]) .text{color:rgb(var(--color-white))}limel-icon{flex-shrink:0;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);padding:0.0625rem}limel-badge{pointer-events:none}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem}.trailing-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;z-index:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--limel-chip-height) * -1 + 0.125rem);margin-right:0.125rem;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);border-radius:50%}.trailing-button:hover{color:rgb(var(--color-red-dark));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.trailing-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}.trailing-button:hover svg{transform:scale(0.8)}.text{transition:padding-left 0.4s ease}limel-linear-progress{position:absolute;z-index:1;margin:auto;left:0.25rem;width:1.25rem;border-radius:1rem;overflow:hidden}:host(limel-chip[loading]) .chip:before{content:\"\";position:absolute;left:0;width:var(--limel-chip-height);height:var(--limel-chip-height);border-radius:50%;scale:0.9;background-color:rgba(var(--contrast-600), 0.8)}:host(limel-chip[loading]) .chip:not(:has(limel-icon)) .text{padding-left:calc(var(--limel-chip-height) + 0.25rem)}div[role=progressbar]{--limel-chip-progressbar-offset:0.1875rem;--limel-chip-progressbar-stripe-color:rgb(var(--contrast-100), 0.3);--limel-chip-progressbar-stripe-size:1.5rem;pointer-events:none;position:absolute;display:flex;align-items:center;justify-content:end;inset:var(--limel-chip-progressbar-offset);max-width:calc(100% - var(--limel-chip-progressbar-offset) * 2);border-radius:inherit;background-color:var(--chip-progress-color, rgb(var(--contrast-700)));width:var(--limel-chip-progress-percentage);opacity:0.8;mix-blend-mode:var(--limel-chip-progress-mix-blend-mode)}div[role=progressbar]:after{content:\"\";transform:translate3d(0, 0, 0);position:absolute;inset:1px;background-image:linear-gradient(-45deg, var(--limel-chip-progressbar-stripe-color) 25%, transparent 25%, transparent 50%, var(--limel-chip-progressbar-stripe-color) 50%, var(--limel-chip-progressbar-stripe-color) 75%, transparent 75%, transparent);z-index:1;background-size:var(--limel-chip-progressbar-stripe-size) var(--limel-chip-progressbar-stripe-size);animation:move 2.5s linear infinite;border-radius:inherit}@media (prefers-reduced-motion){div[role=progressbar]:after{animation:none}}@keyframes move{0%{background-position:0 0}100%{background-position:calc(var(--limel-chip-progressbar-stripe-size) * -1) calc(var(--limel-chip-progressbar-stripe-size) * -1)}}";
26
26
 
27
27
  const Chip = class {
28
28
  constructor(hostRef) {