@salla.sa/twilight-components 1.0.61 → 1.0.62

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.
@@ -1,5 +1,6 @@
1
1
  let counter = 1;
2
2
  salla.infiniteScroll.event.onAppend((doc, url, nodes) => nodes.forEach(node => node.innerText = counter++));
3
+
3
4
  salla.event.on('rating::ready', rating => rating.order = {
4
5
  "id" : 123456,
5
6
  "shipping" : {
@@ -14,13 +15,47 @@ salla.event.on('rating::ready', rating => rating.order = {
14
15
  {
15
16
  "feedback": null,
16
17
  "product" : {
17
- "name" : "تيشرت",
18
+ "name" : "Lorem ipsum, dolor sit amet consectetur",
19
+ "price" : {
20
+ "amount" : 103.5,
21
+ "currency": "SAR"
22
+ },
23
+ "url" : "https://my_store.test/تيشرت/p2051852144",
24
+ "thumbnail" : "---https://source.unsplash.com/DGH1u80sZik/100x80",
25
+ "has_special_price": true,
26
+ "regular_price" : {
27
+ "amount" : 115,
28
+ "currency": "SAR"
29
+ },
30
+ }
31
+ },
32
+ {
33
+ "feedback": null,
34
+ "product" : {
35
+ "name" : "Lorem ipsum, dolor sit amet consectetur",
18
36
  "price" : {
19
37
  "amount" : 103.5,
20
38
  "currency": "SAR"
21
39
  },
22
40
  "url" : "https://my_store.test/تيشرت/p2051852144",
23
- "thumbnail" : "https://cdn.salla.sa/brmY/qKCbx4BAxd2fZHmoJnbEXmtftvkXs11ynHHgJ49I.jpg",
41
+ "thumbnail" : "https://source.unsplash.com/2cFZ_FB08UM/100x80",
42
+ "has_special_price": true,
43
+ "regular_price" : {
44
+ "amount" : 115,
45
+ "currency": "SAR"
46
+ },
47
+ }
48
+ },
49
+ {
50
+ "feedback": null,
51
+ "product" : {
52
+ "name" : "Lorem ipsum, dolor sit amet consectetur",
53
+ "price" : {
54
+ "amount" : 103.5,
55
+ "currency": "SAR"
56
+ },
57
+ "url" : "https://my_store.test/تيشرت/p2051852144",
58
+ "thumbnail" : "https://source.unsplash.com/nwOip8AOZz0/100x80",
24
59
  "has_special_price": true,
25
60
  "regular_price" : {
26
61
  "amount" : 115,
@@ -32,7 +67,7 @@ salla.event.on('rating::ready', rating => rating.order = {
32
67
  "testimonials_enabled": true,
33
68
  "shipping_enabled" : true,
34
69
  "products_enabled" : true,
35
- "thanks_message" : "شكرا لوقتك<br>ونتمنى لك تسوق ممتع"
70
+ "thanks_message" : "Thank you! <br>We wish you a pleasant shopping"
36
71
  });
37
72
 
38
73
  function showOffer() {
@@ -46,7 +81,7 @@ function showOffer() {
46
81
  {
47
82
  "id" : 1196968987,
48
83
  "is_available" : true,
49
- "name" : "Lorem ipsum, dolor sit amet consectetur ",
84
+ "name" : "Lorem ipsum, dolor sit amet consectetur",
50
85
  "price" : {"amount": 100, "currency": "SAR"},
51
86
  "url" : "#",
52
87
  "thumbnail" : "https://source.unsplash.com/DGH1u80sZik/400x300",
@@ -865,6 +865,10 @@ video {
865
865
  grid-template-columns: repeat(4, minmax(0, 1fr));
866
866
  }
867
867
 
868
+ .grid-cols-5 {
869
+ grid-template-columns: repeat(5, minmax(0, 1fr));
870
+ }
871
+
868
872
  .flex-wrap {
869
873
  flex-wrap: wrap;
870
874
  }
@@ -885,14 +889,14 @@ video {
885
889
  gap: 0.75rem;
886
890
  }
887
891
 
888
- .gap-4 {
889
- gap: 1rem;
890
- }
891
-
892
892
  .gap-6 {
893
893
  gap: 1.5rem;
894
894
  }
895
895
 
896
+ .gap-4 {
897
+ gap: 1rem;
898
+ }
899
+
896
900
  .gap-x-8 {
897
901
  -moz-column-gap: 2rem;
898
902
  column-gap: 2rem;
@@ -1922,8 +1926,8 @@ video {
1922
1926
  border-width: 1px;
1923
1927
  --tw-border-opacity: 1;
1924
1928
  border-color: rgba(228, 228, 231, var(--tw-border-opacity));
1925
- padding-left: 0.5rem;
1926
- padding-right: 0.5rem;
1929
+ padding-left: 0.75rem;
1930
+ padding-right: 0.75rem;
1927
1931
  font-size: 0.875rem;
1928
1932
  line-height: 1.25rem;
1929
1933
  transition-property: background-color, border-color, color, fill, stroke;
@@ -3087,22 +3091,24 @@ video {
3087
3091
  }
3088
3092
 
3089
3093
  .s-rating-modal-comment {
3094
+ margin-bottom: 1rem;
3090
3095
  margin-bottom: 0.5rem;
3091
3096
  height: 5rem !important;
3092
- height: 2.5rem;
3093
3097
  width: 100%;
3094
3098
  border-radius: 0.375rem;
3099
+ border-width: 1px;
3095
3100
  --tw-border-opacity: 1;
3096
- border-color: rgba(238, 238, 238, var(--tw-border-opacity));
3101
+ border-color: rgba(228, 228, 231, var(--tw-border-opacity));
3102
+ padding: 0.75rem;
3103
+ font-size: 0.875rem;
3104
+ line-height: 1.25rem;
3097
3105
  transition-property: background-color, border-color, color, fill, stroke;
3098
3106
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
3099
3107
  transition-duration: 150ms;
3100
- transition-duration: 300ms;
3101
3108
  }
3102
3109
 
3103
3110
  .s-rating-modal-comment:focus {
3104
3111
  border-color: var(--color-main);
3105
- --tw-ring-color: transparent;
3106
3112
  }
3107
3113
 
3108
3114
  .dark .s-rating-modal-comment {
@@ -3112,17 +3118,6 @@ video {
3112
3118
  background-color: rgba(82, 82, 91, var(--tw-bg-opacity));
3113
3119
  }
3114
3120
 
3115
- .dark .s-rating-modal-comment:focus {
3116
- border-color: var(--color-main);
3117
- }
3118
-
3119
- @media (min-width: 640px) {
3120
- .s-rating-modal-comment {
3121
- font-size: 0.875rem;
3122
- line-height: 1.25rem;
3123
- }
3124
- }
3125
-
3126
3121
  .s-rating-modal-validation-msg {
3127
3122
  position: absolute;
3128
3123
  bottom: 0px;
@@ -3149,13 +3144,18 @@ video {
3149
3144
  margin-bottom: 0px;
3150
3145
  }
3151
3146
 
3152
- .s-rating-modal-product-img {
3147
+ .s-rating-modal-product-img-wrap {
3153
3148
  height: 3.5rem;
3154
3149
  width: 4.5rem;
3155
3150
  overflow: hidden;
3156
3151
  border-radius: 0.375rem;
3157
3152
  --tw-bg-opacity: 1;
3158
3153
  background-color: rgba(244, 244, 245, var(--tw-bg-opacity));
3154
+ }
3155
+
3156
+ .s-rating-modal-product-img {
3157
+ height: 100%;
3158
+ width: 100%;
3159
3159
  -o-object-fit: cover;
3160
3160
  object-fit: cover;
3161
3161
  }
@@ -3560,8 +3560,8 @@ video {
3560
3560
  border-width: 1px;
3561
3561
  --tw-border-opacity: 1;
3562
3562
  border-color: rgba(228, 228, 231, var(--tw-border-opacity));
3563
- padding-left: 0.5rem;
3564
- padding-right: 0.5rem;
3563
+ padding-left: 0.75rem;
3564
+ padding-right: 0.75rem;
3565
3565
  font-size: 0.875rem;
3566
3566
  line-height: 1.25rem;
3567
3567
  transition-property: background-color, border-color, color, fill, stroke;
@@ -784,47 +784,77 @@
784
784
 
785
785
  </section>
786
786
 
787
- </div>
788
- </div>
787
+ <!-- International Telephone Input Component -->
788
+ <section aria-labelledby="buttons-section-heading" id="product-marketing" class="divide-y divide-gray-200"
789
+ style="scroll-margin-top:6.25rem">
790
+ <div class="pb-6">
791
+ <h2 id="buttons-section-heading" class="text-2xl font-extrabold text-gray-900">International Telephone Input</h2>
792
+ <p class="text-sm text-gray-500 mt-2">Using: <a class="text-primary" href="https://github.com/jackocnr/intl-tel-input" target="_blank">International
793
+ Telephone Input</a></p>
794
+ </div>
789
795
 
796
+ <div id="product-marketing-sections" class="grid grid-cols-3 xl:grid-cols-4 py-8 gap-x-8 gap-y-6">
797
+ <div class="col-span-3 xl:col-span-1">
798
+ <h3 class="text-gray-900 font-semibold">International
799
+ Telephone Input</h3>
800
+ </div>
801
+ <div class="col-span-3 flex flex-wrap items-center gap-2">
802
+ <salla-tel-input style="width: 360px; max-width: 96%"></salla-tel-input>
803
+ </div>
804
+ </div>
790
805
 
791
- <div class="container py-10 grid-cols-2 grid gap-4">
792
- <div class="p-3 rounded-md bg-white shadow-sm">
793
- <h1 class="text-primary border-b border-dashed mb-4">Product Availability</h1>
794
- <p class="my-4">Description</p>
795
- <salla-product-availability channels="sms,email"></salla-product-availability>
796
- </div>
806
+ </section>
797
807
 
798
- <div class="p-3 rounded-md bg-white shadow-sm">
799
- <h1 class="text-primary border-b border-dashed mb-4">Mobile Input</h1>
800
- <p class="my-4">
801
- Using: <a class="text-primary" href="https://github.com/jackocnr/intl-tel-input" target="_blank">International
802
- Telephone Input</a>
803
- </p>
804
- <salla-tel-input></salla-tel-input>
805
- </div>
808
+ <!-- Rating Component -->
809
+ <section aria-labelledby="buttons-section-heading" id="product-marketing" class="divide-y divide-gray-200"
810
+ style="scroll-margin-top:6.25rem">
811
+ <div class="pb-6">
812
+ <h2 id="buttons-section-heading" class="text-2xl font-extrabold text-gray-900">Rating</h2>
813
+ <p class="text-sm text-gray-500 mt-2">Discription</p>
814
+ </div>
806
815
 
807
- <div class="p-3 rounded-md bg-white shadow-sm">
808
- <h1 class="text-primary border-b border-dashed mb-4">Rating</h1>
809
- <p class="my-4">Description</p>
810
- <salla-button wide btn-style="outline-primary" data-on-click="rating::show">Rating</salla-button>
811
- <salla-rating></salla-rating>
812
- </div>
816
+ <div id="product-marketing-sections" class="grid grid-cols-3 xl:grid-cols-4 py-8 gap-x-8 gap-y-6">
817
+ <div class="col-span-3 xl:col-span-1">
818
+ <h3 class="text-gray-900 font-semibold">Rating</h3>
819
+ </div>
820
+ <div class="col-span-3 flex flex-wrap items-center gap-2">
821
+ <salla-button data-on-click="rating::show">Rating Modal</salla-button>
822
+ <salla-rating-modal></salla-rating-modal>
823
+ </div>
824
+ </div>
825
+
826
+ </section>
827
+
828
+ <!-- Infinite Scroll Component -->
829
+ <section aria-labelledby="buttons-section-heading" id="product-marketing" class="divide-y divide-gray-200"
830
+ style="scroll-margin-top:6.25rem">
831
+ <div class="pb-6">
832
+ <h2 id="buttons-section-heading" class="text-2xl font-extrabold text-gray-900">Infinite Scroll</h2>
833
+ <p class="text-sm text-gray-500 mt-2">
834
+ Using: <a class="text-primary" href="https://infinite-scroll.com/" target="_blank">Infinite Scroll</a>
835
+ <br />
836
+ You can pass <code>autoload</code> attribute for autoload result when scrolling.<br />
837
+ <code>&#x3C;salla-infinite-scroll next-page=&#x22;***&#x22;
838
+ autoload&#x3E;&#x3C;/salla-infinite-scroll&#x3E;</code>
839
+ </p>
840
+ </div>
841
+
842
+ <div id="product-marketing-sections" class="grid grid-cols-3 xl:grid-cols-4 py-8 gap-x-8 gap-y-6">
843
+ <div class="col-span-3 xl:col-span-1">
844
+ <h3 class="text-gray-900 font-semibold">Infinite Scroll</h3>
845
+ </div>
846
+ <div class="col-span-3 flex flex-wrap items-center justify-center gap-2">
847
+ <salla-infinite-scroll class="w-full grid grid-cols-5 grid-flow-row gap-6" next-page="infinit-scroll.html?page=2" item=".i-item">
848
+ </salla-infinite-scroll>
849
+ </div>
850
+ </div>
851
+
852
+ </section>
813
853
 
814
- <div class="p-3 rounded-md bg-white shadow-sm col-span-2">
815
- <h1 class="text-primary border-b border-dashed mb-4">Infinite Scroll</h1>
816
- <p class="my-4">
817
- Using: <a class="text-primary" href="https://infinite-scroll.com/" target="_blank">Infinite Scroll</a>
818
- <br />
819
- You can pass <code>autoload</code> attribute for autoload result when scrolling.<br />
820
- <code>&#x3C;salla-infinite-scroll next-page=&#x22;***&#x22;
821
- autoload&#x3E;&#x3C;/salla-infinite-scroll&#x3E;</code>
822
- </p>
823
- <salla-infinite-scroll class="grid grid-cols-4 grid-flow-row gap-6 " next-page="infinit-scroll.html?page=2"
824
- item=".i-item">
825
- </salla-infinite-scroll>
826
854
  </div>
827
855
  </div>
856
+
857
+
828
858
  <script src="dist/demo.js"></script>
829
859
  </body>
830
860
 
@@ -50,6 +50,9 @@ module.exports = {
50
50
  },
51
51
  },
52
52
  },
53
+ corePlugins: {
54
+ outline: false,
55
+ },
53
56
  plugins: [
54
57
  //require('@salla.sa/twilight-tailwind-theme'),
55
58
  require('../src/plugins/tailwind-theme'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
4
4
  "license": "MIT",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {