@triptease/tt-navbar 0.0.7 → 0.0.8

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.
@@ -1,15 +1,29 @@
1
1
  import { css } from 'lit';
2
2
  export const styles = css `
3
3
  :host {
4
+ --nav-bar-width: 260px;
5
+
4
6
  display: block;
5
7
  height: 100vh;
6
- max-width: 260px;
8
+ }
9
+
10
+ * {
11
+ box-sizing: border-box;
7
12
  }
8
13
 
9
14
  nav {
15
+ min-width: var(--nav-bar-width);
16
+ width: var(--nav-bar-width);
17
+ min-height: 100vh;
18
+ height: max-content;
10
19
  display: flex;
20
+ align-items: start;
21
+ gap: var(--space-scale-3-5);
11
22
  flex-direction: column;
12
- height: 100%;
23
+ background-color: var(--color-surface-inverted-100);
24
+ color: var(--color-text-inverted-400);
25
+ padding-top: var(--space-scale-2);
26
+ padding-bottom: var(--space-scale-2);
13
27
  }
14
28
 
15
29
  nav details div {
@@ -18,10 +32,128 @@ export const styles = css `
18
32
  }
19
33
 
20
34
  hr {
21
- background: black;
22
35
  width: 100%;
23
36
  height: 1px;
37
+ background-color: var(--color-surface-inverted-200);
24
38
  border: none;
25
39
  }
