@uh-design-system/component-library 0.4.2 → 0.5.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/dist/cjs/component-library.cjs.js +2 -2
- package/dist/cjs/ds-accordion_3.cjs.entry.js +11 -11
- package/dist/cjs/ds-checkbox-group.cjs.entry.js +15 -16
- package/dist/cjs/ds-checkbox.cjs.entry.js +42 -35
- package/dist/cjs/ds-input-validity.cjs.entry.js +4 -6
- package/dist/cjs/ds-link-with-arrow.cjs.entry.js +5 -5
- package/dist/cjs/ds-link.cjs.entry.js +5 -5
- package/dist/cjs/ds-text-input.cjs.entry.js +52 -24
- package/dist/cjs/ds-visually-hidden.cjs.entry.js +2 -2
- package/dist/cjs/{index-b2bddcf4.js → index-bf84b124.js} +16 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/{linkUtils-e911e899.js → linkUtils-695da37c.js} +0 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/store-9bd20f3c.js +207 -0
- package/dist/cjs/{utils-c9113835.js → utils-2ba5e075.js} +10 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/00-foundations/icons/icons.stories.js +1 -0
- package/dist/collection/components/00-foundations/types.js +1 -0
- package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +6 -6
- package/dist/collection/components/01-base-components/ds-button/ds-button.css +6 -0
- package/dist/collection/components/01-base-components/ds-button/ds-button.js +1 -1
- package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.css +1 -1
- package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +68 -56
- package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.js +1 -0
- package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +27 -67
- package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +1 -1
- package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.js +5 -8
- package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.js +1 -0
- package/dist/collection/components/01-base-components/ds-link/ds-link.js +6 -6
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +1 -1
- package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +6 -6
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.stories.js +1 -1
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +6 -0
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +73 -27
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.js +82 -13
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.stories.js +6 -7
- package/dist/collection/components/01-base-components/ds-text-input/utils.js +1 -10
- package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/store.js +13 -0
- package/dist/collection/utils/link/linkUtils.js +0 -9
- package/dist/collection/utils/utils.js +9 -0
- package/dist/component-library/component-library.esm.js +1 -1
- package/dist/component-library/ds-accordion_3.entry.js +1 -1
- package/dist/component-library/ds-checkbox-group.entry.js +1 -1
- package/dist/component-library/ds-checkbox.entry.js +1 -1
- package/dist/component-library/ds-input-validity.entry.js +1 -1
- package/dist/component-library/ds-link-with-arrow.entry.js +1 -1
- package/dist/component-library/ds-link.entry.js +1 -1
- package/dist/component-library/ds-text-input.entry.js +1 -1
- package/dist/component-library/ds-visually-hidden.entry.js +1 -1
- package/dist/component-library/{index-50783b0c.js → index-434995e1.js} +2 -2
- package/dist/component-library/index.esm.js +1 -0
- package/dist/component-library/{linkUtils-fe63ff72.js → linkUtils-3d1b28cf.js} +1 -1
- package/dist/component-library/store-b8d17c10.js +1 -0
- package/dist/component-library/utils-5daa5bc0.js +1 -0
- package/dist/components/ds-accordion.js +6 -6
- package/dist/components/ds-button2.js +2 -2
- package/dist/components/ds-checkbox-group.js +21 -23
- package/dist/components/ds-checkbox2.js +44 -37
- package/dist/components/ds-icon2.js +11 -2
- package/dist/components/ds-input-validity2.js +4 -6
- package/dist/components/ds-link-with-arrow.js +5 -5
- package/dist/components/ds-link.js +5 -5
- package/dist/components/ds-text-input.js +58 -29
- package/dist/components/ds-visually-hidden2.js +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +15 -1
- package/dist/components/linkUtils.js +1 -10
- package/dist/components/store.js +204 -0
- package/dist/esm/component-library.js +3 -3
- package/dist/esm/ds-accordion_3.entry.js +11 -11
- package/dist/esm/ds-checkbox-group.entry.js +15 -16
- package/dist/esm/ds-checkbox.entry.js +42 -35
- package/dist/esm/ds-input-validity.entry.js +4 -6
- package/dist/esm/ds-link-with-arrow.entry.js +5 -5
- package/dist/esm/ds-link.entry.js +5 -5
- package/dist/esm/ds-text-input.entry.js +52 -24
- package/dist/esm/ds-visually-hidden.entry.js +2 -2
- package/dist/esm/{index-50783b0c.js → index-434995e1.js} +15 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/{linkUtils-fe63ff72.js → linkUtils-3d1b28cf.js} +1 -10
- package/dist/esm/loader.js +3 -3
- package/dist/esm/store-b8d17c10.js +204 -0
- package/dist/esm/{utils-b5843ae1.js → utils-5daa5bc0.js} +10 -1
- package/dist/types/components/00-foundations/types.d.ts +3 -0
- package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +14 -14
- package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +14 -16
- package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +1 -1
- package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +1 -1
- package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +17 -8
- package/dist/types/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-text-input/utils.d.ts +1 -1
- package/dist/types/components.d.ts +42 -28
- package/dist/types/index.d.ts +1 -0
- package/dist/types/store.d.ts +10 -0
- package/dist/types/utils/link/linkUtils.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +3 -2
- package/dist/component-library/utils-b5843ae1.js +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { DsEvent } from '../../00-foundations/types';
|
|
3
|
+
export interface DsCheckboxInputEvent extends DsEvent {
|
|
4
4
|
checked: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare class DsCheckbox {
|
|
7
|
+
private inputElem;
|
|
7
8
|
private labelId;
|
|
8
|
-
private
|
|
9
|
+
private inputValidityId;
|
|
9
10
|
private assistiveTextId;
|
|
10
11
|
private inheritedAttributes;
|
|
11
12
|
private initialChecked?;
|
|
12
|
-
private
|
|
13
|
+
private labelClicked;
|
|
13
14
|
el: HTMLElement;
|
|
14
15
|
internals: ElementInternals;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
checkboxId?: string;
|
|
16
|
+
dsCheckboxInput: EventEmitter<DsCheckboxInputEvent>;
|
|
17
|
+
identifier?: string;
|
|
18
18
|
checked: boolean;
|
|
19
19
|
legend?: string;
|
|
20
20
|
assistiveText?: string;
|
|
@@ -26,23 +26,23 @@ export declare class DsCheckbox {
|
|
|
26
26
|
required: boolean;
|
|
27
27
|
optional: boolean;
|
|
28
28
|
optionalText?: string;
|
|
29
|
-
ariaLabel
|
|
29
|
+
ariaLabel: string;
|
|
30
30
|
value: string;
|
|
31
|
-
validationMessage
|
|
31
|
+
validationMessage?: string;
|
|
32
32
|
private setIds;
|
|
33
|
-
private
|
|
33
|
+
private getValidationMessage;
|
|
34
34
|
private getLegendText;
|
|
35
35
|
private getCheckboxText;
|
|
36
36
|
private getAriaDescribedBy;
|
|
37
37
|
private restoreInitialState;
|
|
38
38
|
private setInitialState;
|
|
39
|
-
private emitCheckboxError;
|
|
40
39
|
formResetCallback(): void;
|
|
41
40
|
componentWillLoad(): void;
|
|
42
|
-
|
|
43
|
-
componentDidUpdate(): void;
|
|
44
|
-
handleChange: () => void;
|
|
41
|
+
handleInput: (e: Event) => void;
|
|
45
42
|
handleKeyUp: (event: KeyboardEvent) => void;
|
|
43
|
+
handleBlur: () => void;
|
|
44
|
+
handleMouseDown: () => void;
|
|
45
|
+
handleMouseUp: () => void;
|
|
46
46
|
renderCheckbox(): any;
|
|
47
47
|
renderFieldset(): any;
|
|
48
48
|
render(): any;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { DsCheckboxInputEvent } from '../ds-checkbox/ds-checkbox';
|
|
3
|
+
import { DsEvent } from '../../00-foundations/types';
|
|
4
|
+
export interface DsCheckboxGroupChangeEvent extends DsEvent {
|
|
5
5
|
checked: boolean;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
8
|
-
id: string;
|
|
7
|
+
export interface DsCheckboxGroupIndeterminateChildChangeEvent extends DsEvent {
|
|
9
8
|
indeterminate: boolean;
|
|
10
9
|
}
|
|
11
10
|
export declare class DsCheckboxGroup {
|
|
@@ -16,18 +15,17 @@ export declare class DsCheckboxGroup {
|
|
|
16
15
|
private readonly nestedId;
|
|
17
16
|
private inheritedAttributes;
|
|
18
17
|
el: HTMLElement;
|
|
19
|
-
dsCheckboxGroupChange: EventEmitter<
|
|
20
|
-
dsCheckboxGroupIndeterminateChildChange: EventEmitter<
|
|
18
|
+
dsCheckboxGroupChange: EventEmitter<DsCheckboxGroupChangeEvent>;
|
|
19
|
+
dsCheckboxGroupIndeterminateChildChange: EventEmitter<DsCheckboxGroupIndeterminateChildChangeEvent>;
|
|
21
20
|
legend?: string;
|
|
22
21
|
assistiveText?: string;
|
|
23
22
|
direction: 'horizontal' | 'vertical';
|
|
24
23
|
errorText: string;
|
|
25
24
|
text: string;
|
|
26
25
|
checked: boolean;
|
|
27
|
-
checkedChildElementCount: number;
|
|
28
26
|
disabled: boolean;
|
|
29
|
-
parentCheckedCount: number;
|
|
30
27
|
childElementsCount: number;
|
|
28
|
+
checkedChildElementCount: number;
|
|
31
29
|
isIndeterminate: boolean;
|
|
32
30
|
indeterminateChildCheckboxCount: number;
|
|
33
31
|
private elementIs;
|
|
@@ -40,14 +38,14 @@ export declare class DsCheckboxGroup {
|
|
|
40
38
|
private updateChildCheckboxes;
|
|
41
39
|
private updateChildElementsChecked;
|
|
42
40
|
setChecked(newValue: boolean): Promise<void>;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
watchCheckboxDisabledChange(newValue: boolean): void;
|
|
42
|
+
watchCheckedChange(newValue: boolean): void;
|
|
43
|
+
watchIndeterminateChange(newValue: boolean): void;
|
|
44
|
+
listenIndeterminateChildChange(event: CustomEvent<DsCheckboxGroupIndeterminateChildChangeEvent>): void;
|
|
45
|
+
watchCheckedChildElementCountChange(newValue: number, oldValue: number): void;
|
|
48
46
|
private updateCheckedChildElementCount;
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
listenCheckboxChange(event: CustomEvent<DsCheckboxInputEvent>): void;
|
|
48
|
+
listenCheckboxGroupChange(event: CustomEvent<DsCheckboxGroupChangeEvent>): void;
|
|
51
49
|
private setChildElementCount;
|
|
52
50
|
componentWillLoad(): void;
|
|
53
51
|
componentDidLoad(): void;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { DsEvent } from '../../00-foundations/types';
|
|
3
|
+
import { DsTextInputType } from './utils';
|
|
4
|
+
export type DsTextInputClearEvent = DsEvent;
|
|
2
5
|
export declare class DsTextInput {
|
|
3
6
|
private suffixButtonElement;
|
|
4
7
|
private inputElement;
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
8
|
+
private assistiveTextId;
|
|
9
|
+
private visuallyHiddenAssistiveTextId;
|
|
10
|
+
private errorTextId;
|
|
11
|
+
private successTextId;
|
|
9
12
|
private hasPrefixSlot;
|
|
10
13
|
private hasSuffixSlot;
|
|
11
14
|
el: HTMLElement;
|
|
15
|
+
internals: ElementInternals;
|
|
16
|
+
clear: EventEmitter<DsTextInputClearEvent>;
|
|
12
17
|
label?: string;
|
|
13
18
|
placeholder?: string;
|
|
14
|
-
|
|
19
|
+
identifier?: string;
|
|
15
20
|
name: string;
|
|
16
21
|
disabled?: boolean;
|
|
17
22
|
optional?: boolean;
|
|
@@ -32,7 +37,7 @@ export declare class DsTextInput {
|
|
|
32
37
|
prefixText?: string;
|
|
33
38
|
suffixText?: string;
|
|
34
39
|
icon: string;
|
|
35
|
-
type:
|
|
40
|
+
type: DsTextInputType;
|
|
36
41
|
ariaLabel: string;
|
|
37
42
|
ariaLabelledBy?: string;
|
|
38
43
|
ariaDescribedby?: string;
|
|
@@ -40,12 +45,16 @@ export declare class DsTextInput {
|
|
|
40
45
|
clearButtonVisible: boolean;
|
|
41
46
|
passwordInputVisible: boolean;
|
|
42
47
|
inputActive: boolean;
|
|
48
|
+
validationMessage?: string;
|
|
49
|
+
private setIds;
|
|
50
|
+
private getValidationMessage;
|
|
43
51
|
togglePasswordVisibility(): Promise<boolean>;
|
|
44
52
|
clearInput(): Promise<void>;
|
|
45
53
|
private getLabelText;
|
|
46
54
|
componentWillLoad(): void;
|
|
55
|
+
handleInput: (e: Event) => void;
|
|
56
|
+
handleBlur: () => void;
|
|
47
57
|
private onActionButtonClicked;
|
|
48
|
-
private renderValidityMessage;
|
|
49
58
|
private renderPrefixContent;
|
|
50
59
|
private renderSuffixContent;
|
|
51
60
|
private handleInputContainerClick;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const textInputTypes: readonly ["text", "password", "search", "loading", "tel", "email", "url", "number"];
|
|
2
|
-
export type
|
|
2
|
+
export type DsTextInputType = (typeof textInputTypes)[number];
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
8
|
+
import { DsCheckboxInputEvent } from "./components/01-base-components/ds-checkbox/ds-checkbox";
|
|
9
|
+
import { DsCheckboxGroupChangeEvent, DsCheckboxGroupIndeterminateChildChangeEvent } from "./components/01-base-components/ds-checkbox-group/ds-checkbox-group";
|
|
10
|
+
import { DsTextInputType } from "./components/01-base-components/ds-text-input/utils";
|
|
11
|
+
import { DsTextInputClearEvent } from "./components/01-base-components/ds-text-input/ds-text-input";
|
|
12
|
+
export { DsCheckboxInputEvent } from "./components/01-base-components/ds-checkbox/ds-checkbox";
|
|
13
|
+
export { DsCheckboxGroupChangeEvent, DsCheckboxGroupIndeterminateChildChangeEvent } from "./components/01-base-components/ds-checkbox-group/ds-checkbox-group";
|
|
14
|
+
export { DsTextInputType } from "./components/01-base-components/ds-text-input/utils";
|
|
15
|
+
export { DsTextInputClearEvent } from "./components/01-base-components/ds-text-input/ds-text-input";
|
|
14
16
|
export namespace Components {
|
|
15
17
|
interface DsAccordion {
|
|
16
18
|
"accordionId": string;
|
|
@@ -42,12 +44,13 @@ export namespace Components {
|
|
|
42
44
|
"variant": 'primary' | 'secondary' | 'supplementary';
|
|
43
45
|
}
|
|
44
46
|
interface DsCheckbox {
|
|
47
|
+
"ariaLabel": string;
|
|
45
48
|
"assistiveText"?: string;
|
|
46
|
-
"checkboxId"?: string;
|
|
47
49
|
"checked": boolean;
|
|
48
50
|
"disabled": boolean;
|
|
49
51
|
"errorText": string;
|
|
50
52
|
"errorsDisabled": boolean;
|
|
53
|
+
"identifier"?: string;
|
|
51
54
|
"indeterminate": boolean;
|
|
52
55
|
"legend"?: string;
|
|
53
56
|
"optional": boolean;
|
|
@@ -58,12 +61,10 @@ export namespace Components {
|
|
|
58
61
|
interface DsCheckboxGroup {
|
|
59
62
|
"assistiveText"?: string;
|
|
60
63
|
"checked": boolean;
|
|
61
|
-
"checkedChildElementCount": number;
|
|
62
64
|
"direction": 'horizontal' | 'vertical';
|
|
63
65
|
"disabled": boolean;
|
|
64
66
|
"errorText": string;
|
|
65
67
|
"legend"?: string;
|
|
66
|
-
"parentCheckedCount": number;
|
|
67
68
|
/**
|
|
68
69
|
* Updates child elements' checked state.
|
|
69
70
|
* @param newValue New checked state.
|
|
@@ -85,6 +86,7 @@ export namespace Components {
|
|
|
85
86
|
"validityRole"?: InputValidityRole;
|
|
86
87
|
}
|
|
87
88
|
interface DsLink {
|
|
89
|
+
"ariaLabel": string;
|
|
88
90
|
"download"?: boolean;
|
|
89
91
|
"href": string;
|
|
90
92
|
"icon": string;
|
|
@@ -92,7 +94,6 @@ export namespace Components {
|
|
|
92
94
|
"iconPosition": LinkIconPosition;
|
|
93
95
|
"iconTitle"?: string;
|
|
94
96
|
"language"?: LinkLang;
|
|
95
|
-
"linkAriaLabel"?: string;
|
|
96
97
|
"size"?: LinkSize;
|
|
97
98
|
"target"?: LinkTarget;
|
|
98
99
|
"text": string;
|
|
@@ -100,10 +101,10 @@ export namespace Components {
|
|
|
100
101
|
"weight": LinkWeight;
|
|
101
102
|
}
|
|
102
103
|
interface DsLinkWithArrow {
|
|
104
|
+
"ariaLabel": string;
|
|
103
105
|
"href": string;
|
|
104
106
|
"iconPosition": LinkIconPosition;
|
|
105
107
|
"language"?: LinkLang;
|
|
106
|
-
"linkAriaLabel"?: string;
|
|
107
108
|
"target"?: LinkTarget;
|
|
108
109
|
"text"?: string;
|
|
109
110
|
}
|
|
@@ -116,10 +117,10 @@ export namespace Components {
|
|
|
116
117
|
"autocomplete"?: string;
|
|
117
118
|
"clearInput": () => Promise<void>;
|
|
118
119
|
"disabled"?: boolean;
|
|
119
|
-
"dsId"?: string;
|
|
120
120
|
"errorText"?: string;
|
|
121
121
|
"hiddenAssistiveText"?: string;
|
|
122
122
|
"icon": string;
|
|
123
|
+
"identifier"?: string;
|
|
123
124
|
"label"?: string;
|
|
124
125
|
"max"?: number;
|
|
125
126
|
"maxlength"?: number;
|
|
@@ -135,7 +136,7 @@ export namespace Components {
|
|
|
135
136
|
"successText"?: string;
|
|
136
137
|
"suffixText"?: string;
|
|
137
138
|
"togglePasswordVisibility": () => Promise<boolean>;
|
|
138
|
-
"type":
|
|
139
|
+
"type": DsTextInputType;
|
|
139
140
|
"value"?: string;
|
|
140
141
|
}
|
|
141
142
|
interface DsVisuallyHidden {
|
|
@@ -149,6 +150,10 @@ export interface DsCheckboxGroupCustomEvent<T> extends CustomEvent<T> {
|
|
|
149
150
|
detail: T;
|
|
150
151
|
target: HTMLDsCheckboxGroupElement;
|
|
151
152
|
}
|
|
153
|
+
export interface DsTextInputCustomEvent<T> extends CustomEvent<T> {
|
|
154
|
+
detail: T;
|
|
155
|
+
target: HTMLDsTextInputElement;
|
|
156
|
+
}
|
|
152
157
|
declare global {
|
|
153
158
|
interface HTMLDsAccordionElement extends Components.DsAccordion, HTMLStencilElement {
|
|
154
159
|
}
|
|
@@ -163,8 +168,7 @@ declare global {
|
|
|
163
168
|
new (): HTMLDsButtonElement;
|
|
164
169
|
};
|
|
165
170
|
interface HTMLDsCheckboxElementEventMap {
|
|
166
|
-
"
|
|
167
|
-
"dsCheckboxError": string;
|
|
171
|
+
"dsCheckboxInput": DsCheckboxInputEvent;
|
|
168
172
|
}
|
|
169
173
|
interface HTMLDsCheckboxElement extends Components.DsCheckbox, HTMLStencilElement {
|
|
170
174
|
addEventListener<K extends keyof HTMLDsCheckboxElementEventMap>(type: K, listener: (this: HTMLDsCheckboxElement, ev: DsCheckboxCustomEvent<HTMLDsCheckboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -181,8 +185,8 @@ declare global {
|
|
|
181
185
|
new (): HTMLDsCheckboxElement;
|
|
182
186
|
};
|
|
183
187
|
interface HTMLDsCheckboxGroupElementEventMap {
|
|
184
|
-
"dsCheckboxGroupChange":
|
|
185
|
-
"dsCheckboxGroupIndeterminateChildChange":
|
|
188
|
+
"dsCheckboxGroupChange": DsCheckboxGroupChangeEvent;
|
|
189
|
+
"dsCheckboxGroupIndeterminateChildChange": DsCheckboxGroupIndeterminateChildChangeEvent;
|
|
186
190
|
}
|
|
187
191
|
interface HTMLDsCheckboxGroupElement extends Components.DsCheckboxGroup, HTMLStencilElement {
|
|
188
192
|
addEventListener<K extends keyof HTMLDsCheckboxGroupElementEventMap>(type: K, listener: (this: HTMLDsCheckboxGroupElement, ev: DsCheckboxGroupCustomEvent<HTMLDsCheckboxGroupElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -222,7 +226,18 @@ declare global {
|
|
|
222
226
|
prototype: HTMLDsLinkWithArrowElement;
|
|
223
227
|
new (): HTMLDsLinkWithArrowElement;
|
|
224
228
|
};
|
|
229
|
+
interface HTMLDsTextInputElementEventMap {
|
|
230
|
+
"clear": DsTextInputClearEvent;
|
|
231
|
+
}
|
|
225
232
|
interface HTMLDsTextInputElement extends Components.DsTextInput, HTMLStencilElement {
|
|
233
|
+
addEventListener<K extends keyof HTMLDsTextInputElementEventMap>(type: K, listener: (this: HTMLDsTextInputElement, ev: DsTextInputCustomEvent<HTMLDsTextInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
234
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
235
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
236
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
237
|
+
removeEventListener<K extends keyof HTMLDsTextInputElementEventMap>(type: K, listener: (this: HTMLDsTextInputElement, ev: DsTextInputCustomEvent<HTMLDsTextInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
238
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
239
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
240
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
226
241
|
}
|
|
227
242
|
var HTMLDsTextInputElement: {
|
|
228
243
|
prototype: HTMLDsTextInputElement;
|
|
@@ -278,16 +293,16 @@ declare namespace LocalJSX {
|
|
|
278
293
|
"variant"?: 'primary' | 'secondary' | 'supplementary';
|
|
279
294
|
}
|
|
280
295
|
interface DsCheckbox {
|
|
296
|
+
"ariaLabel"?: string;
|
|
281
297
|
"assistiveText"?: string;
|
|
282
|
-
"checkboxId"?: string;
|
|
283
298
|
"checked"?: boolean;
|
|
284
299
|
"disabled"?: boolean;
|
|
285
300
|
"errorText"?: string;
|
|
286
301
|
"errorsDisabled"?: boolean;
|
|
302
|
+
"identifier"?: string;
|
|
287
303
|
"indeterminate"?: boolean;
|
|
288
304
|
"legend"?: string;
|
|
289
|
-
"
|
|
290
|
-
"onDsCheckboxError"?: (event: DsCheckboxCustomEvent<string>) => void;
|
|
305
|
+
"onDsCheckboxInput"?: (event: DsCheckboxCustomEvent<DsCheckboxInputEvent>) => void;
|
|
291
306
|
"optional"?: boolean;
|
|
292
307
|
"optionalText"?: string;
|
|
293
308
|
"required"?: boolean;
|
|
@@ -296,14 +311,12 @@ declare namespace LocalJSX {
|
|
|
296
311
|
interface DsCheckboxGroup {
|
|
297
312
|
"assistiveText"?: string;
|
|
298
313
|
"checked"?: boolean;
|
|
299
|
-
"checkedChildElementCount"?: number;
|
|
300
314
|
"direction"?: 'horizontal' | 'vertical';
|
|
301
315
|
"disabled"?: boolean;
|
|
302
316
|
"errorText"?: string;
|
|
303
317
|
"legend"?: string;
|
|
304
|
-
"onDsCheckboxGroupChange"?: (event: DsCheckboxGroupCustomEvent<
|
|
305
|
-
"onDsCheckboxGroupIndeterminateChildChange"?: (event: DsCheckboxGroupCustomEvent<
|
|
306
|
-
"parentCheckedCount"?: number;
|
|
318
|
+
"onDsCheckboxGroupChange"?: (event: DsCheckboxGroupCustomEvent<DsCheckboxGroupChangeEvent>) => void;
|
|
319
|
+
"onDsCheckboxGroupIndeterminateChildChange"?: (event: DsCheckboxGroupCustomEvent<DsCheckboxGroupIndeterminateChildChangeEvent>) => void;
|
|
307
320
|
"text"?: string;
|
|
308
321
|
}
|
|
309
322
|
interface DsIcon {
|
|
@@ -320,6 +333,7 @@ declare namespace LocalJSX {
|
|
|
320
333
|
"validityRole"?: InputValidityRole;
|
|
321
334
|
}
|
|
322
335
|
interface DsLink {
|
|
336
|
+
"ariaLabel"?: string;
|
|
323
337
|
"download"?: boolean;
|
|
324
338
|
"href": string;
|
|
325
339
|
"icon"?: string;
|
|
@@ -327,7 +341,6 @@ declare namespace LocalJSX {
|
|
|
327
341
|
"iconPosition"?: LinkIconPosition;
|
|
328
342
|
"iconTitle"?: string;
|
|
329
343
|
"language"?: LinkLang;
|
|
330
|
-
"linkAriaLabel"?: string;
|
|
331
344
|
"size"?: LinkSize;
|
|
332
345
|
"target"?: LinkTarget;
|
|
333
346
|
"text": string;
|
|
@@ -335,10 +348,10 @@ declare namespace LocalJSX {
|
|
|
335
348
|
"weight"?: LinkWeight;
|
|
336
349
|
}
|
|
337
350
|
interface DsLinkWithArrow {
|
|
351
|
+
"ariaLabel"?: string;
|
|
338
352
|
"href": string;
|
|
339
353
|
"iconPosition"?: LinkIconPosition;
|
|
340
354
|
"language"?: LinkLang;
|
|
341
|
-
"linkAriaLabel"?: string;
|
|
342
355
|
"target"?: LinkTarget;
|
|
343
356
|
"text"?: string;
|
|
344
357
|
}
|
|
@@ -350,15 +363,16 @@ declare namespace LocalJSX {
|
|
|
350
363
|
"assistiveText"?: string;
|
|
351
364
|
"autocomplete"?: string;
|
|
352
365
|
"disabled"?: boolean;
|
|
353
|
-
"dsId"?: string;
|
|
354
366
|
"errorText"?: string;
|
|
355
367
|
"hiddenAssistiveText"?: string;
|
|
356
368
|
"icon"?: string;
|
|
369
|
+
"identifier"?: string;
|
|
357
370
|
"label"?: string;
|
|
358
371
|
"max"?: number;
|
|
359
372
|
"maxlength"?: number;
|
|
360
373
|
"min"?: number;
|
|
361
374
|
"name"?: string;
|
|
375
|
+
"onClear"?: (event: DsTextInputCustomEvent<DsTextInputClearEvent>) => void;
|
|
362
376
|
"optional"?: boolean;
|
|
363
377
|
"optionalText"?: string;
|
|
364
378
|
"pattern"?: string;
|
|
@@ -368,7 +382,7 @@ declare namespace LocalJSX {
|
|
|
368
382
|
"required"?: boolean;
|
|
369
383
|
"successText"?: string;
|
|
370
384
|
"suffixText"?: string;
|
|
371
|
-
"type"?:
|
|
385
|
+
"type"?: DsTextInputType;
|
|
372
386
|
"value"?: string;
|
|
373
387
|
}
|
|
374
388
|
interface DsVisuallyHidden {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Validation = 'client' | 'server';
|
|
2
|
+
interface ConfigurationOptions {
|
|
3
|
+
validation?: Validation;
|
|
4
|
+
}
|
|
5
|
+
declare const state: {
|
|
6
|
+
validation?: Validation;
|
|
7
|
+
};
|
|
8
|
+
export declare const isValidation: (validation: Validation) => boolean;
|
|
9
|
+
export declare const configure: ({ validation }: ConfigurationOptions) => void;
|
|
10
|
+
export default state;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export declare const opensInNewTab: (target: string) => target is "_blank";
|
|
2
2
|
export declare const visuallyHiddenAssistiveText: (lang: string) => "Avautuu uuteen välilehteen" | "Öppnas i en ny flik" | "Opens in a new tab";
|
|
3
|
-
export declare const getAriaLabel: (text: string, ariaLabel?: string) => string;
|
|
@@ -12,3 +12,4 @@ export declare const remToPx: (remString: string) => string;
|
|
|
12
12
|
export declare const pxToRem: (pxString: string) => string;
|
|
13
13
|
export declare const litTemplateResultToString: (data: TemplateResult) => string;
|
|
14
14
|
export declare function idGenerator(id: string): Generator<string, void, unknown>;
|
|
15
|
+
export declare const getAriaLabel: (text: string, ariaLabel?: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uh-design-system/component-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@stencil/core": "^4.27.2",
|
|
59
59
|
"@stencil/react-output-target": "^0.8.2",
|
|
60
60
|
"@stencil/sass": "^3.1.9",
|
|
61
|
+
"@stencil/store": "^2.1.2",
|
|
61
62
|
"@storybook/addon-a11y": "^8.6.4",
|
|
62
63
|
"@storybook/addon-essentials": "^8.6.4",
|
|
63
64
|
"@storybook/addon-interactions": "^8.6.4",
|
|
@@ -94,5 +95,5 @@
|
|
|
94
95
|
"glob": "^9.0.0"
|
|
95
96
|
},
|
|
96
97
|
"license": "MIT",
|
|
97
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "741e3b17b356c65a8317370db69a66db4be17559"
|
|
98
99
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r=r=>{const t=parseFloat(r);return(o=""+16*t).endsWith("px")?o:`${o}px`;var o};function*t(r){let t=1;for(;;)yield`${r}-${t++}`}export{t as i,r}
|