zaravand-ui 4.2.2 → 4.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.
@@ -0,0 +1,23 @@
1
+ declare const ZUI_SCALE_CSS_VARIABLE = "--zui-scale";
2
+ type ApplyScaleOptions = {
3
+ target?: HTMLElement;
4
+ };
5
+ /**
6
+ * Sets the `--zui-scale` CSS custom property this library's components
7
+ * size themselves against (see src/index.css and shared/responsiveScale.ts).
8
+ * `scale` is a unitless multiplier of the desktop/Full-HD design size —
9
+ * `1` (the default when this is never called) renders every component at
10
+ * its fixed desktop size; a consuming app that wants this library to
11
+ * shrink/grow with the viewport computes and passes a smaller/larger
12
+ * number here (or sets the CSS variable itself, e.g. via a `clamp()` on
13
+ * `:root` — this function is a convenience over that, same relationship
14
+ * `applyTheme` has to hand-writing the theme's CSS variables).
15
+ *
16
+ * Deliberately independent of the host app's own root `font-size`/`rem`
17
+ * scaling: `rem` always resolves against the document's <html> element,
18
+ * so it can't be scoped to just this library's components, which is why
19
+ * this library stopped reading it.
20
+ */
21
+ declare function applyScale(scale: number, options?: ApplyScaleOptions): number;
22
+ export type { ApplyScaleOptions };
23
+ export { applyScale, ZUI_SCALE_CSS_VARIABLE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zaravand-ui",
3
- "version": "4.2.2",
3
+ "version": "4.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- type SelectFilterElementTypes = {
3
- group: unknown;
4
- item: unknown;
5
- separator: unknown;
6
- };
7
- export declare function filterSelectChildrenByQuery(children: React.ReactNode, query: string, elementTypes: SelectFilterElementTypes): React.ReactNode[];
8
- export {};