@ni/nimble-components 35.5.1 → 35.5.3
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/all-components-bundle.js +303 -188
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2480 -2457
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +83 -83
- package/dist/custom-elements.md +24 -24
- package/dist/esm/anchor-step/template.js +1 -0
- package/dist/esm/anchor-step/template.js.map +1 -1
- package/dist/esm/patterns/step/styles.js +29 -29
- package/dist/esm/patterns/step/styles.js.map +1 -1
- package/dist/esm/step/template.js +1 -0
- package/dist/esm/step/template.js.map +1 -1
- package/dist/esm/stepper/template.js +0 -2
- package/dist/esm/stepper/template.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/utilities/models/device-pixel-ratio.d.ts +0 -10
- package/dist/esm/utilities/models/device-pixel-ratio.js +0 -22
- package/dist/esm/utilities/models/device-pixel-ratio.js.map +0 -1
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { observable } from '@ni/fast-element';
|
|
3
|
-
/**
|
|
4
|
-
* Observable class to subscribe to changes in the page's device pixel ratio
|
|
5
|
-
* Based on: https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges/#the-less-code-and-more-flexible-js-solution
|
|
6
|
-
*/
|
|
7
|
-
class DevicePixelRatio {
|
|
8
|
-
constructor() {
|
|
9
|
-
const update = () => {
|
|
10
|
-
this.current = window.devicePixelRatio;
|
|
11
|
-
window
|
|
12
|
-
.matchMedia(`(resolution: ${this.current}x)`)
|
|
13
|
-
.addEventListener('change', update, { once: true });
|
|
14
|
-
};
|
|
15
|
-
update();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
observable
|
|
20
|
-
], DevicePixelRatio.prototype, "current", void 0);
|
|
21
|
-
export const devicePixelRatio = new DevicePixelRatio();
|
|
22
|
-
//# sourceMappingURL=device-pixel-ratio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-pixel-ratio.js","sourceRoot":"","sources":["../../../../src/utilities/models/device-pixel-ratio.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;GAGG;AACH,MAAM,gBAAgB;IAIlB;QACI,MAAM,MAAM,GAAG,GAAS,EAAE;YACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;YACvC,MAAM;iBACD,UAAU,CAAC,gBAAgB,IAAI,CAAC,OAAO,IAAI,CAAC;iBAC5C,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,CAAC,CAAC;QACF,MAAM,EAAE,CAAC;IACb,CAAC;CACJ;AAXU;IADN,UAAU;iDACa;AAa5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","sourcesContent":["import { observable } from '@ni/fast-element';\n\n/**\n * Observable class to subscribe to changes in the page's device pixel ratio\n * Based on: https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges/#the-less-code-and-more-flexible-js-solution\n */\nclass DevicePixelRatio {\n @observable\n public current!: number;\n\n public constructor() {\n const update = (): void => {\n this.current = window.devicePixelRatio;\n window\n .matchMedia(`(resolution: ${this.current}x)`)\n .addEventListener('change', update, { once: true });\n };\n update();\n }\n}\n\nexport const devicePixelRatio = new DevicePixelRatio();\n"]}
|