@jaetask/toolkit 0.1.0 → 0.2.0

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/styles.css CHANGED
@@ -2,6 +2,29 @@
2
2
  import "@jaetask/toolkit/styles.css";
3
3
  Dark values apply under .dark or [data-theme="dark"] on any ancestor. */
4
4
 
5
+ /* Inter (SIL Open Font License, fonts/OFL.txt), served next to this file. */
6
+ @font-face {
7
+ font-family: "Inter Variable";
8
+ font-style: normal;
9
+ font-display: swap;
10
+ font-weight: 100 900;
11
+ src: url("./fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
12
+ unicode-range:
13
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
14
+ U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
15
+ U+2C60-2C7F, U+A720-A7FF;
16
+ }
17
+ @font-face {
18
+ font-family: "Inter Variable";
19
+ font-style: normal;
20
+ font-display: swap;
21
+ font-weight: 100 900;
22
+ src: url("./fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
23
+ unicode-range:
24
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
25
+ U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
26
+ }
27
+
5
28
  :root {
6
29
  --tk-ink: #1f2328;
7
30
  --tk-muted: #6b6a63;
@@ -22,6 +45,20 @@
22
45
  --tk-danger: #b42318;
23
46
  --tk-focus: #1f2328;
24
47
 
48
+ /* The six named colours: labels, project colours, avatars. */
49
+ --tk-c-blue: #0b5cad;
50
+ --tk-c-blue-soft: #e3eefb;
51
+ --tk-c-teal: #0f766e;
52
+ --tk-c-teal-soft: #dcf2ef;
53
+ --tk-c-green: #1a7f37;
54
+ --tk-c-green-soft: #e3f2e7;
55
+ --tk-c-amber: #a6400c;
56
+ --tk-c-amber-soft: #fdf0dc;
57
+ --tk-c-purple: #6f42c1;
58
+ --tk-c-purple-soft: #efe7fb;
59
+ --tk-c-pink: #b4237a;
60
+ --tk-c-pink-soft: #fbe5f1;
61
+
25
62
  --tk-font: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
26
63
 
27
64
  --tk-radius-panel: 20px;
@@ -56,6 +93,19 @@
56
93
  --tk-done: #3fb950;
57
94
  --tk-danger: #f97066;
58
95
  --tk-focus: #e6edf3;
96
+
97
+ --tk-c-blue: #8cb8ef;
98
+ --tk-c-blue-soft: #10233d;
99
+ --tk-c-teal: #5ec8bc;
100
+ --tk-c-teal-soft: #0f2a27;
101
+ --tk-c-green: #3fb950;
102
+ --tk-c-green-soft: #12361f;
103
+ --tk-c-amber: #f0a268;
104
+ --tk-c-amber-soft: #3a2512;
105
+ --tk-c-purple: #c3a6f5;
106
+ --tk-c-purple-soft: #2a1d45;
107
+ --tk-c-pink: #f28bc4;
108
+ --tk-c-pink-soft: #3d1630;
59
109
  }
60
110
 
61
111
  /* ---------- Base ---------- */
@@ -207,6 +257,26 @@ a.tk-group-label:hover {
207
257
  font-size: 11px;
208
258
  font-weight: 700;
209
259
  }
260
+ .tk-group-row {
261
+ display: flex;
262
+ align-items: center;
263
+ gap: 2px;
264
+ margin: 0 12px;
265
+ border-radius: var(--tk-radius-row);
266
+ }
267
+ .tk-group-row > .tk-group-item {
268
+ flex: 1;
269
+ margin: 0;
270
+ }
271
+ .tk-chevron > svg {
272
+ transition: transform 120ms ease;
273
+ }
274
+ .tk-chevron[aria-expanded="true"] > svg {
275
+ transform: rotate(90deg);
276
+ }
277
+ .tk-group-open > .tk-group-row {
278
+ margin: 0 6px;
279
+ }
210
280
  .tk-group-open {
211
281
  margin: 2px 12px;
212
282
  padding: 6px 0 10px;
@@ -252,6 +322,10 @@ a.tk-group-label:hover {
252
322
  font-size: 12px;
253
323
  color: var(--tk-side-text);
254
324
  }
325
+ .tk-nav-bottom {
326
+ padding-block: 8px;
327
+ border-top: 1px solid var(--tk-side-line);
328
+ }
255
329
  .tk-side-foot {
256
330
  display: flex;
257
331
  align-items: center;
@@ -287,8 +361,9 @@ a.tk-group-label:hover {
287
361
  }
288
362
  .tk-shell[data-collapsed="true"] .tk-label,
289
363
  .tk-shell[data-collapsed="true"] .tk-group-label,
290
- .tk-shell[data-collapsed="true"] .tk-group-open > :not(.tk-group-item),
364
+ .tk-shell[data-collapsed="true"] .tk-group-open > :not(.tk-group-item):not(.tk-group-row),
291
365
  .tk-shell[data-collapsed="true"] .tk-dot,
366
+ .tk-shell[data-collapsed="true"] .tk-chevron,
292
367
  .tk-shell[data-collapsed="true"] .tk-settings,
293
368
  .tk-shell[data-collapsed="true"] .tk-side-empty {
294
369
  display: none;
@@ -679,3 +754,390 @@ a.tk-list-body:hover {
679
754
  font-size: 18px;
680
755
  font-weight: 800;
681
756
  }
757
+
758
+ @media (prefers-reduced-motion: reduce) {
759
+ .tk-chevron > svg {
760
+ transition: none;
761
+ }
762
+ }
763
+
764
+ /* ---------- Named colours ---------- */
765
+ [data-colour="blue"] {
766
+ --tk-tint: var(--tk-c-blue);
767
+ --tk-tint-soft: var(--tk-c-blue-soft);
768
+ }
769
+ [data-colour="teal"] {
770
+ --tk-tint: var(--tk-c-teal);
771
+ --tk-tint-soft: var(--tk-c-teal-soft);
772
+ }
773
+ [data-colour="green"] {
774
+ --tk-tint: var(--tk-c-green);
775
+ --tk-tint-soft: var(--tk-c-green-soft);
776
+ }
777
+ [data-colour="amber"] {
778
+ --tk-tint: var(--tk-c-amber);
779
+ --tk-tint-soft: var(--tk-c-amber-soft);
780
+ }
781
+ [data-colour="purple"] {
782
+ --tk-tint: var(--tk-c-purple);
783
+ --tk-tint-soft: var(--tk-c-purple-soft);
784
+ }
785
+ [data-colour="pink"] {
786
+ --tk-tint: var(--tk-c-pink);
787
+ --tk-tint-soft: var(--tk-c-pink-soft);
788
+ }
789
+ .tk-chip[data-colour] {
790
+ background: var(--tk-tint-soft);
791
+ color: var(--tk-tint);
792
+ font-weight: 600;
793
+ }
794
+ .tk-avatar[data-colour] {
795
+ background: var(--tk-tint);
796
+ color: var(--tk-page);
797
+ }
798
+ .tk-avatar[data-emoji="true"] {
799
+ font-size: 13px;
800
+ }
801
+ .tk-avatar[data-emoji="true"][data-colour] {
802
+ background: var(--tk-tint-soft);
803
+ }
804
+ .tk-avatar > img {
805
+ width: 100%;
806
+ height: 100%;
807
+ object-fit: cover;
808
+ }
809
+
810
+ /* ---------- Counts ---------- */
811
+ .tk-count {
812
+ margin-left: auto;
813
+ min-width: 20px;
814
+ padding: 1px 7px;
815
+ border-radius: 999px;
816
+ background: var(--tk-side-fill);
817
+ color: var(--tk-muted);
818
+ font-size: 12px;
819
+ font-weight: 600;
820
+ text-align: center;
821
+ font-variant-numeric: tabular-nums;
822
+ }
823
+ .tk-tab .tk-count,
824
+ .tk-column-head .tk-count {
825
+ margin-left: 6px;
826
+ background: var(--tk-panel);
827
+ }
828
+
829
+ /* ---------- Rows: drag, blocked ---------- */
830
+ .tk-list-row[draggable="true"] {
831
+ cursor: grab;
832
+ }
833
+ .tk-list-row[draggable="true"]:active {
834
+ cursor: grabbing;
835
+ }
836
+ .tk-list-row[data-blocked="true"] .tk-list-body {
837
+ color: var(--tk-muted);
838
+ }
839
+ .tk-group-slot[data-over="true"],
840
+ .tk-group-open[data-over="true"] {
841
+ box-shadow: inset 0 2px 0 var(--tk-ink);
842
+ border-radius: var(--tk-radius-row);
843
+ }
844
+ .tk-group-slot[draggable="true"],
845
+ .tk-group-open[draggable="true"] {
846
+ cursor: grab;
847
+ }
848
+
849
+ /* ---------- Board ---------- */
850
+ .tk-board {
851
+ display: grid;
852
+ grid-auto-flow: column;
853
+ grid-auto-columns: minmax(260px, 1fr);
854
+ gap: 14px;
855
+ overflow-x: auto;
856
+ padding-bottom: 4px;
857
+ }
858
+ .tk-column {
859
+ display: flex;
860
+ flex-direction: column;
861
+ gap: 10px;
862
+ min-width: 0;
863
+ padding: 14px;
864
+ border-radius: var(--tk-radius-card);
865
+ background: var(--tk-panel);
866
+ outline: 2px dashed transparent;
867
+ outline-offset: -2px;
868
+ }
869
+ .tk-column[data-over="true"] {
870
+ outline-color: var(--tk-line-strong);
871
+ }
872
+ .tk-column-head {
873
+ display: flex;
874
+ align-items: center;
875
+ gap: 8px;
876
+ min-width: 0;
877
+ }
878
+ .tk-column-title {
879
+ margin: 0;
880
+ font-size: 15px;
881
+ font-weight: 800;
882
+ }
883
+ .tk-column-action {
884
+ margin-left: auto;
885
+ }
886
+ .tk-column-list .tk-list-row {
887
+ padding: 11px 14px;
888
+ }
889
+ .tk-column-empty {
890
+ margin: 0;
891
+ padding: 14px;
892
+ border: 1px dashed var(--tk-line-strong);
893
+ border-radius: var(--tk-radius-card);
894
+ color: var(--tk-muted);
895
+ font-size: 13px;
896
+ }
897
+
898
+ /* ---------- Thread ---------- */
899
+ .tk-thread,
900
+ .tk-replies {
901
+ margin: 0;
902
+ padding: 0;
903
+ list-style: none;
904
+ }
905
+ .tk-thread {
906
+ display: flex;
907
+ flex-direction: column;
908
+ gap: 14px;
909
+ }
910
+ .tk-comment {
911
+ display: flex;
912
+ gap: 10px;
913
+ align-items: flex-start;
914
+ }
915
+ .tk-comment-main {
916
+ display: flex;
917
+ flex: 1;
918
+ flex-direction: column;
919
+ gap: 4px;
920
+ min-width: 0;
921
+ }
922
+ .tk-comment-head {
923
+ display: flex;
924
+ align-items: baseline;
925
+ gap: 8px;
926
+ }
927
+ .tk-comment-author {
928
+ font-weight: 700;
929
+ }
930
+ .tk-comment-time {
931
+ color: var(--tk-muted);
932
+ font-size: 12px;
933
+ }
934
+ .tk-comment-text {
935
+ overflow-wrap: anywhere;
936
+ white-space: pre-wrap;
937
+ }
938
+ .tk-comment-foot {
939
+ display: flex;
940
+ flex-wrap: wrap;
941
+ align-items: center;
942
+ gap: 8px;
943
+ }
944
+ .tk-replies {
945
+ display: flex;
946
+ flex-direction: column;
947
+ gap: 12px;
948
+ margin-top: 8px;
949
+ padding-left: 14px;
950
+ border-left: 2px solid var(--tk-line);
951
+ }
952
+ .tk-reactions {
953
+ display: inline-flex;
954
+ flex-wrap: wrap;
955
+ gap: 4px;
956
+ }
957
+ .tk-reaction {
958
+ padding: 2px 8px;
959
+ border: 1px solid var(--tk-line);
960
+ border-radius: 999px;
961
+ background: var(--tk-card);
962
+ color: var(--tk-ink);
963
+ font: 500 12px / 1.5 var(--tk-font);
964
+ cursor: pointer;
965
+ }
966
+ .tk-reaction[aria-pressed="true"] {
967
+ border-color: var(--tk-ink);
968
+ background: var(--tk-panel);
969
+ }
970
+ .tk-activity {
971
+ display: flex;
972
+ flex-wrap: wrap;
973
+ align-items: center;
974
+ gap: 8px;
975
+ color: var(--tk-muted);
976
+ font-size: 13px;
977
+ }
978
+ .tk-activity-dot {
979
+ width: 6px;
980
+ height: 6px;
981
+ margin: 0 8px;
982
+ border-radius: 50%;
983
+ background: var(--tk-line-strong);
984
+ }
985
+ .tk-activity-action {
986
+ margin-left: auto;
987
+ }
988
+
989
+ /* ---------- Facts, notices, inline ---------- */
990
+ .tk-facts {
991
+ display: grid;
992
+ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
993
+ gap: 16px;
994
+ margin: 0;
995
+ }
996
+ .tk-fact {
997
+ display: flex;
998
+ flex-direction: column;
999
+ gap: 4px;
1000
+ min-width: 0;
1001
+ }
1002
+ .tk-fact > dd {
1003
+ margin: 0;
1004
+ overflow-wrap: anywhere;
1005
+ }
1006
+ .tk-notice {
1007
+ display: flex;
1008
+ align-items: center;
1009
+ gap: 10px;
1010
+ padding: 10px 12px 10px 16px;
1011
+ border-radius: var(--tk-radius-button);
1012
+ background: var(--tk-panel);
1013
+ color: var(--tk-ink);
1014
+ }
1015
+ .tk-notice[data-tone="done"] {
1016
+ background: var(--tk-c-green-soft);
1017
+ }
1018
+ .tk-notice[data-tone="refused"] {
1019
+ background: var(--tk-c-amber-soft);
1020
+ }
1021
+ .tk-notice-text {
1022
+ flex: 1;
1023
+ min-width: 0;
1024
+ }
1025
+ .tk-notice[data-floating="true"] {
1026
+ position: fixed;
1027
+ right: max(16px, env(safe-area-inset-right, 0px));
1028
+ bottom: calc(16px + env(safe-area-inset-bottom, 0px));
1029
+ z-index: 50;
1030
+ max-width: min(28rem, calc(100vw - 32px));
1031
+ box-shadow: 0 6px 24px rgb(0 0 0 / 0.12);
1032
+ }
1033
+ .tk-inline {
1034
+ display: flex;
1035
+ flex-wrap: wrap;
1036
+ align-items: center;
1037
+ gap: 8px;
1038
+ }
1039
+ .tk-inline > .tk-input,
1040
+ .tk-inline > .tk-select {
1041
+ width: auto;
1042
+ flex: 1 1 10rem;
1043
+ }
1044
+
1045
+ /* ---------- Centred page ---------- */
1046
+ .tk-centered {
1047
+ display: grid;
1048
+ place-items: center;
1049
+ min-height: 100dvh;
1050
+ padding: 16px;
1051
+ }
1052
+ .tk-centered-panel {
1053
+ width: min(100%, 30rem);
1054
+ }
1055
+
1056
+ /* ---------- Tabs, composer, filters ---------- */
1057
+ .tk-tabs {
1058
+ display: flex;
1059
+ flex-wrap: wrap;
1060
+ gap: 4px;
1061
+ padding: 4px;
1062
+ border-radius: 12px;
1063
+ background: var(--tk-panel);
1064
+ width: fit-content;
1065
+ max-width: 100%;
1066
+ }
1067
+ .tk-tab {
1068
+ display: inline-flex;
1069
+ align-items: center;
1070
+ padding: 6px 12px;
1071
+ border: 0;
1072
+ border-radius: 8px;
1073
+ background: transparent;
1074
+ color: var(--tk-muted);
1075
+ font: 600 13px / 1.25 var(--tk-font);
1076
+ text-decoration: none;
1077
+ cursor: pointer;
1078
+ }
1079
+ .tk-tab:hover {
1080
+ color: var(--tk-ink);
1081
+ }
1082
+ .tk-tab[aria-selected="true"],
1083
+ .tk-tab[aria-current="page"] {
1084
+ background: var(--tk-card);
1085
+ color: var(--tk-ink);
1086
+ }
1087
+ .tk-composer {
1088
+ display: flex;
1089
+ gap: 8px;
1090
+ }
1091
+ .tk-filter {
1092
+ display: flex;
1093
+ flex-wrap: wrap;
1094
+ align-items: center;
1095
+ gap: 8px;
1096
+ }
1097
+ .tk-filter > .tk-search {
1098
+ flex: 1 1 14rem;
1099
+ width: auto;
1100
+ }
1101
+ .tk-filter > .tk-select {
1102
+ width: auto;
1103
+ }
1104
+ .tk-pick[aria-pressed="true"] {
1105
+ background: var(--tk-ink);
1106
+ color: var(--tk-page);
1107
+ }
1108
+
1109
+ /* ---------- Thumbnails ---------- */
1110
+ .tk-thumbs {
1111
+ display: grid;
1112
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
1113
+ gap: 10px;
1114
+ margin: 0;
1115
+ padding: 0;
1116
+ list-style: none;
1117
+ }
1118
+ .tk-thumb {
1119
+ position: relative;
1120
+ overflow: hidden;
1121
+ aspect-ratio: 1;
1122
+ max-width: 100%;
1123
+ border: 1px solid var(--tk-line);
1124
+ border-radius: var(--tk-radius-card);
1125
+ background: var(--tk-panel);
1126
+ }
1127
+ .tk-thumb > img {
1128
+ width: 100%;
1129
+ height: 100%;
1130
+ object-fit: cover;
1131
+ }
1132
+ .tk-thumb-remove {
1133
+ position: absolute;
1134
+ right: 6px;
1135
+ bottom: 6px;
1136
+ padding: 4px 8px;
1137
+ border: 0;
1138
+ border-radius: 8px;
1139
+ background: var(--tk-card);
1140
+ color: var(--tk-ink);
1141
+ font: 600 12px / 1.25 var(--tk-font);
1142
+ cursor: pointer;
1143
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaetask/toolkit",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "One shell and page kit for every Kit app: sidebar, sections, edit pages and tokens, as React components.",
5
5
  "keywords": [
6
6
  "react",
@@ -24,14 +24,16 @@
24
24
  "dist",
25
25
  "skills",
26
26
  "README.md",
27
- "LICENSE"
27
+ "LICENSE",
28
+ "CHANGELOG.md"
28
29
  ],
29
30
  "exports": {
30
31
  ".": {
31
32
  "types": "./dist/index.d.ts",
32
33
  "import": "./dist/index.js"
33
34
  },
34
- "./styles.css": "./dist/styles.css"
35
+ "./styles.css": "./dist/styles.css",
36
+ "./fonts/*": "./dist/fonts/*"
35
37
  },
36
38
  "bin": {
37
39
  "toolkit-guard": "./dist/guard.js"
@@ -44,7 +46,7 @@
44
46
  "node": ">=22.13"
45
47
  },
46
48
  "scripts": {
47
- "build": "tsc -p tsconfig.build.json && cp src/styles.css dist/styles.css && chmod +x dist/guard.js",
49
+ "build": "tsc -p tsconfig.build.json && cp src/styles.css dist/styles.css && rm -rf dist/fonts && cp -R src/fonts dist/fonts && chmod +x dist/guard.js",
48
50
  "typecheck": "tsc --noEmit",
49
51
  "lint": "biome lint . && node scripts/check-scrub.mjs",
50
52
  "format": "biome format --write .",