welcome-ui 1.0.0-beta.9 → 7.0.0-alpha.6
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/{AXB53BZF-DCqNWRx3.mjs → AXB53BZF-CGoc4K3d.mjs} +3 -3
- package/dist/{AXB53BZF-CAQ85RSy.js → AXB53BZF-KWM2jKTz.js} +1 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.mjs +11 -11
- package/dist/Alert.js +4 -4
- package/dist/Alert.mjs +29 -29
- package/dist/AspectRatio.js +1 -1
- package/dist/AspectRatio.mjs +5 -5
- package/dist/Avatar.js +3 -3
- package/dist/Avatar.mjs +8 -8
- package/dist/{BYC7LY2E-BE1a2svb.js → BYC7LY2E-BkAEL2VD.js} +1 -1
- package/dist/{BYC7LY2E-BNqcw1O8.mjs → BYC7LY2E-CVjUW1dr.mjs} +4 -4
- package/dist/Badge.js +1 -1
- package/dist/Badge.mjs +5 -5
- package/dist/Breadcrumb.js +54 -1
- package/dist/Breadcrumb.mjs +438 -8
- package/dist/Button.js +4 -4
- package/dist/Button.mjs +10 -10
- package/dist/ButtonGroup.js +1 -1
- package/dist/ButtonGroup.mjs +5 -5
- package/dist/Card.js +2 -2
- package/dist/Card.mjs +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ClearButton.js +3 -3
- package/dist/ClearButton.mjs +10 -10
- package/dist/CloseButton.js +2 -2
- package/dist/CloseButton.mjs +6 -6
- package/dist/CustomInput-BCCxIle7.mjs +7826 -0
- package/dist/CustomInput-CDNZy-pz.js +1070 -0
- package/dist/DatePicker.js +1 -1
- package/dist/DatePicker.mjs +1 -1
- package/dist/DateTimePicker.js +1 -1
- package/dist/DateTimePicker.mjs +15 -15
- package/dist/DateTimePickerCommon.js +1 -1
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.js +64 -1
- package/dist/Drawer.mjs +266 -10
- package/dist/DropdownMenu.js +1 -1
- package/dist/DropdownMenu.mjs +9 -9
- package/dist/Field.js +2 -2
- package/dist/Field.mjs +10 -10
- package/dist/FieldGroup.js +1 -1
- package/dist/FieldGroup.mjs +8 -8
- package/dist/FileDrop.js +46 -1
- package/dist/FileDrop.mjs +2324 -8
- package/dist/FileUpload.js +2 -2
- package/dist/FileUpload.mjs +10 -10
- package/dist/Hint.js +1 -1
- package/dist/Hint.mjs +6 -6
- package/dist/{ITI7HKP4-Couz1Z73.mjs → ITI7HKP4-BONrZ9Pq.mjs} +3 -3
- package/dist/Icon.js +1 -1
- package/dist/Icon.mjs +5 -5
- package/dist/{index.js → Icons.js} +6 -23
- package/dist/{index.mjs → Icons.mjs} +1348 -3484
- package/dist/{IconFont.js → IconsFont.js} +1 -1
- package/dist/{IconFont.mjs → IconsFont.mjs} +2 -2
- package/dist/InputText.js +3 -3
- package/dist/InputText.mjs +14 -14
- package/dist/{JC64G2H7-HxATiU-t.mjs → JC64G2H7-Dey-8h60.mjs} +4 -4
- package/dist/{JC64G2H7-VmOGyhc1.js → JC64G2H7-YkBMNrtl.js} +1 -1
- package/dist/{KUU7WJ55-bC4FU_j7.mjs → KUU7WJ55-3sP-w1F1.mjs} +13 -13
- package/dist/{LVA2YJMS-Dm5ieEMw.mjs → LVA2YJMS-qFC9J-lt.mjs} +18 -18
- package/dist/Label.js +35 -1
- package/dist/Label.mjs +76 -7
- package/dist/Link.js +2 -2
- package/dist/Link.mjs +9 -9
- package/dist/Loader.js +3 -3
- package/dist/Loader.mjs +9 -9
- package/dist/Logo.js +3 -1
- package/dist/Logo.mjs +45 -5
- package/dist/{MTZPJQMC-D0pYOjc_.js → MTZPJQMC-5Xg78Uyy.js} +1 -1
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +13 -0
- package/dist/Modal.js +5 -5
- package/dist/Modal.mjs +14 -14
- package/dist/{NLEBE274-FThuwZH_.mjs → NLEBE274-C94QU78N.mjs} +19 -19
- package/dist/{P2CTZE2T-5jxBu6ix.mjs → P2CTZE2T-YPes1GXe.mjs} +28 -28
- package/dist/{P4IRICAX-C0oIr4wI.mjs → P4IRICAX-DzXqUYe-.mjs} +10 -10
- package/dist/{P4IRICAX-t3xfwWga.js → P4IRICAX-nhgZ26A1.js} +1 -1
- package/dist/Pagination.js +3 -3
- package/dist/Pagination.mjs +10 -10
- package/dist/PasswordInput.js +1 -1
- package/dist/PasswordInput.mjs +53 -5
- package/dist/Picker.js +2 -2
- package/dist/Picker.mjs +13 -13
- package/dist/Popover.js +31 -1
- package/dist/Popover.mjs +141 -5
- package/dist/{QYJ6MIDR-YegHsExc.mjs → QYJ6MIDR-BLLqyXdd.mjs} +12 -12
- package/dist/{QYJ6MIDR-T-fJ_t8N.js → QYJ6MIDR-CRK3satR.js} +1 -1
- package/dist/Radio.js +3 -3
- package/dist/Radio.mjs +16 -16
- package/dist/RadioGroup.js +1 -1
- package/dist/RadioGroup.mjs +11 -11
- package/dist/RadioTab.js +4 -4
- package/dist/RadioTab.mjs +12 -12
- package/dist/{SYRFVSLH-Babm193P.js → SYRFVSLH-BpAfr7UE.js} +1 -1
- package/dist/{SYRFVSLH-DXZgEwus.mjs → SYRFVSLH-cVmYtx36.mjs} +6 -6
- package/dist/Search.js +8 -8
- package/dist/Search.mjs +46 -46
- package/dist/Select.js +122 -1
- package/dist/Select.mjs +1070 -11
- package/dist/Shape.js +3 -3
- package/dist/Shape.mjs +5 -5
- package/dist/Slider.js +1 -1
- package/dist/Slider.mjs +3 -3
- package/dist/Swiper.js +2 -2
- package/dist/Swiper.mjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.js +8 -8
- package/dist/Tabs.mjs +178 -173
- package/dist/Tag.js +3 -3
- package/dist/Tag.mjs +10 -10
- package/dist/Text.js +1 -1
- package/dist/Text.mjs +4 -4
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.mjs +9 -9
- package/dist/TimePicker.js +2 -2
- package/dist/TimePicker.mjs +11 -11
- package/dist/Toast.js +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/Toggle.mjs +7 -7
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.mjs +10 -10
- package/dist/UniversalLink.js +1 -1
- package/dist/UniversalLink.mjs +4 -4
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +20 -0
- package/dist/{VEVQD5MH-Cal9SWXl.js → VEVQD5MH-mN1wMozH.js} +1 -1
- package/dist/{VGCJ63VH-BqPfqkK_.mjs → VGCJ63VH-B39w1tBw.mjs} +19 -19
- package/dist/{VGCJ63VH-Cuf7P3qW.js → VGCJ63VH-BNLwLOaC.js} +1 -1
- package/dist/VariantIcon.js +8 -1
- package/dist/VariantIcon.mjs +30 -4
- package/dist/WelcomeLoader.js +11 -1
- package/dist/WelcomeLoader.mjs +5086 -25
- package/dist/X5NMLKT6-uFSu0Lii.mjs +25 -0
- package/dist/{YV4JVR4I-1ezWeCCz.mjs → YV4JVR4I-BGfUf3Nu.mjs} +1 -1
- package/dist/downshift.esm-BOfUfcgd.mjs +1085 -0
- package/dist/downshift.esm-dvOEflhK.js +1 -0
- package/dist/hex-to-rgba-BIDK-3ab.mjs +11 -0
- package/dist/hex-to-rgba-cCYXRc5D.js +1 -0
- package/dist/index-23RJrN0D.js +1 -0
- package/dist/{index-CQyLvMJP.js → index-BHi0wohR.js} +23 -23
- package/dist/index-BJAZgeHL.mjs +11 -0
- package/dist/index-BJzGkA7x.js +1 -0
- package/dist/index-BLom3M2B.js +2 -0
- package/dist/index-BNGGwOCo.mjs +11 -0
- package/dist/index-BQtDgQBH.mjs +11 -0
- package/dist/{index-BZmKn5VO.mjs → index-BYdkhqH4.mjs} +14 -11
- package/dist/{index-DCOLdphy.mjs → index-CDjY0N2Z.mjs} +11 -11
- package/dist/index-CExLVjET.mjs +26 -0
- package/dist/{index-C_r0bVmL.js → index-CUtaVckz.js} +1 -1
- package/dist/{index-BxWjuyQw.js → index-CxDKPhvU.js} +1 -1
- package/dist/index-D4H6DSEx.mjs +133 -0
- package/dist/index-D6MJAN7T.js +1 -0
- package/dist/index-DEJJvyGk.mjs +66 -0
- package/dist/index-DTx8atxB.js +1 -0
- package/dist/index-Db47iJVz.js +1 -0
- package/dist/{index-DRa_xux4.mjs → index-RUkz9Z2V.mjs} +27 -53
- package/dist/index-SbQUT2mU.mjs +639 -0
- package/dist/index-_wqLxu7x.js +1 -0
- package/dist/index-gts_19_n.js +1 -0
- package/dist/{index-CQ1IPLlk.mjs → index-u1oHKa7X.mjs} +13 -61
- package/dist/{radio-group-29lMl-2M.mjs → radio-group-CGC6DTFJ.mjs} +14 -14
- package/dist/theme.js +18 -0
- package/dist/theme.mjs +1649 -0
- package/dist/types/components/Alert/styles.d.ts +2 -2
- package/dist/types/components/Avatar/styles.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +1 -1
- package/dist/types/components/Card/Cover.styles.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -1
- package/dist/types/components/ClearButton/styles.d.ts +1 -1
- package/dist/types/components/CloseButton/styles.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +2 -2
- package/dist/types/components/Drawer/styles.d.ts +1 -1
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/styles.d.ts +1 -1
- package/dist/types/components/Field/index.d.ts +1 -1
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +1 -1
- package/dist/types/components/Icon/styles.d.ts +1 -1
- package/dist/types/components/IconsFont/_hash.d.ts +1 -0
- package/dist/types/components/{IconFont → IconsFont}/index.d.ts +4 -4
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/Logo/index.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +4 -4
- package/dist/types/components/Modal/Assets/styles.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +4 -4
- package/dist/types/components/Modal/styles.d.ts +2 -2
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/PopoverHover.d.ts +1 -1
- package/dist/types/components/Popover/Trigger.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +2 -2
- package/dist/types/components/Shape/styles.d.ts +1 -1
- package/dist/types/components/Slider/Range.d.ts +1 -1
- package/dist/types/components/Slider/index.d.ts +1 -1
- package/dist/types/components/Slider/styles.d.ts +5 -5
- package/dist/types/components/Tabs/TabList.d.ts +1 -1
- package/dist/types/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +1 -1
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +3 -3
- package/dist/types/components/Toast/styles.d.ts +8 -8
- package/dist/utils.js +1 -0
- package/dist/utils.mjs +77 -0
- package/package.json +52 -67
- package/dist/CustomInput-CHhz-wtr.js +0 -1064
- package/dist/CustomInput-DsJYqH0X.mjs +0 -1272
- package/dist/MTZPJQMC-C9lHSyrL.mjs +0 -13
- package/dist/VEVQD5MH-DOp_qaPw.mjs +0 -20
- package/dist/Welcome-BNr4uu5n.mjs +0 -48
- package/dist/Welcome-Dw9OaREs.js +0 -3
- package/dist/X5NMLKT6-DGZEtYXj.mjs +0 -25
- package/dist/index-B8roHPE-.js +0 -64
- package/dist/index-BFQbRuqA.mjs +0 -165
- package/dist/index-BjGfAqCk.mjs +0 -209
- package/dist/index-Bn9aiaUQ.mjs +0 -193
- package/dist/index-CiYwvMF0.js +0 -8
- package/dist/index-Cjf3wLkx.mjs +0 -272
- package/dist/index-CmBs24Im.mjs +0 -413
- package/dist/index-D3Tnfi3U.mjs +0 -83
- package/dist/index-DG7ovxHW.js +0 -117
- package/dist/index-DHCyCfRv.js +0 -35
- package/dist/index-DSZG0Sqy.js +0 -54
- package/dist/index-DhF591OM.js +0 -42
- package/dist/index-gPtu0TOV.js +0 -1
- package/dist/types/components/index.d.ts +0 -61
- package/dist/types/index.d.ts +0 -3
- package/dist/usePopover-AbS2gpZq.mjs +0 -144
- package/dist/usePopover-CzPtX0h_.js +0 -31
- package/dist/types/components/{IconFont → IconsFont}/styles.d.ts +1 -1
package/dist/Breadcrumb.js
CHANGED
|
@@ -1 +1,54 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react")
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),de=require("./throttle-BB1Y3bfD.js"),u=require("@xstyled/styled-components"),j=require("./System.js"),ve=require("./Box.js"),fe=require("./hex-to-rgba-cCYXRc5D.js");require("./Icon.js");const he=require("./index-BNwz4P5j.js");var E=[],pe=function(){return E.some(function(e){return e.activeTargets.length>0})},be=function(){return E.some(function(e){return e.skippedTargets.length>0})},G="ResizeObserver loop completed with undelivered notifications.",ge=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:G}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=G),window.dispatchEvent(e)},C;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(C||(C={}));var w=function(e){return Object.freeze(e)},me=function(){function e(t,r){this.inlineSize=t,this.blockSize=r,w(this)}return e}(),ee=function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,w(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,a=t.right,o=t.bottom,v=t.left,f=t.width,l=t.height;return{x:r,y:n,top:i,right:a,bottom:o,left:v,width:f,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),_=function(e){return e instanceof SVGElement&&"getBBox"in e},te=function(e){if(_(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},V=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},xe=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},S=typeof window<"u"?window:{},M=new WeakMap,X=/auto|scroll/,Ee=/^tb|vertical/,we=/msie|trident/i.test(S.navigator&&S.navigator.userAgent),p=function(e){return parseFloat(e||"0")},y=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new me((r?t:e)||0,(r?e:t)||0)},J=w({devicePixelContentBoxSize:y(),borderBoxSize:y(),contentBoxSize:y(),contentRect:new ee(0,0,0,0)}),re=function(e,t){if(t===void 0&&(t=!1),M.has(e)&&!t)return M.get(e);if(te(e))return M.set(e,J),J;var r=getComputedStyle(e),n=_(e)&&e.ownerSVGElement&&e.getBBox(),i=!we&&r.boxSizing==="border-box",a=Ee.test(r.writingMode||""),o=!n&&X.test(r.overflowY||""),v=!n&&X.test(r.overflowX||""),f=n?0:p(r.paddingTop),l=n?0:p(r.paddingRight),z=n?0:p(r.paddingBottom),h=n?0:p(r.paddingLeft),N=n?0:p(r.borderTopWidth),k=n?0:p(r.borderRightWidth),D=n?0:p(r.borderBottomWidth),W=n?0:p(r.borderLeftWidth),O=h+l,x=f+z,B=W+k,T=N+D,c=v?e.offsetHeight-T-e.clientHeight:0,d=o?e.offsetWidth-B-e.clientWidth:0,b=i?O+B:0,g=i?x+T:0,m=n?n.width:p(r.width)-b-d,R=n?n.height:p(r.height)-g-c,ue=m+O+d+B,le=R+x+c+T,H=w({devicePixelContentBoxSize:y(Math.round(m*devicePixelRatio),Math.round(R*devicePixelRatio),a),borderBoxSize:y(ue,le,a),contentBoxSize:y(m,R,a),contentRect:new ee(h,f,m,R)});return M.set(e,H),H},ne=function(e,t,r){var n=re(e,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(t){case C.DEVICE_PIXEL_CONTENT_BOX:return o;case C.BORDER_BOX:return i;default:return a}},Re=function(){function e(t){var r=re(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=w([r.borderBoxSize]),this.contentBoxSize=w([r.contentBoxSize]),this.devicePixelContentBoxSize=w([r.devicePixelContentBoxSize])}return e}(),ie=function(e){if(te(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},ye=function(){var e=1/0,t=[];E.forEach(function(o){if(o.activeTargets.length!==0){var v=[];o.activeTargets.forEach(function(l){var z=new Re(l.target),h=ie(l.target);v.push(z),l.lastReportedSize=ne(l.target,l.observedBox),h<e&&(e=h)}),t.push(function(){o.callback.call(o.observer,v,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},U=function(e){E.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(ie(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},ze=function(){var e=0;for(U(e);pe();)e=ye(),U(e);return be()&&ge(),e>0},$,oe=[],Oe=function(){return oe.splice(0).forEach(function(e){return e()})},Be=function(e){if(!$){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Oe()}).observe(r,n),$=function(){r.textContent="".concat(t?t--:t++)}}oe.push(e),$()},Te=function(e){Be(function(){requestAnimationFrame(e)})},L=0,Se=function(){return!!L},Ce=250,ke={attributes:!0,characterData:!0,childList:!0,subtree:!0},Y=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],K=function(e){return e===void 0&&(e=0),Date.now()+e},P=!1,De=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=Ce),!P){P=!0;var n=K(t);Te(function(){var i=!1;try{i=ze()}finally{if(P=!1,t=n-K(),!Se())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,ke)};document.body?r():S.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Y.forEach(function(r){return S.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Y.forEach(function(r){return S.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e}(),q=new De,Q=function(e){!L&&e>0&&q.start(),L+=e,!L&&q.stop()},Me=function(e){return!_(e)&&!xe(e)&&getComputedStyle(e).display==="inline"},Ie=function(){function e(t,r){this.target=t,this.observedBox=r||C.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=ne(this.target,this.observedBox,!0);return Me(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Ae=function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e}(),I=new WeakMap,Z=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},A=function(){function e(){}return e.connect=function(t,r){var n=new Ae(t,r);I.set(t,n)},e.observe=function(t,r,n){var i=I.get(t),a=i.observationTargets.length===0;Z(i.observationTargets,r)<0&&(a&&E.push(i),i.observationTargets.push(new Ie(r,n&&n.box)),Q(1),q.schedule())},e.unobserve=function(t,r){var n=I.get(t),i=Z(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&E.splice(E.indexOf(n),1),n.observationTargets.splice(i,1),Q(-1))},e.disconnect=function(t){var r=this,n=I.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Le=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");A.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!V(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");A.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!V(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");A.unobserve(this,t)},e.prototype.disconnect=function(){A.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const Ne=(e,t,r)=>Math.min(Math.max(e,t),r),We=u.aBox`
|
|
2
|
+
${u.th("breadcrumbs.item.default")};
|
|
3
|
+
align-items: center;
|
|
4
|
+
transition: medium;
|
|
5
|
+
direction: initial;
|
|
6
|
+
|
|
7
|
+
&:hover {
|
|
8
|
+
${u.th("breadcrumbs.item.hover")};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&[aria-current='page'] {
|
|
12
|
+
${u.th("breadcrumbs.item.active")};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&[aria-disabled='true'] {
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
cursor: default;
|
|
18
|
+
}
|
|
19
|
+
`,$e=u.spanBox`
|
|
20
|
+
${u.th("breadcrumbs.separator")};
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
`,Pe=j.forwardRef(({children:e,dataTestId:t,isActive:r,separator:n,...i},a)=>{const o=i.href||i.to;return s.createElement(ve.Box,{"aria-label":"breadcrumb",as:"li","data-testid":t,display:"inline-flex",flex:"0 0 auto",lineHeight:"normal"},n&&s.createElement($e,{role:"presentation"},n),s.createElement(We,{"aria-current":r?"page":void 0,"aria-disabled":!o,...i,ref:a},e))}),se=u.spanBox(({gradientBackground:e,theme:t})=>u.css`
|
|
24
|
+
left: 0;
|
|
25
|
+
background-image: ${ce(t,e)};
|
|
26
|
+
transform-origin: left;
|
|
27
|
+
`),ae=u.spanBox(({gradientBackground:e,theme:t})=>u.css`
|
|
28
|
+
right: 0;
|
|
29
|
+
background-image: ${ce(t,e,"left")};
|
|
30
|
+
transform-origin: right;
|
|
31
|
+
`),qe=u.divBox`
|
|
32
|
+
${u.th("breadcrumbs.list")};
|
|
33
|
+
height: 100%;
|
|
34
|
+
position: relative;
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
|
|
37
|
+
${se},
|
|
38
|
+
${ae} {
|
|
39
|
+
position: absolute;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
top: 0;
|
|
42
|
+
width: 30;
|
|
43
|
+
}
|
|
44
|
+
`,_e=u.olBox`
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
overflow-x: auto;
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
list-style: none;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
`,ce=(e,t,r="right")=>{const n=u.th(`colors.${t}`)({theme:e}),i=fe.hexToRGBA(n,0);return`linear-gradient(to ${r}, ${n}, ${i} 100%)`},F=j.forwardRef(({children:e,gradientBackground:t="neutral-10",lastChildNotClickable:r=!0,separator:n=s.createElement(he.RightIcon,{size:"xs"}),...i},a)=>{const o=s.useRef(null),v=s.useRef(),f=s.useRef(),[l,z]=s.useState(!1),[h,N]=s.useState(0),k=s.Children.toArray(e).filter(Boolean),D=k.length,W=k.map((c,d)=>{const b=D===1||D===d+1,g=b&&r;return s.cloneElement(c,{key:`breadcrumb-${d}`,separator:b?void 0:n,isActive:g,...c.props})});function O(c,d){c&&(c.style.transform=`scale3d(${d}, 1, 1)`)}const x=s.useCallback(c=>{const d=1-c;O(v.current,d),O(f.current,c)},[]),B=s.useCallback(()=>{const{current:{offsetWidth:c,scrollLeft:d,scrollWidth:b}}=o,g=b-c,R=Ne(Math.abs(d-h),0,g)/g;x(R)},[h,x]),T=s.useMemo(()=>de.throttle(c=>{const[{target:{offsetWidth:d,scrollLeft:b,scrollWidth:g}}]=c,m=g-d;h||N(b===0?0:m),z(m>0)},300,!1),[h]);return s.useEffect(()=>{const c=new Le(T);return c.observe(o.current),()=>c.disconnect()},[]),s.useEffect(()=>{v.current&&f.current&&x(0)},[l,x]),s.createElement(qe,{as:"nav",ref:a,...i},l&&s.createElement(se,{gradientBackground:t,ref:v}),s.createElement(_e,{dir:"rtl",onScroll:B,ref:o},W.reverse()),l&&s.createElement(ae,{gradientBackground:t,ref:f}))});F.displayName="Breadcrumb";const Fe=Object.assign(F,{Item:Pe});exports.Breadcrumb=Fe;exports.BreadcrumbComponent=F;
|
package/dist/Breadcrumb.mjs
CHANGED
|
@@ -1,11 +1,441 @@
|
|
|
1
|
-
|
|
2
|
-
import "
|
|
1
|
+
"use client";
|
|
2
|
+
import g, { useRef as $, useState as X, Children as ge, cloneElement as me, useCallback as q, useMemo as xe, useEffect as J } from "react";
|
|
3
|
+
import { t as Ee } from "./throttle-BDBzFeFj.mjs";
|
|
4
|
+
import R, { th as z, css as ne } from "@xstyled/styled-components";
|
|
5
|
+
import { forwardRef as ie } from "./System.mjs";
|
|
6
|
+
import { Box as we } from "./Box.mjs";
|
|
7
|
+
import { h as ze } from "./hex-to-rgba-BIDK-3ab.mjs";
|
|
3
8
|
import "./Icon.mjs";
|
|
4
|
-
import "./index-BRDOakbf.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
import { R as Oe } from "./index-BRDOakbf.mjs";
|
|
10
|
+
var x = [], Re = function() {
|
|
11
|
+
return x.some(function(e) {
|
|
12
|
+
return e.activeTargets.length > 0;
|
|
13
|
+
});
|
|
14
|
+
}, ye = function() {
|
|
15
|
+
return x.some(function(e) {
|
|
16
|
+
return e.skippedTargets.length > 0;
|
|
17
|
+
});
|
|
18
|
+
}, U = "ResizeObserver loop completed with undelivered notifications.", Be = function() {
|
|
19
|
+
var e;
|
|
20
|
+
typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
|
|
21
|
+
message: U
|
|
22
|
+
}) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = U), window.dispatchEvent(e);
|
|
23
|
+
}, k;
|
|
24
|
+
(function(e) {
|
|
25
|
+
e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
26
|
+
})(k || (k = {}));
|
|
27
|
+
var E = function(e) {
|
|
28
|
+
return Object.freeze(e);
|
|
29
|
+
}, Te = /* @__PURE__ */ function() {
|
|
30
|
+
function e(t, r) {
|
|
31
|
+
this.inlineSize = t, this.blockSize = r, E(this);
|
|
32
|
+
}
|
|
33
|
+
return e;
|
|
34
|
+
}(), oe = function() {
|
|
35
|
+
function e(t, r, n, i) {
|
|
36
|
+
return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, E(this);
|
|
37
|
+
}
|
|
38
|
+
return e.prototype.toJSON = function() {
|
|
39
|
+
var t = this, r = t.x, n = t.y, i = t.top, s = t.right, o = t.bottom, l = t.left, d = t.width, c = t.height;
|
|
40
|
+
return { x: r, y: n, top: i, right: s, bottom: o, left: l, width: d, height: c };
|
|
41
|
+
}, e.fromRect = function(t) {
|
|
42
|
+
return new e(t.x, t.y, t.width, t.height);
|
|
43
|
+
}, e;
|
|
44
|
+
}(), G = function(e) {
|
|
45
|
+
return e instanceof SVGElement && "getBBox" in e;
|
|
46
|
+
}, se = function(e) {
|
|
47
|
+
if (G(e)) {
|
|
48
|
+
var t = e.getBBox(), r = t.width, n = t.height;
|
|
49
|
+
return !r && !n;
|
|
50
|
+
}
|
|
51
|
+
var i = e, s = i.offsetWidth, o = i.offsetHeight;
|
|
52
|
+
return !(s || o || e.getClientRects().length);
|
|
53
|
+
}, Y = function(e) {
|
|
54
|
+
var t;
|
|
55
|
+
if (e instanceof Element)
|
|
56
|
+
return !0;
|
|
57
|
+
var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
|
|
58
|
+
return !!(r && e instanceof r.Element);
|
|
59
|
+
}, Se = function(e) {
|
|
60
|
+
switch (e.tagName) {
|
|
61
|
+
case "INPUT":
|
|
62
|
+
if (e.type !== "image")
|
|
63
|
+
break;
|
|
64
|
+
case "VIDEO":
|
|
65
|
+
case "AUDIO":
|
|
66
|
+
case "EMBED":
|
|
67
|
+
case "OBJECT":
|
|
68
|
+
case "CANVAS":
|
|
69
|
+
case "IFRAME":
|
|
70
|
+
case "IMG":
|
|
71
|
+
return !0;
|
|
72
|
+
}
|
|
73
|
+
return !1;
|
|
74
|
+
}, C = typeof window < "u" ? window : {}, M = /* @__PURE__ */ new WeakMap(), K = /auto|scroll/, Ce = /^tb|vertical/, ke = /msie|trident/i.test(C.navigator && C.navigator.userAgent), f = function(e) {
|
|
75
|
+
return parseFloat(e || "0");
|
|
76
|
+
}, O = function(e, t, r) {
|
|
77
|
+
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Te((r ? t : e) || 0, (r ? e : t) || 0);
|
|
78
|
+
}, Q = E({
|
|
79
|
+
devicePixelContentBoxSize: O(),
|
|
80
|
+
borderBoxSize: O(),
|
|
81
|
+
contentBoxSize: O(),
|
|
82
|
+
contentRect: new oe(0, 0, 0, 0)
|
|
83
|
+
}), ae = function(e, t) {
|
|
84
|
+
if (t === void 0 && (t = !1), M.has(e) && !t)
|
|
85
|
+
return M.get(e);
|
|
86
|
+
if (se(e))
|
|
87
|
+
return M.set(e, Q), Q;
|
|
88
|
+
var r = getComputedStyle(e), n = G(e) && e.ownerSVGElement && e.getBBox(), i = !ke && r.boxSizing === "border-box", s = Ce.test(r.writingMode || ""), o = !n && K.test(r.overflowY || ""), l = !n && K.test(r.overflowX || ""), d = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), y = n ? 0 : f(r.paddingBottom), v = n ? 0 : f(r.paddingLeft), _ = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), I = n ? 0 : f(r.borderBottomWidth), W = n ? 0 : f(r.borderLeftWidth), B = v + c, m = d + y, T = W + D, S = _ + I, a = l ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, h = i ? B + T : 0, p = i ? m + S : 0, b = n ? n.width : f(r.width) - h - u, w = n ? n.height : f(r.height) - p - a, pe = b + B + u + T, be = w + m + a + S, V = E({
|
|
89
|
+
devicePixelContentBoxSize: O(Math.round(b * devicePixelRatio), Math.round(w * devicePixelRatio), s),
|
|
90
|
+
borderBoxSize: O(pe, be, s),
|
|
91
|
+
contentBoxSize: O(b, w, s),
|
|
92
|
+
contentRect: new oe(v, d, b, w)
|
|
93
|
+
});
|
|
94
|
+
return M.set(e, V), V;
|
|
95
|
+
}, ce = function(e, t, r) {
|
|
96
|
+
var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, o = n.devicePixelContentBoxSize;
|
|
97
|
+
switch (t) {
|
|
98
|
+
case k.DEVICE_PIXEL_CONTENT_BOX:
|
|
99
|
+
return o;
|
|
100
|
+
case k.BORDER_BOX:
|
|
101
|
+
return i;
|
|
102
|
+
default:
|
|
103
|
+
return s;
|
|
104
|
+
}
|
|
105
|
+
}, De = /* @__PURE__ */ function() {
|
|
106
|
+
function e(t) {
|
|
107
|
+
var r = ae(t);
|
|
108
|
+
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = E([r.borderBoxSize]), this.contentBoxSize = E([r.contentBoxSize]), this.devicePixelContentBoxSize = E([r.devicePixelContentBoxSize]);
|
|
109
|
+
}
|
|
110
|
+
return e;
|
|
111
|
+
}(), ue = function(e) {
|
|
112
|
+
if (se(e))
|
|
113
|
+
return 1 / 0;
|
|
114
|
+
for (var t = 0, r = e.parentNode; r; )
|
|
115
|
+
t += 1, r = r.parentNode;
|
|
116
|
+
return t;
|
|
117
|
+
}, Ie = function() {
|
|
118
|
+
var e = 1 / 0, t = [];
|
|
119
|
+
x.forEach(function(o) {
|
|
120
|
+
if (o.activeTargets.length !== 0) {
|
|
121
|
+
var l = [];
|
|
122
|
+
o.activeTargets.forEach(function(c) {
|
|
123
|
+
var y = new De(c.target), v = ue(c.target);
|
|
124
|
+
l.push(y), c.lastReportedSize = ce(c.target, c.observedBox), v < e && (e = v);
|
|
125
|
+
}), t.push(function() {
|
|
126
|
+
o.callback.call(o.observer, l, o.observer);
|
|
127
|
+
}), o.activeTargets.splice(0, o.activeTargets.length);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
for (var r = 0, n = t; r < n.length; r++) {
|
|
131
|
+
var i = n[r];
|
|
132
|
+
i();
|
|
133
|
+
}
|
|
134
|
+
return e;
|
|
135
|
+
}, Z = function(e) {
|
|
136
|
+
x.forEach(function(r) {
|
|
137
|
+
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
138
|
+
i.isActive() && (ue(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
}, Me = function() {
|
|
142
|
+
var e = 0;
|
|
143
|
+
for (Z(e); Re(); )
|
|
144
|
+
e = Ie(), Z(e);
|
|
145
|
+
return ye() && Be(), e > 0;
|
|
146
|
+
}, P, le = [], Ae = function() {
|
|
147
|
+
return le.splice(0).forEach(function(e) {
|
|
148
|
+
return e();
|
|
149
|
+
});
|
|
150
|
+
}, Le = function(e) {
|
|
151
|
+
if (!P) {
|
|
152
|
+
var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
|
|
153
|
+
new MutationObserver(function() {
|
|
154
|
+
return Ae();
|
|
155
|
+
}).observe(r, n), P = function() {
|
|
156
|
+
r.textContent = "".concat(t ? t-- : t++);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
le.push(e), P();
|
|
160
|
+
}, Ne = function(e) {
|
|
161
|
+
Le(function() {
|
|
162
|
+
requestAnimationFrame(e);
|
|
163
|
+
});
|
|
164
|
+
}, N = 0, _e = function() {
|
|
165
|
+
return !!N;
|
|
166
|
+
}, We = 250, $e = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, j = [
|
|
167
|
+
"resize",
|
|
168
|
+
"load",
|
|
169
|
+
"transitionend",
|
|
170
|
+
"animationend",
|
|
171
|
+
"animationstart",
|
|
172
|
+
"animationiteration",
|
|
173
|
+
"keyup",
|
|
174
|
+
"keydown",
|
|
175
|
+
"mouseup",
|
|
176
|
+
"mousedown",
|
|
177
|
+
"mouseover",
|
|
178
|
+
"mouseout",
|
|
179
|
+
"blur",
|
|
180
|
+
"focus"
|
|
181
|
+
], ee = function(e) {
|
|
182
|
+
return e === void 0 && (e = 0), Date.now() + e;
|
|
183
|
+
}, F = !1, Pe = function() {
|
|
184
|
+
function e() {
|
|
185
|
+
var t = this;
|
|
186
|
+
this.stopped = !0, this.listener = function() {
|
|
187
|
+
return t.schedule();
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
return e.prototype.run = function(t) {
|
|
191
|
+
var r = this;
|
|
192
|
+
if (t === void 0 && (t = We), !F) {
|
|
193
|
+
F = !0;
|
|
194
|
+
var n = ee(t);
|
|
195
|
+
Ne(function() {
|
|
196
|
+
var i = !1;
|
|
197
|
+
try {
|
|
198
|
+
i = Me();
|
|
199
|
+
} finally {
|
|
200
|
+
if (F = !1, t = n - ee(), !_e())
|
|
201
|
+
return;
|
|
202
|
+
i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}, e.prototype.schedule = function() {
|
|
207
|
+
this.stop(), this.run();
|
|
208
|
+
}, e.prototype.observe = function() {
|
|
209
|
+
var t = this, r = function() {
|
|
210
|
+
return t.observer && t.observer.observe(document.body, $e);
|
|
211
|
+
};
|
|
212
|
+
document.body ? r() : C.addEventListener("DOMContentLoaded", r);
|
|
213
|
+
}, e.prototype.start = function() {
|
|
214
|
+
var t = this;
|
|
215
|
+
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), j.forEach(function(r) {
|
|
216
|
+
return C.addEventListener(r, t.listener, !0);
|
|
217
|
+
}));
|
|
218
|
+
}, e.prototype.stop = function() {
|
|
219
|
+
var t = this;
|
|
220
|
+
this.stopped || (this.observer && this.observer.disconnect(), j.forEach(function(r) {
|
|
221
|
+
return C.removeEventListener(r, t.listener, !0);
|
|
222
|
+
}), this.stopped = !0);
|
|
223
|
+
}, e;
|
|
224
|
+
}(), H = new Pe(), te = function(e) {
|
|
225
|
+
!N && e > 0 && H.start(), N += e, !N && H.stop();
|
|
226
|
+
}, Fe = function(e) {
|
|
227
|
+
return !G(e) && !Se(e) && getComputedStyle(e).display === "inline";
|
|
228
|
+
}, He = function() {
|
|
229
|
+
function e(t, r) {
|
|
230
|
+
this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
|
|
231
|
+
inlineSize: 0,
|
|
232
|
+
blockSize: 0
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return e.prototype.isActive = function() {
|
|
236
|
+
var t = ce(this.target, this.observedBox, !0);
|
|
237
|
+
return Fe(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
|
|
238
|
+
}, e;
|
|
239
|
+
}(), Ge = /* @__PURE__ */ function() {
|
|
240
|
+
function e(t, r) {
|
|
241
|
+
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
|
|
242
|
+
}
|
|
243
|
+
return e;
|
|
244
|
+
}(), A = /* @__PURE__ */ new WeakMap(), re = function(e, t) {
|
|
245
|
+
for (var r = 0; r < e.length; r += 1)
|
|
246
|
+
if (e[r].target === t)
|
|
247
|
+
return r;
|
|
248
|
+
return -1;
|
|
249
|
+
}, L = function() {
|
|
250
|
+
function e() {
|
|
251
|
+
}
|
|
252
|
+
return e.connect = function(t, r) {
|
|
253
|
+
var n = new Ge(t, r);
|
|
254
|
+
A.set(t, n);
|
|
255
|
+
}, e.observe = function(t, r, n) {
|
|
256
|
+
var i = A.get(t), s = i.observationTargets.length === 0;
|
|
257
|
+
re(i.observationTargets, r) < 0 && (s && x.push(i), i.observationTargets.push(new He(r, n && n.box)), te(1), H.schedule());
|
|
258
|
+
}, e.unobserve = function(t, r) {
|
|
259
|
+
var n = A.get(t), i = re(n.observationTargets, r), s = n.observationTargets.length === 1;
|
|
260
|
+
i >= 0 && (s && x.splice(x.indexOf(n), 1), n.observationTargets.splice(i, 1), te(-1));
|
|
261
|
+
}, e.disconnect = function(t) {
|
|
262
|
+
var r = this, n = A.get(t);
|
|
263
|
+
n.observationTargets.slice().forEach(function(i) {
|
|
264
|
+
return r.unobserve(t, i.target);
|
|
265
|
+
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
266
|
+
}, e;
|
|
267
|
+
}(), Ve = function() {
|
|
268
|
+
function e(t) {
|
|
269
|
+
if (arguments.length === 0)
|
|
270
|
+
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
271
|
+
if (typeof t != "function")
|
|
272
|
+
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
273
|
+
L.connect(this, t);
|
|
274
|
+
}
|
|
275
|
+
return e.prototype.observe = function(t, r) {
|
|
276
|
+
if (arguments.length === 0)
|
|
277
|
+
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
278
|
+
if (!Y(t))
|
|
279
|
+
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
280
|
+
L.observe(this, t, r);
|
|
281
|
+
}, e.prototype.unobserve = function(t) {
|
|
282
|
+
if (arguments.length === 0)
|
|
283
|
+
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
284
|
+
if (!Y(t))
|
|
285
|
+
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
286
|
+
L.unobserve(this, t);
|
|
287
|
+
}, e.prototype.disconnect = function() {
|
|
288
|
+
L.disconnect(this);
|
|
289
|
+
}, e.toString = function() {
|
|
290
|
+
return "function ResizeObserver () { [polyfill code] }";
|
|
291
|
+
}, e;
|
|
292
|
+
}();
|
|
293
|
+
const Xe = (e, t, r) => Math.min(Math.max(e, t), r), qe = R.aBox`
|
|
294
|
+
${z("breadcrumbs.item.default")};
|
|
295
|
+
align-items: center;
|
|
296
|
+
transition: medium;
|
|
297
|
+
direction: initial;
|
|
298
|
+
|
|
299
|
+
&:hover {
|
|
300
|
+
${z("breadcrumbs.item.hover")};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&[aria-current='page'] {
|
|
304
|
+
${z("breadcrumbs.item.active")};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&[aria-disabled='true'] {
|
|
308
|
+
pointer-events: none;
|
|
309
|
+
cursor: default;
|
|
310
|
+
}
|
|
311
|
+
`, Je = R.spanBox`
|
|
312
|
+
${z("breadcrumbs.separator")};
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
`, Ue = ie(
|
|
316
|
+
({ children: e, dataTestId: t, isActive: r, separator: n, ...i }, s) => {
|
|
317
|
+
const o = i.href || i.to;
|
|
318
|
+
return /* @__PURE__ */ g.createElement(
|
|
319
|
+
we,
|
|
320
|
+
{
|
|
321
|
+
"aria-label": "breadcrumb",
|
|
322
|
+
as: "li",
|
|
323
|
+
"data-testid": t,
|
|
324
|
+
display: "inline-flex",
|
|
325
|
+
flex: "0 0 auto",
|
|
326
|
+
lineHeight: "normal"
|
|
327
|
+
},
|
|
328
|
+
n && /* @__PURE__ */ g.createElement(Je, { role: "presentation" }, n),
|
|
329
|
+
/* @__PURE__ */ g.createElement(
|
|
330
|
+
qe,
|
|
331
|
+
{
|
|
332
|
+
"aria-current": r ? "page" : void 0,
|
|
333
|
+
"aria-disabled": !o,
|
|
334
|
+
...i,
|
|
335
|
+
ref: s
|
|
336
|
+
},
|
|
337
|
+
e
|
|
338
|
+
)
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
), de = R.spanBox(
|
|
342
|
+
({ gradientBackground: e, theme: t }) => ne`
|
|
343
|
+
left: 0;
|
|
344
|
+
background-image: ${fe(t, e)};
|
|
345
|
+
transform-origin: left;
|
|
346
|
+
`
|
|
347
|
+
), ve = R.spanBox(
|
|
348
|
+
({ gradientBackground: e, theme: t }) => ne`
|
|
349
|
+
right: 0;
|
|
350
|
+
background-image: ${fe(t, e, "left")};
|
|
351
|
+
transform-origin: right;
|
|
352
|
+
`
|
|
353
|
+
), Ye = R.divBox`
|
|
354
|
+
${z("breadcrumbs.list")};
|
|
355
|
+
height: 100%;
|
|
356
|
+
position: relative;
|
|
357
|
+
overflow-x: hidden;
|
|
358
|
+
|
|
359
|
+
${de},
|
|
360
|
+
${ve} {
|
|
361
|
+
position: absolute;
|
|
362
|
+
bottom: 0;
|
|
363
|
+
top: 0;
|
|
364
|
+
width: 30;
|
|
365
|
+
}
|
|
366
|
+
`, Ke = R.olBox`
|
|
367
|
+
display: inline-flex;
|
|
368
|
+
align-items: center;
|
|
369
|
+
max-width: 100%;
|
|
370
|
+
height: 100%;
|
|
371
|
+
overflow-x: auto;
|
|
372
|
+
margin: 0;
|
|
373
|
+
padding: 0;
|
|
374
|
+
list-style: none;
|
|
375
|
+
white-space: nowrap;
|
|
376
|
+
`, fe = (e, t, r = "right") => {
|
|
377
|
+
const n = z(`colors.${t}`)({ theme: e }), i = ze(n, 0);
|
|
378
|
+
return `linear-gradient(to ${r}, ${n}, ${i} 100%)`;
|
|
379
|
+
}, he = ie(
|
|
380
|
+
({
|
|
381
|
+
children: e,
|
|
382
|
+
gradientBackground: t = "neutral-10",
|
|
383
|
+
lastChildNotClickable: r = !0,
|
|
384
|
+
separator: n = /* @__PURE__ */ g.createElement(Oe, { size: "xs" }),
|
|
385
|
+
...i
|
|
386
|
+
}, s) => {
|
|
387
|
+
const o = $(null), l = $(), d = $(), [c, y] = X(!1), [v, _] = X(0), D = ge.toArray(e).filter(Boolean), I = D.length, W = D.map((a, u) => {
|
|
388
|
+
const h = I === 1 || I === u + 1, p = h && r;
|
|
389
|
+
return me(a, {
|
|
390
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
391
|
+
key: `breadcrumb-${u}`,
|
|
392
|
+
separator: h ? void 0 : n,
|
|
393
|
+
isActive: p,
|
|
394
|
+
...a.props
|
|
395
|
+
});
|
|
396
|
+
});
|
|
397
|
+
function B(a, u) {
|
|
398
|
+
a && (a.style.transform = `scale3d(${u}, 1, 1)`);
|
|
399
|
+
}
|
|
400
|
+
const m = q((a) => {
|
|
401
|
+
const u = 1 - a;
|
|
402
|
+
B(l.current, u), B(d.current, a);
|
|
403
|
+
}, []), T = q(() => {
|
|
404
|
+
const {
|
|
405
|
+
current: { offsetWidth: a, scrollLeft: u, scrollWidth: h }
|
|
406
|
+
} = o, p = h - a, w = Xe(Math.abs(u - v), 0, p) / p;
|
|
407
|
+
m(w);
|
|
408
|
+
}, [v, m]), S = xe(
|
|
409
|
+
() => Ee(
|
|
410
|
+
(a) => {
|
|
411
|
+
const [
|
|
412
|
+
{
|
|
413
|
+
// Is offsetWidth really needed ?
|
|
414
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
415
|
+
// @ts-ignore
|
|
416
|
+
target: { offsetWidth: u, scrollLeft: h, scrollWidth: p }
|
|
417
|
+
}
|
|
418
|
+
] = a, b = p - u;
|
|
419
|
+
v || _(h === 0 ? 0 : b), y(b > 0);
|
|
420
|
+
},
|
|
421
|
+
300,
|
|
422
|
+
!1
|
|
423
|
+
),
|
|
424
|
+
[v]
|
|
425
|
+
);
|
|
426
|
+
return J(() => {
|
|
427
|
+
const a = new Ve(S);
|
|
428
|
+
return a.observe(o.current), () => a.disconnect();
|
|
429
|
+
}, []), J(() => {
|
|
430
|
+
l.current && d.current && m(0);
|
|
431
|
+
}, [c, m]), /* @__PURE__ */ g.createElement(Ye, { as: "nav", ref: s, ...i }, c && /* @__PURE__ */ g.createElement(de, { gradientBackground: t, ref: l }), /* @__PURE__ */ g.createElement(Ke, { dir: "rtl", onScroll: T, ref: o }, W.reverse()), c && /* @__PURE__ */ g.createElement(ve, { gradientBackground: t, ref: d }));
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
he.displayName = "Breadcrumb";
|
|
435
|
+
const ot = Object.assign(he, {
|
|
436
|
+
Item: Ue
|
|
437
|
+
});
|
|
8
438
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
439
|
+
ot as Breadcrumb,
|
|
440
|
+
he as BreadcrumbComponent
|
|
11
441
|
};
|
package/dist/Button.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),t=require("@xstyled/styled-components"),m=require("./X5NMLKT6-BzhcQu_I.js"),y=require("./hide-focus-rings-root-DGU4Klq5.js"),l=require("./System.js"),p=require("./Loader.js"),u=require("./Box.js"),g=(e,s="square")=>t.css`
|
|
2
2
|
width: ${t.th(`buttons.sizes.${e}.height`)};
|
|
3
3
|
padding: 0;
|
|
4
4
|
${s==="circle"&&t.css`
|
|
5
5
|
border-radius: ${t.th(`buttons.sizes.${e}.height`)};
|
|
6
6
|
`};
|
|
7
|
-
`,d=t(
|
|
7
|
+
`,d=t(m.Button).withConfig({shouldForwardProp:l.shouldForwardProp})(({danger:e,disabled:s,shape:r,size:n="md",variant:o="primary"})=>t.css`
|
|
8
8
|
${t.th(`buttons.${o}`)};
|
|
9
9
|
${e&&t.css`
|
|
10
10
|
${t.th(`buttons.danger.${o}`)};
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
${!s&&t.css`
|
|
52
|
-
[${
|
|
52
|
+
[${y.hideFocusRingsDataAttribute}] &:focus {
|
|
53
53
|
box-shadow: none;
|
|
54
54
|
}
|
|
55
55
|
&:focus {
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
&[disabled] {
|
|
76
76
|
cursor: not-allowed;
|
|
77
77
|
}
|
|
78
|
-
`),h=l.forwardRef(({children:e,danger:s,dataTestId:r,disabled:n,isLoading:o,size:a="md",variant:$="primary",...b},f)=>{const c=n||o;return i.createElement(d,{danger:s,"data-loading":o,"data-testid":r,disabled:c,ref:f,size:a,variant:c?"disabled":$,...b},o&&i.createElement("div",null,i.createElement(u.Box,{alignItems:"center",bottom:0,display:"flex",justifyContent:"center",left:0,m:0,position:"absolute",right:0,top:0},i.createElement(
|
|
78
|
+
`),h=l.forwardRef(({children:e,danger:s,dataTestId:r,disabled:n,isLoading:o,size:a="md",variant:$="primary",...b},f)=>{const c=n||o;return i.createElement(d,{danger:s,"data-loading":o,"data-testid":r,disabled:c,ref:f,size:a,variant:c?"disabled":$,...b},o&&i.createElement("div",null,i.createElement(u.Box,{alignItems:"center",bottom:0,display:"flex",justifyContent:"center",left:0,m:0,position:"absolute",right:0,top:0},i.createElement(p.Loader,{size:"xs"})),i.createElement(u.Box,{opacity:"0"},e)),!o&&e)});h.displayName="Button";const w=d;exports.Button=h;exports.StyledButton=w;
|
package/dist/Button.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import h, { css as i, th as t, system as b } from "@xstyled/styled-components";
|
|
4
|
+
import { B as p } from "./X5NMLKT6-uFSu0Lii.mjs";
|
|
5
|
+
import { h as y } from "./hide-focus-rings-root-BNyva1yb.mjs";
|
|
6
|
+
import { shouldForwardProp as w, forwardRef as g } from "./System.mjs";
|
|
7
|
+
import { Loader as x } from "./Loader.mjs";
|
|
5
8
|
import { Box as d } from "./Box.mjs";
|
|
6
|
-
import y, { css as i, th as t, system as w } from "@xstyled/styled-components";
|
|
7
|
-
import { B as g } from "./X5NMLKT6-DGZEtYXj.mjs";
|
|
8
|
-
import { h as x } from "./hide-focus-rings-root-BNyva1yb.mjs";
|
|
9
9
|
const B = (e, s = "square") => i`
|
|
10
10
|
width: ${t(`buttons.sizes.${e}.height`)};
|
|
11
11
|
padding: 0;
|
|
12
12
|
${s === "circle" && i`
|
|
13
13
|
border-radius: ${t(`buttons.sizes.${e}.height`)};
|
|
14
14
|
`};
|
|
15
|
-
`, a =
|
|
15
|
+
`, a = h(p).withConfig({ shouldForwardProp: w })(
|
|
16
16
|
({ danger: e, disabled: s, shape: l, size: n = "md", variant: o = "primary" }) => i`
|
|
17
17
|
${t(`buttons.${o}`)};
|
|
18
18
|
${e && i`
|
|
@@ -35,7 +35,7 @@ const B = (e, s = "square") => i`
|
|
|
35
35
|
overflow: hidden;
|
|
36
36
|
transition: medium;
|
|
37
37
|
${l && B(n, l)};
|
|
38
|
-
${
|
|
38
|
+
${b};
|
|
39
39
|
|
|
40
40
|
& > svg.wui-icon,
|
|
41
41
|
& > i.wui-icon-font {
|
|
@@ -58,7 +58,7 @@ const B = (e, s = "square") => i`
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
${!s && i`
|
|
61
|
-
[${
|
|
61
|
+
[${y}] &:focus {
|
|
62
62
|
box-shadow: none;
|
|
63
63
|
}
|
|
64
64
|
&:focus {
|
|
@@ -85,7 +85,7 @@ const B = (e, s = "square") => i`
|
|
|
85
85
|
cursor: not-allowed;
|
|
86
86
|
}
|
|
87
87
|
`
|
|
88
|
-
), E =
|
|
88
|
+
), E = g(
|
|
89
89
|
({
|
|
90
90
|
children: e,
|
|
91
91
|
danger: s,
|
|
@@ -122,7 +122,7 @@ const B = (e, s = "square") => i`
|
|
|
122
122
|
right: 0,
|
|
123
123
|
top: 0
|
|
124
124
|
},
|
|
125
|
-
/* @__PURE__ */ r.createElement(
|
|
125
|
+
/* @__PURE__ */ r.createElement(x, { size: "xs" })
|
|
126
126
|
), /* @__PURE__ */ r.createElement(d, { opacity: "0" }, e)),
|
|
127
127
|
!o && e
|
|
128
128
|
);
|
package/dist/ButtonGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("@xstyled/styled-components"),u=require("./System.js"),c=e.div`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
align-items: center;
|
package/dist/ButtonGroup.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import d, { Children as p, cloneElement as u } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const c =
|
|
3
|
+
import f, { system as m } from "@xstyled/styled-components";
|
|
4
|
+
import { forwardRef as b } from "./System.mjs";
|
|
5
|
+
const c = f.div`
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
flex-wrap: wrap;
|
|
8
8
|
align-items: center;
|
|
@@ -32,8 +32,8 @@ const c = m.div`
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
${
|
|
36
|
-
`, y =
|
|
35
|
+
${m};
|
|
36
|
+
`, y = b(
|
|
37
37
|
({ children: t, dataTestId: o, disabled: e, size: i, variant: a }, s) => {
|
|
38
38
|
function l(n) {
|
|
39
39
|
return p.toArray(n).filter(Boolean).map((r) => u(r, {
|
package/dist/Card.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),e=require("@xstyled/styled-components"),c=require("./Shape.js"),d=require("./System.js"),a=e(c.Shape)`
|
|
2
2
|
${e.th("cards.cover")};
|
|
3
3
|
|
|
4
4
|
${e.system};
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
padding: lg;
|
|
15
15
|
|
|
16
16
|
${e.system};
|
|
17
|
-
`,n=
|
|
17
|
+
`,n=d.forwardRef(({children:t,...r},s)=>o.createElement(u,{ref:s,...r},t)),l=Object.assign(n,{Body:m,Cover:i});exports.Card=l;exports.CardComponent=n;
|