@nutui/nutui-react 3.0.0-beta.2 → 3.0.0-beta.3

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.
Files changed (82) hide show
  1. package/dist/cjs/packages/avatar/style/avatar.scss +7 -60
  2. package/dist/cjs/packages/avatar/style/style.css +5 -43
  3. package/dist/cjs/packages/badge/badge.js +5 -3
  4. package/dist/cjs/packages/badge/style/badge.scss +18 -24
  5. package/dist/cjs/packages/badge/style/style.css +17 -15
  6. package/dist/cjs/packages/calendarcard/calendarcard.js +8 -3
  7. package/dist/cjs/packages/calendarcard/style/calendarcard.scss +25 -4
  8. package/dist/cjs/packages/calendarcard/style/style.css +27 -2
  9. package/dist/cjs/packages/navbar/navbar.js +10 -5
  10. package/dist/cjs/packages/navbar/style/navbar.scss +46 -101
  11. package/dist/cjs/packages/navbar/style/style.css +44 -89
  12. package/dist/cjs/packages/pagination/pagination.js +2 -0
  13. package/dist/cjs/packages/pagination/style/pagination.scss +6 -12
  14. package/dist/cjs/packages/pagination/style/style.css +8 -14
  15. package/dist/cjs/packages/radio/index.d.ts +8 -2
  16. package/dist/cjs/packages/radio/index.js +6 -1
  17. package/dist/cjs/packages/radio/radio.d.ts +1 -4
  18. package/dist/cjs/packages/radio/radio.js +0 -2
  19. package/dist/cjs/packages/radio/style/radio.scss +1 -0
  20. package/dist/cjs/packages/radiogroup/radiogroup.js +1 -1
  21. package/dist/cjs/packages/safearea/style/safearea.scss +1 -1
  22. package/dist/cjs/packages/safearea/style/style.css +1 -1
  23. package/dist/cjs/packages/searchbar/style/searchbar.scss +10 -7
  24. package/dist/cjs/packages/searchbar/style/style.css +11 -8
  25. package/dist/cjs/packages/skeleton/style/style.css +5 -43
  26. package/dist/cjs/packages/tabbar/style/style.css +17 -15
  27. package/dist/cjs/packages/tabbaritem/style/style.css +17 -15
  28. package/dist/es/packages/avatar/style/avatar.scss +7 -60
  29. package/dist/es/packages/avatar/style/style.css +5 -43
  30. package/dist/es/packages/badge/badge.d.ts +7 -35
  31. package/dist/es/packages/badge/badge.js +5 -3
  32. package/dist/es/packages/badge/style/badge.scss +18 -24
  33. package/dist/es/packages/badge/style/style.css +17 -15
  34. package/dist/es/packages/calendarcard/calendarcard.d.ts +13 -65
  35. package/dist/es/packages/calendarcard/calendarcard.js +9 -4
  36. package/dist/es/packages/calendarcard/style/calendarcard.scss +25 -4
  37. package/dist/es/packages/calendarcard/style/style.css +27 -2
  38. package/dist/es/packages/loading/loading.d.ts +3 -15
  39. package/dist/es/packages/navbar/navbar.js +10 -5
  40. package/dist/es/packages/navbar/style/navbar.scss +46 -101
  41. package/dist/es/packages/navbar/style/style.css +44 -89
  42. package/dist/es/packages/pagination/pagination.js +2 -0
  43. package/dist/es/packages/pagination/style/pagination.scss +6 -12
  44. package/dist/es/packages/pagination/style/style.css +8 -14
  45. package/dist/es/packages/radio/index.d.ts +8 -2
  46. package/dist/es/packages/radio/index.js +5 -1
  47. package/dist/es/packages/radio/radio.d.ts +10 -49
  48. package/dist/es/packages/radio/radio.js +0 -2
  49. package/dist/es/packages/radio/style/radio.scss +1 -0
  50. package/dist/es/packages/radiogroup/radiogroup.d.ts +7 -35
  51. package/dist/es/packages/radiogroup/radiogroup.js +1 -1
  52. package/dist/es/packages/safearea/safearea.d.ts +1 -5
  53. package/dist/es/packages/safearea/style/safearea.scss +1 -1
  54. package/dist/es/packages/safearea/style/style.css +1 -1
  55. package/dist/es/packages/searchbar/searchbar.d.ts +19 -95
  56. package/dist/es/packages/searchbar/style/searchbar.scss +10 -7
  57. package/dist/es/packages/searchbar/style/style.css +11 -8
  58. package/dist/es/packages/skeleton/style/style.css +5 -43
  59. package/dist/es/packages/tabbar/style/style.css +17 -15
  60. package/dist/es/packages/tabbaritem/style/style.css +17 -15
  61. package/dist/es/packages/video/video.d.ts +5 -25
  62. package/dist/nutui.react.umd.js +101 -89
  63. package/dist/style.css +1 -1
  64. package/dist/styles/themes/default.scss +23 -23
  65. package/dist/styles/variables.scss +7 -4
  66. package/package.json +1 -1
  67. package/dist/cjs/packages/nutui.react.build.rn.d.ts +0 -203
  68. package/dist/cjs/packages/nutui.react.build.rn.js +0 -418
  69. package/dist/cjs/packages/nutui.react.rn.d.ts +0 -304
  70. package/dist/cjs/packages/nutui.react.rn.js +0 -519
  71. package/dist/cjs/packages/popup/index.rn.d.ts +0 -3
  72. package/dist/cjs/packages/popup/index.rn.js +0 -12
  73. package/dist/cjs/packages/popup/popup.rn.d.ts +0 -26
  74. package/dist/cjs/packages/popup/popup.rn.js +0 -186
  75. package/dist/es/packages/nutui.react.build.rn.d.ts +0 -203
  76. package/dist/es/packages/nutui.react.build.rn.js +0 -203
  77. package/dist/es/packages/nutui.react.rn.d.ts +0 -304
  78. package/dist/es/packages/nutui.react.rn.js +0 -304
  79. package/dist/es/packages/popup/index.rn.d.ts +0 -3
  80. package/dist/es/packages/popup/index.rn.js +0 -2
  81. package/dist/es/packages/popup/popup.rn.d.ts +0 -26
  82. package/dist/es/packages/popup/popup.rn.js +0 -174
