le-kit 0.1.5 → 0.1.7
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/le-kit/assets/custom-elements.json → custom-elements.json} +833 -833
- package/dist/cjs/index-D7B9TPh8.js +1835 -0
- package/dist/cjs/index-D7B9TPh8.js.map +1 -0
- package/dist/cjs/index.cjs.js +119 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/le-box.cjs.entry.js +184 -0
- package/dist/cjs/le-box.entry.cjs.js.map +1 -0
- package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +1 -0
- package/dist/cjs/le-button_6.cjs.entry.js +1200 -0
- package/dist/cjs/le-card.cjs.entry.js +29 -0
- package/dist/cjs/le-card.entry.cjs.js.map +1 -0
- package/dist/cjs/le-kit.cjs.js +25 -0
- package/dist/cjs/le-kit.cjs.js.map +1 -0
- package/dist/cjs/le-number-input.cjs.entry.js +202 -0
- package/dist/cjs/le-number-input.entry.cjs.js.map +1 -0
- package/dist/cjs/le-popup.cjs.entry.js +212 -0
- package/dist/cjs/le-popup.entry.cjs.js.map +1 -0
- package/dist/cjs/le-round-progress.cjs.entry.js +106 -0
- package/dist/cjs/le-round-progress.entry.cjs.js.map +1 -0
- package/dist/cjs/le-stack.cjs.entry.js +135 -0
- package/dist/cjs/le-stack.entry.cjs.js.map +1 -0
- package/dist/cjs/le-text.cjs.entry.js +335 -0
- package/dist/cjs/le-text.entry.cjs.js.map +1 -0
- package/dist/cjs/le-turntable.cjs.entry.js +139 -0
- package/dist/cjs/le-turntable.entry.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/utils-DrsoID-a.js +152 -0
- package/dist/cjs/utils-DrsoID-a.js.map +1 -0
- package/dist/collection/collection-manifest.json +26 -0
- package/dist/collection/components/le-box/le-box.default.css +37 -0
- package/dist/collection/components/le-box/le-box.js +614 -0
- package/dist/collection/components/le-box/le-box.js.map +1 -0
- package/dist/collection/components/le-button/le-button.default.css +263 -0
- package/dist/collection/components/le-button/le-button.js +368 -0
- package/dist/collection/components/le-button/le-button.js.map +1 -0
- package/dist/collection/components/le-card/le-card.default.css +74 -0
- package/dist/collection/components/le-card/le-card.js +102 -0
- package/dist/collection/components/le-card/le-card.js.map +1 -0
- package/dist/collection/components/le-checkbox/le-checkbox.css +93 -0
- package/dist/collection/components/le-checkbox/le-checkbox.js +192 -0
- package/dist/collection/components/le-checkbox/le-checkbox.js.map +1 -0
- package/dist/collection/components/le-component/le-component.css +189 -0
- package/dist/{le-kit/le-component.entry.js → collection/components/le-component/le-component.js} +141 -24
- package/dist/collection/components/le-component/le-component.js.map +1 -0
- package/dist/collection/components/le-number-input/le-number-input.css +135 -0
- package/dist/collection/components/le-number-input/le-number-input.js +515 -0
- package/dist/collection/components/le-number-input/le-number-input.js.map +1 -0
- package/dist/collection/components/le-popover/le-popover.css +143 -0
- package/dist/collection/components/le-popover/le-popover.js +693 -0
- package/dist/collection/components/le-popover/le-popover.js.map +1 -0
- package/dist/collection/components/le-popup/le-popup.api.js +101 -0
- package/dist/collection/components/le-popup/le-popup.api.js.map +1 -0
- package/dist/collection/components/le-popup/le-popup.css +222 -0
- package/dist/collection/components/le-popup/le-popup.js +596 -0
- package/dist/collection/components/le-popup/le-popup.js.map +1 -0
- package/dist/collection/components/le-round-progress/le-round-progress.css +34 -0
- package/dist/collection/components/le-round-progress/le-round-progress.js +184 -0
- package/dist/collection/components/le-round-progress/le-round-progress.js.map +1 -0
- package/dist/collection/components/le-slot/le-slot.default.css +222 -0
- package/dist/{le-kit/le-slot.entry.js → collection/components/le-slot/le-slot.js} +270 -20
- package/dist/collection/components/le-slot/le-slot.js.map +1 -0
- package/dist/collection/components/le-stack/le-stack.default.css +37 -0
- package/dist/collection/components/le-stack/le-stack.js +389 -0
- package/dist/collection/components/le-stack/le-stack.js.map +1 -0
- package/dist/collection/components/le-string-input/le-string-input.css +83 -0
- package/dist/collection/components/le-string-input/le-string-input.js +359 -0
- package/dist/collection/components/le-string-input/le-string-input.js.map +1 -0
- package/dist/collection/components/le-text/le-text.default.css +169 -0
- package/dist/collection/components/le-text/le-text.js +475 -0
- package/dist/collection/components/le-text/le-text.js.map +1 -0
- package/dist/collection/components/le-turntable/le-turntable.css +10 -0
- package/dist/collection/components/le-turntable/le-turntable.js +210 -0
- package/dist/collection/components/le-turntable/le-turntable.js.map +1 -0
- package/dist/collection/global/app.js +167 -0
- package/dist/collection/global/app.js.map +1 -0
- package/dist/collection/index.js +15 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/types/blocks.js +115 -0
- package/dist/collection/types/blocks.js.map +1 -0
- package/dist/collection/types/options.js +2 -0
- package/dist/collection/types/options.js.map +1 -0
- package/dist/collection/utils/utils.js +141 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/index.js +127 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/le-box.js +256 -0
- package/dist/components/le-box.js.map +1 -0
- package/dist/components/le-button.js +9 -0
- package/dist/components/le-button.js.map +1 -0
- package/dist/components/le-button2.js +1446 -0
- package/dist/components/le-button2.js.map +1 -0
- package/dist/components/le-card.js +83 -0
- package/dist/components/le-card.js.map +1 -0
- package/dist/components/le-checkbox.js +9 -0
- package/dist/components/le-checkbox.js.map +1 -0
- package/dist/components/le-component.js +9 -0
- package/dist/components/le-component.js.map +1 -0
- package/dist/components/le-number-input.js +271 -0
- package/dist/components/le-number-input.js.map +1 -0
- package/dist/components/le-popover.js +9 -0
- package/dist/components/le-popover.js.map +1 -0
- package/dist/{le-kit/le-popover.entry.js → components/le-popover2.js} +45 -9
- package/dist/components/le-popover2.js.map +1 -0
- package/dist/components/le-popup.js +279 -0
- package/dist/components/le-popup.js.map +1 -0
- package/dist/components/le-round-progress.js +135 -0
- package/dist/components/le-round-progress.js.map +1 -0
- package/dist/components/le-slot.js +9 -0
- package/dist/components/le-slot.js.map +1 -0
- package/dist/components/le-stack.js +198 -0
- package/dist/components/le-stack.js.map +1 -0
- package/dist/components/le-string-input.js +9 -0
- package/dist/components/le-string-input.js.map +1 -0
- package/dist/components/le-text.js +398 -0
- package/dist/components/le-text.js.map +1 -0
- package/dist/components/le-turntable.js +164 -0
- package/dist/components/le-turntable.js.map +1 -0
- package/dist/docs.d.ts +443 -0
- package/dist/docs.json +5185 -0
- package/dist/esm/index-PS-3Rz-c.js +1818 -0
- package/dist/esm/index-PS-3Rz-c.js.map +1 -0
- package/dist/esm/index.js +106 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/{le-kit → esm}/le-box.entry.js +3 -3
- package/dist/esm/le-box.entry.js.map +1 -0
- package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +1 -0
- package/dist/esm/le-button_6.entry.js +1193 -0
- package/dist/{le-kit → esm}/le-card.entry.js +3 -3
- package/dist/esm/le-card.entry.js.map +1 -0
- package/dist/esm/le-kit.js +21 -0
- package/dist/esm/le-kit.js.map +1 -0
- package/dist/{le-kit → esm}/le-number-input.entry.js +5 -5
- package/dist/esm/le-number-input.entry.js.map +1 -0
- package/dist/{le-kit → esm}/le-popup.entry.js +6 -6
- package/dist/esm/le-popup.entry.js.map +1 -0
- package/dist/{le-kit → esm}/le-round-progress.entry.js +2 -2
- package/dist/esm/le-round-progress.entry.js.map +1 -0
- package/dist/{le-kit → esm}/le-stack.entry.js +3 -3
- package/dist/esm/le-stack.entry.js.map +1 -0
- package/dist/{le-kit → esm}/le-text.entry.js +3 -3
- package/dist/esm/le-text.entry.js.map +1 -0
- package/dist/{le-kit → esm}/le-turntable.entry.js +2 -2
- package/dist/esm/le-turntable.entry.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/{le-kit/utils-FDOApZ53.js → esm/utils-lgjSfQP0.js} +3 -3
- package/dist/{le-kit/utils-FDOApZ53.js.map → esm/utils-lgjSfQP0.js.map} +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/le-kit/index.esm.js +2 -116
- package/dist/le-kit/index.esm.js.map +1 -1
- package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +1 -0
- package/dist/le-kit/le-kit.css +1 -1010
- package/dist/le-kit/le-kit.esm.js +2 -48
- package/dist/le-kit/le-kit.esm.js.map +1 -1
- package/dist/le-kit/p-27710b5b.entry.js +2 -0
- package/dist/le-kit/p-27710b5b.entry.js.map +1 -0
- package/dist/le-kit/p-34102cef.entry.js +2 -0
- package/dist/le-kit/p-34102cef.entry.js.map +1 -0
- package/dist/le-kit/p-56a80e6d.entry.js +2 -0
- package/dist/le-kit/p-56a80e6d.entry.js.map +1 -0
- package/dist/le-kit/p-615ea10f.entry.js +2 -0
- package/dist/le-kit/p-615ea10f.entry.js.map +1 -0
- package/dist/le-kit/p-935bb2d4.entry.js +2 -0
- package/dist/le-kit/p-935bb2d4.entry.js.map +1 -0
- package/dist/le-kit/p-9d3dc4e5.entry.js +2 -0
- package/dist/le-kit/p-9d3dc4e5.entry.js.map +1 -0
- package/dist/le-kit/p-DN2JVY-7.js +2 -0
- package/dist/le-kit/p-DN2JVY-7.js.map +1 -0
- package/dist/le-kit/p-PS-3Rz-c.js +3 -0
- package/dist/le-kit/p-PS-3Rz-c.js.map +1 -0
- package/dist/le-kit/p-ccabc638.entry.js +2 -0
- package/dist/le-kit/p-ccabc638.entry.js.map +1 -0
- package/dist/le-kit/p-d8157b06.entry.js +2 -0
- package/dist/le-kit/p-d8157b06.entry.js.map +1 -0
- package/dist/le-kit/p-e8c2ca0e.entry.js +2 -0
- package/dist/le-kit/p-e8c2ca0e.entry.js.map +1 -0
- package/dist/themes/base.css +89 -0
- package/dist/themes/dark.css +100 -0
- package/dist/themes/default.css +108 -0
- package/dist/themes/gradient.css +100 -0
- package/dist/themes/index.css +413 -0
- package/dist/themes/minimal.css +100 -0
- package/dist/themes/warm.css +100 -0
- package/dist/types/components.d.ts +4 -4
- package/dist/types/global/app.d.ts +33 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -2
- package/readme.md +22 -0
- package/dist/le-kit/index-Da-89pOc.js +0 -4522
- package/dist/le-kit/index-Da-89pOc.js.map +0 -1
- package/dist/le-kit/le-button.entry.esm.js.map +0 -1
- package/dist/le-kit/le-button.entry.js +0 -90
- package/dist/le-kit/le-checkbox.entry.esm.js.map +0 -1
- package/dist/le-kit/le-checkbox.entry.js +0 -59
- package/dist/le-kit/le-component.entry.esm.js.map +0 -1
- package/dist/le-kit/le-popover.entry.esm.js.map +0 -1
- package/dist/le-kit/le-slot.entry.esm.js.map +0 -1
- package/dist/le-kit/le-string-input.entry.esm.js.map +0 -1
- package/dist/le-kit/le-string-input.entry.js +0 -93
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { classnames } from "../../utils/utils";
|
|
3
|
+
/**
|
|
4
|
+
* A text input component with support for labels, descriptions, icons, and external IDs.
|
|
5
|
+
*
|
|
6
|
+
* @slot - The label text for the input
|
|
7
|
+
* @slot description - Additional description text displayed below the input
|
|
8
|
+
* @slot icon-start - Icon to display at the start of the input
|
|
9
|
+
* @slot icon-end - Icon to display at the end of the input
|
|
10
|
+
*
|
|
11
|
+
* @cssprop --le-input-bg - Input background color
|
|
12
|
+
* @cssprop --le-input-color - Input text color
|
|
13
|
+
* @cssprop --le-input-border - Input border style
|
|
14
|
+
* @cssprop --le-input-border-focus - Input border style when focused
|
|
15
|
+
* @cssprop --le-input-radius - Input border radius
|
|
16
|
+
* @cssprop --le-input-padding - Input padding
|
|
17
|
+
*/
|
|
18
|
+
export class LeStringInput {
|
|
19
|
+
el;
|
|
20
|
+
/**
|
|
21
|
+
* Mode of the popover should be 'default' for internal use
|
|
22
|
+
*/
|
|
23
|
+
mode;
|
|
24
|
+
/**
|
|
25
|
+
* The value of the input
|
|
26
|
+
*/
|
|
27
|
+
value;
|
|
28
|
+
/**
|
|
29
|
+
* The name of the input
|
|
30
|
+
*/
|
|
31
|
+
name;
|
|
32
|
+
/**
|
|
33
|
+
* The type of the input (text, email, password, etc.)
|
|
34
|
+
*/
|
|
35
|
+
type = 'text';
|
|
36
|
+
/**
|
|
37
|
+
* Label for the input
|
|
38
|
+
*/
|
|
39
|
+
label;
|
|
40
|
+
/**
|
|
41
|
+
* Icon for the start icon
|
|
42
|
+
*/
|
|
43
|
+
iconStart;
|
|
44
|
+
/**
|
|
45
|
+
* Icon for the end icon
|
|
46
|
+
*/
|
|
47
|
+
iconEnd;
|
|
48
|
+
/**
|
|
49
|
+
* Placeholder text
|
|
50
|
+
*/
|
|
51
|
+
placeholder;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the input is disabled
|
|
54
|
+
*/
|
|
55
|
+
disabled = false;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the input is read-only
|
|
58
|
+
*/
|
|
59
|
+
readonly = false;
|
|
60
|
+
/**
|
|
61
|
+
* External ID for linking with external systems
|
|
62
|
+
*/
|
|
63
|
+
externalId;
|
|
64
|
+
/**
|
|
65
|
+
* Emitted when the value changes (on blur or Enter)
|
|
66
|
+
*/
|
|
67
|
+
leChange;
|
|
68
|
+
/**
|
|
69
|
+
* Emitted when the input value changes (on keystroke)
|
|
70
|
+
*/
|
|
71
|
+
leInput;
|
|
72
|
+
handleInput = (ev) => {
|
|
73
|
+
const input = ev.target;
|
|
74
|
+
this.value = input.value;
|
|
75
|
+
this.leInput.emit({
|
|
76
|
+
value: this.value,
|
|
77
|
+
name: this.name,
|
|
78
|
+
externalId: this.externalId
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
handleChange = (ev) => {
|
|
82
|
+
const input = ev.target;
|
|
83
|
+
this.value = input.value;
|
|
84
|
+
this.leChange.emit({
|
|
85
|
+
value: this.value,
|
|
86
|
+
name: this.name,
|
|
87
|
+
externalId: this.externalId
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
handleClick = (ev) => {
|
|
91
|
+
ev.stopPropagation();
|
|
92
|
+
};
|
|
93
|
+
render() {
|
|
94
|
+
return (h("le-component", { key: 'd0c69370dae2d1fee5700954e4823d2a03a51331', component: "le-string-input", hostClass: classnames({ 'disabled': this.disabled }) }, h("div", { key: '4acae8d3c34da2a86970a616c493ff210d561f5f', class: "le-input-wrapper" }, this.label && (h("label", { key: '609191b45187b6b1a65d05cd594b149760ac6882', class: "le-input-label", htmlFor: this.name }, this.label)), h("div", { key: '36b4caff4468ac7421db03f811cb3ef4a622b001', class: "le-input-container" }, this.iconStart && (h("span", { key: '344f88887fe8270bbef7e26ec1ad5da9fae1f8e4', class: "icon-start" }, this.iconStart)), h("input", { key: '4ba7beeddd7fb3cf23d03e029d11a804764cdd6e', id: this.name, type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }), this.iconEnd && (h("span", { key: '7cdd4b52c3e1a1b18b19e697bdb42431941bba01', class: "icon-end" }, this.iconEnd))), h("div", { key: '113a75aa413e4d95300aeaa97d1ce7a75cf68c7a', class: "le-input-description" }, h("le-slot", { key: '0b37fc14e6df68f6c44cf9001d63a70f019e1cc3', name: "description", type: "text", tag: "p", label: "Description" }, h("slot", { key: '2674056dc915fabdb4fcbcaa13294a116b9509a6', name: "description" }))))));
|
|
95
|
+
}
|
|
96
|
+
static get is() { return "le-string-input"; }
|
|
97
|
+
static get encapsulation() { return "shadow"; }
|
|
98
|
+
static get originalStyleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["le-string-input.css"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get styleUrls() {
|
|
104
|
+
return {
|
|
105
|
+
"$": ["le-string-input.css"]
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
static get properties() {
|
|
109
|
+
return {
|
|
110
|
+
"mode": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": true,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "'default' | 'admin'",
|
|
115
|
+
"resolved": "\"admin\" | \"default\"",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Mode of the popover should be 'default' for internal use"
|
|
123
|
+
},
|
|
124
|
+
"getter": false,
|
|
125
|
+
"setter": false,
|
|
126
|
+
"reflect": true,
|
|
127
|
+
"attribute": "mode"
|
|
128
|
+
},
|
|
129
|
+
"value": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"mutable": true,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "string",
|
|
134
|
+
"resolved": "string",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": "The value of the input"
|
|
142
|
+
},
|
|
143
|
+
"getter": false,
|
|
144
|
+
"setter": false,
|
|
145
|
+
"reflect": true,
|
|
146
|
+
"attribute": "value"
|
|
147
|
+
},
|
|
148
|
+
"name": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "string",
|
|
153
|
+
"resolved": "string",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": false,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": "The name of the input"
|
|
161
|
+
},
|
|
162
|
+
"getter": false,
|
|
163
|
+
"setter": false,
|
|
164
|
+
"reflect": false,
|
|
165
|
+
"attribute": "name"
|
|
166
|
+
},
|
|
167
|
+
"type": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "'text' | 'email' | 'password' | 'tel' | 'url'",
|
|
172
|
+
"resolved": "\"email\" | \"password\" | \"tel\" | \"text\" | \"url\"",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": false,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": "The type of the input (text, email, password, etc.)"
|
|
180
|
+
},
|
|
181
|
+
"getter": false,
|
|
182
|
+
"setter": false,
|
|
183
|
+
"reflect": false,
|
|
184
|
+
"attribute": "type",
|
|
185
|
+
"defaultValue": "'text'"
|
|
186
|
+
},
|
|
187
|
+
"label": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "string",
|
|
192
|
+
"resolved": "string",
|
|
193
|
+
"references": {}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": false,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": "Label for the input"
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false,
|
|
203
|
+
"reflect": false,
|
|
204
|
+
"attribute": "label"
|
|
205
|
+
},
|
|
206
|
+
"iconStart": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"mutable": false,
|
|
209
|
+
"complexType": {
|
|
210
|
+
"original": "string",
|
|
211
|
+
"resolved": "string",
|
|
212
|
+
"references": {}
|
|
213
|
+
},
|
|
214
|
+
"required": false,
|
|
215
|
+
"optional": false,
|
|
216
|
+
"docs": {
|
|
217
|
+
"tags": [],
|
|
218
|
+
"text": "Icon for the start icon"
|
|
219
|
+
},
|
|
220
|
+
"getter": false,
|
|
221
|
+
"setter": false,
|
|
222
|
+
"reflect": false,
|
|
223
|
+
"attribute": "icon-start"
|
|
224
|
+
},
|
|
225
|
+
"iconEnd": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "string",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Icon for the end icon"
|
|
238
|
+
},
|
|
239
|
+
"getter": false,
|
|
240
|
+
"setter": false,
|
|
241
|
+
"reflect": false,
|
|
242
|
+
"attribute": "icon-end"
|
|
243
|
+
},
|
|
244
|
+
"placeholder": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"mutable": false,
|
|
247
|
+
"complexType": {
|
|
248
|
+
"original": "string",
|
|
249
|
+
"resolved": "string",
|
|
250
|
+
"references": {}
|
|
251
|
+
},
|
|
252
|
+
"required": false,
|
|
253
|
+
"optional": false,
|
|
254
|
+
"docs": {
|
|
255
|
+
"tags": [],
|
|
256
|
+
"text": "Placeholder text"
|
|
257
|
+
},
|
|
258
|
+
"getter": false,
|
|
259
|
+
"setter": false,
|
|
260
|
+
"reflect": false,
|
|
261
|
+
"attribute": "placeholder"
|
|
262
|
+
},
|
|
263
|
+
"disabled": {
|
|
264
|
+
"type": "boolean",
|
|
265
|
+
"mutable": false,
|
|
266
|
+
"complexType": {
|
|
267
|
+
"original": "boolean",
|
|
268
|
+
"resolved": "boolean",
|
|
269
|
+
"references": {}
|
|
270
|
+
},
|
|
271
|
+
"required": false,
|
|
272
|
+
"optional": false,
|
|
273
|
+
"docs": {
|
|
274
|
+
"tags": [],
|
|
275
|
+
"text": "Whether the input is disabled"
|
|
276
|
+
},
|
|
277
|
+
"getter": false,
|
|
278
|
+
"setter": false,
|
|
279
|
+
"reflect": false,
|
|
280
|
+
"attribute": "disabled",
|
|
281
|
+
"defaultValue": "false"
|
|
282
|
+
},
|
|
283
|
+
"readonly": {
|
|
284
|
+
"type": "boolean",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "boolean",
|
|
288
|
+
"resolved": "boolean",
|
|
289
|
+
"references": {}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": false,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": "Whether the input is read-only"
|
|
296
|
+
},
|
|
297
|
+
"getter": false,
|
|
298
|
+
"setter": false,
|
|
299
|
+
"reflect": false,
|
|
300
|
+
"attribute": "readonly",
|
|
301
|
+
"defaultValue": "false"
|
|
302
|
+
},
|
|
303
|
+
"externalId": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"mutable": false,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "string",
|
|
308
|
+
"resolved": "string",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": "External ID for linking with external systems"
|
|
316
|
+
},
|
|
317
|
+
"getter": false,
|
|
318
|
+
"setter": false,
|
|
319
|
+
"reflect": false,
|
|
320
|
+
"attribute": "external-id"
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
static get events() {
|
|
325
|
+
return [{
|
|
326
|
+
"method": "leChange",
|
|
327
|
+
"name": "change",
|
|
328
|
+
"bubbles": true,
|
|
329
|
+
"cancelable": true,
|
|
330
|
+
"composed": true,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": "Emitted when the value changes (on blur or Enter)"
|
|
334
|
+
},
|
|
335
|
+
"complexType": {
|
|
336
|
+
"original": "{ value: string; name: string; externalId: string }",
|
|
337
|
+
"resolved": "{ value: string; name: string; externalId: string; }",
|
|
338
|
+
"references": {}
|
|
339
|
+
}
|
|
340
|
+
}, {
|
|
341
|
+
"method": "leInput",
|
|
342
|
+
"name": "input",
|
|
343
|
+
"bubbles": true,
|
|
344
|
+
"cancelable": true,
|
|
345
|
+
"composed": true,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": "Emitted when the input value changes (on keystroke)"
|
|
349
|
+
},
|
|
350
|
+
"complexType": {
|
|
351
|
+
"original": "{ value: string; name: string; externalId: string }",
|
|
352
|
+
"resolved": "{ value: string; name: string; externalId: string; }",
|
|
353
|
+
"references": {}
|
|
354
|
+
}
|
|
355
|
+
}];
|
|
356
|
+
}
|
|
357
|
+
static get elementRef() { return "el"; }
|
|
358
|
+
}
|
|
359
|
+
//# sourceMappingURL=le-string-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"le-string-input.js","sourceRoot":"","sources":["../../../src/components/le-string-input/le-string-input.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Prop, Event, EventEmitter, h, Element } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A text input component with support for labels, descriptions, icons, and external IDs.\n *\n * @slot - The label text for the input\n * @slot description - Additional description text displayed below the input\n * @slot icon-start - Icon to display at the start of the input\n * @slot icon-end - Icon to display at the end of the input\n *\n * @cssprop --le-input-bg - Input background color\n * @cssprop --le-input-color - Input text color\n * @cssprop --le-input-border - Input border style\n * @cssprop --le-input-border-focus - Input border style when focused\n * @cssprop --le-input-radius - Input border radius\n * @cssprop --le-input-padding - Input padding\n */\n@Component({\n tag: 'le-string-input',\n styleUrl: 'le-string-input.css',\n shadow: true,\n})\nexport class LeStringInput {\n @Element() el: HTMLElement;\n\n /**\n * Mode of the popover should be 'default' for internal use\n */\n @Prop({ mutable: true, reflect: true }) mode: 'default' | 'admin';\n\n /**\n * The value of the input\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n\n /**\n * The name of the input\n */\n @Prop() name: string;\n\n /**\n * The type of the input (text, email, password, etc.)\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * Label for the input\n */\n @Prop() label: string;\n\n /**\n * Icon for the start icon\n */\n @Prop() iconStart: string;\n\n /**\n * Icon for the end icon\n */\n @Prop() iconEnd: string;\n\n /**\n * Placeholder text\n */\n @Prop() placeholder: string;\n\n /**\n * Whether the input is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether the input is read-only\n */\n @Prop() readonly: boolean = false;\n\n /**\n * External ID for linking with external systems\n */\n @Prop() externalId: string;\n\n /**\n * Emitted when the value changes (on blur or Enter)\n */\n @Event({ eventName: 'change' }) leChange: EventEmitter<{ value: string; name: string; externalId: string }>;\n\n /**\n * Emitted when the input value changes (on keystroke)\n */\n @Event({ eventName: 'input' }) leInput: EventEmitter<{ value: string; name: string; externalId: string }>;\n\n private handleInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n this.value = input.value;\n this.leInput.emit({\n value: this.value,\n name: this.name,\n externalId: this.externalId\n });\n };\n\n private handleChange = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n this.value = input.value;\n this.leChange.emit({\n value: this.value,\n name: this.name,\n externalId: this.externalId\n });\n };\n\n private handleClick = (ev: Event) => {\n ev.stopPropagation();\n };\n\n render() {\n return (\n <le-component component=\"le-string-input\" hostClass={classnames({ 'disabled': this.disabled })}>\n <div class=\"le-input-wrapper\">\n {this.label && (\n <label class=\"le-input-label\" htmlFor={this.name}>{this.label}</label>\n )}\n \n <div class=\"le-input-container\">\n {this.iconStart && (\n <span class=\"icon-start\">{this.iconStart}</span>\n )}\n <input\n id={this.name}\n type={this.type}\n name={this.name}\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onChange={this.handleChange}\n onClick={this.handleClick}\n />\n {this.iconEnd && (\n <span class=\"icon-end\">{this.iconEnd}</span>\n )}\n </div>\n\n <div class=\"le-input-description\">\n <le-slot name=\"description\" type=\"text\" tag=\"p\" label=\"Description\">\n <slot name=\"description\"></slot>\n </le-slot>\n </div>\n </div>\n </le-component>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* le-text default styles
|
|
3
|
+
*
|
|
4
|
+
* Semantic text element with variant-based styling
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([hidden]) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Base text styles */
|
|
16
|
+
.le-text {
|
|
17
|
+
margin: 0;
|
|
18
|
+
color: var(--le-text-color, var(--le-color-text));
|
|
19
|
+
font-family: var(--le-font-family);
|
|
20
|
+
line-height: var(--le-text-line-height, 1.5);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Paragraph */
|
|
24
|
+
.variant-p {
|
|
25
|
+
font-size: var(--le-font-size-base, 1rem);
|
|
26
|
+
font-weight: var(--le-font-weight-normal, 400);
|
|
27
|
+
color: var(--le-color-text);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Headings */
|
|
31
|
+
.variant-h1 {
|
|
32
|
+
font-size: var(--le-font-size-4xl, 2.5rem);
|
|
33
|
+
font-weight: var(--le-font-weight-bold, 700);
|
|
34
|
+
line-height: 1.2;
|
|
35
|
+
color: var(--le-color-text);
|
|
36
|
+
letter-spacing: -0.02em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.variant-h2 {
|
|
40
|
+
font-size: var(--le-font-size-3xl, 2rem);
|
|
41
|
+
font-weight: var(--le-font-weight-bold, 700);
|
|
42
|
+
line-height: 1.25;
|
|
43
|
+
color: var(--le-color-text);
|
|
44
|
+
letter-spacing: -0.01em;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.variant-h3 {
|
|
48
|
+
font-size: var(--le-font-size-2xl, 1.5rem);
|
|
49
|
+
font-weight: var(--le-font-weight-semibold, 600);
|
|
50
|
+
line-height: 1.3;
|
|
51
|
+
color: var(--le-color-text);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.variant-h4 {
|
|
55
|
+
font-size: var(--le-font-size-xl, 1.25rem);
|
|
56
|
+
font-weight: var(--le-font-weight-semibold, 600);
|
|
57
|
+
line-height: 1.35;
|
|
58
|
+
color: var(--le-color-text);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.variant-h5 {
|
|
62
|
+
font-size: var(--le-font-size-lg, 1.125rem);
|
|
63
|
+
font-weight: var(--le-font-weight-medium, 500);
|
|
64
|
+
line-height: 1.4;
|
|
65
|
+
color: var(--le-color-text);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.variant-h6 {
|
|
69
|
+
font-size: var(--le-font-size-base, 1rem);
|
|
70
|
+
font-weight: var(--le-font-weight-medium, 500);
|
|
71
|
+
line-height: 1.45;
|
|
72
|
+
color: var(--le-color-text);
|
|
73
|
+
text-transform: uppercase;
|
|
74
|
+
letter-spacing: 0.05em;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Code */
|
|
78
|
+
.variant-code {
|
|
79
|
+
font-family: var(--le-font-family-mono, 'SF Mono', 'Fira Code', 'Consolas', monospace);
|
|
80
|
+
font-size: var(--le-font-size-sm, 0.875rem);
|
|
81
|
+
background: var(--le-color-surface-alt, #f5f5f5);
|
|
82
|
+
padding: var(--le-space-md);
|
|
83
|
+
border-radius: var(--le-radius-md);
|
|
84
|
+
overflow-x: auto;
|
|
85
|
+
white-space: pre-wrap;
|
|
86
|
+
color: var(--le-color-text);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Quote */
|
|
90
|
+
.variant-quote {
|
|
91
|
+
font-size: var(--le-font-size-lg, 1.125rem);
|
|
92
|
+
font-style: italic;
|
|
93
|
+
color: var(--le-color-text-secondary);
|
|
94
|
+
border-left: 4px solid var(--le-color-primary);
|
|
95
|
+
padding-left: var(--le-space-lg);
|
|
96
|
+
margin-left: 0;
|
|
97
|
+
margin-right: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Label */
|
|
101
|
+
.variant-label {
|
|
102
|
+
font-size: var(--le-font-size-sm, 0.875rem);
|
|
103
|
+
font-weight: var(--le-font-weight-medium, 500);
|
|
104
|
+
color: var(--le-color-text-secondary);
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
letter-spacing: 0.05em;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Small */
|
|
110
|
+
.variant-small {
|
|
111
|
+
font-size: var(--le-font-size-sm, 0.875rem);
|
|
112
|
+
color: var(--le-color-text-secondary);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Truncation */
|
|
116
|
+
.truncate {
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
text-overflow: ellipsis;
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.truncate.max-lines-2,
|
|
123
|
+
.truncate.max-lines-3,
|
|
124
|
+
.truncate.max-lines-4,
|
|
125
|
+
.truncate.max-lines-5 {
|
|
126
|
+
white-space: normal;
|
|
127
|
+
display: -webkit-box;
|
|
128
|
+
-webkit-box-orient: vertical;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.truncate.max-lines-2 { -webkit-line-clamp: 2; line-clamp: 2; }
|
|
132
|
+
.truncate.max-lines-3 { -webkit-line-clamp: 3; line-clamp: 3; }
|
|
133
|
+
.truncate.max-lines-4 { -webkit-line-clamp: 4; line-clamp: 4; }
|
|
134
|
+
.truncate.max-lines-5 { -webkit-line-clamp: 5; line-clamp: 5; }
|
|
135
|
+
|
|
136
|
+
/* Alignment */
|
|
137
|
+
:host([align="center"]) .le-text { text-align: center; }
|
|
138
|
+
:host([align="right"]) .le-text { text-align: right; }
|
|
139
|
+
:host([align="justify"]) .le-text { text-align: justify; }
|
|
140
|
+
|
|
141
|
+
/* Links inside text */
|
|
142
|
+
.le-text a {
|
|
143
|
+
color: var(--le-color-primary);
|
|
144
|
+
text-decoration: underline;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.le-text a:hover {
|
|
148
|
+
color: var(--le-color-primary-dark);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Bold, italic, etc. */
|
|
152
|
+
.le-text strong,
|
|
153
|
+
.le-text b {
|
|
154
|
+
font-weight: var(--le-font-weight-bold, 700);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.le-text em,
|
|
158
|
+
.le-text i {
|
|
159
|
+
font-style: italic;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.le-text u {
|
|
163
|
+
text-decoration: underline;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.le-text s,
|
|
167
|
+
.le-text strike {
|
|
168
|
+
text-decoration: line-through;
|
|
169
|
+
}
|