@locus-ui/components 0.0.12 → 0.0.15

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 CHANGED
@@ -21,6 +21,11 @@ type StringPropDef = {
21
21
  className?: string;
22
22
  cssProperty?: string;
23
23
  };
24
+ type NumberPropDef = {
25
+ type: "number";
26
+ default?: number;
27
+ required?: boolean;
28
+ };
24
29
  type ReactNodePropDef<T = React.ReactNode> = {
25
30
  type: "reactNode";
26
31
  required?: boolean;
@@ -40,6 +45,7 @@ type EnumOrStringPropDef<T extends string> = {
40
45
  required?: boolean;
41
46
  className?: string;
42
47
  dataAttr?: string;
48
+ transform?: (value: string) => string;
43
49
  };
44
50
  type ValueOrArrayPropDef<T> = {
45
51
  type: "value | array";
@@ -51,11 +57,11 @@ type FunctionPropDef<T extends (...args: any[]) => any = (...args: any[]) => any
51
57
  type: "function";
52
58
  required?: boolean;
53
59
  };
54
- type BasePropDef<T = any> = BooleanPropDef | StringPropDef | ReactNodePropDef<T> | EnumPropDef<T> | EnumOrStringPropDef<T & string> | ValueOrArrayPropDef<T> | FunctionPropDef<T & ((...args: any[]) => any)>;
60
+ type BasePropDef<T = any> = BooleanPropDef | StringPropDef | NumberPropDef | ReactNodePropDef<T> | EnumPropDef<T> | EnumOrStringPropDef<T & string> | ValueOrArrayPropDef<T> | FunctionPropDef<T & ((...args: any[]) => any)>;
55
61
  type ResponsivePropDef<T = any> = BasePropDef<T> & {
56
62
  responsive: true;
57
63
  };
58
- type GetPropDefType<Def> = Def extends BooleanPropDef ? Def extends ResponsivePropDef ? Responsive<boolean> : boolean : Def extends StringPropDef ? Def extends ResponsivePropDef ? Responsive<string> : string : Def extends ReactNodePropDef<infer Type> ? Type : Def extends FunctionPropDef<infer Fn> ? Fn : Def extends EnumOrStringPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Union<string, Type> : Def extends ValueOrArrayPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type | Type[]> : Type | Type[] : Def extends EnumPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type : never;
64
+ type GetPropDefType<Def> = Def extends BooleanPropDef ? Def extends ResponsivePropDef ? Responsive<boolean> : boolean : Def extends StringPropDef ? Def extends ResponsivePropDef ? Responsive<string> : string : Def extends NumberPropDef ? Def extends ResponsivePropDef ? Responsive<number> : number : Def extends ReactNodePropDef<infer Type> ? Type : Def extends FunctionPropDef<infer Fn> ? Fn : Def extends EnumOrStringPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Union<string, Type> : Def extends ValueOrArrayPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type | Type[]> : Type | Type[] : Def extends EnumPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type : never;
59
65
  type GetPropDefTypes<P> = {
60
66
  [K in keyof P]?: GetPropDefType<P[K]>;
61
67
  };
@@ -72,17 +78,36 @@ declare const AlignPropDef: {
72
78
  };
73
79
  type AlignProp = GetPropDefTypes<typeof AlignPropDef>;
74
80
 
81
+ /**
82
+ * Parses a color string (hex, rgb, or raw r,g,b) into a raw "r, g, b" string
83
+ * suitable for use with CSS rgba().
84
+ *
85
+ * Supported formats:
86
+ * - Hex: "#7BEB34", "#7beb34", "#abc"
87
+ * - RGB function: "rgb(125, 235, 52)"
88
+ * - Raw: "125, 235, 52"
89
+ *
90
+ * Returns the original string unchanged if parsing fails.
91
+ */
92
+ declare function parseColor(value: string): string;
93
+
75
94
  declare const ColorPropDef: {
76
95
  /**
77
96
  * Sets the color of the component.
78
97
  *
98
+ * Uses predefined theme colors ("primary", "secondary", etc.) or accepts custom color values in hex, rgb, or raw rgb formats.
99
+ *
79
100
  * @example color="primary" // primary color
101
+ * @example color="#7BEB34" // hex color
102
+ * @example color="rgb(125, 235, 52)" // rgb color
103
+ * @example color="125, 235, 52" // raw rgb values
80
104
  */
81
105
  color: {
82
106
  type: "enum | string";
83
107
  values: readonly ["primary", "secondary", "tertiary", "accent", "success", "warning", "danger", "info"];
84
108
  dataAttr: string;
85
109
  className: string;
110
+ transform: typeof parseColor;
86
111
  };
87
112
  };
88
113
  type ColorProp = GetPropDefTypes<typeof ColorPropDef>;
@@ -650,6 +675,13 @@ type StrictChildren<AllowedChildProps> = {
650
675
  type WithStrictChildren<Props extends {
651
676
  children?: React$1.ReactNode;
652
677
  }, AllowedChildProps> = Omit<Props, "children"> & StrictChildren<AllowedChildProps>;
678
+ /**
679
+ * Like WithStrictChildren, but children are optional.
680
+ * When provided, children are still restricted to the allowed types.
681
+ */
682
+ type WithOptionalStrictChildren<Props extends {
683
+ children?: React$1.ReactNode;
684
+ }, AllowedChildProps> = Omit<Props, "children"> & Partial<StrictChildren<AllowedChildProps>>;
653
685
 
654
686
  declare const AccordionRootPropsDefs: {
655
687
  /**
@@ -900,6 +932,24 @@ declare const Container: React$1.ForwardRefExoticComponent<{} & {
900
932
  direction?: "row" | "column" | undefined;
901
933
  } & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
902
934
 
935
+ interface PanelExternalProps extends MarginProps, PaddingProps, SpacingProp, RadiusProps, RoundnessProp, ColorProp {
936
+ }
937
+ /**
938
+ * A versatile container used to provide layout and styling capabilities.
939
+ */
940
+ declare const Panel: React$1.ForwardRefExoticComponent<GetPropDefTypes<{
941
+ readonly variant: {
942
+ type: "enum";
943
+ values: readonly ["solid", "outlined", "muted"];
944
+ dataAttr: string;
945
+ };
946
+ readonly blur: {
947
+ type: "string";
948
+ default: string;
949
+ cssProperty: string;
950
+ };
951
+ }> & PanelExternalProps & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
952
+
903
953
  declare const variants: readonly ["clear", "shadow", "blurred"];
904
954
  type PortalBackdropInternalProps = {
905
955
  /**
@@ -1014,6 +1064,61 @@ declare const Portal: {
1014
1064
  Backdrop: React$1.ForwardRefExoticComponent<AllPortalBackdropProps & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<HTMLDivElement>>;
1015
1065
  };
1016
1066
 
1067
+ declare const ProgressBarFillPropsDefs: {
1068
+ /**
1069
+ * The value of the progress bar (filled state).
1070
+ * Should be a number between 0 and 1 representing the percentage of completion.
1071
+ */
1072
+ readonly value: {
1073
+ type: "number";
1074
+ };
1075
+ };
1076
+ type ProgressBarFillInternalProps = GetPropDefTypes<typeof ProgressBarFillPropsDefs>;
1077
+
1078
+ interface AllProgressBarFillProps extends ProgressBarFillInternalProps, ColorProp, MarginProps, SizeProp {
1079
+ }
1080
+ /**
1081
+ * A ProgressBarFill.
1082
+ */
1083
+ type ProgressBarFillProps = AllProgressBarFillProps & HTMLAttributes<HTMLDivElement>;
1084
+
1085
+ declare const ProgressBarRootPropsDefs: {
1086
+ /**
1087
+ * Sets the variant style of the progress bar ("solid", "outlined", or "muted").
1088
+ */
1089
+ readonly variant: {
1090
+ type: "enum";
1091
+ values: readonly ["solid", "outlined", "muted"];
1092
+ dataAttr: string;
1093
+ };
1094
+ /**
1095
+ * The value of the progress bar (filled state).
1096
+ * Should be a number between 0 and 1 representing the percentage of completion.
1097
+ */
1098
+ readonly value: {
1099
+ type: "number";
1100
+ };
1101
+ };
1102
+ type ProgressBarRootInternalProps = GetPropDefTypes<typeof ProgressBarRootPropsDefs>;
1103
+
1104
+ interface AllProgressBarRootProps extends ProgressBarRootInternalProps, ColorProp, MarginProps, SizeProp {
1105
+ }
1106
+ type ProgressBarRootProps = AllProgressBarRootProps & WithOptionalStrictChildren<HTMLAttributes<HTMLDivElement>, ProgressBarFillProps>;
1107
+
1108
+ /**
1109
+ * A Progress Bar component to display single or stacked progress bars.
1110
+ */
1111
+ declare const ProgressBar: React$1.FC<ProgressBarRootProps> & {
1112
+ /**
1113
+ * The root component for the Progress Bar.
1114
+ */
1115
+ Root: React$1.FC<ProgressBarRootProps>;
1116
+ /**
1117
+ * The fill component for the Progress Bar, representing the filled portion.
1118
+ */
1119
+ Fill: React$1.FC<ProgressBarFillProps>;
1120
+ };
1121
+
1017
1122
  interface SelectSeparatorProps extends React$1.HTMLAttributes<HTMLDivElement> {
1018
1123
  }
1019
1124
 
@@ -1187,7 +1292,131 @@ type SeparatorProps = AllSeparatorProps & React__default.HTMLAttributes<HTMLDivE
1187
1292
  */
1188
1293
  declare const Separator: FC<SeparatorProps>;
1189
1294
 
1190
- interface TextExternalProps extends MarginProps, PaddingProps {
1295
+ declare const SwitchIndicatorPropDefs: {
1296
+ /**
1297
+ * Sets the variant style of the switch ("solid" or "outlined").
1298
+ */
1299
+ readonly variant: {
1300
+ type: "enum";
1301
+ values: readonly ["solid", "outlined", "muted"];
1302
+ dataAttr: string;
1303
+ };
1304
+ };
1305
+ type SwitchIndicatorInternalProps = GetPropDefTypes<typeof SwitchIndicatorPropDefs>;
1306
+
1307
+ interface AllSwitchIndicatorProps extends SwitchIndicatorInternalProps, SizeProp {
1308
+ }
1309
+ type SwitchIndicatorProps = AllSwitchIndicatorProps & Omit<React__default.HTMLAttributes<HTMLSpanElement>, "children">;
1310
+
1311
+ declare const SwitchLabelPropDefs: {
1312
+ /**
1313
+ * Sets the position of the label relative to the switch.
1314
+ *
1315
+ * @example position="left" // positions the label to the left of the switch
1316
+ * @example position="top" // positions the label above the switch
1317
+ */
1318
+ readonly position: {
1319
+ type: "enum";
1320
+ values: readonly ["top", "left", "right", "bottom"];
1321
+ dataAttr: string;
1322
+ };
1323
+ };
1324
+ type SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;
1325
+
1326
+ interface AllSwitchLabelProps extends SwitchLabelInternalProps {
1327
+ }
1328
+ type SwitchLabelProps = AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
1329
+ children?: React__default.ReactNode;
1330
+ };
1331
+
1332
+ declare const SwitchRootPropsDefs: {
1333
+ /**
1334
+ * Sets the variant style of the switch ("solid" or "outlined").
1335
+ */
1336
+ readonly variant: {
1337
+ type: "enum";
1338
+ values: readonly ["solid", "outlined", "muted"];
1339
+ dataAttr: string;
1340
+ };
1341
+ /**
1342
+ * Sets the checked state of the switch.
1343
+ *
1344
+ * When using an uncontrolled switch, use `defaultChecked` instead.
1345
+ * @default undefined
1346
+ */
1347
+ readonly checked: {
1348
+ type: "boolean";
1349
+ dataAttr: string;
1350
+ };
1351
+ /**
1352
+ * The value of the switch (checked state).
1353
+ */
1354
+ readonly value: {
1355
+ type: "boolean";
1356
+ };
1357
+ /**
1358
+ * Sets the default checked state of the switch.
1359
+ * @default undefined
1360
+ */
1361
+ readonly defaultChecked: {
1362
+ type: "boolean";
1363
+ };
1364
+ /**
1365
+ * Disables the switch component.
1366
+ * @default undefined
1367
+ */
1368
+ readonly disabled: {
1369
+ type: "boolean";
1370
+ dataAttr: string;
1371
+ };
1372
+ /**
1373
+ * Makes the switch read-only.
1374
+ * @default undefined
1375
+ */
1376
+ readonly readonly: {
1377
+ type: "boolean";
1378
+ dataAttr: string;
1379
+ };
1380
+ /**
1381
+ * Marks the switch as required.
1382
+ * @default undefined
1383
+ */
1384
+ readonly required: {
1385
+ type: "boolean";
1386
+ dataAttr: string;
1387
+ };
1388
+ /**
1389
+ * Sets the name attribute of the switch input for form control.
1390
+ * @default undefined
1391
+ */
1392
+ readonly name: {
1393
+ type: "string";
1394
+ };
1395
+ /**
1396
+ * Callback fired when the checked state changes.
1397
+ *
1398
+ * @param value - The new checked state.
1399
+ */
1400
+ readonly onCheckedChange: FunctionPropDef<(value: boolean) => void>;
1401
+ };
1402
+ type SwitchRootInternalProps = GetPropDefTypes<typeof SwitchRootPropsDefs>;
1403
+
1404
+ interface AllSwitchRootProps extends SwitchRootInternalProps, AlignProp, ColorProp, MarginProps, SizeProp {
1405
+ }
1406
+ /**
1407
+ * A versatile Switch, managing state, context, and styling.
1408
+ */
1409
+ type SwitchRootProps = AllSwitchRootProps & WithStrictChildren<HTMLAttributes<HTMLDivElement>, SwitchLabelProps | SwitchIndicatorProps>;
1410
+
1411
+ declare const Switch: React$1.FC<SwitchRootProps> & {
1412
+ Root: React$1.FC<SwitchRootProps>;
1413
+ Label: React$1.ForwardRefExoticComponent<AllSwitchLabelProps & Omit<React$1.HTMLAttributes<HTMLLabelElement>, "children"> & {
1414
+ children?: React.ReactNode;
1415
+ } & React$1.RefAttributes<HTMLLabelElement>>;
1416
+ Indicator: React$1.FC<SwitchIndicatorProps>;
1417
+ };
1418
+
1419
+ interface TextExternalProps extends MarginProps, PaddingProps, ColorProp {
1191
1420
  }
1192
1421
  /**
1193
1422
  * A component for displaying text with customizable styling and layout.
@@ -1248,6 +1477,10 @@ interface ThemeContextValue extends ThemeChangeHandlers {
1248
1477
  }
1249
1478
  declare function useTheme(): ThemeContextValue;
1250
1479
 
1251
- declare function ThemeControl(): react_jsx_runtime.JSX.Element;
1480
+ declare const ThemeControlPosition: readonly ["tl", "top", "tr", "left", "center", "right", "bl", "bottom", "br"];
1481
+ interface ThemeControlProps {
1482
+ position?: (typeof ThemeControlPosition)[number];
1483
+ }
1484
+ declare function ThemeControl({ position }: ThemeControlProps): react_jsx_runtime.JSX.Element;
1252
1485
 
1253
- export { Accordion, Badge, Box, Button, Checkbox, Container, Portal, Select, Separator, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
1486
+ export { Accordion, Badge, Box, Button, Checkbox, Container, Panel, Portal, ProgressBar, Select, Separator, Switch, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,11 @@ type StringPropDef = {
21
21
  className?: string;
22
22
  cssProperty?: string;
23
23
  };
24
+ type NumberPropDef = {
25
+ type: "number";
26
+ default?: number;
27
+ required?: boolean;
28
+ };
24
29
  type ReactNodePropDef<T = React.ReactNode> = {
25
30
  type: "reactNode";
26
31
  required?: boolean;
@@ -40,6 +45,7 @@ type EnumOrStringPropDef<T extends string> = {
40
45
  required?: boolean;
41
46
  className?: string;
42
47
  dataAttr?: string;
48
+ transform?: (value: string) => string;
43
49
  };
44
50
  type ValueOrArrayPropDef<T> = {
45
51
  type: "value | array";
@@ -51,11 +57,11 @@ type FunctionPropDef<T extends (...args: any[]) => any = (...args: any[]) => any
51
57
  type: "function";
52
58
  required?: boolean;
53
59
  };
54
- type BasePropDef<T = any> = BooleanPropDef | StringPropDef | ReactNodePropDef<T> | EnumPropDef<T> | EnumOrStringPropDef<T & string> | ValueOrArrayPropDef<T> | FunctionPropDef<T & ((...args: any[]) => any)>;
60
+ type BasePropDef<T = any> = BooleanPropDef | StringPropDef | NumberPropDef | ReactNodePropDef<T> | EnumPropDef<T> | EnumOrStringPropDef<T & string> | ValueOrArrayPropDef<T> | FunctionPropDef<T & ((...args: any[]) => any)>;
55
61
  type ResponsivePropDef<T = any> = BasePropDef<T> & {
56
62
  responsive: true;
57
63
  };
58
- type GetPropDefType<Def> = Def extends BooleanPropDef ? Def extends ResponsivePropDef ? Responsive<boolean> : boolean : Def extends StringPropDef ? Def extends ResponsivePropDef ? Responsive<string> : string : Def extends ReactNodePropDef<infer Type> ? Type : Def extends FunctionPropDef<infer Fn> ? Fn : Def extends EnumOrStringPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Union<string, Type> : Def extends ValueOrArrayPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type | Type[]> : Type | Type[] : Def extends EnumPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type : never;
64
+ type GetPropDefType<Def> = Def extends BooleanPropDef ? Def extends ResponsivePropDef ? Responsive<boolean> : boolean : Def extends StringPropDef ? Def extends ResponsivePropDef ? Responsive<string> : string : Def extends NumberPropDef ? Def extends ResponsivePropDef ? Responsive<number> : number : Def extends ReactNodePropDef<infer Type> ? Type : Def extends FunctionPropDef<infer Fn> ? Fn : Def extends EnumOrStringPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Union<string, Type> : Def extends ValueOrArrayPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type | Type[]> : Type | Type[] : Def extends EnumPropDef<infer Type> ? Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type : never;
59
65
  type GetPropDefTypes<P> = {
60
66
  [K in keyof P]?: GetPropDefType<P[K]>;
61
67
  };
@@ -72,17 +78,36 @@ declare const AlignPropDef: {
72
78
  };
73
79
  type AlignProp = GetPropDefTypes<typeof AlignPropDef>;
74
80
 
81
+ /**
82
+ * Parses a color string (hex, rgb, or raw r,g,b) into a raw "r, g, b" string
83
+ * suitable for use with CSS rgba().
84
+ *
85
+ * Supported formats:
86
+ * - Hex: "#7BEB34", "#7beb34", "#abc"
87
+ * - RGB function: "rgb(125, 235, 52)"
88
+ * - Raw: "125, 235, 52"
89
+ *
90
+ * Returns the original string unchanged if parsing fails.
91
+ */
92
+ declare function parseColor(value: string): string;
93
+
75
94
  declare const ColorPropDef: {
76
95
  /**
77
96
  * Sets the color of the component.
78
97
  *
98
+ * Uses predefined theme colors ("primary", "secondary", etc.) or accepts custom color values in hex, rgb, or raw rgb formats.
99
+ *
79
100
  * @example color="primary" // primary color
101
+ * @example color="#7BEB34" // hex color
102
+ * @example color="rgb(125, 235, 52)" // rgb color
103
+ * @example color="125, 235, 52" // raw rgb values
80
104
  */
81
105
  color: {
82
106
  type: "enum | string";
83
107
  values: readonly ["primary", "secondary", "tertiary", "accent", "success", "warning", "danger", "info"];
84
108
  dataAttr: string;
85
109
  className: string;
110
+ transform: typeof parseColor;
86
111
  };
87
112
  };
88
113
  type ColorProp = GetPropDefTypes<typeof ColorPropDef>;
@@ -650,6 +675,13 @@ type StrictChildren<AllowedChildProps> = {
650
675
  type WithStrictChildren<Props extends {
651
676
  children?: React$1.ReactNode;
652
677
  }, AllowedChildProps> = Omit<Props, "children"> & StrictChildren<AllowedChildProps>;
678
+ /**
679
+ * Like WithStrictChildren, but children are optional.
680
+ * When provided, children are still restricted to the allowed types.
681
+ */
682
+ type WithOptionalStrictChildren<Props extends {
683
+ children?: React$1.ReactNode;
684
+ }, AllowedChildProps> = Omit<Props, "children"> & Partial<StrictChildren<AllowedChildProps>>;
653
685
 
654
686
  declare const AccordionRootPropsDefs: {
655
687
  /**
@@ -900,6 +932,24 @@ declare const Container: React$1.ForwardRefExoticComponent<{} & {
900
932
  direction?: "row" | "column" | undefined;
901
933
  } & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
902
934
 
935
+ interface PanelExternalProps extends MarginProps, PaddingProps, SpacingProp, RadiusProps, RoundnessProp, ColorProp {
936
+ }
937
+ /**
938
+ * A versatile container used to provide layout and styling capabilities.
939
+ */
940
+ declare const Panel: React$1.ForwardRefExoticComponent<GetPropDefTypes<{
941
+ readonly variant: {
942
+ type: "enum";
943
+ values: readonly ["solid", "outlined", "muted"];
944
+ dataAttr: string;
945
+ };
946
+ readonly blur: {
947
+ type: "string";
948
+ default: string;
949
+ cssProperty: string;
950
+ };
951
+ }> & PanelExternalProps & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
952
+
903
953
  declare const variants: readonly ["clear", "shadow", "blurred"];
904
954
  type PortalBackdropInternalProps = {
905
955
  /**
@@ -1014,6 +1064,61 @@ declare const Portal: {
1014
1064
  Backdrop: React$1.ForwardRefExoticComponent<AllPortalBackdropProps & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<HTMLDivElement>>;
1015
1065
  };
1016
1066
 
1067
+ declare const ProgressBarFillPropsDefs: {
1068
+ /**
1069
+ * The value of the progress bar (filled state).
1070
+ * Should be a number between 0 and 1 representing the percentage of completion.
1071
+ */
1072
+ readonly value: {
1073
+ type: "number";
1074
+ };
1075
+ };
1076
+ type ProgressBarFillInternalProps = GetPropDefTypes<typeof ProgressBarFillPropsDefs>;
1077
+
1078
+ interface AllProgressBarFillProps extends ProgressBarFillInternalProps, ColorProp, MarginProps, SizeProp {
1079
+ }
1080
+ /**
1081
+ * A ProgressBarFill.
1082
+ */
1083
+ type ProgressBarFillProps = AllProgressBarFillProps & HTMLAttributes<HTMLDivElement>;
1084
+
1085
+ declare const ProgressBarRootPropsDefs: {
1086
+ /**
1087
+ * Sets the variant style of the progress bar ("solid", "outlined", or "muted").
1088
+ */
1089
+ readonly variant: {
1090
+ type: "enum";
1091
+ values: readonly ["solid", "outlined", "muted"];
1092
+ dataAttr: string;
1093
+ };
1094
+ /**
1095
+ * The value of the progress bar (filled state).
1096
+ * Should be a number between 0 and 1 representing the percentage of completion.
1097
+ */
1098
+ readonly value: {
1099
+ type: "number";
1100
+ };
1101
+ };
1102
+ type ProgressBarRootInternalProps = GetPropDefTypes<typeof ProgressBarRootPropsDefs>;
1103
+
1104
+ interface AllProgressBarRootProps extends ProgressBarRootInternalProps, ColorProp, MarginProps, SizeProp {
1105
+ }
1106
+ type ProgressBarRootProps = AllProgressBarRootProps & WithOptionalStrictChildren<HTMLAttributes<HTMLDivElement>, ProgressBarFillProps>;
1107
+
1108
+ /**
1109
+ * A Progress Bar component to display single or stacked progress bars.
1110
+ */
1111
+ declare const ProgressBar: React$1.FC<ProgressBarRootProps> & {
1112
+ /**
1113
+ * The root component for the Progress Bar.
1114
+ */
1115
+ Root: React$1.FC<ProgressBarRootProps>;
1116
+ /**
1117
+ * The fill component for the Progress Bar, representing the filled portion.
1118
+ */
1119
+ Fill: React$1.FC<ProgressBarFillProps>;
1120
+ };
1121
+
1017
1122
  interface SelectSeparatorProps extends React$1.HTMLAttributes<HTMLDivElement> {
1018
1123
  }
1019
1124
 
@@ -1187,7 +1292,131 @@ type SeparatorProps = AllSeparatorProps & React__default.HTMLAttributes<HTMLDivE
1187
1292
  */
1188
1293
  declare const Separator: FC<SeparatorProps>;
1189
1294
 
1190
- interface TextExternalProps extends MarginProps, PaddingProps {
1295
+ declare const SwitchIndicatorPropDefs: {
1296
+ /**
1297
+ * Sets the variant style of the switch ("solid" or "outlined").
1298
+ */
1299
+ readonly variant: {
1300
+ type: "enum";
1301
+ values: readonly ["solid", "outlined", "muted"];
1302
+ dataAttr: string;
1303
+ };
1304
+ };
1305
+ type SwitchIndicatorInternalProps = GetPropDefTypes<typeof SwitchIndicatorPropDefs>;
1306
+
1307
+ interface AllSwitchIndicatorProps extends SwitchIndicatorInternalProps, SizeProp {
1308
+ }
1309
+ type SwitchIndicatorProps = AllSwitchIndicatorProps & Omit<React__default.HTMLAttributes<HTMLSpanElement>, "children">;
1310
+
1311
+ declare const SwitchLabelPropDefs: {
1312
+ /**
1313
+ * Sets the position of the label relative to the switch.
1314
+ *
1315
+ * @example position="left" // positions the label to the left of the switch
1316
+ * @example position="top" // positions the label above the switch
1317
+ */
1318
+ readonly position: {
1319
+ type: "enum";
1320
+ values: readonly ["top", "left", "right", "bottom"];
1321
+ dataAttr: string;
1322
+ };
1323
+ };
1324
+ type SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;
1325
+
1326
+ interface AllSwitchLabelProps extends SwitchLabelInternalProps {
1327
+ }
1328
+ type SwitchLabelProps = AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
1329
+ children?: React__default.ReactNode;
1330
+ };
1331
+
1332
+ declare const SwitchRootPropsDefs: {
1333
+ /**
1334
+ * Sets the variant style of the switch ("solid" or "outlined").
1335
+ */
1336
+ readonly variant: {
1337
+ type: "enum";
1338
+ values: readonly ["solid", "outlined", "muted"];
1339
+ dataAttr: string;
1340
+ };
1341
+ /**
1342
+ * Sets the checked state of the switch.
1343
+ *
1344
+ * When using an uncontrolled switch, use `defaultChecked` instead.
1345
+ * @default undefined
1346
+ */
1347
+ readonly checked: {
1348
+ type: "boolean";
1349
+ dataAttr: string;
1350
+ };
1351
+ /**
1352
+ * The value of the switch (checked state).
1353
+ */
1354
+ readonly value: {
1355
+ type: "boolean";
1356
+ };
1357
+ /**
1358
+ * Sets the default checked state of the switch.
1359
+ * @default undefined
1360
+ */
1361
+ readonly defaultChecked: {
1362
+ type: "boolean";
1363
+ };
1364
+ /**
1365
+ * Disables the switch component.
1366
+ * @default undefined
1367
+ */
1368
+ readonly disabled: {
1369
+ type: "boolean";
1370
+ dataAttr: string;
1371
+ };
1372
+ /**
1373
+ * Makes the switch read-only.
1374
+ * @default undefined
1375
+ */
1376
+ readonly readonly: {
1377
+ type: "boolean";
1378
+ dataAttr: string;
1379
+ };
1380
+ /**
1381
+ * Marks the switch as required.
1382
+ * @default undefined
1383
+ */
1384
+ readonly required: {
1385
+ type: "boolean";
1386
+ dataAttr: string;
1387
+ };
1388
+ /**
1389
+ * Sets the name attribute of the switch input for form control.
1390
+ * @default undefined
1391
+ */
1392
+ readonly name: {
1393
+ type: "string";
1394
+ };
1395
+ /**
1396
+ * Callback fired when the checked state changes.
1397
+ *
1398
+ * @param value - The new checked state.
1399
+ */
1400
+ readonly onCheckedChange: FunctionPropDef<(value: boolean) => void>;
1401
+ };
1402
+ type SwitchRootInternalProps = GetPropDefTypes<typeof SwitchRootPropsDefs>;
1403
+
1404
+ interface AllSwitchRootProps extends SwitchRootInternalProps, AlignProp, ColorProp, MarginProps, SizeProp {
1405
+ }
1406
+ /**
1407
+ * A versatile Switch, managing state, context, and styling.
1408
+ */
1409
+ type SwitchRootProps = AllSwitchRootProps & WithStrictChildren<HTMLAttributes<HTMLDivElement>, SwitchLabelProps | SwitchIndicatorProps>;
1410
+
1411
+ declare const Switch: React$1.FC<SwitchRootProps> & {
1412
+ Root: React$1.FC<SwitchRootProps>;
1413
+ Label: React$1.ForwardRefExoticComponent<AllSwitchLabelProps & Omit<React$1.HTMLAttributes<HTMLLabelElement>, "children"> & {
1414
+ children?: React.ReactNode;
1415
+ } & React$1.RefAttributes<HTMLLabelElement>>;
1416
+ Indicator: React$1.FC<SwitchIndicatorProps>;
1417
+ };
1418
+
1419
+ interface TextExternalProps extends MarginProps, PaddingProps, ColorProp {
1191
1420
  }
1192
1421
  /**
1193
1422
  * A component for displaying text with customizable styling and layout.
@@ -1248,6 +1477,10 @@ interface ThemeContextValue extends ThemeChangeHandlers {
1248
1477
  }
1249
1478
  declare function useTheme(): ThemeContextValue;
1250
1479
 
1251
- declare function ThemeControl(): react_jsx_runtime.JSX.Element;
1480
+ declare const ThemeControlPosition: readonly ["tl", "top", "tr", "left", "center", "right", "bl", "bottom", "br"];
1481
+ interface ThemeControlProps {
1482
+ position?: (typeof ThemeControlPosition)[number];
1483
+ }
1484
+ declare function ThemeControl({ position }: ThemeControlProps): react_jsx_runtime.JSX.Element;
1252
1485
 
1253
- export { Accordion, Badge, Box, Button, Checkbox, Container, Portal, Select, Separator, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
1486
+ export { Accordion, Badge, Box, Button, Checkbox, Container, Panel, Portal, ProgressBar, Select, Separator, Switch, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };