@mondrianai/runyourai-design-system 0.0.24 → 0.0.25
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.d.mts +34 -18
- package/dist/index.d.ts +34 -18
- package/dist/index.js +365 -368
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +326 -329
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Menubar as Menubar$1, Slider as Slider$1, Switch as Switch$1, Tooltip as Tooltip$1, Popover as Popover$1 } from 'radix-ui';
|
|
3
|
+
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Menubar as Menubar$1, Slider as Slider$1, Toggle as Toggle$1, Switch as Switch$1, Tooltip as Tooltip$1, Popover as Popover$1 } from 'radix-ui';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -717,6 +717,10 @@ interface ProgressProps {
|
|
|
717
717
|
tooltip?: string;
|
|
718
718
|
className?: string;
|
|
719
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* 진행률 바 — Radix Progress 기반(role=progressbar, aria-valuenow/valuemin/valuemax).
|
|
722
|
+
* warning/danger 임계값 색상, tooltip 지원.
|
|
723
|
+
*/
|
|
720
724
|
declare function Progress({ value, warning, danger, tooltip, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
721
725
|
|
|
722
726
|
interface Item<T extends string> {
|
|
@@ -727,8 +731,18 @@ interface SegmentedControlProps<T extends string> {
|
|
|
727
731
|
value: T;
|
|
728
732
|
onChange: (value: T) => void;
|
|
729
733
|
items: readonly Item<T>[];
|
|
734
|
+
/**
|
|
735
|
+
* true면 컨테이너를 w-full로 펼치고 각 세그먼트를 균등분할(flex-1)한다.
|
|
736
|
+
* 기본 false — 콘텐츠 폭(각 세그먼트가 라벨 길이에 맞춰짐).
|
|
737
|
+
*/
|
|
738
|
+
block?: boolean;
|
|
739
|
+
className?: string;
|
|
730
740
|
}
|
|
731
|
-
|
|
741
|
+
/**
|
|
742
|
+
* 세그먼트 컨트롤(값/필터 선택) — Tabs `variant="pill"`과 동일 스타일.
|
|
743
|
+
* 균등분할이 필요하면 `block`. 라벨이 칸보다 길면 말줄임되고, 그 경우에만 hover 시 툴팁으로 전체 표시.
|
|
744
|
+
*/
|
|
745
|
+
declare function SegmentedControl<T extends string>({ value, onChange, items, block, className, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
|
|
732
746
|
|
|
733
747
|
interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'type'> {
|
|
734
748
|
value: string;
|
|
@@ -948,35 +962,37 @@ interface TabsProps<T extends string = string> {
|
|
|
948
962
|
allTabs: TabItem<T>[];
|
|
949
963
|
current: T;
|
|
950
964
|
onTabChange: (value: T) => void;
|
|
951
|
-
/**
|
|
952
|
-
* "pill" — 회색 배경 컨테이너 + 흰 배경 active (segment control 스타일)
|
|
953
|
-
* "underline" — 하단 밑줄 active (default)
|
|
954
|
-
*/
|
|
955
|
-
variant?: 'pill' | 'underline';
|
|
956
965
|
/** 컨테이너를 w-full로 펼치고 각 탭 버튼을 균등 분할(flex-1)합니다 */
|
|
957
966
|
block?: boolean;
|
|
958
|
-
/** Tailwind height 클래스 (e.g. "h-[36px]"). 지정 시 내부 버튼 패딩도 자동 조정됩니다. */
|
|
959
|
-
height?: string;
|
|
960
967
|
className?: string;
|
|
961
968
|
}
|
|
962
969
|
/**
|
|
963
|
-
*
|
|
964
|
-
* Tabs
|
|
970
|
+
* 하단 밑줄(underline) 탭 — 서로 다른 콘텐츠 영역 전환(진짜 탭).
|
|
971
|
+
* Radix Tabs 기반: role=tablist/tab, roving tabindex, ←/→ 키보드,
|
|
972
|
+
* `activationMode="manual"`(화살표는 포커스만, 클릭/Enter/Space로 활성화).
|
|
973
|
+
*
|
|
974
|
+
* 세그먼트/값·필터 선택(구 `variant="pill"`)은 SegmentedControl을 사용한다.
|
|
975
|
+
*
|
|
976
|
+
* NOTE: 콘텐츠 패널은 사용처가 바깥에서 `current`로 렌더하므로 Tabs.Content(및 aria-controls↔
|
|
977
|
+
* aria-labelledby 연결)가 없다. 키보드·역할 a11y는 확보했으나 탭↔패널 연결은 미완.
|
|
978
|
+
* 구 pill 사용처 이관 및 릴리스 체크리스트: docs/todo/tabs-segmented-control.md
|
|
965
979
|
*/
|
|
966
|
-
declare function Tabs<T extends string = string>({ allTabs, current, onTabChange,
|
|
980
|
+
declare function Tabs<T extends string = string>({ allTabs, current, onTabChange, block, className, }: TabsProps<T>): react_jsx_runtime.JSX.Element;
|
|
967
981
|
|
|
968
|
-
interface ToggleProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
|
|
969
|
-
pressed?: boolean;
|
|
970
|
-
onPressedChange?: (pressed: boolean) => void;
|
|
971
|
-
size?: 'sm' | 'md' | 'lg';
|
|
972
|
-
}
|
|
973
982
|
declare const toggleSizeClasses: {
|
|
974
983
|
readonly sm: "h-7 min-w-7 px-1.5 text-sm";
|
|
975
984
|
readonly md: "h-9 min-w-9 px-2 text-sm";
|
|
976
985
|
readonly lg: "h-10 min-w-10 px-2.5 text-base";
|
|
977
986
|
};
|
|
978
987
|
declare const toggleBaseClasses = "inline-flex items-center justify-center gap-1.5 font-medium tracking-tight transition-colors select-none";
|
|
979
|
-
|
|
988
|
+
interface ToggleProps extends Omit<React$1.ComponentPropsWithoutRef<typeof Toggle$1.Root>, 'asChild'> {
|
|
989
|
+
size?: 'sm' | 'md' | 'lg';
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* 두 상태(on/off) 토글 버튼 — Radix Toggle 기반(aria-pressed, data-state=on/off, Space/Enter 키보드).
|
|
993
|
+
* `pressed`/`onPressedChange`로 제어한다.
|
|
994
|
+
*/
|
|
995
|
+
declare function Toggle({ size, className, ...props }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
980
996
|
|
|
981
997
|
interface ToggleGroupItemData<T extends string = string> {
|
|
982
998
|
value: T;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Menubar as Menubar$1, Slider as Slider$1, Switch as Switch$1, Tooltip as Tooltip$1, Popover as Popover$1 } from 'radix-ui';
|
|
3
|
+
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Menubar as Menubar$1, Slider as Slider$1, Toggle as Toggle$1, Switch as Switch$1, Tooltip as Tooltip$1, Popover as Popover$1 } from 'radix-ui';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -717,6 +717,10 @@ interface ProgressProps {
|
|
|
717
717
|
tooltip?: string;
|
|
718
718
|
className?: string;
|
|
719
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* 진행률 바 — Radix Progress 기반(role=progressbar, aria-valuenow/valuemin/valuemax).
|
|
722
|
+
* warning/danger 임계값 색상, tooltip 지원.
|
|
723
|
+
*/
|
|
720
724
|
declare function Progress({ value, warning, danger, tooltip, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
721
725
|
|
|
722
726
|
interface Item<T extends string> {
|
|
@@ -727,8 +731,18 @@ interface SegmentedControlProps<T extends string> {
|
|
|
727
731
|
value: T;
|
|
728
732
|
onChange: (value: T) => void;
|
|
729
733
|
items: readonly Item<T>[];
|
|
734
|
+
/**
|
|
735
|
+
* true면 컨테이너를 w-full로 펼치고 각 세그먼트를 균등분할(flex-1)한다.
|
|
736
|
+
* 기본 false — 콘텐츠 폭(각 세그먼트가 라벨 길이에 맞춰짐).
|
|
737
|
+
*/
|
|
738
|
+
block?: boolean;
|
|
739
|
+
className?: string;
|
|
730
740
|
}
|
|
731
|
-
|
|
741
|
+
/**
|
|
742
|
+
* 세그먼트 컨트롤(값/필터 선택) — Tabs `variant="pill"`과 동일 스타일.
|
|
743
|
+
* 균등분할이 필요하면 `block`. 라벨이 칸보다 길면 말줄임되고, 그 경우에만 hover 시 툴팁으로 전체 표시.
|
|
744
|
+
*/
|
|
745
|
+
declare function SegmentedControl<T extends string>({ value, onChange, items, block, className, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
|
|
732
746
|
|
|
733
747
|
interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'type'> {
|
|
734
748
|
value: string;
|
|
@@ -948,35 +962,37 @@ interface TabsProps<T extends string = string> {
|
|
|
948
962
|
allTabs: TabItem<T>[];
|
|
949
963
|
current: T;
|
|
950
964
|
onTabChange: (value: T) => void;
|
|
951
|
-
/**
|
|
952
|
-
* "pill" — 회색 배경 컨테이너 + 흰 배경 active (segment control 스타일)
|
|
953
|
-
* "underline" — 하단 밑줄 active (default)
|
|
954
|
-
*/
|
|
955
|
-
variant?: 'pill' | 'underline';
|
|
956
965
|
/** 컨테이너를 w-full로 펼치고 각 탭 버튼을 균등 분할(flex-1)합니다 */
|
|
957
966
|
block?: boolean;
|
|
958
|
-
/** Tailwind height 클래스 (e.g. "h-[36px]"). 지정 시 내부 버튼 패딩도 자동 조정됩니다. */
|
|
959
|
-
height?: string;
|
|
960
967
|
className?: string;
|
|
961
968
|
}
|
|
962
969
|
/**
|
|
963
|
-
*
|
|
964
|
-
* Tabs
|
|
970
|
+
* 하단 밑줄(underline) 탭 — 서로 다른 콘텐츠 영역 전환(진짜 탭).
|
|
971
|
+
* Radix Tabs 기반: role=tablist/tab, roving tabindex, ←/→ 키보드,
|
|
972
|
+
* `activationMode="manual"`(화살표는 포커스만, 클릭/Enter/Space로 활성화).
|
|
973
|
+
*
|
|
974
|
+
* 세그먼트/값·필터 선택(구 `variant="pill"`)은 SegmentedControl을 사용한다.
|
|
975
|
+
*
|
|
976
|
+
* NOTE: 콘텐츠 패널은 사용처가 바깥에서 `current`로 렌더하므로 Tabs.Content(및 aria-controls↔
|
|
977
|
+
* aria-labelledby 연결)가 없다. 키보드·역할 a11y는 확보했으나 탭↔패널 연결은 미완.
|
|
978
|
+
* 구 pill 사용처 이관 및 릴리스 체크리스트: docs/todo/tabs-segmented-control.md
|
|
965
979
|
*/
|
|
966
|
-
declare function Tabs<T extends string = string>({ allTabs, current, onTabChange,
|
|
980
|
+
declare function Tabs<T extends string = string>({ allTabs, current, onTabChange, block, className, }: TabsProps<T>): react_jsx_runtime.JSX.Element;
|
|
967
981
|
|
|
968
|
-
interface ToggleProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
|
|
969
|
-
pressed?: boolean;
|
|
970
|
-
onPressedChange?: (pressed: boolean) => void;
|
|
971
|
-
size?: 'sm' | 'md' | 'lg';
|
|
972
|
-
}
|
|
973
982
|
declare const toggleSizeClasses: {
|
|
974
983
|
readonly sm: "h-7 min-w-7 px-1.5 text-sm";
|
|
975
984
|
readonly md: "h-9 min-w-9 px-2 text-sm";
|
|
976
985
|
readonly lg: "h-10 min-w-10 px-2.5 text-base";
|
|
977
986
|
};
|
|
978
987
|
declare const toggleBaseClasses = "inline-flex items-center justify-center gap-1.5 font-medium tracking-tight transition-colors select-none";
|
|
979
|
-
|
|
988
|
+
interface ToggleProps extends Omit<React$1.ComponentPropsWithoutRef<typeof Toggle$1.Root>, 'asChild'> {
|
|
989
|
+
size?: 'sm' | 'md' | 'lg';
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* 두 상태(on/off) 토글 버튼 — Radix Toggle 기반(aria-pressed, data-state=on/off, Space/Enter 키보드).
|
|
993
|
+
* `pressed`/`onPressedChange`로 제어한다.
|
|
994
|
+
*/
|
|
995
|
+
declare function Toggle({ size, className, ...props }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
980
996
|
|
|
981
997
|
interface ToggleGroupItemData<T extends string = string> {
|
|
982
998
|
value: T;
|