@seed-design/lynx-react 0.7.1 → 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 +39 -8
- 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 +2 -1
- 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/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/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 +231 -0
- package/src/components/AppBar/AppBar.tsx +105 -13
- 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 +0 -3
- package/src/components/Icon/Icon.tsx +11 -1
- 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 +5 -3
- 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/types.ts +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AttachmentInput,
|
|
3
|
+
AttachmentInputRoot,
|
|
4
|
+
AttachmentInputContainer,
|
|
5
|
+
AttachmentInputItemGroup,
|
|
6
|
+
AttachmentInputTrigger,
|
|
7
|
+
AttachmentInputTriggerIcon,
|
|
8
|
+
AttachmentInputTriggerItemCount,
|
|
9
|
+
AttachmentInputItem,
|
|
10
|
+
AttachmentInputItemName,
|
|
11
|
+
AttachmentInputItemSize,
|
|
12
|
+
AttachmentInputItemImage,
|
|
13
|
+
AttachmentInputItemThumbnail,
|
|
14
|
+
AttachmentInputItemMetadata,
|
|
15
|
+
AttachmentInputItemBadge,
|
|
16
|
+
AttachmentInputItemActionButton,
|
|
17
|
+
AttachmentInputItemBackdrop,
|
|
18
|
+
AttachmentInputItemSurface,
|
|
19
|
+
AttachmentInputItemRemoveButton,
|
|
20
|
+
AttachmentInputContext,
|
|
21
|
+
useAttachmentInput,
|
|
22
|
+
useAttachmentInputContext,
|
|
23
|
+
useAttachmentInputItemContext,
|
|
24
|
+
type NativeFile,
|
|
25
|
+
type AttachmentFileError,
|
|
26
|
+
type AttachmentFileRejection,
|
|
27
|
+
type AttachmentFileStatusDetails,
|
|
28
|
+
type AttachmentFileEntry,
|
|
29
|
+
type AttachmentInputProps,
|
|
30
|
+
type AttachmentInputStateProps,
|
|
31
|
+
type AttachmentInputContextValue,
|
|
32
|
+
type AttachmentInputRootProps,
|
|
33
|
+
type AttachmentInputContainerProps,
|
|
34
|
+
type AttachmentInputItemGroupProps,
|
|
35
|
+
type AttachmentInputTriggerProps,
|
|
36
|
+
type AttachmentInputTriggerIconProps,
|
|
37
|
+
type AttachmentInputTriggerItemCountProps,
|
|
38
|
+
type AttachmentInputItemProps,
|
|
39
|
+
type AttachmentInputItemNameProps,
|
|
40
|
+
type AttachmentInputItemSizeProps,
|
|
41
|
+
type AttachmentInputItemSurfaceProps,
|
|
42
|
+
type AttachmentInputItemImageProps,
|
|
43
|
+
type AttachmentInputItemThumbnailProps,
|
|
44
|
+
type AttachmentInputItemMetadataProps,
|
|
45
|
+
type AttachmentInputItemBadgeProps,
|
|
46
|
+
type AttachmentInputItemBackdropProps,
|
|
47
|
+
type AttachmentInputItemActionButtonProps,
|
|
48
|
+
type AttachmentInputItemRemoveButtonProps,
|
|
49
|
+
} from "./AttachmentInput";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
import { createRef } from "@lynx-js/react";
|
|
1
3
|
import { fireEvent, render } from "@lynx-js/react/testing-library";
|
|
2
4
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
5
|
|
|
@@ -75,6 +77,7 @@ vi.mock("../../hooks/useSafeArea", () => ({
|
|
|
75
77
|
}));
|
|
76
78
|
|
|
77
79
|
import * as BottomSheet from "./BottomSheet.namespace";
|
|
80
|
+
import { ScrollFog } from "../ScrollFog";
|
|
78
81
|
|
|
79
82
|
describe("BottomSheet", () => {
|
|
80
83
|
beforeEach(() => {
|
|
@@ -95,19 +98,31 @@ describe("BottomSheet", () => {
|
|
|
95
98
|
});
|
|
96
99
|
});
|
|
97
100
|
|
|
98
|
-
it("renders Body as a
|
|
101
|
+
it("renders Body as a composable view with an explicit ScrollFog child", () => {
|
|
102
|
+
const bodyRef = createRef<unknown>();
|
|
99
103
|
const { container } = render(
|
|
100
104
|
<BottomSheet.Root>
|
|
101
|
-
<BottomSheet.Body>
|
|
102
|
-
<
|
|
105
|
+
<BottomSheet.Body ref={bodyRef} className="custom-body" style={{ height: "200px" }}>
|
|
106
|
+
<ScrollFog hideScrollBar placement={["top", "bottom"]}>
|
|
107
|
+
<text>Scrollable content</text>
|
|
108
|
+
</ScrollFog>
|
|
103
109
|
</BottomSheet.Body>
|
|
104
110
|
</BottomSheet.Root>,
|
|
105
111
|
);
|
|
106
112
|
|
|
107
|
-
const body = container.querySelector("
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
expect(body?.
|
|
113
|
+
const body = container.querySelector(".custom-body");
|
|
114
|
+
const scrollViews = body?.querySelectorAll("scroll-view");
|
|
115
|
+
|
|
116
|
+
expect(body?.tagName.toLowerCase()).toBe("view");
|
|
117
|
+
expect(body).toHaveStyle({ height: "200px" });
|
|
118
|
+
expect(bodyRef.current).not.toBeNull();
|
|
119
|
+
expect(scrollViews).toHaveLength(2);
|
|
120
|
+
expect(scrollViews?.item(0)).toHaveAttribute("scroll-orientation", "vertical");
|
|
121
|
+
expect(scrollViews?.item(1)).toHaveAttribute("scroll-orientation", "horizontal");
|
|
122
|
+
for (const scrollView of scrollViews ?? []) {
|
|
123
|
+
expect(scrollView).toHaveAttribute("scroll-bar-enable", "false");
|
|
124
|
+
expect(scrollView).not.toHaveAttribute("fading-edge-length");
|
|
125
|
+
}
|
|
111
126
|
});
|
|
112
127
|
|
|
113
128
|
it("renders Handle with a target-size touch area around the visual handle", () => {
|
|
@@ -392,26 +392,8 @@ function createTextSlot(
|
|
|
392
392
|
export interface BottomSheetHeaderProps extends BottomSheetSlotProps {}
|
|
393
393
|
export const BottomSheetHeader = createViewSlot("header");
|
|
394
394
|
BottomSheetHeader.displayName = "BottomSheetHeader";
|
|
395
|
-
|
|
396
395
|
export interface BottomSheetBodyProps extends BottomSheetSlotProps {}
|
|
397
|
-
export const BottomSheetBody
|
|
398
|
-
unknown,
|
|
399
|
-
BottomSheetBodyProps
|
|
400
|
-
>((props, ref) => {
|
|
401
|
-
const { children, className, style } = props;
|
|
402
|
-
const classNames = useClassNames();
|
|
403
|
-
|
|
404
|
-
return (
|
|
405
|
-
<scroll-view
|
|
406
|
-
{...(ref ? ({ ref: ref as LynxViewRef } as Record<string, unknown>) : {})}
|
|
407
|
-
scroll-y
|
|
408
|
-
className={clsx(classNames.body, className)}
|
|
409
|
-
style={style as never}
|
|
410
|
-
>
|
|
411
|
-
{children}
|
|
412
|
-
</scroll-view>
|
|
413
|
-
);
|
|
414
|
-
});
|
|
396
|
+
export const BottomSheetBody = createViewSlot("body");
|
|
415
397
|
BottomSheetBody.displayName = "BottomSheetBody";
|
|
416
398
|
|
|
417
399
|
export interface BottomSheetFooterProps extends BottomSheetSlotProps {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ChipTabsCarousel as Carousel,
|
|
3
|
+
ChipTabsCarouselCamera as CarouselCamera,
|
|
4
|
+
ChipTabsContent as Content,
|
|
5
|
+
ChipTabsList as List,
|
|
6
|
+
ChipTabsRoot as Root,
|
|
7
|
+
ChipTabsTrigger as Trigger,
|
|
8
|
+
type ChipTabsCarouselCameraProps as CarouselCameraProps,
|
|
9
|
+
type ChipTabsCarouselProps as CarouselProps,
|
|
10
|
+
type ChipTabsContentProps as ContentProps,
|
|
11
|
+
type ChipTabsListProps as ListProps,
|
|
12
|
+
type ChipTabsRootProps as RootProps,
|
|
13
|
+
type ChipTabsTriggerProps as TriggerProps,
|
|
14
|
+
} from "./ChipTabs";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as React from "@lynx-js/react";
|
|
2
|
+
|
|
3
|
+
import { chipTabs, type ChipTabsVariantProps } from "@seed-design/lynx-css/recipes/chip-tabs";
|
|
4
|
+
|
|
5
|
+
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
TabsCarousel,
|
|
9
|
+
TabsCarouselCamera,
|
|
10
|
+
TabsContent,
|
|
11
|
+
TabsList,
|
|
12
|
+
TabsRootPrimitive,
|
|
13
|
+
TabsTrigger,
|
|
14
|
+
type TabsCarouselCameraProps,
|
|
15
|
+
type TabsCarouselProps,
|
|
16
|
+
type TabsContentProps,
|
|
17
|
+
type TabsListProps,
|
|
18
|
+
type TabsRootProps,
|
|
19
|
+
type TabsTriggerProps,
|
|
20
|
+
} from "../Tabs/Tabs";
|
|
21
|
+
|
|
22
|
+
type ChipTabsRecipeState = Pick<
|
|
23
|
+
ChipTabsVariantProps,
|
|
24
|
+
"selected" | "pressed" | "disabled" | "inCarousel"
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
const CHIP_TABS_TRIGGER_GAP = 8;
|
|
28
|
+
const { ClassNamesProvider: ChipTabsClassNamesProvider } = createSlotRecipeContext(chipTabs);
|
|
29
|
+
|
|
30
|
+
type ChipTabsPublicVariantProps = Omit<
|
|
31
|
+
ChipTabsVariantProps,
|
|
32
|
+
"selected" | "pressed" | "disabled" | "inCarousel"
|
|
33
|
+
>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @platform Lynx
|
|
37
|
+
*
|
|
38
|
+
* 웹 대비 미지원 기능:
|
|
39
|
+
* - `lazyMount`, `unmountOnExit`: native viewpager가 모든 page slot을 유지해야 함
|
|
40
|
+
* - 키보드 포커스와 roving tabindex
|
|
41
|
+
*/
|
|
42
|
+
export interface ChipTabsRootProps
|
|
43
|
+
extends Omit<TabsRootProps, "size" | "contentLayout" | "stickyList" | "triggerLayout">,
|
|
44
|
+
ChipTabsPublicVariantProps {}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Chip recipe와 Tabs의 controlled state, horizontal scrolling, and native pager behavior를 결합합니다.
|
|
48
|
+
*/
|
|
49
|
+
export const ChipTabsRoot = React.forwardRef<unknown, ChipTabsRootProps>((props, ref) => {
|
|
50
|
+
const [variantProps, rootProps] = chipTabs.splitVariantProps(props);
|
|
51
|
+
const getClassNames = React.useCallback(
|
|
52
|
+
(state: ChipTabsRecipeState = {}) =>
|
|
53
|
+
chipTabs({
|
|
54
|
+
...variantProps,
|
|
55
|
+
selected: state.selected,
|
|
56
|
+
pressed: state.pressed,
|
|
57
|
+
disabled: state.disabled,
|
|
58
|
+
inCarousel: state.inCarousel,
|
|
59
|
+
}),
|
|
60
|
+
[variantProps],
|
|
61
|
+
);
|
|
62
|
+
const recipe = React.useMemo(
|
|
63
|
+
() => ({
|
|
64
|
+
getClassNames,
|
|
65
|
+
triggerGap: CHIP_TABS_TRIGGER_GAP,
|
|
66
|
+
}),
|
|
67
|
+
[getClassNames],
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<ChipTabsClassNamesProvider value={getClassNames()}>
|
|
72
|
+
<TabsRootPrimitive {...rootProps} ref={ref} recipe={recipe} inlineNotification />
|
|
73
|
+
</ChipTabsClassNamesProvider>
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
ChipTabsRoot.displayName = "ChipTabsRoot";
|
|
77
|
+
|
|
78
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
79
|
+
|
|
80
|
+
export interface ChipTabsListProps extends Omit<TabsListProps, "scrollAlign"> {
|
|
81
|
+
/** 선택한 chip을 목록 안에서 정렬할 방식입니다. @defaultValue "nearest" */
|
|
82
|
+
scrollAlign?: TabsListProps["scrollAlign"];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* ChipTabs는 이미 보이는 선택 chip을 움직이지 않도록 기본적으로 `"nearest"`를 사용합니다.
|
|
87
|
+
*/
|
|
88
|
+
export const ChipTabsList = React.forwardRef<unknown, ChipTabsListProps>(
|
|
89
|
+
({ scrollAlign = "nearest", ...props }, ref) => (
|
|
90
|
+
<TabsList {...props} ref={ref} scrollAlign={scrollAlign} />
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
ChipTabsList.displayName = "ChipTabsList";
|
|
94
|
+
|
|
95
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
96
|
+
|
|
97
|
+
/** Native text label and optional inline notification slot을 갖는 chip trigger입니다. */
|
|
98
|
+
export interface ChipTabsTriggerProps extends TabsTriggerProps {}
|
|
99
|
+
|
|
100
|
+
export const ChipTabsTrigger = TabsTrigger;
|
|
101
|
+
|
|
102
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
103
|
+
|
|
104
|
+
export interface ChipTabsContentProps extends TabsContentProps {}
|
|
105
|
+
|
|
106
|
+
export const ChipTabsContent = TabsContent;
|
|
107
|
+
|
|
108
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
109
|
+
|
|
110
|
+
/** @platform Lynx native viewpager를 사용하므로 Tabs Carousel의 미지원 prop과 동일합니다. */
|
|
111
|
+
export interface ChipTabsCarouselProps extends TabsCarouselProps {}
|
|
112
|
+
|
|
113
|
+
export const ChipTabsCarousel = TabsCarousel;
|
|
114
|
+
|
|
115
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
116
|
+
|
|
117
|
+
export interface ChipTabsCarouselCameraProps extends TabsCarouselCameraProps {}
|
|
118
|
+
|
|
119
|
+
export const ChipTabsCarouselCamera = TabsCarouselCamera;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ChipTabsCarousel,
|
|
3
|
+
ChipTabsCarouselCamera,
|
|
4
|
+
ChipTabsContent,
|
|
5
|
+
ChipTabsList,
|
|
6
|
+
ChipTabsRoot,
|
|
7
|
+
ChipTabsTrigger,
|
|
8
|
+
type ChipTabsCarouselCameraProps,
|
|
9
|
+
type ChipTabsCarouselProps,
|
|
10
|
+
type ChipTabsContentProps,
|
|
11
|
+
type ChipTabsListProps,
|
|
12
|
+
type ChipTabsRootProps,
|
|
13
|
+
type ChipTabsTriggerProps,
|
|
14
|
+
} from "./ChipTabs";
|
|
15
|
+
|
|
16
|
+
export * as ChipTabs from "./ChipTabs.namespace";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
import { fireEvent, getQueriesForElement, render } from "@lynx-js/react/testing-library";
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
|
+
|
|
5
|
+
import { ContextualFloatingButton } from "./ContextualFloatingButton";
|
|
6
|
+
|
|
7
|
+
function getRenderedRoot() {
|
|
8
|
+
const root = elementTree.root;
|
|
9
|
+
|
|
10
|
+
if (!root) {
|
|
11
|
+
throw new Error("Expected Lynx render root to exist.");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return root;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getContextualFloatingButtonRoot() {
|
|
18
|
+
const root = getRenderedRoot();
|
|
19
|
+
|
|
20
|
+
if (root.classList.contains("seed-contextual-floating-button__root")) return root;
|
|
21
|
+
|
|
22
|
+
const button = root.querySelector<HTMLElement>(".seed-contextual-floating-button__root");
|
|
23
|
+
if (!button) {
|
|
24
|
+
throw new Error("Expected ContextualFloatingButton root to exist.");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return button;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
describe("ContextualFloatingButton", () => {
|
|
31
|
+
it("preserves its label under the loading indicator while blocking taps", () => {
|
|
32
|
+
const onTap = vi.fn();
|
|
33
|
+
render(
|
|
34
|
+
<ContextualFloatingButton loading bindtap={onTap}>
|
|
35
|
+
저장하기
|
|
36
|
+
</ContextualFloatingButton>,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const root = getContextualFloatingButtonRoot();
|
|
40
|
+
|
|
41
|
+
expect(getQueriesForElement(getRenderedRoot()).getByText("저장하기")).toBeInTheDocument();
|
|
42
|
+
expect(root.querySelector(".seed-progress-circle__root")).toBeInTheDocument();
|
|
43
|
+
|
|
44
|
+
fireEvent.tap(root);
|
|
45
|
+
|
|
46
|
+
expect(onTap).not.toHaveBeenCalled();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("blocks taps and exposes disabled accessibility state when disabled", () => {
|
|
50
|
+
const onTap = vi.fn();
|
|
51
|
+
render(
|
|
52
|
+
<ContextualFloatingButton disabled bindtap={onTap}>
|
|
53
|
+
저장하기
|
|
54
|
+
</ContextualFloatingButton>,
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const root = getContextualFloatingButtonRoot();
|
|
58
|
+
fireEvent.tap(root);
|
|
59
|
+
|
|
60
|
+
expect(onTap).not.toHaveBeenCalled();
|
|
61
|
+
expect(root).toHaveAttribute("accessibility-traits", "disabled");
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import {
|
|
2
|
+
contextualFloatingButton,
|
|
3
|
+
type ContextualFloatingButtonVariantProps,
|
|
4
|
+
} from "@seed-design/lynx-css/recipes/contextual-floating-button";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import * as React from "@lynx-js/react";
|
|
7
|
+
|
|
8
|
+
import { usePressTap } from "../../hooks/usePressTap";
|
|
9
|
+
import { useScaleFeedback } from "../../hooks/useScaleFeedback";
|
|
10
|
+
import type {
|
|
11
|
+
LynxAccessibilityProps,
|
|
12
|
+
LynxElementProps,
|
|
13
|
+
LynxPressableProps,
|
|
14
|
+
LynxStyledElementProps,
|
|
15
|
+
LynxTouchProps,
|
|
16
|
+
LynxViewRef,
|
|
17
|
+
} from "../../types";
|
|
18
|
+
import { toArray } from "../../utils/children";
|
|
19
|
+
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context";
|
|
20
|
+
import { mergeProps } from "../../utils/merge-props";
|
|
21
|
+
import { IconRequired, IconSlotProvider, getIconSlotName } from "../Icon/Icon";
|
|
22
|
+
import { ProgressCircleRange, ProgressCircleRoot } from "../ProgressCircle";
|
|
23
|
+
|
|
24
|
+
const { ClassNamesProvider, useClassNames } = createSlotRecipeContext(contextualFloatingButton);
|
|
25
|
+
|
|
26
|
+
type ContextualFloatingButtonPublicVariantProps = Omit<
|
|
27
|
+
ContextualFloatingButtonVariantProps,
|
|
28
|
+
"pressed"
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
interface ContextualFloatingButtonRootProps
|
|
32
|
+
extends ContextualFloatingButtonVariantProps,
|
|
33
|
+
Omit<LynxStyledElementProps, "flatten">,
|
|
34
|
+
LynxTouchProps,
|
|
35
|
+
LynxAccessibilityProps {
|
|
36
|
+
flatten?: false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const ContextualFloatingButtonRoot = React.forwardRef<unknown, ContextualFloatingButtonRootProps>(
|
|
40
|
+
(innerProps, ref) => {
|
|
41
|
+
const [variantProps, otherProps] = contextualFloatingButton.splitVariantProps(innerProps);
|
|
42
|
+
const classNames = contextualFloatingButton(variantProps);
|
|
43
|
+
const { children, className, ...nativeProps } = otherProps;
|
|
44
|
+
const iconSlotContextValue = React.useMemo(
|
|
45
|
+
() => ({
|
|
46
|
+
classNames: {
|
|
47
|
+
icon: classNames.icon,
|
|
48
|
+
prefixIcon: classNames.prefixIcon,
|
|
49
|
+
},
|
|
50
|
+
deps: [
|
|
51
|
+
variantProps.variant ?? null,
|
|
52
|
+
variantProps.layout ?? null,
|
|
53
|
+
variantProps.pressed ?? false,
|
|
54
|
+
variantProps.disabled ?? false,
|
|
55
|
+
variantProps.loading ?? false,
|
|
56
|
+
],
|
|
57
|
+
}),
|
|
58
|
+
[
|
|
59
|
+
classNames.icon,
|
|
60
|
+
classNames.prefixIcon,
|
|
61
|
+
variantProps.variant,
|
|
62
|
+
variantProps.layout,
|
|
63
|
+
variantProps.pressed,
|
|
64
|
+
variantProps.disabled,
|
|
65
|
+
variantProps.loading,
|
|
66
|
+
],
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<ClassNamesProvider value={classNames}>
|
|
71
|
+
<IconSlotProvider value={iconSlotContextValue}>
|
|
72
|
+
<view
|
|
73
|
+
{...mergeProps(ref ? { ref: ref as LynxViewRef } : {}, nativeProps)}
|
|
74
|
+
className={clsx(classNames.root, className)}
|
|
75
|
+
>
|
|
76
|
+
{children}
|
|
77
|
+
</view>
|
|
78
|
+
</IconSlotProvider>
|
|
79
|
+
</ClassNamesProvider>
|
|
80
|
+
);
|
|
81
|
+
},
|
|
82
|
+
);
|
|
83
|
+
ContextualFloatingButtonRoot.displayName = "ContextualFloatingButtonRoot";
|
|
84
|
+
|
|
85
|
+
function ContextualFloatingButtonText({ children }: LynxElementProps) {
|
|
86
|
+
const classNames = useClassNames();
|
|
87
|
+
|
|
88
|
+
return <text className={classNames.text}>{children}</text>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function ContextualFloatingButtonContent({
|
|
92
|
+
children,
|
|
93
|
+
isIconOnly,
|
|
94
|
+
}: {
|
|
95
|
+
children: React.ReactNode;
|
|
96
|
+
isIconOnly: boolean;
|
|
97
|
+
}) {
|
|
98
|
+
const classNames = useClassNames();
|
|
99
|
+
const prefixIconChildren: React.ReactNode[] = [];
|
|
100
|
+
const iconChildren: React.ReactNode[] = [];
|
|
101
|
+
const textChildren: React.ReactNode[] = [];
|
|
102
|
+
|
|
103
|
+
for (const child of toArray(children)) {
|
|
104
|
+
const slotName = getIconSlotName(child);
|
|
105
|
+
|
|
106
|
+
if (slotName === "prefixIcon") {
|
|
107
|
+
prefixIconChildren.push(child);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (slotName === "icon") {
|
|
111
|
+
iconChildren.push(child);
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
textChildren.push(child);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<view className={classNames.content}>
|
|
120
|
+
{isIconOnly ? (
|
|
121
|
+
<>{iconChildren}</>
|
|
122
|
+
) : (
|
|
123
|
+
<>
|
|
124
|
+
{prefixIconChildren}
|
|
125
|
+
{textChildren.length > 0 ? (
|
|
126
|
+
<ContextualFloatingButtonText>{textChildren}</ContextualFloatingButtonText>
|
|
127
|
+
) : null}
|
|
128
|
+
</>
|
|
129
|
+
)}
|
|
130
|
+
</view>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function ContextualFloatingButtonLoadingIndicator() {
|
|
135
|
+
const classNames = useClassNames();
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<view className={classNames.loadingIndicator}>
|
|
139
|
+
<ProgressCircleRoot size="16" tone="inherit">
|
|
140
|
+
<ProgressCircleRange />
|
|
141
|
+
</ProgressCircleRoot>
|
|
142
|
+
</view>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @platform Lynx
|
|
148
|
+
*
|
|
149
|
+
* Web version differences:
|
|
150
|
+
* - Native `<view>` and `bindtap` / `main-thread:bindtap` replace HTML button events,
|
|
151
|
+
* form props, and `asChild`.
|
|
152
|
+
* - `loading` blocks both native tap callbacks, unlike the React reference which only
|
|
153
|
+
* exposes pending state to its underlying button.
|
|
154
|
+
*/
|
|
155
|
+
export interface ContextualFloatingButtonProps
|
|
156
|
+
extends ContextualFloatingButtonPublicVariantProps,
|
|
157
|
+
Omit<LynxStyledElementProps, "flatten">,
|
|
158
|
+
LynxPressableProps,
|
|
159
|
+
LynxAccessibilityProps {}
|
|
160
|
+
|
|
161
|
+
export const ContextualFloatingButton = React.forwardRef<unknown, ContextualFloatingButtonProps>(
|
|
162
|
+
(props, ref) => {
|
|
163
|
+
const [variantProps, otherProps] = contextualFloatingButton.splitVariantProps(props);
|
|
164
|
+
const {
|
|
165
|
+
children,
|
|
166
|
+
bindtap,
|
|
167
|
+
"main-thread:bindtap": mainThreadBindtap,
|
|
168
|
+
"accessibility-element": accessibilityElement = true,
|
|
169
|
+
"accessibility-label": accessibilityLabel,
|
|
170
|
+
"accessibility-role-description": accessibilityRoleDescription = "button",
|
|
171
|
+
"accessibility-traits": accessibilityTraits,
|
|
172
|
+
...nativeProps
|
|
173
|
+
} = otherProps;
|
|
174
|
+
const layout = variantProps.layout ?? "withText";
|
|
175
|
+
const disabled = variantProps.disabled ?? false;
|
|
176
|
+
const loading = variantProps.loading ?? false;
|
|
177
|
+
const isInteractive = !disabled && !loading;
|
|
178
|
+
|
|
179
|
+
if (
|
|
180
|
+
process.env.NODE_ENV !== "production" &&
|
|
181
|
+
layout === "iconOnly" &&
|
|
182
|
+
accessibilityElement &&
|
|
183
|
+
!accessibilityLabel
|
|
184
|
+
) {
|
|
185
|
+
console.warn(
|
|
186
|
+
'ContextualFloatingButton: `layout="iconOnly"` requires `accessibility-label` for accessibility.',
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const { pressed, bindtouchstart, bindtouchend, bindtouchcancel, ...pressTapHandlers } =
|
|
191
|
+
usePressTap({
|
|
192
|
+
disabled: !isInteractive,
|
|
193
|
+
onTap: bindtap,
|
|
194
|
+
mainThreadOnTap: mainThreadBindtap,
|
|
195
|
+
});
|
|
196
|
+
const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback({
|
|
197
|
+
disabled: !isInteractive,
|
|
198
|
+
onTouchStart: bindtouchstart,
|
|
199
|
+
onTouchEnd: bindtouchend,
|
|
200
|
+
onTouchCancel: bindtouchcancel,
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return (
|
|
204
|
+
<IconRequired enabled={layout === "iconOnly"}>
|
|
205
|
+
<ContextualFloatingButtonRoot
|
|
206
|
+
{...mergeProps(
|
|
207
|
+
{ ref },
|
|
208
|
+
scaleFeedbackTargetProps,
|
|
209
|
+
scaleFeedbackTriggerProps,
|
|
210
|
+
pressTapHandlers,
|
|
211
|
+
nativeProps,
|
|
212
|
+
)}
|
|
213
|
+
{...variantProps}
|
|
214
|
+
pressed={pressed}
|
|
215
|
+
accessibility-element={accessibilityElement}
|
|
216
|
+
accessibility-label={accessibilityLabel}
|
|
217
|
+
accessibility-role-description={accessibilityRoleDescription}
|
|
218
|
+
accessibility-traits={
|
|
219
|
+
accessibilityTraits ?? (disabled || loading ? "disabled" : undefined)
|
|
220
|
+
}
|
|
221
|
+
flatten={false}
|
|
222
|
+
>
|
|
223
|
+
{loading ? <ContextualFloatingButtonLoadingIndicator /> : null}
|
|
224
|
+
<ContextualFloatingButtonContent isIconOnly={layout === "iconOnly"}>
|
|
225
|
+
{children}
|
|
226
|
+
</ContextualFloatingButtonContent>
|
|
227
|
+
</ContextualFloatingButtonRoot>
|
|
228
|
+
</IconRequired>
|
|
229
|
+
);
|
|
230
|
+
},
|
|
231
|
+
);
|
|
232
|
+
ContextualFloatingButton.displayName = "ContextualFloatingButton";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export {
|
|
2
|
+
DialogAction as Action,
|
|
3
|
+
DialogBackdrop as Backdrop,
|
|
4
|
+
DialogBody as Body,
|
|
5
|
+
DialogContent as Content,
|
|
6
|
+
DialogDescription as Description,
|
|
7
|
+
DialogFooter as Footer,
|
|
8
|
+
DialogHeader as Header,
|
|
9
|
+
DialogPositioner as Positioner,
|
|
10
|
+
DialogRoot as Root,
|
|
11
|
+
DialogTitle as Title,
|
|
12
|
+
DialogTrigger as Trigger,
|
|
13
|
+
type DialogActionProps as ActionProps,
|
|
14
|
+
type DialogBackdropProps as BackdropProps,
|
|
15
|
+
type DialogBodyProps as BodyProps,
|
|
16
|
+
type DialogContentProps as ContentProps,
|
|
17
|
+
type DialogDescriptionProps as DescriptionProps,
|
|
18
|
+
type DialogFooterProps as FooterProps,
|
|
19
|
+
type DialogHeaderProps as HeaderProps,
|
|
20
|
+
type DialogPositionerProps as PositionerProps,
|
|
21
|
+
type DialogRootProps as RootProps,
|
|
22
|
+
type DialogTitleProps as TitleProps,
|
|
23
|
+
type DialogTriggerProps as TriggerProps,
|
|
24
|
+
} from "./Dialog";
|