@seed-design/lynx-react 0.4.1 → 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.
- package/lib/components/Accordion/Accordion.d.ts +56 -0
- package/lib/components/Accordion/Accordion.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.jsx +210 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts +2 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.namespace.js +17 -0
- package/lib/components/Accordion/index.d.ts +3 -0
- package/lib/components/Accordion/index.d.ts.map +1 -0
- package/lib/components/ActionButton/ActionButton.jsx +6 -6
- package/lib/components/AppBar/AppBar.jsx +1 -1
- package/lib/components/Badge/Badge.jsx +1 -1
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.jsx +6 -3
- package/lib/components/Box/Box.jsx +1 -1
- package/lib/components/Callout/Callout.d.ts +32 -0
- package/lib/components/Callout/Callout.d.ts.map +1 -0
- package/lib/components/Callout/Callout.jsx +113 -0
- package/lib/components/Callout/Callout.namespace.d.ts +2 -0
- package/lib/components/Callout/Callout.namespace.d.ts.map +1 -0
- package/lib/components/Callout/Callout.namespace.js +13 -0
- package/lib/components/Callout/index.d.ts +3 -0
- package/lib/components/Callout/index.d.ts.map +1 -0
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.jsx +36 -5
- package/lib/components/Chip/Chip.d.ts +66 -0
- package/lib/components/Chip/Chip.d.ts.map +1 -0
- package/lib/components/Chip/Chip.jsx +159 -0
- package/lib/components/Chip/Chip.namespace.d.ts +2 -0
- package/lib/components/Chip/Chip.namespace.d.ts.map +1 -0
- package/lib/components/Chip/Chip.namespace.js +16 -0
- package/lib/components/Chip/index.d.ts +3 -0
- package/lib/components/Chip/index.d.ts.map +1 -0
- package/lib/components/Divider/Divider.d.ts +31 -0
- package/lib/components/Divider/Divider.d.ts.map +1 -0
- package/lib/components/Divider/Divider.jsx +26 -0
- package/lib/components/Divider/index.d.ts +2 -0
- package/lib/components/Divider/index.d.ts.map +1 -0
- package/lib/components/Field/Field.jsx +1 -1
- package/lib/components/Icon/Icon.jsx +2 -2
- package/lib/components/ProgressCircle/ProgressCircle.jsx +2 -2
- package/lib/components/RadioGroup/RadioGroup.jsx +2 -2
- package/lib/components/Stack/Stack.jsx +1 -1
- package/lib/components/Switch/Switch.jsx +2 -2
- package/lib/components/Tabs/Tabs.d.ts +59 -0
- package/lib/components/Tabs/Tabs.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.jsx +406 -0
- package/lib/components/Tabs/Tabs.namespace.d.ts +2 -0
- package/lib/components/Tabs/Tabs.namespace.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.namespace.js +14 -0
- package/lib/components/Tabs/index.d.ts +3 -0
- package/lib/components/Tabs/index.d.ts.map +1 -0
- package/lib/components/TagGroup/TagGroup.jsx +2 -2
- package/lib/components/Text/Text.jsx +2 -2
- package/lib/components/TextField/TextField.jsx +2 -2
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/useIconColor.d.ts +2 -1
- package/lib/hooks/useIconColor.d.ts.map +1 -1
- package/lib/hooks/useIconColor.js +29 -5
- package/lib/hooks/usePressTap.d.ts.map +1 -1
- package/lib/hooks/usePressTap.js +1 -0
- package/lib/index.js +14 -5
- package/lib/utils/create-slot-recipe-context.jsx +1 -1
- package/package.json +2 -2
- package/src/components/Accordion/Accordion.namespace.ts +22 -0
- package/src/components/Accordion/Accordion.test.tsx +129 -0
- package/src/components/Accordion/Accordion.tsx +453 -0
- package/src/components/Accordion/index.ts +24 -0
- package/src/components/BottomSheet/BottomSheet.test.tsx +24 -0
- package/src/components/BottomSheet/BottomSheet.tsx +14 -2
- package/src/components/Callout/Callout.namespace.ts +14 -0
- package/src/components/Callout/Callout.test.tsx +188 -0
- package/src/components/Callout/Callout.tsx +272 -0
- package/src/components/Callout/index.ts +16 -0
- package/src/components/Checkbox/Checkbox.test.tsx +176 -0
- package/src/components/Checkbox/Checkbox.tsx +36 -2
- package/src/components/Chip/Chip.namespace.ts +20 -0
- package/src/components/Chip/Chip.test.tsx +113 -0
- package/src/components/Chip/Chip.tsx +373 -0
- package/src/components/Chip/index.ts +22 -0
- package/src/components/Divider/Divider.test.tsx +73 -0
- package/src/components/Divider/Divider.tsx +76 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/Icon/Icon.test.tsx +129 -0
- package/src/components/Tabs/Tabs.namespace.ts +16 -0
- package/src/components/Tabs/Tabs.test.tsx +181 -0
- package/src/components/Tabs/Tabs.tsx +706 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/index.ts +5 -0
- package/src/hooks/useIconColor.ts +43 -5
- package/src/hooks/usePressTap.test.ts +13 -0
- package/src/hooks/usePressTap.ts +1 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
1
2
|
import { usePressTap } from "../../hooks/usePressTap.js";
|
|
2
3
|
import { InternalIcon } from "../Icon/Icon.jsx";
|
|
3
|
-
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
4
4
|
import { splitMultipleVariantsProps } from "../../utils/split-multiple-variants-props.js";
|
|
5
|
-
import clsx from "clsx";
|
|
6
5
|
import * as React from "@lynx-js/react";
|
|
7
6
|
import { isValidElement } from "@lynx-js/react";
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import { checkbox } from "@seed-design/lynx-css/recipes/checkbox";
|
|
9
9
|
import { checkmark } from "@seed-design/lynx-css/recipes/checkmark";
|
|
10
10
|
import { checkboxGroup } from "@seed-design/lynx-css/recipes/checkbox-group";
|
|
@@ -33,10 +33,25 @@ var CheckboxRoot = React.forwardRef((props, ref) => {
|
|
|
33
33
|
onChange: onCheckedChange
|
|
34
34
|
});
|
|
35
35
|
const toggle = React.useCallback(() => setChecked(!checked), [checked, setChecked]);
|
|
36
|
-
const
|
|
36
|
+
const pressSelectionRef = React.useRef({
|
|
37
|
+
checked,
|
|
38
|
+
indeterminate
|
|
39
|
+
});
|
|
40
|
+
const { pressed, bindtouchstart, ...pressHandlers } = usePressTap({
|
|
37
41
|
disabled,
|
|
38
42
|
onTap: toggle
|
|
39
43
|
});
|
|
44
|
+
const handleTouchStart = React.useCallback((...args) => {
|
|
45
|
+
pressSelectionRef.current = {
|
|
46
|
+
checked,
|
|
47
|
+
indeterminate
|
|
48
|
+
};
|
|
49
|
+
bindtouchstart(...args);
|
|
50
|
+
}, [
|
|
51
|
+
bindtouchstart,
|
|
52
|
+
checked,
|
|
53
|
+
indeterminate
|
|
54
|
+
]);
|
|
40
55
|
const rootClassName = checkbox({
|
|
41
56
|
...checkboxVariantProps,
|
|
42
57
|
disabled
|
|
@@ -46,6 +61,8 @@ var CheckboxRoot = React.forwardRef((props, ref) => {
|
|
|
46
61
|
indeterminate,
|
|
47
62
|
disabled,
|
|
48
63
|
pressed,
|
|
64
|
+
pressStartChecked: pressSelectionRef.current.checked,
|
|
65
|
+
pressStartIndeterminate: pressSelectionRef.current.indeterminate,
|
|
49
66
|
checkboxVariantProps,
|
|
50
67
|
checkmarkVariantProps,
|
|
51
68
|
toggle
|
|
@@ -59,7 +76,7 @@ var CheckboxRoot = React.forwardRef((props, ref) => {
|
|
|
59
76
|
toggle
|
|
60
77
|
]);
|
|
61
78
|
return <CheckboxContext.Provider value={contextValue}>
|
|
62
|
-
<view {...ref ? { ref } : {}} className={clsx(rootClassName, className)} {...pressHandlers} {...nativeProps}>
|
|
79
|
+
<view {...ref ? { ref } : {}} className={clsx(rootClassName, className)} bindtouchstart={handleTouchStart} {...pressHandlers} {...nativeProps}>
|
|
63
80
|
{children}
|
|
64
81
|
</view>
|
|
65
82
|
</CheckboxContext.Provider>;
|
|
@@ -78,11 +95,25 @@ var CheckboxControl = React.forwardRef((props, ref) => {
|
|
|
78
95
|
pressed: context.pressed
|
|
79
96
|
};
|
|
80
97
|
const classes = checkmark(checkmarkVariantProps);
|
|
98
|
+
const pressStartClasses = checkmark({
|
|
99
|
+
...checkmarkVariantProps,
|
|
100
|
+
checked: context.pressStartChecked,
|
|
101
|
+
indeterminate: context.pressStartIndeterminate,
|
|
102
|
+
pressed: context.pressed
|
|
103
|
+
});
|
|
104
|
+
const isGhost = checkmarkVariantProps.variant === "ghost";
|
|
105
|
+
const rootClassName = isGhost ? checkmark({
|
|
106
|
+
...checkmarkVariantProps,
|
|
107
|
+
checked: false,
|
|
108
|
+
indeterminate: false,
|
|
109
|
+
pressed: false
|
|
110
|
+
}).root : classes.root;
|
|
81
111
|
return <CheckmarkControlContext.Provider value={{
|
|
82
112
|
iconClassName: classes.icon,
|
|
83
113
|
checkmarkVariantProps
|
|
84
114
|
}}>
|
|
85
|
-
<view {...ref ? { ref } : {}} className={clsx(
|
|
115
|
+
<view {...ref ? { ref } : {}} className={clsx(rootClassName, className)} {...nativeProps}>
|
|
116
|
+
{isGhost ? <view className={pressStartClasses.background} /> : null}
|
|
86
117
|
{children}
|
|
87
118
|
</view>
|
|
88
119
|
</CheckmarkControlContext.Provider>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ChipVariantProps } from '@seed-design/lynx-css/recipes/chip';
|
|
2
|
+
import { LynxAccessibilityProps, LynxPressableProps, LynxStyledElementProps } from '../../types';
|
|
3
|
+
import { PrefixIconProps, SuffixIconProps } from '../Icon/Icon';
|
|
4
|
+
import * as React from "@lynx-js/react";
|
|
5
|
+
type ChipPublicVariantProps = Omit<ChipVariantProps, "selected" | "pressed">;
|
|
6
|
+
/**
|
|
7
|
+
* @platform Lynx
|
|
8
|
+
*
|
|
9
|
+
* 웹 대비 미지원 기능:
|
|
10
|
+
* - HTML button 속성 및 native form 제출
|
|
11
|
+
* - 키보드 focus / focusVisible
|
|
12
|
+
* - `asChild`
|
|
13
|
+
*/
|
|
14
|
+
export interface ChipButtonProps extends ChipPublicVariantProps, LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const ChipButton: React.ForwardRefExoticComponent<ChipButtonProps & React.RefAttributes<unknown>>;
|
|
18
|
+
/** React `Chip.Root`에 대응하는 기본 action chip입니다. */
|
|
19
|
+
export interface ChipRootProps extends ChipButtonProps {
|
|
20
|
+
}
|
|
21
|
+
export declare const ChipRoot: React.ForwardRefExoticComponent<ChipRootProps & React.RefAttributes<unknown>>;
|
|
22
|
+
/**
|
|
23
|
+
* @platform Lynx
|
|
24
|
+
*
|
|
25
|
+
* 웹 대비 미지원 기능:
|
|
26
|
+
* - HiddenInput / inputProps / name / value: Lynx에 HTML form 제출 모델이 없음
|
|
27
|
+
* - raw DOM `onChange`: `onCheckedChange`로 대체
|
|
28
|
+
*/
|
|
29
|
+
export interface ChipToggleProps extends ChipButtonProps {
|
|
30
|
+
checked?: boolean;
|
|
31
|
+
defaultChecked?: boolean;
|
|
32
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare const ChipToggle: React.ForwardRefExoticComponent<ChipToggleProps & React.RefAttributes<unknown>>;
|
|
35
|
+
export interface ChipRadioRootProps extends LynxStyledElementProps {
|
|
36
|
+
value?: string;
|
|
37
|
+
defaultValue?: string;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
onValueChange?: (value: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare const ChipRadioRoot: React.ForwardRefExoticComponent<ChipRadioRootProps & React.RefAttributes<unknown>>;
|
|
42
|
+
/**
|
|
43
|
+
* @platform Lynx
|
|
44
|
+
*
|
|
45
|
+
* 웹 대비 미지원 기능:
|
|
46
|
+
* - HiddenInput / inputProps / name / required: Lynx에 HTML form 제출 모델이 없음
|
|
47
|
+
* - raw DOM `onChange`: `Chip.RadioRoot`의 `onValueChange`로 대체
|
|
48
|
+
*/
|
|
49
|
+
export interface ChipRadioItemProps extends ChipButtonProps {
|
|
50
|
+
value: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const ChipRadioItem: React.ForwardRefExoticComponent<ChipRadioItemProps & React.RefAttributes<unknown>>;
|
|
53
|
+
export interface ChipLabelProps extends LynxStyledElementProps {
|
|
54
|
+
}
|
|
55
|
+
export declare const ChipLabel: React.ForwardRefExoticComponent<ChipLabelProps & React.RefAttributes<unknown>>;
|
|
56
|
+
export interface ChipPrefixIconProps extends PrefixIconProps {
|
|
57
|
+
}
|
|
58
|
+
export declare const ChipPrefixIcon: React.ForwardRefExoticComponent<ChipPrefixIconProps & React.RefAttributes<unknown>>;
|
|
59
|
+
export interface ChipPrefixAvatarProps extends LynxStyledElementProps {
|
|
60
|
+
}
|
|
61
|
+
export declare const ChipPrefixAvatar: React.ForwardRefExoticComponent<ChipPrefixAvatarProps & React.RefAttributes<unknown>>;
|
|
62
|
+
export interface ChipSuffixIconProps extends SuffixIconProps {
|
|
63
|
+
}
|
|
64
|
+
export declare const ChipSuffixIcon: React.ForwardRefExoticComponent<ChipSuffixIconProps & React.RefAttributes<unknown>>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAIjF,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAItB,KAAK,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;AA6D7E;;;;;;;GAOG;AACH,MAAM,WAAW,eACf,SAAQ,sBAAsB,EAC5B,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,iFA2BrB,CAAC;AAGH,iDAAiD;AACjD,MAAM,WAAW,aAAc,SAAQ,eAAe;CAAG;AAEzD,eAAO,MAAM,QAAQ,+EAEnB,CAAC;AAKH;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,UAAU,iFA4CrB,CAAC;AAqBH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,aAAa,oFAqCxB,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,aAAa,oFAwCxB,CAAC;AAKH,MAAM,WAAW,cAAe,SAAQ,sBAAsB;CAAG;AAEjE,eAAO,MAAM,SAAS,gFAapB,CAAC;AAGH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;CAAG;AAE/D,eAAO,MAAM,cAAc,qFAEzB,CAAC;AAGH,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;CAAG;AAExE,eAAO,MAAM,gBAAgB,uFAa3B,CAAC;AAGH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;CAAG;AAE/D,eAAO,MAAM,cAAc,qFAEzB,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
2
|
+
import { usePressTap } from "../../hooks/usePressTap.js";
|
|
3
|
+
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
4
|
+
import { IconRequired, IconSlotProvider, PrefixIcon, SuffixIcon } from "../Icon/Icon.jsx";
|
|
5
|
+
import * as React from "@lynx-js/react";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { chip } from "@seed-design/lynx-css/recipes/chip";
|
|
8
|
+
//#region src/components/Chip/Chip.tsx
|
|
9
|
+
var { ClassNamesProvider, useClassNames } = createSlotRecipeContext(chip);
|
|
10
|
+
var ChipRootView = React.forwardRef((props, ref) => {
|
|
11
|
+
const [variantProps, otherProps] = chip.splitVariantProps(props);
|
|
12
|
+
const classes = chip(variantProps);
|
|
13
|
+
const { children, className, ...nativeProps } = otherProps;
|
|
14
|
+
const iconSlotContextValue = React.useMemo(() => ({
|
|
15
|
+
classNames: {
|
|
16
|
+
icon: classes.icon,
|
|
17
|
+
prefixIcon: classes.prefixIcon,
|
|
18
|
+
suffixIcon: classes.suffixIcon
|
|
19
|
+
},
|
|
20
|
+
deps: [
|
|
21
|
+
variantProps.variant,
|
|
22
|
+
variantProps.size,
|
|
23
|
+
variantProps.layout,
|
|
24
|
+
variantProps.selected,
|
|
25
|
+
variantProps.pressed,
|
|
26
|
+
variantProps.disabled
|
|
27
|
+
]
|
|
28
|
+
}), [
|
|
29
|
+
classes.icon,
|
|
30
|
+
classes.prefixIcon,
|
|
31
|
+
classes.suffixIcon,
|
|
32
|
+
variantProps.variant,
|
|
33
|
+
variantProps.size,
|
|
34
|
+
variantProps.layout,
|
|
35
|
+
variantProps.selected,
|
|
36
|
+
variantProps.pressed,
|
|
37
|
+
variantProps.disabled
|
|
38
|
+
]);
|
|
39
|
+
return <ClassNamesProvider value={classes}>
|
|
40
|
+
<IconSlotProvider value={iconSlotContextValue}>
|
|
41
|
+
<IconRequired enabled={variantProps.layout === "iconOnly"}>
|
|
42
|
+
<view {...ref ? { ref } : {}} className={clsx(classes.root, className)} {...nativeProps}>
|
|
43
|
+
{children}
|
|
44
|
+
</view>
|
|
45
|
+
</IconRequired>
|
|
46
|
+
</IconSlotProvider>
|
|
47
|
+
</ClassNamesProvider>;
|
|
48
|
+
});
|
|
49
|
+
ChipRootView.displayName = "ChipRootView";
|
|
50
|
+
var ChipButton = React.forwardRef((props, ref) => {
|
|
51
|
+
const { bindtap, "main-thread:bindtap": mainThreadBindtap, disabled = false, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...restProps } = props;
|
|
52
|
+
const { pressed, ...pressHandlers } = usePressTap({
|
|
53
|
+
disabled,
|
|
54
|
+
onTap: bindtap,
|
|
55
|
+
mainThreadOnTap: mainThreadBindtap
|
|
56
|
+
});
|
|
57
|
+
return <ChipRootView ref={ref} {...restProps} disabled={disabled} selected={false} pressed={pressed} accessibility-element={accessibilityElement} accessibility-traits={disabled ? "disabled" : accessibilityTraits ?? "button"} {...pressHandlers} />;
|
|
58
|
+
});
|
|
59
|
+
ChipButton.displayName = "ChipButton";
|
|
60
|
+
var ChipRoot = React.forwardRef((props, ref) => <ChipButton ref={ref} {...props} />);
|
|
61
|
+
ChipRoot.displayName = "ChipRoot";
|
|
62
|
+
var ChipToggle = React.forwardRef((props, ref) => {
|
|
63
|
+
const { checked: checkedProp, defaultChecked = false, onCheckedChange, bindtap, "main-thread:bindtap": mainThreadBindtap, disabled = false, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...restProps } = props;
|
|
64
|
+
const [checked, setChecked] = useControllableState({
|
|
65
|
+
value: checkedProp,
|
|
66
|
+
defaultValue: defaultChecked,
|
|
67
|
+
onChange: onCheckedChange
|
|
68
|
+
});
|
|
69
|
+
const { pressed, ...pressHandlers } = usePressTap({
|
|
70
|
+
disabled,
|
|
71
|
+
onTap: React.useCallback((...args) => {
|
|
72
|
+
setChecked(!checked);
|
|
73
|
+
bindtap?.(...args);
|
|
74
|
+
}, [
|
|
75
|
+
bindtap,
|
|
76
|
+
checked,
|
|
77
|
+
setChecked
|
|
78
|
+
]),
|
|
79
|
+
mainThreadOnTap: mainThreadBindtap
|
|
80
|
+
});
|
|
81
|
+
return <ChipRootView ref={ref} {...restProps} disabled={disabled} selected={checked} pressed={pressed} accessibility-element={accessibilityElement} accessibility-traits={disabled ? "disabled" : checked ? "selected" : accessibilityTraits ?? "button"} {...pressHandlers} />;
|
|
82
|
+
});
|
|
83
|
+
ChipToggle.displayName = "ChipToggle";
|
|
84
|
+
var ChipRadioGroupContext = React.createContext(null);
|
|
85
|
+
function useChipRadioGroupContext(consumer) {
|
|
86
|
+
const context = React.useContext(ChipRadioGroupContext);
|
|
87
|
+
if (!context) throw new Error(`<${consumer}/> must be rendered inside <ChipRadioRoot/>.`);
|
|
88
|
+
return context;
|
|
89
|
+
}
|
|
90
|
+
var ChipRadioRoot = React.forwardRef((props, ref) => {
|
|
91
|
+
const { value: valueProp, defaultValue, disabled = false, onValueChange, children, className, ...nativeProps } = props;
|
|
92
|
+
const handleChange = React.useCallback((nextValue) => {
|
|
93
|
+
if (nextValue !== null) onValueChange?.(nextValue);
|
|
94
|
+
}, [onValueChange]);
|
|
95
|
+
const [value, setValueInternal] = useControllableState({
|
|
96
|
+
value: valueProp !== void 0 ? valueProp : void 0,
|
|
97
|
+
defaultValue: defaultValue ?? null,
|
|
98
|
+
onChange: handleChange
|
|
99
|
+
});
|
|
100
|
+
const setValue = React.useCallback((nextValue) => setValueInternal(nextValue), [setValueInternal]);
|
|
101
|
+
const contextValue = React.useMemo(() => ({
|
|
102
|
+
value,
|
|
103
|
+
setValue,
|
|
104
|
+
disabled
|
|
105
|
+
}), [
|
|
106
|
+
value,
|
|
107
|
+
setValue,
|
|
108
|
+
disabled
|
|
109
|
+
]);
|
|
110
|
+
return <ChipRadioGroupContext.Provider value={contextValue}>
|
|
111
|
+
<view {...ref ? { ref } : {}} className={className} {...nativeProps}>
|
|
112
|
+
{children}
|
|
113
|
+
</view>
|
|
114
|
+
</ChipRadioGroupContext.Provider>;
|
|
115
|
+
});
|
|
116
|
+
ChipRadioRoot.displayName = "ChipRadioRoot";
|
|
117
|
+
var ChipRadioItem = React.forwardRef((props, ref) => {
|
|
118
|
+
const { value: itemValue, disabled: itemDisabled = false, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...restProps } = props;
|
|
119
|
+
const group = useChipRadioGroupContext("ChipRadioItem");
|
|
120
|
+
const disabled = group.disabled || itemDisabled;
|
|
121
|
+
const selected = group.value === itemValue;
|
|
122
|
+
const { pressed, ...pressHandlers } = usePressTap({
|
|
123
|
+
disabled,
|
|
124
|
+
onTap: React.useCallback((...args) => {
|
|
125
|
+
if (!selected) group.setValue(itemValue);
|
|
126
|
+
bindtap?.(...args);
|
|
127
|
+
}, [
|
|
128
|
+
bindtap,
|
|
129
|
+
group,
|
|
130
|
+
itemValue,
|
|
131
|
+
selected
|
|
132
|
+
]),
|
|
133
|
+
mainThreadOnTap: mainThreadBindtap
|
|
134
|
+
});
|
|
135
|
+
return <ChipRootView ref={ref} {...restProps} disabled={disabled} selected={selected} pressed={pressed} accessibility-element={accessibilityElement} accessibility-traits={disabled ? "disabled" : selected ? "selected" : accessibilityTraits ?? "button"} {...pressHandlers} />;
|
|
136
|
+
});
|
|
137
|
+
ChipRadioItem.displayName = "ChipRadioItem";
|
|
138
|
+
var ChipLabel = React.forwardRef((props, ref) => {
|
|
139
|
+
const classes = useClassNames();
|
|
140
|
+
const { children, className, ...nativeProps } = props;
|
|
141
|
+
return <text {...ref ? { ref } : {}} className={clsx(classes.label, className)} {...nativeProps}>
|
|
142
|
+
{children}
|
|
143
|
+
</text>;
|
|
144
|
+
});
|
|
145
|
+
ChipLabel.displayName = "ChipLabel";
|
|
146
|
+
var ChipPrefixIcon = React.forwardRef((props, ref) => <PrefixIcon ref={ref} {...props} />);
|
|
147
|
+
ChipPrefixIcon.displayName = "ChipPrefixIcon";
|
|
148
|
+
var ChipPrefixAvatar = React.forwardRef((props, ref) => {
|
|
149
|
+
const classes = useClassNames();
|
|
150
|
+
const { children, className, ...nativeProps } = props;
|
|
151
|
+
return <view {...ref ? { ref } : {}} className={clsx(classes.prefixAvatar, className)} {...nativeProps}>
|
|
152
|
+
{children}
|
|
153
|
+
</view>;
|
|
154
|
+
});
|
|
155
|
+
ChipPrefixAvatar.displayName = "ChipPrefixAvatar";
|
|
156
|
+
var ChipSuffixIcon = React.forwardRef((props, ref) => <SuffixIcon ref={ref} {...props} />);
|
|
157
|
+
ChipSuffixIcon.displayName = "ChipSuffixIcon";
|
|
158
|
+
//#endregion
|
|
159
|
+
export { ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ChipButton as Button, ChipLabel as Label, ChipPrefixAvatar as PrefixAvatar, ChipPrefixIcon as PrefixIcon, ChipRadioItem as RadioItem, ChipRadioRoot as RadioRoot, ChipRoot as Root, ChipSuffixIcon as SuffixIcon, ChipToggle as Toggle, type ChipButtonProps as ButtonProps, type ChipLabelProps as LabelProps, type ChipPrefixAvatarProps as PrefixAvatarProps, type ChipPrefixIconProps as PrefixIconProps, type ChipRadioItemProps as RadioItemProps, type ChipRadioRootProps as RadioRootProps, type ChipRootProps as RootProps, type ChipSuffixIconProps as SuffixIconProps, type ChipToggleProps as ToggleProps, } from './Chip';
|
|
2
|
+
//# sourceMappingURL=Chip.namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,MAAM,EACpB,SAAS,IAAI,KAAK,EAClB,gBAAgB,IAAI,YAAY,EAChC,cAAc,IAAI,UAAU,EAC5B,aAAa,IAAI,SAAS,EAC1B,aAAa,IAAI,SAAS,EAC1B,QAAQ,IAAI,IAAI,EAChB,cAAc,IAAI,UAAU,EAC5B,UAAU,IAAI,MAAM,EACpB,KAAK,eAAe,IAAI,WAAW,EACnC,KAAK,cAAc,IAAI,UAAU,EACjC,KAAK,qBAAqB,IAAI,iBAAiB,EAC/C,KAAK,mBAAmB,IAAI,eAAe,EAC3C,KAAK,kBAAkB,IAAI,cAAc,EACzC,KAAK,kBAAkB,IAAI,cAAc,EACzC,KAAK,aAAa,IAAI,SAAS,EAC/B,KAAK,mBAAmB,IAAI,eAAe,EAC3C,KAAK,eAAe,IAAI,WAAW,GACpC,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle } from "./Chip.jsx";
|
|
3
|
+
//#region src/components/Chip/Chip.namespace.ts
|
|
4
|
+
var Chip_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Button: () => ChipButton,
|
|
6
|
+
Label: () => ChipLabel,
|
|
7
|
+
PrefixAvatar: () => ChipPrefixAvatar,
|
|
8
|
+
PrefixIcon: () => ChipPrefixIcon,
|
|
9
|
+
RadioItem: () => ChipRadioItem,
|
|
10
|
+
RadioRoot: () => ChipRadioRoot,
|
|
11
|
+
Root: () => ChipRoot,
|
|
12
|
+
SuffixIcon: () => ChipSuffixIcon,
|
|
13
|
+
Toggle: () => ChipToggle
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Chip_namespace_exports };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle, type ChipButtonProps, type ChipLabelProps, type ChipPrefixAvatarProps, type ChipPrefixIconProps, type ChipRadioItemProps, type ChipRadioRootProps, type ChipRootProps, type ChipSuffixIconProps, type ChipToggleProps, } from './Chip';
|
|
2
|
+
export * as Chip from './Chip.namespace';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,QAAQ,EACR,cAAc,EACd,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,MAAM,QAAQ,CAAC;AAEhB,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LynxAccessibilityProps, LynxStyledElementProps } from '../../types';
|
|
2
|
+
import { StyleProps } from '../../utils/styled';
|
|
3
|
+
import * as React from "@lynx-js/react";
|
|
4
|
+
export interface DividerProps extends Omit<LynxStyledElementProps, "children">, LynxAccessibilityProps {
|
|
5
|
+
/**
|
|
6
|
+
* @default "stroke.neutralMuted"
|
|
7
|
+
*/
|
|
8
|
+
color?: StyleProps["borderColor"];
|
|
9
|
+
/**
|
|
10
|
+
* @default 1
|
|
11
|
+
*/
|
|
12
|
+
thickness?: StyleProps["borderWidth"];
|
|
13
|
+
/**
|
|
14
|
+
* @default "horizontal"
|
|
15
|
+
*/
|
|
16
|
+
orientation?: "horizontal" | "vertical";
|
|
17
|
+
/**
|
|
18
|
+
* Adds 16px of spacing to both ends of the divider.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @platform Lynx
|
|
25
|
+
*
|
|
26
|
+
* 웹의 `<hr>` 대신 native `<view>`를 렌더링합니다. 구분선은 기본적으로 접근성
|
|
27
|
+
* 요소로 노출되며 `accessibility-role-description="separator"`를 사용합니다.
|
|
28
|
+
* 장식용 구분선은 `accessibility-element={false}`로 접근성 트리에서 제외하세요.
|
|
29
|
+
*/
|
|
30
|
+
export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<unknown>>;
|
|
31
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/components/Divider/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAC9C,sBAAsB;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAElC;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAEtC;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAExC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,8EAmClB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Box } from "../Box/Box.jsx";
|
|
2
|
+
import * as React from "@lynx-js/react";
|
|
3
|
+
//#region src/components/Divider/Divider.tsx
|
|
4
|
+
/**
|
|
5
|
+
* @platform Lynx
|
|
6
|
+
*
|
|
7
|
+
* 웹의 `<hr>` 대신 native `<view>`를 렌더링합니다. 구분선은 기본적으로 접근성
|
|
8
|
+
* 요소로 노출되며 `accessibility-role-description="separator"`를 사용합니다.
|
|
9
|
+
* 장식용 구분선은 `accessibility-element={false}`로 접근성 트리에서 제외하세요.
|
|
10
|
+
*/
|
|
11
|
+
var Divider = React.forwardRef((props, ref) => {
|
|
12
|
+
const { color = "stroke.neutralMuted", thickness = 1, orientation = "horizontal", inset = false, style, "accessibility-element": accessibilityElement = true, "accessibility-role-description": accessibilityRoleDescription = "separator", ...nativeProps } = props;
|
|
13
|
+
const isHorizontal = orientation === "horizontal";
|
|
14
|
+
return <Box {...nativeProps} ref={ref} borderColor={color} borderWidth={0} borderBottomWidth={isHorizontal ? thickness : 0} borderRightWidth={isHorizontal ? 0 : thickness} accessibility-element={accessibilityElement} accessibility-role-description={accessibilityRoleDescription} style={{
|
|
15
|
+
width: isHorizontal ? inset ? "calc(100% - 32px)" : "100%" : void 0,
|
|
16
|
+
height: isHorizontal ? void 0 : inset ? "calc(100% - 32px)" : "100%",
|
|
17
|
+
marginLeft: inset && isHorizontal ? "16px" : void 0,
|
|
18
|
+
marginRight: inset && isHorizontal ? "16px" : void 0,
|
|
19
|
+
marginTop: inset && !isHorizontal ? "16px" : void 0,
|
|
20
|
+
marginBottom: inset && !isHorizontal ? "16px" : void 0,
|
|
21
|
+
...style
|
|
22
|
+
}} />;
|
|
23
|
+
});
|
|
24
|
+
Divider.displayName = "Divider";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Divider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Divider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
2
2
|
import { FieldContext, useFieldContext } from "./context.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
3
|
import * as React from "@lynx-js/react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { field } from "@seed-design/lynx-css/recipes/field";
|
|
6
6
|
import { fieldLabel } from "@seed-design/lynx-css/recipes/field-label";
|
|
7
7
|
//#region src/components/Field/Field.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { handleColor, handleDimension } from "../../utils/styled.js";
|
|
2
1
|
import { useIconColor } from "../../hooks/useIconColor.js";
|
|
3
|
-
import
|
|
2
|
+
import { handleColor, handleDimension } from "../../utils/styled.js";
|
|
4
3
|
import * as React from "@lynx-js/react";
|
|
5
4
|
import { cloneElement, isValidElement, useMainThreadRef } from "@lynx-js/react";
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
//#region src/components/Icon/Icon.tsx
|
|
7
7
|
var IconSlotContext = React.createContext(null);
|
|
8
8
|
var IconRequiredContext = React.createContext(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { progressCircle } from "@seed-design/lynx-css/recipes/progress-circle";
|
|
2
|
-
import clsx from "clsx";
|
|
3
1
|
import { createContext, forwardRef, runOnMainThread, useContext, useEffect, useMainThreadRef, useMemo } from "@lynx-js/react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { progressCircle } from "@seed-design/lynx-css/recipes/progress-circle";
|
|
4
4
|
//#region src/components/ProgressCircle/ProgressCircle.tsx
|
|
5
5
|
var ProgressCircleContext = createContext(null);
|
|
6
6
|
function useProgressCircleContext() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
1
2
|
import { usePressTap } from "../../hooks/usePressTap.js";
|
|
2
3
|
import { InternalIcon } from "../Icon/Icon.jsx";
|
|
3
|
-
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
4
4
|
import { splitMultipleVariantsProps } from "../../utils/split-multiple-variants-props.js";
|
|
5
|
-
import clsx from "clsx";
|
|
6
5
|
import * as React from "@lynx-js/react";
|
|
7
6
|
import { isValidElement } from "@lynx-js/react";
|
|
7
|
+
import clsx from "clsx";
|
|
8
8
|
import { radio } from "@seed-design/lynx-css/recipes/radio";
|
|
9
9
|
import { radiomark } from "@seed-design/lynx-css/recipes/radiomark";
|
|
10
10
|
import { radioGroup } from "@seed-design/lynx-css/recipes/radio-group";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useStyleProps } from "../../utils/styled.js";
|
|
2
|
-
import clsx from "clsx";
|
|
3
2
|
import * as React from "@lynx-js/react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
//#region src/components/Stack/Stack.tsx
|
|
5
5
|
function getStackProps(props) {
|
|
6
6
|
const { align, justify, wrap, grow, shrink, ...restProps } = props;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { usePressTap } from "../../hooks/usePressTap.js";
|
|
2
1
|
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
2
|
+
import { usePressTap } from "../../hooks/usePressTap.js";
|
|
3
3
|
import { splitMultipleVariantsProps } from "../../utils/split-multiple-variants-props.js";
|
|
4
|
-
import clsx from "clsx";
|
|
5
4
|
import * as React from "@lynx-js/react";
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import { switchStyle } from "@seed-design/lynx-css/recipes/switch";
|
|
7
7
|
import { switchmark } from "@seed-design/lynx-css/recipes/switchmark";
|
|
8
8
|
//#region src/components/Switch/Switch.tsx
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TabsVariantProps } from '@seed-design/lynx-css/recipes/tabs';
|
|
2
|
+
import { IntrinsicElements } from '@lynx-js/types';
|
|
3
|
+
import { LynxAccessibilityProps, LynxStyledElementProps } from '../../types';
|
|
4
|
+
import * as React from "@lynx-js/react";
|
|
5
|
+
type NativeViewPagerProps = IntrinsicElements["viewpager"];
|
|
6
|
+
type TabsPublicVariantProps = Omit<TabsVariantProps, "selected" | "disabled" | "inCarousel">;
|
|
7
|
+
/**
|
|
8
|
+
* @platform Lynx
|
|
9
|
+
*
|
|
10
|
+
* 웹 대비 미지원 기능:
|
|
11
|
+
* - `orientation`: Lynx Tabs는 수평 방향만 지원
|
|
12
|
+
* - `lazyMount`, `unmountOnExit`: native viewpager가 모든 page slot을 유지해야 함
|
|
13
|
+
* - 키보드 포커스와 roving tabindex
|
|
14
|
+
*/
|
|
15
|
+
export interface TabsRootProps extends TabsPublicVariantProps, LynxStyledElementProps {
|
|
16
|
+
value?: string;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
onValueChange?: (value: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const TabsRoot: React.ForwardRefExoticComponent<TabsRootProps & React.RefAttributes<unknown>>;
|
|
21
|
+
export interface TabsListProps extends LynxStyledElementProps {
|
|
22
|
+
}
|
|
23
|
+
export declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<unknown>>;
|
|
24
|
+
export interface TabsTriggerProps extends LynxStyledElementProps {
|
|
25
|
+
value: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
"accessibility-label"?: LynxAccessibilityProps["accessibility-label"];
|
|
28
|
+
}
|
|
29
|
+
export declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<unknown>>;
|
|
30
|
+
export interface TabsIndicatorProps extends LynxStyledElementProps {
|
|
31
|
+
}
|
|
32
|
+
export declare const TabsIndicator: React.ForwardRefExoticComponent<TabsIndicatorProps & React.RefAttributes<unknown>>;
|
|
33
|
+
export interface TabsContentProps extends LynxStyledElementProps {
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<unknown>>;
|
|
37
|
+
/**
|
|
38
|
+
* @platform Lynx
|
|
39
|
+
*
|
|
40
|
+
* native viewpager를 사용하므로 웹의 `loop`, `autoHeight`, `dragThreshold`,
|
|
41
|
+
* `carouselPreventDrag`는 지원하지 않습니다.
|
|
42
|
+
*/
|
|
43
|
+
export interface TabsCarouselProps extends LynxStyledElementProps {
|
|
44
|
+
swipeable?: boolean;
|
|
45
|
+
/** iOS 뒤로가기 제스처를 우선하는 화면 왼쪽 가장자리 너비입니다. */
|
|
46
|
+
iosBackGestureEdgeWidth?: number;
|
|
47
|
+
onSettle?: () => void;
|
|
48
|
+
onSwipeStart?: () => void;
|
|
49
|
+
onSwipeEnd?: () => void;
|
|
50
|
+
}
|
|
51
|
+
export declare const TabsCarousel: React.ForwardRefExoticComponent<TabsCarouselProps & React.RefAttributes<unknown>>;
|
|
52
|
+
export interface TabsCarouselCameraProps extends LynxStyledElementProps {
|
|
53
|
+
bindchange?: NativeViewPagerProps["bindchange"];
|
|
54
|
+
bindwillchange?: NativeViewPagerProps["bindwillchange"];
|
|
55
|
+
bindoffsetchange?: NativeViewPagerProps["bindoffsetchange"];
|
|
56
|
+
}
|
|
57
|
+
export declare const TabsCarouselCamera: React.ForwardRefExoticComponent<TabsCarouselCameraProps & React.RefAttributes<unknown>>;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EACV,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAIrB,KAAK,oBAAoB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAI3D,KAAK,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC,CAAC;AAyF7F;;;;;;;GAOG;AACH,MAAM,WAAW,aAAc,SAAQ,sBAAsB,EAAE,sBAAsB;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,QAAQ,+EAmMnB,CAAC;AAKH,MAAM,WAAW,aAAc,SAAQ,sBAAsB;CAAG;AAEhE,eAAO,MAAM,QAAQ,+EAsCnB,CAAC;AAKH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,WAAW,kFAiEtB,CAAC;AAKH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;CAAG;AAErE,eAAO,MAAM,aAAa,oFAkCxB,CAAC;AAKH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,kFAgCtB,CAAC;AAKH;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,mFA8BvB,CAAC;AAKH,MAAM,WAAW,uBAAwB,SAAQ,sBAAsB;IACrE,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACxD,gBAAgB,CAAC,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;CAC7D;AAED,eAAO,MAAM,kBAAkB,yFAmH9B,CAAC"}
|