mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
1 line
8.5 KiB
JavaScript
1 line
8.5 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["ebd3b314"],{"2d876d91":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return d;}});var r=l("f19d2b93");l("2af3f7e9");var t=l("a9d1a279");let n=e=>`${e}%`;var d=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.Slider,{tooltip:{formatter:n}}),(0,r.jsx)(t.Slider,{tooltip:{formatter:null}})]});},"30129e08":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return n;}});var r=l("f19d2b93");l("6a020bfe");var t=l("a9d1a279"),n=()=>(0,r.jsx)(t.Slider,{range:{draggableTrack:!0},defaultValue:[20,50]});},"51358d16":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return n;}});var r=l("f19d2b93");l("616a6d18");var t=l("a9d1a279"),n=()=>(0,r.jsx)(t.Slider,{defaultValue:30,tooltip:{open:!0}});},"52b15934":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return u;}});var r=l("f19d2b93");l("909ae6f4");var t=l("5b220c3d"),n=l("e22febe0"),d=l("a9d1a279");let s=e=>{let{max:a,min:l}=e,[s,u]=(0,t.useState)(0),i=Number(((a-l)/2).toFixed(5));return(0,r.jsxs)("div",{className:"icon-wrapper",children:[(0,r.jsx)(n.FrownOutlined,{className:s>=i?"":"icon-wrapper-active"}),(0,r.jsx)(d.Slider,{...e,onChange:u,value:s}),(0,r.jsx)(n.SmileOutlined,{className:s>=i?"icon-wrapper-active":""})]});};var u=()=>(0,r.jsx)(s,{min:0,max:20});},"603865ff":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return d;}});var r=l("f19d2b93");l("1d4273e3");var t=l("5b220c3d"),n=l("a9d1a279"),d=()=>{let[e,a]=(0,t.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Slider,{defaultValue:30,disabled:e}),(0,r.jsx)(n.Slider,{range:!0,defaultValue:[20,50],disabled:e}),"Disabled: ",(0,r.jsx)(n.Switch,{size:"small",checked:e,onChange:e=>{a(e);}})]});};},"773a0671":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return i;}});var r=l("777fffbe"),t=l("f19d2b93");l("2817c2cd");var n=l("a9d1a279"),d=r._(l("1164364c")),s=r._(l("23546486"));let u={cn:{track:"\u8303\u56F4\u9009\u62E9\u4E0B\uFF0C\u70B9\u548C\u70B9\u4E4B\u95F4\u5355\u4E2A\u9009\u53D6\u6761",tracks:"\u8303\u56F4\u9009\u62E9\u4E0B\uFF0C\u6574\u4E2A\u8303\u56F4\u9009\u53D6\u6761",rail:"\u80CC\u666F\u6761\u5143\u7D20",handle:"\u6293\u53D6\u70B9\u5143\u7D20"},en:{track:"The selection bar between points and points under the range selection",tracks:"The entire range selection bar under the range selection",rail:"Background rail element",handle:"Grab handle element"}};var i=()=>{let[e]=(0,s.default)(u);return(0,t.jsx)(d.default,{semantics:[{name:"track",desc:e.track,version:"5.10.0"},{name:"tracks",desc:e.tracks,version:"5.10.0"},{name:"rail",desc:e.rail,version:"5.10.0"},{name:"handle",desc:e.handle,version:"5.10.0"}],children:(0,t.jsx)(n.Slider,{range:!0,defaultValue:[20,30,50],style:{width:"100%"}})});};},"8e046b1c":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return s;}});var r=l("f19d2b93");l("3a3ea101");var t=l("a9d1a279");let n={display:"inline-block",height:300,marginInlineStart:70},d={0:"0\xb0C",26:"26\xb0C",37:"37\xb0C",100:{style:{color:"#f50"},label:(0,r.jsx)("strong",{children:"100\xb0C"})}};var s=()=>(0,r.jsxs)(t.ConfigProvider,{theme:{components:{Slider:{controlSize:20,railSize:4,handleSize:22,handleSizeHover:18,dotSize:8,handleLineWidth:6,handleLineWidthHover:2,railBg:"#9f3434",railHoverBg:"#8d2424",trackBg:"#b0b0ef",trackHoverBg:"#c77195",handleColor:"#e6f6a2",handleActiveColor:"#d22bc4",dotBorderColor:"#303030",dotActiveBorderColor:"#918542",trackBgDisabled:"#1a1b80"}}},children:[(0,r.jsx)(t.Slider,{defaultValue:30,disabled:!0}),(0,r.jsx)(t.Slider,{range:{draggableTrack:!0},defaultValue:[20,50]}),(0,r.jsx)("div",{style:n,children:(0,r.jsx)(t.Slider,{vertical:!0,defaultValue:30})}),(0,r.jsx)("div",{style:n,children:(0,r.jsx)(t.Slider,{vertical:!0,range:!0,step:10,defaultValue:[20,50]})}),(0,r.jsx)("div",{style:n,children:(0,r.jsx)(t.Slider,{vertical:!0,range:!0,marks:d,defaultValue:[26,37]})})]});},"9a1d85a7":function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return u;}});var r=l("f19d2b93");l("ea933a00");var t=l("5b220c3d"),n=l("a9d1a279");let d=()=>{let[e,a]=(0,t.useState)(1),l=e=>{a(e);};return(0,r.jsxs)(n.Row,{children:[(0,r.jsx)(n.Col,{span:12,children:(0,r.jsx)(n.Slider,{min:1,max:20,onChange:l,value:"number"==typeof e?e:0})}),(0,r.jsx)(n.Col,{span:4,children:(0,r.jsx)(n.InputNumber,{min:1,max:20,style:{margin:"0 16px"},value:e,onChange:l})})]});},s=()=>{let[e,a]=(0,t.useState)(0),l=e=>{Number.isNaN(e)||a(e);};return(0,r.jsxs)(n.Row,{children:[(0,r.jsx)(n.Col,{span:12,children:(0,r.jsx)(n.Slider,{min:0,max:1,onChange:l,value:"number"==typeof e?e:0,step:.01})}),(0,r.jsx)(n.Col,{span:4,children:(0,r.jsx)(n.InputNumber,{min:0,max:1,style:{margin:"0 16px"},step:.01,value:e,onChange:l})})]});};var u=()=>(0,r.jsxs)(n.Space,{style:{width:"100%"},direction:"vertical",children:[(0,r.jsx)(d,{}),(0,r.jsx)(s,{})]});},b0096155:function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return u;}});var r=l("777fffbe"),t=l("f19d2b93");l("97cf9820");var n=r._(l("5b220c3d")),d=l("a9d1a279");function s(e){let a=[255,204,199],l=[135,208,104].map((l,r)=>(l+(a[r]-l)*e).toFixed(0));return`rgb(${l.join(",")})`;}var u=()=>{let[e,a]=n.default.useState([0,10,20]),l=e[0]/100,r=e[e.length-1]/100;return(0,t.jsx)(d.Slider,{range:!0,defaultValue:e,onChange:a,styles:{track:{background:"transparent"},tracks:{background:`linear-gradient(to right, ${s(l)} 0%, ${s(r)} 100%)`}}});};},c4f22dd2:function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return s;}});var r=l("f19d2b93");l("1f129db1");var t=l("a9d1a279");let n=e=>{console.log("onChange: ",e);},d=e=>{console.log("onChangeComplete: ",e);};var s=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.Slider,{defaultValue:30,onChange:n,onChangeComplete:d}),(0,r.jsx)(t.Slider,{range:!0,step:10,defaultValue:[20,50],onChange:n,onChangeComplete:d})]});},de059d2d:function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return s;}});var r=l("777fffbe"),t=l("f19d2b93");l("f749f928");var n=r._(l("5b220c3d")),d=l("a9d1a279"),s=()=>{let[e,a]=n.default.useState([20,80]);return(0,t.jsx)(d.Slider,{range:{editable:!0,minCount:1,maxCount:5},value:e,onChange:a});};},e63957cf:function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return s;}});var r=l("f19d2b93");l("1e3152e7");var t=l("a9d1a279");let n={display:"inline-block",height:300,marginInlineStart:70},d={0:"0\xb0C",26:"26\xb0C",37:"37\xb0C",100:{style:{color:"#f50"},label:(0,r.jsx)("strong",{children:"100\xb0C"})}};var s=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:n,children:(0,r.jsx)(t.Slider,{vertical:!0,defaultValue:30})}),(0,r.jsx)("div",{style:n,children:(0,r.jsx)(t.Slider,{vertical:!0,range:!0,step:10,defaultValue:[20,50]})}),(0,r.jsx)("div",{style:n,children:(0,r.jsx)(t.Slider,{vertical:!0,range:!0,marks:d,defaultValue:[26,37]})})]});},ea954af9:function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return d;}});var r=l("f19d2b93");l("513ba9b7");var t=l("a9d1a279");let n={0:"0\xb0C",26:"26\xb0C",37:"37\xb0C",100:{style:{color:"#f50"},label:(0,r.jsx)("strong",{children:"100\xb0C"})}};var d=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h4",{children:"included=true"}),(0,r.jsx)(t.Slider,{marks:n,defaultValue:37}),(0,r.jsx)(t.Slider,{range:!0,marks:n,defaultValue:[26,37]}),(0,r.jsx)("h4",{children:"included=false"}),(0,r.jsx)(t.Slider,{marks:n,included:!1,defaultValue:37}),(0,r.jsx)("h4",{children:"marks & step"}),(0,r.jsx)(t.Slider,{marks:n,step:10,defaultValue:37}),(0,r.jsx)("h4",{children:"step=null"}),(0,r.jsx)(t.Slider,{marks:n,step:null,defaultValue:37})]});},f10729f1:function(e,a,l){"use strict";l.d(a,"__esModule",{value:!0}),l.d(a,"default",{enumerable:!0,get:function(){return d;}});var r=l("f19d2b93");l("246eed01");var t=l("5b220c3d"),n=l("a9d1a279"),d=()=>{let[e,a]=(0,t.useState)(!0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Slider,{defaultValue:30,reverse:e}),(0,r.jsx)(n.Slider,{range:!0,defaultValue:[20,50],reverse:e}),"Reversed: ",(0,r.jsx)(n.Switch,{size:"small",checked:e,onChange:a})]});};}}]); |