@seed-design/lynx-react 0.7.0 → 0.8.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.jsx +2 -2
- package/lib/components/ActionButton/ActionButton.jsx +1 -1
- package/lib/components/AlertDialog/AlertDialog.d.ts +64 -0
- package/lib/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/lib/components/AlertDialog/AlertDialog.jsx +138 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.d.ts +2 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.d.ts.map +1 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.js +17 -0
- package/lib/components/AlertDialog/index.d.ts +3 -0
- package/lib/components/AlertDialog/index.d.ts.map +1 -0
- package/lib/components/AppBar/AppBar.d.ts +14 -1
- package/lib/components/AppBar/AppBar.d.ts.map +1 -1
- package/lib/components/AppBar/AppBar.jsx +46 -10
- package/lib/components/AppBar/AppBar.namespace.d.ts +1 -1
- package/lib/components/AppBar/AppBar.namespace.d.ts.map +1 -1
- package/lib/components/AppBar/index.d.ts +1 -1
- package/lib/components/AppBar/index.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +182 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.jsx +444 -0
- package/lib/components/AttachmentDisplay/index.d.ts +2 -0
- package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts +179 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.jsx +520 -0
- package/lib/components/AttachmentInput/index.d.ts +2 -0
- package/lib/components/AttachmentInput/index.d.ts.map +1 -0
- package/lib/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.jsx +1 -7
- package/lib/components/Callout/Callout.jsx +2 -2
- package/lib/components/Checkbox/Checkbox.jsx +2 -2
- package/lib/components/Chip/Chip.jsx +2 -2
- package/lib/components/ChipTabs/ChipTabs.d.ts +41 -0
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -0
- package/lib/components/ChipTabs/ChipTabs.jsx +39 -0
- package/lib/components/ChipTabs/ChipTabs.namespace.d.ts +2 -0
- package/lib/components/ChipTabs/ChipTabs.namespace.d.ts.map +1 -0
- package/lib/components/ChipTabs/ChipTabs.namespace.js +13 -0
- package/lib/components/ChipTabs/index.d.ts +3 -0
- package/lib/components/ChipTabs/index.d.ts.map +1 -0
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts +18 -0
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts.map +1 -0
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.jsx +113 -0
- package/lib/components/ContextualFloatingButton/index.d.ts +2 -0
- package/lib/components/ContextualFloatingButton/index.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.d.ts +87 -0
- package/lib/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.jsx +147 -0
- package/lib/components/Dialog/Dialog.namespace.d.ts +2 -0
- package/lib/components/Dialog/Dialog.namespace.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.namespace.js +18 -0
- package/lib/components/Dialog/index.d.ts +3 -0
- package/lib/components/Dialog/index.d.ts.map +1 -0
- package/lib/components/FloatingActionButton/FloatingActionButton.d.ts +23 -0
- package/lib/components/FloatingActionButton/FloatingActionButton.d.ts.map +1 -0
- package/lib/components/FloatingActionButton/FloatingActionButton.jsx +76 -0
- package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts +2 -0
- package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts.map +1 -0
- package/lib/components/FloatingActionButton/FloatingActionButton.namespace.js +10 -0
- package/lib/components/FloatingActionButton/index.d.ts +3 -0
- package/lib/components/FloatingActionButton/index.d.ts.map +1 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts +67 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -0
- package/lib/components/HelpBubble/HelpBubble.jsx +600 -0
- package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +2 -0
- package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -0
- package/lib/components/HelpBubble/HelpBubble.namespace.js +18 -0
- package/lib/components/HelpBubble/index.d.ts +3 -0
- package/lib/components/HelpBubble/index.d.ts.map +1 -0
- package/lib/components/Icon/Icon.d.ts +1 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.jsx +3 -2
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts +28 -0
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts.map +1 -0
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.jsx +37 -0
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts +2 -0
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts.map +1 -0
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.js +9 -0
- package/lib/components/IdentityPlaceholder/identity-placeholder-business.js +4 -0
- package/lib/components/IdentityPlaceholder/identity-placeholder-person.js +4 -0
- package/lib/components/IdentityPlaceholder/index.d.ts +3 -0
- package/lib/components/IdentityPlaceholder/index.d.ts.map +1 -0
- package/lib/components/InputButton/InputButton.d.ts +2 -0
- package/lib/components/InputButton/InputButton.d.ts.map +1 -1
- package/lib/components/InputButton/InputButton.jsx +40 -8
- package/lib/components/List/List.d.ts +1 -1
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.jsx +26 -12
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.jsx +15 -5
- package/lib/components/PageBanner/PageBanner.d.ts +3 -0
- package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
- package/lib/components/PageBanner/PageBanner.jsx +49 -11
- package/lib/components/QuantityPicker/QuantityPicker.d.ts +53 -0
- package/lib/components/QuantityPicker/QuantityPicker.d.ts.map +1 -0
- package/lib/components/QuantityPicker/QuantityPicker.jsx +282 -0
- package/lib/components/QuantityPicker/QuantityPicker.namespace.d.ts +2 -0
- package/lib/components/QuantityPicker/QuantityPicker.namespace.d.ts.map +1 -0
- package/lib/components/QuantityPicker/QuantityPicker.namespace.js +11 -0
- package/lib/components/QuantityPicker/index.d.ts +3 -0
- package/lib/components/QuantityPicker/index.d.ts.map +1 -0
- package/lib/components/RadioGroup/RadioGroup.jsx +2 -2
- package/lib/components/ReactionButton/ReactionButton.d.ts +1 -1
- package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -1
- package/lib/components/ReactionButton/ReactionButton.jsx +22 -13
- package/lib/components/ScrollFog/ScrollFog.d.ts +41 -0
- package/lib/components/ScrollFog/ScrollFog.d.ts.map +1 -0
- package/lib/components/ScrollFog/ScrollFog.jsx +65 -0
- package/lib/components/ScrollFog/index.d.ts +2 -0
- package/lib/components/ScrollFog/index.d.ts.map +1 -0
- package/lib/components/SegmentedControl/SegmentedControl.jsx +2 -2
- package/lib/components/Select/Select.d.ts +112 -0
- package/lib/components/Select/Select.d.ts.map +1 -0
- package/lib/components/Select/Select.jsx +885 -0
- package/lib/components/Select/Select.namespace.d.ts +2 -0
- package/lib/components/Select/Select.namespace.d.ts.map +1 -0
- package/lib/components/Select/Select.namespace.js +23 -0
- package/lib/components/Select/index.d.ts +3 -0
- package/lib/components/Select/index.d.ts.map +1 -0
- package/lib/components/Skeleton/Skeleton.d.ts +15 -0
- package/lib/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/lib/components/Skeleton/Skeleton.jsx +18 -0
- package/lib/components/Skeleton/index.d.ts +2 -0
- package/lib/components/Skeleton/index.d.ts.map +1 -0
- package/lib/components/Slider/Slider.d.ts +101 -0
- package/lib/components/Slider/Slider.d.ts.map +1 -0
- package/lib/components/Slider/Slider.jsx +573 -0
- package/lib/components/Slider/Slider.namespace.d.ts +2 -0
- package/lib/components/Slider/Slider.namespace.d.ts.map +1 -0
- package/lib/components/Slider/Slider.namespace.js +19 -0
- package/lib/components/Slider/Slider.utils.d.ts +19 -0
- package/lib/components/Slider/Slider.utils.d.ts.map +1 -0
- package/lib/components/Slider/Slider.utils.js +106 -0
- package/lib/components/Slider/index.d.ts +3 -0
- package/lib/components/Slider/index.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.jsx +22 -8
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.jsx +5 -3
- package/lib/components/Tabs/Tabs.d.ts +34 -2
- package/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.jsx +186 -56
- package/lib/components/Tabs/Tabs.utils.d.ts +14 -1
- package/lib/components/Tabs/Tabs.utils.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.utils.js +24 -3
- package/lib/components/Tabs/index.d.ts +1 -1
- package/lib/components/Tabs/index.d.ts.map +1 -1
- package/lib/components/index.d.ts +14 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/useControllableState.d.ts +1 -14
- package/lib/hooks/useControllableState.d.ts.map +1 -1
- package/lib/hooks/usePressTap.d.ts +1 -27
- package/lib/hooks/usePressTap.d.ts.map +1 -1
- package/lib/hooks/useScaleFeedback.d.ts +1 -1
- package/lib/hooks/useScaleFeedback.js +1 -1
- package/lib/index.js +29 -6
- package/lib/{hooks/useControllableState.js → packages/lynx-react-headless/use-controllable-state/lib/index.js} +2 -3
- package/lib/{hooks/usePressTap.js → packages/lynx-react-headless/use-press-tap/lib/index.js} +13 -10
- package/lib/types.d.ts +1 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +9 -5
- package/src/components/ActionButton/ActionButton.test.tsx +7 -7
- package/src/components/AlertDialog/AlertDialog.namespace.ts +22 -0
- package/src/components/AlertDialog/AlertDialog.test.tsx +226 -0
- package/src/components/AlertDialog/AlertDialog.tsx +374 -0
- package/src/components/AlertDialog/index.ts +24 -0
- package/src/components/AppBar/AppBar.namespace.ts +1 -0
- package/src/components/AppBar/AppBar.test.tsx +257 -0
- package/src/components/AppBar/AppBar.tsx +109 -14
- package/src/components/AppBar/index.ts +1 -0
- package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +886 -0
- package/src/components/AttachmentDisplay/index.ts +48 -0
- package/src/components/AttachmentInput/AttachmentInput.tsx +1001 -0
- package/src/components/AttachmentInput/index.ts +49 -0
- package/src/components/BottomSheet/BottomSheet.test.tsx +22 -7
- package/src/components/BottomSheet/BottomSheet.tsx +1 -19
- package/src/components/ChipTabs/ChipTabs.namespace.ts +14 -0
- package/src/components/ChipTabs/ChipTabs.tsx +119 -0
- package/src/components/ChipTabs/index.ts +16 -0
- package/src/components/ContextualFloatingButton/ContextualFloatingButton.test.tsx +63 -0
- package/src/components/ContextualFloatingButton/ContextualFloatingButton.tsx +232 -0
- package/src/components/ContextualFloatingButton/index.ts +4 -0
- package/src/components/Dialog/Dialog.namespace.ts +24 -0
- package/src/components/Dialog/Dialog.test.tsx +172 -0
- package/src/components/Dialog/Dialog.tsx +373 -0
- package/src/components/Dialog/index.ts +26 -0
- package/src/components/FloatingActionButton/FloatingActionButton.namespace.ts +8 -0
- package/src/components/FloatingActionButton/FloatingActionButton.test.tsx +59 -0
- package/src/components/FloatingActionButton/FloatingActionButton.tsx +207 -0
- package/src/components/FloatingActionButton/index.ts +10 -0
- package/src/components/HelpBubble/HelpBubble.namespace.ts +24 -0
- package/src/components/HelpBubble/HelpBubble.tsx +998 -0
- package/src/components/HelpBubble/index.ts +26 -0
- package/src/components/Icon/Icon.test.tsx +57 -5
- package/src/components/Icon/Icon.tsx +16 -2
- package/src/components/IdentityPlaceholder/IdentityPlaceholder.namespace.ts +6 -0
- package/src/components/IdentityPlaceholder/IdentityPlaceholder.tsx +103 -0
- package/src/components/IdentityPlaceholder/assets.d.ts +4 -0
- package/src/components/IdentityPlaceholder/identity-placeholder-business.webp +0 -0
- package/src/components/IdentityPlaceholder/identity-placeholder-person.webp +0 -0
- package/src/components/IdentityPlaceholder/index.ts +8 -0
- package/src/components/InputButton/InputButton.test.tsx +128 -1
- package/src/components/InputButton/InputButton.tsx +60 -9
- package/src/components/List/List.test.tsx +54 -2
- package/src/components/List/List.tsx +43 -10
- package/src/components/Menu/Menu.tsx +14 -4
- package/src/components/Menu/__tests__/Menu.test.tsx +34 -0
- package/src/components/PageBanner/PageBanner.test.tsx +110 -3
- package/src/components/PageBanner/PageBanner.tsx +83 -19
- package/src/components/QuantityPicker/QuantityPicker.namespace.ts +10 -0
- package/src/components/QuantityPicker/QuantityPicker.test.tsx +235 -0
- package/src/components/QuantityPicker/QuantityPicker.tsx +605 -0
- package/src/components/QuantityPicker/index.ts +14 -0
- package/src/components/ReactionButton/ReactionButton.feedback.test.tsx +50 -0
- package/src/components/ReactionButton/ReactionButton.test.tsx +6 -4
- package/src/components/ReactionButton/ReactionButton.tsx +20 -12
- package/src/components/ScrollFog/ScrollFog.test.tsx +222 -0
- package/src/components/ScrollFog/ScrollFog.tsx +172 -0
- package/src/components/ScrollFog/index.ts +1 -0
- package/src/components/Select/Select.namespace.ts +34 -0
- package/src/components/Select/Select.test.tsx +297 -0
- package/src/components/Select/Select.tsx +1483 -0
- package/src/components/Select/index.ts +39 -0
- package/src/components/Skeleton/Skeleton.test.tsx +64 -0
- package/src/components/Skeleton/Skeleton.tsx +45 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Slider/Slider.namespace.ts +26 -0
- package/src/components/Slider/Slider.test.tsx +260 -0
- package/src/components/Slider/Slider.tsx +897 -0
- package/src/components/Slider/Slider.utils.ts +167 -0
- package/src/components/Slider/index.ts +30 -0
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.test.tsx +21 -1
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +30 -7
- package/src/components/Switch/Switch.tsx +14 -13
- package/src/components/Tabs/Tabs.test.tsx +218 -1
- package/src/components/Tabs/Tabs.tsx +346 -75
- package/src/components/Tabs/Tabs.utils.ts +51 -1
- package/src/components/Tabs/index.ts +17 -1
- package/src/components/index.ts +14 -0
- package/src/hooks/useControllableState.ts +1 -43
- package/src/hooks/usePressTap.test.ts +23 -11
- package/src/hooks/usePressTap.ts +1 -60
- package/src/hooks/useScaleFeedback.ts +1 -1
- package/src/types.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useControllableState } from "../../
|
|
2
|
-
import { usePressTap } from "../../
|
|
1
|
+
import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
|
|
2
|
+
import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
|
|
3
3
|
import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
|
|
4
4
|
import { toArray } from "../../utils/children.js";
|
|
5
5
|
import { mergeProps } from "../../utils/merge-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { usePressTap } from "../../
|
|
1
|
+
import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
|
|
2
2
|
import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
|
|
3
3
|
import { toArray } from "../../utils/children.js";
|
|
4
4
|
import { mergeProps } from "../../utils/merge-props.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DialogBackdropProps as DialogPrimitiveBackdropProps, DialogCloseProps as DialogPrimitiveCloseProps, DialogContentProps as DialogPrimitiveContentProps, DialogRootProps as DialogPrimitiveRootProps, DialogTriggerProps as DialogPrimitiveTriggerProps, DialogViewProps as DialogPrimitiveViewProps } from '@lynx-js/lynx-ui-dialog';
|
|
2
|
+
import { ForwardRefExoticComponent, PropsWithoutRef, ReactElement, RefAttributes } from '@lynx-js/react';
|
|
3
|
+
import { AlertDialogVariantProps } from '@seed-design/lynx-css/recipes/alert-dialog';
|
|
4
|
+
import { LynxAccessibilityProps, LynxStyledElementProps } from '../../types';
|
|
5
|
+
import { StyleProps } from '../../utils/styled';
|
|
6
|
+
type AlertDialogComponent<Props> = ((props: Props) => ReactElement) & {
|
|
7
|
+
displayName?: string;
|
|
8
|
+
};
|
|
9
|
+
type LynxForwardRefComponent<T, Props> = ForwardRefExoticComponent<PropsWithoutRef<Props> & RefAttributes<T>>;
|
|
10
|
+
export interface AlertDialogRootProps extends AlertDialogVariantProps, Omit<DialogPrimitiveRootProps, "show" | "defaultShow" | "onShowChange"> {
|
|
11
|
+
/** Whether the alert dialog is open (controlled mode). */
|
|
12
|
+
open?: boolean;
|
|
13
|
+
/** Whether the alert dialog is open by default (uncontrolled mode). */
|
|
14
|
+
defaultOpen?: boolean;
|
|
15
|
+
/** Called when the alert dialog's open state changes. */
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @platform Lynx — wraps `@lynx-js/lynx-ui-dialog` as an alert dialog.
|
|
20
|
+
* Refs, `asChild`, focus management, Escape-key dismissal, and close reasons are
|
|
21
|
+
* not supported by the Lynx primitive.
|
|
22
|
+
*/
|
|
23
|
+
export declare const AlertDialogRoot: AlertDialogComponent<AlertDialogRootProps>;
|
|
24
|
+
export interface AlertDialogTriggerProps extends DialogPrimitiveTriggerProps {
|
|
25
|
+
}
|
|
26
|
+
/** @platform Lynx — `asChild` and refs are unsupported. */
|
|
27
|
+
export declare const AlertDialogTrigger: AlertDialogComponent<AlertDialogTriggerProps>;
|
|
28
|
+
export interface AlertDialogPositionerProps extends DialogPrimitiveViewProps {
|
|
29
|
+
}
|
|
30
|
+
/** @platform Lynx — maps to `DialogView`; refs are unsupported. */
|
|
31
|
+
export declare const AlertDialogPositioner: AlertDialogComponent<AlertDialogPositionerProps>;
|
|
32
|
+
export interface AlertDialogBackdropProps extends DialogPrimitiveBackdropProps {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @platform Lynx — refs are unsupported. Native lifecycle handlers in
|
|
36
|
+
* `dialogBackdropProps` are reserved by the headless primitive and are omitted.
|
|
37
|
+
* Alert dialogs do not dismiss when the backdrop is tapped by default.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AlertDialogBackdrop: AlertDialogComponent<AlertDialogBackdropProps>;
|
|
40
|
+
export interface AlertDialogContentProps extends DialogPrimitiveContentProps, LynxAccessibilityProps {
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @platform Lynx — refs are unsupported. Native lifecycle handlers in
|
|
44
|
+
* `dialogContentProps` are reserved by the headless primitive and are omitted.
|
|
45
|
+
*/
|
|
46
|
+
export declare const AlertDialogContent: AlertDialogComponent<AlertDialogContentProps>;
|
|
47
|
+
export interface AlertDialogHeaderProps extends StyleProps, LynxStyledElementProps {
|
|
48
|
+
}
|
|
49
|
+
export declare const AlertDialogHeader: LynxForwardRefComponent<unknown, AlertDialogHeaderProps>;
|
|
50
|
+
export interface AlertDialogTitleProps extends StyleProps, LynxStyledElementProps, LynxAccessibilityProps {
|
|
51
|
+
}
|
|
52
|
+
export declare const AlertDialogTitle: LynxForwardRefComponent<unknown, AlertDialogTitleProps>;
|
|
53
|
+
export interface AlertDialogDescriptionProps extends StyleProps, LynxStyledElementProps, LynxAccessibilityProps {
|
|
54
|
+
}
|
|
55
|
+
export declare const AlertDialogDescription: LynxForwardRefComponent<unknown, AlertDialogDescriptionProps>;
|
|
56
|
+
export interface AlertDialogFooterProps extends StyleProps, LynxStyledElementProps {
|
|
57
|
+
}
|
|
58
|
+
export declare const AlertDialogFooter: LynxForwardRefComponent<unknown, AlertDialogFooterProps>;
|
|
59
|
+
export interface AlertDialogActionProps extends DialogPrimitiveCloseProps {
|
|
60
|
+
}
|
|
61
|
+
/** @platform Lynx — maps to `DialogClose`; `asChild` and refs are unsupported. */
|
|
62
|
+
export declare const AlertDialogAction: AlertDialogComponent<AlertDialogActionProps>;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=AlertDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,mBAAmB,IAAI,4BAA4B,EACxD,KAAK,gBAAgB,IAAI,yBAAyB,EAClD,KAAK,kBAAkB,IAAI,2BAA2B,EACtD,KAAK,eAAe,IAAI,wBAAwB,EAChD,KAAK,kBAAkB,IAAI,2BAA2B,EACtD,KAAK,eAAe,IAAI,wBAAwB,EACjD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AAGpD,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,KAAK,oBAAoB,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,YAAY,CAAC,GAAG;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,KAAK,uBAAuB,CAAC,CAAC,EAAE,KAAK,IAAI,yBAAyB,CAChE,eAAe,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAC1C,CAAC;AA0CF,MAAM,WAAW,oBACf,SAAQ,uBAAuB,EAC7B,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;IACzE,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yDAAyD;IACzD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAmBtB,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAOjD,MAAM,WAAW,uBAAwB,SAAQ,2BAA2B;CAAG;AAE/E,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,EASzB,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;AAOpD,MAAM,WAAW,0BAA2B,SAAQ,wBAAwB;CAAG;AAE/E,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,EAmB7B,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;AAOtD,MAAM,WAAW,wBAAyB,SAAQ,4BAA4B;CAAG;AAEjF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAuB1B,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;AAOrD,MAAM,WAAW,uBACf,SAAQ,2BAA2B,EACjC,sBAAsB;CAAG;AAE7B;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EA4BzB,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;AAOpD,MAAM,WAAW,sBAAuB,SAAQ,UAAU,EAAE,sBAAsB;CAAG;AAErF,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,OAAO,EAAE,sBAAsB,CAgBnF,CAAC;AAGL,MAAM,WAAW,qBACf,SAAQ,UAAU,EAChB,sBAAsB,EACtB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,gBAAgB,EAAE,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,CAwBnF,CAAC;AAGH,MAAM,WAAW,2BACf,SAAQ,UAAU,EAChB,sBAAsB,EACtB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,sBAAsB,EAAE,uBAAuB,CAAC,OAAO,EAAE,2BAA2B,CAgB7F,CAAC;AAGL,MAAM,WAAW,sBAAuB,SAAQ,UAAU,EAAE,sBAAsB;CAAG;AAErF,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,OAAO,EAAE,sBAAsB,CAgBnF,CAAC;AAOL,MAAM,WAAW,sBAAuB,SAAQ,yBAAyB;CAAG;AAE5E,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,EAcxB,oBAAoB,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
2
|
+
import { useStyleProps } from "../../utils/styled.js";
|
|
3
|
+
import { forwardRef } from "@lynx-js/react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { DialogBackdrop, DialogClose, DialogContent, DialogRoot, DialogTrigger, DialogView } from "@lynx-js/lynx-ui-dialog";
|
|
6
|
+
import { alertDialog } from "@seed-design/lynx-css/recipes/alert-dialog";
|
|
7
|
+
//#region src/components/AlertDialog/AlertDialog.tsx
|
|
8
|
+
var { ClassNamesProvider, PropsProvider, useClassNames, useProps } = createSlotRecipeContext(alertDialog);
|
|
9
|
+
function omitHeadlessLifecycleHandlers(props) {
|
|
10
|
+
if (!props) return props;
|
|
11
|
+
const { bindanimationstart: _bindanimationstart, bindanimationend: _bindanimationend, bindanimationcancel: _bindanimationcancel, bindtransitionstart: _bindtransitionstart, bindtransitionend: _bindtransitionend, bindtap: _bindtap, ...nativeProps } = props;
|
|
12
|
+
return nativeProps;
|
|
13
|
+
}
|
|
14
|
+
function useAlertDialogTransition(transition) {
|
|
15
|
+
return useProps()?.skipAnimation === true ? false : transition ?? true;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @platform Lynx — wraps `@lynx-js/lynx-ui-dialog` as an alert dialog.
|
|
19
|
+
* Refs, `asChild`, focus management, Escape-key dismissal, and close reasons are
|
|
20
|
+
* not supported by the Lynx primitive.
|
|
21
|
+
*/
|
|
22
|
+
var AlertDialogRoot = forwardRef((props, _ref) => {
|
|
23
|
+
const [variantProps, restProps] = alertDialog.splitVariantProps(props);
|
|
24
|
+
const { children, open, defaultOpen, onOpenChange, ...nativeProps } = restProps;
|
|
25
|
+
const classNames = alertDialog(variantProps);
|
|
26
|
+
return <ClassNamesProvider value={classNames}>
|
|
27
|
+
<PropsProvider value={variantProps}>
|
|
28
|
+
<DialogRoot {...nativeProps} show={open} defaultShow={defaultOpen} onShowChange={onOpenChange}>
|
|
29
|
+
{children}
|
|
30
|
+
</DialogRoot>
|
|
31
|
+
</PropsProvider>
|
|
32
|
+
</ClassNamesProvider>;
|
|
33
|
+
});
|
|
34
|
+
AlertDialogRoot.displayName = "AlertDialogRoot";
|
|
35
|
+
/** @platform Lynx — `asChild` and refs are unsupported. */
|
|
36
|
+
var AlertDialogTrigger = forwardRef((props, _ref) => {
|
|
37
|
+
const { children, transition, ...nativeProps } = props;
|
|
38
|
+
const resolvedTransition = useAlertDialogTransition(transition);
|
|
39
|
+
return <DialogTrigger {...nativeProps} transition={resolvedTransition}>
|
|
40
|
+
{children}
|
|
41
|
+
</DialogTrigger>;
|
|
42
|
+
});
|
|
43
|
+
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
44
|
+
/** @platform Lynx — maps to `DialogView`; refs are unsupported. */
|
|
45
|
+
var AlertDialogPositioner = forwardRef((props, _ref) => {
|
|
46
|
+
const { children, className, container, style, transition, ...nativeProps } = props;
|
|
47
|
+
const classNames = useClassNames();
|
|
48
|
+
const resolvedTransition = useAlertDialogTransition(transition);
|
|
49
|
+
const positionerStyle = container ? {
|
|
50
|
+
width: "100%",
|
|
51
|
+
height: "100%",
|
|
52
|
+
...style
|
|
53
|
+
} : style;
|
|
54
|
+
return <DialogView {...nativeProps} container={container} className={clsx(classNames.positioner, className)} style={positionerStyle} transition={resolvedTransition}>
|
|
55
|
+
{children}
|
|
56
|
+
</DialogView>;
|
|
57
|
+
});
|
|
58
|
+
AlertDialogPositioner.displayName = "AlertDialogPositioner";
|
|
59
|
+
/**
|
|
60
|
+
* @platform Lynx — refs are unsupported. Native lifecycle handlers in
|
|
61
|
+
* `dialogBackdropProps` are reserved by the headless primitive and are omitted.
|
|
62
|
+
* Alert dialogs do not dismiss when the backdrop is tapped by default.
|
|
63
|
+
*/
|
|
64
|
+
var AlertDialogBackdrop = forwardRef((props, _ref) => {
|
|
65
|
+
const { children, className, transition, clickToClose = false, dialogBackdropProps, ...nativeProps } = props;
|
|
66
|
+
const classNames = useClassNames();
|
|
67
|
+
const resolvedTransition = useAlertDialogTransition(transition);
|
|
68
|
+
return <DialogBackdrop {...nativeProps} className={clsx(classNames.backdrop, className)} transition={resolvedTransition} clickToClose={clickToClose} dialogBackdropProps={omitHeadlessLifecycleHandlers(dialogBackdropProps)}>
|
|
69
|
+
{children}
|
|
70
|
+
</DialogBackdrop>;
|
|
71
|
+
});
|
|
72
|
+
AlertDialogBackdrop.displayName = "AlertDialogBackdrop";
|
|
73
|
+
/**
|
|
74
|
+
* @platform Lynx — refs are unsupported. Native lifecycle handlers in
|
|
75
|
+
* `dialogContentProps` are reserved by the headless primitive and are omitted.
|
|
76
|
+
*/
|
|
77
|
+
var AlertDialogContent = forwardRef((props, _ref) => {
|
|
78
|
+
const { children, className, transition, dialogContentProps, "accessibility-element": accessibilityElement = true, "accessibility-role-description": accessibilityRoleDescription = "alertdialog", ...nativeProps } = props;
|
|
79
|
+
const classNames = useClassNames();
|
|
80
|
+
const resolvedTransition = useAlertDialogTransition(transition);
|
|
81
|
+
const resolvedDialogContentProps = {
|
|
82
|
+
"accessibility-element": accessibilityElement,
|
|
83
|
+
"accessibility-role-description": accessibilityRoleDescription,
|
|
84
|
+
...omitHeadlessLifecycleHandlers(dialogContentProps)
|
|
85
|
+
};
|
|
86
|
+
return <DialogContent {...nativeProps} className={clsx(classNames.content, className)} transition={resolvedTransition} dialogContentProps={resolvedDialogContentProps}>
|
|
87
|
+
{children}
|
|
88
|
+
</DialogContent>;
|
|
89
|
+
});
|
|
90
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
91
|
+
var AlertDialogHeader = forwardRef((props, ref) => {
|
|
92
|
+
const { style, restProps } = useStyleProps(props);
|
|
93
|
+
const { children, className, ...nativeProps } = restProps;
|
|
94
|
+
const classNames = useClassNames();
|
|
95
|
+
return <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.header, className)} style={style}>
|
|
96
|
+
{children}
|
|
97
|
+
</view>;
|
|
98
|
+
});
|
|
99
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
100
|
+
var AlertDialogTitle = forwardRef((props, ref) => {
|
|
101
|
+
const { style, restProps } = useStyleProps(props);
|
|
102
|
+
const { children, className, "accessibility-heading": accessibilityHeading = true, ...nativeProps } = restProps;
|
|
103
|
+
const classNames = useClassNames();
|
|
104
|
+
return <text {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.title, className)} style={style} accessibility-heading={accessibilityHeading}>
|
|
105
|
+
{children}
|
|
106
|
+
</text>;
|
|
107
|
+
});
|
|
108
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
109
|
+
var AlertDialogDescription = forwardRef((props, ref) => {
|
|
110
|
+
const { style, restProps } = useStyleProps(props);
|
|
111
|
+
const { children, className, ...nativeProps } = restProps;
|
|
112
|
+
const classNames = useClassNames();
|
|
113
|
+
return <text {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.description, className)} style={style}>
|
|
114
|
+
{children}
|
|
115
|
+
</text>;
|
|
116
|
+
});
|
|
117
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
118
|
+
var AlertDialogFooter = forwardRef((props, ref) => {
|
|
119
|
+
const { style, restProps } = useStyleProps(props);
|
|
120
|
+
const { children, className, ...nativeProps } = restProps;
|
|
121
|
+
const classNames = useClassNames();
|
|
122
|
+
return <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classNames.footer, className)} style={style}>
|
|
123
|
+
{children}
|
|
124
|
+
</view>;
|
|
125
|
+
});
|
|
126
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
127
|
+
/** @platform Lynx — maps to `DialogClose`; `asChild` and refs are unsupported. */
|
|
128
|
+
var AlertDialogAction = forwardRef((props, _ref) => {
|
|
129
|
+
const { children, className, transition, ...nativeProps } = props;
|
|
130
|
+
const classNames = useClassNames();
|
|
131
|
+
const resolvedTransition = useAlertDialogTransition(transition);
|
|
132
|
+
return <DialogClose {...nativeProps} className={clsx(classNames.action, className)} transition={resolvedTransition}>
|
|
133
|
+
{children}
|
|
134
|
+
</DialogClose>;
|
|
135
|
+
});
|
|
136
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
137
|
+
//#endregion
|
|
138
|
+
export { AlertDialogAction, AlertDialogBackdrop, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPositioner, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AlertDialogAction as Action, AlertDialogBackdrop as Backdrop, AlertDialogContent as Content, AlertDialogDescription as Description, AlertDialogFooter as Footer, AlertDialogHeader as Header, AlertDialogPositioner as Positioner, AlertDialogRoot as Root, AlertDialogTitle as Title, AlertDialogTrigger as Trigger, type AlertDialogActionProps as ActionProps, type AlertDialogBackdropProps as BackdropProps, type AlertDialogContentProps as ContentProps, type AlertDialogDescriptionProps as DescriptionProps, type AlertDialogFooterProps as FooterProps, type AlertDialogHeaderProps as HeaderProps, type AlertDialogPositionerProps as PositionerProps, type AlertDialogRootProps as RootProps, type AlertDialogTitleProps as TitleProps, type AlertDialogTriggerProps as TriggerProps, } from './AlertDialog';
|
|
2
|
+
//# sourceMappingURL=AlertDialog.namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,IAAI,MAAM,EAC3B,mBAAmB,IAAI,QAAQ,EAC/B,kBAAkB,IAAI,OAAO,EAC7B,sBAAsB,IAAI,WAAW,EACrC,iBAAiB,IAAI,MAAM,EAC3B,iBAAiB,IAAI,MAAM,EAC3B,qBAAqB,IAAI,UAAU,EACnC,eAAe,IAAI,IAAI,EACvB,gBAAgB,IAAI,KAAK,EACzB,kBAAkB,IAAI,OAAO,EAC7B,KAAK,sBAAsB,IAAI,WAAW,EAC1C,KAAK,wBAAwB,IAAI,aAAa,EAC9C,KAAK,uBAAuB,IAAI,YAAY,EAC5C,KAAK,2BAA2B,IAAI,gBAAgB,EACpD,KAAK,sBAAsB,IAAI,WAAW,EAC1C,KAAK,sBAAsB,IAAI,WAAW,EAC1C,KAAK,0BAA0B,IAAI,eAAe,EAClD,KAAK,oBAAoB,IAAI,SAAS,EACtC,KAAK,qBAAqB,IAAI,UAAU,EACxC,KAAK,uBAAuB,IAAI,YAAY,GAC7C,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { AlertDialogAction, AlertDialogBackdrop, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPositioner, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger } from "./AlertDialog.jsx";
|
|
3
|
+
//#region src/components/AlertDialog/AlertDialog.namespace.ts
|
|
4
|
+
var AlertDialog_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Action: () => AlertDialogAction,
|
|
6
|
+
Backdrop: () => AlertDialogBackdrop,
|
|
7
|
+
Content: () => AlertDialogContent,
|
|
8
|
+
Description: () => AlertDialogDescription,
|
|
9
|
+
Footer: () => AlertDialogFooter,
|
|
10
|
+
Header: () => AlertDialogHeader,
|
|
11
|
+
Positioner: () => AlertDialogPositioner,
|
|
12
|
+
Root: () => AlertDialogRoot,
|
|
13
|
+
Title: () => AlertDialogTitle,
|
|
14
|
+
Trigger: () => AlertDialogTrigger
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { AlertDialog_namespace_exports };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AlertDialogAction, type AlertDialogActionProps, AlertDialogBackdrop, type AlertDialogBackdropProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogPositioner, type AlertDialogPositionerProps, AlertDialogRoot, type AlertDialogRootProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, } from './AlertDialog';
|
|
2
|
+
export * as AlertDialog from './AlertDialog.namespace';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,eAAe,EACf,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC"}
|
|
@@ -2,6 +2,10 @@ import { AppBarVariantProps } from '@seed-design/lynx-css/recipes/app-bar';
|
|
|
2
2
|
import { AppBarMainVariantProps } from '@seed-design/lynx-css/recipes/app-bar-main';
|
|
3
3
|
import { LynxElementProps, LynxIconElementProps, LynxPressableProps, LynxStyledElementProps, LynxViewProps } from '../../types';
|
|
4
4
|
import * as React from "@lynx-js/react";
|
|
5
|
+
/**
|
|
6
|
+
* 아이콘 버튼의 bleed 보정 방향. `leading`은 왼쪽, `trailing`은 오른쪽, `both`는 양쪽.
|
|
7
|
+
*/
|
|
8
|
+
export type AppBarEdge = "leading" | "trailing" | "both";
|
|
5
9
|
export interface AppBarRootProps extends AppBarVariantProps, LynxStyledElementProps {
|
|
6
10
|
}
|
|
7
11
|
export declare const AppBarRoot: React.ForwardRefExoticComponent<AppBarRootProps & React.RefAttributes<unknown>>;
|
|
@@ -22,14 +26,23 @@ export declare const AppBarTitle: React.ForwardRefExoticComponent<AppBarTitlePro
|
|
|
22
26
|
export interface AppBarSubtitleProps extends LynxElementProps {
|
|
23
27
|
}
|
|
24
28
|
export declare const AppBarSubtitle: React.ForwardRefExoticComponent<AppBarSubtitleProps & React.RefAttributes<unknown>>;
|
|
25
|
-
export interface AppBarIconButtonProps extends LynxElementProps, LynxPressableProps {
|
|
29
|
+
export interface AppBarIconButtonProps extends Omit<LynxElementProps, "flatten">, LynxPressableProps {
|
|
26
30
|
icon?: React.ReactElement<LynxIconElementProps>;
|
|
27
31
|
"accessibility-label"?: LynxViewProps["accessibility-label"];
|
|
28
32
|
"accessibility-element"?: LynxViewProps["accessibility-element"];
|
|
29
33
|
"accessibility-traits"?: LynxViewProps["accessibility-traits"];
|
|
34
|
+
/**
|
|
35
|
+
* 슬롯의 첫·마지막 자식이 아이콘 버튼이면 해당 방향을, 유일한 자식이면 양쪽을 자동 보정한다.
|
|
36
|
+
* 명시하면 `AppBarLeft` / `AppBarRight`에서 감지한 자동 보정 방향을 덮어쓴다.
|
|
37
|
+
*/
|
|
38
|
+
edge?: AppBarEdge;
|
|
30
39
|
}
|
|
31
40
|
export declare const AppBarIconButton: React.ForwardRefExoticComponent<AppBarIconButtonProps & React.RefAttributes<unknown>>;
|
|
32
41
|
export interface AppBarSlotProps extends LynxStyledElementProps {
|
|
42
|
+
/**
|
|
43
|
+
* @internal 커스텀 슬롯에서는 bleed 보정을 적용하지 않는다. 전달된 값은 native 속성에서 제외한다.
|
|
44
|
+
*/
|
|
45
|
+
edge?: AppBarEdge;
|
|
33
46
|
}
|
|
34
47
|
export declare const AppBarSlot: React.ForwardRefExoticComponent<AppBarSlotProps & React.RefAttributes<unknown>>;
|
|
35
48
|
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../src/components/AppBar/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EAEtB,aAAa,EAEd,MAAM,aAAa,CAAC;AAoCrB,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,sBAAsB;CAAG;AAEtF,eAAO,MAAM,UAAU,iFA2BrB,CAAC;AAKH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,UAAU,iFA4BrB,CAAC;AAGH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,WAAW,kFA4BtB,CAAC;AAKH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE1F,eAAO,MAAM,UAAU,iFAmCrB,CAAC;AAGH,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;CAAG;AAE7D,eAAO,MAAM,WAAW,kFAYtB,CAAC;AAGH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;CAAG;AAEhE,eAAO,MAAM,cAAc,qFAYzB,CAAC;AAKH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../src/components/AppBar/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EAEtB,aAAa,EAEd,MAAM,aAAa,CAAC;AAoCrB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;AA2DzD,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,sBAAsB;CAAG;AAEtF,eAAO,MAAM,UAAU,iFA2BrB,CAAC;AAKH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,UAAU,iFA4BrB,CAAC;AAGH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,WAAW,kFA4BtB,CAAC;AAKH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE1F,eAAO,MAAM,UAAU,iFAmCrB,CAAC;AAGH,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;CAAG;AAE7D,eAAO,MAAM,WAAW,kFAYtB,CAAC;AAGH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;CAAG;AAEhE,eAAO,MAAM,cAAc,qFAYzB,CAAC;AAKH,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,EACvC,kBAAkB;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAChD,qBAAqB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC7D,uBAAuB,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACjE,sBAAsB,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC/D;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,uFA8C3B,CAAC;AAGH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,iFAcrB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
|
|
1
2
|
import { mergeProps } from "../../utils/merge-props.js";
|
|
2
3
|
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
3
|
-
import { Icon } from "../Icon/Icon.jsx";
|
|
4
|
+
import { Icon, IconSlotProvider } from "../Icon/Icon.jsx";
|
|
4
5
|
import { AppBarProvider, useAppBarContext } from "./context.js";
|
|
5
6
|
import { getLayoutWidth, getMainLayoutStyle, useAppBar } from "./useAppBar.js";
|
|
6
7
|
import * as React from "@lynx-js/react";
|
|
@@ -24,6 +25,31 @@ function useAppBarMainClassNames(consumer) {
|
|
|
24
25
|
throw new Error(`<${consumer}/> must be rendered inside <AppBarMain/>.`);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
28
|
+
var AppBarEdgeContext = React.createContext(void 0);
|
|
29
|
+
/** Fragments and arrays do not create layout boxes; retain their keys and nesting. */
|
|
30
|
+
function countEdgeChildren(children) {
|
|
31
|
+
if (children == null || children === "" || typeof children === "boolean") return 0;
|
|
32
|
+
if (Array.isArray(children)) return children.reduce((count, child) => count + countEdgeChildren(child), 0);
|
|
33
|
+
if (React.isValidElement(children) && children.type === React.Fragment) return countEdgeChildren(children.props.children);
|
|
34
|
+
return 1;
|
|
35
|
+
}
|
|
36
|
+
function provideEdgeToChildren(children) {
|
|
37
|
+
const lastIndex = countEdgeChildren(children) - 1;
|
|
38
|
+
let index = 0;
|
|
39
|
+
function visit(child) {
|
|
40
|
+
if (child == null || child === "" || typeof child === "boolean") return child;
|
|
41
|
+
if (Array.isArray(child)) return child.map(visit);
|
|
42
|
+
if (React.isValidElement(child) && child.type === React.Fragment) return React.cloneElement(child, { children: visit(child.props.children) });
|
|
43
|
+
const childIndex = index++;
|
|
44
|
+
const edge = childIndex === 0 ? childIndex === lastIndex ? "both" : "leading" : childIndex === lastIndex ? "trailing" : void 0;
|
|
45
|
+
if (!React.isValidElement(child)) return child;
|
|
46
|
+
const automaticEdge = typeof child.type !== "string" && child.type !== AppBarSlot ? edge : void 0;
|
|
47
|
+
return <AppBarEdgeContext.Provider key={child.key} value={automaticEdge}>
|
|
48
|
+
{child}
|
|
49
|
+
</AppBarEdgeContext.Provider>;
|
|
50
|
+
}
|
|
51
|
+
return visit(children);
|
|
52
|
+
}
|
|
27
53
|
var AppBarRoot = React.forwardRef((props, ref) => {
|
|
28
54
|
const [variantProps, otherProps] = appBar.splitVariantProps(props);
|
|
29
55
|
const { children, className, style, ...nativeProps } = otherProps;
|
|
@@ -54,7 +80,7 @@ var AppBarLeft = React.forwardRef((props, ref) => {
|
|
|
54
80
|
if (width != null) setLeftWidth(width);
|
|
55
81
|
}, [bindlayoutchange, setLeftWidth]);
|
|
56
82
|
return <view {...mergeProps({ bindlayoutchange: handleLayoutChange }, ref ? { ref } : {}, nativeProps)} className={clsx(classNames.left, className)}>
|
|
57
|
-
{children}
|
|
83
|
+
{provideEdgeToChildren(children)}
|
|
58
84
|
</view>;
|
|
59
85
|
});
|
|
60
86
|
AppBarLeft.displayName = "AppBarLeft";
|
|
@@ -68,7 +94,7 @@ var AppBarRight = React.forwardRef((props, ref) => {
|
|
|
68
94
|
if (width != null) setRightWidth(width);
|
|
69
95
|
}, [bindlayoutchange, setRightWidth]);
|
|
70
96
|
return <view {...mergeProps({ bindlayoutchange: handleLayoutChange }, ref ? { ref } : {}, nativeProps)} className={clsx(classNames.right, className)}>
|
|
71
|
-
{children}
|
|
97
|
+
{provideEdgeToChildren(children)}
|
|
72
98
|
</view>;
|
|
73
99
|
});
|
|
74
100
|
AppBarRight.displayName = "AppBarRight";
|
|
@@ -113,20 +139,30 @@ var AppBarSubtitle = React.forwardRef((props, ref) => {
|
|
|
113
139
|
});
|
|
114
140
|
AppBarSubtitle.displayName = "AppBarSubtitle";
|
|
115
141
|
var AppBarIconButton = React.forwardRef((props, ref) => {
|
|
116
|
-
const { children, className, icon, "accessibility-element": accessibilityElement = true, "accessibility-label": accessibilityLabel, "accessibility-traits": accessibilityTraits = "button", ...nativeProps } = props;
|
|
142
|
+
const { children, className, icon, edge, "accessibility-element": accessibilityElement = true, "accessibility-label": accessibilityLabel, "accessibility-traits": accessibilityTraits = "button", ...nativeProps } = props;
|
|
117
143
|
const classNames = useAppBarClassNames("AppBarIconButton");
|
|
144
|
+
const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback();
|
|
145
|
+
const automaticEdge = React.useContext(AppBarEdgeContext);
|
|
146
|
+
const resolvedEdge = edge ?? automaticEdge;
|
|
118
147
|
if (process.env.NODE_ENV !== "production" && accessibilityElement && !accessibilityLabel) console.warn("AppBarIconButton requires `accessibility-label` for accessibility.");
|
|
119
|
-
return <view {...mergeProps(ref ? { ref } : {}, nativeProps)} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits={accessibilityTraits} className={clsx(classNames.iconButton, className)}>
|
|
120
|
-
|
|
148
|
+
return <view {...mergeProps(ref ? { ref } : {}, scaleFeedbackTriggerProps, scaleFeedbackTargetProps, nativeProps)} flatten={false} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits={accessibilityTraits} className={clsx(classNames.iconButton, (resolvedEdge === "leading" || resolvedEdge === "both") && "seed-app-bar__icon-button-edge-leading", (resolvedEdge === "trailing" || resolvedEdge === "both") && "seed-app-bar__icon-button-edge-trailing", className)}>
|
|
149
|
+
<IconSlotProvider value={{
|
|
150
|
+
classNames: { icon: classNames.icon },
|
|
151
|
+
deps: [classNames.icon]
|
|
152
|
+
}}>
|
|
153
|
+
{icon ? <Icon icon={icon} /> : children}
|
|
154
|
+
</IconSlotProvider>
|
|
121
155
|
</view>;
|
|
122
156
|
});
|
|
123
157
|
AppBarIconButton.displayName = "AppBarIconButton";
|
|
124
158
|
var AppBarSlot = React.forwardRef((props, ref) => {
|
|
125
|
-
const { children, className, ...nativeProps } = props;
|
|
159
|
+
const { children, className, edge: _edge, ...nativeProps } = props;
|
|
126
160
|
const classNames = useAppBarClassNames("AppBarSlot");
|
|
127
|
-
return <
|
|
128
|
-
{
|
|
129
|
-
|
|
161
|
+
return <AppBarEdgeContext.Provider value={void 0}>
|
|
162
|
+
<view {...mergeProps(ref ? { ref } : {}, nativeProps)} className={clsx(classNames.custom, className)}>
|
|
163
|
+
{children}
|
|
164
|
+
</view>
|
|
165
|
+
</AppBarEdgeContext.Provider>;
|
|
130
166
|
});
|
|
131
167
|
AppBarSlot.displayName = "AppBarSlot";
|
|
132
168
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AppBarIconButton as IconButton, AppBarLeft as Left, AppBarMain as Main, AppBarRight as Right, AppBarRoot as Root, AppBarSlot as Slot, AppBarSubtitle as Subtitle, AppBarTitle as Title, type AppBarIconButtonProps as IconButtonProps, type AppBarLeftProps as LeftProps, type AppBarMainProps as MainProps, type AppBarRightProps as RightProps, type AppBarRootProps as RootProps, type AppBarSlotProps as SlotProps, type AppBarSubtitleProps as SubtitleProps, type AppBarTitleProps as TitleProps, } from './AppBar';
|
|
1
|
+
export { AppBarIconButton as IconButton, AppBarLeft as Left, AppBarMain as Main, AppBarRight as Right, AppBarRoot as Root, AppBarSlot as Slot, AppBarSubtitle as Subtitle, AppBarTitle as Title, type AppBarEdge as Edge, type AppBarIconButtonProps as IconButtonProps, type AppBarLeftProps as LeftProps, type AppBarMainProps as MainProps, type AppBarRightProps as RightProps, type AppBarRootProps as RootProps, type AppBarSlotProps as SlotProps, type AppBarSubtitleProps as SubtitleProps, type AppBarTitleProps as TitleProps, } from './AppBar';
|
|
2
2
|
//# sourceMappingURL=AppBar.namespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/AppBar/AppBar.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,UAAU,EAC9B,UAAU,IAAI,IAAI,EAClB,UAAU,IAAI,IAAI,EAClB,WAAW,IAAI,KAAK,EACpB,UAAU,IAAI,IAAI,EAClB,UAAU,IAAI,IAAI,EAClB,cAAc,IAAI,QAAQ,EAC1B,WAAW,IAAI,KAAK,EACpB,KAAK,qBAAqB,IAAI,eAAe,EAC7C,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,gBAAgB,IAAI,UAAU,EACnC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,mBAAmB,IAAI,aAAa,EACzC,KAAK,gBAAgB,IAAI,UAAU,GACpC,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"AppBar.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/AppBar/AppBar.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,UAAU,EAC9B,UAAU,IAAI,IAAI,EAClB,UAAU,IAAI,IAAI,EAClB,WAAW,IAAI,KAAK,EACpB,UAAU,IAAI,IAAI,EAClB,UAAU,IAAI,IAAI,EAClB,cAAc,IAAI,QAAQ,EAC1B,WAAW,IAAI,KAAK,EACpB,KAAK,UAAU,IAAI,IAAI,EACvB,KAAK,qBAAqB,IAAI,eAAe,EAC7C,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,gBAAgB,IAAI,UAAU,EACnC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,eAAe,IAAI,SAAS,EACjC,KAAK,mBAAmB,IAAI,aAAa,EACzC,KAAK,gBAAgB,IAAI,UAAU,GACpC,MAAM,UAAU,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, type AppBarIconButtonProps, type AppBarLeftProps, type AppBarMainProps, type AppBarRightProps, type AppBarRootProps, type AppBarRootProps as AppBarProps, type AppBarSlotProps, type AppBarSubtitleProps, type AppBarTitleProps, } from './AppBar';
|
|
1
|
+
export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, type AppBarEdge, type AppBarIconButtonProps, type AppBarLeftProps, type AppBarMainProps, type AppBarRightProps, type AppBarRootProps, type AppBarRootProps as AppBarProps, type AppBarSlotProps, type AppBarSubtitleProps, type AppBarTitleProps, } from './AppBar';
|
|
2
2
|
export * as AppBar from './AppBar.namespace';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,IAAI,WAAW,EACnC,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,IAAI,WAAW,EACnC,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { IntrinsicElements, NodesRef } from '@lynx-js/types';
|
|
2
|
+
import { AttachmentInputVariantProps } from '@seed-design/lynx-css/recipes/attachment-input';
|
|
3
|
+
import { AttachmentInputItemVariantProps } from '@seed-design/lynx-css/recipes/attachment-input-item';
|
|
4
|
+
import { AttachmentInputTriggerVariantProps } from '@seed-design/lynx-css/recipes/attachment-input-trigger';
|
|
5
|
+
import { FieldLabelVariantProps } from '@seed-design/lynx-css/recipes/field-label';
|
|
6
|
+
import { LynxAccessibilityProps, LynxPressableProps, LynxStyledElementProps } from '../../types';
|
|
7
|
+
import * as React from "@lynx-js/react";
|
|
8
|
+
export type AttachmentDisplayStatusDetails = {
|
|
9
|
+
status: "pending";
|
|
10
|
+
} | {
|
|
11
|
+
status: "uploading";
|
|
12
|
+
progress?: number;
|
|
13
|
+
} | {
|
|
14
|
+
status: "success";
|
|
15
|
+
} | {
|
|
16
|
+
status: "error";
|
|
17
|
+
};
|
|
18
|
+
export type AttachmentDisplayEntry = {
|
|
19
|
+
id: string;
|
|
20
|
+
thumbnailUrl?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
type?: string;
|
|
23
|
+
size?: number;
|
|
24
|
+
} & AttachmentDisplayStatusDetails;
|
|
25
|
+
export interface AttachmentDisplayProps {
|
|
26
|
+
entries?: AttachmentDisplayEntry[];
|
|
27
|
+
defaultEntries?: AttachmentDisplayEntry[];
|
|
28
|
+
onEntriesChange?: (entries: AttachmentDisplayEntry[]) => void;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
required?: boolean;
|
|
33
|
+
maxEntries?: number;
|
|
34
|
+
onTriggerTap?: (helpers: {
|
|
35
|
+
addEntries: (entries: AttachmentDisplayEntry[]) => void;
|
|
36
|
+
updateEntryStatus: (id: string, details: AttachmentDisplayStatusDetails) => void;
|
|
37
|
+
}) => void;
|
|
38
|
+
}
|
|
39
|
+
interface AttachmentDisplayStateProps {
|
|
40
|
+
"data-disabled": boolean;
|
|
41
|
+
"data-readonly": boolean;
|
|
42
|
+
"data-invalid": boolean;
|
|
43
|
+
"data-required": boolean;
|
|
44
|
+
}
|
|
45
|
+
interface AttachmentDisplayContextValue {
|
|
46
|
+
entries: AttachmentDisplayEntry[];
|
|
47
|
+
currentEntryCount: number;
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
invalid: boolean;
|
|
50
|
+
readOnly: boolean;
|
|
51
|
+
required: boolean;
|
|
52
|
+
maxEntries: number;
|
|
53
|
+
triggerDisabled: boolean;
|
|
54
|
+
stateProps: AttachmentDisplayStateProps;
|
|
55
|
+
onTriggerTap?: AttachmentDisplayProps["onTriggerTap"];
|
|
56
|
+
addEntries: (entries: AttachmentDisplayEntry[]) => void;
|
|
57
|
+
removeEntry: (id: string) => void;
|
|
58
|
+
reorderEntry: (fromIndex: number, toIndex: number) => void;
|
|
59
|
+
clearEntries: () => void;
|
|
60
|
+
updateEntryStatus: (id: string, details: AttachmentDisplayStatusDetails) => void;
|
|
61
|
+
}
|
|
62
|
+
type AttachmentDisplayItemContextValue = AttachmentDisplayEntry & {
|
|
63
|
+
imageProps?: {
|
|
64
|
+
src: string;
|
|
65
|
+
alt?: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
type NativeScrollViewProps = Omit<IntrinsicElements["scroll-view"], "children" | "className" | "style">;
|
|
69
|
+
export declare function useAttachmentDisplayContext(): AttachmentDisplayContextValue;
|
|
70
|
+
export declare function useAttachmentDisplayItemContext(): AttachmentDisplayItemContextValue;
|
|
71
|
+
export declare function useAttachmentDisplay(props?: AttachmentDisplayProps): {
|
|
72
|
+
entries: AttachmentDisplayEntry[];
|
|
73
|
+
currentEntryCount: number;
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
invalid: boolean;
|
|
76
|
+
readOnly: boolean;
|
|
77
|
+
required: boolean;
|
|
78
|
+
maxEntries: number;
|
|
79
|
+
triggerDisabled: boolean;
|
|
80
|
+
stateProps: {
|
|
81
|
+
"data-disabled": boolean;
|
|
82
|
+
"data-readonly": boolean;
|
|
83
|
+
"data-invalid": boolean;
|
|
84
|
+
"data-required": boolean;
|
|
85
|
+
};
|
|
86
|
+
addEntries: (incoming: AttachmentDisplayEntry[]) => void;
|
|
87
|
+
removeEntry: (id: string) => void;
|
|
88
|
+
reorderEntry: (fromIndex: number, toIndex: number) => void;
|
|
89
|
+
clearEntries: () => void;
|
|
90
|
+
updateEntryStatus: (id: string, details: AttachmentDisplayStatusDetails) => void;
|
|
91
|
+
onTriggerTap: ((helpers: {
|
|
92
|
+
addEntries: (entries: AttachmentDisplayEntry[]) => void;
|
|
93
|
+
updateEntryStatus: (id: string, details: AttachmentDisplayStatusDetails) => void;
|
|
94
|
+
}) => void) | undefined;
|
|
95
|
+
};
|
|
96
|
+
export interface AttachmentDisplayRootProps extends AttachmentDisplayProps, AttachmentInputVariantProps, LynxStyledElementProps {
|
|
97
|
+
}
|
|
98
|
+
export declare const AttachmentDisplayRoot: React.ForwardRefExoticComponent<AttachmentDisplayRootProps & React.RefAttributes<NodesRef>>;
|
|
99
|
+
export interface AttachmentDisplayControlProps extends AttachmentInputVariantProps, LynxStyledElementProps {
|
|
100
|
+
}
|
|
101
|
+
export declare const AttachmentDisplayControl: React.ForwardRefExoticComponent<AttachmentDisplayControlProps & React.RefAttributes<NodesRef>>;
|
|
102
|
+
export interface AttachmentDisplayContainerProps extends LynxStyledElementProps, Omit<NativeScrollViewProps, "scroll-orientation" | "scroll-bar-enable"> {
|
|
103
|
+
}
|
|
104
|
+
export declare const AttachmentDisplayContainer: React.ForwardRefExoticComponent<Omit<AttachmentDisplayContainerProps, "ref"> & React.RefAttributes<NodesRef>>;
|
|
105
|
+
export declare const AttachmentDisplayItemGroup: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
106
|
+
export declare const AttachmentDisplayFooter: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
107
|
+
export declare const AttachmentDisplayDescription: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
108
|
+
export declare const AttachmentDisplayErrorMessage: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
109
|
+
export interface AttachmentDisplayHeaderProps extends LynxStyledElementProps {
|
|
110
|
+
}
|
|
111
|
+
export declare const AttachmentDisplayHeader: React.ForwardRefExoticComponent<AttachmentDisplayHeaderProps & React.RefAttributes<NodesRef>>;
|
|
112
|
+
export interface AttachmentDisplayLabelProps extends FieldLabelVariantProps, LynxStyledElementProps {
|
|
113
|
+
}
|
|
114
|
+
export declare const AttachmentDisplayLabel: React.ForwardRefExoticComponent<AttachmentDisplayLabelProps & React.RefAttributes<NodesRef>>;
|
|
115
|
+
export interface AttachmentDisplayIndicatorTextProps extends LynxStyledElementProps {
|
|
116
|
+
}
|
|
117
|
+
export declare const AttachmentDisplayIndicatorText: React.ForwardRefExoticComponent<AttachmentDisplayIndicatorTextProps & React.RefAttributes<NodesRef>>;
|
|
118
|
+
export interface AttachmentDisplayRequiredIndicatorProps extends LynxStyledElementProps {
|
|
119
|
+
}
|
|
120
|
+
export declare const AttachmentDisplayRequiredIndicator: React.ForwardRefExoticComponent<AttachmentDisplayRequiredIndicatorProps & React.RefAttributes<NodesRef>>;
|
|
121
|
+
export interface AttachmentDisplayTriggerProps extends AttachmentInputTriggerVariantProps, LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
|
|
122
|
+
}
|
|
123
|
+
export declare const AttachmentDisplayTrigger: React.ForwardRefExoticComponent<AttachmentDisplayTriggerProps & React.RefAttributes<NodesRef>>;
|
|
124
|
+
export interface AttachmentDisplayTriggerIconProps extends LynxStyledElementProps {
|
|
125
|
+
image?: React.ReactNode;
|
|
126
|
+
}
|
|
127
|
+
export declare const AttachmentDisplayTriggerIcon: React.ForwardRefExoticComponent<AttachmentDisplayTriggerIconProps & React.RefAttributes<NodesRef>>;
|
|
128
|
+
export interface AttachmentDisplayTriggerItemCountProps extends LynxStyledElementProps {
|
|
129
|
+
}
|
|
130
|
+
export declare const AttachmentDisplayTriggerItemCount: React.ForwardRefExoticComponent<AttachmentDisplayTriggerItemCountProps & React.RefAttributes<NodesRef>>;
|
|
131
|
+
export interface AttachmentDisplayItemProps extends Omit<AttachmentInputItemVariantProps, "type">, LynxStyledElementProps {
|
|
132
|
+
entry: AttachmentDisplayEntry;
|
|
133
|
+
}
|
|
134
|
+
export declare const AttachmentDisplayItem: React.ForwardRefExoticComponent<AttachmentDisplayItemProps & React.RefAttributes<NodesRef>>;
|
|
135
|
+
export declare const AttachmentDisplayItemSurface: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
136
|
+
export declare const AttachmentDisplayItemImage: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
137
|
+
export declare const AttachmentDisplayItemThumbnail: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
138
|
+
export declare const AttachmentDisplayItemMetadata: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
139
|
+
export declare const AttachmentDisplayItemBadge: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
140
|
+
export interface AttachmentDisplayItemActionButtonProps extends LynxStyledElementProps, LynxPressableProps {
|
|
141
|
+
}
|
|
142
|
+
export declare const AttachmentDisplayItemActionButton: React.ForwardRefExoticComponent<AttachmentDisplayItemActionButtonProps & React.RefAttributes<NodesRef>>;
|
|
143
|
+
export interface AttachmentDisplayItemBackdropProps extends Omit<LynxStyledElementProps, "children"> {
|
|
144
|
+
status: AttachmentDisplayEntry["status"];
|
|
145
|
+
children?: React.ReactNode | ((entry: AttachmentDisplayEntry) => React.ReactNode);
|
|
146
|
+
}
|
|
147
|
+
export declare const AttachmentDisplayItemBackdrop: React.ForwardRefExoticComponent<AttachmentDisplayItemBackdropProps & React.RefAttributes<NodesRef>>;
|
|
148
|
+
export interface AttachmentDisplayItemRemoveButtonProps extends LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
|
|
149
|
+
}
|
|
150
|
+
export declare const AttachmentDisplayItemRemoveButton: React.ForwardRefExoticComponent<AttachmentDisplayItemRemoveButtonProps & React.RefAttributes<NodesRef>>;
|
|
151
|
+
export interface AttachmentDisplayContextProps {
|
|
152
|
+
children: (context: AttachmentDisplayContextValue) => React.ReactNode;
|
|
153
|
+
}
|
|
154
|
+
export declare const AttachmentDisplayContext: (props: AttachmentDisplayContextProps) => React.ReactNode;
|
|
155
|
+
export declare const AttachmentDisplay: {
|
|
156
|
+
Root: React.ForwardRefExoticComponent<AttachmentDisplayRootProps & React.RefAttributes<NodesRef>>;
|
|
157
|
+
Control: React.ForwardRefExoticComponent<AttachmentDisplayControlProps & React.RefAttributes<NodesRef>>;
|
|
158
|
+
Container: React.ForwardRefExoticComponent<Omit<AttachmentDisplayContainerProps, "ref"> & React.RefAttributes<NodesRef>>;
|
|
159
|
+
ItemGroup: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
160
|
+
Footer: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
161
|
+
Header: React.ForwardRefExoticComponent<AttachmentDisplayHeaderProps & React.RefAttributes<NodesRef>>;
|
|
162
|
+
Label: React.ForwardRefExoticComponent<AttachmentDisplayLabelProps & React.RefAttributes<NodesRef>>;
|
|
163
|
+
IndicatorText: React.ForwardRefExoticComponent<AttachmentDisplayIndicatorTextProps & React.RefAttributes<NodesRef>>;
|
|
164
|
+
RequiredIndicator: React.ForwardRefExoticComponent<AttachmentDisplayRequiredIndicatorProps & React.RefAttributes<NodesRef>>;
|
|
165
|
+
Description: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
166
|
+
ErrorMessage: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
167
|
+
Trigger: React.ForwardRefExoticComponent<AttachmentDisplayTriggerProps & React.RefAttributes<NodesRef>>;
|
|
168
|
+
TriggerIcon: React.ForwardRefExoticComponent<AttachmentDisplayTriggerIconProps & React.RefAttributes<NodesRef>>;
|
|
169
|
+
TriggerItemCount: React.ForwardRefExoticComponent<AttachmentDisplayTriggerItemCountProps & React.RefAttributes<NodesRef>>;
|
|
170
|
+
Item: React.ForwardRefExoticComponent<AttachmentDisplayItemProps & React.RefAttributes<NodesRef>>;
|
|
171
|
+
ItemSurface: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
172
|
+
ItemImage: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
173
|
+
ItemThumbnail: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
174
|
+
ItemMetadata: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
175
|
+
ItemBadge: React.ForwardRefExoticComponent<LynxStyledElementProps & React.RefAttributes<NodesRef>>;
|
|
176
|
+
ItemActionButton: React.ForwardRefExoticComponent<AttachmentDisplayItemActionButtonProps & React.RefAttributes<NodesRef>>;
|
|
177
|
+
ItemBackdrop: React.ForwardRefExoticComponent<AttachmentDisplayItemBackdropProps & React.RefAttributes<NodesRef>>;
|
|
178
|
+
ItemRemoveButton: React.ForwardRefExoticComponent<AttachmentDisplayItemRemoveButtonProps & React.RefAttributes<NodesRef>>;
|
|
179
|
+
Context: (props: AttachmentDisplayContextProps) => React.ReactNode;
|
|
180
|
+
};
|
|
181
|
+
export {};
|
|
182
|
+
//# sourceMappingURL=AttachmentDisplay.d.ts.map
|