@trionesdev/antd-taro-react 0.0.2-beta.2 → 0.0.2-beta.21

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 (175) hide show
  1. package/dist/ActionSheet/ActionSheet.d.ts +25 -0
  2. package/dist/ActionSheet/ActionSheet.js +77 -0
  3. package/dist/ActionSheet/index.d.ts +1 -1
  4. package/dist/ActionSheet/index.js +1 -1
  5. package/dist/ActionSheet/style.scss +52 -0
  6. package/dist/Button/button.d.ts +2 -1
  7. package/dist/Button/button.js +2 -3
  8. package/dist/Button/style.scss +65 -50
  9. package/dist/Calendar/calendar-grid.d.ts +10 -9
  10. package/dist/Calendar/calendar-grid.js +37 -62
  11. package/dist/Calendar/calendar-header.d.ts +3 -2
  12. package/dist/Calendar/calendar-header.js +9 -6
  13. package/dist/Calendar/calendar-range.d.ts +4 -3
  14. package/dist/Calendar/calendar-range.js +22 -18
  15. package/dist/Calendar/calendar.d.ts +5 -4
  16. package/dist/Calendar/calendar.js +30 -17
  17. package/dist/Calendar/style.scss +8 -5
  18. package/dist/Calendar/touchable-calendar-grid.d.ts +6 -5
  19. package/dist/Calendar/touchable-calendar-grid.js +87 -86
  20. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +3 -2
  21. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +40 -57
  22. package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +3 -2
  23. package/dist/CalendarDatetimePicker/DateTimeSwitch.js +2 -2
  24. package/dist/CalendarDatetimePicker/style.scss +11 -3
  25. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +9 -0
  26. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +60 -0
  27. package/dist/CalendarDatetimePickerCell/index.d.ts +3 -0
  28. package/dist/CalendarDatetimePickerCell/index.js +2 -0
  29. package/dist/CalendarPicker/{calendar-picker.js → CalendarPicker.js} +10 -6
  30. package/dist/CalendarPicker/{calendar-range-picker.js → CalendarRangePicker.js} +8 -6
  31. package/dist/CalendarPicker/index.d.ts +3 -4
  32. package/dist/CalendarPicker/index.js +2 -2
  33. package/dist/CalendarPicker/style.scss +7 -6
  34. package/dist/CalendarPicker/types.d.ts +8 -6
  35. package/dist/CalendarPicker/types.js +1 -1
  36. package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +11 -0
  37. package/dist/CalendarPickerCell/CalendarPickerCell.js +54 -0
  38. package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +11 -0
  39. package/dist/CalendarPickerCell/CalendarRangePickerCell.js +56 -0
  40. package/dist/CalendarPickerCell/index.d.ts +8 -0
  41. package/dist/CalendarPickerCell/index.js +5 -0
  42. package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
  43. package/dist/CascaderPicker/cascader-picker.js +90 -0
  44. package/dist/CascaderPicker/index.d.ts +1 -1
  45. package/dist/CascaderPicker/index.js +1 -1
  46. package/dist/CascaderPicker/style.scss +45 -0
  47. package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +20 -0
  48. package/dist/CascaderPickerCell/CascaderPickerCell.js +70 -0
  49. package/dist/CascaderPickerCell/index.d.ts +3 -0
  50. package/dist/CascaderPickerCell/index.js +2 -0
  51. package/dist/DatePicker/DatePicker.d.ts +18 -0
  52. package/dist/DatePicker/DatePicker.js +310 -0
  53. package/dist/DatePicker/index.d.ts +4 -0
  54. package/dist/DatePicker/index.js +3 -0
  55. package/dist/DatePicker/style.scss +41 -0
  56. package/dist/DatePicker/types.d.ts +1 -0
  57. package/dist/DatePicker/types.js +1 -0
  58. package/dist/DatePickerCell/DatePickerCell.d.ts +16 -0
  59. package/dist/DatePickerCell/DatePickerCell.js +78 -0
  60. package/dist/DatePickerCell/index.d.ts +3 -0
  61. package/dist/DatePickerCell/index.js +2 -0
  62. package/dist/FetchPicker/FetchPicker.d.ts +78 -0
  63. package/dist/FetchPicker/FetchPicker.js +310 -0
  64. package/dist/FetchPicker/index.d.ts +4 -0
  65. package/dist/FetchPicker/index.js +3 -0
  66. package/dist/FetchPicker/styles.scss +130 -0
  67. package/dist/FloatButton/FloatButton.d.ts +19 -0
  68. package/dist/FloatButton/FloatButton.js +60 -0
  69. package/dist/FloatButton/FloatButtonGroup.d.ts +21 -0
  70. package/dist/FloatButton/FloatButtonGroup.js +141 -0
  71. package/dist/FloatButton/context.d.ts +10 -0
  72. package/dist/FloatButton/context.js +2 -0
  73. package/dist/FloatButton/index.d.ts +10 -0
  74. package/dist/FloatButton/index.js +5 -0
  75. package/dist/FloatButton/style.scss +126 -0
  76. package/dist/Form/FormItem/form-item-content.d.ts +17 -0
  77. package/dist/Form/FormItem/form-item-content.js +39 -0
  78. package/dist/Form/FormItem/form-item-label.d.ts +13 -0
  79. package/dist/Form/FormItem/form-item-label.js +29 -0
  80. package/dist/Form/FormItem/form-item.d.ts +23 -0
  81. package/dist/Form/FormItem/form-item.js +77 -0
  82. package/dist/Form/FormItem/index.d.ts +5 -0
  83. package/dist/Form/FormItem/index.js +3 -0
  84. package/dist/Form/index.d.ts +9 -2
  85. package/dist/Form/index.js +5 -1
  86. package/dist/Form/style.scss +100 -0
  87. package/dist/FormCell/index.d.ts +3 -0
  88. package/dist/FormCell/index.js +2 -0
  89. package/dist/ImagesPreview/ImagesPreview.js +4 -3
  90. package/dist/ImagesWall/ImagesWall.js +1 -1
  91. package/dist/Input/index.d.ts +17 -2
  92. package/dist/Input/index.js +13 -1
  93. package/dist/Input/index.scss +282 -0
  94. package/dist/Input/input-affix-wrapper.d.ts +13 -0
  95. package/dist/Input/input-affix-wrapper.js +37 -0
  96. package/dist/Input/input-digit.d.ts +7 -0
  97. package/dist/Input/input-digit.js +53 -0
  98. package/dist/Input/input-number.d.ts +7 -0
  99. package/dist/Input/input-number.js +50 -0
  100. package/dist/Input/input-opt.d.ts +16 -0
  101. package/dist/Input/input-opt.js +87 -0
  102. package/dist/Input/input-password.d.ts +8 -0
  103. package/dist/Input/input-password.js +49 -0
  104. package/dist/Input/input.d.ts +3 -0
  105. package/dist/Input/input.js +7 -0
  106. package/dist/Input/taro-input.d.ts +8 -0
  107. package/dist/Input/taro-input.js +70 -0
  108. package/dist/Input/textarea.d.ts +15 -0
  109. package/dist/Input/textarea.js +52 -0
  110. package/dist/Input/types.d.ts +20 -0
  111. package/dist/Input/types.js +2 -0
  112. package/dist/Loading/index.d.ts +4 -0
  113. package/dist/Loading/index.js +3 -0
  114. package/dist/Overlay/Overlay.d.ts +17 -0
  115. package/dist/Overlay/Overlay.js +100 -0
  116. package/dist/Overlay/index.d.ts +4 -0
  117. package/dist/Overlay/index.js +3 -0
  118. package/dist/Overlay/style.scss +20 -0
  119. package/dist/Picker/Picker.d.ts +27 -0
  120. package/dist/Picker/Picker.js +100 -0
  121. package/dist/Picker/index.d.ts +1 -1
  122. package/dist/Picker/index.js +1 -1
  123. package/dist/Picker/style.scss +41 -0
  124. package/dist/PickerView/PickerView.d.ts +4 -0
  125. package/dist/PickerView/PickerView.js +71 -0
  126. package/dist/PickerView/index.d.ts +2 -2
  127. package/dist/PickerView/index.js +1 -1
  128. package/dist/PickerView/style.scss +13 -0
  129. package/dist/PickerView/types.d.ts +15 -0
  130. package/dist/PickerView/types.js +1 -0
  131. package/dist/Popup/Popup.d.ts +48 -0
  132. package/dist/Popup/Popup.js +135 -0
  133. package/dist/Popup/index.d.ts +2 -1
  134. package/dist/Popup/index.js +2 -1
  135. package/dist/Popup/style.scss +126 -0
  136. package/dist/Progress/index.d.ts +1 -1
  137. package/dist/Progress/index.js +1 -1
  138. package/dist/Segmented/index.d.ts +3 -0
  139. package/dist/Segmented/index.js +2 -0
  140. package/dist/SideBar/side-bar.js +3 -2
  141. package/dist/SideBar/style.scss +6 -6
  142. package/dist/Stepper/index.d.ts +3 -0
  143. package/dist/Stepper/index.js +2 -0
  144. package/dist/Toast/Toast.d.ts +18 -0
  145. package/dist/Toast/Toast.js +112 -0
  146. package/dist/Toast/index.d.ts +1 -1
  147. package/dist/Toast/index.js +1 -1
  148. package/dist/Toast/style.scss +63 -0
  149. package/dist/VerificationCodeInput/index.d.ts +2 -2
  150. package/dist/VerificationCodeInput/index.js +1 -1
  151. package/dist/VerificationCodeInput/style.scss +20 -0
  152. package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
  153. package/dist/VerificationCodeInput/verification-code-input.js +99 -0
  154. package/dist/index.d.ts +28 -7
  155. package/dist/index.js +12 -2
  156. package/dist/style/variable.scss +33 -0
  157. package/dist/types.d.ts +0 -1
  158. package/dist/utils/dayjs.d.ts +4 -0
  159. package/dist/utils/dayjs.js +42 -0
  160. package/package.json +25 -30
  161. package/dist/Mask/index.d.ts +0 -3
  162. package/dist/Mask/index.js +0 -2
  163. package/dist/Progress/Progress.d.ts +0 -38
  164. package/dist/Progress/Progress.js +0 -53
  165. package/dist/Progress/ProgressCircle.d.ts +0 -16
  166. package/dist/Progress/ProgressCircle.js +0 -147
  167. package/dist/Progress/ProgressLine.d.ts +0 -15
  168. package/dist/Progress/ProgressLine.js +0 -87
  169. package/dist/Progress/style.scss +0 -33
  170. package/dist/Progress/types.d.ts +0 -4
  171. package/dist/Progress/types.js +0 -2
  172. package/dist/SpinLoading/index.d.ts +0 -3
  173. package/dist/SpinLoading/index.js +0 -2
  174. /package/dist/CalendarPicker/{calendar-picker.d.ts → CalendarPicker.d.ts} +0 -0
  175. /package/dist/CalendarPicker/{calendar-range-picker.d.ts → CalendarRangePicker.d.ts} +0 -0
