@projectdiscoveryio/design-system 1.0.0 → 1.0.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/index.css CHANGED
@@ -814,18 +814,31 @@ html body.pd-root,
814
814
  white-space: nowrap;
815
815
  border-width: 0;
816
816
  }
817
+ .pd-pointer-events-none {
818
+ pointer-events: none;
819
+ }
817
820
  .pd-absolute {
818
821
  position: absolute;
819
822
  }
820
823
  .pd-relative {
821
824
  position: relative;
822
825
  }
826
+ .pd-inset-y-0 {
827
+ top: 0em;
828
+ bottom: 0em;
829
+ }
823
830
  .pd-bottom-1 {
824
831
  bottom: 0.25em;
825
832
  }
833
+ .pd-left-0 {
834
+ left: 0em;
835
+ }
826
836
  .pd-left-1\/2 {
827
837
  left: 50%;
828
838
  }
839
+ .pd-right-0 {
840
+ right: 0em;
841
+ }
829
842
  .pd-m-0 {
830
843
  margin: 0em;
831
844
  }
@@ -833,9 +846,21 @@ html body.pd-root,
833
846
  margin-left: auto;
834
847
  margin-right: auto;
835
848
  }
849
+ .pd-mb-10 {
850
+ margin-bottom: 2.5em;
851
+ }
836
852
  .pd-mb-2 {
837
853
  margin-bottom: 0.5em;
838
854
  }
855
+ .pd-mb-4 {
856
+ margin-bottom: 1em;
857
+ }
858
+ .pd-mb-6 {
859
+ margin-bottom: 1.5em;
860
+ }
861
+ .pd-mb-8 {
862
+ margin-bottom: 2em;
863
+ }
839
864
  .pd-ml-2 {
840
865
  margin-left: 0.5em;
841
866
  }
@@ -845,6 +870,9 @@ html body.pd-root,
845
870
  .pd-mt-2 {
846
871
  margin-top: 0.5em;
847
872
  }
873
+ .pd-block {
874
+ display: block;
875
+ }
848
876
  .pd-flex {
849
877
  display: flex;
850
878
  }
@@ -866,6 +894,9 @@ html body.pd-root,
866
894
  .pd-h-5 {
867
895
  height: 1.25em;
868
896
  }
897
+ .pd-h-6 {
898
+ height: 1.5em;
899
+ }
869
900
  .pd-h-8 {
870
901
  height: 2em;
871
902
  }
@@ -875,6 +906,9 @@ html body.pd-root,
875
906
  .pd-min-h-screen {
876
907
  min-height: 100vh;
877
908
  }
909
+ .pd-w-1 {
910
+ width: 0.25em;
911
+ }
878
912
  .pd-w-3 {
879
913
  width: 0.75em;
880
914
  }
@@ -884,15 +918,39 @@ html body.pd-root,
884
918
  .pd-w-5 {
885
919
  width: 1.25em;
886
920
  }
921
+ .pd-w-6 {
922
+ width: 1.5em;
923
+ }
924
+ .pd-w-\[20\%\] {
925
+ width: 20%;
926
+ }
927
+ .pd-w-\[25\%\] {
928
+ width: 25%;
929
+ }
930
+ .pd-w-\[35\%\] {
931
+ width: 35%;
932
+ }
933
+ .pd-w-\[40\%\] {
934
+ width: 40%;
935
+ }
887
936
  .pd-w-full {
888
937
  width: 100%;
889
938
  }
939
+ .pd-max-w-2xl {
940
+ max-width: 42rem;
941
+ }
942
+ .pd-max-w-6xl {
943
+ max-width: 72rem;
944
+ }
890
945
  .pd-max-w-\[1400px\] {
891
946
  max-width: 1400px;
892
947
  }
893
948
  .pd-max-w-md {
894
949
  max-width: 28rem;
895
950
  }
951
+ .pd-border-collapse {
952
+ border-collapse: collapse;
953
+ }
896
954
  .pd--translate-x-1\/2 {
897
955
  --tw-translate-x: -50%;
898
956
  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));
@@ -968,9 +1026,20 @@ html body.pd-root,
968
1026
  margin-top: calc(1em * calc(1 - var(--tw-space-y-reverse)));
969
1027
  margin-bottom: calc(1em * var(--tw-space-y-reverse));
970
1028
  }
1029
+ .pd-divide-y > :not([hidden]) ~ :not([hidden]) {
1030
+ --tw-divide-y-reverse: 0;
1031
+ border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
1032
+ border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
1033
+ }
1034
+ .pd-divide-\[var\(--pd-border-secondary\)\] > :not([hidden]) ~ :not([hidden]) {
1035
+ border-color: var(--pd-border-secondary);
1036
+ }
971
1037
  .pd-overflow-auto {
972
1038
  overflow: auto;
973
1039
  }
