@basis-ng/styles 0.0.1-alpha.7 → 0.0.1-alpha.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-ng/styles",
3
- "version": "0.0.1-alpha.7",
3
+ "version": "0.0.1-alpha.71",
4
4
  "description": "CSS foundation for @basis-ng/primitives components",
5
5
  "main": "src/index.css",
6
6
  "exports": {
@@ -8,7 +8,7 @@
8
8
  "./alert": "./src/components/alert.component.css",
9
9
  "./attached-box": "./src/components/attached-box.component.css",
10
10
  "./badge": "./src/components/badge.component.css",
11
- "./bottom-sheet": "./src/components/bottom-sheet.component.css",
11
+ "./drawer": "./src/components/drawer.component.css",
12
12
  "./button-group": "./src/components/button-group.component.css",
13
13
  "./button": "./src/components/button.component.css",
14
14
  "./checkbox": "./src/components/checkbox.component.css",
@@ -31,7 +31,7 @@
31
31
  "./select": "./src/components/select.component.css",
32
32
  "./select-content": "./src/components/select-content.component.css",
33
33
  "./select-option": "./src/components/select-option.component.css",
34
- "./side-sheet": "./src/components/side-sheet.component.css",
34
+ "./sheet": "./src/components/sheet.component.css",
35
35
  "./spinner": "./src/components/spinner.component.css",
36
36
  "./switch": "./src/components/switch.component.css",
37
37
  "./tab": "./src/components/tab.component.css",
@@ -40,7 +40,8 @@
40
40
  "./textarea": "./src/components/textarea.component.css",
41
41
  "./tooltip": "./src/components/tooltip.component.css",
42
42
  "./tree-node": "./src/components/tree-node.component.css",
43
- "./tree": "./src/components/tree.component.css"
43
+ "./tree": "./src/components/tree.component.css",
44
+ "./dialog": "./src/components/dialog.component.css"
44
45
  },
