@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,520 @@
|
|
|
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
|
+
import { toArray } from "../../utils/children.js";
|
|
4
|
+
import { mergeProps } from "../../utils/merge-props.js";
|
|
5
|
+
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
6
|
+
import { IconSlotProvider, InternalIcon } from "../Icon/Icon.jsx";
|
|
7
|
+
import { useFieldContext } from "../Field/context.js";
|
|
8
|
+
import * as React from "@lynx-js/react";
|
|
9
|
+
import clsx from "clsx";
|
|
10
|
+
import { attachmentInput } from "@seed-design/lynx-css/recipes/attachment-input";
|
|
11
|
+
import { attachmentInputItem } from "@seed-design/lynx-css/recipes/attachment-input-item";
|
|
12
|
+
import { attachmentInputTrigger } from "@seed-design/lynx-css/recipes/attachment-input-trigger";
|
|
13
|
+
//#region src/components/AttachmentInput/AttachmentInput.tsx
|
|
14
|
+
function pickNativeViewProps(props) {
|
|
15
|
+
return {
|
|
16
|
+
id: props.id,
|
|
17
|
+
flatten: props.flatten,
|
|
18
|
+
style: props.style,
|
|
19
|
+
"accessibility-label": props["accessibility-label"],
|
|
20
|
+
"accessibility-traits": props["accessibility-traits"],
|
|
21
|
+
"accessibility-element": props["accessibility-element"],
|
|
22
|
+
"accessibility-value": props["accessibility-value"],
|
|
23
|
+
"accessibility-role-description": props["accessibility-role-description"],
|
|
24
|
+
"accessibility-elements-hidden": props["accessibility-elements-hidden"],
|
|
25
|
+
"accessibility-heading": props["accessibility-heading"],
|
|
26
|
+
"accessibility-actions": props["accessibility-actions"],
|
|
27
|
+
"accessibility-exclusive-focus": props["accessibility-exclusive-focus"],
|
|
28
|
+
"ios-platform-accessibility-id": props["ios-platform-accessibility-id"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
var rootRecipe = createSlotRecipeContext(attachmentInput);
|
|
32
|
+
var triggerRecipe = createSlotRecipeContext(attachmentInputTrigger);
|
|
33
|
+
var itemRecipe = createSlotRecipeContext(attachmentInputItem);
|
|
34
|
+
var AttachmentInputContextObject = React.createContext(null);
|
|
35
|
+
var AttachmentInputItemContextObject = React.createContext(null);
|
|
36
|
+
function useAttachmentInputContext() {
|
|
37
|
+
const context = React.useContext(AttachmentInputContextObject);
|
|
38
|
+
if (!context) throw new Error("AttachmentInput components must be used within AttachmentInput.Root");
|
|
39
|
+
return context;
|
|
40
|
+
}
|
|
41
|
+
function useAttachmentInputItemContext() {
|
|
42
|
+
const context = React.useContext(AttachmentInputItemContextObject);
|
|
43
|
+
if (!context) throw new Error("AttachmentInput item components must be used within AttachmentInput.Item");
|
|
44
|
+
return context;
|
|
45
|
+
}
|
|
46
|
+
function isAcceptedType(file, accept) {
|
|
47
|
+
if (!accept) return true;
|
|
48
|
+
const patterns = (Array.isArray(accept) ? accept : accept.split(",")).map((value) => value.trim().toLowerCase()).filter(Boolean);
|
|
49
|
+
const fileName = file.name.toLowerCase();
|
|
50
|
+
const fileType = file.type.toLowerCase();
|
|
51
|
+
return patterns.some((pattern) => {
|
|
52
|
+
if (pattern.startsWith(".")) return fileName.endsWith(pattern);
|
|
53
|
+
if (pattern.endsWith("/*")) return fileType.startsWith(pattern.slice(0, -1));
|
|
54
|
+
if (pattern.includes("*")) {
|
|
55
|
+
const [type] = pattern.split("/");
|
|
56
|
+
return fileType.startsWith(`${type}/`);
|
|
57
|
+
}
|
|
58
|
+
return fileType === pattern;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function isImageAcceptPattern(pattern) {
|
|
62
|
+
if (pattern.startsWith("image/")) return true;
|
|
63
|
+
return [
|
|
64
|
+
".avif",
|
|
65
|
+
".bmp",
|
|
66
|
+
".gif",
|
|
67
|
+
".heic",
|
|
68
|
+
".heif",
|
|
69
|
+
".jpeg",
|
|
70
|
+
".jpg",
|
|
71
|
+
".png",
|
|
72
|
+
".webp"
|
|
73
|
+
].some((extension) => pattern === extension);
|
|
74
|
+
}
|
|
75
|
+
function getAcceptType(accept) {
|
|
76
|
+
if (!accept) return void 0;
|
|
77
|
+
const patterns = (Array.isArray(accept) ? accept : accept.split(",")).map((value) => value.trim().toLowerCase()).filter(Boolean);
|
|
78
|
+
return patterns.length > 0 && patterns.every(isImageAcceptPattern) ? "image" : void 0;
|
|
79
|
+
}
|
|
80
|
+
function formatFileSize(bytes) {
|
|
81
|
+
if (bytes === 0) return "0 B";
|
|
82
|
+
const units = [
|
|
83
|
+
"B",
|
|
84
|
+
"KB",
|
|
85
|
+
"MB",
|
|
86
|
+
"GB",
|
|
87
|
+
"TB"
|
|
88
|
+
];
|
|
89
|
+
const index = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
|
|
90
|
+
return `${Number.parseFloat((bytes / 1024 ** index).toFixed(1))} ${units[index]}`;
|
|
91
|
+
}
|
|
92
|
+
function useAttachmentInput(props = {}) {
|
|
93
|
+
const { acceptedFileEntries: value, defaultAcceptedFileEntries = [], onAcceptedFileEntriesChange, onFileAccept, onFileReject, accept, disabled: disabledProp, required: requiredProp, invalid: invalidProp, readOnly: readOnlyProp, maxFiles: maxFilesProp = 1, maxFileSize = Number.POSITIVE_INFINITY, minFileSize = 0, validate, onSelectFiles, onSelectError } = props;
|
|
94
|
+
const fieldContext = useFieldContext({ strict: false });
|
|
95
|
+
const disabled = disabledProp ?? fieldContext?.disabled ?? false;
|
|
96
|
+
const required = requiredProp ?? fieldContext?.required ?? false;
|
|
97
|
+
const invalid = invalidProp ?? fieldContext?.invalid ?? false;
|
|
98
|
+
const readOnly = readOnlyProp ?? fieldContext?.readOnly ?? false;
|
|
99
|
+
const maxFiles = Math.max(1, maxFilesProp);
|
|
100
|
+
const [acceptedFileEntries, setAcceptedFileEntries] = useControllableState({
|
|
101
|
+
value,
|
|
102
|
+
defaultValue: defaultAcceptedFileEntries,
|
|
103
|
+
onChange: onAcceptedFileEntriesChange
|
|
104
|
+
});
|
|
105
|
+
const entries = acceptedFileEntries ?? [];
|
|
106
|
+
const entriesRef = React.useRef(entries);
|
|
107
|
+
entriesRef.current = entries;
|
|
108
|
+
const optionsRef = React.useRef({
|
|
109
|
+
disabled,
|
|
110
|
+
readOnly,
|
|
111
|
+
accept,
|
|
112
|
+
maxFiles,
|
|
113
|
+
maxFileSize,
|
|
114
|
+
minFileSize,
|
|
115
|
+
validate,
|
|
116
|
+
onSelectFiles,
|
|
117
|
+
onSelectError,
|
|
118
|
+
onFileAccept,
|
|
119
|
+
onFileReject
|
|
120
|
+
});
|
|
121
|
+
optionsRef.current = {
|
|
122
|
+
disabled,
|
|
123
|
+
readOnly,
|
|
124
|
+
accept,
|
|
125
|
+
maxFiles,
|
|
126
|
+
maxFileSize,
|
|
127
|
+
minFileSize,
|
|
128
|
+
validate,
|
|
129
|
+
onSelectFiles,
|
|
130
|
+
onSelectError,
|
|
131
|
+
onFileAccept,
|
|
132
|
+
onFileReject
|
|
133
|
+
};
|
|
134
|
+
const idCounterRef = React.useRef(0);
|
|
135
|
+
const pickerRequestRef = React.useRef(0);
|
|
136
|
+
const mountedRef = React.useRef(true);
|
|
137
|
+
React.useEffect(() => {
|
|
138
|
+
return () => {
|
|
139
|
+
mountedRef.current = false;
|
|
140
|
+
pickerRequestRef.current += 1;
|
|
141
|
+
};
|
|
142
|
+
}, []);
|
|
143
|
+
const multiple = maxFiles > 1;
|
|
144
|
+
const maxFilesReached = entries.length >= maxFiles;
|
|
145
|
+
const triggerDisabled = disabled || readOnly || maxFilesReached;
|
|
146
|
+
const acceptType = getAcceptType(accept);
|
|
147
|
+
const updateFileEntryStatus = React.useCallback((id, details) => {
|
|
148
|
+
const next = entriesRef.current.map((entry) => entry.id === id ? {
|
|
149
|
+
...entry,
|
|
150
|
+
...details
|
|
151
|
+
} : entry);
|
|
152
|
+
entriesRef.current = next;
|
|
153
|
+
setAcceptedFileEntries(next);
|
|
154
|
+
}, [setAcceptedFileEntries]);
|
|
155
|
+
const validateFiles = React.useCallback((files) => {
|
|
156
|
+
const { accept: currentAccept, maxFileSize: currentMaxFileSize, minFileSize: currentMinFileSize, maxFiles: currentMaxFiles, validate: currentValidate } = optionsRef.current;
|
|
157
|
+
const accepted = [];
|
|
158
|
+
const rejected = [];
|
|
159
|
+
let addedCount = 0;
|
|
160
|
+
for (const file of files) {
|
|
161
|
+
const errors = [];
|
|
162
|
+
if (entriesRef.current.length + addedCount >= currentMaxFiles) errors.push("TOO_MANY_FILES");
|
|
163
|
+
if (!isAcceptedType(file, currentAccept)) errors.push("INVALID_TYPE");
|
|
164
|
+
if (file.size > currentMaxFileSize) errors.push("FILE_TOO_LARGE");
|
|
165
|
+
if (file.size < currentMinFileSize) errors.push("FILE_TOO_SMALL");
|
|
166
|
+
const customErrors = currentValidate?.(file);
|
|
167
|
+
if (customErrors) errors.push(...customErrors);
|
|
168
|
+
if (errors.length > 0) rejected.push({
|
|
169
|
+
file,
|
|
170
|
+
errors
|
|
171
|
+
});
|
|
172
|
+
else {
|
|
173
|
+
accepted.push(file);
|
|
174
|
+
addedCount += 1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
accepted,
|
|
179
|
+
rejected
|
|
180
|
+
};
|
|
181
|
+
}, []);
|
|
182
|
+
const setFileEntries = React.useCallback((files) => {
|
|
183
|
+
const currentOptions = optionsRef.current;
|
|
184
|
+
if (currentOptions.disabled || currentOptions.readOnly) return;
|
|
185
|
+
const { accepted, rejected } = validateFiles(files);
|
|
186
|
+
const acceptedEntries = accepted.map((file) => ({
|
|
187
|
+
id: `attachment-${Date.now()}-${++idCounterRef.current}`,
|
|
188
|
+
file,
|
|
189
|
+
status: "pending"
|
|
190
|
+
}));
|
|
191
|
+
if (acceptedEntries.length > 0) {
|
|
192
|
+
const acceptedForCallback = currentOptions.maxFiles > 1 ? acceptedEntries : [acceptedEntries[0]];
|
|
193
|
+
const nextEntries = currentOptions.maxFiles > 1 ? [...entriesRef.current, ...acceptedEntries] : acceptedForCallback;
|
|
194
|
+
entriesRef.current = nextEntries;
|
|
195
|
+
setAcceptedFileEntries(nextEntries);
|
|
196
|
+
currentOptions.onFileAccept?.(acceptedForCallback, { updateFileEntryStatus });
|
|
197
|
+
}
|
|
198
|
+
if (rejected.length > 0) currentOptions.onFileReject?.(rejected);
|
|
199
|
+
}, [
|
|
200
|
+
setAcceptedFileEntries,
|
|
201
|
+
updateFileEntryStatus,
|
|
202
|
+
validateFiles
|
|
203
|
+
]);
|
|
204
|
+
const openFilePicker = React.useCallback(() => {
|
|
205
|
+
const currentOptions = optionsRef.current;
|
|
206
|
+
if (currentOptions.disabled || currentOptions.readOnly || entriesRef.current.length >= currentOptions.maxFiles) return;
|
|
207
|
+
const picker = currentOptions.onSelectFiles;
|
|
208
|
+
if (!picker) return;
|
|
209
|
+
const requestId = ++pickerRequestRef.current;
|
|
210
|
+
let result;
|
|
211
|
+
try {
|
|
212
|
+
result = picker();
|
|
213
|
+
} catch (error) {
|
|
214
|
+
currentOptions.onSelectError?.(error);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
Promise.resolve(result).then((files) => {
|
|
218
|
+
if (!mountedRef.current || requestId !== pickerRequestRef.current) return;
|
|
219
|
+
if (!Array.isArray(files) || files.length === 0) return;
|
|
220
|
+
if (optionsRef.current.disabled || optionsRef.current.readOnly) return;
|
|
221
|
+
setFileEntries(files);
|
|
222
|
+
}).catch((error) => {
|
|
223
|
+
if (mountedRef.current && requestId === pickerRequestRef.current) optionsRef.current.onSelectError?.(error);
|
|
224
|
+
});
|
|
225
|
+
}, [setFileEntries]);
|
|
226
|
+
const removeFileEntry = React.useCallback((id) => {
|
|
227
|
+
if (optionsRef.current.readOnly) return;
|
|
228
|
+
const next = entriesRef.current.filter((entry) => entry.id !== id);
|
|
229
|
+
entriesRef.current = next;
|
|
230
|
+
setAcceptedFileEntries(next);
|
|
231
|
+
}, [setAcceptedFileEntries]);
|
|
232
|
+
const clearFileEntries = React.useCallback(() => {
|
|
233
|
+
if (optionsRef.current.readOnly) return;
|
|
234
|
+
entriesRef.current = [];
|
|
235
|
+
setAcceptedFileEntries([]);
|
|
236
|
+
}, [setAcceptedFileEntries]);
|
|
237
|
+
const reorderFileEntry = React.useCallback((fromIndex, toIndex) => {
|
|
238
|
+
if (optionsRef.current.disabled || optionsRef.current.readOnly) return;
|
|
239
|
+
const currentEntries = entriesRef.current;
|
|
240
|
+
if (fromIndex < 0 || toIndex < 0 || fromIndex >= currentEntries.length || toIndex >= currentEntries.length || fromIndex === toIndex) return;
|
|
241
|
+
const next = [...currentEntries];
|
|
242
|
+
const [entry] = next.splice(fromIndex, 1);
|
|
243
|
+
next.splice(toIndex, 0, entry);
|
|
244
|
+
entriesRef.current = next;
|
|
245
|
+
setAcceptedFileEntries(next);
|
|
246
|
+
}, [setAcceptedFileEntries]);
|
|
247
|
+
const stateProps = {
|
|
248
|
+
"data-disabled": triggerDisabled,
|
|
249
|
+
"data-readonly": readOnly,
|
|
250
|
+
"data-invalid": invalid,
|
|
251
|
+
"data-required": required
|
|
252
|
+
};
|
|
253
|
+
return {
|
|
254
|
+
...props,
|
|
255
|
+
acceptedFileEntries: entries,
|
|
256
|
+
currentFileEntryCount: entries.length,
|
|
257
|
+
acceptType,
|
|
258
|
+
multiple,
|
|
259
|
+
maxFiles,
|
|
260
|
+
disabled,
|
|
261
|
+
required,
|
|
262
|
+
invalid,
|
|
263
|
+
readOnly,
|
|
264
|
+
triggerDisabled,
|
|
265
|
+
stateProps,
|
|
266
|
+
openFilePicker,
|
|
267
|
+
setFileEntries,
|
|
268
|
+
updateFileEntryStatus,
|
|
269
|
+
removeFileEntry,
|
|
270
|
+
clearFileEntries,
|
|
271
|
+
reorderFileEntry
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
var AttachmentInputRoot = React.forwardRef((props, forwardedRef) => {
|
|
275
|
+
const [variantProps, otherProps] = attachmentInput.splitVariantProps(props);
|
|
276
|
+
const { children, className, acceptedFileEntries, defaultAcceptedFileEntries, onAcceptedFileEntriesChange, onFileReject, onFileAccept, accept, disabled, required, invalid, readOnly, maxFiles, maxFileSize, minFileSize, validate, onSelectFiles, onSelectError } = otherProps;
|
|
277
|
+
const api = useAttachmentInput({
|
|
278
|
+
acceptedFileEntries,
|
|
279
|
+
defaultAcceptedFileEntries,
|
|
280
|
+
onAcceptedFileEntriesChange,
|
|
281
|
+
onFileReject,
|
|
282
|
+
onFileAccept,
|
|
283
|
+
accept,
|
|
284
|
+
disabled,
|
|
285
|
+
required,
|
|
286
|
+
invalid,
|
|
287
|
+
readOnly,
|
|
288
|
+
maxFiles,
|
|
289
|
+
maxFileSize,
|
|
290
|
+
minFileSize,
|
|
291
|
+
validate,
|
|
292
|
+
onSelectFiles,
|
|
293
|
+
onSelectError
|
|
294
|
+
});
|
|
295
|
+
const classes = attachmentInput(variantProps);
|
|
296
|
+
return <AttachmentInputContextObject.Provider value={api}>
|
|
297
|
+
<rootRecipe.ClassNamesProvider value={classes}>
|
|
298
|
+
<view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, api.stateProps, pickNativeViewProps(props))} className={clsx(classes.root, className)}>
|
|
299
|
+
{children}
|
|
300
|
+
</view>
|
|
301
|
+
</rootRecipe.ClassNamesProvider>
|
|
302
|
+
</AttachmentInputContextObject.Provider>;
|
|
303
|
+
});
|
|
304
|
+
AttachmentInputRoot.displayName = "AttachmentInputRoot";
|
|
305
|
+
var AttachmentInputContainer = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
306
|
+
const classes = rootRecipe.useClassNames();
|
|
307
|
+
return <scroll-view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} scroll-orientation="horizontal" scroll-bar-enable={false} className={clsx(classes.container, className)}>
|
|
308
|
+
<view className={classes.containerContent}>{children}</view>
|
|
309
|
+
</scroll-view>;
|
|
310
|
+
});
|
|
311
|
+
AttachmentInputContainer.displayName = "AttachmentInputContainer";
|
|
312
|
+
var AttachmentInputItemGroup = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
313
|
+
const classes = rootRecipe.useClassNames();
|
|
314
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.itemGroup, className)}>
|
|
315
|
+
{children}
|
|
316
|
+
</view>;
|
|
317
|
+
});
|
|
318
|
+
AttachmentInputItemGroup.displayName = "AttachmentInputItemGroup";
|
|
319
|
+
var AttachmentInputTrigger = React.forwardRef((props, forwardedRef) => {
|
|
320
|
+
const [variantProps, restProps] = attachmentInputTrigger.splitVariantProps(props);
|
|
321
|
+
const { children, className, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...nativeProps } = restProps;
|
|
322
|
+
const context = useAttachmentInputContext();
|
|
323
|
+
const press = usePressTap({
|
|
324
|
+
disabled: context.triggerDisabled,
|
|
325
|
+
onTap: (event) => {
|
|
326
|
+
context.openFilePicker();
|
|
327
|
+
bindtap?.(event);
|
|
328
|
+
},
|
|
329
|
+
mainThreadOnTap: mainThreadBindtap
|
|
330
|
+
});
|
|
331
|
+
const classes = attachmentInputTrigger({
|
|
332
|
+
...variantProps,
|
|
333
|
+
pressed: press.pressed,
|
|
334
|
+
disabled: context.triggerDisabled
|
|
335
|
+
});
|
|
336
|
+
return <triggerRecipe.ClassNamesProvider value={classes}>
|
|
337
|
+
<view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, press, nativeProps)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits ?? (context.triggerDisabled ? "disabled" : "button")} className={clsx(classes.root, className)}>
|
|
338
|
+
{children}
|
|
339
|
+
</view>
|
|
340
|
+
</triggerRecipe.ClassNamesProvider>;
|
|
341
|
+
});
|
|
342
|
+
AttachmentInputTrigger.displayName = "AttachmentInputTrigger";
|
|
343
|
+
var AttachmentInputTriggerIcon = React.forwardRef(({ image, general, children, className, ...nativeProps }, forwardedRef) => {
|
|
344
|
+
const context = useAttachmentInputContext();
|
|
345
|
+
const classes = attachmentInputTrigger({
|
|
346
|
+
pressed: false,
|
|
347
|
+
disabled: context.triggerDisabled
|
|
348
|
+
});
|
|
349
|
+
const icon = context.acceptType === "image" ? image ?? children : general ?? children;
|
|
350
|
+
if (!React.isValidElement(icon)) return null;
|
|
351
|
+
return <triggerRecipe.ClassNamesProvider value={classes}>
|
|
352
|
+
<InternalIcon icon={icon} {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.icon, className)} />
|
|
353
|
+
</triggerRecipe.ClassNamesProvider>;
|
|
354
|
+
});
|
|
355
|
+
AttachmentInputTriggerIcon.displayName = "AttachmentInputTriggerIcon";
|
|
356
|
+
var AttachmentInputTriggerItemCount = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
357
|
+
const context = useAttachmentInputContext();
|
|
358
|
+
const classes = attachmentInputTrigger({
|
|
359
|
+
pressed: false,
|
|
360
|
+
disabled: context.triggerDisabled
|
|
361
|
+
});
|
|
362
|
+
return <triggerRecipe.ClassNamesProvider value={classes}>
|
|
363
|
+
<view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.itemCountArea, className)}>
|
|
364
|
+
<text className={classes.itemCount}>{context.currentFileEntryCount}</text>
|
|
365
|
+
<text className={classes.maxItemCount}>/{context.maxFiles}</text>
|
|
366
|
+
{children}
|
|
367
|
+
</view>
|
|
368
|
+
</triggerRecipe.ClassNamesProvider>;
|
|
369
|
+
});
|
|
370
|
+
AttachmentInputTriggerItemCount.displayName = "AttachmentInputTriggerItemCount";
|
|
371
|
+
var AttachmentInputItem = React.forwardRef(({ fileEntry, children, className, ...props }, forwardedRef) => {
|
|
372
|
+
const root = useAttachmentInputContext();
|
|
373
|
+
const [variantProps] = attachmentInputItem.splitVariantProps(props);
|
|
374
|
+
const type = variantProps.type ?? root.acceptType ?? "general";
|
|
375
|
+
const classes = attachmentInputItem({
|
|
376
|
+
...variantProps,
|
|
377
|
+
type,
|
|
378
|
+
disabled: root.disabled,
|
|
379
|
+
readOnly: root.readOnly,
|
|
380
|
+
pressed: false,
|
|
381
|
+
dragging: variantProps.dragging ?? false
|
|
382
|
+
});
|
|
383
|
+
const imageSource = fileEntry.file.previewUrl ?? fileEntry.file.uri;
|
|
384
|
+
const itemContext = {
|
|
385
|
+
...fileEntry,
|
|
386
|
+
imageProps: type === "image" && imageSource ? {
|
|
387
|
+
src: imageSource,
|
|
388
|
+
alt: fileEntry.file.name
|
|
389
|
+
} : void 0,
|
|
390
|
+
removeButtonProps: { bindtap: () => {
|
|
391
|
+
if (!root.readOnly) root.removeFileEntry(fileEntry.id);
|
|
392
|
+
} }
|
|
393
|
+
};
|
|
394
|
+
return <AttachmentInputItemContextObject.Provider value={itemContext}>
|
|
395
|
+
<itemRecipe.ClassNamesProvider value={classes}>
|
|
396
|
+
<view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, root.stateProps, pickNativeViewProps(props))} className={clsx(classes.root, className)}>
|
|
397
|
+
{children}
|
|
398
|
+
</view>
|
|
399
|
+
</itemRecipe.ClassNamesProvider>
|
|
400
|
+
</AttachmentInputItemContextObject.Provider>;
|
|
401
|
+
});
|
|
402
|
+
AttachmentInputItem.displayName = "AttachmentInputItem";
|
|
403
|
+
var AttachmentInputItemName = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
404
|
+
const item = useAttachmentInputItemContext();
|
|
405
|
+
const classes = itemRecipe.useClassNames();
|
|
406
|
+
return <text {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} text-maxline="1" className={clsx(classes.name, className)}>
|
|
407
|
+
{children ?? item.file.name}
|
|
408
|
+
</text>;
|
|
409
|
+
});
|
|
410
|
+
AttachmentInputItemName.displayName = "AttachmentInputItemName";
|
|
411
|
+
var AttachmentInputItemSize = React.forwardRef(({ children, className, formatBytes = formatFileSize, ...nativeProps }, forwardedRef) => {
|
|
412
|
+
const item = useAttachmentInputItemContext();
|
|
413
|
+
const classes = itemRecipe.useClassNames();
|
|
414
|
+
return <text {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.size, className)}>
|
|
415
|
+
{children ?? formatBytes(item.file.size)}
|
|
416
|
+
</text>;
|
|
417
|
+
});
|
|
418
|
+
AttachmentInputItemSize.displayName = "AttachmentInputItemSize";
|
|
419
|
+
var AttachmentInputItemSurface = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
420
|
+
const classes = itemRecipe.useClassNames();
|
|
421
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.surface, className)}>
|
|
422
|
+
{children}
|
|
423
|
+
</view>;
|
|
424
|
+
});
|
|
425
|
+
AttachmentInputItemSurface.displayName = "AttachmentInputItemSurface";
|
|
426
|
+
var AttachmentInputItemImage = React.forwardRef(({ className, "accessibility-label": accessibilityLabel, ...nativeProps }, forwardedRef) => {
|
|
427
|
+
const item = useAttachmentInputItemContext();
|
|
428
|
+
const classes = itemRecipe.useClassNames();
|
|
429
|
+
if (!item.imageProps) return null;
|
|
430
|
+
return <image {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} src={item.imageProps.src} accessibility-label={accessibilityLabel ?? item.imageProps.alt} className={clsx(classes.image, className)} />;
|
|
431
|
+
});
|
|
432
|
+
AttachmentInputItemImage.displayName = "AttachmentInputItemImage";
|
|
433
|
+
var AttachmentInputItemThumbnail = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
434
|
+
const classes = itemRecipe.useClassNames();
|
|
435
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.thumbnail, className)}>
|
|
436
|
+
<IconSlotProvider value={{ classNames: { icon: classes.thumbnailIcon } }}>
|
|
437
|
+
{children}
|
|
438
|
+
</IconSlotProvider>
|
|
439
|
+
</view>;
|
|
440
|
+
});
|
|
441
|
+
AttachmentInputItemThumbnail.displayName = "AttachmentInputItemThumbnail";
|
|
442
|
+
var AttachmentInputItemMetadata = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
443
|
+
const classes = itemRecipe.useClassNames();
|
|
444
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.metadata, className)}>
|
|
445
|
+
{children}
|
|
446
|
+
</view>;
|
|
447
|
+
});
|
|
448
|
+
AttachmentInputItemMetadata.displayName = "AttachmentInputItemMetadata";
|
|
449
|
+
var AttachmentInputItemBadge = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
|
|
450
|
+
const classes = itemRecipe.useClassNames();
|
|
451
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.badge, className)}>
|
|
452
|
+
<text className={classes.badgeLabel}>{children}</text>
|
|
453
|
+
</view>;
|
|
454
|
+
});
|
|
455
|
+
AttachmentInputItemBadge.displayName = "AttachmentInputItemBadge";
|
|
456
|
+
var AttachmentInputItemActionButton = React.forwardRef(({ children, className, bindtap, ...nativeProps }, forwardedRef) => {
|
|
457
|
+
const classes = itemRecipe.useClassNames();
|
|
458
|
+
const actionChildren = toArray(children).map((child) => {
|
|
459
|
+
if (typeof child === "string" || typeof child === "number") return <text className={classes.actionLabel}>{child}</text>;
|
|
460
|
+
return child;
|
|
461
|
+
});
|
|
462
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps, { bindtap })} className={clsx(classes.actionButton, className)}>
|
|
463
|
+
<IconSlotProvider value={{ classNames: { icon: classes.actionIcon } }}>
|
|
464
|
+
{actionChildren}
|
|
465
|
+
</IconSlotProvider>
|
|
466
|
+
</view>;
|
|
467
|
+
});
|
|
468
|
+
AttachmentInputItemActionButton.displayName = "AttachmentInputItemActionButton";
|
|
469
|
+
var AttachmentInputItemBackdrop = React.forwardRef(({ status, children, className, ...nativeProps }, forwardedRef) => {
|
|
470
|
+
const entry = useAttachmentInputItemContext();
|
|
471
|
+
const classes = itemRecipe.useClassNames();
|
|
472
|
+
if (entry.status !== status) return null;
|
|
473
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.backdrop, className)}>
|
|
474
|
+
{typeof children === "function" ? children(entry) : children}
|
|
475
|
+
</view>;
|
|
476
|
+
});
|
|
477
|
+
AttachmentInputItemBackdrop.displayName = "AttachmentInputItemBackdrop";
|
|
478
|
+
var AttachmentInputItemRemoveButton = React.forwardRef((props, forwardedRef) => {
|
|
479
|
+
const { children, className, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...nativeProps } = props;
|
|
480
|
+
const item = useAttachmentInputItemContext();
|
|
481
|
+
const context = useAttachmentInputContext();
|
|
482
|
+
const press = usePressTap({
|
|
483
|
+
disabled: context.readOnly,
|
|
484
|
+
onTap: (event) => {
|
|
485
|
+
context.removeFileEntry(item.id);
|
|
486
|
+
bindtap?.(event);
|
|
487
|
+
},
|
|
488
|
+
mainThreadOnTap: mainThreadBindtap
|
|
489
|
+
});
|
|
490
|
+
const classes = itemRecipe.useClassNames();
|
|
491
|
+
return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, press, nativeProps)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits ?? (context.readOnly ? "disabled" : "button")} className={clsx(classes.removeButton, className)}>
|
|
492
|
+
<IconSlotProvider value={{ classNames: { icon: classes.removeIcon } }}>
|
|
493
|
+
{children}
|
|
494
|
+
</IconSlotProvider>
|
|
495
|
+
</view>;
|
|
496
|
+
});
|
|
497
|
+
AttachmentInputItemRemoveButton.displayName = "AttachmentInputItemRemoveButton";
|
|
498
|
+
var AttachmentInputContext = ({ children }) => children(useAttachmentInputContext());
|
|
499
|
+
var AttachmentInput = {
|
|
500
|
+
Root: AttachmentInputRoot,
|
|
501
|
+
Container: AttachmentInputContainer,
|
|
502
|
+
ItemGroup: AttachmentInputItemGroup,
|
|
503
|
+
Trigger: AttachmentInputTrigger,
|
|
504
|
+
TriggerIcon: AttachmentInputTriggerIcon,
|
|
505
|
+
TriggerItemCount: AttachmentInputTriggerItemCount,
|
|
506
|
+
Item: AttachmentInputItem,
|
|
507
|
+
ItemName: AttachmentInputItemName,
|
|
508
|
+
ItemSize: AttachmentInputItemSize,
|
|
509
|
+
ItemImage: AttachmentInputItemImage,
|
|
510
|
+
ItemThumbnail: AttachmentInputItemThumbnail,
|
|
511
|
+
ItemMetadata: AttachmentInputItemMetadata,
|
|
512
|
+
ItemBadge: AttachmentInputItemBadge,
|
|
513
|
+
ItemActionButton: AttachmentInputItemActionButton,
|
|
514
|
+
ItemBackdrop: AttachmentInputItemBackdrop,
|
|
515
|
+
ItemRemoveButton: AttachmentInputItemRemoveButton,
|
|
516
|
+
ItemSurface: AttachmentInputItemSurface,
|
|
517
|
+
Context: AttachmentInputContext
|
|
518
|
+
};
|
|
519
|
+
//#endregion
|
|
520
|
+
export { AttachmentInput, AttachmentInputContainer, AttachmentInputContext, AttachmentInputItem, AttachmentInputItemActionButton, AttachmentInputItemBackdrop, AttachmentInputItemBadge, AttachmentInputItemGroup, AttachmentInputItemImage, AttachmentInputItemMetadata, AttachmentInputItemName, AttachmentInputItemRemoveButton, AttachmentInputItemSize, AttachmentInputItemSurface, AttachmentInputItemThumbnail, AttachmentInputRoot, AttachmentInputTrigger, AttachmentInputTriggerIcon, AttachmentInputTriggerItemCount, useAttachmentInput, useAttachmentInputContext, useAttachmentInputItemContext };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AttachmentInput, AttachmentInputRoot, AttachmentInputContainer, AttachmentInputItemGroup, AttachmentInputTrigger, AttachmentInputTriggerIcon, AttachmentInputTriggerItemCount, AttachmentInputItem, AttachmentInputItemName, AttachmentInputItemSize, AttachmentInputItemImage, AttachmentInputItemThumbnail, AttachmentInputItemMetadata, AttachmentInputItemBadge, AttachmentInputItemActionButton, AttachmentInputItemBackdrop, AttachmentInputItemSurface, AttachmentInputItemRemoveButton, AttachmentInputContext, useAttachmentInput, useAttachmentInputContext, useAttachmentInputItemContext, type NativeFile, type AttachmentFileError, type AttachmentFileRejection, type AttachmentFileStatusDetails, type AttachmentFileEntry, type AttachmentInputProps, type AttachmentInputStateProps, type AttachmentInputContextValue, type AttachmentInputRootProps, type AttachmentInputContainerProps, type AttachmentInputItemGroupProps, type AttachmentInputTriggerProps, type AttachmentInputTriggerIconProps, type AttachmentInputTriggerItemCountProps, type AttachmentInputItemProps, type AttachmentInputItemNameProps, type AttachmentInputItemSizeProps, type AttachmentInputItemSurfaceProps, type AttachmentInputItemImageProps, type AttachmentInputItemThumbnailProps, type AttachmentInputItemMetadataProps, type AttachmentInputItemBadgeProps, type AttachmentInputItemBackdropProps, type AttachmentInputItemActionButtonProps, type AttachmentInputItemRemoveButtonProps, } from './AttachmentInput';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,+BAA+B,EAC/B,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,EAC7B,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,GAC1C,MAAM,mBAAmB,CAAC"}
|
|
@@ -73,7 +73,7 @@ export interface BottomSheetHeaderProps extends BottomSheetSlotProps {
|
|
|
73
73
|
export declare const BottomSheetHeader: LynxForwardRefComponent<unknown, BottomSheetSlotProps>;
|
|
74
74
|
export interface BottomSheetBodyProps extends BottomSheetSlotProps {
|
|
75
75
|
}
|
|
76
|
-
export declare const BottomSheetBody: LynxForwardRefComponent<unknown,
|
|
76
|
+
export declare const BottomSheetBody: LynxForwardRefComponent<unknown, BottomSheetSlotProps>;
|
|
77
77
|
export interface BottomSheetFooterProps extends BottomSheetSlotProps {
|
|
78
78
|
}
|
|
79
79
|
export declare const BottomSheetFooter: LynxForwardRefComponent<unknown, BottomSheetSlotProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAML,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAKrB,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,yBAAyB,CAC5D,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CACtC,CAAC;AAmEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,MAAM,WAAW,oBACf,SAAQ,uBAAuB,EAC7B,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;IAC/D;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,uBAAuB,CAAC,YAAY,EAAE,oBAAoB,CA6CpF,CAAC;AAOL,MAAM,WAAW,uBACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC;CAAG;AAE1C,eAAO,MAAM,kBAAkB,EAAE,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,CA+BrF,CAAC;AAOL,MAAM,WAAW,0BAA2B,SAAQ,cAAc;CAAG;AAErE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,CACpB,CAAC;AAY5E,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;CAAG;AAEvE,eAAO,MAAM,mBAAmB,EAAE,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,CAChB,CAAC;AAG5E,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;CAAG;AAErE,eAAO,MAAM,kBAAkB,EAAE,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,CAsCrF,CAAC;AAOL,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAEnE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAW7E;yBAXe,iBAAiB;;;AAwBjC,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;CAAG;AA0CvE,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;CAAG;AACvE,eAAO,MAAM,iBAAiB,wDAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAML,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAKrB,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,yBAAyB,CAC5D,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CACtC,CAAC;AAmEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,MAAM,WAAW,oBACf,SAAQ,uBAAuB,EAC7B,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;IAC/D;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,uBAAuB,CAAC,YAAY,EAAE,oBAAoB,CA6CpF,CAAC;AAOL,MAAM,WAAW,uBACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC;CAAG;AAE1C,eAAO,MAAM,kBAAkB,EAAE,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,CA+BrF,CAAC;AAOL,MAAM,WAAW,0BAA2B,SAAQ,cAAc;CAAG;AAErE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,CACpB,CAAC;AAY5E,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;CAAG;AAEvE,eAAO,MAAM,mBAAmB,EAAE,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,CAChB,CAAC;AAG5E,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;CAAG;AAErE,eAAO,MAAM,kBAAkB,EAAE,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,CAsCrF,CAAC;AAOL,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAEnE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAW7E;yBAXe,iBAAiB;;;AAwBjC,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;CAAG;AA0CvE,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;CAAG;AACvE,eAAO,MAAM,iBAAiB,wDAA2B,CAAC;AAE1D,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;CAAG;AACrE,eAAO,MAAM,eAAe,wDAAyB,CAAC;AAGtD,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;CAAG;AACvE,eAAO,MAAM,iBAAiB,wDAA2B,CAAC;AAG1D,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;CAAG;AACtE,eAAO,MAAM,gBAAgB,wDAA0B,CAAC;AAGxD,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;CAAG;AAC5E,eAAO,MAAM,sBAAsB,wDAAgC,CAAC"}
|
|
@@ -148,13 +148,7 @@ function createTextSlot(slotName) {
|
|
|
148
148
|
}
|
|
149
149
|
var BottomSheetHeader = createViewSlot("header");
|
|
150
150
|
BottomSheetHeader.displayName = "BottomSheetHeader";
|
|
151
|
-
var BottomSheetBody =
|
|
152
|
-
const { children, className, style } = props;
|
|
153
|
-
const classNames = useClassNames();
|
|
154
|
-
return <scroll-view {...ref ? { ref } : {}} scroll-y className={clsx(classNames.body, className)} style={style}>
|
|
155
|
-
{children}
|
|
156
|
-
</scroll-view>;
|
|
157
|
-
});
|
|
151
|
+
var BottomSheetBody = createViewSlot("body");
|
|
158
152
|
BottomSheetBody.displayName = "BottomSheetBody";
|
|
159
153
|
var BottomSheetFooter = createViewSlot("footer");
|
|
160
154
|
BottomSheetFooter.displayName = "BottomSheetFooter";
|
|
@@ -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 { mergeProps } from "../../utils/merge-props.js";
|
|
5
5
|
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
@@ -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 { mergeProps } from "../../utils/merge-props.js";
|
|
5
5
|
import { InternalIcon } from "../Icon/Icon.jsx";
|
|
@@ -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 { mergeProps } from "../../utils/merge-props.js";
|
|
5
5
|
import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChipTabsVariantProps } from '@seed-design/lynx-css/recipes/chip-tabs';
|
|
2
|
+
import { TabsCarouselCameraProps, TabsCarouselProps, TabsContentProps, TabsListProps, TabsRootProps, TabsTriggerProps } from '../Tabs/Tabs';
|
|
3
|
+
import * as React from "@lynx-js/react";
|
|
4
|
+
type ChipTabsPublicVariantProps = Omit<ChipTabsVariantProps, "selected" | "pressed" | "disabled" | "inCarousel">;
|
|
5
|
+
/**
|
|
6
|
+
* @platform Lynx
|
|
7
|
+
*
|
|
8
|
+
* 웹 대비 미지원 기능:
|
|
9
|
+
* - `lazyMount`, `unmountOnExit`: native viewpager가 모든 page slot을 유지해야 함
|
|
10
|
+
* - 키보드 포커스와 roving tabindex
|
|
11
|
+
*/
|
|
12
|
+
export interface ChipTabsRootProps extends Omit<TabsRootProps, "size" | "contentLayout" | "stickyList" | "triggerLayout">, ChipTabsPublicVariantProps {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Chip recipe와 Tabs의 controlled state, horizontal scrolling, and native pager behavior를 결합합니다.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ChipTabsRoot: React.ForwardRefExoticComponent<ChipTabsRootProps & React.RefAttributes<unknown>>;
|
|
18
|
+
export interface ChipTabsListProps extends Omit<TabsListProps, "scrollAlign"> {
|
|
19
|
+
/** 선택한 chip을 목록 안에서 정렬할 방식입니다. @defaultValue "nearest" */
|
|
20
|
+
scrollAlign?: TabsListProps["scrollAlign"];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* ChipTabs는 이미 보이는 선택 chip을 움직이지 않도록 기본적으로 `"nearest"`를 사용합니다.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ChipTabsList: React.ForwardRefExoticComponent<Omit<ChipTabsListProps, "ref"> & React.RefAttributes<unknown>>;
|
|
26
|
+
/** Native text label and optional inline notification slot을 갖는 chip trigger입니다. */
|
|
27
|
+
export interface ChipTabsTriggerProps extends TabsTriggerProps {
|
|
28
|
+
}
|
|
29
|
+
export declare const ChipTabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<unknown>>;
|
|
30
|
+
export interface ChipTabsContentProps extends TabsContentProps {
|
|
31
|
+
}
|
|
32
|
+
export declare const ChipTabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<unknown>>;
|
|
33
|
+
/** @platform Lynx native viewpager를 사용하므로 Tabs Carousel의 미지원 prop과 동일합니다. */
|
|
34
|
+
export interface ChipTabsCarouselProps extends TabsCarouselProps {
|
|
35
|
+
}
|
|
36
|
+
export declare const ChipTabsCarousel: React.ForwardRefExoticComponent<TabsCarouselProps & React.RefAttributes<unknown>>;
|
|
37
|
+
export interface ChipTabsCarouselCameraProps extends TabsCarouselCameraProps {
|
|
38
|
+
}
|
|
39
|
+
export declare const ChipTabsCarouselCamera: React.ForwardRefExoticComponent<TabsCarouselCameraProps & React.RefAttributes<unknown>>;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=ChipTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChipTabs.d.ts","sourceRoot":"","sources":["../../../src/components/ChipTabs/ChipTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAI9F,OAAO,EAOL,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAUtB,KAAK,0BAA0B,GAAG,IAAI,CACpC,oBAAoB,EACpB,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CACnD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,eAAe,GAAG,YAAY,GAAG,eAAe,CAAC,EACpF,0BAA0B;CAAG;AAEjC;;GAEG;AACH,eAAO,MAAM,YAAY,mFA0BvB,CAAC;AAKH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC;IAC3E,0DAA0D;IAC1D,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CAC5C;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,gGAIxB,CAAC;AAKF,mFAAmF;AACnF,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;CAAG;AAEjE,eAAO,MAAM,eAAe,kFAAc,CAAC;AAI3C,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;CAAG;AAEjE,eAAO,MAAM,eAAe,kFAAc,CAAC;AAI3C,6EAA6E;AAC7E,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;CAAG;AAEnE,eAAO,MAAM,gBAAgB,mFAAe,CAAC;AAI7C,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;CAAG;AAE/E,eAAO,MAAM,sBAAsB,yFAAqB,CAAC"}
|