@sankhyalabs/ezui 1.2.0-beta.9 → 2.0.0
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/{ApplicationUtils-2ac1b73e.js → ApplicationUtils-edc62c5c.js} +4 -1
- package/dist/cjs/CheckMode-ecb90b87.js +7 -0
- package/dist/cjs/{DialogType-a1e288e6.js → DialogType-aa435c52.js} +1 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +68 -17
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +13 -11
- package/dist/cjs/ez-calendar.cjs.entry.js +5 -5
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +11 -9
- package/dist/cjs/ez-chip.cjs.entry.js +17 -7
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +85 -7
- package/dist/cjs/ez-combo-box.cjs.entry.js +51 -20
- package/dist/cjs/ez-date-input.cjs.entry.js +13 -18
- package/dist/cjs/ez-date-time-input.cjs.entry.js +12 -17
- package/dist/cjs/ez-dialog.cjs.entry.js +43 -8
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +99 -486
- package/dist/cjs/ez-grid-config.cjs.entry.js +8 -9
- package/dist/cjs/ez-grid.cjs.entry.js +1067 -1165
- package/dist/cjs/ez-icon.cjs.entry.js +3 -3
- package/dist/cjs/ez-list.cjs.entry.js +2 -4
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +58 -0
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +4 -4
- package/dist/cjs/ez-popover.cjs.entry.js +6 -6
- package/dist/cjs/ez-popup.cjs.entry.js +8 -4
- package/dist/cjs/ez-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/ez-scroller.cjs.entry.js +2 -2
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-select-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +8 -7
- package/dist/cjs/ez-text-area.cjs.entry.js +7 -7
- package/dist/cjs/ez-text-edit.cjs.entry.js +103 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +14 -4
- package/dist/cjs/ez-time-input.cjs.entry.js +7 -7
- package/dist/cjs/ez-toast.cjs.entry.js +2 -2
- package/dist/cjs/ez-upload.cjs.entry.js +4 -4
- package/dist/cjs/ez-view-stack.cjs.entry.js +10 -7
- package/dist/cjs/ezui.cjs.js +4 -112
- package/dist/cjs/loader.cjs.js +2 -18
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +49 -20
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +219 -23
- package/dist/collection/components/ez-button/ez-button.css +0 -6
- package/dist/collection/components/ez-button/ez-button.js +11 -9
- package/dist/collection/components/ez-calendar/ez-calendar.css +17 -20
- package/dist/collection/components/ez-check/CheckMode.js +5 -0
- package/dist/collection/components/ez-check/ez-check.css +23 -24
- package/dist/collection/components/ez-check/ez-check.js +10 -8
- package/dist/collection/components/ez-chip/ez-chip.css +4 -2
- package/dist/collection/components/ez-chip/ez-chip.js +16 -6
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +16 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +226 -7
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +1 -22
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +51 -20
- package/dist/collection/components/ez-date-input/ez-date-input.js +8 -13
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -13
- package/dist/collection/components/ez-dialog/DialogType.js +1 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css +19 -25
- package/dist/collection/components/ez-dialog/ez-dialog.js +41 -6
- package/dist/collection/components/ez-form/DataBinder.js +1 -0
- package/dist/collection/components/ez-form/ez-form.js +22 -13
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +3 -3
- package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +2 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +4 -4
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +25 -15
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +3 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +45 -12
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRenderer.js +31 -0
- package/dist/collection/components/ez-grid/ez-grid.js +40 -3
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +38 -27
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +1 -2
- package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +5 -4
- package/dist/collection/components/ez-list/ez-list.css +12 -4
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +38 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +190 -0
- package/dist/collection/components/ez-modal-container/index.js +2 -0
- package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
- package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
- package/dist/collection/components/ez-popover/ez-popover.css +1 -1
- package/dist/collection/components/ez-popup/ez-popup.css +6 -1
- package/dist/collection/components/ez-popup/ez-popup.js +26 -4
- package/dist/collection/components/ez-radio-button/ez-radio-button.css +16 -5
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +1 -1
- package/dist/collection/components/ez-scroller/ez-scroller.css +2 -2
- package/dist/collection/components/ez-search/ez-search.js +6 -6
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +10 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +7 -3
- package/dist/collection/components/ez-text-area/ez-text-area.css +6 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +5 -5
- package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +188 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +28 -0
- package/dist/collection/components/ez-toast/ez-toast.css +1 -1
- package/dist/collection/components/ez-upload/ez-upload.css +1 -1
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +12 -6
- package/dist/collection/utils/ApplicationUtils.js +3 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +1589 -4002
- package/dist/{ezui/ApplicationUtils-30a69eb0.js → esm/ApplicationUtils-205ac4bc.js} +4 -2
- package/dist/esm/CheckMode-bdb2ec19.js +7 -0
- package/dist/esm/{DialogType-72afa679.js → DialogType-4059dc4d.js} +1 -0
- package/dist/esm/ez-actions-button.entry.js +68 -17
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +13 -11
- package/dist/esm/ez-calendar.entry.js +3 -3
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +11 -9
- package/dist/esm/ez-chip.entry.js +17 -7
- package/dist/esm/ez-collapsible-box.entry.js +85 -7
- package/dist/esm/ez-combo-box.entry.js +48 -17
- package/dist/esm/ez-date-input.entry.js +10 -15
- package/dist/esm/ez-date-time-input.entry.js +10 -15
- package/dist/esm/ez-dialog.entry.js +43 -8
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +65 -452
- package/dist/esm/ez-grid-config.entry.js +6 -7
- package/dist/esm/ez-grid.entry.js +1033 -1131
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-list.entry.js +2 -4
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +54 -0
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +2 -2
- package/dist/esm/ez-popover.entry.js +3 -3
- package/dist/esm/ez-popup.entry.js +8 -4
- package/dist/esm/ez-radio-button.entry.js +3 -3
- package/dist/esm/ez-scroller.entry.js +2 -2
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-select-box.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +8 -7
- package/dist/esm/ez-text-area.entry.js +7 -7
- package/dist/esm/ez-text-edit.entry.js +99 -0
- package/dist/esm/ez-text-input.entry.js +13 -3
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +2 -2
- package/dist/esm/ez-upload.entry.js +4 -4
- package/dist/esm/ez-view-stack.entry.js +10 -7
- package/dist/esm/ezui.js +4 -112
- package/dist/esm/loader.js +2 -18
- package/dist/ezui/ezui.esm.js +1 -125
- package/dist/ezui/index.esm.js +0 -1
- package/dist/ezui/p-04a41a44.entry.js +1 -0
- package/dist/ezui/p-0b44cf1c.js +1 -0
- package/dist/ezui/p-0c7203d5.entry.js +1 -0
- package/dist/ezui/p-2213da1f.entry.js +1 -0
- package/dist/ezui/p-2c6398b3.entry.js +1 -0
- package/dist/ezui/p-2ccad880.entry.js +1 -0
- package/dist/ezui/p-333d79c4.entry.js +1 -0
- package/dist/ezui/p-3987f8d8.entry.js +1 -0
- package/dist/ezui/{p-81eb2738.entry.js → p-42c6493e.entry.js} +1 -1
- package/dist/ezui/{p-b4ad3b15.entry.js → p-482c3dd8.entry.js} +1 -1
- package/dist/ezui/p-5bdb1a41.entry.js +1 -0
- package/dist/ezui/{p-b2cf7db2.entry.js → p-63d567cc.entry.js} +1 -1
- package/dist/ezui/p-659616e4.entry.js +1 -0
- package/dist/ezui/p-6608b9a5.entry.js +1 -0
- package/dist/ezui/p-77ec47ac.entry.js +1 -0
- package/dist/ezui/p-9b9ebf95.entry.js +1 -0
- package/dist/ezui/{p-3a0dd69f.entry.js → p-ae5af8f9.entry.js} +1 -1
- package/dist/ezui/p-b853763b.js +1 -0
- package/dist/ezui/p-be06251d.entry.js +1 -0
- package/dist/ezui/{p-e7d03a0d.entry.js → p-bffae598.entry.js} +1 -1
- package/dist/ezui/p-cd4677d4.entry.js +1 -0
- package/dist/ezui/p-cfcc23e6.entry.js +1 -0
- package/dist/ezui/p-dfcf55e0.entry.js +1 -0
- package/dist/ezui/p-e1148f5c.js +1 -0
- package/dist/ezui/p-e1f2b5da.entry.js +1 -0
- package/dist/ezui/p-e230bfd2.entry.js +1 -0
- package/dist/ezui/{p-c0dd9a2e.entry.js → p-e3ee814c.entry.js} +1 -1
- package/dist/ezui/p-e697ffd5.entry.js +1 -0
- package/dist/ezui/{p-4eb273f8.entry.js → p-efa32bcc.entry.js} +1 -1
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +42 -9
- package/dist/types/components/ez-check/CheckMode.d.ts +4 -0
- package/dist/types/components/ez-chip/ez-chip.d.ts +2 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +46 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -5
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +0 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +0 -1
- package/dist/types/components/ez-dialog/DialogType.d.ts +1 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +2 -2
- package/dist/types/components/ez-form/ez-form.d.ts +21 -11
- package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -3
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -2
- package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +2 -5
- package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -3
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRenderer.d.ts +9 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +8 -3
- package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +2 -6
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +47 -0
- package/dist/types/components/ez-modal-container/index.d.ts +2 -0
- package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
- package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +3 -3
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -0
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +39 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +5 -0
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +5 -1
- package/dist/types/components.d.ts +274 -28
- package/dist/types/utils/ApplicationUtils.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +5 -5
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ApplicationUtils-475b50d9.js +0 -63
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/css-shim-3bfdba4f.js +0 -6
- package/dist/cjs/dom-8ac1ad03.js +0 -75
- package/dist/cjs/index-2ec1da82.js +0 -2307
- package/dist/cjs/index-55178184.js +0 -6
- package/dist/cjs/index-d9c5cb88.js +0 -3068
- package/dist/cjs/shadow-css-41d9783d.js +0 -390
- package/dist/esm/ApplicationUtils-30a69eb0.js +0 -61
- package/dist/esm/ApplicationUtils-a4a76132.js +0 -60
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/css-shim-20dbffa5.js +0 -4
- package/dist/esm/dom-c5ed0ba5.js +0 -73
- package/dist/esm/index-1e9d524f.js +0 -3031
- package/dist/esm/index-b96183c8.js +0 -2295
- package/dist/esm/index-f32470b5.js +0 -3
- package/dist/esm/shadow-css-8c625855.js +0 -388
- package/dist/ezui/CSSVarsUtils-00f67f32.js +0 -70
- package/dist/ezui/DialogType-72afa679.js +0 -8
- package/dist/ezui/app-globals-0f993ce5.js +0 -3
- package/dist/ezui/css-shim-20dbffa5.js +0 -4
- package/dist/ezui/dom-c5ed0ba5.js +0 -73
- package/dist/ezui/ez-actions-button.entry.js +0 -98
- package/dist/ezui/ez-application.entry.js +0 -22
- package/dist/ezui/ez-button.entry.js +0 -73
- package/dist/ezui/ez-calendar.entry.js +0 -219
- package/dist/ezui/ez-card-item.entry.js +0 -40
- package/dist/ezui/ez-check.entry.js +0 -72
- package/dist/ezui/ez-chip.entry.js +0 -97
- package/dist/ezui/ez-collapsible-box.entry.js +0 -57
- package/dist/ezui/ez-combo-box.entry.js +0 -439
- package/dist/ezui/ez-date-input.entry.js +0 -159
- package/dist/ezui/ez-date-time-input.entry.js +0 -214
- package/dist/ezui/ez-dialog.entry.js +0 -108
- package/dist/ezui/ez-filter-input.entry.js +0 -75
- package/dist/ezui/ez-form.entry.js +0 -1395
- package/dist/ezui/ez-grid-config.entry.js +0 -433
- package/dist/ezui/ez-grid.entry.js +0 -115422
- package/dist/ezui/ez-icon.entry.js +0 -37
- package/dist/ezui/ez-list.entry.js +0 -516
- package/dist/ezui/ez-loading-bar.entry.js +0 -24
- package/dist/ezui/ez-modal.entry.js +0 -67
- package/dist/ezui/ez-number-input.entry.js +0 -148
- package/dist/ezui/ez-popover.entry.js +0 -141
- package/dist/ezui/ez-popup.entry.js +0 -49
- package/dist/ezui/ez-radio-button.entry.js +0 -45
- package/dist/ezui/ez-scroller.entry.js +0 -101
- package/dist/ezui/ez-search.entry.js +0 -83
- package/dist/ezui/ez-select-box.entry.js +0 -18
- package/dist/ezui/ez-tabselector.entry.js +0 -195
- package/dist/ezui/ez-text-area.entry.js +0 -158
- package/dist/ezui/ez-text-input.entry.js +0 -235
- package/dist/ezui/ez-time-input.entry.js +0 -164
- package/dist/ezui/ez-toast.entry.js +0 -84
- package/dist/ezui/ez-upload.entry.js +0 -379
- package/dist/ezui/ez-view-stack.entry.js +0 -74
- package/dist/ezui/index-1e9d524f.js +0 -3031
- package/dist/ezui/index-b96183c8.js +0 -2295
- package/dist/ezui/index-f32470b5.js +0 -3
- package/dist/ezui/p-2f02347d.entry.js +0 -1
- package/dist/ezui/p-416bedbe.entry.js +0 -1
- package/dist/ezui/p-544f0c63.entry.js +0 -1
- package/dist/ezui/p-62110996.entry.js +0 -1
- package/dist/ezui/p-719e9ef9.entry.js +0 -1
- package/dist/ezui/p-787fbdfe.js +0 -1
- package/dist/ezui/p-9d5be6a7.entry.js +0 -1
- package/dist/ezui/p-a27dafa4.entry.js +0 -1
- package/dist/ezui/p-aba3fa6c.entry.js +0 -1
- package/dist/ezui/p-adbe4188.js +0 -1
- package/dist/ezui/p-af43be42.entry.js +0 -1
- package/dist/ezui/p-b7467ad6.entry.js +0 -1
- package/dist/ezui/p-c019e137.entry.js +0 -1
- package/dist/ezui/p-c9d2060e.entry.js +0 -1
- package/dist/ezui/p-cccd8cde.entry.js +0 -1
- package/dist/ezui/p-d0671e14.entry.js +0 -1
- package/dist/ezui/p-e0f06d73.entry.js +0 -1
- package/dist/ezui/p-e59adce6.entry.js +0 -1
- package/dist/ezui/p-ed835b36.entry.js +0 -1
- package/dist/ezui/shadow-css-8c625855.js +0 -388
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const DialogType = require('./DialogType-
|
|
3
|
+
const DialogType = require('./DialogType-aa435c52.js');
|
|
4
4
|
|
|
5
5
|
class ApplicationUtils {
|
|
6
6
|
static async showDialog(title, message, icon = null, confirm, dialogType = DialogType.DialogType.DEFAULT, options) {
|
|
@@ -22,6 +22,9 @@ class ApplicationUtils {
|
|
|
22
22
|
static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
23
23
|
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.DialogType.CRITICAL, options);
|
|
24
24
|
}
|
|
25
|
+
static async success(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
26
|
+
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.DialogType.SUCCESS, options);
|
|
27
|
+
}
|
|
25
28
|
static async confirm(title, message, icon = null, dialogType = DialogType.DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
|
|
26
29
|
return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
|
|
27
30
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const
|
|
7
|
-
require('./
|
|
5
|
+
const index = require('./index-8646c40d.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
|
+
require('./ApplicationUtils-edc62c5c.js');
|
|
8
8
|
const CSSVarsUtils = require('./CSSVarsUtils-af809e73.js');
|
|
9
|
-
require('./
|
|
10
|
-
require('./
|
|
9
|
+
require('./DialogType-aa435c52.js');
|
|
10
|
+
require('./CheckMode-ecb90b87.js');
|
|
11
11
|
|
|
12
|
-
const ezActionsButtonCss = ":host{--ez-actions-
|
|
12
|
+
const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space-small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-extra-small, 3px);--ez-actions-button__btn-action--min-width:400px;--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;z-index:var(--more-visible, 2);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__btn-action{--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__icon-left{margin-left:var(--space-small, 6px)}.ez-actions-button__icon-right{margin-right:var(--space-small, 6px)}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none}.ez-actions-button__arrow{position:absolute;top:-13px;left:10px;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:15px solid var(--ez-actions-button__btn-action--background-color);width:0;height:0}";
|
|
13
13
|
|
|
14
14
|
let EzActionsButton = class {
|
|
15
15
|
constructor(hostRef) {
|
|
@@ -19,14 +19,31 @@ let EzActionsButton = class {
|
|
|
19
19
|
* Deixa o campo disponível ou não para interação com usuário.
|
|
20
20
|
*/
|
|
21
21
|
this.enabled = true;
|
|
22
|
+
/**
|
|
23
|
+
* Define se o label será apresentado no display do componente.
|
|
24
|
+
*/
|
|
25
|
+
this.showLabel = false;
|
|
26
|
+
/**
|
|
27
|
+
* Define se na opção selecionada apresentará um ícone de check.
|
|
28
|
+
*/
|
|
29
|
+
this.checkOption = false;
|
|
30
|
+
/**
|
|
31
|
+
* Define se o background do botão será transparent.
|
|
32
|
+
*/
|
|
33
|
+
this.isTransparent = false;
|
|
34
|
+
/**
|
|
35
|
+
* Define se o elemento contará com a seta de orientação
|
|
36
|
+
*/
|
|
37
|
+
this.arrowActive = false;
|
|
22
38
|
this.innerClickCheck = (floatingContainer, node) => {
|
|
39
|
+
var _a;
|
|
23
40
|
if (node && floatingContainer) {
|
|
24
41
|
if (node === floatingContainer) {
|
|
25
42
|
return true;
|
|
26
43
|
}
|
|
27
44
|
const children = floatingContainer.children;
|
|
28
45
|
for (let i = 0; i < children.length; i++) {
|
|
29
|
-
if (children[i].shadowRoot.contains(node)) {
|
|
46
|
+
if ((_a = children[i].shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(node)) {
|
|
30
47
|
return true;
|
|
31
48
|
}
|
|
32
49
|
}
|
|
@@ -34,25 +51,44 @@ let EzActionsButton = class {
|
|
|
34
51
|
return false;
|
|
35
52
|
};
|
|
36
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Oculta a lista de ações
|
|
56
|
+
*/
|
|
57
|
+
async hideActions() {
|
|
58
|
+
if (this._floatingID != undefined) {
|
|
59
|
+
core.FloatingManager.close(this._floatingID);
|
|
60
|
+
}
|
|
61
|
+
this._floatingID = undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Verifica se a lista de ações está oculta
|
|
65
|
+
*/
|
|
66
|
+
async isOpened() {
|
|
67
|
+
return this._floatingID != undefined;
|
|
68
|
+
}
|
|
37
69
|
showActions() {
|
|
70
|
+
var _a, _b;
|
|
38
71
|
if (!this.enabled) {
|
|
39
72
|
return;
|
|
40
73
|
}
|
|
41
|
-
|
|
74
|
+
const boundingHost = (_a = this._element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
75
|
+
let posLeft = boundingHost ? (boundingHost.x - (this.arrowActive ? 5 : 0)) + "px" : null;
|
|
76
|
+
let options = { autoClose: true, innerClickTest: this.innerClickCheck, isFixed: true, left: posLeft };
|
|
77
|
+
this._floatingID = core.FloatingManager.float(this._actionsList, this._listContainer, options);
|
|
42
78
|
const docWidth = document.body.clientWidth;
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
|
|
79
|
+
const boundingList = (_b = this._actionsList) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
80
|
+
if ((boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) > docWidth) {
|
|
81
|
+
posLeft = (docWidth - boundingList.width) + "px";
|
|
82
|
+
options = { autoClose: true, innerClickTest: this.innerClickCheck, left: posLeft };
|
|
83
|
+
core.FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
46
84
|
}
|
|
47
85
|
window.requestAnimationFrame(() => {
|
|
48
86
|
this._actionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
49
87
|
});
|
|
50
88
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
this._floatingID = undefined;
|
|
89
|
+
hasLabelOrCheckOption() {
|
|
90
|
+
var _a;
|
|
91
|
+
return (this.showLabel || this.checkOption) && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
56
92
|
}
|
|
57
93
|
//---------------------------------------------
|
|
58
94
|
// Event handlers
|
|
@@ -61,6 +97,7 @@ let EzActionsButton = class {
|
|
|
61
97
|
this.showActions();
|
|
62
98
|
}
|
|
63
99
|
actionClick(action) {
|
|
100
|
+
this._selectedAction = action;
|
|
64
101
|
this.hideActions();
|
|
65
102
|
this.ezAction.emit(action);
|
|
66
103
|
}
|
|
@@ -91,9 +128,23 @@ let EzActionsButton = class {
|
|
|
91
128
|
if (this._floatingID == undefined) {
|
|
92
129
|
this._actionsList.remove();
|
|
93
130
|
}
|
|
131
|
+
if (this.hasLabelOrCheckOption()) {
|
|
132
|
+
if (!!this.value) {
|
|
133
|
+
this._selectedAction = this.actions.find((action) => action.value === this.value);
|
|
134
|
+
}
|
|
135
|
+
else if (!!!this._selectedAction) {
|
|
136
|
+
this._selectedAction = this.actions[0];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
94
139
|
}
|
|
95
140
|
render() {
|
|
96
|
-
|
|
141
|
+
var _a;
|
|
142
|
+
return (index.h(index.Host, null, index.h("ez-button", { ref: elem => this._button = elem, class: this.isTransparent ? "ez-actions-button__btn-transparent" : "", label: this.showLabel && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.label), enabled: this.enabled, mode: this.showLabel ? "" : "icon", iconName: this.showLabel ? "" : this.iconName || "dots-vertical", size: this.size, onClick: () => this.handlerButtonClick() }, this.showLabel &&
|
|
143
|
+
index.h("ez-icon", { class: "ez-actions-button__icon-left", slot: "rightIcon", iconName: this.iconName || "dots-vertical" })), index.h("section", { class: "ez-actions-button__list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "ez-actions-button__actions-list", ref: elem => this._actionsList = elem }, this.arrowActive && index.h("div", { class: "ez-actions-button__arrow" }), this.actions.map(action => {
|
|
144
|
+
var _a;
|
|
145
|
+
return index.h("ez-button", { class: "ez-actions-button__btn-action", size: "small", label: action.label, onClick: () => this.actionClick(action) }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
|
|
146
|
+
index.h("ez-icon", { class: "ez-actions-button__icon-right", slot: "leftIcon", iconName: "check" }));
|
|
147
|
+
})))));
|
|
97
148
|
}
|
|
98
149
|
get _element() { return index.getElement(this); }
|
|
99
150
|
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8646c40d.js');
|
|
6
6
|
|
|
7
|
-
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:
|
|
7
|
+
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
|
|
8
8
|
|
|
9
9
|
let EzButton = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -38,18 +38,20 @@ let EzButton = class {
|
|
|
38
38
|
handleSlotChange(ev) {
|
|
39
39
|
const slot = ev.target;
|
|
40
40
|
const content = slot.assignedElements()[0];
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
if (!!content) {
|
|
42
|
+
if (this.mode == "link") {
|
|
43
|
+
content.style.display = "inline";
|
|
44
|
+
if (slot.name == "leftIcon") {
|
|
45
|
+
content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
|
|
46
|
+
}
|
|
47
|
+
else if (slot.name == "rightIcon") {
|
|
48
|
+
content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
|
-
else
|
|
47
|
-
content.style.
|
|
51
|
+
else {
|
|
52
|
+
content.style.setProperty("--ez-icon--color", "var(--ez-icon--color)");
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
|
-
else {
|
|
51
|
-
content.style.setProperty("--ez-icon--color", "var(--ez-icon--color)");
|
|
52
|
-
}
|
|
53
55
|
}
|
|
54
56
|
render() {
|
|
55
57
|
if (this.mode == "icon") {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const
|
|
5
|
+
const index = require('./index-8646c40d.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);
|
|
8
|
+
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
|
|
9
9
|
|
|
10
10
|
let EzCalendar = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -43,7 +43,7 @@ let EzCalendar = class {
|
|
|
43
43
|
*/
|
|
44
44
|
async show(top, left, bottom, right) {
|
|
45
45
|
if (this.floating) {
|
|
46
|
-
this._floatingID =
|
|
46
|
+
this._floatingID = core.FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
|
|
47
47
|
window.requestAnimationFrame(() => {
|
|
48
48
|
this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
49
49
|
});
|
|
@@ -68,7 +68,7 @@ let EzCalendar = class {
|
|
|
68
68
|
*/
|
|
69
69
|
async hide() {
|
|
70
70
|
if (this._floatingID !== undefined) {
|
|
71
|
-
|
|
71
|
+
core.FloatingManager.close(this._floatingID);
|
|
72
72
|
this._floatingID = undefined;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8646c40d.js');
|
|
6
6
|
|
|
7
7
|
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
8
8
|
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8646c40d.js');
|
|
6
|
+
const CheckMode = require('./CheckMode-ecb90b87.js');
|
|
6
7
|
|
|
7
|
-
const ezCheckCss = ":host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.
|
|
8
|
+
const ezCheckCss = ":host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}";
|
|
8
9
|
|
|
9
10
|
let EzCheck = class {
|
|
10
11
|
constructor(hostRef) {
|
|
@@ -20,16 +21,17 @@ let EzCheck = class {
|
|
|
20
21
|
* No modo "regular" a visualização é a tradicional de uma caixinha marcada/desmarcada.
|
|
21
22
|
* No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
|
|
22
23
|
*/
|
|
23
|
-
this.mode =
|
|
24
|
+
this.mode = CheckMode.CheckMode.REGULAR;
|
|
24
25
|
}
|
|
25
26
|
observeMode() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this._inputElem.classList.
|
|
27
|
+
var _a;
|
|
28
|
+
if (((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.CheckMode.SWITCH) {
|
|
29
|
+
this._inputElem.classList.remove("regular-mode");
|
|
30
|
+
this._inputElem.classList.add("switch-mode");
|
|
29
31
|
}
|
|
30
32
|
else {
|
|
31
|
-
this._inputElem.classList.remove("
|
|
32
|
-
this._inputElem.classList.add("
|
|
33
|
+
this._inputElem.classList.remove("switch-mode");
|
|
34
|
+
this._inputElem.classList.add("regular-mode");
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
//---------------------------------------------
|
|
@@ -65,7 +67,7 @@ let EzCheck = class {
|
|
|
65
67
|
return classes;
|
|
66
68
|
}
|
|
67
69
|
render() {
|
|
68
|
-
return (index.h(index.Host, null, index.h("input", { type: "checkbox", class: "
|
|
70
|
+
return (index.h(index.Host, null, index.h("input", { type: "checkbox", class: "regular-mode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }), this.label ? index.h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
|
|
69
71
|
}
|
|
70
72
|
static get watchers() { return {
|
|
71
73
|
"mode": ["observeMode"]
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8646c40d.js');
|
|
6
6
|
|
|
7
|
-
const ezChipCss = ":host{--ez-label-chip--height:30px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--medium, 400);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #2B3A54);--ez-label-chip__label--text--primary:var(--text--primary, #626e82);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:var(--color--primary-300);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--active:var(--color--primary, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-300, #f2faf8);--ez-label-chip__label__container--default--color--hover:var(--color--primary, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__label__container--default--border-color--active:var(--color--primary)}.lbl{display:flex;white-space:nowrap;align-items:center;
|
|
7
|
+
const ezChipCss = ":host{--ez-label-chip--height:30px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--medium, 400);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #2B3A54);--ez-label-chip__label--text--primary:var(--text--primary, #626e82);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:var(--color--primary-300);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--active:var(--color--primary, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-300, #f2faf8);--ez-label-chip__label__container--default--color--hover:var(--color--primary, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__label__container--default--border-color--active:var(--color--primary)}.lbl{display:flex;white-space:nowrap;align-items:center;cursor:pointer;user-select:none;color:var(--ez-label-chip__label--title--primary);height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size);font-weight:var(--ez-label-chip__label--font-weight)}.lbl--active{color:var(--ez-label-chip__label__container--default--color--hover)}.lbl--disabled{color:var(--ez-label-chip__label__container--text--disabled)}.label__container{cursor:pointer;width:max-content;display:flex;flex-wrap:wrap;align-items:center;background-color:#FFFFFF;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);outline-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__content{display:flex;align-items:center;flex-wrap:wrap;--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--disabled{cursor:default;border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__container--active{border-color:var(--ez-label-chip__label__container--default--background-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover);color:var(--ez-label-chip__label__container--default--color--hover);fill:var(--ez-label-chip__label__container--default--color--hover);--ez-icon--color:var(--ez-label-chip__label__container--default--color--hover)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__container--disabled:hover{cursor:default;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__content__icon{display:flex;cursor:pointer;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--row-reverse{flex-direction:row-reverse}.label__container .btn-close{padding:0px 0px 0px 8px}.label__container--row-reverse .btn-close{padding:0px 8px 0px 0px}.cursor-disable{cursor:default}ez-icon{--ez-icon--color:inherit}";
|
|
8
8
|
|
|
9
9
|
let EzChip = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -64,17 +64,23 @@ let EzChip = class {
|
|
|
64
64
|
this.value = !this.value;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
+
formatLabel() {
|
|
68
|
+
if (this.label.length > ChipSize.CHAR_LIMIT) {
|
|
69
|
+
return this.label.substring(0, ChipSize.CHAR_LIMIT) + "...";
|
|
70
|
+
}
|
|
71
|
+
return this.label;
|
|
72
|
+
}
|
|
67
73
|
observeValue() {
|
|
68
|
-
(this.value && this.mode !== "action") ? this.
|
|
74
|
+
(this.value && this.mode !== "action") ? this._containerElem.classList.add("label__container--active") : this._containerElem.classList.remove("label__container--active");
|
|
69
75
|
}
|
|
70
76
|
observeEnabled() {
|
|
71
77
|
if (this.enabled) {
|
|
72
|
-
this.
|
|
78
|
+
this._containerElem.classList.remove("label__container--disabled");
|
|
73
79
|
this._labelElem.classList.remove("lbl--disabled");
|
|
74
80
|
this._labelElem.classList.remove("cursor-disable");
|
|
75
81
|
}
|
|
76
82
|
else {
|
|
77
|
-
this.
|
|
83
|
+
this._containerElem.classList.add("label__container--disabled");
|
|
78
84
|
this._labelElem.classList.add("lbl--disabled");
|
|
79
85
|
this._labelElem.classList.add("cursor-disable");
|
|
80
86
|
}
|
|
@@ -83,19 +89,23 @@ let EzChip = class {
|
|
|
83
89
|
// Lifecycle web component
|
|
84
90
|
//---------------------------------------------
|
|
85
91
|
componentDidLoad() {
|
|
86
|
-
if (this.
|
|
92
|
+
if (this._containerElem) {
|
|
87
93
|
this.observeValue();
|
|
88
94
|
this.observeEnabled();
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
render() {
|
|
92
|
-
return (index.h("
|
|
98
|
+
return (index.h("button", { onClick: (ev) => this.handleClick(ev), class: "label__container" + (this.removePosition === "left" ? " label__container--row-reverse" : ""), ref: (el) => this._containerElem = el }, index.h("div", { class: "label__content" }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), index.h("label", { class: "lbl " + (this.value ? "lbl--active " : ""), ref: (el) => this._labelElem = el, title: this.label }, this.formatLabel()), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })), this.mode !== 'action' && this.removePosition && index.h("ez-icon", { class: "btn-close", size: "small", "icon-name": "close" })));
|
|
93
99
|
}
|
|
94
100
|
static get watchers() { return {
|
|
95
101
|
"value": ["observeValue"],
|
|
96
102
|
"enabled": ["observeEnabled"]
|
|
97
103
|
}; }
|
|
98
104
|
};
|
|
105
|
+
var ChipSize;
|
|
106
|
+
(function (ChipSize) {
|
|
107
|
+
ChipSize[ChipSize["CHAR_LIMIT"] = 28] = "CHAR_LIMIT";
|
|
108
|
+
})(ChipSize || (ChipSize = {}));
|
|
99
109
|
EzChip.style = ezChipCss;
|
|
100
110
|
|
|
101
111
|
exports.ez_chip = EzChip;
|