@skf-design-system/ui-components 1.0.2-beta.1 → 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 +25 -1
- package/dist/components/accordion/accordion-item.component.js +49 -38
- package/dist/components/accordion/accordion.component.d.ts +2 -2
- package/dist/components/accordion/accordion.component.js +12 -12
- package/dist/components/alert/alert.component.d.ts +8 -3
- package/dist/components/alert/alert.component.js +59 -50
- package/dist/components/alert/alert.styles.js +51 -47
- package/dist/components/breadcrumb/breadcrumb-item.component.js +30 -32
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +16 -15
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +5 -2
- package/dist/components/breadcrumb/breadcrumb.component.js +51 -46
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.styles.js +13 -10
- package/dist/components/button/button.component.js +63 -67
- package/dist/components/button/button.styles.js +5 -4
- package/dist/components/card/card.component.d.ts +5 -0
- 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 +6 -5
- package/dist/components/checkbox/checkbox.component.js +67 -69
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- 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} +21 -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 +3 -2
- package/dist/components/dialog/dialog.component.js +49 -49
- package/dist/components/dialog/dialog.d.ts +2 -2
- 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 +12 -4
- package/dist/components/drawer/drawer.component.js +84 -61
- 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 +4 -2
- package/dist/components/header/header.component.js +64 -57
- 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 +5 -1
- package/dist/components/heading/heading.component.js +54 -27
- package/dist/components/heading/heading.styles.js +34 -36
- package/dist/components/icon/icon.component.d.ts +4 -0
- package/dist/components/icon/icon.component.js +62 -43
- package/dist/components/icon/icon.styles.js +60 -60
- package/dist/components/input/input.component.d.ts +4 -8
- package/dist/components/input/input.component.js +90 -97
- 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 +15 -18
- package/dist/components/link/link.component.js +104 -107
- package/dist/components/link/link.styles.js +53 -45
- package/dist/components/loader/loader.component.d.ts +5 -3
- package/dist/components/loader/loader.component.js +39 -28
- package/dist/components/loader/loader.styles.js +6 -10
- package/dist/components/logo/logo.component.d.ts +4 -1
- 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 +1 -1
- package/dist/components/menu/menu-item.component.js +8 -8
- package/dist/components/menu/menu-item.d.ts +2 -2
- package/dist/components/menu/menu-item.styles.js +13 -9
- package/dist/components/menu/menu.component.d.ts +5 -2
- package/dist/components/menu/menu.component.js +8 -8
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/nav/nav-item.component.d.ts +6 -2
- package/dist/components/nav/nav-item.component.js +44 -25
- package/dist/components/nav/nav-item.styles.js +29 -25
- 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 +10 -3
- package/dist/components/popover/popover.component.js +30 -22
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/progress/progress.component.d.ts +2 -0
- package/dist/components/progress/progress.component.js +38 -29
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/progress.styles.js +10 -8
- package/dist/components/radio/radio.component.d.ts +4 -2
- package/dist/components/radio/radio.component.js +96 -91
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.d.ts +2 -2
- package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button.component.js +22 -24
- package/dist/components/segmented-button/segmented-button.d.ts +2 -2
- package/dist/components/select/select-option-group.component.d.ts +4 -0
- package/dist/components/select/select-option-group.component.js +37 -18
- package/dist/components/select/select-option-group.d.ts +2 -2
- package/dist/components/select/select-option-group.style.js +12 -6
- package/dist/components/select/select-option.component.d.ts +9 -4
- package/dist/components/select/select-option.component.js +70 -58
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +21 -12
- package/dist/components/select/select.component.js +125 -87
- package/dist/components/select/select.controllers.js +15 -20
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/stepper/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +59 -56
- package/dist/components/stepper/stepper-item.d.ts +2 -2
- package/dist/components/stepper/stepper-item.styles.js +4 -4
- package/dist/components/stepper/stepper.component.js +2 -3
- package/dist/components/stepper/stepper.d.ts +2 -2
- 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 +17 -14
- 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} +35 -36
- 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 +10 -2
- package/dist/components/tag/tag.component.js +77 -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 +4 -2
- package/dist/components/textarea/textarea.component.js +102 -95
- package/dist/components/toast/toast-item.styles.js +13 -10
- package/dist/components/toast/toast.component.js +9 -9
- package/dist/components/toast/toast.singleton.d.ts +1 -1
- package/dist/components/toast/toast.singleton.js +19 -20
- package/dist/components/tooltip/tooltip.component.d.ts +9 -2
- package/dist/components/tooltip/tooltip.component.js +15 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +1681 -1112
- package/dist/index.d.ts +8 -7
- package/dist/index.js +96 -93
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
- package/dist/internal/base-classes/popover/popover.base.js +41 -44
- 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 +4 -0
- package/dist/internal/components/hint/hint.component.js +47 -20
- package/dist/internal/components/hint/hint.styles.js +29 -25
- package/dist/internal/components/skf-element.d.ts +1 -3
- package/dist/internal/components/skf-element.js +4 -9
- package/dist/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/controllers/popover.controller.js +11 -14
- 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.d.ts +4 -0
- package/dist/styles/component.styles.js +37 -36
- 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 +1988 -866
- package/dist/types/vue/index.d.ts +220 -169
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +265 -188
- package/dist/web-types.json +731 -548
- package/package.json +38 -51
- package/dist/components/accordion/accordion-item.test.d.ts +0 -1
- package/dist/components/accordion/accordion.test.d.ts +0 -1
- package/dist/components/checkbox/checkbox.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 -442
- 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/radio/radio.test.d.ts +0 -1
- 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/internal/playwright/index.d.ts +0 -1
- /package/dist/components/{date-picker/datepicker.calendar.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/{date-picker/datepicker.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/select/{select.stories.icons.d.ts → stories/select.stories.icons.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/{tab-group/tab-group.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
@@ -6,8 +6,9 @@ export { default as SkfBreadcrumb } from './components/breadcrumb/breadcrumb.js'
|
|
6
6
|
export { default as SkfButton } from './components/button/button.js';
|
7
7
|
export { default as SkfCard } from './components/card/card.js';
|
8
8
|
export { default as SkfCheckbox } from './components/checkbox/checkbox.js';
|
9
|
-
export { default as
|
10
|
-
export { default as
|
9
|
+
export { default as SkfDatepickerCalendar } from './components/datepicker/datepicker-calendar.js';
|
10
|
+
export { default as SkfDatepickerPopup } from './components/datepicker/datepicker-popup.js';
|
11
|
+
export { default as SkfDatepicker } from './components/datepicker/datepicker.js';
|
11
12
|
export { default as SkfDialog } from './components/dialog/dialog.js';
|
12
13
|
export { default as SkfDivider } from './components/divider/divider.js';
|
13
14
|
export { default as SkfDrawer } from './components/drawer/drawer.js';
|
@@ -27,15 +28,15 @@ export { default as SkfProgress } from './components/progress/progress.js';
|
|
27
28
|
export { default as SkfRadio } from './components/radio/radio.js';
|
28
29
|
export { default as SkfSegmentedButtonItem } from './components/segmented-button/segmented-button-item.js';
|
29
30
|
export { default as SkfSegmentedButton } from './components/segmented-button/segmented-button.js';
|
30
|
-
export { default as
|
31
|
-
export { default as
|
31
|
+
export { default as SkfSelectOptionGroup } from './components/select/select-option-group.js';
|
32
|
+
export { default as SkfSelectOption } from './components/select/select-option.js';
|
32
33
|
export { default as SkfSelect } from './components/select/select.js';
|
33
34
|
export { default as SkfStepperItem } from './components/stepper/stepper-item.js';
|
34
35
|
export { default as SkfStepper } from './components/stepper/stepper.js';
|
35
36
|
export { default as SkfSwitch } from './components/switch/switch.js';
|
36
|
-
export { default as
|
37
|
-
export { default as
|
38
|
-
export { default as
|
37
|
+
export { default as SkfTabPanel } from './components/tabs/tab-panel.js';
|
38
|
+
export { default as SkfTab } from './components/tabs/tab.js';
|
39
|
+
export { default as SkfTabs } from './components/tabs/tabs.js';
|
39
40
|
export { default as SkfTag } from './components/tag/tag.js';
|
40
41
|
export { default as SkfTextArea } from './components/textarea/textarea.js';
|
41
42
|
export { default as SkfToastItem } from './components/toast/toast-item.js';
|
package/dist/index.js
CHANGED
@@ -6,8 +6,9 @@ import "./components/breadcrumb/breadcrumb.js";
|
|
6
6
|
import "./components/button/button.js";
|
7
7
|
import "./components/card/card.js";
|
8
8
|
import "./components/checkbox/checkbox.js";
|
9
|
-
import "./components/
|
10
|
-
import "./components/
|
9
|
+
import "./components/datepicker/datepicker-calendar.js";
|
10
|
+
import "./components/datepicker/datepicker-popup.js";
|
11
|
+
import "./components/datepicker/datepicker.js";
|
11
12
|
import "./components/dialog/dialog.js";
|
12
13
|
import "./components/divider/divider.js";
|
13
14
|
import "./components/drawer/drawer.js";
|
@@ -33,102 +34,104 @@ import "./components/select/select.js";
|
|
33
34
|
import "./components/stepper/stepper-item.js";
|
34
35
|
import "./components/stepper/stepper.js";
|
35
36
|
import "./components/switch/switch.js";
|
36
|
-
import "./components/
|
37
|
-
import "./components/
|
38
|
-
import "./components/
|
37
|
+
import "./components/tabs/tab-panel.js";
|
38
|
+
import "./components/tabs/tab.js";
|
39
|
+
import "./components/tabs/tabs.js";
|
39
40
|
import "./components/tag/tag.js";
|
40
41
|
import "./components/textarea/textarea.js";
|
41
42
|
import "./components/toast/toast-item.js";
|
42
43
|
import "./components/toast/toast-wrapper.js";
|
43
44
|
import "./components/toast/toast.js";
|
44
45
|
import "./components/tooltip/tooltip.js";
|
45
|
-
import { SkfAccordionItem as
|
46
|
-
import { SkfAccordion as
|
47
|
-
import { SkfAlert as
|
48
|
-
import { SkfBreadcrumbItem as
|
49
|
-
import { SkfBreadcrumb as
|
50
|
-
import { SkfButton as
|
51
|
-
import { SkfCard as
|
52
|
-
import { SkfCheckbox as
|
53
|
-
import {
|
54
|
-
import {
|
55
|
-
import {
|
56
|
-
import {
|
57
|
-
import {
|
58
|
-
import {
|
59
|
-
import {
|
60
|
-
import {
|
61
|
-
import {
|
62
|
-
import {
|
63
|
-
import {
|
64
|
-
import {
|
65
|
-
import {
|
66
|
-
import {
|
67
|
-
import {
|
68
|
-
import {
|
69
|
-
import {
|
70
|
-
import {
|
71
|
-
import {
|
72
|
-
import {
|
73
|
-
import {
|
74
|
-
import {
|
75
|
-
import {
|
76
|
-
import {
|
77
|
-
import {
|
78
|
-
import {
|
79
|
-
import {
|
80
|
-
import {
|
81
|
-
import { SkfTabPanel as
|
82
|
-
import { SkfTab as
|
83
|
-
import {
|
84
|
-
import {
|
85
|
-
import {
|
86
|
-
import {
|
87
|
-
import {
|
88
|
-
import {
|
46
|
+
import { SkfAccordionItem as U } from "./components/accordion/accordion-item.component.js";
|
47
|
+
import { SkfAccordion as X } from "./components/accordion/accordion.component.js";
|
48
|
+
import { SkfAlert as Z } from "./components/alert/alert.component.js";
|
49
|
+
import { SkfBreadcrumbItem as $ } from "./components/breadcrumb/breadcrumb-item.component.js";
|
50
|
+
import { SkfBreadcrumb as ro } from "./components/breadcrumb/breadcrumb.component.js";
|
51
|
+
import { SkfButton as po } from "./components/button/button.component.js";
|
52
|
+
import { SkfCard as eo } from "./components/card/card.component.js";
|
53
|
+
import { SkfCheckbox as io } from "./components/checkbox/checkbox.component.js";
|
54
|
+
import { SkfDatepickerCalendar as ko } from "./components/datepicker/datepicker-calendar.component.js";
|
55
|
+
import { SkfDatepickerPopup as ao } from "./components/datepicker/datepicker-popup.component.js";
|
56
|
+
import { SkfDatepicker as co } from "./components/datepicker/datepicker.component.js";
|
57
|
+
import { SkfDialog as Io } from "./components/dialog/dialog.component.js";
|
58
|
+
import { SkfDivider as lo } from "./components/divider/divider.component.js";
|
59
|
+
import { SkfDrawer as bo } from "./components/drawer/drawer.component.js";
|
60
|
+
import { SkfHeader as Do } from "./components/header/header.component.js";
|
61
|
+
import { SkfHeading as vo } from "./components/heading/heading.component.js";
|
62
|
+
import { SkfIcon as Po } from "./components/icon/icon.component.js";
|
63
|
+
import { SkfInput as Lo } from "./components/input/input.component.js";
|
64
|
+
import { SkfLink as wo } from "./components/link/link.component.js";
|
65
|
+
import { SkfLoader as Mo } from "./components/loader/loader.component.js";
|
66
|
+
import { SkfLogo as Oo } from "./components/logo/logo.component.js";
|
67
|
+
import { SkfMenuItem as Ro } from "./components/menu/menu-item.component.js";
|
68
|
+
import { SkfMenu as jo } from "./components/menu/menu.component.js";
|
69
|
+
import { SkfNavItem as yo } from "./components/nav/nav-item.component.js";
|
70
|
+
import { SkfNav as Eo } from "./components/nav/nav.component.js";
|
71
|
+
import { SkfPopover as Jo } from "./components/popover/popover.component.js";
|
72
|
+
import { SkfProgress as Qo } from "./components/progress/progress.component.js";
|
73
|
+
import { SkfRadio as Vo } from "./components/radio/radio.component.js";
|
74
|
+
import { SkfSegmentedButtonItem as Yo } from "./components/segmented-button/segmented-button-item.component.js";
|
75
|
+
import { SkfSegmentedButton as _o } from "./components/segmented-button/segmented-button.component.js";
|
76
|
+
import { SkfSelectOptionGroup as or } from "./components/select/select-option-group.component.js";
|
77
|
+
import { SkfSelectOption as tr } from "./components/select/select-option.component.js";
|
78
|
+
import { SkfSelect as mr } from "./components/select/select.component.js";
|
79
|
+
import { SkfStepperItem as fr } from "./components/stepper/stepper-item.component.js";
|
80
|
+
import { SkfStepper as Sr } from "./components/stepper/stepper.component.js";
|
81
|
+
import { SkfSwitch as xr } from "./components/switch/switch.component.js";
|
82
|
+
import { SkfTabPanel as nr } from "./components/tabs/tab-panel.component.js";
|
83
|
+
import { SkfTab as dr } from "./components/tabs/tab.component.js";
|
84
|
+
import { SkfTabs as Ir } from "./components/tabs/tabs.component.js";
|
85
|
+
import { SkfTag as lr } from "./components/tag/tag.component.js";
|
86
|
+
import { SkfTextArea as br } from "./components/textarea/textarea.component.js";
|
87
|
+
import { SkfToastItem as Dr } from "./components/toast/toast-item.component.js";
|
88
|
+
import { SkfToastWrapper as vr } from "./components/toast/toast-wrapper.component.js";
|
89
|
+
import { SkfToast as Pr } from "./components/toast/toast.component.js";
|
90
|
+
import { SkfTooltip as Lr } from "./components/tooltip/tooltip.component.js";
|
89
91
|
export {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
bo as
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
vr as
|
92
|
+
X as SkfAccordion,
|
93
|
+
U as SkfAccordionItem,
|
94
|
+
Z as SkfAlert,
|
95
|
+
ro as SkfBreadcrumb,
|
96
|
+
$ as SkfBreadcrumbItem,
|
97
|
+
po as SkfButton,
|
98
|
+
eo as SkfCard,
|
99
|
+
io as SkfCheckbox,
|
100
|
+
co as SkfDatepicker,
|
101
|
+
ko as SkfDatepickerCalendar,
|
102
|
+
ao as SkfDatepickerPopup,
|
103
|
+
Io as SkfDialog,
|
104
|
+
lo as SkfDivider,
|
105
|
+
bo as SkfDrawer,
|
106
|
+
Do as SkfHeader,
|
107
|
+
vo as SkfHeading,
|
108
|
+
Po as SkfIcon,
|
109
|
+
Lo as SkfInput,
|
110
|
+
wo as SkfLink,
|
111
|
+
Mo as SkfLoader,
|
112
|
+
Oo as SkfLogo,
|
113
|
+
jo as SkfMenu,
|
114
|
+
Ro as SkfMenuItem,
|
115
|
+
Eo as SkfNav,
|
116
|
+
yo as SkfNavItem,
|
117
|
+
Jo as SkfPopover,
|
118
|
+
Qo as SkfProgress,
|
119
|
+
Vo as SkfRadio,
|
120
|
+
_o as SkfSegmentedButton,
|
121
|
+
Yo as SkfSegmentedButtonItem,
|
122
|
+
mr as SkfSelect,
|
123
|
+
tr as SkfSelectOption,
|
124
|
+
or as SkfSelectOptionGroup,
|
125
|
+
Sr as SkfStepper,
|
126
|
+
fr as SkfStepperItem,
|
127
|
+
xr as SkfSwitch,
|
128
|
+
dr as SkfTab,
|
129
|
+
nr as SkfTabPanel,
|
130
|
+
Ir as SkfTabs,
|
131
|
+
lr as SkfTag,
|
132
|
+
br as SkfTextArea,
|
133
|
+
Pr as SkfToast,
|
134
|
+
Dr as SkfToastItem,
|
135
|
+
vr as SkfToastWrapper,
|
136
|
+
Lr as SkfTooltip
|
134
137
|
};
|
@@ -2,36 +2,55 @@ import { type Placement } from '@floating-ui/dom';
|
|
2
2
|
import { SkfElement } from '../../components/skf-element.js';
|
3
3
|
import { PopoverController } from '../../controllers/popover.controller.js';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
|
+
/**
|
6
|
+
* @description - Base class for popover components.
|
7
|
+
* This class provides common functionality for popovers, such as handling open/close states, positioning, and event management.
|
8
|
+
* It should be extended by specific popover components like `SkfPopover`, `SkfTooltip`, etc.
|
9
|
+
*
|
10
|
+
* @event {CustomEvent} skf-opened - Fired when the popover is opened
|
11
|
+
* @event {CustomEvent} skf-closed - Fired when the popover is closed
|
12
|
+
*
|
13
|
+
* @slot - The popover content
|
14
|
+
*/
|
5
15
|
export declare class SkfPopoverBase extends SkfElement {
|
6
16
|
static styles: CSSResultGroup;
|
7
17
|
static classMap: {};
|
18
|
+
/** @internal - The popover element, aka `this` */
|
8
19
|
$popover: this;
|
20
|
+
/** Where the popover is positioned relative to the anchor element if it fits */
|
9
21
|
placement: Placement;
|
22
|
+
/** The variant of the popover extending this base class */
|
10
23
|
variant: 'menu' | 'popup' | 'tooltip';
|
24
|
+
/** The id of the element the popover will be anchored to */
|
11
25
|
anchor?: string;
|
26
|
+
/** Whether the popover is currently open */
|
12
27
|
isOpen: boolean;
|
28
|
+
/** @internal - Gap between popover and anchor */
|
13
29
|
offset: number;
|
30
|
+
/** @internal - Element that triggered the popover */
|
14
31
|
$anchor?: Element | HTMLElement | null;
|
32
|
+
/** If true, displays an arrow on the popover */
|
15
33
|
arrow: boolean;
|
16
|
-
/** @internal */
|
34
|
+
/** @internal - the event that triggers the popover */
|
17
35
|
triggerEvent: 'mouseenter' | 'click';
|
36
|
+
/** @internal - Reference to the arrow element */
|
18
37
|
$arrow: HTMLElement;
|
19
38
|
protected abortEventsController: AbortController;
|
20
39
|
protected signal: AbortSignal;
|
21
40
|
protected popoverController: PopoverController;
|
22
|
-
|
41
|
+
connectedCallback(): void;
|
23
42
|
disconnectedCallback(): void;
|
24
43
|
protected _toggleOpen: (newValue?: boolean) => void;
|
25
44
|
private _handleToggle;
|
26
45
|
handleToggleOpen: () => Promise<void>;
|
27
|
-
handleAnchorEl(): void
|
46
|
+
handleAnchorEl(): Promise<void>;
|
28
47
|
handleAnchorChange: () => Promise<void>;
|
29
48
|
reposition: () => Promise<void>;
|
30
49
|
handleEscapeKey: (e: KeyboardEvent) => void;
|
31
|
-
open(e: Event)
|
50
|
+
open: (e: Event) => void;
|
32
51
|
/** @internal add additional open tasks here in UI component */
|
33
52
|
openExtended(): void;
|
34
|
-
close()
|
53
|
+
close: () => void;
|
35
54
|
/** @internal add additional close tasks here in UI component */
|
36
55
|
closeExtended(): void;
|
37
56
|
/** @internal eventlisteners here should implement abort signal */
|
@@ -1,21 +1,21 @@
|
|
1
|
-
import { flip as
|
2
|
-
import { SkfElement as
|
3
|
-
import { PopoverController as
|
4
|
-
import { uuid as
|
1
|
+
import { flip as w, offset as E, arrow as $, computePosition as O } from "@floating-ui/dom";
|
2
|
+
import { SkfElement as C } from "../../components/skf-element.js";
|
3
|
+
import { PopoverController as x } from "../../controllers/popover.controller.js";
|
4
|
+
import { uuid as A } from "../../helpers/uuid.js";
|
5
5
|
import { watch as f } from "../../helpers/watch.js";
|
6
|
-
import { componentStyles as
|
7
|
-
import { nothing as
|
8
|
-
import { property as u, state as c, query as
|
9
|
-
import { classMap as
|
10
|
-
import { styles as
|
11
|
-
var
|
12
|
-
for (var e = i > 1 ? void 0 : i ?
|
6
|
+
import { componentStyles as S } from "../../../styles/component.styles.js";
|
7
|
+
import { nothing as P, html as g } from "lit";
|
8
|
+
import { property as u, state as c, query as _ } from "lit/decorators.js";
|
9
|
+
import { classMap as L } from "lit/directives/class-map.js";
|
10
|
+
import { styles as F } from "./popover.styles.js";
|
11
|
+
var k = Object.defineProperty, T = Object.getOwnPropertyDescriptor, r = (m, t, o, i) => {
|
12
|
+
for (var e = i > 1 ? void 0 : i ? T(t, o) : t, n = m.length - 1, a; n >= 0; n--)
|
13
13
|
(a = m[n]) && (e = (i ? a(t, o, e) : a(e)) || e);
|
14
|
-
return i && e &&
|
14
|
+
return i && e && k(t, o, e), e;
|
15
15
|
}, p;
|
16
|
-
const s = (p = class extends
|
16
|
+
const s = (p = class extends C {
|
17
17
|
constructor() {
|
18
|
-
super(), this.$popover = this, this.placement = "top", this.variant = "popup", this.isOpen = !1, this.offset = 0, this.arrow = !1, this.triggerEvent = "mouseenter", this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, this.popoverController = new
|
18
|
+
super(...arguments), this.$popover = this, this.placement = "top", this.variant = "popup", this.isOpen = !1, this.offset = 0, this.arrow = !1, this.triggerEvent = "mouseenter", this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, this.popoverController = new x(this), this._toggleOpen = (t) => {
|
19
19
|
this.isOpen = t ?? !this.isOpen;
|
20
20
|
}, this._handleToggle = (t) => {
|
21
21
|
const o = t.newState === "open";
|
@@ -28,11 +28,10 @@ const s = (p = class extends S {
|
|
28
28
|
const t = this.getRootNode();
|
29
29
|
this.$anchor = t.getElementById(this.anchor), this.$anchor && (this.addEventListeners(this.$anchor), this.popoverController.start());
|
30
30
|
}, this.reposition = async () => {
|
31
|
-
var n, a, h;
|
32
31
|
if (!this.$anchor) return;
|
33
|
-
const t = [
|
34
|
-
this.arrow && t.push(
|
35
|
-
const { x: o, y: i, middlewareData: e } = await
|
32
|
+
const t = [w(), E(this.offset)];
|
33
|
+
this.arrow && t.push($({ element: this.$arrow }));
|
34
|
+
const { x: o, y: i, middlewareData: e } = await O(this.$anchor, this.$popover, {
|
36
35
|
placement: this.placement,
|
37
36
|
middleware: t,
|
38
37
|
strategy: "fixed"
|
@@ -41,27 +40,36 @@ const s = (p = class extends S {
|
|
41
40
|
left: `${String(o)}px`,
|
42
41
|
top: `${String(i)}px`
|
43
42
|
}), this.arrow) {
|
44
|
-
const
|
43
|
+
const n = this.placement.split("-")[0], a = { top: "bottom", right: "left", bottom: "top", left: "right" }[n] ?? "", h = e.flip?.index, d = e.arrow?.x, l = e.arrow?.y, v = typeof d == "number" ? `${String(d)}px` : "", b = typeof l == "number" ? `${String(l)}px` : "", y = {
|
45
44
|
bottom: 45,
|
46
45
|
right: 135,
|
47
46
|
top: 225,
|
48
47
|
left: 315
|
49
48
|
};
|
50
49
|
Object.assign(this.$arrow.style, {
|
51
|
-
top:
|
52
|
-
[this.placement.includes("left") ? "right" : "left"]:
|
53
|
-
[
|
54
|
-
rotate: `${(
|
50
|
+
top: b,
|
51
|
+
[this.placement.includes("left") ? "right" : "left"]: v,
|
52
|
+
[h ? n : a]: "calc(var(--_skf-popover-arrow-size) * -1)",
|
53
|
+
rotate: `${(y[a] + (h ? 180 : 0)).toString()}deg`
|
55
54
|
});
|
56
55
|
}
|
57
56
|
}, this.handleEscapeKey = (t) => {
|
58
57
|
t.key === "Escape" && this.close();
|
59
|
-
}, this.
|
58
|
+
}, this.open = (t) => {
|
59
|
+
t.stopPropagation(), this._toggleOpen(!0), this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, document.addEventListener("keydown", this.handleEscapeKey, { signal: this.signal }), this.openExtended();
|
60
|
+
}, this.close = () => {
|
61
|
+
this.closeExtended(), this._toggleOpen(!1), this.abortEventsController.abort();
|
62
|
+
};
|
63
|
+
}
|
64
|
+
connectedCallback() {
|
65
|
+
super.connectedCallback(), this.setAttribute("popover", ""), this.addEventListener("toggle", (t) => {
|
66
|
+
this._handleToggle(t);
|
67
|
+
});
|
60
68
|
}
|
61
69
|
disconnectedCallback() {
|
62
70
|
super.disconnectedCallback(), this.abortEventsController.abort();
|
63
71
|
}
|
64
|
-
handleAnchorEl() {
|
72
|
+
async handleAnchorEl() {
|
65
73
|
if (!this.$anchor) return;
|
66
74
|
const t = this._containsFocusableElement(this);
|
67
75
|
this.$anchor.addEventListener(
|
@@ -78,17 +86,11 @@ const s = (p = class extends S {
|
|
78
86
|
t && i || this.close();
|
79
87
|
},
|
80
88
|
{ signal: this.signal }
|
81
|
-
), this.$popover.id =
|
82
|
-
}
|
83
|
-
open(t) {
|
84
|
-
t.stopPropagation(), this._toggleOpen(!0), document.addEventListener("keydown", this.handleEscapeKey.bind(this), { signal: this.signal }), this.openExtended();
|
89
|
+
), this.$popover.id = await A(this.$anchor.id), ["popup", "menu"].includes(this.variant) && (this.$anchor.setAttribute("aria-haspopup", "true"), this.setAttribute("aria-labelledby", this.$anchor.id)), ["menu"].includes(this.variant) && this.$anchor.setAttribute("aria-controls", this.$popover.id), ["popup"].includes(this.variant) && t && (this.role = "dialog"), ["tooltip"].includes(this.variant) && this.$anchor.addEventListener("focusin", this.open, { signal: this.signal });
|
85
90
|
}
|
86
91
|
/** @internal add additional open tasks here in UI component */
|
87
92
|
openExtended() {
|
88
93
|
}
|
89
|
-
close() {
|
90
|
-
this.closeExtended(), this._toggleOpen(!1), document.removeEventListener("keydown", this.handleEscapeKey.bind(this));
|
91
|
-
}
|
92
94
|
/** @internal add additional close tasks here in UI component */
|
93
95
|
closeExtended() {
|
94
96
|
}
|
@@ -101,15 +103,10 @@ const s = (p = class extends S {
|
|
101
103
|
this.abortEventsController.abort();
|
102
104
|
}
|
103
105
|
render() {
|
104
|
-
|
105
|
-
|
106
|
-
<div
|
107
|
-
@toggle=${this._handleToggle}
|
108
|
-
class=${j({ popover: !0, ...p.classMap })}
|
109
|
-
id="popover"
|
110
|
-
>
|
106
|
+
return ["popup", "menu"].includes(this.variant) && this.$anchor?.setAttribute("aria-expanded", this.isOpen ? "true" : "false"), g`
|
107
|
+
<div class=${L({ popover: !0, ...p.classMap })} id="root">
|
111
108
|
<slot></slot>
|
112
|
-
${this.arrow ?
|
109
|
+
${this.arrow ? g`<div id="arrow"></div>` : P}
|
113
110
|
</div>
|
114
111
|
`;
|
115
112
|
}
|
@@ -134,7 +131,7 @@ const s = (p = class extends S {
|
|
134
131
|
return h;
|
135
132
|
}
|
136
133
|
}
|
137
|
-
}, p.styles = [
|
134
|
+
}, p.styles = [S, F], p.classMap = {}, p);
|
138
135
|
r([
|
139
136
|
u()
|
140
137
|
], s.prototype, "placement", 2);
|
@@ -160,7 +157,7 @@ r([
|
|
160
157
|
c()
|
161
158
|
], s.prototype, "triggerEvent", 2);
|
162
159
|
r([
|
163
|
-
|
160
|
+
_("#arrow")
|
164
161
|
], s.prototype, "$arrow", 2);
|
165
162
|
r([
|
166
163
|
f("isOpen", { afterUpdate: !0 })
|
@@ -171,7 +168,7 @@ r([
|
|
171
168
|
r([
|
172
169
|
f("anchor")
|
173
170
|
], s.prototype, "handleAnchorChange", 2);
|
174
|
-
let
|
171
|
+
let U = s;
|
175
172
|
export {
|
176
|
-
|
173
|
+
U as SkfPopoverBase
|
177
174
|
};
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
2
|
const e = o`
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
4
3
|
@layer components {
|
5
4
|
:host {
|
6
|
-
background-color: var(--skf-bg-color-neutral-1);
|
7
5
|
border: none;
|
8
6
|
border-radius: var(--skf-border-radius-sm);
|
9
7
|
box-shadow: var(--skf-shadow-md);
|
@@ -19,15 +17,16 @@ const e = o`
|
|
19
17
|
display: none;
|
20
18
|
}
|
21
19
|
|
22
|
-
#
|
20
|
+
#root {
|
21
|
+
background-color: var(--skf-bg-color-neutral-1);
|
23
22
|
height: 100%;
|
24
23
|
width: 100%;
|
25
24
|
}
|
26
25
|
|
27
|
-
|
26
|
+
#arrow {
|
28
27
|
--_skf-popover-arrow-size: calc(6px * 0.7071);
|
29
28
|
|
30
|
-
background-color:
|
29
|
+
background-color: inherit;
|
31
30
|
block-size: calc(var(--_skf-popover-arrow-size) * 2);
|
32
31
|
box-shadow: 1px 1px 2px 0 rgb(0 0 0 / 5%);
|
33
32
|
inline-size: calc(var(--_skf-popover-arrow-size) * 2);
|
@@ -37,6 +37,7 @@ export declare class FormBase extends SkfElement {
|
|
37
37
|
/** If true, sets disabled state */
|
38
38
|
set disabled(isDisabled: boolean);
|
39
39
|
get disabled(): boolean;
|
40
|
+
/** If true, sets disabled state */
|
40
41
|
set required(isRequired: boolean);
|
41
42
|
get required(): boolean;
|
42
43
|
set nativeValidation(nativeValidation: boolean);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { LitElement as c } from "lit";
|
2
|
-
import { property as
|
2
|
+
import { property as l } from "lit/decorators.js";
|
3
3
|
import { SkfElement as u } from "./skf-element.js";
|
4
|
-
var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor,
|
5
|
-
for (var i = _(t, e), n =
|
6
|
-
(
|
4
|
+
var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, o = (d, t, e, r) => {
|
5
|
+
for (var i = _(t, e), n = d.length - 1, h; n >= 0; n--)
|
6
|
+
(h = d[n]) && (i = h(t, e, i) || i);
|
7
7
|
return i && p(t, e, i), i;
|
8
8
|
};
|
9
9
|
const a = class a extends u {
|
@@ -18,17 +18,6 @@ const a = class a extends u {
|
|
18
18
|
disconnectedCallback() {
|
19
19
|
super.disconnectedCallback(), this._internals.form && this._internals.form.removeEventListener("reset", this._dispatchResetEvent);
|
20
20
|
}
|
21
|
-
// @property()
|
22
|
-
// set autocomplete(value: string) {
|
23
|
-
// if (value) {
|
24
|
-
// this.autocomplete = value;
|
25
|
-
// this._internals.ariaAutoComplete = value;
|
26
|
-
// }
|
27
|
-
// }
|
28
|
-
// get autocomplete() {
|
29
|
-
// return this.autocomplete;
|
30
|
-
// }
|
31
|
-
/** If true, sets disabled state */
|
32
21
|
set disabled(t) {
|
33
22
|
this._disabled = t, this._internals.ariaDisabled = String(t);
|
34
23
|
}
|
@@ -96,11 +85,14 @@ const a = class a extends u {
|
|
96
85
|
};
|
97
86
|
a.formAssociated = !0, a.shadowRootOptions = { ...c.shadowRootOptions, delegatesFocus: !0 };
|
98
87
|
let s = a;
|
99
|
-
|
100
|
-
|
88
|
+
o([
|
89
|
+
l({ type: Boolean })
|
90
|
+
], s.prototype, "disabled");
|
91
|
+
o([
|
92
|
+
l({ type: Boolean })
|
101
93
|
], s.prototype, "required");
|
102
|
-
|
103
|
-
|
94
|
+
o([
|
95
|
+
l({ type: Boolean, attribute: "native-validation" })
|
104
96
|
], s.prototype, "nativeValidation");
|
105
97
|
export {
|
106
98
|
s as FormBase
|
@@ -3,7 +3,11 @@ import { SkfElement } from '../../components/skf-element.js';
|
|
3
3
|
import type { Severity } from '../../types.js';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
5
|
export declare class SkfHint extends SkfElement {
|
6
|
+
#private;
|
6
7
|
static styles: CSSResultGroup;
|
8
|
+
disabled: boolean;
|
7
9
|
severity?: Severity;
|
10
|
+
/** @internal */
|
11
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
8
12
|
render(): import("lit").TemplateResult<1>;
|
9
13
|
}
|