@flatwork-ui/react 0.1.1 → 0.2.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.
- package/README.md +16 -1
- package/dist/index.cjs +38 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -119
- package/dist/index.d.ts +17 -119
- package/dist/index.js +104 -213
- package/dist/index.js.map +1 -1
- package/dist/styles/flatwork-saas/flatwork-saas.css +31 -0
- package/dist/styles/flatwork-saas/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/styles/flatwork-saas/tokens.css +1 -0
- package/dist/styles/flatwork-saas/tokens.json +8 -1
- package/package.json +1 -1
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
@font-face { font-family: "Geist"; font-weight: 500; font-style: normal; font-display: swap; src: url("./fonts/geist-500.woff2") format("woff2"); }
|
|
3
3
|
@font-face { font-family: "Geist"; font-weight: 600; font-style: normal; font-display: swap; src: url("./fonts/geist-600.woff2") format("woff2"); }
|
|
4
4
|
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("./fonts/plex-mono-400.woff2") format("woff2"); }
|
|
5
|
+
@font-face { font-family: "Material Symbols Rounded"; font-weight: 400; font-style: normal; font-display: block; src: url("./fonts/material-symbols-rounded.woff2") format("woff2"); }
|
|
5
6
|
/* Generated from flatwork-saas/tokens.json — do not edit. */
|
|
6
7
|
.fw {
|
|
7
8
|
--fw-font: 'Geist', ui-sans-serif, system-ui, sans-serif;
|
|
8
9
|
--fw-mono: 'IBM Plex Mono', ui-monospace, monospace;
|
|
10
|
+
--fw-icon: 'Material Symbols Rounded';
|
|
9
11
|
--fw-r-xs: 4px;
|
|
10
12
|
--fw-r-sm: 6px;
|
|
11
13
|
--fw-r-md: 9px;
|
|
@@ -151,10 +153,18 @@
|
|
|
151
153
|
.fw-t-muted{color:var(--fw-muted)}
|
|
152
154
|
.fw mark{background:var(--fw-mark); color:var(--fw-heading); padding:0 2px; border-radius:2px}
|
|
153
155
|
|
|
156
|
+
/* Icons: Material Symbols Rounded (weight 400, optical size 20) via ligatures:
|
|
157
|
+
<span class="fw-icon">search</span>. 18px matches the 16px stroke icons of the spec. */
|
|
158
|
+
.fw-icon{font-family:var(--fw-icon); font-weight:normal; font-style:normal; font-size:18px; line-height:1; width:1em; height:1em;
|
|
159
|
+
display:inline-block; flex:none; overflow:hidden; white-space:nowrap; letter-spacing:normal; text-transform:none; word-wrap:normal;
|
|
160
|
+
direction:ltr; user-select:none; -webkit-font-smoothing:antialiased; font-feature-settings:"liga"; font-variation-settings:"FILL" 0}
|
|
161
|
+
.fw-icon.is-filled{font-variation-settings:"FILL" 1}
|
|
162
|
+
|
|
154
163
|
.fw-btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding:0 16px;
|
|
155
164
|
border:1px solid transparent; border-radius:var(--fw-r-sm); font:inherit; font-size:14px; font-weight:500;
|
|
156
165
|
white-space:nowrap; cursor:pointer; text-decoration:none !important; transition:background-color .12s ease-out, border-color .12s ease-out, color .12s ease-out}
|
|
157
166
|
.fw-btn svg{width:16px; height:16px; flex:none}
|
|
167
|
+
.fw-btn .fw-icon{font-size:18px; flex:none}
|
|
158
168
|
.fw-btn-primary{background:var(--fw-accent); border-color:var(--fw-accent); color:var(--fw-on-accent); font-weight:600}
|
|
159
169
|
.fw-btn-primary:hover, .fw-btn-primary.is-hover{background:var(--fw-accent-hover); border-color:var(--fw-accent-hover)}
|
|
160
170
|
.fw-btn-secondary{background:var(--fw-input); border-color:var(--fw-border-strong); color:var(--fw-heading)}
|
|
@@ -203,12 +213,14 @@
|
|
|
203
213
|
.fw-select-wrap{position:relative; display:block}
|
|
204
214
|
.fw-select{appearance:none; padding-right:36px; cursor:pointer}
|
|
205
215
|
.fw-select-wrap > svg{position:absolute; right:12px; top:50%; width:14px; height:14px; margin-top:-7px; color:var(--fw-muted); pointer-events:none}
|
|
216
|
+
.fw-select-wrap > .fw-icon{position:absolute; right:12px; top:50%; font-size:16px; margin-top:-8px; color:var(--fw-muted); pointer-events:none}
|
|
206
217
|
.fw-input-affix{display:flex; align-items:center; height:40px; border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-sm); background:var(--fw-input); overflow:hidden}
|
|
207
218
|
.fw-input-affix > .fw-input{border:0; border-radius:0; height:38px; outline:0}
|
|
208
219
|
.fw-input-affix .fw-affix{display:flex; align-items:center; gap:6px; height:100%; padding:0 12px; color:var(--fw-muted); font-size:13px; white-space:nowrap}
|
|
209
220
|
.fw-input-affix .fw-affix-box{background:var(--fw-surface-2); border-right:1px solid var(--fw-border-strong); font-family:var(--fw-mono); font-size:12px}
|
|
210
221
|
.fw-input-affix .fw-affix-box.fw-end{border-right:0; border-left:1px solid var(--fw-border-strong)}
|
|
211
222
|
.fw-input-affix svg{width:16px; height:16px}
|
|
223
|
+
.fw-input-affix .fw-icon{font-size:18px}
|
|
212
224
|
.fw-input-affix.is-focus{border-color:var(--fw-focus); outline:2px solid var(--fw-focus); outline-offset:1px}
|
|
213
225
|
|
|
214
226
|
.fw-check{display:inline-flex; align-items:flex-start; gap:10px; cursor:pointer; font-size:14px; color:var(--fw-text); min-height:24px; line-height:20px}
|
|
@@ -234,6 +246,7 @@
|
|
|
234
246
|
.fw-range::-moz-range-thumb{width:12px; height:12px; border-radius:50%; background:var(--fw-heading); border:2px solid var(--fw-accent)}
|
|
235
247
|
.fw-dropzone{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:28px; border:1px dashed var(--fw-border-strong); border-radius:var(--fw-r-md); background:var(--fw-input); text-align:center; color:var(--fw-muted); font-size:13px}
|
|
236
248
|
.fw-dropzone svg{width:20px; height:20px; color:var(--fw-text)}
|
|
249
|
+
.fw-dropzone .fw-icon{font-size:22px; color:var(--fw-text)}
|
|
237
250
|
.fw-dropzone strong{color:var(--fw-heading); font-weight:500}
|
|
238
251
|
.fw-fieldset{margin:0; padding:20px; border:1px solid var(--fw-border); border-radius:var(--fw-r-md); display:flex; flex-direction:column; gap:14px}
|
|
239
252
|
.fw-fieldset legend{padding:0 6px; margin-left:-6px; font-size:13px; font-weight:600; color:var(--fw-heading)}
|
|
@@ -253,9 +266,11 @@
|
|
|
253
266
|
.fw-tag{display:inline-flex; align-items:center; gap:4px; height:26px; padding:0 4px 0 10px; border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-sm); font-size:13px; color:var(--fw-heading); background:var(--fw-input)}
|
|
254
267
|
.fw-tag button{display:grid; place-content:center; width:20px; height:20px; border:0; border-radius:var(--fw-r-xs); background:transparent; color:var(--fw-muted); cursor:pointer; padding:0}
|
|
255
268
|
.fw-tag button svg{width:12px; height:12px}
|
|
269
|
+
.fw-tag button .fw-icon{font-size:14px}
|
|
256
270
|
|
|
257
271
|
.fw-alert{display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border:1px solid var(--fw-info-border); border-radius:var(--fw-r-sm); background:var(--fw-info-bg); color:var(--fw-info); font-size:13px}
|
|
258
272
|
.fw-alert > svg{width:16px; height:16px; flex:none; margin-top:2px}
|
|
273
|
+
.fw-alert > .fw-icon{font-size:18px; flex:none; margin-top:1px}
|
|
259
274
|
.fw-alert-body{display:flex; flex-direction:column; gap:2px; flex:1; min-width:0}
|
|
260
275
|
.fw-alert-title{font-weight:600}
|
|
261
276
|
.fw-alert-text{color:var(--fw-text)}
|
|
@@ -265,6 +280,7 @@
|
|
|
265
280
|
.fw-alert-neutral{border-color:var(--fw-border); background:var(--fw-surface); color:var(--fw-heading)}
|
|
266
281
|
.fw-toast{display:flex; gap:12px; align-items:flex-start; width:360px; padding:14px 16px; background:var(--fw-surface); border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-md); box-shadow:var(--fw-shadow-pop); font-size:13px}
|
|
267
282
|
.fw-toast > svg{width:16px; height:16px; flex:none; margin-top:2px}
|
|
283
|
+
.fw-toast > .fw-icon{font-size:18px; flex:none; margin-top:1px}
|
|
268
284
|
.fw-toast .fw-alert-body{color:var(--fw-text)}
|
|
269
285
|
.fw-toast .fw-alert-title{color:var(--fw-heading)}
|
|
270
286
|
.fw-toast-actions{display:flex; gap:12px; margin-top:6px}
|
|
@@ -303,6 +319,7 @@
|
|
|
303
319
|
.fw-segmented{display:inline-flex; gap:2px; padding:3px; border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-sm); background:var(--fw-input)}
|
|
304
320
|
.fw-seg{height:30px; padding:0 12px; border:0; border-radius:var(--fw-r-xs); background:transparent; color:var(--fw-muted); font:inherit; font-size:13px; font-weight:500; cursor:pointer; display:inline-flex; align-items:center; gap:6px}
|
|
305
321
|
.fw-seg svg{width:14px; height:14px}
|
|
322
|
+
.fw-seg .fw-icon{font-size:16px}
|
|
306
323
|
.fw-seg.is-active{background:var(--fw-surface-2); color:var(--fw-heading); box-shadow:inset 0 0 0 1px var(--fw-border-strong)}
|
|
307
324
|
|
|
308
325
|
.fw-breadcrumb{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; padding:0; list-style:none; font-size:13px}
|
|
@@ -315,12 +332,14 @@
|
|
|
315
332
|
.fw-page:hover{background:var(--fw-surface-2); color:var(--fw-heading)}
|
|
316
333
|
.fw-page.is-active{border-color:var(--fw-border-strong); background:var(--fw-surface-2); color:var(--fw-heading)}
|
|
317
334
|
.fw-page svg{width:16px; height:16px}
|
|
335
|
+
.fw-page .fw-icon{font-size:18px}
|
|
318
336
|
.fw-page:disabled{opacity:.4; cursor:not-allowed}
|
|
319
337
|
.fw-stepper{display:flex; align-items:center; gap:12px; list-style:none; margin:0; padding:0}
|
|
320
338
|
.fw-step{display:flex; align-items:center; gap:10px; font-size:13px; color:var(--fw-muted); white-space:nowrap}
|
|
321
339
|
.fw-step-n{display:grid; place-content:center; width:24px; height:24px; border:1px solid var(--fw-border-strong); border-radius:50%; font-family:var(--fw-mono); font-size:12px}
|
|
322
340
|
.fw-step.is-done .fw-step-n{background:var(--fw-accent); border-color:var(--fw-accent); color:var(--fw-on-accent)}
|
|
323
341
|
.fw-step.is-done .fw-step-n svg{width:12px; height:12px}
|
|
342
|
+
.fw-step.is-done .fw-step-n .fw-icon{font-size:14px}
|
|
324
343
|
.fw-step.is-active{color:var(--fw-heading); font-weight:500}
|
|
325
344
|
.fw-step.is-active .fw-step-n{border-color:var(--fw-accent); color:var(--fw-heading)}
|
|
326
345
|
.fw-step-line{flex:1; min-width:32px; height:1px; background:var(--fw-border-strong)}
|
|
@@ -330,6 +349,7 @@
|
|
|
330
349
|
.fw-topnav .fw-brand{display:flex; align-items:center; gap:10px; font-weight:600; color:var(--fw-heading)}
|
|
331
350
|
.fw-logo-mark{width:24px; height:24px; border-radius:var(--fw-r-sm); background:var(--fw-accent); display:grid; place-content:center; color:var(--fw-on-accent)}
|
|
332
351
|
.fw-logo-mark svg{width:14px; height:14px}
|
|
352
|
+
.fw-logo-mark .fw-icon{font-size:16px}
|
|
333
353
|
.fw-topnav nav{display:flex; gap:4px}
|
|
334
354
|
.fw-topnav nav a{height:32px; display:inline-flex; align-items:center; padding:0 10px; border-radius:var(--fw-r-sm); color:var(--fw-muted); font-size:13px; font-weight:500; text-decoration:none}
|
|
335
355
|
.fw-topnav nav a:hover{color:var(--fw-heading); background:var(--fw-surface-2)}
|
|
@@ -339,20 +359,26 @@
|
|
|
339
359
|
.fw-sidenav .fw-group-label{padding:14px 10px 6px; font-size:12px; font-weight:500; color:var(--fw-muted)}
|
|
340
360
|
.fw-nav-item{display:flex; align-items:center; gap:10px; height:36px; padding:0 10px; border-radius:var(--fw-r-sm); color:var(--fw-text); font-size:13px; font-weight:500; text-decoration:none !important}
|
|
341
361
|
.fw-nav-item svg{width:16px; height:16px; color:var(--fw-muted); flex:none}
|
|
362
|
+
.fw-nav-item .fw-icon{font-size:18px; color:var(--fw-muted); flex:none}
|
|
342
363
|
.fw-nav-item:hover{background:var(--fw-surface-2); color:var(--fw-heading)}
|
|
343
364
|
.fw-nav-item[aria-current]{background:var(--fw-surface-2); color:var(--fw-heading)}
|
|
344
365
|
.fw-nav-item[aria-current] svg{color:var(--fw-accent)}
|
|
366
|
+
.fw-nav-item[aria-current] .fw-icon{color:var(--fw-accent)}
|
|
345
367
|
.fw-nav-item .fw-badge{margin-left:auto; height:18px; padding:0 6px; font-size:11px}
|
|
368
|
+
.fw-breadcrumb .fw-sep.fw-icon{width:1em; height:1em; font-size:16px}
|
|
369
|
+
.fw-nav-item[aria-current] .fw-icon{font-variation-settings:"FILL" 1}
|
|
346
370
|
|
|
347
371
|
.fw-menu{width:240px; padding:4px; background:var(--fw-surface); border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-md); box-shadow:var(--fw-shadow-pop); display:flex; flex-direction:column; list-style:none; margin:0}
|
|
348
372
|
.fw-menu-label{padding:8px 8px 4px; font-size:12px; font-weight:500; color:var(--fw-muted)}
|
|
349
373
|
.fw-menu-item{display:flex; align-items:center; gap:10px; height:34px; padding:0 8px; border:0; border-radius:var(--fw-r-xs); background:transparent; color:var(--fw-text); font:inherit; font-size:13px; text-align:left; cursor:pointer; width:100%}
|
|
350
374
|
.fw-menu-item svg{width:15px; height:15px; color:var(--fw-muted); flex:none}
|
|
375
|
+
.fw-menu-item .fw-icon{font-size:17px; color:var(--fw-muted); flex:none}
|
|
351
376
|
.fw-menu-item:hover, .fw-menu-item.is-hover{background:var(--fw-surface-2); color:var(--fw-heading)}
|
|
352
377
|
.fw-menu-item.is-selected{color:var(--fw-heading)}
|
|
353
378
|
.fw-menu-item .fw-end{margin-left:auto; font-family:var(--fw-mono); font-size:11px; color:var(--fw-muted)}
|
|
354
379
|
.fw-menu-item.is-danger{color:var(--fw-error)}
|
|
355
380
|
.fw-menu-item.is-danger svg{color:var(--fw-error)}
|
|
381
|
+
.fw-menu-item.is-danger .fw-icon{color:var(--fw-error)}
|
|
356
382
|
.fw-menu-sep{height:1px; margin:4px -4px; background:var(--fw-border)}
|
|
357
383
|
|
|
358
384
|
.fw-avatar{display:inline-grid; place-content:center; width:32px; height:32px; border-radius:50%; background:var(--fw-surface-2); border:1px solid var(--fw-border-strong); color:var(--fw-heading); font-size:12px; font-weight:600; flex:none}
|
|
@@ -379,6 +405,7 @@
|
|
|
379
405
|
.fw-table th{height:40px; padding:0 16px; text-align:left; font-size:12px; font-weight:500; color:var(--fw-muted); border-bottom:1px solid var(--fw-border); background:var(--fw-surface); white-space:nowrap}
|
|
380
406
|
.fw-table th.fw-sortable{cursor:pointer}
|
|
381
407
|
.fw-table th.fw-sortable svg{width:12px; height:12px; vertical-align:-2px; margin-left:4px}
|
|
408
|
+
.fw-table th.fw-sortable .fw-icon{font-size:14px; vertical-align:-2px; margin-left:4px}
|
|
382
409
|
.fw-table td{height:48px; padding:0 16px; border-bottom:1px solid var(--fw-border); color:var(--fw-text); white-space:nowrap}
|
|
383
410
|
.fw-table tbody tr:last-child td{border-bottom:0}
|
|
384
411
|
.fw-table tbody tr:hover td{background:var(--fw-surface-2)}
|
|
@@ -416,11 +443,14 @@
|
|
|
416
443
|
.fw-accordion summary{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; cursor:pointer; list-style:none; color:var(--fw-heading); font-weight:500}
|
|
417
444
|
.fw-accordion summary::-webkit-details-marker{display:none}
|
|
418
445
|
.fw-accordion summary svg{width:16px; height:16px; color:var(--fw-muted); transition:transform .22s ease-out}
|
|
446
|
+
.fw-accordion summary .fw-icon{font-size:18px; color:var(--fw-muted); transition:transform .22s ease-out}
|
|
419
447
|
.fw-accordion details[open] summary svg{transform:rotate(180deg)}
|
|
448
|
+
.fw-accordion details[open] summary .fw-icon{transform:rotate(180deg)}
|
|
420
449
|
.fw-accordion .fw-acc-body{padding:0 16px 16px; color:var(--fw-text); font-size:13px}
|
|
421
450
|
.fw-empty{display:flex; flex-direction:column; align-items:center; gap:8px; padding:40px 24px; border:1px dashed var(--fw-border-strong); border-radius:var(--fw-r-md); text-align:center}
|
|
422
451
|
.fw-empty-icon{display:grid; place-content:center; width:40px; height:40px; border-radius:var(--fw-r-sm); background:var(--fw-surface-2); color:var(--fw-text); margin-bottom:4px}
|
|
423
452
|
.fw-empty-icon svg{width:20px; height:20px}
|
|
453
|
+
.fw-empty-icon .fw-icon{font-size:22px}
|
|
424
454
|
|
|
425
455
|
.fw-backdrop{position:absolute; inset:0; background:var(--fw-overlay); display:flex; align-items:center; justify-content:center; padding:24px}
|
|
426
456
|
.fw-dialog{width:440px; max-width:100%; background:var(--fw-surface); border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-lg); box-shadow:var(--fw-shadow-pop); display:flex; flex-direction:column}
|
|
@@ -433,6 +463,7 @@
|
|
|
433
463
|
.fw-command{width:560px; max-width:100%; background:var(--fw-surface); border:1px solid var(--fw-border-strong); border-radius:var(--fw-r-lg); box-shadow:var(--fw-shadow-pop); overflow:hidden}
|
|
434
464
|
.fw-command-input{display:flex; align-items:center; gap:10px; height:52px; padding:0 16px; border-bottom:1px solid var(--fw-border); color:var(--fw-muted)}
|
|
435
465
|
.fw-command-input svg{width:16px; height:16px}
|
|
466
|
+
.fw-command-input .fw-icon{font-size:18px}
|
|
436
467
|
.fw-command-input input{flex:1; height:100%; border:0; background:transparent; color:var(--fw-heading); font:inherit; font-size:15px; outline:0}
|
|
437
468
|
.fw-command .fw-menu{width:100%; border:0; box-shadow:none; border-radius:0; padding:6px}
|
|
438
469
|
.fw-command-foot{display:flex; gap:16px; padding:10px 16px; border-top:1px solid var(--fw-border); font-size:12px; color:var(--fw-muted)}
|
|
Binary file
|
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
},
|
|
76
76
|
"font": {
|
|
77
77
|
"font": "'Geist', ui-sans-serif, system-ui, sans-serif",
|
|
78
|
-
"mono": "'IBM Plex Mono', ui-monospace, monospace"
|
|
78
|
+
"mono": "'IBM Plex Mono', ui-monospace, monospace",
|
|
79
|
+
"icon": "'Material Symbols Rounded'"
|
|
79
80
|
},
|
|
80
81
|
"radius": {
|
|
81
82
|
"r-xs": "4px",
|
|
@@ -119,6 +120,12 @@
|
|
|
119
120
|
"family": "IBM Plex Mono",
|
|
120
121
|
"weight": 400,
|
|
121
122
|
"file": "fonts/plex-mono-400.woff2"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"family": "Material Symbols Rounded",
|
|
126
|
+
"weight": 400,
|
|
127
|
+
"file": "fonts/material-symbols-rounded.woff2",
|
|
128
|
+
"display": "block"
|
|
122
129
|
}
|
|
123
130
|
]
|
|
124
131
|
}
|