diff --git a/config/cp.php b/config/cp.php index 188b7d9f5d5..813f68b46d2 100644 --- a/config/cp.php +++ b/config/cp.php @@ -27,6 +27,18 @@ 'start_page' => 'dashboard', + /* + |-------------------------------------------------------------------------- + | Listing Filters + |-------------------------------------------------------------------------- + | + | Whether to always show the filters on listing pages or hide them behind + | a toggle button to keep things more simple. + | + */ + + 'always_show_filters' => false, + /* |-------------------------------------------------------------------------- | Dashboard Widgets diff --git a/package-lock.json b/package-lock.json index 1b320a4dca8..0f466b1a62e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -85,6 +85,7 @@ "@babel/preset-env": "^7.20.2", "@rollup/plugin-inject": "^5.0.3", "@tailwindcss/container-queries": "^0.1.0", + "@tailwindcss/line-clamp": "^0.4.2", "@tailwindcss/typography": "^0.5.9", "@vitejs/plugin-vue2": "^2.2.0", "autoprefixer": "^10.4.0", @@ -4049,6 +4050,15 @@ "tailwindcss": ">=3.2.0" } }, + "node_modules/@tailwindcss/line-clamp": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/line-clamp/-/line-clamp-0.4.2.tgz", + "integrity": "sha512-HFzAQuqYCjyy/SX9sLGB1lroPzmcnWv1FHkIpmypte10hptf4oPUfucryMKovZh2u0uiS9U5Ty3GghWfEJGwVw==", + "dev": true, + "peerDependencies": { + "tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1" + } + }, "node_modules/@tailwindcss/typography": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.9.tgz", diff --git a/package.json b/package.json index 94e4c2bf683..a8f32be85a3 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "@babel/preset-env": "^7.20.2", "@rollup/plugin-inject": "^5.0.3", "@tailwindcss/container-queries": "^0.1.0", + "@tailwindcss/line-clamp": "^0.4.2", "@tailwindcss/typography": "^0.5.9", "@vitejs/plugin-vue2": "^2.2.0", "autoprefixer": "^10.4.0", diff --git a/resources/css/components/column-picker.css b/resources/css/components/column-picker.css index 6d4233ff90a..a6e4543fb47 100644 --- a/resources/css/components/column-picker.css +++ b/resources/css/components/column-picker.css @@ -3,17 +3,10 @@ } .column-picker-item { - @apply bg-white text-sm outline-none flex items-center rounded select-none; - padding: 4px 8px; - margin: -1px 0; + @apply text-sm outline-none flex items-center select-none h-full; &.sortable { - cursor: grab; - - label { - cursor: grab; - } - + @apply rounded bg-white border; &:hover { @apply bg-gray-200; } diff --git a/resources/css/components/fieldtypes/bard.css b/resources/css/components/fieldtypes/bard.css index 737daa8fdf5..921960eaaff 100644 --- a/resources/css/components/fieldtypes/bard.css +++ b/resources/css/components/fieldtypes/bard.css @@ -18,7 +18,7 @@ } .bard-editor .bard-invalid { - @apply p-2 @lg:px-4 bg-red-lighter text-red text-xs whitespace-nowrap; + @apply p-2 @lg:px-4 bg-red-100 text-red-500 text-xs whitespace-nowrap; } /* Modes */ @@ -40,17 +40,12 @@ } .bard-fixed-toolbar { - @apply bg-white shadow-none rounded-t border-b text-sm flex items-start justify-between; - position: sticky; - padding: 4px 8px; - z-index: 5; - top: 0; + @apply bg-white shadow-none rounded-t border-b text-sm flex items-start justify-between px-1 py-2 z-5 top-0; + /* position: sticky; */ + .bard-toolbar-button { - @apply text-gray-800 rounded px-1 flex text-center justify-center items-center text-base text-center; - height: 32px; - width: 32px; - margin: 0; + @apply text-gray-800 rounded px-1 flex text-center justify-center items-center text-base h-8 w-8 m-0; svg { @apply w-auto h-4; } @@ -84,11 +79,7 @@ @apply bg-black rounded-full shadow-lg px-4; button { - @apply text-gray-700 rounded px-1 flex items-center justify-center text-base text-center bg-transparent; - height: 32px; - width: 32px; - margin: 0 2px; - outline: none; + @apply text-gray-700 rounded px-1 flex items-center justify-center text-base text-center bg-transparent h-8 w-8 my-0 mx-0.5 outline-none; svg { @apply w-auto h-4; } @@ -187,7 +178,7 @@ } .bard-set.has-error > .replicator-set-header label { - @apply text-red; + @apply text-red-500; } /* The set selection options for each text block @@ -216,7 +207,7 @@ } .bard-fixed-toolbar { - @apply shadow h-12 justify-center; + @apply shadow h-12; padding: 7px 8px; top: 0; z-index: 999; @@ -238,6 +229,10 @@ * > .ProseMirror { min-height: auto; } + + &:focus { + @apply ring-0; + } } .bard-set-selector { @@ -500,19 +495,20 @@ ========================================================================== */ .bard-link-toolbar { - @apply bg-white rounded absolute leading-none shadow mt-2; + /* @apply bg-white rounded absolute leading-none shadow mt-2; z-index: 100; width: 300px; top: 100%; + right: 0; */ - &:before { + /* &:before { content: ''; border: 6px solid transparent; border-bottom-color: white; position: absolute; bottom: 100%; left: 10px; - } + } */ .input { @apply p-0 text-xs h-8 bg-transparent shadow-none border-none; diff --git a/resources/css/components/fieldtypes/list.css b/resources/css/components/fieldtypes/list.css deleted file mode 100644 index 3edee96ab8a..00000000000 --- a/resources/css/components/fieldtypes/list.css +++ /dev/null @@ -1,106 +0,0 @@ -/* ========================================================================== - LIST FIELDTYPE - ========================================================================== */ - -.list-fieldtype ul { - padding: 0; - margin: 0; - list-style: none; -} - -.list-fieldtype li { - padding: 0 16px; - background: url('../../../svg/bullet.svg') no-repeat 3px 9px; - background-size: 5px; - margin-bottom: 8px; - font-size: 16px; - position: relative; - font-size: 14px; - - &:active { cursor: ns-resize; } - - &.editing { - padding-left: 0px; - background: #fff; - } - - &:last-child { - padding-left: 0; - margin-bottom: 0; - background: none; - } - - input { - background: #fff url('../../../svg/bullet.svg') no-repeat 3px 9px; - background-size: 5px; - box-shadow: none; - padding: 0 16px; - height: auto !important; - font-size: 14px; - outline: 0px !important; - &:active, &:focus { outline: 0px !important; -webkit-appearance: none; box-shadow: 0 0 0 0; } - } - - .delete { - @apply text-gray-600 absolute cursor-pointer inline-block opacity-0; - width: 10px; - height: 10px; - top: 1px; - left: 1px; - } - - &:hover .delete { - opacity: 1; - &:hover { - @apply text-gray-800; - } - } -} - - -/* Inside a Grid - ========================================================================== */ - -.grid-fieldtype .list-fieldtype { - - padding: 8px 0 10px; - - ul { - border: none; - padding: 0; - border-radius: 0; - } - - li { - background-position: 10px 8px; - font-size: 14px; - margin: 0 0 8px; - padding-left: 20px; - &:last-child { padding-left: 0; } - input { - background-position: 10px 8px; - padding: 0 10px 0 20px; - margin-top: 0; - - &:hover { background-color: #fff; } - } - .delete { - left: 8px; - } - } - - .ui-sortable-helper { - box-shadow: none; - .delete { display: none; } - } -} - - -/* Inside a Bard - ========================================================================== */ - -.bard-fieldtype .list-fieldtype { - input.input-text { - border: none; - } -} diff --git a/resources/css/components/fieldtypes/markdown.css b/resources/css/components/fieldtypes/markdown.css index 86a7429c302..8d0259ef7dc 100644 --- a/resources/css/components/fieldtypes/markdown.css +++ b/resources/css/components/fieldtypes/markdown.css @@ -6,7 +6,7 @@ @apply border rounded overflow-hidden relative; .markdown-toolbar { - @apply bg-white shadow-none rounded-t border-b text-sm flex items-center justify-between; + @apply bg-white shadow-none rounded-t border-b text-sm flex flex-wrap items-center justify-between; padding: 4px 8px; } @@ -50,7 +50,7 @@ } .CodeMirror { - @apply bg-gray-100 shadow-inner h-auto font-mono leading-normal p-3 text-xs; + @apply bg-gray-100 shadow-inner h-auto font-mono leading-normal px-0 py-1 @md/markdown:p-3 text-xs; border-radius: 0 0 3px 3px; &:focus-within { @@ -108,7 +108,7 @@ .markdown-modes button { @apply text-gray-700; &.active { - @apply text-white; + @apply text-white bg-black; } } @@ -181,10 +181,9 @@ ========================================================================== */ .markdown-preview { - @apply mx-auto; + @apply mx-auto px-3 py-2 @md/markdown:py-4 @md/markdown:px-5; - padding: 16px 20px; - min-height: 167px; /* @TODO Refactor to avoid a magic number. */ + min-height: 167px; ol { @apply list-decimal; diff --git a/resources/css/components/fieldtypes/replicator.css b/resources/css/components/fieldtypes/replicator.css index 34a8c75d682..216310d53b4 100644 --- a/resources/css/components/fieldtypes/replicator.css +++ b/resources/css/components/fieldtypes/replicator.css @@ -44,9 +44,9 @@ &.invalid { .replicator-set-header-inner { - @apply bg-red-lighter; + @apply bg-red-100; label { - @apply text-red; + @apply text-red-500; } } } @@ -79,11 +79,11 @@ } .replicator-set.has-error > .replicator-set-header label { - @apply text-red; + @apply text-red-500; } .replicator-set-body > .has-error > label { - @apply text-red; + @apply text-red-500; } .replicator-fullscreen { diff --git a/resources/css/components/filters.css b/resources/css/components/filters.css index 72a78ed930d..30658159474 100644 --- a/resources/css/components/filters.css +++ b/resources/css/components/filters.css @@ -15,7 +15,7 @@ } a.active:after { - @apply bg-red block; + @apply bg-red-500 block; content: ""; width: 4px; height: 4px; diff --git a/resources/css/components/global-header.css b/resources/css/components/global-header.css index 11447d5f937..b05d74975f8 100644 --- a/resources/css/components/global-header.css +++ b/resources/css/components/global-header.css @@ -124,12 +124,12 @@ .session-expiry-stripe { - @apply px-4 py-2 text-xs top-0 text-center bg-red text-white cursor-pointer w-full outline-none fixed; + @apply px-4 py-2 text-xs top-0 text-center bg-red-500 text-white cursor-pointer w-full outline-none fixed; z-index: 999; height: 48px; &:hover { - @apply bg-red-dark; + @apply bg-red-700; } &:active, &:focus { diff --git a/resources/css/components/items.css b/resources/css/components/items.css index fdcbb17fa0f..d8b712473f4 100644 --- a/resources/css/components/items.css +++ b/resources/css/components/items.css @@ -15,7 +15,7 @@ &.invalid { .item-inner { - @apply border-red bg-red-lighter text-red; + @apply border-red-300 bg-red-100 text-red-500; } } diff --git a/resources/css/components/metrics.css b/resources/css/components/metrics.css index 42db7bc1c8b..d71136fc857 100644 --- a/resources/css/components/metrics.css +++ b/resources/css/components/metrics.css @@ -26,8 +26,8 @@ } &.dark { } &.blue { @apply bg-blue; } - &.green { @apply bg-green; } - &.red { @apply bg-red; } + &.green { @apply bg-green-600; } + &.red { @apply bg-red-500; } } .metric.simple { diff --git a/resources/css/components/notifications.css b/resources/css/components/notifications.css index 37fc2933e34..3838fb7043f 100644 --- a/resources/css/components/notifications.css +++ b/resources/css/components/notifications.css @@ -21,11 +21,11 @@ } &.success i { - @apply bg-green-light; + @apply bg-green-400 text-green-700; } &.error i { - @apply bg-red; + @apply bg-red-500; } &.default i { diff --git a/resources/css/components/popover.css b/resources/css/components/popover.css index d17c12772f0..9fb3c471052 100644 --- a/resources/css/components/popover.css +++ b/resources/css/components/popover.css @@ -34,11 +34,27 @@ position: relative; } +/* When open */ +.popover-open { + .popover { + pointer-events: auto; + visibility: visible; + } + + .popover-content { + transform: scale(1); + opacity: 1; + } + + .rotating-dots { + transform: rotate(90deg); + } +} + /* Supporting elements */ .rotating-dots { @apply relative cursor-pointer; transition: .12s ease-out; - /* top: 1px; */ } .rotating-dots-button { @@ -54,20 +70,3 @@ @apply focus-outline; } } - -/* When open */ -.popover-open { - .popover { - pointer-events: auto; - visibility: visible; - } - - .popover-content { - transform: scale(1); - opacity: 1; - } - - .rotating-dots { - transform: rotate(90deg); - } -} diff --git a/resources/css/components/publish.css b/resources/css/components/publish.css index 3c8d4e93ae4..bec4122e484 100644 --- a/resources/css/components/publish.css +++ b/resources/css/components/publish.css @@ -55,7 +55,7 @@ code.parent-url { } .has-error > .field-inner > label { - @apply text-red; + @apply text-red-500; } .field-inner { diff --git a/resources/css/components/revisions.css b/resources/css/components/revisions.css index d9c1c6f5f9e..39ada720f7b 100644 --- a/resources/css/components/revisions.css +++ b/resources/css/components/revisions.css @@ -37,10 +37,10 @@ @apply uppercase text-4xs ml-2 text-white rounded-sm; height: 16px; - &.publish { @apply bg-green-light; } + &.publish { @apply bg-green-600; } &.revision, &.restore { @apply text-gray-700; } - &.unpublish { @apply bg-red; } + &.unpublish { @apply bg-red-500; } } .revision-item-note { @@ -49,7 +49,7 @@ } .revision-item.status-published { - .revision-item-bullet { @apply bg-green; } + .revision-item-bullet { @apply bg-green-600; } } .revision-item.status-working-copy { diff --git a/resources/css/components/tabs.css b/resources/css/components/tabs.css index 22c9b7f2ca4..ceec3c61894 100644 --- a/resources/css/components/tabs.css +++ b/resources/css/components/tabs.css @@ -66,10 +66,10 @@ } .tab-button.has-error { - @apply text-red; + @apply text-red-500; &.active { - box-shadow: theme('colors.red.DEFAULT') 0px 3px inset, rgb(230, 235, 241) -1px 0px inset + box-shadow: theme('colors.red.400') 0px 3px inset, rgb(230, 235, 241) -1px 0px inset } } } @@ -88,3 +88,27 @@ @screen md { .tabs .tab-button { @apply text-base; } } + +.pill-tab { + @apply text-gray-700 flex items-center focus:outline-none px-2 py-1 rounded; + + &:hover { + @apply text-gray-900; + } + + &.active { + @apply bg-blue-100 text-blue-900; + } +} + +.button-tab { + @apply text-gray-700 inline-block focus:outline-none px-2 py-1 mr-1; + + &:hover { + @apply text-blue; + } + + &.active { + @apply bg-blue-100 text-blue-800 rounded; + } +} diff --git a/resources/css/components/toggle.css b/resources/css/components/toggle.css index 96ec0d5394f..6794f672b09 100644 --- a/resources/css/components/toggle.css +++ b/resources/css/components/toggle.css @@ -68,13 +68,13 @@ } .toggle-container.on { - @apply bg-green-light border-green; + @apply bg-green-500 border-green-600; .toggle-slider { width: 44px; } .toggle-knob:focus { - box-shadow: 0 0 10px rgba(#64BD63, .7); + box-shadow: 0 0 10px theme(colors.green.500/70); } } diff --git a/resources/css/cp.css b/resources/css/cp.css index ffa183523c6..62a594ca5d6 100644 --- a/resources/css/cp.css +++ b/resources/css/cp.css @@ -61,7 +61,6 @@ @import "components/fieldtypes/environment"; @import "components/fieldtypes/grid"; @import "components/fieldtypes/hidden"; -@import "components/fieldtypes/list"; @import "components/fieldtypes/markdown"; @import "components/fieldtypes/partial"; @import "components/fieldtypes/relationship"; diff --git a/resources/css/elements/badges.css b/resources/css/elements/badges.css index f0b3c4f22e0..490f1bca1f1 100644 --- a/resources/css/elements/badges.css +++ b/resources/css/elements/badges.css @@ -16,7 +16,7 @@ } .badge-updates { - @apply text-3xs not-italic bg-red text-white rounded-full leading-normal; + @apply text-3xs not-italic bg-red-500 text-white rounded-full leading-normal; padding: 2px 6px 1px; } @@ -27,19 +27,23 @@ } .filter-badge { - @apply text-2xs text-gray-800 bg-gray-300 flex items-center; - height: 1.625rem; /* 24px */ + @apply text-2xs text-gray-800 bg-white border flex items-center rounded-full; + height: 1.625rem; padding-left: 10px; button { - @apply px-2 text-base text-gray-500 flex items-center rounded; + @apply px-2 text-base text-gray-600 flex items-center rounded; &:hover { - @apply text-gray-700; + @apply text-gray-800; } &:focus { @apply focus-outline; } } + + &.filter-badge-control { + @apply bg-gray-200 border border-gray-500 border-dashed hover:border-gray-600 hover:bg-gray-300; + } } diff --git a/resources/css/elements/buttons.css b/resources/css/elements/buttons.css index 4e37adaccc5..7593297a17c 100644 --- a/resources/css/elements/buttons.css +++ b/resources/css/elements/buttons.css @@ -32,13 +32,14 @@ button { /* Default, non-primary action button */ .btn, .btn-default { @apply text-gray-800 shadow-button; - background: linear-gradient(180deg, #fff, #f9fafb); - border: 1px solid #c4cdd6; + border: 1px solid #D3DDE7; + border-bottom: 1px solid #c4cdd6; + box-shadow: inset 0 1px 0 0 #fff, 0 1px 0 0 rgba(0, 0, 0,.05), 0 2px 1px 0 theme(colors.gray.600 / .15), 0 0 0 0 transparent; &:hover:not(:disabled), &:active:not(:disabled) { background: linear-gradient(180deg, #f9fafb, #f4f6f8); - border-color: #c4cdd5; + border-bottom: 1px solid #BFC7D0; } &.active, &.active:hover { @@ -54,15 +55,12 @@ button { /* Primary action button */ .btn-primary { - @apply text-white; - background: linear-gradient(to bottom, theme('colors.blue.500'), theme('colors.blue.600')); - border: 1px solid theme('colors.blue.700'); - box-shadow: inset 0 1px 0 0 theme('colors.blue.400'), 0 1px 0 0 rgba(25,30,35,.05), 0 0 0 0 transparent; + @apply text-white bg-gradient-to-b from-blue-500 to-blue-600 border border-blue-700 border-b-blue-800; + box-shadow: inset 0 1px 0 0 theme('colors.blue.400'), 0 1px 0 0 rgba(25,30,35,.05), 0 3px 2px -1px theme(colors.blue.900 / .15), 0 0 0 0 transparent; &:hover:not(:disabled), :active:not(:disabled) { - background: linear-gradient(to bottom, theme('colors.blue.600'), theme('colors.blue.700')); - border: 1px solid theme('colors.blue.800'); - box-shadow: inset 0 1px 0 0 theme('colors.blue.500'), 0 1px 0 0 rgba(25,30,35,.05), 0 0 0 0 transparent; + @apply from-blue-600 to-blue-700 border-blue-800 border-b-blue-900; + box-shadow: inset 0 1px 0 0 theme('colors.blue.500'), 0 1px 0 0 rgba(25,30,35,.05), 0 3px 2px -1px theme(colors.blue.900 / .15), 0 0 0 0 transparent; } &:disabled { @@ -72,18 +70,20 @@ button { /* Danger/delete button */ .btn-danger { - background: linear-gradient(180deg, #e53e3e, #c53030); - border: 1px solid #9b2c2c; - box-shadow: inset 0 1px 0 0 #f56565, 0 1px 0 0 rgba(25,30,35,.05), 0 0 0 0 transparent; - color: white; + @apply text-white bg-gradient-to-b from-red-500 to-red-600 border border-red-600 border-b-red-900; + box-shadow: inset 0 1px 0 0 theme('colors.red.400'), 0 1px 0 0 rgba(0, 0, 0,.05), 0 3px 2px -1px theme(colors.red.900 / .15), 0 0 0 0 transparent; &:hover:not(:disabled), &:active:not(:disabled) { - background: linear-gradient(180deg, #c53030, #9b2c2c); - border-color: #742a2a; + @apply from-red-600 to-red-700 border border-red-700 border-b-red-900; } &:disabled { - @apply text-red-lighter opacity-75; + @apply text-red-100 opacity-75; + } + + &:focus { + @apply ring-red-500 ring-1 ring-offset-1; + /* box-shadow: 0 5px 20px theme(colors.red.400 / 0.5); */ } } @@ -97,7 +97,7 @@ button { } &:focus { - @apply focus-outline bg-gray-300; + @apply ring-2 outline-none; } &:active, &:focus:active { @@ -111,9 +111,13 @@ button { /* Size Variations ========================================================================== */ - .btn-sm { + @apply py-1 px-2 h-8; +} + +.btn-xs { @apply text-2xs; + line-height: 0; height: 1.625rem; /* 24px */ padding: 4px 10px; } diff --git a/resources/css/elements/dropdowns.css b/resources/css/elements/dropdowns.css index 4991420af72..b7bd59899d1 100644 --- a/resources/css/elements/dropdowns.css +++ b/resources/css/elements/dropdowns.css @@ -30,10 +30,10 @@ } button.warning, a.warning { - @apply text-red; + @apply text-red-500; &:hover { - @apply bg-red text-white; + @apply bg-red-500 text-white; } } diff --git a/resources/css/elements/forms.css b/resources/css/elements/forms.css index f8e82b455d1..97842f7b3f3 100644 --- a/resources/css/elements/forms.css +++ b/resources/css/elements/forms.css @@ -142,7 +142,10 @@ input.input-text-minimal:read-only, .radio-fieldtype .option, .checkboxes-fieldtype .option { - @apply mt-3 flex items-center; + @apply flex items-center; + &:not(:first-child) { + @apply mt-3; + } input { @apply leading-normal mr-1; @@ -202,7 +205,7 @@ input.input-text-minimal:read-only, label .required { - @apply text-red; + @apply text-red-500; font-style: normal; + .localizable-icon { diff --git a/resources/css/elements/icons.css b/resources/css/elements/icons.css index 4afa4d6b83f..93feb8b0458 100644 --- a/resources/css/elements/icons.css +++ b/resources/css/elements/icons.css @@ -21,31 +21,11 @@ svg { width: 7px; flex-shrink: 0; - &.published { @apply bg-green-light } + &.published { @apply bg-green-600 } &.draft, &.expired { @apply bg-gray-600 } &.scheduled, &.hollow { @apply bg-transparent border border-gray-600 } } -.icon-status-draft { - @apply bg-gray-700; -} - -.icon-status-hidden { - @apply border border-gray-700; -} - -.icon-status-live { - @apply bg-green; -} - -.icon-status-error { - @apply bg-red; -} - -.icon-status-warning { - @apply bg-yellow-dark; -} - .icon-header-avatar { height: 32px; width: 32px; diff --git a/resources/css/elements/tables.css b/resources/css/elements/tables.css index 635f10a3037..55abfa8c2f5 100644 --- a/resources/css/elements/tables.css +++ b/resources/css/elements/tables.css @@ -16,7 +16,7 @@ } .data-list-bulk-actions { - @apply bg-white absolute w-full py-3 z-10; + @apply bg-white absolute w-full py-2 z-10; padding-left: 56px; } @@ -37,56 +37,56 @@ overflow-x: auto; thead { - @apply text-sm text-gray-700 text-gray-900; + @apply bg-gray-100 text-xs text-gray-700 text-gray-900; tr { @apply border-b; } th { - @apply font-medium px-4 py-3; - &:first-child { @apply rounded-tl; } - &:last-child { @apply rounded-tr; } + @apply font-medium px-4 py-3 whitespace-nowrap; + &:first-child { @apply rounded-tl-lg; } + &:last-child { @apply rounded-tr-lg; } &:hover { @apply text-gray-900; } } + th.handle-column { + @apply p-0 w-4; + } .type-column { text-align: right; } - .actions-column { - @apply p-0 pr-4 text-right; - width: 24px; - } } tbody { outline: none; tr { - @apply border-b text-sm; + @apply border-b border-gray-400 text-sm; &.row-selected { @apply bg-gray-200; } &:first-child { - td:first-child { - @apply rounded-tl; + td:first-child, th:first-child { + @apply rounded-tl-md; } - td:last-child { - @apply rounded-tr; + td:last-child, th:last-child { + @apply rounded-tr-md; } } &:last-child { @apply border-none; - td:first-child { - @apply rounded-bl; + + td:first-child, th:first-child { + @apply rounded-bl-md; } - td:last-child { - @apply rounded-br; + td:last-child, th:last-child { + @apply rounded-br-md; } } @@ -99,25 +99,19 @@ } td { - @apply py-2 px-4 break-words; + @apply py-2 px-4 break-words ; + } + + td.table-drag-handle { + @apply w-1 border-r h-full py-2 px-0; } } - .type-column { + + .type-column { text-align: right; } - .actions-column { - @apply p-0 text-right; - width: 24px; - .rotating-dots-button { - margin-right: 18px; - } - } } - .checkbox-column { - @apply w-4 pr-0 relative z-10; - padding-left: 20px; - } .sortable-column { @apply cursor-pointer select-none; @@ -127,12 +121,10 @@ } &.current-column { - @apply font-bold; svg { opacity: 1; } } svg { - /* transition: all 150ms ease; */ opacity: 0; } @@ -146,11 +138,67 @@ } } -@screen md { +/* Sticky Meta Columns */ +.data-table { + thead th.checkbox-column { + @apply p-0 pr-2 z-10 sticky -left-px; + background-image: linear-gradient(to right, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); + width: 45px; + min-width: 45px; + } + + thead th.actions-column { + @apply p-0 pl-2 text-right sticky z-1 -right-px; + background-image: linear-gradient(to left, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); + width: 45px; + min-width: 45px; + } + + tbody th.checkbox-column { + @apply z-1 px-3 sticky -left-px; + background-image: linear-gradient(to right, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%); + } + + tbody th.actions-column { + @apply p-0 pl-2 text-right sticky -right-px z-1; + background-image: linear-gradient(to left, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%); + min-width: 45px; + width: 45px; + } + + tbody tr.row-selected .checkbox-column { + background-image: linear-gradient(to left, theme(colors.gray.200) 70%, theme(colors.gray.200 / 0%) 100%); + } + + tbody tr.row-selected .actions-column { + background-image: linear-gradient(to right, theme(colors.gray.200) 70%, theme(colors.gray.200 / 0%) 100%); + } + + tbody tr:hover .checkbox-column { + background-image: linear-gradient(to right, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); + } + + tbody tr:hover .actions-column { + background-image: linear-gradient(to left, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); + } +} + +/* .data-table[data-size="sm"] { + thead th.checkbox-column, + thead th.actions-column, + tbody th.checkbox-column, + tbody th.actions-column { + position: static !important; + background: none !important; + } +} */ + + +/* @screen md { .data-table { @apply w-full table; } -} +} */ .data-list-header ~ .data-table { thead th { @@ -257,3 +305,59 @@ table.control { padding-left: 30px; } } + + +/* Index Fields + ========================================================================== */ + +.bard-index-field, +.code-index-field, +.markdown-index-field, +.text-index-field, +.textarea-index-field { + @apply line-clamp-2 text-xs; +} + +.title-index-field { + @apply line-clamp-2; + min-width: 10vw; +} + +.relationship-index-field { + min-width: 10vw; + .relationship-index-field-item { + @apply rounded bg-gray-100 border px-1 flex items-center text-2xs; + a { + @apply line-clamp-1; + } + } +} + +.date-index-field { + @apply whitespace-nowrap text-gray-800; +} + +.slug-index-field { + @apply line-clamp-2 font-mono text-2xs; +} + +.status-index-field { + @apply inline-block text-xs bg-gray-300 text-gray-800 shrink rounded-full px-2 py-0.5 text-center justify-center; + + &.status-published:not(.status-private) { + @apply text-green-900 bg-green-200 ; + } + + &.status-scheduled { + @apply text-amber-900 bg-amber-200; + } +} + +.role-index-field, .groups-index-field { + @apply flex flex-wrap -mb-1.5; + + .role-index-field-item, + .groups-index-field-item { + @apply rounded bg-gray-100 border px-1 inline-block text-2xs line-clamp-1 mb-1; + } +} diff --git a/resources/css/vendors/vue-select.css b/resources/css/vendors/vue-select.css index 71642bfd506..b9fa558fdaa 100644 --- a/resources/css/vendors/vue-select.css +++ b/resources/css/vendors/vue-select.css @@ -186,7 +186,7 @@ } span { - @apply text-md shrink-0 font-thin; + @apply text-md shrink-0 font-normal; } } diff --git a/resources/js/components/DropdownList.vue b/resources/js/components/DropdownList.vue index cc78b5dbc3b..6fd4b0e2786 100644 --- a/resources/js/components/DropdownList.vue +++ b/resources/js/components/DropdownList.vue @@ -1,5 +1,5 @@