@@ -0,0 +1,25 @@
1
+ import React, { FC } from "react";
2
+ import "./style.scss";
3
+ type ActionSheetActionItemType = {
4
+ key?: any;
5
+ children?: React.ReactNode;
6
+ onClick?: () => void;
7
+ };
8
+ export type ActionSheetProps = {
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ open?: boolean;
12
+ afterOpenChange?: (open: boolean) => void;
13
+ title?: React.ReactNode;
14
+ actions?: ActionSheetActionItemType[];
15
+ cancel?: React.ReactNode | false;
16
+ onCancel?: () => void;
17
+ onClose?: () => void;
18
+ /**
19
+ * @description 点击操作项后是否关闭
20
+ * @default true
21
+ */
22
+ closeAfterClickAction?: boolean;
23
+ };
24
+ export declare const ActionSheet: FC<ActionSheetProps>;
25
+ export {};
@@ -0,0 +1,77 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React from "react";
8
+ import Popup from "../Popup";
9
+ import classNames from "classnames";
10
+ import "./style.scss";
11
+ var cls = 'triones-antm-action-sheet';
12
+ export var ActionSheet = function ActionSheet(_ref) {
13
+ var className = _ref.className,
14
+ style = _ref.style,
15
+ open = _ref.open,
16
+ afterOpenChange = _ref.afterOpenChange,
17
+ title = _ref.title,
18
+ actions = _ref.actions,
19
+ cancel = _ref.cancel,
20
+ onCancel = _ref.onCancel,
21
+ onClose = _ref.onClose,
22
+ _ref$closeAfterClickA = _ref.closeAfterClickAction,
23
+ closeAfterClickAction = _ref$closeAfterClickA === void 0 ? true : _ref$closeAfterClickA;
24
+ var _React$useState = React.useState(open || false),
25
+ _React$useState2 = _slicedToArray(_React$useState, 2),
26
+ innerOpen = _React$useState2[0],
27
+ setInnerOpen = _React$useState2[1];
28
+ var handleClose = function handleClose() {
29
+ setInnerOpen(false);
30
+ onClose === null || onClose === void 0 || onClose();
31
+ };
32
+ React.useEffect(function () {
33
+ if (open === undefined) {
34
+ return;
35
+ }
36
+ if (open === innerOpen) {
37
+ return;
38
+ }
39
+ setInnerOpen(open);
40
+ }, [open]);
41
+ React.useEffect(function () {
42
+ afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(innerOpen);
43
+ }, [innerOpen]);
44
+ return /*#__PURE__*/React.createElement(Popup, {
45
+ open: open,
46
+ afterClose: function afterClose() {
47
+ setInnerOpen(false);
48
+ }
49
+ }, /*#__PURE__*/React.createElement("div", {
50
+ className: classNames(cls, className),
51
+ style: style
52
+ }, /*#__PURE__*/React.createElement("div", {
53
+ className: classNames("".concat(cls, "-body"))
54
+ }, title && /*#__PURE__*/React.createElement("div", {
55
+ className: classNames("".concat(cls, "-title"))
56
+ }, title), actions && /*#__PURE__*/React.createElement("div", {
57
+ className: classNames("".concat(cls, "-actions"))
58
+ }, actions.map(function (action) {
59
+ return /*#__PURE__*/React.createElement("div", {
60
+ className: "".concat(cls, "-actions-item"),
61
+ key: action.key,
62
+ onClick: function onClick() {
63
+ var _action$onClick;
64
+ (_action$onClick = action.onClick) === null || _action$onClick === void 0 || _action$onClick.call(action);
65
+ if (closeAfterClickAction) {
66
+ handleClose();
67
+ }
68
+ }
69
+ }, action.children);
70
+ }))), cancel !== false && /*#__PURE__*/React.createElement("div", {
71
+ className: classNames("".concat(cls, "-cancel")),
72
+ onClick: function onClick() {
73
+ onCancel === null || onCancel === void 0 || onCancel();
74
+ handleClose();
75
+ }
76
+ }, cancel || /*#__PURE__*/React.createElement("div", null, "\u53D6\u6D88"))));
77
+ };
@@ -1,3 +1,3 @@
1
- import { ActionSheet, ActionSheetProps } from "@trionesdev/antd-mobile-base-react";
1
+ import { ActionSheet, ActionSheetProps } from "./ActionSheet";
2
2
  export type { ActionSheetProps };
