@dropi/ui 0.1.17 → 0.1.19
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/dropi-accordion.cjs.entry.js +1 -1
- package/dist/cjs/dropi-alert.cjs.entry.js +58 -0
- package/dist/cjs/dropi-avatars.cjs.entry.js +31 -0
- package/dist/cjs/dropi-badge.cjs.entry.js +1 -1
- package/dist/cjs/dropi-button.cjs.entry.js +2 -2
- package/dist/cjs/dropi-card-section.cjs.entry.js +38 -0
- package/dist/cjs/dropi-checkbox-selection-list.cjs.entry.js +71 -0
- package/dist/cjs/dropi-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/dropi-chips.cjs.entry.js +30 -0
- package/dist/cjs/dropi-dropdown.cjs.entry.js +58 -0
- package/dist/cjs/dropi-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/dropi-favorite-button.cjs.entry.js +27 -0
- package/dist/cjs/dropi-icon.cjs.entry.js +1 -1
- package/dist/cjs/dropi-image-miniature.cjs.entry.js +44 -0
- package/dist/cjs/dropi-image-overlay.cjs.entry.js +62 -0
- package/dist/cjs/dropi-input.cjs.entry.js +5 -5
- package/dist/cjs/dropi-logo.cjs.entry.js +27 -0
- package/dist/cjs/dropi-lottie-loader.cjs.entry.js +27 -0
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +92 -0
- package/dist/cjs/dropi-paginator.cjs.entry.js +5 -3
- package/dist/cjs/dropi-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/dropi-radio-selection-list.cjs.entry.js +56 -0
- package/dist/cjs/dropi-read-more.cjs.entry.js +36 -0
- package/dist/cjs/dropi-search.cjs.entry.js +110 -0
- package/dist/cjs/dropi-select.cjs.entry.js +1 -1
- package/dist/cjs/dropi-simple-stepper.cjs.entry.js +51 -0
- package/dist/cjs/dropi-steps.cjs.entry.js +50 -0
- package/dist/cjs/dropi-switch.cjs.entry.js +1 -1
- package/dist/cjs/dropi-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dropi-tag.cjs.entry.js +1 -1
- package/dist/cjs/dropi-text-area.cjs.entry.js +3 -3
- package/dist/cjs/dropi-time-line.cjs.entry.js +34 -0
- package/dist/cjs/dropi-toast.cjs.entry.js +1 -1
- package/dist/cjs/dropi-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/dropi-ui.cjs.js +1 -1
- package/dist/cjs/dropi-vertical-steps.cjs.entry.js +55 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/dropi-accordion/dropi-accordion.js +1 -1
- package/dist/collection/components/dropi-alert/dropi-alert.css +123 -0
- package/dist/collection/components/dropi-alert/dropi-alert.js +305 -0
- package/dist/collection/components/dropi-avatars/dropi-avatars.css +55 -0
- package/dist/collection/components/dropi-avatars/dropi-avatars.js +126 -0
- package/dist/collection/components/dropi-badge/dropi-badge.js +1 -1
- package/dist/collection/components/dropi-button/dropi-button.js +2 -2
- package/dist/collection/components/dropi-card-section/dropi-card-section.css +42 -0
- package/dist/collection/components/dropi-card-section/dropi-card-section.js +178 -0
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +2 -2
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.css +44 -0
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.js +245 -0
- package/dist/collection/components/dropi-chips/dropi-chips.css +66 -0
- package/dist/collection/components/dropi-chips/dropi-chips.js +169 -0
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.css +51 -0
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.js +184 -0
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.js +1 -1
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.css +24 -0
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.js +78 -0
- package/dist/collection/components/dropi-icon/dropi-icon.js +1 -1
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.css +45 -0
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.js +150 -0
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.css +82 -0
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.js +155 -0
- package/dist/collection/components/dropi-input/dropi-input.css +11 -0
- package/dist/collection/components/dropi-input/dropi-input.js +4 -4
- package/dist/collection/components/dropi-logo/dropi-logo.css +26 -0
- package/dist/collection/components/dropi-logo/dropi-logo.js +96 -0
- package/dist/collection/components/dropi-lottie-loader/dropi-lottie-loader.css +50 -0
- package/dist/collection/components/dropi-lottie-loader/dropi-lottie-loader.js +116 -0
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.css +60 -0
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +221 -0
- package/dist/collection/components/dropi-paginator/dropi-paginator.css +15 -12
- package/dist/collection/components/dropi-paginator/dropi-paginator.js +24 -2
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +1 -1
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.css +64 -0
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.js +209 -0
- package/dist/collection/components/dropi-read-more/dropi-read-more.css +28 -0
- package/dist/collection/components/dropi-read-more/dropi-read-more.js +110 -0
- package/dist/collection/components/dropi-search/dropi-search.css +112 -0
- package/dist/collection/components/dropi-search/dropi-search.js +392 -0
- package/dist/collection/components/dropi-select/dropi-select.js +1 -1
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.css +94 -0
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.js +172 -0
- package/dist/collection/components/dropi-steps/dropi-steps.css +95 -0
- package/dist/collection/components/dropi-steps/dropi-steps.js +145 -0
- package/dist/collection/components/dropi-switch/dropi-switch.js +1 -1
- package/dist/collection/components/dropi-tabs/dropi-tabs.js +1 -1
- package/dist/collection/components/dropi-tag/dropi-tag.js +1 -1
- package/dist/collection/components/dropi-text-area/dropi-text-area.css +0 -1
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +2 -2
- package/dist/collection/components/dropi-time-line/dropi-time-line.css +108 -0
- package/dist/collection/components/dropi-time-line/dropi-time-line.js +69 -0
- package/dist/collection/components/dropi-toast/dropi-toast.js +1 -1
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.js +1 -1
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.css +95 -0
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.js +167 -0
- package/dist/components/dropi-accordion.js +1 -1
- package/dist/components/dropi-alert.d.ts +11 -0
- package/dist/components/dropi-alert.js +1 -0
- package/dist/components/dropi-avatars.d.ts +11 -0
- package/dist/components/dropi-avatars.js +1 -0
- package/dist/components/dropi-badge.js +1 -1
- package/dist/components/dropi-button.js +1 -1
- package/dist/components/dropi-card-section.d.ts +11 -0
- package/dist/components/dropi-card-section.js +1 -0
- package/dist/components/dropi-checkbox-selection-list.d.ts +11 -0
- package/dist/components/dropi-checkbox-selection-list.js +1 -0
- package/dist/components/dropi-checkbox.js +1 -1
- package/dist/components/dropi-chips.d.ts +11 -0
- package/dist/components/dropi-chips.js +1 -0
- package/dist/components/dropi-dropdown.d.ts +11 -0
- package/dist/components/dropi-dropdown.js +1 -0
- package/dist/components/dropi-empty-state.js +1 -1
- package/dist/components/dropi-favorite-button.d.ts +11 -0
- package/dist/components/dropi-favorite-button.js +1 -0
- package/dist/components/dropi-icon.js +1 -1
- package/dist/components/dropi-image-miniature.d.ts +11 -0
- package/dist/components/dropi-image-miniature.js +1 -0
- package/dist/components/dropi-image-overlay.d.ts +11 -0
- package/dist/components/dropi-image-overlay.js +1 -0
- package/dist/components/dropi-input.js +1 -1
- package/dist/components/dropi-logo.d.ts +11 -0
- package/dist/components/dropi-logo.js +1 -0
- package/dist/components/dropi-lottie-loader.d.ts +11 -0
- package/dist/components/dropi-lottie-loader.js +1 -0
- package/dist/components/dropi-modal.js +1 -1
- package/dist/components/dropi-otp-send-code.d.ts +11 -0
- package/dist/components/dropi-otp-send-code.js +1 -0
- package/dist/components/dropi-paginator.js +1 -1
- package/dist/components/dropi-radio-button.js +1 -1
- package/dist/components/dropi-radio-selection-list.d.ts +11 -0
- package/dist/components/dropi-radio-selection-list.js +1 -0
- package/dist/components/dropi-read-more.d.ts +11 -0
- package/dist/components/dropi-read-more.js +1 -0
- package/dist/components/dropi-search.d.ts +11 -0
- package/dist/components/dropi-search.js +1 -0
- package/dist/components/dropi-select.js +1 -1
- package/dist/components/dropi-simple-stepper.d.ts +11 -0
- package/dist/components/dropi-simple-stepper.js +1 -0
- package/dist/components/dropi-steps.d.ts +11 -0
- package/dist/components/dropi-steps.js +1 -0
- package/dist/components/dropi-switch.js +1 -1
- package/dist/components/dropi-tabs.js +1 -1
- package/dist/components/dropi-tag.js +1 -1
- package/dist/components/dropi-text-area.js +1 -1
- package/dist/components/dropi-time-line.d.ts +11 -0
- package/dist/components/dropi-time-line.js +1 -0
- package/dist/components/dropi-toast.js +1 -1
- package/dist/components/dropi-tooltip.js +1 -1
- package/dist/components/dropi-vertical-steps.d.ts +11 -0
- package/dist/components/dropi-vertical-steps.js +1 -0
- package/dist/components/{p-ChOXWKmI.js → p-CPs3fHRc.js} +1 -1
- package/dist/components/p-DKXrREI4.js +1 -0
- package/dist/components/p-Ds74ZOlC.js +1 -0
- package/dist/components/{p-NCyvfOs2.js → p-WZTFyFH2.js} +1 -1
- package/dist/dropi-ui/dropi-ui.esm.js +1 -1
- package/dist/dropi-ui/p-061e1ad4.entry.js +1 -0
- package/dist/dropi-ui/{p-ecda6e19.entry.js → p-0c13dded.entry.js} +1 -1
- package/dist/dropi-ui/{p-79466fec.entry.js → p-121c8a09.entry.js} +1 -1
- package/dist/dropi-ui/p-291a1416.entry.js +1 -0
- package/dist/dropi-ui/p-2cee44f9.entry.js +1 -0
- package/dist/dropi-ui/{p-6031ac9d.entry.js → p-30fdd316.entry.js} +1 -1
- package/dist/dropi-ui/p-3537ee5a.entry.js +1 -0
- package/dist/dropi-ui/{p-26dbae0d.entry.js → p-3d859657.entry.js} +1 -1
- package/dist/dropi-ui/p-433d161d.entry.js +1 -0
- package/dist/dropi-ui/p-4bdfad16.entry.js +1 -0
- package/dist/dropi-ui/p-4ea7d3a7.entry.js +1 -0
- package/dist/dropi-ui/{p-09c38a49.entry.js → p-51c8ef68.entry.js} +1 -1
- package/dist/dropi-ui/{p-6d15d32f.entry.js → p-54780c90.entry.js} +1 -1
- package/dist/dropi-ui/{p-63e969da.entry.js → p-66deb85e.entry.js} +1 -1
- package/dist/dropi-ui/p-68f81080.entry.js +1 -0
- package/dist/dropi-ui/p-724a2aea.entry.js +1 -0
- package/dist/dropi-ui/p-74c37688.entry.js +1 -0
- package/dist/dropi-ui/p-7cec1cea.entry.js +1 -0
- package/dist/dropi-ui/{p-f0e1e0f6.entry.js → p-7daa2677.entry.js} +1 -1
- package/dist/dropi-ui/p-8906a68d.entry.js +1 -0
- package/dist/dropi-ui/{p-1739d20c.entry.js → p-a4204ece.entry.js} +1 -1
- package/dist/dropi-ui/p-a9116dbe.entry.js +1 -0
- package/dist/dropi-ui/p-b36b819f.entry.js +1 -0
- package/dist/dropi-ui/p-c10cbb8d.entry.js +1 -0
- package/dist/dropi-ui/{p-42179ae4.entry.js → p-c2316d4d.entry.js} +1 -1
- package/dist/dropi-ui/{p-e44242e2.entry.js → p-cb5fd7a9.entry.js} +1 -1
- package/dist/dropi-ui/p-d1e1b716.entry.js +1 -0
- package/dist/dropi-ui/p-d5ecc394.entry.js +1 -0
- package/dist/dropi-ui/p-db6c9828.entry.js +1 -0
- package/dist/dropi-ui/{p-4d582d58.entry.js → p-e721127d.entry.js} +1 -1
- package/dist/dropi-ui/p-e8557da0.entry.js +1 -0
- package/dist/dropi-ui/p-ebfd4665.entry.js +1 -0
- package/dist/dropi-ui/p-f3cef35a.entry.js +1 -0
- package/dist/dropi-ui/p-f6a69c4e.entry.js +1 -0
- package/dist/dropi-ui/{p-65fa8558.entry.js → p-ff45e7c8.entry.js} +1 -1
- package/dist/esm/dropi-accordion.entry.js +1 -1
- package/dist/esm/dropi-alert.entry.js +56 -0
- package/dist/esm/dropi-avatars.entry.js +29 -0
- package/dist/esm/dropi-badge.entry.js +1 -1
- package/dist/esm/dropi-button.entry.js +2 -2
- package/dist/esm/dropi-card-section.entry.js +36 -0
- package/dist/esm/dropi-checkbox-selection-list.entry.js +69 -0
- package/dist/esm/dropi-checkbox.entry.js +2 -2
- package/dist/esm/dropi-chips.entry.js +28 -0
- package/dist/esm/dropi-dropdown.entry.js +56 -0
- package/dist/esm/dropi-empty-state.entry.js +1 -1
- package/dist/esm/dropi-favorite-button.entry.js +25 -0
- package/dist/esm/dropi-icon.entry.js +1 -1
- package/dist/esm/dropi-image-miniature.entry.js +42 -0
- package/dist/esm/dropi-image-overlay.entry.js +60 -0
- package/dist/esm/dropi-input.entry.js +5 -5
- package/dist/esm/dropi-logo.entry.js +25 -0
- package/dist/esm/dropi-lottie-loader.entry.js +25 -0
- package/dist/esm/dropi-otp-send-code.entry.js +90 -0
- package/dist/esm/dropi-paginator.entry.js +5 -3
- package/dist/esm/dropi-radio-button.entry.js +1 -1
- package/dist/esm/dropi-radio-selection-list.entry.js +54 -0
- package/dist/esm/dropi-read-more.entry.js +34 -0
- package/dist/esm/dropi-search.entry.js +108 -0
- package/dist/esm/dropi-select.entry.js +1 -1
- package/dist/esm/dropi-simple-stepper.entry.js +49 -0
- package/dist/esm/dropi-steps.entry.js +48 -0
- package/dist/esm/dropi-switch.entry.js +1 -1
- package/dist/esm/dropi-tabs.entry.js +1 -1
- package/dist/esm/dropi-tag.entry.js +1 -1
- package/dist/esm/dropi-text-area.entry.js +3 -3
- package/dist/esm/dropi-time-line.entry.js +32 -0
- package/dist/esm/dropi-toast.entry.js +1 -1
- package/dist/esm/dropi-tooltip.entry.js +1 -1
- package/dist/esm/dropi-ui.js +1 -1
- package/dist/esm/dropi-vertical-steps.entry.js +53 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/dropi-alert/dropi-alert.d.ts +35 -0
- package/dist/types/components/dropi-avatars/dropi-avatars.d.ts +17 -0
- package/dist/types/components/dropi-card-section/dropi-card-section.d.ts +22 -0
- package/dist/types/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.d.ts +37 -0
- package/dist/types/components/dropi-chips/dropi-chips.d.ts +23 -0
- package/dist/types/components/dropi-dropdown/dropi-dropdown.d.ts +28 -0
- package/dist/types/components/dropi-favorite-button/dropi-favorite-button.d.ts +14 -0
- package/dist/types/components/dropi-image-miniature/dropi-image-miniature.d.ts +23 -0
- package/dist/types/components/dropi-image-overlay/dropi-image-overlay.d.ts +26 -0
- package/dist/types/components/dropi-logo/dropi-logo.d.ts +14 -0
- package/dist/types/components/dropi-lottie-loader/dropi-lottie-loader.d.ts +15 -0
- package/dist/types/components/dropi-otp-send-code/dropi-otp-send-code.d.ts +33 -0
- package/dist/types/components/dropi-paginator/dropi-paginator.d.ts +2 -0
- package/dist/types/components/dropi-radio-selection-list/dropi-radio-selection-list.d.ts +34 -0
- package/dist/types/components/dropi-read-more/dropi-read-more.d.ts +17 -0
- package/dist/types/components/dropi-search/dropi-search.d.ts +51 -0
- package/dist/types/components/dropi-simple-stepper/dropi-simple-stepper.d.ts +20 -0
- package/dist/types/components/dropi-steps/dropi-steps.d.ts +21 -0
- package/dist/types/components/dropi-time-line/dropi-time-line.d.ts +18 -0
- package/dist/types/components/dropi-vertical-steps/dropi-vertical-steps.d.ts +24 -0
- package/dist/types/components.d.ts +1830 -3
- package/package.json +1 -1
- package/readme.md +189 -2
- package/dist/dropi-ui/p-082b7039.entry.js +0 -1
- package/dist/dropi-ui/p-eb7f9a57.entry.js +0 -1
- package/dist/dropi-ui/p-f283f41d.entry.js +0 -1
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
const STATE_ICONS = {
|
|
3
|
+
success: 'Check-circle',
|
|
4
|
+
error: 'Warning-circle',
|
|
5
|
+
warning: 'Warning-triangle',
|
|
6
|
+
info: 'Info-circle',
|
|
7
|
+
};
|
|
8
|
+
const STATE_COLORS = {
|
|
9
|
+
success: 'Success-Success-500',
|
|
10
|
+
error: 'Error-Error-500',
|
|
11
|
+
warning: 'Warning-Warning-500',
|
|
12
|
+
info: 'Info-Info-500',
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @component dropi-alert
|
|
16
|
+
* Alert banner with state variants (success/error/warning/info),
|
|
17
|
+
* optional action button, anchor link, and dismissable close icon.
|
|
18
|
+
*/
|
|
19
|
+
export class DropiAlert {
|
|
20
|
+
/** Alert message text (supports plain text) */
|
|
21
|
+
message = '';
|
|
22
|
+
/** Layout type: default (inline) | flag (accented left border) */
|
|
23
|
+
type = 'default';
|
|
24
|
+
/** Semantic state */
|
|
25
|
+
state = 'info';
|
|
26
|
+
/** Show the × close button */
|
|
27
|
+
dismissable = false;
|
|
28
|
+
/** Show action button */
|
|
29
|
+
showButton = false;
|
|
30
|
+
/** Action button label */
|
|
31
|
+
buttonText = '';
|
|
32
|
+
/** Anchor/link label */
|
|
33
|
+
anchorText = '';
|
|
34
|
+
/** Anchor href */
|
|
35
|
+
anchorUrl = '';
|
|
36
|
+
/** Whether the alert is visible */
|
|
37
|
+
showAlert = true;
|
|
38
|
+
/** Emitted when the alert is dismissed */
|
|
39
|
+
dropiClose;
|
|
40
|
+
/** Emitted when the action button is clicked */
|
|
41
|
+
dropiButtonClick;
|
|
42
|
+
/** Emitted when the anchor link is clicked */
|
|
43
|
+
dropiLinkClick;
|
|
44
|
+
render() {
|
|
45
|
+
if (!this.showAlert)
|
|
46
|
+
return null;
|
|
47
|
+
return (h("div", { class: { 'alert': true, [`alert--${this.type}`]: true, [`alert--${this.state}`]: true } }, h("div", { class: "alert__icon" }, h("dropi-icon", { name: STATE_ICONS[this.state], width: "18px", height: "18px", color: STATE_COLORS[this.state] })), h("div", { class: "alert__body" }, h("span", { class: "alert__message" }, this.message), this.anchorText && (h("a", { class: "alert__link", href: this.anchorUrl || '#', onClick: (e) => { e.preventDefault(); this.dropiLinkClick.emit(); } }, this.anchorText))), h("div", { class: "alert__actions" }, this.showButton && this.buttonText && (h("button", { class: "alert__btn", onClick: () => this.dropiButtonClick.emit() }, this.buttonText)), this.dismissable && (h("button", { class: "alert__close", onClick: () => { this.showAlert = false; this.dropiClose.emit(); }, "aria-label": "Cerrar" }, h("dropi-icon", { name: "Close-small", width: "18px", height: "18px", color: "Gray-Gray-500" }))))));
|
|
48
|
+
}
|
|
49
|
+
static get is() { return "dropi-alert"; }
|
|
50
|
+
static get encapsulation() { return "shadow"; }
|
|
51
|
+
static get originalStyleUrls() {
|
|
52
|
+
return {
|
|
53
|
+
"$": ["dropi-alert.css"]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get styleUrls() {
|
|
57
|
+
return {
|
|
58
|
+
"$": ["dropi-alert.css"]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static get properties() {
|
|
62
|
+
return {
|
|
63
|
+
"message": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "string",
|
|
68
|
+
"resolved": "string",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": "Alert message text (supports plain text)"
|
|
76
|
+
},
|
|
77
|
+
"getter": false,
|
|
78
|
+
"setter": false,
|
|
79
|
+
"reflect": false,
|
|
80
|
+
"attribute": "message",
|
|
81
|
+
"defaultValue": "''"
|
|
82
|
+
},
|
|
83
|
+
"type": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "AlertType",
|
|
88
|
+
"resolved": "\"default\" | \"flag\"",
|
|
89
|
+
"references": {
|
|
90
|
+
"AlertType": {
|
|
91
|
+
"location": "local",
|
|
92
|
+
"path": "/Users/mac-ti/Documents/dropi/dropi-ui/src/components/dropi-alert/dropi-alert.tsx",
|
|
93
|
+
"id": "src/components/dropi-alert/dropi-alert.tsx::AlertType"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "Layout type: default (inline) | flag (accented left border)"
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"reflect": false,
|
|
106
|
+
"attribute": "type",
|
|
107
|
+
"defaultValue": "'default'"
|
|
108
|
+
},
|
|
109
|
+
"state": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "AlertState",
|
|
114
|
+
"resolved": "\"error\" | \"info\" | \"success\" | \"warning\"",
|
|
115
|
+
"references": {
|
|
116
|
+
"AlertState": {
|
|
117
|
+
"location": "local",
|
|
118
|
+
"path": "/Users/mac-ti/Documents/dropi/dropi-ui/src/components/dropi-alert/dropi-alert.tsx",
|
|
119
|
+
"id": "src/components/dropi-alert/dropi-alert.tsx::AlertState"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "Semantic state"
|
|
128
|
+
},
|
|
129
|
+
"getter": false,
|
|
130
|
+
"setter": false,
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"attribute": "state",
|
|
133
|
+
"defaultValue": "'info'"
|
|
134
|
+
},
|
|
135
|
+
"dismissable": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "boolean",
|
|
140
|
+
"resolved": "boolean",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "Show the \u00D7 close button"
|
|
148
|
+
},
|
|
149
|
+
"getter": false,
|
|
150
|
+
"setter": false,
|
|
151
|
+
"reflect": false,
|
|
152
|
+
"attribute": "dismissable",
|
|
153
|
+
"defaultValue": "false"
|
|
154
|
+
},
|
|
155
|
+
"showButton": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"mutable": false,
|
|
158
|
+
"complexType": {
|
|
159
|
+
"original": "boolean",
|
|
160
|
+
"resolved": "boolean",
|
|
161
|
+
"references": {}
|
|
162
|
+
},
|
|
163
|
+
"required": false,
|
|
164
|
+
"optional": false,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": "Show action button"
|
|
168
|
+
},
|
|
169
|
+
"getter": false,
|
|
170
|
+
"setter": false,
|
|
171
|
+
"reflect": false,
|
|
172
|
+
"attribute": "show-button",
|
|
173
|
+
"defaultValue": "false"
|
|
174
|
+
},
|
|
175
|
+
"buttonText": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "string",
|
|
180
|
+
"resolved": "string",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "Action button label"
|
|
188
|
+
},
|
|
189
|
+
"getter": false,
|
|
190
|
+
"setter": false,
|
|
191
|
+
"reflect": false,
|
|
192
|
+
"attribute": "button-text",
|
|
193
|
+
"defaultValue": "''"
|
|
194
|
+
},
|
|
195
|
+
"anchorText": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "string",
|
|
200
|
+
"resolved": "string",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": false,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Anchor/link label"
|
|
208
|
+
},
|
|
209
|
+
"getter": false,
|
|
210
|
+
"setter": false,
|
|
211
|
+
"reflect": false,
|
|
212
|
+
"attribute": "anchor-text",
|
|
213
|
+
"defaultValue": "''"
|
|
214
|
+
},
|
|
215
|
+
"anchorUrl": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "string",
|
|
220
|
+
"resolved": "string",
|
|
221
|
+
"references": {}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Anchor href"
|
|
228
|
+
},
|
|
229
|
+
"getter": false,
|
|
230
|
+
"setter": false,
|
|
231
|
+
"reflect": false,
|
|
232
|
+
"attribute": "anchor-url",
|
|
233
|
+
"defaultValue": "''"
|
|
234
|
+
},
|
|
235
|
+
"showAlert": {
|
|
236
|
+
"type": "boolean",
|
|
237
|
+
"mutable": true,
|
|
238
|
+
"complexType": {
|
|
239
|
+
"original": "boolean",
|
|
240
|
+
"resolved": "boolean",
|
|
241
|
+
"references": {}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": "Whether the alert is visible"
|
|
248
|
+
},
|
|
249
|
+
"getter": false,
|
|
250
|
+
"setter": false,
|
|
251
|
+
"reflect": false,
|
|
252
|
+
"attribute": "show-alert",
|
|
253
|
+
"defaultValue": "true"
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
static get events() {
|
|
258
|
+
return [{
|
|
259
|
+
"method": "dropiClose",
|
|
260
|
+
"name": "dropiClose",
|
|
261
|
+
"bubbles": true,
|
|
262
|
+
"cancelable": true,
|
|
263
|
+
"composed": true,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": "Emitted when the alert is dismissed"
|
|
267
|
+
},
|
|
268
|
+
"complexType": {
|
|
269
|
+
"original": "void",
|
|
270
|
+
"resolved": "void",
|
|
271
|
+
"references": {}
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
"method": "dropiButtonClick",
|
|
275
|
+
"name": "dropiButtonClick",
|
|
276
|
+
"bubbles": true,
|
|
277
|
+
"cancelable": true,
|
|
278
|
+
"composed": true,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "Emitted when the action button is clicked"
|
|
282
|
+
},
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "void",
|
|
285
|
+
"resolved": "void",
|
|
286
|
+
"references": {}
|
|
287
|
+
}
|
|
288
|
+
}, {
|
|
289
|
+
"method": "dropiLinkClick",
|
|
290
|
+
"name": "dropiLinkClick",
|
|
291
|
+
"bubbles": true,
|
|
292
|
+
"cancelable": true,
|
|
293
|
+
"composed": true,
|
|
294
|
+
"docs": {
|
|
295
|
+
"tags": [],
|
|
296
|
+
"text": "Emitted when the anchor link is clicked"
|
|
297
|
+
},
|
|
298
|
+
"complexType": {
|
|
299
|
+
"original": "void",
|
|
300
|
+
"resolved": "void",
|
|
301
|
+
"references": {}
|
|
302
|
+
}
|
|
303
|
+
}];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.avatar {
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
border-radius: 50%;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.avatar img {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
object-fit: cover;
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* ── Size variants ─────────────────────────────────────── */
|
|
24
|
+
.avatar--users,
|
|
25
|
+
.avatar--transport,
|
|
26
|
+
.avatar--payment {
|
|
27
|
+
width: 35px;
|
|
28
|
+
height: 35px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.avatar--supplier {
|
|
32
|
+
width: 70px;
|
|
33
|
+
height: 70px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.avatar--counter {
|
|
37
|
+
width: 33px;
|
|
38
|
+
height: 33px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ── Initials fallback ─────────────────────────────────── */
|
|
42
|
+
.avatar__initials {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
background-color: var(--Primary-Primary-100, #fde9d0);
|
|
50
|
+
color: var(--Primary-Primary-600, #d4872e);
|
|
51
|
+
font-size: var(--font-size-xs, 10px);
|
|
52
|
+
font-weight: var(--font-weight-bold, 700);
|
|
53
|
+
text-transform: uppercase;
|
|
54
|
+
letter-spacing: 0.5px;
|
|
55
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
const FALLBACK = `data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiI+PGNpcmNsZSBjeD0iMTgiIGN5PSIxOCIgcj0iMTgiIGZpbGw9IiNlNmVhZjIiLz48Y2lyY2xlIGN4PSIxOCIgY3k9IjE0IiByPSI2IiBmaWxsPSIjODU4ZWE2Ii8+PHBhdGggZD0iTTYgMzJjMC04IDI0LTggMjQgMCIgZmlsbD0iIzg1OGVhNiIvPjwvc3ZnPg==`;
|
|
3
|
+
/**
|
|
4
|
+
* @component dropi-avatars
|
|
5
|
+
* Avatar component with image, initials fallback, and type-based size variants.
|
|
6
|
+
*/
|
|
7
|
+
export class DropiAvatars {
|
|
8
|
+
/** Image URL */
|
|
9
|
+
image = '';
|
|
10
|
+
/** Alt text for the image */
|
|
11
|
+
alt = 'avatar';
|
|
12
|
+
/** Size/context variant */
|
|
13
|
+
type = 'users';
|
|
14
|
+
/** Initials to show when no image (max 2 chars) */
|
|
15
|
+
initials = '';
|
|
16
|
+
handleError(e) {
|
|
17
|
+
e.target.src = FALLBACK;
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
const displayInitials = this.initials?.slice(0, 2).toUpperCase();
|
|
21
|
+
const showInitials = !this.image && displayInitials;
|
|
22
|
+
return (h("figure", { key: '5bce853f6d1d17dcad603cf103d6de09ae612147', class: { 'avatar': true, [`avatar--${this.type}`]: true } }, showInitials ? (h("div", { class: "avatar__initials" }, displayInitials)) : (h("img", { src: this.image || FALLBACK, alt: this.alt, onError: (e) => this.handleError(e) }))));
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "dropi-avatars"; }
|
|
25
|
+
static get encapsulation() { return "shadow"; }
|
|
26
|
+
static get originalStyleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["dropi-avatars.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get styleUrls() {
|
|
32
|
+
return {
|
|
33
|
+
"$": ["dropi-avatars.css"]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
static get properties() {
|
|
37
|
+
return {
|
|
38
|
+
"image": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"mutable": false,
|
|
41
|
+
"complexType": {
|
|
42
|
+
"original": "string",
|
|
43
|
+
"resolved": "string",
|
|
44
|
+
"references": {}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": "Image URL"
|
|
51
|
+
},
|
|
52
|
+
"getter": false,
|
|
53
|
+
"setter": false,
|
|
54
|
+
"reflect": false,
|
|
55
|
+
"attribute": "image",
|
|
56
|
+
"defaultValue": "''"
|
|
57
|
+
},
|
|
58
|
+
"alt": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "Alt text for the image"
|
|
71
|
+
},
|
|
72
|
+
"getter": false,
|
|
73
|
+
"setter": false,
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"attribute": "alt",
|
|
76
|
+
"defaultValue": "'avatar'"
|
|
77
|
+
},
|
|
78
|
+
"type": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "AvatarType",
|
|
83
|
+
"resolved": "\"counter\" | \"payment\" | \"supplier\" | \"transport\" | \"users\"",
|
|
84
|
+
"references": {
|
|
85
|
+
"AvatarType": {
|
|
86
|
+
"location": "local",
|
|
87
|
+
"path": "/Users/mac-ti/Documents/dropi/dropi-ui/src/components/dropi-avatars/dropi-avatars.tsx",
|
|
88
|
+
"id": "src/components/dropi-avatars/dropi-avatars.tsx::AvatarType"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": false,
|
|
93
|
+
"optional": false,
|
|
94
|
+
"docs": {
|
|
95
|
+
"tags": [],
|
|
96
|
+
"text": "Size/context variant"
|
|
97
|
+
},
|
|
98
|
+
"getter": false,
|
|
99
|
+
"setter": false,
|
|
100
|
+
"reflect": false,
|
|
101
|
+
"attribute": "type",
|
|
102
|
+
"defaultValue": "'users'"
|
|
103
|
+
},
|
|
104
|
+
"initials": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "string",
|
|
109
|
+
"resolved": "string",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": "Initials to show when no image (max 2 chars)"
|
|
117
|
+
},
|
|
118
|
+
"getter": false,
|
|
119
|
+
"setter": false,
|
|
120
|
+
"reflect": false,
|
|
121
|
+
"attribute": "initials",
|
|
122
|
+
"defaultValue": "''"
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -25,7 +25,7 @@ export class DropiBadge {
|
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h("div", { key: '
|
|
28
|
+
return (h("div", { key: '7a043420848f083d161765c16da41dc1f7c38065', class: `tag-state ${this.state}` }, this.renderIcon(), h("p", { key: '4227bf47f3169673f44b62bde46498e3c8d607cd' }, this.stateText[this.state])));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "dropi-badge"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,14 +62,14 @@ export class DropiButton {
|
|
|
62
62
|
const hasText = this.text !== '';
|
|
63
63
|
const showPostIcon = this.postIcon !== '' || this.type === 'dropdown';
|
|
64
64
|
const dropdownIcon = this.type === 'dropdown' ? 'Dropdown-down' : this.postIcon;
|
|
65
|
-
return (h("button", { key: '
|
|
65
|
+
return (h("button", { key: '893717e317f10193bfa723d65607fc79e5875309', class: {
|
|
66
66
|
btn: true,
|
|
67
67
|
'without-text': !hasText,
|
|
68
68
|
[this.severity]: true,
|
|
69
69
|
[this.type]: true,
|
|
70
70
|
[this.size]: true,
|
|
71
71
|
[this.state]: true,
|
|
72
|
-
}, disabled: isDisabled, onClick: (e) => this.handleClick(e) }, this.preIcon && (h("dropi-icon", { key: '
|
|
72
|
+
}, disabled: isDisabled, onClick: (e) => this.handleClick(e) }, this.preIcon && (h("dropi-icon", { key: '922e32f5466164279fdb9408502412d4246ee1f2', name: this.preIcon, width: this.iconSize, height: this.iconSize, color: this.fontColor })), hasText && h("span", { key: '9b8c506a5e4a791bde84d36e2991386ee2a3822f', class: "text" }, this.text), showPostIcon && (h("dropi-icon", { key: 'c1f66fba38426ff724450a806c99939ffaca0c75', name: dropdownIcon, width: this.iconSize, height: this.iconSize, color: this.fontColor })), this.state === 'loading' && this.renderLoadingSpinner(), h("slot", { key: 'af5cc164403ec0592f4740368784c343e38a0227' })));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "dropi-button"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:host { display: block; width: 100%; }
|
|
2
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
3
|
+
|
|
4
|
+
.card-section {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
gap: var(--Size-4, 16px);
|
|
9
|
+
padding: var(--Size-3, 12px) var(--Size-4, 16px);
|
|
10
|
+
background: var(--Neutral-White, #fff);
|
|
11
|
+
border: 1px solid var(--Gray-Gray-100, #e6eaf2);
|
|
12
|
+
border-radius: var(--Border-2, 8px);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.card-section__text { flex: 1; }
|
|
16
|
+
|
|
17
|
+
.card-section__title {
|
|
18
|
+
margin: 0 0 4px;
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
font-weight: var(--font-weight-bold, 700);
|
|
21
|
+
color: var(--Gray-Gray-800, #1a2033);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
h5.card-section__title { font-size: var(--font-size-m, 14px); }
|
|
25
|
+
h6.card-section__title { font-size: var(--font-size-s, 12px); }
|
|
26
|
+
|
|
27
|
+
.card-section__desc {
|
|
28
|
+
margin: 0;
|
|
29
|
+
font-size: var(--font-size-xs, 10px);
|
|
30
|
+
color: var(--Gray-Gray-500, #69738c);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.card-section__control { flex-shrink: 0; }
|
|
34
|
+
|
|
35
|
+
.card-section__dropdown-btn {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
background: none;
|
|
39
|
+
border: none;
|
|
40
|
+
padding: 0;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|