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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t,{PrimeReactContext as n,localeOption as o}from"primereact/api";import{Button as r}from"primereact/button";import{ComponentBase as l,useHandleStyle as i}from"primereact/componentbase";import{useOverlayListener as a,useMountEffect as u,useUpdateEffect as p,useUnmountEffect as c}from"primereact/hooks";import{ChevronDownIcon as s}from"primereact/icons/chevrondown";import{SpinnerIcon as m}from"primereact/icons/spinner";import{TimesCircleIcon as d}from"primereact/icons/timescircle";import{InputText as f}from"primereact/inputtext";import{OverlayService as g}from"primereact/overlayservice";import{Tooltip as v}from"primereact/tooltip";import{classNames as y,mergeProps as b,ObjectUtils as h,UniqueComponentId as w,DomHandler as E,ZIndexUtils as x,IconUtils as C}from"primereact/utils";import{CSSTransition as O}from"primereact/csstransition";import{Portal as S}from"primereact/portal";import{Ripple as k}from"primereact/ripple";import{VirtualScroller as I}from"primereact/virtualscroller";function N(e){return N="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},N(e)}function D(e,t){if("object"!==N(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==N(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function T(e){var t=D(e,"string");return"symbol"===N(t)?t:String(t)}function P(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},j.apply(this,arguments)}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function A(e){if(Array.isArray(e))return M(e)}function L(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function F(e,t){if(e){if("string"==typeof e)return M(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)?M(e,t):void 0}}function G(){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 R(e){if(Array.isArray(e))return e}function _(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,l,i,a=[],u=!0,p=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=l.call(n)).done)&&(a.push(o.value),a.length!==t);u=!0);}catch(e){p=!0,r=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(p)throw r}}return a}}function K(){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 U(e,t){return R(e)||_(e,t)||F(e,t)||K()}var H=l.extend({defaultProps:{__TYPE:"AutoComplete",id:null,appendTo:null,autoFocus:!1,autoHighlight:!1,className:null,completeMethod:null,delay:300,disabled:!1,dropdown:!1,dropdownAriaLabel:null,dropdownAutoFocus:!0,dropdownIcon:null,dropdownMode:"blank",emptyMessage:null,field:null,forceSelection:!1,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,itemTemplate:null,loadingIcon:null,maxLength:null,minLength:1,multiple:!1,name:null,onBlur:null,onChange:null,onClear:null,onClick:null,onContextMenu:null,onDblClick:null,onDropdownClick:null,onFocus:null,onHide:null,onKeyPress:null,onKeyUp:null,onMouseDown:null,onSelect:null,onShow:null,onUnselect:null,optionGroupChildren:null,optionGroupLabel:null,optionGroupTemplate:null,panelClassName:null,panelFooterTemplate:null,panelStyle:null,placeholder:null,readOnly:!1,removeTokenIcon:null,scrollHeight:"200px",selectedItemTemplate:null,selectionLimit:null,showEmptyMessage:!1,size:null,style:null,suggestions:null,tabIndex:null,tooltip:null,tooltipOptions:null,transitionOptions:null,type:"text",value:null,virtualScrollerOptions:null,children:void 0},css:{classes:{root:function(e){var t=e.props;return y("p-autocomplete p-component p-inputwrapper",{"p-autocomplete-dd":t.dropdown,"p-autocomplete-multiple":t.multiple,"p-inputwrapper-filled":t.value,"p-inputwrapper-focus":e.focusedState})},container:function(e){return y("p-autocomplete-multiple-container p-component p-inputtext",{"p-disabled":e.props.disabled})},loadingIcon:"p-autocomplete-loader",dropdownButton:"p-autocomplete-dropdown",removeTokenIcon:"p-autocomplete-token-icon",token:"p-autocomplete-token p-highlight",tokenLabel:"p-autocomplete-token-label",inputToken:"p-autocomplete-input-token",input:function(e){return y("p-autocomplete-input",{"p-autocomplete-dd-input":e.props.dropdown})},panel:function(e){var n=e.context;return y("p-autocomplete-panel p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===t.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===t.ripple})},listWrapper:"p-autocomplete-items-wrapper",list:function(e){return e.virtualScrollerOptions?y("p-autocomplete-items",e.options.className):"p-autocomplete-items"},emptyMessage:"p-autocomplete-item",item:function(e){var t=e.suggestion;return y("p-autocomplete-item",{"p-disabled":t.disabled})},itemGroup:"p-autocomplete-item-group",footer:"p-autocomplete-footer",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-autocomplete {\n display: inline-flex;\n position: relative;\n }\n \n .p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-autocomplete-dd .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n }\n \n .p-autocomplete-dd .p-autocomplete-input,\n .p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n \n .p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n }\n \n .p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n }\n \n .p-autocomplete-panel {\n position: absolute;\n top: 0;\n left: 0;\n }\n \n .p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n }\n \n .p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-autocomplete-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-autocomplete-token-icon {\n cursor: pointer;\n }\n \n .p-autocomplete-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-autocomplete {\n display: flex;\n }\n \n .p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n }\n \n .p-autocomplete-items-wrapper {\n overflow: auto;\n } \n}\n"}});function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=e.memo(e.forwardRef((function(t,r){var l,i,a,u,p,c=t.ptm,s=t.cx,m=e.useContext(n),d=function(e,n){return c(e,B({hostName:t.hostName},n))},f=function(e,n){return d(n,{context:{selected:t.selectedItem.current===e}})},g=function(){if(t.panelFooterTemplate){var n=h.getJSXElement(t.panelFooterTemplate,t,t.onOverlayHide),o=b({className:s("footer")},d("footer"));return e.createElement("div",o,n)}return null},v=function(n,o,r){return t.getOptionGroupChildren(n).map((function(n,l){var i=o+"_"+l,a=t.selectedItem===n,u=t.itemTemplate?h.getJSXElement(t.itemTemplate,n,l):t.field?h.resolveFieldData(n,t.field):n,p=b({role:"option",className:s("item",{optionGroupLabel:t.optionGroupLabel,suggestion:n}),style:r,onClick:function(e){return t.onItemClick(e,n)},"aria-selected":a,"data-group":o,"data-index":l,"data-p-disabled":n.disabled},f(n,"item"));return e.createElement("li",j({key:i},p),u,e.createElement(k,null))}))},w=function(n,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l={height:r.props?r.props.itemSize:void 0};if(t.optionGroupLabel){var i=t.optionGroupTemplate?h.getJSXElement(t.optionGroupTemplate,n,o):t.getOptionGroupLabel(n),a=v(n,o,l),u=o+"_"+h.resolveFieldData(n,t.optionGroupLabel),p=b({className:s("itemGroup"),style:l},d("itemGroup"));return e.createElement(e.Fragment,{key:u},e.createElement("li",p,i),a)}var c=t.itemTemplate?h.getJSXElement(t.itemTemplate,n,o):t.field?h.resolveFieldData(n,t.field):n,m=b({index:o,role:"option",className:s("item",{suggestion:n}),style:l,onClick:function(e){return t.onItemClick(e,n)},"aria-selected":t.selectedItem===n,"data-p-disabled":n.disabled},f(n,"item"));return e.createElement("li",j({key:o},m),c,e.createElement(k,null))},E=function(){if(t.showEmptyMessage&&h.isEmpty(t.suggestions)){var n=t.emptyMessage||o("emptyMessage"),r=b({className:s("emptyMessage")},d("emptyMesage")),l=b({className:s("list")},d("list"));return e.createElement("ul",l,e.createElement("li",r,n))}if(t.virtualScrollerOptions){var i=B(B({},t.virtualScrollerOptions),{style:B(B({},t.virtualScrollerOptions.style),{height:t.scrollHeight}),autoSize:!0,items:t.suggestions,itemTemplate:function(e,t){return e&&w(e,t.index,t)},contentTemplate:function(n){var o=b({id:t.listId,ref:n.contentRef,style:n.style,className:s("list",{virtualScrollerProps:i,options:n}),role:"listbox"},d("list"));return e.createElement("ul",o,n.children)}});return e.createElement(I,j({ref:t.virtualScrollerRef},i,{pt:d("virtualScroller"),__parentMetadata:{parent:t.metaData}}))}var a=t.suggestions?t.suggestions.map(w):null,u=b({id:t.listId,className:s("list"),role:"listbox"},d("list")),p=b({className:s("listWrapper"),style:{maxHeight:t.scrollHeight||"auto"}},d("listWrapper"));return e.createElement("div",p,e.createElement("ul",u,a))},x=(l=B({},t.panelStyle||{}),i=E(),a=g(),u=b({className:y(t.panelClassName,s("panel",{context:m})),style:l,onClick:function(e){return t.onClick(e)}},d("panel")),p=b({classNames:s("transition"),in:t.in,timeout:{enter:120,exit:100},options:t.transitionOptions,unmountOnExit:!0,onEnter:t.onEnter,onEntering:t.onEntering,onEntered:t.onEntered,onExit:t.onExit,onExited:t.onExited},d("transition")),e.createElement(O,j({nodeRef:r},p),e.createElement("div",j({ref:r},u),i,a)));return e.createElement(S,{element:x,appendTo:t.appendTo})})));function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}z.displayName="AutoCompletePanel";var V=e.memo(e.forwardRef((function(l,O){var S=e.useContext(n),k=H.getProps(l,S),I=U(e.useState(k.id),2),N=I[0],D=I[1],T=U(e.useState(!1),2),P=T[0],M=T[1],R=U(e.useState(!1),2),_=R[0],K=R[1],q=U(e.useState(!1),2),B=q[0],J=q[1],V={props:k,state:{id:N,searching:P,focused:_,overlayVisible:B}},W=H.setMetaData(V),Z=W.ptm,Y=W.cx,$=W.sx,Q=W.isUnstyled;i(H.css.styles,Q,{name:"autocomplete"});var ee=e.useRef(null),te=e.useRef(null),ne=e.useRef(k.inputRef),oe=e.useRef(null),re=e.useRef(null),le=e.useRef(null),ie=e.useRef(null),ae=U(a({target:ee,overlay:te,listener:function(e,t){t.valid&&("outside"===t.type?!ce(e)&&be():be())},when:B}),2),ue=ae[0],pe=ae[1],ce=function(e){return k.multiple?e.target===oe.current||oe.current.contains(e.target):e.target===ne.current},se=function(e){le.current&&clearTimeout(le.current);var t=e.target.value;k.multiple||fe(e,t),h.isEmpty(t)?(be(),k.onClear&&k.onClear(e)):t.length>=k.minLength?le.current=setTimeout((function(){me(e,t,"input")}),k.delay):be()},me=function(e,t,n){null!=t&&("input"===n&&0===t.trim().length||k.completeMethod&&(M(!0),k.completeMethod({originalEvent:e,query:t})))},de=function(e,t,n){if(k.multiple){if(ne.current.value="",!je(t)&&Le()){var o=k.value?[].concat(A(r=k.value)||L(r)||F(r)||G(),[t]):[t];fe(e,o)}}else ve(t),fe(e,t);var r;k.onSelect&&k.onSelect({originalEvent:e,value:t}),n||(E.focus(ne.current),be())},fe=function(e,t){ie&&h.deepEquals(ie.current,t)||(k.onChange&&k.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:k.name,id:N,value:t}}),ie.current=h.isNotEmpty(t)?t:null)},ge=function(e){if(e){if("string"==typeof e)return e;if(k.selectedItemTemplate){var t=h.getJSXElement(k.selectedItemTemplate,e);return t||e}if(k.field){var n=h.resolveFieldData(e,k.field);return null!=n?n:e}return e}return""},ve=function(e){ne.current.value=ge(e)},ye=function(){J(!0)},be=function(){J(!1),M(!1)},he=function(){E.alignOverlay(te.current,k.multiple?oe.current:ne.current,k.appendTo||S&&S.appendTo||t.appendTo)},we=function(e){k.dropdownAutoFocus&&E.focus(ne.current,k.dropdownAutoFocus),"blank"===k.dropdownMode?me(e,"","dropdown"):"current"===k.dropdownMode&&me(e,ne.current.value,"dropdown"),k.onDropdownClick&&k.onDropdownClick({originalEvent:e,query:ne.current.value})},Ee=function(e,t){var n=k.value[t],o=k.value.filter((function(e,n){return t!==n}));fe(e,o),k.onUnselect&&k.onUnselect({originalEvent:e,value:n})},xe=function(e){if(B){var t=E.findSingle(te.current,"li.p-highlight");switch(e.which){case 40:if(t){var n=Oe(t);n&&(!Q()&&E.addClass(n,"p-highlight"),n.setAttribute("data-p-highlight",!0),E.removeClass(t,"p-highlight"),E.scrollInView(Me(),n))}else t=E.findSingle(te.current,"li"),E.hasClass(t,"p-autocomplete-item-group")&&(t=Oe(t)),t&&(!Q()&&E.addClass(t,"p-highlight"),t.setAttribute("data-p-highlight",!0));e.preventDefault();break;case 38:if(t){var o=Se(t);o&&(!Q()&&E.addClass(o,"p-highlight"),o.setAttribute("data-p-highlight",!0),!Q()&&E.removeClass(t,"p-highlight"),t.setAttribute("data-p-highlight",!1),E.scrollInView(Me(),o))}e.preventDefault();break;case 13:t&&(Ce(e,t),be(),e.preventDefault());break;case 27:be(),e.preventDefault();break;case 9:t&&Ce(e,t),be()}}if(k.multiple&&8===e.which)if(k.value&&k.value.length&&!ne.current.value){var r=k.value[k.value.length-1],l=k.value.slice(0,-1);fe(e,l),k.onUnselect&&k.onUnselect({originalEvent:e,value:r})}},Ce=function(e,t){k.optionGroupLabel?de(e,Ae(k.suggestions[t.dataset.group])[t.dataset.index]):de(e,k.suggestions[t.getAttribute("index")])},Oe=function e(t){var n=t.nextElementSibling;return n?E.hasClass(n,"p-autocomplete-item-group")?e(n):n:null},Se=function e(t){var n=t.previousElementSibling;return n?E.hasClass(n,"p-autocomplete-item-group")?e(n):n:null},ke=function(e){K(!0),k.onFocus&&k.onFocus(e)},Ie=function(e){if(k.multiple)ne.current.value="";else{var t=h.trim(e.target.value),n=(k.suggestions||[]).find((function(e){var n=k.field?h.resolveFieldData(e,k.field):e;return n&&t===h.trim(n)}));n?de(e,n,!0):(ne.current.value="",fe(e,null),k.onClear&&k.onClear(e))}},Ne=function(e){K(!1),k.forceSelection&&Ie(e),k.onBlur&&k.onBlur(e)},De=function(e){E.focus(ne.current),k.onClick&&k.onClick(e)},Te=function(e){ke(e),!Q()&&E.addClass(oe.current,"p-focus"),oe.current.setAttribute("data-p-focus",!0)},Pe=function(e){Ne(e),!Q()&&E.removeClass(oe.current,"p-focus"),oe.current.setAttribute("data-p-focus",!1)},je=function(e){return!!k.value&&k.value.some((function(t){return h.equals(t,e)}))},Me=function(){return te.current.firstChild},Ae=function(e){return h.resolveFieldData(e,k.optionGroupChildren)},Le=function(){return!k.value||!k.selectionLimit||k.value.length<k.selectionLimit};e.useEffect((function(){h.combinedRefs(ne,k.inputRef)}),[ne,k.inputRef]),u((function(){N||D(w()),k.autoFocus&&E.focus(ne.current,k.autoFocus)})),p((function(){P&&(h.isNotEmpty(k.suggestions)||k.showEmptyMessage?ye():be(),M(!1))}),[k.suggestions]),p((function(){ne.current&&!k.multiple&&ve(k.value),B&&he()})),c((function(){le.current&&clearTimeout(le.current),x.clear(te.current)})),e.useImperativeHandle(O,(function(){return{props:k,search:me,show:ye,hide:be,focus:function(){return E.focus(ne.current)},getElement:function(){return ee.current},getOverlay:function(){return te.current},getInput:function(){return ne.current},getVirtualScroller:function(){return re.current}}}));var Fe,Ge=function(t){var n=B?N+"_list":null,o=b({className:Y("inputToken")},Z("inputToken")),r=b(X({id:k.inputId,ref:ne,"aria-autocomplete":"list","aria-controls":n,"aria-expanded":B,"aria-haspopup":"listbox",autoComplete:"off",className:k.inputClassName,disabled:k.disabled,maxLength:k.maxLength,name:k.name,onBlur:Pe,onChange:t?se:void 0,onFocus:Te,onKeyDown:t?xe:void 0,onKeyPress:k.onKeyPress,onKeyUp:k.onKeyUp,placeholder:t?k.placeholder:void 0,readOnly:k.readOnly||!t,required:k.required,role:"combobox",style:k.inputStyle,tabIndex:k.tabIndex,type:k.type},He),Z("input"));return e.createElement("li",o,e.createElement("input",r))},Re=function(){var t=Le(),n=h.isNotEmpty(k.value)?k.value.map((function(t,n){var o=n+"multi-item",r=b({className:Y("removeTokenIcon"),onClick:function(e){return Ee(e,n)}},Z("removeTokenIcon")),l=!k.disabled&&C.getJSXIcon(k.removeTokenIcon||e.createElement(d,r),X({},r),{props:k}),i=b({className:Y("token")},Z("token")),a=b({className:Y("tokenLabel")},Z("tokenLabel"));return e.createElement("li",j({key:o},i),e.createElement("span",a,ge(t)),l)})):null,o=Ge(t),r=b({ref:oe,className:Y("container"),onClick:t?De:void 0,onContextMenu:k.onContextMenu,onMouseDown:k.onMouseDown,onDoubleClick:k.onDblClick,"data-p-focus":_,"data-p-disabled":k.disabled},Z("container"));return e.createElement("ul",r,n,o)},_e=N+"_list",Ke=h.isNotEmpty(k.tooltip),Ue=H.getOtherProps(k),He=h.reduceKeys(Ue,E.ARIA_PROPS),qe=function(){if(P){var t=b({className:Y("loadingIcon")},Z("loadingIcon")),n=k.loadingIcon||e.createElement(m,j({},t,{spin:!0}));return C.getJSXIcon(n,X({},t),{props:k})}return null}(),Be=k.multiple?Re():(Fe=ge(k.value),e.createElement(f,j({ref:ne,id:k.inputId,type:k.type,name:k.name,defaultValue:Fe,role:"combobox","aria-autocomplete":"list","aria-controls":B?N+"_list":null,"aria-haspopup":"listbox","aria-expanded":B,className:y(k.inputClassName,Y("input")),style:k.inputStyle,autoComplete:"off",readOnly:k.readOnly,required:k.required,disabled:k.disabled,placeholder:k.placeholder,size:k.size,maxLength:k.maxLength,tabIndex:k.tabIndex,onBlur:Ne,onFocus:ke,onChange:se,onMouseDown:k.onMouseDown,onKeyUp:k.onKeyUp,onKeyDown:xe,onKeyPress:k.onKeyPress,onContextMenu:k.onContextMenu,onClick:k.onClick,onDoubleClick:k.onDblClick,pt:Z("input")},He,{__parentMetadata:{parent:V}}))),ze=function(){if(k.dropdown){var t=k.dropdownAriaLabel||k.placeholder||o("choose");return e.createElement(r,{type:"button",icon:k.dropdownIcon||e.createElement(s,null),className:Y("dropdownButton"),disabled:k.disabled,onClick:we,"aria-label":t,pt:Z("dropdownButton"),__parentMetadata:{parent:V}})}return null}(),Je=b({id:N,ref:ee,style:k.style,className:y(k.className,Y("root",{focusedState:_}))},Ue,Z("root"));return e.createElement(e.Fragment,null,e.createElement("span",Je,Be,qe,ze,e.createElement(z,j({hostName:"AutoComplete",ref:te,virtualScrollerRef:re},k,{listId:_e,onItemClick:de,selectedItem:ie,onClick:function(e){g.emit("overlay-click",{originalEvent:e,target:ee.current})},getOptionGroupLabel:function(e){return k.optionGroupLabel?h.resolveFieldData(e,k.optionGroupLabel):e},getOptionGroupChildren:Ae,in:B,onEnter:function(){x.set("overlay",te.current,S&&S.autoZIndex||t.autoZIndex,S&&S.zIndex.overlay||t.zIndex.overlay),E.addStyles(te.current,{position:"absolute",top:"0",left:"0"}),he()},onEntering:function(){if(k.autoHighlight&&k.suggestions&&k.suggestions.length){var e=Me().firstChild.firstChild;!Q()&&E.addClass(e,"p-highlight"),e.current.setAttribute("data-p-highlight",!0)}},onEntered:function(){ue(),k.onShow&&k.onShow()},onExit:function(){pe()},onExited:function(){x.clear(te.current),k.onHide&&k.onHide()},ptm:Z,cx:Y,sx:$}))),Ke&&e.createElement(v,j({target:ee,content:k.tooltip},k.tooltipOptions,{pt:Z("tooltip")})))})));V.displayName="AutoComplete";export{V as AutoComplete};
|
package/avatar/avatar.esm.js
DELETED
|
@@ -1,245 +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 { classNames, ObjectUtils, DomHandler, mergeProps, IconUtils } from 'primereact/utils';
|
|
7
|
-
|
|
8
|
-
function _typeof(o) {
|
|
9
|
-
"@babel/helpers - typeof";
|
|
10
|
-
|
|
11
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
12
|
-
return typeof o;
|
|
13
|
-
} : function (o) {
|
|
14
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
15
|
-
}, _typeof(o);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function _toPrimitive(input, hint) {
|
|
19
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
20
|
-
var prim = input[Symbol.toPrimitive];
|
|
21
|
-
if (prim !== undefined) {
|
|
22
|
-
var res = prim.call(input, hint || "default");
|
|
23
|
-
if (_typeof(res) !== "object") return res;
|
|
24
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
25
|
-
}
|
|
26
|
-
return (hint === "string" ? String : Number)(input);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function _toPropertyKey(arg) {
|
|
30
|
-
var key = _toPrimitive(arg, "string");
|
|
31
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _defineProperty(obj, key, value) {
|
|
35
|
-
key = _toPropertyKey(key);
|
|
36
|
-
if (key in obj) {
|
|
37
|
-
Object.defineProperty(obj, key, {
|
|
38
|
-
value: value,
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true
|
|
42
|
-
});
|
|
43
|
-
} else {
|
|
44
|
-
obj[key] = value;
|
|
45
|
-
}
|
|
46
|
-
return obj;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function _extends() {
|
|
50
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
51
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
52
|
-
var source = arguments[i];
|
|
53
|
-
for (var key in source) {
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
55
|
-
target[key] = source[key];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return target;
|
|
60
|
-
};
|
|
61
|
-
return _extends.apply(this, arguments);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _arrayWithHoles(arr) {
|
|
65
|
-
if (Array.isArray(arr)) return arr;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _iterableToArrayLimit(r, l) {
|
|
69
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
70
|
-
if (null != t) {
|
|
71
|
-
var e,
|
|
72
|
-
n,
|
|
73
|
-
i,
|
|
74
|
-
u,
|
|
75
|
-
a = [],
|
|
76
|
-
f = !0,
|
|
77
|
-
o = !1;
|
|
78
|
-
try {
|
|
79
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
80
|
-
if (Object(t) !== t) return;
|
|
81
|
-
f = !1;
|
|
82
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
83
|
-
} catch (r) {
|
|
84
|
-
o = !0, n = r;
|
|
85
|
-
} finally {
|
|
86
|
-
try {
|
|
87
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
88
|
-
} finally {
|
|
89
|
-
if (o) throw n;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return a;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function _arrayLikeToArray(arr, len) {
|
|
97
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
98
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
99
|
-
return arr2;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
103
|
-
if (!o) return;
|
|
104
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
105
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
106
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
107
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
108
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function _nonIterableRest() {
|
|
112
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function _slicedToArray(arr, i) {
|
|
116
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
var classes = {
|
|
120
|
-
root: function root(_ref) {
|
|
121
|
-
var props = _ref.props,
|
|
122
|
-
state = _ref.state;
|
|
123
|
-
return classNames('p-avatar p-component', {
|
|
124
|
-
'p-avatar-image': ObjectUtils.isNotEmpty(props.image) && !state.imageFailed,
|
|
125
|
-
'p-avatar-circle': props.shape === 'circle',
|
|
126
|
-
'p-avatar-lg': props.size === 'large',
|
|
127
|
-
'p-avatar-xl': props.size === 'xlarge',
|
|
128
|
-
'p-avatar-clickable': !!props.onClick
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
label: 'p-avatar-text',
|
|
132
|
-
icon: 'p-avatar-icon'
|
|
133
|
-
};
|
|
134
|
-
var styles = "\n@layer primereact {\n .p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n }\n \n .p-avatar.p-avatar-image {\n background-color: transparent;\n }\n \n .p-avatar.p-avatar-circle {\n border-radius: 50%;\n }\n \n .p-avatar.p-avatar-circle img {\n border-radius: 50%;\n }\n \n .p-avatar .p-avatar-icon {\n font-size: 1rem;\n }\n \n .p-avatar img {\n width: 100%;\n height: 100%;\n }\n \n .p-avatar-clickable {\n cursor: pointer;\n }\n}\n";
|
|
135
|
-
var AvatarBase = ComponentBase.extend({
|
|
136
|
-
defaultProps: {
|
|
137
|
-
__TYPE: 'Avatar',
|
|
138
|
-
className: null,
|
|
139
|
-
icon: null,
|
|
140
|
-
image: null,
|
|
141
|
-
imageAlt: 'avatar',
|
|
142
|
-
imageFallback: 'default',
|
|
143
|
-
label: null,
|
|
144
|
-
onImageError: null,
|
|
145
|
-
shape: 'square',
|
|
146
|
-
size: 'normal',
|
|
147
|
-
style: null,
|
|
148
|
-
template: null,
|
|
149
|
-
children: undefined
|
|
150
|
-
},
|
|
151
|
-
css: {
|
|
152
|
-
classes: classes,
|
|
153
|
-
styles: styles
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
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; }
|
|
158
|
-
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; }
|
|
159
|
-
var Avatar = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
160
|
-
var context = React.useContext(PrimeReactContext);
|
|
161
|
-
var props = AvatarBase.getProps(inProps, context);
|
|
162
|
-
var elementRef = React.useRef(null);
|
|
163
|
-
var _React$useState = React.useState(false),
|
|
164
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
165
|
-
imageFailed = _React$useState2[0],
|
|
166
|
-
setImageFailed = _React$useState2[1];
|
|
167
|
-
var _React$useState3 = React.useState(false),
|
|
168
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
169
|
-
nested = _React$useState4[0],
|
|
170
|
-
setNested = _React$useState4[1];
|
|
171
|
-
var _AvatarBase$setMetaDa = AvatarBase.setMetaData({
|
|
172
|
-
props: props,
|
|
173
|
-
state: {
|
|
174
|
-
imageFailed: imageFailed,
|
|
175
|
-
nested: nested
|
|
176
|
-
}
|
|
177
|
-
}),
|
|
178
|
-
ptm = _AvatarBase$setMetaDa.ptm,
|
|
179
|
-
cx = _AvatarBase$setMetaDa.cx,
|
|
180
|
-
isUnstyled = _AvatarBase$setMetaDa.isUnstyled;
|
|
181
|
-
useHandleStyle(AvatarBase.css.styles, isUnstyled, {
|
|
182
|
-
name: 'avatar'
|
|
183
|
-
});
|
|
184
|
-
var createContent = function createContent() {
|
|
185
|
-
if (ObjectUtils.isNotEmpty(props.image) && !imageFailed) {
|
|
186
|
-
var imageProps = mergeProps({
|
|
187
|
-
src: props.image,
|
|
188
|
-
onError: onImageError
|
|
189
|
-
}, ptm('image'));
|
|
190
|
-
return /*#__PURE__*/React.createElement("img", _extends({
|
|
191
|
-
alt: props.imageAlt
|
|
192
|
-
}, imageProps));
|
|
193
|
-
} else if (props.label) {
|
|
194
|
-
var labelProps = mergeProps({
|
|
195
|
-
className: cx('label')
|
|
196
|
-
}, ptm('label'));
|
|
197
|
-
return /*#__PURE__*/React.createElement("span", labelProps, props.label);
|
|
198
|
-
} else if (props.icon) {
|
|
199
|
-
var iconProps = mergeProps({
|
|
200
|
-
className: cx('icon')
|
|
201
|
-
}, ptm('icon'));
|
|
202
|
-
return IconUtils.getJSXIcon(props.icon, _objectSpread({}, iconProps), {
|
|
203
|
-
props: props
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
return null;
|
|
207
|
-
};
|
|
208
|
-
var onImageError = function onImageError(event) {
|
|
209
|
-
if (props.imageFallback === 'default') {
|
|
210
|
-
if (!props.onImageError) {
|
|
211
|
-
// fallback to label or icon
|
|
212
|
-
setImageFailed(true);
|
|
213
|
-
event.target.src = null;
|
|
214
|
-
}
|
|
215
|
-
} else {
|
|
216
|
-
// try fallback as an image
|
|
217
|
-
event.target.src = props.imageFallback;
|
|
218
|
-
}
|
|
219
|
-
props.onImageError && props.onImageError(event);
|
|
220
|
-
};
|
|
221
|
-
React.useEffect(function () {
|
|
222
|
-
var nested = DomHandler.isAttributeEquals(elementRef.current.parentElement, 'data-pc-name', 'avatargroup');
|
|
223
|
-
setNested(nested);
|
|
224
|
-
}, []);
|
|
225
|
-
React.useImperativeHandle(ref, function () {
|
|
226
|
-
return {
|
|
227
|
-
props: props,
|
|
228
|
-
getElement: function getElement() {
|
|
229
|
-
return elementRef.current;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
});
|
|
233
|
-
var rootProps = mergeProps({
|
|
234
|
-
ref: elementRef,
|
|
235
|
-
style: props.style,
|
|
236
|
-
className: classNames(props.className, cx('root', {
|
|
237
|
-
imageFailed: imageFailed
|
|
238
|
-
}))
|
|
239
|
-
}, AvatarBase.getOtherProps(props), ptm('root'));
|
|
240
|
-
var content = props.template ? ObjectUtils.getJSXElement(props.template, props) : createContent();
|
|
241
|
-
return /*#__PURE__*/React.createElement("div", rootProps, content, props.children);
|
|
242
|
-
});
|
|
243
|
-
Avatar.displayName = 'Avatar';
|
|
244
|
-
|
|
245
|
-
export { Avatar };
|
package/avatar/avatar.esm.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{PrimeReactContext as r}from"primereact/api";import{ComponentBase as t,useHandleStyle as n}from"primereact/componentbase";import{classNames as a,ObjectUtils as o,DomHandler as i,mergeProps as l,IconUtils as c}from"primereact/utils";function u(e){return u="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},u(e)}function s(e,r){if("object"!==u(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function p(e){var r=s(e,"string");return"symbol"===u(r)?r:String(r)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},m.apply(this,arguments)}function f(e){if(Array.isArray(e))return e}function v(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=o.call(t)).done)&&(l.push(n.value),l.length!==r);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}function b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function y(e,r){if(e){if("string"==typeof e)return b(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,r):void 0}}function g(){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 d(e,r){return f(e)||v(e,r)||y(e,r)||g()}var h=t.extend({defaultProps:{__TYPE:"Avatar",className:null,icon:null,image:null,imageAlt:"avatar",imageFallback:"default",label:null,onImageError:null,shape:"square",size:"normal",style:null,template:null,children:void 0},css:{classes:{root:function(e){var r=e.props,t=e.state;return a("p-avatar p-component",{"p-avatar-image":o.isNotEmpty(r.image)&&!t.imageFailed,"p-avatar-circle":"circle"===r.shape,"p-avatar-lg":"large"===r.size,"p-avatar-xl":"xlarge"===r.size,"p-avatar-clickable":!!r.onClick})},label:"p-avatar-text",icon:"p-avatar-icon"},styles:"\n@layer primereact {\n .p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n }\n \n .p-avatar.p-avatar-image {\n background-color: transparent;\n }\n \n .p-avatar.p-avatar-circle {\n border-radius: 50%;\n }\n \n .p-avatar.p-avatar-circle img {\n border-radius: 50%;\n }\n \n .p-avatar .p-avatar-icon {\n font-size: 1rem;\n }\n \n .p-avatar img {\n width: 100%;\n height: 100%;\n }\n \n .p-avatar-clickable {\n cursor: pointer;\n }\n}\n"}});function O(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?O(Object(t),!0).forEach((function(r){var n,a,o;n=e,o=t[r],(a=p(a=r))in n?Object.defineProperty(n,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[a]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var E=e.forwardRef((function(t,u){var s=e.useContext(r),p=h.getProps(t,s),f=e.useRef(null),v=d(e.useState(!1),2),b=v[0],y=v[1],g=d(e.useState(!1),2),O=g[1],E=h.setMetaData({props:p,state:{imageFailed:b,nested:g[0]}}),S=E.ptm,w=E.cx;n(h.css.styles,E.isUnstyled,{name:"avatar"});var P=function(e){"default"===p.imageFallback?p.onImageError||(y(!0),e.target.src=null):e.target.src=p.imageFallback,p.onImageError&&p.onImageError(e)};e.useEffect((function(){var e=i.isAttributeEquals(f.current.parentElement,"data-pc-name","avatargroup");O(e)}),[]),e.useImperativeHandle(u,(function(){return{props:p,getElement:function(){return f.current}}}));var A=l({ref:f,style:p.style,className:a(p.className,w("root",{imageFailed:b}))},h.getOtherProps(p),S("root")),x=p.template?o.getJSXElement(p.template,p):function(){if(o.isNotEmpty(p.image)&&!b){var r=l({src:p.image,onError:P},S("image"));return e.createElement("img",m({alt:p.imageAlt},r))}if(p.label){var t=l({className:w("label")},S("label"));return e.createElement("span",t,p.label)}if(p.icon){var n=l({className:w("icon")},S("icon"));return c.getJSXIcon(p.icon,j({},n),{props:p})}return null}();return e.createElement("div",A,x,p.children)}));E.displayName="Avatar";export{E as Avatar};
|
|
@@ -1,55 +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 { mergeProps, classNames } from 'primereact/utils';
|
|
7
|
-
|
|
8
|
-
var classes = {
|
|
9
|
-
root: 'p-avatar-group p-component'
|
|
10
|
-
};
|
|
11
|
-
var styles = "\n@layer primereact {\n .p-avatar-group .p-avatar + .p-avatar {\n margin-left: -1rem;\n }\n \n .p-avatar-group {\n display: flex;\n align-items: center;\n }\n}\n";
|
|
12
|
-
var AvatarGroupBase = ComponentBase.extend({
|
|
13
|
-
defaultProps: {
|
|
14
|
-
__TYPE: 'AvatarGroup',
|
|
15
|
-
style: null,
|
|
16
|
-
className: null,
|
|
17
|
-
children: undefined
|
|
18
|
-
},
|
|
19
|
-
css: {
|
|
20
|
-
classes: classes,
|
|
21
|
-
styles: styles
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
var AvatarGroup = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
26
|
-
var context = React.useContext(PrimeReactContext);
|
|
27
|
-
var props = AvatarGroupBase.getProps(inProps, context);
|
|
28
|
-
var _AvatarGroupBase$setM = AvatarGroupBase.setMetaData({
|
|
29
|
-
props: props
|
|
30
|
-
}),
|
|
31
|
-
ptm = _AvatarGroupBase$setM.ptm,
|
|
32
|
-
cx = _AvatarGroupBase$setM.cx,
|
|
33
|
-
isUnstyled = _AvatarGroupBase$setM.isUnstyled;
|
|
34
|
-
useHandleStyle(AvatarGroupBase.css.styles, isUnstyled, {
|
|
35
|
-
name: 'avatargroup'
|
|
36
|
-
});
|
|
37
|
-
var elementRef = React.useRef(null);
|
|
38
|
-
React.useImperativeHandle(ref, function () {
|
|
39
|
-
return {
|
|
40
|
-
props: props,
|
|
41
|
-
getElement: function getElement() {
|
|
42
|
-
return elementRef.current;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
var rootProps = mergeProps({
|
|
47
|
-
ref: elementRef,
|
|
48
|
-
style: props.style,
|
|
49
|
-
className: classNames(props.className, cx('root'))
|
|
50
|
-
}, AvatarGroupBase.getOtherProps(props), ptm('root'));
|
|
51
|
-
return /*#__PURE__*/React.createElement("div", rootProps, props.children);
|
|
52
|
-
});
|
|
53
|
-
AvatarGroup.displayName = 'AvatarGroup';
|
|
54
|
-
|
|
55
|
-
export { AvatarGroup };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as r from"react";import{PrimeReactContext as e}from"primereact/api";import{ComponentBase as a,useHandleStyle as t}from"primereact/componentbase";import{mergeProps as n,classNames as s}from"primereact/utils";var o=a.extend({defaultProps:{__TYPE:"AvatarGroup",style:null,className:null,children:void 0},css:{classes:{root:"p-avatar-group p-component"},styles:"\n@layer primereact {\n .p-avatar-group .p-avatar + .p-avatar {\n margin-left: -1rem;\n }\n \n .p-avatar-group {\n display: flex;\n align-items: center;\n }\n}\n"}}),p=r.forwardRef((function(a,p){var l=r.useContext(e),m=o.getProps(a,l),i=o.setMetaData({props:m}),c=i.ptm,u=i.cx;t(o.css.styles,i.isUnstyled,{name:"avatargroup"});var v=r.useRef(null);r.useImperativeHandle(p,(function(){return{props:m,getElement:function(){return v.current}}}));var f=n({ref:v,style:m.style,className:s(m.className,u("root"))},o.getOtherProps(m),c("root"));return r.createElement("div",f,m.children)}));p.displayName="AvatarGroup";export{p as AvatarGroup};
|
package/badge/badge.esm.js
DELETED
|
@@ -1,110 +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 { classNames, ObjectUtils, mergeProps } from 'primereact/utils';
|
|
7
|
-
|
|
8
|
-
function _typeof(o) {
|
|
9
|
-
"@babel/helpers - typeof";
|
|
10
|
-
|
|
11
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
12
|
-
return typeof o;
|
|
13
|
-
} : function (o) {
|
|
14
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
15
|
-
}, _typeof(o);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function _toPrimitive(input, hint) {
|
|
19
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
20
|
-
var prim = input[Symbol.toPrimitive];
|
|
21
|
-
if (prim !== undefined) {
|
|
22
|
-
var res = prim.call(input, hint || "default");
|
|
23
|
-
if (_typeof(res) !== "object") return res;
|
|
24
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
25
|
-
}
|
|
26
|
-
return (hint === "string" ? String : Number)(input);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function _toPropertyKey(arg) {
|
|
30
|
-
var key = _toPrimitive(arg, "string");
|
|
31
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _defineProperty(obj, key, value) {
|
|
35
|
-
key = _toPropertyKey(key);
|
|
36
|
-
if (key in obj) {
|
|
37
|
-
Object.defineProperty(obj, key, {
|
|
38
|
-
value: value,
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true
|
|
42
|
-
});
|
|
43
|
-
} else {
|
|
44
|
-
obj[key] = value;
|
|
45
|
-
}
|
|
46
|
-
return obj;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
var classes = {
|
|
50
|
-
root: function root(_ref) {
|
|
51
|
-
var props = _ref.props;
|
|
52
|
-
return classNames('p-badge p-component', _defineProperty({
|
|
53
|
-
'p-badge-no-gutter': ObjectUtils.isNotEmpty(props.value) && String(props.value).length === 1,
|
|
54
|
-
'p-badge-dot': ObjectUtils.isEmpty(props.value),
|
|
55
|
-
'p-badge-lg': props.size === 'large',
|
|
56
|
-
'p-badge-xl': props.size === 'xlarge'
|
|
57
|
-
}, "p-badge-".concat(props.severity), props.severity !== null));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var styles = "\n@layer primereact {\n .p-badge {\n display: inline-block;\n border-radius: 10px;\n text-align: center;\n padding: 0 .5rem;\n }\n \n .p-overlay-badge {\n position: relative;\n }\n \n .p-overlay-badge .p-badge {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%,-50%);\n transform-origin: 100% 0;\n margin: 0;\n }\n \n .p-badge-dot {\n width: .5rem;\n min-width: .5rem;\n height: .5rem;\n border-radius: 50%;\n padding: 0;\n }\n \n .p-badge-no-gutter {\n padding: 0;\n border-radius: 50%;\n }\n}\n";
|
|
61
|
-
var BadgeBase = ComponentBase.extend({
|
|
62
|
-
defaultProps: {
|
|
63
|
-
__TYPE: 'Badge',
|
|
64
|
-
__parentMetadata: null,
|
|
65
|
-
value: null,
|
|
66
|
-
severity: null,
|
|
67
|
-
size: null,
|
|
68
|
-
style: null,
|
|
69
|
-
className: null,
|
|
70
|
-
children: undefined
|
|
71
|
-
},
|
|
72
|
-
css: {
|
|
73
|
-
classes: classes,
|
|
74
|
-
styles: styles
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
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; }
|
|
79
|
-
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; }
|
|
80
|
-
var Badge = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
81
|
-
var context = React.useContext(PrimeReactContext);
|
|
82
|
-
var props = BadgeBase.getProps(inProps, context);
|
|
83
|
-
var _BadgeBase$setMetaDat = BadgeBase.setMetaData(_objectSpread({
|
|
84
|
-
props: props
|
|
85
|
-
}, props.__parentMetadata)),
|
|
86
|
-
ptm = _BadgeBase$setMetaDat.ptm,
|
|
87
|
-
cx = _BadgeBase$setMetaDat.cx,
|
|
88
|
-
isUnstyled = _BadgeBase$setMetaDat.isUnstyled;
|
|
89
|
-
useHandleStyle(BadgeBase.css.styles, isUnstyled, {
|
|
90
|
-
name: 'badge'
|
|
91
|
-
});
|
|
92
|
-
var elementRef = React.useRef(null);
|
|
93
|
-
React.useImperativeHandle(ref, function () {
|
|
94
|
-
return {
|
|
95
|
-
props: props,
|
|
96
|
-
getElement: function getElement() {
|
|
97
|
-
return elementRef.current;
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
});
|
|
101
|
-
var rootProps = mergeProps({
|
|
102
|
-
ref: elementRef,
|
|
103
|
-
style: props.style,
|
|
104
|
-
className: classNames(props.className, cx('root'))
|
|
105
|
-
}, BadgeBase.getOtherProps(props), ptm('root'));
|
|
106
|
-
return /*#__PURE__*/React.createElement("span", rootProps, props.value);
|
|
107
|
-
}));
|
|
108
|
-
Badge.displayName = 'Badge';
|
|
109
|
-
|
|
110
|
-
export { Badge };
|
package/badge/badge.esm.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{PrimeReactContext as r}from"primereact/api";import{ComponentBase as t,useHandleStyle as n}from"primereact/componentbase";import{classNames as o,ObjectUtils as a,mergeProps as i}from"primereact/utils";function l(e){return l="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},l(e)}function p(e,r){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function s(e){var r=p(e,"string");return"symbol"===l(r)?r:String(r)}function u(e,r,t){return(r=s(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c=t.extend({defaultProps:{__TYPE:"Badge",__parentMetadata:null,value:null,severity:null,size:null,style:null,className:null,children:void 0},css:{classes:{root:function(e){var r=e.props;return o("p-badge p-component",u({"p-badge-no-gutter":a.isNotEmpty(r.value)&&1===String(r.value).length,"p-badge-dot":a.isEmpty(r.value),"p-badge-lg":"large"===r.size,"p-badge-xl":"xlarge"===r.size},"p-badge-".concat(r.severity),null!==r.severity))}},styles:"\n@layer primereact {\n .p-badge {\n display: inline-block;\n border-radius: 10px;\n text-align: center;\n padding: 0 .5rem;\n }\n \n .p-overlay-badge {\n position: relative;\n }\n \n .p-overlay-badge .p-badge {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%,-50%);\n transform-origin: 100% 0;\n margin: 0;\n }\n \n .p-badge-dot {\n width: .5rem;\n min-width: .5rem;\n height: .5rem;\n border-radius: 50%;\n padding: 0;\n }\n \n .p-badge-no-gutter {\n padding: 0;\n border-radius: 50%;\n }\n}\n"}});function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function b(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){u(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var d=e.memo(e.forwardRef((function(t,a){var l=e.useContext(r),p=c.getProps(t,l),s=c.setMetaData(b({props:p},p.__parentMetadata)),u=s.ptm,m=s.cx;n(c.css.styles,s.isUnstyled,{name:"badge"});var d=e.useRef(null);e.useImperativeHandle(a,(function(){return{props:p,getElement:function(){return d.current}}}));var f=i({ref:d,style:p.style,className:o(p.className,m("root"))},c.getOtherProps(p),u("root"));return e.createElement("span",f,p.value)})));d.displayName="Badge";export{d as Badge};
|