@tapcart/mobile-components 0.2.0 → 0.2.2

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.
Files changed (91) hide show
  1. package/dist/index.d.mts +226 -0
  2. package/dist/index.mjs +3978 -0
  3. package/dist/index.mjs.map +1 -0
  4. package/dist/{globals.css → styles.css} +186 -14
  5. package/package.json +5 -5
  6. package/README.md +0 -264
  7. package/dist/README.md +0 -264
  8. package/dist/components/ThemeProvider.d.ts +0 -3
  9. package/dist/components/ThemeProvider.d.ts.map +0 -1
  10. package/dist/components/ThemeProvider.js +0 -18
  11. package/dist/components/ThemeToggle.d.ts +0 -2
  12. package/dist/components/ThemeToggle.d.ts.map +0 -1
  13. package/dist/components/ThemeToggle.js +0 -8
  14. package/dist/components/ui/accordion.d.ts +0 -8
  15. package/dist/components/ui/accordion.d.ts.map +0 -1
  16. package/dist/components/ui/accordion.js +0 -34
  17. package/dist/components/ui/alert-dialog.d.ts +0 -21
  18. package/dist/components/ui/alert-dialog.d.ts.map +0 -1
  19. package/dist/components/ui/alert-dialog.js +0 -62
  20. package/dist/components/ui/aspect-ratio.d.ts +0 -5
  21. package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
  22. package/dist/components/ui/aspect-ratio.js +0 -4
  23. package/dist/components/ui/badge.d.ts +0 -10
  24. package/dist/components/ui/badge.d.ts.map +0 -1
  25. package/dist/components/ui/badge.js +0 -32
  26. package/dist/components/ui/button.d.ts +0 -13
  27. package/dist/components/ui/button.d.ts.map +0 -1
  28. package/dist/components/ui/button.js +0 -52
  29. package/dist/components/ui/carousel.d.ts +0 -19
  30. package/dist/components/ui/carousel.d.ts.map +0 -1
  31. package/dist/components/ui/carousel.js +0 -112
  32. package/dist/components/ui/chip.d.ts +0 -25
  33. package/dist/components/ui/chip.d.ts.map +0 -1
  34. package/dist/components/ui/chip.js +0 -47
  35. package/dist/components/ui/container.d.ts +0 -10
  36. package/dist/components/ui/container.d.ts.map +0 -1
  37. package/dist/components/ui/container.js +0 -26
  38. package/dist/components/ui/grid.d.ts +0 -14
  39. package/dist/components/ui/grid.d.ts.map +0 -1
  40. package/dist/components/ui/grid.js +0 -33
  41. package/dist/components/ui/icon.d.ts +0 -11
  42. package/dist/components/ui/icon.d.ts.map +0 -1
  43. package/dist/components/ui/icon.js +0 -30
  44. package/dist/components/ui/input.d.ts +0 -6
  45. package/dist/components/ui/input.d.ts.map +0 -1
  46. package/dist/components/ui/input.js +0 -20
  47. package/dist/components/ui/label.d.ts +0 -6
  48. package/dist/components/ui/label.d.ts.map +0 -1
  49. package/dist/components/ui/label.js +0 -24
  50. package/dist/components/ui/money.d.ts +0 -12
  51. package/dist/components/ui/money.d.ts.map +0 -1
  52. package/dist/components/ui/money.js +0 -30
  53. package/dist/components/ui/scroll-area.d.ts +0 -9
  54. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  55. package/dist/components/ui/scroll-area.js +0 -29
  56. package/dist/components/ui/separator.d.ts +0 -5
  57. package/dist/components/ui/separator.d.ts.map +0 -1
  58. package/dist/components/ui/separator.js +0 -22
  59. package/dist/components/ui/skeleton.d.ts +0 -4
  60. package/dist/components/ui/skeleton.d.ts.map +0 -1
  61. package/dist/components/ui/skeleton.js +0 -18
  62. package/dist/components/ui/switch.d.ts +0 -5
  63. package/dist/components/ui/switch.d.ts.map +0 -1
  64. package/dist/components/ui/switch.js +0 -22
  65. package/dist/components/ui/text.d.ts +0 -10
  66. package/dist/components/ui/text.d.ts.map +0 -1
  67. package/dist/components/ui/text.js +0 -33
  68. package/dist/components/ui/toast.d.ts +0 -16
  69. package/dist/components/ui/toast.d.ts.map +0 -1
  70. package/dist/components/ui/toast.js +0 -61
  71. package/dist/components/ui/toaster.d.ts +0 -2
  72. package/dist/components/ui/toaster.d.ts.map +0 -1
  73. package/dist/components/ui/toaster.js +0 -22
  74. package/dist/components/ui/toggle-group.d.ts +0 -13
  75. package/dist/components/ui/toggle-group.d.ts.map +0 -1
  76. package/dist/components/ui/toggle-group.js +0 -36
  77. package/dist/components/ui/toggle.d.ts +0 -13
  78. package/dist/components/ui/toggle.d.ts.map +0 -1
  79. package/dist/components/ui/toggle.js +0 -40
  80. package/dist/components/ui/use-toast.d.ts +0 -45
  81. package/dist/components/ui/use-toast.d.ts.map +0 -1
  82. package/dist/components/ui/use-toast.js +0 -112
  83. package/dist/components/ui/video.d.ts +0 -8
  84. package/dist/components/ui/video.d.ts.map +0 -1
  85. package/dist/components/ui/video.js +0 -22
  86. package/dist/index.d.ts +0 -27
  87. package/dist/index.d.ts.map +0 -1
  88. package/dist/index.js +0 -27
  89. package/dist/lib/utils.d.ts +0 -3
  90. package/dist/lib/utils.d.ts.map +0 -1
  91. package/dist/lib/utils.js +0 -5
