@xmart/xorder-ui 0.4.0 → 0.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.
@@ -0,0 +1,5 @@
1
+ export declare const box: string;
2
+ export declare const control: string;
3
+ export declare const indicator: string;
4
+ export declare const checkIcon: string;
5
+ export declare const label: string;
@@ -0,0 +1,25 @@
1
+ import { Checkbox as BaseUICheckbox } from '@base-ui/react/checkbox';
2
+ import { ComponentPropsWithRef, ReactNode } from 'react';
3
+ type CheckboxOwnProps = {
4
+ /**
5
+ * チェック状態が変化した時のコールバック
6
+ * @param checked 新しい状態
7
+ */
8
+ onCheckedChange?: (checked: boolean) => void;
9
+ };
10
+ export type CheckboxProps = Omit<BaseUICheckbox.Root.Props, 'children' | 'indeterminate' | 'onCheckedChange'> & CheckboxOwnProps;
11
+ export declare const Checkbox: {
12
+ (props: CheckboxProps): import("react").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ export interface CheckboxLabelProps extends ComponentPropsWithRef<'label'> {
16
+ /**
17
+ * 通常 `<Checkbox />` とラベル文字列を含めます
18
+ */
19
+ children?: ReactNode;
20
+ }
21
+ export declare const CheckboxLabel: {
22
+ (props: CheckboxLabelProps): import("react").JSX.Element;
23
+ displayName: string;
24
+ };
25
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Checkbox, CheckboxLabel, type CheckboxLabelProps, type CheckboxProps } from './checkbox';
@@ -1,5 +1,6 @@
1
1
  export { Alert, type AlertProps, type AlertVariant } from './alert';
2
2
  export { Button, type ButtonProps } from './button';
3
+ export { Checkbox, CheckboxLabel, type CheckboxLabelProps, type CheckboxProps } from './checkbox';
3
4
  export { IconButton, type IconButtonProps } from './icon-button';
4
5
  export { Input, type InputProps } from './input';
5
6
  export { Modal, type ModalBodyProps, type ModalCloseProps, type ModalFooterActionsActionWidth, type ModalFooterActionsAlign, type ModalFooterActionsProps, type ModalFooterProps, type ModalHeaderProps, type ModalProps, type ModalTitleProps, } from './modal';
@@ -1,5 +1,4 @@
1
1
  export declare const root: string;
2
- export declare const horizontal: string;
3
2
  export declare const item: string;
4
3
  export declare const indicator: string;
5
4
  export declare const indicatorInner: string;
@@ -1,34 +1,31 @@
1
- import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import * as RadixRadioGroup from '@radix-ui/react-radio-group';
1
+ import { Radio } from '@base-ui/react/radio';
2
+ import { RadioGroup as BaseUIRadioGroup } from '@base-ui/react/radio-group';
3
3
  type RadioGroupRootOwnProps = {
4
- /**
5
- * ラジオグループの値が変更されたときに呼び出されるコールバック関数
6
- * @param value 選択された値
7
- */
8
- onChange?: (value: string) => void;
9
4
  /**
10
5
  * ラジオグループの方向を制御します
11
6
  * @default 'vertical'
12
7
  */
13
8
  orientation?: 'horizontal' | 'vertical';
14
9
  };
15
- type RadioGroupRootProps = Omit<ComponentPropsWithoutRef<typeof RadixRadioGroup.Root>, 'onValueChange' | keyof RadioGroupRootOwnProps> & RadioGroupRootOwnProps;
16
- declare const RadioGroupRoot: import('react').ForwardRefExoticComponent<Omit<Omit<RadixRadioGroup.RadioGroupProps & import('react').RefAttributes<HTMLDivElement>, "ref">, "onValueChange" | keyof RadioGroupRootOwnProps> & RadioGroupRootOwnProps & import('react').RefAttributes<HTMLDivElement>>;
17
- type RadioGroupItemOwnProps = {
18
- /**
19
- * trueの場合、ラジオボタンのレンダリングを子要素に委譲します
20
- */
21
- asChild?: boolean;
22
- /**
23
- * ラジオボタンの子要素
24
- */
25
- children?: ReactNode;
10
+ type RadioGroupRootProps<TValue> = BaseUIRadioGroup.Props<TValue> & RadioGroupRootOwnProps;
11
+ declare const RadioGroupRoot: {
12
+ <TValue>(props: RadioGroupRootProps<TValue>): import("react").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ type RadioGroupItemProps<TValue> = Radio.Root.Props<TValue>;
16
+ declare const RadioGroupItem: {
17
+ <TValue>(props: RadioGroupItemProps<TValue>): import("react").JSX.Element;
18
+ displayName: string;
26
19
  };
27
- type RadioGroupItemProps = ComponentPropsWithoutRef<typeof RadixRadioGroup.Item> & RadioGroupItemOwnProps;
28
- declare const RadioGroupItem: import('react').ForwardRefExoticComponent<Omit<RadixRadioGroup.RadioGroupItemProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & RadioGroupItemOwnProps & import('react').RefAttributes<HTMLButtonElement>>;
29
20
  declare const RadioGroup: {
30
- Root: import('react').ForwardRefExoticComponent<Omit<Omit<RadixRadioGroup.RadioGroupProps & import('react').RefAttributes<HTMLDivElement>, "ref">, "onValueChange" | keyof RadioGroupRootOwnProps> & RadioGroupRootOwnProps & import('react').RefAttributes<HTMLDivElement>>;
31
- Item: import('react').ForwardRefExoticComponent<Omit<RadixRadioGroup.RadioGroupItemProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & RadioGroupItemOwnProps & import('react').RefAttributes<HTMLButtonElement>>;
21
+ Root: {
22
+ <TValue>(props: RadioGroupRootProps<TValue>): import("react").JSX.Element;
23
+ displayName: string;
24
+ };
25
+ Item: {
26
+ <TValue>(props: RadioGroupItemProps<TValue>): import("react").JSX.Element;
27
+ displayName: string;
28
+ };
32
29
  };
33
30
  export { RadioGroup, RadioGroupItem, RadioGroupRoot };
34
31
  export type { RadioGroupItemProps, RadioGroupRootProps };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { Alert, type AlertProps, type AlertVariant, Button, type ButtonProps, IconButton, type IconButtonProps, Input, type InputProps, Modal, type ModalBodyProps, type ModalCloseProps, type ModalFooterActionsActionWidth, type ModalFooterActionsAlign, type ModalFooterActionsProps, type ModalFooterProps, type ModalHeaderProps, type ModalProps, type ModalTitleProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, RadioGroupRoot, type RadioGroupRootProps, SelectBox, type SelectBoxOption, type SelectBoxProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Tag, type TagProps, Textarea, type TextareaProps, Text, type TextFontSize, type TextFontWeight, type TextForeground, type TextProps, } from './components';
1
+ export { Alert, type AlertProps, type AlertVariant, Button, type ButtonProps, Checkbox, CheckboxLabel, type CheckboxLabelProps, type CheckboxProps, IconButton, type IconButtonProps, Input, type InputProps, Modal, type ModalBodyProps, type ModalCloseProps, type ModalFooterActionsActionWidth, type ModalFooterActionsAlign, type ModalFooterActionsProps, type ModalFooterProps, type ModalHeaderProps, type ModalProps, type ModalTitleProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, RadioGroupRoot, type RadioGroupRootProps, SelectBox, type SelectBoxOption, type SelectBoxProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Tag, type TagProps, Textarea, type TextareaProps, Text, type TextFontSize, type TextFontWeight, type TextForeground, type TextProps, } from './components';
2
2
  export { primitive, semantic } from './styles/tokens';