@lukso/web-components 1.72.0 → 1.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.js +3 -3
- package/dist/components/lukso-button/index.cjs +1 -1
- package/dist/components/lukso-button/index.d.ts +2 -2
- package/dist/components/lukso-button/index.d.ts.map +1 -1
- package/dist/components/lukso-button/index.js +1 -1
- package/dist/components/lukso-card/index.cjs +3 -3
- package/dist/components/lukso-card/index.js +3 -3
- package/dist/components/lukso-checkbox/index.cjs +1 -1
- package/dist/components/lukso-checkbox/index.js +1 -1
- package/dist/components/lukso-footer/index.cjs +1 -1
- package/dist/components/lukso-footer/index.js +1 -1
- package/dist/components/lukso-icon/index.cjs +2 -2
- package/dist/components/lukso-icon/index.js +2 -2
- package/dist/components/lukso-image/index.cjs +2 -2
- package/dist/components/lukso-image/index.js +2 -2
- package/dist/components/lukso-input/index.cjs +170 -43
- package/dist/components/lukso-input/index.d.ts +11 -6
- package/dist/components/lukso-input/index.d.ts.map +1 -1
- package/dist/components/lukso-input/index.js +170 -43
- package/dist/components/lukso-input/lukso-input.stories.d.ts +5 -1
- package/dist/components/lukso-input/lukso-input.stories.d.ts.map +1 -1
- package/dist/components/lukso-modal/index.cjs +1 -1
- package/dist/components/lukso-modal/index.js +1 -1
- package/dist/components/lukso-navbar/index.cjs +3 -3
- package/dist/components/lukso-navbar/index.js +3 -3
- package/dist/components/lukso-profile/index.cjs +2 -2
- package/dist/components/lukso-profile/index.js +2 -2
- package/dist/components/lukso-progress/index.cjs +2 -2
- package/dist/components/lukso-progress/index.js +2 -2
- package/dist/components/lukso-sanitize/index.cjs +1 -1
- package/dist/components/lukso-sanitize/index.js +1 -1
- package/dist/components/lukso-search/index.cjs +105 -139
- package/dist/components/lukso-search/index.d.ts +6 -12
- package/dist/components/lukso-search/index.d.ts.map +1 -1
- package/dist/components/lukso-search/index.js +101 -135
- package/dist/components/lukso-search/lukso-search.stories.d.ts +2 -0
- package/dist/components/lukso-search/lukso-search.stories.d.ts.map +1 -1
- package/dist/components/lukso-select/index.cjs +234 -45
- package/dist/components/lukso-select/index.d.ts +18 -5
- package/dist/components/lukso-select/index.d.ts.map +1 -1
- package/dist/components/lukso-select/index.js +234 -45
- package/dist/components/lukso-select/lukso-select.stories.d.ts +12 -0
- package/dist/components/lukso-select/lukso-select.stories.d.ts.map +1 -1
- package/dist/components/lukso-share/index.cjs +1 -1
- package/dist/components/lukso-share/index.js +1 -1
- package/dist/components/lukso-switch/index.cjs +2 -2
- package/dist/components/lukso-switch/index.js +2 -2
- package/dist/components/lukso-tag/index.cjs +2 -2
- package/dist/components/lukso-tag/index.js +2 -2
- package/dist/components/lukso-terms/index.cjs +2 -2
- package/dist/components/lukso-terms/index.js +2 -2
- package/dist/components/lukso-test/index.cjs +1 -1
- package/dist/components/lukso-test/index.js +1 -1
- package/dist/components/lukso-tooltip/index.cjs +2 -2
- package/dist/components/lukso-tooltip/index.js +2 -2
- package/dist/components/lukso-username/index.cjs +2 -2
- package/dist/components/lukso-username/index.js +2 -2
- package/dist/components/lukso-wizard/index.cjs +1 -1
- package/dist/components/lukso-wizard/index.js +1 -1
- package/dist/index-09db75ee.js +39 -0
- package/dist/index-9b930f6a.cjs +46 -0
- package/dist/{index-59f199b0.cjs → index-a1e4b7d4.cjs} +1 -1
- package/dist/{index-8c727f4c.js → index-dfdfb6fe.js} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/shared/tailwind-element/index.cjs +1 -1
- package/dist/shared/tailwind-element/index.js +1 -1
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/{style-map-c66282ea.js → style-map-3669b30c.js} +1 -1
- package/dist/{style-map-6337084a.cjs → style-map-ebf3a8d2.cjs} +1 -1
- package/dist/styles/main.css +3 -0
- package/dist/styles/main.css.map +1 -1
- package/package.json +3 -2
- package/tools/sass/typography.scss +4 -0
- package/tools/styles/main.css +3 -0
- package/dist/index-25503efb.cjs +0 -46
- package/dist/index-bf6e0a1d.js +0 -39
|
@@ -24,16 +24,16 @@ const components_luksoTest_index = require('./lukso-test/index.cjs');
|
|
|
24
24
|
const components_luksoTooltip_index = require('./lukso-tooltip/index.cjs');
|
|
25
25
|
const components_luksoUsername_index = require('./lukso-username/index.cjs');
|
|
26
26
|
const components_luksoWizard_index = require('./lukso-wizard/index.cjs');
|
|
27
|
-
const shared_tailwindElement_index = require('../index-
|
|
27
|
+
const shared_tailwindElement_index = require('../index-9b930f6a.cjs');
|
|
28
28
|
require('../cn-5ceac001.cjs');
|
|
29
29
|
require('../query-assigned-elements-d5e45650.cjs');
|
|
30
30
|
require('../state-d9fb972b.cjs');
|
|
31
31
|
require('../index-1d3f4a5a.cjs');
|
|
32
32
|
require('../bundle-mjs-d58a83c6.cjs');
|
|
33
33
|
require('../tailwind-config.cjs');
|
|
34
|
-
require('../style-map-
|
|
34
|
+
require('../style-map-ebf3a8d2.cjs');
|
|
35
35
|
require('../directive-8278ab14.cjs');
|
|
36
|
-
require('../index-
|
|
36
|
+
require('../index-a1e4b7d4.cjs');
|
|
37
37
|
require('../index-e9668573.cjs');
|
|
38
38
|
|
|
39
39
|
|
package/dist/components/index.js
CHANGED
|
@@ -20,14 +20,14 @@ export { LuksoTest } from './lukso-test/index.js';
|
|
|
20
20
|
export { LuksoTooltip } from './lukso-tooltip/index.js';
|
|
21
21
|
export { LuksoUsername } from './lukso-username/index.js';
|
|
22
22
|
export { LuksoWizard } from './lukso-wizard/index.js';
|
|
23
|
-
export { a as TailwindElement, T as TailwindStyledElement } from '../index-
|
|
23
|
+
export { a as TailwindElement, T as TailwindStyledElement } from '../index-09db75ee.js';
|
|
24
24
|
import '../cn-b54dcc61.js';
|
|
25
25
|
import '../query-assigned-elements-1c8c9e90.js';
|
|
26
26
|
import '../state-b9ca4e74.js';
|
|
27
27
|
import '../index-ca8e900d.js';
|
|
28
28
|
import '../bundle-mjs-fbc6e2a8.js';
|
|
29
29
|
import '../tailwind-config.js';
|
|
30
|
-
import '../style-map-
|
|
30
|
+
import '../style-map-3669b30c.js';
|
|
31
31
|
import '../directive-2bb7789e.js';
|
|
32
|
-
import '../index-
|
|
32
|
+
import '../index-dfdfb6fe.js';
|
|
33
33
|
import '../index-5e194caf.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
7
|
const state = require('../../state-d9fb972b.cjs');
|
|
8
8
|
const index = require('../../index-1d3f4a5a.cjs');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { InputSize } from '../../shared/types';
|
|
1
2
|
export type ButtonVariant = 'primary' | 'secondary' | 'landing' | 'text' | 'nav-button' | 'nav-text' | 'link';
|
|
2
|
-
export type ButtonSize = 'small' | 'medium';
|
|
3
3
|
export type ButtonType = 'submit' | 'reset' | 'button';
|
|
4
4
|
export type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
|
|
5
5
|
declare const LuksoButton_base: typeof import("lit").LitElement;
|
|
6
6
|
export declare class LuksoButton extends LuksoButton_base {
|
|
7
7
|
variant: ButtonVariant;
|
|
8
|
-
size:
|
|
8
|
+
size: InputSize;
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
isFullWidth: boolean;
|
|
11
11
|
isLongPress: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-button/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,WAAW,GACX,SAAS,GACT,MAAM,GACN,YAAY,GACZ,UAAU,GACV,MAAM,CAAA;AACV,MAA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-
import { T as TailwindStyledElement, x, A } from '../../index-
|
|
1
|
+
import { T as TailwindStyledElement, x, A } from '../../index-09db75ee.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-1c8c9e90.js';
|
|
3
3
|
import { t } from '../../state-b9ca4e74.js';
|
|
4
4
|
import { c as ce } from '../../index-ca8e900d.js';
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
7
|
const state = require('../../state-d9fb972b.cjs');
|
|
8
|
-
const styleMap = require('../../style-map-
|
|
8
|
+
const styleMap = require('../../style-map-ebf3a8d2.cjs');
|
|
9
9
|
const index = require('../../index-1d3f4a5a.cjs');
|
|
10
10
|
require('../lukso-profile/index.cjs');
|
|
11
11
|
require('../../tailwind-config.cjs');
|
|
12
12
|
const cn = require('../../cn-5ceac001.cjs');
|
|
13
|
-
const index$1 = require('../../index-
|
|
13
|
+
const index$1 = require('../../index-a1e4b7d4.cjs');
|
|
14
14
|
require('../lukso-image/index.cjs');
|
|
15
15
|
require('../../directive-8278ab14.cjs');
|
|
16
16
|
require('../../bundle-mjs-d58a83c6.cjs');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { T as TailwindStyledElement, x, A } from '../../index-
|
|
1
|
+
import { T as TailwindStyledElement, x, A } from '../../index-09db75ee.js';
|
|
2
2
|
import { n, l, e } from '../../query-assigned-elements-1c8c9e90.js';
|
|
3
3
|
import { t } from '../../state-b9ca4e74.js';
|
|
4
|
-
import { o } from '../../style-map-
|
|
4
|
+
import { o } from '../../style-map-3669b30c.js';
|
|
5
5
|
import { c as ce } from '../../index-ca8e900d.js';
|
|
6
6
|
import '../lukso-profile/index.js';
|
|
7
7
|
import '../../tailwind-config.js';
|
|
8
8
|
import { c as cn } from '../../cn-b54dcc61.js';
|
|
9
|
-
import { c as customStyleMap } from '../../index-
|
|
9
|
+
import { c as customStyleMap } from '../../index-dfdfb6fe.js';
|
|
10
10
|
import '../lukso-image/index.js';
|
|
11
11
|
import '../../directive-2bb7789e.js';
|
|
12
12
|
import '../../bundle-mjs-fbc6e2a8.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
7
|
const state = require('../../state-d9fb972b.cjs');
|
|
8
8
|
const index = require('../../index-e9668573.cjs');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TailwindElement, x, A } from '../../index-
|
|
1
|
+
import { a as TailwindElement, x, A } from '../../index-09db75ee.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-1c8c9e90.js';
|
|
3
3
|
import { t } from '../../state-b9ca4e74.js';
|
|
4
4
|
import { c as customClassMap } from '../../index-5e194caf.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
|
-
const styleMap = require('../../style-map-
|
|
7
|
+
const styleMap = require('../../style-map-ebf3a8d2.cjs');
|
|
8
8
|
require('../../directive-8278ab14.cjs');
|
|
9
9
|
|
|
10
10
|
const style = ":host {\n display: inline-flex\n}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x, T as TailwindStyledElement } from '../../index-
|
|
1
|
+
import { x, T as TailwindStyledElement } from '../../index-09db75ee.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-1c8c9e90.js';
|
|
3
|
-
import { o } from '../../style-map-
|
|
3
|
+
import { o } from '../../style-map-3669b30c.js';
|
|
4
4
|
import '../../directive-2bb7789e.js';
|
|
5
5
|
|
|
6
6
|
const style = ":host {\n display: inline-flex\n}";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
7
|
const state = require('../../state-d9fb972b.cjs');
|
|
8
|
-
const styleMap = require('../../style-map-
|
|
8
|
+
const styleMap = require('../../style-map-ebf3a8d2.cjs');
|
|
9
9
|
const index = require('../../index-1d3f4a5a.cjs');
|
|
10
10
|
require('../../directive-8278ab14.cjs');
|
|
11
11
|
require('../../bundle-mjs-d58a83c6.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as TailwindElement, x } from '../../index-
|
|
1
|
+
import { a as TailwindElement, x } from '../../index-09db75ee.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-1c8c9e90.js';
|
|
3
3
|
import { t } from '../../state-b9ca4e74.js';
|
|
4
|
-
import { o } from '../../style-map-
|
|
4
|
+
import { o } from '../../style-map-3669b30c.js';
|
|
5
5
|
import { c as ce } from '../../index-ca8e900d.js';
|
|
6
6
|
import '../../directive-2bb7789e.js';
|
|
7
7
|
import '../../bundle-mjs-fbc6e2a8.js';
|
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-9b930f6a.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
|
|
7
7
|
const state = require('../../state-d9fb972b.cjs');
|
|
8
|
-
const index = require('../../index-
|
|
8
|
+
const index = require('../../index-1d3f4a5a.cjs');
|
|
9
|
+
require('../../tailwind-config.cjs');
|
|
10
|
+
const cn = require('../../cn-5ceac001.cjs');
|
|
11
|
+
require('../lukso-icon/index.cjs');
|
|
12
|
+
require('../../bundle-mjs-d58a83c6.cjs');
|
|
13
|
+
require('../../style-map-ebf3a8d2.cjs');
|
|
9
14
|
require('../../directive-8278ab14.cjs');
|
|
10
15
|
|
|
16
|
+
const style = ":host {\n\n display: inline-flex\n}\n\n:host([is-full-width]) {\n\n display: flex;\n\n width: 100%\n}";
|
|
17
|
+
|
|
11
18
|
var __defProp = Object.defineProperty;
|
|
12
19
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
20
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -19,7 +26,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
19
26
|
__defProp(target, key, result);
|
|
20
27
|
return result;
|
|
21
28
|
};
|
|
22
|
-
exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.
|
|
29
|
+
exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
23
30
|
constructor() {
|
|
24
31
|
super(...arguments);
|
|
25
32
|
this.value = "";
|
|
@@ -42,49 +49,132 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
|
|
|
42
49
|
this.max = void 0;
|
|
43
50
|
this.min = void 0;
|
|
44
51
|
this.borderless = false;
|
|
52
|
+
this.size = "medium";
|
|
53
|
+
this.rightIcon = "";
|
|
45
54
|
this.hasHocus = false;
|
|
46
55
|
this.hasHighlight = false;
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
this.inputStyles = index.ce({
|
|
57
|
+
slots: {
|
|
58
|
+
wrapper: "group flex",
|
|
59
|
+
input: `bg-neutral-100 border-solid placeholder:text-neutral-70 w-full
|
|
60
|
+
outline-none transition transition-all duration-150 appearance-none`,
|
|
61
|
+
unit: `text-neutral-60 flex items-center relative border-solid transition
|
|
62
|
+
transition-all duration-150 before:bg-neutral-90 before:absolute
|
|
63
|
+
before:left-0 before:w-[1px] whitespace-nowrap cursor-pointer`,
|
|
64
|
+
rightIcon: "absolute top-1/2 transform -translate-y-1/2"
|
|
65
|
+
},
|
|
66
|
+
variants: {
|
|
67
|
+
hasError: {
|
|
68
|
+
true: {
|
|
69
|
+
input: "border-red-85",
|
|
70
|
+
unit: "border-red-85"
|
|
71
|
+
},
|
|
72
|
+
false: {
|
|
73
|
+
input: "border-neutral-90",
|
|
74
|
+
unit: "border-neutral-90"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
hasHighlight: {
|
|
78
|
+
true: {
|
|
79
|
+
input: "border-neutral-35",
|
|
80
|
+
unit: "border-neutral-35"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
hasUnit: {
|
|
84
|
+
true: { input: "!border-r-0 !rounded-r-0" }
|
|
85
|
+
},
|
|
86
|
+
hasRightIcon: {
|
|
87
|
+
true: {}
|
|
88
|
+
},
|
|
89
|
+
borderless: {
|
|
90
|
+
true: { input: "border-0", unit: "border-0" },
|
|
91
|
+
false: { input: "border", unit: "border border-l-0" }
|
|
92
|
+
},
|
|
93
|
+
isReadonly: {
|
|
94
|
+
true: { input: "cursor-not-allowed", rightIcon: "cursor-not-allowed" }
|
|
95
|
+
},
|
|
96
|
+
isDisabled: {
|
|
97
|
+
true: {
|
|
98
|
+
input: "text-neutral-60 cursor-not-allowed",
|
|
99
|
+
rightIcon: "cursor-not-allowed opacity-50"
|
|
100
|
+
},
|
|
101
|
+
false: { input: "text-neutral-20" }
|
|
102
|
+
},
|
|
103
|
+
isFullWidth: {
|
|
104
|
+
true: { wrapper: "w-full" },
|
|
105
|
+
false: { wrapper: "w-[350px]" }
|
|
106
|
+
},
|
|
107
|
+
size: {
|
|
108
|
+
small: {
|
|
109
|
+
input: "h-[28px] px-2 py-1 paragraph-inter-12-regular rounded-8",
|
|
110
|
+
unit: "h-[28px] paragraph-inter-10-regular px-2 rounded-r-8 before:top-[calc(50%-6px)] before:h-[12px]",
|
|
111
|
+
rightIcon: "right-2"
|
|
112
|
+
},
|
|
113
|
+
medium: {
|
|
114
|
+
input: "h-[48px] px-4 py-3 paragraph-inter-14-regular rounded-12",
|
|
115
|
+
unit: "h-[48px] paragraph-inter-12-regular px-3.5 rounded-r-12 before:top-[calc(50%-12px)] before:h-[24px]",
|
|
116
|
+
rightIcon: "right-3"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
compoundVariants: [
|
|
121
|
+
{
|
|
122
|
+
isFullWidth: false,
|
|
123
|
+
hasUnit: true,
|
|
124
|
+
class: { wrapper: "w-[300px]" }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
isFullWidth: false,
|
|
128
|
+
hasUnit: false,
|
|
129
|
+
size: "small",
|
|
130
|
+
class: { wrapper: "w-[190px]" }
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
isFullWidth: false,
|
|
134
|
+
hasUnit: true,
|
|
135
|
+
size: "small",
|
|
136
|
+
class: { wrapper: "w-[210px]" }
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
hasHighlight: true,
|
|
140
|
+
hasError: true,
|
|
141
|
+
class: {
|
|
142
|
+
input: "border-red-65",
|
|
143
|
+
unit: "border-red-65"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
hasRightIcon: true,
|
|
148
|
+
size: "medium",
|
|
149
|
+
class: { input: "pr-10" }
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
hasRightIcon: true,
|
|
153
|
+
size: "small",
|
|
154
|
+
class: { input: "pr-7" }
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
});
|
|
54
158
|
}
|
|
55
159
|
// @input works better in vue
|
|
56
|
-
inputTemplate() {
|
|
160
|
+
inputTemplate(styles) {
|
|
57
161
|
return shared_tailwindElement_index.x`
|
|
58
162
|
<input
|
|
59
|
-
name=${this.name}
|
|
163
|
+
name=${this.name ? this.name : shared_tailwindElement_index.A}
|
|
60
164
|
type=${this.type}
|
|
61
165
|
.value=${this.value}
|
|
62
|
-
placeholder=${this.placeholder}
|
|
166
|
+
placeholder=${this.placeholder ? this.placeholder : shared_tailwindElement_index.A}
|
|
63
167
|
?autofocus=${this.autofocus}
|
|
64
|
-
min=${this.min}
|
|
65
|
-
max=${this.max}
|
|
168
|
+
min=${this.min ? this.min : shared_tailwindElement_index.A}
|
|
169
|
+
max=${this.max ? this.max : shared_tailwindElement_index.A}
|
|
66
170
|
autocomplete=${this.autocomplete}
|
|
67
|
-
ref=${this.ref}
|
|
68
|
-
id=${this.id
|
|
171
|
+
ref=${this.ref ? this.ref : shared_tailwindElement_index.A}
|
|
172
|
+
id=${this.id ? this.id : shared_tailwindElement_index.A}
|
|
69
173
|
data-testid=${this.name ? `input-${this.name}` : "input"}
|
|
70
|
-
accept=${this.accept}
|
|
174
|
+
accept=${this.accept ? this.accept : shared_tailwindElement_index.A}
|
|
71
175
|
?readonly=${this.isReadonly ? true : void 0}
|
|
72
176
|
?disabled=${this.isDisabled ? true : void 0}
|
|
73
|
-
class=${
|
|
74
|
-
[this.defaultInputStyles]: true,
|
|
75
|
-
[this.error === "" ? "border-neutral-90" : "border-red-85"]: !this.hasHighlight,
|
|
76
|
-
[this.error === "" ? "border-neutral-35" : "border-red-65"]: this.hasHighlight,
|
|
77
|
-
["rounded-l-12 border-r-0"]: this.unit !== "",
|
|
78
|
-
["rounded-12"]: this.unit === "",
|
|
79
|
-
["w-full"]: this.isFullWidth,
|
|
80
|
-
["w-[350px]"]: !this.isFullWidth && this.unit === "",
|
|
81
|
-
["w-[300px]"]: !this.isFullWidth && this.unit !== "",
|
|
82
|
-
["cursor-not-allowed text-neutral-60"]: this.isDisabled,
|
|
83
|
-
["text-neutral-20"]: !this.isDisabled,
|
|
84
|
-
["cursor-not-allowed"]: this.isReadonly,
|
|
85
|
-
[this.customClass]: !!this.customClass,
|
|
86
|
-
[this.borderless ? "border-0" : "border"]: true
|
|
87
|
-
})}
|
|
177
|
+
class=${cn.cn(styles, this.customClass)}
|
|
88
178
|
@focus=${this.handleFocus}
|
|
89
179
|
@input=${this.handleInput}
|
|
90
180
|
@change=${this.handleChange}
|
|
@@ -94,6 +184,7 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
|
|
|
94
184
|
@keypress=${this.handleKeyPress}
|
|
95
185
|
@mouseenter=${this.handleMouseOver}
|
|
96
186
|
@mouseleave=${this.handleMouseOut}
|
|
187
|
+
@click=${this.handleInputClick}
|
|
97
188
|
/>
|
|
98
189
|
`;
|
|
99
190
|
}
|
|
@@ -118,14 +209,9 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
|
|
|
118
209
|
${this.error}
|
|
119
210
|
</div>`;
|
|
120
211
|
}
|
|
121
|
-
unitTemplate() {
|
|
212
|
+
unitTemplate(styles) {
|
|
122
213
|
return shared_tailwindElement_index.x`<div
|
|
123
|
-
class=${
|
|
124
|
-
[this.defaultUnitStyles]: true,
|
|
125
|
-
[this.error === "" ? "border-neutral-90" : "border-red-85"]: !this.hasHighlight,
|
|
126
|
-
[this.error === "" ? "border-neutral-35" : "border-red-65"]: this.hasHighlight,
|
|
127
|
-
[this.borderless ? "border-0" : "border"]: true
|
|
128
|
-
})}
|
|
214
|
+
class=${styles}
|
|
129
215
|
@mouseenter=${this.handleMouseOver}
|
|
130
216
|
@mouseleave=${this.handleMouseOut}
|
|
131
217
|
@click=${this.handleUnitClick}
|
|
@@ -133,6 +219,13 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
|
|
|
133
219
|
${this.unit}
|
|
134
220
|
</div>`;
|
|
135
221
|
}
|
|
222
|
+
rightIconTemplate(styles) {
|
|
223
|
+
return shared_tailwindElement_index.x`<lukso-icon
|
|
224
|
+
name=${this.rightIcon}
|
|
225
|
+
size=${this.size}
|
|
226
|
+
class=${styles}
|
|
227
|
+
></lukso-icon>`;
|
|
228
|
+
}
|
|
136
229
|
handleFocus() {
|
|
137
230
|
if (!this.isReadonly && !this.isDisabled) {
|
|
138
231
|
this.hasHocus = true;
|
|
@@ -242,13 +335,41 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
|
|
|
242
335
|
this.dispatchEvent(clickEvent);
|
|
243
336
|
input.focus();
|
|
244
337
|
}
|
|
338
|
+
async handleInputClick(event) {
|
|
339
|
+
await this.updateComplete;
|
|
340
|
+
const target = event.target;
|
|
341
|
+
const clickEvent = new CustomEvent("on-input-click", {
|
|
342
|
+
detail: {
|
|
343
|
+
value: target.value,
|
|
344
|
+
event
|
|
345
|
+
},
|
|
346
|
+
bubbles: false,
|
|
347
|
+
composed: true
|
|
348
|
+
});
|
|
349
|
+
this.dispatchEvent(clickEvent);
|
|
350
|
+
}
|
|
245
351
|
render() {
|
|
352
|
+
const { wrapper, input, unit, rightIcon } = this.inputStyles({
|
|
353
|
+
hasError: this.error !== "",
|
|
354
|
+
hasHighlight: this.hasHighlight,
|
|
355
|
+
borderless: this.borderless,
|
|
356
|
+
isReadonly: this.isReadonly,
|
|
357
|
+
isDisabled: this.isDisabled,
|
|
358
|
+
isFullWidth: this.isFullWidth,
|
|
359
|
+
hasUnit: this.unit !== "",
|
|
360
|
+
size: this.size,
|
|
361
|
+
hasRightIcon: this.rightIcon !== ""
|
|
362
|
+
});
|
|
246
363
|
return shared_tailwindElement_index.x`
|
|
247
|
-
<div>
|
|
364
|
+
<div class="w-[inherit]">
|
|
248
365
|
${this.label ? this.labelTemplate() : shared_tailwindElement_index.A}
|
|
249
366
|
${this.description ? this.descriptionTemplate() : shared_tailwindElement_index.A}
|
|
250
|
-
<div class
|
|
251
|
-
|
|
367
|
+
<div class=${wrapper()}>
|
|
368
|
+
<div class="relative w-[inherit]">
|
|
369
|
+
${this.inputTemplate(input())}
|
|
370
|
+
${this.rightIcon ? this.rightIconTemplate(rightIcon()) : shared_tailwindElement_index.A}
|
|
371
|
+
</div>
|
|
372
|
+
${this.unit ? this.unitTemplate(unit()) : shared_tailwindElement_index.A}
|
|
252
373
|
</div>
|
|
253
374
|
${this.error ? this.errorTemplate() : shared_tailwindElement_index.A}
|
|
254
375
|
</div>
|
|
@@ -315,6 +436,12 @@ __decorateClass([
|
|
|
315
436
|
__decorateClass([
|
|
316
437
|
queryAssignedElements.n({ type: Boolean })
|
|
317
438
|
], exports.LuksoInput.prototype, "borderless", 2);
|
|
439
|
+
__decorateClass([
|
|
440
|
+
queryAssignedElements.n({ type: String })
|
|
441
|
+
], exports.LuksoInput.prototype, "size", 2);
|
|
442
|
+
__decorateClass([
|
|
443
|
+
queryAssignedElements.n({ type: String, attribute: "right-icon" })
|
|
444
|
+
], exports.LuksoInput.prototype, "rightIcon", 2);
|
|
318
445
|
__decorateClass([
|
|
319
446
|
state.t()
|
|
320
447
|
], exports.LuksoInput.prototype, "hasHocus", 2);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { InputSize } from '../../shared/types';
|
|
2
|
+
declare const LuksoInput_base: typeof import("lit").LitElement;
|
|
3
|
+
export declare class LuksoInput extends LuksoInput_base {
|
|
3
4
|
value: string;
|
|
4
5
|
name: string;
|
|
5
6
|
type: string;
|
|
@@ -20,15 +21,17 @@ export declare class LuksoInput extends TailwindElement {
|
|
|
20
21
|
max: number | undefined;
|
|
21
22
|
min: number | undefined;
|
|
22
23
|
borderless: boolean;
|
|
24
|
+
size: InputSize;
|
|
25
|
+
rightIcon: string;
|
|
23
26
|
private hasHocus;
|
|
24
27
|
private hasHighlight;
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
inputTemplate(): import("lit-html").TemplateResult<1>;
|
|
28
|
+
private inputStyles;
|
|
29
|
+
inputTemplate(styles: string): import("lit-html").TemplateResult<1>;
|
|
28
30
|
labelTemplate(): import("lit-html").TemplateResult<1>;
|
|
29
31
|
descriptionTemplate(): import("lit-html").TemplateResult<1>;
|
|
30
32
|
errorTemplate(): import("lit-html").TemplateResult<1>;
|
|
31
|
-
unitTemplate(): import("lit-html").TemplateResult<1>;
|
|
33
|
+
unitTemplate(styles: string): import("lit-html").TemplateResult<1>;
|
|
34
|
+
rightIconTemplate(styles: string): import("lit-html").TemplateResult<1>;
|
|
32
35
|
private handleFocus;
|
|
33
36
|
private handleBlur;
|
|
34
37
|
private handleChange;
|
|
@@ -39,6 +42,7 @@ export declare class LuksoInput extends TailwindElement {
|
|
|
39
42
|
private handleMouseOver;
|
|
40
43
|
private handleMouseOut;
|
|
41
44
|
private handleUnitClick;
|
|
45
|
+
private handleInputClick;
|
|
42
46
|
render(): import("lit-html").TemplateResult<1>;
|
|
43
47
|
}
|
|
44
48
|
declare global {
|
|
@@ -46,4 +50,5 @@ declare global {
|
|
|
46
50
|
'lukso-input': LuksoInput;
|
|
47
51
|
}
|
|
48
52
|
}
|
|
53
|
+
export {};
|
|
49
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src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