open-chat-studio-widget 0.2.0 → 0.3.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/README.md +3 -1
- package/dist/cjs/{index-550ac5f9.js → index-d39b7c53.js} +5 -5
- package/dist/cjs/index-d39b7c53.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/open-chat-studio-widget.cjs.entry.js +11 -7
- package/dist/cjs/open-chat-studio-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/open-chat-studio-widget.cjs.js +2 -2
- package/dist/cjs/open-chat-studio-widget.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ocs-chat/heroicons.js +3 -0
- package/dist/collection/components/ocs-chat/heroicons.js.map +1 -1
- package/dist/collection/components/ocs-chat/ocs-chat.css +73 -517
- package/dist/collection/components/ocs-chat/ocs-chat.js +6 -6
- package/dist/collection/components/ocs-chat/ocs-chat.js.map +1 -1
- package/dist/components/open-chat-studio-widget.js +10 -6
- package/dist/components/open-chat-studio-widget.js.map +1 -1
- package/dist/esm/{index-3870d3ba.js → index-b73ebc69.js} +5 -5
- package/dist/esm/index-b73ebc69.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/open-chat-studio-widget.entry.js +11 -7
- package/dist/esm/open-chat-studio-widget.entry.js.map +1 -1
- package/dist/esm/open-chat-studio-widget.js +3 -3
- package/dist/esm/open-chat-studio-widget.js.map +1 -1
- package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js +1 -1
- package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js.map +1 -1
- package/dist/open-chat-studio-widget/p-4cdc34c1.js +3 -0
- package/dist/open-chat-studio-widget/p-4cdc34c1.js.map +1 -0
- package/dist/open-chat-studio-widget/p-acba9216.entry.js +2 -0
- package/dist/open-chat-studio-widget/p-acba9216.entry.js.map +1 -0
- package/dist/types/components/ocs-chat/heroicons.d.ts +1 -0
- package/package.json +10 -11
- package/dist/cjs/index-550ac5f9.js.map +0 -1
- package/dist/esm/index-3870d3ba.js.map +0 -1
- package/dist/open-chat-studio-widget/p-216e7afd.entry.js +0 -2
- package/dist/open-chat-studio-widget/p-216e7afd.entry.js.map +0 -1
- package/dist/open-chat-studio-widget/p-a0561deb.js +0 -3
- package/dist/open-chat-studio-widget/p-a0561deb.js.map +0 -1
|
@@ -499,524 +499,50 @@ video {
|
|
|
499
499
|
[hidden]:where(:not([hidden="until-found"])) {
|
|
500
500
|
display: none;
|
|
501
501
|
}
|
|
502
|
-
|
|
503
|
-
:root,
|
|
504
|
-
[data-theme] {
|
|
505
|
-
background-color: var(--fallback-b1,oklch(var(--b1)/1));
|
|
506
|
-
color: var(--fallback-bc,oklch(var(--bc)/1));
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
@supports not (color: oklch(0% 0 0)) {
|
|
510
|
-
|
|
511
|
-
:root {
|
|
512
|
-
color-scheme: light;
|
|
513
|
-
--fallback-p: #491eff;
|
|
514
|
-
--fallback-pc: #d4dbff;
|
|
515
|
-
--fallback-s: #ff41c7;
|
|
516
|
-
--fallback-sc: #fff9fc;
|
|
517
|
-
--fallback-a: #00cfbd;
|
|
518
|
-
--fallback-ac: #00100d;
|
|
519
|
-
--fallback-n: #2b3440;
|
|
520
|
-
--fallback-nc: #d7dde4;
|
|
521
|
-
--fallback-b1: #ffffff;
|
|
522
|
-
--fallback-b2: #e5e6e6;
|
|
523
|
-
--fallback-b3: #e5e6e6;
|
|
524
|
-
--fallback-bc: #1f2937;
|
|
525
|
-
--fallback-in: #00b3f0;
|
|
526
|
-
--fallback-inc: #000000;
|
|
527
|
-
--fallback-su: #00ca92;
|
|
528
|
-
--fallback-suc: #000000;
|
|
529
|
-
--fallback-wa: #ffc22d;
|
|
530
|
-
--fallback-wac: #000000;
|
|
531
|
-
--fallback-er: #ff6f70;
|
|
532
|
-
--fallback-erc: #000000;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
@media (prefers-color-scheme: dark) {
|
|
536
|
-
|
|
537
|
-
:root {
|
|
538
|
-
color-scheme: dark;
|
|
539
|
-
--fallback-p: #7582ff;
|
|
540
|
-
--fallback-pc: #050617;
|
|
541
|
-
--fallback-s: #ff71cf;
|
|
542
|
-
--fallback-sc: #190211;
|
|
543
|
-
--fallback-a: #00c7b5;
|
|
544
|
-
--fallback-ac: #000e0c;
|
|
545
|
-
--fallback-n: #2a323c;
|
|
546
|
-
--fallback-nc: #a6adbb;
|
|
547
|
-
--fallback-b1: #1d232a;
|
|
548
|
-
--fallback-b2: #191e24;
|
|
549
|
-
--fallback-b3: #15191e;
|
|
550
|
-
--fallback-bc: #a6adbb;
|
|
551
|
-
--fallback-in: #00b3f0;
|
|
552
|
-
--fallback-inc: #000000;
|
|
553
|
-
--fallback-su: #00ca92;
|
|
554
|
-
--fallback-suc: #000000;
|
|
555
|
-
--fallback-wa: #ffc22d;
|
|
556
|
-
--fallback-wac: #000000;
|
|
557
|
-
--fallback-er: #ff6f70;
|
|
558
|
-
--fallback-erc: #000000;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
html {
|
|
564
|
-
-webkit-tap-highlight-color: transparent;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
* {
|
|
568
|
-
scrollbar-color: color-mix(in oklch, currentColor 35%, transparent) transparent;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
*:hover {
|
|
572
|
-
scrollbar-color: color-mix(in oklch, currentColor 60%, transparent) transparent;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
:root {
|
|
576
|
-
color-scheme: light;
|
|
577
|
-
--in: 72.06% 0.191 231.6;
|
|
578
|
-
--su: 64.8% 0.150 160;
|
|
579
|
-
--wa: 84.71% 0.199 83.87;
|
|
580
|
-
--er: 71.76% 0.221 22.18;
|
|
581
|
-
--pc: 89.824% 0.06192 275.75;
|
|
582
|
-
--ac: 15.352% 0.0368 183.61;
|
|
583
|
-
--inc: 0% 0 0;
|
|
584
|
-
--suc: 0% 0 0;
|
|
585
|
-
--wac: 0% 0 0;
|
|
586
|
-
--erc: 0% 0 0;
|
|
587
|
-
--rounded-box: 1rem;
|
|
588
|
-
--rounded-btn: 0.5rem;
|
|
589
|
-
--rounded-badge: 1.9rem;
|
|
590
|
-
--animation-btn: 0.25s;
|
|
591
|
-
--animation-input: .2s;
|
|
592
|
-
--btn-focus-scale: 0.95;
|
|
593
|
-
--border-btn: 1px;
|
|
594
|
-
--tab-border: 1px;
|
|
595
|
-
--tab-radius: 0.5rem;
|
|
596
|
-
--p: 49.12% 0.3096 275.75;
|
|
597
|
-
--s: 69.71% 0.329 342.55;
|
|
598
|
-
--sc: 98.71% 0.0106 342.55;
|
|
599
|
-
--a: 76.76% 0.184 183.61;
|
|
600
|
-
--n: 32.1785% 0.02476 255.701624;
|
|
601
|
-
--nc: 89.4994% 0.011585 252.096176;
|
|
602
|
-
--b1: 100% 0 0;
|
|
603
|
-
--b2: 96.1151% 0 0;
|
|
604
|
-
--b3: 92.4169% 0.00108 197.137559;
|
|
605
|
-
--bc: 27.8078% 0.029596 256.847952;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
@media (prefers-color-scheme: dark) {
|
|
609
|
-
|
|
610
|
-
:root {
|
|
611
|
-
color-scheme: dark;
|
|
612
|
-
--in: 72.06% 0.191 231.6;
|
|
613
|
-
--su: 64.8% 0.150 160;
|
|
614
|
-
--wa: 84.71% 0.199 83.87;
|
|
615
|
-
--er: 71.76% 0.221 22.18;
|
|
616
|
-
--pc: 13.138% 0.0392 275.75;
|
|
617
|
-
--sc: 14.96% 0.052 342.55;
|
|
618
|
-
--ac: 14.902% 0.0334 183.61;
|
|
619
|
-
--inc: 0% 0 0;
|
|
620
|
-
--suc: 0% 0 0;
|
|
621
|
-
--wac: 0% 0 0;
|
|
622
|
-
--erc: 0% 0 0;
|
|
623
|
-
--rounded-box: 1rem;
|
|
624
|
-
--rounded-btn: 0.5rem;
|
|
625
|
-
--rounded-badge: 1.9rem;
|
|
626
|
-
--animation-btn: 0.25s;
|
|
627
|
-
--animation-input: .2s;
|
|
628
|
-
--btn-focus-scale: 0.95;
|
|
629
|
-
--border-btn: 1px;
|
|
630
|
-
--tab-border: 1px;
|
|
631
|
-
--tab-radius: 0.5rem;
|
|
632
|
-
--p: 65.69% 0.196 275.75;
|
|
633
|
-
--s: 74.8% 0.26 342.55;
|
|
634
|
-
--a: 74.51% 0.167 183.61;
|
|
635
|
-
--n: 31.3815% 0.021108 254.139175;
|
|
636
|
-
--nc: 74.6477% 0.0216 264.435964;
|
|
637
|
-
--b1: 25.3267% 0.015896 252.417568;
|
|
638
|
-
--b2: 23.2607% 0.013807 253.100675;
|
|
639
|
-
--b3: 21.1484% 0.01165 254.087939;
|
|
640
|
-
--bc: 74.6477% 0.0216 264.435964;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
[data-theme=light] {
|
|
645
|
-
color-scheme: light;
|
|
646
|
-
--in: 72.06% 0.191 231.6;
|
|
647
|
-
--su: 64.8% 0.150 160;
|
|
648
|
-
--wa: 84.71% 0.199 83.87;
|
|
649
|
-
--er: 71.76% 0.221 22.18;
|
|
650
|
-
--pc: 89.824% 0.06192 275.75;
|
|
651
|
-
--ac: 15.352% 0.0368 183.61;
|
|
652
|
-
--inc: 0% 0 0;
|
|
653
|
-
--suc: 0% 0 0;
|
|
654
|
-
--wac: 0% 0 0;
|
|
655
|
-
--erc: 0% 0 0;
|
|
656
|
-
--rounded-box: 1rem;
|
|
657
|
-
--rounded-btn: 0.5rem;
|
|
658
|
-
--rounded-badge: 1.9rem;
|
|
659
|
-
--animation-btn: 0.25s;
|
|
660
|
-
--animation-input: .2s;
|
|
661
|
-
--btn-focus-scale: 0.95;
|
|
662
|
-
--border-btn: 1px;
|
|
663
|
-
--tab-border: 1px;
|
|
664
|
-
--tab-radius: 0.5rem;
|
|
665
|
-
--p: 49.12% 0.3096 275.75;
|
|
666
|
-
--s: 69.71% 0.329 342.55;
|
|
667
|
-
--sc: 98.71% 0.0106 342.55;
|
|
668
|
-
--a: 76.76% 0.184 183.61;
|
|
669
|
-
--n: 32.1785% 0.02476 255.701624;
|
|
670
|
-
--nc: 89.4994% 0.011585 252.096176;
|
|
671
|
-
--b1: 100% 0 0;
|
|
672
|
-
--b2: 96.1151% 0 0;
|
|
673
|
-
--b3: 92.4169% 0.00108 197.137559;
|
|
674
|
-
--bc: 27.8078% 0.029596 256.847952;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
[data-theme=dark] {
|
|
678
|
-
color-scheme: dark;
|
|
679
|
-
--in: 72.06% 0.191 231.6;
|
|
680
|
-
--su: 64.8% 0.150 160;
|
|
681
|
-
--wa: 84.71% 0.199 83.87;
|
|
682
|
-
--er: 71.76% 0.221 22.18;
|
|
683
|
-
--pc: 13.138% 0.0392 275.75;
|
|
684
|
-
--sc: 14.96% 0.052 342.55;
|
|
685
|
-
--ac: 14.902% 0.0334 183.61;
|
|
686
|
-
--inc: 0% 0 0;
|
|
687
|
-
--suc: 0% 0 0;
|
|
688
|
-
--wac: 0% 0 0;
|
|
689
|
-
--erc: 0% 0 0;
|
|
690
|
-
--rounded-box: 1rem;
|
|
691
|
-
--rounded-btn: 0.5rem;
|
|
692
|
-
--rounded-badge: 1.9rem;
|
|
693
|
-
--animation-btn: 0.25s;
|
|
694
|
-
--animation-input: .2s;
|
|
695
|
-
--btn-focus-scale: 0.95;
|
|
696
|
-
--border-btn: 1px;
|
|
697
|
-
--tab-border: 1px;
|
|
698
|
-
--tab-radius: 0.5rem;
|
|
699
|
-
--p: 65.69% 0.196 275.75;
|
|
700
|
-
--s: 74.8% 0.26 342.55;
|
|
701
|
-
--a: 74.51% 0.167 183.61;
|
|
702
|
-
--n: 31.3815% 0.021108 254.139175;
|
|
703
|
-
--nc: 74.6477% 0.0216 264.435964;
|
|
704
|
-
--b1: 25.3267% 0.015896 252.417568;
|
|
705
|
-
--b2: 23.2607% 0.013807 253.100675;
|
|
706
|
-
--b3: 21.1484% 0.01165 254.087939;
|
|
707
|
-
--bc: 74.6477% 0.0216 264.435964;
|
|
708
|
-
}
|
|
709
|
-
@media (hover:hover) {
|
|
710
|
-
|
|
711
|
-
.table tr.hover:hover,
|
|
712
|
-
.table tr.hover:nth-child(even):hover {
|
|
713
|
-
--tw-bg-opacity: 1;
|
|
714
|
-
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
.table-zebra tr.hover:hover,
|
|
718
|
-
.table-zebra tr.hover:nth-child(even):hover {
|
|
719
|
-
--tw-bg-opacity: 1;
|
|
720
|
-
background-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
502
|
.btn {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
flex-wrap: wrap;
|
|
733
|
-
align-items: center;
|
|
734
|
-
justify-content: center;
|
|
735
|
-
border-radius: var(--rounded-btn, 0.5rem);
|
|
736
|
-
border-color: transparent;
|
|
737
|
-
border-color: oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));
|
|
738
|
-
padding-left: 1rem;
|
|
739
|
-
padding-right: 1rem;
|
|
740
|
-
text-align: center;
|
|
503
|
+
margin-inline-end: 0.5rem;
|
|
504
|
+
margin-bottom: 0.5rem;
|
|
505
|
+
border-radius: 0.5rem;
|
|
506
|
+
border-width: 1px;
|
|
507
|
+
padding-top: 0.625rem;
|
|
508
|
+
padding-bottom: 0.625rem;
|
|
509
|
+
padding-left: 1.25rem;
|
|
510
|
+
padding-right: 1.25rem;
|
|
741
511
|
font-size: 0.875rem;
|
|
742
|
-
line-height:
|
|
743
|
-
|
|
744
|
-
font-weight: 600;
|
|
745
|
-
text-decoration-line: none;
|
|
746
|
-
transition-duration: 200ms;
|
|
747
|
-
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
748
|
-
border-width: var(--border-btn, 1px);
|
|
749
|
-
transition-property: color, background-color, border-color, opacity, box-shadow, transform;
|
|
750
|
-
--tw-text-opacity: 1;
|
|
751
|
-
color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
|
|
752
|
-
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
753
|
-
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
|
|
754
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
755
|
-
outline-color: var(--fallback-bc,oklch(var(--bc)/1));
|
|
756
|
-
background-color: oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));
|
|
757
|
-
--tw-bg-opacity: 1;
|
|
758
|
-
--tw-border-opacity: 1;
|
|
759
|
-
}
|
|
760
|
-
.btn-disabled,
|
|
761
|
-
.btn[disabled],
|
|
762
|
-
.btn:disabled {
|
|
763
|
-
pointer-events: none;
|
|
764
|
-
}
|
|
765
|
-
:where(.btn:is(input[type="checkbox"])),
|
|
766
|
-
:where(.btn:is(input[type="radio"])) {
|
|
767
|
-
width: auto;
|
|
768
|
-
-webkit-appearance: none;
|
|
769
|
-
-moz-appearance: none;
|
|
770
|
-
appearance: none;
|
|
771
|
-
}
|
|
772
|
-
.btn:is(input[type="checkbox"]):after,
|
|
773
|
-
.btn:is(input[type="radio"]):after {
|
|
774
|
-
--tw-content: attr(aria-label);
|
|
775
|
-
content: var(--tw-content);
|
|
776
|
-
}
|
|
777
|
-
.chat {
|
|
778
|
-
display: grid;
|
|
779
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
780
|
-
-moz-column-gap: 0.75rem;
|
|
781
|
-
column-gap: 0.75rem;
|
|
782
|
-
padding-top: 0.25rem;
|
|
783
|
-
padding-bottom: 0.25rem;
|
|
784
|
-
}
|
|
785
|
-
@media (hover: hover) {
|
|
786
|
-
|
|
787
|
-
.btn:hover {
|
|
788
|
-
--tw-border-opacity: 1;
|
|
789
|
-
border-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));
|
|
790
|
-
--tw-bg-opacity: 1;
|
|
791
|
-
background-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
@supports (color: color-mix(in oklab, black, black)) {
|
|
795
|
-
|
|
796
|
-
.btn:hover {
|
|
797
|
-
background-color: color-mix(
|
|
798
|
-
in oklab,
|
|
799
|
-
oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,
|
|
800
|
-
black
|
|
801
|
-
);
|
|
802
|
-
border-color: color-mix(
|
|
803
|
-
in oklab,
|
|
804
|
-
oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,
|
|
805
|
-
black
|
|
806
|
-
);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
@supports not (color: oklch(0% 0 0)) {
|
|
811
|
-
|
|
812
|
-
.btn:hover {
|
|
813
|
-
background-color: var(--btn-color, var(--fallback-b2));
|
|
814
|
-
border-color: var(--btn-color, var(--fallback-b2));
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
.btn.glass:hover {
|
|
819
|
-
--glass-opacity: 25%;
|
|
820
|
-
--glass-border-opacity: 15%;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
.btn-disabled:hover,
|
|
824
|
-
.btn[disabled]:hover,
|
|
825
|
-
.btn:disabled:hover {
|
|
826
|
-
--tw-border-opacity: 0;
|
|
827
|
-
background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));
|
|
828
|
-
--tw-bg-opacity: 0.2;
|
|
829
|
-
color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
|
|
830
|
-
--tw-text-opacity: 0.2;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
@supports (color: color-mix(in oklab, black, black)) {
|
|
834
|
-
|
|
835
|
-
.btn:is(input[type="checkbox"]:checked):hover, .btn:is(input[type="radio"]:checked):hover {
|
|
836
|
-
background-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black);
|
|
837
|
-
border-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black);
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
842
|
-
|
|
843
|
-
.btn {
|
|
844
|
-
animation: button-pop var(--animation-btn, 0.25s) ease-out;
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
.btn:active:hover,
|
|
848
|
-
.btn:active:focus {
|
|
849
|
-
animation: button-pop 0s ease-out;
|
|
850
|
-
transform: scale(var(--btn-focus-scale, 0.97));
|
|
851
|
-
}
|
|
852
|
-
@supports not (color: oklch(0% 0 0)) {
|
|
853
|
-
|
|
854
|
-
.btn {
|
|
855
|
-
background-color: var(--btn-color, var(--fallback-b2));
|
|
856
|
-
border-color: var(--btn-color, var(--fallback-b2));
|
|
857
|
-
}
|
|
512
|
+
line-height: 1.25rem;
|
|
513
|
+
font-weight: 500;
|
|
858
514
|
}
|
|
859
|
-
.btn:focus
|
|
860
|
-
outline
|
|
861
|
-
outline-width: 2px;
|
|
515
|
+
.btn:focus {
|
|
516
|
+
outline: 2px solid transparent;
|
|
862
517
|
outline-offset: 2px;
|
|
863
518
|
}
|
|
864
|
-
.btn
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
outline-color: currentColor;
|
|
869
|
-
}
|
|
870
|
-
.btn.glass.btn-active {
|
|
871
|
-
--glass-opacity: 25%;
|
|
872
|
-
--glass-border-opacity: 15%;
|
|
873
|
-
}
|
|
874
|
-
.btn.btn-disabled,
|
|
875
|
-
.btn[disabled],
|
|
876
|
-
.btn:disabled {
|
|
877
|
-
--tw-border-opacity: 0;
|
|
878
|
-
background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));
|
|
879
|
-
--tw-bg-opacity: 0.2;
|
|
880
|
-
color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
|
|
881
|
-
--tw-text-opacity: 0.2;
|
|
882
|
-
}
|
|
883
|
-
.btn:is(input[type="checkbox"]:checked),
|
|
884
|
-
.btn:is(input[type="radio"]:checked) {
|
|
885
|
-
--tw-border-opacity: 1;
|
|
886
|
-
border-color: var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));
|
|
887
|
-
--tw-bg-opacity: 1;
|
|
888
|
-
background-color: var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));
|
|
889
|
-
--tw-text-opacity: 1;
|
|
890
|
-
color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
|
|
891
|
-
}
|
|
892
|
-
.btn:is(input[type="checkbox"]:checked):focus-visible, .btn:is(input[type="radio"]:checked):focus-visible {
|
|
893
|
-
outline-color: var(--fallback-p,oklch(var(--p)/1));
|
|
894
|
-
}
|
|
895
|
-
@keyframes button-pop {
|
|
896
|
-
|
|
897
|
-
0% {
|
|
898
|
-
transform: scale(var(--btn-focus-scale, 0.98));
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
40% {
|
|
902
|
-
transform: scale(1.02);
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
100% {
|
|
906
|
-
transform: scale(1);
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
@keyframes checkmark {
|
|
910
|
-
|
|
911
|
-
0% {
|
|
912
|
-
background-position-y: 5px;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
50% {
|
|
916
|
-
background-position-y: -2px;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
100% {
|
|
920
|
-
background-position-y: 0;
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
.join > :where(*:not(:first-child)):is(.btn) {
|
|
924
|
-
margin-inline-start: calc(var(--border-btn) * -1);
|
|
925
|
-
}
|
|
926
|
-
.mockup-phone .display {
|
|
927
|
-
overflow: hidden;
|
|
928
|
-
border-radius: 40px;
|
|
929
|
-
margin-top: -25px;
|
|
930
|
-
}
|
|
931
|
-
@keyframes modal-pop {
|
|
932
|
-
|
|
933
|
-
0% {
|
|
934
|
-
opacity: 0;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
@keyframes progress-loading {
|
|
938
|
-
|
|
939
|
-
50% {
|
|
940
|
-
background-position-x: -115%;
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
@keyframes radiomark {
|
|
944
|
-
|
|
945
|
-
0% {
|
|
946
|
-
box-shadow: 0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,
|
|
947
|
-
0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
50% {
|
|
951
|
-
box-shadow: 0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,
|
|
952
|
-
0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
100% {
|
|
956
|
-
box-shadow: 0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,
|
|
957
|
-
0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
@keyframes rating-pop {
|
|
961
|
-
|
|
962
|
-
0% {
|
|
963
|
-
transform: translateY(-0.125em);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
40% {
|
|
967
|
-
transform: translateY(-0.125em);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
100% {
|
|
971
|
-
transform: translateY(0);
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
@keyframes skeleton {
|
|
975
|
-
|
|
976
|
-
from {
|
|
977
|
-
background-position: 150%;
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
to {
|
|
981
|
-
background-position: -50%;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
@keyframes toast-pop {
|
|
985
|
-
|
|
986
|
-
0% {
|
|
987
|
-
transform: scale(0.9);
|
|
988
|
-
opacity: 0;
|
|
519
|
+
.btn {
|
|
520
|
+
background-color: var(--button-background-color);
|
|
521
|
+
color: var(--button-text-color);
|
|
522
|
+
border-color: var(--button-border-color);
|
|
989
523
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
524
|
+
.btn:hover {
|
|
525
|
+
background-color: var(--button-background-color-hover);
|
|
526
|
+
color: var(--button-text-color-hover);
|
|
527
|
+
border-color: var(--button-border-color-hover);
|
|
994
528
|
}
|
|
995
|
-
}
|
|
996
|
-
.join.join-vertical > :where(*:not(:first-child)):is(.btn) {
|
|
997
|
-
margin-top: calc(var(--border-btn) * -1);
|
|
998
|
-
}
|
|
999
|
-
.join.join-horizontal > :where(*:not(:first-child)):is(.btn) {
|
|
1000
|
-
margin-inline-start: calc(var(--border-btn) * -1);
|
|
1001
|
-
margin-top: 0px;
|
|
1002
|
-
}
|
|
1003
529
|
.visible {
|
|
1004
530
|
visibility: visible;
|
|
1005
531
|
}
|
|
1006
532
|
.fixed {
|
|
1007
533
|
position: fixed;
|
|
1008
534
|
}
|
|
1009
|
-
.bottom-
|
|
1010
|
-
bottom:
|
|
535
|
+
.bottom-0 {
|
|
536
|
+
bottom: 0px;
|
|
537
|
+
}
|
|
538
|
+
.left-0 {
|
|
539
|
+
left: 0px;
|
|
1011
540
|
}
|
|
1012
541
|
.left-1\/2 {
|
|
1013
542
|
left: 50%;
|
|
1014
543
|
}
|
|
1015
|
-
.
|
|
1016
|
-
|
|
1017
|
-
}
|
|
1018
|
-
.right-5 {
|
|
1019
|
-
right: 1.25rem;
|
|
544
|
+
.right-0 {
|
|
545
|
+
right: 0px;
|
|
1020
546
|
}
|
|
1021
547
|
.top-1\/2 {
|
|
1022
548
|
top: 50%;
|
|
@@ -1024,6 +550,9 @@ html {
|
|
|
1024
550
|
.flex {
|
|
1025
551
|
display: flex;
|
|
1026
552
|
}
|
|
553
|
+
.hidden {
|
|
554
|
+
display: none;
|
|
555
|
+
}
|
|
1027
556
|
.size-6 {
|
|
1028
557
|
width: 1.5rem;
|
|
1029
558
|
height: 1.5rem;
|
|
@@ -1034,9 +563,6 @@ html {
|
|
|
1034
563
|
.h-5\/6 {
|
|
1035
564
|
height: 83.333333%;
|
|
1036
565
|
}
|
|
1037
|
-
.w-\[450px\] {
|
|
1038
|
-
width: 450px;
|
|
1039
|
-
}
|
|
1040
566
|
.w-full {
|
|
1041
567
|
width: 100%;
|
|
1042
568
|
}
|
|
@@ -1135,27 +661,31 @@ html {
|
|
|
1135
661
|
transition-duration: 200ms;
|
|
1136
662
|
}
|
|
1137
663
|
:host {
|
|
1138
|
-
display: block;
|
|
1139
664
|
/**
|
|
1140
665
|
* @prop --button-background-color: Button background color
|
|
1141
666
|
* @prop --button-background-color-hover: Button background color on hover
|
|
1142
667
|
* @prop --button-text-color: Button text color
|
|
1143
668
|
* @prop --button-text-color-hover: Button text color on hover
|
|
669
|
+
* @prop --button-border-color: Button border color
|
|
670
|
+
* @prop --button-border-color-hover: Button border color on hover
|
|
1144
671
|
*/
|
|
1145
|
-
--button-background-color:
|
|
1146
|
-
|
|
1147
|
-
--button-
|
|
1148
|
-
|
|
672
|
+
--button-background-color: white;
|
|
673
|
+
/* gray-100 */
|
|
674
|
+
--button-background-color-hover: #f3f4f6;
|
|
675
|
+
/* gray-900 */
|
|
676
|
+
--button-text-color: #111827;
|
|
677
|
+
/* blue-700 */
|
|
678
|
+
--button-text-color-hover: #1d4ed8;
|
|
679
|
+
/* gray-500 */
|
|
680
|
+
--button-border-color: #6b7280;
|
|
681
|
+
/* gray-700 */
|
|
682
|
+
--button-border-color-hover: #374151;
|
|
683
|
+
--chat-z-index: 50;
|
|
684
|
+
|
|
685
|
+
display: block;
|
|
686
|
+
z-index: var(--chat-z-index);
|
|
1149
687
|
}
|
|
1150
688
|
/* These custom button styles need to remain since they use CSS variables */
|
|
1151
|
-
.btn {
|
|
1152
|
-
background-color: var(--button-background-color);
|
|
1153
|
-
color: var(--button-text-color);
|
|
1154
|
-
}
|
|
1155
|
-
.btn:hover {
|
|
1156
|
-
background-color: var(--button-background-color-hover);
|
|
1157
|
-
color: var(--button-text-color-hover);
|
|
1158
|
-
}
|
|
1159
689
|
.iframe-placeholder {
|
|
1160
690
|
/*loading-dots*/
|
|
1161
691
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMjQnIGhlaWdodD0nMjQnIHZpZXdCb3g9JzAgMCAyNCAyNCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48c3R5bGU+LnNwaW5uZXJfcU04M3thbmltYXRpb246c3Bpbm5lcl84SFFHIDEuMDVzIGluZmluaXRlfS5zcGlubmVyX29YUHJ7YW5pbWF0aW9uLWRlbGF5Oi4xc30uc3Bpbm5lcl9aVExme2FuaW1hdGlvbi1kZWxheTouMnN9QGtleWZyYW1lcyBzcGlubmVyXzhIUUd7MCUsNTcuMTQle2FuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246Y3ViaWMtYmV6aWVyKDAuMzMsLjY2LC42NiwxKTt0cmFuc2Zvcm06dHJhbnNsYXRlKDApfTI4LjU3JXthbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOmN1YmljLWJlemllcigwLjMzLDAsLjY2LC4zMyk7dHJhbnNmb3JtOnRyYW5zbGF0ZVkoLTZweCl9MTAwJXt0cmFuc2Zvcm06dHJhbnNsYXRlKDApfX08L3N0eWxlPjxjaXJjbGUgY2xhc3M9J3NwaW5uZXJfcU04MycgY3g9JzQnIGN5PScxMicgcj0nMycvPjxjaXJjbGUgY2xhc3M9J3NwaW5uZXJfcU04MyBzcGlubmVyX29YUHInIGN4PScxMicgY3k9JzEyJyByPSczJy8+PGNpcmNsZSBjbGFzcz0nc3Bpbm5lcl9xTTgzIHNwaW5uZXJfWlRMZicgY3g9JzIwJyBjeT0nMTInIHI9JzMnLz48L3N2Zz4=);
|
|
@@ -1166,3 +696,29 @@ html {
|
|
|
1166
696
|
--tw-bg-opacity: 1;
|
|
1167
697
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
1168
698
|
}
|
|
699
|
+
@media (min-width: 640px) {
|
|
700
|
+
|
|
701
|
+
.sm\:bottom-5 {
|
|
702
|
+
bottom: 1.25rem;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.sm\:left-5 {
|
|
706
|
+
left: 1.25rem;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.sm\:right-5 {
|
|
710
|
+
right: 1.25rem;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.sm\:block {
|
|
714
|
+
display: block;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.sm\:hidden {
|
|
718
|
+
display: none;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.sm\:w-\[450px\] {
|
|
722
|
+
width: 450px;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Host, h, Build } from "@stencil/core";
|
|
2
|
-
import { ArrowLeftEndOnRectangleIcon, ArrowRightEndOnRectangleIcon, ViewfinderCircleIcon, XMarkIcon, ChevronDownIcon, ChevronUpIcon, } from "./heroicons";
|
|
2
|
+
import { ArrowLeftEndOnRectangleIcon, ArrowRightEndOnRectangleIcon, ArrowDownOnSquareIcon, ViewfinderCircleIcon, XMarkIcon, ChevronDownIcon, ChevronUpIcon, } from "./heroicons";
|
|
3
3
|
const allowedHosts = ["chatbots.dimagi.com"];
|
|
4
4
|
export class OcsChat {
|
|
5
5
|
constructor() {
|
|
@@ -49,10 +49,10 @@ export class OcsChat {
|
|
|
49
49
|
this.expanded = !this.expanded;
|
|
50
50
|
}
|
|
51
51
|
getPositionClasses() {
|
|
52
|
-
const baseClasses = `fixed w-[450px] ${this.expanded ? 'h-5/6' : 'h-3/5'} bg-white border border-gray-200 shadow-lg rounded-lg overflow-hidden flex flex-col`;
|
|
52
|
+
const baseClasses = `fixed w-full sm:w-[450px] ${this.expanded ? 'h-5/6' : 'h-3/5'} bg-white border border-gray-200 shadow-lg rounded-lg overflow-hidden flex flex-col`;
|
|
53
53
|
const positionClasses = {
|
|
54
|
-
left: 'left-5 bottom-5',
|
|
55
|
-
right: 'right-5 bottom-5',
|
|
54
|
+
left: 'left-0 sm:left-5 bottom-0 sm:bottom-5',
|
|
55
|
+
right: 'right-0 sm:right-5 bottom-0 sm:bottom-5',
|
|
56
56
|
center: 'left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2'
|
|
57
57
|
}[this.position];
|
|
58
58
|
return `${baseClasses} ${positionClasses}`;
|
|
@@ -62,7 +62,7 @@ export class OcsChat {
|
|
|
62
62
|
return (h(Host, null, h("p", null, this.error)));
|
|
63
63
|
}
|
|
64
64
|
return (h(Host, null, h("button", { class: "btn", onClick: () => this.load() }, this.buttonText), this.visible && (h("div", { class: this.getPositionClasses() }, h("div", { class: "flex justify-between items-center px-2 py-2 border-b border-gray-100" }, h("div", { class: "flex gap-1" }, h("button", { class: {
|
|
65
|
-
'p-1.5 rounded-md transition-colors duration-200 hover:bg-gray-100': true,
|
|
65
|
+
'hidden sm:block p-1.5 rounded-md transition-colors duration-200 hover:bg-gray-100': true,
|
|
66
66
|
'text-blue-600': this.position === 'left',
|
|
67
67
|
'text-gray-500': this.position !== 'left'
|
|
68
68
|
}, onClick: () => this.setPosition('left'), "aria-label": "Dock to left", title: "Dock to left" }, h(ArrowLeftEndOnRectangleIcon, null)), h("button", { class: {
|
|
@@ -73,7 +73,7 @@ export class OcsChat {
|
|
|
73
73
|
'p-1.5 rounded-md transition-colors duration-200 hover:bg-gray-100': true,
|
|
74
74
|
'text-blue-600': this.position === 'right',
|
|
75
75
|
'text-gray-500': this.position !== 'right'
|
|
76
|
-
}, onClick: () => this.setPosition('right'), "aria-label": "Dock to right", title: "Dock to right" }, h(ArrowRightEndOnRectangleIcon, null))), h("div", { class: "flex gap-1" }, h("button", { class: "p-1.5 rounded-md transition-colors duration-200 hover:bg-gray-100 text-gray-500", onClick: () => this.toggleSize(), "aria-label": this.expanded ? "Collapse" : "Expand", title: this.expanded ? "Collapse" : "Expand" }, this.expanded ? h(ChevronDownIcon, null) : h(ChevronUpIcon, null)), h("button", { class: "p-1.5 hover:bg-gray-100 rounded-md transition-colors duration-200 text-gray-500", onClick: () => this.visible = false, "aria-label": "Close" }, h(XMarkIcon, null)))), this.loaded && (h("iframe", { class: "flex-grow w-full border-none iframe-placeholder", src: this.botUrl }))))));
|
|
76
|
+
}, onClick: () => this.setPosition('right'), "aria-label": "Dock to right", title: "Dock to right" }, h("span", { class: "hidden sm:block" }, h(ArrowRightEndOnRectangleIcon, null)), h("span", { class: "sm:hidden" }, h(ArrowDownOnSquareIcon, null)))), h("div", { class: "flex gap-1" }, h("button", { class: "p-1.5 rounded-md transition-colors duration-200 hover:bg-gray-100 text-gray-500", onClick: () => this.toggleSize(), "aria-label": this.expanded ? "Collapse" : "Expand", title: this.expanded ? "Collapse" : "Expand" }, this.expanded ? h(ChevronDownIcon, null) : h(ChevronUpIcon, null)), h("button", { class: "p-1.5 hover:bg-gray-100 rounded-md transition-colors duration-200 text-gray-500", onClick: () => this.visible = false, "aria-label": "Close" }, h(XMarkIcon, null)))), this.loaded && (h("iframe", { class: "flex-grow w-full border-none iframe-placeholder", src: this.botUrl }))))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "open-chat-studio-widget"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|