@nithish_atum/atum 1.0.3 → 1.0.5
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.d.mts +128 -27
- package/dist/index.d.ts +128 -27
- package/dist/index.js +613 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +606 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,23 +33,34 @@ __export(index_exports, {
|
|
|
33
33
|
Box: () => Box_default,
|
|
34
34
|
Button: () => Button_default,
|
|
35
35
|
Card: () => Card_default,
|
|
36
|
+
Center: () => Center_default,
|
|
37
|
+
CenterMenu: () => CenterMenu_default,
|
|
36
38
|
Checkbox: () => Checkbox_default,
|
|
39
|
+
Col: () => Col_default,
|
|
40
|
+
Container: () => Container_default,
|
|
37
41
|
DatePicker: () => DatePicker_default,
|
|
38
42
|
Divider: () => Divider_default,
|
|
39
43
|
Drawer: () => Drawer_default,
|
|
40
44
|
Flex: () => Flex_default,
|
|
41
45
|
Form: () => Form_default,
|
|
42
46
|
FormControl: () => FormControl_default,
|
|
47
|
+
Grid: () => Grid_default,
|
|
43
48
|
Heading: () => Heading_default,
|
|
49
|
+
HorizantalMenu: () => HorizantalMenu_default,
|
|
44
50
|
Input: () => Input_default,
|
|
45
51
|
Link: () => Link_default,
|
|
46
52
|
Modal: () => Modal_default,
|
|
53
|
+
NotificationProvider: () => NotificationProvider,
|
|
47
54
|
Paragraph: () => Paragraph_default,
|
|
48
55
|
Radio: () => Radio_default,
|
|
56
|
+
Row: () => Row_default,
|
|
49
57
|
Select: () => Select_default,
|
|
58
|
+
Stack: () => Stack_default,
|
|
50
59
|
Switch: () => Switch_default,
|
|
51
60
|
Text: () => Text_default,
|
|
52
|
-
Textarea: () => Textarea_default
|
|
61
|
+
Textarea: () => Textarea_default,
|
|
62
|
+
toast: () => toast,
|
|
63
|
+
useToast: () => useToast
|
|
53
64
|
});
|
|
54
65
|
module.exports = __toCommonJS(index_exports);
|
|
55
66
|
|
|
@@ -1283,27 +1294,627 @@ var Textarea = ({
|
|
|
1283
1294
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledTextarea, { $size: size, $state: state, ...rest });
|
|
1284
1295
|
};
|
|
1285
1296
|
var Textarea_default = Textarea;
|
|
1297
|
+
|
|
1298
|
+
// src/components/Menus/CenterMenu.tsx
|
|
1299
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
1300
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1301
|
+
var baseStyle9 = import_styled_components21.css`
|
|
1302
|
+
padding: 0.2em 0em 0.2em 0em;
|
|
1303
|
+
cursor: pointer;
|
|
1304
|
+
font-weight: 600;
|
|
1305
|
+
transistion: all 900ms;
|
|
1306
|
+
display: flex;
|
|
1307
|
+
width: 100%;
|
|
1308
|
+
justify-content: center;
|
|
1309
|
+
align-items: center;
|
|
1310
|
+
gap: 3%;
|
|
1311
|
+
background-color: rgb(71, 91, 248);
|
|
1312
|
+
`;
|
|
1313
|
+
var StyledMenu = import_styled_components21.default.div`
|
|
1314
|
+
${baseStyle9}
|
|
1315
|
+
`;
|
|
1316
|
+
var CenterMenu = ({
|
|
1317
|
+
menuItems = ["SampleMenu_1", "SampleMenu_2", "SampleMenu_3"],
|
|
1318
|
+
logo,
|
|
1319
|
+
alt = "logo",
|
|
1320
|
+
href = "#",
|
|
1321
|
+
children,
|
|
1322
|
+
...rest
|
|
1323
|
+
}) => {
|
|
1324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(StyledMenu, { ...rest, children: [
|
|
1325
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { href, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1326
|
+
"img",
|
|
1327
|
+
{
|
|
1328
|
+
src: logo,
|
|
1329
|
+
alt,
|
|
1330
|
+
width: "48px",
|
|
1331
|
+
height: "48px",
|
|
1332
|
+
style: {
|
|
1333
|
+
mixBlendMode: "multiply",
|
|
1334
|
+
objectFit: "contain"
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
) }),
|
|
1338
|
+
menuItems.map((x, i) => {
|
|
1339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: x }, i);
|
|
1340
|
+
})
|
|
1341
|
+
] });
|
|
1342
|
+
};
|
|
1343
|
+
var CenterMenu_default = CenterMenu;
|
|
1344
|
+
|
|
1345
|
+
// src/components/Layouts/Row.tsx
|
|
1346
|
+
var import_styled_components22 = __toESM(require("styled-components"));
|
|
1347
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1348
|
+
var baseStyle10 = import_styled_components22.css`
|
|
1349
|
+
display: flex;
|
|
1350
|
+
flex-direction: row;
|
|
1351
|
+
`;
|
|
1352
|
+
var justifyStyles3 = {
|
|
1353
|
+
center: import_styled_components22.css`
|
|
1354
|
+
height: inherit;
|
|
1355
|
+
width: inherit;
|
|
1356
|
+
justify-content: center;
|
|
1357
|
+
`,
|
|
1358
|
+
start: import_styled_components22.css`
|
|
1359
|
+
height: inherit;
|
|
1360
|
+
width: inherit;
|
|
1361
|
+
justify-content: start;
|
|
1362
|
+
`,
|
|
1363
|
+
end: import_styled_components22.css`
|
|
1364
|
+
height: inherit;
|
|
1365
|
+
width: inherit;
|
|
1366
|
+
justify-content: end;
|
|
1367
|
+
`,
|
|
1368
|
+
FStart: import_styled_components22.css`
|
|
1369
|
+
height: inherit;
|
|
1370
|
+
width: inherit;
|
|
1371
|
+
justify-content: flex-start;
|
|
1372
|
+
`,
|
|
1373
|
+
FEnd: import_styled_components22.css`
|
|
1374
|
+
height: inherit;
|
|
1375
|
+
width: inherit;
|
|
1376
|
+
justify-content: flex-end;
|
|
1377
|
+
`,
|
|
1378
|
+
left: import_styled_components22.css`
|
|
1379
|
+
height: inherit;
|
|
1380
|
+
width: inherit;
|
|
1381
|
+
justify-content: left;
|
|
1382
|
+
`,
|
|
1383
|
+
right: import_styled_components22.css`
|
|
1384
|
+
height: inherit;
|
|
1385
|
+
width: inherit;
|
|
1386
|
+
justify-content: right;
|
|
1387
|
+
`,
|
|
1388
|
+
between: import_styled_components22.css`
|
|
1389
|
+
height: inherit;
|
|
1390
|
+
width: inherit;
|
|
1391
|
+
justify-content: space-between;
|
|
1392
|
+
`,
|
|
1393
|
+
around: import_styled_components22.css`
|
|
1394
|
+
height: inherit;
|
|
1395
|
+
width: inherit;
|
|
1396
|
+
justify-content: space-around;
|
|
1397
|
+
`,
|
|
1398
|
+
even: import_styled_components22.css`
|
|
1399
|
+
height: inherit;
|
|
1400
|
+
width: inherit;
|
|
1401
|
+
justify-content: space-evenly;
|
|
1402
|
+
`
|
|
1403
|
+
};
|
|
1404
|
+
var gapStyles4 = {
|
|
1405
|
+
xs: import_styled_components22.css`
|
|
1406
|
+
gap: 1em;
|
|
1407
|
+
`,
|
|
1408
|
+
sm: import_styled_components22.css`
|
|
1409
|
+
gap: 3em;
|
|
1410
|
+
`,
|
|
1411
|
+
md: import_styled_components22.css`
|
|
1412
|
+
gap: 5em;
|
|
1413
|
+
`,
|
|
1414
|
+
lg: import_styled_components22.css`
|
|
1415
|
+
gap: 7em;
|
|
1416
|
+
`
|
|
1417
|
+
};
|
|
1418
|
+
var CustomDiv3 = import_styled_components22.default.div`
|
|
1419
|
+
${baseStyle10}
|
|
1420
|
+
${({ $justify, $gap }) => import_styled_components22.css`
|
|
1421
|
+
${justifyStyles3[$justify]}
|
|
1422
|
+
${gapStyles4[$gap]}
|
|
1423
|
+
`}
|
|
1424
|
+
`;
|
|
1425
|
+
var Row = ({
|
|
1426
|
+
justify = "center",
|
|
1427
|
+
gap = "xs",
|
|
1428
|
+
children,
|
|
1429
|
+
...rest
|
|
1430
|
+
}) => {
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CustomDiv3, { $justify: justify, $gap: gap, ...rest, children });
|
|
1432
|
+
};
|
|
1433
|
+
var Row_default = Row;
|
|
1434
|
+
|
|
1435
|
+
// src/components/Menus/HorizantalMenu.tsx
|
|
1436
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
1437
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1438
|
+
var baseStyle11 = import_styled_components23.css`
|
|
1439
|
+
padding: 1em 0em 1em 0em;
|
|
1440
|
+
cursor: pointer;
|
|
1441
|
+
font-weight: 600;
|
|
1442
|
+
transistion: all 900ms;
|
|
1443
|
+
display: flex;
|
|
1444
|
+
width: 100%;
|
|
1445
|
+
justify-content: space-between;
|
|
1446
|
+
background-color:rgb(71, 91, 248);
|
|
1447
|
+
`;
|
|
1448
|
+
var StyledMenu2 = import_styled_components23.default.div`
|
|
1449
|
+
${baseStyle11}
|
|
1450
|
+
`;
|
|
1451
|
+
var HorizantalMenu = ({
|
|
1452
|
+
menuItems = ["SampleMenu_1", "SampleMenu_2", "SampleMenu_3"],
|
|
1453
|
+
logo,
|
|
1454
|
+
alt = "logo",
|
|
1455
|
+
href = "#",
|
|
1456
|
+
children,
|
|
1457
|
+
...rest
|
|
1458
|
+
}) => {
|
|
1459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StyledMenu2, { ...rest, children: [
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1461
|
+
"img",
|
|
1462
|
+
{
|
|
1463
|
+
src: logo,
|
|
1464
|
+
alt,
|
|
1465
|
+
width: "36px",
|
|
1466
|
+
height: "36px",
|
|
1467
|
+
style: {
|
|
1468
|
+
mixBlendMode: "multiply",
|
|
1469
|
+
objectFit: "contain"
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
) }),
|
|
1473
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Row_default, { justify: "FEnd", children: menuItems.map((x, i) => {
|
|
1474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: x }, i);
|
|
1475
|
+
}) })
|
|
1476
|
+
] });
|
|
1477
|
+
};
|
|
1478
|
+
var HorizantalMenu_default = HorizantalMenu;
|
|
1479
|
+
|
|
1480
|
+
// src/components/Layouts/Center.tsx
|
|
1481
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
1482
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1483
|
+
var baseStyle12 = import_styled_components24.css`
|
|
1484
|
+
display: flex;
|
|
1485
|
+
height: inherit;
|
|
1486
|
+
width: inherit;
|
|
1487
|
+
justify-content: center;
|
|
1488
|
+
align-items: center;
|
|
1489
|
+
`;
|
|
1490
|
+
var CustomDiv4 = import_styled_components24.default.div`
|
|
1491
|
+
${baseStyle12}
|
|
1492
|
+
`;
|
|
1493
|
+
var Center = ({
|
|
1494
|
+
children,
|
|
1495
|
+
...rest
|
|
1496
|
+
}) => {
|
|
1497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CustomDiv4, { ...rest, children });
|
|
1498
|
+
};
|
|
1499
|
+
var Center_default = Center;
|
|
1500
|
+
|
|
1501
|
+
// src/components/Layouts/Col.tsx
|
|
1502
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
1503
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1504
|
+
var baseStyle13 = import_styled_components25.css`
|
|
1505
|
+
display: flex;
|
|
1506
|
+
flex-direction: column;
|
|
1507
|
+
`;
|
|
1508
|
+
var justifyStyles4 = {
|
|
1509
|
+
center: import_styled_components25.css`
|
|
1510
|
+
height: inherit;
|
|
1511
|
+
width: inherit;
|
|
1512
|
+
justify-content: center;
|
|
1513
|
+
`,
|
|
1514
|
+
start: import_styled_components25.css`
|
|
1515
|
+
height: inherit;
|
|
1516
|
+
width: inherit;
|
|
1517
|
+
justify-content: start;
|
|
1518
|
+
`,
|
|
1519
|
+
end: import_styled_components25.css`
|
|
1520
|
+
height: inherit;
|
|
1521
|
+
width: inherit;
|
|
1522
|
+
justify-content: end;
|
|
1523
|
+
`,
|
|
1524
|
+
FStart: import_styled_components25.css`
|
|
1525
|
+
height: inherit;
|
|
1526
|
+
width: inherit;
|
|
1527
|
+
justify-content: flex-start;
|
|
1528
|
+
`,
|
|
1529
|
+
FEnd: import_styled_components25.css`
|
|
1530
|
+
height: inherit;
|
|
1531
|
+
width: inherit;
|
|
1532
|
+
justify-content: flex-end;
|
|
1533
|
+
`,
|
|
1534
|
+
left: import_styled_components25.css`
|
|
1535
|
+
height: inherit;
|
|
1536
|
+
width: inherit;
|
|
1537
|
+
justify-content: left;
|
|
1538
|
+
`,
|
|
1539
|
+
right: import_styled_components25.css`
|
|
1540
|
+
height: inherit;
|
|
1541
|
+
width: inherit;
|
|
1542
|
+
justify-content: right;
|
|
1543
|
+
`,
|
|
1544
|
+
between: import_styled_components25.css`
|
|
1545
|
+
height: inherit;
|
|
1546
|
+
width: inherit;
|
|
1547
|
+
justify-content: space-between;
|
|
1548
|
+
`,
|
|
1549
|
+
around: import_styled_components25.css`
|
|
1550
|
+
height: inherit;
|
|
1551
|
+
width: inherit;
|
|
1552
|
+
justify-content: space-around;
|
|
1553
|
+
`,
|
|
1554
|
+
even: import_styled_components25.css`
|
|
1555
|
+
height: inherit;
|
|
1556
|
+
width: inherit;
|
|
1557
|
+
justify-content: space-evenly;
|
|
1558
|
+
`
|
|
1559
|
+
};
|
|
1560
|
+
var gapStyles5 = {
|
|
1561
|
+
xs: import_styled_components25.css`
|
|
1562
|
+
gap: 1em;
|
|
1563
|
+
`,
|
|
1564
|
+
sm: import_styled_components25.css`
|
|
1565
|
+
gap: 3em;
|
|
1566
|
+
`,
|
|
1567
|
+
md: import_styled_components25.css`
|
|
1568
|
+
gap: 5em;
|
|
1569
|
+
`,
|
|
1570
|
+
lg: import_styled_components25.css`
|
|
1571
|
+
gap: 7em;
|
|
1572
|
+
`
|
|
1573
|
+
};
|
|
1574
|
+
var CustomDiv5 = import_styled_components25.default.div`
|
|
1575
|
+
${baseStyle13}
|
|
1576
|
+
${({ $justify, $gap }) => import_styled_components25.css`
|
|
1577
|
+
${justifyStyles4[$justify]}
|
|
1578
|
+
${gapStyles5[$gap]}
|
|
1579
|
+
`}
|
|
1580
|
+
`;
|
|
1581
|
+
var Col = ({
|
|
1582
|
+
justify = "center",
|
|
1583
|
+
gap = "xs",
|
|
1584
|
+
children,
|
|
1585
|
+
...rest
|
|
1586
|
+
}) => {
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CustomDiv5, { $justify: justify, $gap: gap, ...rest, children });
|
|
1588
|
+
};
|
|
1589
|
+
var Col_default = Col;
|
|
1590
|
+
|
|
1591
|
+
// src/components/Layouts/Container.tsx
|
|
1592
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
1593
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1594
|
+
var baseStyle14 = import_styled_components26.css`
|
|
1595
|
+
padding: 1em;
|
|
1596
|
+
`;
|
|
1597
|
+
var sizeStyles4 = {
|
|
1598
|
+
xs: import_styled_components26.css`
|
|
1599
|
+
max-width: 576px;
|
|
1600
|
+
width: 100%;
|
|
1601
|
+
display: flex;
|
|
1602
|
+
margin-left: auto;
|
|
1603
|
+
margin-right: auto;
|
|
1604
|
+
align-items: center;
|
|
1605
|
+
justify-content: center;
|
|
1606
|
+
height: 100vh;
|
|
1607
|
+
`,
|
|
1608
|
+
sm: import_styled_components26.css`
|
|
1609
|
+
max-width: 688px;
|
|
1610
|
+
width: 100%;
|
|
1611
|
+
display: flex;
|
|
1612
|
+
margin-left: auto;
|
|
1613
|
+
margin-right: auto;
|
|
1614
|
+
align-items: center;
|
|
1615
|
+
justify-content: center;
|
|
1616
|
+
height: 100vh;
|
|
1617
|
+
`,
|
|
1618
|
+
md: import_styled_components26.css`
|
|
1619
|
+
max-width: 768px;
|
|
1620
|
+
width: 100%;
|
|
1621
|
+
display: flex;
|
|
1622
|
+
margin-left: auto;
|
|
1623
|
+
margin-right: auto;
|
|
1624
|
+
align-items: center;
|
|
1625
|
+
justify-content: center;
|
|
1626
|
+
height: 100vh;
|
|
1627
|
+
`,
|
|
1628
|
+
lg: import_styled_components26.css`
|
|
1629
|
+
max-width: 100%;
|
|
1630
|
+
width: 100%;
|
|
1631
|
+
display: flex;
|
|
1632
|
+
padding: 0px;
|
|
1633
|
+
margin-left: auto;
|
|
1634
|
+
margin-right: auto;
|
|
1635
|
+
align-items: center;
|
|
1636
|
+
justify-content: center;
|
|
1637
|
+
height: 100vh;
|
|
1638
|
+
`
|
|
1639
|
+
};
|
|
1640
|
+
var flexStyles = {
|
|
1641
|
+
row: import_styled_components26.css`
|
|
1642
|
+
width: inherit;
|
|
1643
|
+
display: flex;
|
|
1644
|
+
flex-direction: row;
|
|
1645
|
+
`,
|
|
1646
|
+
col: import_styled_components26.css`
|
|
1647
|
+
width: inherit;
|
|
1648
|
+
display: flex;
|
|
1649
|
+
flex-direction: column;
|
|
1650
|
+
`
|
|
1651
|
+
};
|
|
1652
|
+
var gapStyles6 = {
|
|
1653
|
+
xs: import_styled_components26.css`
|
|
1654
|
+
gap: 1em;
|
|
1655
|
+
`,
|
|
1656
|
+
sm: import_styled_components26.css`
|
|
1657
|
+
gap: 3em;
|
|
1658
|
+
`,
|
|
1659
|
+
md: import_styled_components26.css`
|
|
1660
|
+
gap: 5em;
|
|
1661
|
+
`,
|
|
1662
|
+
lg: import_styled_components26.css`
|
|
1663
|
+
gap: 7em;
|
|
1664
|
+
`
|
|
1665
|
+
};
|
|
1666
|
+
var CustomDiv6 = import_styled_components26.default.div`
|
|
1667
|
+
${baseStyle14}
|
|
1668
|
+
${({ $size, $flex, $gap }) => import_styled_components26.css`
|
|
1669
|
+
${sizeStyles4[$size]}
|
|
1670
|
+
${flexStyles[$flex]}
|
|
1671
|
+
${gapStyles6[$gap]}
|
|
1672
|
+
`}
|
|
1673
|
+
`;
|
|
1674
|
+
var Container = ({
|
|
1675
|
+
size = "lg",
|
|
1676
|
+
flex = "row",
|
|
1677
|
+
gap = "xs",
|
|
1678
|
+
children,
|
|
1679
|
+
...rest
|
|
1680
|
+
}) => {
|
|
1681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CustomDiv6, { $size: size, $flex: flex, $gap: gap, ...rest, children });
|
|
1682
|
+
};
|
|
1683
|
+
var Container_default = Container;
|
|
1684
|
+
|
|
1685
|
+
// src/components/Layouts/Grid.tsx
|
|
1686
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
1687
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1688
|
+
var baseStyle15 = import_styled_components27.css`
|
|
1689
|
+
display: grid;
|
|
1690
|
+
width: 100%;
|
|
1691
|
+
`;
|
|
1692
|
+
var gapStyles7 = {
|
|
1693
|
+
xs: import_styled_components27.css`
|
|
1694
|
+
gap: 0.5rem;
|
|
1695
|
+
`,
|
|
1696
|
+
sm: import_styled_components27.css`
|
|
1697
|
+
gap: 1rem;
|
|
1698
|
+
`,
|
|
1699
|
+
md: import_styled_components27.css`
|
|
1700
|
+
gap: 2rem;
|
|
1701
|
+
`,
|
|
1702
|
+
lg: import_styled_components27.css`
|
|
1703
|
+
gap: 3rem;
|
|
1704
|
+
`
|
|
1705
|
+
};
|
|
1706
|
+
var StyledGrid = import_styled_components27.default.div`
|
|
1707
|
+
${baseStyle15}
|
|
1708
|
+
|
|
1709
|
+
${({ $columns }) => import_styled_components27.css`
|
|
1710
|
+
grid-template-columns: repeat(${$columns}, minmax(0, 1fr));
|
|
1711
|
+
`}
|
|
1712
|
+
|
|
1713
|
+
${({ $rows }) => $rows && import_styled_components27.css`
|
|
1714
|
+
grid-template-rows: repeat(${$rows}, 1fr);
|
|
1715
|
+
`}
|
|
1716
|
+
|
|
1717
|
+
${({ $gap }) => gapStyles7[$gap]}
|
|
1718
|
+
`;
|
|
1719
|
+
var Grid2 = ({
|
|
1720
|
+
columns = 12,
|
|
1721
|
+
rows,
|
|
1722
|
+
gap = "sm",
|
|
1723
|
+
children,
|
|
1724
|
+
...rest
|
|
1725
|
+
}) => {
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1727
|
+
StyledGrid,
|
|
1728
|
+
{
|
|
1729
|
+
$columns: columns,
|
|
1730
|
+
$rows: rows,
|
|
1731
|
+
$gap: gap,
|
|
1732
|
+
...rest,
|
|
1733
|
+
children
|
|
1734
|
+
}
|
|
1735
|
+
);
|
|
1736
|
+
};
|
|
1737
|
+
var Grid_default = Grid2;
|
|
1738
|
+
|
|
1739
|
+
// src/components/Layouts/Stack.tsx
|
|
1740
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
1741
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1742
|
+
var baseStyle16 = import_styled_components28.css`
|
|
1743
|
+
display: flex;
|
|
1744
|
+
width: 100%;
|
|
1745
|
+
`;
|
|
1746
|
+
var directionStyles = {
|
|
1747
|
+
vertical: import_styled_components28.css`
|
|
1748
|
+
flex-direction: column;
|
|
1749
|
+
`,
|
|
1750
|
+
horizontal: import_styled_components28.css`
|
|
1751
|
+
flex-direction: row;
|
|
1752
|
+
`
|
|
1753
|
+
};
|
|
1754
|
+
var gapStyles8 = {
|
|
1755
|
+
xs: import_styled_components28.css`
|
|
1756
|
+
gap: 0.5rem;
|
|
1757
|
+
`,
|
|
1758
|
+
sm: import_styled_components28.css`
|
|
1759
|
+
gap: 1rem;
|
|
1760
|
+
`,
|
|
1761
|
+
md: import_styled_components28.css`
|
|
1762
|
+
gap: 2rem;
|
|
1763
|
+
`,
|
|
1764
|
+
lg: import_styled_components28.css`
|
|
1765
|
+
gap: 3rem;
|
|
1766
|
+
`
|
|
1767
|
+
};
|
|
1768
|
+
var StyledStack = import_styled_components28.default.div`
|
|
1769
|
+
${baseStyle16}
|
|
1770
|
+
${({ $direction }) => directionStyles[$direction]}
|
|
1771
|
+
${({ $gap }) => gapStyles8[$gap]}
|
|
1772
|
+
`;
|
|
1773
|
+
var Stack = ({
|
|
1774
|
+
direction = "vertical",
|
|
1775
|
+
gap = "sm",
|
|
1776
|
+
children,
|
|
1777
|
+
...rest
|
|
1778
|
+
}) => {
|
|
1779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StyledStack, { $direction: direction, $gap: gap, ...rest, children });
|
|
1780
|
+
};
|
|
1781
|
+
var Stack_default = Stack;
|
|
1782
|
+
|
|
1783
|
+
// src/components/Notification/NotificationProvider.tsx
|
|
1784
|
+
var import_react6 = require("react");
|
|
1785
|
+
var import_react_dom5 = require("react-dom");
|
|
1786
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
1787
|
+
|
|
1788
|
+
// src/components/Notification/toast.ts
|
|
1789
|
+
var notifyRef = null;
|
|
1790
|
+
var registerToast = (fn) => {
|
|
1791
|
+
notifyRef = fn;
|
|
1792
|
+
};
|
|
1793
|
+
var toast = {
|
|
1794
|
+
success(message, duration) {
|
|
1795
|
+
notifyRef?.({ type: "success", message, duration });
|
|
1796
|
+
},
|
|
1797
|
+
error(message, duration) {
|
|
1798
|
+
notifyRef?.({ type: "error", message, duration });
|
|
1799
|
+
},
|
|
1800
|
+
info(message, duration) {
|
|
1801
|
+
notifyRef?.({ type: "info", message, duration });
|
|
1802
|
+
},
|
|
1803
|
+
warning(message, duration) {
|
|
1804
|
+
notifyRef?.({ type: "warning", message, duration });
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
// src/components/Notification/NotificationProvider.tsx
|
|
1809
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1810
|
+
var NotificationContext = (0, import_react6.createContext)(null);
|
|
1811
|
+
var useNotification = () => {
|
|
1812
|
+
const ctx = (0, import_react6.useContext)(NotificationContext);
|
|
1813
|
+
if (!ctx) {
|
|
1814
|
+
throw new Error("useNotification must be used inside NotificationProvider");
|
|
1815
|
+
}
|
|
1816
|
+
return ctx;
|
|
1817
|
+
};
|
|
1818
|
+
var Container2 = import_styled_components29.default.div`
|
|
1819
|
+
position: fixed;
|
|
1820
|
+
top: 1rem;
|
|
1821
|
+
right: 1rem;
|
|
1822
|
+
display: flex;
|
|
1823
|
+
flex-direction: column;
|
|
1824
|
+
gap: 0.75rem;
|
|
1825
|
+
z-index: 2000;
|
|
1826
|
+
`;
|
|
1827
|
+
var Item2 = import_styled_components29.default.div`
|
|
1828
|
+
min-width: 280px;
|
|
1829
|
+
padding: 0.75rem 1rem;
|
|
1830
|
+
border-radius: 8px;
|
|
1831
|
+
background: #fff;
|
|
1832
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
|
1833
|
+
border-left: 4px solid
|
|
1834
|
+
${({ $type }) => ({
|
|
1835
|
+
success: "#2e7d32",
|
|
1836
|
+
error: "#d32f2f",
|
|
1837
|
+
info: "#0288d1",
|
|
1838
|
+
warning: "#ed6c02"
|
|
1839
|
+
})[$type]};
|
|
1840
|
+
`;
|
|
1841
|
+
var Title = import_styled_components29.default.div`
|
|
1842
|
+
font-weight: 600;
|
|
1843
|
+
margin-bottom: 0.25rem;
|
|
1844
|
+
`;
|
|
1845
|
+
var Message = import_styled_components29.default.div`
|
|
1846
|
+
font-size: 0.875rem;
|
|
1847
|
+
line-height: 1.4;
|
|
1848
|
+
`;
|
|
1849
|
+
var NotificationProvider = ({ children }) => {
|
|
1850
|
+
const [items, setItems] = (0, import_react6.useState)([]);
|
|
1851
|
+
const notify = (notice) => {
|
|
1852
|
+
const id = crypto.randomUUID();
|
|
1853
|
+
const item = { ...notice, id };
|
|
1854
|
+
setItems((prev) => [...prev, item]);
|
|
1855
|
+
if (notice.duration !== 0) {
|
|
1856
|
+
setTimeout(() => {
|
|
1857
|
+
setItems((prev) => prev.filter((n) => n.id !== id));
|
|
1858
|
+
}, notice.duration ?? 3e3);
|
|
1859
|
+
}
|
|
1860
|
+
};
|
|
1861
|
+
(0, import_react6.useEffect)(() => {
|
|
1862
|
+
registerToast(notify);
|
|
1863
|
+
}, []);
|
|
1864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(NotificationContext.Provider, { value: { notify }, children: [
|
|
1865
|
+
children,
|
|
1866
|
+
(0, import_react_dom5.createPortal)(
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Container2, { children: items.map((n) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Item2, { $type: n.type, children: [
|
|
1868
|
+
n.title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Title, { children: n.title }),
|
|
1869
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Message, { children: n.message })
|
|
1870
|
+
] }, n.id)) }),
|
|
1871
|
+
document.body
|
|
1872
|
+
)
|
|
1873
|
+
] });
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
// src/components/Notification/useToast.ts
|
|
1877
|
+
var useToast = () => {
|
|
1878
|
+
const { notify } = useNotification();
|
|
1879
|
+
return {
|
|
1880
|
+
success: (message, duration) => notify({ type: "success", message, duration }),
|
|
1881
|
+
error: (message, duration) => notify({ type: "error", message, duration }),
|
|
1882
|
+
info: (message, duration) => notify({ type: "info", message, duration }),
|
|
1883
|
+
warning: (message, duration) => notify({ type: "warning", message, duration })
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1286
1886
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1287
1887
|
0 && (module.exports = {
|
|
1288
1888
|
Box,
|
|
1289
1889
|
Button,
|
|
1290
1890
|
Card,
|
|
1891
|
+
Center,
|
|
1892
|
+
CenterMenu,
|
|
1291
1893
|
Checkbox,
|
|
1894
|
+
Col,
|
|
1895
|
+
Container,
|
|
1292
1896
|
DatePicker,
|
|
1293
1897
|
Divider,
|
|
1294
1898
|
Drawer,
|
|
1295
1899
|
Flex,
|
|
1296
1900
|
Form,
|
|
1297
1901
|
FormControl,
|
|
1902
|
+
Grid,
|
|
1298
1903
|
Heading,
|
|
1904
|
+
HorizantalMenu,
|
|
1299
1905
|
Input,
|
|
1300
1906
|
Link,
|
|
1301
1907
|
Modal,
|
|
1908
|
+
NotificationProvider,
|
|
1302
1909
|
Paragraph,
|
|
1303
1910
|
Radio,
|
|
1911
|
+
Row,
|
|
1304
1912
|
Select,
|
|
1913
|
+
Stack,
|
|
1305
1914
|
Switch,
|
|
1306
1915
|
Text,
|
|
1307
|
-
Textarea
|
|
1916
|
+
Textarea,
|
|
1917
|
+
toast,
|
|
1918
|
+
useToast
|
|
1308
1919
|
});
|
|
1309
1920
|
//# sourceMappingURL=index.js.map
|