@helpwave/hightide 0.2.0 → 0.4.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.
@@ -0,0 +1,290 @@
1
+ /* Button */
2
+ @layer components {
3
+ .btn-xs {
4
+ @apply flex-row-1 items-center justify-center px-1 py-0.75 rounded-1 h-7 text-sm;
5
+ }
6
+
7
+ .btn-sm {
8
+ @apply flex-row-1 items-center justify-center px-1.5 py-1 rounded-1.5 h-8;
9
+ }
10
+
11
+ .btn-md {
12
+ @apply flex-row-2 items-center justify-center px-3 py-2 rounded-1.5 h-10;
13
+ }
14
+
15
+ .btn-lg {
16
+ @apply flex-row-2 items-center justify-center px-4 py-2.5 rounded-1.5 h-12;
17
+ }
18
+
19
+ .icon-btn-xs {
20
+ @apply flex-row-0 items-center justify-center p-1 rounded-1 h-6 w-6;
21
+ }
22
+
23
+ .icon-btn-sm {
24
+ @apply flex-row-0 items-center justify-center p-1.5 rounded-1.5 h-8 w-8;
25
+ }
26
+
27
+ .icon-btn-md {
28
+ @apply flex-row-0 items-center justify-center p-2 rounded-1.5 h-10 w-10;
29
+ }
30
+
31
+ .icon-btn-lg {
32
+ @apply flex-row-0 items-center justify-center p-3 rounded-1.5 h-12 w-12;
33
+ }
34
+ }
35
+
36
+ /* Card */
37
+ @layer components {
38
+ .card-sm {
39
+ @apply flex-col-2 bg-surface text-on-surface px-2 py-1 rounded;
40
+ }
41
+
42
+ .card-md {
43
+ @apply flex-col-2 bg-surface text-on-surface px-4 py-2 rounded-md;
44
+ }
45
+
46
+ .card-lg {
47
+ @apply flex-col-2 bg-surface text-on-surface px-8 py-4 rounded-lg;
48
+ }
49
+ }
50
+
51
+ /* Chip */
52
+ @layer components {
53
+ .chip-sm {
54
+ @apply flex-row-1 items-center justify-center px-1 py-0.5 rounded-md;
55
+ }
56
+
57
+ .chip-md {
58
+ @apply flex-row-1 items-center justify-center px-2 py-1 rounded-md;
59
+ }
60
+
61
+ .chip-lg {
62
+ @apply flex-row-2 items-center justify-center px-4 py-2 rounded-md;
63
+ }
64
+ }
65
+
66
+ /* Link */
67
+ @layer components {
68
+ .link {
69
+ @apply decoration-3 p-2 hover:underline focus:underline font-bold text-lg rounded;
70
+ }
71
+ }
72
+
73
+ /* Focus */
74
+ @utility focus-style-outline {
75
+ &:focus-visible {
76
+ @apply outline-solid outline-2 outline-focus outline-offset-2;
77
+ }
78
+ }
79
+
80
+ @utility focus-style-border {
81
+ &:focus-visible {
82
+ @apply border-2 border-focus;
83
+ }
84
+ }
85
+
86
+ @utility focus-style-default {
87
+ &:focus-visible:not(.focus-style-none) {
88
+ @apply focus-style-outline;
89
+ }
90
+ }
91
+
92
+ @utility focus-style-none {
93
+ &:focus-visible {
94
+ @apply outline-none;
95
+ }
96
+ }
97
+
98
+ @utility input-element {
99
+ @apply border-2 border-transparent focus-style-none focus-style-border;
100
+ &:not([data-disabled]):not([data-invalid]) {
101
+ @apply bg-input-background hover:border-primary;
102
+
103
+ &:not([data-value]) {
104
+ @apply text-placeholder;
105
+ }
106
+
107
+ &[data-value] {
108
+ @apply text-input-text;
109
+ }
110
+ }
111
+
112
+ &:not([data-disabled])[data-invalid] {
113
+ @apply bg-negative/20;
114
+
115
+ --color-focus: var(--color-negative);
116
+
117
+ &[data-value] {
118
+ @apply text-negative;
119
+ }
120
+
121
+ &:not([data-value]) {
122
+ @apply text-placeholder;
123
+ }
124
+ }
125
+
126
+ &[data-disabled] {
127
+ @apply bg-disabled text-on-disabled;
128
+ }
129
+ }
130
+
131
+ /* input-elements */
132
+ @layer components {
133
+ *[data-name="input"]:not(.default-style-none) {
134
+ @apply px-3 py-2 rounded-md h-10 input-element;
135
+ }
136
+
137
+ *[data-name="textarea"]:not(.default-style-none) {
138
+ @apply w-full h-32 py-2 px-3 rounded-md resize-none overflow-y-scroll input-element;
139
+ }
140
+
141
+ *[data-name="select-button"]:not(.default-style-none) {
142
+ @apply flex-row-2 items-center justify-between rounded-md px-3 py-2 input-element;
143
+ }
144
+
145
+ *[data-name="select-button-chips"]:not(.default-style-none) {
146
+ @apply flex flex-wrap gap-2 items-center rounded-md px-2.5 py-2.5 input-element;
147
+ &:not([data-disabled]){
148
+ @apply hover:cursor-pointer;
149
+ }
150
+ }
151
+
152
+ *[data-name="checkbox"]:not(.default-style-none) {
153
+ @apply flex-col-0 items-center justify-center rounded input-element focus-style-outline;
154
+ &:not([data-disabled]){
155
+ @apply hover:cursor-pointer;
156
+ }
157
+ &:not([data-disabled]):not([data-invalid]):not([data-value='false']) {
158
+ @apply bg-primary/40 border-primary text-primary;
159
+ }
160
+ &:not([data-disabled]):not([data-invalid])[data-value='false'] {
161
+ @apply border-border text-border hover:border-primary hover:text-primary bg-transparent;
162
+ }
163
+ }
164
+ }
165
+
166
+ /* HTML Element defaults */
167
+ @layer components {
168
+ * {
169
+ @apply border-border list-none placeholder-placeholder;
170
+
171
+ @variant dark {
172
+ color-scheme: dark;
173
+ }
174
+ }
175
+
176
+ html {
177
+ @apply bg-background text-on-background;
178
+ }
179
+
180
+ button {
181
+ @apply cursor-pointer text-nowrap;
182
+ }
183
+
184
+ *:disabled {
185
+ @apply cursor-not-allowed;
186
+ }
187
+
188
+ @media (prefers-reduced-motion: reduce) {
189
+ * {
190
+ @apply transition-none animate-none;
191
+ }
192
+ }
193
+
194
+ /* move the focus styles into its own file and utilities */
195
+ *:focus {
196
+ @apply outline-0 ring-0;
197
+ }
198
+
199
+ * {
200
+ @apply focus-style-default;
201
+ }
202
+
203
+ /**
204
+ * Table
205
+ */
206
+ table {
207
+ @apply table-fixed border-separate border-spacing-0 bg-table-background text-table-text;
208
+ }
209
+
210
+ th {
211
+ @apply px-3 first:pl-6 last:pr-6 py-2.5 border-y-1 first:border-l-1 last:border-r-1 first:rounded-tl-lg last:rounded-tr-lg bg-table-header-background text-label font-bold;
212
+ }
213
+
214
+ tbody > tr {
215
+ @apply hover:bg-table-row-hover-background;
216
+ }
217
+
218
+ td {
219
+ @apply px-3 first:pl-6 last:pr-6 py-2.5 border-b-1 first:border-l-1 last:border-r-1 [nth-last-child(1)]:first:rounded-bl-lg [nth-last-child(1)]:last:rounded-br-lg;
220
+ }
221
+
222
+ tbody > tr:last-child > td {
223
+ @apply first:rounded-bl-lg last:rounded-br-lg;
224
+ }
225
+
226
+ .table-resize-indicator {
227
+ @apply absolute top-2 bottom-2 right-0;
228
+ }
229
+
230
+ th:last-child > .table-resize-indicator {
231
+ @apply right-6;
232
+ }
233
+
234
+ /**
235
+ * Scrollbar
236
+ */
237
+ @supports (scrollbar-color: auto) {
238
+ * {
239
+ scrollbar-color: var(--color-gray-500) transparent;
240
+ }
241
+ }
242
+
243
+ /* Otherwise, use `::-webkit-scrollbar-*` pseudo-elements */
244
+ @supports selector(::-webkit-scrollbar) {
245
+ * {
246
+ scrollbar-color: initial;
247
+ }
248
+
249
+ :root {
250
+ --scrollbar-width: 10px;
251
+ --scrollbar-padding: 1px;
252
+ }
253
+
254
+ *::-webkit-scrollbar {
255
+ width: var(--scrollbar-width);
256
+ height: var(--scrollbar-width);
257
+ }
258
+
259
+ *::-webkit-scrollbar-track {
260
+ border-radius: 9999px;
261
+ background: transparent;
262
+ cursor: default;
263
+ }
264
+
265
+ *::-webkit-scrollbar-thumb {
266
+ background-color: var(--color-gray-500);
267
+ border-radius: 9999px;
268
+ border: var(--scrollbar-padding) solid transparent;
269
+ background-clip: padding-box;
270
+ cursor: default;
271
+ transition: background-color 0.2s ease;
272
+ }
273
+
274
+ *::-webkit-scrollbar-thumb:active {
275
+ background-color: var(--color-gray-600);
276
+ }
277
+
278
+ *::-webkit-scrollbar-thumb:vertical {
279
+ min-height: calc(var(--scrollbar-width) * 3);
280
+ }
281
+
282
+ *::-webkit-scrollbar-thumb:horizontal {
283
+ min-width: calc(var(--scrollbar-width) * 3);
284
+ }
285
+
286
+ *::-webkit-scrollbar-corner {
287
+ background: transparent;
288
+ }
289
+ }
290
+ }
@@ -1,4 +1,5 @@
1
- @import './variants.css';
2
- @import './colors-basic.css';
3
- @import './colors-semantic.css';
4
- @import './colors-component.css';
1
+ @import './colors/index.css';
2
+ @import './typography.css';
3
+ @import './breakpoints.css';
4
+ @import './components.css';
5
+ @import './shadow.css';
@@ -0,0 +1,7 @@
1
+ @utility shadow-hw-bottom {
2
+ --shadow-bottom: 0 calc(1rem/16) calc(20rem/16) 0 var(--tw-shadow-color, rgb(0 0 0 / 10%));
3
+
4
+ @variant dark {
5
+ --shadow-bottom: 0 calc(1rem/16) calc(20rem/16) 0 var(--tw-shadow-color, rgb(0 0 0 / 20%));
6
+ }
7
+ }
@@ -184,9 +184,9 @@
184
184
  background: linear-gradient(
185
185
  120deg,
186
186
  transparent 0%,
187
- transparent 30%,
188
- rgba(255, 255, 255, 0.1) 50%,
189
- transparent 70%,
187
+ transparent 25%,
188
+ rgba(255, 255, 255, 0.15) 50%,
189
+ transparent 75%,
190
190
  transparent 100%
191
191
  );
