@x-plat/design-system 0.5.8 → 0.5.9

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.
@@ -1,3 +1,97 @@
1
+ /* src/components/Button/button.scss */
2
+ .lib-xplat-button {
3
+ width: 100%;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: var(--spacing-space-2);
8
+ white-space: nowrap;
9
+ border-radius: var(--spacing-radius-md);
10
+ font-weight: 500;
11
+ cursor: pointer;
12
+ border: 1px solid transparent;
13
+ transition: background-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
14
+ }
15
+ .lib-xplat-button.sm {
16
+ height: var(--spacing-control-height-sm);
17
+ padding: 0 var(--spacing-space-3);
18
+ font-size: 14px;
19
+ }
20
+ .lib-xplat-button.md {
21
+ height: var(--spacing-control-height-md);
22
+ padding: 0 var(--spacing-space-4);
23
+ font-size: 16px;
24
+ }
25
+ .lib-xplat-button.lg {
26
+ height: var(--spacing-control-height-lg);
27
+ padding: 0 var(--spacing-space-6);
28
+ font-size: 18px;
29
+ }
30
+ .lib-xplat-button:disabled {
31
+ cursor: not-allowed;
32
+ background-color: var(--semantic-surface-neutral-disabled) !important;
33
+ border-color: var(--semantic-surface-neutral-disabled) !important;
34
+ color: var(--semantic-text-disabled) !important;
35
+ }
36
+ .lib-xplat-button.primary {
37
+ color: var(--semantic-text-inverse);
38
+ background-color: var(--semantic-surface-brand-default);
39
+ }
40
+ .lib-xplat-button.primary:hover:not(:disabled) {
41
+ background-color: var(--semantic-surface-brand-strong);
42
+ }
43
+ .lib-xplat-button.primary:active:not(:disabled) {
44
+ background-color: var(--semantic-surface-brand-strong);
45
+ }
46
+ .lib-xplat-button.primary:focus-visible {
47
+ outline: 2px solid var(--semantic-interaction-focus-ring);
48
+ outline-offset: 2px;
49
+ }
50
+ .lib-xplat-button.secondary {
51
+ color: var(--semantic-surface-brand-default);
52
+ background-color: var(--semantic-surface-neutral-default);
53
+ border-color: var(--semantic-border-default);
54
+ }
55
+ .lib-xplat-button.secondary:hover:not(:disabled) {
56
+ background-color: var(--semantic-surface-neutral-subtle);
57
+ }
58
+ .lib-xplat-button.secondary:active:not(:disabled) {
59
+ background-color: var(--semantic-surface-neutral-strong);
60
+ }
61
+ .lib-xplat-button.secondary:focus-visible {
62
+ outline: 2px solid var(--semantic-interaction-focus-ring);
63
+ outline-offset: 2px;
64
+ }
65
+ .lib-xplat-button.danger {
66
+ color: var(--semantic-text-inverse);
67
+ background-color: var(--semantic-surface-error-default);
68
+ }
69
+ .lib-xplat-button.danger:hover:not(:disabled) {
70
+ background-color: var(--semantic-surface-error-strong);
71
+ }
72
+ .lib-xplat-button.danger:active:not(:disabled) {
73
+ background-color: var(--semantic-surface-error-strong);
74
+ }
75
+ .lib-xplat-button.danger:focus-visible {
76
+ outline: 2px solid var(--semantic-interaction-focus-ring);
77
+ outline-offset: 2px;
78
+ }
79
+ .lib-xplat-button.ghost {
80
+ color: var(--semantic-text-subtle);
81
+ background-color: transparent;
82
+ border-color: transparent;
83
+ }
84
+ .lib-xplat-button.ghost:hover:not(:disabled) {
85
+ background-color: var(--semantic-surface-neutral-subtle);
86
+ }
87
+ .lib-xplat-button.ghost:active:not(:disabled) {
88
+ background-color: var(--semantic-surface-neutral-disabled);
89
+ }
90
+ .lib-xplat-button.ghost:focus-visible {
91
+ outline: 2px solid var(--semantic-interaction-focus-ring);
92
+ outline-offset: 2px;
93
+ }
94
+
1
95
  /* src/components/Input/input.scss */
2
96
  .lib-xplat-input-wrap {
3
97
  display: flex;
@@ -95,11 +189,51 @@
95
189
  font-size: 16px;
96
190
  }
97
191
 
