@oliasoft-open-source/react-ui-library 4.11.2-beta-2 → 4.11.2-beta-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/global.css +14 -12
- package/dist/index.js +20 -23
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/Color-KGDBMAHA-BU5Cvr93.js +1 -0
- package/dist/storybook/assets/DocsRenderer-PKQXORMH-giM41WN8.js +1 -0
- package/dist/storybook/assets/{accordion-6ouB0WTt.js → accordion-BiuI_LCA.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-DtRR01fE.js → accordion.stories-BlHfHegj.js} +2 -2
- package/dist/storybook/assets/{actions-KLRbmKRF.js → actions-Bax0KeqM.js} +1 -1
- package/dist/storybook/assets/{actions.stories-C23gWRWM.js → actions.stories-BnPZKqOJ.js} +1 -1
- package/dist/storybook/assets/{afe.stories-BS17Wy3X.js → afe.stories-C9XjJj62.js} +2 -2
- package/dist/storybook/assets/{badge.stories-DU2dncNt.js → badge.stories-DA_eeQyi.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-Cylh2TXs.js → blowout.stories-DH-sYHgB.js} +1 -1
- package/dist/storybook/assets/{button-CjbZ5CrF.js → button-Cbv7WK6k.js} +1 -1
- package/dist/storybook/assets/{button-group-DubmMwSS.js → button-group-D2fGP_bX.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-PQ9lcPIH.js → button-group.stories-BETADGti.js} +1 -1
- package/dist/storybook/assets/{button.stories-DKC1fejY.js → button.stories-C03VvX8K.js} +2 -2
- package/dist/storybook/assets/{buttons-and-links-wxWmkOUF.js → buttons-and-links-BA3MNFjq.js} +2 -2
- package/dist/storybook/assets/{card.stories-Bn6LpucB.js → card.stories-CsTB0DuM.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-DfN1h9Nf.js → casing-loads.stories-Cl2tJipP.js} +2 -2
- package/dist/storybook/assets/{cell.stories-CreKyw65.js → cell.stories-rzJE_qJC.js} +2 -2
- package/dist/storybook/assets/{check-box-wCvXxtCz.js → check-box-DPLaOkRR.js} +1 -1
- package/dist/storybook/assets/{check-box.stories-nJkLcHZb.js → check-box.stories-BJ0ShmeC.js} +1 -1
- package/dist/storybook/assets/{check-box.test-case.stories-B2vjtKjR.js → check-box.test-case.stories-CzuYZkUh.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-CEGdiTjE.js → chunk-HLWAVYOI-Dvbg03uT.js} +1 -1
- package/dist/storybook/assets/color-DIyQ13kP.js +25 -0
- package/dist/storybook/assets/{column.stories-DATtbLrP.js → column.stories-DDTHFELF.js} +1 -1
- package/dist/storybook/assets/{dialog-B-Q5su6I.js → dialog-DkpQscuI.js} +1 -1
- package/dist/storybook/assets/{drawer-X4ZJ2aZ0.js → drawer-DaQ1xGjV.js} +1 -1
- package/dist/storybook/assets/drawer.stories-C08XBVTq.js +113 -0
- package/dist/storybook/assets/{empty.stories-CYf8-mRm.js → empty.stories-L7LSMcLe.js} +1 -1
- package/dist/storybook/assets/{field-C5_fLDpy.js → field-HrLaMLbx.js} +1 -1
- package/dist/storybook/assets/{field.stories-DW0W89lR.js → field.stories-CYpQ669-.js} +1 -1
- package/dist/storybook/assets/{file-button.stories-C_GvNiIi.js → file-button.stories-CRaTdLfv.js} +1 -1
- package/dist/storybook/assets/{file-input-BAwHZe0n.js → file-input-yalPf7-m.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-DYXTB7gQ.js → file-input.stories-DMTQqAF8.js} +1 -1
- package/dist/storybook/assets/{flex.stories-DkN6INc7.js → flex.stories-CLwPyEMp.js} +1 -1
- package/dist/storybook/assets/footer.stories-C6M5S0UZ.js +3 -0
- package/dist/storybook/assets/form.stories-BNORsn6Z.js +49 -0
- package/dist/storybook/assets/formation.stories-1WX1Nu1P.js +74 -0
- package/dist/storybook/assets/{heading-NkLgQYoP.js → heading-CRNoBc7q.js} +1 -1
- package/dist/storybook/assets/{heading.stories-nI_cFnAN.js → heading.stories-DahFxeiX.js} +1 -1
- package/dist/storybook/assets/{help-icon-41R-Z9N1.js → help-icon-Buhx5nl6.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-DBYh0YX7.js → help-icon.stories-DbmZ1fgP.js} +1 -1
- package/dist/storybook/assets/icon-BSFY3vDO.js +8 -0
- package/dist/storybook/assets/{icon.stories-C4pR7xky.js → icon.stories-fnZUR-LK.js} +1 -1
- package/dist/storybook/assets/iframe-B0e2q2Zd.js +2 -0
- package/dist/storybook/assets/index-BXJ79Lvz.js +1 -0
- package/dist/storybook/assets/{index-D4ghw39u.js → index-BlyDuQBv.js} +8 -8
- package/dist/storybook/assets/{index.es-D2piFfFj.js → index.es-DazXb-ul.js} +4 -4
- package/dist/storybook/assets/inheritsLoose-DP0QEDDI.js +1 -0
- package/dist/storybook/assets/{initialize-context-rEvM6bdZ.js → initialize-context-Y03pJPr5.js} +1 -1
- package/dist/storybook/assets/{input-group.stories-Ddz8LT4X.js → input-group.stories-BCajsqAk.js} +2 -2
- package/dist/storybook/assets/{input-validation-CuPnRCxY.js → input-validation-CLZKtfoW.js} +2 -2
- package/dist/storybook/assets/{inputs-CTDqn8NT.js → inputs-DlW6Jeem.js} +2 -2
- package/dist/storybook/assets/{label-hiSz3I8H.js → label-CqmyC9he.js} +1 -1
- package/dist/storybook/assets/{label.stories-Cyv5jBAO.js → label.stories-C0AO5F1a.js} +1 -1
- package/dist/storybook/assets/layout-forms-C6ZH-nYk.js +16 -0
- package/dist/storybook/assets/{layout-general-BDvvrYSA.js → layout-general-CWqOMwXA.js} +2 -2
- package/dist/storybook/assets/{list-BuGEbcVL.js → list-By3wp5Wa.js} +1 -1
- package/dist/storybook/assets/{list.stories-B5c_uQGt.js → list.stories-BcDHHHYJ.js} +2 -2
- package/dist/storybook/assets/{list.stories-data-8Z0neBbX.js → list.stories-data-Doo2Rqun.js} +1 -1
- package/dist/storybook/assets/{loader.stories-CNWIIZ6E.js → loader.stories-Q0U2BqZX.js} +1 -1
- package/dist/storybook/assets/{menu.stories-BdTFPm_7.js → menu.stories-1I5AGGQx.js} +2 -2
- package/dist/storybook/assets/{menu.test-case.stories-CSHeRTes.js → menu.test-case.stories-XN9XFV-D.js} +1 -1
- package/dist/storybook/assets/{message-y9kZ5iw6.js → message-BRyKdRaX.js} +1 -1
- package/dist/storybook/assets/{message.stories-B7RGjzak.js → message.stories-bCqCYIuN.js} +1 -1
- package/dist/storybook/assets/{meta-content-CDd9TzY4.js → meta-content-DNgQbAW0.js} +1 -1
- package/dist/storybook/assets/{modal.stories-DZi9oABL.js → modal.stories-C2d-Em5V.js} +2 -2
- package/dist/storybook/assets/{modal.test-case.stories-BEw1SVN7.js → modal.test-case.stories-Ci1WRYdo.js} +1 -1
- package/dist/storybook/assets/{number-input-CNnU6gOF.js → number-input-B3_gmeWr.js} +1 -1
- package/dist/storybook/assets/{number-input.stories-Bo26PJmJ.js → number-input.stories-epjUq9ve.js} +1 -1
- package/dist/storybook/assets/number-input.test-case.stories-DeEtalIU.js +95 -0
- package/dist/storybook/assets/{option-dropdown.stories-B1pkizRG.js → option-dropdown.stories-CznUbXVi.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-mPE53XO4.js → padding-and-spacing-CfnXk0Zn.js} +2 -2
- package/dist/storybook/assets/{page.stories-Zuw5G3Q1.js → page.stories-DthnK8qb.js} +1 -1
- package/dist/storybook/assets/{pagination-CiGr3h9N.js → pagination-CR1nxnnq.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-Dd2mM2qz.js → pagination.stories-qXmBYwYc.js} +2 -2
- package/dist/storybook/assets/{pop-confirm.stories-DiPq3JCu.js → pop-confirm.stories-CHa0qUBe.js} +1 -1
- package/dist/storybook/assets/{popover-C9ygeajM.js → popover-C_2P8LFJ.js} +1 -1
- package/dist/storybook/assets/popover.stories-DZTfimDf.js +10 -0
- package/dist/storybook/assets/preview-b9pkIJl_.js +2 -0
- package/dist/storybook/assets/{preview-orqWJ2ST.js → preview-jWpKVqju.js} +2 -2
- package/dist/storybook/assets/projects.stories-BPm6ucAe.js +47 -0
- package/dist/storybook/assets/{radio-button-C3RuBqEf.js → radio-button-C4ljBRED.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-B0KZMz4B.js → radio-button.stories-D1rWr6ms.js} +1 -1
- package/dist/storybook/assets/{radio-button.test-case.stories-BwUah-6O.js → radio-button.test-case.stories-DglmHlWs.js} +1 -1
- package/dist/storybook/assets/react-router-dom-Ck2Y_Fzc.js +8 -0
- package/dist/storybook/assets/{reservoirs.stories-CDD0TjSy.js → reservoirs.stories-r1Ip90kJ.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-D1j_y7V_.js → rich-text-input.stories-DwaseXZv.js} +3 -3
- package/dist/storybook/assets/{row.stories-DB38kAZL.js → row.stories-DRvH8Grn.js} +2 -2
- package/dist/storybook/assets/{select-B3sB0hqr.js → select-Cwks-WA0.js} +2 -2
- package/dist/storybook/assets/{select.stories-BSoB4ldP.js → select.stories-DjGSNDXK.js} +2 -2
- package/dist/storybook/assets/{select.stories-data-BEF6nqsN.js → select.stories-data-DxgWKlU6.js} +1 -1
- package/dist/storybook/assets/select.test-case.stories-CrXzt4qn.js +82 -0
- package/dist/storybook/assets/{side-bar-D2164Tn-.js → side-bar-wpFQ5NEE.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-E0tQZmAY.js → side-bar.stories-LjClxJcG.js} +1 -1
- package/dist/storybook/assets/{site.stories-Dmk01rYh.js → site.stories-BnWmALGd.js} +2 -2
- package/dist/storybook/assets/slider-CcpE4BLD.js +27 -0
- package/dist/storybook/assets/{slider-DPdTVMP0.css → slider-DnRddBCy.css} +1 -1
- package/dist/storybook/assets/slider.stories-BqlRLY_C.js +171 -0
- package/dist/storybook/assets/{smart-upload-modal.stories-CUln0bMR.js → smart-upload-modal.stories-BlTSF64K.js} +1 -1
- package/dist/storybook/assets/{spacer.stories-BVuZoGQG.js → spacer.stories-BT2S6B0R.js} +1 -1
- package/dist/storybook/assets/{table-Bl5BWKeT.js → table-DoyDBG6l.js} +1 -1
- package/dist/storybook/assets/{table.stories-CqW7dMju.js → table.stories-BgWKzIob.js} +2 -2
- package/dist/storybook/assets/{table.stories-data-CElcAZ7Y.js → table.stories-data-C7mC5R8Q.js} +1 -1
- package/dist/storybook/assets/text-link.stories-BQAkVO-W.js +14 -0
- package/dist/storybook/assets/{title.stories-HWf-jbB_.js → title.stories-Rv6ZO_Wl.js} +2 -2
- package/dist/storybook/assets/{toaster-BMWF3yRW.js → toaster-O8ftrUAJ.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-shnom1S1.js → toaster.stories-CdpwLBSo.js} +1 -1
- package/dist/storybook/assets/{toaster.test-case.stories-BndtbjCb.js → toaster.test-case.stories-Cy3_Gvs_.js} +1 -1
- package/dist/storybook/assets/{toggle-C0zvrIOF.js → toggle-BbFVf61v.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-HIP6dA5T.js → toggle.stories-BAislK3I.js} +1 -1
- package/dist/storybook/assets/{toggle.test-case.stories-SLhE2A5P.js → toggle.test-case.stories-CeUwdhGD.js} +1 -1
- package/dist/storybook/assets/{tooltip.test-case.stories-B_zX5FCQ.js → tooltip.test-case.stories-De9h8ThH.js} +1 -1
- package/dist/storybook/assets/{top-bar-4AZm07Mc.js → top-bar-Bjf6PQE1.js} +1 -1
- package/dist/storybook/assets/top-bar.stories-1hZmlzDT.js +21 -0
- package/dist/storybook/assets/{top-bar.testcase.stories-DN3MQDLk.js → top-bar.testcase.stories-BsFYqaw6.js} +1 -1
- package/dist/storybook/assets/{tree.stories-0qtpSom_.js → tree.stories-NGZfmH_B.js} +1 -1
- package/dist/storybook/assets/{unit-input-BGnD9Z8O.js → unit-input-BXg4VphV.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-CGRypKCW.js → unit-input.stories-Btz2M_TP.js} +1 -1
- package/dist/storybook/assets/unit-input.test-case.stories-CZD1jf36.js +220 -0
- package/dist/storybook/assets/unit-table.stories-CISvZMxX.js +152 -0
- package/dist/storybook/assets/unit-table.test-case.stories-tEype9om.js +1 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/Color-KGDBMAHA-Bqds5h8Z.js +0 -1
- package/dist/storybook/assets/DocsRenderer-PKQXORMH-DCqVP8-K.js +0 -1
- package/dist/storybook/assets/color-BQwVduH-.js +0 -25
- package/dist/storybook/assets/drawer.stories-Di0z4mQf.js +0 -113
- package/dist/storybook/assets/extends-CF3RwP-h.js +0 -1
- package/dist/storybook/assets/footer.stories-BGYrbMcS.js +0 -3
- package/dist/storybook/assets/form.stories-QcF3dSbt.js +0 -49
- package/dist/storybook/assets/formation.stories-DnQfJcH1.js +0 -74
- package/dist/storybook/assets/icon-BP4BO6-k.js +0 -8
- package/dist/storybook/assets/iframe-DzDQhvl_.js +0 -2
- package/dist/storybook/assets/index-DO2UUQkG.js +0 -1
- package/dist/storybook/assets/inheritsLoose-DR8r8Ogv.js +0 -1
- package/dist/storybook/assets/layout-forms-BNzU7smr.js +0 -16
- package/dist/storybook/assets/number-input.test-case.stories-noFGMaR2.js +0 -92
- package/dist/storybook/assets/popover.stories-BjQWHpS3.js +0 -10
- package/dist/storybook/assets/preview-SSh22Coz.js +0 -2
- package/dist/storybook/assets/projects.stories-Rn2Q-yAl.js +0 -47
- package/dist/storybook/assets/react-router-dom-CMITYWBH.js +0 -8
- package/dist/storybook/assets/select.test-case.stories-trBjoExl.js +0 -82
- package/dist/storybook/assets/slider-CSesKEJF.js +0 -27
- package/dist/storybook/assets/slider.stories-CX-hT1FF.js +0 -134
- package/dist/storybook/assets/text-link.stories-BsuVBOWo.js +0 -14
- package/dist/storybook/assets/top-bar.stories-DbuzGzjw.js +0 -21
- package/dist/storybook/assets/unit-input.test-case.stories-fGxudkap.js +0 -220
- package/dist/storybook/assets/unit-table.stories-BqLmWCPl.js +0 -152
- package/dist/storybook/assets/unit-table.test-case.stories-DgT7qcpi.js +0 -1
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{_ as V}from"./inheritsLoose-DR8r8Ogv.js";import{g as st,R as w}from"./index-DhsZuJvc.js";import{P as Be}from"./index-CEuq6vkz.js";import{_ as F}from"./extends-CF3RwP-h.js";import{i as Y}from"./tiny-invariant-DqLgxztJ.js";import{_ as ce}from"./objectWithoutPropertiesLoose-CAYKN5F1.js";function ie(e){return e.charAt(0)==="/"}function Pe(e,t){for(var i=t,r=i+1,n=e.length;r<n;i+=1,r+=1)e[i]=e[r];e.pop()}function ct(e,t){t===void 0&&(t="");var i=e&&e.split("/")||[],r=t&&t.split("/")||[],n=e&&ie(e),o=t&&ie(t),u=n||o;if(e&&ie(e)?r=i:i.length&&(r.pop(),r=r.concat(i)),!r.length)return"/";var c;if(r.length){var l=r[r.length-1];c=l==="."||l===".."||l===""}else c=!1;for(var a=0,s=r.length;s>=0;s--){var f=r[s];f==="."?Pe(r,s):f===".."?(Pe(r,s),a++):a&&(Pe(r,s),a--)}if(!u)for(;a--;a)r.unshift("..");u&&r[0]!==""&&(!r[0]||!ie(r[0]))&&r.unshift("");var h=r.join("/");return c&&h.substr(-1)!=="/"&&(h+="/"),h}function re(e){return e.charAt(0)==="/"?e:"/"+e}function Ne(e){return e.charAt(0)==="/"?e.substr(1):e}function ut(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function Qe(e,t){return ut(e,t)?e.substr(t.length):e}function Ye(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function ft(e){var t=e||"/",i="",r="",n=t.indexOf("#");n!==-1&&(r=t.substr(n),t=t.substr(0,n));var o=t.indexOf("?");return o!==-1&&(i=t.substr(o),t=t.substr(0,o)),{pathname:t,search:i==="?"?"":i,hash:r==="#"?"":r}}function B(e){var t=e.pathname,i=e.search,r=e.hash,n=t||"/";return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function W(e,t,i,r){var n;typeof e=="string"?(n=ft(e),n.state=t):(n=F({},e),n.pathname===void 0&&(n.pathname=""),n.search?n.search.charAt(0)!=="?"&&(n.search="?"+n.search):n.search="",n.hash?n.hash.charAt(0)!=="#"&&(n.hash="#"+n.hash):n.hash="",t!==void 0&&n.state===void 0&&(n.state=t));try{n.pathname=decodeURI(n.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+n.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):o}return i&&(n.key=i),r?n.pathname?n.pathname.charAt(0)!=="/"&&(n.pathname=ct(n.pathname,r.pathname)):n.pathname=r.pathname:n.pathname||(n.pathname="/"),n}function Ae(){var e=null;function t(u){return e=u,function(){e===u&&(e=null)}}function i(u,c,l,a){if(e!=null){var s=typeof e=="function"?e(u,c):e;typeof s=="string"?typeof l=="function"?l(s,a):a(!0):a(s!==!1)}else a(!0)}var r=[];function n(u){var c=!0;function l(){c&&u.apply(void 0,arguments)}return r.push(l),function(){c=!1,r=r.filter(function(a){return a!==l})}}function o(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];r.forEach(function(a){return a.apply(void 0,c)})}return{setPrompt:t,confirmTransitionTo:i,appendListener:n,notifyListeners:o}}var Ze=!!(typeof window<"u"&&window.document&&window.document.createElement);function ke(e,t){t(window.confirm(e))}function lt(){var e=window.navigator.userAgent;return(e.indexOf("Android 2.")!==-1||e.indexOf("Android 4.0")!==-1)&&e.indexOf("Mobile Safari")!==-1&&e.indexOf("Chrome")===-1&&e.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function ht(){return window.navigator.userAgent.indexOf("Trident")===-1}function pt(){return window.navigator.userAgent.indexOf("Firefox")===-1}function vt(e){return e.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var je="popstate",We="hashchange";function Fe(){try{return window.history.state||{}}catch{return{}}}function dt(e){e===void 0&&(e={}),Ze||Y();var t=window.history,i=lt(),r=!ht(),n=e,o=n.forceRefresh,u=o===void 0?!1:o,c=n.getUserConfirmation,l=c===void 0?ke:c,a=n.keyLength,s=a===void 0?6:a,f=e.basename?Ye(re(e.basename)):"";function h(d){var p=d||{},x=p.key,m=p.state,C=window.location,U=C.pathname,j=C.search,G=C.hash,z=U+j+G;return f&&(z=Qe(z,f)),W(z,m,x)}function v(){return Math.random().toString(36).substr(2,s)}var g=Ae();function E(d){F(q,d),q.length=t.length,g.notifyListeners(q.location,q.action)}function S(d){vt(d)||_(h(d.state))}function A(){_(h(Fe()))}var O=!1;function _(d){if(O)O=!1,E();else{var p="POP";g.confirmTransitionTo(d,p,l,function(x){x?E({action:p,location:d}):D(d)})}}function D(d){var p=q.location,x=T.indexOf(p.key);x===-1&&(x=0);var m=T.indexOf(d.key);m===-1&&(m=0);var C=x-m;C&&(O=!0,R(C))}var H=h(Fe()),T=[H.key];function y(d){return f+B(d)}function P(d,p){var x="PUSH",m=W(d,p,v(),q.location);g.confirmTransitionTo(m,x,l,function(C){if(C){var U=y(m),j=m.key,G=m.state;if(i)if(t.pushState({key:j,state:G},null,U),u)window.location.href=U;else{var z=T.indexOf(q.location.key),Q=T.slice(0,z+1);Q.push(m.key),T=Q,E({action:x,location:m})}else window.location.href=U}})}function M(d,p){var x="REPLACE",m=W(d,p,v(),q.location);g.confirmTransitionTo(m,x,l,function(C){if(C){var U=y(m),j=m.key,G=m.state;if(i)if(t.replaceState({key:j,state:G},null,U),u)window.location.replace(U);else{var z=T.indexOf(q.location.key);z!==-1&&(T[z]=m.key),E({action:x,location:m})}else window.location.replace(U)}})}function R(d){t.go(d)}function L(){R(-1)}function J(){R(1)}var X=0;function N(d){X+=d,X===1&&d===1?(window.addEventListener(je,S),r&&window.addEventListener(We,A)):X===0&&(window.removeEventListener(je,S),r&&window.removeEventListener(We,A))}var I=!1;function Z(d){d===void 0&&(d=!1);var p=g.setPrompt(d);return I||(N(1),I=!0),function(){return I&&(I=!1,N(-1)),p()}}function we(d){var p=g.appendListener(d);return N(1),function(){N(-1),p()}}var q={length:t.length,action:"POP",location:H,createHref:y,push:P,replace:M,go:R,goBack:L,goForward:J,block:Z,listen:we};return q}var Ke="hashchange",mt={hashbang:{encodePath:function(t){return t.charAt(0)==="!"?t:"!/"+Ne(t)},decodePath:function(t){return t.charAt(0)==="!"?t.substr(1):t}},noslash:{encodePath:Ne,decodePath:re},slash:{encodePath:re,decodePath:re}};function et(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function ne(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)}function gt(e){window.location.hash=e}function be(e){window.location.replace(et(window.location.href)+"#"+e)}function yt(e){e===void 0&&(e={}),Ze||Y();var t=window.history;pt();var i=e,r=i.getUserConfirmation,n=r===void 0?ke:r,o=i.hashType,u=o===void 0?"slash":o,c=e.basename?Ye(re(e.basename)):"",l=mt[u],a=l.encodePath,s=l.decodePath;function f(){var p=s(ne());return c&&(p=Qe(p,c)),W(p)}var h=Ae();function v(p){F(d,p),d.length=t.length,h.notifyListeners(d.location,d.action)}var g=!1,E=null;function S(p,x){return p.pathname===x.pathname&&p.search===x.search&&p.hash===x.hash}function A(){var p=ne(),x=a(p);if(p!==x)be(x);else{var m=f(),C=d.location;if(!g&&S(C,m)||E===B(m))return;E=null,O(m)}}function O(p){if(g)g=!1,v();else{var x="POP";h.confirmTransitionTo(p,x,n,function(m){m?v({action:x,location:p}):_(p)})}}function _(p){var x=d.location,m=y.lastIndexOf(B(x));m===-1&&(m=0);var C=y.lastIndexOf(B(p));C===-1&&(C=0);var U=m-C;U&&(g=!0,L(U))}var D=ne(),H=a(D);D!==H&&be(H);var T=f(),y=[B(T)];function P(p){var x=document.querySelector("base"),m="";return x&&x.getAttribute("href")&&(m=et(window.location.href)),m+"#"+a(c+B(p))}function M(p,x){var m="PUSH",C=W(p,void 0,void 0,d.location);h.confirmTransitionTo(C,m,n,function(U){if(U){var j=B(C),G=a(c+j),z=ne()!==G;if(z){E=j,gt(G);var Q=y.lastIndexOf(B(d.location)),De=y.slice(0,Q+1);De.push(j),y=De,v({action:m,location:C})}else v()}})}function R(p,x){var m="REPLACE",C=W(p,void 0,void 0,d.location);h.confirmTransitionTo(C,m,n,function(U){if(U){var j=B(C),G=a(c+j),z=ne()!==G;z&&(E=j,be(G));var Q=y.indexOf(B(d.location));Q!==-1&&(y[Q]=j),v({action:m,location:C})}})}function L(p){t.go(p)}function J(){L(-1)}function X(){L(1)}var N=0;function I(p){N+=p,N===1&&p===1?window.addEventListener(Ke,A):N===0&&window.removeEventListener(Ke,A)}var Z=!1;function we(p){p===void 0&&(p=!1);var x=h.setPrompt(p);return Z||(I(1),Z=!0),function(){return Z&&(Z=!1,I(-1)),x()}}function q(p){var x=h.appendListener(p);return I(1),function(){I(-1),x()}}var d={length:t.length,action:"POP",location:T,createHref:P,push:M,replace:R,go:L,goBack:J,goForward:X,block:we,listen:q};return d}function qe(e,t,i){return Math.min(Math.max(e,t),i)}function xt(e){e===void 0&&(e={});var t=e,i=t.getUserConfirmation,r=t.initialEntries,n=r===void 0?["/"]:r,o=t.initialIndex,u=o===void 0?0:o,c=t.keyLength,l=c===void 0?6:c,a=Ae();function s(P){F(y,P),y.length=y.entries.length,a.notifyListeners(y.location,y.action)}function f(){return Math.random().toString(36).substr(2,l)}var h=qe(u,0,n.length-1),v=n.map(function(P){return typeof P=="string"?W(P,void 0,f()):W(P,void 0,P.key||f())}),g=B;function E(P,M){var R="PUSH",L=W(P,M,f(),y.location);a.confirmTransitionTo(L,R,i,function(J){if(J){var X=y.index,N=X+1,I=y.entries.slice(0);I.length>N?I.splice(N,I.length-N,L):I.push(L),s({action:R,location:L,index:N,entries:I})}})}function S(P,M){var R="REPLACE",L=W(P,M,f(),y.location);a.confirmTransitionTo(L,R,i,function(J){J&&(y.entries[y.index]=L,s({action:R,location:L}))})}function A(P){var M=qe(y.index+P,0,y.entries.length-1),R="POP",L=y.entries[M];a.confirmTransitionTo(L,R,i,function(J){J?s({action:R,location:L,index:M}):s()})}function O(){A(-1)}function _(){A(1)}function D(P){var M=y.index+P;return M>=0&&M<y.entries.length}function H(P){return P===void 0&&(P=!1),a.setPrompt(P)}function T(P){return a.appendListener(P)}var y={length:v.length,action:"POP",location:v[h],index:h,entries:v,createHref:g,push:E,replace:S,go:A,goBack:O,goForward:_,canGo:D,block:H,listen:T};return y}var te={exports:{}},wt=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"},ae=wt;te.exports=rt;te.exports.parse=Re;te.exports.compile=bt;te.exports.tokensToFunction=tt;te.exports.tokensToRegExp=nt;var Pt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function Re(e,t){for(var i=[],r=0,n=0,o="",u=t&&t.delimiter||"/",c;(c=Pt.exec(e))!=null;){var l=c[0],a=c[1],s=c.index;if(o+=e.slice(n,s),n=s+l.length,a){o+=a[1];continue}var f=e[n],h=c[2],v=c[3],g=c[4],E=c[5],S=c[6],A=c[7];o&&(i.push(o),o="");var O=h!=null&&f!=null&&f!==h,_=S==="+"||S==="*",D=S==="?"||S==="*",H=c[2]||u,T=g||E;i.push({name:v||r++,prefix:h||"",delimiter:H,optional:D,repeat:_,partial:O,asterisk:!!A,pattern:T?St(T):A?".*":"[^"+oe(H)+"]+?"})}return n<e.length&&(o+=e.substr(n)),o&&i.push(o),i}function bt(e,t){return tt(Re(e,t),t)}function Ct(e){return encodeURI(e).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function Et(e){return encodeURI(e).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function tt(e,t){for(var i=new Array(e.length),r=0;r<e.length;r++)typeof e[r]=="object"&&(i[r]=new RegExp("^(?:"+e[r].pattern+")$",$e(t)));return function(n,o){for(var u="",c=n||{},l=o||{},a=l.pretty?Ct:encodeURIComponent,s=0;s<e.length;s++){var f=e[s];if(typeof f=="string"){u+=f;continue}var h=c[f.name],v;if(h==null)if(f.optional){f.partial&&(u+=f.prefix);continue}else throw new TypeError('Expected "'+f.name+'" to be defined');if(ae(h)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(h.length===0){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var g=0;g<h.length;g++){if(v=a(h[g]),!i[s].test(v))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(v)+"`");u+=(g===0?f.prefix:f.delimiter)+v}continue}if(v=f.asterisk?Et(h):a(h),!i[s].test(v))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+v+'"');u+=f.prefix+v}return u}}function oe(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function St(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function Le(e,t){return e.keys=t,e}function $e(e){return e&&e.sensitive?"":"i"}function Tt(e,t){var i=e.source.match(/\((?!\?)/g);if(i)for(var r=0;r<i.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return Le(e,t)}function At(e,t,i){for(var r=[],n=0;n<e.length;n++)r.push(rt(e[n],t,i).source);var o=new RegExp("(?:"+r.join("|")+")",$e(i));return Le(o,t)}function Rt(e,t,i){return nt(Re(e,i),t,i)}function nt(e,t,i){ae(t)||(i=t||i,t=[]),i=i||{};for(var r=i.strict,n=i.end!==!1,o="",u=0;u<e.length;u++){var c=e[u];if(typeof c=="string")o+=oe(c);else{var l=oe(c.prefix),a="(?:"+c.pattern+")";t.push(c),c.repeat&&(a+="(?:"+l+a+")*"),c.optional?c.partial?a=l+"("+a+")?":a="(?:"+l+"("+a+"))?":a=l+"("+a+")",o+=a}}var s=oe(i.delimiter||"/"),f=o.slice(-s.length)===s;return r||(o=(f?o.slice(0,-s.length):o)+"(?:"+s+"(?=$))?"),n?o+="$":o+=r&&f?"":"(?="+s+"|$)",Le(new RegExp("^"+o,$e(i)),t)}function rt(e,t,i){return ae(t)||(i=t||i,t=[]),i=i||{},e instanceof RegExp?Tt(e,t):ae(e)?At(e,t,i):Rt(e,t,i)}var Lt=te.exports;const $t=st(Lt);var b={};/** @license React v16.13.1
|
|
2
|
-
* react-is.production.min.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var $=typeof Symbol=="function"&&Symbol.for,Me=$?Symbol.for("react.element"):60103,Oe=$?Symbol.for("react.portal"):60106,ue=$?Symbol.for("react.fragment"):60107,fe=$?Symbol.for("react.strict_mode"):60108,le=$?Symbol.for("react.profiler"):60114,he=$?Symbol.for("react.provider"):60109,pe=$?Symbol.for("react.context"):60110,Ue=$?Symbol.for("react.async_mode"):60111,ve=$?Symbol.for("react.concurrent_mode"):60111,de=$?Symbol.for("react.forward_ref"):60112,me=$?Symbol.for("react.suspense"):60113,Mt=$?Symbol.for("react.suspense_list"):60120,ge=$?Symbol.for("react.memo"):60115,ye=$?Symbol.for("react.lazy"):60116,Ot=$?Symbol.for("react.block"):60121,Ut=$?Symbol.for("react.fundamental"):60117,Ht=$?Symbol.for("react.responder"):60118,It=$?Symbol.for("react.scope"):60119;function K(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Me:switch(e=e.type,e){case Ue:case ve:case ue:case le:case fe:case me:return e;default:switch(e=e&&e.$$typeof,e){case pe:case de:case ye:case ge:case he:return e;default:return t}}case Oe:return t}}}function it(e){return K(e)===ve}b.AsyncMode=Ue;b.ConcurrentMode=ve;b.ContextConsumer=pe;b.ContextProvider=he;b.Element=Me;b.ForwardRef=de;b.Fragment=ue;b.Lazy=ye;b.Memo=ge;b.Portal=Oe;b.Profiler=le;b.StrictMode=fe;b.Suspense=me;b.isAsyncMode=function(e){return it(e)||K(e)===Ue};b.isConcurrentMode=it;b.isContextConsumer=function(e){return K(e)===pe};b.isContextProvider=function(e){return K(e)===he};b.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Me};b.isForwardRef=function(e){return K(e)===de};b.isFragment=function(e){return K(e)===ue};b.isLazy=function(e){return K(e)===ye};b.isMemo=function(e){return K(e)===ge};b.isPortal=function(e){return K(e)===Oe};b.isProfiler=function(e){return K(e)===le};b.isStrictMode=function(e){return K(e)===fe};b.isSuspense=function(e){return K(e)===me};b.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ue||e===ve||e===le||e===fe||e===me||e===Mt||typeof e=="object"&&e!==null&&(e.$$typeof===ye||e.$$typeof===ge||e.$$typeof===he||e.$$typeof===pe||e.$$typeof===de||e.$$typeof===Ut||e.$$typeof===Ht||e.$$typeof===It||e.$$typeof===Ot)};b.typeOf=K;var Ce=1073741823,ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function _t(){var e="__global_unique_id__";return ze[e]=(ze[e]||0)+1}function Dt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Bt(e){var t=[];return{on:function(r){t.push(r)},off:function(r){t=t.filter(function(n){return n!==r})},get:function(){return e},set:function(r,n){e=r,t.forEach(function(o){return o(e,n)})}}}function Nt(e){return Array.isArray(e)?e[0]:e}function jt(e,t){var i,r,n="__create-react-context-"+_t()+"__",o=function(c){V(l,c);function l(){for(var s,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return s=c.call.apply(c,[this].concat(h))||this,s.emitter=Bt(s.props.value),s}var a=l.prototype;return a.getChildContext=function(){var f;return f={},f[n]=this.emitter,f},a.componentWillReceiveProps=function(f){if(this.props.value!==f.value){var h=this.props.value,v=f.value,g;Dt(h,v)?g=0:(g=typeof t=="function"?t(h,v):Ce,g|=0,g!==0&&this.emitter.set(f.value,g))}},a.render=function(){return this.props.children},l}(w.Component);o.childContextTypes=(i={},i[n]=Be.object.isRequired,i);var u=function(c){V(l,c);function l(){for(var s,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return s=c.call.apply(c,[this].concat(h))||this,s.observedBits=void 0,s.state={value:s.getValue()},s.onUpdate=function(g,E){var S=s.observedBits|0;S&E&&s.setState({value:s.getValue()})},s}var a=l.prototype;return a.componentWillReceiveProps=function(f){var h=f.observedBits;this.observedBits=h??Ce},a.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var f=this.props.observedBits;this.observedBits=f??Ce},a.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},a.getValue=function(){return this.context[n]?this.context[n].get():e},a.render=function(){return Nt(this.props.children)(this.state.value)},l}(w.Component);return u.contextTypes=(r={},r[n]=Be.object,r),{Provider:o,Consumer:u}}var Wt=w.createContext||jt,ot=function(t){var i=Wt();return i.displayName=t,i},Ft=ot("Router-History"),k=ot("Router"),xe=function(e){V(t,e),t.computeRootMatch=function(n){return{path:"/",url:"/",params:{},isExact:n==="/"}};function t(r){var n;return n=e.call(this,r)||this,n.state={location:r.history.location},n._isMounted=!1,n._pendingLocation=null,r.staticContext||(n.unlisten=r.history.listen(function(o){n._pendingLocation=o})),n}var i=t.prototype;return i.componentDidMount=function(){var n=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(o){n._isMounted&&n.setState({location:o})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},i.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},i.render=function(){return w.createElement(k.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},w.createElement(Ft.Provider,{children:this.props.children||null,value:this.props.history}))},t}(w.Component);w.Component;w.Component;var Ge={},Kt=1e4,Ve=0;function qt(e,t){var i=""+t.end+t.strict+t.sensitive,r=Ge[i]||(Ge[i]={});if(r[e])return r[e];var n=[],o=$t(e,n,t),u={regexp:o,keys:n};return Ve<Kt&&(r[e]=u,Ve++),u}function He(e,t){t===void 0&&(t={}),(typeof t=="string"||Array.isArray(t))&&(t={path:t});var i=t,r=i.path,n=i.exact,o=n===void 0?!1:n,u=i.strict,c=u===void 0?!1:u,l=i.sensitive,a=l===void 0?!1:l,s=[].concat(r);return s.reduce(function(f,h){if(!h&&h!=="")return null;if(f)return f;var v=qt(h,{end:o,strict:c,sensitive:a}),g=v.regexp,E=v.keys,S=g.exec(e);if(!S)return null;var A=S[0],O=S.slice(1),_=e===A;return o&&!_?null:{path:h,url:h==="/"&&A===""?"/":A,isExact:_,params:E.reduce(function(D,H,T){return D[H.name]=O[T],D},{})}},null)}function zt(e){return w.Children.count(e)===0}var on=function(e){V(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;return i.render=function(){var n=this;return w.createElement(k.Consumer,null,function(o){o||Y();var u=n.props.location||o.location,c=n.props.computedMatch?n.props.computedMatch:n.props.path?He(u.pathname,n.props):o.match,l=F({},o,{location:u,match:c}),a=n.props,s=a.children,f=a.component,h=a.render;return Array.isArray(s)&&zt(s)&&(s=null),w.createElement(k.Provider,{value:l},l.match?s?typeof s=="function"?s(l):s:f?w.createElement(f,l):h?h(l):null:typeof s=="function"?s(l):null)})},t}(w.Component);function Ie(e){return e.charAt(0)==="/"?e:"/"+e}function Gt(e,t){return e?F({},t,{pathname:Ie(e)+t.pathname}):t}function Vt(e,t){if(!e)return t;var i=Ie(e);return t.pathname.indexOf(i)!==0?t:F({},t,{pathname:t.pathname.substr(i.length)})}function Je(e){return typeof e=="string"?e:B(e)}function Ee(e){return function(){Y()}}function Xe(){}w.Component;var an=function(e){V(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;return i.render=function(){var n=this;return w.createElement(k.Consumer,null,function(o){o||Y();var u=n.props.location||o.location,c,l;return w.Children.forEach(n.props.children,function(a){if(l==null&&w.isValidElement(a)){c=a;var s=a.props.path||a.props.from;l=s?He(u.pathname,F({},a.props,{path:s})):o.match}}),l?w.cloneElement(c,{location:u,computedMatch:l}):null})},t}(w.Component);w.useContext;w.Component;var sn=function(e){V(t,e);function t(){for(var r,n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r=e.call.apply(e,[this].concat(o))||this,r.history=yt(r.props),r}var i=t.prototype;return i.render=function(){return w.createElement(xe,{history:this.history,children:this.props.children})},t}(w.Component),Se=function(t,i){return typeof t=="function"?t(i):t},Te=function(t,i){return typeof t=="string"?W(t,null,null,i):t},_e=function(t){return t},ee=w.forwardRef;typeof ee>"u"&&(ee=_e);function Jt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Xt=ee(function(e,t){var i=e.innerRef,r=e.navigate,n=e.onClick,o=ce(e,["innerRef","navigate","onClick"]),u=o.target,c=F({},o,{onClick:function(a){try{n&&n(a)}catch(s){throw a.preventDefault(),s}!a.defaultPrevented&&a.button===0&&(!u||u==="_self")&&!Jt(a)&&(a.preventDefault(),r())}});return _e!==ee?c.ref=t||i:c.ref=i,w.createElement("a",c)}),Qt=ee(function(e,t){var i=e.component,r=i===void 0?Xt:i,n=e.replace,o=e.to,u=e.innerRef,c=ce(e,["component","replace","to","innerRef"]);return w.createElement(k.Consumer,null,function(l){l||Y();var a=l.history,s=Te(Se(o,l.location),l.location),f=s?a.createHref(s):"",h=F({},c,{href:f,navigate:function(){var g=Se(o,l.location),E=B(l.location)===B(Te(g)),S=n||E?a.replace:a.push;S(g)}});return _e!==ee?h.ref=t||u:h.innerRef=u,w.createElement(r,h)})}),at=function(t){return t},se=w.forwardRef;typeof se>"u"&&(se=at);function Yt(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.filter(function(r){return r}).join(" ")}se(function(e,t){var i=e["aria-current"],r=i===void 0?"page":i,n=e.activeClassName,o=n===void 0?"active":n,u=e.activeStyle,c=e.className,l=e.exact,a=e.isActive,s=e.location,f=e.sensitive,h=e.strict,v=e.style,g=e.to,E=e.innerRef,S=ce(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return w.createElement(k.Consumer,null,function(A){A||Y();var O=s||A.location,_=Te(Se(g,O),O),D=_.pathname,H=D&&D.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),T=H?He(O.pathname,{path:H,exact:l,sensitive:f,strict:h}):null,y=!!(a?a(T,O):T),P=typeof c=="function"?c(y):c,M=typeof v=="function"?v(y):v;y&&(P=Yt(P,o),M=F({},M,u));var R=F({"aria-current":y&&r||null,className:P,style:M,to:_},S);return at!==se?R.ref=t||E:R.innerRef=E,w.createElement(Qt,R)})});export{sn as H,Qt as L,on as R,an as S};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import{j as q}from"./jsx-runtime-eps93zm2.js";import{r as I}from"./index-DhsZuJvc.js";import{w as s,u as i,e as l}from"./index-DMAnyMX5.js";import{S as w}from"./select-B3sB0hqr.js";import{o as K}from"./select.stories-data-BEF6nqsN.js";import"./index-CF7H4eMJ.js";import"./lodash-c4VUpsOs.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./enum-Bnn40S8Q.js";import"./index-CEuq6vkz.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-KLRbmKRF.js";import"./button-CjbZ5CrF.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";const me={title:"Forms/Select/Test Cases",component:w,args:{options:K},tags:["!autodocs"]},v=n=>{const{multi:o,value:a}=n,[r,t]=I.useState(a||(o?[]:void 0)),e=c=>{const{value:u}=c.target;t(o?u:{value:u})};return q.jsx(w,{value:r,onChange:e,...n})},y=v.bind({});y.args={value:{label:"Vampires",value:"blood"},disabled:!0};const m=v.bind({});m.args={testId:"testId",clearable:!0};m.play=async({canvasElement:n,step:o})=>{const a=s(n),r=s(n.ownerDocument.body);await o("Select item with click",async()=>{const t=a.getByTestId("testId");await i.click(t);const e=await r.findByTestId("testId-layer");l(e).toBeInTheDocument();const c=s(e).getByText("Wombats");await i.click(c);const u=await a.findByTestId("testId-value");l(s(u).getByText("Wombats")).toBeInTheDocument()}),await o("Clear selected value",async()=>{const t=a.getByTestId("testId-clear");await i.click(t);const e=a.queryByTestId("testId-value");l(e).not.toBeInTheDocument()})};const p=v.bind({});p.args={testId:"testId",clearable:!0,multi:!0};p.play=async({canvasElement:n,step:o})=>{const a=s(n),r=s(n.ownerDocument.body);await o("Select items with click",async()=>{const t=a.getByTestId("testId");await i.click(t);const e=await r.findByTestId("testId-layer");await l(e).toBeInTheDocument();const c=s(e).getByText("Wombats");await i.click(c);const u=s(e).getByText("Kangaroos");await i.click(u),await i.click(n),await l(e).not.toBeInTheDocument();const T=await a.findByTestId("testId-value");await l(s(T).getByText("Wombats")).toBeInTheDocument(),await l(s(T).getByText("Kangaroos")).toBeInTheDocument()}),await o("Deselect item with click",async()=>{const t=a.getByTestId("testId");await i.click(t);const e=await r.findByTestId("testId-layer");await l(e).toBeInTheDocument();const c=s(e).getByText("Wombats");await i.click(c),await i.click(n),await l(e).not.toBeInTheDocument();const u=await a.findByTestId("testId-value");await l(s(u).queryByText("Wombats")).not.toBeInTheDocument()}),await o("Clear selected values",async()=>{const t=a.getByTestId("testId-clear");await i.click(t);const e=a.queryByTestId("testId-value");await l(e).not.toBeInTheDocument()})};const g=v.bind({});g.args={testId:"testId",disabled:!0};g.play=async({canvasElement:n,step:o})=>{const a=s(n),r=s(n.ownerDocument.body);await o("Clicking disabled trigger should not show layer",async()=>{await a.getByTestId("testId").click();const e=r.queryByTestId("testId-layer");await l(e).not.toBeInTheDocument()})};const d=()=>{const[n,o]=I.useState(K),[a,r]=I.useState(void 0);return q.jsx(w,{testId:"testId",name:"example",options:n,onChange:t=>r({value:t.target.value}),onCreate:t=>{const e={label:t,value:t};o([...n,e]),r(e)},value:a})};d.args={testId:"testId"};d.play=async({canvasElement:n,step:o})=>{const a=s(n),r=s(n.ownerDocument.body);await o("Create new item",async()=>{const t=a.getByTestId("testId-input");if(await l(t).toBeInTheDocument(),!t)return;await i.type(t,"New value");const e=r.getByText('Create "New value"');await i.click(e);const c=await a.findByTestId("testId-value");await l(s(c).getByText("New value")).toBeInTheDocument()})};d.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestCreate"};var h,B,S;y.parameters={...y.parameters,docs:{...(h=y.parameters)==null?void 0:h.docs,source:{originalSource:`(args: any) => {
|
|
2
|
-
const {
|
|
3
|
-
multi,
|
|
4
|
-
value
|
|
5
|
-
} = args;
|
|
6
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
7
|
-
const handleChange = (evt: any) => {
|
|
8
|
-
const {
|
|
9
|
-
value
|
|
10
|
-
} = evt.target;
|
|
11
|
-
setSelectedValue(multi ? value : {
|
|
12
|
-
value
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
16
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
-
{...args} />;
|
|
18
|
-
}`,...(S=(B=y.parameters)==null?void 0:B.docs)==null?void 0:S.source}}};var b,V,x;m.parameters={...m.parameters,docs:{...(b=m.parameters)==null?void 0:b.docs,source:{originalSource:`(args: any) => {
|
|
19
|
-
const {
|
|
20
|
-
multi,
|
|
21
|
-
value
|
|
22
|
-
} = args;
|
|
23
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
24
|
-
const handleChange = (evt: any) => {
|
|
25
|
-
const {
|
|
26
|
-
value
|
|
27
|
-
} = evt.target;
|
|
28
|
-
setSelectedValue(multi ? value : {
|
|
29
|
-
value
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
33
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
34
|
-
{...args} />;
|
|
35
|
-
}`,...(x=(V=m.parameters)==null?void 0:V.docs)==null?void 0:x.source}}};var C,D,f;p.parameters={...p.parameters,docs:{...(C=p.parameters)==null?void 0:C.docs,source:{originalSource:`(args: any) => {
|
|
36
|
-
const {
|
|
37
|
-
multi,
|
|
38
|
-
value
|
|
39
|
-
} = args;
|
|
40
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
41
|
-
const handleChange = (evt: any) => {
|
|
42
|
-
const {
|
|
43
|
-
value
|
|
44
|
-
} = evt.target;
|
|
45
|
-
setSelectedValue(multi ? value : {
|
|
46
|
-
value
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
50
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
51
|
-
{...args} />;
|
|
52
|
-
}`,...(f=(D=p.parameters)==null?void 0:D.docs)==null?void 0:f.source}}};var k,j,N;g.parameters={...g.parameters,docs:{...(k=g.parameters)==null?void 0:k.docs,source:{originalSource:`(args: any) => {
|
|
53
|
-
const {
|
|
54
|
-
multi,
|
|
55
|
-
value
|
|
56
|
-
} = args;
|
|
57
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
58
|
-
const handleChange = (evt: any) => {
|
|
59
|
-
const {
|
|
60
|
-
value
|
|
61
|
-
} = evt.target;
|
|
62
|
-
setSelectedValue(multi ? value : {
|
|
63
|
-
value
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
67
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
68
|
-
{...args} />;
|
|
69
|
-
}`,...(N=(j=g.parameters)==null?void 0:j.docs)==null?void 0:N.source}}};var W,_,O;d.parameters={...d.parameters,docs:{...(W=d.parameters)==null?void 0:W.docs,source:{originalSource:`() => {
|
|
70
|
-
const [options, setOptions] = useState(storyData.options);
|
|
71
|
-
const [singleValue, setSingleValue] = useState<ISelectSelectedOption | undefined>(undefined);
|
|
72
|
-
return <Select testId="testId" name="example" options={options} onChange={evt => setSingleValue({
|
|
73
|
-
value: evt.target.value
|
|
74
|
-
})} onCreate={value => {
|
|
75
|
-
const newValue = {
|
|
76
|
-
label: value,
|
|
77
|
-
value
|
|
78
|
-
};
|
|
79
|
-
setOptions([...options, newValue]);
|
|
80
|
-
setSingleValue(newValue);
|
|
81
|
-
}} value={singleValue} />;
|
|
82
|
-
}`,...(O=(_=d.parameters)==null?void 0:_.docs)==null?void 0:O.source}}};const pe=["TestDisabledNonExistentValue","Test","TestMulti","TestDisabled","TestCreate"];export{m as Test,d as TestCreate,g as TestDisabled,y as TestDisabledNonExistentValue,p as TestMulti,pe as __namedExportsOrder,me as default};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{j as H}from"./jsx-runtime-eps93zm2.js";import{l as rr}from"./lodash-c4VUpsOs.js";import{r as o}from"./index-DhsZuJvc.js";import{a as Xe,b as Q,_ as Z}from"./objectSpread2-DW4nTBoq.js";import{c as fe,a as nr}from"./index-Bk2sglWO.js";import{_ as It}from"./extends-CF3RwP-h.js";import{_ as ar}from"./objectWithoutPropertiesLoose-CAYKN5F1.js";import{m as ur}from"./memoize-one.esm-CcMeOnPo.js";import{i as ir}from"./index-BI4_Bp97.js";import{r as or}from"./icon-BP4BO6-k.js";import{I as mt}from"./common-types-Sih75Sav.js";import{D as sr}from"./disabled-context-rmpd7YJS.js";import{T as wt}from"./tooltip-1V7clEnw.js";import{B as gt}from"./button-CjbZ5CrF.js";function Qe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function lr(e){if(Array.isArray(e))return Qe(e)}function cr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ut(e,r){if(e){if(typeof e=="string")return Qe(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Qe(e,r):void 0}}function fr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(e){return lr(e)||cr(e)||Ut(e)||fr()}function dr(e){if(Array.isArray(e))return e}function vr(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,a,u,i,c=[],l=!0,E=!1;try{if(u=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=u.call(t)).done)&&(c.push(n.value),c.length!==r);l=!0);}catch(h){E=!0,a=h}finally{try{if(!l&&t.return!=null&&(i=t.return(),Object(i)!==i))return}finally{if(E)throw a}}return c}}function mr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W(e,r){return dr(e)||vr(e,r)||Ut(e,r)||mr()}function gr(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function a(u,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=n.has(u);if(l)return!1;if(u===i)return!0;if(t&&c>1)return!1;n.add(u);var E=c+1;if(Array.isArray(u)){if(!Array.isArray(i)||u.length!==i.length)return!1;for(var h=0;h<u.length;h++)if(!a(u[h],i[h],E))return!1;return!0}if(u&&i&&Xe(u)==="object"&&Xe(i)==="object"){var y=Object.keys(u);return y.length!==Object.keys(i).length?!1:y.every(function(b){return a(u[b],i[b],E)})}return!1}return a(e,r)}function yt(e){var r=o.useRef();r.current=e;var t=o.useCallback(function(){for(var n,a=arguments.length,u=new Array(a),i=0;i<a;i++)u[i]=arguments[i];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(u))},[]);return t}function yr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var bt=yr()?o.useLayoutEffect:o.useEffect,br=function(r,t){var n=o.useRef(!0);bt(function(){return r(n.current)},t),bt(function(){return n.current=!1,function(){n.current=!0}},[])},Et=function(r,t){br(function(n){if(!n)return r()},t)};function ht(e){var r=o.useRef(!1),t=o.useState(e),n=W(t,2),a=n[0],u=n[1];o.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function i(c,l){l&&r.current||u(c)}return[a,i]}function je(e){return e!==void 0}function Er(e,r){var t=r||{},n=t.defaultValue,a=t.value,u=t.onChange,i=t.postState,c=ht(function(){return je(a)?a:je(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),l=W(c,2),E=l[0],h=l[1],y=a!==void 0?a:E,b=i?i(y):y,d=yt(u),g=ht([y]),v=W(g,2),f=v[0],p=v[1];Et(function(){var _=f[0];E!==_&&d(E,_)},[f]),Et(function(){je(a)||h(a)},[a]);var s=yt(function(_,w){h(_,w),p([y],w)});return[b,s]}function Lt(e,r){if(e==null)return{};var t,n,a=ar(e,r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)t=u[n],r.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var m={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(r){var t=r.keyCode;if(r.altKey&&!r.ctrlKey||r.metaKey||t>=m.F1&&t<=m.F12)return!1;switch(t){case m.ALT:case m.CAPS_LOCK:case m.CONTEXT_MENU:case m.CTRL:case m.DOWN:case m.END:case m.ESC:case m.HOME:case m.INSERT:case m.LEFT:case m.MAC_FF_META:case m.META:case m.NUMLOCK:case m.NUM_CENTER:case m.PAGE_DOWN:case m.PAGE_UP:case m.PAUSE:case m.PRINT_SCREEN:case m.RIGHT:case m.SHIFT:case m.UP:case m.WIN_KEY:case m.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(r){if(r>=m.ZERO&&r<=m.NINE||r>=m.NUM_ZERO&&r<=m.NUM_MULTIPLY||r>=m.A&&r<=m.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&r===0)return!0;switch(r){case m.SPACE:case m.QUESTION_MARK:case m.NUM_PLUS:case m.NUM_MINUS:case m.NUM_PERIOD:case m.NUM_DIVISION:case m.SEMICOLON:case m.DASH:case m.EQUALS:case m.COMMA:case m.PERIOD:case m.SLASH:case m.APOSTROPHE:case m.SINGLE_QUOTE:case m.OPEN_SQUARE_BRACKET:case m.BACKSLASH:case m.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},de=o.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0});function Ze(e,r,t){return(e-r)/(t-r)}function ze(e,r,t,n){var a=Ze(r,t,n),u={};switch(e){case"rtl":u.right="".concat(a*100,"%"),u.transform="translateX(50%)";break;case"btt":u.bottom="".concat(a*100,"%"),u.transform="translateY(50%)";break;case"ttb":u.top="".concat(a*100,"%"),u.transform="translateY(-50%)";break;default:u.left="".concat(a*100,"%"),u.transform="translateX(-50%)";break}return u}function pe(e,r){return Array.isArray(e)?e[r]:e}var hr=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],pr=o.forwardRef(function(e,r){var t,n,a=e.prefixCls,u=e.value,i=e.valueIndex,c=e.onStartMove,l=e.style,E=e.render,h=e.dragging,y=e.onOffsetChange,b=Lt(e,hr),d=o.useContext(de),g=d.min,v=d.max,f=d.direction,p=d.disabled,s=d.keyboard,_=d.range,w=d.tabIndex,T=d.ariaLabelForHandle,x=d.ariaLabelledByForHandle,R=d.ariaValueTextFormatterForHandle,P="".concat(a,"-handle"),N=function(A){p||c(A,i)},C=function(A){if(!p&&s){var M=null;switch(A.which||A.keyCode){case m.LEFT:M=f==="ltr"||f==="btt"?-1:1;break;case m.RIGHT:M=f==="ltr"||f==="btt"?1:-1;break;case m.UP:M=f!=="ttb"?1:-1;break;case m.DOWN:M=f!=="ttb"?-1:1;break;case m.HOME:M="min";break;case m.END:M="max";break;case m.PAGE_UP:M=2;break;case m.PAGE_DOWN:M=-2;break}M!==null&&(A.preventDefault(),y(M,i))}},j=ze(f,u,g,v),k=o.createElement("div",It({ref:r,className:fe(P,(t={},Q(t,"".concat(P,"-").concat(i+1),_),Q(t,"".concat(P,"-dragging"),h),t)),style:Z(Z({},j),l),onMouseDown:N,onTouchStart:N,onKeyDown:C,tabIndex:p?null:pe(w,i),role:"slider","aria-valuemin":g,"aria-valuemax":v,"aria-valuenow":u,"aria-disabled":p,"aria-label":pe(T,i),"aria-labelledby":pe(x,i),"aria-valuetext":(n=pe(R,i))===null||n===void 0?void 0:n(u),"aria-orientation":f==="ltr"||f==="rtl"?"horizontal":"vertical"},b));return E&&(k=E(k,{index:i,prefixCls:a,value:u,dragging:h})),k}),_r=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],Sr=o.forwardRef(function(e,r){var t=e.prefixCls,n=e.style,a=e.onStartMove,u=e.onOffsetChange,i=e.values,c=e.handleRender,l=e.draggingIndex,E=Lt(e,_r),h=o.useRef({});return o.useImperativeHandle(r,function(){return{focus:function(b){var d;(d=h.current[b])===null||d===void 0||d.focus()}}}),o.createElement(o.Fragment,null,i.map(function(y,b){return o.createElement(pr,It({ref:function(g){g?h.current[b]=g:delete h.current[b]},dragging:l===b,prefixCls:t,style:pe(n,b),key:b,value:y,valueIndex:b,onStartMove:a,onOffsetChange:u,render:c},E))}))});function pt(e){var r="touches"in e?e.touches[0]:e;return{pageX:r.pageX,pageY:r.pageY}}function Mr(e,r,t,n,a,u,i,c,l){var E=o.useState(null),h=W(E,2),y=h[0],b=h[1],d=o.useState(-1),g=W(d,2),v=g[0],f=g[1],p=o.useState(t),s=W(p,2),_=s[0],w=s[1],T=o.useState(t),x=W(T,2),R=x[0],P=x[1],N=o.useRef(null),C=o.useRef(null);o.useEffect(function(){v===-1&&w(t)},[t,v]),o.useEffect(function(){return function(){document.removeEventListener("mousemove",N.current),document.removeEventListener("mouseup",C.current),document.removeEventListener("touchmove",N.current),document.removeEventListener("touchend",C.current)}},[]);var j=function(U,F){_.some(function(K,J){return K!==U[J]})&&(F!==void 0&&b(F),w(U),i(U))},k=function(U,F){if(U===-1){var K=R[0],J=R[R.length-1],_e=n-K,Se=a-J,q=F*(a-n);q=Math.max(q,_e),q=Math.min(q,Se);var ue=u(K+q);q=ue-K;var ie=R.map(function(ge){return ge+q});j(ie)}else{var G=(a-n)*F,oe=ae(_);oe[U]=R[U];var me=l(oe,G,U,"dist");j(me.values,me.value)}},$=o.useRef(k);$.current=k;var A=function(U,F){U.stopPropagation();var K=t[F];f(F),b(K),P(t);var J=pt(U),_e=J.pageX,Se=J.pageY,q=function(G){G.preventDefault();var oe=pt(G),me=oe.pageX,ge=oe.pageY,Me=me-_e,Ne=ge-Se,Ce=e.current.getBoundingClientRect(),Oe=Ce.width,ee=Ce.height,Y;switch(r){case"btt":Y=-Ne/ee;break;case"ttb":Y=Ne/ee;break;case"rtl":Y=-Me/Oe;break;default:Y=Me/Oe}$.current(F,Y)},ue=function ie(G){G.preventDefault(),document.removeEventListener("mouseup",ie),document.removeEventListener("mousemove",q),document.removeEventListener("touchend",ie),document.removeEventListener("touchmove",q),N.current=null,C.current=null,f(-1),c()};document.addEventListener("mouseup",ue),document.addEventListener("mousemove",q),document.addEventListener("touchend",ue),document.addEventListener("touchmove",q),N.current=q,C.current=ue},M=o.useMemo(function(){var V=ae(t).sort(function(F,K){return F-K}),U=ae(_).sort(function(F,K){return F-K});return V.every(function(F,K){return F===U[K]})?_:t},[t,_]);return[v,y,M,A]}function Nr(e){var r,t=e.prefixCls,n=e.style,a=e.start,u=e.end,i=e.index,c=e.onStartMove,l=o.useContext(de),E=l.direction,h=l.min,y=l.max,b=l.disabled,d=l.range,g="".concat(t,"-track"),v=Ze(a,h,y),f=Ze(u,h,y),p=function(w){!b&&c&&c(w,-1)},s={};switch(E){case"rtl":s.right="".concat(v*100,"%"),s.width="".concat(f*100-v*100,"%");break;case"btt":s.bottom="".concat(v*100,"%"),s.height="".concat(f*100-v*100,"%");break;case"ttb":s.top="".concat(v*100,"%"),s.height="".concat(f*100-v*100,"%");break;default:s.left="".concat(v*100,"%"),s.width="".concat(f*100-v*100,"%")}return o.createElement("div",{className:fe(g,(r={},Q(r,"".concat(g,"-").concat(i+1),d),Q(r,"".concat(t,"-track-draggable"),c),r)),style:Z(Z({},s),n),onMouseDown:p,onTouchStart:p})}function Cr(e){var r=e.prefixCls,t=e.style,n=e.values,a=e.startPoint,u=e.onStartMove,i=o.useContext(de),c=i.included,l=i.range,E=i.min,h=o.useMemo(function(){if(!l){if(n.length===0)return[];var y=a??E,b=n[0];return[{start:Math.min(y,b),end:Math.max(y,b)}]}for(var d=[],g=0;g<n.length-1;g+=1)d.push({start:n[g],end:n[g+1]});return d},[n,l,a,E]);return c?h.map(function(y,b){var d=y.start,g=y.end;return o.createElement(Nr,{index:b,prefixCls:r,style:pe(t,b),start:d,end:g,key:b,onStartMove:u})}):null}function Or(e){var r=e.prefixCls,t=e.style,n=e.children,a=e.value,u=e.onClick,i=o.useContext(de),c=i.min,l=i.max,E=i.direction,h=i.includedStart,y=i.includedEnd,b=i.included,d="".concat(r,"-text"),g=ze(E,a,c,l);return o.createElement("span",{className:fe(d,Q({},"".concat(d,"-active"),b&&h<=a&&a<=y)),style:Z(Z({},g),t),onMouseDown:function(f){f.stopPropagation()},onClick:function(){u(a)}},n)}function xr(e){var r=e.prefixCls,t=e.marks,n=e.onClick,a="".concat(r,"-mark");return t.length?o.createElement("div",{className:a},t.map(function(u){var i=u.value,c=u.style,l=u.label;return o.createElement(Or,{key:i,prefixCls:a,style:c,value:i,onClick:n},l)})):null}function Rr(e){var r=e.prefixCls,t=e.value,n=e.style,a=e.activeStyle,u=o.useContext(de),i=u.min,c=u.max,l=u.direction,E=u.included,h=u.includedStart,y=u.includedEnd,b="".concat(r,"-dot"),d=E&&h<=t&&t<=y,g=Z(Z({},ze(l,t,i,c)),typeof n=="function"?n(t):n);return d&&(g=Z(Z({},g),typeof a=="function"?a(t):a)),o.createElement("span",{className:fe(b,Q({},"".concat(b,"-active"),d)),style:g})}function Tr(e){var r=e.prefixCls,t=e.marks,n=e.dots,a=e.style,u=e.activeStyle,i=o.useContext(de),c=i.min,l=i.max,E=i.step,h=o.useMemo(function(){var y=new Set;if(t.forEach(function(d){y.add(d.value)}),n&&E!==null)for(var b=c;b<=l;)y.add(b),b+=E;return Array.from(y)},[c,l,E,n,t]);return o.createElement("div",{className:"".concat(r,"-step")},h.map(function(y){return o.createElement(Rr,{prefixCls:r,key:y,value:y,style:a,activeStyle:u})}))}function Pr(e,r,t,n,a,u){var i=o.useCallback(function(d){var g=isFinite(d)?d:e;return g=Math.min(r,d),g=Math.max(e,g),g},[e,r]),c=o.useCallback(function(d){if(t!==null){var g=e+Math.round((i(d)-e)/t)*t,v=function(_){return(String(_).split(".")[1]||"").length},f=Math.max(v(t),v(r),v(e)),p=Number(g.toFixed(f));return e<=p&&p<=r?p:null}return null},[t,e,r,i]),l=o.useCallback(function(d){var g=i(d),v=n.map(function(s){return s.value});t!==null&&v.push(c(d)),v.push(e,r);var f=v[0],p=r-e;return v.forEach(function(s){var _=Math.abs(g-s);_<=p&&(f=s,p=_)}),f},[e,r,n,t,i,c]),E=function d(g,v,f){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var s,_=g[f],w=_+v,T=[];n.forEach(function(C){T.push(C.value)}),T.push(e,r),T.push(c(_));var x=v>0?1:-1;p==="unit"?T.push(c(_+x*t)):T.push(c(w)),T=T.filter(function(C){return C!==null}).filter(function(C){return v<0?C<=_:C>=_}),p==="unit"&&(T=T.filter(function(C){return C!==_}));var R=p==="unit"?_:w;s=T[0];var P=Math.abs(s-R);if(T.forEach(function(C){var j=Math.abs(C-R);j<P&&(s=C,P=j)}),s===void 0)return v<0?e:r;if(p==="dist")return s;if(Math.abs(v)>1){var N=ae(g);return N[f]=s,d(N,v-x,f,p)}return s}else{if(v==="min")return e;if(v==="max")return r}},h=function(g,v,f){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",s=g[f],_=E(g,v,f,p);return{value:_,changed:_!==s}},y=function(g){return u===null&&g===0||typeof u=="number"&&g<u},b=function(g,v,f){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",s=g.map(l),_=s[f],w=E(s,v,f,p);if(s[f]=w,a===!1){var T=u||0;f>0&&s[f-1]!==_&&(s[f]=Math.max(s[f],s[f-1]+T)),f<s.length-1&&s[f+1]!==_&&(s[f]=Math.min(s[f],s[f+1]-T))}else if(typeof u=="number"||u===null){for(var x=f+1;x<s.length;x+=1)for(var R=!0;y(s[x]-s[x-1])&&R;){var P=h(s,1,x);s[x]=P.value,R=P.changed}for(var N=f;N>0;N-=1)for(var C=!0;y(s[N]-s[N-1])&&C;){var j=h(s,-1,N-1);s[N-1]=j.value,C=j.changed}for(var k=s.length-1;k>0;k-=1)for(var $=!0;y(s[k]-s[k-1])&&$;){var A=h(s,-1,k-1);s[k-1]=A.value,$=A.changed}for(var M=0;M<s.length-1;M+=1)for(var V=!0;y(s[M+1]-s[M])&&V;){var U=h(s,1,M+1);s[M+1]=U.value,V=U.changed}}return{value:s[f],values:s}};return[l,b]}var Ar=o.forwardRef(function(e,r){var t,n=e.prefixCls,a=n===void 0?"rc-slider":n,u=e.className,i=e.style,c=e.disabled,l=c===void 0?!1:c,E=e.keyboard,h=E===void 0?!0:E,y=e.autoFocus,b=e.onFocus,d=e.onBlur,g=e.min,v=g===void 0?0:g,f=e.max,p=f===void 0?100:f,s=e.step,_=s===void 0?1:s,w=e.value,T=e.defaultValue,x=e.range,R=e.count,P=e.onChange,N=e.onBeforeChange,C=e.onAfterChange,j=e.allowCross,k=j===void 0?!0:j,$=e.pushable,A=$===void 0?!1:$,M=e.draggableTrack,V=e.reverse,U=e.vertical,F=e.included,K=F===void 0?!0:F,J=e.startPoint,_e=e.trackStyle,Se=e.handleStyle,q=e.railStyle,ue=e.dotStyle,ie=e.activeDotStyle,G=e.marks,oe=e.dots,me=e.handleRender,ge=e.tabIndex,Me=ge===void 0?0:ge,Ne=e.ariaLabelForHandle,Ce=e.ariaLabelledByForHandle,Oe=e.ariaValueTextFormatterForHandle,ee=o.useRef(),Y=o.useRef(),Ie=o.useMemo(function(){return U?V?"ttb":"btt":V?"rtl":"ltr"},[V,U]),B=o.useMemo(function(){return isFinite(v)?v:0},[v]),ye=o.useMemo(function(){return isFinite(p)?p:100},[p]),se=o.useMemo(function(){return _!==null&&_<=0?1:_},[_]),jt=o.useMemo(function(){return typeof A=="boolean"?A?se:!1:A>=0?A:!1},[A,se]),we=o.useMemo(function(){var L=Object.keys(G||{});return L.map(function(O){var S=G[O],D={value:Number(O)};return S&&Xe(S)==="object"&&!o.isValidElement(S)&&("label"in S||"style"in S)?(D.style=S.style,D.label=S.label):D.label=S,D}).filter(function(O){var S=O.label;return S||typeof S=="number"}).sort(function(O,S){return O.value-S.value})},[G]),qt=Pr(B,ye,se,we,k,jt),et=W(qt,2),Ue=et[0],tt=et[1],Wt=Er(T,{value:w}),rt=W(Wt,2),te=rt[0],$t=rt[1],X=o.useMemo(function(){var L=te==null?[]:Array.isArray(te)?te:[te],O=W(L,1),S=O[0],D=S===void 0?B:S,I=te===null?[]:[D];if(x){if(I=ae(L),R||te===void 0){var Ee=R>=0?R+1:2;for(I=I.slice(0,Ee);I.length<Ee;){var ce;I.push((ce=I[I.length-1])!==null&&ce!==void 0?ce:B)}}I.sort(function(re,xe){return re-xe})}return I.forEach(function(re,xe){I[xe]=Ue(re)}),I},[te,x,B,R,Ue]),Le=o.useRef(X);Le.current=X;var le=function(O){return x?O:O[0]},De=function(O){var S=ae(O).sort(function(D,I){return D-I});P&&!gr(S,Le.current,!0)&&P(le(S)),$t(S)},nt=function(O){if(!l){var S=0,D=ye-B;X.forEach(function(Ee,ce){var re=Math.abs(O-Ee);re<=D&&(D=re,S=ce)});var I=ae(X);I[S]=O,x&&!X.length&&R===void 0&&I.push(O),N==null||N(le(I)),De(I),C==null||C(le(I))}},Bt=function(O){O.preventDefault();var S=Y.current.getBoundingClientRect(),D=S.width,I=S.height,Ee=S.left,ce=S.top,re=S.bottom,xe=S.right,dt=O.clientX,vt=O.clientY,Re;switch(Ie){case"btt":Re=(re-vt)/I;break;case"ttb":Re=(vt-ce)/I;break;case"rtl":Re=(xe-dt)/D;break;default:Re=(dt-Ee)/D}var tr=B+Re*(ye-B);nt(Ue(tr))},Vt=o.useState(null),at=W(Vt,2),He=at[0],ut=at[1],Gt=function(O,S){if(!l){var D=tt(X,O,S);N==null||N(le(X)),De(D.values),C==null||C(le(D.values)),ut(D.value)}};o.useEffect(function(){if(He!==null){var L=X.indexOf(He);L>=0&&ee.current.focus(L)}ut(null)},[He]);var Yt=o.useMemo(function(){return M&&se===null?!1:M},[M,se]),Xt=function(){C==null||C(le(Le.current))},Qt=Mr(Y,Ie,X,B,ye,Ue,De,Xt,tt),ke=W(Qt,4),it=ke[0],Zt=ke[1],Ke=ke[2],zt=ke[3],ot=function(O,S){zt(O,S),N==null||N(le(Le.current))},st=it!==-1;o.useEffect(function(){if(!st){var L=X.lastIndexOf(Zt);ee.current.focus(L)}},[st]);var be=o.useMemo(function(){return ae(Ke).sort(function(L,O){return L-O})},[Ke]),Jt=o.useMemo(function(){return x?[be[0],be[be.length-1]]:[B,be[0]]},[be,x,B]),lt=W(Jt,2),ct=lt[0],ft=lt[1];o.useImperativeHandle(r,function(){return{focus:function(){ee.current.focus(0)},blur:function(){var O=document,S=O.activeElement;Y.current.contains(S)&&(S==null||S.blur())}}}),o.useEffect(function(){y&&ee.current.focus(0)},[]);var er=o.useMemo(function(){return{min:B,max:ye,direction:Ie,disabled:l,keyboard:h,step:se,included:K,includedStart:ct,includedEnd:ft,range:x,tabIndex:Me,ariaLabelForHandle:Ne,ariaLabelledByForHandle:Ce,ariaValueTextFormatterForHandle:Oe}},[B,ye,Ie,l,h,se,K,ct,ft,x,Me,Ne,Ce,Oe]);return o.createElement(de.Provider,{value:er},o.createElement("div",{ref:Y,className:fe(a,u,(t={},Q(t,"".concat(a,"-disabled"),l),Q(t,"".concat(a,"-vertical"),U),Q(t,"".concat(a,"-horizontal"),!U),Q(t,"".concat(a,"-with-marks"),we.length),t)),style:i,onMouseDown:Bt},o.createElement("div",{className:"".concat(a,"-rail"),style:q}),o.createElement(Cr,{prefixCls:a,style:_e,values:be,startPoint:J,onStartMove:Yt?ot:null}),o.createElement(Tr,{prefixCls:a,marks:we,dots:oe,style:ue,activeStyle:ie}),o.createElement(Sr,{ref:ee,prefixCls:a,style:Se,values:Ke,draggingIndex:it,onStartMove:ot,onOffsetChange:Gt,onFocus:b,onBlur:d,handleRender:me}),o.createElement(xr,{prefixCls:a,marks:we,onClick:nt})))}),Je={},kt={exports:{}};(function(e){function r(t){return t&&t.__esModule?t:{default:t}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(kt);var Ir=kt.exports,Ft={exports:{}};(function(e){function r(t){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Ft);var Fe=Ft.exports,qe={exports:{}},We={exports:{}},$e={exports:{}},Be={exports:{}},_t;function wr(){return _t||(_t=1,function(e){var r=Fe.default;function t(n,a){if(r(n)!="object"||!n)return n;var u=n[Symbol.toPrimitive];if(u!==void 0){var i=u.call(n,a||"default");if(r(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be)),Be.exports}var St;function Ur(){return St||(St=1,function(e){var r=Fe.default,t=wr();function n(a){var u=t(a,"string");return r(u)=="symbol"?u:u+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}($e)),$e.exports}var Mt;function Dt(){return Mt||(Mt=1,function(e){var r=Ur();function t(n,a,u){return(a=r(a))in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(We)),We.exports}var Nt;function Lr(){return Nt||(Nt=1,function(e){var r=Dt();function t(a,u){var i=Object.keys(a);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(a);u&&(c=c.filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable})),i.push.apply(i,c)}return i}function n(a){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?t(Object(i),!0).forEach(function(c){r(a,c,i[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(i,c))})}return a}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(qe)),qe.exports}var Ve={exports:{}},Ge={exports:{}},Ct;function kr(){return Ct||(Ct=1,function(e){function r(t,n){if(t==null)return{};var a={};for(var u in t)if({}.hasOwnProperty.call(t,u)){if(n.includes(u))continue;a[u]=t[u]}return a}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(Ge)),Ge.exports}var Ot;function Fr(){return Ot||(Ot=1,function(e){var r=kr();function t(n,a){if(n==null)return{};var u,i,c=r(n,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(i=0;i<l.length;i++)u=l[i],a.includes(u)||{}.propertyIsEnumerable.call(n,u)&&(c[u]=n[u])}return c}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Ve)),Ve.exports}var Te={},xt;function Dr(){if(xt)return Te;xt=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.default=void 0;var e={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){var n=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||n>=e.F1&&n<=e.F12)return!1;switch(n){case e.ALT:case e.CAPS_LOCK:case e.CONTEXT_MENU:case e.CTRL:case e.DOWN:case e.END:case e.ESC:case e.HOME:case e.INSERT:case e.LEFT:case e.MAC_FF_META:case e.META:case e.NUMLOCK:case e.NUM_CENTER:case e.PAGE_DOWN:case e.PAGE_UP:case e.PAUSE:case e.PRINT_SCREEN:case e.RIGHT:case e.SHIFT:case e.UP:case e.WIN_KEY:case e.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=e.ZERO&&t<=e.NINE||t>=e.NUM_ZERO&&t<=e.NUM_MULTIPLY||t>=e.A&&t<=e.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case e.SPACE:case e.QUESTION_MARK:case e.NUM_PLUS:case e.NUM_MINUS:case e.NUM_PERIOD:case e.NUM_DIVISION:case e.SEMICOLON:case e.DASH:case e.EQUALS:case e.COMMA:case e.PERIOD:case e.SLASH:case e.APOSTROPHE:case e.SINGLE_QUOTE:case e.OPEN_SQUARE_BRACKET:case e.BACKSLASH:case e.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};return Te.default=e,Te}var Pe={},Rt;function Hr(){if(Rt)return Pe;Rt=1;var e=Fe;Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.default=void 0;var r=n(o);function t(i){if(typeof WeakMap!="function")return null;var c=new WeakMap,l=new WeakMap;return(t=function(h){return h?l:c})(i)}function n(i,c){if(i&&i.__esModule)return i;if(i===null||e(i)!=="object"&&typeof i!="function")return{default:i};var l=t(c);if(l&&l.has(i))return l.get(i);var E={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(y!=="default"&&Object.prototype.hasOwnProperty.call(i,y)){var b=h?Object.getOwnPropertyDescriptor(i,y):null;b&&(b.get||b.set)?Object.defineProperty(E,y,b):E[y]=i[y]}return E.default=i,l&&l.set(i,E),E}var a=r.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0}),u=a;return Pe.default=u,Pe}var he={},Tt;function Kr(){if(Tt)return he;Tt=1,Object.defineProperty(he,"__esModule",{value:!0}),he.getDirectionStyle=r,he.getIndex=t,he.getOffset=e;function e(n,a,u){return(n-a)/(u-a)}function r(n,a,u,i){var c=e(a,u,i),l={};switch(n){case"rtl":l.right="".concat(c*100,"%"),l.transform="translateX(50%)";break;case"btt":l.bottom="".concat(c*100,"%"),l.transform="translateY(50%)";break;case"ttb":l.top="".concat(c*100,"%"),l.transform="translateY(-50%)";break;default:l.left="".concat(c*100,"%"),l.transform="translateX(-50%)";break}return l}function t(n,a){return Array.isArray(n)?n[a]:n}return he}var ve=Ir,jr=Fe;Object.defineProperty(Je,"__esModule",{value:!0});var Ht=Je.default=void 0,qr=ve(or()),Pt=ve(Lr()),At=ve(Dt()),Wr=ve(Fr()),Ye=Gr(o),$r=ve(nr),ne=ve(Dr()),Br=ve(Hr()),Ae=Kr(),Vr=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];function Kt(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Kt=function(a){return a?t:r})(e)}function Gr(e,r){if(e&&e.__esModule)return e;if(e===null||jr(e)!=="object"&&typeof e!="function")return{default:e};var t=Kt(r);if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}var Yr=Ye.forwardRef(function(e,r){var t,n,a=e.prefixCls,u=e.value,i=e.valueIndex,c=e.onStartMove,l=e.style,E=e.render,h=e.dragging,y=e.onOffsetChange,b=(0,Wr.default)(e,Vr),d=Ye.useContext(Br.default),g=d.min,v=d.max,f=d.direction,p=d.disabled,s=d.keyboard,_=d.range,w=d.tabIndex,T=d.ariaLabelForHandle,x=d.ariaLabelledByForHandle,R=d.ariaValueTextFormatterForHandle,P="".concat(a,"-handle"),N=function(A){p||c(A,i)},C=function(A){if(!p&&s){var M=null;switch(A.which||A.keyCode){case ne.default.LEFT:M=f==="ltr"||f==="btt"?-1:1;break;case ne.default.RIGHT:M=f==="ltr"||f==="btt"?1:-1;break;case ne.default.UP:M=f!=="ttb"?1:-1;break;case ne.default.DOWN:M=f!=="ttb"?-1:1;break;case ne.default.HOME:M="min";break;case ne.default.END:M="max";break;case ne.default.PAGE_UP:M=2;break;case ne.default.PAGE_DOWN:M=-2;break}M!==null&&(A.preventDefault(),y(M,i))}},j=(0,Ae.getDirectionStyle)(f,u,g,v),k=Ye.createElement("div",(0,qr.default)({ref:r,className:(0,$r.default)(P,(t={},(0,At.default)(t,"".concat(P,"-").concat(i+1),_),(0,At.default)(t,"".concat(P,"-dragging"),h),t)),style:(0,Pt.default)((0,Pt.default)({},j),l),onMouseDown:N,onTouchStart:N,onKeyDown:C,tabIndex:p?null:(0,Ae.getIndex)(w,i),role:"slider","aria-valuemin":g,"aria-valuemax":v,"aria-valuenow":u,"aria-disabled":p,"aria-label":(0,Ae.getIndex)(T,i),"aria-labelledby":(0,Ae.getIndex)(x,i),"aria-valuetext":(n=(0,Ae.getIndex)(R,i))===null||n===void 0?void 0:n(u),"aria-orientation":f==="ltr"||f==="rtl"?"horizontal":"vertical"},b));return E&&(k=E(k,{index:i,prefixCls:a,value:u,dragging:h})),k}),Xr=Yr;Ht=Je.default=Xr;const Qr="_container_1bhdk_1",Zr="_small_1bhdk_7",zr="_vertical_1bhdk_10",Jr="_hasArrows_1bhdk_14",en="_button_1bhdk_18",tn="_label_1bhdk_21",rn="_dot_1bhdk_29",z={container:Qr,small:Zr,vertical:zr,hasArrows:Jr,button:en,label:tn,dot:rn},nn=e=>e.reduce((r,{label:t,tooltip:n,value:a})=>(r[a]=H.jsx(wt,{text:H.jsxs(H.Fragment,{children:[n,n?": ":"",t??a]}),children:H.jsx("div",{className:z.dot})}),r),{}),an=ur(nn,ir),un=({name:e,label:r,width:t="100%",labelWidth:n="auto",value:a,min:u,max:i,step:c=1,marks:l=[],showArrows:E=!1,showTooltip:h=!1,tooltipFormatter:y=p=>p,disabled:b=!1,range:d=!1,small:g=!1,vertical:v={enabled:!1,width:"100px",height:"400px"},onChange:f=rr.noop})=>{const p=o.useContext(sr),s=an(l),_=R=>{const P=typeof r=="string"?r:String(r);f({target:{name:e??"",value:R,label:P}})},w=()=>H.jsx("div",{className:z.button,children:H.jsx(gt,{basic:!0,small:!0,round:!0,onClick:()=>_(d?[u,a==null?void 0:a[1]]:u),disabled:b||a===u||p,icon:mt.FAST_BACKWARD})}),T=()=>H.jsx("div",{className:z.button,children:H.jsx(gt,{basic:!0,small:!0,round:!0,onClick:()=>_(d?[a==null?void 0:a[0],i]:i),disabled:b||a===i||p,icon:mt.FAST_FORWARD})}),x=(R,P)=>{const N=h&&P.dragging;return H.jsx(Ht,{...R.props,...P,children:N&&H.jsx(wt,{display:"block",text:y(a),forceOpen:!0,children:H.jsx("div",{style:{position:"absolute",inset:0}})})})};return H.jsxs("div",{className:fe(z.container,g?z.small:"",v.enabled?z.vertical:""),style:v.enabled?{width:v.width,height:v.height}:{width:t},children:[E&&(v.enabled?H.jsx(T,{}):H.jsx(w,{})),H.jsx(Ar,{range:d,allowCross:!1,className:fe((b||p)&&z.rcSliderDisabled,E&&z.hasArrows),value:a,max:i,min:u,step:c,marks:s,onChange:R=>_(R),disabled:b||p,vertical:v.enabled,handleRender:x}),E&&(v.enabled?H.jsx(w,{}):H.jsx(T,{})),r&&H.jsx("label",{className:z.label,style:{width:n},children:r})]})};un.__docgenInfo={description:"",methods:[],displayName:"Slider",props:{name:{required:!1,tsType:{name:"string"},description:""},label:{required:!1,tsType:{name:"union",raw:"TStringNumberNull | ReactNode",elements:[{name:"union",raw:"string | number | null",elements:[{name:"string"},{name:"number"},{name:"null"}]},{name:"ReactNode"}]},description:""},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"'100%'",computed:!1}},labelWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"'auto'",computed:!1}},value:{required:!0,tsType:{name:"union",raw:"number | number[]",elements:[{name:"number"},{name:"Array",elements:[{name:"number"}],raw:"number[]"}]},description:""},min:{required:!0,tsType:{name:"number"},description:""},max:{required:!0,tsType:{name:"number"},description:""},step:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},marks:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
4
|
-
value: number | string;
|
|
5
|
-
label?: number | string | ReactNode;
|
|
6
|
-
tooltip?: number | string | ReactNode;
|
|
7
|
-
}`,signature:{properties:[{key:"value",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!0}},{key:"label",value:{name:"union",raw:"number | string | ReactNode",elements:[{name:"number"},{name:"string"},{name:"ReactNode"}],required:!1}},{key:"tooltip",value:{name:"union",raw:"number | string | ReactNode",elements:[{name:"number"},{name:"string"},{name:"ReactNode"}],required:!1}}]}}],raw:"TSliderMark[]"},description:"",defaultValue:{value:"[]",computed:!1}},showArrows:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},showTooltip:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},tooltipFormatter:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number | number[]) => TStringOrNumber | ReactNode",signature:{arguments:[{type:{name:"union",raw:"number | number[]",elements:[{name:"number"},{name:"Array",elements:[{name:"number"}],raw:"number[]"}]},name:"value"}],return:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]}}},description:"",defaultValue:{value:"(v) => v",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},range:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},vertical:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
width?: string;
|
|
10
|
-
height?: string;
|
|
11
|
-
}`,signature:{properties:[{key:"enabled",value:{name:"boolean",required:!0}},{key:"width",value:{name:"string",required:!1}},{key:"height",value:{name:"string",required:!1}}]}},description:"",defaultValue:{value:`{
|
|
12
|
-
enabled: false,
|
|
13
|
-
width: '100px',
|
|
14
|
-
height: '400px',
|
|
15
|
-
}`,computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
16
|
-
event: TChangeEvent<T>,
|
|
17
|
-
...additionalProps: { [key: string]: any }[]
|
|
18
|
-
) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
|
|
19
|
-
target:
|
|
20
|
-
| T
|
|
21
|
-
| { name: string; value: any; label?: string; files?: FileList | null };
|
|
22
|
-
}`,elements:[{name:"ChangeEvent",elements:[{name:"T"}],raw:"ChangeEvent<T>"},{name:"signature",type:"object",raw:`{
|
|
23
|
-
target:
|
|
24
|
-
| T
|
|
25
|
-
| { name: string; value: any; label?: string; files?: FileList | null };
|
|
26
|
-
}`,signature:{properties:[{key:"target",value:{name:"union",raw:`| T
|
|
27
|
-
| { name: string; value: any; label?: string; files?: FileList | null }`,elements:[{name:"T"},{name:"signature",type:"object",raw:"{ name: string; value: any; label?: string; files?: FileList | null }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"value",value:{name:"any",required:!0}},{key:"label",value:{name:"string",required:!1}},{key:"files",value:{name:"union",raw:"FileList | null",elements:[{name:"FileList"},{name:"null"}],required:!1}}]}}],required:!0}}]}}]},name:"event"},{type:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ [key: string]: any }",signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}}],raw:"{ [key: string]: any }[]"},name:"additionalProps",rest:!0}],return:{name:"void"}}},description:"",defaultValue:{value:"noop",computed:!0}}}};export{un as S};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as de}from"./index-DhsZuJvc.js";import{S as V}from"./slider-CSesKEJF.js";import{T as pe}from"./text-B3-TSWok.js";import"./lodash-c4VUpsOs.js";import"./objectSpread2-DW4nTBoq.js";import"./index-Bk2sglWO.js";import"./extends-CF3RwP-h.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./memoize-one.esm-CcMeOnPo.js";import"./index-BI4_Bp97.js";import"./icon-BP4BO6-k.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./common-types-Sih75Sav.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./button-CjbZ5CrF.js";import"./spinner-AWUe4xwQ.js";const{useArgs:ce}=__STORYBOOK_MODULE_PREVIEW_API__,ve=[{label:"S1...",tooltip:"S1 Production",value:20},{label:"S2...",tooltip:"S2 Cementing",value:40},{label:"S3...",tooltip:e.jsxs("span",{children:[e.jsx("strong",{children:"S3"})," Drilling"]}),value:60},{label:"S4...",tooltip:"S4 Shut in",value:80},{label:"S5...",tooltip:"S5 Circulate",value:100}],Le={title:"Forms/Slider",component:V,args:{value:50,min:0,max:100}},a=r=>{const[S,b]=de.useState(r.value);return e.jsx("div",{style:{paddingTop:40},children:e.jsx(V,{...r,value:S,onChange:x=>b(x.target.value)})})},h=a.bind({}),t=a.bind({});t.args={range:!0,value:[10,40]};const n=a.bind({});n.args={label:"Number of aardvarks"};const l=a.bind({});l.args={range:!0,value:[10,40],showArrows:!0};const o=r=>{const[{value:S},b]=ce(),x=ue=>{b({value:ue.target.value})};return e.jsx(e.Fragment,{children:e.jsx(V,{...r,label:e.jsxs("span",{children:["Fixed width label: ",e.jsx("strong",{children:S*Math.random()})]}),labelWidth:"400px",value:S,onChange:x})})},i=a.bind({});i.args={showTooltip:!0};const u=a.bind({});u.args={showTooltip:!0,tooltipFormatter:r=>e.jsx(pe,{warning:!0,children:`${r} extra info lorem ipsum`})};const d=a.bind({});d.args={showArrows:!0};const p=a.bind({});p.args={marks:[{value:20},{value:40},{value:60},{value:80},{value:100}]};const c=a.bind({});c.args={marks:[{tooltip:"S1 Production",value:20},{tooltip:"S2 Cementing",value:40},{tooltip:e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"S3"})," Drilling"]}),value:60},{tooltip:"S4 Shut in",value:80},{tooltip:"S5 Circulate",value:100}]};const v=a.bind({});v.args={marks:[{label:"20m",value:20},{label:"40m",value:40},{label:"60m",value:60},{label:"80m",value:80},{label:"100m",value:100}]};const s=a.bind({});s.args={small:!0};s.parameters={docs:{description:{story:"Reduces the vertical height of the `Slider` container to align with other `small` elements."}}};const g=a.bind({});g.args={disabled:!0};const m=a.bind({});m.args={marks:ve,vertical:{enabled:!0,width:"100px",height:"400px"}};o.__docgenInfo={description:"",methods:[],displayName:"JSXLabel"};var j,T,C;h.parameters={...h.parameters,docs:{...(j=h.parameters)==null?void 0:j.docs,source:{originalSource:`args => {
|
|
2
|
-
const [value, setValue] = useState(args.value);
|
|
3
|
-
return <div style={{
|
|
4
|
-
paddingTop: 40
|
|
5
|
-
}}>
|
|
6
|
-
<Slider
|
|
7
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
8
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
9
|
-
</div>;
|
|
10
|
-
}`,...(C=(T=h.parameters)==null?void 0:T.docs)==null?void 0:C.source}}};var y,w,A;t.parameters={...t.parameters,docs:{...(y=t.parameters)==null?void 0:y.docs,source:{originalSource:`args => {
|
|
11
|
-
const [value, setValue] = useState(args.value);
|
|
12
|
-
return <div style={{
|
|
13
|
-
paddingTop: 40
|
|
14
|
-
}}>
|
|
15
|
-
<Slider
|
|
16
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
18
|
-
</div>;
|
|
19
|
-
}`,...(A=(w=t.parameters)==null?void 0:w.docs)==null?void 0:A.source}}};var _,f,k;n.parameters={...n.parameters,docs:{...(_=n.parameters)==null?void 0:_.docs,source:{originalSource:`args => {
|
|
20
|
-
const [value, setValue] = useState(args.value);
|
|
21
|
-
return <div style={{
|
|
22
|
-
paddingTop: 40
|
|
23
|
-
}}>
|
|
24
|
-
<Slider
|
|
25
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
26
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
27
|
-
</div>;
|
|
28
|
-
}`,...(k=(f=n.parameters)==null?void 0:f.docs)==null?void 0:k.source}}};var M,W,E;l.parameters={...l.parameters,docs:{...(M=l.parameters)==null?void 0:M.docs,source:{originalSource:`args => {
|
|
29
|
-
const [value, setValue] = useState(args.value);
|
|
30
|
-
return <div style={{
|
|
31
|
-
paddingTop: 40
|
|
32
|
-
}}>
|
|
33
|
-
<Slider
|
|
34
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
36
|
-
</div>;
|
|
37
|
-
}`,...(E=(W=l.parameters)==null?void 0:W.docs)==null?void 0:E.source}}};var F,L,R;o.parameters={...o.parameters,docs:{...(F=o.parameters)==null?void 0:F.docs,source:{originalSource:`args => {
|
|
38
|
-
const [{
|
|
39
|
-
value
|
|
40
|
-
}, updateArgs] = useArgs();
|
|
41
|
-
const handleChange = (evt: any) => {
|
|
42
|
-
updateArgs({
|
|
43
|
-
value: evt.target.value
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
return <>
|
|
47
|
-
<Slider
|
|
48
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
49
|
-
{...args} label={<span>
|
|
50
|
-
Fixed width label: <strong>{value * Math.random()}</strong>
|
|
51
|
-
</span>} labelWidth="400px" value={value} onChange={handleChange} />
|
|
52
|
-
</>;
|
|
53
|
-
}`,...(R=(L=o.parameters)==null?void 0:L.docs)==null?void 0:R.source}}};var D,O,P;i.parameters={...i.parameters,docs:{...(D=i.parameters)==null?void 0:D.docs,source:{originalSource:`args => {
|
|
54
|
-
const [value, setValue] = useState(args.value);
|
|
55
|
-
return <div style={{
|
|
56
|
-
paddingTop: 40
|
|
57
|
-
}}>
|
|
58
|
-
<Slider
|
|
59
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
60
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
61
|
-
</div>;
|
|
62
|
-
}`,...(P=(O=i.parameters)==null?void 0:O.docs)==null?void 0:P.source}}};var I,J,X;u.parameters={...u.parameters,docs:{...(I=u.parameters)==null?void 0:I.docs,source:{originalSource:`args => {
|
|
63
|
-
const [value, setValue] = useState(args.value);
|
|
64
|
-
return <div style={{
|
|
65
|
-
paddingTop: 40
|
|
66
|
-
}}>
|
|
67
|
-
<Slider
|
|
68
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
69
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
70
|
-
</div>;
|
|
71
|
-
}`,...(X=(J=u.parameters)==null?void 0:J.docs)==null?void 0:X.source}}};var N,B,K;d.parameters={...d.parameters,docs:{...(N=d.parameters)==null?void 0:N.docs,source:{originalSource:`args => {
|
|
72
|
-
const [value, setValue] = useState(args.value);
|
|
73
|
-
return <div style={{
|
|
74
|
-
paddingTop: 40
|
|
75
|
-
}}>
|
|
76
|
-
<Slider
|
|
77
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
78
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
79
|
-
</div>;
|
|
80
|
-
}`,...(K=(B=d.parameters)==null?void 0:B.docs)==null?void 0:K.source}}};var U,Y,$;p.parameters={...p.parameters,docs:{...(U=p.parameters)==null?void 0:U.docs,source:{originalSource:`args => {
|
|
81
|
-
const [value, setValue] = useState(args.value);
|
|
82
|
-
return <div style={{
|
|
83
|
-
paddingTop: 40
|
|
84
|
-
}}>
|
|
85
|
-
<Slider
|
|
86
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
87
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
88
|
-
</div>;
|
|
89
|
-
}`,...($=(Y=p.parameters)==null?void 0:Y.docs)==null?void 0:$.source}}};var q,z,G;c.parameters={...c.parameters,docs:{...(q=c.parameters)==null?void 0:q.docs,source:{originalSource:`args => {
|
|
90
|
-
const [value, setValue] = useState(args.value);
|
|
91
|
-
return <div style={{
|
|
92
|
-
paddingTop: 40
|
|
93
|
-
}}>
|
|
94
|
-
<Slider
|
|
95
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
96
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
97
|
-
</div>;
|
|
98
|
-
}`,...(G=(z=c.parameters)==null?void 0:z.docs)==null?void 0:G.source}}};var H,Q,Z;v.parameters={...v.parameters,docs:{...(H=v.parameters)==null?void 0:H.docs,source:{originalSource:`args => {
|
|
99
|
-
const [value, setValue] = useState(args.value);
|
|
100
|
-
return <div style={{
|
|
101
|
-
paddingTop: 40
|
|
102
|
-
}}>
|
|
103
|
-
<Slider
|
|
104
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
105
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
106
|
-
</div>;
|
|
107
|
-
}`,...(Z=(Q=v.parameters)==null?void 0:Q.docs)==null?void 0:Z.source}}};var ee,ae,re;s.parameters={...s.parameters,docs:{...(ee=s.parameters)==null?void 0:ee.docs,source:{originalSource:`args => {
|
|
108
|
-
const [value, setValue] = useState(args.value);
|
|
109
|
-
return <div style={{
|
|
110
|
-
paddingTop: 40
|
|
111
|
-
}}>
|
|
112
|
-
<Slider
|
|
113
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
114
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
115
|
-
</div>;
|
|
116
|
-
}`,...(re=(ae=s.parameters)==null?void 0:ae.docs)==null?void 0:re.source}}};var se,te,ne;g.parameters={...g.parameters,docs:{...(se=g.parameters)==null?void 0:se.docs,source:{originalSource:`args => {
|
|
117
|
-
const [value, setValue] = useState(args.value);
|
|
118
|
-
return <div style={{
|
|
119
|
-
paddingTop: 40
|
|
120
|
-
}}>
|
|
121
|
-
<Slider
|
|
122
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
123
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
124
|
-
</div>;
|
|
125
|
-
}`,...(ne=(te=g.parameters)==null?void 0:te.docs)==null?void 0:ne.source}}};var le,oe,ie;m.parameters={...m.parameters,docs:{...(le=m.parameters)==null?void 0:le.docs,source:{originalSource:`args => {
|
|
126
|
-
const [value, setValue] = useState(args.value);
|
|
127
|
-
return <div style={{
|
|
128
|
-
paddingTop: 40
|
|
129
|
-
}}>
|
|
130
|
-
<Slider
|
|
131
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
132
|
-
{...args} value={value} onChange={evt => setValue(evt.target.value)} />
|
|
133
|
-
</div>;
|
|
134
|
-
}`,...(ie=(oe=m.parameters)==null?void 0:oe.docs)==null?void 0:ie.source}}};const Re=["Default","Range","Label","RangeWithArrows","JSXLabel","Tooltip","FormattedTooltip","Arrows","Marks","MarksWithExtraTooltip","MarksWithCustomLabel","Small","Disabled","Vertical"];export{d as Arrows,h as Default,g as Disabled,u as FormattedTooltip,o as JSXLabel,n as Label,p as Marks,v as MarksWithCustomLabel,c as MarksWithExtraTooltip,t as Range,l as RangeWithArrows,s as Small,i as Tooltip,m as Vertical,Re as __namedExportsOrder,Le as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-eps93zm2.js";import{H as E,L as i,S as j,R as c}from"./react-router-dom-CMITYWBH.js";import{F as y}from"./flex-EllkLxgO.js";import{T as S}from"./text-B3-TSWok.js";import"./index-DhsZuJvc.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./extends-CF3RwP-h.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-Bk2sglWO.js";const s=({children:a,href:o=void 0,target:T=void 0,testId:R,onClick:L,component:v="a"})=>e.jsx(v,{href:o,to:o,target:T,onClick:L,"data-testid":R,children:e.jsx(S,{link:!0,children:a})});s.__docgenInfo={description:"",methods:[],displayName:"TextLink",props:{href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"undefined",computed:!0}},target:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"undefined",computed:!0}},testId:{required:!1,tsType:{name:"string"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLAnchorElement, MouseEvent>",elements:[{name:"HTMLAnchorElement"},{name:"MouseEvent"}]},name:"e"}],return:{name:"void"}}},description:""},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},component:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:"'a'",computed:!1}}}};const I={title:"Basic/TextLink",component:s,args:{children:"Link text goes here",href:"http://oliasoft.com"}},k=a=>e.jsx(s,{...a}),n=k.bind({}),t=k.bind({});t.args={href:void 0,onClick:()=>console.log("Clicked!")};const r=()=>e.jsxs(E,{children:[e.jsxs(y,{gap:!0,children:[e.jsx(s,{component:i,href:"/dashboard",children:"Dashboard"}),e.jsx(s,{component:i,href:"/settings",children:"Settings"})]}),e.jsxs(j,{children:[e.jsx(c,{path:"/dashboard",children:"Dashboard"}),e.jsx(c,{path:"/settings",children:"Settings"})]})]});r.__docgenInfo={description:"",methods:[],displayName:"AsRouterLink"};var d,p,m;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:"args => <TextLink {...args} />",...(m=(p=n.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var u,l,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:"args => <TextLink {...args} />",...(h=(l=t.parameters)==null?void 0:l.docs)==null?void 0:h.source}}};var g,f,x;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`() => <HashRouter>
|
|
2
|
-
<Flex gap>
|
|
3
|
-
<TextLink component={Link} href="/dashboard">
|
|
4
|
-
Dashboard
|
|
5
|
-
</TextLink>
|
|
6
|
-
<TextLink component={Link} href="/settings">
|
|
7
|
-
Settings
|
|
8
|
-
</TextLink>
|
|
9
|
-
</Flex>
|
|
10
|
-
<Switch>
|
|
11
|
-
<Route path="/dashboard">Dashboard</Route>
|
|
12
|
-
<Route path="/settings">Settings</Route>
|
|
13
|
-
</Switch>
|
|
14
|
-
</HashRouter>`,...(x=(f=r.parameters)==null?void 0:f.docs)==null?void 0:x.source}}};const O=["Default","OnClick","AsRouterLink"];export{r as AsRouterLink,n as Default,t as OnClick,O as __namedExportsOrder,I as default};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-eps93zm2.js";import{H as I,L as c,S as D,R as l}from"./react-router-dom-CMITYWBH.js";import{I as O,T as A}from"./common-types-Sih75Sav.js";import{T as p}from"./top-bar-4AZm07Mc.js";import{P as w}from"./page-7SSpdYhb.js";import{M as N}from"./actions-KLRbmKRF.js";import{B as m}from"./button-CjbZ5CrF.js";import{B as P}from"./badge-CLQ59MDF.js";import{L as v}from"./logo-BVP9045W.js";import{s as H}from"./icon-custom-Xcl4YkWP.js";import{M as s}from"./types-BmbYqTX_.js";import"./index-DhsZuJvc.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./extends-CF3RwP-h.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-Bk2sglWO.js";import"./icon-BP4BO6-k.js";import"./disabled-context-rmpd7YJS.js";import"./lodash-c4VUpsOs.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./types-Dx2TtIG9.js";import"./spinner-AWUe4xwQ.js";const M=[{type:"Link",label:"Link",onClick:()=>{}},{type:"Link",label:"Active",active:!0,onClick:()=>{}},{type:"Link",label:"Disabled",disabled:!0,onClick:()=>{}},{type:"Menu",label:"Dropdown",onClick:()=>{},sections:[{type:"Option",label:"Alpacas",onClick:()=>{}},{type:"Option",label:"Llamas",onClick:()=>{}}]},{type:"Button",label:"Save",colored:!0,onClick:()=>{},testId:"top-bar-button-save"}],E=[{type:"Component",component:e.jsx(P,{title:"3",small:!0,margin:"5px",children:e.jsx(m,{icon:O.NOTIFICATION,round:!0,onClick:()=>{}})})},{type:"Component",component:e.jsx(N,{menu:{trigger:A.COMPONENT,fullHeightTrigger:!0,placement:"bottom-end",component:e.jsx(m,{label:"TU",round:!0,onClick:()=>{}}),sections:[{type:s.HEADING,label:"Test User"},{type:s.OPTION,label:"Profile",icon:"user",onClick:()=>{}},{type:s.DIVIDER},{type:s.OPTION,label:"Sign out",icon:"lock",onClick:()=>{}}]}})}],le={title:"Navigation/TopBar",component:p,parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}},argTypes:{height:{control:"text"}},args:{title:{logo:e.jsx("img",{src:v,alt:"logo"}),onClick:()=>{}},content:M,contentRight:E}},i=j=>e.jsx(p,{...j}),n=i.bind({}),t=i.bind({});t.args={warning:"Application update available. Please refresh your browser."};const r=i.bind({});r.args={title:{label:"Text Branding",onClick:()=>{}}};const o=i.bind({});o.args={appSwitcher:{icon:H,onClick:()=>{}}};const a=()=>e.jsx(I,{children:e.jsxs(w,{left:0,children:[e.jsx(p,{content:[{type:"Link",label:"Dashboard",component:c,url:"/dashboard"},{type:"Link",label:"Settings",component:c,url:"/settings"}]}),e.jsxs(D,{children:[e.jsx(l,{path:"/dashboard",children:"Dashboard"}),e.jsx(l,{path:"/settings",children:"Settings"})]})]})});a.__docgenInfo={description:"",methods:[],displayName:"AsRouterLink"};var d,u,g;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:"args => <TopBar {...args} />",...(g=(u=n.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};var h,b,k;t.parameters={...t.parameters,docs:{...(h=t.parameters)==null?void 0:h.docs,source:{originalSource:"args => <TopBar {...args} />",...(k=(b=t.parameters)==null?void 0:b.docs)==null?void 0:k.source}}};var T,y,f;r.parameters={...r.parameters,docs:{...(T=r.parameters)==null?void 0:T.docs,source:{originalSource:"args => <TopBar {...args} />",...(f=(y=r.parameters)==null?void 0:y.docs)==null?void 0:f.source}}};var x,S,C;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:"args => <TopBar {...args} />",...(C=(S=o.parameters)==null?void 0:S.docs)==null?void 0:C.source}}};var L,B,R;a.parameters={...a.parameters,docs:{...(L=a.parameters)==null?void 0:L.docs,source:{originalSource:`() => {
|
|
2
|
-
return <HashRouter>
|
|
3
|
-
<Page left={0}>
|
|
4
|
-
<TopBar content={[{
|
|
5
|
-
type: 'Link',
|
|
6
|
-
label: 'Dashboard',
|
|
7
|
-
component: Link,
|
|
8
|
-
url: '/dashboard'
|
|
9
|
-
}, {
|
|
10
|
-
type: 'Link',
|
|
11
|
-
label: 'Settings',
|
|
12
|
-
component: Link,
|
|
13
|
-
url: '/settings'
|
|
14
|
-
}]} />
|
|
15
|
-
<Switch>
|
|
16
|
-
<Route path="/dashboard">Dashboard</Route>
|
|
17
|
-
<Route path="/settings">Settings</Route>
|
|
18
|
-
</Switch>
|
|
19
|
-
</Page>
|
|
20
|
-
</HashRouter>;
|
|
21
|
-
}`,...(R=(B=a.parameters)==null?void 0:B.docs)==null?void 0:R.source}}};const me=["Default","WithWarning","TextBranding","AppSwitcher","AsRouterLink"];export{o as AppSwitcher,a as AsRouterLink,n as Default,r as TextBranding,t as WithWarning,me as __namedExportsOrder,le as default};
|