@monster-orange/den-ui 0.6.6 → 0.7.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/src/shell.css CHANGED
@@ -114,6 +114,47 @@ body.den-has-shell > #den-content {
114
114
  margin: 0;
115
115
  white-space: nowrap;
116
116
  }
117
+ /* The mark's layout (0.7.0, from Den's own sheet): a centred box its
118
+ image fills, whatever the host's mark is. */
119
+ .den-mark {
120
+ display: inline-flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ width: 18px;
124
+ height: 18px;
125
+ flex-shrink: 0;
126
+ overflow: hidden;
127
+ }
128
+ .den-mark img {
129
+ display: block;
130
+ width: 18px;
131
+ height: 18px;
132
+ }
133
+ /* Scaled, never cropped: non-square art keeps its edges. */
134
+ .den-mark-raster img {
135
+ object-fit: contain;
136
+ }
137
+ .den-mark-text {
138
+ font: 700 11px/1 var(--display);
139
+ letter-spacing: -0.02em;
140
+ background: var(--accent-fill);
141
+ color: var(--on-accent);
142
+ }
143
+ .den-mark-text[data-len="2"] {
144
+ font-size: 9px;
145
+ }
146
+ .den-mark-text[data-len="3"] {
147
+ font-size: 7px;
148
+ }
149
+ .den-mark-square {
150
+ border-radius: 2px;
151
+ }
152
+ .den-mark-rounded {
153
+ border-radius: 5px;
154
+ }
155
+ .den-mark-circle {
156
+ border-radius: 50%;
157
+ }
117
158
  #den-shell .den-mark {
118
159
  width: 22px;
119
160
  height: 22px;
@@ -264,14 +305,20 @@ body.den-has-shell > #den-content {
264
305
  .den-rail > .den-rail-group:first-child > .den-gh {
265
306
  padding-top: 2px;
266
307
  }
308
+ /* A group's "from" tag never makes its heading taller, on any font: its
309
+ box (a 12px line and its border, 14px) is centred on the heading's line
310
+ and its vertical margins cancel that box, so its row is the heading's
311
+ own words' line, with or without the tag. */
267
312
  .den-tagx {
268
- font: 10px var(--mono);
313
+ font: 10px/12px var(--mono);
269
314
  color: var(--faint);
270
315
  border: 1px dashed var(--border-strong);
271
316
  border-radius: 4px;
272
317
  padding: 0 4px;
273
318
  text-transform: none;
274
319
  letter-spacing: 0;
320
+ align-self: center;
321
+ margin-block: -7px;
275
322
  }
276
323
  .den-ni {
277
324
  display: flex;
@@ -517,6 +564,12 @@ body.den-has-shell .den-upd {
517
564
  white-space: nowrap;
518
565
  border: 0;
519
566
  }
567
+ /* The brand is its mark alone here (the title is hidden): it never
568
+ shrinks below it; the host's chips give way instead. */
569
+ .den-brand {
570
+ flex-shrink: 0;
571
+ min-width: max-content;
572
+ }
520
573
  }
