@locus-ui/components 0.0.13 → 0.0.16
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.css +292 -8
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +165 -3
- package/dist/index.d.ts +165 -3
- package/dist/index.js +515 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +665 -226
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -932,7 +932,45 @@ declare const Container: React$1.ForwardRefExoticComponent<{} & {
|
|
|
932
932
|
direction?: "row" | "column" | undefined;
|
|
933
933
|
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
934
934
|
|
|
935
|
-
interface
|
|
935
|
+
interface FlexExternalProps extends MarginProps, PaddingProps, SpacingProp {
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* A versatile container used to provide layout and styling capabilities.
|
|
939
|
+
*/
|
|
940
|
+
declare const Flex: React$1.ForwardRefExoticComponent<GetPropDefTypes<{
|
|
941
|
+
readonly gap: {
|
|
942
|
+
type: "enum | string";
|
|
943
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "8"];
|
|
944
|
+
dataAttr: string;
|
|
945
|
+
responsive: true;
|
|
946
|
+
};
|
|
947
|
+
readonly justify: {
|
|
948
|
+
type: "enum";
|
|
949
|
+
values: readonly ["start", "end", "center", "between", "around", "evenly"];
|
|
950
|
+
dataAttr: string;
|
|
951
|
+
responsive: true;
|
|
952
|
+
};
|
|
953
|
+
readonly direction: {
|
|
954
|
+
type: "enum";
|
|
955
|
+
values: readonly ["row", "row-reverse", "column", "column-reverse"];
|
|
956
|
+
dataAttr: string;
|
|
957
|
+
responsive: true;
|
|
958
|
+
};
|
|
959
|
+
readonly align: {
|
|
960
|
+
type: "enum";
|
|
961
|
+
values: readonly ["start", "end", "center", "stretch", "baseline"];
|
|
962
|
+
dataAttr: string;
|
|
963
|
+
responsive: true;
|
|
964
|
+
};
|
|
965
|
+
readonly wrap: {
|
|
966
|
+
type: "enum";
|
|
967
|
+
values: readonly ["nowrap", "wrap", "wrap-reverse"];
|
|
968
|
+
dataAttr: string;
|
|
969
|
+
responsive: true;
|
|
970
|
+
};
|
|
971
|
+
}> & FlexExternalProps & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
972
|
+
|
|
973
|
+
interface PanelExternalProps extends MarginProps, PaddingProps, SpacingProp, RadiusProps, RoundnessProp, ColorProp {
|
|
936
974
|
}
|
|
937
975
|
/**
|
|
938
976
|
* A versatile container used to provide layout and styling capabilities.
|
|
@@ -1292,7 +1330,131 @@ type SeparatorProps = AllSeparatorProps & React__default.HTMLAttributes<HTMLDivE
|
|
|
1292
1330
|
*/
|
|
1293
1331
|
declare const Separator: FC<SeparatorProps>;
|
|
1294
1332
|
|
|
1295
|
-
|
|
1333
|
+
declare const SwitchIndicatorPropDefs: {
|
|
1334
|
+
/**
|
|
1335
|
+
* Sets the variant style of the switch ("solid" or "outlined").
|
|
1336
|
+
*/
|
|
1337
|
+
readonly variant: {
|
|
1338
|
+
type: "enum";
|
|
1339
|
+
values: readonly ["solid", "outlined", "muted"];
|
|
1340
|
+
dataAttr: string;
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
type SwitchIndicatorInternalProps = GetPropDefTypes<typeof SwitchIndicatorPropDefs>;
|
|
1344
|
+
|
|
1345
|
+
interface AllSwitchIndicatorProps extends SwitchIndicatorInternalProps, SizeProp {
|
|
1346
|
+
}
|
|
1347
|
+
type SwitchIndicatorProps = AllSwitchIndicatorProps & Omit<React__default.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
1348
|
+
|
|
1349
|
+
declare const SwitchLabelPropDefs: {
|
|
1350
|
+
/**
|
|
1351
|
+
* Sets the position of the label relative to the switch.
|
|
1352
|
+
*
|
|
1353
|
+
* @example position="left" // positions the label to the left of the switch
|
|
1354
|
+
* @example position="top" // positions the label above the switch
|
|
1355
|
+
*/
|
|
1356
|
+
readonly position: {
|
|
1357
|
+
type: "enum";
|
|
1358
|
+
values: readonly ["top", "left", "right", "bottom"];
|
|
1359
|
+
dataAttr: string;
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
1362
|
+
type SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;
|
|
1363
|
+
|
|
1364
|
+
interface AllSwitchLabelProps extends SwitchLabelInternalProps {
|
|
1365
|
+
}
|
|
1366
|
+
type SwitchLabelProps = AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
|
|
1367
|
+
children?: React__default.ReactNode;
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
declare const SwitchRootPropsDefs: {
|
|
1371
|
+
/**
|
|
1372
|
+
* Sets the variant style of the switch ("solid" or "outlined").
|
|
1373
|
+
*/
|
|
1374
|
+
readonly variant: {
|
|
1375
|
+
type: "enum";
|
|
1376
|
+
values: readonly ["solid", "outlined", "muted"];
|
|
1377
|
+
dataAttr: string;
|
|
1378
|
+
};
|
|
1379
|
+
/**
|
|
1380
|
+
* Sets the checked state of the switch.
|
|
1381
|
+
*
|
|
1382
|
+
* When using an uncontrolled switch, use `defaultChecked` instead.
|
|
1383
|
+
* @default undefined
|
|
1384
|
+
*/
|
|
1385
|
+
readonly checked: {
|
|
1386
|
+
type: "boolean";
|
|
1387
|
+
dataAttr: string;
|
|
1388
|
+
};
|
|
1389
|
+
/**
|
|
1390
|
+
* The value of the switch (checked state).
|
|
1391
|
+
*/
|
|
1392
|
+
readonly value: {
|
|
1393
|
+
type: "boolean";
|
|
1394
|
+
};
|
|
1395
|
+
/**
|
|
1396
|
+
* Sets the default checked state of the switch.
|
|
1397
|
+
* @default undefined
|
|
1398
|
+
*/
|
|
1399
|
+
readonly defaultChecked: {
|
|
1400
|
+
type: "boolean";
|
|
1401
|
+
};
|
|
1402
|
+
/**
|
|
1403
|
+
* Disables the switch component.
|
|
1404
|
+
* @default undefined
|
|
1405
|
+
*/
|
|
1406
|
+
readonly disabled: {
|
|
1407
|
+
type: "boolean";
|
|
1408
|
+
dataAttr: string;
|
|
1409
|
+
};
|
|
1410
|
+
/**
|
|
1411
|
+
* Makes the switch read-only.
|
|
1412
|
+
* @default undefined
|
|
1413
|
+
*/
|
|
1414
|
+
readonly readonly: {
|
|
1415
|
+
type: "boolean";
|
|
1416
|
+
dataAttr: string;
|
|
1417
|
+
};
|
|
1418
|
+
/**
|
|
1419
|
+
* Marks the switch as required.
|
|
1420
|
+
* @default undefined
|
|
1421
|
+
*/
|
|
1422
|
+
readonly required: {
|
|
1423
|
+
type: "boolean";
|
|
1424
|
+
dataAttr: string;
|
|
1425
|
+
};
|
|
1426
|
+
/**
|
|
1427
|
+
* Sets the name attribute of the switch input for form control.
|
|
1428
|
+
* @default undefined
|
|
1429
|
+
*/
|
|
1430
|
+
readonly name: {
|
|
1431
|
+
type: "string";
|
|
1432
|
+
};
|
|
1433
|
+
/**
|
|
1434
|
+
* Callback fired when the checked state changes.
|
|
1435
|
+
*
|
|
1436
|
+
* @param value - The new checked state.
|
|
1437
|
+
*/
|
|
1438
|
+
readonly onCheckedChange: FunctionPropDef<(value: boolean) => void>;
|
|
1439
|
+
};
|
|
1440
|
+
type SwitchRootInternalProps = GetPropDefTypes<typeof SwitchRootPropsDefs>;
|
|
1441
|
+
|
|
1442
|
+
interface AllSwitchRootProps extends SwitchRootInternalProps, AlignProp, ColorProp, MarginProps, SizeProp {
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* A versatile Switch, managing state, context, and styling.
|
|
1446
|
+
*/
|
|
1447
|
+
type SwitchRootProps = AllSwitchRootProps & WithStrictChildren<HTMLAttributes<HTMLDivElement>, SwitchLabelProps | SwitchIndicatorProps>;
|
|
1448
|
+
|
|
1449
|
+
declare const Switch: React$1.FC<SwitchRootProps> & {
|
|
1450
|
+
Root: React$1.FC<SwitchRootProps>;
|
|
1451
|
+
Label: React$1.ForwardRefExoticComponent<AllSwitchLabelProps & Omit<React$1.HTMLAttributes<HTMLLabelElement>, "children"> & {
|
|
1452
|
+
children?: React.ReactNode;
|
|
1453
|
+
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1454
|
+
Indicator: React$1.FC<SwitchIndicatorProps>;
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
interface TextExternalProps extends MarginProps, PaddingProps, ColorProp {
|
|
1296
1458
|
}
|
|
1297
1459
|
/**
|
|
1298
1460
|
* A component for displaying text with customizable styling and layout.
|
|
@@ -1359,4 +1521,4 @@ interface ThemeControlProps {
|
|
|
1359
1521
|
}
|
|
1360
1522
|
declare function ThemeControl({ position }: ThemeControlProps): react_jsx_runtime.JSX.Element;
|
|
1361
1523
|
|
|
1362
|
-
export { Accordion, Badge, Box, Button, Checkbox, Container, Panel, Portal, ProgressBar, Select, Separator, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
|
|
1524
|
+
export { Accordion, Badge, Box, Button, Checkbox, Container, Flex, Panel, Portal, ProgressBar, Select, Separator, Switch, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -932,7 +932,45 @@ declare const Container: React$1.ForwardRefExoticComponent<{} & {
|
|
|
932
932
|
direction?: "row" | "column" | undefined;
|
|
933
933
|
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
934
934
|
|
|
935
|
-
interface
|
|
935
|
+
interface FlexExternalProps extends MarginProps, PaddingProps, SpacingProp {
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* A versatile container used to provide layout and styling capabilities.
|
|
939
|
+
*/
|
|
940
|
+
declare const Flex: React$1.ForwardRefExoticComponent<GetPropDefTypes<{
|
|
941
|
+
readonly gap: {
|
|
942
|
+
type: "enum | string";
|
|
943
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "8"];
|
|
944
|
+
dataAttr: string;
|
|
945
|
+
responsive: true;
|
|
946
|
+
};
|
|
947
|
+
readonly justify: {
|
|
948
|
+
type: "enum";
|
|
949
|
+
values: readonly ["start", "end", "center", "between", "around", "evenly"];
|
|
950
|
+
dataAttr: string;
|
|
951
|
+
responsive: true;
|
|
952
|
+
};
|
|
953
|
+
readonly direction: {
|
|
954
|
+
type: "enum";
|
|
955
|
+
values: readonly ["row", "row-reverse", "column", "column-reverse"];
|
|
956
|
+
dataAttr: string;
|
|
957
|
+
responsive: true;
|
|
958
|
+
};
|
|
959
|
+
readonly align: {
|
|
960
|
+
type: "enum";
|
|
961
|
+
values: readonly ["start", "end", "center", "stretch", "baseline"];
|
|
962
|
+
dataAttr: string;
|
|
963
|
+
responsive: true;
|
|
964
|
+
};
|
|
965
|
+
readonly wrap: {
|
|
966
|
+
type: "enum";
|
|
967
|
+
values: readonly ["nowrap", "wrap", "wrap-reverse"];
|
|
968
|
+
dataAttr: string;
|
|
969
|
+
responsive: true;
|
|
970
|
+
};
|
|
971
|
+
}> & FlexExternalProps & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
972
|
+
|
|
973
|
+
interface PanelExternalProps extends MarginProps, PaddingProps, SpacingProp, RadiusProps, RoundnessProp, ColorProp {
|
|
936
974
|
}
|
|
937
975
|
/**
|
|
938
976
|
* A versatile container used to provide layout and styling capabilities.
|
|
@@ -1292,7 +1330,131 @@ type SeparatorProps = AllSeparatorProps & React__default.HTMLAttributes<HTMLDivE
|
|
|
1292
1330
|
*/
|
|
1293
1331
|
declare const Separator: FC<SeparatorProps>;
|
|
1294
1332
|
|
|
1295
|
-
|
|
1333
|
+
declare const SwitchIndicatorPropDefs: {
|
|
1334
|
+
/**
|
|
1335
|
+
* Sets the variant style of the switch ("solid" or "outlined").
|
|
1336
|
+
*/
|
|
1337
|
+
readonly variant: {
|
|
1338
|
+
type: "enum";
|
|
1339
|
+
values: readonly ["solid", "outlined", "muted"];
|
|
1340
|
+
dataAttr: string;
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
type SwitchIndicatorInternalProps = GetPropDefTypes<typeof SwitchIndicatorPropDefs>;
|
|
1344
|
+
|
|
1345
|
+
interface AllSwitchIndicatorProps extends SwitchIndicatorInternalProps, SizeProp {
|
|
1346
|
+
}
|
|
1347
|
+
type SwitchIndicatorProps = AllSwitchIndicatorProps & Omit<React__default.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
1348
|
+
|
|
1349
|
+
declare const SwitchLabelPropDefs: {
|
|
1350
|
+
/**
|
|
1351
|
+
* Sets the position of the label relative to the switch.
|
|
1352
|
+
*
|
|
1353
|
+
* @example position="left" // positions the label to the left of the switch
|
|
1354
|
+
* @example position="top" // positions the label above the switch
|
|
1355
|
+
*/
|
|
1356
|
+
readonly position: {
|
|
1357
|
+
type: "enum";
|
|
1358
|
+
values: readonly ["top", "left", "right", "bottom"];
|
|
1359
|
+
dataAttr: string;
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
1362
|
+
type SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;
|
|
1363
|
+
|
|
1364
|
+
interface AllSwitchLabelProps extends SwitchLabelInternalProps {
|
|
1365
|
+
}
|
|
1366
|
+
type SwitchLabelProps = AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
|
|
1367
|
+
children?: React__default.ReactNode;
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
declare const SwitchRootPropsDefs: {
|
|
1371
|
+
/**
|
|
1372
|
+
* Sets the variant style of the switch ("solid" or "outlined").
|
|
1373
|
+
*/
|
|
1374
|
+
readonly variant: {
|
|
1375
|
+
type: "enum";
|
|
1376
|
+
values: readonly ["solid", "outlined", "muted"];
|
|
1377
|
+
dataAttr: string;
|
|
1378
|
+
};
|
|
1379
|
+
/**
|
|
1380
|
+
* Sets the checked state of the switch.
|
|
1381
|
+
*
|
|
1382
|
+
* When using an uncontrolled switch, use `defaultChecked` instead.
|
|
1383
|
+
* @default undefined
|
|
1384
|
+
*/
|
|
1385
|
+
readonly checked: {
|
|
1386
|
+
type: "boolean";
|
|
1387
|
+
dataAttr: string;
|
|
1388
|
+
};
|
|
1389
|
+
/**
|
|
1390
|
+
* The value of the switch (checked state).
|
|
1391
|
+
*/
|
|
1392
|
+
readonly value: {
|
|
1393
|
+
type: "boolean";
|
|
1394
|
+
};
|
|
1395
|
+
/**
|
|
1396
|
+
* Sets the default checked state of the switch.
|
|
1397
|
+
* @default undefined
|
|
1398
|
+
*/
|
|
1399
|
+
readonly defaultChecked: {
|
|
1400
|
+
type: "boolean";
|
|
1401
|
+
};
|
|
1402
|
+
/**
|
|
1403
|
+
* Disables the switch component.
|
|
1404
|
+
* @default undefined
|
|
1405
|
+
*/
|
|
1406
|
+
readonly disabled: {
|
|
1407
|
+
type: "boolean";
|
|
1408
|
+
dataAttr: string;
|
|
1409
|
+
};
|
|
1410
|
+
/**
|
|
1411
|
+
* Makes the switch read-only.
|
|
1412
|
+
* @default undefined
|
|
1413
|
+
*/
|
|
1414
|
+
readonly readonly: {
|
|
1415
|
+
type: "boolean";
|
|
1416
|
+
dataAttr: string;
|
|
1417
|
+
};
|
|
1418
|
+
/**
|
|
1419
|
+
* Marks the switch as required.
|
|
1420
|
+
* @default undefined
|
|
1421
|
+
*/
|
|
1422
|
+
readonly required: {
|
|
1423
|
+
type: "boolean";
|
|
1424
|
+
dataAttr: string;
|
|
1425
|
+
};
|
|
1426
|
+
/**
|
|
1427
|
+
* Sets the name attribute of the switch input for form control.
|
|
1428
|
+
* @default undefined
|
|
1429
|
+
*/
|
|
1430
|
+
readonly name: {
|
|
1431
|
+
type: "string";
|
|
1432
|
+
};
|
|
1433
|
+
/**
|
|
1434
|
+
* Callback fired when the checked state changes.
|
|
1435
|
+
*
|
|
1436
|
+
* @param value - The new checked state.
|
|
1437
|
+
*/
|
|
1438
|
+
readonly onCheckedChange: FunctionPropDef<(value: boolean) => void>;
|
|
1439
|
+
};
|
|
1440
|
+
type SwitchRootInternalProps = GetPropDefTypes<typeof SwitchRootPropsDefs>;
|
|
1441
|
+
|
|
1442
|
+
interface AllSwitchRootProps extends SwitchRootInternalProps, AlignProp, ColorProp, MarginProps, SizeProp {
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* A versatile Switch, managing state, context, and styling.
|
|
1446
|
+
*/
|
|
1447
|
+
type SwitchRootProps = AllSwitchRootProps & WithStrictChildren<HTMLAttributes<HTMLDivElement>, SwitchLabelProps | SwitchIndicatorProps>;
|
|
1448
|
+
|
|
1449
|
+
declare const Switch: React$1.FC<SwitchRootProps> & {
|
|
1450
|
+
Root: React$1.FC<SwitchRootProps>;
|
|
1451
|
+
Label: React$1.ForwardRefExoticComponent<AllSwitchLabelProps & Omit<React$1.HTMLAttributes<HTMLLabelElement>, "children"> & {
|
|
1452
|
+
children?: React.ReactNode;
|
|
1453
|
+
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1454
|
+
Indicator: React$1.FC<SwitchIndicatorProps>;
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
interface TextExternalProps extends MarginProps, PaddingProps, ColorProp {
|
|
1296
1458
|
}
|
|
1297
1459
|
/**
|
|
1298
1460
|
* A component for displaying text with customizable styling and layout.
|
|
@@ -1359,4 +1521,4 @@ interface ThemeControlProps {
|
|
|
1359
1521
|
}
|
|
1360
1522
|
declare function ThemeControl({ position }: ThemeControlProps): react_jsx_runtime.JSX.Element;
|
|
1361
1523
|
|
|
1362
|
-
export { Accordion, Badge, Box, Button, Checkbox, Container, Panel, Portal, ProgressBar, Select, Separator, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
|
|
1524
|
+
export { Accordion, Badge, Box, Button, Checkbox, Container, Flex, Panel, Portal, ProgressBar, Select, Separator, Switch, Text, Theme, type ThemeAppearance, ThemeControl, type ThemeRadius, type ThemeRoundness, type ThemeSpacing, useTheme };
|