40
+
41
+ #tertiary-nav {
42
+ display: flex;
43
+ flex-direction: column;
44
+ margin-top: auto;
45
+ gap: var(--space-scale-2);
46
+ width: 100%;
47
+
48
+ .external-link {
49
+ font-size: var(--font-size-100);
50
+ line-height: var(--font-line-height-100);
51
+
52
+ .icon {
53
+ width: var(--space-scale-2);
54
+ height: var(--space-scale-2);
55
+ }
56
+ }
57
+ }
58
+
59
+ .icon {
60
+ width: var(--space-scale-3);
61
+ height: var(--space-scale-3);
62
+ display: inline;
63
+ color: var(--nav-item-color);
64
+ }
65
+
66
+ a {
67
+ font-size: var(--font-size-100);
68
+ line-height: var(--font-line-height-100);
69
+ gap: var(--space-scale-1-5);
70
+ border-radius: var(--border-radius-100);
71
+ color: var(--nav-item-color);
72
+ text-decoration: none;
73
+ padding: var(--space-scale-1);
74
+ width: 100%;
75
+ }
76
+
77
+ details {
78
+ width: 100%;
79
+ border-radius: var(--border-radius-100);
80
+
81
+ summary {
82
+ font-size: var(--font-size-100);
83
+ line-height: var(--font-line-height-100);
84
+ position: relative;
85
+ display: flex;
86
+ align-items: baseline;
87
+
88
+ &::marker {
89
+ content: '';
90
+ }
91
+ }
92
+
93
+ svg.chevron {
94
+ margin-left: auto;
95
+ margin-right: var(--space-scale-1);
96
+ width: var(--space-scale-2);
97
+ }
98
+
99
+ &[open] svg.chevron {
100
+ transform: rotate(180deg);
101
+ }
102
+
103
+ .dropdown-items {
104
+ display: flex;
105
+ flex-direction: column;
106
+ }
107
+ }
108
+
109
+ details > summary {
110
+ display: flex;
111
+ gap: var(--space-scale-1-5);
112
+ padding: var(--space-scale-1);
113
+ border-radius: var(--border-radius-100);
114
+ color: var(--nav-item-color);
115
+ align-items: center;
116
+
117
+ a {
118
+ color: var(--nav-item-color);
119
+ }
120
+
121
+ &:hover,
122
+ &:focus-visible {
123
+ background-color: var(--color-surface-inverted-200);
124
+ border-radius: var(--border-radius-100);
125
+ text-decoration: none;
126
+ }
127
+ }
128
+
129
+ .sub-nav-item {
130
+ padding-left: 44px;
131
+ padding-top: 10px;
132
+ padding-bottom: 10px;
133
+ color: var(--color-text-inverted-400);
134
+ font-size: var(--font-size-100);
135
+ line-height: var(--font-line-height-100);
136
+
137
+ button {
138
+ color: var(--color-text-inverted-400);
139
+ padding: 0;
140
+ }
141
+ }
142
+
143
+ .sub-nav-item:hover,
144
+ .sub-nav-item:focus-visible,
145
+ a:hover,
146
+ a:focus-visible {
147
+ background-color: var(--color-surface-inverted-200);
148
+ border-radius: var(--border-radius-100);
149
+ text-decoration: none;
150
+ color: var(--color-text-inverted-400);
151
+
152
+ .icon {
153
+ color: var(--color-text-inverted-400);
154
+ }
155
+ }
156
+
157
+
26
158
  `;
27
159
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwBxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: block;\n height: 100vh;\n max-width: 260px;\n }\n\n nav {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n nav details div {\n display: flex;\n flex-direction: column;\n }\n\n hr {\n background: black;\n width: 100%;\n height: 1px;\n border: none;\n }\n`;\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4JxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n --nav-bar-width: 260px;\n\n display: block;\n height: 100vh;\n }\n\n * {\n box-sizing: border-box;\n }\n\n nav {\n min-width: var(--nav-bar-width);\n width: var(--nav-bar-width);\n min-height: 100vh;\n height: max-content;\n display: flex;\n align-items: start;\n gap: var(--space-scale-3-5);\n flex-direction: column;\n background-color: var(--color-surface-inverted-100);\n color: var(--color-text-inverted-400);\n padding-top: var(--space-scale-2);\n padding-bottom: var(--space-scale-2);\n }\n\n nav details div {\n display: flex;\n flex-direction: column;\n }\n\n hr {\n width: 100%;\n height: 1px;\n background-color: var(--color-surface-inverted-200);\n border: none;\n }\n\n #tertiary-nav {\n display: flex;\n flex-direction: column;\n margin-top: auto;\n gap: var(--space-scale-2);\n width: 100%;\n\n .external-link {\n font-size: var(--font-size-100);\n line-height: var(--font-line-height-100);\n\n .icon {\n width: var(--space-scale-2);\n height: var(--space-scale-2);\n }\n }\n }\n\n .icon {\n width: var(--space-scale-3);\n height: var(--space-scale-3);\n display: inline;\n color: var(--nav-item-color);\n }\n\n a {\n font-size: var(--font-size-100);\n line-height: var(--font-line-height-100);\n gap: var(--space-scale-1-5);\n border-radius: var(--border-radius-100);\n color: var(--nav-item-color);\n text-decoration: none;\n padding: var(--space-scale-1);\n width: 100%;\n }\n\n details {\n width: 100%;\n border-radius: var(--border-radius-100);\n\n summary {\n font-size: var(--font-size-100);\n line-height: var(--font-line-height-100);\n position: relative;\n display: flex;\n align-items: baseline;\n\n &::marker {\n content: '';\n }\n }\n\n svg.chevron {\n margin-left: auto;\n margin-right: var(--space-scale-1);\n width: var(--space-scale-2);\n }\n\n &[open] svg.chevron {\n transform: rotate(180deg);\n }\n\n .dropdown-items {\n display: flex;\n flex-direction: column;\n }\n }\n\n details > summary {\n display: flex;\n gap: var(--space-scale-1-5);\n padding: var(--space-scale-1);\n border-radius: var(--border-radius-100);\n color: var(--nav-item-color);\n align-items: center;\n\n a {\n color: var(--nav-item-color);\n }\n\n &:hover,\n &:focus-visible {\n background-color: var(--color-surface-inverted-200);\n border-radius: var(--border-radius-100);\n text-decoration: none;\n }\n }\n\n .sub-nav-item {\n padding-left: 44px;\n padding-top: 10px;\n padding-bottom: 10px;\n color: var(--color-text-inverted-400);\n font-size: var(--font-size-100);\n line-height: var(--font-line-height-100);\n\n button {\n color: var(--color-text-inverted-400);\n padding: 0;\n }\n }\n\n .sub-nav-item:hover,\n .sub-nav-item:focus-visible,\n a:hover,\n a:focus-visible {\n background-color: var(--color-surface-inverted-200);\n border-radius: var(--border-radius-100);\n text-decoration: none;\n color: var(--color-text-inverted-400);\n\n .icon {\n color: var(--color-text-inverted-400);\n }\n }\n\n\n`;\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.7
2
+ * @triptease/tt-navbar v0.0.8
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -593,15 +593,29 @@ function n4(t3) {
593
593
  // src/styles.ts
594
594
  var styles = i`
595
595
  :host {
596
+ --nav-bar-width: 260px;
597
+
596
598
  display: block;
597
599
  height: 100vh;
598
- max-width: 260px;
600
+ }
601
+
602
+ * {
603
+ box-sizing: border-box;
599
604
  }
600
605
 
601
606
  nav {
607
+ min-width: var(--nav-bar-width);
608
+ width: var(--nav-bar-width);
609
+ min-height: 100vh;
610
+ height: max-content;
602
611
  display: flex;
612
+ align-items: start;
613
+ gap: var(--space-scale-3-5);
603
614
  flex-direction: column;
604
- height: 100%;
615
+ background-color: var(--color-surface-inverted-100);
616
+ color: var(--color-text-inverted-400);
617
+ padding-top: var(--space-scale-2);
618
+ padding-bottom: var(--space-scale-2);
605
619
  }
606
620
 
607
621
  nav details div {
@@ -610,11 +624,129 @@ var styles = i`
610
624
  }
