globuswebcomponents 2.13.1 → 2.13.3
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/gb-action-panel_61.cjs.entry.js +742 -127
- package/dist/cjs/gb-approval-modal.cjs.entry.js +16 -13
- package/dist/cjs/gb-approval-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/gb-modal-action.gb-modal-header.entry.cjs.js.map +1 -1
- package/dist/cjs/gb-modal-action_2.cjs.entry.js +12 -12
- package/dist/cjs/gb-prompt-modal.cjs.entry.js +2 -1
- package/dist/cjs/gb-prompt-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/globuscomponents.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/reusableModels-_LRAKnsh.js.map +1 -1
- package/dist/collection/components/gb-approval-modal/gb-approval-modal.js +63 -126
- package/dist/collection/components/gb-approval-modal/gb-approval-modal.js.map +1 -1
- package/dist/collection/components/gb-button-group/gb-button-group.js +4 -2
- package/dist/collection/components/gb-button-group/gb-button-group.js.map +1 -1
- package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js +9 -4
- package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js.map +1 -1
- package/dist/collection/components/gb-input-field/gb-input-field.css +8 -1
- package/dist/collection/components/gb-input-field/gb-input-field.js +268 -28
- package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -1
- package/dist/collection/components/gb-modal-action/gb-modal-action.js +89 -89
- package/dist/collection/components/gb-modal-action/gb-modal-action.js.map +1 -1
- package/dist/collection/components/gb-prompt-modal/gb-prompt-modal.js +28 -1
- package/dist/collection/components/gb-prompt-modal/gb-prompt-modal.js.map +1 -1
- package/dist/collection/components/gb-sidebar/gb-sidebar.js +9 -9
- package/dist/collection/components/gb-sidebar/gb-sidebar.js.map +1 -1
- package/dist/collection/components/gb-table/gb-table.css +6 -0
- package/dist/collection/components/gb-table/gb-table.js +454 -90
- package/dist/collection/components/gb-table/gb-table.js.map +1 -1
- package/dist/collection/components/gb-token-field-compact/gb-token-field-compact.js +13 -5
- package/dist/collection/components/gb-token-field-compact/gb-token-field-compact.js.map +1 -1
- package/dist/collection/components/gb-token-field-compressed/gb-token-field-compressed.js +20 -10
- package/dist/collection/components/gb-token-field-compressed/gb-token-field-compressed.js.map +1 -1
- package/dist/collection/models/reusableModels.js.map +1 -1
- package/dist/components/gb-approval-modal.js +23 -26
- package/dist/components/gb-approval-modal.js.map +1 -1
- package/dist/components/gb-button-group.js +1 -1
- package/dist/components/gb-header.js +2 -2
- package/dist/components/gb-input-dropdown-menu-item.js +1 -1
- package/dist/components/gb-input-dropdown.js +1 -1
- package/dist/components/gb-input-field.js +1 -1
- package/dist/components/gb-modal-action.js +1 -1
- package/dist/components/gb-pagination.js +1 -1
- package/dist/components/gb-prompt-modal.js +3 -1
- package/dist/components/gb-prompt-modal.js.map +1 -1
- package/dist/components/gb-rich-text.js +4 -4
- package/dist/components/gb-sidebar.js +5 -5
- package/dist/components/gb-sidebar.js.map +1 -1
- package/dist/components/gb-table-header.js +1 -1
- package/dist/components/gb-table.js +457 -94
- package/dist/components/gb-table.js.map +1 -1
- package/dist/components/gb-textarea-input-field.js +1 -1
- package/dist/components/gb-token-field-compact.js +5 -1
- package/dist/components/gb-token-field-compact.js.map +1 -1
- package/dist/components/gb-token-field-compressed.js +9 -4
- package/dist/components/gb-token-field-compressed.js.map +1 -1
- package/dist/components/gb-wysiwyg-toolbar.js +1 -1
- package/dist/components/{p-CY9tYu7L.js → p-B9OaQ8IO.js} +5 -5
- package/dist/components/{p-CY9tYu7L.js.map → p-B9OaQ8IO.js.map} +1 -1
- package/dist/components/{p-Bo26ZXLD.js → p-BQWEHDtb.js} +4 -3
- package/dist/components/p-BQWEHDtb.js.map +1 -0
- package/dist/components/{p-0Dn-Rnju.js → p-Br16o-rx.js} +5 -5
- package/dist/components/{p-0Dn-Rnju.js.map → p-Br16o-rx.js.map} +1 -1
- package/dist/components/{p-COqi1UbV.js → p-C9OKT7Zi.js} +4 -4
- package/dist/components/{p-COqi1UbV.js.map → p-C9OKT7Zi.js.map} +1 -1
- package/dist/components/{p-BpCukPcq.js → p-CQg5uJVz.js} +20 -20
- package/dist/components/p-CQg5uJVz.js.map +1 -0
- package/dist/components/{p-D7ISVr5X.js → p-DT0m5qpo.js} +7 -4
- package/dist/components/p-DT0m5qpo.js.map +1 -0
- package/dist/components/{p-DXiN3a4D.js → p-DY_80Vnz.js} +3 -3
- package/dist/components/{p-DXiN3a4D.js.map → p-DY_80Vnz.js.map} +1 -1
- package/dist/components/{p-CoLGqDxS.js → p-QHFMnid1.js} +270 -30
- package/dist/components/p-QHFMnid1.js.map +1 -0
- package/dist/components/p-cHn6O-Kf.js.map +1 -1
- package/dist/components/{p-Krq9Xzvd.js → p-iQxeojAw.js} +5 -5
- package/dist/components/{p-Krq9Xzvd.js.map → p-iQxeojAw.js.map} +1 -1
- package/dist/components/test-input-tag.js +1 -1
- package/dist/docs.json +332 -285
- package/dist/esm/gb-action-panel_61.entry.js +742 -127
- package/dist/esm/gb-approval-modal.entry.js +17 -14
- package/dist/esm/gb-approval-modal.entry.js.map +1 -1
- package/dist/esm/gb-modal-action.gb-modal-header.entry.js.map +1 -1
- package/dist/esm/gb-modal-action_2.entry.js +12 -12
- package/dist/esm/gb-prompt-modal.entry.js +2 -1
- package/dist/esm/gb-prompt-modal.entry.js.map +1 -1
- package/dist/esm/globuscomponents.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/reusableModels-cHn6O-Kf.js.map +1 -1
- package/dist/globuscomponents/gb-approval-modal.entry.esm.js.map +1 -1
- package/dist/globuscomponents/gb-modal-action.gb-modal-header.entry.esm.js.map +1 -1
- package/dist/globuscomponents/gb-prompt-modal.entry.esm.js.map +1 -1
- package/dist/globuscomponents/globuscomponents.esm.js +1 -1
- package/dist/globuscomponents/p-0ea6a4f5.entry.js +2 -0
- package/dist/globuscomponents/p-0ea6a4f5.entry.js.map +1 -0
- package/dist/globuscomponents/{p-0875c4c8.entry.js → p-85bf9ca2.entry.js} +2 -2
- package/dist/globuscomponents/p-85bf9ca2.entry.js.map +1 -0
- package/dist/globuscomponents/p-cHn6O-Kf.js.map +1 -1
- package/dist/globuscomponents/p-cf0eb0b1.entry.js +2 -0
- package/dist/globuscomponents/p-cf0eb0b1.entry.js.map +1 -0
- package/dist/globuscomponents/{p-a68e199d.entry.js → p-e2a71662.entry.js} +2 -2
- package/dist/globuscomponents/p-e2a71662.entry.js.map +1 -0
- package/dist/types/components/gb-approval-modal/gb-approval-modal.d.ts +10 -11
- package/dist/types/components/gb-input-field/gb-input-field.d.ts +2 -0
- package/dist/types/components/gb-modal-action/gb-modal-action.d.ts +6 -6
- package/dist/types/components/gb-prompt-modal/gb-prompt-modal.d.ts +1 -0
- package/dist/types/components/gb-sidebar/gb-sidebar.d.ts +8 -5
- package/dist/types/components/gb-token-field-compressed/gb-token-field-compressed.d.ts +1 -1
- package/dist/types/components.d.ts +174 -98
- package/dist/types/models/reusableModels.d.ts +10 -4
- package/package.json +2 -1
- package/dist/components/p-Bo26ZXLD.js.map +0 -1
- package/dist/components/p-BpCukPcq.js.map +0 -1
- package/dist/components/p-CoLGqDxS.js.map +0 -1
- package/dist/components/p-D7ISVr5X.js.map +0 -1
- package/dist/globuscomponents/p-0875c4c8.entry.js.map +0 -1
- package/dist/globuscomponents/p-107a1db6.entry.js +0 -2
- package/dist/globuscomponents/p-107a1db6.entry.js.map +0 -1
- package/dist/globuscomponents/p-65070e05.entry.js +0 -2
- package/dist/globuscomponents/p-65070e05.entry.js.map +0 -1
- package/dist/globuscomponents/p-a68e199d.entry.js.map +0 -1
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class GbModalAction {
|
|
3
3
|
constructor() {
|
|
4
|
-
this.actionType = '
|
|
4
|
+
this.actionType = 'double';
|
|
5
5
|
this.destructive = false;
|
|
6
6
|
this.fullWidth = false;
|
|
7
7
|
// For the 'multiple' type
|
|
8
|
-
this.showSecondaryAction = true;
|
|
9
|
-
this.showFirstButton = true;
|
|
10
|
-
this.showSecondButton = true;
|
|
11
|
-
this.showThirdButton = true;
|
|
12
8
|
this.firstButtonText = '';
|
|
13
9
|
this.secondButtonText = '';
|
|
14
10
|
this.thirdButtonText = '';
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
11
|
+
this.firstButtonState = 'default';
|
|
12
|
+
this.secondButtonState = 'default';
|
|
13
|
+
this.thirdButtonState = 'default';
|
|
17
14
|
this.firstButtonIconLeadingSwap = '';
|
|
18
15
|
this.secondButtonIconLeadingSwap = '';
|
|
19
16
|
this.thirdButtonIconLeadingSwap = '';
|
|
@@ -21,21 +18,24 @@ export class GbModalAction {
|
|
|
21
18
|
this.secondButtonIconTrailingSwap = '';
|
|
22
19
|
this.thirdButtonIconTrailingSwap = '';
|
|
23
20
|
// If secondary action is shown
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
21
|
+
this.showSecondaryActions = false;
|
|
22
|
+
this.showFirstIconButton = false;
|
|
23
|
+
this.showSecondIconButton = false;
|
|
24
|
+
this.firstIconButtonSwap = '';
|
|
25
|
+
this.secondIconButtonSwap = '';
|
|
26
26
|
this.showCheckBox = true;
|
|
27
27
|
this.checkboxLabel = '';
|
|
28
28
|
this.firstIconButtonTooltipShown = false;
|
|
29
29
|
this.secondIconButtonTooltipShown = false;
|
|
30
30
|
}
|
|
31
31
|
renderMultiple() {
|
|
32
|
-
return (h("div", { class: "action-container multiple" }, this.
|
|
32
|
+
return (h("div", { class: "action-container multiple" }, this.showSecondaryActions && (h("div", { class: "action" }, h("div", { class: "first_icon" }, this.showFirstIconButton && (h("gb-button", { size: "md", hierarchy: "tertiary_gray", icon: "only", "icon-leading": "true", "icon-leading-swap": this.firstIconButtonSwap, onMouseEnter: () => (this.firstIconButtonTooltipShown = true), onMouseLeave: () => (this.firstIconButtonTooltipShown = false) })), this.firstIconButtonTooltipShown && (h("gb-tooltip", { "show-arrow": true, arrow: "bottom_left", class: "first_icon_button_tooltip" }, h("p", { slot: "label" }, "Refresh")))), h("div", { class: "second_icon" }, this.showSecondIconButton && (h("gb-button", { size: "md", hierarchy: "tertiary_gray", icon: "only", "icon-leading": "true", "icon-leading-swap": this.secondIconButtonSwap, onMouseEnter: () => (this.secondIconButtonTooltipShown = true), onMouseLeave: () => (this.secondIconButtonTooltipShown = false) })), this.secondIconButtonTooltipShown && (h("gb-tooltip", { "show-arrow": true, arrow: "bottom_right", class: "second_icon_button_tooltip" }, h("p", { slot: "label" }, "Refresh")))), this.showCheckBox && (h("gb-checkbox", { checked: false, indeterminate: false, size: "sm", type: "checkbox", state: "default", text: true, "supporting-text": "false" }, h("p", { slot: "label" }, this.checkboxLabel))))), h("div", { class: "frame" }, this.thirdButtonText && (h("div", { class: "multiple_button" }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "secondary_gray", icon: "default", state: this.thirdButtonState, "icon-leading": this.thirdButtonIconLeadingSwap ? true : false, "icon-leading-swap": this.thirdButtonIconLeadingSwap, "icon-trailing": this.thirdButtonIconTrailingSwap ? true : false, "icon-trailing-swap": this.thirdButtonIconTrailingSwap, onClick: () => this.onThirdButtonClicked() }, h("p", null, this.thirdButtonText)))), this.secondButtonText && (h("div", { class: "multiple_button" }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "secondary_color", icon: "default", state: this.secondButtonState, "icon-leading": this.secondButtonIconLeadingSwap ? true : false, "icon-leading-swap": this.secondButtonIconLeadingSwap, "icon-trailing": this.secondButtonIconTrailingSwap ? true : false, "icon-trailing-swap": this.secondButtonIconTrailingSwap, onClick: () => this.onSecondButtonClicked() }, h("p", null, this.secondButtonText)))), this.firstButtonText && (h("div", { class: "multiple_button" }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "primary", icon: "default", state: this.firstButtonState, "icon-leading": this.firstButtonIconLeadingSwap ? true : false, "icon-leading-swap": this.firstButtonIconLeadingSwap, "icon-trailing": this.firstButtonIconTrailingSwap ? true : false, "icon-trailing-swap": this.firstButtonIconTrailingSwap, onClick: () => this.onFirstButtonClicked() }, h("p", null, this.firstButtonText)))))));
|
|
33
33
|
}
|
|
34
34
|
renderDouble() {
|
|
35
|
-
return (h("div", { class: "action-container double" }, h("div", { class: "button" }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "secondary_gray", icon: "default", state:
|
|
35
|
+
return (h("div", { class: "action-container double" }, h("div", { class: "button" }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "secondary_gray", icon: "default", state: this.secondButtonState, "icon-leading": this.secondButtonIconLeadingSwap ? true : false, "icon-leading-swap": this.secondButtonIconLeadingSwap, "icon-trailing": this.secondButtonIconTrailingSwap ? true : false, "icon-trailing-swap": this.secondButtonIconTrailingSwap, onClick: () => this.onSecondButtonClicked() }, h("p", null, this.secondButtonText))), h("div", { class: "button" }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "primary", icon: "default", state: this.firstButtonState, "icon-leading": this.firstButtonIconLeadingSwap ? true : false, "icon-leading-swap": this.firstButtonIconLeadingSwap, "icon-trailing": this.firstButtonIconTrailingSwap ? true : false, "icon-trailing-swap": this.firstButtonIconTrailingSwap, onClick: () => this.onFirstButtonClicked() }, h("p", null, this.firstButtonText)))));
|
|
36
36
|
}
|
|
37
37
|
renderSingle() {
|
|
38
|
-
return (h("div", { class: "action-container single" }, h("div", { class: `single_button ${this.fullWidth ? 'full_width' : ''}` }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "primary", icon: "default", state:
|
|
38
|
+
return (h("div", { class: "action-container single" }, h("div", { class: `single_button ${this.fullWidth ? 'full_width' : ''}` }, h("gb-button", { destructive: this.destructive, size: "xl", hierarchy: "primary", icon: "default", state: this.firstButtonState, "icon-leading": this.firstButtonIconLeadingSwap ? true : false, "icon-leading-swap": this.firstButtonIconLeadingSwap, "icon-trailing": this.firstButtonIconTrailingSwap ? true : false, "icon-trailing-swap": this.firstButtonIconTrailingSwap, onClick: () => this.onFirstButtonClicked() }, h("p", null, this.firstButtonText)))));
|
|
39
39
|
}
|
|
40
40
|
onFirstButtonClicked() {
|
|
41
41
|
this.firstButtonClicked.emit();
|
|
@@ -89,7 +89,7 @@ export class GbModalAction {
|
|
|
89
89
|
"setter": false,
|
|
90
90
|
"reflect": false,
|
|
91
91
|
"attribute": "action-type",
|
|
92
|
-
"defaultValue": "'
|
|
92
|
+
"defaultValue": "'double'"
|
|
93
93
|
},
|
|
94
94
|
"destructive": {
|
|
95
95
|
"type": "boolean",
|
|
@@ -131,12 +131,12 @@ export class GbModalAction {
|
|
|
131
131
|
"attribute": "full-width",
|
|
132
132
|
"defaultValue": "false"
|
|
133
133
|
},
|
|
134
|
-
"
|
|
135
|
-
"type": "
|
|
134
|
+
"firstButtonText": {
|
|
135
|
+
"type": "string",
|
|
136
136
|
"mutable": false,
|
|
137
137
|
"complexType": {
|
|
138
|
-
"original": "
|
|
139
|
-
"resolved": "
|
|
138
|
+
"original": "string",
|
|
139
|
+
"resolved": "string",
|
|
140
140
|
"references": {}
|
|
141
141
|
},
|
|
142
142
|
"required": false,
|
|
@@ -148,15 +148,15 @@ export class GbModalAction {
|
|
|
148
148
|
"getter": false,
|
|
149
149
|
"setter": false,
|
|
150
150
|
"reflect": false,
|
|
151
|
-
"attribute": "
|
|
152
|
-
"defaultValue": "
|
|
151
|
+
"attribute": "first-button-text",
|
|
152
|
+
"defaultValue": "''"
|
|
153
153
|
},
|
|
154
|
-
"
|
|
155
|
-
"type": "
|
|
154
|
+
"secondButtonText": {
|
|
155
|
+
"type": "string",
|
|
156
156
|
"mutable": false,
|
|
157
157
|
"complexType": {
|
|
158
|
-
"original": "
|
|
159
|
-
"resolved": "
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
160
160
|
"references": {}
|
|
161
161
|
},
|
|
162
162
|
"required": false,
|
|
@@ -168,15 +168,15 @@ export class GbModalAction {
|
|
|
168
168
|
"getter": false,
|
|
169
169
|
"setter": false,
|
|
170
170
|
"reflect": false,
|
|
171
|
-
"attribute": "
|
|
172
|
-
"defaultValue": "
|
|
171
|
+
"attribute": "second-button-text",
|
|
172
|
+
"defaultValue": "''"
|
|
173
173
|
},
|
|
174
|
-
"
|
|
175
|
-
"type": "
|
|
174
|
+
"thirdButtonText": {
|
|
175
|
+
"type": "string",
|
|
176
176
|
"mutable": false,
|
|
177
177
|
"complexType": {
|
|
178
|
-
"original": "
|
|
179
|
-
"resolved": "
|
|
178
|
+
"original": "string",
|
|
179
|
+
"resolved": "string",
|
|
180
180
|
"references": {}
|
|
181
181
|
},
|
|
182
182
|
"required": false,
|
|
@@ -188,15 +188,15 @@ export class GbModalAction {
|
|
|
188
188
|
"getter": false,
|
|
189
189
|
"setter": false,
|
|
190
190
|
"reflect": false,
|
|
191
|
-
"attribute": "
|
|
192
|
-
"defaultValue": "
|
|
191
|
+
"attribute": "third-button-text",
|
|
192
|
+
"defaultValue": "''"
|
|
193
193
|
},
|
|
194
|
-
"
|
|
195
|
-
"type": "
|
|
194
|
+
"firstButtonState": {
|
|
195
|
+
"type": "string",
|
|
196
196
|
"mutable": false,
|
|
197
197
|
"complexType": {
|
|
198
|
-
"original": "
|
|
199
|
-
"resolved": "
|
|
198
|
+
"original": "'default' | 'disabled'",
|
|
199
|
+
"resolved": "\"default\" | \"disabled\"",
|
|
200
200
|
"references": {}
|
|
201
201
|
},
|
|
202
202
|
"required": false,
|
|
@@ -208,15 +208,15 @@ export class GbModalAction {
|
|
|
208
208
|
"getter": false,
|
|
209
209
|
"setter": false,
|
|
210
210
|
"reflect": false,
|
|
211
|
-
"attribute": "
|
|
212
|
-
"defaultValue": "
|
|
211
|
+
"attribute": "first-button-state",
|
|
212
|
+
"defaultValue": "'default'"
|
|
213
213
|
},
|
|
214
|
-
"
|
|
214
|
+
"secondButtonState": {
|
|
215
215
|
"type": "string",
|
|
216
216
|
"mutable": false,
|
|
217
217
|
"complexType": {
|
|
218
|
-
"original": "
|
|
219
|
-
"resolved": "
|
|
218
|
+
"original": "'default' | 'disabled'",
|
|
219
|
+
"resolved": "\"default\" | \"disabled\"",
|
|
220
220
|
"references": {}
|
|
221
221
|
},
|
|
222
222
|
"required": false,
|
|
@@ -228,15 +228,15 @@ export class GbModalAction {
|
|
|
228
228
|
"getter": false,
|
|
229
229
|
"setter": false,
|
|
230
230
|
"reflect": false,
|
|
231
|
-
"attribute": "
|
|
232
|
-
"defaultValue": "''"
|
|
231
|
+
"attribute": "second-button-state",
|
|
232
|
+
"defaultValue": "'default'"
|
|
233
233
|
},
|
|
234
|
-
"
|
|
234
|
+
"thirdButtonState": {
|
|
235
235
|
"type": "string",
|
|
236
236
|
"mutable": false,
|
|
237
237
|
"complexType": {
|
|
238
|
-
"original": "
|
|
239
|
-
"resolved": "
|
|
238
|
+
"original": "'default' | 'disabled'",
|
|
239
|
+
"resolved": "\"default\" | \"disabled\"",
|
|
240
240
|
"references": {}
|
|
241
241
|
},
|
|
242
242
|
"required": false,
|
|
@@ -248,10 +248,10 @@ export class GbModalAction {
|
|
|
248
248
|
"getter": false,
|
|
249
249
|
"setter": false,
|
|
250
250
|
"reflect": false,
|
|
251
|
-
"attribute": "
|
|
252
|
-
"defaultValue": "''"
|
|
251
|
+
"attribute": "third-button-state",
|
|
252
|
+
"defaultValue": "'default'"
|
|
253
253
|
},
|
|
254
|
-
"
|
|
254
|
+
"firstButtonIconLeadingSwap": {
|
|
255
255
|
"type": "string",
|
|
256
256
|
"mutable": false,
|
|
257
257
|
"complexType": {
|
|
@@ -268,10 +268,10 @@ export class GbModalAction {
|
|
|
268
268
|
"getter": false,
|
|
269
269
|
"setter": false,
|
|
270
270
|
"reflect": false,
|
|
271
|
-
"attribute": "
|
|
271
|
+
"attribute": "first-button-icon-leading-swap",
|
|
272
272
|
"defaultValue": "''"
|
|
273
273
|
},
|
|
274
|
-
"
|
|
274
|
+
"secondButtonIconLeadingSwap": {
|
|
275
275
|
"type": "string",
|
|
276
276
|
"mutable": false,
|
|
277
277
|
"complexType": {
|
|
@@ -288,10 +288,10 @@ export class GbModalAction {
|
|
|
288
288
|
"getter": false,
|
|
289
289
|
"setter": false,
|
|
290
290
|
"reflect": false,
|
|
291
|
-
"attribute": "
|
|
291
|
+
"attribute": "second-button-icon-leading-swap",
|
|
292
292
|
"defaultValue": "''"
|
|
293
293
|
},
|
|
294
|
-
"
|
|
294
|
+
"thirdButtonIconLeadingSwap": {
|
|
295
295
|
"type": "string",
|
|
296
296
|
"mutable": false,
|
|
297
297
|
"complexType": {
|
|
@@ -308,10 +308,10 @@ export class GbModalAction {
|
|
|
308
308
|
"getter": false,
|
|
309
309
|
"setter": false,
|
|
310
310
|
"reflect": false,
|
|
311
|
-
"attribute": "
|
|
311
|
+
"attribute": "third-button-icon-leading-swap",
|
|
312
312
|
"defaultValue": "''"
|
|
313
313
|
},
|
|
314
|
-
"
|
|
314
|
+
"firstButtonIconTrailingSwap": {
|
|
315
315
|
"type": "string",
|
|
316
316
|
"mutable": false,
|
|
317
317
|
"complexType": {
|
|
@@ -328,10 +328,10 @@ export class GbModalAction {
|
|
|
328
328
|
"getter": false,
|
|
329
329
|
"setter": false,
|
|
330
330
|
"reflect": false,
|
|
331
|
-
"attribute": "first-button-icon-
|
|
331
|
+
"attribute": "first-button-icon-trailing-swap",
|
|
332
332
|
"defaultValue": "''"
|
|
333
333
|
},
|
|
334
|
-
"
|
|
334
|
+
"secondButtonIconTrailingSwap": {
|
|
335
335
|
"type": "string",
|
|
336
336
|
"mutable": false,
|
|
337
337
|
"complexType": {
|
|
@@ -348,10 +348,10 @@ export class GbModalAction {
|
|
|
348
348
|
"getter": false,
|
|
349
349
|
"setter": false,
|
|
350
350
|
"reflect": false,
|
|
351
|
-
"attribute": "second-button-icon-
|
|
351
|
+
"attribute": "second-button-icon-trailing-swap",
|
|
352
352
|
"defaultValue": "''"
|
|
353
353
|
},
|
|
354
|
-
"
|
|
354
|
+
"thirdButtonIconTrailingSwap": {
|
|
355
355
|
"type": "string",
|
|
356
356
|
"mutable": false,
|
|
357
357
|
"complexType": {
|
|
@@ -368,15 +368,15 @@ export class GbModalAction {
|
|
|
368
368
|
"getter": false,
|
|
369
369
|
"setter": false,
|
|
370
370
|
"reflect": false,
|
|
371
|
-
"attribute": "third-button-icon-
|
|
371
|
+
"attribute": "third-button-icon-trailing-swap",
|
|
372
372
|
"defaultValue": "''"
|
|
373
373
|
},
|
|
374
|
-
"
|
|
375
|
-
"type": "
|
|
374
|
+
"showSecondaryActions": {
|
|
375
|
+
"type": "boolean",
|
|
376
376
|
"mutable": false,
|
|
377
377
|
"complexType": {
|
|
378
|
-
"original": "
|
|
379
|
-
"resolved": "
|
|
378
|
+
"original": "boolean",
|
|
379
|
+
"resolved": "boolean",
|
|
380
380
|
"references": {}
|
|
381
381
|
},
|
|
382
382
|
"required": false,
|
|
@@ -388,15 +388,15 @@ export class GbModalAction {
|
|
|
388
388
|
"getter": false,
|
|
389
389
|
"setter": false,
|
|
390
390
|
"reflect": false,
|
|
391
|
-
"attribute": "
|
|
392
|
-
"defaultValue": "
|
|
391
|
+
"attribute": "show-secondary-actions",
|
|
392
|
+
"defaultValue": "false"
|
|
393
393
|
},
|
|
394
|
-
"
|
|
395
|
-
"type": "
|
|
394
|
+
"showFirstIconButton": {
|
|
395
|
+
"type": "boolean",
|
|
396
396
|
"mutable": false,
|
|
397
397
|
"complexType": {
|
|
398
|
-
"original": "
|
|
399
|
-
"resolved": "
|
|
398
|
+
"original": "boolean",
|
|
399
|
+
"resolved": "boolean",
|
|
400
400
|
"references": {}
|
|
401
401
|
},
|
|
402
402
|
"required": false,
|
|
@@ -408,15 +408,15 @@ export class GbModalAction {
|
|
|
408
408
|
"getter": false,
|
|
409
409
|
"setter": false,
|
|
410
410
|
"reflect": false,
|
|
411
|
-
"attribute": "
|
|
412
|
-
"defaultValue": "
|
|
411
|
+
"attribute": "show-first-icon-button",
|
|
412
|
+
"defaultValue": "false"
|
|
413
413
|
},
|
|
414
|
-
"
|
|
415
|
-
"type": "
|
|
414
|
+
"showSecondIconButton": {
|
|
415
|
+
"type": "boolean",
|
|
416
416
|
"mutable": false,
|
|
417
417
|
"complexType": {
|
|
418
|
-
"original": "
|
|
419
|
-
"resolved": "
|
|
418
|
+
"original": "boolean",
|
|
419
|
+
"resolved": "boolean",
|
|
420
420
|
"references": {}
|
|
421
421
|
},
|
|
422
422
|
"required": false,
|
|
@@ -428,15 +428,15 @@ export class GbModalAction {
|
|
|
428
428
|
"getter": false,
|
|
429
429
|
"setter": false,
|
|
430
430
|
"reflect": false,
|
|
431
|
-
"attribute": "
|
|
432
|
-
"defaultValue": "
|
|
431
|
+
"attribute": "show-second-icon-button",
|
|
432
|
+
"defaultValue": "false"
|
|
433
433
|
},
|
|
434
|
-
"
|
|
435
|
-
"type": "
|
|
434
|
+
"firstIconButtonSwap": {
|
|
435
|
+
"type": "string",
|
|
436
436
|
"mutable": false,
|
|
437
437
|
"complexType": {
|
|
438
|
-
"original": "
|
|
439
|
-
"resolved": "
|
|
438
|
+
"original": "string",
|
|
439
|
+
"resolved": "string",
|
|
440
440
|
"references": {}
|
|
441
441
|
},
|
|
442
442
|
"required": false,
|
|
@@ -448,15 +448,15 @@ export class GbModalAction {
|
|
|
448
448
|
"getter": false,
|
|
449
449
|
"setter": false,
|
|
450
450
|
"reflect": false,
|
|
451
|
-
"attribute": "
|
|
452
|
-
"defaultValue": "
|
|
451
|
+
"attribute": "first-icon-button-swap",
|
|
452
|
+
"defaultValue": "''"
|
|
453
453
|
},
|
|
454
|
-
"
|
|
455
|
-
"type": "
|
|
454
|
+
"secondIconButtonSwap": {
|
|
455
|
+
"type": "string",
|
|
456
456
|
"mutable": false,
|
|
457
457
|
"complexType": {
|
|
458
|
-
"original": "
|
|
459
|
-
"resolved": "
|
|
458
|
+
"original": "string",
|
|
459
|
+
"resolved": "string",
|
|
460
460
|
"references": {}
|
|
461
461
|
},
|
|
462
462
|
"required": false,
|
|
@@ -468,8 +468,8 @@ export class GbModalAction {
|
|
|
468
468
|
"getter": false,
|
|
469
469
|
"setter": false,
|
|
470
470
|
"reflect": false,
|
|
471
|
-
"attribute": "
|
|
472
|
-
"defaultValue": "
|
|
471
|
+
"attribute": "second-icon-button-swap",
|
|
472
|
+
"defaultValue": "''"
|
|
473
473
|
},
|
|
474
474
|
"showCheckBox": {
|
|
475
475
|
"type": "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gb-modal-action.js","sourceRoot":"","sources":["../../../src/components/gb-modal-action/gb-modal-action.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO/E,MAAM,OAAO,aAAa;IAL1B;QAMU,eAAU,GAAqC,UAAU,CAAC;QAC1D,gBAAW,GAAY,KAAK,CAAC;QAC7B,cAAS,GAAY,KAAK,CAAC;QAEnC,0BAA0B;QAClB,wBAAmB,GAAY,IAAI,CAAC;QACpC,oBAAe,GAAY,IAAI,CAAC;QAChC,qBAAgB,GAAY,IAAI,CAAC;QACjC,oBAAe,GAAY,IAAI,CAAC;QAChC,oBAAe,GAAW,EAAE,CAAC;QAC7B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,oBAAe,GAAW,EAAE,CAAC;QAC7B,wBAAmB,GAAW,EAAE,CAAC;QACjC,yBAAoB,GAAW,EAAE,CAAC;QAClC,+BAA0B,GAAW,EAAE,CAAC;QACxC,gCAA2B,GAAW,EAAE,CAAC;QACzC,+BAA0B,GAAW,EAAE,CAAC;QACxC,gCAA2B,GAAW,EAAE,CAAC;QACzC,iCAA4B,GAAW,EAAE,CAAC;QAC1C,gCAA2B,GAAW,EAAE,CAAC;QAEjD,+BAA+B;QACvB,wBAAmB,GAAY,IAAI,CAAC;QACpC,yBAAoB,GAAY,IAAI,CAAC;QACrC,iBAAY,GAAY,IAAI,CAAC;QAC7B,kBAAa,GAAW,EAAE,CAAC;QAC1B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,CAAC;IAED,qBAAqB;QACnB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,MAAM;QACJ,QAAQ,IAAI,CAAC,UAAU,EAAE,CAAC;YACxB,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;YAC7B,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;YAC7B,KAAK,UAAU,CAAC;YAChB;gBACE,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;QACjC,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Prop, State, h } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'gb-modal-action',\r\n styleUrl: 'gb-modal-action.css',\r\n shadow: true,\r\n})\r\nexport class GbModalAction {\r\n @Prop() actionType: 'single' | 'multiple' | 'double' = 'multiple';\r\n @Prop() destructive: boolean = false;\r\n @Prop() fullWidth: boolean = false;\r\n\r\n // For the 'multiple' type\r\n @Prop() showSecondaryAction: boolean = true;\r\n @Prop() showFirstButton: boolean = true;\r\n @Prop() showSecondButton: boolean = true;\r\n @Prop() showThirdButton: boolean = true;\r\n @Prop() firstButtonText: string = '';\r\n @Prop() secondButtonText: string = '';\r\n @Prop() thirdButtonText: string = '';\r\n @Prop() firstIconButtonSwap: string = '';\r\n @Prop() secondIconButtonSwap: string = '';\r\n @Prop() firstButtonIconLeadingSwap: string = '';\r\n @Prop() secondButtonIconLeadingSwap: string = '';\r\n @Prop() thirdButtonIconLeadingSwap: string = '';\r\n @Prop() firstButtonIconTrailingSwap: string = '';\r\n @Prop() secondButtonIconTrailingSwap: string = '';\r\n @Prop() thirdButtonIconTrailingSwap: string = '';\r\n\r\n // If secondary action is shown\r\n @Prop() showFirstIconButton: boolean = true;\r\n @Prop() showSecondIconButton: boolean = true;\r\n @Prop() showCheckBox: boolean = true;\r\n @Prop() checkboxLabel: string = '';\r\n @State() firstIconButtonTooltipShown: boolean = false;\r\n @State() secondIconButtonTooltipShown: boolean = false;\r\n @Event() firstButtonClicked: EventEmitter<void>;\r\n @Event() secondButtonClicked: EventEmitter<void>;\r\n @Event() thirdButtonClicked: EventEmitter<void>;\r\n\r\n private renderMultiple() {\r\n return (\r\n <div class=\"action-container multiple\">\r\n {this.showSecondaryAction && (\r\n <div class=\"action\">\r\n <div class=\"first_icon\">\r\n {this.showFirstIconButton && (\r\n <gb-button\r\n size=\"md\"\r\n hierarchy=\"tertiary_gray\"\r\n icon=\"only\"\r\n icon-leading=\"true\"\r\n icon-leading-swap={this.firstIconButtonSwap}\r\n onMouseEnter={() => (this.firstIconButtonTooltipShown = true)}\r\n onMouseLeave={() => (this.firstIconButtonTooltipShown = false)}\r\n ></gb-button>\r\n )}\r\n {this.firstIconButtonTooltipShown && (\r\n <gb-tooltip show-arrow={true} arrow=\"bottom_left\" class=\"first_icon_button_tooltip\">\r\n <p slot=\"label\">Refresh</p>\r\n </gb-tooltip>\r\n )}\r\n </div>\r\n <div class=\"second_icon\">\r\n {this.showSecondIconButton && (\r\n <gb-button\r\n size=\"md\"\r\n hierarchy=\"tertiary_gray\"\r\n icon=\"only\"\r\n icon-leading=\"true\"\r\n icon-leading-swap={this.secondIconButtonSwap}\r\n onMouseEnter={() => (this.secondIconButtonTooltipShown = true)}\r\n onMouseLeave={() => (this.secondIconButtonTooltipShown = false)}\r\n ></gb-button>\r\n )}\r\n {this.secondIconButtonTooltipShown && (\r\n <gb-tooltip show-arrow={true} arrow=\"bottom_right\" class=\"second_icon_button_tooltip\">\r\n <p slot=\"label\">Refresh</p>\r\n </gb-tooltip>\r\n )}\r\n </div>\r\n {this.showCheckBox && (\r\n <gb-checkbox checked={false} indeterminate={false} size=\"sm\" type=\"checkbox\" state=\"default\" text={true} supporting-text=\"false\">\r\n <p slot=\"label\">{this.checkboxLabel}</p>\r\n </gb-checkbox>\r\n )}\r\n </div>\r\n )}\r\n\r\n <div class=\"frame\">\r\n {this.showThirdButton && (\r\n <div class=\"multiple_button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"secondary_gray\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading={this.thirdButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.thirdButtonIconLeadingSwap}\r\n icon-trailing={this.thirdButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.thirdButtonIconTrailingSwap}\r\n onClick={() => this.onThirdButtonClicked()}\r\n >\r\n <p>{this.thirdButtonText}</p>\r\n </gb-button>\r\n </div>\r\n )}\r\n {this.showSecondButton && (\r\n <div class=\"multiple_button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"secondary_color\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading={this.secondButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.secondButtonIconLeadingSwap}\r\n icon-trailing={this.secondButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.secondButtonIconTrailingSwap}\r\n onClick={() => this.onSecondButtonClicked()}\r\n >\r\n <p>{this.secondButtonText}</p>\r\n </gb-button>\r\n </div>\r\n )}\r\n {this.showFirstButton && (\r\n <div class=\"multiple_button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading={this.firstButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.firstButtonIconLeadingSwap}\r\n icon-trailing={this.firstButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.firstButtonIconTrailingSwap}\r\n onClick={() => this.onFirstButtonClicked()}\r\n >\r\n <p>{this.firstButtonText}</p>\r\n </gb-button>\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderDouble() {\r\n return (\r\n <div class=\"action-container double\">\r\n <div class=\"button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"secondary_gray\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading={this.secondButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.secondButtonIconLeadingSwap}\r\n icon-trailing={this.secondButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.secondButtonIconTrailingSwap}\r\n onClick={() => this.onSecondButtonClicked()}\r\n >\r\n <p>{this.secondButtonText}</p>\r\n </gb-button>\r\n </div>\r\n <div class=\"button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading={this.firstButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.firstButtonIconLeadingSwap}\r\n icon-trailing={this.firstButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.firstButtonIconTrailingSwap}\r\n onClick={() => this.onFirstButtonClicked()}\r\n >\r\n <p>{this.firstButtonText}</p>\r\n </gb-button>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderSingle() {\r\n return (\r\n <div class=\"action-container single\">\r\n <div class={`single_button ${this.fullWidth ? 'full_width' : ''}`}>\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading={this.firstButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.firstButtonIconLeadingSwap}\r\n icon-trailing={this.firstButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.firstButtonIconTrailingSwap}\r\n onClick={() => this.onFirstButtonClicked()}\r\n >\r\n <p>{this.firstButtonText}</p>\r\n </gb-button>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n onFirstButtonClicked() {\r\n this.firstButtonClicked.emit();\r\n }\r\n\r\n onSecondButtonClicked() {\r\n this.secondButtonClicked.emit();\r\n }\r\n\r\n onThirdButtonClicked() {\r\n this.thirdButtonClicked.emit();\r\n }\r\n\r\n render() {\r\n switch (this.actionType) {\r\n case 'single':\r\n return this.renderSingle();\r\n case 'double':\r\n return this.renderDouble();\r\n case 'multiple':\r\n default:\r\n return this.renderMultiple();\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"gb-modal-action.js","sourceRoot":"","sources":["../../../src/components/gb-modal-action/gb-modal-action.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO/E,MAAM,OAAO,aAAa;IAL1B;QAMU,eAAU,GAAqC,QAAQ,CAAC;QACxD,gBAAW,GAAY,KAAK,CAAC;QAC7B,cAAS,GAAY,KAAK,CAAC;QAEnC,0BAA0B;QAClB,oBAAe,GAAW,EAAE,CAAC;QAC7B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,oBAAe,GAAW,EAAE,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Prop, State, h } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'gb-modal-action',\r\n styleUrl: 'gb-modal-action.css',\r\n shadow: true,\r\n})\r\nexport class GbModalAction {\r\n @Prop() actionType: 'single' | 'multiple' | 'double' = 'double';\r\n @Prop() destructive: boolean = false;\r\n @Prop() fullWidth: boolean = false;\r\n\r\n // For the 'multiple' type\r\n @Prop() firstButtonText: string = '';\r\n @Prop() secondButtonText: string = '';\r\n @Prop() thirdButtonText: string = '';\r\n @Prop() firstButtonState: 'default' | 'disabled' = 'default';\r\n @Prop() secondButtonState: 'default' | 'disabled' = 'default';\r\n @Prop() thirdButtonState: 'default' | 'disabled' = 'default';\r\n @Prop() firstButtonIconLeadingSwap: string = '';\r\n @Prop() secondButtonIconLeadingSwap: string = '';\r\n @Prop() thirdButtonIconLeadingSwap: string = '';\r\n @Prop() firstButtonIconTrailingSwap: string = '';\r\n @Prop() secondButtonIconTrailingSwap: string = '';\r\n @Prop() thirdButtonIconTrailingSwap: string = '';\r\n\r\n // If secondary action is shown\r\n @Prop() showSecondaryActions: boolean = false;\r\n @Prop() showFirstIconButton: boolean = false;\r\n @Prop() showSecondIconButton: boolean = false;\r\n @Prop() firstIconButtonSwap: string = '';\r\n @Prop() secondIconButtonSwap: string = '';\r\n @Prop() showCheckBox: boolean = true;\r\n @Prop() checkboxLabel: string = '';\r\n @State() firstIconButtonTooltipShown: boolean = false;\r\n @State() secondIconButtonTooltipShown: boolean = false;\r\n @Event() firstButtonClicked: EventEmitter<void>;\r\n @Event() secondButtonClicked: EventEmitter<void>;\r\n @Event() thirdButtonClicked: EventEmitter<void>;\r\n\r\n private renderMultiple() {\r\n return (\r\n <div class=\"action-container multiple\">\r\n {this.showSecondaryActions && (\r\n <div class=\"action\">\r\n <div class=\"first_icon\">\r\n {this.showFirstIconButton && (\r\n <gb-button\r\n size=\"md\"\r\n hierarchy=\"tertiary_gray\"\r\n icon=\"only\"\r\n icon-leading=\"true\"\r\n icon-leading-swap={this.firstIconButtonSwap}\r\n onMouseEnter={() => (this.firstIconButtonTooltipShown = true)}\r\n onMouseLeave={() => (this.firstIconButtonTooltipShown = false)}\r\n ></gb-button>\r\n )}\r\n {this.firstIconButtonTooltipShown && (\r\n <gb-tooltip show-arrow={true} arrow=\"bottom_left\" class=\"first_icon_button_tooltip\">\r\n <p slot=\"label\">Refresh</p>\r\n </gb-tooltip>\r\n )}\r\n </div>\r\n <div class=\"second_icon\">\r\n {this.showSecondIconButton && (\r\n <gb-button\r\n size=\"md\"\r\n hierarchy=\"tertiary_gray\"\r\n icon=\"only\"\r\n icon-leading=\"true\"\r\n icon-leading-swap={this.secondIconButtonSwap}\r\n onMouseEnter={() => (this.secondIconButtonTooltipShown = true)}\r\n onMouseLeave={() => (this.secondIconButtonTooltipShown = false)}\r\n ></gb-button>\r\n )}\r\n {this.secondIconButtonTooltipShown && (\r\n <gb-tooltip show-arrow={true} arrow=\"bottom_right\" class=\"second_icon_button_tooltip\">\r\n <p slot=\"label\">Refresh</p>\r\n </gb-tooltip>\r\n )}\r\n </div>\r\n {this.showCheckBox && (\r\n <gb-checkbox checked={false} indeterminate={false} size=\"sm\" type=\"checkbox\" state=\"default\" text={true} supporting-text=\"false\">\r\n <p slot=\"label\">{this.checkboxLabel}</p>\r\n </gb-checkbox>\r\n )}\r\n </div>\r\n )}\r\n\r\n <div class=\"frame\">\r\n {this.thirdButtonText && (\r\n <div class=\"multiple_button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"secondary_gray\"\r\n icon=\"default\"\r\n state={this.thirdButtonState}\r\n icon-leading={this.thirdButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.thirdButtonIconLeadingSwap}\r\n icon-trailing={this.thirdButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.thirdButtonIconTrailingSwap}\r\n onClick={() => this.onThirdButtonClicked()}\r\n >\r\n <p>{this.thirdButtonText}</p>\r\n </gb-button>\r\n </div>\r\n )}\r\n {this.secondButtonText && (\r\n <div class=\"multiple_button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"secondary_color\"\r\n icon=\"default\"\r\n state={this.secondButtonState}\r\n icon-leading={this.secondButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.secondButtonIconLeadingSwap}\r\n icon-trailing={this.secondButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.secondButtonIconTrailingSwap}\r\n onClick={() => this.onSecondButtonClicked()}\r\n >\r\n <p>{this.secondButtonText}</p>\r\n </gb-button>\r\n </div>\r\n )}\r\n {this.firstButtonText && (\r\n <div class=\"multiple_button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state={this.firstButtonState}\r\n icon-leading={this.firstButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.firstButtonIconLeadingSwap}\r\n icon-trailing={this.firstButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.firstButtonIconTrailingSwap}\r\n onClick={() => this.onFirstButtonClicked()}\r\n >\r\n <p>{this.firstButtonText}</p>\r\n </gb-button>\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderDouble() {\r\n return (\r\n <div class=\"action-container double\">\r\n <div class=\"button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"secondary_gray\"\r\n icon=\"default\"\r\n state={this.secondButtonState}\r\n icon-leading={this.secondButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.secondButtonIconLeadingSwap}\r\n icon-trailing={this.secondButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.secondButtonIconTrailingSwap}\r\n onClick={() => this.onSecondButtonClicked()}\r\n >\r\n <p>{this.secondButtonText}</p>\r\n </gb-button>\r\n </div>\r\n <div class=\"button\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state={this.firstButtonState}\r\n icon-leading={this.firstButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.firstButtonIconLeadingSwap}\r\n icon-trailing={this.firstButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.firstButtonIconTrailingSwap}\r\n onClick={() => this.onFirstButtonClicked()}\r\n >\r\n <p>{this.firstButtonText}</p>\r\n </gb-button>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderSingle() {\r\n return (\r\n <div class=\"action-container single\">\r\n <div class={`single_button ${this.fullWidth ? 'full_width' : ''}`}>\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state={this.firstButtonState}\r\n icon-leading={this.firstButtonIconLeadingSwap ? true : false}\r\n icon-leading-swap={this.firstButtonIconLeadingSwap}\r\n icon-trailing={this.firstButtonIconTrailingSwap ? true : false}\r\n icon-trailing-swap={this.firstButtonIconTrailingSwap}\r\n onClick={() => this.onFirstButtonClicked()}\r\n >\r\n <p>{this.firstButtonText}</p>\r\n </gb-button>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n onFirstButtonClicked() {\r\n this.firstButtonClicked.emit();\r\n }\r\n\r\n onSecondButtonClicked() {\r\n this.secondButtonClicked.emit();\r\n }\r\n\r\n onThirdButtonClicked() {\r\n this.thirdButtonClicked.emit();\r\n }\r\n\r\n render() {\r\n switch (this.actionType) {\r\n case 'single':\r\n return this.renderSingle();\r\n case 'double':\r\n return this.renderDouble();\r\n case 'multiple':\r\n default:\r\n return this.renderMultiple();\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -9,6 +9,7 @@ export class GbPromptModal {
|
|
|
9
9
|
this.iconInstance = '';
|
|
10
10
|
this.checkboxLabel = '';
|
|
11
11
|
this.primaryButtonText = '';
|
|
12
|
+
this.primaryButtonState = 'default';
|
|
12
13
|
this.secondaryButtonText = '';
|
|
13
14
|
this.checked = false;
|
|
14
15
|
this.checkboxState = 'default';
|
|
@@ -31,7 +32,7 @@ export class GbPromptModal {
|
|
|
31
32
|
}
|
|
32
33
|
render() {
|
|
33
34
|
// Determine which icon to use based on destructive prop
|
|
34
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: '06402b74634b1f0f90a27d1ad0463ea39f733c01', class: "prompt-modal shadow-sm" }, h("div", { key: 'a8597258df7cb865ea63103e2091473139da56e2', class: "modal-content" }, h("div", { key: '11804f76de9990ba26634c54fe43e500bd4e24c9', class: "content-top" }, h("div", { key: '06931d074c26462bcffd2b7167337d4824247ade', class: `outer_circle ${this.destructive ? 'destructive' : ''}` }, h("div", { key: '950118a83b3df450d61475e97a176fac44529307', class: `icon ${this.destructive ? 'destructive' : ''}`, innerHTML: this.leadingIconSvg })), h("gb-button-close", { key: '18cd62e47664e16fdeed6b1f8bf9c440497b67cb', size: "sm", color: "gray", onClick: () => this.onCloseButtonClicked() })), h("div", { key: 'b35928adf0c12fc3a45fd8ee3f9c1e600d72a25c', class: "content-text" }, h("h2", { key: '23cab4eddf42b95a80f0772f940a63a35088004f', class: "display-xs-semi-bold" }, this.heading), h("p", { key: 'b8e63440a1d7afbff90e577185ece36f598569d6', class: "text-md-regular" }, this.supportingText)), this.showCheckBox && (h("div", { key: '3e2263bae20e2232352efa9afe91453666112c3b', class: "content-check" }, h("gb-checkbox", { key: 'e560a8f1eab85289612031b4cb9d4d57fcad01b6', onCheckboxClicked: this.clickedCheckbox.bind(this), checked: this.checked, indeterminate: false, size: "sm", type: "checkbox", state: this.checkboxState, text: true, "supporting-text": false }, h("p", { key: '947bb4441810f3125b968375449988c6d5e61cec', slot: "label" }, this.checkboxLabel))))), h("div", { key: '552a480af3b42140ef28a96572662527fa5c9460', class: "modal-action" }, h("div", { key: '31f33c9dc50e5847c9a34000846b639b5867d7e9', class: "modal-buttons" }, h("div", { key: 'fc332cb0b94355d405e71c82979bb43a92cfec38', class: "button1" }, h("gb-button", { key: '63b239ac7a549fd88006b6657a04f5304ae558d1', size: "xl", hierarchy: "secondary_gray", icon: "default", state: "default", "icon-leading": "false", "icon-trailing": "false", onClick: () => this.secondaryButtonClicked.emit() }, h("p", { key: 'd2ae7c478514ff8f6a24d65421e9f83025aa3373' }, this.secondaryButtonText))), h("div", { key: '5b35f44c2915639db616596b08bddeb6f2676f70', class: "button2" }, h("gb-button", { key: '834e10946115f2382790bfbe3c23974c8899a4b6', destructive: this.destructive, size: "xl", hierarchy: "primary", icon: "default", state: this.primaryButtonState, "icon-leading": "false", "icon-trailing": "false", onClick: () => this.primaryButtonClicked.emit() }, h("p", { key: '0653f770df2432d442de42ff4f30cac4f49d6894' }, this.primaryButtonText)))))));
|
|
35
36
|
}
|
|
36
37
|
static get is() { return "gb-prompt-modal"; }
|
|
37
38
|
static get encapsulation() { return "shadow"; }
|
|
@@ -187,6 +188,32 @@ export class GbPromptModal {
|
|
|
187
188
|
"attribute": "primary-button-text",
|
|
188
189
|
"defaultValue": "''"
|
|
189
190
|
},
|
|
191
|
+
"primaryButtonState": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "StateType",
|
|
196
|
+
"resolved": "\"applied\" | \"default\" | \"disabled\" | \"loading\"",
|
|
197
|
+
"references": {
|
|
198
|
+
"StateType": {
|
|
199
|
+
"location": "import",
|
|
200
|
+
"path": "../../components",
|
|
201
|
+
"id": "src/components.d.ts::StateType"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": ""
|
|
210
|
+
},
|
|
211
|
+
"getter": false,
|
|
212
|
+
"setter": false,
|
|
213
|
+
"reflect": false,
|
|
214
|
+
"attribute": "primary-button-state",
|
|
215
|
+
"defaultValue": "'default'"
|
|
216
|
+
},
|
|
190
217
|
"secondaryButtonText": {
|
|
191
218
|
"type": "string",
|
|
192
219
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gb-prompt-modal.js","sourceRoot":"","sources":["../../../src/components/gb-prompt-modal/gb-prompt-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQxE,MAAM,OAAO,aAAa;IAL1B;QAME,kCAAkC;QAC1B,iBAAY,GAAY,KAAK,CAAC;QAC9B,YAAO,GAAW,EAAE,CAAC;QACrB,mBAAc,GAAW,EAAE,CAAC;QAC5B,gBAAW,GAAY,KAAK,CAAC;QAC7B,iBAAY,GAAW,EAAE,CAAC;QAC1B,kBAAa,GAAW,EAAE,CAAC;QAC3B,sBAAiB,GAAW,EAAE,CAAC;QAC/B,wBAAmB,GAAW,EAAE,CAAC;QACjC,YAAO,GAAY,KAAK,CAAC;QACzB,kBAAa,GAAc,SAAS,CAAC;QACpC,mBAAc,GAAW,EAAE,CAAC;KA4FtC;IAtFC,KAAK,CAAC,QAAQ,CAAC,QAAgB;QAC7B,MAAM,QAAQ,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4DAAK,KAAK,EAAC,eAAe;oBACxB,oEACE,iBAAiB,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAClD,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,aAAa,EAAE,KAAK,EACpB,IAAI,EAAC,IAAI,EACT,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,IAAI,CAAC,aAAa,EACzB,IAAI,EAAE,IAAI,qBACO,KAAK;wBAEtB,0DAAG,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,aAAa,CAAK,CAC5B,CACV,CACP,CACG;YAEN,4DAAK,KAAK,EAAC,cAAc;gBACvB,4DAAK,KAAK,EAAC,eAAe;oBACxB,4DAAK,KAAK,EAAC,SAAS;wBAClB,kEACE,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,gBAAgB,EAC1B,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,SAAS,kBACF,OAAO,mBACN,OAAO,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE;4BAEjD,4DAAI,IAAI,CAAC,mBAAmB,CAAK,CACvB,CACR;oBACN,4DAAK,KAAK,EAAC,SAAS;wBAClB,kEACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,SAAS,EACd,KAAK,
|
|
1
|
+
{"version":3,"file":"gb-prompt-modal.js","sourceRoot":"","sources":["../../../src/components/gb-prompt-modal/gb-prompt-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQxE,MAAM,OAAO,aAAa;IAL1B;QAME,kCAAkC;QAC1B,iBAAY,GAAY,KAAK,CAAC;QAC9B,YAAO,GAAW,EAAE,C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AS,EACnB,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,IAAI,CAAC,kBAAkB,kBACjB,OAAO,mBACN,OAAO,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE;4BAE/C,4DAAI,IAAI,CAAC,iBAAiB,CAAK,CACrB,CACR,CACF,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Event, EventEmitter } from '@stencil/core';\r\nimport { Component, getAssetPath, h, Prop, State } from '@stencil/core';\r\nimport { StateType } from '../../components';\r\n\r\n@Component({\r\n tag: 'gb-prompt-modal',\r\n styleUrl: 'gb-prompt-modal.css',\r\n shadow: true,\r\n})\r\nexport class GbPromptModal {\r\n // Props (data passed from parent)\r\n @Prop() showCheckBox: boolean = false;\r\n @Prop() heading: string = '';\r\n @Prop() supportingText: string = '';\r\n @Prop() destructive: boolean = false;\r\n @Prop() iconInstance: string = '';\r\n @Prop() checkboxLabel: string = '';\r\n @Prop() primaryButtonText: string = '';\r\n @Prop() primaryButtonState: StateType = 'default';\r\n @Prop() secondaryButtonText: string = '';\r\n @Prop() checked: boolean = false;\r\n @Prop() checkboxState: StateType = 'default';\r\n @State() leadingIconSvg: string = '';\r\n @Event() checkboxClicked: EventEmitter<boolean>;\r\n @Event() closeButtonClicked: EventEmitter<void>;\r\n @Event() primaryButtonClicked: EventEmitter<void>;\r\n @Event() secondaryButtonClicked: EventEmitter<void>;\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.iconInstance);\r\n }\r\n\r\n clickedCheckbox(event) {\r\n this.checkboxClicked.emit(event.detail);\r\n }\r\n\r\n onCloseButtonClicked() {\r\n this.closeButtonClicked.emit();\r\n }\r\n\r\n render() {\r\n // Determine which icon to use based on destructive prop\r\n return (\r\n <div class=\"prompt-modal shadow-sm\">\r\n <div class=\"modal-content\">\r\n <div class=\"content-top\">\r\n <div class={`outer_circle ${this.destructive ? 'destructive' : ''}`}>\r\n <div class={`icon ${this.destructive ? 'destructive' : ''}`} innerHTML={this.leadingIconSvg}></div>\r\n </div>\r\n <gb-button-close size=\"sm\" color=\"gray\" onClick={() => this.onCloseButtonClicked()}></gb-button-close>\r\n </div>\r\n <div class=\"content-text\">\r\n <h2 class=\"display-xs-semi-bold\">{this.heading}</h2>\r\n <p class=\"text-md-regular\">{this.supportingText}</p>\r\n </div>\r\n {this.showCheckBox && (\r\n <div class=\"content-check\">\r\n <gb-checkbox\r\n onCheckboxClicked={this.clickedCheckbox.bind(this)}\r\n checked={this.checked}\r\n indeterminate={false}\r\n size=\"sm\"\r\n type=\"checkbox\"\r\n state={this.checkboxState}\r\n text={true}\r\n supporting-text={false}\r\n >\r\n <p slot=\"label\">{this.checkboxLabel}</p>\r\n </gb-checkbox>\r\n </div>\r\n )}\r\n </div>\r\n {/* <gb-modal-action action-type=\"double\" destructive={this.destructive}></gb-modal-action> */}\r\n <div class=\"modal-action\">\r\n <div class=\"modal-buttons\">\r\n <div class=\"button1\">\r\n <gb-button\r\n size=\"xl\"\r\n hierarchy=\"secondary_gray\"\r\n icon=\"default\"\r\n state=\"default\"\r\n icon-leading=\"false\"\r\n icon-trailing=\"false\"\r\n onClick={() => this.secondaryButtonClicked.emit()}\r\n >\r\n <p>{this.secondaryButtonText}</p>\r\n </gb-button>\r\n </div>\r\n <div class=\"button2\">\r\n <gb-button\r\n destructive={this.destructive}\r\n size=\"xl\"\r\n hierarchy=\"primary\"\r\n icon=\"default\"\r\n state={this.primaryButtonState}\r\n icon-leading=\"false\"\r\n icon-trailing=\"false\"\r\n onClick={() => this.primaryButtonClicked.emit()}\r\n >\r\n <p>{this.primaryButtonText}</p>\r\n </gb-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|