@dso-toolkit/core 50.0.1 → 51.1.0
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.
- package/dist/cjs/dso-accordion-section.cjs.entry.js +7 -1
- package/dist/cjs/dso-accordion.cjs.entry.js +10 -3
- package/dist/cjs/dso-card.cjs.entry.js +8 -4
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +3 -6
- package/dist/cjs/dso-list-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +1 -1
- package/dist/cjs/dso-slide-toggle.cjs.entry.js +37 -0
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/accordion.js +50 -5
- package/dist/collection/components/accordion/components/accordion-section.css +1 -1
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js +1 -0
- package/dist/collection/components/accordion/components/accordion-section.js +4 -2
- package/dist/collection/components/accordion/components/handles/state-icon.handle.js +3 -0
- package/dist/collection/components/card/card.js +2 -4
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +3 -6
- package/dist/collection/components/list-button/list-button.css +13 -14
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.css +44 -0
- package/dist/collection/components/slide-toggle/slide-toggle.interfaces.js +1 -0
- package/dist/collection/components/slide-toggle/slide-toggle.js +156 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/is-interactive-element.js +6 -0
- package/dist/components/dropdown-menu.js +3 -6
- package/dist/components/dso-accordion-section.js +7 -1
- package/dist/components/dso-accordion.js +11 -3
- package/dist/components/dso-card.js +8 -4
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-modal.js +1 -1
- package/dist/components/dso-slide-toggle.d.ts +11 -0
- package/dist/components/dso-slide-toggle.js +57 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-672c8323.entry.js → p-0e5315a3.entry.js} +1 -1
- package/dist/dso-toolkit/p-11176cb8.entry.js +1 -0
- package/dist/dso-toolkit/p-36cd87c4.entry.js +1 -0
- package/dist/dso-toolkit/{p-34a3c0b3.entry.js → p-6080bb9e.entry.js} +1 -1
- package/dist/dso-toolkit/p-6bd8515a.entry.js +1 -0
- package/dist/dso-toolkit/{p-d8ba8db6.entry.js → p-abbcbe6a.entry.js} +1 -1
- package/dist/dso-toolkit/p-ec4501bb.entry.js +1 -0
- package/dist/esm/dso-accordion-section.entry.js +7 -1
- package/dist/esm/dso-accordion.entry.js +10 -3
- package/dist/esm/dso-card.entry.js +8 -4
- package/dist/esm/dso-dropdown-menu.entry.js +3 -6
- package/dist/esm/dso-list-button.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-slide-toggle.entry.js +33 -0
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +6 -2
- package/dist/types/components/accordion/accordion.interfaces.d.ts +7 -0
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +1 -1
- package/dist/types/components/slide-toggle/slide-toggle.d.ts +18 -0
- package/dist/types/components/slide-toggle/slide-toggle.interfaces.d.ts +5 -0
- package/dist/types/components.d.ts +53 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/is-interactive-element.d.ts +1 -0
- package/package.json +2 -2
- package/dist/dso-toolkit/p-a608d3bd.entry.js +0 -1
- package/dist/dso-toolkit/p-bcd19ae7.entry.js +0 -1
- package/dist/dso-toolkit/p-c74ac576.entry.js +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, a as getElement } from './index-1a4dda48.js';
|
|
2
|
+
import { v as v4 } from './v4-d398bde5.js';
|
|
3
|
+
|
|
4
|
+
const slideToggleCss = "button.dso-slider{border:0;padding:0}button.dso-slider:focus-visible{outline:2px solid #323232;outline-offset:1px}button.dso-slider svg rect{fill:#999;transition:fill 0.25s}button.dso-slider svg circle{transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transform:translateX(10px);fill:#fff}button.dso-slider[aria-checked=true] svg rect{fill:#275937}button.dso-slider[aria-checked=true] svg circle{transform:translateX(30px);fill:#fff}button.dso-slider[disabled] svg rect{fill:#ccc}button.dso-slider[disabled] svg circle{fill:#e5e5e5}button.dso-slider[disabled][aria-checked=true] svg rect{fill:#a8bcaf}button.dso-slider[disabled][aria-checked=true] svg circle{fill:#e5e5e5}.dso-slider{border-radius:24px;display:inline-flex}.dso-slider:hover{cursor:pointer}";
|
|
5
|
+
|
|
6
|
+
const SlideToggle = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.dsoActiveChange = createEvent(this, "dsoActiveChange", 7);
|
|
10
|
+
this.checked = false;
|
|
11
|
+
this.disabled = false;
|
|
12
|
+
this.accessibleLabel = undefined;
|
|
13
|
+
this.labelledbyId = undefined;
|
|
14
|
+
this.hasVisibleLabel = undefined;
|
|
15
|
+
this.identifier = v4();
|
|
16
|
+
}
|
|
17
|
+
handleSwitch(e) {
|
|
18
|
+
this.dsoActiveChange.emit({
|
|
19
|
+
originalEvent: e,
|
|
20
|
+
checked: !this.checked,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
componentWillLoad() {
|
|
24
|
+
this.hasVisibleLabel = this.host.querySelector("*") !== null;
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return (h(Fragment, null, h("button", Object.assign({ id: this.identifier, role: "switch", class: "dso-slider", "aria-checked": "" + this.checked, disabled: this.disabled, onClick: (e) => this.handleSwitch(e) }, (this.accessibleLabel ? { "aria-label": this.accessibleLabel } : {}), (this.labelledbyId ? { "aria-labelledby": this.labelledbyId } : {})), h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "40", height: "20", viewBox: "0 0 40 20" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("rect", { width: "40", height: "20", fill: "currentColor", rx: "10" }), h("circle", { cy: "10", r: "8", fill: "currentColor" })))), this.hasVisibleLabel && (h("label", { htmlFor: this.identifier }, h("slot", null)))));
|
|
28
|
+
}
|
|
29
|
+
get host() { return getElement(this); }
|
|
30
|
+
};
|
|
31
|
+
SlideToggle.style = slideToggleCss;
|
|
32
|
+
|
|
33
|
+
export { SlideToggle as dso_slide_toggle };
|
package/dist/esm/dso-toolkit.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"focused":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"focused":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
|
|
17
17
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"focused":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"focused":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentInterface, EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { AccordionInterface, AccordionInternalState, AccordionSectionToggleEvent, AccordionVariant } from "./accordion.interfaces";
|
|
2
|
+
import { AccordionInterface, AccordionInternalState, AccordionSectionToggleAnimationEndEvent, AccordionSectionToggleEvent, AccordionVariant } from "./accordion.interfaces";
|
|
3
3
|
export declare class Accordion implements ComponentInterface, AccordionInterface {
|
|
4
4
|
private accordionState;
|
|
5
5
|
host: HTMLElement;
|
|
@@ -16,16 +16,20 @@ export declare class Accordion implements ComponentInterface, AccordionInterface
|
|
|
16
16
|
* `event.detail.sections` contains all `<dso-accordion-section>` elements belonging to this accordion.
|
|
17
17
|
*/
|
|
18
18
|
dsoToggleSection: EventEmitter<AccordionSectionToggleEvent>;
|
|
19
|
+
/**
|
|
20
|
+
* Event emitted when the accordion section completes its toggle animation.
|
|
21
|
+
*/
|
|
22
|
+
dsoToggleSectionAnimationEnd: EventEmitter<AccordionSectionToggleAnimationEndEvent>;
|
|
19
23
|
updateVariant(variant?: AccordionVariant): void;
|
|
20
24
|
updateReverseAlign(reverseAlign: boolean): void;
|
|
21
25
|
updateAllowMultipleOpen(allowMultipleOpen: boolean): void;
|
|
22
|
-
watchAllowMultiple(allowMultipleOpen: boolean): void;
|
|
23
26
|
getState(): Promise<AccordionInternalState>;
|
|
24
27
|
/** Toggle a section. Pass the `<dso-accordion-section>` element or the index of the section.\
|
|
25
28
|
* returns `undefined` when no section is toggled.\
|
|
26
29
|
* returns `true` when the section is opened and `false` when the section is closed.
|
|
27
30
|
*/
|
|
28
31
|
toggleSection(sectionElement: HTMLElement | number, event?: MouseEvent): Promise<undefined | boolean>;
|
|
32
|
+
animationEnd(sectionElement: HTMLElement): Promise<void>;
|
|
29
33
|
/** Closes all sections belonging to this accordion. */
|
|
30
34
|
closeOpenSections(): Promise<void>;
|
|
31
35
|
componentWillLoad(): void;
|
|
@@ -11,6 +11,7 @@ export interface AccordionInterface {
|
|
|
11
11
|
* returns `true` when the section is opened and `false` when the section is closed.
|
|
12
12
|
*/
|
|
13
13
|
toggleSection(sectionElement: HTMLElement | number, event?: MouseEvent): Promise<undefined | boolean>;
|
|
14
|
+
animationEnd(sectionElement: HTMLElement): Promise<void>;
|
|
14
15
|
}
|
|
15
16
|
export interface AccordionSectionToggleEvent {
|
|
16
17
|
/** When the section is toggled by clicking in the header the `MouseEvent` is available. */
|
|
@@ -21,3 +22,9 @@ export interface AccordionSectionToggleEvent {
|
|
|
21
22
|
};
|
|
22
23
|
sections: HTMLElement[];
|
|
23
24
|
}
|
|
25
|
+
export interface AccordionSectionToggleAnimationEndEvent {
|
|
26
|
+
section: {
|
|
27
|
+
element: HTMLElement;
|
|
28
|
+
open: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type AccordionSectionState = "success" | "info" | "warning" | "danger";
|
|
1
|
+
export declare type AccordionSectionState = "success" | "info" | "warning" | "danger" | "error";
|
|
2
2
|
export declare type AccordionHeading = "h2" | "h3" | "h4" | "h5";
|
|
3
3
|
export declare const stateMap: Record<AccordionSectionState, string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentInterface, EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { SlideToggleActiveEvent } from "./slide-toggle.interfaces";
|
|
3
|
+
export declare class SlideToggle implements ComponentInterface {
|
|
4
|
+
private host;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
/** When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component */
|
|
8
|
+
accessibleLabel?: string;
|
|
9
|
+
/** Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button */
|
|
10
|
+
labelledbyId?: string;
|
|
11
|
+
hasVisibleLabel?: boolean;
|
|
12
|
+
/** Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for="id">` */
|
|
13
|
+
identifier: string;
|
|
14
|
+
dsoActiveChange: EventEmitter<SlideToggleActiveEvent>;
|
|
15
|
+
private handleSwitch;
|
|
16
|
+
componentWillLoad(): void;
|
|
17
|
+
render(): any;
|
|
18
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import { AccordionInternalState, AccordionSectionToggleEvent, AccordionVariant } from "./components/accordion/accordion.interfaces";
|
|
8
|
+
import { AccordionInternalState, AccordionSectionToggleAnimationEndEvent, AccordionSectionToggleEvent, AccordionVariant } from "./components/accordion/accordion.interfaces";
|
|
9
9
|
import { AccordionHeading, AccordionSectionState } from "./components/accordion/components/accordion-section.interfaces";
|
|
10
10
|
import { Suggestion } from "./components/autosuggest/autosuggest.interfaces";
|
|
11
11
|
import { DsoCardClickedEvent } from "./components/card/card.interfaces";
|
|
@@ -22,6 +22,7 @@ import { OzonContentAnchorClick, OzonContentClick } from "./components/ozon-cont
|
|
|
22
22
|
import { PaginationSelectPageEvent } from "./components/pagination/pagination.interfaces";
|
|
23
23
|
import { ResponsiveElementSize } from "./components/responsive-element/responsive-element.interfaces";
|
|
24
24
|
import { SelectableChangeEvent } from "./components/selectable/selectable.interfaces";
|
|
25
|
+
import { SlideToggleActiveEvent } from "./components/slide-toggle/slide-toggle.interfaces";
|
|
25
26
|
import { TreeViewItem, TreeViewPointerEvent } from "./components/tree-view/tree-view.interfaces";
|
|
26
27
|
import { FilterpanelEvent, MainSize, ViewerGridChangeSizeEvent } from "./components/viewer-grid/viewer-grid.interfaces";
|
|
27
28
|
export namespace Components {
|
|
@@ -30,6 +31,7 @@ export namespace Components {
|
|
|
30
31
|
* Allows multiple sections to be open at the same time.
|
|
31
32
|
*/
|
|
32
33
|
"allowMultipleOpen": boolean;
|
|
34
|
+
"animationEnd": (sectionElement: HTMLElement) => Promise<void>;
|
|
33
35
|
/**
|
|
34
36
|
* Closes all sections belonging to this accordion.
|
|
35
37
|
*/
|
|
@@ -340,6 +342,22 @@ export namespace Components {
|
|
|
340
342
|
"type": "checkbox" | "radio";
|
|
341
343
|
"value": string;
|
|
342
344
|
}
|
|
345
|
+
interface DsoSlideToggle {
|
|
346
|
+
/**
|
|
347
|
+
* When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component
|
|
348
|
+
*/
|
|
349
|
+
"accessibleLabel"?: string;
|
|
350
|
+
"checked": boolean;
|
|
351
|
+
"disabled": boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for="id">`
|
|
354
|
+
*/
|
|
355
|
+
"identifier": string;
|
|
356
|
+
/**
|
|
357
|
+
* Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button
|
|
358
|
+
*/
|
|
359
|
+
"labelledbyId"?: string;
|
|
360
|
+
}
|
|
343
361
|
interface DsoTable {
|
|
344
362
|
/**
|
|
345
363
|
* Indicates whether the table is currently horizontally scrollable
|
|
@@ -483,6 +501,10 @@ export interface DsoSelectableCustomEvent<T> extends CustomEvent<T> {
|
|
|
483
501
|
detail: T;
|
|
484
502
|
target: HTMLDsoSelectableElement;
|
|
485
503
|
}
|
|
504
|
+
export interface DsoSlideToggleCustomEvent<T> extends CustomEvent<T> {
|
|
505
|
+
detail: T;
|
|
506
|
+
target: HTMLDsoSlideToggleElement;
|
|
507
|
+
}
|
|
486
508
|
export interface DsoTreeViewCustomEvent<T> extends CustomEvent<T> {
|
|
487
509
|
detail: T;
|
|
488
510
|
target: HTMLDsoTreeViewElement;
|
|
@@ -672,6 +694,12 @@ declare global {
|
|
|
672
694
|
prototype: HTMLDsoSelectableElement;
|
|
673
695
|
new (): HTMLDsoSelectableElement;
|
|
674
696
|
};
|
|
697
|
+
interface HTMLDsoSlideToggleElement extends Components.DsoSlideToggle, HTMLStencilElement {
|
|
698
|
+
}
|
|
699
|
+
var HTMLDsoSlideToggleElement: {
|
|
700
|
+
prototype: HTMLDsoSlideToggleElement;
|
|
701
|
+
new (): HTMLDsoSlideToggleElement;
|
|
702
|
+
};
|
|
675
703
|
interface HTMLDsoTableElement extends Components.DsoTable, HTMLStencilElement {
|
|
676
704
|
}
|
|
677
705
|
var HTMLDsoTableElement: {
|
|
@@ -733,6 +761,7 @@ declare global {
|
|
|
733
761
|
"dso-progress-indicator": HTMLDsoProgressIndicatorElement;
|
|
734
762
|
"dso-responsive-element": HTMLDsoResponsiveElementElement;
|
|
735
763
|
"dso-selectable": HTMLDsoSelectableElement;
|
|
764
|
+
"dso-slide-toggle": HTMLDsoSlideToggleElement;
|
|
736
765
|
"dso-table": HTMLDsoTableElement;
|
|
737
766
|
"dso-toggletip": HTMLDsoToggletipElement;
|
|
738
767
|
"dso-tooltip": HTMLDsoTooltipElement;
|
|
@@ -750,6 +779,10 @@ declare namespace LocalJSX {
|
|
|
750
779
|
* Emitted when a section is toggled. `event.detail.originalEvent` contains the original `MouseEvent` when the section is toggled by clicking on the header `event.detail.section` contains the toggled section and its new opened value.\ `event.detail.sections` contains all `<dso-accordion-section>` elements belonging to this accordion.
|
|
751
780
|
*/
|
|
752
781
|
"onDsoToggleSection"?: (event: DsoAccordionCustomEvent<AccordionSectionToggleEvent>) => void;
|
|
782
|
+
/**
|
|
783
|
+
* Event emitted when the accordion section completes its toggle animation.
|
|
784
|
+
*/
|
|
785
|
+
"onDsoToggleSectionAnimationEnd"?: (event: DsoAccordionCustomEvent<AccordionSectionToggleAnimationEndEvent>) => void;
|
|
753
786
|
/**
|
|
754
787
|
* Places the chevron at the opposite side. Note: this mode does not display `state`, `attachmentCount` or `status` props on child `<dso-accordion-section>` elements
|
|
755
788
|
*/
|
|
@@ -1085,6 +1118,23 @@ declare namespace LocalJSX {
|
|
|
1085
1118
|
"type": "checkbox" | "radio";
|
|
1086
1119
|
"value": string;
|
|
1087
1120
|
}
|
|
1121
|
+
interface DsoSlideToggle {
|
|
1122
|
+
/**
|
|
1123
|
+
* When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component
|
|
1124
|
+
*/
|
|
1125
|
+
"accessibleLabel"?: string;
|
|
1126
|
+
"checked"?: boolean;
|
|
1127
|
+
"disabled"?: boolean;
|
|
1128
|
+
/**
|
|
1129
|
+
* Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for="id">`
|
|
1130
|
+
*/
|
|
1131
|
+
"identifier"?: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button
|
|
1134
|
+
*/
|
|
1135
|
+
"labelledbyId"?: string;
|
|
1136
|
+
"onDsoActiveChange"?: (event: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => void;
|
|
1137
|
+
}
|
|
1088
1138
|
interface DsoTable {
|
|
1089
1139
|
/**
|
|
1090
1140
|
* Indicates whether the table is currently horizontally scrollable
|
|
@@ -1192,6 +1242,7 @@ declare namespace LocalJSX {
|
|
|
1192
1242
|
"dso-progress-indicator": DsoProgressIndicator;
|
|
1193
1243
|
"dso-responsive-element": DsoResponsiveElement;
|
|
1194
1244
|
"dso-selectable": DsoSelectable;
|
|
1245
|
+
"dso-slide-toggle": DsoSlideToggle;
|
|
1195
1246
|
"dso-table": DsoTable;
|
|
1196
1247
|
"dso-toggletip": DsoToggletip;
|
|
1197
1248
|
"dso-tooltip": DsoTooltip;
|
|
@@ -1233,6 +1284,7 @@ declare module "@stencil/core" {
|
|
|
1233
1284
|
"dso-progress-indicator": LocalJSX.DsoProgressIndicator & JSXBase.HTMLAttributes<HTMLDsoProgressIndicatorElement>;
|
|
1234
1285
|
"dso-responsive-element": LocalJSX.DsoResponsiveElement & JSXBase.HTMLAttributes<HTMLDsoResponsiveElementElement>;
|
|
1235
1286
|
"dso-selectable": LocalJSX.DsoSelectable & JSXBase.HTMLAttributes<HTMLDsoSelectableElement>;
|
|
1287
|
+
"dso-slide-toggle": LocalJSX.DsoSlideToggle & JSXBase.HTMLAttributes<HTMLDsoSlideToggleElement>;
|
|
1236
1288
|
"dso-table": LocalJSX.DsoTable & JSXBase.HTMLAttributes<HTMLDsoTableElement>;
|
|
1237
1289
|
"dso-toggletip": LocalJSX.DsoToggletip & JSXBase.HTMLAttributes<HTMLDsoToggletipElement>;
|
|
1238
1290
|
"dso-tooltip": LocalJSX.DsoTooltip & JSXBase.HTMLAttributes<HTMLDsoTooltipElement>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@ export * from "./components/ozon-content/ozon-content.interfaces";
|
|
|
13
13
|
export * from "./components/pagination/pagination.interfaces";
|
|
14
14
|
export * from "./components/responsive-element/responsive-element.interfaces";
|
|
15
15
|
export * from "./components/selectable/selectable.interfaces";
|
|
16
|
+
export * from "./components/slide-toggle/slide-toggle.interfaces";
|
|
16
17
|
export * from "./components/tree-view/tree-view.interfaces";
|
|
17
18
|
export * from "./components/viewer-grid/viewer-grid.interfaces";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isInteractiveElement: (element: HTMLElement) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dso-toolkit/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "51.1.0",
|
|
4
4
|
"description": "DSO Toolkit Web Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/components/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@stencil/store": "^2.0.1",
|
|
25
25
|
"animejs": "3.2.1",
|
|
26
26
|
"clsx": "1.2.1",
|
|
27
|
-
"dso-toolkit": "
|
|
27
|
+
"dso-toolkit": "51.1.0",
|
|
28
28
|
"escape-string-regexp": "^5.0.0",
|
|
29
29
|
"focus-trap": "^7.1.0",
|
|
30
30
|
"popper-max-size-modifier": "^0.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as n,a}from"./p-8f35c8f8.js";import{i}from"./p-33df9903.js";const o=class{constructor(s){t(this,s),this.dsoCardClicked=e(this,"dsoCardClicked",7),this.isSelectable=!1,this.hasImage=!1}clickEventHandler(t){if(!(t.target instanceof HTMLElement))return;let e=t.target;for(;e!==this.host&&null!==e;){if(e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement||e instanceof HTMLInputElement||null===e)return;e=e.parentNode instanceof ShadowRoot&&e.parentNode.host instanceof HTMLElement?e.parentNode.host:e.parentElement}return this.dsoCardClicked.emit({originalEvent:t,isModifiedEvent:i(t)})}componentWillLoad(){this.isSelectable=null!==this.host.querySelector("*[slot = 'selectable']"),this.hasImage=null!==this.host.querySelector("*[slot = 'image']")}render(){return s(n,{onClick:t=>this.clickEventHandler(t)},s("div",{class:"dso-card-selectable",hidden:!this.isSelectable},s("slot",{name:"selectable"})),s("div",{class:"dso-card-image",hidden:!this.hasImage},s("slot",{name:"image"})),s("div",{class:"dso-card-heading"},s("slot",{name:"heading"}),s("slot",{name:"interactions"})),s("div",{class:"dso-card-content"},s("slot",{name:"content"})))}get host(){return a(this)}};o.style=":host .dso-card-selectable,:host .dso-card-image{grid-row:span 2}*,*::after,*::before{box-sizing:border-box}:host{display:block}:host .dso-card-heading{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}@media screen and (max-width: 480px){:host .dso-card-heading{flex-wrap:wrap}}:host .dso-card-image{margin-right:8px}";export{o as dso_card}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,f as e,r as s,c as n,h as o,H as i,a as r}from"./p-8f35c8f8.js";const a=t=>!("isConnected"in t)||t.isConnected,c=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(a))})(...e)}),2e3)}})(),l=t=>"function"==typeof t?t():t,h=class{constructor(o){s(this,o),this.dsoToggleSection=n(this,"dsoToggleSection",7),this.variant="default",this.reverseAlign=!1,this.allowMultipleOpen=!1;const{state:i}=((s,n)=>{const o=((t,e=((t,e)=>t!==e))=>{const s=l(t);let n=new Map(Object.entries(null!=s?s:{}));const o={dispose:[],get:[],set:[],reset:[]},i=()=>{var e;n=new Map(Object.entries(null!==(e=l(t))&&void 0!==e?e:{})),o.reset.forEach((t=>t()))},r=t=>(o.get.forEach((e=>e(t))),n.get(t)),a=(t,s)=>{const i=n.get(t);e(s,i,t)&&(n.set(t,s),o.set.forEach((e=>e(t,s,i))))},c="undefined"==typeof Proxy?{}:new Proxy(s,{get:(t,e)=>r(e),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>n.has(e),set:(t,e,s)=>(a(e,s),!0)}),h=(t,e)=>(o[t].push(e),()=>{((t,e)=>{const s=t.indexOf(e);s>=0&&(t[s]=t[t.length-1],t.length--)})(o[t],e)});return{state:c,get:r,set:a,on:h,onChange:(e,s)=>{const n=h("set",((t,n)=>{t===e&&s(n)})),o=h("reset",(()=>s(l(t)[e])));return()=>{n(),o()}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(h("set",e.set)),e.get&&t.push(h("get",e.get)),e.reset&&t.push(h("reset",e.reset)),e.dispose&&t.push(h("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{o.dispose.forEach((t=>t())),i()},reset:i,forceUpdate:t=>{const e=n.get(t);o.set.forEach((s=>s(t,e,e)))}}})(s,n);return o.use((()=>{if("function"!=typeof t)return{};const s=new Map;return{dispose:()=>s.clear(),get:e=>{const n=t();n&&((t,e,s)=>{const n=t.get(e);n?n.includes(s)||n.push(s):t.set(e,[s])})(s,e,n)},set:t=>{const n=s.get(t);n&&s.set(t,n.filter(e)),c(s)},reset:()=>{s.forEach((t=>t.forEach(e))),c(s)}}})()),o})({variant:this.variant||"default",reverseAlign:this.reverseAlign,allowMultipleOpen:this.allowMultipleOpen});this.accordionState=i}updateVariant(t="default"){this.accordionState.variant=t||"default"}updateReverseAlign(t){this.accordionState.reverseAlign=t}updateAllowMultipleOpen(t){this.accordionState.allowMultipleOpen=t}watchAllowMultiple(t){if(!t){const t=Array.from(this.host.querySelectorAll(":scope > dso-accordion-section[open]"));t.shift(),t.forEach((t=>this.controlOpenAttribute(t,!1)))}}async getState(){return this.accordionState}async toggleSection(t,e){const s=Array.from(this.host.querySelectorAll(":scope > dso-accordion-section"));if("number"==typeof t&&(t=s[t]),!(t instanceof HTMLElement&&s.includes(t)))return;const n=this.isSectionOpen(t);return this.allowMultipleOpen?(this.controlOpenAttribute(t,!n),this.emitToggleEvent(t,s,e),!n):n?(this.controlOpenAttribute(t,!1),this.emitToggleEvent(t,s,e),!1):(await this.closeOpenSections(),this.controlOpenAttribute(t,!0),this.emitToggleEvent(t,s,e),!0)}async closeOpenSections(){Array.from(this.host.querySelectorAll(":scope > dso-accordion-section")).filter((t=>this.isSectionOpen(t))).forEach((t=>this.controlOpenAttribute(t,!1)))}componentWillLoad(){this.accordionState.variant!==this.variant&&(this.accordionState.variant=this.variant||"default"),this.accordionState.reverseAlign!==this.reverseAlign&&(this.accordionState.reverseAlign=this.reverseAlign),this.accordionState.allowMultipleOpen!==this.allowMultipleOpen&&(this.accordionState.allowMultipleOpen=this.allowMultipleOpen)}render(){return o(i,{class:{"dso-accordion":!0}},o("slot",null))}emitToggleEvent(t,e,s){this.dsoToggleSection.emit({originalEvent:s,section:{element:t,open:this.isSectionOpen(t)},sections:e})}isSectionOpen(t){return"string"==typeof t.getAttribute("open")}controlOpenAttribute(t,e){e?t.setAttribute("open",""):t.removeAttribute("open")}get host(){return r(this)}static get watchers(){return{variant:["updateVariant"],reverseAlign:["updateReverseAlign"],allowMultipleOpen:["updateAllowMultipleOpen","watchAllowMultiple"]}}};h.style=":host{display:block}*,*::after,*::before{box-sizing:border-box}";export{h as dso_accordion}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as d,h as s,F as t,a as r}from"./p-8f35c8f8.js";import{c as a}from"./p-57ceabab.js";import{v as e}from"./p-5d7f4ff2.js";import"./p-3635427a.js";const i=class{constructor(s){o(this,s),this.dsoClose=d(this,"dsoClose",7),this.ariaId=e(),this.hasFooter=void 0,this.modalTitle=void 0,this.role="dialog",this.showCloseButton=!0,this.initialFocus=void 0}componentWillLoad(){this.hasFooter=null!==this.host.querySelector("*[slot = 'footer']")}componentDidLoad(){this.setFocusTrap()}disconnectedCallback(){var o;null===(o=this.trap)||void 0===o||o.deactivate({onDeactivate:()=>{}})}render(){return s(t,null,s("div",{class:"dso-modal-overlay"}),s("div",{class:"dso-modal",role:this.role,"aria-modal":"true","aria-labelledby":this.ariaId,ref:o=>this.modalElement=o},s("div",{class:"dso-dialog",role:"document",ref:o=>this.dialogElement=o},this.modalTitle?s("div",{class:"dso-header"},s("h2",{id:this.ariaId},this.modalTitle),this.showCloseButton&&s("button",{type:"button",class:"dso-close",onClick:o=>this.dsoClose.emit({originalEvent:o})},s("dso-icon",{icon:"times"}),s("span",{class:"sr-only"},"Sluiten"))):s("span",{class:"sr-only",id:this.ariaId},"Dialoog"),s("div",{class:"dso-body"},s("slot",{name:"body"})),this.hasFooter&&s("div",{class:"dso-footer"},s("slot",{name:"footer"})))))}setFocusTrap(){this.dialogElement&&!this.trap&&(this.trap=a(this.dialogElement,{initialFocus:()=>{var o,d,s;if(this.initialFocus){const o=this.host.querySelector(this.initialFocus);if(o)return o;console.warn(`element '${this.initialFocus}' could not be found`)}return null!==(s=null!==(o=this.host.querySelector("div[slot='footer'] .dso-primary"))&&void 0!==o?o:null===(d=this.modalElement)||void 0===d?void 0:d.querySelector(".dso-close"))&&void 0!==s&&s},allowOutsideClick:!0,escapeDeactivates:!0,tabbableOptions:{getShadowRoot:!0},clickOutsideDeactivates:o=>o instanceof MouseEvent&&o.composedPath()[0]===this.modalElement,onDeactivate:()=>{delete this.trap,this.dsoClose.emit({originalEvent:void 0})}}).activate())}get host(){return r(this)}};i.style="@keyframes slideInFromTop{0%{opacity:0}100%{opacity:1}}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}button{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}button[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}.dso-modal{bottom:0;height:100%;left:0;position:fixed;right:0;top:0;z-index:530}.dso-modal .dso-dialog{animation:1s ease-out 0s 1 slideInFromTop;margin-top:15vh;margin-left:auto;margin-right:auto;max-width:640px;opacity:1;background-color:#fff;box-shadow:0 8px 24px 0 rgba(25, 25, 25, 0.4)}.dso-modal .dso-header{border-bottom:1px solid #ccc;padding:16px;position:relative}.dso-modal .dso-header h2{color:#275937;margin:0;max-width:calc(100% - 24px)}.dso-modal .dso-header .dso-close{background-color:transparent;border:0;height:32px;padding:0;position:absolute;right:13px;text-align:center;top:16px;width:32px}.dso-modal .dso-body{height:calc(100% - 96px - 1.5rem);max-height:calc(70vh - 144px - 1.5em);min-height:1.5rem;overflow-x:auto;padding:32px}.dso-modal .dso-body p{margin:0 0 16px}.dso-modal .dso-body ul,.dso-modal .dso-body ol{margin-bottom:16px}.dso-modal .dso-body ul:not(.list-group):not(.dso-link-list):not(.dso-columns-list),.dso-modal .dso-body ol:not(.list-group):not(.dso-link-list):not(.dso-columns-list){padding-inline-start:24px}.dso-modal .dso-body pre{margin:0 0 16px}.dso-modal .dso-body blockquote{padding:16px 24px}.dso-modal .dso-body dso-highlight-box,.dso-modal .dso-body .dso-highlight-box{margin-bottom:24px}.dso-modal .dso-body img{height:auto;max-width:100%}.dso-modal .dso-footer{min-height:80px;padding:0 32px 32px;text-align:right}@media screen and (max-width: 767px){.dso-modal .dso-footer .btn+.btn,.dso-modal .dso-footer .btn+.dso-primary,.dso-modal .dso-footer .btn+.dso-secondary,.dso-modal .dso-footer .btn+.dso-tertiary,.dso-modal .dso-footer .dso-primary+.btn,.dso-modal .dso-footer .dso-primary+.dso-primary,.dso-modal .dso-footer .dso-primary+.dso-secondary,.dso-modal .dso-footer .dso-primary+.dso-tertiary,.dso-modal .dso-footer .dso-secondary+.btn,.dso-modal .dso-footer .dso-secondary+.dso-primary,.dso-modal .dso-footer .dso-secondary+.dso-secondary,.dso-modal .dso-footer .dso-secondary+.dso-tertiary,.dso-modal .dso-footer .dso-tertiary+.btn,.dso-modal .dso-footer .dso-tertiary+.dso-primary,.dso-modal .dso-footer .dso-tertiary+.dso-secondary,.dso-modal .dso-footer .dso-tertiary+.dso-tertiary{margin-left:0}.dso-modal .dso-footer button{text-align:center;width:100%}.dso-modal .dso-footer button+button{margin-top:8px}.dso-modal .dso-footer button.dso-tertiary,.dso-modal .dso-footer button.dso-tertiary span,.dso-modal .dso-footer button.btn-link,.dso-modal .dso-footer button.btn-link span{float:none}}@media screen and (min-width: 768px){.dso-modal .dso-footer .btn+.dso-secondary,.dso-modal .dso-footer .btn+.btn-default,.dso-modal .dso-footer .dso-primary+.dso-secondary,.dso-modal .dso-footer .dso-primary+.btn-default,.dso-modal .dso-footer .dso-secondary+.dso-secondary,.dso-modal .dso-footer .dso-secondary+.btn-default,.dso-modal .dso-footer .dso-tertiary+.dso-secondary,.dso-modal .dso-footer .dso-tertiary+.btn-default{margin-left:16px}.dso-modal .dso-footer .btn+.dso-tertiary,.dso-modal .dso-footer .btn+.btn-link,.dso-modal .dso-footer .dso-primary+.dso-tertiary,.dso-modal .dso-footer .dso-primary+.btn-link,.dso-modal .dso-footer .dso-secondary+.dso-tertiary,.dso-modal .dso-footer .dso-secondary+.btn-link,.dso-modal .dso-footer .dso-tertiary+.dso-tertiary,.dso-modal .dso-footer .dso-tertiary+.btn-link{margin-left:0}}@media screen and (max-width: 767px){.dso-modal .dso-dialog{max-width:100%;margin-top:0}.dso-modal .dso-footer .btn+.btn,.dso-modal .dso-footer .btn+.dso-primary,.dso-modal .dso-footer .btn+.dso-secondary,.dso-modal .dso-footer .btn+.dso-tertiary,.dso-modal .dso-footer .dso-primary+.btn,.dso-modal .dso-footer .dso-primary+.dso-primary,.dso-modal .dso-footer .dso-primary+.dso-secondary,.dso-modal .dso-footer .dso-primary+.dso-tertiary,.dso-modal .dso-footer .dso-secondary+.btn,.dso-modal .dso-footer .dso-secondary+.dso-primary,.dso-modal .dso-footer .dso-secondary+.dso-secondary,.dso-modal .dso-footer .dso-secondary+.dso-tertiary,.dso-modal .dso-footer .dso-tertiary+.btn,.dso-modal .dso-footer .dso-tertiary+.dso-primary,.dso-modal .dso-footer .dso-tertiary+.dso-secondary,.dso-modal .dso-footer .dso-tertiary+.dso-tertiary{margin-left:0}.dso-modal .dso-footer button{text-align:center;width:100%}.dso-modal .dso-footer button+button{margin-top:8px}.dso-modal .dso-footer button.dso-tertiary,.dso-modal .dso-footer button.dso-tertiary span,.dso-modal .dso-footer button.btn-link,.dso-modal .dso-footer button.btn-link span{float:none}}.dso-modal-overlay{background-color:rgba(255, 255, 255, 0.8);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:529}.dso-close dso-icon{color:#39870c}";export{i as dso_modal}
|