@latitude-ui/widgets 0.0.15 → 0.0.16

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,7 +1,8 @@
1
1
  {
2
2
  "name": "@latitude-ui/widgets",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "UI Widgets",
5
+ "private": false,
5
6
  "keywords": [
6
7
  "component",
7
8
  "directive"
@@ -0,0 +1,99 @@
1
+ $icon-color: #6d6e6f !default;
2
+ $icon-color-hover: #1e1f21 !default;
3
+ $icon-color-active: #1e1f21 !default;
4
+ $icon-color-strong: #6d6e6f !default;
5
+ $icon-color-disabled: #afabac !default;
6
+ $icon-color-foreground: #ffffff !default;
7
+
8
+ $text-color: #1e1f21 !default;
9
+ $text-color-strong: #555555 !default;
10
+ $text-color-subtle: #6d6e6f !default;
11
+ $text-color-subtle-hover: #1e1f21 !default;
12
+ $text-color-disabled: #afabac !default;
13
+ $text-color-foreground: #ffffff !default;
14
+
15
+ $shadow-color: rgba(109, 110, 111, .1) !default;
16
+ $shadow-color-weak: rgba(109, 110, 111, .08) !default;
17
+ $shadow-color-strong: rgba(109, 110, 111, .12) !default;
18
+
19
+ $outline-color: #edeae9 !default;
20
+ $outline-color-hover: #afabac !default;
21
+ $outline-color-active: #6d6e6f !default;
22
+ $outline-color-strong: #cfcbcb !default;
23
+
24
+ $background-color: #ffffff !default;
25
+ $background-color-hover: rgba(55, 23, 23, .03) !default;
26
+ $background-color-active: rgba(55, 23, 23, .05) !default;
27
+ $background-color-strong: #f5f3f3 !default;
28
+ $background-color-subtle: #f9f8f8 !default;
29
+ $background-color-subtle-hover: rgba(55, 23, 23, .05) !default;
30
+ $background-color-subtle-active: rgba(55, 23, 23, .06) !default;
31
+
32
+ $primary-color: #4573d2 !default;
33
+ $primary-color-hover: #426dc6 !default;
34
+ $primary-color-active: #3f66ba !default;
35
+
36
+ $primary-color-weak: #f1f2fc !default;
37
+ $primary-color-weak-hover: #e7e9fc !default;
38
+ $primary-color-weak-active: #dbe0fd !default;
39
+
40
+ $danger-color: #fa5252 !default;
41
+ $danger-color-hover: #fa5252 !default;
42
+ $danger-color-active: #fa5252 !default;
43
+
44
+ $box-shadow-small: 0 0 0 1px #edeae9, 0 1px 4px 0 rgba(109, 110, 111, .08);
45
+ $box-shadow-medium: 0 0 0 1px #edeae9, 0 3px 8px 0 rgba(109, 110, 111, .1);
46
+ $box-shadow-medium-hover: 0 0 0 1px #afabac, 0 3px 8px 0 rgba(109, 110, 111, .1);
47
+ $box-shadow-medium-active: 0 0 0 1px #6d6e6f, 0 3px 8px 0 rgba(109, 110, 111, .1);
48
+ $box-shadow-large: 0 0 0 1px #edeae9, 0 6px 12px 0 rgba(109, 110, 111, .12);
49
+
50
+ :root {
51
+ --lat-icon-color: #{$icon-color};
52
+ --lat-icon-color-hover: #{$icon-color-hover};
53
+ --lat-icon-color-active: #{$icon-color-active};
54
+ --lat-icon-color-strong: #{$icon-color-strong};
55
+ --lat-icon-color-disabled: #{$icon-color-disabled};
56
+ --lat-icon-color-foreground: #{$icon-color-foreground};
57
+
58
+ --lat-text-color: #{$text-color};
59
+ --lat-text-color-strong: #{$text-color-strong};
60
+ --lat-text-color-subtle: #{$text-color-subtle};
61
+ --lat-text-color-subtle-hover: #{$text-color-subtle-hover};
62
+ --lat-text-color-disabled: #{$text-color-disabled};
63
+ --lat-text-color-foreground: #{$text-color-foreground};
64
+
65
+ --lat-shadow-color: #{$shadow-color};
66
+ --lat-shadow-color-weak: #{$shadow-color-weak};
67
+ --lat-shadow-color-strong: #{$shadow-color-strong};
68
+
69
+ --lat-outline-color: #{$outline-color};
70
+ --lat-outline-color-hover: #{$outline-color-hover};
71
+ --lat-outline-color-active: #{$outline-color-active};
72
+ --lat-outline-color-strong: #{$outline-color-strong};
73
+
74
+ --lat-background-color: #{$background-color};
75
+ --lat-background-color-hover: #{$background-color-hover};
76
+ --lat-background-color-active: #{$background-color-active};
77
+ --lat-background-color-strong: #{$background-color-strong};
78
+ --lat-background-color-subtle: #{$background-color-subtle};
79
+ --lat-background-color-subtle-hover: #{$background-color-subtle-hover};
80
+ --lat-background-color-subtle-active: #{$background-color-subtle-active};
81
+
82
+ --lat-primary-color: #{$primary-color};
83
+ --lat-primary-color-hover: #{$primary-color-hover};
84
+ --lat-primary-color-active: #{$primary-color-active};
85
+
86
+ --lat-primary-color-weak: #{$primary-color-weak};
87
+ --lat-primary-color-weak-hover: #{$primary-color-weak-hover};
88
+ --lat-primary-color-weak-active: #{$primary-color-weak-active};
89
+
90
+ --lat-danger-color: #{$danger-color};
91
+ --lat-danger-color-hover: #{$danger-color-hover};
92
+ --lat-danger-color-active: #{$danger-color-active};
93
+
94
+ --lat-box-shadow-small: #{$box-shadow-small};
95
+ --lat-box-shadow-medium: #{$box-shadow-medium};
96
+ --lat-box-shadow-medium-hover: #{$box-shadow-medium-hover};
97
+ --lat-box-shadow-medium-active: #{$box-shadow-medium-active};
98
+ --lat-box-shadow-large: #{$box-shadow-large};
99
+ }
@@ -0,0 +1,135 @@
1
+
2
+
3
+ *,
4
+ ::before,
5
+ ::after {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ html {
10
+ font-family: var(--lat-font-family-sans, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'), sans-serif;
11
+
12
+ font-size: 16px;
13
+ font-weight: var(--lat-font-weight-normal, 450);
14
+ line-height: 24px;
15
+
16
+ -webkit-text-size-adjust: 100%;
17
+ tab-size: 4;
18
+ }
19
+
20
+
21
+ body {
22
+ margin: 0;
23
+ }
24
+
25
+ b,
26
+ strong {
27
+ font-weight: bolder;
28
+ }
29
+
30
+
31
+ code,
32
+ kbd,
33
+ samp,
34
+ pre {
35
+ font-family: var(--lat-font-famiy-monospace, ui-monospace, SFMono-Regular, inherit Consolas, 'Liberation Mono', Menlo), monospace;
36
+ font-size: 1em;
37
+ }
38
+
39
+
40
+ small {
41
+ font-size: 80%;
42
+ }
43
+
44
+
45
+ sub,
46
+ sup {
47
+ font-size: 75%;
48
+ line-height: 0;
49
+ position: relative;
50
+ vertical-align: baseline;
51
+ }
52
+
53
+ sub {
54
+ bottom: -0.25em;
55
+ }
56
+
57
+ sup {
58
+ top: -0.5em;
59
+ }
60
+
61
+
62
+ table {
63
+ border-color: currentcolor;
64
+ }
65
+
66
+
67
+ button,
68
+ input,
69
+ optgroup,
70
+ select,
71
+ textarea {
72
+ font-family: inherit;
73
+ font-size: 100%;
74
+ line-height: 1.15;
75
+ margin: 0;
76
+ }
77
+
78
+
79
+ button,
80
+ [type='button'],
81
+ [type='reset'],
82
+ [type='submit'] {
83
+ -webkit-appearance: button;
84
+ }
85
+
86
+
87
+ legend {
88
+ padding: 0;
89
+ }
90
+
91
+
92
+ progress {
93
+ vertical-align: baseline;
94
+ }
95
+
96
+
97
+ ::-webkit-inner-spin-button,
98
+ ::-webkit-outer-spin-button {
99
+ height: auto;
100
+ }
101
+
102
+
103
+ [type='search'] {
104
+ -webkit-appearance: textfield;
105
+ outline-offset: -2px;
106
+ }
107
+
108
+
109
+ ::-webkit-search-decoration {
110
+ -webkit-appearance: none;
111
+ }
112
+
113
+
114
+ ::-webkit-file-upload-button {
115
+ -webkit-appearance: button;
116
+ font: inherit;
117
+ }
118
+
119
+
120
+ summary {
121
+ display: list-item;
122
+ }
123
+
124
+ .lat-root {
125
+ display: flex;
126
+
127
+ overflow: hidden;
128
+ box-sizing: border-box;
129
+
130
+ width: var(--lat-layout-width, 100vw);
131
+ height: var(--lat-layout-height, 100vw);
132
+ }
133
+
134
+
135
+
@@ -0,0 +1,11 @@
1
+ @use "colors";
2
+ @use "typography";
3
+
4
+ @use "defaults";
5
+
6
+ @use "button";
7
+ @use "icons";
8
+ @use "listbox";
9
+
10
+ @use "forms";
11
+
@@ -0,0 +1,37 @@
1
+ $font-family-sans: "Inter Variable", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !default;
2
+ $font-family-monospace: "Berkeley Mono", "SFMono Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !default;
3
+
4
+ $font-size-tiny: 0.625rem !default;
5
+ $font-size-small: 0.75rem !default;
6
+ $font-size-normal: 0.875rem !default;
7
+ $font-size-medium: 1rem !default;
8
+ $font-size-large: 1.25rem !default;
9
+
10
+ $font-weight-light: 300 !default;
11
+ $font-weight-normal: 400 !default;
12
+ $font-weight-medium: 500 !default;
13
+ $font-weight-semibold: 600 !default;
14
+ $font-weight-bold: 700 !default;
15
+
16
+
17
+ :root {
18
+ --lat-font-family-sans: #{$font-family-sans};
19
+ --lat-font-family-monospace: #{$font-family-monospace};
20
+
21
+ --lat-font-size-tiny: #{$font-size-tiny};
22
+ --lat-font-size-small: #{$font-size-small};
23
+ --lat-font-size-normal: #{$font-size-normal};
24
+ --lat-font-size-medium: #{$font-size-medium};
25
+ --lat-font-size-large: #{$font-size-large};
26
+
27
+ --lat-font-weight-light: #{$font-weight-light};
28
+ --lat-font-weight-normal: #{$font-weight-normal};
29
+ --lat-font-weight-medium: #{$font-weight-medium};
30
+ --lat-font-weight-semibold: #{$font-weight-semibold};
31
+ --lat-font-weight-bold: #{$font-weight-bold};
32
+
33
+ --lat-font-size: var(--lat-font-size-medium);
34
+ --lat-font-family: var(--lat-font-family-sans);
35
+ --lat-font-weight: var(--lat-font-weight-normal);
36
+
37
+ }
@@ -0,0 +1,199 @@
1
+
2
+ lat-button {
3
+ overflow: hidden;
4
+ position: relative;
5
+
6
+ box-sizing: border-box;
7
+
8
+ display: inline-flex;
9
+
10
+ gap: 4px;
11
+ flex-shrink: 0;
12
+
13
+ align-items: center;
14
+ justify-content: center;
15
+
16
+ margin: 0;
17
+ padding: 0;
18
+
19
+ outline: none;
20
+
21
+ cursor: pointer;
22
+ user-select: none;
23
+ white-space: nowrap;
24
+ vertical-align: top;
25
+ text-decoration: none;
26
+ touch-action: manipulation;
27
+
28
+ border-width: 0;
29
+ border-color: transparent;
30
+ border-style: solid;
31
+ border-radius: 4px;
32
+
33
+ font-family: var(--lat-font-family-sans), sans-serif;
34
+ font-weight: var(--lat-font-weight-normal);
35
+ line-height: normal;
36
+
37
+ transition-property: background, border, color, fill, opacity;
38
+ transition-duration: 0.2s;
39
+
40
+ &[data-size] {
41
+ height: var(--lat-button-height);
42
+ padding: var(--lat-button-padding);
43
+ font-size: var(--lat-button-font-size);
44
+ line-height: var(--lat-button-line-height);
45
+ }
46
+
47
+ &[data-onlyicon="true"] {
48
+ width: var(--lat-button-height);
49
+ min-width: var(--lat-button-height);
50
+ }
51
+
52
+ &[data-size="sm"] {
53
+ --lat-button-height: 24px;
54
+ --lat-button-padding: 0 8px;
55
+ --lat-button-font-size: 12px;
56
+ --lat-button-line-height: 24px;
57
+ }
58
+
59
+ &[data-size="md"] {
60
+ --lat-button-height: 28px;
61
+ --lat-button-padding: 0 8px;
62
+ --lat-button-font-size: 12px;
63
+ --lat-button-line-height: 28px;
64
+ }
65
+
66
+ &[data-size="lg"] {
67
+ --lat-button-height: 32px;
68
+ --lat-button-padding: 0 10px;
69
+ --lat-button-font-size: 14px;
70
+ --lat-button-line-height: 32px;
71
+ }
72
+
73
+ &[data-variant="action"] {
74
+ fill: #ffffff;
75
+ color: #ffffff;
76
+ border-width: 1px;
77
+ border-style: solid;
78
+ border-color: var(--lat-primary-color);
79
+ background-color: var(--lat-primary-color);
80
+
81
+ &:hover {
82
+ fill: #ffffff;
83
+ color: #ffffff;
84
+ border-color: var(--lat-primary-color-hover);
85
+ background-color: var(--lat-primary-color-hover);
86
+ }
87
+
88
+ &:active {
89
+ fill: #ffffff;
90
+ color: #ffffff;
91
+ border-color: var(--lat-primary-color-active);
92
+ background-color: var(--lat-primary-color-active);
93
+ }
94
+
95
+ &:focus-visible {
96
+ }
97
+ }
98
+
99
+ &[data-variant="default"] {
100
+ fill: var(--lat-icon-color);
101
+ color: var(--lat-text-color);
102
+ border-width: 1px;
103
+ border-style: solid;
104
+ border-color: var(--lat-outline-color-strong);
105
+ background-color: #ffffff;
106
+
107
+ &:hover {
108
+ fill: var(--lat-icon-hover);
109
+ color: var(--lat-text-color);
110
+ border-color: var(--lat-outline-color-hover);
111
+ background-color: var(--lat-background-color-subtle);
112
+ }
113
+
114
+ &:active {
115
+ fill: var(--lat-icon-hover);
116
+ color: var(--lat-text-color);
117
+ border-color: var(--lat-outline-color-active);
118
+ background-color: var(--lat-background-color-strong);
119
+ }
120
+
121
+ &:focus-visible {
122
+ }
123
+ }
124
+
125
+ &[data-variant="text"] {
126
+ fill: var(--lat-text-color);
127
+ color: var(--lat-text-color);
128
+ border-color: transparent;
129
+ background-color: transparent;
130
+
131
+ &:hover {
132
+ fill: var(--lat-text-color);
133
+ color: var(--lat-text-color);
134
+ border-color: var(--lat-background-color-hover);
135
+ background-color: var(--lat-background-color-hover);
136
+ }
137
+
138
+ &:active {
139
+ fill: var(--lat-text-color);
140
+ color: var(--lat-text-color);
141
+ border-color: var(--lat-background-color-active);
142
+ background-color: var(--lat-background-color-active);
143
+ }
144
+
145
+ &:focus-visible {
146
+ }
147
+ }
148
+
149
+ &[data-variant="subtle"] {
150
+ fill: var(--lat-text-color-subtle);
151
+ color: var(--lat-text-color-subtle);
152
+ border-color: transparent;
153
+ background-color: transparent;
154
+
155
+ &:hover {
156
+ fill: var(--lat-text-color);
157
+ color: var(--lat-text-color);
158
+ border-color: var(--lat-background-color-subtle-hover);
159
+ background-color: var(--lat-background-color-subtle-hover);
160
+ }
161
+
162
+ &:active {
163
+ fill: var(--lat-text-color);
164
+ color: var(--lat-text-color);
165
+ border-color: var(--lat-background-color-subtle-active);
166
+ background-color: var(--lat-background-color-subtle-active);
167
+ }
168
+
169
+ &:focus-visible {
170
+ }
171
+ }
172
+
173
+ &[data-variant="danger"] {
174
+
175
+ }
176
+
177
+ &[data-variant="success"] {
178
+
179
+ }
180
+
181
+ &[aria-disabled="true"] {
182
+ cursor: not-allowed;
183
+
184
+ fill: var(--lat-text-color-disabled);
185
+ color: var(--lat-text-color-disabled);
186
+ background: #ffffff;
187
+ border-color: var(--lat-outline-color);
188
+
189
+ &:hover,
190
+ &:active,
191
+ &:focus-visible {
192
+ fill: var(--lat-text-color-disabled);
193
+ color: var(--lat-text-color-disabled);
194
+ background: #ffffff;
195
+ border-color: var(--lat-outline-color);
196
+ }
197
+ }
198
+
199
+ }
@@ -0,0 +1,888 @@
1
+ lat-input-label {
2
+ color: var(--lat-text-color-subtle);
3
+ //color: var(--lat-text-color-strong);
4
+
5
+ font-size: var(--lat-font-size-small);
6
+ font-family: var(--lat-font-family-sans), sans-serif;
7
+ font-weight: var(--lat-font-weight-normal);
8
+
9
+ user-select: none;
10
+ line-height: 1rem;
11
+
12
+
13
+ label {
14
+ display: inline-flex;
15
+
16
+ align-self: flex-start;
17
+ align-items: center;
18
+ justify-self: start;
19
+
20
+ color: inherit;
21
+ text-align: right;
22
+ line-height: inherit;
23
+ vertical-align: middle;
24
+
25
+ font-size: inherit;
26
+ font-family: inherit;
27
+ font-weight: inherit;
28
+
29
+ .lat-label-asterix {
30
+ color: var(--lat-danger-color);
31
+ margin-left: 4px;
32
+ }
33
+ }
34
+ }
35
+
36
+
37
+ lat-input {
38
+ display: flex;
39
+
40
+ gap: 4px;
41
+ flex-direction: column;
42
+
43
+ align-items: flex-start;
44
+ justify-content: flex-start;
45
+
46
+ font-family: var(--lat-font-family-sans), sans-serif;
47
+ font-weight: var(--lat-font-weight-normal);
48
+
49
+ line-height: normal;
50
+
51
+ & > div[role="textbox"] {
52
+ position: relative;
53
+
54
+ overflow: hidden;
55
+ box-sizing: border-box;
56
+
57
+ margin-inline: calc(0.25rem * -1);
58
+
59
+ button {
60
+ position: relative;
61
+
62
+ box-sizing: border-box;
63
+
64
+ display: flex;
65
+
66
+ align-items: center;
67
+ justify-content: flex-start;
68
+
69
+ width: 100%;
70
+
71
+ height: auto;
72
+ min-height: 28px;
73
+ line-height: 28px;
74
+
75
+ cursor: default;
76
+
77
+ text-align: left;
78
+ touch-action: manipulation;
79
+
80
+ border-radius: 4px;
81
+
82
+ padding-block: 0.25rem;
83
+ padding-inline: 0.25rem;
84
+
85
+ color: var(--lat-text-color);
86
+ background-color: transparent;
87
+
88
+ font-size: inherit;
89
+ font-family: inherit;
90
+ font-weight: inherit;
91
+
92
+ &:hover {
93
+ color: var(--lat-text-color);
94
+ background-color: var(--lat-background-color-active);
95
+ }
96
+
97
+ transition-property: background, border, color, fill, opacity;
98
+ transition-duration: 0.2s;
99
+ }
100
+ }
101
+
102
+ & > * {
103
+ width: 100%;
104
+ }
105
+
106
+ lat-input-label {
107
+ }
108
+
109
+ lat-input-error {
110
+ display: flex;
111
+
112
+ cursor: default;
113
+ flex-direction: column;
114
+
115
+ align-items: flex-start;
116
+
117
+ gap: 4px;
118
+
119
+ color: var(--lat-danger-color);
120
+ text-align: right;
121
+ line-height: inherit;
122
+ vertical-align: middle;
123
+
124
+ font-size: 11px;
125
+ font-family: inherit;
126
+ font-weight: inherit;
127
+ }
128
+ }
129
+
130
+ lat-switch {
131
+ display: inline-flex;
132
+
133
+ cursor: default;
134
+
135
+ align-items: center;
136
+ justify-content: flex-start;
137
+
138
+ font-family: var(--lat-font-family-sans), sans-serif;
139
+ font-weight: var(--lat-font-weight-normal);
140
+
141
+ &[data-size="sm"] {
142
+ height: 24px;
143
+ font-size: 12px;
144
+ line-height: 24px;
145
+
146
+ button {
147
+ width: 32px;
148
+ height: 18px;
149
+ line-height: 18px;
150
+
151
+ & > div {
152
+ width: 14px;
153
+ height: 14px;
154
+ }
155
+
156
+ &[aria-checked="true"] {
157
+ --lat-translate-x: 14px;
158
+ }
159
+
160
+ &[aria-checked="false"] {
161
+ --lat-translate-x: 0;
162
+ }
163
+ }
164
+ }
165
+
166
+ &[data-size="md"] {
167
+ height: 28px;
168
+ font-size: 12px;
169
+ line-height: 28px;
170
+
171
+ button {
172
+ width: 40px;
173
+ height: 22px;
174
+ line-height: 22px;
175
+
176
+ & > div {
177
+ width: 18px;
178
+ height: 18px;
179
+ }
180
+
181
+ &[aria-checked="true"] {
182
+ --lat-translate-x: 18px;
183
+ }
184
+
185
+ &[aria-checked="false"] {
186
+ --lat-translate-x: 0;
187
+ }
188
+ }
189
+ }
190
+
191
+ &[data-size="lg"] {
192
+ height: 32px;
193
+ font-size: 14px;
194
+ line-height: 32px;
195
+
196
+ button {
197
+ width: 44px;
198
+ height: 26px;
199
+ line-height: 26px;
200
+
201
+ & > div {
202
+ width: 22px;
203
+ height: 22px;
204
+ }
205
+
206
+ &[aria-checked="true"] {
207
+ --lat-translate-x: 22px;
208
+ }
209
+
210
+ &[aria-checked="false"] {
211
+ --lat-translate-x: 0;
212
+ }
213
+ }
214
+ }
215
+
216
+ button {
217
+ display: inline-flex;
218
+
219
+ align-items: center;
220
+ justify-content: flex-start;
221
+
222
+ height: 100%;
223
+
224
+ flex-shrink: 0;
225
+
226
+ border-width: 1px;
227
+ border-style: solid;
228
+ border-color: var(--lat-thumb-border-color);
229
+ border-radius: 9999px;
230
+
231
+ color: var(--lat-text-color);
232
+ background-color: var(--lat-thumb-background-color);
233
+
234
+
235
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
236
+ transition-timing-function: cubic-bezier(.4, 0, .2, 1);
237
+ transition-duration: .2s;
238
+
239
+ padding: 2px 1px;
240
+ margin-right: .5rem;
241
+
242
+
243
+ & > div {
244
+ display: block;
245
+ box-sizing: border-box;
246
+
247
+ border-width: 0;
248
+ border-style: solid;
249
+ border-color: var(--lat-outline-color-strong);
250
+ border-radius: 9999px;
251
+
252
+ box-shadow: inset 0 0 0 var(--lat-thumb-border-width) var(--lat-thumb-border-color);
253
+ background-color: var(--lat-thumb-color);
254
+
255
+ transition-property: transform;
256
+ transition-timing-function: cubic-bezier(.4, 0, .2, 1);
257
+ transition-duration: .2s;
258
+
259
+ transform: translate(var(--lat-translate-x), 0)
260
+ }
261
+
262
+ &[aria-checked="true"] {
263
+ --lat-thumb-color: #ffffff;
264
+ --lat-thumb-border-width: 0;
265
+ --lat-thumb-border-color: var(--lat-primary-color);
266
+ --lat-thumb-background-color: var(--lat-primary-color);
267
+ }
268
+
269
+ &[aria-checked="false"] {
270
+ --lat-thumb-color: #ffffff;
271
+ --lat-thumb-border-width: 1px;
272
+ --lat-thumb-border-color: var(--lat-outline-color-strong);
273
+ --lat-thumb-background-color: var(--lat-background-color-subtle);
274
+ }
275
+ }
276
+ }
277
+
278
+ @mixin textbox-size(
279
+ $size,
280
+ $height,
281
+ $font-size,
282
+ $line-height,
283
+ $padding-block,
284
+ $padding-inline,
285
+ ) {
286
+ &[data-size="#{$size}"] {
287
+ --lat-textbox-height: #{$height};
288
+ --lat-textbox-font-size: #{$font-size};
289
+ --lat-textbox-line-height: #{$line-height};
290
+ --lat-textbox-padding-block: #{$padding-block};
291
+ --lat-textbox-padding-inline: #{$padding-inline};
292
+
293
+ @content;
294
+ }
295
+ }
296
+
297
+
298
+ lat-textbox, lat-textarea, lat-select {
299
+ --lat-textbox-height: auto;
300
+ --lat-textbox-line-height: inherit;
301
+ --lat-textbox-font-size: var(--lat-font-size-small);
302
+ --lat-textbox-font-family: var(--lat-font-family-sans);
303
+ --lat-textbox-font-weight: var(--lat-font-weight-normal);
304
+ --lat-textbox-padding-block: 0;
305
+ --lat-textbox-padding-inline: 0;
306
+ --lat-textbox-border-style: solid;
307
+ --lat-textbox-border-color: transparent;
308
+ --lat-textbox-border-width: 1px;
309
+ --lat-textbox-border-radius: 4px;
310
+ --lat-textbox-color: initial;
311
+ --lat-textbox-background-color: initial;
312
+ --lat-textbox-placeholder-color: initial;
313
+ }
314
+
315
+ lat-textbox, lat-textarea, lat-select {
316
+ --lat-textbox-color: var(--lat-text-color);
317
+ --lat-textbox-placeholder-color: var(--lat-text-color-subtle);
318
+ --lat-textbox-border-width: 0.0625rem;
319
+ --lat-textbox-border-color: var(--lat-outline-color-strong);
320
+ --lat-textbox-background-color: #ffffff;
321
+ }
322
+
323
+ lat-textbox {
324
+ position: relative;
325
+ box-sizing: border-box;
326
+
327
+ display: inline-flex;
328
+ overflow: hidden;
329
+
330
+ width: 100%;
331
+
332
+ font-size: var(--lat-textbox-font-size);
333
+ font-family: var(--lat-textbox-font-family), sans-serif;
334
+ font-weight: var(--lat-textbox-font-weight);
335
+
336
+ border-width: var(--lat-textbox-border-width);
337
+ border-style: var(--lat-textbox-border-style);
338
+ border-color: var(--lat-textbox-border-color);
339
+ border-radius: var(--lat-textbox-border-radius);
340
+
341
+ color: var(--lat-textbox-color);
342
+ background-color: var(--lat-textbox-background-color);
343
+
344
+ transition-property: background, border, color, fill, opacity;
345
+ transition-duration: .2s;
346
+
347
+ &:hover {
348
+ --lat-textbox-color: var(--lat-text-color);
349
+ --lat-textbox-border-color: var(--lat-outline-color-hover);
350
+ }
351
+
352
+ &:focus-within {
353
+ --lat-textbox-color: var(--lat-text-color);
354
+ --lat-textbox-border-color: var(--lat-outline-color-active);
355
+ }
356
+
357
+ &[data-dirty="true"][data-invalid="true"] {
358
+ --lat-textbox-border-color: var(--lat-danger-color);
359
+ }
360
+
361
+ &[data-readonly="true"] {
362
+ --lat-textbox-color: var(--lat-text-color);
363
+ --lat-textbox-border-color: transparent;
364
+ --lat-textbox-background-color: #ffffff;
365
+
366
+ margin-inline: calc(var(--lat-textbox-padding-inline) * -1);
367
+
368
+ input, textarea {
369
+ cursor: default;
370
+ }
371
+
372
+ &:hover {
373
+ --lat-textbox-color: var(--lat-text-color);
374
+ --lat-textbox-border-color: transparent;
375
+ --lat-textbox-background-color: var(--lat-background-color-hover);
376
+ }
377
+
378
+ &:focus-within {
379
+ --lat-textbox-color: var(--lat-text-color);
380
+ --lat-textbox-border-color: transparent;
381
+ --lat-textbox-background-color: var(--lat-background-color-active);
382
+ }
383
+ }
384
+
385
+ input, textarea {
386
+ position: relative;
387
+ overflow: hidden;
388
+ box-sizing: border-box;
389
+
390
+ display: inline-flex;
391
+
392
+ align-items: center;
393
+ justify-content: center;
394
+
395
+ text-align: left;
396
+ touch-action: manipulation;
397
+
398
+ width: 100%;
399
+
400
+ height: var(--lat-textbox-height);
401
+ line-height: var(--lat-textbox-line-height);
402
+
403
+ font-size: inherit;
404
+ font-family: inherit;
405
+ font-weight: inherit;
406
+
407
+ margin: 0;
408
+ padding: 0;
409
+
410
+ border: none;
411
+ outline: none;
412
+
413
+ padding-block: var(--lat-textbox-padding-block);
414
+ padding-inline: var(--lat-textbox-padding-inline);
415
+
416
+ flex-grow: 1;
417
+
418
+ vertical-align: top;
419
+
420
+ color: inherit;
421
+ background-color: initial;
422
+
423
+ &::placeholder {
424
+ color: var(--lat-textbox-placeholder-color);
425
+
426
+ font-size: var(--lat-textbox-font-size);
427
+ font-family: var(--lat-textbox-font-family), sans-serif;
428
+ font-weight: var(--lat-textbox-font-weight);
429
+ }
430
+ }
431
+
432
+ &[data-rows] {
433
+ height: auto;
434
+ box-sizing: content-box;
435
+
436
+ textarea {
437
+ height: auto;
438
+ overflow: auto;
439
+ }
440
+ }
441
+
442
+ @include textbox-size(
443
+ "sm",
444
+ 1.5rem,
445
+ 0.75rem,
446
+ 1.125rem,
447
+ 0.25rem,
448
+ 0.5rem
449
+ );
450
+
451
+ @include textbox-size(
452
+ "md",
453
+ 1.75rem,
454
+ 0.75rem,
455
+ 1.125rem,
456
+ 0.25rem,
457
+ 0.5rem
458
+ );
459
+
460
+ @include textbox-size(
461
+ "lg",
462
+ 2rem,
463
+ 0.875rem,
464
+ 1.3125rem,
465
+ 0.25rem,
466
+ 0.5rem
467
+ );
468
+ }
469
+
470
+
471
+ lat-select {
472
+ position: relative;
473
+ box-sizing: border-box;
474
+
475
+ display: inline-flex;
476
+
477
+ overflow: hidden;
478
+
479
+ min-width: 100px;
480
+ max-width: 100%;
481
+
482
+
483
+ lat-select-trigger {
484
+ position: relative;
485
+ box-sizing: border-box;
486
+
487
+ display: flex;
488
+ flex-wrap: nowrap;
489
+ overflow-x: hidden;
490
+
491
+ align-items: center;
492
+ justify-content: space-between;
493
+
494
+ cursor: pointer;
495
+ user-select: none;
496
+
497
+ width: 100%;
498
+ max-width: 100%;
499
+
500
+ line-height: var(--lat-textbox-line-height);
501
+
502
+ font-size: var(--lat-textbox-font-size);
503
+ font-family: var(--lat-textbox-font-family), sans-serif;
504
+ font-weight: var(--lat-textbox-font-weight);
505
+
506
+ border-width: var(--lat-textbox-border-width);
507
+ border-style: var(--lat-textbox-border-style);
508
+ border-color: var(--lat-textbox-border-color);
509
+ border-radius: var(--lat-textbox-border-radius);
510
+
511
+ color: var(--lat-textbox-color);
512
+ background-color: var(--lat-textbox-background-color);
513
+
514
+ transition-property: background, border, color, fill, opacity;
515
+ transition-duration: .2s;
516
+
517
+ &:hover {
518
+ --lat-textbox-color: var(--lat-text-color);
519
+ --lat-textbox-border-color: var(--lat-outline-color-hover);
520
+ }
521
+
522
+ &:focus-within {
523
+ --lat-textbox-color: var(--lat-text-color);
524
+ --lat-textbox-border-color: var(--lat-outline-color-active);
525
+ }
526
+
527
+ @include textbox-size(
528
+ "sm",
529
+ 1.5rem,
530
+ 0.75rem,
531
+ 1.125rem,
532
+ 0.25rem,
533
+ 0.5rem
534
+ );
535
+
536
+ @include textbox-size(
537
+ "md",
538
+ 1.75rem,
539
+ 0.75rem,
540
+ 1.125rem,
541
+ 0.25rem,
542
+ 0.5rem
543
+ );
544
+
545
+ @include textbox-size(
546
+ "lg",
547
+ 2rem,
548
+ 0.875rem,
549
+ 1.3125rem,
550
+ 0.25rem,
551
+ 0.5rem
552
+ );
553
+
554
+ lat-select-values {
555
+ display: flex;
556
+ flex-wrap: nowrap;
557
+ overflow-x: hidden;
558
+
559
+ gap: 0.5rem;
560
+ height: 100%;
561
+
562
+ margin-inline: 0.5rem;
563
+
564
+ lat-select-value {
565
+ display: flex;
566
+ overflow: hidden;
567
+
568
+ min-width: 0;
569
+ min-height: 0;
570
+
571
+ flex-shrink: 0;
572
+ align-items: center;
573
+ justify-content: flex-start;
574
+
575
+ cursor: pointer;
576
+ user-select: none;
577
+
578
+ font-size: calc(var(--lat-textbox-font-size) - 1px);
579
+
580
+ span {
581
+ display: inline-block;
582
+
583
+ padding-block: 2px;
584
+ padding-inline: 8px;
585
+
586
+ border-radius: 4px;
587
+
588
+ background-color: var(--lat-background-color-subtle-hover);
589
+ }
590
+
591
+ }
592
+ }
593
+
594
+ lat-select-values + .lat-select-control {
595
+ position: relative;
596
+ box-sizing: content-box;
597
+
598
+ display: flex;
599
+
600
+ flex-direction: column;
601
+
602
+ border-left-style: solid;
603
+ border-left-width: 1px;
604
+ border-left-color: var(--lat-textbox-border-color);
605
+
606
+ lat-button {
607
+ --lat-button-height: var(--lat-textbox-height);
608
+ width: var(--lat-textbox-height);
609
+
610
+ &:hover {
611
+ background-color: transparent;
612
+ }
613
+ }
614
+ }
615
+
616
+
617
+ }
618
+
619
+ &[type="single"] {
620
+
621
+ lat-select-values {
622
+ margin-inline: 0;
623
+ }
624
+
625
+ lat-select-value,
626
+ lat-select-values {
627
+ flex: 1 1 auto;
628
+ }
629
+
630
+ lat-select-value {
631
+ span {
632
+ box-sizing: border-box;
633
+
634
+ display: block;
635
+
636
+ background-color: transparent;
637
+
638
+ overflow: hidden;
639
+ text-overflow: ellipsis;
640
+ white-space: nowrap;
641
+ }
642
+ }
643
+ }
644
+
645
+ }
646
+
647
+ .lat-select-dropdown-backdrop {
648
+ opacity: 1;
649
+ visibility: hidden;
650
+
651
+ &.cdk-overlay-backdrop-showing {
652
+ opacity: 0;
653
+ visibility: visible;
654
+ }
655
+ }
656
+
657
+ lat-select-dropdown {
658
+
659
+ box-sizing: border-box;
660
+
661
+ display: flex;
662
+
663
+ flex-direction: column;
664
+
665
+ outline: none;
666
+ pointer-events: auto;
667
+
668
+ max-height: 300px;
669
+
670
+ padding-block: 4px;
671
+ padding-inline: 0;
672
+
673
+ border-radius: 4px;
674
+
675
+ box-shadow: var(--lat-box-shadow-large);
676
+ background-color: var(--lat-background-color);
677
+
678
+ &[data-side="top"] {
679
+ margin: 0 0 4px 0;
680
+ }
681
+
682
+ &[data-side="right"] {
683
+ margin: 0 0 0 4px;
684
+ }
685
+
686
+ &[data-side="bottom"] {
687
+ margin: 4px 0 0 0;
688
+ }
689
+
690
+ &[data-side="left"] {
691
+ margin: 0 4px 0 0;
692
+ }
693
+
694
+
695
+ lat-textbox {
696
+ margin: 2px 4px 4px;
697
+ width: auto;
698
+ }
699
+
700
+ lat-listbox {
701
+ [role="listbox"] {
702
+ box-sizing: border-box;
703
+
704
+ scrollbar-width: none; /* Firefox */
705
+ -ms-overflow-style: none; /* IE and Edge */
706
+
707
+ &::-webkit-scrollbar {
708
+ display: none;
709
+ }
710
+ }
711
+
712
+ [role="option"] {
713
+ box-sizing: border-box;
714
+
715
+ display: inline-flex;
716
+
717
+ flex-wrap: nowrap;
718
+ flex-direction: row;
719
+
720
+ width: auto;
721
+
722
+ gap: 10px;
723
+ margin-inline: 4px;
724
+ padding-inline: 10px;
725
+
726
+ align-items: center;
727
+ justify-content: flex-start;
728
+
729
+ height: 28px;
730
+ min-height: 28px;
731
+ border-radius: 4px;
732
+
733
+ cursor: pointer;
734
+ user-select: none;
735
+
736
+ font-size: var(--lat-font-size-small);
737
+ font-family: var(--lat-font-family-sans), sans-serif;
738
+ font-weight: var(--lat-font-weight-normal);
739
+
740
+ color: var(--lat-text-color);
741
+ background-color: var(--lat-background-color);
742
+
743
+ transition-property: background, border, color, fill, opacity;
744
+ transition-duration: 0.2s;
745
+
746
+ &:hover {
747
+ fill: var(--lat-text-color);
748
+ color: var(--lat-text-color);
749
+ border-color: var(--lat-background-color-subtle-hover);
750
+ background-color: var(--lat-background-color-subtle-hover);
751
+ }
752
+
753
+ span {
754
+ display: inline-flex;
755
+
756
+ overflow: hidden;
757
+ text-overflow: ellipsis;
758
+ white-space: nowrap;
759
+ }
760
+
761
+ //&:active {
762
+ // fill: var(--lat-text-color);
763
+ // color: var(--lat-text-color);
764
+ // border-color: var(--lat-background-color-subtle-active);
765
+ // background-color: var(--lat-background-color-subtle-active);
766
+ //}
767
+ }
768
+ }
769
+
770
+ //
771
+
772
+ //}
773
+ }
774
+
775
+ lat-textbox[type="number"] {
776
+ lat-spinners {
777
+ position: relative;
778
+ box-sizing: content-box;
779
+
780
+ display: flex;
781
+
782
+ flex-direction: column;
783
+
784
+ align-items: center;
785
+ justify-content: center;
786
+
787
+ width: var(--lat-textbox-height);
788
+ max-height: var(--lat-textbox-height);
789
+ line-height: var(--lat-textbox-height);
790
+
791
+ border-left-style: solid;
792
+ border-left-width: 1px;
793
+ border-left-color: var(--lat-textbox-border-color);
794
+
795
+ transition-property: background, border, color, fill, opacity;
796
+ transition-duration: .2s;
797
+
798
+ lat-button {
799
+ --lat-button-height: calc(var(--lat-textbox-height) / 2);
800
+
801
+ width: 100%;
802
+ border-radius: 0;
803
+ }
804
+ }
805
+ }
806
+
807
+ lat-checkbox {
808
+ display: inline-flex;
809
+
810
+ cursor: default;
811
+
812
+ align-items: center;
813
+ justify-content: flex-start;
814
+
815
+ font-family: var(--lat-font-family-sans), sans-serif;
816
+ font-weight: var(--lat-font-weight-normal);
817
+
818
+ &[data-size="sm"] {
819
+ height: 24px;
820
+ font-size: 12px;
821
+ line-height: 24px;
822
+
823
+ button {
824
+ width: 14px;
825
+ height: 14px;
826
+ line-height: 14px;
827
+ }
828
+ }
829
+
830
+ &[data-size="md"] {
831
+ height: 28px;
832
+ font-size: 12px;
833
+ line-height: 28px;
834
+
835
+ button {
836
+ width: 18px;
837
+ height: 18px;
838
+ line-height: 18px;
839
+ }
840
+ }
841
+
842
+ &[data-size="lg"] {
843
+ height: 32px;
844
+ font-size: 14px;
845
+ line-height: 32px;
846
+
847
+ button {
848
+ width: 22px;
849
+ height: 22px;
850
+ line-height: 22px;
851
+ }
852
+ }
853
+
854
+ button {
855
+ display: inline-flex;
856
+
857
+ align-items: center;
858
+ justify-content: center;
859
+
860
+ flex-shrink: 0;
861
+
862
+ border-width: 1px;
863
+ border-style: solid;
864
+ border-color: var(--lat-checkbox-border-color);
865
+ border-radius: 4px;
866
+
867
+ color: var(--lat-checkbox-text-color);
868
+ background-color: var(--lat-checkbox-background-color);
869
+
870
+ transition-property: background, border, color, fill, opacity;
871
+ transition-duration: .2s;
872
+
873
+ &[aria-checked="true"] {
874
+ --lat-checkbox-text-color: #ffffff;
875
+ --lat-checkbox-border-color: var(--lat-primary-color);
876
+ --lat-checkbox-background-color: var(--lat-primary-color);
877
+ }
878
+
879
+ &[aria-checked="false"] {
880
+ --lat-checkbox-text-color: #ffffff;
881
+ --lat-checkbox-border-color: var(--lat-outline-color);
882
+ --lat-checkbox-background-color: var(--lat-background-color);
883
+ }
884
+ }
885
+ }
886
+
887
+
888
+
@@ -0,0 +1,34 @@
1
+ lat-icon {
2
+ --lat-icon-url: initial;
3
+
4
+ position: relative;
5
+ box-sizing: border-box;
6
+
7
+ display: flex;
8
+
9
+ block-size: 1em;
10
+ inline-size: 1em;
11
+ vertical-align: middle;
12
+
13
+ font-size: inherit;
14
+ flex-shrink: 0;
15
+
16
+ border: 0 solid transparent;
17
+
18
+ &:not([data-polyfill="true"]):after {
19
+ position: absolute;
20
+
21
+ display: block;
22
+
23
+ top: 0;
24
+ left: 0;
25
+
26
+ block-size: 100%;
27
+ inline-size: 100%;
28
+
29
+ content: "";
30
+
31
+ mask: var(--lat-icon-url) no-repeat center / contain;
32
+ background: currentColor
33
+ }
34
+ }
File without changes
@@ -0,0 +1,30 @@
1
+
2
+
3
+ lat-listbox {
4
+ position: relative;
5
+ box-sizing: border-box;
6
+
7
+ overflow: hidden;
8
+
9
+ display: flex;
10
+ flex-direction: column;
11
+
12
+ outline: none;
13
+ pointer-events: auto;
14
+
15
+ [role="listbox"] {
16
+ position: relative;
17
+ box-sizing: border-box;
18
+
19
+ overflow-y: auto;
20
+
21
+ will-change: transform;
22
+
23
+ display: flex;
24
+ flex-direction: column;
25
+
26
+ [role="option"] {
27
+
28
+ }
29
+ }
30
+ }