@bigtablet/design-system 1.11.6 → 1.12.1
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 +7 -14
- package/dist/index.css +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +15 -8
- package/dist/styles/scss/_radius.scss +2 -1
- package/dist/styles/scss/token.scss +1 -0
- package/package.json +11 -7
- package/src/styles/scss/_radius.scss +2 -1
- package/src/styles/scss/token.scss +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img width="1800" height="300" alt="Image" src="https://github.com/user-attachments/assets/420a15cc-5be3-447f-9c64-068e946cb118" /> <br>
|
|
4
|
+
|
|
5
|
+
</div>
|
|
6
|
+
|
|
1
7
|
# Bigtablet Design System
|
|
2
8
|
|
|
3
9
|
[](https://www.npmjs.com/package/@bigtablet/design-system)
|
|
@@ -5,7 +11,7 @@
|
|
|
5
11
|
|
|
6
12
|
Bigtablet의 공식 디자인 시스템으로, Foundation(디자인 토큰)과 Components(UI 컴포넌트)로 구성된 통합 UI 라이브러리입니다.
|
|
7
13
|
|
|
8
|
-
> **현재 버전**: v1.
|
|
14
|
+
> **현재 버전**: v1.12.0 | **최근 업데이트**: 2025년 1월 15일
|
|
9
15
|
|
|
10
16
|
[깃허브 링크](https://github.com/Bigtablet/bigtablet-design-system) | [📦 NPM 패키지](https://www.npmjs.com/package/@bigtablet/design-system)
|
|
11
17
|
|
|
@@ -771,16 +777,3 @@ pnpm changeset
|
|
|
771
777
|
- [이슈 트래커](https://github.com/Bigtablet/bigtablet-design-system/issues)
|
|
772
778
|
- [토론](https://github.com/Bigtablet/bigtablet-design-system/discussions)
|
|
773
779
|
|
|
774
|
-
---
|
|
775
|
-
|
|
776
|
-
## 팀
|
|
777
|
-
|
|
778
|
-
이 프로젝트는 5명의 기여자들에 의해 관리되고 있습니다.
|
|
779
|
-
|
|
780
|
-
---
|
|
781
|
-
|
|
782
|
-
<div align="center">
|
|
783
|
-
|
|
784
|
-
Made with by Bigtablet, Icn.
|
|
785
|
-
|
|
786
|
-
</div>
|
package/dist/index.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -96,8 +96,9 @@ interface SelectProps {
|
|
|
96
96
|
variant?: SelectVariant;
|
|
97
97
|
fullWidth?: boolean;
|
|
98
98
|
className?: string;
|
|
99
|
+
textAlign?: "left" | "center";
|
|
99
100
|
}
|
|
100
|
-
declare const Select: ({ id, label, placeholder, options, value, onChange, defaultValue, disabled, size, variant, fullWidth, className, }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare const Select: ({ id, label, placeholder, options, value, onChange, defaultValue, disabled, size, variant, fullWidth, className, textAlign }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
101
102
|
|
|
102
103
|
interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
103
104
|
checked?: boolean;
|
|
@@ -128,6 +129,7 @@ interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
|
|
|
128
129
|
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
129
130
|
|
|
130
131
|
type DatePickerMode = "year-month" | "year-month-day";
|
|
132
|
+
type SelectableRange = "all" | "until-today";
|
|
131
133
|
interface DatePickerProps {
|
|
132
134
|
label?: string;
|
|
133
135
|
value?: string;
|
|
@@ -136,6 +138,7 @@ interface DatePickerProps {
|
|
|
136
138
|
startYear?: number;
|
|
137
139
|
endYear?: number;
|
|
138
140
|
minDate?: string;
|
|
141
|
+
selectableRange?: SelectableRange;
|
|
139
142
|
disabled?: boolean;
|
|
140
143
|
width?: {
|
|
141
144
|
container?: number | string;
|
|
@@ -144,7 +147,7 @@ interface DatePickerProps {
|
|
|
144
147
|
day?: number | string;
|
|
145
148
|
};
|
|
146
149
|
}
|
|
147
|
-
declare const DatePicker: ({ label, value, onChange, mode, startYear, endYear, minDate, disabled, width, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
150
|
+
declare const DatePicker: ({ label, value, onChange, mode, startYear, endYear, minDate, selectableRange, disabled, width, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
148
151
|
|
|
149
152
|
interface PaginationProps {
|
|
150
153
|
page: number;
|
package/dist/index.js
CHANGED
|
@@ -255,7 +255,8 @@ var Select = ({
|
|
|
255
255
|
size = "md",
|
|
256
256
|
variant = "outline",
|
|
257
257
|
fullWidth,
|
|
258
|
-
className
|
|
258
|
+
className,
|
|
259
|
+
textAlign = "left"
|
|
259
260
|
}) => {
|
|
260
261
|
const internalId = React3.useId();
|
|
261
262
|
const selectId = id ?? internalId;
|
|
@@ -402,6 +403,7 @@ var Select = ({
|
|
|
402
403
|
"span",
|
|
403
404
|
{
|
|
404
405
|
className: currentOption ? "select_value" : "select_placeholder",
|
|
406
|
+
style: textAlign === "left" ? { textAlign: "start" } : void 0,
|
|
405
407
|
children: currentOption ? currentOption.label : placeholder
|
|
406
408
|
}
|
|
407
409
|
),
|
|
@@ -599,21 +601,26 @@ var DatePicker = ({
|
|
|
599
601
|
startYear = 1950,
|
|
600
602
|
endYear = (/* @__PURE__ */ new Date()).getFullYear() + 10,
|
|
601
603
|
minDate,
|
|
604
|
+
selectableRange = "all",
|
|
602
605
|
disabled,
|
|
603
606
|
width
|
|
604
607
|
}) => {
|
|
608
|
+
const today = /* @__PURE__ */ new Date();
|
|
609
|
+
const todayYear = today.getFullYear();
|
|
610
|
+
const todayMonth = today.getMonth() + 1;
|
|
611
|
+
const todayDay = today.getDate();
|
|
605
612
|
const [y, m, d] = value?.split("-").map(Number) ?? [];
|
|
606
613
|
const [minY, minM, minD] = minDate?.split("-").map(Number) ?? [];
|
|
607
614
|
const year = y ?? "";
|
|
608
615
|
const month = m ?? "";
|
|
609
616
|
const day = d ?? "";
|
|
617
|
+
const maxYear = selectableRange === "until-today" ? todayYear : endYear;
|
|
610
618
|
const minMonth = minY && year === minY ? minM : 1;
|
|
619
|
+
const maxMonth = selectableRange === "until-today" && year === todayYear ? todayMonth : 12;
|
|
611
620
|
const minDay = minY && minM && year === minY && month === minM ? minD : 1;
|
|
612
|
-
const
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
return Math.min(day2, maxDay);
|
|
616
|
-
};
|
|
621
|
+
const maxDay = selectableRange === "until-today" && year === todayYear && month === todayMonth ? todayDay : getDaysInMonth(year || todayYear, month || 1);
|
|
622
|
+
const days = year && month ? Math.min(getDaysInMonth(year, month), maxDay) : 31;
|
|
623
|
+
const clampDay = (year2, month2, day2) => Math.min(day2, getDaysInMonth(year2, month2));
|
|
617
624
|
const emit = (yy, mm, dd) => {
|
|
618
625
|
if (mode === "year-month") {
|
|
619
626
|
onChange(`${yy}-${pad(mm)}`);
|
|
@@ -634,7 +641,7 @@ var DatePicker = ({
|
|
|
634
641
|
children: [
|
|
635
642
|
/* @__PURE__ */ jsx("option", { value: "", disabled: true }),
|
|
636
643
|
Array.from(
|
|
637
|
-
{ length:
|
|
644
|
+
{ length: maxYear - startYear + 1 },
|
|
638
645
|
(_, i) => startYear + i
|
|
639
646
|
).map((y2) => /* @__PURE__ */ jsx("option", { value: y2, children: y2 }, y2))
|
|
640
647
|
]
|
|
@@ -649,7 +656,7 @@ var DatePicker = ({
|
|
|
649
656
|
onChange: (e) => emit(year, Number(e.target.value), day || minDay),
|
|
650
657
|
children: [
|
|
651
658
|
/* @__PURE__ */ jsx("option", { value: "", disabled: true }),
|
|
652
|
-
Array.from({ length:
|
|
659
|
+
Array.from({ length: maxMonth - minMonth + 1 }, (_, i) => minMonth + i).map(
|
|
653
660
|
(m2) => /* @__PURE__ */ jsx("option", { value: m2, children: pad(m2) }, m2)
|
|
654
661
|
)
|
|
655
662
|
]
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigtablet/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Bigtablet Design System UI Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"style": "dist/index.css",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/Bigtablet/bigtablet-design-system.git"
|
|
11
|
+
},
|
|
8
12
|
"exports": {
|
|
9
13
|
".": {
|
|
10
14
|
"types": "./dist/index.d.ts",
|
|
@@ -34,7 +38,6 @@
|
|
|
34
38
|
"dev": "tsup --watch",
|
|
35
39
|
"storybook": "storybook dev -p 6006",
|
|
36
40
|
"build:sb": "storybook build",
|
|
37
|
-
"prepublishOnly": "pnpm run build",
|
|
38
41
|
"test": "echo \"no tests yet\"",
|
|
39
42
|
"chromatic": "npx chromatic --project-token=chpt_2f758912f0dde5c --build-script-name=build:sb"
|
|
40
43
|
},
|
|
@@ -63,9 +66,8 @@
|
|
|
63
66
|
"@semantic-release/git": "^10.0.1",
|
|
64
67
|
"@semantic-release/github": "^12.0.1",
|
|
65
68
|
"@semantic-release/npm": "^13.1.1",
|
|
66
|
-
"@storybook/
|
|
67
|
-
"@storybook/react": "
|
|
68
|
-
"@storybook/react-vite": "8.6.14",
|
|
69
|
+
"@storybook/react": "10.1.10",
|
|
70
|
+
"@storybook/react-vite": "10.1.10",
|
|
69
71
|
"@types/node": "^24",
|
|
70
72
|
"@types/react": "^19",
|
|
71
73
|
"@types/react-dom": "^19",
|
|
@@ -79,12 +81,14 @@
|
|
|
79
81
|
"react-toastify": "^11.0.5",
|
|
80
82
|
"sass-embedded": "^1.93.3",
|
|
81
83
|
"semantic-release": "^25.0.1",
|
|
82
|
-
"storybook": "
|
|
84
|
+
"storybook": "10.1.10",
|
|
83
85
|
"tsup": "^8.5.0",
|
|
84
86
|
"typescript": "^5",
|
|
85
87
|
"vite": "^5"
|
|
86
88
|
},
|
|
87
89
|
"publishConfig": {
|
|
88
|
-
"access": "public"
|
|
90
|
+
"access": "public",
|
|
91
|
+
"provenance": true,
|
|
92
|
+
"registry": "https://registry.npmjs.org/"
|
|
89
93
|
}
|
|
90
94
|
}
|