521
574
  @media (prefers-reduced-motion: reduce) {
522
575
  .den-rail {
@@ -556,3 +609,402 @@ body.den-has-shell .den-upd {
556
609
  display: none;
557
610
  pointer-events: none;
558
611
  }
612
+
613
+ /* ── 0.7.0: the scope crumbs, the search, the bell, the account ───────── */
614
+
615
+ /* The scope crumbs: / KEY value ▾ / … The search gives way first: the
616
+ crumbs keep their parts whole (each value is capped), so they never run
617
+ into one another. */
618
+ .den-scope {
619
+ display: flex;
620
+ align-items: center;
621
+ gap: 2px;
622
+ min-width: 0;
623
+ flex-shrink: 0;
624
+ position: relative;
625
+ }
626
+ .den-sep {
627
+ color: var(--faint);
628
+ }
629
+ .den-scope [hidden] {
630
+ display: none;
631
+ }
632
+ .den-scope .den-ib {
633
+ color: var(--text);
634
+ font-size: 13px;
635
+ min-width: 0;
636
+ }
637
+ .den-k {
638
+ font: 11px var(--mono);
639
+ color: var(--faint);
640
+ text-transform: uppercase;
641
+ letter-spacing: 0.06em;
642
+ }
643
+ .den-scope .den-ib[aria-expanded="true"] {
644
+ background: var(--sunken);
645
+ }
646
+ /* A long value ends in an ellipsis; the whole value is in the menu. An
647
+ env's name is short: never capped. */
648
+ .den-scope-btn:not([data-scope="env"]) .den-vn,
649
+ .den-scope .den-opt .den-vn {
650
+ display: inline-block;
651
+ max-width: 200px;
652
+ overflow: hidden;
653
+ text-overflow: ellipsis;
654
+ vertical-align: top;
655
+ }
656
+ /* The search field, ⌘K inside it. Its sizes are content-box (a page may
657
+ reset everything to border-box). */
658
+ .den-search {
659
+ flex: 1 1 260px;
660
+ max-width: 420px;
661
+ margin: 0 auto;
662
+ display: flex;
663
+ align-items: center;
664
+ gap: 8px;
665
+ background: var(--sunken);
666
+ border: 1px solid var(--border);
667
+ border-radius: var(--radius-button);
668
+ padding: 5px 10px;
669
+ color: var(--faint);
670
+ cursor: text;
671
+ min-width: 0;
672
+ font: inherit;
673
+ box-sizing: content-box;
674
+ }
675
+ .den-search-ph {
676
+ flex: 1;
677
+ overflow: hidden;
678
+ text-overflow: ellipsis;
679
+ white-space: nowrap;
680
+ text-align: left;
681
+ }
682
+ .den-search-ic {
683
+ flex: none;
684
+ }
685
+ /* A key cap: the search's ⌘K, the top bar's Report ⌘⇧F, and any .den-kbd
686
+ a host draws. One rule, so they never drift apart. */
687
+ .den-kbd,
688
+ .den-search kbd,
689
+ .den-top .den-rb kbd {
690
+ font: 11px var(--mono);
691
+ border: 1px solid var(--border);
692
+ border-bottom-width: 2px;
693
+ border-radius: 4px;
694
+ padding: 0 5px;
695
+ color: var(--muted);
696
+ background: var(--surface);
697
+ }
698
+
699
+ /* The bell, its count, and its panel (on <body>, outside the bar). */
700
+ .den-bell {
701
+ position: relative;
702
+ }
703
+ .den-bell-n {
704
+ position: absolute;
705
+ top: -4px;
706
+ right: -6px;
707
+ min-width: 16px;
708
+ height: 16px;
709
+ padding: 0 4px;
710
+ border-radius: 999px;
711
+ background: var(--warn);
712
+ color: var(--bg);
713
+ font: 600 10px/16px var(--mono);
714
+ text-align: center;
715
+ }
716
+ .den-bell-n[hidden] {
717
+ display: none;
718
+ }
719
+ .den-bell-pop {
720
+ position: fixed;
721
+ top: 52px;
722
+ right: 12px;
723
+ width: min(420px, calc(100vw - 32px));
724
+ max-height: min(70vh, 640px);
725
+ overflow: auto;
726
+ background: var(--surface);
727
+ color: var(--text);
728
+ border: 1px solid var(--border-strong);
729
+ border-radius: 10px;
730
+ box-shadow: 0 8px 28px color-mix(in srgb, var(--text) 25%, transparent);
731
+ /* On <body>: its own font, not a page's default (a serif). */
732
+ z-index: 60;
733
+ padding: 8px 0;
734
+ font: 13px/1.45 var(--sans);
735
+ }
736
+ .den-bell-pop[hidden] {
737
+ display: none;
738
+ }
739
+ .den-bell-pop:focus {
740
+ outline: none;
741
+ }
742
+ .den-bell-hd {
743
+ display: flex;
744
+ gap: 8px;
745
+ align-items: center;
746
+ padding: 4px 12px 8px;
747
+ border-bottom: 1px solid var(--border);
748
+ }
749
+ .den-bell-hd h2 {
750
+ font-size: 13px;
751
+ margin: 0;
752
+ flex: 1;
753
+ }
754
+ .den-bell-hd button {
755
+ font: inherit;
756
+ font-size: 12px;
757
+ background: none;
758
+ border: 0;
759
+ color: var(--accent-text);
760
+ cursor: pointer;
761
+ padding: 2px 4px;
762
+ }
763
+ .den-bell-row {
764
+ display: flex;
765
+ gap: 8px;
766
+ align-items: flex-start;
767
+ padding: 6px 12px;
768
+ }
769
+ .den-bell-row:hover {
770
+ background: color-mix(in srgb, var(--text) 5%, transparent);
771
+ }
772
+ .den-bell-row a {
773
+ flex: 1;
774
+ color: inherit;
775
+ text-decoration: none;
776
+ overflow-wrap: anywhere;
777
+ }
778
+ .den-bell-row.read a {
779
+ color: var(--muted);
780
+ }
781
+ .den-bell-row time {
782
+ color: var(--faint);
783
+ font-size: 11px;
784
+ white-space: nowrap;
785
+ }
786
+ .den-bell-empty {
787
+ padding: 16px 12px;
788
+ color: var(--muted);
789
+ }
790
+ .den-bell-empty p {
791
+ margin: 0 0 6px;
792
+ }
793
+ .den-bell-empty a {
794
+ color: var(--accent-text);
795
+ }
796
+
797
+ /* A phone: the panel the window's width, its rows tall enough to touch. */
798
+ @media (max-width: 480px) {
799
+ .den-bell-pop {
800
+ left: 0;
801
+ right: 0;
802
+ width: auto;
803
+ top: 48px;
804
+ border-radius: 0 0 10px 10px;
805
+ }
806
+ .den-bell-row {
807
+ min-height: 44px;
808
+ align-items: center;
809
+ }
810
+ }
811
+
812
+ /* The account entry: its detail after the label, quieter. */
813
+ .den-acct-d {
814
+ color: var(--faint);
815
+ }
816
+
817
+ /* Narrow: the crumbs' keys and the optional crumb give way, then the
818
+ crumbs hide and the search is its icon. */
819
+ @media (max-width: 860px) {
820
+ .den-scope .den-k,
821
+ .den-scope .den-sep,
822
+ .den-scope .den-opt {
823
+ display: none;
824
+ }
825
+ }
826
+ @media (max-width: 720px) {
827
+ .den-scope {
828
+ display: none;
829
+ }
830
+ .den-search {
831
+ flex: 0 0 auto;
832
+ margin: 0 0 0 auto;
833
+ }
834
+ .den-search-ph,
835
+ .den-search kbd {
836
+ display: none;
837
+ }
838
+ }
839
+
840
+ /* A phone's tap targets: every top-bar button 32px or more each way. */
841
+ @media (max-width: 479.98px) {
842
+ .den-top button {
843
+ min-height: 32px;
844
+ min-width: 32px;
845
+ }
846
+ }
847
+
848
+ /* 0.7.0: the kit's menus (◐ ▾, a crumb's own menu): a host's menu look,
849
+ value for value. */
850
+ .den-pop {
851
+ position: fixed;
852
+ z-index: 45;
853
+ background: var(--raised);
854
+ border: 1px solid var(--border-strong);
855
+ border-radius: 10px;
856
+ box-shadow: var(--shadow);
857
+ padding: 6px;
858
+ min-width: 220px;
859
+ max-height: calc(100vh - 72px);
860
+ overflow-y: auto;
861
+ box-sizing: border-box;
862
+ font: 14px/1.45 var(--sans);
863
+ color: var(--text);
864
+ }
865
+ .den-pop:focus {
866
+ outline: none;
867
+ }
868
+ .den-pop :focus-visible {
869
+ outline: 2px solid var(--accent);
870
+ outline-offset: 2px;
871
+ }
872
+ .den-pop .den-ml {
873
+ font: 11px var(--mono);
874
+ color: var(--faint);
875
+ text-transform: uppercase;
876
+ letter-spacing: 0.07em;
877
+ padding: 6px 8px 2px;
878
+ }
879
+ .den-pop .den-mi {
880
+ display: flex;
881
+ width: 100%;
882
+ align-items: center;
883
+ gap: 8px;
884
+ background: none;
885
+ border: 0;
886
+ padding: 6px 8px;
887
+ border-radius: 6px;
888
+ cursor: pointer;
889
+ text-align: left;
890
+ font: inherit;
891
+ color: inherit;
892
+ text-decoration: none;
893
+ box-sizing: border-box;
894
+ }
895
+ .den-pop .den-mi:hover,
896
+ .den-pop .den-mi:focus {
897
+ background: var(--sunken);
898
+ }
899
+ /* The ✓ is drawn, not read (aria-checked or aria-current says it). */
900
+ .den-pop .den-mi[aria-checked="true"]::after,
901
+ .den-pop .den-mi[aria-current="true"]::after {
902
+ content: "✓" / "";
903
+ margin-left: auto;
904
+ color: var(--accent-text);
905
+ }
906
+ .den-pop .den-mi-l {
907
+ min-width: 0;
908
+ overflow: hidden;
909
+ text-overflow: ellipsis;
910
+ white-space: nowrap;
911
+ }
912
+ .den-pop .den-mtag {
913
+ font: 11px var(--mono);
914
+ color: var(--muted);
915
+ }
916
+ .den-pop .den-hr {
917
+ height: 1px;
918
+ background: var(--border);
919
+ margin: 6px 0;
920
+ }
921
+ .den-pop .den-mnote {
922
+ color: var(--muted);
923
+ font-size: 12.5px;
924
+ margin: 0;
925
+ padding: 4px 8px;
926
+ max-width: 260px;
927
+ }
928
+ /* A long menu's type-to-filter field, a host's menu field look; an entry
929
+ it filters out is hidden. */
930
+ .den-pop input.den-mfilter {
931
+ display: block;
932
+ width: 100%;
933
+ box-sizing: border-box;
934
+ margin: 0 0 4px;
935
+ -webkit-appearance: none;
936
+ appearance: none;
937
+ border: 1px solid var(--border);
938
+ background: var(--bg);
939
+ color: var(--text);
940
+ border-radius: var(--radius-button);
941
+ padding: 6px 8px;
942
+ font: inherit;
943
+ font-size: 13.3333px;
944
+ line-height: normal;
945
+ }
946
+ .den-pop .den-mi[hidden],
947
+ .den-pop .den-mnote[hidden] {
948
+ display: none;
949
+ }
950
+ /* A form in a menu (the account menu's Sign out) is just its row. */
951
+ .den-pop form.den-mform {
952
+ display: block;
953
+ width: auto;
954
+ margin: 0;
955
+ padding: 0;
956
+ box-sizing: border-box;
957
+ }
958
+ /* ◐ ▾'s menu, on <body> above everything, placed under the button. */
959
+ .den-um {
960
+ margin: 0;
961
+ right: auto;
962
+ bottom: auto;
963
+ z-index: 1000;
964
+ }
965
+ /* A crumb's own menu drops below its ▾, inside the bar. */
966
+ .den-scope-menu {
967
+ position: absolute;
968
+ top: calc(100% + 6px);
969
+ left: var(--den-menu-x, 0px);
970
+ }
971
+
972
+ /* 0.7.0: the update-waiting pill beside the version chip. */
973
+ .stale-pill {
974
+ font-family: var(--mono);
975
+ font-size: 10px;
976
+ font-weight: 600;
977
+ padding: 2px 9px;
978
+ border-radius: 10px;
979
+ cursor: pointer;
980
+ user-select: none;
981
+ border: 1px solid var(--warn);
982
+ color: var(--warn);
983
+ background: color-mix(in srgb, var(--warn) 12%, transparent);
984
+ display: inline-flex;
985
+ align-items: center;
986
+ gap: 5px;
987
+ flex-shrink: 0;
988
+ animation: stale-pulse 2s ease-in-out infinite;
989
+ }
990
+ .stale-pill:hover {
991
+ color: var(--bg);
992
+ background: var(--warn);
993
+ }
994
+ .stale-pill b {
995
+ font-weight: 700;
996
+ }
997
+ @keyframes stale-pulse {
998
+ 0%,
999
+ 100% {
1000
+ opacity: 1;
1001
+ }
1002
+ 50% {
1003
+ opacity: 0.5;
1004
+ }
1005
+ }
1006
+ @media (max-width: 720px) {
1007
+ .den-top .stale-lbl {
1008
+ display: none;
1009
+ }
1010
+ }
package/src/strings.js CHANGED
@@ -20,6 +20,23 @@ export const en = {
20
20
  "kit.update.region": "Update",
21
21
  "kit.skip": "Skip to content",
22
22
  "kit.menu": "Menu",
23
+ "kit.scope": "Scope",
24
+ "kit.search.ph": "Search…",
25
+ "kit.search.label": "Search",
26
+ "kit.bell": "Notifications",
27
+ "kit.bell.n": "Notifications: {n} unread",
28
+ "kit.bell.empty": "Nothing new.",
29
+ "kit.settings": "Settings",
30
+ "kit.appearance": "Appearance",
31
+ "kit.appearance.title": "Appearance and theme",
32
+ "kit.mode.system": "System",
33
+ "kit.mode.dark": "Dark",
34
+ "kit.mode.light": "Light",
35
+ "kit.theme": "Theme",
36
+ "kit.language": "Language",
37
+ "kit.menu.filter": "Filter {label}",
38
+ "kit.menu.filter.ph": "Filter…",
39
+ "kit.menu.none": "No match",
23
40
  "kit.pages": "Pages",
24
41
  "kit.collapse": "Collapse",
25
42
  "kit.expand": "Expand",
@@ -160,6 +177,23 @@ export const es = {
160
177
  "kit.update.region": "Actualización",
161
178
  "kit.skip": "Saltar al contenido",
162
179
  "kit.menu": "Menú",
180
+ "kit.scope": "Ámbito",
181
+ "kit.search.ph": "Buscar…",
182
+ "kit.search.label": "Buscar",
183
+ "kit.bell": "Notificaciones",
184
+ "kit.bell.n": "Notificaciones: {n} sin leer",
185
+ "kit.bell.empty": "Nada nuevo.",
186
+ "kit.settings": "Ajustes",
187
+ "kit.appearance": "Apariencia",
188
+ "kit.appearance.title": "Apariencia y tema",
189
+ "kit.mode.system": "Sistema",
190
+ "kit.mode.dark": "Oscuro",
191
+ "kit.mode.light": "Claro",
192
+ "kit.theme": "Tema",
193
+ "kit.language": "Idioma",
194
+ "kit.menu.filter": "Filtrar {label}",
195
+ "kit.menu.filter.ph": "Filtrar…",
196
+ "kit.menu.none": "Sin coincidencias",
163
197
  "kit.pages": "Páginas",
164
198
  "kit.collapse": "Contraer",
165
199
  "kit.expand": "Expandir",
@@ -304,6 +338,23 @@ export const ja = {
304
338
  "kit.update.region": "更新",
305
339
  "kit.skip": "本文へ移動",
306
340
  "kit.menu": "メニュー",
341
+ "kit.scope": "スコープ",
342
+ "kit.search.ph": "検索…",
343
+ "kit.search.label": "検索",
344
+ "kit.bell": "通知",
345
+ "kit.bell.n": "通知: 未読 {n} 件",
346
+ "kit.bell.empty": "新しいものはありません。",
347
+ "kit.settings": "設定",
348
+ "kit.appearance": "外観",
349
+ "kit.appearance.title": "外観とテーマ",
350
+ "kit.mode.system": "システム",
351
+ "kit.mode.dark": "ダーク",
352
+ "kit.mode.light": "ライト",
353
+ "kit.theme": "テーマ",
354
+ "kit.language": "言語",
355
+ "kit.menu.filter": "{label}を絞り込む",
356
+ "kit.menu.filter.ph": "絞り込み…",
357
+ "kit.menu.none": "一致なし",
307
358
  "kit.pages": "ページ",
308
359
  "kit.collapse": "折りたたむ",
309
360
  "kit.expand": "展開する",