@skf-design-system/ui-components 1.0.0-alpha.34 → 1.0.0-alpha.36
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/custom-elements.json +25490 -0
- 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 +10 -14
- package/dist/components/accordion/accordion.component.js +10 -11
- 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 +6 -1
- package/dist/components/card/card.component.js +46 -36
- package/dist/components/card/card.styles.js +37 -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 +456 -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 +15 -17
- package/dist/components/icon/icon.component.js +52 -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 +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 +20 -25
- package/dist/components/link/link.component.js +99 -107
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +47 -43
- 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/menu-item.component.js +13 -0
- package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
- package/dist/components/{menu-item → menu}/menu-item.styles.js +8 -5
- 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 +22 -0
- package/dist/components/nav/nav-item.component.js +57 -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 +43 -0
- package/dist/components/nav/nav.component.d.ts +23 -0
- package/dist/components/nav/nav.component.js +55 -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 +23 -0
- package/dist/components/popover/popover.component.d.ts +15 -8
- package/dist/components/popover/popover.component.js +29 -23
- 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 +40 -33
- 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.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.d.ts +1 -0
- package/dist/components/select/select-option-group.style.js +24 -0
- package/dist/components/{select-option → select}/select-option.component.d.ts +14 -11
- package/dist/components/select/select-option.component.js +140 -0
- 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-option.styles.js +65 -0
- package/dist/components/select/select.component.d.ts +22 -17
- package/dist/components/select/select.component.js +62 -45
- package/dist/components/select/select.controllers.d.ts +21 -10
- package/dist/components/select/select.controllers.js +29 -23
- 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 +67 -68
- 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 +31 -27
- package/dist/components/toast/toast.singleton.d.ts +7 -12
- package/dist/components/toast/toast.singleton.js +26 -26
- 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 +3980 -2348
- 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 +140 -79
- package/dist/internal/base-classes/popover/popover.styles.js +17 -5
- 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/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 +871 -1307
- package/dist/types/vue/index.d.ts +593 -360
- package/dist/vscode.html-custom-data.json +630 -1184
- package/dist/web-types.json +1422 -945
- package/package.json +47 -63
- 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/menu-item/menu-item.component.js +0 -13
- 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.controllers.d.ts +0 -9
- 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/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/{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.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/{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,37 +1,43 @@
|
|
1
|
-
import { SkfPopoverBase as
|
2
|
-
import { watch as
|
3
|
-
import { property as
|
4
|
-
import { styles as
|
5
|
-
var
|
6
|
-
for (var
|
7
|
-
(
|
8
|
-
return
|
1
|
+
import { SkfPopoverBase as p } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
+
import { watch as l } from "../../internal/helpers/watch.js";
|
3
|
+
import { property as c } from "lit/decorators.js";
|
4
|
+
import { styles as w } from "./popover.styles.js";
|
5
|
+
var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (d, t, r, s) => {
|
6
|
+
for (var e = s > 1 ? void 0 : s ? v(t, r) : t, o = d.length - 1, h; o >= 0; o--)
|
7
|
+
(h = d[o]) && (e = (s ? h(t, r, e) : h(e)) || e);
|
8
|
+
return s && e && f(t, r, e), e;
|
9
9
|
};
|
10
|
-
const a = class a extends
|
10
|
+
const a = class a extends p {
|
11
11
|
constructor() {
|
12
|
-
super(), this.offset = 8, this.hideArrow = !1, this.
|
12
|
+
super(), this.offset = 8, this.hideArrow = !1, this._checkClickOutside = (t) => {
|
13
|
+
this.isOpen && !this.contains(t.target) && this.close();
|
14
|
+
}, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", this.variant = "popup", p.classMap = { popover: !0 };
|
13
15
|
}
|
14
16
|
hideArrowChanged() {
|
15
17
|
this.arrow = !this.hideArrow;
|
16
18
|
}
|
17
|
-
|
18
|
-
|
19
|
+
/** @internal */
|
20
|
+
openExtended() {
|
21
|
+
window.top && window.self !== window.top && window.top.addEventListener("click", this._checkClickOutside, {
|
22
|
+
signal: this.signal
|
23
|
+
});
|
19
24
|
}
|
20
|
-
|
21
|
-
|
25
|
+
/** @internal */
|
26
|
+
addEventListeners(t) {
|
27
|
+
t.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
|
22
28
|
}
|
23
29
|
};
|
24
|
-
a.styles = [
|
25
|
-
let
|
30
|
+
a.styles = [p.styles, w];
|
31
|
+
let i = a;
|
26
32
|
n([
|
27
|
-
|
28
|
-
],
|
33
|
+
c({ type: Number })
|
34
|
+
], i.prototype, "offset", 2);
|
29
35
|
n([
|
30
|
-
|
31
|
-
],
|
36
|
+
c({ type: Boolean })
|
37
|
+
], i.prototype, "hideArrow", 2);
|
32
38
|
n([
|
33
|
-
|
34
|
-
],
|
39
|
+
l("hideArrow")
|
40
|
+
], i.prototype, "hideArrowChanged", 1);
|
35
41
|
export {
|
36
|
-
|
42
|
+
i as SkfPopover
|
37
43
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfPopover } from './popover.component';
|
2
|
-
export * from './popover.component';
|
1
|
+
import { SkfPopover } from './popover.component.js';
|
2
|
+
export * from './popover.component.js';
|
3
3
|
export default SkfPopover;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
@@ -3,7 +3,7 @@ import { type CSSResultGroup } from 'lit';
|
|
3
3
|
/**
|
4
4
|
* The `<skf-progress>` element displays an indicator showing the completion progress of a task, typically displayed as a progress bar
|
5
5
|
*
|
6
|
-
* @documentation See [zeroheight](https://zeroheight.com
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/36d674-progress-bar) for design principles
|
7
7
|
*
|
8
8
|
* @tagname skf-progress
|
9
9
|
*/
|
@@ -17,6 +17,8 @@ export declare class SkfProgress extends SkfElement {
|
|
17
17
|
max: number;
|
18
18
|
/** Specifies how much of the task that has been completed */
|
19
19
|
value: number;
|
20
|
-
|
20
|
+
connectedCallback(): void;
|
21
|
+
/** @internal */
|
22
|
+
_handleStateChange(): void;
|
21
23
|
render(): import("lit").TemplateResult<1>;
|
22
24
|
}
|
@@ -1,49 +1,52 @@
|
|
1
|
-
var
|
1
|
+
var v = (t) => {
|
2
2
|
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var c = (t, e, r) => (
|
6
|
-
import { SkfElement as
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
4
|
+
var y = (t, e, r) => e.has(t) || v("Cannot " + r);
|
5
|
+
var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), u = (t, e, r) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), d = (t, e, r, a) => (y(t, e, "write to private field"), a ? a.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as b } from "../../internal/components/skf-element.js";
|
7
|
+
import { stateMap as _ } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as x } from "../../internal/helpers/watch.js";
|
9
|
+
import { componentStyles as C } from "../../styles/component.styles.js";
|
10
|
+
import { html as O } from "lit";
|
11
|
+
import { property as f } from "lit/decorators.js";
|
11
12
|
import { styles as g } from "./progress.styles.js";
|
12
|
-
var
|
13
|
-
for (var s = void 0,
|
14
|
-
(
|
15
|
-
return s &&
|
16
|
-
},
|
17
|
-
const
|
13
|
+
var w = Object.defineProperty, j = Object.getOwnPropertyDescriptor, n = (t, e, r, a) => {
|
14
|
+
for (var s = a > 1 ? void 0 : a ? j(e, r) : e, l = t.length - 1, h; l >= 0; l--)
|
15
|
+
(h = t[l]) && (s = (a ? h(e, r, s) : h(s)) || s);
|
16
|
+
return a && s && w(e, r, s), s;
|
17
|
+
}, i, p;
|
18
|
+
const m = class m extends b {
|
18
19
|
constructor() {
|
19
|
-
super();
|
20
|
-
|
21
|
-
|
20
|
+
super(...arguments);
|
21
|
+
u(this, i);
|
22
|
+
u(this, p);
|
23
|
+
d(this, i, this.attachInternals()), d(this, p, c(this, i).states), this.animated = !1, this.max = 1, this.value = 0;
|
24
|
+
}
|
25
|
+
connectedCallback() {
|
26
|
+
super.connectedCallback(), this.role = "progressbar";
|
27
|
+
}
|
28
|
+
_handleStateChange() {
|
29
|
+
_(c(this, p), "animated").set(this.animated);
|
22
30
|
}
|
23
31
|
render() {
|
24
32
|
const r = this.value / this.max * 100;
|
25
|
-
return
|
26
|
-
<div
|
27
|
-
class=${_({
|
28
|
-
progress: !0,
|
29
|
-
"progress--animated": this.animated
|
30
|
-
})}
|
31
|
-
style="--_skf-progress-value: ${r}%"
|
32
|
-
></div>
|
33
|
-
`;
|
33
|
+
return O`<div id="root" style="--_skf-progress-value: ${r}%"></div>`;
|
34
34
|
}
|
35
35
|
};
|
36
|
-
|
37
|
-
let
|
36
|
+
i = new WeakMap(), p = new WeakMap(), m.styles = [C, g], m.formAssociated = !0;
|
37
|
+
let o = m;
|
38
|
+
n([
|
39
|
+
f({ type: Boolean })
|
40
|
+
], o.prototype, "animated", 2);
|
38
41
|
n([
|
39
|
-
|
40
|
-
],
|
42
|
+
f({ type: Number })
|
43
|
+
], o.prototype, "max", 2);
|
41
44
|
n([
|
42
|
-
|
43
|
-
],
|
45
|
+
f({ type: Number })
|
46
|
+
], o.prototype, "value", 2);
|
44
47
|
n([
|
45
|
-
|
46
|
-
],
|
48
|
+
x("animated")
|
49
|
+
], o.prototype, "_handleStateChange", 1);
|
47
50
|
export {
|
48
|
-
|
51
|
+
o as SkfProgress
|
49
52
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfProgress } from './progress.component';
|
2
|
-
export * from './progress.component';
|
1
|
+
import { SkfProgress } from './progress.component.js';
|
2
|
+
export * from './progress.component.js';
|
3
3
|
export default SkfProgress;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
@@ -1,45 +1,52 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
2
|
const s = r`
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
border-radius: 0.25rem; /* Missing token */
|
9
|
-
overflow: hidden;
|
4
|
+
@layer base {
|
5
|
+
#root {
|
6
|
+
--_skf-progress-value: 0%;
|
10
7
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
8
|
+
background: var(--skf-bg-color-neutral-3);
|
9
|
+
block-size: var(--skf-size-8);
|
10
|
+
border-radius: 0.25rem; /* Missing token */
|
11
|
+
overflow: hidden;
|
12
|
+
|
13
|
+
&::after {
|
14
|
+
background-color: var(--skf-bg-color-emphasised);
|
15
|
+
block-size: inherit;
|
16
|
+
border-radius: inherit;
|
17
|
+
content: '';
|
18
|
+
display: block;
|
19
|
+
inline-size: var(--_skf-progress-value);
|
20
|
+
transition: inline-size calc(var(--skf-motion-duration-slow) * 1ms)
|
21
|
+
cubic-bezier(0.4, 0.93, 0.71, 0.89);
|
22
|
+
}
|
20
23
|
}
|
21
24
|
}
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
26
|
+
@layer mods {
|
27
|
+
:host(:state(animated)) {
|
28
|
+
#root::after {
|
29
|
+
animation: skf-progress-animation calc(var(--skf-motion-duration-slow) * 1ms) linear
|
30
|
+
infinite reverse;
|
31
|
+
background-image: linear-gradient(
|
32
|
+
-45deg,
|
33
|
+
rgb(255 255 255 / 20%) 25%,
|
34
|
+
transparent 25%,
|
35
|
+
transparent 50%,
|
36
|
+
rgb(255 255 255 / 20%) 50%,
|
37
|
+
rgb(255 255 255 / 20%) 75%,
|
38
|
+
transparent 75%,
|
39
|
+
transparent
|
40
|
+
);
|
41
|
+
background-size: 50px 50px;
|
42
|
+
}
|
43
|
+
}
|
37
44
|
}
|
45
|
+
}
|
38
46
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
}
|
47
|
+
@keyframes skf-progress-animation {
|
48
|
+
to {
|
49
|
+
background-position: 50px 50px;
|
43
50
|
}
|
44
51
|
}
|
45
52
|
`;
|
@@ -1,16 +1,17 @@
|
|
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
|
/**
|
6
7
|
* The `<skf-radio>` component is used to create a radio input
|
7
8
|
*
|
8
|
-
*
|
9
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/78d5dd-radio-button) 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
|
*
|
@@ -18,13 +19,17 @@ import { type CSSResultGroup } from 'lit';
|
|
18
19
|
*/
|
19
20
|
export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
20
21
|
static styles: CSSResultGroup;
|
22
|
+
/**
|
23
|
+
* @internal
|
24
|
+
* Initial state saved here as default for form resets.
|
25
|
+
*/
|
21
26
|
private _initialChecked;
|
22
27
|
/** If true, outputs helping hints in console */
|
23
|
-
debug
|
28
|
+
debug: boolean;
|
24
29
|
/** If true, outputs helping hints in console */
|
25
|
-
checked
|
30
|
+
checked: boolean;
|
26
31
|
/** If true, forces component to invalid state until removed */
|
27
|
-
customInvalid
|
32
|
+
customInvalid: boolean;
|
28
33
|
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
29
34
|
label?: string;
|
30
35
|
/** If defined, adds name to the input-element */
|
@@ -33,13 +38,10 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
|
33
38
|
requiredLabel?: string;
|
34
39
|
/** Size of the Radio */
|
35
40
|
size: 'sm' | 'md';
|
36
|
-
/**
|
37
|
-
|
38
|
-
* @type {"success" | "info" | "warning" | "alert"}
|
39
|
-
*/
|
40
|
-
severity?: FormFieldBaseProps['severity'];
|
41
|
+
/** If defined, displays provided severity state */
|
42
|
+
severity?: FormFieldSeverity;
|
41
43
|
/** If true, displays valid state after interaction */
|
42
|
-
showValid
|
44
|
+
showValid: boolean;
|
43
45
|
/** The current value of the input field */
|
44
46
|
value: string;
|
45
47
|
/** @internal */
|
@@ -49,9 +51,13 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
|
49
51
|
private $input?;
|
50
52
|
connectedCallback(): void;
|
51
53
|
protected firstUpdated(): void;
|
54
|
+
/** @internal */
|
52
55
|
handleInvalidChange(): void;
|
56
|
+
/** @internal */
|
53
57
|
handleDebugInvalid(): void;
|
58
|
+
/** @internal */
|
54
59
|
handleCheckedChanged(): void;
|
60
|
+
/** @internal */
|
55
61
|
handleCustomInvalidChange(): void;
|
56
62
|
/** @internal */
|
57
63
|
private _resetValue;
|
@@ -2,20 +2,20 @@ import "../icon/icon.js";
|
|
2
2
|
import { FormBase as c } from "../../internal/components/formBase.js";
|
3
3
|
import { watch as n } from "../../internal/helpers/watch.js";
|
4
4
|
import { Asterisk as p } from "../../internal/templates/asterisk.js";
|
5
|
-
import v from "../../styles/component.styles.js";
|
5
|
+
import { componentStyles as v } from "../../styles/component.styles.js";
|
6
6
|
import { html as m } from "lit";
|
7
7
|
import { property as r, state as f, query as y } from "lit/decorators.js";
|
8
8
|
import { ifDefined as b } from "lit/directives/if-defined.js";
|
9
9
|
import { live as _ } from "lit/directives/live.js";
|
10
|
-
import g from "./radio.styles.js";
|
11
|
-
var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (u, e, s,
|
12
|
-
for (var a =
|
13
|
-
(h = u[
|
14
|
-
return
|
10
|
+
import { styles as g } from "./radio.styles.js";
|
11
|
+
var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (u, e, s, l) => {
|
12
|
+
for (var a = l > 1 ? void 0 : l ? C(e, s) : e, o = u.length - 1, h; o >= 0; o--)
|
13
|
+
(h = u[o]) && (a = (l ? h(e, s, a) : h(a)) || a);
|
14
|
+
return l && a && k(e, s, a), a;
|
15
15
|
};
|
16
16
|
const d = class d extends c {
|
17
17
|
constructor() {
|
18
|
-
super(...arguments), this._initialChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (e) => {
|
18
|
+
super(...arguments), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.customInvalid = !1, this.size = "md", this.showValid = !1, this.value = "", this._invalid = !1, this._resetValue = (e) => {
|
19
19
|
e.stopPropagation(), this.checked = this._initialChecked, this.$input && (this.$input.checked = !!this._initialChecked), this.setFormValue(this.checked ? this.value : "");
|
20
20
|
};
|
21
21
|
}
|
@@ -25,8 +25,8 @@ const d = class d extends c {
|
|
25
25
|
firstUpdated() {
|
26
26
|
var e;
|
27
27
|
(e = this.$input) == null || e.addEventListener("change", (s) => {
|
28
|
-
var
|
29
|
-
s.stopPropagation(), this.pristine = !1, this.checked = (
|
28
|
+
var l;
|
29
|
+
s.stopPropagation(), this.pristine = !1, this.checked = ((l = this.$input) == null ? void 0 : l.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(""), this.emitEvent("change");
|
30
30
|
}), this.addEventListener("invalid", (s) => {
|
31
31
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
|
32
32
|
}), this._initialChecked = this.checked, this.addEventListener("reset", this._resetValue);
|
@@ -55,8 +55,8 @@ const d = class d extends c {
|
|
55
55
|
const e = this.name;
|
56
56
|
if (!e) return;
|
57
57
|
(this.form ?? document).querySelectorAll(`skf-radio[name="${e}"]`).forEach((a) => {
|
58
|
-
const
|
59
|
-
a !== this && (
|
58
|
+
const o = this.form === a.form, h = !this.form && !a.form;
|
59
|
+
a !== this && (o || h) && (a.checked = !1);
|
60
60
|
});
|
61
61
|
}
|
62
62
|
/** @internal */
|
@@ -81,7 +81,7 @@ const d = class d extends c {
|
|
81
81
|
<input
|
82
82
|
?disabled=${this.disabled}
|
83
83
|
?required=${this.required}
|
84
|
-
.checked=${_(
|
84
|
+
.checked=${_(this.checked)}
|
85
85
|
aria-invalid=${!!this._invalid}
|
86
86
|
name=${b(this.name)}
|
87
87
|
type="radio"
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult[];
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import '../icon/icon.js';
|
2
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
3
|
+
import { type CSSResultGroup } from 'lit';
|
4
|
+
export interface SkfSegmentedButtonItemEvent {
|
5
|
+
item: SkfSegmentedButtonItem;
|
6
|
+
}
|
7
|
+
/**
|
8
|
+
* The `<skf-segmented-button-item>` is used in conjunction with the `<skf-segmented-button>` component
|
9
|
+
*
|
10
|
+
* @event {CustomEvent} skf-segmented-button-item-select - Fired when selected
|
11
|
+
*
|
12
|
+
* @slot - Label for the button
|
13
|
+
*
|
14
|
+
* @tagname skf-segmented-button-item
|
15
|
+
*/
|
16
|
+
export declare class SkfSegmentedButtonItem extends SkfElement {
|
17
|
+
static styles: CSSResultGroup;
|
18
|
+
static shadowRootOptions: {
|
19
|
+
delegatesFocus: boolean;
|
20
|
+
mode: ShadowRootMode;
|
21
|
+
serializable?: boolean;
|
22
|
+
slotAssignment?: SlotAssignmentMode;
|
23
|
+
};
|
24
|
+
/** If true, items is marked as disabled */
|
25
|
+
disabled: boolean;
|
26
|
+
/** If true, items is marked as selected */
|
27
|
+
selected: boolean;
|
28
|
+
/** Sets the item value */
|
29
|
+
value: string;
|
30
|
+
constructor();
|
31
|
+
/** @internal */
|
32
|
+
isMultiple: boolean;
|
33
|
+
/** @internal */
|
34
|
+
private _handleClick;
|
35
|
+
render(): import("lit").TemplateResult<1>;
|
36
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import "../icon/icon.js";
|
2
|
+
import { SkfElement as n } from "../../internal/components/skf-element.js";
|
3
|
+
import { componentStyles as f } from "../../styles/component.styles.js";
|
4
|
+
import { LitElement as u, nothing as m, html as c } from "lit";
|
5
|
+
import { property as r, state as v } from "lit/decorators.js";
|
6
|
+
import { ifDefined as l } from "lit/directives/if-defined.js";
|
7
|
+
import { styles as y } from "./segmented-button-item.styles.js";
|
8
|
+
var b = Object.defineProperty, i = (a, p, d, k) => {
|
9
|
+
for (var e = void 0, o = a.length - 1, h; o >= 0; o--)
|
10
|
+
(h = a[o]) && (e = h(p, d, e) || e);
|
11
|
+
return e && b(p, d, e), e;
|
12
|
+
};
|
13
|
+
const s = class s extends n {
|
14
|
+
constructor() {
|
15
|
+
super(), this.disabled = !1, this.selected = !1, this.value = "", this.isMultiple = !1, this._handleClick = () => {
|
16
|
+
this.emit("skf-segmented-button-item-select", {
|
17
|
+
detail: {
|
18
|
+
item: this
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}, this.addEventListener("click", this._handleClick);
|
22
|
+
}
|
23
|
+
render() {
|
24
|
+
return c`
|
25
|
+
<button
|
26
|
+
?disabled=${this.disabled}
|
27
|
+
aria-checked=${l(this.isMultiple ? void 0 : this.selected ? "true" : "false")}
|
28
|
+
aria-pressed=${l(this.isMultiple ? this.selected ? "true" : "false" : void 0)}
|
29
|
+
id="root"
|
30
|
+
role=${l(this.isMultiple ? void 0 : "radio")}
|
31
|
+
type="button"
|
32
|
+
value=${this.value}
|
33
|
+
>
|
34
|
+
${this.selected ? c`<skf-icon color="emphasised" name="check" size="sm"></skf-icon>` : m}
|
35
|
+
<slot></slot>
|
36
|
+
</button>
|
37
|
+
`;
|
38
|
+
}
|
39
|
+
};
|
40
|
+
s.styles = [f, y], s.shadowRootOptions = { ...u.shadowRootOptions, delegatesFocus: !0 };
|
41
|
+
let t = s;
|
42
|
+
i([
|
43
|
+
r({ type: Boolean, reflect: !0 })
|
44
|
+
], t.prototype, "disabled");
|
45
|
+
i([
|
46
|
+
r({ type: Boolean, reflect: !0 })
|
47
|
+
], t.prototype, "selected");
|
48
|
+
i([
|
49
|
+
r({ reflect: !0 })
|
50
|
+
], t.prototype, "value");
|
51
|
+
i([
|
52
|
+
v()
|
53
|
+
], t.prototype, "isMultiple");
|
54
|
+
export {
|
55
|
+
t as SkfSegmentedButtonItem
|
56
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { SkfSegmentedButtonItem } from './segmented-button-item.component.js';
|
2
|
+
export * from './segmented-button-item.component.js';
|
3
|
+
export default SkfSegmentedButtonItem;
|
4
|
+
declare global {
|
5
|
+
interface HTMLElementTagNameMap {
|
6
|
+
'skf-segmented-button-item': SkfSegmentedButtonItem;
|
7
|
+
}
|
8
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { css as e } from "lit";
|
2
|
+
const o = e`
|
3
|
+
@layer components {
|
4
|
+
:host {
|
5
|
+
display: contents;
|
6
|
+
}
|
7
|
+
|
8
|
+
#root {
|
9
|
+
align-items: center;
|
10
|
+
background-color: var(--_skf-segmented-button-item-bg, transparent);
|
11
|
+
border: var(--skf-border-width-md) solid var(--_skf-segmented-button-item-border, transparent);
|
12
|
+
border-radius: 4px; /* TODO: Missing token */
|
13
|
+
display: flex;
|
14
|
+
flex: 1;
|
15
|
+
font-size: var(--skf-font-size-75);
|
16
|
+
font-weight: var(--skf-font-weight-bold);
|
17
|
+
gap: var(--skf-spacing-25);
|
18
|
+
justify-content: center;
|
19
|
+
min-inline-size: 0;
|
20
|
+
padding-inline: var(--skf-spacing-50);
|
21
|
+
position: relative;
|
22
|
+
|
23
|
+
:host(:not(:last-of-type)) &::after {
|
24
|
+
background-color: var(--skf-border-color-primary);
|
25
|
+
block-size: calc(100% - 5px);
|
26
|
+
content: '';
|
27
|
+
inline-size: 1px;
|
28
|
+
|
29
|
+
/* inset-inline-end: calc((var(--skf-spacing-75) + 2px + var(--skf-border-width-md) * 2) / -2); */
|
30
|
+
inset-inline-end: -9px;
|
31
|
+
position: absolute;
|
32
|
+
}
|
33
|
+
|
34
|
+
&:disabled {
|
35
|
+
color: var(--skf-interactive-text-color-disabled);
|
36
|
+
font-weight: 500;
|
37
|
+
}
|
38
|
+
|
39
|
+
&:is([aria-checked='true'], [aria-pressed='true']) {
|
40
|
+
--_skf-segmented-button-item-border: var(--skf-border-color-emphasised);
|
41
|
+
}
|
42
|
+
|
43
|
+
&:hover:not(:disabled) {
|
44
|
+
--_skf-segmented-button-item-bg: var(--skf-interactive-bg-color-secondary-hover);
|
45
|
+
}
|
46
|
+
|
47
|
+
&:is(:focus, :active):not(:disabled) {
|
48
|
+
--_skf-segmented-button-item-bg: var(--skf-interactive-bg-color-secondary-active);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
slot {
|
53
|
+
display: block;
|
54
|
+
overflow: hidden;
|
55
|
+
text-overflow: ellipsis;
|
56
|
+
white-space: nowrap;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
`;
|
60
|
+
export {
|
61
|
+
o as styles
|
62
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-segmented-button>` component consists of multiple `<skf-segmented-button-item>`, working together.
|
5
|
+
*
|
6
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/68ff54-segmented-buttons) for design principles
|
7
|
+
*
|
8
|
+
* @slot - One or more `<skf-segmented-button-item>`
|
9
|
+
*
|
10
|
+
* @tagname skf-segmented-button
|
11
|
+
*/
|
12
|
+
export declare class SkfSegmentedButton extends SkfElement {
|
13
|
+
static styles: CSSResultGroup;
|
14
|
+
/** If true, allowes multiple items to be selected */
|
15
|
+
multiple: boolean;
|
16
|
+
/** @internal */
|
17
|
+
value: string;
|
18
|
+
/** @internal */
|
19
|
+
private items;
|
20
|
+
firstUpdated(): void;
|
21
|
+
/** @internal */
|
22
|
+
private _handleSegmentedButtonItemSelected;
|
23
|
+
/** @internal */
|
24
|
+
private _handleSlotChange;
|
25
|
+
/** @internal */
|
26
|
+
private _handleKeyDown;
|
27
|
+
/** @internal */
|
28
|
+
private _getKeyDownNextItem;
|
29
|
+
render(): import("lit").TemplateResult<1>;
|
30
|
+
}
|