tntd 2.8.47 → 2.8.49
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/es/modal/modal.js +2 -2
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/modal.less +14 -2
- package/lib/modal/modal.js +2 -2
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/modal.less +14 -2
- package/package.json +1 -1
- package/es/alert/alert.js +0 -147
- package/es/alert/alert.js.map +0 -1
- package/es/alert/alert.less +0 -128
- package/es/cascader/cascader.js +0 -84
- package/es/cascader/cascader.js.map +0 -1
- package/es/cascader/cascader.less +0 -16
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +0 -100
- package/es/checkbox/checkbox.js.map +0 -1
- package/es/checkbox/checkbox.less +0 -69
- package/es/date-picker/DatePicker.js +0 -163
- package/es/date-picker/DatePicker.js.map +0 -1
- package/es/date-picker/index.less +0 -294
- package/es/input-number/inputNumber.js +0 -89
- package/es/input-number/inputNumber.js.map +0 -1
- package/es/input-number/inputNumber.less +0 -12
- package/es/modal/index.less +0 -52
- package/es/popconfirm/index.less +0 -32
- package/es/popconfirm/popconfirm.js +0 -96
- package/es/popconfirm/popconfirm.js.map +0 -1
- package/es/popover/index.less +0 -57
- package/es/popover/popover.js +0 -90
- package/es/popover/popover.js.map +0 -1
- package/es/progress/progress.js +0 -179
- package/es/progress/progress.js.map +0 -1
- package/es/progress/progress.less +0 -82
- package/es/query-form/Field/Composition/FieldPopover.js +0 -466
- package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/es/query-form/Field/Composition/FieldPopover.less +0 -41
- package/es/query-form/Field/Composition/Select.js +0 -260
- package/es/query-form/Field/Composition/Select.js.map +0 -1
- package/es/query-form/Field/Composition/SelectInput.js +0 -112
- package/es/query-form/Field/Composition/SelectInput.js.map +0 -1
- package/es/query-form/Field/Composition/ValueTag.js +0 -241
- package/es/query-form/Field/Composition/ValueTag.js.map +0 -1
- package/es/query-form/Field/Composition/index.js +0 -448
- package/es/query-form/Field/Composition/index.js.map +0 -1
- package/es/query-form/Field/Composition/index.less +0 -167
- package/es/query-form/Field/Composition/utils.js +0 -173
- package/es/query-form/Field/Composition/utils.js.map +0 -1
- package/es/query-form-backup/Field/Composition/FieldPopover.less +0 -35
- package/es/query-form-backup/Field/Composition/index.less +0 -114
- package/es/query-form-backup/index.less +0 -90
- package/es/query-form-v2/index.less +0 -133
- package/es/radio/radio.js +0 -110
- package/es/radio/radio.js.map +0 -1
- package/es/radio/radio.less +0 -43
- package/es/spin/spin.js +0 -79
- package/es/spin/spin.js.map +0 -1
- package/es/spin/spin.less +0 -9
- package/es/steps/assets/background_left.svg +0 -12
- package/es/steps/assets/background_right.svg +0 -12
- package/es/steps/assets/horizontal_line.svg +0 -3
- package/es/steps/assets/vertical_line.svg +0 -3
- package/es/steps/stepStyle/icon.less +0 -51
- package/es/steps/stepStyle/progress-dot.less +0 -10
- package/es/steps/stepStyle/variables.less +0 -8
- package/es/steps/stepStyle/vertical.less +0 -41
- package/es/switch/index.less +0 -45
- package/es/tabs/tabs.less +0 -125
- package/es/time-picker/TimePicker.js +0 -90
- package/es/time-picker/TimePicker.js.map +0 -1
- package/es/time-picker/index.less +0 -38
- package/es/tntd-action/Action.js +0 -218
- package/es/tntd-action/Action.js.map +0 -1
- package/es/tntd-action/index.less +0 -61
- package/es/tntd-select/index.less +0 -7
- package/lib/alert/alert.d.ts +0 -12
- package/lib/alert/alert.d.ts.map +0 -1
- package/lib/alert/alert.js +0 -147
- package/lib/alert/alert.js.map +0 -1
- package/lib/alert/alert.less +0 -128
- package/lib/cascader/cascader.d.ts +0 -10
- package/lib/cascader/cascader.d.ts.map +0 -1
- package/lib/cascader/cascader.js +0 -84
- package/lib/cascader/cascader.js.map +0 -1
- package/lib/cascader/cascader.less +0 -16
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +0 -16
- package/lib/checkbox/checkbox.d.ts.map +0 -1
- package/lib/checkbox/checkbox.js +0 -100
- package/lib/checkbox/checkbox.js.map +0 -1
- package/lib/checkbox/checkbox.less +0 -69
- package/lib/date-picker/DatePicker.d.ts +0 -21
- package/lib/date-picker/DatePicker.d.ts.map +0 -1
- package/lib/date-picker/DatePicker.js +0 -163
- package/lib/date-picker/DatePicker.js.map +0 -1
- package/lib/date-picker/index.less +0 -294
- package/lib/input-number/inputNumber.d.ts +0 -10
- package/lib/input-number/inputNumber.d.ts.map +0 -1
- package/lib/input-number/inputNumber.js +0 -89
- package/lib/input-number/inputNumber.js.map +0 -1
- package/lib/input-number/inputNumber.less +0 -12
- package/lib/modal/index.less +0 -52
- package/lib/popconfirm/index.less +0 -32
- package/lib/popconfirm/popconfirm.d.ts +0 -8
- package/lib/popconfirm/popconfirm.d.ts.map +0 -1
- package/lib/popconfirm/popconfirm.js +0 -96
- package/lib/popconfirm/popconfirm.js.map +0 -1
- package/lib/popover/index.less +0 -57
- package/lib/popover/popover.d.ts +0 -14
- package/lib/popover/popover.d.ts.map +0 -1
- package/lib/popover/popover.js +0 -90
- package/lib/popover/popover.js.map +0 -1
- package/lib/progress/progress.d.ts +0 -12
- package/lib/progress/progress.d.ts.map +0 -1
- package/lib/progress/progress.js +0 -179
- package/lib/progress/progress.js.map +0 -1
- package/lib/progress/progress.less +0 -82
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -19
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.js +0 -466
- package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.less +0 -41
- package/lib/query-form/Field/Composition/Select.d.ts +0 -4
- package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/Select.js +0 -260
- package/lib/query-form/Field/Composition/Select.js.map +0 -1
- package/lib/query-form/Field/Composition/SelectInput.d.ts +0 -3
- package/lib/query-form/Field/Composition/SelectInput.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/SelectInput.js +0 -112
- package/lib/query-form/Field/Composition/SelectInput.js.map +0 -1
- package/lib/query-form/Field/Composition/ValueTag.d.ts +0 -13
- package/lib/query-form/Field/Composition/ValueTag.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/ValueTag.js +0 -241
- package/lib/query-form/Field/Composition/ValueTag.js.map +0 -1
- package/lib/query-form/Field/Composition/index.d.ts +0 -15
- package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/index.js +0 -448
- package/lib/query-form/Field/Composition/index.js.map +0 -1
- package/lib/query-form/Field/Composition/index.less +0 -167
- package/lib/query-form/Field/Composition/utils.d.ts +0 -21
- package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/utils.js +0 -173
- package/lib/query-form/Field/Composition/utils.js.map +0 -1
- package/lib/query-form-backup/Field/Composition/FieldPopover.less +0 -35
- package/lib/query-form-backup/Field/Composition/index.less +0 -114
- package/lib/query-form-backup/index.less +0 -90
- package/lib/query-form-v2/index.less +0 -133
- package/lib/radio/radio.d.ts +0 -17
- package/lib/radio/radio.d.ts.map +0 -1
- package/lib/radio/radio.js +0 -110
- package/lib/radio/radio.js.map +0 -1
- package/lib/radio/radio.less +0 -43
- package/lib/spin/spin.d.ts +0 -9
- package/lib/spin/spin.d.ts.map +0 -1
- package/lib/spin/spin.js +0 -79
- package/lib/spin/spin.js.map +0 -1
- package/lib/spin/spin.less +0 -9
- package/lib/steps/assets/background_left.svg +0 -12
- package/lib/steps/assets/background_right.svg +0 -12
- package/lib/steps/assets/horizontal_line.svg +0 -3
- package/lib/steps/assets/vertical_line.svg +0 -3
- package/lib/steps/stepStyle/icon.less +0 -51
- package/lib/steps/stepStyle/progress-dot.less +0 -10
- package/lib/steps/stepStyle/variables.less +0 -8
- package/lib/steps/stepStyle/vertical.less +0 -41
- package/lib/switch/index.less +0 -45
- package/lib/tabs/tabs.less +0 -125
- package/lib/time-picker/TimePicker.d.ts +0 -9
- package/lib/time-picker/TimePicker.d.ts.map +0 -1
- package/lib/time-picker/TimePicker.js +0 -90
- package/lib/time-picker/TimePicker.js.map +0 -1
- package/lib/time-picker/index.less +0 -38
- package/lib/tntd-action/Action.d.ts +0 -6
- package/lib/tntd-action/Action.d.ts.map +0 -1
- package/lib/tntd-action/Action.js +0 -218
- package/lib/tntd-action/Action.js.map +0 -1
- package/lib/tntd-action/index.less +0 -61
- package/lib/tntd-select/index.less +0 -7
package/es/modal/modal.js
CHANGED
|
@@ -40,7 +40,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
40
40
|
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
41
41
|
* @Date: 2023-03-08 17:45:01
|
|
42
42
|
* @LastEditors: 郑泳健
|
|
43
|
-
* @LastEditTime: 2025-06-
|
|
43
|
+
* @LastEditTime: 2025-06-24 11:44:10
|
|
44
44
|
* @FilePath: /tntd/packages/tntd/src/modal/modal.tsx
|
|
45
45
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
46
46
|
*/
|
|
@@ -56,7 +56,7 @@ var Modal = exports.Modal = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
56
56
|
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
57
57
|
var getPrefixCls = _ref.getPrefixCls;
|
|
58
58
|
return _react["default"].createElement(_modal["default"], Object.assign({
|
|
59
|
-
className: (0, _classnames["default"])('tntd-modal', innerScroll && 'modal-inner-scroll', className)
|
|
59
|
+
className: (0, _classnames["default"])('tntd-modal', innerScroll && 'modal-inner-scroll', !(rest === null || rest === void 0 ? void 0 : rest.footer) && !(rest === null || rest === void 0 ? void 0 : rest.onOk) && 'modal-inner-scroll-footer', className)
|
|
60
60
|
}, rest, {
|
|
61
61
|
title: !unUpperConverted ? (0, _utils.doUpperTitle)(title, upperCaseIgnore) : title,
|
|
62
62
|
ref: ref
|
package/es/modal/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../src/modal/modal.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAiC,MAAM,eAAe,CAAA;AAmB7D,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CAAC,EAAqF,EAAE,GAAG,EAAE,EAAE;QAA9F,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,GAAG,KAAK,OAAW,EAAN,IAAI,cAAnF,4EAAqF,CAAF;IAClF,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,oBAAC,SAAS,kBACR,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,WAAW,IAAI,oBAAoB,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../src/modal/modal.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO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AAK,EAAE,EAAE;IACxB,OAAO,SAAS,CAAC,OAAO,iBACtB,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,IAC9C,KAAK,EACR,CAAA;AACJ,CAAC,CAAA;AAED,KAAK,CAAC,KAAK,GAAG,CAAC,KAAK,EAAE,EAAE;IACtB,OAAO,SAAS,CAAC,KAAK,iBACpB,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,IAC9C,KAAK,EACR,CAAA;AACJ,CAAC,CAAA;AAED,KAAK,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;IACxB,OAAO,SAAS,CAAC,OAAO,iBACtB,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAC,QAAQ,GAAG,IACpD,KAAK,EACR,CAAA;AACJ,CAAC,CAAA;AAED,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,SAAS,CAAC,IAAI,iBACnB,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAC,QAAQ,GAAG,IACpD,KAAK,EACR,CAAA;AACJ,CAAC,CAAA;AAED,KAAK,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;IACxB,OAAO,SAAS,CAAC,OAAO,iBACtB,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,QAAQ,GAAG,IACjD,KAAK,EACR,CAAA;AACJ,CAAC,CAAA;AAED,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 17:45:01\n * @LastEditors: 郑泳健\n * @LastEditTime: 2025-06-24 11:44:10\n * @FilePath: /tntd/packages/tntd/src/modal/modal.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { ModalProps as AntdModalProps } from 'antd/es/modal'\nimport classNames from 'classnames'\nimport { ConfigConsumer } from '../config-provider'\nimport { default as AntdModal } from 'antd/es/modal'\nimport { default as Icon } from '../icon'\nimport { doUpperTitle } from '../utils'\nexport * from 'antd/es/modal'\nexport { ActionButtonProps, ModalProps } from 'antd/es/modal'\n\nexport interface CurModalProps extends AntdModalProps {\n upperCaseIgnore?: []\n unUpperConverted?: boolean\n innerScroll?: boolean\n}\n\ninterface ModalComponent\n extends React.ForwardRefExoticComponent<CurModalProps & React.RefAttributes<AntdModal>> {\n info: typeof AntdModal.info\n success: typeof AntdModal.success\n error: typeof AntdModal.error\n warning: typeof AntdModal.warning\n warn: typeof AntdModal.warn\n confirm: typeof AntdModal.confirm\n destroyAll: typeof AntdModal.destroyAll\n}\n\nexport const Modal = forwardRef<AntdModal, CurModalProps>(\n ({ title, className, upperCaseIgnore, unUpperConverted, innerScroll = false, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdModal\n className={classNames('tntd-modal', innerScroll && 'modal-inner-scroll', !rest?.footer && !rest?.onOk && 'modal-inner-scroll-footer', className)}\n {...rest}\n title={!unUpperConverted ? doUpperTitle(title, upperCaseIgnore) : title}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as ModalComponent\n\nModal.info = (props) => {\n return AntdModal.info({\n icon: <Icon type=\"info-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.success = (props) => {\n return AntdModal.success({\n icon: <Icon type=\"check-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.error = (props) => {\n return AntdModal.error({\n icon: <Icon type=\"close-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.warning = (props) => {\n return AntdModal.warning({\n icon: <Icon type=\"exclamation-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.warn = (props) => {\n return AntdModal.warn({\n icon: <Icon type=\"exclamation-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.confirm = (props) => {\n return AntdModal.confirm({\n icon: <Icon type=\"question-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.destroyAll = AntdModal.destroyAll\n"]}
|
|
@@ -176,12 +176,24 @@
|
|
|
176
176
|
overflow: hidden;
|
|
177
177
|
|
|
178
178
|
.ant-modal-body{
|
|
179
|
-
max-height: calc(100vh - 200px - 56px);
|
|
179
|
+
max-height: calc(100vh - 200px - 56px - 64px);
|
|
180
180
|
display: flex;
|
|
181
181
|
flex-flow: column;
|
|
182
|
+
overflow: auto;
|
|
183
|
+
padding: 0;
|
|
184
|
+
|
|
185
|
+
&>*:first-of-type{
|
|
186
|
+
margin: auto;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.modal-inner-scroll-footer{
|
|
191
|
+
.ant-modal-body{
|
|
192
|
+
max-height: calc(100vh - 200px - 56px);
|
|
193
|
+
}
|
|
182
194
|
}
|
|
183
195
|
|
|
184
196
|
.ant-modal-footer{
|
|
185
|
-
padding: 16px 24px
|
|
197
|
+
padding: 16px 24px 16px;
|
|
186
198
|
}
|
|
187
199
|
}
|
package/lib/modal/modal.js
CHANGED
|
@@ -75,7 +75,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
75
75
|
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
76
76
|
* @Date: 2023-03-08 17:45:01
|
|
77
77
|
* @LastEditors: 郑泳健
|
|
78
|
-
* @LastEditTime: 2025-06-
|
|
78
|
+
* @LastEditTime: 2025-06-24 11:44:10
|
|
79
79
|
* @FilePath: /tntd/packages/tntd/src/modal/modal.tsx
|
|
80
80
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
81
81
|
*/
|
|
@@ -91,7 +91,7 @@ var Modal = exports.Modal = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
91
91
|
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
92
92
|
var getPrefixCls = _ref.getPrefixCls;
|
|
93
93
|
return _react["default"].createElement(_modal["default"], Object.assign({
|
|
94
|
-
className: (0, _classnames["default"])('tntd-modal', innerScroll && 'modal-inner-scroll', className)
|
|
94
|
+
className: (0, _classnames["default"])('tntd-modal', innerScroll && 'modal-inner-scroll', !(rest === null || rest === void 0 ? void 0 : rest.footer) && !(rest === null || rest === void 0 ? void 0 : rest.onOk) && 'modal-inner-scroll-footer', className)
|
|
95
95
|
}, rest, {
|
|
96
96
|
title: !unUpperConverted ? (0, _utils.doUpperTitle)(title, upperCaseIgnore) : title,
|
|
97
97
|
ref: ref
|
package/lib/modal/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../src/modal/modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AAEzC,4DAAmC;AACnC,wDAAmD;AACnD,0DAAoD;AACpD,mDAAyC;AACzC,oCAAuC;AACvC,gDAA6B;AAC7B,uCAA6D;AAmBhD,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CAAC,EAAqF,EAAE,GAAG,EAAE,EAAE;QAA9F,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,GAAG,KAAK,OAAW,EAAN,IAAI,cAAnF,4EAAqF,CAAF;IAClF,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,8BAAC,eAAS,kBACR,SAAS,EAAE,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周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 17:45:01\n * @LastEditors: 郑泳健\n * @LastEditTime: 2025-06-24 11:44:10\n * @FilePath: /tntd/packages/tntd/src/modal/modal.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { ModalProps as AntdModalProps } from 'antd/lib/modal'\nimport classNames from 'classnames'\nimport { ConfigConsumer } from '../config-provider'\nimport { default as AntdModal } from 'antd/lib/modal'\nimport { default as Icon } from '../icon'\nimport { doUpperTitle } from '../utils'\nexport * from 'antd/lib/modal'\nexport { ActionButtonProps, ModalProps } from 'antd/lib/modal'\n\nexport interface CurModalProps extends AntdModalProps {\n upperCaseIgnore?: []\n unUpperConverted?: boolean\n innerScroll?: boolean\n}\n\ninterface ModalComponent\n extends React.ForwardRefExoticComponent<CurModalProps & React.RefAttributes<AntdModal>> {\n info: typeof AntdModal.info\n success: typeof AntdModal.success\n error: typeof AntdModal.error\n warning: typeof AntdModal.warning\n warn: typeof AntdModal.warn\n confirm: typeof AntdModal.confirm\n destroyAll: typeof AntdModal.destroyAll\n}\n\nexport const Modal = forwardRef<AntdModal, CurModalProps>(\n ({ title, className, upperCaseIgnore, unUpperConverted, innerScroll = false, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdModal\n className={classNames('tntd-modal', innerScroll && 'modal-inner-scroll', !rest?.footer && !rest?.onOk && 'modal-inner-scroll-footer', className)}\n {...rest}\n title={!unUpperConverted ? doUpperTitle(title, upperCaseIgnore) : title}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as ModalComponent\n\nModal.info = (props) => {\n return AntdModal.info({\n icon: <Icon type=\"info-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.success = (props) => {\n return AntdModal.success({\n icon: <Icon type=\"check-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.error = (props) => {\n return AntdModal.error({\n icon: <Icon type=\"close-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.warning = (props) => {\n return AntdModal.warning({\n icon: <Icon type=\"exclamation-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.warn = (props) => {\n return AntdModal.warn({\n icon: <Icon type=\"exclamation-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.confirm = (props) => {\n return AntdModal.confirm({\n icon: <Icon type=\"question-circle\" theme=\"filled\" />,\n ...props,\n })\n}\n\nModal.destroyAll = AntdModal.destroyAll\n"]}
|
|
@@ -176,12 +176,24 @@
|
|
|
176
176
|
overflow: hidden;
|
|
177
177
|
|
|
178
178
|
.ant-modal-body{
|
|
179
|
-
max-height: calc(100vh - 200px - 56px);
|
|
179
|
+
max-height: calc(100vh - 200px - 56px - 64px);
|
|
180
180
|
display: flex;
|
|
181
181
|
flex-flow: column;
|
|
182
|
+
overflow: auto;
|
|
183
|
+
padding: 0;
|
|
184
|
+
|
|
185
|
+
&>*:first-of-type{
|
|
186
|
+
margin: auto;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.modal-inner-scroll-footer{
|
|
191
|
+
.ant-modal-body{
|
|
192
|
+
max-height: calc(100vh - 200px - 56px);
|
|
193
|
+
}
|
|
182
194
|
}
|
|
183
195
|
|
|
184
196
|
.ant-modal-footer{
|
|
185
|
-
padding: 16px 24px
|
|
197
|
+
padding: 16px 24px 16px;
|
|
186
198
|
}
|
|
187
199
|
}
|
package/package.json
CHANGED
package/es/alert/alert.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
Alert: true
|
|
8
|
-
};
|
|
9
|
-
exports["default"] = exports.Alert = void 0;
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _icon = _interopRequireDefault(require("antd/es/icon"));
|
|
12
|
-
var _configProvider = require("antd/es/config-provider");
|
|
13
|
-
var _alert = _interopRequireWildcard(require("antd/es/alert"));
|
|
14
|
-
Object.keys(_alert).forEach(function (key) {
|
|
15
|
-
if (key === "default" || key === "__esModule") return;
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
-
if (key in exports && exports[key] === _alert[key]) return;
|
|
18
|
-
Object.defineProperty(exports, key, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _alert[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
26
|
-
function _interopRequireDefault(e) {
|
|
27
|
-
return e && e.__esModule ? e : {
|
|
28
|
-
"default": e
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function _getRequireWildcardCache(e) {
|
|
32
|
-
if ("function" != typeof WeakMap) return null;
|
|
33
|
-
var r = new WeakMap(),
|
|
34
|
-
t = new WeakMap();
|
|
35
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
36
|
-
return e ? t : r;
|
|
37
|
-
})(e);
|
|
38
|
-
}
|
|
39
|
-
function _interopRequireWildcard(e, r) {
|
|
40
|
-
if (!r && e && e.__esModule) return e;
|
|
41
|
-
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
42
|
-
"default": e
|
|
43
|
-
};
|
|
44
|
-
var t = _getRequireWildcardCache(r);
|
|
45
|
-
if (t && t.has(e)) return t.get(e);
|
|
46
|
-
var n = {
|
|
47
|
-
__proto__: null
|
|
48
|
-
},
|
|
49
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
50
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
51
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
52
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
53
|
-
}
|
|
54
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
55
|
-
}
|
|
56
|
-
function _typeof(o) {
|
|
57
|
-
"@babel/helpers - typeof";
|
|
58
|
-
|
|
59
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
60
|
-
return typeof o;
|
|
61
|
-
} : function (o) {
|
|
62
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
63
|
-
}, _typeof(o);
|
|
64
|
-
}
|
|
65
|
-
function _defineProperty(e, r, t) {
|
|
66
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
67
|
-
value: t,
|
|
68
|
-
enumerable: !0,
|
|
69
|
-
configurable: !0,
|
|
70
|
-
writable: !0
|
|
71
|
-
}) : e[r] = t, e;
|
|
72
|
-
}
|
|
73
|
-
function _toPropertyKey(t) {
|
|
74
|
-
var i = _toPrimitive(t, "string");
|
|
75
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
76
|
-
}
|
|
77
|
-
function _toPrimitive(t, r) {
|
|
78
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
79
|
-
var e = t[Symbol.toPrimitive];
|
|
80
|
-
if (void 0 !== e) {
|
|
81
|
-
var i = e.call(t, r || "default");
|
|
82
|
-
if ("object" != _typeof(i)) return i;
|
|
83
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
84
|
-
}
|
|
85
|
-
return ("string" === r ? String : Number)(t);
|
|
86
|
-
}
|
|
87
|
-
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
88
|
-
var t = {};
|
|
89
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
90
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
91
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
92
|
-
}
|
|
93
|
-
return t;
|
|
94
|
-
};
|
|
95
|
-
/*
|
|
96
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
97
|
-
* @Date: 2024-03-21 19:43:36
|
|
98
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
99
|
-
* @LastEditTime: 2024-03-21 19:46:23
|
|
100
|
-
* @FilePath: /tntd/packages/tntd/src/alert/alert.tsx
|
|
101
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
var prefix = 'tnt-alert';
|
|
105
|
-
var Alert = exports.Alert = (0, _react.forwardRef)(function (_a, ref) {
|
|
106
|
-
var action = _a.action,
|
|
107
|
-
message = _a.message,
|
|
108
|
-
icon = _a.icon,
|
|
109
|
-
rest = __rest(_a, ["action", "message", "icon"]);
|
|
110
|
-
var fragment = _react["default"].createElement(_react["default"].Fragment, null, message, !!action && _react["default"].createElement("span", {
|
|
111
|
-
className: "action-btn"
|
|
112
|
-
}, action));
|
|
113
|
-
var iconTheme = 'filled';
|
|
114
|
-
var iconType = 'default';
|
|
115
|
-
switch (rest === null || rest === void 0 ? void 0 : rest.type) {
|
|
116
|
-
case 'success':
|
|
117
|
-
iconType = 'check-circle';
|
|
118
|
-
break;
|
|
119
|
-
case 'info':
|
|
120
|
-
iconType = 'info-circle';
|
|
121
|
-
break;
|
|
122
|
-
case 'error':
|
|
123
|
-
iconType = 'close-circle';
|
|
124
|
-
break;
|
|
125
|
-
case 'warning':
|
|
126
|
-
iconType = 'exclamation-circle';
|
|
127
|
-
break;
|
|
128
|
-
default:
|
|
129
|
-
iconType = 'default';
|
|
130
|
-
}
|
|
131
|
-
var iconNode = icon || (rest.type ? _react["default"].createElement(_icon["default"], {
|
|
132
|
-
className: "".concat(prefix, "-icon"),
|
|
133
|
-
type: iconType,
|
|
134
|
-
theme: iconTheme
|
|
135
|
-
}) : null);
|
|
136
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
137
|
-
var getPrefixCls = _ref.getPrefixCls;
|
|
138
|
-
return _react["default"].createElement(_alert["default"], Object.assign({
|
|
139
|
-
ref: ref
|
|
140
|
-
}, rest, {
|
|
141
|
-
message: fragment,
|
|
142
|
-
icon: iconNode,
|
|
143
|
-
className: (0, _classnames["default"])(rest === null || rest === void 0 ? void 0 : rest.className, 'tnt-alert', _defineProperty({}, "".concat(prefix, "-with-action"), action))
|
|
144
|
-
}));
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
var _default = exports["default"] = Alert;
|
package/es/alert/alert.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,IAAI,MAAM,cAAc,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,cAAc,eAAe,CAAA;AAS7B,MAAM,MAAM,GAAG,WAAW,CAAA;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CAAC,EAAkC,EAAE,GAAG,EAAE,EAAE;QAA3C,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,OAAW,EAAN,IAAI,cAAhC,6BAAkC,CAAF;IAC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 zefei.zhou@tongdun.net\n * @Date: 2024-03-21 19:43:36\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-21 19:46:23\n * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { AlertProps as AntdAlertProps } from 'antd/es/alert'\nimport type { ThemeType } from 'antd/es/icon'\nimport Icon from 'antd/es/icon'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdAlert } from 'antd/es/alert'\nimport classname from 'classnames'\nexport * from 'antd/es/alert'\n\nexport interface AlertProps extends AntdAlertProps {\n action: React.ReactNode\n}\n\ninterface AlertComponent\n extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {}\n\nconst prefix = 'tnt-alert'\n\nexport const Alert = forwardRef<AntdAlert, AlertProps>(\n ({ action, message, icon, ...rest }, ref) => {\n const fragment = (\n <>\n {message}\n {!!action && <span className=\"action-btn\">{action}</span>}\n </>\n )\n\n const iconTheme: ThemeType = 'filled'\n let iconType = 'default'\n\n switch (rest?.type) {\n case 'success':\n iconType = 'check-circle'\n break\n case 'info':\n iconType = 'info-circle'\n break\n case 'error':\n iconType = 'close-circle'\n break\n case 'warning':\n iconType = 'exclamation-circle'\n break\n default:\n iconType = 'default'\n }\n\n const iconNode =\n icon ||\n (rest.type ? <Icon className={`${prefix}-icon`} type={iconType} theme={iconTheme} /> : null)\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdAlert\n ref={ref}\n {...rest}\n message={fragment}\n icon={iconNode}\n className={classname(rest?.className, 'tnt-alert', {\n [`${prefix}-with-action`]: action,\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as AlertComponent\n\nexport default Alert\n"]}
|
package/es/alert/alert.less
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
@alert-prefix-cls: ~'@{ant-prefix}-alert';
|
|
2
|
-
@alert-description-color: @text-color-secondary;
|
|
3
|
-
@tnt-alert-prefix-cls: ~'tnt-alert';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.@{tnt-alert-prefix-cls} {
|
|
7
|
-
|
|
8
|
-
&.@{alert-prefix-cls}.@{alert-prefix-cls}-no-icon.@{alert-prefix-cls}-closable {
|
|
9
|
-
padding-right: 30px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.@{tnt-alert-prefix-cls}-with-action {
|
|
13
|
-
.@{alert-prefix-cls}-message {
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
> .action-btn {
|
|
17
|
-
flex: none;
|
|
18
|
-
margin-left: 36px;
|
|
19
|
-
margin-right: 12px;
|
|
20
|
-
font-size: @font-size-base;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.@{alert-prefix-cls} {
|
|
26
|
-
border-radius: @border-radius-lg;
|
|
27
|
-
padding: 8px 15px 8px 44px;
|
|
28
|
-
& .anticon {
|
|
29
|
-
left: 20px;
|
|
30
|
-
top: 11px; // 与文字对齐
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.@{alert-prefix-cls}-message {
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
color: @alert-description-color;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
& .@{alert-prefix-cls}-close-icon {
|
|
41
|
-
font-size: @font-size-lg;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.@{alert-prefix-cls}-with-description {
|
|
45
|
-
padding: 16px 20px 16px 48px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.@{alert-prefix-cls}.@{alert-prefix-cls}-no-icon {
|
|
49
|
-
padding: 8px 20px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.@{alert-prefix-cls}-with-description.@{alert-prefix-cls}-no-icon {
|
|
53
|
-
padding: 16px 20px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.@{alert-prefix-cls}-with-description i.@{alert-prefix-cls}-icon {
|
|
57
|
-
top: 18px;
|
|
58
|
-
font-size: @font-size-xl;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.@{alert-prefix-cls}-success {
|
|
64
|
-
.action-btn {
|
|
65
|
-
background-color: @alert-success-bg-color;
|
|
66
|
-
color: @green-6;
|
|
67
|
-
a {
|
|
68
|
-
color: @green-6;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
.@{alert-prefix-cls}-close-icon {
|
|
72
|
-
.@{iconfont-css-prefix}-close {
|
|
73
|
-
color: @alert-success-icon-color;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.@{alert-prefix-cls}-info {
|
|
79
|
-
.action-btn {
|
|
80
|
-
background-color: @alert-info-bg-color;
|
|
81
|
-
color: @alert-info-icon-color;
|
|
82
|
-
a {
|
|
83
|
-
color: @alert-info-icon-color;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
.@{alert-prefix-cls}-close-icon {
|
|
87
|
-
.@{iconfont-css-prefix}-close {
|
|
88
|
-
color: @alert-info-icon-color;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.@{alert-prefix-cls}-warning {
|
|
94
|
-
.action-btn {
|
|
95
|
-
background-color: @alert-warning-bg-color;
|
|
96
|
-
color: @gold-7;
|
|
97
|
-
a {
|
|
98
|
-
color: @gold-7;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
.@{alert-prefix-cls}-close-icon {
|
|
102
|
-
.@{iconfont-css-prefix}-close {
|
|
103
|
-
color: @alert-warning-icon-color;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.@{alert-prefix-cls}-error {
|
|
109
|
-
.action-btn {
|
|
110
|
-
background-color: @alert-error-bg-color;
|
|
111
|
-
color: @red-6;
|
|
112
|
-
a {
|
|
113
|
-
color: @red-6;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
.@{alert-prefix-cls}-close-icon {
|
|
117
|
-
.@{iconfont-css-prefix}-close {
|
|
118
|
-
color: @alert-error-icon-color;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.@{alert-prefix-cls} {
|
|
124
|
-
>
|
|
125
|
-
.@{alert-prefix-cls}-icon {
|
|
126
|
-
font-size: @font-size-lg;
|
|
127
|
-
}
|
|
128
|
-
}
|
package/es/cascader/cascader.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
-
return typeof o;
|
|
8
|
-
} : function (o) {
|
|
9
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
-
}, _typeof(o);
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(exports, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
var _exportNames = {};
|
|
16
|
-
exports["default"] = void 0;
|
|
17
|
-
var _cascader = _interopRequireWildcard(require("antd/es/cascader"));
|
|
18
|
-
Object.keys(_cascader).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _cascader[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _cascader[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
var _configProvider = require("antd/es/config-provider");
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
32
|
-
var _connect = require("../connect");
|
|
33
|
-
var _previewText = require("../preview-text");
|
|
34
|
-
function _interopRequireDefault(e) {
|
|
35
|
-
return e && e.__esModule ? e : {
|
|
36
|
-
"default": e
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function _getRequireWildcardCache(e) {
|
|
40
|
-
if ("function" != typeof WeakMap) return null;
|
|
41
|
-
var r = new WeakMap(),
|
|
42
|
-
t = new WeakMap();
|
|
43
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
44
|
-
return e ? t : r;
|
|
45
|
-
})(e);
|
|
46
|
-
}
|
|
47
|
-
function _interopRequireWildcard(e, r) {
|
|
48
|
-
if (!r && e && e.__esModule) return e;
|
|
49
|
-
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
50
|
-
"default": e
|
|
51
|
-
};
|
|
52
|
-
var t = _getRequireWildcardCache(r);
|
|
53
|
-
if (t && t.has(e)) return t.get(e);
|
|
54
|
-
var n = {
|
|
55
|
-
__proto__: null
|
|
56
|
-
},
|
|
57
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
58
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
59
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
60
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
61
|
-
}
|
|
62
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
63
|
-
}
|
|
64
|
-
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
65
|
-
var t = {};
|
|
66
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
67
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
68
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
};
|
|
72
|
-
var tntPrefixCls = 'tnt-cascader';
|
|
73
|
-
var Cascader = (0, _react.forwardRef)(function (_a, ref) {
|
|
74
|
-
var className = _a.className,
|
|
75
|
-
children = _a.children,
|
|
76
|
-
rest = __rest(_a, ["className", "children"]);
|
|
77
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
78
|
-
return _react["default"].createElement(_cascader["default"], Object.assign({}, rest, {
|
|
79
|
-
ref: ref,
|
|
80
|
-
className: (0, _classnames["default"])(className, tntPrefixCls)
|
|
81
|
-
}), children);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(Cascader, _previewText.PreviewText.Cascader);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cascader.js","sourceRoot":"","sources":["../../src/cascader/cascader.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,YAAY,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,cAAc,kBAAkB,CAAA;AAShC,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,MAAM,QAAQ,GAAG,UAAU,CACzB,CAAC,EAAgC,EAAE,GAAG,EAAE,EAAE;QAAzC,EAAE,SAAS,EAAE,QAAQ,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAC7B,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,YAAY,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,KAC7E,QAAQ,CACI,CAChB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACmB,CAAA;AAEtB,eAAe,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA","sourcesContent":["import type { CascaderProps as AntdCascaderProps } from 'antd/es/cascader'\nimport AntdCascader from 'antd/es/cascader'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport classNames from 'classnames'\nimport React, { forwardRef } from 'react'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport * from 'antd/es/cascader'\n\nexport type CascaderProps = AntdCascaderProps & {\n readonly?: boolean\n}\n\ninterface CascaderComponent\n extends React.ForwardRefExoticComponent<AntdCascaderProps & React.RefAttributes<AntdCascader>> {}\n\nconst tntPrefixCls = 'tnt-cascader'\n\nconst Cascader = forwardRef<AntdCascader, AntdCascaderProps>(\n ({ className, children, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdCascader {...rest} ref={ref} className={classNames(className, tntPrefixCls)}>\n {children}\n </AntdCascader>\n )\n }}\n </ConfigConsumer>\n )\n }\n) as CascaderComponent\n\nexport default connectReadonlyComponent(Cascader, PreviewText.Cascader)\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
|
|
2
|
-
|
|
3
|
-
.tnt-cascader {
|
|
4
|
-
.@{cascader-prefix-cls}-picker {
|
|
5
|
-
&-clear {
|
|
6
|
-
width: 16px;
|
|
7
|
-
height: 16px;
|
|
8
|
-
font-size: initial;
|
|
9
|
-
margin-top: -8px;
|
|
10
|
-
}
|
|
11
|
-
&-arrow {
|
|
12
|
-
width: 16px;
|
|
13
|
-
height: 16px;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
package/es/checkbox/check.png
DELETED
|
Binary file
|
package/es/checkbox/checkbox.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
-
return typeof o;
|
|
8
|
-
} : function (o) {
|
|
9
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
-
}, _typeof(o);
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(exports, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
var _exportNames = {};
|
|
16
|
-
exports["default"] = void 0;
|
|
17
|
-
var _checkbox = _interopRequireWildcard(require("antd/es/checkbox"));
|
|
18
|
-
Object.keys(_checkbox).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _checkbox[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _checkbox[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
var _configProvider = require("antd/es/config-provider");
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
32
|
-
var _connect = require("../connect");
|
|
33
|
-
var _previewText = require("../preview-text");
|
|
34
|
-
function _interopRequireDefault(e) {
|
|
35
|
-
return e && e.__esModule ? e : {
|
|
36
|
-
"default": e
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function _getRequireWildcardCache(e) {
|
|
40
|
-
if ("function" != typeof WeakMap) return null;
|
|
41
|
-
var r = new WeakMap(),
|
|
42
|
-
t = new WeakMap();
|
|
43
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
44
|
-
return e ? t : r;
|
|
45
|
-
})(e);
|
|
46
|
-
}
|
|
47
|
-
function _interopRequireWildcard(e, r) {
|
|
48
|
-
if (!r && e && e.__esModule) return e;
|
|
49
|
-
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
50
|
-
"default": e
|
|
51
|
-
};
|
|
52
|
-
var t = _getRequireWildcardCache(r);
|
|
53
|
-
if (t && t.has(e)) return t.get(e);
|
|
54
|
-
var n = {
|
|
55
|
-
__proto__: null
|
|
56
|
-
},
|
|
57
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
58
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
59
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
60
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
61
|
-
}
|
|
62
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
63
|
-
}
|
|
64
|
-
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
65
|
-
var t = {};
|
|
66
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
67
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
68
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
};
|
|
72
|
-
var tntPrefixCls = 'tnt-checkbox';
|
|
73
|
-
var Checkbox = (0, _react.forwardRef)(function (_a, ref) {
|
|
74
|
-
var className = _a.className,
|
|
75
|
-
children = _a.children,
|
|
76
|
-
desc = _a.desc,
|
|
77
|
-
rest = __rest(_a, ["className", "children", "desc"]);
|
|
78
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
79
|
-
return _react["default"].createElement(_checkbox["default"], Object.assign({}, rest, {
|
|
80
|
-
ref: ref,
|
|
81
|
-
className: (0, _classnames["default"])(className, tntPrefixCls)
|
|
82
|
-
}), children ? _react["default"].createElement("span", {
|
|
83
|
-
className: "".concat(tntPrefixCls, "-children")
|
|
84
|
-
}, _react["default"].createElement("span", null, children), !!desc && _react["default"].createElement("span", {
|
|
85
|
-
className: "".concat(tntPrefixCls, "-desc")
|
|
86
|
-
}, desc)) : undefined);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
var CheckboxGroup = (0, _react.forwardRef)(function (_a, ref) {
|
|
90
|
-
var className = _a.className,
|
|
91
|
-
rest = __rest(_a, ["className"]);
|
|
92
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
93
|
-
return _react["default"].createElement(_checkbox["default"].Group, Object.assign({}, rest, {
|
|
94
|
-
ref: ref,
|
|
95
|
-
className: (0, _classnames["default"])(className, "".concat(tntPrefixCls, "-group"))
|
|
96
|
-
}));
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
Checkbox.Group = (0, _connect.connectReadonlyComponent)(CheckboxGroup, _previewText.PreviewText.Select);
|
|
100
|
-
var _default = exports["default"] = Checkbox;
|