@bigtablet/design-system 2.4.3 → 2.5.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/dist/index.css +91 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +13 -12
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -188,7 +188,8 @@
|
|
|
188
188
|
transition:
|
|
189
189
|
background 0.2s ease-in-out,
|
|
190
190
|
color 0.2s ease-in-out,
|
|
191
|
-
border-color 0.2s ease-in-out
|
|
191
|
+
border-color 0.2s ease-in-out,
|
|
192
|
+
transform 0.1s ease-in-out;
|
|
192
193
|
}
|
|
193
194
|
.button::before {
|
|
194
195
|
content: "";
|
|
@@ -201,6 +202,9 @@
|
|
|
201
202
|
transition: background 0.2s ease-in-out;
|
|
202
203
|
pointer-events: none;
|
|
203
204
|
}
|
|
205
|
+
.button:active:not(:disabled) {
|
|
206
|
+
transform: scale(0.97);
|
|
207
|
+
}
|
|
204
208
|
.button:disabled {
|
|
205
209
|
cursor: not-allowed;
|
|
206
210
|
}
|
|
@@ -346,6 +350,11 @@
|
|
|
346
350
|
.card {
|
|
347
351
|
background: #FFFFFF;
|
|
348
352
|
border-radius: 12px;
|
|
353
|
+
transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
354
|
+
}
|
|
355
|
+
.card_hoverable:hover {
|
|
356
|
+
transform: translateY(-2px);
|
|
357
|
+
box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.2), 0 6px 6px 0px rgba(0, 0, 0, 0.12);
|
|
349
358
|
}
|
|
350
359
|
.card_bordered {
|
|
351
360
|
border: 1px solid #E5E5E5;
|
|
@@ -475,6 +484,7 @@
|
|
|
475
484
|
border-top: 0;
|
|
476
485
|
border-left: 0;
|
|
477
486
|
transform: translate(-50%, -50%) rotate(45deg);
|
|
487
|
+
animation: checkbox_check_in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
478
488
|
}
|
|
479
489
|
.checkbox_input:indeterminate ~ .checkbox_state_layer .checkbox_icon::after {
|
|
480
490
|
content: "";
|
|
@@ -487,6 +497,7 @@
|
|
|
487
497
|
transform: translate(-50%, -50%);
|
|
488
498
|
border: none;
|
|
489
499
|
border-radius: 1px;
|
|
500
|
+
animation: checkbox_dash_in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
490
501
|
}
|
|
491
502
|
.checkbox_error .checkbox_icon {
|
|
492
503
|
border-color: #EF4444;
|
|
@@ -496,6 +507,26 @@
|
|
|
496
507
|
background: #EF4444;
|
|
497
508
|
border-color: #EF4444;
|
|
498
509
|
}
|
|
510
|
+
@keyframes checkbox_check_in {
|
|
511
|
+
from {
|
|
512
|
+
opacity: 0;
|
|
513
|
+
transform: translate(-50%, -50%) rotate(45deg) scale(0.5);
|
|
514
|
+
}
|
|
515
|
+
to {
|
|
516
|
+
opacity: 1;
|
|
517
|
+
transform: translate(-50%, -50%) rotate(45deg) scale(1);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
@keyframes checkbox_dash_in {
|
|
521
|
+
from {
|
|
522
|
+
opacity: 0;
|
|
523
|
+
transform: translate(-50%, -50%) scaleX(0);
|
|
524
|
+
}
|
|
525
|
+
to {
|
|
526
|
+
opacity: 1;
|
|
527
|
+
transform: translate(-50%, -50%) scaleX(1);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
499
530
|
|
|
500
531
|
/* src/ui/chip/style.scss */
|
|
501
532
|
@keyframes skeleton_loading {
|
|
@@ -751,6 +782,10 @@
|
|
|
751
782
|
justify-content: center;
|
|
752
783
|
flex-shrink: 0;
|
|
753
784
|
color: #666666;
|
|
785
|
+
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
786
|
+
}
|
|
787
|
+
.dropdown_icon.is_open {
|
|
788
|
+
transform: rotate(180deg);
|
|
754
789
|
}
|
|
755
790
|
.dropdown_list {
|
|
756
791
|
position: absolute;
|
|
@@ -769,12 +804,16 @@
|
|
|
769
804
|
overflow-y: auto;
|
|
770
805
|
overflow-x: hidden;
|
|
771
806
|
padding: 4px 0;
|
|
807
|
+
animation: dropdown_slide_down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
808
|
+
transform-origin: top center;
|
|
772
809
|
}
|
|
773
810
|
.dropdown_list_up {
|
|
774
811
|
top: auto;
|
|
775
812
|
bottom: 100%;
|
|
776
813
|
margin-top: 0;
|
|
777
814
|
margin-bottom: 4px;
|
|
815
|
+
animation: dropdown_slide_up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
816
|
+
transform-origin: bottom center;
|
|
778
817
|
}
|
|
779
818
|
.dropdown_option {
|
|
780
819
|
width: 100%;
|
|
@@ -846,6 +885,26 @@
|
|
|
846
885
|
border: none;
|
|
847
886
|
margin: 0;
|
|
848
887
|
}
|
|
888
|
+
@keyframes dropdown_slide_down {
|
|
889
|
+
from {
|
|
890
|
+
opacity: 0;
|
|
891
|
+
transform: translateY(-8px) scaleY(0.96);
|
|
892
|
+
}
|
|
893
|
+
to {
|
|
894
|
+
opacity: 1;
|
|
895
|
+
transform: translateY(0) scaleY(1);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
@keyframes dropdown_slide_up {
|
|
899
|
+
from {
|
|
900
|
+
opacity: 0;
|
|
901
|
+
transform: translateY(8px) scaleY(0.96);
|
|
902
|
+
}
|
|
903
|
+
to {
|
|
904
|
+
opacity: 1;
|
|
905
|
+
transform: translateY(0) scaleY(1);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
849
908
|
|
|
850
909
|
/* src/ui/date-picker/style.scss */
|
|
851
910
|
@keyframes skeleton_loading {
|
|
@@ -1391,6 +1450,7 @@
|
|
|
1391
1450
|
place-items: center;
|
|
1392
1451
|
background: rgba(0, 0, 0, 0.5);
|
|
1393
1452
|
z-index: 100;
|
|
1453
|
+
animation: modal_overlay_fade 0.15s ease-in-out;
|
|
1394
1454
|
}
|
|
1395
1455
|
.modal_panel {
|
|
1396
1456
|
background: #FFFFFF;
|
|
@@ -1398,6 +1458,7 @@
|
|
|
1398
1458
|
box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.2), 0 9px 9px 0px rgba(0, 0, 0, 0.12);
|
|
1399
1459
|
max-width: calc(100% - 64px);
|
|
1400
1460
|
overflow: visible;
|
|
1461
|
+
animation: modal_panel_enter 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
1401
1462
|
}
|
|
1402
1463
|
.modal_header {
|
|
1403
1464
|
padding: 16px;
|
|
@@ -1412,6 +1473,24 @@
|
|
|
1412
1473
|
padding: 16px;
|
|
1413
1474
|
overflow: visible;
|
|
1414
1475
|
}
|
|
1476
|
+
@keyframes modal_overlay_fade {
|
|
1477
|
+
from {
|
|
1478
|
+
opacity: 0;
|
|
1479
|
+
}
|
|
1480
|
+
to {
|
|
1481
|
+
opacity: 1;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
@keyframes modal_panel_enter {
|
|
1485
|
+
from {
|
|
1486
|
+
opacity: 0;
|
|
1487
|
+
transform: scale(0.95) translateY(8px);
|
|
1488
|
+
}
|
|
1489
|
+
to {
|
|
1490
|
+
opacity: 1;
|
|
1491
|
+
transform: scale(1) translateY(0);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1415
1494
|
|
|
1416
1495
|
/* src/ui/otp-input/style.scss */
|
|
1417
1496
|
@keyframes skeleton_loading {
|
|
@@ -1666,6 +1745,7 @@
|
|
|
1666
1745
|
transform: translate(-50%, -50%);
|
|
1667
1746
|
background: #121212;
|
|
1668
1747
|
border-radius: 9999px;
|
|
1748
|
+
animation: radio_dot_in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
1669
1749
|
}
|
|
1670
1750
|
.radio_size_md .radio_input:checked ~ .radio_state_layer .radio_dot::after {
|
|
1671
1751
|
width: 10px;
|
|
@@ -1675,6 +1755,16 @@
|
|
|
1675
1755
|
width: 10px;
|
|
1676
1756
|
height: 10px;
|
|
1677
1757
|
}
|
|
1758
|
+
@keyframes radio_dot_in {
|
|
1759
|
+
from {
|
|
1760
|
+
opacity: 0;
|
|
1761
|
+
transform: translate(-50%, -50%) scale(0);
|
|
1762
|
+
}
|
|
1763
|
+
to {
|
|
1764
|
+
opacity: 1;
|
|
1765
|
+
transform: translate(-50%, -50%) scale(1);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1678
1768
|
|
|
1679
1769
|
/* src/ui/spinner/style.scss */
|
|
1680
1770
|
@keyframes skeleton_loading {
|
package/dist/index.d.ts
CHANGED
|
@@ -509,6 +509,8 @@ interface CardProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
509
509
|
padding?: "none" | "sm" | "md" | "lg";
|
|
510
510
|
/** 테두리 표시 여부 (기본값: false) */
|
|
511
511
|
bordered?: boolean;
|
|
512
|
+
/** hover 시 살짝 떠오르는 효과 (기본값: false) */
|
|
513
|
+
hoverable?: boolean;
|
|
512
514
|
}
|
|
513
515
|
/**
|
|
514
516
|
* 카드 컴포넌트를 렌더링한다.
|
|
@@ -516,7 +518,7 @@ interface CardProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
516
518
|
* @param props 카드 속성
|
|
517
519
|
* @returns 렌더링된 카드 UI
|
|
518
520
|
*/
|
|
519
|
-
declare const Card: ({ heading, headingAs: HeadingTag, shadow, padding, bordered, className, children, ...props }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
521
|
+
declare const Card: ({ heading, headingAs: HeadingTag, shadow, padding, bordered, hoverable, className, children, ...props }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
520
522
|
|
|
521
523
|
interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
522
524
|
/** 체크박스 옆에 표시할 라벨 */
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as React4 from 'react';
|
|
|
4
4
|
import { createContext, useContext, useState, useCallback } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
import {
|
|
7
|
+
import { ChevronDown, Check, X, Bell, Info, AlertTriangle, XCircle, CheckCircle2 } from 'lucide-react';
|
|
8
8
|
|
|
9
9
|
// src/styles/a11y/index.ts
|
|
10
10
|
var a11y = {
|
|
@@ -664,6 +664,7 @@ var Card = ({
|
|
|
664
664
|
shadow = "sm",
|
|
665
665
|
padding = "md",
|
|
666
666
|
bordered = false,
|
|
667
|
+
hoverable = false,
|
|
667
668
|
className,
|
|
668
669
|
children,
|
|
669
670
|
...props
|
|
@@ -672,7 +673,7 @@ var Card = ({
|
|
|
672
673
|
"card",
|
|
673
674
|
`card_shadow_${shadow}`,
|
|
674
675
|
`card_p_${padding}`,
|
|
675
|
-
{ card_bordered: bordered },
|
|
676
|
+
{ card_bordered: bordered, card_hoverable: hoverable },
|
|
676
677
|
className
|
|
677
678
|
);
|
|
678
679
|
return /* @__PURE__ */ jsxs("div", { className: cardClassName, ...props, children: [
|
|
@@ -948,9 +949,9 @@ var Dropdown = ({
|
|
|
948
949
|
};
|
|
949
950
|
React4.useEffect(() => {
|
|
950
951
|
if (!isOpen) return;
|
|
951
|
-
const
|
|
952
|
+
const matchedIndex = options.findIndex((o) => o.value === currentValue && !o.disabled);
|
|
952
953
|
setActiveIndex(
|
|
953
|
-
|
|
954
|
+
matchedIndex >= 0 ? matchedIndex : Math.max(
|
|
954
955
|
0,
|
|
955
956
|
options.findIndex((o) => !o.disabled)
|
|
956
957
|
)
|
|
@@ -992,7 +993,7 @@ var Dropdown = ({
|
|
|
992
993
|
disabled,
|
|
993
994
|
children: [
|
|
994
995
|
/* @__PURE__ */ jsx("span", { className: currentOption ? "dropdown_value" : "dropdown_placeholder", children: currentOption ? currentOption.label : placeholder }),
|
|
995
|
-
/* @__PURE__ */ jsx("span", { className: "dropdown_icon", "aria-hidden": "true", children:
|
|
996
|
+
/* @__PURE__ */ jsx("span", { className: cn("dropdown_icon", { is_open: isOpen }), "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronDown, { size: 24 }) })
|
|
996
997
|
]
|
|
997
998
|
}
|
|
998
999
|
)
|
|
@@ -2090,9 +2091,9 @@ var OtpInput = ({
|
|
|
2090
2091
|
if (autoFocus) inputsRef.current[0]?.focus();
|
|
2091
2092
|
}, [autoFocus]);
|
|
2092
2093
|
const digits = React4.useMemo(() => {
|
|
2093
|
-
const
|
|
2094
|
-
while (
|
|
2095
|
-
return
|
|
2094
|
+
const chars = value.split("").slice(0, length);
|
|
2095
|
+
while (chars.length < length) chars.push("");
|
|
2096
|
+
return chars;
|
|
2096
2097
|
}, [value, length]);
|
|
2097
2098
|
const focusInput = (index) => {
|
|
2098
2099
|
inputsRef.current[index]?.focus();
|
|
@@ -2101,12 +2102,12 @@ var OtpInput = ({
|
|
|
2101
2102
|
onChange?.(newDigits.join(""));
|
|
2102
2103
|
};
|
|
2103
2104
|
const handleChange = (index, e) => {
|
|
2104
|
-
const
|
|
2105
|
-
if (
|
|
2105
|
+
const nextDigit = e.target.value;
|
|
2106
|
+
if (nextDigit && !/^\d$/.test(nextDigit)) return;
|
|
2106
2107
|
const newDigits = [...digits];
|
|
2107
|
-
newDigits[index] =
|
|
2108
|
+
newDigits[index] = nextDigit;
|
|
2108
2109
|
updateValue(newDigits);
|
|
2109
|
-
if (
|
|
2110
|
+
if (nextDigit && index < length - 1) {
|
|
2110
2111
|
focusInput(index + 1);
|
|
2111
2112
|
}
|
|
2112
2113
|
};
|