physical-quantity 1.2.2 → 1.3.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/{README.md → Readme.md} +13 -125
- package/dist/pq.es.js +3171 -1082
- package/dist/pq.umd.js +3171 -1082
- package/package.json +1 -1
package/{README.md → Readme.md}
RENAMED
|
@@ -8,7 +8,7 @@ This package introduces three custom HTML elements designed for expressing and m
|
|
|
8
8
|
|
|
9
9
|
- `<uc-qty-pair>` Represents a pair of physical quantities sharing the same unit. It displays two values and a unit dropdown, enabling simultaneous conversion of both quantities. With 2 formats, it is designed to represent 2D dimension pairs, 2D coordinates, or value ranges.
|
|
10
10
|
|
|
11
|
-
- `<uc-qty-triplet>` Designed for triplets of physical quantities with a common unit. It presents three values and a unit dropdown, facilitating synchronized conversion across all three quantities. With 2 formats, it is designed to represent 3D dimension triplets
|
|
11
|
+
- `<uc-qty-triplet>` Designed for triplets of physical quantities with a common unit. It presents three values and a unit dropdown, facilitating synchronized conversion across all three quantities. With 2 formats, it is designed to represent 3D dimension triplets and 3D coordinates.
|
|
12
12
|
|
|
13
13
|
These web components offer:
|
|
14
14
|
- Self-contained unit conversion
|
|
@@ -20,10 +20,14 @@ By leveraging these custom elements, developers can easily incorporate sophistic
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
-
|
|
23
|
+
- **570+ units across 60+ categories** — covering the most common engineering, science, and everyday measurement needs, from Length, Mass, and Temperature to Flow Rate, Viscosity, Electrical quantities, and more. See the full [Units Reference](https://calcslive.com/help/units-reference).
|
|
24
|
+
- Create a `<physical-quantity>` / `<uc-qty>`, `<uc-qty-pair>`, or `<uc-qty-triplet>` with a value and unit.
|
|
24
25
|
- Automatically convert between units within the same category.
|
|
25
|
-
- Display values with customizable decimal places
|
|
26
|
-
- Easy to integrate into any web project.
|
|
26
|
+
- Display values with customizable decimal places; integers shown without trailing decimals.
|
|
27
|
+
- Easy to integrate into any web project — no framework required.
|
|
28
|
+
|
|
29
|
+
> **Missing a unit or category?** We'd love your input!
|
|
30
|
+
> Email [don.wen@calcslive.com](mailto:don.wen@calcslive.com) with your suggestions — your feedback directly shapes the unit library.
|
|
27
31
|
|
|
28
32
|
## Demo: Physical Quantity element - No Unit Converter or Dual Units Needed
|
|
29
33
|
[Live Demo 1 - technical writing](https://v2-docs.donwen.com/fun-calculations/slingshot-stress-calculation.html)
|
|
@@ -161,126 +165,10 @@ The physical-quantity component supports the following attributes:
|
|
|
161
165
|
- <ins>_show-unit-arrow_</ins>: specify to show the downward arrow following the units list. Default to be true. When set to false, it is suitable when the author wants to show in a compact format.
|
|
162
166
|
|
|
163
167
|
### Supported Units
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
| |km |kilometer|
|
|
169
|
-
| |mm |millimeter|
|
|
170
|
-
| |cm |centimeter|
|
|
171
|
-
| |in |inch|
|
|
172
|
-
| |ft-in |foot-inch|
|
|
173
|
-
| |ft |foot|
|
|
174
|
-
| Mass | kg |kilogram|
|
|
175
|
-
| | g |gram|
|
|
176
|
-
| |lbm |pound mass|
|
|
177
|
-
| Time | s[second] ||
|
|
178
|
-
| | s||
|
|
179
|
-
| | minute||
|
|
180
|
-
| | h||
|
|
181
|
-
| | h[hour]||
|
|
182
|
-
| | day||
|
|
183
|
-
| | week||
|
|
184
|
-
| ElectricalCurrent | A ||
|
|
185
|
-
| | Ampere[amp]||
|
|
186
|
-
| | mA||
|
|
187
|
-
| | µA||
|
|
188
|
-
| | kA||
|
|
189
|
-
| | MA||
|
|
190
|
-
| | esu/s ||
|
|
191
|
-
| Temperature | °K ||
|
|
192
|
-
| | °C ||
|
|
193
|
-
| | °F ||
|
|
194
|
-
| | °Ra ||
|
|
195
|
-
| Amount of Substance | mol ||
|
|
196
|
-
| | mmol ||
|
|
197
|
-
| | kmol ||
|
|
198
|
-
| Luminous Intensity | cd[candela] ||
|
|
199
|
-
| | lm/sr ||
|
|
200
|
-
| | cp[candlepower] ||
|
|
201
|
-
| | cp[candlepower(before 1948)] ||
|
|
202
|
-
| Acceleration | m/s² ||
|
|
203
|
-
| | m/min² ||
|
|
204
|
-
| | mm/s² ||
|
|
205
|
-
| | ft/s² ||
|
|
206
|
-
| | ft/min² ||
|
|
207
|
-
| | in/s² ||
|
|
208
|
-
| Gravitational Constant | m³/kg/s² ||
|
|
209
|
-
| | N⋅m²/kg² ||
|
|
210
|
-
| | dyn⋅cm²/g² ||
|
|
211
|
-
| Velocity (Angular) | rad/s ||
|
|
212
|
-
| | rad/min ||
|
|
213
|
-
| | rad/h ||
|
|
214
|
-
| | deg°/s ||
|
|
215
|
-
| | deg°/min ||
|
|
216
|
-
| | deg°/h ||
|
|
217
|
-
| | rpm[rev/min]||
|
|
218
|
-
| | rev/s ||
|
|
219
|
-
| Pressure/Stress | Pa ||
|
|
220
|
-
| | kPa ||
|
|
221
|
-
| | MPa ||
|
|
222
|
-
| | GPa ||
|
|
223
|
-
| | bar ||
|
|
224
|
-
| | mbar||
|
|
225
|
-
| | atm||
|
|
226
|
-
| | mm HG||
|
|
227
|
-
| | cm HG||
|
|
228
|
-
| | in HG||
|
|
229
|
-
| | mm W.C.||
|
|
230
|
-
| | m W.C.||
|
|
231
|
-
| | in W.C.||
|
|
232
|
-
| | psf| pound per square foot|
|
|
233
|
-
| | psi| pound per square foot|
|
|
234
|
-
| | ksi| kilo-pound per square foot|
|
|
235
|
-
| | ksi[kip/in²]||
|
|
236
|
-
| Density | kg/m³||
|
|
237
|
-
| | kg/L||
|
|
238
|
-
| | g/cm³||
|
|
239
|
-
| | g/mm³||
|
|
240
|
-
| | lbm/ft³||
|
|
241
|
-
| | lbm/in³||
|
|
242
|
-
| Force | N||
|
|
243
|
-
| | kN||
|
|
244
|
-
| | MN||
|
|
245
|
-
| | kgf||
|
|
246
|
-
| | lb| pound weight |
|
|
247
|
-
| | lbf| pount force |
|
|
248
|
-
| | kip[kilo pounds]||
|
|
249
|
-
| Flow Rate (Volume) | m³/s ||
|
|
250
|
-
| | m³/min ||
|
|
251
|
-
| | m³/h ||
|
|
252
|
-
| | L/s ||
|
|
253
|
-
| | L/min ||
|
|
254
|
-
| | L/h ||
|
|
255
|
-
| | cm³/s ||
|
|
256
|
-
| | cm³/min ||
|
|
257
|
-
| | in³/s ||
|
|
258
|
-
| | in³/min ||
|
|
259
|
-
| | ft³/s ||
|
|
260
|
-
| | CFM ||
|
|
261
|
-
| | CFM[ft³/min] ||
|
|
262
|
-
| | CFH ||
|
|
263
|
-
| | CFH[ft³/h] ||
|
|
264
|
-
| | yd³/min ||
|
|
265
|
-
| | yd³/h ||
|
|
266
|
-
| | gpm(US) | gallons(US) per minute |
|
|
267
|
-
| | gph(US) | gallons(US) per hour |
|
|
268
|
-
| | bushel(UK-imperial)/h ||
|
|
269
|
-
| | bushel(US)/h ||
|
|
270
|
-
| Electrical Potential Difference (Voltage) | V ||
|
|
271
|
-
| | Volt ||
|
|
272
|
-
| | joule/coulomb ||
|
|
273
|
-
| | J/C ||
|
|
274
|
-
| | µV ||
|
|
275
|
-
| | mV ||
|
|
276
|
-
| | kV ||
|
|
277
|
-
| | M ||
|
|
278
|
-
| more to update. | (feel free to send your request for other units & categories) ||
|
|
279
|
-
|
|
280
|
-
**Note**:
|
|
281
|
-
- lbm, lbmass are used for mass units;
|
|
282
|
-
- lb, lbf are used for weight/force units.
|
|
283
|
-
|
|
168
|
+
For the full list of supported units and categories, see the
|
|
169
|
+
[Units Reference](https://calcslive.com/help/units-reference) on CalcsLive —
|
|
170
|
+
kept in sync with the Excel master source.
|
|
171
|
+
|
|
284
172
|
## License
|
|
285
173
|
This project is licensed under the MIT License. See the LICENSE file for more details.
|
|
286
174
|
|
|
@@ -289,7 +177,7 @@ Contributions are welcome! Please contact the developer for any bugs, features,
|
|
|
289
177
|
|
|
290
178
|
## Changelog
|
|
291
179
|
|
|
292
|
-
See
|
|
180
|
+
See `CHANGELOG.md` (included in the package) for the full version history.
|
|
293
181
|
|
|
294
182
|
## Contact
|
|
295
183
|
If you have any questions or feedback, feel free to contact me at don.wen@calcslive.com.
|