@@ -2,70 +2,18 @@ import React, { ReactNode } from 'react';
2
2
  import { BasicComponent } from "../../utils/typings";
3
3
  import type { CalendarCardDay, CalendarCardMonth, CalendarCardRef, CalendarCardValue } from './types';
4
4
  export interface CalendarCardProps extends BasicComponent {
5
- /**
6
- * 类型,单个日期 single,多个日期 multiple,日期范围 range,周选择 week
7
- * @default single
8
- */
9
- type: 'single' | 'multiple' | 'range' | 'week'
10
- /**
11
- * 受控模式下的值,与 onChange 搭配使用
12
- * @default -
13
- */
14
- value?: CalendarCardValue
15
- /**
16
- * 默认值,单个日期 Date 格式,多个日期/范围选择 Date[] 格式
17
- * @default -
18
- */
19
- defaultValue?: CalendarCardValue
20
- /**
21
- * 设置周起始日,0 为周日,1 为周一
22
- * @default 1
23
- */
24
- firstDayOfWeek?: number
25
- /**
26
- * 限制范围开始日期
27
- * @default -
28
- */
29
- startDate?: Date
30
- /**
31
- * 限制范围结束日期
32
- * @default -
33
- */
34
- endDate?: Date
35
- /**
36
- * 设置不可选日期
37
- * @default -
38
- */
39
- disableDay?: (day: CalendarCardDay) => boolean
40
- /**
41
- * 日期信息
42
- * @default -
43
- */
44
- renderDay?: (day: CalendarCardDay) => ReactNode
45
- /**
46
- * 日期顶部信息
47
- * @default -
48
- */
49
- renderDayTop?: (day: CalendarCardDay) => ReactNode
50
- /**
51
- * 日期底部信息
52
- * @default -
53
- */
54
- renderDayBottom?: (day: CalendarCardDay) => ReactNode
55
- /**
56
- * 点击后触发
57
- * @default -
58
- */
59
- onDayClick?: (day: CalendarCardDay) => void
60
- /**
61
- * 切换月份时触发
62
- * @default -
63
- */
64
- onPageChange: (data: CalendarCardMonth) => void
65
- /**
66
- * 选择值发生变化时触发
67
- * @default -
68
- */
69
- onChange: (value: CalendarCardValue) => void
5
+ type: 'single' | 'multiple' | 'range' | 'week';
6
+ value?: CalendarCardValue;
7
+ defaultValue?: CalendarCardValue;
8
+ firstDayOfWeek?: number;
9
+ startDate?: Date;
10
+ endDate?: Date;
11
+ disableDay?: (day: CalendarCardDay) => boolean;
12
+ renderDay?: (day: CalendarCardDay) => ReactNode;
13
+ renderDayTop?: (day: CalendarCardDay) => ReactNode;
14
+ renderDayBottom?: (day: CalendarCardDay) => ReactNode;
15
+ onDayClick?: (day: CalendarCardDay) => void;
16
+ onPageChange: (data: CalendarCardMonth) => void;
17
+ onChange: (value: CalendarCardValue) => void;
70
18
  }
