@lukso/web-components 1.142.2 → 1.143.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 +4 -9
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -5
- package/dist/components/lukso-button/index.cjs +7 -5
- package/dist/components/lukso-button/index.d.ts +1 -1
- package/dist/components/lukso-button/index.d.ts.map +1 -1
- package/dist/components/lukso-button/index.js +7 -5
- package/dist/components/lukso-button/lukso-button.stories.d.ts +1 -1
- package/dist/components/lukso-button/lukso-button.stories.d.ts.map +1 -1
- package/dist/components/lukso-card/index.cjs +7 -7
- package/dist/components/lukso-card/index.js +7 -7
- package/dist/components/lukso-card/lukso-card.stories.d.ts +1 -1
- package/dist/components/lukso-card/lukso-card.stories.d.ts.map +1 -1
- package/dist/components/lukso-checkbox/index.cjs +3 -3
- package/dist/components/lukso-checkbox/index.js +3 -3
- package/dist/components/lukso-checkbox/lukso-checkbox.stories.d.ts +1 -1
- package/dist/components/lukso-checkbox/lukso-checkbox.stories.d.ts.map +1 -1
- package/dist/components/lukso-color-picker/index.cjs +11 -5
- package/dist/components/lukso-color-picker/index.d.ts.map +1 -1
- package/dist/components/lukso-color-picker/index.js +11 -5
- package/dist/components/lukso-color-picker/lukso-color-picker.stories.d.ts +4 -2
- package/dist/components/lukso-color-picker/lukso-color-picker.stories.d.ts.map +1 -1
- package/dist/components/lukso-dropdown/index.cjs +13 -9
- package/dist/components/lukso-dropdown/index.d.ts.map +1 -1
- package/dist/components/lukso-dropdown/index.js +13 -9
- package/dist/components/lukso-dropdown/lukso-dropdown.stories.d.ts +3 -1
- package/dist/components/lukso-dropdown/lukso-dropdown.stories.d.ts.map +1 -1
- package/dist/components/lukso-dropdown-option/index.cjs +11 -4
- package/dist/components/lukso-dropdown-option/index.d.ts.map +1 -1
- package/dist/components/lukso-dropdown-option/index.js +11 -4
- package/dist/components/lukso-dropdown-option/lukso-dropdown-option.stories.d.ts +1 -1
- package/dist/components/lukso-dropdown-option/lukso-dropdown-option.stories.d.ts.map +1 -1
- package/dist/components/lukso-footer/index.cjs +2 -2
- package/dist/components/lukso-footer/index.js +2 -2
- package/dist/components/lukso-footer/lukso-footer.stories.d.ts +1 -1
- package/dist/components/lukso-footer/lukso-footer.stories.d.ts.map +1 -1
- package/dist/components/lukso-icon/index.cjs +8 -3
- package/dist/components/lukso-icon/index.d.ts +1 -1
- package/dist/components/lukso-icon/index.d.ts.map +1 -1
- package/dist/components/lukso-icon/index.js +8 -3
- package/dist/components/lukso-icon/lukso-icon.stories.d.ts +3 -1
- package/dist/components/lukso-icon/lukso-icon.stories.d.ts.map +1 -1
- package/dist/components/lukso-image/index.cjs +4 -4
- package/dist/components/lukso-image/index.js +4 -4
- package/dist/components/lukso-image/lukso-image.stories.d.ts +1 -1
- package/dist/components/lukso-image/lukso-image.stories.d.ts.map +1 -1
- package/dist/components/lukso-input/index.cjs +3 -3
- package/dist/components/lukso-input/index.d.ts +1 -1
- package/dist/components/lukso-input/index.d.ts.map +1 -1
- package/dist/components/lukso-input/index.js +3 -3
- package/dist/components/lukso-input/lukso-input.stories.d.ts +1 -1
- package/dist/components/lukso-input/lukso-input.stories.d.ts.map +1 -1
- package/dist/components/lukso-modal/index.cjs +2 -2
- package/dist/components/lukso-modal/index.js +2 -2
- package/dist/components/lukso-modal/lukso-modal.stories.d.ts +1 -1
- package/dist/components/lukso-modal/lukso-modal.stories.d.ts.map +1 -1
- package/dist/components/lukso-navbar/index.cjs +3 -3
- package/dist/components/lukso-navbar/index.d.ts +1 -0
- package/dist/components/lukso-navbar/index.d.ts.map +1 -1
- package/dist/components/lukso-navbar/index.js +3 -3
- package/dist/components/lukso-navbar/lukso-navbar.stories.d.ts +1 -1
- package/dist/components/lukso-navbar/lukso-navbar.stories.d.ts.map +1 -1
- package/dist/components/lukso-pagination/index.cjs +10 -4
- package/dist/components/lukso-pagination/index.d.ts.map +1 -1
- package/dist/components/lukso-pagination/index.js +10 -4
- package/dist/components/lukso-pagination/lukso-pagination.stories.d.ts +1 -1
- package/dist/components/lukso-pagination/lukso-pagination.stories.d.ts.map +1 -1
- package/dist/components/lukso-profile/index.cjs +3 -3
- package/dist/components/lukso-profile/index.js +3 -3
- package/dist/components/lukso-profile/lukso-profile.stories.d.ts +1 -1
- package/dist/components/lukso-profile/lukso-profile.stories.d.ts.map +1 -1
- package/dist/components/lukso-progress/index.cjs +3 -3
- package/dist/components/lukso-progress/index.js +3 -3
- package/dist/components/lukso-progress/lukso-progress.stories.d.ts +1 -1
- package/dist/components/lukso-progress/lukso-progress.stories.d.ts.map +1 -1
- package/dist/components/lukso-radio/index.cjs +3 -3
- package/dist/components/lukso-radio/index.js +3 -3
- package/dist/components/lukso-radio/lukso-radio.stories.d.ts +1 -1
- package/dist/components/lukso-radio/lukso-radio.stories.d.ts.map +1 -1
- package/dist/components/lukso-radio-group/index.cjs +3 -3
- package/dist/components/lukso-radio-group/index.js +3 -3
- package/dist/components/lukso-radio-group/lukso-radio-group.stories.d.ts +1 -1
- package/dist/components/lukso-radio-group/lukso-radio-group.stories.d.ts.map +1 -1
- package/dist/components/lukso-sanitize/index.cjs +2 -2
- package/dist/components/lukso-sanitize/index.js +2 -2
- package/dist/components/lukso-sanitize/lukso-sanitize.stories.d.ts +1 -1
- package/dist/components/lukso-sanitize/lukso-sanitize.stories.d.ts.map +1 -1
- package/dist/components/lukso-search/index.cjs +6 -6
- package/dist/components/lukso-search/index.d.ts +1 -1
- package/dist/components/lukso-search/index.d.ts.map +1 -1
- package/dist/components/lukso-search/index.js +6 -6
- package/dist/components/lukso-search/lukso-search.stories.d.ts +1 -1
- package/dist/components/lukso-search/lukso-search.stories.d.ts.map +1 -1
- package/dist/components/lukso-select/index.cjs +15 -9
- package/dist/components/lukso-select/index.d.ts.map +1 -1
- package/dist/components/lukso-select/index.js +15 -9
- package/dist/components/lukso-select/lukso-select.stories.d.ts +5 -1
- package/dist/components/lukso-select/lukso-select.stories.d.ts.map +1 -1
- package/dist/components/lukso-share/index.cjs +2 -2
- package/dist/components/lukso-share/index.js +2 -2
- package/dist/components/lukso-share/lukso-share.stories.d.ts +1 -1
- package/dist/components/lukso-share/lukso-share.stories.d.ts.map +1 -1
- package/dist/components/lukso-switch/index.cjs +3 -3
- package/dist/components/lukso-switch/index.js +3 -3
- package/dist/components/lukso-switch/lukso-switch.stories.d.ts +1 -1
- package/dist/components/lukso-switch/lukso-switch.stories.d.ts.map +1 -1
- package/dist/components/lukso-tag/index.cjs +3 -3
- package/dist/components/lukso-tag/index.js +3 -3
- package/dist/components/lukso-tag/lukso-tag.stories.d.ts +1 -1
- package/dist/components/lukso-tag/lukso-tag.stories.d.ts.map +1 -1
- package/dist/components/lukso-terms/index.cjs +3 -3
- package/dist/components/lukso-terms/index.js +3 -3
- package/dist/components/lukso-terms/lukso-terms.stories.d.ts +1 -1
- package/dist/components/lukso-terms/lukso-terms.stories.d.ts.map +1 -1
- package/dist/components/lukso-textarea/index.cjs +9 -5
- package/dist/components/lukso-textarea/index.d.ts.map +1 -1
- package/dist/components/lukso-textarea/index.js +9 -5
- package/dist/components/lukso-textarea/lukso-textarea.stories.d.ts +1 -1
- package/dist/components/lukso-textarea/lukso-textarea.stories.d.ts.map +1 -1
- package/dist/components/lukso-tooltip/index.cjs +3 -3
- package/dist/components/lukso-tooltip/index.js +3 -3
- package/dist/components/lukso-tooltip/lukso-tooltip.stories.d.ts +1 -1
- package/dist/components/lukso-tooltip/lukso-tooltip.stories.d.ts.map +1 -1
- package/dist/components/lukso-username/index.cjs +4 -4
- package/dist/components/lukso-username/index.js +4 -4
- package/dist/components/lukso-username/lukso-username.stories.d.ts +1 -1
- package/dist/components/lukso-username/lukso-username.stories.d.ts.map +1 -1
- package/dist/components/lukso-wizard/index.cjs +9 -4
- package/dist/components/lukso-wizard/index.js +11 -6
- package/dist/components/lukso-wizard/lukso-wizard.stories.d.ts +1 -1
- package/dist/components/lukso-wizard/lukso-wizard.stories.d.ts.map +1 -1
- package/dist/docs/Animations.stories.d.ts +7 -0
- package/dist/docs/Animations.stories.d.ts.map +1 -0
- package/dist/docs/Colors.stories.d.ts +22 -0
- package/dist/docs/Colors.stories.d.ts.map +1 -0
- package/dist/docs/DropShadows.stories.d.ts +11 -0
- package/dist/docs/DropShadows.stories.d.ts.map +1 -0
- package/dist/docs/Icons.stories.d.ts +37 -0
- package/dist/docs/Icons.stories.d.ts.map +1 -0
- package/dist/docs/Typography.stories.d.ts +8 -0
- package/dist/docs/Typography.stories.d.ts.map +1 -0
- package/dist/{index-CFdnuKso.cjs → index-3V8ZK5SA.cjs} +5 -5
- package/dist/{index-uZYUCmTp.js → index-B663nE0O.js} +5 -5
- package/dist/{index-Cb_JUuy4.js → index-BWVB_bXl.js} +167 -602
- package/dist/{index-D1Py8U6q.cjs → index-BfBfOrWa.cjs} +2 -2
- package/dist/index-C1D2PVva.cjs +50 -0
- package/dist/{index--Rm5lIdY.js → index-CIVHkTr0.js} +2 -2
- package/dist/{index-DGF2vbAO.js → index-CiDuqHsl.js} +1 -1
- package/dist/{index-DU7D2ZlZ.cjs → index-CzuGUp5e.cjs} +1 -1
- package/dist/index-Ga3DorGn.js +41 -0
- package/dist/{index-CmV7e0vw.cjs → index-muwdeQPx.cjs} +167 -602
- package/dist/index.cjs +4 -9
- package/dist/index.js +4 -5
- package/dist/{property-Ct2CR7yu.cjs → property-BF9Ipvfh.cjs} +1 -1
- package/dist/{property-BNDS2YNq.js → property-jBJt0uQ6.js} +1 -1
- 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 -1
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/{state-N7_kBt7h.cjs → state-CTmsENPK.cjs} +1 -1
- package/dist/{state-DQLdL2U7.js → state-Dnqg2VVB.js} +1 -1
- package/dist/{style-map-CmYXi-8E.cjs → style-map-CV0IkMGG.cjs} +1 -1
- package/dist/{style-map-DG3R-qeW.js → style-map-hOUSiHf5.js} +1 -1
- package/package.json +1 -6
- package/tools/index.cjs +1 -1
- package/tools/index.js +1 -1
- package/dist/components/lukso-test/index.cjs +0 -101
- package/dist/components/lukso-test/index.d.ts +0 -18
- package/dist/components/lukso-test/index.d.ts.map +0 -1
- package/dist/components/lukso-test/index.js +0 -99
- package/dist/components/lukso-test/test.stories.d.ts +0 -15
- package/dist/components/lukso-test/test.stories.d.ts.map +0 -1
- package/dist/directive-helpers-BilhVy-E.cjs +0 -16
- package/dist/directive-helpers-DmfQA7B0.js +0 -9
- package/dist/index-ai1JMlH_.js +0 -41
- package/dist/index-sTnZd0lm.cjs +0 -50
package/dist/index.cjs
CHANGED
|
@@ -15,23 +15,22 @@ const components_luksoInput_index = require('./components/lukso-input/index.cjs'
|
|
|
15
15
|
const components_luksoModal_index = require('./components/lukso-modal/index.cjs');
|
|
16
16
|
const components_luksoNavbar_index = require('./components/lukso-navbar/index.cjs');
|
|
17
17
|
const components_luksoPagination_index = require('./components/lukso-pagination/index.cjs');
|
|
18
|
-
const components_luksoProfile_index = require('./index-
|
|
18
|
+
const components_luksoProfile_index = require('./index-BfBfOrWa.cjs');
|
|
19
19
|
const components_luksoProgress_index = require('./components/lukso-progress/index.cjs');
|
|
20
20
|
const components_luksoRadio_index = require('./components/lukso-radio/index.cjs');
|
|
21
21
|
const components_luksoRadioGroup_index = require('./components/lukso-radio-group/index.cjs');
|
|
22
22
|
const components_luksoSanitize_index = require('./components/lukso-sanitize/index.cjs');
|
|
23
|
-
const components_luksoSearch_index = require('./index-
|
|
23
|
+
const components_luksoSearch_index = require('./index-3V8ZK5SA.cjs');
|
|
24
24
|
const components_luksoSelect_index = require('./components/lukso-select/index.cjs');
|
|
25
25
|
const components_luksoShare_index = require('./components/lukso-share/index.cjs');
|
|
26
26
|
const components_luksoSwitch_index = require('./components/lukso-switch/index.cjs');
|
|
27
27
|
const components_luksoTag_index = require('./components/lukso-tag/index.cjs');
|
|
28
28
|
const components_luksoTerms_index = require('./components/lukso-terms/index.cjs');
|
|
29
|
-
const components_luksoTest_index = require('./components/lukso-test/index.cjs');
|
|
30
29
|
const components_luksoTextarea_index = require('./components/lukso-textarea/index.cjs');
|
|
31
30
|
const components_luksoTooltip_index = require('./components/lukso-tooltip/index.cjs');
|
|
32
|
-
const components_luksoUsername_index = require('./index-
|
|
31
|
+
const components_luksoUsername_index = require('./index-muwdeQPx.cjs');
|
|
33
32
|
const components_luksoWizard_index = require('./components/lukso-wizard/index.cjs');
|
|
34
|
-
const shared_tailwindElement_index = require('./index-
|
|
33
|
+
const shared_tailwindElement_index = require('./index-C1D2PVva.cjs');
|
|
35
34
|
const cn = require('./cn-CNdKneQ1.cjs');
|
|
36
35
|
|
|
37
36
|
|
|
@@ -134,10 +133,6 @@ Object.defineProperty(exports, "LuksoTerms", {
|
|
|
134
133
|
enumerable: true,
|
|
135
134
|
get: () => components_luksoTerms_index.LuksoTerms
|
|
136
135
|
});
|
|
137
|
-
Object.defineProperty(exports, "LuksoTest", {
|
|
138
|
-
enumerable: true,
|
|
139
|
-
get: () => components_luksoTest_index.LuksoTest
|
|
140
|
-
});
|
|
141
136
|
Object.defineProperty(exports, "LuksoTextarea", {
|
|
142
137
|
enumerable: true,
|
|
143
138
|
get: () => components_luksoTextarea_index.LuksoTextarea
|
package/dist/index.js
CHANGED
|
@@ -11,21 +11,20 @@ export { LuksoInput } from './components/lukso-input/index.js';
|
|
|
11
11
|
export { LuksoModal } from './components/lukso-modal/index.js';
|
|
12
12
|
export { LuksoNavbar } from './components/lukso-navbar/index.js';
|
|
13
13
|
export { LuksoPagination } from './components/lukso-pagination/index.js';
|
|
14
|
-
export { L as LuksoProfile } from './index
|
|
14
|
+
export { L as LuksoProfile } from './index-CIVHkTr0.js';
|
|
15
15
|
export { LuksoProgress } from './components/lukso-progress/index.js';
|
|
16
16
|
export { LuksoRadio } from './components/lukso-radio/index.js';
|
|
17
17
|
export { LuksoRadioGroup } from './components/lukso-radio-group/index.js';
|
|
18
18
|
export { LuksoSanitize } from './components/lukso-sanitize/index.js';
|
|
19
|
-
export { L as LuksoSearch, a as SEARCH_RESULT_TYPES, S as STANDARDS } from './index-
|
|
19
|
+
export { L as LuksoSearch, a as SEARCH_RESULT_TYPES, S as STANDARDS } from './index-B663nE0O.js';
|
|
20
20
|
export { LuksoSelect } from './components/lukso-select/index.js';
|
|
21
21
|
export { LuksoShare } from './components/lukso-share/index.js';
|
|
22
22
|
export { LuksoSwitch } from './components/lukso-switch/index.js';
|
|
23
23
|
export { LuksoTag } from './components/lukso-tag/index.js';
|
|
24
24
|
export { LuksoTerms } from './components/lukso-terms/index.js';
|
|
25
|
-
export { LuksoTest } from './components/lukso-test/index.js';
|
|
26
25
|
export { LuksoTextarea } from './components/lukso-textarea/index.js';
|
|
27
26
|
export { LuksoTooltip } from './components/lukso-tooltip/index.js';
|
|
28
|
-
export { L as LuksoUsername } from './index-
|
|
27
|
+
export { L as LuksoUsername } from './index-BWVB_bXl.js';
|
|
29
28
|
export { LuksoWizard } from './components/lukso-wizard/index.js';
|
|
30
|
-
export { a as TailwindElement, T as TailwindStyledElement } from './index-
|
|
29
|
+
export { a as TailwindElement, T as TailwindStyledElement } from './index-Ga3DorGn.js';
|
|
31
30
|
export { c as cn } from './cn-Cu9aP49j.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as TailwindElement, T as TailwindStyledElement } from '../../index-
|
|
1
|
+
export { a as TailwindElement, T as TailwindStyledElement } from '../../index-Ga3DorGn.js';
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SEARCH_RESULT_TYPES, STANDARDS } from './enums';
|
|
2
2
|
export type Address = `0x${string}`;
|
|
3
|
-
export type InputSize = 'small' | 'medium';
|
|
3
|
+
export type InputSize = 'small' | 'medium' | 'large' | 'x-large';
|
|
4
4
|
export type FunctionMap<T extends string, Return = string> = Partial<Record<T, () => Return>>;
|
|
5
5
|
export type ProfileSize = '2x-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | '2x-large';
|
|
6
6
|
export type SearchResultType = `${SEARCH_RESULT_TYPES}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExD,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExD,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAEhE,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,OAAO,CAClE,MAAM,CAAC,CAAC,EAAE,MAAM,MAAM,CAAC,CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,SAAS,GACT,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,UAAU,CAAA;AAEd,MAAM,MAAM,gBAAgB,GAAG,GAAG,mBAAmB,EAAE,CAAA;AAEvD,MAAM,MAAM,QAAQ,GAAG,GAAG,SAAS,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukso/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.143.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -195,11 +195,6 @@
|
|
|
195
195
|
"import": "./dist/components/lukso-terms/index.js",
|
|
196
196
|
"types": "./dist/components/lukso-terms/index.d.ts"
|
|
197
197
|
},
|
|
198
|
-
"./dist/components/lukso-test": {
|
|
199
|
-
"require": "./dist/components/lukso-test/index.cjs",
|
|
200
|
-
"import": "./dist/components/lukso-test/index.js",
|
|
201
|
-
"types": "./dist/components/lukso-test/index.d.ts"
|
|
202
|
-
},
|
|
203
198
|
"./dist/components/lukso-textarea": {
|
|
204
199
|
"require": "./dist/components/lukso-textarea/index.cjs",
|
|
205
200
|
"import": "./dist/components/lukso-textarea/index.js",
|
package/tools/index.cjs
CHANGED
package/tools/index.js
CHANGED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-sTnZd0lm.cjs');
|
|
6
|
-
const property = require('../../property-Ct2CR7yu.cjs');
|
|
7
|
-
const directive = require('../../directive-DT5Y-Nw0.cjs');
|
|
8
|
-
const directiveHelpers = require('../../directive-helpers-BilhVy-E.cjs');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @license
|
|
12
|
-
* Copyright 2017 Google LLC
|
|
13
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
-
*/const s=(i,t)=>{const e=i._$AN;if(void 0===e)return false;for(const i of e)i._$AO?.(t,false),s(i,t);return true},o$1=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t;}while(0===e?.size)},r$1=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t);}};function h(i){ void 0!==this._$AN?(o$1(this),this._$AM=i,r$1(this)):this._$AM=i;}function n$1(i,t=false,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],false),o$1(r[i]);else null!=r&&(s(r,false),o$1(r));else s(this,i);}const c=i=>{i.type==directive.t.CHILD&&(i._$AP??=n$1,i._$AQ??=h);};class f extends directive.i{constructor(){super(...arguments),this._$AN=void 0;}_$AT(i,t,e){super._$AT(i,t,e),r$1(this),this.isConnected=i._$AU;}_$AO(i,t=true){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o$1(this));}setValue(t){if(directiveHelpers.f(this._$Ct))this._$Ct._$AI(t,this);else {const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0);}}disconnected(){}reconnected(){}}
|
|
15
|
-
|
|
16
|
-
const i=new WeakMap;class t{constructor(t,s){this.startPaused=false,this.disabled=false,this.clients=new Set,this.pendingComplete=false,this.host=t,this.defaultOptions=s.defaultOptions||{},this.startPaused=!!s.startPaused,this.disabled=!!s.disabled,this.onComplete=s.onComplete,i.set(this.host,this);}async add(i){this.clients.add(i),this.startPaused&&i.webAnimation?.pause(),this.pendingComplete=true,await i.finished,this.pendingComplete&&!this.isAnimating&&(this.pendingComplete=false,this.onComplete?.());}remove(i){this.clients.delete(i);}pause(){this.clients.forEach((i=>i.webAnimation?.pause()));}play(){this.clients.forEach((i=>i.webAnimation?.play()));}cancel(){this.clients.forEach((i=>i.webAnimation?.cancel())),this.clients.clear();}finish(){this.clients.forEach((i=>i.webAnimation?.finish())),this.clients.clear();}togglePlay(){this.isPlaying?this.pause():this.play();}get isAnimating(){return this.clients.size>0}get isPlaying(){return Array.from(this.clients).some((i=>"running"===i.webAnimation?.playState))}async finished(){await Promise.all(Array.from(this.clients).map((i=>i.finished)));}}
|
|
17
|
-
|
|
18
|
-
let o=0;const r=new Map,n=new WeakSet,a=()=>new Promise((t=>requestAnimationFrame(t))),g=(t,i)=>{const s=t-i;return 0===s?void 0:s},w=(t,i)=>{const s=t/i;return 1===s?void 0:s},N={left:(t,i)=>{const s=g(t,i);return {value:s,transform:null==s||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,i)=>{const s=g(t,i);return {value:s,transform:null==s||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,i)=>{let s;0===i&&(i=1,s={width:"1px"});const e=w(t,i);return {value:e,overrideFrom:s,transform:null==e||isNaN(e)?void 0:`scaleX(${e})`}},height:(t,i)=>{let s;0===i&&(i=1,s={height:"1px"});const e=w(t,i);return {value:e,overrideFrom:s,transform:null==e||isNaN(e)?void 0:`scaleY(${e})`}}},A={duration:333,easing:"ease-in-out"},b=["left","top","width","height","opacity","color","background"],j=new WeakMap;class x extends f{constructor(t){if(super(t),this.t=false,this.i=null,this.o=null,this.h=true,this.shouldLog=false,t.type===directive.t.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished();}createFinished(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.l=t;}));}async resolveFinished(){this.l?.(),this.l=void 0;}render(i){return shared_tailwindElement_index.E}getController(){return i.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[i]){const s=void 0===this.u;return s&&(this.u=t.options?.host,this.u.addController(this),this.u.updateComplete.then((t=>this.t=true)),this.element=t.element,j.set(this.element,this)),this.optionsOrCallback=i,(s||"function"!=typeof i)&&this.p(i),this.render(i)}p(t){t=t??{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=b,this.options=t;}m(){const t={},i=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((e=>{const h=i[e]??(N[e]?void 0:s[e]),o=Number(h);t[e]=isNaN(o)?h+"":o;})),t}v(){let t,i=true;return this.options.guard&&(t=this.options.guard(),i=((t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length&&t.every(((t,s)=>t===i[s])))return false}else if(i===t)return false;return true})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&i&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling);}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await a;const i=this.O(),s=this.j(this.options.keyframeOptions,i),e=this.m();if(void 0!==this.A){const{from:s,to:h}=this.N(this.A,e,i);this.log("measured",[this.A,e,s,h]),t=this.calculateKeyframes(s,h);}else {const s=r.get(this.options.inId);if(s){r.delete(this.options.inId);const{from:h,to:n}=this.N(s,e,i);t=this.calculateKeyframes(h,n),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,o++,t.forEach((t=>t.zIndex=o));}else this.options.in&&(t=[...this.options.in,{}]);}this.animate(t,s);}resetStyles(){ void 0!==this.P&&(this.element.setAttribute("style",this.P??""),this.P=void 0);}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel();}reconnected(){}async disconnected(){if(!this.h)return;if(void 0!==this.options.id&&r.set(this.options.id,this.A),void 0===this.options.out)return;if(this.prepare(),await a(),this.i?.isConnected){const t=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.m();this.log("stabilizing out");const i=this.A.left-t.left,s=this.A.top-t.top;!("static"===getComputedStyle(this.element).position)||0===i&&0===s||(this.element.style.position="relative"),0!==i&&(this.element.style.left=i+"px"),0!==s&&(this.element.style.top=s+"px");}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove();}prepare(){this.createFinished();}start(){this.options.onStart?.(this);}didFinish(t){t&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished();}O(){const t=[];for(let i=this.element.parentNode;i;i=i?.parentNode){const s=j.get(i);s&&!s.isDisabled()&&s&&t.push(s);}return t}get isHostRendered(){const t=n.has(this.u);return t||this.u.updateComplete.then((()=>{n.add(this.u);})),t}j(t,i=this.O()){const s={...A};return i.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}N(t,i,s){t={...t},i={...i};const e=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let h=1,o=1;return e.length>0&&(e.forEach((t=>{t.width&&(h/=t.width),t.height&&(o/=t.height);})),void 0!==t.left&&void 0!==i.left&&(t.left=h*t.left,i.left=h*i.left),void 0!==t.top&&void 0!==i.top&&(t.top=o*t.top,i.top=o*i.top)),{from:t,to:i}}calculateKeyframes(t,i,s=false){const e={},h={};let o=false;const r={};for(const s in i){const n=t[s],a=i[s];if(s in N){const t=N[s];if(void 0===n||void 0===a)continue;const i=t(n,a);void 0!==i.transform&&(r[s]=i.value,o=true,e.transform=`${e.transform??""} ${i.transform}`,void 0!==i.overrideFrom&&Object.assign(e,i.overrideFrom));}else n!==a&&void 0!==n&&void 0!==a&&(o=true,e[s]=n,h[s]=a);}return e.transformOrigin=h.transformOrigin=s?"center center":"top left",this.animatingProperties=r,o?[e,h]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let s=false;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,i]),s=true,this.webAnimation=this.element.animate(t,i);const e=this.getController();e?.add(this);try{await this.webAnimation.finished;}catch(t){}e?.remove(this);}return this.didFinish(s),s}isAnimating(){return "running"===this.webAnimation?.playState||this.webAnimation?.pending}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i);}}const F=directive.e(x);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @license
|
|
22
|
-
* Copyright 2018 Google LLC
|
|
23
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
|
-
*/const e=directive.e(class extends directive.i{constructor(t){if(super(t),t.type!==directive.t.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return shared_tailwindElement_index.T}});
|
|
25
|
-
|
|
26
|
-
const style = "p {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1))\n}\np b {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1))\n}";
|
|
27
|
-
|
|
28
|
-
var __defProp = Object.defineProperty;
|
|
29
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
30
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
31
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
32
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
33
|
-
if (decorator = decorators[i])
|
|
34
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
35
|
-
if (kind && result) __defProp(target, key, result);
|
|
36
|
-
return result;
|
|
37
|
-
};
|
|
38
|
-
exports.LuksoTest = class LuksoTest extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
39
|
-
constructor() {
|
|
40
|
-
super(...arguments);
|
|
41
|
-
this.name = "World";
|
|
42
|
-
this.clicked = false;
|
|
43
|
-
this.disabled = false;
|
|
44
|
-
this.duration = 1e3;
|
|
45
|
-
this.controller = new t(this, {
|
|
46
|
-
defaultOptions: {
|
|
47
|
-
keyframeOptions: {
|
|
48
|
-
duration: this.duration,
|
|
49
|
-
fill: "backwards"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
_onClick() {
|
|
55
|
-
if (this.disabled) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this.clicked = true;
|
|
59
|
-
setTimeout(() => {
|
|
60
|
-
this.clicked = false;
|
|
61
|
-
}, 2e3);
|
|
62
|
-
}
|
|
63
|
-
render() {
|
|
64
|
-
const classes = {
|
|
65
|
-
"text-yellow-200": !this.disabled,
|
|
66
|
-
"p-2": true,
|
|
67
|
-
"rounded-full": true,
|
|
68
|
-
"text-24": true,
|
|
69
|
-
"bg-blue-800": this.clicked && !this.disabled,
|
|
70
|
-
"bg-blue-200": !this.clicked && !this.disabled
|
|
71
|
-
};
|
|
72
|
-
return shared_tailwindElement_index.x`
|
|
73
|
-
<p class="heading-1">
|
|
74
|
-
Hello,
|
|
75
|
-
<b class="heading-4">${this.name}</b>
|
|
76
|
-
!
|
|
77
|
-
</p>
|
|
78
|
-
<button
|
|
79
|
-
?disabled=${this.disabled}
|
|
80
|
-
data-testid="button"
|
|
81
|
-
@click=${this._onClick}
|
|
82
|
-
class="hover:text-yellow-700 ${e(classes)}"
|
|
83
|
-
${F()}
|
|
84
|
-
>
|
|
85
|
-
Hello world! 2
|
|
86
|
-
</button>
|
|
87
|
-
`;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
__decorateClass([
|
|
91
|
-
property.n()
|
|
92
|
-
], exports.LuksoTest.prototype, "name", 2);
|
|
93
|
-
__decorateClass([
|
|
94
|
-
property.n()
|
|
95
|
-
], exports.LuksoTest.prototype, "clicked", 2);
|
|
96
|
-
__decorateClass([
|
|
97
|
-
property.n({ type: Boolean })
|
|
98
|
-
], exports.LuksoTest.prototype, "disabled", 2);
|
|
99
|
-
exports.LuksoTest = __decorateClass([
|
|
100
|
-
property.t("lukso-test")
|
|
101
|
-
], exports.LuksoTest);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AnimateController } from '@lit-labs/motion';
|
|
2
|
-
declare const LuksoTest_base: typeof import('lit').LitElement;
|
|
3
|
-
export declare class LuksoTest extends LuksoTest_base {
|
|
4
|
-
name: string;
|
|
5
|
-
private clicked;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
duration: number;
|
|
8
|
-
controller: AnimateController;
|
|
9
|
-
_onClick(): void;
|
|
10
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
11
|
-
}
|
|
12
|
-
declare global {
|
|
13
|
-
interface HTMLElementTagNameMap {
|
|
14
|
-
'lukso-test': LuksoTest;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-test/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;;AAM7D,qBACa,SAAU,SAAQ,cAA4B;IAEzD,IAAI,SAAU;IAGd,OAAO,CAAC,OAAO,CAAQ;IAGvB,QAAQ,UAAQ;IAEhB,QAAQ,SAAO;IACf,UAAU,oBAOR;IAEF,QAAQ;IAUR,MAAM;CA0BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAA;KACxB;CACF"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { E, b as T, T as TailwindStyledElement, x as x$1 } from '../../index-ai1JMlH_.js';
|
|
2
|
-
import { n as n$2, t as t$2 } from '../../property-BNDS2YNq.js';
|
|
3
|
-
import { i as i$1, t as t$1, e as e$1 } from '../../directive-BKuZRRPO.js';
|
|
4
|
-
import { f as f$1 } from '../../directive-helpers-DmfQA7B0.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright 2017 Google LLC
|
|
9
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
-
*/const s=(i,t)=>{const e=i._$AN;if(void 0===e)return false;for(const i of e)i._$AO?.(t,false),s(i,t);return true},o$1=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t;}while(0===e?.size)},r$1=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t);}};function h(i){ void 0!==this._$AN?(o$1(this),this._$AM=i,r$1(this)):this._$AM=i;}function n$1(i,t=false,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],false),o$1(r[i]);else null!=r&&(s(r,false),o$1(r));else s(this,i);}const c=i=>{i.type==t$1.CHILD&&(i._$AP??=n$1,i._$AQ??=h);};class f extends i$1{constructor(){super(...arguments),this._$AN=void 0;}_$AT(i,t,e){super._$AT(i,t,e),r$1(this),this.isConnected=i._$AU;}_$AO(i,t=true){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o$1(this));}setValue(t){if(f$1(this._$Ct))this._$Ct._$AI(t,this);else {const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0);}}disconnected(){}reconnected(){}}
|
|
11
|
-
|
|
12
|
-
const i=new WeakMap;class t{constructor(t,s){this.startPaused=false,this.disabled=false,this.clients=new Set,this.pendingComplete=false,this.host=t,this.defaultOptions=s.defaultOptions||{},this.startPaused=!!s.startPaused,this.disabled=!!s.disabled,this.onComplete=s.onComplete,i.set(this.host,this);}async add(i){this.clients.add(i),this.startPaused&&i.webAnimation?.pause(),this.pendingComplete=true,await i.finished,this.pendingComplete&&!this.isAnimating&&(this.pendingComplete=false,this.onComplete?.());}remove(i){this.clients.delete(i);}pause(){this.clients.forEach((i=>i.webAnimation?.pause()));}play(){this.clients.forEach((i=>i.webAnimation?.play()));}cancel(){this.clients.forEach((i=>i.webAnimation?.cancel())),this.clients.clear();}finish(){this.clients.forEach((i=>i.webAnimation?.finish())),this.clients.clear();}togglePlay(){this.isPlaying?this.pause():this.play();}get isAnimating(){return this.clients.size>0}get isPlaying(){return Array.from(this.clients).some((i=>"running"===i.webAnimation?.playState))}async finished(){await Promise.all(Array.from(this.clients).map((i=>i.finished)));}}
|
|
13
|
-
|
|
14
|
-
let o=0;const r=new Map,n=new WeakSet,a=()=>new Promise((t=>requestAnimationFrame(t))),g=(t,i)=>{const s=t-i;return 0===s?void 0:s},w=(t,i)=>{const s=t/i;return 1===s?void 0:s},N={left:(t,i)=>{const s=g(t,i);return {value:s,transform:null==s||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,i)=>{const s=g(t,i);return {value:s,transform:null==s||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,i)=>{let s;0===i&&(i=1,s={width:"1px"});const e=w(t,i);return {value:e,overrideFrom:s,transform:null==e||isNaN(e)?void 0:`scaleX(${e})`}},height:(t,i)=>{let s;0===i&&(i=1,s={height:"1px"});const e=w(t,i);return {value:e,overrideFrom:s,transform:null==e||isNaN(e)?void 0:`scaleY(${e})`}}},A={duration:333,easing:"ease-in-out"},b=["left","top","width","height","opacity","color","background"],j=new WeakMap;class x extends f{constructor(t){if(super(t),this.t=false,this.i=null,this.o=null,this.h=true,this.shouldLog=false,t.type===t$1.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished();}createFinished(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.l=t;}));}async resolveFinished(){this.l?.(),this.l=void 0;}render(i){return E}getController(){return i.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[i]){const s=void 0===this.u;return s&&(this.u=t.options?.host,this.u.addController(this),this.u.updateComplete.then((t=>this.t=true)),this.element=t.element,j.set(this.element,this)),this.optionsOrCallback=i,(s||"function"!=typeof i)&&this.p(i),this.render(i)}p(t){t=t??{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=b,this.options=t;}m(){const t={},i=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((e=>{const h=i[e]??(N[e]?void 0:s[e]),o=Number(h);t[e]=isNaN(o)?h+"":o;})),t}v(){let t,i=true;return this.options.guard&&(t=this.options.guard(),i=((t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length&&t.every(((t,s)=>t===i[s])))return false}else if(i===t)return false;return true})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&i&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling);}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await a;const i=this.O(),s=this.j(this.options.keyframeOptions,i),e=this.m();if(void 0!==this.A){const{from:s,to:h}=this.N(this.A,e,i);this.log("measured",[this.A,e,s,h]),t=this.calculateKeyframes(s,h);}else {const s=r.get(this.options.inId);if(s){r.delete(this.options.inId);const{from:h,to:n}=this.N(s,e,i);t=this.calculateKeyframes(h,n),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,o++,t.forEach((t=>t.zIndex=o));}else this.options.in&&(t=[...this.options.in,{}]);}this.animate(t,s);}resetStyles(){ void 0!==this.P&&(this.element.setAttribute("style",this.P??""),this.P=void 0);}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel();}reconnected(){}async disconnected(){if(!this.h)return;if(void 0!==this.options.id&&r.set(this.options.id,this.A),void 0===this.options.out)return;if(this.prepare(),await a(),this.i?.isConnected){const t=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.m();this.log("stabilizing out");const i=this.A.left-t.left,s=this.A.top-t.top;!("static"===getComputedStyle(this.element).position)||0===i&&0===s||(this.element.style.position="relative"),0!==i&&(this.element.style.left=i+"px"),0!==s&&(this.element.style.top=s+"px");}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove();}prepare(){this.createFinished();}start(){this.options.onStart?.(this);}didFinish(t){t&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished();}O(){const t=[];for(let i=this.element.parentNode;i;i=i?.parentNode){const s=j.get(i);s&&!s.isDisabled()&&s&&t.push(s);}return t}get isHostRendered(){const t=n.has(this.u);return t||this.u.updateComplete.then((()=>{n.add(this.u);})),t}j(t,i=this.O()){const s={...A};return i.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}N(t,i,s){t={...t},i={...i};const e=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let h=1,o=1;return e.length>0&&(e.forEach((t=>{t.width&&(h/=t.width),t.height&&(o/=t.height);})),void 0!==t.left&&void 0!==i.left&&(t.left=h*t.left,i.left=h*i.left),void 0!==t.top&&void 0!==i.top&&(t.top=o*t.top,i.top=o*i.top)),{from:t,to:i}}calculateKeyframes(t,i,s=false){const e={},h={};let o=false;const r={};for(const s in i){const n=t[s],a=i[s];if(s in N){const t=N[s];if(void 0===n||void 0===a)continue;const i=t(n,a);void 0!==i.transform&&(r[s]=i.value,o=true,e.transform=`${e.transform??""} ${i.transform}`,void 0!==i.overrideFrom&&Object.assign(e,i.overrideFrom));}else n!==a&&void 0!==n&&void 0!==a&&(o=true,e[s]=n,h[s]=a);}return e.transformOrigin=h.transformOrigin=s?"center center":"top left",this.animatingProperties=r,o?[e,h]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let s=false;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,i]),s=true,this.webAnimation=this.element.animate(t,i);const e=this.getController();e?.add(this);try{await this.webAnimation.finished;}catch(t){}e?.remove(this);}return this.didFinish(s),s}isAnimating(){return "running"===this.webAnimation?.playState||this.webAnimation?.pending}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i);}}const F=e$1(x);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2018 Google LLC
|
|
19
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const e=e$1(class extends i$1{constructor(t){if(super(t),t.type!==t$1.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
21
|
-
|
|
22
|
-
const style = "p {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1))\n}\np b {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1))\n}";
|
|
23
|
-
|
|
24
|
-
var __defProp = Object.defineProperty;
|
|
25
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
26
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
27
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
28
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
29
|
-
if (decorator = decorators[i])
|
|
30
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
31
|
-
if (kind && result) __defProp(target, key, result);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
let LuksoTest = class extends TailwindStyledElement(style) {
|
|
35
|
-
constructor() {
|
|
36
|
-
super(...arguments);
|
|
37
|
-
this.name = "World";
|
|
38
|
-
this.clicked = false;
|
|
39
|
-
this.disabled = false;
|
|
40
|
-
this.duration = 1e3;
|
|
41
|
-
this.controller = new t(this, {
|
|
42
|
-
defaultOptions: {
|
|
43
|
-
keyframeOptions: {
|
|
44
|
-
duration: this.duration,
|
|
45
|
-
fill: "backwards"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
_onClick() {
|
|
51
|
-
if (this.disabled) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
this.clicked = true;
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
this.clicked = false;
|
|
57
|
-
}, 2e3);
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
const classes = {
|
|
61
|
-
"text-yellow-200": !this.disabled,
|
|
62
|
-
"p-2": true,
|
|
63
|
-
"rounded-full": true,
|
|
64
|
-
"text-24": true,
|
|
65
|
-
"bg-blue-800": this.clicked && !this.disabled,
|
|
66
|
-
"bg-blue-200": !this.clicked && !this.disabled
|
|
67
|
-
};
|
|
68
|
-
return x$1`
|
|
69
|
-
<p class="heading-1">
|
|
70
|
-
Hello,
|
|
71
|
-
<b class="heading-4">${this.name}</b>
|
|
72
|
-
!
|
|
73
|
-
</p>
|
|
74
|
-
<button
|
|
75
|
-
?disabled=${this.disabled}
|
|
76
|
-
data-testid="button"
|
|
77
|
-
@click=${this._onClick}
|
|
78
|
-
class="hover:text-yellow-700 ${e(classes)}"
|
|
79
|
-
${F()}
|
|
80
|
-
>
|
|
81
|
-
Hello world! 2
|
|
82
|
-
</button>
|
|
83
|
-
`;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
__decorateClass([
|
|
87
|
-
n$2()
|
|
88
|
-
], LuksoTest.prototype, "name", 2);
|
|
89
|
-
__decorateClass([
|
|
90
|
-
n$2()
|
|
91
|
-
], LuksoTest.prototype, "clicked", 2);
|
|
92
|
-
__decorateClass([
|
|
93
|
-
n$2({ type: Boolean })
|
|
94
|
-
], LuksoTest.prototype, "disabled", 2);
|
|
95
|
-
LuksoTest = __decorateClass([
|
|
96
|
-
t$2("lukso-test")
|
|
97
|
-
], LuksoTest);
|
|
98
|
-
|
|
99
|
-
export { LuksoTest };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/web-components';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
export declare function Primary({ disabled }: {
|
|
5
|
-
disabled: any;
|
|
6
|
-
}): import('lit-html').TemplateResult<1>;
|
|
7
|
-
export declare namespace Primary {
|
|
8
|
-
var args: {
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
};
|
|
11
|
-
var play: ({ canvasElement }: {
|
|
12
|
-
canvasElement: any;
|
|
13
|
-
}) => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=test.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-test/test.stories.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,UAAU,CAAA;AAEjB,QAAA,MAAM,IAAI,EAAE,IAGX,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE;;CAAA,wCAEnC;yBAFe,OAAO"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const shared_tailwindElement_index = require('./index-sTnZd0lm.cjs');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2020 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const {I:t}=shared_tailwindElement_index.Z,f$1=o=>void 0===o.strings,s=()=>document.createComment(""),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options);}else {const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t);}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t;}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,M=o=>{o._$AP?.(false,true);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}};
|
|
10
|
-
|
|
11
|
-
exports.M = M;
|
|
12
|
-
exports.f = f$1;
|
|
13
|
-
exports.m = m;
|
|
14
|
-
exports.p = p;
|
|
15
|
-
exports.r = r;
|
|
16
|
-
exports.v = v;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Z } from './index-ai1JMlH_.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2020 Google LLC
|
|
6
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/const {I:t}=Z,f$1=o=>void 0===o.strings,s=()=>document.createComment(""),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options);}else {const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t);}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t;}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,M=o=>{o._$AP?.(false,true);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}};
|
|
8
|
-
|
|
9
|
-
export { M, f$1 as f, m, p, r, v };
|