192
192
  animation: shimmer 2s infinite;
@@ -0,0 +1,58 @@
1
+ @utility coloring-solid {
2
+ @apply
3
+ bg-[var(--coloring-solid-color,var(--coloring-color))]
4
+ text-[var(--coloring-solid-text,var(--coloring-on-color))];
5
+ }
6
+
7
+ @utility coloring-solid-hover {
8
+ @apply
9
+ coloring-solid
10
+ hover:bg-[var(--coloring-solid-hover,var(--coloring-hover))];
11
+ }
12
+
13
+ @utility coloring-tonal {
14
+ @apply
15
+ bg-[var(--coloring-color)]/20
16
+ text-[var(--coloring-color)];
17
+ }
18
+
19
+ @utility coloring-tonal-hover {
20
+ @apply
21
+ coloring-tonal
22
+ hover:bg-[var(--coloring-color)]/30;
23
+ }
24
+
25
+ @utility coloring-text {
26
+ @apply
27
+ text-[var(--coloring-text,var(--coloring-color))];
28
+ }
29
+
30
+ @utility coloring-text-hover {
31
+ @apply
32
+ coloring-text
33
+ hover:bg-[var(--coloring-text-hover,var(--coloring-text,var(--coloring-color)))]/20;
34
+ }
35
+
36
+ @utility coloring-outline {
37
+ @apply
38
+ border-1
39
+ border-[var(--coloring-border,var(--coloring-outline,var(--coloring-color)))]
40
+ text-[var(--coloring-outline,var(--coloring-color))];
41
+ }
42
+
43
+ @utility coloring-outline-hover {
44
+ @apply
45
+ coloring-outline
46
+ hover:border-[var(--coloring-border-hover,--coloring-hover)]
47
+ hover:text-[var(--coloring-outline-hover,var(--coloring-hover))];
48
+ }
49
+
50
+ @utility reset-coloring-variables {
51
+ --coloring-color: initial;
52
+ --coloring-on-color: initial;
53
+ --coloring-hover: initial;
54
+ --coloring-text: initial;
55
+ --coloring-text-hover: initial;
56
+ --coloring-outline: initial;
57
+ --coloring-outline-hover: initial;
58
+ }
@@ -2,4 +2,5 @@
2
2
  @import "./borderradius.css";
