@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
package/README.md
CHANGED
@@ -42,13 +42,11 @@ The SKF UI Library is a collection of components that is meant to visually align
|
|
42
42
|
|
43
43
|
The SKF UI Library is created using Lit/native web components in order to support as many frameworks as possible. It works out of the box for all frameworks, including React >= 19.
|
44
44
|
|
45
|
-
|
45
|
+
## Philosophy
|
46
46
|
|
47
|
-
|
47
|
+
We like to stay as close to how native compoments works as possible albeit adding extra features on top. The rationale behind is that it either makes easier to absorb the api or learn something that is usable in the world outside as well. Adding looped, repeated content is done declaratively by component specific child components.
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
We are working on a solution to report issues without an explicit skf email, which will be publicly available.
|
49
|
+
<!-- For those who use React 18, we provide React wrappers that can be used in your application.-->
|
52
50
|
|
53
51
|
## 🏃 Getting started
|
54
52
|
|
@@ -89,10 +87,16 @@ How you get started using our components is of course a bit different depending
|
|
89
87
|
|
90
88
|
In order for our components to work as intended you need to import our global styles where appropiate e.g. App.tsx.
|
91
89
|
|
92
|
-
```
|
90
|
+
```ts
|
93
91
|
import '@skf-design-system/ui-components/styles/global.css';
|
94
92
|
```
|
95
93
|
|
94
|
+
If you want to handle the loading of the SKF fonts yourself, you can use the alternative global css file:
|
95
|
+
|
96
|
+
```ts
|
97
|
+
import '@skf-design-system/ui-components/styles/global-alt.css';
|
98
|
+
```
|
99
|
+
|
96
100
|
### Angular
|
97
101
|
|
98
102
|
In order for our components to get the correct styling you need add our global styling to your project. In angular you can do that in the angular.json like this:
|
@@ -152,11 +156,11 @@ export class AppComponent {
|
|
152
156
|
|
153
157
|
```
|
154
158
|
|
155
|
-
### React 19
|
159
|
+
### React 19 / Nextjs 15
|
156
160
|
|
157
|
-
Web Components
|
161
|
+
Web Components is first class citizens in React 19. Should you want to use them in a version prior to 19 you have to wrap them in React wrappers, which essentially converts the native event to React Syntactic events. Long story short, use React 19 and your off the hook.
|
158
162
|
|
159
|
-
If you want to proceed to use the React 19
|
163
|
+
If you want to proceed to use the React 19 together with typescript, see [React 19 upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide).
|
160
164
|
|
161
165
|
You will also have to declare a global type for the web components to get it to play nice with JSX.
|
162
166
|
|
@@ -304,6 +308,12 @@ steps:
|
|
304
308
|
|
305
309
|
In this example a token has been added with the name `ACCESS_TOKEN_SECRET`, but you can give it any name you like ✨. If you want to know more about secret generation and usage you can read more about it in [GitHub's docs](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
|
306
310
|
|
311
|
+
## Reporting issues
|
312
|
+
|
313
|
+
Reporting issues requires an skf email and github access. [See this section](#skf-email)
|
314
|
+
|
315
|
+
We are working on a solution to report issues without an explicit skf email, which will be publicly available.
|
316
|
+
|
307
317
|
## 📖 Further reading
|
308
318
|
|
309
319
|
### 🎁 Contributing
|
@@ -341,6 +351,24 @@ Checklist:
|
|
341
351
|
|
342
352
|
</details>
|
343
353
|
|
354
|
+
## Known inconsistencies coming from the React library and v1 Web Components
|
355
|
+
|
356
|
+
Our focus going forward is on the v2 package of Web Components (new brand design) and as our bandwidth is limited work done to the v1 Web Compnent library will be very limited.
|
357
|
+
|
358
|
+
| React Component | WC v1 - Solution |
|
359
|
+
| --------------- | ----------------------------------------------------------------------------- |
|
360
|
+
| IconButton | Use `skf-link` without text or `skf-button` variant tertiary, without a label |
|
361
|
+
| Search | Search is now a variant of `skf-input` |
|
362
|
+
| Image | Was deemed not adding value over the native `picture`/`img` tag |
|
363
|
+
| Paragraph | Was deemed not adding value over the native p tag |
|
364
|
+
| useTooltip | Not needed, `skf-tooltip` handles it common state internally |
|
365
|
+
| usePopup | Renamed `skf-popover`, no need for a hook |
|
366
|
+
| EmptyState | Missing but easy to copy svg from React and recreate |
|
367
|
+
| SkfUiProvider | Not needed, you add our global css as mentioned above |
|
368
|
+
| ToastProvider | `skf-toast` handles its own internal state, no provider needed |
|
369
|
+
| ts tokens | The global css contains all tokens as css custom vars which should suffice |
|
370
|
+
| Missing tokens | A few tokens are missing. Report as issue but expect to create your own |
|
371
|
+
|
344
372
|
## 🧑⚖️ License
|
345
373
|
|
346
374
|
Copyright SKF 2024
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import '../icon/icon.js';
|
2
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
3
|
+
import type { HeadingType } from '../../internal/types.js';
|
4
|
+
import type { CSSResultGroup } from 'lit';
|
5
|
+
export type SkfAccordionItemHeadingType = Exclude<HeadingType, 'h1'>;
|
6
|
+
/**
|
7
|
+
* The `<skf-accordion-item>` is used in conjunction with the `<skf-accordion>` component
|
8
|
+
*
|
9
|
+
* @event {CustomEvent} skf-accordion-item-toggle - Event emitted when toggled
|
10
|
+
*
|
11
|
+
* @slot - Main content
|
12
|
+
*
|
13
|
+
* @tagname skf-accordion-item
|
14
|
+
*/
|
15
|
+
export declare class SkfAccordionItem extends SkfElement {
|
16
|
+
static styles: CSSResultGroup;
|
17
|
+
/** If true, will animate the expand/accordion-item state */
|
18
|
+
animated: boolean;
|
19
|
+
/** If true, will set the accordion-item to be expanded by default */
|
20
|
+
expanded: boolean;
|
21
|
+
/** Heading for the accordion-item */
|
22
|
+
heading?: string;
|
23
|
+
/** Defines which heading element will be rendered */
|
24
|
+
headingAs: SkfAccordionItemHeadingType;
|
25
|
+
/** If true, renders the small version */
|
26
|
+
small: boolean;
|
27
|
+
/** If true, will truncate the heading in accordion-item state */
|
28
|
+
truncate: boolean;
|
29
|
+
/** Class method as alternative to manipulate attribute */
|
30
|
+
setClose(): void;
|
31
|
+
/** Class method as alternative to manipulate attribute */
|
32
|
+
setOpen(): void;
|
33
|
+
/** @internal */
|
34
|
+
private _toggle;
|
35
|
+
render(): import("lit").TemplateResult;
|
36
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import "../icon/icon.js";
|
2
|
+
import { SkfElement as p } from "../../internal/components/skf-element.js";
|
3
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
4
|
+
import { property as i } from "lit/decorators.js";
|
5
|
+
import { classMap as h } from "lit/directives/class-map.js";
|
6
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
7
|
+
import { literal as r, html as f } from "lit/static-html.js";
|
8
|
+
import { styles as _ } from "./accordion-item.styles.js";
|
9
|
+
var g = Object.defineProperty, s = (d, e, c, y) => {
|
10
|
+
for (var a = void 0, o = d.length - 1, l; o >= 0; o--)
|
11
|
+
(l = d[o]) && (a = l(e, c, a) || a);
|
12
|
+
return a && g(e, c, a), a;
|
13
|
+
};
|
14
|
+
const n = class n extends p {
|
15
|
+
constructor() {
|
16
|
+
super(...arguments), this.animated = !1, this.expanded = !1, this.headingAs = "h2", this.small = !1, this.truncate = !1, this._toggle = () => {
|
17
|
+
this.dispatchEvent(
|
18
|
+
new CustomEvent("skf-accordion-item-toggle", {
|
19
|
+
bubbles: !0,
|
20
|
+
composed: !0,
|
21
|
+
cancelable: !0
|
22
|
+
})
|
23
|
+
), this.expanded = !this.expanded;
|
24
|
+
};
|
25
|
+
}
|
26
|
+
/** Class method as alternative to manipulate attribute */
|
27
|
+
setClose() {
|
28
|
+
this.expanded = !1;
|
29
|
+
}
|
30
|
+
/** Class method as alternative to manipulate attribute */
|
31
|
+
setOpen() {
|
32
|
+
this.expanded = !0;
|
33
|
+
}
|
34
|
+
render() {
|
35
|
+
let e;
|
36
|
+
switch (!0) {
|
37
|
+
case this.headingAs === "h3":
|
38
|
+
e = r`h3`;
|
39
|
+
break;
|
40
|
+
case this.headingAs === "h4":
|
41
|
+
e = r`h4`;
|
42
|
+
break;
|
43
|
+
default:
|
44
|
+
e = r`h2`;
|
45
|
+
break;
|
46
|
+
}
|
47
|
+
return f`
|
48
|
+
<div class=${h({
|
49
|
+
"accordion-item": !0,
|
50
|
+
"accordion-item--animated": this.animated,
|
51
|
+
"accordion-item--expanded": this.expanded,
|
52
|
+
"accordion-item--small": this.small,
|
53
|
+
"accordion-item--truncate": this.truncate
|
54
|
+
})}>
|
55
|
+
<${e} class="accordion-item__heading">
|
56
|
+
<button
|
57
|
+
@click=${this._toggle}
|
58
|
+
aria-controls="main"
|
59
|
+
aria-expanded=${u(this.expanded ? "true" : "false")}
|
60
|
+
class="accordion-item__btn"
|
61
|
+
type="button"
|
62
|
+
>
|
63
|
+
<span class="accordion-item__label">${this.heading}</span>
|
64
|
+
<skf-icon class="accordion-item__icon" name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
|
65
|
+
</button>
|
66
|
+
</${e}>
|
67
|
+
<div class="accordion-item__body">
|
68
|
+
<div class="accordion-item__main" data-testid="main" id="main">
|
69
|
+
<slot></slot>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
`;
|
74
|
+
}
|
75
|
+
};
|
76
|
+
n.styles = [m, _];
|
77
|
+
let t = n;
|
78
|
+
s([
|
79
|
+
i({ type: Boolean, reflect: !0 })
|
80
|
+
], t.prototype, "animated");
|
81
|
+
s([
|
82
|
+
i({ type: Boolean, reflect: !0 })
|
83
|
+
], t.prototype, "expanded");
|
84
|
+
s([
|
85
|
+
i()
|
86
|
+
], t.prototype, "heading");
|
87
|
+
s([
|
88
|
+
i({ attribute: "heading-as" })
|
89
|
+
], t.prototype, "headingAs");
|
90
|
+
s([
|
91
|
+
i({ type: Boolean, reflect: !0 })
|
92
|
+
], t.prototype, "small");
|
93
|
+
s([
|
94
|
+
i({ type: Boolean, reflect: !0 })
|
95
|
+
], t.prototype, "truncate");
|
96
|
+
export {
|
97
|
+
t as SkfAccordionItem
|
98
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
export
|
3
|
-
|
1
|
+
import { SkfAccordionItem } from './accordion-item.component.js';
|
2
|
+
export * from './accordion-item.component.js';
|
3
|
+
export default SkfAccordionItem;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
6
6
|
'skf-accordion-item': SkfAccordionItem;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
}
|
4
|
-
e.define("skf-accordion-item");
|
1
|
+
import { SkfAccordionItem as o } from "./accordion-item.component.js";
|
2
|
+
o.define("skf-accordion-item");
|
5
3
|
export {
|
6
|
-
|
4
|
+
o as SkfAccordionItem,
|
5
|
+
o as default
|
7
6
|
};
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { css as i } from "lit";
|
2
|
+
const e = i`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
@layer components {
|
5
|
+
.accordion-item {
|
6
|
+
background: var(--skf-bg-color-neutral-1);
|
7
|
+
border-bottom: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
|
8
|
+
}
|
9
|
+
|
10
|
+
.accordion-item__heading {
|
11
|
+
font-size: var(--_skf-accordion-item-heading-size, var(--skf-font-size-100));
|
12
|
+
font-weight: var(--_skf-accordion-item-heading-weight, normal);
|
13
|
+
|
14
|
+
.accordion-item--small & {
|
15
|
+
--_skf-accordion-item-heading-size: var(--skf-font-size-75);
|
16
|
+
--_skf-accordion-item-heading-weight: var(--skf-font-weight-medium);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.accordion-item__btn {
|
21
|
+
align-items: center;
|
22
|
+
display: flex;
|
23
|
+
padding-block: var(--_skf-accordion-item-button-padding-block, var(--skf-spacing-50));
|
24
|
+
padding-inline: var(--skf-spacing-75);
|
25
|
+
width: 100%;
|
26
|
+
|
27
|
+
&:focus-visible {
|
28
|
+
outline: var(--skf-border-width-md) solid var(--skf-interactive-border-color-focus);
|
29
|
+
outline-offset: -2px;
|
30
|
+
}
|
31
|
+
|
32
|
+
.accordion-item--small & {
|
33
|
+
--_skf-accordion-item-button-padding-block: var(--skf-spacing-25);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.accordion-item__label {
|
38
|
+
.accordion-item--truncate:not(.accordion-item--expanded) & {
|
39
|
+
overflow: hidden;
|
40
|
+
text-overflow: ellipsis;
|
41
|
+
white-space: nowrap;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
.accordion-item__icon {
|
46
|
+
margin-inline-start: auto;
|
47
|
+
}
|
48
|
+
|
49
|
+
.accordion-item__body {
|
50
|
+
display: grid;
|
51
|
+
grid-template-rows: var(--_skf-accordion-item-body-height, 0fr);
|
52
|
+
padding-inline: var(--skf-spacing-75);
|
53
|
+
|
54
|
+
.accordion-item--animated & {
|
55
|
+
transition: grid-template-rows calc(var(--skf-motion-duration-normal) * 1ms)
|
56
|
+
var(--skf-motion-easing-ease-in);
|
57
|
+
}
|
58
|
+
|
59
|
+
.accordion-item--expanded & {
|
60
|
+
--_skf-accordion-item-body-height: 1fr;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
.accordion-item__main {
|
65
|
+
overflow: hidden;
|
66
|
+
|
67
|
+
&::after {
|
68
|
+
content: '';
|
69
|
+
display: block;
|
70
|
+
padding-block-end: var(--skf-spacing-100);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
`;
|
75
|
+
export {
|
76
|
+
e as styles
|
77
|
+
};
|
@@ -1,11 +1,10 @@
|
|
1
|
-
import '../collapse/collapse.js';
|
2
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
3
|
-
import type { HeadingType } from '../../internal/constants/heading.js';
|
4
2
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
3
|
+
import type { SkfAccordionItemHeadingType } from './accordion-item.component.js';
|
5
4
|
/**
|
6
|
-
* The `<skf-accordion>` component consists of
|
5
|
+
* The `<skf-accordion>` component consists of one or more `<skf-accordion-item>` item(s) working together
|
7
6
|
*
|
8
|
-
* See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles
|
7
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles
|
9
8
|
*
|
10
9
|
* @slot - Expects one or more <skf-accordion-item> element(s)
|
11
10
|
*
|
@@ -15,11 +14,8 @@ export declare class SkfAccordion extends SkfElement {
|
|
15
14
|
static styles: CSSResultGroup;
|
16
15
|
/** If true, will animate the expand/collapse state */
|
17
16
|
animated: boolean;
|
18
|
-
/**
|
19
|
-
|
20
|
-
* @type { "h1" | "h2" | "h3" | "h4" }
|
21
|
-
*/
|
22
|
-
headingAs: Exclude<HeadingType, 'h1'>;
|
17
|
+
/** Defines which heading element will be rendered */
|
18
|
+
headingAs: SkfAccordionItemHeadingType;
|
23
19
|
/** If true, adds a gap between each item */
|
24
20
|
gap: boolean;
|
25
21
|
/** If true, allowes multiple accordion items to open */
|
@@ -29,7 +25,7 @@ export declare class SkfAccordion extends SkfElement {
|
|
29
25
|
/** If true, will truncate all headings in collapsed state */
|
30
26
|
truncate: boolean;
|
31
27
|
/** @internal */
|
32
|
-
private
|
28
|
+
private _accordionItems;
|
33
29
|
protected updated(_changedProperties: PropertyValues): void;
|
34
30
|
/** @internal */
|
35
31
|
private get items();
|
@@ -1,13 +1,12 @@
|
|
1
|
-
import "../collapse/collapse.js";
|
2
1
|
import { SkfElement as p } from "../../internal/components/skf-element.js";
|
3
|
-
import m from "../../styles/component.styles.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
4
3
|
import { html as f } from "lit";
|
5
4
|
import { property as a, queryAssignedNodes as d } from "lit/decorators.js";
|
6
5
|
import { classMap as c } from "lit/directives/class-map.js";
|
7
6
|
import { styles as g } from "./accordion.styles.js";
|
8
|
-
var y = Object.defineProperty, s = (u, t, i,
|
9
|
-
for (var r = void 0,
|
10
|
-
(h = u[
|
7
|
+
var y = Object.defineProperty, s = (u, t, i, o) => {
|
8
|
+
for (var r = void 0, l = u.length - 1, h; l >= 0; l--)
|
9
|
+
(h = u[l]) && (r = h(t, i, r) || r);
|
11
10
|
return r && y(t, i, r), r;
|
12
11
|
};
|
13
12
|
const n = class n extends p {
|
@@ -23,20 +22,20 @@ const n = class n extends p {
|
|
23
22
|
}
|
24
23
|
/** @internal */
|
25
24
|
get items() {
|
26
|
-
return [...this
|
25
|
+
return [...this._accordionItems].filter((t) => t.localName === "skf-accordion-item");
|
27
26
|
}
|
28
27
|
_onChildToggle(t) {
|
29
28
|
if (this.multiple || t.defaultPrevented) return;
|
30
29
|
const i = t.target;
|
31
|
-
this.items.length && this.items.forEach((
|
32
|
-
|
30
|
+
this.items.length && this.items.forEach((o) => {
|
31
|
+
o !== i && o.hasAttribute("expanded") && o.setClose();
|
33
32
|
});
|
34
33
|
}
|
35
34
|
render() {
|
36
35
|
return f`
|
37
36
|
<div class=${c({ "accordion--gap": this.gap })}>
|
38
37
|
<slot
|
39
|
-
@skf-
|
38
|
+
@skf-accordion-item-toggle=${(t) => {
|
40
39
|
this._onChildToggle(t);
|
41
40
|
}}
|
42
41
|
@slotchange=${this._setItemAttributes}
|
@@ -67,7 +66,7 @@ s([
|
|
67
66
|
], e.prototype, "truncate");
|
68
67
|
s([
|
69
68
|
d()
|
70
|
-
], e.prototype, "
|
69
|
+
], e.prototype, "_accordionItems");
|
71
70
|
export {
|
72
71
|
e as SkfAccordion
|
73
72
|
};
|
@@ -1,15 +1,14 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
3
|
-
import type { Icon,
|
3
|
+
import type { Icon, Severity } from '../../internal/types.js';
|
4
|
+
import { type Language } from '../../utilities/localize.js';
|
4
5
|
import { type CSSResultGroup } from 'lit';
|
5
|
-
type SkfAlertIcon = Icon;
|
6
|
-
type SkfAlertSeverity = SeverityFgColor;
|
7
6
|
/**
|
8
7
|
* The `<skf-alert>` is a type of notification that appears in-line
|
9
8
|
*
|
10
|
-
*
|
9
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/990ec5-alert) for design principles
|
11
10
|
*
|
12
|
-
* @event skf-alert-close - Fires when the close button is clicked
|
11
|
+
* @event {CustomEvent} skf-alert-close - Fires when the close button is clicked
|
13
12
|
*
|
14
13
|
* @slot - Alert message. **Notice!** See design principles for approved content
|
15
14
|
* @slot link - Slot for the link
|
@@ -17,17 +16,20 @@ type SkfAlertSeverity = SeverityFgColor;
|
|
17
16
|
* @tagname skf-alert
|
18
17
|
*/
|
19
18
|
export declare class SkfAlert extends SkfElement {
|
19
|
+
#private;
|
20
20
|
static styles: CSSResultGroup;
|
21
|
-
/** Close button aria-label */
|
22
|
-
buttonLabel: string;
|
23
21
|
/** If defined, displays leading icon */
|
24
|
-
icon?:
|
22
|
+
icon?: Icon;
|
23
|
+
/** Sets the internal language of the component */
|
24
|
+
lang: Language;
|
25
25
|
/** If true, renders with an close button and sets aria-role to `status` */
|
26
26
|
persistent: boolean;
|
27
27
|
/** If defined, gives the supplied appearance */
|
28
|
-
severity?:
|
28
|
+
severity?: Severity;
|
29
|
+
connectedCallback(): void;
|
30
|
+
/** @internal */
|
31
|
+
_handleStateChange(): void;
|
29
32
|
/** @internal */
|
30
33
|
private _handleClose;
|
31
34
|
render(): import("lit").TemplateResult<1>;
|
32
35
|
}
|
33
|
-
export {};
|
@@ -1,74 +1,82 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import f from "../../styles/component.styles.js";
|
4
|
-
import { nothing as h, html as p } from "lit";
|
5
|
-
import { property as s } from "lit/decorators.js";
|
6
|
-
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
-
import { ifDefined as m } from "lit/directives/if-defined.js";
|
8
|
-
import { styles as v } from "./alert.styles.js";
|
9
|
-
var b = Object.defineProperty, r = (l, a, n, d) => {
|
10
|
-
for (var t = void 0, i = l.length - 1, c; i >= 0; i--)
|
11
|
-
(c = l[i]) && (t = c(a, n, t) || t);
|
12
|
-
return t && b(a, n, t), t;
|
1
|
+
var u = (t) => {
|
2
|
+
throw TypeError(t);
|
13
3
|
};
|
14
|
-
|
4
|
+
var g = (t, e, s) => e.has(t) || u("Cannot " + s);
|
5
|
+
var c = (t, e, s) => (g(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), m = (t, e, s, o) => (g(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s);
|
6
|
+
import "../icon/icon.js";
|
7
|
+
import { SkfElement as C } from "../../internal/components/skf-element.js";
|
8
|
+
import { stateMap as w } from "../../internal/helpers/stateMap.js";
|
9
|
+
import { watch as S } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as $ } from "../../styles/component.styles.js";
|
11
|
+
import { LocalizeController as z } from "../../utilities/localize.js";
|
12
|
+
import { nothing as O, html as b } from "lit";
|
13
|
+
import { property as f } from "lit/decorators.js";
|
14
|
+
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
15
|
+
import { styles as P } from "./alert.styles.js";
|
16
|
+
var k = Object.defineProperty, D = Object.getOwnPropertyDescriptor, p = (t, e, s, o) => {
|
17
|
+
for (var i = o > 1 ? void 0 : o ? D(e, s) : e, y = t.length - 1, d; y >= 0; y--)
|
18
|
+
(d = t[y]) && (i = (o ? d(e, s, i) : d(i)) || i);
|
19
|
+
return o && i && k(e, s, i), i;
|
20
|
+
}, n, a, l;
|
21
|
+
const v = class v extends C {
|
15
22
|
constructor() {
|
16
|
-
super(...arguments)
|
23
|
+
super(...arguments);
|
24
|
+
h(this, n);
|
25
|
+
h(this, a);
|
26
|
+
h(this, l);
|
27
|
+
m(this, n, new z(this)), m(this, a, this.attachInternals()), m(this, l, c(this, a).states), this.lang = "en", this.persistent = !1, this._handleClose = () => {
|
17
28
|
this.emit("skf-alert-close");
|
18
29
|
};
|
19
30
|
}
|
31
|
+
connectedCallback() {
|
32
|
+
super.connectedCallback(), this.role = this.persistent ? "status" : "alert";
|
33
|
+
}
|
34
|
+
_handleStateChange() {
|
35
|
+
const s = ["error", "info", "success", "warning"];
|
36
|
+
w(c(this, l), s).set(this.severity);
|
37
|
+
}
|
20
38
|
render() {
|
21
|
-
return
|
22
|
-
<div
|
23
|
-
aria-describedby="main"
|
24
|
-
class=${u({
|
25
|
-
alert: !0,
|
26
|
-
"alert--severity-alert": this.severity === "alert",
|
27
|
-
"alert--severity-error": this.severity === "error",
|
28
|
-
"alert--severity-info": this.severity === "info",
|
29
|
-
"alert--severity-success": this.severity === "success",
|
30
|
-
"alert--severity-warning": this.severity === "warning",
|
31
|
-
[this.className]: !0
|
32
|
-
})}
|
33
|
-
role=${this.persistent ? "status" : "alert"}
|
34
|
-
>
|
39
|
+
return b`
|
40
|
+
<div id="root">
|
35
41
|
<skf-icon
|
36
|
-
color=${
|
37
|
-
name=${
|
42
|
+
color=${_(this.severity ?? "secondary")}
|
43
|
+
name=${_(this.icon ?? "info")}
|
38
44
|
size="sm"
|
39
45
|
></skf-icon>
|
40
|
-
<div
|
41
|
-
<slot
|
46
|
+
<div id="body">
|
47
|
+
<slot id="main"></slot>
|
42
48
|
<slot name="link"></slot>
|
43
49
|
</div>
|
44
|
-
${this.persistent ?
|
50
|
+
${this.persistent ? b`
|
45
51
|
<button
|
46
52
|
@click="${this._handleClose}"
|
47
|
-
aria-label=${this.
|
48
|
-
class="alert__btn"
|
53
|
+
aria-label=${c(this, n).term("close")}
|
49
54
|
type="button"
|
50
55
|
>
|
51
56
|
<skf-icon name="close" size="sm"></skf-icon>
|
52
57
|
</button>
|
53
|
-
` :
|
58
|
+
` : O}
|
54
59
|
</div>
|
55
60
|
`;
|
56
61
|
}
|
57
62
|
};
|
58
|
-
|
59
|
-
let
|
60
|
-
|
61
|
-
|
62
|
-
],
|
63
|
-
|
64
|
-
|
65
|
-
],
|
66
|
-
|
67
|
-
|
68
|
-
],
|
69
|
-
|
70
|
-
|
71
|
-
],
|
63
|
+
n = new WeakMap(), a = new WeakMap(), l = new WeakMap(), v.styles = [$, P];
|
64
|
+
let r = v;
|
65
|
+
p([
|
66
|
+
f({ type: String })
|
67
|
+
], r.prototype, "icon", 2);
|
68
|
+
p([
|
69
|
+
f({ type: String })
|
70
|
+
], r.prototype, "lang", 2);
|
71
|
+
p([
|
72
|
+
f({ type: Boolean })
|
73
|
+
], r.prototype, "persistent", 2);
|
74
|
+
p([
|
75
|
+
f({ type: String })
|
76
|
+
], r.prototype, "severity", 2);
|
77
|
+
p([
|
78
|
+
S("severity")
|
79
|
+
], r.prototype, "_handleStateChange", 1);
|
72
80
|
export {
|
73
|
-
|
81
|
+
r as SkfAlert
|
74
82
|
};
|