1040
+ .pd-overflow-hidden {
1041
+ overflow: hidden;
1042
+ }
974
1043
  .pd-whitespace-nowrap {
975
1044
  white-space: nowrap;
976
1045
  }
@@ -992,12 +1061,18 @@ html body.pd-root,
992
1061
  .pd-rounded-sm {
993
1062
  border-radius: calc(var(--pd-radius) - 0.25em);
994
1063
  }
1064
+ .pd-rounded-xl {
1065
+ border-radius: 0.75rem;
1066
+ }
995
1067
  .pd-border {
996
1068
  border-width: 1px;
997
1069
  }
998
1070
  .pd-border-0 {
999
1071
  border-width: 0px;
1000
1072
  }
1073
+ .pd-border-b {
1074
+ border-bottom-width: 1px;
1075
+ }
1001
1076
  .pd-border-\[var\(--pd-border-red\)\] {
1002
1077
  border-color: var(--pd-border-red);
1003
1078
  }
@@ -1031,9 +1106,21 @@ html body.pd-root,
1031
1106
  .pd-bg-\[var\(--pd-background-red-on-hover\)\] {
1032
1107
  background-color: var(--pd-background-red-on-hover);
1033
1108
  }
1109
+ .pd-bg-\[var\(--pd-background-secondary\)\] {
1110
+ background-color: var(--pd-background-secondary);
1111
+ }
1112
+ .pd-bg-\[var\(--pd-background-system\)\] {
1113
+ background-color: var(--pd-background-system);
1114
+ }
1034
1115
  .pd-bg-\[var\(--pd-background-tertiary\)\] {
1035
1116
  background-color: var(--pd-background-tertiary);
1036
1117
  }
1118
+ .pd-bg-\[var\(--pd-border-blue\)\] {
1119
+ background-color: var(--pd-border-blue);
1120
+ }
1121
+ .pd-bg-\[var\(--pd-content-subtle\)\] {
1122
+ background-color: var(--pd-content-subtle);
1123
+ }
1037
1124
  .pd-bg-\[var\(--pd-intent-danger-bg\)\] {
1038
1125
  background-color: var(--pd-intent-danger-bg);
1039
1126
  }
@@ -1058,6 +1145,13 @@ html body.pd-root,
1058
1145
  .pd-p-5 {
1059
1146
  padding: 1.25em;
1060
1147
  }
1148
+ .pd-p-8 {
1149
+ padding: 2em;
1150
+ }
1151
+ .pd-px-2 {
1152
+ padding-left: 0.5em;
1153
+ padding-right: 0.5em;
1154
+ }
1061
1155
  .pd-px-3 {
1062
1156
  padding-left: 0.75em;
1063
1157
  padding-right: 0.75em;
@@ -1086,12 +1180,31 @@ html body.pd-root,
1086
1180
  padding-top: 1em;
1087
1181
  padding-bottom: 1em;
1088
1182
  }
1183
+ .pd-pl-3 {
1184
+ padding-left: 0.75em;
1185
+ }
1186
+ .pd-pr-2 {
1187
+ padding-right: 0.5em;
1188
+ }
1189
+ .pd-text-left {
1190
+ text-align: left;
1191
+ }
1089
1192
  .pd-text-center {
1090
1193
  text-align: center;
1091
1194
  }
1195
+ .pd-font-mono {
1196
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
1197
+ }
1198
+ .pd-text-4xl {
1199
+ font-size: 2.25em;
1200
+ line-height: 2.5em;
1201
+ }
1092
1202
  .pd-text-\[10px\] {
1093
1203
  font-size: 10px;
1094
1204
  }
1205
+ .pd-text-\[11px\] {
1206
+ font-size: 11px;
1207
+ }
1095
1208
  .pd-text-base {
1096
1209
  font-size: 1em;
1097
1210
  line-height: 1.5em;
@@ -1104,10 +1217,17 @@ html body.pd-root,
1104
1217
  font-size: 0.875em;
1105
1218
  line-height: 1.25em;
1106
1219
  }
1220
+ .pd-text-xl {
1221
+ font-size: 1.25em;
1222
+ line-height: 1.75em;
1223
+ }
1107
1224
  .pd-text-xs {
1108
1225
  font-size: 0.75em;
1109
1226
  line-height: 1em;
1110
1227
  }
