@zuzjs/ui 1.0.38 → 1.0.40
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/bin.cjs +4 -4
- package/dist/bin.js +1 -1
- package/dist/chunk-NG5H4LFA.js +6 -0
- package/dist/chunk-XKEI337X.cjs +7 -0
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +19 -5
- package/dist/index.d.ts +19 -5
- package/dist/index.js +7 -7
- package/package.json +3 -3
- package/dist/chunk-ENPJNNOH.cjs +0 -7
- package/dist/chunk-ROHXB5GF.js +0 -6
package/dist/index.d.cts
CHANGED
|
@@ -593,9 +593,13 @@ declare const CheckBox: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<rea
|
|
|
593
593
|
interface CodeBlockProps extends ZuzProps {
|
|
594
594
|
ref?: Ref<HTMLPreElement>;
|
|
595
595
|
code: string;
|
|
596
|
-
lang?: 'typescript' | 'javascript' | 'tsx' | 'css' | 'json';
|
|
596
|
+
lang?: `plain` | 'typescript' | 'javascript' | 'tsx' | 'css' | 'json';
|
|
597
597
|
showLines?: boolean;
|
|
598
598
|
highlight?: string;
|
|
599
|
+
copy?: {
|
|
600
|
+
onCopy?: () => void;
|
|
601
|
+
icon?: string;
|
|
602
|
+
};
|
|
599
603
|
}
|
|
600
604
|
|
|
601
605
|
declare const CodeBlock: ({ ref, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1055,6 +1059,7 @@ type IconProps = Omit<BoxProps, `name`> & {
|
|
|
1055
1059
|
pathCount?: number;
|
|
1056
1060
|
variant?: ValueOf<typeof Variant>;
|
|
1057
1061
|
color?: string;
|
|
1062
|
+
size?: number;
|
|
1058
1063
|
};
|
|
1059
1064
|
|
|
1060
1065
|
declare const Icon: react.ForwardRefExoticComponent<Omit<IconProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1350,12 +1355,12 @@ interface SelectHandler {
|
|
|
1350
1355
|
* Programmatically sets the selected option.
|
|
1351
1356
|
* @param option - The option object or value string to select.
|
|
1352
1357
|
*/
|
|
1353
|
-
setSelected: (option: Option | string) => void;
|
|
1358
|
+
setSelected: (option: Option | string | Option[] | string[]) => void;
|
|
1354
1359
|
/**
|
|
1355
1360
|
* Retrieves the currently selected option object.
|
|
1356
1361
|
* @returns The selected Option or null if nothing is selected.
|
|
1357
1362
|
*/
|
|
1358
|
-
getValue: () => Option | null;
|
|
1363
|
+
getValue: () => Option | Option[] | null;
|
|
1359
1364
|
}
|
|
1360
1365
|
/**
|
|
1361
1366
|
* Represents an individual option within the Select component.
|
|
@@ -1368,7 +1373,9 @@ type Option = {
|
|
|
1368
1373
|
/** The display text for the option. */
|
|
1369
1374
|
label: string;
|
|
1370
1375
|
/** The underlying value for the option. */
|
|
1371
|
-
value: string;
|
|
1376
|
+
value: string | number;
|
|
1377
|
+
/** Optional flag to disable this specific option. */
|
|
1378
|
+
disabled?: boolean;
|
|
1372
1379
|
};
|
|
1373
1380
|
/**
|
|
1374
1381
|
* Represents an option object with a label and value.
|
|
@@ -1377,7 +1384,8 @@ type Value = FormEventHandler<HTMLDivElement> & Option;
|
|
|
1377
1384
|
interface OptionItemProps {
|
|
1378
1385
|
updateValue: (o: Option) => void;
|
|
1379
1386
|
o: Option;
|
|
1380
|
-
|
|
1387
|
+
selected?: boolean;
|
|
1388
|
+
checkIcon?: string | ReactNode;
|
|
1381
1389
|
}
|
|
1382
1390
|
/**
|
|
1383
1391
|
* Props for the Select component.
|
|
@@ -1440,6 +1448,12 @@ type SelectProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
|
1440
1448
|
maxHeight?: number;
|
|
1441
1449
|
arrowDownIcon?: string | ReactNode;
|
|
1442
1450
|
arrowUpIcon?: string | ReactNode;
|
|
1451
|
+
disabled?: boolean;
|
|
1452
|
+
multiple?: boolean;
|
|
1453
|
+
tokenizer?: boolean;
|
|
1454
|
+
wrapTokens?: boolean;
|
|
1455
|
+
checkIcon?: string | ReactNode;
|
|
1456
|
+
closeIcon?: string | ReactNode;
|
|
1443
1457
|
};
|
|
1444
1458
|
|
|
1445
1459
|
declare const Select: {
|
package/dist/index.d.ts
CHANGED
|
@@ -593,9 +593,13 @@ declare const CheckBox: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<rea
|
|
|
593
593
|
interface CodeBlockProps extends ZuzProps {
|
|
594
594
|
ref?: Ref<HTMLPreElement>;
|
|
595
595
|
code: string;
|
|
596
|
-
lang?: 'typescript' | 'javascript' | 'tsx' | 'css' | 'json';
|
|
596
|
+
lang?: `plain` | 'typescript' | 'javascript' | 'tsx' | 'css' | 'json';
|
|
597
597
|
showLines?: boolean;
|
|
598
598
|
highlight?: string;
|
|
599
|
+
copy?: {
|
|
600
|
+
onCopy?: () => void;
|
|
601
|
+
icon?: string;
|
|
602
|
+
};
|
|
599
603
|
}
|
|
600
604
|
|
|
601
605
|
declare const CodeBlock: ({ ref, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1055,6 +1059,7 @@ type IconProps = Omit<BoxProps, `name`> & {
|
|
|
1055
1059
|
pathCount?: number;
|
|
1056
1060
|
variant?: ValueOf<typeof Variant>;
|
|
1057
1061
|
color?: string;
|
|
1062
|
+
size?: number;
|
|
1058
1063
|
};
|
|
1059
1064
|
|
|
1060
1065
|
declare const Icon: react.ForwardRefExoticComponent<Omit<IconProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1350,12 +1355,12 @@ interface SelectHandler {
|
|
|
1350
1355
|
* Programmatically sets the selected option.
|
|
1351
1356
|
* @param option - The option object or value string to select.
|
|
1352
1357
|
*/
|
|
1353
|
-
setSelected: (option: Option | string) => void;
|
|
1358
|
+
setSelected: (option: Option | string | Option[] | string[]) => void;
|
|
1354
1359
|
/**
|
|
1355
1360
|
* Retrieves the currently selected option object.
|
|
1356
1361
|
* @returns The selected Option or null if nothing is selected.
|
|
1357
1362
|
*/
|
|
1358
|
-
getValue: () => Option | null;
|
|
1363
|
+
getValue: () => Option | Option[] | null;
|
|
1359
1364
|
}
|
|
1360
1365
|
/**
|
|
1361
1366
|
* Represents an individual option within the Select component.
|
|
@@ -1368,7 +1373,9 @@ type Option = {
|
|
|
1368
1373
|
/** The display text for the option. */
|
|
1369
1374
|
label: string;
|
|
1370
1375
|
/** The underlying value for the option. */
|
|
1371
|
-
value: string;
|
|
1376
|
+
value: string | number;
|
|
1377
|
+
/** Optional flag to disable this specific option. */
|
|
1378
|
+
disabled?: boolean;
|
|
1372
1379
|
};
|
|
1373
1380
|
/**
|
|
1374
1381
|
* Represents an option object with a label and value.
|
|
@@ -1377,7 +1384,8 @@ type Value = FormEventHandler<HTMLDivElement> & Option;
|
|
|
1377
1384
|
interface OptionItemProps {
|
|
1378
1385
|
updateValue: (o: Option) => void;
|
|
1379
1386
|
o: Option;
|
|
1380
|
-
|
|
1387
|
+
selected?: boolean;
|
|
1388
|
+
checkIcon?: string | ReactNode;
|
|
1381
1389
|
}
|
|
1382
1390
|
/**
|
|
1383
1391
|
* Props for the Select component.
|
|
@@ -1440,6 +1448,12 @@ type SelectProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
|
1440
1448
|
maxHeight?: number;
|
|
1441
1449
|
arrowDownIcon?: string | ReactNode;
|
|
1442
1450
|
arrowUpIcon?: string | ReactNode;
|
|
1451
|
+
disabled?: boolean;
|
|
1452
|
+
multiple?: boolean;
|
|
1453
|
+
tokenizer?: boolean;
|
|
1454
|
+
wrapTokens?: boolean;
|
|
1455
|
+
checkIcon?: string | ReactNode;
|
|
1456
|
+
closeIcon?: string | ReactNode;
|
|
1443
1457
|
};
|
|
1444
1458
|
|
|
1445
1459
|
declare const Select: {
|