@skf-design-system/ui-components 0.0.1-beta.4 → 1.0.0-beta.4
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/dist/components/checkbox/checkbox.component.js +1 -1
- package/dist/components/input/input.component.js +24 -26
- package/dist/components/select/select.component.d.ts +138 -0
- package/dist/components/select/select.component.js +311 -0
- package/dist/components/select/select.controllers.d.ts +59 -0
- package/dist/components/select/select.controllers.js +169 -0
- package/dist/components/select/select.d.ts +8 -0
- package/dist/components/select/select.js +6 -0
- package/dist/components/select/select.styles.d.ts +1 -0
- package/dist/components/select/select.styles.js +116 -0
- package/dist/components/select-option/select-option.component.d.ts +77 -0
- package/dist/components/select-option/select-option.component.js +117 -0
- package/dist/components/select-option/select-option.controllers.d.ts +9 -0
- package/dist/components/select-option/select-option.d.ts +8 -0
- package/dist/components/select-option/select-option.js +6 -0
- package/dist/components/select-option/select-option.styles.d.ts +1 -0
- package/dist/components/select-option/select-option.styles.js +53 -0
- package/dist/components/select-option-group/select-option-group.component.d.ts +16 -0
- package/dist/components/select-option-group/select-option-group.component.js +31 -0
- package/dist/components/select-option-group/select-option-group.d.ts +8 -0
- package/dist/components/select-option-group/select-option-group.js +6 -0
- package/dist/components/select-option-group/select-option-group.style.d.ts +1 -0
- package/dist/components/select-option-group/select-option-group.style.js +18 -0
- package/dist/components/tag/tag.component.d.ts +18 -2
- package/dist/components/tag/tag.component.js +69 -32
- package/dist/components/tag/tag.styles.js +0 -4
- package/dist/custom-elements.json +1279 -624
- package/dist/index.d.ts +3 -0
- package/dist/index.js +39 -30
- package/dist/internal/components/formBase.d.ts +18 -1
- package/dist/internal/components/formBase.js +25 -13
- package/dist/internal/components/skf-element.d.ts +4 -4
- package/dist/internal/components/skf-element.js +15 -19
- package/dist/internal/helpers/array.d.ts +4 -0
- package/dist/internal/helpers/findMatchingTags.d.ts +2 -0
- package/dist/internal/helpers/findMatchingTags.js +12 -0
- package/dist/internal/helpers/hintSeverity.d.ts +2 -0
- package/dist/internal/helpers/hintSeverity.js +6 -0
- package/dist/internal/helpers/raiseError.d.ts +28 -0
- package/dist/internal/helpers/raiseError.js +29 -0
- package/dist/internal/storybook/shadowRootTraverser.d.ts +2 -0
- package/dist/react/index.d.ts +6 -3
- package/dist/react/index.js +6 -3
- package/dist/react/skf-select/index.d.ts +21 -0
- package/dist/react/skf-select/index.js +21 -0
- package/dist/react/skf-select-option/index.d.ts +9 -0
- package/dist/react/skf-select-option/index.js +17 -0
- package/dist/react/skf-select-option-group/index.d.ts +3 -0
- package/dist/react/skf-select-option-group/index.js +13 -0
- package/dist/styles/form-field.styles.js +6 -6
- package/dist/types/jsx/custom-element-jsx.d.ts +326 -176
- package/dist/types/vue/index.d.ts +268 -135
- package/dist/vscode.html-custom-data.json +344 -147
- package/dist/web-types.json +755 -383
- package/package.json +34 -30
package/dist/index.d.ts
CHANGED
@@ -12,6 +12,9 @@ export { default as SkfLink } from './components/link/link.js';
|
|
12
12
|
export { default as SkfLoader } from './components/loader/loader.js';
|
13
13
|
export { default as SkfLogo } from './components/logo/logo.js';
|
14
14
|
export { default as SkfRadio } from './components/radio/radio.js';
|
15
|
+
export { default as SkfOptionGroup } from './components/select-option-group/select-option-group.js';
|
16
|
+
export { default as SkfOption } from './components/select-option/select-option.js';
|
17
|
+
export { default as SkfSelect } from './components/select/select.js';
|
15
18
|
export { default as SkfSwitch } from './components/switch/switch.js';
|
16
19
|
export { default as SkfTag } from './components/tag/tag.js';
|
17
20
|
export { default as SkfTextArea } from './components/textarea/textarea.js';
|
package/dist/index.js
CHANGED
@@ -12,44 +12,53 @@ import "./components/link/link.js";
|
|
12
12
|
import "./components/loader/loader.js";
|
13
13
|
import "./components/logo/logo.js";
|
14
14
|
import "./components/radio/radio.js";
|
15
|
+
import "./components/select-option-group/select-option-group.js";
|
16
|
+
import "./components/select-option/select-option.js";
|
17
|
+
import "./components/select/select.js";
|
15
18
|
import "./components/switch/switch.js";
|
16
19
|
import "./components/tag/tag.js";
|
17
20
|
import "./components/textarea/textarea.js";
|
18
21
|
import { SkfAccordion as I } from "./components/accordion/accordion.component.js";
|
19
22
|
import { SkfAlert as h } from "./components/alert/alert.component.js";
|
20
23
|
import { SkfButton as T } from "./components/button/button.component.js";
|
21
|
-
import { SkfCard as
|
22
|
-
import { SkfCheckbox as
|
23
|
-
import { SkfCollapse as
|
24
|
-
import { SkfDivider as
|
25
|
-
import { SkfHeading as
|
26
|
-
import { SkfIcon as
|
27
|
-
import { SkfInput as
|
28
|
-
import { SkfLink as
|
29
|
-
import { SkfLoader as
|
30
|
-
import { SkfLogo as
|
31
|
-
import { SkfRadio as
|
32
|
-
import {
|
33
|
-
import {
|
34
|
-
import {
|
35
|
-
import {
|
24
|
+
import { SkfCard as v } from "./components/card/card.component.js";
|
25
|
+
import { SkfCheckbox as B } from "./components/checkbox/checkbox.component.js";
|
26
|
+
import { SkfCollapse as H } from "./components/collapse/collapse.component.js";
|
27
|
+
import { SkfDivider as j } from "./components/divider/divider.component.js";
|
28
|
+
import { SkfHeading as y } from "./components/heading/heading.component.js";
|
29
|
+
import { SkfIcon as E } from "./components/icon/icon.component.js";
|
30
|
+
import { SkfInput as J } from "./components/input/input.component.js";
|
31
|
+
import { SkfLink as M } from "./components/link/link.component.js";
|
32
|
+
import { SkfLoader as P } from "./components/loader/loader.component.js";
|
33
|
+
import { SkfLogo as U } from "./components/logo/logo.component.js";
|
34
|
+
import { SkfRadio as W } from "./components/radio/radio.component.js";
|
35
|
+
import { SkfSelectOptionGroup as Y } from "./components/select-option-group/select-option-group.component.js";
|
36
|
+
import { SkfSelectOption as _ } from "./components/select-option/select-option.component.js";
|
37
|
+
import { SkfSelect as oo } from "./components/select/select.component.js";
|
38
|
+
import { SkfSwitch as to } from "./components/switch/switch.component.js";
|
39
|
+
import { SkfTag as fo } from "./components/tag/tag.component.js";
|
40
|
+
import { SkfTextArea as eo } from "./components/textarea/textarea.component.js";
|
41
|
+
import { SkfAccordionItem as So } from "./components/accordion/accordion-item.js";
|
36
42
|
export {
|
37
43
|
I as SkfAccordion,
|
38
|
-
|
44
|
+
So as SkfAccordionItem,
|
39
45
|
h as SkfAlert,
|
40
46
|
T as SkfButton,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
47
|
+
v as SkfCard,
|
48
|
+
B as SkfCheckbox,
|
49
|
+
H as SkfCollapse,
|
50
|
+
j as SkfDivider,
|
51
|
+
y as SkfHeading,
|
52
|
+
E as SkfIcon,
|
53
|
+
J as SkfInput,
|
54
|
+
M as SkfLink,
|
55
|
+
P as SkfLoader,
|
56
|
+
U as SkfLogo,
|
57
|
+
_ as SkfOption,
|
58
|
+
Y as SkfOptionGroup,
|
59
|
+
W as SkfRadio,
|
60
|
+
oo as SkfSelect,
|
61
|
+
to as SkfSwitch,
|
62
|
+
fo as SkfTag,
|
63
|
+
eo as SkfTextArea
|
55
64
|
};
|
@@ -1,4 +1,9 @@
|
|
1
1
|
import { SkfElement } from './skf-element.js';
|
2
|
+
interface OptionsOverride {
|
3
|
+
bubbles?: boolean;
|
4
|
+
composed?: boolean;
|
5
|
+
cancelable?: boolean;
|
6
|
+
}
|
2
7
|
/**
|
3
8
|
* Then in your form component:
|
4
9
|
*
|
@@ -46,5 +51,17 @@ export declare class FormBase extends SkfElement {
|
|
46
51
|
/** emits a change event, triggers native UI popup and returns false if the form is invalid */
|
47
52
|
reportValidity(): boolean;
|
48
53
|
formDisabledCallback(disabled: boolean): void;
|
49
|
-
|
54
|
+
/**
|
55
|
+
* Dispatches a synthetic/custom event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
56
|
+
*
|
57
|
+
* Options object:
|
58
|
+
* bubbles: true: This option allows the event to bubble up through the DOM.
|
59
|
+
* composed: true: This option allows the event to pierce the shadow DOM boundary.
|
60
|
+
* cancelable: false: This option indicates that the event cannot be canceled.
|
61
|
+
*
|
62
|
+
* @param event
|
63
|
+
* @returns
|
64
|
+
*/
|
65
|
+
emitEvent(event: string, optionsOverride?: OptionsOverride): boolean;
|
50
66
|
}
|
67
|
+
export {};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { LitElement as c } from "lit";
|
2
2
|
import { property as d } from "lit/decorators.js";
|
3
3
|
import { SkfElement as u } from "./skf-element.js";
|
4
|
-
var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (
|
5
|
-
for (var
|
6
|
-
(o = n
|
7
|
-
return
|
4
|
+
var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (l, t, e, s) => {
|
5
|
+
for (var i = _(t, e), n = l.length - 1, o; n >= 0; n--)
|
6
|
+
(o = l[n]) && (i = o(t, e, i) || i);
|
7
|
+
return i && p(t, e, i), i;
|
8
8
|
};
|
9
|
-
const
|
9
|
+
const a = class a extends u {
|
10
10
|
constructor() {
|
11
11
|
super(), this._disabled = !1, this._pristine = !0, this.validationError = "", this.customErrorDisplay = !1, this.pristine = !0, this.validateOnChange = !0, this._dispatchResetEvent = () => {
|
12
12
|
this.dispatchEvent(new Event("reset", { bubbles: !0, composed: !0, cancelable: !1 }));
|
@@ -59,8 +59,8 @@ const s = class s extends u {
|
|
59
59
|
get willValidate() {
|
60
60
|
return this._internals.willValidate;
|
61
61
|
}
|
62
|
-
setValidity(t,
|
63
|
-
this._internals.setValidity(t,
|
62
|
+
setValidity(t, e, s) {
|
63
|
+
this._internals.setValidity(t, e, s);
|
64
64
|
}
|
65
65
|
setFormValue(t) {
|
66
66
|
this._internals.setFormValue(t);
|
@@ -76,14 +76,26 @@ const s = class s extends u {
|
|
76
76
|
formDisabledCallback(t) {
|
77
77
|
this.disabled = t;
|
78
78
|
}
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
/**
|
80
|
+
* Dispatches a synthetic/custom event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
|
81
|
+
*
|
82
|
+
* Options object:
|
83
|
+
* bubbles: true: This option allows the event to bubble up through the DOM.
|
84
|
+
* composed: true: This option allows the event to pierce the shadow DOM boundary.
|
85
|
+
* cancelable: false: This option indicates that the event cannot be canceled.
|
86
|
+
*
|
87
|
+
* @param event
|
88
|
+
* @returns
|
89
|
+
*/
|
90
|
+
emitEvent(t, e = {}) {
|
91
|
+
const s = { bubbles: !0, composed: !0, cancelable: !0 };
|
92
|
+
return t.startsWith("skf-") ? this.dispatchEvent(
|
93
|
+
new CustomEvent(t, { detail: null, ...s, ...e })
|
94
|
+
) : this.dispatchEvent(new Event(t, { ...s, ...e }));
|
83
95
|
}
|
84
96
|
};
|
85
|
-
|
86
|
-
let r =
|
97
|
+
a.formAssociated = !0, a.shadowRootOptions = { ...c.shadowRootOptions, delegatesFocus: !0 };
|
98
|
+
let r = a;
|
87
99
|
h([
|
88
100
|
d({ type: Boolean })
|
89
101
|
], r.prototype, "required");
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { LitElement } from 'lit';
|
1
|
+
import { CSSResult, LitElement } from 'lit';
|
2
2
|
export declare class SkfElement extends LitElement {
|
3
3
|
static define(name: string, elementConstructor?: CustomElementConstructor, options?: ElementDefinitionOptions): void;
|
4
4
|
static dependencies: Record<string, typeof SkfElement>;
|
5
5
|
constructor();
|
6
|
-
/** Custom event emitter helper function. Transmits user actions or component state change. */
|
6
|
+
/** Custom event emitter helper function. Transmits user actions or component state change. Use composed=false for event that should not pierce shadowDom. */
|
7
7
|
emit(name: string, options?: CustomEventInit): Event;
|
8
|
-
/**
|
9
|
-
|
8
|
+
/** This let's a component set styles in the light DOM. Scope css selectors with custom tag name to just target the slot. */
|
9
|
+
protected _setSlotStyles(slottedStyles: CSSResult): void;
|
10
10
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { LitElement as d } from "lit";
|
2
|
-
const
|
3
|
-
static define(e, t = this,
|
2
|
+
const s = class s extends d {
|
3
|
+
static define(e, t = this, n = {}) {
|
4
4
|
if (!customElements.get(e)) {
|
5
5
|
customElements.define(e, class extends t {
|
6
|
-
},
|
6
|
+
}, n);
|
7
7
|
return;
|
8
8
|
}
|
9
9
|
}
|
@@ -14,7 +14,7 @@ const n = class n extends d {
|
|
14
14
|
}
|
15
15
|
);
|
16
16
|
}
|
17
|
-
/** Custom event emitter helper function. Transmits user actions or component state change. */
|
17
|
+
/** Custom event emitter helper function. Transmits user actions or component state change. Use composed=false for event that should not pierce shadowDom. */
|
18
18
|
emit(e, t = {}) {
|
19
19
|
if ([
|
20
20
|
"click",
|
@@ -55,35 +55,31 @@ const n = class n extends d {
|
|
55
55
|
"progress",
|
56
56
|
"error"
|
57
57
|
].includes(e)) {
|
58
|
-
const
|
58
|
+
const u = {
|
59
59
|
bubbles: !0,
|
60
|
-
cancelable: !
|
60
|
+
cancelable: !0,
|
61
61
|
composed: !0,
|
62
62
|
...t
|
63
63
|
};
|
64
|
-
return this.dispatchEvent(new Event(e,
|
64
|
+
return this.dispatchEvent(new Event(e, u)), new Event(e, t);
|
65
65
|
}
|
66
66
|
const r = new CustomEvent(e, {
|
67
67
|
bubbles: !0,
|
68
|
-
cancelable: !
|
68
|
+
cancelable: !0,
|
69
69
|
composed: !0,
|
70
70
|
detail: {},
|
71
71
|
...t
|
72
72
|
});
|
73
73
|
return this.dispatchEvent(r), r;
|
74
74
|
}
|
75
|
-
/**
|
76
|
-
|
77
|
-
|
78
|
-
e
|
79
|
-
console.log("slot updated");
|
80
|
-
});
|
81
|
-
const o = t ? `slot[name="${t}"]` : "slot", s = this.shadowRoot.querySelector(o);
|
82
|
-
s == null || s.addEventListener("slotchange", e);
|
75
|
+
/** This let's a component set styles in the light DOM. Scope css selectors with custom tag name to just target the slot. */
|
76
|
+
_setSlotStyles(e) {
|
77
|
+
const t = new CSSStyleSheet();
|
78
|
+
t.replaceSync(e.cssText), document.adoptedStyleSheets = [...document.adoptedStyleSheets, t];
|
83
79
|
}
|
84
80
|
};
|
85
|
-
|
86
|
-
let
|
81
|
+
s.dependencies = {};
|
82
|
+
let o = s;
|
87
83
|
export {
|
88
|
-
|
84
|
+
o as SkfElement
|
89
85
|
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
function s(o, n) {
|
2
|
+
const t = [];
|
3
|
+
function a(e) {
|
4
|
+
e.nodeType === Node.ELEMENT_NODE && e.tagName.toLowerCase() === n.toLowerCase() && t.push(e), e.childNodes.forEach((r) => {
|
5
|
+
a(r);
|
6
|
+
});
|
7
|
+
}
|
8
|
+
return a(o), t;
|
9
|
+
}
|
10
|
+
export {
|
11
|
+
s as findMatchingTags
|
12
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
interface ErrorMapBase {
|
2
|
+
assert?: unknown;
|
3
|
+
type?: 'error' | 'warning' | 'info';
|
4
|
+
}
|
5
|
+
interface ErrorMapWithReason extends ErrorMapBase {
|
6
|
+
reason: keyof typeof errorMap;
|
7
|
+
replaceStrings: string[];
|
8
|
+
customMessage?: never;
|
9
|
+
}
|
10
|
+
interface ErrorMapWithCustomMessage extends ErrorMapBase {
|
11
|
+
customMessage: string;
|
12
|
+
reason?: never;
|
13
|
+
replaceStrings?: never;
|
14
|
+
}
|
15
|
+
type ErrorMap = ErrorMapWithReason | ErrorMapWithCustomMessage;
|
16
|
+
declare const errorMap: {
|
17
|
+
'no-parent': string;
|
18
|
+
'no-children': string;
|
19
|
+
'attribute-mismatch': string;
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* assert = check something exist/is truish. Also send in !this.debug to only run in debug mode.
|
23
|
+
* reason = key of error map,
|
24
|
+
* type = console warning, stopping error or info,
|
25
|
+
* replaceString = dynamic text parts
|
26
|
+
*/
|
27
|
+
export declare const raiseError: ({ assert, reason, type, replaceStrings, customMessage, }: ErrorMap) => void | never;
|
28
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
const a = {
|
2
|
+
"no-parent": "{0} tag needs to be a nested child of a skf-select tag.",
|
3
|
+
"no-children": "{0} tag needs to have {1} tags as children.",
|
4
|
+
"attribute-mismatch": "{0} tag needs to have {1} attribute set {2}."
|
5
|
+
}, f = ({
|
6
|
+
assert: n = !1,
|
7
|
+
reason: e,
|
8
|
+
type: o = "error",
|
9
|
+
replaceStrings: c,
|
10
|
+
customMessage: r
|
11
|
+
}) => {
|
12
|
+
if (n) return;
|
13
|
+
switch (o) {
|
14
|
+
case "error":
|
15
|
+
throw new Error(r ?? t(a[e], c));
|
16
|
+
case "warning":
|
17
|
+
console.warn(r ?? t(a[e]));
|
18
|
+
break;
|
19
|
+
case "info":
|
20
|
+
console.info(r ?? t(a[e]));
|
21
|
+
break;
|
22
|
+
}
|
23
|
+
function t(i, s = []) {
|
24
|
+
return s.reduce((l, d, h) => l.replace(`{${String(h)}}`, d), i);
|
25
|
+
}
|
26
|
+
};
|
27
|
+
export {
|
28
|
+
f as raiseError
|
29
|
+
};
|
@@ -5,4 +5,6 @@ type WithinShadowRootPromise = Promise<ReturnType<typeof within<typeof queries>>
|
|
5
5
|
* @see {@link https://github.com/storybookjs/testing-library/issues/24#issuecomment-1593709872|GitHub}
|
6
6
|
*/
|
7
7
|
export declare function withinShadowRoot(customElement: HTMLElement, selector: string): WithinShadowRootPromise;
|
8
|
+
export declare const getElementWithinShadowRoot: (canvasElement: HTMLElement, ...selectors: string[]) => Element;
|
9
|
+
export declare const findElementWithinShadowRoot: (canvasElement: HTMLElement, ...selectors: string[]) => Element | undefined;
|
8
10
|
export {};
|
package/dist/react/index.d.ts
CHANGED
@@ -1,17 +1,20 @@
|
|
1
|
-
export { default as SkfAccordion } from './skf-accordion/index.js';
|
2
|
-
export { default as SkfAlert } from './skf-alert/index.js';
|
3
|
-
export { default as SkfButton } from './skf-button/index.js';
|
4
1
|
export { default as SkfCard } from './skf-card/index.js';
|
2
|
+
export { default as SkfAccordion } from './skf-accordion/index.js';
|
5
3
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
6
4
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
7
5
|
export { default as SkfDivider } from './skf-divider/index.js';
|
8
6
|
export { default as SkfHeading } from './skf-heading/index.js';
|
7
|
+
export { default as SkfButton } from './skf-button/index.js';
|
8
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
9
9
|
export { default as SkfIcon } from './skf-icon/index.js';
|
10
10
|
export { default as SkfInput } from './skf-input/index.js';
|
11
11
|
export { default as SkfLink } from './skf-link/index.js';
|
12
12
|
export { default as SkfLoader } from './skf-loader/index.js';
|
13
13
|
export { default as SkfLogo } from './skf-logo/index.js';
|
14
14
|
export { default as SkfRadio } from './skf-radio/index.js';
|
15
|
+
export { default as SkfSelect } from './skf-select/index.js';
|
16
|
+
export { default as SkfSelectOption } from './skf-select-option/index.js';
|
17
|
+
export { default as SkfSelectOptionGroup } from './skf-select-option-group/index.js';
|
15
18
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
16
19
|
export { default as SkfTag } from './skf-tag/index.js';
|
17
20
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
package/dist/react/index.js
CHANGED
@@ -1,17 +1,20 @@
|
|
1
|
-
export { default as SkfAccordion } from './skf-accordion/index.js';
|
2
|
-
export { default as SkfAlert } from './skf-alert/index.js';
|
3
|
-
export { default as SkfButton } from './skf-button/index.js';
|
4
1
|
export { default as SkfCard } from './skf-card/index.js';
|
2
|
+
export { default as SkfAccordion } from './skf-accordion/index.js';
|
5
3
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
6
4
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
7
5
|
export { default as SkfDivider } from './skf-divider/index.js';
|
8
6
|
export { default as SkfHeading } from './skf-heading/index.js';
|
7
|
+
export { default as SkfButton } from './skf-button/index.js';
|
8
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
9
9
|
export { default as SkfIcon } from './skf-icon/index.js';
|
10
10
|
export { default as SkfInput } from './skf-input/index.js';
|
11
11
|
export { default as SkfLink } from './skf-link/index.js';
|
12
12
|
export { default as SkfLoader } from './skf-loader/index.js';
|
13
13
|
export { default as SkfLogo } from './skf-logo/index.js';
|
14
14
|
export { default as SkfRadio } from './skf-radio/index.js';
|
15
|
+
export { default as SkfSelect } from './skf-select/index.js';
|
16
|
+
export { default as SkfSelectOption } from './skf-select-option/index.js';
|
17
|
+
export { default as SkfSelectOptionGroup } from './skf-select-option-group/index.js';
|
15
18
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
16
19
|
export { default as SkfTag } from './skf-tag/index.js';
|
17
20
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import Component from '../../components/select/select.js';
|
2
|
+
import { type SkfSelect } from '../../components/select/select.js';
|
3
|
+
import { type EventName } from '@lit/react';
|
4
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
5
|
+
onChange: EventName<Event & {
|
6
|
+
target: SkfSelect;
|
7
|
+
}>;
|
8
|
+
onInvalid: EventName<Event & {
|
9
|
+
target: SkfSelect;
|
10
|
+
}>;
|
11
|
+
onReset: EventName<Event & {
|
12
|
+
target: SkfSelect;
|
13
|
+
}>;
|
14
|
+
onSkfSelectDropdown: EventName<Event & {
|
15
|
+
target: SkfSelect;
|
16
|
+
}>;
|
17
|
+
onSkfSelectOptionSelect: EventName<Event & {
|
18
|
+
target: SkfSelect;
|
19
|
+
}>;
|
20
|
+
}>;
|
21
|
+
export default reactWrapper;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/select/select.js';
|
4
|
+
import {} from '../../components/select/select.js';
|
5
|
+
import {} from '@lit/react';
|
6
|
+
const tagName = 'skf-select';
|
7
|
+
Component.define('skf-select');
|
8
|
+
const reactWrapper = createComponent({
|
9
|
+
tagName,
|
10
|
+
elementClass: Component,
|
11
|
+
react: React,
|
12
|
+
events: {
|
13
|
+
onChange: 'change',
|
14
|
+
onInvalid: 'invalid',
|
15
|
+
onReset: 'reset',
|
16
|
+
onSkfSelectDropdown: 'skf-select:dropdown',
|
17
|
+
onSkfSelectOptionSelect: 'skf-select-option:select',
|
18
|
+
},
|
19
|
+
displayName: 'SkfSelect',
|
20
|
+
});
|
21
|
+
export default reactWrapper;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import Component from '../../components/select-option/select-option.js';
|
2
|
+
import { type SkfSelectOption } from '../../components/select-option/select-option.js';
|
3
|
+
import { type EventName } from '@lit/react';
|
4
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
5
|
+
onSkfSelectOptionSelect: EventName<Event & {
|
6
|
+
target: SkfSelectOption;
|
7
|
+
}>;
|
8
|
+
}>;
|
9
|
+
export default reactWrapper;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/select-option/select-option.js';
|
4
|
+
import {} from '../../components/select-option/select-option.js';
|
5
|
+
import {} from '@lit/react';
|
6
|
+
const tagName = 'skf-select-option';
|
7
|
+
Component.define('skf-select-option');
|
8
|
+
const reactWrapper = createComponent({
|
9
|
+
tagName,
|
10
|
+
elementClass: Component,
|
11
|
+
react: React,
|
12
|
+
events: {
|
13
|
+
onSkfSelectOptionSelect: 'skf-select-option:select',
|
14
|
+
},
|
15
|
+
displayName: 'SkfSelectOption',
|
16
|
+
});
|
17
|
+
export default reactWrapper;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/select-option-group/select-option-group.js';
|
4
|
+
const tagName = 'skf-select-option-group';
|
5
|
+
Component.define('skf-select-option-group');
|
6
|
+
const reactWrapper = createComponent({
|
7
|
+
tagName,
|
8
|
+
elementClass: Component,
|
9
|
+
react: React,
|
10
|
+
events: {},
|
11
|
+
displayName: 'SkfSelectOptionGroup',
|
12
|
+
});
|
13
|
+
export default reactWrapper;
|
@@ -31,8 +31,8 @@ const i = e`
|
|
31
31
|
}
|
32
32
|
|
33
33
|
/**
|
34
|
-
|
35
|
-
|
34
|
+
* Wwrapper for the input-element that controls the appearance
|
35
|
+
*/
|
36
36
|
#input {
|
37
37
|
background-color: var(--_skf-field-input-bg-color, var(--skf-bg-color-neutral-1));
|
38
38
|
border: var(--skf-border-width-sm) solid
|
@@ -91,8 +91,8 @@ const i = e`
|
|
91
91
|
}
|
92
92
|
|
93
93
|
/**
|
94
|
-
|
95
|
-
|
94
|
+
* Wrapper element for handling layout of the leading and trailing content
|
95
|
+
*/
|
96
96
|
#affix {
|
97
97
|
align-items: center;
|
98
98
|
display: flex;
|
@@ -144,8 +144,8 @@ const i = e`
|
|
144
144
|
}
|
145
145
|
|
146
146
|
/**
|
147
|
-
|
148
|
-
|
147
|
+
* Action related styles
|
148
|
+
*/
|
149
149
|
#action {
|
150
150
|
display: flex;
|
151
151
|
flex-direction: column;
|