physical-quantity 1.1.40 → 1.1.44
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 +45 -19
- package/dist/pq.es.js +1 -647
- package/dist/pq.umd.js +1 -686
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Physical Quantity Web Component
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
`physical-quantity`(alias: `uc-qty` for quantity with built-in unit conversion) is a web component that allows you to create and manipulate physical quantities with different units. It provides an input for the value and a dropdown for the unit, automatically converting between units in the same category.
|
|
4
6
|
|
|
5
7
|
It is a new HTML element for expressing physical quantities, featuring self-contained unit conversion, a compact and clean UI, no redundant dual units, and seamless integration across all websites and platforms.
|
|
6
|
-

|
|
7
8
|
|
|
8
9
|
## Features
|
|
9
10
|
|
|
@@ -15,6 +16,9 @@ It is a new HTML element for expressing physical quantities, featuring self-cont
|
|
|
15
16
|
## Demo: Physical Quantity element - No Unit Converter or Dual Units Needed
|
|
16
17
|
[Live Demo](https://v2-docs.donwen.com/demo/products/quik2.html)
|
|
17
18
|
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
18
22
|
[](https://jsfiddle.net/hithere/tz8ym4fh/100/embedded/result)
|
|
19
23
|
|
|
20
24
|
[](https://jsfiddle.net/hithere/tz8ym4fh/100/embedded/result)
|
|
@@ -133,6 +137,37 @@ Currently, the component supports the following categories and units:
|
|
|
133
137
|
| Mass | kg |kilogram|
|
|
134
138
|
| | g |gram|
|
|
135
139
|
| |lbm |pound mass|
|
|
140
|
+
| Time | s[second] ||
|
|
141
|
+
| | s||
|
|
142
|
+
| | minute||
|
|
143
|
+
| | h||
|
|
144
|
+
| | h[hour]||
|
|
145
|
+
| | day||
|
|
146
|
+
| | week||
|
|
147
|
+
| ElectricalCurrent | A ||
|
|
148
|
+
| | Ampere[amp]||
|
|
149
|
+
| | mA||
|
|
150
|
+
| | µA||
|
|
151
|
+
| | kA||
|
|
152
|
+
| | MA||
|
|
153
|
+
| | esu/s ||
|
|
154
|
+
| Temperature | °K ||
|
|
155
|
+
| | °C ||
|
|
156
|
+
| | °F ||
|
|
157
|
+
| | °Ra ||
|
|
158
|
+
| Amount of Substance | mol ||
|
|
159
|
+
| | mmol ||
|
|
160
|
+
| | kmol ||
|
|
161
|
+
| Luminous Intensity | cd[candela] ||
|
|
162
|
+
| | lm/sr ||
|
|
163
|
+
| | cp[candlepower] ||
|
|
164
|
+
| | cp[candlepower(before 1948)] ||
|
|
165
|
+
| Acceleration | m/s² ||
|
|
166
|
+
| | m/min² ||
|
|
167
|
+
| | mm/s² ||
|
|
168
|
+
| | ft/s² ||
|
|
169
|
+
| | ft/min² ||
|
|
170
|
+
| | in/s² ||
|
|
136
171
|
| Pressure/Stress | Pa ||
|
|
137
172
|
| | kPa ||
|
|
138
173
|
| | MPa ||
|
|
@@ -156,24 +191,13 @@ Currently, the component supports the following categories and units:
|
|
|
156
191
|
| | g/mm³||
|
|
157
192
|
| | lbm/ft³||
|
|
158
193
|
| | lbm/in³||
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
| ElectricalCurrent | A ||
|
|
167
|
-
| | Ampere[amp]||
|
|
168
|
-
| | mA||
|
|
169
|
-
| | µA||
|
|
170
|
-
| | kA||
|
|
171
|
-
| | MA||
|
|
172
|
-
| | esu/s ||
|
|
173
|
-
| Temperature | °K ||
|
|
174
|
-
| | °C ||
|
|
175
|
-
| | °F ||
|
|
176
|
-
| | °Ra ||
|
|
194
|
+
| Force | N||
|
|
195
|
+
| | kN||
|
|
196
|
+
| | MN||
|
|
197
|
+
| | kgf||
|
|
198
|
+
| | lb||
|
|
199
|
+
| | lbf||
|
|
200
|
+
| | kip[kilo pounds]||
|
|
177
201
|
| more to update. | (feel free to send your request for other units & categories) ||
|
|
178
202
|
|
|
179
203
|
## License
|
|
@@ -185,6 +209,8 @@ Contributions are welcome! Please contact the developer for any bugs, features,
|
|
|
185
209
|
## Change Log
|
|
186
210
|
| Version | Date | Description |
|
|
187
211
|
|---|---|---|
|
|
212
|
+
| v1.1.43 |20240623| Added more categories.|
|
|
213
|
+
| v1.1.41 |20240620| Added Force category.|
|
|
188
214
|
| v1.1.40 |20240619| Added *ft-in* (ie: Foot-Inch) in Length category.|
|
|
189
215
|
| v1.1.35 |20240616| Added temperature category.|
|
|
190
216
|
| v1.1.30 |20240615| Added "show-unit-arrow" prop to allow web author to create a compact UI; Unit width is now responsive to the chosen unit; Author can force init unit.|
|