@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,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxSelect extends Components.IxSelect, HTMLElement {}
|
|
4
|
+
export const IxSelect: {
|
|
5
|
+
prototype: IxSelect;
|
|
6
|
+
new (): IxSelect;
|
|
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-select.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxSlider extends Components.IxSlider, HTMLElement {}
|
|
4
|
+
export const IxSlider: {
|
|
5
|
+
prototype: IxSlider;
|
|
6
|
+
new (): IxSlider;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { b as a11yHostAttributes } from './a11y.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './tooltip.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './typography.js';
|
|
5
|
+
|
|
6
|
+
const sliderCss = ":host{display:flex;flex-direction:column;min-height:2rem;--thumb-size:1rem;--value:0;--trace-start:0;--trace-end:0;--trace-reference:0;--trace-reference-color:var(--theme-color-8);--trace-color:var(--theme-color-dynamic);--tick-color:var(--theme-color-7);--tick-color--active:var(--theme-color-dynamic);--track-color:var(--theme-color-component-4);}: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[type=range]{position:absolute;top:50%;transform:translateY(-50%);left:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer;width:100%;height:1rem;margin:0}:host input[type=range].trace::before{content:\"\";position:absolute;display:block;z-index:-1;width:calc(7px + 100% * var(--trace-end) - 16px * var(--trace-end) - (7px + 100% * var(--trace-start) - 16px * var(--trace-start)));left:calc(7px + 100% * var(--trace-start) - 16px * var(--trace-start));height:4px;background-color:var(--trace-color);top:50%;transform:translateY(-50%)}:host input[type=range].trace::after{content:\"\";position:absolute;display:block;width:2px;height:16px;background-color:var(--trace-reference-color);top:50%;transform:translateY(-50%);left:calc(7px + 100% * var(--trace-reference) - 16px * var(--trace-reference))}:host input[type=range]::-webkit-slider-runnable-track{background:transparent;height:0.25rem}:host input[type=range]::-moz-range-track{background:transparent;height:0.25rem}:host input[type=range i]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-6px}:host input[type=range i]::-moz-range-thumb{border:none;border-radius:0}:host input[type=range]::-webkit-slider-thumb{border-radius:100px;background-color:var(--theme-color-dynamic);height:var(--thumb-size);width:var(--thumb-size);-webkit-transition:all var(--theme-default-time) ease-in-out;transition:all var(--theme-default-time) ease-in-out;z-index:10}:host input[type=range]::-moz-range-thumb{border-radius:100px;background-color:var(--theme-color-dynamic);height:var(--thumb-size);width:var(--thumb-size);-moz-transition:all var(--theme-default-time) ease-in-out;transition:all var(--theme-default-time) ease-in-out;z-index:10}:host input[type=range]:hover::-webkit-slider-thumb{transform:scale(1.2);background-color:var(--theme-color-dynamic)}:host input[type=range]:hover::-moz-range-thumb{transform:scale(1.2);background-color:var(--theme-color-dynamic)}:host input[type=range]:active::-webkit-slider-thumb{transform:scale(1.2);background-color:var(--theme-color-dynamic)}:host input[type=range]:active::-moz-range-thumb{transform:scale(1.2);background-color:var(--theme-color-dynamic)}:host input[type=range]:focus{outline:none}:host input[type=range]:focus-visible::-webkit-slider-thumb{outline:1px solid var(--theme-color-focus-bdr);outline-offset:0.125rem}:host input[type=range]:focus-visible::-moz-range-thumb{outline:1px solid var(--theme-color-focus-bdr);outline-offset:0.125rem}:host .ticks{display:flex;position:relative;top:50%;transform:translateY(-50%)}:host .ticks .tick{display:block;position:absolute;width:8px;height:8px;background-color:var(--tick-color);border-radius:100px;top:50%;transform:translateY(-50%);left:calc(var(--tick-value) * 100% - 4px)}:host .ticks .tick.tick-active{background-color:var(--tick-color--active)}:host .slider{position:relative;display:block;width:100%;height:1.5rem}:host .track{position:absolute;background-color:var(--track-color);height:4px;width:calc(100% - 1rem);margin-left:0.5rem;top:50%;transform:translateY(-50%);left:0px}:host .thumb{display:block;position:absolute;background-color:transparent;height:1rem;width:1rem;border-radius:100px;left:0px;top:50%;transform:translateY(-50%)}:host .hide-tooltip{display:none}:host .label{display:flex;position:relative;align-items:center;justify-content:space-between;width:100%;margin-top:0.5rem;min-height:0px}:host .label-start{margin-left:0.5rem}:host .label-end{margin-right:0.5rem}:host .label-error{margin-left:0.5rem}:host(.error){--trace-color:var(--theme-color-alarm-40);--tick-color--active:var(--theme-color-alarm)}:host(.error) input[type=range]::-webkit-slider-thumb{background-color:var(--theme-color-alarm)}:host(.error) input[type=range]::-moz-range-thumb{background-color:var(--theme-color-alarm)}:host(.disabled){pointer-events:none;--track-color:var(--theme-color-component-3);--trace-color:var(--theme-color-3);--tick-color:var(--theme-color-7);--tick-color--active:var(--theme-color-7)}:host(.disabled) input[type=range]::-webkit-slider-thumb{background-color:var(--theme-color-7)}:host(.disabled) input[type=range]::-moz-range-thumb{background-color:var(--theme-color-7)}";
|
|
7
|
+
|
|
8
|
+
function between(min, value, max) {
|
|
9
|
+
if (value < min) {
|
|
10
|
+
return min;
|
|
11
|
+
}
|
|
12
|
+
else if (value > max) {
|
|
13
|
+
return max;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const IxSlider$1 = /*@__PURE__*/ proxyCustomElement(class IxSlider extends HTMLElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.__registerHost();
|
|
23
|
+
this.__attachShadow();
|
|
24
|
+
this.valueChange = createEvent(this, "valueChange", 7);
|
|
25
|
+
this.step = undefined;
|
|
26
|
+
this.min = 0;
|
|
27
|
+
this.max = 100;
|
|
28
|
+
this.value = 0;
|
|
29
|
+
this.marker = undefined;
|
|
30
|
+
this.trace = false;
|
|
31
|
+
this.traceReference = 0;
|
|
32
|
+
this.disabled = false;
|
|
33
|
+
this.error = undefined;
|
|
34
|
+
this.rangeInput = 0;
|
|
35
|
+
this.rangeMin = 0;
|
|
36
|
+
this.rangeMax = 100;
|
|
37
|
+
this.rangeTraceReference = 0;
|
|
38
|
+
this.showTooltip = false;
|
|
39
|
+
}
|
|
40
|
+
get tooltip() {
|
|
41
|
+
return this.hostElement.shadowRoot.querySelector('ix-tooltip');
|
|
42
|
+
}
|
|
43
|
+
get pseudoThumb() {
|
|
44
|
+
return this.hostElement.shadowRoot.querySelector('.thumb');
|
|
45
|
+
}
|
|
46
|
+
get slider() {
|
|
47
|
+
return this.hostElement.shadowRoot.getElementById('slider');
|
|
48
|
+
}
|
|
49
|
+
onShowTooltipChange() {
|
|
50
|
+
if (this.showTooltip) {
|
|
51
|
+
this.tooltip.showTooltip(this.pseudoThumb);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.tooltip.hideTooltip();
|
|
55
|
+
}
|
|
56
|
+
componentWillLoad() {
|
|
57
|
+
this.a11yAttributes = a11yHostAttributes(this.hostElement, [
|
|
58
|
+
'role',
|
|
59
|
+
'aria-valuemin',
|
|
60
|
+
'aria-valuemax',
|
|
61
|
+
'aria-valuenow',
|
|
62
|
+
]);
|
|
63
|
+
this.updateRangeVariables();
|
|
64
|
+
}
|
|
65
|
+
updateRangeVariables() {
|
|
66
|
+
this.rangeInput = between(this.min, this.value, this.max);
|
|
67
|
+
this.rangeTraceReference = between(this.min, this.traceReference, this.max);
|
|
68
|
+
this.rangeMin = Math.min(this.min, this.max);
|
|
69
|
+
this.rangeMax = Math.max(this.min, this.max);
|
|
70
|
+
}
|
|
71
|
+
onInput(event) {
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
const value = parseInt(this.slider.value);
|
|
74
|
+
if (!isNaN(value)) {
|
|
75
|
+
this.rangeInput = value;
|
|
76
|
+
this.emitInputEvent();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
emitInputEvent() {
|
|
80
|
+
this.valueChange.emit(this.rangeInput);
|
|
81
|
+
}
|
|
82
|
+
isMarkerActive(markerValue) {
|
|
83
|
+
const start = Math.min(this.traceReference, this.rangeInput);
|
|
84
|
+
const end = Math.max(this.traceReference, this.rangeInput);
|
|
85
|
+
const value = markerValue;
|
|
86
|
+
return value >= start && value <= end;
|
|
87
|
+
}
|
|
88
|
+
// Listen globally on window because sometimes the event listener
|
|
89
|
+
// of the DOM element input itself is not called if the release
|
|
90
|
+
// click is not inside the element anymore
|
|
91
|
+
onPointerUp() {
|
|
92
|
+
this.showTooltip = false;
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
const range = this.rangeMax - this.rangeMin;
|
|
96
|
+
let traceReferenceInPercentage = (this.rangeTraceReference - this.rangeMin) / range;
|
|
97
|
+
let valueInPercentage = (this.rangeInput - this.rangeMin) / range;
|
|
98
|
+
const distance = valueInPercentage - traceReferenceInPercentage;
|
|
99
|
+
let traceStart = traceReferenceInPercentage;
|
|
100
|
+
let traceEnd = valueInPercentage;
|
|
101
|
+
if (distance <= 0) {
|
|
102
|
+
traceStart = valueInPercentage;
|
|
103
|
+
traceEnd = traceReferenceInPercentage;
|
|
104
|
+
}
|
|
105
|
+
return (h(Host, { class: {
|
|
106
|
+
disabled: this.disabled,
|
|
107
|
+
error: !!this.error,
|
|
108
|
+
}, onPointerDown: () => setTimeout(() => (this.showTooltip = true)) }, h("div", { class: "slider" }, h("div", { class: "track" }, h("div", { class: "thumb", style: {
|
|
109
|
+
left: `calc(${valueInPercentage} * 100% - 8px)`,
|
|
110
|
+
} }), h("div", { class: "ticks" }, this.marker
|
|
111
|
+
? this.marker.map((markerValue) => {
|
|
112
|
+
if (markerValue > this.max || markerValue < this.min) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
let left = (markerValue - this.rangeMin) / range;
|
|
116
|
+
return (h("div", { class: {
|
|
117
|
+
tick: true,
|
|
118
|
+
'tick-active': this.isMarkerActive(markerValue) && this.trace,
|
|
119
|
+
}, style: {
|
|
120
|
+
'--tick-value': `${left}`,
|
|
121
|
+
} }));
|
|
122
|
+
})
|
|
123
|
+
: null)), h("input", Object.assign({ id: "slider", type: "range", list: this.marker ? 'markers' : undefined, step: this.step, min: this.min, max: this.max, value: this.rangeInput, tabindex: this.disabled ? -1 : 0, onInput: (event) => this.onInput(event), style: {
|
|
124
|
+
'--value': `${valueInPercentage}`,
|
|
125
|
+
'--trace-reference': `${traceReferenceInPercentage}`,
|
|
126
|
+
'--trace-start': `${traceStart}`,
|
|
127
|
+
'--trace-end': `${traceEnd}`,
|
|
128
|
+
}, class: {
|
|
129
|
+
trace: this.trace && traceReferenceInPercentage !== valueInPercentage,
|
|
130
|
+
}, onFocus: () => {
|
|
131
|
+
this.showTooltip = true;
|
|
132
|
+
}, onBlur: () => {
|
|
133
|
+
this.showTooltip = false;
|
|
134
|
+
}, role: "slider", "aria-valuenow": this.rangeInput, "aria-valuemin": this.min, "aria-valuemax": this.max }, this.a11yAttributes)), h("ix-tooltip", { class: {
|
|
135
|
+
'hide-tooltip': !this.showTooltip,
|
|
136
|
+
}, animationFrame: true }, this.rangeInput)), h("div", { class: "label" }, h("div", { class: "label-start" }, h("slot", { name: "label-start" })), h("div", { class: "label-end" }, h("slot", { name: "label-end" }))), this.error ? (h("ix-typography", { class: 'label-error', color: "alarm" }, this.error)) : null));
|
|
137
|
+
}
|
|
138
|
+
get hostElement() { return this; }
|
|
139
|
+
static get watchers() { return {
|
|
140
|
+
"showTooltip": ["onShowTooltipChange"],
|
|
141
|
+
"value": ["updateRangeVariables"],
|
|
142
|
+
"max": ["updateRangeVariables"],
|
|
143
|
+
"min": ["updateRangeVariables"],
|
|
144
|
+
"traceReference": ["updateRangeVariables"]
|
|
145
|
+
}; }
|
|
146
|
+
static get style() { return sliderCss; }
|
|
147
|
+
}, [1, "ix-slider", {
|
|
148
|
+
"step": [2],
|
|
149
|
+
"min": [2],
|
|
150
|
+
"max": [2],
|
|
151
|
+
"value": [2],
|
|
152
|
+
"marker": [16],
|
|
153
|
+
"trace": [4],
|
|
154
|
+
"traceReference": [2, "trace-reference"],
|
|
155
|
+
"disabled": [4],
|
|
156
|
+
"error": [8],
|
|
157
|
+
"rangeInput": [32],
|
|
158
|
+
"rangeMin": [32],
|
|
159
|
+
"rangeMax": [32],
|
|
160
|
+
"rangeTraceReference": [32],
|
|
161
|
+
"showTooltip": [32]
|
|
162
|
+
}, [[9, "pointerup", "onPointerUp"]]]);
|
|
163
|
+
function defineCustomElement$1() {
|
|
164
|
+
if (typeof customElements === "undefined") {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const components = ["ix-slider", "ix-tooltip", "ix-typography"];
|
|
168
|
+
components.forEach(tagName => { switch (tagName) {
|
|
169
|
+
case "ix-slider":
|
|
170
|
+
if (!customElements.get(tagName)) {
|
|
171
|
+
customElements.define(tagName, IxSlider$1);
|
|
172
|
+
}
|
|
173
|
+
break;
|
|
174
|
+
case "ix-tooltip":
|
|
175
|
+
if (!customElements.get(tagName)) {
|
|
176
|
+
defineCustomElement$3();
|
|
177
|
+
}
|
|
178
|
+
break;
|
|
179
|
+
case "ix-typography":
|
|
180
|
+
if (!customElements.get(tagName)) {
|
|
181
|
+
defineCustomElement$2();
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
} });
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const IxSlider = IxSlider$1;
|
|
188
|
+
const defineCustomElement = defineCustomElement$1;
|
|
189
|
+
|
|
190
|
+
export { IxSlider, defineCustomElement };
|
|
191
|
+
|
|
192
|
+
//# sourceMappingURL=ix-slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-slider.js","mappings":"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","names":["IxSlider"],"sources":["./src/components/slider/slider.scss?tag=ix-slider&encapsulation=shadow","./src/components/slider/slider.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 'mixins/shadow-dom/component';\n\n@mixin track {\n // Chrome, Safari, Opera, and Edge Chromium\n input[type='range']::-webkit-slider-runnable-track {\n @content;\n }\n\n // Firefox\n input[type='range']::-moz-range-track {\n @content;\n }\n}\n\n@mixin clear-browser-thumb {\n // Chrome, Safari, Opera, and Edge Chromium\n input[type='range' i]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n margin-top: -6px;\n }\n\n // Firefox\n input[type='range' i]::-moz-range-thumb {\n border: none;\n border-radius: 0;\n }\n}\n\n@mixin thumb {\n // Chrome, Safari, Opera, and Edge Chromium\n input[type='range']::-webkit-slider-thumb {\n @content;\n }\n\n // Firefox\n input[type='range']::-moz-range-thumb {\n @content;\n }\n}\n\n@mixin thumb-hover {\n // Chrome, Safari, Opera, and Edge Chromium\n input[type='range']:hover::-webkit-slider-thumb {\n @content;\n }\n\n // Firefox\n input[type='range']:hover::-moz-range-thumb {\n @content;\n }\n}\n\n@mixin thumb-active {\n // Chrome, Safari, Opera, and Edge Chromium\n input[type='range']:active::-webkit-slider-thumb {\n @content;\n }\n\n // Firefox\n input[type='range']:active::-moz-range-thumb {\n @content;\n }\n}\n\n@mixin thumb-focus {\n input[type='range']:focus {\n outline: none;\n }\n\n // Chrome, Safari, Opera, and Edge Chromium\n input[type='range']:focus-visible::-webkit-slider-thumb {\n @content;\n }\n\n // Firefox\n input[type='range']:focus-visible::-moz-range-thumb {\n @content;\n }\n}\n\n:host {\n @include ix-component;\n display: flex;\n flex-direction: column;\n min-height: 2rem;\n --thumb-size: 1rem;\n --value: 0;\n --trace-start: 0;\n --trace-end: 0;\n --trace-reference: 0;\n --trace-reference-color: var(--theme-color-8);\n --trace-color: var(--theme-color-dynamic);\n --tick-color: var(--theme-color-7);\n --tick-color--active: var(--theme-color-dynamic);\n --track-color: var(--theme-color-component-4);\n\n input[type='range'] {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 0;\n appearance: none;\n background: transparent;\n cursor: pointer;\n width: 100%;\n height: 1rem;\n margin: 0;\n }\n\n // Trace line\n input[type='range'].trace::before {\n content: '';\n position: absolute;\n display: block;\n z-index: -1;\n\n width: calc(\n calc(7px + calc(100% * var(--trace-end)) - calc(16px * var(--trace-end))) -\n calc(\n 7px + calc(100% * var(--trace-start)) -\n calc(16px * var(--trace-start))\n )\n );\n\n left: calc(\n 7px + calc(100% * var(--trace-start)) - calc(16px * var(--trace-start))\n );\n\n height: 4px;\n background-color: var(--trace-color);\n top: 50%;\n transform: translateY(-50%);\n }\n\n // Trace reference\n input[type='range'].trace::after {\n content: '';\n position: absolute;\n display: block;\n width: 2px;\n height: 16px;\n background-color: var(--trace-reference-color);\n top: 50%;\n transform: translateY(-50%);\n left: calc(\n 7px + calc(100% * var(--trace-reference)) -\n calc(16px * var(--trace-reference))\n );\n }\n\n @include track() {\n background: transparent;\n height: 0.25rem;\n }\n\n @include clear-browser-thumb();\n\n @include thumb() {\n border-radius: 100px;\n background-color: var(--theme-color-dynamic);\n height: var(--thumb-size);\n width: var(--thumb-size);\n transition: all var(--theme-default-time) ease-in-out;\n z-index: 10;\n }\n\n @include thumb-hover() {\n transform: scale(1.2);\n background-color: var(--theme-color-dynamic);\n }\n\n @include thumb-active() {\n transform: scale(1.2);\n\n background-color: var(--theme-color-dynamic);\n }\n\n @include thumb-focus() {\n outline: 1px solid var(--theme-color-focus-bdr);\n outline-offset: 0.125rem;\n }\n\n /* style datalist */\n .ticks {\n display: flex;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n }\n .ticks .tick {\n display: block;\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: var(--tick-color);\n border-radius: 100px;\n top: 50%;\n transform: translateY(-50%);\n left: calc(var(--tick-value) * 100% - 4px);\n }\n\n .ticks .tick.tick-active {\n background-color: var(--tick-color--active);\n }\n\n .slider {\n position: relative;\n display: block;\n width: 100%;\n height: 1.5rem;\n }\n\n .track {\n position: absolute;\n background-color: var(--track-color);\n height: 4px;\n width: calc(100% - 1rem);\n margin-left: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n left: 0px;\n }\n\n .thumb {\n display: block;\n position: absolute;\n background-color: transparent;\n height: 1rem;\n width: 1rem;\n border-radius: 100px;\n left: 0px;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .hide-tooltip {\n display: none;\n }\n\n .label {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.5rem;\n\n min-height: 0px;\n }\n\n .label-start {\n margin-left: 0.5rem;\n }\n\n .label-end {\n margin-right: 0.5rem;\n }\n\n .label-error {\n margin-left: 0.5rem;\n }\n}\n\n:host(.error) {\n --trace-color: var(--theme-color-alarm-40);\n --tick-color--active: var(--theme-color-alarm);\n\n @include thumb() {\n background-color: var(--theme-color-alarm);\n }\n}\n\n:host(.disabled) {\n pointer-events: none;\n\n --track-color: var(--theme-color-component-3);\n --trace-color: var(--theme-color-3);\n --tick-color: var(--theme-color-7);\n --tick-color--active: var(--theme-color-7);\n\n @include thumb() {\n background-color: var(--theme-color-7);\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 Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { A11yAttributes, a11yHostAttributes } from '../utils/a11y';\n\nexport type SliderMarker = Array<number>;\n\nfunction between(min: number, value: number, max: number) {\n if (value < min) {\n return min;\n } else if (value > max) {\n return max;\n } else {\n return value;\n }\n}\n\n/**\n * @since 2.0.0\n *\n * @slot label-start - Element will be displayed at the start of the slider\n * @slot label-end - Element will be displayed at the end of the slider\n */\n@Component({\n tag: 'ix-slider',\n styleUrl: 'slider.scss',\n shadow: true,\n})\nexport class IxSlider {\n @Element() hostElement!: HTMLIxSliderElement;\n\n /**\n * Legal number intervals\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#step\n */\n @Prop() step: number;\n\n /**\n * Minimum slider value\n */\n @Prop() min = 0;\n\n /**\n * Maximum slider value\n */\n @Prop() max = 100;\n\n /**\n * Current value of the slider\n */\n @Prop() value = 0;\n\n /**\n * Define tick marker on the slider. Marker has to be within slider min/max\n */\n @Prop() marker: SliderMarker;\n\n /**\n * Show a trace line\n */\n @Prop() trace = false;\n\n /**\n * Define the start point of the trace line\n */\n @Prop() traceReference = 0;\n\n /**\n * Show control as disabled\n */\n @Prop() disabled = false;\n\n /**\n * Show error state and message\n */\n @Prop() error: boolean | string;\n\n /**\n *\n */\n @Event() valueChange: EventEmitter<number>;\n\n @State() rangeInput = 0;\n @State() rangeMin = 0;\n @State() rangeMax = 100;\n @State() rangeTraceReference = 0;\n @State() showTooltip = false;\n\n private a11yAttributes: A11yAttributes;\n\n get tooltip() {\n return this.hostElement.shadowRoot.querySelector('ix-tooltip');\n }\n\n get pseudoThumb() {\n return this.hostElement.shadowRoot.querySelector('.thumb') as HTMLElement;\n }\n\n get slider() {\n return this.hostElement.shadowRoot.getElementById(\n 'slider'\n ) as HTMLInputElement;\n }\n\n @Watch('showTooltip')\n onShowTooltipChange() {\n if (this.showTooltip) {\n this.tooltip.showTooltip(this.pseudoThumb);\n return;\n }\n\n this.tooltip.hideTooltip();\n }\n\n componentWillLoad() {\n this.a11yAttributes = a11yHostAttributes(this.hostElement, [\n 'role',\n 'aria-valuemin',\n 'aria-valuemax',\n 'aria-valuenow',\n ]);\n this.updateRangeVariables();\n }\n\n @Watch('value')\n @Watch('max')\n @Watch('min')\n @Watch('traceReference')\n private updateRangeVariables() {\n this.rangeInput = between(this.min, this.value, this.max);\n this.rangeTraceReference = between(this.min, this.traceReference, this.max);\n this.rangeMin = Math.min(this.min, this.max);\n this.rangeMax = Math.max(this.min, this.max);\n }\n\n private onInput(event: InputEvent) {\n event.stopPropagation();\n const value = parseInt(this.slider.value);\n\n if (!isNaN(value)) {\n this.rangeInput = value;\n this.emitInputEvent();\n }\n }\n\n private emitInputEvent() {\n this.valueChange.emit(this.rangeInput);\n }\n\n private isMarkerActive(markerValue: number) {\n const start = Math.min(this.traceReference, this.rangeInput);\n const end = Math.max(this.traceReference, this.rangeInput);\n const value = markerValue;\n\n return value >= start && value <= end;\n }\n\n // Listen globally on window because sometimes the event listener\n // of the DOM element input itself is not called if the release\n // click is not inside the element anymore\n @Listen('pointerup', {\n target: 'window',\n })\n onPointerUp() {\n this.showTooltip = false;\n }\n\n render() {\n const range = this.rangeMax - this.rangeMin;\n\n let traceReferenceInPercentage =\n (this.rangeTraceReference - this.rangeMin) / range;\n\n let valueInPercentage = (this.rangeInput - this.rangeMin) / range;\n\n const distance = valueInPercentage - traceReferenceInPercentage;\n\n let traceStart = traceReferenceInPercentage;\n let traceEnd = valueInPercentage;\n\n if (distance <= 0) {\n traceStart = valueInPercentage;\n traceEnd = traceReferenceInPercentage;\n }\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n error: !!this.error,\n }}\n onPointerDown={() => setTimeout(() => (this.showTooltip = true))}\n >\n <div class=\"slider\">\n <div class=\"track\">\n <div\n class=\"thumb\"\n style={{\n left: `calc(${valueInPercentage} * 100% - 8px)`,\n }}\n ></div>\n <div class=\"ticks\">\n {this.marker\n ? this.marker.map((markerValue) => {\n if (markerValue > this.max || markerValue < this.min) {\n return;\n }\n\n let left = (markerValue - this.rangeMin) / range;\n\n return (\n <div\n class={{\n tick: true,\n 'tick-active':\n this.isMarkerActive(markerValue) && this.trace,\n }}\n style={{\n '--tick-value': `${left}`,\n }}\n ></div>\n );\n })\n : null}\n </div>\n </div>\n\n <input\n id=\"slider\"\n type=\"range\"\n list={this.marker ? 'markers' : undefined}\n step={this.step}\n min={this.min}\n max={this.max}\n value={this.rangeInput}\n tabindex={this.disabled ? -1 : 0}\n onInput={(event) => this.onInput(event)}\n style={{\n '--value': `${valueInPercentage}`,\n '--trace-reference': `${traceReferenceInPercentage}`,\n '--trace-start': `${traceStart}`,\n '--trace-end': `${traceEnd}`,\n }}\n class={{\n trace:\n this.trace && traceReferenceInPercentage !== valueInPercentage,\n }}\n onFocus={() => {\n this.showTooltip = true;\n }}\n onBlur={() => {\n this.showTooltip = false;\n }}\n role=\"slider\"\n aria-valuenow={this.rangeInput}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n {...this.a11yAttributes}\n />\n\n <ix-tooltip\n class={{\n 'hide-tooltip': !this.showTooltip,\n }}\n animationFrame={true}\n >\n {this.rangeInput}\n </ix-tooltip>\n </div>\n <div class=\"label\">\n <div class=\"label-start\">\n <slot name=\"label-start\"></slot>\n </div>\n <div class=\"label-end\">\n <slot name=\"label-end\"></slot>\n </div>\n </div>\n {this.error ? (\n <ix-typography class={'label-error'} color=\"alarm\">\n {this.error}\n </ix-typography>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxSpinner extends Components.IxSpinner, HTMLElement {}
|
|
4
|
+
export const IxSpinner: {
|
|
5
|
+
prototype: IxSpinner;
|
|
6
|
+
new (): IxSpinner;
|
|
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-spinner.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxSplitButtonItem extends Components.IxSplitButtonItem, HTMLElement {}
|
|
4
|
+
export const IxSplitButtonItem: {
|
|
5
|
+
prototype: IxSplitButtonItem;
|
|
6
|
+
new (): IxSplitButtonItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './dropdown-item.js';
|
|
3
|
+
|
|
4
|
+
const splitButtonItemCss = ":host{display:contents}";
|
|
5
|
+
|
|
6
|
+
const SplitButtonItem = /*@__PURE__*/ proxyCustomElement(class SplitButtonItem extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.itemClick = createEvent(this, "itemClick", 7);
|
|
12
|
+
this.icon = undefined;
|
|
13
|
+
this.label = undefined;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("ix-dropdown-item", { suppressChecked: true, icon: this.icon, label: this.label, onItemClick: (e) => {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
e.stopPropagation();
|
|
19
|
+
}, onClick: (e) => this.itemClick.emit(e) }));
|
|
20
|
+
}
|
|
21
|
+
get hostElement() { return this; }
|
|
22
|
+
static get style() { return splitButtonItemCss; }
|
|
23
|
+
}, [1, "ix-split-button-item", {
|
|
24
|
+
"icon": [1],
|
|
25
|
+
"label": [1]
|
|
26
|
+
}]);
|
|
27
|
+
function defineCustomElement$1() {
|
|
28
|
+
if (typeof customElements === "undefined") {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const components = ["ix-split-button-item", "ix-dropdown-item"];
|
|
32
|
+
components.forEach(tagName => { switch (tagName) {
|
|
33
|
+
case "ix-split-button-item":
|
|
34
|
+
if (!customElements.get(tagName)) {
|
|
35
|
+
customElements.define(tagName, SplitButtonItem);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
38
|
+
case "ix-dropdown-item":
|
|
39
|
+
if (!customElements.get(tagName)) {
|
|
40
|
+
defineCustomElement$2();
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
} });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const IxSplitButtonItem = SplitButtonItem;
|
|
47
|
+
const defineCustomElement = defineCustomElement$1;
|
|
48
|
+
|
|
49
|
+
export { IxSplitButtonItem, defineCustomElement };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=ix-split-button-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-split-button-item.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,yBAAyB;;MC0BvC,eAAe;;;;;;;;;EAkB1B,MAAM;IACJ,QACE,wBACE,eAAe,QACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,CAAC,CAAC;QACb,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;OACrB,EACD,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GACpB,EACpB;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/split-button-item/split-button-item.css?tag=ix-split-button-item&encapsulation=shadow","./src/components/split-button-item/split-button-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:host {\n display: contents;\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 Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\n\n/**\n * @deprecated since 2.0.0. Use the `ix-dropdown-item` component instead.\n */\n@Component({\n tag: 'ix-split-button-item',\n styleUrl: 'split-button-item.css',\n shadow: true,\n})\nexport class SplitButtonItem {\n /**\n * Dropdown icon\n */\n @Prop() icon: string;\n\n /**\n * Dropdown label\n */\n @Prop() label: string;\n\n /**\n * Dropdown item clicked\n */\n @Event() itemClick: EventEmitter<MouseEvent>;\n\n @Element() hostElement: HTMLIxSplitButtonItemElement;\n\n render() {\n return (\n <ix-dropdown-item\n suppressChecked\n icon={this.icon}\n label={this.label}\n onItemClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n }}\n onClick={(e) => this.itemClick.emit(e)}\n ></ix-dropdown-item>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxSplitButton extends Components.IxSplitButton, HTMLElement {}
|
|
4
|
+
export const IxSplitButton: {
|
|
5
|
+
prototype: IxSplitButton;
|
|
6
|
+
new (): IxSplitButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$5 } from './button.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './dropdown.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
6
|
+
|
|
7
|
+
const splitButtonCss = ".btn-group ix-button:first-child .btn{border-top-right-radius:0px;border-bottom-right-radius:0px;border-right:0px}.btn-group ix-button:last-child .btn{border-top-left-radius:0px;border-bottom-left-radius:0px}.btn-group ix-button:not(:first-child):not(:last-child) .btn{border-radius:0px;border-right:0px}:host{display:inline-block}: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 .btn-group{position:relative;display:inline-flex;vertical-align:middle;width:100%}:host .btn-group>ix-button:nth-child(1){width:calc(100% - 2rem)}:host .btn-group>ix-button:nth-child(2){width:2rem}:host .middle-gap{gap:0.125rem}:host .left-button-border{border-top-width:0.125rem;border-right-width:0;border-left-width:0.125rem;border-bottom-width:0.125rem}";
|
|
8
|
+
|
|
9
|
+
const SplitButton = /*@__PURE__*/ proxyCustomElement(class SplitButton extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
15
|
+
this.variant = 'primary';
|
|
16
|
+
this.outline = false;
|
|
17
|
+
this.ghost = false;
|
|
18
|
+
this.label = undefined;
|
|
19
|
+
this.icon = '';
|
|
20
|
+
this.splitIcon = 'context-menu';
|
|
21
|
+
this.disabled = false;
|
|
22
|
+
this.placement = 'bottom-start';
|
|
23
|
+
this.toggle = false;
|
|
24
|
+
}
|
|
25
|
+
linkTriggerRef() {
|
|
26
|
+
if (this.triggerElement && this.dropdownElement) {
|
|
27
|
+
this.dropdownElement.trigger = this.triggerElement;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
componentDidLoad() {
|
|
31
|
+
this.linkTriggerRef();
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
const buttonAttributes = {
|
|
35
|
+
variant: this.variant,
|
|
36
|
+
outline: this.outline,
|
|
37
|
+
ghost: this.ghost,
|
|
38
|
+
disabled: this.disabled,
|
|
39
|
+
class: {
|
|
40
|
+
'left-button-border': !this.outline,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
return (h(Host, null, h("div", { class: { 'btn-group': true, 'middle-gap': !this.outline } }, this.label ? (h("ix-button", Object.assign({}, buttonAttributes, { icon: this.icon, onClick: (e) => this.buttonClick.emit(e) }), this.label)) : (h("ix-icon-button", Object.assign({}, buttonAttributes, { icon: this.icon, onClick: (e) => this.buttonClick.emit(e) }))), h("ix-icon-button", Object.assign({}, buttonAttributes, { ref: (r) => (this.triggerElement = r), class: 'anchor', icon: this.splitIcon }))), h("ix-dropdown", { ref: (r) => (this.dropdownElement = r) }, h("slot", null))));
|
|
44
|
+
}
|
|
45
|
+
get hostElement() { return this; }
|
|
46
|
+
static get style() { return splitButtonCss; }
|
|
47
|
+
}, [1, "ix-split-button", {
|
|
48
|
+
"variant": [1],
|
|
49
|
+
"outline": [4],
|
|
50
|
+
"ghost": [4],
|
|
51
|
+
"label": [1],
|
|
52
|
+
"icon": [1],
|
|
53
|
+
"splitIcon": [1, "split-icon"],
|
|
54
|
+
"disabled": [4],
|
|
55
|
+
"placement": [1],
|
|
56
|
+
"toggle": [32]
|
|
57
|
+
}]);
|
|
58
|
+
function defineCustomElement$1() {
|
|
59
|
+
if (typeof customElements === "undefined") {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const components = ["ix-split-button", "ix-button", "ix-dropdown", "ix-icon-button", "ix-spinner"];
|
|
63
|
+
components.forEach(tagName => { switch (tagName) {
|
|
64
|
+
case "ix-split-button":
|
|
65
|
+
if (!customElements.get(tagName)) {
|
|
66
|
+
customElements.define(tagName, SplitButton);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case "ix-button":
|
|
70
|
+
if (!customElements.get(tagName)) {
|
|
71
|
+
defineCustomElement$5();
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "ix-dropdown":
|
|
75
|
+
if (!customElements.get(tagName)) {
|
|
76
|
+
defineCustomElement$4();
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case "ix-icon-button":
|
|
80
|
+
if (!customElements.get(tagName)) {
|
|
81
|
+
defineCustomElement$3();
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case "ix-spinner":
|
|
85
|
+
if (!customElements.get(tagName)) {
|
|
86
|
+
defineCustomElement$2();
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
} });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const IxSplitButton = SplitButton;
|
|
93
|
+
const defineCustomElement = defineCustomElement$1;
|
|
94
|
+
|
|
95
|
+
export { IxSplitButton, defineCustomElement };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=ix-split-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-split-button.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,oxCAAoxC;;MC6B9xC,WAAW;;;;;;mBAMgB,SAAS;mBAK7B,KAAK;iBAKP,KAAK;;gBAUN,EAAE;qBAKG,cAAc;oBAKf,KAAK;qBAKc,cAAc;kBAElC,KAAK;;EAUf,cAAc;IACpB,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,eAAe,EAAE;MAC/C,IAAI,CAAC,eAAe,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;KACpD;GACF;EAED,gBAAgB;IACd,IAAI,CAAC,cAAc,EAAE,CAAC;GACvB;EAED,MAAM;IACJ,MAAM,gBAAgB,GAAG;MACvB,OAAO,EAAE,IAAI,CAAC,OAAO;MACrB,OAAO,EAAE,IAAI,CAAC,OAAO;MACrB,KAAK,EAAE,IAAI,CAAC,KAAK;MACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;MACvB,KAAK,EAAE;QACL,oBAAoB,EAAE,CAAC,IAAI,CAAC,OAAO;OACpC;KACF,CAAC;IACF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,IAC3D,IAAI,CAAC,KAAK,IACT,iCACM,gBAAgB,IACpB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,KAEvC,IAAI,CAAC,KAAK,CACD,KAEZ,sCACM,gBAAgB,IACpB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IACxB,CACnB,EACD,sCACM,gBAAgB,IACpB,GAAG,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,EACrC,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,IAAI,CAAC,SAAS,IACJ,CACd,EAEN,mBAAa,GAAG,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,IACjD,eAAa,CACD,CACT,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/split-button/split-button.scss?tag=ix-split-button&encapsulation=shadow","./src/components/split-button/split-button.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 'mixins/shadow-dom/component';\n@import 'legacy/components/button-group';\n\n:host {\n @include ix-component;\n display: inline-block;\n\n .btn-group {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n width: 100%;\n\n > ix-button:nth-child(1) {\n width: calc(100% - 2rem);\n }\n\n > ix-button:nth-child(2) {\n width: 2rem;\n }\n }\n\n .middle-gap {\n gap: 0.125rem;\n }\n\n .left-button-border {\n border-top-width: 0.125rem;\n border-right-width: 0;\n border-left-width: 0.125rem;\n border-bottom-width: 0.125rem;\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 Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { ButtonVariant } from '../button/button';\nimport { AlignedPlacement } from '../dropdown/placement';\n\nexport type SplitButtonVariant = ButtonVariant;\n\n@Component({\n tag: 'ix-split-button',\n styleUrl: 'split-button.scss',\n shadow: true,\n})\nexport class SplitButton {\n @Element() hostElement!: HTMLIxSplitButtonElement;\n\n /**\n * Color variant of button\n */\n @Prop() variant: SplitButtonVariant = 'primary';\n\n /**\n * Button outline variant\n */\n @Prop() outline = false;\n\n /**\n * Button invisible\n */\n @Prop() ghost = false;\n\n /**\n * Button label\n */\n @Prop() label: string;\n\n /**\n * Button icon\n */\n @Prop() icon = '';\n\n /**\n * Icon of the button on the right\n */\n @Prop() splitIcon = 'context-menu';\n\n /**\n * Disabled\n */\n @Prop() disabled = false;\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n @State() toggle = false;\n\n /**\n * Button clicked\n */\n @Event() buttonClick: EventEmitter<MouseEvent>;\n\n private triggerElement: HTMLElement;\n private dropdownElement: HTMLIxDropdownElement;\n\n private linkTriggerRef() {\n if (this.triggerElement && this.dropdownElement) {\n this.dropdownElement.trigger = this.triggerElement;\n }\n }\n\n componentDidLoad() {\n this.linkTriggerRef();\n }\n\n render() {\n const buttonAttributes = {\n variant: this.variant,\n outline: this.outline,\n ghost: this.ghost,\n disabled: this.disabled,\n class: {\n 'left-button-border': !this.outline,\n },\n };\n return (\n <Host>\n <div class={{ 'btn-group': true, 'middle-gap': !this.outline }}>\n {this.label ? (\n <ix-button\n {...buttonAttributes}\n icon={this.icon}\n onClick={(e) => this.buttonClick.emit(e)}\n >\n {this.label}\n </ix-button>\n ) : (\n <ix-icon-button\n {...buttonAttributes}\n icon={this.icon}\n onClick={(e) => this.buttonClick.emit(e)}\n ></ix-icon-button>\n )}\n <ix-icon-button\n {...buttonAttributes}\n ref={(r) => (this.triggerElement = r)}\n class={'anchor'}\n icon={this.splitIcon}\n ></ix-icon-button>\n </div>\n\n <ix-dropdown ref={(r) => (this.dropdownElement = r)}>\n <slot></slot>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxTabItem extends Components.IxTabItem, HTMLElement {}
|
|
4
|
+
export const IxTabItem: {
|
|
5
|
+
prototype: IxTabItem;
|
|
6
|
+
new (): IxTabItem;
|
|
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-tab-item.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxTabs extends Components.IxTabs, HTMLElement {}
|
|
4
|
+
export const IxTabs: {
|
|
5
|
+
prototype: IxTabs;
|
|
6
|
+
new (): IxTabs;
|
|
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-tabs.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxTile extends Components.IxTile, HTMLElement {}
|
|
4
|
+
export const IxTile: {
|
|
5
|
+
prototype: IxTile;
|
|
6
|
+
new (): IxTile;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tileCss = ":host{min-width:11.937rem;max-width:11.937rem;width:11.937rem;display:flex;flex-direction:column;border:1px solid var(--theme-tile--border);border-radius:var(--theme-tile--border-radius);background-color:var(--theme-color-2);color:var(--theme-color-std-text);box-shadow:var(--theme-tile--box-shadow)}: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 .tile-header{display:flex;align-items:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host .tile-header,:host .tile-subheader,:host .tile-content,:host .tile-footer{padding:0 1rem}:host .tile-header,:host .tile-content{flex-grow:1}:host .tile-header.has-content{display:flex;height:2.5rem;max-height:2.5rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem}:host .tile-subheader{color:var(--theme-btn-invisible-secondary--color);flex-grow:0}:host .tile-footer.has-content{-webkit-border-before:1px solid var(--theme-color-1);border-block-start:1px solid var(--theme-color-1);height:2.5rem}:host(.tile-small){height:2.5rem;min-height:2.5rem;max-height:2.5rem}:host(.tile-medium){height:5rem;min-height:5rem;max-height:5rem}:host(.tile-big){height:10rem;min-height:10rem;max-height:10rem}:host(:active),:host(:focus-visible),:host(:visited){outline:none}";
|
|
4
|
+
|
|
5
|
+
const Tile = /*@__PURE__*/ proxyCustomElement(class Tile extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.size = 'medium';
|
|
11
|
+
this.hasHeaderSlot = false;
|
|
12
|
+
this.hasFooterSlot = false;
|
|
13
|
+
}
|
|
14
|
+
handleHeaderSlotChange() {
|
|
15
|
+
this.hasHeaderSlot = !!this.hostElement.querySelector('[slot="header"]');
|
|
16
|
+
}
|
|
17
|
+
handleFooterSlotChange() {
|
|
18
|
+
this.hasFooterSlot = !!this.hostElement.querySelector('[slot="footer"]');
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, { class: {
|
|
22
|
+
'tile-small': this.size === 'small',
|
|
23
|
+
'tile-medium': this.size === 'medium',
|
|
24
|
+
'tile-big': this.size === 'big',
|
|
25
|
+
} }, h("div", { class: {
|
|
26
|
+
'tile-header': true,
|
|
27
|
+
'has-content': this.hasHeaderSlot,
|
|
28
|
+
} }, h("slot", { name: "header", onSlotchange: () => this.handleHeaderSlotChange() })), h("div", { class: "tile-subheader" }, h("slot", { name: "subheader" })), h("div", { class: "tile-content" }, h("slot", null)), h("div", { class: {
|
|
29
|
+
'tile-footer': true,
|
|
30
|
+
'has-content': this.hasFooterSlot,
|
|
31
|
+
} }, h("slot", { name: "footer", onSlotchange: () => this.handleFooterSlotChange() }))));
|
|
32
|
+
}
|
|
33
|
+
get hostElement() { return this; }
|
|
34
|
+
static get style() { return tileCss; }
|
|
35
|
+
}, [1, "ix-tile", {
|
|
36
|
+
"size": [1],
|
|
37
|
+
"hasHeaderSlot": [32],
|
|
38
|
+
"hasFooterSlot": [32]
|
|
39
|
+
}]);
|
|
40
|
+
function defineCustomElement$1() {
|
|
41
|
+
if (typeof customElements === "undefined") {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const components = ["ix-tile"];
|
|
45
|
+
components.forEach(tagName => { switch (tagName) {
|
|
46
|
+
case "ix-tile":
|
|
47
|
+
if (!customElements.get(tagName)) {
|
|
48
|
+
customElements.define(tagName, Tile);
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const IxTile = Tile;
|
|
55
|
+
const defineCustomElement = defineCustomElement$1;
|
|
56
|
+
|
|
57
|
+
export { IxTile, defineCustomElement };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=ix-tile.js.map
|