unika-components 1.0.163 → 1.0.165

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.
@@ -2,27 +2,6 @@
2
2
  .uni-image-component {
3
3
  max-width: 100%;
4
4
  }
5
-
6
- .uni-video-component {
7
- position: relative;
8
- text-align: center;
9
- }
10
- .play-pause-button {
11
- position: absolute;
12
- top: 50%;
13
- left: 50%;
14
- transform: translate(-50%, -50%);
15
- cursor: pointer;
16
- font-size: 2rem;
17
- color: #fff;
18
- background: rgba(0, 0, 0, 0.6);
19
- border-radius: 50%;
20
- padding: 10px;
21
- transition: background 0.3s;
22
- }
23
- .play-pause-button:hover {
24
- background: rgba(0, 0, 0, 0.8);
25
- }
26
5
 
27
6
  h2.uni-text-component, p.uni-text-component {
28
7
  margin-bottom: 0;
@@ -35,6 +14,18 @@ button.uni-text-component {
35
14
  box-sizing: border-box;
36
15
  white-space: pre-wrap;
37
16
  }
17
+
18
+
19
+ .uni-calendar-component {
20
+
21
+ }
22
+ .slot-number {
23
+ position: absolute;
24
+ bottom: 2px;
25
+ left: 7px;
26
+ font-size: 12px;
27
+ color: #666
28
+ }
38
29
 
39
30
  .slide-guide {
40
31
  position: absolute;
@@ -109,10 +100,26 @@ body, html {
109
100
  }
110
101
  }
111
102
 
112
- .effect {
113
- width: 100%;
114
- height: 100%;
115
- }
103
+ .uni-video-component {
104
+ position: relative;
105
+ text-align: center;
106
+ }
107
+ .play-pause-button {
108
+ position: absolute;
109
+ top: 50%;
110
+ left: 50%;
111
+ transform: translate(-50%, -50%);
112
+ cursor: pointer;
113
+ font-size: 2rem;
114
+ color: #fff;
115
+ background: rgba(0, 0, 0, 0.6);
116
+ border-radius: 50%;
117
+ padding: 10px;
118
+ transition: background 0.3s;
119
+ }
120
+ .play-pause-button:hover {
121
+ background: rgba(0, 0, 0, 0.8);
122
+ }
116
123
 
117
124
  .like-button {
118
125
  display: flex;
@@ -136,9 +143,6 @@ body, html {
136
143
  color: #333;
137
144
  }
138
145
 
139
- .uni-build-up-component {
140
- }
141
-
142
146
  .ant-input-number {
143
147
  box-sizing: border-box;
144
148
  margin: 0;
@@ -174,18 +178,14 @@ body, html {
174
178
  vertical-align: top;
175
179
  }
176
180
 
177
-
178
- .uni-calendar-component {
179
-
180
- }
181
- .slot-number {
182
- position: absolute;
183
- bottom: 2px;
184
- left: 7px;
185
- font-size: 12px;
186
- color: #666
181
+ .effect {
182
+ width: 100%;
183
+ height: 100%;
187
184
  }
188
185
 
186
+ .uni-build-up-component {
187
+ }
188
+
189
189
  .swiper-warp {
190
190
  width: 100%;
191
191
  height: 100%;
@@ -747,193 +747,6 @@ button.swiper-pagination-bullet {
747
747
  backface-visibility: hidden;
748
748
  }
749
749
 
750
-
751
- .no-animation__card {
752
- font-weight: 500;
753
- font-size: var(--countdown-size, 2rem);
754
- line-height: 1.5;
755
- display: block;
756
- color: var(--main-color, #EC685C);
757
- }
758
-
759
- .flip-clock {
760
- text-align: center;
761
- perspective: 600px;
762
- margin: 0 auto;
763
- }
764
-
765
- .flip-clock *,
766
- .flip-clock *:before,
767
- .flip-clock *:after {
768
- box-sizing: border-box;
769
- }
770
-
771
- .flip-clock__piece {
772
- display: inline-block;
773
- margin: 0 0.2vw;
774
- }
775
-
776
- @media (min-width: 1000px) {
777
- .flip-clock__piece {
778
- margin: 0 5px;
779
- }
780
- }
781
-
782
- .flip-clock__slot {
783
- font-size: var(--label-size, 1rem);
784
- line-height: 1.5;
785
- display: block;
786
- color: var(--label-color, #222222);
787
- }
788
-
789
- .flip-card {
790
- display: block;
791
- position: relative;
792
- padding-bottom: 0.72em; /* halfHeight */
793
- font-size: var(--countdown-size, 2.25rem);
794
- line-height: 0.95;
795
- }
796
-
797
- @media (min-width: 1000px) {
798
- .flip-clock__slot {
799
- font-size: 1.2rem;
800
- }
801
-
802
- .flip-card {
803
- font-size: 3rem;
804
- }
805
- }
806
-
807
- .flip-card__top,
808
- .flip-card__bottom,
809
- .flip-card__back-bottom,
810
- .flip-card__back::before,
811
- .flip-card__back::after{
812
- display: block;
813
- height: 0.72em; /* halfHeight */
814
- color: var(--main-color, #EC685C);
815
- background: var(--main-flip-background-color, #222222);
816
- padding: 0.23em 0.15em 0.4em;
817
- border-radius: 0.15em 0.15em 0 0; /* borderRadius */
818
- backface-visibility: hidden;
819
- -webkit-backface-visibility: hidden;
820
- transform-style: preserve-3d;
821
- width: 2.1em;
822
- }
823
-
824
- .flip-card__top-4digits,
825
- .flip-card__bottom-4digits,
826
- .flip-card__back-bottom-4digits,
827
- .flip-card__back-4digits::before,
828
- .flip-card__back-4digits::after {
829
- display: block;
830
- height: 0.72em; /* halfHeight */
831
- color: var(--main-color, #EC685C);
832
- background: var(--main-flip-background-color, #222222);
833
- padding: 0.23em 0.15em 0.4em;
834
- border-radius: 0.15em 0.15em 0 0; /* borderRadius */
835
- backface-visibility: hidden;
836
- -webkit-backface-visibility: hidden;
837
- transform-style: preserve-3d;
838
- width: 2.65em;
839
- }
840
-
841
- .flip-card__bottom,
842
- .flip-card__back-bottom,
843
- .flip-card__bottom-4digits,
844
- .flip-card__back-bottom-4digits {
845
- color: var(--second-flip-color, #EC685C);
846
- position: absolute;
847
- top: 50%;
848
- left: 0;
849
- border-top: solid 1px var(--second-flip-background-color, #000);
850
- background: var(--second-flip-background-color, #393939);
851
- border-radius: 0 0 0.15em 0.15em; /* borderRadius */
852
- pointer-events: none;
853
- overflow: hidden;
854
- z-index: 2;
855
- }
856
-
857
- .flip-card__back-bottom,
858
- .flip-card__back-bottom-4digits {
859
- z-index: 1;
860
- }
861
-
862
- .flip-card__bottom::after,
863
- .flip-card__back-bottom::after,
864
- .flip-card__bottom-4digits::after,
865
- .flip-card__back-bottom-4digits::after {
866
- display: block;
867
- margin-top: -0.72em; /* Negative halfHeight */
868
- }
869
- .flip-card__back::before,
870
- .flip-card__bottom::after,
871
- .flip-card__back-bottom::after,
872
- .flip-card__back-4digits::before,
873
- .flip-card__bottom-4digits::after,
874
- .flip-card__back-bottom-4digits::after {
875
- content: attr(data-value);
876
- }
877
-
878
- .flip-card__back,
879
- .flip-card__back-4digits {
880
- position: absolute;
881
- top: 0;
882
- height: 100%;
883
- left: 0%;
884
- pointer-events: none;
885
- }
886
- .flip-card__back::before,
887
- .flip-card__back-4digits::before {
888
- position: relative;
889
- overflow: hidden;
890
- z-index: -1;
891
- }
892
-
893
- .flip .flip-card__back::before,
894
- .flip .flip-card__back-4digits::before {
895
- z-index: 1;
896
- animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
897
- animation-fill-mode: both;
898
- transform-origin: center bottom;
899
- }
900
-
901
- .flip .flip-card__bottom,
902
- .flip .flip-card__bottom-4digits {
903
- transform-origin: center top;
904
- animation-fill-mode: both;
905
- animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
906
- }
907
- @keyframes flipTop {
908
- 0% {
909
- transform: rotateX(0deg);
910
- z-index: 2;
911
- }
912
- 0%, 99% {
913
- opacity: 1;
914
- }
915
- 100% {
916
- transform: rotateX(-90deg);
917
- opacity: 0;
918
- }
919
- }
920
-
921
- @keyframes flipBottom {
922
- 0%, 50% {
923
- z-index: -1;
924
- transform: rotateX(90deg);
925
- opacity: 0;
926
- }
927
- 51% {
928
- opacity: 1;
929
- }
930
- 100% {
931
- opacity: 1;
932
- transform: rotateX(0deg);
933
- z-index: 5;
934
- }
935
- }
936
-
937
750
  .unika-calendar-box {
938
751
  position: relative;
939
752
  width: 325px !important;
@@ -1191,3 +1004,190 @@ button.swiper-pagination-bullet {
1191
1004
  padding: 0 0px;
1192
1005
  border-bottom: 1px solid
1193
1006
  }
1007
+
1008
+
1009
+ .no-animation__card {
1010
+ font-weight: 500;
1011
+ font-size: var(--countdown-size, 2rem);
1012
+ line-height: 1.5;
1013
+ display: block;
1014
+ color: var(--main-color, #EC685C);
1015
+ }
1016
+
1017
+ .flip-clock {
1018
+ text-align: center;
1019
+ perspective: 600px;
1020
+ margin: 0 auto;
1021
+ }
1022
+
1023
+ .flip-clock *,
1024
+ .flip-clock *:before,
1025
+ .flip-clock *:after {
1026
+ box-sizing: border-box;
1027
+ }
1028
+
1029
+ .flip-clock__piece {
1030
+ display: inline-block;
1031
+ margin: 0 0.2vw;
1032
+ }
1033
+
1034
+ @media (min-width: 1000px) {
1035
+ .flip-clock__piece {
1036
+ margin: 0 5px;
1037
+ }
1038
+ }
1039
+
1040
+ .flip-clock__slot {
1041
+ font-size: var(--label-size, 1rem);
1042
+ line-height: 1.5;
1043
+ display: block;
1044
+ color: var(--label-color, #222222);
1045
+ }
1046
+
1047
+ .flip-card {
1048
+ display: block;
1049
+ position: relative;
1050
+ padding-bottom: 0.72em; /* halfHeight */
1051
+ font-size: var(--countdown-size, 2.25rem);
1052
+ line-height: 0.95;
1053
+ }
1054
+
1055
+ @media (min-width: 1000px) {
1056
+ .flip-clock__slot {
1057
+ font-size: 1.2rem;
1058
+ }
1059
+
1060
+ .flip-card {
1061
+ font-size: 3rem;
1062
+ }
1063
+ }
1064
+
1065
+ .flip-card__top,
1066
+ .flip-card__bottom,
1067
+ .flip-card__back-bottom,
1068
+ .flip-card__back::before,
1069
+ .flip-card__back::after{
1070
+ display: block;
1071
+ height: 0.72em; /* halfHeight */
1072
+ color: var(--main-color, #EC685C);
1073
+ background: var(--main-flip-background-color, #222222);
1074
+ padding: 0.23em 0.15em 0.4em;
1075
+ border-radius: 0.15em 0.15em 0 0; /* borderRadius */
1076
+ backface-visibility: hidden;
1077
+ -webkit-backface-visibility: hidden;
1078
+ transform-style: preserve-3d;
1079
+ width: 2.1em;
1080
+ }
1081
+
1082
+ .flip-card__top-4digits,
1083
+ .flip-card__bottom-4digits,
1084
+ .flip-card__back-bottom-4digits,
1085
+ .flip-card__back-4digits::before,
1086
+ .flip-card__back-4digits::after {
1087
+ display: block;
1088
+ height: 0.72em; /* halfHeight */
1089
+ color: var(--main-color, #EC685C);
1090
+ background: var(--main-flip-background-color, #222222);
1091
+ padding: 0.23em 0.15em 0.4em;
1092
+ border-radius: 0.15em 0.15em 0 0; /* borderRadius */
1093
+ backface-visibility: hidden;
1094
+ -webkit-backface-visibility: hidden;
1095
+ transform-style: preserve-3d;
1096
+ width: 2.65em;
1097
+ }
1098
+
1099
+ .flip-card__bottom,
1100
+ .flip-card__back-bottom,
1101
+ .flip-card__bottom-4digits,
1102
+ .flip-card__back-bottom-4digits {
1103
+ color: var(--second-flip-color, #EC685C);
1104
+ position: absolute;
1105
+ top: 50%;
1106
+ left: 0;
1107
+ border-top: solid 1px var(--second-flip-background-color, #000);
1108
+ background: var(--second-flip-background-color, #393939);
1109
+ border-radius: 0 0 0.15em 0.15em; /* borderRadius */
1110
+ pointer-events: none;
1111
+ overflow: hidden;
1112
+ z-index: 2;
1113
+ }
1114
+
1115
+ .flip-card__back-bottom,
1116
+ .flip-card__back-bottom-4digits {
1117
+ z-index: 1;
1118
+ }
1119
+
1120
+ .flip-card__bottom::after,
1121
+ .flip-card__back-bottom::after,
1122
+ .flip-card__bottom-4digits::after,
1123
+ .flip-card__back-bottom-4digits::after {
1124
+ display: block;
1125
+ margin-top: -0.72em; /* Negative halfHeight */
1126
+ }
1127
+ .flip-card__back::before,
1128
+ .flip-card__bottom::after,
1129
+ .flip-card__back-bottom::after,
1130
+ .flip-card__back-4digits::before,
1131
+ .flip-card__bottom-4digits::after,
1132
+ .flip-card__back-bottom-4digits::after {
1133
+ content: attr(data-value);
1134
+ }
1135
+
1136
+ .flip-card__back,
1137
+ .flip-card__back-4digits {
1138
+ position: absolute;
1139
+ top: 0;
1140
+ height: 100%;
1141
+ left: 0%;
1142
+ pointer-events: none;
1143
+ }
1144
+ .flip-card__back::before,
1145
+ .flip-card__back-4digits::before {
1146
+ position: relative;
1147
+ overflow: hidden;
1148
+ z-index: -1;
1149
+ }
1150
+
1151
+ .flip .flip-card__back::before,
1152
+ .flip .flip-card__back-4digits::before {
1153
+ z-index: 1;
1154
+ animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
1155
+ animation-fill-mode: both;
1156
+ transform-origin: center bottom;
1157
+ }
1158
+
1159
+ .flip .flip-card__bottom,
1160
+ .flip .flip-card__bottom-4digits {
1161
+ transform-origin: center top;
1162
+ animation-fill-mode: both;
1163
+ animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
1164
+ }
1165
+ @keyframes flipTop {
1166
+ 0% {
1167
+ transform: rotateX(0deg);
1168
+ z-index: 2;
1169
+ }
1170
+ 0%, 99% {
1171
+ opacity: 1;
1172
+ }
1173
+ 100% {
1174
+ transform: rotateX(-90deg);
1175
+ opacity: 0;
1176
+ }
1177
+ }
1178
+
1179
+ @keyframes flipBottom {
1180
+ 0%, 50% {
1181
+ z-index: -1;
1182
+ transform: rotateX(90deg);
1183
+ opacity: 0;
1184
+ }
1185
+ 51% {
1186
+ opacity: 1;
1187
+ }
1188
+ 100% {
1189
+ opacity: 1;
1190
+ transform: rotateX(0deg);
1191
+ z-index: 5;
1192
+ }
1193
+ }
@@ -94329,9 +94329,14 @@ var script = defineComponent({
94329
94329
  const styleProps = useStylePick(props, defaultStyles);
94330
94330
  const handleClick = useComponentClick(props);
94331
94331
  const svgContent = ref('');
94332
+ // Function to fetch SVG content from the URL
94332
94333
  const fetchSvg = async (url) => {
94333
94334
  try {
94334
- const response = await axios$1.get(url);
94335
+ const response = await axios$1.get(url, {
94336
+ headers: {
94337
+ 'Accept': 'image/svg+xml'
94338
+ }
94339
+ });
94335
94340
  return response.data;
94336
94341
  }
94337
94342
  catch (error) {
@@ -94339,23 +94344,31 @@ var script = defineComponent({
94339
94344
  return '';
94340
94345
  }
94341
94346
  };
94342
- const updateSvgColor = (svgString, color) => {
94347
+ // Function to update the color of the SVG
94348
+ const updateSvgColor = (svg, color, width, height) => {
94343
94349
  const parser = new DOMParser();
94344
- const svgDoc = parser.parseFromString(svgString, 'image/svg+xml');
94345
- const paths = svgDoc.querySelectorAll('path');
94346
- paths.forEach((path) => {
94347
- path.setAttribute('fill', color);
94348
- });
94349
- const serializer = new XMLSerializer();
94350
- return serializer.serializeToString(svgDoc);
94350
+ const svgDoc = parser.parseFromString(svg, 'image/svg+xml');
94351
+ const svgElement = svgDoc.getElementsByTagName('svg')[0];
94352
+ const paths = svgDoc.getElementsByTagName('path');
94353
+ // Update the fill color for all paths
94354
+ for (let i = 0; i < paths.length; i++) {
94355
+ paths[i].setAttribute('fill', color);
94356
+ }
94357
+ // Set width and height for the SVG element
94358
+ if (svgElement) {
94359
+ svgElement.setAttribute('width', width);
94360
+ svgElement.setAttribute('height', height);
94361
+ }
94362
+ return new XMLSerializer().serializeToString(svgDoc);
94351
94363
  };
94364
+ // Function to load and color the SVG
94352
94365
  const loadSvg = async () => {
94353
94366
  const svg = await fetchSvg(props.svgSrc);
94354
94367
  if (svg) {
94355
- svgContent.value = updateSvgColor(svg, props.color);
94368
+ svgContent.value = updateSvgColor(svg, props.color, props.width, props.height);
94356
94369
  }
94357
94370
  };
94358
- watch([() => props.svgSrc, () => props.color], loadSvg, { immediate: true });
94371
+ watch([() => props.svgSrc, () => props.color, () => props.width, () => props.height], loadSvg, { immediate: true });
94359
94372
  return {
94360
94373
  styleProps,
94361
94374
  handleClick,
@@ -94369,11 +94382,12 @@ const _hoisted_1 = ["innerHTML"];
94369
94382
  function render(_ctx, _cache, $props, $setup, $data, $options) {
94370
94383
  return (openBlock(), createElementBlock("div", {
94371
94384
  onClick: _cache[0] || (_cache[0] = withModifiers((...args) => (_ctx.handleClick && _ctx.handleClick(...args)), ["prevent"])),
94372
- innerHTML: _ctx.svgContent,
94373
94385
  style: normalizeStyle$1(_ctx.styleProps),
94374
94386
  class: "uni-svg-component",
94375
94387
  draggable: false
94376
- }, null, 12 /* STYLE, PROPS */, _hoisted_1))
94388
+ }, [
94389
+ createElementVNode("div", { innerHTML: _ctx.svgContent }, null, 8 /* PROPS */, _hoisted_1)
94390
+ ], 4 /* STYLE */))
94377
94391
  }
94378
94392
 
94379
94393
  script.render = render;
@@ -94335,9 +94335,14 @@ summary tabindex target title type usemap value width wmode wrap`;
94335
94335
  const styleProps = useStylePick(props, defaultStyles);
94336
94336
  const handleClick = useComponentClick(props);
94337
94337
  const svgContent = vue.ref('');
94338
+ // Function to fetch SVG content from the URL
94338
94339
  const fetchSvg = async (url) => {
94339
94340
  try {
94340
- const response = await axios$1.get(url);
94341
+ const response = await axios$1.get(url, {
94342
+ headers: {
94343
+ 'Accept': 'image/svg+xml'
94344
+ }
94345
+ });
94341
94346
  return response.data;
94342
94347
  }
94343
94348
  catch (error) {
@@ -94345,23 +94350,31 @@ summary tabindex target title type usemap value width wmode wrap`;
94345
94350
  return '';
94346
94351
  }
94347
94352
  };
94348
- const updateSvgColor = (svgString, color) => {
94353
+ // Function to update the color of the SVG
94354
+ const updateSvgColor = (svg, color, width, height) => {
94349
94355
  const parser = new DOMParser();
94350
- const svgDoc = parser.parseFromString(svgString, 'image/svg+xml');
94351
- const paths = svgDoc.querySelectorAll('path');
94352
- paths.forEach((path) => {
94353
- path.setAttribute('fill', color);
94354
- });
94355
- const serializer = new XMLSerializer();
94356
- return serializer.serializeToString(svgDoc);
94356
+ const svgDoc = parser.parseFromString(svg, 'image/svg+xml');
94357
+ const svgElement = svgDoc.getElementsByTagName('svg')[0];
94358
+ const paths = svgDoc.getElementsByTagName('path');
94359
+ // Update the fill color for all paths
94360
+ for (let i = 0; i < paths.length; i++) {
94361
+ paths[i].setAttribute('fill', color);
94362
+ }
94363
+ // Set width and height for the SVG element
94364
+ if (svgElement) {
94365
+ svgElement.setAttribute('width', width);
94366
+ svgElement.setAttribute('height', height);
94367
+ }
94368
+ return new XMLSerializer().serializeToString(svgDoc);
94357
94369
  };
94370
+ // Function to load and color the SVG
94358
94371
  const loadSvg = async () => {
94359
94372
  const svg = await fetchSvg(props.svgSrc);
94360
94373
  if (svg) {
94361
- svgContent.value = updateSvgColor(svg, props.color);
94374
+ svgContent.value = updateSvgColor(svg, props.color, props.width, props.height);
94362
94375
  }
94363
94376
  };
94364
- vue.watch([() => props.svgSrc, () => props.color], loadSvg, { immediate: true });
94377
+ vue.watch([() => props.svgSrc, () => props.color, () => props.width, () => props.height], loadSvg, { immediate: true });
94365
94378
  return {
94366
94379
  styleProps,
94367
94380
  handleClick,
@@ -94375,11 +94388,12 @@ summary tabindex target title type usemap value width wmode wrap`;
94375
94388
  function render(_ctx, _cache, $props, $setup, $data, $options) {
94376
94389
  return (vue.openBlock(), vue.createElementBlock("div", {
94377
94390
  onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => (_ctx.handleClick && _ctx.handleClick(...args)), ["prevent"])),
94378
- innerHTML: _ctx.svgContent,
94379
94391
  style: vue.normalizeStyle(_ctx.styleProps),
94380
94392
  class: "uni-svg-component",
94381
94393
  draggable: false
94382
- }, null, 12 /* STYLE, PROPS */, _hoisted_1))
94394
+ }, [
94395
+ vue.createElementVNode("div", { innerHTML: _ctx.svgContent }, null, 8 /* PROPS */, _hoisted_1)
94396
+ ], 4 /* STYLE */))
94383
94397
  }
94384
94398
 
94385
94399
  script.render = render;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unika-components",
3
- "version": "1.0.163",
3
+ "version": "1.0.165",
4
4
  "private": false,
5
5
  "main": "dist/unika-components.umd.js",
6
6
  "module": "dist/unika-components.esm.js",