3
3
  export default ActionSheet;
@@ -1,2 +1,2 @@
1
- import { ActionSheet } from "@trionesdev/antd-mobile-base-react";
1
+ import { ActionSheet } from "./ActionSheet";
2
2
  export default ActionSheet;
@@ -0,0 +1,52 @@
1
+ @use "../style/variable" as variable;
2
+
3
+ $actionSheetCls: 'triones-antm-action-sheet';
4
+
5
+ .#{$actionSheetCls} {
6
+ display: flex;
7
+ flex-direction: column;
8
+ background-color: variable.$trionesColorFill;
9
+ border-top-left-radius: variable.$trionesBorderRadius;
10
+ border-top-right-radius: variable.$trionesBorderRadius;
11
+ overflow: hidden;
12
+ gap: 2Px;
13
+ &-body{
14
+
15
+ }
16
+ &-title{
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ min-height: 48Px;
21
+ background-color: white;
22
+ font-size: 18Px;
23
+ border-bottom: 1Px solid variable.$trionesBorderColor;
24
+ }
25
+ &-actions{
26
+ &-item{
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ min-height: 48Px;
31
+ background-color: white;
32
+ cursor: default;
33
+ position: relative;
34
+ font-size: 18Px;
35
+ &:hover{
36
+ opacity: 0.8;
37
+ }
38
+ }
39
+ }
40
+ &-cancel{
41
+ display: flex;
42
+ justify-content: center;
43
+ align-items: center;
44
+ min-height: 48Px;
45
+ font-size: 18Px;
46
+ background-color: white;
47
+ cursor: default;
48
+ &:hover{
49
+ opacity: 0.8;
50
+ }
51
+ }
52
+ }
@@ -2,6 +2,7 @@ import { ButtonProps as TaroButtonProps } from '@tarojs/components';
2
2
  import React, { FC, PropsWithChildren } from 'react';
