@skf-design-system/ui-components 1.0.2-beta.0 → 1.0.2-beta.10
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/README.md +37 -9
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +98 -0
- package/dist/components/accordion/accordion-item.d.ts +3 -3
- package/dist/components/accordion/accordion-item.js +4 -5
- package/dist/components/accordion/accordion-item.styles.js +77 -0
- package/dist/components/accordion/accordion.component.d.ts +6 -10
- package/dist/components/accordion/accordion.component.js +9 -10
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/accordion/accordion.js +0 -2
- package/dist/components/alert/alert.component.d.ts +12 -10
- package/dist/components/alert/alert.component.js +59 -51
- package/dist/components/alert/alert.styles.js +50 -51
- package/dist/components/breadcrumb/breadcrumb-item.component.js +59 -0
- package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +63 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +6 -3
- package/dist/components/breadcrumb/breadcrumb.component.js +65 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +25 -0
- package/dist/components/button/button.component.d.ts +13 -10
- package/dist/components/button/button.component.js +69 -66
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +6 -5
- package/dist/components/card/card.component.d.ts +6 -1
- package/dist/components/card/card.component.js +46 -24
- package/dist/components/card/card.styles.js +31 -14
- package/dist/components/checkbox/checkbox.component.d.ts +14 -11
- package/dist/components/checkbox/checkbox.component.js +67 -69
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +2 -6
- package/dist/components/{date-picker/datepicker.calendar.component.d.ts → datepicker/datepicker-calendar.component.d.ts} +8 -1
- package/dist/components/{date-picker/datepicker.calendar.component.js → datepicker/datepicker-calendar.component.js} +109 -115
- package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
- package/dist/components/datepicker/datepicker-calendar.js +6 -0
- package/dist/components/{date-picker/datepicker.component.d.ts → datepicker/datepicker-popup.component.d.ts} +9 -20
- package/dist/components/datepicker/datepicker-popup.component.js +272 -0
- package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
- package/dist/components/{date-picker/datepicker.helpers.d.ts → datepicker/datepicker-popup.helpers.d.ts} +3 -3
- package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
- package/dist/components/datepicker/datepicker-popup.js +6 -0
- package/dist/components/{date-picker/datepicker.styles.js → datepicker/datepicker-popup.styles.js} +3 -3
- package/dist/components/{date-picker-input/datepicker-input.component.d.ts → datepicker/datepicker.component.d.ts} +22 -14
- package/dist/components/datepicker/datepicker.component.js +455 -0
- package/dist/components/datepicker/datepicker.d.ts +8 -0
- package/dist/components/datepicker/datepicker.js +6 -0
- package/dist/components/dialog/dialog.component.d.ts +8 -6
- package/dist/components/dialog/dialog.component.js +67 -67
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/dialog.styles.js +4 -4
- package/dist/components/divider/divider.component.d.ts +3 -0
- package/dist/components/divider/divider.component.js +43 -22
- package/dist/components/divider/divider.styles.js +9 -9
- package/dist/components/drawer/drawer.component.d.ts +24 -12
- package/dist/components/drawer/drawer.component.js +87 -63
- package/dist/components/drawer/drawer.d.ts +2 -2
- package/dist/components/drawer/drawer.styles.js +47 -40
- package/dist/components/header/header.component.d.ts +7 -4
- package/dist/components/header/header.component.js +68 -55
- package/dist/components/header/header.d.ts +2 -2
- package/dist/components/header/header.styles.js +2 -2
- package/dist/components/heading/heading.component.d.ts +8 -6
- package/dist/components/heading/heading.component.js +52 -24
- package/dist/components/heading/heading.styles.js +34 -36
- package/dist/components/icon/icon.component.d.ts +15 -17
- package/dist/components/icon/icon.component.js +62 -43
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +60 -60
- package/dist/components/input/input.component.d.ts +34 -39
- package/dist/components/input/input.component.js +159 -153
- package/dist/components/input/input.controllers.d.ts +0 -1
- package/dist/components/input/input.controllers.js +14 -19
- package/dist/components/link/link.component.d.ts +20 -25
- package/dist/components/link/link.component.js +104 -107
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +54 -46
- package/dist/components/loader/loader.component.d.ts +6 -4
- package/dist/components/loader/loader.component.js +49 -42
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +34 -30
- package/dist/components/logo/logo.component.d.ts +8 -6
- package/dist/components/logo/logo.component.js +55 -51
- package/dist/components/logo/logo.styles.js +26 -16
- package/dist/components/menu/menu-item.component.d.ts +13 -0
- package/dist/components/menu/menu-item.component.js +13 -0
- package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
- package/dist/components/menu/menu-item.styles.js +23 -0
- package/dist/components/menu/menu.component.d.ts +14 -8
- package/dist/components/menu/menu.component.js +10 -12
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/{nav-item → nav}/nav-item.component.d.ts +6 -4
- package/dist/components/nav/nav-item.component.js +57 -0
- package/dist/components/nav/nav-item.styles.js +43 -0
- package/dist/components/nav/nav.component.d.ts +9 -0
- package/dist/components/nav/nav.component.js +47 -21
- package/dist/components/nav/nav.d.ts +2 -2
- package/dist/components/nav/nav.styles.js +15 -9
- package/dist/components/popover/popover.component.d.ts +17 -6
- package/dist/components/popover/popover.component.js +22 -16
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/progress/progress.component.d.ts +4 -2
- package/dist/components/progress/progress.component.js +38 -35
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/progress.styles.js +42 -35
- package/dist/components/radio/radio.component.d.ts +13 -9
- package/dist/components/radio/radio.component.js +96 -91
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +2 -2
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
- package/dist/components/segmented-button/segmented-button.component.js +71 -0
- package/dist/components/segmented-button/segmented-button.d.ts +2 -2
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +4 -0
- package/dist/components/select/select-option-group.component.js +50 -0
- package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
- package/dist/components/select/select-option-group.style.js +24 -0
- package/dist/components/{select-option → select}/select-option.component.d.ts +16 -12
- package/dist/components/select/select-option.component.js +135 -0
- package/dist/components/select/select-option.styles.js +65 -0
- package/dist/components/select/select.component.d.ts +35 -25
- package/dist/components/select/select.component.js +126 -88
- package/dist/components/select/select.controllers.d.ts +1 -1
- package/dist/components/select/select.controllers.js +16 -18
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +116 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
- package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +4 -4
- package/dist/components/stepper/stepper.component.d.ts +2 -2
- package/dist/components/stepper/stepper.component.js +17 -18
- package/dist/components/stepper/stepper.d.ts +2 -2
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/stepper/stepper.helpers.js +6 -7
- package/dist/components/switch/switch.component.d.ts +4 -2
- package/dist/components/switch/switch.component.js +64 -58
- package/dist/components/switch/switch.d.ts +2 -2
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +39 -0
- package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.component.d.ts +3 -3
- package/dist/components/{tab → tabs}/tab.component.js +18 -15
- package/dist/components/{tab → tabs}/tab.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.styles.js +2 -2
- package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
- package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +36 -37
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +6 -0
- package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
- package/dist/components/tag/tag.component.d.ts +20 -16
- package/dist/components/tag/tag.component.js +74 -65
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.styles.js +63 -50
- package/dist/components/textarea/textarea.component.d.ts +14 -13
- package/dist/components/textarea/textarea.component.js +77 -72
- package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -0
- package/dist/components/toast/toast-item.styles.js +21 -0
- package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
- package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast/toast.component.d.ts +5 -4
- package/dist/components/toast/toast.component.js +16 -16
- package/dist/components/toast/toast.singleton.d.ts +5 -5
- package/dist/components/toast/toast.singleton.js +28 -29
- package/dist/components/tooltip/tooltip.component.d.ts +11 -3
- package/dist/components/tooltip/tooltip.component.js +18 -9
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +2202 -1720
- package/dist/index.d.ts +19 -12
- package/dist/index.js +108 -89
- package/dist/internal/base-classes/popover/popover.base.d.ts +30 -6
- package/dist/internal/base-classes/popover/popover.base.js +83 -69
- package/dist/internal/base-classes/popover/popover.styles.js +4 -5
- package/dist/internal/components/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -19
- package/dist/internal/components/hint/hint.component.d.ts +6 -2
- package/dist/internal/components/hint/hint.component.js +47 -20
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +30 -26
- package/dist/internal/components/skf-element.d.ts +1 -3
- package/dist/internal/components/skf-element.js +4 -9
- package/dist/internal/constants/iconSeverity.d.ts +3 -2
- package/dist/internal/constants/iconSeverity.js +2 -3
- package/dist/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/controllers/popover.controller.js +11 -14
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/helpers/stateMap.d.ts +14 -0
- package/dist/internal/helpers/stateMap.js +68 -0
- package/dist/internal/helpers/uuid.d.ts +8 -10
- package/dist/internal/helpers/uuid.js +4 -11
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/helpers/watch.js +12 -12
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +4 -4
- package/dist/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +22 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +38 -37
- package/dist/styles/global-alt.css +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +27 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.js +27 -0
- package/dist/translations/index.d.ts +4 -0
- package/dist/translations/pt.d.ts +3 -0
- package/dist/translations/pt.js +27 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.js +27 -0
- package/dist/types/jsx/custom-element-jsx.d.ts +2031 -927
- package/dist/types/vue/index.d.ts +357 -324
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +360 -1241
- package/dist/web-types.json +932 -805
- package/package.json +38 -52
- package/dist/components/accordion/accordion.test.d.ts +0 -1
- package/dist/components/checkbox/checkbox.test.d.ts +0 -1
- package/dist/components/collapse/collapse.component.d.ts +0 -40
- package/dist/components/collapse/collapse.component.js +0 -86
- package/dist/components/collapse/collapse.d.ts +0 -8
- package/dist/components/collapse/collapse.js +0 -6
- package/dist/components/collapse/collapse.styles.d.ts +0 -2
- package/dist/components/collapse/collapse.styles.js +0 -77
- package/dist/components/collapse/collapse.test.d.ts +0 -1
- package/dist/components/date-picker/datepicker.component.js +0 -261
- package/dist/components/date-picker/datepicker.d.ts +0 -10
- package/dist/components/date-picker/datepicker.helpers.js +0 -76
- package/dist/components/date-picker/datepicker.js +0 -8
- package/dist/components/date-picker-input/datepicker-input.component.js +0 -441
- package/dist/components/date-picker-input/datepicker-input.d.ts +0 -8
- package/dist/components/date-picker-input/datepicker-input.js +0 -6
- package/dist/components/input/input.test.d.ts +0 -1
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/components/menu-item/menu-item.component.js +0 -13
- package/dist/components/menu-item/menu-item.styles.js +0 -19
- package/dist/components/nav-item/nav-item.component.js +0 -38
- package/dist/components/nav-item/nav-item.styles.js +0 -39
- package/dist/components/radio/radio.test.d.ts +0 -1
- package/dist/components/select-option/select-option.component.js +0 -123
- package/dist/components/select-option/select-option.styles.js +0 -53
- package/dist/components/select-option-group/select-option-group.component.js +0 -31
- package/dist/components/select-option-group/select-option-group.style.js +0 -18
- package/dist/components/stepper-item/stepper-item.component.js +0 -113
- package/dist/components/switch/switch.test.d.ts +0 -1
- package/dist/components/tab-group/tab-group.d.ts +0 -8
- package/dist/components/tab-group/tab-group.js +0 -6
- package/dist/components/tab-panel/tab-panel.component.js +0 -36
- package/dist/components/toast-item/toast-item.styles.js +0 -18
- package/dist/internal/constants/heading.d.ts +0 -2
- package/dist/internal/playwright/index.d.ts +0 -1
- /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
- /package/dist/components/{date-picker/datepicker.calendar.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{date-picker/datepicker.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
- /package/dist/components/{date-picker/datepicker.calendar.styles.js → datepicker/datepicker-calendar.styles.js} +0 -0
- /package/dist/components/{menu-item/menu-item.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.helpers.d.ts → datepicker/datepicker.helpers.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.helpers.js → datepicker/datepicker.helpers.js} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.styles.d.ts → datepicker/datepicker.styles.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.styles.js → datepicker/datepicker.styles.js} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
- /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
- /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.js +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{tab-group/tab-group.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.d.ts +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
- /package/dist/components/{tab → tabs}/tab.js +0 -0
- /package/dist/components/{tab → tabs}/tab.styles.d.ts +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -0,0 +1,455 @@
|
|
1
|
+
var S = (o) => {
|
2
|
+
throw TypeError(o);
|
3
|
+
};
|
4
|
+
var P = (o, l, e) => l.has(o) || S("Cannot " + e);
|
5
|
+
var D = (o, l, e) => (P(o, l, "read from private field"), e ? e.call(o) : l.get(o)), E = (o, l, e) => l.has(o) ? S("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(o) : l.set(o, e), C = (o, l, e, t) => (P(o, l, "write to private field"), t ? t.call(o, e) : l.set(o, e), e);
|
6
|
+
import "../icon/icon.js";
|
7
|
+
import { computePosition as T, flip as B, offset as x } from "@floating-ui/dom";
|
8
|
+
import { FormBase as R } from "../../internal/components/formBase.js";
|
9
|
+
import "../../internal/components/hint/hint.js";
|
10
|
+
import { PopoverController as A } from "../../internal/controllers/popover.controller.js";
|
11
|
+
import { hintSeverity as L } from "../../internal/helpers/hintSeverity.js";
|
12
|
+
import { watch as j } from "../../internal/helpers/watch.js";
|
13
|
+
import { Asterisk as V } from "../../internal/templates/asterisk.js";
|
14
|
+
import { Temporal as I } from "@js-temporal/polyfill";
|
15
|
+
import { componentStyles as q } from "../../styles/component.styles.js";
|
16
|
+
import { LocalizeController as U } from "../../utilities/localize.js";
|
17
|
+
import { nothing as f, html as b } from "lit";
|
18
|
+
import { property as d, state as k, query as $, queryAssignedNodes as N } from "lit/decorators.js";
|
19
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
20
|
+
import { live as O } from "lit/directives/live.js";
|
21
|
+
import "./datepicker-popup.js";
|
22
|
+
import { dateFormatter as v, is as m, isPopoverOpen as Y, debounce as z } from "./datepicker.helpers.js";
|
23
|
+
import { styles as W } from "./datepicker.styles.js";
|
24
|
+
var H = Object.defineProperty, K = Object.getOwnPropertyDescriptor, r = (o, l, e, t) => {
|
25
|
+
for (var i = t > 1 ? void 0 : t ? K(l, e) : l, h = o.length - 1, p; h >= 0; h--)
|
26
|
+
(p = o[h]) && (i = (t ? p(l, e, i) : p(i)) || i);
|
27
|
+
return t && i && H(l, e, i), i;
|
28
|
+
}, g;
|
29
|
+
const w = class w extends R {
|
30
|
+
constructor() {
|
31
|
+
super();
|
32
|
+
E(this, g);
|
33
|
+
C(this, g, new U(this)), this.popoverController = new A(this), this.id = "skf-datepicker-input", this.lang = "en", this.placeholder = "YYYY-MM-DD", this.range = !1, this.size = "md", this.validateOn = "change", this.invalid = !1, this.selectedRangeDates = { start: null, end: null }, this.showClearbutton = !1, this.abortController = new AbortController(), this.abortSignal = this.abortController.signal, this._handleSelectedDate = () => {
|
34
|
+
this.pristine = !1, this._internals.setFormValue(this.value ?? ""), this.validateInput();
|
35
|
+
}, this._handleDateSelected = (e) => {
|
36
|
+
if (this.range && "start" in e.detail.date && "end" in e.detail.date) {
|
37
|
+
const t = e.detail.date.start, i = e.detail.date.end;
|
38
|
+
this.value = `${v(t)},${v(i)}`, this.selectedRangeDates = { start: t, end: i };
|
39
|
+
} else !this.range && e.detail.date instanceof Date && (this.value = v(e.detail.date), this._animatePopover({ el: this.$popover, show: !1 }).then(() => {
|
40
|
+
this.$popover.hidePopover();
|
41
|
+
}));
|
42
|
+
}, this._handleKeyboardEvents = (e) => {
|
43
|
+
const t = e.target.closest("input");
|
44
|
+
if (t) {
|
45
|
+
if ((t.selectionStart ?? 0) < t.value.length && /[[0-9-]/.test(e.key)) {
|
46
|
+
const i = t.selectionStart ?? 0, p = t.value.split("").slice(0, i);
|
47
|
+
t.value = p.join("");
|
48
|
+
}
|
49
|
+
if (t.name.endsWith("-end") && (e.key === "Backspace" && t.value.length === 0 || t.selectionStart === 0 && e.key === "ArrowLeft") && (e.preventDefault(), this.$input.focus()), e.key === "Tab" && !e.shiftKey && t.name.endsWith("-end") && (e.preventDefault(), this.$popover.childNodes[1].shadowRoot?.querySelector("skf-datepicker-calendar")?.shadowRoot?.querySelector("button")?.focus()), (t.value.length === 4 || t.value.length === 7) && /[[0-9]/.test(e.key) && (t.value = `${t.value}-${e.key}`, e.preventDefault()), e.key === "Escape")
|
50
|
+
if (t.blur(), this.$popover.hidePopover(), this.range) {
|
51
|
+
const i = this.$input.value, h = this.$input_range_end.value;
|
52
|
+
if (!m(i, h).date()) return;
|
53
|
+
this.$datepickerPopup.selectedDateRange = {
|
54
|
+
start: new Date(i),
|
55
|
+
end: new Date(h)
|
56
|
+
}, this.$datepickerPopup.emit("selected-date-changed", {
|
57
|
+
detail: { date: new Date(i) }
|
58
|
+
});
|
59
|
+
} else {
|
60
|
+
if (!t.value || !m(t.value).date()) return;
|
61
|
+
this.$datepickerPopup.emit("selected-date-changed", {
|
62
|
+
detail: { date: new Date(t.value) }
|
63
|
+
});
|
64
|
+
}
|
65
|
+
e.key === "Enter" && (t.blur(), this.$popover.hidePopover());
|
66
|
+
}
|
67
|
+
}, this._handleFocus = () => {
|
68
|
+
this.showPopover();
|
69
|
+
}, this._handleBlur = (e) => {
|
70
|
+
!e.target.name.endsWith("-end") && this.range;
|
71
|
+
}, this._handleClose = () => {
|
72
|
+
this.$anchor.blur();
|
73
|
+
}, this.clearInput = () => {
|
74
|
+
this.value = "", this.$datepickerPopup.clearSelection();
|
75
|
+
}, this._handleInput = (e) => {
|
76
|
+
const t = e.target, i = String(t.value).replace(/[^0-9-]/g, "");
|
77
|
+
if (t.value = i, t.setCustomValidity(this.customError ?? ""), !!m(t.value).ISO()) {
|
78
|
+
if (this.focusTimeoutId && clearTimeout(this.focusTimeoutId), this.$datepickerPopup.date = t.value, this.range) {
|
79
|
+
this.$datepickerPopup.selectedDateRange = {
|
80
|
+
start: m(this.$input.value).ISO() ? new Date(this.$input.value) : null,
|
81
|
+
end: m(this.$input_range_end.value).ISO() ? new Date(this.$input_range_end.value) : null
|
82
|
+
};
|
83
|
+
const h = Object.values(this.$datepickerPopup.selectedDateRange).filter(Boolean).map((p) => new Date(p).toLocaleDateString("en-CA")).join();
|
84
|
+
this.value = h, m(this.$input.value).ISO() && (this.focusTimeoutId = setTimeout(() => {
|
85
|
+
this.$input_range_end.focus();
|
86
|
+
}, 200));
|
87
|
+
} else
|
88
|
+
this.$datepickerPopup.selectedDate = new Date(t.value), this.$datepickerPopup.emit("selected-date-changed", {
|
89
|
+
detail: { date: new Date(t.value) }
|
90
|
+
});
|
91
|
+
this.validateOn === "input" && (this._pristine = !1, this.validateInput());
|
92
|
+
}
|
93
|
+
}, this._toggleClearButton = (e = !1) => {
|
94
|
+
this.showClearbutton = e;
|
95
|
+
}, this.reposition = async () => {
|
96
|
+
const { x: e, y: t } = await T(this.$anchor, this.$popover, {
|
97
|
+
placement: "bottom-start",
|
98
|
+
middleware: [B(), x(0)],
|
99
|
+
strategy: "fixed"
|
100
|
+
});
|
101
|
+
Object.assign(this.$popover.style, {
|
102
|
+
left: `${String(e)}px`,
|
103
|
+
top: `${String(t)}px`
|
104
|
+
});
|
105
|
+
}, this.addEventListener("skf-datepicker-selected", this._handleDateSelected), this.addEventListener("reset", () => {
|
106
|
+
this.clearInput(), this.validateInput();
|
107
|
+
});
|
108
|
+
}
|
109
|
+
set customInvalid(e) {
|
110
|
+
this.customError = e ?? "";
|
111
|
+
}
|
112
|
+
get customInvalid() {
|
113
|
+
return this.customError;
|
114
|
+
}
|
115
|
+
connectedCallback() {
|
116
|
+
super.connectedCallback(), this._init_date = this.value?.split(",")[0], this.addEventListener("selected-date-changed", this._handleSelectedDate);
|
117
|
+
}
|
118
|
+
disconnectedCallback() {
|
119
|
+
super.disconnectedCallback(), this.abortController.abort();
|
120
|
+
}
|
121
|
+
firstUpdated() {
|
122
|
+
this.$datepickerPopup.date = this._init_date ? I.PlainDate.from(this._init_date).toString() : I.Now.plainDateISO().toString(), this.range ? this.$datepickerPopup.selectedDateRange = {
|
123
|
+
start: this._init_date ? new Date(this._init_date) : null,
|
124
|
+
end: this.value?.split(",")[1] ? new Date(this.value.split(",")[1]) : null
|
125
|
+
} : this.$datepickerPopup.selectedDate = this._init_date ? new Date(this._init_date) : void 0, this.hint && !this.hasAttribute("hint") && this.setAttribute("hint", this.hint), this.validateInput();
|
126
|
+
}
|
127
|
+
attributeChangedCallback(e, t, i) {
|
128
|
+
if (super.attributeChangedCallback(e, t, i), e === "custom-invalid")
|
129
|
+
if (typeof i == "string") {
|
130
|
+
const p = this.withFallback(i);
|
131
|
+
this._pristine = !1, this._internals.setValidity({ customError: !0 }, p), this.invalid = !0, this.hint = p, this.checkValidity();
|
132
|
+
} else
|
133
|
+
this._internals.setValidity({}), this.validateInput();
|
134
|
+
}
|
135
|
+
_handleValueChange() {
|
136
|
+
this.value?.trim() || this.$datepickerPopup.clearSelection(), this._internals.setFormValue(this.value ?? ""), this.validateInput(), this._pristine = !1, this.$input.value = v(this.value?.split(",")[0]), this.range ? (this.$datepickerPopup.selectedDateRange = {
|
137
|
+
start: this.value?.split(",")[0] ? new Date(this.value.split(",")[0]) : null,
|
138
|
+
end: this.value?.split(",")[1] ? new Date(this.value.split(",")[1]) : null
|
139
|
+
}, this.$input_range_end.value = v(this.value?.split(",")[1]), this.$datepickerPopup.date = this.value?.split(",")[0] ?? "") : (this.$datepickerPopup.selectedDate = this.value?.split(",")[0] ? new Date(this.value.split(",")[0]) : void 0, this.$datepickerPopup.date = this.value?.split(",")[0] ?? ""), this.validateInput();
|
140
|
+
}
|
141
|
+
showPopover() {
|
142
|
+
if (Y(this.$popover)) return;
|
143
|
+
z(() => {
|
144
|
+
this.$popover.showPopover(), this._animatePopover({ show: !0 });
|
145
|
+
}, 200)(), this.addEventListener("focusout", this.hidePopover.bind(this), {
|
146
|
+
once: !0,
|
147
|
+
signal: this.abortSignal
|
148
|
+
});
|
149
|
+
}
|
150
|
+
hidePopover() {
|
151
|
+
this.removeEventListener("focusout", this.hidePopover.bind(this)), document.activeElement?.closest("skf-datepicker-input") !== this && this.$popover.hidePopover();
|
152
|
+
}
|
153
|
+
/**
|
154
|
+
* Clears the input field
|
155
|
+
*/
|
156
|
+
clear() {
|
157
|
+
this.clearInput(), this._toggleClearButton(!1);
|
158
|
+
}
|
159
|
+
/** @internal */
|
160
|
+
async _animatePopover({ el: e = this.$popover, show: t }) {
|
161
|
+
return t && (e.style.opacity = "0", e.style.transform = "scaleY(0.5)"), new Promise((i) => {
|
162
|
+
const h = [
|
163
|
+
{ opacity: 0, transform: "scaleY(0.5)" },
|
164
|
+
{ opacity: 1, transform: "scaleY(1)" }
|
165
|
+
], p = t ? h : h.reverse();
|
166
|
+
setTimeout(
|
167
|
+
() => {
|
168
|
+
e.style.transformOrigin = "top";
|
169
|
+
const _ = this.$popover.animate(p, {
|
170
|
+
duration: 100,
|
171
|
+
easing: "linear",
|
172
|
+
fill: "both"
|
173
|
+
});
|
174
|
+
_.onfinish = () => {
|
175
|
+
i();
|
176
|
+
};
|
177
|
+
},
|
178
|
+
t ? 0 : 50
|
179
|
+
);
|
180
|
+
});
|
181
|
+
}
|
182
|
+
/** @internal consider sharing this functionality with input */
|
183
|
+
validateInput() {
|
184
|
+
if (this._internals.validity.customError) return;
|
185
|
+
let t = JSON.parse(JSON.stringify(this._internals.validity)), i = {};
|
186
|
+
if (this.selectableFrom) {
|
187
|
+
const { validityFragment: a, errorMessageFragment: n } = h(this);
|
188
|
+
t = { ...t, ...a }, i = { ...i, ...n };
|
189
|
+
}
|
190
|
+
if (this.selectableTo) {
|
191
|
+
const { validityFragment: a, errorMessageFragment: n } = p(this);
|
192
|
+
t = { ...t, ...a }, i = { ...i, ...n };
|
193
|
+
}
|
194
|
+
if (this.range) {
|
195
|
+
const { validityFragment: a, errorMessageFragment: n } = _(this);
|
196
|
+
t = { ...t, ...a }, i = { ...i, ...n };
|
197
|
+
}
|
198
|
+
if (this.required) {
|
199
|
+
const { validityFragment: a, errorMessageFragment: n } = M(this);
|
200
|
+
t = { ...t, ...a }, i = { ...i, ...n };
|
201
|
+
}
|
202
|
+
if (t.valid = !Object.values(t).some((a) => a), this.invalid = !1, t.valid)
|
203
|
+
this._internals.setValidity({ customError: this._internals.validity.customError }), this.hint = this.getAttribute("hint") ?? "";
|
204
|
+
else {
|
205
|
+
this.invalid = !this._pristine && !t.valid;
|
206
|
+
let a;
|
207
|
+
for (a in t) {
|
208
|
+
const n = `data-${a.toString()}`;
|
209
|
+
if (t[a]) {
|
210
|
+
this.validationError = a.toString();
|
211
|
+
const c = this.hasAttribute(n) ? this.getAttribute(n) : i[a];
|
212
|
+
this._internals.setValidity(
|
213
|
+
{ [this.validationError]: !0, customError: this._internals.validity.customError },
|
214
|
+
this.withFallback(c)
|
215
|
+
), c && !this._pristine && (this.hint = c), this.invalid && this.customErrorDisplay && this.checkValidity();
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}
|
219
|
+
function h(a) {
|
220
|
+
const n = { validityFragment: {}, errorMessageFragment: {} };
|
221
|
+
if (!a.selectableFrom) return n;
|
222
|
+
const c = new Date(a.selectableFrom);
|
223
|
+
if (new Date(a.$input.value) < c) {
|
224
|
+
const y = a.getAttribute("data-rangeunderflow") ?? `Date is out of range. Earliest selectable date is ${a.selectableFrom}.`;
|
225
|
+
return {
|
226
|
+
validityFragment: { rangeUnderflow: !0, valid: !1 },
|
227
|
+
errorMessageFragment: { rangeUnderflow: y }
|
228
|
+
};
|
229
|
+
}
|
230
|
+
return n;
|
231
|
+
}
|
232
|
+
function p(a) {
|
233
|
+
const n = { validityFragment: {}, errorMessageFragment: {} };
|
234
|
+
if (!a.selectableTo) return n;
|
235
|
+
const c = new Date(a.selectableTo);
|
236
|
+
if (new Date(a.$input.value) > c) {
|
237
|
+
const y = a.getAttribute("data-rangeoverflow") ?? `Date is out of range. Latest selectable date is ${a.selectableTo}.`;
|
238
|
+
return {
|
239
|
+
validityFragment: { rangeOverflow: !0, valid: !1 },
|
240
|
+
errorMessageFragment: { rangeOverflow: y }
|
241
|
+
};
|
242
|
+
}
|
243
|
+
return n;
|
244
|
+
}
|
245
|
+
function _(a) {
|
246
|
+
const n = { validityFragment: {}, errorMessageFragment: {} }, c = new Date(a.$input.value);
|
247
|
+
if (new Date(a.$input_range_end.value) < c) {
|
248
|
+
const y = a.getAttribute("data-rangeunderflow") ?? "End date cannot be before start date";
|
249
|
+
return {
|
250
|
+
validityFragment: { rangeUnderflow: !0, valid: !1 },
|
251
|
+
errorMessageFragment: { rangeUnderflow: y }
|
252
|
+
};
|
253
|
+
}
|
254
|
+
return n;
|
255
|
+
}
|
256
|
+
function M(a) {
|
257
|
+
const n = { validityFragment: {}, errorMessageFragment: {} };
|
258
|
+
return !a.$input.value || a.range && !a.$input_range_end.value ? {
|
259
|
+
validityFragment: { valueMissing: !0, valid: !1 },
|
260
|
+
errorMessageFragment: { valueMissing: "This field is required" }
|
261
|
+
} : n;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
render() {
|
265
|
+
const e = (this._defaultSlot.length === 0 || !this._defaultSlot[0]?.textContent?.trim()) && !this.label;
|
266
|
+
return b`
|
267
|
+
<div
|
268
|
+
id="root"
|
269
|
+
@mouseenter=${() => {
|
270
|
+
this.value && this._toggleClearButton(!0);
|
271
|
+
}}
|
272
|
+
@mouseleave=${() => {
|
273
|
+
this._toggleClearButton(!1);
|
274
|
+
}}
|
275
|
+
>
|
276
|
+
<label>
|
277
|
+
<div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${e} id="label">
|
278
|
+
<slot>${this.label}</slot>
|
279
|
+
${this.required ? V(D(this, g).term("required")) : f}
|
280
|
+
</div>
|
281
|
+
<div id="input">
|
282
|
+
<input
|
283
|
+
?disabled=${this.disabled}
|
284
|
+
?readonly=${this.readonly}
|
285
|
+
.value=${O(
|
286
|
+
this.range ? v(this.value?.split(",")[0]) : v(this.value)
|
287
|
+
)}
|
288
|
+
@blur=${this._handleBlur}
|
289
|
+
@click=${this._handleFocus}
|
290
|
+
@focus=${this._handleFocus}
|
291
|
+
@input=${this._handleInput}
|
292
|
+
@keydown=${this._handleKeyboardEvents}
|
293
|
+
aria-describedby=${u(this.hint?.trim() ? "hint" : f)}
|
294
|
+
aria-errormessage=${u(this.hint?.trim() ? "hint" : f)}
|
295
|
+
aria-invalid=${!!this.invalid}
|
296
|
+
autocomplete="off"
|
297
|
+
data-testid="field-input"
|
298
|
+
inputmode=${u(this.inputMode)}
|
299
|
+
maxlength="10"
|
300
|
+
name=${this.name ?? "calendar"}
|
301
|
+
placeholder=${u(this.placeholder)}
|
302
|
+
type="text"
|
303
|
+
/>
|
304
|
+
${this.range ? b`
|
305
|
+
<skf-icon name="arrowRight"></skf-icon>
|
306
|
+
<input
|
307
|
+
?disabled=${this.disabled}
|
308
|
+
?readonly=${this.readonly}
|
309
|
+
.value=${O(v(this.value?.split(",")[1]))}
|
310
|
+
@blur=${this._handleBlur}
|
311
|
+
@click=${this._handleFocus}
|
312
|
+
@focus=${this._handleFocus}
|
313
|
+
@input=${this._handleInput}
|
314
|
+
@keydown=${this._handleKeyboardEvents}
|
315
|
+
aria-describedby=${u(this.hint?.trim() ? "hint" : f)}
|
316
|
+
aria-errormessage=${u(this.hint?.trim() ? "hint" : f)}
|
317
|
+
aria-invalid=${!!this.invalid}
|
318
|
+
autocomplete="off"
|
319
|
+
data-testid="field-input-range-end"
|
320
|
+
inputmode=${u(this.inputMode)}
|
321
|
+
maxlength="10"
|
322
|
+
name=${(this.name ?? "calendar") + "-end"}
|
323
|
+
placeholder=${u(this.placeholder)}
|
324
|
+
type="text"
|
325
|
+
/>
|
326
|
+
` : f}
|
327
|
+
${this.showClearbutton ? b`
|
328
|
+
<button
|
329
|
+
aria-label=${D(this, g).term("close")}
|
330
|
+
class="password skf-icon-host"
|
331
|
+
type="button"
|
332
|
+
@click=${this.clear.bind(this)}
|
333
|
+
>
|
334
|
+
<skf-icon name="close" size="sm"></skf-icon>
|
335
|
+
</button>
|
336
|
+
` : b`
|
337
|
+
<button class="password skf-icon-host" type="button">
|
338
|
+
<skf-icon name="calendarMonth" size="sm"></skf-icon>
|
339
|
+
</button>
|
340
|
+
`}
|
341
|
+
</div>
|
342
|
+
</label>
|
343
|
+
${this.hint && b`
|
344
|
+
<skf-hint
|
345
|
+
?disabled=${this.disabled}
|
346
|
+
aria-live=${this.invalid ? "assertive" : "polite"}
|
347
|
+
id="hint"
|
348
|
+
severity=${u(L(this.invalid, this.severity))}
|
349
|
+
>${this.customInvalid ?? this.hint}
|
350
|
+
</skf-hint>
|
351
|
+
`}
|
352
|
+
</div>
|
353
|
+
|
354
|
+
<div id="popover" popover @close=${this._handleClose}>
|
355
|
+
<skf-datepicker-popup
|
356
|
+
?range=${this.range}
|
357
|
+
id=${this.id}
|
358
|
+
invalid-dates=${u(this.invalidDates)}
|
359
|
+
lang=${this.lang}
|
360
|
+
selectable-from=${u(this.selectableFrom)}
|
361
|
+
selectable-to=${u(this.selectableTo)}
|
362
|
+
></skf-datepicker-popup>
|
363
|
+
</div>
|
364
|
+
`;
|
365
|
+
}
|
366
|
+
};
|
367
|
+
g = new WeakMap(), w.styles = [q, W];
|
368
|
+
let s = w;
|
369
|
+
r([
|
370
|
+
d({ attribute: "custom-invalid", reflect: !0 })
|
371
|
+
], s.prototype, "customInvalid", 1);
|
372
|
+
r([
|
373
|
+
d({ type: String })
|
374
|
+
], s.prototype, "id", 2);
|
375
|
+
r([
|
376
|
+
d()
|
377
|
+
], s.prototype, "label", 2);
|
378
|
+
r([
|
379
|
+
d({ type: String })
|
380
|
+
], s.prototype, "lang", 2);
|
381
|
+
r([
|
382
|
+
d({ type: Boolean, attribute: "hide-label" })
|
383
|
+
], s.prototype, "hideLabel", 2);
|
384
|
+
r([
|
385
|
+
d()
|
386
|
+
], s.prototype, "hint", 2);
|
387
|
+
r([
|
388
|
+
d({ attribute: "invalid-dates" })
|
389
|
+
], s.prototype, "invalidDates", 2);
|
390
|
+
r([
|
391
|
+
d({ reflect: !0 })
|
392
|
+
], s.prototype, "name", 2);
|
393
|
+
r([
|
394
|
+
d()
|
395
|
+
], s.prototype, "placeholder", 2);
|
396
|
+
r([
|
397
|
+
d({ type: Boolean })
|
398
|
+
], s.prototype, "range", 2);
|
399
|
+
r([
|
400
|
+
d({ type: Boolean })
|
401
|
+
], s.prototype, "readonly", 2);
|
402
|
+
r([
|
403
|
+
d({ attribute: "selectable-from" })
|
404
|
+
], s.prototype, "selectableFrom", 2);
|
405
|
+
r([
|
406
|
+
d({ attribute: "selectable-to" })
|
407
|
+
], s.prototype, "selectableTo", 2);
|
408
|
+
r([
|
409
|
+
d({ reflect: !0 })
|
410
|
+
], s.prototype, "severity", 2);
|
411
|
+
r([
|
412
|
+
d({ reflect: !0 })
|
413
|
+
], s.prototype, "size", 2);
|
414
|
+
r([
|
415
|
+
d({ type: String, attribute: "validate-on" })
|
416
|
+
], s.prototype, "validateOn", 2);
|
417
|
+
r([
|
418
|
+
d()
|
419
|
+
], s.prototype, "value", 2);
|
420
|
+
r([
|
421
|
+
k()
|
422
|
+
], s.prototype, "_init_date", 2);
|
423
|
+
r([
|
424
|
+
d({ type: Boolean, reflect: !0 })
|
425
|
+
], s.prototype, "invalid", 2);
|
426
|
+
r([
|
427
|
+
k()
|
428
|
+
], s.prototype, "selectedRangeDates", 2);
|
429
|
+
r([
|
430
|
+
k()
|
431
|
+
], s.prototype, "showClearbutton", 2);
|
432
|
+
r([
|
433
|
+
$("#popover")
|
434
|
+
], s.prototype, "$popover", 2);
|
435
|
+
r([
|
436
|
+
$("#input")
|
437
|
+
], s.prototype, "$anchor", 2);
|
438
|
+
r([
|
439
|
+
$('input[data-testid="field-input"]')
|
440
|
+
], s.prototype, "$input", 2);
|
441
|
+
r([
|
442
|
+
$('input[data-testid="field-input-range-end"]')
|
443
|
+
], s.prototype, "$input_range_end", 2);
|
444
|
+
r([
|
445
|
+
$("skf-datepicker-popup")
|
446
|
+
], s.prototype, "$datepickerPopup", 2);
|
447
|
+
r([
|
448
|
+
N({ flatten: !0 })
|
449
|
+
], s.prototype, "_defaultSlot", 2);
|
450
|
+
r([
|
451
|
+
j("value", { waitUntilFirstUpdate: !0, afterUpdate: !0 })
|
452
|
+
], s.prototype, "_handleValueChange", 1);
|
453
|
+
export {
|
454
|
+
s as SkfDatepicker
|
455
|
+
};
|
@@ -2,6 +2,7 @@ import '../button/button.js';
|
|
2
2
|
import '../heading/heading.js';
|
3
3
|
import '../icon/icon.js';
|
4
4
|
import { SkfElement } from '../../internal/components/skf-element';
|
5
|
+
import { type Language } from '../../utilities/localize.js';
|
5
6
|
import { type CSSResultGroup } from 'lit';
|
6
7
|
/**
|
7
8
|
* The `<skf-dialog>` is a component that open up a dialog of type modal with the content provided. (MDN refrains from opening the dialog using the `open` attribute, however skf-dialog does not have that limitation)
|
@@ -11,24 +12,24 @@ import { type CSSResultGroup } from 'lit';
|
|
11
12
|
* @slot - The dialog component's content
|
12
13
|
* @slot footer - The dialog component's buttons goes here
|
13
14
|
*
|
14
|
-
* @event skf-dialog-opened - Fires when the dialog is opened (after transitioned in)
|
15
|
-
* @event skf-dialog-closing - Fires when the dialog is closed (before transitioned out)
|
16
|
-
* @event skf-dialog-closed - Fires when the dialog is closed (after transitioned out)
|
17
|
-
*
|
18
15
|
* @cssproperty --skf-dialog-height - A custom height for the Dialog. Pass valid CSS **block-size** values
|
19
16
|
* @cssproperty --skf-dialog-width - A custom width for the Dialog Pass valid CSS **inline-size** values
|
20
17
|
*
|
18
|
+
* @event {CustomEvent} skf-dialog-opened - Fires when the dialog is opened (after transitioned in)
|
19
|
+
* @event {CustomEvent} skf-dialog-closing - Fires when the dialog is closing (before transitioned out)
|
20
|
+
* @event {CustomEvent} skf-dialog-closed - Fires when the dialog is closed (after transitioned out)
|
21
|
+
*
|
21
22
|
* @tagname skf-dialog
|
22
23
|
*/
|
23
24
|
export declare class SkfDialog extends SkfElement {
|
24
25
|
#private;
|
25
26
|
static styles: CSSResultGroup;
|
26
|
-
/** If defined, sets the aria-label for the close button */
|
27
|
-
closeButtonAriaLabel?: string;
|
28
27
|
/** Title for the modal/dialog */
|
29
28
|
heading?: string;
|
30
29
|
/** If true, makes the dialog stretch edge to edge on screen */
|
31
30
|
fullscreen: boolean;
|
31
|
+
/** Sets the internal language of the component */
|
32
|
+
lang: Language;
|
32
33
|
/** If true, removes the close button */
|
33
34
|
noCloseButton?: boolean | undefined;
|
34
35
|
/** If defined, removes the inner padding */
|
@@ -43,6 +44,7 @@ export declare class SkfDialog extends SkfElement {
|
|
43
44
|
$dialog?: HTMLDialogElement;
|
44
45
|
/** @internal */
|
45
46
|
footerEls?: HTMLElement[];
|
47
|
+
/** @internal */
|
46
48
|
handleOpenChange(): void;
|
47
49
|
protected firstUpdated(): void;
|
48
50
|
/** @internal */
|