192
+ /* src/components/Modal/modal.scss */
193
+ .lib-xplat-modal {
194
+ z-index: 11;
195
+ }
196
+ .lib-xplat-modal.modal-box {
197
+ border-radius: var(--spacing-radius-lg);
198
+ background-color: #fff;
199
+ padding: var(--spacing-space-6);
200
+ min-width: min-content;
201
+ max-width: calc(100vw - 32px);
202
+ max-height: calc(100vh - 32px);
203
+ overflow: visible;
204
+ transform: scale(0.9);
205
+ opacity: 0;
206
+ transition: transform 0.2s ease, opacity 0.2s ease;
207
+ }
208
+ .lib-xplat-modal.modal-box.enter {
209
+ transform: scale(1);
210
+ opacity: 1;
211
+ }
212
+ .lib-xplat-modal.modal-box.exit {
213
+ transform: scale(0.9);
214
+ opacity: 0;
215
+ }
216
+ .lib-xplat-modal.dim {
217
+ position: fixed;
218
+ inset: 0;
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ opacity: 0;
223
+ background-color: rgba(0, 0, 0, 0.3);
224
+ transition: opacity 0.2s ease;
225
+ }
226
+ .lib-xplat-modal.dim.enter {
227
+ opacity: 1;
228
+ }
229
+ .lib-xplat-modal.dim.exit {
230
+ opacity: 0;
231
+ }
232
+
98
233
  /* src/components/DatePicker/datepicker.scss */
99
234
  .lib-xplat-datepicker {
100
235
  contain: content;
101
236
  user-select: none;
102
- min-width: 200px;
103
237
  width: 100%;
104
238
  }