3
3
  @import "./animation.css";
4
4
  @import "./shadow.css";
5
- @import "./sizing.css";
5
+ @import "./sizing.css";
6
+ @import "./coloring.css";
@@ -1,5 +1,3 @@
1
- @import "tailwindcss";
2
-
3
1
  @utility shadow-side {
4
2
  box-shadow: var(--shadow-right, 0 0 0 transparent),
5
3
  var(--shadow-left, 0 0 0 transparent),
@@ -39,14 +37,6 @@
39
37
  --tw-shadow-color: rgba(0, 0, 0, 0.10);
40
38
  }
41
39
 
42
- @utility shadow-hw-bottom {
43
- --shadow-bottom: 0 calc(1rem/16) calc(20rem/16) 0 var(--tw-shadow-color, rgb(0 0 0 / 10%));
44
-
45
- @variant dark {
46
- --shadow-bottom: 0 calc(1rem/16) calc(20rem/16) 0 var(--tw-shadow-color, rgb(0 0 0 / 20%));
47
- }
48
- }
49
-
50
40
  @layer utilities {
51
41
  .shadow-around {
52
42
  @apply shadow-around-2;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/helpwave/hightide.git"
8
8
  },
9
9
  "license": "MPL-2.0",
10
- "version": "0.2.0",
10
+ "version": "0.4.0",
11
11
  "files": [
12
12
  "dist"
13
13
  ],
@@ -44,10 +44,8 @@
44
44
  "lucide-react": "0.468.0",
45
45
  "postcss": "8.5.3",
46
46
  "react": "18.3.1",
47
- "react-custom-scrollbars-2": "4.5.0",
48
47
  "react-dom": "18.3.1",
49
48
  "tailwindcss": "4.1.3",
50
- "tinycolor2": "1.6.0",
51
49
  "@helpwave/internationalization": "0.4.0"
52
50
  },
