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

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.6",
3
+ "version": "0.0.1-alpha.7",
4
4
  "description": "CSS foundation for @basis-ng/primitives components",
5
5
  "main": "src/index.css",
6
6
  "exports": {
@@ -29,6 +29,8 @@
29
29
  "./row": "./src/components/row.component.css",
30
30
  "./search": "./src/components/search.component.css",
31
31
  "./select": "./src/components/select.component.css",
32
+ "./select-content": "./src/components/select-content.component.css",
33
+ "./select-option": "./src/components/select-option.component.css",
32
34
  "./side-sheet": "./src/components/side-sheet.component.css",
33
35
  "./spinner": "./src/components/spinner.component.css",
34
36
  "./switch": "./src/components/switch.component.css",
@@ -133,8 +133,10 @@ button[b-button] {
133
133
  }
134
134
 
135
135
  @media (width >= 768px) {
136
- &:active {
137
- transform: scale(0.98);
136
+ &.active {
137
+ &:active {
138
+ transform: scale(0.98);
139
+ }
138
140
  }
139
141
  }
140
142
  }
@@ -0,0 +1,21 @@
1
+ ul[b-select-content] {
2
+ list-style: none;
3
+ padding: 0.2rem;
4
+ box-sizing: border-box;
5
+ margin: 0;
6
+ position: relative;
7
+ background: var(--background, #ffffff);
8
+ box-shadow: 0 0 0.25rem 0.125rem rgba(1, 1, 1, 0.01);
9
+ border-radius: clamp(0rem, var(--radius, 0.5rem), 0.5rem);
10
+ border: 1px solid
11
+ color-mix(
12
+ in srgb,
13
+ var(--foreground, #798194) 10%,
14
+ var(--background, #ffffff)
15
+ );
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 0.2rem;
19
+ width: 100%;
20
+ overflow-y: auto;
21
+ }
@@ -0,0 +1,25 @@
1
+ li[b-select-option] {
2
+ display: flex;
3
+ gap: 0.5rem;
4
+ padding: 0.5rem 0.75rem;
5
+ color: var(--foreground, #798194);
6
+ box-sizing: border-box;
7
+ cursor: pointer;
8
+ min-width: 100%;
9
+ align-items: center;
10
+ border-radius: clamp(0rem, calc(var(--radius, 0.5rem) - 0.2rem), 0.5rem);
11
+
12
+ &:focus,
13
+ &:hover {
14
+ background-color: color-mix(
15
+ in srgb,
16
+ var(--foreground, #798194) 5%,
17
+ var(--background, #ffffff)
18
+ );
19
+ }
20
+
21
+ &[aria-selected='true'] {
22
+ background-color: var(--primary, #0a0a0a);
23
+ color: var(--primary-foreground, #ffffff);
24
+ }
25
+ }
@@ -1,120 +1,10 @@
1
- select[b-select] {
2
- --horizontal-padding: clamp(
3
- 1rem,
4
- calc(0.75rem + var(--radius, 0.5rem) / 2),
5
- 1.5rem
6
- );
7
-
8
- position: relative;
9
- -webkit-appearance: none;
10
- appearance: base-select;
11
- box-sizing: border-box;
1
+ b-select {
12
2
  width: 100%;
13
- min-height: 2.8rem;
14
- border-radius: var(--radius, 0.5rem);
15
- color: var(--input-foreground, #798194);
16
- border-width: 1px;
17
- border-style: solid;
18
- border-color: var(--border-color, transparent);
19
- cursor: pointer;
20
- transition:
21
- opacity 0.2s,
22
- padding-top 0.2s,
23
- padding-bottom 0.2s,
24
- background-color 0.2s,
25
- border-color 0.2s;
26
- --vertical-padding: calc(0.9rem - 2px);
27
- padding: var(--vertical-padding) var(--horizontal-padding);
28
- font-size: 1rem;
29
- background-color: transparent;
30
- display: flex;
31
- align-items: center;
32
-
33
- &:focus-visible {
34
- outline: 2px solid var(--primary, #0a0a0a);
35
- outline-offset: 2px;
36
- }
37
3
 
38
- &::picker(select) {
39
- pointer-events: all;
40
- max-height: 200px;
41
- animation: picker 0.2s ease-in-out;
42
- appearance: base-select;
43
- left: 0;
44
- margin: 0.25rem 0;
45
- padding: 0.25rem 0.25rem 0rem 0.25rem;
46
- background: var(--background, #ffffff);
47
- box-shadow: 0 0 0.25rem 0.125rem rgba(1, 1, 1, 0.01);
48
- border-radius: clamp(0rem, var(--radius, 0.5rem), 0.5rem);
49
- border: 1px solid
50
- color-mix(
51
- in srgb,
52
- var(--foreground, #798194) 10%,
53
- var(--background, #ffffff)
54
- );
4
+ button {
5
+ display: flex;
6
+ justify-content: space-between !important;
7
+ align-items: center;
8
+ width: 100%;
55
9
  }
56
-
57
- &::picker-icon {
58
- font-size: 0.9rem;
59
- margin-right: 1px;
60
- }
61
-
62
- &.invalid {
63
- color: var(--error-foreground, #c40000ab);
64
- background-color: var(--error, #fff0f0);
65
- border-color: var(--error-border-color, #c40000ab);
66
-
67
- &::picker-icon {
68
- color: var(--error-foreground, #c40000ab);
69
- }
70
-
71
- &:focus-visible {
72
- outline-color: var(--error-foreground, #c40000ab);
73
- }
74
- }
75
-
76
- &.disabled {
77
- pointer-events: none;
78
- opacity: 0.5;
79
- }
80
- }
81
-
82
- option {
83
- margin-bottom: 0.25rem;
84
- cursor: pointer;
85
- padding: 0.5rem 0.75rem;
86
- color: var(--foreground, #798194);
87
- transition: 0.1s;
88
- border-radius: clamp(0rem, calc(var(--radius, 0.5rem) - 0.2rem), 0.5rem);
89
- }
90
-
91
- option::checkmark {
92
- display: none;
93
- }
94
-
95
- option:focus-visible {
96
- outline-width: 0;
97
- }
98
-
99
- option:hover,
100
- option:focus-visible {
101
- background-color: color-mix(
102
- in srgb,
103
- var(--foreground, #798194) 5%,
104
- var(--background, #ffffff)
105
- );
106
- }
107
-
108
- option:checked {
109
- background-color: var(--primary, #0a0a0a);
110
- color: var(--primary-foreground, #ffffff);
111
- }
112
-
113
- option:disabled {
114
- pointer-events: none;
115
- opacity: 0.5;
116
- }
117
-
118
- selectedoption {
119
- background-color: green;
120
10
  }
package/src/index.css CHANGED
@@ -23,6 +23,8 @@
23
23
  @import './components/row.component.css';
24
24
  @import './components/search.component.css';
25
25
  @import './components/select.component.css';
26
+ @import './components/select-content.component.css';
27
+ @import './components/select-option.component.css';
26
28
  @import './components/side-sheet.component.css';
27
29
  @import './components/spinner.component.css';
28
30
  @import './components/switch.component.css';
@@ -33,4 +35,3 @@
33
35
  @import './components/tooltip.component.css';
34
36
  @import './components/tree-node.component.css';
35
37
  @import './components/tree.component.css';
36
-