105
239
  .lib-xplat-datepicker .datepicker-header {
@@ -125,17 +259,23 @@
125
259
  .lib-xplat-datepicker .datepicker-title:hover {
126
260
  background-color: var(--semantic-surface-neutral-disabled);
127
261
  }
262
+ .lib-xplat-datepicker .datepicker-body {
263
+ display: flex;
264
+ flex-direction: column;
265
+ }
128
266
  .lib-xplat-datepicker .datepicker-picker-grid {
129
267
  display: grid;
130
268
  grid-template-columns: repeat(3, 1fr);
269
+ grid-template-rows: repeat(4, 1fr);
131
270
  gap: var(--spacing-space-1);
132
271
  padding: var(--spacing-space-1) 0;
272
+ flex: 1;
133
273
  }
134
274
  .lib-xplat-datepicker .datepicker-picker-cell {
135
275
  display: flex;
136
276
  align-items: center;
137
277
  justify-content: center;
138
- padding: var(--spacing-space-2);
278
+ padding: var(--spacing-space-3);
139
279
  border: none;
140
280
  border-radius: var(--spacing-radius-md);
141
281
  background: none;
@@ -266,24 +406,6 @@
266
406
  .lib-xplat-datepicker .datepicker-range-tabs {
267
407
  display: none;
268
408
  margin-bottom: var(--spacing-space-3);
269
- border-bottom: 1px solid var(--semantic-border-default);
270
- }
271
- .lib-xplat-datepicker .datepicker-range-tab {
272
- flex: 1;
273
- padding: var(--spacing-space-2);
274
- border: none;
275
- background: none;
276
- font-size: 13px;
277
- font-weight: 500;
278
- color: var(--semantic-text-muted);
279
- cursor: pointer;
280
- border-bottom: 2px solid transparent;
281
- transition: color 0.15s, border-color 0.15s;
282
- }
283
- .lib-xplat-datepicker .datepicker-range-tab.active {
284
- color: var(--semantic-surface-brand-default);
285
- border-bottom-color: var(--semantic-surface-brand-default);
286
- font-weight: 600;
287
409
  }
288
410
  .lib-xplat-datepicker .datepicker-range-panels {
289
411
  display: flex;
@@ -347,143 +469,104 @@
347
469
  }
348
470
  .lib-xplat-popup-datepicker-card {
349
471
  background-color: var(--semantic-surface-neutral-default);
350
- border-radius: var(--spacing-radius-lg);
472
+ border-radius: var(--spacing-radius-xl);
473
+ min-width: 320px;
474
+ }
475
+ .lib-xplat-popup-datepicker-card.range-mode {
476
+ min-width: 480px;
351
477
  }
352
478
  .lib-xplat-popup-datepicker-card .popup-datepicker-content {
353
- margin-bottom: var(--spacing-space-4);
479
+ margin-bottom: var(--spacing-space-5);
354
480
  }
355
481
  .lib-xplat-popup-datepicker-card .popup-datepicker-footer {
356
482
  display: flex;
357
483
  justify-content: flex-end;
358
- gap: var(--spacing-space-2);
484
+ gap: var(--spacing-space-3);
485
+ padding-top: var(--spacing-space-4);
486
+ border-top: 1px solid var(--semantic-border-subtle);
359
487
  }
360
488
 
361
- /* src/components/Button/button.scss */
362
- .lib-xplat-button {
489
+ /* src/components/Tab/tab.scss */
490
+ .lib-xplat-tab {
491
+ position: relative;
492
+ display: flex;
363
493
  width: 100%;
364
- border-radius: var(--spacing-radius-md);
365
- font-weight: 500;
366
- cursor: pointer;
367
- border: 1px solid transparent;
368
- transition: background-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
494
+ min-width: 0;
495
+ align-items: center;
496
+ overflow-x: auto;
497
+ -ms-overflow-style: none;
498
+ scrollbar-width: none;
369
499
  }
370
- .lib-xplat-button.sm {
500
+ .lib-xplat-tab::-webkit-scrollbar {
501
+ display: none;
502
+ }
503
+ .lib-xplat-tab.sm {
371
504
  height: var(--spacing-control-height-sm);
372
- padding: 0 var(--spacing-space-3);
373
505
  font-size: 14px;
374
506
  }
375
- .lib-xplat-button.md {
507
+ .lib-xplat-tab.md {
376
508
  height: var(--spacing-control-height-md);
377
- padding: 0 var(--spacing-space-4);
378
509
  font-size: 16px;
379
510
  }
380
- .lib-xplat-button.lg {
511
+ .lib-xplat-tab.lg {
381
512
  height: var(--spacing-control-height-lg);
382
- padding: 0 var(--spacing-space-6);
383
513
  font-size: 18px;
384
514
  }
385
- .lib-xplat-button:disabled {
386
- cursor: not-allowed;
387
- background-color: var(--semantic-surface-neutral-disabled) !important;
388
- border-color: var(--semantic-surface-neutral-disabled) !important;
389
- color: var(--semantic-text-disabled) !important;
390
- }
391
- .lib-xplat-button.primary {
392
- color: var(--semantic-text-inverse);
393
- background-color: var(--semantic-surface-brand-default);
394
- }
395
- .lib-xplat-button.primary:hover:not(:disabled) {
396
- background-color: var(--semantic-surface-brand-strong);
397
- }
398
- .lib-xplat-button.primary:active:not(:disabled) {
399
- background-color: var(--semantic-surface-brand-strong);
400
- }
401
- .lib-xplat-button.primary:focus-visible {
402
- outline: 2px solid var(--semantic-interaction-focus-ring);
403
- outline-offset: 2px;
404
- }
405
- .lib-xplat-button.secondary {
406
- color: var(--semantic-surface-brand-default);
407
- background-color: var(--semantic-surface-neutral-default);
408
- border-color: var(--semantic-border-default);
409
- }
410
- .lib-xplat-button.secondary:hover:not(:disabled) {
411
- background-color: var(--semantic-surface-neutral-subtle);
412
- }
413
- .lib-xplat-button.secondary:active:not(:disabled) {
515
+ .lib-xplat-tab.type-default {
516
+ width: 100%;
414
517
  background-color: var(--semantic-surface-neutral-strong);
518
+ border-radius: var(--spacing-radius-md);
415
519
  }
416
- .lib-xplat-button.secondary:focus-visible {
417
- outline: 2px solid var(--semantic-interaction-focus-ring);
418
- outline-offset: 2px;
419
- }
420
- .lib-xplat-button.danger {
520
+ .lib-xplat-tab.type-default > .tab-item {
521
+ flex: 1;
522
+ padding: var(--spacing-space-1) var(--spacing-space-6);
523
+ height: 100%;
524
+ display: flex;
525
+ align-items: center;
526
+ justify-content: center;
527
+ cursor: pointer;
528
+ white-space: nowrap;
529
+ border-right: 1px solid var(--semantic-border-strong);
421
530
  color: var(--semantic-text-inverse);
422
- background-color: var(--semantic-surface-error-default);
423
- }
424
- .lib-xplat-button.danger:hover:not(:disabled) {
425
- background-color: var(--semantic-surface-error-strong);
426
531
  }
427
- .lib-xplat-button.danger:active:not(:disabled) {
428
- background-color: var(--semantic-surface-error-strong);
429
- }
430
- .lib-xplat-button.danger:focus-visible {
431
- outline: 2px solid var(--semantic-interaction-focus-ring);
432
- outline-offset: 2px;
433
- }
434
- .lib-xplat-button.ghost {
435
- color: var(--semantic-text-subtle);
436
- background-color: transparent;
437
- border-color: transparent;
438
- }
439
- .lib-xplat-button.ghost:hover:not(:disabled) {
440
- background-color: var(--semantic-surface-neutral-subtle);
441
- }
442
- .lib-xplat-button.ghost:active:not(:disabled) {
443
- background-color: var(--semantic-surface-neutral-disabled);
444
- }
445
- .lib-xplat-button.ghost:focus-visible {
446
- outline: 2px solid var(--semantic-interaction-focus-ring);
447
- outline-offset: 2px;
448
- }
449
-
450
- /* src/components/Modal/modal.scss */
451
- .lib-xplat-modal {
452
- z-index: 11;
453
- }
454
- .lib-xplat-modal.modal-box {
455
- border-radius: var(--spacing-radius-lg);
456
- background-color: #fff;
457
- padding: var(--spacing-space-6);
458
- min-width: min-content;
459
- max-width: calc(100vw - 32px);
460
- max-height: calc(100vh - 32px);
461
- overflow: visible;
462
- transform: scale(0.9);
463
- opacity: 0;
464
- transition: transform 0.2s ease, opacity 0.2s ease;
532
+ .lib-xplat-tab.type-default > .tab-item:last-child {
533
+ border-right: none;
465
534
  }
466
- .lib-xplat-modal.modal-box.enter {
467
- transform: scale(1);
468
- opacity: 1;
535
+ .lib-xplat-tab.type-default > .tab-item.active {
536
+ background-color: var(--semantic-surface-brand-default);
469
537
  }
470
- .lib-xplat-modal.modal-box.exit {
471
- transform: scale(0.9);
472
- opacity: 0;
538
+ .lib-xplat-tab.type-toggle {
539
+ width: 100%;
540
+ border-bottom: 1px solid var(--semantic-border-default);
541
+ gap: var(--spacing-space-6);
473
542
  }
474
- .lib-xplat-modal.dim {
475
- position: fixed;
476
- inset: 0;
543
+ .lib-xplat-tab.type-toggle > .tab-item {
544
+ position: relative;
545
+ flex: 1;
477
546
  display: flex;
478
547
  align-items: center;
479
548
  justify-content: center;
480
- opacity: 0;
481
- background-color: rgba(0, 0, 0, 0.3);
482
- transition: opacity 0.2s ease;
549
+ white-space: nowrap;
550
+ padding: 0 var(--spacing-space-3);
551
+ font-size: 16px;
552
+ font-weight: 500;
553
+ height: 100%;
554
+ background: none;
555
+ border: none;
556
+ cursor: pointer;
557
+ transition: color 0.2s;
558
+ color: var(--semantic-text-muted);
483
559
  }
484
- .lib-xplat-modal.dim.enter {
485
- opacity: 1;
560
+ .lib-xplat-tab.type-toggle > .tab-item.active {
561
+ color: var(--semantic-surface-brand-default);
486
562
  }
487
- .lib-xplat-modal.dim.exit {
488
- opacity: 0;
563
+ .lib-xplat-tab.type-toggle > .tab-toggle-underline {
564
+ position: absolute;
565
+ left: 0;
566
+ right: 0;
567
+ bottom: -1px;
568
+ height: 2px;
569
+ background-color: var(--semantic-surface-brand-default);
570
+ transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
571
+ will-change: left, width;
489
572
  }
@@ -60,6 +60,8 @@ interface SingleDatePickerProps {
60
60
  maxDate?: Date;
61
61
  highlightDates?: Date[];
62
62
  locale?: "ko" | "en";
63
+ rangeStart?: Date | null;
64
+ rangeEnd?: Date | null;
63
65
  }
64
66
  declare const SingleDatePicker: {
65
67
  (props: SingleDatePickerProps): react_jsx_runtime.JSX.Element;
@@ -60,6 +60,8 @@ interface SingleDatePickerProps {
60
60
  maxDate?: Date;
61
61
  highlightDates?: Date[];
62
62
  locale?: "ko" | "en";
63
+ rangeStart?: Date | null;
64
+ rangeEnd?: Date | null;
63
65
  }
64
66
  declare const SingleDatePicker: {
65
67
  (props: SingleDatePickerProps): react_jsx_runtime.JSX.Element;