@skf-design-system/ui-components 1.0.1-beta.1 → 1.0.2-beta.1
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 +13 -26
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +87 -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 +12 -13
- 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 +6 -10
- package/dist/components/alert/alert.component.js +15 -16
- package/dist/components/alert/alert.styles.js +0 -5
- package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
- package/dist/components/button/button.component.d.ts +13 -10
- package/dist/components/button/button.component.js +83 -76
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +18 -30
- package/dist/components/card/card.styles.js +25 -28
- package/dist/components/checkbox/checkbox.component.d.ts +16 -14
- package/dist/components/checkbox/checkbox.component.js +5 -5
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/date-picker/datepicker.calendar.component.d.ts +5 -0
- package/dist/components/date-picker/datepicker.calendar.component.js +128 -95
- package/dist/components/date-picker/datepicker.calendar.styles.js +35 -25
- package/dist/components/date-picker/datepicker.component.d.ts +5 -0
- package/dist/components/date-picker/datepicker.component.js +117 -97
- package/dist/components/date-picker/datepicker.helpers.d.ts +3 -2
- package/dist/components/date-picker/datepicker.helpers.js +46 -39
- package/dist/components/date-picker/datepicker.styles.js +14 -26
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +14 -5
- package/dist/components/date-picker-input/datepicker-input.component.js +264 -219
- package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +36 -2
- package/dist/components/date-picker-input/datepicker-input.helpers.js +25 -23
- package/dist/components/date-picker-input/datepicker-input.styles.js +6 -10
- package/dist/components/dialog/dialog.component.d.ts +20 -29
- package/dist/components/dialog/dialog.component.js +85 -75
- 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 +3 -11
- package/dist/components/heading/heading.component.js +24 -23
- package/dist/components/heading/heading.styles.d.ts +1 -2
- package/dist/components/heading/heading.styles.js +1 -1
- package/dist/components/icon/icon.component.d.ts +11 -17
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +30 -31
- package/dist/components/input/input.component.js +138 -125
- 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 +4 -5
- package/dist/components/logo/logo.component.js +1 -1
- 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/menu.component.d.ts +10 -8
- package/dist/components/menu/menu.component.js +8 -10
- 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.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/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- package/dist/components/progress/progress.styles.js +40 -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/select-option-group.style.d.ts +1 -0
- package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
- package/dist/components/{select-option → select}/select-option.component.js +15 -15
- 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 +16 -15
- package/dist/components/select/select.component.js +19 -19
- package/dist/components/select/select.controllers.d.ts +21 -10
- package/dist/components/select/select.controllers.js +31 -23
- package/dist/components/select/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
- 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.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/tab/tab.component.js +1 -1
- package/dist/components/tab-group/tab-group.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tag/tag.component.d.ts +14 -16
- package/dist/components/tag/tag.component.js +36 -39
- 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.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -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 +6 -5
- package/dist/components/toast/toast.component.js +15 -15
- package/dist/components/toast/toast.singleton.d.ts +4 -4
- package/dist/components/toast/toast.singleton.js +12 -12
- package/dist/components/tooltip/tooltip.component.d.ts +7 -7
- package/dist/components/tooltip/tooltip.component.js +16 -11
- package/dist/custom-elements.json +2718 -2073
- package/dist/index.d.ts +16 -6
- package/dist/index.js +103 -75
- 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/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 -7
- package/dist/internal/controllers/popover.controller.js +9 -14
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/helpers/utilityTypes.d.ts +1 -1
- package/dist/internal/helpers/uuid.d.ts +15 -0
- package/dist/internal/helpers/uuid.js +14 -0
- 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 +1 -1
- package/dist/styles/form-field.styles.js +11 -6
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +673 -1310
- package/dist/types/vue/index.d.ts +456 -319
- package/dist/vscode.html-custom-data.json +402 -1080
- package/dist/web-types.json +986 -767
- package/package.json +44 -55
- 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/menu-item/menu-item.component.d.ts +0 -25
- package/dist/components/select-option/select-option.controllers.d.ts +0 -9
- package/dist/internal/constants/heading.d.ts +0 -2
- package/dist/react/index.d.ts +0 -36
- package/dist/react/index.js +0 -36
- 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-datepicker/index.d.ts +0 -12
- package/dist/react/skf-datepicker/index.js +0 -18
- 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/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.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 → drawer/drawer.styles.d.ts} +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → header/header.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{stepper-item/stepper-item.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/{toast-wrapper/toast-wrapper.styles.d.ts → nav/nav-item.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.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.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/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.js +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
@@ -0,0 +1,39 @@
|
|
1
|
+
import { css as t } from "lit";
|
2
|
+
const s = t`
|
3
|
+
@layer components {
|
4
|
+
skf-link::part(root) {
|
5
|
+
block-size: var(--skf-header-height);
|
6
|
+
display: flex;
|
7
|
+
padding-inline: var(--skf-spacing-100);
|
8
|
+
position: relative;
|
9
|
+
}
|
10
|
+
|
11
|
+
skf-link::part(root)::after {
|
12
|
+
content: '';
|
13
|
+
position: absolute;
|
14
|
+
transition: translate calc(var(--skf-motion-duration-fast) * 1ms)
|
15
|
+
var(--skf-motion-easing-ease-in);
|
16
|
+
}
|
17
|
+
|
18
|
+
skf-link::part(root):hover::after {
|
19
|
+
--_skf-nav-link-translate: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
:host-context(skf-nav:not([vertical])) skf-link::part(root)::after {
|
23
|
+
border-bottom: var(--skf-size-4) solid var(--skf-border-color-inverse);
|
24
|
+
inset-block-end: 0;
|
25
|
+
inset-inline: 0;
|
26
|
+
translate: 0 var(--_skf-nav-link-translate, 100%);
|
27
|
+
}
|
28
|
+
|
29
|
+
:host-context(skf-nav[vertical]) skf-link::part(root)::after {
|
30
|
+
border-left: var(--skf-size-4) solid var(--skf-border-color-inverse);
|
31
|
+
inset-block: 0;
|
32
|
+
inset-inline-start: 0;
|
33
|
+
translate: var(--_skf-nav-link-translate, -100%) 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
`;
|
37
|
+
export {
|
38
|
+
s as styles
|
39
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
5
|
+
*
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
7
|
+
*
|
8
|
+
* @slot - The component's main content
|
9
|
+
*
|
10
|
+
* @tagname skf-nav
|
11
|
+
*/
|
12
|
+
export declare class SkfNav extends SkfElement {
|
13
|
+
static styles: CSSResultGroup;
|
14
|
+
vertical: boolean;
|
15
|
+
connectedCallback(): void;
|
16
|
+
render(): import("lit").TemplateResult<1>;
|
17
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { SkfElement as s } from "../../internal/components/skf-element.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
3
|
+
import { html as p } from "lit";
|
4
|
+
import { property as c } from "lit/decorators.js";
|
5
|
+
import { ifDefined as f } from "lit/directives/if-defined.js";
|
6
|
+
import { styles as u } from "./nav.styles.js";
|
7
|
+
var v = Object.defineProperty, d = (i, a, l, h) => {
|
8
|
+
for (var e = void 0, r = i.length - 1, n; r >= 0; r--)
|
9
|
+
(n = i[r]) && (e = n(a, l, e) || e);
|
10
|
+
return e && v(a, l, e), e;
|
11
|
+
};
|
12
|
+
const o = class o extends s {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments), this.vertical = !1;
|
15
|
+
}
|
16
|
+
connectedCallback() {
|
17
|
+
super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "nav";
|
18
|
+
}
|
19
|
+
render() {
|
20
|
+
return p`
|
21
|
+
<ul aria-orientation=${f(this.vertical ? "vertical" : void 0)} role="menubar">
|
22
|
+
<slot></slot>
|
23
|
+
</ul>
|
24
|
+
`;
|
25
|
+
}
|
26
|
+
};
|
27
|
+
o.styles = [m, u];
|
28
|
+
let t = o;
|
29
|
+
d([
|
30
|
+
c({ type: Boolean, reflect: !0 })
|
31
|
+
], t.prototype, "vertical");
|
32
|
+
export {
|
33
|
+
t as SkfNav
|
34
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,16 +1,18 @@
|
|
1
1
|
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
3
3
|
/**
|
4
|
-
* The
|
4
|
+
* The most appropriate ARIA role is dialog. Even though it's light-dismissible, the presence of an interactive element (the link) suggests it functions more like a dialog presenting options or actions. Since it is light-dismissible and not truly modal (doesn't prevent interaction with the rest of the page while open), you should also set aria-modal="false" to accurately reflect its behavior. Don't forget to include a label with aria-labelledby (pointing to a visible label) or aria-label if a visible label isn't present.
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
|
5
8
|
*
|
6
|
-
*
|
9
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
|
7
10
|
*
|
8
|
-
* @
|
9
|
-
* @
|
10
|
-
* @property {string} [anchor] - The id of the element the menu will be anchored to
|
11
|
+
* @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the popover
|
12
|
+
* @attribute {string} anchor - The id of the element the menu will be anchored to
|
11
13
|
*
|
12
|
-
* @event
|
13
|
-
* @event
|
14
|
+
* @event {CustomEvent} skf-opened - Fired when the menu is opened
|
15
|
+
* @event {CustomEvent} skf-closed - Fired when the menu is closed
|
14
16
|
*
|
15
17
|
* @slot - The popover content
|
16
18
|
*
|
@@ -23,7 +25,8 @@ export declare class SkfPopover extends SkfPopoverBase {
|
|
23
25
|
/** If true, hides the arrow */
|
24
26
|
hideArrow: boolean;
|
25
27
|
constructor();
|
28
|
+
/** @internal */
|
26
29
|
hideArrowChanged(): void;
|
30
|
+
/** @internal */
|
27
31
|
addEventListeners($element: HTMLElement | Element): void;
|
28
|
-
removeEventListeners($element: HTMLElement | Element): void;
|
29
32
|
}
|
@@ -1,37 +1,35 @@
|
|
1
1
|
import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
-
import { watch as
|
3
|
-
import { property as
|
4
|
-
import { styles as
|
5
|
-
var
|
6
|
-
for (var
|
7
|
-
(p =
|
8
|
-
return
|
2
|
+
import { watch as f } from "../../internal/helpers/watch.js";
|
3
|
+
import { property as d } from "lit/decorators.js";
|
4
|
+
import { styles as w } from "./popover.styles.js";
|
5
|
+
var c = Object.defineProperty, m = Object.getOwnPropertyDescriptor, a = (l, r, o, s) => {
|
6
|
+
for (var t = s > 1 ? void 0 : s ? m(r, o) : r, i = l.length - 1, p; i >= 0; i--)
|
7
|
+
(p = l[i]) && (t = (s ? p(r, o, t) : p(t)) || t);
|
8
|
+
return s && t && c(r, o, t), t;
|
9
9
|
};
|
10
|
-
const
|
10
|
+
const n = class n extends h {
|
11
11
|
constructor() {
|
12
|
-
super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", h.classMap = { popover: !0 };
|
12
|
+
super(), this.offset = 8, this.hideArrow = !1, this.ariaModal = "false", this.arrow = !this.hideArrow, this.placement = "bottom-start", this.role = "dialog", this.triggerEvent = "click", this.variant = "popup", h.classMap = { popover: !0 };
|
13
13
|
}
|
14
14
|
hideArrowChanged() {
|
15
15
|
this.arrow = !this.hideArrow;
|
16
16
|
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
removeEventListeners(e) {
|
21
|
-
e.removeEventListener("mouseenter", this.open);
|
17
|
+
/** @internal */
|
18
|
+
addEventListeners(r) {
|
19
|
+
r.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
|
22
20
|
}
|
23
21
|
};
|
24
|
-
|
25
|
-
let
|
26
|
-
|
27
|
-
|
28
|
-
],
|
29
|
-
|
30
|
-
|
31
|
-
],
|
32
|
-
|
33
|
-
|
34
|
-
],
|
22
|
+
n.styles = [h.styles, w];
|
23
|
+
let e = n;
|
24
|
+
a([
|
25
|
+
d({ type: Number })
|
26
|
+
], e.prototype, "offset", 2);
|
27
|
+
a([
|
28
|
+
d({ type: Boolean })
|
29
|
+
], e.prototype, "hideArrow", 2);
|
30
|
+
a([
|
31
|
+
f("hideArrow")
|
32
|
+
], e.prototype, "hideArrowChanged", 1);
|
35
33
|
export {
|
36
|
-
|
34
|
+
e as SkfPopover
|
37
35
|
};
|
@@ -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,6 @@ 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
21
|
render(): import("lit").TemplateResult<1>;
|
22
22
|
}
|
@@ -1,49 +1,43 @@
|
|
1
|
-
var
|
1
|
+
var u = (t) => {
|
2
2
|
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var
|
4
|
+
var d = (t, e, r) => e.has(t) || u("Cannot " + r);
|
5
|
+
var h = (t, e, r) => (d(t, e, "read from private field"), r ? r.call(t) : e.get(t)), f = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), v = (t, e, r, l) => (d(t, e, "write to private field"), l ? l.call(t, r) : e.set(t, r), r);
|
6
6
|
import { SkfElement as y } from "../../internal/components/skf-element.js";
|
7
|
-
import
|
8
|
-
import { html as
|
9
|
-
import { property as
|
10
|
-
import {
|
11
|
-
|
12
|
-
var
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}, o;
|
7
|
+
import { componentStyles as b } from "../../styles/component.styles.js";
|
8
|
+
import { html as x } from "lit";
|
9
|
+
import { property as n } from "lit/decorators.js";
|
10
|
+
import { styles as C } from "./progress.styles.js";
|
11
|
+
var _ = Object.defineProperty, m = (t, e, r, l) => {
|
12
|
+
for (var s = void 0, p = t.length - 1, c; p >= 0; p--)
|
13
|
+
(c = t[p]) && (s = c(e, r, s) || s);
|
14
|
+
return s && _(e, r, s), s;
|
15
|
+
}, a;
|
17
16
|
const i = class i extends y {
|
18
17
|
constructor() {
|
19
|
-
super();
|
20
|
-
|
21
|
-
this.animated = !1, this.max = 1, this.value = 0
|
18
|
+
super(...arguments);
|
19
|
+
f(this, a);
|
20
|
+
v(this, a, this.attachInternals()), this.animated = !1, this.max = 1, this.value = 0;
|
21
|
+
}
|
22
|
+
connectedCallback() {
|
23
|
+
super.connectedCallback(), h(this, a).role = "progressbar";
|
22
24
|
}
|
23
25
|
render() {
|
24
26
|
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
|
-
`;
|
27
|
+
return x`<div id="root" style="--_skf-progress-value: ${r}%"></div>`;
|
34
28
|
}
|
35
29
|
};
|
36
|
-
|
37
|
-
let
|
38
|
-
|
39
|
-
|
40
|
-
],
|
41
|
-
|
42
|
-
|
43
|
-
],
|
44
|
-
|
45
|
-
|
46
|
-
],
|
30
|
+
a = new WeakMap(), i.styles = [b, C], i.formAssociated = !0;
|
31
|
+
let o = i;
|
32
|
+
m([
|
33
|
+
n({ type: Boolean, reflect: !0 })
|
34
|
+
], o.prototype, "animated");
|
35
|
+
m([
|
36
|
+
n({ type: Number })
|
37
|
+
], o.prototype, "max");
|
38
|
+
m([
|
39
|
+
n({ type: Number })
|
40
|
+
], o.prototype, "value");
|
47
41
|
export {
|
48
|
-
|
42
|
+
o as SkfProgress
|
49
43
|
};
|
@@ -1,48 +1,53 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
2
|
+
const e = r`
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
@layer base {
|
5
|
+
#root {
|
6
|
+
background: var(--skf-bg-color-neutral-3);
|
7
|
+
block-size: var(--skf-size-8);
|
8
|
+
border-radius: 0.25rem; /* Missing token */
|
9
|
+
overflow: hidden;
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
&::after {
|
12
|
+
background-color: var(--skf-bg-color-emphasised);
|
13
|
+
block-size: inherit;
|
14
|
+
border-radius: inherit;
|
15
|
+
content: '';
|
16
|
+
display: block;
|
17
|
+
inline-size: var(--_skf-progress-value, auto);
|
18
|
+
transition: inline-size calc(var(--skf-motion-duration-slow) * 1ms)
|
19
|
+
cubic-bezier(0.4, 0.93, 0.71, 0.89);
|
20
|
+
}
|
20
21
|
}
|
21
22
|
}
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
24
|
+
@layer mods {
|
25
|
+
:host([animated]) {
|
26
|
+
#root::after {
|
27
|
+
animation: skf-progress-animation calc(var(--skf-motion-duration-slow) * 1ms) linear
|
28
|
+
infinite reverse;
|
29
|
+
background-image: linear-gradient(
|
30
|
+
-45deg,
|
31
|
+
rgba(255 255 255 / 20%) 25%,
|
32
|
+
transparent 25%,
|
33
|
+
transparent 50%,
|
34
|
+
rgba(255 255 255 / 20%) 50%,
|
35
|
+
rgba(255 255 255 / 20%) 75%,
|
36
|
+
transparent 75%,
|
37
|
+
transparent
|
38
|
+
);
|
39
|
+
background-size: 50px 50px;
|
40
|
+
}
|
41
|
+
}
|
37
42
|
}
|
43
|
+
}
|
38
44
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
}
|
45
|
+
@keyframes skf-progress-animation {
|
46
|
+
to {
|
47
|
+
background-position: 50px 50px;
|
43
48
|
}
|
44
49
|
}
|
45
50
|
`;
|
46
51
|
export {
|
47
|
-
|
52
|
+
e as styles
|
48
53
|
};
|
@@ -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
|
+
}
|