@bestow-ui/react 1.3.0 → 1.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/README.md +9 -3
- package/dist/{chunk-VH7JW6N7.js → chunk-VQ45DNC3.js} +18 -2
- package/dist/chunk-VQ45DNC3.js.map +1 -0
- package/dist/client.js +459 -303
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +526 -337
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +57 -10
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +98 -9
- package/dist/index.d.ts +98 -9
- package/dist/shared.js +19 -1
- package/dist/shared.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-VH7JW6N7.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -80,13 +80,33 @@ declare const lightTokens: {
|
|
|
80
80
|
type Widen<T> = {
|
|
81
81
|
[K in keyof T]: T[K] extends string ? string : Widen<T[K]>;
|
|
82
82
|
};
|
|
83
|
-
type ThemeTokens = Widen<typeof lightTokens>;
|
|
84
83
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
84
|
+
* 기본값이 없는 선택 토큰 — CSS 변수를 정의하지 않고, 쓰는 곳에서 `fallbackVar` 로 기존 토큰을 따른다.
|
|
85
|
+
* 그래서 넣지 않으면 화면이 그대로이고, 기존 토큰(border.default 등)을 덮어쓴 사용자 설정도 계속 따른다(하위 영역의 CSS 덮어쓰기 포함).
|
|
86
|
+
* - `color.border.input`·`inputHover` (1.x 추가): 입력 칸(Input·Select·Combobox·Textarea·인증번호 칸 등) 테두리. 기본은 border.default·border.strong.
|
|
87
|
+
* 흰 배경과 1.3:1 인 기본 테두리를 3:1 이상으로 올리려면 `strongInputBorders` 를 쓴다(2.0 에서 기본값이 될 예정).
|
|
88
|
+
* - `color.border.control` (1.x 추가): Checkbox·Radio 테두리, 꺼진 Switch 트랙, Stepper 의 예정 단계. 기본은 border.strong(라이트 2.07:1).
|
|
87
89
|
*/
|
|
90
|
+
declare const optionalTokens: {
|
|
91
|
+
color: {
|
|
92
|
+
border: {
|
|
93
|
+
input: string;
|
|
94
|
+
inputHover: string;
|
|
95
|
+
control: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
type ThemeTokens = Widen<typeof lightTokens> & Widen<typeof optionalTokens>;
|
|
88
100
|
declare const vars: {
|
|
89
101
|
color: {
|
|
102
|
+
border: {
|
|
103
|
+
input: `var(--${string})`;
|
|
104
|
+
inputHover: `var(--${string})`;
|
|
105
|
+
control: `var(--${string})`;
|
|
106
|
+
default: `var(--${string})`;
|
|
107
|
+
strong: `var(--${string})`;
|
|
108
|
+
focus: `var(--${string})`;
|
|
109
|
+
};
|
|
90
110
|
bg: {
|
|
91
111
|
default: `var(--${string})`;
|
|
92
112
|
subtle: `var(--${string})`;
|
|
@@ -100,11 +120,6 @@ declare const vars: {
|
|
|
100
120
|
subtle: `var(--${string})`;
|
|
101
121
|
inverse: `var(--${string})`;
|
|
102
122
|
};
|
|
103
|
-
border: {
|
|
104
|
-
default: `var(--${string})`;
|
|
105
|
-
strong: `var(--${string})`;
|
|
106
|
-
focus: `var(--${string})`;
|
|
107
|
-
};
|
|
108
123
|
primary: {
|
|
109
124
|
solid: `var(--${string})`;
|
|
110
125
|
solidHover: `var(--${string})`;
|
|
@@ -259,6 +274,17 @@ type IntentName = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
|
259
274
|
*/
|
|
260
275
|
declare function createIntentColors(intent: IntentName, color: string): ThemeInput;
|
|
261
276
|
|
|
277
|
+
/**
|
|
278
|
+
* 입력 칸·체크 컨트롤 테두리를 배경과 3:1 이상으로 올리는 테마 입력 (WCAG 1.4.11 비텍스트 대비) — 2.0 에서 기본값이 될 예정.
|
|
279
|
+
* - 입력 칸(border.input): 기본 border.default 는 흰 배경과 1.3:1. hover 는 테두리보다 더 진하게(다크는 더 밝게).
|
|
280
|
+
* - Checkbox·Radio 테두리, 꺼진 Switch, Stepper 예정 단계(border.control): 기본 border.strong 은 라이트 흰 배경과 2.07:1.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* <ThemeProvider overrides={createTheme(strongInputBorders)}>…</ThemeProvider>
|
|
284
|
+
* createTheme(createIntentColors('primary', '#7c3aed'), strongInputBorders) // 브랜드 테마와 함께
|
|
285
|
+
*/
|
|
286
|
+
declare const strongInputBorders: ThemeInput;
|
|
287
|
+
|
|
262
288
|
/**
|
|
263
289
|
* 컴포넌트의 기본 문구. 모두 생략할 수 있고, 생략하면 각 컴포넌트의 한국어 기본값을 쓴다.
|
|
264
290
|
* 우선순위: 컴포넌트에 직접 준 prop > LocaleProvider 의 messages > 한국어 기본값.
|
|
@@ -313,6 +339,10 @@ interface BestowMessages {
|
|
|
313
339
|
fileTooMany?: (maxFiles: number) => string;
|
|
314
340
|
/** ErrorSummary 제목 — "입력한 내용에 고칠 곳이 3개 있어요" (1.0 이후 추가, 선택 키) */
|
|
315
341
|
errorSummaryTitle?: (count: number) => string;
|
|
342
|
+
/** DateRangePicker — "시작일", "종료일", 빠른 선택 묶음 이름 "빠른 선택" (1.0 이후 추가, 선택 키) */
|
|
343
|
+
dateRangeStart?: string;
|
|
344
|
+
dateRangeEnd?: string;
|
|
345
|
+
dateRangePresets?: string;
|
|
316
346
|
/** Slider 범위 손잡이 — "최소", "최대" */
|
|
317
347
|
rangeStart: string;
|
|
318
348
|
rangeEnd: string;
|
|
@@ -520,6 +550,23 @@ interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
|
520
550
|
*/
|
|
521
551
|
declare const DescriptionList: react.ForwardRefExoticComponent<DescriptionListProps & react.RefAttributes<HTMLDListElement>>;
|
|
522
552
|
|
|
553
|
+
interface DateRange {
|
|
554
|
+
/** 시작일 'YYYY-MM-DD' (없으면 '') */
|
|
555
|
+
start: string;
|
|
556
|
+
/** 종료일 'YYYY-MM-DD' (없으면 '') */
|
|
557
|
+
end: string;
|
|
558
|
+
}
|
|
559
|
+
/** 빠른 선택 — 오늘에서 거슬러 올라간 기간. `days: 0` 은 오늘 하루 */
|
|
560
|
+
interface DateRangePreset {
|
|
561
|
+
label: string;
|
|
562
|
+
days?: number;
|
|
563
|
+
months?: number;
|
|
564
|
+
}
|
|
565
|
+
/** 조회 화면에서 흔한 빠른 선택(오늘·1주일·1개월·3개월). 그대로 넘기거나 골라 쓴다 */
|
|
566
|
+
declare const dateRangePresets: DateRangePreset[];
|
|
567
|
+
/** 빠른 선택이 가리키는 기간 (오늘 'YYYY-MM-DD' 기준) */
|
|
568
|
+
declare function presetRange(preset: DateRangePreset, today: string): DateRange;
|
|
569
|
+
|
|
523
570
|
interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
524
571
|
/** 방향. vertical 은 flex 행 안에서 부모 높이를 채운다 */
|
|
525
572
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -1076,6 +1123,47 @@ interface DatePickerProps {
|
|
|
1076
1123
|
*/
|
|
1077
1124
|
declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
1078
1125
|
|
|
1126
|
+
interface DateRangePickerProps {
|
|
1127
|
+
/** 기간 (제어 모드) */
|
|
1128
|
+
value?: DateRange;
|
|
1129
|
+
/** 처음 기간 (비제어 모드) */
|
|
1130
|
+
defaultValue?: DateRange;
|
|
1131
|
+
/** 시작일·종료일이 바뀔 때. 비었거나 고를 수 없는 날짜면 '' */
|
|
1132
|
+
onValueChange?: (range: DateRange) => void;
|
|
1133
|
+
/** 묶음 이름 (legend) — 예: "조회 기간" */
|
|
1134
|
+
label?: ReactNode;
|
|
1135
|
+
/** 시작일 칸 레이블 (기본 "시작일") */
|
|
1136
|
+
startLabel?: string;
|
|
1137
|
+
/** 종료일 칸 레이블 (기본 "종료일") */
|
|
1138
|
+
endLabel?: string;
|
|
1139
|
+
/** 빠른 선택 버튼 — 오늘에서 거슬러 올라간 기간 (`dateRangePresets` 를 그대로 넘겨도 된다) */
|
|
1140
|
+
presets?: DateRangePreset[];
|
|
1141
|
+
/** 고를 수 있는 가장 이른 날 */
|
|
1142
|
+
min?: string;
|
|
1143
|
+
/** 고를 수 있는 가장 늦은 날 */
|
|
1144
|
+
max?: string;
|
|
1145
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
1146
|
+
isHoliday?: (date: Date) => boolean;
|
|
1147
|
+
/** "오늘" 을 고정한다 (빠른 선택의 기준, 달력의 오늘 표시 — 테스트·시각 회귀용) */
|
|
1148
|
+
today?: string;
|
|
1149
|
+
/** 묶음 아래 도움말 */
|
|
1150
|
+
helperText?: ReactNode;
|
|
1151
|
+
error?: boolean;
|
|
1152
|
+
required?: boolean;
|
|
1153
|
+
disabled?: boolean;
|
|
1154
|
+
/** form 제출용 이름 — 시작일·종료일 */
|
|
1155
|
+
startName?: string;
|
|
1156
|
+
endName?: string;
|
|
1157
|
+
/** fieldset 의 id (시작·종료 칸은 `${id}-start`, `${id}-end`) — ErrorSummary 링크가 가리키면 시작일로 간다 */
|
|
1158
|
+
id?: string;
|
|
1159
|
+
className?: string;
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* 기간 선택 (조회 기간, 예약 기간). 시작일·종료일 DatePicker 두 개를 묶고, 시작일은 종료일보다 늦을 수 없게 서로 제한한다.
|
|
1163
|
+
* 빠른 선택(오늘·1주일·1개월…)은 현재 기간과 같으면 눌린 상태(aria-pressed)로 보인다.
|
|
1164
|
+
*/
|
|
1165
|
+
declare const DateRangePicker: react.ForwardRefExoticComponent<DateRangePickerProps & react.RefAttributes<HTMLFieldSetElement>>;
|
|
1166
|
+
|
|
1079
1167
|
interface DrawerProps {
|
|
1080
1168
|
/** 열림 상태 (제어 모드) */
|
|
1081
1169
|
open?: boolean;
|
|
@@ -1965,4 +2053,5 @@ interface VerificationCodeInputProps {
|
|
|
1965
2053
|
*/
|
|
1966
2054
|
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1967
2055
|
|
|
1968
|
-
export { Accordion, AccordionItem,
|
|
2056
|
+
export { Accordion, AccordionItem, AddressInput, AgreementGroup, Alert, AmountInput, Avatar, Badge, Breadcrumb, BusinessNumberInput, Button, Calendar, Card, CardBody, CardFooter, CardHeader, Checkbox, Combobox, DatePicker, DateRangePicker, DescriptionList, Divider, Drawer, DrawerClose, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorSummary, FileUpload, IconButton, Input, Link, LocaleProvider, Modal, ModalClose, NumberInput, Pagination, PhoneNumberInput, Popover, PopoverClose, Progress, RadioGroup, SegmentedControl, Select, Skeleton, SkipLink, Slider, Spinner, Stack, Stepper, Switch, Table, TableBody, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TextField, Textarea, ThemeProvider, ToastProvider, Tooltip, Typography, VerificationCodeInput, VisuallyHidden, composeExtraAddress, contrastRatio, createIntentColors, createTheme, dateRangePresets, en, focusField, formatBusinessNumber, formatKoreanAmount, formatKoreanDate, formatPhoneNumber, hasAllRequiredAgreements, isValidBusinessNumber, kakaoPostcodeProvider, parseISODate, presetRange, strongInputBorders, themeClass, toISODate, useMessages, usePortalProps, useTableSelection, useTheme, useToast, vars };
|
|
2057
|
+
export type { AccordionItemProps, AccordionProps, AddressInputProps, AddressProvider, AddressSearchResult, AddressValue, AgreementGroupProps, AgreementItem, AlertColor, AlertProps, AmountInputProps, AvatarProps, BadgeProps, BestowMessages, BestowTheme, BreadcrumbItemData, BreadcrumbProps, BusinessNumberInputProps, ButtonProps, CalendarProps, CardProps, CardSectionProps, CheckboxProps, ComboboxOption, ComboboxProps, DatePickerProps, DateRange, DateRangePickerProps, DateRangePreset, DeepPartial, DescriptionListItem, DescriptionListProps, DividerProps, DrawerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps, ErrorSummaryItem, ErrorSummaryProps, FileRejection, FileRejectionReason, FileUploadProps, IconButtonProps, InputProps, IntentName, LinkProps, LocaleProviderProps, Messages, ModalProps, NumberInputProps, PaginationItemType, PaginationProps, PhoneNumberInputProps, PopoverProps, ProgressProps, RadioGroupProps, RadioOption, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SkeletonProps, SkipLinkProps, SliderProps, SpinnerProps, StackProps, StepperProps, StepperStep, SwitchProps, TableAlign, TableCellProps, TableEmptyProps, TableHeadProps, TableProps, TableRowProps, TableSize, TableSkeletonProps, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TextFieldProps, TextareaProps, ThemeInput, ThemeName, ThemeOverrides, ThemeProviderProps, ThemeTokens, ToastColor, ToastContextValue, ToastOptions, ToastProviderProps, TooltipProps, TypographyProps, TypographyVariant, VerificationCodeInputProps, VisuallyHiddenProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -80,13 +80,33 @@ declare const lightTokens: {
|
|
|
80
80
|
type Widen<T> = {
|
|
81
81
|
[K in keyof T]: T[K] extends string ? string : Widen<T[K]>;
|
|
82
82
|
};
|
|
83
|
-
type ThemeTokens = Widen<typeof lightTokens>;
|
|
84
83
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
84
|
+
* 기본값이 없는 선택 토큰 — CSS 변수를 정의하지 않고, 쓰는 곳에서 `fallbackVar` 로 기존 토큰을 따른다.
|
|
85
|
+
* 그래서 넣지 않으면 화면이 그대로이고, 기존 토큰(border.default 등)을 덮어쓴 사용자 설정도 계속 따른다(하위 영역의 CSS 덮어쓰기 포함).
|
|
86
|
+
* - `color.border.input`·`inputHover` (1.x 추가): 입력 칸(Input·Select·Combobox·Textarea·인증번호 칸 등) 테두리. 기본은 border.default·border.strong.
|
|
87
|
+
* 흰 배경과 1.3:1 인 기본 테두리를 3:1 이상으로 올리려면 `strongInputBorders` 를 쓴다(2.0 에서 기본값이 될 예정).
|
|
88
|
+
* - `color.border.control` (1.x 추가): Checkbox·Radio 테두리, 꺼진 Switch 트랙, Stepper 의 예정 단계. 기본은 border.strong(라이트 2.07:1).
|
|
87
89
|
*/
|
|
90
|
+
declare const optionalTokens: {
|
|
91
|
+
color: {
|
|
92
|
+
border: {
|
|
93
|
+
input: string;
|
|
94
|
+
inputHover: string;
|
|
95
|
+
control: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
type ThemeTokens = Widen<typeof lightTokens> & Widen<typeof optionalTokens>;
|
|
88
100
|
declare const vars: {
|
|
89
101
|
color: {
|
|
102
|
+
border: {
|
|
103
|
+
input: `var(--${string})`;
|
|
104
|
+
inputHover: `var(--${string})`;
|
|
105
|
+
control: `var(--${string})`;
|
|
106
|
+
default: `var(--${string})`;
|
|
107
|
+
strong: `var(--${string})`;
|
|
108
|
+
focus: `var(--${string})`;
|
|
109
|
+
};
|
|
90
110
|
bg: {
|
|
91
111
|
default: `var(--${string})`;
|
|
92
112
|
subtle: `var(--${string})`;
|
|
@@ -100,11 +120,6 @@ declare const vars: {
|
|
|
100
120
|
subtle: `var(--${string})`;
|
|
101
121
|
inverse: `var(--${string})`;
|
|
102
122
|
};
|
|
103
|
-
border: {
|
|
104
|
-
default: `var(--${string})`;
|
|
105
|
-
strong: `var(--${string})`;
|
|
106
|
-
focus: `var(--${string})`;
|
|
107
|
-
};
|
|
108
123
|
primary: {
|
|
109
124
|
solid: `var(--${string})`;
|
|
110
125
|
solidHover: `var(--${string})`;
|
|
@@ -259,6 +274,17 @@ type IntentName = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
|
259
274
|
*/
|
|
260
275
|
declare function createIntentColors(intent: IntentName, color: string): ThemeInput;
|
|
261
276
|
|
|
277
|
+
/**
|
|
278
|
+
* 입력 칸·체크 컨트롤 테두리를 배경과 3:1 이상으로 올리는 테마 입력 (WCAG 1.4.11 비텍스트 대비) — 2.0 에서 기본값이 될 예정.
|
|
279
|
+
* - 입력 칸(border.input): 기본 border.default 는 흰 배경과 1.3:1. hover 는 테두리보다 더 진하게(다크는 더 밝게).
|
|
280
|
+
* - Checkbox·Radio 테두리, 꺼진 Switch, Stepper 예정 단계(border.control): 기본 border.strong 은 라이트 흰 배경과 2.07:1.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* <ThemeProvider overrides={createTheme(strongInputBorders)}>…</ThemeProvider>
|
|
284
|
+
* createTheme(createIntentColors('primary', '#7c3aed'), strongInputBorders) // 브랜드 테마와 함께
|
|
285
|
+
*/
|
|
286
|
+
declare const strongInputBorders: ThemeInput;
|
|
287
|
+
|
|
262
288
|
/**
|
|
263
289
|
* 컴포넌트의 기본 문구. 모두 생략할 수 있고, 생략하면 각 컴포넌트의 한국어 기본값을 쓴다.
|
|
264
290
|
* 우선순위: 컴포넌트에 직접 준 prop > LocaleProvider 의 messages > 한국어 기본값.
|
|
@@ -313,6 +339,10 @@ interface BestowMessages {
|
|
|
313
339
|
fileTooMany?: (maxFiles: number) => string;
|
|
314
340
|
/** ErrorSummary 제목 — "입력한 내용에 고칠 곳이 3개 있어요" (1.0 이후 추가, 선택 키) */
|
|
315
341
|
errorSummaryTitle?: (count: number) => string;
|
|
342
|
+
/** DateRangePicker — "시작일", "종료일", 빠른 선택 묶음 이름 "빠른 선택" (1.0 이후 추가, 선택 키) */
|
|
343
|
+
dateRangeStart?: string;
|
|
344
|
+
dateRangeEnd?: string;
|
|
345
|
+
dateRangePresets?: string;
|
|
316
346
|
/** Slider 범위 손잡이 — "최소", "최대" */
|
|
317
347
|
rangeStart: string;
|
|
318
348
|
rangeEnd: string;
|
|
@@ -520,6 +550,23 @@ interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
|
520
550
|
*/
|
|
521
551
|
declare const DescriptionList: react.ForwardRefExoticComponent<DescriptionListProps & react.RefAttributes<HTMLDListElement>>;
|
|
522
552
|
|
|
553
|
+
interface DateRange {
|
|
554
|
+
/** 시작일 'YYYY-MM-DD' (없으면 '') */
|
|
555
|
+
start: string;
|
|
556
|
+
/** 종료일 'YYYY-MM-DD' (없으면 '') */
|
|
557
|
+
end: string;
|
|
558
|
+
}
|
|
559
|
+
/** 빠른 선택 — 오늘에서 거슬러 올라간 기간. `days: 0` 은 오늘 하루 */
|
|
560
|
+
interface DateRangePreset {
|
|
561
|
+
label: string;
|
|
562
|
+
days?: number;
|
|
563
|
+
months?: number;
|
|
564
|
+
}
|
|
565
|
+
/** 조회 화면에서 흔한 빠른 선택(오늘·1주일·1개월·3개월). 그대로 넘기거나 골라 쓴다 */
|
|
566
|
+
declare const dateRangePresets: DateRangePreset[];
|
|
567
|
+
/** 빠른 선택이 가리키는 기간 (오늘 'YYYY-MM-DD' 기준) */
|
|
568
|
+
declare function presetRange(preset: DateRangePreset, today: string): DateRange;
|
|
569
|
+
|
|
523
570
|
interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
524
571
|
/** 방향. vertical 은 flex 행 안에서 부모 높이를 채운다 */
|
|
525
572
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -1076,6 +1123,47 @@ interface DatePickerProps {
|
|
|
1076
1123
|
*/
|
|
1077
1124
|
declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
1078
1125
|
|
|
1126
|
+
interface DateRangePickerProps {
|
|
1127
|
+
/** 기간 (제어 모드) */
|
|
1128
|
+
value?: DateRange;
|
|
1129
|
+
/** 처음 기간 (비제어 모드) */
|
|
1130
|
+
defaultValue?: DateRange;
|
|
1131
|
+
/** 시작일·종료일이 바뀔 때. 비었거나 고를 수 없는 날짜면 '' */
|
|
1132
|
+
onValueChange?: (range: DateRange) => void;
|
|
1133
|
+
/** 묶음 이름 (legend) — 예: "조회 기간" */
|
|
1134
|
+
label?: ReactNode;
|
|
1135
|
+
/** 시작일 칸 레이블 (기본 "시작일") */
|
|
1136
|
+
startLabel?: string;
|
|
1137
|
+
/** 종료일 칸 레이블 (기본 "종료일") */
|
|
1138
|
+
endLabel?: string;
|
|
1139
|
+
/** 빠른 선택 버튼 — 오늘에서 거슬러 올라간 기간 (`dateRangePresets` 를 그대로 넘겨도 된다) */
|
|
1140
|
+
presets?: DateRangePreset[];
|
|
1141
|
+
/** 고를 수 있는 가장 이른 날 */
|
|
1142
|
+
min?: string;
|
|
1143
|
+
/** 고를 수 있는 가장 늦은 날 */
|
|
1144
|
+
max?: string;
|
|
1145
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
1146
|
+
isHoliday?: (date: Date) => boolean;
|
|
1147
|
+
/** "오늘" 을 고정한다 (빠른 선택의 기준, 달력의 오늘 표시 — 테스트·시각 회귀용) */
|
|
1148
|
+
today?: string;
|
|
1149
|
+
/** 묶음 아래 도움말 */
|
|
1150
|
+
helperText?: ReactNode;
|
|
1151
|
+
error?: boolean;
|
|
1152
|
+
required?: boolean;
|
|
1153
|
+
disabled?: boolean;
|
|
1154
|
+
/** form 제출용 이름 — 시작일·종료일 */
|
|
1155
|
+
startName?: string;
|
|
1156
|
+
endName?: string;
|
|
1157
|
+
/** fieldset 의 id (시작·종료 칸은 `${id}-start`, `${id}-end`) — ErrorSummary 링크가 가리키면 시작일로 간다 */
|
|
1158
|
+
id?: string;
|
|
1159
|
+
className?: string;
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* 기간 선택 (조회 기간, 예약 기간). 시작일·종료일 DatePicker 두 개를 묶고, 시작일은 종료일보다 늦을 수 없게 서로 제한한다.
|
|
1163
|
+
* 빠른 선택(오늘·1주일·1개월…)은 현재 기간과 같으면 눌린 상태(aria-pressed)로 보인다.
|
|
1164
|
+
*/
|
|
1165
|
+
declare const DateRangePicker: react.ForwardRefExoticComponent<DateRangePickerProps & react.RefAttributes<HTMLFieldSetElement>>;
|
|
1166
|
+
|
|
1079
1167
|
interface DrawerProps {
|
|
1080
1168
|
/** 열림 상태 (제어 모드) */
|
|
1081
1169
|
open?: boolean;
|
|
@@ -1965,4 +2053,5 @@ interface VerificationCodeInputProps {
|
|
|
1965
2053
|
*/
|
|
1966
2054
|
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1967
2055
|
|
|
1968
|
-
export { Accordion, AccordionItem,
|
|
2056
|
+
export { Accordion, AccordionItem, AddressInput, AgreementGroup, Alert, AmountInput, Avatar, Badge, Breadcrumb, BusinessNumberInput, Button, Calendar, Card, CardBody, CardFooter, CardHeader, Checkbox, Combobox, DatePicker, DateRangePicker, DescriptionList, Divider, Drawer, DrawerClose, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorSummary, FileUpload, IconButton, Input, Link, LocaleProvider, Modal, ModalClose, NumberInput, Pagination, PhoneNumberInput, Popover, PopoverClose, Progress, RadioGroup, SegmentedControl, Select, Skeleton, SkipLink, Slider, Spinner, Stack, Stepper, Switch, Table, TableBody, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TextField, Textarea, ThemeProvider, ToastProvider, Tooltip, Typography, VerificationCodeInput, VisuallyHidden, composeExtraAddress, contrastRatio, createIntentColors, createTheme, dateRangePresets, en, focusField, formatBusinessNumber, formatKoreanAmount, formatKoreanDate, formatPhoneNumber, hasAllRequiredAgreements, isValidBusinessNumber, kakaoPostcodeProvider, parseISODate, presetRange, strongInputBorders, themeClass, toISODate, useMessages, usePortalProps, useTableSelection, useTheme, useToast, vars };
|
|
2057
|
+
export type { AccordionItemProps, AccordionProps, AddressInputProps, AddressProvider, AddressSearchResult, AddressValue, AgreementGroupProps, AgreementItem, AlertColor, AlertProps, AmountInputProps, AvatarProps, BadgeProps, BestowMessages, BestowTheme, BreadcrumbItemData, BreadcrumbProps, BusinessNumberInputProps, ButtonProps, CalendarProps, CardProps, CardSectionProps, CheckboxProps, ComboboxOption, ComboboxProps, DatePickerProps, DateRange, DateRangePickerProps, DateRangePreset, DeepPartial, DescriptionListItem, DescriptionListProps, DividerProps, DrawerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps, ErrorSummaryItem, ErrorSummaryProps, FileRejection, FileRejectionReason, FileUploadProps, IconButtonProps, InputProps, IntentName, LinkProps, LocaleProviderProps, Messages, ModalProps, NumberInputProps, PaginationItemType, PaginationProps, PhoneNumberInputProps, PopoverProps, ProgressProps, RadioGroupProps, RadioOption, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SkeletonProps, SkipLinkProps, SliderProps, SpinnerProps, StackProps, StepperProps, StepperStep, SwitchProps, TableAlign, TableCellProps, TableEmptyProps, TableHeadProps, TableProps, TableRowProps, TableSize, TableSkeletonProps, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TextFieldProps, TextareaProps, ThemeInput, ThemeName, ThemeOverrides, ThemeProviderProps, ThemeTokens, ToastColor, ToastContextValue, ToastOptions, ToastProviderProps, TooltipProps, TypographyProps, TypographyVariant, VerificationCodeInputProps, VisuallyHiddenProps };
|
package/dist/shared.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
composeExtraAddress,
|
|
4
4
|
createTheme,
|
|
5
5
|
cx,
|
|
6
|
+
dateRangePresets,
|
|
6
7
|
focusField,
|
|
7
8
|
formatBusinessNumber,
|
|
8
9
|
formatKoreanAmount,
|
|
@@ -11,11 +12,12 @@ import {
|
|
|
11
12
|
isValidBusinessNumber,
|
|
12
13
|
kakaoPostcodeProvider,
|
|
13
14
|
parseISODate,
|
|
15
|
+
presetRange,
|
|
14
16
|
themeClass,
|
|
15
17
|
toISODate,
|
|
16
18
|
vars,
|
|
17
19
|
visuallyHidden
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VQ45DNC3.js";
|
|
19
21
|
|
|
20
22
|
// src/theme/color.ts
|
|
21
23
|
import { darkColors, lightColors, palette } from "@bestow-ui/tokens";
|
|
@@ -154,6 +156,16 @@ function createIntentColors(intent, color) {
|
|
|
154
156
|
};
|
|
155
157
|
}
|
|
156
158
|
|
|
159
|
+
// src/theme/presets.ts
|
|
160
|
+
var strongInputBorders = /* @__PURE__ */ Object.freeze({
|
|
161
|
+
// 라이트: gray600 / gray700 — 흰 배경 5.18:1, bg.subtle(gray50) 4.91:1
|
|
162
|
+
// 체크 컨트롤: gray600 — 흰 배경 5.18:1
|
|
163
|
+
light: { color: { border: { input: "#666e76", inputHover: "#495057", control: "#666e76" } } },
|
|
164
|
+
// 다크: gray500 / gray300 — gray600 은 bg.subtle(gray900) 위에서 2.98:1 이라 한 단계 밝게. bg.default 8.57:1, bg.subtle 7.43:1
|
|
165
|
+
// 체크 컨트롤: gray500 — 다크 기본값(border.strong)과 같다(이미 8.57:1)
|
|
166
|
+
dark: { color: { border: { input: "#adb5bd", inputHover: "#dee2e6", control: "#adb5bd" } } }
|
|
167
|
+
});
|
|
168
|
+
|
|
157
169
|
// src/i18n/en.ts
|
|
158
170
|
var WEEKDAYS_LONG = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
159
171
|
var MONTHS = [
|
|
@@ -197,6 +209,9 @@ var en = {
|
|
|
197
209
|
fileTooLarge: (name, maxSize) => `${name}: files must be ${maxSize} or smaller.`,
|
|
198
210
|
fileTypeNotAllowed: (name) => `${name}: this file type is not allowed.`,
|
|
199
211
|
fileTooMany: (maxFiles) => `You can upload up to ${maxFiles} files.`,
|
|
212
|
+
dateRangeStart: "Start date",
|
|
213
|
+
dateRangeEnd: "End date",
|
|
214
|
+
dateRangePresets: "Quick select",
|
|
200
215
|
errorSummaryTitle: (count) => `There ${count === 1 ? "is 1 problem" : `are ${count} problems`} with your answers`,
|
|
201
216
|
rangeStart: "minimum",
|
|
202
217
|
rangeEnd: "maximum",
|
|
@@ -472,6 +487,7 @@ export {
|
|
|
472
487
|
contrastRatio,
|
|
473
488
|
createIntentColors,
|
|
474
489
|
createTheme,
|
|
490
|
+
dateRangePresets,
|
|
475
491
|
en,
|
|
476
492
|
focusField,
|
|
477
493
|
formatBusinessNumber,
|
|
@@ -482,6 +498,8 @@ export {
|
|
|
482
498
|
isValidBusinessNumber,
|
|
483
499
|
kakaoPostcodeProvider,
|
|
484
500
|
parseISODate,
|
|
501
|
+
presetRange,
|
|
502
|
+
strongInputBorders,
|
|
485
503
|
themeClass,
|
|
486
504
|
toISODate,
|
|
487
505
|
vars
|