@bestow-ui/react 1.5.0 → 1.6.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-VQ45DNC3.js → chunk-NKLDAXUR.js} +2 -77
- package/dist/chunk-NKLDAXUR.js.map +1 -0
- package/dist/client.js +345 -194
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +381 -288
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +77 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +40 -45
- package/dist/index.d.ts +40 -45
- package/dist/shared.js +10 -6
- package/dist/shared.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-VQ45DNC3.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _bestow_ui_tokens from '@bestow-ui/tokens';
|
|
2
2
|
import { space } from '@bestow-ui/tokens';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { ReactNode, HTMLAttributes, ElementType, CSSProperties, ComponentPropsWithoutRef, InputHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, OlHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
4
|
+
import { ReactNode, HTMLAttributes, ElementType, CSSProperties, ComponentPropsWithoutRef, InputHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, SelectHTMLAttributes, OlHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
5
|
+
export { composeExtraAddress, formatBusinessNumber, formatKoreanAmount, formatKoreanDate, formatPhoneNumber, isValidBusinessNumber } from '@bestow-ui/korean-utils';
|
|
5
6
|
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
6
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
7
8
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
@@ -419,40 +420,10 @@ declare function useMessages(): Messages;
|
|
|
419
420
|
*/
|
|
420
421
|
declare const en: BestowMessages;
|
|
421
422
|
|
|
422
|
-
/**
|
|
423
|
-
* 숫자만 있는 전화번호에 하이픈을 넣는다. 입력 중인 값도 자연스럽게 나눈다.
|
|
424
|
-
* @example formatPhoneNumber('01012345678') // '010-1234-5678'
|
|
425
|
-
* @example formatPhoneNumber('021234567') // '02-123-4567'
|
|
426
|
-
* @example formatPhoneNumber('15881234') // '1588-1234'
|
|
427
|
-
*/
|
|
428
|
-
declare function formatPhoneNumber(input: string): string;
|
|
429
|
-
/**
|
|
430
|
-
* 사업자등록번호(10자리)에 하이픈을 넣는다.
|
|
431
|
-
* @example formatBusinessNumber('1234567890') // '123-45-67890'
|
|
432
|
-
*/
|
|
433
|
-
declare function formatBusinessNumber(input: string): string;
|
|
434
|
-
/**
|
|
435
|
-
* 사업자등록번호 검증 공식(가중치 1,3,7,1,3,7,1,3,5)으로 확인한다. 실제로 등록된 번호인지는 국세청 조회가 필요하다.
|
|
436
|
-
* @example isValidBusinessNumber('124-81-00998') // true
|
|
437
|
-
*/
|
|
438
|
-
declare function isValidBusinessNumber(input: string): boolean;
|
|
439
|
-
/**
|
|
440
|
-
* 금액을 만·억·조 단위로 읽기 쉽게 쓴다.
|
|
441
|
-
* @example formatKoreanAmount(125000) // '12만 5,000원'
|
|
442
|
-
* @example formatKoreanAmount(150000000) // '1억 5,000만원'
|
|
443
|
-
* @example formatKoreanAmount(0) // '0원'
|
|
444
|
-
*/
|
|
445
|
-
declare function formatKoreanAmount(amount: number, unit?: string): string;
|
|
446
|
-
|
|
447
423
|
/** Date → 'YYYY-MM-DD' (로컬 기준) */
|
|
448
424
|
declare function toISODate(date: Date): string;
|
|
449
425
|
/** 'YYYY-MM-DD' → Date (로컬 자정). 형식이 틀리거나 없는 날짜(2월 30일 등)면 null */
|
|
450
426
|
declare function parseISODate(value: string | null | undefined): Date | null;
|
|
451
|
-
/**
|
|
452
|
-
* 한국어 날짜. 스크린리더용 날짜 이름 등에 쓴다.
|
|
453
|
-
* @example formatKoreanDate(new Date(2026, 9, 15)) // '2026년 10월 15일 목요일'
|
|
454
|
-
*/
|
|
455
|
-
declare function formatKoreanDate(date: Date, withWeekday?: boolean): string;
|
|
456
427
|
|
|
457
428
|
/** 주소 검색 결과 */
|
|
458
429
|
interface AddressSearchResult {
|
|
@@ -468,18 +439,7 @@ interface AddressSearchResult {
|
|
|
468
439
|
* 정리 함수를 돌려주면 검색 창이 닫힐 때 부른다. 다른 주소 서비스(행정안전부 도로명주소 API 등)로 바꿔 끼울 수 있다.
|
|
469
440
|
*/
|
|
470
441
|
type AddressProvider = (container: HTMLElement, onSelect: (result: AddressSearchResult) => void) => void | (() => void) | Promise<void | (() => void)>;
|
|
471
|
-
|
|
472
|
-
zonecode: string;
|
|
473
|
-
userSelectedType: 'R' | 'J';
|
|
474
|
-
roadAddress: string;
|
|
475
|
-
jibunAddress: string;
|
|
476
|
-
autoJibunAddress?: string;
|
|
477
|
-
bname: string;
|
|
478
|
-
buildingName: string;
|
|
479
|
-
apartment: 'Y' | 'N';
|
|
480
|
-
}
|
|
481
|
-
/** 카카오 가이드의 방식으로 도로명 주소의 참고 항목(법정동, 공동주택 건물명)을 만든다 */
|
|
482
|
-
declare function composeExtraAddress(data: Pick<KakaoPostcodeData, 'userSelectedType' | 'bname' | 'buildingName' | 'apartment'>): string;
|
|
442
|
+
|
|
483
443
|
/**
|
|
484
444
|
* 기본 공급자: 카카오(다음) 우편번호 서비스. 처음 쓸 때 스크립트를 불러오므로 코어 번들 크기에 영향이 없다.
|
|
485
445
|
* 사용 조건은 서비스 가이드를 따른다.
|
|
@@ -1642,6 +1602,37 @@ interface SegmentedControlProps {
|
|
|
1642
1602
|
*/
|
|
1643
1603
|
declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
|
|
1644
1604
|
|
|
1605
|
+
interface NativeSelectOption {
|
|
1606
|
+
value: string;
|
|
1607
|
+
/** `<option>` 은 글자만 담을 수 있어 문자열 */
|
|
1608
|
+
label: string;
|
|
1609
|
+
disabled?: boolean;
|
|
1610
|
+
}
|
|
1611
|
+
interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size' | 'multiple'> {
|
|
1612
|
+
/** 선택지 목록. 없으면 children 의 `<option>`·`<optgroup>` 을 그대로 쓴다 */
|
|
1613
|
+
options?: NativeSelectOption[];
|
|
1614
|
+
/** 값이 바뀔 때 새 값으로 호출된다 (Select 와 같은 이름). 네이티브 onChange 도 함께 쓸 수 있다 */
|
|
1615
|
+
onValueChange?: (value: string) => void;
|
|
1616
|
+
/** 선택 전 표시할 문구 — 값이 '' 인 고를 수 없는 첫 항목으로 들어간다 */
|
|
1617
|
+
placeholder?: string;
|
|
1618
|
+
/** 위에 표시할 레이블 */
|
|
1619
|
+
label?: ReactNode;
|
|
1620
|
+
/** 아래에 표시할 도움말. error 일 때는 에러 메시지로 표시된다 */
|
|
1621
|
+
helperText?: ReactNode;
|
|
1622
|
+
/** 에러 상태 */
|
|
1623
|
+
error?: boolean;
|
|
1624
|
+
/** 크기 */
|
|
1625
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1626
|
+
/** 부모 너비를 꽉 채운다 */
|
|
1627
|
+
fullWidth?: boolean;
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* 브라우저 기본 `<select>` 에 Select 와 같은 모양을 입힌 것. Radix 가 없어 가볍고(폼 세트 번들이 크게 준다),
|
|
1631
|
+
* 모바일에서는 운영체제의 선택 화면이 열린다. `register(...)` 를 그대로 펼칠 수 있다.
|
|
1632
|
+
* 목록 모양을 꾸미거나 항목에 아이콘을 넣어야 하면 Select 를 쓴다.
|
|
1633
|
+
*/
|
|
1634
|
+
declare const NativeSelect: react.ForwardRefExoticComponent<NativeSelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
1635
|
+
|
|
1645
1636
|
interface SelectOption {
|
|
1646
1637
|
value: string;
|
|
1647
1638
|
label: ReactNode;
|
|
@@ -1798,6 +1789,10 @@ interface SwitchProps {
|
|
|
1798
1789
|
/** 바깥 래퍼 className */
|
|
1799
1790
|
className?: string;
|
|
1800
1791
|
}
|
|
1792
|
+
/**
|
|
1793
|
+
* 켜고 끄는 스위치. `<button role="switch">` 로 그리고, form 안에서는 숨긴 checkbox 로 값 제출·required 검증·reset 을 처리한다
|
|
1794
|
+
* (1.5 까지 쓰던 Radix Switch 와 같은 동작 — 번들을 줄이려고 직접 구현).
|
|
1795
|
+
*/
|
|
1801
1796
|
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1802
1797
|
|
|
1803
1798
|
type TableSize = 'sm' | 'md';
|
|
@@ -2053,5 +2048,5 @@ interface VerificationCodeInputProps {
|
|
|
2053
2048
|
*/
|
|
2054
2049
|
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
2055
2050
|
|
|
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,
|
|
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 };
|
|
2051
|
+
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, NativeSelect, 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, contrastRatio, createIntentColors, createTheme, dateRangePresets, en, focusField, hasAllRequiredAgreements, kakaoPostcodeProvider, parseISODate, presetRange, strongInputBorders, themeClass, toISODate, useMessages, usePortalProps, useTableSelection, useTheme, useToast, vars };
|
|
2052
|
+
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, NativeSelectOption, NativeSelectProps, 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
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _bestow_ui_tokens from '@bestow-ui/tokens';
|
|
2
2
|
import { space } from '@bestow-ui/tokens';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { ReactNode, HTMLAttributes, ElementType, CSSProperties, ComponentPropsWithoutRef, InputHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, OlHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
4
|
+
import { ReactNode, HTMLAttributes, ElementType, CSSProperties, ComponentPropsWithoutRef, InputHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, SelectHTMLAttributes, OlHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
5
|
+
export { composeExtraAddress, formatBusinessNumber, formatKoreanAmount, formatKoreanDate, formatPhoneNumber, isValidBusinessNumber } from '@bestow-ui/korean-utils';
|
|
5
6
|
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
6
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
7
8
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
@@ -419,40 +420,10 @@ declare function useMessages(): Messages;
|
|
|
419
420
|
*/
|
|
420
421
|
declare const en: BestowMessages;
|
|
421
422
|
|
|
422
|
-
/**
|
|
423
|
-
* 숫자만 있는 전화번호에 하이픈을 넣는다. 입력 중인 값도 자연스럽게 나눈다.
|
|
424
|
-
* @example formatPhoneNumber('01012345678') // '010-1234-5678'
|
|
425
|
-
* @example formatPhoneNumber('021234567') // '02-123-4567'
|
|
426
|
-
* @example formatPhoneNumber('15881234') // '1588-1234'
|
|
427
|
-
*/
|
|
428
|
-
declare function formatPhoneNumber(input: string): string;
|
|
429
|
-
/**
|
|
430
|
-
* 사업자등록번호(10자리)에 하이픈을 넣는다.
|
|
431
|
-
* @example formatBusinessNumber('1234567890') // '123-45-67890'
|
|
432
|
-
*/
|
|
433
|
-
declare function formatBusinessNumber(input: string): string;
|
|
434
|
-
/**
|
|
435
|
-
* 사업자등록번호 검증 공식(가중치 1,3,7,1,3,7,1,3,5)으로 확인한다. 실제로 등록된 번호인지는 국세청 조회가 필요하다.
|
|
436
|
-
* @example isValidBusinessNumber('124-81-00998') // true
|
|
437
|
-
*/
|
|
438
|
-
declare function isValidBusinessNumber(input: string): boolean;
|
|
439
|
-
/**
|
|
440
|
-
* 금액을 만·억·조 단위로 읽기 쉽게 쓴다.
|
|
441
|
-
* @example formatKoreanAmount(125000) // '12만 5,000원'
|
|
442
|
-
* @example formatKoreanAmount(150000000) // '1억 5,000만원'
|
|
443
|
-
* @example formatKoreanAmount(0) // '0원'
|
|
444
|
-
*/
|
|
445
|
-
declare function formatKoreanAmount(amount: number, unit?: string): string;
|
|
446
|
-
|
|
447
423
|
/** Date → 'YYYY-MM-DD' (로컬 기준) */
|
|
448
424
|
declare function toISODate(date: Date): string;
|
|
449
425
|
/** 'YYYY-MM-DD' → Date (로컬 자정). 형식이 틀리거나 없는 날짜(2월 30일 등)면 null */
|
|
450
426
|
declare function parseISODate(value: string | null | undefined): Date | null;
|
|
451
|
-
/**
|
|
452
|
-
* 한국어 날짜. 스크린리더용 날짜 이름 등에 쓴다.
|
|
453
|
-
* @example formatKoreanDate(new Date(2026, 9, 15)) // '2026년 10월 15일 목요일'
|
|
454
|
-
*/
|
|
455
|
-
declare function formatKoreanDate(date: Date, withWeekday?: boolean): string;
|
|
456
427
|
|
|
457
428
|
/** 주소 검색 결과 */
|
|
458
429
|
interface AddressSearchResult {
|
|
@@ -468,18 +439,7 @@ interface AddressSearchResult {
|
|
|
468
439
|
* 정리 함수를 돌려주면 검색 창이 닫힐 때 부른다. 다른 주소 서비스(행정안전부 도로명주소 API 등)로 바꿔 끼울 수 있다.
|
|
469
440
|
*/
|
|
470
441
|
type AddressProvider = (container: HTMLElement, onSelect: (result: AddressSearchResult) => void) => void | (() => void) | Promise<void | (() => void)>;
|
|
471
|
-
|
|
472
|
-
zonecode: string;
|
|
473
|
-
userSelectedType: 'R' | 'J';
|
|
474
|
-
roadAddress: string;
|
|
475
|
-
jibunAddress: string;
|
|
476
|
-
autoJibunAddress?: string;
|
|
477
|
-
bname: string;
|
|
478
|
-
buildingName: string;
|
|
479
|
-
apartment: 'Y' | 'N';
|
|
480
|
-
}
|
|
481
|
-
/** 카카오 가이드의 방식으로 도로명 주소의 참고 항목(법정동, 공동주택 건물명)을 만든다 */
|
|
482
|
-
declare function composeExtraAddress(data: Pick<KakaoPostcodeData, 'userSelectedType' | 'bname' | 'buildingName' | 'apartment'>): string;
|
|
442
|
+
|
|
483
443
|
/**
|
|
484
444
|
* 기본 공급자: 카카오(다음) 우편번호 서비스. 처음 쓸 때 스크립트를 불러오므로 코어 번들 크기에 영향이 없다.
|
|
485
445
|
* 사용 조건은 서비스 가이드를 따른다.
|
|
@@ -1642,6 +1602,37 @@ interface SegmentedControlProps {
|
|
|
1642
1602
|
*/
|
|
1643
1603
|
declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
|
|
1644
1604
|
|
|
1605
|
+
interface NativeSelectOption {
|
|
1606
|
+
value: string;
|
|
1607
|
+
/** `<option>` 은 글자만 담을 수 있어 문자열 */
|
|
1608
|
+
label: string;
|
|
1609
|
+
disabled?: boolean;
|
|
1610
|
+
}
|
|
1611
|
+
interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size' | 'multiple'> {
|
|
1612
|
+
/** 선택지 목록. 없으면 children 의 `<option>`·`<optgroup>` 을 그대로 쓴다 */
|
|
1613
|
+
options?: NativeSelectOption[];
|
|
1614
|
+
/** 값이 바뀔 때 새 값으로 호출된다 (Select 와 같은 이름). 네이티브 onChange 도 함께 쓸 수 있다 */
|
|
1615
|
+
onValueChange?: (value: string) => void;
|
|
1616
|
+
/** 선택 전 표시할 문구 — 값이 '' 인 고를 수 없는 첫 항목으로 들어간다 */
|
|
1617
|
+
placeholder?: string;
|
|
1618
|
+
/** 위에 표시할 레이블 */
|
|
1619
|
+
label?: ReactNode;
|
|
1620
|
+
/** 아래에 표시할 도움말. error 일 때는 에러 메시지로 표시된다 */
|
|
1621
|
+
helperText?: ReactNode;
|
|
1622
|
+
/** 에러 상태 */
|
|
1623
|
+
error?: boolean;
|
|
1624
|
+
/** 크기 */
|
|
1625
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1626
|
+
/** 부모 너비를 꽉 채운다 */
|
|
1627
|
+
fullWidth?: boolean;
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* 브라우저 기본 `<select>` 에 Select 와 같은 모양을 입힌 것. Radix 가 없어 가볍고(폼 세트 번들이 크게 준다),
|
|
1631
|
+
* 모바일에서는 운영체제의 선택 화면이 열린다. `register(...)` 를 그대로 펼칠 수 있다.
|
|
1632
|
+
* 목록 모양을 꾸미거나 항목에 아이콘을 넣어야 하면 Select 를 쓴다.
|
|
1633
|
+
*/
|
|
1634
|
+
declare const NativeSelect: react.ForwardRefExoticComponent<NativeSelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
1635
|
+
|
|
1645
1636
|
interface SelectOption {
|
|
1646
1637
|
value: string;
|
|
1647
1638
|
label: ReactNode;
|
|
@@ -1798,6 +1789,10 @@ interface SwitchProps {
|
|
|
1798
1789
|
/** 바깥 래퍼 className */
|
|
1799
1790
|
className?: string;
|
|
1800
1791
|
}
|
|
1792
|
+
/**
|
|
1793
|
+
* 켜고 끄는 스위치. `<button role="switch">` 로 그리고, form 안에서는 숨긴 checkbox 로 값 제출·required 검증·reset 을 처리한다
|
|
1794
|
+
* (1.5 까지 쓰던 Radix Switch 와 같은 동작 — 번들을 줄이려고 직접 구현).
|
|
1795
|
+
*/
|
|
1801
1796
|
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1802
1797
|
|
|
1803
1798
|
type TableSize = 'sm' | 'md';
|
|
@@ -2053,5 +2048,5 @@ interface VerificationCodeInputProps {
|
|
|
2053
2048
|
*/
|
|
2054
2049
|
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
2055
2050
|
|
|
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,
|
|
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 };
|
|
2051
|
+
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, NativeSelect, 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, contrastRatio, createIntentColors, createTheme, dateRangePresets, en, focusField, hasAllRequiredAgreements, kakaoPostcodeProvider, parseISODate, presetRange, strongInputBorders, themeClass, toISODate, useMessages, usePortalProps, useTableSelection, useTheme, useToast, vars };
|
|
2052
|
+
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, NativeSelectOption, NativeSelectProps, 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
|
@@ -5,11 +5,6 @@ import {
|
|
|
5
5
|
cx,
|
|
6
6
|
dateRangePresets,
|
|
7
7
|
focusField,
|
|
8
|
-
formatBusinessNumber,
|
|
9
|
-
formatKoreanAmount,
|
|
10
|
-
formatKoreanDate,
|
|
11
|
-
formatPhoneNumber,
|
|
12
|
-
isValidBusinessNumber,
|
|
13
8
|
kakaoPostcodeProvider,
|
|
14
9
|
parseISODate,
|
|
15
10
|
presetRange,
|
|
@@ -17,7 +12,7 @@ import {
|
|
|
17
12
|
toISODate,
|
|
18
13
|
vars,
|
|
19
14
|
visuallyHidden
|
|
20
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NKLDAXUR.js";
|
|
21
16
|
|
|
22
17
|
// src/theme/color.ts
|
|
23
18
|
import { darkColors, lightColors, palette } from "@bestow-ui/tokens";
|
|
@@ -256,6 +251,15 @@ var en = {
|
|
|
256
251
|
dateIncomplete: "Enter the date as YYYY-MM-DD."
|
|
257
252
|
};
|
|
258
253
|
|
|
254
|
+
// src/shared.ts
|
|
255
|
+
import {
|
|
256
|
+
formatBusinessNumber,
|
|
257
|
+
formatKoreanAmount,
|
|
258
|
+
formatKoreanDate,
|
|
259
|
+
formatPhoneNumber,
|
|
260
|
+
isValidBusinessNumber
|
|
261
|
+
} from "@bestow-ui/korean-utils";
|
|
262
|
+
|
|
259
263
|
// src/components/AgreementGroup/agreements.ts
|
|
260
264
|
function hasAllRequiredAgreements(items, value2) {
|
|
261
265
|
return items.every((item2) => !item2.required || value2.includes(item2.value));
|