1228
+ .pd-font-black {
1229
+ font-weight: 900;
1230
+ }
1111
1231
  .pd-font-bold {
1112
1232
  font-weight: 700;
1113
1233
  }
@@ -1117,12 +1237,30 @@ html body.pd-root,
1117
1237
  .pd-font-semibold {
1118
1238
  font-weight: 600;
1119
1239
  }
1240
+ .pd-uppercase {
1241
+ text-transform: uppercase;
1242
+ }
1120
1243
  .pd-leading-normal {
1121
1244
  line-height: 1.5;
1122
1245
  }
1246
+ .pd-leading-relaxed {
1247
+ line-height: 1.625;
1248
+ }
1249
+ .pd-tracking-tight {
1250
+ letter-spacing: -0.025em;
1251
+ }
1252
+ .pd-tracking-tighter {
1253
+ letter-spacing: -0.05em;
1254
+ }
1255
+ .pd-tracking-widest {
1256
+ letter-spacing: 0.1em;
1257
+ }
1123
1258
  .pd-text-\[var\(--pd-content-on-color\)\] {
1124
1259
  color: var(--pd-content-on-color);
1125
1260
  }
1261
+ .pd-text-\[var\(--pd-content-primary\)\] {
1262
+ color: var(--pd-content-primary);
1263
+ }
1126
1264
  .pd-text-\[var\(--pd-content-red\)\] {
1127
1265
  color: var(--pd-content-red);
1128
1266
  }
@@ -1150,11 +1288,34 @@ html body.pd-root,
1150
1288
  .pd-text-\[var\(--pd-intent-warning-text\)\] {
1151
1289
  color: var(--pd-intent-warning-text);
1152
1290
  }
1291
+ .pd-text-gray-400 {
1292
+ --tw-text-opacity: 1;
1293
+ color: rgb(156 163 175 / var(--tw-text-opacity, 1));
1294
+ }
1295
+ .pd-text-gray-500 {
1296
+ --tw-text-opacity: 1;
1297
+ color: rgb(107 114 128 / var(--tw-text-opacity, 1));
1298
+ }
1299
+ .pd-opacity-0 {
1300
+ opacity: 0;
1301
+ }
1302
+ .pd-opacity-100 {
1303
+ opacity: 1;
1304
+ }
1153
1305
  .pd-shadow-none {
1154
1306
  --tw-shadow: 0 0 #0000;
1155
1307
  --tw-shadow-colored: 0 0 #0000;
1156
1308
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1157
1309
  }
1310
+ .pd-shadow-sm {
1311
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
1312
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
1313
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1314
+ }
1315
+ .pd-backdrop-blur-sm {
1316
+ --tw-backdrop-blur: blur(4px);
1317
+ backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
1318
+ }
1158
1319
  .pd-transition-all {
1159
1320
  transition-property: all;
1160
1321
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -1179,6 +1340,7 @@ html body.pd-root,
1179
1340
  }
1180
1341
  /* Hide scrollbar */
1181
1342
  /* Backdrop blur helpers */
1343
+ .pd-backdrop-blur-sm { backdrop-filter: blur(4px); }
1182
1344
  /* Transition helpers */
1183
1345
  .pd-transition-all { transition: all 0.15s ease-in-out; }
1184
1346
  .pd-transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; }
@@ -1261,6 +1423,11 @@ html body.pd-root,
1261
1423
  padding-top: var(--pd-button-padding-sm-vertical);
1262
1424
  }
1263
1425
  /* Utilities */
1426
+ .hover\:pd-scale-\[1\.02\]:hover {
1427
+ --tw-scale-x: 1.02;
1428
+ --tw-scale-y: 1.02;
1429
+ 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));
1430
+ }
1264
1431
  .hover\:pd-bg-\[var\(--pd-background-invert-light\)\]:hover {
1265
1432
  background-color: var(--pd-background-invert-light);
1266
1433
  }
@@ -1270,6 +1437,9 @@ html body.pd-root,
1270
1437
  .hover\:pd-bg-\[var\(--pd-background-red-on-hover\)\]:hover {
1271
1438
  background-color: var(--pd-background-red-on-hover);
1272
1439
  }
1440
+ .hover\:pd-bg-\[var\(--pd-background-system\)\]:hover {
1441
+ background-color: var(--pd-background-system);
1442
+ }
1273
1443
  .hover\:pd-bg-\[var\(--pd-intent-danger-bg\)\]:hover {
1274
1444
  background-color: var(--pd-intent-danger-bg);
1275
1445
  }
@@ -1291,6 +1461,10 @@ html body.pd-root,
1291
1461
  .hover\:pd-bg-\[var\(--pd-intent-warning-bg-hover\)\]:hover {
1292
1462
  background-color: var(--pd-intent-warning-bg-hover);
1293
1463
  }