3
3
  import './style.scss';
4
4
  import { CommonEventFunction } from '@tarojs/components/types/common';
5
+ import { AntSize } from "@trionesdev/antd-mobile-base-react";
5
6
  export type ButtonProps = {
6
7
  /**
7
8
  * @description block 按钮宽高自适应
@@ -45,7 +46,7 @@ export type ButtonProps = {
45
46
  * @description 按钮样式
46
47
  */
47
48
  variant?: 'outlined' | 'dashed' | 'solid' | 'filled' | 'text' | 'link';
48
- size?: 'small' | 'middle' | 'large';
49
+ size?: AntSize;
49
50
  /**
50
51
  * @description 点击事件
51
52
  */
@@ -27,7 +27,7 @@ export var Button = function Button(_ref) {
27
27
  loading = _ref.loading,
28
28
  variant = _ref.variant,
29
29
  _ref$size = _ref.size,
30
- size = _ref$size === void 0 ? 'middle' : _ref$size,
30
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
31
31
  onClick = _ref.onClick,
32
32
  openType = _ref.openType,
33
33
  onGetPhoneNumber = _ref.onGetPhoneNumber,
@@ -57,9 +57,8 @@ export var Button = function Button(_ref) {
57
57
  finalColor = 'danger';
58
58
  }
59
59
  return /*#__PURE__*/React.createElement(TaroButton, {
60
- className: classNames(clsPrefix, "".concat(clsPrefix, "-").concat(size), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(clsPrefix, "-block"), block), "".concat(clsPrefix, "-type-").concat(type), type), "".concat(clsPrefix, "-color-").concat(finalColor), finalColor), "".concat(clsPrefix, "-variant-").concat(finalVariant), finalVariant)),
60
+ className: classNames(clsPrefix, "".concat(clsPrefix, "-").concat(size), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(clsPrefix, "-block"), block), "".concat(clsPrefix, "-type-").concat(type), type), "".concat(clsPrefix, "-color-").concat(finalColor), finalColor), "".concat(clsPrefix, "-variant-").concat(finalVariant), finalVariant), "".concat(clsPrefix, "-disabled"), disabled)),
61
61
  style: style,
