@thl-ui/styles 0.0.0-stage → 0.1.1

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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -2
  3. package/dist/components/alert.css +1 -0
  4. package/dist/components/app.css +1 -0
  5. package/dist/components/avatar.css +1 -0
  6. package/dist/components/badge.css +1 -0
  7. package/dist/components/button.css +1 -0
  8. package/dist/components/card.css +1 -0
  9. package/dist/components/form.css +1 -0
  10. package/dist/components/nav.css +1 -0
  11. package/dist/components/overlay.css +1 -0
  12. package/dist/components/pages.css +1 -0
  13. package/dist/components/progress.css +1 -0
  14. package/dist/components/ribbon.css +1 -0
  15. package/dist/components/table.css +1 -0
  16. package/dist/components/widgets.css +1 -0
  17. package/dist/fonts/OFL.txt +93 -0
  18. package/dist/fonts/open-sans-cyrillic-ext-wght-normal.woff2 +0 -0
  19. package/dist/fonts/open-sans-cyrillic-wght-normal.woff2 +0 -0
  20. package/dist/fonts/open-sans-greek-ext-wght-normal.woff2 +0 -0
  21. package/dist/fonts/open-sans-greek-wght-normal.woff2 +0 -0
  22. package/dist/fonts/open-sans-latin-ext-wght-normal.woff2 +0 -0
  23. package/dist/fonts/open-sans-latin-wght-normal.woff2 +0 -0
  24. package/dist/fonts/open-sans-vietnamese-wght-normal.woff2 +0 -0
  25. package/dist/fonts.css +70 -0
  26. package/dist/thl-ui.css +447 -0
  27. package/dist/tokens.css +376 -0
  28. package/package.json +48 -4
  29. package/src/_base.scss +408 -0
  30. package/src/_mixins.scss +53 -0
  31. package/src/components/_alert.scss +183 -0
  32. package/src/components/_avatar.scss +75 -0
  33. package/src/components/_badge.scss +112 -0
  34. package/src/components/_button.scss +242 -0
  35. package/src/components/_card.scss +211 -0
  36. package/src/components/_form.scss +959 -0
  37. package/src/components/_nav.scss +738 -0
  38. package/src/components/_overlay.scss +382 -0
  39. package/src/components/_progress.scss +103 -0
  40. package/src/components/_ribbon.scss +136 -0
  41. package/src/components/_table.scss +215 -0
  42. package/src/components/_widgets.scss +1102 -0
  43. package/src/index.scss +16 -0
  44. package/src/layout/_app.scss +804 -0
  45. package/src/pages/_pages.scss +691 -0
