@skf-design-system/ui-components 1.0.0-alpha.33 → 1.0.0-alpha.35
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 +20 -27
- 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 +9 -13
- package/dist/components/accordion/accordion.component.js +7 -7
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/alert/alert.component.d.ts +12 -12
- package/dist/components/alert/alert.component.js +57 -54
- package/dist/components/alert/alert.styles.js +50 -51
- package/dist/components/breadcrumb/breadcrumb-item.component.d.ts +25 -0
- package/dist/components/breadcrumb/breadcrumb-item.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +8 -0
- 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 +32 -0
- package/dist/components/breadcrumb/breadcrumb.component.js +65 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
- 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 +17 -14
- package/dist/components/button/button.component.js +74 -60
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +13 -3
- package/dist/components/card/card.component.d.ts +4 -1
- package/dist/components/card/card.component.js +46 -36
- package/dist/components/card/card.styles.js +36 -23
- package/dist/components/checkbox/checkbox.component.d.ts +17 -13
- package/dist/components/checkbox/checkbox.component.js +75 -61
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/datepicker/datepicker-calendar.component.d.ts +80 -0
- package/dist/components/datepicker/datepicker-calendar.component.js +415 -0
- package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
- package/dist/components/datepicker/datepicker-calendar.js +6 -0
- package/dist/components/datepicker/datepicker-calendar.styles.js +202 -0
- package/dist/components/datepicker/datepicker-popup.component.d.ts +64 -0
- package/dist/components/datepicker/datepicker-popup.component.js +261 -0
- package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
- package/dist/components/datepicker/datepicker-popup.helpers.d.ts +41 -0
- package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
- package/dist/components/datepicker/datepicker-popup.js +6 -0
- package/dist/components/datepicker/datepicker-popup.styles.js +87 -0
- package/dist/components/datepicker/datepicker.component.d.ts +121 -0
- package/dist/components/datepicker/datepicker.component.js +455 -0
- package/dist/components/datepicker/datepicker.d.ts +8 -0
- package/dist/components/datepicker/datepicker.helpers.d.ts +38 -0
- package/dist/components/datepicker/datepicker.helpers.js +31 -0
- package/dist/components/datepicker/datepicker.js +6 -0
- package/dist/components/datepicker/datepicker.styles.d.ts +1 -0
- package/dist/components/datepicker/datepicker.styles.js +18 -0
- package/dist/components/dialog/dialog.component.d.ts +20 -30
- package/dist/components/dialog/dialog.component.js +89 -78
- 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 +4 -8
- package/dist/components/divider/divider.component.js +24 -46
- package/dist/components/divider/divider.styles.js +34 -30
- package/dist/components/drawer/drawer.component.d.ts +61 -0
- package/dist/components/drawer/drawer.component.js +125 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +6 -0
- package/dist/components/drawer/drawer.styles.js +71 -0
- package/dist/components/header/header.component.d.ts +46 -0
- package/dist/components/header/header.component.js +116 -0
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/header.js +6 -0
- package/dist/components/header/header.styles.js +68 -0
- package/dist/components/heading/heading.component.d.ts +8 -12
- package/dist/components/heading/heading.component.js +52 -24
- package/dist/components/heading/heading.styles.d.ts +1 -2
- package/dist/components/heading/heading.styles.js +35 -37
- package/dist/components/icon/icon.component.d.ts +19 -18
- package/dist/components/icon/icon.component.js +60 -40
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +61 -60
- package/dist/components/input/input.component.d.ts +31 -31
- package/dist/components/input/input.component.js +167 -146
- package/dist/components/input/input.controllers.d.ts +20 -6
- package/dist/components/input/input.controllers.js +14 -10
- package/dist/components/link/link.component.d.ts +12 -14
- package/dist/components/link/link.component.js +36 -34
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +24 -20
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/loader/loader.component.js +36 -40
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +40 -32
- 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-item → menu}/menu-item.component.js +3 -3
- package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
- package/dist/components/menu/menu.component.d.ts +10 -8
- package/dist/components/menu/menu.component.js +8 -10
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/nav/nav-item.component.d.ts +18 -0
- package/dist/components/nav/nav-item.component.js +38 -0
- package/dist/components/nav/nav-item.d.ts +8 -0
- package/dist/components/nav/nav-item.js +6 -0
- package/dist/components/nav/nav-item.styles.d.ts +1 -0
- package/dist/components/nav/nav-item.styles.js +39 -0
- package/dist/components/nav/nav.component.d.ts +17 -0
- package/dist/components/nav/nav.component.js +34 -0
- package/dist/components/nav/nav.d.ts +8 -0
- package/dist/components/nav/nav.js +6 -0
- package/dist/components/nav/nav.styles.d.ts +1 -0
- package/dist/components/nav/nav.styles.js +17 -0
- package/dist/components/popover/popover.component.d.ts +11 -8
- package/dist/components/popover/popover.component.js +24 -26
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- 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 +19 -13
- package/dist/components/radio/radio.component.js +13 -12
- package/dist/components/radio/radio.styles.d.ts +1 -2
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.d.ts +36 -0
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/segmented-button/segmented-button-item.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.d.ts +1 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +30 -0
- package/dist/components/segmented-button/segmented-button.component.js +73 -0
- package/dist/components/segmented-button/segmented-button.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
- package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
- package/dist/components/select/select-option-group.style.d.ts +1 -0
- package/dist/components/{select-option → select}/select-option.component.d.ts +9 -10
- package/dist/components/{select-option → select}/select-option.component.js +23 -22
- package/dist/components/select/select-option.controllers.d.ts +15 -0
- package/dist/components/select/select-option.styles.d.ts +1 -0
- package/dist/components/select/select.component.d.ts +18 -17
- package/dist/components/select/select.component.js +22 -22
- package/dist/components/select/select.controllers.d.ts +21 -10
- package/dist/components/select/select.controllers.js +27 -22
- package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +50 -49
- package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
- package/dist/components/stepper/stepper-item.styles.d.ts +1 -0
- package/dist/components/stepper/stepper.component.d.ts +4 -3
- package/dist/components/stepper/stepper.component.js +15 -15
- package/dist/components/stepper/stepper.d.ts +2 -2
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/switch/switch.component.d.ts +7 -6
- package/dist/components/switch/switch.component.js +21 -21
- package/dist/components/switch/switch.d.ts +2 -2
- package/dist/components/{tab-panel → tabs}/tab-panel.component.js +1 -1
- package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
- package/dist/components/tabs/tab-panel.styles.d.ts +1 -0
- package/dist/components/{tab → tabs}/tab.component.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.component.js +1 -1
- package/dist/components/{tab → tabs}/tab.d.ts +2 -2
- package/dist/components/tabs/tab.styles.d.ts +1 -0
- 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} +31 -31
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +6 -0
- package/dist/components/tabs/tabs.styles.d.ts +1 -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 -17
- package/dist/components/tag/tag.component.js +69 -67
- 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 +10 -11
- package/dist/components/textarea/textarea.component.js +66 -67
- package/dist/components/{toast-item → toast}/toast-item.component.js +15 -15
- 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 +18 -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 +9 -5
- package/dist/components/toast/toast.component.js +32 -28
- package/dist/components/toast/toast.singleton.d.ts +6 -11
- package/dist/components/toast/toast.singleton.js +23 -23
- package/dist/components/tooltip/tooltip.component.d.ts +7 -7
- package/dist/components/tooltip/tooltip.component.js +16 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +4450 -2753
- package/dist/index.d.ts +22 -9
- package/dist/index.js +111 -74
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -9
- package/dist/internal/base-classes/popover/popover.base.js +138 -77
- package/dist/internal/base-classes/popover/popover.styles.js +14 -1
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +3 -2
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +1 -1
- 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/elementOverflowController.d.ts +13 -0
- package/dist/internal/controllers/popover.controller.d.ts +12 -6
- package/dist/internal/controllers/popover.controller.js +7 -11
- package/dist/internal/helpers/dateFormatter.d.ts +2 -0
- 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/utilityTypes.d.ts +22 -0
- package/dist/internal/helpers/uuid.d.ts +15 -0
- package/dist/internal/helpers/uuid.js +14 -0
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/helpers/watch.js +12 -12
- package/dist/internal/storybook/styles.d.ts +1 -0
- package/dist/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +18 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +38 -37
- package/dist/styles/form-field.styles.js +11 -6
- package/dist/styles/global-alt.css +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +767 -1282
- package/dist/types/vue/index.d.ts +572 -310
- package/dist/vscode.html-custom-data.json +547 -1068
- package/dist/web-types.json +1314 -769
- package/package.json +48 -64
- 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 -85
- 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/input/input.test.d.ts +0 -1
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/components/radio/radio.test.d.ts +0 -1
- package/dist/components/select-option/select-option.controllers.d.ts +0 -9
- 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/toast-item/toast-item.styles.js +0 -16
- package/dist/internal/constants/heading.d.ts +0 -2
- package/dist/internal/playwright/index.d.ts +0 -1
- package/dist/react/index.d.ts +0 -33
- package/dist/react/index.js +0 -33
- package/dist/react/skf-accordion/index.d.ts +0 -3
- package/dist/react/skf-accordion/index.js +0 -13
- package/dist/react/skf-alert/index.d.ts +0 -9
- package/dist/react/skf-alert/index.js +0 -17
- package/dist/react/skf-button/index.d.ts +0 -9
- package/dist/react/skf-button/index.js +0 -17
- package/dist/react/skf-card/index.d.ts +0 -3
- package/dist/react/skf-card/index.js +0 -13
- package/dist/react/skf-checkbox/index.d.ts +0 -9
- package/dist/react/skf-checkbox/index.js +0 -17
- package/dist/react/skf-collapse/index.d.ts +0 -9
- package/dist/react/skf-collapse/index.js +0 -17
- package/dist/react/skf-dialog/index.d.ts +0 -15
- package/dist/react/skf-dialog/index.js +0 -19
- package/dist/react/skf-divider/index.d.ts +0 -3
- package/dist/react/skf-divider/index.js +0 -13
- package/dist/react/skf-heading/index.d.ts +0 -3
- package/dist/react/skf-heading/index.js +0 -13
- package/dist/react/skf-icon/index.d.ts +0 -3
- package/dist/react/skf-icon/index.js +0 -13
- package/dist/react/skf-input/index.d.ts +0 -12
- package/dist/react/skf-input/index.js +0 -18
- package/dist/react/skf-link/index.d.ts +0 -3
- package/dist/react/skf-link/index.js +0 -13
- package/dist/react/skf-loader/index.d.ts +0 -3
- package/dist/react/skf-loader/index.js +0 -13
- package/dist/react/skf-logo/index.d.ts +0 -3
- package/dist/react/skf-logo/index.js +0 -13
- package/dist/react/skf-menu/index.d.ts +0 -12
- package/dist/react/skf-menu/index.js +0 -18
- package/dist/react/skf-menu-item/index.d.ts +0 -27
- package/dist/react/skf-menu-item/index.js +0 -23
- package/dist/react/skf-popover/index.d.ts +0 -12
- package/dist/react/skf-popover/index.js +0 -18
- package/dist/react/skf-progress/index.d.ts +0 -3
- package/dist/react/skf-progress/index.js +0 -13
- package/dist/react/skf-radio/index.d.ts +0 -9
- package/dist/react/skf-radio/index.js +0 -17
- package/dist/react/skf-select/index.d.ts +0 -21
- package/dist/react/skf-select/index.js +0 -21
- package/dist/react/skf-select-option/index.d.ts +0 -9
- package/dist/react/skf-select-option/index.js +0 -17
- package/dist/react/skf-select-option-group/index.d.ts +0 -3
- package/dist/react/skf-select-option-group/index.js +0 -13
- package/dist/react/skf-stepper/index.d.ts +0 -9
- package/dist/react/skf-stepper/index.js +0 -17
- package/dist/react/skf-stepper-item/index.d.ts +0 -9
- package/dist/react/skf-stepper-item/index.js +0 -17
- package/dist/react/skf-switch/index.d.ts +0 -3
- package/dist/react/skf-switch/index.js +0 -13
- package/dist/react/skf-tab/index.d.ts +0 -12
- package/dist/react/skf-tab/index.js +0 -18
- package/dist/react/skf-tab-group/index.d.ts +0 -3
- package/dist/react/skf-tab-group/index.js +0 -13
- package/dist/react/skf-tab-panel/index.d.ts +0 -3
- package/dist/react/skf-tab-panel/index.js +0 -13
- package/dist/react/skf-tag/index.d.ts +0 -3
- package/dist/react/skf-tag/index.js +0 -13
- package/dist/react/skf-textarea/index.d.ts +0 -12
- package/dist/react/skf-textarea/index.js +0 -18
- package/dist/react/skf-toast/index.d.ts +0 -3
- package/dist/react/skf-toast/index.js +0 -13
- package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
- package/dist/react/skf-toast-wrapper/index.js +0 -13
- package/dist/react/skf-tooltip/index.d.ts +0 -12
- package/dist/react/skf-tooltip/index.js +0 -18
- /package/dist/components/{menu-item/menu-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → breadcrumb/breadcrumb.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
- /package/dist/components/{tab-group/tab-group.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
- /package/dist/components/{tab-panel/tab-panel.styles.d.ts → drawer/drawer.styles.d.ts} +0 -0
- /package/dist/components/{tab/tab.styles.d.ts → header/header.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.style.js +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/{select-option → select}/select-option.styles.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.js +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.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +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
@@ -1,30 +1,40 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { html as h, LitElement as m, nothing as u } from "lit";
|
4
|
-
import { property as e, state as _, query as p } from "lit/decorators.js";
|
5
|
-
import { classMap as v } from "lit/directives/class-map.js";
|
6
|
-
import { ifDefined as y } from "lit/directives/if-defined.js";
|
7
|
-
import $ from "./button.styles.js";
|
8
|
-
var g = Object.defineProperty, s = (c, t, a, n) => {
|
9
|
-
for (var o = void 0, r = c.length - 1, l; r >= 0; r--)
|
10
|
-
(l = c[r]) && (o = l(t, a, o) || o);
|
11
|
-
return o && g(t, a, o), o;
|
1
|
+
var u = (i) => {
|
2
|
+
throw TypeError(i);
|
12
3
|
};
|
13
|
-
|
4
|
+
var _ = (i, e, t) => e.has(i) || u("Cannot " + t);
|
5
|
+
var p = (i, e, t) => (_(i, e, "read from private field"), t ? t.call(i) : e.get(i)), v = (i, e, t) => e.has(i) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), $ = (i, e, t, a) => (_(i, e, "write to private field"), a ? a.call(i, t) : e.set(i, t), t);
|
6
|
+
import "../icon/icon.js";
|
7
|
+
import "../loader/loader.js";
|
8
|
+
import { SkfElement as O } from "../../internal/components/skf-element.js";
|
9
|
+
import { watch as V } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as w } from "../../styles/component.styles.js";
|
11
|
+
import { html as y, LitElement as z, nothing as b } from "lit";
|
12
|
+
import { property as r, state as P, query as m } from "lit/decorators.js";
|
13
|
+
import { classMap as L } from "lit/directives/class-map.js";
|
14
|
+
import { ifDefined as g } from "lit/directives/if-defined.js";
|
15
|
+
import { styles as C } from "./button.styles.js";
|
16
|
+
var F = Object.defineProperty, q = Object.getOwnPropertyDescriptor, s = (i, e, t, a) => {
|
17
|
+
for (var n = a > 1 ? void 0 : a ? q(e, t) : e, h = i.length - 1, d; h >= 0; h--)
|
18
|
+
(d = i[h]) && (n = (a ? d(e, t, n) : d(n)) || n);
|
19
|
+
return a && n && F(e, t, n), n;
|
20
|
+
}, l;
|
21
|
+
const c = class c extends O {
|
14
22
|
constructor() {
|
15
|
-
super()
|
23
|
+
super();
|
24
|
+
v(this, l);
|
25
|
+
this._transitionOptions = {
|
16
26
|
duration: 200,
|
17
27
|
fill: "forwards"
|
18
28
|
}, this.destructive = !1, this.disabled = !1, this.iconOnly = !1, this.iconPosition = "left", this.loading = !1, this.noValidate = !1, this.size = "md", this.type = "button", this.variant = "primary", this._loaderVisible = !1, this._handleClick = (t) => {
|
19
29
|
t.preventDefault(), t.stopPropagation(), !(this.disabled || this.loading) && (this.dispatchEvent(new CustomEvent("click", { bubbles: !0, composed: !0, detail: t })), this.type === "submit" && this._submitForm(), this.type === "reset" && this._resetForm());
|
20
30
|
}, this._submitForm = () => {
|
21
|
-
var
|
22
|
-
const t = !((
|
23
|
-
(a || n) && t || (
|
31
|
+
var h, d, f;
|
32
|
+
const t = !((h = p(this, l).form) != null && h.reportValidity()), a = !this.noValidate, n = !((d = p(this, l).form) != null && d.hasAttribute("no-validate"));
|
33
|
+
(a || n) && t || (f = p(this, l).form) == null || f.requestSubmit();
|
24
34
|
}, this._resetForm = () => {
|
25
35
|
var t;
|
26
|
-
(t = this.
|
27
|
-
}, this._renderIcon = () =>
|
36
|
+
(t = p(this, l).form) == null || t.reset();
|
37
|
+
}, this._renderIcon = () => y`<skf-icon data-color="custom" name=${g(this.icon)}></skf-icon>`, $(this, l, this.attachInternals());
|
28
38
|
}
|
29
39
|
firstUpdated(t) {
|
30
40
|
if (t.has("loading") && this.loading) {
|
@@ -32,8 +42,8 @@ const d = class d extends b {
|
|
32
42
|
this._loaderVisible = !0, this.$body.style.opacity = "0", this.$loader.style.opacity = "1";
|
33
43
|
}
|
34
44
|
}
|
35
|
-
|
36
|
-
|
45
|
+
_handleLoadingChange() {
|
46
|
+
this.loading ? this._showLoader() : this._hideLoader();
|
37
47
|
}
|
38
48
|
/** Simulates a click on the button. */
|
39
49
|
click() {
|
@@ -50,11 +60,12 @@ const d = class d extends b {
|
|
50
60
|
!this.$body || !this.$loader || (await this.$loader.animate({ opacity: 0 }, this._transitionOptions).finished, this._loaderVisible = !1, this.$body.animate({ opacity: 1 }, this._transitionOptions));
|
51
61
|
}
|
52
62
|
render() {
|
53
|
-
return
|
63
|
+
return y`
|
54
64
|
<button
|
55
65
|
?disabled=${this.disabled || this.loading}
|
66
|
+
@click=${this._handleClick}
|
56
67
|
aria-busy=${this.loading}
|
57
|
-
class=${
|
68
|
+
class=${L({
|
58
69
|
btn: !0,
|
59
70
|
"btn--destructive": this.destructive,
|
60
71
|
"btn--icon-only": this.iconOnly,
|
@@ -62,67 +73,70 @@ const d = class d extends b {
|
|
62
73
|
"btn--size-md": this.size === "md",
|
63
74
|
"btn--size-sm": this.size === "sm",
|
64
75
|
"btn--variant-primary": this.variant === "primary",
|
65
|
-
"btn--variant-secondary": this.variant === "secondary"
|
76
|
+
"btn--variant-secondary": this.variant === "secondary",
|
77
|
+
"btn--variant-tertiary": this.variant === "tertiary"
|
66
78
|
})}
|
67
|
-
type=${
|
68
|
-
@click=${this._handleClick}
|
79
|
+
type=${g(this.type)}
|
69
80
|
title=${/* An empty title prevents browser validation tooltips from appearing on hover */
|
70
81
|
this.title}
|
71
82
|
>
|
72
|
-
${this.variant === "primary" && this._loaderVisible ?
|
83
|
+
${this.variant === "primary" && this._loaderVisible ? y`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
|
73
84
|
<div class="btn__body" id="body">
|
74
|
-
${this.icon && this.iconPosition === "left" ? this._renderIcon() :
|
75
|
-
${this.iconOnly ?
|
76
|
-
${this.icon && this.iconPosition === "right" ? this._renderIcon() :
|
85
|
+
${this.icon && this.iconPosition === "left" ? this._renderIcon() : b}
|
86
|
+
${this.iconOnly ? b : y`<slot class="btn__label"></slot>`}
|
87
|
+
${this.icon && this.iconPosition === "right" ? this._renderIcon() : b}
|
77
88
|
</div>
|
78
89
|
</button>
|
79
90
|
`;
|
80
91
|
}
|
81
92
|
};
|
82
|
-
|
83
|
-
let
|
93
|
+
l = new WeakMap(), c.styles = [w, C], c.formAssociated = !0, c.shadowRootOptions = { ...z.shadowRootOptions, delegatesFocus: !0 };
|
94
|
+
let o = c;
|
95
|
+
s([
|
96
|
+
r({ type: Boolean })
|
97
|
+
], o.prototype, "destructive", 2);
|
84
98
|
s([
|
85
|
-
|
86
|
-
],
|
99
|
+
r({ type: Boolean })
|
100
|
+
], o.prototype, "disabled", 2);
|
87
101
|
s([
|
88
|
-
|
89
|
-
],
|
102
|
+
r()
|
103
|
+
], o.prototype, "icon", 2);
|
90
104
|
s([
|
91
|
-
|
92
|
-
],
|
105
|
+
r({ type: Boolean, attribute: "icon-only" })
|
106
|
+
], o.prototype, "iconOnly", 2);
|
93
107
|
s([
|
94
|
-
|
95
|
-
],
|
108
|
+
r({ attribute: "icon-position" })
|
109
|
+
], o.prototype, "iconPosition", 2);
|
96
110
|
s([
|
97
|
-
|
98
|
-
],
|
111
|
+
r({ type: Boolean, reflect: !0 })
|
112
|
+
], o.prototype, "loading", 2);
|
99
113
|
s([
|
100
|
-
|
101
|
-
],
|
114
|
+
r({ type: Boolean, attribute: "no-validate" })
|
115
|
+
], o.prototype, "noValidate", 2);
|
102
116
|
s([
|
103
|
-
|
104
|
-
],
|
117
|
+
r({ reflect: !0 })
|
118
|
+
], o.prototype, "size", 2);
|
105
119
|
s([
|
106
|
-
|
107
|
-
],
|
120
|
+
r()
|
121
|
+
], o.prototype, "type", 2);
|
108
122
|
s([
|
109
|
-
|
110
|
-
],
|
123
|
+
r({ reflect: !0 })
|
124
|
+
], o.prototype, "variant", 2);
|
111
125
|
s([
|
112
|
-
|
113
|
-
],
|
126
|
+
P()
|
127
|
+
], o.prototype, "_loaderVisible", 2);
|
114
128
|
s([
|
115
|
-
|
116
|
-
],
|
129
|
+
m("skf-loader")
|
130
|
+
], o.prototype, "$loader", 2);
|
117
131
|
s([
|
118
|
-
|
119
|
-
],
|
132
|
+
m("#body")
|
133
|
+
], o.prototype, "$body", 2);
|
120
134
|
s([
|
121
|
-
|
122
|
-
],
|
135
|
+
m("button")
|
136
|
+
], o.prototype, "$button", 2);
|
123
137
|
s([
|
124
|
-
|
125
|
-
],
|
138
|
+
V("loading", { afterUpdate: !0 })
|
139
|
+
], o.prototype, "_handleLoadingChange", 1);
|
126
140
|
export {
|
127
|
-
|
141
|
+
o as SkfButton
|
128
142
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -49,7 +49,8 @@ const r = o`
|
|
49
49
|
|
50
50
|
.btn--icon-only {
|
51
51
|
aspect-ratio: 1;
|
52
|
-
|
52
|
+
display: inherit;
|
53
|
+
place-content: center;
|
53
54
|
}
|
54
55
|
|
55
56
|
/**
|
@@ -91,7 +92,16 @@ const r = o`
|
|
91
92
|
--_skf-button-color-disabled: var(--skf-interactive-text-color-disabled);
|
92
93
|
}
|
93
94
|
|
94
|
-
.btn--
|
95
|
+
.btn--variant-tertiary {
|
96
|
+
--_skf-button-bg-color: transparent;
|
97
|
+
--_skf-button-bg-color-active: var(--skf-interactive-bg-color-secondary-active);
|
98
|
+
--_skf-button-bg-color-hover: var(--skf-interactive-bg-color-secondary-hover);
|
99
|
+
--_skf-button-border-color: transparent;
|
100
|
+
--_skf-button-color: var(--skf-text-color-emphasised);
|
101
|
+
--_skf-button-color-disabled: var(--skf-interactive-text-color-disabled);
|
102
|
+
}
|
103
|
+
|
104
|
+
.btn--destructive:not(.btn--variant-secondary, .btn--variant-tertiary) {
|
95
105
|
--_skf-button-bg-color: var(--skf-interactive-bg-color-destructive);
|
96
106
|
--_skf-button-bg-color-active: var(--skf-interactive-bg-color-destructive-active);
|
97
107
|
--_skf-button-bg-color-hover: var(--skf-interactive-bg-color-destructive-hover);
|
@@ -119,5 +129,5 @@ const r = o`
|
|
119
129
|
}
|
120
130
|
`;
|
121
131
|
export {
|
122
|
-
r as
|
132
|
+
r as styles
|
123
133
|
};
|
@@ -3,13 +3,14 @@ import { type CSSResultGroup } from 'lit';
|
|
3
3
|
/**
|
4
4
|
* The `<skf-card>` can be used to group related subjects in a container
|
5
5
|
*
|
6
|
-
*
|
6
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/021eed-card) for design principles
|
7
7
|
*
|
8
8
|
* @slot - The card's main content
|
9
9
|
*
|
10
10
|
* @tagname skf-card
|
11
11
|
*/
|
12
12
|
export declare class SkfCard extends SkfElement {
|
13
|
+
#private;
|
13
14
|
static styles: CSSResultGroup;
|
14
15
|
/** If true, removes border */
|
15
16
|
noBorder: boolean;
|
@@ -17,5 +18,7 @@ export declare class SkfCard extends SkfElement {
|
|
17
18
|
noPadding: boolean;
|
18
19
|
/** If true, the Card fills the parent element height */
|
19
20
|
stretch: boolean;
|
21
|
+
/** @internal */
|
22
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
20
23
|
render(): import("lit").TemplateResult<1>;
|
21
24
|
}
|
@@ -1,44 +1,54 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { html as m } from "lit";
|
4
|
-
import { property as o } from "lit/decorators.js";
|
5
|
-
import { classMap as f } from "lit/directives/class-map.js";
|
6
|
-
import { styles as h } from "./card.styles.js";
|
7
|
-
var u = Object.defineProperty, s = (i, p, a, y) => {
|
8
|
-
for (var t = void 0, e = i.length - 1, d; e >= 0; e--)
|
9
|
-
(d = i[e]) && (t = d(p, a, t) || t);
|
10
|
-
return t && u(p, a, t), t;
|
1
|
+
var g = (t) => {
|
2
|
+
throw TypeError(t);
|
11
3
|
};
|
12
|
-
|
4
|
+
var u = (t, e, o) => e.has(t) || g("Cannot " + o);
|
5
|
+
var m = (t, e, o) => (u(t, e, "read from private field"), o ? o.call(t) : e.get(t)), d = (t, e, o) => e.has(t) ? g("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), c = (t, e, o, s) => (u(t, e, "write to private field"), s ? s.call(t, o) : e.set(t, o), o);
|
6
|
+
import { SkfElement as b } from "../../internal/components/skf-element.js";
|
7
|
+
import { stateMap as v } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as P } from "../../internal/helpers/watch.js";
|
9
|
+
import { componentStyles as B } from "../../styles/component.styles.js";
|
10
|
+
import { html as O } from "lit";
|
11
|
+
import { property as f } from "lit/decorators.js";
|
12
|
+
import { styles as j } from "./card.styles.js";
|
13
|
+
var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, i = (t, e, o, s) => {
|
14
|
+
for (var r = s > 1 ? void 0 : s ? x(e, o) : e, h = t.length - 1, l; h >= 0; h--)
|
15
|
+
(l = t[h]) && (r = (s ? l(e, o, r) : l(r)) || r);
|
16
|
+
return s && r && w(e, o, r), r;
|
17
|
+
};
|
18
|
+
const _ = {
|
19
|
+
noBorder: "no-border",
|
20
|
+
noPadding: "no-padding",
|
21
|
+
stretch: "stretch"
|
22
|
+
};
|
23
|
+
var p, a;
|
24
|
+
const y = class y extends b {
|
13
25
|
constructor() {
|
14
|
-
super(...arguments)
|
26
|
+
super(...arguments);
|
27
|
+
d(this, p);
|
28
|
+
d(this, a);
|
29
|
+
c(this, p, this.attachInternals()), c(this, a, m(this, p).states), this.noBorder = !1, this.noPadding = !1, this.stretch = !1;
|
30
|
+
}
|
31
|
+
_handleStateChange(o, s, r) {
|
32
|
+
v(m(this, a), _[o]).set(r);
|
15
33
|
}
|
16
34
|
render() {
|
17
|
-
return
|
18
|
-
<div
|
19
|
-
class=${f({
|
20
|
-
card: !0,
|
21
|
-
"card--no-border": this.noBorder,
|
22
|
-
"card--no-padding": this.noPadding,
|
23
|
-
"card--stretch": this.stretch
|
24
|
-
})}
|
25
|
-
>
|
26
|
-
<slot></slot>
|
27
|
-
</div>
|
28
|
-
`;
|
35
|
+
return O`<slot id="root"></slot>`;
|
29
36
|
}
|
30
37
|
};
|
31
|
-
|
32
|
-
let
|
33
|
-
|
34
|
-
|
35
|
-
],
|
36
|
-
|
37
|
-
|
38
|
-
],
|
39
|
-
|
40
|
-
|
41
|
-
],
|
38
|
+
p = new WeakMap(), a = new WeakMap(), y.styles = [B, j];
|
39
|
+
let n = y;
|
40
|
+
i([
|
41
|
+
f({ type: Boolean, attribute: "no-border" })
|
42
|
+
], n.prototype, "noBorder", 2);
|
43
|
+
i([
|
44
|
+
f({ type: Boolean, attribute: "no-padding" })
|
45
|
+
], n.prototype, "noPadding", 2);
|
46
|
+
i([
|
47
|
+
f({ type: Boolean })
|
48
|
+
], n.prototype, "stretch", 2);
|
49
|
+
i([
|
50
|
+
P(Object.keys(_))
|
51
|
+
], n.prototype, "_handleStateChange", 1);
|
42
52
|
export {
|
43
|
-
|
53
|
+
n as SkfCard
|
44
54
|
};
|
@@ -1,34 +1,47 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
2
|
const a = r`
|
3
|
-
|
3
|
+
@layer components {
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
contain: layout;
|
7
|
+
}
|
4
8
|
|
5
|
-
|
6
|
-
|
7
|
-
|
9
|
+
#root {
|
10
|
+
--_skf-card-border-color: var(--skf-border-color-tertiary);
|
11
|
+
--_skf-card-padding: var(--skf-spacing-100);
|
12
|
+
--_skf-card-shadow: var(--skf-shadow-md);
|
8
13
|
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
background-color: var(--skf-bg-color-neutral-1);
|
15
|
+
border: var(--skf-border-width-sm) solid var(--_skf-card-border-color);
|
16
|
+
border-radius: var(--skf-border-radius-sm);
|
17
|
+
box-shadow: var(--_skf-card-shadow);
|
18
|
+
display: block;
|
19
|
+
padding: var(--_skf-card-padding);
|
20
|
+
}
|
21
|
+
}
|
12
22
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
23
|
+
@layer mods {
|
24
|
+
:host(:state(no-border)) {
|
25
|
+
#root {
|
26
|
+
--_skf-card-border-color: transparent;
|
27
|
+
--_skf-card-shadow: none;
|
28
|
+
}
|
29
|
+
}
|
21
30
|
|
22
|
-
|
23
|
-
|
24
|
-
|
31
|
+
:host(:state(no-padding)) {
|
32
|
+
#root {
|
33
|
+
--_skf-card-padding: 0;
|
34
|
+
}
|
35
|
+
}
|
25
36
|
|
26
|
-
|
27
|
-
|
28
|
-
}
|
37
|
+
:host(:state(stretch)) {
|
38
|
+
block-size: 100%;
|
29
39
|
|
30
|
-
|
31
|
-
|
40
|
+
#root {
|
41
|
+
block-size: inherit;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
32
45
|
}
|
33
46
|
`;
|
34
47
|
export {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
|
+
import type { FormFieldSeverity } from '../../internal/types.js';
|
3
4
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
4
5
|
import { type CSSResultGroup } from 'lit';
|
5
6
|
/**
|
@@ -7,10 +8,10 @@ import { type CSSResultGroup } from 'lit';
|
|
7
8
|
*
|
8
9
|
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/94464f-checkbox) for design principles
|
9
10
|
*
|
10
|
-
* @attribute {boolean} disabled - If true, sets disabled state
|
11
|
-
* @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
|
11
|
+
* @attribute {boolean} [disabled=false] - If true, sets disabled state
|
12
|
+
* @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
|
12
13
|
*
|
13
|
-
* @event
|
14
|
+
* @event {Event} change - When the value of the input changes
|
14
15
|
*
|
15
16
|
* @slot - The Radios label. Alternatively, you can use the `label` attribute.
|
16
17
|
*
|
@@ -24,26 +25,24 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
24
25
|
*/
|
25
26
|
private _initiallyChecked;
|
26
27
|
/** If defined, outputs helping hints in console */
|
27
|
-
debug
|
28
|
+
debug: boolean;
|
28
29
|
/** If true, outputs helping hints in console */
|
29
|
-
checked
|
30
|
+
get checked(): boolean;
|
31
|
+
set checked(value: boolean);
|
30
32
|
/** If true, forces component to invalid state until removed */
|
31
|
-
customInvalid
|
33
|
+
customInvalid: boolean;
|
32
34
|
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
33
|
-
indeterminate
|
35
|
+
indeterminate: boolean;
|
34
36
|
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
35
37
|
label?: string;
|
36
38
|
/** If defined, adds name to the input-element */
|
37
39
|
name?: string;
|
38
40
|
/** If defined, renders an alternative A11y text for the asterisk */
|
39
41
|
requiredLabel?: string;
|
40
|
-
/**
|
41
|
-
|
42
|
-
* @type { "alert" | "success" | "info" | "warning" }
|
43
|
-
*/
|
44
|
-
severity?: FormFieldBaseProps['severity'];
|
42
|
+
/** If defined, styles checkbox using provided severity */
|
43
|
+
severity?: FormFieldSeverity;
|
45
44
|
/** If true, displays valid state after interaction */
|
46
|
-
showValid
|
45
|
+
showValid: boolean;
|
47
46
|
/** Size of the checkbox */
|
48
47
|
size: 'sm' | 'md';
|
49
48
|
/** The current value of the input field */
|
@@ -53,8 +52,13 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
53
52
|
private _invalid;
|
54
53
|
/** @internal */
|
55
54
|
private $input?;
|
55
|
+
/** @internal */
|
56
|
+
handleCheckedChange(): void;
|
57
|
+
/** @internal */
|
56
58
|
handleInvalidChange(): void;
|
59
|
+
/** @internal */
|
57
60
|
handleDebugInvalid(): void;
|
61
|
+
/** @internal */
|
58
62
|
handleCustomInvalidChange(): void;
|
59
63
|
protected firstUpdated(): void;
|
60
64
|
/** @internal */
|