@genesislcap/foundation-rapid-cdn 15.46.2 → 15.46.3
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.
|
@@ -265,7 +265,7 @@ function dv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r
|
|
|
265
265
|
</svg>
|
|
266
266
|
`,indeterminateIndicator:`
|
|
267
267
|
<div part="indeterminate-indicator" class="indeterminate-indicator"></div>
|
|
268
|
-
`};ow.compose(Object.assign({baseName:`checkbox`,template:iw,styles:aw,shadowOptions:void 0},sw));let cw=(e,t)=>O` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${mu(e,t)}`,lw=(e,t)=>T`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${Et(e,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?`true`:`false`}" aria-expanded="${e=>e.open?`true`:`false`}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||``}</slot></div></slot>${Tt(e,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}><slot ${k(`slottedDatasource`)} ${St({filter:Hr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`;var uw,dw,fw=class extends hu{constructor(){super(...arguments),uw.set(this,void 0),dw.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode=`startsWith`,this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:`auto`,block:`nearest`},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:`auto`,block:`center`},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value=``,this.control.value=``,this.filter=``,this.filterOptions()}}get activeDescendant(){if(this.selectedOptions&&this.selectedOptions.length!==0)return this.ariaActiveDescendant=this.selectedOptions[0]?.id,this.selectedOptions[0]?.id}debounceChanged(e,t){this.debouncedInputHandler=(0,KC.default)(this.asyncSetFilter,t)}get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}openChanged(){super.openChanged(),this.$emit(`open-change`,{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{this.options[this.selectedIndex]?.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter=``,this.filterOptions())}get value(){return S.track(this,`value`),this._ourValue}set value(e){if(e===void 0)return;let t=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){let t=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),n=this.options?this.options.findIndex(t):-1,r=this.options[this.selectedIndex]?.text,i=this.options[n]?.text;this.selectedIndex=i&&i!==r?n:this.selectedIndex,e&&e.trim()!==``&&n===-1&&(e=this.firstSelectedOption?.text||e)}t!==e&&(this._ourValue=e,super.valueChanged(t,e),S.notify(this,`value`))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){this.async||this.slottedDatasource?.assignedNodes().find(e=>e instanceof YC)?.infiniteScroll&&(this.async=!0)}filterOptions(){if(this.async){this.filteredOptions=[...this._options],this._options.forEach(e=>e.hidden=!1);return}(!this.autocomplete||this.autocomplete===Gr.none)&&(this.filter=``);let e=this.filter,t=this.caseSensitive?e:e.toLowerCase(),n=e=>{let n=this.caseSensitive?e.text:e.text.toLowerCase();return this.filterMode===`contains`?n.includes(t):n.startsWith(t)};this.filteredOptions=this._options.filter(n),this.isAutocompleteList&&(!this.filteredOptions.length&&!t&&(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled){if(by(e,this)){this.open=!1;return}if(xy(e,this.indicator)){this.open=!this.open,this.open&&this.control.focus();return}if(!(this.ignoreInputClick&&xy(e,this.control)))return super.clickHandler(e)}}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:if(Dd(this,dw,this.open,`f`),!this.open)return this.open=!0,!0;break;case`ArrowDown`:case`ArrowUp`:if(!this.open)return this.open=!0,!0;this.scrollWhenSelectionChanges&&this.options[this.selectedIndex]?.scrollIntoView(this.scrollWhenSelectionChangesOptions);break;case`Escape`:if(this.control.value!==this.currentValue){this.filter=``,this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),this.open=!1;return}if(!this.open)return!0}let n=super.keydownHandler(e);if(t!==`Enter`)return n}keyupHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:return!Ed(this,dw,`f`);case`ArrowDown`:case`ArrowUp`:this.open&&this.firstSelectedOption&&this.autocomplete===Gr.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=this.firstSelectedOption?.value);break;case`Home`:case`End`:return;case`Backspace`:case`Delete`:let t=super.keyupHandler(e);return this.selectItemByValue(this.control.value),t}return super.keyupHandler(e)}get indicator(){return Ed(this,uw,`f`)||Dd(this,uw,this.shadowRoot.querySelector(`[part="indicator"]`),`f`),Ed(this,uw,`f`)}selectItemByValue(e){var t;this.selectedIndex=this.options?.findIndex(t=>t.text===e)??-1,(t=this.options)==null||t.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){let e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof YC);if(t.length>0){let n=t[0];e==null||e===``?n.criteria=n.baseCriteria||``:Ly(n,e),x.queueUpdate(()=>{this.control.value=e})}else vy.warn(`Options-datasource is not connected. Please add a datasource to use this functionality.`)}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Gr.both&&(this.dispatchEvent(new Event(`change`,{bubbles:!0})),this.needManualChangeEventDispatch=!1)}};uw=/* @__PURE__ */ new WeakMap,dw=/* @__PURE__ */ new WeakMap,q([C],fw.prototype,`activeDescendant`,null),q([C],fw.prototype,`slottedDatasource`,void 0),q([D({mode:`boolean`})],fw.prototype,`async`,void 0),q([D],fw.prototype,`debounce`,void 0),q([D({mode:`boolean`,attribute:`case-sensitive`})],fw.prototype,`caseSensitive`,void 0),q([D({mode:`boolean`,attribute:`ignore-input-click`})],fw.prototype,`ignoreInputClick`,void 0),q([D({attribute:`filter-mode`})],fw.prototype,`filterMode`,void 0),q([D({mode:`boolean`,attribute:`scroll-to-selected-when-opening`})],fw.prototype,`scrollToSelectedWhenOpening`,void 0),q([C],fw.prototype,`scrollToSelectedWhenOpeningOptions`,void 0),q([D({mode:`boolean`,attribute:`scroll-when-selection-changes`})],fw.prototype,`scrollWhenSelectionChanges`,void 0),q([C],fw.prototype,`scrollWhenSelectionChangesOptions`,void 0);let pw={delegatesFocus:!0,mode:`open`},mw={indicator:`
|
|
268
|
+
`};ow.compose(Object.assign({baseName:`checkbox`,template:iw,styles:aw,shadowOptions:void 0},sw));let cw=(e,t)=>O` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${mu(e,t)}`,lw=(e,t)=>T`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${Et(e,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?`true`:`false`}" aria-expanded="${e=>e.open?`true`:`false`}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||``}</slot></div></slot>${Tt(e,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}><slot ${k(`slottedDatasource`)} ${St({filter:Hr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`;var uw,dw,fw=class extends hu{constructor(){super(...arguments),uw.set(this,void 0),dw.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode=`startsWith`,this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:`auto`,block:`nearest`},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:`auto`,block:`center`},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value=``,this.control.value=``,this.filter=``,this.filterOptions()}}get activeDescendant(){if(this.selectedOptions&&this.selectedOptions.length!==0)return this.ariaActiveDescendant=this.selectedOptions[0]?.id,this.selectedOptions[0]?.id}debounceChanged(e,t){this.debouncedInputHandler=(0,KC.default)(this.asyncSetFilter,t)}get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}openChanged(){super.openChanged(),this.$emit(`open-change`,{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{this.options[this.selectedIndex]?.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter=``,this.filterOptions())}get value(){return S.track(this,`value`),this._ourValue}set value(e){if(e===void 0)return;let t=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){let t=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),n=this.options?this.options.findIndex(t):-1,r=this.options[this.selectedIndex]?.text,i=this.options[n]?.text;this.selectedIndex=i&&i!==r?n:this.selectedIndex,e&&e.trim()!==``&&n===-1&&(e=this.firstSelectedOption?.text||e)}t!==e&&(this._ourValue=e,super.valueChanged(t,e),S.notify(this,`value`))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){this.async||this.slottedDatasource?.assignedNodes().find(e=>e instanceof YC)?.infiniteScroll&&(this.async=!0)}filterOptions(){if(this.async){this.filteredOptions=[...this._options],this._options.forEach(e=>e.hidden=!1);return}(!this.autocomplete||this.autocomplete===Gr.none)&&(this.filter=``);let e=this.filter,t=this.caseSensitive?e:e.toLowerCase(),n=e=>{let n=this.caseSensitive?e.text:e.text.toLowerCase();return this.filterMode===`contains`?n.includes(t):n.startsWith(t)};this.filteredOptions=this._options.filter(n),this.isAutocompleteList&&(!this.filteredOptions.length&&!t&&(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled){if(by(e,this)){this.open=!1;return}if(xy(e,this.indicator)){this.open=!this.open,this.open&&this.control.focus();return}if(!(this.ignoreInputClick&&xy(e,this.control)))return super.clickHandler(e)}}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:if(Dd(this,dw,this.open,`f`),!this.open)return this.open=!0,!0;break;case`ArrowDown`:case`ArrowUp`:if(!this.open)return this.open=!0,!0;this.scrollWhenSelectionChanges&&this.options[this.selectedIndex]?.scrollIntoView(this.scrollWhenSelectionChangesOptions);break;case`Escape`:if(this.control.value!==this.currentValue){this.filter=``,this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),this.open=!1;return}if(!this.open)return!0}let n=super.keydownHandler(e);if(t!==`Enter`)return n}keyupHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:return!Ed(this,dw,`f`);case`ArrowDown`:case`ArrowUp`:this.open&&this.firstSelectedOption&&this.autocomplete===Gr.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=this.firstSelectedOption?.value);break;case`Home`:case`End`:return;case`Backspace`:case`Delete`:let t=super.keyupHandler(e);return this.selectItemByValue(this.control.value),t}return super.keyupHandler(e)}get indicator(){return Ed(this,uw,`f`)||Dd(this,uw,this.shadowRoot.querySelector(`[part="indicator"]`),`f`),Ed(this,uw,`f`)}selectItemByValue(e){var t;this.selectedIndex=this.options?.findIndex(t=>t.text===e)??-1,(t=this.options)==null||t.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?(this.selectedIndex=this.options.map(e=>e.text).indexOf(this.control.value),this.debouncedInputHandler()):super.inputHandler(e)}asyncSetFilter(){let e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof YC);if(t.length>0){let n=t[0];e==null||e===``?n.criteria=n.baseCriteria||``:Ly(n,e),x.queueUpdate(()=>{this.control.value=e})}else vy.warn(`Options-datasource is not connected. Please add a datasource to use this functionality.`)}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Gr.both&&(this.dispatchEvent(new Event(`change`,{bubbles:!0})),this.needManualChangeEventDispatch=!1)}};uw=/* @__PURE__ */ new WeakMap,dw=/* @__PURE__ */ new WeakMap,q([C],fw.prototype,`activeDescendant`,null),q([C],fw.prototype,`slottedDatasource`,void 0),q([D({mode:`boolean`})],fw.prototype,`async`,void 0),q([D],fw.prototype,`debounce`,void 0),q([D({mode:`boolean`,attribute:`case-sensitive`})],fw.prototype,`caseSensitive`,void 0),q([D({mode:`boolean`,attribute:`ignore-input-click`})],fw.prototype,`ignoreInputClick`,void 0),q([D({attribute:`filter-mode`})],fw.prototype,`filterMode`,void 0),q([D({mode:`boolean`,attribute:`scroll-to-selected-when-opening`})],fw.prototype,`scrollToSelectedWhenOpening`,void 0),q([C],fw.prototype,`scrollToSelectedWhenOpeningOptions`,void 0),q([D({mode:`boolean`,attribute:`scroll-when-selection-changes`})],fw.prototype,`scrollWhenSelectionChanges`,void 0),q([C],fw.prototype,`scrollWhenSelectionChangesOptions`,void 0);let pw={delegatesFocus:!0,mode:`open`},mw={indicator:`
|
|
269
269
|
<svg
|
|
270
270
|
class="combo-box-indicator"
|
|
271
271
|
part="combo-box-indicator"
|
|
@@ -265,7 +265,7 @@ function dv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r
|
|
|
265
265
|
</svg>
|
|
266
266
|
`,indeterminateIndicator:`
|
|
267
267
|
<div part="indeterminate-indicator" class="indeterminate-indicator"></div>
|
|
268
|
-
`};ow.compose(Object.assign({baseName:`checkbox`,template:iw,styles:aw,shadowOptions:void 0},sw));let cw=(e,t)=>O` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${du(e,t)}`,lw=(e,t)=>T`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${Et(e,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?`true`:`false`}" aria-expanded="${e=>e.open?`true`:`false`}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||``}</slot></div></slot>${Tt(e,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}><slot ${k(`slottedDatasource`)} ${St({filter:Vr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`;var uw,dw,fw=class extends fu{constructor(){super(...arguments),uw.set(this,void 0),dw.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode=`startsWith`,this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:`auto`,block:`nearest`},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:`auto`,block:`center`},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value=``,this.control.value=``,this.filter=``,this.filterOptions()}}get activeDescendant(){if(this.selectedOptions&&this.selectedOptions.length!==0)return this.ariaActiveDescendant=this.selectedOptions[0]?.id,this.selectedOptions[0]?.id}debounceChanged(e,t){this.debouncedInputHandler=(0,KC.default)(this.asyncSetFilter,t)}get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}openChanged(){super.openChanged(),this.$emit(`open-change`,{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{this.options[this.selectedIndex]?.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter=``,this.filterOptions())}get value(){return S.track(this,`value`),this._ourValue}set value(e){if(e===void 0)return;let t=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){let t=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),n=this.options?this.options.findIndex(t):-1,r=this.options[this.selectedIndex]?.text,i=this.options[n]?.text;this.selectedIndex=i&&i!==r?n:this.selectedIndex,e&&e.trim()!==``&&n===-1&&(e=this.firstSelectedOption?.text||e)}t!==e&&(this._ourValue=e,super.valueChanged(t,e),S.notify(this,`value`))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){this.async||this.slottedDatasource?.assignedNodes().find(e=>e instanceof YC)?.infiniteScroll&&(this.async=!0)}filterOptions(){if(this.async){this.filteredOptions=[...this._options],this._options.forEach(e=>e.hidden=!1);return}(!this.autocomplete||this.autocomplete===Wr.none)&&(this.filter=``);let e=this.filter,t=this.caseSensitive?e:e.toLowerCase(),n=e=>{let n=this.caseSensitive?e.text:e.text.toLowerCase();return this.filterMode===`contains`?n.includes(t):n.startsWith(t)};this.filteredOptions=this._options.filter(n),this.isAutocompleteList&&(!this.filteredOptions.length&&!t&&(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled){if(by(e,this)){this.open=!1;return}if(xy(e,this.indicator)){this.open=!this.open,this.open&&this.control.focus();return}if(!(this.ignoreInputClick&&xy(e,this.control)))return super.clickHandler(e)}}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:if(wd(this,dw,this.open,`f`),!this.open)return this.open=!0,!0;break;case`ArrowDown`:case`ArrowUp`:if(!this.open)return this.open=!0,!0;this.scrollWhenSelectionChanges&&this.options[this.selectedIndex]?.scrollIntoView(this.scrollWhenSelectionChangesOptions);break;case`Escape`:if(this.control.value!==this.currentValue){this.filter=``,this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),this.open=!1;return}if(!this.open)return!0}let n=super.keydownHandler(e);if(t!==`Enter`)return n}keyupHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:return!Cd(this,dw,`f`);case`ArrowDown`:case`ArrowUp`:this.open&&this.firstSelectedOption&&this.autocomplete===Wr.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=this.firstSelectedOption?.value);break;case`Home`:case`End`:return;case`Backspace`:case`Delete`:let t=super.keyupHandler(e);return this.selectItemByValue(this.control.value),t}return super.keyupHandler(e)}get indicator(){return Cd(this,uw,`f`)||wd(this,uw,this.shadowRoot.querySelector(`[part="indicator"]`),`f`),Cd(this,uw,`f`)}selectItemByValue(e){var t;this.selectedIndex=this.options?.findIndex(t=>t.text===e)??-1,(t=this.options)==null||t.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){let e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof YC);if(t.length>0){let n=t[0];e==null||e===``?n.criteria=n.baseCriteria||``:Ly(n,e),x.queueUpdate(()=>{this.control.value=e})}else vy.warn(`Options-datasource is not connected. Please add a datasource to use this functionality.`)}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Wr.both&&(this.dispatchEvent(new Event(`change`,{bubbles:!0})),this.needManualChangeEventDispatch=!1)}};uw=/* @__PURE__ */ new WeakMap,dw=/* @__PURE__ */ new WeakMap,q([C],fw.prototype,`activeDescendant`,null),q([C],fw.prototype,`slottedDatasource`,void 0),q([D({mode:`boolean`})],fw.prototype,`async`,void 0),q([D],fw.prototype,`debounce`,void 0),q([D({mode:`boolean`,attribute:`case-sensitive`})],fw.prototype,`caseSensitive`,void 0),q([D({mode:`boolean`,attribute:`ignore-input-click`})],fw.prototype,`ignoreInputClick`,void 0),q([D({attribute:`filter-mode`})],fw.prototype,`filterMode`,void 0),q([D({mode:`boolean`,attribute:`scroll-to-selected-when-opening`})],fw.prototype,`scrollToSelectedWhenOpening`,void 0),q([C],fw.prototype,`scrollToSelectedWhenOpeningOptions`,void 0),q([D({mode:`boolean`,attribute:`scroll-when-selection-changes`})],fw.prototype,`scrollWhenSelectionChanges`,void 0),q([C],fw.prototype,`scrollWhenSelectionChangesOptions`,void 0);let pw={delegatesFocus:!0,mode:`open`},mw={indicator:`
|
|
268
|
+
`};ow.compose(Object.assign({baseName:`checkbox`,template:iw,styles:aw,shadowOptions:void 0},sw));let cw=(e,t)=>O` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${du(e,t)}`,lw=(e,t)=>T`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${Et(e,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?`true`:`false`}" aria-expanded="${e=>e.open?`true`:`false`}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||``}</slot></div></slot>${Tt(e,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}><slot ${k(`slottedDatasource`)} ${St({filter:Vr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`;var uw,dw,fw=class extends fu{constructor(){super(...arguments),uw.set(this,void 0),dw.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode=`startsWith`,this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:`auto`,block:`nearest`},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:`auto`,block:`center`},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value=``,this.control.value=``,this.filter=``,this.filterOptions()}}get activeDescendant(){if(this.selectedOptions&&this.selectedOptions.length!==0)return this.ariaActiveDescendant=this.selectedOptions[0]?.id,this.selectedOptions[0]?.id}debounceChanged(e,t){this.debouncedInputHandler=(0,KC.default)(this.asyncSetFilter,t)}get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}openChanged(){super.openChanged(),this.$emit(`open-change`,{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{this.options[this.selectedIndex]?.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter=``,this.filterOptions())}get value(){return S.track(this,`value`),this._ourValue}set value(e){if(e===void 0)return;let t=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){let t=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),n=this.options?this.options.findIndex(t):-1,r=this.options[this.selectedIndex]?.text,i=this.options[n]?.text;this.selectedIndex=i&&i!==r?n:this.selectedIndex,e&&e.trim()!==``&&n===-1&&(e=this.firstSelectedOption?.text||e)}t!==e&&(this._ourValue=e,super.valueChanged(t,e),S.notify(this,`value`))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){this.async||this.slottedDatasource?.assignedNodes().find(e=>e instanceof YC)?.infiniteScroll&&(this.async=!0)}filterOptions(){if(this.async){this.filteredOptions=[...this._options],this._options.forEach(e=>e.hidden=!1);return}(!this.autocomplete||this.autocomplete===Wr.none)&&(this.filter=``);let e=this.filter,t=this.caseSensitive?e:e.toLowerCase(),n=e=>{let n=this.caseSensitive?e.text:e.text.toLowerCase();return this.filterMode===`contains`?n.includes(t):n.startsWith(t)};this.filteredOptions=this._options.filter(n),this.isAutocompleteList&&(!this.filteredOptions.length&&!t&&(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled){if(by(e,this)){this.open=!1;return}if(xy(e,this.indicator)){this.open=!this.open,this.open&&this.control.focus();return}if(!(this.ignoreInputClick&&xy(e,this.control)))return super.clickHandler(e)}}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:if(wd(this,dw,this.open,`f`),!this.open)return this.open=!0,!0;break;case`ArrowDown`:case`ArrowUp`:if(!this.open)return this.open=!0,!0;this.scrollWhenSelectionChanges&&this.options[this.selectedIndex]?.scrollIntoView(this.scrollWhenSelectionChangesOptions);break;case`Escape`:if(this.control.value!==this.currentValue){this.filter=``,this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),this.open=!1;return}if(!this.open)return!0}let n=super.keydownHandler(e);if(t!==`Enter`)return n}keyupHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Enter`:return!Cd(this,dw,`f`);case`ArrowDown`:case`ArrowUp`:this.open&&this.firstSelectedOption&&this.autocomplete===Wr.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=this.firstSelectedOption?.value);break;case`Home`:case`End`:return;case`Backspace`:case`Delete`:let t=super.keyupHandler(e);return this.selectItemByValue(this.control.value),t}return super.keyupHandler(e)}get indicator(){return Cd(this,uw,`f`)||wd(this,uw,this.shadowRoot.querySelector(`[part="indicator"]`),`f`),Cd(this,uw,`f`)}selectItemByValue(e){var t;this.selectedIndex=this.options?.findIndex(t=>t.text===e)??-1,(t=this.options)==null||t.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?(this.selectedIndex=this.options.map(e=>e.text).indexOf(this.control.value),this.debouncedInputHandler()):super.inputHandler(e)}asyncSetFilter(){let e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof YC);if(t.length>0){let n=t[0];e==null||e===``?n.criteria=n.baseCriteria||``:Ly(n,e),x.queueUpdate(()=>{this.control.value=e})}else vy.warn(`Options-datasource is not connected. Please add a datasource to use this functionality.`)}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Wr.both&&(this.dispatchEvent(new Event(`change`,{bubbles:!0})),this.needManualChangeEventDispatch=!1)}};uw=/* @__PURE__ */ new WeakMap,dw=/* @__PURE__ */ new WeakMap,q([C],fw.prototype,`activeDescendant`,null),q([C],fw.prototype,`slottedDatasource`,void 0),q([D({mode:`boolean`})],fw.prototype,`async`,void 0),q([D],fw.prototype,`debounce`,void 0),q([D({mode:`boolean`,attribute:`case-sensitive`})],fw.prototype,`caseSensitive`,void 0),q([D({mode:`boolean`,attribute:`ignore-input-click`})],fw.prototype,`ignoreInputClick`,void 0),q([D({attribute:`filter-mode`})],fw.prototype,`filterMode`,void 0),q([D({mode:`boolean`,attribute:`scroll-to-selected-when-opening`})],fw.prototype,`scrollToSelectedWhenOpening`,void 0),q([C],fw.prototype,`scrollToSelectedWhenOpeningOptions`,void 0),q([D({mode:`boolean`,attribute:`scroll-when-selection-changes`})],fw.prototype,`scrollWhenSelectionChanges`,void 0),q([C],fw.prototype,`scrollWhenSelectionChangesOptions`,void 0);let pw={delegatesFocus:!0,mode:`open`},mw={indicator:`
|
|
269
269
|
<svg
|
|
270
270
|
class="combo-box-indicator"
|
|
271
271
|
part="combo-box-indicator"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-rapid-cdn",
|
|
3
3
|
"description": "Side-effecting CDN bundle that auto-registers the Rapid Design System. Intended for AI/prototyping tools (e.g. Claude Artifacts), not for production apps.",
|
|
4
|
-
"version": "15.46.
|
|
4
|
+
"version": "15.46.3",
|
|
5
5
|
"sideEffects": true,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"unpkg": "dist/foundation-rapid-cdn.iife.min.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@babel/generator": "^7.29.0",
|
|
25
25
|
"@babel/parser": "^7.29.0",
|
|
26
26
|
"@babel/traverse": "^7.29.0",
|
|
27
|
-
"@genesislcap/genx": "15.46.
|
|
27
|
+
"@genesislcap/genx": "15.46.3",
|
|
28
28
|
"rolldown": "~1.2.9"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@genesislcap/rapid-design-system": "15.46.
|
|
31
|
+
"@genesislcap/rapid-design-system": "15.46.3"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|