@sme.up/ketchup 11.0.0-SNAPSHOT-20241118161105 → 11.0.0-SNAPSHOT-20241118171002
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/{f-button-54d0f017.js → f-button-e29b456b.js} +2 -2
- package/dist/cjs/f-button-e29b456b.js.map +1 -0
- package/dist/cjs/{f-cell-99c84f1c.js → f-cell-121c7e46.js} +2 -2
- package/dist/cjs/{f-cell-99c84f1c.js.map → f-cell-121c7e46.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-af69bd51.js → f-paginator-utils-32b87c09.js} +2 -2
- package/dist/cjs/{f-paginator-utils-af69bd51.js.map → f-paginator-utils-32b87c09.js.map} +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +8 -4
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-box.cjs.entry.js +3 -3
- package/dist/cjs/kup-calendar.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +2 -2
- package/dist/cjs/kup-dashboard.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-input-panel.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/collection/components/kup-dialog/kup-dialog.js +5 -1
- package/dist/collection/components/kup-dialog/kup-dialog.js.map +1 -1
- package/dist/collection/f-components/f-button/f-button.js +1 -1
- package/dist/collection/f-components/f-button/f-button.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +6 -2
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/esm/{f-button-79148bc6.js → f-button-bfe24f7d.js} +2 -2
- package/dist/esm/f-button-bfe24f7d.js.map +1 -0
- package/dist/esm/{f-cell-84b76695.js → f-cell-81cf8d6b.js} +2 -2
- package/dist/esm/{f-cell-84b76695.js.map → f-cell-81cf8d6b.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-7fd2bb01.js → f-paginator-utils-d7b3f359.js} +2 -2
- package/dist/esm/{f-paginator-utils-7fd2bb01.js.map → f-paginator-utils-d7b3f359.js.map} +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js +8 -4
- package/dist/esm/kup-autocomplete_28.entry.js.map +1 -1
- package/dist/esm/kup-box.entry.js +3 -3
- package/dist/esm/kup-calendar.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +2 -2
- package/dist/esm/kup-dashboard.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +2 -2
- package/dist/esm/kup-input-panel.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-cda00e9e.entry.js → p-46812f71.entry.js} +2 -2
- package/dist/ketchup/{p-e1c69d06.entry.js → p-76f536fc.entry.js} +2 -2
- package/dist/ketchup/{p-0f8be7d2.entry.js → p-834ad695.entry.js} +2 -2
- package/dist/ketchup/{p-c8654f3e.entry.js → p-ba5d1b55.entry.js} +3 -3
- package/dist/ketchup/p-ba5d1b55.entry.js.map +1 -0
- package/dist/ketchup/{p-b2a20978.entry.js → p-befa2827.entry.js} +2 -2
- package/dist/ketchup/{p-f1d7efa6.entry.js → p-c22e720d.entry.js} +2 -2
- package/dist/ketchup/{p-c398ed83.js → p-d138aa2d.js} +2 -2
- package/dist/ketchup/{p-6b510eea.entry.js → p-dfae63d8.entry.js} +2 -2
- package/dist/ketchup/p-e3032f6d.js +2 -0
- package/dist/ketchup/p-e3032f6d.js.map +1 -0
- package/dist/ketchup/p-e3370565.js +2 -0
- package/dist/ketchup/{p-1f0bd3bc.js.map → p-e3370565.js.map} +1 -1
- package/dist/ketchup/p-e3dd0ecb.entry.js +2 -0
- package/dist/ketchup/{p-c71c14ea.entry.js.map → p-e3dd0ecb.entry.js.map} +1 -1
- package/dist/ketchup/{p-890e9f50.entry.js → p-fc202622.entry.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/f-button-54d0f017.js.map +0 -1
- package/dist/esm/f-button-79148bc6.js.map +0 -1
- package/dist/ketchup/p-1f0bd3bc.js +0 -2
- package/dist/ketchup/p-c71c14ea.entry.js +0 -2
- package/dist/ketchup/p-c8654f3e.entry.js.map +0 -1
- package/dist/ketchup/p-cc32b7a2.js +0 -2
- package/dist/ketchup/p-cc32b7a2.js.map +0 -1
- /package/dist/ketchup/{p-cda00e9e.entry.js.map → p-46812f71.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e1c69d06.entry.js.map → p-76f536fc.entry.js.map} +0 -0
- /package/dist/ketchup/{p-0f8be7d2.entry.js.map → p-834ad695.entry.js.map} +0 -0
- /package/dist/ketchup/{p-b2a20978.entry.js.map → p-befa2827.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f1d7efa6.entry.js.map → p-c22e720d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c398ed83.js.map → p-d138aa2d.js.map} +0 -0
- /package/dist/ketchup/{p-6b510eea.entry.js.map → p-dfae63d8.entry.js.map} +0 -0
- /package/dist/ketchup/{p-890e9f50.entry.js.map → p-fc202622.entry.js.map} +0 -0
|
@@ -8,13 +8,13 @@ const kupDataTableHelper = require('./kup-data-table-helper-00427a69.js');
|
|
|
8
8
|
const fImage = require('./f-image-8dbf27a2.js');
|
|
9
9
|
const fChip = require('./f-chip-29e9258a.js');
|
|
10
10
|
const GenericVariables = require('./GenericVariables-1d52ba57.js');
|
|
11
|
-
const fCell = require('./f-cell-
|
|
12
|
-
const fPaginatorUtils = require('./f-paginator-utils-
|
|
11
|
+
const fCell = require('./f-cell-121c7e46.js');
|
|
12
|
+
const fPaginatorUtils = require('./f-paginator-utils-32b87c09.js');
|
|
13
13
|
const fTextFieldMdc = require('./f-text-field-mdc-2a3c8c01.js');
|
|
14
14
|
require('./kup-dates-3fc9697c.js');
|
|
15
15
|
require('./f-checkbox-4e8f39f8.js');
|
|
16
16
|
require('./f-text-field-4226081f.js');
|
|
17
|
-
require('./f-button-
|
|
17
|
+
require('./f-button-e29b456b.js');
|
|
18
18
|
require('./f-button-declarations-76ef9f87.js');
|
|
19
19
|
require('./component-cb3b32f5.js');
|
|
20
20
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index$4 = require('./index-4e97f23f.js');
|
|
6
6
|
const kupManager = require('./kup-manager-fe741ac9.js');
|
|
7
7
|
const GenericVariables = require('./GenericVariables-1d52ba57.js');
|
|
8
|
-
const fButton = require('./f-button-
|
|
8
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
9
9
|
const fChip = require('./f-chip-29e9258a.js');
|
|
10
10
|
const kupDates = require('./kup-dates-3fc9697c.js');
|
|
11
11
|
require('./f-button-declarations-76ef9f87.js');
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-4e97f23f.js');
|
|
6
6
|
const kupManager = require('./kup-manager-fe741ac9.js');
|
|
7
7
|
const GenericVariables = require('./GenericVariables-1d52ba57.js');
|
|
8
|
-
const fButton = require('./f-button-
|
|
9
|
-
const fCell = require('./f-cell-
|
|
8
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
9
|
+
const fCell = require('./f-cell-121c7e46.js');
|
|
10
10
|
require('./kup-dates-3fc9697c.js');
|
|
11
11
|
require('./f-button-declarations-76ef9f87.js');
|
|
12
12
|
require('./f-image-8dbf27a2.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4e97f23f.js');
|
|
6
|
-
const fButton = require('./f-button-
|
|
6
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
7
7
|
const fCheckbox = require('./f-checkbox-4e8f39f8.js');
|
|
8
8
|
const fTextField = require('./f-text-field-4226081f.js');
|
|
9
9
|
const fTextFieldMdc = require('./f-text-field-mdc-2a3c8c01.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4e97f23f.js');
|
|
6
|
-
const fButton = require('./f-button-
|
|
6
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
7
7
|
const fButtonDeclarations = require('./f-button-declarations-76ef9f87.js');
|
|
8
8
|
const fImage = require('./f-image-8dbf27a2.js');
|
|
9
9
|
const kupManager = require('./kup-manager-fe741ac9.js');
|
|
@@ -6,9 +6,9 @@ const index = require('./index-4e97f23f.js');
|
|
|
6
6
|
const kupManager = require('./kup-manager-fe741ac9.js');
|
|
7
7
|
const GenericVariables = require('./GenericVariables-1d52ba57.js');
|
|
8
8
|
const fImage = require('./f-image-8dbf27a2.js');
|
|
9
|
-
const fButton = require('./f-button-
|
|
9
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
10
10
|
const fButtonDeclarations = require('./f-button-declarations-76ef9f87.js');
|
|
11
|
-
const fCell = require('./f-cell-
|
|
11
|
+
const fCell = require('./f-cell-121c7e46.js');
|
|
12
12
|
const component = require('./component-cb3b32f5.js');
|
|
13
13
|
require('./kup-dates-3fc9697c.js');
|
|
14
14
|
require('./f-checkbox-4e8f39f8.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4e97f23f.js');
|
|
6
|
-
const fButton = require('./f-button-
|
|
7
|
-
const fCell = require('./f-cell-
|
|
6
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
7
|
+
const fCell = require('./f-cell-121c7e46.js');
|
|
8
8
|
const kupManager = require('./kup-manager-fe741ac9.js');
|
|
9
9
|
const fTextFieldMdc = require('./f-text-field-mdc-2a3c8c01.js');
|
|
10
10
|
const fTypography = require('./f-typography-024bace8.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-4e97f23f.js');
|
|
6
6
|
const kupManager = require('./kup-manager-fe741ac9.js');
|
|
7
7
|
const GenericVariables = require('./GenericVariables-1d52ba57.js');
|
|
8
|
-
const fButton = require('./f-button-
|
|
8
|
+
const fButton = require('./f-button-e29b456b.js');
|
|
9
9
|
require('./kup-dates-3fc9697c.js');
|
|
10
10
|
require('./f-button-declarations-76ef9f87.js');
|
|
11
11
|
require('./f-image-8dbf27a2.js');
|
|
@@ -137,7 +137,11 @@ export class KupDialog {
|
|
|
137
137
|
'--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',
|
|
138
138
|
'--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',
|
|
139
139
|
};
|
|
140
|
-
|
|
140
|
+
const headerSlot = this.rootElement.querySelector('[slot="header"]');
|
|
141
|
+
if (headerSlot) {
|
|
142
|
+
__classPrivateFieldSet(this, _KupDialog_header, headerSlot, "f");
|
|
143
|
+
}
|
|
144
|
+
return (h(Host, { key: 'cd86c206a6f003f913a288b40b41127b96cd87ea', "fade-in": true, style: style }, h("style", { key: '6c691bca16376a84bf6291273baacb60e438c671' }, __classPrivateFieldGet(this, _KupDialog_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'f6dcfb0a6d0a4ba1f27b08d5b67e5527d6690739', id: componentWrapperId }, this.header ? (h("div", { class: "header", ref: (el) => (__classPrivateFieldSet(this, _KupDialog_header, el, "f")) }, this.header.title ? (h("div", { class: "header__title" }, this.header.title)) : null, ((_a = this.header.icons) === null || _a === void 0 ? void 0 : _a.close) ? (h(FImage, { onClick: () => this.close(), sizeX: "1.25em", sizeY: "100%", resource: "clear", wrapperClass: "header__close" })) : null)) : headerSlot ? (h("slot", { name: "header" })) : null, h("div", { key: 'f4785e7790c9120a25e00483ca4b427d824684ed', class: "content" }, h("slot", { key: 'e32121655c6d1cb1fa6d686ef5e5306b8a5ea3a0', name: "content" })))));
|
|
141
145
|
}
|
|
142
146
|
disconnectedCallback() {
|
|
143
147
|
if (this.modal) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kup-dialog.js","sourceRoot":"","sources":["../../../src/components/kup-dialog/kup-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,WAAW,EACX,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAM5E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAIH,cAAc,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAOnF,MAAM,OAAO,SAAS;;QA+ClB,qDAAqD;QACrD,qDAAqD;QACrD,qDAAqD;QAErD,4BAAuB,IAAI,EAAC;QAC5B,gCAAc,kBAAkB,EAAE,EAAC;QACnC,qCAAmB,CAAC,EAAC;0BAvCqB,EAAE,OAAO,EAAE,IAAI,EAAE;2BAMrC,EAAE;sBAKU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;qBAK5B,EAAE,oBAAoB,EAAE,IAAI,EAAE;yBAK1C,IAAI;qBAKR,MAAM;qBAKN,MAAM;;IA8BtB,qDAAqD;IACrD,qDAAqD;IACrD,qDAAqD;IAErD;;OAEG;IAEH,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,IAAI;YACV,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE;SAC1B,CAAC,CAAC;QACH,IAAI,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { FImage } from '../../f-components/f-image/f-image';\nimport { kupManagerInstance } from '../../managers/kup-manager/kup-manager';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n KupDialogAutoCenter,\n KupDialogHeader,\n KupDialogModal,\n KupDialogProps,\n} from './kup-dialog-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\n\n@Component({\n tag: 'kup-dialog',\n styleUrl: 'kup-dialog.scss',\n shadow: true,\n})\nexport class KupDialog {\n /**\n * References the root HTML element of the component (<kup-dialog>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Auto centers the dialog relatively to the viewport.\n * @default \"{ onReady: true }\"\n */\n @Prop() autoCenter: KupDialogAutoCenter = { onReady: true };\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle = '';\n /**\n * Header options.\n * @default \"{ icons: { close: true } }\"\n */\n @Prop() header: KupDialogHeader = { icons: { close: true } };\n /**\n * Set of options to display the dialog as a modal.\n * @default \"{ closeOnBackdropClick: true }\"\n */\n @Prop() modal: KupDialogModal = { closeOnBackdropClick: true };\n /**\n * Sets whether the dialog is resizable or not.\n * @default \"true\"\n */\n @Prop() resizable = true;\n /**\n * The width of the dialog, defaults to auto. Accepts any valid CSS format (px, %, vw, etc.).\n * @default \"auto\"\n */\n @Prop() sizeX = 'auto';\n /**\n * The height of the card, defaults to auto. Accepts any valid CSS format (px, %, vh, etc.).\n * @default \"auto\"\n */\n @Prop() sizeY = 'auto';\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #header: HTMLElement = null;\n #kupManager = kupManagerInstance();\n #recalcSafeguard = 0;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-dialog-close',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupClose: EventEmitter<KupEventPayload>;\n\n @Event({\n eventName: 'kup-dialog-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Closes the dialog detaching it from the DOM.\n */\n @Method()\n async close(): Promise<void> {\n this.kupClose.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.rootElement.remove();\n }\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupDialogProps, descriptions);\n }\n /**\n * Places the dialog at the center of the screen.\n */\n @Method()\n async recalcPosition(): Promise<void> {\n const rect = this.rootElement.getBoundingClientRect();\n if (!rect.x && !rect.y && !rect.height && !rect.width) {\n this.#kupManager.debug.logMessage(\n this,\n `recalcPosition() ran before the component finished being drawn. Running again (attempt #${\n this.#recalcSafeguard\n }).`,\n KupDebugCategory.INFO\n );\n if (this.#recalcSafeguard < 50) {\n this.#recalcSafeguard++;\n setTimeout(async () => this.recalcPosition(), 50);\n return;\n } else {\n this.#kupManager.debug.logMessage(\n this,\n `Too many attempts centering the dialog.`,\n KupDebugCategory.WARNING\n );\n }\n }\n this.#recalcSafeguard = 0;\n const left = window.innerWidth / 2 - rect.width / 2;\n const top = window.innerHeight / 2 - rect.height / 2 + window.scrollY;\n this.rootElement.style.setProperty('--kup_dialog_left', left + 'px');\n this.rootElement.style.setProperty('--kup_dialog_top', top + 'px');\n this.rootElement.removeAttribute('fade-in');\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupDialogProps, props);\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.theme.register(this);\n }\n\n componentDidLoad() {\n this.#kupManager.interact.dialogify(\n this.rootElement,\n this.#header ? this.#header : null,\n !this.resizable\n );\n if (this.autoCenter?.onReady) {\n this.recalcPosition();\n } else {\n this.rootElement.removeAttribute('fade-in');\n }\n if (this.modal) {\n this.#kupManager.interact.showModalBackdrop(\n this.modal.closeOnBackdropClick\n ? () => {\n this.close();\n }\n : null\n );\n }\n this.kupReady.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const style = {\n '--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',\n '--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',\n };\n\n return (\n <Host fade-in style={style}>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n {this.header ? (\n <div class=\"header\" ref={(el) => (this.#header = el)}>\n {this.header.title ? (\n <div class=\"header__title\">\n {this.header.title}\n </div>\n ) : null}\n {this.header.icons?.close ? (\n <FImage\n onClick={() => this.close()}\n sizeX=\"1.25em\"\n sizeY=\"100%\"\n resource=\"clear\"\n wrapperClass=\"header__close\"\n ></FImage>\n ) : null}\n </div>\n ) : (\n <slot\n name=\"header\"\n ref={(el: HTMLElement) => (this.#header = el)}\n ></slot>\n )}\n <div class=\"content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.modal) {\n this.#kupManager.interact.hideModalBackdrop();\n }\n this.#kupManager.theme.unregister(this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"kup-dialog.js","sourceRoot":"","sources":["../../../src/components/kup-dialog/kup-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,WAAW,EACX,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAM5E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAIH,cAAc,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAOnF,MAAM,OAAO,SAAS;;QA+ClB,qDAAqD;QACrD,qDAAqD;QACrD,qDAAqD;QAErD,4BAAuB,IAAI,EAAC;QAC5B,gCAAc,kBAAkB,EAAE,EAAC;QACnC,qCAAmB,CAAC,EAAC;0BAvCqB,EAAE,OAAO,EAAE,IAAI,EAAE;2BAMrC,EAAE;sBAKU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;qBAK5B,EAAE,oBAAoB,EAAE,IAAI,EAAE;yBAK1C,IAAI;qBAKR,MAAM;qBAKN,MAAM;;IA8BtB,qDAAqD;IACrD,qDAAqD;IACrD,qDAAqD;IAErD;;OAEG;IAEH,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,QAAQ,CAAC,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { FImage } from '../../f-components/f-image/f-image';\nimport { kupManagerInstance } from '../../managers/kup-manager/kup-manager';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n KupDialogAutoCenter,\n KupDialogHeader,\n KupDialogModal,\n KupDialogProps,\n} from './kup-dialog-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\n\n@Component({\n tag: 'kup-dialog',\n styleUrl: 'kup-dialog.scss',\n shadow: true,\n})\nexport class KupDialog {\n /**\n * References the root HTML element of the component (<kup-dialog>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Auto centers the dialog relatively to the viewport.\n * @default \"{ onReady: true }\"\n */\n @Prop() autoCenter: KupDialogAutoCenter = { onReady: true };\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle = '';\n /**\n * Header options.\n * @default \"{ icons: { close: true } }\"\n */\n @Prop() header: KupDialogHeader = { icons: { close: true } };\n /**\n * Set of options to display the dialog as a modal.\n * @default \"{ closeOnBackdropClick: true }\"\n */\n @Prop() modal: KupDialogModal = { closeOnBackdropClick: true };\n /**\n * Sets whether the dialog is resizable or not.\n * @default \"true\"\n */\n @Prop() resizable = true;\n /**\n * The width of the dialog, defaults to auto. Accepts any valid CSS format (px, %, vw, etc.).\n * @default \"auto\"\n */\n @Prop() sizeX = 'auto';\n /**\n * The height of the card, defaults to auto. Accepts any valid CSS format (px, %, vh, etc.).\n * @default \"auto\"\n */\n @Prop() sizeY = 'auto';\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #header: HTMLElement = null;\n #kupManager = kupManagerInstance();\n #recalcSafeguard = 0;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-dialog-close',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupClose: EventEmitter<KupEventPayload>;\n\n @Event({\n eventName: 'kup-dialog-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Closes the dialog detaching it from the DOM.\n */\n @Method()\n async close(): Promise<void> {\n this.kupClose.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.rootElement.remove();\n }\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupDialogProps, descriptions);\n }\n /**\n * Places the dialog at the center of the screen.\n */\n @Method()\n async recalcPosition(): Promise<void> {\n const rect = this.rootElement.getBoundingClientRect();\n if (!rect.x && !rect.y && !rect.height && !rect.width) {\n this.#kupManager.debug.logMessage(\n this,\n `recalcPosition() ran before the component finished being drawn. Running again (attempt #${\n this.#recalcSafeguard\n }).`,\n KupDebugCategory.INFO\n );\n if (this.#recalcSafeguard < 50) {\n this.#recalcSafeguard++;\n setTimeout(async () => this.recalcPosition(), 50);\n return;\n } else {\n this.#kupManager.debug.logMessage(\n this,\n `Too many attempts centering the dialog.`,\n KupDebugCategory.WARNING\n );\n }\n }\n this.#recalcSafeguard = 0;\n const left = window.innerWidth / 2 - rect.width / 2;\n const top = window.innerHeight / 2 - rect.height / 2 + window.scrollY;\n this.rootElement.style.setProperty('--kup_dialog_left', left + 'px');\n this.rootElement.style.setProperty('--kup_dialog_top', top + 'px');\n this.rootElement.removeAttribute('fade-in');\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupDialogProps, props);\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.theme.register(this);\n }\n\n componentDidLoad() {\n this.#kupManager.interact.dialogify(\n this.rootElement,\n this.#header ? this.#header : null,\n !this.resizable\n );\n if (this.autoCenter?.onReady) {\n this.recalcPosition();\n } else {\n this.rootElement.removeAttribute('fade-in');\n }\n if (this.modal) {\n this.#kupManager.interact.showModalBackdrop(\n this.modal.closeOnBackdropClick\n ? () => {\n this.close();\n }\n : null\n );\n }\n this.kupReady.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const style = {\n '--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',\n '--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',\n };\n\n const headerSlot = this.rootElement.querySelector('[slot=\"header\"]');\n if (headerSlot) {\n this.#header = headerSlot as HTMLElement;\n }\n\n return (\n <Host fade-in style={style}>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n {this.header ? (\n <div class=\"header\" ref={(el) => (this.#header = el)}>\n {this.header.title ? (\n <div class=\"header__title\">\n {this.header.title}\n </div>\n ) : null}\n {this.header.icons?.close ? (\n <FImage\n onClick={() => this.close()}\n sizeX=\"1.25em\"\n sizeY=\"100%\"\n resource=\"clear\"\n wrapperClass=\"header__close\"\n ></FImage>\n ) : null}\n </div>\n ) : headerSlot ? (\n <slot name=\"header\"></slot>\n ) : null}\n <div class=\"content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.modal) {\n this.#kupManager.interact.hideModalBackdrop();\n }\n this.#kupManager.theme.unregister(this);\n }\n}\n"]}
|
|
@@ -68,7 +68,7 @@ function renderButton(props) {
|
|
|
68
68
|
'button--raised': isRaised ? true : false,
|
|
69
69
|
'button--no-label': !props.label || props.label === ' ' ? true : false,
|
|
70
70
|
'button--with-spinner': props.showSpinner && !props.disabled ? true : false,
|
|
71
|
-
[`button--${props.sizing}`]:
|
|
71
|
+
[`button--${props.sizing || 'small'}`]: true,
|
|
72
72
|
[`button--${props.contentAlign}`]: props.contentAlign ? true : false,
|
|
73
73
|
};
|
|
74
74
|
const classLabelObj = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"f-button.js","sourceRoot":"","sources":["../../../src/f-components/f-button/f-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAS,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAgB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AAErD,MAAM,CAAC,MAAM,OAAO,GAAsC,CACtD,KAAmB,EACnB,QAAiB,EACnB,EAAE;IACA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE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AAO,EACtB,KAAK,EAAE,qBAAqB,EAC5B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBACvB,KAAK,CAAC,KAAK;QAEtB,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CACpC,EAAC,MAAM,oBACC,WAAW,IACf,QAAQ,EACJ,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAE3D,mBAAmB,EAAE,KAAK,CAAC,eAAe,EAC1C,YAAY,EAAE,4BAA4B,IAC5C,CACL,CAAC,CAAC,CAAC,IAAI;QACP,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACpC,EAAC,MAAM,oBACC,WAAW,IACf,QAAQ,EAAE,KAAK,CAAC,IAAI,EACpB,mBAAmB,EAAE,KAAK,CAAC,eAAe,EAC1C,YAAY,EAAE,kDAAkD,IAClE,CACL,CAAC,CAAC,CAAC,IAAI;QACP,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CACpC,WAAK,KAAK,EAAC,gCAAgC;YACvC,YAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CACT,CAAC,CAAC,CAAC,SAAS,CACR,CACZ,CAAC;AACN,CAAC","sourcesContent":["import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { FButtonProps, FButtonStyling } from './f-button-declarations';\nimport { FImage } from '../f-image/f-image';\nimport { FImageProps } from '../f-image/f-image-declarations';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FButton: FunctionalComponent<FButtonProps> = (\n props: FButtonProps,\n children: VNode[]\n) => {\n if (!props.styling) {\n props.styling = FButtonStyling.RAISED;\n }\n if (!props.label && !props.icon) {\n return;\n }\n const isIconButton: boolean = !!(\n props.styling.toLowerCase() === FButtonStyling.ICON ||\n (props.styling.toLowerCase() === FButtonStyling.RAISED &&\n props.icon &&\n (props.label === null || props.label === undefined))\n );\n const classObj: Record<string, boolean> = {\n 'f-button': true,\n 'kup-danger': props.danger,\n 'kup-full-height': props.fullHeight,\n 'kup-full-width': props.fullWidth,\n 'kup-info': props.info,\n 'kup-large': props.large,\n 'kup-pulsating': props.pulsating,\n 'kup-shaped': props.shaped,\n 'kup-secondary': props.secondary,\n 'kup-slim': props.slim,\n 'kup-success': props.success,\n 'kup-warning': props.warning,\n 'kup-neutral': props.neutral,\n 'kup-black-mode': props.blackMode,\n [props.wrapperClass]: !!props.wrapperClass,\n };\n return (\n <div\n class={classObj}\n {...props.dataSet}\n id={props.id}\n title={props.title}\n >\n {isIconButton ? renderIconButton(props) : renderButton(props)}\n {children}\n </div>\n );\n};\n\n/*-------------------------------------------------*/\n/* M e t h o d s */\n/*-------------------------------------------------*/\n\nfunction renderButton(props: FButtonProps): VNode {\n const isFlat: boolean = props.styling.toLowerCase() === FButtonStyling.FLAT;\n const isFloating: boolean =\n props.styling.toLowerCase() === FButtonStyling.FLOATING;\n const isIcon: boolean = props.styling.toLowerCase() === FButtonStyling.ICON;\n const isOutlined: boolean =\n props.styling.toLowerCase() === FButtonStyling.OUTLINED;\n const isRaised: boolean =\n !isFlat && !isFloating && !isOutlined && !isIcon ? true : false;\n\n const propsFImage: FImageProps = {\n color: props.neutral\n ? `var(--kup-text-primary)`\n : props.disabled\n ? `var(--kup_button_text_color_disabled)`\n : isOutlined || isFlat\n ? `var(--kup_button_text_color)` // metter colore per sfondo bianco\n : `var(--kup_button_text_color)`,\n resource: props.icon,\n placeholderResource: props.placeholderIcon,\n sizeX: isFloating ? '1.75em' : '1.475em',\n sizeY: isFloating ? '1.75em' : '1.475em',\n wrapperClass: 'button__icon kup-icon',\n };\n if (props.showSpinner) propsFImage.wrapperClass += ' content--hidden';\n\n const classObj: Record<string, boolean> = {\n button: true,\n 'button--disabled': props.disabled ? true : false,\n 'button--floating': isFloating ? true : false,\n 'button--flat': isFlat ? true : false,\n 'button--outlined': isOutlined ? true : false,\n 'button--raised': isRaised ? true : false,\n 'button--no-label': !props.label || props.label === ' ' ? true : false,\n 'button--with-spinner':\n props.showSpinner && !props.disabled ? true : false,\n [`button--${props.sizing}`]: props.sizing ? true : false,\n [`button--${props.contentAlign}`]: props.contentAlign ? true : false,\n };\n\n const classLabelObj: Record<string, boolean> = {\n button__label: true,\n 'content--hidden': props.showSpinner && !props.disabled ? true : false,\n };\n\n const styleSpinnerContainer: Record<string, string> = {\n '--kup_button_spinner_height': propsFImage.sizeY,\n };\n\n return (\n <button\n type={props.buttonType ? props.buttonType : 'button'}\n class={classObj}\n disabled={props.disabled}\n onBlur={props.onBlur}\n onClick={props.onClick}\n onFocus={props.onFocus}\n style={styleSpinnerContainer}\n aria-label={props.title}\n >\n {props.trailingIcon\n ? [\n props.label ? (\n <span class={classLabelObj}>{props.label}</span>\n ) : undefined,\n props.icon ? <FImage {...propsFImage} /> : undefined,\n ]\n : [\n props.icon ? <FImage {...propsFImage} /> : undefined,\n props.label ? (\n <span class={classLabelObj}>{props.label}</span>\n ) : undefined,\n ]}\n {props.showSpinner && !props.disabled ? (\n <div class=\"button__spinner-container\">\n <slot name=\"spinner\"></slot>\n </div>\n ) : undefined}\n </button>\n );\n}\n\nfunction renderIconButton(props: FButtonProps): VNode {\n const propsFImage: FImageProps = {\n color: props.neutral\n ? `var(--kup-text-primary)`\n : props.disabled\n ? `var(--kup_button_text_color_disabled)`\n : `var(--kup_button_text_color)`,\n sizeX: props.large ? 'calc(1.75em * 1.5)' : '1.75em',\n sizeY: props.large ? 'calc(1.75em * 1.5)' : '1.75em',\n };\n\n const classObj: Record<string, boolean> = {\n 'icon-button': true,\n 'button--disabled': props.disabled ? true : false,\n 'icon-button--on': props.toggable && props.checked ? true : false,\n toggable: props.toggable ? true : false,\n 'button--with-spinner':\n props.showSpinner && !props.disabled ? true : false,\n };\n\n const styleSpinnerContainer: Record<string, string> = {\n '--kup_button_spinner_height': propsFImage.sizeY,\n '--kup_button_spinner_width': propsFImage.sizeX,\n };\n\n const iconOff: string = props.iconOff\n ? props.iconOff\n : props.icon + '_border';\n\n return (\n <button\n type={props.buttonType ? props.buttonType : 'button'}\n class={classObj}\n disabled={props.disabled}\n onClick={props.onClick}\n style={styleSpinnerContainer}\n value={props.checked ? 'on' : 'off'}\n aria-label={props.title}\n >\n {!props.showSpinner || props.disabled ? (\n <FImage\n {...propsFImage}\n resource={\n props.toggable && !props.checked ? iconOff : props.icon\n }\n placeholderResource={props.placeholderIcon}\n wrapperClass={`icon-button__icon kup-icon`}\n />\n ) : null}\n {props.toggable && !props.showSpinner ? (\n <FImage\n {...propsFImage}\n resource={props.icon}\n placeholderResource={props.placeholderIcon}\n wrapperClass={`icon-button__icon icon-button__icon--on kup-icon`}\n />\n ) : null}\n {props.showSpinner && !props.disabled ? (\n <div class=\"icon-button__spinner-container\">\n <slot name=\"spinner\"></slot>\n </div>\n ) : undefined}\n </button>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"f-button.js","sourceRoot":"","sources":["../../../src/f-components/f-button/f-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAS,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAgB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AAErD,MAAM,CAAC,MAAM,OAAO,GAAsC,CACtD,KAAmB,EACnB,QAAiB,EACnB,EAAE;IACA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACjB,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC;IAC1C,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,EAA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,QAAQ,CAAC,CAAC,CAAC,CACpC,EAAC,MAAM,oBACC,WAAW,IACf,QAAQ,EACJ,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAE3D,mBAAmB,EAAE,KAAK,CAAC,eAAe,EAC1C,YAAY,EAAE,4BAA4B,IAC5C,CACL,CAAC,CAAC,CAAC,IAAI;QACP,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACpC,EAAC,MAAM,oBACC,WAAW,IACf,QAAQ,EAAE,KAAK,CAAC,IAAI,EACpB,mBAAmB,EAAE,KAAK,CAAC,eAAe,EAC1C,YAAY,EAAE,kDAAkD,IAClE,CACL,CAAC,CAAC,CAAC,IAAI;QACP,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CACpC,WAAK,KAAK,EAAC,gCAAgC;YACvC,YAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CACT,CAAC,CAAC,CAAC,SAAS,CACR,CACZ,CAAC;AACN,CAAC","sourcesContent":["import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { FButtonProps, FButtonStyling } from './f-button-declarations';\nimport { FImage } from '../f-image/f-image';\nimport { FImageProps } from '../f-image/f-image-declarations';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FButton: FunctionalComponent<FButtonProps> = (\n props: FButtonProps,\n children: VNode[]\n) => {\n if (!props.styling) {\n props.styling = FButtonStyling.RAISED;\n }\n if (!props.label && !props.icon) {\n return;\n }\n const isIconButton: boolean = !!(\n props.styling.toLowerCase() === FButtonStyling.ICON ||\n (props.styling.toLowerCase() === FButtonStyling.RAISED &&\n props.icon &&\n (props.label === null || props.label === undefined))\n );\n const classObj: Record<string, boolean> = {\n 'f-button': true,\n 'kup-danger': props.danger,\n 'kup-full-height': props.fullHeight,\n 'kup-full-width': props.fullWidth,\n 'kup-info': props.info,\n 'kup-large': props.large,\n 'kup-pulsating': props.pulsating,\n 'kup-shaped': props.shaped,\n 'kup-secondary': props.secondary,\n 'kup-slim': props.slim,\n 'kup-success': props.success,\n 'kup-warning': props.warning,\n 'kup-neutral': props.neutral,\n 'kup-black-mode': props.blackMode,\n [props.wrapperClass]: !!props.wrapperClass,\n };\n return (\n <div\n class={classObj}\n {...props.dataSet}\n id={props.id}\n title={props.title}\n >\n {isIconButton ? renderIconButton(props) : renderButton(props)}\n {children}\n </div>\n );\n};\n\n/*-------------------------------------------------*/\n/* M e t h o d s */\n/*-------------------------------------------------*/\n\nfunction renderButton(props: FButtonProps): VNode {\n const isFlat: boolean = props.styling.toLowerCase() === FButtonStyling.FLAT;\n const isFloating: boolean =\n props.styling.toLowerCase() === FButtonStyling.FLOATING;\n const isIcon: boolean = props.styling.toLowerCase() === FButtonStyling.ICON;\n const isOutlined: boolean =\n props.styling.toLowerCase() === FButtonStyling.OUTLINED;\n const isRaised: boolean =\n !isFlat && !isFloating && !isOutlined && !isIcon ? true : false;\n\n const propsFImage: FImageProps = {\n color: props.neutral\n ? `var(--kup-text-primary)`\n : props.disabled\n ? `var(--kup_button_text_color_disabled)`\n : isOutlined || isFlat\n ? `var(--kup_button_text_color)` // metter colore per sfondo bianco\n : `var(--kup_button_text_color)`,\n resource: props.icon,\n placeholderResource: props.placeholderIcon,\n sizeX: isFloating ? '1.75em' : '1.475em',\n sizeY: isFloating ? '1.75em' : '1.475em',\n wrapperClass: 'button__icon kup-icon',\n };\n if (props.showSpinner) propsFImage.wrapperClass += ' content--hidden';\n\n const classObj: Record<string, boolean> = {\n button: true,\n 'button--disabled': props.disabled ? true : false,\n 'button--floating': isFloating ? true : false,\n 'button--flat': isFlat ? true : false,\n 'button--outlined': isOutlined ? true : false,\n 'button--raised': isRaised ? true : false,\n 'button--no-label': !props.label || props.label === ' ' ? true : false,\n 'button--with-spinner':\n props.showSpinner && !props.disabled ? true : false,\n [`button--${props.sizing || 'small'}`]: true,\n [`button--${props.contentAlign}`]: props.contentAlign ? true : false,\n };\n\n const classLabelObj: Record<string, boolean> = {\n button__label: true,\n 'content--hidden': props.showSpinner && !props.disabled ? true : false,\n };\n\n const styleSpinnerContainer: Record<string, string> = {\n '--kup_button_spinner_height': propsFImage.sizeY,\n };\n\n return (\n <button\n type={props.buttonType ? props.buttonType : 'button'}\n class={classObj}\n disabled={props.disabled}\n onBlur={props.onBlur}\n onClick={props.onClick}\n onFocus={props.onFocus}\n style={styleSpinnerContainer}\n aria-label={props.title}\n >\n {props.trailingIcon\n ? [\n props.label ? (\n <span class={classLabelObj}>{props.label}</span>\n ) : undefined,\n props.icon ? <FImage {...propsFImage} /> : undefined,\n ]\n : [\n props.icon ? <FImage {...propsFImage} /> : undefined,\n props.label ? (\n <span class={classLabelObj}>{props.label}</span>\n ) : undefined,\n ]}\n {props.showSpinner && !props.disabled ? (\n <div class=\"button__spinner-container\">\n <slot name=\"spinner\"></slot>\n </div>\n ) : undefined}\n </button>\n );\n}\n\nfunction renderIconButton(props: FButtonProps): VNode {\n const propsFImage: FImageProps = {\n color: props.neutral\n ? `var(--kup-text-primary)`\n : props.disabled\n ? `var(--kup_button_text_color_disabled)`\n : `var(--kup_button_text_color)`,\n sizeX: props.large ? 'calc(1.75em * 1.5)' : '1.75em',\n sizeY: props.large ? 'calc(1.75em * 1.5)' : '1.75em',\n };\n\n const classObj: Record<string, boolean> = {\n 'icon-button': true,\n 'button--disabled': props.disabled ? true : false,\n 'icon-button--on': props.toggable && props.checked ? true : false,\n toggable: props.toggable ? true : false,\n 'button--with-spinner':\n props.showSpinner && !props.disabled ? true : false,\n };\n\n const styleSpinnerContainer: Record<string, string> = {\n '--kup_button_spinner_height': propsFImage.sizeY,\n '--kup_button_spinner_width': propsFImage.sizeX,\n };\n\n const iconOff: string = props.iconOff\n ? props.iconOff\n : props.icon + '_border';\n\n return (\n <button\n type={props.buttonType ? props.buttonType : 'button'}\n class={classObj}\n disabled={props.disabled}\n onClick={props.onClick}\n style={styleSpinnerContainer}\n value={props.checked ? 'on' : 'off'}\n aria-label={props.title}\n >\n {!props.showSpinner || props.disabled ? (\n <FImage\n {...propsFImage}\n resource={\n props.toggable && !props.checked ? iconOff : props.icon\n }\n placeholderResource={props.placeholderIcon}\n wrapperClass={`icon-button__icon kup-icon`}\n />\n ) : null}\n {props.toggable && !props.showSpinner ? (\n <FImage\n {...propsFImage}\n resource={props.icon}\n placeholderResource={props.placeholderIcon}\n wrapperClass={`icon-button__icon icon-button__icon--on kup-icon`}\n />\n ) : null}\n {props.showSpinner && !props.disabled ? (\n <div class=\"icon-button__spinner-container\">\n <slot name=\"spinner\"></slot>\n </div>\n ) : undefined}\n </button>\n );\n}\n"]}
|
|
@@ -4365,7 +4365,7 @@ function renderButton(props) {
|
|
|
4365
4365
|
'button--raised': isRaised ? true : false,
|
|
4366
4366
|
'button--no-label': !props.label || props.label === ' ' ? true : false,
|
|
4367
4367
|
'button--with-spinner': props.showSpinner && !props.disabled ? true : false,
|
|
4368
|
-
[`button--${props.sizing}`]:
|
|
4368
|
+
[`button--${props.sizing || 'small'}`]: true,
|
|
4369
4369
|
[`button--${props.contentAlign}`]: props.contentAlign ? true : false,
|
|
4370
4370
|
};
|
|
4371
4371
|
const classLabelObj = {
|
|
@@ -20845,7 +20845,11 @@ const KupDialog = /*@__PURE__*/ proxyCustomElement(class KupDialog extends HTMLE
|
|
|
20845
20845
|
'--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',
|
|
20846
20846
|
'--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',
|
|
20847
20847
|
};
|
|
20848
|
-
|
|
20848
|
+
const headerSlot = this.rootElement.querySelector('[slot="header"]');
|
|
20849
|
+
if (headerSlot) {
|
|
20850
|
+
__classPrivateFieldSet$3(this, _KupDialog_header, headerSlot, "f");
|
|
20851
|
+
}
|
|
20852
|
+
return (h(Host, { key: 'cd86c206a6f003f913a288b40b41127b96cd87ea', "fade-in": true, style: style }, h("style", { key: '6c691bca16376a84bf6291273baacb60e438c671' }, __classPrivateFieldGet$4(this, _KupDialog_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'f6dcfb0a6d0a4ba1f27b08d5b67e5527d6690739', id: componentWrapperId }, this.header ? (h("div", { class: "header", ref: (el) => (__classPrivateFieldSet$3(this, _KupDialog_header, el, "f")) }, this.header.title ? (h("div", { class: "header__title" }, this.header.title)) : null, ((_a = this.header.icons) === null || _a === void 0 ? void 0 : _a.close) ? (h(FImage, { onClick: () => this.close(), sizeX: "1.25em", sizeY: "100%", resource: "clear", wrapperClass: "header__close" })) : null)) : headerSlot ? (h("slot", { name: "header" })) : null, h("div", { key: 'f4785e7790c9120a25e00483ca4b427d824684ed', class: "content" }, h("slot", { key: 'e32121655c6d1cb1fa6d686ef5e5306b8a5ea3a0', name: "content" })))));
|
|
20849
20853
|
}
|
|
20850
20854
|
disconnectedCallback() {
|
|
20851
20855
|
if (this.modal) {
|