@lukso/web-components 1.92.0 → 1.94.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 +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/lukso-color-picker/index.cjs +12 -0
- package/dist/components/lukso-color-picker/index.d.ts +1 -0
- package/dist/components/lukso-color-picker/index.d.ts.map +1 -1
- package/dist/components/lukso-color-picker/index.js +12 -0
- package/dist/components/lukso-dropdown/index.cjs +1 -1
- package/dist/components/lukso-dropdown/index.d.ts.map +1 -1
- package/dist/components/lukso-dropdown/index.js +1 -1
- package/dist/components/lukso-input/index.cjs +10 -0
- package/dist/components/lukso-input/index.d.ts +1 -0
- package/dist/components/lukso-input/index.d.ts.map +1 -1
- package/dist/components/lukso-input/index.js +10 -0
- package/dist/components/lukso-search/index.cjs +1 -1
- package/dist/components/lukso-search/index.js +1 -1
- package/dist/components/lukso-select/index.cjs +1 -1
- package/dist/components/lukso-select/index.js +1 -1
- package/dist/components/lukso-textarea/index.cjs +10 -0
- package/dist/components/lukso-textarea/index.d.ts +1 -0
- package/dist/components/lukso-textarea/index.d.ts.map +1 -1
- package/dist/components/lukso-textarea/index.js +10 -0
- package/dist/{index-6fb7dc60.js → index-68890bd1.js} +23 -11
- package/dist/{index-3e12bd24.cjs → index-fb4ea5c3.cjs} +23 -11
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/tailwind.config.cjs +8 -8
- package/tools/debounceFunction.d.ts +8 -0
- package/tools/debounceFunction.d.ts.map +1 -0
|
@@ -6,7 +6,7 @@ const components_luksoButton_index = require('./lukso-button/index.cjs');
|
|
|
6
6
|
const components_luksoCard_index = require('./lukso-card/index.cjs');
|
|
7
7
|
const components_luksoCheckbox_index = require('./lukso-checkbox/index.cjs');
|
|
8
8
|
const components_luksoColorPicker_index = require('./lukso-color-picker/index.cjs');
|
|
9
|
-
const components_luksoDropdown_index = require('../index-
|
|
9
|
+
const components_luksoDropdown_index = require('../index-fb4ea5c3.cjs');
|
|
10
10
|
const components_luksoDropdownOption_index = require('./lukso-dropdown-option/index.cjs');
|
|
11
11
|
const components_luksoFooter_index = require('./lukso-footer/index.cjs');
|
|
12
12
|
const components_luksoIcon_index = require('./lukso-icon/index.cjs');
|
package/dist/components/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { LuksoButton } from './lukso-button/index.js';
|
|
|
2
2
|
export { LuksoCard } from './lukso-card/index.js';
|
|
3
3
|
export { LuksoCheckbox } from './lukso-checkbox/index.js';
|
|
4
4
|
export { LuksoColorPicker } from './lukso-color-picker/index.js';
|
|
5
|
-
export { L as LuksoDropdown } from '../index-
|
|
5
|
+
export { L as LuksoDropdown } from '../index-68890bd1.js';
|
|
6
6
|
export { LuksoDropdownOption } from './lukso-dropdown-option/index.js';
|
|
7
7
|
export { LuksoFooter } from './lukso-footer/index.js';
|
|
8
8
|
export { LuksoIcon } from './lukso-icon/index.js';
|
|
@@ -26,6 +26,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
26
26
|
__defProp(target, key, result);
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
|
+
const FOCUS_DELAY_MS = 10;
|
|
29
30
|
exports.LuksoColorPicker = class LuksoColorPicker extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
30
31
|
constructor() {
|
|
31
32
|
super(...arguments);
|
|
@@ -135,6 +136,17 @@ exports.LuksoColorPicker = class LuksoColorPicker extends shared_tailwindElement
|
|
|
135
136
|
]
|
|
136
137
|
});
|
|
137
138
|
}
|
|
139
|
+
connectedCallback() {
|
|
140
|
+
super.connectedCallback();
|
|
141
|
+
if (this.autofocus) {
|
|
142
|
+
setTimeout(() => {
|
|
143
|
+
const input = this.shadowRoot?.querySelector(
|
|
144
|
+
"input[autofocus]"
|
|
145
|
+
);
|
|
146
|
+
input?.focus();
|
|
147
|
+
}, FOCUS_DELAY_MS);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
138
150
|
inputTemplate(styles) {
|
|
139
151
|
return shared_tailwindElement_index.x`
|
|
140
152
|
<input
|
|
@@ -18,6 +18,7 @@ export declare class LuksoColorPicker extends LuksoColorPicker_base {
|
|
|
18
18
|
private hasFocus;
|
|
19
19
|
private hasHighlight;
|
|
20
20
|
private styles;
|
|
21
|
+
connectedCallback(): void;
|
|
21
22
|
inputTemplate(styles: string): import("lit-html").TemplateResult<1>;
|
|
22
23
|
colorPickerTemplate(styles: string, colorInputStyles: string): import("lit-html").TemplateResult<1>;
|
|
23
24
|
labelTemplate(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-color-picker/index.ts"],"names":[],"mappings":"AAOA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-color-picker/index.ts"],"names":[],"mappings":"AAOA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;;AAI/C,qBACa,gBAAiB,SAAQ,qBAA4B;IAEhE,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,WAAW,SAAY;IAGvB,KAAK,SAAK;IAGV,EAAE,SAAK;IAGP,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,WAAW,SAAK;IAGhB,WAAW,UAAQ;IAGnB,UAAU,UAAQ;IAGlB,UAAU,UAAQ;IAGlB,SAAS,UAAQ;IAGjB,iBAAiB,UAAQ;IAGzB,IAAI,EAAE,SAAS,CAAW;IAG1B,OAAO,CAAC,QAAQ,CAAQ;IAGxB,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO,CAAC,MAAM,CAwFZ;IAEF,iBAAiB;IAajB,aAAa,CAAC,MAAM,EAAE,MAAM;IAwB5B,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM;IAiB5D,aAAa;IAUb,mBAAmB;IAQnB,aAAa;IAMb,OAAO,CAAC,WAAW;YAOL,UAAU;YAgBV,YAAY;YAcZ,WAAW;YAeX,WAAW;YAmBX,aAAa;IAe3B,MAAM;CAsBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAA;KACvC;CACF"}
|
|
@@ -22,6 +22,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
22
22
|
__defProp(target, key, result);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
const FOCUS_DELAY_MS = 10;
|
|
25
26
|
let LuksoColorPicker = class extends TailwindStyledElement(style) {
|
|
26
27
|
constructor() {
|
|
27
28
|
super(...arguments);
|
|
@@ -131,6 +132,17 @@ let LuksoColorPicker = class extends TailwindStyledElement(style) {
|
|
|
131
132
|
]
|
|
132
133
|
});
|
|
133
134
|
}
|
|
135
|
+
connectedCallback() {
|
|
136
|
+
super.connectedCallback();
|
|
137
|
+
if (this.autofocus) {
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
const input = this.shadowRoot?.querySelector(
|
|
140
|
+
"input[autofocus]"
|
|
141
|
+
);
|
|
142
|
+
input?.focus();
|
|
143
|
+
}, FOCUS_DELAY_MS);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
134
146
|
inputTemplate(styles) {
|
|
135
147
|
return x`
|
|
136
148
|
<input
|
|
@@ -8,7 +8,7 @@ require('../../index-1d3f4a5a.cjs');
|
|
|
8
8
|
require('../lukso-icon/index.cjs');
|
|
9
9
|
require('../lukso-profile/index.cjs');
|
|
10
10
|
require('../lukso-username/index.cjs');
|
|
11
|
-
const components_luksoDropdown_index = require('../../index-
|
|
11
|
+
const components_luksoDropdown_index = require('../../index-fb4ea5c3.cjs');
|
|
12
12
|
require('../../bundle-mjs-d58a83c6.cjs');
|
|
13
13
|
require('../../style-map-77b74f74.cjs');
|
|
14
14
|
require('../../directive-8278ab14.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAKxD,OAAO,yBAAyB,CAAA;AAChC,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAKxD,OAAO,yBAAyB,CAAA;AAChC,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;AAKpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;;AAED,qBACa,aAAc,SAAQ,kBAA4B;IAE7D,EAAE,SAAK;IAGP,SAAS,SAAK;IAGd,MAAM,UAAQ;IAGd,oBAAoB,UAAQ;IAG5B,OAAO,UAAQ;IAGf,OAAO,UAAQ;IAGf,WAAW,UAAQ;IAGnB,IAAI,EAAE,SAAS,CAAW;;IAU1B,OAAO,CAAC,MAAM,CA8BZ;IAEF,iBAAiB;IAKjB,oBAAoB;IAKd,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAiBxD,OAAO,CAAC,WAAW,CAajB;IAEF,MAAM;CAgBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
|
|
@@ -4,7 +4,7 @@ import '../../index-ca8e900d.js';
|
|
|
4
4
|
import '../lukso-icon/index.js';
|
|
5
5
|
import '../lukso-profile/index.js';
|
|
6
6
|
import '../lukso-username/index.js';
|
|
7
|
-
export { L as LuksoDropdown } from '../../index-
|
|
7
|
+
export { L as LuksoDropdown } from '../../index-68890bd1.js';
|
|
8
8
|
import '../../bundle-mjs-fbc6e2a8.js';
|
|
9
9
|
import '../../style-map-d5d85b80.js';
|
|
10
10
|
import '../../directive-2bb7789e.js';
|
|
@@ -26,6 +26,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
26
26
|
__defProp(target, key, result);
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
|
+
const FOCUS_DELAY_MS = 10;
|
|
29
30
|
exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
30
31
|
constructor() {
|
|
31
32
|
super(...arguments);
|
|
@@ -161,6 +162,15 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
|
|
|
161
162
|
]
|
|
162
163
|
});
|
|
163
164
|
}
|
|
165
|
+
connectedCallback() {
|
|
166
|
+
super.connectedCallback();
|
|
167
|
+
if (this.autofocus) {
|
|
168
|
+
setTimeout(() => {
|
|
169
|
+
const input = this.shadowRoot?.querySelector("input");
|
|
170
|
+
input?.focus();
|
|
171
|
+
}, FOCUS_DELAY_MS);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
164
174
|
// @input works better in vue
|
|
165
175
|
inputTemplate(styles) {
|
|
166
176
|
return shared_tailwindElement_index.x`
|
|
@@ -28,6 +28,7 @@ export declare class LuksoInput extends LuksoInput_base {
|
|
|
28
28
|
private hasFocus;
|
|
29
29
|
private hasHighlight;
|
|
30
30
|
private inputStyles;
|
|
31
|
+
connectedCallback(): void;
|
|
31
32
|
inputTemplate(styles: string): import("lit-html").TemplateResult<1>;
|
|
32
33
|
labelTemplate(): import("lit-html").TemplateResult<1>;
|
|
33
34
|
descriptionTemplate(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-input/index.ts"],"names":[],"mappings":"AAMA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-input/index.ts"],"names":[],"mappings":"AAMA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;;AAI/C,qBACa,UAAW,SAAQ,eAA4B;IAE1D,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,IAAI,SAAS;IAGb,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,YAAY,SAAO;IAGnB,EAAE,SAAK;IAGP,GAAG,EAAE,MAAM,GAAG,SAAS,CAAY;IAGnC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAY;IAGtC,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,WAAW,SAAK;IAGhB,WAAW,UAAQ;IAGnB,UAAU,UAAQ;IAGlB,UAAU,UAAQ;IAGlB,SAAS,UAAQ;IAGjB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAY;IAGnC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAY;IAGnC,UAAU,UAAQ;IAGlB,IAAI,EAAE,SAAS,CAAW;IAG1B,SAAS,SAAK;IAGd,oBAAoB,UAAQ;IAG5B,iBAAiB,UAAQ;IAGzB,OAAO,CAAC,QAAQ,CAAQ;IAGxB,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO,CAAC,WAAW,CAwGjB;IAEF,iBAAiB;IAYjB,aAAa,CAAC,MAAM,EAAE,MAAM;IAgC5B,aAAa;IAUb,mBAAmB;IAQnB,aAAa;IAMb,YAAY,CAAC,MAAM,EAAE,MAAM;IAW3B,iBAAiB,CAAC,MAAM,EAAE,MAAM;IAShC,OAAO,CAAC,WAAW;YAOL,UAAU;YAgBV,YAAY;YAcZ,WAAW;YAeX,WAAW;YAmBX,aAAa;YAcb,cAAc;IAc5B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,eAAe;YAaT,gBAAgB;IAc9B,OAAO,CAAC,oBAAoB;IAY5B,MAAM;CA6BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAA;KAC1B;CACF"}
|
|
@@ -22,6 +22,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
22
22
|
__defProp(target, key, result);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
const FOCUS_DELAY_MS = 10;
|
|
25
26
|
let LuksoInput = class extends TailwindStyledElement(style) {
|
|
26
27
|
constructor() {
|
|
27
28
|
super(...arguments);
|
|
@@ -157,6 +158,15 @@ let LuksoInput = class extends TailwindStyledElement(style) {
|
|
|
157
158
|
]
|
|
158
159
|
});
|
|
159
160
|
}
|
|
161
|
+
connectedCallback() {
|
|
162
|
+
super.connectedCallback();
|
|
163
|
+
if (this.autofocus) {
|
|
164
|
+
setTimeout(() => {
|
|
165
|
+
const input = this.shadowRoot?.querySelector("input");
|
|
166
|
+
input?.focus();
|
|
167
|
+
}, FOCUS_DELAY_MS);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
160
170
|
// @input works better in vue
|
|
161
171
|
inputTemplate(styles) {
|
|
162
172
|
return x`
|
|
@@ -10,7 +10,7 @@ require('../lukso-icon/index.cjs');
|
|
|
10
10
|
require('../lukso-profile/index.cjs');
|
|
11
11
|
require('../lukso-username/index.cjs');
|
|
12
12
|
require('../lukso-input/index.cjs');
|
|
13
|
-
require('../../index-
|
|
13
|
+
require('../../index-fb4ea5c3.cjs');
|
|
14
14
|
require('../lukso-dropdown-option/index.cjs');
|
|
15
15
|
require('../../bundle-mjs-d58a83c6.cjs');
|
|
16
16
|
require('../../style-map-77b74f74.cjs');
|
|
@@ -6,7 +6,7 @@ import '../lukso-icon/index.js';
|
|
|
6
6
|
import '../lukso-profile/index.js';
|
|
7
7
|
import '../lukso-username/index.js';
|
|
8
8
|
import '../lukso-input/index.js';
|
|
9
|
-
import '../../index-
|
|
9
|
+
import '../../index-68890bd1.js';
|
|
10
10
|
import '../lukso-dropdown-option/index.js';
|
|
11
11
|
import '../../bundle-mjs-fbc6e2a8.js';
|
|
12
12
|
import '../../style-map-d5d85b80.js';
|
|
@@ -9,7 +9,7 @@ const index = require('../../index-1d3f4a5a.cjs');
|
|
|
9
9
|
require('../lukso-icon/index.cjs');
|
|
10
10
|
require('../lukso-profile/index.cjs');
|
|
11
11
|
require('../lukso-username/index.cjs');
|
|
12
|
-
const components_luksoDropdown_index = require('../../index-
|
|
12
|
+
const components_luksoDropdown_index = require('../../index-fb4ea5c3.cjs');
|
|
13
13
|
require('../lukso-dropdown-option/index.cjs');
|
|
14
14
|
require('../../bundle-mjs-d58a83c6.cjs');
|
|
15
15
|
require('../../style-map-77b74f74.cjs');
|
|
@@ -5,7 +5,7 @@ import { c as ce } from '../../index-ca8e900d.js';
|
|
|
5
5
|
import '../lukso-icon/index.js';
|
|
6
6
|
import '../lukso-profile/index.js';
|
|
7
7
|
import '../lukso-username/index.js';
|
|
8
|
-
import { u as uniqId } from '../../index-
|
|
8
|
+
import { u as uniqId } from '../../index-68890bd1.js';
|
|
9
9
|
import '../lukso-dropdown-option/index.js';
|
|
10
10
|
import '../../bundle-mjs-fbc6e2a8.js';
|
|
11
11
|
import '../../style-map-d5d85b80.js';
|
|
@@ -26,6 +26,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
26
26
|
__defProp(target, key, result);
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
|
+
const FOCUS_DELAY_MS = 10;
|
|
29
30
|
exports.LuksoTextarea = class LuksoTextarea extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
30
31
|
constructor() {
|
|
31
32
|
super(...arguments);
|
|
@@ -116,6 +117,15 @@ exports.LuksoTextarea = class LuksoTextarea extends shared_tailwindElement_index
|
|
|
116
117
|
]
|
|
117
118
|
});
|
|
118
119
|
}
|
|
120
|
+
connectedCallback() {
|
|
121
|
+
super.connectedCallback();
|
|
122
|
+
if (this.autofocus) {
|
|
123
|
+
setTimeout(() => {
|
|
124
|
+
const textarea = this.shadowRoot?.querySelector("textarea");
|
|
125
|
+
textarea?.focus();
|
|
126
|
+
}, FOCUS_DELAY_MS);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
119
129
|
inputTemplate(styles) {
|
|
120
130
|
return shared_tailwindElement_index.x`
|
|
121
131
|
<textarea
|
|
@@ -22,6 +22,7 @@ export declare class LuksoTextarea extends LuksoTextarea_base {
|
|
|
22
22
|
private hasFocus;
|
|
23
23
|
private hasHighlight;
|
|
24
24
|
private styles;
|
|
25
|
+
connectedCallback(): void;
|
|
25
26
|
inputTemplate(styles: string): import("lit-html").TemplateResult<1>;
|
|
26
27
|
labelTemplate(): import("lit-html").TemplateResult<1>;
|
|
27
28
|
descriptionTemplate(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-textarea/index.ts"],"names":[],"mappings":"AAMA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-textarea/index.ts"],"names":[],"mappings":"AAMA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;;AAI/C,qBACa,aAAc,SAAQ,kBAA4B;IAE7D,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,EAAE,SAAK;IAGP,GAAG,EAAE,MAAM,GAAG,SAAS,CAAY;IAGnC,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,WAAW,SAAK;IAGhB,WAAW,UAAQ;IAGnB,UAAU,UAAQ;IAGlB,UAAU,UAAQ;IAGlB,SAAS,UAAQ;IAGjB,UAAU,UAAQ;IAGlB,cAAc,UAAQ;IAGtB,iBAAiB,UAAQ;IAGzB,IAAI,EAAE,SAAS,CAAW;IAG1B,IAAI,SAAI;IAGR,OAAO,CAAC,QAAQ,CAAQ;IAGxB,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO,CAAC,MAAM,CAiEZ;IAEF,iBAAiB;IAWjB,aAAa,CAAC,MAAM,EAAE,MAAM;IA6B5B,aAAa;IAUb,mBAAmB;IAQnB,aAAa;IAMb,OAAO,CAAC,WAAW;YAOL,UAAU;YAgBV,YAAY;YAcZ,WAAW;YAeX,WAAW;YAmBX,aAAa;YAcb,cAAc;IAc5B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;YAMR,gBAAgB;IAc9B,MAAM;CAyBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
|
|
@@ -22,6 +22,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
22
22
|
__defProp(target, key, result);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
const FOCUS_DELAY_MS = 10;
|
|
25
26
|
let LuksoTextarea = class extends TailwindStyledElement(style) {
|
|
26
27
|
constructor() {
|
|
27
28
|
super(...arguments);
|
|
@@ -112,6 +113,15 @@ let LuksoTextarea = class extends TailwindStyledElement(style) {
|
|
|
112
113
|
]
|
|
113
114
|
});
|
|
114
115
|
}
|
|
116
|
+
connectedCallback() {
|
|
117
|
+
super.connectedCallback();
|
|
118
|
+
if (this.autofocus) {
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
const textarea = this.shadowRoot?.querySelector("textarea");
|
|
121
|
+
textarea?.focus();
|
|
122
|
+
}, FOCUS_DELAY_MS);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
115
125
|
inputTemplate(styles) {
|
|
116
126
|
return x`
|
|
117
127
|
<textarea
|
|
@@ -12,6 +12,16 @@ const uniqId = () => {
|
|
|
12
12
|
return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
const debounceFunction = (func, timeout = 100) => {
|
|
16
|
+
let timer;
|
|
17
|
+
return (...args) => {
|
|
18
|
+
clearTimeout(timer);
|
|
19
|
+
timer = setTimeout(() => {
|
|
20
|
+
typeof func === "function" && func.apply(void 0, args);
|
|
21
|
+
}, timeout);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
15
25
|
var __defProp = Object.defineProperty;
|
|
16
26
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
17
27
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -65,6 +75,16 @@ let LuksoDropdown = class extends TailwindStyledElement(style) {
|
|
|
65
75
|
}
|
|
66
76
|
]
|
|
67
77
|
});
|
|
78
|
+
this.handleClick = debounceFunction((event) => {
|
|
79
|
+
const element = event.target;
|
|
80
|
+
if (element.id === this.triggerId || this.id === element.id) {
|
|
81
|
+
this.isOpen = !this.isOpen;
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (!this.isOpenOnOutsideClick) {
|
|
85
|
+
this.isOpen = false;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
68
88
|
if (!this.id) {
|
|
69
89
|
this.id = uniqId();
|
|
70
90
|
}
|
|
@@ -93,16 +113,6 @@ let LuksoDropdown = class extends TailwindStyledElement(style) {
|
|
|
93
113
|
this.dispatchEvent(changeEvent);
|
|
94
114
|
}
|
|
95
115
|
}
|
|
96
|
-
handleClick(event) {
|
|
97
|
-
const element = event.target;
|
|
98
|
-
if (element.id === this.triggerId || this.id === element.id) {
|
|
99
|
-
this.isOpen = !this.isOpen;
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (!this.isOpenOnOutsideClick) {
|
|
103
|
-
this.isOpen = false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
116
|
render() {
|
|
107
117
|
const styles = this.styles({
|
|
108
118
|
openTop: this.openTop,
|
|
@@ -113,7 +123,9 @@ let LuksoDropdown = class extends TailwindStyledElement(style) {
|
|
|
113
123
|
if (!this.isOpen) {
|
|
114
124
|
return A;
|
|
115
125
|
}
|
|
116
|
-
return x`<div class="${styles}"
|
|
126
|
+
return x`<div class="${styles} animate-fade-in animation-duration-200">
|
|
127
|
+
<slot></slot>
|
|
128
|
+
</div>`;
|
|
117
129
|
}
|
|
118
130
|
};
|
|
119
131
|
__decorateClass([
|
|
@@ -14,6 +14,16 @@ const uniqId = () => {
|
|
|
14
14
|
return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
const debounceFunction = (func, timeout = 100) => {
|
|
18
|
+
let timer;
|
|
19
|
+
return (...args) => {
|
|
20
|
+
clearTimeout(timer);
|
|
21
|
+
timer = setTimeout(() => {
|
|
22
|
+
typeof func === "function" && func.apply(void 0, args);
|
|
23
|
+
}, timeout);
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
17
27
|
var __defProp = Object.defineProperty;
|
|
18
28
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
19
29
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -67,6 +77,16 @@ exports.LuksoDropdown = class LuksoDropdown extends shared_tailwindElement_index
|
|
|
67
77
|
}
|
|
68
78
|
]
|
|
69
79
|
});
|
|
80
|
+
this.handleClick = debounceFunction((event) => {
|
|
81
|
+
const element = event.target;
|
|
82
|
+
if (element.id === this.triggerId || this.id === element.id) {
|
|
83
|
+
this.isOpen = !this.isOpen;
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (!this.isOpenOnOutsideClick) {
|
|
87
|
+
this.isOpen = false;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
70
90
|
if (!this.id) {
|
|
71
91
|
this.id = uniqId();
|
|
72
92
|
}
|
|
@@ -95,16 +115,6 @@ exports.LuksoDropdown = class LuksoDropdown extends shared_tailwindElement_index
|
|
|
95
115
|
this.dispatchEvent(changeEvent);
|
|
96
116
|
}
|
|
97
117
|
}
|
|
98
|
-
handleClick(event) {
|
|
99
|
-
const element = event.target;
|
|
100
|
-
if (element.id === this.triggerId || this.id === element.id) {
|
|
101
|
-
this.isOpen = !this.isOpen;
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
if (!this.isOpenOnOutsideClick) {
|
|
105
|
-
this.isOpen = false;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
118
|
render() {
|
|
109
119
|
const styles = this.styles({
|
|
110
120
|
openTop: this.openTop,
|
|
@@ -115,7 +125,9 @@ exports.LuksoDropdown = class LuksoDropdown extends shared_tailwindElement_index
|
|
|
115
125
|
if (!this.isOpen) {
|
|
116
126
|
return shared_tailwindElement_index.A;
|
|
117
127
|
}
|
|
118
|
-
return shared_tailwindElement_index.x`<div class="${styles}"
|
|
128
|
+
return shared_tailwindElement_index.x`<div class="${styles} animate-fade-in animation-duration-200">
|
|
129
|
+
<slot></slot>
|
|
130
|
+
</div>`;
|
|
119
131
|
}
|
|
120
132
|
};
|
|
121
133
|
__decorateClass([
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const components_luksoButton_index = require('./components/lukso-button/index.cj
|
|
|
6
6
|
const components_luksoCard_index = require('./components/lukso-card/index.cjs');
|
|
7
7
|
const components_luksoCheckbox_index = require('./components/lukso-checkbox/index.cjs');
|
|
8
8
|
const components_luksoColorPicker_index = require('./components/lukso-color-picker/index.cjs');
|
|
9
|
-
const components_luksoDropdown_index = require('./index-
|
|
9
|
+
const components_luksoDropdown_index = require('./index-fb4ea5c3.cjs');
|
|
10
10
|
const components_luksoDropdownOption_index = require('./components/lukso-dropdown-option/index.cjs');
|
|
11
11
|
const components_luksoFooter_index = require('./components/lukso-footer/index.cjs');
|
|
12
12
|
const components_luksoIcon_index = require('./components/lukso-icon/index.cjs');
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { LuksoButton } from './components/lukso-button/index.js';
|
|
|
2
2
|
export { LuksoCard } from './components/lukso-card/index.js';
|
|
3
3
|
export { LuksoCheckbox } from './components/lukso-checkbox/index.js';
|
|
4
4
|
export { LuksoColorPicker } from './components/lukso-color-picker/index.js';
|
|
5
|
-
export { L as LuksoDropdown } from './index-
|
|
5
|
+
export { L as LuksoDropdown } from './index-68890bd1.js';
|
|
6
6
|
export { LuksoDropdownOption } from './components/lukso-dropdown-option/index.js';
|
|
7
7
|
export { LuksoFooter } from './components/lukso-footer/index.js';
|
|
8
8
|
export { LuksoIcon } from './components/lukso-icon/index.js';
|
package/package.json
CHANGED
package/tailwind.config.cjs
CHANGED
|
@@ -5,9 +5,9 @@ const { colorPalette, boxShadows, fontWeights, fontSizes, lineHeights, scales, h
|
|
|
5
5
|
/**
|
|
6
6
|
* Add animation delay utilities. Example: .animation-delay-1000
|
|
7
7
|
*/
|
|
8
|
-
const animationDelayPlugin = plugin(
|
|
8
|
+
const animationDelayPlugin = plugin(({ addUtilities, theme, e }) => {
|
|
9
9
|
const values = theme('animationDelay')
|
|
10
|
-
|
|
10
|
+
const utilities = Object.entries(values).map(([key, value]) => {
|
|
11
11
|
return {
|
|
12
12
|
[`.${e(`animation-delay-${key}`)}`]: { animationDelay: `${value}` },
|
|
13
13
|
}
|
|
@@ -18,9 +18,9 @@ const animationDelayPlugin = plugin(function ({ addUtilities, theme, e }) {
|
|
|
18
18
|
/**
|
|
19
19
|
* Add animation iteration utilities. Example: .animation-iteration-infinite
|
|
20
20
|
*/
|
|
21
|
-
const animationIterationPlugin = plugin(
|
|
21
|
+
const animationIterationPlugin = plugin(({ addUtilities, theme, e }) => {
|
|
22
22
|
const values = theme('animationIteration')
|
|
23
|
-
|
|
23
|
+
const utilities = Object.entries(values).map(([key, value]) => {
|
|
24
24
|
return {
|
|
25
25
|
[`.${e(`animation-iteration-${key}`)}`]: {
|
|
26
26
|
animationIterationCount: `${value}`,
|
|
@@ -33,9 +33,9 @@ const animationIterationPlugin = plugin(function ({ addUtilities, theme, e }) {
|
|
|
33
33
|
/**
|
|
34
34
|
* Add animation duration utilities. Example: .animation-duration-1000
|
|
35
35
|
*/
|
|
36
|
-
const animationDuration = plugin(
|
|
36
|
+
const animationDuration = plugin(({ addUtilities, theme, e }) => {
|
|
37
37
|
const values = theme('animationDuration')
|
|
38
|
-
|
|
38
|
+
const utilities = Object.entries(values).map(([key, value]) => {
|
|
39
39
|
return {
|
|
40
40
|
[`.${e(`animation-duration-${key}`)}`]: {
|
|
41
41
|
animationDuration: `${value}`,
|
|
@@ -48,9 +48,9 @@ const animationDuration = plugin(function ({ addUtilities, theme, e }) {
|
|
|
48
48
|
/**
|
|
49
49
|
* Add animation fill mode utilities. Example: .animation-fill-forwards
|
|
50
50
|
*/
|
|
51
|
-
const animationFill = plugin(
|
|
51
|
+
const animationFill = plugin(({ addUtilities, theme, e }) => {
|
|
52
52
|
const values = theme('animationFill')
|
|
53
|
-
|
|
53
|
+
const utilities = Object.entries(values).map(([key, value]) => {
|
|
54
54
|
return {
|
|
55
55
|
[`.${e(`animation-fill-${key}`)}`]: {
|
|
56
56
|
animationFillMode: `${value}`,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debounce function execution to prevent multiple calls in a short period of time.
|
|
3
|
+
*
|
|
4
|
+
* @param func
|
|
5
|
+
* @param timeout
|
|
6
|
+
*/
|
|
7
|
+
export declare const debounceFunction: (func: unknown, timeout?: number) => (...args: any[]) => void;
|
|
8
|
+
//# sourceMappingURL=debounceFunction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounceFunction.d.ts","sourceRoot":"","sources":["../../src/shared/tools/debounceFunction.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,OAAO,+CAU7C,CAAA"}
|