@zag-js/types 0.3.2 → 0.3.4

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/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from './jsx.js';
2
- export { JSX } from './jsx.js';
3
2
  export { NormalizeProps, PropTypes, createNormalizer } from './prop-types.js';
4
3
  import 'csstype';
5
4
 
@@ -41,4 +40,4 @@ type RootProperties = {
41
40
  type Context<T> = T & RootProperties;
42
41
  type Style = JSX.CSSProperties;
43
42
 
44
- export { CommonProperties, Context, Direction, DirectionProperty, MaybeElement, Orientation, RequiredBy, RootProperties, Style };
43
+ export { CommonProperties, Context, Direction, DirectionProperty, JSX, MaybeElement, Orientation, RequiredBy, RootProperties, Style };
@@ -36,12 +36,15 @@ type DataAttr = {
36
36
  "data-orientation"?: "horizontal" | "vertical";
37
37
  "data-count"?: number;
38
38
  "data-index"?: number;
39
+ } & {
40
+ [key in `data-${string}`]?: string | number | Booleanish;
39
41
  };
40
- type PropTypes = Record<"button" | "label" | "input" | "output" | "element" | "select", Dict>;
42
+ type PropTypes = Record<"button" | "label" | "input" | "output" | "element" | "select" | "style", Dict>;
41
43
  type NormalizeProps<T extends PropTypes> = {
42
44
  [K in keyof T]: (props: K extends keyof JSX.IntrinsicElements ? DataAttr & JSX.IntrinsicElements[K] : never) => T[K];
43
45
  } & {
44
46
  element(props: DataAttr & JSX.HTMLAttributes<HTMLElement>): T["element"];
47
+ style: JSX.CSSProperties;
45
48
  };
46
49
  declare function createNormalizer<T extends PropTypes>(fn: (props: Dict) => Dict): NormalizeProps<T>;
47
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/types",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "keywords": [
5
5
  "js",
6
6
  "utils",