wilday_ui 0.6.0 → 0.8.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,108 @@
1
+ .w-button-feedback {
2
+ position: absolute;
3
+ padding: 0.5rem 1rem;
4
+ background: rgba(0, 0, 0, 0.8);
5
+ color: white;
6
+ border-radius: 4px;
7
+ font-size: 0.875rem;
8
+ pointer-events: none;
9
+ opacity: 0;
10
+ transition: opacity 0.2s ease;
11
+ z-index: 50;
12
+ white-space: nowrap;
13
+ }
14
+
15
+ /* Basic positions */
16
+ .w-button-feedback-top {
17
+ bottom: 100%;
18
+ left: 50%;
19
+ transform: translateX(-50%);
20
+ margin-bottom: 0.5rem;
21
+ }
22
+
23
+ .w-button-feedback-bottom {
24
+ top: 100%;
25
+ left: 50%;
26
+ transform: translateX(-50%);
27
+ margin-top: 0.5rem;
28
+ }
29
+
30
+ .w-button-feedback-left {
31
+ right: 100%;
32
+ top: 50%;
33
+ transform: translateY(-50%);
34
+ margin-right: 0.5rem;
35
+ }
36
+
37
+ .w-button-feedback-right {
38
+ left: 100%;
39
+ top: 50%;
40
+ transform: translateY(-50%);
41
+ margin-left: 0.5rem;
42
+ }
43
+
44
+ /* Start/End modifiers */
45
+ .w-button-feedback-top.w-button-feedback-start,
46
+ .w-button-feedback-bottom.w-button-feedback-start {
47
+ left: 0;
48
+ transform: translateX(0);
49
+ }
50
+
51
+ .w-button-feedback-top.w-button-feedback-end,
52
+ .w-button-feedback-bottom.w-button-feedback-end {
53
+ left: auto;
54
+ right: 0;
55
+ transform: translateX(0);
56
+ }
57
+
58
+ .w-button-feedback-left.w-button-feedback-start,
59
+ .w-button-feedback-right.w-button-feedback-start {
60
+ top: 0;
61
+ transform: translateY(0);
62
+ }
63
+
64
+ .w-button-feedback-left.w-button-feedback-end,
65
+ .w-button-feedback-right.w-button-feedback-end {
66
+ top: auto;
67
+ bottom: 0;
68
+ transform: translateY(0);
69
+ }
70
+
71
+ /* Show state */
72
+ .w-button-feedback-show {
73
+ opacity: 1;
74
+ }
75
+
76
+ /* Optional: Add arrow indicators */
77
+ .w-button-feedback::before {
78
+ content: "";
79
+ position: absolute;
80
+ width: 8px;
81
+ height: 8px;
82
+ background: inherit;
83
+ transform: rotate(45deg);
84
+ }
85
+
86
+ .w-button-feedback-top::before {
87
+ bottom: -4px;
88
+ left: 50%;
89
+ margin-left: -4px;
90
+ }
91
+
92
+ .w-button-feedback-bottom::before {
93
+ top: -4px;
94
+ left: 50%;
95
+ margin-left: -4px;
96
+ }
97
+
98
+ .w-button-feedback-left::before {
99
+ right: -4px;
100
+ top: 50%;
101
+ margin-top: -4px;
102
+ }
103
+
104
+ .w-button-feedback-right::before {
105
+ left: -4px;
106
+ top: 50%;
107
+ margin-top: -4px;
108
+ }
@@ -0,0 +1,136 @@
1
+ .w-button-confirmation-dialog {
2
+ padding: 0;
3
+ border: none;
4
+ border-radius: 0.5rem;
5
+ box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
6
+ max-width: 28rem;
7
+ width: 90vw;
8
+ background: var(--w-color-light-50, #ffffff);
9
+ }
10
+
11
+ .w-button-confirmation-dialog::backdrop {
12
+ background-color: rgb(0 0 0 / 0.4);
13
+ backdrop-filter: blur(4px);
14
+ }
15
+
16
+ .w-button-confirmation-dialog-content {
17
+ padding: 1.5rem;
18
+ }
19
+
20
+ .w-button-confirmation-dialog-icon {
21
+ margin-bottom: 1rem;
22
+ width: 2.5rem;
23
+ height: 2.5rem;
24
+ }
25
+
26
+ .w-button-confirmation-dialog-icon svg {
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+
31
+ .w-button-confirmation-dialog-icon.info {
32
+ color: var(--w-color-info-500);
33
+ }
34
+
35
+ .w-button-confirmation-dialog-icon.success {
36
+ color: var(--w-color-success-500);
37
+ }
38
+
39
+ .w-button-confirmation-dialog-icon.warning {
40
+ color: var(--w-color-warning-500);
41
+ }
42
+
43
+ .w-button-confirmation-dialog-icon.danger {
44
+ color: var(--w-color-danger-500);
45
+ }
46
+
47
+ .w-button-confirmation-dialog-title {
48
+ font-size: 1.125rem;
49
+ font-weight: 600;
50
+ color: var(--w-color-dark-800, #1f2937); /* Darker text for better contrast */
51
+ margin-bottom: 0.5rem;
52
+ }
53
+
54
+ .w-button-confirmation-dialog-message {
55
+ color: var(--w-color-dark-600, #4b5563); /* Adjusted for better readability */
56
+ margin-bottom: 1.5rem;
57
+ line-height: 1.5;
58
+ }
59
+
60
+ .w-button-confirmation-dialog-actions {
61
+ display: flex;
62
+ justify-content: flex-end;
63
+ gap: 0.75rem;
64
+ }
65
+
66
+ /* Mobile Responsive Styles */
67
+ @media (max-width: 640px) {
68
+ .w-button-confirmation-dialog {
69
+ width: 95vw; /* Slightly wider on mobile */
70
+ margin: 1rem;
71
+ max-height: 90vh; /* Prevent overflow on small screens */
72
+ overflow-y: auto; /* Allow scrolling if content is too tall */
73
+ position: fixed;
74
+ top: 50%;
75
+ left: 50%;
76
+ transform: translate(-50%, -50%);
77
+ margin: 0;
78
+ }
79
+
80
+ .w-button-confirmation-dialog-content {
81
+ padding: 1rem; /* Slightly smaller padding on mobile */
82
+ }
83
+
84
+ .w-button-confirmation-dialog-actions {
85
+ flex-direction: column-reverse; /* Stack buttons vertically */
86
+ gap: 0.5rem; /* Smaller gap between buttons */
87
+ padding: 1rem; /* Add padding around buttons */
88
+ }
89
+
90
+ .w-button-confirmation-dialog-actions button {
91
+ width: 100%; /* Full width buttons */
92
+ margin: 0; /* Remove any margins */
93
+ }
94
+
95
+ .w-button-confirmation-dialog-icon {
96
+ margin-bottom: 0.75rem; /* Slightly reduced spacing */
97
+ width: 2rem; /* Slightly smaller icon */
98
+ height: 2rem;
99
+ }
100
+
101
+ .w-button-confirmation-dialog-title {
102
+ font-size: 1rem; /* Slightly smaller title */
103
+ }
104
+
105
+ .w-button-confirmation-dialog-message {
106
+ font-size: 0.875rem; /* Slightly smaller message text */
107
+ }
108
+ }
109
+
110
+ /* Handle very small screens */
111
+ @media (max-width: 360px) {
112
+ .w-button-confirmation-dialog {
113
+ width: 98vw;
114
+ margin: 0.5rem;
115
+ }
116
+ }
117
+
118
+ /* Handle landscape orientation */
119
+ @media (max-height: 600px) and (orientation: landscape) {
120
+ .w-button-confirmation-dialog {
121
+ max-height: 95vh;
122
+ display: flex;
123
+ flex-direction: row;
124
+ }
125
+
126
+ .w-button-confirmation-dialog-content {
127
+ flex: 1;
128
+ padding: 1rem;
129
+ }
130
+
131
+ .w-button-confirmation-dialog-actions {
132
+ padding: 1rem;
133
+ flex-direction: column;
134
+ justify-content: center;
135
+ }
136
+ }
@@ -0,0 +1,258 @@
1
+ .w-tooltip {
2
+ position: absolute;
3
+ z-index: 1000;
4
+ padding: 0.5rem 1rem;
5
+ font-size: 0.875rem;
6
+ line-height: 1.25rem;
7
+ border-radius: 0.375rem;
8
+ pointer-events: none;
9
+ opacity: 0;
10
+ transform: scale(0.95);
11
+ transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
12
+ max-width: 20rem; /* 320px */
13
+ word-wrap: break-word;
14
+ white-space: normal;
15
+ }
16
+
17
+ /* Position and Alignment transforms */
18
+ /* Bottom position */
19
+ .w-tooltip[data-position="bottom"][data-align="start"] {
20
+ transform-origin: top left;
21
+ transform: scale(0.95); /* Reset transform */
22
+ }
23
+
24
+ .w-tooltip[data-position="bottom"][data-align="center"] {
25
+ transform-origin: top center;
26
+ transform: translateX(-50%) scale(0.95);
27
+ }
28
+
29
+ .w-tooltip[data-position="bottom"][data-align="end"] {
30
+ transform-origin: top right;
31
+ transform: translateX(-100%) scale(0.95);
32
+ }
33
+
34
+ /* Top position */
35
+ .w-tooltip[data-position="top"][data-align="start"] {
36
+ transform-origin: bottom left;
37
+ transform: scale(0.95); /* Reset transform */
38
+ }
39
+
40
+ .w-tooltip[data-position="top"][data-align="center"] {
41
+ transform-origin: bottom center;
42
+ transform: translateX(-50%) scale(0.95);
43
+ }
44
+
45
+ .w-tooltip[data-position="top"][data-align="end"] {
46
+ transform-origin: bottom right;
47
+ transform: translateX(-100%) scale(0.95);
48
+ }
49
+
50
+ /* Left position */
51
+ .w-tooltip[data-position="left"][data-align="start"] {
52
+ transform-origin: right top;
53
+ transform: scale(0.95); /* Reset transform */
54
+ }
55
+
56
+ .w-tooltip[data-position="left"][data-align="center"] {
57
+ transform-origin: right center;
58
+ transform: translateY(-50%) scale(0.95);
59
+ }
60
+
61
+ .w-tooltip[data-position="left"][data-align="end"] {
62
+ transform-origin: right bottom;
63
+ transform: translateY(-100%) scale(0.95);
64
+ }
65
+
66
+ /* Right position */
67
+ .w-tooltip[data-position="right"][data-align="start"] {
68
+ transform-origin: left top;
69
+ transform: scale(0.95); /* Reset transform */
70
+ }
71
+
72
+ .w-tooltip[data-position="right"][data-align="center"] {
73
+ transform-origin: left center;
74
+ transform: translateY(-50%) scale(0.95);
75
+ }
76
+
77
+ .w-tooltip[data-position="right"][data-align="end"] {
78
+ transform-origin: left bottom;
79
+ transform: translateY(-100%) scale(0.95);
80
+ }
81
+
82
+ /* Visible state transforms */
83
+ .w-tooltip-visible[data-position="bottom"][data-align="start"],
84
+ .w-tooltip-visible[data-position="top"][data-align="start"],
85
+ .w-tooltip-visible[data-position="left"][data-align="start"],
86
+ .w-tooltip-visible[data-position="right"][data-align="start"] {
87
+ transform: scale(1);
88
+ }
89
+
90
+ .w-tooltip-visible[data-position="bottom"][data-align="center"],
91
+ .w-tooltip-visible[data-position="top"][data-align="center"] {
92
+ transform: translateX(-50%) scale(1);
93
+ }
94
+
95
+ .w-tooltip-visible[data-position="bottom"][data-align="end"],
96
+ .w-tooltip-visible[data-position="top"][data-align="end"] {
97
+ transform: translateX(-100%) scale(1);
98
+ }
99
+
100
+ .w-tooltip-visible[data-position="left"][data-align="center"],
101
+ .w-tooltip-visible[data-position="right"][data-align="center"] {
102
+ transform: translateY(-50%) scale(1);
103
+ }
104
+
105
+ .w-tooltip-visible[data-position="left"][data-align="end"],
106
+ .w-tooltip-visible[data-position="right"][data-align="end"] {
107
+ transform: translateY(-100%) scale(1);
108
+ }
109
+
110
+ .w-tooltip-visible {
111
+ opacity: 1;
112
+ transform: scale(1);
113
+ }
114
+
115
+ /* Themes */
116
+ .w-tooltip-light {
117
+ background-color: white;
118
+ color: #1f2937;
119
+ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
120
+ border: 1px solid #e5e7eb;
121
+ }
122
+
123
+ .w-tooltip-dark {
124
+ background-color: #1f2937;
125
+ color: white;
126
+ }
127
+
128
+ .w-tooltip-transparent {
129
+ background-color: rgba(0, 0, 0, 0.75);
130
+ color: white;
131
+ }
132
+
133
+ /* Add size variants */
134
+ .w-tooltip-size-sm {
135
+ max-width: 12rem; /* 192px */
136
+ }
137
+
138
+ .w-tooltip-size-md {
139
+ max-width: 20rem; /* 320px - default */
140
+ }
141
+
142
+ .w-tooltip-size-lg {
143
+ max-width: 24rem; /* 384px */
144
+ }
145
+
146
+ /* Arrow base styles */
147
+ .w-tooltip-arrow {
148
+ --arrow-size: 8px;
149
+ padding: calc(
150
+ var(--arrow-size) + 4px
151
+ ) !important; /* Add padding to accommodate arrow */
152
+ }
153
+
154
+ .w-tooltip-arrow::before {
155
+ content: "";
156
+ position: absolute;
157
+ width: var(--arrow-size);
158
+ height: var(--arrow-size);
159
+ background: inherit;
160
+ border: 1px solid;
161
+ border-color: inherit;
162
+ transform: rotate(45deg);
163
+ z-index: -1;
164
+ }
165
+
166
+ /* Arrow positions */
167
+ .w-tooltip-arrow[data-position="top"]::before {
168
+ bottom: calc(var(--arrow-size) / -2);
169
+ border-top: 0;
170
+ border-left: 0;
171
+ }
172
+
173
+ .w-tooltip-arrow[data-position="bottom"]::before {
174
+ top: calc(var(--arrow-size) / -2);
175
+ border-bottom: 0;
176
+ border-right: 0;
177
+ }
178
+
179
+ .w-tooltip-arrow[data-position="left"]::before {
180
+ right: calc(var(--arrow-size) / -2);
181
+ border-left: 0;
182
+ border-bottom: 0;
183
+ }
184
+
185
+ .w-tooltip-arrow[data-position="right"]::before {
186
+ left: calc(var(--arrow-size) / -2);
187
+ border-right: 0;
188
+ border-top: 0;
189
+ }
190
+
191
+ /* Arrow alignment */
192
+ .w-tooltip-arrow[data-position="top"][data-align="start"]::before,
193
+ .w-tooltip-arrow[data-position="bottom"][data-align="start"]::before {
194
+ left: var(--arrow-size);
195
+ }
196
+
197
+ .w-tooltip-arrow[data-position="top"][data-align="center"]::before,
198
+ .w-tooltip-arrow[data-position="bottom"][data-align="center"]::before {
199
+ left: 50%;
200
+ transform: translateX(-50%) rotate(45deg);
201
+ }
202
+
203
+ .w-tooltip-arrow[data-position="top"][data-align="end"]::before,
204
+ .w-tooltip-arrow[data-position="bottom"][data-align="end"]::before {
205
+ right: var(--arrow-size);
206
+ left: auto;
207
+ }
208
+
209
+ .w-tooltip-arrow[data-position="left"][data-align="start"]::before,
210
+ .w-tooltip-arrow[data-position="right"][data-align="start"]::before {
211
+ top: var(--arrow-size);
212
+ }
213
+
214
+ .w-tooltip-arrow[data-position="left"][data-align="center"]::before,
215
+ .w-tooltip-arrow[data-position="right"][data-align="center"]::before {
216
+ top: 50%;
217
+ transform: translateY(-50%) rotate(45deg);
218
+ }
219
+
220
+ .w-tooltip-arrow[data-position="left"][data-align="end"]::before,
221
+ .w-tooltip-arrow[data-position="right"][data-align="end"]::before {
222
+ bottom: var(--arrow-size);
223
+ top: auto;
224
+ }
225
+
226
+ /* Theme-specific arrow styles */
227
+ .w-tooltip-arrow.w-tooltip-light::before {
228
+ background-color: white;
229
+ border-color: #e5e7eb;
230
+ }
231
+
232
+ .w-tooltip-arrow.w-tooltip-dark::before {
233
+ background-color: #1f2937;
234
+ border-color: #1f2937;
235
+ }
236
+
237
+ .w-tooltip-arrow.w-tooltip-transparent::before {
238
+ background-color: rgba(0, 0, 0, 0.75);
239
+ border-color: transparent;
240
+ }
241
+
242
+ /* Add custom theme support */
243
+ .w-tooltip-custom {
244
+ background-color: var(--tooltip-bg-color);
245
+ color: var(--tooltip-text-color);
246
+ }
247
+
248
+ .w-tooltip-arrow.w-tooltip-custom::before {
249
+ background-color: var(--tooltip-bg-color);
250
+ border-color: var(--tooltip-bg-color);
251
+ }
252
+
253
+ /* Optional: Add different max-widths for different screen sizes */
254
+ @media (max-width: 640px) {
255
+ .w-tooltip {
256
+ max-width: 16rem; /* 256px */
257
+ }
258
+ }
@@ -152,6 +152,11 @@ a.w-button.w-button-no-underline:hover {
152
152
  color: #000000;
153
153
  }
154
154
 
155
+ /* Override underline for plain buttons */
156
+ a.w-button-plain.w-button-underline {
157
+ text-decoration: none;
158
+ }
159
+
155
160
  .w-button-plain:focus-visible {
156
161
  outline: 2px solid #1a1a1a;
157
162
  outline-offset: 2px;
@@ -8,6 +8,10 @@
8
8
  *= require ./features/loading
9
9
  *= require ./features/dropdown
10
10
  *= require ./features/gradients
11
+ *= require ./features/clipboard
12
+ *= require ./features/confirmation
13
+ *= require ./features/tooltip
14
+ *= require ../../tokens/colors
11
15
  */
12
16
 
13
17
  /* Your direct CSS code can go here */
@@ -0,0 +1,109 @@
1
+ :root {
2
+ /* Primary Colors */
3
+ --w-color-primary-50: #e5f0ff;
4
+ --w-color-primary-100: #cce0ff;
5
+ --w-color-primary-200: #99c2ff;
6
+ --w-color-primary-300: #66a3ff;
7
+ --w-color-primary-400: #3385ff;
8
+ --w-color-primary-500: #0066ff;
9
+ --w-color-primary-600: #0052cc;
10
+ --w-color-primary-700: #003d99;
11
+ --w-color-primary-800: #002966;
12
+ --w-color-primary-900: #001433;
13
+
14
+ /* Secondary Colors */
15
+ --w-color-secondary-50: #f8f9fa;
16
+ --w-color-secondary-100: #e9ecef;
17
+ --w-color-secondary-200: #dee2e6;
18
+ --w-color-secondary-300: #ced4da;
19
+ --w-color-secondary-400: #adb5bd;
20
+ --w-color-secondary-500: #6c757d;
21
+ --w-color-secondary-600: #5a6268;
22
+ --w-color-secondary-700: #495057;
23
+ --w-color-secondary-800: #343a40;
24
+ --w-color-secondary-900: #212529;
25
+
26
+ /* Success Colors */
27
+ --w-color-success-50: #ecfdf5;
28
+ --w-color-success-100: #d1fae5;
29
+ --w-color-success-200: #a7f3d0;
30
+ --w-color-success-300: #6ee7b7;
31
+ --w-color-success-400: #34d399;
32
+ --w-color-success-500: #10b981;
33
+ --w-color-success-600: #059669;
34
+ --w-color-success-700: #047857;
35
+ --w-color-success-800: #065f46;
36
+ --w-color-success-900: #064e3b;
37
+
38
+ /* Danger Colors */
39
+ --w-color-danger-50: #fee2e2;
40
+ --w-color-danger-100: #fecaca;
41
+ --w-color-danger-200: #fca5a5;
42
+ --w-color-danger-300: #f87171;
43
+ --w-color-danger-400: #ef4444;
44
+ --w-color-danger-500: #dc2626;
45
+ --w-color-danger-600: #b91c1c;
46
+ --w-color-danger-700: #991b1b;
47
+ --w-color-danger-800: #7f1d1d;
48
+ --w-color-danger-900: #450a0a;
49
+
50
+ /* Warning Colors */
51
+ --w-color-warning-50: #fffbeb;
52
+ --w-color-warning-100: #fef3c7;
53
+ --w-color-warning-200: #fde68a;
54
+ --w-color-warning-300: #fcd34d;
55
+ --w-color-warning-400: #fbbf24;
56
+ --w-color-warning-500: #f59e0b;
57
+ --w-color-warning-600: #d97706;
58
+ --w-color-warning-700: #b45309;
59
+ --w-color-warning-800: #92400e;
60
+ --w-color-warning-900: #78350f;
61
+
62
+ /* Info Colors */
63
+ --w-color-info-50: #eff6ff;
64
+ --w-color-info-100: #dbeafe;
65
+ --w-color-info-200: #bfdbfe;
66
+ --w-color-info-300: #93c5fd;
67
+ --w-color-info-400: #60a5fa;
68
+ --w-color-info-500: #3b82f6;
69
+ --w-color-info-600: #2563eb;
70
+ --w-color-info-700: #1d4ed8;
71
+ --w-color-info-800: #1e40af;
72
+ --w-color-info-900: #1e3a8a;
73
+
74
+ /* Light Colors */
75
+ --w-color-light-50: #ffffff;
76
+ --w-color-light-100: #f8f9fa;
77
+ --w-color-light-200: #f1f3f5;
78
+ --w-color-light-300: #e9ecef;
79
+ --w-color-light-400: #dee2e6;
80
+ --w-color-light-500: #ced4da;
81
+ --w-color-light-600: #adb5bd;
82
+ --w-color-light-700: #868e96;
83
+ --w-color-light-800: #495057;
84
+ --w-color-light-900: #212529;
85
+
86
+ /* Dark Colors */
87
+ --w-color-dark-50: #f9fafb;
88
+ --w-color-dark-100: #f3f4f6;
89
+ --w-color-dark-200: #e5e7eb;
90
+ --w-color-dark-300: #d1d5db;
91
+ --w-color-dark-400: #1f2937;
92
+ --w-color-dark-500: #111827;
93
+ --w-color-dark-600: #0f172a;
94
+ --w-color-dark-700: #0a0f1a;
95
+ --w-color-dark-800: #060912;
96
+ --w-color-dark-900: #030509;
97
+
98
+ /* Link Colors */
99
+ --w-color-link-50: #eff6ff;
100
+ --w-color-link-100: #dbeafe;
101
+ --w-color-link-200: #bfdbfe;
102
+ --w-color-link-300: #93c5fd;
103
+ --w-color-link-400: #60a5fa;
104
+ --w-color-link-500: #2563eb;
105
+ --w-color-link-600: #1d4ed8;
106
+ --w-color-link-700: #1e40af;
107
+ --w-color-link-800: #1e3a8a;
108
+ --w-color-link-900: #1e3a8a;
109
+ }