memorial-ui-component-library 1.0.9 → 1.0.10-beta.0-dev.2813
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/memorial-ui-component-library.common.js +669 -363
- package/dist/memorial-ui-component-library.common.js.map +1 -1
- package/dist/memorial-ui-component-library.css +1 -1
- package/dist/memorial-ui-component-library.umd.js +669 -363
- package/dist/memorial-ui-component-library.umd.js.map +1 -1
- package/dist/memorial-ui-component-library.umd.min.js +6 -6
- package/dist/memorial-ui-component-library.umd.min.js.map +1 -1
- package/dist/report.html +2 -2
- package/package.json +7 -2
- package/src/assets/scss/_variables.module.scss +3 -3
- package/src/assets/scss/main.scss +51 -2
- package/types/autocomplete.d.ts +32 -0
- package/types/button.d.ts +11 -0
- package/types/checkbox.d.ts +21 -3
- package/types/form.d.ts +34 -1
- package/types/input.d.ts +15 -1
- package/types/popout-menu.d.ts +9 -0
- package/types/radio.d.ts +16 -0
- package/types/select.d.ts +19 -2
- package/types/tabs.d.ts +17 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memorial-ui-component-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10-beta.0-dev.2813",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Memorial Health System Vue UI library.",
|
|
6
6
|
"author": "Solutions Development",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"serve": "vue-cli-service serve",
|
|
9
9
|
"build": "node build.js",
|
|
10
10
|
"test:unit": "vue-cli-service test:unit",
|
|
11
|
+
"test:playwright": "start /B npm run serve & wait-on http://10.8.121.111:8080/ && npx playwright test ./tests/playwright/*",
|
|
11
12
|
"lint": "vue-cli-service lint",
|
|
12
13
|
"build:lib": "vue-cli-service build --target lib --name memorial-ui-component-library --entry ./src/index.ts"
|
|
13
14
|
},
|
|
@@ -33,6 +34,8 @@
|
|
|
33
34
|
"vue-spinner": "^1.0.3"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
37
|
+
"@playwright/test": "^1.51.1",
|
|
38
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
36
39
|
"@testing-library/vue": "^5.9.0",
|
|
37
40
|
"@types/jest": "^27.0.1",
|
|
38
41
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
@@ -54,6 +57,7 @@
|
|
|
54
57
|
"eslint-plugin-prettier": "^4.0.0",
|
|
55
58
|
"eslint-plugin-vue": "^8.0.3",
|
|
56
59
|
"jest": "^27.0.5",
|
|
60
|
+
"playwright": "^1.51.1",
|
|
57
61
|
"prettier": "^2.4.1",
|
|
58
62
|
"sass": "^1.81",
|
|
59
63
|
"sass-loader": "^10",
|
|
@@ -62,7 +66,8 @@
|
|
|
62
66
|
"typescript": "~4.5.5",
|
|
63
67
|
"vue-cli-plugin-style-resources-loader": "^0.1.2",
|
|
64
68
|
"vue-cli-plugin-webpack-bundle-analyzer": "^1.4.0",
|
|
65
|
-
"vue-template-compiler": "^2.6.14"
|
|
69
|
+
"vue-template-compiler": "^2.6.14",
|
|
70
|
+
"wait-on": "^8.0.3"
|
|
66
71
|
},
|
|
67
72
|
"peerDependencies": {
|
|
68
73
|
"vue": "^2.6.10"
|
|
@@ -8,9 +8,9 @@ $--padding-base: 10px;
|
|
|
8
8
|
$--color-white: #ffffff;
|
|
9
9
|
$--color-black: #000000;
|
|
10
10
|
$--color-primary: #00284f;
|
|
11
|
-
$--color-secondary: #
|
|
11
|
+
$--color-secondary: #27779c;
|
|
12
12
|
$--color-red-primary: #DE2414;
|
|
13
|
-
$--color-green-primary:#
|
|
13
|
+
$--color-green-primary:#1E8366;
|
|
14
14
|
$--color-yellow-primary: #ffdd9a;
|
|
15
15
|
$--color-grey-primary: #e7e7e7;
|
|
16
16
|
$--color-grey-secondary: #9fa7b3;
|
|
@@ -23,7 +23,7 @@ $--color-grey-focus: mix($--color-black, $--color-grey-primary, 10%);
|
|
|
23
23
|
$color--grey-primary: #f4f3f3;
|
|
24
24
|
$color--grey-light-1: #e7e7e8;
|
|
25
25
|
$color--grey-light-2: #d8d8d8;
|
|
26
|
-
$color--grey-light-3: #
|
|
26
|
+
$color--grey-light-3: #676d74;
|
|
27
27
|
$color--grey-dark-1: #485563;
|
|
28
28
|
$color--grey-dark-2: #4a5562;
|
|
29
29
|
$color--grey-dark-3: #2c353f;
|
|
@@ -1,7 +1,56 @@
|
|
|
1
1
|
// @import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// Font family variables
|
|
4
|
+
$font-family-headings: 'Montserrat', sans-serif;
|
|
5
|
+
$font-family-body: 'Open Sans', sans-serif;
|
|
6
|
+
|
|
7
|
+
// Global font settings
|
|
8
|
+
html, body {
|
|
9
|
+
font-family: $font-family-body;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Headings and landmarks - Montserrat
|
|
13
|
+
h1, h2, h3, h4, h5, h6,
|
|
14
|
+
.sd-card__header,
|
|
15
|
+
.sd-dialog__title,
|
|
16
|
+
.sd-tabs__item,
|
|
17
|
+
.sd-form-item__label,
|
|
18
|
+
.sd-button,
|
|
19
|
+
header, nav, footer, aside,
|
|
20
|
+
.sd-popout-menu__trigger,
|
|
21
|
+
legend {
|
|
22
|
+
font-family: $font-family-headings;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Body text - Open Sans
|
|
26
|
+
p, span, div, input, textarea, select,
|
|
27
|
+
.sd-input,
|
|
28
|
+
.sd-select,
|
|
29
|
+
.sd-radio__label,
|
|
30
|
+
.sd-checkbox__label,
|
|
31
|
+
.sd-form-item__content,
|
|
32
|
+
.sd-form-item__description,
|
|
33
|
+
.sd-autocomplete__suggestion,
|
|
34
|
+
.sd-select-option,
|
|
35
|
+
.sd-form-item__error {
|
|
36
|
+
font-family: $font-family-body;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Font weight utilities
|
|
40
|
+
.font-regular {
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.font-medium {
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.font-semibold {
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.font-bold {
|
|
53
|
+
font-weight: 700;
|
|
5
54
|
}
|
|
6
55
|
|
|
7
56
|
.aria-instructions-hidden {
|
package/types/autocomplete.d.ts
CHANGED
|
@@ -88,6 +88,38 @@ export declare class SdAutoComplete extends MemorialUIFormPluginComponent {
|
|
|
88
88
|
a: SdAutoCompleteSuggestionEntry,
|
|
89
89
|
b: SdAutoCompleteSuggestionEntry
|
|
90
90
|
) => -1 | 0 | 1;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Optional label text for the autocomplete field
|
|
94
|
+
*/
|
|
95
|
+
label?: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Custom ID for the input element
|
|
99
|
+
* @default auto-generated
|
|
100
|
+
*/
|
|
101
|
+
inputId?: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* ID for the label element (for accessibility)
|
|
105
|
+
*/
|
|
106
|
+
labelId?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Computed value that returns a valid label ID, either from props or generated
|
|
110
|
+
*/
|
|
111
|
+
readonly computedLabelId: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Clear the input value
|
|
115
|
+
*/
|
|
116
|
+
clear(): void;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Close the suggestions dropdown
|
|
120
|
+
* @param emit - Whether to emit blur event
|
|
121
|
+
*/
|
|
122
|
+
close(emit: boolean): void;
|
|
91
123
|
}
|
|
92
124
|
|
|
93
125
|
declare const plugin: SdAutoComplete;
|
package/types/button.d.ts
CHANGED
|
@@ -63,9 +63,20 @@ export declare class SdButton extends MemorialUIPluginComponent {
|
|
|
63
63
|
/** The CSS class name of the **fontawesome** icon to use for this component. */
|
|
64
64
|
icon?: string | string[] | SdButtonIconConfiguration;
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Text label for the button (used for aria-label when no content)
|
|
68
|
+
* @default ''
|
|
69
|
+
*/
|
|
70
|
+
label: string;
|
|
71
|
+
|
|
66
72
|
/** Whether the button has a label provided. */
|
|
67
73
|
hasLabel: boolean;
|
|
68
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Computed button type attribute (submit, reset, or button)
|
|
77
|
+
*/
|
|
78
|
+
readonly buttonType: string;
|
|
79
|
+
|
|
69
80
|
/** Triggers a click action. */
|
|
70
81
|
click(): void;
|
|
71
82
|
}
|
package/types/checkbox.d.ts
CHANGED
|
@@ -9,14 +9,32 @@ export declare class SdCheckbox extends MemorialUIFormPluginComponent {
|
|
|
9
9
|
/** The current state value of the component. This value changes in response to what the component is bound to (v-model). */
|
|
10
10
|
state: any;
|
|
11
11
|
|
|
12
|
-
/** The value the
|
|
12
|
+
/** The value the checkbox component represents. */
|
|
13
13
|
value: any;
|
|
14
14
|
|
|
15
|
-
/** Whether the
|
|
15
|
+
/** Whether the checkbox component is disabled. */
|
|
16
16
|
disabled: boolean;
|
|
17
17
|
|
|
18
|
-
/** Whether the
|
|
18
|
+
/** Whether the checkbox is checked. */
|
|
19
19
|
checked: boolean;
|
|
20
|
+
|
|
21
|
+
/** Custom ID for the checkbox input element. */
|
|
22
|
+
inputId?: string;
|
|
23
|
+
|
|
24
|
+
/** ID for the associated label element (for accessibility). */
|
|
25
|
+
labelId?: string;
|
|
26
|
+
|
|
27
|
+
/** Computed input ID - returns inputId if provided or generates one. */
|
|
28
|
+
readonly computedInputId: string;
|
|
29
|
+
|
|
30
|
+
/** Computed label ID - returns labelId if provided or generates one. */
|
|
31
|
+
readonly computedLabelId: string;
|
|
32
|
+
|
|
33
|
+
/** Computed tabindex based on disabled state. */
|
|
34
|
+
readonly tabIndex: number;
|
|
35
|
+
|
|
36
|
+
/** Internal v-model state. */
|
|
37
|
+
readonly internalState: any;
|
|
20
38
|
}
|
|
21
39
|
|
|
22
40
|
declare const plugin: SdCheckbox;
|
package/types/form.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MemorialUIComponent, MemorialUIPluginComponent } from './component';
|
|
|
2
2
|
import {
|
|
3
3
|
ValidationResult,
|
|
4
4
|
SchemaDescriptor,
|
|
5
|
-
RuleProperty
|
|
5
|
+
RuleProperty,
|
|
6
6
|
} from './async-validator';
|
|
7
7
|
|
|
8
8
|
export type SdValidationTriggerType = 'blur' | 'change' | 'input';
|
|
@@ -49,6 +49,12 @@ export declare abstract class SdFormWidget extends MemorialUIComponent {
|
|
|
49
49
|
|
|
50
50
|
/** Form component */
|
|
51
51
|
export declare class SdForm extends MemorialUIPluginComponent {
|
|
52
|
+
/** Form ID */
|
|
53
|
+
id?: string;
|
|
54
|
+
|
|
55
|
+
/** Computed form ID that uses either the provided ID or a generated one */
|
|
56
|
+
readonly computedFormId: string;
|
|
57
|
+
|
|
52
58
|
/** Object model to bind the form to. */
|
|
53
59
|
model?: { [field: string]: any };
|
|
54
60
|
|
|
@@ -67,6 +73,12 @@ export declare class SdForm extends MemorialUIPluginComponent {
|
|
|
67
73
|
/** Whether the form is currently being reset. */
|
|
68
74
|
resetting: boolean;
|
|
69
75
|
|
|
76
|
+
/** Submit button reference */
|
|
77
|
+
submitButton: any | null;
|
|
78
|
+
|
|
79
|
+
/** Reset button reference */
|
|
80
|
+
resetButton: any | null;
|
|
81
|
+
|
|
70
82
|
/** Reset the form model to its original value and clear all validation errors/messages. */
|
|
71
83
|
reset(): void;
|
|
72
84
|
|
|
@@ -116,6 +128,27 @@ export declare class SdFormItem extends MemorialUIComponent {
|
|
|
116
128
|
|
|
117
129
|
/** The value of the form items field within the model bound to the form. */
|
|
118
130
|
fieldValue: any;
|
|
131
|
+
|
|
132
|
+
/** Custom ID for the label element. */
|
|
133
|
+
labelId?: string;
|
|
134
|
+
|
|
135
|
+
/** Computed ID for the field element. */
|
|
136
|
+
readonly fieldId: string;
|
|
137
|
+
|
|
138
|
+
/** Computed ID for the description element. */
|
|
139
|
+
readonly descriptionId: string;
|
|
140
|
+
|
|
141
|
+
/** Determines if the form item has a description. */
|
|
142
|
+
readonly hasDescription: boolean;
|
|
143
|
+
|
|
144
|
+
/** Determines if the form item is required based on rules or the required prop. */
|
|
145
|
+
readonly isRequired: boolean;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Get all validation rules defined for this form item.
|
|
149
|
+
* @returns Array of validation rules
|
|
150
|
+
*/
|
|
151
|
+
getOwnRules(): RuleProperty[];
|
|
119
152
|
}
|
|
120
153
|
|
|
121
154
|
declare const plugin: SdForm;
|
package/types/input.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type SdInputType =
|
|
|
24
24
|
/** Input component */
|
|
25
25
|
export declare class SdInput extends MemorialUIFormPluginComponent {
|
|
26
26
|
/** The inputs value. */
|
|
27
|
-
value?:
|
|
27
|
+
value?: string | number | Date | boolean;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* The type of the input.
|
|
@@ -32,6 +32,9 @@ export declare class SdInput extends MemorialUIFormPluginComponent {
|
|
|
32
32
|
*/
|
|
33
33
|
type: SdInputType;
|
|
34
34
|
|
|
35
|
+
/** Whether the input is disabled. */
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
|
|
35
38
|
/**
|
|
36
39
|
* Whether to display a clear button that will reset the components value.
|
|
37
40
|
* @default false
|
|
@@ -45,6 +48,17 @@ export declare class SdInput extends MemorialUIFormPluginComponent {
|
|
|
45
48
|
*/
|
|
46
49
|
disableSpinkit: boolean;
|
|
47
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Custom ID for the input element
|
|
53
|
+
* @default auto-generated
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* ID for the associated label element (for accessibility)
|
|
59
|
+
*/
|
|
60
|
+
labelId?: string;
|
|
61
|
+
|
|
48
62
|
/** Resets the components value. */
|
|
49
63
|
clear(): void;
|
|
50
64
|
}
|
package/types/popout-menu.d.ts
CHANGED
|
@@ -6,9 +6,18 @@ export declare class SdPopoutMenu extends MemorialUIPluginComponent {
|
|
|
6
6
|
*/
|
|
7
7
|
open: boolean;
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Accessible label for the menu
|
|
11
|
+
* @default 'Menu'
|
|
12
|
+
*/
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* Sets the visibility state of the menu, being either *open* or *closed*.
|
|
11
17
|
* @param state The visibility state of the menu
|
|
12
18
|
*/
|
|
13
19
|
setState(state: 'open' | 'closed'): void;
|
|
14
20
|
}
|
|
21
|
+
|
|
22
|
+
declare const plugin: SdPopoutMenu;
|
|
23
|
+
export default plugin;
|
package/types/radio.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export declare class SdRadio extends MemorialUIFormPluginComponent {
|
|
|
21
21
|
|
|
22
22
|
/** Whether the radio is checked. */
|
|
23
23
|
checked: boolean;
|
|
24
|
+
|
|
25
|
+
/** Custom ID for the radio element */
|
|
26
|
+
id?: string;
|
|
27
|
+
|
|
28
|
+
/** Computed ID for the label element */
|
|
29
|
+
readonly labelId: string;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
/** Radio Group component */
|
|
@@ -39,6 +45,16 @@ export declare class SdRadioGroup extends SdFormWidget {
|
|
|
39
45
|
* @default 'column'
|
|
40
46
|
*/
|
|
41
47
|
direction: SdRadioGroupDirection;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Label text for the radio group
|
|
51
|
+
*/
|
|
52
|
+
legend: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Generated ID for the legend element
|
|
56
|
+
*/
|
|
57
|
+
readonly legendId: string;
|
|
42
58
|
}
|
|
43
59
|
|
|
44
60
|
declare const plugin: SdRadio;
|
package/types/select.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import {
|
|
3
3
|
MemorialUIComponent,
|
|
4
|
-
MemorialUIFormPluginComponent
|
|
4
|
+
MemorialUIFormPluginComponent,
|
|
5
5
|
} from './component';
|
|
6
6
|
|
|
7
7
|
/** Select component */
|
|
8
8
|
export declare class SdSelect extends MemorialUIFormPluginComponent {
|
|
9
9
|
$refs: Vue['$refs'] & {
|
|
10
10
|
select: HTMLSelectElement;
|
|
11
|
+
input: HTMLInputElement;
|
|
12
|
+
clear?: HTMLElement;
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
/** The value of the selected option. */
|
|
@@ -28,6 +30,18 @@ export declare class SdSelect extends MemorialUIFormPluginComponent {
|
|
|
28
30
|
/** Whether the select menu is open. */
|
|
29
31
|
open: boolean;
|
|
30
32
|
|
|
33
|
+
/** Custom ID for the select element */
|
|
34
|
+
id: string;
|
|
35
|
+
|
|
36
|
+
/** Label text for the select */
|
|
37
|
+
label: string;
|
|
38
|
+
|
|
39
|
+
/** Generated ID for the label element */
|
|
40
|
+
readonly labelId: string;
|
|
41
|
+
|
|
42
|
+
/** Generated ID for the listbox element */
|
|
43
|
+
readonly listboxId: string;
|
|
44
|
+
|
|
31
45
|
/** Resets the components value. */
|
|
32
46
|
clear(): void;
|
|
33
47
|
|
|
@@ -51,7 +65,7 @@ export declare class SdSelect extends MemorialUIFormPluginComponent {
|
|
|
51
65
|
/** Select option component */
|
|
52
66
|
export declare class SdSelectOption extends MemorialUIComponent {
|
|
53
67
|
/** The options value. */
|
|
54
|
-
value:
|
|
68
|
+
value: string | number | Date | boolean;
|
|
55
69
|
|
|
56
70
|
/** The label to display in the select box when this item has been selected. If this is not assigned the string representation of {@link value} is used.*/
|
|
57
71
|
label?: string;
|
|
@@ -59,6 +73,9 @@ export declare class SdSelectOption extends MemorialUIComponent {
|
|
|
59
73
|
/** Whether the option is disabled. */
|
|
60
74
|
disabled: boolean;
|
|
61
75
|
|
|
76
|
+
/** Whether the option is currently selected */
|
|
77
|
+
readonly isSelected: boolean;
|
|
78
|
+
|
|
62
79
|
/** Toggles the open state of the select menu. */
|
|
63
80
|
toggleMenu(): void;
|
|
64
81
|
|
package/types/tabs.d.ts
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MemorialUIComponent } from './component';
|
|
2
2
|
|
|
3
|
+
/** Tab information interface */
|
|
3
4
|
export interface SdTabsType {
|
|
5
|
+
/** Unique identifier for the tab */
|
|
6
|
+
key: string;
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/** Display label for the tab */
|
|
9
|
+
label: string;
|
|
10
|
+
|
|
11
|
+
/** Component to render as tab content */
|
|
12
|
+
content: any;
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
/** Tabs component */
|
|
11
|
-
export declare class SdTabs extends MemorialUIComponent{
|
|
16
|
+
export declare class SdTabs extends MemorialUIComponent {
|
|
12
17
|
/**
|
|
13
|
-
*
|
|
18
|
+
* Array of tab information to render
|
|
19
|
+
* @required
|
|
14
20
|
*/
|
|
15
21
|
tabsInfo: SdTabsType[];
|
|
16
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Position of the tabs
|
|
25
|
+
* @default 'left'
|
|
26
|
+
*/
|
|
27
|
+
tabPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
declare const plugin: SdTabs;
|