@joza/joza-ui-kit 0.1.0 → 0.1.1

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.
Files changed (54) hide show
  1. package/dist/joza-ui-kit.es.css +2177 -0
  2. package/dist/joza-ui-kit.es.js +2 -333
  3. package/dist/joza-ui-kit.es.js.map +1 -1
  4. package/dist/joza-ui-kit.umd.css +2177 -0
  5. package/dist/joza-ui-kit.umd.js +5 -339
  6. package/dist/joza-ui-kit.umd.js.map +1 -1
  7. package/dist/types/App.d.ts +2 -0
  8. package/dist/types/component/basic/alert/Alert.d.ts +16 -0
  9. package/dist/types/component/basic/alert/Alert.stories.d.ts +13 -0
  10. package/dist/types/component/basic/alert/index.d.ts +2 -0
  11. package/dist/types/component/basic/animated-stat/animated-stat.d.ts +7 -0
  12. package/dist/types/component/basic/button/Button.d.ts +11 -0
  13. package/dist/types/component/basic/button/Button.stories.d.ts +19 -0
  14. package/dist/types/component/basic/button/index.d.ts +2 -0
  15. package/dist/types/component/basic/button2/button2.d.ts +13 -0
  16. package/dist/types/component/basic/carousel/carousel.d.ts +6 -0
  17. package/dist/types/component/basic/form/form-input.d.ts +12 -0
  18. package/dist/types/component/basic/form/form-row.d.ts +6 -0
  19. package/dist/types/component/basic/form/form.d.ts +11 -0
  20. package/dist/types/component/basic/hamburger-menu/HamburgerMenu.d.ts +12 -0
  21. package/dist/types/component/basic/hamburger-menu/HamburgerMenu.stories.d.ts +15 -0
  22. package/dist/types/component/basic/hamburger-menu/index.d.ts +2 -0
  23. package/dist/types/component/basic/horizontal-menu/horizontal-menu.d.ts +8 -0
  24. package/dist/types/component/basic/horizontal-points/horizontal-points.d.ts +5 -0
  25. package/dist/types/component/basic/section-header/section-header.d.ts +9 -0
  26. package/dist/types/component/basic/vertical-points/vertical-points.d.ts +5 -0
  27. package/dist/types/component/container/card/Card.d.ts +12 -0
  28. package/dist/types/component/container/card/Card.stories.d.ts +17 -0
  29. package/dist/types/component/container/card/index.d.ts +2 -0
  30. package/dist/types/component/container/pop-in/PopIn.d.ts +11 -0
  31. package/dist/types/component/container/pop-in/PopIn.stories.d.ts +20 -0
  32. package/dist/types/component/container/pop-in/index.d.ts +2 -0
  33. package/dist/types/component/domain/domain.d.ts +12 -0
  34. package/dist/types/component/layout/footer/footer.d.ts +6 -0
  35. package/dist/types/component/layout/glowing-back/glowing-back.d.ts +6 -0
  36. package/dist/types/component/layout/info-card/info-card-group.d.ts +8 -0
  37. package/dist/types/component/layout/info-card/info-card.d.ts +15 -0
  38. package/dist/types/component/layout/landing-page/landing-page.d.ts +2 -0
  39. package/dist/types/component/layout/responsive-grid/responsive-grid.d.ts +8 -0
  40. package/dist/types/component/layout/section/section.d.ts +9 -0
  41. package/dist/types/component/layout/two-columns/two-columns.d.ts +9 -0
  42. package/dist/types/index.d.ts +3 -0
  43. package/dist/types/main.d.ts +1 -0
  44. package/dist/types/page/alert-page.d.ts +2 -0
  45. package/dist/types/page/button-page.d.ts +2 -0
  46. package/dist/types/page/card-page.d.ts +2 -0
  47. package/dist/types/page/hamburger-menu-page.d.ts +2 -0
  48. package/dist/types/page/home-page.d.ts +2 -0
  49. package/dist/types/page/landing-page-layout-page.d.ts +2 -0
  50. package/dist/types/page/pop-in-page.d.ts +2 -0
  51. package/dist/types/router/router.d.ts +2 -0
  52. package/dist/types/util/sx.d.ts +5 -0
  53. package/package.json +5 -3
  54. package/dist/index.d.ts +0 -61
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["joza-ui-kit"] = {}, global.React, global.styled));
5
- })(this, (function (exports, require$$0, styled) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('react')) :
3
+ typeof define === 'function' && define.amd ? define(['react'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React));
5
+ })(this, (function (require$$0) { 'use strict';
6
6
 
7
7
  var jsxRuntime = {exports: {}};
8
8
 
@@ -1365,341 +1365,7 @@
1365
1365
  return jsxRuntime.exports;
1366
1366
  }
1367
1367
 
1368
- var jsxRuntimeExports = requireJsxRuntime();
1369
-
1370
- const applySx = (props) => {
1371
- if (!props.sx)
1372
- return '';
1373
- return Object.entries(props.sx).map(([property, value]) => {
1374
- return `${property}: ${value};`;
1375
- }).join('\n');
1376
- };
1377
-
1378
- const StyledButton = styled.button `
1379
- border: none;
1380
- border-radius: 12px;
1381
- cursor: pointer;
1382
- font-weight: bold;
1383
- transition: background-color 0.3s, box-shadow 0.3s;
1384
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1385
- font-family: ${props => props.fontFamily || 'Arial, sans-serif'};
1386
-
1387
- ${props => props.size === 's' && styled.css `
1388
- padding: 6px 12px;
1389
- font-size: 12px;
1390
- `}
1391
-
1392
- ${props => props.size === 'm' && styled.css `
1393
- padding: 10px 20px;
1394
- font-size: 14px;
1395
- `}
1396
-
1397
- ${props => props.size === 'l' && styled.css `
1398
- padding: 14px 28px;
1399
- font-size: 16px;
1400
- `}
1401
-
1402
- ${props => props.variant === 'primary' && styled.css `
1403
- background-color: #007bff;
1404
- color: #ffffff;
1405
- &:hover {
1406
- background-color: #0056b3;
1407
- box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
1408
- }
1409
- `}
1410
-
1411
- ${props => props.variant === 'secondary' && styled.css `
1412
- background-color: #28a745;
1413
- color: #ffffff;
1414
- &:hover {
1415
- background-color: #1e7e34;
1416
- box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
1417
- }
1418
- `}
1419
-
1420
- ${props => props.variant === 'tertiary' && styled.css `
1421
- background-color: #dc3545;
1422
- color: #ffffff;
1423
- &:hover {
1424
- background-color: #bd2130;
1425
- box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
1426
- }
1427
- `}
1428
-
1429
- ${applySx}
1430
- `;
1431
- const Button = ({ size = 'm', variant = 'primary', fontFamily = 'Arial, sans-serif', children, onClick, disabled = false, sx }) => {
1432
- if (disabled) {
1433
- return null;
1434
- }
1435
- return (jsxRuntimeExports.jsx(StyledButton, { size: size, variant: variant, fontFamily: fontFamily, onClick: onClick, sx: sx, children: children }));
1436
- };
1437
-
1438
- const StyledAlertContainer = styled.div `
1439
- background: #fff;
1440
- border-radius: 8px;
1441
- padding: 24px 32px 24px 24px;
1442
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
1443
- position: fixed;
1444
- z-index: 1000;
1445
- margin: 1rem;
1446
-
1447
- ${props => props.size === 's' && styled.css `
1448
- min-width: 180px;
1449
- max-width: 60vw;
1450
- font-size: 0.9rem;
1451
- `}
1452
-
1453
- ${props => props.size === 'm' && styled.css `
1454
- min-width: 280px;
1455
- max-width: 90vw;
1456
- font-size: 1rem;
1457
- `}
1458
-
1459
- ${props => props.size === 'l' && styled.css `
1460
- min-width: 380px;
1461
- max-width: 100vw;
1462
- font-size: 1.15rem;
1463
- `}
1464
-
1465
- ${props => props.position === 'top-left' && styled.css `top: 0; left: 0;`}
1466
- ${props => props.position === 'top-center' && styled.css `top: 0; left: 50%; transform: translateX(-50%);`}
1467
- ${props => props.position === 'top-right' && styled.css `top: 0; right: 0;`}
1468
- ${props => props.position === 'bottom-left' && styled.css `bottom: 0; left: 0;`}
1469
- ${props => props.position === 'bottom-center' && styled.css `bottom: 0; left: 50%; transform: translateX(-50%);`}
1470
- ${props => props.position === 'bottom-right' && styled.css `bottom: 0; right: 0;`}
1471
-
1472
- ${props => props.type === 'info' && styled.css `
1473
- background: #e3f2fd;
1474
- border-left: 6px solid #2196f3;
1475
- color: #0d47a1;
1476
- `}
1477
-
1478
- ${props => props.type === 'success' && styled.css `
1479
- background: #e8f5e9;
1480
- border-left: 6px solid #4caf50;
1481
- color: #1b5e20;
1482
- `}
1483
-
1484
- ${props => props.type === 'warning' && styled.css `
1485
- background: #fff3e0;
1486
- border-left: 6px solid #ff9800;
1487
- color: #e65100;
1488
- `}
1489
-
1490
- ${props => props.type === 'error' && styled.css `
1491
- background: #ffebee;
1492
- border-left: 6px solid #f44336;
1493
- color: #b71c1c;
1494
- `}
1495
-
1496
- ${applySx}
1497
- `;
1498
- const AlertContent = styled.div `
1499
- margin-top: 10px;
1500
- word-break: break-word;
1501
- `;
1502
- const Alert = ({ isOpen, type = 'info', size = 'm', timeout, onClose, position = 'bottom-right', children, disabled = false, sx }) => {
1503
- require$$0.useEffect(() => {
1504
- if (isOpen && timeout && onClose) {
1505
- const timer = setTimeout(onClose, timeout);
1506
- return () => clearTimeout(timer);
1507
- }
1508
- }, [isOpen, timeout, onClose]);
1509
- if (!isOpen || disabled)
1510
- return null;
1511
- return (jsxRuntimeExports.jsx(StyledAlertContainer, { isOpen: isOpen, type: type, size: size, position: position, role: "alert", sx: sx, children: jsxRuntimeExports.jsx(AlertContent, { children: children }) }));
1512
- };
1513
-
1514
- const StyledCard = styled.div `
1515
- background: #fff;
1516
- border-radius: 12px;
1517
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1518
- padding: 20px;
1519
- margin: 20px auto;
1520
- transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
1521
- overflow: hidden;
1522
- max-width: 100%;
1523
-
1524
- ${props => props.size === 's' && styled.css `
1525
- width: 200px;
1526
- font-size: 0.875rem;
1527
- `}
1528
-
1529
- ${props => props.size === 'm' && styled.css `
1530
- width: 300px;
1531
- font-size: 1rem;
1532
- `}
1533
-
1534
- ${props => props.size === 'l' && styled.css `
1535
- width: 400px;
1536
- font-size: 1.25rem;
1537
- `}
1538
-
1539
- ${props => props.hover && styled.css `
1540
- &:hover {
1541
- transform: translateY(-5px);
1542
- box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
1543
- }
1544
- `}
1545
-
1546
- ${applySx}
1547
- `;
1548
- const CardContainer = styled.div `
1549
- display: flex;
1550
- flex-direction: column;
1551
- align-items: center;
1552
- width: 100%;
1553
- min-width: 0;
1554
- `;
1555
- const CardContent = styled.div `
1556
- color: #333;
1557
- width: 100%;
1558
- overflow-wrap: break-word;
1559
- word-break: break-word;
1560
-
1561
- img {
1562
- width: 100%;
1563
- height: auto;
1564
- object-fit: fill;
1565
- border-radius: 4px;
1566
- }
1567
- `;
1568
- const Card = ({ children, size = 'm', hover = false, onClick, disabled = false, sx }) => {
1569
- if (disabled) {
1570
- return null;
1571
- }
1572
- return (jsxRuntimeExports.jsx(StyledCard, { size: size, hover: hover, onClick: onClick, sx: sx, children: jsxRuntimeExports.jsx(CardContainer, { children: jsxRuntimeExports.jsx(CardContent, { children: children }) }) }));
1573
- };
1574
-
1575
- const MenuOverlay = styled.div `
1576
- position: fixed;
1577
- top: 0;
1578
- left: 0;
1579
- width: 100%;
1580
- height: 100%;
1581
- background: rgba(0, 0, 0, 0.5);
1582
- z-index: 1000;
1583
- `;
1584
- const MenuContainer = styled.div `
1585
- position: fixed;
1586
- top: 0;
1587
- background: #fff;
1588
- border-radius: 8px;
1589
- padding: 20px;
1590
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1591
- display: flex;
1592
- flex-direction: column;
1593
- z-index: 1001;
1594
- width: ${props => props.width};
1595
- height: ${props => props.height};
1596
- ${props => props.position === 'right' ? 'right: 0; left: auto;' : 'left: 0; right: auto;'}
1597
-
1598
- ${applySx}
1599
- `;
1600
- const CloseButton$1 = styled.button `
1601
- position: absolute;
1602
- top: 10px;
1603
- right: 10px;
1604
- background: none;
1605
- border: none;
1606
- font-size: 1.5rem;
1607
- cursor: pointer;
1608
- `;
1609
- const MenuContent = styled.div `
1610
- margin-top: 10px;
1611
- display: flex;
1612
- flex-direction: column;
1613
- gap: 10px;
1614
- `;
1615
- const HamburgerButton = styled.button `
1616
- background: none;
1617
- border: none;
1618
- cursor: pointer;
1619
- display: flex;
1620
- flex-direction: column;
1621
- gap: 5px;
1622
- padding: 10px;
1623
- z-index: 1001;
1624
- align-items: center;
1625
- `;
1626
- const Line = styled.span `
1627
- width: 25px;
1628
- height: 3px;
1629
- background-color: black;
1630
- border-radius: 2px;
1631
- `;
1632
- const HamburgerMenu = ({ children, position = 'left', width = '30vw', height = '100vh', disabled = false, sx }) => {
1633
- const [isOpen, setIsOpen] = require$$0.useState(false);
1634
- const toggleMenu = () => setIsOpen(prev => !prev);
1635
- const closeMenu = () => setIsOpen(false);
1636
- if (disabled) {
1637
- return null;
1638
- }
1639
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs(HamburgerButton, { onClick: toggleMenu, children: [jsxRuntimeExports.jsx(Line, {}), jsxRuntimeExports.jsx(Line, {}), jsxRuntimeExports.jsx(Line, {})] }), isOpen && (jsxRuntimeExports.jsx(MenuOverlay, { onClick: closeMenu, children: jsxRuntimeExports.jsxs(MenuContainer, { position: position, width: width, height: height, sx: sx, onClick: e => e.stopPropagation(), children: [jsxRuntimeExports.jsx(CloseButton$1, { onClick: closeMenu, children: "\u00D7" }), jsxRuntimeExports.jsx(MenuContent, { children: children })] }) }))] }));
1640
- };
1641
-
1642
- const PopinOverlay = styled.div `
1643
- position: fixed;
1644
- top: 0;
1645
- left: 0;
1646
- width: 100%;
1647
- height: 100%;
1648
- background: rgba(0, 0, 0, 0.5);
1649
- display: flex;
1650
- justify-content: center;
1651
- align-items: center;
1652
- z-index: 1000;
1653
- opacity: ${props => props.$isOpen ? 1 : 0};
1654
- pointer-events: ${props => props.$isOpen ? 'auto' : 'none'};
1655
- transition: opacity 0.3s;
1656
- `;
1657
- const PopinContainer = styled.div `
1658
- background: #fff;
1659
- border-radius: 8px;
1660
- padding: 20px;
1661
- width: 90%;
1662
- max-width: 500px;
1663
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1664
- position: relative;
1665
- opacity: ${props => props.$isOpen ? 1 : 0};
1666
- pointer-events: ${props => props.$isOpen ? 'auto' : 'none'};
1667
- transition: opacity 0.3s;
1668
-
1669
- ${applySx}
1670
- `;
1671
- const CloseButton = styled.button `
1672
- position: absolute;
1673
- top: 10px;
1674
- right: 10px;
1675
- background: none;
1676
- border: none;
1677
- font-size: 1.5rem;
1678
- cursor: pointer;
1679
- `;
1680
- const Content = styled.div `
1681
- margin-top: 10px;
1682
- `;
1683
- const Popin = ({ isOpen, onClose, children, disabled = false, sx }) => {
1684
- const [show, setShow] = require$$0.useState(isOpen);
1685
- require$$0.useEffect(() => {
1686
- if (isOpen)
1687
- setShow(true);
1688
- else {
1689
- const timeout = setTimeout(() => setShow(false), 300);
1690
- return () => clearTimeout(timeout);
1691
- }
1692
- }, [isOpen]);
1693
- if (!show || disabled)
1694
- return null;
1695
- return (jsxRuntimeExports.jsx(PopinOverlay, { "$isOpen": isOpen, onClick: onClose, children: jsxRuntimeExports.jsxs(PopinContainer, { "$isOpen": isOpen, sx: sx, onClick: e => e.stopPropagation(), children: [jsxRuntimeExports.jsx(CloseButton, { onClick: onClose, children: "\u00D7" }), jsxRuntimeExports.jsx(Content, { children: children })] }) }));
1696
- };
1697
-
1698
- exports.Alert = Alert;
1699
- exports.Button = Button;
1700
- exports.Card = Card;
1701
- exports.HamburgerMenu = HamburgerMenu;
1702
- exports.Popin = Popin;
1368
+ requireJsxRuntime();
1703
1369
 
1704
1370
  }));
1705
1371
  //# sourceMappingURL=joza-ui-kit.umd.js.map