react-native-system-ui 1.0.0 → 1.0.1
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/dist/cjs/components/action-sheet/ActionSheet.js +45 -51
- package/dist/cjs/components/area/Area.js +22 -22
- package/dist/cjs/components/avatar/Avatar.js +23 -23
- package/dist/cjs/components/badge/Badge.js +56 -61
- package/dist/cjs/components/button/Button.js +87 -92
- package/dist/cjs/components/button/ButtonGroup.js +4 -4
- package/dist/cjs/components/calendar/Calendar.js +28 -28
- package/dist/cjs/components/cascader/Cascader.js +205 -212
- package/dist/cjs/components/cell/Cell.js +54 -51
- package/dist/cjs/components/cell/CellGroup.js +26 -25
- package/dist/cjs/components/checkbox/Checkbox.js +1 -0
- package/dist/cjs/components/checkbox/CheckboxGroup.js +20 -19
- package/dist/cjs/components/circle/Circle.js +66 -54
- package/dist/cjs/components/collapse/Collapse.js +18 -18
- package/dist/cjs/components/config-provider/ConfigProvider.js +5 -5
- package/dist/cjs/components/count-down/CountDown.js +17 -17
- package/dist/cjs/components/datetime-picker/DatetimePicker.js +34 -35
- package/dist/cjs/components/dialog/Dialog.js +16 -10
- package/dist/cjs/components/dialog/imperative.js +8 -14
- package/dist/cjs/components/dialog/tokens.js +1 -0
- package/dist/cjs/components/divider/Divider.js +48 -51
- package/dist/cjs/components/empty/Empty.js +30 -25
- package/dist/cjs/components/error-boundary/ErrorBoundary.js +3 -2
- package/dist/cjs/components/flex/Flex.js +27 -27
- package/dist/cjs/components/flex/FlexItem.js +1 -0
- package/dist/cjs/components/form/Form.js +93 -92
- package/dist/cjs/components/form/FormItem.js +60 -54
- package/dist/cjs/components/form/FormList.js +35 -35
- package/dist/cjs/components/grid/Grid.js +48 -48
- package/dist/cjs/components/grid/GridItem.js +9 -2
- package/dist/cjs/components/image/Image.js +25 -24
- package/dist/cjs/components/image/tokens.js +3 -1
- package/dist/cjs/components/image-preview/ImagePreview.js +19 -19
- package/dist/cjs/components/image-preview/tokens.js +3 -1
- package/dist/cjs/components/input/Input.js +16 -19
- package/dist/cjs/components/loading/Loading.js +27 -27
- package/dist/cjs/components/nav-bar/NavBar.js +21 -18
- package/dist/cjs/components/nav-bar/tokens.js +3 -1
- package/dist/cjs/components/notice-bar/NoticeBar.js +7 -3
- package/dist/cjs/components/notice-bar/tokens.js +3 -1
- package/dist/cjs/components/notify/Notify.js +2 -1
- package/dist/cjs/components/notify/imperative.js +17 -17
- package/dist/cjs/components/notify/tokens.js +1 -0
- package/dist/cjs/components/number-keyboard/NumberKeyboard.js +217 -201
- package/dist/cjs/components/number-keyboard/tokens.js +7 -1
- package/dist/cjs/components/overlay/Overlay.js +15 -15
- package/dist/cjs/components/password-input/PasswordInput.js +49 -49
- package/dist/cjs/components/picker/Picker.js +50 -58
- package/dist/cjs/components/popup/Popup.js +10 -10
- package/dist/cjs/components/popup/tokens.js +1 -0
- package/dist/cjs/components/portal/Portal.js +3 -4
- package/dist/cjs/components/progress/Progress.js +94 -95
- package/dist/cjs/components/progress/tokens.js +1 -0
- package/dist/cjs/components/radio/Radio.js +67 -63
- package/dist/cjs/components/radio/RadioGroup.js +6 -6
- package/dist/cjs/components/safe-area-view/SafeAreaView.js +7 -7
- package/dist/cjs/components/search/Search.js +28 -28
- package/dist/cjs/components/selector/Selector.js +19 -26
- package/dist/cjs/components/share-sheet/ShareSheet.js +6 -1
- package/dist/cjs/components/share-sheet/tokens.js +3 -1
- package/dist/cjs/components/sidebar/Sidebar.js +22 -16
- package/dist/cjs/components/sidebar/SidebarItem.js +9 -8
- package/dist/cjs/components/sidebar/tokens.js +3 -1
- package/dist/cjs/components/skeleton/Skeleton.js +43 -42
- package/dist/cjs/components/space/Space.js +45 -41
- package/dist/cjs/components/space/tokens.js +7 -1
- package/dist/cjs/components/stepper/Stepper.js +17 -15
- package/dist/cjs/components/stepper/tokens.js +1 -0
- package/dist/cjs/components/swiper/Swiper.js +10 -7
- package/dist/cjs/components/swiper/SwiperPagIndicator.js +3 -2
- package/dist/cjs/components/switch/Switch.js +23 -23
- package/dist/cjs/components/tabbar/Tabbar.js +26 -26
- package/dist/cjs/components/tabs/Tabs.js +143 -153
- package/dist/cjs/components/tabs/tokens.js +3 -1
- package/dist/cjs/components/tag/Tag.js +38 -38
- package/dist/cjs/components/toast/Toast.js +3 -2
- package/dist/cjs/components/toast/tokens.js +1 -0
- package/dist/cjs/components/typography/Typography.js +23 -21
- package/dist/cjs/components/water-mark/WaterMark.js +65 -65
- package/dist/cjs/design-system/Text.js +38 -0
- package/dist/cjs/design-system/createComponentTokensHook.js +2 -2
- package/dist/cjs/design-system/index.js +7 -0
- package/dist/cjs/design-system/mergeTokensOverride.js +1 -4
- package/dist/cjs/hooks/useControllableValue.js +11 -11
- package/dist/cjs/hooks/useCountDown.js +18 -18
- package/dist/cjs/platform/measure.js +4 -2
- package/dist/cjs/utils/color.js +2 -7
- package/dist/cjs/utils/compare.js +3 -3
- package/dist/cjs/utils/date.js +2 -2
- package/dist/cjs/utils/deepMerge.js +5 -5
- package/dist/cjs/utils/hairline.js +1 -0
- package/dist/cjs/utils/render.js +2 -8
- package/dist/cjs/utils/validate.js +2 -4
- package/dist/es/components/action-sheet/ActionSheet.js +45 -51
- package/dist/es/components/area/Area.js +22 -22
- package/dist/es/components/avatar/Avatar.js +23 -23
- package/dist/es/components/badge/Badge.js +56 -61
- package/dist/es/components/button/Button.js +87 -92
- package/dist/es/components/button/ButtonGroup.js +4 -4
- package/dist/es/components/calendar/Calendar.js +28 -28
- package/dist/es/components/cascader/Cascader.js +205 -212
- package/dist/es/components/cell/Cell.js +55 -52
- package/dist/es/components/cell/CellGroup.js +26 -25
- package/dist/es/components/checkbox/Checkbox.js +1 -0
- package/dist/es/components/checkbox/CheckboxGroup.js +20 -19
- package/dist/es/components/circle/Circle.js +66 -54
- package/dist/es/components/collapse/Collapse.js +18 -18
- package/dist/es/components/config-provider/ConfigProvider.js +5 -5
- package/dist/es/components/count-down/CountDown.js +17 -17
- package/dist/es/components/datetime-picker/DatetimePicker.js +34 -35
- package/dist/es/components/dialog/Dialog.js +16 -10
- package/dist/es/components/dialog/imperative.js +8 -14
- package/dist/es/components/dialog/tokens.js +1 -0
- package/dist/es/components/divider/Divider.js +48 -51
- package/dist/es/components/empty/Empty.js +30 -25
- package/dist/es/components/error-boundary/ErrorBoundary.js +3 -2
- package/dist/es/components/flex/Flex.js +27 -27
- package/dist/es/components/flex/FlexItem.js +1 -0
- package/dist/es/components/form/Form.js +93 -92
- package/dist/es/components/form/FormItem.js +60 -54
- package/dist/es/components/form/FormList.js +35 -35
- package/dist/es/components/grid/Grid.js +48 -48
- package/dist/es/components/grid/GridItem.js +10 -3
- package/dist/es/components/image/Image.js +25 -24
- package/dist/es/components/image/tokens.js +3 -1
- package/dist/es/components/image-preview/ImagePreview.js +19 -19
- package/dist/es/components/image-preview/tokens.js +3 -1
- package/dist/es/components/input/Input.js +16 -19
- package/dist/es/components/loading/Loading.js +27 -27
- package/dist/es/components/nav-bar/NavBar.js +21 -18
- package/dist/es/components/nav-bar/tokens.js +3 -1
- package/dist/es/components/notice-bar/NoticeBar.js +7 -3
- package/dist/es/components/notice-bar/tokens.js +3 -1
- package/dist/es/components/notify/Notify.js +2 -1
- package/dist/es/components/notify/imperative.js +17 -17
- package/dist/es/components/notify/tokens.js +1 -0
- package/dist/es/components/number-keyboard/NumberKeyboard.js +217 -201
- package/dist/es/components/number-keyboard/tokens.js +7 -1
- package/dist/es/components/overlay/Overlay.js +15 -15
- package/dist/es/components/password-input/PasswordInput.js +49 -49
- package/dist/es/components/picker/Picker.js +50 -58
- package/dist/es/components/popup/Popup.js +10 -10
- package/dist/es/components/popup/tokens.js +1 -0
- package/dist/es/components/portal/Portal.js +3 -4
- package/dist/es/components/progress/Progress.js +94 -95
- package/dist/es/components/progress/tokens.js +1 -0
- package/dist/es/components/radio/Radio.js +67 -63
- package/dist/es/components/radio/RadioGroup.js +6 -6
- package/dist/es/components/safe-area-view/SafeAreaView.js +7 -7
- package/dist/es/components/search/Search.js +28 -28
- package/dist/es/components/selector/Selector.js +19 -26
- package/dist/es/components/share-sheet/ShareSheet.js +6 -1
- package/dist/es/components/share-sheet/tokens.js +3 -1
- package/dist/es/components/sidebar/Sidebar.js +22 -16
- package/dist/es/components/sidebar/SidebarItem.js +9 -8
- package/dist/es/components/sidebar/tokens.js +3 -1
- package/dist/es/components/skeleton/Skeleton.js +43 -42
- package/dist/es/components/space/Space.js +45 -41
- package/dist/es/components/space/tokens.js +7 -1
- package/dist/es/components/stepper/Stepper.js +17 -15
- package/dist/es/components/stepper/tokens.js +1 -0
- package/dist/es/components/swiper/Swiper.js +11 -8
- package/dist/es/components/swiper/SwiperPagIndicator.js +3 -2
- package/dist/es/components/switch/Switch.js +23 -23
- package/dist/es/components/tabbar/Tabbar.js +26 -26
- package/dist/es/components/tabs/Tabs.js +144 -154
- package/dist/es/components/tabs/tokens.js +3 -1
- package/dist/es/components/tag/Tag.js +38 -38
- package/dist/es/components/toast/Toast.js +3 -2
- package/dist/es/components/toast/tokens.js +1 -0
- package/dist/es/components/typography/Typography.js +23 -21
- package/dist/es/components/water-mark/WaterMark.js +65 -65
- package/dist/es/design-system/Text.js +19 -0
- package/dist/es/design-system/createComponentTokensHook.js +2 -2
- package/dist/es/design-system/index.js +1 -0
- package/dist/es/design-system/mergeTokensOverride.js +1 -4
- package/dist/es/hooks/useControllableValue.js +11 -11
- package/dist/es/hooks/useCountDown.js +18 -18
- package/dist/es/platform/measure.js +4 -2
- package/dist/es/utils/color.js +1 -4
- package/dist/es/utils/compare.js +3 -3
- package/dist/es/utils/date.js +2 -2
- package/dist/es/utils/deepMerge.js +5 -5
- package/dist/es/utils/hairline.js +1 -0
- package/dist/es/utils/render.js +1 -1
- package/dist/es/utils/validate.js +1 -2
- package/dist/types/components/dialog/tokens.d.ts +1 -0
- package/dist/types/components/image-preview/tokens.d.ts +1 -0
- package/dist/types/components/nav-bar/tokens.d.ts +1 -1
- package/dist/types/components/notice-bar/tokens.d.ts +1 -0
- package/dist/types/components/number-keyboard/tokens.d.ts +5 -0
- package/dist/types/components/picker/Picker.d.ts +1 -1
- package/dist/types/components/popup/tokens.d.ts +1 -0
- package/dist/types/components/share-sheet/tokens.d.ts +1 -0
- package/dist/types/components/stepper/tokens.d.ts +1 -0
- package/dist/types/components/tabs/tokens.d.ts +1 -0
- package/dist/types/components/toast/tokens.d.ts +1 -0
- package/dist/types/design-system/Text.d.ts +3 -0
- package/dist/types/design-system/index.d.ts +1 -0
- package/dist/types/hooks/useCountDown.d.ts +1 -1
- package/dist/types/utils/color.d.ts +0 -2
- package/dist/types/utils/date.d.ts +1 -1
- package/dist/types/utils/render.d.ts +1 -1
- package/dist/types/utils/validate.d.ts +0 -1
- package/package.json +17 -3
|
@@ -18,41 +18,40 @@ const CollapseImpl = props => {
|
|
|
18
18
|
const {
|
|
19
19
|
tokensOverride,
|
|
20
20
|
children,
|
|
21
|
-
accordion:
|
|
21
|
+
accordion: accP,
|
|
22
22
|
value,
|
|
23
23
|
defaultValue,
|
|
24
24
|
onChange,
|
|
25
|
-
border:
|
|
26
|
-
iconPosition:
|
|
25
|
+
border: borderP,
|
|
26
|
+
iconPosition: iconPosP,
|
|
27
27
|
expandIcon,
|
|
28
28
|
disabled,
|
|
29
29
|
style,
|
|
30
30
|
...rest
|
|
31
31
|
} = props;
|
|
32
32
|
const tokens = useCollapseTokens(tokensOverride);
|
|
33
|
-
const accordion =
|
|
34
|
-
const border =
|
|
35
|
-
const iconPosition =
|
|
33
|
+
const accordion = accP ?? tokens.defaults.accordion;
|
|
34
|
+
const border = borderP ?? tokens.defaults.border;
|
|
35
|
+
const iconPosition = iconPosP ?? tokens.defaults.iconPosition;
|
|
36
36
|
const {
|
|
37
37
|
colors
|
|
38
38
|
} = tokens;
|
|
39
39
|
const controlled = value !== undefined;
|
|
40
|
-
const
|
|
41
|
-
const
|
|
40
|
+
const normVal = normalizeValue(value);
|
|
41
|
+
const normDef = normalizeValue(defaultValue) ?? [];
|
|
42
42
|
const onChangeRef = useRef(onChange);
|
|
43
43
|
onChangeRef.current = onChange;
|
|
44
|
-
const [internalValue, setInternalValue] = useState(() => accordion ?
|
|
45
|
-
const activeKeys = controlled ? accordion ? (
|
|
44
|
+
const [internalValue, setInternalValue] = useState(() => accordion ? normDef.slice(0, 1) : normDef);
|
|
45
|
+
const activeKeys = controlled ? accordion ? (normVal ?? []).slice(0, 1) : normVal ?? [] : internalValue;
|
|
46
46
|
const toggle = useCallback((name, expand) => {
|
|
47
47
|
if (disabled) return;
|
|
48
48
|
const existing = activeKeys.includes(name);
|
|
49
49
|
const shouldExpand = expand ?? !existing;
|
|
50
|
-
|
|
51
|
-
if (accordion) nextKeys = shouldExpand ? [name] : existing ? [] : activeKeys;else nextKeys = shouldExpand ? existing ? activeKeys : [...activeKeys, name] : existing ? activeKeys.filter(key => key !== name) : activeKeys;
|
|
50
|
+
const nextKeys = accordion ? shouldExpand ? [name] : existing ? [] : activeKeys : shouldExpand ? existing ? activeKeys : [...activeKeys, name] : existing ? activeKeys.filter(k => k !== name) : activeKeys;
|
|
52
51
|
if (!controlled) setInternalValue(nextKeys);
|
|
53
52
|
onChangeRef.current?.(buildOutputValue(nextKeys, accordion));
|
|
54
53
|
}, [accordion, activeKeys, controlled, disabled]);
|
|
55
|
-
const
|
|
54
|
+
const ctxVal = useMemo(() => ({
|
|
56
55
|
activeKeys,
|
|
57
56
|
toggle,
|
|
58
57
|
accordion,
|
|
@@ -64,18 +63,18 @@ const CollapseImpl = props => {
|
|
|
64
63
|
}), [accordion, activeKeys, border, disabled, expandIcon, iconPosition, tokens, toggle]);
|
|
65
64
|
const renderedChildren = useMemo(() => {
|
|
66
65
|
const items = React.Children.toArray(children);
|
|
67
|
-
return items.map((child,
|
|
66
|
+
return items.map((child, i) => {
|
|
68
67
|
if (! /*#__PURE__*/React.isValidElement(child)) return child;
|
|
69
68
|
if (!isFunction(child.type) && !isObject(child.type)) return child;
|
|
70
|
-
const name = child.props.name ?? String(
|
|
69
|
+
const name = child.props.name ?? String(i);
|
|
71
70
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
72
71
|
name,
|
|
73
|
-
index
|
|
72
|
+
index: i
|
|
74
73
|
});
|
|
75
74
|
});
|
|
76
75
|
}, [children]);
|
|
77
76
|
return /*#__PURE__*/React.createElement(CollapseContext.Provider, {
|
|
78
|
-
value:
|
|
77
|
+
value: ctxVal
|
|
79
78
|
}, /*#__PURE__*/React.createElement(View, _extends({
|
|
80
79
|
style: [tokens.layout.container, border && {
|
|
81
80
|
backgroundColor: colors.background
|
|
@@ -212,9 +211,10 @@ const CollapsePanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
212
211
|
}, [colors.arrow, colors.disabled, expandIcon, isActive, mergedDisabled, rotation]);
|
|
213
212
|
const contentNode = useMemo(() => renderTextOrNode(children, {
|
|
214
213
|
color: mergedDisabled ? colors.disabled : colors.description,
|
|
214
|
+
fontFamily: typography.fontFamily,
|
|
215
215
|
fontSize: typography.descriptionSize,
|
|
216
216
|
lineHeight: Math.round(typography.descriptionSize * 1.5)
|
|
217
|
-
}), [children, colors.description, colors.disabled, mergedDisabled, typography.descriptionSize]);
|
|
217
|
+
}), [children, colors.description, colors.disabled, mergedDisabled, typography.descriptionSize, typography.fontFamily]);
|
|
218
218
|
const showInnerBorder = Boolean(panelBorder);
|
|
219
219
|
const showTopBorder = index > 0 && showInnerBorder;
|
|
220
220
|
const showHeaderBottomBorder = isActive && showInnerBorder;
|
|
@@ -11,15 +11,15 @@ const ConfigProviderBase = ({
|
|
|
11
11
|
children
|
|
12
12
|
}) => {
|
|
13
13
|
const ctxLocale = useContext(LocaleContext);
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
14
|
+
const ctxDir = useContext(DirectionContext);
|
|
15
|
+
const rLocale = locale ?? ctxLocale;
|
|
16
|
+
const rDir = direction ?? ctxDir ?? (I18nManager.isRTL ? 'rtl' : 'ltr');
|
|
17
17
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
18
18
|
value: theme
|
|
19
19
|
}, /*#__PURE__*/React.createElement(DirectionContext.Provider, {
|
|
20
|
-
value:
|
|
20
|
+
value: rDir
|
|
21
21
|
}, /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
22
|
-
value:
|
|
22
|
+
value: rLocale
|
|
23
23
|
}, /*#__PURE__*/React.createElement(PortalHost, null, children))));
|
|
24
24
|
};
|
|
25
25
|
export const ConfigProvider = /*#__PURE__*/React.memo(ConfigProviderBase);
|
|
@@ -8,10 +8,10 @@ import { useCountDownTokens } from './tokens';
|
|
|
8
8
|
const CountDownImpl = (props, ref) => {
|
|
9
9
|
const {
|
|
10
10
|
tokensOverride,
|
|
11
|
-
autoStart:
|
|
12
|
-
millisecond:
|
|
13
|
-
time:
|
|
14
|
-
format:
|
|
11
|
+
autoStart: autoStartP,
|
|
12
|
+
millisecond: msP,
|
|
13
|
+
time: timeP,
|
|
14
|
+
format: fmtP,
|
|
15
15
|
children,
|
|
16
16
|
onChange,
|
|
17
17
|
onFinish,
|
|
@@ -19,32 +19,32 @@ const CountDownImpl = (props, ref) => {
|
|
|
19
19
|
...rest
|
|
20
20
|
} = props;
|
|
21
21
|
const tokens = useCountDownTokens(tokensOverride);
|
|
22
|
-
const autoStart =
|
|
23
|
-
const millisecond =
|
|
24
|
-
const time =
|
|
25
|
-
const format =
|
|
26
|
-
const
|
|
22
|
+
const autoStart = autoStartP ?? tokens.defaults.autoStart;
|
|
23
|
+
const millisecond = msP ?? tokens.defaults.millisecond;
|
|
24
|
+
const time = timeP ?? tokens.defaults.time;
|
|
25
|
+
const format = fmtP ?? tokens.defaults.format;
|
|
26
|
+
const normTime = Math.max(0, Number(time) || 0);
|
|
27
27
|
const {
|
|
28
28
|
start,
|
|
29
29
|
pause,
|
|
30
30
|
reset,
|
|
31
31
|
current
|
|
32
32
|
} = useCountDown({
|
|
33
|
-
time:
|
|
33
|
+
time: normTime,
|
|
34
34
|
millisecond,
|
|
35
35
|
onChange,
|
|
36
36
|
onFinish
|
|
37
37
|
});
|
|
38
38
|
const resetTimer = useCallback(() => {
|
|
39
|
-
reset(
|
|
40
|
-
if (autoStart &&
|
|
41
|
-
}, [autoStart,
|
|
39
|
+
reset(normTime);
|
|
40
|
+
if (autoStart && normTime > 0) start();
|
|
41
|
+
}, [autoStart, normTime, reset, start]);
|
|
42
42
|
useEffect(() => {
|
|
43
43
|
resetTimer();
|
|
44
44
|
return () => {
|
|
45
45
|
pause();
|
|
46
46
|
};
|
|
47
|
-
}, [autoStart,
|
|
47
|
+
}, [autoStart, normTime, pause, reset, start]);
|
|
48
48
|
useImperativeHandle(ref, () => ({
|
|
49
49
|
start,
|
|
50
50
|
pause,
|
|
@@ -52,13 +52,13 @@ const CountDownImpl = (props, ref) => {
|
|
|
52
52
|
}));
|
|
53
53
|
const content = isFunction(children) ? children(current) : formatDuration(format, current);
|
|
54
54
|
const contentNode = renderTextOrNode(content, tokens.layout.text);
|
|
55
|
-
const
|
|
55
|
+
const accLabel = isText(content) ? String(content) : `${current.hours}h ${current.minutes}m ${current.seconds}s`;
|
|
56
56
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
57
57
|
accessibilityRole: "timer",
|
|
58
58
|
accessibilityLiveRegion: "polite",
|
|
59
|
-
accessibilityLabel:
|
|
59
|
+
accessibilityLabel: accLabel,
|
|
60
60
|
accessibilityValue: {
|
|
61
|
-
text:
|
|
61
|
+
text: accLabel
|
|
62
62
|
},
|
|
63
63
|
style: style
|
|
64
64
|
}, rest), contentNode);
|
|
@@ -18,16 +18,13 @@ const DatetimePickerImpl = props => {
|
|
|
18
18
|
trigger: 'onPopupVisibleChange'
|
|
19
19
|
});
|
|
20
20
|
const handleClose = useCallback(() => setPopupVisible(false), [setPopupVisible]);
|
|
21
|
-
const renderPopup = useCallback((node, popup, popupProps) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
safeAreaInsetBottom: tokens.defaults.popupSafeAreaInsetBottom
|
|
29
|
-
}, popupProps), node);
|
|
30
|
-
}, [handleClose, popupVisible, tokens.defaults.popupPlacement, tokens.defaults.popupRound, tokens.defaults.popupSafeAreaInsetBottom]);
|
|
21
|
+
const renderPopup = useCallback((node, popup, popupProps) => !popup ? node : /*#__PURE__*/React.createElement(Popup, _extends({
|
|
22
|
+
visible: popupVisible,
|
|
23
|
+
onClose: handleClose,
|
|
24
|
+
placement: tokens.defaults.popupPlacement,
|
|
25
|
+
round: tokens.defaults.popupRound,
|
|
26
|
+
safeAreaInsetBottom: tokens.defaults.popupSafeAreaInsetBottom
|
|
27
|
+
}, popupProps), node), [handleClose, popupVisible, tokens.defaults.popupPlacement, tokens.defaults.popupRound, tokens.defaults.popupSafeAreaInsetBottom]);
|
|
31
28
|
const {
|
|
32
29
|
popup,
|
|
33
30
|
popupVisible: _popupVisible,
|
|
@@ -38,8 +35,8 @@ const DatetimePickerImpl = props => {
|
|
|
38
35
|
onCancel,
|
|
39
36
|
...pickerProps
|
|
40
37
|
} = props;
|
|
41
|
-
const onConfirmRef = useRef(onConfirm)
|
|
42
|
-
|
|
38
|
+
const onConfirmRef = useRef(onConfirm);
|
|
39
|
+
const onCancelRef = useRef(onCancel);
|
|
43
40
|
onConfirmRef.current = onConfirm;
|
|
44
41
|
onCancelRef.current = onCancel;
|
|
45
42
|
const handleConfirm = useCallback(value => {
|
|
@@ -75,8 +72,8 @@ const DatePicker = props => {
|
|
|
75
72
|
...pickerProps
|
|
76
73
|
} = props;
|
|
77
74
|
const formatValue = useCallback(dateValue => {
|
|
78
|
-
const
|
|
79
|
-
const date = new Date(clamp(
|
|
75
|
+
const fb = isValidDate(dateValue) ? dateValue : new Date();
|
|
76
|
+
const date = new Date(clamp(fb.getTime(), minDate.getTime(), maxDate.getTime()));
|
|
80
77
|
if (type === 'year-month') {
|
|
81
78
|
date.setDate(1);
|
|
82
79
|
date.setHours(0, 0, 0, 0);
|
|
@@ -85,6 +82,7 @@ const DatePicker = props => {
|
|
|
85
82
|
} else if (type === 'datehour') {
|
|
86
83
|
date.setMinutes(0, 0, 0);
|
|
87
84
|
}
|
|
85
|
+
;
|
|
88
86
|
return date;
|
|
89
87
|
}, [maxDate, minDate, type]);
|
|
90
88
|
const [currentDate, setCurrentDate] = useState(() => formatValue(value ?? defaultValue));
|
|
@@ -213,8 +211,8 @@ const DatePicker = props => {
|
|
|
213
211
|
if (type === 'datetime') minute = getValue('minute') || 0;
|
|
214
212
|
return formatValue(new Date(year, month - 1, day, hour, minute));
|
|
215
213
|
}, [currentDate, formatValue, originColumns, type]);
|
|
216
|
-
const onChangeRef = useRef(onChange)
|
|
217
|
-
|
|
214
|
+
const onChangeRef = useRef(onChange);
|
|
215
|
+
const onConfirmRef = useRef(onConfirm);
|
|
218
216
|
onChangeRef.current = onChange;
|
|
219
217
|
onConfirmRef.current = onConfirm;
|
|
220
218
|
const handleChange = useCallback(values => {
|
|
@@ -222,9 +220,9 @@ const DatePicker = props => {
|
|
|
222
220
|
setCurrentDate(next);
|
|
223
221
|
onChangeRef.current?.(next);
|
|
224
222
|
}, [buildDateFromValues]);
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
const handleConfirm = useCallback(() => onConfirmRef.current?.(
|
|
223
|
+
const curDateRef = useRef(currentDate);
|
|
224
|
+
curDateRef.current = currentDate;
|
|
225
|
+
const handleConfirm = useCallback(() => onConfirmRef.current?.(curDateRef.current), []);
|
|
228
226
|
return /*#__PURE__*/React.createElement(Picker, _extends({}, pickerProps, {
|
|
229
227
|
columns: columns,
|
|
230
228
|
interactionMode: interactionMode,
|
|
@@ -256,9 +254,9 @@ const TimePicker = props => {
|
|
|
256
254
|
return `${padZero(clamp(Number.isNaN(hour) ? minHour : hour, minHour, maxHour))}:${padZero(clamp(Number.isNaN(minute) ? minMinute : minute, minMinute, maxMinute))}`;
|
|
257
255
|
}, [maxHour, maxMinute, minHour, minMinute]);
|
|
258
256
|
const [currentTime, setCurrentTime] = useState(() => {
|
|
259
|
-
const
|
|
260
|
-
timeRef.current =
|
|
261
|
-
return
|
|
257
|
+
const init = formatTime(value ?? defaultValue);
|
|
258
|
+
timeRef.current = init;
|
|
259
|
+
return init;
|
|
262
260
|
});
|
|
263
261
|
useEffect(() => {
|
|
264
262
|
const next = isString(value) ? formatTime(value) : formatTime(timeRef.current);
|
|
@@ -268,23 +266,24 @@ const TimePicker = props => {
|
|
|
268
266
|
}
|
|
269
267
|
}, [formatTime, value]);
|
|
270
268
|
const [hourValues, minuteValues] = useMemo(() => {
|
|
271
|
-
let
|
|
272
|
-
let
|
|
269
|
+
let h = times(maxHour - minHour + 1, i => padZero(minHour + i));
|
|
270
|
+
let m = times(maxMinute - minMinute + 1, i => padZero(minMinute + i));
|
|
273
271
|
if (filter) {
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
h = filter('hour', h);
|
|
273
|
+
m = filter('minute', m);
|
|
276
274
|
}
|
|
277
|
-
|
|
275
|
+
;
|
|
276
|
+
return [h, m];
|
|
278
277
|
}, [filter, maxHour, maxMinute, minHour, minMinute]);
|
|
279
|
-
const columns = useMemo(() => [hourValues.map(
|
|
280
|
-
label: formatter('hour',
|
|
281
|
-
value
|
|
282
|
-
})), minuteValues.map(
|
|
283
|
-
label: formatter('minute',
|
|
284
|
-
value
|
|
278
|
+
const columns = useMemo(() => [hourValues.map(v => ({
|
|
279
|
+
label: formatter('hour', v),
|
|
280
|
+
value: v
|
|
281
|
+
})), minuteValues.map(v => ({
|
|
282
|
+
label: formatter('minute', v),
|
|
283
|
+
value: v
|
|
285
284
|
}))], [formatter, hourValues, minuteValues]);
|
|
286
|
-
const onChangeRef = useRef(onChange)
|
|
287
|
-
|
|
285
|
+
const onChangeRef = useRef(onChange);
|
|
286
|
+
const onConfirmRef = useRef(onConfirm);
|
|
288
287
|
onChangeRef.current = onChange;
|
|
289
288
|
onConfirmRef.current = onConfirm;
|
|
290
289
|
const handleChange = useCallback(values => {
|
|
@@ -50,6 +50,7 @@ const ActionButton = props => {
|
|
|
50
50
|
color: txtColor
|
|
51
51
|
}) : renderTextOrNode(text ?? '', {
|
|
52
52
|
color: txtColor,
|
|
53
|
+
fontFamily: tokens.typography.fontFamily,
|
|
53
54
|
fontSize: tokens.typography.actionSize,
|
|
54
55
|
fontWeight: tokens.typography.actionWeight
|
|
55
56
|
}));
|
|
@@ -131,6 +132,7 @@ const DialogImpl = props => {
|
|
|
131
132
|
handler?.();
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
135
|
+
;
|
|
134
136
|
let result;
|
|
135
137
|
try {
|
|
136
138
|
result = bc(action);
|
|
@@ -138,6 +140,7 @@ const DialogImpl = props => {
|
|
|
138
140
|
handler?.();
|
|
139
141
|
return;
|
|
140
142
|
}
|
|
143
|
+
;
|
|
141
144
|
if (result === false) return;
|
|
142
145
|
if (isPromiseLike(result)) {
|
|
143
146
|
void result.then(resolved => {
|
|
@@ -150,6 +153,7 @@ const DialogImpl = props => {
|
|
|
150
153
|
});
|
|
151
154
|
return;
|
|
152
155
|
}
|
|
156
|
+
;
|
|
153
157
|
handler?.();
|
|
154
158
|
}, []);
|
|
155
159
|
const handleCloseIcon = useCallback(() => {
|
|
@@ -165,9 +169,9 @@ const DialogImpl = props => {
|
|
|
165
169
|
run('confirm', () => onConfirmRef.current?.());
|
|
166
170
|
}, [run]);
|
|
167
171
|
const scaleAnim = useRef(new Animated.Value(0.7)).current;
|
|
168
|
-
const
|
|
172
|
+
const scaleRef = useRef(null);
|
|
169
173
|
useEffect(() => {
|
|
170
|
-
|
|
174
|
+
scaleRef.current?.stop();
|
|
171
175
|
scaleAnim.setValue(visible ? 0.7 : 1);
|
|
172
176
|
const anim = Animated.timing(scaleAnim, {
|
|
173
177
|
toValue: visible ? 1 : 0.9,
|
|
@@ -176,11 +180,11 @@ const DialogImpl = props => {
|
|
|
176
180
|
useNativeDriver: nativeDriverEnabled,
|
|
177
181
|
isInteraction: false
|
|
178
182
|
});
|
|
179
|
-
|
|
183
|
+
scaleRef.current = anim;
|
|
180
184
|
anim.start();
|
|
181
185
|
}, [scaleAnim, visible, reducedMotion]);
|
|
182
186
|
useEffect(() => () => {
|
|
183
|
-
|
|
187
|
+
scaleRef.current?.stop();
|
|
184
188
|
}, []);
|
|
185
189
|
const widthStyle = useMemo(() => width ? isNumber(width) ? {
|
|
186
190
|
width
|
|
@@ -198,16 +202,18 @@ const DialogImpl = props => {
|
|
|
198
202
|
}] : null, [hContent, hTitle, tokens.spacing.paddingHorizontal, tokens.spacing.titleGap, tokens.spacing.titleIsolatedPadding, tokens.spacing.titlePaddingTop]);
|
|
199
203
|
const titleTxtStyle = useMemo(() => hTitle ? [S.title, {
|
|
200
204
|
color: tokens.colors.title,
|
|
205
|
+
fontFamily: tokens.typography.fontFamily,
|
|
201
206
|
fontSize: tokens.typography.titleSize,
|
|
202
207
|
lineHeight: tokens.typography.titleLineHeight,
|
|
203
208
|
fontWeight: tokens.typography.titleWeight
|
|
204
|
-
}, titleStyle] : null, [hTitle, titleStyle, tokens.colors.title, tokens.typography.titleLineHeight, tokens.typography.titleSize, tokens.typography.titleWeight]);
|
|
209
|
+
}, titleStyle] : null, [hTitle, titleStyle, tokens.colors.title, tokens.typography.fontFamily, tokens.typography.titleLineHeight, tokens.typography.titleSize, tokens.typography.titleWeight]);
|
|
205
210
|
const msgTxtStyle = useMemo(() => [S.msg, {
|
|
206
211
|
color: isRound ? tokens.colors.title : tokens.colors.message,
|
|
212
|
+
fontFamily: tokens.typography.fontFamily,
|
|
207
213
|
fontSize: tokens.typography.messageSize,
|
|
208
214
|
lineHeight: tokens.typography.messageLineHeight,
|
|
209
215
|
textAlign: messageAlign
|
|
210
|
-
}, messageStyle], [isRound, messageAlign, messageStyle, tokens.colors.message, tokens.colors.title, tokens.typography.messageLineHeight, tokens.typography.messageSize]);
|
|
216
|
+
}, messageStyle], [isRound, messageAlign, messageStyle, tokens.colors.message, tokens.colors.title, tokens.typography.fontFamily, tokens.typography.messageLineHeight, tokens.typography.messageSize]);
|
|
211
217
|
const msgContentStyle = useMemo(() => !hChildren ? {
|
|
212
218
|
alignItems: messageAlign === 'center' ? 'center' : messageAlign === 'left' ? 'flex-start' : 'flex-end'
|
|
213
219
|
} : null, [hChildren, messageAlign]);
|
|
@@ -223,7 +229,7 @@ const DialogImpl = props => {
|
|
|
223
229
|
right: 0,
|
|
224
230
|
top: 0
|
|
225
231
|
})], [tokens.colors.divider]);
|
|
226
|
-
const
|
|
232
|
+
const mergeOverlay = closeOnOverlayPress || closeOnClickOverlay;
|
|
227
233
|
const animStyle = useMemo(() => ({
|
|
228
234
|
transform: [{
|
|
229
235
|
scale: scaleAnim
|
|
@@ -234,7 +240,7 @@ const DialogImpl = props => {
|
|
|
234
240
|
paddingHorizontal: tokens.spacing.messagePaddingHorizontal,
|
|
235
241
|
paddingBottom: tokens.spacing.roundFooterPadding
|
|
236
242
|
}], [tokens.spacing.messagePaddingHorizontal, tokens.spacing.messagePaddingTop, tokens.spacing.roundFooterPadding]);
|
|
237
|
-
const
|
|
243
|
+
const popupBc = useCallback(() => {
|
|
238
244
|
const bc = beforeCloseRef.current;
|
|
239
245
|
if (!bc) return true;
|
|
240
246
|
try {
|
|
@@ -315,9 +321,9 @@ const DialogImpl = props => {
|
|
|
315
321
|
overlayTestID: overlayTestID,
|
|
316
322
|
closeOnBackPress: closeOnBackPress,
|
|
317
323
|
closeOnPopstate: closeOnPopstate,
|
|
318
|
-
closeOnClickOverlay:
|
|
324
|
+
closeOnClickOverlay: mergeOverlay,
|
|
319
325
|
onClickOverlay: onClickOverlay,
|
|
320
|
-
beforeClose:
|
|
326
|
+
beforeClose: popupBc,
|
|
321
327
|
onClose: onClose,
|
|
322
328
|
onClosed: onClosed,
|
|
323
329
|
contentAnimationStyle: animStyle,
|
|
@@ -62,34 +62,28 @@ const DialogPortalInstance = ({
|
|
|
62
62
|
if (!portalKeyRef.current) return;
|
|
63
63
|
attachCloser(portalKeyRef.current, close);
|
|
64
64
|
return () => {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
65
|
+
const e = dialogRegistry.get(portalKeyRef.current ?? -1);
|
|
66
|
+
if (e && e.close === close) e.close = undefined;
|
|
67
67
|
};
|
|
68
68
|
}, [close, portalKeyRef]);
|
|
69
69
|
useEffect(() => () => {
|
|
70
70
|
if (portalKeyRef.current) unregisterEntry(portalKeyRef.current);
|
|
71
71
|
}, [portalKeyRef]);
|
|
72
72
|
const handleCancel = useCallback(async () => {
|
|
73
|
-
|
|
74
|
-
if (!
|
|
75
|
-
const shouldClose = await runHook(options.onCancel);
|
|
76
|
-
if (!shouldClose) return;
|
|
73
|
+
if (!(await runHook(() => options.beforeClose?.('cancel')))) return;
|
|
74
|
+
if (!(await runHook(options.onCancel))) return;
|
|
77
75
|
if (meta.mode === 'confirm') meta.resolve?.(false);
|
|
78
76
|
close();
|
|
79
77
|
}, [close, meta, options.beforeClose, options.onCancel]);
|
|
80
78
|
const handleConfirm = useCallback(async () => {
|
|
81
|
-
|
|
82
|
-
if (!
|
|
83
|
-
const shouldClose = await runHook(options.onConfirm);
|
|
84
|
-
if (!shouldClose) return;
|
|
79
|
+
if (!(await runHook(() => options.beforeClose?.('confirm')))) return;
|
|
80
|
+
if (!(await runHook(options.onConfirm))) return;
|
|
85
81
|
if (meta.mode === 'alert' || meta.mode === 'confirm') meta.resolve?.(true);
|
|
86
82
|
close();
|
|
87
83
|
}, [close, meta, options.beforeClose, options.onConfirm]);
|
|
88
84
|
const handleClose = useCallback(async () => {
|
|
89
|
-
|
|
90
|
-
if (!
|
|
91
|
-
const shouldClose = await runHook(options.onClose);
|
|
92
|
-
if (!shouldClose) return;
|
|
85
|
+
if (!(await runHook(() => options.beforeClose?.('close')))) return;
|
|
86
|
+
if (!(await runHook(options.onClose))) return;
|
|
93
87
|
if (meta.mode === 'confirm') meta.resolve?.(false);
|
|
94
88
|
close();
|
|
95
89
|
}, [close, meta, options.beforeClose, options.onClose]);
|
|
@@ -43,6 +43,7 @@ export const createDialogTokens = foundations => {
|
|
|
43
43
|
roundButtonHeight: 40
|
|
44
44
|
},
|
|
45
45
|
typography: {
|
|
46
|
+
fontFamily: typography.fontFamily,
|
|
46
47
|
titleSize: fontSize.md,
|
|
47
48
|
titleLineHeight: fontSize.md * typography.lineHeightMultiplier,
|
|
48
49
|
titleWeight: typography.weight.semiBold,
|
|
@@ -7,11 +7,11 @@ const DividerImpl = props => {
|
|
|
7
7
|
const {
|
|
8
8
|
tokensOverride,
|
|
9
9
|
children,
|
|
10
|
-
type:
|
|
11
|
-
orientation:
|
|
12
|
-
dashed:
|
|
13
|
-
hairline:
|
|
14
|
-
contentPosition:
|
|
10
|
+
type: typeP,
|
|
11
|
+
orientation: oriP,
|
|
12
|
+
dashed: dashP,
|
|
13
|
+
hairline: hlP,
|
|
14
|
+
contentPosition: posP,
|
|
15
15
|
textStyle,
|
|
16
16
|
contentStyle,
|
|
17
17
|
lineColor,
|
|
@@ -19,51 +19,48 @@ const DividerImpl = props => {
|
|
|
19
19
|
...rest
|
|
20
20
|
} = props;
|
|
21
21
|
const tokens = useDividerTokens(tokensOverride);
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
22
|
+
const dash = dashP ?? tokens.defaults.dashed;
|
|
23
|
+
const hl = hlP ?? tokens.defaults.hairline;
|
|
24
|
+
const pos = posP ?? tokens.defaults.contentPosition;
|
|
25
|
+
const ori = typeP ?? oriP ?? 'horizontal';
|
|
26
|
+
const clr = lineColor ?? tokens.colors.line;
|
|
27
|
+
const bStyle = dash ? 'dashed' : 'solid';
|
|
28
|
+
const hasCnt = ori === 'horizontal' && isRenderable(children);
|
|
29
|
+
const cnt = hasCnt ? renderTextOrNode(children, [tokens.layout.text, {
|
|
30
30
|
color: tokens.colors.text,
|
|
31
31
|
fontSize: tokens.typography.fontSize,
|
|
32
32
|
lineHeight: tokens.typography.lineHeight,
|
|
33
33
|
fontFamily: tokens.typography.fontFamily,
|
|
34
34
|
fontWeight: tokens.typography.fontWeight
|
|
35
35
|
}, textStyle]) : null;
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
if (orientation === 'vertical') {
|
|
66
|
-
const line = hairline ? /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
const leftG = pos === 'left' ? tokens.sizing.sideMinFlex : 1;
|
|
37
|
+
const rightG = pos === 'right' ? tokens.sizing.sideMinFlex : 1;
|
|
38
|
+
const line = g => hl ? /*#__PURE__*/React.createElement(View, {
|
|
39
|
+
style: [tokens.layout.hairlineWrapper, {
|
|
40
|
+
flexGrow: g
|
|
41
|
+
}]
|
|
42
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
43
|
+
style: [createHairlineView({
|
|
44
|
+
position: 'bottom',
|
|
45
|
+
color: clr,
|
|
46
|
+
left: 0,
|
|
47
|
+
right: 0,
|
|
48
|
+
bottom: 0
|
|
49
|
+
}), {
|
|
50
|
+
borderStyle: bStyle
|
|
51
|
+
}]
|
|
52
|
+
})) : /*#__PURE__*/React.createElement(View, {
|
|
53
|
+
style: {
|
|
54
|
+
flexGrow: g,
|
|
55
|
+
flexShrink: 1,
|
|
56
|
+
height: tokens.borders.thickness,
|
|
57
|
+
borderBottomWidth: tokens.borders.thickness,
|
|
58
|
+
borderBottomColor: clr,
|
|
59
|
+
borderStyle: bStyle
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
if (ori === 'vertical') {
|
|
63
|
+
const vLine = hl ? /*#__PURE__*/React.createElement(View, {
|
|
67
64
|
style: [tokens.layout.hairlineWrapper, {
|
|
68
65
|
width: tokens.borders.thickness,
|
|
69
66
|
height: '100%'
|
|
@@ -71,20 +68,20 @@ const DividerImpl = props => {
|
|
|
71
68
|
}, /*#__PURE__*/React.createElement(View, {
|
|
72
69
|
style: [createHairlineView({
|
|
73
70
|
position: 'left',
|
|
74
|
-
color:
|
|
71
|
+
color: clr,
|
|
75
72
|
top: 0,
|
|
76
73
|
bottom: 0,
|
|
77
74
|
left: 0
|
|
78
75
|
}), {
|
|
79
|
-
borderStyle
|
|
76
|
+
borderStyle: bStyle
|
|
80
77
|
}]
|
|
81
78
|
})) : /*#__PURE__*/React.createElement(View, {
|
|
82
79
|
style: {
|
|
83
80
|
width: tokens.borders.thickness,
|
|
84
81
|
height: '100%',
|
|
85
82
|
borderLeftWidth: tokens.borders.thickness,
|
|
86
|
-
borderLeftColor:
|
|
87
|
-
borderStyle
|
|
83
|
+
borderLeftColor: clr,
|
|
84
|
+
borderStyle: bStyle
|
|
88
85
|
}
|
|
89
86
|
});
|
|
90
87
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
@@ -93,18 +90,18 @@ const DividerImpl = props => {
|
|
|
93
90
|
marginVertical: tokens.spacing.vertical,
|
|
94
91
|
flexDirection: 'column'
|
|
95
92
|
}, style]
|
|
96
|
-
}, rest),
|
|
93
|
+
}, rest), vLine);
|
|
97
94
|
}
|
|
98
95
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
99
96
|
accessibilityRole: 'separator',
|
|
100
97
|
style: [tokens.layout.container, {
|
|
101
98
|
marginVertical: tokens.spacing.vertical
|
|
102
99
|
}, style]
|
|
103
|
-
}, rest),
|
|
100
|
+
}, rest), line(hasCnt ? leftG : 1), hasCnt && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
|
|
104
101
|
style: [tokens.layout.contentWrapper, {
|
|
105
102
|
paddingHorizontal: tokens.spacing.contentPadding
|
|
106
103
|
}, contentStyle]
|
|
107
|
-
},
|
|
104
|
+
}, cnt), line(rightG)));
|
|
108
105
|
};
|
|
109
106
|
export const Divider = /*#__PURE__*/React.memo(DividerImpl);
|
|
110
107
|
Divider.displayName = 'Divider';
|