71
19
  export declare const CalendarCard: React.ForwardRefExoticComponent<Partial<CalendarCardProps> & React.RefAttributes<CalendarCardRef>>;
@@ -2,7 +2,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
2
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
3
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
4
4
  import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
5
- import React, { useState, useEffect } from "react";
5
+ import React, { useEffect, useState, useCallback } from "react";
6
6
  import classNames from "classnames";
7
7
  import { ArrowLeft, ArrowRight, DoubleLeft, DoubleRight } from "./icon";
8
8
  import { ComponentDefaults } from "../../utils/typings";
@@ -70,7 +70,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
70
70
  onChange === null || onChange === void 0 ? void 0 : onChange(val);
71
71
  }
72
72
  };
73
- var getDays = function(month) {
73
+ var getDays = useCallback(function(month) {
74
74
  var y = month.year;
75
75
  var m = month.month;
76
76
  var days = _to_consumable_array(getPrevMonthDays(y, m, firstDayOfWeek)).concat(_to_consumable_array(getCurrentMonthDays(y, m)));
@@ -87,13 +87,18 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
87
87
  });
88
88
  }
89
89
  return days;
90
- };
90
+ }, [
91
+ firstDayOfWeek
92
+ ]);
91
93
  useEffect(function() {
92
94
  var newDays = getDays(month);
93
95
  setDays(newDays);
94
96
  onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(month);
95
97
  }, [
96
- month
98
+ month,
99
+ getDays,
100
+ onPageChange,
101
+ firstDayOfWeek
97
102
  ]);
