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":"useStyleRegister.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js"],"sourcesContent":["import hash from '@emotion/hash';\nimport { removeCSS, updateCSS } from \"@rc-component/util/es/Dom/dynamicCSS\";\nimport * as React from 'react';\n// @ts-ignore\nimport unitless from '@emotion/unitless';\nimport { compile, middleware, prefixer, serialize, stringify } from 'stylis';\nimport { contentQuotesLinter, hashedAnimationLinter } from \"../linters\";\nimport StyleContext, { ATTR_CACHE_PATH, ATTR_MARK, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { isClientSide, toStyleStr } from \"../util\";\nimport { CSS_FILE_STYLE, existPath, getStyleAndHash } from \"../util/cacheMapUtil\";\nimport useGlobalCache from \"./useGlobalCache\";\nconst SKIP_CHECK = '_skip_check_';\nconst MULTI_VALUE = '_multi_value_';\n// ============================================================================\n// == Parser ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr, autoPrefix) {\n const serialized = autoPrefix ? serialize(compile(styleStr), middleware([prefixer, stringify])) : serialize(compile(styleStr), stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\nfunction isCompoundCSSProperty(value) {\n return typeof value === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);\n}\n\n// 注入 hash 值\nfunction injectSelectorHash(key, hashId, hashPriority) {\n if (!hashId) {\n return key;\n }\n const hashClassName = `.${hashId}`;\n const hashSelector = hashPriority === 'low' ? `:where(${hashClassName})` : hashClassName;\n\n // 注入 hashId\n const keys = key.split(',').map(k => {\n const fullPath = k.trim().split(/\\s+/);\n\n // 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。\n let firstPath = fullPath[0] || '';\n const htmlElement = firstPath.match(/^\\w+/)?.[0] || '';\n firstPath = `${htmlElement}${hashSelector}${firstPath.slice(htmlElement.length)}`;\n return [firstPath, ...fullPath.slice(1)].join(' ');\n });\n return keys.join(',');\n}\n// Parse CSSObject to style content\nexport const parseStyle = (interpolation, config = {}, {\n root,\n injectHash,\n parentSelectors\n} = {\n root: true,\n parentSelectors: []\n}) => {\n const {\n hashId,\n layer,\n path,\n hashPriority,\n transformers = [],\n linters = []\n } = config;\n let styleStr = '';\n let effectStyle = {};\n function parseKeyframes(keyframes) {\n const animationName = keyframes.getName(hashId);\n if (!effectStyle[animationName]) {\n const [parsedStr] = parseStyle(keyframes.style, config, {\n root: false,\n parentSelectors\n });\n effectStyle[animationName] = `@keyframes ${keyframes.getName(hashId)}${parsedStr}`;\n }\n }\n function flattenList(list, fullList = []) {\n list.forEach(item => {\n if (Array.isArray(item)) {\n flattenList(item, fullList);\n } else if (item) {\n fullList.push(item);\n }\n });\n return fullList;\n }\n const flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n flattenStyleList.forEach(originStyle => {\n // Only root level can use raw string\n const style = typeof originStyle === 'string' && !root ? {} : originStyle;\n if (typeof style === 'string') {\n styleStr += `${style}\\n`;\n } else if (style._keyframe) {\n // Keyframe\n parseKeyframes(style);\n } else {\n const mergedStyle = transformers.reduce((prev, trans) => trans?.visit?.(prev) || prev, style);\n\n // Normal CSSObject\n Object.keys(mergedStyle).forEach(key => {\n const value = mergedStyle[key];\n if (typeof value === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n let subInjectHash = false;\n\n // 当成嵌套对象来处理\n let mergedKey = key.trim();\n // Whether treat child as root. In most case it is false.\n let nextRoot = false;\n\n // 拆分多个选择器\n if ((root || injectHash) && hashId) {\n if (mergedKey.startsWith('@')) {\n // 略过媒体查询,交给子节点继续插入 hashId\n subInjectHash = true;\n } else if (mergedKey === '&') {\n // 抹掉 root selector 上的单个 &\n mergedKey = injectSelectorHash('', hashId, hashPriority);\n } else {\n // 注入 hashId\n mergedKey = injectSelectorHash(key, hashId, hashPriority);\n }\n } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n // But it does not conform to stylis syntax,\n // and finally we will get `{color:red;}` as css, which is wrong.\n // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n mergedKey = '';\n nextRoot = true;\n }\n const [parsedStr, childEffectStyle] = parseStyle(value, config, {\n root: nextRoot,\n injectHash: subInjectHash,\n parentSelectors: [...parentSelectors, mergedKey]\n });\n effectStyle = {\n ...effectStyle,\n ...childEffectStyle\n };\n styleStr += `${mergedKey}${parsedStr}`;\n } else {\n function appendStyle(cssKey, cssValue) {\n if (process.env.NODE_ENV !== 'production' && (typeof value !== 'object' || !value?.[SKIP_CHECK])) {\n [contentQuotesLinter, hashedAnimationLinter, ...linters].forEach(linter => linter(cssKey, cssValue, {\n path,\n hashId,\n parentSelectors\n }));\n }\n\n // 如果是样式则直接插入\n const styleName = cssKey.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`);\n\n // Auto suffix with px\n let formatValue = cssValue;\n if (!unitless[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {\n formatValue = `${formatValue}px`;\n }\n\n // handle animationName & Keyframe value\n if (cssKey === 'animationName' && cssValue?._keyframe) {\n parseKeyframes(cssValue);\n formatValue = cssValue.getName(hashId);\n }\n styleStr += `${styleName}:${formatValue};`;\n }\n const actualValue = value?.value ?? value;\n if (typeof value === 'object' && value?.[MULTI_VALUE] && Array.isArray(actualValue)) {\n actualValue.forEach(item => {\n appendStyle(key, item);\n });\n } else {\n appendStyle(key, actualValue);\n }\n }\n });\n }\n });\n if (!root) {\n styleStr = `{${styleStr}}`;\n } else if (layer) {\n // fixme: https://github.com/thysultan/stylis/pull/339\n if (styleStr) {\n styleStr = `@layer ${layer.name} {${styleStr}}`;\n }\n if (layer.dependencies) {\n effectStyle[`@layer ${layer.name}`] = layer.dependencies.map(deps => `@layer ${deps}, ${layer.name};`).join('\\n');\n }\n }\n return [styleStr, effectStyle];\n};\n\n// ============================================================================\n// == Register ==\n// ============================================================================\nexport function uniqueHash(path, styleStr) {\n return hash(`${path.join('%')}${styleStr}`);\n}\nexport const STYLE_PREFIX = 'style';\n/**\n * Register a style to the global style sheet.\n */\nexport default function useStyleRegister(info, styleFn) {\n const {\n path,\n hashId,\n layer,\n nonce,\n clientOnly,\n order = 0\n } = info;\n const {\n mock,\n hashPriority,\n container,\n transformers,\n linters,\n cache,\n layer: enableLayer,\n autoPrefix\n } = React.useContext(StyleContext);\n const fullPath = [hashId || ''];\n if (enableLayer) {\n fullPath.push('layer');\n }\n fullPath.push(...path);\n\n // Check if need insert style\n let isMergedClientSide = isClientSide;\n if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n isMergedClientSide = mock === 'client';\n }\n useGlobalCache(STYLE_PREFIX, fullPath,\n // Create cache if needed\n () => {\n const cachePath = fullPath.join('|');\n\n // Get style from SSR inline style directly\n if (existPath(cachePath)) {\n const [inlineCacheStyleStr, styleHash] = getStyleAndHash(cachePath);\n if (inlineCacheStyleStr) {\n return [inlineCacheStyleStr, styleHash, {}, clientOnly, order];\n }\n }\n\n // Generate style\n const styleObj = styleFn();\n const [parsedStyle, effectStyle] = parseStyle(styleObj, {\n hashId,\n hashPriority,\n layer: enableLayer ? layer : undefined,\n path: path.join('-'),\n transformers,\n linters\n });\n const styleStr = normalizeStyle(parsedStyle, autoPrefix || false);\n const styleId = uniqueHash(fullPath, styleStr);\n return [styleStr, styleId, effectStyle, clientOnly, order];\n },\n // Remove cache if no need\n (cacheValue, fromHMR) => {\n const [, styleId] = cacheValue;\n if (fromHMR && isClientSide) {\n removeCSS(styleId, {\n mark: ATTR_MARK,\n attachTo: container\n });\n }\n },\n // Effect: Inject style here\n cacheValue => {\n const [styleStr, styleId, effectStyle,, priority] = cacheValue;\n if (isMergedClientSide && styleStr !== CSS_FILE_STYLE) {\n const mergedCSSConfig = {\n mark: ATTR_MARK,\n prepend: enableLayer ? false : 'queue',\n attachTo: container,\n priority\n };\n const nonceStr = typeof nonce === 'function' ? nonce() : nonce;\n if (nonceStr) {\n mergedCSSConfig.csp = {\n nonce: nonceStr\n };\n }\n\n // ================= Split Effect Style =================\n // We will split effectStyle here since @layer should be at the top level\n const effectLayerKeys = [];\n const effectRestKeys = [];\n Object.keys(effectStyle).forEach(key => {\n if (key.startsWith('@layer')) {\n effectLayerKeys.push(key);\n } else {\n effectRestKeys.push(key);\n }\n });\n\n // ================= Inject Layer Style =================\n // Inject layer style\n effectLayerKeys.forEach(effectKey => {\n updateCSS(normalizeStyle(effectStyle[effectKey], autoPrefix || false), `_layer-${effectKey}`, {\n ...mergedCSSConfig,\n prepend: true\n });\n });\n\n // ==================== Inject Style ====================\n // Inject style\n const style = updateCSS(styleStr, styleId, mergedCSSConfig);\n style[CSS_IN_JS_INSTANCE] = cache.instanceId;\n\n // Debug usage. Dev only\n if (process.env.NODE_ENV !== 'production') {\n style.setAttribute(ATTR_CACHE_PATH, fullPath.join('|'));\n }\n\n // ================ Inject Effect Style =================\n // Inject client side effect style\n effectRestKeys.forEach(effectKey => {\n updateCSS(normalizeStyle(effectStyle[effectKey], autoPrefix || false), `_effect-${effectKey}`, mergedCSSConfig);\n });\n }\n });\n}\nexport const extract = (cache, effectStyles, options) => {\n const [styleStr, styleId, effectStyle, clientOnly, order] = cache;\n const {\n plain,\n autoPrefix\n } = options || {};\n\n // Skip client only style\n if (clientOnly) {\n return null;\n }\n let keyStyleText = styleStr;\n\n // ====================== Share ======================\n // Used for @rc-component/util\n const sharedAttrs = {\n 'data-rc-order': 'prependQueue',\n 'data-rc-priority': `${order}`\n };\n\n // ====================== Style ======================\n keyStyleText = toStyleStr(styleStr, undefined, styleId, sharedAttrs, plain);\n\n // =============== Create effect style ===============\n if (effectStyle) {\n Object.keys(effectStyle).forEach(effectKey => {\n // Effect style can be reused\n if (!effectStyles[effectKey]) {\n effectStyles[effectKey] = true;\n const effectStyleStr = normalizeStyle(effectStyle[effectKey], autoPrefix || false);\n const effectStyleHTML = toStyleStr(effectStyleStr, undefined, `_effect-${effectKey}`, sharedAttrs, plain);\n if (effectKey.startsWith('@layer')) {\n keyStyleText = effectStyleHTML + keyStyleText;\n } else {\n keyStyleText += effectStyleHTML;\n }\n }\n });\n }\n return [order, styleId, keyStyleText];\n};"],"names":["SKIP_CHECK","MULTI_VALUE","normalizeStyle","styleStr","autoPrefix","serialize","compile","middleware","prefixer","stringify","isCompoundCSSProperty","value","injectSelectorHash","key","hashId","hashPriority","hashClassName","hashSelector","k","fullPath","firstPath","htmlElement","parseStyle","interpolation","config","root","injectHash","parentSelectors","layer","path","transformers","linters","effectStyle","parseKeyframes","keyframes","animationName","parsedStr","flattenList","list","fullList","item","originStyle","style","mergedStyle","prev","trans","subInjectHash","mergedKey","nextRoot","childEffectStyle","appendStyle","cssKey","cssValue","process","contentQuotesLinter","hashedAnimationLinter","linter","styleName","match","formatValue","unitless","actualValue","deps","uniqueHash","hash","STYLE_PREFIX","useStyleRegister","info","styleFn","nonce","clientOnly","order","mock","container","cache","enableLayer","React","StyleContext","isMergedClientSide","isClientSide","useGlobalCache","cachePath","existPath","inlineCacheStyleStr","styleHash","getStyleAndHash","styleObj","parsedStyle","styleId","cacheValue","fromHMR","removeCSS","ATTR_MARK","priority","CSS_FILE_STYLE","mergedCSSConfig","nonceStr","effectLayerKeys","effectRestKeys","effectKey","updateCSS","CSS_IN_JS_INSTANCE","ATTR_CACHE_PATH"],"mappings":";;;;;;;;;;;;;;AAWA,MAAMA,IAAa,gBACbC,IAAc;AAKb,SAASC,EAAeC,GAAUC,GAAY;AAEnD,UADmBA,IAAaC,EAAUC,EAAQH,CAAQ,GAAGI,EAAW,CAACC,GAAUC,CAAS,CAAC,CAAC,IAAIJ,EAAUC,EAAQH,CAAQ,GAAGM,CAAS,GACtH,QAAQ,kBAAkB,GAAG;AACjD;AACA,SAASC,GAAsBC,GAAO;AACpC,SAAO,OAAOA,KAAU,YAAYA,MAAUX,KAAcW,KAASV,KAAeU;AACtF;AAGA,SAASC,EAAmBC,GAAKC,GAAQC,GAAc;AACrD,MAAI,CAACD;AACH,WAAOD;AAET,QAAMG,IAAgB,IAAIF,CAAM,IAC1BG,IAAeF,MAAiB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AArD,EAAM2D,CAAkB,IAAI3B,EAAM,YAG9BrB,EAAQ,IAAI,aAAa,gBAC3BX,EAAM,aAAa4D,GAAiBnF,EAAS,KAAK,GAAG,CAAC,GAKxD+E,EAAe,QAAQ,CAAAC,MAAa;AAClC,UAAAC,EAAUlG,EAAe8B,EAAYmE,CAAS,GAAG/F,KAAc,EAAK,GAAG,WAAW+F,CAAS,IAAIJ,CAAe;AAAA,QAChH,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EAAC;AACH;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"useStyleRegister.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js"],"sourcesContent":["import hash from '@emotion/hash';\nimport { removeCSS, updateCSS } from \"@rc-component/util/es/Dom/dynamicCSS\";\nimport * as React from 'react';\n// @ts-ignore\nimport unitless from '@emotion/unitless';\nimport { compile, middleware, prefixer, serialize, stringify } from 'stylis';\nimport { contentQuotesLinter, hashedAnimationLinter } from \"../linters\";\nimport StyleContext, { ATTR_CACHE_PATH, ATTR_MARK, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { isClientSide, isNonNullable, toStyleStr, where } from \"../util\";\nimport { CSS_FILE_STYLE, existPath, getStyleAndHash } from \"../util/cacheMapUtil\";\nimport useGlobalCache from \"./useGlobalCache\";\nconst SKIP_CHECK = '_skip_check_';\nconst MULTI_VALUE = '_multi_value_';\n// ============================================================================\n// == Parser ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr, autoPrefix) {\n const serialized = autoPrefix ? serialize(compile(styleStr), middleware([prefixer, stringify])) : serialize(compile(styleStr), stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\nfunction isCompoundCSSProperty(value) {\n return typeof value === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);\n}\n\n// 注入 hash 值\nfunction injectSelectorHash(key, hashId, hashPriority = 'high') {\n if (!hashId) {\n return key;\n }\n const hashSelector = where({\n hashCls: hashId,\n hashPriority\n });\n\n // 注入 hashId\n const keys = key.split(',').map(k => {\n const fullPath = k.trim().split(/\\s+/);\n\n // 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。\n let firstPath = fullPath[0] || '';\n const htmlElement = firstPath.match(/^\\w+/)?.[0] || '';\n firstPath = `${htmlElement}${hashSelector}${firstPath.slice(htmlElement.length)}`;\n return [firstPath, ...fullPath.slice(1)].join(' ');\n });\n return keys.join(',');\n}\n// Parse CSSObject to style content\nexport const parseStyle = (interpolation, config = {}, {\n root,\n injectHash,\n parentSelectors\n} = {\n root: true,\n parentSelectors: []\n}) => {\n const {\n hashId,\n layer,\n path,\n hashPriority,\n transformers = [],\n linters = []\n } = config;\n let styleStr = '';\n let effectStyle = {};\n function parseKeyframes(keyframes) {\n const animationName = keyframes.getName(hashId);\n if (!effectStyle[animationName]) {\n const [parsedStr] = parseStyle(keyframes.style, config, {\n root: false,\n parentSelectors\n });\n effectStyle[animationName] = `@keyframes ${keyframes.getName(hashId)}${parsedStr}`;\n }\n }\n function flattenList(list, fullList = []) {\n list.forEach(item => {\n if (Array.isArray(item)) {\n flattenList(item, fullList);\n } else if (item) {\n fullList.push(item);\n }\n });\n return fullList;\n }\n const flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n flattenStyleList.forEach(originStyle => {\n // Only root level can use raw string\n const style = typeof originStyle === 'string' && !root ? {} : originStyle;\n if (typeof style === 'string') {\n styleStr += `${style}\\n`;\n } else if (style._keyframe) {\n // Keyframe\n parseKeyframes(style);\n } else {\n const mergedStyle = transformers.reduce((prev, trans) => trans?.visit?.(prev) || prev, style);\n\n // Normal CSSObject\n Object.keys(mergedStyle).forEach(key => {\n const value = mergedStyle[key];\n if (typeof value === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n let subInjectHash = false;\n\n // 当成嵌套对象来处理\n let mergedKey = key.trim();\n // Whether treat child as root. In most case it is false.\n let nextRoot = false;\n\n // 拆分多个选择器\n if ((root || injectHash) && hashId) {\n if (mergedKey.startsWith('@')) {\n // 略过媒体查询,交给子节点继续插入 hashId\n subInjectHash = true;\n } else if (mergedKey === '&') {\n // 抹掉 root selector 上的单个 &\n mergedKey = injectSelectorHash('', hashId, hashPriority);\n } else {\n // 注入 hashId\n mergedKey = injectSelectorHash(key, hashId, hashPriority);\n }\n } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n // But it does not conform to stylis syntax,\n // and finally we will get `{color:red;}` as css, which is wrong.\n // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n mergedKey = '';\n nextRoot = true;\n }\n const [parsedStr, childEffectStyle] = parseStyle(value, config, {\n root: nextRoot,\n injectHash: subInjectHash,\n parentSelectors: [...parentSelectors, mergedKey]\n });\n effectStyle = {\n ...effectStyle,\n ...childEffectStyle\n };\n styleStr += `${mergedKey}${parsedStr}`;\n } else {\n function appendStyle(cssKey, cssValue) {\n if (process.env.NODE_ENV !== 'production' && (typeof value !== 'object' || !value?.[SKIP_CHECK])) {\n [contentQuotesLinter, hashedAnimationLinter, ...linters].forEach(linter => linter(cssKey, cssValue, {\n path,\n hashId,\n parentSelectors\n }));\n }\n\n // 如果是样式则直接插入\n const styleName = cssKey.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`);\n\n // Auto suffix with px\n let formatValue = cssValue;\n if (!unitless[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {\n formatValue = `${formatValue}px`;\n }\n\n // handle animationName & Keyframe value\n if (cssKey === 'animationName' && cssValue?._keyframe) {\n parseKeyframes(cssValue);\n formatValue = cssValue.getName(hashId);\n }\n styleStr += `${styleName}:${formatValue};`;\n }\n const actualValue = value?.value ?? value;\n if (typeof value === 'object' && value?.[MULTI_VALUE] && Array.isArray(actualValue)) {\n actualValue.forEach(item => {\n appendStyle(key, item);\n });\n } else {\n if (isNonNullable(actualValue)) {\n appendStyle(key, actualValue);\n }\n }\n }\n });\n }\n });\n if (!root) {\n styleStr = `{${styleStr}}`;\n } else if (layer) {\n // fixme: https://github.com/thysultan/stylis/pull/339\n if (styleStr) {\n styleStr = `@layer ${layer.name} {${styleStr}}`;\n }\n if (layer.dependencies) {\n effectStyle[`@layer ${layer.name}`] = layer.dependencies.map(deps => `@layer ${deps}, ${layer.name};`).join('\\n');\n }\n }\n return [styleStr, effectStyle];\n};\n\n// ============================================================================\n// == Register ==\n// ============================================================================\nexport function uniqueHash(path, styleStr) {\n return hash(`${path.join('%')}${styleStr}`);\n}\nexport const STYLE_PREFIX = 'style';\n/**\n * Register a style to the global style sheet.\n */\nexport default function useStyleRegister(info, styleFn) {\n const {\n path,\n hashId,\n layer,\n nonce,\n clientOnly,\n order = 0\n } = info;\n const {\n mock,\n hashPriority,\n container,\n transformers,\n linters,\n cache,\n layer: enableLayer,\n autoPrefix\n } = React.useContext(StyleContext);\n const fullPath = [hashId || ''];\n if (enableLayer) {\n fullPath.push('layer');\n }\n fullPath.push(...path);\n\n // Check if need insert style\n let isMergedClientSide = isClientSide;\n if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n isMergedClientSide = mock === 'client';\n }\n useGlobalCache(STYLE_PREFIX, fullPath,\n // Create cache if needed\n () => {\n const cachePath = fullPath.join('|');\n\n // Get style from SSR inline style directly\n if (existPath(cachePath)) {\n const [inlineCacheStyleStr, styleHash] = getStyleAndHash(cachePath);\n if (inlineCacheStyleStr) {\n return [inlineCacheStyleStr, styleHash, {}, clientOnly, order];\n }\n }\n\n // Generate style\n const styleObj = styleFn();\n const [parsedStyle, effectStyle] = parseStyle(styleObj, {\n hashId,\n hashPriority,\n layer: enableLayer ? layer : undefined,\n path: path.join('-'),\n transformers,\n linters\n });\n const styleStr = normalizeStyle(parsedStyle, autoPrefix || false);\n const styleId = uniqueHash(fullPath, styleStr);\n return [styleStr, styleId, effectStyle, clientOnly, order];\n },\n // Remove cache if no need\n (cacheValue, fromHMR) => {\n const [, styleId] = cacheValue;\n if (fromHMR && isClientSide) {\n removeCSS(styleId, {\n mark: ATTR_MARK,\n attachTo: container\n });\n }\n },\n // Effect: Inject style here\n cacheValue => {\n const [styleStr, styleId, effectStyle,, priority] = cacheValue;\n if (isMergedClientSide && styleStr !== CSS_FILE_STYLE) {\n const mergedCSSConfig = {\n mark: ATTR_MARK,\n prepend: enableLayer ? false : 'queue',\n attachTo: container,\n priority\n };\n const nonceStr = typeof nonce === 'function' ? nonce() : nonce;\n if (nonceStr) {\n mergedCSSConfig.csp = {\n nonce: nonceStr\n };\n }\n\n // ================= Split Effect Style =================\n // We will split effectStyle here since @layer should be at the top level\n const effectLayerKeys = [];\n const effectRestKeys = [];\n Object.keys(effectStyle).forEach(key => {\n if (key.startsWith('@layer')) {\n effectLayerKeys.push(key);\n } else {\n effectRestKeys.push(key);\n }\n });\n\n // ================= Inject Layer Style =================\n // Inject layer style\n effectLayerKeys.forEach(effectKey => {\n updateCSS(normalizeStyle(effectStyle[effectKey], autoPrefix || false), `_layer-${effectKey}`, {\n ...mergedCSSConfig,\n prepend: true\n });\n });\n\n // ==================== Inject Style ====================\n // Inject style\n const style = updateCSS(styleStr, styleId, mergedCSSConfig);\n style[CSS_IN_JS_INSTANCE] = cache.instanceId;\n\n // Debug usage. Dev only\n if (process.env.NODE_ENV !== 'production') {\n style.setAttribute(ATTR_CACHE_PATH, fullPath.join('|'));\n }\n\n // ================ Inject Effect Style =================\n // Inject client side effect style\n effectRestKeys.forEach(effectKey => {\n updateCSS(normalizeStyle(effectStyle[effectKey], autoPrefix || false), `_effect-${effectKey}`, mergedCSSConfig);\n });\n }\n });\n}\nexport const extract = (cache, effectStyles, options) => {\n const [styleStr, styleId, effectStyle, clientOnly, order] = cache;\n const {\n plain,\n autoPrefix\n } = options || {};\n\n // Skip client only style\n if (clientOnly) {\n return null;\n }\n let keyStyleText = styleStr;\n\n // ====================== Share ======================\n // Used for @rc-component/util\n const sharedAttrs = {\n 'data-rc-order': 'prependQueue',\n 'data-rc-priority': `${order}`\n };\n\n // ====================== Style ======================\n keyStyleText = toStyleStr(styleStr, undefined, styleId, sharedAttrs, plain);\n\n // =============== Create effect style ===============\n if (effectStyle) {\n Object.keys(effectStyle).forEach(effectKey => {\n // Effect style can be reused\n if (!effectStyles[effectKey]) {\n effectStyles[effectKey] = true;\n const effectStyleStr = normalizeStyle(effectStyle[effectKey], autoPrefix || false);\n const effectStyleHTML = toStyleStr(effectStyleStr, undefined, `_effect-${effectKey}`, sharedAttrs, plain);\n if (effectKey.startsWith('@layer')) {\n keyStyleText = effectStyleHTML + keyStyleText;\n } else {\n keyStyleText += effectStyleHTML;\n }\n }\n });\n }\n return [order, styleId, keyStyleText];\n};"],"names":["SKIP_CHECK","MULTI_VALUE","normalizeStyle","styleStr","autoPrefix","serialize","compile","middleware","prefixer","stringify","isCompoundCSSProperty","value","injectSelectorHash","key","hashId","hashPriority","hashSelector","where","k","fullPath","firstPath","htmlElement","parseStyle","interpolation","config","root","injectHash","parentSelectors","layer","path","transformers","linters","effectStyle","parseKeyframes","keyframes","animationName","parsedStr","flattenList","list","fullList","item","originStyle","style","mergedStyle","prev","trans","subInjectHash","mergedKey","nextRoot","childEffectStyle","appendStyle","cssKey","cssValue","process","contentQuotesLinter","hashedAnimationLinter","linter","styleName","match","formatValue","unitless","actualValue","isNonNullable","deps","uniqueHash","hash","STYLE_PREFIX","useStyleRegister","info","styleFn","nonce","clientOnly","order","mock","container","cache","enableLayer","React","StyleContext","isMergedClientSide","isClientSide","useGlobalCache","cachePath","existPath","inlineCacheStyleStr","styleHash","getStyleAndHash","styleObj","parsedStyle","styleId","cacheValue","fromHMR","removeCSS","ATTR_MARK","priority","CSS_FILE_STYLE","mergedCSSConfig","nonceStr","effectLayerKeys","effectRestKeys","effectKey","updateCSS","CSS_IN_JS_INSTANCE","ATTR_CACHE_PATH"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OAAOC;AAAA,QACjB;AAKM,cAAMC,IAAkB,CAAA,GAClBC,IAAiB,CAAA;AACvB,eAAO,KAAKnE,CAAW,EAAE,QAAQ,CAAAnB,MAAO;AACtC,UAAIA,EAAI,WAAW,QAAQ,IACzBqF,EAAgB,KAAKrF,CAAG,IAExBsF,EAAe,KAAKtF,CAAG;AAAA,QAE3B,CAAC,GAIDqF,EAAgB,QAAQ,CAAAE,MAAa;AACnC,UAAAC,EAAUnG,EAAe8B,EAAYoE,CAAS,GAAGhG,KAAc,EAAK,GAAG,UAAUgG,CAAS,IAAI;AAAA,YAC5F,GAAGJ;AAAA,YACH,SAAS;AAAA,UACnB,CAAS;AAAA,QACH,CAAC;AAID,cAAMtD,IAAQ2D,EAAUlG,GAAUsF,GAASO,CAAe;AAC1D,QAAAtD,EAAM4D,CAAkB,IAAI3B,EAAM,YAG9BtB,EAAQ,IAAI,aAAa,gBAC3BX,EAAM,aAAa6D,GAAiBpF,EAAS,KAAK,GAAG,CAAC,GAKxDgF,EAAe,QAAQ,CAAAC,MAAa;AAClC,UAAAC,EAAUnG,EAAe8B,EAAYoE,CAAS,GAAGhG,KAAc,EAAK,GAAG,WAAWgG,CAAS,IAAIJ,CAAe;AAAA,QAChH,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EAAC;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import c from "../../../../@emotion/hash/dist/hash.browser.esm.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
function w(
|
|
6
|
-
let r =
|
|
7
|
-
for (let n = 0; n <
|
|
8
|
-
const o =
|
|
2
|
+
import u from "../../../../@rc-component/util/es/Dom/canUseDom.js";
|
|
3
|
+
import l from "../theme/Theme.js";
|
|
4
|
+
const a = /* @__PURE__ */ new WeakMap(), s = {};
|
|
5
|
+
function w(e, t) {
|
|
6
|
+
let r = a;
|
|
7
|
+
for (let n = 0; n < t.length; n += 1) {
|
|
8
|
+
const o = t[n];
|
|
9
9
|
r.has(o) || r.set(o, /* @__PURE__ */ new WeakMap()), r = r.get(o);
|
|
10
10
|
}
|
|
11
|
-
return r.has(s) || r.set(s,
|
|
11
|
+
return r.has(s) || r.set(s, e()), r.get(s);
|
|
12
12
|
}
|
|
13
13
|
const i = /* @__PURE__ */ new WeakMap();
|
|
14
|
-
function f(
|
|
15
|
-
let
|
|
16
|
-
return
|
|
17
|
-
const n =
|
|
18
|
-
|
|
19
|
-
}),
|
|
14
|
+
function f(e) {
|
|
15
|
+
let t = i.get(e) || "";
|
|
16
|
+
return t || (Object.keys(e).forEach((r) => {
|
|
17
|
+
const n = e[r];
|
|
18
|
+
t += r, n instanceof l ? t += n.id : n && typeof n == "object" ? t += f(n) : t += n;
|
|
19
|
+
}), t = c(t), i.set(e, t)), t;
|
|
20
20
|
}
|
|
21
|
-
function $(
|
|
22
|
-
return c(`${
|
|
21
|
+
function $(e, t) {
|
|
22
|
+
return c(`${t}_${f(e)}`);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
26
|
-
return typeof
|
|
24
|
+
const b = u();
|
|
25
|
+
function d(e) {
|
|
26
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function g(e) {
|
|
29
29
|
const {
|
|
30
|
-
hashCls:
|
|
30
|
+
hashCls: t,
|
|
31
31
|
hashPriority: r = "low"
|
|
32
|
-
} =
|
|
33
|
-
if (!
|
|
32
|
+
} = e || {};
|
|
33
|
+
if (!t)
|
|
34
34
|
return "";
|
|
35
|
-
const n = `.${
|
|
35
|
+
const n = `.${t}`;
|
|
36
36
|
return r === "low" ? `:where(${n})` : n;
|
|
37
37
|
}
|
|
38
|
+
const k = (e) => e != null;
|
|
38
39
|
export {
|
|
39
40
|
f as flattenToken,
|
|
40
|
-
|
|
41
|
+
b as isClientSide,
|
|
42
|
+
k as isNonNullable,
|
|
41
43
|
w as memoResult,
|
|
42
44
|
$ as token2key,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
d as unit,
|
|
46
|
+
g as where
|
|
45
47
|
};
|
|
46
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/util/index.js"],"sourcesContent":["import hash from '@emotion/hash';\nimport canUseDom from \"@rc-component/util/es/Dom/canUseDom\";\nimport { removeCSS, updateCSS } from \"@rc-component/util/es/Dom/dynamicCSS\";\nimport { ATTR_MARK, ATTR_TOKEN } from \"../StyleContext\";\nimport { Theme } from \"../theme\";\n\n// Create a cache for memo concat\n\nconst resultCache = new WeakMap();\nconst RESULT_VALUE = {};\nexport function memoResult(callback, deps) {\n let current = resultCache;\n for (let i = 0; i < deps.length; i += 1) {\n const dep = deps[i];\n if (!current.has(dep)) {\n current.set(dep, new WeakMap());\n }\n current = current.get(dep);\n }\n if (!current.has(RESULT_VALUE)) {\n current.set(RESULT_VALUE, callback());\n }\n return current.get(RESULT_VALUE);\n}\n\n// Create a cache here to avoid always loop generate\nconst flattenTokenCache = new WeakMap();\n\n/**\n * Flatten token to string, this will auto cache the result when token not change\n */\nexport function flattenToken(token) {\n let str = flattenTokenCache.get(token) || '';\n if (!str) {\n Object.keys(token).forEach(key => {\n const value = token[key];\n str += key;\n if (value instanceof Theme) {\n str += value.id;\n } else if (value && typeof value === 'object') {\n str += flattenToken(value);\n } else {\n str += value;\n }\n });\n\n // https://github.com/ant-design/ant-design/issues/48386\n // Should hash the string to avoid style tag name too long\n str = hash(str);\n\n // Put in cache\n flattenTokenCache.set(token, str);\n }\n return str;\n}\n\n/**\n * Convert derivative token to key string\n */\nexport function token2key(token, salt) {\n return hash(`${salt}_${flattenToken(token)}`);\n}\nconst randomSelectorKey = `random-${Date.now()}-${Math.random()}`.replace(/\\./g, '');\n\n// Magic `content` for detect selector support\nconst checkContent = '_bAmBoO_';\nfunction supportSelector(styleStr, handleElement, supportCheck) {\n if (canUseDom()) {\n updateCSS(styleStr, randomSelectorKey);\n const ele = document.createElement('div');\n ele.style.position = 'fixed';\n ele.style.left = '0';\n ele.style.top = '0';\n handleElement?.(ele);\n document.body.appendChild(ele);\n if (process.env.NODE_ENV !== 'production') {\n ele.innerHTML = 'Test';\n ele.style.zIndex = '9999999';\n }\n const support = supportCheck ? supportCheck(ele) : getComputedStyle(ele).content?.includes(checkContent);\n ele.parentNode?.removeChild(ele);\n removeCSS(randomSelectorKey);\n return support;\n }\n return false;\n}\nlet canLayer = undefined;\nexport function supportLayer() {\n if (canLayer === undefined) {\n canLayer = supportSelector(`@layer ${randomSelectorKey} { .${randomSelectorKey} { content: \"${checkContent}\"!important; } }`, ele => {\n ele.className = randomSelectorKey;\n });\n }\n return canLayer;\n}\nlet canWhere = undefined;\nexport function supportWhere() {\n if (canWhere === undefined) {\n canWhere = supportSelector(`:where(.${randomSelectorKey}) { content: \"${checkContent}\"!important; }`, ele => {\n ele.className = randomSelectorKey;\n });\n }\n return canWhere;\n}\nlet canLogic = undefined;\nexport function supportLogicProps() {\n if (canLogic === undefined) {\n canLogic = supportSelector(`.${randomSelectorKey} { inset-block: 93px !important; }`, ele => {\n ele.className = randomSelectorKey;\n }, ele => getComputedStyle(ele).bottom === '93px');\n }\n return canLogic;\n}\nexport const isClientSide = canUseDom();\nexport function unit(num) {\n if (typeof num === 'number') {\n return `${num}px`;\n }\n return num;\n}\nexport function toStyleStr(style, tokenKey, styleId, customizeAttrs = {}, plain = false) {\n if (plain) {\n return style;\n }\n const attrs = {\n ...customizeAttrs,\n [ATTR_TOKEN]: tokenKey,\n [ATTR_MARK]: styleId\n };\n const attrStr = Object.keys(attrs).map(attr => {\n const val = attrs[attr];\n return val ? `${attr}=\"${val}\"` : null;\n }).filter(v => v).join(' ');\n return `<style ${attrStr}>${style}</style>`;\n}\nexport function where(options) {\n const {\n hashCls,\n hashPriority = 'low'\n } = options || {};\n if (!hashCls) {\n return '';\n }\n const hashSelector = `.${hashCls}`;\n return hashPriority === 'low' ? `:where(${hashSelector})` : hashSelector;\n}"],"names":["resultCache","RESULT_VALUE","memoResult","callback","deps","current","i","dep","flattenTokenCache","flattenToken","token","str","key","value","Theme","hash","token2key","salt","isClientSide","canUseDom","unit","num","where","options","hashCls","hashPriority","hashSelector"],"mappings":";;;AAQA,MAAMA,IAAc,oBAAI,QAAO,GACzBC,IAAe,CAAA;AACd,SAASC,EAAWC,GAAUC,GAAM;AACzC,MAAIC,IAAUL;AACd,WAASM,IAAI,GAAGA,IAAIF,EAAK,QAAQE,KAAK,GAAG;AACvC,UAAMC,IAAMH,EAAKE,CAAC;AAClB,IAAKD,EAAQ,IAAIE,CAAG,KAClBF,EAAQ,IAAIE,GAAK,oBAAI,QAAO,CAAE,GAEhCF,IAAUA,EAAQ,IAAIE,CAAG;AAAA,EAC3B;AACA,SAAKF,EAAQ,IAAIJ,CAAY,KAC3BI,EAAQ,IAAIJ,GAAcE,GAAU,GAE/BE,EAAQ,IAAIJ,CAAY;AACjC;AAGA,MAAMO,IAAoB,oBAAI,QAAO;AAK9B,SAASC,EAAaC,GAAO;AAClC,MAAIC,IAAMH,EAAkB,IAAIE,CAAK,KAAK;AAC1C,SAAKC,MACH,OAAO,KAAKD,CAAK,EAAE,QAAQ,CAAAE,MAAO;AAChC,UAAMC,IAAQH,EAAME,CAAG;AACvB,IAAAD,KAAOC,GACHC,aAAiBC,IACnBH,KAAOE,EAAM,KACJA,KAAS,OAAOA,KAAU,WACnCF,KAAOF,EAAaI,CAAK,IAEzBF,KAAOE;AAAA,EAEX,CAAC,GAIDF,IAAMI,EAAKJ,CAAG,GAGdH,EAAkB,IAAIE,GAAOC,CAAG,IAE3BA;AACT;AAKO,SAASK,EAAUN,GAAOO,GAAM;AACrC,SAAOF,EAAK,GAAGE,CAAI,IAAIR,EAAaC,CAAK,CAAC,EAAE;AAC9C;AAoDY,MAACQ,IAAeC,EAAS;AAC9B,SAASC,EAAKC,GAAK;AACxB,SAAI,OAAOA,KAAQ,WACV,GAAGA,CAAG,OAERA;AACT;AAgBO,SAASC,EAAMC,GAAS;AAC7B,QAAM;AAAA,IACJ,SAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,EACnB,IAAMF,KAAW,CAAA;AACf,MAAI,CAACC;AACH,WAAO;AAET,QAAME,IAAe,IAAIF,CAAO;AAChC,SAAOC,MAAiB,QAAQ,UAAUC,CAAY,MAAMA;AAC9D;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/util/index.js"],"sourcesContent":["import hash from '@emotion/hash';\nimport canUseDom from \"@rc-component/util/es/Dom/canUseDom\";\nimport { removeCSS, updateCSS } from \"@rc-component/util/es/Dom/dynamicCSS\";\nimport { ATTR_MARK, ATTR_TOKEN } from \"../StyleContext\";\nimport { Theme } from \"../theme\";\n\n// Create a cache for memo concat\n\nconst resultCache = new WeakMap();\nconst RESULT_VALUE = {};\nexport function memoResult(callback, deps) {\n let current = resultCache;\n for (let i = 0; i < deps.length; i += 1) {\n const dep = deps[i];\n if (!current.has(dep)) {\n current.set(dep, new WeakMap());\n }\n current = current.get(dep);\n }\n if (!current.has(RESULT_VALUE)) {\n current.set(RESULT_VALUE, callback());\n }\n return current.get(RESULT_VALUE);\n}\n\n// Create a cache here to avoid always loop generate\nconst flattenTokenCache = new WeakMap();\n\n/**\n * Flatten token to string, this will auto cache the result when token not change\n */\nexport function flattenToken(token) {\n let str = flattenTokenCache.get(token) || '';\n if (!str) {\n Object.keys(token).forEach(key => {\n const value = token[key];\n str += key;\n if (value instanceof Theme) {\n str += value.id;\n } else if (value && typeof value === 'object') {\n str += flattenToken(value);\n } else {\n str += value;\n }\n });\n\n // https://github.com/ant-design/ant-design/issues/48386\n // Should hash the string to avoid style tag name too long\n str = hash(str);\n\n // Put in cache\n flattenTokenCache.set(token, str);\n }\n return str;\n}\n\n/**\n * Convert derivative token to key string\n */\nexport function token2key(token, salt) {\n return hash(`${salt}_${flattenToken(token)}`);\n}\nconst randomSelectorKey = `random-${Date.now()}-${Math.random()}`.replace(/\\./g, '');\n\n// Magic `content` for detect selector support\nconst checkContent = '_bAmBoO_';\nfunction supportSelector(styleStr, handleElement, supportCheck) {\n if (canUseDom()) {\n updateCSS(styleStr, randomSelectorKey);\n const ele = document.createElement('div');\n ele.style.position = 'fixed';\n ele.style.left = '0';\n ele.style.top = '0';\n handleElement?.(ele);\n document.body.appendChild(ele);\n if (process.env.NODE_ENV !== 'production') {\n ele.innerHTML = 'Test';\n ele.style.zIndex = '9999999';\n }\n const support = supportCheck ? supportCheck(ele) : getComputedStyle(ele).content?.includes(checkContent);\n ele.parentNode?.removeChild(ele);\n removeCSS(randomSelectorKey);\n return support;\n }\n return false;\n}\nlet canLayer = undefined;\nexport function supportLayer() {\n if (canLayer === undefined) {\n canLayer = supportSelector(`@layer ${randomSelectorKey} { .${randomSelectorKey} { content: \"${checkContent}\"!important; } }`, ele => {\n ele.className = randomSelectorKey;\n });\n }\n return canLayer;\n}\nlet canWhere = undefined;\nexport function supportWhere() {\n if (canWhere === undefined) {\n canWhere = supportSelector(`:where(.${randomSelectorKey}) { content: \"${checkContent}\"!important; }`, ele => {\n ele.className = randomSelectorKey;\n });\n }\n return canWhere;\n}\nlet canLogic = undefined;\nexport function supportLogicProps() {\n if (canLogic === undefined) {\n canLogic = supportSelector(`.${randomSelectorKey} { inset-block: 93px !important; }`, ele => {\n ele.className = randomSelectorKey;\n }, ele => getComputedStyle(ele).bottom === '93px');\n }\n return canLogic;\n}\nexport const isClientSide = canUseDom();\nexport function unit(num) {\n if (typeof num === 'number') {\n return `${num}px`;\n }\n return num;\n}\nexport function toStyleStr(style, tokenKey, styleId, customizeAttrs = {}, plain = false) {\n if (plain) {\n return style;\n }\n const attrs = {\n ...customizeAttrs,\n [ATTR_TOKEN]: tokenKey,\n [ATTR_MARK]: styleId\n };\n const attrStr = Object.keys(attrs).map(attr => {\n const val = attrs[attr];\n return val ? `${attr}=\"${val}\"` : null;\n }).filter(v => v).join(' ');\n return `<style ${attrStr}>${style}</style>`;\n}\nexport function where(options) {\n const {\n hashCls,\n hashPriority = 'low'\n } = options || {};\n if (!hashCls) {\n return '';\n }\n const hashSelector = `.${hashCls}`;\n return hashPriority === 'low' ? `:where(${hashSelector})` : hashSelector;\n}\nexport const isNonNullable = val => {\n return val !== undefined && val !== null;\n};"],"names":["resultCache","RESULT_VALUE","memoResult","callback","deps","current","i","dep","flattenTokenCache","flattenToken","token","str","key","value","Theme","hash","token2key","salt","isClientSide","canUseDom","unit","num","where","options","hashCls","hashPriority","hashSelector","isNonNullable","val"],"mappings":";;;AAQA,MAAMA,IAAc,oBAAI,QAAO,GACzBC,IAAe,CAAA;AACd,SAASC,EAAWC,GAAUC,GAAM;AACzC,MAAIC,IAAUL;AACd,WAASM,IAAI,GAAGA,IAAIF,EAAK,QAAQE,KAAK,GAAG;AACvC,UAAMC,IAAMH,EAAKE,CAAC;AAClB,IAAKD,EAAQ,IAAIE,CAAG,KAClBF,EAAQ,IAAIE,GAAK,oBAAI,QAAO,CAAE,GAEhCF,IAAUA,EAAQ,IAAIE,CAAG;AAAA,EAC3B;AACA,SAAKF,EAAQ,IAAIJ,CAAY,KAC3BI,EAAQ,IAAIJ,GAAcE,GAAU,GAE/BE,EAAQ,IAAIJ,CAAY;AACjC;AAGA,MAAMO,IAAoB,oBAAI,QAAO;AAK9B,SAASC,EAAaC,GAAO;AAClC,MAAIC,IAAMH,EAAkB,IAAIE,CAAK,KAAK;AAC1C,SAAKC,MACH,OAAO,KAAKD,CAAK,EAAE,QAAQ,CAAAE,MAAO;AAChC,UAAMC,IAAQH,EAAME,CAAG;AACvB,IAAAD,KAAOC,GACHC,aAAiBC,IACnBH,KAAOE,EAAM,KACJA,KAAS,OAAOA,KAAU,WACnCF,KAAOF,EAAaI,CAAK,IAEzBF,KAAOE;AAAA,EAEX,CAAC,GAIDF,IAAMI,EAAKJ,CAAG,GAGdH,EAAkB,IAAIE,GAAOC,CAAG,IAE3BA;AACT;AAKO,SAASK,EAAUN,GAAOO,GAAM;AACrC,SAAOF,EAAK,GAAGE,CAAI,IAAIR,EAAaC,CAAK,CAAC,EAAE;AAC9C;AAoDY,MAACQ,IAAeC,EAAS;AAC9B,SAASC,EAAKC,GAAK;AACxB,SAAI,OAAOA,KAAQ,WACV,GAAGA,CAAG,OAERA;AACT;AAgBO,SAASC,EAAMC,GAAS;AAC7B,QAAM;AAAA,IACJ,SAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,EACnB,IAAMF,KAAW,CAAA;AACf,MAAI,CAACC;AACH,WAAO;AAET,QAAME,IAAe,IAAIF,CAAO;AAChC,SAAOC,MAAiB,QAAQ,UAAUC,CAAY,MAAMA;AAC9D;AACY,MAACC,IAAgB,CAAAC,MACCA,KAAQ;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import m from "../../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
2
|
import p from "../../../../@babel/runtime/helpers/esm/slicedToArray.js";
|
|
3
3
|
import a from "../../../../@babel/runtime/helpers/esm/objectSpread2.js";
|
|
4
|
-
import
|
|
4
|
+
import s from "../../../../@rc-component/util/es/warning.js";
|
|
5
5
|
function O(c, l, v, o) {
|
|
6
6
|
var e = a({}, l[c]);
|
|
7
7
|
if (o != null && o.deprecatedTokens) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var c = (
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var v = (g, t, s) => t in g ? x(g, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : g[t] = s;
|
|
3
|
+
var c = (g, t, s) => v(g, typeof t != "symbol" ? t + "" : t, s);
|
|
4
4
|
import M from "./presetColors.js";
|
|
5
5
|
const r = Math.round;
|
|
6
|
-
function
|
|
7
|
-
const s =
|
|
6
|
+
function S(g, t) {
|
|
7
|
+
const s = g.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [], i = s.map((h) => parseFloat(h));
|
|
8
8
|
for (let h = 0; h < 3; h += 1)
|
|
9
9
|
i[h] = t(i[h] || 0, s[h] || "", h);
|
|
10
10
|
return s[3] ? i[3] = s[3].includes("%") ? i[3] / 100 : i[3] : i[3] = 1, i;
|
|
11
11
|
}
|
|
12
|
-
const d = (
|
|
13
|
-
function
|
|
12
|
+
const d = (g, t, s) => s === 0 ? g : g / 100;
|
|
13
|
+
function b(g, t) {
|
|
14
14
|
const s = t || 255;
|
|
15
|
-
return
|
|
15
|
+
return g > s ? s : g < 0 ? 0 : g;
|
|
16
16
|
}
|
|
17
17
|
class H {
|
|
18
18
|
constructor(t) {
|
|
@@ -38,7 +38,8 @@ class H {
|
|
|
38
38
|
c(this, "a", 1);
|
|
39
39
|
// HSV privates
|
|
40
40
|
c(this, "_h");
|
|
41
|
-
c(this, "
|
|
41
|
+
c(this, "_hsl_s");
|
|
42
|
+
c(this, "_hsv_s");
|
|
42
43
|
c(this, "_l");
|
|
43
44
|
c(this, "_v");
|
|
44
45
|
// intermediate variables to calculate HSL/HSV
|
|
@@ -69,9 +70,9 @@ class H {
|
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
72
|
} else if (t instanceof H)
|
|
72
|
-
this.r = t.r, this.g = t.g, this.b = t.b, this.a = t.a, this._h = t._h, this.
|
|
73
|
+
this.r = t.r, this.g = t.g, this.b = t.b, this.a = t.a, this._h = t._h, this._hsl_s = t._hsl_s, this._hsv_s = t._hsv_s, this._l = t._l, this._v = t._v;
|
|
73
74
|
else if (s("rgb"))
|
|
74
|
-
this.r =
|
|
75
|
+
this.r = b(t.r), this.g = b(t.g), this.b = b(t.b), this.a = typeof t.a == "number" ? b(t.a, 1) : 1;
|
|
75
76
|
else if (s("hsl"))
|
|
76
77
|
this.fromHsl(t);
|
|
77
78
|
else if (s("hsv"))
|
|
@@ -103,8 +104,8 @@ class H {
|
|
|
103
104
|
*/
|
|
104
105
|
getLuminance() {
|
|
105
106
|
function t(e) {
|
|
106
|
-
const
|
|
107
|
-
return
|
|
107
|
+
const o = e / 255;
|
|
108
|
+
return o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4);
|
|
108
109
|
}
|
|
109
110
|
const s = t(this.r), i = t(this.g), h = t(this.b);
|
|
110
111
|
return 0.2126 * s + 0.7152 * i + 0.0722 * h;
|
|
@@ -116,12 +117,30 @@ class H {
|
|
|
116
117
|
}
|
|
117
118
|
return this._h;
|
|
118
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated should use getHSVSaturation or getHSLSaturation instead
|
|
122
|
+
*/
|
|
119
123
|
getSaturation() {
|
|
120
|
-
|
|
124
|
+
return this.getHSVSaturation();
|
|
125
|
+
}
|
|
126
|
+
getHSVSaturation() {
|
|
127
|
+
if (typeof this._hsv_s > "u") {
|
|
121
128
|
const t = this.getMax() - this.getMin();
|
|
122
|
-
t === 0 ? this.
|
|
129
|
+
t === 0 ? this._hsv_s = 0 : this._hsv_s = t / this.getMax();
|
|
123
130
|
}
|
|
124
|
-
return this.
|
|
131
|
+
return this._hsv_s;
|
|
132
|
+
}
|
|
133
|
+
getHSLSaturation() {
|
|
134
|
+
if (typeof this._hsl_s > "u") {
|
|
135
|
+
const t = this.getMax() - this.getMin();
|
|
136
|
+
if (t === 0)
|
|
137
|
+
this._hsl_s = 0;
|
|
138
|
+
else {
|
|
139
|
+
const s = this.getLightness();
|
|
140
|
+
this._hsl_s = t / 255 / (1 - Math.abs(2 * s - 1));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return this._hsl_s;
|
|
125
144
|
}
|
|
126
145
|
getLightness() {
|
|
127
146
|
return typeof this._l > "u" && (this._l = (this.getMax() + this.getMin()) / 510), this._l;
|
|
@@ -163,13 +182,13 @@ class H {
|
|
|
163
182
|
* 0 means no mixing (return current color).
|
|
164
183
|
*/
|
|
165
184
|
mix(t, s = 50) {
|
|
166
|
-
const i = this._c(t), h = s / 100, e = (
|
|
185
|
+
const i = this._c(t), h = s / 100, e = (l) => (i[l] - this[l]) * h + this[l], o = {
|
|
167
186
|
r: r(e("r")),
|
|
168
187
|
g: r(e("g")),
|
|
169
188
|
b: r(e("b")),
|
|
170
189
|
a: r(e("a") * 100) / 100
|
|
171
190
|
};
|
|
172
|
-
return this._c(
|
|
191
|
+
return this._c(o);
|
|
173
192
|
}
|
|
174
193
|
/**
|
|
175
194
|
* Mix the color with pure white, from 0 to 100.
|
|
@@ -236,21 +255,21 @@ class H {
|
|
|
236
255
|
toHsl() {
|
|
237
256
|
return {
|
|
238
257
|
h: this.getHue(),
|
|
239
|
-
s: this.
|
|
258
|
+
s: this.getHSLSaturation(),
|
|
240
259
|
l: this.getLightness(),
|
|
241
260
|
a: this.a
|
|
242
261
|
};
|
|
243
262
|
}
|
|
244
263
|
/** CSS support color pattern */
|
|
245
264
|
toHslString() {
|
|
246
|
-
const t = this.getHue(), s = r(this.
|
|
265
|
+
const t = this.getHue(), s = r(this.getHSLSaturation() * 100), i = r(this.getLightness() * 100);
|
|
247
266
|
return this.a !== 1 ? `hsla(${t},${s}%,${i}%,${this.a})` : `hsl(${t},${s}%,${i}%)`;
|
|
248
267
|
}
|
|
249
268
|
/** Same as toHsb */
|
|
250
269
|
toHsv() {
|
|
251
270
|
return {
|
|
252
271
|
h: this.getHue(),
|
|
253
|
-
s: this.
|
|
272
|
+
s: this.getHSVSaturation(),
|
|
254
273
|
v: this.getValue(),
|
|
255
274
|
a: this.a
|
|
256
275
|
};
|
|
@@ -273,7 +292,7 @@ class H {
|
|
|
273
292
|
/** Return a new FastColor object with one channel changed */
|
|
274
293
|
_sc(t, s, i) {
|
|
275
294
|
const h = this.clone();
|
|
276
|
-
return h[t] =
|
|
295
|
+
return h[t] = b(s, i), h;
|
|
277
296
|
}
|
|
278
297
|
_c(t) {
|
|
279
298
|
return new this.constructor(t);
|
|
@@ -297,15 +316,17 @@ class H {
|
|
|
297
316
|
l: i,
|
|
298
317
|
a: h
|
|
299
318
|
}) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
319
|
+
const e = (t % 360 + 360) % 360;
|
|
320
|
+
if (this._h = e, this._hsl_s = s, this._l = i, this.a = typeof h == "number" ? h : 1, s <= 0) {
|
|
321
|
+
const m = r(i * 255);
|
|
322
|
+
this.r = m, this.g = m, this.b = m;
|
|
323
|
+
return;
|
|
303
324
|
}
|
|
304
|
-
let
|
|
305
|
-
const n =
|
|
306
|
-
n >= 0 && n < 1 ? (
|
|
307
|
-
const
|
|
308
|
-
this.r = r((
|
|
325
|
+
let o = 0, l = 0, _ = 0;
|
|
326
|
+
const n = e / 60, a = (1 - Math.abs(2 * i - 1)) * s, f = a * (1 - Math.abs(n % 2 - 1));
|
|
327
|
+
n >= 0 && n < 1 ? (o = a, l = f) : n >= 1 && n < 2 ? (o = f, l = a) : n >= 2 && n < 3 ? (l = a, _ = f) : n >= 3 && n < 4 ? (l = f, _ = a) : n >= 4 && n < 5 ? (o = f, _ = a) : n >= 5 && n < 6 && (o = a, _ = f);
|
|
328
|
+
const u = i - a / 2;
|
|
329
|
+
this.r = r((o + u) * 255), this.g = r((l + u) * 255), this.b = r((_ + u) * 255);
|
|
309
330
|
}
|
|
310
331
|
fromHsv({
|
|
311
332
|
h: t,
|
|
@@ -313,35 +334,35 @@ class H {
|
|
|
313
334
|
v: i,
|
|
314
335
|
a: h
|
|
315
336
|
}) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
337
|
+
const e = (t % 360 + 360) % 360;
|
|
338
|
+
this._h = e, this._hsv_s = s, this._v = i, this.a = typeof h == "number" ? h : 1;
|
|
339
|
+
const o = r(i * 255);
|
|
340
|
+
if (this.r = o, this.g = o, this.b = o, s <= 0)
|
|
319
341
|
return;
|
|
320
|
-
const
|
|
321
|
-
switch (
|
|
342
|
+
const l = e / 60, _ = Math.floor(l), n = l - _, a = r(i * (1 - s) * 255), f = r(i * (1 - s * n) * 255), u = r(i * (1 - s * (1 - n)) * 255);
|
|
343
|
+
switch (_) {
|
|
322
344
|
case 0:
|
|
323
|
-
this.g =
|
|
345
|
+
this.g = u, this.b = a;
|
|
324
346
|
break;
|
|
325
347
|
case 1:
|
|
326
|
-
this.r =
|
|
348
|
+
this.r = f, this.b = a;
|
|
327
349
|
break;
|
|
328
350
|
case 2:
|
|
329
|
-
this.r =
|
|
351
|
+
this.r = a, this.b = u;
|
|
330
352
|
break;
|
|
331
353
|
case 3:
|
|
332
|
-
this.r =
|
|
354
|
+
this.r = a, this.g = f;
|
|
333
355
|
break;
|
|
334
356
|
case 4:
|
|
335
|
-
this.r =
|
|
357
|
+
this.r = u, this.g = a;
|
|
336
358
|
break;
|
|
337
|
-
case 5:
|
|
338
359
|
default:
|
|
339
|
-
this.g =
|
|
360
|
+
this.g = a, this.b = f;
|
|
340
361
|
break;
|
|
341
362
|
}
|
|
342
363
|
}
|
|
343
364
|
fromHsvString(t) {
|
|
344
|
-
const s =
|
|
365
|
+
const s = S(t, d);
|
|
345
366
|
this.fromHsv({
|
|
346
367
|
h: s[0],
|
|
347
368
|
s: s[1],
|
|
@@ -350,7 +371,7 @@ class H {
|
|
|
350
371
|
});
|
|
351
372
|
}
|
|
352
373
|
fromHslString(t) {
|
|
353
|
-
const s =
|
|
374
|
+
const s = S(t, d);
|
|
354
375
|
this.fromHsl({
|
|
355
376
|
h: s[0],
|
|
356
377
|
s: s[1],
|
|
@@ -359,7 +380,7 @@ class H {
|
|
|
359
380
|
});
|
|
360
381
|
}
|
|
361
382
|
fromRgbString(t) {
|
|
362
|
-
const s =
|
|
383
|
+
const s = S(t, (i, h) => (
|
|
363
384
|
// Convert percentage to number. e.g. 50% -> 128
|
|
364
385
|
h.includes("%") ? r(i / 100 * 255) : i
|
|
365
386
|
));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FastColor.js","sources":["../../../../../node_modules/@ant-design/fast-color/es/FastColor.js"],"sourcesContent":["import presetColors from \"./presetColors\";\nconst round = Math.round;\n\n/**\n * Support format, alpha unit will check the % mark:\n * - rgba(102, 204, 255, .5) -> [102, 204, 255, 0.5]\n * - rgb(102 204 255 / .5) -> [102, 204, 255, 0.5]\n * - rgb(100%, 50%, 0% / 50%) -> [255, 128, 0, 0.5]\n * - hsl(270, 60, 40, .5) -> [270, 60, 40, 0.5]\n * - hsl(270deg 60% 40% / 50%) -> [270, 60, 40, 0.5]\n *\n * When `base` is provided, the percentage value will be divided by `base`.\n */\nfunction splitColorStr(str, parseNum) {\n const match = str\n // Remove str before `(`\n .replace(/^[^(]*\\((.*)/, '$1')\n // Remove str after `)`\n .replace(/\\).*/, '').match(/\\d*\\.?\\d+%?/g) || [];\n const numList = match.map(item => parseFloat(item));\n for (let i = 0; i < 3; i += 1) {\n numList[i] = parseNum(numList[i] || 0, match[i] || '', i);\n }\n\n // For alpha. 50% should be 0.5\n if (match[3]) {\n numList[3] = match[3].includes('%') ? numList[3] / 100 : numList[3];\n } else {\n // By default, alpha is 1\n numList[3] = 1;\n }\n return numList;\n}\nconst parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;\n\n/** round and limit number to integer between 0-255 */\nfunction limitRange(value, max) {\n const mergedMax = max || 255;\n if (value > mergedMax) {\n return mergedMax;\n }\n if (value < 0) {\n return 0;\n }\n return value;\n}\nexport class FastColor {\n /**\n * All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.\n */\n isValid = true;\n\n /**\n * Red, R in RGB\n */\n r = 0;\n\n /**\n * Green, G in RGB\n */\n g = 0;\n\n /**\n * Blue, B in RGB\n */\n b = 0;\n\n /**\n * Alpha/Opacity, A in RGBA/HSLA\n */\n a = 1;\n\n // HSV privates\n _h;\n _s;\n _l;\n _v;\n\n // intermediate variables to calculate HSL/HSV\n _max;\n _min;\n _brightness;\n constructor(input) {\n /**\n * Always check 3 char in the object to determine the format.\n * We not use function in check to save bundle size.\n * e.g. 'rgb' -> { r: 0, g: 0, b: 0 }.\n */\n function matchFormat(str) {\n return str[0] in input && str[1] in input && str[2] in input;\n }\n if (!input) {\n // Do nothing since already initialized\n } else if (typeof input === 'string') {\n const trimStr = input.trim();\n function matchPrefix(prefix) {\n return trimStr.startsWith(prefix);\n }\n if (/^#?[A-F\\d]{3,8}$/i.test(trimStr)) {\n this.fromHexString(trimStr);\n } else if (matchPrefix('rgb')) {\n this.fromRgbString(trimStr);\n } else if (matchPrefix('hsl')) {\n this.fromHslString(trimStr);\n } else if (matchPrefix('hsv') || matchPrefix('hsb')) {\n this.fromHsvString(trimStr);\n } else {\n // From preset color\n const presetColor = presetColors[trimStr.toLowerCase()];\n if (presetColor) {\n this.fromHexString(\n // Convert 36 hex to 16 hex\n parseInt(presetColor, 36).toString(16).padStart(6, '0'));\n }\n }\n } else if (input instanceof FastColor) {\n this.r = input.r;\n this.g = input.g;\n this.b = input.b;\n this.a = input.a;\n this._h = input._h;\n this._s = input._s;\n this._l = input._l;\n this._v = input._v;\n } else if (matchFormat('rgb')) {\n this.r = limitRange(input.r);\n this.g = limitRange(input.g);\n this.b = limitRange(input.b);\n this.a = typeof input.a === 'number' ? limitRange(input.a, 1) : 1;\n } else if (matchFormat('hsl')) {\n this.fromHsl(input);\n } else if (matchFormat('hsv')) {\n this.fromHsv(input);\n } else {\n throw new Error('@ant-design/fast-color: unsupported input ' + JSON.stringify(input));\n }\n }\n\n // ======================= Setter =======================\n\n setR(value) {\n return this._sc('r', value);\n }\n setG(value) {\n return this._sc('g', value);\n }\n setB(value) {\n return this._sc('b', value);\n }\n setA(value) {\n return this._sc('a', value, 1);\n }\n setHue(value) {\n const hsv = this.toHsv();\n hsv.h = value;\n return this._c(hsv);\n }\n\n // ======================= Getter =======================\n /**\n * Returns the perceived luminance of a color, from 0-1.\n * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n */\n getLuminance() {\n function adjustGamma(raw) {\n const val = raw / 255;\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }\n const R = adjustGamma(this.r);\n const G = adjustGamma(this.g);\n const B = adjustGamma(this.b);\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n }\n getHue() {\n if (typeof this._h === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._h = 0;\n } else {\n this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));\n }\n }\n return this._h;\n }\n getSaturation() {\n if (typeof this._s === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._s = 0;\n } else {\n this._s = delta / this.getMax();\n }\n }\n return this._s;\n }\n getLightness() {\n if (typeof this._l === 'undefined') {\n this._l = (this.getMax() + this.getMin()) / 510;\n }\n return this._l;\n }\n getValue() {\n if (typeof this._v === 'undefined') {\n this._v = this.getMax() / 255;\n }\n return this._v;\n }\n\n /**\n * Returns the perceived brightness of the color, from 0-255.\n * Note: this is not the b of HSB\n * @see http://www.w3.org/TR/AERT#color-contrast\n */\n getBrightness() {\n if (typeof this._brightness === 'undefined') {\n this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1000;\n }\n return this._brightness;\n }\n\n // ======================== Func ========================\n\n darken(amount = 10) {\n const h = this.getHue();\n const s = this.getSaturation();\n let l = this.getLightness() - amount / 100;\n if (l < 0) {\n l = 0;\n }\n return this._c({\n h,\n s,\n l,\n a: this.a\n });\n }\n lighten(amount = 10) {\n const h = this.getHue();\n const s = this.getSaturation();\n let l = this.getLightness() + amount / 100;\n if (l > 1) {\n l = 1;\n }\n return this._c({\n h,\n s,\n l,\n a: this.a\n });\n }\n\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n mix(input, amount = 50) {\n const color = this._c(input);\n const p = amount / 100;\n const calc = key => (color[key] - this[key]) * p + this[key];\n const rgba = {\n r: round(calc('r')),\n g: round(calc('g')),\n b: round(calc('b')),\n a: round(calc('a') * 100) / 100\n };\n return this._c(rgba);\n }\n\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n */\n tint(amount = 10) {\n return this.mix({\n r: 255,\n g: 255,\n b: 255,\n a: 1\n }, amount);\n }\n\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n */\n shade(amount = 10) {\n return this.mix({\n r: 0,\n g: 0,\n b: 0,\n a: 1\n }, amount);\n }\n onBackground(background) {\n const bg = this._c(background);\n const alpha = this.a + bg.a * (1 - this.a);\n const calc = key => {\n return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);\n };\n return this._c({\n r: calc('r'),\n g: calc('g'),\n b: calc('b'),\n a: alpha\n });\n }\n\n // ======================= Status =======================\n isDark() {\n return this.getBrightness() < 128;\n }\n isLight() {\n return this.getBrightness() >= 128;\n }\n\n // ======================== MISC ========================\n equals(other) {\n return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;\n }\n clone() {\n return this._c(this);\n }\n\n // ======================= Format =======================\n toHexString() {\n let hex = '#';\n const rHex = (this.r || 0).toString(16);\n hex += rHex.length === 2 ? rHex : '0' + rHex;\n const gHex = (this.g || 0).toString(16);\n hex += gHex.length === 2 ? gHex : '0' + gHex;\n const bHex = (this.b || 0).toString(16);\n hex += bHex.length === 2 ? bHex : '0' + bHex;\n if (typeof this.a === 'number' && this.a >= 0 && this.a < 1) {\n const aHex = round(this.a * 255).toString(16);\n hex += aHex.length === 2 ? aHex : '0' + aHex;\n }\n return hex;\n }\n\n /** CSS support color pattern */\n toHsl() {\n return {\n h: this.getHue(),\n s: this.getSaturation(),\n l: this.getLightness(),\n a: this.a\n };\n }\n\n /** CSS support color pattern */\n toHslString() {\n const h = this.getHue();\n const s = round(this.getSaturation() * 100);\n const l = round(this.getLightness() * 100);\n return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;\n }\n\n /** Same as toHsb */\n toHsv() {\n return {\n h: this.getHue(),\n s: this.getSaturation(),\n v: this.getValue(),\n a: this.a\n };\n }\n toRgb() {\n return {\n r: this.r,\n g: this.g,\n b: this.b,\n a: this.a\n };\n }\n toRgbString() {\n return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;\n }\n toString() {\n return this.toRgbString();\n }\n\n // ====================== Privates ======================\n /** Return a new FastColor object with one channel changed */\n _sc(rgb, value, max) {\n const clone = this.clone();\n clone[rgb] = limitRange(value, max);\n return clone;\n }\n _c(input) {\n return new this.constructor(input);\n }\n getMax() {\n if (typeof this._max === 'undefined') {\n this._max = Math.max(this.r, this.g, this.b);\n }\n return this._max;\n }\n getMin() {\n if (typeof this._min === 'undefined') {\n this._min = Math.min(this.r, this.g, this.b);\n }\n return this._min;\n }\n fromHexString(trimStr) {\n const withoutPrefix = trimStr.replace('#', '');\n function connectNum(index1, index2) {\n return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);\n }\n if (withoutPrefix.length < 6) {\n // #rgb or #rgba\n this.r = connectNum(0);\n this.g = connectNum(1);\n this.b = connectNum(2);\n this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;\n } else {\n // #rrggbb or #rrggbbaa\n this.r = connectNum(0, 1);\n this.g = connectNum(2, 3);\n this.b = connectNum(4, 5);\n this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;\n }\n }\n fromHsl({\n h,\n s,\n l,\n a\n }) {\n this._h = h % 360;\n this._s = s;\n this._l = l;\n this.a = typeof a === 'number' ? a : 1;\n if (s <= 0) {\n const rgb = round(l * 255);\n this.r = rgb;\n this.g = rgb;\n this.b = rgb;\n }\n let r = 0,\n g = 0,\n b = 0;\n const huePrime = h / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * s;\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n if (huePrime >= 0 && huePrime < 1) {\n r = chroma;\n g = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n r = secondComponent;\n g = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n g = chroma;\n b = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n g = secondComponent;\n b = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n r = secondComponent;\n b = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n r = chroma;\n b = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n this.r = round((r + lightnessModification) * 255);\n this.g = round((g + lightnessModification) * 255);\n this.b = round((b + lightnessModification) * 255);\n }\n fromHsv({\n h,\n s,\n v,\n a\n }) {\n this._h = h % 360;\n this._s = s;\n this._v = v;\n this.a = typeof a === 'number' ? a : 1;\n const vv = round(v * 255);\n this.r = vv;\n this.g = vv;\n this.b = vv;\n if (s <= 0) {\n return;\n }\n const hh = h / 60;\n const i = Math.floor(hh);\n const ff = hh - i;\n const p = round(v * (1.0 - s) * 255);\n const q = round(v * (1.0 - s * ff) * 255);\n const t = round(v * (1.0 - s * (1.0 - ff)) * 255);\n switch (i) {\n case 0:\n this.g = t;\n this.b = p;\n break;\n case 1:\n this.r = q;\n this.b = p;\n break;\n case 2:\n this.r = p;\n this.b = t;\n break;\n case 3:\n this.r = p;\n this.g = q;\n break;\n case 4:\n this.r = t;\n this.g = p;\n break;\n case 5:\n default:\n this.g = p;\n this.b = q;\n break;\n }\n }\n fromHsvString(trimStr) {\n const cells = splitColorStr(trimStr, parseHSVorHSL);\n this.fromHsv({\n h: cells[0],\n s: cells[1],\n v: cells[2],\n a: cells[3]\n });\n }\n fromHslString(trimStr) {\n const cells = splitColorStr(trimStr, parseHSVorHSL);\n this.fromHsl({\n h: cells[0],\n s: cells[1],\n l: cells[2],\n a: cells[3]\n });\n }\n fromRgbString(trimStr) {\n const cells = splitColorStr(trimStr, (num, txt) =>\n // Convert percentage to number. e.g. 50% -> 128\n txt.includes('%') ? round(num / 100 * 255) : num);\n this.r = cells[0];\n this.g = cells[1];\n this.b = cells[2];\n this.a = cells[3];\n }\n}"],"names":["round","splitColorStr","str","parseNum","match","numList","item","i","parseHSVorHSL","num","_","index","limitRange","value","max","mergedMax","FastColor","input","__publicField","matchFormat","matchPrefix","prefix","trimStr","presetColor","presetColors","hsv","adjustGamma","raw","val","R","G","B","delta","amount","h","s","l","color","p","calc","key","rgba","background","bg","alpha","other","hex","rHex","gHex","bHex","aHex","rgb","clone","withoutPrefix","connectNum","index1","index2","a","r","b","huePrime","chroma","secondComponent","lightnessModification","v","vv","hh","ff","q","t","cells","txt"],"mappings":";;;;AACA,MAAMA,IAAQ,KAAK;AAYnB,SAASC,EAAcC,GAAKC,GAAU;AACpC,QAAMC,IAAQF,EAEb,QAAQ,gBAAgB,IAAI,EAE5B,QAAQ,QAAQ,EAAE,EAAE,MAAM,cAAc,KAAK,CAAA,GACxCG,IAAUD,EAAM,IAAI,CAAAE,MAAQ,WAAWA,CAAI,CAAC;AAClD,WAASC,IAAI,GAAGA,IAAI,GAAGA,KAAK;AAC1B,IAAAF,EAAQE,CAAC,IAAIJ,EAASE,EAAQE,CAAC,KAAK,GAAGH,EAAMG,CAAC,KAAK,IAAIA,CAAC;AAI1D,SAAIH,EAAM,CAAC,IACTC,EAAQ,CAAC,IAAID,EAAM,CAAC,EAAE,SAAS,GAAG,IAAIC,EAAQ,CAAC,IAAI,MAAMA,EAAQ,CAAC,IAGlEA,EAAQ,CAAC,IAAI,GAERA;AACT;AACA,MAAMG,IAAgB,CAACC,GAAKC,GAAGC,MAAUA,MAAU,IAAIF,IAAMA,IAAM;AAGnE,SAASG,EAAWC,GAAOC,GAAK;AAC9B,QAAMC,IAAYD,KAAO;AACzB,SAAID,IAAQE,IACHA,IAELF,IAAQ,IACH,IAEFA;AACT;AACO,MAAMG,EAAU;AAAA,EAoCrB,YAAYC,GAAO;AAhCnB;AAAA;AAAA;AAAA,IAAAC,EAAA,iBAAU;AAKV;AAAA;AAAA;AAAA,IAAAA,EAAA,WAAI;A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version":3,"file":"FastColor.js","sources":["../../../../../node_modules/@ant-design/fast-color/es/FastColor.js"],"sourcesContent":["import presetColors from \"./presetColors\";\nconst round = Math.round;\n\n/**\n * Support format, alpha unit will check the % mark:\n * - rgba(102, 204, 255, .5) -> [102, 204, 255, 0.5]\n * - rgb(102 204 255 / .5) -> [102, 204, 255, 0.5]\n * - rgb(100%, 50%, 0% / 50%) -> [255, 128, 0, 0.5]\n * - hsl(270, 60, 40, .5) -> [270, 60, 40, 0.5]\n * - hsl(270deg 60% 40% / 50%) -> [270, 60, 40, 0.5]\n *\n * When `base` is provided, the percentage value will be divided by `base`.\n */\nfunction splitColorStr(str, parseNum) {\n const match = str\n // Remove str before `(`\n .replace(/^[^(]*\\((.*)/, '$1')\n // Remove str after `)`\n .replace(/\\).*/, '').match(/\\d*\\.?\\d+%?/g) || [];\n const numList = match.map(item => parseFloat(item));\n for (let i = 0; i < 3; i += 1) {\n numList[i] = parseNum(numList[i] || 0, match[i] || '', i);\n }\n\n // For alpha. 50% should be 0.5\n if (match[3]) {\n numList[3] = match[3].includes('%') ? numList[3] / 100 : numList[3];\n } else {\n // By default, alpha is 1\n numList[3] = 1;\n }\n return numList;\n}\nconst parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;\n\n/** round and limit number to integer between 0-255 */\nfunction limitRange(value, max) {\n const mergedMax = max || 255;\n if (value > mergedMax) {\n return mergedMax;\n }\n if (value < 0) {\n return 0;\n }\n return value;\n}\nexport class FastColor {\n /**\n * All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.\n */\n isValid = true;\n\n /**\n * Red, R in RGB\n */\n r = 0;\n\n /**\n * Green, G in RGB\n */\n g = 0;\n\n /**\n * Blue, B in RGB\n */\n b = 0;\n\n /**\n * Alpha/Opacity, A in RGBA/HSLA\n */\n a = 1;\n\n // HSV privates\n _h;\n _hsl_s;\n _hsv_s;\n _l;\n _v;\n\n // intermediate variables to calculate HSL/HSV\n _max;\n _min;\n _brightness;\n constructor(input) {\n /**\n * Always check 3 char in the object to determine the format.\n * We not use function in check to save bundle size.\n * e.g. 'rgb' -> { r: 0, g: 0, b: 0 }.\n */\n function matchFormat(str) {\n return str[0] in input && str[1] in input && str[2] in input;\n }\n if (!input) {\n // Do nothing since already initialized\n } else if (typeof input === 'string') {\n const trimStr = input.trim();\n function matchPrefix(prefix) {\n return trimStr.startsWith(prefix);\n }\n if (/^#?[A-F\\d]{3,8}$/i.test(trimStr)) {\n this.fromHexString(trimStr);\n } else if (matchPrefix('rgb')) {\n this.fromRgbString(trimStr);\n } else if (matchPrefix('hsl')) {\n this.fromHslString(trimStr);\n } else if (matchPrefix('hsv') || matchPrefix('hsb')) {\n this.fromHsvString(trimStr);\n } else {\n // From preset color\n const presetColor = presetColors[trimStr.toLowerCase()];\n if (presetColor) {\n this.fromHexString(\n // Convert 36 hex to 16 hex\n parseInt(presetColor, 36).toString(16).padStart(6, '0'));\n }\n }\n } else if (input instanceof FastColor) {\n this.r = input.r;\n this.g = input.g;\n this.b = input.b;\n this.a = input.a;\n this._h = input._h;\n this._hsl_s = input._hsl_s;\n this._hsv_s = input._hsv_s;\n this._l = input._l;\n this._v = input._v;\n } else if (matchFormat('rgb')) {\n this.r = limitRange(input.r);\n this.g = limitRange(input.g);\n this.b = limitRange(input.b);\n this.a = typeof input.a === 'number' ? limitRange(input.a, 1) : 1;\n } else if (matchFormat('hsl')) {\n this.fromHsl(input);\n } else if (matchFormat('hsv')) {\n this.fromHsv(input);\n } else {\n throw new Error('@ant-design/fast-color: unsupported input ' + JSON.stringify(input));\n }\n }\n\n // ======================= Setter =======================\n\n setR(value) {\n return this._sc('r', value);\n }\n setG(value) {\n return this._sc('g', value);\n }\n setB(value) {\n return this._sc('b', value);\n }\n setA(value) {\n return this._sc('a', value, 1);\n }\n setHue(value) {\n const hsv = this.toHsv();\n hsv.h = value;\n return this._c(hsv);\n }\n\n // ======================= Getter =======================\n /**\n * Returns the perceived luminance of a color, from 0-1.\n * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n */\n getLuminance() {\n function adjustGamma(raw) {\n const val = raw / 255;\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }\n const R = adjustGamma(this.r);\n const G = adjustGamma(this.g);\n const B = adjustGamma(this.b);\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n }\n getHue() {\n if (typeof this._h === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._h = 0;\n } else {\n this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));\n }\n }\n return this._h;\n }\n\n /**\n * @deprecated should use getHSVSaturation or getHSLSaturation instead\n */\n getSaturation() {\n return this.getHSVSaturation();\n }\n getHSVSaturation() {\n if (typeof this._hsv_s === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._hsv_s = 0;\n } else {\n this._hsv_s = delta / this.getMax();\n }\n }\n return this._hsv_s;\n }\n getHSLSaturation() {\n if (typeof this._hsl_s === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._hsl_s = 0;\n } else {\n const l = this.getLightness();\n this._hsl_s = delta / 255 / (1 - Math.abs(2 * l - 1));\n }\n }\n return this._hsl_s;\n }\n getLightness() {\n if (typeof this._l === 'undefined') {\n this._l = (this.getMax() + this.getMin()) / 510;\n }\n return this._l;\n }\n getValue() {\n if (typeof this._v === 'undefined') {\n this._v = this.getMax() / 255;\n }\n return this._v;\n }\n\n /**\n * Returns the perceived brightness of the color, from 0-255.\n * Note: this is not the b of HSB\n * @see http://www.w3.org/TR/AERT#color-contrast\n */\n getBrightness() {\n if (typeof this._brightness === 'undefined') {\n this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1000;\n }\n return this._brightness;\n }\n\n // ======================== Func ========================\n\n darken(amount = 10) {\n const h = this.getHue();\n const s = this.getSaturation();\n let l = this.getLightness() - amount / 100;\n if (l < 0) {\n l = 0;\n }\n return this._c({\n h,\n s,\n l,\n a: this.a\n });\n }\n lighten(amount = 10) {\n const h = this.getHue();\n const s = this.getSaturation();\n let l = this.getLightness() + amount / 100;\n if (l > 1) {\n l = 1;\n }\n return this._c({\n h,\n s,\n l,\n a: this.a\n });\n }\n\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n mix(input, amount = 50) {\n const color = this._c(input);\n const p = amount / 100;\n const calc = key => (color[key] - this[key]) * p + this[key];\n const rgba = {\n r: round(calc('r')),\n g: round(calc('g')),\n b: round(calc('b')),\n a: round(calc('a') * 100) / 100\n };\n return this._c(rgba);\n }\n\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n */\n tint(amount = 10) {\n return this.mix({\n r: 255,\n g: 255,\n b: 255,\n a: 1\n }, amount);\n }\n\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n */\n shade(amount = 10) {\n return this.mix({\n r: 0,\n g: 0,\n b: 0,\n a: 1\n }, amount);\n }\n onBackground(background) {\n const bg = this._c(background);\n const alpha = this.a + bg.a * (1 - this.a);\n const calc = key => {\n return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);\n };\n return this._c({\n r: calc('r'),\n g: calc('g'),\n b: calc('b'),\n a: alpha\n });\n }\n\n // ======================= Status =======================\n isDark() {\n return this.getBrightness() < 128;\n }\n isLight() {\n return this.getBrightness() >= 128;\n }\n\n // ======================== MISC ========================\n equals(other) {\n return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;\n }\n clone() {\n return this._c(this);\n }\n\n // ======================= Format =======================\n toHexString() {\n let hex = '#';\n const rHex = (this.r || 0).toString(16);\n hex += rHex.length === 2 ? rHex : '0' + rHex;\n const gHex = (this.g || 0).toString(16);\n hex += gHex.length === 2 ? gHex : '0' + gHex;\n const bHex = (this.b || 0).toString(16);\n hex += bHex.length === 2 ? bHex : '0' + bHex;\n if (typeof this.a === 'number' && this.a >= 0 && this.a < 1) {\n const aHex = round(this.a * 255).toString(16);\n hex += aHex.length === 2 ? aHex : '0' + aHex;\n }\n return hex;\n }\n\n /** CSS support color pattern */\n toHsl() {\n return {\n h: this.getHue(),\n s: this.getHSLSaturation(),\n l: this.getLightness(),\n a: this.a\n };\n }\n\n /** CSS support color pattern */\n toHslString() {\n const h = this.getHue();\n const s = round(this.getHSLSaturation() * 100);\n const l = round(this.getLightness() * 100);\n return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;\n }\n\n /** Same as toHsb */\n toHsv() {\n return {\n h: this.getHue(),\n s: this.getHSVSaturation(),\n v: this.getValue(),\n a: this.a\n };\n }\n toRgb() {\n return {\n r: this.r,\n g: this.g,\n b: this.b,\n a: this.a\n };\n }\n toRgbString() {\n return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;\n }\n toString() {\n return this.toRgbString();\n }\n\n // ====================== Privates ======================\n /** Return a new FastColor object with one channel changed */\n _sc(rgb, value, max) {\n const clone = this.clone();\n clone[rgb] = limitRange(value, max);\n return clone;\n }\n _c(input) {\n return new this.constructor(input);\n }\n getMax() {\n if (typeof this._max === 'undefined') {\n this._max = Math.max(this.r, this.g, this.b);\n }\n return this._max;\n }\n getMin() {\n if (typeof this._min === 'undefined') {\n this._min = Math.min(this.r, this.g, this.b);\n }\n return this._min;\n }\n fromHexString(trimStr) {\n const withoutPrefix = trimStr.replace('#', '');\n function connectNum(index1, index2) {\n return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);\n }\n if (withoutPrefix.length < 6) {\n // #rgb or #rgba\n this.r = connectNum(0);\n this.g = connectNum(1);\n this.b = connectNum(2);\n this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;\n } else {\n // #rrggbb or #rrggbbaa\n this.r = connectNum(0, 1);\n this.g = connectNum(2, 3);\n this.b = connectNum(4, 5);\n this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;\n }\n }\n fromHsl({\n h: _h,\n s,\n l,\n a\n }) {\n const h = (_h % 360 + 360) % 360;\n this._h = h;\n this._hsl_s = s;\n this._l = l;\n this.a = typeof a === 'number' ? a : 1;\n if (s <= 0) {\n const rgb = round(l * 255);\n this.r = rgb;\n this.g = rgb;\n this.b = rgb;\n return;\n }\n let r = 0,\n g = 0,\n b = 0;\n const huePrime = h / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * s;\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n if (huePrime >= 0 && huePrime < 1) {\n r = chroma;\n g = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n r = secondComponent;\n g = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n g = chroma;\n b = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n g = secondComponent;\n b = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n r = secondComponent;\n b = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n r = chroma;\n b = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n this.r = round((r + lightnessModification) * 255);\n this.g = round((g + lightnessModification) * 255);\n this.b = round((b + lightnessModification) * 255);\n }\n fromHsv({\n h: _h,\n s,\n v,\n a\n }) {\n const h = (_h % 360 + 360) % 360;\n this._h = h;\n this._hsv_s = s;\n this._v = v;\n this.a = typeof a === 'number' ? a : 1;\n const vv = round(v * 255);\n this.r = vv;\n this.g = vv;\n this.b = vv;\n if (s <= 0) {\n return;\n }\n const hh = h / 60;\n const i = Math.floor(hh);\n const ff = hh - i;\n const p = round(v * (1.0 - s) * 255);\n const q = round(v * (1.0 - s * ff) * 255);\n const t = round(v * (1.0 - s * (1.0 - ff)) * 255);\n switch (i) {\n case 0:\n this.g = t;\n this.b = p;\n break;\n case 1:\n this.r = q;\n this.b = p;\n break;\n case 2:\n this.r = p;\n this.b = t;\n break;\n case 3:\n this.r = p;\n this.g = q;\n break;\n case 4:\n this.r = t;\n this.g = p;\n break;\n case 5:\n default:\n this.g = p;\n this.b = q;\n break;\n }\n }\n fromHsvString(trimStr) {\n const cells = splitColorStr(trimStr, parseHSVorHSL);\n this.fromHsv({\n h: cells[0],\n s: cells[1],\n v: cells[2],\n a: cells[3]\n });\n }\n fromHslString(trimStr) {\n const cells = splitColorStr(trimStr, parseHSVorHSL);\n this.fromHsl({\n h: cells[0],\n s: cells[1],\n l: cells[2],\n a: cells[3]\n });\n }\n fromRgbString(trimStr) {\n const cells = splitColorStr(trimStr, (num, txt) =>\n // Convert percentage to number. e.g. 50% -> 128\n txt.includes('%') ? round(num / 100 * 255) : num);\n this.r = cells[0];\n this.g = cells[1];\n this.b = cells[2];\n this.a = cells[3];\n }\n}"],"names":["round","splitColorStr","str","parseNum","match","numList","item","i","parseHSVorHSL","num","_","index","limitRange","value","max","mergedMax","FastColor","input","__publicField","matchFormat","matchPrefix","prefix","trimStr","presetColor","presetColors","hsv","adjustGamma","raw","val","R","G","B","delta","l","amount","h","s","color","p","calc","key","rgba","background","bg","alpha","other","hex","rHex","gHex","bHex","aHex","rgb","clone","withoutPrefix","connectNum","index1","index2","_h","a","r","g","b","huePrime","chroma","secondComponent","lightnessModification","v","vv","hh","ff","q","t","cells","txt"],"mappings":";;;;AACA,MAAMA,IAAQ,KAAK;AAYnB,SAASC,EAAcC,GAAKC,GAAU;AACpC,QAAMC,IAAQF,EAEb,QAAQ,gBAAgB,IAAI,EAE5B,QAAQ,QAAQ,EAAE,EAAE,MAAM,cAAc,KAAK,CAAA,GACxCG,IAAUD,EAAM,IAAI,CAAAE,MAAQ,WAAWA,CAAI,CAAC;AAClD,WAASC,IAAI,GAAGA,IAAI,GAAGA,KAAK;AAC1B,IAAAF,EAAQE,CAAC,IAAIJ,EAASE,EAAQE,CAAC,KAAK,GAAGH,EAAMG,CAAC,KAAK,IAAIA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,aAAK,IAAIjC,GACT,KAAK,IAAIgC;AACT;AAAA,MACF,KAAK;AACH,aAAK,IAAIC,GACT,KAAK,IAAIjC;AACT;AAAA,MAEF;AACE,aAAK,IAAIA,GACT,KAAK,IAAIgC;AACT;AAAA,IACR;AAAA,EACE;AAAA,EACA,cAAchD,GAAS;AACrB,UAAMkD,IAAQvE,EAAcqB,GAASd,CAAa;AAClD,SAAK,QAAQ;AAAA,MACX,GAAGgE,EAAM,CAAC;AAAA,MACV,GAAGA,EAAM,CAAC;AAAA,MACV,GAAGA,EAAM,CAAC;AAAA,MACV,GAAGA,EAAM,CAAC;AAAA,IAChB,CAAK;AAAA,EACH;AAAA,EACA,cAAclD,GAAS;AACrB,UAAMkD,IAAQvE,EAAcqB,GAASd,CAAa;AAClD,SAAK,QAAQ;AAAA,MACX,GAAGgE,EAAM,CAAC;AAAA,MACV,GAAGA,EAAM,CAAC;AAAA,MACV,GAAGA,EAAM,CAAC;AAAA,MACV,GAAGA,EAAM,CAAC;AAAA,IAChB,CAAK;AAAA,EACH;AAAA,EACA,cAAclD,GAAS;AACrB,UAAMkD,IAAQvE,EAAcqB,GAAS,CAACb,GAAKgE;AAAA;AAAA,MAE3CA,EAAI,SAAS,GAAG,IAAIzE,EAAMS,IAAM,MAAM,GAAG,IAAIA;AAAA,KAAG;AAChD,SAAK,IAAI+D,EAAM,CAAC,GAChB,KAAK,IAAIA,EAAM,CAAC,GAChB,KAAK,IAAIA,EAAM,CAAC,GAChB,KAAK,IAAIA,EAAM,CAAC;AAAA,EAClB;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
1
|
+
import a from "../../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
|
+
import * as i from "react";
|
|
3
3
|
import f from "../../../icons-svg/es/asn/FrownOutlined.js";
|
|
4
4
|
import s from "../components/AntdIcon.js";
|
|
5
5
|
function e() {
|
|
@@ -12,12 +12,9 @@ function e() {
|
|
|
12
12
|
return r;
|
|
13
13
|
}, e.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
const c = (r, n) => /* @__PURE__ */
|
|
15
|
+
const c = (r, n) => /* @__PURE__ */ i.createElement(s, e({}, r, {
|
|
16
16
|
ref: n,
|
|
17
17
|
icon: f
|
|
18
|
-
})), m = /* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
m as default
|
|
22
|
-
};
|
|
18
|
+
})), m = /* @__PURE__ */ i.forwardRef(c);
|
|
19
|
+
a.env.NODE_ENV !== "production" && (m.displayName = "FrownOutlined");
|
|
23
20
|
//# sourceMappingURL=FrownOutlined.js.map
|