ods-component-lib 1.21.2 → 1.21.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.
- package/dist/components/antd/currencyInput/CurrencySelect.js +16 -11
- package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js +32 -43
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js.map +1 -1
- package/dist/components/devextreme/OdsDataGrid.Legacy.js +4 -4
- package/dist/components/devextreme/OdsRemoteDataGrid.js +1 -1
- package/dist/index.js +10 -10
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js +6 -6
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js +20 -20
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js +101 -98
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/linters/utils.js +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js +29 -27
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js +1 -1
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js +66 -45
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js.map +1 -1
- package/dist/node_modules/@ant-design/icons/es/icons/FrownOutlined.js +5 -8
- package/dist/node_modules/@ant-design/icons/es/icons/HeartOutlined.js +3 -6
- package/dist/node_modules/@ant-design/icons/es/icons/MehOutlined.js +12 -15
- package/dist/node_modules/@ant-design/icons/es/icons/SmileOutlined.js +8 -11
- package/dist/node_modules/@ant-design/icons/es/utils.js +2 -9
- package/dist/node_modules/@ant-design/icons/es/utils.js.map +1 -1
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -9
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/index.js +20 -20
- package/dist/node_modules/@rc-component/async-validator/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/messages.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js +18 -8
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js.map +1 -1
- package/dist/node_modules/@rc-component/collapse/es/Collapse.js +1 -1
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js +88 -68
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js +75 -96
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js +22 -20
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js +92 -100
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js +40 -29
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js.map +1 -1
- package/dist/node_modules/@rc-component/dropdown/es/Dropdown.js +2 -2
- package/dist/node_modules/@rc-component/form/es/Field.js +9 -9
- package/dist/node_modules/@rc-component/form/es/FieldContext.js +2 -3
- package/dist/node_modules/@rc-component/form/es/FieldContext.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/Form.js +78 -92
- package/dist/node_modules/@rc-component/form/es/Form.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/List.js +1 -1
- package/dist/node_modules/@rc-component/form/es/{useForm.js → hooks/useForm.js} +136 -143
- package/dist/node_modules/@rc-component/form/es/hooks/useForm.js.map +1 -0
- package/dist/node_modules/@rc-component/form/es/hooks/useNotifyWatch.js +43 -0
- package/dist/node_modules/@rc-component/form/es/hooks/useNotifyWatch.js.map +1 -0
- package/dist/node_modules/@rc-component/form/es/{useWatch.js → hooks/useWatch.js} +7 -7
- package/dist/node_modules/@rc-component/form/es/hooks/useWatch.js.map +1 -0
- package/dist/node_modules/@rc-component/form/es/index.js +2 -2
- package/dist/node_modules/@rc-component/form/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js +28 -22
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/messages.js +1 -0
- package/dist/node_modules/@rc-component/form/es/utils/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/validateUtil.js +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/valueUtil.js.map +1 -1
- package/dist/node_modules/@rc-component/image/es/Preview/index.js +111 -105
- package/dist/node_modules/@rc-component/image/es/Preview/index.js.map +1 -1
- package/dist/node_modules/@rc-component/input-number/es/hooks/useCursor.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/Menu.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/MenuItem.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/SubMenu/index.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/hooks/useKeyRecords.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/placements.js +0 -1
- package/dist/node_modules/@rc-component/menu/es/utils/warnUtil.js +1 -1
- package/dist/node_modules/@rc-component/pagination/es/Pagination.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/RangePicker.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/Selector/hooks/useClearIcon.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/Selector/hooks/useInputProps.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/useCellRender.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/useFilledProps.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/usePresets.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerPanel/index.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/hooks/useTimeInfo.js +1 -1
- package/dist/node_modules/@rc-component/portal/es/Portal.js +41 -35
- package/dist/node_modules/@rc-component/portal/es/Portal.js.map +1 -1
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js +48 -0
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js.map +1 -0
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js +18 -54
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js +50 -0
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js.map +1 -0
- package/dist/node_modules/@rc-component/select/es/BaseSelect/index.js +141 -140
- package/dist/node_modules/@rc-component/select/es/BaseSelect/index.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/OptionList.js +92 -91
- package/dist/node_modules/@rc-component/select/es/OptionList.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/Select.js +5 -5
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js +50 -50
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/SingleContent.js +41 -47
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/SingleContent.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js +85 -80
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/hooks/useOpen.js +27 -26
- package/dist/node_modules/@rc-component/select/es/hooks/useOpen.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/utils/valueUtil.js +1 -1
- package/dist/node_modules/@rc-component/select/es/utils/warningPropsUtil.js +6 -6
- package/dist/node_modules/@rc-component/table/es/Cell/useCellRender.js +1 -1
- package/dist/node_modules/@rc-component/table/es/Table.js +1 -1
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js +85 -80
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js.map +1 -1
- package/dist/node_modules/@rc-component/table/es/VirtualTable/index.js +1 -1
- package/dist/node_modules/@rc-component/table/es/hooks/useColumns/index.js +1 -1
- package/dist/node_modules/@rc-component/table/es/hooks/useExpand.js +1 -1
- package/dist/node_modules/@rc-component/table/es/utils/legacyUtil.js +1 -1
- package/dist/node_modules/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -1
- package/dist/node_modules/@rc-component/tooltip/es/placements.js +0 -1
- package/dist/node_modules/@rc-component/tree/es/Tree.js +1 -1
- package/dist/node_modules/@rc-component/tree/es/util.js +1 -1
- package/dist/node_modules/@rc-component/tree/es/utils/conductUtil.js +1 -1
- package/dist/node_modules/@rc-component/tree/es/utils/treeUtil.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/TreeSelect.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/hooks/useDataEntities.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/utils/legacyUtil.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/utils/warningPropsUtil.js +1 -1
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js +74 -72
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js +10 -9
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js +126 -123
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/index.js +150 -140
- package/dist/node_modules/@rc-component/trigger/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/util.js +35 -34
- package/dist/node_modules/@rc-component/trigger/es/util.js.map +1 -1
- package/dist/node_modules/@rc-component/upload/es/attr-accept.js +1 -1
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js +65 -20
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/KeyCode.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/hooks/useId.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/hooks/useState.js +6 -6
- package/dist/node_modules/@rc-component/util/es/hooks/useState.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/hooks/useSyncState.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/isEqual.js +1 -1
- package/dist/node_modules/@rc-component/util/es/utils/set.js +21 -21
- package/dist/node_modules/@rc-component/util/es/utils/set.js.map +1 -1
- package/dist/node_modules/@rc-component/virtual-list/es/hooks/useScrollTo.js +1 -1
- package/dist/node_modules/antd/es/_util/warning.js +1 -1
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js +53 -48
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js.map +1 -1
- package/dist/node_modules/antd/es/_util/wave/index.js +1 -1
- package/dist/node_modules/antd/es/_util/wave/index.js.map +1 -1
- package/dist/node_modules/antd/es/_util/wave/style.js +8 -7
- package/dist/node_modules/antd/es/_util/wave/style.js.map +1 -1
- package/dist/node_modules/antd/es/alert/Alert.js +133 -128
- package/dist/node_modules/antd/es/alert/Alert.js.map +1 -1
- package/dist/node_modules/antd/es/badge/Badge.js +29 -28
- package/dist/node_modules/antd/es/badge/Badge.js.map +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/button/buttonHelpers.js +47 -41
- package/dist/node_modules/antd/es/button/buttonHelpers.js.map +1 -1
- package/dist/node_modules/antd/es/button/style/compact.js +45 -36
- package/dist/node_modules/antd/es/button/style/compact.js.map +1 -1
- package/dist/node_modules/antd/es/button/style/variant.js +100 -90
- package/dist/node_modules/antd/es/button/style/variant.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/generateCalendar.js +55 -57
- package/dist/node_modules/antd/es/calendar/generateCalendar.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/style/index.js +18 -18
- package/dist/node_modules/antd/es/calendar/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/card/CardGrid.js.map +1 -1
- package/dist/node_modules/antd/es/card/style/index.js +23 -11
- package/dist/node_modules/antd/es/card/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/checkbox/Group.js +32 -30
- package/dist/node_modules/antd/es/checkbox/Group.js.map +1 -1
- package/dist/node_modules/antd/es/collapse/Collapse.js +61 -61
- package/dist/node_modules/antd/es/collapse/Collapse.js.map +1 -1
- package/dist/node_modules/antd/es/color-picker/color.js +9 -9
- package/dist/node_modules/antd/es/color-picker/color.js.map +1 -1
- package/dist/node_modules/antd/es/config-provider/index.js +76 -71
- package/dist/node_modules/antd/es/config-provider/index.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js +29 -31
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js +7 -9
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/{SuffixIcon.js → useSuffixIcon.js} +4 -4
- package/dist/node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js.map +1 -0
- package/dist/node_modules/antd/es/date-picker/style/panel.js +4 -4
- package/dist/node_modules/antd/es/date-picker/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/drawer/useFocusable.js +14 -0
- package/dist/node_modules/antd/es/drawer/useFocusable.js.map +1 -0
- package/dist/node_modules/antd/es/empty/empty.js +27 -32
- package/dist/node_modules/antd/es/empty/empty.js.map +1 -1
- package/dist/node_modules/antd/es/empty/simple.js +2 -2
- package/dist/node_modules/antd/es/empty/simple.js.map +1 -1
- package/dist/node_modules/antd/es/form/hooks/useForm.js +2 -2
- package/dist/node_modules/antd/es/form/index.js +1 -1
- package/dist/node_modules/antd/es/form/style/index.js +24 -24
- package/dist/node_modules/antd/es/form/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/grid/col.js +56 -54
- package/dist/node_modules/antd/es/grid/col.js.map +1 -1
- package/dist/node_modules/antd/es/grid/style/index.js +50 -50
- package/dist/node_modules/antd/es/grid/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input/TextArea.js +16 -15
- package/dist/node_modules/antd/es/input/TextArea.js.map +1 -1
- package/dist/node_modules/antd/es/input/style/index.js +1 -0
- package/dist/node_modules/antd/es/input/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/index.js +91 -91
- package/dist/node_modules/antd/es/input-number/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/style/index.js +80 -79
- package/dist/node_modules/antd/es/input-number/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/layout/Sider.js +1 -2
- package/dist/node_modules/antd/es/layout/style/sider.js +9 -9
- package/dist/node_modules/antd/es/layout/style/sider.js.map +1 -1
- package/dist/node_modules/antd/es/menu/MenuItem.js +6 -6
- package/dist/node_modules/antd/es/menu/MenuItem.js.map +1 -1
- package/dist/node_modules/antd/es/menu/SubMenu.js +8 -8
- package/dist/node_modules/antd/es/menu/SubMenu.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/index.js +58 -58
- package/dist/node_modules/antd/es/menu/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/message/index.js +1 -1
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js +117 -112
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js.map +1 -1
- package/dist/node_modules/antd/es/modal/Modal.js +115 -109
- package/dist/node_modules/antd/es/modal/Modal.js.map +1 -1
- package/dist/node_modules/antd/es/modal/confirm.js +3 -3
- package/dist/node_modules/antd/es/modal/style/index.js +83 -80
- package/dist/node_modules/antd/es/modal/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/Pagination.js +85 -81
- package/dist/node_modules/antd/es/pagination/Pagination.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/bordered.js +2 -2
- package/dist/node_modules/antd/es/pagination/style/bordered.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/index.js +100 -133
- package/dist/node_modules/antd/es/pagination/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/index.js +77 -82
- package/dist/node_modules/antd/es/popover/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/style/index.js +65 -63
- package/dist/node_modules/antd/es/popover/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/progress/progress.js +4 -4
- package/dist/node_modules/antd/es/radio/context.js +3 -3
- package/dist/node_modules/antd/es/radio/context.js.map +1 -1
- package/dist/node_modules/antd/es/radio/group.js +31 -29
- package/dist/node_modules/antd/es/radio/group.js.map +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js +71 -69
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input.js +113 -98
- package/dist/node_modules/antd/es/select/style/select-input.js.map +1 -1
- package/dist/node_modules/antd/es/skeleton/Image.js +9 -9
- package/dist/node_modules/antd/es/skeleton/Image.js.map +1 -1
- package/dist/node_modules/antd/es/space/Item.js +2 -2
- package/dist/node_modules/antd/es/space/Item.js.map +1 -1
- package/dist/node_modules/antd/es/space/index.js +4 -4
- package/dist/node_modules/antd/es/space/index.js.map +1 -1
- package/dist/node_modules/antd/es/space/style/addon.js +47 -46
- package/dist/node_modules/antd/es/space/style/addon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/PanelArrow.js +2 -2
- package/dist/node_modules/antd/es/steps/PanelArrow.js.map +1 -1
- package/dist/node_modules/antd/es/steps/ProgressIcon.js +12 -10
- package/dist/node_modules/antd/es/steps/ProgressIcon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/index.js +108 -106
- package/dist/node_modules/antd/es/steps/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/horizontal.js +13 -11
- package/dist/node_modules/antd/es/steps/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/icon.js +23 -18
- package/dist/node_modules/antd/es/steps/style/icon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/index.js +41 -41
- package/dist/node_modules/antd/es/steps/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/inline.js +28 -23
- package/dist/node_modules/antd/es/steps/style/inline.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/label-placement.js +44 -39
- package/dist/node_modules/antd/es/steps/style/label-placement.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/nav.js +29 -27
- package/dist/node_modules/antd/es/steps/style/nav.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/panel.js +61 -56
- package/dist/node_modules/antd/es/steps/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress-dot.js +28 -26
- package/dist/node_modules/antd/es/steps/style/progress-dot.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress.js +24 -57
- package/dist/node_modules/antd/es/steps/style/progress.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/rtl.js +10 -8
- package/dist/node_modules/antd/es/steps/style/rtl.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/small.js +21 -16
- package/dist/node_modules/antd/es/steps/style/small.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/status.js +187 -176
- package/dist/node_modules/antd/es/steps/style/status.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/util.js +18 -16
- package/dist/node_modules/antd/es/steps/style/util.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/vertical.js +21 -16
- package/dist/node_modules/antd/es/steps/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/style/placementArrow.js +31 -29
- package/dist/node_modules/antd/es/style/placementArrow.js.map +1 -1
- package/dist/node_modules/antd/es/table/InternalTable.js +65 -62
- package/dist/node_modules/antd/es/table/InternalTable.js.map +1 -1
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js +6 -0
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js.map +1 -0
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js +145 -137
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/index.js +3 -3
- package/dist/node_modules/antd/es/table/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/radius.js +10 -0
- package/dist/node_modules/antd/es/table/style/radius.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/virtual.js +5 -5
- package/dist/node_modules/antd/es/table/style/virtual.js.map +1 -1
- package/dist/node_modules/antd/es/tag/style/index.js +5 -5
- package/dist/node_modules/antd/es/tag/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js +29 -32
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/Timeline.js +76 -74
- package/dist/node_modules/antd/es/timeline/Timeline.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/horizontal.js +21 -18
- package/dist/node_modules/antd/es/timeline/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/index.js +85 -70
- package/dist/node_modules/antd/es/timeline/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/useItems.js +38 -37
- package/dist/node_modules/antd/es/timeline/useItems.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/PurePanel.js +27 -27
- package/dist/node_modules/antd/es/tooltip/PurePanel.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js +17 -22
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js +27 -26
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/index.js +52 -51
- package/dist/node_modules/antd/es/tooltip/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/style/index.js +55 -52
- package/dist/node_modules/antd/es/tooltip/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/util.js +13 -12
- package/dist/node_modules/antd/es/tooltip/util.js.map +1 -1
- package/dist/node_modules/antd/es/transfer/ListBody.js +16 -16
- package/dist/node_modules/antd/es/transfer/ListBody.js.map +1 -1
- package/dist/node_modules/antd/es/transfer/ListItem.js +43 -43
- package/dist/node_modules/antd/es/transfer/ListItem.js.map +1 -1
- package/dist/node_modules/antd/es/transfer/style/index.js +1 -1
- package/dist/node_modules/antd/es/tree/DirectoryTree.js +42 -41
- package/dist/node_modules/antd/es/tree/DirectoryTree.js.map +1 -1
- package/dist/node_modules/antd/es/typography/Base/index.js +43 -42
- package/dist/node_modules/antd/es/typography/Base/index.js.map +1 -1
- package/dist/node_modules/antd/es/typography/style/index.js +43 -43
- package/dist/node_modules/antd/es/typography/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/typography/style/mixins.js +1 -1
- package/dist/node_modules/antd/es/typography/style/mixins.js.map +1 -1
- package/dist/node_modules/antd/es/version/version.js +1 -1
- package/dist/node_modules/antd/es/version/version.js.map +1 -1
- package/dist/node_modules/antd/es/watermark/context.js +5 -6
- package/dist/node_modules/antd/es/watermark/context.js.map +1 -1
- package/dist/node_modules/antd-style/node_modules/@ant-design/cssinjs/es/StyleContext.js +1 -2
- package/dist/node_modules/antd-style/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
- package/dist/node_modules/exceljs/dist/exceljs.min.js +91 -508
- package/dist/node_modules/exceljs/dist/exceljs.min.js.map +1 -1
- package/dist/node_modules/html2canvas/dist/html2canvas.esm.js +5 -55
- package/dist/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +8 -53
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/lodash/lodash.js +295 -278
- package/dist/node_modules/lodash/lodash.js.map +1 -1
- package/dist/node_modules/moment/dist/moment.js +2 -8
- package/dist/node_modules/moment/dist/moment.js.map +1 -1
- package/dist/node_modules/rc-util/es/isEqual.js +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@rc-component/form/es/BatchUpdate.js +0 -21
- package/dist/node_modules/@rc-component/form/es/BatchUpdate.js.map +0 -1
- package/dist/node_modules/@rc-component/form/es/useForm.js.map +0 -1
- package/dist/node_modules/@rc-component/form/es/useWatch.js.map +0 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/SuffixIcon.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.js","sources":["../../../../../../../node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { clsx } from 'clsx';\nimport { useComposeRef } from \"@rc-component/util/es/ref\";\nimport React, { useMemo, useRef } from 'react';\nimport { RefContext } from \"../../context\";\nimport MemoChildren from \"./MemoChildren\";\nimport pickAttrs from \"@rc-component/util/es/pickAttrs\";\nconst
|
|
1
|
+
{"version":3,"file":"Panel.js","sources":["../../../../../../../node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { clsx } from 'clsx';\nimport { useComposeRef } from \"@rc-component/util/es/ref\";\nimport { useLockFocus } from \"@rc-component/util/es/Dom/focus\";\nimport React, { useMemo, useRef } from 'react';\nimport { RefContext } from \"../../context\";\nimport MemoChildren from \"./MemoChildren\";\nimport pickAttrs from \"@rc-component/util/es/pickAttrs\";\nconst Panel = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n style,\n title,\n ariaId,\n footer,\n closable,\n closeIcon,\n onClose,\n children,\n bodyStyle,\n bodyProps,\n modalRender,\n onMouseDown,\n onMouseUp,\n holderRef,\n visible,\n forceRender,\n width,\n height,\n classNames: modalClassNames,\n styles: modalStyles,\n isFixedPos,\n focusTrap\n } = props;\n\n // ================================= Refs =================================\n const {\n panel: panelRef\n } = React.useContext(RefContext);\n const internalRef = useRef(null);\n const mergedRef = useComposeRef(holderRef, panelRef, internalRef);\n useLockFocus(visible && isFixedPos && focusTrap !== false, () => internalRef.current);\n React.useImperativeHandle(ref, () => ({\n focus: () => {\n internalRef.current?.focus({\n preventScroll: true\n });\n }\n }));\n\n // ================================ Style =================================\n const contentStyle = {};\n if (width !== undefined) {\n contentStyle.width = width;\n }\n if (height !== undefined) {\n contentStyle.height = height;\n }\n // ================================ Render ================================\n const footerNode = footer ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(`${prefixCls}-footer`, modalClassNames?.footer),\n style: {\n ...modalStyles?.footer\n }\n }, footer) : null;\n const headerNode = title ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(`${prefixCls}-header`, modalClassNames?.header),\n style: {\n ...modalStyles?.header\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(`${prefixCls}-title`, modalClassNames?.title),\n id: ariaId,\n style: {\n ...modalStyles?.title\n }\n }, title)) : null;\n const closableObj = useMemo(() => {\n if (typeof closable === 'object' && closable !== null) {\n return closable;\n }\n if (closable) {\n return {\n closeIcon: closeIcon ?? /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-x`\n })\n };\n }\n return {};\n }, [closable, closeIcon, prefixCls]);\n const ariaProps = pickAttrs(closableObj, true);\n const closeBtnIsDisabled = typeof closable === 'object' && closable.disabled;\n const closerNode = closable ? /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\"\n }, ariaProps, {\n className: `${prefixCls}-close`,\n disabled: closeBtnIsDisabled\n }), closableObj.closeIcon) : null;\n const content = /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(`${prefixCls}-container`, modalClassNames?.container),\n style: modalStyles?.container\n }, closerNode, headerNode, /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(`${prefixCls}-body`, modalClassNames?.body),\n style: {\n ...bodyStyle,\n ...modalStyles?.body\n }\n }, bodyProps), children), footerNode);\n return /*#__PURE__*/React.createElement(\"div\", {\n key: \"dialog-element\",\n role: \"dialog\",\n \"aria-labelledby\": title ? ariaId : null,\n \"aria-modal\": \"true\",\n ref: mergedRef,\n style: {\n ...style,\n ...contentStyle\n },\n className: clsx(prefixCls, className),\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp,\n tabIndex: -1\n }, /*#__PURE__*/React.createElement(MemoChildren, {\n shouldUpdate: visible || forceRender\n }, modalRender ? modalRender(content) : content));\n});\nif (process.env.NODE_ENV !== 'production') {\n Panel.displayName = 'Panel';\n}\nexport default Panel;"],"names":["_extends","target","i","source","key","Panel","React","props","ref","prefixCls","className","style","title","ariaId","footer","closable","closeIcon","onClose","children","bodyStyle","bodyProps","modalRender","onMouseDown","onMouseUp","holderRef","visible","forceRender","width","height","modalClassNames","modalStyles","isFixedPos","focusTrap","panelRef","RefContext","internalRef","useRef","mergedRef","useComposeRef","useLockFocus","contentStyle","footerNode","clsx","headerNode","closableObj","useMemo","ariaProps","pickAttrs","closeBtnIsDisabled","closerNode","content","MemoChildren","process"],"mappings":";;;;;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAQ7U,MAACK,IAAqBC,gBAAAA,EAAM,WAAW,CAACC,GAAOC,MAAQ;AAC1D,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,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EACd,GAAkBjB,gBAAAA,EAAM,cAAc6C,GAAc;AAAA,IAChD,cAAc1B,KAAWC;AAAA,EAC7B,GAAKL,IAAcA,EAAY6B,CAAO,IAAIA,CAAO,CAAC;AAClD,CAAC;AACGE,EAAQ,IAAI,aAAa,iBAC3B/C,EAAM,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
1
|
+
import h from "../../../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
|
+
import * as a from "react";
|
|
3
3
|
import { useRef as u } from "react";
|
|
4
4
|
import { clsx as P } from "../../../../../clsx/dist/clsx.js";
|
|
5
5
|
import M from "../../../../motion/es/CSSMotion.js";
|
|
@@ -15,49 +15,51 @@ function l() {
|
|
|
15
15
|
return e;
|
|
16
16
|
}, l.apply(this, arguments);
|
|
17
17
|
}
|
|
18
|
-
const I = /* @__PURE__ */
|
|
18
|
+
const I = /* @__PURE__ */ a.forwardRef((e, n) => {
|
|
19
19
|
const {
|
|
20
20
|
prefixCls: t,
|
|
21
21
|
title: r,
|
|
22
22
|
style: d,
|
|
23
23
|
className: g,
|
|
24
|
-
visible:
|
|
25
|
-
forceRender:
|
|
26
|
-
destroyOnHidden:
|
|
24
|
+
visible: v,
|
|
25
|
+
forceRender: O,
|
|
26
|
+
destroyOnHidden: b,
|
|
27
27
|
motionName: x,
|
|
28
28
|
ariaId: y,
|
|
29
29
|
onVisibleChanged: N,
|
|
30
30
|
mousePosition: o
|
|
31
|
-
} = e,
|
|
32
|
-
|
|
31
|
+
} = e, i = u(null), f = u(null);
|
|
32
|
+
a.useImperativeHandle(n, () => ({
|
|
33
33
|
...f.current,
|
|
34
|
-
inMotion:
|
|
35
|
-
enableMotion:
|
|
34
|
+
inMotion: i.current.inMotion,
|
|
35
|
+
enableMotion: i.current.enableMotion
|
|
36
36
|
}));
|
|
37
|
-
const [m, R] =
|
|
37
|
+
const [m, R] = a.useState(), c = {};
|
|
38
38
|
m && (c.transformOrigin = m);
|
|
39
39
|
function p() {
|
|
40
|
-
|
|
40
|
+
if (!i.current?.nativeElement)
|
|
41
|
+
return;
|
|
42
|
+
const s = S(i.current.nativeElement);
|
|
41
43
|
R(o && (o.x || o.y) ? `${o.x - s.left}px ${o.y - s.top}px` : "");
|
|
42
44
|
}
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
visible:
|
|
45
|
+
return /* @__PURE__ */ a.createElement(M, {
|
|
46
|
+
visible: v,
|
|
45
47
|
onVisibleChanged: N,
|
|
46
48
|
onAppearPrepare: p,
|
|
47
49
|
onEnterPrepare: p,
|
|
48
|
-
forceRender:
|
|
50
|
+
forceRender: O,
|
|
49
51
|
motionName: x,
|
|
50
|
-
removeOnLeave:
|
|
51
|
-
ref:
|
|
52
|
+
removeOnLeave: b,
|
|
53
|
+
ref: i
|
|
52
54
|
}, ({
|
|
53
55
|
className: s,
|
|
54
56
|
style: C
|
|
55
|
-
},
|
|
57
|
+
}, E) => /* @__PURE__ */ a.createElement(j, l({}, e, {
|
|
56
58
|
ref: f,
|
|
57
59
|
title: r,
|
|
58
60
|
ariaId: y,
|
|
59
61
|
prefixCls: t,
|
|
60
|
-
holderRef:
|
|
62
|
+
holderRef: E,
|
|
61
63
|
style: {
|
|
62
64
|
...C,
|
|
63
65
|
...d,
|
|
@@ -66,7 +68,7 @@ const I = /* @__PURE__ */ i.forwardRef((e, n) => {
|
|
|
66
68
|
className: P(g, s)
|
|
67
69
|
})));
|
|
68
70
|
});
|
|
69
|
-
|
|
71
|
+
h.env.NODE_ENV !== "production" && (I.displayName = "Content");
|
|
70
72
|
export {
|
|
71
73
|
I as default
|
|
72
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@rc-component/dialog/es/Dialog/Content/index.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport { clsx } from 'clsx';\nimport CSSMotion from '@rc-component/motion';\nimport { offset } from \"../../util\";\nimport Panel from \"./Panel\";\nconst Content = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n title,\n style,\n className,\n visible,\n forceRender,\n destroyOnHidden,\n motionName,\n ariaId,\n onVisibleChanged,\n mousePosition\n } = props;\n const dialogRef = useRef(null);\n const panelRef = useRef(null);\n\n // ============================== Refs ==============================\n React.useImperativeHandle(ref, () => ({\n ...panelRef.current,\n inMotion: dialogRef.current.inMotion,\n enableMotion: dialogRef.current.enableMotion\n }));\n\n // ============================= Style ==============================\n const [transformOrigin, setTransformOrigin] = React.useState();\n const contentStyle = {};\n if (transformOrigin) {\n contentStyle.transformOrigin = transformOrigin;\n }\n function onPrepare() {\n const elementOffset = offset(dialogRef.current.nativeElement);\n setTransformOrigin(mousePosition && (mousePosition.x || mousePosition.y) ? `${mousePosition.x - elementOffset.left}px ${mousePosition.y - elementOffset.top}px` : '');\n }\n\n // ============================= Render =============================\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n onVisibleChanged: onVisibleChanged,\n onAppearPrepare: onPrepare,\n onEnterPrepare: onPrepare,\n forceRender: forceRender,\n motionName: motionName,\n removeOnLeave: destroyOnHidden,\n ref: dialogRef\n }, ({\n className: motionClassName,\n style: motionStyle\n }, motionRef) => /*#__PURE__*/React.createElement(Panel, _extends({}, props, {\n ref: panelRef,\n title: title,\n ariaId: ariaId,\n prefixCls: prefixCls,\n holderRef: motionRef,\n style: {\n ...motionStyle,\n ...style,\n ...contentStyle\n },\n className: clsx(className, motionClassName)\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Content.displayName = 'Content';\n}\nexport default Content;"],"names":["_extends","target","i","source","key","Content","React","props","ref","prefixCls","title","style","className","visible","forceRender","destroyOnHidden","motionName","ariaId","onVisibleChanged","mousePosition","dialogRef","useRef","panelRef","transformOrigin","setTransformOrigin","contentStyle","onPrepare","elementOffset","offset","CSSMotion","motionClassName","motionStyle","motionRef","Panel","clsx","process"],"mappings":";;;;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAO7U,MAACK,IAAuB,gBAAAC,EAAM,WAAW,CAACC,GAAOC,MAAQ;AAC5D,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,EACJ,IAAMZ,GACEa,IAAYC,EAAO,IAAI,GACvBC,IAAWD,EAAO,IAAI;AAG5B,EAAAf,EAAM,oBAAoBE,GAAK,OAAO;AAAA,IACpC,GAAGc,EAAS;AAAA,IACZ,UAAUF,EAAU,QAAQ;AAAA,IAC5B,cAAcA,EAAU,QAAQ;AAAA,EACpC,EAAI;AAGF,QAAM,CAACG,GAAiBC,CAAkB,IAAIlB,EAAM,SAAQ,GACtDmB,IAAe,CAAA;AACrB,EAAIF,MACFE,EAAa,kBAAkBF;AAEjC,WAASG,IAAY;AACnB,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@rc-component/dialog/es/Dialog/Content/index.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport { clsx } from 'clsx';\nimport CSSMotion from '@rc-component/motion';\nimport { offset } from \"../../util\";\nimport Panel from \"./Panel\";\nconst Content = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n title,\n style,\n className,\n visible,\n forceRender,\n destroyOnHidden,\n motionName,\n ariaId,\n onVisibleChanged,\n mousePosition\n } = props;\n const dialogRef = useRef(null);\n const panelRef = useRef(null);\n\n // ============================== Refs ==============================\n React.useImperativeHandle(ref, () => ({\n ...panelRef.current,\n inMotion: dialogRef.current.inMotion,\n enableMotion: dialogRef.current.enableMotion\n }));\n\n // ============================= Style ==============================\n const [transformOrigin, setTransformOrigin] = React.useState();\n const contentStyle = {};\n if (transformOrigin) {\n contentStyle.transformOrigin = transformOrigin;\n }\n function onPrepare() {\n if (!dialogRef.current?.nativeElement) {\n return;\n }\n const elementOffset = offset(dialogRef.current.nativeElement);\n setTransformOrigin(mousePosition && (mousePosition.x || mousePosition.y) ? `${mousePosition.x - elementOffset.left}px ${mousePosition.y - elementOffset.top}px` : '');\n }\n\n // ============================= Render =============================\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n onVisibleChanged: onVisibleChanged,\n onAppearPrepare: onPrepare,\n onEnterPrepare: onPrepare,\n forceRender: forceRender,\n motionName: motionName,\n removeOnLeave: destroyOnHidden,\n ref: dialogRef\n }, ({\n className: motionClassName,\n style: motionStyle\n }, motionRef) => /*#__PURE__*/React.createElement(Panel, _extends({}, props, {\n ref: panelRef,\n title: title,\n ariaId: ariaId,\n prefixCls: prefixCls,\n holderRef: motionRef,\n style: {\n ...motionStyle,\n ...style,\n ...contentStyle\n },\n className: clsx(className, motionClassName)\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Content.displayName = 'Content';\n}\nexport default Content;"],"names":["_extends","target","i","source","key","Content","React","props","ref","prefixCls","title","style","className","visible","forceRender","destroyOnHidden","motionName","ariaId","onVisibleChanged","mousePosition","dialogRef","useRef","panelRef","transformOrigin","setTransformOrigin","contentStyle","onPrepare","elementOffset","offset","CSSMotion","motionClassName","motionStyle","motionRef","Panel","clsx","process"],"mappings":";;;;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAO7U,MAACK,IAAuB,gBAAAC,EAAM,WAAW,CAACC,GAAOC,MAAQ;AAC5D,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,EACJ,IAAMZ,GACEa,IAAYC,EAAO,IAAI,GACvBC,IAAWD,EAAO,IAAI;AAG5B,EAAAf,EAAM,oBAAoBE,GAAK,OAAO;AAAA,IACpC,GAAGc,EAAS;AAAA,IACZ,UAAUF,EAAU,QAAQ;AAAA,IAC5B,cAAcA,EAAU,QAAQ;AAAA,EACpC,EAAI;AAGF,QAAM,CAACG,GAAiBC,CAAkB,IAAIlB,EAAM,SAAQ,GACtDmB,IAAe,CAAA;AACrB,EAAIF,MACFE,EAAa,kBAAkBF;AAEjC,WAASG,IAAY;AACnB,QAAI,CAACN,EAAU,SAAS;AACtB;AAEF,UAAMO,IAAgBC,EAAOR,EAAU,QAAQ,aAAa;AAC5D,IAAAI,EAAmBL,MAAkBA,EAAc,KAAKA,EAAc,KAAK,GAAGA,EAAc,IAAIQ,EAAc,IAAI,MAAMR,EAAc,IAAIQ,EAAc,GAAG,OAAO,EAAE;AAAA,EACtK;AAGA,SAAoB,gBAAArB,EAAM,cAAcuB,GAAW;AAAA,IACjD,SAAShB;AAAA,IACT,kBAAkBK;AAAA,IAClB,iBAAiBQ;AAAA,IACjB,gBAAgBA;AAAA,IAChB,aAAaZ;AAAA,IACb,YAAYE;AAAA,IACZ,eAAeD;AAAA,IACf,KAAKK;AAAA,EACT,GAAK,CAAC;AAAA,IACF,WAAWU;AAAA,IACX,OAAOC;AAAA,EACX,GAAKC,MAA2B,gBAAA1B,EAAM,cAAc2B,GAAOjC,EAAS,CAAA,GAAIO,GAAO;AAAA,IAC3E,KAAKe;AAAA,IACL,OAAOZ;AAAA,IACP,QAAQO;AAAA,IACR,WAAWR;AAAA,IACX,WAAWuB;AAAA,IACX,OAAO;AAAA,MACL,GAAGD;AAAA,MACH,GAAGpB;AAAA,MACH,GAAGc;AAAA,IACT;AAAA,IACI,WAAWS,EAAKtB,GAAWkB,CAAe;AAAA,EAC9C,CAAG,CAAC,CAAC;AACL,CAAC;AACGK,EAAQ,IAAI,aAAa,iBAC3B9B,EAAQ,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,68 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { clsx as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import ne from "./
|
|
11
|
-
import re from "./Mask.js";
|
|
1
|
+
import Y from "../../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
|
+
import { clsx as S } from "../../../../clsx/dist/clsx.js";
|
|
3
|
+
import k from "../../../util/es/Dom/contains.js";
|
|
4
|
+
import Z from "../../../util/es/hooks/useId.js";
|
|
5
|
+
import ee from "../../../util/es/pickAttrs.js";
|
|
6
|
+
import * as a from "react";
|
|
7
|
+
import { useRef as i, useEffect as w } from "react";
|
|
8
|
+
import { getMotionName as E } from "../util.js";
|
|
9
|
+
import te from "./Content/index.js";
|
|
10
|
+
import ne from "./Mask.js";
|
|
12
11
|
import { warning as x } from "../../../util/es/warning.js";
|
|
13
12
|
function l() {
|
|
14
|
-
return l = Object.assign ? Object.assign.bind() : function(
|
|
13
|
+
return l = Object.assign ? Object.assign.bind() : function(s) {
|
|
15
14
|
for (var t = 1; t < arguments.length; t++) {
|
|
16
|
-
var
|
|
17
|
-
for (var n in
|
|
18
|
-
Object.prototype.hasOwnProperty.call(
|
|
15
|
+
var r = arguments[t];
|
|
16
|
+
for (var n in r)
|
|
17
|
+
Object.prototype.hasOwnProperty.call(r, n) && (s[n] = r[n]);
|
|
19
18
|
}
|
|
20
|
-
return
|
|
19
|
+
return s;
|
|
21
20
|
}, l.apply(this, arguments);
|
|
22
21
|
}
|
|
23
|
-
const
|
|
22
|
+
const pe = (s) => {
|
|
24
23
|
const {
|
|
25
24
|
prefixCls: t = "rc-dialog",
|
|
26
|
-
zIndex:
|
|
25
|
+
zIndex: r,
|
|
27
26
|
visible: n = !1,
|
|
28
|
-
|
|
29
|
-
focusTriggerAfterClose: D = !0,
|
|
30
|
-
// scrollLocker,
|
|
31
|
-
// Wrapper
|
|
27
|
+
focusTriggerAfterClose: h = !0,
|
|
32
28
|
wrapStyle: M,
|
|
33
29
|
wrapClassName: O,
|
|
34
30
|
wrapProps: R,
|
|
35
|
-
onClose:
|
|
36
|
-
afterOpenChange:
|
|
37
|
-
afterClose:
|
|
31
|
+
onClose: P,
|
|
32
|
+
afterOpenChange: A,
|
|
33
|
+
afterClose: D,
|
|
38
34
|
// Dialog
|
|
39
|
-
transitionName:
|
|
40
|
-
animation:
|
|
41
|
-
closable:
|
|
35
|
+
transitionName: I,
|
|
36
|
+
animation: T,
|
|
37
|
+
closable: V = !0,
|
|
42
38
|
// Mask
|
|
43
|
-
mask:
|
|
44
|
-
maskTransitionName:
|
|
45
|
-
maskAnimation:
|
|
46
|
-
maskClosable:
|
|
47
|
-
maskStyle:
|
|
48
|
-
maskProps:
|
|
49
|
-
rootClassName:
|
|
50
|
-
rootStyle:
|
|
51
|
-
classNames:
|
|
39
|
+
mask: d = !0,
|
|
40
|
+
maskTransitionName: $,
|
|
41
|
+
maskAnimation: j,
|
|
42
|
+
maskClosable: F = !0,
|
|
43
|
+
maskStyle: U,
|
|
44
|
+
maskProps: W,
|
|
45
|
+
rootClassName: _,
|
|
46
|
+
rootStyle: z,
|
|
47
|
+
classNames: C,
|
|
52
48
|
styles: g
|
|
53
|
-
} =
|
|
54
|
-
|
|
55
|
-
x(!(e in
|
|
56
|
-
}), "wrapClassName" in
|
|
57
|
-
const c = i(null),
|
|
58
|
-
function F() {
|
|
59
|
-
w(m.current, document.activeElement) || (c.current = document.activeElement);
|
|
60
|
-
}
|
|
49
|
+
} = s;
|
|
50
|
+
Y.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach((e) => {
|
|
51
|
+
x(!(e in s), `${e} is deprecated, please use styles instead.`);
|
|
52
|
+
}), "wrapClassName" in s && x(!1, "wrapClassName is deprecated, please use classNames instead."));
|
|
53
|
+
const c = i(null), o = i(null), m = i(null), [u, y] = a.useState(n), [L, q] = a.useState(!1), B = Z();
|
|
61
54
|
function G() {
|
|
62
|
-
|
|
55
|
+
k(o.current, document.activeElement) || (c.current = document.activeElement);
|
|
56
|
+
}
|
|
57
|
+
function H() {
|
|
58
|
+
k(o.current, document.activeElement) || m.current?.focus();
|
|
63
59
|
}
|
|
64
|
-
function
|
|
65
|
-
if (
|
|
60
|
+
function N() {
|
|
61
|
+
if (y(!1), d && c.current && h) {
|
|
66
62
|
try {
|
|
67
63
|
c.current.focus({
|
|
68
64
|
preventScroll: !0
|
|
@@ -71,80 +67,76 @@ const Ce = (r) => {
|
|
|
71
67
|
}
|
|
72
68
|
c.current = null;
|
|
73
69
|
}
|
|
74
|
-
u &&
|
|
70
|
+
u && D?.();
|
|
75
71
|
}
|
|
76
|
-
function
|
|
77
|
-
e ?
|
|
72
|
+
function J(e) {
|
|
73
|
+
e ? H() : N(), A?.(e);
|
|
78
74
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
75
|
+
function v(e) {
|
|
76
|
+
P?.(e);
|
|
81
77
|
}
|
|
82
|
-
const f = i(!1),
|
|
83
|
-
clearTimeout(
|
|
78
|
+
const f = i(!1), p = i(null), K = () => {
|
|
79
|
+
clearTimeout(p.current), f.current = !0;
|
|
84
80
|
}, Q = () => {
|
|
85
|
-
|
|
81
|
+
p.current = setTimeout(() => {
|
|
86
82
|
f.current = !1;
|
|
87
83
|
});
|
|
88
84
|
};
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
f.current ? f.current = !1 :
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
n ? (b(!0), F()) : u && a.current.enableMotion() && !a.current.inMotion() && v();
|
|
102
|
-
}, [n]), S(() => () => {
|
|
103
|
-
clearTimeout(d.current);
|
|
85
|
+
let b = null;
|
|
86
|
+
F && (b = (e) => {
|
|
87
|
+
f.current ? f.current = !1 : o.current === e.target && v(e);
|
|
88
|
+
}), w(() => {
|
|
89
|
+
if (n) {
|
|
90
|
+
if (y(!0), G(), o.current) {
|
|
91
|
+
const e = getComputedStyle(o.current);
|
|
92
|
+
q(e.position === "fixed");
|
|
93
|
+
}
|
|
94
|
+
} else u && m.current.enableMotion() && !m.current.inMotion() && N();
|
|
95
|
+
}, [n]), w(() => () => {
|
|
96
|
+
clearTimeout(p.current);
|
|
104
97
|
}, []);
|
|
105
|
-
const
|
|
106
|
-
zIndex:
|
|
98
|
+
const X = {
|
|
99
|
+
zIndex: r,
|
|
107
100
|
...M,
|
|
108
101
|
...g?.wrapper,
|
|
109
102
|
display: u ? null : "none"
|
|
110
103
|
};
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
className:
|
|
113
|
-
style:
|
|
114
|
-
},
|
|
104
|
+
return /* @__PURE__ */ a.createElement("div", l({
|
|
105
|
+
className: S(`${t}-root`, _),
|
|
106
|
+
style: z
|
|
107
|
+
}, ee(s, {
|
|
115
108
|
data: !0
|
|
116
|
-
})), /* @__PURE__ */
|
|
109
|
+
})), /* @__PURE__ */ a.createElement(ne, {
|
|
117
110
|
prefixCls: t,
|
|
118
|
-
visible:
|
|
119
|
-
motionName:
|
|
111
|
+
visible: d && n,
|
|
112
|
+
motionName: E(t, $, j),
|
|
120
113
|
style: {
|
|
121
|
-
zIndex:
|
|
122
|
-
...
|
|
114
|
+
zIndex: r,
|
|
115
|
+
...U,
|
|
123
116
|
...g?.mask
|
|
124
117
|
},
|
|
125
|
-
maskProps:
|
|
126
|
-
className:
|
|
127
|
-
}), /* @__PURE__ */
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
onMouseDown: J,
|
|
118
|
+
maskProps: W,
|
|
119
|
+
className: C?.mask
|
|
120
|
+
}), /* @__PURE__ */ a.createElement("div", l({
|
|
121
|
+
className: S(`${t}-wrap`, O, C?.wrapper),
|
|
122
|
+
ref: o,
|
|
123
|
+
onClick: b,
|
|
124
|
+
style: X
|
|
125
|
+
}, R), /* @__PURE__ */ a.createElement(te, l({}, s, {
|
|
126
|
+
isFixedPos: L,
|
|
127
|
+
onMouseDown: K,
|
|
136
128
|
onMouseUp: Q,
|
|
137
|
-
ref:
|
|
138
|
-
closable:
|
|
139
|
-
ariaId:
|
|
129
|
+
ref: m,
|
|
130
|
+
closable: V,
|
|
131
|
+
ariaId: B,
|
|
140
132
|
prefixCls: t,
|
|
141
133
|
visible: n && u,
|
|
142
|
-
onClose:
|
|
143
|
-
onVisibleChanged:
|
|
144
|
-
motionName:
|
|
134
|
+
onClose: v,
|
|
135
|
+
onVisibleChanged: J,
|
|
136
|
+
motionName: E(t, I, T)
|
|
145
137
|
}))));
|
|
146
138
|
};
|
|
147
139
|
export {
|
|
148
|
-
|
|
140
|
+
pe as default
|
|
149
141
|
};
|
|
150
142
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@rc-component/dialog/es/Dialog/index.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { clsx } from 'clsx';\nimport contains from \"@rc-component/util/es/Dom/contains\";\nimport useId from \"@rc-component/util/es/hooks/useId\";\nimport KeyCode from \"@rc-component/util/es/KeyCode\";\nimport pickAttrs from \"@rc-component/util/es/pickAttrs\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { getMotionName } from \"../util\";\nimport Content from \"./Content\";\nimport Mask from \"./Mask\";\nimport { warning } from \"@rc-component/util/es/warning\";\nconst Dialog = props => {\n const {\n prefixCls = 'rc-dialog',\n zIndex,\n visible = false,\n keyboard = true,\n focusTriggerAfterClose = true,\n // scrollLocker,\n // Wrapper\n wrapStyle,\n wrapClassName,\n wrapProps,\n onClose,\n afterOpenChange,\n afterClose,\n // Dialog\n transitionName,\n animation,\n closable = true,\n // Mask\n mask = true,\n maskTransitionName,\n maskAnimation,\n maskClosable = true,\n maskStyle,\n maskProps,\n rootClassName,\n rootStyle,\n classNames: modalClassNames,\n styles: modalStyles\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n ['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(prop => {\n // (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)\n warning(!(prop in props), `${prop} is deprecated, please use styles instead.`);\n });\n if ('wrapClassName' in props) {\n warning(false, `wrapClassName is deprecated, please use classNames instead.`);\n }\n }\n const lastOutSideActiveElementRef = useRef(null);\n const wrapperRef = useRef(null);\n const contentRef = useRef(null);\n const [animatedVisible, setAnimatedVisible] = React.useState(visible);\n\n // ========================== Init ==========================\n const ariaId = useId();\n function saveLastOutSideActiveElementRef() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n lastOutSideActiveElementRef.current = document.activeElement;\n }\n }\n function focusDialogContent() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n contentRef.current?.focus();\n }\n }\n\n // ========================= Events =========================\n // Close action will trigger by:\n // 1. When hide motion end\n // 2. Controlled `open` to `false` immediately after set to `true` which will not trigger motion\n function doClose() {\n // Clean up scroll bar & focus back\n setAnimatedVisible(false);\n if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {\n try {\n lastOutSideActiveElementRef.current.focus({\n preventScroll: true\n });\n } catch (e) {\n // Do nothing\n }\n lastOutSideActiveElementRef.current = null;\n }\n\n // Trigger afterClose only when change visible from true to false\n if (animatedVisible) {\n afterClose?.();\n }\n }\n function onDialogVisibleChanged(newVisible) {\n // Try to focus\n if (newVisible) {\n focusDialogContent();\n } else {\n doClose();\n }\n afterOpenChange?.(newVisible);\n }\n function onInternalClose(e) {\n onClose?.(e);\n }\n\n // >>> Content\n const contentClickRef = useRef(false);\n const contentTimeoutRef = useRef(null);\n\n // We need record content click incase content popup out of dialog\n const onContentMouseDown = () => {\n clearTimeout(contentTimeoutRef.current);\n contentClickRef.current = true;\n };\n const onContentMouseUp = () => {\n contentTimeoutRef.current = setTimeout(() => {\n contentClickRef.current = false;\n });\n };\n\n // >>> Wrapper\n // Close only when element not on dialog\n let onWrapperClick = null;\n if (maskClosable) {\n onWrapperClick = e => {\n if (contentClickRef.current) {\n contentClickRef.current = false;\n } else if (wrapperRef.current === e.target) {\n onInternalClose(e);\n }\n };\n }\n function onWrapperKeyDown(e) {\n if (keyboard && e.keyCode === KeyCode.ESC) {\n e.stopPropagation();\n onInternalClose(e);\n return;\n }\n\n // keep focus inside dialog\n if (visible && e.keyCode === KeyCode.TAB) {\n contentRef.current.changeActive(!e.shiftKey);\n }\n }\n\n // ========================= Effect =========================\n useEffect(() => {\n if (visible) {\n setAnimatedVisible(true);\n saveLastOutSideActiveElementRef();\n } else if (animatedVisible && contentRef.current.enableMotion() && !contentRef.current.inMotion()) {\n doClose();\n }\n }, [visible]);\n\n // Remove direct should also check the scroll bar update\n useEffect(() => () => {\n clearTimeout(contentTimeoutRef.current);\n }, []);\n const mergedStyle = {\n zIndex,\n ...wrapStyle,\n ...modalStyles?.wrapper,\n display: !animatedVisible ? 'none' : null\n };\n\n // ========================= Render =========================\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(`${prefixCls}-root`, rootClassName),\n style: rootStyle\n }, pickAttrs(props, {\n data: true\n })), /*#__PURE__*/React.createElement(Mask, {\n prefixCls: prefixCls,\n visible: mask && visible,\n motionName: getMotionName(prefixCls, maskTransitionName, maskAnimation),\n style: {\n zIndex,\n ...maskStyle,\n ...modalStyles?.mask\n },\n maskProps: maskProps,\n className: modalClassNames?.mask\n }), /*#__PURE__*/React.createElement(\"div\", _extends({\n tabIndex: -1,\n onKeyDown: onWrapperKeyDown,\n className: clsx(`${prefixCls}-wrap`, wrapClassName, modalClassNames?.wrapper),\n ref: wrapperRef,\n onClick: onWrapperClick,\n style: mergedStyle\n }, wrapProps), /*#__PURE__*/React.createElement(Content, _extends({}, props, {\n onMouseDown: onContentMouseDown,\n onMouseUp: onContentMouseUp,\n ref: contentRef,\n closable: closable,\n ariaId: ariaId,\n prefixCls: prefixCls,\n visible: visible && animatedVisible,\n onClose: onInternalClose,\n onVisibleChanged: onDialogVisibleChanged,\n motionName: getMotionName(prefixCls, transitionName, animation)\n }))));\n};\nexport default Dialog;"],"names":["_extends","target","i","source","key","Dialog","props","prefixCls","zIndex","visible","keyboard","focusTriggerAfterClose","wrapStyle","wrapClassName","wrapProps","onClose","afterOpenChange","afterClose","transitionName","animation","closable","mask","maskTransitionName","maskAnimation","maskClosable","maskStyle","maskProps","rootClassName","rootStyle","modalClassNames","modalStyles","process","prop","warning","lastOutSideActiveElementRef","useRef","wrapperRef","contentRef","animatedVisible","setAnimatedVisible","React","ariaId","useId","saveLastOutSideActiveElementRef","contains","focusDialogContent","doClose","onDialogVisibleChanged","newVisible","onInternalClose","contentClickRef","contentTimeoutRef","onContentMouseDown","onContentMouseUp","onWrapperClick","onWrapperKeyDown","KeyCode","useEffect","mergedStyle","clsx","pickAttrs","Mask","getMotionName","Content"],"mappings":";;;;;;;;;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAY7U,MAACK,KAAS,CAAAC,MAAS;AACtB,QAAM;AAAA,IACJ,WAAAC,IAAY;AAAA,IACZ,QAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,wBAAAC,IAAyB;AAAA;AAAA;AAAA,IAGzB,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA;AAAA,IAEA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC,IAAW;AAAA;AAAA,IAEX,MAAAC,IAAO;AAAA,IACP,oBAAAC;A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kC,EAAM,cAAcqB,IAAM;AAAA,IAC1C,WAAWtD;AAAA,IACX,SAASc,KAAQZ;AAAA,IACjB,YAAYqD,EAAcvD,GAAWe,GAAoBC,CAAa;AAAA,IACtE,OAAO;AAAA,MACL,QAAAf;AAAA,MACA,GAAGiB;AAAA,MACH,GAAGK,GAAa;AAAA,IACtB;AAAA,IACI,WAAWJ;AAAA,IACX,WAAWG,GAAiB;AAAA,EAChC,CAAG,GAAgB,gBAAAW,EAAM,cAAc,OAAOxC,EAAS;AAAA,IACnD,UAAU;AAAA,IACV,WAAWuD;AAAA,IACX,WAAWI,EAAK,GAAGpD,CAAS,SAASM,GAAegB,GAAiB,OAAO;AAAA,IAC5E,KAAKO;AAAA,IACL,SAASkB;AAAA,IACT,OAAOI;AAAA,EACX,GAAK5C,CAAS,GAAgB,gBAAA0B,EAAM,cAAcuB,IAAS/D,EAAS,CAAA,GAAIM,GAAO;AAAA,IAC3E,aAAa8C;AAAA,IACb,WAAWC;AAAA,IACX,KAAKhB;AAAA,IACL,UAAUjB;AAAA,IACV,QAAQqB;AAAA,IACR,WAAWlC;AAAA,IACX,SAASE,KAAW6B;AAAA,IACpB,SAASW;AAAA,IACT,kBAAkBF;AAAA,IAClB,YAAYe,EAAcvD,GAAWW,GAAgBC,CAAS;AAAA,EAClE,CAAG,CAAC,CAAC,CAAC;AACN;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@rc-component/dialog/es/Dialog/index.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { clsx } from 'clsx';\nimport contains from \"@rc-component/util/es/Dom/contains\";\nimport useId from \"@rc-component/util/es/hooks/useId\";\nimport pickAttrs from \"@rc-component/util/es/pickAttrs\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { getMotionName } from \"../util\";\nimport Content from \"./Content\";\nimport Mask from \"./Mask\";\nimport { warning } from \"@rc-component/util/es/warning\";\nconst Dialog = props => {\n const {\n prefixCls = 'rc-dialog',\n zIndex,\n visible = false,\n focusTriggerAfterClose = true,\n wrapStyle,\n wrapClassName,\n wrapProps,\n onClose,\n afterOpenChange,\n afterClose,\n // Dialog\n transitionName,\n animation,\n closable = true,\n // Mask\n mask = true,\n maskTransitionName,\n maskAnimation,\n maskClosable = true,\n maskStyle,\n maskProps,\n rootClassName,\n rootStyle,\n classNames: modalClassNames,\n styles: modalStyles\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n ['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(prop => {\n warning(!(prop in props), `${prop} is deprecated, please use styles instead.`);\n });\n if ('wrapClassName' in props) {\n warning(false, `wrapClassName is deprecated, please use classNames instead.`);\n }\n }\n const lastOutSideActiveElementRef = useRef(null);\n const wrapperRef = useRef(null);\n const contentRef = useRef(null);\n const [animatedVisible, setAnimatedVisible] = React.useState(visible);\n const [isFixedPos, setIsFixedPos] = React.useState(false);\n\n // ========================== Init ==========================\n const ariaId = useId();\n function saveLastOutSideActiveElementRef() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n lastOutSideActiveElementRef.current = document.activeElement;\n }\n }\n function focusDialogContent() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n contentRef.current?.focus();\n }\n }\n\n // ========================= Events =========================\n // Close action will trigger by:\n // 1. When hide motion end\n // 2. Controlled `open` to `false` immediately after set to `true` which will not trigger motion\n function doClose() {\n // Clean up scroll bar & focus back\n setAnimatedVisible(false);\n if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {\n try {\n lastOutSideActiveElementRef.current.focus({\n preventScroll: true\n });\n } catch (e) {\n // Do nothing\n }\n lastOutSideActiveElementRef.current = null;\n }\n\n // Trigger afterClose only when change visible from true to false\n if (animatedVisible) {\n afterClose?.();\n }\n }\n function onDialogVisibleChanged(newVisible) {\n // Try to focus\n if (newVisible) {\n focusDialogContent();\n } else {\n doClose();\n }\n afterOpenChange?.(newVisible);\n }\n function onInternalClose(e) {\n onClose?.(e);\n }\n\n // >>> Content\n const contentClickRef = useRef(false);\n const contentTimeoutRef = useRef(null);\n\n // We need record content click in case content popup out of dialog\n const onContentMouseDown = () => {\n clearTimeout(contentTimeoutRef.current);\n contentClickRef.current = true;\n };\n const onContentMouseUp = () => {\n contentTimeoutRef.current = setTimeout(() => {\n contentClickRef.current = false;\n });\n };\n\n // >>> Wrapper\n // Close only when element not on dialog\n let onWrapperClick = null;\n if (maskClosable) {\n onWrapperClick = e => {\n if (contentClickRef.current) {\n contentClickRef.current = false;\n } else if (wrapperRef.current === e.target) {\n onInternalClose(e);\n }\n };\n }\n\n // ========================= Effect =========================\n useEffect(() => {\n if (visible) {\n setAnimatedVisible(true);\n saveLastOutSideActiveElementRef();\n\n // Calc the position style\n if (wrapperRef.current) {\n const computedWrapStyle = getComputedStyle(wrapperRef.current);\n setIsFixedPos(computedWrapStyle.position === 'fixed');\n }\n } else if (animatedVisible && contentRef.current.enableMotion() && !contentRef.current.inMotion()) {\n doClose();\n }\n }, [visible]);\n\n // Remove direct should also check the scroll bar update\n useEffect(() => () => {\n clearTimeout(contentTimeoutRef.current);\n }, []);\n const mergedStyle = {\n zIndex,\n ...wrapStyle,\n ...modalStyles?.wrapper,\n display: !animatedVisible ? 'none' : null\n };\n\n // ========================= Render =========================\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(`${prefixCls}-root`, rootClassName),\n style: rootStyle\n }, pickAttrs(props, {\n data: true\n })), /*#__PURE__*/React.createElement(Mask, {\n prefixCls: prefixCls,\n visible: mask && visible,\n motionName: getMotionName(prefixCls, maskTransitionName, maskAnimation),\n style: {\n zIndex,\n ...maskStyle,\n ...modalStyles?.mask\n },\n maskProps: maskProps,\n className: modalClassNames?.mask\n }), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(`${prefixCls}-wrap`, wrapClassName, modalClassNames?.wrapper),\n ref: wrapperRef,\n onClick: onWrapperClick,\n style: mergedStyle\n }, wrapProps), /*#__PURE__*/React.createElement(Content, _extends({}, props, {\n isFixedPos: isFixedPos,\n onMouseDown: onContentMouseDown,\n onMouseUp: onContentMouseUp,\n ref: contentRef,\n closable: closable,\n ariaId: ariaId,\n prefixCls: prefixCls,\n visible: visible && animatedVisible,\n onClose: onInternalClose,\n onVisibleChanged: onDialogVisibleChanged,\n motionName: getMotionName(prefixCls, transitionName, animation)\n }))));\n};\nexport default Dialog;"],"names":["_extends","target","i","source","key","Dialog","props","prefixCls","zIndex","visible","focusTriggerAfterClose","wrapStyle","wrapClassName","wrapProps","onClose","afterOpenChange","afterClose","transitionName","animation","closable","mask","maskTransitionName","maskAnimation","maskClosable","maskStyle","maskProps","rootClassName","rootStyle","modalClassNames","modalStyles","process","prop","warning","lastOutSideActiveElementRef","useRef","wrapperRef","contentRef","animatedVisible","setAnimatedVisible","React","isFixedPos","setIsFixedPos","ariaId","useId","saveLastOutSideActiveElementRef","contains","focusDialogContent","doClose","onDialogVisibleChanged","newVisible","onInternalClose","contentClickRef","contentTimeoutRef","onContentMouseDown","onContentMouseUp","onWrapperClick","useEffect","computedWrapStyle","mergedStyle","clsx","pickAttrs","Mask","getMotionName","Content"],"mappings":";;;;;;;;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAW7U,MAACK,KAAS,CAAAC,MAAS;AAC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AAGG;AAAA,IACH,GAAGkB,GAAa;AAAA,IAChB,SAAUQ,IAA2B,OAAT;AAAA,EAChC;AAGE,SAAoB,gBAAAE,EAAM,cAAc,OAAOvC,EAAS;AAAA,IACtD,WAAW2D,EAAK,GAAGpD,CAAS,SAASmB,CAAa;AAAA,IAClD,OAAOC;AAAA,EACX,GAAKiC,GAAUtD,GAAO;AAAA,IAClB,MAAM;AAAA,EACV,CAAG,CAAC,GAAgB,gBAAAiC,EAAM,cAAcsB,IAAM;AAAA,IAC1C,WAAWtD;AAAA,IACX,SAASa,KAAQX;AAAA,IACjB,YAAYqD,EAAcvD,GAAWc,GAAoBC,CAAa;AAAA,IACtE,OAAO;AAAA,MACL,QAAAd;AAAA,MACA,GAAGgB;AAAA,MACH,GAAGK,GAAa;AAAA,IACtB;AAAA,IACI,WAAWJ;AAAA,IACX,WAAWG,GAAiB;AAAA,EAChC,CAAG,GAAgB,gBAAAW,EAAM,cAAc,OAAOvC,EAAS;AAAA,IACnD,WAAW2D,EAAK,GAAGpD,CAAS,SAASK,GAAegB,GAAiB,OAAO;AAAA,IAC5E,KAAKO;AAAA,IACL,SAASoB;AAAA,IACT,OAAOG;AAAA,EACX,GAAK7C,CAAS,GAAgB,gBAAA0B,EAAM,cAAcwB,IAAS/D,EAAS,CAAA,GAAIM,GAAO;AAAA,IAC3E,YAAYkC;AAAA,IACZ,aAAaa;AAAA,IACb,WAAWC;AAAA,IACX,KAAKlB;AAAA,IACL,UAAUjB;AAAA,IACV,QAAQuB;AAAA,IACR,WAAWnC;AAAA,IACX,SAASE,KAAW4B;AAAA,IACpB,SAASa;AAAA,IACT,kBAAkBF;AAAA,IAClB,YAAYc,EAAcvD,GAAWU,GAAgBC,CAAS;AAAA,EAClE,CAAG,CAAC,CAAC,CAAC;AACN;","x_google_ignoreList":[0]}
|
|
@@ -1,51 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import E from "../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
|
+
import O from "../../portal/es/Portal.js";
|
|
3
3
|
import * as o from "react";
|
|
4
|
-
import { RefContext as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
return
|
|
4
|
+
import { RefContext as y } from "./context.js";
|
|
5
|
+
import v from "./Dialog/index.js";
|
|
6
|
+
function f() {
|
|
7
|
+
return f = Object.assign ? Object.assign.bind() : function(r) {
|
|
8
8
|
for (var e = 1; e < arguments.length; e++) {
|
|
9
9
|
var n = arguments[e];
|
|
10
10
|
for (var t in n)
|
|
11
11
|
Object.prototype.hasOwnProperty.call(n, t) && (r[t] = n[t]);
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
|
-
},
|
|
14
|
+
}, f.apply(this, arguments);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const j = (r) => {
|
|
17
17
|
const {
|
|
18
18
|
visible: e,
|
|
19
19
|
getContainer: n,
|
|
20
20
|
forceRender: t,
|
|
21
|
-
destroyOnHidden:
|
|
22
|
-
afterClose:
|
|
23
|
-
closable:
|
|
24
|
-
panelRef:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
21
|
+
destroyOnHidden: c = !1,
|
|
22
|
+
afterClose: u,
|
|
23
|
+
closable: s,
|
|
24
|
+
panelRef: m,
|
|
25
|
+
keyboard: d = !0,
|
|
26
|
+
onClose: b
|
|
27
|
+
} = r, [l, p] = o.useState(e), g = o.useMemo(() => ({
|
|
28
|
+
panel: m
|
|
29
|
+
}), [m]), C = ({
|
|
30
|
+
top: i,
|
|
31
|
+
event: a
|
|
32
|
+
}) => {
|
|
33
|
+
if (i && d) {
|
|
34
|
+
a.stopPropagation(), b?.(a);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
28
38
|
return o.useEffect(() => {
|
|
29
|
-
e &&
|
|
30
|
-
}, [e]), !t &&
|
|
31
|
-
value:
|
|
32
|
-
}, /* @__PURE__ */ o.createElement(
|
|
33
|
-
open: e || t ||
|
|
39
|
+
e && p(!0);
|
|
40
|
+
}, [e]), !t && c && !l ? null : /* @__PURE__ */ o.createElement(y.Provider, {
|
|
41
|
+
value: g
|
|
42
|
+
}, /* @__PURE__ */ o.createElement(O, {
|
|
43
|
+
open: e || t || l,
|
|
44
|
+
onEsc: C,
|
|
34
45
|
autoDestroy: !1,
|
|
35
46
|
getContainer: n,
|
|
36
|
-
autoLock: e ||
|
|
37
|
-
}, /* @__PURE__ */ o.createElement(
|
|
38
|
-
destroyOnHidden:
|
|
47
|
+
autoLock: e || l
|
|
48
|
+
}, /* @__PURE__ */ o.createElement(v, f({}, r, {
|
|
49
|
+
destroyOnHidden: c,
|
|
39
50
|
afterClose: () => {
|
|
40
|
-
const
|
|
41
|
-
afterClose:
|
|
42
|
-
} =
|
|
43
|
-
|
|
51
|
+
const i = s && typeof s == "object" ? s : {}, {
|
|
52
|
+
afterClose: a
|
|
53
|
+
} = i || {};
|
|
54
|
+
a?.(), u?.(), p(!1);
|
|
44
55
|
}
|
|
45
56
|
}))));
|
|
46
57
|
};
|
|
47
|
-
|
|
58
|
+
E.env.NODE_ENV !== "production" && (j.displayName = "Dialog");
|
|
48
59
|
export {
|
|
49
|
-
|
|
60
|
+
j as default
|
|
50
61
|
};
|
|
51
62
|
//# sourceMappingURL=DialogWrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogWrap.js","sources":["../../../../../node_modules/@rc-component/dialog/es/DialogWrap.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport Portal from '@rc-component/portal';\nimport * as React from 'react';\nimport { RefContext } from \"./context\";\nimport Dialog from \"./Dialog\";\n// fix issue #10656\n/*\n * getContainer remarks\n * Custom container should not be return, because in the Portal component, it will remove the\n * return container element here, if the custom container is the only child of it's component,\n * like issue #10656, It will has a conflict with removeChild method in react-dom.\n * So here should add a child (div element) to custom container.\n * */\n\nconst DialogWrap = props => {\n const {\n visible,\n getContainer,\n forceRender,\n destroyOnHidden = false,\n afterClose,\n closable,\n panelRef\n } = props;\n const [animatedVisible, setAnimatedVisible] = React.useState(visible);\n const refContext = React.useMemo(() => ({\n panel: panelRef\n }), [panelRef]);\n React.useEffect(() => {\n if (visible) {\n setAnimatedVisible(true);\n }\n }, [visible]);\n\n // Destroy on close will remove wrapped div\n if (!forceRender && destroyOnHidden && !animatedVisible) {\n return null;\n }\n return /*#__PURE__*/React.createElement(RefContext.Provider, {\n value: refContext\n }, /*#__PURE__*/React.createElement(Portal, {\n open: visible || forceRender || animatedVisible,\n autoDestroy: false,\n getContainer: getContainer,\n autoLock: visible || animatedVisible\n }, /*#__PURE__*/React.createElement(Dialog, _extends({}, props, {\n destroyOnHidden: destroyOnHidden,\n afterClose: () => {\n const closableObj = closable && typeof closable === 'object' ? closable : {};\n const {\n afterClose: closableAfterClose\n } = closableObj || {};\n closableAfterClose?.();\n afterClose?.();\n setAnimatedVisible(false);\n }\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n DialogWrap.displayName = 'Dialog';\n}\nexport default DialogWrap;"],"names":["_extends","target","i","source","key","DialogWrap","props","visible","getContainer","forceRender","destroyOnHidden","afterClose","closable","panelRef","animatedVisible","setAnimatedVisible","React","refContext","RefContext","Portal","Dialog","closableObj","closableAfterClose","process"],"mappings":";;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAc7U,MAACK,IAAa,CAAAC,MAAS;AAC1B,QAAM;AAAA,IACJ,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,EACJ,
|
|
1
|
+
{"version":3,"file":"DialogWrap.js","sources":["../../../../../node_modules/@rc-component/dialog/es/DialogWrap.js"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport Portal from '@rc-component/portal';\nimport * as React from 'react';\nimport { RefContext } from \"./context\";\nimport Dialog from \"./Dialog\";\n// fix issue #10656\n/*\n * getContainer remarks\n * Custom container should not be return, because in the Portal component, it will remove the\n * return container element here, if the custom container is the only child of it's component,\n * like issue #10656, It will has a conflict with removeChild method in react-dom.\n * So here should add a child (div element) to custom container.\n * */\n\nconst DialogWrap = props => {\n const {\n visible,\n getContainer,\n forceRender,\n destroyOnHidden = false,\n afterClose,\n closable,\n panelRef,\n keyboard = true,\n onClose\n } = props;\n const [animatedVisible, setAnimatedVisible] = React.useState(visible);\n const refContext = React.useMemo(() => ({\n panel: panelRef\n }), [panelRef]);\n const onEsc = ({\n top,\n event\n }) => {\n if (top && keyboard) {\n event.stopPropagation();\n onClose?.(event);\n return;\n }\n };\n React.useEffect(() => {\n if (visible) {\n setAnimatedVisible(true);\n }\n }, [visible]);\n\n // Destroy on close will remove wrapped div\n if (!forceRender && destroyOnHidden && !animatedVisible) {\n return null;\n }\n return /*#__PURE__*/React.createElement(RefContext.Provider, {\n value: refContext\n }, /*#__PURE__*/React.createElement(Portal, {\n open: visible || forceRender || animatedVisible,\n onEsc: onEsc,\n autoDestroy: false,\n getContainer: getContainer,\n autoLock: visible || animatedVisible\n }, /*#__PURE__*/React.createElement(Dialog, _extends({}, props, {\n destroyOnHidden: destroyOnHidden,\n afterClose: () => {\n const closableObj = closable && typeof closable === 'object' ? closable : {};\n const {\n afterClose: closableAfterClose\n } = closableObj || {};\n closableAfterClose?.();\n afterClose?.();\n setAnimatedVisible(false);\n }\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n DialogWrap.displayName = 'Dialog';\n}\nexport default DialogWrap;"],"names":["_extends","target","i","source","key","DialogWrap","props","visible","getContainer","forceRender","destroyOnHidden","afterClose","closable","panelRef","keyboard","onClose","animatedVisible","setAnimatedVisible","React","refContext","onEsc","top","event","RefContext","Portal","Dialog","closableObj","closableAfterClose","process"],"mappings":";;;;;AAAA,SAASA,IAAW;AAAE,SAAAA,IAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAUC,GAAQ;AAAE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,UAAIC,IAAS,UAAUD,CAAC;AAAG,eAASE,KAAOD;AAAU,QAAI,OAAO,UAAU,eAAe,KAAKA,GAAQC,CAAG,MAAKH,EAAOG,CAAG,IAAID,EAAOC,CAAG;AAAA,IAAO;AAAE,WAAOH;AAAA,EAAQ,GAAUD,EAAS,MAAM,MAAM,SAAS;AAAG;AAc7U,MAACK,IAAa,CAAAC,MAAS;AAC1B,QAAM;AAAA,IACJ,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC;AAAA,EACJ,IAAMT,GACE,CAACU,GAAiBC,CAAkB,IAAIC,EAAM,SAASX,CAAO,GAC9DY,IAAaD,EAAM,QAAQ,OAAO;AAAA,IACtC,OAAOL;AAAA,EACX,IAAM,CAACA,CAAQ,CAAC,GACRO,IAAQ,CAAC;AAAA,IACb,KAAAC;AAAA,IACA,OAAAC;AAAA,EACJ,MAAQ;AACJ,QAAID,KAAOP,GAAU;AACnB,MAAAQ,EAAM,gBAAe,GACrBP,IAAUO,CAAK;AACf;AAAA,IACF;AAAA,EACF;AAQA,SAPAJ,EAAM,UAAU,MAAM;AACpB,IAAIX,KACFU,EAAmB,EAAI;AAAA,EAE3B,GAAG,CAACV,CAAO,CAAC,GAGR,CAACE,KAAeC,KAAmB,CAACM,IAC/B,OAEW,gBAAAE,EAAM,cAAcK,EAAW,UAAU;AAAA,IAC3D,OAAOJ;AAAA,EACX,GAAkB,gBAAAD,EAAM,cAAcM,GAAQ;AAAA,IAC1C,MAAMjB,KAAWE,KAAeO;AAAA,IAChC,OAAOI;AAAA,IACP,aAAa;AAAA,IACb,cAAcZ;AAAA,IACd,UAAUD,KAAWS;AAAA,EACzB,GAAkB,gBAAAE,EAAM,cAAcO,GAAQzB,EAAS,CAAA,GAAIM,GAAO;AAAA,IAC9D,iBAAiBI;AAAA,IACjB,YAAY,MAAM;AAChB,YAAMgB,IAAcd,KAAY,OAAOA,KAAa,WAAWA,IAAW,CAAA,GACpE;AAAA,QACJ,YAAYe;AAAA,MACpB,IAAUD,KAAe,CAAA;AACnB,MAAAC,IAAkB,GAClBhB,IAAU,GACVM,EAAmB,EAAK;AAAA,IAC1B;AAAA,EACJ,CAAG,CAAC,CAAC,CAAC;AACN;AACIW,EAAQ,IAAI,aAAa,iBAC3BvB,EAAW,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import F from "../../trigger/es/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { supportRef as I, composeRef as q, getNodeRef as z } from "../../util/es/ref.js";
|
|
3
3
|
import { clsx as y } from "../../../clsx/dist/clsx.js";
|
|
4
4
|
import r from "react";
|
|
5
5
|
import B from "./hooks/useAccessibility.js";
|
|
@@ -71,7 +71,7 @@ const te = /* @__PURE__ */ r.forwardRef((e, i) => {
|
|
|
71
71
|
return n !== void 0 ? n : `${t}-open`;
|
|
72
72
|
}, D = /* @__PURE__ */ r.cloneElement(a, {
|
|
73
73
|
className: y(a.props?.className, s && L()),
|
|
74
|
-
ref:
|
|
74
|
+
ref: I(a) ? q(v, z(a)) : void 0
|
|
75
75
|
});
|
|
76
76
|
let c = P;
|
|
77
77
|
return !c && f.indexOf("contextMenu") !== -1 && (c = ["click"]), /* @__PURE__ */ r.createElement(F, p({
|