@@ -686,6 +686,9 @@ video {
686
686
  .right-2 {
687
687
  right: 0.5rem;
688
688
  }
689
+ .start-4 {
690
+ inset-inline-start: 1rem;
691
+ }
689
692
  .top-0 {
690
693
  top: 0px;
691
694
  }
@@ -698,6 +701,9 @@ video {
698
701
  .top-\[50\%\] {
699
702
  top: 50%;
700
703
  }
704
+ .z-10 {
705
+ z-index: 10;
706
+ }
701
707
  .z-50 {
702
708
  z-index: 50;
703
709
  }
@@ -744,6 +750,9 @@ video {
744
750
  .h-11 {
745
751
  height: 2.75rem;
746
752
  }
753
+ .h-14 {
754
+ height: 3.5rem;
755
+ }
747
756
  .h-2 {
748
757
  height: 0.5rem;
749
758
  }
@@ -826,6 +835,9 @@ video {
826
835
  .basis-full {
827
836
  flex-basis: 100%;
828
837
  }
838
+ .origin-\[0\] {
839
+ transform-origin: 0;
840
+ }
829
841
  .-translate-x-1\/2 {
830
842
  --tw-translate-x: -50%;
831
843
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -964,9 +976,6 @@ video {
964
976
  .rounded {
965
977
  border-radius: 0.25rem;
966
978
  }
967
- .rounded-\[4px\] {
968
- border-radius: 4px;
969
- }
970
979
  .rounded-\[inherit\] {
971
980
  border-radius: inherit;
972
981
  }
@@ -1002,12 +1011,18 @@ video {
1002
1011
  --tw-border-opacity: 1;
1003
1012
  border-color: rgb(0 0 0 / var(--tw-border-opacity));
1004
1013
  }
1014
+ .border-coreColors-dividingLines {
1015
+ border-color: var(--coreColors-dividingLines);
1016
+ }
1005
1017
  .border-destructive {
1006
1018
  border-color: hsl(var(--destructive));
1007
1019
  }
1008
1020
  .border-input {
1009
1021
  border-color: hsl(var(--input));
1010
1022
  }
1023
+ .border-stateColors-error {
1024
+ border-color: var(--stateColors-error);
1025
+ }
1011
1026
  .border-transparent {
1012
1027
  border-color: transparent;
1013
1028
  }
@@ -1036,6 +1051,9 @@ video {
1036
1051
  .bg-buttonColors-secondaryFill {
1037
1052
  background-color: var(--buttonColors-secondaryFill);
1038
1053
  }
1054
+ .bg-coreColors-inputBackground {
1055
+ background-color: var(--coreColors-inputBackground);
1056
+ }
1039
1057
  .bg-coreColors-pageColor {
1040
1058
  background-color: var(--coreColors-pageColor);
1041
1059
  }
@@ -1061,9 +1079,6 @@ video {
1061
1079
  --tw-bg-opacity: 1;
1062
1080
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
1063
1081
  }
1064
- .fill-primary-foreground {
1065
- fill: hsl(var(--primary-foreground));
1066
- }
1067
1082
  .p-1 {
1068
1083
  padding: 0.25rem;
1069
1084
  }
@@ -1115,10 +1130,6 @@ video {
1115
1130
  padding-top: 0.125rem;
1116
1131
  padding-bottom: 0.125rem;
1117
1132
  }
1118
- .py-2 {
1119
- padding-top: 0.5rem;
1120
- padding-bottom: 0.5rem;
1121
- }
1122
1133
  .py-3 {
1123
1134
  padding-top: 0.75rem;
1124
1135
  padding-bottom: 0.75rem;
@@ -1127,6 +1138,9 @@ video {
1127
1138
  padding-top: 1rem;
1128
1139
  padding-bottom: 1rem;
1129
1140
  }
1141
+ .pb-2 {
1142
+ padding-bottom: 0.5rem;
1143
+ }
1130
1144
  .pb-4 {
1131
1145
  padding-bottom: 1rem;
1132
1146
  }
@@ -1142,6 +1156,9 @@ video {
1142
1156
  .pt-4 {
1143
1157
  padding-top: 1rem;
1144
1158
  }
1159
+ .pt-5 {
1160
+ padding-top: 1.25rem;
1161
+ }
1145
1162
  .text-center {
1146
1163
  text-align: center;
1147
1164
  }
@@ -1149,6 +1166,12 @@ video {
1149
1166
  font-size: 1.5rem;
1150
1167
  line-height: 2rem;
1151
1168
  }
1169
+ .text-\[10px\] {
1170
+ font-size: 10px;
1171
+ }
1172
+ .text-\[12px\] {
1173
+ font-size: 12px;
1174
+ }
1152
1175
  .text-base {
1153
1176
  font-size: 1rem;
1154
1177
  line-height: 1.5rem;
@@ -1193,15 +1216,84 @@ video {
1193
1216
  --tw-text-opacity: 1;
1194
1217
  color: rgb(0 0 0 / var(--tw-text-opacity));
1195
1218
  }
1219
+ .text-buttonColors-destructiveText {
1220
+ color: var(--buttonColors-destructiveText);
1221
+ }
1222
+ .text-buttonColors-disabled {
1223
+ color: var(--buttonColors-disabled);
1224
+ }
1225
+ .text-buttonColors-primaryFill {
1226
+ color: var(--buttonColors-primaryFill);
1227
+ }
1228
+ .text-buttonColors-primaryOutline {
1229
+ color: var(--buttonColors-primaryOutline);
1230
+ }
1231
+ .text-buttonColors-primaryOutlineColor {
1232
+ color: var(--buttonColors-primaryOutlineColor);
1233
+ }
1234
+ .text-buttonColors-primaryOutlineEnabled {
1235
+ color: var(--buttonColors-primaryOutlineEnabled);
1236
+ }
1237
+ .text-buttonColors-primaryShadow {
1238
+ color: var(--buttonColors-primaryShadow);
1239
+ }
1240
+ .text-buttonColors-primaryShadowEnabled {
1241
+ color: var(--buttonColors-primaryShadowEnabled);
1242
+ }
1196
1243
  .text-buttonColors-primaryText {
1197
1244
  color: var(--buttonColors-primaryText);
1198
1245
  }
1246
+ .text-buttonColors-secondaryFill {
1247
+ color: var(--buttonColors-secondaryFill);
1248
+ }
1249
+ .text-buttonColors-secondaryOutlineColor {
1250
+ color: var(--buttonColors-secondaryOutlineColor);
1251
+ }
1252
+ .text-buttonColors-secondaryOutlineEnabled {
1253
+ color: var(--buttonColors-secondaryOutlineEnabled);
1254
+ }
1255
+ .text-buttonColors-secondaryShadowEnabled {
1256
+ color: var(--buttonColors-secondaryShadowEnabled);
1257
+ }
1199
1258
  .text-buttonColors-secondaryText {
1200
1259
  color: var(--buttonColors-secondaryText);
1201
1260
  }
1261
+ .text-coreColors-brandColorPrimary {
1262
+ color: var(--coreColors-brandColorPrimary);
1263
+ }
1264
+ .text-coreColors-dividingLines {
1265
+ color: var(--coreColors-dividingLines);
1266
+ }
1267
+ .text-coreColors-headerBackground {
1268
+ color: var(--coreColors-headerBackground);
1269
+ }
1270
+ .text-coreColors-headerIcon {
1271
+ color: var(--coreColors-headerIcon);
1272
+ }
1273
+ .text-coreColors-inputBackground {
1274
+ color: var(--coreColors-inputBackground);
1275
+ }
1276
+ .text-coreColors-modalBackground {
1277
+ color: var(--coreColors-modalBackground);
1278
+ }
1202
1279
  .text-coreColors-pageColor {
1203
1280
  color: var(--coreColors-pageColor);
1204
1281
  }
1282
+ .text-coreColors-primaryIcon {
1283
+ color: var(--coreColors-primaryIcon);
1284
+ }
1285
+ .text-coreColors-secondaryIcon {
1286
+ color: var(--coreColors-secondaryIcon);
1287
+ }
1288
+ .text-coreColors-shadow {
1289
+ color: var(--coreColors-shadow);
1290
+ }
1291
+ .text-coreColors-shadowsEnabled {
1292
+ color: var(--coreColors-shadowsEnabled);
1293
+ }
1294
+ .text-coreColors-tabBar {
1295
+ color: var(--coreColors-tabBar);
1296
+ }
1205
1297
  .text-destructive-foreground {
1206
1298
  color: hsl(var(--destructive-foreground));
1207
1299
  }
@@ -1223,18 +1315,63 @@ video {
1223
1315
  .text-secondary-foreground {
1224
1316
  color: hsl(var(--secondary-foreground));
1225
1317
  }
1318
+ .text-stateColors-disabled {
1319
+ color: var(--stateColors-disabled);
1320
+ }
1321
+ .text-stateColors-error {
1322
+ color: var(--stateColors-error);
1323
+ }
1324
+ .text-stateColors-favorites {
1325
+ color: var(--stateColors-favorites);
1326
+ }
1327
+ .text-stateColors-reviews {
1328
+ color: var(--stateColors-reviews);
1329
+ }
1330
+ .text-stateColors-skeleton {
1331
+ color: var(--stateColors-skeleton);
1332
+ }
1333
+ .text-stateColors-subscriptions {
1334
+ color: var(--stateColors-subscriptions);
1335
+ }
1336
+ .text-stateColors-success {
1337
+ color: var(--stateColors-success);
1338
+ }
1339
+ .text-stateColors-warning {
1340
+ color: var(--stateColors-warning);
1341
+ }
1342
+ .text-textColors-legalText {
1343
+ color: var(--textColors-legalText);
1344
+ }
1345
+ .text-textColors-pageTitle {
1346
+ color: var(--textColors-pageTitle);
1347
+ }
1348
+ .text-textColors-priceText {
1349
+ color: var(--textColors-priceText);
1350
+ }
1226
1351
  .text-textColors-primaryColor {
1227
1352
  color: var(--textColors-primaryColor);
1228
1353
  }
1354
+ .text-textColors-productTitle {
1355
+ color: var(--textColors-productTitle);
1356
+ }
1357
+ .text-textColors-salePriceText {
1358
+ color: var(--textColors-salePriceText);
1359
+ }
1229
1360
  .text-textColors-secondaryColor {
1230
1361
  color: var(--textColors-secondaryColor);
1231
1362
  }
1363
+ .text-textColors-strikethroughPriceText {
1364
+ color: var(--textColors-strikethroughPriceText);
1365
+ }
1232
1366
  .underline-offset-4 {
1233
1367
  text-underline-offset: 4px;
1234
1368
  }
1235
1369
  .opacity-0 {
1236
1370
  opacity: 0;
1237
1371
  }
1372
+ .opacity-100 {
1373
+ opacity: 1;
1374
+ }
1238
1375
  .opacity-90 {
1239
1376
  opacity: 0.9;
1240
1377
  }
@@ -1326,11 +1463,23 @@ video {
1326
1463
  .file\:font-medium::file-selector-button {
1327
1464
  font-weight: 500;
1328
1465
  }
1329
- .placeholder\:text-muted-foreground::-moz-placeholder {
1330
- color: hsl(var(--muted-foreground));
1466
+ .placeholder\:text-stateColors-error::-moz-placeholder {
1467
+ color: var(--stateColors-error);
1331
1468
  }
1332
- .placeholder\:text-muted-foreground::placeholder {
1333
- color: hsl(var(--muted-foreground));
1469
+ .placeholder\:text-stateColors-error::placeholder {
1470
+ color: var(--stateColors-error);
1471
+ }
1472
+ .placeholder\:text-textColors-secondaryColor::-moz-placeholder {
1473
+ color: var(--textColors-secondaryColor);
1474
+ }
1475
+ .placeholder\:text-textColors-secondaryColor::placeholder {
1476
+ color: var(--textColors-secondaryColor);
1477
+ }
1478
+ .placeholder-shown\:p-4:-moz-placeholder-shown {
1479
+ padding: 1rem;
1480
+ }
1481
+ .placeholder-shown\:p-4:placeholder-shown {
1482
+ padding: 1rem;
1334
1483
  }
1335
1484
  .hover\:bg-accent:hover {
1336
1485
  background-color: hsl(var(--accent));
@@ -1362,6 +1511,12 @@ video {
1362
1511
  .hover\:underline:hover {
1363
1512
  text-decoration-line: underline;
1364
1513
  }
1514
+ .focus\:border-coreColors-brandColorPrimary:focus {
1515
+ border-color: var(--coreColors-brandColorPrimary);
1516
+ }
1517
+ .focus\:border-stateColors-error:focus {
1518
+ border-color: var(--stateColors-error);
1519
+ }
1365
1520
  .focus\:opacity-100:focus {
1366
1521
  opacity: 1;
1367
1522
  }
@@ -1384,6 +1539,11 @@ video {
1384
1539
  outline: 2px solid transparent;
1385
1540
  outline-offset: 2px;
1386
1541
  }
1542
+ .focus-visible\:ring-0:focus-visible {
1543
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1544
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1545
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1546
+ }
1387
1547
  .focus-visible\:ring-2:focus-visible {
1388
1548
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1389
1549
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
@@ -1455,6 +1615,12 @@ video {
1455
1615
  .group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus {
1456
1616
  --tw-ring-offset-color: #dc2626;
1457
1617
  }
1618
+ .peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:opacity-0 {
1619
+ opacity: 0;
1620
+ }
1621
+ .peer:placeholder-shown ~ .peer-placeholder-shown\:opacity-0 {
1622
+ opacity: 0;
1623
+ }
1458
1624
  .peer:disabled ~ .peer-disabled\:cursor-not-allowed {
1459
1625
  cursor: not-allowed;
1460
1626
  }
@@ -1516,6 +1682,9 @@ video {
1516
1682
  .data-\[state\=unchecked\]\:bg-input[data-state=unchecked] {
1517
1683
  background-color: hsl(var(--input));
1518
1684
  }
1685
+ .data-\[icon\=true\]\:pr-10[data-icon=true] {
1686
+ padding-right: 2.5rem;
1687
+ }
1519
1688
  .data-\[state\=on\]\:text-accent-foreground[data-state=on] {
1520
1689
  color: hsl(var(--accent-foreground));
1521
1690
  }
@@ -1654,6 +1823,9 @@ video {
1654
1823
  max-width: 420px;
1655
1824
  }
1656
1825
  }
1826
+ .\[\&\+label\]\:text-stateColors-error+label {
1827
+ color: var(--stateColors-error);
1828
+ }
1657
1829
  .\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg {
1658
1830
  --tw-rotate: 180deg;
1659
1831
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "main": "dist/index.js",
5
- "module": "dist/index.esm.js",
5
+ "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
7
7
  "style": "dist/styles.css",
8
8
  "sourceMap": true,
@@ -16,9 +16,8 @@
16
16
  "lint": "eslint \"**/*.ts*\"",
17
17
  "ui:add": "pnpm dlx shadcn-ui@latest add",
18
18
  "build:styles": "postcss styles/globals.css -o dist/styles.css",
19
- "build:ts": "tsc -p tsconfig.json",
20
- "build": "pnpm run build:ts && pnpm run build:styles",
21
- "build:sdk": "tsc && node scripts/build-css.js"
19
+ "build:ts": "tsup",
20
+ "build": "pnpm run build:ts && pnpm run build:styles"
22
21
  },
23
22
  "devDependencies": {
24
23
  "@types/react": "^18.2.0",
@@ -30,6 +29,7 @@
30
29
  "react": "^17.0.2",
31
30
  "tailwindcss": "^3.3.2",
32
31
  "tsconfig": "workspace:*",
32
+ "tsup": "^8.1.0",
33
33
  "typescript": "^4.5.2"
34
34
  },
35
35
  "dependencies": {
package/README.md DELETED
@@ -1,264 +0,0 @@
1
- <div align="center">
2
- <a href="https://tapcart.com">
3
- <img
4
- src="https://storage.googleapis.com/tapcart-asset-uploads-prod/dx-github.png"
5
- alt=""
6
- />
7
- </a>
8
- </div>
9
-
10
- # @tapcart/mobile-components
11
-
12
- > Build the next-gen shopper experience for Tapcart's core product, the mobile app.
13
-
14
- [![storybook](https://shields.io/badge/storybook-grey?logo=storybook&style=flat)](https://tapcart-consumer-web-storybook.vercel.app/) [![npm version](https://img.shields.io/npm/v/@tapcart/mobile-components.svg?label=@tapcart/mobile-components)](https://www.npmjs.com/package/@tapcart/mobile-components)
15
-
16
- | Status | Owner | Help |
17
- | ------ | ---------------- |-----------------|
18
- | Active | @tapcart/mobile-components | dev@tapcart.com |
19
-
20
- ## About this repo
21
-
22
- The tapcart/mobile-components repository is a component library made up of all the code components that drive our app experience.
23
-
24
- ## Installation using NPM
25
-
26
- ### Install into your React.js project
27
-
28
- ```sh
29
- npm install @tapcart/mobile-components
30
- ```
31
-
32
-
33
-
34
-
35
- ## Usage
36
- **Easy. Cake. Done.**
37
-
38
- ```jsx
39
- import {
40
- Button,
41
- Input,
42
- Accordion,
43
- AccordionContent,
44
- AccordionItem,
45
- AccordionTrigger,
46
- AspectRatio,
47
- Switch,
48
- Label,
49
- Separator,
50
- Badge,
51
- Video,
52
- ScrollArea,
53
- Text,
54
- Toast,
55
- Toaster,
56
- useToast,
57
- Icon,
58
- Container,
59
- Grid,
60
- ToggleGroup,
61
- ToggleGroupItem,
62
- } from "@tapcart/mobile-components";
63
-
64
- <Video>
65
- <source src="https://assets.tapcart.com/image-block/video/FhEjfK4zD2_6614803b487c620032dc21c4.mp4" />
66
- </Video>
67
-
68
- <Separator />
69
-
70
- <Container variant="spaced">
71
- <Input placeholder="Search for products" type="email"></Input>
72
- </Container>
73
-
74
- <Separator />
75
-
76
- <Accordion type="single" collapsible className="w-full">
77
- <AccordionItem value="item-1">
78
- <Container>
79
- <AccordionTrigger>
80
- <div className="flex">
81
- <Icon>
82
- <svg
83
- width="15"
84
- height="18"
85
- viewBox="0 0 15 18"
86
- fill="none"
87
- xmlns="http://www.w3.org/2000/svg"
88
- >
89
- <path
90
- d="M7.3 8.14a4.08 4.08 0 0 1-4.07-4.07C3.23 1.83 5.05 0 7.3 0s4.07 1.83 4.07 4.07A4.08 4.08 0 0 1 7.3 8.14Zm0-6.64a2.57 2.57 0 1 0 0 5.14 2.57 2.57 0 1 0 0-5.14ZM12.88 17.69H1.72c-.95 0-1.72-.77-1.72-1.72 0-3.54 2.88-6.42 6.42-6.42h1.76c3.54 0 6.42 2.88 6.42 6.42 0 .95-.77 1.72-1.72 1.72Zm-6.46-6.64a4.93 4.93 0 0 0-4.92 4.92c0 .12.1.22.22.22h11.16c.12 0 .22-.1.22-.22a4.93 4.93 0 0 0-4.92-4.92H6.42Z"
91
- fill="currentColor"
92
- ></path>
93
- </svg>
94
- </Icon>
95
- Product details
96
- </div>
97
- </AccordionTrigger>
98
- <AccordionContent>
99
- <img src="https://assets.tapcart.com/pdp/images/FhEjfK4zD2_6629470724b8221a7b750a97.png" />
100
- </AccordionContent>
101
- </Container>
102
- </AccordionItem>
103
- <AccordionItem value="item-2">
104
- <Container>
105
- <AccordionTrigger>
106
- <div className="flex">
107
- <Icon>
108
- <svg
109
- width="18"
110
- height="17"
111
- viewBox="0 0 18 17"
112
- fill="none"
113
- xmlns="http://www.w3.org/2000/svg"
114
- >
115
- <path
116
- d="M6.61 13.22c-1.77 0-3.43-.69-4.67-1.94A6.567 6.567 0 0 1 0 6.61c0-1.76.69-3.43 1.94-4.67A6.533 6.533 0 0 1 6.61 0c1.77 0 3.43.69 4.67 1.94a6.567 6.567 0 0 1 1.94 4.67c0 1.76-.69 3.43-1.94 4.67a6.567 6.567 0 0 1-4.67 1.94Zm0-11.72C5.24 1.5 3.96 2.03 3 3c-.97.97-1.5 2.25-1.5 3.61 0 1.36.53 2.65 1.5 3.61.96.97 2.25 1.5 3.61 1.5 1.36 0 2.65-.53 3.61-1.5.97-.97 1.5-2.25 1.5-3.61 0-1.36-.53-2.65-1.5-3.61-.96-.97-2.25-1.5-3.61-1.5ZM16.4 16.15c-.19 0-.38-.07-.53-.22l-3.18-3.18a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l3.18 3.18c.29.29.29.77 0 1.06-.15.15-.34.22-.53.22Z"
117
- fill="currentColor"
118
- ></path>
119
- </svg>
120
- </Icon>
121
- Size Guide
122
- </div>
123
- </AccordionTrigger>
124
- <AccordionContent>
125
- Yes. It comes with default styles that matches the other
126
- components&apos; aesthetic.
127
- </AccordionContent>
128
- </Container>
129
- </AccordionItem>
130
- </Accordion>
131
-
132
- {/*Aspect Ratio+ scroll area Example*/}
133
- <Container>
134
- <Text className="py-2 font-medium">New Drop Collection</Text>
135
- </Container>
136
-
137
- <ScrollArea>
138
- {Products.map((product) => (
139
- <ProductCard
140
- className="w-[138px] mr-[7px]"
141
- key={product.id}
142
- product={product}
143
- quickAdd={quickAdd}
144
- openProduct={clickProduct}
145
- switchVariant={switchVariant}
146
- carousel={false}
147
- ></ProductCard>
148
- ))}
149
- </ScrollArea>
150
-
151
- <Separator className="my-[15px]" />
152
-
153
- <div className="container flex items-center space-x-2">
154
- <ToggleGroup
155
- onValueChange={(e) => changeGrid(e)}
156
- type="single"
157
- defaultValue="2">
158
- <ToggleGroupItem value="1" aria-label="Toggle bold">
159
- <Icon>
160
- <svg
161
- xmlns="http://www.w3.org/2000/svg"
162
- width="24"
163
- height="24"
164
- viewBox="0 0 24 24"
165
- fill="none"
166
- stroke="currentColor"
167
- stroke-width="2"
168
- stroke-linecap="round"
169
- stroke-linejoin="round"
170
- className="lucide lucide-rows-2">
171
- <rect width="18" height="18" x="3" y="3" rx="2" />
172
- <path d="M3 12h18" />
173
- </svg>
174
- </Icon>
175
- </ToggleGroupItem>
176
- <ToggleGroupItem value="2" aria-label="Toggle italic">
177
- <Icon>
178
- <svg
179
- xmlns="http://www.w3.org/2000/svg"
180
- width="24"
181
- height="24"
182
- viewBox="0 0 24 24"
183
- fill="none"
184
- stroke="currentColor"
185
- stroke-width="2"
186
- stroke-linecap="round"
187
- stroke-linejoin="round"
188
- className="lucide lucide-columns-3"
189
- >
190
- <rect width="18" height="18" x="3" y="3" rx="2" />
191
- <path d="M9 3v18" />
192
- <path d="M15 3v18" />
193
- </svg>
194
- </Icon>
195
- </ToggleGroupItem>
196
- <ToggleGroupItem value="3" aria-label="Toggle underline">
197
- <Icon>
198
- <svg
199
- xmlns="http://www.w3.org/2000/svg"
200
- width="24"
201
- height="24"
202
- viewBox="0 0 24 24"
203
- fill="none"
204
- stroke="currentColor"
205
- stroke-width="2"
206
- stroke-linecap="round"
207
- stroke-linejoin="round"
208
- className="lucide lucide-columns-3">
209
- <rect width="18" height="18" x="3" y="3" rx="2" />
210
- <path d="M9 3v18" />
211
- <path d="M15 3v18" />
212
- </svg>
213
- </Icon>
214
- </ToggleGroupItem>
215
- </ToggleGroup>
216
- </div>
217
-
218
- <Separator className="my-[15px]" />
219
-
220
- <Grid columns={grid} className="">
221
- {Products.map((product) => (
222
- <ProductCard
223
- key={product.id}
224
- className="w-full"
225
- product={product}
226
- quickAdd={quickAdd}
227
- openProduct={clickProduct}
228
- switchVariant={switchVariant}
229
- carousel={true}
230
- ></ProductCard>
231
- ))}
232
- </Grid>
233
-
234
- ```
235
-
236
-
237
- ## Licenses
238
-
239
- Copyright (c) 2017-present Tapcart Inc.
240
-
241
- Permission is hereby granted, free of charge, to any person obtaining a copy
242
- of this software and associated documentation files (the "Software"), to deal
243
- in the Software without restriction, including without limitation the rights
244
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
245
- copies of the Software, and to permit persons to whom the Software is
246
- furnished to do so, subject to the following conditions:
247
-
248
- The above copyright notice and this permission notice shall be included in all
249
- copies or substantial portions of the Software.
250
-
251
- The rights granted above may only be exercised to develop and distribute
252
- applications that integrate or interoperate with Tapcart software or services,
253
- and in the case of external, stand-alone applications that do not embed
254
- directly inside Tapcart, the rights granted above may only be exercised to
255
- develop and distribute applications that are dissimilar and visually distinct
256
- from Tapcart products and services, as determined by Tapcart in its sole discretion.
257
-
258
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
259
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
260
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
261
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
262
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
263
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
264
- SOFTWARE.