widgies 0.1.0 → 0.1.1
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/README.md +33 -14
- package/dist/affirmation.js +3 -1
- package/dist/affirmation.min.js +3 -1
- package/dist/calculator.js +12 -1
- package/dist/calculator.min.js +12 -1
- package/dist/index.d.ts +8 -0
- package/dist/widgets/calculator.d.ts +1 -0
- package/dist/widgets/color-palette.d.ts +24 -0
- package/dist/widgets/currency-exchange.d.ts +20 -0
- package/dist/widgets/dad-jokes.d.ts +15 -0
- package/dist/widgets/fortune-cookie.d.ts +13 -0
- package/dist/widgets/magic-8-ball.d.ts +12 -0
- package/dist/widgets/random-image.d.ts +17 -0
- package/dist/widgets/tiny-planet.d.ts +14 -0
- package/dist/widgets/unit-converter.d.ts +18 -0
- package/dist/widgies.js +1554 -19
- package/dist/widgies.min.js +1554 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -36,18 +36,28 @@ A tiny, zero-dependency set of Web Component widgets you can drop into any web p
|
|
|
36
36
|
<widgies-timer minutes="25" aria-label="25-minute timer"></widgies-timer>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
## Widgets
|
|
40
|
-
|
|
41
|
-
| Tag
|
|
42
|
-
|
|
|
43
|
-
| `<widgies-calculator>`
|
|
44
|
-
| `<widgies-
|
|
45
|
-
| `<widgies-
|
|
46
|
-
| `<widgies-
|
|
47
|
-
| `<widgies-
|
|
48
|
-
| `<widgies-ambient>`
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
## Available Widgets
|
|
40
|
+
|
|
41
|
+
| Tag | What it does | Key attributes |
|
|
42
|
+
| ----------------------------- | ------------------------------- | --------------------- |
|
|
43
|
+
| `<widgies-calculator>` | 4-function calculator | – |
|
|
44
|
+
| `<widgies-timer>` | Countdown / Pomodoro timer | `minutes` `seconds` |
|
|
45
|
+
| `<widgies-random-number>` | Cryptographically safe RNG | `min` `max` |
|
|
46
|
+
| `<widgies-qr-code>` | QR code generator | `text` |
|
|
47
|
+
| `<widgies-affirmation>` | Random positive messages | `interval` (ms) |
|
|
48
|
+
| `<widgies-ambient>` | Nature sounds for focus | `sound` |
|
|
49
|
+
| `<widgies-unit-converter>` | Multi-category unit converter | – |
|
|
50
|
+
| `<widgies-currency-exchange>` | Real-time currency rates | – |
|
|
51
|
+
| `<widgies-color-palette>` | Color picker and palette tool | – |
|
|
52
|
+
| `<widgies-dad-jokes>` | Random dad joke generator | – |
|
|
53
|
+
| `<widgies-magic-8-ball>` | Classic Magic 8-Ball | – |
|
|
54
|
+
| `<widgies-fortune-cookie>` | Virtual fortune cookies | – |
|
|
55
|
+
| `<widgies-random-image>` | Curated random images | – |
|
|
56
|
+
| `<widgies-tiny-planet>` | Animated planet visualization | – |
|
|
57
|
+
|
|
58
|
+
📖 **[Complete Widgets Reference →](docs/widgets-reference.md)**
|
|
59
|
+
|
|
60
|
+
All widgets share **theme tokens**, **focus rings**, and **ARIA roles**. Bundle size ≈15 kB gzipped.
|
|
51
61
|
|
|
52
62
|
## Installation
|
|
53
63
|
|
|
@@ -63,13 +73,22 @@ import 'widgies';
|
|
|
63
73
|
import 'widgies/calculator';
|
|
64
74
|
import 'widgies/timer';
|
|
65
75
|
import 'widgies/random-number';
|
|
76
|
+
import 'widgies/qr-code';
|
|
66
77
|
import 'widgies/affirmation';
|
|
67
78
|
import 'widgies/ambient';
|
|
68
|
-
import 'widgies/
|
|
79
|
+
import 'widgies/unit-converter';
|
|
80
|
+
import 'widgies/currency-exchange';
|
|
81
|
+
import 'widgies/color-palette';
|
|
82
|
+
import 'widgies/dad-jokes';
|
|
83
|
+
import 'widgies/magic-8-ball';
|
|
84
|
+
import 'widgies/fortune-cookie';
|
|
85
|
+
import 'widgies/random-image';
|
|
86
|
+
import 'widgies/tiny-planet';
|
|
69
87
|
|
|
70
88
|
// Option 3: Import widget classes for manual registration
|
|
71
|
-
import { CalculatorWidget } from 'widgies';
|
|
89
|
+
import { CalculatorWidget, TimerWidget } from 'widgies';
|
|
72
90
|
CalculatorWidget.register();
|
|
91
|
+
TimerWidget.register();
|
|
73
92
|
```
|
|
74
93
|
|
|
75
94
|
Or via CDN:
|
package/dist/affirmation.js
CHANGED
|
@@ -12,8 +12,10 @@ import{a as r}from"./chunk-3F3FJ7VN.js";var i=class extends r{constructor(){supe
|
|
|
12
12
|
${this.getBaseStyles()}
|
|
13
13
|
|
|
14
14
|
.affirmation {
|
|
15
|
-
width:
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
width: 100%;
|
|
16
17
|
text-align: center;
|
|
18
|
+
box-sizing: border-box;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
.display {
|
package/dist/affirmation.min.js
CHANGED
|
@@ -12,8 +12,10 @@ import{a as r}from"./chunk-BP7C5X5K.min.js";var i=class extends r{constructor(){
|
|
|
12
12
|
${this.getBaseStyles()}
|
|
13
13
|
|
|
14
14
|
.affirmation {
|
|
15
|
-
width:
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
width: 100%;
|
|
16
17
|
text-align: center;
|
|
18
|
+
box-sizing: border-box;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
.display {
|
package/dist/calculator.js
CHANGED
|
@@ -25,7 +25,7 @@ import{a as i}from"./chunk-3F3FJ7VN.js";var e=class extends i{constructor(){supe
|
|
|
25
25
|
<button class="btn number" data-action="input" data-number=".">.</button>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
`,this.shadow.appendChild(a),this.display=this.shadow.querySelector(".display")}attachEventListeners(){this.shadow.addEventListener("click",t=>{let a=t.target;if(!a.matches("button"))return;let r=a.dataset.action,n=a.dataset.number,o=a.dataset.operator;switch(r){case"input":this.inputNumber(n);break;case"operator":this.inputOperator(o);break;case"calculate":this.calculate();break;case"clear":this.clear();break}})}inputNumber(t){this.waitingForOperand?(this.currentValue=t,this.waitingForOperand=!1):this.currentValue=this.currentValue==="0"?t:this.currentValue+t,this.updateDisplay()}inputOperator(t){let a=parseFloat(this.currentValue);if(this.previousValue==="")this.previousValue=this.currentValue;else if(this.operator){let r=this.performCalculation();this.currentValue=String(r),this.previousValue=this.currentValue,this.updateDisplay()}this.waitingForOperand=!0,this.operator=t}calculate(){if(this.previousValue!==""&&this.operator){let t=this.performCalculation();this.currentValue=String(t),this.previousValue="",this.operator="",this.waitingForOperand=!0,this.updateDisplay()}}performCalculation(){let t=parseFloat(this.previousValue),a=parseFloat(this.currentValue);switch(this.operator){case"+":return t+a;case"-":return t-a;case"*":return t*a;case"/":return a!==0?t/a:0;default:return a}}clear(){this.currentValue="0",this.previousValue="",this.operator="",this.waitingForOperand=!1,this.updateDisplay()}updateDisplay(){this.display&&(this.display.textContent=this.currentValue)}getStyles(){return`
|
|
28
|
+
`,this.shadow.appendChild(a),this.display=this.shadow.querySelector(".display")}attachEventListeners(){this.shadow.addEventListener("click",t=>{let a=t.target;if(!a.matches("button"))return;let r=a.dataset.action,n=a.dataset.number,o=a.dataset.operator;switch(r){case"input":this.inputNumber(n);break;case"operator":this.inputOperator(o);break;case"calculate":this.calculate();break;case"clear":this.clear();break}})}inputNumber(t){this.waitingForOperand?(this.currentValue=t,this.waitingForOperand=!1):this.currentValue=this.currentValue==="0"?t:this.currentValue+t,this.updateDisplay()}inputOperator(t){this.showOperatorFeedback(t);let a=parseFloat(this.currentValue);if(this.previousValue==="")this.previousValue=this.currentValue;else if(this.operator){let r=this.performCalculation();this.currentValue=String(r),this.previousValue=this.currentValue,this.updateDisplay()}this.waitingForOperand=!0,this.operator=t}calculate(){if(this.previousValue!==""&&this.operator){let t=this.performCalculation();this.currentValue=String(t),this.previousValue="",this.operator="",this.waitingForOperand=!0,this.updateDisplay()}}performCalculation(){let t=parseFloat(this.previousValue),a=parseFloat(this.currentValue);switch(this.operator){case"+":return t+a;case"-":return t-a;case"*":return t*a;case"/":return a!==0?t/a:0;default:return a}}clear(){this.currentValue="0",this.previousValue="",this.operator="",this.waitingForOperand=!1,this.updateDisplay()}updateDisplay(){this.display&&(this.display.textContent=this.currentValue)}showOperatorFeedback(t){let a=this.shadow.querySelector(`[data-operator="${t}"]`);a&&(a.classList.add("pressed"),setTimeout(()=>{a.classList.remove("pressed")},150))}getStyles(){return`
|
|
29
29
|
${this.getBaseStyles()}
|
|
30
30
|
|
|
31
31
|
.calculator {
|
|
@@ -63,6 +63,13 @@ import{a as i}from"./chunk-3F3FJ7VN.js";var e=class extends i{constructor(){supe
|
|
|
63
63
|
|
|
64
64
|
.btn.operator {
|
|
65
65
|
background: color-mix(in srgb, var(--widgies-accent, var(--widgies-accent-light, #6c4cff)) 80%, black);
|
|
66
|
+
transition: all 0.1s ease;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.btn.operator.pressed {
|
|
70
|
+
background: var(--widgies-accent, var(--widgies-accent-light, #6c4cff));
|
|
71
|
+
transform: scale(0.95);
|
|
72
|
+
box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
.btn.equals {
|
|
@@ -85,6 +92,10 @@ import{a as i}from"./chunk-3F3FJ7VN.js";var e=class extends i{constructor(){supe
|
|
|
85
92
|
background: color-mix(in srgb, var(--widgies-accent, var(--widgies-accent-dark, #a88bff)) 80%, white);
|
|
86
93
|
}
|
|
87
94
|
|
|
95
|
+
.btn.operator.pressed {
|
|
96
|
+
background: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
|
|
97
|
+
}
|
|
98
|
+
|
|
88
99
|
.btn.equals {
|
|
89
100
|
background: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
|
|
90
101
|
}
|
package/dist/calculator.min.js
CHANGED
|
@@ -25,7 +25,7 @@ import{a as i}from"./chunk-BP7C5X5K.min.js";var e=class extends i{constructor(){
|
|
|
25
25
|
<button class="btn number" data-action="input" data-number=".">.</button>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
`,this.shadow.appendChild(a),this.display=this.shadow.querySelector(".display")}attachEventListeners(){this.shadow.addEventListener("click",t=>{let a=t.target;if(!a.matches("button"))return;let r=a.dataset.action,n=a.dataset.number,o=a.dataset.operator;switch(r){case"input":this.inputNumber(n);break;case"operator":this.inputOperator(o);break;case"calculate":this.calculate();break;case"clear":this.clear();break}})}inputNumber(t){this.waitingForOperand?(this.currentValue=t,this.waitingForOperand=!1):this.currentValue=this.currentValue==="0"?t:this.currentValue+t,this.updateDisplay()}inputOperator(t){let a=parseFloat(this.currentValue);if(this.previousValue==="")this.previousValue=this.currentValue;else if(this.operator){let r=this.performCalculation();this.currentValue=String(r),this.previousValue=this.currentValue,this.updateDisplay()}this.waitingForOperand=!0,this.operator=t}calculate(){if(this.previousValue!==""&&this.operator){let t=this.performCalculation();this.currentValue=String(t),this.previousValue="",this.operator="",this.waitingForOperand=!0,this.updateDisplay()}}performCalculation(){let t=parseFloat(this.previousValue),a=parseFloat(this.currentValue);switch(this.operator){case"+":return t+a;case"-":return t-a;case"*":return t*a;case"/":return a!==0?t/a:0;default:return a}}clear(){this.currentValue="0",this.previousValue="",this.operator="",this.waitingForOperand=!1,this.updateDisplay()}updateDisplay(){this.display&&(this.display.textContent=this.currentValue)}getStyles(){return`
|
|
28
|
+
`,this.shadow.appendChild(a),this.display=this.shadow.querySelector(".display")}attachEventListeners(){this.shadow.addEventListener("click",t=>{let a=t.target;if(!a.matches("button"))return;let r=a.dataset.action,n=a.dataset.number,o=a.dataset.operator;switch(r){case"input":this.inputNumber(n);break;case"operator":this.inputOperator(o);break;case"calculate":this.calculate();break;case"clear":this.clear();break}})}inputNumber(t){this.waitingForOperand?(this.currentValue=t,this.waitingForOperand=!1):this.currentValue=this.currentValue==="0"?t:this.currentValue+t,this.updateDisplay()}inputOperator(t){this.showOperatorFeedback(t);let a=parseFloat(this.currentValue);if(this.previousValue==="")this.previousValue=this.currentValue;else if(this.operator){let r=this.performCalculation();this.currentValue=String(r),this.previousValue=this.currentValue,this.updateDisplay()}this.waitingForOperand=!0,this.operator=t}calculate(){if(this.previousValue!==""&&this.operator){let t=this.performCalculation();this.currentValue=String(t),this.previousValue="",this.operator="",this.waitingForOperand=!0,this.updateDisplay()}}performCalculation(){let t=parseFloat(this.previousValue),a=parseFloat(this.currentValue);switch(this.operator){case"+":return t+a;case"-":return t-a;case"*":return t*a;case"/":return a!==0?t/a:0;default:return a}}clear(){this.currentValue="0",this.previousValue="",this.operator="",this.waitingForOperand=!1,this.updateDisplay()}updateDisplay(){this.display&&(this.display.textContent=this.currentValue)}showOperatorFeedback(t){let a=this.shadow.querySelector(`[data-operator="${t}"]`);a&&(a.classList.add("pressed"),setTimeout(()=>{a.classList.remove("pressed")},150))}getStyles(){return`
|
|
29
29
|
${this.getBaseStyles()}
|
|
30
30
|
|
|
31
31
|
.calculator {
|
|
@@ -63,6 +63,13 @@ import{a as i}from"./chunk-BP7C5X5K.min.js";var e=class extends i{constructor(){
|
|
|
63
63
|
|
|
64
64
|
.btn.operator {
|
|
65
65
|
background: color-mix(in srgb, var(--widgies-accent, var(--widgies-accent-light, #6c4cff)) 80%, black);
|
|
66
|
+
transition: all 0.1s ease;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.btn.operator.pressed {
|
|
70
|
+
background: var(--widgies-accent, var(--widgies-accent-light, #6c4cff));
|
|
71
|
+
transform: scale(0.95);
|
|
72
|
+
box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
.btn.equals {
|
|
@@ -85,6 +92,10 @@ import{a as i}from"./chunk-BP7C5X5K.min.js";var e=class extends i{constructor(){
|
|
|
85
92
|
background: color-mix(in srgb, var(--widgies-accent, var(--widgies-accent-dark, #a88bff)) 80%, white);
|
|
86
93
|
}
|
|
87
94
|
|
|
95
|
+
.btn.operator.pressed {
|
|
96
|
+
background: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
|
|
97
|
+
}
|
|
98
|
+
|
|
88
99
|
.btn.equals {
|
|
89
100
|
background: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
|
|
90
101
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,12 @@ export { TimerWidget } from './widgets/timer.js';
|
|
|
5
5
|
export { AffirmationWidget } from './widgets/affirmation.js';
|
|
6
6
|
export { AmbientWidget } from './widgets/ambient.js';
|
|
7
7
|
export { QRCodeWidget } from './widgets/qr-code.js';
|
|
8
|
+
export { FortuneCookieWidget } from './widgets/fortune-cookie.js';
|
|
9
|
+
export { TinyPlanetWidget } from './widgets/tiny-planet.js';
|
|
10
|
+
export { Magic8BallWidget } from './widgets/magic-8-ball.js';
|
|
11
|
+
export { UnitConverterWidget } from './widgets/unit-converter.js';
|
|
12
|
+
export { CurrencyExchangeWidget } from './widgets/currency-exchange.js';
|
|
13
|
+
export { RandomImageWidget } from './widgets/random-image.js';
|
|
14
|
+
export { ColorPaletteWidget } from './widgets/color-palette.js';
|
|
15
|
+
export { DadJokesWidget } from './widgets/dad-jokes.js';
|
|
8
16
|
export declare function registerAllWidgets(): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class ColorPaletteWidget extends BaseWidget {
|
|
3
|
+
private palette;
|
|
4
|
+
private currentRed;
|
|
5
|
+
private currentGreen;
|
|
6
|
+
private currentBlue;
|
|
7
|
+
private presets;
|
|
8
|
+
protected render(): void;
|
|
9
|
+
private renderManualMode;
|
|
10
|
+
protected attachEventListeners(): void;
|
|
11
|
+
private updateSliderDisplay;
|
|
12
|
+
private addCurrentColor;
|
|
13
|
+
private randomizeRGB;
|
|
14
|
+
private loadPreset;
|
|
15
|
+
private clearPalette;
|
|
16
|
+
private copyColor;
|
|
17
|
+
private showCopyFeedback;
|
|
18
|
+
private copyAllColors;
|
|
19
|
+
private hexToRgb;
|
|
20
|
+
private rgbToHex;
|
|
21
|
+
private hexToHsl;
|
|
22
|
+
private hslToHex;
|
|
23
|
+
protected getStyles(): string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class CurrencyExchangeWidget extends BaseWidget {
|
|
3
|
+
private currencies;
|
|
4
|
+
private fromCurrency;
|
|
5
|
+
private toCurrency;
|
|
6
|
+
private amount;
|
|
7
|
+
private exchangeRate;
|
|
8
|
+
private convertedAmount;
|
|
9
|
+
private isLoading;
|
|
10
|
+
private lastUpdated;
|
|
11
|
+
private errorMessage;
|
|
12
|
+
protected render(): void;
|
|
13
|
+
protected attachEventListeners(): void;
|
|
14
|
+
connectedCallback(): void;
|
|
15
|
+
private getCurrencyOptions;
|
|
16
|
+
private fetchExchangeRate;
|
|
17
|
+
private getMockRate;
|
|
18
|
+
private updateConversion;
|
|
19
|
+
protected getStyles(): string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class DadJokesWidget extends BaseWidget {
|
|
3
|
+
private display;
|
|
4
|
+
private newButton;
|
|
5
|
+
private currentJoke;
|
|
6
|
+
private isLoading;
|
|
7
|
+
protected render(): void;
|
|
8
|
+
protected attachEventListeners(): void;
|
|
9
|
+
private fetchNewJoke;
|
|
10
|
+
private showNewJoke;
|
|
11
|
+
private updateButton;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
protected getStyles(): string;
|
|
14
|
+
}
|
|
15
|
+
export declare function register(): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class FortuneCookieWidget extends BaseWidget {
|
|
3
|
+
private fortunes;
|
|
4
|
+
private currentFortune;
|
|
5
|
+
private isOpen;
|
|
6
|
+
protected render(): void;
|
|
7
|
+
protected attachEventListeners(): void;
|
|
8
|
+
private openCookie;
|
|
9
|
+
private handleCookieClick;
|
|
10
|
+
private getNewFortune;
|
|
11
|
+
private getRandomFortune;
|
|
12
|
+
protected getStyles(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class Magic8BallWidget extends BaseWidget {
|
|
3
|
+
private responses;
|
|
4
|
+
private currentResponse;
|
|
5
|
+
private isShaking;
|
|
6
|
+
private showResponse;
|
|
7
|
+
protected render(): void;
|
|
8
|
+
protected attachEventListeners(): void;
|
|
9
|
+
private shakeBall;
|
|
10
|
+
private getRandomResponse;
|
|
11
|
+
protected getStyles(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class RandomImageWidget extends BaseWidget {
|
|
3
|
+
private imageCategories;
|
|
4
|
+
private currentCategory;
|
|
5
|
+
private currentImage;
|
|
6
|
+
private imageTitle;
|
|
7
|
+
private isLoading;
|
|
8
|
+
private errorMessage;
|
|
9
|
+
protected render(): void;
|
|
10
|
+
protected attachEventListeners(): void;
|
|
11
|
+
private loadRandomImage;
|
|
12
|
+
private testImageLoad;
|
|
13
|
+
private saveImage;
|
|
14
|
+
private shareImage;
|
|
15
|
+
private fallbackShare;
|
|
16
|
+
protected getStyles(): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class TinyPlanetWidget extends BaseWidget {
|
|
3
|
+
private places;
|
|
4
|
+
private currentPlace;
|
|
5
|
+
private imageUrl;
|
|
6
|
+
private isLoading;
|
|
7
|
+
protected render(): void;
|
|
8
|
+
protected attachEventListeners(): void;
|
|
9
|
+
private exploreNewPlace;
|
|
10
|
+
private generateSatelliteImage;
|
|
11
|
+
private testImageLoad;
|
|
12
|
+
private formatCoordinate;
|
|
13
|
+
protected getStyles(): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseWidget } from '../core/BaseWidget.js';
|
|
2
|
+
export declare class UnitConverterWidget extends BaseWidget {
|
|
3
|
+
private categories;
|
|
4
|
+
private currentCategory;
|
|
5
|
+
private fromUnit;
|
|
6
|
+
private toUnit;
|
|
7
|
+
private inputValue;
|
|
8
|
+
protected render(): void;
|
|
9
|
+
protected attachEventListeners(): void;
|
|
10
|
+
private getUnitOptions;
|
|
11
|
+
private getConvertedValue;
|
|
12
|
+
private convertTemperature;
|
|
13
|
+
private updateResult;
|
|
14
|
+
private getQuickConversions;
|
|
15
|
+
private convertValue;
|
|
16
|
+
private convertTemperatureValue;
|
|
17
|
+
protected getStyles(): string;
|
|
18
|
+
}
|