@seed-design/react 1.1.4 → 1.1.7
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/BottomSheet/BottomSheet.cjs +2 -1
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.js +2 -1
- package/lib/components/ScrollFog/ScrollFog.cjs +19 -7
- package/lib/components/ScrollFog/ScrollFog.d.ts +7 -2
- package/lib/components/ScrollFog/ScrollFog.d.ts.map +1 -1
- package/lib/components/ScrollFog/ScrollFog.js +19 -7
- package/lib/components/Slider/Slider.cjs +1 -1
- package/lib/components/Slider/Slider.d.ts +1 -1
- package/lib/components/Slider/Slider.d.ts.map +1 -1
- package/lib/components/Slider/Slider.js +1 -1
- package/package.json +12 -13
- package/src/components/BottomSheet/BottomSheet.tsx +2 -2
- package/src/components/ScrollFog/ScrollFog.tsx +30 -7
- package/src/components/Slider/Slider.tsx +1 -1
- package/src/components/TextField/TextField.test.tsx +5 -0
- package/src/components/TextField/useTextFieldWithGraphemes.test.tsx +5 -0
|
@@ -7,6 +7,7 @@ const bottomSheet = require('@seed-design/css/recipes/bottom-sheet');
|
|
|
7
7
|
const reactDrawer = require('@seed-design/react-drawer');
|
|
8
8
|
const reactPrimitive = require('@seed-design/react-primitive');
|
|
9
9
|
const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
|
|
10
|
+
const styled = require('../../utils/styled.cjs');
|
|
10
11
|
|
|
11
12
|
const { withRootProvider, withContext } = createSlotRecipeContext.createSlotRecipeContext(bottomSheet.bottomSheet);
|
|
12
13
|
const BottomSheetRoot = withRootProvider(reactDrawer.Drawer.Root, {
|
|
@@ -37,7 +38,7 @@ const BottomSheetTitle = withContext(
|
|
|
37
38
|
);
|
|
38
39
|
const BottomSheetDescription = withContext(reactDrawer.Drawer.Description, "description");
|
|
39
40
|
const BottomSheetBody = withContext(
|
|
40
|
-
reactPrimitive.Primitive.div,
|
|
41
|
+
styled.withStyleProps(reactPrimitive.Primitive.div),
|
|
41
42
|
"body"
|
|
42
43
|
);
|
|
43
44
|
const BottomSheetFooter = withContext(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrE,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB,EAAE,MAAM,CAAC,SAAS;CAAG;AAE1F,eAAO,MAAM,eAAe,iEAI1B,CAAC;AAIH,MAAM,WAAW,uBAAwB,SAAQ,MAAM,CAAC,YAAY;CAAG;AAEvE,eAAO,MAAM,kBAAkB,mJAAiB,CAAC;AAIjD,MAAM,WAAW,0BAA2B,SAAQ,MAAM,CAAC,eAAe;CAAG;AAE7E,eAAO,MAAM,qBAAqB,uHAGjC,CAAC;AAIF,MAAM,WAAW,wBAAyB,SAAQ,MAAM,CAAC,aAAa;CAAG;AAEzE,eAAO,MAAM,mBAAmB,qHAG/B,CAAC;AAIF,MAAM,WAAW,uBAAwB,SAAQ,MAAM,CAAC,YAAY;CAAG;AAEvE,eAAO,MAAM,kBAAkB,oHAG9B,CAAC;AAIF,MAAM,WAAW,sBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,iBAAiB,mHAG7B,CAAC;AAIF,MAAM,WAAW,qBAAsB,SAAQ,MAAM,CAAC,UAAU;CAAG;AAEnE,eAAO,MAAM,gBAAgB,sHAG5B,CAAC;AAIF,MAAM,WAAW,2BAA4B,SAAQ,MAAM,CAAC,gBAAgB;CAAG;AAE/E,eAAO,MAAM,sBAAsB,8HAGC,CAAC;AAIrC,MAAM,WAAW,oBACf,SAAQ,cAAc,EACpB,IAAI,CACF,UAAU,EACV,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,gBAAgB,GAAG,YAAY,CACpF,EACD,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,eAAe,iHAG3B,CAAC;AAIF,MAAM,WAAW,sBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,iBAAiB,mHAG7B,CAAC;AAIF,MAAM,WAAW,2BAA4B,SAAQ,MAAM,CAAC,gBAAgB;CAAG;AAE/E,eAAO,MAAM,sBAAsB,2HAGlC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { bottomSheet } from '@seed-design/css/recipes/bottom-sheet';
|
|
|
3
3
|
import { Drawer } from '@seed-design/react-drawer';
|
|
4
4
|
import { Primitive } from '@seed-design/react-primitive';
|
|
5
5
|
import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
|
|
6
|
+
import { withStyleProps } from '../../utils/styled.js';
|
|
6
7
|
|
|
7
8
|
const { withRootProvider, withContext } = createSlotRecipeContext(bottomSheet);
|
|
8
9
|
const BottomSheetRoot = withRootProvider(Drawer.Root, {
|
|
@@ -33,7 +34,7 @@ const BottomSheetTitle = withContext(
|
|
|
33
34
|
);
|
|
34
35
|
const BottomSheetDescription = withContext(Drawer.Description, "description");
|
|
35
36
|
const BottomSheetBody = withContext(
|
|
36
|
-
Primitive.div,
|
|
37
|
+
withStyleProps(Primitive.div),
|
|
37
38
|
"body"
|
|
38
39
|
);
|
|
39
40
|
const BottomSheetFooter = withContext(
|
|
@@ -5,13 +5,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const scrollFog = require('@seed-design/css/recipes/scroll-fog');
|
|
8
|
-
const reactScrollable = require('@seed-design/react-scrollable');
|
|
9
8
|
const clsx = require('clsx');
|
|
10
9
|
const React = require('react');
|
|
11
10
|
const component = require('@seed-design/css/vars/component');
|
|
12
11
|
|
|
13
12
|
const ScrollFog = React.forwardRef(
|
|
14
|
-
({
|
|
13
|
+
({
|
|
14
|
+
className,
|
|
15
|
+
hideScrollBar,
|
|
16
|
+
placement = ["top", "bottom"],
|
|
17
|
+
size = component.scrollFog.base.enabled.root.size,
|
|
18
|
+
sizes,
|
|
19
|
+
style,
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => {
|
|
15
22
|
const [variantProps, restProps] = scrollFog.scrollFog.splitVariantProps({
|
|
16
23
|
hideScrollBar,
|
|
17
24
|
...props
|
|
@@ -29,19 +36,24 @@ const ScrollFog = React.forwardRef(
|
|
|
29
36
|
"--scroll-fog-size-top": finalSizes.top,
|
|
30
37
|
"--scroll-fog-size-bottom": finalSizes.bottom,
|
|
31
38
|
"--scroll-fog-size-left": finalSizes.left,
|
|
32
|
-
"--scroll-fog-size-right": finalSizes.right
|
|
39
|
+
"--scroll-fog-size-right": finalSizes.right,
|
|
40
|
+
// placement에 포함된 방향만 1, 나머지는 0
|
|
41
|
+
"--scrollable-top": placement.includes("top") ? "1" : "0",
|
|
42
|
+
"--scrollable-bottom": placement.includes("bottom") ? "1" : "0",
|
|
43
|
+
"--scrollable-left": placement.includes("left") ? "1" : "0",
|
|
44
|
+
"--scrollable-right": placement.includes("right") ? "1" : "0"
|
|
33
45
|
};
|
|
34
|
-
}, [sizePx, sizes]);
|
|
46
|
+
}, [sizePx, sizes, placement]);
|
|
35
47
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
-
|
|
48
|
+
"div",
|
|
37
49
|
{
|
|
38
50
|
ref,
|
|
39
51
|
className: clsx(scrollFogClassName, className),
|
|
40
|
-
...restProps,
|
|
41
52
|
style: {
|
|
42
53
|
...style,
|
|
43
54
|
...sizeStyle
|
|
44
|
-
}
|
|
55
|
+
},
|
|
56
|
+
...restProps
|
|
45
57
|
}
|
|
46
58
|
);
|
|
47
59
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { ScrollFogVariantProps } from '@seed-design/css/recipes/scroll-fog';
|
|
2
|
-
import { ScrollableProps } from '@seed-design/react-scrollable';
|
|
3
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
type ScrollPlacement = "top" | "bottom" | "left" | "right";
|
|
4
4
|
type SizesConfig = {
|
|
5
5
|
top?: number;
|
|
6
6
|
bottom?: number;
|
|
7
7
|
left?: number;
|
|
8
8
|
right?: number;
|
|
9
9
|
};
|
|
10
|
-
export interface ScrollFogProps extends ScrollFogVariantProps,
|
|
10
|
+
export interface ScrollFogProps extends ScrollFogVariantProps, React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
/**
|
|
12
|
+
* Placement of fog effect
|
|
13
|
+
* @default ["top", "bottom"]
|
|
14
|
+
*/
|
|
15
|
+
placement?: ScrollPlacement[];
|
|
11
16
|
/**
|
|
12
17
|
* Size of the fog effect in pixels
|
|
13
18
|
* @default 20
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollFog.d.ts","sourceRoot":"","sources":["../../../src/components/ScrollFog/ScrollFog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,KAAK,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"ScrollFog.d.ts","sourceRoot":"","sources":["../../../src/components/ScrollFog/ScrollFog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,KAAK,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAK5F,KAAK,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,KAAK,WAAW,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,cACf,SAAQ,qBAAqB,EAC3B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAE9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,2GAqDrB,CAAC"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { scrollFog } from '@seed-design/css/recipes/scroll-fog';
|
|
4
|
-
import { Scrollable } from '@seed-design/react-scrollable';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
import { forwardRef, useMemo } from 'react';
|
|
7
6
|
import { scrollFog as scrollFog$1 } from '@seed-design/css/vars/component';
|
|
8
7
|
|
|
9
8
|
const ScrollFog = forwardRef(
|
|
10
|
-
({
|
|
9
|
+
({
|
|
10
|
+
className,
|
|
11
|
+
hideScrollBar,
|
|
12
|
+
placement = ["top", "bottom"],
|
|
13
|
+
size = scrollFog$1.base.enabled.root.size,
|
|
14
|
+
sizes,
|
|
15
|
+
style,
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
11
18
|
const [variantProps, restProps] = scrollFog.splitVariantProps({
|
|
12
19
|
hideScrollBar,
|
|
13
20
|
...props
|
|
@@ -25,19 +32,24 @@ const ScrollFog = forwardRef(
|
|
|
25
32
|
"--scroll-fog-size-top": finalSizes.top,
|
|
26
33
|
"--scroll-fog-size-bottom": finalSizes.bottom,
|
|
27
34
|
"--scroll-fog-size-left": finalSizes.left,
|
|
28
|
-
"--scroll-fog-size-right": finalSizes.right
|
|
35
|
+
"--scroll-fog-size-right": finalSizes.right,
|
|
36
|
+
// placement에 포함된 방향만 1, 나머지는 0
|
|
37
|
+
"--scrollable-top": placement.includes("top") ? "1" : "0",
|
|
38
|
+
"--scrollable-bottom": placement.includes("bottom") ? "1" : "0",
|
|
39
|
+
"--scrollable-left": placement.includes("left") ? "1" : "0",
|
|
40
|
+
"--scrollable-right": placement.includes("right") ? "1" : "0"
|
|
29
41
|
};
|
|
30
|
-
}, [sizePx, sizes]);
|
|
42
|
+
}, [sizePx, sizes, placement]);
|
|
31
43
|
return /* @__PURE__ */ jsx(
|
|
32
|
-
|
|
44
|
+
"div",
|
|
33
45
|
{
|
|
34
46
|
ref,
|
|
35
47
|
className: clsx(scrollFogClassName, className),
|
|
36
|
-
...restProps,
|
|
37
48
|
style: {
|
|
38
49
|
...style,
|
|
39
50
|
...sizeStyle
|
|
40
|
-
}
|
|
51
|
+
},
|
|
52
|
+
...restProps
|
|
41
53
|
}
|
|
42
54
|
);
|
|
43
55
|
}
|
|
@@ -69,7 +69,7 @@ const SliderValueIndicatorRoot = withContext(
|
|
|
69
69
|
reactSlider.Slider.ValueIndicatorRoot,
|
|
70
70
|
"valueIndicatorRoot"
|
|
71
71
|
);
|
|
72
|
-
const SliderValueIndicatorLabel = reactSlider.Slider.ValueIndicatorLabel;
|
|
72
|
+
const SliderValueIndicatorLabel = withStateProps(reactSlider.Slider.ValueIndicatorLabel);
|
|
73
73
|
const SliderValueIndicatorArrow = withContext(withStateProps(reactPrimitive.Primitive.div), "valueIndicatorArrow");
|
|
74
74
|
const SliderValueIndicatorArrowTip = React.forwardRef(({ tipRadius = 2, className, ...otherProps }, ref) => {
|
|
75
75
|
const [valueIndicatorArrowTip, setValueIndicatorArrowTip] = React.useState(null);
|
|
@@ -36,7 +36,7 @@ export interface SliderValueIndicatorRootProps extends Slider.ValueIndicatorRoot
|
|
|
36
36
|
export declare const SliderValueIndicatorRoot: ForwardRefExoticComponent<SliderValueIndicatorRootProps & RefAttributes<HTMLDivElement>>;
|
|
37
37
|
export interface SliderValueIndicatorLabelProps extends Slider.ValueIndicatorLabelProps {
|
|
38
38
|
}
|
|
39
|
-
export declare const SliderValueIndicatorLabel: ForwardRefExoticComponent<Slider.ValueIndicatorLabelProps & RefAttributes<HTMLSpanElement>>;
|
|
39
|
+
export declare const SliderValueIndicatorLabel: ForwardRefExoticComponent<Omit<Slider.ValueIndicatorLabelProps & RefAttributes<HTMLSpanElement>, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
40
40
|
export interface SliderValueIndicatorArrowProps extends PrimitiveProps, HTMLAttributes<HTMLDivElement> {
|
|
41
41
|
}
|
|
42
42
|
export declare const SliderValueIndicatorArrow: ForwardRefExoticComponent<SliderValueIndicatorArrowProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAoB,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAkBlE,MAAM,WAAW,eAAgB,SA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BAAkB,SAAQ,wBAAwB,EAAE,MAAM,CAAC,WAAW;CAAG;AAE1F,eAAO,MAAM,YAAY,8GAExB,CAAC;AAEF,MAAM,WAAW,6BAA8B,SAAQ,MAAM,CAAC,uBAAuB;CAAG;AAExF,eAAO,MAAM,wBAAwB,0HAGpC,CAAC;AAEF,MAAM,WAAW,8BAA+B,SAAQ,MAAM,CAAC,wBAAwB;CAAG;AAE1F,eAAO,MAAM,yBAAyB,2LAA6C,CAAC;AAEpF,MAAM,WAAW,8BACf,SAAQ,cAAc,EACpB,cAAc,CAAC,cAAc,CAAC;CAAG;AAErC,eAAO,MAAM,yBAAyB,2HAGiB,CAAC;AAExD,MAAM,WAAW,iCAAkC,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IACtF;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,4BAA4B,0IA4BvC,CAAC"}
|
|
@@ -65,7 +65,7 @@ const SliderValueIndicatorRoot = withContext(
|
|
|
65
65
|
Slider.ValueIndicatorRoot,
|
|
66
66
|
"valueIndicatorRoot"
|
|
67
67
|
);
|
|
68
|
-
const SliderValueIndicatorLabel = Slider.ValueIndicatorLabel;
|
|
68
|
+
const SliderValueIndicatorLabel = withStateProps(Slider.ValueIndicatorLabel);
|
|
69
69
|
const SliderValueIndicatorArrow = withContext(withStateProps(Primitive.div), "valueIndicatorArrow");
|
|
70
70
|
const SliderValueIndicatorArrowTip = forwardRef(({ tipRadius = 2, className, ...otherProps }, ref) => {
|
|
71
71
|
const [valueIndicatorArrowTip, setValueIndicatorArrowTip] = useState(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -42,24 +42,23 @@
|
|
|
42
42
|
"@radix-ui/react-use-layout-effect": "^1.1.1",
|
|
43
43
|
"@seed-design/dom-utils": "1.0.0",
|
|
44
44
|
"@seed-design/react-avatar": "1.0.0",
|
|
45
|
-
"@seed-design/react-checkbox": "1.0.
|
|
45
|
+
"@seed-design/react-checkbox": "1.0.1",
|
|
46
46
|
"@seed-design/react-dialog": "1.0.0",
|
|
47
|
-
"@seed-design/react-drawer": "1.0.
|
|
48
|
-
"@seed-design/react-field": "1.0.
|
|
49
|
-
"@seed-design/react-field-button": "1.0.
|
|
47
|
+
"@seed-design/react-drawer": "1.0.3",
|
|
48
|
+
"@seed-design/react-field": "1.0.1",
|
|
49
|
+
"@seed-design/react-field-button": "1.0.1",
|
|
50
50
|
"@seed-design/react-popover": "1.0.3",
|
|
51
51
|
"@seed-design/react-portal": "1.0.0",
|
|
52
52
|
"@seed-design/react-primitive": "1.0.0",
|
|
53
53
|
"@seed-design/react-progress": "1.0.0",
|
|
54
54
|
"@seed-design/react-pull-to-refresh": "1.0.1",
|
|
55
|
-
"@seed-design/react-radio-group": "1.0.
|
|
56
|
-
"@seed-design/react-
|
|
57
|
-
"@seed-design/react-
|
|
58
|
-
"@seed-design/react-slider": "1.0.0",
|
|
55
|
+
"@seed-design/react-radio-group": "1.0.1",
|
|
56
|
+
"@seed-design/react-segmented-control": "1.0.1",
|
|
57
|
+
"@seed-design/react-slider": "1.0.1",
|
|
59
58
|
"@seed-design/react-snackbar": "1.0.0",
|
|
60
|
-
"@seed-design/react-switch": "1.0.
|
|
61
|
-
"@seed-design/react-tabs": "1.0.
|
|
62
|
-
"@seed-design/react-text-field": "1.1.
|
|
59
|
+
"@seed-design/react-switch": "1.0.1",
|
|
60
|
+
"@seed-design/react-tabs": "1.0.1",
|
|
61
|
+
"@seed-design/react-text-field": "1.1.1",
|
|
63
62
|
"@seed-design/react-toggle": "1.0.0",
|
|
64
63
|
"clsx": "^2.1.1",
|
|
65
64
|
"unicode-segmenter": "^0.14.0"
|
|
@@ -74,7 +73,7 @@
|
|
|
74
73
|
"@vitejs/plugin-react": "^5.0.0",
|
|
75
74
|
"ajv": "^8.17.1",
|
|
76
75
|
"csstype": "^3.1.3",
|
|
77
|
-
"globby": "^
|
|
76
|
+
"globby": "^16.0.0",
|
|
78
77
|
"react": "^19.1.0",
|
|
79
78
|
"react-dom": "^19.1.0",
|
|
80
79
|
"vite": "^7.0.0",
|
|
@@ -2,7 +2,7 @@ import { bottomSheet, type BottomSheetVariantProps } from "@seed-design/css/reci
|
|
|
2
2
|
import { Drawer } from "@seed-design/react-drawer";
|
|
3
3
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
4
4
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
5
|
-
import type
|
|
5
|
+
import { withStyleProps, type StyleProps } from "../../utils/styled";
|
|
6
6
|
|
|
7
7
|
const { withRootProvider, withContext } = createSlotRecipeContext(bottomSheet);
|
|
8
8
|
|
|
@@ -89,7 +89,7 @@ export interface BottomSheetBodyProps
|
|
|
89
89
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
90
90
|
|
|
91
91
|
export const BottomSheetBody = withContext<HTMLDivElement, BottomSheetBodyProps>(
|
|
92
|
-
Primitive.div,
|
|
92
|
+
withStyleProps(Primitive.div),
|
|
93
93
|
"body",
|
|
94
94
|
);
|
|
95
95
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { scrollFog, type ScrollFogVariantProps } from "@seed-design/css/recipes/scroll-fog";
|
|
2
|
-
import { Scrollable, type ScrollableProps } from "@seed-design/react-scrollable";
|
|
3
2
|
import clsx from "clsx";
|
|
4
3
|
import { forwardRef, useMemo } from "react";
|
|
5
4
|
import { scrollFog as vars } from "@seed-design/css/vars/component";
|
|
6
5
|
|
|
6
|
+
type ScrollPlacement = "top" | "bottom" | "left" | "right";
|
|
7
|
+
|
|
7
8
|
type SizesConfig = {
|
|
8
9
|
top?: number;
|
|
9
10
|
bottom?: number;
|
|
@@ -11,12 +12,21 @@ type SizesConfig = {
|
|
|
11
12
|
right?: number;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
export interface ScrollFogProps
|
|
15
|
+
export interface ScrollFogProps
|
|
16
|
+
extends ScrollFogVariantProps,
|
|
17
|
+
React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/**
|
|
19
|
+
* Placement of fog effect
|
|
20
|
+
* @default ["top", "bottom"]
|
|
21
|
+
*/
|
|
22
|
+
placement?: ScrollPlacement[];
|
|
23
|
+
|
|
15
24
|
/**
|
|
16
25
|
* Size of the fog effect in pixels
|
|
17
26
|
* @default 20
|
|
18
27
|
*/
|
|
19
28
|
size?: number;
|
|
29
|
+
|
|
20
30
|
/**
|
|
21
31
|
* Size of the fog effect for each direction in pixels
|
|
22
32
|
*/
|
|
@@ -25,7 +35,15 @@ export interface ScrollFogProps extends ScrollFogVariantProps, ScrollableProps {
|
|
|
25
35
|
|
|
26
36
|
export const ScrollFog = forwardRef<HTMLDivElement, ScrollFogProps>(
|
|
27
37
|
(
|
|
28
|
-
{
|
|
38
|
+
{
|
|
39
|
+
className,
|
|
40
|
+
hideScrollBar,
|
|
41
|
+
placement = ["top", "bottom"],
|
|
42
|
+
size = vars.base.enabled.root.size,
|
|
43
|
+
sizes,
|
|
44
|
+
style,
|
|
45
|
+
...props
|
|
46
|
+
},
|
|
29
47
|
ref,
|
|
30
48
|
) => {
|
|
31
49
|
const [variantProps, restProps] = scrollFog.splitVariantProps({
|
|
@@ -48,18 +66,23 @@ export const ScrollFog = forwardRef<HTMLDivElement, ScrollFogProps>(
|
|
|
48
66
|
"--scroll-fog-size-bottom": finalSizes.bottom,
|
|
49
67
|
"--scroll-fog-size-left": finalSizes.left,
|
|
50
68
|
"--scroll-fog-size-right": finalSizes.right,
|
|
51
|
-
|
|
52
|
-
|
|
69
|
+
// placement에 포함된 방향만 1, 나머지는 0
|
|
70
|
+
"--scrollable-top": placement.includes("top") ? "1" : "0",
|
|
71
|
+
"--scrollable-bottom": placement.includes("bottom") ? "1" : "0",
|
|
72
|
+
"--scrollable-left": placement.includes("left") ? "1" : "0",
|
|
73
|
+
"--scrollable-right": placement.includes("right") ? "1" : "0",
|
|
74
|
+
} as React.CSSProperties;
|
|
75
|
+
}, [sizePx, sizes, placement]);
|
|
53
76
|
|
|
54
77
|
return (
|
|
55
|
-
<
|
|
78
|
+
<div
|
|
56
79
|
ref={ref}
|
|
57
80
|
className={clsx(scrollFogClassName, className)}
|
|
58
|
-
{...restProps}
|
|
59
81
|
style={{
|
|
60
82
|
...style,
|
|
61
83
|
...sizeStyle,
|
|
62
84
|
}}
|
|
85
|
+
{...restProps}
|
|
63
86
|
/>
|
|
64
87
|
);
|
|
65
88
|
},
|
|
@@ -103,7 +103,7 @@ export const SliderValueIndicatorRoot = withContext<HTMLDivElement, SliderValueI
|
|
|
103
103
|
|
|
104
104
|
export interface SliderValueIndicatorLabelProps extends Slider.ValueIndicatorLabelProps {}
|
|
105
105
|
|
|
106
|
-
export const SliderValueIndicatorLabel = Slider.ValueIndicatorLabel;
|
|
106
|
+
export const SliderValueIndicatorLabel = withStateProps(Slider.ValueIndicatorLabel);
|
|
107
107
|
|
|
108
108
|
export interface SliderValueIndicatorArrowProps
|
|
109
109
|
extends PrimitiveProps,
|
|
@@ -26,6 +26,11 @@ function setUp(jsx: ReactElement) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
describe("TextField", () => {
|
|
29
|
+
global.CSS = {
|
|
30
|
+
// @ts-expect-error
|
|
31
|
+
supports: (_k, _v) => true,
|
|
32
|
+
};
|
|
33
|
+
|
|
29
34
|
describe("props merging", () => {
|
|
30
35
|
describe("TextFieldInput", () => {
|
|
31
36
|
it("should merge props from TextFieldRoot", () => {
|
|
@@ -55,6 +55,11 @@ const TextFieldWithGraphemes = (props: TextFieldWithGraphemesProps) => {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
describe("useTextFieldWithGraphemes", () => {
|
|
58
|
+
global.CSS = {
|
|
59
|
+
// @ts-expect-error
|
|
60
|
+
supports: (_k, _v) => true,
|
|
61
|
+
};
|
|
62
|
+
|
|
58
63
|
describe("basic functionality", () => {
|
|
59
64
|
it("should render with empty default value", () => {
|
|
60
65
|
const { getByTestId } = setUp(<TextFieldWithGraphemes />);
|