@zag-js/types 0.74.1 → 0.75.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/dist/index.d.mts +45 -41
- package/dist/index.d.ts +45 -41
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1383,43 +1383,43 @@ declare namespace JSX {
|
|
|
1383
1383
|
|
|
1384
1384
|
type Dict<T = any> = Record<string, T>;
|
|
1385
1385
|
type DataAttr = {
|
|
1386
|
-
"data-selected"?: any;
|
|
1387
|
-
"data-expanded"?: any;
|
|
1388
|
-
"data-highlighted"?: any;
|
|
1389
|
-
"data-readonly"?: any;
|
|
1390
|
-
"data-indeterminate"?: any;
|
|
1391
|
-
"data-invalid"?: any;
|
|
1392
|
-
"data-hover"?: any;
|
|
1393
|
-
"data-active"?: any;
|
|
1394
|
-
"data-focus"?: any;
|
|
1395
|
-
"data-focus-visible"?: any;
|
|
1396
|
-
"data-disabled"?: any;
|
|
1397
|
-
"data-open"?: any;
|
|
1398
|
-
"data-checked"?: any;
|
|
1399
|
-
"data-pressed"?: any;
|
|
1400
|
-
"data-complete"?: any;
|
|
1401
|
-
"data-side"?: any;
|
|
1402
|
-
"data-align"?: any;
|
|
1403
|
-
"data-empty"?: any;
|
|
1404
|
-
"data-placeholder-shown"?: any;
|
|
1405
|
-
"data-half"?: any;
|
|
1406
|
-
"data-scope"?: string;
|
|
1407
|
-
"data-uid"?: string;
|
|
1408
|
-
"data-name"?: string;
|
|
1409
|
-
"data-ownedby"?: string;
|
|
1410
|
-
"data-type"?: string;
|
|
1411
|
-
"data-valuetext"?: string;
|
|
1412
|
-
"data-placement"?: string;
|
|
1413
|
-
"data-controls"?: string;
|
|
1414
|
-
"data-part"?: string;
|
|
1415
|
-
"data-label"?: string;
|
|
1416
|
-
"data-state"?: string | null;
|
|
1417
|
-
"data-value"?: string | number;
|
|
1418
|
-
"data-orientation"?: "horizontal" | "vertical";
|
|
1419
|
-
"data-count"?: number;
|
|
1420
|
-
"data-index"?: number;
|
|
1386
|
+
"data-selected"?: any | undefined;
|
|
1387
|
+
"data-expanded"?: any | undefined;
|
|
1388
|
+
"data-highlighted"?: any | undefined;
|
|
1389
|
+
"data-readonly"?: any | undefined;
|
|
1390
|
+
"data-indeterminate"?: any | undefined;
|
|
1391
|
+
"data-invalid"?: any | undefined;
|
|
1392
|
+
"data-hover"?: any | undefined;
|
|
1393
|
+
"data-active"?: any | undefined;
|
|
1394
|
+
"data-focus"?: any | undefined;
|
|
1395
|
+
"data-focus-visible"?: any | undefined;
|
|
1396
|
+
"data-disabled"?: any | undefined;
|
|
1397
|
+
"data-open"?: any | undefined;
|
|
1398
|
+
"data-checked"?: any | undefined;
|
|
1399
|
+
"data-pressed"?: any | undefined;
|
|
1400
|
+
"data-complete"?: any | undefined;
|
|
1401
|
+
"data-side"?: any | undefined;
|
|
1402
|
+
"data-align"?: any | undefined;
|
|
1403
|
+
"data-empty"?: any | undefined;
|
|
1404
|
+
"data-placeholder-shown"?: any | undefined;
|
|
1405
|
+
"data-half"?: any | undefined;
|
|
1406
|
+
"data-scope"?: string | undefined;
|
|
1407
|
+
"data-uid"?: string | undefined;
|
|
1408
|
+
"data-name"?: string | undefined;
|
|
1409
|
+
"data-ownedby"?: string | undefined;
|
|
1410
|
+
"data-type"?: string | undefined;
|
|
1411
|
+
"data-valuetext"?: string | undefined;
|
|
1412
|
+
"data-placement"?: string | undefined;
|
|
1413
|
+
"data-controls"?: string | undefined;
|
|
1414
|
+
"data-part"?: string | undefined;
|
|
1415
|
+
"data-label"?: string | undefined;
|
|
1416
|
+
"data-state"?: string | null | undefined;
|
|
1417
|
+
"data-value"?: string | number | undefined;
|
|
1418
|
+
"data-orientation"?: "horizontal" | "vertical" | undefined;
|
|
1419
|
+
"data-count"?: number | undefined;
|
|
1420
|
+
"data-index"?: number | undefined;
|
|
1421
1421
|
} & {
|
|
1422
|
-
[key in `data-${string}`]?: any;
|
|
1422
|
+
[key in `data-${string}`]?: any | undefined;
|
|
1423
1423
|
};
|
|
1424
1424
|
type PropTypes<T = Dict> = Record<"button" | "label" | "input" | "textarea" | "img" | "output" | "element" | "select" | "rect" | "style" | "circle" | "svg" | "path", T>;
|
|
1425
1425
|
type NormalizeProps<T extends PropTypes> = {
|
|
@@ -1434,6 +1434,10 @@ type StrictKeys<K extends (keyof T)[], T> = K extends (keyof T)[] ? [keyof T] ex
|
|
|
1434
1434
|
declare const createProps: <T extends Record<never, never>>() => <K extends (keyof T)[]>(props: K & StrictKeys<K, T>) => (keyof T)[];
|
|
1435
1435
|
|
|
1436
1436
|
type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>;
|
|
1437
|
+
type NonNullable<T> = T extends null | undefined ? never : T;
|
|
1438
|
+
type Required<T> = {
|
|
1439
|
+
[P in keyof T]-?: NonNullable<T[P]>;
|
|
1440
|
+
};
|
|
1437
1441
|
type Direction = "ltr" | "rtl";
|
|
1438
1442
|
type Orientation = "horizontal" | "vertical";
|
|
1439
1443
|
type MaybeElement<T extends HTMLElement = HTMLElement> = T | null;
|
|
@@ -1442,21 +1446,21 @@ interface OrientationProperty {
|
|
|
1442
1446
|
* The orientation of the element.
|
|
1443
1447
|
* @default "horizontal"
|
|
1444
1448
|
*/
|
|
1445
|
-
orientation?: Orientation;
|
|
1449
|
+
orientation?: Orientation | undefined;
|
|
1446
1450
|
}
|
|
1447
1451
|
interface DirectionProperty {
|
|
1448
1452
|
/**
|
|
1449
1453
|
* The document's text/writing direction.
|
|
1450
1454
|
* @default "ltr"
|
|
1451
1455
|
*/
|
|
1452
|
-
dir?: "ltr" | "rtl";
|
|
1456
|
+
dir?: "ltr" | "rtl" | undefined;
|
|
1453
1457
|
}
|
|
1454
1458
|
interface LocaleProperties extends DirectionProperty {
|
|
1455
1459
|
/**
|
|
1456
1460
|
* The current locale. Based on the BCP 47 definition.
|
|
1457
1461
|
* @default "en-US"
|
|
1458
1462
|
*/
|
|
1459
|
-
locale?: string;
|
|
1463
|
+
locale?: string | undefined;
|
|
1460
1464
|
}
|
|
1461
1465
|
interface CommonProperties {
|
|
1462
1466
|
/**
|
|
@@ -1466,8 +1470,8 @@ interface CommonProperties {
|
|
|
1466
1470
|
/**
|
|
1467
1471
|
* A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.
|
|
1468
1472
|
*/
|
|
1469
|
-
getRootNode?: () => ShadowRoot | Document | Node;
|
|
1473
|
+
getRootNode?: (() => ShadowRoot | Document | Node) | undefined;
|
|
1470
1474
|
}
|
|
1471
1475
|
type Style = JSX.CSSProperties;
|
|
1472
1476
|
|
|
1473
|
-
export { type CommonProperties, type Direction, type DirectionProperty, JSX, type LocaleProperties, type MaybeElement, type NormalizeProps, type Orientation, type OrientationProperty, type PropTypes, type RequiredBy, type Style, createNormalizer, createProps };
|
|
1477
|
+
export { type CommonProperties, type Direction, type DirectionProperty, JSX, type LocaleProperties, type MaybeElement, type NonNullable, type NormalizeProps, type Orientation, type OrientationProperty, type PropTypes, type Required, type RequiredBy, type Style, createNormalizer, createProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1383,43 +1383,43 @@ declare namespace JSX {
|
|
|
1383
1383
|
|
|
1384
1384
|
type Dict<T = any> = Record<string, T>;
|
|
1385
1385
|
type DataAttr = {
|
|
1386
|
-
"data-selected"?: any;
|
|
1387
|
-
"data-expanded"?: any;
|
|
1388
|
-
"data-highlighted"?: any;
|
|
1389
|
-
"data-readonly"?: any;
|
|
1390
|
-
"data-indeterminate"?: any;
|
|
1391
|
-
"data-invalid"?: any;
|
|
1392
|
-
"data-hover"?: any;
|
|
1393
|
-
"data-active"?: any;
|
|
1394
|
-
"data-focus"?: any;
|
|
1395
|
-
"data-focus-visible"?: any;
|
|
1396
|
-
"data-disabled"?: any;
|
|
1397
|
-
"data-open"?: any;
|
|
1398
|
-
"data-checked"?: any;
|
|
1399
|
-
"data-pressed"?: any;
|
|
1400
|
-
"data-complete"?: any;
|
|
1401
|
-
"data-side"?: any;
|
|
1402
|
-
"data-align"?: any;
|
|
1403
|
-
"data-empty"?: any;
|
|
1404
|
-
"data-placeholder-shown"?: any;
|
|
1405
|
-
"data-half"?: any;
|
|
1406
|
-
"data-scope"?: string;
|
|
1407
|
-
"data-uid"?: string;
|
|
1408
|
-
"data-name"?: string;
|
|
1409
|
-
"data-ownedby"?: string;
|
|
1410
|
-
"data-type"?: string;
|
|
1411
|
-
"data-valuetext"?: string;
|
|
1412
|
-
"data-placement"?: string;
|
|
1413
|
-
"data-controls"?: string;
|
|
1414
|
-
"data-part"?: string;
|
|
1415
|
-
"data-label"?: string;
|
|
1416
|
-
"data-state"?: string | null;
|
|
1417
|
-
"data-value"?: string | number;
|
|
1418
|
-
"data-orientation"?: "horizontal" | "vertical";
|
|
1419
|
-
"data-count"?: number;
|
|
1420
|
-
"data-index"?: number;
|
|
1386
|
+
"data-selected"?: any | undefined;
|
|
1387
|
+
"data-expanded"?: any | undefined;
|
|
1388
|
+
"data-highlighted"?: any | undefined;
|
|
1389
|
+
"data-readonly"?: any | undefined;
|
|
1390
|
+
"data-indeterminate"?: any | undefined;
|
|
1391
|
+
"data-invalid"?: any | undefined;
|
|
1392
|
+
"data-hover"?: any | undefined;
|
|
1393
|
+
"data-active"?: any | undefined;
|
|
1394
|
+
"data-focus"?: any | undefined;
|
|
1395
|
+
"data-focus-visible"?: any | undefined;
|
|
1396
|
+
"data-disabled"?: any | undefined;
|
|
1397
|
+
"data-open"?: any | undefined;
|
|
1398
|
+
"data-checked"?: any | undefined;
|
|
1399
|
+
"data-pressed"?: any | undefined;
|
|
1400
|
+
"data-complete"?: any | undefined;
|
|
1401
|
+
"data-side"?: any | undefined;
|
|
1402
|
+
"data-align"?: any | undefined;
|
|
1403
|
+
"data-empty"?: any | undefined;
|
|
1404
|
+
"data-placeholder-shown"?: any | undefined;
|
|
1405
|
+
"data-half"?: any | undefined;
|
|
1406
|
+
"data-scope"?: string | undefined;
|
|
1407
|
+
"data-uid"?: string | undefined;
|
|
1408
|
+
"data-name"?: string | undefined;
|
|
1409
|
+
"data-ownedby"?: string | undefined;
|
|
1410
|
+
"data-type"?: string | undefined;
|
|
1411
|
+
"data-valuetext"?: string | undefined;
|
|
1412
|
+
"data-placement"?: string | undefined;
|
|
1413
|
+
"data-controls"?: string | undefined;
|
|
1414
|
+
"data-part"?: string | undefined;
|
|
1415
|
+
"data-label"?: string | undefined;
|
|
1416
|
+
"data-state"?: string | null | undefined;
|
|
1417
|
+
"data-value"?: string | number | undefined;
|
|
1418
|
+
"data-orientation"?: "horizontal" | "vertical" | undefined;
|
|
1419
|
+
"data-count"?: number | undefined;
|
|
1420
|
+
"data-index"?: number | undefined;
|
|
1421
1421
|
} & {
|
|
1422
|
-
[key in `data-${string}`]?: any;
|
|
1422
|
+
[key in `data-${string}`]?: any | undefined;
|
|
1423
1423
|
};
|
|
1424
1424
|
type PropTypes<T = Dict> = Record<"button" | "label" | "input" | "textarea" | "img" | "output" | "element" | "select" | "rect" | "style" | "circle" | "svg" | "path", T>;
|
|
1425
1425
|
type NormalizeProps<T extends PropTypes> = {
|
|
@@ -1434,6 +1434,10 @@ type StrictKeys<K extends (keyof T)[], T> = K extends (keyof T)[] ? [keyof T] ex
|
|
|
1434
1434
|
declare const createProps: <T extends Record<never, never>>() => <K extends (keyof T)[]>(props: K & StrictKeys<K, T>) => (keyof T)[];
|
|
1435
1435
|
|
|
1436
1436
|
type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>;
|
|
1437
|
+
type NonNullable<T> = T extends null | undefined ? never : T;
|
|
1438
|
+
type Required<T> = {
|
|
1439
|
+
[P in keyof T]-?: NonNullable<T[P]>;
|
|
1440
|
+
};
|
|
1437
1441
|
type Direction = "ltr" | "rtl";
|
|
1438
1442
|
type Orientation = "horizontal" | "vertical";
|
|
1439
1443
|
type MaybeElement<T extends HTMLElement = HTMLElement> = T | null;
|
|
@@ -1442,21 +1446,21 @@ interface OrientationProperty {
|
|
|
1442
1446
|
* The orientation of the element.
|
|
1443
1447
|
* @default "horizontal"
|
|
1444
1448
|
*/
|
|
1445
|
-
orientation?: Orientation;
|
|
1449
|
+
orientation?: Orientation | undefined;
|
|
1446
1450
|
}
|
|
1447
1451
|
interface DirectionProperty {
|
|
1448
1452
|
/**
|
|
1449
1453
|
* The document's text/writing direction.
|
|
1450
1454
|
* @default "ltr"
|
|
1451
1455
|
*/
|
|
1452
|
-
dir?: "ltr" | "rtl";
|
|
1456
|
+
dir?: "ltr" | "rtl" | undefined;
|
|
1453
1457
|
}
|
|
1454
1458
|
interface LocaleProperties extends DirectionProperty {
|
|
1455
1459
|
/**
|
|
1456
1460
|
* The current locale. Based on the BCP 47 definition.
|
|
1457
1461
|
* @default "en-US"
|
|
1458
1462
|
*/
|
|
1459
|
-
locale?: string;
|
|
1463
|
+
locale?: string | undefined;
|
|
1460
1464
|
}
|
|
1461
1465
|
interface CommonProperties {
|
|
1462
1466
|
/**
|
|
@@ -1466,8 +1470,8 @@ interface CommonProperties {
|
|
|
1466
1470
|
/**
|
|
1467
1471
|
* A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.
|
|
1468
1472
|
*/
|
|
1469
|
-
getRootNode?: () => ShadowRoot | Document | Node;
|
|
1473
|
+
getRootNode?: (() => ShadowRoot | Document | Node) | undefined;
|
|
1470
1474
|
}
|
|
1471
1475
|
type Style = JSX.CSSProperties;
|
|
1472
1476
|
|
|
1473
|
-
export { type CommonProperties, type Direction, type DirectionProperty, JSX, type LocaleProperties, type MaybeElement, type NormalizeProps, type Orientation, type OrientationProperty, type PropTypes, type RequiredBy, type Style, createNormalizer, createProps };
|
|
1477
|
+
export { type CommonProperties, type Direction, type DirectionProperty, JSX, type LocaleProperties, type MaybeElement, type NonNullable, type NormalizeProps, type Orientation, type OrientationProperty, type PropTypes, type Required, type RequiredBy, type Style, createNormalizer, createProps };
|