@tapcart/mobile-components 0.6.22 → 0.7.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.
- package/dist/components/hooks/use-infinite-scroll.d.ts +3 -1
- package/dist/components/hooks/use-infinite-scroll.d.ts.map +1 -1
- package/dist/components/hooks/use-infinite-scroll.js +34 -11
- package/dist/components/hooks/use-products.d.ts +3 -1
- package/dist/components/hooks/use-products.d.ts.map +1 -1
- package/dist/components/hooks/use-products.js +19 -5
- package/dist/components/hooks/use-reviews.d.ts +27 -0
- package/dist/components/hooks/use-reviews.d.ts.map +1 -0
- package/dist/components/hooks/use-reviews.js +130 -0
- package/dist/components/ui/Input/input.d.ts.map +1 -1
- package/dist/components/ui/Input/input.js +23 -5
- package/dist/components/ui/Input/types.d.ts +1 -0
- package/dist/components/ui/Input/types.d.ts.map +1 -1
- package/dist/components/ui/Input/useInput.d.ts +1 -1
- package/dist/components/ui/Input/useInput.d.ts.map +1 -1
- package/dist/components/ui/Input/useInput.js +24 -10
- package/dist/components/ui/accordion.d.ts +3 -1
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/carousel.d.ts +1 -0
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +61 -2
- package/dist/components/ui/chip.d.ts +2 -2
- package/dist/components/ui/icon.d.ts +4 -1
- package/dist/components/ui/icon.d.ts.map +1 -1
- package/dist/components/ui/icon.js +35 -8
- package/dist/components/ui/image.d.ts.map +1 -1
- package/dist/components/ui/image.js +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/scroll-area.d.ts +1 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +2 -2
- package/dist/components/ui/toast.d.ts +2 -2
- package/dist/components/ui/toggle-group.d.ts +2 -2
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/video.d.ts +3 -1
- package/dist/components/ui/video.d.ts.map +1 -1
- package/dist/components/ui/video.js +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +18 -0
- package/dist/styles.css +15 -78
- package/package.json +18 -17
- package/dist/components/hooks/use-click-outside.d.ts +0 -3
- package/dist/components/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/components/hooks/use-click-outside.js +0 -16
- package/dist/components/hooks/use-outside-click.d.ts +0 -4
- package/dist/components/hooks/use-outside-click.d.ts.map +0 -1
- package/dist/components/hooks/use-outside-click.js +0 -16
package/dist/styles.css
CHANGED
|
@@ -707,39 +707,21 @@ video {
|
|
|
707
707
|
.bottom-6 {
|
|
708
708
|
bottom: 1.5rem;
|
|
709
709
|
}
|
|
710
|
-
.bottom-\[110px\] {
|
|
711
|
-
bottom: 110px;
|
|
712
|
-
}
|
|
713
710
|
.bottom-\[18px\] {
|
|
714
711
|
bottom: 18px;
|
|
715
712
|
}
|
|
716
|
-
.bottom-\[30px\] {
|
|
717
|
-
bottom: 30px;
|
|
718
|
-
}
|
|
719
713
|
.bottom-\[58px\] {
|
|
720
714
|
bottom: 58px;
|
|
721
715
|
}
|
|
722
|
-
.bottom-\[70px\] {
|
|
723
|
-
bottom: 70px;
|
|
724
|
-
}
|
|
725
|
-
.end-4 {
|
|
726
|
-
inset-inline-end: 1rem;
|
|
727
|
-
}
|
|
728
716
|
.left-0 {
|
|
729
717
|
left: 0px;
|
|
730
718
|
}
|
|
731
719
|
.left-1\/2 {
|
|
732
720
|
left: 50%;
|
|
733
721
|
}
|
|
734
|
-
.left-14 {
|
|
735
|
-
left: 3.5rem;
|
|
736
|
-
}
|
|
737
722
|
.left-2 {
|
|
738
723
|
left: 0.5rem;
|
|
739
724
|
}
|
|
740
|
-
.left-24 {
|
|
741
|
-
left: 6rem;
|
|
742
|
-
}
|
|
743
725
|
.left-4 {
|
|
744
726
|
left: 1rem;
|
|
745
727
|
}
|
|
@@ -755,18 +737,6 @@ video {
|
|
|
755
737
|
.right-2 {
|
|
756
738
|
right: 0.5rem;
|
|
757
739
|
}
|
|
758
|
-
.right-4 {
|
|
759
|
-
right: 1rem;
|
|
760
|
-
}
|
|
761
|
-
.right-\[100px\] {
|
|
762
|
-
right: 100px;
|
|
763
|
-
}
|
|
764
|
-
.right-\[140px\] {
|
|
765
|
-
right: 140px;
|
|
766
|
-
}
|
|
767
|
-
.right-auto {
|
|
768
|
-
right: auto;
|
|
769
|
-
}
|
|
770
740
|
.start-10 {
|
|
771
741
|
inset-inline-start: 2.5rem;
|
|
772
742
|
}
|
|
@@ -785,12 +755,6 @@ video {
|
|
|
785
755
|
.top-2 {
|
|
786
756
|
top: 0.5rem;
|
|
787
757
|
}
|
|
788
|
-
.top-4 {
|
|
789
|
-
top: 1rem;
|
|
790
|
-
}
|
|
791
|
-
.top-\[18px\] {
|
|
792
|
-
top: 18px;
|
|
793
|
-
}
|
|
794
758
|
.top-\[50\%\] {
|
|
795
759
|
top: 50%;
|
|
796
760
|
}
|
|
@@ -868,9 +832,6 @@ video {
|
|
|
868
832
|
.mb-2 {
|
|
869
833
|
margin-bottom: 0.5rem;
|
|
870
834
|
}
|
|
871
|
-
.mb-4 {
|
|
872
|
-
margin-bottom: 1rem;
|
|
873
|
-
}
|
|
874
835
|
.mb-6 {
|
|
875
836
|
margin-bottom: 1.5rem;
|
|
876
837
|
}
|
|
@@ -883,12 +844,6 @@ video {
|
|
|
883
844
|
.ml-4 {
|
|
884
845
|
margin-left: 1rem;
|
|
885
846
|
}
|
|
886
|
-
.mr-0 {
|
|
887
|
-
margin-right: 0px;
|
|
888
|
-
}
|
|
889
|
-
.mr-0\.5 {
|
|
890
|
-
margin-right: 0.125rem;
|
|
891
|
-
}
|
|
892
847
|
.mr-2 {
|
|
893
848
|
margin-right: 0.5rem;
|
|
894
849
|
}
|
|
@@ -907,9 +862,6 @@ video {
|
|
|
907
862
|
.mt-3 {
|
|
908
863
|
margin-top: 0.75rem;
|
|
909
864
|
}
|
|
910
|
-
.mt-4 {
|
|
911
|
-
margin-top: 1rem;
|
|
912
|
-
}
|
|
913
865
|
.mt-auto {
|
|
914
866
|
margin-top: auto;
|
|
915
867
|
}
|
|
@@ -928,6 +880,9 @@ video {
|
|
|
928
880
|
.block {
|
|
929
881
|
display: block;
|
|
930
882
|
}
|
|
883
|
+
.inline-block {
|
|
884
|
+
display: inline-block;
|
|
885
|
+
}
|
|
931
886
|
.inline {
|
|
932
887
|
display: inline;
|
|
933
888
|
}
|
|
@@ -1015,6 +970,9 @@ video {
|
|
|
1015
970
|
.h-\[36\] {
|
|
1016
971
|
height: 36;
|
|
1017
972
|
}
|
|
973
|
+
.h-\[38px\] {
|
|
974
|
+
height: 38px;
|
|
975
|
+
}
|
|
1018
976
|
.h-\[42px\] {
|
|
1019
977
|
height: 42px;
|
|
1020
978
|
}
|
|
@@ -1090,9 +1048,6 @@ video {
|
|
|
1090
1048
|
.w-\[138px\] {
|
|
1091
1049
|
width: 138px;
|
|
1092
1050
|
}
|
|
1093
|
-
.w-\[140px\] {
|
|
1094
|
-
width: 140px;
|
|
1095
|
-
}
|
|
1096
1051
|
.w-\[154px\] {
|
|
1097
1052
|
width: 154px;
|
|
1098
1053
|
}
|
|
@@ -1162,6 +1117,9 @@ video {
|
|
|
1162
1117
|
.grow-0 {
|
|
1163
1118
|
flex-grow: 0;
|
|
1164
1119
|
}
|
|
1120
|
+
.basis-3\/4 {
|
|
1121
|
+
flex-basis: 75%;
|
|
1122
|
+
}
|
|
1165
1123
|
.basis-full {
|
|
1166
1124
|
flex-basis: 100%;
|
|
1167
1125
|
}
|
|
@@ -1299,21 +1257,12 @@ video {
|
|
|
1299
1257
|
.items-center {
|
|
1300
1258
|
align-items: center;
|
|
1301
1259
|
}
|
|
1302
|
-
.\!justify-start {
|
|
1303
|
-
justify-content: flex-start !important;
|
|
1304
|
-
}
|
|
1305
1260
|
.justify-start {
|
|
1306
1261
|
justify-content: flex-start;
|
|
1307
1262
|
}
|
|
1308
|
-
.\!justify-end {
|
|
1309
|
-
justify-content: flex-end !important;
|
|
1310
|
-
}
|
|
1311
1263
|
.justify-end {
|
|
1312
1264
|
justify-content: flex-end;
|
|
1313
1265
|
}
|
|
1314
|
-
.\!justify-center {
|
|
1315
|
-
justify-content: center !important;
|
|
1316
|
-
}
|
|
1317
1266
|
.justify-center {
|
|
1318
1267
|
justify-content: center;
|
|
1319
1268
|
}
|
|
@@ -1414,6 +1363,9 @@ video {
|
|
|
1414
1363
|
.whitespace-nowrap {
|
|
1415
1364
|
white-space: nowrap;
|
|
1416
1365
|
}
|
|
1366
|
+
.break-words {
|
|
1367
|
+
overflow-wrap: break-word;
|
|
1368
|
+
}
|
|
1417
1369
|
.rounded {
|
|
1418
1370
|
border-radius: 0.25rem;
|
|
1419
1371
|
}
|
|
@@ -1479,9 +1431,6 @@ video {
|
|
|
1479
1431
|
.border-2 {
|
|
1480
1432
|
border-width: 2px;
|
|
1481
1433
|
}
|
|
1482
|
-
.border-\[1px\] {
|
|
1483
|
-
border-width: 1px;
|
|
1484
|
-
}
|
|
1485
1434
|
.border-b {
|
|
1486
1435
|
border-bottom-width: 1px;
|
|
1487
1436
|
}
|
|
@@ -1500,10 +1449,6 @@ video {
|
|
|
1500
1449
|
.\!border-stateColors-error {
|
|
1501
1450
|
border-color: var(--stateColors-error) !important;
|
|
1502
1451
|
}
|
|
1503
|
-
.border-\[\#000\] {
|
|
1504
|
-
--tw-border-opacity: 1;
|
|
1505
|
-
border-color: rgb(0 0 0 / var(--tw-border-opacity));
|
|
1506
|
-
}
|
|
1507
1452
|
.border-\[\#E3E3E3\] {
|
|
1508
1453
|
--tw-border-opacity: 1;
|
|
1509
1454
|
border-color: rgb(227 227 227 / var(--tw-border-opacity));
|
|
@@ -1547,10 +1492,6 @@ video {
|
|
|
1547
1492
|
--tw-bg-opacity: 1;
|
|
1548
1493
|
background-color: rgb(97 46 255 / var(--tw-bg-opacity));
|
|
1549
1494
|
}
|
|
1550
|
-
.bg-\[\#FFFFFF\] {
|
|
1551
|
-
--tw-bg-opacity: 1;
|
|
1552
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1553
|
-
}
|
|
1554
1495
|
.bg-background {
|
|
1555
1496
|
background-color: hsl(var(--background));
|
|
1556
1497
|
}
|
|
@@ -1707,6 +1648,9 @@ video {
|
|
|
1707
1648
|
padding-top: 1rem;
|
|
1708
1649
|
padding-bottom: 1rem;
|
|
1709
1650
|
}
|
|
1651
|
+
.pb-0 {
|
|
1652
|
+
padding-bottom: 0px;
|
|
1653
|
+
}
|
|
1710
1654
|
.pb-1 {
|
|
1711
1655
|
padding-bottom: 0.25rem;
|
|
1712
1656
|
}
|
|
@@ -1722,9 +1666,6 @@ video {
|
|
|
1722
1666
|
.pl-0 {
|
|
1723
1667
|
padding-left: 0px;
|
|
1724
1668
|
}
|
|
1725
|
-
.pl-10 {
|
|
1726
|
-
padding-left: 2.5rem;
|
|
1727
|
-
}
|
|
1728
1669
|
.pl-2 {
|
|
1729
1670
|
padding-left: 0.5rem;
|
|
1730
1671
|
}
|
|
@@ -2637,10 +2578,6 @@ body::-webkit-scrollbar {
|
|
|
2637
2578
|
padding-right: 2.5rem;
|
|
2638
2579
|
}
|
|
2639
2580
|
|
|
2640
|
-
.data-\[error\=true\]\:text-stateColors-error[data-error=true] {
|
|
2641
|
-
color: var(--stateColors-error);
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
2581
|
.data-\[state\=on\]\:text-accent-foreground[data-state=on] {
|
|
2645
2582
|
color: hsl(var(--accent-foreground));
|
|
2646
2583
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapcart/mobile-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"style": "dist/styles.css",
|
|
@@ -11,6 +11,16 @@
|
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
12
12
|
"author": "Tapcart Inc.",
|
|
13
13
|
"homepage": "https://tapcart.com",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"lint": "eslint \"**/*.ts*\"",
|
|
16
|
+
"ui:add": "pnpm dlx shadcn-ui@latest add",
|
|
17
|
+
"build:styles": "postcss styles/globals.css -o dist/styles.css",
|
|
18
|
+
"build:ts": "tsc -p tsconfig.json && tsc-alias",
|
|
19
|
+
"build": "pnpm run build:ts && pnpm run build:styles",
|
|
20
|
+
"dev:ts": "tsc -w -p tsconfig.json",
|
|
21
|
+
"dev:styles": "npx tailwindcss -i styles/globals.css -o dist/styles.css --watch",
|
|
22
|
+
"dev": "concurrently \"pnpm run dev:ts\" \"pnpm run dev:styles\""
|
|
23
|
+
},
|
|
14
24
|
"peerDependencies": {
|
|
15
25
|
"react": "^17.0.2 || ^18.0.0",
|
|
16
26
|
"react-dom": "^17.0.2 || ^18.0.0"
|
|
@@ -19,17 +29,17 @@
|
|
|
19
29
|
"@types/lodash": "4.17.5",
|
|
20
30
|
"@types/react": "^18.2.0",
|
|
21
31
|
"@types/react-dom": "^18.2.0",
|
|
32
|
+
"app-studio-types": "workspace:*",
|
|
22
33
|
"autoprefixer": "^10.4.14",
|
|
23
34
|
"chokidar-cli": "^3.0.0",
|
|
24
35
|
"concurrently": "^8.2.2",
|
|
25
36
|
"eslint": "^7.32.0",
|
|
37
|
+
"eslint-config-custom": "workspace:*",
|
|
26
38
|
"postcss": "^8.4.24",
|
|
27
39
|
"tailwindcss": "^3.3.2",
|
|
28
40
|
"tsc-alias": "^1.8.10",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"eslint-config-custom": "0.0.0",
|
|
32
|
-
"tsconfig": "0.0.0"
|
|
41
|
+
"tsconfig": "workspace:*",
|
|
42
|
+
"typescript": "^4.5.2"
|
|
33
43
|
},
|
|
34
44
|
"dependencies": {
|
|
35
45
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
@@ -52,7 +62,8 @@
|
|
|
52
62
|
"@tabler/icons-react": "^3.2.0",
|
|
53
63
|
"class-variance-authority": "^0.6.0",
|
|
54
64
|
"clsx": "^1.2.1",
|
|
55
|
-
"
|
|
65
|
+
"dayjs": "^1.11.13",
|
|
66
|
+
"embla-carousel-react": "^8.3.0",
|
|
56
67
|
"lucide-react": "^0.248.0",
|
|
57
68
|
"next": "^14.2.5",
|
|
58
69
|
"next-themes": "^0.2.1",
|
|
@@ -63,15 +74,5 @@
|
|
|
63
74
|
"tailwind-merge": "^1.13.2",
|
|
64
75
|
"tailwindcss-animate": "^1.0.6",
|
|
65
76
|
"vaul": "^0.9.1"
|
|
66
|
-
},
|
|
67
|
-
"scripts": {
|
|
68
|
-
"lint": "eslint \"**/*.ts*\"",
|
|
69
|
-
"ui:add": "pnpm dlx shadcn-ui@latest add",
|
|
70
|
-
"build:styles": "postcss styles/globals.css -o dist/styles.css",
|
|
71
|
-
"build:ts": "tsc -p tsconfig.json && tsc-alias",
|
|
72
|
-
"build": "pnpm run build:ts && pnpm run build:styles",
|
|
73
|
-
"dev:ts": "tsc -w -p tsconfig.json",
|
|
74
|
-
"dev:styles": "npx tailwindcss -i styles/globals.css -o dist/styles.css --watch",
|
|
75
|
-
"dev": "concurrently \"pnpm run dev:ts\" \"pnpm run dev:styles\""
|
|
76
77
|
}
|
|
77
|
-
}
|
|
78
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-click-outside.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-click-outside.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAE,IAAI,CAa5F"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export function useClickOutside(ref, callback) {
|
|
4
|
-
React.useEffect(() => {
|
|
5
|
-
const handleClickOutside = (event) => {
|
|
6
|
-
if (ref.current && !ref.current.contains(event.target)) {
|
|
7
|
-
callback();
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
11
|
-
return () => {
|
|
12
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
13
|
-
};
|
|
14
|
-
}, [ref, callback]);
|
|
15
|
-
}
|
|
16
|
-
;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-outside-click.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-outside-click.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,eAAe,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,YAAY,MAAM,IAAI,SAa/E,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
const useClickOutside = (ref, callback) => {
|
|
4
|
-
React.useEffect(() => {
|
|
5
|
-
const handleClickOutside = (event) => {
|
|
6
|
-
if (ref.current && !ref.current.contains(event.target)) {
|
|
7
|
-
callback();
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
11
|
-
return () => {
|
|
12
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
13
|
-
};
|
|
14
|
-
}, [ref, callback]);
|
|
15
|
-
};
|
|
16
|
-
export default useClickOutside;
|