45
46
  "files": [
46
47
  "src/**/*.css"
@@ -7,16 +7,11 @@ button[b-button] {
7
7
  box-sizing: border-box;
8
8
  gap: 0.5rem;
9
9
  position: relative;
10
- overflow: hidden;
11
- transition:
12
- background-color 0.2s,
13
- opacity 0.2s;
14
- font-size: 100%;
15
10
  border: none;
16
11
  text-decoration: none;
17
12
  font-family: 'Geist', sans-serif;
18
- --padding-inline-multiple: 1.5;
19
- --border-px: 0px;
13
+ border-style: solid;
14
+ border-width: 1px;
20
15
 
21
16
  &:focus-visible {
22
17
  outline: 2px solid var(--primary, #0a0a0a);
@@ -24,14 +19,14 @@ button[b-button] {
24
19
  }
25
20
 
26
21
  &.primary,
27
- &.outlined {
28
- --border-px: 1px;
22
+ &.secondary {
23
+ box-shadow: rgba(0, 0, 0, 0.04) 0px 2px 2px 0px;
29
24
  }
30
25
 
31
26
  &.primary {
32
27
  background-color: var(--primary, #0a0a0a);
33
28
  color: var(--primary-foreground, #ffffff);
34
- border: var(--border-px) solid var(--primary-border-color, #0a0a0a);
29
+ border-color: var(--primary-border-color, #0a0a0a);
35
30
 
36
31
  @media (width > 768px) {
37
32
  &:hover {
@@ -54,6 +49,8 @@ button[b-button] {
54
49
 
55
50
  &.secondary {
56
51
  background-color: var(--secondary);
52
+ color: var(--secondary-foreground, #0a0a0a);
53
+ border-color: var(--secondary-border-color, #ececec);
57
54
 
58
55
  @media (width > 768px) {
59
56
  &:hover {
@@ -76,6 +73,7 @@ button[b-button] {
76
73
 
77
74
  &.ghost {
78
75
  background-color: transparent;
76
+ border-color: transparent;
79
77
 
80
78
  @media (width > 768px) {
81
79
  &:hover {
@@ -98,7 +96,7 @@ button[b-button] {
98
96
 
99
97
  &.outlined {
100
98
  background-color: var(--background, #ffffff);
101
- border: var(--border-px) solid var(--border-color, #ececec);
99
+ border-color: var(--border-color, #ececec);
102
100
 
103
101
  @media (width > 768px) {
104
102
  &:hover {
@@ -147,33 +145,36 @@ button[b-button] {
147
145
  pointer-events: none;
148
146
  }
149
147
 
150
- &.size-small {
151
- --vertical-padding: calc(0.5rem - (var(--border-px) * 2));
152
- --horizontal-padding: clamp(
153
- 0.75rem,
154
- calc(0.5rem + var(--radius, 0.5rem) / 2),
155
- 1.25rem
156
- );
157
- font-size: 0.875rem;
158
- padding: var(--vertical-padding) var(--horizontal-padding);
159
-
160
- &.equal-padding {
161
- padding: var(--vertical-padding);
148
+ &.size-1 {
149
+ padding: 0.215rem 0.5rem;
150
+ min-height: 1.714rem;
151
+ font-size: 0.857rem;
152
+
153
+ &.squared {
154
+ width: 1.714rem;
155
+ min-width: 1.714rem;
162
156
  }
163
157
  }
164
158
 
165
- &.size-default {
166
- --vertical-padding: calc(0.9rem - (var(--border-px) * 2));
167
- --horizontal-padding: clamp(
168
- 1rem,
169
- calc(0.75rem + var(--radius, 0.5rem) / 2),
170
- 1.5rem
171
- );
159
+ &.size-2 {
160
+ padding: 0.4rem 0.75rem;
161
+ min-height: 2.286rem;
172
162
  font-size: 1rem;
173
- padding: var(--vertical-padding) var(--horizontal-padding);
174
163
 
175
- &.equal-padding {
176
- padding: var(--vertical-padding);
164
+ &.squared {
165
+ width: 2.286rem;
166
+ min-width: 2.286rem;
167
+ }
168
+ }
169
+
170
+ &.size-3 {
171
+ padding: 0.608rem 1rem;
172
+ min-height: 2.857rem;
173
+ font-size: 1.143rem;
174
+
175
+ &.squared {
176
+ width: 2.857rem;
177
+ min-width: 2.857rem;
177
178
  }
178
179
  }
179
180
  }
@@ -0,0 +1,37 @@
1
+ b-card {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 1.5rem;
5
+ padding: 1.5rem;
6
+ background-color: var(--background);
7
+ border: 1px solid var(--border-color);
8
+ border-radius: var(--radius);
9
+
10
+ b-card-header {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: 0.5rem;
14
+
15
+ b-card-title {
16
+ font-size: 1.3rem;
17
+ font-weight: bold;
18
+ }
19
+
20
+ b-card-description {
21
+ font-size: 1rem;
22
+ opacity: 0.7;
23
+ }
24
+ }
25
+
26
+ b-card-content {
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: 0.5rem;
30
+ }
31
+
32
+ b-card-footer {
33
+ display: flex;
34
+ justify-content: flex-end;
35
+ gap: 1rem;
36
+ }
37
+ }
@@ -1,4 +1,4 @@
1
- ul[b-select-content] {
1
+ ul[b-combobox-options] {
2
2
  list-style: none;
3
3
  padding: 0.2rem;
4
4
  box-sizing: border-box;
@@ -0,0 +1,62 @@
1
+ b-combobox {
2
+ button {
3
+ display: flex;
4
+ justify-content: space-between !important;
5
+ align-items: center;
6
+ text-align: start;
7
+ padding-right: 0.5rem !important;
8
+ width: 100%;
9
+ gap: 0.3rem !important;
10
+ }
11
+ }
12
+
13
+ .cdk-overlay-pane b-command {
14
+ /* Overlay Animations */
15
+ opacity: 0;
16
+
17
+ &.b-overlay-bottom,
18
+ &.b-overlay-top,
19
+ &.b-overlay-left,
20
+ &.b-overlay-right {
21
+ transition:
22
+ transform 150ms ease-in-out,
23
+ opacity 150ms ease-in-out;
24
+ opacity: 1;
25
+ }
26
+
27
+ &.b-overlay-bottom {
28
+ transform: translateY(5px);
29
+
30
+ &.b-overlay-leave {
31
+ transform: translateY(0);
32
+ opacity: 0;
33
+ }
34
+ }
35
+
36
+ &.b-overlay-top {
37
+ transform: translateY(-5px);
38
+
39
+ &.b-overlay-leave {
40
+ transform: translateY(0);
41
+ opacity: 0;
42
+ }
43
+ }
44
+
45
+ &.b-overlay-left {
46
+ transform: translateX(-5px);
47
+
48
+ &.b-overlay-leave {
49
+ transform: translateX(0);
50
+ opacity: 0;
51
+ }
52
+ }
53
+
54
+ &.b-overlay-right {
55
+ transform: translateX(5px);
56
+
57
+ &.b-overlay-leave {
58
+ transform: translateX(0);
59
+ opacity: 0;
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,13 @@
1
+ ul[b-command-options] {
2
+ list-style: none;
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ position: relative;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.25rem;
9
+ width: 100%;
10
+ overflow-y: auto;
11
+ padding: 0;
12
+ scrollbar-width: thin;
13
+ }
@@ -0,0 +1,25 @@
1
+ b-command {
2
+ padding: 0.25rem;
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ position: relative;
6
+ background: var(--background, #ffffff);
7
+ box-shadow: 0 0 0.25rem 0.125rem rgba(1, 1, 1, 0.01);
8
+ border-radius: clamp(0rem, var(--radius, 0.5rem), 0.5rem);
9
+ border: 1px solid
10
+ color-mix(
11
+ in srgb,
12
+ var(--foreground, #798194) 10%,
13
+ var(--background, #ffffff)
14
+ );
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 0.25rem;
18
+ width: 100%;
19
+
20
+ input {
21
+ &:focus-visible {
22
+ outline: none !important;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,41 @@
1
+ b-dialog {
2
+ animation: b-dialog-enter 150ms ease-in-out;
3
+
4
+ &.leaving {
5
+ transform: scale(0.9);
6
+ opacity: 0;
7
+ transition:
8
+ transform 150ms ease-in-out,
9
+ opacity 150ms ease-in-out;
10
+ }
11
+ }
12
+
13
+ .b-dialog-backdrop {
14
+ background-color: rgba(0, 0, 0, 0.08);
15
+ animation: b-dialog-backdrop-enter 150ms ease-in-out;
16
+ }
17
+
18
+ :has(b-dialog.leaving) .b-dialog-backdrop {
19
+ opacity: 0;
20
+ transition: opacity 150ms ease-in-out;
21
+ }
22
+
23
+ @keyframes b-dialog-enter {
24
+ 0% {
25
+ opacity: 0;
26
+ transform: scale(0.9);
27
+ }
28
+ 100% {
29
+ opacity: 1;
30
+ transform: scale(1);
31
+ }
32
+ }
33
+
34
+ @keyframes b-dialog-backdrop-enter {
35
+ 0% {
36
+ opacity: 0;
37
+ }
38
+ 100% {
39
+ opacity: 1;
40
+ }
41
+ }
@@ -1,4 +1,4 @@
1
- b-bottom-sheet {
1
+ b-drawer {
2
2
  position: fixed;
3
3
  bottom: 0;
4
4
  left: 0;
@@ -44,6 +44,6 @@ b-bottom-sheet {
44
44
  }
45
45
  }
46
46
 
47
- html:has(b-bottom-sheet.open) {
47
+ html:has(b-drawer.open) {
48
48
  overflow: hidden;
49
49
  }
@@ -1,110 +1,80 @@
1
1
  b-input-group {
2
- --exterior-padding: clamp(
3
- 1rem,
4
- calc(0.75rem + var(--radius, 0.5rem) / 2),
5
- 1.3rem
6
- );
7
-
8
- width: 100%;
9
- background-color: var(--input-background);
10
- border-radius: var(--radius, 0.5rem);
11
- box-sizing: border-box;
12
- border-width: 1px;
13
- border-style: solid;
14
- border-color: var(--border-color, transparent);
15
- transition:
16
- opacity 0.2s,
17
- padding-top 0.2s,
18
- padding-bottom 0.2s,
19
- background-color 0.2s,
20
- border-color 0.2s;
21
- font-size: 1rem;
22
- color: var(--input-foreground, #798194);
23
2
  display: flex;
24
3
  align-items: center;
4
+ border-radius: var(--radius);
5
+ box-sizing: border-box;
6
+ background-color: var(--input-background);
7
+ border: 1px solid var(--border-color);
25
8
 
26
- &:has(> *.ng-invalid) {
27
- color: var(--error-foreground, #c40000ab);
28
- background-color: var(--error, #fff0f0);
29
- border-color: var(--error-border-color, #c40000ab);
9
+ input[b-input] {
10
+ border-left: 0;
11
+ border-right: 0;
12
+ outline-width: 0 !important;
13
+ padding: 0 !important;
14
+ border-radius: 0 !important;
15
+ width: 100%;
16
+ }
30
17
 
31
- i svg {
32
- stroke: var(--error-foreground, #c40000ab);
33
- }
18
+ &:has(input[b-input]:focus-visible) {
19
+ outline: 2px solid var(--primary);
20
+ outline-offset: 2px;
34
21
 
35
- button {
36
- color: var(--error-foreground, #c40000ab);
37
- background-color: var(--error, #fff0f0);
22
+ &:has(.ng-invalid) {
23
+ outline-color: var(--error-foreground);
38
24
  }
39
25
  }
40
26
 
41
- select,
42
- input,
43
- button,
44
- b-label input,
45
- b-label select {
46
- border-radius: 0px !important;
47
- border-width: 0px !important;
27
+ input[b-input]:disabled {
28
+ opacity: 0.5;
29
+ pointer-events: none;
48
30
  }
49
31
 
50
- &:not(:has(b-label)) select:not(:first-child),
51
- &:not(:has(b-label)) input:not(:first-child),
52
- button:not(:first-child),
53
- b-label:not(:first-child) input,
54
- b-label:not(:first-child) select {
55
- padding-left: 0.8rem !important;
56
- }
32
+ &:has(input[b-input].ng-invalid.ng-touched) {
33
+ color: var(--error-foreground);
34
+ background-color: var(--error);
35
+ border-color: var(--error-border-color);
57
36
 
58
- b-label:not(:first-child) label {
59
- left: 0.8rem !important;
60
- }
37
+ button[b-button] {
38
+ color: var(--error-foreground);
39
+ background-color: var(--error);
40
+ border: 1px solid var(--error-border-color);
41
+ }
61
42
 
62
- &:not(:has(b-label)) select:not(:last-child),
63
- &:not(:has(b-label)) input:not(:last-child),
64
- button:not(:last-child),
65
- b-label:not(:last-child) input,
66
- b-label:not(:last-child) select {
67
- padding-right: 0.8rem !important;
43
+ i svg {
44
+ stroke: var(--error-foreground);
45
+ }
68
46
  }
69
47
 
70
- input:first-child,
71
- button:first-child,
72
- b-label:first-child input,
73
- b-label:first-child select select:first-child,
74
- input:first-child,
75
- button:first-child,
76
- b-label:first-child input,
77
- b-label:first-child select {
78
- border-top-left-radius: var(--radius) !important;
79
- border-bottom-left-radius: var(--radius) !important;
48
+ &:has(.size-1) {
49
+ padding: 0.357rem 0.5rem;
50
+ height: 1.714rem;
51
+ gap: 0.5rem;
52
+ font-size: 0.857rem;
80
53
  }
81
54
 
82
- select:last-child,
83
- input:last-child,
84
- button:last-child,
85
- b-label:last-child input,
86
- b-label:last-child select {
87
- border-top-right-radius: var(--radius) !important;
88
- border-bottom-right-radius: var(--radius) !important;
55
+ &:has(.size-2) {
56
+ padding: 0.5rem 0.75rem;
57
+ height: 2.286rem;
58
+ gap: 0.75rem;
59
+ font-size: 1rem;
89
60
  }
90
61
 
91
- span:first-child,
92
- & > i:first-child {
93
- padding-inline: var(--exterior-padding) 0;
62
+ &:has(.size-3) {
63
+ padding: 0.786rem 1rem;
64
+ min-height: 2.857rem;
65
+ gap: 1rem;
66
+ font-size: 1.143rem;
94
67
  }
95
68
 
96
- span:last-child,
97
- & > i:last-child {
98
- padding-inline: 0 var(--exterior-padding);
69
+ &:has(button[b-button]:last-child) {
70
+ padding-right: 0.22rem;
99
71
  }
100
72
 
101
- button {
102
- height: 100%;
103
- max-height: 100%;
104
- font-size: 0.88rem;
73
+ &:has(button[b-button]:first-child) {
74
+ padding-left: 0.285rem;
105
75
  }
106
76
 
107
- button:active {
108
- transform: scale(1) !important;
77
+ button[b-button] {
78
+ border-radius: calc(var(--radius) - 0.2rem);
109
79
  }
110
80
  }
@@ -1,27 +1,17 @@
1
1
  input[b-input] {
2
- --horizontal-padding: clamp(
3
- 1rem,
4
- calc(0.75rem + var(--radius, 0.5rem) / 2),
5
- 1.5rem
6
- );
7
-
8
- width: 100%;
9
- min-height: 2.8rem;
10
- background-color: var(--input-background, #e0e0e0);
2
+ background-color: var(--input-background);
11
3
  border-radius: var(--radius, 0.5rem);
12
4
  box-sizing: border-box;
13
- padding: calc(0.9rem - 2px) var(--horizontal-padding);
14
5
  border-width: 1px;
15
6
  border-style: solid;
16
7
  border-color: var(--border-color, transparent);
17
8
  transition:
18
9
  opacity 0.2s,
19
- padding-top 0.2s,
20
- padding-bottom 0.2s,
21
10
  background-color 0.2s,
22
11
  border-color 0.2s;
23
12
  font-size: 1rem;
24
- color: var(--input-foreground, #798194);
13
+ color: var(--input-foreground);
14
+ font-family: 'Geist', sans-serif;
25
15
 
26
16
  &::-webkit-outer-spin-button,
27
17
  &::-webkit-inner-spin-button {
@@ -36,7 +26,7 @@ input[b-input] {
36
26
  }
37
27
 
38
28
  &:focus-visible {
39
- outline: 2px solid var(--primary, #0a0a0a);
29
+ outline: 2px solid var(--primary);
40
30
  outline-offset: 2px;
41
31
  }
42
32
 
@@ -44,27 +34,40 @@ input[b-input] {
44
34
  opacity: 0.5;
45
35
  }
46
36
 
47
- &.ng-invalid {
48
- color: var(--error-foreground, #c40000ab);
49
- background-color: var(--error, #fff0f0);
50
- border-color: var(--error-border-color, #c40000ab);
37
+ &.ng-invalid.ng-touched {
38
+ color: var(--error-foreground);
39
+ background-color: var(--error);
40
+ border-color: var(--error-border-color);
51
41
 
52
42
  &:focus-visible {
53
- outline-color: var(--error-foreground, #c40000ab);
43
+ outline-color: var(--error-foreground);
54
44
  }
55
45
 
56
46
  &::placeholder {
57
- color: var(--error-foreground, #c40000ab);
47
+ color: var(--error-foreground);
58
48
  }
59
49
  }
60
50
 
61
- &.label-up {
62
- padding-top: 1.1rem;
63
- padding-bottom: 0.3rem;
64
- }
65
-
66
- &.disabled {
51
+ &:disabled {
67
52
  opacity: 0.5;
68
53
  pointer-events: none;
69
54
  }
55
+
56
+ &.size-1 {
57
+ padding: 0.357rem 0.5rem;
58
+ height: 1.714rem;
59
+ font-size: 0.857rem;
60
+ }
61
+
62
+ &.size-2 {
63
+ padding: 0.429rem 0.75rem;
64
+ height: 2.286rem;
65
+ font-size: 1rem;
66
+ }
67
+
68
+ &.size-3 {
69
+ padding: 0.786rem 1rem;
70
+ height: 2.857rem;
71
+ font-size: 1.143rem;
72
+ }
70
73
  }
@@ -1,9 +1,16 @@
1
- b-menu-item-checkbox {
1
+ button[b-menu-item-checkbox] {
2
2
  --horizontal-padding: clamp(
3
3
  1rem,
4
4
  calc(0.75rem + var(--radius, 0.5rem) / 2),
5
5
  1.5rem
6
6
  );
7
+ background: none;
8
+ color: inherit;
9
+ border: none;
10
+ padding: 0;
11
+ font: inherit;
12
+ cursor: pointer;
13
+ outline: inherit;
7
14
 
8
15
  display: flex;
9
16
  gap: 0.5rem;
@@ -1,9 +1,16 @@
1
- b-menu-item-radio {
1
+ button[b-menu-item-radio] {
2
2
  --horizontal-padding: clamp(
3
3
  1rem,
4
4
  calc(0.75rem + var(--radius, 0.5rem) / 2),
5
5
  1.5rem
6
6
  );
7
+ background: none;
8
+ color: inherit;
9
+ border: none;
10
+ padding: 0;
11
+ font: inherit;
12
+ cursor: pointer;
13
+ outline: inherit;
7
14
 
8
15
  display: flex;
9
16
  gap: 0.5rem;
@@ -15,6 +22,7 @@ b-menu-item-radio {
15
22
  align-items: center;
16
23
 
17
24
  &[aria-checked='true'],
25
+ &.active,
18
26
  &:hover {
19
27
  background-color: var(--input-background);
20
28
  }