98
103
  var isSameDay = function(day1, day2) {
99
104
  return (day1 === null || day1 === void 0 ? void 0 : day1.year) === (day2 === null || day2 === void 0 ? void 0 : day2.year) && (day1 === null || day1 === void 0 ? void 0 : day1.month) === (day2 === null || day2 === void 0 ? void 0 : day2.month) && (day1 === null || day1 === void 0 ? void 0 : day1.date) === (day2 === null || day2 === void 0 ? void 0 : day2.date);
@@ -55,6 +55,9 @@
55
55
 
56
56
  &-top,
57
57
  &-bottom {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
58
61
  width: 100%;
59
62
  height: 12px;
60
63
  font-size: 12px;
@@ -67,14 +70,22 @@
67
70
 
68
71
  &.active {
69
72
  background-color: $calendar-active-background-color;
70
- color: $color-primary-text;
71
73
  border-radius: $calendar-day-active-border-radius;
74
+ .nut-calendarcard-day-top,
75
+ .nut-calendarcard-day-inner,
76
+ .nut-calendarcard-day-bottom {
77
+ color: $color-primary-text;
78
+ }
72
79
  }
73
80
 
74
81
  &.start,
75
82
  &.end {
76
83
  background-color: $calendar-active-background-color;
77
- color: $color-primary-text;
84
+ .nut-calendarcard-day-top,
85
+ .nut-calendarcard-day-inner,
86
+ .nut-calendarcard-day-bottom {
87
+ color: $color-primary-text;
88
+ }
78
89
  }
79
90
 
80
91
  &.start {
@@ -89,7 +100,11 @@
89
100
 
90
101
  &.mid {
91
102
  background-color: $calendar-choose-background-color;
92
- color: $calendar-choose-color;
103
+ .nut-calendarcard-day-top,
104
+ .nut-calendarcard-day-inner,
105
+ .nut-calendarcard-day-bottom {
106
+ color: $calendar-choose-color;
107
+ }
93
108
  }
94
109
 
95
110
  .nut-calendar-day-info {
@@ -100,7 +115,11 @@
100
115
  &.prev,
101
116
  &.next,
102
117
  &.disabled {
103
- color: $calendar-disable-color;
118
+ .nut-calendarcard-day-top,
119
+ .nut-calendarcard-day-inner,
120
+ .nut-calendarcard-day-bottom {
121
+ color: $calendar-disable-color;
122
+ }
104
123
  cursor: not-allowed;
105
124
  }
106
125
  }
@@ -128,11 +147,13 @@
128
147
  }
129
148
  }
130
149
  }
