@oscarpalmer/oui 0.30.0 → 0.31.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,3 +1,24 @@
1
+ @mixin badge() {
2
+ --oui-shadow-mixed: color-mix(
3
+ in oklab,
4
+ var(--oui-shadow, var(--oui-gray-6)),
5
+ transparent 92.5%
6
+ );
7
+
8
+ @include shadow(var(--oui-shadow-mixed));
9
+
10
+ display: inline-flex;
11
+ flex-flow: row nowrap;
12
+ gap: 0.5em;
13
+ background-color: color-mix(
14
+ in oklab,
15
+ var(--oui-background, var(--oui-gray-0)),
16
+ transparent 25%
17
+ );
18
+ color: var(--oui-foreground, var(--oui-gray-8));
19
+ line-height: 1.25;
20
+ }
21
+
1
22
  @mixin button() {
2
23
  --oui-background-percentage: 25%;
3
24
  --oui-foreground-percentage: 0%;
@@ -77,6 +98,71 @@
77
98
  }
78
99
  }
79
100
 
101
+ @mixin input {
102
+ --oui-background-percentage: 0%;
103
+ --oui-foreground-percentage: 0%;
104
+
105
+ @include input-outlined;
106
+
107
+ align-content: center;
108
+ background-color: color-mix(
109
+ in oklab,
110
+ var(--oui-background-value),
111
+ transparent var(--oui-background-percentage)
112
+ );
113
+ border: 1px solid var(--oui-border-value, var(--oui-gray-3));
114
+ box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
115
+ color: color-mix(
116
+ in oklab,
117
+ var(--oui-foreground-value, inherit),
118
+ transparent var(--oui-foreground-percentage)
119
+ );
120
+ -webkit-text-fill-color: color-mix(
121
+ in oklab,
122
+ var(--oui-foreground-value, inherit),
123
+ transparent var(--oui-foreground-percentage)
124
+ );
125
+ }
126
+
127
+ @mixin input-focus() {
128
+ --oui-border-value: var(--oui-blue-5);
129
+ --oui-foreground-value: inherit;
130
+ --oui-outline-percentage: 75%;
131
+ --oui-outline-value: var(--oui-blue-6);
132
+ }
133
+
134
+ @mixin input-hover() {
135
+ --oui-border-value: var(--oui-blue-4);
136
+ --oui-foreground-percentage: 0%;
137
+ --oui-foreground-value: inherit;
138
+ --oui-outline-percentage: 90%;
139
+ --oui-outline-value: var(--oui-blue-6);
140
+ }
141
+
142
+ @mixin input-invalid() {
143
+ --oui-border-value: var(--oui-red-5);
144
+ --oui-foreground-value: var(--oui-red-9);
145
+ --oui-outline-percentage: 82.5%;
146
+ --oui-outline-value: var(--oui-red-6);
147
+ }
148
+
149
+ @mixin input-outlined {
150
+ --oui-outline-percentage: 100%;
151
+ --oui-outline-value: var(--oui-blue-6);
152
+
153
+ outline: 4px solid
154
+ color-mix(in oklab, var(--oui-outline-value), transparent var(--oui-outline-percentage));
155
+ outline-offset: 0;
156
+ transition: 0.125s ease-in-out;
157
+ }
158
+
159
+ @mixin input-valid() {
160
+ --oui-border-value: var(--oui-green-5);
161
+ --oui-foreground-value: var(--oui-green-9);
162
+ --oui-outline-percentage: 82.5%;
163
+ --oui-outline-value: var(--oui-green-6);
164
+ }
165
+
80
166
  @mixin shadow($color: rgb(0 0 0 / 5%), $inset: transparent) {
81
167
  box-shadow:
82
168
  inset 0 1px 0 0 $inset,