53
51
  "devDependencies": {
@@ -66,7 +64,6 @@
66
64
  "@types/react": "18.3.17",
67
65
  "@types/react-dom": "18.3.5",
68
66
  "@types/tinycolor2": "1.4.6",
69
- "barrelsby": "2.8.1",
70
67
  "eslint": "9.31.0",
71
68
  "eslint-plugin-storybook": "9.0.12",
72
69
  "jest": "30.2.0",
@@ -1,177 +0,0 @@
1
- @import './variants.css';
2
- @import './colors-semantic.css';
3
-
4
- /*
5
- * default light-theme component colors
6
- */
7
- @theme {
8
- /* Icon */
9
- --color-icon-primary: var(--color-text-primary);
10
- --color-icon-secondary: var(--color-text-secondary);
11
- --color-icon-highlight: var(--color-highlight);
12
-
13
- /* Button Outline */
14
- --color-button-outline-primary-outline: var(--color-primary);
15
- --color-button-outline-primary-icon: var(--color-primary);
16
- --color-button-outline-primary-text: var(--color-primary);
17
-
18
- /* Button Solid */
19
- --color-button-solid-primary-background: var(--color-primary);
20
- --color-button-solid-primary-text: var(--color-on-primary);
21
- --color-button-solid-primary-icon: var(--color-on-primary);
22
- --color-button-solid-secondary-background: var(--color-purple-50);
23
- --color-button-solid-secondary-text: var(--color-primary);
24
- --color-button-solid-secondary-icon: var(--color-primary);
25
- --color-button-solid-tertiary-background: var(--color-gray-50);
26
- --color-button-solid-tertiary-icon: var(--color-gray-500);
27
- --color-button-solid-tertiary-text: var(--color-gray-500);
28
- --color-button-solid-neutral-background: var(--color-gray-150);
29
- --color-button-solid-neutral-icon: var(--color-text-primary);
30
- --color-button-solid-neutral-text: var(--color-text-primary);
31
- --color-button-solid-positive-background: var(--color-positive);
32
- --color-button-solid-positive-icon: var(--color-on-positive);
33
- --color-button-solid-positive-text: var(--color-on-positive);
34
- --color-button-solid-warning-background: var(--color-warning);
35
- --color-button-solid-warning-icon: var(--color-on-warning);
36
- --color-button-solid-warning-text: var(--color-on-warning);
37
- --color-button-solid-negative-background: var(--color-negative);
38
- --color-button-solid-negative-icon: var(--color-on-negative);
39
- --color-button-solid-negative-text: var(--color-on-negative);
40
-
41
- /* Button Text */
42
- --color-button-text-hover-background: #77777733;
43
- --color-button-text-neutral-text: var(--color-gray-800);
44
- --color-button-text-neutral-icon: var(--color-gray-800);
45
- --color-button-text-negative-text: var(--color-negative);
46
- --color-button-text-negative-icon: var(--color-negative);
47
- --color-button-text-primary-text: var(--color-primary);
48
- --color-button-text-primary-icon: var(--color-primary);
49
-
50
- /* Carousel */
51
- --color-carousel-dot-active: var(--color-primary);
52
- --color-carousel-dot-disabled: var(--color-disabled-background);
53
-
54
- /* Input */
55
- --color-input-background: var(--color-surface-variant);
56
- --color-input-text: var(--color-on-surface);
57
-
58
- /* Menu */
59
- --color-menu-background: var(--color-surface-variant);
60
- --color-menu-text: var(--color-on-surface);
61
- --color-menu-border: var(--color-border);
62
-
63
- /* Label */
64
- --color-label-text: var(--color-text-secondary);
65
-
66
- /* Overlay, Dialog, Modal */
67
- --color-overlay-background: var(--color-surface);
68
- --color-overlay-text: var(--color-on-surface);
69
- --color-overlay-shadow: #00000039;
70
-
71
- /* ProgressIndicator */
72
- --color-progress-indicator-fill: var(--color-primary);
73
- --color-progress-indicator-background: var(--color-gray-300);
74
-
75
- /* Property */
76
- --color-property-title-background: var(--color-gray-100);
77
- --color-property-title-text: var(--color-text-secondary);
78
-
79
- /* Scrollbar */
80
- --color-scrollbar-track: #00000033;
81
- --color-scrollbar-thumb: var(--color-gray-600);
82
-
83
- /* Stepper Bar */
84
- --color-stepperbar-dot-active: var(--color-primary);
85
- --color-stepperbar-dot-normal: var(--color-purple-100);
86
- --color-stepperbar-dot-disabled: var(--color-description);
87
-
88
- /* Table */
89
- --color-table-background: var(--color-surface);
90
- --color-table-text: var(--color-on-surface);
91
- --color-table-header-background: color-mix(in srgb, var(--color-blue-500) 15%, var(--color-surface));
92
- --color-table-row-hover-background: color-mix(in srgb, var(--color-purple-500) 15%, var(--color-surface));
93
-
94
- /* Tag */
95
- --color-tag-dark-background: var(--color-gray-800);
96
- --color-tag-dark-text: var(--color-gray-100);
97
- --color-tag-dark-icon: var(--color-gray-100);
98
- --color-tag-default-background: #50687C;
99
- --color-tag-default-text: var(--color-gray-100);
100
- --color-tag-default-icon: var(--color-gray-100);
101
- --color-tag-green-background: #E2E9DB;
102
- --color-tag-green-text: #7A977E;
103
- --color-tag-green-icon: #7A977E;
104
- --color-tag-yellow-background: #FEEACB;
105
- --color-tag-yellow-text: #C79345;
106
- --color-tag-yellow-icon: #C79345;
107
- --color-tag-red-background: #FEE0DD;
108
- --color-tag-red-text: #D67268;
109
- --color-tag-red-icon: #D67268;
110
- --color-tag-blue-background: #DBE2F3;
111
- --color-tag-blue-text: #758ECE;
112
- --color-tag-blue-icon: #758ECE;
113
- --color-tag-pink-background: #F3DBE7;
114
- --color-tag-pink-text: #CE75A0;
115
- --color-tag-pink-icon: #CE75A0;
116
- --color-tag-orange-background: #FEEACB;
117
- --color-tag-orange-text: #EA8E00;
118
- --color-tag-orange-icon: #EA8E00;
119
-
120
- /* TextImage */
121
- --color-text-image-primary-background: var(--color-primary);
122
- --color-text-image-primary-text: var(--color-white);
123
- --color-text-image-secondary-background: var(--color-blue-500);
124
- --color-text-image-secondary-text: var(--color-white);
125
- --color-text-image-dark-background: var(--color-blue-900);
126
- --color-text-image-dark-text: var(--color-white);
127
-
128
- /* Tooltip */
129
- --color-tooltip-background: var(--color-menu-background);
130
- --color-tooltip-text: var(--color-description);
131
-
132
- /* Other */
133
- --color-border: var(--color-gray-200);
134
- --color-divider: var(--color-gray-100);
135
- --color-focus: var(--color-primary);
136
- --color-outline: var(--color-gray-100);
137
- --color-outline-variant: var(--color-gray-200);
138
- }
139
-
140
- /* non light-theme overrides */
141
- @layer base {
142
- /* dark theme */
143
- @variant dark {
144
- /* Button Solid */
145
- --color-button-solid-neutral-background: var(--color-gray-750);
146
- --color-button-solid-neutral-icon: var(--color-gray-100);
147
- --color-button-solid-neutral-text: var(--color-gray-100);
148
-
149
- /* Button Text */
150
- --color-button-text-hover-background: #3F3F3F33;
151
- --color-button-text-neutral-text: var(--color-gray-100);
152
- --color-button-text-neutral-icon: var(--color-gray-100);
153
-
154
- /* Property */
155
- --color-property-title-background: var(--color-gray-750);
156
-
157
- /* ProgressIndicator */
158
- --color-progress-indicator-background: var(--color-gray-700);
159
-
160
- /* Overlay, Dialog, Modal */
161
- --color-overlay-shadow: #00000060;
162
-
163
- /* Scrollbar */
164
- --color-scrollbar-track: #FFFFFF33;
165
- --color-scrollbar-thumb: var(--color-gray-300);
166
-
167
- /* Tag */
168
- --color-tag-dark-background: var(--color-gray-900);
169
-
170
- /* Other */
171
- --color-border: var(--color-gray-600);
172
- --color-divider: var(--color-gray-700);
173
- --color-focus: var(--color-primary);
174
- --color-outline: var(--color-gray-700);
175
- --color-outline-variant: var(--color-gray-600);
176
- }
177
- }