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.
- package/README.md +45 -45
- package/dist/components/Input/Input.interface.d.ts +1 -1
- package/dist/components/shared/responsiveScale.d.ts +31 -27
- package/dist/index.cjs +13 -13
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5042 -4985
- package/dist/shared/scale.d.ts +23 -0
- package/package.json +1 -1
- package/dist/components/Select/Select.filter.d.ts +0 -8
|
@@ -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,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 {};
|