1 line
7.4 KiB
JSON
1 line
7.4 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nimport React from 'react';\nimport Divider from '../divider';\nimport PanelPicker from './components/PanelPicker';\nimport PanelPresets from './components/PanelPresets';\nimport { PanelPickerContext, PanelPresetsContext } from './context';\nconst ColorPickerPanel = props => {\n const {\n prefixCls,\n presets,\n panelRender,\n value,\n onChange,\n onClear,\n allowClear,\n disabledAlpha,\n mode,\n onModeChange,\n modeOptions,\n onChangeComplete,\n activeIndex,\n onActive,\n format,\n onFormatChange,\n gradientDragging,\n onGradientDragging\n } = props;\n const colorPickerPanelPrefixCls = `${prefixCls}-inner`;\n // ===================== Context ======================\n const panelContext = React.useMemo(() => ({\n prefixCls,\n value,\n onChange,\n onClear,\n allowClear,\n disabledAlpha,\n mode,\n onModeChange,\n modeOptions,\n onChangeComplete,\n activeIndex,\n onActive,\n format,\n onFormatChange,\n gradientDragging,\n onGradientDragging\n }), [prefixCls, value, onChange, onClear, allowClear, disabledAlpha, mode, onModeChange, modeOptions, onChangeComplete, activeIndex, onActive, format, onFormatChange, gradientDragging, onGradientDragging]);\n const presetContext = React.useMemo(() => ({\n prefixCls,\n value,\n presets,\n onChange\n }), [prefixCls, value, presets, onChange]);\n // ====================== Render ======================\n const innerPanel = /*#__PURE__*/React.createElement(\"div\", {\n className: `${colorPickerPanelPrefixCls}-content`\n }, /*#__PURE__*/React.createElement(PanelPicker, null), Array.isArray(presets) && /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(PanelPresets, null));\n return /*#__PURE__*/React.createElement(PanelPickerContext.Provider, {\n value: panelContext\n }, /*#__PURE__*/React.createElement(PanelPresetsContext.Provider, {\n value: presetContext\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: colorPickerPanelPrefixCls\n }, typeof panelRender === 'function' ? panelRender(innerPanel, {\n components: {\n Picker: PanelPicker,\n Presets: PanelPresets\n }\n }) : innerPanel)));\n};\nif (process.env.NODE_ENV !== 'production') {\n ColorPickerPanel.displayName = 'ColorPickerPanel';\n}\nexport default ColorPickerPanel;","map":{"version":3,"names":["React","Divider","PanelPicker","PanelPresets","PanelPickerContext","PanelPresetsContext","ColorPickerPanel","props","prefixCls","presets","panelRender","value","onChange","onClear","allowClear","disabledAlpha","mode","onModeChange","modeOptions","onChangeComplete","activeIndex","onActive","format","onFormatChange","gradientDragging","onGradientDragging","colorPickerPanelPrefixCls","panelContext","useMemo","presetContext","innerPanel","createElement","className","Array","isArray","Provider","components","Picker","Presets","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/color-picker/ColorPickerPanel.js"],"sourcesContent":["\"use client\";\n\nimport React from 'react';\nimport Divider from '../divider';\nimport PanelPicker from './components/PanelPicker';\nimport PanelPresets from './components/PanelPresets';\nimport { PanelPickerContext, PanelPresetsContext } from './context';\nconst ColorPickerPanel = props => {\n const {\n prefixCls,\n presets,\n panelRender,\n value,\n onChange,\n onClear,\n allowClear,\n disabledAlpha,\n mode,\n onModeChange,\n modeOptions,\n onChangeComplete,\n activeIndex,\n onActive,\n format,\n onFormatChange,\n gradientDragging,\n onGradientDragging\n } = props;\n const colorPickerPanelPrefixCls = `${prefixCls}-inner`;\n // ===================== Context ======================\n const panelContext = React.useMemo(() => ({\n prefixCls,\n value,\n onChange,\n onClear,\n allowClear,\n disabledAlpha,\n mode,\n onModeChange,\n modeOptions,\n onChangeComplete,\n activeIndex,\n onActive,\n format,\n onFormatChange,\n gradientDragging,\n onGradientDragging\n }), [prefixCls, value, onChange, onClear, allowClear, disabledAlpha, mode, onModeChange, modeOptions, onChangeComplete, activeIndex, onActive, format, onFormatChange, gradientDragging, onGradientDragging]);\n const presetContext = React.useMemo(() => ({\n prefixCls,\n value,\n presets,\n onChange\n }), [prefixCls, value, presets, onChange]);\n // ====================== Render ======================\n const innerPanel = /*#__PURE__*/React.createElement(\"div\", {\n className: `${colorPickerPanelPrefixCls}-content`\n }, /*#__PURE__*/React.createElement(PanelPicker, null), Array.isArray(presets) && /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(PanelPresets, null));\n return /*#__PURE__*/React.createElement(PanelPickerContext.Provider, {\n value: panelContext\n }, /*#__PURE__*/React.createElement(PanelPresetsContext.Provider, {\n value: presetContext\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: colorPickerPanelPrefixCls\n }, typeof panelRender === 'function' ? panelRender(innerPanel, {\n components: {\n Picker: PanelPicker,\n Presets: PanelPresets\n }\n }) : innerPanel)));\n};\nif (process.env.NODE_ENV !== 'production') {\n ColorPickerPanel.displayName = 'ColorPickerPanel';\n}\nexport default ColorPickerPanel;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,WAAW,MAAM,0BAA0B;AAClD,OAAOC,YAAY,MAAM,2BAA2B;AACpD,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,WAAW;AACnE,MAAMC,gBAAgB,GAAGC,KAAK,IAAI;EAChC,MAAM;IACJC,SAAS;IACTC,OAAO;IACPC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,IAAI;IACJC,YAAY;IACZC,WAAW;IACXC,gBAAgB;IAChBC,WAAW;IACXC,QAAQ;IACRC,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC;EACF,CAAC,GAAGlB,KAAK;EACT,MAAMmB,yBAAyB,GAAG,GAAGlB,SAAS,QAAQ;EACtD;EACA,MAAMmB,YAAY,GAAG3B,KAAK,CAAC4B,OAAO,CAAC,OAAO;IACxCpB,SAAS;IACTG,KAAK;IACLC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,IAAI;IACJC,YAAY;IACZC,WAAW;IACXC,gBAAgB;IAChBC,WAAW;IACXC,QAAQ;IACRC,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC;EACF,CAAC,CAAC,E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