@skf-design-system/ui-components 1.0.0-alpha.34 → 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 +8 -9
- 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 -12
- package/dist/components/alert/alert.component.js +57 -55
- package/dist/components/alert/alert.styles.js +50 -51
- package/dist/components/breadcrumb/breadcrumb-item.component.js +60 -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 +7 -4
- 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 +17 -14
- package/dist/components/button/button.component.js +73 -61
- 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 +74 -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 -29
- package/dist/components/dialog/dialog.component.js +85 -75
- 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 +64 -43
- 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 +166 -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 +35 -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.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.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 +12 -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 -23
- 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 -23
- 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 +48 -48
- 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} +36 -37
- 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 +68 -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 +65 -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 +4091 -2539
- 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 +2 -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 +9 -14
- 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 +740 -1294
- package/dist/types/vue/index.d.ts +543 -322
- package/dist/vscode.html-custom-data.json +526 -1076
- package/dist/web-types.json +1237 -761
- package/package.json +45 -61
- 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/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 -35
- package/dist/react/index.js +0 -35
- 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-breadcrumb/index.d.ts +0 -9
- package/dist/react/skf-breadcrumb/index.js +0 -17
- package/dist/react/skf-breadcrumb-item/index.d.ts +0 -3
- package/dist/react/skf-breadcrumb-item/index.js +0 -13
- 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/{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/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → drawer/drawer.styles.d.ts} +0 -0
- /package/dist/components/{tab-group/tab-group.styles.d.ts → header/header.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{tab-panel/tab-panel.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/{tab/tab.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → nav/nav.styles.d.ts} +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
@@ -4,10 +4,10 @@ import { type CSSResultGroup } from 'lit';
|
|
4
4
|
/**
|
5
5
|
* The `<skf-switch>` is a component that displays a list of actions or options
|
6
6
|
*
|
7
|
-
*
|
7
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/7282a2-switch) for design principle
|
8
8
|
*
|
9
|
-
* @attribute {boolean} disabled - If true, sets disabled state
|
10
|
-
* @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
|
9
|
+
* @attribute {boolean} [disabled=false] - If true, sets disabled state
|
10
|
+
* @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
|
11
11
|
*
|
12
12
|
* @slot - The Switchs label. Alternatively, you can use the `label` attribute.
|
13
13
|
*
|
@@ -15,13 +15,14 @@ import { type CSSResultGroup } from 'lit';
|
|
15
15
|
*/
|
16
16
|
export declare class SkfSwitch extends FormBase implements FormFieldBaseProps {
|
17
17
|
static styles: CSSResultGroup;
|
18
|
+
/** @internal */
|
18
19
|
private _initialChecked;
|
19
20
|
/** If true, outputs helping hints in console */
|
20
|
-
debug
|
21
|
+
debug: boolean;
|
21
22
|
/** If true, outputs helping hints in console */
|
22
|
-
checked
|
23
|
+
checked: boolean;
|
23
24
|
/** If true, hides the label visually */
|
24
|
-
hideLabel
|
25
|
+
hideLabel: boolean;
|
25
26
|
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
26
27
|
label?: string;
|
27
28
|
/** If defined, adds name to the input-element */
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import { FormBase as o } from "../../internal/components/formBase.js";
|
2
2
|
import { Asterisk as u } from "../../internal/templates/asterisk.js";
|
3
|
-
import p from "../../styles/component.styles.js";
|
4
|
-
import {
|
5
|
-
import { property as s, state as
|
6
|
-
import { classMap as
|
7
|
-
import { ifDefined as
|
8
|
-
import { styles as
|
9
|
-
var
|
10
|
-
for (var l = void 0,
|
11
|
-
(n = d[
|
12
|
-
return l &&
|
3
|
+
import { componentStyles as p } from "../../styles/component.styles.js";
|
4
|
+
import { nothing as c, html as v } from "lit";
|
5
|
+
import { property as s, state as f, query as m } from "lit/decorators.js";
|
6
|
+
import { classMap as _ } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as b } from "lit/directives/if-defined.js";
|
8
|
+
import { styles as y } from "./switch.styles.js";
|
9
|
+
var g = Object.defineProperty, i = (d, e, a, k) => {
|
10
|
+
for (var l = void 0, h = d.length - 1, n; h >= 0; h--)
|
11
|
+
(n = d[h]) && (l = n(e, a, l) || l);
|
12
|
+
return l && g(e, a, l), l;
|
13
13
|
};
|
14
|
-
const
|
14
|
+
const r = class r extends o {
|
15
15
|
constructor() {
|
16
|
-
super(...arguments), this._initialChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._handleChange = (e) => {
|
16
|
+
super(...arguments), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.hideLabel = !1, this.size = "md", this.value = "", this._invalid = !1, this._handleChange = (e) => {
|
17
17
|
var a;
|
18
|
-
e.stopPropagation(), this.pristine = !1, this.checked = (a = this.$input) == null ? void 0 : a.checked, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(null), this.emitEvent("change");
|
18
|
+
e.stopPropagation(), this.pristine = !1, this.checked = ((a = this.$input) == null ? void 0 : a.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(null), this.emitEvent("change");
|
19
19
|
}, this._handleInvalid = (e) => {
|
20
20
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && e.preventDefault();
|
21
21
|
}, this._resetValue = (e) => {
|
@@ -51,9 +51,9 @@ const h = class h extends o {
|
|
51
51
|
this.setValidity({});
|
52
52
|
}
|
53
53
|
render() {
|
54
|
-
return
|
54
|
+
return v`
|
55
55
|
<label
|
56
|
-
class=${
|
56
|
+
class=${_({
|
57
57
|
switch: !0,
|
58
58
|
"switch--small": this.size === "sm"
|
59
59
|
})}
|
@@ -67,11 +67,11 @@ const h = class h extends o {
|
|
67
67
|
@reset=${this._resetValue}
|
68
68
|
aria-invalid=${!!this._invalid}
|
69
69
|
class="switch__input"
|
70
|
-
name=${
|
70
|
+
name=${b(this.name)}
|
71
71
|
type="checkbox"
|
72
72
|
value=${this.value}
|
73
73
|
/>
|
74
|
-
<div class="switch__label">
|
74
|
+
<div class="switch__label ${this.hideLabel ? "visually-hidden" : c}">
|
75
75
|
<slot>${this.label}</slot>
|
76
76
|
${this.required ? u(this.requiredLabel, "switch__asterisk") : null}
|
77
77
|
</div>
|
@@ -79,8 +79,8 @@ const h = class h extends o {
|
|
79
79
|
`;
|
80
80
|
}
|
81
81
|
};
|
82
|
-
|
83
|
-
let t =
|
82
|
+
r.styles = [p, y];
|
83
|
+
let t = r;
|
84
84
|
i([
|
85
85
|
s({ type: Boolean })
|
86
86
|
], t.prototype, "debug");
|
@@ -106,10 +106,10 @@ i([
|
|
106
106
|
s()
|
107
107
|
], t.prototype, "value");
|
108
108
|
i([
|
109
|
-
|
109
|
+
f()
|
110
110
|
], t.prototype, "_invalid");
|
111
111
|
i([
|
112
|
-
|
112
|
+
m("input")
|
113
113
|
], t.prototype, "$input");
|
114
114
|
export {
|
115
115
|
t as SkfSwitch
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SkfElement as c } from "../../internal/components/skf-element.js";
|
2
2
|
import { watch as h } from "../../internal/helpers/watch.js";
|
3
|
-
import l from "../../styles/component.styles.js";
|
3
|
+
import { componentStyles as l } from "../../styles/component.styles.js";
|
4
4
|
import { html as v } from "lit";
|
5
5
|
import { property as f, state as d } from "lit/decorators.js";
|
6
6
|
import { styles as y } from "./tab-panel.styles.js";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfTabPanel } from './tab-panel.component';
|
2
|
-
export * from './tab-panel.component';
|
1
|
+
import { SkfTabPanel } from './tab-panel.component.js';
|
2
|
+
export * from './tab-panel.component.js';
|
3
3
|
export default SkfTabPanel;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { SkfTabGroup } from '../tab-group/tab-group.component.js';
|
2
1
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
2
|
import { type CSSResultGroup } from 'lit';
|
3
|
+
import type { SkfTabs } from './tabs.component.js';
|
4
4
|
export interface SkfTabEvent {
|
5
5
|
tab: SkfTab;
|
6
6
|
}
|
@@ -19,7 +19,7 @@ export declare class SkfTab extends SkfElement {
|
|
19
19
|
/** The name of the tab-panel this tab is associated with. The panel must be located in the same tab group. */
|
20
20
|
panel: string;
|
21
21
|
selected: boolean;
|
22
|
-
variant:
|
22
|
+
variant: SkfTabs['variant'];
|
23
23
|
constructor();
|
24
24
|
/** @internal */
|
25
25
|
handleSelectedChange(): void;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SkfElement as n } from "../../internal/components/skf-element.js";
|
2
2
|
import { watch as h } from "../../internal/helpers/watch.js";
|
3
|
-
import m from "../../styles/component.styles.js";
|
3
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
4
4
|
import { html as f } from "lit";
|
5
5
|
import { property as v, state as d } from "lit/decorators.js";
|
6
6
|
import { classMap as b } from "lit/directives/class-map.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,17 +1,16 @@
|
|
1
|
-
import '../card/card.js';
|
2
1
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
2
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
4
3
|
/**
|
5
|
-
* The `<skf-
|
4
|
+
* The `<skf-tabs>` is a component that displays a list of actions or options
|
6
5
|
*
|
7
6
|
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
8
7
|
*
|
9
8
|
* @slot - Used for grouping tab panels in the tab group. Must be <skf-tab-panel> elements
|
10
9
|
* @slot tabs - Used for grouping tabs in the tab group. Must be <skf-tab> elements
|
11
10
|
*
|
12
|
-
* @tagname skf-
|
11
|
+
* @tagname skf-tabs
|
13
12
|
*/
|
14
|
-
export declare class
|
13
|
+
export declare class SkfTabs extends SkfElement {
|
15
14
|
static styles: CSSResultGroup;
|
16
15
|
/** Sets the default selected tab */
|
17
16
|
defaultSelected: number;
|
@@ -1,16 +1,15 @@
|
|
1
|
-
import "
|
2
|
-
import {
|
3
|
-
import b from "../../styles/component.styles.js";
|
1
|
+
import { SkfElement as p } from "../../internal/components/skf-element.js";
|
2
|
+
import { componentStyles as b } from "../../styles/component.styles.js";
|
4
3
|
import { html as f } from "lit";
|
5
|
-
import { property as o, queryAssignedElements as
|
6
|
-
import { classMap as
|
7
|
-
import { styles as
|
8
|
-
var
|
9
|
-
for (var e = void 0,
|
10
|
-
(d = h[
|
11
|
-
return e &&
|
4
|
+
import { property as o, queryAssignedElements as c } from "lit/decorators.js";
|
5
|
+
import { classMap as y } from "lit/directives/class-map.js";
|
6
|
+
import { styles as m } from "./tabs.styles.js";
|
7
|
+
var u = Object.defineProperty, n = (h, t, s, i) => {
|
8
|
+
for (var e = void 0, r = h.length - 1, d; r >= 0; r--)
|
9
|
+
(d = h[r]) && (e = d(t, s, e) || e);
|
10
|
+
return e && u(t, s, e), e;
|
12
11
|
};
|
13
|
-
const l = class l extends
|
12
|
+
const l = class l extends p {
|
14
13
|
constructor() {
|
15
14
|
super(...arguments), this.defaultSelected = 0, this.noBorder = !1, this.noPadding = !1, this.stretch = !1, this.variant = "expanded", this._handleKeyDown = (t) => {
|
16
15
|
if (["ArrowLeft", "ArrowRight"].includes(t.key)) {
|
@@ -22,15 +21,15 @@ const l = class l extends c {
|
|
22
21
|
this._selectTab(s);
|
23
22
|
}, this._selectTab = (t) => {
|
24
23
|
this.tabs.forEach((s) => {
|
25
|
-
const
|
26
|
-
s.selected = s === t,
|
24
|
+
const i = this.panels.find((e) => e.name === s.panel);
|
25
|
+
s.selected = s === t, i && (i.active = s === t);
|
27
26
|
});
|
28
27
|
}, this._syncTabsAndPanels = () => {
|
29
28
|
this.tabs.forEach((t, s) => {
|
30
|
-
const
|
31
|
-
t.id = t.id ? t.id : `skf-tab-${
|
32
|
-
const e = this.panels.find((
|
33
|
-
e && (e.id = e.id ? e.id : `skf-tab-panel-${
|
29
|
+
const i = (s + 1).toString();
|
30
|
+
t.id = t.id ? t.id : `skf-tab-${i}`, t.selected = this.defaultSelected === s;
|
31
|
+
const e = this.panels.find((r) => r.name === t.panel);
|
32
|
+
e && (e.id = e.id ? e.id : `skf-tab-panel-${i}`, t.setAttribute("aria-controls", e.id), e.setAttribute("aria-labelledby", t.id), e.active = t.selected);
|
34
33
|
});
|
35
34
|
};
|
36
35
|
}
|
@@ -51,48 +50,48 @@ const l = class l extends c {
|
|
51
50
|
return f`
|
52
51
|
<div
|
53
52
|
@keydown=${this._handleKeyDown}
|
54
|
-
class=${
|
55
|
-
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
53
|
+
class=${y({
|
54
|
+
tabs: !0,
|
55
|
+
"tabs--compressed": this.variant === "compressed",
|
56
|
+
"tabs--expanded": this.variant === "expanded",
|
57
|
+
"tabs--no-border": this.noBorder,
|
58
|
+
"tabs--no-padding": this.noPadding,
|
59
|
+
"tabs--stretch": this.stretch
|
61
60
|
})}
|
62
61
|
>
|
63
|
-
<div class="
|
62
|
+
<div class="tabs__list" role="tablist">
|
64
63
|
<slot name="tabs"></slot>
|
65
64
|
</div>
|
66
|
-
<div class="
|
65
|
+
<div class="tabs__body">
|
67
66
|
<slot></slot>
|
68
67
|
</div>
|
69
68
|
</div>
|
70
69
|
`;
|
71
70
|
}
|
72
71
|
};
|
73
|
-
l.styles = [b,
|
72
|
+
l.styles = [b, m];
|
74
73
|
let a = l;
|
75
|
-
|
74
|
+
n([
|
76
75
|
o({ type: Number, attribute: "default-selected" })
|
77
76
|
], a.prototype, "defaultSelected");
|
78
|
-
|
77
|
+
n([
|
79
78
|
o({ type: Boolean, attribute: "no-border" })
|
80
79
|
], a.prototype, "noBorder");
|
81
|
-
|
80
|
+
n([
|
82
81
|
o({ type: Boolean, attribute: "no-padding" })
|
83
82
|
], a.prototype, "noPadding");
|
84
|
-
|
83
|
+
n([
|
85
84
|
o({ type: Boolean })
|
86
85
|
], a.prototype, "stretch");
|
87
|
-
|
86
|
+
n([
|
88
87
|
o({ reflect: !0 })
|
89
88
|
], a.prototype, "variant");
|
90
|
-
|
91
|
-
|
89
|
+
n([
|
90
|
+
c({ slot: "tabs" })
|
92
91
|
], a.prototype, "tabs");
|
93
|
-
|
94
|
-
|
92
|
+
n([
|
93
|
+
c()
|
95
94
|
], a.prototype, "panels");
|
96
95
|
export {
|
97
|
-
a as
|
96
|
+
a as SkfTabs
|
98
97
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { css as
|
2
|
-
const
|
1
|
+
import { css as s } from "lit";
|
2
|
+
const r = s`
|
3
3
|
/* stylelint-disable selector-class-pattern */
|
4
4
|
@layer components {
|
5
5
|
:host {
|
@@ -13,13 +13,13 @@ const a = r`
|
|
13
13
|
/**
|
14
14
|
* Root
|
15
15
|
*/
|
16
|
-
.
|
16
|
+
.tabs {
|
17
17
|
background-color: var(--skf-bg-color-neutral-1);
|
18
18
|
}
|
19
19
|
|
20
|
-
.
|
20
|
+
.tabs--expanded {
|
21
21
|
border: var(
|
22
|
-
--_skf-
|
22
|
+
--_skf-tabs-border,
|
23
23
|
var(--skf-border-width-sm) solid var(--skf-border-color-tertiary)
|
24
24
|
);
|
25
25
|
border-end-end-radius: var(--skf-border-radius-sm);
|
@@ -31,11 +31,11 @@ const a = r`
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
34
|
-
.
|
35
|
-
--_skf-
|
34
|
+
.tabs--no-border {
|
35
|
+
--_skf-tabs-border: none;
|
36
36
|
}
|
37
37
|
|
38
|
-
.
|
38
|
+
.tabs--stretch {
|
39
39
|
block-size: inherit;
|
40
40
|
display: flex;
|
41
41
|
flex-direction: column;
|
@@ -44,10 +44,10 @@ const a = r`
|
|
44
44
|
/**
|
45
45
|
* Tabs
|
46
46
|
*/
|
47
|
-
.
|
47
|
+
.tabs__list {
|
48
48
|
display: flex;
|
49
49
|
|
50
|
-
.
|
50
|
+
.tabs--compressed & {
|
51
51
|
gap: var(--skf-spacing-100);
|
52
52
|
}
|
53
53
|
}
|
@@ -55,15 +55,15 @@ const a = r`
|
|
55
55
|
/**
|
56
56
|
* Body
|
57
57
|
*/
|
58
|
-
.
|
59
|
-
padding-block: var(--_skf-
|
58
|
+
.tabs__body {
|
59
|
+
padding-block: var(--_skf-tabs-body-padding-block, var(--skf-spacing-100) 0);
|
60
60
|
|
61
|
-
.
|
61
|
+
.tabs--stretch & {
|
62
62
|
overflow-y: auto;
|
63
63
|
}
|
64
64
|
|
65
|
-
.
|
66
|
-
--_skf-
|
65
|
+
.tabs--expanded:not(.tabs--no-padding) & {
|
66
|
+
--_skf-tabs-body-padding-block: var(--skf-spacing-100);
|
67
67
|
|
68
68
|
padding-inline: var(--skf-spacing-100);
|
69
69
|
}
|
@@ -71,5 +71,5 @@ const a = r`
|
|
71
71
|
}
|
72
72
|
`;
|
73
73
|
export {
|
74
|
-
|
74
|
+
r as styles
|
75
75
|
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
|
-
import type { Icon,
|
3
|
+
import type { Icon, Severity } from '../../internal/types.js';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
|
+
type Size = 'sm' | 'md';
|
5
6
|
/**
|
6
7
|
* The `<skf-tag>` is a component that displays a list of actions or options
|
7
8
|
*
|
@@ -12,21 +13,18 @@ import { type CSSResultGroup } from 'lit';
|
|
12
13
|
* @tagname skf-tag
|
13
14
|
*/
|
14
15
|
export declare class SkfTag extends SkfElement {
|
16
|
+
#private;
|
15
17
|
static styles: CSSResultGroup;
|
18
|
+
/** @internal */
|
16
19
|
private _onClick?;
|
17
|
-
|
20
|
+
/** @internal */
|
21
|
+
private _onRemove?;
|
18
22
|
/** Specifies Tag size */
|
19
|
-
size:
|
20
|
-
/**
|
21
|
-
* If defined, displays leading/provided icon
|
22
|
-
* @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" }
|
23
|
-
*/
|
23
|
+
size: Size;
|
24
|
+
/** If defined, displays leading/provided icon */
|
24
25
|
icon?: Icon;
|
25
|
-
/**
|
26
|
-
|
27
|
-
* @type { "warning" | "success" | "info" | "error" | "alert" }
|
28
|
-
*/
|
29
|
-
color?: SeverityBgColor;
|
26
|
+
/** If defined, gives the supplied appearance */
|
27
|
+
color?: Severity;
|
30
28
|
/** If defined, accepts a function that runs on click */
|
31
29
|
set onClick(onClickFn: ((event: Event) => void) | undefined);
|
32
30
|
get onClick(): ((event: Event) => void) | undefined;
|
@@ -34,15 +32,20 @@ export declare class SkfTag extends SkfElement {
|
|
34
32
|
set onRemove(onRemoveFn: ((event: Event) => void) | undefined);
|
35
33
|
get onRemove(): ((event: Event) => void) | undefined;
|
36
34
|
/** If true, adds trailing button to remove tag */
|
37
|
-
removable
|
35
|
+
removable: boolean;
|
38
36
|
/** @internal */
|
39
37
|
$removeButton: HTMLButtonElement;
|
40
38
|
connectedCallback(): void;
|
41
39
|
disconnectedCallback(): void;
|
42
40
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
/** @internal */
|
42
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
43
|
+
/** @internal */
|
44
|
+
private _handleKeyDown;
|
45
|
+
/** @internal run externally provided callback (if any) first. Let click propagate to handleClick. */
|
46
|
+
private _handleRemove;
|
47
|
+
/** @internal */
|
48
|
+
private _handleClick;
|
47
49
|
render(): import("lit").TemplateResult<1>;
|
48
50
|
}
|
51
|
+
export {};
|