@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 IxDateTimeCard extends Components.IxDateTimeCard, HTMLElement {}
|
|
4
|
+
export const IxDateTimeCard: {
|
|
5
|
+
prototype: IxDateTimeCard;
|
|
6
|
+
new (): IxDateTimeCard;
|
|
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 { D as DateTimeCard, d as defineCustomElement$1 } from './date-time-card.js';
|
|
2
|
+
|
|
3
|
+
const IxDateTimeCard = DateTimeCard;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { IxDateTimeCard, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=ix-date-time-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-date-time-card.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxDatetimePicker extends Components.IxDatetimePicker, HTMLElement {}
|
|
4
|
+
export const IxDatetimePicker: {
|
|
5
|
+
prototype: IxDatetimePicker;
|
|
6
|
+
new (): IxDatetimePicker;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$9 } from './button.js';
|
|
3
|
+
import { d as defineCustomElement$8 } from './date-picker.js';
|
|
4
|
+
import { d as defineCustomElement$7 } from './date-time-card.js';
|
|
5
|
+
import { d as defineCustomElement$6 } from './dropdown.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './icon-button.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './spinner.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './time-picker.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './typography.js';
|
|
10
|
+
|
|
11
|
+
const datetimePickerCss = ":host{display:block;background-color:var(--theme-menu--background);border-radius:4px;position:relative;width:32.6875rem}: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 .flex{display:flex;justify-content:center}:host .btn-select-date{position:absolute;bottom:1rem;right:1rem}:host .separator{border:1px solid var(--theme-datepicker-separator--background);width:100%;margin-top:72px;height:1px}";
|
|
12
|
+
|
|
13
|
+
const DateTimePicker = /*@__PURE__*/ proxyCustomElement(class DateTimePicker extends HTMLElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.__registerHost();
|
|
17
|
+
this.__attachShadow();
|
|
18
|
+
this.done = createEvent(this, "done", 7);
|
|
19
|
+
this.timeChange = createEvent(this, "timeChange", 7);
|
|
20
|
+
this.dateChange = createEvent(this, "dateChange", 7);
|
|
21
|
+
this.dateSelect = createEvent(this, "dateSelect", 7);
|
|
22
|
+
this.range = true;
|
|
23
|
+
this.showHour = false;
|
|
24
|
+
this.showMinutes = false;
|
|
25
|
+
this.showSeconds = false;
|
|
26
|
+
this.minDate = undefined;
|
|
27
|
+
this.maxDate = undefined;
|
|
28
|
+
this.dateFormat = 'yyyy/LL/dd';
|
|
29
|
+
this.timeFormat = 'TT';
|
|
30
|
+
this.from = undefined;
|
|
31
|
+
this.to = null;
|
|
32
|
+
this.time = undefined;
|
|
33
|
+
this.showTimeReference = undefined;
|
|
34
|
+
this.eventDelimiter = ' - ';
|
|
35
|
+
this.timeReference = undefined;
|
|
36
|
+
this.textSelectDate = 'Done';
|
|
37
|
+
}
|
|
38
|
+
onDone() {
|
|
39
|
+
var _a;
|
|
40
|
+
this.done.emit([this._from, (_a = this._to) !== null && _a !== void 0 ? _a : '', this._time].join(this.eventDelimiter));
|
|
41
|
+
this.dateSelect.emit({
|
|
42
|
+
from: this._from,
|
|
43
|
+
to: this._to,
|
|
44
|
+
time: this._time,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async onDateChange(event) {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
const { detail: date } = event;
|
|
51
|
+
this.dateChange.emit(date);
|
|
52
|
+
const currentDateTime = await this.datePickerElement.getCurrentDate();
|
|
53
|
+
this._from = currentDateTime.start;
|
|
54
|
+
this._to = currentDateTime.end;
|
|
55
|
+
}
|
|
56
|
+
async onTimeChange(event) {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
event.stopPropagation();
|
|
59
|
+
const { detail: time } = event;
|
|
60
|
+
this.timeChange.emit(time);
|
|
61
|
+
const currentDateTime = await this.timePickerElement.getCurrentTime();
|
|
62
|
+
this._time = currentDateTime;
|
|
63
|
+
}
|
|
64
|
+
componentDidLoad() {
|
|
65
|
+
this._from = this.from;
|
|
66
|
+
this._to = this.to;
|
|
67
|
+
this._time = this.time;
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
return (h(Host, null, h("div", { class: "flex" }, h("div", { class: "separator" }), h("ix-date-picker", { ref: (ref) => (this.datePickerElement = ref), corners: "left", individual: false, range: this.range, onDateChange: (event) => this.onDateChange(event), from: this.from, to: this.to, format: this.dateFormat, minDate: this.minDate, maxDate: this.maxDate, eventDelimiter: this.eventDelimiter }), h("ix-time-picker", { ref: (ref) => (this.timePickerElement = ref), corners: "right", individual: false, showHour: this.showHour, showMinutes: this.showMinutes, showSeconds: this.showSeconds, showTimeReference: this.showTimeReference, onTimeChange: (event) => this.onTimeChange(event), time: this.time, format: this.timeFormat, timeReference: this.timeReference }), h("div", { class: "separator" })), h("ix-button", { class: "btn-select-date", onClick: () => this.onDone() }, this.textSelectDate)));
|
|
71
|
+
}
|
|
72
|
+
static get style() { return datetimePickerCss; }
|
|
73
|
+
}, [1, "ix-datetime-picker", {
|
|
74
|
+
"range": [4],
|
|
75
|
+
"showHour": [4, "show-hour"],
|
|
76
|
+
"showMinutes": [4, "show-minutes"],
|
|
77
|
+
"showSeconds": [4, "show-seconds"],
|
|
78
|
+
"minDate": [1, "min-date"],
|
|
79
|
+
"maxDate": [1, "max-date"],
|
|
80
|
+
"dateFormat": [1, "date-format"],
|
|
81
|
+
"timeFormat": [1, "time-format"],
|
|
82
|
+
"from": [1],
|
|
83
|
+
"to": [1],
|
|
84
|
+
"time": [1],
|
|
85
|
+
"showTimeReference": [8, "show-time-reference"],
|
|
86
|
+
"eventDelimiter": [1, "event-delimiter"],
|
|
87
|
+
"timeReference": [1, "time-reference"],
|
|
88
|
+
"textSelectDate": [1, "text-select-date"]
|
|
89
|
+
}]);
|
|
90
|
+
function defineCustomElement$1() {
|
|
91
|
+
if (typeof customElements === "undefined") {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const components = ["ix-datetime-picker", "ix-button", "ix-date-picker", "ix-date-time-card", "ix-dropdown", "ix-icon-button", "ix-spinner", "ix-time-picker", "ix-typography"];
|
|
95
|
+
components.forEach(tagName => { switch (tagName) {
|
|
96
|
+
case "ix-datetime-picker":
|
|
97
|
+
if (!customElements.get(tagName)) {
|
|
98
|
+
customElements.define(tagName, DateTimePicker);
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case "ix-button":
|
|
102
|
+
if (!customElements.get(tagName)) {
|
|
103
|
+
defineCustomElement$9();
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "ix-date-picker":
|
|
107
|
+
if (!customElements.get(tagName)) {
|
|
108
|
+
defineCustomElement$8();
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
case "ix-date-time-card":
|
|
112
|
+
if (!customElements.get(tagName)) {
|
|
113
|
+
defineCustomElement$7();
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
case "ix-dropdown":
|
|
117
|
+
if (!customElements.get(tagName)) {
|
|
118
|
+
defineCustomElement$6();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
case "ix-icon-button":
|
|
122
|
+
if (!customElements.get(tagName)) {
|
|
123
|
+
defineCustomElement$5();
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
case "ix-spinner":
|
|
127
|
+
if (!customElements.get(tagName)) {
|
|
128
|
+
defineCustomElement$4();
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
case "ix-time-picker":
|
|
132
|
+
if (!customElements.get(tagName)) {
|
|
133
|
+
defineCustomElement$3();
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
case "ix-typography":
|
|
137
|
+
if (!customElements.get(tagName)) {
|
|
138
|
+
defineCustomElement$2();
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
} });
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const IxDatetimePicker = DateTimePicker;
|
|
145
|
+
const defineCustomElement = defineCustomElement$1;
|
|
146
|
+
|
|
147
|
+
export { IxDatetimePicker, defineCustomElement };
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=ix-datetime-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-datetime-picker.js","mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,47BAA47B;;MC2Bz8B,cAAc;;;;;;;;;iBAIT,IAAI;oBAKD,KAAK;uBAKF,KAAK;uBAKL,KAAK;;;sBAwBE,YAAY;sBAQZ,IAAI;;cAmBL,IAAI;;6BAeJ,SAAS;0BAQZ,KAAK;;0BAYL,MAAM;;EAqCvB,MAAM;;IACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CACZ,CAAC,IAAI,CAAC,KAAK,EAAE,MAAA,IAAI,CAAC,GAAG,mCAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CACnE,CAAC;IAEF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;MACnB,IAAI,EAAE,IAAI,CAAC,KAAK;MAChB,EAAE,EAAE,IAAI,CAAC,GAAG;MACZ,IAAI,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAC;GACJ;EAEO,MAAM,YAAY,CAAC,KAA4C;IACrE,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE3B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACtE,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC;IACnC,IAAI,CAAC,GAAG,GAAG,eAA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AE,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,YAAY,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EACjD,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,aAAa,EAAE,IAAI,CAAC,aAAa,GACjB,EAClB,WAAK,KAAK,EAAC,WAAW,GAAO,CACzB,EAEN,iBAAW,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,IAC5D,IAAI,CAAC,cAAc,CACV,CACP,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/datetime-picker/datetime-picker.scss?tag=ix-datetime-picker&encapsulation=shadow","./src/components/datetime-picker/datetime-picker.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@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: block;\n background-color: var(--theme-menu--background);\n border-radius: 4px;\n position: relative;\n width: 32.6875rem;\n\n .flex {\n display: flex;\n justify-content: center;\n }\n\n .btn-select-date {\n position: absolute;\n bottom: $default-space;\n right: $default-space;\n }\n\n .separator {\n border: 1px solid var(--theme-datepicker-separator--background);\n width: 100%;\n margin-top: 72px;\n height: 1px;\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';\nimport type { DateChangeEvent } from '../date-picker/date-picker';\n\nexport type DateTimeSelectEvent = {\n from: string;\n to: string;\n time: string;\n};\n\nexport type DateTimeDateChangeEvent =\n | string\n | Omit<DateTimeSelectEvent, 'time'>;\n\n@Component({\n tag: 'ix-datetime-picker',\n styleUrl: 'datetime-picker.scss',\n shadow: true,\n})\nexport class DateTimePicker {\n /**\n * Set range size\n */\n @Prop() range = true;\n\n /**\n * Show hour input\n */\n @Prop() showHour = false;\n\n /**\n * Show minutes input\n */\n @Prop() showMinutes = false;\n\n /**\n * Show seconds input\n */\n @Prop() showSeconds = false;\n\n /**\n * The earliest date that can be selected by the date picker.\n * If not set there will be no restriction.\n *\n * @since 1.1.0\n */\n @Prop() minDate: string;\n\n /**\n * The latest date that can be selected by the date picker.\n * If not set there will be no restriction.\n *\n * @since 1.1.0\n */\n @Prop() maxDate: string;\n\n /**\n * Date format string.\n * See @link https://moment.github.io/luxon/#/formatting?id=table-of-tokens for all available tokens.\n *\n * @since 1.1.0\n */\n @Prop() dateFormat: string = 'yyyy/LL/dd';\n\n /**\n * Time format string.\n * See @link https://moment.github.io/luxon/#/formatting?id=table-of-tokens for all available tokens.\n *\n * @since 1.1.0\n */\n @Prop() timeFormat: string = 'TT';\n\n /**\n * Picker date. If the picker is in range mode this property is the start date.\n *\n * Format is based on `format`\n *\n * @since 1.1.0\n */\n @Prop() from: string;\n\n /**\n * Picker date. If the picker is in range mode this property is the end date.\n * If the picker is not in range mode leave this value `null`\n *\n * Format is based on `format`\n *\n * @since 1.1.0\n */\n @Prop() to: string | null = null;\n\n /**\n * Select time with format string\n *\n * @since 1.1.0\n */\n @Prop() time: string;\n\n /**\n * Show time reference input\n * Time reference is default aligned with @see {this.timeFormat}\n *\n * @since 1.1.0\n */\n @Prop() showTimeReference = undefined;\n\n /**\n * Default behavior of the done event is to join the two events (date and time) into one combined string output.\n * This combination can be configured over the delimiter\n *\n * @since 1.1.0\n */\n @Prop() eventDelimiter = ' - ';\n\n /**\n * Set time reference\n */\n @Prop() timeReference: 'AM' | 'PM';\n\n /**\n * Text of date select button\n *\n * @since 1.1.0\n */\n @Prop() textSelectDate = 'Done';\n\n /**\n * Done event\n *\n * Set `doneEventDelimiter` to null or undefine to get the typed event\n */\n @Event() done: EventEmitter<string>;\n\n /**\n * Time change\n *\n * @since 1.1.0\n */\n @Event() timeChange: EventEmitter<string>;\n\n /**\n * Date change\n *\n * @since 1.1.0\n */\n @Event() dateChange: EventEmitter<DateTimeDateChangeEvent>;\n\n /**\n * Date selection event is fired after confirm button is pressend\n *\n * @since 1.1.0\n */\n @Event() dateSelect: EventEmitter<DateTimeSelectEvent>;\n\n private datePickerElement: HTMLIxDatePickerElement;\n private timePickerElement: HTMLIxTimePickerElement;\n\n private _from: string;\n private _to: string;\n private _time: string;\n\n private onDone() {\n this.done.emit(\n [this._from, this._to ?? '', this._time].join(this.eventDelimiter)\n );\n\n this.dateSelect.emit({\n from: this._from,\n to: this._to,\n time: this._time,\n });\n }\n\n private async onDateChange(event: CustomEvent<string | DateChangeEvent>) {\n event.preventDefault();\n event.stopPropagation();\n const { detail: date } = event;\n this.dateChange.emit(date);\n\n const currentDateTime = await this.datePickerElement.getCurrentDate();\n this._from = currentDateTime.start;\n this._to = currentDateTime.end;\n }\n\n private async onTimeChange(event: CustomEvent<string>) {\n event.preventDefault();\n event.stopPropagation();\n const { detail: time } = event;\n this.timeChange.emit(time);\n\n const currentDateTime = await this.timePickerElement.getCurrentTime();\n this._time = currentDateTime;\n }\n\n componentDidLoad() {\n this._from = this.from;\n this._to = this.to;\n this._time = this.time;\n }\n\n render() {\n return (\n <Host>\n <div class=\"flex\">\n <div class=\"separator\"></div>\n <ix-date-picker\n ref={(ref) => (this.datePickerElement = ref)}\n corners=\"left\"\n individual={false}\n range={this.range}\n onDateChange={(event) => this.onDateChange(event)}\n from={this.from}\n to={this.to}\n format={this.dateFormat}\n minDate={this.minDate}\n maxDate={this.maxDate}\n eventDelimiter={this.eventDelimiter}\n ></ix-date-picker>\n\n <ix-time-picker\n ref={(ref) => (this.timePickerElement = ref)}\n corners=\"right\"\n individual={false}\n showHour={this.showHour}\n showMinutes={this.showMinutes}\n showSeconds={this.showSeconds}\n showTimeReference={this.showTimeReference}\n onTimeChange={(event) => this.onTimeChange(event)}\n time={this.time}\n format={this.timeFormat}\n timeReference={this.timeReference}\n ></ix-time-picker>\n <div class=\"separator\"></div>\n </div>\n\n <ix-button class=\"btn-select-date\" onClick={() => this.onDone()}>\n {this.textSelectDate}\n </ix-button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxDivider extends Components.IxDivider, HTMLElement {}
|
|
4
|
+
export const IxDivider: {
|
|
5
|
+
prototype: IxDivider;
|
|
6
|
+
new (): IxDivider;
|
|
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-divider.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxDrawer extends Components.IxDrawer, HTMLElement {}
|
|
4
|
+
export const IxDrawer: {
|
|
5
|
+
prototype: IxDrawer;
|
|
6
|
+
new (): IxDrawer;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as anime } from './anime.es.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
5
|
+
|
|
6
|
+
const drawerCss = ":host{top:0;right:0;box-shadow:var(--theme-box-shadow-level-3);visibility:hidden;display:flex;position:absolute;flex-flow:column nowrap;justify-content:flex-start;align-items:center;max-height:100vh;min-height:1.5rem;background-color:var(--theme-color-1);border-radius:0.25rem;transition:all 300ms ease-out}: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 .toggle{z-index:100;visibility:visible}:host .drawer-container.full-height{min-height:100%}:host .header{display:flex;position:relative;align-items:center;justify-content:flex-end;padding:0.5rem;width:100%;order:1}:host .header .header-content{flex-grow:1;margin-right:1rem}:host .content{position:relative;flex:1;flex-grow:1;order:2;height:100%;width:100%;overflow-y:auto}";
|
|
7
|
+
|
|
8
|
+
const Drawer = /*@__PURE__*/ proxyCustomElement(class Drawer extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.open = createEvent(this, "open", 7);
|
|
14
|
+
this.drawerClose = createEvent(this, "drawerClose", 7);
|
|
15
|
+
this.callback = this.clickedOutside.bind(this);
|
|
16
|
+
this.show = false;
|
|
17
|
+
this.closeOnClickOutside = true;
|
|
18
|
+
this.fullHeight = false;
|
|
19
|
+
this.minWidth = 16;
|
|
20
|
+
this.maxWidth = 28;
|
|
21
|
+
this.width = this.minWidth;
|
|
22
|
+
}
|
|
23
|
+
onShowChanged(newValue) {
|
|
24
|
+
this.show = newValue !== undefined ? newValue : !this.show;
|
|
25
|
+
this.toggleDrawer(this.show);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Toggle or define show state of drawer
|
|
29
|
+
* @param show Overwrite toggle state with boolean
|
|
30
|
+
*/
|
|
31
|
+
async toggleDrawer(show) {
|
|
32
|
+
this.show = show !== undefined ? show : !this.show;
|
|
33
|
+
if (show) {
|
|
34
|
+
this.open.emit();
|
|
35
|
+
this.slideInRight(this.divElement);
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
window.addEventListener('mousedown', this.callback);
|
|
38
|
+
}, 300);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.drawerClose.emit();
|
|
42
|
+
this.slideOutRight(this.divElement);
|
|
43
|
+
window.removeEventListener('mousedown', this.callback);
|
|
44
|
+
}
|
|
45
|
+
return Promise.resolve();
|
|
46
|
+
}
|
|
47
|
+
onCloseClicked() {
|
|
48
|
+
this.show = false;
|
|
49
|
+
}
|
|
50
|
+
clickedOutside(evt) {
|
|
51
|
+
if (!this.closeOnClickOutside) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const target = evt.target;
|
|
55
|
+
const closestElement = target.closest('#div-container');
|
|
56
|
+
const btn = target.closest('#drawer-btn');
|
|
57
|
+
if (evt.target.type !== 'button' &&
|
|
58
|
+
closestElement !== this.divElement &&
|
|
59
|
+
target !== btn) {
|
|
60
|
+
this.show = false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
slideOutRight(el) {
|
|
64
|
+
anime({
|
|
65
|
+
targets: el,
|
|
66
|
+
duration: Drawer.duration,
|
|
67
|
+
translateX: [0, '16rem'],
|
|
68
|
+
opacity: [1, 0],
|
|
69
|
+
easing: 'easeInSine',
|
|
70
|
+
complete: () => {
|
|
71
|
+
el.classList.add('d-none');
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
slideInRight(el) {
|
|
76
|
+
anime({
|
|
77
|
+
targets: el,
|
|
78
|
+
duration: Drawer.duration,
|
|
79
|
+
translateX: ['16rem', 0],
|
|
80
|
+
opacity: [0, 1],
|
|
81
|
+
easing: 'easeOutSine',
|
|
82
|
+
begin: () => {
|
|
83
|
+
el.classList.remove('d-none');
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
componentDidLoad() {
|
|
88
|
+
this.onShowChanged(this.show);
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
return (h(Host, { class: {
|
|
92
|
+
'drawer-container': true,
|
|
93
|
+
toggle: this.show,
|
|
94
|
+
'full-height': this.fullHeight,
|
|
95
|
+
'd-none': true,
|
|
96
|
+
}, style: {
|
|
97
|
+
width: this.width === 'auto' ? this.width : `${this.width}rem`,
|
|
98
|
+
'min-width': `${this.minWidth}rem`,
|
|
99
|
+
'max-width': `${this.maxWidth}rem`,
|
|
100
|
+
}, ref: (el) => (this.divElement = el), "data-testid": "container", id: "div-container" }, h("div", { class: "header" }, h("div", { class: "header-content" }, h("slot", { name: "header" })), h("ix-icon-button", { class: "close-button", icon: 'close', size: "24", ghost: true, onClick: () => this.onCloseClicked(), "data-testid": "close-button" })), h("div", { class: "content" }, h("slot", null))));
|
|
101
|
+
}
|
|
102
|
+
static get watchers() { return {
|
|
103
|
+
"show": ["onShowChanged"]
|
|
104
|
+
}; }
|
|
105
|
+
static get style() { return drawerCss; }
|
|
106
|
+
}, [1, "ix-drawer", {
|
|
107
|
+
"show": [1028],
|
|
108
|
+
"closeOnClickOutside": [4, "close-on-click-outside"],
|
|
109
|
+
"fullHeight": [4, "full-height"],
|
|
110
|
+
"minWidth": [2, "min-width"],
|
|
111
|
+
"maxWidth": [2, "max-width"],
|
|
112
|
+
"width": [8],
|
|
113
|
+
"toggleDrawer": [64]
|
|
114
|
+
}]);
|
|
115
|
+
Drawer.duration = 300;
|
|
116
|
+
function defineCustomElement$1() {
|
|
117
|
+
if (typeof customElements === "undefined") {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const components = ["ix-drawer", "ix-icon-button", "ix-spinner"];
|
|
121
|
+
components.forEach(tagName => { switch (tagName) {
|
|
122
|
+
case "ix-drawer":
|
|
123
|
+
if (!customElements.get(tagName)) {
|
|
124
|
+
customElements.define(tagName, Drawer);
|
|
125
|
+
}
|
|
126
|
+
break;
|
|
127
|
+
case "ix-icon-button":
|
|
128
|
+
if (!customElements.get(tagName)) {
|
|
129
|
+
defineCustomElement$3();
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
case "ix-spinner":
|
|
133
|
+
if (!customElements.get(tagName)) {
|
|
134
|
+
defineCustomElement$2();
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
} });
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const IxDrawer = Drawer;
|
|
141
|
+
const defineCustomElement = defineCustomElement$1;
|
|
142
|
+
|
|
143
|
+
export { IxDrawer, defineCustomElement };
|
|
144
|
+
|
|
145
|
+
//# sourceMappingURL=ix-drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-drawer.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,4wCAA4wC;;MC0BjxC,MAAM;;;;;;;IA0CT,aAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAtClB,KAAK;+BAKP,IAAI;sBAKb,KAAK;oBAKP,EAAE;oBAKF,EAAE;iBAKY,IAAI,CAAC,QAAQ;;EAiB9C,aAAa,CAAC,QAAiB;IAC7B,IAAI,CAAC,IAAI,GAAG,QAAQ,KAAK,SAAS,GAAG,QAAQ,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC9B;;;;;EAOD,MAAM,YAAY,CAAC,IAAc;IAC/B,IAAI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ACN,sBACE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAE,OAAO,EACb,IAAI,EAAC,IAAI,EACT,KAAK,QACL,OAAO,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,iBACxB,cAAc,GACV,CACd,EACN,WAAK,KAAK,EAAC,SAAS,IAClB,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;AAzHc,eAAQ,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/drawer/drawer.scss?tag=ix-drawer&encapsulation=shadow","./src/components/drawer/drawer.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 'mixins/shadows';\n@import 'common-variables';\n\n:host {\n @include ix-component;\n\n top: 0;\n right: 0;\n @include box-shadow(3);\n\n visibility: hidden;\n\n display: flex;\n position: absolute;\n flex-flow: column nowrap;\n justify-content: flex-start;\n align-items: center;\n\n max-height: 100vh;\n min-height: $large-space;\n background-color: var(--theme-color-1);\n border-radius: $default-border-radius;\n\n transition: all $medium-time ease-out;\n\n .toggle {\n z-index: 100;\n visibility: visible;\n }\n\n .drawer-container.full-height {\n min-height: 100%;\n }\n\n .header {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: flex-end;\n padding: 0.5rem;\n width: 100%;\n order: 1;\n\n .header-content {\n flex-grow: 1;\n margin-right: $default-space;\n }\n }\n\n .content {\n position: relative;\n flex: 1;\n flex-grow: 1;\n order: 2;\n height: 100%;\n width: 100%;\n overflow-y: auto;\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 Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport anime from 'animejs';\n\n@Component({\n tag: 'ix-drawer',\n styleUrl: 'drawer.scss',\n shadow: true,\n})\nexport class Drawer {\n /**\n * Show or hide the drawer\n */\n @Prop({ mutable: true }) show = false;\n\n /**\n * Fired in case of an outside click during drawer showed state\n */\n @Prop() closeOnClickOutside = true;\n\n /**\n * Render the drawer with maximum height\n */\n @Prop() fullHeight = false;\n\n /**\n * Min width interpreted as REM\n */\n @Prop() minWidth = 16;\n\n /**\n * Max width interpreted as REM\n */\n @Prop() maxWidth = 28;\n\n /**\n * Width interpreted as REM if not set to 'auto'\n */\n @Prop() width: number | 'auto' = this.minWidth;\n\n /**\n * Fire event after drawer is open\n */\n @Event() open: EventEmitter;\n\n /**\n * Fire event after drawer is close\n */\n @Event() drawerClose: EventEmitter;\n\n private static duration = 300;\n private callback = this.clickedOutside.bind(this);\n private divElement?: HTMLElement;\n\n @Watch('show')\n onShowChanged(newValue: boolean) {\n this.show = newValue !== undefined ? newValue : !this.show;\n this.toggleDrawer(this.show);\n }\n\n /**\n * Toggle or define show state of drawer\n * @param show Overwrite toggle state with boolean\n */\n @Method()\n async toggleDrawer(show?: boolean): Promise<void> {\n this.show = show !== undefined ? show : !this.show;\n\n if (show) {\n this.open.emit();\n this.slideInRight(this.divElement);\n setTimeout(() => {\n window.addEventListener('mousedown', this.callback);\n }, 300);\n } else {\n this.drawerClose.emit();\n this.slideOutRight(this.divElement);\n window.removeEventListener('mousedown', this.callback);\n }\n\n return Promise.resolve();\n }\n\n private onCloseClicked() {\n this.show = false;\n }\n\n private clickedOutside(evt: any) {\n if (!this.closeOnClickOutside) {\n return;\n }\n\n const target = evt.target;\n const closestElement = target.closest('#div-container');\n const btn = target.closest('#drawer-btn');\n\n if (\n evt.target.type !== 'button' &&\n closestElement !== this.divElement &&\n target !== btn\n ) {\n this.show = false;\n }\n }\n\n private slideOutRight(el: HTMLElement) {\n anime({\n targets: el,\n duration: Drawer.duration,\n translateX: [0, '16rem'],\n opacity: [1, 0],\n easing: 'easeInSine',\n complete: () => {\n el.classList.add('d-none');\n },\n });\n }\n\n private slideInRight(el: HTMLElement) {\n anime({\n targets: el,\n duration: Drawer.duration,\n translateX: ['16rem', 0],\n opacity: [0, 1],\n easing: 'easeOutSine',\n begin: () => {\n el.classList.remove('d-none');\n },\n });\n }\n\n componentDidLoad() {\n this.onShowChanged(this.show);\n }\n\n render() {\n return (\n <Host\n class={{\n 'drawer-container': true,\n toggle: this.show,\n 'full-height': this.fullHeight,\n 'd-none': true,\n }}\n style={{\n width: this.width === 'auto' ? this.width : `${this.width}rem`,\n 'min-width': `${this.minWidth}rem`,\n 'max-width': `${this.maxWidth}rem`,\n }}\n ref={(el) => (this.divElement = el as HTMLElement)}\n data-testid=\"container\"\n id=\"div-container\"\n >\n <div class=\"header\">\n <div class=\"header-content\">\n <slot name=\"header\"></slot>\n </div>\n <ix-icon-button\n class=\"close-button\"\n icon={'close'}\n size=\"24\"\n ghost\n onClick={() => this.onCloseClicked()}\n data-testid=\"close-button\"\n ></ix-icon-button>\n </div>\n <div class=\"content\">\n <slot></slot>\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 IxDropdownButton extends Components.IxDropdownButton, HTMLElement {}
|
|
4
|
+
export const IxDropdownButton: {
|
|
5
|
+
prototype: IxDropdownButton;
|
|
6
|
+
new (): IxDropdownButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, 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 dropdownButtonCss = ":host{display:inline-block;position:relative;height:2rem;width:auto}: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 .hide{display:none}:host .dropdown-button{display:block;position:relative;width:100%;height:100%}:host .dropdown-button>ix-button{width:100%;height:100%}:host .dropdown-button .button-label{margin-right:auto;min-width:0px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .dropdown-button .dropdown-icon{margin-right:0.25rem}:host .triangle{position:absolute;-webkit-margin-start:1.5625rem;margin-inline-start:1.5625rem;-webkit-margin-before:-0.4375rem;margin-block-start:-0.4375rem;border-right:0 solid transparent;border-left:4px solid transparent;border-top:0 solid transparent;border-bottom:4px solid;color:var(--theme-btn-primary--color)}:host .triangle.primary.ghost{color:var(--theme-btn-invisible-primary--color)}:host .triangle.primary.outline{color:var(--theme-btn-outline-primary--color)}:host .triangle.primary.ghost.disabled{color:var(--theme-btn-invisible-primary--color--disabled)}:host .triangle.primary.outline.disabled{color:var(--theme-btn-outline-primary--color--disabled)}:host .triangle.primary.disabled{color:var(--theme-btn-primary--color--disabled)}:host .triangle.secondary.ghost{color:var(--theme-btn-invisible-secondary--color)}:host .triangle.secondary.outline{color:var(--theme-btn-outline-secondary--color)}:host .triangle.secondary.ghost.disabled{color:var(--theme-btn-invisible-secondary--color--disabled)}:host .triangle.secondary.outline.disabled{color:var(--theme-btn-outline-secondary--color--disabled)}:host .triangle.secondary.disabled{color:var(--theme-btn-secondary--color--disabled)}:host .content{display:flex;align-items:center}:host(.disabled){pointer-events:none}";
|
|
8
|
+
|
|
9
|
+
const DropdownButton = /*@__PURE__*/ proxyCustomElement(class DropdownButton extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.variant = 'primary';
|
|
15
|
+
this.outline = false;
|
|
16
|
+
this.ghost = false;
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
this.label = undefined;
|
|
19
|
+
this.icon = undefined;
|
|
20
|
+
this.placement = undefined;
|
|
21
|
+
this.dropdownAnchor = undefined;
|
|
22
|
+
}
|
|
23
|
+
getTriangle() {
|
|
24
|
+
return (h("div", { class: {
|
|
25
|
+
triangle: true,
|
|
26
|
+
hide: this.label !== '',
|
|
27
|
+
primary: this.variant === 'primary',
|
|
28
|
+
secondary: this.variant === 'secondary',
|
|
29
|
+
ghost: this.ghost,
|
|
30
|
+
outline: this.outline,
|
|
31
|
+
disabled: this.disabled,
|
|
32
|
+
} }));
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h(Host, { class: {
|
|
36
|
+
disabled: this.disabled,
|
|
37
|
+
} }, h("div", { class: "dropdown-button", ref: (ref) => {
|
|
38
|
+
this.dropdownAnchor = ref;
|
|
39
|
+
} }, this.label ? (h("ix-button", { variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled, alignment: "start" }, h("div", { class: 'content' }, this.icon ? (h("ix-icon", { name: this.icon, size: "24", class: 'dropdown-icon' })) : null, h("div", { class: 'button-label' }, this.label), h("ix-icon", { name: 'chevron-down-small', size: "24" })))) : (h("div", null, h("ix-icon-button", { icon: this.icon, variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled }), this.getTriangle()))), h("ix-dropdown", { class: "dropdown", trigger: this.dropdownAnchor, placement: this.placement }, h("slot", null))));
|
|
40
|
+
}
|
|
41
|
+
get hostElement() { return this; }
|
|
42
|
+
static get style() { return dropdownButtonCss; }
|
|
43
|
+
}, [1, "ix-dropdown-button", {
|
|
44
|
+
"variant": [1],
|
|
45
|
+
"outline": [4],
|
|
46
|
+
"ghost": [4],
|
|
47
|
+
"disabled": [4],
|
|
48
|
+
"label": [1],
|
|
49
|
+
"icon": [1],
|
|
50
|
+
"placement": [1],
|
|
51
|
+
"dropdownAnchor": [32]
|
|
52
|
+
}]);
|
|
53
|
+
function defineCustomElement$1() {
|
|
54
|
+
if (typeof customElements === "undefined") {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const components = ["ix-dropdown-button", "ix-button", "ix-dropdown", "ix-icon-button", "ix-spinner"];
|
|
58
|
+
components.forEach(tagName => { switch (tagName) {
|
|
59
|
+
case "ix-dropdown-button":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
customElements.define(tagName, DropdownButton);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case "ix-button":
|
|
65
|
+
if (!customElements.get(tagName)) {
|
|
66
|
+
defineCustomElement$5();
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case "ix-dropdown":
|
|
70
|
+
if (!customElements.get(tagName)) {
|
|
71
|
+
defineCustomElement$4();
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "ix-icon-button":
|
|
75
|
+
if (!customElements.get(tagName)) {
|
|
76
|
+
defineCustomElement$3();
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case "ix-spinner":
|
|
80
|
+
if (!customElements.get(tagName)) {
|
|
81
|
+
defineCustomElement$2();
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
} });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const IxDropdownButton = DropdownButton;
|
|
88
|
+
const defineCustomElement = defineCustomElement$1;
|
|
89
|
+
|
|
90
|
+
export { IxDropdownButton, defineCustomElement };
|
|
91
|
+
|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,EAAC,IAAI,GAAW,CACrD,CACI,KAEZ,eACE,sBACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACP,EACjB,IAAI,CAAC,WAAW,EAAE,CACf,CACP,CACG,EAEN,mBACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,IAAI,CAAC,SAAS,IAEzB,eAAa,CACD,CACT,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/dropdown-button/dropdown-button.scss?tag=ix-dropdown-button&encapsulation=shadow","./src/components/dropdown-button/dropdown-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 'common-variables';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: inline-block;\n position: relative;\n height: $x-large-space;\n width: auto;\n\n .hide {\n display: none;\n }\n\n .dropdown-button {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .dropdown-button > ix-button {\n width: 100%;\n height: 100%;\n }\n\n .dropdown-button .button-label {\n margin-right: auto;\n min-width: 0px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .dropdown-button .dropdown-icon {\n margin-right: 0.25rem;\n }\n\n .triangle {\n position: absolute;\n margin-inline-start: 1.5625rem;\n margin-block-start: -0.4375rem;\n border-right: 0 solid transparent;\n border-left: 4px solid transparent;\n border-top: 0 solid transparent;\n border-bottom: 4px solid;\n color: var(--theme-btn-primary--color);\n }\n\n .triangle.primary {\n &.ghost {\n color: var(--theme-btn-invisible-primary--color);\n }\n\n &.outline {\n color: var(--theme-btn-outline-primary--color);\n }\n\n &.ghost.disabled {\n color: var(--theme-btn-invisible-primary--color--disabled);\n }\n\n &.outline.disabled {\n color: var(--theme-btn-outline-primary--color--disabled);\n }\n\n &.disabled {\n color: var(--theme-btn-primary--color--disabled);\n }\n }\n\n .triangle.secondary {\n &.ghost {\n color: var(--theme-btn-invisible-secondary--color);\n }\n\n &.outline {\n color: var(--theme-btn-outline-secondary--color);\n }\n\n &.ghost.disabled {\n color: var(--theme-btn-invisible-secondary--color--disabled);\n }\n\n &.outline.disabled {\n color: var(--theme-btn-outline-secondary--color--disabled);\n }\n\n &.disabled {\n color: var(--theme-btn-secondary--color--disabled);\n }\n }\n\n .content {\n display: flex;\n align-items: center;\n }\n}\n\n:host(.disabled) {\n pointer-events: none;\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, State } from '@stencil/core';\nimport { ButtonVariant } from '../button/button';\nimport { AlignedPlacement } from '../dropdown/placement';\n\nexport type DropdownButtonVariant = ButtonVariant;\n\n/**\n * @since 1.3.0\n */\n@Component({\n tag: 'ix-dropdown-button',\n styleUrl: 'dropdown-button.scss',\n shadow: true,\n})\nexport class DropdownButton {\n @Element() hostElement!: HTMLIxDropdownButtonElement;\n\n /**\n * Button variant\n */\n @Prop() variant: DropdownButtonVariant = 'primary';\n\n /**\n * Outline button\n */\n @Prop() outline = false;\n\n /**\n * Button with no background or outline\n */\n @Prop() ghost = false;\n\n /**\n * Disable button\n */\n @Prop() disabled = false;\n\n /**\n * Set label\n */\n @Prop() label: string;\n\n /**\n * Button icon\n */\n @Prop() icon: string;\n\n /**\n * Placement of the dropdown\n *\n * @since 2.0.0\n */\n @Prop() placement: AlignedPlacement;\n\n @State() dropdownAnchor!: HTMLElement;\n\n private getTriangle() {\n return (\n <div\n class={{\n triangle: true,\n hide: this.label !== '',\n primary: this.variant === 'primary',\n secondary: this.variant === 'secondary',\n ghost: this.ghost,\n outline: this.outline,\n disabled: this.disabled,\n }}\n ></div>\n );\n }\n\n render() {\n return (\n <Host\n class={{\n disabled: this.disabled,\n }}\n >\n <div\n class=\"dropdown-button\"\n ref={(ref) => {\n this.dropdownAnchor = ref;\n }}\n >\n {this.label ? (\n <ix-button\n variant={this.variant}\n outline={this.outline}\n ghost={this.ghost}\n disabled={this.disabled}\n alignment=\"start\"\n >\n <div class={'content'}>\n {this.icon ? (\n <ix-icon\n name={this.icon}\n size=\"24\"\n class={'dropdown-icon'}\n ></ix-icon>\n ) : null}\n <div class={'button-label'}>{this.label}</div>\n <ix-icon name={'chevron-down-small'} size=\"24\"></ix-icon>\n </div>\n </ix-button>\n ) : (\n <div>\n <ix-icon-button\n icon={this.icon}\n variant={this.variant}\n outline={this.outline}\n ghost={this.ghost}\n disabled={this.disabled}\n ></ix-icon-button>\n {this.getTriangle()}\n </div>\n )}\n </div>\n\n <ix-dropdown\n class=\"dropdown\"\n trigger={this.dropdownAnchor}\n placement={this.placement}\n >\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 IxDropdownHeader extends Components.IxDropdownHeader, HTMLElement {}
|
|
4
|
+
export const IxDropdownHeader: {
|
|
5
|
+
prototype: IxDropdownHeader;
|
|
6
|
+
new (): IxDropdownHeader;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './typography.js';
|
|
3
|
+
|
|
4
|
+
const dropdownHeaderCss = ":host{display:flex;align-items:center;position:relative;height:2.5rem;width:auto;padding:0.25rem 1rem;overflow:hidden;cursor:default;color:var(--theme-color-soft-text)}: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}";
|
|
5
|
+
|
|
6
|
+
const DropdownHeader = /*@__PURE__*/ proxyCustomElement(class DropdownHeader extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.label = undefined;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, null, h("ix-typography", { class: 'category-text', variant: 'default-title' }, this.label)));
|
|
15
|
+
}
|
|
16
|
+
static get style() { return dropdownHeaderCss; }
|
|
17
|
+
}, [1, "ix-dropdown-header", {
|
|
18
|
+
"label": [1]
|
|
19
|
+
}]);
|
|
20
|
+
function defineCustomElement$1() {
|
|
21
|
+
if (typeof customElements === "undefined") {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const components = ["ix-dropdown-header", "ix-typography"];
|
|
25
|
+
components.forEach(tagName => { switch (tagName) {
|
|
26
|
+
case "ix-dropdown-header":
|
|
27
|
+
if (!customElements.get(tagName)) {
|
|
28
|
+
customElements.define(tagName, DropdownHeader);
|
|
29
|
+
}
|
|
30
|
+
break;
|
|
31
|
+
case "ix-typography":
|
|
32
|
+
if (!customElements.get(tagName)) {
|
|
33
|
+
defineCustomElement$2();
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
} });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const IxDropdownHeader = DropdownHeader;
|
|
40
|
+
const defineCustomElement = defineCustomElement$1;
|
|
41
|
+
|
|
42
|
+
export { IxDropdownHeader, defineCustomElement };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=ix-dropdown-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-dropdown-header.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,swBAAswB;;MCmBnxB,cAAc;;;;;;;EAMzB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,qBAAe,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,IAC5D,IAAI,CAAC,KAAK,CACG,CACX,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/dropdown-header/dropdown-header.scss?tag=ix-dropdown-header&encapsulation=shadow","./src/components/dropdown-header/dropdown-header.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:host {\n @include ix-component;\n\n display: flex;\n align-items: center;\n position: relative;\n height: 2.5rem;\n width: auto;\n\n padding: 0.25rem 1rem;\n\n overflow: hidden;\n cursor: default;\n\n color: var(--theme-color-soft-text);\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, h, Host, Prop } from '@stencil/core';\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-dropdown-header',\n styleUrl: 'dropdown-header.scss',\n shadow: true,\n})\nexport class DropdownHeader {\n /**\n * Display name of the header\n */\n @Prop() label: string;\n\n render() {\n return (\n <Host>\n <ix-typography class={'category-text'} variant={'default-title'}>\n {this.label}\n </ix-typography>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxDropdownItem extends Components.IxDropdownItem, HTMLElement {}
|
|
4
|
+
export const IxDropdownItem: {
|
|
5
|
+
prototype: IxDropdownItem;
|
|
6
|
+
new (): IxDropdownItem;
|
|
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 { D as DropdownItem, d as defineCustomElement$1 } from './dropdown-item.js';
|
|
2
|
+
|
|
3
|
+
const IxDropdownItem = DropdownItem;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { IxDropdownItem, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=ix-dropdown-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ix-dropdown-item.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IxDropdownQuickActions extends Components.IxDropdownQuickActions, HTMLElement {}
|
|
4
|
+
export const IxDropdownQuickActions: {
|
|
5
|
+
prototype: IxDropdownQuickActions;
|
|
6
|
+
new (): IxDropdownQuickActions;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|