wj-elements 0.1.149 → 0.1.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wje-element.js +3 -1
- package/dist/wje-element.js.map +1 -1
- package/dist/wje-img.js +2 -2
- package/dist/wje-img.js.map +1 -1
- package/dist/wje-pagination.js +3 -3
- package/dist/wje-pagination.js.map +1 -1
- package/package.json +1 -1
- package/dist/packages/index.d.ts +0 -104
- package/dist/packages/localize/localize.d.ts +0 -17
- package/dist/packages/translations/en-gb.d.ts +0 -18
- package/dist/packages/translations/sk-sk.d.ts +0 -13
- package/dist/packages/utils/animations.d.ts +0 -2
- package/dist/packages/utils/date.d.ts +0 -1
- package/dist/packages/utils/element-utils.d.ts +0 -46
- package/dist/packages/utils/event.d.ts +0 -67
- package/dist/packages/utils/localize.d.ts +0 -4
- package/dist/packages/utils/permissions-api.d.ts +0 -34
- package/dist/packages/utils/utils.d.ts +0 -1
- package/dist/packages/utils/wje-import-firefox.d.ts +0 -0
- package/dist/packages/utils/wje-import.d.ts +0 -0
- package/dist/packages/wje-accordion/accordion.d.ts +0 -2
- package/dist/packages/wje-accordion/accordion.element.d.ts +0 -72
- package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
- package/dist/packages/wje-accordion-item/accordion-item.d.ts +0 -2
- package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +0 -40
- package/dist/packages/wje-animation/animation.d.ts +0 -2
- package/dist/packages/wje-animation/animation.element.d.ts +0 -158
- package/dist/packages/wje-animation/animation.test.d.ts +0 -1
- package/dist/packages/wje-aside/aside.d.ts +0 -2
- package/dist/packages/wje-aside/aside.element.d.ts +0 -31
- package/dist/packages/wje-avatar/avatar.d.ts +0 -2
- package/dist/packages/wje-avatar/avatar.element.d.ts +0 -76
- package/dist/packages/wje-avatar/avatar.test.d.ts +0 -1
- package/dist/packages/wje-avatar/service/service.d.ts +0 -40
- package/dist/packages/wje-badge/badge.d.ts +0 -2
- package/dist/packages/wje-badge/badge.element.d.ts +0 -35
- package/dist/packages/wje-badge/badge.test.d.ts +0 -1
- package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +0 -2
- package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +0 -80
- package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +0 -2
- package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +0 -97
- package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +0 -1
- package/dist/packages/wje-button/button.d.ts +0 -2
- package/dist/packages/wje-button/button.element.d.ts +0 -173
- package/dist/packages/wje-button/button.test.d.ts +0 -1
- package/dist/packages/wje-button-group/button-group.d.ts +0 -2
- package/dist/packages/wje-button-group/button-group.element.d.ts +0 -39
- package/dist/packages/wje-card/card.d.ts +0 -2
- package/dist/packages/wje-card/card.element.d.ts +0 -29
- package/dist/packages/wje-card-content/card-content.d.ts +0 -2
- package/dist/packages/wje-card-content/card-content.element.d.ts +0 -22
- package/dist/packages/wje-card-controls/card-controls.d.ts +0 -2
- package/dist/packages/wje-card-controls/card-controls.element.d.ts +0 -23
- package/dist/packages/wje-card-header/card-header.d.ts +0 -2
- package/dist/packages/wje-card-header/card-header.element.d.ts +0 -22
- package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +0 -2
- package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +0 -30
- package/dist/packages/wje-card-title/card-title.d.ts +0 -2
- package/dist/packages/wje-card-title/card-title.element.d.ts +0 -32
- package/dist/packages/wje-carousel/carousel.d.ts +0 -2
- package/dist/packages/wje-carousel/carousel.element.d.ts +0 -146
- package/dist/packages/wje-carousel-item/carousel-item.d.ts +0 -2
- package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +0 -38
- package/dist/packages/wje-checkbox/checkbox.d.ts +0 -2
- package/dist/packages/wje-checkbox/checkbox.element.d.ts +0 -171
- package/dist/packages/wje-chip/chip.d.ts +0 -2
- package/dist/packages/wje-chip/chip.element.d.ts +0 -30
- package/dist/packages/wje-col/col.d.ts +0 -2
- package/dist/packages/wje-col/col.element.d.ts +0 -16
- package/dist/packages/wje-color-picker/color-picker.d.ts +0 -2
- package/dist/packages/wje-color-picker/color-picker.element.d.ts +0 -187
- package/dist/packages/wje-color-picker/color-picker.test.d.ts +0 -1
- package/dist/packages/wje-container/container.d.ts +0 -2
- package/dist/packages/wje-container/container.element.d.ts +0 -31
- package/dist/packages/wje-copy-button/copy-button.d.ts +0 -2
- package/dist/packages/wje-copy-button/copy-button.element.d.ts +0 -89
- package/dist/packages/wje-copy-button/service/service.d.ts +0 -12
- package/dist/packages/wje-dialog/dialog.d.ts +0 -2
- package/dist/packages/wje-dialog/dialog.element.d.ts +0 -116
- package/dist/packages/wje-divider/divider.d.ts +0 -2
- package/dist/packages/wje-divider/divider.element.d.ts +0 -32
- package/dist/packages/wje-dropdown/dropdown.d.ts +0 -2
- package/dist/packages/wje-dropdown/dropdown.element.d.ts +0 -85
- package/dist/packages/wje-element/element.d.ts +0 -315
- package/dist/packages/wje-element/service/universal-service.d.ts +0 -18
- package/dist/packages/wje-file-upload/file-upload.d.ts +0 -2
- package/dist/packages/wje-file-upload/file-upload.element.d.ts +0 -191
- package/dist/packages/wje-file-upload/service/service.d.ts +0 -70
- package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +0 -2
- package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +0 -66
- package/dist/packages/wje-footer/footer.d.ts +0 -2
- package/dist/packages/wje-footer/footer.element.d.ts +0 -28
- package/dist/packages/wje-form/form.d.ts +0 -2
- package/dist/packages/wje-form/form.element.d.ts +0 -28
- package/dist/packages/wje-format-digital/format-digital.d.ts +0 -2
- package/dist/packages/wje-format-digital/format-digital.element.d.ts +0 -87
- package/dist/packages/wje-format-digital/format-digital.test.d.ts +0 -1
- package/dist/packages/wje-grid/grid.d.ts +0 -2
- package/dist/packages/wje-grid/grid.element.d.ts +0 -26
- package/dist/packages/wje-header/header.d.ts +0 -2
- package/dist/packages/wje-header/header.element.d.ts +0 -35
- package/dist/packages/wje-icon/icon.d.ts +0 -2
- package/dist/packages/wje-icon/icon.element.d.ts +0 -40
- package/dist/packages/wje-icon/service/service.d.ts +0 -11
- package/dist/packages/wje-icon-picker/icon-picker.d.ts +0 -2
- package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +0 -197
- package/dist/packages/wje-img/img.d.ts +0 -2
- package/dist/packages/wje-img/img.element.d.ts +0 -117
- package/dist/packages/wje-img-comparer/img-comparer.d.ts +0 -2
- package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +0 -60
- package/dist/packages/wje-img-comparer/service/service.d.ts +0 -1
- package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +0 -2
- package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +0 -173
- package/dist/packages/wje-input/input.d.ts +0 -2
- package/dist/packages/wje-input/input.element.d.ts +0 -204
- package/dist/packages/wje-input-file/input-file.d.ts +0 -2
- package/dist/packages/wje-input-file/input-file.element.d.ts +0 -50
- package/dist/packages/wje-item/item.d.ts +0 -2
- package/dist/packages/wje-item/item.element.d.ts +0 -68
- package/dist/packages/wje-kanban/kanban.d.ts +0 -2
- package/dist/packages/wje-kanban/kanban.element.d.ts +0 -183
- package/dist/packages/wje-label/label.d.ts +0 -2
- package/dist/packages/wje-label/label.element.d.ts +0 -34
- package/dist/packages/wje-level-indicator/level-indicator.d.ts +0 -2
- package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +0 -91
- package/dist/packages/wje-list/list.d.ts +0 -2
- package/dist/packages/wje-list/list.element.d.ts +0 -31
- package/dist/packages/wje-main/main.d.ts +0 -2
- package/dist/packages/wje-main/main.element.d.ts +0 -30
- package/dist/packages/wje-masonry/masonry.d.ts +0 -2
- package/dist/packages/wje-masonry/masonry.element.d.ts +0 -114
- package/dist/packages/wje-masonry/service/service.d.ts +0 -32
- package/dist/packages/wje-menu/menu.d.ts +0 -2
- package/dist/packages/wje-menu/menu.element.d.ts +0 -47
- package/dist/packages/wje-menu-button/menu-button.d.ts +0 -2
- package/dist/packages/wje-menu-button/menu-button.element.d.ts +0 -34
- package/dist/packages/wje-menu-item/menu-item.d.ts +0 -2
- package/dist/packages/wje-menu-item/menu-item.element.d.ts +0 -139
- package/dist/packages/wje-menu-label/menu-label.d.ts +0 -2
- package/dist/packages/wje-menu-label/menu-label.element.d.ts +0 -39
- package/dist/packages/wje-option/option.d.ts +0 -2
- package/dist/packages/wje-option/option.element.d.ts +0 -59
- package/dist/packages/wje-options/options.d.ts +0 -2
- package/dist/packages/wje-options/options.element.d.ts +0 -183
- package/dist/packages/wje-orgchart/orgchart.d.ts +0 -2
- package/dist/packages/wje-orgchart/orgchart.element.d.ts +0 -24
- package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +0 -2
- package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +0 -28
- package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +0 -2
- package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +0 -49
- package/dist/packages/wje-pagination/pagination.d.ts +0 -2
- package/dist/packages/wje-pagination/pagination.element.d.ts +0 -166
- package/dist/packages/wje-pagination/pagination.test.d.ts +0 -1
- package/dist/packages/wje-pagination/service/service.d.ts +0 -9
- package/dist/packages/wje-panel/panel.d.ts +0 -2
- package/dist/packages/wje-panel/panel.element.d.ts +0 -34
- package/dist/packages/wje-popup/popup.d.ts +0 -2
- package/dist/packages/wje-popup/popup.element.d.ts +0 -93
- package/dist/packages/wje-progress-bar/progress-bar.d.ts +0 -2
- package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +0 -96
- package/dist/packages/wje-qr-code/qr-code.d.ts +0 -2
- package/dist/packages/wje-qr-code/qr-code.element.d.ts +0 -33
- package/dist/packages/wje-radio/radio.d.ts +0 -2
- package/dist/packages/wje-radio/radio.element.d.ts +0 -53
- package/dist/packages/wje-radio-group/radio-group.d.ts +0 -2
- package/dist/packages/wje-radio-group/radio-group.element.d.ts +0 -137
- package/dist/packages/wje-rate/rate.d.ts +0 -2
- package/dist/packages/wje-rate/rate.element.d.ts +0 -156
- package/dist/packages/wje-relative-time/relative-time.d.ts +0 -2
- package/dist/packages/wje-relative-time/relative-time.element.d.ts +0 -55
- package/dist/packages/wje-relative-time/relative-time.test.d.ts +0 -1
- package/dist/packages/wje-reorder/reorder.d.ts +0 -2
- package/dist/packages/wje-reorder/reorder.element.d.ts +0 -119
- package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +0 -2
- package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +0 -23
- package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +0 -2
- package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +0 -75
- package/dist/packages/wje-reorder-item/reorder-item.d.ts +0 -2
- package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +0 -24
- package/dist/packages/wje-route/route.d.ts +0 -2
- package/dist/packages/wje-route/route.element.d.ts +0 -22
- package/dist/packages/wje-router/router.d.ts +0 -2
- package/dist/packages/wje-router/router.element.d.ts +0 -39
- package/dist/packages/wje-router-link/router-link.d.ts +0 -2
- package/dist/packages/wje-router-link/router-link.element.d.ts +0 -31
- package/dist/packages/wje-router-outlet/router-outlet.d.ts +0 -2
- package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +0 -15
- package/dist/packages/wje-row/row.d.ts +0 -2
- package/dist/packages/wje-row/row.element.d.ts +0 -23
- package/dist/packages/wje-select/select.d.ts +0 -2
- package/dist/packages/wje-select/select.element.d.ts +0 -315
- package/dist/packages/wje-slider/slider.d.ts +0 -2
- package/dist/packages/wje-slider/slider.element.d.ts +0 -103
- package/dist/packages/wje-split-view/service/service.d.ts +0 -1
- package/dist/packages/wje-split-view/split-view.d.ts +0 -2
- package/dist/packages/wje-split-view/split-view.element.d.ts +0 -66
- package/dist/packages/wje-status/status.d.ts +0 -2
- package/dist/packages/wje-status/status.element.d.ts +0 -26
- package/dist/packages/wje-step/step.d.ts +0 -2
- package/dist/packages/wje-step/step.element.d.ts +0 -23
- package/dist/packages/wje-stepper/stepper.d.ts +0 -2
- package/dist/packages/wje-stepper/stepper.element.d.ts +0 -78
- package/dist/packages/wje-store/default-store-actions.d.ts +0 -25
- package/dist/packages/wje-store/pubsub.d.ts +0 -21
- package/dist/packages/wje-store/store.d.ts +0 -153
- package/dist/packages/wje-tab/tab.d.ts +0 -2
- package/dist/packages/wje-tab/tab.element.d.ts +0 -41
- package/dist/packages/wje-tab-group/tab-group.d.ts +0 -2
- package/dist/packages/wje-tab-group/tab-group.element.d.ts +0 -67
- package/dist/packages/wje-tab-panel/tab-panel.d.ts +0 -2
- package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +0 -23
- package/dist/packages/wje-textarea/textarea.d.ts +0 -2
- package/dist/packages/wje-textarea/textarea.element.d.ts +0 -176
- package/dist/packages/wje-thumbnail/thumbnail.d.ts +0 -2
- package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +0 -31
- package/dist/packages/wje-timeline/timeline.d.ts +0 -2
- package/dist/packages/wje-timeline/timeline.element.d.ts +0 -25
- package/dist/packages/wje-timeline-item/timeline-item.d.ts +0 -2
- package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +0 -27
- package/dist/packages/wje-toast/toast.d.ts +0 -2
- package/dist/packages/wje-toast/toast.element.d.ts +0 -173
- package/dist/packages/wje-toast/toast.test.d.ts +0 -1
- package/dist/packages/wje-toggle/toggle.d.ts +0 -2
- package/dist/packages/wje-toggle/toggle.element.d.ts +0 -65
- package/dist/packages/wje-toolbar/toolbar.d.ts +0 -2
- package/dist/packages/wje-toolbar/toolbar.element.d.ts +0 -39
- package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +0 -2
- package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +0 -35
- package/dist/packages/wje-tooltip/tooltip.d.ts +0 -2
- package/dist/packages/wje-tooltip/tooltip.element.d.ts +0 -71
- package/dist/packages/wje-tree/tree.d.ts +0 -2
- package/dist/packages/wje-tree/tree.element.d.ts +0 -104
- package/dist/packages/wje-tree/tree.test.d.ts +0 -1
- package/dist/packages/wje-tree-item/tree-item.d.ts +0 -2
- package/dist/packages/wje-tree-item/tree-item.element.d.ts +0 -155
- package/dist/packages/wje-tree-item/tree-item.test.d.ts +0 -1
- package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +0 -2
- package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +0 -29
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary This element represents a footer. `Footer` is a custom web component that represents a footer.
|
|
4
|
-
* @documentation https://elements.webjet.sk/components/footer
|
|
5
|
-
* @status stable
|
|
6
|
-
* @augments WJElement
|
|
7
|
-
* @slot default - Default slot for the footer content
|
|
8
|
-
* @cssproperty --primary-color - The primary color of the footer
|
|
9
|
-
*/
|
|
10
|
-
export default class Footer extends WJElement {
|
|
11
|
-
/**
|
|
12
|
-
* Returns the CSS styles for the component.
|
|
13
|
-
* @static
|
|
14
|
-
* @returns {CSSStyleSheet}
|
|
15
|
-
*/
|
|
16
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
17
|
-
/**
|
|
18
|
-
* Returns the list of attributes to observe for changes.
|
|
19
|
-
* @static
|
|
20
|
-
* @returns {Array<string>}
|
|
21
|
-
*/
|
|
22
|
-
static get observedAttributes(): string[];
|
|
23
|
-
/**
|
|
24
|
-
* Draws the component.
|
|
25
|
-
* @returns {DocumentFragment}
|
|
26
|
-
*/
|
|
27
|
-
draw(): DocumentFragment;
|
|
28
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary The Form class is a custom
|
|
4
|
-
* web component that extends WJElement. It is a simple form that can hold other elements or components.
|
|
5
|
-
* It provides a slot for adding child elements or components.
|
|
6
|
-
* @documentation https://elements.webjet.sk/components/form
|
|
7
|
-
* @status stable
|
|
8
|
-
* @augments WJElement
|
|
9
|
-
* @slot - The slot for adding child elements or components.
|
|
10
|
-
* @tag wje-form
|
|
11
|
-
*/
|
|
12
|
-
export default class Form extends WJElement {
|
|
13
|
-
/**
|
|
14
|
-
* Getter for the CSS stylesheet.
|
|
15
|
-
* @returns {*}
|
|
16
|
-
*/
|
|
17
|
-
static get cssStyleSheet(): any;
|
|
18
|
-
/**
|
|
19
|
-
* Getter for the observed attributes.
|
|
20
|
-
* @returns {*[]}
|
|
21
|
-
*/
|
|
22
|
-
static get observedAttributes(): any[];
|
|
23
|
-
/**
|
|
24
|
-
* Draws the Form.
|
|
25
|
-
* @returns {DocumentFragment}
|
|
26
|
-
*/
|
|
27
|
-
draw(): DocumentFragment;
|
|
28
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
import { Localizer } from '../utils/localize.js';
|
|
3
|
-
/**
|
|
4
|
-
* @summary This element formats and displays digital values such as file sizes or data transfer rates.
|
|
5
|
-
* `FormatDigital` is a custom web component that represents a formatted digital value with units like
|
|
6
|
-
* bytes or bits. It extends from `WJElement` and utilizes the `Localizer` class for locale-aware formatting.
|
|
7
|
-
* @documentation https://elements.webjet.sk/components/format-digital
|
|
8
|
-
* @status stable
|
|
9
|
-
* @augments {WJElement}
|
|
10
|
-
* @attribute {number} value - The numeric value to format (e.g., 1024 for 1 KB).
|
|
11
|
-
* @attribute {string} unit - The unit of the value (`byte` or `bit`). Defaults to `byte`.
|
|
12
|
-
* @attribute {string} unitDisplay - The display style of the unit (`short`, `long`, or `narrow`). Defaults to `short`.
|
|
13
|
-
* @csspart native - The native part of the component.
|
|
14
|
-
* @csspart formatted - The part representing the formatted value.
|
|
15
|
-
* @csspart start - Slot for content before the formatted value.
|
|
16
|
-
* @csspart end - Slot for content after the formatted value.
|
|
17
|
-
* @cssproperty [--wje-format-digital-font-size=1rem] - The font size of the formatted digital value.
|
|
18
|
-
* @cssproperty [--wje-format-digital-color=var(--wje-text-color)] - The color of the formatted text.
|
|
19
|
-
* @cssproperty [--wje-format-digital-padding=.5rem] - The padding around the component.
|
|
20
|
-
* @cssproperty [--wje-format-digital-border-radius=var(--wje-border-radius-small)] - The border radius of the component.
|
|
21
|
-
* @tag wje-format-digital
|
|
22
|
-
*/
|
|
23
|
-
export default class FormatDigital extends WJElement {
|
|
24
|
-
/**
|
|
25
|
-
* Returns the CSS styles for the component.
|
|
26
|
-
* Encapsulated using shadow DOM.
|
|
27
|
-
* @static
|
|
28
|
-
* @returns {CSSStyleSheet} - The CSS styles for the component.
|
|
29
|
-
*/
|
|
30
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
31
|
-
/**
|
|
32
|
-
* Returns the list of attributes to observe for changes.
|
|
33
|
-
* Observes `value` and `unit-display` for re-rendering.
|
|
34
|
-
* @static
|
|
35
|
-
* @returns {Array<string>} - The attributes to observe.
|
|
36
|
-
*/
|
|
37
|
-
static get observedAttributes(): string[];
|
|
38
|
-
localizer: Localizer;
|
|
39
|
-
/**
|
|
40
|
-
* Sets the value of the digital format.
|
|
41
|
-
* This value determines the size in bytes or bits to be displayed.
|
|
42
|
-
* @param {number} value The value to set.
|
|
43
|
-
*/
|
|
44
|
-
set value(value: number);
|
|
45
|
-
/**
|
|
46
|
-
* Returns the value of the digital format.
|
|
47
|
-
* @returns {number} The current value of the component.
|
|
48
|
-
*/
|
|
49
|
-
get value(): number;
|
|
50
|
-
/**
|
|
51
|
-
* Sets the unit of the digital format.
|
|
52
|
-
* Valid values are `bit` or `byte`.
|
|
53
|
-
* @param {string} value The unit to set.
|
|
54
|
-
*/
|
|
55
|
-
set unit(value: string);
|
|
56
|
-
/**
|
|
57
|
-
* Returns the unit of the digital format.
|
|
58
|
-
* Defaults to `byte` if no unit is set.
|
|
59
|
-
* @returns {string} The current unit (`bit` or `byte`).
|
|
60
|
-
*/
|
|
61
|
-
get unit(): string;
|
|
62
|
-
/**
|
|
63
|
-
* Sets the unit display style for the digital format.
|
|
64
|
-
* Valid values are `short`, `long`, or `narrow`.
|
|
65
|
-
* @param {string} value The unit display style to set.
|
|
66
|
-
*/
|
|
67
|
-
set unitDisplay(value: string);
|
|
68
|
-
/**
|
|
69
|
-
* Returns the unit display style for the digital format.
|
|
70
|
-
* Defaults to `short` if not set.
|
|
71
|
-
* @returns {string} - The current unit display style.
|
|
72
|
-
*/
|
|
73
|
-
get unitDisplay(): string;
|
|
74
|
-
/**
|
|
75
|
-
* Prepares the component before rendering.
|
|
76
|
-
* Computes the formatted value based on the input value and unit.
|
|
77
|
-
*/
|
|
78
|
-
beforeDraw(): void;
|
|
79
|
-
formattedValue: string;
|
|
80
|
-
/**
|
|
81
|
-
* Renders the component and returns a document fragment.
|
|
82
|
-
* The rendered structure includes a formatted value wrapped in a container
|
|
83
|
-
* with slots for additional customization.
|
|
84
|
-
* @returns {DocumentFragment} - The DOM structure for the component.
|
|
85
|
-
*/
|
|
86
|
-
draw(): DocumentFragment;
|
|
87
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary The Grid class is a custom web component that extends WJElement. It is a simple grid that can hold other elements or components.
|
|
4
|
-
* It provides a slot for adding child elements or components.
|
|
5
|
-
* @documentation https://elements.webjet.sk/components/grid
|
|
6
|
-
* @status stable
|
|
7
|
-
* @augments WJElement
|
|
8
|
-
* @slot - The slot for adding child elements or components.
|
|
9
|
-
*/
|
|
10
|
-
export default class Grid extends WJElement {
|
|
11
|
-
/**
|
|
12
|
-
* Getter for the CSS stylesheet.
|
|
13
|
-
* @returns {*}
|
|
14
|
-
*/
|
|
15
|
-
static get cssStyleSheet(): any;
|
|
16
|
-
/**
|
|
17
|
-
* Getter for the observed attributes.
|
|
18
|
-
* @returns {*[]}
|
|
19
|
-
*/
|
|
20
|
-
static get observedAttributes(): any[];
|
|
21
|
-
/**
|
|
22
|
-
* Draws the Grid element.
|
|
23
|
-
* @returns {DocumentFragment}
|
|
24
|
-
*/
|
|
25
|
-
draw(): DocumentFragment;
|
|
26
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary `Header` is a custom web component that represents a header. It extends from `WJElement`.
|
|
4
|
-
* @documentation https://elements.webjet.sk/components/header
|
|
5
|
-
* @status stable
|
|
6
|
-
* @augments {WJElement}
|
|
7
|
-
* @csspart native - The native part
|
|
8
|
-
* @slot default - Default slot for the header content
|
|
9
|
-
* @cssproperty [--wje-header-background=var(--wje-background)] - The background of the header element.
|
|
10
|
-
* @cssproperty [--wje-header-border-color=var(--wje-border-color)] - The border color of the header element.
|
|
11
|
-
* @cssproperty [--wje-header-border-width=0 0 1px 0] - The border width of the header element.
|
|
12
|
-
* @cssproperty [--wje-header-border-style=solid] - The border styles of the header
|
|
13
|
-
* @cssproperty [--wje-header-top=0] - The position top of the header
|
|
14
|
-
* @cssproperty [--wje-header-height=60px] - The height of the header element.
|
|
15
|
-
* @tag wje-header
|
|
16
|
-
*/
|
|
17
|
-
export default class Header extends WJElement {
|
|
18
|
-
/**
|
|
19
|
-
* Returns the CSS styles for the component.
|
|
20
|
-
* @static
|
|
21
|
-
* @returns {CSSStyleSheet}
|
|
22
|
-
*/
|
|
23
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the list of attributes to observe for changes.
|
|
26
|
-
* @static
|
|
27
|
-
* @returns {Array<string>}
|
|
28
|
-
*/
|
|
29
|
-
static get observedAttributes(): string[];
|
|
30
|
-
/**
|
|
31
|
-
* Draws the component.
|
|
32
|
-
* @returns {DocumentFragment}
|
|
33
|
-
*/
|
|
34
|
-
draw(): DocumentFragment;
|
|
35
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary This element represents an icon. `IconElement` is a custom web component that represents an icon.
|
|
4
|
-
* @documentation https://elements.webjet.sk/components/icon
|
|
5
|
-
* @status stable
|
|
6
|
-
* @augments WJElement
|
|
7
|
-
* @csspart svg - The SVG part of the icon
|
|
8
|
-
* @cssproperty [--wje-icon-size=1rem] - The size of the icon element
|
|
9
|
-
* @cssproperty [--wje-icon-width=var(--wje-icon-size, 100%)] - The width of the icon element
|
|
10
|
-
* @cssproperty [--wje-icon-height=var(--wje-icon-size, 100%)] - The height of the icon element
|
|
11
|
-
* @tag wje-icon
|
|
12
|
-
*/
|
|
13
|
-
export default class Icon extends WJElement {
|
|
14
|
-
/**
|
|
15
|
-
* Returns the CSS styles for the component.
|
|
16
|
-
* @static
|
|
17
|
-
* @returns {CSSStyleSheet}
|
|
18
|
-
*/
|
|
19
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
20
|
-
/**
|
|
21
|
-
* Returns the list of attributes to observe for changes.
|
|
22
|
-
* @static
|
|
23
|
-
* @returns {Array<string>}
|
|
24
|
-
*/
|
|
25
|
-
static get observedAttributes(): string[];
|
|
26
|
-
/**
|
|
27
|
-
* Draws the component.
|
|
28
|
-
* @param {object} context The context for drawing.
|
|
29
|
-
* @param {object} store The store for drawing.
|
|
30
|
-
* @param {object} params The parameters for drawing.
|
|
31
|
-
* @returns {DocumentFragment}
|
|
32
|
-
*/
|
|
33
|
-
draw(context: object, store: object, params: object): DocumentFragment;
|
|
34
|
-
url: string;
|
|
35
|
-
native: HTMLDivElement;
|
|
36
|
-
/**
|
|
37
|
-
* Called after the component has been drawn.
|
|
38
|
-
*/
|
|
39
|
-
afterDraw(): void;
|
|
40
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const iconContent: Map<any, any>;
|
|
2
|
-
export function getSrc(src: string): string | null;
|
|
3
|
-
export function isSrc(str: string): boolean;
|
|
4
|
-
export function isSvgDataUrl(url: string): boolean;
|
|
5
|
-
export function isEncodedDataUrl(url: string): boolean;
|
|
6
|
-
export function isStr(val: any): boolean;
|
|
7
|
-
export function validateContent(svgContent: string): string;
|
|
8
|
-
export function isValid(elm: Element | Node): boolean;
|
|
9
|
-
export function getSvgContent(url: string, sanitize?: boolean): Promise<void>;
|
|
10
|
-
export function getUrl(i: HTMLElement): string | null;
|
|
11
|
-
export function getName(iconName: string): string | null;
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
import { default as Input } from '../wje-input/input.js';
|
|
3
|
-
import { default as InfiniteScroll } from '../wje-infinite-scroll/infinite-scroll.js';
|
|
4
|
-
import { default as Tooltip } from '../wje-tooltip/tooltip.js';
|
|
5
|
-
import { default as Popup } from '../wje-popup/popup.js';
|
|
6
|
-
/**
|
|
7
|
-
* @summary This element allows users to pick an icon from a set of available options.
|
|
8
|
-
* `IconPicker` is a custom web component that represents an interactive icon picker. It features
|
|
9
|
-
* search functionality, infinite scrolling, and popup-based selection. The component is highly customizable
|
|
10
|
-
* and integrates seamlessly with other `WJElement` components.
|
|
11
|
-
* @documentation https://elements.webjet.sk/components/icon-picker
|
|
12
|
-
* @status stable
|
|
13
|
-
* @augments {WJElement}
|
|
14
|
-
* @attribute {string} icon - The selected icon's name.
|
|
15
|
-
* @attribute {number} size - The number of icons displayed per page in infinite scroll. Default is 60.
|
|
16
|
-
* @csspart native - The native part of the component.
|
|
17
|
-
* @csspart anchor - The part representing the anchor button displaying the selected icon.
|
|
18
|
-
* @csspart picker - The picker part containing the search and icon selection interface.
|
|
19
|
-
* @csspart input - The input part for searching icons.
|
|
20
|
-
* @cssproperty [--wje-color-picker-value=#ff0000] - The default color value.
|
|
21
|
-
* @cssproperty [--wje-color-picker-area=transparent] - The background color of the color picker area.
|
|
22
|
-
* @cssproperty [--wje-color-picker-swatch=transparent] - The background color of the swatch picker.
|
|
23
|
-
* @cssproperty [--wje-color-picker-size=1rem] - The size of the icons in the picker.
|
|
24
|
-
* @cssproperty [--wje-color-picker-radius=4px] - The border radius of the picker.
|
|
25
|
-
* @tag wje-icon-picker
|
|
26
|
-
*/
|
|
27
|
-
export default class IconPicker extends WJElement {
|
|
28
|
-
/**
|
|
29
|
-
* Returns the CSS styles for the component.
|
|
30
|
-
* @static
|
|
31
|
-
* @returns {CSSStyleSheet}
|
|
32
|
-
*/
|
|
33
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
34
|
-
/**
|
|
35
|
-
* Returns the list of attributes to observe for changes.
|
|
36
|
-
* @static
|
|
37
|
-
* @returns {Array<string>}
|
|
38
|
-
*/
|
|
39
|
-
static get observedAttributes(): string[];
|
|
40
|
-
/**
|
|
41
|
-
* Dependencies of the IconPicker component.
|
|
42
|
-
* @property {object} dependencies
|
|
43
|
-
*/
|
|
44
|
-
dependencies: {
|
|
45
|
-
'wje-input': typeof Input;
|
|
46
|
-
'wje-infinite-scroll': typeof InfiniteScroll;
|
|
47
|
-
'wje-tooltip': typeof Tooltip;
|
|
48
|
-
'wje-popup': typeof Popup;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Setter for the markerPosition property.
|
|
52
|
-
* @param {any} value The value to set.
|
|
53
|
-
*/
|
|
54
|
-
set size(value: any);
|
|
55
|
-
/**
|
|
56
|
-
* Getter for the markerPosition property.
|
|
57
|
-
* @returns {any} size The value of the markerPosition property.
|
|
58
|
-
*/
|
|
59
|
-
get size(): any;
|
|
60
|
-
/**
|
|
61
|
-
* Setter for the value property.
|
|
62
|
-
* @param value
|
|
63
|
-
*/
|
|
64
|
-
set icon(value: string);
|
|
65
|
-
/**
|
|
66
|
-
* Getter for the value property.
|
|
67
|
-
* @returns {string}
|
|
68
|
-
*/
|
|
69
|
-
get icon(): string;
|
|
70
|
-
/**
|
|
71
|
-
* Prepares the component before drawing.
|
|
72
|
-
*/
|
|
73
|
-
beforeDraw(): Promise<void>;
|
|
74
|
-
tags: any[];
|
|
75
|
-
transformedObjects: any[];
|
|
76
|
-
index: any[];
|
|
77
|
-
/**
|
|
78
|
-
* Draws the component.
|
|
79
|
-
* @returns {DocumentFragment}
|
|
80
|
-
*/
|
|
81
|
-
draw(): DocumentFragment;
|
|
82
|
-
popup: HTMLElement;
|
|
83
|
-
input: HTMLElement;
|
|
84
|
-
anchor: HTMLDivElement;
|
|
85
|
-
picker: HTMLDivElement;
|
|
86
|
-
infiniteScroll: InfiniteScroll;
|
|
87
|
-
/**
|
|
88
|
-
* Called after the component has been drawn.
|
|
89
|
-
*/
|
|
90
|
-
afterDraw(): void;
|
|
91
|
-
value: any;
|
|
92
|
-
init: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Initializes the component.
|
|
95
|
-
*/
|
|
96
|
-
initial(): void;
|
|
97
|
-
/**
|
|
98
|
-
* Converts an object of tags into a transformed array of objects, separating `filled` and `outline` styles.
|
|
99
|
-
* The function processes an input object containing tags, extracts its values,
|
|
100
|
-
* and for each tag that has both `filled` and `outline` styles, splits them into
|
|
101
|
-
* two separate objects. Tags without `filled` styles remain unchanged.
|
|
102
|
-
* @param {object} tags The input object containing tags as properties. Each property is an object with a `styles` key.
|
|
103
|
-
* @param {object} tags[].styles The styles object containing `filled` and/or `outline` styles.
|
|
104
|
-
* @param {object} [tags[].styles.outline] The outline style object, if present.
|
|
105
|
-
* @param {object} [tags[].styles.filled] The filled style object, if present.
|
|
106
|
-
* @returns {Array<object>} An array of transformed objects. Objects with both `filled` and `outline` styles are split into separate objects, each containing only one style.
|
|
107
|
-
* @example
|
|
108
|
-
* const tags = {
|
|
109
|
-
* hourglass: {
|
|
110
|
-
* styles: {
|
|
111
|
-
* outline: { ... },
|
|
112
|
-
* filled: { ... },
|
|
113
|
-
* }
|
|
114
|
-
* },
|
|
115
|
-
* clock: {
|
|
116
|
-
* styles: {
|
|
117
|
-
* outline: { ... },
|
|
118
|
-
* }
|
|
119
|
-
* }
|
|
120
|
-
* };
|
|
121
|
-
* const result = convertObject(tags);
|
|
122
|
-
* console.log(result);
|
|
123
|
-
* // [
|
|
124
|
-
* // { styles: { outline: { ... } } },
|
|
125
|
-
* // { styles: { filled: { ... } } },
|
|
126
|
-
* // { styles: { outline: { ... } } }
|
|
127
|
-
* // ]
|
|
128
|
-
*/
|
|
129
|
-
convertObject: (tags?: {
|
|
130
|
-
styles: {
|
|
131
|
-
outline?: object;
|
|
132
|
-
filled?: object;
|
|
133
|
-
};
|
|
134
|
-
}) => Array<object>;
|
|
135
|
-
/**
|
|
136
|
-
* Converts an icon data object into an HTML element structure.
|
|
137
|
-
* This function creates a styled HTML element that represents an icon with a tooltip.
|
|
138
|
-
* The tooltip displays the name of the icon, and the icon itself is styled based on
|
|
139
|
-
* whether it uses the `filled` style.
|
|
140
|
-
* @param {object} data The icon data object.
|
|
141
|
-
* @returns {HTMLElement} A `div` element containing the icon wrapped in a `wje-tooltip`. The tooltip displays the icon name, and the `wje-icon` element represents the icon with attributes set according to the data.
|
|
142
|
-
* @example
|
|
143
|
-
* const iconData = {
|
|
144
|
-
* name: "hourglass",
|
|
145
|
-
* styles: {
|
|
146
|
-
* filled: { ... }
|
|
147
|
-
* }
|
|
148
|
-
* };
|
|
149
|
-
* const htmlElement = dataToHtml(iconData);
|
|
150
|
-
* document.body.appendChild(htmlElement);
|
|
151
|
-
*
|
|
152
|
-
* // The resulting structure:
|
|
153
|
-
* // <div class="icon-item">
|
|
154
|
-
* // <wje-tooltip content="hourglass">
|
|
155
|
-
* // <wje-icon name="hourglass" size="large" filled></wje-icon>
|
|
156
|
-
* // </wje-tooltip>
|
|
157
|
-
* // </div>
|
|
158
|
-
*/
|
|
159
|
-
dataToHtml: (data: object) => HTMLElement;
|
|
160
|
-
/**
|
|
161
|
-
* Sets up the infinite scroll for the component.
|
|
162
|
-
*/
|
|
163
|
-
setupInfiniteScroll(): void;
|
|
164
|
-
/**
|
|
165
|
-
* Gets the category of the tags.
|
|
166
|
-
* @param {Array} tags The tags to get the category of.
|
|
167
|
-
* @returns {Array} The category of the tags.
|
|
168
|
-
*/
|
|
169
|
-
getCategory(tags: any[]): any[];
|
|
170
|
-
/**
|
|
171
|
-
* Gets the tags.
|
|
172
|
-
* @returns {Promise<Array>} The tags of the component.
|
|
173
|
-
*/
|
|
174
|
-
getTags(): Promise<any[]>;
|
|
175
|
-
/**
|
|
176
|
-
* Searches icons based on user input.
|
|
177
|
-
* This method handles the input event and filters the available icons based on the provided search string.
|
|
178
|
-
* The filtering is performed on an index that combines icon names and their tags.
|
|
179
|
-
* The results are then adjusted for infinite scrolling.
|
|
180
|
-
* @param {Event} e The input event (e.g., `wje-input:input`) containing the search query details.
|
|
181
|
-
*/
|
|
182
|
-
searchIcon: (e: Event) => void;
|
|
183
|
-
/**
|
|
184
|
-
* Clears the icons container.
|
|
185
|
-
*/
|
|
186
|
-
clearIconsContainer(): void;
|
|
187
|
-
/**
|
|
188
|
-
* Closes the component.
|
|
189
|
-
*/
|
|
190
|
-
onClose: () => void;
|
|
191
|
-
/**
|
|
192
|
-
* Gets the URL of the tags.
|
|
193
|
-
* @param {string} path The path to get the URL of.
|
|
194
|
-
* @returns {string} The URL of the tags path.
|
|
195
|
-
*/
|
|
196
|
-
getTagsUrl: (path: string) => string;
|
|
197
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary This element represents an image. `Img` is a custom web component that represents an image. It extends from `WJElement`.
|
|
4
|
-
* @documentation https://elements.webjet.sk/components/img
|
|
5
|
-
* @status stable
|
|
6
|
-
* @augments {WJElement}
|
|
7
|
-
* @cssproperty --img-width - The width of the image
|
|
8
|
-
* @cssproperty --img-height - The height of the image
|
|
9
|
-
* @property {string} src - The source URL of the image.
|
|
10
|
-
* @property {string} alt - The alternative text for the image.
|
|
11
|
-
* @property {string} fallout - The action to perform when an error occurs while loading the image. The value can be a function or a predefined action like 'delete'.
|
|
12
|
-
* @property {string} loader - The URL of the image loader to display while the image is loading.
|
|
13
|
-
* @tag wje-img
|
|
14
|
-
*/
|
|
15
|
-
export default class Img extends WJElement {
|
|
16
|
-
/**
|
|
17
|
-
* Returns the CSS styles for the component.
|
|
18
|
-
* @static
|
|
19
|
-
* @returns {CSSStyleSheet}
|
|
20
|
-
*/
|
|
21
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the list of attributes to observe for changes.
|
|
24
|
-
* @static
|
|
25
|
-
* @returns {Array<string>}
|
|
26
|
-
*/
|
|
27
|
-
static get observedAttributes(): string[];
|
|
28
|
-
_fallout: boolean;
|
|
29
|
-
actions: {
|
|
30
|
-
delete: () => void;
|
|
31
|
-
log: () => void;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Sets the value of the `src` attribute for the element.
|
|
35
|
-
* @param {string} value The value to set for the `src` attribute.
|
|
36
|
-
*/
|
|
37
|
-
set src(value: string);
|
|
38
|
-
/**
|
|
39
|
-
* Retrieves the value of the 'src' attribute from the element.
|
|
40
|
-
* @returns {string} The value of the 'src' attribute.
|
|
41
|
-
*/
|
|
42
|
-
get src(): string;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the value of the 'alt' attribute for the element.
|
|
45
|
-
* @param {string} value The new value to set for the 'alt' attribute.
|
|
46
|
-
*/
|
|
47
|
-
set alt(value: string);
|
|
48
|
-
/**
|
|
49
|
-
* Retrieves the value of the 'alt' attribute for the current element.
|
|
50
|
-
* @returns {string|null} The value of the 'alt' attribute, or null if the attribute is not set.
|
|
51
|
-
*/
|
|
52
|
-
get alt(): string;
|
|
53
|
-
/**
|
|
54
|
-
* Sets the fallout property. Updates the `fallout` attribute if the value is a string;
|
|
55
|
-
* otherwise, assigns the value to the `_fallout` property.
|
|
56
|
-
* @param {string|*} value The value to set for the fallout property. If a string, it will update the `fallout` attribute; for other types, it will assign it to the `_fallout` property.
|
|
57
|
-
*/
|
|
58
|
-
set fallout(value: string);
|
|
59
|
-
/**
|
|
60
|
-
* Retrieves the value of the 'fallout' attribute if it exists, otherwise returns the internal `_fallout` property.
|
|
61
|
-
* @returns {string|null} The value of the 'fallout' attribute or the `_fallout` property if the attribute is not present. Returns null if no value is found.
|
|
62
|
-
*/
|
|
63
|
-
get fallout(): string;
|
|
64
|
-
/**
|
|
65
|
-
* Sets the value of the loader attribute.
|
|
66
|
-
* @param {string} value The value to set for the loader attribute.
|
|
67
|
-
*/
|
|
68
|
-
set loader(value: string);
|
|
69
|
-
/**
|
|
70
|
-
* Retrieves the value of the 'loader' attribute from the element.
|
|
71
|
-
* @returns {string|null} The value of the 'loader' attribute if set, otherwise null.
|
|
72
|
-
*/
|
|
73
|
-
get loader(): string;
|
|
74
|
-
/**
|
|
75
|
-
* Creates and assembles a lazy-loaded image element within a document fragment.
|
|
76
|
-
* @returns {DocumentFragment} A document fragment containing the image element.
|
|
77
|
-
*/
|
|
78
|
-
draw(): DocumentFragment;
|
|
79
|
-
native: HTMLImageElement;
|
|
80
|
-
/**
|
|
81
|
-
* Handles post-draw operations, such as setting up a lazy image loader using an IntersectionObserver.
|
|
82
|
-
* Observes when the target element becomes visible in the viewport and updates its source with the provided image source.
|
|
83
|
-
* Removes the `lazy` class once the image source is updated and unobserves the element.
|
|
84
|
-
* It also invokes the `onerrorFunc` method at the beginning to handle potential error scenarios.
|
|
85
|
-
* @returns {void} Does not return a value.
|
|
86
|
-
*/
|
|
87
|
-
afterDraw(): void;
|
|
88
|
-
/**
|
|
89
|
-
* Deletes the current image by calling the remove method.
|
|
90
|
-
* This function is typically used to trigger the removal of an image element
|
|
91
|
-
* or perform cleanup operations related to the image.
|
|
92
|
-
*/
|
|
93
|
-
deleteImage: () => void;
|
|
94
|
-
/**
|
|
95
|
-
* Adds a new action to the internal actions object.
|
|
96
|
-
* @param {string} name The name of the action to be added.
|
|
97
|
-
* @param {Function} func The function representing the action logic.
|
|
98
|
-
* @returns {void} This method does not return a value.
|
|
99
|
-
*/
|
|
100
|
-
addAction(name: string, func: Function): void;
|
|
101
|
-
/**
|
|
102
|
-
* Removes an action from the actions list if it exists.
|
|
103
|
-
* @param {string} name The name of the action to remove.
|
|
104
|
-
* @returns {void} Does not return a value.
|
|
105
|
-
*/
|
|
106
|
-
removeAction(name: string): void;
|
|
107
|
-
/**
|
|
108
|
-
* Handles error scenarios by checking the `fallout` property and performing
|
|
109
|
-
* corresponding actions. If `fallout` is not defined, the function terminates
|
|
110
|
-
* early. Logs the active actions and attempts to assign an error handler
|
|
111
|
-
* based on the `fallout` value. If the `fallout` value does not correspond to
|
|
112
|
-
* a recognized action, it logs an error message.
|
|
113
|
-
* @function onerrorFunc
|
|
114
|
-
* @memberof Img
|
|
115
|
-
*/
|
|
116
|
-
onerrorFunc: (img: any) => void;
|
|
117
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
import { default as Icon } from '../wje-icon/icon.js';
|
|
3
|
-
/**
|
|
4
|
-
* @summary This element allows users to compare two images. `ImgComparer` is a custom web component that represents an image comparer.
|
|
5
|
-
* It extends from `WJElement` and uses the `Icon` component.
|
|
6
|
-
* @documentation https://elements.webjet.sk/components/img-comparer
|
|
7
|
-
* @status stable
|
|
8
|
-
* @augments {WJElement}
|
|
9
|
-
* @slot before - The before image slot.
|
|
10
|
-
* @slot after - The after image slot.
|
|
11
|
-
* @csspart divider - The divider part.
|
|
12
|
-
* @cssproperty [--wje-img-compare-divider-area=12px] - The area of the divider. This is the size of the divider. Accepts any valid CSS size.
|
|
13
|
-
* @cssproperty [--wje-img-compare-divider-background=white] - Sets the background color of the divider in the image comparison component. Accepts any valid CSS color value (e.g., `red`, `#ff0000`, `rgba(255, 255, 255, 0.5)`). The default value is `white`, which ensures high contrast in most designs.
|
|
14
|
-
* @cssproperty [--wje-img-compare-divider-size=2px] - The size of the divider. This is the thickness of the divider. Accepts any valid CSS size.
|
|
15
|
-
* @cssproperty [--wje-img-compare-divider-left=50%] - The left position of the divider. This is the initial position of the divider.
|
|
16
|
-
* @cssproperty [--wje-img-compare-position=50%] - The position of the divider. This is the position of the divider.
|
|
17
|
-
* @cssproperty [--wje-img-compare-clip-path=inset(0 calc(100% - var(--wje-img-compare-position)) 0 0)] - The clip path of the divider. This is the clip path of the divider.
|
|
18
|
-
* @tag wje-img-comparer
|
|
19
|
-
*/
|
|
20
|
-
export default class ImgComparer extends WJElement {
|
|
21
|
-
/**
|
|
22
|
-
* Returns the CSS styles for the component.
|
|
23
|
-
* @static
|
|
24
|
-
* @returns {CSSStyleSheet}
|
|
25
|
-
*/
|
|
26
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
27
|
-
/**
|
|
28
|
-
* Returns the list of attributes to observe for changes.
|
|
29
|
-
* @static
|
|
30
|
-
* @returns {Array<string>}
|
|
31
|
-
*/
|
|
32
|
-
static get observedAttributes(): string[];
|
|
33
|
-
/**
|
|
34
|
-
* Dependencies of the ImgComparer component.
|
|
35
|
-
* @property {object} dependencies
|
|
36
|
-
*/
|
|
37
|
-
dependencies: {
|
|
38
|
-
'wje-icon': typeof Icon;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Draws the component.
|
|
42
|
-
* @returns {DocumentFragment}
|
|
43
|
-
*/
|
|
44
|
-
draw(): DocumentFragment;
|
|
45
|
-
native: HTMLDivElement;
|
|
46
|
-
/**
|
|
47
|
-
* Handles the drag event.
|
|
48
|
-
* @param {Event} e The event.
|
|
49
|
-
*/
|
|
50
|
-
handleDrag: (e: Event) => void;
|
|
51
|
-
position: number;
|
|
52
|
-
/**
|
|
53
|
-
* Clamps a number between a minimum and maximum value.
|
|
54
|
-
* @param {number} num The number to clamp.
|
|
55
|
-
* @param {number} min The minimum value.
|
|
56
|
-
* @param {number} max The maximum value.
|
|
57
|
-
* @returns {number} The clamped number.
|
|
58
|
-
*/
|
|
59
|
-
clamp: (num: number, min: number, max: number) => number;
|
|
60
|
-
}
|