611
625
 
612
626
  hr {
613
- background: black;
614
627
  width: 100%;
615
628
  height: 1px;
629
+ background-color: var(--color-surface-inverted-200);
616
630
  border: none;
617
631
  }
632
+
633
+ #tertiary-nav {
634
+ display: flex;
635
+ flex-direction: column;
636
+ margin-top: auto;
637
+ gap: var(--space-scale-2);
638
+ width: 100%;
639
+
640
+ .external-link {
641
+ font-size: var(--font-size-100);
642
+ line-height: var(--font-line-height-100);
643
+
644
+ .icon {
645
+ width: var(--space-scale-2);
646
+ height: var(--space-scale-2);
647
+ }
648
+ }
649
+ }
650
+
651
+ .icon {
652
+ width: var(--space-scale-3);
653
+ height: var(--space-scale-3);
654
+ display: inline;
655
+ color: var(--nav-item-color);
656
+ }
657
+
658
+ a {
659
+ font-size: var(--font-size-100);
660
+ line-height: var(--font-line-height-100);
661
+ gap: var(--space-scale-1-5);
662
+ border-radius: var(--border-radius-100);
663
+ color: var(--nav-item-color);
664
+ text-decoration: none;
665
+ padding: var(--space-scale-1);
666
+ width: 100%;
667
+ }
668
+
669
+ details {
670
+ width: 100%;
671
+ border-radius: var(--border-radius-100);
672
+
673
+ summary {
674
+ font-size: var(--font-size-100);
675
+ line-height: var(--font-line-height-100);
676
+ position: relative;
677
+ display: flex;
678
+ align-items: baseline;
679
+
680
+ &::marker {
681
+ content: '';
682
+ }
683
+ }
684
+
685
+ svg.chevron {
686
+ margin-left: auto;
687
+ margin-right: var(--space-scale-1);
688
+ width: var(--space-scale-2);
689
+ }
690
+
691
+ &[open] svg.chevron {
692
+ transform: rotate(180deg);
693
+ }
694
+
695
+ .dropdown-items {
696
+ display: flex;
697
+ flex-direction: column;
698
+ }
699
+ }
700
+
701
+ details > summary {
702
+ display: flex;
703
+ gap: var(--space-scale-1-5);
704
+ padding: var(--space-scale-1);
705
+ border-radius: var(--border-radius-100);
706
+ color: var(--nav-item-color);
707
+ align-items: center;
708
+
709
+ a {
710
+ color: var(--nav-item-color);
711
+ }
712
+
713
+ &:hover,
714
+ &:focus-visible {
715
+ background-color: var(--color-surface-inverted-200);
716
+ border-radius: var(--border-radius-100);
717
+ text-decoration: none;
718
+ }
719
+ }
720
+
721
+ .sub-nav-item {
722
+ padding-left: 44px;
723
+ padding-top: 10px;
724
+ padding-bottom: 10px;
725
+ color: var(--color-text-inverted-400);
726
+ font-size: var(--font-size-100);
727
+ line-height: var(--font-line-height-100);
728
+
729
+ button {
730
+ color: var(--color-text-inverted-400);
731
+ padding: 0;
732
+ }
733
+ }
734
+
735
+ .sub-nav-item:hover,
736
+ .sub-nav-item:focus-visible,
737
+ a:hover,
738
+ a:focus-visible {
739
+ background-color: var(--color-surface-inverted-200);
740
+ border-radius: var(--border-radius-100);
741
+ text-decoration: none;
742
+ color: var(--color-text-inverted-400);
743
+
744
+ .icon {
745
+ color: var(--color-text-inverted-400);
746
+ }
747
+ }
748
+
749
+
618
750
  `;
619
751
 
620
752
  // src/TtNavbar.ts