150
+
131
151
  &-day {
132
152
  &.start,
133
153
  &.end {
134
154
  border-radius: 0;
135
155
  }
156
+
136
157
  &.start {
137
158
  border-top-right-radius: $calendar-day-active-border-radius;
138
159
  border-bottom-right-radius: $calendar-day-active-border-radius;
@@ -47,6 +47,9 @@
47
47
  cursor: auto;
48
48
  }
49
49
  .nut-calendarcard-day-top, .nut-calendarcard-day-bottom {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
50
53
  width: 100%;
51
54
  height: 12px;
52
55
  font-size: 12px;
@@ -57,11 +60,21 @@
57
60
  }
58
61
  .nut-calendarcard-day.active {
59
62
  background-color: var(--nutui-calendar-active-background-color, var(--nutui-color-primary, #ff0f23));
60
- color: var(--nutui-color-primary-text, #ffffff);
61
63
  border-radius: var(--nutui-calendar-day-active-border-radius, 4px);
62
64
  }
65
+ .nut-calendarcard-day.active .nut-calendarcard-day-top,
66
+ .nut-calendarcard-day.active .nut-calendarcard-day-inner,
67
+ .nut-calendarcard-day.active .nut-calendarcard-day-bottom {
68
+ color: var(--nutui-color-primary-text, #ffffff);
69
+ }
63
70
  .nut-calendarcard-day.start, .nut-calendarcard-day.end {
64
71
  background-color: var(--nutui-calendar-active-background-color, var(--nutui-color-primary, #ff0f23));
72
+ }
73
+ .nut-calendarcard-day.start .nut-calendarcard-day-top,
74
+ .nut-calendarcard-day.start .nut-calendarcard-day-inner,
75
+ .nut-calendarcard-day.start .nut-calendarcard-day-bottom, .nut-calendarcard-day.end .nut-calendarcard-day-top,
76
+ .nut-calendarcard-day.end .nut-calendarcard-day-inner,
77
+ .nut-calendarcard-day.end .nut-calendarcard-day-bottom {
65
78
  color: var(--nutui-color-primary-text, #ffffff);
66
79
  }
67
80
  .nut-calendarcard-day.start {
@@ -74,15 +87,27 @@
74
87
  }
75
88
  .nut-calendarcard-day.mid {
76
89
  background-color: var(--nutui-calendar-choose-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
90
+ }
91
+ .nut-calendarcard-day.mid .nut-calendarcard-day-top,
92
+ .nut-calendarcard-day.mid .nut-calendarcard-day-inner,
93
+ .nut-calendarcard-day.mid .nut-calendarcard-day-bottom {
77
94
  color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
78
95
  }
79
96
  .nut-calendarcard-day .nut-calendar-day-info {
80
97
  color: var(--nutui-color-primary-text, #ffffff);
81
98
  }
82
99
  .nut-calendarcard-day.prev, .nut-calendarcard-day.next, .nut-calendarcard-day.disabled {
83
- color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
84
100
  cursor: not-allowed;
85
101
  }
102
+ .nut-calendarcard-day.prev .nut-calendarcard-day-top,
103
+ .nut-calendarcard-day.prev .nut-calendarcard-day-inner,
104
+ .nut-calendarcard-day.prev .nut-calendarcard-day-bottom, .nut-calendarcard-day.next .nut-calendarcard-day-top,
105
+ .nut-calendarcard-day.next .nut-calendarcard-day-inner,
106
+ .nut-calendarcard-day.next .nut-calendarcard-day-bottom, .nut-calendarcard-day.disabled .nut-calendarcard-day-top,
107
+ .nut-calendarcard-day.disabled .nut-calendarcard-day-inner,
108
+ .nut-calendarcard-day.disabled .nut-calendarcard-day-bottom {
109
+ color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
110
+ }
86
111
 
87
112
  [dir=rtl] .nut-calendarcard-header-left .left, [dir=rtl] .nut-calendarcard-header-right .left,
88
113
  .nut-rtl .nut-calendarcard-header-left .left,
@@ -3,20 +3,8 @@ import { BasicComponent } from "../../utils/typings";
3
3
  export type LoadingType = 'spinner' | 'circular';
4
4
  export type LoadingDirection = 'horizontal' | 'vertical';
5
5
  export interface LoadingProps extends BasicComponent {
6
- /**
7
- * loading图标的样式
8
- * @default circular
9
- */
10
- type: LoadingType
11
- /**
12
- * loading图标和文字的排列方式
13
- * @default horizontal
14
- */
15
- direction: LoadingDirection
16
- /**
17
- * 自定义loading的图标
18
- * @default -
19
- */
20
- icon?: ReactNode
6
+ type: LoadingType;
7
+ direction: LoadingDirection;
8
+ icon?: ReactNode;
21
9
  }
22
10
  export declare const Loading: FunctionComponent<Partial<LoadingProps> & React.HTMLAttributes<HTMLDivElement>>;
@@ -4,6 +4,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
4
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
5
  import React, { useEffect, useRef, useState } from "react";
6
6
  import classNames from "classnames";
7
+ import { useRtl } from "../configprovider/index";
7
8
  import { ComponentDefaults } from "../../utils/typings";
8
9
  import { getRect } from "../../utils/use-client-rect";
9
10
  import { SafeArea } from "../safearea/safearea";
@@ -20,6 +21,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
20
21
  export var NavBar = function(props) {
21
22
  var _$_object_spread = _object_spread({}, defaultProps, props), right = _$_object_spread.right, left = _$_object_spread.left, titleAlign = _$_object_spread.titleAlign, className = _$_object_spread.className, style = _$_object_spread.style, back = _$_object_spread.back, fixed = _$_object_spread.fixed, safeAreaInsetTop = _$_object_spread.safeAreaInsetTop, placeholder = _$_object_spread.placeholder, zIndex = _$_object_spread.zIndex, onBackClick = _$_object_spread.onBackClick;
22
23
  var classPrefix = 'nut-navbar';
24
+ var rtl = useRtl();
23
25
  var children = Array.isArray(props.children) ? props.children : [
24
26
  props.children
25
27
  ];
@@ -63,11 +65,12 @@ export var NavBar = function(props) {
63
65
  back
64
66
  ]);
65
67
  var renderLeft = function() {
68
+ var _obj, _obj1;
66
69
  return back || left ? /*#__PURE__*/ React.createElement("div", {
67
- className: "".concat(classPrefix, "-left"),
70
+ className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-left"), true), _define_property(_obj, "".concat(classPrefix, "-left-align-").concat(titleAlign), true), _define_property(_obj, "".concat(classPrefix, "-left-rtl"), rtl), _obj)),
68
71
  ref: leftRef
69
72
  }, back && /*#__PURE__*/ React.createElement("div", {
70
- className: "".concat(classPrefix, "-left-back"),
73
+ className: classNames((_obj1 = {}, _define_property(_obj1, "".concat(classPrefix, "-left-back"), true), _define_property(_obj1, "".concat(classPrefix, "-left-back-align-").concat(titleAlign), true), _define_property(_obj1, "".concat(classPrefix, "-left-back-children"), left), _define_property(_obj1, "".concat(classPrefix, "-left-back-children-rtl"), left && rtl), _obj1)),
71
74
  onClick: function(e) {
72
75
  return onBackClick(e);
73
76
  }
@@ -82,14 +85,16 @@ export var NavBar = function(props) {
82
85
  width: contentRealWidth
83
86
  };
84
87
  }
88
+ var _obj;
85
89
  return /*#__PURE__*/ React.createElement("div", {
86
- className: "".concat(classPrefix, "-title"),
90
+ className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-title"), true), _define_property(_obj, "".concat(classPrefix, "-title-align-").concat(titleAlign), true), _obj)),
87
91
  style: titleStyle
88
92
  }, children);
89
93
  };
90
94
  var renderRight = function() {
95
+ var _obj;
91
96
  return /*#__PURE__*/ React.createElement("div", {
92
- className: "".concat(classPrefix, "-right"),
97
+ className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-right"), true), _define_property(_obj, "".concat(classPrefix, "-right-align-").concat(titleAlign), true), _define_property(_obj, "".concat(classPrefix, "-right-rtl"), rtl), _obj)),
93
98
  ref: rightRef
94
99
  }, right);
95
100
  };
@@ -101,7 +106,7 @@ export var NavBar = function(props) {
101
106
  }, renderLeft(), renderContent(), renderRight());
102
107
  };
103
108
  var _obj;
104
- var classes = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-fixed"), fixed), _define_property(_obj, "".concat(classPrefix, "-title-align-").concat(titleAlign), true), _obj));
109
+ var classes = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-fixed"), fixed), _define_property(_obj, "".concat(classPrefix, "-safe-area-inset-top"), safeAreaInsetTop), _define_property(_obj, "".concat(classPrefix, "-align-").concat(titleAlign), true), _define_property(_obj, "".concat(classPrefix, "-rtl"), rtl), _obj));
105
110
  var cls = classNames(classPrefix, classes, className);
106
111
  return /*#__PURE__*/ React.createElement(React.Fragment, null, safeAreaInsetTop && /*#__PURE__*/ React.createElement(SafeArea, {
107
112
  position: "top"
@@ -2,6 +2,8 @@
2
2
  width: $navbar-width;
3
3
  position: relative;
4
4
  display: flex;
5
+ flex-direction: row;
6
+ justify-content: center;
5
7
  align-items: center;
6
8
  height: $navbar-height;
7
9
  box-sizing: border-box;
@@ -16,6 +18,7 @@
16
18
  position: fixed;
17
19
  top: 0;
18
20
  left: 0;
21
+ right: 0;
19
22
  width: 100%;
20
23
  }
21
24
 
@@ -24,27 +27,32 @@
24
27
  width: 100%;
25
28
  }
26
29
 
30
+ &-safe-area-inset-top {
31
+ padding-top: constant(safe-area-inset-top);
32
+ padding-top: env(safe-area-inset-top);
33
+ }
34
+
35
+ &-align-left {
36
+ padding-left: 14px;
37
+ }
38
+
27
39
  &-title {
28
- min-width: 53%;
29
- margin: 0 auto;
40
+ width: 50%;
41
+ height: 100%;
30
42
  text-align: center;
31
43
  display: flex;
44
+ flex-direction: row;
32
45
  align-items: center;
33
46
  justify-content: center;
34
47
  font-size: $navbar-title-font-size;
35
48
  font-weight: $navbar-title-font-weight;
36
49
  color: $navbar-title-font-color;
37
-
38
- .nut-tabs-titles {
39
- background: transparent;
40
-
41
- &-item-text {
42
- color: $color-title;
43
- }
44
- }
45
-
46
- .nut-tabpane {
47
- display: none;
50
+ &-align-left {
51
+ min-width: 0;
52
+ flex: 1;
53
+ justify-content: flex-start;
54
+ padding: 0 8px;
55
+ text-align: left;
48
56
  }
49
57
  }
50
58
 
@@ -59,125 +67,62 @@
59
67
  bottom: 0;
60
68
  display: flex;
61
69
  align-items: center;
70
+ flex-direction: row;
71
+ height: 100%;
62
72
  cursor: pointer;
63
73
  padding: 0 14px;
64
-
74
+ /* #ifndef rn harmony jd h5 weapp*/
65
75
  .nut-icon,
66
76
  .nutui-iconfont {
67
77
  width: 20px;
68
78
  height: 20px;
69
79
  font-size: 20px;
70
80
  }
81
+ /* #endif */
71
82
  }
72
83
 
73
84
  &-left {
74
85
  left: 0;
86
+ &-rtl {
87
+ left: auto;
88
+ right: 0;
89
+ }
90
+ &-align-left {
91
+ position: static;
92
+ padding: 0;
93
+ }
75
94
 
76
95
  &-back {
77
96
  display: flex;
97
+ flex-direction: row;
78
98
  align-items: center;
79
99
  justify-content: center;
80
- margin-right: 10px;
100
+ &-children {
101
+ margin-right: 10px;
102
+ &-rtl {
103
+ margin-right: 0;
104
+ margin-left: 10px;
105
+ }
106
+ }
81
107
  }
82
108
  }
83
109
 
84
110
  &-right {
85
111
  right: 0;
86
-
87
- .nut-icon {
88
- margin-left: 12px;
89
-
90
- &:first-child {
91
- margin-left: 0;
92
- }
93
- }
94
- }
95
-
96
- &-title-align-left {
97
- padding-left: 14px;
98
-
99
- .nut-navbar-left {
100
- position: static;
101
- padding: 0;
102
-
103
- .nut-icon {
104
- margin-left: 12px;
105
-
106
- &:first-child {
107
- margin-left: 0;
108
- }
109
- }
112
+ &-rtl {
113
+ right: auto;
114
+ left: 0;
110
115
  }
111
- .nut-navbar-right {
116
+ &-align-left {
112
117
  position: static;
113
118
  display: inline-flex;
114
119
  white-space: nowrap;
115
120
  padding-left: 0;
116
121
  }
117
- .nut-navbar-left-back {
118
- margin-right: 0;
119
- }
120
-
121
- .nut-navbar-title {
122
- min-width: 0;
123
- margin: 0;
124
- flex: 1;
125
- justify-content: flex-start;
126
- padding: 0 8px;
127
- text-align: left;
128
- }
129
122
  }
130
- }
131
-
132
- [dir='rtl'] .nut-navbar,
133
- .nut-rtl .nut-navbar {
134
- &-fixed {
135
- left: auto;
136
- right: 0;
137
- }
138
-
139
- &-left {
140
- left: auto;
141
- right: 0;
123
+ &-rtl {
142
124
  .nut-icon-ArrowLeft {
143
125
  transform: rotateY(180deg);
144
126
  }
145
- &-back {
146
- margin-right: 0;
147
- margin-left: 10px;
148
- }
149
- }
150
-
151
- &-right {
152
- right: auto;
153
- left: 0;
154
- .nut-icon {
155
- margin-left: 0;
156
- margin-right: 12px;
157
-
158
- &:first-child {
159
- margin-left: 0;
160
- margin-right: 0;
161
- }
162
- }
163
- }
164
-
165
- &-title-align-left {
166
- .nut-navbar-left {
167
- .nut-icon-ArrowLeft {
168
- margin-left: 0;
169
- margin-right: 12px;
170
-
171
- &:first-child {
172
- margin-left: 0;
173
- margin-right: 0;
174
- }
175
- }
176
- }
177
-
178
- .nut-navbar-left-back {
179
- margin-right: 0;
180
- margin-left: 0;
181
- }
182
127
  }
183
128
  }