@contenify/chatbot 0.1.4 → 1.0.0

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/styles.css CHANGED
@@ -216,11 +216,14 @@
216
216
  HeaderBar.tsx
217
217
  ======================================== */
218
218
  .cnfy-header {
219
- position: sticky;
220
- top: 0;
221
- z-index: 40;
222
- background-color: var(--cnfy-white);
223
- border-bottom: 1px solid var(--cnfy-gray-200);
219
+ z-index: 40;
220
+ background-color: var(--cnfy-white);
221
+ border-bottom: 1px solid var(--cnfy-gray-200);
222
+ position: sticky;
223
+ top: 0;
224
+ width: 95%;
225
+ margin-left: auto;
226
+ margin-right: auto;
224
227
  }
225
228
 
226
229
  .cnfy-header-inner {
@@ -579,17 +582,18 @@
579
582
 
580
583
  /* News Dropdown */
581
584
  .cnfy-news-dropdown {
582
- position: absolute;
583
- bottom: 100%;
584
- left: 0;
585
- margin-bottom: 0.5rem;
586
- width: 600px;
587
- background-color: var(--cnfy-white);
588
- border: 1px solid var(--cnfy-gray-200);
589
- border-radius: 0.5rem;
590
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
591
- max-height: 600px;
592
- overflow: hidden;
585
+ background-color: var(--cnfy-white);
586
+ border: 1px solid var(--cnfy-gray-200);
587
+ border-radius: .5rem;
588
+ width: 600px;
589
+ max-height: 600px;
590
+ margin-bottom: .5rem;
591
+ position: absolute;
592
+ bottom: 100%;
593
+ left: 0;
594
+ z-index: 9999;
595
+ overflow: hidden;
596
+ box-shadow: 0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;
593
597
  }
594
598
 
595
599
  .cnfy-news-dropdown-header {
@@ -629,8 +633,9 @@
629
633
  }
630
634
 
631
635
  .cnfy-news-dropdown-select-wrap {
632
- flex: 1;
633
- min-width: 180px;
636
+ flex: 1;
637
+ min-width: 180px;
638
+ margin-right: 10px;
634
639
  }
635
640
 
636
641
  .cnfy-news-dropdown-list {
@@ -652,16 +657,16 @@
652
657
 
653
658
  /* Chat textarea */
654
659
  .cnfy-chat-textarea {
655
- flex: 1;
656
- resize: none;
657
- overflow: hidden;
658
- border: 1px solid var(--cnfy-gray-300);
659
- border-radius: 50px;
660
- padding: 10px 50px 10px 30px;
661
- font-size: 0.875rem;
662
- height: 50px;
663
- outline: none;
664
- font-family: inherit;
660
+ resize: none;
661
+ border: 1px solid var(--cnfy-gray-300);
662
+ border-radius: 50px;
663
+ outline: none;
664
+ flex: 1;
665
+ height: 50px !important;
666
+ padding: 15px 55px 10px 42px;
667
+ font-family: inherit;
668
+ font-size: .875rem;
669
+ overflow: hidden;
665
670
  }
666
671
 
667
672
  .cnfy-chat-textarea--with-trigger {
@@ -1420,6 +1425,350 @@
1420
1425
  margin-top: 0;
1421
1426
  }
1422
1427
 
1428
+ /* ========================================
1429
+ Drawer.tsx
1430
+ ======================================== */
1431
+ @keyframes cnfy-slide-in-right {
1432
+ from { transform: translateX(100%); }
1433
+ to { transform: translateX(0); }
1434
+ }
1435
+
1436
+ @keyframes cnfy-fade-in {
1437
+ from { opacity: 0; }
1438
+ to { opacity: 1; }
1439
+ }
1440
+
1441
+ .cnfy-drawer-overlay {
1442
+ position: fixed;
1443
+ inset: 0;
1444
+ z-index: 50;
1445
+ display: flex;
1446
+ justify-content: flex-end;
1447
+ }
1448
+
1449
+ .cnfy-drawer-backdrop {
1450
+ position: absolute;
1451
+ inset: 0;
1452
+ background-color: rgba(0, 0, 0, 0.4);
1453
+ animation: cnfy-fade-in 0.2s ease-out;
1454
+ }
1455
+
1456
+ .cnfy-drawer-panel {
1457
+ position: relative;
1458
+ width: 50%;
1459
+ min-width: 360px;
1460
+ max-width: 720px;
1461
+ height: 100%;
1462
+ background-color: var(--cnfy-white);
1463
+ box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
1464
+ display: flex;
1465
+ flex-direction: column;
1466
+ animation: cnfy-slide-in-right 0.25s ease-out;
1467
+ }
1468
+
1469
+ @media (max-width: 768px) {
1470
+ .cnfy-drawer-panel {
1471
+ width: 100%;
1472
+ max-width: none;
1473
+ }
1474
+ }
1475
+
1476
+ .cnfy-drawer-header {
1477
+ display: flex;
1478
+ align-items: center;
1479
+ justify-content: space-between;
1480
+ padding: 1rem 1.5rem;
1481
+ border-bottom: 1px solid var(--cnfy-gray-200);
1482
+ flex-shrink: 0;
1483
+ }
1484
+
1485
+ .cnfy-drawer-title {
1486
+ font-size: 1.125rem;
1487
+ font-weight: 600;
1488
+ color: var(--cnfy-gray-900);
1489
+ margin: 0;
1490
+ }
1491
+
1492
+ .cnfy-drawer-close-btn {
1493
+ padding: 0.5rem;
1494
+ border-radius: 0.375rem;
1495
+ background: none;
1496
+ border: none;
1497
+ cursor: pointer;
1498
+ color: var(--cnfy-gray-400);
1499
+ display: flex;
1500
+ align-items: center;
1501
+ transition: background-color 0.15s, color 0.15s;
1502
+ }
1503
+
1504
+ .cnfy-drawer-close-btn:hover {
1505
+ background-color: var(--cnfy-gray-100);
1506
+ color: var(--cnfy-gray-600);
1507
+ }
1508
+
1509
+ .cnfy-drawer-body {
1510
+ flex: 1;
1511
+ overflow-y: auto;
1512
+ padding: 1.5rem;
1513
+ }
1514
+
1515
+ /* ========================================
1516
+ Preferences Form Styles
1517
+ ======================================== */
1518
+ .cnfy-dash-page {
1519
+ max-width: 48rem;
1520
+ }
1521
+
1522
+ .cnfy-dash-page > * + * {
1523
+ margin-top: 1.5rem;
1524
+ }
1525
+
1526
+ .cnfy-dash-page-title {
1527
+ font-size: 1.5rem;
1528
+ font-weight: 600;
1529
+ margin: 0;
1530
+ }
1531
+
1532
+ .cnfy-dash-page-subtitle {
1533
+ color: var(--cnfy-gray-500);
1534
+ margin: 0;
1535
+ }
1536
+
1537
+ .cnfy-dash-card {
1538
+ background-color: var(--cnfy-white);
1539
+ border-radius: 0.5rem;
1540
+ border: 1px solid var(--cnfy-gray-200);
1541
+ padding: 1.5rem;
1542
+ }
1543
+
1544
+ .cnfy-dash-card > * + * {
1545
+ margin-top: 1.25rem;
1546
+ }
1547
+
1548
+ .cnfy-dash-card-title {
1549
+ font-size: 1.125rem;
1550
+ font-weight: 600;
1551
+ color: var(--cnfy-gray-900);
1552
+ border-bottom: 1px solid var(--cnfy-gray-200);
1553
+ padding-bottom: 0.5rem;
1554
+ margin: 0;
1555
+ }
1556
+
1557
+ .cnfy-dash-card-header {
1558
+ margin-bottom: 1rem;
1559
+ }
1560
+
1561
+ .cnfy-dash-card-title-inline {
1562
+ font-size: 1.125rem;
1563
+ font-weight: 600;
1564
+ color: var(--cnfy-gray-900);
1565
+ margin: 0;
1566
+ }
1567
+
1568
+ .cnfy-dash-card-desc {
1569
+ font-size: 0.875rem;
1570
+ color: var(--cnfy-gray-500);
1571
+ margin: 0.25rem 0 0;
1572
+ }
1573
+
1574
+ .cnfy-dash-field {
1575
+ margin-bottom: 0;
1576
+ }
1577
+
1578
+ .cnfy-dash-label {
1579
+ font-size: 0.875rem;
1580
+ font-weight: 500;
1581
+ display: block;
1582
+ margin-bottom: 0.375rem;
1583
+ color: var(--cnfy-gray-700);
1584
+ }
1585
+
1586
+ .cnfy-dash-label-muted {
1587
+ font-size: 0.875rem;
1588
+ font-weight: 500;
1589
+ color: var(--cnfy-gray-500);
1590
+ }
1591
+
1592
+ .cnfy-dash-label-bold {
1593
+ font-weight: 600;
1594
+ color: var(--cnfy-gray-900);
1595
+ margin: 0.25rem 0 0;
1596
+ }
1597
+
1598
+ .cnfy-dash-input {
1599
+ width: 100%;
1600
+ border: 1px solid var(--cnfy-gray-200);
1601
+ border-radius: 0.5rem;
1602
+ padding: 0.5rem 0.75rem;
1603
+ font-size: 0.875rem;
1604
+ outline: none;
1605
+ font-family: inherit;
1606
+ }
1607
+
1608
+ .cnfy-dash-input:focus {
1609
+ border-color: var(--cnfy-gray-400);
1610
+ }
1611
+
1612
+ .cnfy-dash-hint {
1613
+ margin-top: 0.25rem;
1614
+ font-size: 0.75rem;
1615
+ color: var(--cnfy-gray-500);
1616
+ }
1617
+
1618
+ .cnfy-dash-grid {
1619
+ display: grid;
1620
+ gap: 1rem;
1621
+ }
1622
+
1623
+ .cnfy-dash-grid--sm {
1624
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
1625
+ }
1626
+
1627
+ .cnfy-dash-badge {
1628
+ display: inline-flex;
1629
+ align-items: center;
1630
+ padding: 0.25rem 0.75rem;
1631
+ border-radius: 9999px;
1632
+ font-size: 0.75rem;
1633
+ font-weight: 500;
1634
+ }
1635
+
1636
+ .cnfy-dash-badge--green {
1637
+ background-color: #dcfce7;
1638
+ color: #15803d;
1639
+ }
1640
+
1641
+ .cnfy-dash-badge--yellow {
1642
+ background-color: #fef9c3;
1643
+ color: #a16207;
1644
+ }
1645
+
1646
+ .cnfy-dash-info-text {
1647
+ font-size: 0.875rem;
1648
+ color: var(--cnfy-gray-600);
1649
+ margin-bottom: 0.75rem;
1650
+ }
1651
+
1652
+ .cnfy-dash-btn-save {
1653
+ padding: 0.5rem 1.5rem;
1654
+ border-radius: 0.5rem;
1655
+ color: var(--cnfy-white);
1656
+ font-weight: 500;
1657
+ font-size: 0.875rem;
1658
+ border: none;
1659
+ cursor: pointer;
1660
+ }
1661
+
1662
+ .cnfy-dash-btn-save:disabled {
1663
+ opacity: 0.5;
1664
+ cursor: not-allowed;
1665
+ }
1666
+
1667
+ .cnfy-dash-actions {
1668
+ display: flex;
1669
+ align-items: center;
1670
+ gap: 1rem;
1671
+ }
1672
+
1673
+ .cnfy-dash-success {
1674
+ font-size: 0.875rem;
1675
+ font-weight: 500;
1676
+ }
1677
+
1678
+ /* Toggle switch */
1679
+ .cnfy-toggle {
1680
+ position: relative;
1681
+ display: inline-flex;
1682
+ height: 1.5rem;
1683
+ width: 2.75rem;
1684
+ flex-shrink: 0;
1685
+ cursor: pointer;
1686
+ border-radius: 9999px;
1687
+ border: 2px solid transparent;
1688
+ transition: background-color 0.2s ease-in-out;
1689
+ outline: none;
1690
+ background: none;
1691
+ padding: 0;
1692
+ }
1693
+
1694
+ .cnfy-toggle-thumb {
1695
+ pointer-events: none;
1696
+ display: inline-block;
1697
+ height: 1.25rem;
1698
+ width: 1.25rem;
1699
+ transform: translateX(0);
1700
+ border-radius: 9999px;
1701
+ background-color: var(--cnfy-white);
1702
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
1703
+ transition: transform 0.2s ease-in-out;
1704
+ }
1705
+
1706
+ .cnfy-toggle-thumb--on {
1707
+ transform: translateX(1.25rem);
1708
+ }
1709
+
1710
+ .cnfy-toggle-group {
1711
+ display: flex;
1712
+ flex-direction: column;
1713
+ gap: 1rem;
1714
+ }
1715
+
1716
+ .cnfy-toggle-row {
1717
+ display: flex;
1718
+ align-items: center;
1719
+ justify-content: space-between;
1720
+ gap: 1rem;
1721
+ }
1722
+
1723
+ .cnfy-toggle-label {
1724
+ font-size: 0.875rem;
1725
+ font-weight: 500;
1726
+ color: var(--cnfy-gray-700);
1727
+ margin: 0;
1728
+ }
1729
+
1730
+ .cnfy-toggle-desc {
1731
+ font-size: 0.75rem;
1732
+ color: var(--cnfy-gray-500);
1733
+ margin: 0.125rem 0 0;
1734
+ }
1735
+
1736
+ /* Logo upload */
1737
+ .cnfy-logo-upload {
1738
+ display: flex;
1739
+ align-items: center;
1740
+ gap: 1rem;
1741
+ }
1742
+
1743
+ .cnfy-logo-preview {
1744
+ height: 4rem;
1745
+ width: 4rem;
1746
+ border: 1px solid var(--cnfy-gray-200);
1747
+ border-radius: 0.5rem;
1748
+ background-color: var(--cnfy-gray-50);
1749
+ overflow: hidden;
1750
+ display: flex;
1751
+ align-items: center;
1752
+ justify-content: center;
1753
+ flex-shrink: 0;
1754
+ }
1755
+
1756
+ .cnfy-logo-img {
1757
+ height: 100%;
1758
+ width: 100%;
1759
+ object-fit: cover;
1760
+ }
1761
+
1762
+ .cnfy-logo-placeholder {
1763
+ font-size: 0.625rem;
1764
+ color: var(--cnfy-gray-400);
1765
+ }
1766
+
1767
+ .cnfy-file-input {
1768
+ font-size: 0.875rem;
1769
+ color: var(--cnfy-gray-600);
1770
+ }
1771
+
1423
1772
  /* ========================================
1424
1773
  React Select portal fix
1425
1774
  ======================================== */
@@ -1427,3 +1776,34 @@
1427
1776
  pointer-events: auto !important;
1428
1777
  z-index: 999999 !important;
1429
1778
  }
1779
+
1780
+
1781
+ .cnfy-news-pulse-btn {
1782
+ position: absolute;
1783
+ left: 1rem;
1784
+ top: 50%;
1785
+ transform: translateY(-50%);
1786
+ z-index: 10;
1787
+ display: flex;
1788
+ height: 2rem;
1789
+ width: 2rem;
1790
+ align-items: center;
1791
+ justify-content: center;
1792
+ border-radius: 9999px;
1793
+ background: linear-gradient(to right, var(--cnfy-purple-500), var(--cnfy-pink-500));
1794
+ color: var(--cnfy-white);
1795
+ border: none;
1796
+ cursor: pointer;
1797
+ transition: all 0.15s;
1798
+ }
1799
+
1800
+ .cnfy-news-dropdown-source{
1801
+ display: flex;
1802
+ justify-content: space-around;
1803
+ padding-left: 15px;
1804
+ padding-right: 15px;
1805
+ background-color: #fff;
1806
+ padding-bottom: 5px;
1807
+ padding-top: 5px;
1808
+ box-shadow: 0px 2px 4px #0003;
1809
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contenify/chatbot",
3
- "version": "0.1.4",
3
+ "version": "1.0.0",
4
4
  "description": "AI-powered news chatbot widget for content creation",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",