@siemens/ix 2.0.0 → 2.0.1
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/components/_commonjsHelpers.js +21 -0
- package/components/_commonjsHelpers.js.map +1 -0
- package/components/a11y.js +79 -0
- package/components/a11y.js.map +1 -0
- package/components/animation.js +19 -0
- package/components/animation.js.map +1 -0
- package/components/anime.es.js +1311 -0
- package/components/anime.es.js.map +1 -0
- package/components/application-header.js +95 -0
- package/components/application-header.js.map +1 -0
- package/components/avatar.js +53 -0
- package/components/avatar.js.map +1 -0
- package/components/base-button.js +47 -0
- package/components/base-button.js.map +1 -0
- package/components/base-icon-button.js +18 -0
- package/components/base-icon-button.js.map +1 -0
- package/components/breadcrumb-item.js +92 -0
- package/components/breadcrumb-item.js.map +1 -0
- package/components/breakpoints.js +25 -0
- package/components/breakpoints.js.map +1 -0
- package/components/burger-menu.js +55 -0
- package/components/burger-menu.js.map +1 -0
- package/components/button.js +91 -0
- package/components/button.js.map +1 -0
- package/components/card-accordion.js +72 -0
- package/components/card-accordion.js.map +1 -0
- package/components/card-content.js +32 -0
- package/components/card-content.js.map +1 -0
- package/components/card-title.js +32 -0
- package/components/card-title.js.map +1 -0
- package/components/card.js +36 -0
- package/components/card.js.map +1 -0
- package/components/context.js +101 -0
- package/components/context.js.map +1 -0
- package/components/custom-elements.d.ts +10 -0
- package/components/date-picker.js +372 -0
- package/components/date-picker.js.map +1 -0
- package/components/date-time-card.js +45 -0
- package/components/date-time-card.js.map +1 -0
- package/components/default-tree-item.js +22 -0
- package/components/default-tree-item.js.map +1 -0
- package/components/divider.js +32 -0
- package/components/divider.js.map +1 -0
- package/components/dropdown-item.js +69 -0
- package/components/dropdown-item.js.map +1 -0
- package/components/dropdown.js +346 -0
- package/components/dropdown.js.map +1 -0
- package/components/filter-chip.js +56 -0
- package/components/filter-chip.js.map +1 -0
- package/components/flip-tile-state.js +20 -0
- package/components/flip-tile-state.js.map +1 -0
- package/components/floating-ui.dom.esm.js +1512 -0
- package/components/floating-ui.dom.esm.js.map +1 -0
- package/components/group-context-menu.js +73 -0
- package/components/group-context-menu.js.map +1 -0
- package/components/group-item.js +58 -0
- package/components/group-item.js.map +1 -0
- package/components/icon-button.js +99 -0
- package/components/icon-button.js.map +1 -0
- package/components/index.d.ts +27 -0
- package/components/index.js +101 -0
- package/components/index.js.map +1 -0
- package/components/ix-action-card.d.ts +11 -0
- package/components/ix-action-card.js +66 -0
- package/components/ix-action-card.js.map +1 -0
- package/components/ix-application-header.d.ts +11 -0
- package/components/ix-application-header.js +8 -0
- package/components/ix-application-header.js.map +1 -0
- package/components/ix-application-sidebar.d.ts +11 -0
- package/components/ix-application-sidebar.js +63 -0
- package/components/ix-application-sidebar.js.map +1 -0
- package/components/ix-application.d.ts +11 -0
- package/components/ix-application.js +128 -0
- package/components/ix-application.js.map +1 -0
- package/components/ix-avatar.d.ts +11 -0
- package/components/ix-avatar.js +8 -0
- package/components/ix-avatar.js.map +1 -0
- package/components/ix-basic-navigation.d.ts +11 -0
- package/components/ix-basic-navigation.js +132 -0
- package/components/ix-basic-navigation.js.map +1 -0
- package/components/ix-blind.d.ts +11 -0
- package/components/ix-blind.js +128 -0
- package/components/ix-blind.js.map +1 -0
- package/components/ix-breadcrumb-item.d.ts +11 -0
- package/components/ix-breadcrumb-item.js +8 -0
- package/components/ix-breadcrumb-item.js.map +1 -0
- package/components/ix-breadcrumb.d.ts +11 -0
- package/components/ix-breadcrumb.js +151 -0
- package/components/ix-breadcrumb.js.map +1 -0
- package/components/ix-burger-menu.d.ts +11 -0
- package/components/ix-burger-menu.js +8 -0
- package/components/ix-burger-menu.js.map +1 -0
- package/components/ix-button.d.ts +11 -0
- package/components/ix-button.js +8 -0
- package/components/ix-button.js.map +1 -0
- package/components/ix-card-accordion.d.ts +11 -0
- package/components/ix-card-accordion.js +8 -0
- package/components/ix-card-accordion.js.map +1 -0
- package/components/ix-card-content.d.ts +11 -0
- package/components/ix-card-content.js +8 -0
- package/components/ix-card-content.js.map +1 -0
- package/components/ix-card-list.d.ts +11 -0
- package/components/ix-card-list.js +228 -0
- package/components/ix-card-list.js.map +1 -0
- package/components/ix-card-title.d.ts +11 -0
- package/components/ix-card-title.js +8 -0
- package/components/ix-card-title.js.map +1 -0
- package/components/ix-card.d.ts +11 -0
- package/components/ix-card.js +8 -0
- package/components/ix-card.js.map +1 -0
- package/components/ix-category-filter.d.ts +11 -0
- package/components/ix-category-filter.js +464 -0
- package/components/ix-category-filter.js.map +1 -0
- package/components/ix-chip.d.ts +11 -0
- package/components/ix-chip.js +98 -0
- package/components/ix-chip.js.map +1 -0
- package/components/ix-col.d.ts +11 -0
- package/components/ix-col.js +96 -0
- package/components/ix-col.js.map +1 -0
- package/components/ix-content-header.d.ts +11 -0
- package/components/ix-content-header.js +63 -0
- package/components/ix-content-header.js.map +1 -0
- package/components/ix-content.d.ts +11 -0
- package/components/ix-content.js +48 -0
- package/components/ix-content.js.map +1 -0
- package/components/ix-css-grid-item.d.ts +11 -0
- package/components/ix-css-grid-item.js +40 -0
- package/components/ix-css-grid-item.js.map +1 -0
- package/components/ix-css-grid.d.ts +11 -0
- package/components/ix-css-grid.js +113 -0
- package/components/ix-css-grid.js.map +1 -0
- package/components/ix-date-picker.d.ts +11 -0
- package/components/ix-date-picker.js +8 -0
- package/components/ix-date-picker.js.map +1 -0
- package/components/ix-date-time-card.d.ts +11 -0
- package/components/ix-date-time-card.js +8 -0
- package/components/ix-date-time-card.js.map +1 -0
- package/components/ix-datetime-picker.d.ts +11 -0
- package/components/ix-datetime-picker.js +149 -0
- package/components/ix-datetime-picker.js.map +1 -0
- package/components/ix-divider.d.ts +11 -0
- package/components/ix-divider.js +8 -0
- package/components/ix-divider.js.map +1 -0
- package/components/ix-drawer.d.ts +11 -0
- package/components/ix-drawer.js +145 -0
- package/components/ix-drawer.js.map +1 -0
- package/components/ix-dropdown-button.d.ts +11 -0
- package/components/ix-dropdown-button.js +92 -0
- package/components/ix-dropdown-button.js.map +1 -0
- package/components/ix-dropdown-header.d.ts +11 -0
- package/components/ix-dropdown-header.js +44 -0
- package/components/ix-dropdown-header.js.map +1 -0
- package/components/ix-dropdown-item.d.ts +11 -0
- package/components/ix-dropdown-item.js +8 -0
- package/components/ix-dropdown-item.js.map +1 -0
- package/components/ix-dropdown-quick-actions.d.ts +11 -0
- package/components/ix-dropdown-quick-actions.js +35 -0
- package/components/ix-dropdown-quick-actions.js.map +1 -0
- package/components/ix-dropdown.d.ts +11 -0
- package/components/ix-dropdown.js +8 -0
- package/components/ix-dropdown.js.map +1 -0
- package/components/ix-empty-state.d.ts +11 -0
- package/components/ix-empty-state.js +65 -0
- package/components/ix-empty-state.js.map +1 -0
- package/components/ix-event-list-item.d.ts +11 -0
- package/components/ix-event-list-item.js +61 -0
- package/components/ix-event-list-item.js.map +1 -0
- package/components/ix-event-list.d.ts +11 -0
- package/components/ix-event-list.js +143 -0
- package/components/ix-event-list.js.map +1 -0
- package/components/ix-expanding-search.d.ts +11 -0
- package/components/ix-expanding-search.js +119 -0
- package/components/ix-expanding-search.js.map +1 -0
- package/components/ix-filter-chip.d.ts +11 -0
- package/components/ix-filter-chip.js +8 -0
- package/components/ix-filter-chip.js.map +1 -0
- package/components/ix-flip-tile-content.d.ts +11 -0
- package/components/ix-flip-tile-content.js +38 -0
- package/components/ix-flip-tile-content.js.map +1 -0
- package/components/ix-flip-tile.d.ts +11 -0
- package/components/ix-flip-tile.js +121 -0
- package/components/ix-flip-tile.js.map +1 -0
- package/components/ix-form-field.d.ts +11 -0
- package/components/ix-form-field.js +43 -0
- package/components/ix-form-field.js.map +1 -0
- package/components/ix-group-context-menu.d.ts +11 -0
- package/components/ix-group-context-menu.js +8 -0
- package/components/ix-group-context-menu.js.map +1 -0
- package/components/ix-group-item.d.ts +11 -0
- package/components/ix-group-item.js +8 -0
- package/components/ix-group-item.js.map +1 -0
- package/components/ix-group.d.ts +11 -0
- package/components/ix-group.js +178 -0
- package/components/ix-group.js.map +1 -0
- package/components/ix-icon-button.d.ts +11 -0
- package/components/ix-icon-button.js +8 -0
- package/components/ix-icon-button.js.map +1 -0
- package/components/ix-icon-toggle-button.d.ts +11 -0
- package/components/ix-icon-toggle-button.js +116 -0
- package/components/ix-icon-toggle-button.js.map +1 -0
- package/components/ix-input-group.d.ts +11 -0
- package/components/ix-input-group.js +130 -0
- package/components/ix-input-group.js.map +1 -0
- package/components/ix-key-value-list.d.ts +11 -0
- package/components/ix-key-value-list.js +38 -0
- package/components/ix-key-value-list.js.map +1 -0
- package/components/ix-key-value.d.ts +11 -0
- package/components/ix-key-value.js +47 -0
- package/components/ix-key-value.js.map +1 -0
- package/components/ix-kpi.d.ts +11 -0
- package/components/ix-kpi.js +69 -0
- package/components/ix-kpi.js.map +1 -0
- package/components/ix-layout-grid.d.ts +11 -0
- package/components/ix-layout-grid.js +47 -0
- package/components/ix-layout-grid.js.map +1 -0
- package/components/ix-link-button.d.ts +11 -0
- package/components/ix-link-button.js +48 -0
- package/components/ix-link-button.js.map +1 -0
- package/components/ix-map-navigation-overlay.d.ts +11 -0
- package/components/ix-map-navigation-overlay.js +8 -0
- package/components/ix-map-navigation-overlay.js.map +1 -0
- package/components/ix-map-navigation.d.ts +11 -0
- package/components/ix-map-navigation.js +226 -0
- package/components/ix-map-navigation.js.map +1 -0
- package/components/ix-menu-about-item.d.ts +11 -0
- package/components/ix-menu-about-item.js +38 -0
- package/components/ix-menu-about-item.js.map +1 -0
- package/components/ix-menu-about-news.d.ts +11 -0
- package/components/ix-menu-about-news.js +83 -0
- package/components/ix-menu-about-news.js.map +1 -0
- package/components/ix-menu-about.d.ts +11 -0
- package/components/ix-menu-about.js +119 -0
- package/components/ix-menu-about.js.map +1 -0
- package/components/ix-menu-avatar-item.d.ts +11 -0
- package/components/ix-menu-avatar-item.js +8 -0
- package/components/ix-menu-avatar-item.js.map +1 -0
- package/components/ix-menu-avatar.d.ts +11 -0
- package/components/ix-menu-avatar.js +77 -0
- package/components/ix-menu-avatar.js.map +1 -0
- package/components/ix-menu-category.d.ts +11 -0
- package/components/ix-menu-category.js +190 -0
- package/components/ix-menu-category.js.map +1 -0
- package/components/ix-menu-item.d.ts +11 -0
- package/components/ix-menu-item.js +8 -0
- package/components/ix-menu-item.js.map +1 -0
- package/components/ix-menu-settings-item.d.ts +11 -0
- package/components/ix-menu-settings-item.js +38 -0
- package/components/ix-menu-settings-item.js.map +1 -0
- package/components/ix-menu-settings.d.ts +11 -0
- package/components/ix-menu-settings.js +106 -0
- package/components/ix-menu-settings.js.map +1 -0
- package/components/ix-menu.d.ts +11 -0
- package/components/ix-menu.js +508 -0
- package/components/ix-menu.js.map +1 -0
- package/components/ix-message-bar.d.ts +11 -0
- package/components/ix-message-bar.js +87 -0
- package/components/ix-message-bar.js.map +1 -0
- package/components/ix-modal-content.d.ts +11 -0
- package/components/ix-modal-content.js +35 -0
- package/components/ix-modal-content.js.map +1 -0
- package/components/ix-modal-example.d.ts +11 -0
- package/components/ix-modal-example.js +58 -0
- package/components/ix-modal-example.js.map +1 -0
- package/components/ix-modal-footer.d.ts +11 -0
- package/components/ix-modal-footer.js +35 -0
- package/components/ix-modal-footer.js.map +1 -0
- package/components/ix-modal-header.d.ts +11 -0
- package/components/ix-modal-header.js +84 -0
- package/components/ix-modal-header.js.map +1 -0
- package/components/ix-modal-loading.d.ts +11 -0
- package/components/ix-modal-loading.js +41 -0
- package/components/ix-modal-loading.js.map +1 -0
- package/components/ix-modal.d.ts +11 -0
- package/components/ix-modal.js +156 -0
- package/components/ix-modal.js.map +1 -0
- package/components/ix-pagination.d.ts +11 -0
- package/components/ix-pagination.js +211 -0
- package/components/ix-pagination.js.map +1 -0
- package/components/ix-pill.d.ts +11 -0
- package/components/ix-pill.js +78 -0
- package/components/ix-pill.js.map +1 -0
- package/components/ix-push-card.d.ts +11 -0
- package/components/ix-push-card.js +80 -0
- package/components/ix-push-card.js.map +1 -0
- package/components/ix-row.d.ts +11 -0
- package/components/ix-row.js +35 -0
- package/components/ix-row.js.map +1 -0
- package/components/ix-select-item.d.ts +11 -0
- package/components/ix-select-item.js +8 -0
- package/components/ix-select-item.js.map +1 -0
- package/components/ix-select.d.ts +11 -0
- package/components/ix-select.js +8 -0
- package/components/ix-select.js.map +1 -0
- package/components/ix-slider.d.ts +11 -0
- package/components/ix-slider.js +192 -0
- package/components/ix-slider.js.map +1 -0
- package/components/ix-spinner.d.ts +11 -0
- package/components/ix-spinner.js +8 -0
- package/components/ix-spinner.js.map +1 -0
- package/components/ix-split-button-item.d.ts +11 -0
- package/components/ix-split-button-item.js +51 -0
- package/components/ix-split-button-item.js.map +1 -0
- package/components/ix-split-button.d.ts +11 -0
- package/components/ix-split-button.js +97 -0
- package/components/ix-split-button.js.map +1 -0
- package/components/ix-tab-item.d.ts +11 -0
- package/components/ix-tab-item.js +8 -0
- package/components/ix-tab-item.js.map +1 -0
- package/components/ix-tabs.d.ts +11 -0
- package/components/ix-tabs.js +8 -0
- package/components/ix-tabs.js.map +1 -0
- package/components/ix-tile.d.ts +11 -0
- package/components/ix-tile.js +59 -0
- package/components/ix-tile.js.map +1 -0
- package/components/ix-time-picker.d.ts +11 -0
- package/components/ix-time-picker.js +8 -0
- package/components/ix-time-picker.js.map +1 -0
- package/components/ix-toast-container.d.ts +11 -0
- package/components/ix-toast-container.js +124 -0
- package/components/ix-toast-container.js.map +1 -0
- package/components/ix-toast.d.ts +11 -0
- package/components/ix-toast.js +8 -0
- package/components/ix-toast.js.map +1 -0
- package/components/ix-toggle-button.d.ts +11 -0
- package/components/ix-toggle-button.js +105 -0
- package/components/ix-toggle-button.js.map +1 -0
- package/components/ix-toggle.d.ts +11 -0
- package/components/ix-toggle.js +62 -0
- package/components/ix-toggle.js.map +1 -0
- package/components/ix-tooltip.d.ts +11 -0
- package/components/ix-tooltip.js +8 -0
- package/components/ix-tooltip.js.map +1 -0
- package/components/ix-tree-item.d.ts +11 -0
- package/components/ix-tree-item.js +8 -0
- package/components/ix-tree-item.js.map +1 -0
- package/components/ix-tree.d.ts +11 -0
- package/components/ix-tree.js +727 -0
- package/components/ix-tree.js.map +1 -0
- package/components/ix-typography.d.ts +11 -0
- package/components/ix-typography.js +8 -0
- package/components/ix-typography.js.map +1 -0
- package/components/ix-upload.d.ts +11 -0
- package/components/ix-upload.js +147 -0
- package/components/ix-upload.js.map +1 -0
- package/components/ix-validation-tooltip.d.ts +11 -0
- package/components/ix-validation-tooltip.js +170 -0
- package/components/ix-validation-tooltip.js.map +1 -0
- package/components/ix-workflow-step.d.ts +11 -0
- package/components/ix-workflow-step.js +120 -0
- package/components/ix-workflow-step.js.map +1 -0
- package/components/ix-workflow-steps.d.ts +11 -0
- package/components/ix-workflow-steps.js +99 -0
- package/components/ix-workflow-steps.js.map +1 -0
- package/components/logical-filter-operator.js +35 -0
- package/components/logical-filter-operator.js.map +1 -0
- package/components/luxon.js +7828 -0
- package/components/luxon.js.map +1 -0
- package/components/map-navigation-overlay.js +89 -0
- package/components/map-navigation-overlay.js.map +1 -0
- package/components/menu-avatar-item.js +45 -0
- package/components/menu-avatar-item.js.map +1 -0
- package/components/menu-item.js +92 -0
- package/components/menu-item.js.map +1 -0
- package/components/menu-service.js +156 -0
- package/components/menu-service.js.map +1 -0
- package/components/modal.js +245 -0
- package/components/modal.js.map +1 -0
- package/components/mutation-observer.js +13 -0
- package/components/mutation-observer.js.map +1 -0
- package/components/my-component.d.ts +11 -0
- package/components/my-component.js +34 -0
- package/components/my-component.js.map +1 -0
- package/components/package.json +8 -0
- package/components/rwd.util.js +41 -0
- package/components/rwd.util.js.map +1 -0
- package/components/select-item.js +92 -0
- package/components/select-item.js.map +1 -0
- package/components/select.js +410 -0
- package/components/select.js.map +1 -0
- package/components/shadow-dom.js +21 -0
- package/components/shadow-dom.js.map +1 -0
- package/components/spinner.js +48 -0
- package/components/spinner.js.map +1 -0
- package/components/tab-item.js +87 -0
- package/components/tab-item.js.map +1 -0
- package/components/tabs.js +227 -0
- package/components/tabs.js.map +1 -0
- package/components/theme-switcher.js +123 -0
- package/components/theme-switcher.js.map +1 -0
- package/components/time-picker.js +252 -0
- package/components/time-picker.js.map +1 -0
- package/components/toast.js +105 -0
- package/components/toast.js.map +1 -0
- package/components/tooltip.js +197 -0
- package/components/tooltip.js.map +1 -0
- package/components/tree-item.js +51 -0
- package/components/tree-item.js.map +1 -0
- package/components/typed-event.js +46 -0
- package/components/typed-event.js.map +1 -0
- package/components/typography.js +76 -0
- package/components/typography.js.map +1 -0
- package/components/upload-file-state.js +19 -0
- package/components/upload-file-state.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const dropdownQuickActionsCss = ":host{display:flex;justify-content:center;align-items:center;-webkit-margin-start:1.5rem;margin-inline-start:1.5rem;-webkit-margin-end:1.5rem;margin-inline-end:1.5rem;-webkit-margin-after:0.25rem;margin-block-end:0.25rem}:host slot::slotted(*){display:flex;-webkit-margin-end:0.625rem;margin-inline-end:0.625rem}";
|
|
4
|
+
|
|
5
|
+
const DropdownQuickActions = /*@__PURE__*/ proxyCustomElement(class DropdownQuickActions extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, h("slot", null)));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return dropdownQuickActionsCss; }
|
|
15
|
+
}, [1, "ix-dropdown-quick-actions"]);
|
|
16
|
+
function defineCustomElement$1() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["ix-dropdown-quick-actions"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "ix-dropdown-quick-actions":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, DropdownQuickActions);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const IxDropdownQuickActions = DropdownQuickActions;
|
|
31
|
+
const defineCustomElement = defineCustomElement$1;
|
|
32
|
+
|
|
33
|
+
export { IxDropdownQuickActions, defineCustomElement };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ix-dropdown-quick-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-dropdown-quick-actions.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,0TAA0T;;MCkB7U,oBAAoB;;;;;;EAC/B,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/dropdown-quick-actions/dropdown-quick-actions.scss?tag=ix-dropdown-quick-actions&encapsulation=shadow","./src/components/dropdown-quick-actions/dropdown-quick-actions.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n\n:host {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-inline-start: $large-space;\n margin-inline-end: $large-space;\n margin-block-end: $tiny-space;\n\n slot::slotted(*) {\n display: flex;\n margin-inline-end: 0.625rem;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Component, h, Host } from '@stencil/core';\n\n/**\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-dropdown-quick-actions',\n styleUrl: 'dropdown-quick-actions.scss',\n shadow: true,\n})\nexport class DropdownQuickActions {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxDropdown extends Components.IxDropdown, HTMLElement {}
|
|
4
|
+
export const IxDropdown: {
|
|
5
|
+
prototype: IxDropdown;
|
|
6
|
+
new (): IxDropdown;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-dropdown.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxEmptyState extends Components.IxEmptyState, HTMLElement {}
|
|
4
|
+
export const IxEmptyState: {
|
|
5
|
+
prototype: IxEmptyState;
|
|
6
|
+
new (): IxEmptyState;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$4 } from './button.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './spinner.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './typography.js';
|
|
5
|
+
|
|
6
|
+
const emptyStateCss = ":host{}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .label__subHeader{color:var(--theme-color-soft-text)}:host(.emptyState.emptyState--large){display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem}:host(.emptyState.emptyState--large) .emptyState__icon{width:3.5rem;height:3.5rem;display:flex;justify-content:center;align-items:center}:host(.emptyState.emptyState--large) .emptyState__icon ix-icon{transform:scale(1.75)}:host(.emptyState.emptyState--large) .emptyState__content{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1.5rem}:host(.emptyState.emptyState--large) .emptyState__content .content__label{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0.5rem}:host(.emptyState.emptyState--compact){display:flex;flex-direction:row;justify-content:center;align-items:center;gap:1rem}:host(.emptyState.emptyState--compact) .emptyState__icon{display:flex;flex-direction:row;align-items:center;height:2.5rem}:host(.emptyState.emptyState--compact) .emptyState__content{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:1rem}:host(.emptyState.emptyState--compactBreak){display:flex;flex-direction:row;align-items:flex-start;gap:1rem}:host(.emptyState.emptyState--compactBreak) .emptyState__icon{display:flex;flex-direction:row;align-items:center;height:2.5rem}:host(.emptyState.emptyState--compactBreak) .emptyState__content{display:flex;flex-direction:column;align-items:flex-start;gap:0.5rem}";
|
|
7
|
+
|
|
8
|
+
const EmptyState = /*@__PURE__*/ proxyCustomElement(class EmptyState extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
14
|
+
this.layout = 'large';
|
|
15
|
+
this.icon = undefined;
|
|
16
|
+
this.header = undefined;
|
|
17
|
+
this.subHeader = undefined;
|
|
18
|
+
this.action = undefined;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, { class: `emptyState emptyState--${this.layout}` }, this.icon && (h("div", { class: "emptyState__icon" }, h("ix-icon", { name: this.icon, size: this.layout === 'large' ? '32' : '32', color: "color-soft-text" }))), h("div", { class: "emptyState__content" }, h("div", { class: "content__label" }, h("ix-typography", { variant: this.layout === 'large' ? 'display-large' : 'default' }, this.header), this.subHeader && (h("div", { class: "label__subHeader" }, this.subHeader))), this.action && (h("div", { class: "content__action" }, h("ix-button", { onClick: () => this.actionClick.emit() }, this.action))))));
|
|
22
|
+
}
|
|
23
|
+
static get style() { return emptyStateCss; }
|
|
24
|
+
}, [1, "ix-empty-state", {
|
|
25
|
+
"layout": [1],
|
|
26
|
+
"icon": [1],
|
|
27
|
+
"header": [1],
|
|
28
|
+
"subHeader": [1, "sub-header"],
|
|
29
|
+
"action": [1]
|
|
30
|
+
}]);
|
|
31
|
+
function defineCustomElement$1() {
|
|
32
|
+
if (typeof customElements === "undefined") {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const components = ["ix-empty-state", "ix-button", "ix-spinner", "ix-typography"];
|
|
36
|
+
components.forEach(tagName => { switch (tagName) {
|
|
37
|
+
case "ix-empty-state":
|
|
38
|
+
if (!customElements.get(tagName)) {
|
|
39
|
+
customElements.define(tagName, EmptyState);
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
case "ix-button":
|
|
43
|
+
if (!customElements.get(tagName)) {
|
|
44
|
+
defineCustomElement$4();
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
case "ix-spinner":
|
|
48
|
+
if (!customElements.get(tagName)) {
|
|
49
|
+
defineCustomElement$3();
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
case "ix-typography":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
defineCustomElement$2();
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const IxEmptyState = EmptyState;
|
|
61
|
+
const defineCustomElement = defineCustomElement$1;
|
|
62
|
+
|
|
63
|
+
export { IxEmptyState, defineCustomElement };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=ix-empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-empty-state.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,iiEAAiiE;;MCqB1iE,UAAU;;;;;;kBAIc,OAAO;;;;;;EA2B1C,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,0BAA0B,IAAI,CAAC,MAAM,EAAE,IACjD,IAAI,CAAC,IAAI,KACR,WAAK,KAAK,EAAC,kBAAkB,IAE3B,eACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO,GAAG,IAAI,GAAG,IAAI,EAC3C,KAAK,EAAC,iBAAiB,GACvB,CACE,CACP,EAED,WAAK,KAAK,EAAC,qBAAqB,IAC9B,WAAK,KAAK,EAAC,gBAAgB,IACzB,qBACE,OAAO,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO,GAAG,eAAe,GAAG,SAAS,IAE7D,IAAI,CAAC,MAAM,CACE,EAEf,IAAI,CAAC,SAAS,KACb,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,SAAS,CAAO,CACrD,CACG,EAEL,IAAI,CAAC,MAAM,KACV,WAAK,KAAK,EAAC,iBAAiB,IAC1B,iBAAW,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAC9C,IAAI,CAAC,MAAM,CACF,CACR,CACP,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/empty-state/empty-state.scss?tag=ix-empty-state&encapsulation=shadow","./src/components/empty-state/empty-state.tsx"],"sourcesContent":["@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n .label__subHeader {\n color: var(--theme-color-soft-text);\n }\n}\n\n:host(.emptyState.emptyState--large) {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: $default-space;\n\n .emptyState__icon {\n width: 3.5rem;\n height: 3.5rem;\n display: flex;\n justify-content: center;\n align-items: center;\n\n ix-icon {\n transform: scale(1.75);\n }\n }\n\n .emptyState__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: $large-space;\n\n .content__label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: $small-space;\n }\n }\n}\n\n:host(.emptyState.emptyState--compact) {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: $default-space;\n\n .emptyState__icon {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: $large-control-height;\n }\n\n .emptyState__content {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: $default-space;\n }\n}\n\n:host(.emptyState.emptyState--compactBreak) {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: $default-space;\n\n .emptyState__icon {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: $large-control-height;\n }\n\n .emptyState__content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: $small-space;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\nexport type EmptyStateLayout = 'large' | 'compact' | 'compactBreak';\n\n/**\n * @since 1.6.0\n */\n@Component({\n tag: 'ix-empty-state',\n styleUrl: 'empty-state.scss',\n shadow: true,\n})\nexport class EmptyState {\n /**\n * Optional empty state layout - one of 'large', 'compact' or 'compactBreak'\n */\n @Prop() layout: EmptyStateLayout = 'large';\n\n /**\n * Optional empty state icon\n */\n @Prop() icon: string;\n\n /**\n * Empty state header\n */\n @Prop() header!: string;\n\n /**\n * Optional empty state sub header\n */\n @Prop() subHeader: string;\n\n /**\n * Optional empty state action\n */\n @Prop() action: string;\n\n /**\n * Empty state action click event\n */\n @Event() actionClick: EventEmitter<void>;\n\n render() {\n return (\n <Host class={`emptyState emptyState--${this.layout}`}>\n {this.icon && (\n <div class=\"emptyState__icon\">\n {/* TODO: replace size for large layout with '56' if available */}\n <ix-icon\n name={this.icon}\n size={this.layout === 'large' ? '32' : '32'}\n color=\"color-soft-text\"\n />\n </div>\n )}\n\n <div class=\"emptyState__content\">\n <div class=\"content__label\">\n <ix-typography\n variant={this.layout === 'large' ? 'display-large' : 'default'}\n >\n {this.header}\n </ix-typography>\n\n {this.subHeader && (\n <div class=\"label__subHeader\">{this.subHeader}</div>\n )}\n </div>\n\n {this.action && (\n <div class=\"content__action\">\n <ix-button onClick={() => this.actionClick.emit()}>\n {this.action}\n </ix-button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxEventListItem extends Components.IxEventListItem, HTMLElement {}
|
|
4
|
+
export const IxEventListItem: {
|
|
5
|
+
prototype: IxEventListItem;
|
|
6
|
+
new (): IxEventListItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const eventListItemCss = ":host{}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .event-list-item{display:flex;align-items:center;position:relative;height:var(--event-list-item-height, 2.5rem);max-height:var(--event-list-item-height, 2.5rem);border-radius:var(--event-list-item-border-radius, 0.25rem);background-color:var(--theme-event-item--background);overflow:hidden;transition:150ms;cursor:pointer;margin-bottom:var(--event-list-item-margin-bottom, 0.5rem)}:host .event-list-item .indicator{height:100%;width:0.5rem;max-width:0.5rem;min-width:0.5rem;border-top-left-radius:var(--event-list-item-border-radius, 0.25rem);border-bottom-left-radius:var(--event-list-item-border-radius, 0.25rem)}:host .event-list-item .indicator-empty{border:var(--theme-weak-bdr-1);border-right:none}:host .event-list-item .event-list-item-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;flex-grow:1;width:calc(100% - (1rem + 0.5rem));height:100%;border:0.062rem solid;border-color:var(--theme-event-item--border);border-top-left-radius:0;border-top-right-radius:var(--event-list-item-border-radius, 0.25rem);border-bottom-left-radius:0;border-bottom-right-radius:var(--event-list-item-border-radius, 0.25rem);border-left:none;padding-left:1rem}:host .event-list-item .event-content{display:flex;align-items:center;width:100%;height:var(--event-list-item-height, 100%);max-height:var(--event-list-item-height, 100%);white-space:var(--event-list-item-content-white-space, inherit);overflow:hidden}:host .event-list-item .chevron-icon{margin-left:auto;margin-right:0.5rem;opacity:0.6;align-self:center}:host .event-list-item:not(.selected):not(.disabled):not(:disabled){cursor:pointer}:host .event-list-item:not(.selected):not(.disabled):not(:disabled):hover{background-color:var(--theme-event-item--background--hover)}:host .event-list-item:not(.selected):not(.disabled):not(:disabled){cursor:pointer}:host .event-list-item:not(.selected):not(.disabled):not(:disabled):active,:host .event-list-item:not(.selected):not(.disabled):not(:disabled).active{background-color:var(--theme-event-item--background--active)}:host .event-list-item:not(.selected) .event-list-item-container:not(.disabled):not(:disabled){cursor:pointer}:host .event-list-item:not(.selected) .event-list-item-container:not(.disabled):not(:disabled):hover{border-color:var(--theme-event-item--border--hover)}:host .event-list-item:not(.selected) .event-list-item-container:not(.disabled):not(:disabled){cursor:pointer}:host .event-list-item:not(.selected) .event-list-item-container:not(.disabled):not(:disabled):active,:host .event-list-item:not(.selected) .event-list-item-container:not(.disabled):not(:disabled).active{border-color:var(--theme-event-item--border--active)}:host .event-list-item.selected .event-list-item-container{background-color:var(--theme-event-item--background--selected);border-color:var(--theme-event-item--border--selected)}:host .event-list-item[disabled],:host .event-list-item.disabled{pointer-events:none}:host .event-list-item[disabled] .event-list-item-container,:host .event-list-item.disabled .event-list-item-container{background-color:var(--theme-event-item--background--disabled);border-color:var(--theme-event-item--border--disabled)}:host(.disabled){pointer-events:none}";
|
|
4
|
+
|
|
5
|
+
const EventListItem = /*@__PURE__*/ proxyCustomElement(class EventListItem extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.itemClick = createEvent(this, "itemClick", 7);
|
|
11
|
+
this.color = undefined;
|
|
12
|
+
this.selected = undefined;
|
|
13
|
+
this.disabled = undefined;
|
|
14
|
+
this.chevron = undefined;
|
|
15
|
+
}
|
|
16
|
+
handleItemClick() {
|
|
17
|
+
this.itemClick.emit();
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
var _a;
|
|
21
|
+
const color = ((_a = this.color) === null || _a === void 0 ? void 0 : _a.startsWith('--theme'))
|
|
22
|
+
? `var(${this.color})`
|
|
23
|
+
: `var(--theme-${this.color})`;
|
|
24
|
+
return (h(Host, { class: {
|
|
25
|
+
disabled: this.disabled,
|
|
26
|
+
} }, h("div", { class: {
|
|
27
|
+
'event-list-item': true,
|
|
28
|
+
selected: this.selected,
|
|
29
|
+
disabled: this.disabled,
|
|
30
|
+
} }, h("div", { class: `indicator ${!this.color ? 'indicator-empty' : ''}`, style: {
|
|
31
|
+
'background-color': this.color ? color : 'inherit',
|
|
32
|
+
opacity: `${this.disabled ? 0.4 : 1}`,
|
|
33
|
+
} }), h("div", { class: "event-list-item-container" }, h("div", { class: "event-content" }, h("slot", null)), this.chevron && (h("ix-icon", { name: 'chevron-right', size: "16", class: "chevron-icon" }))))));
|
|
34
|
+
}
|
|
35
|
+
static get style() { return eventListItemCss; }
|
|
36
|
+
}, [1, "ix-event-list-item", {
|
|
37
|
+
"color": [1],
|
|
38
|
+
"selected": [4],
|
|
39
|
+
"disabled": [4],
|
|
40
|
+
"chevron": [4]
|
|
41
|
+
}, [[1, "click", "handleItemClick"]]]);
|
|
42
|
+
function defineCustomElement$1() {
|
|
43
|
+
if (typeof customElements === "undefined") {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const components = ["ix-event-list-item"];
|
|
47
|
+
components.forEach(tagName => { switch (tagName) {
|
|
48
|
+
case "ix-event-list-item":
|
|
49
|
+
if (!customElements.get(tagName)) {
|
|
50
|
+
customElements.define(tagName, EventListItem);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
} });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const IxEventListItem = EventListItem;
|
|
57
|
+
const defineCustomElement = defineCustomElement$1;
|
|
58
|
+
|
|
59
|
+
export { IxEventListItem, defineCustomElement };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=ix-event-list-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-event-list-item.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,yvHAAyvH;;MCwBrwH,aAAa;;;;;;;;;;;EA+BxB,eAAe;IACb,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;GACvB;EAED,MAAM;;IACJ,MAAM,KAAK,GAAG,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,UAAU,CAAC,SAAS,CAAC;QAC3C,OAAO,IAAI,CAAC,KAAK,GAAG;QACpB,eAAe,IAAI,CAAC,KAAK,GAAG,CAAC;IAEjC,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;OACxB,IAED,WACE,KAAK,EAAE;QACL,iBAAiB,EAAE,IAAI;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;OACxB,IAED,WACE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,GAAG,iBAAiB,GAAG,EAAE,EAAE,EAC1D,KAAK,EAAE;QACL,kBAAkB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,SAAS;QAClD,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC,EAAE;OACtC,GACI,EAEP,WAAK,KAAK,EAAC,2BAA2B,IACpC,WAAK,KAAK,EAAC,eAAe,IACxB,eAAa,CACT,EACL,IAAI,CAAC,OAAO,KACX,eACE,IAAI,EAAE,eAAe,EACrB,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,cAAc,GACX,CACZ,CACG,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/event-list-item/event-list-item.scss?tag=ix-event-list-item&encapsulation=shadow","./src/components/event-list-item/event-list-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'mixins/text-truncation';\n@import 'mixins/hover';\n@import 'mixins/shadow-dom/component';\n@import 'mixins/shadow-dom/host-disabled';\n@import 'common-variables';\n\n$default-event-list-item-height: 2.5rem;\n\n:host {\n @include ix-component;\n\n .event-list-item {\n display: flex;\n align-items: center;\n position: relative;\n height: var(--event-list-item-height, $default-event-list-item-height);\n max-height: var(--event-list-item-height, $default-event-list-item-height);\n border-radius: var(--event-list-item-border-radius, $default-border-radius);\n background-color: var(--theme-event-item--background);\n overflow: hidden;\n transition: $default-time;\n cursor: pointer;\n margin-bottom: var(--event-list-item-margin-bottom, $small-space);\n\n .indicator {\n height: 100%;\n width: $small-space;\n max-width: $small-space;\n min-width: $small-space;\n border-top-left-radius: var(\n --event-list-item-border-radius,\n $default-border-radius\n );\n border-bottom-left-radius: var(\n --event-list-item-border-radius,\n $default-border-radius\n );\n }\n\n .indicator-empty {\n border: var(--theme-weak-bdr-1);\n border-right: none;\n }\n\n .event-list-item-container {\n @include ellipsis;\n\n display: flex;\n flex-grow: 1;\n width: calc(100% - (#{$default-space} + #{$small-space}));\n height: 100%;\n border: 0.062rem solid;\n border-color: var(--theme-event-item--border);\n border-top-left-radius: 0;\n border-top-right-radius: var(\n --event-list-item-border-radius,\n $default-border-radius\n );\n border-bottom-left-radius: 0;\n border-bottom-right-radius: var(\n --event-list-item-border-radius,\n $default-border-radius\n );\n border-left: none;\n padding-left: $default-space;\n }\n\n .event-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: var(--event-list-item-height, 100%);\n max-height: var(--event-list-item-height, 100%);\n white-space: var(--event-list-item-content-white-space, inherit);\n overflow: hidden;\n }\n\n .chevron-icon {\n margin-left: auto;\n margin-right: $small-space;\n opacity: 0.6;\n align-self: center;\n }\n\n &:not(.selected) {\n @include hover {\n background-color: var(--theme-event-item--background--hover);\n }\n\n @include active {\n background-color: var(--theme-event-item--background--active);\n }\n\n .event-list-item-container {\n @include hover {\n border-color: var(--theme-event-item--border--hover);\n }\n\n @include active {\n border-color: var(--theme-event-item--border--active);\n }\n }\n }\n\n &.selected .event-list-item-container {\n background-color: var(--theme-event-item--background--selected);\n border-color: var(--theme-event-item--border--selected);\n }\n\n &[disabled],\n &.disabled {\n pointer-events: none;\n\n .event-list-item-container {\n background-color: var(--theme-event-item--background--disabled);\n border-color: var(--theme-event-item--border--disabled);\n }\n }\n }\n}\n\n@include host-disabled;\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-event-list-item',\n styleUrl: 'event-list-item.scss',\n shadow: true,\n})\nexport class EventListItem {\n /**\n * Color of the status indicator.\n * You can find a list of all available colors in our documentation.\n * Example values are `--theme-color-alarm` or `color-alarm`\n *\n * @see https://ix.siemens.io/docs/theming/colors/\n */\n @Prop() color: string;\n\n /**\n * Show event list item as selected\n */\n @Prop() selected: boolean;\n\n /**\n * Disable event list item\n */\n @Prop() disabled: boolean;\n\n /**\n * Show chevron on right side of the event list item\n */\n @Prop() chevron: boolean;\n\n /**\n * Event list item click\n */\n @Event() itemClick: EventEmitter;\n\n @Listen('click', { passive: true })\n handleItemClick() {\n this.itemClick.emit();\n }\n\n render() {\n const color = this.color?.startsWith('--theme')\n ? `var(${this.color})`\n : `var(--theme-${this.color})`;\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n }}\n >\n <div\n class={{\n 'event-list-item': true,\n selected: this.selected,\n disabled: this.disabled,\n }}\n >\n <div\n class={`indicator ${!this.color ? 'indicator-empty' : ''}`}\n style={{\n 'background-color': this.color ? color : 'inherit',\n opacity: `${this.disabled ? 0.4 : 1}`,\n }}\n ></div>\n\n <div class=\"event-list-item-container\">\n <div class=\"event-content\">\n <slot></slot>\n </div>\n {this.chevron && (\n <ix-icon\n name={'chevron-right'}\n size=\"16\"\n class=\"chevron-icon\"\n ></ix-icon>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxEventList extends Components.IxEventList, HTMLElement {}
|
|
4
|
+
export const IxEventList: {
|
|
5
|
+
prototype: IxEventList;
|
|
6
|
+
new (): IxEventList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as createMutationObserver } from './mutation-observer.js';
|
|
3
|
+
import { a as convertToRemString } from './rwd.util.js';
|
|
4
|
+
|
|
5
|
+
const eventListCss = ":host{display:block;position:relative}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host ul{list-style:none;padding:0;margin-bottom:0}:host(.item-size-l){--event-list-item-height:6.5rem;--event-list-item-content-white-space:normal}:host(.compact){--event-list-item-border-radius:0;--event-list-item-margin-bottom:0}";
|
|
6
|
+
|
|
7
|
+
const EventList = /*@__PURE__*/ proxyCustomElement(class EventList extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
this.mutationObserver = createMutationObserver(this.onMutation.bind(this));
|
|
13
|
+
this.itemHeight = 'S';
|
|
14
|
+
this.compact = false;
|
|
15
|
+
this.animated = true;
|
|
16
|
+
this.chevron = undefined;
|
|
17
|
+
}
|
|
18
|
+
watchChevron(chevron) {
|
|
19
|
+
this.handleChevron(chevron);
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
if (this.animated) {
|
|
23
|
+
this.triggerFadeIn();
|
|
24
|
+
}
|
|
25
|
+
if (!Number.isNaN(Number(this.itemHeight))) {
|
|
26
|
+
const height = convertToRemString(this.itemHeight);
|
|
27
|
+
this.hostElement
|
|
28
|
+
.querySelectorAll('ix-event-list-item')
|
|
29
|
+
.forEach((item) => {
|
|
30
|
+
this.setCustomHeight(item, height);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
this.handleChevron(this.chevron);
|
|
34
|
+
this.mutationObserver.observe(this.hostElement, {
|
|
35
|
+
childList: true,
|
|
36
|
+
subtree: true,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
onMutation(mutationRecords) {
|
|
40
|
+
this.triggerFadeOut().then(() => {
|
|
41
|
+
if (typeof this.itemHeight === 'number') {
|
|
42
|
+
const height = convertToRemString(this.itemHeight);
|
|
43
|
+
mutationRecords
|
|
44
|
+
.filter((mutation) => mutation.type === 'childList')
|
|
45
|
+
.forEach((mutation) => mutation.addedNodes.forEach((item) => {
|
|
46
|
+
const itemHtml = item;
|
|
47
|
+
this.setCustomHeight(itemHtml, height);
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
this.handleChevron(this.chevron);
|
|
51
|
+
this.triggerFadeIn();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
setCustomHeight(item, height) {
|
|
55
|
+
item.style.setProperty('--event-list-item-height', height);
|
|
56
|
+
}
|
|
57
|
+
triggerFadeOut() {
|
|
58
|
+
if (!this.animated) {
|
|
59
|
+
return Promise.resolve();
|
|
60
|
+
}
|
|
61
|
+
const keyframes = [
|
|
62
|
+
{
|
|
63
|
+
opacity: 1,
|
|
64
|
+
easing: 'ease-in',
|
|
65
|
+
},
|
|
66
|
+
{ opacity: 0 },
|
|
67
|
+
];
|
|
68
|
+
const listElement = this.hostElement.shadowRoot.querySelector('ul');
|
|
69
|
+
return listElement.animate(keyframes, {
|
|
70
|
+
duration: EventList.fadeOutDuration,
|
|
71
|
+
}).finished;
|
|
72
|
+
}
|
|
73
|
+
triggerFadeIn() {
|
|
74
|
+
if (!this.animated) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const listItems = this.hostElement.querySelectorAll('ix-event-list-item');
|
|
78
|
+
listItems.forEach((e, i) => {
|
|
79
|
+
const delay = i * 80;
|
|
80
|
+
const offset = delay / (delay + EventList.fadeInDuration);
|
|
81
|
+
const keyframes = [
|
|
82
|
+
{ opacity: 0 },
|
|
83
|
+
{ opacity: 0, easing: 'ease-out', offset },
|
|
84
|
+
{ opacity: 1 },
|
|
85
|
+
];
|
|
86
|
+
const options = {
|
|
87
|
+
duration: EventList.fadeInDuration + delay,
|
|
88
|
+
iterations: 1,
|
|
89
|
+
};
|
|
90
|
+
e.animate(keyframes, options);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
handleChevron(chevron) {
|
|
94
|
+
const listItems = this.hostElement.querySelectorAll('ix-event-list-item');
|
|
95
|
+
listItems.forEach((e) => {
|
|
96
|
+
if (chevron) {
|
|
97
|
+
e.setAttribute('chevron', 'true');
|
|
98
|
+
}
|
|
99
|
+
else if (chevron !== undefined) {
|
|
100
|
+
e.removeAttribute('chevron');
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
return (h(Host, { class: {
|
|
106
|
+
'item-size-s': this.itemHeight === 'S',
|
|
107
|
+
'item-size-l': this.itemHeight === 'L',
|
|
108
|
+
compact: this.compact,
|
|
109
|
+
} }, h("ul", null, h("slot", null))));
|
|
110
|
+
}
|
|
111
|
+
get hostElement() { return this; }
|
|
112
|
+
static get watchers() { return {
|
|
113
|
+
"chevron": ["watchChevron"]
|
|
114
|
+
}; }
|
|
115
|
+
static get style() { return eventListCss; }
|
|
116
|
+
}, [1, "ix-event-list", {
|
|
117
|
+
"itemHeight": [8, "item-height"],
|
|
118
|
+
"compact": [4],
|
|
119
|
+
"animated": [4],
|
|
120
|
+
"chevron": [4]
|
|
121
|
+
}]);
|
|
122
|
+
EventList.fadeOutDuration = 50;
|
|
123
|
+
EventList.fadeInDuration = 150;
|
|
124
|
+
function defineCustomElement$1() {
|
|
125
|
+
if (typeof customElements === "undefined") {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const components = ["ix-event-list"];
|
|
129
|
+
components.forEach(tagName => { switch (tagName) {
|
|
130
|
+
case "ix-event-list":
|
|
131
|
+
if (!customElements.get(tagName)) {
|
|
132
|
+
customElements.define(tagName, EventList);
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
} });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const IxEventList = EventList;
|
|
139
|
+
const defineCustomElement = defineCustomElement$1;
|
|
140
|
+
|
|
141
|
+
export { IxEventList, defineCustomElement };
|
|
142
|
+
|
|
143
|
+
//# sourceMappingURL=ix-event-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-event-list.js","mappings":"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","names":[],"sources":["./src/components/event-list/event-list.scss?tag=ix-event-list&encapsulation=shadow","./src/components/event-list/event-list.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: block;\n position: relative;\n\n ul {\n list-style: none;\n padding: 0;\n margin-bottom: 0;\n }\n}\n\n:host(.item-size-l) {\n --event-list-item-height: 6.5rem;\n --event-list-item-content-white-space: normal;\n}\n\n:host(.compact) {\n --event-list-item-border-radius: 0;\n --event-list-item-margin-bottom: 0;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\n\n@Component({\n tag: 'ix-event-list',\n styleUrl: 'event-list.scss',\n shadow: true,\n})\nexport class EventList {\n private readonly mutationObserver = createMutationObserver(\n this.onMutation.bind(this)\n );\n\n private static readonly fadeOutDuration = 50;\n private static readonly fadeInDuration = 150;\n\n @Element() hostElement!: HTMLIxEventListElement;\n\n /**\n * Determines the height of list items.\n * This can either be one of two predefined sizes ('S' or 'L') or an absolute pixel value.\n * In case a number is supplied it will get converted to rem internally.\n * Defaults to 'S'.\n */\n @Prop() itemHeight: 'S' | 'L' | number = 'S';\n\n /**\n * Make event-list items more compact\n */\n @Prop() compact = false;\n\n /**\n * Animate state change transitions. Defaults to 'true'.\n */\n @Prop() animated = true;\n\n /**\n * Display a chevron icon in list items. Defaults to 'false'\n */\n @Prop() chevron: boolean;\n\n @Watch('chevron')\n watchChevron(chevron: boolean | undefined) {\n this.handleChevron(chevron);\n }\n\n componentDidLoad() {\n if (this.animated) {\n this.triggerFadeIn();\n }\n\n if (!Number.isNaN(Number(this.itemHeight))) {\n const height = convertToRemString(this.itemHeight as number);\n this.hostElement\n .querySelectorAll('ix-event-list-item')\n .forEach((item) => {\n this.setCustomHeight(item as HTMLElement, height);\n });\n }\n\n this.handleChevron(this.chevron);\n\n this.mutationObserver.observe(this.hostElement, {\n childList: true,\n subtree: true,\n });\n }\n\n private onMutation(mutationRecords: Array<MutationRecord>) {\n this.triggerFadeOut().then(() => {\n if (typeof this.itemHeight === 'number') {\n const height = convertToRemString(this.itemHeight);\n\n mutationRecords\n .filter((mutation) => mutation.type === 'childList')\n .forEach((mutation) =>\n mutation.addedNodes.forEach((item) => {\n const itemHtml = item as HTMLElement;\n\n this.setCustomHeight(itemHtml, height);\n })\n );\n }\n\n this.handleChevron(this.chevron);\n\n this.triggerFadeIn();\n });\n }\n\n private setCustomHeight(item: HTMLElement, height: string) {\n item.style.setProperty('--event-list-item-height', height);\n }\n\n private triggerFadeOut(): Promise<any> {\n if (!this.animated) {\n return Promise.resolve();\n }\n\n const keyframes = [\n {\n opacity: 1,\n easing: 'ease-in',\n },\n { opacity: 0 },\n ];\n const listElement = this.hostElement.shadowRoot.querySelector('ul');\n return listElement.animate(keyframes, {\n duration: EventList.fadeOutDuration,\n }).finished;\n }\n\n private triggerFadeIn() {\n if (!this.animated) {\n return;\n }\n\n const listItems = this.hostElement.querySelectorAll('ix-event-list-item');\n listItems.forEach((e, i) => {\n const delay = i * 80;\n const offset = delay / (delay + EventList.fadeInDuration);\n const keyframes = [\n { opacity: 0 },\n { opacity: 0, easing: 'ease-out', offset },\n { opacity: 1 },\n ];\n const options = {\n duration: EventList.fadeInDuration + delay,\n iterations: 1,\n };\n e.animate(keyframes, options);\n });\n }\n\n private handleChevron(chevron: boolean | undefined): void {\n const listItems = this.hostElement.querySelectorAll('ix-event-list-item');\n\n listItems.forEach((e) => {\n if (chevron) {\n e.setAttribute('chevron', 'true');\n } else if (chevron !== undefined) {\n e.removeAttribute('chevron');\n }\n });\n }\n\n render() {\n return (\n <Host\n class={{\n 'item-size-s': this.itemHeight === 'S',\n 'item-size-l': this.itemHeight === 'L',\n compact: this.compact,\n }}\n >\n <ul>\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxExpandingSearch extends Components.IxExpandingSearch, HTMLElement {}
|
|
4
|
+
export const IxExpandingSearch: {
|
|
5
|
+
prototype: IxExpandingSearch;
|
|
6
|
+
new (): IxExpandingSearch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
4
|
+
|
|
5
|
+
const expandingSearchCss = ".form-control,.form-control-plaintext{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text);color:var(--theme-input--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--theme-input--border-radius);height:2rem;min-height:2rem;min-width:2rem;background-color:var(--theme-input--background);border:solid 1px var(--theme-input--border-color);box-shadow:var(--theme-input--box-shadow);-webkit-padding-start:0.5rem;padding-inline-start:0.5rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem}.form-control::-moz-placeholder,.form-control-plaintext::-moz-placeholder{color:var(--theme-input-hint--color)}.form-control::placeholder,.form-control-plaintext::placeholder{color:var(--theme-input-hint--color)}.form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled),.form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled){cursor:pointer}.form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled),.form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled){cursor:pointer}.form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover,.form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover);cursor:auto}.form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover,.form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover);cursor:auto}.form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible,.form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline-offset:var(--theme-input--focus--outline-offset);box-shadow:var(--theme-input--box-shadow);outline:1px solid var(--theme-color-focus-bdr)}.form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible,.form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline-offset:var(--theme-input--focus--outline-offset);box-shadow:var(--theme-input--box-shadow);outline:1px solid var(--theme-color-focus-bdr)}.form-control:focus-visible{color:var(--theme-input--color)}.form-control[type=number]{text-align:right}.form-control[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}.form-control.readonly,.form-control[readonly]{background:transparent !important;-webkit-border-before:none !important;border-block-start:none !important;-webkit-border-start:none !important;border-inline-start:none !important;-webkit-border-end:none !important;border-inline-end:none !important;border-radius:0rem}.form-control:-moz-read-only{box-shadow:none !important;outline:none !important;border-color:var(--theme-input--border-color);cursor:default !important}.form-control:read-only,.form-control[readonly],.form-control[readOnly],.form-control.readonly{box-shadow:none !important;outline:none !important;border-color:var(--theme-input--border-color);cursor:default !important}.form-control:read-only::-moz-placeholder,.form-control[readonly]::-moz-placeholder,.form-control[readOnly]::-moz-placeholder,.form-control.readonly::-moz-placeholder{color:transparent}.form-control:-moz-read-only::placeholder{color:transparent}.form-control:read-only::placeholder,.form-control[readonly]::placeholder,.form-control[readOnly]::placeholder,.form-control.readonly::placeholder{color:transparent}.form-control:disabled,.form-control.disabled{background:transparent !important;-webkit-border-before:none !important;border-block-start:none !important;-webkit-border-start:none !important;border-inline-start:none !important;-webkit-border-end:none !important;border-inline-end:none !important;border-radius:0rem;color:var(--theme-color-weak-text);border-color:var(--theme-input--border-color-bottom--disabled)}.form-control:disabled::-moz-placeholder,.form-control.disabled::-moz-placeholder{color:transparent}.form-control:disabled::placeholder,.form-control.disabled::placeholder{color:transparent}.form-control-plaintext{outline:0}.form-group{position:relative}.input-wrapper{display:flex;position:relative;align-items:center;flex-wrap:nowrap}.input-wrapper>.glyph{display:block;position:absolute;-webkit-margin-start:0.312rem;margin-inline-start:0.312rem;color:var(--theme-color-std-text)}.input-wrapper>input{-webkit-padding-start:2.2rem;padding-inline-start:2.2rem}select.form-control{padding:0 0.312rem}textarea.form-control{padding:0.375rem 0.5rem}.was-validated .form-control:invalid,.was-validated .is-invalid{background-color:var(--theme-input-error--background);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: sketchtool 62 (101010) - https://sketch.com --%3E%3Ctitle%3Eerror%3C/title%3E%3Cdesc%3ECreated with sketchtool.%3C/desc%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' fill-opacity='0.75'%3E%3Cg id='error' fill='%23ff2640'%3E%3Cg id='error/error'%3E%3Cpath d='M256,42.6666667 C373.626371,42.6666667 469.333333,138.373627 469.333333,256 C469.333333,373.626371 373.626371,469.333333 256,469.333333 C138.373627,469.333333 42.6666667,373.626371 42.6666667,256 C42.6666667,138.373627 138.373627,42.6666667 256,42.6666667 Z M256,85.3333333 C161.559631,85.3333333 85.3333333,161.559631 85.3333333,256 C85.3333333,350.44037 161.559631,426.666667 256,426.666667 C350.44037,426.666667 426.666667,350.44037 426.666667,256 C426.666667,161.559631 350.44037,85.3333333 256,85.3333333 Z M326.248389,155.581722 L356.418278,185.751611 L286.168667,255.999667 L356.418278,326.248389 L326.248389,356.418278 L255.999667,286.168667 L185.751611,356.418278 L155.581722,326.248389 L225.829667,255.999667 L155.581722,185.751611 L185.751611,155.581722 L255.999667,225.829667 L326.248389,155.581722 Z' id='Combined-Shape'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\") !important;background-position:left calc(0.375em + 0.1875rem) center !important;padding-right:0.75rem;padding-left:calc(1.5em + 0.75rem);background-size:18px;background-repeat:no-repeat}input.disabled,input:disabled{color:var(--theme-input--color--disabled)}input:-moz-read-only{cursor:default}input:read-only,input.readonly{cursor:default}:host{display:inline-flex;width:auto;height:2rem;align-items:center;justify-content:space-between;position:relative;}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .input-container{transition:all 0.3s ease-in-out}:host input{box-shadow:var(--theme-input--box-shadow);cursor:auto !important;width:100%}:host .expanded{width:11.5625rem}:host .expanded.fullWidth{width:100%}:host .collapsed{width:1.5rem;border:none}:host .btn-search-icon{align-self:center;margin:auto;position:relative}:host .btn-search{display:flex;max-width:2rem;max-height:2rem;border-radius:var(--theme-input--border-radius);transition:all 0.15s ease-in-out;z-index:1;align-items:center;position:relative;border:none}:host .btn-search:not(.disabled):not(:disabled){cursor:pointer}:host .btn-search:not(.disabled):not(:disabled):hover{border-color:transparent}:host .btn-search:not(.disabled):not(:disabled){cursor:pointer}:host .btn-search:not(.disabled):not(:disabled):active,:host .btn-search:not(.disabled):not(:disabled).active{border-color:transparent}:host .btn-search:not(.disabled):not(:disabled):focus-visible{outline:none}:host .btn-search:not(.disabled):not(:disabled):focus-visible{outline:var(--focus--border-color);outline-width:1px;outline-style:solid}:host .btn-search.btn-search--expanded{margin-left:0.25rem;pointer-events:none}:host .btn-search:active{width:2rem;height:2rem;border-radius:var(--theme-input--border-radius);border:var(--theme-std-bdr-1) !important}:host .input-container{display:flex;position:absolute;align-items:center;flex-wrap:nowrap}:host .btn-clear{position:absolute;border-radius:var(--theme-input--border-radius);right:0px;margin-right:0.25rem}:host .input{padding-left:2rem !important;padding-right:2.5rem !important}:host .opacity-before{opacity:0}:host .opacity-after{opacity:1}:host(.right-position){width:11.5625rem !important}:host(.right-position.fullWidth){width:100% !important}:host(.right-position.fullWidth) .fullWidth{width:100% !important}";
|
|
6
|
+
|
|
7
|
+
const ExpandingSearch = /*@__PURE__*/ proxyCustomElement(class ExpandingSearch extends HTMLElement {
|
|
8
|
+
expandInput() {
|
|
9
|
+
setTimeout(this.focusTextInput, 300);
|
|
10
|
+
this.expanded = true;
|
|
11
|
+
}
|
|
12
|
+
collapseInput() {
|
|
13
|
+
if (!this.isFieldChanged && this.expanded) {
|
|
14
|
+
this.expanded = false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
clearInput() {
|
|
18
|
+
this.value = '';
|
|
19
|
+
this.isFieldChanged = false;
|
|
20
|
+
}
|
|
21
|
+
onChange(e) {
|
|
22
|
+
this.value = e.target.value;
|
|
23
|
+
if (this.isFieldChanged && this.value === '') {
|
|
24
|
+
this.isFieldChanged = false;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
this.isFieldChanged = true;
|
|
28
|
+
}
|
|
29
|
+
this.valueChange.emit(this.value);
|
|
30
|
+
}
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.__registerHost();
|
|
34
|
+
this.__attachShadow();
|
|
35
|
+
this.valueChange = createEvent(this, "valueChange", 7);
|
|
36
|
+
this.icon = 'search';
|
|
37
|
+
this.placeholder = 'Enter text here';
|
|
38
|
+
this.value = '';
|
|
39
|
+
this.fullWidth = false;
|
|
40
|
+
this.isFieldChanged = false;
|
|
41
|
+
this.expanded = false;
|
|
42
|
+
this.hasFocus = false;
|
|
43
|
+
this.focusTextInput = this.focusTextInput.bind(this);
|
|
44
|
+
}
|
|
45
|
+
focusTextInput() {
|
|
46
|
+
var _a;
|
|
47
|
+
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
48
|
+
}
|
|
49
|
+
clearClicked() {
|
|
50
|
+
var _a;
|
|
51
|
+
this.clearInput();
|
|
52
|
+
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
53
|
+
this.valueChange.emit(this.value);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return (h(Host, { class: {
|
|
57
|
+
expanded: this.expanded,
|
|
58
|
+
'right-position': this.expanded,
|
|
59
|
+
fullWidth: this.fullWidth,
|
|
60
|
+
} }, h("ix-icon-button", { size: this.expanded ? '16' : '24', icon: this.icon, ghost: true, variant: "primary", "data-testid": "button", onClick: () => this.expandInput(), tabindex: this.expanded ? -1 : 0, color: this.hasFocus ? 'input-search-icon--color--focus' : undefined, class: {
|
|
61
|
+
'btn-search': true,
|
|
62
|
+
'btn-search--expanded': this.expanded,
|
|
63
|
+
} }), h("div", { class: {
|
|
64
|
+
expanded: this.expanded,
|
|
65
|
+
fullWidth: this.fullWidth,
|
|
66
|
+
collapsed: !this.expanded,
|
|
67
|
+
'disable-pointer': !this.expanded,
|
|
68
|
+
'input-container': true,
|
|
69
|
+
}, "data-testid": "input-wrapper" }, h("input", { class: {
|
|
70
|
+
'form-control': true,
|
|
71
|
+
input: this.expanded,
|
|
72
|
+
'disable-pointer': !this.expanded,
|
|
73
|
+
'opacity-before': !this.expanded,
|
|
74
|
+
'opacity-after': this.expanded,
|
|
75
|
+
}, ref: (el) => (this.textInput = el), "data-testid": "input", placeholder: this.placeholder, type: "text", value: this.value, onBlur: () => {
|
|
76
|
+
this.collapseInput();
|
|
77
|
+
this.hasFocus = false;
|
|
78
|
+
}, onFocus: () => (this.hasFocus = true), onInput: (e) => this.onChange(e), tabindex: this.expanded ? 0 : -1 }), this.isFieldChanged ? (h("ix-icon-button", { class: "btn-clear", icon: 'clear', ghost: true, size: "16", "data-testid": "clear-button", onClick: () => this.clearClicked() })) : null)));
|
|
79
|
+
}
|
|
80
|
+
static get style() { return expandingSearchCss; }
|
|
81
|
+
}, [1, "ix-expanding-search", {
|
|
82
|
+
"icon": [1],
|
|
83
|
+
"placeholder": [1],
|
|
84
|
+
"value": [1025],
|
|
85
|
+
"fullWidth": [4, "full-width"],
|
|
86
|
+
"isFieldChanged": [32],
|
|
87
|
+
"expanded": [32],
|
|
88
|
+
"hasFocus": [32]
|
|
89
|
+
}]);
|
|
90
|
+
function defineCustomElement$1() {
|
|
91
|
+
if (typeof customElements === "undefined") {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const components = ["ix-expanding-search", "ix-icon-button", "ix-spinner"];
|
|
95
|
+
components.forEach(tagName => { switch (tagName) {
|
|
96
|
+
case "ix-expanding-search":
|
|
97
|
+
if (!customElements.get(tagName)) {
|
|
98
|
+
customElements.define(tagName, ExpandingSearch);
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case "ix-icon-button":
|
|
102
|
+
if (!customElements.get(tagName)) {
|
|
103
|
+
defineCustomElement$3();
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "ix-spinner":
|
|
107
|
+
if (!customElements.get(tagName)) {
|
|
108
|
+
defineCustomElement$2();
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
} });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const IxExpandingSearch = ExpandingSearch;
|
|
115
|
+
const defineCustomElement = defineCustomElement$1;
|
|
116
|
+
|
|
117
|
+
export { IxExpandingSearch, defineCustomElement };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=ix-expanding-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-expanding-search.js","mappings":"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","names":[],"sources":["./src/components/expanding-search/expanding-search.scss?tag=ix-expanding-search&encapsulation=shadow","./src/components/expanding-search/expanding-search.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n@import 'common-variables';\n@import 'legacy/components/forms';\n@import 'mixins/shadow-dom/component';\n@import 'mixins/hover';\n@import 'mixins/text-truncation';\n\n$container-width: 11.5625rem;\n\n:host {\n @include ix-component;\n\n display: inline-flex;\n width: auto;\n height: $x-large-space;\n align-items: center;\n justify-content: space-between;\n position: relative;\n\n .input-container {\n transition: all 0.3s ease-in-out;\n }\n\n input {\n box-shadow: var(--theme-input--box-shadow);\n cursor: auto !important;\n width: 100%;\n }\n\n .expanded {\n width: $container-width;\n\n &.fullWidth {\n width: 100%;\n }\n }\n\n .collapsed {\n width: $large-space;\n border: none;\n }\n\n /*collapsed view*/\n .btn-search-icon {\n align-self: center;\n margin: auto;\n position: relative;\n }\n\n .btn-search {\n display: flex;\n max-width: $x-large-space;\n max-height: $x-large-space;\n border-radius: var(--theme-input--border-radius);\n transition: all 0.15s ease-in-out;\n z-index: 1;\n align-items: center;\n position: relative;\n border: none;\n\n @include hover {\n border-color: transparent;\n }\n\n @include active {\n border-color: transparent;\n }\n\n @include focus {\n outline: none;\n }\n\n @include focus-visible {\n outline: var(--focus--border-color);\n outline-width: 1px;\n outline-style: solid;\n }\n }\n\n .btn-search.btn-search--expanded {\n margin-left: 0.25rem;\n pointer-events: none;\n }\n\n .btn-search:active {\n width: $x-large-space;\n height: $x-large-space;\n border-radius: var(--theme-input--border-radius);\n border: var(--theme-std-bdr-1) !important;\n }\n\n /*expanded view*/\n .input-container {\n display: flex;\n position: absolute;\n align-items: center;\n flex-wrap: nowrap;\n }\n\n .btn-clear {\n position: absolute;\n border-radius: var(--theme-input--border-radius);\n right: 0px;\n margin-right: 0.25rem;\n }\n\n .input {\n padding-left: $x-large-space !important;\n padding-right: 2.5rem !important;\n }\n\n .opacity-before {\n opacity: 0;\n }\n\n .opacity-after {\n opacity: 1;\n }\n}\n\n:host(.right-position) {\n width: $container-width !important;\n}\n\n:host(.right-position.fullWidth) {\n width: 100% !important;\n\n .fullWidth {\n width: 100% !important;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-expanding-search',\n styleUrl: 'expanding-search.scss',\n shadow: true,\n})\nexport class ExpandingSearch {\n /**\n * Search icon\n */\n @Prop() icon = 'search';\n\n /**\n * Placeholder text\n */\n @Prop() placeholder = 'Enter text here';\n\n /**\n * Default value\n */\n @Prop({ mutable: true }) value = '';\n\n /**\n * If true the search field will fill all available horizontal space of it's parent container when expanded.\n * @since 1.6.0\n */\n @Prop() fullWidth = false;\n\n @State() isFieldChanged = false;\n @State() expanded = false;\n @State() hasFocus = false;\n\n /**\n * Value changed\n */\n @Event() valueChange: EventEmitter<string>;\n\n private expandInput() {\n setTimeout(this.focusTextInput, 300);\n this.expanded = true;\n }\n\n private collapseInput() {\n if (!this.isFieldChanged && this.expanded) {\n this.expanded = false;\n }\n }\n\n private clearInput() {\n this.value = '';\n this.isFieldChanged = false;\n }\n\n private onChange(e: InputEvent) {\n this.value = (e.target as HTMLInputElement).value;\n if (this.isFieldChanged && this.value === '') {\n this.isFieldChanged = false;\n } else {\n this.isFieldChanged = true;\n }\n\n this.valueChange.emit(this.value);\n }\n\n private textInput?: HTMLInputElement;\n\n constructor() {\n this.focusTextInput = this.focusTextInput.bind(this);\n }\n\n private focusTextInput() {\n this.textInput?.focus();\n }\n\n private clearClicked() {\n this.clearInput();\n this.textInput?.focus();\n this.valueChange.emit(this.value);\n }\n\n render() {\n return (\n <Host\n class={{\n expanded: this.expanded,\n 'right-position': this.expanded,\n fullWidth: this.fullWidth,\n }}\n >\n <ix-icon-button\n size={this.expanded ? '16' : '24'}\n icon={this.icon}\n ghost\n variant=\"primary\"\n data-testid=\"button\"\n onClick={() => this.expandInput()}\n tabindex={this.expanded ? -1 : 0}\n color={this.hasFocus ? 'input-search-icon--color--focus' : undefined}\n class={{\n 'btn-search': true,\n 'btn-search--expanded': this.expanded,\n }}\n ></ix-icon-button>\n\n <div\n class={{\n expanded: this.expanded,\n fullWidth: this.fullWidth,\n collapsed: !this.expanded,\n 'disable-pointer': !this.expanded,\n 'input-container': true,\n }}\n data-testid=\"input-wrapper\"\n >\n <input\n class={{\n 'form-control': true,\n input: this.expanded,\n 'disable-pointer': !this.expanded,\n 'opacity-before': !this.expanded,\n 'opacity-after': this.expanded,\n }}\n ref={(el) => (this.textInput = el)}\n data-testid=\"input\"\n placeholder={this.placeholder}\n type=\"text\"\n value={this.value}\n onBlur={() => {\n this.collapseInput();\n this.hasFocus = false;\n }}\n onFocus={() => (this.hasFocus = true)}\n onInput={(e: InputEvent) => this.onChange(e)}\n tabindex={this.expanded ? 0 : -1}\n />\n\n {this.isFieldChanged ? (\n <ix-icon-button\n class=\"btn-clear\"\n icon={'clear'}\n ghost={true}\n size=\"16\"\n data-testid=\"clear-button\"\n onClick={() => this.clearClicked()}\n />\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxFilterChip extends Components.IxFilterChip, HTMLElement {}
|
|
4
|
+
export const IxFilterChip: {
|
|
5
|
+
prototype: IxFilterChip;
|
|
6
|
+
new (): IxFilterChip;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { F as FilterChip, d as defineCustomElement$1 } from './filter-chip.js';
|
|
2
|
+
|
|
3
|
+
const IxFilterChip = FilterChip;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { IxFilterChip, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=ix-filter-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-filter-chip.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|