@dropi/ui 0.1.18 → 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/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,116 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* @component dropi-lottie-loader
|
|
4
|
+
* Full-screen or inline loading overlay with a Lottie animation.
|
|
5
|
+
*/
|
|
6
|
+
export class DropiLottieLoader {
|
|
7
|
+
/** Show or hide the loader */
|
|
8
|
+
visible = false;
|
|
9
|
+
/** Path to the Lottie JSON animation file */
|
|
10
|
+
loadingAnimation = '';
|
|
11
|
+
/** Title shown below the animation */
|
|
12
|
+
loaderTitle = '';
|
|
13
|
+
/** Descriptive message below the title */
|
|
14
|
+
message = '';
|
|
15
|
+
render() {
|
|
16
|
+
if (!this.visible)
|
|
17
|
+
return null;
|
|
18
|
+
return (h("div", { class: "loader-overlay" }, h("div", { class: "loader-container" }, this.loadingAnimation && (h("div", { class: "lottie-animation", innerHTML: `<lottie-player src="${this.loadingAnimation}" background="transparent" speed="1" style="width:200px;height:200px" loop autoplay></lottie-player>` })), (this.loaderTitle || this.message) && (h("div", { class: "loader-text" }, this.loaderTitle && h("h3", { class: "loader-title" }, this.loaderTitle), this.message && h("p", { class: "loader-message" }, this.message))))));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "dropi-lottie-loader"; }
|
|
21
|
+
static get encapsulation() { return "shadow"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["dropi-lottie-loader.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["dropi-lottie-loader.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"visible": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "boolean",
|
|
39
|
+
"resolved": "boolean",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "Show or hide the loader"
|
|
47
|
+
},
|
|
48
|
+
"getter": false,
|
|
49
|
+
"setter": false,
|
|
50
|
+
"reflect": false,
|
|
51
|
+
"attribute": "visible",
|
|
52
|
+
"defaultValue": "false"
|
|
53
|
+
},
|
|
54
|
+
"loadingAnimation": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"mutable": false,
|
|
57
|
+
"complexType": {
|
|
58
|
+
"original": "string",
|
|
59
|
+
"resolved": "string",
|
|
60
|
+
"references": {}
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"optional": false,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [],
|
|
66
|
+
"text": "Path to the Lottie JSON animation file"
|
|
67
|
+
},
|
|
68
|
+
"getter": false,
|
|
69
|
+
"setter": false,
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"attribute": "loading-animation",
|
|
72
|
+
"defaultValue": "''"
|
|
73
|
+
},
|
|
74
|
+
"loaderTitle": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "string",
|
|
79
|
+
"resolved": "string",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": "Title shown below the animation"
|
|
87
|
+
},
|
|
88
|
+
"getter": false,
|
|
89
|
+
"setter": false,
|
|
90
|
+
"reflect": false,
|
|
91
|
+
"attribute": "loader-title",
|
|
92
|
+
"defaultValue": "''"
|
|
93
|
+
},
|
|
94
|
+
"message": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "string",
|
|
99
|
+
"resolved": "string",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "Descriptive message below the title"
|
|
107
|
+
},
|
|
108
|
+
"getter": false,
|
|
109
|
+
"setter": false,
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"attribute": "message",
|
|
112
|
+
"defaultValue": "''"
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
:host { display: block; width: 100%; }
|
|
2
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
3
|
+
|
|
4
|
+
.otp { display: flex; flex-direction: column; align-items: center; gap: var(--Size-4, 16px); }
|
|
5
|
+
|
|
6
|
+
.otp__label {
|
|
7
|
+
font-size: var(--font-size-s, 12px);
|
|
8
|
+
color: var(--Gray-Gray-600, #475066);
|
|
9
|
+
text-align: center;
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.otp__inputs {
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: var(--Size-2, 8px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.otp__digit {
|
|
19
|
+
width: 48px;
|
|
20
|
+
height: 56px;
|
|
21
|
+
border: 2px solid var(--Gray-Gray-200, #c3c9d9);
|
|
22
|
+
border-radius: var(--Border-2, 8px);
|
|
23
|
+
text-align: center;
|
|
24
|
+
font-size: var(--font-size-xl, 20px);
|
|
25
|
+
font-weight: var(--font-weight-bold, 700);
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
color: var(--Gray-Gray-800, #1a2033);
|
|
28
|
+
outline: none;
|
|
29
|
+
transition: border-color 0.15s;
|
|
30
|
+
background: var(--Neutral-White, #fff);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.otp__digit:focus { border-color: var(--Info-Info-500, #50a5f1); }
|
|
34
|
+
.otp__digit--filled { border-color: var(--Success-Success-500, #34c55a); color: var(--Success-Success-500, #34c55a); }
|
|
35
|
+
.otp__digit--error { border-color: var(--Error-Error-500, #f46a6b); }
|
|
36
|
+
|
|
37
|
+
.otp__error {
|
|
38
|
+
margin: 0;
|
|
39
|
+
font-size: var(--font-size-xs, 10px);
|
|
40
|
+
color: var(--Error-Error-500, #f46a6b);
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.otp__resend { text-align: center; }
|
|
45
|
+
|
|
46
|
+
.otp__countdown {
|
|
47
|
+
font-size: var(--font-size-xs, 10px);
|
|
48
|
+
color: var(--Gray-Gray-400, #858ea6);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.otp__resend-btn {
|
|
52
|
+
background: none;
|
|
53
|
+
border: none;
|
|
54
|
+
padding: 0;
|
|
55
|
+
font-size: var(--font-size-s, 12px);
|
|
56
|
+
font-weight: var(--font-weight-bold, 700);
|
|
57
|
+
color: var(--Primary-Primary-500, #f49a3d);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
text-decoration: underline;
|
|
60
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
const OTP_LENGTH = 6;
|
|
3
|
+
const RESEND_SECONDS = 30;
|
|
4
|
+
/**
|
|
5
|
+
* @component dropi-otp-send-code
|
|
6
|
+
* 6-digit OTP input with countdown timer and resend capability.
|
|
7
|
+
*/
|
|
8
|
+
export class DropiOtpSendCode {
|
|
9
|
+
/** Delivery method label */
|
|
10
|
+
engine = 'email';
|
|
11
|
+
/** Contact info (email/phone to show in label) */
|
|
12
|
+
labelContact = '';
|
|
13
|
+
/** Show contact label */
|
|
14
|
+
showLabelContact = true;
|
|
15
|
+
/** Error message to display */
|
|
16
|
+
errorMessage = '';
|
|
17
|
+
digits = Array(OTP_LENGTH).fill('');
|
|
18
|
+
digitStates = Array(OTP_LENGTH).fill('idle');
|
|
19
|
+
countdown = RESEND_SECONDS;
|
|
20
|
+
canResend = false;
|
|
21
|
+
error = false;
|
|
22
|
+
inputs = [];
|
|
23
|
+
timer;
|
|
24
|
+
/** Emitted when all 6 digits are entered. e.detail = the complete code string */
|
|
25
|
+
dropiCodeCompleted;
|
|
26
|
+
/** Emitted when resend is requested */
|
|
27
|
+
dropiResend;
|
|
28
|
+
componentDidLoad() { this.startCountdown(); }
|
|
29
|
+
disconnectedCallback() { clearInterval(this.timer); }
|
|
30
|
+
startCountdown() {
|
|
31
|
+
this.countdown = RESEND_SECONDS;
|
|
32
|
+
this.canResend = false;
|
|
33
|
+
clearInterval(this.timer);
|
|
34
|
+
this.timer = setInterval(() => {
|
|
35
|
+
this.countdown--;
|
|
36
|
+
if (this.countdown <= 0) {
|
|
37
|
+
clearInterval(this.timer);
|
|
38
|
+
this.canResend = true;
|
|
39
|
+
}
|
|
40
|
+
}, 1000);
|
|
41
|
+
}
|
|
42
|
+
handleInput(e, index) {
|
|
43
|
+
const val = e.target.value.replace(/\D/g, '').slice(-1);
|
|
44
|
+
const newDigits = [...this.digits];
|
|
45
|
+
newDigits[index] = val;
|
|
46
|
+
this.digits = newDigits;
|
|
47
|
+
const newStates = [...this.digitStates];
|
|
48
|
+
newStates[index] = val ? 'filled' : 'idle';
|
|
49
|
+
this.digitStates = newStates;
|
|
50
|
+
if (val && index < OTP_LENGTH - 1)
|
|
51
|
+
this.inputs[index + 1]?.focus();
|
|
52
|
+
if (newDigits.every(d => d !== '')) {
|
|
53
|
+
this.dropiCodeCompleted.emit(newDigits.join(''));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
handleKeyDown(e, index) {
|
|
57
|
+
if (e.key === 'Backspace' && !this.digits[index] && index > 0) {
|
|
58
|
+
this.inputs[index - 1]?.focus();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
handlePaste(e) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
const text = e.clipboardData?.getData('text')?.replace(/\D/g, '').slice(0, OTP_LENGTH) || '';
|
|
64
|
+
const newDigits = Array(OTP_LENGTH).fill('');
|
|
65
|
+
text.split('').forEach((c, i) => { newDigits[i] = c; });
|
|
66
|
+
this.digits = newDigits;
|
|
67
|
+
this.digitStates = newDigits.map(d => d ? 'filled' : 'idle');
|
|
68
|
+
this.inputs[Math.min(text.length, OTP_LENGTH - 1)]?.focus();
|
|
69
|
+
if (newDigits.every(d => d !== ''))
|
|
70
|
+
this.dropiCodeCompleted.emit(newDigits.join(''));
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
const engineLabel = this.engine === 'sms' ? 'SMS' : this.engine === '2fa' ? 'autenticador' : 'correo';
|
|
74
|
+
return (h("div", { key: '9c8e1efcdb61bd8f6988826b769240354d42339e', class: "otp" }, this.showLabelContact && (h("p", { key: 'dd8ccef18ed569371c1bba5fc2a39a43b6daf1b9', class: "otp__label" }, "Ingresa el c\u00F3digo enviado a tu ", engineLabel, this.labelContact && h("strong", { key: 'a3fc70430e66b153cf12ed2c0240f2fb00ec4a47' }, " ", this.labelContact))), h("div", { key: '450a3a7923a363c1ebbbbd06ca1cc291eba3281c', class: "otp__inputs", onPaste: (e) => this.handlePaste(e) }, Array.from({ length: OTP_LENGTH }, (_, i) => (h("input", { key: i, ref: (el) => {
|
|
75
|
+
if (el)
|
|
76
|
+
this.inputs[i] = el;
|
|
77
|
+
}, class: {
|
|
78
|
+
'otp__digit': true,
|
|
79
|
+
'otp__digit--filled': this.digitStates[i] === 'filled',
|
|
80
|
+
'otp__digit--error': this.error,
|
|
81
|
+
}, type: "text", inputMode: "numeric", maxLength: 1, value: this.digits[i], onInput: (e) => this.handleInput(e, i), onKeyDown: (e) => this.handleKeyDown(e, i) })))), this.error && this.errorMessage && (h("p", { key: '4c6f9131d4a5b197dea318d6309540823b4cdfeb', class: "otp__error" }, this.errorMessage)), h("div", { key: 'a6a32b9ee19bc1b0394d5c14fbc44ddf73536630', class: "otp__resend" }, this.canResend ? (h("button", { class: "otp__resend-btn", onClick: () => { this.startCountdown(); this.dropiResend.emit(); } }, "Reenviar c\u00F3digo")) : (h("span", { class: "otp__countdown" }, "Reenviar en ", this.countdown, "s")))));
|
|
82
|
+
}
|
|
83
|
+
static get is() { return "dropi-otp-send-code"; }
|
|
84
|
+
static get encapsulation() { return "shadow"; }
|
|
85
|
+
static get originalStyleUrls() {
|
|
86
|
+
return {
|
|
87
|
+
"$": ["dropi-otp-send-code.css"]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
static get styleUrls() {
|
|
91
|
+
return {
|
|
92
|
+
"$": ["dropi-otp-send-code.css"]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static get properties() {
|
|
96
|
+
return {
|
|
97
|
+
"engine": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "'email' | 'sms' | '2fa'",
|
|
102
|
+
"resolved": "\"2fa\" | \"email\" | \"sms\"",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": "Delivery method label"
|
|
110
|
+
},
|
|
111
|
+
"getter": false,
|
|
112
|
+
"setter": false,
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"attribute": "engine",
|
|
115
|
+
"defaultValue": "'email'"
|
|
116
|
+
},
|
|
117
|
+
"labelContact": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Contact info (email/phone to show in label)"
|
|
130
|
+
},
|
|
131
|
+
"getter": false,
|
|
132
|
+
"setter": false,
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"attribute": "label-contact",
|
|
135
|
+
"defaultValue": "''"
|
|
136
|
+
},
|
|
137
|
+
"showLabelContact": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "boolean",
|
|
142
|
+
"resolved": "boolean",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": "Show contact label"
|
|
150
|
+
},
|
|
151
|
+
"getter": false,
|
|
152
|
+
"setter": false,
|
|
153
|
+
"reflect": false,
|
|
154
|
+
"attribute": "show-label-contact",
|
|
155
|
+
"defaultValue": "true"
|
|
156
|
+
},
|
|
157
|
+
"errorMessage": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "string",
|
|
162
|
+
"resolved": "string",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "Error message to display"
|
|
170
|
+
},
|
|
171
|
+
"getter": false,
|
|
172
|
+
"setter": false,
|
|
173
|
+
"reflect": false,
|
|
174
|
+
"attribute": "error-message",
|
|
175
|
+
"defaultValue": "''"
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
static get states() {
|
|
180
|
+
return {
|
|
181
|
+
"digits": {},
|
|
182
|
+
"digitStates": {},
|
|
183
|
+
"countdown": {},
|
|
184
|
+
"canResend": {},
|
|
185
|
+
"error": {}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
static get events() {
|
|
189
|
+
return [{
|
|
190
|
+
"method": "dropiCodeCompleted",
|
|
191
|
+
"name": "dropiCodeCompleted",
|
|
192
|
+
"bubbles": true,
|
|
193
|
+
"cancelable": true,
|
|
194
|
+
"composed": true,
|
|
195
|
+
"docs": {
|
|
196
|
+
"tags": [],
|
|
197
|
+
"text": "Emitted when all 6 digits are entered. e.detail = the complete code string"
|
|
198
|
+
},
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "string",
|
|
201
|
+
"resolved": "string",
|
|
202
|
+
"references": {}
|
|
203
|
+
}
|
|
204
|
+
}, {
|
|
205
|
+
"method": "dropiResend",
|
|
206
|
+
"name": "dropiResend",
|
|
207
|
+
"bubbles": true,
|
|
208
|
+
"cancelable": true,
|
|
209
|
+
"composed": true,
|
|
210
|
+
"docs": {
|
|
211
|
+
"tags": [],
|
|
212
|
+
"text": "Emitted when resend is requested"
|
|
213
|
+
},
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "void",
|
|
216
|
+
"resolved": "void",
|
|
217
|
+
"references": {}
|
|
218
|
+
}
|
|
219
|
+
}];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.paginator-btn {
|
|
22
|
-
|
|
22
|
+
width: 32px;
|
|
23
23
|
height: 32px;
|
|
24
|
-
padding: 0
|
|
25
|
-
border:
|
|
26
|
-
border-radius:
|
|
27
|
-
background:
|
|
24
|
+
padding: 0;
|
|
25
|
+
border: none;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
background: transparent;
|
|
28
28
|
color: var(--Gray-Gray-600, #475066);
|
|
29
29
|
font-size: var(--font-size-s, 12px);
|
|
30
30
|
font-family: inherit;
|
|
@@ -32,12 +32,11 @@
|
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
justify-content: center;
|
|
35
|
-
transition: background 0.15s ease
|
|
35
|
+
transition: background 0.15s ease;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.paginator-btn:hover:not(:disabled) {
|
|
39
39
|
background: var(--Gray-Gray-50, #f7f8fa);
|
|
40
|
-
border-color: var(--Gray-Gray-300, #a3abbf);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
.paginator-btn:disabled {
|
|
@@ -47,24 +46,28 @@
|
|
|
47
46
|
|
|
48
47
|
.paginator-btn--active {
|
|
49
48
|
background: var(--Primary-Primary-500, #f49a3d);
|
|
50
|
-
border-color: var(--Primary-Primary-500, #f49a3d);
|
|
51
49
|
color: var(--Neutral-White, #fff);
|
|
52
50
|
font-weight: var(--font-weight-bold, 700);
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
.paginator-btn--active:hover {
|
|
56
54
|
background: var(--Primary-Primary-500, #f49a3d);
|
|
57
|
-
border-color: var(--Primary-Primary-500, #f49a3d);
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
.paginator-btn--arrow {
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
width: auto;
|
|
59
|
+
padding: 0 var(--Size-2, 8px);
|
|
60
|
+
border-radius: var(--Border-1, 4px);
|
|
61
|
+
gap: 4px;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
.paginator-btn--arrow:hover:not(:disabled) {
|
|
66
65
|
background: var(--Gray-Gray-50, #f7f8fa);
|
|
67
|
-
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.paginator-label {
|
|
69
|
+
font-size: var(--font-size-s, 12px);
|
|
70
|
+
color: inherit;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
.paginator-ellipsis {
|
|
@@ -12,6 +12,8 @@ export class DropiPaginator {
|
|
|
12
12
|
page = 1;
|
|
13
13
|
/** Max page buttons to show at once */
|
|
14
14
|
maxPages = 5;
|
|
15
|
+
/** Hide "Anterior"/"Siguiente" text labels, show only arrows */
|
|
16
|
+
noLabels = false;
|
|
15
17
|
/** Whether to show the items-per-page selector */
|
|
16
18
|
showPageSizeSelector = false;
|
|
17
19
|
/** Options for items per page */
|
|
@@ -69,9 +71,9 @@ export class DropiPaginator {
|
|
|
69
71
|
const pages = this.pageNumbers;
|
|
70
72
|
const isFirst = this.page <= 1;
|
|
71
73
|
const isLast = this.page >= this.totalPages;
|
|
72
|
-
return (h("div", { key: '
|
|
74
|
+
return (h("div", { key: '7a2b5b626be626d66d33cb7857d9243440559587', class: "paginator" }, this.showPageSizeSelector && (h("div", { key: 'e113aee78c554393e41ad1e2ec94daa24c65043e', class: "paginator-size" }, h("span", { key: 'ee5124c3b99a5d80b309df9d41daaf5c530a1313', class: "paginator-size-label" }, "Por p\u00E1gina:"), h("select", { key: '8c58fd97f11866a2467e4412be2cc18252d55d79', class: "paginator-size-select", onChange: (e) => this.onPageSizeChange(e) }, this.parsedOptions.map(opt => (h("option", { value: opt, selected: opt === this.pageSize }, opt)))))), h("div", { key: 'd727c882a91240cc9d777156c7b6cd2fac01ca67', class: "paginator-pages" }, !isFirst && !this.noLabels && (h("button", { key: '7efb966e0f8a6e8270ec8fda44551072acb46152', class: { 'paginator-btn': true, 'paginator-btn--arrow': true }, onClick: () => this.goTo(1), "aria-label": "Primera p\u00E1gina" }, h("dropi-icon", { key: 'ac59bf489afc4622101bdeaa2b1eb9d8628041d4', name: "Arrow-double-small-left", width: "16px", height: "16px", color: "Gray-Gray-600" }))), !isFirst && (h("button", { key: '0347c7803eed753d73fd0260330853995e74e734', class: { 'paginator-btn': true, 'paginator-btn--arrow': true }, onClick: () => this.goTo(this.page - 1), "aria-label": "Anterior" }, h("dropi-icon", { key: '7097ac1ba68a1953c686022ea73f812437cc96cd', name: "Dropdown-left", width: "16px", height: "16px", color: "Gray-Gray-600" }), !this.noLabels && h("span", { key: '786be5b0f0116c35c2685356607695e8f22328e0', class: "paginator-label" }, "Anterior"))), pages.map((p, i) => p === '...'
|
|
73
75
|
? h("span", { class: "paginator-ellipsis", key: `e${i}` }, "\u2026")
|
|
74
|
-
: h("button", { key: p, class: { 'paginator-btn': true, 'paginator-btn--active': p === this.page }, onClick: () => this.goTo(p), "aria-current": p === this.page ? 'page' : undefined }, p)), h("button", { key: '
|
|
76
|
+
: h("button", { key: p, class: { 'paginator-btn': true, 'paginator-btn--active': p === this.page }, onClick: () => this.goTo(p), "aria-current": p === this.page ? 'page' : undefined }, p)), !isLast && (h("button", { key: 'e462ff2d53d1b1361e813701fb549505e0eada30', class: { 'paginator-btn': true, 'paginator-btn--arrow': true }, onClick: () => this.goTo(this.page + 1), "aria-label": "Siguiente" }, !this.noLabels && h("span", { key: '1d40fa0b8b69c72c3e7eed4cd4732f009508e052', class: "paginator-label" }, "Siguiente"), h("dropi-icon", { key: 'efcc1414a52a3946f38e2b7790bcbed2fce42328', name: "Dropdown-Right", width: "16px", height: "16px", color: "Gray-Gray-600" }))), !isLast && !this.noLabels && (h("button", { key: 'ad08274cb7d624d141ee7c1599fb5662e5715aca', class: { 'paginator-btn': true, 'paginator-btn--arrow': true }, onClick: () => this.goTo(this.totalPages), "aria-label": "\u00DAltima p\u00E1gina" }, h("dropi-icon", { key: '579969aa3a6c0bc538a2d68fc399e017a836136d', name: "Arrow-double-small-right", width: "16px", height: "16px", color: "Gray-Gray-600" }))))));
|
|
75
77
|
}
|
|
76
78
|
static get is() { return "dropi-paginator"; }
|
|
77
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -167,6 +169,26 @@ export class DropiPaginator {
|
|
|
167
169
|
"attribute": "max-pages",
|
|
168
170
|
"defaultValue": "5"
|
|
169
171
|
},
|
|
172
|
+
"noLabels": {
|
|
173
|
+
"type": "boolean",
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "boolean",
|
|
177
|
+
"resolved": "boolean",
|
|
178
|
+
"references": {}
|
|
179
|
+
},
|
|
180
|
+
"required": false,
|
|
181
|
+
"optional": false,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [],
|
|
184
|
+
"text": "Hide \"Anterior\"/\"Siguiente\" text labels, show only arrows"
|
|
185
|
+
},
|
|
186
|
+
"getter": false,
|
|
187
|
+
"setter": false,
|
|
188
|
+
"reflect": false,
|
|
189
|
+
"attribute": "no-labels",
|
|
190
|
+
"defaultValue": "false"
|
|
191
|
+
},
|
|
170
192
|
"showPageSizeSelector": {
|
|
171
193
|
"type": "boolean",
|
|
172
194
|
"mutable": false,
|
|
@@ -28,7 +28,7 @@ export class DropiRadioButton {
|
|
|
28
28
|
this.dropiChange.emit(e);
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: 'd1f58dca9ddeacc153cfd1808fdc19d8c830e738', class: "dropi-radio-button" }, h("label", { key: '569169ec20f9d8fe69abe1869aed04f80f569fe8', htmlFor: this.inputId }, h("input", { key: '47f93ccdeedb805ec79e3f349aefb1b5e818437d', id: this.inputId, type: "radio", name: this.name, checked: this.checked, onChange: (e) => this.handleChange(e) }), this.label)));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "dropi-radio-button"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
:host { display: block; width: 100%; }
|
|
2
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
3
|
+
|
|
4
|
+
.rsl__search {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: var(--Size-2, 8px);
|
|
8
|
+
padding: var(--Size-2, 8px) var(--Size-3, 12px);
|
|
9
|
+
border: 1px solid var(--Gray-Gray-200, #c3c9d9);
|
|
10
|
+
border-radius: var(--Border-2, 8px);
|
|
11
|
+
margin-bottom: var(--Size-2, 8px);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.rsl__search-input {
|
|
15
|
+
flex: 1;
|
|
16
|
+
border: none;
|
|
17
|
+
outline: none;
|
|
18
|
+
font-size: var(--font-size-s, 12px);
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
color: var(--Gray-Gray-700, #32394d);
|
|
21
|
+
background: transparent;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.rsl__list { display: flex; flex-direction: column; gap: var(--Size-2, 8px); }
|
|
25
|
+
|
|
26
|
+
.rsl__item {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: flex-start;
|
|
29
|
+
gap: var(--Size-3, 12px);
|
|
30
|
+
padding: var(--Size-3, 12px);
|
|
31
|
+
border: 1px solid var(--Gray-Gray-200, #c3c9d9);
|
|
32
|
+
border-radius: var(--Border-2, 8px);
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
transition: border-color 0.15s, background 0.15s;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rsl__item:hover { background: var(--Gray-Gray-50, #f7f8fa); }
|
|
38
|
+
.rsl__item--selected { border-color: var(--Primary-Primary-500, #f49a3d); background: var(--Primary-Primary-50, #fff5eb); }
|
|
39
|
+
|
|
40
|
+
.rsl__radio {
|
|
41
|
+
width: 18px;
|
|
42
|
+
height: 18px;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
border: 2px solid var(--Gray-Gray-300, #a3abbf);
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
margin-top: 1px;
|
|
50
|
+
transition: border-color 0.15s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.rsl__radio--checked { border-color: var(--Primary-Primary-500, #f49a3d); }
|
|
54
|
+
|
|
55
|
+
.rsl__radio-dot {
|
|
56
|
+
width: 8px;
|
|
57
|
+
height: 8px;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background: var(--Primary-Primary-500, #f49a3d);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.rsl__content { display: flex; flex-direction: column; gap: 2px; }
|
|
63
|
+
.rsl__name { font-size: var(--font-size-s, 12px); font-weight: var(--font-weight-bold, 700); color: var(--Gray-Gray-700, #32394d); }
|
|
64
|
+
.rsl__desc { font-size: var(--font-size-xs, 10px); color: var(--Gray-Gray-500, #69738c); }
|