62
- disabled: disabled,
63
62
  openType: openType,
64
63
  onGetPhoneNumber: onGetPhoneNumber,
65
64
  onClick: onClick
@@ -1,4 +1,4 @@
1
- @use "../style/variable" as *;
1
+ @use "../style/variable" as variable;
2
2
 
3
3
  $trionesButtonPendingInlineSm: 7Px;
4
4
  $trionesButtonHeightSm: 24Px;
@@ -6,10 +6,14 @@ $trionesButtonHeightSm: 24Px;
6
6
  $trionesButtonPendingInline: 15Px;
7
7
  $trionesButtonHeight: 32Px;
8
8
 
9
- $trionesButtonContentFontSizeLg: $trionesFontSizeLg;
9
+ $trionesButtonContentFontSizeLg: variable.$trionesFontSizeLg;
10
10
  $trionesButtonPendingInlineLg: 15Px;
11
11
  $trionesButtonHeightLg: 40Px;
12
12
 
13
+ $colorPrimary: variable.$trionesColorPrimary;
14
+ $colorError: variable.$trionesColorErrorText;
15
+ $colorWhite: variable.$trionesColorBgBase;
16
+
13
17
  button::after {
14
18
  content: none;
15
19
  width: 100%;
@@ -20,7 +24,7 @@ $buttonCls: 'triones-antm-button';
20
24
  width: auto;
21
25
  position: relative;
22
26
  display: inline-flex;
23
- flex-direction: column;
27
+ flex-direction: row;
24
28
  justify-self: center;
25
29
  align-items: center;
26
30
  justify-content: center;
@@ -32,31 +36,36 @@ $buttonCls: 'triones-antm-button';
32
36
  font-size: 14Px;
33
37
  z-index: 2;
34
38
  margin-top: 0;
39
+ gap: 8Px;
35
40
 
36
41
  &:active {
37
42
  filter: brightness(92%);
38
43
  }
39
- &::after{
44
+
45
+ &::after {
40
46
  content: none;
41
47
  }
42
48
 
43
- &[disabled] {
49
+ &[disabled=true] {
44
50
  opacity: 0.4;
45
51
 
46
52
  &:active {
47
53
  filter: none;
48
54
  }
49
55
  }
50
- &:not([disabled]):active{}
56
+
57
+ &:not([disabled]):active {
58
+
59
+ }
51
60
 
52
61
  &-color {
53
62
  &-default {
54
- background-color: #ffffff;
63
+ background-color: $colorWhite;
55
64
 
56
65
  &.#{$buttonCls} {
57
66
  &-variant {
58
67
  &-solid {
59
- color: #ffffff;
68
+ color: $colorWhite;
60
69
  background-color: rgba(0, 0, 0, 0.75);
61
70
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75);
62
71
  }
@@ -64,13 +73,13 @@ $buttonCls: 'triones-antm-button';
64
73
  &-outlined {
65
74
  color: rgba(0, 0, 0, 0.75);
66
75
  border: 1px solid rgba(0, 0, 0, 0.75);
67
- background-color: white;
76
+ background-color: $colorWhite;
68
77
  }
69
78
 
70
79
  &-dashed {
71
80
  color: rgba(0, 0, 0, 0.75);
72
81
  border: 1px dashed rgba(0, 0, 0, 0.75);
73
- background-color: #ffffff;
82
+ background-color: $colorWhite;
74
83
  }
75
84
 
76
85
  &-filled {
@@ -80,12 +89,12 @@ $buttonCls: 'triones-antm-button';
80
89
 
81
90
  &-text {
82
91
  color: rgba(0, 0, 0, 0.75);
83
- background-color: #ffffff;
92
+ background-color: $colorWhite;
84
93
  }
85
94
 
86
95
  &-link {
87
96
  color: rgba(0, 0, 0, 0.75);
88
- background-color: #ffffff;
97
+ background-color: $colorWhite;
89
98
 
90
99
  &:active {
91
100
  filter: none;
@@ -99,36 +108,36 @@ $buttonCls: 'triones-antm-button';
99
108
  &.#{$buttonCls} {
100
109
  &-variant {
101
110
  &-solid {
102
- color: #ffffff;
103
- background-color: $trionesColorPrimaryText;
104
- box-shadow: inset 0 0 0 1px $trionesColorPrimaryText;
111
+ color: $colorWhite;
112
+ background-color: $colorPrimary;
113
+ box-shadow: inset 0 0 0 1px $colorPrimary;
105
114
  }
106
115
 
107
116
  &-outlined {
108
- color: #1677ff;
117
+ color: $colorPrimary;
109
118
  background-color: white;
110
- border: 1px solid $trionesColorPrimaryText;
119
+ border: 1px solid $colorPrimary;
111
120
  }
112
121
 
113
122
  &-dashed {
114
- color: $trionesColorPrimaryText;
115
- border: 1px dashed $trionesColorPrimaryText;
116
- background-color: #ffffff;
123
+ color: $colorPrimary;
124
+ border: 1px dashed $colorPrimary;
125
+ background-color: $colorWhite;
117
126
  }
118
127
 
119
128
  &-filled {
120
- color: $trionesColorPrimaryText;
121
- background-color: $trionesColorPrimaryBg;
129
+ color: $colorPrimary;
130
+ background-color: variable.$trionesColorPrimaryBg;
122
131
  }
123
132
 
124
133
  &-text {
125
- color: $trionesColorPrimaryText;
126
- background-color: #ffffff;
134
+ color: $colorPrimary;
135
+ background-color: $colorWhite;
127
136
  }
128
137
 
129
138
  &-link {
130
- color: $trionesColorPrimaryText;
131
- background-color: #ffffff;
139
+ color: $colorPrimary;
140
+ background-color: $colorWhite;
132
141
 
133
142
  &:active {
134
143
  filter: none;
@@ -142,36 +151,36 @@ $buttonCls: 'triones-antm-button';
142
151
  &.#{$buttonCls} {
143
152
  &-variant {
144
153
  &-solid {
145
- color: #ffffff;
146
- background-color: $trionesColorErrorText;
147
- box-shadow: inset 0 0 0 1px $trionesColorErrorText;
154
+ color: $colorWhite;
155
+ background-color: $colorError;
156
+ box-shadow: inset 0 0 0 1px $colorError;
148
157
  }
149
158
 
150
159
  &-outlined {
151
- color: $trionesColorErrorText;
152
- background-color: #ffffff;
153
- border: 1px solid $trionesColorErrorText;
160
+ color: $colorError;
161
+ background-color: $colorWhite;
162
+ border: 1px solid $colorError;
154
163
  }
155
164
 
156
165
  &-dashed {
157
- color: $trionesColorErrorText;
158
- border: 1px dashed $trionesColorErrorText;
159
- background-color: #ffffff;
166
+ color: $colorError;
167
+ border: 1px dashed $colorError;
168
+ background-color: $colorWhite;
160
169
  }
161
170
 
162
171
  &-filled {
163
- color: $trionesColorErrorText;
172
+ color: $colorError;
164
173
  background-color: #ffdfdc;
165
174
  }
166
175
 
167
176
  &-text {
168
- color: $trionesColorErrorText;
169
- background-color: #ffffff;
177
+ color: $colorError;
178
+ background-color: $colorWhite;
170
179
  }
171
180
 
172
181
  &-link {
173
- color: $trionesColorErrorText;
174
- background-color: #ffffff;
182
+ color: $colorError;
183
+ background-color: $colorWhite;
175
184
 
176
185
  &:active {
177
186
  filter: none;
@@ -187,45 +196,51 @@ $buttonCls: 'triones-antm-button';
187
196
  }
188
197
 
189
198
  &-outlined {
190
- background-color: #ffffff;
199
+ background-color: $colorWhite;
191
200
  }
192
201
 
193
202
  &-dashed {
194
203
  border: 1px dashed #d9d9d9;
195
- background-color: #ffffff;
204
+ background-color: $colorWhite;
196
205
  }
197
206
 
198
207
  &-text {
199
- background-color: #ffffff;
208
+ background-color: $colorWhite;
200
209
  }
201
210
 
202
211
  &-link {
203
- background-color: #ffffff;
212
+ background-color: $colorWhite;
204
213
  }
205
214
  }
206
215
 
207
216
  &-block {
208
- display: flex;
217
+ //display: flex;
218
+ //flex-direction: row;
209
219
  width: 100%;
210
220
  }
211
221
 
212
222
  &-small {
213
- font-size: $trionesFontSizeSm;
223
+ font-size: variable.$trionesFontSizeSm;
214
224
  padding-inline: $trionesButtonPendingInlineSm;
215
225
  height: $trionesButtonHeightSm;
216
- border-radius: $trionesBorderRadiusSm;
226
+ border-radius: variable.$trionesBorderRadiusSm;
217
227
  }
218
228
 
219
- &-middle {
229
+ &-medium {
220
230
  padding-inline: $trionesButtonPendingInline;
221
231
  height: $trionesButtonHeight;
222
- border-radius: $trionesBorderRadius;
232
+ border-radius: variable.$trionesBorderRadius;
223
233
  }
224
234
 
225
235
  &-large {
226
236
  font-size: $trionesButtonContentFontSizeLg;
227
237
  padding-inline: $trionesButtonPendingInlineLg;
228
238
  height: $trionesButtonHeightLg;
229
- border-radius: $trionesBorderRadiusLg;
239
+ border-radius: variable.$trionesBorderRadiusLg;
240
+ }
241
+
242
+ &-disabled {
243
+ opacity: 0.4;
230
244
  }
231
245
  }
246
+
@@ -1,27 +1,28 @@
1
1
  import { FC } from 'react';
2
2
  import './style.scss';
3
+ import dayjs, { ConfigType } from "dayjs";
3
4
  export type CalendarGridProps = {
4
- mouth?: Date;
5
+ month?: dayjs.Dayjs;
5
6
  /**
6
7
  * @description 值,如果是区间模式,则 0,1 索引的值有效,0是开始时间,1是结束时间
7
8
  */
8
- value?: Date[];
9
+ value?: dayjs.Dayjs[];
9
10
  /**
10
11
  * @description 默认值,如果是区间模式,则 0,1 索引的值有效,0是开始时间,1是结束时间
11
12
  */
12
- defaultValue?: Date[];
13
- onChange?: (value: Date[]) => void;
13
+ defaultValue?: dayjs.Dayjs[];
14
+ onChange?: (value: dayjs.Dayjs[]) => void;
14
15
  /**
15
16
  * @description 是否为范围选择
16
17
  */
17
18
  range?: boolean;
18
- onSelect?: (date: Date) => void;
19
+ onSelect?: (date: ConfigType) => void;
19
20
  };
20
21
  export type CalendarCellProps = {
21
- mouth?: Date;
22
- date?: Date;
23
- value?: Date[];
22
+ month?: dayjs.Dayjs;
23
+ date?: dayjs.Dayjs;
24
+ value?: dayjs.Dayjs[];
24
25
  range?: boolean;
25
- onSelect?: (date: Date) => void;
26
+ onSelect?: (date: dayjs.Dayjs) => void;
26
27
  };
27
28
  export declare const CalendarGrid: FC<CalendarGridProps>;