From 60f08422e68f17c797549f38292cf0d1a055cdb9 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 5 Feb 2024 10:44:41 +0000 Subject: [PATCH] Fixed #5214 - Move core alignment styles to theme files --- .../lib/accordion/style/AccordionStyle.js | 22 -- .../autocomplete/style/AutoCompleteStyle.js | 101 ------ components/lib/avatar/style/AvatarStyle.js | 35 --- .../lib/avatargroup/style/AvatarGroupStyle.js | 14 - components/lib/badge/style/BadgeStyle.js | 38 --- .../style/BadgeDirectiveStyle.js | 38 --- .../basecomponent/style/BaseComponentStyle.js | 208 ------------- components/lib/blockui/style/BlockUIStyle.js | 17 -- .../lib/breadcrumb/style/BreadcrumbStyle.js | 37 --- .../lib/calendar/style/CalendarStyle.js | 155 ---------- .../lib/carousel/style/CarouselStyle.js | 75 ----- .../cascadeselect/style/CascadeSelectStyle.js | 95 ------ .../lib/checkbox/style/CheckboxStyle.js | 22 -- components/lib/chip/style/ChipStyle.js | 27 -- components/lib/chips/style/ChipsStyle.js | 51 ---- .../lib/colorpicker/style/ColorPickerStyle.js | 13 - .../confirmpopup/style/ConfirmPopupStyle.js | 75 ----- .../lib/contextmenu/style/ContextMenuStyle.js | 47 --- .../lib/datatable/style/DataTableStyle.js | 240 --------------- components/lib/dialog/style/DialogStyle.js | 134 -------- components/lib/divider/style/DividerStyle.js | 66 ---- components/lib/dock/style/DockStyle.js | 111 ------- .../lib/dropdown/style/DropdownStyle.js | 100 ------ .../lib/fieldset/style/FieldsetStyle.js | 24 -- .../lib/fileupload/style/FileUploadStyle.js | 49 --- .../lib/floatlabel/style/FloatLabelStyle.js | 51 ---- .../lib/galleria/style/GalleriaStyle.js | 289 ------------------ .../lib/iconfield/style/IconFieldStyle.js | 19 -- components/lib/image/style/ImageStyle.js | 77 ----- .../inlinemessage/style/InlineMessageStyle.js | 25 -- components/lib/inplace/style/InplaceStyle.js | 23 -- .../lib/inputgroup/style/InputGroupStyle.js | 31 -- .../lib/inputnumber/style/InputNumberStyle.js | 106 ------- .../lib/inputswitch/style/InputSwitchStyle.js | 29 -- components/lib/knob/style/KnobStyle.js | 24 -- components/lib/listbox/style/ListboxStyle.js | 39 --- .../lib/megamenu/style/MegaMenuStyle.js | 166 ---------- components/lib/menu/style/MenuStyle.js | 24 -- components/lib/menubar/style/MenubarStyle.js | 111 ------- components/lib/message/style/MessageStyle.js | 54 ---- .../lib/metergroup/style/MeterGroupStyle.js | 42 --- .../lib/multiselect/style/MultiSelectStyle.js | 111 ------- .../lib/orderlist/style/OrderListStyle.js | 43 --- .../style/OrganizationChartStyle.js | 58 ---- .../overlaypanel/style/OverlayPanelStyle.js | 75 ----- .../lib/paginator/style/PaginatorStyle.js | 45 --- components/lib/panel/style/PanelStyle.js | 25 -- .../lib/panelmenu/style/PanelMenuStyle.js | 38 --- .../lib/password/style/PasswordStyle.js | 32 -- .../lib/picklist/style/PickListStyle.js | 39 --- .../lib/progressbar/style/ProgressBarStyle.js | 114 ------- .../style/ProgressSpinnerStyle.js | 31 -- .../lib/radiobutton/style/RadioButtonStyle.js | 35 --- components/lib/rating/style/RatingStyle.js | 21 -- components/lib/ripple/style/RippleStyle.js | 34 --- .../lib/scrollpanel/style/ScrollPanelStyle.js | 61 ---- .../lib/scrolltop/style/ScrollTopStyle.js | 38 --- components/lib/sidebar/style/SidebarStyle.js | 154 ---------- .../lib/skeleton/style/SkeletonStyle.js | 38 --- components/lib/slider/style/SliderStyle.js | 43 --- .../lib/speeddial/style/SpeedDialStyle.js | 82 ----- .../lib/splitbutton/style/SplitButtonStyle.js | 38 --- .../lib/splitter/style/SplitterStyle.js | 51 ---- .../splitterpanel/style/SplitterPanelStyle.js | 19 -- components/lib/steps/style/StepsStyle.js | 58 ---- components/lib/tabmenu/style/TabMenuStyle.js | 45 --- components/lib/tabview/style/TabViewStyle.js | 75 ----- components/lib/tag/style/TagStyle.js | 21 -- .../lib/terminal/style/TerminalStyle.js | 28 -- .../lib/textarea/style/TextareaStyle.js | 14 - .../lib/tieredmenu/style/TieredMenuStyle.js | 54 ---- .../lib/timeline/style/TimelineStyle.js | 116 ------- components/lib/toast/style/ToastStyle.js | 78 ----- .../togglebutton/style/ToggleButtonStyle.js | 20 -- components/lib/toolbar/style/ToolbarStyle.js | 25 -- components/lib/tooltip/style/TooltipStyle.js | 60 ---- components/lib/tree/style/TreeStyle.js | 87 ------ .../lib/treeselect/style/TreeSelectStyle.js | 56 ---- .../lib/treetable/style/TreeTableStyle.js | 174 ----------- .../style/TriStateCheckboxStyle.js | 22 -- 80 files changed, 5062 deletions(-) diff --git a/components/lib/accordion/style/AccordionStyle.js b/components/lib/accordion/style/AccordionStyle.js index 539d8d3eb..6364d5667 100644 --- a/components/lib/accordion/style/AccordionStyle.js +++ b/components/lib/accordion/style/AccordionStyle.js @@ -1,26 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-accordion-header-action { - cursor: pointer; - display: flex; - align-items: center; - user-select: none; - position: relative; - text-decoration: none; - } - - .p-accordion-header-action:focus { - z-index: 1; - } - - .p-accordion-header-text { - line-height: 1; - } -} -`; - const classes = { root: 'p-accordion p-component', tab: { @@ -47,6 +26,5 @@ const classes = { export default BaseStyle.extend({ name: 'accordion', - css, classes }); diff --git a/components/lib/autocomplete/style/AutoCompleteStyle.js b/components/lib/autocomplete/style/AutoCompleteStyle.js index 8fe581c0d..1870dc211 100644 --- a/components/lib/autocomplete/style/AutoCompleteStyle.js +++ b/components/lib/autocomplete/style/AutoCompleteStyle.js @@ -1,106 +1,6 @@ import BaseStyle from 'primevue/base/style'; import { ObjectUtils } from 'primevue/utils'; -const css = ` -@layer primevue { - .p-autocomplete { - display: inline-flex; - } - - .p-autocomplete-loader { - position: absolute; - top: 50%; - margin-top: -0.5rem; - } - - .p-autocomplete-dd .p-autocomplete-input { - flex: 1 1 auto; - width: 1%; - } - - .p-autocomplete-dd .p-autocomplete-input, - .p-autocomplete-dd .p-autocomplete-multiple-container { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .p-autocomplete-dd .p-autocomplete-dropdown { - border-top-left-radius: 0; - border-bottom-left-radius: 0px; - } - - .p-autocomplete .p-autocomplete-panel { - min-width: 100%; - } - - .p-autocomplete-panel { - position: absolute; - overflow: auto; - top: 0; - left: 0; - } - - .p-autocomplete-items { - margin: 0; - padding: 0; - list-style-type: none; - } - - .p-autocomplete-item { - cursor: pointer; - white-space: nowrap; - position: relative; - overflow: hidden; - } - - .p-autocomplete-multiple-container { - margin: 0; - padding: 0; - list-style-type: none; - cursor: text; - overflow: hidden; - display: flex; - align-items: center; - flex-wrap: wrap; - } - - .p-autocomplete-token { - cursor: default; - display: inline-flex; - align-items: center; - flex: 0 0 auto; - } - - .p-autocomplete-token-icon { - cursor: pointer; - } - - .p-autocomplete-input-token { - flex: 1 1 auto; - display: inline-flex; - } - - .p-autocomplete-input-token input { - border: 0 none; - outline: 0 none; - background-color: transparent; - margin: 0; - padding: 0; - box-shadow: none; - border-radius: 0; - width: 100%; - } - - .p-fluid .p-autocomplete { - display: flex; - } - - .p-fluid .p-autocomplete-dd .p-autocomplete-input { - width: 1%; - } -} -`; - const inlineStyles = { root: { position: 'relative' } }; @@ -159,7 +59,6 @@ const classes = { export default BaseStyle.extend({ name: 'autocomplete', - css, classes, inlineStyles }); diff --git a/components/lib/avatar/style/AvatarStyle.js b/components/lib/avatar/style/AvatarStyle.js index a482d9714..958d7c909 100644 --- a/components/lib/avatar/style/AvatarStyle.js +++ b/components/lib/avatar/style/AvatarStyle.js @@ -1,39 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-avatar { - display: inline-flex; - align-items: center; - justify-content: center; - width: 2rem; - height: 2rem; - font-size: 1rem; - } - - .p-avatar.p-avatar-image { - background-color: transparent; - } - - .p-avatar.p-avatar-circle { - border-radius: 50%; - } - - .p-avatar-circle img { - border-radius: 50%; - } - - .p-avatar .p-avatar-icon { - font-size: 1rem; - } - - .p-avatar img { - width: 100%; - height: 100%; - } -} -`; - const classes = { root: ({ props }) => [ 'p-avatar p-component', @@ -50,6 +16,5 @@ const classes = { export default BaseStyle.extend({ name: 'avatar', - css, classes }); diff --git a/components/lib/avatargroup/style/AvatarGroupStyle.js b/components/lib/avatargroup/style/AvatarGroupStyle.js index c9c5b2f8b..06eeb2213 100644 --- a/components/lib/avatargroup/style/AvatarGroupStyle.js +++ b/components/lib/avatargroup/style/AvatarGroupStyle.js @@ -1,24 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-avatar-group .p-avatar + .p-avatar { - margin-left: -1rem; - } - - .p-avatar-group { - display: flex; - align-items: center; - } -} -`; - const classes = { root: 'p-avatar-group p-component' }; export default BaseStyle.extend({ name: 'avatargroup', - css, classes }); diff --git a/components/lib/badge/style/BadgeStyle.js b/components/lib/badge/style/BadgeStyle.js index fa5402f8a..1fa2f9c8f 100644 --- a/components/lib/badge/style/BadgeStyle.js +++ b/components/lib/badge/style/BadgeStyle.js @@ -1,43 +1,6 @@ import BaseStyle from 'primevue/base/style'; import { ObjectUtils } from 'primevue/utils'; -const css = ` -@layer primevue { - .p-badge { - display: inline-block; - border-radius: 10px; - text-align: center; - padding: 0 .5rem; - } - - .p-overlay-badge { - position: relative; - } - - .p-overlay-badge .p-badge { - position: absolute; - top: 0; - right: 0; - transform: translate(50%,-50%); - transform-origin: 100% 0; - margin: 0; - } - - .p-badge-dot { - width: .5rem; - min-width: .5rem; - height: .5rem; - border-radius: 50%; - padding: 0; - } - - .p-badge-no-gutter { - padding: 0; - border-radius: 50%; - } -} -`; - const classes = { root: ({ props, instance }) => [ 'p-badge p-component', @@ -58,6 +21,5 @@ const classes = { export default BaseStyle.extend({ name: 'badge', - css, classes }); diff --git a/components/lib/badgedirective/style/BadgeDirectiveStyle.js b/components/lib/badgedirective/style/BadgeDirectiveStyle.js index aa1a29bb8..a65cc2827 100644 --- a/components/lib/badgedirective/style/BadgeDirectiveStyle.js +++ b/components/lib/badgedirective/style/BadgeDirectiveStyle.js @@ -1,48 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-badge { - display: inline-block; - border-radius: 10px; - text-align: center; - padding: 0 .5rem; - } - - .p-overlay-badge { - position: relative; - } - - .p-overlay-badge .p-badge { - position: absolute; - top: 0; - right: 0; - transform: translate(50%,-50%); - transform-origin: 100% 0; - margin: 0; - } - - .p-badge-dot { - width: .5rem; - min-width: .5rem; - height: .5rem; - border-radius: 50%; - padding: 0; - } - - .p-badge-no-gutter { - padding: 0; - border-radius: 50%; - } -} -`; - const classes = { root: 'p-badge p-component' }; export default BaseStyle.extend({ name: 'badge', - css, classes }); diff --git a/components/lib/basecomponent/style/BaseComponentStyle.js b/components/lib/basecomponent/style/BaseComponentStyle.js index f4564b39c..6993cd306 100644 --- a/components/lib/basecomponent/style/BaseComponentStyle.js +++ b/components/lib/basecomponent/style/BaseComponentStyle.js @@ -1,215 +1,7 @@ import BaseStyle from 'primevue/base/style'; import { useStyle } from 'primevue/usestyle'; -const buttonCSS = ` -.p-button { - display: inline-flex; - cursor: pointer; - user-select: none; - align-items: center; - vertical-align: bottom; - text-align: center; - overflow: hidden; - position: relative; -} - -.p-button-label { - flex: 1 1 auto; -} - -.p-button-icon-right { - order: 1; -} - -.p-button:disabled { - cursor: default; -} - -.p-button-icon-only { - justify-content: center; -} - -.p-button-icon-only .p-button-label { - visibility: hidden; - width: 0; - flex: 0 0 auto; -} - -.p-button-vertical { - flex-direction: column; -} - -.p-button-icon-bottom { - order: 2; -} - -.p-buttonset .p-button { - margin: 0; -} - -.p-buttonset .p-button:not(:last-child), .p-buttonset .p-button:not(:last-child):hover { - border-right: 0 none; -} - -.p-buttonset .p-button:not(:first-of-type):not(:last-of-type) { - border-radius: 0; -} - -.p-buttonset .p-button:first-of-type:not(:only-of-type) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.p-buttonset .p-button:last-of-type:not(:only-of-type) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -.p-buttonset .p-button:focus { - position: relative; - z-index: 1; -} -`; - -const inputTextCSS = ` -.p-fluid .p-inputtext { - width: 100%; -} - -.p-fluid .p-input-icon-left, -.p-fluid .p-input-icon-right { - width: 100%; -} -`; - -const css = ` -@layer primevue { -.p-component, .p-component * { - box-sizing: border-box; -} - -.p-hidden-space { - visibility: hidden; -} - -.p-reset { - margin: 0; - padding: 0; - border: 0; - outline: 0; - text-decoration: none; - font-size: 100%; - list-style: none; -} - -.p-disabled, .p-disabled * { - cursor: default; - pointer-events: none; - user-select: none; -} - -.p-component-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.p-unselectable-text { - user-select: none; -} - -.p-sr-only { - border: 0; - clip: rect(1px, 1px, 1px, 1px); - clip-path: inset(50%); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; - word-wrap: normal; -} - -.p-link { - text-align: left; - background-color: transparent; - margin: 0; - padding: 0; - border: none; - cursor: pointer; - user-select: none; -} - -.p-link:disabled { - cursor: default; -} - -/* Non vue overlay animations */ -.p-connected-overlay { - opacity: 0; - transform: scaleY(0.8); - transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1); -} - -.p-connected-overlay-visible { - opacity: 1; - transform: scaleY(1); -} - -.p-connected-overlay-hidden { - opacity: 0; - transform: scaleY(1); - transition: opacity .1s linear; -} - -/* Vue based overlay animations */ -.p-connected-overlay-enter-from { - opacity: 0; - transform: scaleY(0.8); -} - -.p-connected-overlay-leave-to { - opacity: 0; -} - -.p-connected-overlay-enter-active { - transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1); -} - -.p-connected-overlay-leave-active { - transition: opacity .1s linear; -} - -/* Toggleable Content */ -.p-toggleable-content-enter-from, -.p-toggleable-content-leave-to { - max-height: 0; -} - -.p-toggleable-content-enter-to, -.p-toggleable-content-leave-from { - max-height: 1000px; -} - -.p-toggleable-content-leave-active { - overflow: hidden; - transition: max-height 0.45s cubic-bezier(0, 1, 0, 1); -} - -.p-toggleable-content-enter-active { - overflow: hidden; - transition: max-height 1s ease-in-out; -} -${buttonCSS} -${inputTextCSS} -} -`; - export default BaseStyle.extend({ name: 'common', - css, loadGlobalStyle: (globalCSS, options = {}) => useStyle(globalCSS, { name: 'global', ...options }) }); diff --git a/components/lib/blockui/style/BlockUIStyle.js b/components/lib/blockui/style/BlockUIStyle.js index 1847d0a0d..1a7ebf6f0 100644 --- a/components/lib/blockui/style/BlockUIStyle.js +++ b/components/lib/blockui/style/BlockUIStyle.js @@ -1,27 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-blockui-container { - position: relative; - } - - .p-blockui.p-component-overlay { - position: absolute; - } - - .p-blockui-document.p-component-overlay { - position: fixed; - } -} -`; - const classes = { root: 'p-blockui-container' }; export default BaseStyle.extend({ name: 'blockui', - css, classes }); diff --git a/components/lib/breadcrumb/style/BreadcrumbStyle.js b/components/lib/breadcrumb/style/BreadcrumbStyle.js index 4fb1c398c..d7c49a9f9 100644 --- a/components/lib/breadcrumb/style/BreadcrumbStyle.js +++ b/components/lib/breadcrumb/style/BreadcrumbStyle.js @@ -1,41 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-breadcrumb { - overflow-x: auto; - } - - .p-breadcrumb .p-breadcrumb-list { - margin: 0; - padding: 0; - list-style-type: none; - display: flex; - align-items: center; - flex-wrap: nowrap; - } - - .p-breadcrumb .p-menuitem-text { - line-height: 1; - } - - .p-breadcrumb .p-menuitem-link { - text-decoration: none; - display: flex; - align-items: center; - } - - .p-breadcrumb .p-menuitem-separator { - display: flex; - align-items: center; - } - - .p-breadcrumb::-webkit-scrollbar { - display: none; - } -} -`; - const classes = { root: 'p-breadcrumb p-component', menu: 'p-breadcrumb-list', @@ -49,6 +13,5 @@ const classes = { export default BaseStyle.extend({ name: 'breadcrumb', - css, classes }); diff --git a/components/lib/calendar/style/CalendarStyle.js b/components/lib/calendar/style/CalendarStyle.js index ae5d2de38..6257f35ff 100644 --- a/components/lib/calendar/style/CalendarStyle.js +++ b/components/lib/calendar/style/CalendarStyle.js @@ -1,159 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-calendar { - display: inline-flex; - max-width: 100%; - } - - .p-calendar .p-inputtext { - flex: 1 1 auto; - width: 1%; - } - - .p-calendar-w-btn .p-inputtext { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .p-calendar-w-btn .p-datepicker-trigger { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .p-calendar .p-datepicker-trigger-icon { - cursor: pointer; - } - - /* Fluid */ - .p-fluid .p-calendar { - display: flex; - } - - .p-fluid .p-calendar .p-inputtext { - width: 1%; - } - - /* Datepicker */ - .p-calendar .p-datepicker { - min-width: 100%; - } - - .p-datepicker { - width: auto; - } - - .p-datepicker-inline { - display: inline-block; - overflow-x: auto; - } - - /* Header */ - .p-datepicker-header { - display: flex; - align-items: center; - justify-content: space-between; - } - - .p-datepicker-header .p-datepicker-title { - margin: 0 auto; - } - - .p-datepicker-prev, - .p-datepicker-next { - cursor: pointer; - display: inline-flex; - justify-content: center; - align-items: center; - overflow: hidden; - position: relative; - } - - /* Multiple Month DatePicker */ - .p-datepicker-multiple-month .p-datepicker-group-container { - display: flex; - } - - .p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group { - flex: 1 1 auto; - } - - /* DatePicker Table */ - .p-datepicker table { - width: 100%; - border-collapse: collapse; - } - - .p-datepicker td > span { - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - margin: 0 auto; - overflow: hidden; - position: relative; - } - - /* Month Picker */ - .p-monthpicker-month { - width: 33.3%; - display: inline-flex; - align-items: center; - justify-content: center; - cursor: pointer; - overflow: hidden; - position: relative; - } - - /* Year Picker */ - .p-yearpicker-year { - width: 50%; - display: inline-flex; - align-items: center; - justify-content: center; - cursor: pointer; - overflow: hidden; - position: relative; - } - - /* Button Bar */ - .p-datepicker-buttonbar { - display: flex; - justify-content: space-between; - align-items: center; - } - - /* Time Picker */ - .p-timepicker { - display: flex; - justify-content: center; - align-items: center; - } - - .p-timepicker button { - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - overflow: hidden; - position: relative; - } - - .p-timepicker > div { - display: flex; - align-items: center; - flex-direction: column; - } - - /* Touch UI */ - .p-datepicker-touch-ui, - .p-calendar .p-datepicker-touch-ui { - min-width: 80vw; - } -} -`; - const inlineStyles = { root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined }) }; @@ -231,7 +77,6 @@ const classes = { export default BaseStyle.extend({ name: 'calendar', - css, classes, inlineStyles }); diff --git a/components/lib/carousel/style/CarouselStyle.js b/components/lib/carousel/style/CarouselStyle.js index ff977fba7..fc6440e9f 100644 --- a/components/lib/carousel/style/CarouselStyle.js +++ b/components/lib/carousel/style/CarouselStyle.js @@ -1,79 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-carousel { - display: flex; - flex-direction: column; - } - - .p-carousel-content { - display: flex; - flex-direction: column; - overflow: auto; - } - - .p-carousel-prev, - .p-carousel-next { - align-self: center; - flex-grow: 0; - flex-shrink: 0; - display: flex; - justify-content: center; - align-items: center; - overflow: hidden; - position: relative; - } - - .p-carousel-container { - display: flex; - flex-direction: row; - } - - .p-carousel-items-content { - overflow: hidden; - width: 100%; - } - - .p-carousel-items-container { - display: flex; - flex-direction: row; - } - - .p-carousel-indicators { - display: flex; - flex-direction: row; - justify-content: center; - flex-wrap: wrap; - } - - .p-carousel-indicator > button { - display: flex; - align-items: center; - justify-content: center; - } - - /* Vertical */ - .p-carousel-vertical .p-carousel-container { - flex-direction: column; - } - - .p-carousel-vertical .p-carousel-items-container { - flex-direction: column; - height: 100%; - } - - /* Keyboard Support */ - .p-items-hidden .p-carousel-item { - visibility: hidden; - } - - .p-items-hidden .p-carousel-item.p-carousel-item-active { - visibility: visible; - } -} -`; - const classes = { root: ({ instance }) => [ 'p-carousel p-component', @@ -130,6 +56,5 @@ const classes = { export default BaseStyle.extend({ name: 'carousel', - css, classes }); diff --git a/components/lib/cascadeselect/style/CascadeSelectStyle.js b/components/lib/cascadeselect/style/CascadeSelectStyle.js index 22e997d59..0ff61058e 100644 --- a/components/lib/cascadeselect/style/CascadeSelectStyle.js +++ b/components/lib/cascadeselect/style/CascadeSelectStyle.js @@ -1,99 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-cascadeselect { - display: inline-flex; - cursor: pointer; - user-select: none; - } - - .p-cascadeselect-trigger { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - } - - .p-cascadeselect-label { - display: block; - white-space: nowrap; - overflow: hidden; - flex: 1 1 auto; - width: 1%; - text-overflow: ellipsis; - cursor: pointer; - } - - .p-cascadeselect-label-empty { - overflow: hidden; - visibility: hidden; - } - - .p-cascadeselect .p-cascadeselect-panel { - min-width: 100%; - } - - .p-cascadeselect-item { - cursor: pointer; - font-weight: normal; - white-space: nowrap; - } - - .p-cascadeselect-item-content { - display: flex; - align-items: center; - overflow: hidden; - position: relative; - } - - .p-cascadeselect-group-icon { - margin-left: auto; - } - - .p-cascadeselect-items { - margin: 0; - padding: 0; - list-style-type: none; - min-width: 100%; - } - - .p-fluid .p-cascadeselect { - display: flex; - } - - .p-fluid .p-cascadeselect .p-cascadeselect-label { - width: 1%; - } - - .p-cascadeselect-sublist { - position: absolute; - min-width: 100%; - z-index: 1; - display: none; - } - - .p-cascadeselect-item-active { - overflow: visible; - } - - .p-cascadeselect-item-active > .p-cascadeselect-sublist { - display: block; - left: 100%; - top: 0; - } - - .p-cascadeselect-enter-from, - .p-cascadeselect-leave-active { - opacity: 0; - } - - .p-cascadeselect-enter-active { - transition: opacity 150ms; - } -} -`; - const inlineStyles = { root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined }) }; @@ -146,7 +52,6 @@ const classes = { export default BaseStyle.extend({ name: 'cascadeselect', - css, classes, inlineStyles }); diff --git a/components/lib/checkbox/style/CheckboxStyle.js b/components/lib/checkbox/style/CheckboxStyle.js index bad7a0019..b9f0f9c29 100644 --- a/components/lib/checkbox/style/CheckboxStyle.js +++ b/components/lib/checkbox/style/CheckboxStyle.js @@ -1,26 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-checkbox { - position: relative; - display: inline-flex; - user-select: none; - vertical-align: bottom; - } - - .p-checkbox-input { - cursor: pointer; - } - - .p-checkbox-box { - display: flex; - justify-content: center; - align-items: center; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-checkbox p-component', @@ -38,6 +17,5 @@ const classes = { export default BaseStyle.extend({ name: 'checkbox', - css, classes }); diff --git a/components/lib/chip/style/ChipStyle.js b/components/lib/chip/style/ChipStyle.js index 8b8b6d214..40448778c 100644 --- a/components/lib/chip/style/ChipStyle.js +++ b/components/lib/chip/style/ChipStyle.js @@ -1,31 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-chip { - display: inline-flex; - align-items: center; - } - - .p-chip-text { - line-height: 1.5; - } - - .p-chip-icon.pi { - line-height: 1.5; - } - - .p-chip-remove-icon { - line-height: 1.5; - cursor: pointer; - } - - .p-chip img { - border-radius: 50%; - } -} -`; - const classes = { root: ({ props }) => [ 'p-chip p-component', @@ -40,6 +14,5 @@ const classes = { export default BaseStyle.extend({ name: 'chip', - css, classes }); diff --git a/components/lib/chips/style/ChipsStyle.js b/components/lib/chips/style/ChipsStyle.js index 19c5ec7d9..61a5c27de 100644 --- a/components/lib/chips/style/ChipsStyle.js +++ b/components/lib/chips/style/ChipsStyle.js @@ -1,55 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-chips { - display: inline-flex; - } - - .p-chips-multiple-container { - margin: 0; - padding: 0; - list-style-type: none; - cursor: text; - overflow: hidden; - display: flex; - align-items: center; - flex-wrap: wrap; - } - - .p-chips-token { - cursor: default; - display: inline-flex; - align-items: center; - flex: 0 0 auto; - } - - .p-chips-input-token { - flex: 1 1 auto; - display: inline-flex; - } - - .p-chips-token-icon { - cursor: pointer; - } - - .p-chips-input-token input { - border: 0 none; - outline: 0 none; - background-color: transparent; - margin: 0; - padding: 0; - box-shadow: none; - border-radius: 0; - width: 100%; - } - - .p-fluid .p-chips { - display: flex; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-chips p-component p-inputwrapper', @@ -75,6 +25,5 @@ const classes = { export default BaseStyle.extend({ name: 'chips', - css, classes }); diff --git a/components/lib/colorpicker/style/ColorPickerStyle.js b/components/lib/colorpicker/style/ColorPickerStyle.js index bd27d6dc4..85d036f14 100644 --- a/components/lib/colorpicker/style/ColorPickerStyle.js +++ b/components/lib/colorpicker/style/ColorPickerStyle.js @@ -1,17 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-colorpicker-panel .p-colorpicker-color { - background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%) - } - - .p-colorpicker-panel .p-colorpicker-hue { - background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red) - } -} -`; - const classes = { root: ({ props }) => ['p-colorpicker p-component', { 'p-colorpicker-overlay': !props.inline }], input: ({ props }) => ['p-colorpicker-preview p-inputtext', { 'p-disabled': props.disabled }], @@ -33,6 +21,5 @@ const classes = { export default BaseStyle.extend({ name: 'colorpicker', - css, classes }); diff --git a/components/lib/confirmpopup/style/ConfirmPopupStyle.js b/components/lib/confirmpopup/style/ConfirmPopupStyle.js index 915f8cef2..4a16f034b 100644 --- a/components/lib/confirmpopup/style/ConfirmPopupStyle.js +++ b/components/lib/confirmpopup/style/ConfirmPopupStyle.js @@ -1,79 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-confirm-popup { - position: absolute; - margin-top: 10px; - top: 0; - left: 0; - } - - .p-confirm-popup-flipped { - margin-top: 0; - margin-bottom: 10px; - } - - /* Animation */ - .p-confirm-popup-enter-from { - opacity: 0; - transform: scaleY(0.8); - } - - .p-confirm-popup-leave-to { - opacity: 0; - } - - .p-confirm-popup-enter-active { - transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); - } - - .p-confirm-popup-leave-active { - transition: opacity 0.1s linear; - } - - .p-confirm-popup:after, - .p-confirm-popup:before { - bottom: 100%; - left: calc(var(--overlayArrowLeft, 0) + 1.25rem); - content: ' '; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - } - - .p-confirm-popup:after { - border-width: 8px; - margin-left: -8px; - } - - .p-confirm-popup:before { - border-width: 10px; - margin-left: -10px; - } - - .p-confirm-popup-flipped:after, - .p-confirm-popup-flipped:before { - bottom: auto; - top: 100%; - } - - .p-confirm-popup.p-confirm-popup-flipped:after { - border-bottom-color: transparent; - } - - .p-confirm-popup.p-confirm-popup-flipped:before { - border-bottom-color: transparent; - } - - .p-confirm-popup .p-confirm-popup-content { - display: flex; - align-items: center; - } -} -`; - const classes = { root: ({ instance }) => [ 'p-confirm-popup p-component', @@ -91,6 +17,5 @@ const classes = { export default BaseStyle.extend({ name: 'confirmpopup', - css, classes }); diff --git a/components/lib/contextmenu/style/ContextMenuStyle.js b/components/lib/contextmenu/style/ContextMenuStyle.js index 1c19cf482..626a2cb81 100644 --- a/components/lib/contextmenu/style/ContextMenuStyle.js +++ b/components/lib/contextmenu/style/ContextMenuStyle.js @@ -1,51 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-contextmenu ul { - margin: 0; - padding: 0; - list-style: none; - } - - .p-contextmenu .p-submenu-list { - position: absolute; - min-width: 100%; - z-index: 1; - } - - .p-contextmenu .p-menuitem-link { - cursor: pointer; - display: flex; - align-items: center; - text-decoration: none; - overflow: hidden; - position: relative; - } - - .p-contextmenu .p-menuitem-text { - line-height: 1; - } - - .p-contextmenu .p-menuitem { - position: relative; - } - - .p-contextmenu .p-menuitem-link .p-submenu-icon { - margin-left: auto; - } - - .p-contextmenu-enter-from, - .p-contextmenu-leave-active { - opacity: 0; - } - - .p-contextmenu-enter-active { - transition: opacity 250ms; - } -} -`; - const classes = { root: ({ instance }) => [ 'p-contextmenu p-component', @@ -73,6 +27,5 @@ const classes = { export default BaseStyle.extend({ name: 'contextmenu', - css, classes }); diff --git a/components/lib/datatable/style/DataTableStyle.js b/components/lib/datatable/style/DataTableStyle.js index a5df3ce41..34e82e857 100644 --- a/components/lib/datatable/style/DataTableStyle.js +++ b/components/lib/datatable/style/DataTableStyle.js @@ -1,244 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-datatable { - position: relative; - } - - .p-datatable-table { - border-spacing: 0px; - width: 100%; - } - - .p-datatable .p-sortable-column { - cursor: pointer; - user-select: none; - } - - .p-datatable .p-sortable-column .p-column-title, - .p-datatable .p-sortable-column .p-sortable-column-icon, - .p-datatable .p-sortable-column .p-sortable-column-badge { - vertical-align: middle; - } - - .p-datatable .p-sortable-column .p-sortable-column-badge { - display: inline-flex; - align-items: center; - justify-content: center; - } - - .p-datatable-hoverable-rows .p-selectable-row { - cursor: pointer; - } - - /* Scrollable */ - .p-datatable-scrollable > .p-datatable-wrapper { - position: relative; - } - - .p-datatable-scrollable-table > .p-datatable-thead { - top: 0; - z-index: 1; - } - - .p-datatable-scrollable-table > .p-datatable-frozen-tbody { - position: sticky; - z-index: 1; - } - - .p-datatable-scrollable-table > .p-datatable-tfoot { - bottom: 0; - z-index: 1; - } - - .p-datatable-scrollable .p-frozen-column { - position: sticky; - background: inherit; - } - - .p-datatable-scrollable th.p-frozen-column { - z-index: 1; - } - - .p-datatable-flex-scrollable { - display: flex; - flex-direction: column; - height: 100%; - } - - .p-datatable-flex-scrollable > .p-datatable-wrapper { - display: flex; - flex-direction: column; - flex: 1; - height: 100%; - } - - .p-datatable-scrollable-table > .p-datatable-tbody > .p-rowgroup-header { - position: sticky; - z-index: 1; - } - - /* Resizable */ - .p-datatable-resizable-table > .p-datatable-thead > tr > th, - .p-datatable-resizable-table > .p-datatable-tfoot > tr > td, - .p-datatable-resizable-table > .p-datatable-tbody > tr > td { - overflow: hidden; - white-space: nowrap; - } - - .p-datatable-resizable-table > .p-datatable-thead > tr > th.p-resizable-column:not(.p-frozen-column) { - background-clip: padding-box; - position: relative; - } - - .p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-resizable-column:last-child .p-column-resizer { - display: none; - } - - .p-datatable .p-column-resizer { - display: block; - position: absolute; - top: 0; - right: 0; - margin: 0; - width: 0.5rem; - height: 100%; - padding: 0px; - cursor: col-resize; - border: 1px solid transparent; - } - - .p-datatable .p-column-header-content { - display: flex; - align-items: center; - } - - .p-datatable .p-column-resizer-helper { - width: 1px; - position: absolute; - z-index: 10; - display: none; - } - - .p-datatable .p-row-editor-init, - .p-datatable .p-row-editor-save, - .p-datatable .p-row-editor-cancel { - display: inline-flex; - align-items: center; - justify-content: center; - overflow: hidden; - position: relative; - } - - /* Expand */ - .p-datatable .p-row-toggler { - display: inline-flex; - align-items: center; - justify-content: center; - overflow: hidden; - position: relative; - } - - /* Reorder */ - .p-datatable-reorder-indicator-up, - .p-datatable-reorder-indicator-down { - position: absolute; - display: none; - } - - .p-reorderable-column, - .p-datatable-reorderablerow-handle { - cursor: move; - } - - /* Loader */ - .p-datatable .p-datatable-loading-overlay { - position: absolute; - display: flex; - align-items: center; - justify-content: center; - z-index: 2; - } - - /* Filter */ - .p-column-filter-row { - display: flex; - align-items: center; - width: 100%; - } - - .p-column-filter-menu { - display: inline-flex; - margin-left: auto; - } - - .p-column-filter-row .p-column-filter-element { - flex: 1 1 auto; - width: 1%; - } - - .p-column-filter-menu-button, - .p-column-filter-clear-button { - display: inline-flex; - justify-content: center; - align-items: center; - cursor: pointer; - text-decoration: none; - overflow: hidden; - position: relative; - } - - .p-column-filter-row-items { - margin: 0; - padding: 0; - list-style: none; - } - - .p-column-filter-row-item { - cursor: pointer; - } - - .p-column-filter-add-button, - .p-column-filter-remove-button { - justify-content: center; - } - - .p-column-filter-add-button .p-button-label, - .p-column-filter-remove-button .p-button-label { - flex-grow: 0; - } - - .p-column-filter-buttonbar { - display: flex; - align-items: center; - justify-content: space-between; - } - - .p-column-filter-buttonbar .p-button:not(.p-button-icon-only) { - width: auto; - } - - /* Responsive */ - .p-datatable .p-datatable-tbody > tr > td > .p-column-title { - display: none; - } - - /* VirtualScroller */ - .p-datatable-virtualscroller-spacer { - display: flex; - } - - .p-datatable .p-virtualscroller .p-virtualscroller-loading { - transform: none !important; - min-height: 0; - position: sticky; - top: 0; - left: 0; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-datatable p-component', @@ -419,7 +180,6 @@ const inlineStyles = { export default BaseStyle.extend({ name: 'datatable', - css, classes, inlineStyles }); diff --git a/components/lib/dialog/style/DialogStyle.js b/components/lib/dialog/style/DialogStyle.js index 29adacd0d..80605e0f0 100644 --- a/components/lib/dialog/style/DialogStyle.js +++ b/components/lib/dialog/style/DialogStyle.js @@ -1,138 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-dialog-mask.p-component-overlay { - pointer-events: auto; - } - - .p-dialog { - max-height: 90%; - transform: scale(1); - } - - .p-dialog-content { - overflow-y: auto; - } - - .p-dialog-header { - display: flex; - align-items: center; - justify-content: space-between; - flex-shrink: 0; - } - - .p-dialog-footer { - flex-shrink: 0; - } - - .p-dialog .p-dialog-header-icons { - display: flex; - align-items: center; - } - - .p-dialog .p-dialog-header-icon { - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - position: relative; - } - - /* Fluid */ - .p-fluid .p-dialog-footer .p-button { - width: auto; - } - - /* Animation */ - /* Center */ - .p-dialog-enter-active { - transition: all 150ms cubic-bezier(0, 0, 0.2, 1); - } - .p-dialog-leave-active { - transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); - } - .p-dialog-enter-from, - .p-dialog-leave-to { - opacity: 0; - transform: scale(0.7); - } - - /* Top, Bottom, Left, Right, Top* and Bottom* */ - .p-dialog-top .p-dialog, - .p-dialog-bottom .p-dialog, - .p-dialog-left .p-dialog, - .p-dialog-right .p-dialog, - .p-dialog-topleft .p-dialog, - .p-dialog-topright .p-dialog, - .p-dialog-bottomleft .p-dialog, - .p-dialog-bottomright .p-dialog { - margin: 0.75rem; - transform: translate3d(0px, 0px, 0px); - } - .p-dialog-top .p-dialog-enter-active, - .p-dialog-top .p-dialog-leave-active, - .p-dialog-bottom .p-dialog-enter-active, - .p-dialog-bottom .p-dialog-leave-active, - .p-dialog-left .p-dialog-enter-active, - .p-dialog-left .p-dialog-leave-active, - .p-dialog-right .p-dialog-enter-active, - .p-dialog-right .p-dialog-leave-active, - .p-dialog-topleft .p-dialog-enter-active, - .p-dialog-topleft .p-dialog-leave-active, - .p-dialog-topright .p-dialog-enter-active, - .p-dialog-topright .p-dialog-leave-active, - .p-dialog-bottomleft .p-dialog-enter-active, - .p-dialog-bottomleft .p-dialog-leave-active, - .p-dialog-bottomright .p-dialog-enter-active, - .p-dialog-bottomright .p-dialog-leave-active { - transition: all 0.3s ease-out; - } - .p-dialog-top .p-dialog-enter-from, - .p-dialog-top .p-dialog-leave-to { - transform: translate3d(0px, -100%, 0px); - } - .p-dialog-bottom .p-dialog-enter-from, - .p-dialog-bottom .p-dialog-leave-to { - transform: translate3d(0px, 100%, 0px); - } - .p-dialog-left .p-dialog-enter-from, - .p-dialog-left .p-dialog-leave-to, - .p-dialog-topleft .p-dialog-enter-from, - .p-dialog-topleft .p-dialog-leave-to, - .p-dialog-bottomleft .p-dialog-enter-from, - .p-dialog-bottomleft .p-dialog-leave-to { - transform: translate3d(-100%, 0px, 0px); - } - .p-dialog-right .p-dialog-enter-from, - .p-dialog-right .p-dialog-leave-to, - .p-dialog-topright .p-dialog-enter-from, - .p-dialog-topright .p-dialog-leave-to, - .p-dialog-bottomright .p-dialog-enter-from, - .p-dialog-bottomright .p-dialog-leave-to { - transform: translate3d(100%, 0px, 0px); - } - - /* Maximize */ - .p-dialog-maximized { - width: 100vw !important; - height: 100vh !important; - top: 0px !important; - left: 0px !important; - max-height: 100%; - height: 100%; - } - .p-dialog-maximized .p-dialog-content { - flex-grow: 1; - } - - .p-confirm-dialog .p-dialog-content { - display: flex; - align-items: center; - } -} -`; - /* Position */ const inlineStyles = { mask: ({ position, modal }) => ({ @@ -187,7 +54,6 @@ const classes = { export default BaseStyle.extend({ name: 'dialog', - css, classes, inlineStyles }); diff --git a/components/lib/divider/style/DividerStyle.js b/components/lib/divider/style/DividerStyle.js index 28be12b4e..493bbd00f 100644 --- a/components/lib/divider/style/DividerStyle.js +++ b/components/lib/divider/style/DividerStyle.js @@ -1,70 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-divider-horizontal { - display: flex; - width: 100%; - position: relative; - align-items: center; - } - - .p-divider-horizontal:before { - position: absolute; - display: block; - top: 50%; - left: 0; - width: 100%; - content: ''; - } - - .p-divider-content { - z-index: 1; - } - - .p-divider-vertical { - min-height: 100%; - margin: 0 1rem; - display: flex; - position: relative; - justify-content: center; - } - - .p-divider-vertical:before { - position: absolute; - display: block; - top: 0; - left: 50%; - height: 100%; - content: ''; - } - - .p-divider-solid.p-divider-horizontal:before { - border-top-style: solid; - } - - .p-divider-solid.p-divider-vertical:before { - border-left-style: solid; - } - - .p-divider-dashed.p-divider-horizontal:before { - border-top-style: dashed; - } - - .p-divider-dashed.p-divider-vertical:before { - border-left-style: dashed; - } - - .p-divider-dotted.p-divider-horizontal:before { - border-top-style: dotted; - } - - .p-divider-dotted.p-divider-vertical:before { - border-left-style: dotted; - } -} -`; - /* Position */ const inlineStyles = { root: ({ props }) => ({ @@ -90,7 +25,6 @@ const classes = { export default BaseStyle.extend({ name: 'divider', - css, classes, inlineStyles }); diff --git a/components/lib/dock/style/DockStyle.js b/components/lib/dock/style/DockStyle.js index 6e18b5810..b252c7c35 100644 --- a/components/lib/dock/style/DockStyle.js +++ b/components/lib/dock/style/DockStyle.js @@ -1,115 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-dock { - position: absolute; - z-index: 1; - display: flex; - justify-content: center; - align-items: center; - pointer-events: none; - } - - .p-dock-list-container { - display: flex; - pointer-events: auto; - } - - .p-dock-list { - margin: 0; - padding: 0; - list-style: none; - display: flex; - align-items: center; - justify-content: center; - } - - .p-dock-item { - transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); - will-change: transform; - } - - .p-dock-link { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - position: relative; - overflow: hidden; - cursor: default; - } - - .p-dock-item-second-prev, - .p-dock-item-second-next { - transform: scale(1.2); - } - - .p-dock-item-prev, - .p-dock-item-next { - transform: scale(1.4); - } - - .p-dock-item-current { - transform: scale(1.6); - z-index: 1; - } - - /* Position */ - /* top */ - .p-dock-top { - left: 0; - top: 0; - width: 100%; - } - - .p-dock-top .p-dock-item { - transform-origin: center top; - } - - /* bottom */ - .p-dock-bottom { - left: 0; - bottom: 0; - width: 100%; - } - - .p-dock-bottom .p-dock-item { - transform-origin: center bottom; - } - - /* right */ - .p-dock-right { - right: 0; - top: 0; - height: 100%; - } - - .p-dock-right .p-dock-item { - transform-origin: center right; - } - - .p-dock-right .p-dock-list { - flex-direction: column; - } - - /* left */ - .p-dock-left { - left: 0; - top: 0; - height: 100%; - } - - .p-dock-left .p-dock-item { - transform-origin: center left; - } - - .p-dock-left .p-dock-list { - flex-direction: column; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-dock p-component', @@ -139,6 +29,5 @@ const classes = { export default BaseStyle.extend({ name: 'dock', - css, classes }); diff --git a/components/lib/dropdown/style/DropdownStyle.js b/components/lib/dropdown/style/DropdownStyle.js index 7abdd35cb..6f85ff7c3 100644 --- a/components/lib/dropdown/style/DropdownStyle.js +++ b/components/lib/dropdown/style/DropdownStyle.js @@ -1,104 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-dropdown { - display: inline-flex; - cursor: pointer; - position: relative; - user-select: none; - } - - .p-dropdown-clear-icon { - position: absolute; - top: 50%; - margin-top: -0.5rem; - } - - .p-dropdown-trigger { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - } - - .p-dropdown-label { - display: block; - white-space: nowrap; - overflow: hidden; - flex: 1 1 auto; - width: 1%; - text-overflow: ellipsis; - cursor: pointer; - } - - .p-dropdown-label-empty { - overflow: hidden; - opacity: 0; - } - - input.p-dropdown-label { - cursor: default; - } - - .p-dropdown .p-dropdown-panel { - min-width: 100%; - } - - .p-dropdown-panel { - position: absolute; - top: 0; - left: 0; - } - - .p-dropdown-items-wrapper { - overflow: auto; - } - - .p-dropdown-item { - cursor: pointer; - font-weight: normal; - white-space: nowrap; - position: relative; - overflow: hidden; - display: flex; - align-items: center; - } - - .p-dropdown-item-group { - cursor: auto; - } - - .p-dropdown-items { - margin: 0; - padding: 0; - list-style-type: none; - } - - .p-dropdown-filter { - width: 100%; - } - - .p-dropdown-filter-container { - position: relative; - } - - .p-dropdown-filter-icon { - position: absolute; - top: 50%; - margin-top: -0.5rem; - } - - .p-fluid .p-dropdown { - display: flex; - } - - .p-fluid .p-dropdown .p-dropdown-label { - width: 1%; - } -} -`; - const classes = { root: ({ instance, props, state }) => [ 'p-dropdown p-component p-inputwrapper', @@ -159,6 +60,5 @@ const classes = { export default BaseStyle.extend({ name: 'dropdown', - css, classes }); diff --git a/components/lib/fieldset/style/FieldsetStyle.js b/components/lib/fieldset/style/FieldsetStyle.js index ab61bb36f..4e8ba220a 100644 --- a/components/lib/fieldset/style/FieldsetStyle.js +++ b/components/lib/fieldset/style/FieldsetStyle.js @@ -1,28 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-fieldset-legend > a, - .p-fieldset-legend > span { - display: flex; - align-items: center; - justify-content: center; - } - - .p-fieldset-toggleable .p-fieldset-legend a { - cursor: pointer; - user-select: none; - overflow: hidden; - position: relative; - text-decoration: none; - } - - .p-fieldset-legend-text { - line-height: 1; - } -} -`; - const classes = { root: ({ props }) => [ 'p-fieldset p-component', @@ -39,6 +16,5 @@ const classes = { export default BaseStyle.extend({ name: 'fieldset', - css, classes }); diff --git a/components/lib/fileupload/style/FileUploadStyle.js b/components/lib/fileupload/style/FileUploadStyle.js index 5cf54c7ab..3de8bf7f7 100644 --- a/components/lib/fileupload/style/FileUploadStyle.js +++ b/components/lib/fileupload/style/FileUploadStyle.js @@ -1,53 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-fileupload-content { - position: relative; - } - - .p-fileupload-content .p-progressbar { - width: 100%; - position: absolute; - top: 0; - left: 0; - } - - .p-button.p-fileupload-choose { - position: relative; - overflow: hidden; - } - - .p-fileupload-buttonbar { - display: flex; - flex-wrap: wrap; - } - - .p-fileupload > input[type='file'], - .p-fileupload-basic input[type='file'] { - display: none; - } - - .p-fluid .p-fileupload .p-button { - width: auto; - } - - .p-fileupload-file { - display: flex; - flex-wrap: wrap; - align-items: center; - } - - .p-fileupload-file-thumbnail { - flex-shrink: 0; - } - - .p-fileupload-file-actions { - margin-left: auto; - } -} -`; - const classes = { root: ({ props }) => [`p-fileupload p-fileupload-${props.mode} p-component`], buttonbar: 'p-fileupload-buttonbar', @@ -77,6 +29,5 @@ const classes = { export default BaseStyle.extend({ name: 'fileupload', - css, classes }); diff --git a/components/lib/floatlabel/style/FloatLabelStyle.js b/components/lib/floatlabel/style/FloatLabelStyle.js index 6bf713878..0e060f671 100644 --- a/components/lib/floatlabel/style/FloatLabelStyle.js +++ b/components/lib/floatlabel/style/FloatLabelStyle.js @@ -1,61 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-float-label { - display: block; - position: relative; - } - - .p-float-label label { - position: absolute; - pointer-events: none; - top: 50%; - margin-top: -.5rem; - transition-property: all; - transition-timing-function: ease; - line-height: 1; - } - - .p-float-label:has(textarea) label { - top: 1rem; - } - - .p-float-label:has(input:focus) label, - .p-float-label:has(input.p-filled) label, - .p-float-label:has(input:-webkit-autofill) label, - .p-float-label:has(textarea:focus) label, - .p-float-label:has(textarea.p-filled) label, - .p-float-label:has(.p-inputwrapper-focus) label, - .p-float-label:has(.p-inputwrapper-filled) label { - top: -.75rem; - font-size: 12px; - } - - .p-float-label .p-placeholder, - .p-float-label input::placeholder, - .p-float-label .p-inputtext::placeholder { - opacity: 0; - transition-property: all; - transition-timing-function: ease; - } - - .p-float-label .p-focus .p-placeholder, - .p-float-label input:focus::placeholder, - .p-float-label .p-inputtext:focus::placeholder { - opacity: 1; - transition-property: all; - transition-timing-function: ease; - } -} -`; - const classes = { root: 'p-float-label' }; export default BaseStyle.extend({ name: 'floatlabel', - css, classes }); diff --git a/components/lib/galleria/style/GalleriaStyle.js b/components/lib/galleria/style/GalleriaStyle.js index ee6a2f862..17d4e4300 100644 --- a/components/lib/galleria/style/GalleriaStyle.js +++ b/components/lib/galleria/style/GalleriaStyle.js @@ -1,293 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-galleria-content { - display: flex; - flex-direction: column; - } - - .p-galleria-item-wrapper { - display: flex; - flex-direction: column; - position: relative; - } - - .p-galleria-item-container { - position: relative; - display: flex; - height: 100%; - } - - .p-galleria-item-nav { - position: absolute; - top: 50%; - margin-top: -0.5rem; - display: inline-flex; - justify-content: center; - align-items: center; - overflow: hidden; - } - - .p-galleria-item-prev { - left: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .p-galleria-item-next { - right: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .p-galleria-item { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; - } - - .p-galleria-item-nav-onhover .p-galleria-item-nav { - pointer-events: none; - opacity: 0; - transition: opacity 0.2s ease-in-out; - } - - .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav { - pointer-events: all; - opacity: 1; - } - - .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled { - pointer-events: none; - } - - .p-galleria-caption { - position: absolute; - bottom: 0; - left: 0; - width: 100%; - } - - /* Thumbnails */ - .p-galleria-thumbnail-wrapper { - display: flex; - flex-direction: column; - overflow: auto; - flex-shrink: 0; - } - - .p-galleria-thumbnail-prev, - .p-galleria-thumbnail-next { - align-self: center; - flex: 0 0 auto; - display: flex; - justify-content: center; - align-items: center; - overflow: hidden; - position: relative; - } - - .p-galleria-thumbnail-prev span, - .p-galleria-thumbnail-next span { - display: flex; - justify-content: center; - align-items: center; - } - - .p-galleria-thumbnail-container { - display: flex; - flex-direction: row; - } - - .p-galleria-thumbnail-items-container { - overflow: hidden; - width: 100%; - } - - .p-galleria-thumbnail-items { - display: flex; - } - - .p-galleria-thumbnail-item { - overflow: auto; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - opacity: 0.5; - } - - .p-galleria-thumbnail-item:hover { - opacity: 1; - transition: opacity 0.3s; - } - - .p-galleria-thumbnail-item-current { - opacity: 1; - } - - /* Positions */ - /* Thumbnails */ - .p-galleria-thumbnails-left .p-galleria-content, - .p-galleria-thumbnails-right .p-galleria-content { - flex-direction: row; - } - - .p-galleria-thumbnails-left .p-galleria-item-wrapper, - .p-galleria-thumbnails-right .p-galleria-item-wrapper { - flex-direction: row; - } - - .p-galleria-thumbnails-left .p-galleria-item-wrapper, - .p-galleria-thumbnails-top .p-galleria-item-wrapper { - order: 2; - } - - .p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper, - .p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper { - order: 1; - } - - .p-galleria-thumbnails-left .p-galleria-thumbnail-container, - .p-galleria-thumbnails-right .p-galleria-thumbnail-container { - flex-direction: column; - flex-grow: 1; - } - - .p-galleria-thumbnails-left .p-galleria-thumbnail-items, - .p-galleria-thumbnails-right .p-galleria-thumbnail-items { - flex-direction: column; - height: 100%; - } - - /* Indicators */ - .p-galleria-indicators { - display: flex; - align-items: center; - justify-content: center; - } - - .p-galleria-indicator > button { - display: inline-flex; - align-items: center; - } - - .p-galleria-indicators-left .p-galleria-item-wrapper, - .p-galleria-indicators-right .p-galleria-item-wrapper { - flex-direction: row; - align-items: center; - } - - .p-galleria-indicators-left .p-galleria-item-container, - .p-galleria-indicators-top .p-galleria-item-container { - order: 2; - } - - .p-galleria-indicators-left .p-galleria-indicators, - .p-galleria-indicators-top .p-galleria-indicators { - order: 1; - } - - .p-galleria-indicators-left .p-galleria-indicators, - .p-galleria-indicators-right .p-galleria-indicators { - flex-direction: column; - } - - .p-galleria-indicator-onitem .p-galleria-indicators { - position: absolute; - display: flex; - z-index: 1; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators { - top: 0; - left: 0; - width: 100%; - align-items: flex-start; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators { - right: 0; - top: 0; - height: 100%; - align-items: flex-end; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators { - bottom: 0; - left: 0; - width: 100%; - align-items: flex-end; - } - - .p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators { - left: 0; - top: 0; - height: 100%; - align-items: flex-start; - } - - /* FullScreen */ - .p-galleria-mask { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - } - - .p-galleria-close { - position: absolute; - top: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - overflow: hidden; - } - - .p-galleria-mask .p-galleria-item-nav { - position: fixed; - top: 50%; - margin-top: -0.5rem; - } - - /* Animation */ - .p-galleria-enter-active { - transition: all 150ms cubic-bezier(0, 0, 0.2, 1); - } - - .p-galleria-leave-active { - transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); - } - - .p-galleria-enter-from, - .p-galleria-leave-to { - opacity: 0; - transform: scale(0.7); - } - - .p-galleria-enter-active .p-galleria-item-nav { - opacity: 0; - } - - /* Keyboard Support */ - .p-items-hidden .p-galleria-thumbnail-item { - visibility: hidden; - } - - .p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active { - visibility: visible; - } -} -`; - const classes = { mask: ({ instance }) => [ 'p-galleria-mask p-component-overlay p-component-overlay-enter', @@ -373,6 +85,5 @@ const classes = { export default BaseStyle.extend({ name: 'galleria', - css, classes }); diff --git a/components/lib/iconfield/style/IconFieldStyle.js b/components/lib/iconfield/style/IconFieldStyle.js index 65160843a..28229df59 100644 --- a/components/lib/iconfield/style/IconFieldStyle.js +++ b/components/lib/iconfield/style/IconFieldStyle.js @@ -1,23 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-input-icon-left, - .p-input-icon-right { - position: relative; - } - - .p-input-icon-left > i, - .p-input-icon-left > svg, - .p-input-icon-right > i, - .p-input-icon-right > svg { - position: absolute; - top: 50%; - margin-top: -.5rem; - } -} -`; - const classes = { root: ({ props }) => [ { @@ -29,6 +11,5 @@ const classes = { export default BaseStyle.extend({ name: 'iconfield', - css, classes }); diff --git a/components/lib/image/style/ImageStyle.js b/components/lib/image/style/ImageStyle.js index 02dc5a10a..746577174 100644 --- a/components/lib/image/style/ImageStyle.js +++ b/components/lib/image/style/ImageStyle.js @@ -1,81 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-image-mask { - display: flex; - align-items: center; - justify-content: center; - } - - .p-image-preview-container { - position: relative; - display: inline-block; - line-height: 0; - } - - .p-image-preview-indicator { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - opacity: 0; - transition: opacity 0.3s; - border: none; - padding: 0; - } - - .p-image-preview-container:hover > .p-image-preview-indicator { - opacity: 1; - cursor: pointer; - } - - .p-image-preview-container > img { - cursor: pointer; - } - - .p-image-toolbar { - position: absolute; - top: 0; - right: 0; - display: flex; - z-index: 1; - } - - .p-image-action.p-link { - display: flex; - justify-content: center; - align-items: center; - } - - .p-image-action.p-disabled { - pointer-events: auto; - } - - .p-image-preview { - transition: transform 0.15s; - max-width: 100vw; - max-height: 100vh; - } - - .p-image-preview-enter-active { - transition: all 150ms cubic-bezier(0, 0, 0.2, 1); - } - .p-image-preview-leave-active { - transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); - } - .p-image-preview-enter-from, - .p-image-preview-leave-to { - opacity: 0; - transform: scale(0.7); - } -} -`; - const classes = { root: ({ props }) => [ 'p-image p-component', @@ -108,6 +32,5 @@ const classes = { export default BaseStyle.extend({ name: 'image', - css, classes }); diff --git a/components/lib/inlinemessage/style/InlineMessageStyle.js b/components/lib/inlinemessage/style/InlineMessageStyle.js index f4343c0e7..5f440a2c4 100644 --- a/components/lib/inlinemessage/style/InlineMessageStyle.js +++ b/components/lib/inlinemessage/style/InlineMessageStyle.js @@ -1,29 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-inline-message { - display: inline-flex; - align-items: center; - justify-content: center; - vertical-align: top; - } - - .p-inline-message-icon { - flex-shrink: 0; - } - - .p-inline-message-icon-only .p-inline-message-text { - visibility: hidden; - width: 0; - } - - .p-fluid .p-inline-message { - display: flex; - } -} -`; - const classes = { root: ({ props, instance }) => ['p-inline-message p-component p-inline-message-' + props.severity, { 'p-inline-message-icon-only': !instance.$slots.default }], icon: ({ props }) => ['p-inline-message-icon', props.icon], @@ -32,6 +8,5 @@ const classes = { export default BaseStyle.extend({ name: 'inlinemessage', - css, classes }); diff --git a/components/lib/inplace/style/InplaceStyle.js b/components/lib/inplace/style/InplaceStyle.js index f50576880..f2d320fdf 100644 --- a/components/lib/inplace/style/InplaceStyle.js +++ b/components/lib/inplace/style/InplaceStyle.js @@ -1,27 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-inplace .p-inplace-display { - display: inline; - cursor: pointer; - } - - .p-inplace .p-inplace-content { - display: inline; - } - - .p-fluid .p-inplace.p-inplace-closable .p-inplace-content { - display: flex; - } - - .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > .p-inputtext { - flex: 1 1 auto; - width: 1%; - } -} -`; - const classes = { root: ({ props }) => ['p-inplace p-component', { 'p-inplace-closable': props.closable }], display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }], @@ -30,6 +8,5 @@ const classes = { export default BaseStyle.extend({ name: 'inplace', - css, classes }); diff --git a/components/lib/inputgroup/style/InputGroupStyle.js b/components/lib/inputgroup/style/InputGroupStyle.js index 274a8e7db..051f9a5ed 100644 --- a/components/lib/inputgroup/style/InputGroupStyle.js +++ b/components/lib/inputgroup/style/InputGroupStyle.js @@ -1,41 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-inputgroup { - display: flex; - align-items: stretch; - width: 100%; - } - - .p-inputgroup-addon { - display: flex; - align-items: center; - justify-content: center; - } - - .p-inputgroup .p-float-label { - display: flex; - align-items: stretch; - width: 100%; - } - - .p-inputgroup .p-inputtext, - .p-fluid .p-inputgroup .p-inputtext, - .p-inputgroup .p-inputwrapper, - .p-fluid .p-inputgroup .p-input { - flex: 1 1 auto; - width: 1%; - } -} -`; - const classes = { root: 'p-inputgroup' }; export default BaseStyle.extend({ name: 'inputgroup', - css, classes }); diff --git a/components/lib/inputnumber/style/InputNumberStyle.js b/components/lib/inputnumber/style/InputNumberStyle.js index 85f616289..8d987e3a8 100644 --- a/components/lib/inputnumber/style/InputNumberStyle.js +++ b/components/lib/inputnumber/style/InputNumberStyle.js @@ -1,110 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-inputnumber { - display: inline-flex; - } - - .p-inputnumber-button { - display: flex; - align-items: center; - justify-content: center; - flex: 0 0 auto; - } - - .p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label, - .p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label { - display: none; - } - - .p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - padding: 0; - } - - .p-inputnumber-buttons-stacked .p-inputnumber-input { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down { - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-left-radius: 0; - padding: 0; - } - - .p-inputnumber-buttons-stacked .p-inputnumber-button-group { - display: flex; - flex-direction: column; - } - - .p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button { - flex: 1 1 auto; - } - - .p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up { - order: 3; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .p-inputnumber-buttons-horizontal .p-inputnumber-input { - order: 2; - border-radius: 0; - } - - .p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down { - order: 1; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .p-inputnumber-buttons-vertical { - flex-direction: column; - } - - .p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up { - order: 1; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - width: 100%; - } - - .p-inputnumber-buttons-vertical .p-inputnumber-input { - order: 2; - border-radius: 0; - text-align: center; - } - - .p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down { - order: 3; - border-top-left-radius: 0; - border-top-right-radius: 0; - width: 100%; - } - - .p-inputnumber-input { - flex: 1 1 auto; - } - - .p-fluid .p-inputnumber { - width: 100%; - } - - .p-fluid .p-inputnumber .p-inputnumber-input { - width: 1%; - } - - .p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input { - width: 100%; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-inputnumber p-component p-inputwrapper', @@ -140,6 +35,5 @@ const classes = { export default BaseStyle.extend({ name: 'inputnumber', - css, classes }); diff --git a/components/lib/inputswitch/style/InputSwitchStyle.js b/components/lib/inputswitch/style/InputSwitchStyle.js index 7206787cd..eb2991766 100644 --- a/components/lib/inputswitch/style/InputSwitchStyle.js +++ b/components/lib/inputswitch/style/InputSwitchStyle.js @@ -1,33 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-inputswitch { - display: inline-block; - } - - .p-inputswitch-input { - cursor: pointer; - } - - .p-inputswitch-slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - border: 1px solid transparent; - } - - .p-inputswitch-slider:before { - position: absolute; - content: ''; - top: 50%; - } -} -`; - const inlineStyles = { root: { position: 'relative' } }; @@ -47,7 +19,6 @@ const classes = { export default BaseStyle.extend({ name: 'inputswitch', - css, classes, inlineStyles }); diff --git a/components/lib/knob/style/KnobStyle.js b/components/lib/knob/style/KnobStyle.js index 53b8845f8..5a393d4c1 100644 --- a/components/lib/knob/style/KnobStyle.js +++ b/components/lib/knob/style/KnobStyle.js @@ -1,28 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@keyframes dash-frame { - 100% { - stroke-dashoffset: 0; - } -} -@layer primevue { - .p-knob-range { - fill: none; - transition: stroke 0.1s ease-in; - } - .p-knob-value { - animation-name: dash-frame; - animation-fill-mode: forwards; - fill: none; - } - .p-knob-text { - font-size: 1.3rem; - text-align: center; - } -} -`; - const classes = { root: ({ props }) => ['p-knob p-component', { 'p-disabled': props.disabled }], range: 'p-knob-range', @@ -32,6 +9,5 @@ const classes = { export default BaseStyle.extend({ name: 'knob', - css, classes }); diff --git a/components/lib/listbox/style/ListboxStyle.js b/components/lib/listbox/style/ListboxStyle.js index ffd6bf8bf..d1fceb8f4 100644 --- a/components/lib/listbox/style/ListboxStyle.js +++ b/components/lib/listbox/style/ListboxStyle.js @@ -1,43 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-listbox-list-wrapper { - overflow: auto; - } - - .p-listbox-list { - list-style-type: none; - margin: 0; - padding: 0; - } - - .p-listbox-item { - cursor: pointer; - position: relative; - overflow: hidden; - } - - .p-listbox-item-group { - cursor: auto; - } - - .p-listbox-filter-container { - position: relative; - } - - .p-listbox-filter-icon { - position: absolute; - top: 50%; - margin-top: -0.5rem; - } - - .p-listbox-filter { - width: 100%; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-listbox p-component', @@ -66,6 +28,5 @@ const classes = { export default BaseStyle.extend({ name: 'listbox', - css, classes }); diff --git a/components/lib/megamenu/style/MegaMenuStyle.js b/components/lib/megamenu/style/MegaMenuStyle.js index 0963af535..99e7d9c55 100644 --- a/components/lib/megamenu/style/MegaMenuStyle.js +++ b/components/lib/megamenu/style/MegaMenuStyle.js @@ -1,170 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-megamenu { - display: flex; - position: relative; - } - - .p-megamenu-root-list { - margin: 0; - padding: 0; - list-style: none; - } - - .p-megamenu .p-menuitem-link { - cursor: pointer; - display: flex; - align-items: center; - text-decoration: none; - overflow: hidden; - position: relative; - } - - .p-megamenu .p-menuitem-text { - line-height: 1; - } - - .p-megamenu-panel { - display: none; - width: auto; - z-index: 1; - left: 0; - min-width: 100%; - } - - .p-megamenu-panel:not(.p-megamenu-mobile) { - position: absolute; - } - - .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel { - display: block; - } - - .p-megamenu-submenu { - margin: 0; - padding: 0; - list-style: none; - } - - .p-megamenu-button { - display: none; - cursor: pointer; - align-items: center; - justify-content: center; - text-decoration: none; - } - - /* Horizontal */ - .p-megamenu-horizontal { - align-items: center; - } - - .p-megamenu-horizontal .p-megamenu-root-list { - display: flex; - align-items: center; - flex-wrap: wrap; - } - - .p-megamenu-horizontal .p-megamenu-end { - margin-left: auto; - align-self: center; - } - - /* Vertical */ - .p-megamenu-vertical { - flex-direction: column; - } - - .p-megamenu-vertical:not(.p-megamenu-mobile) { - display: inline-flex; - } - - .p-megamenu-vertical .p-megamenu-root-list { - flex-direction: column; - } - - .p-megamenu-vertical:not(.p-megamenu-mobile) .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel { - left: 100%; - top: 0; - } - - .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon { - margin-left: auto; - } - - .p-megamenu-grid { - display: flex; - } - - .p-megamenu-col-2, - .p-megamenu-col-3, - .p-megamenu-col-4, - .p-megamenu-col-6, - .p-megamenu-col-12 { - flex: 0 0 auto; - padding: 0.5rem; - } - - .p-megamenu-col-2 { - width: 16.6667%; - } - - .p-megamenu-col-3 { - width: 25%; - } - - .p-megamenu-col-4 { - width: 33.3333%; - } - - .p-megamenu-col-6 { - width: 50%; - } - - .p-megamenu-col-12 { - width: 100%; - } - - .p-megamenu.p-megamenu-mobile .p-megamenu-button { - display: flex; - } - - .p-megamenu.p-megamenu-mobile .p-megamenu-root-list { - position: absolute; - display: none; - width: 100%; - } - - .p-megamenu.p-megamenu-mobile .p-submenu-list { - width: 100%; - position: static; - box-shadow: none; - border: 0 none; - } - - .p-megamenu.p-megamenu-mobile .p-megamenu-root-list .p-menuitem { - width: 100%; - position: static; - } - - .p-megamenu.p-megamenu-mobile-active .p-megamenu-root-list { - display: flex; - flex-direction: column; - top: 100%; - left: 0; - z-index: 1; - } - - .p-megamenu.p-megamenu-mobile .p-megamenu-grid { - flex-wrap: wrap; - overflow: auto; - max-height: 90%; - } -} -`; - const inlineStyles = { submenu: ({ instance, processedItem }) => ({ display: instance.isItemActive(processedItem) ? 'block' : 'none' }) }; @@ -242,7 +77,6 @@ const classes = { export default BaseStyle.extend({ name: 'megamenu', - css, classes, inlineStyles }); diff --git a/components/lib/menu/style/MenuStyle.js b/components/lib/menu/style/MenuStyle.js index b47cde8e9..a4f8e93f8 100644 --- a/components/lib/menu/style/MenuStyle.js +++ b/components/lib/menu/style/MenuStyle.js @@ -1,28 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-menu ul { - margin: 0; - padding: 0; - list-style: none; - } - - .p-menu .p-menuitem-link { - cursor: pointer; - display: flex; - align-items: center; - text-decoration: none; - overflow: hidden; - position: relative; - } - - .p-menu .p-menuitem-text { - line-height: 1; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-menu p-component', @@ -51,6 +28,5 @@ const classes = { export default BaseStyle.extend({ name: 'menu', - css, classes }); diff --git a/components/lib/menubar/style/MenubarStyle.js b/components/lib/menubar/style/MenubarStyle.js index ab38c4e4b..3ec54488b 100644 --- a/components/lib/menubar/style/MenubarStyle.js +++ b/components/lib/menubar/style/MenubarStyle.js @@ -1,115 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-menubar { - display: flex; - align-items: center; - } - - .p-menubar ul { - margin: 0; - padding: 0; - list-style: none; - } - - .p-menubar .p-menuitem-link { - cursor: pointer; - display: flex; - align-items: center; - text-decoration: none; - overflow: hidden; - position: relative; - } - - .p-menubar .p-menuitem-text { - line-height: 1; - } - - .p-menubar .p-menuitem { - position: relative; - } - - .p-menubar-root-list { - display: flex; - align-items: center; - flex-wrap: wrap; - } - - .p-menubar-root-list > li ul { - display: none; - z-index: 1; - } - - .p-menubar-root-list > .p-menuitem-active > .p-submenu-list { - display: block; - } - - .p-menubar .p-submenu-list { - display: none; - position: absolute; - z-index: 1; - } - - .p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list { - display: block; - left: 100%; - top: 0; - } - - .p-menubar .p-submenu-list .p-menuitem .p-menuitem-content .p-menuitem-link .p-submenu-icon { - margin-left: auto; - } - - .p-menubar .p-menubar-end { - margin-left: auto; - align-self: center; - } - - .p-menubar-button { - display: none; - cursor: pointer; - align-items: center; - justify-content: center; - text-decoration: none; - } - - .p-menubar.p-menubar-mobile { - position: relative; - } - - .p-menubar.p-menubar-mobile .p-menubar-button { - display: flex; - } - - .p-menubar.p-menubar-mobile .p-menubar-root-list { - position: absolute; - display: none; - width: 100%; - } - - .p-menubar.p-menubar-mobile .p-submenu-list { - width: 100%; - position: static; - box-shadow: none; - border: 0 none; - } - - .p-menubar.p-menubar-mobile .p-menubar-root-list .p-menuitem { - width: 100%; - position: static; - } - - .p-menubar.p-menubar-mobile-active .p-menubar-root-list { - display: flex; - flex-direction: column; - top: 100%; - left: 0; - z-index: 1; - } -} -`; - const inlineStyles = { submenu: ({ instance, processedItem }) => ({ display: instance.isItemActive(processedItem) ? 'block' : 'none' }) }; @@ -145,7 +35,6 @@ const classes = { export default BaseStyle.extend({ name: 'menubar', - css, classes, inlineStyles }); diff --git a/components/lib/message/style/MessageStyle.js b/components/lib/message/style/MessageStyle.js index 6c24f7ac1..6a25cde66 100644 --- a/components/lib/message/style/MessageStyle.js +++ b/components/lib/message/style/MessageStyle.js @@ -1,58 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-message-wrapper { - display: flex; - align-items: center; - } - - .p-message-icon { - flex-shrink: 0; - } - - .p-message-close { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - } - - .p-message-close.p-link { - margin-left: auto; - overflow: hidden; - position: relative; - } - - .p-message-enter-from { - opacity: 0; - } - - .p-message-enter-active { - transition: opacity 0.3s; - } - - .p-message.p-message-leave-from { - max-height: 1000px; - } - - .p-message.p-message-leave-to { - max-height: 0; - opacity: 0; - margin: 0; - } - - .p-message-leave-active { - overflow: hidden; - transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.15s; - } - - .p-message-leave-active .p-message-close { - display: none; - } -} -`; - const classes = { root: ({ props }) => 'p-message p-component p-message-' + props.severity, wrapper: 'p-message-wrapper', @@ -64,6 +11,5 @@ const classes = { export default BaseStyle.extend({ name: 'message', - css, classes }); diff --git a/components/lib/metergroup/style/MeterGroupStyle.js b/components/lib/metergroup/style/MeterGroupStyle.js index c1e4798f1..3dd261a5b 100644 --- a/components/lib/metergroup/style/MeterGroupStyle.js +++ b/components/lib/metergroup/style/MeterGroupStyle.js @@ -1,46 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-metergroup { - display: flex; - } - - .p-metergroup-meters { - display: flex; - } - - .p-metergroup-vertical .p-metergroup-meters { - flex-direction: column; - } - - .p-metergroup-labels { - display: flex; - flex-wrap: wrap; - margin: 0; - padding: 0; - list-style-type: none; - } - - .p-metergroup-vertical .p-metergroup-labels { - align-items: start; - } - - .p-metergroup-labels-vertical { - flex-direction: column; - } - - .p-metergroup-label { - display: inline-flex; - align-items: center; - } - - .p-metergroup-label-marker { - display: inline-flex; - } -} -`; - const classes = { root: ({ props }) => [ 'p-metergroup p-component', @@ -66,6 +25,5 @@ const classes = { export default BaseStyle.extend({ name: 'metergroup', - css, classes }); diff --git a/components/lib/multiselect/style/MultiSelectStyle.js b/components/lib/multiselect/style/MultiSelectStyle.js index 891cf4f2c..cb5855bf0 100644 --- a/components/lib/multiselect/style/MultiSelectStyle.js +++ b/components/lib/multiselect/style/MultiSelectStyle.js @@ -1,115 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-multiselect { - display: inline-flex; - cursor: pointer; - user-select: none; - } - - .p-multiselect-trigger { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - } - - .p-multiselect-label-container { - overflow: hidden; - flex: 1 1 auto; - cursor: pointer; - } - - .p-multiselect-label { - display: block; - white-space: nowrap; - cursor: pointer; - overflow: hidden; - text-overflow: ellipsis; - } - - .p-multiselect-label-empty { - overflow: hidden; - visibility: hidden; - } - - .p-multiselect-token { - cursor: default; - display: inline-flex; - align-items: center; - flex: 0 0 auto; - } - - .p-multiselect-token-icon { - cursor: pointer; - } - - .p-multiselect .p-multiselect-panel { - min-width: 100%; - } - - .p-multiselect-items-wrapper { - overflow: auto; - } - - .p-multiselect-items { - margin: 0; - padding: 0; - list-style-type: none; - } - - .p-multiselect-item { - cursor: pointer; - display: flex; - align-items: center; - font-weight: normal; - white-space: nowrap; - position: relative; - overflow: hidden; - } - - .p-multiselect-item-group { - cursor: auto; - } - - .p-multiselect-header { - display: flex; - align-items: center; - justify-content: space-between; - } - - .p-multiselect-filter-container { - position: relative; - flex: 1 1 auto; - } - - .p-multiselect-filter-icon { - position: absolute; - top: 50%; - margin-top: -0.5rem; - } - - .p-multiselect-filter-container .p-inputtext { - width: 100%; - } - - .p-multiselect-close { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - overflow: hidden; - position: relative; - margin-left: auto; - } - - .p-fluid .p-multiselect { - display: flex; - } -} -`; - const inlineStyles = { root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined }) }; @@ -175,7 +65,6 @@ const classes = { export default BaseStyle.extend({ name: 'multiselect', - css, classes, inlineStyles }); diff --git a/components/lib/orderlist/style/OrderListStyle.js b/components/lib/orderlist/style/OrderListStyle.js index 3b3ab80a8..7b8c13fa0 100644 --- a/components/lib/orderlist/style/OrderListStyle.js +++ b/components/lib/orderlist/style/OrderListStyle.js @@ -1,47 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-orderlist { - display: flex; - } - - .p-orderlist-controls { - display: flex; - flex-direction: column; - justify-content: center; - } - - .p-orderlist-list-container { - flex: 1 1 auto; - } - - .p-orderlist-list { - list-style-type: none; - margin: 0; - padding: 0; - overflow: auto; - min-height: 12rem; - max-height: 24rem; - } - - .p-orderlist-item { - cursor: pointer; - overflow: hidden; - position: relative; - } - - .p-orderlist.p-state-disabled .p-orderlist-item, - .p-orderlist.p-state-disabled .p-button { - cursor: default; - } - - .p-orderlist.p-state-disabled .p-orderlist-list { - overflow: hidden; - } -} -`; - const classes = { root: ({ props }) => [ 'p-orderlist p-component', @@ -64,6 +22,5 @@ const classes = { export default BaseStyle.extend({ name: 'orderlist', - css, classes }); diff --git a/components/lib/organizationchart/style/OrganizationChartStyle.js b/components/lib/organizationchart/style/OrganizationChartStyle.js index 3b3f1e0cf..95823b802 100644 --- a/components/lib/organizationchart/style/OrganizationChartStyle.js +++ b/components/lib/organizationchart/style/OrganizationChartStyle.js @@ -1,62 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-organizationchart-table { - border-spacing: 0; - border-collapse: separate; - margin: 0 auto; - } - - .p-organizationchart-table > tbody > tr > td { - text-align: center; - vertical-align: top; - padding: 0 0.75rem; - } - - .p-organizationchart-node-content { - display: inline-block; - position: relative; - } - - .p-organizationchart-node-content .p-node-toggler { - position: absolute; - bottom: -0.75rem; - margin-left: -0.75rem; - z-index: 2; - left: 50%; - user-select: none; - cursor: pointer; - width: 1.5rem; - height: 1.5rem; - text-decoration: none; - } - - .p-organizationchart-node-content .p-node-toggler .p-node-toggler-icon { - position: relative; - top: 0.25rem; - } - - .p-organizationchart-line-down { - margin: 0 auto; - height: 20px; - width: 1px; - } - - .p-organizationchart-line-right { - border-radius: 0px; - } - - .p-organizationchart-line-left { - border-radius: 0; - } - - .p-organizationchart-selectable-node { - cursor: pointer; - } -} -`; - const classes = { root: 'p-organizationchart p-component', table: 'p-organizationchart-table', @@ -72,6 +15,5 @@ const classes = { export default BaseStyle.extend({ name: 'organizationchart', - css, classes }); diff --git a/components/lib/overlaypanel/style/OverlayPanelStyle.js b/components/lib/overlaypanel/style/OverlayPanelStyle.js index 8f10c4aee..9cab24844 100644 --- a/components/lib/overlaypanel/style/OverlayPanelStyle.js +++ b/components/lib/overlaypanel/style/OverlayPanelStyle.js @@ -1,79 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-overlaypanel { - margin-top: 10px; - } - - .p-overlaypanel-flipped { - margin-top: 0; - margin-bottom: 10px; - } - - .p-overlaypanel-close { - display: flex; - justify-content: center; - align-items: center; - overflow: hidden; - position: relative; - } - - /* Animation */ - .p-overlaypanel-enter-from { - opacity: 0; - transform: scaleY(0.8); - } - - .p-overlaypanel-leave-to { - opacity: 0; - } - - .p-overlaypanel-enter-active { - transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); - } - - .p-overlaypanel-leave-active { - transition: opacity 0.1s linear; - } - - .p-overlaypanel:after, - .p-overlaypanel:before { - bottom: 100%; - left: calc(var(--overlayArrowLeft, 0) + 1.25rem); - content: ' '; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - } - - .p-overlaypanel:after { - border-width: 8px; - margin-left: -8px; - } - - .p-overlaypanel:before { - border-width: 10px; - margin-left: -10px; - } - - .p-overlaypanel-flipped:after, - .p-overlaypanel-flipped:before { - bottom: auto; - top: 100%; - } - - .p-overlaypanel.p-overlaypanel-flipped:after { - border-bottom-color: transparent; - } - - .p-overlaypanel.p-overlaypanel-flipped:before { - border-bottom-color: transparent; - } -} -`; - const classes = { root: ({ instance }) => [ 'p-overlaypanel p-component', @@ -88,6 +14,5 @@ const classes = { export default BaseStyle.extend({ name: 'overlaypanel', - css, classes }); diff --git a/components/lib/paginator/style/PaginatorStyle.js b/components/lib/paginator/style/PaginatorStyle.js index 8906e01b7..7df42c32f 100644 --- a/components/lib/paginator/style/PaginatorStyle.js +++ b/components/lib/paginator/style/PaginatorStyle.js @@ -1,49 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-paginator-default { - display: flex; - } - - .p-paginator { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - } - - .p-paginator-left-content { - margin-right: auto; - } - - .p-paginator-right-content { - margin-left: auto; - } - - .p-paginator-page, - .p-paginator-next, - .p-paginator-last, - .p-paginator-first, - .p-paginator-prev, - .p-paginator-current { - cursor: pointer; - display: inline-flex; - align-items: center; - justify-content: center; - line-height: 1; - user-select: none; - overflow: hidden; - position: relative; - } - - .p-paginator-element:focus { - z-index: 1; - position: relative; - } -} -`; - const classes = { paginator: ({ instance, key }) => [ 'p-paginator p-component', @@ -97,6 +53,5 @@ const classes = { export default BaseStyle.extend({ name: 'paginator', - css, classes }); diff --git a/components/lib/panel/style/PanelStyle.js b/components/lib/panel/style/PanelStyle.js index 61c6f75fb..dd65711fc 100644 --- a/components/lib/panel/style/PanelStyle.js +++ b/components/lib/panel/style/PanelStyle.js @@ -1,29 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-panel-header { - display: flex; - justify-content: space-between; - align-items: center; - } - - .p-panel-title { - line-height: 1; - } - - .p-panel-header-icon { - display: inline-flex; - justify-content: center; - align-items: center; - cursor: pointer; - text-decoration: none; - overflow: hidden; - position: relative; - } -} -`; - const classes = { root: ({ props }) => [ 'p-panel p-component', @@ -42,6 +18,5 @@ const classes = { export default BaseStyle.extend({ name: 'panel', - css, classes }); diff --git a/components/lib/panelmenu/style/PanelMenuStyle.js b/components/lib/panelmenu/style/PanelMenuStyle.js index ffeeeebf2..610abcc9f 100644 --- a/components/lib/panelmenu/style/PanelMenuStyle.js +++ b/components/lib/panelmenu/style/PanelMenuStyle.js @@ -1,42 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-panelmenu .p-panelmenu-header-action { - display: flex; - align-items: center; - user-select: none; - cursor: pointer; - position: relative; - text-decoration: none; - } - - .p-panelmenu .p-panelmenu-header-action:focus { - z-index: 1; - } - - .p-panelmenu .p-submenu-list { - margin: 0; - padding: 0; - list-style: none; - } - - .p-panelmenu .p-menuitem-link { - display: flex; - align-items: center; - user-select: none; - cursor: pointer; - text-decoration: none; - position: relative; - overflow: hidden; - } - - .p-panelmenu .p-menuitem-text { - line-height: 1; - } -} -`; - const classes = { root: 'p-panelmenu p-component', panel: 'p-panelmenu-panel', @@ -72,6 +35,5 @@ const classes = { export default BaseStyle.extend({ name: 'panelmenu', - css, classes }); diff --git a/components/lib/password/style/PasswordStyle.js b/components/lib/password/style/PasswordStyle.js index 2e31d6748..e492d66c6 100644 --- a/components/lib/password/style/PasswordStyle.js +++ b/components/lib/password/style/PasswordStyle.js @@ -1,36 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-password { - display: inline-flex; - } - - .p-password .p-password-panel { - min-width: 100%; - } - - .p-password-meter { - height: 10px; - } - - .p-password-strength { - height: 100%; - width: 0; - transition: width 1s ease-in-out; - } - - .p-fluid .p-password { - display: flex; - } - - .p-password-input::-ms-reveal, - .p-password-input::-ms-clear { - display: none; - } -} -`; - const inlineStyles = { root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined }) }; @@ -63,7 +32,6 @@ const classes = { export default BaseStyle.extend({ name: 'password', - css, classes, inlineStyles }); diff --git a/components/lib/picklist/style/PickListStyle.js b/components/lib/picklist/style/PickListStyle.js index 4f0545141..4220829c7 100644 --- a/components/lib/picklist/style/PickListStyle.js +++ b/components/lib/picklist/style/PickListStyle.js @@ -1,43 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-picklist { - display: flex; - } - - .p-picklist-buttons { - display: flex; - flex-direction: column; - justify-content: center; - } - - .p-picklist-list-wrapper { - flex: 1 1 50%; - } - - .p-picklist-list { - list-style-type: none; - margin: 0; - padding: 0; - overflow: auto; - min-height: 12rem; - max-height: 24rem; - } - - .p-picklist-item { - cursor: pointer; - overflow: hidden; - position: relative; - } - - .p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to, - .p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to { - transition: none; - } -} -`; - const classes = { root: ({ props }) => [ 'p-picklist p-component', @@ -65,6 +27,5 @@ const classes = { export default BaseStyle.extend({ name: 'picklist', - css, classes }); diff --git a/components/lib/progressbar/style/ProgressBarStyle.js b/components/lib/progressbar/style/ProgressBarStyle.js index b425d72f5..967f14074 100644 --- a/components/lib/progressbar/style/ProgressBarStyle.js +++ b/components/lib/progressbar/style/ProgressBarStyle.js @@ -1,118 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-progressbar { - position: relative; - overflow: hidden; - } - - .p-progressbar-determinate .p-progressbar-value { - height: 100%; - width: 0%; - position: absolute; - display: none; - border: 0 none; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - } - - .p-progressbar-determinate .p-progressbar-label { - display: inline-flex; - } - - .p-progressbar-determinate .p-progressbar-value-animate { - transition: width 1s ease-in-out; - } - - .p-progressbar-indeterminate .p-progressbar-value::before { - content: ''; - position: absolute; - background-color: inherit; - top: 0; - left: 0; - bottom: 0; - will-change: left, right; - -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - } - - .p-progressbar-indeterminate .p-progressbar-value::after { - content: ''; - position: absolute; - background-color: inherit; - top: 0; - left: 0; - bottom: 0; - will-change: left, right; - -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite; - animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite; - -webkit-animation-delay: 1.15s; - animation-delay: 1.15s; - } - - @-webkit-keyframes p-progressbar-indeterminate-anim { - 0% { - left: -35%; - right: 100%; - } - 60% { - left: 100%; - right: -90%; - } - 100% { - left: 100%; - right: -90%; - } - } - @keyframes p-progressbar-indeterminate-anim { - 0% { - left: -35%; - right: 100%; - } - 60% { - left: 100%; - right: -90%; - } - 100% { - left: 100%; - right: -90%; - } - } - - @-webkit-keyframes p-progressbar-indeterminate-anim-short { - 0% { - left: -200%; - right: 100%; - } - 60% { - left: 107%; - right: -8%; - } - 100% { - left: 107%; - right: -8%; - } - } - @keyframes p-progressbar-indeterminate-anim-short { - 0% { - left: -200%; - right: 100%; - } - 60% { - left: 107%; - right: -8%; - } - 100% { - left: 107%; - right: -8%; - } - } -} -`; - const classes = { root: ({ instance }) => [ 'p-progressbar p-component', @@ -128,6 +15,5 @@ const classes = { export default BaseStyle.extend({ name: 'progressbar', - css, classes }); diff --git a/components/lib/progressspinner/style/ProgressSpinnerStyle.js b/components/lib/progressspinner/style/ProgressSpinnerStyle.js index 10614e24d..2b3f10e1e 100644 --- a/components/lib/progressspinner/style/ProgressSpinnerStyle.js +++ b/components/lib/progressspinner/style/ProgressSpinnerStyle.js @@ -1,35 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-progress-spinner { - position: relative; - margin: 0 auto; - width: 100px; - height: 100px; - display: inline-block; - } - - .p-progress-spinner::before { - content: ''; - display: block; - padding-top: 100%; - } - - .p-progress-spinner-svg { - height: 100%; - transform-origin: center center; - width: 100%; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: auto; - } -} -`; - const classes = { root: 'p-progress-spinner', spinner: 'p-progress-spinner-svg', @@ -38,6 +8,5 @@ const classes = { export default BaseStyle.extend({ name: 'progressspinner', - css, classes }); diff --git a/components/lib/radiobutton/style/RadioButtonStyle.js b/components/lib/radiobutton/style/RadioButtonStyle.js index 4ca7ad922..40a39d257 100644 --- a/components/lib/radiobutton/style/RadioButtonStyle.js +++ b/components/lib/radiobutton/style/RadioButtonStyle.js @@ -1,39 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-radiobutton { - position: relative; - display: inline-flex; - user-select: none; - vertical-align: bottom; - } - - .p-radiobutton-input { - cursor: pointer; - } - - .p-radiobutton-box { - display: flex; - justify-content: center; - align-items: center; - } - - .p-radiobutton-icon { - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - transform: translateZ(0) scale(.1); - border-radius: 50%; - visibility: hidden; - } - - .p-radiobutton.p-highlight .p-radiobutton-icon { - transform: translateZ(0) scale(1.0, 1.0); - visibility: visible; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-radiobutton p-component', @@ -51,6 +17,5 @@ const classes = { export default BaseStyle.extend({ name: 'radiobutton', - css, classes }); diff --git a/components/lib/rating/style/RatingStyle.js b/components/lib/rating/style/RatingStyle.js index b003382b5..e6178a4a7 100644 --- a/components/lib/rating/style/RatingStyle.js +++ b/components/lib/rating/style/RatingStyle.js @@ -1,25 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-rating { - position: relative; - display: flex; - align-items: center; - } - - .p-rating-item { - display: inline-flex; - align-items: center; - cursor: pointer; - } - - .p-rating.p-readonly .p-rating-item { - cursor: default; - } -} -`; - const classes = { root: ({ props }) => [ 'p-rating', @@ -48,6 +28,5 @@ const classes = { export default BaseStyle.extend({ name: 'rating', - css, classes }); diff --git a/components/lib/ripple/style/RippleStyle.js b/components/lib/ripple/style/RippleStyle.js index dcd29aec3..b7de684f9 100644 --- a/components/lib/ripple/style/RippleStyle.js +++ b/components/lib/ripple/style/RippleStyle.js @@ -1,44 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@keyframes ripple { - 100% { - opacity: 0; - transform: scale(2.5); - } -} - -@layer primevue { - .p-ripple { - overflow: hidden; - position: relative; - } - - .p-ink { - display: block; - position: absolute; - background: rgba(255, 255, 255, 0.5); - border-radius: 100%; - transform: scale(0); - pointer-events: none; - } - - .p-ink-active { - animation: ripple 0.4s linear; - } - - .p-ripple-disabled .p-ink { - display: none; - } -} -`; - const classes = { root: 'p-ink' }; export default BaseStyle.extend({ name: 'ripple', - css, classes }); diff --git a/components/lib/scrollpanel/style/ScrollPanelStyle.js b/components/lib/scrollpanel/style/ScrollPanelStyle.js index a979cbf59..b2fc7784a 100644 --- a/components/lib/scrollpanel/style/ScrollPanelStyle.js +++ b/components/lib/scrollpanel/style/ScrollPanelStyle.js @@ -1,65 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-scrollpanel-wrapper { - overflow: hidden; - width: 100%; - height: 100%; - position: relative; - z-index: 1; - float: left; - } - - .p-scrollpanel-content { - height: calc(100% + 18px); - width: calc(100% + 18px); - padding: 0 18px 18px 0; - position: relative; - overflow: auto; - box-sizing: border-box; - scrollbar-width: none; - } - - .p-scrollpanel-content::-webkit-scrollbar { - display: none; - } - - .p-scrollpanel-bar { - position: relative; - background: #c1c1c1; - border-radius: 3px; - z-index: 2; - cursor: pointer; - opacity: 0; - transition: opacity 0.25s linear; - } - - .p-scrollpanel-bar-y { - width: 9px; - top: 0; - } - - .p-scrollpanel-bar-x { - height: 9px; - bottom: 0; - } - - .p-scrollpanel-hidden { - visibility: hidden; - } - - .p-scrollpanel:hover .p-scrollpanel-bar, - .p-scrollpanel:active .p-scrollpanel-bar { - opacity: 1; - } - - .p-scrollpanel-grabbed { - user-select: none; - } -} -`; - const classes = { root: 'p-scrollpanel p-component', wrapper: 'p-scrollpanel-wrapper', @@ -70,6 +10,5 @@ const classes = { export default BaseStyle.extend({ name: 'scrollpanel', - css, classes }); diff --git a/components/lib/scrolltop/style/ScrollTopStyle.js b/components/lib/scrolltop/style/ScrollTopStyle.js index fafadfcf8..8ce06d3ac 100644 --- a/components/lib/scrolltop/style/ScrollTopStyle.js +++ b/components/lib/scrolltop/style/ScrollTopStyle.js @@ -1,42 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-scrolltop { - position: fixed; - bottom: 20px; - right: 20px; - display: flex; - align-items: center; - justify-content: center; - } - - .p-scrolltop-sticky { - position: sticky; - } - - .p-scrolltop-sticky.p-link { - margin-left: auto; - } - - .p-scrolltop-enter-from { - opacity: 0; - } - - .p-scrolltop-enter-active { - transition: opacity 0.15s; - } - - .p-scrolltop.p-scrolltop-leave-to { - opacity: 0; - } - - .p-scrolltop-leave-active { - transition: opacity 0.15s; - } -} -`; - const classes = { root: ({ props }) => ['p-scrolltop p-link p-component', { 'p-scrolltop-sticky': props.target !== 'window' }], icon: 'p-scrolltop-icon' @@ -44,6 +7,5 @@ const classes = { export default BaseStyle.extend({ name: 'scrolltop', - css, classes }); diff --git a/components/lib/sidebar/style/SidebarStyle.js b/components/lib/sidebar/style/SidebarStyle.js index 3a8700b05..9fd065fdb 100644 --- a/components/lib/sidebar/style/SidebarStyle.js +++ b/components/lib/sidebar/style/SidebarStyle.js @@ -1,158 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-sidebar-mask { - display: none; - pointer-events: none; - background-color: transparent; - transition-property: background-color; - } - - .p-sidebar-mask.p-component-overlay { - pointer-events: auto; - } - - .p-sidebar-visible { - display: flex; - } - - .p-sidebar { - display: flex; - flex-direction: column; - pointer-events: auto; - transform: translate3d(0px, 0px, 0px); - position: relative; - transition: transform 0.3s; - } - - .p-sidebar-content { - overflow-y: auto; - flex-grow: 1; - } - - .p-sidebar-header { - display: flex; - align-items: center; - justify-content: space-between; - flex-shrink: 0; - } - - .p-sidebar-icon { - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - position: relative; - } - - .p-sidebar-full .p-sidebar { - transition: none; - transform: none; - width: 100vw !important; - height: 100vh !important; - max-height: 100%; - top: 0px !important; - left: 0px !important; - } - - /* Animation */ - /* Center */ - .p-sidebar-left .p-sidebar-enter-from, - .p-sidebar-left .p-sidebar-leave-to { - transform: translateX(-100%); - } - .p-sidebar-right .p-sidebar-enter-from, - .p-sidebar-right .p-sidebar-leave-to { - transform: translateX(100%); - } - .p-sidebar-top .p-sidebar-enter-from, - .p-sidebar-top .p-sidebar-leave-to { - transform: translateY(-100%); - } - .p-sidebar-bottom .p-sidebar-enter-from, - .p-sidebar-bottom .p-sidebar-leave-to { - transform: translateY(100%); - } - .p-sidebar-full .p-sidebar-enter-from, - .p-sidebar-full .p-sidebar-leave-to { - opacity: 0; - } - .p-sidebar-full .p-sidebar-enter-active, - .p-sidebar-full .p-sidebar-leave-active { - transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); - } - - /* Size */ - .p-sidebar-left .p-sidebar { - width: 20rem; - height: 100%; - } - - .p-sidebar-right .p-sidebar { - width: 20rem; - height: 100%; - } - - .p-sidebar-top .p-sidebar { - height: 10rem; - width: 100%; - } - - .p-sidebar-bottom .p-sidebar { - height: 10rem; - width: 100%; - } - - .p-sidebar-left .p-sidebar-sm, - .p-sidebar-right .p-sidebar-sm { - width: 20rem; - } - - .p-sidebar-left .p-sidebar-md, - .p-sidebar-right .p-sidebar-md { - width: 40rem; - } - - .p-sidebar-left .p-sidebar-lg, - .p-sidebar-right .p-sidebar-lg { - width: 60rem; - } - - .p-sidebar-top .p-sidebar-sm, - .p-sidebar-bottom .p-sidebar-sm { - height: 10rem; - } - - .p-sidebar-top .p-sidebar-md, - .p-sidebar-bottom .p-sidebar-md { - height: 20rem; - } - - .p-sidebar-top .p-sidebar-lg, - .p-sidebar-bottom .p-sidebar-lg { - height: 30rem; - } - - .p-sidebar-left .p-sidebar-content, - .p-sidebar-right .p-sidebar-content, - .p-sidebar-top .p-sidebar-content, - .p-sidebar-bottom .p-sidebar-content { - width: 100%; - height: 100%; - } - - @media screen and (max-width: 64em) { - .p-sidebar-left .p-sidebar-lg, - .p-sidebar-left .p-sidebar-md, - .p-sidebar-right .p-sidebar-lg, - .p-sidebar-right .p-sidebar-md { - width: 20rem; - } - } -} -`; - const inlineStyles = { mask: ({ position }) => ({ position: 'fixed', @@ -198,7 +45,6 @@ const classes = { export default BaseStyle.extend({ name: 'sidebar', - css, classes, inlineStyles }); diff --git a/components/lib/skeleton/style/SkeletonStyle.js b/components/lib/skeleton/style/SkeletonStyle.js index 07eb4894d..b9336c2e5 100644 --- a/components/lib/skeleton/style/SkeletonStyle.js +++ b/components/lib/skeleton/style/SkeletonStyle.js @@ -1,42 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-skeleton { - overflow: hidden; - } - - .p-skeleton::after { - content: ''; - animation: p-skeleton-animation 1.2s infinite; - height: 100%; - left: 0; - position: absolute; - right: 0; - top: 0; - transform: translateX(-100%); - z-index: 1; - } - - .p-skeleton.p-skeleton-circle { - border-radius: 50%; - } - - .p-skeleton-none::after { - animation: none; - } - - @keyframes p-skeleton-animation { - from { - transform: translateX(-100%); - } - to { - transform: translateX(100%); - } - } -} -`; - const inlineStyles = { root: { position: 'relative' } }; @@ -53,7 +16,6 @@ const classes = { export default BaseStyle.extend({ name: 'skeleton', - css, classes, inlineStyles }); diff --git a/components/lib/slider/style/SliderStyle.js b/components/lib/slider/style/SliderStyle.js index a1b5ba30e..c065d7c3e 100644 --- a/components/lib/slider/style/SliderStyle.js +++ b/components/lib/slider/style/SliderStyle.js @@ -1,47 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-slider { - position: relative; - } - - .p-slider .p-slider-handle { - cursor: grab; - touch-action: none; - display: block; - } - - .p-slider-range { - display: block; - } - - .p-slider-horizontal .p-slider-range { - top: 0; - left: 0; - height: 100%; - } - - .p-slider-horizontal .p-slider-handle { - top: 50%; - } - - .p-slider-vertical { - height: 100px; - } - - .p-slider-vertical .p-slider-handle { - left: 50%; - } - - .p-slider-vertical .p-slider-range { - bottom: 0; - left: 0; - width: 100%; - } -} -`; - const inlineStyles = { handle: { position: 'absolute' }, range: { position: 'absolute' } @@ -62,7 +20,6 @@ const classes = { export default BaseStyle.extend({ name: 'slider', - css, classes, inlineStyles }); diff --git a/components/lib/speeddial/style/SpeedDialStyle.js b/components/lib/speeddial/style/SpeedDialStyle.js index c27ac5603..3d65d5ad7 100644 --- a/components/lib/speeddial/style/SpeedDialStyle.js +++ b/components/lib/speeddial/style/SpeedDialStyle.js @@ -1,86 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-speeddial { - position: absolute; - display: flex; - } - - .p-speeddial-button { - z-index: 1; - } - - .p-speeddial-list { - margin: 0; - padding: 0; - list-style: none; - display: flex; - align-items: center; - justify-content: center; - transition: top 0s linear 0.2s; - pointer-events: none; - z-index: 2; - } - - .p-speeddial-item { - transform: scale(0); - opacity: 0; - transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s; - will-change: transform; - } - - .p-speeddial-action { - display: flex; - align-items: center; - justify-content: center; - border-radius: 50%; - position: relative; - overflow: hidden; - } - - .p-speeddial-circle .p-speeddial-item, - .p-speeddial-semi-circle .p-speeddial-item, - .p-speeddial-quarter-circle .p-speeddial-item { - position: absolute; - } - - .p-speeddial-rotate { - transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; - will-change: transform; - } - - .p-speeddial-mask { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - opacity: 0; - transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1); - } - - .p-speeddial-mask-visible { - pointer-events: none; - opacity: 1; - transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); - } - - .p-speeddial-opened .p-speeddial-list { - pointer-events: auto; - } - - .p-speeddial-opened .p-speeddial-item { - transform: scale(1); - opacity: 1; - } - - .p-speeddial-opened .p-speeddial-rotate { - transform: rotate(45deg); - } -} -`; - /* Direction */ const inlineStyles = { root: ({ props }) => ({ @@ -132,7 +51,6 @@ const classes = { export default BaseStyle.extend({ name: 'speeddial', - css, classes, inlineStyles }); diff --git a/components/lib/splitbutton/style/SplitButtonStyle.js b/components/lib/splitbutton/style/SplitButtonStyle.js index 20f1e6a4e..6be1aa9fd 100644 --- a/components/lib/splitbutton/style/SplitButtonStyle.js +++ b/components/lib/splitbutton/style/SplitButtonStyle.js @@ -1,42 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-splitbutton { - display: inline-flex; - position: relative; - } - - .p-splitbutton .p-splitbutton-defaultbutton, - .p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button, - .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button, - .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button-outlined.p-button:hover { - flex: 1 1 auto; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-right: 0 none; - } - - .p-splitbutton-menubutton, - .p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button, - .p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button { - display: flex; - align-items: center; - justify-content: center; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .p-splitbutton .p-menu { - min-width: 100%; - } - - .p-fluid .p-splitbutton { - display: flex; - } -} -`; - const classes = { root: ({ props }) => [ 'p-splitbutton p-component', @@ -55,6 +18,5 @@ const classes = { export default BaseStyle.extend({ name: 'splitbutton', - css, classes }); diff --git a/components/lib/splitter/style/SplitterStyle.js b/components/lib/splitter/style/SplitterStyle.js index d541f0fd8..720af4721 100644 --- a/components/lib/splitter/style/SplitterStyle.js +++ b/components/lib/splitter/style/SplitterStyle.js @@ -1,55 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-splitter { - display: flex; - flex-wrap: nowrap; - } - - .p-splitter-vertical { - flex-direction: column; - } - - .p-splitter-gutter { - flex-grow: 0; - flex-shrink: 0; - display: flex; - align-items: center; - justify-content: center; - cursor: col-resize; - } - - .p-splitter-horizontal.p-splitter-resizing { - cursor: col-resize; - user-select: none; - } - - .p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle { - height: 24px; - width: 100%; - } - - .p-splitter-horizontal > .p-splitter-gutter { - cursor: col-resize; - } - - .p-splitter-vertical.p-splitter-resizing { - cursor: row-resize; - user-select: none; - } - - .p-splitter-vertical > .p-splitter-gutter { - cursor: row-resize; - } - - .p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle { - width: 24px; - height: 100%; - } -} -`; - const classes = { root: ({ props }) => ['p-splitter p-component', 'p-splitter-' + props.layout], gutter: 'p-splitter-gutter', @@ -62,7 +12,6 @@ const inlineStyles = { export default BaseStyle.extend({ name: 'splitter', - css, classes, inlineStyles }); diff --git a/components/lib/splitterpanel/style/SplitterPanelStyle.js b/components/lib/splitterpanel/style/SplitterPanelStyle.js index 4a8bd624c..99c929052 100644 --- a/components/lib/splitterpanel/style/SplitterPanelStyle.js +++ b/components/lib/splitterpanel/style/SplitterPanelStyle.js @@ -1,29 +1,10 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-splitter-panel { - flex-grow: 1; - overflow: hidden; - } - - .p-splitter-panel-nested { - display: flex; - } - - .p-splitter-panel .p-splitter { - flex-grow: 1; - border: 0 none; - } -} -`; - const classes = { root: ({ instance }) => ['p-splitter-panel', { 'p-splitter-panel-nested': instance.isNested }] }; export default BaseStyle.extend({ name: 'splitterpanel', - css, classes }); diff --git a/components/lib/steps/style/StepsStyle.js b/components/lib/steps/style/StepsStyle.js index 5eeff0b6c..ee4cc0c6b 100644 --- a/components/lib/steps/style/StepsStyle.js +++ b/components/lib/steps/style/StepsStyle.js @@ -1,62 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-steps { - position: relative; - } - - .p-steps .p-steps-list { - padding: 0; - margin: 0; - list-style-type: none; - display: flex; - } - - .p-steps-item { - position: relative; - display: flex; - justify-content: center; - flex: 1 1 auto; - overflow: hidden; - } - - .p-steps-item .p-menuitem-link { - display: inline-flex; - flex-direction: column; - align-items: center; - overflow: hidden; - text-decoration: none; - cursor: pointer; - } - - .p-steps.p-steps-readonly .p-steps-item { - cursor: auto; - } - - .p-steps-item.p-steps-current .p-menuitem-link { - cursor: default; - } - - .p-steps-title { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 100%; - } - - .p-steps-number { - display: flex; - align-items: center; - justify-content: center; - } - - .p-steps-title { - display: block; - } -} -`; - const classes = { root: ({ props }) => ['p-steps p-component', { 'p-readonly': props.readonly }], menu: 'p-steps-list', @@ -74,6 +17,5 @@ const classes = { export default BaseStyle.extend({ name: 'steps', - css, classes }); diff --git a/components/lib/tabmenu/style/TabMenuStyle.js b/components/lib/tabmenu/style/TabMenuStyle.js index ec420d51a..d43d0300a 100644 --- a/components/lib/tabmenu/style/TabMenuStyle.js +++ b/components/lib/tabmenu/style/TabMenuStyle.js @@ -1,49 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-tabmenu { - overflow-x: auto; - } - - .p-tabmenu-nav { - display: flex; - margin: 0; - padding: 0; - list-style-type: none; - flex-wrap: nowrap; - } - - .p-tabmenu-nav a { - cursor: pointer; - user-select: none; - display: flex; - align-items: center; - position: relative; - text-decoration: none; - text-decoration: none; - overflow: hidden; - } - - .p-tabmenu-nav a:focus { - z-index: 1; - } - - .p-tabmenu-nav .p-menuitem-text { - line-height: 1; - } - - .p-tabmenu-ink-bar { - display: none; - z-index: 1; - } - - .p-tabmenu::-webkit-scrollbar { - display: none; - } -} -`; - const classes = { root: 'p-tabmenu p-component', menu: 'p-tabmenu-nav p-reset', @@ -62,6 +18,5 @@ const classes = { export default BaseStyle.extend({ name: 'tabmenu', - css, classes }); diff --git a/components/lib/tabview/style/TabViewStyle.js b/components/lib/tabview/style/TabViewStyle.js index f0cada1a3..96a8d6cbb 100644 --- a/components/lib/tabview/style/TabViewStyle.js +++ b/components/lib/tabview/style/TabViewStyle.js @@ -1,79 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-tabview-nav-container { - position: relative; - } - - .p-tabview-scrollable .p-tabview-nav-container { - overflow: hidden; - } - - .p-tabview-nav-content { - overflow-x: auto; - overflow-y: hidden; - scroll-behavior: smooth; - scrollbar-width: none; - overscroll-behavior: contain auto; - } - - .p-tabview-nav { - display: flex; - margin: 0; - padding: 0; - list-style-type: none; - flex: 1 1 auto; - } - - .p-tabview-header-action { - cursor: pointer; - user-select: none; - display: flex; - align-items: center; - position: relative; - text-decoration: none; - overflow: hidden; - } - - .p-tabview-ink-bar { - display: none; - z-index: 1; - } - - .p-tabview-header-action:focus { - z-index: 1; - } - - .p-tabview-title { - line-height: 1; - white-space: nowrap; - } - - .p-tabview-nav-btn { - position: absolute; - top: 0; - z-index: 2; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - } - - .p-tabview-nav-prev { - left: 0; - } - - .p-tabview-nav-next { - right: 0; - } - - .p-tabview-nav-content::-webkit-scrollbar { - display: none; - } -} -`; - const classes = { root: ({ props }) => [ 'p-tabview p-component', @@ -105,6 +31,5 @@ const classes = { export default BaseStyle.extend({ name: 'tabview', - css, classes }); diff --git a/components/lib/tag/style/TagStyle.js b/components/lib/tag/style/TagStyle.js index 54dff4d47..5ee6cf84f 100644 --- a/components/lib/tag/style/TagStyle.js +++ b/components/lib/tag/style/TagStyle.js @@ -1,25 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-tag { - display: inline-flex; - align-items: center; - justify-content: center; - } - - .p-tag-icon, - .p-tag-value, - .p-tag-icon.pi { - line-height: 1.5; - } - - .p-tag.p-tag-rounded { - border-radius: 10rem; - } -} -`; - const classes = { root: ({ props }) => [ 'p-tag p-component', @@ -39,6 +19,5 @@ const classes = { export default BaseStyle.extend({ name: 'tag', - css, classes }); diff --git a/components/lib/terminal/style/TerminalStyle.js b/components/lib/terminal/style/TerminalStyle.js index 5743848a1..ba0eb6a41 100644 --- a/components/lib/terminal/style/TerminalStyle.js +++ b/components/lib/terminal/style/TerminalStyle.js @@ -1,32 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-terminal { - height: 18rem; - overflow: auto; - } - - .p-terminal-prompt-container { - display: flex; - align-items: center; - } - - .p-terminal-input { - flex: 1 1 auto; - border: 0 none; - background-color: transparent; - color: inherit; - padding: 0; - outline: 0 none; - } - - .p-terminal-input::-ms-clear { - display: none; - } -} -`; - const classes = { root: 'p-terminal p-component', content: 'p-terminal-content', @@ -39,6 +12,5 @@ const classes = { export default BaseStyle.extend({ name: 'terminal', - css, classes }); diff --git a/components/lib/textarea/style/TextareaStyle.js b/components/lib/textarea/style/TextareaStyle.js index cfda5fd9e..fcb9ebb7c 100644 --- a/components/lib/textarea/style/TextareaStyle.js +++ b/components/lib/textarea/style/TextareaStyle.js @@ -1,18 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-inputtextarea-resizable { - overflow: hidden; - resize: none; - } - - .p-fluid .p-inputtextarea { - width: 100%; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-inputtextarea p-inputtext p-component', @@ -27,6 +14,5 @@ const classes = { export default BaseStyle.extend({ name: 'textarea', - css, classes }); diff --git a/components/lib/tieredmenu/style/TieredMenuStyle.js b/components/lib/tieredmenu/style/TieredMenuStyle.js index 20ddffba6..a9423ca4a 100644 --- a/components/lib/tieredmenu/style/TieredMenuStyle.js +++ b/components/lib/tieredmenu/style/TieredMenuStyle.js @@ -1,58 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-tieredmenu ul { - margin: 0; - padding: 0; - list-style: none; - } - - .p-tieredmenu .p-submenu-list { - position: absolute; - min-width: 100%; - z-index: 1; - display: none; - } - - .p-tieredmenu .p-menuitem-link { - cursor: pointer; - display: flex; - align-items: center; - text-decoration: none; - overflow: hidden; - position: relative; - } - - .p-tieredmenu .p-menuitem-text { - line-height: 1; - } - - .p-tieredmenu .p-menuitem { - position: relative; - } - - .p-tieredmenu .p-menuitem-link .p-submenu-icon { - margin-left: auto; - } - - .p-tieredmenu .p-menuitem-active > .p-submenu-list { - display: block; - left: 100%; - top: 0; - } - - .p-tieredmenu-enter-from, - .p-tieredmenu-leave-active { - opacity: 0; - } - - .p-tieredmenu-enter-active { - transition: opacity 250ms; - } -} -`; - const inlineStyles = { submenu: ({ instance, processedItem }) => ({ display: instance.isItemActive(processedItem) ? 'block' : 'none' }) }; @@ -87,7 +34,6 @@ const classes = { export default BaseStyle.extend({ name: 'tieredmenu', - css, classes, inlineStyles }); diff --git a/components/lib/timeline/style/TimelineStyle.js b/components/lib/timeline/style/TimelineStyle.js index d5a6ad1a3..b297e6536 100644 --- a/components/lib/timeline/style/TimelineStyle.js +++ b/components/lib/timeline/style/TimelineStyle.js @@ -1,120 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-timeline { - display: flex; - flex-grow: 1; - flex-direction: column; - } - - .p-timeline-left .p-timeline-event-opposite { - text-align: right; - } - - .p-timeline-left .p-timeline-event-content { - text-align: left; - } - - .p-timeline-right .p-timeline-event { - flex-direction: row-reverse; - } - - .p-timeline-right .p-timeline-event-opposite { - text-align: left; - } - - .p-timeline-right .p-timeline-event-content { - text-align: right; - } - - .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) { - flex-direction: row-reverse; - } - - .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite { - text-align: right; - } - - .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content { - text-align: left; - } - - .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite { - text-align: left; - } - - .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content { - text-align: right; - } - - .p-timeline-event { - display: flex; - position: relative; - min-height: 70px; - } - - .p-timeline-event:last-child { - min-height: 0; - } - - .p-timeline-event-opposite { - flex: 1; - padding: 0 1rem; - } - - .p-timeline-event-content { - flex: 1; - padding: 0 1rem; - } - - .p-timeline-event-separator { - flex: 0; - display: flex; - align-items: center; - flex-direction: column; - } - - .p-timeline-event-marker { - display: flex; - align-self: baseline; - } - - .p-timeline-event-connector { - flex-grow: 1; - } - - .p-timeline-horizontal { - flex-direction: row; - } - - .p-timeline-horizontal .p-timeline-event { - flex-direction: column; - flex: 1; - } - - .p-timeline-horizontal .p-timeline-event:last-child { - flex: 0; - } - - .p-timeline-horizontal .p-timeline-event-separator { - flex-direction: row; - } - - .p-timeline-horizontal .p-timeline-event-connector { - width: 100%; - } - - .p-timeline-bottom .p-timeline-event { - flex-direction: column-reverse; - } - - .p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) { - flex-direction: column-reverse; - } -} -`; - const classes = { root: ({ props }) => ['p-timeline p-component', 'p-timeline-' + props.align, 'p-timeline-' + props.layout], event: 'p-timeline-event', @@ -127,6 +12,5 @@ const classes = { export default BaseStyle.extend({ name: 'timeline', - css, classes }); diff --git a/components/lib/toast/style/ToastStyle.js b/components/lib/toast/style/ToastStyle.js index dbbb8a04f..6e2831c2f 100644 --- a/components/lib/toast/style/ToastStyle.js +++ b/components/lib/toast/style/ToastStyle.js @@ -1,82 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-toast { - width: 25rem; - white-space: pre-line; - word-break: break-word; - } - - .p-toast-message-icon { - flex-shrink: 0; - } - - .p-toast-message-content { - display: flex; - align-items: flex-start; - } - - .p-toast-message-text { - flex: 1 1 auto; - } - - .p-toast-top-center { - transform: translateX(-50%); - } - - .p-toast-bottom-center { - transform: translateX(-50%); - } - - .p-toast-center { - min-width: 20vw; - transform: translate(-50%, -50%); - } - - .p-toast-icon-close { - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - position: relative; - } - - .p-toast-icon-close.p-link { - cursor: pointer; - } - - /* Animations */ - .p-toast-message-enter-from { - opacity: 0; - -webkit-transform: translateY(50%); - -ms-transform: translateY(50%); - transform: translateY(50%); - } - - .p-toast-message-leave-from { - max-height: 1000px; - } - - .p-toast .p-toast-message.p-toast-message-leave-to { - max-height: 0; - opacity: 0; - margin-bottom: 0; - overflow: hidden; - } - - .p-toast-message-enter-active { - -webkit-transition: transform 0.3s, opacity 0.3s; - transition: transform 0.3s, opacity 0.3s; - } - - .p-toast-message-leave-active { - -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s; - transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s; - } -} -`; - // Position const inlineStyles = { root: ({ position }) => ({ @@ -125,7 +48,6 @@ const classes = { export default BaseStyle.extend({ name: 'toast', - css, classes, inlineStyles }); diff --git a/components/lib/togglebutton/style/ToggleButtonStyle.js b/components/lib/togglebutton/style/ToggleButtonStyle.js index 8b525426d..db2645488 100644 --- a/components/lib/togglebutton/style/ToggleButtonStyle.js +++ b/components/lib/togglebutton/style/ToggleButtonStyle.js @@ -1,24 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-togglebutton { - position: relative; - display: inline-flex; - user-select: none; - vertical-align: bottom; - } - - .p-togglebutton-input { - cursor: pointer; - } - - .p-togglebutton .p-button { - flex: 1 1 auto; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-togglebutton p-component', @@ -47,6 +28,5 @@ const classes = { export default BaseStyle.extend({ name: 'togglebutton', - css, classes }); diff --git a/components/lib/toolbar/style/ToolbarStyle.js b/components/lib/toolbar/style/ToolbarStyle.js index edfea7384..8de328135 100644 --- a/components/lib/toolbar/style/ToolbarStyle.js +++ b/components/lib/toolbar/style/ToolbarStyle.js @@ -1,29 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-toolbar { - display: flex; - align-items: center; - justify-content: space-between; - flex-wrap: wrap; - } - - .p-toolbar-group-start, - .p-toolbar-group-center, - .p-toolbar-group-end { - display: flex; - align-items: center; - } - - .p-toolbar-group-left, - .p-toolbar-group-right { - display: flex; - align-items: center; - } -} -`; - const classes = { root: 'p-toolbar p-component', start: 'p-toolbar-group-start p-toolbar-group-left', @@ -33,6 +9,5 @@ const classes = { export default BaseStyle.extend({ name: 'toolbar', - css, classes }); diff --git a/components/lib/tooltip/style/TooltipStyle.js b/components/lib/tooltip/style/TooltipStyle.js index d1293800f..e09e00e1a 100644 --- a/components/lib/tooltip/style/TooltipStyle.js +++ b/components/lib/tooltip/style/TooltipStyle.js @@ -1,64 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-tooltip { - position:absolute; - display:none; - padding: .25em .5rem; - max-width: 12.5rem; - } - - .p-tooltip.p-tooltip-right, - .p-tooltip.p-tooltip-left { - padding: 0 .25rem; - } - - .p-tooltip.p-tooltip-top, - .p-tooltip.p-tooltip-bottom { - padding:.25em 0; - } - - .p-tooltip .p-tooltip-text { - white-space: pre-line; - word-break: break-word; - } - - .p-tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - scale: 2; - } - - .p-tooltip-right .p-tooltip-arrow { - margin-top: -.25rem; - border-width: .25em .25em .25em 0; - } - - .p-tooltip-left .p-tooltip-arrow { - margin-top: -.25rem; - border-width: .25em 0 .25em .25rem; - } - - .p-tooltip.p-tooltip-top { - padding: .25em 0; - } - - .p-tooltip-top .p-tooltip-arrow { - margin-left: -.25rem; - border-width: .25em .25em 0; - } - - .p-tooltip-bottom .p-tooltip-arrow { - margin-left: -.25rem; - border-width: 0 .25em .25rem; - } -} -`; - const classes = { root: 'p-tooltip p-component', arrow: 'p-tooltip-arrow', @@ -67,6 +8,5 @@ const classes = { export default BaseStyle.extend({ name: 'tooltip', - css, classes }); diff --git a/components/lib/tree/style/TreeStyle.js b/components/lib/tree/style/TreeStyle.js index b2e0068bd..e7a63a297 100644 --- a/components/lib/tree/style/TreeStyle.js +++ b/components/lib/tree/style/TreeStyle.js @@ -1,91 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-tree-container { - margin: 0; - padding: 0; - list-style-type: none; - overflow: auto; - } - - .p-treenode-children { - margin: 0; - padding: 0; - list-style-type: none; - } - - .p-tree-wrapper { - overflow: auto; - } - - .p-treenode-selectable { - cursor: pointer; - user-select: none; - } - - .p-tree-toggler { - cursor: pointer; - user-select: none; - display: inline-flex; - align-items: center; - justify-content: center; - overflow: hidden; - position: relative; - flex-shrink: 0; - } - - .p-treenode-leaf > .p-treenode-content .p-tree-toggler { - visibility: hidden; - } - - .p-treenode-content { - display: flex; - align-items: center; - } - - .p-tree-filter { - width: 100%; - } - - .p-tree-filter-container { - position: relative; - display: block; - width: 100%; - } - - .p-tree-filter-icon { - position: absolute; - top: 50%; - margin-top: -0.5rem; - } - - .p-tree-loading { - position: relative; - min-height: 4rem; - } - - .p-tree .p-tree-loading-overlay { - position: absolute; - z-index: 1; - display: flex; - align-items: center; - justify-content: center; - } - - .p-tree-flex-scrollable { - display: flex; - flex: 1; - height: 100%; - flex-direction: column; - } - - .p-tree-flex-scrollable .p-tree-wrapper { - flex: 1; - } -} -`; - const classes = { root: ({ props }) => [ 'p-tree p-component', @@ -126,6 +40,5 @@ const classes = { export default BaseStyle.extend({ name: 'tree', - css, classes }); diff --git a/components/lib/treeselect/style/TreeSelectStyle.js b/components/lib/treeselect/style/TreeSelectStyle.js index 5de76f1bb..7200ebaf9 100644 --- a/components/lib/treeselect/style/TreeSelectStyle.js +++ b/components/lib/treeselect/style/TreeSelectStyle.js @@ -1,60 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-treeselect { - display: inline-flex; - cursor: pointer; - user-select: none; - } - - .p-treeselect-trigger { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - } - - .p-treeselect-label-container { - overflow: hidden; - flex: 1 1 auto; - cursor: pointer; - } - - .p-treeselect-label { - display: block; - white-space: nowrap; - cursor: pointer; - overflow: hidden; - text-overflow: ellipsis; - } - - .p-treeselect-label-empty { - overflow: hidden; - visibility: hidden; - } - - .p-treeselect-token { - cursor: default; - display: inline-flex; - align-items: center; - flex: 0 0 auto; - } - - .p-treeselect .p-treeselect-panel { - min-width: 100%; - } - - .p-treeselect-items-wrapper { - overflow: auto; - } - - .p-fluid .p-treeselect { - display: flex; - } -} -`; - const inlineStyles = { root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined }) }; @@ -96,7 +41,6 @@ const classes = { export default BaseStyle.extend({ name: 'treeselect', - css, classes, inlineStyles }); diff --git a/components/lib/treetable/style/TreeTableStyle.js b/components/lib/treetable/style/TreeTableStyle.js index 3325420e4..c36f230b2 100644 --- a/components/lib/treetable/style/TreeTableStyle.js +++ b/components/lib/treetable/style/TreeTableStyle.js @@ -1,178 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-treetable { - position: relative; - } - - .p-treetable table { - border-collapse: collapse; - width: 100%; - table-layout: fixed; - } - - .p-treetable .p-sortable-column { - cursor: pointer; - user-select: none; - } - - .p-treetable-responsive-scroll > .p-treetable-wrapper { - overflow-x: auto; - } - - .p-treetable-responsive-scroll > .p-treetable-wrapper > table, - .p-treetable-auto-layout > .p-treetable-wrapper > table { - table-layout: auto; - } - - .p-treetable-hoverable-rows .p-treetable-tbody > tr { - cursor: pointer; - } - - .p-treetable-toggler { - cursor: pointer; - user-select: none; - display: inline-flex; - align-items: center; - justify-content: center; - vertical-align: middle; - overflow: hidden; - position: relative; - } - - .p-treetable-toggler + .p-checkbox { - vertical-align: middle; - } - - .p-treetable-toggler + .p-checkbox + span { - vertical-align: middle; - } - - /* Resizable */ - .p-treetable-resizable > .p-treetable-wrapper { - overflow-x: auto; - } - - .p-treetable-resizable .p-treetable-thead > tr > th, - .p-treetable-resizable .p-treetable-tfoot > tr > td, - .p-treetable-resizable .p-treetable-tbody > tr > td { - overflow: hidden; - } - - .p-treetable-resizable .p-resizable-column:not(.p-frozen-column) { - background-clip: padding-box; - position: relative; - } - - .p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer { - display: none; - } - - .p-treetable .p-column-resizer { - display: block; - position: absolute; - top: 0; - right: 0; - margin: 0; - width: 0.5rem; - height: 100%; - padding: 0px; - cursor: col-resize; - border: 1px solid transparent; - } - - .p-treetable .p-column-resizer-helper { - width: 1px; - position: absolute; - z-index: 10; - display: none; - } - - .p-treetable .p-treetable-loading-overlay { - position: absolute; - display: flex; - align-items: center; - justify-content: center; - z-index: 2; - } - - /* Scrollable */ - .p-treetable-scrollable .p-treetable-wrapper { - position: relative; - overflow: auto; - } - - .p-treetable-scrollable .p-treetable-table { - display: block; - } - - .p-treetable-scrollable .p-treetable-thead, - .p-treetable-scrollable .p-treetable-tbody, - .p-treetable-scrollable .p-treetable-tfoot { - display: block; - } - - .p-treetable-scrollable .p-treetable-thead > tr, - .p-treetable-scrollable .p-treetable-tbody > tr, - .p-treetable-scrollable .p-treetable-tfoot > tr { - display: flex; - flex-wrap: nowrap; - width: 100%; - } - - .p-treetable-scrollable .p-treetable-thead > tr > th, - .p-treetable-scrollable .p-treetable-tbody > tr > td, - .p-treetable-scrollable .p-treetable-tfoot > tr > td { - display: flex; - flex: 1 1 0; - align-items: center; - } - - .p-treetable-scrollable .p-treetable-thead { - position: sticky; - top: 0; - z-index: 1; - } - - .p-treetable-scrollable .p-treetable-tfoot { - position: sticky; - bottom: 0; - z-index: 1; - } - - .p-treetable-scrollable .p-frozen-column { - position: sticky; - background: inherit; - } - - .p-treetable-scrollable th.p-frozen-column { - z-index: 1; - } - - .p-treetable-scrollable-both .p-treetable-thead > tr > th, - .p-treetable-scrollable-both .p-treetable-tbody > tr > td, - .p-treetable-scrollable-both .p-treetable-tfoot > tr > td, - .p-treetable-scrollable-horizontal .p-treetable-thead > tr > th .p-treetable-scrollable-horizontal .p-treetable-tbody > tr > td, - .p-treetable-scrollable-horizontal .p-treetable-tfoot > tr > td { - flex: 0 0 auto; - } - - .p-treetable-flex-scrollable { - display: flex; - flex-direction: column; - height: 100%; - } - - .p-treetable-flex-scrollable .p-treetable-wrapper { - display: flex; - flex-direction: column; - flex: 1; - height: 100%; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-treetable p-component', @@ -257,6 +84,5 @@ const classes = { export default BaseStyle.extend({ name: 'treetable', - css, classes }); diff --git a/components/lib/tristatecheckbox/style/TriStateCheckboxStyle.js b/components/lib/tristatecheckbox/style/TriStateCheckboxStyle.js index ce7d3a68e..2e628f15f 100644 --- a/components/lib/tristatecheckbox/style/TriStateCheckboxStyle.js +++ b/components/lib/tristatecheckbox/style/TriStateCheckboxStyle.js @@ -1,26 +1,5 @@ import BaseStyle from 'primevue/base/style'; -const css = ` -@layer primevue { - .p-checkbox { - position: relative; - display: inline-flex; - user-select: none; - vertical-align: bottom; - } - - .p-checkbox-input { - cursor: pointer; - } - - .p-checkbox-box { - display: flex; - justify-content: center; - align-items: center; - } -} -`; - const classes = { root: ({ instance, props }) => [ 'p-tristatecheckbox p-checkbox p-component', @@ -40,6 +19,5 @@ const classes = { export default BaseStyle.extend({ name: 'tristatecheckbox', - css, classes });