1464
+ .hover\:pd-bg-gray-100:hover {
1465
+ --tw-bg-opacity: 1;
1466
+ background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
1467
+ }
1294
1468
  .hover\:pd-text-\[var\(--pd-content-primary\)\]:hover {
1295
1469
  color: var(--pd-content-primary);
1296
1470
  }
@@ -1309,6 +1483,31 @@ html body.pd-root,
1309
1483
  .hover\:pd-text-\[var\(--pd-intent-warning-hover\)\]:hover {
1310
1484
  color: var(--pd-intent-warning-hover);
1311
1485
  }
1486
+ .hover\:pd-text-gray-600:hover {
1487
+ --tw-text-opacity: 1;
1488
+ color: rgb(75 85 99 / var(--tw-text-opacity, 1));
1489
+ }
1490
+ .focus\:pd-border-blue-500:focus {
1491
+ --tw-border-opacity: 1;
1492
+ border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
1493
+ }
1494
+ .focus\:pd-outline-none:focus {
1495
+ outline: 2px solid transparent;
1496
+ outline-offset: 2px;
1497
+ }
1498
+ .focus\:pd-ring-2:focus {
1499
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1500
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1501
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1502
+ }
1503
+ .focus\:pd-ring-blue-500\/10:focus {
1504
+ --tw-ring-color: rgb(59 130 246 / 0.1);
1505
+ }
1506
+ .active\:pd-scale-\[0\.98\]:active {
1507
+ --tw-scale-x: 0.98;
1508
+ --tw-scale-y: 0.98;
1509
+ 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));
1510
+ }
1312
1511
  .active\:pd-bg-\[var\(--pd-background-invert\)\]:active {
1313
1512
  background-color: var(--pd-background-invert);
1314
1513
  }
@@ -1330,3 +1529,12 @@ html body.pd-root,
1330
1529
  .active\:pd-text-\[var\(--pd-content-primary\)\]:active {
1331
1530
  color: var(--pd-content-primary);
1332
1531
  }
1532
+ .pd-group:focus-within .group-focus-within\:pd-text-blue-500 {
1533
+ --tw-text-opacity: 1;
1534
+ color: rgb(59 130 246 / var(--tw-text-opacity, 1));
1535
+ }
1536
+ .pd-group:hover .group-hover\:pd-text-\[var\(--pd-content-blue\)\] {
1537
+ color: var(--pd-content-blue);
1538
+ }
1539
+ .pd-group:hover .group-hover\:pd-opacity-60 { opacity: 0.6;
1540
+ }
package/dist/index.js CHANGED
@@ -1101,8 +1101,11 @@ function ThemeProvider({
1101
1101
  return initialMode;
1102
1102
  };
1103
1103
  const [mode, setMode] = useState(getInitialMode);
1104
+ useEffect(() => {
1105
+ setMode(initialMode);
1106
+ }, [initialMode]);
1104
1107
  const [resolvedMode, setResolvedMode] = useState(
1105
- () => resolveThemeMode(mode)
1108
+ () => resolveThemeMode(initialMode)
1106
1109
  );
1107
1110
  useEffect(() => {
1108
1111
  if (mode !== "system" || typeof window === "undefined" || !window.matchMedia) {
@@ -1208,31 +1211,6 @@ function ThemeProvider({
1208
1211
  } else {
1209
1212
  body.classList.remove("pd-dark");
1210
1213
  }
1211
- if (mode === "system") {
1212
- const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
1213
- const handleSystemChange = (e) => {
1214
- const systemIsDark = e.matches;
1215
- if (systemIsDark) {
1216
- body.classList.add("pd-dark");
1217
- } else {
1218
- body.classList.remove("pd-dark");
1219
- }
1220
- };
1221
- handleSystemChange(mediaQuery);
1222
- if (mediaQuery.addEventListener) {
1223
- mediaQuery.addEventListener("change", handleSystemChange);
1224
- return () => {
1225
- mediaQuery.removeEventListener("change", handleSystemChange);
1226
- body.classList.remove("pd-root", "pd-dark");
1227
- };
1228
- } else {
1229
- mediaQuery.addListener(handleSystemChange);
1230
- return () => {
1231
- mediaQuery.removeListener(handleSystemChange);
1232
- body.classList.remove("pd-root", "pd-dark");
1233
- };
1234
- }
1235
- }
1236
1214
  return () => {
1237
1215
  body.classList.remove("pd-root", "pd-dark");
1238
1216
  };