@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
@@ -1,51 +1,72 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import d from "../../styles/component.styles.js";
|
4
|
-
import { html as h } from "lit";
|
5
|
-
import { property as t } from "lit/decorators.js";
|
6
|
-
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
-
import { ifDefined as s } from "lit/directives/if-defined.js";
|
8
|
-
import v from "./icon.styles.js";
|
9
|
-
var y = Object.defineProperty, o = (m, p, a, $) => {
|
10
|
-
for (var r = void 0, i = m.length - 1, n; i >= 0; i--)
|
11
|
-
(n = m[i]) && (r = n(p, a, r) || r);
|
12
|
-
return r && y(p, a, r), r;
|
1
|
+
var u = (e) => {
|
2
|
+
throw TypeError(e);
|
13
3
|
};
|
14
|
-
|
4
|
+
var y = (e, r, t) => r.has(e) || u("Cannot " + t);
|
5
|
+
var c = (e, r, t) => (y(e, r, "read from private field"), t ? t.call(e) : r.get(e)), d = (e, r, t) => r.has(e) ? u("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), g = (e, r, t, o) => (y(e, r, "write to private field"), o ? o.call(e, t) : r.set(e, t), t);
|
6
|
+
import { SkfElement as _ } from "../../internal/components/skf-element.js";
|
7
|
+
import { stateMap as b } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as S } from "../../internal/helpers/watch.js";
|
9
|
+
import { ICONS as w } from "@skf-design-system/ui-assets";
|
10
|
+
import { componentStyles as C } from "../../styles/component.styles.js";
|
11
|
+
import { html as v } from "lit";
|
12
|
+
import { property as p } from "lit/decorators.js";
|
13
|
+
import { styles as O } from "./icon.styles.js";
|
14
|
+
var z = Object.defineProperty, E = Object.getOwnPropertyDescriptor, i = (e, r, t, o) => {
|
15
|
+
for (var s = o > 1 ? void 0 : o ? E(r, t) : r, n = e.length - 1, m; n >= 0; n--)
|
16
|
+
(m = e[n]) && (s = (o ? m(r, t, s) : m(s)) || s);
|
17
|
+
return o && s && z(r, t, s), s;
|
18
|
+
};
|
19
|
+
const N = {
|
20
|
+
color: ["emphasised", "error", "info", "inverse", "primary", "secondary", "success", "warning"],
|
21
|
+
size: ["lg", "md", "sm", "xs"]
|
22
|
+
};
|
23
|
+
var l, h;
|
24
|
+
const f = class f extends _ {
|
15
25
|
constructor() {
|
16
|
-
super(...arguments)
|
26
|
+
super(...arguments);
|
27
|
+
d(this, l);
|
28
|
+
d(this, h);
|
29
|
+
g(this, l, this.attachInternals()), g(this, h, c(this, l).states), this.color = "primary", this.size = "md", this._handleSlotchange = () => {
|
30
|
+
var s;
|
31
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
|
32
|
+
if (!t) throw new Error("Skf-icon is missing a slot");
|
33
|
+
if (!t.assignedElements({ flatten: !0 }).some((n) => n.tagName === "svg"))
|
34
|
+
throw new Error("Skf-icon must have a name attribute or a slotted svg");
|
35
|
+
};
|
36
|
+
}
|
37
|
+
connectedCallback() {
|
38
|
+
super.connectedCallback(), this.ariaHidden = this.label ? null : "true", this.ariaLabel = this.label ?? null, this.role = this.label ? "img" : null;
|
39
|
+
}
|
40
|
+
_handleStateChange(t, o, s) {
|
41
|
+
b(c(this, h), N[t]).set(s);
|
42
|
+
}
|
43
|
+
_handleNameChange() {
|
44
|
+
this.name || this._handleSlotchange();
|
17
45
|
}
|
18
46
|
render() {
|
19
|
-
return
|
20
|
-
<div
|
21
|
-
aria-hidden=${s(this.label ? void 0 : "true")}
|
22
|
-
aria-label=${s(this.label)}
|
23
|
-
class=${u({
|
24
|
-
icon: !0,
|
25
|
-
[`icon--color-${this.color}`]: !0,
|
26
|
-
[`icon--size-${this.size}`]: !0
|
27
|
-
})}
|
28
|
-
role=${s(this.label ? "img" : void 0)}
|
29
|
-
>
|
30
|
-
${c[this.name]}
|
31
|
-
</div>
|
32
|
-
`;
|
47
|
+
return this.name ? v`<div id="root">${w[this.name]}</div>` : v`<slot id="root" @slotchange=${this._handleSlotchange}></slot>`;
|
33
48
|
}
|
34
49
|
};
|
35
|
-
l.styles = [
|
36
|
-
let
|
37
|
-
|
38
|
-
|
39
|
-
],
|
40
|
-
|
41
|
-
|
42
|
-
],
|
43
|
-
|
44
|
-
|
45
|
-
],
|
46
|
-
|
47
|
-
|
48
|
-
],
|
50
|
+
l = new WeakMap(), h = new WeakMap(), f.styles = [C, O];
|
51
|
+
let a = f;
|
52
|
+
i([
|
53
|
+
p({ type: String })
|
54
|
+
], a.prototype, "color", 2);
|
55
|
+
i([
|
56
|
+
p({ type: String })
|
57
|
+
], a.prototype, "label", 2);
|
58
|
+
i([
|
59
|
+
p({ type: String })
|
60
|
+
], a.prototype, "name", 2);
|
61
|
+
i([
|
62
|
+
p({ type: String })
|
63
|
+
], a.prototype, "size", 2);
|
64
|
+
i([
|
65
|
+
S(["color", "size"])
|
66
|
+
], a.prototype, "_handleStateChange", 1);
|
67
|
+
i([
|
68
|
+
S("name", { afterUpdate: !0 })
|
69
|
+
], a.prototype, "_handleNameChange", 1);
|
49
70
|
export {
|
50
|
-
|
71
|
+
a as SkfIcon
|
51
72
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,84 +1,85 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
|
-
const
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
2
|
+
const r = o`
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
display: inline-flex;
|
7
|
+
}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
#root {
|
10
|
+
--_skf-icon-color: var(--skf-icon-color-primary);
|
11
|
+
--_skf-icon-size: var(--skf-icon-size-md);
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
user-select: none;
|
13
|
+
block-size: var(--_skf-icon-size);
|
14
|
+
display: block;
|
15
|
+
flex-shrink: 0; /* Prevents shrink when flex-child */
|
16
|
+
inline-size: var(--_skf-icon-size);
|
17
|
+
pointer-events: none;
|
18
|
+
user-select: none;
|
20
19
|
|
21
|
-
|
22
|
-
|
20
|
+
:host(:not([data-color='custom'])) & {
|
21
|
+
color: var(--_skf-icon-color);
|
22
|
+
}
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
@layer mods {
|
27
|
+
/**
|
28
|
+
* Color
|
29
|
+
*/
|
30
|
+
:host([data-color='custom']) {
|
31
|
+
color: inherit;
|
32
|
+
}
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
:host(:state(secondary)) #root {
|
35
|
+
--_skf-icon-color: var(--skf-icon-color-secondary);
|
36
|
+
}
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
:host(:state(inverse)) #root {
|
39
|
+
--_skf-icon-color: var(--skf-icon-color-inverse);
|
40
|
+
}
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
42
|
+
:host(:state(emphasised)) #root {
|
43
|
+
--_skf-icon-color: var(--skf-icon-color-emphasised);
|
44
|
+
}
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
:host(:state(alert)) #root {
|
47
|
+
--_skf-icon-color: var(--skf-severity-fg-color-alert);
|
48
|
+
}
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
:host(:state(error)) #root {
|
51
|
+
--_skf-icon-color: var(--skf-severity-fg-color-error);
|
52
|
+
}
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
:host(:state(info)) #root {
|
55
|
+
--_skf-icon-color: var(--skf-severity-fg-color-info);
|
56
|
+
}
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
:host(:state(success)) #root {
|
59
|
+
--_skf-icon-color: var(--skf-severity-fg-color-success);
|
60
|
+
}
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
.icon--size-xs {
|
66
|
-
--_skf-icon-size: var(--skf-icon-size-xs);
|
67
|
-
}
|
62
|
+
:host(:state(warning)) #root {
|
63
|
+
--_skf-icon-color: var(--skf-severity-fg-color-warning);
|
64
|
+
}
|
68
65
|
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
/**
|
67
|
+
* Size
|
68
|
+
*/
|
69
|
+
:host(:state(xs)) #root {
|
70
|
+
--_skf-icon-size: var(--skf-icon-size-xs);
|
71
|
+
}
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
:host(:state(sm)) #root {
|
74
|
+
--_skf-icon-size: var(--skf-icon-size-sm);
|
75
|
+
}
|
76
76
|
|
77
|
-
|
78
|
-
|
77
|
+
:host(:state(lg)) #root {
|
78
|
+
--_skf-icon-size: var(--skf-icon-size-lg);
|
79
|
+
}
|
79
80
|
}
|
80
81
|
}
|
81
82
|
`;
|
82
83
|
export {
|
83
|
-
|
84
|
+
r as styles
|
84
85
|
};
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
3
|
import '../../internal/components/hint/hint';
|
4
|
+
import type { FormFieldSeverity } from '../../internal/types.js';
|
4
5
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
5
6
|
import { type CSSResultGroup } from 'lit';
|
6
|
-
type AutocompleteValues = 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-amount' | 'transaction-currency' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'url' | 'photo' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'email' | 'impp' | 'password' | 'webauthn' | 'work' | (string & {});
|
7
7
|
/**
|
8
|
-
* The skf-text-field is used to create a text input field. It can be used inside a form element or standalone
|
8
|
+
* The skf-text-field is used to create a text input field. It can be used inside a form element or standalone
|
9
9
|
*
|
10
|
-
*
|
10
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/9481fa-input-field) for design principles
|
11
11
|
*
|
12
|
-
* @attribute {boolean} disabled - If true, sets disabled state
|
13
|
-
* @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
|
12
|
+
* @attribute {boolean} [disabled=false] - If true, sets disabled state
|
13
|
+
* @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
|
14
14
|
*
|
15
|
-
* @event change - Fires when the value of the input changes
|
16
|
-
* @event invalid - Fires when the input is invalid
|
15
|
+
* @event {CustomEvent} change - Fires when the value of the input changes
|
16
|
+
* @event {CustomEvent} invalid - Fires when the input is invalid
|
17
17
|
*
|
18
18
|
* @slot - The Inputs label. Alternatively, you can use the `label` attribute.
|
19
19
|
*
|
@@ -25,12 +25,13 @@ type AutocompleteValues = 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-na
|
|
25
25
|
export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
26
26
|
static styles: CSSResultGroup;
|
27
27
|
private customError;
|
28
|
+
/** @internal intermediary value for reset to function, e.g value attribute act as default value */
|
29
|
+
private _value;
|
28
30
|
/**
|
29
|
-
*
|
30
|
-
* [
|
31
|
-
* @type { -m }
|
31
|
+
* Indicates whether the value of the control can be automatically completed by the browser. See
|
32
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.
|
32
33
|
*/
|
33
|
-
autocomplete?:
|
34
|
+
autocomplete?: HTMLInputElement['autocomplete'];
|
34
35
|
/** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
|
35
36
|
buttonAriaLabelClear: string;
|
36
37
|
/** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
|
@@ -41,13 +42,16 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
41
42
|
set customInvalid(value: string | undefined);
|
42
43
|
get customInvalid(): string | undefined;
|
43
44
|
/** If true, outputs helping hints in console */
|
44
|
-
debug
|
45
|
+
debug: boolean;
|
45
46
|
/** If true, hides the label visually */
|
46
|
-
hideLabel
|
47
|
+
hideLabel: boolean;
|
47
48
|
/** If defined, displays informational text below the field */
|
48
49
|
hint?: string;
|
49
|
-
/**
|
50
|
-
|
50
|
+
/**
|
51
|
+
* Provides a hint about the type of data that might be entered by the user while editing the element or its contents. See
|
52
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inputMode) for details.
|
53
|
+
*/
|
54
|
+
inputmode: HTMLInputElement['inputMode'];
|
51
55
|
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
52
56
|
label?: string;
|
53
57
|
/** If defined, displays a prefix/adornment before the input-element */
|
@@ -67,44 +71,41 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
67
71
|
/** If defined, displays placeholder text */
|
68
72
|
placeholder?: string;
|
69
73
|
/** If true, makes the element not mutable, meaning the user can not edit the control */
|
70
|
-
readonly
|
74
|
+
readonly: boolean;
|
71
75
|
/** If defined, renders an alternative A11y text for the asterisk */
|
72
76
|
requiredLabel?: string;
|
73
|
-
/**
|
74
|
-
|
75
|
-
* @type { "alert" | "success" | "info" | "warning" }
|
76
|
-
*/
|
77
|
-
severity?: FormFieldBaseProps['severity'];
|
77
|
+
/** If defined, displays provided severity state */
|
78
|
+
severity?: FormFieldSeverity;
|
78
79
|
/** If true, displays valid state after interaction */
|
79
|
-
showValid
|
80
|
+
showValid: boolean;
|
80
81
|
/** Size of the input */
|
81
82
|
size: 'sm' | 'md';
|
82
83
|
/** If defined, displays a suffix/adornment after the input-element */
|
83
84
|
trailing?: string;
|
84
|
-
/**
|
85
|
-
|
86
|
-
* @type { 'button' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' }
|
87
|
-
*/
|
88
|
-
type?: Exclude<FormFieldBaseProps['type'], 'checkbox' | 'radio'>;
|
85
|
+
/** Type of input */
|
86
|
+
type: 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
|
89
87
|
/** Sets validation start */
|
90
88
|
validateOn: 'input' | 'change' | 'submit';
|
91
89
|
/** The current value of the input field */
|
92
|
-
value: string;
|
90
|
+
set value(newValue: string);
|
91
|
+
get value(): string;
|
93
92
|
/** @internal */
|
94
93
|
/** true if the internal state is invalid */
|
95
94
|
invalid: boolean;
|
96
95
|
/** @internal */
|
97
96
|
private _buttonDown;
|
98
97
|
/** @internal */
|
99
|
-
$input
|
98
|
+
$input?: HTMLInputElement;
|
100
99
|
/** @internal */
|
101
100
|
_defaultSlot: Node[];
|
102
101
|
/** @internal */
|
103
102
|
private _numberController;
|
104
103
|
/** @internal */
|
105
104
|
private _passwordController;
|
106
|
-
|
105
|
+
firstUpdated(): void;
|
107
106
|
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
107
|
+
/** @internal */
|
108
|
+
valueChanged(): void;
|
108
109
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
109
110
|
/** @internal */
|
110
111
|
_handleInput: () => void;
|
@@ -135,4 +136,3 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
135
136
|
private _onBlur;
|
136
137
|
render(): import("lit").TemplateResult<1>;
|
137
138
|
}
|
138
|
-
export {};
|