@@ -0,0 +1,215 @@
1
+ @use '../mixins' as *;
2
+
3
+ .#{$p}-table-wrap {
4
+ width: 100%;
5
+ overflow-x: auto;
6
+ -webkit-overflow-scrolling: touch;
7
+ }
8
+ .#{$p}-table-toolbar {
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ gap: 12px;
13
+ flex-wrap: wrap;
14
+ margin-bottom: 15px;
15
+ color: v(text);
16
+ label {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ gap: 8px;
20
+ }
21
+ .#{$p}-input {
22
+ width: auto;
23
+ }
24
+ }
25
+ .#{$p}-table-footer {
26
+ display: flex;
27
+ justify-content: space-between;
28
+ align-items: center;
29
+ gap: 12px;
30
+ flex-wrap: wrap;
31
+ margin-top: 10px;
32
+ color: v(text);
33
+ font-size: 13px;
34
+ .#{$p}-pagination {
35
+ margin: 0;
36
+ }
37
+ }
38
+
39
+ .#{$p}-table {
40
+ --_head-bg: transparent;
41
+ --_head-fg: #{v(heading)};
42
+ width: 100%;
43
+ border-collapse: collapse;
44
+ margin-bottom: 20px;
45
+ color: v(text);
46
+ font-size: 14px;
47
+ th,
48
+ td {
49
+ padding: 15px 8px;
50
+ text-align: start;
51
+ vertical-align: middle;
52
+ border-top: 1px solid v(border-color);
53
+ }
54
+ thead th {
55
+ color: var(--_head-fg);
56
+ background: var(--_head-bg);
57
+ font-weight: 500;
58
+ border-top: 0;
59
+ border-bottom: 1px solid v(border-color);
60
+ white-space: nowrap;
61
+ }
62
+ tbody tr.is-selected td {
63
+ background: color-mix(in srgb, #{v(theme)} 6%, transparent);
64
+ }
65
+ &--striped tbody tr:nth-child(odd) td {
66
+ background: v(surface-muted);
67
+ }
68
+ &--hover tbody tr:hover td {
69
+ background: color-mix(in srgb, #{v(surface-muted)} 70%, #{v(border-color)});
70
+ }
71
+ &--bordered {
72
+ border: 1px solid v(border-color);
73
+ th,
74
+ td {
75
+ border: 1px solid v(border-color);
76
+ }
77
+ }
78
+ &--compact th,
79
+ &--compact td {
80
+ padding: 8px;
81
+ }
82
+ &__sort {
83
+ display: inline-flex;
84
+ align-items: center;
85
+ gap: 6px;
86
+ background: none;
87
+ border: 0;
88
+ font: inherit;
89
+ color: inherit;
90
+ cursor: pointer;
91
+ padding: 0;
92
+ &-icon {
93
+ display: inline-flex;
94
+ flex-direction: column;
95
+ font-size: 8px;
96
+ line-height: 7px;
97
+ opacity: 0.35;
98
+ }
99
+ &.is-asc .#{$p}-table__sort-icon > :first-child,
100
+ &.is-desc .#{$p}-table__sort-icon > :last-child {
101
+ opacity: 1;
102
+ color: v(theme-text);
103
+ }
104
+ &.is-asc,
105
+ &.is-desc {
106
+ color: v(theme-text);
107
+ .#{$p}-table__sort-icon {
108
+ opacity: 1;
109
+ }
110
+ }
111
+ }
112
+ &__sort-icon > * {
113
+ opacity: 0.5;
114
+ }
115
+ &__check {
116
+ width: 40px;
117
+ }
118
+ &__empty td {
119
+ text-align: center;
120
+ padding: 30px;
121
+ color: v(text);
122
+ }
123
+ &__cell--center {
124
+ text-align: center !important;
125
+ }
126
+ &__cell--right {
127
+ text-align: end !important;
128
+ }
129
+ &__editable {
130
+ cursor: text;
131
+ border-bottom: 1px dashed v(link);
132
+ &:hover {
133
+ color: v(link);
134
+ }
135
+ }
136
+ &__edit-input {
137
+ width: 100%;
138
+ min-width: 80px;
139
+ }
140
+
141
+ /* colored header / full color tables */
142
+ @each $c in $colors {
143
+ &--color-#{$c} {
144
+ --_head-bg: #{v(color-#{$c})};
145
+ --_head-fg: #{on($c)};
146
+ }
147
+ &--full-#{$c} {
148
+ --_head-bg: #{v(color-#{$c})};
149
+ --_head-fg: #{on($c)};
150
+ tbody td {
151
+ background: color-mix(in srgb, #{v(color-#{$c})} 18%, #{v(surface)});
152
+ color: v(text-strong);
153
+ border-color: color-mix(in srgb, #{v(color-#{$c})} 30%, transparent);
154
+ }
155
+ &.#{$p}-table--hover tbody tr:hover td {
156
+ background: color-mix(in srgb, #{v(color-#{$c})} 30%, #{v(surface)});
157
+ }
158
+ }
159
+ &--bordered-#{$c} {
160
+ border: 1px solid v(color-#{$c});
161
+ th,
162
+ td {
163
+ border-color: v(color-#{$c});
164
+ }
165
+ --_head-bg: #{v(color-#{$c})};
166
+ --_head-fg: #{on($c)};
167
+ }
168
+ }
169
+ &--color-muted {
170
+ --_head-bg: #{v(color-muted)};
171
+ --_head-fg: #{on('muted')};
172
+ }
173
+
174
+ /* responsive stacked mode */
175
+ @include down(sm) {
176
+ &--stack {
177
+ thead {
178
+ display: none;
179
+ }
180
+ tr {
181
+ display: block;
182
+ border-bottom: 2px solid v(border-color);
183
+ }
184
+ td {
185
+ display: flex;
186
+ justify-content: space-between;
187
+ gap: 12px;
188
+ border: 0;
189
+ padding: 8px;
190
+ text-align: end;
191
+ &::before {
192
+ content: attr(data-label);
193
+ font-weight: 600;
194
+ color: v(heading);
195
+ text-align: start;
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ .#{$p}-col-hidden-sm {
202
+ @include down(sm) {
203
+ display: none;
204
+ }
205
+ }
206
+ .#{$p}-col-hidden-md {
207
+ @include down(md) {
208
+ display: none;
209
+ }
210
+ }
211
+ .#{$p}-col-hidden-lg {
212
+ @include down(lg) {
213
+ display: none;
214
+ }
215
+ }