@seed-design/lynx-react 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Accordion/Accordion.d.ts.map +1 -1
- package/lib/components/Accordion/Accordion.jsx +24 -14
- package/lib/components/ActionButton/ActionButton.d.ts +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts.map +1 -1
- package/lib/components/ActionButton/ActionButton.jsx +12 -4
- package/lib/components/AppBar/AppBar.d.ts.map +1 -1
- package/lib/components/AppBar/AppBar.jsx +9 -8
- package/lib/components/Badge/Badge.d.ts.map +1 -1
- package/lib/components/Badge/Badge.jsx +2 -1
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.jsx +9 -9
- package/lib/components/Box/Box.d.ts.map +1 -1
- package/lib/components/Box/Box.jsx +2 -1
- package/lib/components/Callout/Callout.d.ts +2 -2
- package/lib/components/Callout/Callout.d.ts.map +1 -1
- package/lib/components/Callout/Callout.jsx +20 -10
- package/lib/components/Checkbox/Checkbox.d.ts +4 -2
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.jsx +33 -17
- package/lib/components/Chip/Chip.d.ts +1 -1
- package/lib/components/Chip/Chip.d.ts.map +1 -1
- package/lib/components/Chip/Chip.jsx +36 -16
- package/lib/components/Count/Count.d.ts +7 -0
- package/lib/components/Count/Count.d.ts.map +1 -0
- package/lib/components/Count/Count.jsx +19 -0
- package/lib/components/Count/index.d.ts +2 -0
- package/lib/components/Count/index.d.ts.map +1 -0
- package/lib/components/Divider/Divider.d.ts.map +1 -1
- package/lib/components/Divider/Divider.jsx +2 -1
- package/lib/components/Field/Field.d.ts.map +1 -1
- package/lib/components/Field/Field.jsx +11 -15
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.jsx +4 -3
- package/lib/components/InputButton/InputButton.d.ts +40 -0
- package/lib/components/InputButton/InputButton.d.ts.map +1 -0
- package/lib/components/InputButton/InputButton.jsx +118 -0
- package/lib/components/InputButton/InputButton.namespace.d.ts +2 -0
- package/lib/components/InputButton/InputButton.namespace.d.ts.map +1 -0
- package/lib/components/InputButton/InputButton.namespace.js +16 -0
- package/lib/components/InputButton/index.d.ts +3 -0
- package/lib/components/InputButton/index.d.ts.map +1 -0
- package/lib/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.d.ts.map +1 -1
- package/lib/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.jsx +12 -8
- package/lib/components/List/List.d.ts +51 -0
- package/lib/components/List/List.d.ts.map +1 -0
- package/lib/components/List/List.jsx +176 -0
- package/lib/components/List/List.namespace.d.ts +2 -0
- package/lib/components/List/List.namespace.d.ts.map +1 -0
- package/lib/components/List/List.namespace.js +18 -0
- package/lib/components/List/index.d.ts +3 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/MannerTemp/MannerTemp.d.ts.map +1 -1
- package/lib/components/MannerTemp/MannerTemp.jsx +3 -2
- package/lib/components/MannerTempBadge/MannerTempBadge.d.ts.map +1 -1
- package/lib/components/MannerTempBadge/MannerTempBadge.jsx +2 -1
- package/lib/components/Menu/Menu.d.ts +69 -0
- package/lib/components/Menu/Menu.d.ts.map +1 -0
- package/lib/components/Menu/Menu.jsx +520 -0
- package/lib/components/Menu/Menu.namespace.d.ts +2 -0
- package/lib/components/Menu/Menu.namespace.d.ts.map +1 -0
- package/lib/components/Menu/Menu.namespace.js +21 -0
- package/lib/components/Menu/index.d.ts +3 -0
- package/lib/components/Menu/index.d.ts.map +1 -0
- package/lib/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
- package/lib/components/NotificationBadge/NotificationBadge.jsx +3 -2
- package/lib/components/PageBanner/PageBanner.d.ts +5 -5
- package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
- package/lib/components/PageBanner/PageBanner.jsx +25 -14
- package/lib/components/ProgressCircle/ProgressCircle.d.ts +2 -2
- package/lib/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
- package/lib/components/ProgressCircle/ProgressCircle.jsx +4 -3
- package/lib/components/RadioGroup/RadioGroup.d.ts +5 -3
- package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.jsx +22 -9
- package/lib/components/ReactionButton/ReactionButton.d.ts +20 -0
- package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -0
- package/lib/components/ReactionButton/ReactionButton.jsx +88 -0
- package/lib/components/ReactionButton/index.d.ts +2 -0
- package/lib/components/ReactionButton/index.d.ts.map +1 -0
- package/lib/components/ScaleFeedback/ScaleFeedback.d.ts +11 -0
- package/lib/components/ScaleFeedback/ScaleFeedback.d.ts.map +1 -0
- package/lib/components/ScaleFeedback/ScaleFeedback.jsx +16 -0
- package/lib/components/ScaleFeedback/index.d.ts +2 -0
- package/lib/components/ScaleFeedback/index.d.ts.map +1 -0
- package/lib/components/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/lib/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/components/SegmentedControl/SegmentedControl.jsx +23 -10
- package/lib/components/SelectBox/SelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/SelectBox.jsx +23 -13
- package/lib/components/Stack/Stack.d.ts.map +1 -1
- package/lib/components/Stack/Stack.jsx +2 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts +85 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.jsx +256 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts +2 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.js +24 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts +3 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts.map +1 -0
- package/lib/components/Switch/Switch.d.ts +27 -3
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.jsx +22 -9
- package/lib/components/Tabs/Tabs.d.ts +4 -2
- package/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.jsx +37 -22
- package/lib/components/TagGroup/TagGroup.d.ts.map +1 -1
- package/lib/components/TagGroup/TagGroup.jsx +4 -3
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/lib/components/Text/Text.jsx +2 -1
- package/lib/components/TextField/TextField.d.ts.map +1 -1
- package/lib/components/TextField/TextField.jsx +35 -23
- package/lib/components/index.d.ts +7 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/private/Positioning.d.ts +69 -0
- package/lib/components/private/Positioning.d.ts.map +1 -0
- package/lib/components/private/Positioning.js +109 -0
- package/lib/components/private/TrackPositioning.d.ts +22 -0
- package/lib/components/private/TrackPositioning.d.ts.map +1 -0
- package/lib/contexts/ScaleFeedbackContentContext.d.ts +4 -0
- package/lib/contexts/ScaleFeedbackContentContext.d.ts.map +1 -0
- package/lib/contexts/ScaleFeedbackContentContext.js +6 -0
- package/lib/contexts/index.d.ts +2 -0
- package/lib/contexts/index.d.ts.map +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useIconColor.d.ts.map +1 -1
- package/lib/hooks/useIconColor.js +8 -3
- package/lib/hooks/usePressTap.d.ts +4 -3
- package/lib/hooks/usePressTap.d.ts.map +1 -1
- package/lib/hooks/useScaleFeedback.d.ts +48 -0
- package/lib/hooks/useScaleFeedback.d.ts.map +1 -0
- package/lib/hooks/useScaleFeedback.js +108 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +17 -3
- package/lib/node_modules/.bun/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +493 -0
- package/lib/node_modules/.bun/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +114 -0
- package/lib/utils/calculate-scale-feedback.d.ts +5 -0
- package/lib/utils/calculate-scale-feedback.d.ts.map +1 -0
- package/lib/utils/calculate-scale-feedback.js +13 -0
- package/lib/utils/compose-event-handlers.d.ts +5 -0
- package/lib/utils/compose-event-handlers.d.ts.map +1 -0
- package/lib/utils/compose-event-handlers.js +16 -0
- package/lib/utils/create-slot-recipe-context.d.ts.map +1 -1
- package/lib/utils/create-slot-recipe-context.jsx +6 -16
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/merge-props.d.ts +15 -0
- package/lib/utils/merge-props.d.ts.map +1 -0
- package/lib/utils/merge-props.js +36 -0
- package/lib/utils/merge-refs.d.ts +8 -0
- package/lib/utils/merge-refs.d.ts.map +1 -0
- package/lib/utils/merge-refs.js +38 -0
- package/package.json +6 -5
- package/src/components/Accordion/Accordion.tsx +36 -27
- package/src/components/ActionButton/ActionButton.tsx +27 -12
- package/src/components/AppBar/AppBar.tsx +17 -18
- package/src/components/Badge/Badge.tsx +2 -2
- package/src/components/BottomSheet/BottomSheet.tsx +9 -17
- package/src/components/Box/Box.tsx +2 -2
- package/src/components/Callout/Callout.tsx +39 -22
- package/src/components/Checkbox/Checkbox.test.tsx +44 -0
- package/src/components/Checkbox/Checkbox.tsx +52 -21
- package/src/components/Chip/Chip.test.tsx +50 -1
- package/src/components/Chip/Chip.tsx +75 -31
- package/src/components/Count/Count.tsx +35 -0
- package/src/components/Count/index.ts +1 -0
- package/src/components/Divider/Divider.tsx +2 -2
- package/src/components/Field/Field.tsx +15 -28
- package/src/components/Icon/Icon.test.tsx +4 -6
- package/src/components/Icon/Icon.tsx +14 -7
- package/src/components/InputButton/InputButton.namespace.ts +20 -0
- package/src/components/InputButton/InputButton.test.tsx +82 -0
- package/src/components/InputButton/InputButton.tsx +295 -0
- package/src/components/InputButton/index.ts +2 -0
- package/src/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.tsx +16 -21
- package/src/components/List/List.namespace.ts +24 -0
- package/src/components/List/List.test.tsx +162 -0
- package/src/components/List/List.tsx +476 -0
- package/src/components/List/index.ts +3 -0
- package/src/components/MannerTemp/MannerTemp.tsx +3 -4
- package/src/components/MannerTempBadge/MannerTempBadge.tsx +2 -2
- package/src/components/Menu/Menu.namespace.ts +26 -0
- package/src/components/Menu/Menu.tsx +883 -0
- package/src/components/Menu/index.ts +31 -0
- package/src/components/NotificationBadge/NotificationBadge.tsx +4 -9
- package/src/components/PageBanner/PageBanner.test.tsx +3 -0
- package/src/components/PageBanner/PageBanner.tsx +54 -45
- package/src/components/ProgressCircle/ProgressCircle.test.tsx +48 -0
- package/src/components/ProgressCircle/ProgressCircle.tsx +22 -3
- package/src/components/RadioGroup/RadioGroup.test.tsx +87 -0
- package/src/components/RadioGroup/RadioGroup.tsx +50 -14
- package/src/components/ReactionButton/ReactionButton.test.tsx +122 -0
- package/src/components/ReactionButton/ReactionButton.tsx +139 -0
- package/src/components/ReactionButton/index.ts +1 -0
- package/src/components/ScaleFeedback/ScaleFeedback.test.tsx +41 -0
- package/src/components/ScaleFeedback/ScaleFeedback.tsx +32 -0
- package/src/components/ScaleFeedback/index.ts +1 -0
- package/src/components/SegmentedControl/SegmentedControl.test.tsx +15 -3
- package/src/components/SegmentedControl/SegmentedControl.tsx +35 -14
- package/src/components/SelectBox/SelectBox.test.tsx +39 -1
- package/src/components/SelectBox/SelectBox.tsx +27 -16
- package/src/components/Stack/Stack.tsx +2 -2
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.ts +37 -0
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.test.tsx +258 -0
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +655 -0
- package/src/components/SwipeableMenuSheet/index.ts +43 -0
- package/src/components/Switch/Switch.test.tsx +57 -0
- package/src/components/Switch/Switch.tsx +60 -16
- package/src/components/Tabs/Tabs.test.tsx +19 -0
- package/src/components/Tabs/Tabs.tsx +72 -40
- package/src/components/TagGroup/TagGroup.tsx +4 -6
- package/src/components/Text/Text.tsx +2 -2
- package/src/components/TextField/TextField.tsx +60 -54
- package/src/components/index.ts +7 -0
- package/src/components/private/Positioning.test.ts +235 -0
- package/src/components/private/Positioning.ts +223 -0
- package/src/components/private/TrackPositioning.test.ts +58 -0
- package/src/components/private/TrackPositioning.ts +37 -0
- package/src/contexts/ScaleFeedbackContentContext.ts +4 -0
- package/src/contexts/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useIconColor.test.ts +4 -4
- package/src/hooks/useIconColor.ts +13 -6
- package/src/hooks/usePressTap.ts +4 -3
- package/src/hooks/useScaleFeedback.integration.test.tsx +85 -0
- package/src/hooks/useScaleFeedback.test.ts +50 -0
- package/src/hooks/useScaleFeedback.ts +199 -0
- package/src/index.ts +1 -0
- package/src/utils/calculate-scale-feedback.ts +12 -0
- package/src/utils/compose-event-handlers.ts +16 -0
- package/src/utils/create-slot-recipe-context.tsx +6 -7
- package/src/utils/index.ts +1 -0
- package/src/utils/merge-props.test.tsx +152 -0
- package/src/utils/merge-props.ts +62 -0
- package/src/utils/merge-refs.ts +44 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { arrow, computePosition as computePosition$1, flip, limitShift, offset, shift, size } from "../../node_modules/.bun/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js";
|
|
2
|
+
//#region src/components/private/Positioning.ts
|
|
3
|
+
function getTransformOrigin(placement) {
|
|
4
|
+
const [side, align] = placement.split("-");
|
|
5
|
+
const crossOrigin = align === "start" ? "0%" : align === "end" ? "100%" : "50%";
|
|
6
|
+
return side === "top" ? `${crossOrigin} 100%` : side === "bottom" ? `${crossOrigin} 0%` : side === "left" ? `100% ${crossOrigin}` : `0% ${crossOrigin}`;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 모든 좌표와 크기는 동일한 화면 기준 논리 px입니다.
|
|
10
|
+
* boundary의 safe area 보정과 결과의 컨테이너 상대 좌표 변환은 호출자 책임입니다.
|
|
11
|
+
*
|
|
12
|
+
* availableWidth로 너비를 제한했다면 줄바꿈 후 실제 높이를 다시 측정해 호출합니다.
|
|
13
|
+
* native 측정·호출 주기·오래된 비동기 결과 폐기는 이 순수 계산에 포함하지 않습니다.
|
|
14
|
+
*/
|
|
15
|
+
async function computePosition({ reference, boundary, width, height, placement, gutter, overflowPadding, flip: flipOptions = {}, shift: shiftOptions = {}, size: sizeOptions, arrow: arrowOptions }) {
|
|
16
|
+
const referenceElement = { rect: {
|
|
17
|
+
x: reference.left,
|
|
18
|
+
y: reference.top,
|
|
19
|
+
width: reference.width,
|
|
20
|
+
height: reference.height
|
|
21
|
+
} };
|
|
22
|
+
const floatingElement = { dimensions: {
|
|
23
|
+
width: Math.max(0, width),
|
|
24
|
+
height: Math.max(0, height)
|
|
25
|
+
} };
|
|
26
|
+
const arrowElement = arrowOptions ? {
|
|
27
|
+
width: arrowOptions.size,
|
|
28
|
+
height: arrowOptions.size
|
|
29
|
+
} : void 0;
|
|
30
|
+
const clippingRect = {
|
|
31
|
+
x: boundary.left,
|
|
32
|
+
y: boundary.top,
|
|
33
|
+
width: boundary.width,
|
|
34
|
+
height: boundary.height
|
|
35
|
+
};
|
|
36
|
+
const maximumHeight = floatingElement.dimensions.height;
|
|
37
|
+
let availableWidth = 0;
|
|
38
|
+
let availableHeight = 0;
|
|
39
|
+
const platform = {
|
|
40
|
+
getElementRects: () => ({
|
|
41
|
+
reference: referenceElement.rect,
|
|
42
|
+
floating: {
|
|
43
|
+
x: 0,
|
|
44
|
+
y: 0,
|
|
45
|
+
...floatingElement.dimensions
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
getClippingRect: () => clippingRect,
|
|
49
|
+
getDimensions: (element) => element === arrowElement && arrowElement ? arrowElement : floatingElement.dimensions,
|
|
50
|
+
isElement: () => true,
|
|
51
|
+
isRTL: () => false
|
|
52
|
+
};
|
|
53
|
+
const heightMiddleware = sizeOptions && size({
|
|
54
|
+
padding: overflowPadding,
|
|
55
|
+
apply({ availableHeight }) {
|
|
56
|
+
floatingElement.dimensions.height = Math.min(maximumHeight, Math.max(0, sizeOptions.minimumHeight ?? 0, availableHeight));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
const result = await computePosition$1(referenceElement, floatingElement, {
|
|
60
|
+
placement,
|
|
61
|
+
strategy: "absolute",
|
|
62
|
+
platform,
|
|
63
|
+
middleware: [
|
|
64
|
+
offset(gutter + (arrowOptions?.tipHeight ?? 0)),
|
|
65
|
+
sizeOptions?.order === "beforeFlip" && heightMiddleware,
|
|
66
|
+
flipOptions !== false && flip({
|
|
67
|
+
...flipOptions,
|
|
68
|
+
padding: overflowPadding
|
|
69
|
+
}),
|
|
70
|
+
shiftOptions !== false && shift({
|
|
71
|
+
mainAxis: shiftOptions.mainAxis,
|
|
72
|
+
crossAxis: shiftOptions.crossAxis,
|
|
73
|
+
padding: overflowPadding,
|
|
74
|
+
limiter: shiftOptions.limit ? limitShift() : void 0
|
|
75
|
+
}),
|
|
76
|
+
sizeOptions?.order === "afterShift" && heightMiddleware,
|
|
77
|
+
arrowElement && arrow({
|
|
78
|
+
element: arrowElement,
|
|
79
|
+
padding: arrowOptions?.padding
|
|
80
|
+
}),
|
|
81
|
+
size({
|
|
82
|
+
padding: overflowPadding,
|
|
83
|
+
apply(available) {
|
|
84
|
+
availableWidth = Math.max(0, available.availableWidth);
|
|
85
|
+
availableHeight = Math.max(0, available.availableHeight);
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
const resolvedPlacement = result.placement;
|
|
91
|
+
const arrow$1 = result.middlewareData.arrow;
|
|
92
|
+
return {
|
|
93
|
+
left: result.x,
|
|
94
|
+
top: result.y,
|
|
95
|
+
width: floatingElement.dimensions.width,
|
|
96
|
+
height: floatingElement.dimensions.height,
|
|
97
|
+
placement: resolvedPlacement,
|
|
98
|
+
transformOrigin: getTransformOrigin(resolvedPlacement),
|
|
99
|
+
availableWidth,
|
|
100
|
+
availableHeight,
|
|
101
|
+
...arrow$1 && { arrow: {
|
|
102
|
+
left: arrow$1.x,
|
|
103
|
+
top: arrow$1.y,
|
|
104
|
+
centerOffset: arrow$1.centerOffset
|
|
105
|
+
} }
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { computePosition };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TrackPositioningOptions {
|
|
2
|
+
/** 최솟값이 0, 최댓값이 1인 값의 비율입니다. 범위 밖이면 양 끝에 고정합니다. */
|
|
3
|
+
progress: number;
|
|
4
|
+
trackWidth: number;
|
|
5
|
+
thumbWidth: number;
|
|
6
|
+
labelWidth: number;
|
|
7
|
+
direction?: "ltr" | "rtl";
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 트랙 왼쪽 기준 논리 px로 thumb 중심과 label 왼쪽 좌표를 계산합니다.
|
|
11
|
+
* arrowCenter는 label 왼쪽 기준이며 화살표 너비의 절반을 빼서 배치합니다.
|
|
12
|
+
* 트랙보다 넓은 label은 중앙에 두고 양쪽으로 넘치게 합니다.
|
|
13
|
+
*
|
|
14
|
+
* 각 thumb에 대해 호출하며, 측정값을 재사용할 수 있는 동기식 계산입니다.
|
|
15
|
+
* MTS에서는 이 모듈을 runtime: 'shared'로 import하고 native 측정은 별도로 수행합니다.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getTrackPosition({ progress, trackWidth, thumbWidth, labelWidth, direction, }: TrackPositioningOptions): {
|
|
18
|
+
thumbCenter: number;
|
|
19
|
+
labelLeft: number;
|
|
20
|
+
arrowCenter: number;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=TrackPositioning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrackPositioning.d.ts","sourceRoot":"","sources":["../../../src/components/private/TrackPositioning.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAiB,GAClB,EAAE,uBAAuB;;;;EAazB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScaleFeedbackContentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ScaleFeedbackContentContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE7D,iGAAiG;AACjG,eAAO,MAAM,2BAA2B,EAAE,OAAO,CAAC,OAAO,CAAwB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createContext } from "@lynx-js/react";
|
|
2
|
+
//#region src/contexts/ScaleFeedbackContentContext.ts
|
|
3
|
+
/** @internal Prevents controls inside an animated content layer from binding a second target. */
|
|
4
|
+
var ScaleFeedbackContentContext = createContext(false);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ScaleFeedbackContentContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
package/lib/hooks/index.d.ts
CHANGED
package/lib/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIconColor.d.ts","sourceRoot":"","sources":["../../src/hooks/useIconColor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAOhE,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"useIconColor.d.ts","sourceRoot":"","sources":["../../src/hooks/useIconColor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAOhE,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA2DD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,cAAc,EACpB,OAAO,CAAC,EAAE,mBAAmB,GAC5B;IACD,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,0BAA0B,EAAE,MAAM,IAAI,CAAC;CACxC,CA6BA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runOnMainThread, useEffect, useGlobalProps, useMainThreadRef } from "@lynx-js/react";
|
|
1
|
+
import { runOnMainThread, useEffect, useGlobalProps, useMainThreadRef, useRef } from "@lynx-js/react";
|
|
2
2
|
//#region src/hooks/useIconColor.ts
|
|
3
3
|
function syncTintColorOnce(targetRef, sourceRef) {
|
|
4
4
|
"main thread";
|
|
@@ -16,11 +16,11 @@ function scheduleTintColorSync(targetRef, sourceRef, frameRef) {
|
|
|
16
16
|
cancelAnimationFrame(frameRef.current);
|
|
17
17
|
frameRef.current = 0;
|
|
18
18
|
}
|
|
19
|
+
syncTintColorOnce(targetRef, sourceRef);
|
|
19
20
|
if (typeof requestAnimationFrame === "function") frameRef.current = requestAnimationFrame(() => {
|
|
20
21
|
frameRef.current = 0;
|
|
21
22
|
syncTintColorOnce(targetRef, sourceRef);
|
|
22
23
|
});
|
|
23
|
-
else syncTintColorOnce(targetRef, sourceRef);
|
|
24
24
|
}
|
|
25
25
|
function cancelTintColorSync(frameRef) {
|
|
26
26
|
"main thread";
|
|
@@ -45,12 +45,17 @@ function useIconColor(deps, options) {
|
|
|
45
45
|
const enabled = options?.enabled ?? true;
|
|
46
46
|
const frameRef = useMainThreadRef(0);
|
|
47
47
|
const theme = useGlobalProps()?.theme;
|
|
48
|
+
const hasMountedRef = useRef(false);
|
|
48
49
|
function syncOnUiAppear() {
|
|
49
50
|
"main thread";
|
|
50
51
|
if (!enabled) return;
|
|
51
|
-
|
|
52
|
+
scheduleTintColorSync(ref, sourceRef, frameRef);
|
|
52
53
|
}
|
|
53
54
|
useEffect(() => {
|
|
55
|
+
if (!hasMountedRef.current) {
|
|
56
|
+
hasMountedRef.current = true;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
54
59
|
if (!enabled) return;
|
|
55
60
|
runOnMainThread(scheduleTintColorSync)(ref, sourceRef, frameRef);
|
|
56
61
|
return () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseTouchEvent, EventHandler, Target } from '@lynx-js/types';
|
|
2
2
|
import { LynxTouchProps } from '../types';
|
|
3
3
|
type TouchHandler = EventHandler<BaseTouchEvent<Target>>;
|
|
4
|
+
type PressStateHandler = TouchHandler & (() => void);
|
|
4
5
|
export interface UsePressTapOptions {
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
onTap?: TouchHandler;
|
|
@@ -9,9 +10,9 @@ export interface UsePressTapOptions {
|
|
|
9
10
|
export interface UsePressTapReturn {
|
|
10
11
|
pressed: boolean;
|
|
11
12
|
bindtap: TouchHandler;
|
|
12
|
-
bindtouchstart:
|
|
13
|
-
bindtouchend:
|
|
14
|
-
bindtouchcancel:
|
|
13
|
+
bindtouchstart: PressStateHandler;
|
|
14
|
+
bindtouchend: PressStateHandler;
|
|
15
|
+
bindtouchcancel: PressStateHandler;
|
|
15
16
|
"main-thread:bindtap"?: LynxTouchProps["main-thread:bindtap"];
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePressTap.d.ts","sourceRoot":"","sources":["../../src/hooks/usePressTap.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"usePressTap.d.ts","sourceRoot":"","sources":["../../src/hooks/usePressTap.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;AACzD,KAAK,iBAAiB,GAAG,YAAY,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,eAAe,CAAC,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,cAAc,EAAE,iBAAiB,CAAC;IAClC,YAAY,EAAE,iBAAiB,CAAC;IAChC,eAAe,EAAE,iBAAiB,CAAC;IACnC,qBAAqB,CAAC,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,iBAAiB,CA2B/E"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LynxViewProps } from '../types';
|
|
2
|
+
type MainThreadLayoutChangeHandler = NonNullable<LynxViewProps["main-thread:bindlayoutchange"]>;
|
|
3
|
+
type MainThreadTouchHandler = NonNullable<LynxViewProps["main-thread:bindtouchstart"]>;
|
|
4
|
+
export interface UseScaleFeedbackOptions {
|
|
5
|
+
/** Disables Scale Feedback while the target is not interactive. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Runs on the Background Thread immediately after Main Thread touchstart. */
|
|
8
|
+
onTouchStart?: () => void;
|
|
9
|
+
/** Runs on the Background Thread immediately after Main Thread touchend. */
|
|
10
|
+
onTouchEnd?: () => void;
|
|
11
|
+
/** Runs on the Background Thread immediately after Main Thread touchcancel. */
|
|
12
|
+
onTouchCancel?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ScaleFeedbackTriggerProps {
|
|
15
|
+
"main-thread:bindtouchstart": MainThreadTouchHandler;
|
|
16
|
+
"main-thread:bindtouchend": MainThreadTouchHandler;
|
|
17
|
+
"main-thread:bindtouchcancel": MainThreadTouchHandler;
|
|
18
|
+
}
|
|
19
|
+
/** The target's transform is owned by Scale Feedback; use a separate layer for other transforms. */
|
|
20
|
+
export interface ScaleFeedbackTargetProps {
|
|
21
|
+
flatten: false;
|
|
22
|
+
"main-thread:ref": NonNullable<LynxViewProps["main-thread:ref"]>;
|
|
23
|
+
"main-thread:bindlayoutchange": MainThreadLayoutChangeHandler;
|
|
24
|
+
}
|
|
25
|
+
export interface UseScaleFeedbackReturn {
|
|
26
|
+
/** Spread onto the element that receives touch events. */
|
|
27
|
+
scaleFeedbackTriggerProps: ScaleFeedbackTriggerProps;
|
|
28
|
+
/** Spread onto the element that is measured and scaled. */
|
|
29
|
+
scaleFeedbackTargetProps: ScaleFeedbackTargetProps;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Applies SEED Scale Feedback on the Lynx Main Thread.
|
|
33
|
+
*
|
|
34
|
+
* Spread `scaleFeedbackTriggerProps` onto the element that receives touch
|
|
35
|
+
* events and `scaleFeedbackTargetProps` onto the element that should scale.
|
|
36
|
+
* Applying both objects to one element creates Self Scale; applying them to
|
|
37
|
+
* separate elements creates Content Scale.
|
|
38
|
+
*
|
|
39
|
+
* The target's transform is owned by this hook. Use a separate content layer
|
|
40
|
+
* when the element already uses translate, rotate, or another transform.
|
|
41
|
+
*
|
|
42
|
+
* Supported on Lynx Engine 3.9 and later. Missing or unknown
|
|
43
|
+
* `GlobalProps.motion` values preserve the default motion; only the exact
|
|
44
|
+
* `"reduced"` value disables scaling.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useScaleFeedback(options?: UseScaleFeedbackOptions): UseScaleFeedbackReturn;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=useScaleFeedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScaleFeedback.d.ts","sourceRoot":"","sources":["../../src/hooks/useScaleFeedback.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,KAAK,6BAA6B,GAAG,WAAW,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAChG,KAAK,sBAAsB,GAAG,WAAW,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,CAAC;AAUvF,MAAM,WAAW,uBAAuB;IACtC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,4BAA4B,EAAE,sBAAsB,CAAC;IACrD,0BAA0B,EAAE,sBAAsB,CAAC;IACnD,6BAA6B,EAAE,sBAAsB,CAAC;CACvD;AAED,oGAAoG;AACpG,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,KAAK,CAAC;IACf,iBAAiB,EAAE,WAAW,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACjE,8BAA8B,EAAE,6BAA6B,CAAC;CAC/D;AAED,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,2DAA2D;IAC3D,wBAAwB,EAAE,wBAAwB,CAAC;CACpD;AAoDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,sBAAsB,CAyE9F"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { calculateScaleFeedback, isReducedMotion } from "../utils/calculate-scale-feedback.js";
|
|
2
|
+
import { runOnBackground, runOnMainThread, useEffect, useGlobalProps, useMainThreadRef, useRef } from "@lynx-js/react";
|
|
3
|
+
import { feedbackScaleDuration, feedbackScaleTimingFunction } from "@seed-design/lynx-css/scale-feedback";
|
|
4
|
+
//#region src/hooks/useScaleFeedback.ts
|
|
5
|
+
function runScaleFeedback(targetRef, animationRef, scale, duration) {
|
|
6
|
+
"main thread";
|
|
7
|
+
const target = targetRef.current;
|
|
8
|
+
if (!target) return;
|
|
9
|
+
let currentTransform = "scale(1)";
|
|
10
|
+
try {
|
|
11
|
+
currentTransform = target.getComputedStyleProperty("transform") || currentTransform;
|
|
12
|
+
} catch {}
|
|
13
|
+
animationRef.current?.cancel();
|
|
14
|
+
animationRef.current = target.animate([{ transform: currentTransform }, { transform: `scale(${scale})` }], {
|
|
15
|
+
duration,
|
|
16
|
+
easing: feedbackScaleTimingFunction,
|
|
17
|
+
fill: "forwards"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function readScaleFeedbackScale(target) {
|
|
21
|
+
"main thread";
|
|
22
|
+
if (!target) return null;
|
|
23
|
+
let width = 0;
|
|
24
|
+
let height = 0;
|
|
25
|
+
try {
|
|
26
|
+
width = Number.parseFloat(target.getComputedStyleProperty("width"));
|
|
27
|
+
height = Number.parseFloat(target.getComputedStyleProperty("height"));
|
|
28
|
+
} catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
if (width <= 0 || height <= 0 || Number.isNaN(width) || Number.isNaN(height)) return null;
|
|
32
|
+
return calculateScaleFeedback(width, height);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Applies SEED Scale Feedback on the Lynx Main Thread.
|
|
36
|
+
*
|
|
37
|
+
* Spread `scaleFeedbackTriggerProps` onto the element that receives touch
|
|
38
|
+
* events and `scaleFeedbackTargetProps` onto the element that should scale.
|
|
39
|
+
* Applying both objects to one element creates Self Scale; applying them to
|
|
40
|
+
* separate elements creates Content Scale.
|
|
41
|
+
*
|
|
42
|
+
* The target's transform is owned by this hook. Use a separate content layer
|
|
43
|
+
* when the element already uses translate, rotate, or another transform.
|
|
44
|
+
*
|
|
45
|
+
* Supported on Lynx Engine 3.9 and later. Missing or unknown
|
|
46
|
+
* `GlobalProps.motion` values preserve the default motion; only the exact
|
|
47
|
+
* `"reduced"` value disables scaling.
|
|
48
|
+
*/
|
|
49
|
+
function useScaleFeedback(options = {}) {
|
|
50
|
+
const { disabled = false, onTouchStart, onTouchEnd, onTouchCancel } = options;
|
|
51
|
+
const reducedMotion = isReducedMotion(useGlobalProps()?.motion);
|
|
52
|
+
const targetRef = useMainThreadRef(null);
|
|
53
|
+
const animationRef = useMainThreadRef(null);
|
|
54
|
+
const scaleRef = useMainThreadRef(null);
|
|
55
|
+
const hasMountedRef = useRef(false);
|
|
56
|
+
function handleLayoutChange(event) {
|
|
57
|
+
"main thread";
|
|
58
|
+
targetRef.current = event.currentTarget;
|
|
59
|
+
const width = event.detail?.width ?? event.params?.width ?? 0;
|
|
60
|
+
const height = event.detail?.height ?? event.params?.height ?? 0;
|
|
61
|
+
if (width > 0 && height > 0) scaleRef.current = calculateScaleFeedback(width, height);
|
|
62
|
+
else scaleRef.current = null;
|
|
63
|
+
targetRef.current?.setStyleProperty("transform-origin", "center center");
|
|
64
|
+
}
|
|
65
|
+
function handleTouchStart() {
|
|
66
|
+
"main thread";
|
|
67
|
+
if (!disabled && !reducedMotion) {
|
|
68
|
+
const scale = scaleRef.current ?? readScaleFeedbackScale(targetRef.current);
|
|
69
|
+
if (scale !== null) {
|
|
70
|
+
scaleRef.current = scale;
|
|
71
|
+
runScaleFeedback(targetRef, animationRef, scale, feedbackScaleDuration);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (onTouchStart) runOnBackground(onTouchStart)();
|
|
75
|
+
}
|
|
76
|
+
function handleTouchEnd() {
|
|
77
|
+
"main thread";
|
|
78
|
+
runScaleFeedback(targetRef, animationRef, 1, feedbackScaleDuration);
|
|
79
|
+
if (onTouchEnd) runOnBackground(onTouchEnd)();
|
|
80
|
+
}
|
|
81
|
+
function handleTouchCancel() {
|
|
82
|
+
"main thread";
|
|
83
|
+
runScaleFeedback(targetRef, animationRef, 1, feedbackScaleDuration);
|
|
84
|
+
if (onTouchCancel) runOnBackground(onTouchCancel)();
|
|
85
|
+
}
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (!hasMountedRef.current) {
|
|
88
|
+
hasMountedRef.current = true;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (!disabled && !reducedMotion) return;
|
|
92
|
+
runOnMainThread(runScaleFeedback)(targetRef, animationRef, 1, 0);
|
|
93
|
+
}, [disabled, reducedMotion]);
|
|
94
|
+
return {
|
|
95
|
+
scaleFeedbackTriggerProps: {
|
|
96
|
+
"main-thread:bindtouchstart": handleTouchStart,
|
|
97
|
+
"main-thread:bindtouchend": handleTouchEnd,
|
|
98
|
+
"main-thread:bindtouchcancel": handleTouchCancel
|
|
99
|
+
},
|
|
100
|
+
scaleFeedbackTargetProps: {
|
|
101
|
+
flatten: false,
|
|
102
|
+
"main-thread:ref": targetRef,
|
|
103
|
+
"main-thread:bindlayoutchange": handleLayoutChange
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { useScaleFeedback };
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useControllableState } from "./hooks/useControllableState.js";
|
|
2
2
|
import { usePressTap } from "./hooks/usePressTap.js";
|
|
3
|
+
import { useScaleFeedback } from "./hooks/useScaleFeedback.js";
|
|
4
|
+
import { mergeProps } from "./utils/merge-props.js";
|
|
3
5
|
import { createSlotRecipeContext } from "./utils/create-slot-recipe-context.jsx";
|
|
4
6
|
import { useIconColor } from "./hooks/useIconColor.js";
|
|
5
7
|
import { useSafeArea } from "./hooks/useSafeArea.js";
|
|
@@ -18,30 +20,42 @@ import { BottomSheetBackdrop, BottomSheetBody, BottomSheetContent, BottomSheetDe
|
|
|
18
20
|
import { BottomSheet_namespace_exports } from "./components/BottomSheet/BottomSheet.namespace.js";
|
|
19
21
|
import { CalloutCloseButton, CalloutContent, CalloutDescription, CalloutLink, CalloutRoot, CalloutTitle } from "./components/Callout/Callout.jsx";
|
|
20
22
|
import { Callout_namespace_exports } from "./components/Callout/Callout.namespace.js";
|
|
23
|
+
import { ScaleFeedbackContentContext } from "./contexts/ScaleFeedbackContentContext.js";
|
|
21
24
|
import { splitMultipleVariantsProps } from "./utils/split-multiple-variants-props.js";
|
|
22
25
|
import { CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot } from "./components/Checkbox/Checkbox.jsx";
|
|
23
26
|
import { Checkbox_namespace_exports } from "./components/Checkbox/Checkbox.namespace.js";
|
|
24
27
|
import { ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle } from "./components/Chip/Chip.jsx";
|
|
25
28
|
import { Chip_namespace_exports } from "./components/Chip/Chip.namespace.js";
|
|
29
|
+
import { Count } from "./components/Count/Count.jsx";
|
|
26
30
|
import { Divider } from "./components/Divider/Divider.jsx";
|
|
27
31
|
import { FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot } from "./components/Field/Field.jsx";
|
|
28
32
|
import { Field_namespace_exports } from "./components/Field/Field.namespace.js";
|
|
33
|
+
import { InputButtonButton, InputButtonClearButton, InputButtonPlaceholder, InputButtonPrefixIcon, InputButtonPrefixText, InputButtonRoot, InputButtonSuffixIcon, InputButtonSuffixText, InputButtonValue } from "./components/InputButton/InputButton.jsx";
|
|
34
|
+
import { InputButton_namespace_exports } from "./components/InputButton/InputButton.namespace.js";
|
|
29
35
|
import { KeyboardAvoidingScrollView } from "./components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.jsx";
|
|
30
36
|
import { MannerTemp, MannerTempEmote } from "./components/MannerTemp/MannerTemp.jsx";
|
|
37
|
+
import { MenuAnchor, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuItemBody, MenuItemDescription, MenuItemLabel, MenuRoot, MenuScrollArea, MenuTrigger } from "./components/Menu/Menu.jsx";
|
|
38
|
+
import { Menu_namespace_exports } from "./components/Menu/Menu.namespace.js";
|
|
31
39
|
import { MannerTempBadge } from "./components/MannerTempBadge/MannerTempBadge.jsx";
|
|
32
40
|
import { NotificationBadge, NotificationBadgePositioner } from "./components/NotificationBadge/NotificationBadge.jsx";
|
|
41
|
+
import { ScaleFeedback } from "./components/ScaleFeedback/ScaleFeedback.jsx";
|
|
33
42
|
import { PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle } from "./components/PageBanner/PageBanner.jsx";
|
|
34
43
|
import { PageBanner_namespace_exports } from "./components/PageBanner/PageBanner.namespace.js";
|
|
35
44
|
import { RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot } from "./components/RadioGroup/RadioGroup.jsx";
|
|
45
|
+
import { SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb } from "./components/Switch/Switch.jsx";
|
|
46
|
+
import { ListButtonItem, ListCheckboxItem, ListContent, ListDetail, ListHeader, ListItem, ListPrefix, ListRadioItem, ListRoot, ListSuffix, ListSwitchItem, ListTitle } from "./components/List/List.jsx";
|
|
47
|
+
import { List_namespace_exports } from "./components/List/List.namespace.js";
|
|
36
48
|
import { RadioGroup_namespace_exports } from "./components/RadioGroup/RadioGroup.namespace.js";
|
|
49
|
+
import { ReactionButton } from "./components/ReactionButton/ReactionButton.jsx";
|
|
50
|
+
import { HStack, VStack } from "./components/Stack/Stack.jsx";
|
|
37
51
|
import { SegmentedControlIndicator, SegmentedControlItem, SegmentedControlRoot } from "./components/SegmentedControl/SegmentedControl.jsx";
|
|
38
52
|
import { SegmentedControl_namespace_exports } from "./components/SegmentedControl/SegmentedControl.namespace.js";
|
|
39
53
|
import { CheckSelectBoxBody, CheckSelectBoxCheckmarkControl, CheckSelectBoxCheckmarkIcon, CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxFooter, CheckSelectBoxGroup, CheckSelectBoxLabel, CheckSelectBoxRoot, CheckSelectBoxTrigger, RadioSelectBoxBody, RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxFooter, RadioSelectBoxGroup, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxTrigger } from "./components/SelectBox/SelectBox.jsx";
|
|
40
54
|
import { CheckSelectBox_namespace_exports } from "./components/SelectBox/CheckSelectBox.namespace.js";
|
|
41
55
|
import { RadioSelectBox_namespace_exports } from "./components/SelectBox/RadioSelectBox.namespace.js";
|
|
42
|
-
import { HStack, VStack } from "./components/Stack/Stack.jsx";
|
|
43
|
-
import { SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb } from "./components/Switch/Switch.jsx";
|
|
44
56
|
import { Switch_namespace_exports } from "./components/Switch/Switch.namespace.js";
|
|
57
|
+
import { SwipeableMenuSheetBackdrop, SwipeableMenuSheetCloseButton, SwipeableMenuSheetContent, SwipeableMenuSheetDescription, SwipeableMenuSheetFooter, SwipeableMenuSheetGroup, SwipeableMenuSheetHandle, SwipeableMenuSheetHeader, SwipeableMenuSheetItem, SwipeableMenuSheetItemContent, SwipeableMenuSheetItemDescription, SwipeableMenuSheetItemLabel, SwipeableMenuSheetList, SwipeableMenuSheetPositioner, SwipeableMenuSheetRoot, SwipeableMenuSheetTitle, SwipeableMenuSheetTrigger } from "./components/SwipeableMenuSheet/SwipeableMenuSheet.jsx";
|
|
58
|
+
import { SwipeableMenuSheet_namespace_exports } from "./components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.js";
|
|
45
59
|
import { TabsCarousel, TabsCarouselCamera, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from "./components/Tabs/Tabs.jsx";
|
|
46
60
|
import { Tabs_namespace_exports } from "./components/Tabs/Tabs.namespace.js";
|
|
47
61
|
import { TagGroupItem, TagGroupItemLabel, TagGroupRoot } from "./components/TagGroup/TagGroup.jsx";
|
|
@@ -52,4 +66,4 @@ import { useTextFieldWithGraphemes } from "./components/TextField/useTextFieldWi
|
|
|
52
66
|
import { TextField_namespace_exports } from "./components/TextField/TextField.namespace.js";
|
|
53
67
|
import { getSeedClassName } from "./utils/get-seed-class-name.js";
|
|
54
68
|
import { useSeedClassName } from "./hooks/useSeedClassName.js";
|
|
55
|
-
export { Accordion_namespace_exports as Accordion, AccordionBody, AccordionContent, AccordionDescription, AccordionHeader, AccordionItem, AccordionPrefix, AccordionRoot, AccordionSuffixIcon, AccordionTitle, AccordionTrigger, ActionButton, AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, Badge, BottomSheet_namespace_exports as BottomSheet, BottomSheetBackdrop, BottomSheetBody, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetPositioner, BottomSheetRoot, BottomSheetTitle, BottomSheetTrigger, Box, Callout_namespace_exports as Callout, CalloutCloseButton, CalloutContent, CalloutDescription, CalloutLink, CalloutRoot, CalloutTitle, CheckSelectBox_namespace_exports as CheckSelectBox, CheckSelectBoxBody, CheckSelectBoxCheckmarkControl, CheckSelectBoxCheckmarkIcon, CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxFooter, CheckSelectBoxGroup, CheckSelectBoxLabel, CheckSelectBoxRoot, CheckSelectBoxTrigger, Checkbox_namespace_exports as Checkbox, CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot, Chip_namespace_exports as Chip, ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle, Divider, Field_namespace_exports as Field, FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot, HStack, Icon, KeyboardAvoidingScrollView, MannerTemp, MannerTempBadge, MannerTempEmote, NotificationBadge, NotificationBadgePositioner, PageBanner_namespace_exports as PageBanner, PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle, PrefixIcon, ProgressCircle_namespace_exports as ProgressCircle, ProgressCircleRange, ProgressCircleRoot, RadioGroup_namespace_exports as RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot, RadioSelectBox_namespace_exports as RadioSelectBox, RadioSelectBoxBody, RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxFooter, RadioSelectBoxGroup, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxTrigger, SegmentedControl_namespace_exports as SegmentedControl, SegmentedControlIndicator, SegmentedControlItem, SegmentedControlRoot, SuffixIcon, Switch_namespace_exports as Switch, SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb, Tabs_namespace_exports as Tabs, TabsCarousel, TabsCarouselCamera, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger, TagGroup_namespace_exports as TagGroup, TagGroupItem, TagGroupItemLabel, TagGroupRoot, Text, TextField_namespace_exports as TextField, TextFieldInput, TextFieldPrefixIcon, TextFieldPrefixText, TextFieldRoot, TextFieldSuffixIcon, TextFieldSuffixText, TextFieldTextarea, VStack, capitalize, createSlotRecipeContext, getSeedClassName, resolveRecipeToken, splitMultipleVariantsProps, useControllableState, useIconColor, usePressTap, useSafeArea, useSeedClassName, useTextFieldWithGraphemes };
|
|
69
|
+
export { Accordion_namespace_exports as Accordion, AccordionBody, AccordionContent, AccordionDescription, AccordionHeader, AccordionItem, AccordionPrefix, AccordionRoot, AccordionSuffixIcon, AccordionTitle, AccordionTrigger, ActionButton, AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, Badge, BottomSheet_namespace_exports as BottomSheet, BottomSheetBackdrop, BottomSheetBody, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetPositioner, BottomSheetRoot, BottomSheetTitle, BottomSheetTrigger, Box, Callout_namespace_exports as Callout, CalloutCloseButton, CalloutContent, CalloutDescription, CalloutLink, CalloutRoot, CalloutTitle, CheckSelectBox_namespace_exports as CheckSelectBox, CheckSelectBoxBody, CheckSelectBoxCheckmarkControl, CheckSelectBoxCheckmarkIcon, CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxFooter, CheckSelectBoxGroup, CheckSelectBoxLabel, CheckSelectBoxRoot, CheckSelectBoxTrigger, Checkbox_namespace_exports as Checkbox, CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot, Chip_namespace_exports as Chip, ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle, Count, Divider, Field_namespace_exports as Field, FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot, HStack, Icon, InputButton_namespace_exports as InputButton, InputButtonButton, InputButtonClearButton, InputButtonPlaceholder, InputButtonPrefixIcon, InputButtonPrefixText, InputButtonRoot, InputButtonSuffixIcon, InputButtonSuffixText, InputButtonValue, KeyboardAvoidingScrollView, List_namespace_exports as List, ListButtonItem, ListCheckboxItem, ListContent, ListDetail, ListHeader, ListItem, ListPrefix, ListRadioItem, ListRoot, ListSuffix, ListSwitchItem, ListTitle, MannerTemp, MannerTempBadge, MannerTempEmote, Menu_namespace_exports as Menu, MenuAnchor, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuItemBody, MenuItemDescription, MenuItemLabel, PrefixIcon as MenuPrefixIcon, MenuRoot, MenuScrollArea, SuffixIcon as MenuSuffixIcon, MenuTrigger, NotificationBadge, NotificationBadgePositioner, PageBanner_namespace_exports as PageBanner, PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle, PrefixIcon, ProgressCircle_namespace_exports as ProgressCircle, ProgressCircleRange, ProgressCircleRoot, RadioGroup_namespace_exports as RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot, RadioSelectBox_namespace_exports as RadioSelectBox, RadioSelectBoxBody, RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxFooter, RadioSelectBoxGroup, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxTrigger, ReactionButton, ScaleFeedback, ScaleFeedbackContentContext, SegmentedControl_namespace_exports as SegmentedControl, SegmentedControlIndicator, SegmentedControlItem, SegmentedControlRoot, SuffixIcon, SwipeableMenuSheet_namespace_exports as SwipeableMenuSheet, SwipeableMenuSheetBackdrop, SwipeableMenuSheetCloseButton, SwipeableMenuSheetContent, SwipeableMenuSheetDescription, SwipeableMenuSheetFooter, SwipeableMenuSheetGroup, SwipeableMenuSheetHandle, SwipeableMenuSheetHeader, SwipeableMenuSheetItem, SwipeableMenuSheetItemContent, SwipeableMenuSheetItemDescription, SwipeableMenuSheetItemLabel, SwipeableMenuSheetList, SwipeableMenuSheetPositioner, SwipeableMenuSheetRoot, SwipeableMenuSheetTitle, SwipeableMenuSheetTrigger, Switch_namespace_exports as Switch, SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb, Tabs_namespace_exports as Tabs, TabsCarousel, TabsCarouselCamera, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger, TagGroup_namespace_exports as TagGroup, TagGroupItem, TagGroupItemLabel, TagGroupRoot, Text, TextField_namespace_exports as TextField, TextFieldInput, TextFieldPrefixIcon, TextFieldPrefixText, TextFieldRoot, TextFieldSuffixIcon, TextFieldSuffixText, TextFieldTextarea, VStack, capitalize, createSlotRecipeContext, getSeedClassName, mergeProps, resolveRecipeToken, splitMultipleVariantsProps, useControllableState, useIconColor, usePressTap, useSafeArea, useScaleFeedback, useSeedClassName, useTextFieldWithGraphemes };
|