@skf-design-system/ui-components 1.0.0-alpha.33 → 1.0.0-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -27
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +98 -0
- package/dist/components/accordion/accordion-item.d.ts +3 -3
- package/dist/components/accordion/accordion-item.js +4 -5
- package/dist/components/accordion/accordion-item.styles.js +77 -0
- package/dist/components/accordion/accordion.component.d.ts +9 -13
- package/dist/components/accordion/accordion.component.js +7 -7
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/alert/alert.component.d.ts +12 -12
- package/dist/components/alert/alert.component.js +57 -54
- package/dist/components/alert/alert.styles.js +50 -51
- package/dist/components/breadcrumb/breadcrumb-item.component.d.ts +25 -0
- package/dist/components/breadcrumb/breadcrumb-item.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +63 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +32 -0
- package/dist/components/breadcrumb/breadcrumb.component.js +65 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +25 -0
- package/dist/components/button/button.component.d.ts +17 -14
- package/dist/components/button/button.component.js +74 -60
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +13 -3
- package/dist/components/card/card.component.d.ts +4 -1
- package/dist/components/card/card.component.js +46 -36
- package/dist/components/card/card.styles.js +36 -23
- package/dist/components/checkbox/checkbox.component.d.ts +17 -13
- package/dist/components/checkbox/checkbox.component.js +75 -61
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/datepicker/datepicker-calendar.component.d.ts +80 -0
- package/dist/components/datepicker/datepicker-calendar.component.js +415 -0
- package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
- package/dist/components/datepicker/datepicker-calendar.js +6 -0
- package/dist/components/datepicker/datepicker-calendar.styles.js +202 -0
- package/dist/components/datepicker/datepicker-popup.component.d.ts +64 -0
- package/dist/components/datepicker/datepicker-popup.component.js +261 -0
- package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
- package/dist/components/datepicker/datepicker-popup.helpers.d.ts +41 -0
- package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
- package/dist/components/datepicker/datepicker-popup.js +6 -0
- package/dist/components/datepicker/datepicker-popup.styles.js +87 -0
- package/dist/components/datepicker/datepicker.component.d.ts +121 -0
- package/dist/components/datepicker/datepicker.component.js +455 -0
- package/dist/components/datepicker/datepicker.d.ts +8 -0
- package/dist/components/datepicker/datepicker.helpers.d.ts +38 -0
- package/dist/components/datepicker/datepicker.helpers.js +31 -0
- package/dist/components/datepicker/datepicker.js +6 -0
- package/dist/components/datepicker/datepicker.styles.d.ts +1 -0
- package/dist/components/datepicker/datepicker.styles.js +18 -0
- package/dist/components/dialog/dialog.component.d.ts +20 -30
- package/dist/components/dialog/dialog.component.js +89 -78
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/dialog.styles.js +4 -4
- package/dist/components/divider/divider.component.d.ts +4 -8
- package/dist/components/divider/divider.component.js +24 -46
- package/dist/components/divider/divider.styles.js +34 -30
- package/dist/components/drawer/drawer.component.d.ts +61 -0
- package/dist/components/drawer/drawer.component.js +125 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +6 -0
- package/dist/components/drawer/drawer.styles.js +71 -0
- package/dist/components/header/header.component.d.ts +46 -0
- package/dist/components/header/header.component.js +116 -0
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/header.js +6 -0
- package/dist/components/header/header.styles.js +68 -0
- package/dist/components/heading/heading.component.d.ts +8 -12
- package/dist/components/heading/heading.component.js +52 -24
- package/dist/components/heading/heading.styles.d.ts +1 -2
- package/dist/components/heading/heading.styles.js +35 -37
- package/dist/components/icon/icon.component.d.ts +19 -18
- package/dist/components/icon/icon.component.js +60 -40
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +61 -60
- package/dist/components/input/input.component.d.ts +31 -31
- package/dist/components/input/input.component.js +167 -146
- package/dist/components/input/input.controllers.d.ts +20 -6
- package/dist/components/input/input.controllers.js +14 -10
- package/dist/components/link/link.component.d.ts +12 -14
- package/dist/components/link/link.component.js +36 -34
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +24 -20
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/loader/loader.component.js +36 -40
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +40 -32
- package/dist/components/logo/logo.component.d.ts +8 -6
- package/dist/components/logo/logo.component.js +55 -51
- package/dist/components/logo/logo.styles.js +26 -16
- package/dist/components/menu/menu-item.component.d.ts +13 -0
- package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
- package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
- package/dist/components/menu/menu.component.d.ts +10 -8
- package/dist/components/menu/menu.component.js +8 -10
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/nav/nav-item.component.d.ts +18 -0
- package/dist/components/nav/nav-item.component.js +38 -0
- package/dist/components/nav/nav-item.d.ts +8 -0
- package/dist/components/nav/nav-item.js +6 -0
- package/dist/components/nav/nav-item.styles.d.ts +1 -0
- package/dist/components/nav/nav-item.styles.js +39 -0
- package/dist/components/nav/nav.component.d.ts +17 -0
- package/dist/components/nav/nav.component.js +34 -0
- package/dist/components/nav/nav.d.ts +8 -0
- package/dist/components/nav/nav.js +6 -0
- package/dist/components/nav/nav.styles.d.ts +1 -0
- package/dist/components/nav/nav.styles.js +17 -0
- package/dist/components/popover/popover.component.d.ts +11 -8
- package/dist/components/popover/popover.component.js +24 -26
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/progress.styles.js +42 -35
- package/dist/components/radio/radio.component.d.ts +19 -13
- package/dist/components/radio/radio.component.js +13 -12
- package/dist/components/radio/radio.styles.d.ts +1 -2
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.d.ts +36 -0
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/segmented-button/segmented-button-item.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.d.ts +1 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +30 -0
- package/dist/components/segmented-button/segmented-button.component.js +73 -0
- package/dist/components/segmented-button/segmented-button.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
- package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
- package/dist/components/select/select-option-group.style.d.ts +1 -0
- package/dist/components/{select-option → select}/select-option.component.d.ts +9 -10
- package/dist/components/{select-option → select}/select-option.component.js +23 -22
- package/dist/components/select/select-option.controllers.d.ts +15 -0
- package/dist/components/select/select-option.styles.d.ts +1 -0
- package/dist/components/select/select.component.d.ts +18 -17
- package/dist/components/select/select.component.js +22 -22
- package/dist/components/select/select.controllers.d.ts +21 -10
- package/dist/components/select/select.controllers.js +27 -22
- package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +50 -49
- package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
- package/dist/components/stepper/stepper-item.styles.d.ts +1 -0
- package/dist/components/stepper/stepper.component.d.ts +4 -3
- package/dist/components/stepper/stepper.component.js +15 -15
- package/dist/components/stepper/stepper.d.ts +2 -2
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/switch/switch.component.d.ts +7 -6
- package/dist/components/switch/switch.component.js +21 -21
- package/dist/components/switch/switch.d.ts +2 -2
- package/dist/components/{tab-panel → tabs}/tab-panel.component.js +1 -1
- package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
- package/dist/components/tabs/tab-panel.styles.d.ts +1 -0
- package/dist/components/{tab → tabs}/tab.component.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.component.js +1 -1
- package/dist/components/{tab → tabs}/tab.d.ts +2 -2
- package/dist/components/tabs/tab.styles.d.ts +1 -0
- package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
- package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +31 -31
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +6 -0
- package/dist/components/tabs/tabs.styles.d.ts +1 -0
- package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
- package/dist/components/tag/tag.component.d.ts +20 -17
- package/dist/components/tag/tag.component.js +69 -67
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.styles.js +63 -50
- package/dist/components/textarea/textarea.component.d.ts +10 -11
- package/dist/components/textarea/textarea.component.js +66 -67
- package/dist/components/{toast-item → toast}/toast-item.component.js +15 -15
- package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -0
- package/dist/components/toast/toast-item.styles.js +18 -0
- package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
- package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast/toast.component.d.ts +9 -5
- package/dist/components/toast/toast.component.js +32 -28
- package/dist/components/toast/toast.singleton.d.ts +6 -11
- package/dist/components/toast/toast.singleton.js +23 -23
- package/dist/components/tooltip/tooltip.component.d.ts +7 -7
- package/dist/components/tooltip/tooltip.component.js +16 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +4450 -2753
- package/dist/index.d.ts +22 -9
- package/dist/index.js +111 -74
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -9
- package/dist/internal/base-classes/popover/popover.base.js +138 -77
- package/dist/internal/base-classes/popover/popover.styles.js +14 -1
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +3 -2
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +1 -1
- package/dist/internal/components/skf-element.d.ts +1 -3
- package/dist/internal/components/skf-element.js +4 -9
- package/dist/internal/constants/iconSeverity.d.ts +3 -2
- package/dist/internal/constants/iconSeverity.js +2 -3
- package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
- package/dist/internal/controllers/popover.controller.d.ts +12 -6
- package/dist/internal/controllers/popover.controller.js +7 -11
- package/dist/internal/helpers/dateFormatter.d.ts +2 -0
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/helpers/stateMap.d.ts +14 -0
- package/dist/internal/helpers/stateMap.js +68 -0
- package/dist/internal/helpers/utilityTypes.d.ts +22 -0
- package/dist/internal/helpers/uuid.d.ts +15 -0
- package/dist/internal/helpers/uuid.js +14 -0
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/helpers/watch.js +12 -12
- package/dist/internal/storybook/styles.d.ts +1 -0
- package/dist/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +18 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +38 -37
- package/dist/styles/form-field.styles.js +11 -6
- package/dist/styles/global-alt.css +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +767 -1282
- package/dist/types/vue/index.d.ts +572 -310
- package/dist/vscode.html-custom-data.json +547 -1068
- package/dist/web-types.json +1314 -769
- package/package.json +48 -64
- package/dist/components/accordion/accordion.test.d.ts +0 -1
- package/dist/components/checkbox/checkbox.test.d.ts +0 -1
- package/dist/components/collapse/collapse.component.d.ts +0 -40
- package/dist/components/collapse/collapse.component.js +0 -85
- package/dist/components/collapse/collapse.d.ts +0 -8
- package/dist/components/collapse/collapse.js +0 -6
- package/dist/components/collapse/collapse.styles.d.ts +0 -2
- package/dist/components/collapse/collapse.styles.js +0 -77
- package/dist/components/collapse/collapse.test.d.ts +0 -1
- package/dist/components/input/input.test.d.ts +0 -1
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/components/radio/radio.test.d.ts +0 -1
- package/dist/components/select-option/select-option.controllers.d.ts +0 -9
- package/dist/components/switch/switch.test.d.ts +0 -1
- package/dist/components/tab-group/tab-group.d.ts +0 -8
- package/dist/components/tab-group/tab-group.js +0 -6
- package/dist/components/toast-item/toast-item.styles.js +0 -16
- package/dist/internal/constants/heading.d.ts +0 -2
- package/dist/internal/playwright/index.d.ts +0 -1
- package/dist/react/index.d.ts +0 -33
- package/dist/react/index.js +0 -33
- package/dist/react/skf-accordion/index.d.ts +0 -3
- package/dist/react/skf-accordion/index.js +0 -13
- package/dist/react/skf-alert/index.d.ts +0 -9
- package/dist/react/skf-alert/index.js +0 -17
- package/dist/react/skf-button/index.d.ts +0 -9
- package/dist/react/skf-button/index.js +0 -17
- package/dist/react/skf-card/index.d.ts +0 -3
- package/dist/react/skf-card/index.js +0 -13
- package/dist/react/skf-checkbox/index.d.ts +0 -9
- package/dist/react/skf-checkbox/index.js +0 -17
- package/dist/react/skf-collapse/index.d.ts +0 -9
- package/dist/react/skf-collapse/index.js +0 -17
- package/dist/react/skf-dialog/index.d.ts +0 -15
- package/dist/react/skf-dialog/index.js +0 -19
- package/dist/react/skf-divider/index.d.ts +0 -3
- package/dist/react/skf-divider/index.js +0 -13
- package/dist/react/skf-heading/index.d.ts +0 -3
- package/dist/react/skf-heading/index.js +0 -13
- package/dist/react/skf-icon/index.d.ts +0 -3
- package/dist/react/skf-icon/index.js +0 -13
- package/dist/react/skf-input/index.d.ts +0 -12
- package/dist/react/skf-input/index.js +0 -18
- package/dist/react/skf-link/index.d.ts +0 -3
- package/dist/react/skf-link/index.js +0 -13
- package/dist/react/skf-loader/index.d.ts +0 -3
- package/dist/react/skf-loader/index.js +0 -13
- package/dist/react/skf-logo/index.d.ts +0 -3
- package/dist/react/skf-logo/index.js +0 -13
- package/dist/react/skf-menu/index.d.ts +0 -12
- package/dist/react/skf-menu/index.js +0 -18
- package/dist/react/skf-menu-item/index.d.ts +0 -27
- package/dist/react/skf-menu-item/index.js +0 -23
- package/dist/react/skf-popover/index.d.ts +0 -12
- package/dist/react/skf-popover/index.js +0 -18
- package/dist/react/skf-progress/index.d.ts +0 -3
- package/dist/react/skf-progress/index.js +0 -13
- package/dist/react/skf-radio/index.d.ts +0 -9
- package/dist/react/skf-radio/index.js +0 -17
- package/dist/react/skf-select/index.d.ts +0 -21
- package/dist/react/skf-select/index.js +0 -21
- package/dist/react/skf-select-option/index.d.ts +0 -9
- package/dist/react/skf-select-option/index.js +0 -17
- package/dist/react/skf-select-option-group/index.d.ts +0 -3
- package/dist/react/skf-select-option-group/index.js +0 -13
- package/dist/react/skf-stepper/index.d.ts +0 -9
- package/dist/react/skf-stepper/index.js +0 -17
- package/dist/react/skf-stepper-item/index.d.ts +0 -9
- package/dist/react/skf-stepper-item/index.js +0 -17
- package/dist/react/skf-switch/index.d.ts +0 -3
- package/dist/react/skf-switch/index.js +0 -13
- package/dist/react/skf-tab/index.d.ts +0 -12
- package/dist/react/skf-tab/index.js +0 -18
- package/dist/react/skf-tab-group/index.d.ts +0 -3
- package/dist/react/skf-tab-group/index.js +0 -13
- package/dist/react/skf-tab-panel/index.d.ts +0 -3
- package/dist/react/skf-tab-panel/index.js +0 -13
- package/dist/react/skf-tag/index.d.ts +0 -3
- package/dist/react/skf-tag/index.js +0 -13
- package/dist/react/skf-textarea/index.d.ts +0 -12
- package/dist/react/skf-textarea/index.js +0 -18
- package/dist/react/skf-toast/index.d.ts +0 -3
- package/dist/react/skf-toast/index.js +0 -13
- package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
- package/dist/react/skf-toast-wrapper/index.js +0 -13
- package/dist/react/skf-tooltip/index.d.ts +0 -12
- package/dist/react/skf-tooltip/index.js +0 -18
- /package/dist/components/{menu-item/menu-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → breadcrumb/breadcrumb.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
- /package/dist/components/{tab-group/tab-group.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
- /package/dist/components/{tab-panel/tab-panel.styles.d.ts → drawer/drawer.styles.d.ts} +0 -0
- /package/dist/components/{tab/tab.styles.d.ts → header/header.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
- /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.js +0 -0
- /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
- /package/dist/components/{tab → tabs}/tab.js +0 -0
- /package/dist/components/{tab → tabs}/tab.styles.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,24 +1,35 @@
|
|
1
|
-
import
|
1
|
+
import "../icon/icon.js";
|
2
|
+
import { FormBase as p } from "../../internal/components/formBase.js";
|
2
3
|
import { watch as h } from "../../internal/helpers/watch.js";
|
3
4
|
import { Asterisk as v } from "../../internal/templates/asterisk.js";
|
4
|
-
import m from "../../styles/component.styles.js";
|
5
|
-
import { html as
|
6
|
-
import { property as r, state as
|
7
|
-
import { ifDefined as
|
8
|
-
import
|
9
|
-
var
|
10
|
-
for (var l = a > 1 ? void 0 : a ?
|
11
|
-
(
|
12
|
-
return a && l &&
|
5
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
6
|
+
import { html as c, nothing as f } from "lit";
|
7
|
+
import { property as r, state as y, query as g } from "lit/decorators.js";
|
8
|
+
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
9
|
+
import { styles as b } from "./checkbox.styles.js";
|
10
|
+
var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (u, t, s, a) => {
|
11
|
+
for (var l = a > 1 ? void 0 : a ? $(t, s) : t, n = u.length - 1, o; n >= 0; n--)
|
12
|
+
(o = u[n]) && (l = (a ? o(t, s, l) : o(l)) || l);
|
13
|
+
return a && l && k(t, s, l), l;
|
13
14
|
};
|
14
|
-
const d = class d extends
|
15
|
+
const d = class d extends p {
|
15
16
|
constructor() {
|
16
|
-
super(...arguments), this._initiallyChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (
|
17
|
-
|
18
|
-
}, this._renderIcon = (
|
19
|
-
<skf-icon color="inverse" name=${
|
17
|
+
super(...arguments), this._initiallyChecked = !1, this.debug = !1, this.customInvalid = !1, this.indeterminate = !1, this.showValid = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (t) => {
|
18
|
+
t.stopPropagation(), this.checked = this._initiallyChecked, this.$input && (this.$input.checked = !!this._initiallyChecked), this.setFormValue(this.checked ? this.value : null);
|
19
|
+
}, this._renderIcon = (t) => c`
|
20
|
+
<skf-icon color="inverse" name=${t} size=${this.size === "sm" ? "sm" : "md"}></skf-icon>
|
20
21
|
`;
|
21
22
|
}
|
23
|
+
get checked() {
|
24
|
+
var t;
|
25
|
+
return ((t = this.$input) == null ? void 0 : t.checked) ?? !1;
|
26
|
+
}
|
27
|
+
set checked(t) {
|
28
|
+
this.setAttribute("checked", String(!!t)), this.$input && (this.$input.checked = !!t);
|
29
|
+
}
|
30
|
+
handleCheckedChange() {
|
31
|
+
this.setFormValue(this.checked ? this.value : null), this._validateInput();
|
32
|
+
}
|
22
33
|
handleInvalidChange() {
|
23
34
|
this._invalid ? (this.setAttribute("invalid", ""), this.showValid && this.removeAttribute("valid"), this.checkValidity()) : (this.removeAttribute("invalid"), !this.pristine && this.showValid && this.setAttribute("valid", "true"));
|
24
35
|
}
|
@@ -36,101 +47,104 @@ const d = class d extends c {
|
|
36
47
|
this.setValidity({}), this._validateInput();
|
37
48
|
}
|
38
49
|
firstUpdated() {
|
39
|
-
var
|
40
|
-
(
|
50
|
+
var t;
|
51
|
+
(t = this.$input) == null || t.addEventListener("change", (s) => {
|
41
52
|
var a;
|
42
|
-
s.stopPropagation(), this.pristine = !1, this.checked = (a = this.$input) == null ? void 0 : a.checked, this._validateInput(), this.checked ? (this.indeterminate = !1, this.setFormValue(this.value)) : this.setFormValue(null), this.emitEvent("change");
|
53
|
+
s.stopPropagation(), this.pristine = !1, this.checked = ((a = this.$input) == null ? void 0 : a.checked) ?? !1, this._validateInput(), this.checked ? (this.indeterminate = !1, this.setFormValue(this.value)) : this.setFormValue(null), this.emitEvent("change");
|
43
54
|
}), this.addEventListener("invalid", (s) => {
|
44
55
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
|
45
56
|
}), this._initiallyChecked = this.checked, this.addEventListener("reset", this._resetValue), this._validateInput();
|
46
57
|
}
|
47
58
|
/** @internal */
|
48
59
|
_validateInput() {
|
49
|
-
var
|
60
|
+
var t;
|
50
61
|
if (this._invalid = !1, this.customInvalid)
|
51
62
|
this.setValidity({ customError: !0 }, "Custom error"), this._invalid = !0;
|
52
63
|
else if (this.required && !this.checked) {
|
53
64
|
this.pristine || (this._invalid = !0);
|
54
65
|
const s = this.hasAttribute("data-valuemissing") ? this.getAttribute("data-valuemissing") : (
|
55
66
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
56
|
-
((
|
67
|
+
((t = this.$input) == null ? void 0 : t.validationMessage) || "Please check this box if you want to proceed"
|
57
68
|
);
|
58
69
|
this.setValidity({ valueMissing: !0 }, String(s));
|
59
70
|
} else
|
60
71
|
this.setValidity({});
|
61
72
|
}
|
62
73
|
render() {
|
63
|
-
return
|
74
|
+
return c`
|
64
75
|
<label id="root">
|
65
76
|
<input
|
66
77
|
?checked=${this.checked}
|
67
78
|
?disabled=${this.disabled}
|
68
79
|
?required=${this.required}
|
69
|
-
.indeterminate=${this.indeterminate
|
80
|
+
.indeterminate=${this.indeterminate}
|
70
81
|
aria-invalid=${!!this._invalid}
|
71
|
-
name=${
|
82
|
+
name=${_(this.name)}
|
72
83
|
type="checkbox"
|
73
84
|
value=${this.value}
|
74
85
|
/>
|
75
86
|
${this._renderIcon("check")} ${this._renderIcon("removeMinus")}
|
76
87
|
<div id="label">
|
77
88
|
<slot>${this.label}</slot>
|
78
|
-
${this.required ? v(this.requiredLabel) :
|
89
|
+
${this.required ? v(this.requiredLabel) : f}
|
79
90
|
</div>
|
80
91
|
</label>
|
81
92
|
`;
|
82
93
|
}
|
83
94
|
};
|
84
|
-
d.styles = [m,
|
85
|
-
let
|
86
|
-
|
95
|
+
d.styles = [m, b];
|
96
|
+
let e = d;
|
97
|
+
i([
|
87
98
|
r({ type: Boolean })
|
88
|
-
],
|
89
|
-
|
99
|
+
], e.prototype, "debug", 2);
|
100
|
+
i([
|
90
101
|
r({ type: Boolean, reflect: !0 })
|
91
|
-
],
|
92
|
-
|
102
|
+
], e.prototype, "checked", 1);
|
103
|
+
i([
|
93
104
|
r({ type: Boolean, attribute: "custom-invalid", reflect: !0 })
|
94
|
-
],
|
95
|
-
|
105
|
+
], e.prototype, "customInvalid", 2);
|
106
|
+
i([
|
96
107
|
r({ type: Boolean, reflect: !0 })
|
97
|
-
],
|
98
|
-
|
108
|
+
], e.prototype, "indeterminate", 2);
|
109
|
+
i([
|
99
110
|
r()
|
100
|
-
],
|
101
|
-
|
111
|
+
], e.prototype, "label", 2);
|
112
|
+
i([
|
102
113
|
r()
|
103
|
-
],
|
104
|
-
|
114
|
+
], e.prototype, "name", 2);
|
115
|
+
i([
|
105
116
|
r({ attribute: "required-label" })
|
106
|
-
],
|
107
|
-
|
117
|
+
], e.prototype, "requiredLabel", 2);
|
118
|
+
i([
|
108
119
|
r({ reflect: !0 })
|
109
|
-
],
|
110
|
-
|
120
|
+
], e.prototype, "severity", 2);
|
121
|
+
i([
|
111
122
|
r({ type: Boolean, attribute: "show-valid" })
|
112
|
-
],
|
113
|
-
|
123
|
+
], e.prototype, "showValid", 2);
|
124
|
+
i([
|
114
125
|
r({ reflect: !0 })
|
115
|
-
],
|
116
|
-
|
126
|
+
], e.prototype, "size", 2);
|
127
|
+
i([
|
117
128
|
r()
|
118
|
-
],
|
119
|
-
|
120
|
-
|
121
|
-
],
|
122
|
-
|
123
|
-
|
124
|
-
],
|
125
|
-
|
129
|
+
], e.prototype, "value", 2);
|
130
|
+
i([
|
131
|
+
y()
|
132
|
+
], e.prototype, "_invalid", 2);
|
133
|
+
i([
|
134
|
+
g("input")
|
135
|
+
], e.prototype, "$input", 2);
|
136
|
+
i([
|
137
|
+
h("checked", { afterUpdate: !0 })
|
138
|
+
], e.prototype, "handleCheckedChange", 1);
|
139
|
+
i([
|
126
140
|
h("_invalid")
|
127
|
-
],
|
128
|
-
|
141
|
+
], e.prototype, "handleInvalidChange", 1);
|
142
|
+
i([
|
129
143
|
h("_invalid", { afterUpdate: !0 })
|
130
|
-
],
|
131
|
-
|
144
|
+
], e.prototype, "handleDebugInvalid", 1);
|
145
|
+
i([
|
132
146
|
h("customInvalid")
|
133
|
-
],
|
147
|
+
], e.prototype, "handleCustomInvalidChange", 1);
|
134
148
|
export {
|
135
|
-
|
149
|
+
e as SkfCheckbox
|
136
150
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult[];
|
@@ -65,10 +65,6 @@ const i = [
|
|
65
65
|
--_skf-checkbox-border-color: var(--skf-severity-fg-color-success);
|
66
66
|
}
|
67
67
|
|
68
|
-
:host([severity='alert']:not([invalid], [valid])) & {
|
69
|
-
--_skf-checkbox-border-color: var(--skf-severity-fg-color-alert);
|
70
|
-
}
|
71
|
-
|
72
68
|
:host([severity='info']:not([invalid], [valid])) & {
|
73
69
|
--_skf-checkbox-border-color: var(--skf-severity-fg-color-info);
|
74
70
|
}
|
@@ -110,5 +106,5 @@ const i = [
|
|
110
106
|
`
|
111
107
|
];
|
112
108
|
export {
|
113
|
-
i as
|
109
|
+
i as styles
|
114
110
|
};
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
|
+
import { Temporal } from '@js-temporal/polyfill';
|
3
|
+
import { type CSSResultGroup } from 'lit';
|
4
|
+
interface DateParts {
|
5
|
+
year?: number;
|
6
|
+
month?: number;
|
7
|
+
day?: number;
|
8
|
+
}
|
9
|
+
/**
|
10
|
+
* @tagname skf-datepicker-calendar
|
11
|
+
*/
|
12
|
+
export declare class SkfDatepickerCalendar extends SkfElement {
|
13
|
+
static styles: CSSResultGroup;
|
14
|
+
/** @internal */
|
15
|
+
_secondCalendarOffset: number;
|
16
|
+
/** @internal calendar month to display */
|
17
|
+
date: Date;
|
18
|
+
eventid: string;
|
19
|
+
firstDayOfWeek: number;
|
20
|
+
/**
|
21
|
+
* A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.
|
22
|
+
*/
|
23
|
+
invalidDates?: string;
|
24
|
+
locale: string;
|
25
|
+
range: boolean;
|
26
|
+
/**
|
27
|
+
* Earliest selectable date. (yyyy-mm-dd format)
|
28
|
+
*/
|
29
|
+
selectableFrom?: string;
|
30
|
+
/**
|
31
|
+
* Latest selectable date. (yyyy-mm-dd format)
|
32
|
+
*/
|
33
|
+
selectableTo?: string;
|
34
|
+
selectedDate?: Date;
|
35
|
+
selectedDateRange: {
|
36
|
+
start: Date | null;
|
37
|
+
end: Date | null;
|
38
|
+
};
|
39
|
+
/** @internal */
|
40
|
+
_numberOfDays: number;
|
41
|
+
/** @internal */
|
42
|
+
_numberOfDaysLastMonth: number;
|
43
|
+
firstUpdated(): void;
|
44
|
+
_listenToKeyboard: () => {
|
45
|
+
start: () => void;
|
46
|
+
stop: () => void;
|
47
|
+
};
|
48
|
+
_handleKeyDown: (e: KeyboardEvent) => void;
|
49
|
+
/** For single select, the selected date */
|
50
|
+
attributeChangedCallback(name: string, oldVal: unknown, newVal: unknown): void;
|
51
|
+
/** @internal */
|
52
|
+
handleDateChange(): void;
|
53
|
+
/** @internal */
|
54
|
+
_createDate({ year, month, day }: DateParts, useTemporalApi: true): Temporal.PlainDate;
|
55
|
+
_createDate({ year, month, day }: DateParts, useTemporalApi?: false): Date;
|
56
|
+
/** @internal Converts a new Date object to PlainDate type. If no argument sent, uses 'this.date' */
|
57
|
+
_plainDate(date?: Date | null): Temporal.PlainDate | null;
|
58
|
+
/** @internal Check if a day is between two dates */
|
59
|
+
_isDateBetween(dateToCheck: Temporal.PlainDate, startDate?: Temporal.PlainDate, endDate?: Temporal.PlainDate): boolean;
|
60
|
+
render(): import("lit").TemplateResult<1>;
|
61
|
+
/** @internal */
|
62
|
+
private returnDayClasses;
|
63
|
+
/** @internal */
|
64
|
+
private handleSelectDay;
|
65
|
+
/** @internal */
|
66
|
+
private getCalendarPreMonthDays;
|
67
|
+
/** @internal */
|
68
|
+
private getCalendarRemaningDays;
|
69
|
+
/** @internal */
|
70
|
+
private calendarMonthStartsOn;
|
71
|
+
/** @internal */
|
72
|
+
private getCalendarStartDay;
|
73
|
+
dateSelectable: (dateString: string) => {
|
74
|
+
matchesInvalidDates: boolean | undefined;
|
75
|
+
dateWithinRange: boolean;
|
76
|
+
};
|
77
|
+
/** @internal */
|
78
|
+
private getCalendarHead;
|
79
|
+
}
|
80
|
+
export {};
|