ada-ui 4.6.0 → 5.0.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.
@@ -1,107 +1,31 @@
1
1
  @import "ada.theme-base";
2
2
 
3
- .primary {
4
- @extend %colourShades;
5
-
6
- // old one, more blue-greenish
7
- //--h: 197;
8
- //--s: 100%;
9
- //--l: 19%;
10
- //--h-light: 197;
11
- //--s-light: 100%;
12
- //--l-light: 40%;
13
-
14
- --h: 205;
15
- --s: 80%;
16
- --l: 23%;
17
- --h-light: 205;
18
- --s-light: 80%;
19
- --l-light: 40%;
20
-
21
- --h-fg: var(--h);
22
- --s-fg: 100%;
23
- --l-fg: 89%;
24
- }
25
-
26
3
  :root {
4
+ //Defaults to primary color
27
5
  @extend .primary;
28
- // old one, more blue-greenish
29
- //--bg: hsl(197, 80%, 7%);
30
- --bg: hsl(207, 61%, 7%);
31
6
  }
32
7
 
33
- .shade1 {
8
+ .primary {
34
9
  @extend %colourShades;
35
-
36
- --h: 198;
37
- --s: 90%;
38
- --l: 30%;
39
- --h-light: 198;
40
- --s-light: 90%;
41
- --l-light: 58%;
42
-
43
- --h-fg: var(--h);
44
- --s-fg: 100%;
45
- --l-fg: 89%;
10
+ --hue: 246;
46
11
  }
47
12
 
48
- .shade2 {
13
+ .shade1 {
49
14
  @extend %colourShades;
50
-
51
- // old one, more blue-greenish
52
- //--h: 165;
53
- //--s: 90%;
54
- //--l: 20%;
55
- //--h-light: 165;
56
- //--s-light: 90%;
57
- //--l-light: 40%;
58
-
59
- --h: 185;
60
- --s: 50%;
61
- --l: 30%;
62
- --h-light: 185;
63
- --s-light: 50%;
64
- --l-light: 50%;
65
-
66
- --h-fg: var(--h);
67
- --s-fg: 100%;
68
- --l-fg: 89%;
15
+ --hue: 225;
69
16
  }
70
17
 
71
- .accent {
18
+ .shade3 {
72
19
  @extend %colourShades;
20
+ --hue: 165;
21
+ }
73
22
 
74
- // old one
75
- //--h: 11;
76
- //--s: 74%;
77
- //--l: 45%;
78
- //--h-light: 10;
79
- //--s-light: 89%;
80
- //--l-light: 56%;
81
-
82
- --h: 146;
83
- --s: 58%;
84
- --l: 20%;
85
- --h-light: 146;
86
- --s-light: 58%;
87
- --l-light: 48%;
88
-
89
- --h-fg: var(--h);
90
- --s-fg: 100%;
91
- --l-fg: 89%;
23
+ .shade2 {
24
+ @extend %colourShades;
25
+ --hue: 190;
92
26
  }
93
27
 
94
28
  .warn {
95
29
  @extend %colourShades;
96
-
97
- --h: 0;
98
- --s: 100%;
99
- --l: 28%;
100
- --h-light: 0;
101
- --s-light: 85%;
102
- --l-light: 48%;
103
-
104
- --h-fg: var(--h);
105
- --s-fg: 100%;
106
- --l-fg: 89%;
30
+ --hue: 29;
107
31
  }
@@ -1,90 +1 @@
1
- @import "ada.theme-base";
2
-
3
- .primary {
4
- @extend %colourShades;
5
-
6
- --h: 105;
7
- --s: 50%;
8
- --l: 24%;
9
- --h-light: 102;
10
- --s-light: 72%;
11
- //actual, designer-correct
12
- //--l-light: 49%;
13
- --l-light: 34%;
14
-
15
- --h-fg: var(--h);
16
- --s-fg: 100%;
17
- --l-fg: 89%;
18
- }
19
-
20
- :root {
21
- @extend .primary;
22
- --bg: hsl(135, 34%, 12%);
23
- }
24
-
25
- .shade1 {
26
- @extend %colourShades;
27
- --h: 150;
28
- --s: 70%;
29
- --l: 20%;
30
- --h-light: 133;
31
- --s-light: 82%;
32
- //actual, designer-correct
33
- //--l-light: 43%;
34
- --l-light: 30%;
35
-
36
- --h-fg: var(--h);
37
- --s-fg: 100%;
38
- --l-fg: 89%;
39
- }
40
-
41
- .shade2 {
42
- @extend %colourShades;
43
- --h: 168;
44
- --s: 57%;
45
- --l: 32%;
46
- --h-light: 167;
47
- --s-light: 68%;
48
- //actual, designer-correct
49
- //--l-light: 59%;
50
- --l-light: 40%;
51
-
52
- // darker version
53
- //--h: 165;
54
- //--s: 66%;
55
- //--l: 24%;
56
-
57
- --h-fg: var(--h);
58
- --s-fg: 100%;
59
- --l-fg: 89%;
60
- }
61
-
62
- .accent {
63
- @extend %colourShades;
64
-
65
- --h: 11;
66
- --s: 74%;
67
- --l: 45%;
68
- --h-light: 10;
69
- --s-light: 89%;
70
- --l-light: 56%;
71
-
72
- --h-fg: var(--h);
73
- --s-fg: 100%;
74
- --l-fg: 89%;
75
- }
76
-
77
- .warn {
78
- @extend %colourShades;
79
-
80
- --h: 0;
81
- --s: 100%;
82
- --l: 28%;
83
- --h-light: 0;
84
- --s-light: 85%;
85
- --l-light: 48%;
86
-
87
- --h-fg: var(--h);
88
- --s-fg: 100%;
89
- --l-fg: 89%;
90
- }
1
+ //wip
package/scss/ada.scss CHANGED
@@ -1,53 +1,7 @@
1
- $font-family: "Open Sans", sans-serif !default;
2
- $box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
3
-
4
- @mixin desktop() {
5
- @media screen and (min-width: 1200px) {
6
- @content;
7
- }
8
- }
9
-
10
- @mixin tablet() {
11
- @media screen and (max-width: 1199px) {
12
- @content;
13
- }
14
- }
15
-
16
- *,
17
- ::before,
18
- ::after {
19
- box-sizing: border-box;
20
- }
21
-
22
- html {
23
- font-size: 14px;
24
- font-family: $font-family;
25
- font-weight: 400;
26
- @include tablet {
27
- font-size: 12px;
28
- }
29
- }
30
-
31
- html,
32
- body {
33
- height: 100%;
34
- min-height: 100%;
35
- margin: 0;
36
- padding: 0;
37
- background: var(--bg);
38
- color: var(--fg);
39
- }
40
-
41
- body {
42
- font-size: 1rem;
43
- -webkit-tap-highlight-color: transparent;
44
- padding: 0.5rem;
45
- }
46
-
1
+ @import "reset";
2
+ @import "global";
47
3
  @import "typography";
48
- @import "button";
4
+ @import "command";
49
5
  @import "input";
50
6
  @import "panel";
51
- @import "commands";
52
- @import "tile";
53
7
  @import "spinner";
@@ -0,0 +1,111 @@
1
+ @import "ada.theme-base";
2
+
3
+ .primary {
4
+ @extend %colourShades;
5
+
6
+ // old one, more blue-greenish
7
+ //--h: 197;
8
+ //--s: 100%;
9
+ //--l: 19%;
10
+ //--h-light: 197;
11
+ //--s-light: 100%;
12
+ //--l-light: 40%;
13
+
14
+ --h: 205;
15
+ --s: 80%;
16
+ --l: 23%;
17
+ --h-light: 205;
18
+ --s-light: 80%;
19
+ --l-light: 40%;
20
+
21
+ --h-fg: var(--h);
22
+ --s-fg: 100%;
23
+ --l-fg: 89%;
24
+
25
+ //lch test
26
+ //--default: lch(26 29 260);
27
+ //--default-alpha70: lch(18 20 260);
28
+ }
29
+
30
+ :root {
31
+ @extend .primary;
32
+ // old one, more blue-greenish
33
+ //--bg: hsl(197, 80%, 7%);
34
+ --bg: hsl(207, 61%, 7%);
35
+ }
36
+
37
+ .shade1 {
38
+ @extend %colourShades;
39
+
40
+ --h: 198;
41
+ --s: 90%;
42
+ --l: 30%;
43
+ --h-light: 198;
44
+ --s-light: 90%;
45
+ --l-light: 58%;
46
+
47
+ --h-fg: var(--h);
48
+ --s-fg: 100%;
49
+ --l-fg: 89%;
50
+ }
51
+
52
+ .shade2 {
53
+ @extend %colourShades;
54
+
55
+ // old one, more blue-greenish
56
+ //--h: 165;
57
+ //--s: 90%;
58
+ //--l: 20%;
59
+ //--h-light: 165;
60
+ //--s-light: 90%;
61
+ //--l-light: 40%;
62
+
63
+ --h: 185;
64
+ --s: 50%;
65
+ --l: 30%;
66
+ --h-light: 185;
67
+ --s-light: 50%;
68
+ --l-light: 50%;
69
+
70
+ --h-fg: var(--h);
71
+ --s-fg: 100%;
72
+ --l-fg: 89%;
73
+ }
74
+
75
+ .accent {
76
+ @extend %colourShades;
77
+
78
+ // old one
79
+ //--h: 11;
80
+ //--s: 74%;
81
+ //--l: 45%;
82
+ //--h-light: 10;
83
+ //--s-light: 89%;
84
+ //--l-light: 56%;
85
+
86
+ --h: 146;
87
+ --s: 58%;
88
+ --l: 20%;
89
+ --h-light: 146;
90
+ --s-light: 58%;
91
+ --l-light: 48%;
92
+
93
+ --h-fg: var(--h);
94
+ --s-fg: 100%;
95
+ --l-fg: 89%;
96
+ }
97
+
98
+ .warn {
99
+ @extend %colourShades;
100
+
101
+ --h: 0;
102
+ --s: 100%;
103
+ --l: 28%;
104
+ --h-light: 0;
105
+ --s-light: 85%;
106
+ --l-light: 48%;
107
+
108
+ --h-fg: var(--h);
109
+ --s-fg: 100%;
110
+ --l-fg: 89%;
111
+ }
@@ -0,0 +1,90 @@
1
+ @import "ada.theme-base";
2
+
3
+ .primary {
4
+ @extend %colourShades;
5
+
6
+ --h: 105;
7
+ --s: 50%;
8
+ --l: 24%;
9
+ --h-light: 102;
10
+ --s-light: 72%;
11
+ //actual, designer-correct
12
+ //--l-light: 49%;
13
+ --l-light: 34%;
14
+
15
+ --h-fg: var(--h);
16
+ --s-fg: 100%;
17
+ --l-fg: 89%;
18
+ }
19
+
20
+ :root {
21
+ @extend .primary;
22
+ --bg: hsl(135, 34%, 12%);
23
+ }
24
+
25
+ .shade1 {
26
+ @extend %colourShades;
27
+ --h: 150;
28
+ --s: 70%;
29
+ --l: 20%;
30
+ --h-light: 133;
31
+ --s-light: 82%;
32
+ //actual, designer-correct
33
+ //--l-light: 43%;
34
+ --l-light: 30%;
35
+
36
+ --h-fg: var(--h);
37
+ --s-fg: 100%;
38
+ --l-fg: 89%;
39
+ }
40
+
41
+ .shade2 {
42
+ @extend %colourShades;
43
+ --h: 168;
44
+ --s: 57%;
45
+ --l: 32%;
46
+ --h-light: 167;
47
+ --s-light: 68%;
48
+ //actual, designer-correct
49
+ //--l-light: 59%;
50
+ --l-light: 40%;
51
+
52
+ // darker version
53
+ //--h: 165;
54
+ //--s: 66%;
55
+ //--l: 24%;
56
+
57
+ --h-fg: var(--h);
58
+ --s-fg: 100%;
59
+ --l-fg: 89%;
60
+ }
61
+
62
+ .accent {
63
+ @extend %colourShades;
64
+
65
+ --h: 11;
66
+ --s: 74%;
67
+ --l: 45%;
68
+ --h-light: 10;
69
+ --s-light: 89%;
70
+ --l-light: 56%;
71
+
72
+ --h-fg: var(--h);
73
+ --s-fg: 100%;
74
+ --l-fg: 89%;
75
+ }
76
+
77
+ .warn {
78
+ @extend %colourShades;
79
+
80
+ --h: 0;
81
+ --s: 100%;
82
+ --l: 28%;
83
+ --h-light: 0;
84
+ --s-light: 85%;
85
+ --l-light: 48%;
86
+
87
+ --h-fg: var(--h);
88
+ --s-fg: 100%;
89
+ --l-fg: 89%;
90
+ }
@@ -0,0 +1,92 @@
1
+ //Moved to _command.scss
2
+ //@mixin button {
3
+ //overflow: hidden;
4
+ //outline: none;
5
+ //color: var(--fg100);
6
+ //font-family: inherit;
7
+ //cursor: pointer;
8
+ //user-select: none;
9
+ //vertical-align: middle;
10
+ //transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
11
+
12
+ //&:disabled {
13
+ //opacity: 0.4;
14
+ //filter: saturate(0.6);
15
+ //cursor: default;
16
+ //pointer-events: none;
17
+ //}
18
+ //}
19
+
20
+ .button {
21
+ @include button;
22
+ white-space: nowrap;
23
+ text-overflow: ellipsis;
24
+ border-radius: 0.3rem;
25
+ box-shadow: var(--box-shadow);
26
+ border: var(--border-width-sm) solid var(--bg700);
27
+ background-color: transparent;
28
+ min-height: min-content;
29
+ padding: 0.6rem 1rem;
30
+ font-size: 1.1rem;
31
+
32
+ &.fill {
33
+ background-color: var(--bg800);
34
+ }
35
+ &:focus {
36
+ border: var(--border-width-sm) solid var(--bg600);
37
+ }
38
+ &:hover {
39
+ // stays after click on touch devices
40
+ // TODO: only for non-touch devices
41
+ // /*background-color: var(--bg700);*/
42
+ }
43
+ &:active {
44
+ background-color: var(--light);
45
+ border: var(--border-width-sm) solid var(--default-alpha40);
46
+ }
47
+ }
48
+
49
+ .button-compound {
50
+ display: inline-flex;
51
+ gap: var(--gap-sm);
52
+ box-shadow: var(--box-shadow);
53
+
54
+ & > .button {
55
+ @extend .fill;
56
+ box-shadow: none;
57
+
58
+ // Use color level from new lch palette instead of alpha
59
+ //&.dim {
60
+ //background-color: var(--default-alpha40);
61
+ //&:focus {
62
+ //border-color: var(--bg700);
63
+ //}
64
+
65
+ //&:active {
66
+ //background-color: var(--bg700);
67
+ //}
68
+ //}
69
+
70
+ &:empty {
71
+ width: 3rem;
72
+ }
73
+
74
+ &:first-child {
75
+ border-top-right-radius: 0;
76
+ border-bottom-right-radius: 0;
77
+ border-right: none;
78
+ }
79
+
80
+ &:not(:first-child):not(:last-child) {
81
+ border-radius: 0;
82
+ border-left: none;
83
+ border-right: none;
84
+ }
85
+
86
+ &:last-child {
87
+ border-top-left-radius: 0;
88
+ border-bottom-left-radius: 0;
89
+ border-left: none;
90
+ }
91
+ }
92
+ }
@@ -8,7 +8,7 @@
8
8
  font-size: 1.1rem;
9
9
  border-style: solid;
10
10
  border-color: transparent;
11
- border-width: 0 0 0 2px;
11
+ border-width: 0 0 0 var(--border-width);
12
12
  padding: 0.2rem 0.4rem 0.2rem 1rem;
13
13
 
14
14
  &.flash {
@@ -16,11 +16,11 @@
16
16
  }
17
17
 
18
18
  &:focus {
19
- border-color: var(--light-alpha70);
19
+ border-color: var(--bg600);
20
20
  }
21
21
 
22
22
  &:active {
23
- background-color: var(--light-alpha70);
23
+ background-color: var(--bg600);
24
24
  animation-play-state: paused;
25
25
  }
26
26
  }
@@ -28,26 +28,20 @@
28
28
  .commands {
29
29
  position: relative;
30
30
  display: grid;
31
- gap: 6px;
32
- margin: 0.5rem;
31
+ gap: var(--command-gap);
33
32
 
34
33
  &:before,
35
34
  &:after {
36
- box-shadow: $box-shadow;
35
+ box-shadow: var(--box-shadow);
37
36
  position: absolute;
38
37
  content: "";
39
- background: var(--default-alpha70);
38
+ background: var(--bg900);
40
39
  }
41
40
 
42
41
  &:not(.vertical) {
43
- @extend %h2;
44
42
  grid-auto-flow: column;
45
- text-align: center;
46
- align-items: center;
47
- line-height: 3.6rem;
48
- height: 3.6rem;
49
- padding-left: 1.5rem;
50
- padding-right: 1.5rem;
43
+ padding-left: calc(1rem + var(--command-gap));
44
+ padding-right: calc(1rem + var(--command-gap));
51
45
 
52
46
  &:before,
53
47
  &:after {
@@ -74,8 +68,8 @@
74
68
  &.vertical {
75
69
  grid-auto-flow: row;
76
70
  min-width: 12rem;
77
- padding-top: 1.5rem;
78
- padding-bottom: 1.5rem;
71
+ padding-top: calc(1rem + var(--command-gap));
72
+ padding-bottom: calc(1rem + var(--command-gap));
79
73
 
80
74
  &:before,
81
75
  &:after {
@@ -97,13 +91,24 @@
97
91
  > div {
98
92
  min-height: 3.6rem;
99
93
  }
94
+
95
+ // attempt for mobile view
96
+ //@media screen and (max-width: 768px) {
97
+ //min-width: 2rem;
98
+ //width: 3.6rem;
99
+ //> button,
100
+ //> div {
101
+ //min-width: auto;
102
+ //color: transparent;
103
+ //}
104
+ //}
100
105
  }
101
106
 
102
107
  > button,
103
108
  > div {
104
109
  box-sizing: border-box;
105
- background-color: var(--default-alpha70);
106
- box-shadow: $box-shadow;
110
+ background-color: var(--bg900);
111
+ box-shadow: var(--box-shadow);
107
112
  }
108
113
 
109
114
  > button {
@@ -115,8 +120,9 @@
115
120
  }
116
121
  }
117
122
 
118
- @keyframes flash {
119
- 50% {
120
- background-color: var(--light-alpha70);
121
- }
122
- }
123
+ //Old, has been moved to _command.scss
124
+ //@keyframes flash {
125
+ //50% {
126
+ //background-color: var(--bg600);
127
+ //}
128
+ //}