primereact 10.7.0 → 10.8.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 -0
- package/api/api.cjs.js +18 -14
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +3 -3
- package/api/api.esm.js +18 -14
- package/api/api.esm.min.js +1 -1
- package/api/api.js +18 -14
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +18 -7
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -3
- package/autocomplete/autocomplete.esm.js +18 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +18 -7
- package/autocomplete/autocomplete.min.js +1 -1
- package/button/button.d.ts +2 -2
- package/calendar/calendar.cjs.js +14 -10
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +4 -3
- package/calendar/calendar.esm.js +14 -10
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +14 -10
- package/calendar/calendar.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +4 -3
- package/column/column.d.ts +8 -14
- package/core/core.js +54 -62
- package/core/core.min.js +9 -9
- package/datatable/datatable.cjs.js +59 -62
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +38 -2
- package/datatable/datatable.esm.js +59 -62
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +59 -62
- package/datatable/datatable.min.js +1 -1
- package/dialog/dialog.cjs.js +1 -1
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +1 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +1 -1
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +13 -7
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +13 -7
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +13 -7
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +15 -3
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +16 -3
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +15 -3
- package/editor/editor.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +1 -16
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +1 -16
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +1 -16
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +1 -16
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +1 -16
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +1 -16
- package/icons/sortamountupalt/index.min.js +1 -1
- package/inplace/inplace.d.ts +1 -1
- package/inputnumber/inputnumber.cjs.js +1 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +1 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +1 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +4 -3
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.d.ts +2 -3
- package/inputotp/inputotp.esm.js +4 -3
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +4 -3
- package/inputotp/inputotp.min.js +1 -1
- package/listbox/listbox.cjs.js +4 -0
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +4 -0
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +4 -0
- package/listbox/listbox.min.js +1 -1
- package/mention/mention.cjs.js +1 -0
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +1 -0
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +1 -0
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +3 -3
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +3 -3
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +3 -3
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +1 -1
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +1 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +1 -1
- package/menubar/menubar.min.js +1 -1
- package/messages/messages.d.ts +21 -0
- package/multiselect/multiselect.cjs.js +8 -5
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +1 -9
- package/multiselect/multiselect.esm.js +8 -5
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +8 -5
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +3 -2
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -2
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -2
- package/orderlist/orderlist.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +9 -7
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +9 -7
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +9 -7
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -2
- package/password/password.cjs.js +1 -0
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -0
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -0
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +9 -7
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +9 -7
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +9 -7
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +342 -314
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +342 -314
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +342 -314
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +9 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +9 -9
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +9 -9
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/themes/lara-dark-amber/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-amber/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-amber/theme.css +2 -2
- package/resources/themes/lara-dark-blue/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +2 -2
- package/resources/themes/lara-dark-cyan/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/theme.css +2 -2
- package/resources/themes/lara-dark-green/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-green/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-green/theme.css +2 -2
- package/resources/themes/lara-dark-indigo/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +2 -2
- package/resources/themes/lara-dark-pink/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-pink/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-pink/theme.css +2 -2
- package/resources/themes/lara-dark-purple/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +6 -6
- package/resources/themes/lara-dark-teal/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +2 -2
- package/resources/themes/lara-light-amber/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-amber/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-amber/theme.css +2 -2
- package/resources/themes/lara-light-blue/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +2 -2
- package/resources/themes/lara-light-cyan/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-cyan/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-cyan/theme.css +2 -2
- package/resources/themes/lara-light-green/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-green/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-green/theme.css +2 -2
- package/resources/themes/lara-light-indigo/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +2 -2
- package/resources/themes/lara-light-pink/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-pink/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-pink/theme.css +2 -2
- package/resources/themes/lara-light-purple/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +6 -6
- package/resources/themes/lara-light-teal/fonts/InterVariable-Italic.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/InterVariable.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +2 -2
- package/resources/themes/md-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/md-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/md-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/md-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/md-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/md-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/md-dark-indigo/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/md-dark-indigo/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/md-dark-indigo/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/md-dark-indigo/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/md-dark-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/md-dark-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/md-light-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/md-light-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/md-light-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/md-light-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/md-light-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/md-light-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/md-light-indigo/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/md-light-indigo/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/md-light-indigo/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/md-light-indigo/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/md-light-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/md-light-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/mdc-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/mdc-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/mdc-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/mdc-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/mdc-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/mdc-dark-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/mdc-dark-indigo/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/mdc-dark-indigo/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/mdc-dark-indigo/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/mdc-dark-indigo/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/mdc-dark-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/mdc-dark-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/mdc-light-indigo/fonts/roboto-v20-latin-ext_latin-500.woff +0 -0
- package/resources/themes/mdc-light-indigo/fonts/roboto-v20-latin-ext_latin-500.woff2 +0 -0
- package/resources/themes/mdc-light-indigo/fonts/roboto-v20-latin-ext_latin-700.woff +0 -0
- package/resources/themes/mdc-light-indigo/fonts/roboto-v20-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/mdc-light-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/mdc-light-indigo/fonts/roboto-v20-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/sidebar/sidebar.cjs.js +1 -1
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +1 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/stepper/stepper.cjs.js +7 -1
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.esm.js +8 -2
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +7 -1
- package/stepper/stepper.min.js +1 -1
- package/toast/toast.cjs.js +9 -7
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +9 -7
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +9 -7
- package/toast/toast.min.js +1 -1
- package/tree/tree.cjs.js +5 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +5 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +5 -1
- package/tree/tree.min.js +1 -1
- package/treetable/treetable.d.ts +6 -6
- package/utils/utils.cjs.js +5 -0
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -0
- package/utils/utils.esm.js +5 -0
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +5 -0
- package/utils/utils.min.js +1 -1
- package/web-types.json +16 -7
- package/resources/themes/lara-dark-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-roman.var.woff2 +0 -0
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
font-display: swap;
|
|
58
58
|
font-style: normal;
|
|
59
59
|
font-named-instance: "Regular";
|
|
60
|
-
src: url("./fonts/Inter-roman.var.woff2
|
|
60
|
+
src: url("./fonts/Inter-roman.var.woff2") format("woff2");
|
|
61
61
|
}
|
|
62
62
|
@font-face {
|
|
63
63
|
font-family: "Inter var";
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
font-display: swap;
|
|
66
66
|
font-style: italic;
|
|
67
67
|
font-named-instance: "Italic";
|
|
68
|
-
src: url("./fonts/Inter-italic.var.woff2
|
|
68
|
+
src: url("./fonts/Inter-italic.var.woff2") format("woff2");
|
|
69
69
|
}
|
|
70
70
|
:root {
|
|
71
71
|
--blue-50:#f5f9ff;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/resources/themes/mdc-light-deeppurple/fonts/roboto-v20-latin-ext_latin-regular.woff2
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/sidebar/sidebar.cjs.js
CHANGED
|
@@ -361,7 +361,7 @@ var Sidebar = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
361
361
|
if (props.visible !== visibleState && maskVisibleState) {
|
|
362
362
|
setVisibleState(props.visible);
|
|
363
363
|
}
|
|
364
|
-
});
|
|
364
|
+
}, [props.visible]);
|
|
365
365
|
hooks.useUpdateEffect(function () {
|
|
366
366
|
if (maskVisibleState) {
|
|
367
367
|
utils.ZIndexUtils.set('modal', maskRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, props.baseZIndex || context && context.zIndex.modal || PrimeReact__default["default"].zIndex.modal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),i=require("primereact/hooks"),a=require("primereact/icons/times"),o=require("primereact/portal"),s=require("primereact/ripple"),l=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var d=p(e),b=c(n);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function f(e){return f="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},f(e)}function m(e,n){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function h(e){var n=m(e,"string");return"symbol"===f(n)?n:String(n)}function y(e){if(Array.isArray(e))return e}function v(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function x(e,n){if(e){if("string"==typeof e)return g(e,n);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)?g(e,n):void 0}}function S(){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 w(e,n){return y(e)||v(e,n)||x(e,n)||S()}var O=t.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return l.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return l.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return l.classNames("p-sidebar p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===b.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===b.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=h(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=d.forwardRef((function(e,c){var p=i.useMergeProps(),f=d.useContext(n.PrimeReactContext),m=O.getProps(e,f),h=w(d.useState(!1),2),y=h[0],v=h[1],g=w(d.useState(!1),2),x=g[0],S=g[1],E=O.setMetaData({props:m,state:{containerVisible:y}}),k=E.ptm,I=E.cx,P=E.sx,N=E.isUnstyled;t.useHandleStyle(O.css.styles,N,{name:"sidebar"});var C=d.useRef(null),D=d.useRef(null),R=d.useRef(null),U=x&&m.closeOnEscape,T=i.useDisplayOrder("sidebar",U);i.useGlobalOnEscapeKey({callback:function(e){H(e)},when:U&&T,priority:[i.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,T]});var q=w(i.useEventListener({type:"click",listener:function(e){0===e.button&&B(e)&&H(e)}}),2),A=q[0],_=q[1],B=function(e){return C&&C.current&&!C.current.contains(e.target)},H=function(e){m.onHide(),e.preventDefault()},M=function(){m.dismissable&&!m.modal&&A(),m.blockScroll&&l.DomHandler.blockBodyScroll()},Z=function(){_(),m.blockScroll&&l.DomHandler.unblockBodyScroll()};d.useImperativeHandle(c,(function(){return{props:m,getElement:function(){return C.current},gteMask:function(){return D.current},getCloseIcon:function(){return R.current}}})),i.useMountEffect((function(){m.visible&&v(!0)})),i.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)})),i.useUpdateEffect((function(){y&&(l.ZIndexUtils.set("modal",D.current,f&&f.autoZIndex||b.default.autoZIndex,m.baseZIndex||f&&f.zIndex.modal||b.default.zIndex.modal),S(!0))}),[y]),i.useUpdateEffect((function(){x&&(_(),m.dismissable&&!m.modal&&A())}),[m.dismissable,m.modal,x]),i.useUnmountEffect((function(){Z(),D.current&&l.ZIndexUtils.clear(D.current)}));var z,L,J,X,V,G=function(){var e=m.ariaCloseLabel||n.localeOption("close"),t=p({type:"button",ref:R,className:I("closeButton"),onClick:function(e){return H(e)},"aria-label":e},k("closeButton")),r=p({className:I("closeIcon")},k("closeIcon")),i=l.IconUtils.getJSXIcon(m.closeIcon||d.createElement(a.TimesIcon,r),j({},r),{props:m});return m.showCloseIcon?d.createElement("button",t,i,d.createElement(s.Ripple,null)):null},K=p({ref:D,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&D.current===n.target&&H(n));var n}},k("mask")),Y=p({id:m.id,className:l.classNames(m.className,I("root",{context:f})),style:m.style,role:"complementary"},O.getOtherProps(m),k("root")),F=p({className:I("header")},k("header")),$=p({className:I("content")},k("content")),Q=p({className:I("icons")},k("icons")),W={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},ee=p({classNames:I("transition"),in:x,timeout:W,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&C&&C.current.contains(e))&&m.showCloseIcon&&R.current&&R.current.focus(),M()},onExiting:function(){m.modal&&!N()&&l.DomHandler.addClass(D.current,"p-component-overlay-leave")},onExited:function(){l.ZIndexUtils.clear(D.current),v(!1),Z()}},k("transition"));return y&&(V=null!=e&&e.content?(X={closeIconRef:R,hide:H},d.createElement("div",K,d.createElement(r.CSSTransition,u({nodeRef:C},ee),d.createElement("div",u({ref:C},Y),l.ObjectUtils.getJSXElement(e.content,X))))):(z=G(),L=m.icons?l.ObjectUtils.getJSXElement(m.icons,m):null,J=m.header?l.ObjectUtils.getJSXElement(m.header,m):null,d.createElement("div",K,d.createElement(r.CSSTransition,u({nodeRef:C},ee),d.createElement("div",u({ref:C},Y),d.createElement("div",F,J,d.createElement("div",Q,L,z)),d.createElement("div",$,m.children))))),d.createElement(o.Portal,{element:V,appendTo:m.appendTo,visible:!0}))}));k.displayName="Sidebar",exports.Sidebar=k;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),i=require("primereact/hooks"),a=require("primereact/icons/times"),o=require("primereact/portal"),s=require("primereact/ripple"),l=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var d=p(e),b=c(n);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function f(e){return f="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},f(e)}function m(e,n){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function h(e){var n=m(e,"string");return"symbol"===f(n)?n:String(n)}function v(e){if(Array.isArray(e))return e}function y(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function x(e,n){if(e){if("string"==typeof e)return g(e,n);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)?g(e,n):void 0}}function S(){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 w(e,n){return v(e)||y(e,n)||x(e,n)||S()}var O=t.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return l.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return l.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return l.classNames("p-sidebar p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===b.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===b.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=h(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=d.forwardRef((function(e,c){var p=i.useMergeProps(),f=d.useContext(n.PrimeReactContext),m=O.getProps(e,f),h=w(d.useState(!1),2),v=h[0],y=h[1],g=w(d.useState(!1),2),x=g[0],S=g[1],E=O.setMetaData({props:m,state:{containerVisible:v}}),k=E.ptm,I=E.cx,P=E.sx,N=E.isUnstyled;t.useHandleStyle(O.css.styles,N,{name:"sidebar"});var C=d.useRef(null),D=d.useRef(null),R=d.useRef(null),U=x&&m.closeOnEscape,T=i.useDisplayOrder("sidebar",U);i.useGlobalOnEscapeKey({callback:function(e){H(e)},when:U&&T,priority:[i.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,T]});var q=w(i.useEventListener({type:"click",listener:function(e){0===e.button&&B(e)&&H(e)}}),2),A=q[0],_=q[1],B=function(e){return C&&C.current&&!C.current.contains(e.target)},H=function(e){m.onHide(),e.preventDefault()},M=function(){m.dismissable&&!m.modal&&A(),m.blockScroll&&l.DomHandler.blockBodyScroll()},Z=function(){_(),m.blockScroll&&l.DomHandler.unblockBodyScroll()};d.useImperativeHandle(c,(function(){return{props:m,getElement:function(){return C.current},gteMask:function(){return D.current},getCloseIcon:function(){return R.current}}})),i.useMountEffect((function(){m.visible&&y(!0)})),i.useUpdateEffect((function(){m.visible&&!v&&y(!0),m.visible!==x&&v&&S(m.visible)}),[m.visible]),i.useUpdateEffect((function(){v&&(l.ZIndexUtils.set("modal",D.current,f&&f.autoZIndex||b.default.autoZIndex,m.baseZIndex||f&&f.zIndex.modal||b.default.zIndex.modal),S(!0))}),[v]),i.useUpdateEffect((function(){x&&(_(),m.dismissable&&!m.modal&&A())}),[m.dismissable,m.modal,x]),i.useUnmountEffect((function(){Z(),D.current&&l.ZIndexUtils.clear(D.current)}));var z,L,J,X,V,G=function(){var e=m.ariaCloseLabel||n.localeOption("close"),t=p({type:"button",ref:R,className:I("closeButton"),onClick:function(e){return H(e)},"aria-label":e},k("closeButton")),r=p({className:I("closeIcon")},k("closeIcon")),i=l.IconUtils.getJSXIcon(m.closeIcon||d.createElement(a.TimesIcon,r),j({},r),{props:m});return m.showCloseIcon?d.createElement("button",t,i,d.createElement(s.Ripple,null)):null},K=p({ref:D,style:P("mask"),className:I("mask",{maskVisibleState:v}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&D.current===n.target&&H(n));var n}},k("mask")),Y=p({id:m.id,className:l.classNames(m.className,I("root",{context:f})),style:m.style,role:"complementary"},O.getOtherProps(m),k("root")),F=p({className:I("header")},k("header")),$=p({className:I("content")},k("content")),Q=p({className:I("icons")},k("icons")),W={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},ee=p({classNames:I("transition"),in:x,timeout:W,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&C&&C.current.contains(e))&&m.showCloseIcon&&R.current&&R.current.focus(),M()},onExiting:function(){m.modal&&!N()&&l.DomHandler.addClass(D.current,"p-component-overlay-leave")},onExited:function(){l.ZIndexUtils.clear(D.current),y(!1),Z()}},k("transition"));return v&&(V=null!=e&&e.content?(X={closeIconRef:R,hide:H},d.createElement("div",K,d.createElement(r.CSSTransition,u({nodeRef:C},ee),d.createElement("div",u({ref:C},Y),l.ObjectUtils.getJSXElement(e.content,X))))):(z=G(),L=m.icons?l.ObjectUtils.getJSXElement(m.icons,m):null,J=m.header?l.ObjectUtils.getJSXElement(m.header,m):null,d.createElement("div",K,d.createElement(r.CSSTransition,u({nodeRef:C},ee),d.createElement("div",u({ref:C},Y),d.createElement("div",F,J,d.createElement("div",Q,L,z)),d.createElement("div",$,m.children))))),d.createElement(o.Portal,{element:V,appendTo:m.appendTo,visible:!0}))}));k.displayName="Sidebar",exports.Sidebar=k;
|
package/sidebar/sidebar.esm.js
CHANGED
|
@@ -334,7 +334,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
334
334
|
if (props.visible !== visibleState && maskVisibleState) {
|
|
335
335
|
setVisibleState(props.visible);
|
|
336
336
|
}
|
|
337
|
-
});
|
|
337
|
+
}, [props.visible]);
|
|
338
338
|
useUpdateEffect(function () {
|
|
339
339
|
if (maskVisibleState) {
|
|
340
340
|
ZIndexUtils.set('modal', maskRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, props.baseZIndex || context && context.zIndex.modal || PrimeReact.zIndex.modal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import n,{PrimeReactContext as t,localeOption as r}from"primereact/api";import{ComponentBase as i,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as s,useDisplayOrder as l,useGlobalOnEscapeKey as p,ESC_KEY_HANDLING_PRIORITIES as c,useEventListener as d,useMountEffect as b,useUpdateEffect as u,useUnmountEffect as m}from"primereact/hooks";import{TimesIcon as f}from"primereact/icons/times";import{Portal as h}from"primereact/portal";import{Ripple as v}from"primereact/ripple";import{classNames as y,ZIndexUtils as g,DomHandler as x,ObjectUtils as w,IconUtils as S}from"primereact/utils";function O(){return O=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},O.apply(this,arguments)}function k(e){return k="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},k(e)}function E(e,n){if("object"!==k(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function j(e){var n=E(e,"string");return"symbol"===k(n)?n:String(n)}function I(e){if(Array.isArray(e))return e}function P(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,p=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){p=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(p)throw i}}return s}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n){if(e){if("string"==typeof e)return N(e,n);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)?N(e,n):void 0}}function R(){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 A(e,n){return I(e)||P(e,n)||C(e,n)||R()}var D=i.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return y("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return y("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var t=e.context;return y("p-sidebar p-component",{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=j(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=e.forwardRef((function(i,k){var E=s(),j=e.useContext(t),I=D.getProps(i,j),P=A(e.useState(!1),2),N=P[0],C=P[1],R=A(e.useState(!1),2),B=R[0],z=R[1],J=D.setMetaData({props:I,state:{containerVisible:N}}),M=J.ptm,X=J.cx,Z=J.sx,H=J.isUnstyled;a(D.css.styles,H,{name:"sidebar"});var L=e.useRef(null),V=e.useRef(null),U=e.useRef(null),_=B&&I.closeOnEscape,F=l("sidebar",_);p({callback:function(e){K(e)},when:_&&F,priority:[c.SIDEBAR,F]});var Y=A(d({type:"click",listener:function(e){0===e.button&&G(e)&&K(e)}}),2),$=Y[0],q=Y[1],G=function(e){return L&&L.current&&!L.current.contains(e.target)},K=function(e){I.onHide(),e.preventDefault()},Q=function(){I.dismissable&&!I.modal&&$(),I.blockScroll&&x.blockBodyScroll()},W=function(){q(),I.blockScroll&&x.unblockBodyScroll()};e.useImperativeHandle(k,(function(){return{props:I,getElement:function(){return L.current},gteMask:function(){return V.current},getCloseIcon:function(){return U.current}}})),b((function(){I.visible&&C(!0)})),u((function(){I.visible&&!N&&C(!0),I.visible!==B&&N&&z(I.visible)})),u((function(){N&&(g.set("modal",V.current,j&&j.autoZIndex||n.autoZIndex,I.baseZIndex||j&&j.zIndex.modal||n.zIndex.modal),z(!0))}),[N]),u((function(){B&&(q(),I.dismissable&&!I.modal&&$())}),[I.dismissable,I.modal,B]),m((function(){W(),V.current&&g.clear(V.current)}));var ee,ne,te,re,ie,ae=function(){var n=I.ariaCloseLabel||r("close"),t=E({type:"button",ref:U,className:X("closeButton"),onClick:function(e){return K(e)},"aria-label":n},M("closeButton")),i=E({className:X("closeIcon")},M("closeIcon")),a=S.getJSXIcon(I.closeIcon||e.createElement(f,i),T({},i),{props:I});return I.showCloseIcon?e.createElement("button",t,a,e.createElement(v,null)):null},oe=E({ref:V,style:Z("mask"),className:X("mask",{maskVisibleState:N}),onMouseDown:function(e){return n=e,void(I.dismissable&&I.modal&&V.current===n.target&&K(n));var n}},M("mask")),se=E({id:I.id,className:y(I.className,X("root",{context:j})),style:I.style,role:"complementary"},D.getOtherProps(I),M("root")),le=E({className:X("header")},M("header")),pe=E({className:X("content")},M("content")),ce=E({className:X("icons")},M("icons")),de={enter:I.fullScreen?150:300,exit:I.fullScreen?150:300},be=E({classNames:X("transition"),in:B,timeout:de,options:I.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;I.onShow&&I.onShow(),!((e=document.activeElement)&&L&&L.current.contains(e))&&I.showCloseIcon&&U.current&&U.current.focus(),Q()},onExiting:function(){I.modal&&!H()&&x.addClass(V.current,"p-component-overlay-leave")},onExited:function(){g.clear(V.current),C(!1),W()}},M("transition"));return N&&(ie=null!=i&&i.content?(re={closeIconRef:U,hide:K},e.createElement("div",oe,e.createElement(o,O({nodeRef:L},be),e.createElement("div",O({ref:L},se),w.getJSXElement(i.content,re))))):(ee=ae(),ne=I.icons?w.getJSXElement(I.icons,I):null,te=I.header?w.getJSXElement(I.header,I):null,e.createElement("div",oe,e.createElement(o,O({nodeRef:L},be),e.createElement("div",O({ref:L},se),e.createElement("div",le,te,e.createElement("div",ce,ne,ee)),e.createElement("div",pe,I.children))))),e.createElement(h,{element:ie,appendTo:I.appendTo,visible:!0}))}));z.displayName="Sidebar";export{z as Sidebar};
|
|
1
|
+
import*as e from"react";import n,{PrimeReactContext as t,localeOption as r}from"primereact/api";import{ComponentBase as i,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as s,useDisplayOrder as l,useGlobalOnEscapeKey as p,ESC_KEY_HANDLING_PRIORITIES as c,useEventListener as d,useMountEffect as b,useUpdateEffect as u,useUnmountEffect as m}from"primereact/hooks";import{TimesIcon as f}from"primereact/icons/times";import{Portal as h}from"primereact/portal";import{Ripple as v}from"primereact/ripple";import{classNames as y,ZIndexUtils as g,DomHandler as x,ObjectUtils as w,IconUtils as S}from"primereact/utils";function O(){return O=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},O.apply(this,arguments)}function k(e){return k="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},k(e)}function E(e,n){if("object"!==k(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function j(e){var n=E(e,"string");return"symbol"===k(n)?n:String(n)}function I(e){if(Array.isArray(e))return e}function P(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,p=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){p=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(p)throw i}}return s}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n){if(e){if("string"==typeof e)return N(e,n);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)?N(e,n):void 0}}function R(){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 A(e,n){return I(e)||P(e,n)||C(e,n)||R()}var D=i.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return y("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return y("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var t=e.context;return y("p-sidebar p-component",{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=j(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=e.forwardRef((function(i,k){var E=s(),j=e.useContext(t),I=D.getProps(i,j),P=A(e.useState(!1),2),N=P[0],C=P[1],R=A(e.useState(!1),2),B=R[0],z=R[1],J=D.setMetaData({props:I,state:{containerVisible:N}}),M=J.ptm,X=J.cx,Z=J.sx,H=J.isUnstyled;a(D.css.styles,H,{name:"sidebar"});var L=e.useRef(null),V=e.useRef(null),U=e.useRef(null),_=B&&I.closeOnEscape,F=l("sidebar",_);p({callback:function(e){K(e)},when:_&&F,priority:[c.SIDEBAR,F]});var Y=A(d({type:"click",listener:function(e){0===e.button&&G(e)&&K(e)}}),2),$=Y[0],q=Y[1],G=function(e){return L&&L.current&&!L.current.contains(e.target)},K=function(e){I.onHide(),e.preventDefault()},Q=function(){I.dismissable&&!I.modal&&$(),I.blockScroll&&x.blockBodyScroll()},W=function(){q(),I.blockScroll&&x.unblockBodyScroll()};e.useImperativeHandle(k,(function(){return{props:I,getElement:function(){return L.current},gteMask:function(){return V.current},getCloseIcon:function(){return U.current}}})),b((function(){I.visible&&C(!0)})),u((function(){I.visible&&!N&&C(!0),I.visible!==B&&N&&z(I.visible)}),[I.visible]),u((function(){N&&(g.set("modal",V.current,j&&j.autoZIndex||n.autoZIndex,I.baseZIndex||j&&j.zIndex.modal||n.zIndex.modal),z(!0))}),[N]),u((function(){B&&(q(),I.dismissable&&!I.modal&&$())}),[I.dismissable,I.modal,B]),m((function(){W(),V.current&&g.clear(V.current)}));var ee,ne,te,re,ie,ae=function(){var n=I.ariaCloseLabel||r("close"),t=E({type:"button",ref:U,className:X("closeButton"),onClick:function(e){return K(e)},"aria-label":n},M("closeButton")),i=E({className:X("closeIcon")},M("closeIcon")),a=S.getJSXIcon(I.closeIcon||e.createElement(f,i),T({},i),{props:I});return I.showCloseIcon?e.createElement("button",t,a,e.createElement(v,null)):null},oe=E({ref:V,style:Z("mask"),className:X("mask",{maskVisibleState:N}),onMouseDown:function(e){return n=e,void(I.dismissable&&I.modal&&V.current===n.target&&K(n));var n}},M("mask")),se=E({id:I.id,className:y(I.className,X("root",{context:j})),style:I.style,role:"complementary"},D.getOtherProps(I),M("root")),le=E({className:X("header")},M("header")),pe=E({className:X("content")},M("content")),ce=E({className:X("icons")},M("icons")),de={enter:I.fullScreen?150:300,exit:I.fullScreen?150:300},be=E({classNames:X("transition"),in:B,timeout:de,options:I.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;I.onShow&&I.onShow(),!((e=document.activeElement)&&L&&L.current.contains(e))&&I.showCloseIcon&&U.current&&U.current.focus(),Q()},onExiting:function(){I.modal&&!H()&&x.addClass(V.current,"p-component-overlay-leave")},onExited:function(){g.clear(V.current),C(!1),W()}},M("transition"));return N&&(ie=null!=i&&i.content?(re={closeIconRef:U,hide:K},e.createElement("div",oe,e.createElement(o,O({nodeRef:L},be),e.createElement("div",O({ref:L},se),w.getJSXElement(i.content,re))))):(ee=ae(),ne=I.icons?w.getJSXElement(I.icons,I):null,te=I.header?w.getJSXElement(I.header,I):null,e.createElement("div",oe,e.createElement(o,O({nodeRef:L},be),e.createElement("div",O({ref:L},se),e.createElement("div",le,te,e.createElement("div",ce,ne,ee)),e.createElement("div",pe,I.children))))),e.createElement(h,{element:ie,appendTo:I.appendTo,visible:!0}))}));z.displayName="Sidebar";export{z as Sidebar};
|
package/sidebar/sidebar.js
CHANGED
|
@@ -350,7 +350,7 @@ this.primereact.sidebar = (function (exports, React, PrimeReact, componentbase,
|
|
|
350
350
|
if (props.visible !== visibleState && maskVisibleState) {
|
|
351
351
|
setVisibleState(props.visible);
|
|
352
352
|
}
|
|
353
|
-
});
|
|
353
|
+
}, [props.visible]);
|
|
354
354
|
hooks.useUpdateEffect(function () {
|
|
355
355
|
if (maskVisibleState) {
|
|
356
356
|
utils.ZIndexUtils.set('modal', maskRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, props.baseZIndex || context && context.zIndex.modal || PrimeReact__default["default"].zIndex.modal);
|
package/sidebar/sidebar.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.sidebar=function(e,n,t,r,i,a,o,s,l,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var b=d(n),u=p(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function m(e){return m="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},m(e)}function h(e,n){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function y(e){var n=h(e,"string");return"symbol"===m(n)?n:String(n)}function v(e){if(Array.isArray(e))return e}function g(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return x(e,n);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)?x(e,n):void 0}}function w(){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 O(e,n){return v(e)||g(e,n)||S(e,n)||w()}var E=r.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return c.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return c.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return c.classNames("p-sidebar p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===u.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===u.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=y(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=b.forwardRef((function(e,n){var p=a.useMergeProps(),d=b.useContext(t.PrimeReactContext),m=E.getProps(e,d),h=O(b.useState(!1),2),y=h[0],v=h[1],g=O(b.useState(!1),2),x=g[0],S=g[1],w=E.setMetaData({props:m,state:{containerVisible:y}}),j=w.ptm,I=w.cx,P=w.sx,N=w.isUnstyled;r.useHandleStyle(E.css.styles,N,{name:"sidebar"});var C=b.useRef(null),D=b.useRef(null),R=b.useRef(null),U=x&&m.closeOnEscape,T=a.useDisplayOrder("sidebar",U);a.useGlobalOnEscapeKey({callback:function(e){M(e)},when:U&&T,priority:[a.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,T]});var A=O(a.useEventListener({type:"click",listener:function(e){0===e.button&&H(e)&&M(e)}}),2),_=A[0],B=A[1],H=function(e){return C&&C.current&&!C.current.contains(e.target)},M=function(e){m.onHide(),e.preventDefault()},Z=function(){m.dismissable&&!m.modal&&_(),m.blockScroll&&c.DomHandler.blockBodyScroll()},z=function(){B(),m.blockScroll&&c.DomHandler.unblockBodyScroll()};b.useImperativeHandle(n,(function(){return{props:m,getElement:function(){return C.current},gteMask:function(){return D.current},getCloseIcon:function(){return R.current}}})),a.useMountEffect((function(){m.visible&&v(!0)})),a.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)})),a.useUpdateEffect((function(){y&&(c.ZIndexUtils.set("modal",D.current,d&&d.autoZIndex||u.default.autoZIndex,m.baseZIndex||d&&d.zIndex.modal||u.default.zIndex.modal),S(!0))}),[y]),a.useUpdateEffect((function(){x&&(B(),m.dismissable&&!m.modal&&_())}),[m.dismissable,m.modal,x]),a.useUnmountEffect((function(){z(),D.current&&c.ZIndexUtils.clear(D.current)}));var L,J,X,V,G,K=function(){var e=m.ariaCloseLabel||t.localeOption("close"),n=p({type:"button",ref:R,className:I("closeButton"),onClick:function(e){return M(e)},"aria-label":e},j("closeButton")),r=p({className:I("closeIcon")},j("closeIcon")),i=c.IconUtils.getJSXIcon(m.closeIcon||b.createElement(o.TimesIcon,r),k({},r),{props:m});return m.showCloseIcon?b.createElement("button",n,i,b.createElement(l.Ripple,null)):null},Y=p({ref:D,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&D.current===n.target&&M(n));var n}},j("mask")),F=p({id:m.id,className:c.classNames(m.className,I("root",{context:d})),style:m.style,role:"complementary"},E.getOtherProps(m),j("root")),$=p({className:I("header")},j("header")),q=p({className:I("content")},j("content")),Q=p({className:I("icons")},j("icons")),W={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},ee=p({classNames:I("transition"),in:x,timeout:W,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&C&&C.current.contains(e))&&m.showCloseIcon&&R.current&&R.current.focus(),Z()},onExiting:function(){m.modal&&!N()&&c.DomHandler.addClass(D.current,"p-component-overlay-leave")},onExited:function(){c.ZIndexUtils.clear(D.current),v(!1),z()}},j("transition"));return y&&(G=null!=e&&e.content?(V={closeIconRef:R,hide:M},b.createElement("div",Y,b.createElement(i.CSSTransition,f({nodeRef:C},ee),b.createElement("div",f({ref:C},F),c.ObjectUtils.getJSXElement(e.content,V))))):(L=K(),J=m.icons?c.ObjectUtils.getJSXElement(m.icons,m):null,X=m.header?c.ObjectUtils.getJSXElement(m.header,m):null,b.createElement("div",Y,b.createElement(i.CSSTransition,f({nodeRef:C},ee),b.createElement("div",f({ref:C},F),b.createElement("div",$,X,b.createElement("div",Q,J,L)),b.createElement("div",q,m.children))))),b.createElement(s.Portal,{element:G,appendTo:m.appendTo,visible:!0}))}));return I.displayName="Sidebar",e.Sidebar=I,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.icons.times,primereact.portal,primereact.ripple,primereact.utils);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.sidebar=function(e,n,t,r,i,a,o,s,l,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var b=d(n),u=p(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function m(e){return m="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},m(e)}function h(e,n){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function y(e){var n=h(e,"string");return"symbol"===m(n)?n:String(n)}function v(e){if(Array.isArray(e))return e}function g(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return x(e,n);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)?x(e,n):void 0}}function w(){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 O(e,n){return v(e)||g(e,n)||S(e,n)||w()}var E=r.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return c.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return c.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return c.classNames("p-sidebar p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===u.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===u.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=y(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=b.forwardRef((function(e,n){var p=a.useMergeProps(),d=b.useContext(t.PrimeReactContext),m=E.getProps(e,d),h=O(b.useState(!1),2),y=h[0],v=h[1],g=O(b.useState(!1),2),x=g[0],S=g[1],w=E.setMetaData({props:m,state:{containerVisible:y}}),j=w.ptm,I=w.cx,P=w.sx,N=w.isUnstyled;r.useHandleStyle(E.css.styles,N,{name:"sidebar"});var C=b.useRef(null),D=b.useRef(null),R=b.useRef(null),U=x&&m.closeOnEscape,T=a.useDisplayOrder("sidebar",U);a.useGlobalOnEscapeKey({callback:function(e){M(e)},when:U&&T,priority:[a.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,T]});var A=O(a.useEventListener({type:"click",listener:function(e){0===e.button&&H(e)&&M(e)}}),2),_=A[0],B=A[1],H=function(e){return C&&C.current&&!C.current.contains(e.target)},M=function(e){m.onHide(),e.preventDefault()},Z=function(){m.dismissable&&!m.modal&&_(),m.blockScroll&&c.DomHandler.blockBodyScroll()},z=function(){B(),m.blockScroll&&c.DomHandler.unblockBodyScroll()};b.useImperativeHandle(n,(function(){return{props:m,getElement:function(){return C.current},gteMask:function(){return D.current},getCloseIcon:function(){return R.current}}})),a.useMountEffect((function(){m.visible&&v(!0)})),a.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)}),[m.visible]),a.useUpdateEffect((function(){y&&(c.ZIndexUtils.set("modal",D.current,d&&d.autoZIndex||u.default.autoZIndex,m.baseZIndex||d&&d.zIndex.modal||u.default.zIndex.modal),S(!0))}),[y]),a.useUpdateEffect((function(){x&&(B(),m.dismissable&&!m.modal&&_())}),[m.dismissable,m.modal,x]),a.useUnmountEffect((function(){z(),D.current&&c.ZIndexUtils.clear(D.current)}));var L,J,X,V,G,K=function(){var e=m.ariaCloseLabel||t.localeOption("close"),n=p({type:"button",ref:R,className:I("closeButton"),onClick:function(e){return M(e)},"aria-label":e},j("closeButton")),r=p({className:I("closeIcon")},j("closeIcon")),i=c.IconUtils.getJSXIcon(m.closeIcon||b.createElement(o.TimesIcon,r),k({},r),{props:m});return m.showCloseIcon?b.createElement("button",n,i,b.createElement(l.Ripple,null)):null},Y=p({ref:D,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&D.current===n.target&&M(n));var n}},j("mask")),F=p({id:m.id,className:c.classNames(m.className,I("root",{context:d})),style:m.style,role:"complementary"},E.getOtherProps(m),j("root")),$=p({className:I("header")},j("header")),q=p({className:I("content")},j("content")),Q=p({className:I("icons")},j("icons")),W={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},ee=p({classNames:I("transition"),in:x,timeout:W,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&C&&C.current.contains(e))&&m.showCloseIcon&&R.current&&R.current.focus(),Z()},onExiting:function(){m.modal&&!N()&&c.DomHandler.addClass(D.current,"p-component-overlay-leave")},onExited:function(){c.ZIndexUtils.clear(D.current),v(!1),z()}},j("transition"));return y&&(G=null!=e&&e.content?(V={closeIconRef:R,hide:M},b.createElement("div",Y,b.createElement(i.CSSTransition,f({nodeRef:C},ee),b.createElement("div",f({ref:C},F),c.ObjectUtils.getJSXElement(e.content,V))))):(L=K(),J=m.icons?c.ObjectUtils.getJSXElement(m.icons,m):null,X=m.header?c.ObjectUtils.getJSXElement(m.header,m):null,b.createElement("div",Y,b.createElement(i.CSSTransition,f({nodeRef:C},ee),b.createElement("div",f({ref:C},F),b.createElement("div",$,X,b.createElement("div",Q,J,L)),b.createElement("div",q,m.children))))),b.createElement(s.Portal,{element:G,appendTo:m.appendTo,visible:!0}))}));return I.displayName="Sidebar",e.Sidebar=I,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.icons.times,primereact.portal,primereact.ripple,primereact.utils);
|
package/stepper/stepper.cjs.js
CHANGED
|
@@ -192,7 +192,8 @@ var StepperBase = componentbase.ComponentBase.extend({
|
|
|
192
192
|
__TYPE: 'Stepper',
|
|
193
193
|
activeStep: 0,
|
|
194
194
|
orientation: 'horizontal',
|
|
195
|
-
linear: false
|
|
195
|
+
linear: false,
|
|
196
|
+
onChangeStep: null
|
|
196
197
|
},
|
|
197
198
|
css: {
|
|
198
199
|
classes: classes,
|
|
@@ -305,6 +306,11 @@ var Stepper = /*#__PURE__*/React__default["default"].memo( /*#__PURE__*/React__d
|
|
|
305
306
|
setIdState(utils.UniqueComponentId());
|
|
306
307
|
}
|
|
307
308
|
});
|
|
309
|
+
hooks.useUpdateEffect(function () {
|
|
310
|
+
if (props.activeStep >= 0 && props.activeStep <= stepperPanels().length - 1) {
|
|
311
|
+
updateActiveStep(undefined, props.activeStep);
|
|
312
|
+
}
|
|
313
|
+
}, [props.activeStep]);
|
|
308
314
|
var getStepProp = function getStepProp(step, name) {
|
|
309
315
|
var _step$props;
|
|
310
316
|
return step === null || step === void 0 || (_step$props = step.props) === null || _step$props === void 0 ? void 0 : _step$props[name];
|