primereact 10.0.0 → 10.0.1
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/README.md +1 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.min.mjs +1 -1
- package/componentbase/componentbase.esm.mjs +12 -7
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/package.json +1 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.min.mjs +1 -1
- package/primereact.all.esm.mjs +12 -7
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.js +0 -421
- package/accordion/accordion.esm.min.js +0 -1
- package/api/api.esm.js +0 -944
- package/api/api.esm.min.js +0 -1
- package/autocomplete/autocomplete.esm.js +0 -1127
- package/autocomplete/autocomplete.esm.min.js +0 -1
- package/avatar/avatar.esm.js +0 -245
- package/avatar/avatar.esm.min.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -55
- package/avatargroup/avatargroup.esm.min.js +0 -1
- package/badge/badge.esm.js +0 -110
- package/badge/badge.esm.min.js +0 -1
- package/blockui/blockui.esm.js +0 -265
- package/blockui/blockui.esm.min.js +0 -1
- package/breadcrumb/breadcrumb.esm.js +0 -351
- package/breadcrumb/breadcrumb.esm.min.js +0 -1
- package/button/button.esm.js +0 -295
- package/button/button.esm.min.js +0 -1
- package/calendar/calendar.esm.js +0 -3473
- package/calendar/calendar.esm.min.js +0 -1
- package/card/card.esm.js +0 -98
- package/card/card.esm.min.js +0 -1
- package/carousel/carousel.esm.js +0 -801
- package/carousel/carousel.esm.min.js +0 -1
- package/cascadeselect/cascadeselect.esm.js +0 -819
- package/cascadeselect/cascadeselect.esm.min.js +0 -1
- package/chart/chart.esm.js +0 -155
- package/chart/chart.esm.min.js +0 -1
- package/checkbox/checkbox.esm.js +0 -357
- package/checkbox/checkbox.esm.min.js +0 -1
- package/chip/chip.esm.js +0 -248
- package/chip/chip.esm.min.js +0 -1
- package/chips/chips.esm.js +0 -501
- package/chips/chips.esm.min.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -788
- package/colorpicker/colorpicker.esm.min.js +0 -1
- package/column/column.esm.js +0 -8
- package/column/column.esm.min.js +0 -1
- package/columngroup/columngroup.esm.js +0 -6
- package/columngroup/columngroup.esm.min.js +0 -1
- package/componentbase/componentbase.esm.js +0 -323
- package/componentbase/componentbase.esm.min.js +0 -1
- package/confirmdialog/confirmdialog.esm.js +0 -376
- package/confirmdialog/confirmdialog.esm.min.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -610
- package/confirmpopup/confirmpopup.esm.min.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -664
- package/contextmenu/contextmenu.esm.min.js +0 -1
- package/csstransition/csstransition.esm.js +0 -138
- package/csstransition/csstransition.esm.min.js +0 -1
- package/datascroller/datascroller.esm.js +0 -320
- package/datascroller/datascroller.esm.min.js +0 -1
- package/datatable/datatable.esm.js +0 -6636
- package/datatable/datatable.esm.min.js +0 -1
- package/dataview/dataview.esm.js +0 -506
- package/dataview/dataview.esm.min.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -133
- package/deferredcontent/deferredcontent.esm.min.js +0 -1
- package/dialog/dialog.esm.js +0 -983
- package/dialog/dialog.esm.min.js +0 -1
- package/divider/divider.esm.js +0 -79
- package/divider/divider.esm.min.js +0 -1
- package/dock/dock.esm.js +0 -348
- package/dock/dock.esm.min.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1380
- package/dropdown/dropdown.esm.min.js +0 -1
- package/editor/editor.esm.js +0 -338
- package/editor/editor.esm.min.js +0 -1
- package/fieldset/fieldset.esm.js +0 -270
- package/fieldset/fieldset.esm.min.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1005
- package/fileupload/fileupload.esm.min.js +0 -1
- package/galleria/galleria.esm.js +0 -1090
- package/galleria/galleria.esm.min.js +0 -1
- package/hooks/hooks.esm.js +0 -1042
- package/hooks/hooks.esm.min.js +0 -1
- package/iconbase/iconbase.esm.js +0 -33
- package/iconbase/iconbase.esm.min.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -39
- package/icons/angledoubledown/index.esm.min.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -39
- package/icons/angledoubleleft/index.esm.min.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -39
- package/icons/angledoubleright/index.esm.min.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -39
- package/icons/angledoubleup/index.esm.min.js +0 -1
- package/icons/angledown/index.esm.js +0 -37
- package/icons/angledown/index.esm.min.js +0 -1
- package/icons/angleleft/index.esm.js +0 -37
- package/icons/angleleft/index.esm.min.js +0 -1
- package/icons/angleright/index.esm.js +0 -37
- package/icons/angleright/index.esm.min.js +0 -1
- package/icons/angleup/index.esm.js +0 -37
- package/icons/angleup/index.esm.min.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -661
- package/icons/arrowdown/index.esm.min.js +0 -1
- package/icons/arrowup/index.esm.js +0 -661
- package/icons/arrowup/index.esm.min.js +0 -1
- package/icons/ban/index.esm.js +0 -659
- package/icons/ban/index.esm.min.js +0 -1
- package/icons/bars/index.esm.js +0 -39
- package/icons/bars/index.esm.min.js +0 -1
- package/icons/calendar/index.esm.js +0 -37
- package/icons/calendar/index.esm.min.js +0 -1
- package/icons/check/index.esm.js +0 -37
- package/icons/check/index.esm.min.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -37
- package/icons/chevrondown/index.esm.min.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -37
- package/icons/chevronleft/index.esm.min.js +0 -1
- package/icons/chevronright/index.esm.js +0 -37
- package/icons/chevronright/index.esm.min.js +0 -1
- package/icons/chevronup/index.esm.js +0 -37
- package/icons/chevronup/index.esm.min.js +0 -1
- package/icons/download/index.esm.js +0 -661
- package/icons/download/index.esm.min.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -665
- package/icons/exclamationtriangle/index.esm.min.js +0 -1
- package/icons/eye/index.esm.js +0 -39
- package/icons/eye/index.esm.min.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -661
- package/icons/eyeslash/index.esm.min.js +0 -1
- package/icons/filter/index.esm.js +0 -659
- package/icons/filter/index.esm.min.js +0 -1
- package/icons/filterslash/index.esm.js +0 -661
- package/icons/filterslash/index.esm.min.js +0 -1
- package/icons/infocircle/index.esm.js +0 -661
- package/icons/infocircle/index.esm.min.js +0 -1
- package/icons/minus/index.esm.js +0 -37
- package/icons/minus/index.esm.min.js +0 -1
- package/icons/pencil/index.esm.js +0 -659
- package/icons/pencil/index.esm.min.js +0 -1
- package/icons/plus/index.esm.js +0 -659
- package/icons/plus/index.esm.min.js +0 -1
- package/icons/refresh/index.esm.js +0 -661
- package/icons/refresh/index.esm.min.js +0 -1
- package/icons/search/index.esm.js +0 -661
- package/icons/search/index.esm.min.js +0 -1
- package/icons/searchminus/index.esm.js +0 -661
- package/icons/searchminus/index.esm.min.js +0 -1
- package/icons/searchplus/index.esm.js +0 -661
- package/icons/searchplus/index.esm.min.js +0 -1
- package/icons/sortalt/index.esm.js +0 -668
- package/icons/sortalt/index.esm.min.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -674
- package/icons/sortamountdown/index.esm.min.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -674
- package/icons/sortamountupalt/index.esm.min.js +0 -1
- package/icons/spinner/index.esm.js +0 -659
- package/icons/spinner/index.esm.min.js +0 -1
- package/icons/star/index.esm.js +0 -659
- package/icons/star/index.esm.min.js +0 -1
- package/icons/starfill/index.esm.js +0 -659
- package/icons/starfill/index.esm.min.js +0 -1
- package/icons/thlarge/index.esm.js +0 -661
- package/icons/thlarge/index.esm.min.js +0 -1
- package/icons/times/index.esm.js +0 -37
- package/icons/times/index.esm.min.js +0 -1
- package/icons/timescircle/index.esm.js +0 -661
- package/icons/timescircle/index.esm.min.js +0 -1
- package/icons/trash/index.esm.js +0 -661
- package/icons/trash/index.esm.min.js +0 -1
- package/icons/undo/index.esm.js +0 -661
- package/icons/undo/index.esm.min.js +0 -1
- package/icons/upload/index.esm.js +0 -661
- package/icons/upload/index.esm.min.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -661
- package/icons/windowmaximize/index.esm.min.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -661
- package/icons/windowminimize/index.esm.min.js +0 -1
- package/image/image.esm.js +0 -1162
- package/image/image.esm.min.js +0 -1
- package/inplace/inplace.esm.js +0 -243
- package/inplace/inplace.esm.min.js +0 -1
- package/inputmask/inputmask.esm.js +0 -560
- package/inputmask/inputmask.esm.min.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1209
- package/inputnumber/inputnumber.esm.min.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -291
- package/inputswitch/inputswitch.esm.min.js +0 -1
- package/inputtext/inputtext.esm.js +0 -171
- package/inputtext/inputtext.esm.min.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -220
- package/inputtextarea/inputtextarea.esm.min.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -108
- package/keyfilter/keyfilter.esm.min.js +0 -1
- package/knob/knob.esm.js +0 -318
- package/knob/knob.esm.min.js +0 -1
- package/listbox/listbox.esm.js +0 -810
- package/listbox/listbox.esm.min.js +0 -1
- package/megamenu/megamenu.esm.js +0 -716
- package/megamenu/megamenu.esm.min.js +0 -1
- package/mention/mention.esm.js +0 -771
- package/mention/mention.esm.min.js +0 -1
- package/menu/menu.esm.js +0 -485
- package/menu/menu.esm.min.js +0 -1
- package/menubar/menubar.esm.js +0 -584
- package/menubar/menubar.esm.min.js +0 -1
- package/message/message.esm.js +0 -169
- package/message/message.esm.min.js +0 -1
- package/messages/messages.esm.js +0 -439
- package/messages/messages.esm.min.js +0 -1
- package/multiselect/multiselect.esm.js +0 -1724
- package/multiselect/multiselect.esm.min.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -352
- package/multistatecheckbox/multistatecheckbox.esm.min.js +0 -1
- package/orderlist/orderlist.esm.js +0 -816
- package/orderlist/orderlist.esm.min.js +0 -1
- package/organizationchart/organizationchart.esm.js +0 -480
- package/organizationchart/organizationchart.esm.min.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -516
- package/overlaypanel/overlaypanel.esm.min.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -7
- package/overlayservice/overlayservice.esm.min.js +0 -1
- package/paginator/paginator.esm.js +0 -933
- package/paginator/paginator.esm.min.js +0 -1
- package/panel/panel.esm.js +0 -316
- package/panel/panel.esm.min.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -645
- package/panelmenu/panelmenu.esm.min.js +0 -1
- package/passthrough/index.esm.js +0 -71
- package/passthrough/index.esm.min.js +0 -1
- package/passthrough/tailwind/index.esm.js +0 -3509
- package/passthrough/tailwind/index.esm.min.js +0 -1
- package/password/password.esm.js +0 -567
- package/password/password.esm.min.js +0 -1
- package/picklist/picklist.esm.js +0 -1119
- package/picklist/picklist.esm.min.js +0 -1
- package/portal/portal.esm.js +0 -110
- package/portal/portal.esm.min.js +0 -1
- package/primereact.all.esm.js +0 -51646
- package/primereact.all.esm.min.js +0 -1
- package/progressbar/progressbar.esm.js +0 -190
- package/progressbar/progressbar.esm.min.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -88
- package/progressspinner/progressspinner.esm.min.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -329
- package/radiobutton/radiobutton.esm.min.js +0 -1
- package/rating/rating.esm.js +0 -273
- package/rating/rating.esm.min.js +0 -1
- package/ripple/ripple.esm.js +0 -100
- package/ripple/ripple.esm.min.js +0 -1
- package/row/row.esm.js +0 -36
- package/row/row.esm.min.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -210
- package/scrollpanel/scrollpanel.esm.min.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -269
- package/scrolltop/scrolltop.esm.min.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -327
- package/selectbutton/selectbutton.esm.min.js +0 -1
- package/sidebar/sidebar.esm.js +0 -543
- package/sidebar/sidebar.esm.min.js +0 -1
- package/skeleton/skeleton.esm.js +0 -125
- package/skeleton/skeleton.esm.min.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -689
- package/slidemenu/slidemenu.esm.min.js +0 -1
- package/slider/slider.esm.js +0 -478
- package/slider/slider.esm.min.js +0 -1
- package/speeddial/speeddial.esm.js +0 -521
- package/speeddial/speeddial.esm.min.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -545
- package/splitbutton/splitbutton.esm.min.js +0 -1
- package/splitter/splitter.esm.js +0 -466
- package/splitter/splitter.esm.min.js +0 -1
- package/steps/steps.esm.js +0 -294
- package/steps/steps.esm.min.js +0 -1
- package/styleclass/styleclass.esm.js +0 -269
- package/styleclass/styleclass.esm.min.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -332
- package/tabmenu/tabmenu.esm.min.js +0 -1
- package/tabview/tabview.esm.js +0 -678
- package/tabview/tabview.esm.min.js +0 -1
- package/tag/tag.esm.js +0 -117
- package/tag/tag.esm.min.js +0 -1
- package/terminal/terminal.esm.js +0 -280
- package/terminal/terminal.esm.min.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -7
- package/terminalservice/terminalservice.esm.min.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -699
- package/tieredmenu/tieredmenu.esm.min.js +0 -1
- package/timeline/timeline.esm.js +0 -164
- package/timeline/timeline.esm.min.js +0 -1
- package/toast/toast.esm.js +0 -739
- package/toast/toast.esm.min.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -217
- package/togglebutton/togglebutton.esm.min.js +0 -1
- package/toolbar/toolbar.esm.js +0 -79
- package/toolbar/toolbar.esm.min.js +0 -1
- package/tooltip/tooltip.esm.js +0 -696
- package/tooltip/tooltip.esm.min.js +0 -1
- package/tree/tree.esm.js +0 -1403
- package/tree/tree.esm.min.js +0 -1
- package/treeselect/treeselect.esm.js +0 -930
- package/treeselect/treeselect.esm.min.js +0 -1
- package/treetable/treetable.esm.js +0 -3094
- package/treetable/treetable.esm.min.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -292
- package/tristatecheckbox/tristatecheckbox.esm.min.js +0 -1
- package/utils/utils.esm.js +0 -2383
- package/utils/utils.esm.min.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -972
- package/virtualscroller/virtualscroller.esm.min.js +0 -1
package/dialog/dialog.esm.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{DomHandler as t,ObjectUtils as n,classNames as r,UniqueComponentId as o,ZIndexUtils as i,mergeProps as a,IconUtils as l}from"primereact/utils";import c,{PrimeReactContext as u,localeOption as s}from"primereact/api";import{ComponentBase as p,useHandleStyle as d}from"primereact/componentbase";import{CSSTransition as m}from"primereact/csstransition";import{useEventListener as g,useMountEffect as f,useUpdateEffect as b,useUnmountEffect as y}from"primereact/hooks";import{TimesIcon as h}from"primereact/icons/times";import{WindowMaximizeIcon as v}from"primereact/icons/windowmaximize";import{WindowMinimizeIcon as x}from"primereact/icons/windowminimize";import{Portal as w}from"primereact/portal";import{Ripple as E}from"primereact/ripple";function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e){if(Array.isArray(e))return z(e)}function k(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function P(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function j(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function C(e){var t=j(e,"string");return"symbol"===I(t)?t:String(t)}function R(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){if(Array.isArray(e))return e}function T(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function M(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(e,t){return N(e)||T(e,t)||P(e,t)||M()}var X=function(t){var n=e.useRef(void 0);return e.useEffect((function(){n.current=t})),n.current},A=function(r,o,i){var a,l,c,u,s,p,d,m,g,f,b,y,h,v,x,w=(u=void 0===(c=(a={type:"keydown",listener:function(e){"Esc"!==e.key&&"Escape"!==e.key||(e.stopImmediatePropagation(),i(e))}}).target)?"document":c,s=a.type,p=a.listener,d=a.options,g=void 0===(m=a.when)||m,f=e.useRef(null),b=e.useRef(null),y=X(p),h=X(d),v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.isNotEmpty(e.target)&&(x(),(e.when||g)&&(f.current=t.getTargetElement(e.target))),!b.current&&f.current&&(b.current=function(e){return p&&p(e)},f.current.addEventListener(s,b.current,d))},x=function(){b.current&&(f.current.removeEventListener(s,b.current,d),b.current=null)},e.useEffect((function(){g?f.current=t.getTargetElement(u):(x(),f.current=null)}),[u,g]),e.useEffect((function(){!b.current||""+y==""+p&&h===d||(x(),g&&v())}),[p,d,g]),l=function(){x()},e.useEffect((function(){return l}),[]),[v,x]),E=B(w,2),S=E[0],z=E[1];return e.useEffect((function(){if(o&&r.current)return S(),function(){z()}})),[r,i]};function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=p.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,contentClassName:null,contentStyle:null,dismissableMask:!1,draggable:!0,focusOnShow:!0,footer:null,header:null,headerClassName:null,headerStyle:null,icons:null,id:null,keepInViewport:!0,maskClassName:null,maskStyle:null,maximizable:!1,maximizeIcon:null,maximized:!1,minX:0,minY:0,minimizeIcon:null,modal:!0,onClick:null,onDrag:null,onDragEnd:null,onDragStart:null,onHide:null,onMaskClick:null,onMaximize:null,onResize:null,onResizeEnd:null,onResizeStart:null,onShow:null,position:"center",resizable:!0,rtl:!1,showHeader:!0,style:null,transitionOptions:null,visible:!1,children:void 0},css:{classes:{closeButtonIcon:"p-dialog-header-close-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",maximizableIcon:"p-dialog-header-maximize-icon",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",header:function(e){return r("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return r("p-dialog-content",e.props.contentClassName)},footer:"p-dialog-footer",mask:function(e){var t=e.props,n=e.maskVisibleState,o=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(e){return e===t.position||e.replace("-","")===t.position}));return r("p-dialog-mask",o?"p-dialog-".concat(o):"",{"p-component-overlay p-component-overlay-enter":t.modal,"p-dialog-visible":n,"p-dialog-draggable":t.draggable,"p-dialog-resizable":t.resizable},t.maskClassName)},root:function(e){var t=e.props,n=e.maximized,o=e.context;return r("p-dialog p-component",t.className,{"p-dialog-rtl":t.rtl,"p-dialog-maximized":n,"p-dialog-default":!n,"p-input-filled":o&&"filled"===o.inputStyle||"filled"===c.inputStyle,"p-ripple-disabled":o&&!1===o.ripple||!1===c.ripple})},transition:"p-dialog"},styles:"\n@layer primereact {\n .p-dialog-mask {\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-dialog-visible {\n display: flex;\n }\n \n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n position: relative;\n }\n \n .p-dialog-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-dialog-header {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-dialog-footer {\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-dialog .p-dialog-title {\n flex-grow: 1;\n }\n \n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n \n /* Animation */\n /* Center */\n .p-dialog-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-dialog-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-dialog-enter-done {\n transform: none;\n }\n \n .p-dialog-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-top-left .p-dialog,\n .p-dialog-top-right .p-dialog,\n .p-dialog-bottom-left .p-dialog,\n .p-dialog-bottom-right .p-dialog {\n margin: 0.75em;\n }\n \n .p-dialog-top .p-dialog-enter,\n .p-dialog-top .p-dialog-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-dialog-bottom .p-dialog-enter,\n .p-dialog-bottom .p-dialog-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-dialog-left .p-dialog-enter,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-enter,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-enter,\n .p-dialog-bottom-left .p-dialog-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-dialog-right .p-dialog-enter,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-enter,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-enter,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-top-left .p-dialog-enter-active,\n .p-dialog-bottom-left .p-dialog-enter-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-top-right .p-dialog-enter-active,\n .p-dialog-bottom-right .p-dialog-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s ease-out;\n }\n \n .p-dialog-top .p-dialog-exit-active,\n .p-dialog-bottom .p-dialog-exit-active,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-exit-active,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transition: all 0.3s ease-out;\n }\n \n /* Maximize */\n .p-dialog-maximized {\n transition: none;\n transform: none;\n margin: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n }\n \n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n \n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n \n /* Resizable */\n .p-dialog .p-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: se-resize;\n width: 12px;\n height: 12px;\n right: 1px;\n bottom: 1px;\n }\n \n .p-dialog-draggable .p-dialog-header {\n cursor: move;\n } \n}\n",inlineStyles:{mask:function(e){var t=e.props;return Y({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===t.position||"top-left"===t.position||"bottom-left"===t.position?"flex-start":"right"===t.position||"top-right"===t.position||"bottom-right"===t.position?"flex-end":"center",alignItems:"top"===t.position||"top-left"===t.position||"top-right"===t.position?"flex-start":"bottom"===t.position||"bottom-left"===t.position||"bottom-right"===t.position?"flex-end":"center",pointerEvents:!t.modal&&"none"},t.maskStyle)}}}});function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=e.forwardRef((function(r,p){var z=e.useContext(u),I=_.getProps(r,z),j=I.id?I.id:o(),C=B(e.useState(j),2),R=C[0],N=B(e.useState(!1),2),T=N[0],M=N[1],X=B(e.useState(!1),2),H=X[0],Y=X[1],L=B(e.useState(I.maximized),2),F=L[0],J=L[1],U=e.useRef(null),Z=e.useRef(null),W=e.useRef(null),$=e.useRef(null),K=e.useRef(null),q=e.useRef(null),G=e.useRef(null),Q=e.useRef(!1),ee=e.useRef(!1),te=e.useRef(null),ne=e.useRef(null),re=e.useRef(null),oe=e.useRef(j),ie=e.useRef(null),ae=I.onMaximize?I.maximized:F,le=H&&(I.blockScroll||I.maximizable&&ae),ce=_.setMetaData(V(V({props:I},I.__parentMetadata),{},{state:{id:R,maximized:ae,containerVisible:T}})),ue=ce.ptm,se=ce.cx,pe=ce.sx;d(_.css.styles,ce.isUnstyled,{name:"dialog"}),A(Z,I.closable&&I.closeOnEscape,(function(e){var t=e.currentTarget;if(t&&t.primeDialogParams){var n=t.primeDialogParams,r=n.length;Pe(e),n.splice(r-1,1)}}));var de=B(g({type:"keydown",listener:function(e){return Ce(e)}}),2),me=de[0],ge=de[1],fe=B(g({type:"mousemove",target:function(){return window.document},listener:function(e){return Xe(e)}}),2),be=fe[0],ye=fe[1],he=B(g({type:"mouseup",target:function(){return window.document},listener:function(e){return Ae(e)}}),2),ve=he[0],xe=he[1],we=B(g({type:"mousemove",target:function(){return window.document},listener:function(e){return Ne(e)}}),2),Ee=we[0],Se=we[1],ze=B(g({type:"mouseup",target:function(){return window.document},listener:function(e){return Te(e)}}),2),Oe=ze[0],ke=ze[1],Pe=function(e){I.onHide(),e.preventDefault()},De=function(e){W.current=e.target,I.onPointerDown&&I.onPointerDown(e)},Ie=function(e){I.dismissableMask&&I.modal&&Z.current===e.target&&!W.current&&Pe(e),I.onMaskClick&&I.onMaskClick(e),W.current=null},je=function(e){I.onMaximize?I.onMaximize({originalEvent:e,maximized:!ae}):J((function(e){return!e})),e.preventDefault()},Ce=function(e){var n=e.currentTarget;if(n&&n.primeDialogParams){var r=n.primeDialogParams,o=r.length,i=r[o-1]?r[o-1].id:void 0;if(i===R){var a=document.getElementById(i);if("Tab"===e.key){e.preventDefault();var l=t.getFocusableElements(a);if(l&&l.length>0)if(document.activeElement){var c=l.indexOf(document.activeElement);e.shiftKey?-1===c||0===c?l[l.length-1].focus():l[c-1].focus():-1===c||c===l.length-1?l[0].focus():l[c+1].focus()}else l[0].focus()}}}},Re=function(e){t.hasClass(e.target,"p-dialog-header-icon")||t.hasClass(e.target.parentElement,"p-dialog-header-icon")||I.draggable&&(Q.current=!0,te.current=e.pageX,ne.current=e.pageY,U.current.style.margin="0",t.addClass(document.body,"p-unselectable-text"),I.onDragStart&&I.onDragStart(e))},Ne=function(e){if(Q.current){var n=t.getOuterWidth(U.current),r=t.getOuterHeight(U.current),o=e.pageX-te.current,i=e.pageY-ne.current,a=U.current.getBoundingClientRect(),l=a.left+o,c=a.top+i,u=t.getViewport(),s=getComputedStyle(U.current),p=parseFloat(s.marginLeft),d=parseFloat(s.marginTop);U.current.style.position="fixed",I.keepInViewport?(l>=I.minX&&l+n<u.width&&(te.current=e.pageX,U.current.style.left=l-p+"px"),c>=I.minY&&c+r<u.height&&(ne.current=e.pageY,U.current.style.top=c-d+"px")):(te.current=e.pageX,U.current.style.left=l-p+"px",ne.current=e.pageY,U.current.style.top=c-d+"px"),I.onDrag&&I.onDrag(e)}},Te=function(e){Q.current&&(Q.current=!1,t.removeClass(document.body,"p-unselectable-text"),I.onDragEnd&&I.onDragEnd(e))},Me=function(e){I.resizable&&(ee.current=!0,te.current=e.pageX,ne.current=e.pageY,t.addClass(document.body,"p-unselectable-text"),I.onResizeStart&&I.onResizeStart(e))},Be=function(e,n,r){!r&&(r=t.getViewport());var o=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?o*(r[n]/100):o},Xe=function(e){if(ee.current){var n=e.pageX-te.current,r=e.pageY-ne.current,o=t.getOuterWidth(U.current),i=t.getOuterHeight(U.current),a=U.current.getBoundingClientRect(),l=t.getViewport(),c=!parseInt(U.current.style.top)||!parseInt(U.current.style.left),u=Be(U.current.style.minWidth,"width",l),s=Be(U.current.style.minHeight,"height",l),p=o+n,d=i+r;c&&(p+=n,d+=r),(!u||p>u)&&a.left+p<l.width&&(U.current.style.width=p+"px"),(!s||d>s)&&a.top+d<l.height&&(U.current.style.height=d+"px"),te.current=e.pageX,ne.current=e.pageY,I.onResize&&I.onResize(e)}},Ae=function(e){ee.current&&(ee.current=!1,t.removeClass(document.body,"p-unselectable-text"),I.onResizeEnd&&I.onResizeEnd(e))},He=function(){U.current.style.position="",U.current.style.left="",U.current.style.top="",U.current.style.margin=""},Ye=function(){U.current.setAttribute(oe.current,"")},_e=function(){var e;I.onShow&&I.onShow(),I.focusOnShow&&!((e=document.activeElement)&&U.current&&U.current.contains(e))&&I.closable&&I.showHeader&&G.current.focus(),Fe()},Le=function(){I.modal&&t.addClass(Z.current,"p-component-overlay-leave")},Ve=function(){Q.current=!1,i.clear(Z.current),M(!1),Je(),t.focus(ie.current),ie.current=null},Fe=function(){Ze(),Ue(!0)},Je=function(){We(),Ue(!1)},Ue=function(e){if(e){var n={id:R,hasBlockScroll:le};document.primeDialogParams||(document.primeDialogParams=[]);var r=document.primeDialogParams.findIndex((function(e){return e.id===R}));document.primeDialogParams=-1===r?[].concat(O(o=document.primeDialogParams)||k(o)||P(o)||D(),[n]):document.primeDialogParams.toSpliced(r,1,n)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==R}));var o;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?t.addClass(document.body,"p-overflow-hidden"):t.removeClass(document.body,"p-overflow-hidden")},Ze=function(){I.draggable&&(Ee(),Oe()),I.resizable&&(be(),ve()),me()},We=function(){Se(),ke(),ye(),xe(),ge()},$e=function(){re.current=t.createInlineStyle(z&&z.nonce||c.nonce);var e="";for(var n in I.breakpoints)e+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(oe.current,"] {\n width: ").concat(I.breakpoints[n]," !important;\n }\n }\n ");re.current.innerHTML=e};f((function(){I.visible&&M(!0),I.breakpoints&&$e()})),b((function(){I.visible&&!T&&M(!0),I.visible!==H&&T&&Y(I.visible),I.visible&&(ie.current=document.activeElement)}),[I.visible,T]),b((function(){T&&(i.set("modal",Z.current,z&&z.autoZIndex||c.autoZIndex,I.baseZIndex||z&&z.zIndex.modal||c.zIndex.modal),Y(!0))}),[T]),b((function(){Ue(!0)}),[le]),y((function(){Je(),t.removeInlineStyle(re.current),i.clear(Z.current)})),e.useImperativeHandle(p,(function(){return{props:I,resetPosition:He,getElement:function(){return U.current},getMask:function(){return Z.current},getContent:function(){return $.current},getHeader:function(){return K.current},getFooter:function(){return q.current},getCloseButton:function(){return G.current}}}));var Ke,qe,Ge,Qe,et,tt,nt,rt,ot,it,at,lt,ct=function(){if(I.closable){var t=I.ariaCloseIconLabel||s("close"),n=a({className:se("closeButtonIcon"),"aria-hidden":!0},ue("closeButtonIcon")),r=l.getJSXIcon(I.closeIcon||e.createElement(h,n),V({},n),{props:I}),o=a({ref:G,type:"button",className:se("closeButton"),"aria-label":t,onClick:Pe},ue("closeButton"));return e.createElement("button",o,r,e.createElement(E,null))}return null},ut=function(){var t=a({className:se("maximizableIcon")},ue("maximizableIcon")),n=l.getJSXIcon(ae?I.minimizeIcon||e.createElement(x,t):I.maximizeIcon||e.createElement(v,t),t,{props:I});if(I.maximizable){var r=a({type:"button",className:se("maximizableButton"),onClick:je},ue("maximizableButton"));return e.createElement("button",r,n,e.createElement(E,null))}return null},st=function(){if(I.showHeader){var t=ct(),r=ut(),o=n.getJSXElement(I.icons,I),i=n.getJSXElement(I.header,I),l=R+"_header",c=a({ref:K,style:I.headerStyle,className:se("header"),onMouseDown:Re},ue("header")),u=a({id:l,className:se("headerTitle")},ue("headerTitle")),s=a({className:se("headerIcons")},ue("headerIcons"));return e.createElement("div",c,e.createElement("div",u,i),e.createElement("div",s,o,r,t))}return null},pt=function(){var t=n.getJSXElement(I.footer,I),r=a({ref:q,className:se("footer")},ue("footer"));return t&&e.createElement("div",r,t)};return T&&(qe=st(),Ke=a({id:R+"_content",ref:$,style:I.contentStyle,className:se("content")},ue("content")),Ge=e.createElement("div",Ke,I.children),Qe=pt(),et=I.resizable?e.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Me}):null,tt=R+"_header",nt=R+"_content",rt={enter:"center"===I.position?150:300,exit:"center"===I.position?150:300},ot=a({ref:Z,style:pe("mask"),className:se("mask",{maskVisibleState:T}),onPointerUp:Ie},ue("mask")),it=a({ref:U,id:R,className:se("root",{props:I,maximized:ae,context:z}),style:I.style,onClick:I.onClick,role:"dialog","aria-labelledby":tt,"aria-describedby":nt,"aria-modal":I.modal,onPointerDown:De},_.getOtherProps(I),ue("root")),at=a({classNames:se("transition"),timeout:rt,in:H,options:I.transitionOptions,unmountOnExit:!0,onEnter:Ye,onEntered:_e,onExiting:Le,onExited:Ve},ue("transition")),lt=e.createElement("div",ot,e.createElement(m,S({nodeRef:U},at),e.createElement("div",it,qe,Ge,Qe,et))),e.createElement(w,{element:lt,appendTo:I.appendTo,visible:!0}))}));F.displayName="Dialog";export{F as Dialog};
|
package/divider/divider.esm.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { classNames, mergeProps } from 'primereact/utils';
|
|
5
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
|
-
import { PrimeReactContext } from 'primereact/api';
|
|
7
|
-
|
|
8
|
-
var classes = {
|
|
9
|
-
root: function root(_ref) {
|
|
10
|
-
var props = _ref.props,
|
|
11
|
-
horizontal = _ref.horizontal,
|
|
12
|
-
vertical = _ref.vertical;
|
|
13
|
-
return classNames("p-divider p-component p-divider-".concat(props.layout, " p-divider-").concat(props.type), {
|
|
14
|
-
'p-divider-left': horizontal && (!props.align || props.align === 'left'),
|
|
15
|
-
'p-divider-right': horizontal && props.align === 'right',
|
|
16
|
-
'p-divider-center': horizontal && props.align === 'center' || vertical && (!props.align || props.align === 'center'),
|
|
17
|
-
'p-divider-top': vertical && props.align === 'top',
|
|
18
|
-
'p-divider-bottom': vertical && props.align === 'bottom'
|
|
19
|
-
}, props.className);
|
|
20
|
-
},
|
|
21
|
-
content: 'p-divider-content'
|
|
22
|
-
};
|
|
23
|
-
var styles = "\n@layer primereact {\n .p-divider-horizontal {\n display: flex;\n width: 100%;\n position: relative;\n align-items: center;\n }\n \n .p-divider-horizontal:before {\n position: absolute;\n display: block;\n top: 50%;\n left: 0;\n width: 100%;\n content: \"\";\n }\n \n .p-divider-horizontal.p-divider-left {\n justify-content: flex-start;\n }\n \n .p-divider-horizontal.p-divider-right {\n justify-content: flex-end;\n }\n \n .p-divider-horizontal.p-divider-center {\n justify-content: center;\n }\n \n .p-divider-content {\n z-index: 1;\n }\n \n .p-divider-vertical {\n min-height: 100%;\n margin: 0 1rem;\n display: flex;\n position: relative;\n justify-content: center;\n }\n \n .p-divider-vertical:before {\n position: absolute;\n display: block;\n top: 0;\n left: 50%;\n height: 100%;\n content: \"\";\n }\n \n .p-divider-vertical.p-divider-top {\n align-items: flex-start;\n }\n \n .p-divider-vertical.p-divider-center {\n align-items: center;\n }\n \n .p-divider-vertical.p-divider-bottom {\n align-items: flex-end;\n }\n \n .p-divider-solid.p-divider-horizontal:before {\n border-top-style: solid;\n }\n \n .p-divider-solid.p-divider-vertical:before {\n border-left-style: solid;\n }\n \n .p-divider-dashed.p-divider-horizontal:before {\n border-top-style: dashed;\n }\n \n .p-divider-dashed.p-divider-vertical:before {\n border-left-style: dashed;\n }\n \n .p-divider-dotted.p-divider-horizontal:before {\n border-top-style: dotted;\n }\n \n .p-divider-dotted.p-divider-horizontal:before {\n border-left-style: dotted;\n }\n}\n";
|
|
24
|
-
var DividerBase = ComponentBase.extend({
|
|
25
|
-
defaultProps: {
|
|
26
|
-
__TYPE: 'Divider',
|
|
27
|
-
align: null,
|
|
28
|
-
layout: 'horizontal',
|
|
29
|
-
type: 'solid',
|
|
30
|
-
style: null,
|
|
31
|
-
className: null,
|
|
32
|
-
children: undefined
|
|
33
|
-
},
|
|
34
|
-
css: {
|
|
35
|
-
classes: classes,
|
|
36
|
-
styles: styles
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
var Divider = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
41
|
-
var context = React.useContext(PrimeReactContext);
|
|
42
|
-
var props = DividerBase.getProps(inProps, context);
|
|
43
|
-
var _DividerBase$setMetaD = DividerBase.setMetaData({
|
|
44
|
-
props: props
|
|
45
|
-
}),
|
|
46
|
-
ptm = _DividerBase$setMetaD.ptm,
|
|
47
|
-
cx = _DividerBase$setMetaD.cx,
|
|
48
|
-
isUnstyled = _DividerBase$setMetaD.isUnstyled;
|
|
49
|
-
useHandleStyle(DividerBase.css.styles, isUnstyled, {
|
|
50
|
-
name: 'divider'
|
|
51
|
-
});
|
|
52
|
-
var elementRef = React.useRef(null);
|
|
53
|
-
var horizontal = props.layout === 'horizontal';
|
|
54
|
-
var vertical = props.layout === 'vertical';
|
|
55
|
-
React.useImperativeHandle(ref, function () {
|
|
56
|
-
return {
|
|
57
|
-
props: props,
|
|
58
|
-
getElement: function getElement() {
|
|
59
|
-
return elementRef.current;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
var rootProps = mergeProps({
|
|
64
|
-
ref: elementRef,
|
|
65
|
-
style: props.style,
|
|
66
|
-
className: cx('root', {
|
|
67
|
-
horizontal: horizontal,
|
|
68
|
-
vertical: vertical
|
|
69
|
-
}),
|
|
70
|
-
role: 'separator'
|
|
71
|
-
}, DividerBase.getOtherProps(props), ptm('root'));
|
|
72
|
-
var contentProps = mergeProps({
|
|
73
|
-
className: cx('content')
|
|
74
|
-
}, ptm('content'));
|
|
75
|
-
return /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("div", contentProps, props.children));
|
|
76
|
-
});
|
|
77
|
-
Divider.displayName = 'Divider';
|
|
78
|
-
|
|
79
|
-
export { Divider };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{classNames as n,mergeProps as i}from"primereact/utils";import{ComponentBase as t,useHandleStyle as r}from"primereact/componentbase";import{PrimeReactContext as d}from"primereact/api";var o=t.extend({defaultProps:{__TYPE:"Divider",align:null,layout:"horizontal",type:"solid",style:null,className:null,children:void 0},css:{classes:{root:function(e){var i=e.props,t=e.horizontal,r=e.vertical;return n("p-divider p-component p-divider-".concat(i.layout," p-divider-").concat(i.type),{"p-divider-left":t&&(!i.align||"left"===i.align),"p-divider-right":t&&"right"===i.align,"p-divider-center":t&&"center"===i.align||r&&(!i.align||"center"===i.align),"p-divider-top":r&&"top"===i.align,"p-divider-bottom":r&&"bottom"===i.align},i.className)},content:"p-divider-content"},styles:'\n@layer primereact {\n .p-divider-horizontal {\n display: flex;\n width: 100%;\n position: relative;\n align-items: center;\n }\n \n .p-divider-horizontal:before {\n position: absolute;\n display: block;\n top: 50%;\n left: 0;\n width: 100%;\n content: "";\n }\n \n .p-divider-horizontal.p-divider-left {\n justify-content: flex-start;\n }\n \n .p-divider-horizontal.p-divider-right {\n justify-content: flex-end;\n }\n \n .p-divider-horizontal.p-divider-center {\n justify-content: center;\n }\n \n .p-divider-content {\n z-index: 1;\n }\n \n .p-divider-vertical {\n min-height: 100%;\n margin: 0 1rem;\n display: flex;\n position: relative;\n justify-content: center;\n }\n \n .p-divider-vertical:before {\n position: absolute;\n display: block;\n top: 0;\n left: 50%;\n height: 100%;\n content: "";\n }\n \n .p-divider-vertical.p-divider-top {\n align-items: flex-start;\n }\n \n .p-divider-vertical.p-divider-center {\n align-items: center;\n }\n \n .p-divider-vertical.p-divider-bottom {\n align-items: flex-end;\n }\n \n .p-divider-solid.p-divider-horizontal:before {\n border-top-style: solid;\n }\n \n .p-divider-solid.p-divider-vertical:before {\n border-left-style: solid;\n }\n \n .p-divider-dashed.p-divider-horizontal:before {\n border-top-style: dashed;\n }\n \n .p-divider-dashed.p-divider-vertical:before {\n border-left-style: dashed;\n }\n \n .p-divider-dotted.p-divider-horizontal:before {\n border-top-style: dotted;\n }\n \n .p-divider-dotted.p-divider-horizontal:before {\n border-left-style: dotted;\n }\n}\n'}}),l=e.forwardRef((function(n,t){var l=e.useContext(d),a=o.getProps(n,l),p=o.setMetaData({props:a}),s=p.ptm,v=p.cx;r(o.css.styles,p.isUnstyled,{name:"divider"});var c=e.useRef(null),f="horizontal"===a.layout,m="vertical"===a.layout;e.useImperativeHandle(t,(function(){return{props:a,getElement:function(){return c.current}}}));var h=i({ref:c,style:a.style,className:v("root",{horizontal:f,vertical:m}),role:"separator"},o.getOtherProps(a),s("root")),u=i({className:v("content")},s("content"));return e.createElement("div",h,e.createElement("div",u,a.children))}));l.displayName="Divider";export{l as Divider};
|
package/dock/dock.esm.js
DELETED
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { PrimeReactContext } from 'primereact/api';
|
|
5
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
|
-
import { useMountEffect } from 'primereact/hooks';
|
|
7
|
-
import { Ripple } from 'primereact/ripple';
|
|
8
|
-
import { classNames, UniqueComponentId, mergeProps, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
12
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for (var key in source) {
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16
|
-
target[key] = source[key];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
return _extends.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function _typeof(o) {
|
|
26
|
-
"@babel/helpers - typeof";
|
|
27
|
-
|
|
28
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
29
|
-
return typeof o;
|
|
30
|
-
} : function (o) {
|
|
31
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
32
|
-
}, _typeof(o);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function _toPrimitive(input, hint) {
|
|
36
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
37
|
-
var prim = input[Symbol.toPrimitive];
|
|
38
|
-
if (prim !== undefined) {
|
|
39
|
-
var res = prim.call(input, hint || "default");
|
|
40
|
-
if (_typeof(res) !== "object") return res;
|
|
41
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
42
|
-
}
|
|
43
|
-
return (hint === "string" ? String : Number)(input);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _toPropertyKey(arg) {
|
|
47
|
-
var key = _toPrimitive(arg, "string");
|
|
48
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function _defineProperty(obj, key, value) {
|
|
52
|
-
key = _toPropertyKey(key);
|
|
53
|
-
if (key in obj) {
|
|
54
|
-
Object.defineProperty(obj, key, {
|
|
55
|
-
value: value,
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true
|
|
59
|
-
});
|
|
60
|
-
} else {
|
|
61
|
-
obj[key] = value;
|
|
62
|
-
}
|
|
63
|
-
return obj;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function _arrayWithHoles(arr) {
|
|
67
|
-
if (Array.isArray(arr)) return arr;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _iterableToArrayLimit(r, l) {
|
|
71
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
72
|
-
if (null != t) {
|
|
73
|
-
var e,
|
|
74
|
-
n,
|
|
75
|
-
i,
|
|
76
|
-
u,
|
|
77
|
-
a = [],
|
|
78
|
-
f = !0,
|
|
79
|
-
o = !1;
|
|
80
|
-
try {
|
|
81
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
82
|
-
if (Object(t) !== t) return;
|
|
83
|
-
f = !1;
|
|
84
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
85
|
-
} catch (r) {
|
|
86
|
-
o = !0, n = r;
|
|
87
|
-
} finally {
|
|
88
|
-
try {
|
|
89
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
90
|
-
} finally {
|
|
91
|
-
if (o) throw n;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return a;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _arrayLikeToArray(arr, len) {
|
|
99
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
100
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
101
|
-
return arr2;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
105
|
-
if (!o) return;
|
|
106
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
107
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
108
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
109
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
110
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function _nonIterableRest() {
|
|
114
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function _slicedToArray(arr, i) {
|
|
118
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var classes = {
|
|
122
|
-
icon: 'p-dock-action-icon',
|
|
123
|
-
action: function action(_ref) {
|
|
124
|
-
var disabled = _ref.disabled;
|
|
125
|
-
return classNames('p-dock-action', {
|
|
126
|
-
'p-disabled': disabled
|
|
127
|
-
});
|
|
128
|
-
},
|
|
129
|
-
menuitem: function menuitem(_ref2) {
|
|
130
|
-
var currentIndexState = _ref2.currentIndexState,
|
|
131
|
-
index = _ref2.index;
|
|
132
|
-
return classNames('p-dock-item', {
|
|
133
|
-
'p-dock-item-second-prev': currentIndexState - 2 === index,
|
|
134
|
-
'p-dock-item-prev': currentIndexState - 1 === index,
|
|
135
|
-
'p-dock-item-current': currentIndexState === index,
|
|
136
|
-
'p-dock-item-next': currentIndexState + 1 === index,
|
|
137
|
-
'p-dock-item-second-next': currentIndexState + 2 === index
|
|
138
|
-
});
|
|
139
|
-
},
|
|
140
|
-
header: 'p-dock-header',
|
|
141
|
-
menu: 'p-dock-list',
|
|
142
|
-
footer: 'p-dock-footer',
|
|
143
|
-
root: function root(_ref3) {
|
|
144
|
-
var props = _ref3.props;
|
|
145
|
-
return classNames("p-dock p-component p-dock-".concat(props.position), {
|
|
146
|
-
'p-dock-magnification': props.magnification
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
container: 'p-dock-container'
|
|
150
|
-
};
|
|
151
|
-
var styles = "\n@layer primereact {\n .p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n }\n \n .p-dock-container {\n display: flex;\n pointer-events: auto;\n }\n \n .p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n }\n \n .p-dock-magnification .p-dock-item {\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n }\n \n .p-dock-action {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n }\n \n .p-dock-magnification .p-dock-item-second-prev,\n .p-dock-magnification .p-dock-item-second-next {\n transform: scale(1.2);\n }\n \n .p-dock-magnification .p-dock-item-prev,\n .p-dock-magnification .p-dock-item-next {\n transform: scale(1.4);\n }\n \n .p-dock-magnification .p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n }\n \n /* Position */\n /* top */\n .p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n }\n \n .p-dock-top.p-dock-magnification .p-dock-item {\n transform-origin: center top;\n }\n \n .p-dock-top .p-dock-container {\n flex-direction: column-reverse;\n }\n \n /* bottom */\n .p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n }\n \n .p-dock-bottom.p-dock-magnification .p-dock-item {\n transform-origin: center bottom;\n }\n \n .p-dock-bottom .p-dock-container {\n flex-direction: column;\n }\n \n /* right */\n .p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n }\n \n .p-dock-right.p-dock-magnification .p-dock-item {\n transform-origin: center right;\n }\n \n .p-dock-right .p-dock-list {\n flex-direction: column;\n }\n \n /* left */\n .p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n }\n \n .p-dock-left.p-dock-magnification .p-dock-item {\n transform-origin: center left;\n }\n \n .p-dock-left .p-dock-list {\n flex-direction: column;\n }\n \n .p-dock-left .p-dock-container {\n flex-direction: row-reverse;\n }\n}\n";
|
|
152
|
-
var DockBase = ComponentBase.extend({
|
|
153
|
-
defaultProps: {
|
|
154
|
-
__TYPE: 'Dock',
|
|
155
|
-
id: null,
|
|
156
|
-
style: null,
|
|
157
|
-
className: null,
|
|
158
|
-
model: null,
|
|
159
|
-
position: 'bottom',
|
|
160
|
-
magnification: true,
|
|
161
|
-
header: null,
|
|
162
|
-
footer: null,
|
|
163
|
-
children: undefined
|
|
164
|
-
},
|
|
165
|
-
css: {
|
|
166
|
-
classes: classes,
|
|
167
|
-
styles: styles
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
172
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
173
|
-
var Dock = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
174
|
-
var _React$useState = React.useState(-3),
|
|
175
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
176
|
-
currentIndexState = _React$useState2[0],
|
|
177
|
-
setCurrentIndexState = _React$useState2[1];
|
|
178
|
-
var context = React.useContext(PrimeReactContext);
|
|
179
|
-
var props = DockBase.getProps(inProps, context);
|
|
180
|
-
var _React$useState3 = React.useState(props.id),
|
|
181
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
182
|
-
idState = _React$useState4[0],
|
|
183
|
-
setIdState = _React$useState4[1];
|
|
184
|
-
var _DockBase$setMetaData = DockBase.setMetaData({
|
|
185
|
-
props: props,
|
|
186
|
-
state: {
|
|
187
|
-
id: idState,
|
|
188
|
-
currentIndex: currentIndexState
|
|
189
|
-
}
|
|
190
|
-
}),
|
|
191
|
-
ptm = _DockBase$setMetaData.ptm,
|
|
192
|
-
cx = _DockBase$setMetaData.cx,
|
|
193
|
-
isUnstyled = _DockBase$setMetaData.isUnstyled;
|
|
194
|
-
var elementRef = React.useRef(null);
|
|
195
|
-
useHandleStyle(DockBase.css.styles, isUnstyled, {
|
|
196
|
-
name: 'dock'
|
|
197
|
-
});
|
|
198
|
-
var getPTOptions = function getPTOptions(key, item, index) {
|
|
199
|
-
return ptm(key, {
|
|
200
|
-
context: {
|
|
201
|
-
index: index,
|
|
202
|
-
item: item
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
var onListMouseLeave = function onListMouseLeave() {
|
|
207
|
-
setCurrentIndexState(-3);
|
|
208
|
-
};
|
|
209
|
-
var onItemMouseEnter = function onItemMouseEnter(index) {
|
|
210
|
-
setCurrentIndexState(index);
|
|
211
|
-
};
|
|
212
|
-
var onItemClick = function onItemClick(e, item) {
|
|
213
|
-
if (item.command) {
|
|
214
|
-
item.command({
|
|
215
|
-
originalEvent: e,
|
|
216
|
-
item: item
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
e.preventDefault();
|
|
220
|
-
};
|
|
221
|
-
var createItem = function createItem(item, index) {
|
|
222
|
-
if (item.visible === false) {
|
|
223
|
-
return null;
|
|
224
|
-
}
|
|
225
|
-
var disabled = item.disabled,
|
|
226
|
-
_icon = item.icon,
|
|
227
|
-
label = item.label,
|
|
228
|
-
template = item.template,
|
|
229
|
-
url = item.url,
|
|
230
|
-
target = item.target;
|
|
231
|
-
var key = item.id || idState + '_' + index;
|
|
232
|
-
var contentClassName = classNames('p-dock-action', {
|
|
233
|
-
'p-disabled': disabled
|
|
234
|
-
});
|
|
235
|
-
var iconClassName = classNames('p-dock-action-icon', _icon);
|
|
236
|
-
var iconProps = mergeProps({
|
|
237
|
-
className: cx('icon')
|
|
238
|
-
}, getPTOptions('icon', item, index));
|
|
239
|
-
var icon = IconUtils.getJSXIcon(_icon, _objectSpread({}, iconProps), {
|
|
240
|
-
props: props
|
|
241
|
-
});
|
|
242
|
-
var actionProps = mergeProps({
|
|
243
|
-
href: url || '#',
|
|
244
|
-
role: 'menuitem',
|
|
245
|
-
className: cx('action', {
|
|
246
|
-
disabled: disabled
|
|
247
|
-
}),
|
|
248
|
-
target: target,
|
|
249
|
-
'data-pr-tooltip': label,
|
|
250
|
-
onClick: function onClick(e) {
|
|
251
|
-
return onItemClick(e, item);
|
|
252
|
-
}
|
|
253
|
-
}, getPTOptions('action', item, index));
|
|
254
|
-
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
255
|
-
if (template) {
|
|
256
|
-
var defaultContentOptions = {
|
|
257
|
-
onClick: function onClick(e) {
|
|
258
|
-
return onItemClick(e, item);
|
|
259
|
-
},
|
|
260
|
-
className: contentClassName,
|
|
261
|
-
iconClassName: iconClassName,
|
|
262
|
-
element: content,
|
|
263
|
-
props: props,
|
|
264
|
-
index: index
|
|
265
|
-
};
|
|
266
|
-
content = ObjectUtils.getJSXElement(template, item, defaultContentOptions);
|
|
267
|
-
}
|
|
268
|
-
var menuitemProps = mergeProps({
|
|
269
|
-
id: key,
|
|
270
|
-
key: key,
|
|
271
|
-
className: cx('menuitem', {
|
|
272
|
-
currentIndexState: currentIndexState,
|
|
273
|
-
index: index
|
|
274
|
-
}),
|
|
275
|
-
role: 'none',
|
|
276
|
-
onMouseEnter: function onMouseEnter() {
|
|
277
|
-
return onItemMouseEnter(index);
|
|
278
|
-
}
|
|
279
|
-
}, getPTOptions('menuitem', item, index));
|
|
280
|
-
return /*#__PURE__*/React.createElement("li", menuitemProps, content);
|
|
281
|
-
};
|
|
282
|
-
var createItems = function createItems() {
|
|
283
|
-
return props.model ? props.model.map(createItem) : null;
|
|
284
|
-
};
|
|
285
|
-
var createHeader = function createHeader() {
|
|
286
|
-
if (props.header) {
|
|
287
|
-
var _header = ObjectUtils.getJSXElement(props.header, {
|
|
288
|
-
props: props
|
|
289
|
-
});
|
|
290
|
-
var headerProps = mergeProps({
|
|
291
|
-
className: cx('header')
|
|
292
|
-
}, ptm('header'));
|
|
293
|
-
return /*#__PURE__*/React.createElement("div", headerProps, _header);
|
|
294
|
-
}
|
|
295
|
-
return null;
|
|
296
|
-
};
|
|
297
|
-
var createList = function createList() {
|
|
298
|
-
var items = createItems();
|
|
299
|
-
var menuProps = mergeProps({
|
|
300
|
-
className: cx('menu'),
|
|
301
|
-
role: 'menu',
|
|
302
|
-
onMouseLeave: onListMouseLeave
|
|
303
|
-
}, ptm('menu'));
|
|
304
|
-
return /*#__PURE__*/React.createElement("ul", menuProps, items);
|
|
305
|
-
};
|
|
306
|
-
var createFooter = function createFooter() {
|
|
307
|
-
if (props.footer) {
|
|
308
|
-
var _footer = ObjectUtils.getJSXElement(props.footer, {
|
|
309
|
-
props: props
|
|
310
|
-
});
|
|
311
|
-
var footerProps = mergeProps({
|
|
312
|
-
className: cx('footer')
|
|
313
|
-
}, ptm('footer'));
|
|
314
|
-
return /*#__PURE__*/React.createElement("div", footerProps, _footer);
|
|
315
|
-
}
|
|
316
|
-
return null;
|
|
317
|
-
};
|
|
318
|
-
useMountEffect(function () {
|
|
319
|
-
if (!idState) {
|
|
320
|
-
setIdState(UniqueComponentId());
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
React.useImperativeHandle(ref, function () {
|
|
324
|
-
return {
|
|
325
|
-
props: props,
|
|
326
|
-
getElement: function getElement() {
|
|
327
|
-
return elementRef.current;
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
});
|
|
331
|
-
var header = createHeader();
|
|
332
|
-
var list = createList();
|
|
333
|
-
var footer = createFooter();
|
|
334
|
-
var rootProps = mergeProps({
|
|
335
|
-
className: classNames(props.className, cx('root')),
|
|
336
|
-
style: props.style
|
|
337
|
-
}, DockBase.getOtherProps(props), ptm('root'));
|
|
338
|
-
var containerProps = mergeProps({
|
|
339
|
-
className: cx('container')
|
|
340
|
-
}, ptm('container'));
|
|
341
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
342
|
-
id: props.id,
|
|
343
|
-
ref: elementRef
|
|
344
|
-
}, rootProps), /*#__PURE__*/React.createElement("div", containerProps, header, list, footer));
|
|
345
|
-
}));
|
|
346
|
-
Dock.displayName = 'Dock';
|
|
347
|
-
|
|
348
|
-
export { Dock };
|
package/dock/dock.esm.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as n from"react";import{PrimeReactContext as e}from"primereact/api";import{ComponentBase as t,useHandleStyle as o}from"primereact/componentbase";import{useMountEffect as r}from"primereact/hooks";import{Ripple as i}from"primereact/ripple";import{classNames as c,UniqueComponentId as a,mergeProps as l,ObjectUtils as p,IconUtils as m}from"primereact/utils";function u(){return u=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},u.apply(this,arguments)}function s(n){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s(n)}function d(n,e){if("object"!==s(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var o=t.call(n,e||"default");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}function f(n){var e=d(n,"string");return"symbol"===s(e)?e:String(e)}function k(n){if(Array.isArray(n))return n}function y(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var o,r,i,c,a=[],l=!0,p=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;l=!1}else for(;!(l=(o=i.call(t)).done)&&(a.push(o.value),a.length!==e);l=!0);}catch(n){p=!0,r=n}finally{try{if(!l&&null!=t.return&&(c=t.return(),Object(c)!==c))return}finally{if(p)throw r}}return a}}function b(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=n[t];return o}function g(n,e){if(n){if("string"==typeof n)return b(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(n,e):void 0}}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(n,e){return k(n)||y(n,e)||g(n,e)||v()}var x=t.extend({defaultProps:{__TYPE:"Dock",id:null,style:null,className:null,model:null,position:"bottom",magnification:!0,header:null,footer:null,children:void 0},css:{classes:{icon:"p-dock-action-icon",action:function(n){return c("p-dock-action",{"p-disabled":n.disabled})},menuitem:function(n){var e=n.currentIndexState,t=n.index;return c("p-dock-item",{"p-dock-item-second-prev":e-2===t,"p-dock-item-prev":e-1===t,"p-dock-item-current":e===t,"p-dock-item-next":e+1===t,"p-dock-item-second-next":e+2===t})},header:"p-dock-header",menu:"p-dock-list",footer:"p-dock-footer",root:function(n){var e=n.props;return c("p-dock p-component p-dock-".concat(e.position),{"p-dock-magnification":e.magnification})},container:"p-dock-container"},styles:"\n@layer primereact {\n .p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n }\n \n .p-dock-container {\n display: flex;\n pointer-events: auto;\n }\n \n .p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n }\n \n .p-dock-magnification .p-dock-item {\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n }\n \n .p-dock-action {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n }\n \n .p-dock-magnification .p-dock-item-second-prev,\n .p-dock-magnification .p-dock-item-second-next {\n transform: scale(1.2);\n }\n \n .p-dock-magnification .p-dock-item-prev,\n .p-dock-magnification .p-dock-item-next {\n transform: scale(1.4);\n }\n \n .p-dock-magnification .p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n }\n \n /* Position */\n /* top */\n .p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n }\n \n .p-dock-top.p-dock-magnification .p-dock-item {\n transform-origin: center top;\n }\n \n .p-dock-top .p-dock-container {\n flex-direction: column-reverse;\n }\n \n /* bottom */\n .p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n }\n \n .p-dock-bottom.p-dock-magnification .p-dock-item {\n transform-origin: center bottom;\n }\n \n .p-dock-bottom .p-dock-container {\n flex-direction: column;\n }\n \n /* right */\n .p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n }\n \n .p-dock-right.p-dock-magnification .p-dock-item {\n transform-origin: center right;\n }\n \n .p-dock-right .p-dock-list {\n flex-direction: column;\n }\n \n /* left */\n .p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n }\n \n .p-dock-left.p-dock-magnification .p-dock-item {\n transform-origin: center left;\n }\n \n .p-dock-left .p-dock-list {\n flex-direction: column;\n }\n \n .p-dock-left .p-dock-container {\n flex-direction: row-reverse;\n }\n}\n"}});function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){var o,r,i;o=n,i=t[e],(r=f(r=e))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var S=n.memo(n.forwardRef((function(t,s){var d=h(n.useState(-3),2),f=d[0],k=d[1],y=n.useContext(e),b=x.getProps(t,y),g=h(n.useState(b.id),2),v=g[0],O=g[1],S=x.setMetaData({props:b,state:{id:v,currentIndex:f}}),w=S.ptm,E=S.cx,P=S.isUnstyled,N=n.useRef(null);o(x.css.styles,P,{name:"dock"});var D=function(n,e,t){return w(n,{context:{index:t,item:e}})},I=function(){k(-3)},A=function(n){k(n)},C=function(n,e){e.command&&e.command({originalEvent:n,item:e}),n.preventDefault()},J=function(e,t){if(!1===e.visible)return null;var o=e.disabled,r=e.icon,a=e.label,u=e.template,s=e.url,d=e.target,k=e.id||v+"_"+t,y=c("p-dock-action",{"p-disabled":o}),g=c("p-dock-action-icon",r),h=l({className:E("icon")},D("icon",e,t)),x=m.getJSXIcon(r,j({},h),{props:b}),O=l({href:s||"#",role:"menuitem",className:E("action",{disabled:o}),target:d,"data-pr-tooltip":a,onClick:function(n){return C(n,e)}},D("action",e,t)),S=n.createElement("a",O,x,n.createElement(i,null));u&&(S=p.getJSXElement(u,e,{onClick:function(n){return C(n,e)},className:y,iconClassName:g,element:S,props:b,index:t}));var w=l({id:k,key:k,className:E("menuitem",{currentIndexState:f,index:t}),role:"none",onMouseEnter:function(){return A(t)}},D("menuitem",e,t));return n.createElement("li",w,S)};r((function(){v||O(a())})),n.useImperativeHandle(s,(function(){return{props:b,getElement:function(){return N.current}}}));var M,X,z=function(){if(b.header){var e=p.getJSXElement(b.header,{props:b}),t=l({className:E("header")},w("header"));return n.createElement("div",t,e)}return null}(),T=(M=b.model?b.model.map(J):null,X=l({className:E("menu"),role:"menu",onMouseLeave:I},w("menu")),n.createElement("ul",X,M)),_=function(){if(b.footer){var e=p.getJSXElement(b.footer,{props:b}),t=l({className:E("footer")},w("footer"));return n.createElement("div",t,e)}return null}(),R=l({className:c(b.className,E("root")),style:b.style},x.getOtherProps(b),w("root")),U=l({className:E("container")},w("container"));return n.createElement("div",u({id:b.id,ref:N},R),n.createElement("div",U,z,T,_))})));S.displayName="Dock";export{S as Dock};
|