(proto, key) => {
const options = ctor.getPropertyOptions(propertyName);
const attributeName = typeof options.attribute === "string" ? options.attribute : propertyName;
if (name === attributeName) {
- const converter = options.converter || u$3;
- const fromAttribute = typeof converter === "function" ? converter : (_a = converter == null ? void 0 : converter.fromAttribute) != null ? _a : u$3.fromAttribute;
+ const converter = options.converter || u$2;
+ const fromAttribute = typeof converter === "function" ? converter : (_a = converter == null ? void 0 : converter.fromAttribute) != null ? _a : u$2.fromAttribute;
const newValue = fromAttribute(value, options.type);
if (this[propertyName] !== newValue) {
this[key] = newValue;
@@ -9182,7 +9182,7 @@ function getTextContent(slot) {
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const l=e$4(class extends i$3{constructor(r){if(super(r),r.type!==t.PROPERTY&&r.type!==t.ATTRIBUTE&&r.type!==t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!f$1(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(i,[t$1]){if(t$1===T||t$1===E)return t$1;const o=i.element,l=i.name;if(i.type===t.PROPERTY){if(t$1===o[l])return T}else if(i.type===t.BOOLEAN_ATTRIBUTE){if(!!t$1===o.hasAttribute(l))return T}else if(i.type===t.ATTRIBUTE&&o.getAttribute(l)===t$1+"")return T;return m(i),t$1}});
+ */const l=e$4(class extends i$3{constructor(r){if(super(r),r.type!==t.PROPERTY&&r.type!==t.ATTRIBUTE&&r.type!==t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!r$2(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(i,[t$1]){if(t$1===E||t$1===A)return t$1;const o=i.element,l=i.name;if(i.type===t.PROPERTY){if(t$1===o[l])return E}else if(i.type===t.BOOLEAN_ATTRIBUTE){if(!!t$1===o.hasAttribute(l))return E}else if(i.type===t.ATTRIBUTE&&o.getAttribute(l)===t$1+"")return E;return p(i),t$1}});
var SlTextarea = class extends ShoelaceElement {
constructor() {
@@ -9336,7 +9336,7 @@ var SlTextarea = class extends ShoelaceElement {
const hasHelpTextSlot = this.hasSlotController.test("help-text");
const hasLabel = this.label ? true : !!hasLabelSlot;
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
- return x`
+ return b`
oppositeAlignmentMap[alignment]);
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
}
const lrPlacement = ['left', 'right'];
const rlPlacement = ['right', 'left'];
@@ -9747,7 +9743,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
return list;
}
function getOppositePlacement(placement) {
- return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
+ const side = getSide(placement);
+ return oppositeSideMap[side] + placement.slice(side.length);
}
function expandPaddingObject(padding) {
return {
@@ -9841,6 +9838,74 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
return coords;
}
+/**
+ * Resolves with an object of overflow side offsets that determine how much the
+ * element is overflowing a given clipping boundary on each side.
+ * - positive = overflowing the boundary by that number of pixels
+ * - negative = how many pixels left before it will overflow
+ * - 0 = lies flush with the boundary
+ * @see https://floating-ui.com/docs/detectOverflow
+ */
+async function detectOverflow(state, options) {
+ var _await$platform$isEle;
+ if (options === void 0) {
+ options = {};
+ }
+ const {
+ x,
+ y,
+ platform,
+ rects,
+ elements,
+ strategy
+ } = state;
+ const {
+ boundary = 'clippingAncestors',
+ rootBoundary = 'viewport',
+ elementContext = 'floating',
+ altBoundary = false,
+ padding = 0
+ } = evaluate(options, state);
+ const paddingObject = getPaddingObject(padding);
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
+ const element = elements[altBoundary ? altContext : elementContext];
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
+ boundary,
+ rootBoundary,
+ strategy
+ }));
+ const rect = elementContext === 'floating' ? {
+ x,
+ y,
+ width: rects.floating.width,
+ height: rects.floating.height
+ } : rects.reference;
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
+ x: 1,
+ y: 1
+ } : {
+ x: 1,
+ y: 1
+ };
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
+ elements,
+ rect,
+ offsetParent,
+ strategy
+ }) : rect);
+ return {
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
+ };
+}
+
+// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
+const MAX_RESET_COUNT = 50;
+
/**
* Computes the `x` and `y` coordinates that will place the floating element
* next to a given reference element.
@@ -9855,7 +9920,10 @@ const computePosition$1 = async (reference, floating, config) => {
middleware = [],
platform
} = config;
- const validMiddleware = middleware.filter(Boolean);
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
+ ...platform,
+ detectOverflow
+ };
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
let rects = await platform.getElementRects({
reference,
@@ -9867,13 +9935,17 @@ const computePosition$1 = async (reference, floating, config) => {
y
} = computeCoordsFromPlacement(rects, placement, rtl);
let statefulPlacement = placement;
- let middlewareData = {};
let resetCount = 0;
- for (let i = 0; i < validMiddleware.length; i++) {
+ const middlewareData = {};
+ for (let i = 0; i < middleware.length; i++) {
+ const currentMiddleware = middleware[i];
+ if (!currentMiddleware) {
+ continue;
+ }
const {
name,
fn
- } = validMiddleware[i];
+ } = currentMiddleware;
const {
x: nextX,
y: nextY,
@@ -9887,7 +9959,7 @@ const computePosition$1 = async (reference, floating, config) => {
strategy,
middlewareData,
rects,
- platform,
+ platform: platformWithDetectOverflow,
elements: {
reference,
floating
@@ -9895,14 +9967,11 @@ const computePosition$1 = async (reference, floating, config) => {
});
x = nextX != null ? nextX : x;
y = nextY != null ? nextY : y;
- middlewareData = {
- ...middlewareData,
- [name]: {
- ...middlewareData[name],
- ...data
- }
+ middlewareData[name] = {
+ ...middlewareData[name],
+ ...data
};
- if (reset && resetCount <= 50) {
+ if (reset && resetCount < MAX_RESET_COUNT) {
resetCount++;
if (typeof reset === 'object') {
if (reset.placement) {
@@ -9932,71 +10001,6 @@ const computePosition$1 = async (reference, floating, config) => {
};
};
-/**
- * Resolves with an object of overflow side offsets that determine how much the
- * element is overflowing a given clipping boundary on each side.
- * - positive = overflowing the boundary by that number of pixels
- * - negative = how many pixels left before it will overflow
- * - 0 = lies flush with the boundary
- * @see https://floating-ui.com/docs/detectOverflow
- */
-async function detectOverflow(state, options) {
- var _await$platform$isEle;
- if (options === void 0) {
- options = {};
- }
- const {
- x,
- y,
- platform,
- rects,
- elements,
- strategy
- } = state;
- const {
- boundary = 'clippingAncestors',
- rootBoundary = 'viewport',
- elementContext = 'floating',
- altBoundary = false,
- padding = 0
- } = evaluate(options, state);
- const paddingObject = getPaddingObject(padding);
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
- const element = elements[altBoundary ? altContext : elementContext];
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
- boundary,
- rootBoundary,
- strategy
- }));
- const rect = elementContext === 'floating' ? {
- x,
- y,
- width: rects.floating.width,
- height: rects.floating.height
- } : rects.reference;
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
- x: 1,
- y: 1
- } : {
- x: 1,
- y: 1
- };
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
- elements,
- rect,
- offsetParent,
- strategy
- }) : rect);
- return {
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
- };
-}
-
/**
* Provides data to position an inner element of the floating element so that it
* appears centered to the reference element.
@@ -10129,7 +10133,7 @@ const flip$2 = function (options) {
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
}
const placements = [initialPlacement, ...fallbackPlacements];
- const overflow = await detectOverflow(state, detectOverflowOptions);
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
const overflows = [];
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
if (checkMainAxis) {
@@ -10313,7 +10317,8 @@ const shift$1 = function (options) {
const {
x,
y,
- placement
+ placement,
+ platform
} = state;
const {
mainAxis: checkMainAxis = true,
@@ -10336,7 +10341,7 @@ const shift$1 = function (options) {
x,
y
};
- const overflow = await detectOverflow(state, detectOverflowOptions);
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
const crossAxis = getSideAxis(getSide(placement));
const mainAxis = getOppositeAxis(crossAxis);
let mainAxisCoord = coords[mainAxis];
@@ -10400,7 +10405,7 @@ const size$1 = function (options) {
apply = () => {},
...detectOverflowOptions
} = evaluate(options, state);
- const overflow = await detectOverflow(state, detectOverflowOptions);
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
const side = getSide(placement);
const alignment = getAlignment(placement);
const isYAxis = getSideAxis(placement) === 'y';
@@ -10503,7 +10508,6 @@ function isShadowRoot(value) {
}
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
}
-const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
function isOverflowElement(element) {
const {
overflow,
@@ -10511,32 +10515,35 @@ function isOverflowElement(element) {
overflowY,
display
} = getComputedStyle$1(element);
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
}
-const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
function isTableElement(element) {
- return tableElements.has(getNodeName(element));
+ return /^(table|td|th)$/.test(getNodeName(element));
}
-const topLayerSelectors = [':popover-open', ':modal'];
function isTopLayer(element) {
- return topLayerSelectors.some(selector => {
- try {
- return element.matches(selector);
- } catch (_e) {
- return false;
+ try {
+ if (element.matches(':popover-open')) {
+ return true;
}
- });
+ } catch (_e) {
+ // no-op
+ }
+ try {
+ return element.matches(':modal');
+ } catch (_e) {
+ return false;
+ }
}
-const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
-const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
-const containValues = ['paint', 'layout', 'strict', 'content'];
+const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
+const containRe = /paint|layout|strict|content/;
+const isNotNone = value => !!value && value !== 'none';
+let isWebKitValue;
function isContainingBlock(elementOrCss) {
- const webkit = isWebKit();
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
- return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
}
function getContainingBlock(element) {
let currentNode = getParentNode(element);
@@ -10551,12 +10558,13 @@ function getContainingBlock(element) {
return null;
}
function isWebKit() {
- if (typeof CSS === 'undefined' || !CSS.supports) return false;
- return CSS.supports('-webkit-backdrop-filter', 'none');
+ if (isWebKitValue == null) {
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
+ }
+ return isWebKitValue;
}
-const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
function isLastTraversableNode(node) {
- return lastTraversableNodeNames.has(getNodeName(node));
+ return /^(html|body|#document)$/.test(getNodeName(node));
}
function getComputedStyle$1(element) {
return getWindow(element).getComputedStyle(element);
@@ -10612,8 +10620,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
if (isBody) {
const frameElement = getFrameElement(win);
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
+ } else {
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}
function getFrameElement(win) {
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -10790,7 +10799,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
scroll = getNodeScroll(offsetParent);
}
- if (isHTMLElement(offsetParent)) {
+ if (isOffsetParentAnElement) {
const offsetRect = getBoundingClientRect(offsetParent);
scale = getScale(offsetParent);
offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -10878,7 +10887,6 @@ function getViewportRect(element, strategy) {
};
}
-const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
// Returns the inner client rect, subtracting scrollbars if present.
function getInnerBoundingClientRect(element, strategy) {
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -10943,7 +10951,7 @@ function getClippingElementAncestors(element, cache) {
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
currentContainingBlockComputedStyle = null;
}
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
if (shouldDropCurrentNode) {
// Drop non-containing blocks.
result = result.filter(ancestor => ancestor !== currentNode);
@@ -10968,20 +10976,23 @@ function getClippingRect(_ref) {
} = _ref;
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
- const firstClippingAncestor = clippingAncestors[0];
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
- accRect.top = max(rect.top, accRect.top);
- accRect.right = min(rect.right, accRect.right);
- accRect.bottom = min(rect.bottom, accRect.bottom);
- accRect.left = max(rect.left, accRect.left);
- return accRect;
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
+ let top = firstRect.top;
+ let right = firstRect.right;
+ let bottom = firstRect.bottom;
+ let left = firstRect.left;
+ for (let i = 1; i < clippingAncestors.length; i++) {
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
+ top = max(rect.top, top);
+ right = min(rect.right, right);
+ bottom = min(rect.bottom, bottom);
+ left = max(rect.left, left);
+ }
return {
- width: clippingRect.right - clippingRect.left,
- height: clippingRect.bottom - clippingRect.top,
- x: clippingRect.left,
- y: clippingRect.top
+ width: right - left,
+ height: bottom - top,
+ x: left,
+ y: top
};
}
@@ -11232,7 +11243,7 @@ function autoUpdate(reference, floating, update, options) {
animationFrame = false
} = options;
const referenceEl = unwrapElement(reference);
- const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
ancestors.forEach(ancestor => {
ancestorScroll && ancestor.addEventListener('scroll', update, {
passive: true
@@ -11245,7 +11256,7 @@ function autoUpdate(reference, floating, update, options) {
if (elementResize) {
resizeObserver = new ResizeObserver(_ref => {
let [firstEntry] = _ref;
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
// Prevent update loops when using the `size` middleware.
// https://github.com/floating-ui/floating-ui/issues/1740
resizeObserver.unobserve(floating);
@@ -11260,7 +11271,9 @@ function autoUpdate(reference, floating, update, options) {
if (referenceEl && !animationFrame) {
resizeObserver.observe(referenceEl);
}
- resizeObserver.observe(floating);
+ if (floating) {
+ resizeObserver.observe(floating);
+ }
}
let frameId;
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -11635,7 +11648,7 @@ var SlPopup = class extends ShoelaceElement {
this.emit("sl-reposition");
}
render() {
- return x`
+ return b`
- ${this.arrow ? x`` : ""}
+ ${this.arrow ? b`` : ""}
`;
}
};
SlPopup.styles = [component_styles_default, popup_styles_default];
__decorateClass([
- e$7(".popup")
+ e$6(".popup")
], SlPopup.prototype, "popup", 2);
__decorateClass([
- e$7(".popup__arrow")
+ e$6(".popup__arrow")
], SlPopup.prototype, "arrowEl", 2);
__decorateClass([
n$6()
@@ -11977,7 +11990,7 @@ var SlTooltip = class extends ShoelaceElement {
// element, otherwise positioning is incorrect.
//
render() {
- return x`
+ return b`
- ${this.checked ? x`
+ ${this.checked ? b`
` : ""}
- ${!this.checked && this.indeterminate ? x`
+ ${!this.checked && this.indeterminate ? b`
@@ -12772,7 +12785,7 @@ var _SlTreeItem = class _SlTreeItem extends ShoelaceElement {
render() {
const isRtl = this.localize.dir() === "rtl";
const showExpandButton = !this.loading && (!this.isLeaf || this.lazy);
- return x`
+ return b`
`
+ () => b`
`
)}
@@ -12819,7 +12832,7 @@ var _SlTreeItem = class _SlTreeItem extends ShoelaceElement {
${n$3(
this.selectable,
- () => x`
+ () => b`
2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n$2:""):s[t]=e;}}return T}});
+ */const n$2="important",i=" !"+n$2,o$5=e$4(class extends i$3{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n$2:""):s[t]=e;}}return E}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */let e$1 = class e extends i$3{constructor(i){if(super(i),this.it=E,i.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===E||null==r)return this._t=void 0,this.it=r;if(r===T)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};e$1.directiveName="unsafeHTML",e$1.resultType=1;const o$4=e$4(e$1);
+ */let e$1 = class e extends i$3{constructor(i){if(super(i),this.it=A,i.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===A||null==r)return this._t=void 0,this.it=r;if(r===E)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};e$1.directiveName="unsafeHTML",e$1.resultType=1;const o$4=e$4(e$1);
var SlRating = class extends ShoelaceElement {
constructor() {
@@ -13505,7 +13518,7 @@ var SlRating = class extends ShoelaceElement {
} else {
displayValue = this.isHovering ? this.hoverValue : this.value;
}
- return x`
+ return b`
${counter.map((index) => {
if (displayValue > index && displayValue < index + 1) {
- return x`
+ return b`
`;
}
- return x`
+ return b`
this.requestUpdate(), nextInterval);
}
- return x` `;
+ return b` `;
}
};
__decorateClass([
- r$3()
+ r$4()
], SlRelativeTime.prototype, "isoTime", 2);
__decorateClass([
- r$3()
+ r$4()
], SlRelativeTime.prototype, "relativeTime", 2);
__decorateClass([
n$6()
@@ -14117,7 +14130,7 @@ var SlSelect = class extends ShoelaceElement {
this.form = "";
this.required = false;
this.getTag = (option) => {
- return x`
+ return b`
`;
} else if (index === this.maxOptionsVisible) {
- return x`+${this.selectedOptions.length - index}`;
+ return b`+${this.selectedOptions.length - index}`;
}
- return x``;
+ return b``;
});
}
handleInvalid(event) {
@@ -14576,7 +14589,7 @@ var SlSelect = class extends ShoelaceElement {
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
const hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;
const isPlaceholderVisible = this.placeholder && this.value && this.value.length <= 0;
- return x`
+ return b`
- ${this.multiple ? x`${this.tags}
` : ""}
+ ${this.multiple ? b`${this.tags}
` : ""}
- ${hasClearIcon ? x`
+ ${hasClearIcon ? b`