@ni/nimble-components 28.0.4 → 28.1.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 +2 -2
- package/dist/all-components-bundle.js +1 -1
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/unit/celsius/index.d.ts +13 -0
- package/dist/esm/unit/celsius/index.js +20 -0
- package/dist/esm/unit/celsius/index.js.map +1 -0
- package/dist/esm/unit/fahrenheit/index.d.ts +13 -0
- package/dist/esm/unit/fahrenheit/index.js +22 -0
- package/dist/esm/unit/fahrenheit/index.js.map +1 -0
- package/dist/esm/utilities/unit-format/unit-scale/celsius-unit-scale.d.ts +9 -0
- package/dist/esm/utilities/unit-format/unit-scale/celsius-unit-scale.js +18 -0
- package/dist/esm/utilities/unit-format/unit-scale/celsius-unit-scale.js.map +1 -0
- package/dist/esm/utilities/unit-format/unit-scale/fahrenheit-unit-scale.d.ts +9 -0
- package/dist/esm/utilities/unit-format/unit-scale/fahrenheit-unit-scale.js +18 -0
- package/dist/esm/utilities/unit-format/unit-scale/fahrenheit-unit-scale.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Unit } from '../base/unit';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-unit-celsius': UnitCelsius;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Element representing degrees Celsius unit
|
|
9
|
+
*/
|
|
10
|
+
export declare class UnitCelsius extends Unit {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const unitCelsiusTag = "nimble-unit-celsius";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DesignSystem } from '@microsoft/fast-foundation';
|
|
2
|
+
import { template } from '../base/template';
|
|
3
|
+
import { Unit } from '../base/unit';
|
|
4
|
+
import { celsiusUnitScale } from '../../utilities/unit-format/unit-scale/celsius-unit-scale';
|
|
5
|
+
/**
|
|
6
|
+
* Element representing degrees Celsius unit
|
|
7
|
+
*/
|
|
8
|
+
export class UnitCelsius extends Unit {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.resolvedUnitScale = celsiusUnitScale;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const nimbleUnitCelsius = UnitCelsius.compose({
|
|
15
|
+
baseName: 'unit-celsius',
|
|
16
|
+
template
|
|
17
|
+
});
|
|
18
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleUnitCelsius());
|
|
19
|
+
export const unitCelsiusTag = 'nimble-unit-celsius';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unit/celsius/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAQ7F;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,IAAI;IACjC;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC9C,CAAC;CACJ;AAED,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC;IAC1C,QAAQ,EAAE,cAAc;IACxB,QAAQ;CACX,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { template } from '../base/template';\nimport { Unit } from '../base/unit';\nimport { celsiusUnitScale } from '../../utilities/unit-format/unit-scale/celsius-unit-scale';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-unit-celsius': UnitCelsius;\n }\n}\n\n/**\n * Element representing degrees Celsius unit\n */\nexport class UnitCelsius extends Unit {\n public constructor() {\n super();\n this.resolvedUnitScale = celsiusUnitScale;\n }\n}\n\nconst nimbleUnitCelsius = UnitCelsius.compose({\n baseName: 'unit-celsius',\n template\n});\n\nDesignSystem.getOrCreate().withPrefix('nimble').register(nimbleUnitCelsius());\nexport const unitCelsiusTag = 'nimble-unit-celsius';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Unit } from '../base/unit';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-unit-fahrenheit': UnitFahrenheit;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Element representing degrees Fahrenheit unit
|
|
9
|
+
*/
|
|
10
|
+
export declare class UnitFahrenheit extends Unit {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const unitFahrenheitTag = "nimble-unit-fahrenheit";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DesignSystem } from '@microsoft/fast-foundation';
|
|
2
|
+
import { template } from '../base/template';
|
|
3
|
+
import { Unit } from '../base/unit';
|
|
4
|
+
import { fahrenheitUnitScale } from '../../utilities/unit-format/unit-scale/fahrenheit-unit-scale';
|
|
5
|
+
/**
|
|
6
|
+
* Element representing degrees Fahrenheit unit
|
|
7
|
+
*/
|
|
8
|
+
export class UnitFahrenheit extends Unit {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.resolvedUnitScale = fahrenheitUnitScale;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const nimbleUnitFahrenheit = UnitFahrenheit.compose({
|
|
15
|
+
baseName: 'unit-fahrenheit',
|
|
16
|
+
template
|
|
17
|
+
});
|
|
18
|
+
DesignSystem.getOrCreate()
|
|
19
|
+
.withPrefix('nimble')
|
|
20
|
+
.register(nimbleUnitFahrenheit());
|
|
21
|
+
export const unitFahrenheitTag = 'nimble-unit-fahrenheit';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unit/fahrenheit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AAQnG;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,IAAI;IACpC;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,iBAAiB,GAAG,mBAAmB,CAAC;IACjD,CAAC;CACJ;AAED,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,CAAC;IAChD,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ;CACX,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,wBAAwB,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { template } from '../base/template';\nimport { Unit } from '../base/unit';\nimport { fahrenheitUnitScale } from '../../utilities/unit-format/unit-scale/fahrenheit-unit-scale';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-unit-fahrenheit': UnitFahrenheit;\n }\n}\n\n/**\n * Element representing degrees Fahrenheit unit\n */\nexport class UnitFahrenheit extends Unit {\n public constructor() {\n super();\n this.resolvedUnitScale = fahrenheitUnitScale;\n }\n}\n\nconst nimbleUnitFahrenheit = UnitFahrenheit.compose({\n baseName: 'unit-fahrenheit',\n template\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleUnitFahrenheit());\nexport const unitFahrenheitTag = 'nimble-unit-fahrenheit';\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ScaledUnit } from '../scaled-unit/scaled-unit';
|
|
2
|
+
import { IntlNumberFormatScaledUnitFormat } from '../scaled-unit-format/intl-number-format-scaled-unit-format';
|
|
3
|
+
import { UnitScale } from './unit-scale';
|
|
4
|
+
const celsiusUnitScaleOptions = [[1, 'celsius', 'short']];
|
|
5
|
+
/**
|
|
6
|
+
* Degrees Celsius units
|
|
7
|
+
*/
|
|
8
|
+
class CelsiusUnitScale extends UnitScale {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(celsiusUnitScaleOptions.map(([scaleFactor, unit, unitDisplay]) => new ScaledUnit(scaleFactor, IntlNumberFormatScaledUnitFormat.createFactory({
|
|
11
|
+
style: 'unit',
|
|
12
|
+
unit,
|
|
13
|
+
unitDisplay
|
|
14
|
+
}))));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const celsiusUnitScale = new CelsiusUnitScale();
|
|
18
|
+
//# sourceMappingURL=celsius-unit-scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"celsius-unit-scale.js","sourceRoot":"","sources":["../../../../../src/utilities/unit-format/unit-scale/celsius-unit-scale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,gBAAiB,SAAQ,SAAS;IACpC;QACI,KAAK,CACD,uBAAuB,CAAC,GAAG,CACvB,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,IAAI,UAAU,CAChD,WAAW,EACX,gCAAgC,CAAC,aAAa,CAAC;YAC3C,KAAK,EAAE,MAAM;YACb,IAAI;YACJ,WAAW;SACd,CAAC,CACL,CACJ,CACJ,CAAC;IACN,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","sourcesContent":["import { ScaledUnit } from '../scaled-unit/scaled-unit';\nimport { IntlNumberFormatScaledUnitFormat } from '../scaled-unit-format/intl-number-format-scaled-unit-format';\nimport { UnitScale } from './unit-scale';\n\nconst celsiusUnitScaleOptions = [[1, 'celsius', 'short']] as const;\n\n/**\n * Degrees Celsius units\n */\nclass CelsiusUnitScale extends UnitScale {\n public constructor() {\n super(\n celsiusUnitScaleOptions.map(\n ([scaleFactor, unit, unitDisplay]) => new ScaledUnit(\n scaleFactor,\n IntlNumberFormatScaledUnitFormat.createFactory({\n style: 'unit',\n unit,\n unitDisplay\n })\n )\n )\n );\n }\n}\n\nexport const celsiusUnitScale = new CelsiusUnitScale();\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ScaledUnit } from '../scaled-unit/scaled-unit';
|
|
2
|
+
import { IntlNumberFormatScaledUnitFormat } from '../scaled-unit-format/intl-number-format-scaled-unit-format';
|
|
3
|
+
import { UnitScale } from './unit-scale';
|
|
4
|
+
const fahrenheitUnitScaleOptions = [[1, 'fahrenheit', 'short']];
|
|
5
|
+
/**
|
|
6
|
+
* Degrees Fahrenheit units
|
|
7
|
+
*/
|
|
8
|
+
class FahrenheitUnitScale extends UnitScale {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(fahrenheitUnitScaleOptions.map(([scaleFactor, unit, unitDisplay]) => new ScaledUnit(scaleFactor, IntlNumberFormatScaledUnitFormat.createFactory({
|
|
11
|
+
style: 'unit',
|
|
12
|
+
unit,
|
|
13
|
+
unitDisplay
|
|
14
|
+
}))));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const fahrenheitUnitScale = new FahrenheitUnitScale();
|
|
18
|
+
//# sourceMappingURL=fahrenheit-unit-scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fahrenheit-unit-scale.js","sourceRoot":"","sources":["../../../../../src/utilities/unit-format/unit-scale/fahrenheit-unit-scale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,0BAA0B,GAAG,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,CAAU,CAAC;AAEzE;;GAEG;AACH,MAAM,mBAAoB,SAAQ,SAAS;IACvC;QACI,KAAK,CACD,0BAA0B,CAAC,GAAG,CAC1B,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,IAAI,UAAU,CAChD,WAAW,EACX,gCAAgC,CAAC,aAAa,CAAC;YAC3C,KAAK,EAAE,MAAM;YACb,IAAI;YACJ,WAAW;SACd,CAAC,CACL,CACJ,CACJ,CAAC;IACN,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","sourcesContent":["import { ScaledUnit } from '../scaled-unit/scaled-unit';\nimport { IntlNumberFormatScaledUnitFormat } from '../scaled-unit-format/intl-number-format-scaled-unit-format';\nimport { UnitScale } from './unit-scale';\n\nconst fahrenheitUnitScaleOptions = [[1, 'fahrenheit', 'short']] as const;\n\n/**\n * Degrees Fahrenheit units\n */\nclass FahrenheitUnitScale extends UnitScale {\n public constructor() {\n super(\n fahrenheitUnitScaleOptions.map(\n ([scaleFactor, unit, unitDisplay]) => new ScaledUnit(\n scaleFactor,\n IntlNumberFormatScaledUnitFormat.createFactory({\n style: 'unit',\n unit,\n unitDisplay\n })\n )\n )\n );\n }\n}\n\nexport const fahrenheitUnitScale = new FahrenheitUnitScale();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "28.0
|
|
3
|
+
"version": "28.1.0",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@microsoft/fast-element": "^1.12.0",
|
|
67
67
|
"@microsoft/fast-foundation": "^2.49.6",
|
|
68
68
|
"@microsoft/fast-web-utilities": "^6.0.0",
|
|
69
|
-
"@ni/nimble-tokens": "^6.13.
|
|
69
|
+
"@ni/nimble-tokens": "^6.13.6",
|
|
70
70
|
"@tanstack/table-core": "^8.10.7",
|
|
71
71
|
"@tanstack/virtual-core": "^3.0.0-beta.68",
|
|
72
72
|
"@tiptap/core": "^2.2.2",
|